UNPKG

@earth-app/shovel

Version:

Kotlin Multiplatform Web Scraping Framework

1,180 lines (1,172 loc) 298 kB
(function (factory) { if (typeof define === 'function' && define.amd) define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-atomicfu.js'], factory); else if (typeof exports === 'object') factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-atomicfu.js')); else { if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') { throw new Error("Error loading module 'kotlinx-coroutines-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlinx-coroutines-core'."); } if (typeof globalThis['kotlinx-atomicfu'] === 'undefined') { throw new Error("Error loading module 'kotlinx-coroutines-core'. Its dependency 'kotlinx-atomicfu' was not found. Please, check whether 'kotlinx-atomicfu' is loaded prior to 'kotlinx-coroutines-core'."); } globalThis['kotlinx-coroutines-core'] = factory(typeof globalThis['kotlinx-coroutines-core'] === 'undefined' ? {} : globalThis['kotlinx-coroutines-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-atomicfu']); } }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_atomicfu) { 'use strict'; //region block: imports var imul = Math.imul; var Unit_instance = kotlin_kotlin.$_$.v2; var protoOf = kotlin_kotlin.$_$.j8; var THROW_CCE = kotlin_kotlin.$_$.bc; var Continuation = kotlin_kotlin.$_$.b6; var initMetadataForClass = kotlin_kotlin.$_$.t7; var VOID = kotlin_kotlin.$_$.b; var EmptyCoroutineContext_getInstance = kotlin_kotlin.$_$.q2; var createCoroutineUnintercepted = kotlin_kotlin.$_$.t5; var CoroutineImpl = kotlin_kotlin.$_$.h6; var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.r5; var initMetadataForCoroutine = kotlin_kotlin.$_$.v7; var initMetadataForInterface = kotlin_kotlin.$_$.x7; var UnsupportedOperationException_init_$Create$ = kotlin_kotlin.$_$.a2; var toString = kotlin_kotlin.$_$.m8; var isInterface = kotlin_kotlin.$_$.d8; var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.l1; var toString_0 = kotlin_kotlin.$_$.pc; var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e; var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d; var initMetadataForObject = kotlin_kotlin.$_$.z7; var hashCode = kotlin_kotlin.$_$.s7; var equals = kotlin_kotlin.$_$.m7; var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.b; var CancellationException_init_$Create$ = kotlin_kotlin.$_$.q; var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.k2; var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.m2; var AbstractCoroutineContextKey = kotlin_kotlin.$_$.x5; var Key_instance = kotlin_kotlin.$_$.p2; var AbstractCoroutineContextElement = kotlin_kotlin.$_$.w5; var get = kotlin_kotlin.$_$.y5; var minusKey = kotlin_kotlin.$_$.z5; var ContinuationInterceptor = kotlin_kotlin.$_$.a6; var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.y1; var addSuppressed = kotlin_kotlin.$_$.ec; var getStringHashCode = kotlin_kotlin.$_$.r7; var Enum = kotlin_kotlin.$_$.qb; var startCoroutine = kotlin_kotlin.$_$.i6; var noWhenBranchMatchedException = kotlin_kotlin.$_$.mc; var Long = kotlin_kotlin.$_$.wb; var compare = kotlin_kotlin.$_$.o6; var intercepted = kotlin_kotlin.$_$.u5; var ArrayDeque_init_$Create$ = kotlin_kotlin.$_$.h; var add = kotlin_kotlin.$_$.m6; var subtract = kotlin_kotlin.$_$.y6; var RuntimeException = kotlin_kotlin.$_$.ac; var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.x1; var captureStack = kotlin_kotlin.$_$.d7; var Error_0 = kotlin_kotlin.$_$.rb; var Error_init_$Init$ = kotlin_kotlin.$_$.z; var Element = kotlin_kotlin.$_$.f6; var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.k6; var ArrayList_init_$Create$ = kotlin_kotlin.$_$.i; var CancellationException = kotlin_kotlin.$_$.q5; var ArrayList = kotlin_kotlin.$_$.w2; var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.n1; var plus = kotlin_kotlin.$_$.g6; var get_0 = kotlin_kotlin.$_$.d6; var fold = kotlin_kotlin.$_$.c6; var minusKey_0 = kotlin_kotlin.$_$.e6; var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.x; var anyToString = kotlin_kotlin.$_$.b7; var Companion_instance = kotlin_kotlin.$_$.u2; var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.j2; var createFailure = kotlin_kotlin.$_$.hc; var UnsupportedOperationException = kotlin_kotlin.$_$.dc; var atomicfu$AtomicRefArray$ofNulls = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.a; var ensureNotNull = kotlin_kotlin.$_$.ic; var fromInt = kotlin_kotlin.$_$.s6; var multiply = kotlin_kotlin.$_$.u6; var divide = kotlin_kotlin.$_$.q6; var modulo = kotlin_kotlin.$_$.t6; var convertToInt = kotlin_kotlin.$_$.p6; var equalsLong = kotlin_kotlin.$_$.r6; var bitwiseAnd = kotlin_kotlin.$_$.n6; var shiftRight = kotlin_kotlin.$_$.x6; var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.i1; var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c; var listOf = kotlin_kotlin.$_$.o4; var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.j; var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.q1; var compareTo = kotlin_kotlin.$_$.k7; var last = kotlin_kotlin.$_$.ia; var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.b2; var shiftLeft = kotlin_kotlin.$_$.w6; var initMetadataForCompanion = kotlin_kotlin.$_$.u7; var NoSuchElementException = kotlin_kotlin.$_$.xb; var NoSuchElementException_init_$Init$ = kotlin_kotlin.$_$.r1; var IllegalStateException = kotlin_kotlin.$_$.ub; var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.k1; var getKClass = kotlin_kotlin.$_$.w8; var Unit = kotlin_kotlin.$_$.cc; var Exception = kotlin_kotlin.$_$.sb; var Exception_init_$Init$ = kotlin_kotlin.$_$.f1; var defineProp = kotlin_kotlin.$_$.l7; var toLongOrNull = kotlin_kotlin.$_$.eb; var createCoroutineUnintercepted_0 = kotlin_kotlin.$_$.s5; var startCoroutineUninterceptedOrReturnNonGeneratorVersion = kotlin_kotlin.$_$.v5; var plus_0 = kotlin_kotlin.$_$.u4; var KtList = kotlin_kotlin.$_$.z2; var listOf_0 = kotlin_kotlin.$_$.n4; var getKClassFromExpression = kotlin_kotlin.$_$.v8; var Exception_init_$Create$ = kotlin_kotlin.$_$.e1; var removeFirstOrNull = kotlin_kotlin.$_$.v4; var KtMutableList = kotlin_kotlin.$_$.e3; var coerceIn = kotlin_kotlin.$_$.q8; var CancellationException_init_$Create$_0 = kotlin_kotlin.$_$.s; var CancellationException_init_$Init$ = kotlin_kotlin.$_$.r; var HashSet_init_$Create$ = kotlin_kotlin.$_$.l; var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.w1; var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.p; //endregion //region block: pre-declaration function cancel$default(cause, $super) { cause = cause === VOID ? null : cause; var tmp; if ($super === VOID) { this.en(cause); tmp = Unit_instance; } else { tmp = $super.en.call(this, cause); } return tmp; } function invokeOnCompletion$default(onCancelling, invokeImmediately, handler, $super) { onCancelling = onCancelling === VOID ? false : onCancelling; invokeImmediately = invokeImmediately === VOID ? true : invokeImmediately; return $super === VOID ? this.ym(onCancelling, invokeImmediately, handler) : $super.ym.call(this, onCancelling, invokeImmediately, handler); } initMetadataForInterface(Job, 'Job', VOID, VOID, [Element], [0]); initMetadataForInterface(ParentJob, 'ParentJob', VOID, VOID, [Job], [0]); initMetadataForClass(JobSupport, 'JobSupport', VOID, VOID, [Job, ParentJob], [0]); initMetadataForInterface(CoroutineScope, 'CoroutineScope'); initMetadataForClass(AbstractCoroutine, 'AbstractCoroutine', VOID, JobSupport, [JobSupport, Job, Continuation, CoroutineScope], [0]); initMetadataForClass(StandaloneCoroutine, 'StandaloneCoroutine', VOID, AbstractCoroutine, VOID, [0]); initMetadataForClass(LazyStandaloneCoroutine, 'LazyStandaloneCoroutine', VOID, StandaloneCoroutine, VOID, [0]); initMetadataForCoroutine($awaitCOROUTINE$, CoroutineImpl); initMetadataForClass(DeferredCoroutine, 'DeferredCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, Job], [0]); initMetadataForClass(LazyDeferredCoroutine, 'LazyDeferredCoroutine', VOID, DeferredCoroutine, VOID, [0]); initMetadataForInterface(CancellableContinuation, 'CancellableContinuation', VOID, VOID, [Continuation]); initMetadataForInterface(NotCompleted, 'NotCompleted'); initMetadataForInterface(CancelHandler, 'CancelHandler', VOID, VOID, [NotCompleted]); initMetadataForClass(DisposeOnCancel, 'DisposeOnCancel', VOID, VOID, [CancelHandler]); initMetadataForClass(UserSupplied, 'UserSupplied', VOID, VOID, [CancelHandler]); initMetadataForInterface(Runnable, 'Runnable'); initMetadataForClass(SchedulerTask, 'SchedulerTask', VOID, VOID, [Runnable]); initMetadataForClass(DispatchedTask, 'DispatchedTask', VOID, SchedulerTask); initMetadataForInterface(Waiter, 'Waiter'); initMetadataForClass(CancellableContinuationImpl, 'CancellableContinuationImpl', VOID, DispatchedTask, [DispatchedTask, CancellableContinuation, Waiter]); initMetadataForObject(Active, 'Active', VOID, VOID, [NotCompleted]); initMetadataForClass(CompletedContinuation, 'CompletedContinuation'); initMetadataForClass(LockFreeLinkedListNode, 'LockFreeLinkedListNode', LockFreeLinkedListNode); initMetadataForInterface(Incomplete, 'Incomplete'); initMetadataForClass(JobNode, 'JobNode', VOID, LockFreeLinkedListNode, [LockFreeLinkedListNode, Incomplete]); initMetadataForClass(ChildContinuation, 'ChildContinuation', VOID, JobNode); initMetadataForCoroutine($awaitCOROUTINE$_0, CoroutineImpl); initMetadataForClass(CompletableDeferredImpl, 'CompletableDeferredImpl', VOID, JobSupport, [JobSupport, Job], [0]); initMetadataForInterface(CompletableJob, 'CompletableJob', VOID, VOID, [Job], [0]); initMetadataForClass(CompletedExceptionally, 'CompletedExceptionally'); initMetadataForClass(CancelledContinuation, 'CancelledContinuation', VOID, CompletedExceptionally); initMetadataForObject(Key, 'Key', VOID, AbstractCoroutineContextKey); initMetadataForClass(CoroutineDispatcher, 'CoroutineDispatcher', VOID, AbstractCoroutineContextElement, [AbstractCoroutineContextElement, ContinuationInterceptor]); initMetadataForObject(Key_0, 'Key'); initMetadataForObject(Key_1, 'Key'); initMetadataForClass(CoroutineName, 'CoroutineName', VOID, AbstractCoroutineContextElement); initMetadataForObject(GlobalScope, 'GlobalScope', VOID, VOID, [CoroutineScope]); initMetadataForClass(CoroutineStart, 'CoroutineStart', VOID, Enum); initMetadataForInterface(CopyableThrowable, 'CopyableThrowable'); initMetadataForInterface(Delay, 'Delay', VOID, VOID, VOID, [1]); initMetadataForClass(EventLoop, 'EventLoop', VOID, CoroutineDispatcher); initMetadataForObject(ThreadLocalEventLoop, 'ThreadLocalEventLoop'); initMetadataForClass(CompletionHandlerException, 'CompletionHandlerException', VOID, RuntimeException); initMetadataForClass(CoroutinesInternalError, 'CoroutinesInternalError', VOID, Error_0); initMetadataForObject(Key_2, 'Key'); initMetadataForObject(NonDisposableHandle, 'NonDisposableHandle'); initMetadataForClass(SynchronizedObject, 'SynchronizedObject', SynchronizedObject); initMetadataForClass(Finishing, 'Finishing', VOID, SynchronizedObject, [SynchronizedObject, Incomplete]); initMetadataForClass(ChildCompletion, 'ChildCompletion', VOID, JobNode); initMetadataForClass(AwaitContinuation, 'AwaitContinuation', VOID, CancellableContinuationImpl); initMetadataForClass(JobImpl, 'JobImpl', VOID, JobSupport, [JobSupport, CompletableJob], [0]); initMetadataForClass(Empty, 'Empty', VOID, VOID, [Incomplete]); initMetadataForClass(LockFreeLinkedListHead, 'LockFreeLinkedListHead', LockFreeLinkedListHead, LockFreeLinkedListNode); initMetadataForClass(NodeList, 'NodeList', NodeList, LockFreeLinkedListHead, [LockFreeLinkedListHead, Incomplete]); initMetadataForClass(IncompleteStateBox, 'IncompleteStateBox'); initMetadataForClass(InactiveNodeList, 'InactiveNodeList', VOID, VOID, [Incomplete]); initMetadataForClass(InvokeOnCompletion, 'InvokeOnCompletion', VOID, JobNode); initMetadataForClass(InvokeOnCancelling, 'InvokeOnCancelling', VOID, JobNode); initMetadataForClass(ResumeOnCompletion, 'ResumeOnCompletion', VOID, JobNode); initMetadataForClass(ChildHandleNode, 'ChildHandleNode', VOID, JobNode); initMetadataForClass(ResumeAwaitOnCompletion, 'ResumeAwaitOnCompletion', VOID, JobNode); initMetadataForClass(MainCoroutineDispatcher, 'MainCoroutineDispatcher', VOID, CoroutineDispatcher); initMetadataForClass(SupervisorJobImpl, 'SupervisorJobImpl', VOID, JobImpl, VOID, [0]); initMetadataForClass(TimeoutCancellationException, 'TimeoutCancellationException', VOID, CancellationException, [CancellationException, CopyableThrowable]); initMetadataForObject(Unconfined, 'Unconfined', VOID, CoroutineDispatcher); initMetadataForObject(Key_3, 'Key'); initMetadataForClass(BufferOverflow, 'BufferOverflow', VOID, Enum); initMetadataForClass(ConcurrentLinkedListNode, 'ConcurrentLinkedListNode'); initMetadataForClass(Segment, 'Segment', VOID, ConcurrentLinkedListNode, [ConcurrentLinkedListNode, NotCompleted]); initMetadataForClass(ChannelSegment, 'ChannelSegment', VOID, Segment); initMetadataForCoroutine($hasNextCOROUTINE$, CoroutineImpl); initMetadataForClass(SendBroadcast, 'SendBroadcast', VOID, VOID, [Waiter]); initMetadataForClass(BufferedChannelIterator, 'BufferedChannelIterator', VOID, VOID, [Waiter], [0, 3]); initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl); function close$default(cause, $super) { cause = cause === VOID ? null : cause; return $super === VOID ? this.f11(cause) : $super.f11.call(this, cause); } initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]); function cancel$default_0(cause, $super) { cause = cause === VOID ? null : cause; var tmp; if ($super === VOID) { this.en(cause); tmp = Unit_instance; } else { tmp = $super.en.call(this, cause); } return tmp; } initMetadataForInterface(ReceiveChannel, 'ReceiveChannel', VOID, VOID, VOID, [0]); initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 4, 0, 3]); initMetadataForClass(WaiterEB, 'WaiterEB'); initMetadataForClass(ReceiveCatching, 'ReceiveCatching', VOID, VOID, [Waiter]); initMetadataForObject(Factory, 'Factory'); initMetadataForClass(Failed, 'Failed', Failed); initMetadataForClass(Closed, 'Closed', VOID, Failed); initMetadataForCompanion(Companion); initMetadataForClass(ChannelResult, 'ChannelResult'); initMetadataForClass(ClosedReceiveChannelException, 'ClosedReceiveChannelException', VOID, NoSuchElementException); initMetadataForClass(ClosedSendChannelException, 'ClosedSendChannelException', VOID, IllegalStateException); initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, SendChannel, ReceiveChannel], [1, 0]); initMetadataForClass(ConflatedBufferedChannel, 'ConflatedBufferedChannel', VOID, BufferedChannel, VOID, [1, 0]); initMetadataForInterface(ProducerScope, 'ProducerScope', VOID, VOID, [CoroutineScope, SendChannel], [1]); initMetadataForClass(ProducerCoroutine, 'ProducerCoroutine', VOID, ChannelCoroutine, [ChannelCoroutine, ProducerScope], [1, 0]); initMetadataForClass(SegmentOrClosed, 'SegmentOrClosed'); initMetadataForObject(ExceptionSuccessfullyProcessed, 'ExceptionSuccessfullyProcessed', VOID, Exception); initMetadataForClass(DispatchedContinuation, 'DispatchedContinuation', VOID, DispatchedTask, [DispatchedTask, Continuation]); initMetadataForClass(DispatchException, 'DispatchException', VOID, Exception); initMetadataForClass(UndeliveredElementException, 'UndeliveredElementException', VOID, RuntimeException); initMetadataForClass(ContextScope, 'ContextScope', VOID, VOID, [CoroutineScope]); initMetadataForClass(Symbol, 'Symbol'); initMetadataForInterface(SelectInstance, 'SelectInstance'); initMetadataForClass(ClauseData, 'ClauseData', VOID, VOID, VOID, [1]); initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler, SelectInstance, Waiter], [0, 2]); initMetadataForClass(TrySelectDetailedResult, 'TrySelectDetailedResult', VOID, Enum); initMetadataForClass(SetTimeoutBasedDispatcher, 'SetTimeoutBasedDispatcher', VOID, CoroutineDispatcher, [CoroutineDispatcher, Delay], [1]); initMetadataForObject(NodeDispatcher, 'NodeDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]); initMetadataForClass(MessageQueue, 'MessageQueue', VOID, VOID, [KtMutableList]); initMetadataForClass(ScheduledMessageQueue, 'ScheduledMessageQueue', VOID, MessageQueue); initMetadataForClass(WindowMessageQueue, 'WindowMessageQueue', VOID, MessageQueue); initMetadataForClass(UnconfinedEventLoop, 'UnconfinedEventLoop', UnconfinedEventLoop, EventLoop); initMetadataForObject(SetTimeoutDispatcher, 'SetTimeoutDispatcher', VOID, SetTimeoutBasedDispatcher, VOID, [1]); initMetadataForClass(ClearTimeout, 'ClearTimeout', VOID, VOID, [CancelHandler]); initMetadataForClass(WindowClearTimeout, 'WindowClearTimeout', VOID, ClearTimeout); initMetadataForClass(WindowDispatcher, 'WindowDispatcher', VOID, CoroutineDispatcher, [CoroutineDispatcher, Delay], [1]); initMetadataForObject(Dispatchers, 'Dispatchers'); initMetadataForClass(JsMainDispatcher, 'JsMainDispatcher', VOID, MainCoroutineDispatcher); initMetadataForClass(JobCancellationException, 'JobCancellationException', VOID, CancellationException); initMetadataForClass(DiagnosticCoroutineContextException, 'DiagnosticCoroutineContextException', VOID, RuntimeException); initMetadataForClass(ListClosed, 'ListClosed', VOID, LockFreeLinkedListNode); initMetadataForClass(CommonThreadLocal, 'CommonThreadLocal', CommonThreadLocal); //endregion function AbstractCoroutine(parentContext, initParentJob, active) { JobSupport.call(this, active); if (initParentJob) { this.rl(parentContext.u8(Key_instance_3)); } this.ul_1 = parentContext.ah(this); } protoOf(AbstractCoroutine).n8 = function () { return this.ul_1; }; protoOf(AbstractCoroutine).vl = function () { return this.ul_1; }; protoOf(AbstractCoroutine).wl = function () { return protoOf(JobSupport).wl.call(this); }; protoOf(AbstractCoroutine).xl = function (value) { }; protoOf(AbstractCoroutine).yl = function (cause, handled) { }; protoOf(AbstractCoroutine).zl = function () { return get_classSimpleName(this) + ' was cancelled'; }; protoOf(AbstractCoroutine).am = function (state) { if (state instanceof CompletedExceptionally) { this.yl(state.bm_1, state.dm()); } else { this.xl((state == null ? true : !(state == null)) ? state : THROW_CCE()); } }; protoOf(AbstractCoroutine).s8 = function (result) { var state = this.em(toState_0(result)); if (state === get_COMPLETING_WAITING_CHILDREN()) return Unit_instance; this.fm(state); }; protoOf(AbstractCoroutine).fm = function (state) { return this.gm(state); }; protoOf(AbstractCoroutine).hm = function (exception) { handleCoroutineException(this.ul_1, exception); }; protoOf(AbstractCoroutine).im = function () { var tmp0_elvis_lhs = get_coroutineName(this.ul_1); var tmp; if (tmp0_elvis_lhs == null) { return protoOf(JobSupport).im.call(this); } else { tmp = tmp0_elvis_lhs; } var coroutineName = tmp; return '"' + coroutineName + '":' + protoOf(JobSupport).im.call(this); }; protoOf(AbstractCoroutine).jm = function (start, receiver, block) { start.mm(block, receiver, this); }; function launch(_this__u8e3s4, context, start, block) { context = context === VOID ? EmptyCoroutineContext_getInstance() : context; start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start; var newContext = newCoroutineContext(_this__u8e3s4, context); var coroutine = start.vn() ? new LazyStandaloneCoroutine(newContext, block) : new StandaloneCoroutine(newContext, true); coroutine.jm(start, coroutine, block); return coroutine; } function async(_this__u8e3s4, context, start, block) { context = context === VOID ? EmptyCoroutineContext_getInstance() : context; start = start === VOID ? CoroutineStart_DEFAULT_getInstance() : start; var newContext = newCoroutineContext(_this__u8e3s4, context); var coroutine = start.vn() ? new LazyDeferredCoroutine(newContext, block) : new DeferredCoroutine(newContext, true); coroutine.jm(start, coroutine, block); return coroutine; } function StandaloneCoroutine(parentContext, active) { AbstractCoroutine.call(this, parentContext, true, active); } protoOf(StandaloneCoroutine).qn = function (exception) { handleCoroutineException(this.ul_1, exception); return true; }; function LazyStandaloneCoroutine(parentContext, block) { StandaloneCoroutine.call(this, parentContext, false); this.co_1 = createCoroutineUnintercepted(block, this, this); } protoOf(LazyStandaloneCoroutine).tm = function () { startCoroutineCancellable_1(this.co_1, this); }; function $awaitCOROUTINE$(_this__u8e3s4, resultContinuation) { CoroutineImpl.call(this, resultContinuation); this.lo_1 = _this__u8e3s4; } protoOf($awaitCOROUTINE$).p8 = function () { var suspendResult = this.j8_1; $sm: do try { var tmp = this.h8_1; switch (tmp) { case 0: this.i8_1 = 2; this.h8_1 = 1; suspendResult = this.lo_1.un(this); if (suspendResult === get_COROUTINE_SUSPENDED()) { return suspendResult; } continue $sm; case 1: return (suspendResult == null ? true : !(suspendResult == null)) ? suspendResult : THROW_CCE(); case 2: throw this.k8_1; } } catch ($p) { var e = $p; if (this.i8_1 === 2) { throw e; } else { this.h8_1 = this.i8_1; this.k8_1 = e; } } while (true); }; function DeferredCoroutine(parentContext, active) { AbstractCoroutine.call(this, parentContext, true, active); } protoOf(DeferredCoroutine).po = function () { var tmp = this.tn(); return (tmp == null ? true : !(tmp == null)) ? tmp : THROW_CCE(); }; protoOf(DeferredCoroutine).qo = function ($completion) { var tmp = new $awaitCOROUTINE$(this, $completion); tmp.j8_1 = Unit_instance; tmp.k8_1 = null; return tmp.p8(); }; function LazyDeferredCoroutine(parentContext, block) { DeferredCoroutine.call(this, parentContext, false); this.uo_1 = createCoroutineUnintercepted(block, this, this); } protoOf(LazyDeferredCoroutine).tm = function () { startCoroutineCancellable_1(this.uo_1, this); }; function CancellableContinuation() { } function invokeOnCancellation(_this__u8e3s4, handler) { var tmp; if (_this__u8e3s4 instanceof CancellableContinuationImpl) { _this__u8e3s4.fp(handler); tmp = Unit_instance; } else { throw UnsupportedOperationException_init_$Create$('third-party implementation of CancellableContinuation is not supported'); } return tmp; } function disposeOnCancellation(_this__u8e3s4, handle) { return invokeOnCancellation(_this__u8e3s4, new DisposeOnCancel(handle)); } function DisposeOnCancel(handle) { this.gp_1 = handle; } protoOf(DisposeOnCancel).hp = function (cause) { return this.gp_1.ip(); }; protoOf(DisposeOnCancel).toString = function () { return 'DisposeOnCancel[' + toString(this.gp_1) + ']'; }; function getOrCreateCancellableContinuation(delegate) { if (!(delegate instanceof DispatchedContinuation)) { return new CancellableContinuationImpl(delegate, 1); } var tmp0_safe_receiver = delegate.pp(); var tmp; if (tmp0_safe_receiver == null) { tmp = null; } else { // Inline function 'kotlin.takeIf' call var tmp_0; if (tmp0_safe_receiver.qp()) { tmp_0 = tmp0_safe_receiver; } else { tmp_0 = null; } tmp = tmp_0; } var tmp1_elvis_lhs = tmp; var tmp_1; if (tmp1_elvis_lhs == null) { return new CancellableContinuationImpl(delegate, 2); } else { tmp_1 = tmp1_elvis_lhs; } return tmp_1; } function get_RESUME_TOKEN() { _init_properties_CancellableContinuationImpl_kt__6rrtdd(); return RESUME_TOKEN; } var RESUME_TOKEN; function UserSupplied(handler) { this.rp_1 = handler; } protoOf(UserSupplied).hp = function (cause) { this.rp_1(cause); }; protoOf(UserSupplied).toString = function () { return 'CancelHandler.UserSupplied[' + get_classSimpleName(this.rp_1) + '@' + get_hexAddress(this) + ']'; }; function CancelHandler() { } function _get_parentHandle__f8dcex($this) { return $this.ep_1.kotlinx$atomicfu$value; } function _get_stateDebugRepresentation__bf18u4($this) { var tmp0_subject = $this.pm(); var tmp; if (!(tmp0_subject == null) ? isInterface(tmp0_subject, NotCompleted) : false) { tmp = 'Active'; } else { if (tmp0_subject instanceof CancelledContinuation) { tmp = 'Cancelled'; } else { tmp = 'Completed'; } } return tmp; } function isReusable($this) { var tmp; if (get_isReusableMode($this.tp_1)) { var tmp_0 = $this.ap_1; tmp = (tmp_0 instanceof DispatchedContinuation ? tmp_0 : THROW_CCE()).sp(); } else { tmp = false; } return tmp; } function cancelLater($this, cause) { if (!isReusable($this)) return false; var tmp = $this.ap_1; var dispatched = tmp instanceof DispatchedContinuation ? tmp : THROW_CCE(); return dispatched.up(cause); } function callSegmentOnCancellation($this, segment, cause) { // Inline function 'kotlinx.coroutines.index' call var index = $this.cp_1.kotlinx$atomicfu$value & 536870911; // Inline function 'kotlin.check' call if (!!(index === 536870911)) { var message = 'The index for Segment.onCancellation(..) is broken'; throw IllegalStateException_init_$Create$(toString(message)); } // Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call try { segment.zp(index, cause, $this.n8()); } catch ($p) { if ($p instanceof Error) { var ex = $p; handleCoroutineException($this.n8(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + $this.toString(), ex)); } else { throw $p; } } } function trySuspend($this) { // Inline function 'kotlinx.atomicfu.loop' call var this_0 = $this.cp_1; while (true) { var cur = this_0.kotlinx$atomicfu$value; // Inline function 'kotlinx.coroutines.decision' call switch (cur >> 29) { case 0: // Inline function 'kotlinx.coroutines.index' call // Inline function 'kotlinx.coroutines.decisionAndIndex' call var tmp$ret$2 = (1 << 29) + (cur & 536870911) | 0; if ($this.cp_1.atomicfu$compareAndSet(cur, tmp$ret$2)) return true; break; case 2: return false; default: // Inline function 'kotlin.error' call var message = 'Already suspended'; throw IllegalStateException_init_$Create$(toString(message)); } } } function tryResume($this) { // Inline function 'kotlinx.atomicfu.loop' call var this_0 = $this.cp_1; while (true) { var cur = this_0.kotlinx$atomicfu$value; // Inline function 'kotlinx.coroutines.decision' call switch (cur >> 29) { case 0: // Inline function 'kotlinx.coroutines.index' call // Inline function 'kotlinx.coroutines.decisionAndIndex' call var tmp$ret$2 = (2 << 29) + (cur & 536870911) | 0; if ($this.cp_1.atomicfu$compareAndSet(cur, tmp$ret$2)) return true; break; case 1: return false; default: // Inline function 'kotlin.error' call var message = 'Already resumed'; throw IllegalStateException_init_$Create$(toString(message)); } } } function installParentHandle($this) { var tmp0_elvis_lhs = $this.n8().u8(Key_instance_3); var tmp; if (tmp0_elvis_lhs == null) { return null; } else { tmp = tmp0_elvis_lhs; } var parent = tmp; var handle = invokeOnCompletion(parent, VOID, new ChildContinuation($this)); $this.ep_1.atomicfu$compareAndSet(null, handle); return handle; } function invokeOnCancellationImpl($this, handler) { // Inline function 'kotlinx.coroutines.assert' call // Inline function 'kotlinx.atomicfu.loop' call var this_0 = $this.dp_1; while (true) { var state = this_0.kotlinx$atomicfu$value; if (state instanceof Active) { if ($this.dp_1.atomicfu$compareAndSet(state, handler)) return Unit_instance; } else { var tmp; if (!(state == null) ? isInterface(state, CancelHandler) : false) { tmp = true; } else { tmp = state instanceof Segment; } if (tmp) { multipleHandlersError($this, handler, state); } else { if (state instanceof CompletedExceptionally) { if (!state.iq()) { multipleHandlersError($this, handler, state); } if (state instanceof CancelledContinuation) { var tmp1_safe_receiver = state instanceof CompletedExceptionally ? state : null; var cause = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.bm_1; if (isInterface(handler, CancelHandler)) { $this.fq(handler, cause); } else { var segment = handler instanceof Segment ? handler : THROW_CCE(); callSegmentOnCancellation($this, segment, cause); } } return Unit_instance; } else { if (state instanceof CompletedContinuation) { if (!(state.bq_1 == null)) { multipleHandlersError($this, handler, state); } if (handler instanceof Segment) return Unit_instance; if (!isInterface(handler, CancelHandler)) THROW_CCE(); if (state.gq()) { $this.fq(handler, state.eq_1); return Unit_instance; } var update = state.hq(VOID, handler); if ($this.dp_1.atomicfu$compareAndSet(state, update)) return Unit_instance; } else { if (handler instanceof Segment) return Unit_instance; if (!isInterface(handler, CancelHandler)) THROW_CCE(); var update_0 = new CompletedContinuation(state, handler); if ($this.dp_1.atomicfu$compareAndSet(state, update_0)) return Unit_instance; } } } } } } function multipleHandlersError($this, handler, state) { // Inline function 'kotlin.error' call var message = "It's prohibited to register multiple handlers, tried to register " + toString(handler) + ', already has ' + toString_0(state); throw IllegalStateException_init_$Create$(toString(message)); } function dispatchResume($this, mode) { if (tryResume($this)) return Unit_instance; dispatch($this, mode); } function resumedState($this, state, proposedUpdate, resumeMode, onCancellation, idempotent) { var tmp; if (proposedUpdate instanceof CompletedExceptionally) { // Inline function 'kotlinx.coroutines.assert' call // Inline function 'kotlinx.coroutines.assert' call tmp = proposedUpdate; } else { if (!get_isCancellableMode(resumeMode) && idempotent == null) { tmp = proposedUpdate; } else { var tmp_0; var tmp_1; if (!(onCancellation == null)) { tmp_1 = true; } else { tmp_1 = isInterface(state, CancelHandler); } if (tmp_1) { tmp_0 = true; } else { tmp_0 = !(idempotent == null); } if (tmp_0) { tmp = new CompletedContinuation(proposedUpdate, isInterface(state, CancelHandler) ? state : null, onCancellation, idempotent); } else { tmp = proposedUpdate; } } } return tmp; } function tryResumeImpl($this, proposedUpdate, idempotent, onCancellation) { // Inline function 'kotlinx.atomicfu.loop' call var this_0 = $this.dp_1; while (true) { var tmp0 = this_0.kotlinx$atomicfu$value; $l$block: { if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) { var update = resumedState($this, tmp0, proposedUpdate, $this.tp_1, onCancellation, idempotent); if (!$this.dp_1.atomicfu$compareAndSet(tmp0, update)) { break $l$block; } detachChildIfNonReusable($this); return get_RESUME_TOKEN(); } else { if (tmp0 instanceof CompletedContinuation) { var tmp; if (!(idempotent == null) && tmp0.dq_1 === idempotent) { // Inline function 'kotlinx.coroutines.assert' call tmp = get_RESUME_TOKEN(); } else { tmp = null; } return tmp; } else { return null; } } } } } function alreadyResumedError($this, proposedUpdate) { // Inline function 'kotlin.error' call var message = 'Already resumed, but proposed with update ' + toString_0(proposedUpdate); throw IllegalStateException_init_$Create$(toString(message)); } function detachChildIfNonReusable($this) { if (!isReusable($this)) { $this.jq(); } } function CancellableContinuationImpl(delegate, resumeMode) { DispatchedTask.call(this, resumeMode); this.ap_1 = delegate; // Inline function 'kotlinx.coroutines.assert' call this.bp_1 = this.ap_1.n8(); var tmp = this; // Inline function 'kotlinx.coroutines.decisionAndIndex' call var tmp$ret$1 = (0 << 29) + 536870911 | 0; tmp.cp_1 = atomic$int$1(tmp$ret$1); this.dp_1 = atomic$ref$1(Active_instance); this.ep_1 = atomic$ref$1(null); } protoOf(CancellableContinuationImpl).kq = function () { return this.ap_1; }; protoOf(CancellableContinuationImpl).n8 = function () { return this.bp_1; }; protoOf(CancellableContinuationImpl).pm = function () { return this.dp_1.kotlinx$atomicfu$value; }; protoOf(CancellableContinuationImpl).qm = function () { var tmp = this.pm(); return !(!(tmp == null) ? isInterface(tmp, NotCompleted) : false); }; protoOf(CancellableContinuationImpl).rm = function () { var tmp = this.pm(); return tmp instanceof CancelledContinuation; }; protoOf(CancellableContinuationImpl).lq = function () { var tmp0_elvis_lhs = installParentHandle(this); var tmp; if (tmp0_elvis_lhs == null) { return Unit_instance; } else { tmp = tmp0_elvis_lhs; } var handle = tmp; if (this.qm()) { handle.ip(); this.ep_1.kotlinx$atomicfu$value = NonDisposableHandle_instance; } }; protoOf(CancellableContinuationImpl).qp = function () { // Inline function 'kotlinx.coroutines.assert' call // Inline function 'kotlinx.coroutines.assert' call var state = this.dp_1.kotlinx$atomicfu$value; // Inline function 'kotlinx.coroutines.assert' call var tmp; if (state instanceof CompletedContinuation) { tmp = !(state.dq_1 == null); } else { tmp = false; } if (tmp) { this.jq(); return false; } var tmp_0 = this.cp_1; // Inline function 'kotlinx.coroutines.decisionAndIndex' call tmp_0.kotlinx$atomicfu$value = (0 << 29) + 536870911 | 0; this.dp_1.kotlinx$atomicfu$value = Active_instance; return true; }; protoOf(CancellableContinuationImpl).mq = function () { return this.pm(); }; protoOf(CancellableContinuationImpl).nq = function (takenState, cause) { var this_0 = this.dp_1; while (true) { var state = this_0.kotlinx$atomicfu$value; if (!(state == null) ? isInterface(state, NotCompleted) : false) { // Inline function 'kotlin.error' call var message = 'Not completed'; throw IllegalStateException_init_$Create$(toString(message)); } else { if (state instanceof CompletedExceptionally) return Unit_instance; else { if (state instanceof CompletedContinuation) { // Inline function 'kotlin.check' call if (!!state.gq()) { var message_0 = 'Must be called at most once'; throw IllegalStateException_init_$Create$(toString(message_0)); } var update = state.hq(VOID, VOID, VOID, VOID, cause); if (this.dp_1.atomicfu$compareAndSet(state, update)) { state.oq(this, cause); return Unit_instance; } } else { if (this.dp_1.atomicfu$compareAndSet(state, new CompletedContinuation(state, VOID, VOID, VOID, cause))) { return Unit_instance; } } } } } return Unit_instance; }; protoOf(CancellableContinuationImpl).pq = function (cause) { // Inline function 'kotlinx.atomicfu.loop' call var this_0 = this.dp_1; while (true) { var tmp0 = this_0.kotlinx$atomicfu$value; $l$block: { if (!(!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false)) return false; var tmp; if (isInterface(tmp0, CancelHandler)) { tmp = true; } else { tmp = tmp0 instanceof Segment; } var update = new CancelledContinuation(this, cause, tmp); if (!this.dp_1.atomicfu$compareAndSet(tmp0, update)) { break $l$block; } if (isInterface(tmp0, CancelHandler)) { this.fq(tmp0, cause); } else { if (tmp0 instanceof Segment) { callSegmentOnCancellation(this, tmp0, cause); } } detachChildIfNonReusable(this); dispatchResume(this, this.tp_1); return true; } } }; protoOf(CancellableContinuationImpl).qq = function (cause) { if (cancelLater(this, cause)) return Unit_instance; this.pq(cause); detachChildIfNonReusable(this); }; protoOf(CancellableContinuationImpl).fq = function (handler, cause) { // Inline function 'kotlinx.coroutines.CancellableContinuationImpl.callCancelHandlerSafely' call try { handler.hp(cause); } catch ($p) { if ($p instanceof Error) { var ex = $p; handleCoroutineException(this.n8(), new CompletionHandlerException('Exception in invokeOnCancellation handler for ' + this.toString(), ex)); } else { throw $p; } } return Unit_instance; }; protoOf(CancellableContinuationImpl).rq = function (onCancellation, cause, value) { try { onCancellation(cause, value, this.n8()); } catch ($p) { if ($p instanceof Error) { var ex = $p; handleCoroutineException(this.n8(), new CompletionHandlerException('Exception in resume onCancellation handler for ' + this.toString(), ex)); } else { throw $p; } } }; protoOf(CancellableContinuationImpl).sq = function (parent) { return parent.um(); }; protoOf(CancellableContinuationImpl).tq = function () { var isReusable_0 = isReusable(this); if (trySuspend(this)) { if (_get_parentHandle__f8dcex(this) == null) { installParentHandle(this); } if (isReusable_0) { this.uq(); } return get_COROUTINE_SUSPENDED(); } if (isReusable_0) { this.uq(); } var state = this.pm(); if (state instanceof CompletedExceptionally) throw recoverStackTrace(state.bm_1, this); if (get_isCancellableMode(this.tp_1)) { var job = this.n8().u8(Key_instance_3); if (!(job == null) && !job.wl()) { var cause = job.um(); this.nq(state, cause); throw recoverStackTrace(cause, this); } } return this.vq(state); }; protoOf(CancellableContinuationImpl).uq = function () { var tmp = this.ap_1; var tmp0_safe_receiver = tmp instanceof DispatchedContinuation ? tmp : null; var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wq(this); var tmp_0; if (tmp1_elvis_lhs == null) { return Unit_instance; } else { tmp_0 = tmp1_elvis_lhs; } var cancellationCause = tmp_0; this.jq(); this.pq(cancellationCause); }; protoOf(CancellableContinuationImpl).s8 = function (result) { return this.xq(toState(result, this), this.tp_1); }; protoOf(CancellableContinuationImpl).yq = function (value, onCancellation) { return this.zq(value, this.tp_1, onCancellation); }; protoOf(CancellableContinuationImpl).ar = function (segment, index) { var tmp0 = this.cp_1; $l$block: { // Inline function 'kotlinx.atomicfu.update' call while (true) { var cur = tmp0.kotlinx$atomicfu$value; // Inline function 'kotlinx.coroutines.index' call // Inline function 'kotlin.check' call if (!((cur & 536870911) === 536870911)) { var message = 'invokeOnCancellation should be called at most once'; throw IllegalStateException_init_$Create$(toString(message)); } // Inline function 'kotlinx.coroutines.decision' call // Inline function 'kotlinx.coroutines.decisionAndIndex' call var upd = (cur >> 29 << 29) + index | 0; if (tmp0.atomicfu$compareAndSet(cur, upd)) { break $l$block; } } } invokeOnCancellationImpl(this, segment); }; protoOf(CancellableContinuationImpl).xo = function (handler) { return invokeOnCancellation(this, new UserSupplied(handler)); }; protoOf(CancellableContinuationImpl).fp = function (handler) { return invokeOnCancellationImpl(this, handler); }; protoOf(CancellableContinuationImpl).zq = function (proposedUpdate, resumeMode, onCancellation) { // Inline function 'kotlinx.atomicfu.loop' call var this_0 = this.dp_1; while (true) { var tmp0 = this_0.kotlinx$atomicfu$value; $l$block: { if (!(tmp0 == null) ? isInterface(tmp0, NotCompleted) : false) { var update = resumedState(this, tmp0, proposedUpdate, resumeMode, onCancellation, null); if (!this.dp_1.atomicfu$compareAndSet(tmp0, update)) { break $l$block; } detachChildIfNonReusable(this); dispatchResume(this, resumeMode); return Unit_instance; } else { if (tmp0 instanceof CancelledContinuation) { if (tmp0.er()) { if (onCancellation == null) null; else { // Inline function 'kotlin.let' call this.rq(onCancellation, tmp0.bm_1, proposedUpdate); } return Unit_instance; } } } alreadyResumedError(this, proposedUpdate); } } }; protoOf(CancellableContinuationImpl).xq = function (proposedUpdate, resumeMode, onCancellation, $super) { onCancellation = onCancellation === VOID ? null : onCancellation; var tmp; if ($super === VOID) { this.zq(proposedUpdate, resumeMode, onCancellation); tmp = Unit_instance; } else { tmp = $super.zq.call(this, proposedUpdate, resumeMode, onCancellation); } return tmp; }; protoOf(CancellableContinuationImpl).jq = function () { var tmp0_elvis_lhs = _get_parentHandle__f8dcex(this); var tmp; if (tmp0_elvis_lhs == null) { return Unit_instance; } else { tmp = tmp0_elvis_lhs; } var handle = tmp; handle.ip(); this.ep_1.kotlinx$atomicfu$value = NonDisposableHandle_instance; }; protoOf(CancellableContinuationImpl).vo = function (value, idempotent, onCancellation) { return tryResumeImpl(this, value, idempotent, onCancellation); }; protoOf(CancellableContinuationImpl).wo = function (token) { // Inline function 'kotlinx.coroutines.assert' call dispatchResume(this, this.tp_1); }; protoOf(CancellableContinuationImpl).yo = function (_this__u8e3s4, value) { var tmp = this.ap_1; var dc = tmp instanceof DispatchedContinuation ? tmp : null; var tmp_0; if ((dc == null ? null : dc.kp_1) === _this__u8e3s4) { tmp_0 = 4; } else { tmp_0 = this.tp_1; } this.xq(value, tmp_0); }; protoOf(CancellableContinuationImpl).vq = function (state) { var tmp; if (state instanceof CompletedContinuation) { var tmp_0 = state.aq_1; tmp = (tmp_0 == null ? true : !(tmp_0 == null)) ? tmp_0 : THROW_CCE(); } else { tmp = (state == null ? true : !(state == null)) ? state : THROW_CCE(); } return tmp; }; protoOf(CancellableContinuationImpl).fr = function (state) { var tmp0_safe_receiver = protoOf(DispatchedTask).fr.call(this, state); var tmp; if (tmp0_safe_receiver == null) { tmp = null; } else { // Inline function 'kotlin.let' call tmp = recoverStackTrace(tmp0_safe_receiver, this.ap_1); } return tmp; }; protoOf(CancellableContinuationImpl).toString = function () { return this.gr() + '(' + toDebugString(this.ap_1) + '){' + _get_stateDebugRepresentation__bf18u4(this) + '}@' + get_hexAddress(this); }; protoOf(CancellableContinuationImpl).gr = function () { return 'CancellableContinuation'; }; function NotCompleted() { } function Active() { } protoOf(Active).toString = function () { return 'Active'; }; var Active_instance; function Active_getInstance() { return Active_instance; } function CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause) { cancelHandler = cancelHandler === VOID ? null : cancelHandler; onCancellation = onCancellation === VOID ? null : onCancellation; idempotentResume = idempotentResume === VOID ? null : idempotentResume; cancelCause = cancelCause === VOID ? null : cancelCause; this.aq_1 = result; this.bq_1 = cancelHandler; this.cq_1 = onCancellation; this.dq_1 = idempotentResume; this.eq_1 = cancelCause; } protoOf(CompletedContinuation).gq = function () { return !(this.eq_1 == null); }; protoOf(CompletedContinuation).oq = function (cont, cause) { var tmp0_safe_receiver = this.bq_1; if (tmp0_safe_receiver == null) null; else { // Inline function 'kotlin.let' call cont.fq(tmp0_safe_receiver, cause); } var tmp1_safe_receiver = this.cq_1; if (tmp1_safe_receiver == null) null; else { // Inline function 'kotlin.let' call cont.rq(tmp1_safe_receiver, cause, this.aq_1); } }; protoOf(CompletedContinuation).jr = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause) { return new CompletedContinuation(result, cancelHandler, onCancellation, idempotentResume, cancelCause); }; protoOf(CompletedContinuation).hq = function (result, cancelHandler, onCancellation, idempotentResume, cancelCause, $super) { result = result === VOID ? this.aq_1 : result; cancelHandler = cancelHandler === VOID ? this.bq_1 : cancelHandler; onCancellation = onCancellation === VOID ? this.cq_1 : onCancellation; idempotentResume = idempotentResume === VOID ? this.dq_1 : idempotentResume; cancelCause = cancelCause === VOID ? this.eq_1 : cancelCause; return $super === VOID ? this.jr(result, cancelHandler, onCancellation, idempotentResume, cancelCause) : $super.jr.call(this, result, cancelHandler, onCancellation, idempotentResume, cancelCause); }; protoOf(CompletedContinuation).toString = function () { return 'CompletedContinuation(result=' + toString_0(this.aq_1) + ', cancelHandler=' + toString_0(this.bq_1) + ', onCancellation=' + toString_0(this.cq_1) + ', idempotentResume=' + toString_0(this.dq_1) + ', cancelCause=' + toString_0(this.eq_1) + ')'; }; protoOf(CompletedContinuation).hashCode = function () { var result = this.aq_1 == null ? 0 : hashCode(this.aq_1); result = imul(result, 31) + (this.bq_1 == null ? 0 : hashCode(this.bq_1)) | 0; result = imul(result, 31) + (this.cq_1 == null ? 0 : hashCode(this.cq_1)) | 0; result = imul(result, 31) + (this.dq_1 == null ? 0 : hashCode(this.dq_1)) | 0; result = imul(result, 31) + (this.eq_1 == null ? 0 : hashCode(this.eq_1)) | 0; return result; }; protoOf(CompletedContinuation).equals = function (other) { if (this === other) return true; if (!(other instanceof CompletedContinuation)) return false; var tmp0_other_with_cast = other instanceof CompletedContinuation ? other : THROW_CCE(); if (!equals(this.aq_1, tmp0_other_with_cast.aq_1)) return false; if (!equals(this.bq_1, tmp0_other_with_cast.bq_1)) return false; if (!equals(this.cq_1, tmp0_other_with_cast.cq_1)) return false; if (!equals(this.dq_1, tmp0_other_with_cast.dq_1)) return false; if (!equals(this.eq_1, tmp0_other_with_cast.eq_1)) return false; return true; }; function ChildContinuation(child) { JobNode.call(this); this.or_1 = child; } protoOf(ChildContinuation).pr = function () { return true; };