@dmarket/p2p-tracker-core 0.1.0-SNAPSHOT.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dmarket-p2p-tracker-core-domain.mjs +8456 -0
  2. package/dmarket-p2p-tracker-core-domain.mjs.map +1 -0
  3. package/kotlin-kotlin-stdlib.mjs +17010 -0
  4. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  5. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  6. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
  7. package/kotlinx-atomicfu.mjs +251 -0
  8. package/kotlinx-atomicfu.mjs.map +1 -0
  9. package/kotlinx-browser.mjs +8 -0
  10. package/kotlinx-browser.mjs.map +1 -0
  11. package/kotlinx-coroutines-core.mjs +11173 -0
  12. package/kotlinx-coroutines-core.mjs.map +1 -0
  13. package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
  14. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  15. package/kotlinx-io-kotlinx-io-core.mjs +2014 -0
  16. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  17. package/kotlinx-serialization-kotlinx-serialization-core.mjs +5753 -0
  18. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  19. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  20. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs.map +1 -0
  21. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5436 -0
  22. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  23. package/ktor-ktor-client-content-negotiation.mjs +4 -0
  24. package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  25. package/ktor-ktor-client-core.mjs +9869 -0
  26. package/ktor-ktor-client-core.mjs.map +1 -0
  27. package/ktor-ktor-events.mjs +82 -0
  28. package/ktor-ktor-events.mjs.map +1 -0
  29. package/ktor-ktor-http-cio.mjs +2253 -0
  30. package/ktor-ktor-http-cio.mjs.map +1 -0
  31. package/ktor-ktor-http.mjs +3133 -0
  32. package/ktor-ktor-http.mjs.map +1 -0
  33. package/ktor-ktor-io.mjs +3511 -0
  34. package/ktor-ktor-io.mjs.map +1 -0
  35. package/ktor-ktor-serialization-kotlinx-json.mjs +4 -0
  36. package/ktor-ktor-serialization-kotlinx-json.mjs.map +1 -0
  37. package/ktor-ktor-serialization-kotlinx.mjs +4 -0
  38. package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  39. package/ktor-ktor-serialization.mjs +4 -0
  40. package/ktor-ktor-serialization.mjs.map +1 -0
  41. package/ktor-ktor-sse.mjs +4 -0
  42. package/ktor-ktor-sse.mjs.map +1 -0
  43. package/ktor-ktor-utils.mjs +3207 -0
  44. package/ktor-ktor-utils.mjs.map +1 -0
  45. package/ktor-ktor-websocket-serialization.mjs +4 -0
  46. package/ktor-ktor-websocket-serialization.mjs.map +1 -0
  47. package/ktor-ktor-websockets.mjs +2522 -0
  48. package/ktor-ktor-websockets.mjs.map +1 -0
  49. package/p2p-tracker-core.d.mts +286 -0
  50. package/p2p-tracker-core.mjs +15126 -0
  51. package/p2p-tracker-core.mjs.map +1 -0
  52. package/package.json +49 -0
