@solibo/home-api 1.1.9 → 1.1.10

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