@@ -0,0 +1,3511 @@
1
+ import {
2
+ Companion_instance1co2nkledm2ru as Companion_instance,
3
+ Unit_instance3vdlo4e4f5ggx as Unit_instance,
4
+ _Result___init__impl__xyqfz810za1hm0unrcw as _Result___init__impl__xyqfz8,
5
+ protoOf180f3jzyo7rfj as protoOf,
6
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
7
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
8
+ toString30pk9tzaqopn as toString,
9
+ hashCodeq5arwsb9dgti as hashCode,
10
+ equals2au1ep9vhcato as equals,
11
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
12
+ createFailure8paxfkfa5dc7 as createFailure,
13
+ Result3t1vadv16kmzk as Result,
14
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
15
+ toString1h6jjoch8cjt8 as toString_0,
16
+ newThrowablezl37abp36p5f as newThrowable,
17
+ stackTraceToString2670q6lbhdojj as stackTraceToString,
18
+ VOID3gxj6tk5isa35 as VOID,
19
+ isInterface3d6p8outrmvmk as isInterface,
20
+ FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
21
+ CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
22
+ fromInt1lka3ktyu79a4 as fromInt,
23
+ compare2uud5j30pw5xc as compare,
24
+ numberToLong345n6tb1n1i71 as numberToLong,
25
+ add85si75olwt6n as add,
26
+ intercepted2ogpsikxxj4u0 as intercepted,
27
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
28
+ returnIfSuspended216etyc2z49su as returnIfSuspended,
29
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
30
+ Long2qws0ah9gnpki as Long,
31
+ initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
32
+ CancellationException_init_$Create$3mozl5zk7b7i2 as CancellationException_init_$Create$,
33
+ CancellationException3b36o9qz53rgr as CancellationException,
34
+ convertToIntofdoxh9bstof as convertToInt,
35
+ toString1pkumu07cwy4m as toString_1,
36
+ IllegalStateException_init_$Create$3394faf8tdm0h as IllegalStateException_init_$Create$,
37
+ IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
38
+ IllegalStateException_init_$Init$1o0uxbvfescy4 as IllegalStateException_init_$Init$,
39
+ captureStack1fzi4aczwc4hg as captureStack,
40
+ replace3le3ie7l9k8aq as replace,
41
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
42
+ equalsLong28bsrfhwvd686 as equalsLong,
43
+ get_ONEazvfdh9ju3d4 as get_ONE,
44
+ IllegalArgumentException_init_$Create$1mgk48flhjim3 as IllegalArgumentException_init_$Create$,
45
+ subtract16cg4lfi29fq9 as subtract,
46
+ constructCallableReference23y65rf941mch as constructCallableReference,
47
+ EmptyCoroutineContext_getInstance2wsqunjuleo79 as EmptyCoroutineContext_getInstance,
48
+ Continuation1aa2oekvx7jm7 as Continuation,
49
+ KFunctionImpl1wt0sp8rkf847 as KFunctionImpl,
50
+ initMetadataForFunctionReferencen3g5fpj34t8u as initMetadataForFunctionReference,
51
+ initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
52
+ Enum3alwj03lh1n41 as Enum,
53
+ ArrayList_init_$Create$1z3aa4voswqq as ArrayList_init_$Create$,
54
+ listOf1jh22dvmctj1r as listOf,
55
+ StringBuilder_init_$Create$3q4yitjcnfjo as StringBuilder_init_$Create$,
56
+ charSequenceLength3278n89t01tmv as charSequenceLength,
57
+ encodeToByteArray22651fhg4p67t as encodeToByteArray,
58
+ AutoCloseable1l5p57f9lp7kv as AutoCloseable,
59
+ _Char___init__impl__6a9atx2yltdocdrxs4d as _Char___init__impl__6a9atx,
60
+ replaceqbix900hl8kl as replace_0,
61
+ getStringHashCode26igk1bx568vk as getStringHashCode,
62
+ charSequenceSubSequence1iwpdba8s3jc7 as charSequenceSubSequence,
63
+ isCharSequence1ju9jr1w86plq as isCharSequence,
64
+ trim11nh7r46at6sx as trim,
65
+ toByte4i43936u611k as toByte,
66
+ decodeToString1x4faah2liw2p as decodeToString,
67
+ setOf45ia9pnfhe90 as setOf,
68
+ charSequenceGet1vxk1y5n17t1z as charSequenceGet,
69
+ Char__toInt_impl_vasixd1ka89vowck9tn as Char__toInt_impl_vasixd,
70
+ } from './kotlin-kotlin-stdlib.mjs';
71
+ import {
72
+ DisposableHandle1uzxt8frdchxn as DisposableHandle,
73
+ CancellableContinuationImpl1cx201opicavg as CancellableContinuationImpl,
74
+ CopyableThrowable1mvc99jcyvivf as CopyableThrowable,
75
+ CoroutineScopefcb5f5dwqcas as CoroutineScope,
76
+ launch1c91vkjzdi9sd as launch,
77
+ startCoroutineCancellable18shtfwdieib as startCoroutineCancellable,
78
+ get_job2zvlvce9o9a29 as get_job,
79
+ Job13y4jkazwjho0 as Job,
80
+ cancel1xim2hrvjmwpn as cancel,
81
+ Dispatchers_getInstance20p7pyqnrepag as Dispatchers_getInstance,
82
+ } from './kotlinx-coroutines-core.mjs';
83
+ import {
84
+ Buffergs925ekssbch as Buffer,
85
+ IOException_init_$Create$30ael4xxp8cz as IOException_init_$Create$,
86
+ indexOf29nspdgx2e3ap as indexOf,
87
+ EOFException_init_$Create$28fkhq0q0kobq as EOFException_init_$Create$,
88
+ readString3v6duspiz33tv as readString,
89
+ readByteString2hnsbql6t4ads as readByteString,
90
+ readString2nvggcfaijfhd as readString_0,
91
+ IOException1wyutdmfe71nu as IOException,
92
+ IOException_init_$Init$1v5tzhogkz08y as IOException_init_$Init$,
93
+ IOException_init_$Create$1n9wqi59tj1t7 as IOException_init_$Create$_0,
94
+ readByteArray1fhzfwi2j014k as readByteArray,
95
+ writeString33ca4btrgctw7 as writeString,
96
+ IOException_init_$Init$214bkj3jbj847 as IOException_init_$Init$_0,
97
+ readByteArray1ri21h2rciakw as readByteArray_0,
98
+ } from './kotlinx-io-kotlinx-io-core.mjs';
99
+ import { atomic$ref$130aurmcwdfdf1 as atomic$ref$1 } from './kotlinx-atomicfu.mjs';
100
+ import { decodeToString2ede220pr5xir as decodeToString_0 } from './kotlinx-io-kotlinx-io-bytestring.mjs';
101
+ //region block: imports
102
+ //endregion
103
+ //region block: pre-declaration
104
+ initMetadataForCompanion(Companion);
105
+ initMetadataForObject(Empty, 'Empty');
106
+ initMetadataForClass(Closed, 'Closed');
107
+ function resume() {
108
+ return this.f31().y8(Companion_getInstance().c31_1);
109
+ }
110
+ function resume_0(throwable) {
111
+ var tmp = this.f31();
112
+ var tmp_0;
113
+ if (throwable == null) {
114
+ tmp_0 = null;
115
+ } else {
116
+ // Inline function 'kotlin.let' call
117
+ // Inline function 'kotlin.Companion.failure' call
118
+ var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(throwable));
119
+ tmp_0 = new Result(tmp$ret$0);
120
+ }
121
+ var tmp1_elvis_lhs = tmp_0;
122
+ return tmp.y8(tmp1_elvis_lhs == null ? Companion_getInstance().c31_1 : tmp1_elvis_lhs.tn_1);
123
+ }
124
+ initMetadataForInterface(Task, 'Task');
125
+ initMetadataForClass(Read, 'Read', VOID, VOID, [Task]);
126
+ initMetadataForClass(Write, 'Write', VOID, VOID, [Task]);
127
+ initMetadataForClass(sam$kotlinx_coroutines_DisposableHandle$0, 'sam$kotlinx_coroutines_DisposableHandle$0', VOID, VOID, [DisposableHandle, FunctionAdapter]);
128
+ initMetadataForCoroutine($awaitContentCOROUTINE$, CoroutineImpl);
129
+ initMetadataForCoroutine($flushCOROUTINE$, CoroutineImpl);
130
+ initMetadataForCoroutine($flushAndCloseCOROUTINE$, CoroutineImpl);
131
+ function awaitContent$default(min, $completion, $super) {
132
+ min = min === VOID ? 1 : min;
133
+ return $super === VOID ? this.m33(min, $completion) : $super.m33.call(this, min, $completion);
134
+ }
135
+ initMetadataForInterface(ByteReadChannel_1, 'ByteReadChannel', VOID, VOID, VOID, [1]);
136
+ function get_autoFlush() {
137
+ return false;
138
+ }
139
+ initMetadataForInterface(ByteWriteChannel, 'ByteWriteChannel', VOID, VOID, VOID, [0]);
140
+ initMetadataForClass(ByteChannel, 'ByteChannel', ByteChannel, VOID, [ByteReadChannel_1, ByteWriteChannel], [1, 0]);
141
+ initMetadataForClass(ConcurrentIOException, 'ConcurrentIOException', VOID, IllegalStateException);
142
+ initMetadataForCoroutine($findNextCOROUTINE$, CoroutineImpl);
143
+ initMetadataForCoroutine($advanceToNextPotentialMatchCOROUTINE$, CoroutineImpl);
144
+ initMetadataForCoroutine($checkFullMatchCOROUTINE$, CoroutineImpl);
145
+ initMetadataForClass(ByteChannelScanner, 'ByteChannelScanner', VOID, VOID, VOID, [1, 0]);
146
+ initMetadataForClass(ByteReadChannel$Companion$Empty$1, VOID, VOID, VOID, [ByteReadChannel_1], [1]);
147
+ initMetadataForCompanion(Companion_0);
148
+ initMetadataForCoroutine($readRemainingCOROUTINE$, CoroutineImpl);
149
+ initMetadataForCoroutine($discardCOROUTINE$, CoroutineImpl);
150
+ initMetadataForCoroutine($readAvailableCOROUTINE$, CoroutineImpl);
151
+ initMetadataForCoroutine($toByteArrayCOROUTINE$, CoroutineImpl);
152
+ initMetadataForCoroutine($copyToCOROUTINE$, CoroutineImpl);
153
+ initMetadataForCoroutine($skipIfFoundCOROUTINE$, CoroutineImpl);
154
+ initMetadataForCoroutine($readPacketCOROUTINE$, CoroutineImpl);
155
+ initMetadataForCoroutine($readBufferCOROUTINE$, CoroutineImpl);
156
+ initMetadataForCoroutine($peekCOROUTINE$, CoroutineImpl);
157
+ initMetadataForCoroutine($internalReadLineToCOROUTINE$, CoroutineImpl);
158
+ initMetadataForCoroutine($internalReadLineTo$discardCrlfOrCrCOROUTINE$, CoroutineImpl);
159
+ initMetadataForCoroutine($flushIfNeededCOROUTINE$, CoroutineImpl);
160
+ initMetadataForClass(WriterJob, 'WriterJob');
161
+ initMetadataForClass(WriterScope, 'WriterScope', VOID, VOID, [CoroutineScope]);
162
+ initMetadataForClass(NO_CALLBACK$1, VOID, VOID, VOID, [Continuation]);
163
+ initMetadataForFunctionReference(ByteWriteChannel$flushAndClose$ref_0, KFunctionImpl, VOID, [0]);
164
+ initMetadataForLambda(writer$slambda, CoroutineImpl, VOID, [1]);
165
+ initMetadataForCompanion(Companion_1);
166
+ initMetadataForClass(CloseToken, 'CloseToken');
167
+ initMetadataForCoroutine($awaitContentCOROUTINE$_0, CoroutineImpl);
168
+ initMetadataForClass(CountedByteReadChannel, 'CountedByteReadChannel', VOID, VOID, [ByteReadChannel_1], [1]);
169
+ initMetadataForClass(ClosedByteChannelException, 'ClosedByteChannelException', ClosedByteChannelException, IOException);
170
+ initMetadataForClass(ClosedReadChannelException, 'ClosedReadChannelException', ClosedReadChannelException, ClosedByteChannelException);
171
+ initMetadataForClass(ClosedWriteChannelException, 'ClosedWriteChannelException', ClosedWriteChannelException, ClosedByteChannelException);
172
+ initMetadataForClass(LineEnding, 'LineEnding', VOID, Enum);
173
+ initMetadataForCompanion(Companion_2);
174
+ initMetadataForClass(LineEndingMode, 'LineEndingMode');
175
+ initMetadataForClass(SourceByteReadChannel, 'SourceByteReadChannel', VOID, VOID, [ByteReadChannel_1], [1]);
176
+ initMetadataForClass(MalformedInputException, 'MalformedInputException', VOID, IOException);
177
+ initMetadataForClass(TooLongLineException, 'TooLongLineException', VOID, MalformedInputException);
178
+ function close() {
179
+ this.c1q();
180
+ }
181
+ initMetadataForInterface(ObjectPool, 'ObjectPool', VOID, VOID, [AutoCloseable]);
182
+ initMetadataForClass(DefaultPool, 'DefaultPool', VOID, VOID, [ObjectPool]);
183
+ initMetadataForClass(ByteArrayPool$1, VOID, VOID, DefaultPool);
184
+ initMetadataForClass(NoPoolImpl, 'NoPoolImpl', VOID, VOID, [ObjectPool]);
185
+ initMetadataForCompanion(Companion_3);
186
+ initMetadataForClass(Charset, 'Charset');
187
+ initMetadataForObject(Charsets, 'Charsets');
188
+ initMetadataForClass(CharsetDecoder, 'CharsetDecoder');
189
+ initMetadataForClass(CharsetEncoder, 'CharsetEncoder');
190
+ initMetadataForClass(CharsetImpl, 'CharsetImpl', VOID, Charset);
191
+ initMetadataForClass(CharsetEncoderImpl, 'CharsetEncoderImpl', VOID, CharsetEncoder);
192
+ initMetadataForClass(CharsetDecoderImpl, 'CharsetDecoderImpl', VOID, CharsetDecoder);
193
+ initMetadataForClass(toKtor$1);
194
+ initMetadataForClass(TextDecoderFallback, 'TextDecoderFallback');
195
+ //endregion
196
+ function Companion() {
197
+ Companion_instance_0 = this;
198
+ this.b31_1 = new Closed(null);
199
+ var tmp = this;
200
+ // Inline function 'kotlin.Companion.success' call
201
+ tmp.c31_1 = _Result___init__impl__xyqfz8(Unit_instance);
202
+ }
203
+ var Companion_instance_0;
204
+ function Companion_getInstance() {
205
+ if (Companion_instance_0 == null)
206
+ new Companion();
207
+ return Companion_instance_0;
208
+ }
209
+ function Empty() {
210
+ }
211
+ protoOf(Empty).toString = function () {
212
+ return 'Empty';
213
+ };
214
+ protoOf(Empty).hashCode = function () {
215
+ return -231472095;
216
+ };
217
+ protoOf(Empty).equals = function (other) {
218
+ if (this === other)
219
+ return true;
220
+ if (!(other instanceof Empty))
221
+ return false;
222
+ return true;
223
+ };
224
+ var Empty_instance;
225
+ function Empty_getInstance() {
226
+ return Empty_instance;
227
+ }
228
+ function Closed(cause) {
229
+ this.d31_1 = cause;
230
+ }
231
+ protoOf(Closed).toString = function () {
232
+ return 'Closed(cause=' + toString(this.d31_1) + ')';
233
+ };
234
+ protoOf(Closed).hashCode = function () {
235
+ return this.d31_1 == null ? 0 : hashCode(this.d31_1);
236
+ };
237
+ protoOf(Closed).equals = function (other) {
238
+ if (this === other)
239
+ return true;
240
+ if (!(other instanceof Closed))
241
+ return false;
242
+ if (!equals(this.d31_1, other.d31_1))
243
+ return false;
244
+ return true;
245
+ };
246
+ function Task() {
247
+ }
248
+ function Read(continuation) {
249
+ this.j31_1 = continuation;
250
+ this.k31_1 = null;
251
+ if (get_DEVELOPMENT_MODE()) {
252
+ var tmp = this;
253
+ // Inline function 'kotlin.also' call
254
+ var this_0 = newThrowable('ReadTask 0x' + toString_0(hashCode(this.j31_1), 16));
255
+ stackTraceToString(this_0);
256
+ tmp.k31_1 = this_0;
257
+ }
258
+ }
259
+ protoOf(Read).f31 = function () {
260
+ return this.j31_1;
261
+ };
262
+ protoOf(Read).e31 = function () {
263
+ return this.k31_1;
264
+ };
265
+ protoOf(Read).g31 = function () {
266
+ return 'read';
267
+ };
268
+ function Write(continuation) {
269
+ this.l31_1 = continuation;
270
+ this.m31_1 = null;
271
+ if (get_DEVELOPMENT_MODE()) {
272
+ var tmp = this;
273
+ // Inline function 'kotlin.also' call
274
+ var this_0 = newThrowable('WriteTask 0x' + toString_0(hashCode(this.l31_1), 16));
275
+ stackTraceToString(this_0);
276
+ tmp.m31_1 = this_0;
277
+ }
278
+ }
279
+ protoOf(Write).f31 = function () {
280
+ return this.l31_1;
281
+ };
282
+ protoOf(Write).e31 = function () {
283
+ return this.m31_1;
284
+ };
285
+ protoOf(Write).g31 = function () {
286
+ return 'write';
287
+ };
288
+ function moveFlushToReadBuffer($this) {
289
+ // Inline function 'io.ktor.utils.io.locks.synchronized' call
290
+ $this.q31_1;
291
+ $this.o31_1.h2z($this.s31_1);
292
+ $this.p31_1 = 0;
293
+ // Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
294
+ var current = $this.r31_1.kotlinx$atomicfu$value;
295
+ var tmp;
296
+ if (current instanceof Write) {
297
+ tmp = $this.r31_1.atomicfu$compareAndSet(current, Empty_instance);
298
+ } else {
299
+ tmp = false;
300
+ }
301
+ if (tmp) {
302
+ current.h31();
303
+ }
304
+ }
305
+ function closeSlot($this, cause) {
306
+ var closeContinuation = !(cause == null) ? new Closed(cause) : Companion_getInstance().b31_1;
307
+ var continuation = $this.r31_1.atomicfu$getAndSet(closeContinuation);
308
+ if (isInterface(continuation, Task)) {
309
+ continuation.i31(cause);
310
+ }
311
+ var tmp0_safe_receiver = $this.v31_1.atomicfu$getAndSet(null);
312
+ if (tmp0_safe_receiver == null)
313
+ null;
314
+ else
315
+ tmp0_safe_receiver(cause);
316
+ }
317
+ function sam$kotlinx_coroutines_DisposableHandle$0(function_0) {
318
+ this.w31_1 = function_0;
319
+ }
320
+ protoOf(sam$kotlinx_coroutines_DisposableHandle$0).c1q = function () {
321
+ return this.w31_1();
322
+ };
323
+ protoOf(sam$kotlinx_coroutines_DisposableHandle$0).l3 = function () {
324
+ return this.w31_1;
325
+ };
326
+ protoOf(sam$kotlinx_coroutines_DisposableHandle$0).equals = function (other) {
327
+ var tmp;
328
+ if (!(other == null) ? isInterface(other, DisposableHandle) : false) {
329
+ var tmp_0;
330
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
331
+ tmp_0 = equals(this.l3(), other.l3());
332
+ } else {
333
+ tmp_0 = false;
334
+ }
335
+ tmp = tmp_0;
336
+ } else {
337
+ tmp = false;
338
+ }
339
+ return tmp;
340
+ };
341
+ protoOf(sam$kotlinx_coroutines_DisposableHandle$0).hashCode = function () {
342
+ return hashCode(this.l3());
343
+ };
344
+ function ByteChannel$invokeOnClose$lambda() {
345
+ return Unit_instance;
346
+ }
347
+ function ByteChannel$invokeOnClose$lambda_0() {
348
+ return Unit_instance;
349
+ }
350
+ function ByteChannel$invokeOnClose$lambda_1(this$0, $handler) {
351
+ return function () {
352
+ this$0.v31_1.atomicfu$compareAndSet($handler, null);
353
+ return Unit_instance;
354
+ };
355
+ }
356
+ function $awaitContentCOROUTINE$(_this__u8e3s4, min, resultContinuation) {
357
+ CoroutineImpl.call(this, resultContinuation);
358
+ this.f32_1 = _this__u8e3s4;
359
+ this.g32_1 = min;
360
+ }
361
+ protoOf($awaitContentCOROUTINE$).v8 = function () {
362
+ var suspendResult = this.p8_1;
363
+ $sm: do
364
+ try {
365
+ var tmp = this.n8_1;
366
+ switch (tmp) {
367
+ case 0:
368
+ this.o8_1 = 4;
369
+ rethrowCloseCauseIfNeeded_0(this.f32_1);
370
+ if (compare(this.f32_1.s31_1.d1(), fromInt(this.g32_1)) >= 0)
371
+ return true;
372
+ this.h32_1 = this.f32_1;
373
+ this.n8_1 = 1;
374
+ continue $sm;
375
+ case 1:
376
+ if (!(compare(add(numberToLong(this.f32_1.p31_1), this.f32_1.s31_1.d1()), fromInt(this.g32_1)) < 0 && this.f32_1.u31_1.kotlinx$atomicfu$value == null)) {
377
+ this.n8_1 = 3;
378
+ continue $sm;
379
+ }
380
+
381
+ this.n8_1 = 2;
382
+ var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
383
+ cancellable.f1r();
384
+ var tmp0 = this.h32_1;
385
+ var tmp2 = new Read(cancellable);
386
+ l$ret$1: do {
387
+ var previous = tmp0.r31_1.kotlinx$atomicfu$value;
388
+ if (!(previous instanceof Closed)) {
389
+ if (!tmp0.r31_1.atomicfu$compareAndSet(previous, tmp2)) {
390
+ tmp2.h31();
391
+ break l$ret$1;
392
+ }
393
+ }
394
+ if (previous instanceof Read) {
395
+ previous.i31(new ConcurrentIOException(tmp2.g31(), previous.e31()));
396
+ } else {
397
+ if (isInterface(previous, Task)) {
398
+ previous.h31();
399
+ } else {
400
+ if (previous instanceof Closed) {
401
+ tmp2.i31(previous.d31_1);
402
+ break l$ret$1;
403
+ } else {
404
+ if (!equals(previous, Empty_instance)) {
405
+ noWhenBranchMatchedException();
406
+ }
407
+ }
408
+ }
409
+ }
410
+ if (!(compare(add(numberToLong(this.f32_1.p31_1), this.f32_1.s31_1.d1()), fromInt(this.g32_1)) < 0 && this.f32_1.u31_1.kotlinx$atomicfu$value == null)) {
411
+ var current = tmp0.r31_1.kotlinx$atomicfu$value;
412
+ var tmp_0;
413
+ if (current instanceof Read) {
414
+ tmp_0 = tmp0.r31_1.atomicfu$compareAndSet(current, Empty_instance);
415
+ } else {
416
+ tmp_0 = false;
417
+ }
418
+ if (tmp_0) {
419
+ current.h31();
420
+ }
421
+ }
422
+ }
423
+ while (false);
424
+ suspendResult = returnIfSuspended(cancellable.n1r(), this);
425
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
426
+ return suspendResult;
427
+ }
428
+
429
+ continue $sm;
430
+ case 2:
431
+ this.n8_1 = 1;
432
+ continue $sm;
433
+ case 3:
434
+ if (compare(this.f32_1.s31_1.d1(), new Long(1048576, 0)) < 0) {
435
+ moveFlushToReadBuffer(this.f32_1);
436
+ }
437
+
438
+ return compare(this.f32_1.s31_1.d1(), fromInt(this.g32_1)) >= 0;
439
+ case 4:
440
+ throw this.q8_1;
441
+ }
442
+ } catch ($p) {
443
+ var e = $p;
444
+ if (this.o8_1 === 4) {
445
+ throw e;
446
+ } else {
447
+ this.n8_1 = this.o8_1;
448
+ this.q8_1 = e;
449
+ }
450
+ }
451
+ while (true);
452
+ };
453
+ function $flushCOROUTINE$(_this__u8e3s4, resultContinuation) {
454
+ CoroutineImpl.call(this, resultContinuation);
455
+ this.q32_1 = _this__u8e3s4;
456
+ }
457
+ protoOf($flushCOROUTINE$).v8 = function () {
458
+ var suspendResult = this.p8_1;
459
+ $sm: do
460
+ try {
461
+ var tmp = this.n8_1;
462
+ switch (tmp) {
463
+ case 0:
464
+ this.o8_1 = 4;
465
+ rethrowCloseCauseIfNeeded_0(this.q32_1);
466
+ this.q32_1.s32();
467
+ if (this.q32_1.t32())
468
+ return Unit_instance;
469
+ this.r32_1 = this.q32_1;
470
+ this.n8_1 = 1;
471
+ continue $sm;
472
+ case 1:
473
+ if (!(!this.q32_1.t32() && this.q32_1.u31_1.kotlinx$atomicfu$value == null)) {
474
+ this.n8_1 = 3;
475
+ continue $sm;
476
+ }
477
+
478
+ this.n8_1 = 2;
479
+ var cancellable = new CancellableContinuationImpl(intercepted(this), 1);
480
+ cancellable.f1r();
481
+ var tmp0 = this.r32_1;
482
+ var tmp2 = new Write(cancellable);
483
+ l$ret$1: do {
484
+ var previous = tmp0.r31_1.kotlinx$atomicfu$value;
485
+ if (!(previous instanceof Closed)) {
486
+ if (!tmp0.r31_1.atomicfu$compareAndSet(previous, tmp2)) {
487
+ tmp2.h31();
488
+ break l$ret$1;
489
+ }
490
+ }
491
+ if (previous instanceof Write) {
492
+ previous.i31(new ConcurrentIOException(tmp2.g31(), previous.e31()));
493
+ } else {
494
+ if (isInterface(previous, Task)) {
495
+ previous.h31();
496
+ } else {
497
+ if (previous instanceof Closed) {
498
+ tmp2.i31(previous.d31_1);
499
+ break l$ret$1;
500
+ } else {
501
+ if (!equals(previous, Empty_instance)) {
502
+ noWhenBranchMatchedException();
503
+ }
504
+ }
505
+ }
506
+ }
507
+ if (!(!this.q32_1.t32() && this.q32_1.u31_1.kotlinx$atomicfu$value == null)) {
508
+ var current = tmp0.r31_1.kotlinx$atomicfu$value;
509
+ var tmp_0;
510
+ if (current instanceof Write) {
511
+ tmp_0 = tmp0.r31_1.atomicfu$compareAndSet(current, Empty_instance);
512
+ } else {
513
+ tmp_0 = false;
514
+ }
515
+ if (tmp_0) {
516
+ current.h31();
517
+ }
518
+ }
519
+ }
520
+ while (false);
521
+ suspendResult = returnIfSuspended(cancellable.n1r(), this);
522
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
523
+ return suspendResult;
524
+ }
525
+
526
+ continue $sm;
527
+ case 2:
528
+ this.n8_1 = 1;
529
+ continue $sm;
530
+ case 3:
531
+ return Unit_instance;
532
+ case 4:
533
+ throw this.q8_1;
534
+ }
535
+ } catch ($p) {
536
+ var e = $p;
537
+ if (this.o8_1 === 4) {
538
+ throw e;
539
+ } else {
540
+ this.n8_1 = this.o8_1;
541
+ this.q8_1 = e;
542
+ }
543
+ }
544
+ while (true);
545
+ };
546
+ function $flushAndCloseCOROUTINE$(_this__u8e3s4, resultContinuation) {
547
+ CoroutineImpl.call(this, resultContinuation);
548
+ this.c33_1 = _this__u8e3s4;
549
+ }
550
+ protoOf($flushAndCloseCOROUTINE$).v8 = function () {
551
+ var suspendResult = this.p8_1;
552
+ $sm: do
553
+ try {
554
+ var tmp = this.n8_1;
555
+ switch (tmp) {
556
+ case 0:
557
+ this.o8_1 = 4;
558
+ var this_0 = this.c33_1;
559
+ this.o8_1 = 2;
560
+ this.e33_1 = Companion_instance;
561
+ this.n8_1 = 1;
562
+ suspendResult = this_0.f33(this);
563
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
564
+ return suspendResult;
565
+ }
566
+
567
+ continue $sm;
568
+ case 1:
569
+ var tmp_0 = this;
570
+ this.e33_1;
571
+ tmp_0.d33_1 = _Result___init__impl__xyqfz8(Unit_instance);
572
+ this.o8_1 = 4;
573
+ this.n8_1 = 3;
574
+ continue $sm;
575
+ case 2:
576
+ this.o8_1 = 4;
577
+ var tmp_1 = this.q8_1;
578
+ if (tmp_1 instanceof Error) {
579
+ var e = this.q8_1;
580
+ var tmp_2 = this;
581
+ tmp_2.d33_1 = _Result___init__impl__xyqfz8(createFailure(e));
582
+ this.n8_1 = 3;
583
+ continue $sm;
584
+ } else {
585
+ throw this.q8_1;
586
+ }
587
+
588
+ case 3:
589
+ this.o8_1 = 4;
590
+ if (!this.c33_1.u31_1.atomicfu$compareAndSet(null, get_CLOSED()))
591
+ return Unit_instance;
592
+ closeSlot(this.c33_1, null);
593
+ return Unit_instance;
594
+ case 4:
595
+ throw this.q8_1;
596
+ }
597
+ } catch ($p) {
598
+ var e_0 = $p;
599
+ if (this.o8_1 === 4) {
600
+ throw e_0;
601
+ } else {
602
+ this.n8_1 = this.o8_1;
603
+ this.q8_1 = e_0;
604
+ }
605
+ }
606
+ while (true);
607
+ };
608
+ function ByteChannel(autoFlush) {
609
+ autoFlush = autoFlush === VOID ? false : autoFlush;
610
+ this.n31_1 = autoFlush;
611
+ this.o31_1 = new Buffer();
612
+ this.p31_1 = 0;
613
+ this.q31_1 = new Object();
614
+ this.r31_1 = atomic$ref$1(Empty_instance);
615
+ this.s31_1 = new Buffer();
616
+ this.t31_1 = new Buffer();
617
+ this.u31_1 = atomic$ref$1(null);
618
+ this.v31_1 = atomic$ref$1(null);
619
+ }
620
+ protoOf(ByteChannel).g33 = function () {
621
+ return this.n31_1;
622
+ };
623
+ protoOf(ByteChannel).t32 = function () {
624
+ return this.p31_1 < 1048576;
625
+ };
626
+ protoOf(ByteChannel).h33 = function () {
627
+ var tmp0_safe_receiver = this.u31_1.kotlinx$atomicfu$value;
628
+ if (tmp0_safe_receiver == null)
629
+ null;
630
+ else {
631
+ // Inline function 'io.ktor.utils.io.Companion.throwOrNull' call
632
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
633
+ var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
634
+ var tmp;
635
+ if (tmp0_subject == null) {
636
+ tmp = null;
637
+ } else {
638
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
639
+ tmp = access$_get_origin__hdh1qz(tmp0_safe_receiver).s1t();
640
+ } else {
641
+ if (tmp0_subject instanceof CancellationException) {
642
+ tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
643
+ } else {
644
+ var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
645
+ tmp = new ClosedReadChannelException(p0);
646
+ }
647
+ }
648
+ }
649
+ var tmp0_safe_receiver_0 = tmp;
650
+ var tmp_0;
651
+ if (tmp0_safe_receiver_0 == null) {
652
+ tmp_0 = null;
653
+ } else {
654
+ // Inline function 'kotlin.let' call
655
+ throw tmp0_safe_receiver_0;
656
+ }
657
+ }
658
+ if (this.s31_1.e2y()) {
659
+ moveFlushToReadBuffer(this);
660
+ }
661
+ return this.s31_1;
662
+ };
663
+ protoOf(ByteChannel).i33 = function () {
664
+ if (this.j33()) {
665
+ var tmp0_safe_receiver = this.u31_1.kotlinx$atomicfu$value;
666
+ var tmp;
667
+ if (tmp0_safe_receiver == null) {
668
+ tmp = null;
669
+ } else {
670
+ // Inline function 'io.ktor.utils.io.Companion.throwOrNull' call
671
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
672
+ var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
673
+ var tmp_0;
674
+ if (tmp0_subject == null) {
675
+ tmp_0 = null;
676
+ } else {
677
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
678
+ tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).s1t();
679
+ } else {
680
+ if (tmp0_subject instanceof CancellationException) {
681
+ tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
682
+ } else {
683
+ var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
684
+ tmp_0 = new ClosedWriteChannelException(p0);
685
+ }
686
+ }
687
+ }
688
+ var tmp0_safe_receiver_0 = tmp_0;
689
+ var tmp_1;
690
+ if (tmp0_safe_receiver_0 == null) {
691
+ tmp_1 = null;
692
+ } else {
693
+ // Inline function 'kotlin.let' call
694
+ throw tmp0_safe_receiver_0;
695
+ }
696
+ tmp = tmp_1;
697
+ }
698
+ if (tmp == null)
699
+ throw new ClosedWriteChannelException();
700
+ }
701
+ return this.t31_1;
702
+ };
703
+ protoOf(ByteChannel).k33 = function () {
704
+ var tmp0_safe_receiver = this.u31_1.kotlinx$atomicfu$value;
705
+ var tmp;
706
+ if (tmp0_safe_receiver == null) {
707
+ tmp = null;
708
+ } else {
709
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
710
+ var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
711
+ var tmp_0;
712
+ if (tmp0_subject == null) {
713
+ tmp_0 = null;
714
+ } else {
715
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
716
+ tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).s1t();
717
+ } else {
718
+ if (tmp0_subject instanceof CancellationException) {
719
+ tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
720
+ } else {
721
+ var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
722
+ tmp_0 = new ClosedByteChannelException(p0);
723
+ }
724
+ }
725
+ }
726
+ tmp = tmp_0;
727
+ }
728
+ return tmp;
729
+ };
730
+ protoOf(ByteChannel).j33 = function () {
731
+ return !(this.u31_1.kotlinx$atomicfu$value == null);
732
+ };
733
+ protoOf(ByteChannel).l33 = function () {
734
+ return !(this.k33() == null) || (this.j33() && this.p31_1 === 0 && this.s31_1.e2y());
735
+ };
736
+ protoOf(ByteChannel).m33 = function (min, $completion) {
737
+ var tmp = new $awaitContentCOROUTINE$(this, min, $completion);
738
+ tmp.p8_1 = Unit_instance;
739
+ tmp.q8_1 = null;
740
+ return tmp.v8();
741
+ };
742
+ protoOf(ByteChannel).f33 = function ($completion) {
743
+ var tmp = new $flushCOROUTINE$(this, $completion);
744
+ tmp.p8_1 = Unit_instance;
745
+ tmp.q8_1 = null;
746
+ return tmp.v8();
747
+ };
748
+ protoOf(ByteChannel).s32 = function () {
749
+ if (this.t31_1.e2y())
750
+ return Unit_instance;
751
+ // Inline function 'io.ktor.utils.io.locks.synchronized' call
752
+ this.q31_1;
753
+ var count = convertToInt(this.t31_1.d1());
754
+ this.o31_1.v2z(this.t31_1);
755
+ this.p31_1 = this.p31_1 + count | 0;
756
+ // Inline function 'io.ktor.utils.io.ByteChannel.resumeSlot' call
757
+ var current = this.r31_1.kotlinx$atomicfu$value;
758
+ var tmp;
759
+ if (current instanceof Read) {
760
+ tmp = this.r31_1.atomicfu$compareAndSet(current, Empty_instance);
761
+ } else {
762
+ tmp = false;
763
+ }
764
+ if (tmp) {
765
+ current.h31();
766
+ }
767
+ };
768
+ protoOf(ByteChannel).c4 = function () {
769
+ this.s32();
770
+ if (!this.u31_1.atomicfu$compareAndSet(null, get_CLOSED()))
771
+ return Unit_instance;
772
+ closeSlot(this, null);
773
+ };
774
+ protoOf(ByteChannel).o33 = function ($completion) {
775
+ var tmp = new $flushAndCloseCOROUTINE$(this, $completion);
776
+ tmp.p8_1 = Unit_instance;
777
+ tmp.q8_1 = null;
778
+ return tmp.v8();
779
+ };
780
+ protoOf(ByteChannel).p33 = function (cause) {
781
+ if (!(this.u31_1.kotlinx$atomicfu$value == null))
782
+ return Unit_instance;
783
+ var closedToken = new CloseToken(cause);
784
+ this.u31_1.atomicfu$compareAndSet(null, closedToken);
785
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
786
+ var tmp0_subject = access$_get_origin__hdh1qz(closedToken);
787
+ var tmp;
788
+ if (tmp0_subject == null) {
789
+ tmp = null;
790
+ } else {
791
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
792
+ tmp = access$_get_origin__hdh1qz(closedToken).s1t();
793
+ } else {
794
+ if (tmp0_subject instanceof CancellationException) {
795
+ tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(closedToken).message, access$_get_origin__hdh1qz(closedToken));
796
+ } else {
797
+ var p0 = access$_get_origin__hdh1qz(closedToken);
798
+ tmp = new ClosedByteChannelException(p0);
799
+ }
800
+ }
801
+ }
802
+ var wrappedCause = tmp;
803
+ closeSlot(this, wrappedCause);
804
+ };
805
+ protoOf(ByteChannel).q33 = function (handler) {
806
+ var existingCause = this.u31_1.kotlinx$atomicfu$value;
807
+ if (!(existingCause == null)) {
808
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
809
+ var tmp0_subject = access$_get_origin__hdh1qz(existingCause);
810
+ var tmp;
811
+ if (tmp0_subject == null) {
812
+ tmp = null;
813
+ } else {
814
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
815
+ tmp = access$_get_origin__hdh1qz(existingCause).s1t();
816
+ } else {
817
+ if (tmp0_subject instanceof CancellationException) {
818
+ tmp = CancellationException_init_$Create$(access$_get_origin__hdh1qz(existingCause).message, access$_get_origin__hdh1qz(existingCause));
819
+ } else {
820
+ var p0 = access$_get_origin__hdh1qz(existingCause);
821
+ tmp = new ClosedByteChannelException(p0);
822
+ }
823
+ }
824
+ }
825
+ handler(tmp);
826
+ var tmp_0 = ByteChannel$invokeOnClose$lambda;
827
+ return new sam$kotlinx_coroutines_DisposableHandle$0(tmp_0);
828
+ }
829
+ if (!this.v31_1.atomicfu$compareAndSet(null, handler)) {
830
+ // Inline function 'kotlin.error' call
831
+ var message = 'Only one invokeOnClose handler is supported per channel';
832
+ throw IllegalStateException_init_$Create$(toString_1(message));
833
+ }
834
+ var cause = this.u31_1.kotlinx$atomicfu$value;
835
+ if (!(cause == null) && this.v31_1.atomicfu$compareAndSet(handler, null)) {
836
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
837
+ var tmp0_subject_0 = access$_get_origin__hdh1qz(cause);
838
+ var tmp_1;
839
+ if (tmp0_subject_0 == null) {
840
+ tmp_1 = null;
841
+ } else {
842
+ if (isInterface(tmp0_subject_0, CopyableThrowable)) {
843
+ tmp_1 = access$_get_origin__hdh1qz(cause).s1t();
844
+ } else {
845
+ if (tmp0_subject_0 instanceof CancellationException) {
846
+ tmp_1 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(cause).message, access$_get_origin__hdh1qz(cause));
847
+ } else {
848
+ var p0_0 = access$_get_origin__hdh1qz(cause);
849
+ tmp_1 = new ClosedByteChannelException(p0_0);
850
+ }
851
+ }
852
+ }
853
+ handler(tmp_1);
854
+ var tmp_2 = ByteChannel$invokeOnClose$lambda_0;
855
+ return new sam$kotlinx_coroutines_DisposableHandle$0(tmp_2);
856
+ }
857
+ var tmp_3 = ByteChannel$invokeOnClose$lambda_1(this, handler);
858
+ return new sam$kotlinx_coroutines_DisposableHandle$0(tmp_3);
859
+ };
860
+ protoOf(ByteChannel).toString = function () {
861
+ return 'ByteChannel[' + hashCode(this) + ']';
862
+ };
863
+ function ConcurrentIOException(taskName, cause) {
864
+ cause = cause === VOID ? null : cause;
865
+ IllegalStateException_init_$Init$('Concurrent ' + taskName + ' attempts', cause, this);
866
+ captureStack(this, ConcurrentIOException);
867
+ }
868
+ function ByteReadChannel(content, offset, length) {
869
+ offset = offset === VOID ? 0 : offset;
870
+ length = length === VOID ? content.length : length;
871
+ // Inline function 'kotlin.also' call
872
+ var this_0 = new Buffer();
873
+ this_0.n2z(content, offset, offset + length | 0);
874
+ var source = this_0;
875
+ return ByteReadChannel_0(source);
876
+ }
877
+ function ByteReadChannel_0(source) {
878
+ return new SourceByteReadChannel(source);
879
+ }
880
+ function buildPartialMatchTable($this) {
881
+ var table = new Int32Array($this.s33_1.d1());
882
+ var j = 0;
883
+ var inductionVariable = 1;
884
+ var last = $this.s33_1.d1();
885
+ if (inductionVariable < last)
886
+ do {
887
+ var i = inductionVariable;
888
+ inductionVariable = inductionVariable + 1 | 0;
889
+ while (j > 0 && !($this.s33_1.e1(i) === $this.s33_1.e1(j))) {
890
+ j = table[j - 1 | 0];
891
+ }
892
+ if ($this.s33_1.e1(i) === $this.s33_1.e1(j)) {
893
+ j = j + 1 | 0;
894
+ }
895
+ table[i] = j;
896
+ }
897
+ while (inductionVariable < last);
898
+ return table;
899
+ }
900
+ function advanceToNextPotentialMatch($this, $completion) {
901
+ var tmp = new $advanceToNextPotentialMatchCOROUTINE$($this, $completion);
902
+ tmp.p8_1 = Unit_instance;
903
+ tmp.q8_1 = null;
904
+ return tmp.v8();
905
+ }
906
+ function checkFullMatch($this, $completion) {
907
+ var tmp = new $checkFullMatchCOROUTINE$($this, $completion);
908
+ tmp.p8_1 = Unit_instance;
909
+ tmp.q8_1 = null;
910
+ return tmp.v8();
911
+ }
912
+ function checkBounds($this, extra) {
913
+ if (compare(add($this.y33_1, extra), $this.u33_1) > 0) {
914
+ throw IOException_init_$Create$('Limit of ' + $this.u33_1.toString() + ' bytes exceeded ' + ('while searching for "' + toSingleLineString($this, $this.s33_1) + '"'));
915
+ }
916
+ }
917
+ function toSingleLineString($this, $receiver) {
918
+ return replace(decodeToString_0($receiver), '\n', '\\n');
919
+ }
920
+ function $findNextCOROUTINE$(_this__u8e3s4, ignoreMissing, resultContinuation) {
921
+ CoroutineImpl.call(this, resultContinuation);
922
+ this.d35_1 = _this__u8e3s4;
923
+ this.e35_1 = ignoreMissing;
924
+ }
925
+ protoOf($findNextCOROUTINE$).v8 = function () {
926
+ var suspendResult = this.p8_1;
927
+ $sm: do
928
+ try {
929
+ var tmp = this.n8_1;
930
+ switch (tmp) {
931
+ case 0:
932
+ this.o8_1 = 9;
933
+ this.d35_1.y33_1 = new Long(0, 0);
934
+ this.n8_1 = 1;
935
+ continue $sm;
936
+ case 1:
937
+ if (!this.d35_1.v33_1.e2y()) {
938
+ this.f35_1 = true;
939
+ this.n8_1 = 3;
940
+ continue $sm;
941
+ } else {
942
+ this.n8_1 = 2;
943
+ suspendResult = this.d35_1.r33_1.n33(VOID, this);
944
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
945
+ return suspendResult;
946
+ }
947
+ continue $sm;
948
+ }
949
+
950
+ case 2:
951
+ this.f35_1 = suspendResult;
952
+ this.n8_1 = 3;
953
+ continue $sm;
954
+ case 3:
955
+ if (!this.f35_1) {
956
+ this.n8_1 = 7;
957
+ continue $sm;
958
+ }
959
+
960
+ this.n8_1 = 4;
961
+ suspendResult = advanceToNextPotentialMatch(this.d35_1, this);
962
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
963
+ return suspendResult;
964
+ }
965
+
966
+ continue $sm;
967
+ case 4:
968
+ this.n8_1 = 5;
969
+ suspendResult = checkFullMatch(this.d35_1, this);
970
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
971
+ return suspendResult;
972
+ }
973
+
974
+ continue $sm;
975
+ case 5:
976
+ if (suspendResult) {
977
+ return this.d35_1.y33_1;
978
+ } else {
979
+ this.n8_1 = 6;
980
+ continue $sm;
981
+ }
982
+
983
+ case 6:
984
+ this.n8_1 = 1;
985
+ continue $sm;
986
+ case 7:
987
+ if (!this.e35_1) {
988
+ throw IOException_init_$Create$('Expected "' + toSingleLineString(this.d35_1, this.d35_1.s33_1) + '" but encountered end of input');
989
+ }
990
+
991
+ this.d35_1.y33_1 = add(this.d35_1.y33_1, this.d35_1.x33_1.h2z(this.d35_1.t33_1.i33()));
992
+ this.n8_1 = 8;
993
+ suspendResult = this.d35_1.t33_1.f33(this);
994
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
995
+ return suspendResult;
996
+ }
997
+
998
+ continue $sm;
999
+ case 8:
1000
+ return this.d35_1.y33_1;
1001
+ case 9:
1002
+ throw this.q8_1;
1003
+ }
1004
+ } catch ($p) {
1005
+ var e = $p;
1006
+ if (this.o8_1 === 9) {
1007
+ throw e;
1008
+ } else {
1009
+ this.n8_1 = this.o8_1;
1010
+ this.q8_1 = e;
1011
+ }
1012
+ }
1013
+ while (true);
1014
+ };
1015
+ function $advanceToNextPotentialMatchCOROUTINE$(_this__u8e3s4, resultContinuation) {
1016
+ CoroutineImpl.call(this, resultContinuation);
1017
+ this.i34_1 = _this__u8e3s4;
1018
+ }
1019
+ protoOf($advanceToNextPotentialMatchCOROUTINE$).v8 = function () {
1020
+ var suspendResult = this.p8_1;
1021
+ $sm: do
1022
+ try {
1023
+ var tmp = this.n8_1;
1024
+ switch (tmp) {
1025
+ case 0:
1026
+ this.o8_1 = 8;
1027
+ this.n8_1 = 1;
1028
+ continue $sm;
1029
+ case 1:
1030
+ if (!this.i34_1.v33_1.e2y()) {
1031
+ this.j34_1 = true;
1032
+ this.n8_1 = 3;
1033
+ continue $sm;
1034
+ } else {
1035
+ this.n8_1 = 2;
1036
+ suspendResult = this.i34_1.r33_1.n33(VOID, this);
1037
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1038
+ return suspendResult;
1039
+ }
1040
+ continue $sm;
1041
+ }
1042
+
1043
+ case 2:
1044
+ this.j34_1 = suspendResult;
1045
+ this.n8_1 = 3;
1046
+ continue $sm;
1047
+ case 3:
1048
+ if (!this.j34_1) {
1049
+ this.n8_1 = 7;
1050
+ continue $sm;
1051
+ }
1052
+
1053
+ var nextMatch = indexOf(this.i34_1.v33_1, this.i34_1.s33_1.e1(0));
1054
+ if (equalsLong(nextMatch, new Long(-1, -1))) {
1055
+ var tmp_0 = this.i34_1.v33_1;
1056
+ checkBounds(this.i34_1, (tmp_0 instanceof Buffer ? tmp_0 : THROW_CCE()).d1());
1057
+ this.i34_1.y33_1 = add(this.i34_1.y33_1, this.i34_1.v33_1.h2z(this.i34_1.t33_1.i33()));
1058
+ this.n8_1 = 5;
1059
+ suspendResult = flushIfNeeded(this.i34_1.t33_1, this);
1060
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1061
+ return suspendResult;
1062
+ }
1063
+ continue $sm;
1064
+ } else {
1065
+ checkBounds(this.i34_1, nextMatch);
1066
+ var tmp_1 = this.i34_1;
1067
+ var tmp_2 = this.i34_1.y33_1;
1068
+ var tmp_3 = this.i34_1.t33_1.i33();
1069
+ tmp_1.y33_1 = add(tmp_2, this.i34_1.v33_1.e2z(tmp_3 instanceof Buffer ? tmp_3 : THROW_CCE(), nextMatch));
1070
+ this.n8_1 = 4;
1071
+ suspendResult = flushIfNeeded(this.i34_1.t33_1, this);
1072
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1073
+ return suspendResult;
1074
+ }
1075
+ continue $sm;
1076
+ }
1077
+
1078
+ case 4:
1079
+ return Unit_instance;
1080
+ case 5:
1081
+ this.n8_1 = 6;
1082
+ continue $sm;
1083
+ case 6:
1084
+ this.n8_1 = 1;
1085
+ continue $sm;
1086
+ case 7:
1087
+ return Unit_instance;
1088
+ case 8:
1089
+ throw this.q8_1;
1090
+ }
1091
+ } catch ($p) {
1092
+ var e = $p;
1093
+ if (this.o8_1 === 8) {
1094
+ throw e;
1095
+ } else {
1096
+ this.n8_1 = this.o8_1;
1097
+ this.q8_1 = e;
1098
+ }
1099
+ }
1100
+ while (true);
1101
+ };
1102
+ function $checkFullMatchCOROUTINE$(_this__u8e3s4, resultContinuation) {
1103
+ CoroutineImpl.call(this, resultContinuation);
1104
+ this.s34_1 = _this__u8e3s4;
1105
+ }
1106
+ protoOf($checkFullMatchCOROUTINE$).v8 = function () {
1107
+ var suspendResult = this.p8_1;
1108
+ $sm: do
1109
+ try {
1110
+ var tmp = this.n8_1;
1111
+ switch (tmp) {
1112
+ case 0:
1113
+ this.o8_1 = 8;
1114
+ this.n8_1 = 1;
1115
+ continue $sm;
1116
+ case 1:
1117
+ if (!this.s34_1.v33_1.e2y()) {
1118
+ this.u34_1 = true;
1119
+ this.n8_1 = 3;
1120
+ continue $sm;
1121
+ } else {
1122
+ this.n8_1 = 2;
1123
+ suspendResult = this.s34_1.r33_1.n33(VOID, this);
1124
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1125
+ return suspendResult;
1126
+ }
1127
+ continue $sm;
1128
+ }
1129
+
1130
+ case 2:
1131
+ this.u34_1 = suspendResult;
1132
+ this.n8_1 = 3;
1133
+ continue $sm;
1134
+ case 3:
1135
+ if (!this.u34_1) {
1136
+ this.n8_1 = 7;
1137
+ continue $sm;
1138
+ }
1139
+
1140
+ this.t34_1 = this.s34_1.v33_1.h2y();
1141
+ if (this.s34_1.z33_1 > 0 && !(this.t34_1 === this.s34_1.s33_1.e1(this.s34_1.z33_1))) {
1142
+ var oldMatchIndex = this.s34_1.z33_1;
1143
+ while (this.s34_1.z33_1 > 0 && !(this.t34_1 === this.s34_1.s33_1.e1(this.s34_1.z33_1))) {
1144
+ this.s34_1.z33_1 = this.s34_1.w33_1[this.s34_1.z33_1 - 1 | 0];
1145
+ }
1146
+ var retained = fromInt(oldMatchIndex - this.s34_1.z33_1 | 0);
1147
+ checkBounds(this.s34_1, retained);
1148
+ var tmp_0 = this.s34_1;
1149
+ var tmp_1 = this.s34_1.y33_1;
1150
+ var tmp_2 = this.s34_1.t33_1.i33();
1151
+ tmp_0.y33_1 = add(tmp_1, this.s34_1.x33_1.e2z(tmp_2 instanceof Buffer ? tmp_2 : THROW_CCE(), retained));
1152
+ if (this.s34_1.z33_1 === 0 && !(this.t34_1 === this.s34_1.s33_1.e1(this.s34_1.z33_1))) {
1153
+ this.n8_1 = 6;
1154
+ suspendResult = writeByte(this.s34_1.t33_1, this.t34_1, this);
1155
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1156
+ return suspendResult;
1157
+ }
1158
+ continue $sm;
1159
+ } else {
1160
+ this.n8_1 = 4;
1161
+ continue $sm;
1162
+ }
1163
+ } else {
1164
+ this.n8_1 = 5;
1165
+ continue $sm;
1166
+ }
1167
+
1168
+ case 4:
1169
+ this.n8_1 = 5;
1170
+ continue $sm;
1171
+ case 5:
1172
+ this.s34_1.z33_1 = this.s34_1.z33_1 + 1 | 0;
1173
+ if (this.s34_1.z33_1 === this.s34_1.s33_1.d1()) {
1174
+ return true;
1175
+ }
1176
+
1177
+ this.s34_1.x33_1.w2z(this.t34_1);
1178
+ this.n8_1 = 1;
1179
+ continue $sm;
1180
+ case 6:
1181
+ var _unary__edvuaz = this.s34_1.y33_1;
1182
+ this.s34_1.y33_1 = add(_unary__edvuaz, get_ONE());
1183
+ return false;
1184
+ case 7:
1185
+ return false;
1186
+ case 8:
1187
+ throw this.q8_1;
1188
+ }
1189
+ } catch ($p) {
1190
+ var e = $p;
1191
+ if (this.o8_1 === 8) {
1192
+ throw e;
1193
+ } else {
1194
+ this.n8_1 = this.o8_1;
1195
+ this.q8_1 = e;
1196
+ }
1197
+ }
1198
+ while (true);
1199
+ };
1200
+ function ByteChannelScanner(channel, matchString, writeChannel, limit) {
1201
+ limit = limit === VOID ? new Long(-1, 2147483647) : limit;
1202
+ this.r33_1 = channel;
1203
+ this.s33_1 = matchString;
1204
+ this.t33_1 = writeChannel;
1205
+ this.u33_1 = limit;
1206
+ // Inline function 'kotlin.require' call
1207
+ if (!(this.s33_1.d1() > 0)) {
1208
+ var message = 'Empty match string not permitted for scanning';
1209
+ throw IllegalArgumentException_init_$Create$(toString_1(message));
1210
+ }
1211
+ this.v33_1 = this.r33_1.h33();
1212
+ this.w33_1 = buildPartialMatchTable(this);
1213
+ this.x33_1 = new Buffer();
1214
+ this.y33_1 = new Long(0, 0);
1215
+ this.z33_1 = 0;
1216
+ }
1217
+ protoOf(ByteChannelScanner).g35 = function (ignoreMissing, $completion) {
1218
+ var tmp = new $findNextCOROUTINE$(this, ignoreMissing, $completion);
1219
+ tmp.p8_1 = Unit_instance;
1220
+ tmp.q8_1 = null;
1221
+ return tmp.v8();
1222
+ };
1223
+ function attachWriterJob(_this__u8e3s4, writerJob) {
1224
+ var tmp = writerJob.h35_1;
1225
+ var tmp0_safe_receiver = tmp instanceof ByteChannel ? tmp : null;
1226
+ if (tmp0_safe_receiver == null)
1227
+ null;
1228
+ else {
1229
+ tmp0_safe_receiver.q33(attachWriterJob$lambda(_this__u8e3s4));
1230
+ }
1231
+ }
1232
+ function attachWriterJob$lambda($this_attachWriterJob) {
1233
+ return function (cause) {
1234
+ var tmp;
1235
+ if (!(cause == null)) {
1236
+ $this_attachWriterJob.p33(cause);
1237
+ tmp = Unit_instance;
1238
+ }
1239
+ return Unit_instance;
1240
+ };
1241
+ }
1242
+ function ByteReadChannel$Companion$Empty$1() {
1243
+ this.j35_1 = null;
1244
+ this.k35_1 = new Buffer();
1245
+ }
1246
+ protoOf(ByteReadChannel$Companion$Empty$1).k33 = function () {
1247
+ return this.j35_1;
1248
+ };
1249
+ protoOf(ByteReadChannel$Companion$Empty$1).l33 = function () {
1250
+ return true;
1251
+ };
1252
+ protoOf(ByteReadChannel$Companion$Empty$1).h33 = function () {
1253
+ return this.k35_1;
1254
+ };
1255
+ protoOf(ByteReadChannel$Companion$Empty$1).m33 = function (min, $completion) {
1256
+ return false;
1257
+ };
1258
+ protoOf(ByteReadChannel$Companion$Empty$1).p33 = function (cause) {
1259
+ };
1260
+ function Companion_0() {
1261
+ Companion_instance_1 = this;
1262
+ var tmp = this;
1263
+ tmp.l35_1 = new ByteReadChannel$Companion$Empty$1();
1264
+ }
1265
+ var Companion_instance_1;
1266
+ function Companion_getInstance_0() {
1267
+ if (Companion_instance_1 == null)
1268
+ new Companion_0();
1269
+ return Companion_instance_1;
1270
+ }
1271
+ function ByteReadChannel_1() {
1272
+ }
1273
+ function cancel_0(_this__u8e3s4) {
1274
+ _this__u8e3s4.p33(IOException_init_$Create$('Channel was cancelled'));
1275
+ }
1276
+ function readRemaining(_this__u8e3s4, $completion) {
1277
+ var tmp = new $readRemainingCOROUTINE$(_this__u8e3s4, $completion);
1278
+ tmp.p8_1 = Unit_instance;
1279
+ tmp.q8_1 = null;
1280
+ return tmp.v8();
1281
+ }
1282
+ function discard(_this__u8e3s4, max, $completion) {
1283
+ max = max === VOID ? new Long(-1, 2147483647) : max;
1284
+ var tmp = new $discardCOROUTINE$(_this__u8e3s4, max, $completion);
1285
+ tmp.p8_1 = Unit_instance;
1286
+ tmp.q8_1 = null;
1287
+ return tmp.v8();
1288
+ }
1289
+ function readAvailable(_this__u8e3s4, buffer, offset, length, $completion) {
1290
+ offset = offset === VOID ? 0 : offset;
1291
+ length = length === VOID ? buffer.length - offset | 0 : length;
1292
+ var tmp = new $readAvailableCOROUTINE$(_this__u8e3s4, buffer, offset, length, $completion);
1293
+ tmp.p8_1 = Unit_instance;
1294
+ tmp.q8_1 = null;
1295
+ return tmp.v8();
1296
+ }
1297
+ function toByteArray(_this__u8e3s4, $completion) {
1298
+ var tmp = new $toByteArrayCOROUTINE$(_this__u8e3s4, $completion);
1299
+ tmp.p8_1 = Unit_instance;
1300
+ tmp.q8_1 = null;
1301
+ return tmp.v8();
1302
+ }
1303
+ function copyTo(_this__u8e3s4, channel, limit, $completion) {
1304
+ var tmp = new $copyToCOROUTINE$(_this__u8e3s4, channel, limit, $completion);
1305
+ tmp.p8_1 = Unit_instance;
1306
+ tmp.q8_1 = null;
1307
+ return tmp.v8();
1308
+ }
1309
+ function rethrowCloseCauseIfNeeded(_this__u8e3s4) {
1310
+ var tmp0_safe_receiver = _this__u8e3s4.k33();
1311
+ if (tmp0_safe_receiver == null)
1312
+ null;
1313
+ else {
1314
+ // Inline function 'kotlin.let' call
1315
+ throw tmp0_safe_receiver;
1316
+ }
1317
+ }
1318
+ function skipIfFound(_this__u8e3s4, byteString, $completion) {
1319
+ var tmp = new $skipIfFoundCOROUTINE$(_this__u8e3s4, byteString, $completion);
1320
+ tmp.p8_1 = Unit_instance;
1321
+ tmp.q8_1 = null;
1322
+ return tmp.v8();
1323
+ }
1324
+ function readPacket(_this__u8e3s4, packet, $completion) {
1325
+ var tmp = new $readPacketCOROUTINE$(_this__u8e3s4, packet, $completion);
1326
+ tmp.p8_1 = Unit_instance;
1327
+ tmp.q8_1 = null;
1328
+ return tmp.v8();
1329
+ }
1330
+ function readUntil(_this__u8e3s4, matchString, writeChannel, limit, ignoreMissing, $completion) {
1331
+ limit = limit === VOID ? new Long(-1, 2147483647) : limit;
1332
+ ignoreMissing = ignoreMissing === VOID ? false : ignoreMissing;
1333
+ return (new ByteChannelScanner(_this__u8e3s4, matchString, writeChannel, limit)).g35(ignoreMissing, $completion);
1334
+ }
1335
+ function readLineStrictTo(_this__u8e3s4, out, limit, lineEnding, $completion) {
1336
+ limit = limit === VOID ? new Long(-1, 2147483647) : limit;
1337
+ lineEnding = lineEnding === VOID ? LineEnding_Default_getInstance() : lineEnding;
1338
+ // Inline function 'kotlin.require' call
1339
+ if (!(compare(limit, new Long(0, 0)) >= 0)) {
1340
+ var message = 'Limit (' + limit.toString() + ') should be non-negative';
1341
+ throw IllegalArgumentException_init_$Create$(toString_1(message));
1342
+ }
1343
+ return internalReadLineTo(_this__u8e3s4, out, limit, lineEnding.equals(LineEnding_Lenient_getInstance()), true, $completion);
1344
+ }
1345
+ function rethrowCloseCauseIfNeeded_0(_this__u8e3s4) {
1346
+ var tmp0_safe_receiver = _this__u8e3s4.k33();
1347
+ if (tmp0_safe_receiver == null)
1348
+ null;
1349
+ else {
1350
+ // Inline function 'kotlin.let' call
1351
+ throw tmp0_safe_receiver;
1352
+ }
1353
+ }
1354
+ function get_availableForRead(_this__u8e3s4) {
1355
+ return convertToInt(_this__u8e3s4.h33().d2y().d1());
1356
+ }
1357
+ function readBuffer(_this__u8e3s4, $completion) {
1358
+ var tmp = new $readBufferCOROUTINE$(_this__u8e3s4, $completion);
1359
+ tmp.p8_1 = Unit_instance;
1360
+ tmp.q8_1 = null;
1361
+ return tmp.v8();
1362
+ }
1363
+ function peek(_this__u8e3s4, count, $completion) {
1364
+ var tmp = new $peekCOROUTINE$(_this__u8e3s4, count, $completion);
1365
+ tmp.p8_1 = Unit_instance;
1366
+ tmp.q8_1 = null;
1367
+ return tmp.v8();
1368
+ }
1369
+ function internalReadLineTo(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion) {
1370
+ var tmp = new $internalReadLineToCOROUTINE$(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, $completion);
1371
+ tmp.p8_1 = Unit_instance;
1372
+ tmp.q8_1 = null;
1373
+ return tmp.v8();
1374
+ }
1375
+ function throwEndOfStreamException(consumed) {
1376
+ throw EOFException_init_$Create$('Unexpected end of stream after reading ' + consumed.toString() + ' characters');
1377
+ }
1378
+ function throwTooLongLineException(limit) {
1379
+ throw new TooLongLineException('Line exceeds limit of ' + limit.toString() + ' characters');
1380
+ }
1381
+ function rethrowCloseCauseIfNeeded_1(_this__u8e3s4) {
1382
+ var tmp0_safe_receiver = _this__u8e3s4.k33();
1383
+ if (tmp0_safe_receiver == null)
1384
+ null;
1385
+ else {
1386
+ // Inline function 'kotlin.let' call
1387
+ throw tmp0_safe_receiver;
1388
+ }
1389
+ }
1390
+ function internalReadLineTo$transferString(readBuffer, $out, consumed, count) {
1391
+ if (compare(count, new Long(0, 0)) > 0) {
1392
+ var string = readString(readBuffer, count);
1393
+ $out.c1(string);
1394
+ var tmp0 = consumed._v;
1395
+ // Inline function 'kotlin.Long.plus' call
1396
+ var other = string.length;
1397
+ consumed._v = add(tmp0, fromInt(other));
1398
+ }
1399
+ }
1400
+ function internalReadLineTo$scanForSoleCr(_this__u8e3s4, $lenientLineEnding, lfIndex, limitLeft) {
1401
+ if (!$lenientLineEnding)
1402
+ return new Long(-1, -1);
1403
+ var tmp;
1404
+ if (equalsLong(lfIndex, new Long(-1, -1))) {
1405
+ // Inline function 'kotlin.Long.minus' call
1406
+ var this_0 = get_remaining(_this__u8e3s4);
1407
+ // Inline function 'kotlin.comparisons.minOf' call
1408
+ var b = subtract(this_0, fromInt(1));
1409
+ tmp = compare(limitLeft, b) <= 0 ? limitLeft : b;
1410
+ } else if (equalsLong(lfIndex, new Long(0, 0))) {
1411
+ tmp = new Long(0, 0);
1412
+ } else {
1413
+ // Inline function 'kotlin.Long.minus' call
1414
+ tmp = subtract(lfIndex, fromInt(1));
1415
+ }
1416
+ var endIndex = tmp;
1417
+ return indexOf(_this__u8e3s4, 13, VOID, endIndex);
1418
+ }
1419
+ function internalReadLineTo$discardCrlfOrCr(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion) {
1420
+ var tmp = new $internalReadLineTo$discardCrlfOrCrCOROUTINE$(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, $completion);
1421
+ tmp.p8_1 = Unit_instance;
1422
+ tmp.q8_1 = null;
1423
+ return tmp.v8();
1424
+ }
1425
+ function $readRemainingCOROUTINE$(_this__u8e3s4, resultContinuation) {
1426
+ CoroutineImpl.call(this, resultContinuation);
1427
+ this.u35_1 = _this__u8e3s4;
1428
+ }
1429
+ protoOf($readRemainingCOROUTINE$).v8 = function () {
1430
+ var suspendResult = this.p8_1;
1431
+ $sm: do
1432
+ try {
1433
+ var tmp = this.n8_1;
1434
+ switch (tmp) {
1435
+ case 0:
1436
+ this.o8_1 = 4;
1437
+ this.v35_1 = BytePacketBuilder();
1438
+ this.n8_1 = 1;
1439
+ continue $sm;
1440
+ case 1:
1441
+ if (!!this.u35_1.l33()) {
1442
+ this.n8_1 = 3;
1443
+ continue $sm;
1444
+ }
1445
+
1446
+ this.v35_1.v2z(this.u35_1.h33());
1447
+ this.n8_1 = 2;
1448
+ suspendResult = this.u35_1.n33(VOID, this);
1449
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1450
+ return suspendResult;
1451
+ }
1452
+
1453
+ continue $sm;
1454
+ case 2:
1455
+ this.n8_1 = 1;
1456
+ continue $sm;
1457
+ case 3:
1458
+ rethrowCloseCauseIfNeeded(this.u35_1);
1459
+ return this.v35_1.d2y();
1460
+ case 4:
1461
+ throw this.q8_1;
1462
+ }
1463
+ } catch ($p) {
1464
+ var e = $p;
1465
+ if (this.o8_1 === 4) {
1466
+ throw e;
1467
+ } else {
1468
+ this.n8_1 = this.o8_1;
1469
+ this.q8_1 = e;
1470
+ }
1471
+ }
1472
+ while (true);
1473
+ };
1474
+ function $discardCOROUTINE$(_this__u8e3s4, max, resultContinuation) {
1475
+ CoroutineImpl.call(this, resultContinuation);
1476
+ this.e36_1 = _this__u8e3s4;
1477
+ this.f36_1 = max;
1478
+ }
1479
+ protoOf($discardCOROUTINE$).v8 = function () {
1480
+ var suspendResult = this.p8_1;
1481
+ $sm: do
1482
+ try {
1483
+ var tmp = this.n8_1;
1484
+ switch (tmp) {
1485
+ case 0:
1486
+ this.o8_1 = 5;
1487
+ this.g36_1 = this.f36_1;
1488
+ this.n8_1 = 1;
1489
+ continue $sm;
1490
+ case 1:
1491
+ if (!(compare(this.g36_1, new Long(0, 0)) > 0 && !this.e36_1.l33())) {
1492
+ this.n8_1 = 4;
1493
+ continue $sm;
1494
+ }
1495
+
1496
+ if (get_availableForRead(this.e36_1) === 0) {
1497
+ this.n8_1 = 2;
1498
+ suspendResult = this.e36_1.n33(VOID, this);
1499
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1500
+ return suspendResult;
1501
+ }
1502
+ continue $sm;
1503
+ } else {
1504
+ this.n8_1 = 3;
1505
+ continue $sm;
1506
+ }
1507
+
1508
+ case 2:
1509
+ this.n8_1 = 3;
1510
+ continue $sm;
1511
+ case 3:
1512
+ var tmp0 = this.g36_1;
1513
+ var b = get_remaining(this.e36_1.h33());
1514
+ var count = compare(tmp0, b) <= 0 ? tmp0 : b;
1515
+ discard_0(this.e36_1.h33(), count);
1516
+ this.g36_1 = subtract(this.g36_1, count);
1517
+ this.n8_1 = 1;
1518
+ continue $sm;
1519
+ case 4:
1520
+ return subtract(this.f36_1, this.g36_1);
1521
+ case 5:
1522
+ throw this.q8_1;
1523
+ }
1524
+ } catch ($p) {
1525
+ var e = $p;
1526
+ if (this.o8_1 === 5) {
1527
+ throw e;
1528
+ } else {
1529
+ this.n8_1 = this.o8_1;
1530
+ this.q8_1 = e;
1531
+ }
1532
+ }
1533
+ while (true);
1534
+ };
1535
+ function $readAvailableCOROUTINE$(_this__u8e3s4, buffer, offset, length, resultContinuation) {
1536
+ CoroutineImpl.call(this, resultContinuation);
1537
+ this.p36_1 = _this__u8e3s4;
1538
+ this.q36_1 = buffer;
1539
+ this.r36_1 = offset;
1540
+ this.s36_1 = length;
1541
+ }
1542
+ protoOf($readAvailableCOROUTINE$).v8 = function () {
1543
+ var suspendResult = this.p8_1;
1544
+ $sm: do
1545
+ try {
1546
+ var tmp = this.n8_1;
1547
+ switch (tmp) {
1548
+ case 0:
1549
+ this.o8_1 = 3;
1550
+ if (this.p36_1.l33())
1551
+ return -1;
1552
+ if (this.p36_1.h33().e2y()) {
1553
+ this.n8_1 = 1;
1554
+ suspendResult = this.p36_1.n33(VOID, this);
1555
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1556
+ return suspendResult;
1557
+ }
1558
+ continue $sm;
1559
+ } else {
1560
+ this.n8_1 = 2;
1561
+ continue $sm;
1562
+ }
1563
+
1564
+ case 1:
1565
+ this.n8_1 = 2;
1566
+ continue $sm;
1567
+ case 2:
1568
+ if (this.p36_1.l33())
1569
+ return -1;
1570
+ return readAvailable_0(this.p36_1.h33(), this.q36_1, this.r36_1, this.s36_1);
1571
+ case 3:
1572
+ throw this.q8_1;
1573
+ }
1574
+ } catch ($p) {
1575
+ var e = $p;
1576
+ if (this.o8_1 === 3) {
1577
+ throw e;
1578
+ } else {
1579
+ this.n8_1 = this.o8_1;
1580
+ this.q8_1 = e;
1581
+ }
1582
+ }
1583
+ while (true);
1584
+ };
1585
+ function $toByteArrayCOROUTINE$(_this__u8e3s4, resultContinuation) {
1586
+ CoroutineImpl.call(this, resultContinuation);
1587
+ this.b37_1 = _this__u8e3s4;
1588
+ }
1589
+ protoOf($toByteArrayCOROUTINE$).v8 = function () {
1590
+ var suspendResult = this.p8_1;
1591
+ $sm: do
1592
+ try {
1593
+ var tmp = this.n8_1;
1594
+ switch (tmp) {
1595
+ case 0:
1596
+ this.o8_1 = 2;
1597
+ this.n8_1 = 1;
1598
+ suspendResult = readBuffer(this.b37_1, this);
1599
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1600
+ return suspendResult;
1601
+ }
1602
+
1603
+ continue $sm;
1604
+ case 1:
1605
+ var ARGUMENT = suspendResult;
1606
+ return readBytes(ARGUMENT);
1607
+ case 2:
1608
+ throw this.q8_1;
1609
+ }
1610
+ } catch ($p) {
1611
+ var e = $p;
1612
+ if (this.o8_1 === 2) {
1613
+ throw e;
1614
+ } else {
1615
+ this.n8_1 = this.o8_1;
1616
+ this.q8_1 = e;
1617
+ }
1618
+ }
1619
+ while (true);
1620
+ };
1621
+ function $copyToCOROUTINE$(_this__u8e3s4, channel, limit, resultContinuation) {
1622
+ CoroutineImpl.call(this, resultContinuation);
1623
+ this.k37_1 = _this__u8e3s4;
1624
+ this.l37_1 = channel;
1625
+ this.m37_1 = limit;
1626
+ }
1627
+ protoOf($copyToCOROUTINE$).v8 = function () {
1628
+ var suspendResult = this.p8_1;
1629
+ $sm: do
1630
+ try {
1631
+ var tmp = this.n8_1;
1632
+ switch (tmp) {
1633
+ case 0:
1634
+ this.o8_1 = 12;
1635
+ this.n37_1 = this.m37_1;
1636
+ this.n8_1 = 1;
1637
+ continue $sm;
1638
+ case 1:
1639
+ this.o8_1 = 8;
1640
+ this.o8_1 = 7;
1641
+ this.n8_1 = 2;
1642
+ continue $sm;
1643
+ case 2:
1644
+ if (!(!this.k37_1.l33() && compare(this.n37_1, new Long(0, 0)) > 0)) {
1645
+ this.n8_1 = 6;
1646
+ continue $sm;
1647
+ }
1648
+
1649
+ if (this.k37_1.h33().e2y()) {
1650
+ this.n8_1 = 3;
1651
+ suspendResult = this.k37_1.n33(VOID, this);
1652
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1653
+ return suspendResult;
1654
+ }
1655
+ continue $sm;
1656
+ } else {
1657
+ this.n8_1 = 4;
1658
+ continue $sm;
1659
+ }
1660
+
1661
+ case 3:
1662
+ this.n8_1 = 4;
1663
+ continue $sm;
1664
+ case 4:
1665
+ var tmp0 = this.n37_1;
1666
+ var b = get_remaining(this.k37_1.h33());
1667
+ var count = compare(tmp0, b) <= 0 ? tmp0 : b;
1668
+ this.k37_1.h33().g2z(this.l37_1.i33(), count);
1669
+ this.n37_1 = subtract(this.n37_1, count);
1670
+ this.n8_1 = 5;
1671
+ suspendResult = this.l37_1.f33(this);
1672
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1673
+ return suspendResult;
1674
+ }
1675
+
1676
+ continue $sm;
1677
+ case 5:
1678
+ this.n8_1 = 2;
1679
+ continue $sm;
1680
+ case 6:
1681
+ this.o8_1 = 12;
1682
+ this.n8_1 = 10;
1683
+ continue $sm;
1684
+ case 7:
1685
+ this.o8_1 = 8;
1686
+ var tmp_0 = this.q8_1;
1687
+ if (tmp_0 instanceof Error) {
1688
+ var cause = this.q8_1;
1689
+ this.k37_1.p33(cause);
1690
+ close_0(this.l37_1, cause);
1691
+ throw cause;
1692
+ } else {
1693
+ throw this.q8_1;
1694
+ }
1695
+
1696
+ case 8:
1697
+ this.o8_1 = 12;
1698
+ this.o37_1 = this.q8_1;
1699
+ this.n8_1 = 9;
1700
+ suspendResult = this.l37_1.f33(this);
1701
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1702
+ return suspendResult;
1703
+ }
1704
+
1705
+ continue $sm;
1706
+ case 9:
1707
+ throw this.o37_1;
1708
+ case 10:
1709
+ this.o8_1 = 12;
1710
+ this.n8_1 = 11;
1711
+ suspendResult = this.l37_1.f33(this);
1712
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1713
+ return suspendResult;
1714
+ }
1715
+
1716
+ continue $sm;
1717
+ case 11:
1718
+ return subtract(this.m37_1, this.n37_1);
1719
+ case 12:
1720
+ throw this.q8_1;
1721
+ }
1722
+ } catch ($p) {
1723
+ var e = $p;
1724
+ if (this.o8_1 === 12) {
1725
+ throw e;
1726
+ } else {
1727
+ this.n8_1 = this.o8_1;
1728
+ this.q8_1 = e;
1729
+ }
1730
+ }
1731
+ while (true);
1732
+ };
1733
+ function $skipIfFoundCOROUTINE$(_this__u8e3s4, byteString, resultContinuation) {
1734
+ CoroutineImpl.call(this, resultContinuation);
1735
+ this.x37_1 = _this__u8e3s4;
1736
+ this.y37_1 = byteString;
1737
+ }
1738
+ protoOf($skipIfFoundCOROUTINE$).v8 = function () {
1739
+ var suspendResult = this.p8_1;
1740
+ $sm: do
1741
+ try {
1742
+ var tmp = this.n8_1;
1743
+ switch (tmp) {
1744
+ case 0:
1745
+ this.o8_1 = 4;
1746
+ this.n8_1 = 1;
1747
+ suspendResult = peek(this.x37_1, this.y37_1.d1(), this);
1748
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1749
+ return suspendResult;
1750
+ }
1751
+
1752
+ continue $sm;
1753
+ case 1:
1754
+ var ARGUMENT = suspendResult;
1755
+ if (equals(ARGUMENT, this.y37_1)) {
1756
+ this.n8_1 = 3;
1757
+ suspendResult = discard(this.x37_1, fromInt(this.y37_1.d1()), this);
1758
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1759
+ return suspendResult;
1760
+ }
1761
+ continue $sm;
1762
+ } else {
1763
+ this.n8_1 = 2;
1764
+ continue $sm;
1765
+ }
1766
+
1767
+ case 2:
1768
+ return false;
1769
+ case 3:
1770
+ return true;
1771
+ case 4:
1772
+ throw this.q8_1;
1773
+ }
1774
+ } catch ($p) {
1775
+ var e = $p;
1776
+ if (this.o8_1 === 4) {
1777
+ throw e;
1778
+ } else {
1779
+ this.n8_1 = this.o8_1;
1780
+ this.q8_1 = e;
1781
+ }
1782
+ }
1783
+ while (true);
1784
+ };
1785
+ function $readPacketCOROUTINE$(_this__u8e3s4, packet, resultContinuation) {
1786
+ CoroutineImpl.call(this, resultContinuation);
1787
+ this.h38_1 = _this__u8e3s4;
1788
+ this.i38_1 = packet;
1789
+ }
1790
+ protoOf($readPacketCOROUTINE$).v8 = function () {
1791
+ var suspendResult = this.p8_1;
1792
+ $sm: do
1793
+ try {
1794
+ var tmp = this.n8_1;
1795
+ switch (tmp) {
1796
+ case 0:
1797
+ this.o8_1 = 6;
1798
+ this.j38_1 = new Buffer();
1799
+ this.n8_1 = 1;
1800
+ continue $sm;
1801
+ case 1:
1802
+ if (!(compare(this.j38_1.d1(), fromInt(this.i38_1)) < 0)) {
1803
+ this.n8_1 = 5;
1804
+ continue $sm;
1805
+ }
1806
+
1807
+ if (this.h38_1.h33().e2y()) {
1808
+ this.n8_1 = 2;
1809
+ suspendResult = this.h38_1.n33(VOID, this);
1810
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1811
+ return suspendResult;
1812
+ }
1813
+ continue $sm;
1814
+ } else {
1815
+ this.n8_1 = 3;
1816
+ continue $sm;
1817
+ }
1818
+
1819
+ case 2:
1820
+ this.n8_1 = 3;
1821
+ continue $sm;
1822
+ case 3:
1823
+ if (this.h38_1.l33()) {
1824
+ this.n8_1 = 5;
1825
+ continue $sm;
1826
+ } else {
1827
+ this.n8_1 = 4;
1828
+ continue $sm;
1829
+ }
1830
+
1831
+ case 4:
1832
+ if (compare(get_remaining(this.h38_1.h33()), subtract(numberToLong(this.i38_1), this.j38_1.d1())) > 0) {
1833
+ this.h38_1.h33().g2z(this.j38_1, subtract(numberToLong(this.i38_1), this.j38_1.d1()));
1834
+ } else {
1835
+ this.h38_1.h33().h2z(this.j38_1);
1836
+ }
1837
+
1838
+ this.n8_1 = 1;
1839
+ continue $sm;
1840
+ case 5:
1841
+ if (compare(this.j38_1.d1(), fromInt(this.i38_1)) < 0) {
1842
+ throw EOFException_init_$Create$('Not enough data available, required ' + this.i38_1 + ' bytes but only ' + this.j38_1.d1().toString() + ' available');
1843
+ }
1844
+
1845
+ return this.j38_1;
1846
+ case 6:
1847
+ throw this.q8_1;
1848
+ }
1849
+ } catch ($p) {
1850
+ var e = $p;
1851
+ if (this.o8_1 === 6) {
1852
+ throw e;
1853
+ } else {
1854
+ this.n8_1 = this.o8_1;
1855
+ this.q8_1 = e;
1856
+ }
1857
+ }
1858
+ while (true);
1859
+ };
1860
+ function $readBufferCOROUTINE$(_this__u8e3s4, resultContinuation) {
1861
+ CoroutineImpl.call(this, resultContinuation);
1862
+ this.s38_1 = _this__u8e3s4;
1863
+ }
1864
+ protoOf($readBufferCOROUTINE$).v8 = function () {
1865
+ var suspendResult = this.p8_1;
1866
+ $sm: do
1867
+ try {
1868
+ var tmp = this.n8_1;
1869
+ switch (tmp) {
1870
+ case 0:
1871
+ this.o8_1 = 4;
1872
+ this.t38_1 = new Buffer();
1873
+ this.n8_1 = 1;
1874
+ continue $sm;
1875
+ case 1:
1876
+ if (!!this.s38_1.l33()) {
1877
+ this.n8_1 = 3;
1878
+ continue $sm;
1879
+ }
1880
+
1881
+ this.t38_1.v2z(this.s38_1.h33());
1882
+ this.n8_1 = 2;
1883
+ suspendResult = this.s38_1.n33(VOID, this);
1884
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1885
+ return suspendResult;
1886
+ }
1887
+
1888
+ continue $sm;
1889
+ case 2:
1890
+ this.n8_1 = 1;
1891
+ continue $sm;
1892
+ case 3:
1893
+ var tmp0_safe_receiver = this.s38_1.k33();
1894
+ if (tmp0_safe_receiver == null)
1895
+ null;
1896
+ else {
1897
+ throw tmp0_safe_receiver;
1898
+ }
1899
+
1900
+ return this.t38_1;
1901
+ case 4:
1902
+ throw this.q8_1;
1903
+ }
1904
+ } catch ($p) {
1905
+ var e = $p;
1906
+ if (this.o8_1 === 4) {
1907
+ throw e;
1908
+ } else {
1909
+ this.n8_1 = this.o8_1;
1910
+ this.q8_1 = e;
1911
+ }
1912
+ }
1913
+ while (true);
1914
+ };
1915
+ function $peekCOROUTINE$(_this__u8e3s4, count, resultContinuation) {
1916
+ CoroutineImpl.call(this, resultContinuation);
1917
+ this.c39_1 = _this__u8e3s4;
1918
+ this.d39_1 = count;
1919
+ }
1920
+ protoOf($peekCOROUTINE$).v8 = function () {
1921
+ var suspendResult = this.p8_1;
1922
+ $sm: do
1923
+ try {
1924
+ var tmp = this.n8_1;
1925
+ switch (tmp) {
1926
+ case 0:
1927
+ this.o8_1 = 3;
1928
+ if (this.c39_1.l33())
1929
+ return null;
1930
+ this.n8_1 = 1;
1931
+ suspendResult = this.c39_1.m33(this.d39_1, this);
1932
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1933
+ return suspendResult;
1934
+ }
1935
+
1936
+ continue $sm;
1937
+ case 1:
1938
+ if (!suspendResult) {
1939
+ return null;
1940
+ } else {
1941
+ this.n8_1 = 2;
1942
+ continue $sm;
1943
+ }
1944
+
1945
+ case 2:
1946
+ return readByteString(this.c39_1.h33().i2z(), this.d39_1);
1947
+ case 3:
1948
+ throw this.q8_1;
1949
+ }
1950
+ } catch ($p) {
1951
+ var e = $p;
1952
+ if (this.o8_1 === 3) {
1953
+ throw e;
1954
+ } else {
1955
+ this.n8_1 = this.o8_1;
1956
+ this.q8_1 = e;
1957
+ }
1958
+ }
1959
+ while (true);
1960
+ };
1961
+ function $internalReadLineToCOROUTINE$(_this__u8e3s4, out, limit, lenientLineEnding, throwOnIncompleteLine, resultContinuation) {
1962
+ CoroutineImpl.call(this, resultContinuation);
1963
+ this.m39_1 = _this__u8e3s4;
1964
+ this.n39_1 = out;
1965
+ this.o39_1 = limit;
1966
+ this.p39_1 = lenientLineEnding;
1967
+ this.q39_1 = throwOnIncompleteLine;
1968
+ }
1969
+ protoOf($internalReadLineToCOROUTINE$).v8 = function () {
1970
+ var suspendResult = this.p8_1;
1971
+ $sm: do
1972
+ try {
1973
+ var tmp = this.n8_1;
1974
+ switch (tmp) {
1975
+ case 0:
1976
+ this.o8_1 = 18;
1977
+ this.s39_1 = this.m39_1.h33();
1978
+ if (this.s39_1.e2y()) {
1979
+ this.n8_1 = 1;
1980
+ suspendResult = this.m39_1.n33(VOID, this);
1981
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1982
+ return suspendResult;
1983
+ }
1984
+ continue $sm;
1985
+ } else {
1986
+ this.n8_1 = 2;
1987
+ continue $sm;
1988
+ }
1989
+
1990
+ case 1:
1991
+ this.n8_1 = 2;
1992
+ continue $sm;
1993
+ case 2:
1994
+ if (this.m39_1.l33())
1995
+ return new Long(-1, -1);
1996
+ this.r39_1 = {_v: new Long(0, 0)};
1997
+ this.n8_1 = 3;
1998
+ continue $sm;
1999
+ case 3:
2000
+ if (!(compare(this.r39_1._v, this.o39_1) < 0 && !this.m39_1.l33())) {
2001
+ this.n8_1 = 10;
2002
+ continue $sm;
2003
+ }
2004
+
2005
+ var limitLeft = subtract(this.o39_1, this.r39_1._v);
2006
+ var lfIndex = indexOf(this.s39_1, 10, VOID, limitLeft);
2007
+ var crIndex = internalReadLineTo$scanForSoleCr(this.s39_1, this.p39_1, lfIndex, limitLeft);
2008
+ if (compare(crIndex, new Long(0, 0)) >= 0) {
2009
+ internalReadLineTo$transferString(this.s39_1, this.n39_1, this.r39_1, crIndex);
2010
+ discard_0(this.s39_1, new Long(1, 0));
2011
+ return this.r39_1._v;
2012
+ }
2013
+
2014
+ if (equalsLong(lfIndex, new Long(0, 0))) {
2015
+ discard_0(this.s39_1, new Long(1, 0));
2016
+ return this.r39_1._v;
2017
+ }
2018
+
2019
+ if (compare(lfIndex, new Long(0, 0)) > 0) {
2020
+ var tmp_0;
2021
+ var tmp_1 = this.s39_1.d2y();
2022
+ if (tmp_1.z2y(subtract(lfIndex, fromInt(1))) === 13) {
2023
+ tmp_0 = new Long(1, 0);
2024
+ } else {
2025
+ tmp_0 = new Long(0, 0);
2026
+ }
2027
+ var isCrlf = tmp_0;
2028
+ internalReadLineTo$transferString(this.s39_1, this.n39_1, this.r39_1, subtract(lfIndex, isCrlf));
2029
+ discard_0(this.s39_1, add(numberToLong(1), isCrlf));
2030
+ return this.r39_1._v;
2031
+ }
2032
+
2033
+ var b = get_remaining(this.s39_1);
2034
+ var count = compare(limitLeft, b) <= 0 ? limitLeft : b;
2035
+ var tmp_2 = this.s39_1.d2y();
2036
+ if (tmp_2.z2y(subtract(count, fromInt(1))) === 13) {
2037
+ internalReadLineTo$transferString(this.s39_1, this.n39_1, this.r39_1, subtract(count, fromInt(1)));
2038
+ this.n8_1 = 4;
2039
+ suspendResult = internalReadLineTo$discardCrlfOrCr(this.s39_1, this.m39_1, this.p39_1, this);
2040
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2041
+ return suspendResult;
2042
+ }
2043
+ continue $sm;
2044
+ } else {
2045
+ internalReadLineTo$transferString(this.s39_1, this.n39_1, this.r39_1, count);
2046
+ this.n8_1 = 6;
2047
+ continue $sm;
2048
+ }
2049
+
2050
+ case 4:
2051
+ if (suspendResult) {
2052
+ return this.r39_1._v;
2053
+ } else {
2054
+ this.n8_1 = 5;
2055
+ continue $sm;
2056
+ }
2057
+
2058
+ case 5:
2059
+ internalReadLineTo$transferString(this.s39_1, this.n39_1, this.r39_1, new Long(1, 0));
2060
+ this.n8_1 = 6;
2061
+ continue $sm;
2062
+ case 6:
2063
+ if (compare(this.r39_1._v, this.o39_1) < 0 && equalsLong(get_remaining(this.s39_1), new Long(0, 0))) {
2064
+ this.n8_1 = 7;
2065
+ suspendResult = this.m39_1.n33(VOID, this);
2066
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2067
+ return suspendResult;
2068
+ }
2069
+ continue $sm;
2070
+ } else {
2071
+ this.u39_1 = false;
2072
+ this.n8_1 = 8;
2073
+ continue $sm;
2074
+ }
2075
+
2076
+ case 7:
2077
+ this.u39_1 = !suspendResult;
2078
+ this.n8_1 = 8;
2079
+ continue $sm;
2080
+ case 8:
2081
+ if (this.u39_1) {
2082
+ this.n8_1 = 10;
2083
+ continue $sm;
2084
+ } else {
2085
+ this.n8_1 = 9;
2086
+ continue $sm;
2087
+ }
2088
+
2089
+ case 9:
2090
+ this.n8_1 = 3;
2091
+ continue $sm;
2092
+ case 10:
2093
+ if (equalsLong(this.r39_1._v, new Long(0, 0)) && this.m39_1.l33())
2094
+ return new Long(-1, -1);
2095
+ if (!(compare(this.r39_1._v, this.o39_1) <= 0)) {
2096
+ var message = 'Consumed bytes exceed the limit: ' + this.r39_1._v.toString() + ' > ' + this.o39_1.toString() + ". It's an implementation bug, please report it.";
2097
+ throw IllegalStateException_init_$Create$(toString_1(message));
2098
+ }
2099
+
2100
+ if (equalsLong(this.r39_1._v, this.o39_1)) {
2101
+ if (equalsLong(this.o39_1, new Long(-1, 2147483647)))
2102
+ throw new TooLongLineException('Max line length exceeded');
2103
+ if (equalsLong(get_remaining(this.s39_1), new Long(0, 0))) {
2104
+ this.n8_1 = 12;
2105
+ suspendResult = this.m39_1.n33(VOID, this);
2106
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2107
+ return suspendResult;
2108
+ }
2109
+ continue $sm;
2110
+ } else {
2111
+ this.t39_1 = false;
2112
+ this.n8_1 = 13;
2113
+ continue $sm;
2114
+ }
2115
+ } else {
2116
+ this.n8_1 = 11;
2117
+ continue $sm;
2118
+ }
2119
+
2120
+ case 11:
2121
+ if (this.q39_1) {
2122
+ throwEndOfStreamException(this.r39_1._v);
2123
+ }
2124
+
2125
+ return this.r39_1._v;
2126
+ case 12:
2127
+ this.t39_1 = !suspendResult;
2128
+ this.n8_1 = 13;
2129
+ continue $sm;
2130
+ case 13:
2131
+ if (this.t39_1) {
2132
+ throwEndOfStreamException(this.r39_1._v);
2133
+ } else {
2134
+ this.n8_1 = 14;
2135
+ continue $sm;
2136
+ }
2137
+
2138
+ break;
2139
+ case 14:
2140
+ var tmp0_subject = this.s39_1.d2y().z2y(new Long(0, 0));
2141
+ if (tmp0_subject === 10) {
2142
+ discard_0(this.s39_1, new Long(1, 0));
2143
+ return this.r39_1._v;
2144
+ } else {
2145
+ if (tmp0_subject === 13) {
2146
+ this.n8_1 = 15;
2147
+ suspendResult = internalReadLineTo$discardCrlfOrCr(this.s39_1, this.m39_1, this.p39_1, this);
2148
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2149
+ return suspendResult;
2150
+ }
2151
+ continue $sm;
2152
+ } else {
2153
+ this.n8_1 = 17;
2154
+ continue $sm;
2155
+ }
2156
+ }
2157
+
2158
+ case 15:
2159
+ if (suspendResult) {
2160
+ return this.r39_1._v;
2161
+ } else {
2162
+ this.n8_1 = 16;
2163
+ continue $sm;
2164
+ }
2165
+
2166
+ case 16:
2167
+ this.n8_1 = 17;
2168
+ continue $sm;
2169
+ case 17:
2170
+ throwTooLongLineException(this.o39_1);
2171
+ break;
2172
+ case 18:
2173
+ throw this.q8_1;
2174
+ }
2175
+ } catch ($p) {
2176
+ var e = $p;
2177
+ if (this.o8_1 === 18) {
2178
+ throw e;
2179
+ } else {
2180
+ this.n8_1 = this.o8_1;
2181
+ this.q8_1 = e;
2182
+ }
2183
+ }
2184
+ while (true);
2185
+ };
2186
+ function $internalReadLineTo$discardCrlfOrCrCOROUTINE$(_this__u8e3s4, $this_internalReadLineTo, $lenientLineEnding, resultContinuation) {
2187
+ CoroutineImpl.call(this, resultContinuation);
2188
+ this.d3a_1 = _this__u8e3s4;
2189
+ this.e3a_1 = $this_internalReadLineTo;
2190
+ this.f3a_1 = $lenientLineEnding;
2191
+ }
2192
+ protoOf($internalReadLineTo$discardCrlfOrCrCOROUTINE$).v8 = function () {
2193
+ var suspendResult = this.p8_1;
2194
+ $sm: do
2195
+ try {
2196
+ var tmp = this.n8_1;
2197
+ switch (tmp) {
2198
+ case 0:
2199
+ this.o8_1 = 5;
2200
+ if (compare(get_remaining(this.d3a_1), new Long(2, 0)) >= 0) {
2201
+ this.h3a_1 = true;
2202
+ this.n8_1 = 2;
2203
+ continue $sm;
2204
+ } else {
2205
+ this.n8_1 = 1;
2206
+ suspendResult = this.e3a_1.m33(2, this);
2207
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2208
+ return suspendResult;
2209
+ }
2210
+ continue $sm;
2211
+ }
2212
+
2213
+ case 1:
2214
+ this.h3a_1 = suspendResult;
2215
+ this.n8_1 = 2;
2216
+ continue $sm;
2217
+ case 2:
2218
+ if (this.h3a_1) {
2219
+ this.g3a_1 = this.d3a_1.d2y().z2y(new Long(1, 0)) === 10;
2220
+ this.n8_1 = 3;
2221
+ continue $sm;
2222
+ } else {
2223
+ this.g3a_1 = false;
2224
+ this.n8_1 = 3;
2225
+ continue $sm;
2226
+ }
2227
+
2228
+ case 3:
2229
+ if (this.g3a_1) {
2230
+ discard_0(this.d3a_1, new Long(2, 0));
2231
+ return true;
2232
+ } else {
2233
+ this.n8_1 = 4;
2234
+ continue $sm;
2235
+ }
2236
+
2237
+ case 4:
2238
+ if (this.f3a_1) {
2239
+ discard_0(this.d3a_1, new Long(1, 0));
2240
+ return true;
2241
+ }
2242
+
2243
+ return false;
2244
+ case 5:
2245
+ throw this.q8_1;
2246
+ }
2247
+ } catch ($p) {
2248
+ var e = $p;
2249
+ if (this.o8_1 === 5) {
2250
+ throw e;
2251
+ } else {
2252
+ this.n8_1 = this.o8_1;
2253
+ this.q8_1 = e;
2254
+ }
2255
+ }
2256
+ while (true);
2257
+ };
2258
+ function ByteWriteChannel() {
2259
+ }
2260
+ function flushIfNeeded(_this__u8e3s4, $completion) {
2261
+ var tmp = new $flushIfNeededCOROUTINE$(_this__u8e3s4, $completion);
2262
+ tmp.p8_1 = Unit_instance;
2263
+ tmp.q8_1 = null;
2264
+ return tmp.v8();
2265
+ }
2266
+ function $flushIfNeededCOROUTINE$(_this__u8e3s4, resultContinuation) {
2267
+ CoroutineImpl.call(this, resultContinuation);
2268
+ this.q3a_1 = _this__u8e3s4;
2269
+ }
2270
+ protoOf($flushIfNeededCOROUTINE$).v8 = function () {
2271
+ var suspendResult = this.p8_1;
2272
+ $sm: do
2273
+ try {
2274
+ var tmp = this.n8_1;
2275
+ switch (tmp) {
2276
+ case 0:
2277
+ this.o8_1 = 3;
2278
+ rethrowCloseCauseIfNeeded_1(this.q3a_1);
2279
+ if (this.q3a_1.g33() || get_size(this.q3a_1.i33()) >= 1048576) {
2280
+ this.n8_1 = 1;
2281
+ suspendResult = this.q3a_1.f33(this);
2282
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2283
+ return suspendResult;
2284
+ }
2285
+ continue $sm;
2286
+ } else {
2287
+ this.n8_1 = 2;
2288
+ continue $sm;
2289
+ }
2290
+
2291
+ case 1:
2292
+ this.n8_1 = 2;
2293
+ continue $sm;
2294
+ case 2:
2295
+ return Unit_instance;
2296
+ case 3:
2297
+ throw this.q8_1;
2298
+ }
2299
+ } catch ($p) {
2300
+ var e = $p;
2301
+ if (this.o8_1 === 3) {
2302
+ throw e;
2303
+ } else {
2304
+ this.n8_1 = this.o8_1;
2305
+ this.q8_1 = e;
2306
+ }
2307
+ }
2308
+ while (true);
2309
+ };
2310
+ function ByteWriteChannel$flushAndClose$ref(p0) {
2311
+ var i = new ByteWriteChannel$flushAndClose$ref_0(p0);
2312
+ return constructCallableReference(function ($completion) {
2313
+ return i.v3a($completion);
2314
+ }, 0, 1, 17, 'flushAndClose', [p0]);
2315
+ }
2316
+ function get_NO_CALLBACK() {
2317
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2318
+ return NO_CALLBACK;
2319
+ }
2320
+ var NO_CALLBACK;
2321
+ function WriterJob(channel, job) {
2322
+ this.h35_1 = channel;
2323
+ this.i35_1 = job;
2324
+ }
2325
+ protoOf(WriterJob).o1s = function () {
2326
+ return this.i35_1;
2327
+ };
2328
+ function writer(_this__u8e3s4, coroutineContext, autoFlush, block) {
2329
+ coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_getInstance() : coroutineContext;
2330
+ autoFlush = autoFlush === VOID ? false : autoFlush;
2331
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2332
+ return writer_0(_this__u8e3s4, coroutineContext, new ByteChannel(), block);
2333
+ }
2334
+ function WriterScope(channel, coroutineContext) {
2335
+ this.w3a_1 = channel;
2336
+ this.x3a_1 = coroutineContext;
2337
+ }
2338
+ protoOf(WriterScope).m1m = function () {
2339
+ return this.x3a_1;
2340
+ };
2341
+ function writeFully(_this__u8e3s4, value, startIndex, endIndex, $completion) {
2342
+ startIndex = startIndex === VOID ? 0 : startIndex;
2343
+ endIndex = endIndex === VOID ? value.length : endIndex;
2344
+ _this__u8e3s4.i33().n2z(value, startIndex, endIndex);
2345
+ return flushIfNeeded(_this__u8e3s4, $completion);
2346
+ }
2347
+ function close_0(_this__u8e3s4, cause) {
2348
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2349
+ if (cause == null) {
2350
+ fireAndForget(ByteWriteChannel$flushAndClose$ref(_this__u8e3s4));
2351
+ } else {
2352
+ _this__u8e3s4.p33(cause);
2353
+ }
2354
+ }
2355
+ function invokeOnCompletion(_this__u8e3s4, block) {
2356
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2357
+ return _this__u8e3s4.o1s().p1n(block);
2358
+ }
2359
+ function writer_0(_this__u8e3s4, coroutineContext, channel, block) {
2360
+ coroutineContext = coroutineContext === VOID ? EmptyCoroutineContext_getInstance() : coroutineContext;
2361
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2362
+ // Inline function 'kotlin.apply' call
2363
+ var this_0 = launch(_this__u8e3s4, coroutineContext, VOID, writer$slambda_0(block, channel, null));
2364
+ this_0.p1n(writer$lambda(channel));
2365
+ var job = this_0;
2366
+ return new WriterJob(channel, job);
2367
+ }
2368
+ function fireAndForget(_this__u8e3s4) {
2369
+ _init_properties_ByteWriteChannelOperations_kt__i7slrs();
2370
+ startCoroutineCancellable(_this__u8e3s4, get_NO_CALLBACK());
2371
+ }
2372
+ function writeByte(_this__u8e3s4, value, $completion) {
2373
+ _this__u8e3s4.i33().w2z(value);
2374
+ return flushIfNeeded(_this__u8e3s4, $completion);
2375
+ }
2376
+ function NO_CALLBACK$1() {
2377
+ this.y3a_1 = EmptyCoroutineContext_getInstance();
2378
+ }
2379
+ protoOf(NO_CALLBACK$1).t8 = function () {
2380
+ return this.y3a_1;
2381
+ };
2382
+ protoOf(NO_CALLBACK$1).u8 = function (result) {
2383
+ return Unit_instance;
2384
+ };
2385
+ protoOf(NO_CALLBACK$1).y8 = function (result) {
2386
+ return this.u8(result);
2387
+ };
2388
+ function ByteWriteChannel$flushAndClose$ref_0(p0) {
2389
+ KFunctionImpl.call(this, 1, 1, 17);
2390
+ this.u3a_1 = p0;
2391
+ }
2392
+ protoOf(ByteWriteChannel$flushAndClose$ref_0).v3a = function ($completion) {
2393
+ return this.u3a_1.o33($completion);
2394
+ };
2395
+ protoOf(ByteWriteChannel$flushAndClose$ref_0).h9 = function ($completion) {
2396
+ return this.v3a($completion);
2397
+ };
2398
+ function writer$slambda($block, $channel, resultContinuation) {
2399
+ this.h3b_1 = $block;
2400
+ this.i3b_1 = $channel;
2401
+ CoroutineImpl.call(this, resultContinuation);
2402
+ }
2403
+ protoOf(writer$slambda).q3b = function ($this$launch, $completion) {
2404
+ var tmp = this.r3b($this$launch, $completion);
2405
+ tmp.p8_1 = Unit_instance;
2406
+ tmp.q8_1 = null;
2407
+ return tmp.v8();
2408
+ };
2409
+ protoOf(writer$slambda).i9 = function (p1, $completion) {
2410
+ return this.q3b((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2411
+ };
2412
+ protoOf(writer$slambda).v8 = function () {
2413
+ var suspendResult = this.p8_1;
2414
+ $sm: do
2415
+ try {
2416
+ var tmp = this.n8_1;
2417
+ switch (tmp) {
2418
+ case 0:
2419
+ this.o8_1 = 14;
2420
+ this.m3b_1 = Job(get_job(this.j3b_1.m1m()));
2421
+ this.n8_1 = 1;
2422
+ continue $sm;
2423
+ case 1:
2424
+ this.o8_1 = 4;
2425
+ this.o8_1 = 3;
2426
+ this.n8_1 = 2;
2427
+ suspendResult = this.h3b_1(new WriterScope(this.i3b_1, this.j3b_1.m1m().mh(this.m3b_1)), this);
2428
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2429
+ return suspendResult;
2430
+ }
2431
+
2432
+ continue $sm;
2433
+ case 2:
2434
+ this.m3b_1.j1t();
2435
+ var tmp_0;
2436
+ if (get_job(this.j3b_1.m1m()).j1n()) {
2437
+ this.i3b_1.p33(get_job(this.j3b_1.m1m()).m1n());
2438
+ tmp_0 = Unit_instance;
2439
+ }
2440
+
2441
+ this.o8_1 = 14;
2442
+ this.n8_1 = 9;
2443
+ continue $sm;
2444
+ case 3:
2445
+ this.o8_1 = 4;
2446
+ var tmp_1 = this.q8_1;
2447
+ if (tmp_1 instanceof Error) {
2448
+ var cause = this.q8_1;
2449
+ cancel(this.m3b_1, 'Exception thrown while writing to channel', cause);
2450
+ this.i3b_1.p33(cause);
2451
+ this.o8_1 = 14;
2452
+ this.n8_1 = 9;
2453
+ continue $sm;
2454
+ } else {
2455
+ throw this.q8_1;
2456
+ }
2457
+
2458
+ case 4:
2459
+ this.o8_1 = 14;
2460
+ this.n3b_1 = this.q8_1;
2461
+ this.n8_1 = 5;
2462
+ suspendResult = this.m3b_1.t1n(this);
2463
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2464
+ return suspendResult;
2465
+ }
2466
+
2467
+ continue $sm;
2468
+ case 5:
2469
+ this.j3b_1;
2470
+ this.o8_1 = 7;
2471
+ this.p3b_1 = Companion_instance;
2472
+ this.n8_1 = 6;
2473
+ suspendResult = this.i3b_1.o33(this);
2474
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2475
+ return suspendResult;
2476
+ }
2477
+
2478
+ continue $sm;
2479
+ case 6:
2480
+ var tmp_2 = this;
2481
+ this.p3b_1;
2482
+ tmp_2.o3b_1 = _Result___init__impl__xyqfz8(Unit_instance);
2483
+ this.o8_1 = 14;
2484
+ this.n8_1 = 8;
2485
+ continue $sm;
2486
+ case 7:
2487
+ this.o8_1 = 14;
2488
+ var tmp_3 = this.q8_1;
2489
+ if (tmp_3 instanceof Error) {
2490
+ var e = this.q8_1;
2491
+ var tmp_4 = this;
2492
+ tmp_4.o3b_1 = _Result___init__impl__xyqfz8(createFailure(e));
2493
+ this.n8_1 = 8;
2494
+ continue $sm;
2495
+ } else {
2496
+ throw this.q8_1;
2497
+ }
2498
+
2499
+ case 8:
2500
+ this.o8_1 = 14;
2501
+ throw this.n3b_1;
2502
+ case 9:
2503
+ this.o8_1 = 14;
2504
+ this.n8_1 = 10;
2505
+ suspendResult = this.m3b_1.t1n(this);
2506
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2507
+ return suspendResult;
2508
+ }
2509
+
2510
+ continue $sm;
2511
+ case 10:
2512
+ this.j3b_1;
2513
+ this.o8_1 = 12;
2514
+ this.l3b_1 = Companion_instance;
2515
+ this.n8_1 = 11;
2516
+ suspendResult = this.i3b_1.o33(this);
2517
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2518
+ return suspendResult;
2519
+ }
2520
+
2521
+ continue $sm;
2522
+ case 11:
2523
+ var tmp_5 = this;
2524
+ this.l3b_1;
2525
+ tmp_5.k3b_1 = _Result___init__impl__xyqfz8(Unit_instance);
2526
+ this.o8_1 = 14;
2527
+ this.n8_1 = 13;
2528
+ continue $sm;
2529
+ case 12:
2530
+ this.o8_1 = 14;
2531
+ var tmp_6 = this.q8_1;
2532
+ if (tmp_6 instanceof Error) {
2533
+ var e_0 = this.q8_1;
2534
+ var tmp_7 = this;
2535
+ tmp_7.k3b_1 = _Result___init__impl__xyqfz8(createFailure(e_0));
2536
+ this.n8_1 = 13;
2537
+ continue $sm;
2538
+ } else {
2539
+ throw this.q8_1;
2540
+ }
2541
+
2542
+ case 13:
2543
+ this.o8_1 = 14;
2544
+ return Unit_instance;
2545
+ case 14:
2546
+ throw this.q8_1;
2547
+ }
2548
+ } catch ($p) {
2549
+ var e_1 = $p;
2550
+ if (this.o8_1 === 14) {
2551
+ throw e_1;
2552
+ } else {
2553
+ this.n8_1 = this.o8_1;
2554
+ this.q8_1 = e_1;
2555
+ }
2556
+ }
2557
+ while (true);
2558
+ };
2559
+ protoOf(writer$slambda).r3b = function ($this$launch, completion) {
2560
+ var i = new writer$slambda(this.h3b_1, this.i3b_1, completion);
2561
+ i.j3b_1 = $this$launch;
2562
+ return i;
2563
+ };
2564
+ function writer$slambda_0($block, $channel, resultContinuation) {
2565
+ var i = new writer$slambda($block, $channel, resultContinuation);
2566
+ return constructCallableReference(function ($this$launch, $completion) {
2567
+ return i.q3b($this$launch, $completion);
2568
+ }, 1);
2569
+ }
2570
+ function writer$lambda($channel) {
2571
+ return function (it) {
2572
+ var tmp;
2573
+ if (!(it == null) && !$channel.j33()) {
2574
+ $channel.p33(it);
2575
+ tmp = Unit_instance;
2576
+ }
2577
+ return Unit_instance;
2578
+ };
2579
+ }
2580
+ var properties_initialized_ByteWriteChannelOperations_kt_acrf6u;
2581
+ function _init_properties_ByteWriteChannelOperations_kt__i7slrs() {
2582
+ if (!properties_initialized_ByteWriteChannelOperations_kt_acrf6u) {
2583
+ properties_initialized_ByteWriteChannelOperations_kt_acrf6u = true;
2584
+ NO_CALLBACK = new NO_CALLBACK$1();
2585
+ }
2586
+ }
2587
+ function get_CLOSED() {
2588
+ _init_properties_CloseToken_kt__9ucr41();
2589
+ return CLOSED;
2590
+ }
2591
+ var CLOSED;
2592
+ function Companion_1() {
2593
+ }
2594
+ var Companion_instance_2;
2595
+ function Companion_getInstance_1() {
2596
+ return Companion_instance_2;
2597
+ }
2598
+ function access$_get_origin__hdh1qz($this) {
2599
+ return $this.s3b_1;
2600
+ }
2601
+ function CloseToken(origin) {
2602
+ this.s3b_1 = origin;
2603
+ }
2604
+ var properties_initialized_CloseToken_kt_lgg8zn;
2605
+ function _init_properties_CloseToken_kt__9ucr41() {
2606
+ if (!properties_initialized_CloseToken_kt_lgg8zn) {
2607
+ properties_initialized_CloseToken_kt_lgg8zn = true;
2608
+ CLOSED = new CloseToken(null);
2609
+ }
2610
+ }
2611
+ function transferFromDelegate($this) {
2612
+ updateConsumed($this);
2613
+ var appended = $this.u3b_1.v2z($this.t3b_1.h33());
2614
+ $this.v3b_1 = add($this.v3b_1, appended);
2615
+ }
2616
+ function updateConsumed($this) {
2617
+ $this.w3b_1 = add($this.w3b_1, subtract($this.v3b_1, $this.u3b_1.d1()));
2618
+ $this.v3b_1 = $this.u3b_1.d1();
2619
+ }
2620
+ function $awaitContentCOROUTINE$_0(_this__u8e3s4, min, resultContinuation) {
2621
+ CoroutineImpl.call(this, resultContinuation);
2622
+ this.f3c_1 = _this__u8e3s4;
2623
+ this.g3c_1 = min;
2624
+ }
2625
+ protoOf($awaitContentCOROUTINE$_0).v8 = function () {
2626
+ var suspendResult = this.p8_1;
2627
+ $sm: do
2628
+ try {
2629
+ var tmp = this.n8_1;
2630
+ switch (tmp) {
2631
+ case 0:
2632
+ this.o8_1 = 3;
2633
+ if (compare(this.f3c_1.h33().d1(), fromInt(this.g3c_1)) >= 0) {
2634
+ return true;
2635
+ }
2636
+
2637
+ this.n8_1 = 1;
2638
+ suspendResult = this.f3c_1.t3b_1.m33(this.g3c_1, this);
2639
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2640
+ return suspendResult;
2641
+ }
2642
+
2643
+ continue $sm;
2644
+ case 1:
2645
+ if (suspendResult) {
2646
+ transferFromDelegate(this.f3c_1);
2647
+ return true;
2648
+ } else {
2649
+ this.n8_1 = 2;
2650
+ continue $sm;
2651
+ }
2652
+
2653
+ case 2:
2654
+ return false;
2655
+ case 3:
2656
+ throw this.q8_1;
2657
+ }
2658
+ } catch ($p) {
2659
+ var e = $p;
2660
+ if (this.o8_1 === 3) {
2661
+ throw e;
2662
+ } else {
2663
+ this.n8_1 = this.o8_1;
2664
+ this.q8_1 = e;
2665
+ }
2666
+ }
2667
+ while (true);
2668
+ };
2669
+ function CountedByteReadChannel(delegate) {
2670
+ this.t3b_1 = delegate;
2671
+ this.u3b_1 = new Buffer();
2672
+ this.v3b_1 = new Long(0, 0);
2673
+ this.w3b_1 = new Long(0, 0);
2674
+ }
2675
+ protoOf(CountedByteReadChannel).h3c = function () {
2676
+ updateConsumed(this);
2677
+ return this.w3b_1;
2678
+ };
2679
+ protoOf(CountedByteReadChannel).k33 = function () {
2680
+ return this.t3b_1.k33();
2681
+ };
2682
+ protoOf(CountedByteReadChannel).l33 = function () {
2683
+ return this.u3b_1.e2y() && this.t3b_1.l33();
2684
+ };
2685
+ protoOf(CountedByteReadChannel).h33 = function () {
2686
+ transferFromDelegate(this);
2687
+ return this.u3b_1;
2688
+ };
2689
+ protoOf(CountedByteReadChannel).m33 = function (min, $completion) {
2690
+ var tmp = new $awaitContentCOROUTINE$_0(this, min, $completion);
2691
+ tmp.p8_1 = Unit_instance;
2692
+ tmp.q8_1 = null;
2693
+ return tmp.v8();
2694
+ };
2695
+ protoOf(CountedByteReadChannel).p33 = function (cause) {
2696
+ this.t3b_1.p33(cause);
2697
+ this.u3b_1.c4();
2698
+ };
2699
+ function counted(_this__u8e3s4) {
2700
+ return new CountedByteReadChannel(_this__u8e3s4);
2701
+ }
2702
+ function readText(_this__u8e3s4) {
2703
+ return readString_0(_this__u8e3s4);
2704
+ }
2705
+ function ClosedByteChannelException(cause) {
2706
+ cause = cause === VOID ? null : cause;
2707
+ IOException_init_$Init$(cause == null ? null : cause.message, cause, this);
2708
+ captureStack(this, ClosedByteChannelException);
2709
+ }
2710
+ function ClosedReadChannelException(cause) {
2711
+ cause = cause === VOID ? null : cause;
2712
+ ClosedByteChannelException.call(this, cause);
2713
+ captureStack(this, ClosedReadChannelException);
2714
+ }
2715
+ function ClosedWriteChannelException(cause) {
2716
+ cause = cause === VOID ? null : cause;
2717
+ ClosedByteChannelException.call(this, cause);
2718
+ captureStack(this, ClosedWriteChannelException);
2719
+ }
2720
+ var LineEnding_Default_instance;
2721
+ var LineEnding_Lenient_instance;
2722
+ var LineEnding_entriesInitialized;
2723
+ function LineEnding_initEntries() {
2724
+ if (LineEnding_entriesInitialized)
2725
+ return Unit_instance;
2726
+ LineEnding_entriesInitialized = true;
2727
+ LineEnding_Default_instance = new LineEnding('Default', 0);
2728
+ LineEnding_Lenient_instance = new LineEnding('Lenient', 1);
2729
+ }
2730
+ function LineEnding(name, ordinal) {
2731
+ Enum.call(this, name, ordinal);
2732
+ }
2733
+ function LineEnding_Default_getInstance() {
2734
+ LineEnding_initEntries();
2735
+ return LineEnding_Default_instance;
2736
+ }
2737
+ function LineEnding_Lenient_getInstance() {
2738
+ LineEnding_initEntries();
2739
+ return LineEnding_Lenient_instance;
2740
+ }
2741
+ function _LineEndingMode___init__impl__jo5bul(mode) {
2742
+ return mode;
2743
+ }
2744
+ function _get_mode__dah3bc($this) {
2745
+ return $this;
2746
+ }
2747
+ function LineEndingMode__contains_impl_q5pr68($this, other) {
2748
+ return (_get_mode__dah3bc($this) | _get_mode__dah3bc(other)) === _get_mode__dah3bc($this);
2749
+ }
2750
+ function LineEndingMode__plus_impl_ttpz2j($this, other) {
2751
+ return _LineEndingMode___init__impl__jo5bul(_get_mode__dah3bc($this) | _get_mode__dah3bc(other));
2752
+ }
2753
+ function LineEndingMode__toString_impl_j4h76r($this) {
2754
+ var tmp;
2755
+ if ($this === Companion_getInstance_2().i3c_1) {
2756
+ tmp = 'CR';
2757
+ } else if ($this === Companion_getInstance_2().j3c_1) {
2758
+ tmp = 'LF';
2759
+ } else if ($this === Companion_getInstance_2().k3c_1) {
2760
+ tmp = 'CRLF';
2761
+ } else {
2762
+ // Inline function 'kotlin.collections.filter' call
2763
+ var tmp0 = Companion_getInstance_2().m3c_1;
2764
+ // Inline function 'kotlin.collections.filterTo' call
2765
+ var destination = ArrayList_init_$Create$();
2766
+ var _iterator__ex2g4s = tmp0.t();
2767
+ while (_iterator__ex2g4s.u()) {
2768
+ var element = _iterator__ex2g4s.v();
2769
+ var it = element.n3c_1;
2770
+ if (LineEndingMode__contains_impl_q5pr68($this, it)) {
2771
+ destination.b1(element);
2772
+ }
2773
+ }
2774
+ tmp = toString_1(destination);
2775
+ }
2776
+ return tmp;
2777
+ }
2778
+ function Companion_2() {
2779
+ Companion_instance_3 = this;
2780
+ this.i3c_1 = _LineEndingMode___init__impl__jo5bul(1);
2781
+ this.j3c_1 = _LineEndingMode___init__impl__jo5bul(2);
2782
+ this.k3c_1 = _LineEndingMode___init__impl__jo5bul(4);
2783
+ this.l3c_1 = _LineEndingMode___init__impl__jo5bul(7);
2784
+ this.m3c_1 = listOf([new LineEndingMode(this.i3c_1), new LineEndingMode(this.j3c_1), new LineEndingMode(this.k3c_1)]);
2785
+ }
2786
+ var Companion_instance_3;
2787
+ function Companion_getInstance_2() {
2788
+ if (Companion_instance_3 == null)
2789
+ new Companion_2();
2790
+ return Companion_instance_3;
2791
+ }
2792
+ function LineEndingMode__hashCode_impl_2mopm4($this) {
2793
+ return $this;
2794
+ }
2795
+ function LineEndingMode__equals_impl_qyr4nk($this, other) {
2796
+ if (!(other instanceof LineEndingMode))
2797
+ return false;
2798
+ if (!($this === other.n3c_1))
2799
+ return false;
2800
+ return true;
2801
+ }
2802
+ function LineEndingMode(mode) {
2803
+ Companion_getInstance_2();
2804
+ this.n3c_1 = mode;
2805
+ }
2806
+ protoOf(LineEndingMode).toString = function () {
2807
+ return LineEndingMode__toString_impl_j4h76r(this.n3c_1);
2808
+ };
2809
+ protoOf(LineEndingMode).hashCode = function () {
2810
+ return LineEndingMode__hashCode_impl_2mopm4(this.n3c_1);
2811
+ };
2812
+ protoOf(LineEndingMode).equals = function (other) {
2813
+ return LineEndingMode__equals_impl_qyr4nk(this.n3c_1, other);
2814
+ };
2815
+ function SourceByteReadChannel(source) {
2816
+ this.o3c_1 = source;
2817
+ this.p3c_1 = null;
2818
+ }
2819
+ protoOf(SourceByteReadChannel).k33 = function () {
2820
+ var tmp0_safe_receiver = this.p3c_1;
2821
+ var tmp;
2822
+ if (tmp0_safe_receiver == null) {
2823
+ tmp = null;
2824
+ } else {
2825
+ // Inline function 'io.ktor.utils.io.Companion.wrapCause' call
2826
+ var tmp0_subject = access$_get_origin__hdh1qz(tmp0_safe_receiver);
2827
+ var tmp_0;
2828
+ if (tmp0_subject == null) {
2829
+ tmp_0 = null;
2830
+ } else {
2831
+ if (isInterface(tmp0_subject, CopyableThrowable)) {
2832
+ tmp_0 = access$_get_origin__hdh1qz(tmp0_safe_receiver).s1t();
2833
+ } else {
2834
+ if (tmp0_subject instanceof CancellationException) {
2835
+ tmp_0 = CancellationException_init_$Create$(access$_get_origin__hdh1qz(tmp0_safe_receiver).message, access$_get_origin__hdh1qz(tmp0_safe_receiver));
2836
+ } else {
2837
+ var p0 = access$_get_origin__hdh1qz(tmp0_safe_receiver);
2838
+ tmp_0 = new ClosedByteChannelException(p0);
2839
+ }
2840
+ }
2841
+ }
2842
+ tmp = tmp_0;
2843
+ }
2844
+ return tmp;
2845
+ };
2846
+ protoOf(SourceByteReadChannel).l33 = function () {
2847
+ return this.o3c_1.e2y();
2848
+ };
2849
+ protoOf(SourceByteReadChannel).h33 = function () {
2850
+ var tmp0_safe_receiver = this.k33();
2851
+ if (tmp0_safe_receiver == null)
2852
+ null;
2853
+ else {
2854
+ // Inline function 'kotlin.let' call
2855
+ throw tmp0_safe_receiver;
2856
+ }
2857
+ return this.o3c_1.d2y();
2858
+ };
2859
+ protoOf(SourceByteReadChannel).m33 = function (min, $completion) {
2860
+ var tmp0_safe_receiver = this.k33();
2861
+ if (tmp0_safe_receiver == null)
2862
+ null;
2863
+ else {
2864
+ // Inline function 'kotlin.let' call
2865
+ throw tmp0_safe_receiver;
2866
+ }
2867
+ return this.o3c_1.g2y(fromInt(min));
2868
+ };
2869
+ protoOf(SourceByteReadChannel).p33 = function (cause) {
2870
+ if (!(this.p3c_1 == null))
2871
+ return Unit_instance;
2872
+ this.o3c_1.c4();
2873
+ var tmp = this;
2874
+ var tmp1_elvis_lhs = cause == null ? null : cause.message;
2875
+ tmp.p3c_1 = new CloseToken(IOException_init_$Create$_0(tmp1_elvis_lhs == null ? 'Channel was cancelled' : tmp1_elvis_lhs, cause));
2876
+ };
2877
+ function decode(_this__u8e3s4, input, max) {
2878
+ max = max === VOID ? 2147483647 : max;
2879
+ var tmp0 = fromInt(max);
2880
+ // Inline function 'kotlin.comparisons.minOf' call
2881
+ var b = input.d2y().d1();
2882
+ var tmp$ret$0 = compare(tmp0, b) <= 0 ? tmp0 : b;
2883
+ // Inline function 'kotlin.text.buildString' call
2884
+ var capacity = convertToInt(tmp$ret$0);
2885
+ // Inline function 'kotlin.apply' call
2886
+ var this_0 = StringBuilder_init_$Create$(capacity);
2887
+ decode_0(_this__u8e3s4, input, this_0, max);
2888
+ return this_0.toString();
2889
+ }
2890
+ function encode(_this__u8e3s4, input, fromIndex, toIndex) {
2891
+ fromIndex = fromIndex === VOID ? 0 : fromIndex;
2892
+ toIndex = toIndex === VOID ? charSequenceLength(input) : toIndex;
2893
+ // Inline function 'io.ktor.utils.io.core.buildPacket' call
2894
+ var builder = new Buffer();
2895
+ encodeToImpl(_this__u8e3s4, builder, input, fromIndex, toIndex);
2896
+ return builder;
2897
+ }
2898
+ function TooLongLineException(message) {
2899
+ MalformedInputException.call(this, message);
2900
+ captureStack(this, TooLongLineException);
2901
+ }
2902
+ function encodeToImpl(_this__u8e3s4, destination, input, fromIndex, toIndex) {
2903
+ var start = fromIndex;
2904
+ if (start >= toIndex)
2905
+ return Unit_instance;
2906
+ $l$loop: while (true) {
2907
+ var rc = encodeImpl(_this__u8e3s4, input, start, toIndex, destination);
2908
+ // Inline function 'kotlin.check' call
2909
+ if (!(rc >= 0)) {
2910
+ throw IllegalStateException_init_$Create$('Check failed.');
2911
+ }
2912
+ start = start + rc | 0;
2913
+ if (start >= toIndex)
2914
+ break $l$loop;
2915
+ }
2916
+ }
2917
+ function canRead(_this__u8e3s4) {
2918
+ return !_this__u8e3s4.e2y();
2919
+ }
2920
+ function readBytes(_this__u8e3s4, count) {
2921
+ count = count === VOID ? convertToInt(_this__u8e3s4.d1()) : count;
2922
+ return readByteArray(_this__u8e3s4, count);
2923
+ }
2924
+ function writeFully_0(_this__u8e3s4, buffer, offset, length) {
2925
+ offset = offset === VOID ? 0 : offset;
2926
+ length = length === VOID ? buffer.length - offset | 0 : length;
2927
+ _this__u8e3s4.n2z(buffer, offset, offset + length | 0);
2928
+ }
2929
+ function BytePacketBuilder() {
2930
+ return new Buffer();
2931
+ }
2932
+ function build(_this__u8e3s4) {
2933
+ return _this__u8e3s4.d2y();
2934
+ }
2935
+ function get_size(_this__u8e3s4) {
2936
+ return convertToInt(_this__u8e3s4.d2y().d1());
2937
+ }
2938
+ var ByteReadPacketEmpty;
2939
+ function get_remaining(_this__u8e3s4) {
2940
+ _init_properties_ByteReadPacket_kt__28475y();
2941
+ return _this__u8e3s4.d2y().d1();
2942
+ }
2943
+ function takeWhile(_this__u8e3s4, block) {
2944
+ _init_properties_ByteReadPacket_kt__28475y();
2945
+ while (!_this__u8e3s4.e2y() && block(_this__u8e3s4.d2y())) {
2946
+ }
2947
+ }
2948
+ function discard_0(_this__u8e3s4, count) {
2949
+ count = count === VOID ? new Long(-1, 2147483647) : count;
2950
+ _init_properties_ByteReadPacket_kt__28475y();
2951
+ _this__u8e3s4.g2y(count);
2952
+ // Inline function 'kotlin.comparisons.minOf' call
2953
+ var b = get_remaining(_this__u8e3s4);
2954
+ var countToDiscard = compare(count, b) <= 0 ? count : b;
2955
+ _this__u8e3s4.d2y().b2z(countToDiscard);
2956
+ return countToDiscard;
2957
+ }
2958
+ var properties_initialized_ByteReadPacket_kt_hw4st4;
2959
+ function _init_properties_ByteReadPacket_kt__28475y() {
2960
+ if (!properties_initialized_ByteReadPacket_kt_hw4st4) {
2961
+ properties_initialized_ByteReadPacket_kt_hw4st4 = true;
2962
+ ByteReadPacketEmpty = new Buffer();
2963
+ }
2964
+ }
2965
+ function readAvailable_0(_this__u8e3s4, buffer, offset, length) {
2966
+ offset = offset === VOID ? 0 : offset;
2967
+ length = length === VOID ? buffer.length - offset | 0 : length;
2968
+ var result = _this__u8e3s4.c2z(buffer, offset, offset + length | 0);
2969
+ return result === -1 ? 0 : result;
2970
+ }
2971
+ function readText_0(_this__u8e3s4, charset, max) {
2972
+ charset = charset === VOID ? Charsets_getInstance().q3c_1 : charset;
2973
+ max = max === VOID ? 2147483647 : max;
2974
+ if (charset.equals(Charsets_getInstance().q3c_1)) {
2975
+ if (max === 2147483647)
2976
+ return readString_0(_this__u8e3s4);
2977
+ var tmp0 = _this__u8e3s4.d2y().d1();
2978
+ // Inline function 'kotlin.math.min' call
2979
+ var b = fromInt(max);
2980
+ var count = compare(tmp0, b) <= 0 ? tmp0 : b;
2981
+ return readString(_this__u8e3s4, count);
2982
+ }
2983
+ return decode(charset.t3c(), _this__u8e3s4, max);
2984
+ }
2985
+ function toByteArray_0(_this__u8e3s4, charset) {
2986
+ charset = charset === VOID ? Charsets_getInstance().q3c_1 : charset;
2987
+ if (charset.equals(Charsets_getInstance().q3c_1))
2988
+ return encodeToByteArray(_this__u8e3s4, VOID, VOID, true);
2989
+ return encodeToByteArray_0(charset.u3c(), _this__u8e3s4, 0, _this__u8e3s4.length);
2990
+ }
2991
+ function writeText(_this__u8e3s4, text, fromIndex, toIndex, charset) {
2992
+ fromIndex = fromIndex === VOID ? 0 : fromIndex;
2993
+ toIndex = toIndex === VOID ? charSequenceLength(text) : toIndex;
2994
+ charset = charset === VOID ? Charsets_getInstance().q3c_1 : charset;
2995
+ if (charset === Charsets_getInstance().q3c_1) {
2996
+ return writeString(_this__u8e3s4, toString_1(text), fromIndex, toIndex);
2997
+ }
2998
+ encodeToImpl(charset.u3c(), _this__u8e3s4, text, fromIndex, toIndex);
2999
+ }
3000
+ function get_ByteArrayPool() {
3001
+ _init_properties_ByteArrayPool_kt__kfi3uj();
3002
+ return ByteArrayPool;
3003
+ }
3004
+ var ByteArrayPool;
3005
+ function ByteArrayPool$1() {
3006
+ DefaultPool.call(this, 128);
3007
+ }
3008
+ protoOf(ByteArrayPool$1).y3c = function () {
3009
+ return new Int8Array(4096);
3010
+ };
3011
+ var properties_initialized_ByteArrayPool_kt_td6pfh;
3012
+ function _init_properties_ByteArrayPool_kt__kfi3uj() {
3013
+ if (!properties_initialized_ByteArrayPool_kt_td6pfh) {
3014
+ properties_initialized_ByteArrayPool_kt_td6pfh = true;
3015
+ ByteArrayPool = new ByteArrayPool$1();
3016
+ }
3017
+ }
3018
+ function ObjectPool() {
3019
+ }
3020
+ function NoPoolImpl() {
3021
+ }
3022
+ protoOf(NoPoolImpl).g3d = function (instance) {
3023
+ return Unit_instance;
3024
+ };
3025
+ protoOf(NoPoolImpl).c1q = function () {
3026
+ return Unit_instance;
3027
+ };
3028
+ function Companion_3() {
3029
+ }
3030
+ protoOf(Companion_3).h3d = function (name) {
3031
+ switch (name) {
3032
+ case 'UTF-8':
3033
+ case 'utf-8':
3034
+ case 'UTF8':
3035
+ case 'utf8':
3036
+ return Charsets_getInstance().q3c_1;
3037
+ }
3038
+ var tmp;
3039
+ var tmp_0;
3040
+ switch (name) {
3041
+ case 'ISO-8859-1':
3042
+ case 'iso-8859-1':
3043
+ tmp_0 = true;
3044
+ break;
3045
+ default:
3046
+ // Inline function 'kotlin.let' call
3047
+
3048
+ var it = replace_0(name, _Char___init__impl__6a9atx(95), _Char___init__impl__6a9atx(45));
3049
+ var tmp_1;
3050
+ if (it === 'iso-8859-1') {
3051
+ tmp_1 = true;
3052
+ } else {
3053
+ // Inline function 'kotlin.text.lowercase' call
3054
+ // Inline function 'kotlin.js.asDynamic' call
3055
+ tmp_1 = it.toLowerCase() === 'iso-8859-1';
3056
+ }
3057
+
3058
+ tmp_0 = tmp_1;
3059
+ break;
3060
+ }
3061
+ if (tmp_0) {
3062
+ tmp = true;
3063
+ } else {
3064
+ tmp = name === 'latin1' || name === 'Latin1';
3065
+ }
3066
+ if (tmp) {
3067
+ return Charsets_getInstance().r3c_1;
3068
+ }
3069
+ throw IllegalArgumentException_init_$Create$('Charset ' + name + ' is not supported');
3070
+ };
3071
+ var Companion_instance_4;
3072
+ function Companion_getInstance_3() {
3073
+ return Companion_instance_4;
3074
+ }
3075
+ function Charset(_name) {
3076
+ this.s3c_1 = _name;
3077
+ }
3078
+ protoOf(Charset).equals = function (other) {
3079
+ if (this === other)
3080
+ return true;
3081
+ if (other == null || !(this.constructor == other.constructor))
3082
+ return false;
3083
+ if (!(other instanceof Charset))
3084
+ THROW_CCE();
3085
+ return this.s3c_1 === other.s3c_1;
3086
+ };
3087
+ protoOf(Charset).hashCode = function () {
3088
+ return getStringHashCode(this.s3c_1);
3089
+ };
3090
+ protoOf(Charset).toString = function () {
3091
+ return this.s3c_1;
3092
+ };
3093
+ function Charsets() {
3094
+ Charsets_instance = this;
3095
+ this.q3c_1 = new CharsetImpl('UTF-8');
3096
+ this.r3c_1 = new CharsetImpl('ISO-8859-1');
3097
+ }
3098
+ var Charsets_instance;
3099
+ function Charsets_getInstance() {
3100
+ if (Charsets_instance == null)
3101
+ new Charsets();
3102
+ return Charsets_instance;
3103
+ }
3104
+ function get_name(_this__u8e3s4) {
3105
+ return _this__u8e3s4.s3c_1;
3106
+ }
3107
+ function MalformedInputException(message) {
3108
+ IOException_init_$Init$_0(message, this);
3109
+ captureStack(this, MalformedInputException);
3110
+ }
3111
+ function CharsetDecoder(_charset) {
3112
+ this.i3d_1 = _charset;
3113
+ }
3114
+ function forName(_this__u8e3s4, name) {
3115
+ return Companion_instance_4.h3d(name);
3116
+ }
3117
+ function CharsetEncoder(_charset) {
3118
+ this.j3d_1 = _charset;
3119
+ }
3120
+ function decode_0(_this__u8e3s4, input, dst, max) {
3121
+ var decoder = Decoder(get_name(get_charset(_this__u8e3s4)), true);
3122
+ var tmp0 = input.d2y().d1();
3123
+ // Inline function 'kotlin.comparisons.minOf' call
3124
+ var b = fromInt(max);
3125
+ var count = compare(tmp0, b) <= 0 ? tmp0 : b;
3126
+ var array = readByteArray(input, convertToInt(count));
3127
+ var tmp;
3128
+ try {
3129
+ // Inline function 'org.khronos.webgl.toInt8Array' call
3130
+ // Inline function 'kotlin.js.unsafeCast' call
3131
+ // Inline function 'kotlin.js.asDynamic' call
3132
+ tmp = decoder.k3d(array);
3133
+ } catch ($p) {
3134
+ var tmp_0;
3135
+ if ($p instanceof Error) {
3136
+ var cause = $p;
3137
+ var tmp0_elvis_lhs = cause.message;
3138
+ throw new MalformedInputException('Failed to decode bytes: ' + (tmp0_elvis_lhs == null ? 'no cause provided' : tmp0_elvis_lhs));
3139
+ } else {
3140
+ throw $p;
3141
+ }
3142
+ }
3143
+ var result = tmp;
3144
+ dst.c1(result);
3145
+ return result.length;
3146
+ }
3147
+ function encodeImpl(_this__u8e3s4, input, fromIndex, toIndex, dst) {
3148
+ // Inline function 'kotlin.require' call
3149
+ // Inline function 'kotlin.require' call
3150
+ if (!(fromIndex <= toIndex)) {
3151
+ var message = 'Failed requirement.';
3152
+ throw IllegalArgumentException_init_$Create$(toString_1(message));
3153
+ }
3154
+ if (get_charset_0(_this__u8e3s4).equals(Charsets_getInstance().r3c_1)) {
3155
+ return encodeISO88591(input, fromIndex, toIndex, dst);
3156
+ }
3157
+ // Inline function 'kotlin.require' call
3158
+ if (!(get_charset_0(_this__u8e3s4) === Charsets_getInstance().q3c_1)) {
3159
+ var message_0 = 'Only UTF-8 encoding is supported in JS';
3160
+ throw IllegalArgumentException_init_$Create$(toString_1(message_0));
3161
+ }
3162
+ var encoder = new TextEncoder();
3163
+ // Inline function 'kotlin.text.substring' call
3164
+ var tmp$ret$5 = toString_1(charSequenceSubSequence(input, fromIndex, toIndex));
3165
+ var result = encoder.encode(tmp$ret$5);
3166
+ // Inline function 'kotlin.js.unsafeCast' call
3167
+ // Inline function 'kotlin.js.asDynamic' call
3168
+ dst.q2z(result);
3169
+ return result.length;
3170
+ }
3171
+ function encodeToByteArray_0(_this__u8e3s4, input, fromIndex, toIndex) {
3172
+ fromIndex = fromIndex === VOID ? 0 : fromIndex;
3173
+ toIndex = toIndex === VOID ? charSequenceLength(input) : toIndex;
3174
+ return encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex);
3175
+ }
3176
+ function CharsetImpl(name) {
3177
+ Charset.call(this, name);
3178
+ }
3179
+ protoOf(CharsetImpl).u3c = function () {
3180
+ return new CharsetEncoderImpl(this);
3181
+ };
3182
+ protoOf(CharsetImpl).t3c = function () {
3183
+ return new CharsetDecoderImpl(this);
3184
+ };
3185
+ function get_charset(_this__u8e3s4) {
3186
+ return _this__u8e3s4.i3d_1;
3187
+ }
3188
+ function get_charset_0(_this__u8e3s4) {
3189
+ return _this__u8e3s4.j3d_1;
3190
+ }
3191
+ function encodeToByteArrayImpl(_this__u8e3s4, input, fromIndex, toIndex) {
3192
+ fromIndex = fromIndex === VOID ? 0 : fromIndex;
3193
+ toIndex = toIndex === VOID ? charSequenceLength(input) : toIndex;
3194
+ var start = fromIndex;
3195
+ if (start >= toIndex)
3196
+ return new Int8Array(0);
3197
+ var dst = new Buffer();
3198
+ var rc = encodeImpl(_this__u8e3s4, input, start, toIndex, dst);
3199
+ start = start + rc | 0;
3200
+ if (start === toIndex) {
3201
+ return readByteArray_0(dst);
3202
+ }
3203
+ encodeToImpl(_this__u8e3s4, dst, input, start, toIndex);
3204
+ return readByteArray_0(dst);
3205
+ }
3206
+ function CharsetEncoderImpl(charset) {
3207
+ CharsetEncoder.call(this, charset);
3208
+ this.n3d_1 = charset;
3209
+ }
3210
+ protoOf(CharsetEncoderImpl).toString = function () {
3211
+ return 'CharsetEncoderImpl(charset=' + this.n3d_1.toString() + ')';
3212
+ };
3213
+ protoOf(CharsetEncoderImpl).hashCode = function () {
3214
+ return this.n3d_1.hashCode();
3215
+ };
3216
+ protoOf(CharsetEncoderImpl).equals = function (other) {
3217
+ if (this === other)
3218
+ return true;
3219
+ if (!(other instanceof CharsetEncoderImpl))
3220
+ return false;
3221
+ if (!this.n3d_1.equals(other.n3d_1))
3222
+ return false;
3223
+ return true;
3224
+ };
3225
+ function CharsetDecoderImpl(charset) {
3226
+ CharsetDecoder.call(this, charset);
3227
+ this.p3d_1 = charset;
3228
+ }
3229
+ protoOf(CharsetDecoderImpl).toString = function () {
3230
+ return 'CharsetDecoderImpl(charset=' + this.p3d_1.toString() + ')';
3231
+ };
3232
+ protoOf(CharsetDecoderImpl).hashCode = function () {
3233
+ return this.p3d_1.hashCode();
3234
+ };
3235
+ protoOf(CharsetDecoderImpl).equals = function (other) {
3236
+ if (this === other)
3237
+ return true;
3238
+ if (!(other instanceof CharsetDecoderImpl))
3239
+ return false;
3240
+ if (!this.p3d_1.equals(other.p3d_1))
3241
+ return false;
3242
+ return true;
3243
+ };
3244
+ function Decoder(encoding, fatal) {
3245
+ fatal = fatal === VOID ? true : fatal;
3246
+ var tmp;
3247
+ try {
3248
+ tmp = toKtor(new TextDecoder(encoding, textDecoderOptions(fatal)));
3249
+ } catch ($p) {
3250
+ var tmp_0;
3251
+ if ($p instanceof Error) {
3252
+ var cause = $p;
3253
+ tmp_0 = new TextDecoderFallback(encoding, fatal);
3254
+ } else {
3255
+ throw $p;
3256
+ }
3257
+ tmp = tmp_0;
3258
+ }
3259
+ return tmp;
3260
+ }
3261
+ function toKtor(_this__u8e3s4) {
3262
+ return new toKtor$1(_this__u8e3s4);
3263
+ }
3264
+ function textDecoderOptions(fatal) {
3265
+ fatal = fatal === VOID ? false : fatal;
3266
+ // Inline function 'kotlin.apply' call
3267
+ var this_0 = new Object();
3268
+ // Inline function 'kotlin.js.asDynamic' call
3269
+ // Inline function 'kotlin.with' call
3270
+ this_0.fatal = fatal;
3271
+ return this_0;
3272
+ }
3273
+ function toKtor$1($this_toKtor) {
3274
+ this.q3d_1 = $this_toKtor;
3275
+ }
3276
+ protoOf(toKtor$1).k3d = function (buffer) {
3277
+ return this.q3d_1.decode(buffer);
3278
+ };
3279
+ function get_ENCODING_ALIASES() {
3280
+ _init_properties_TextDecoderFallback_js_kt__an7r6m();
3281
+ return ENCODING_ALIASES;
3282
+ }
3283
+ var ENCODING_ALIASES;
3284
+ function get_REPLACEMENT() {
3285
+ _init_properties_TextDecoderFallback_js_kt__an7r6m();
3286
+ return REPLACEMENT;
3287
+ }
3288
+ var REPLACEMENT;
3289
+ function TextDecoderFallback(encoding, fatal) {
3290
+ this.r3d_1 = fatal;
3291
+ // Inline function 'kotlin.text.trim' call
3292
+ // Inline function 'kotlin.text.lowercase' call
3293
+ // Inline function 'kotlin.js.asDynamic' call
3294
+ var requestedEncoding = toString_1(trim(isCharSequence(encoding) ? encoding : THROW_CCE())).toLowerCase();
3295
+ // Inline function 'kotlin.check' call
3296
+ if (!get_ENCODING_ALIASES().v1(requestedEncoding)) {
3297
+ var message = encoding + ' is not supported.';
3298
+ throw IllegalStateException_init_$Create$(toString_1(message));
3299
+ }
3300
+ }
3301
+ protoOf(TextDecoderFallback).k3d = function (buffer) {
3302
+ // Inline function 'io.ktor.utils.io.core.buildPacket' call
3303
+ var builder = new Buffer();
3304
+ var bytes = buffer instanceof Int8Array ? buffer : THROW_CCE();
3305
+ var inductionVariable = 0;
3306
+ var last = bytes.length;
3307
+ if (inductionVariable < last)
3308
+ $l$loop: do {
3309
+ var index = inductionVariable;
3310
+ inductionVariable = inductionVariable + 1 | 0;
3311
+ // Inline function 'org.khronos.webgl.get' call
3312
+ // Inline function 'kotlin.js.asDynamic' call
3313
+ var byte = bytes[index];
3314
+ var point = toCodePoint(byte);
3315
+ if (point < 0) {
3316
+ // Inline function 'kotlin.check' call
3317
+ if (!!this.r3d_1) {
3318
+ var message = 'Invalid character: ' + point;
3319
+ throw IllegalStateException_init_$Create$(toString_1(message));
3320
+ }
3321
+ writeFully_0(builder, get_REPLACEMENT());
3322
+ continue $l$loop;
3323
+ }
3324
+ if (point > 255) {
3325
+ builder.w2z(toByte(point >> 8));
3326
+ }
3327
+ builder.w2z(toByte(point & 255));
3328
+ }
3329
+ while (inductionVariable < last);
3330
+ return decodeToString(readByteArray_0(builder));
3331
+ };
3332
+ function toCodePoint(_this__u8e3s4) {
3333
+ _init_properties_TextDecoderFallback_js_kt__an7r6m();
3334
+ var value = _this__u8e3s4 & 255;
3335
+ if (isASCII(value)) {
3336
+ return value;
3337
+ }
3338
+ return get_WIN1252_TABLE()[value - 128 | 0];
3339
+ }
3340
+ function isASCII(_this__u8e3s4) {
3341
+ _init_properties_TextDecoderFallback_js_kt__an7r6m();
3342
+ return 0 <= _this__u8e3s4 ? _this__u8e3s4 <= 127 : false;
3343
+ }
3344
+ var properties_initialized_TextDecoderFallback_js_kt_6rekzk;
3345
+ function _init_properties_TextDecoderFallback_js_kt__an7r6m() {
3346
+ if (!properties_initialized_TextDecoderFallback_js_kt_6rekzk) {
3347
+ properties_initialized_TextDecoderFallback_js_kt_6rekzk = true;
3348
+ ENCODING_ALIASES = setOf(['ansi_x3.4-1968', 'ascii', 'cp1252', 'cp819', 'csisolatin1', 'ibm819', 'iso-8859-1', 'iso-ir-100', 'iso8859-1', 'iso88591', 'iso_8859-1', 'iso_8859-1:1987', 'l1', 'latin1', 'us-ascii', 'windows-1252', 'x-cp1252']);
3349
+ // Inline function 'kotlin.byteArrayOf' call
3350
+ REPLACEMENT = new Int8Array([-17, -65, -67]);
3351
+ }
3352
+ }
3353
+ function get_DEVELOPMENT_MODE() {
3354
+ return false;
3355
+ }
3356
+ function ioDispatcher() {
3357
+ return Dispatchers_getInstance().g1x_1;
3358
+ }
3359
+ function encodeISO88591(input, fromIndex, toIndex, dst) {
3360
+ if (fromIndex >= toIndex)
3361
+ return 0;
3362
+ var inductionVariable = fromIndex;
3363
+ if (inductionVariable < toIndex)
3364
+ do {
3365
+ var index = inductionVariable;
3366
+ inductionVariable = inductionVariable + 1 | 0;
3367
+ // Inline function 'kotlin.code' call
3368
+ var this_0 = charSequenceGet(input, index);
3369
+ var character = Char__toInt_impl_vasixd(this_0);
3370
+ if (character > 255) {
3371
+ failedToMapError(character);
3372
+ }
3373
+ dst.w2z(toByte(character));
3374
+ }
3375
+ while (inductionVariable < toIndex);
3376
+ return toIndex - fromIndex | 0;
3377
+ }
3378
+ function failedToMapError(ch) {
3379
+ throw new MalformedInputException('The character with unicode point ' + ch + " couldn't be mapped to ISO-8859-1 character");
3380
+ }
3381
+ function get_WIN1252_TABLE() {
3382
+ _init_properties_Win1252Table_kt__tl0v64();
3383
+ return WIN1252_TABLE;
3384
+ }
3385
+ var WIN1252_TABLE;
3386
+ var properties_initialized_Win1252Table_kt_pkmjoq;
3387
+ function _init_properties_Win1252Table_kt__tl0v64() {
3388
+ if (!properties_initialized_Win1252Table_kt_pkmjoq) {
3389
+ properties_initialized_Win1252Table_kt_pkmjoq = true;
3390
+ // Inline function 'kotlin.intArrayOf' call
3391
+ WIN1252_TABLE = new Int32Array([8364, -1, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, -1, 381, -1, -1, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250, 339, -1, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255]);
3392
+ }
3393
+ }
3394
+ function DefaultPool(capacity) {
3395
+ this.z3c_1 = capacity;
3396
+ var tmp = this;
3397
+ // Inline function 'kotlin.arrayOfNulls' call
3398
+ var size = this.z3c_1;
3399
+ tmp.a3d_1 = Array(size);
3400
+ this.b3d_1 = 0;
3401
+ }
3402
+ protoOf(DefaultPool).c3d = function (instance) {
3403
+ };
3404
+ protoOf(DefaultPool).d3d = function (instance) {
3405
+ return instance;
3406
+ };
3407
+ protoOf(DefaultPool).e3d = function (instance) {
3408
+ };
3409
+ protoOf(DefaultPool).f3d = function () {
3410
+ if (this.b3d_1 === 0)
3411
+ return this.y3c();
3412
+ this.b3d_1 = this.b3d_1 - 1 | 0;
3413
+ var idx = this.b3d_1;
3414
+ var tmp = this.a3d_1[idx];
3415
+ var instance = !(tmp == null) ? tmp : THROW_CCE();
3416
+ this.a3d_1[idx] = null;
3417
+ return this.d3d(instance);
3418
+ };
3419
+ protoOf(DefaultPool).g3d = function (instance) {
3420
+ this.e3d(instance);
3421
+ if (this.b3d_1 === this.z3c_1) {
3422
+ this.c3d(instance);
3423
+ } else {
3424
+ var _unary__edvuaz = this.b3d_1;
3425
+ this.b3d_1 = _unary__edvuaz + 1 | 0;
3426
+ this.a3d_1[_unary__edvuaz] = instance;
3427
+ }
3428
+ };
3429
+ protoOf(DefaultPool).c1q = function () {
3430
+ var inductionVariable = 0;
3431
+ var last = this.b3d_1;
3432
+ if (inductionVariable < last)
3433
+ do {
3434
+ var i = inductionVariable;
3435
+ inductionVariable = inductionVariable + 1 | 0;
3436
+ var tmp = this.a3d_1[i];
3437
+ var instance = !(tmp == null) ? tmp : THROW_CCE();
3438
+ this.a3d_1[i] = null;
3439
+ this.c3d(instance);
3440
+ }
3441
+ while (inductionVariable < last);
3442
+ this.b3d_1 = 0;
3443
+ };
3444
+ //region block: post-declaration
3445
+ protoOf(Read).h31 = resume;
3446
+ protoOf(Read).i31 = resume_0;
3447
+ protoOf(Write).h31 = resume;
3448
+ protoOf(Write).i31 = resume_0;
3449
+ protoOf(ByteChannel).n33 = awaitContent$default;
3450
+ protoOf(ByteReadChannel$Companion$Empty$1).n33 = awaitContent$default;
3451
+ protoOf(CountedByteReadChannel).n33 = awaitContent$default;
3452
+ protoOf(SourceByteReadChannel).n33 = awaitContent$default;
3453
+ protoOf(DefaultPool).c4 = close;
3454
+ protoOf(NoPoolImpl).c4 = close;
3455
+ //endregion
3456
+ //region block: init
3457
+ Empty_instance = new Empty();
3458
+ Companion_instance_2 = new Companion_1();
3459
+ Companion_instance_4 = new Companion_3();
3460
+ //endregion
3461
+ //region block: exports
3462
+ export {
3463
+ LineEndingMode__plus_impl_ttpz2j as LineEndingMode__plus_impl_ttpz2j3u2ebrlepd29o,
3464
+ Charsets_getInstance as Charsets_getInstance3jooo7e4x0j2x,
3465
+ Companion_getInstance_0 as Companion_getInstance25751un9ltd4f,
3466
+ Companion_getInstance_2 as Companion_getInstance33j3lym6q7yx7,
3467
+ copyTo as copyTo1e8cxw3cmqjst,
3468
+ readAvailable as readAvailable2yaaricqompas,
3469
+ readLineStrictTo as readLineStrictTo30g42df56og5l,
3470
+ readPacket as readPacket25aqlhslm04t6,
3471
+ readRemaining as readRemaining1kbpbgdrq25q1,
3472
+ readUntil as readUntil13nwpwqdlw2vo,
3473
+ skipIfFound as skipIfFound2z2la3mzzpubl,
3474
+ toByteArray as toByteArray1nbmiiav9igm0,
3475
+ writeFully as writeFullyuc6cd2hh6ex3,
3476
+ MalformedInputException as MalformedInputExceptionbvc6h5ij0ias,
3477
+ decode as decode1t43jmuxrxpmo,
3478
+ encode as encode35e4rpnc94tb5,
3479
+ forName as forName2faodmskqnoz5,
3480
+ get_name as get_name2f11g4r0d5pxp,
3481
+ BytePacketBuilder as BytePacketBuilder2biodf4wxvlba,
3482
+ build as buildjygoh729rhy8,
3483
+ canRead as canRead1guo8vbveth0f,
3484
+ readText_0 as readText27783kyxjxi1g,
3485
+ get_remaining as get_remaining1lapv95kcmm0y,
3486
+ get_size as get_size2imoy2jq11jxl,
3487
+ takeWhile as takeWhile34751tcfg6owx,
3488
+ toByteArray_0 as toByteArray1i3ns5jnoqlv6,
3489
+ writeFully_0 as writeFully359t6q8kam2g5,
3490
+ writeText as writeText19qfzm98fbm4l,
3491
+ get_ByteArrayPool as get_ByteArrayPool3f7yrgvqxz9ct,
3492
+ DefaultPool as DefaultPool2gb1fm4epwgu9,
3493
+ NoPoolImpl as NoPoolImplgos9n8jphzjp,
3494
+ ByteChannel as ByteChannel3cxdguezl3lu7,
3495
+ ByteReadChannel as ByteReadChannel1cb89sbyipkce,
3496
+ ByteReadChannel_1 as ByteReadChannel2wzou76jce72d,
3497
+ ClosedByteChannelException as ClosedByteChannelException3il8gfpye60w,
3498
+ WriterScope as WriterScope3b0bo1enaee6b,
3499
+ attachWriterJob as attachWriterJob2dr3tee7atoa9,
3500
+ cancel_0 as canceldn4b3cdqcfny,
3501
+ close_0 as close3semq7pafb42g,
3502
+ counted as counted3iniv3aql3f9n,
3503
+ invokeOnCompletion as invokeOnCompletion1ziuxzoag0iwj,
3504
+ ioDispatcher as ioDispatcher3b9pa3x0duop,
3505
+ readText as readText3frapgncbqrcg,
3506
+ rethrowCloseCauseIfNeeded as rethrowCloseCauseIfNeeded3ixo8wl4o3bz4,
3507
+ writer as writer1eia5its2a1fh,
3508
+ };
3509
+ //endregion
3510
+
3511
+ //# sourceMappingURL=ktor-ktor-io.mjs.map