@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,2535 @@
1
+ import {
2
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
3
+ mapCapacity1h45rc3eh9p2l as mapCapacity,
4
+ coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
5
+ LinkedHashMap_init_$Create$1s75e1k23v4xj as LinkedHashMap_init_$Create$,
6
+ Unit_instance28fytmsmm6r23 as Unit_instance,
7
+ protoOf180f3jzyo7rfj as protoOf,
8
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
9
+ enumEntries20mr21zbe3az4 as enumEntries,
10
+ objectCreate1ve4bgxiu4x98 as objectCreate,
11
+ Enum3alwj03lh1n41 as Enum,
12
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
13
+ VOID3gxj6tk5isa35 as VOID,
14
+ toString1pkumu07cwy4m as toString,
15
+ getStringHashCode26igk1bx568vk as getStringHashCode,
16
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
17
+ isInterface3d6p8outrmvmk as isInterface,
18
+ IllegalArgumentException_init_$Create$1j1aj36nbo0wg as IllegalArgumentException_init_$Create$,
19
+ CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
20
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
21
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
22
+ initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
23
+ ensureNotNull1e947j3ixpazm as ensureNotNull,
24
+ CancellationException_init_$Create$2cgg3m6ot6euw as CancellationException_init_$Create$,
25
+ CancellationException3b36o9qz53rgr as CancellationException,
26
+ initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
27
+ toString30pk9tzaqopn as toString_0,
28
+ fromInt2ii0rejb1w62w as fromInt,
29
+ ArrayList_init_$Create$1jemgvhi5v0js as ArrayList_init_$Create$,
30
+ IllegalStateException_init_$Create$2429fvs1h56dm as IllegalStateException_init_$Create$,
31
+ joinToString1cxrrlmo0chqs as joinToString,
32
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
33
+ Exceptiondt2hlxn7j7vw as Exception,
34
+ Exception_init_$Init$22vtgic9oqkxe as Exception_init_$Init$,
35
+ captureStack1fzi4aczwc4hg as captureStack,
36
+ defineProp3ur6h3slcvq4x as defineProp,
37
+ compareTo3ankvs086tmwq as compareTo,
38
+ decodeToString1dbzcjd620q25 as decodeToString,
39
+ Randomei1bbeye8rr8 as Random,
40
+ throwUninitializedPropertyAccessException14fok093f3k3t as throwUninitializedPropertyAccessException,
41
+ RuntimeException1r3t0zl97011n as RuntimeException,
42
+ RuntimeException_init_$Init$1r58y6o32gy09 as RuntimeException_init_$Init$,
43
+ ArrayList_init_$Create$3ivpeip4ouddx as ArrayList_init_$Create$_0,
44
+ split2bvyvnrlcifjv as split,
45
+ first58ocm7j58k3q as first,
46
+ isCharSequence1ju9jr1w86plq as isCharSequence,
47
+ trim11nh7r46at6sx as trim,
48
+ drop3na99dw9feawf as drop,
49
+ noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
50
+ } from './kotlin-kotlin-stdlib.mjs';
51
+ import {
52
+ Dispatchers_getInstancewbokwrm9sosb as Dispatchers_getInstance,
53
+ launch1c91vkjzdi9sd as launch,
54
+ CoroutineStart_UNDISPATCHED_getInstanceldihd7d5m0an as CoroutineStart_UNDISPATCHED_getInstance,
55
+ ChannelResult2y4k69ac6y3du as ChannelResult,
56
+ _ChannelResult___get_isSuccess__impl__odq1z9363u9zgwpgg09 as _ChannelResult___get_isSuccess__impl__odq1z9,
57
+ CoroutineScopefcb5f5dwqcas as CoroutineScope,
58
+ cancelConsumed2i0oizqhmljf6 as cancelConsumed,
59
+ ClosedSendChannelException29m33prpq9jaw as ClosedSendChannelException,
60
+ ClosedReceiveChannelException3ofg6gf5f5b38 as ClosedReceiveChannelException,
61
+ CompletableDeferred2lnqvsbvx74d3 as CompletableDeferred,
62
+ Job13y4jkazwjho0 as Job,
63
+ Key_instance17dpgmdbeabno as Key_instance,
64
+ CoroutineName2g5zosw74tf0f as CoroutineName,
65
+ Factory_getInstance1n4mqriubejsu as Factory_getInstance,
66
+ CopyableThrowable1mvc99jcyvivf as CopyableThrowable,
67
+ Channel3r72atmcithql as Channel,
68
+ withTimeoutOrNullod8v51lxlhk as withTimeoutOrNull,
69
+ BufferOverflow_SUSPEND_getInstance31wn3v83onf3w as BufferOverflow_SUSPEND_getInstance,
70
+ BufferOverflow_DROP_OLDEST_getInstance19p135qqjnhf2 as BufferOverflow_DROP_OLDEST_getInstance,
71
+ _ChannelResult___get_isClosed__impl__mg7kuu1xlv81pnrlsg7 as _ChannelResult___get_isClosed__impl__mg7kuu,
72
+ close$default29t9kascifp5w as close$default,
73
+ cancel$default3ekkkwpkem73o as cancel$default,
74
+ SendChannel38sllbxw662ws as SendChannel,
75
+ ReceiveChannel24wu5e2tj9lbp as ReceiveChannel,
76
+ } from './kotlinx-coroutines-core.mjs';
77
+ import {
78
+ get_isTraceEnabled82xibuu04nxp as get_isTraceEnabled,
79
+ ChannelIOException2i3t76lsrbgox as ChannelIOException,
80
+ KtorSimpleLogger1xdphsp5l4e48 as KtorSimpleLogger,
81
+ initCauseBridge1upxfqhavblt6 as initCauseBridge,
82
+ getTimeMillis12o7k17x9fmwi as getTimeMillis,
83
+ hex2ofqpe9ngcu1i as hex,
84
+ } from './ktor-ktor-utils.mjs';
85
+ import {
86
+ BytePacketBuilder2biodf4wxvlba as BytePacketBuilder,
87
+ writeFully359t6q8kam2g5 as writeFully,
88
+ buildjygoh729rhy8 as build,
89
+ get_size2imoy2jq11jxl as get_size,
90
+ readText27783kyxjxi1g as readText,
91
+ Charsets_getInstanceq0o82sizm30g as Charsets_getInstance,
92
+ toByteArray1i3ns5jnoqlv6 as toByteArray,
93
+ ClosedByteChannelException3il8gfpye60w as ClosedByteChannelException,
94
+ writeText19qfzm98fbm4l as writeText,
95
+ } from './ktor-ktor-io.mjs';
96
+ import {
97
+ readByteArray1ri21h2rciakw as readByteArray,
98
+ IOException_init_$Create$3s3kcdlhouh9j as IOException_init_$Create$,
99
+ Buffergs925ekssbch as Buffer,
100
+ } from './kotlinx-io-kotlinx-io-core.mjs';
101
+ import {
102
+ atomic$ref$130aurmcwdfdf1 as atomic$ref$1,
103
+ atomic$boolean$1iggki4z65a2h as atomic$boolean$1,
104
+ } from './kotlinx-atomicfu.mjs';
105
+ //region block: imports
106
+ var imul = Math.imul;
107
+ //endregion
108
+ //region block: pre-declaration
109
+ initMetadataForCompanion(Companion);
110
+ initMetadataForClass(Codes, 'Codes', VOID, Enum);
111
+ initMetadataForClass(CloseReason, 'CloseReason');
112
+ function send(frame, $completion) {
113
+ return this.c32().a19(frame, $completion);
114
+ }
115
+ initMetadataForInterface(WebSocketSession, 'WebSocketSession', VOID, VOID, [CoroutineScope], [1, 0]);
116
+ initMetadataForInterface(DefaultWebSocketSession, 'DefaultWebSocketSession', VOID, VOID, [WebSocketSession], [1, 0]);
117
+ initMetadataForCompanion(Companion_0);
118
+ initMetadataForLambda(DefaultWebSocketSessionImpl$start$slambda, CoroutineImpl, VOID, [1]);
119
+ initMetadataForLambda(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda, CoroutineImpl, VOID, [1]);
120
+ initMetadataForLambda(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda, CoroutineImpl, VOID, [1]);
121
+ initMetadataForLambda(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda, CoroutineImpl, VOID, [1]);
122
+ initMetadataForCoroutine($outgoingProcessorLoopCOROUTINE$, CoroutineImpl);
123
+ initMetadataForCoroutine($sendCloseSequenceCOROUTINE$, CoroutineImpl);
124
+ initMetadataForCoroutine($checkMaxFrameSizeCOROUTINE$, CoroutineImpl);
125
+ initMetadataForClass(DefaultWebSocketSessionImpl, 'DefaultWebSocketSessionImpl', VOID, VOID, [DefaultWebSocketSession, WebSocketSession], [1, 0, 2]);
126
+ initMetadataForObject(NonDisposableHandle, 'NonDisposableHandle');
127
+ initMetadataForClass(FrameTooBigException, 'FrameTooBigException', VOID, Exception, [Exception, CopyableThrowable]);
128
+ initMetadataForCompanion(Companion_1);
129
+ initMetadataForClass(FrameType, 'FrameType', VOID, Enum);
130
+ initMetadataForLambda(ponger$slambda, CoroutineImpl, VOID, [1]);
131
+ initMetadataForLambda(pinger$slambda$slambda, CoroutineImpl, VOID, [1]);
132
+ initMetadataForLambda(pinger$slambda$slambda_1, CoroutineImpl, VOID, [1]);
133
+ initMetadataForLambda(pinger$slambda, CoroutineImpl, VOID, [1]);
134
+ initMetadataForCompanion(Companion_2);
135
+ initMetadataForClass(WebSocketChannelsConfig, 'WebSocketChannelsConfig', WebSocketChannelsConfig);
136
+ initMetadataForCompanion(Companion_3);
137
+ initMetadataForClass(ChannelConfig, 'ChannelConfig');
138
+ initMetadataForClass(ChannelOverflow, 'ChannelOverflow', VOID, Enum);
139
+ initMetadataForCompanion(Companion_4);
140
+ initMetadataForClass(BoundedChannel, 'BoundedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 0]);
141
+ initMetadataForClass(ChannelOverflowException, 'ChannelOverflowException', VOID, RuntimeException);
142
+ initMetadataForInterface(WebSocketExtension, 'WebSocketExtension');
143
+ initMetadataForClass(WebSocketExtensionsConfig, 'WebSocketExtensionsConfig', WebSocketExtensionsConfig);
144
+ initMetadataForClass(WebSocketExtensionHeader, 'WebSocketExtensionHeader');
145
+ initMetadataForCoroutine($closeCOROUTINE$, CoroutineImpl);
146
+ initMetadataForClass(Frame, 'Frame');
147
+ initMetadataForClass(Binary, 'Binary', VOID, Frame);
148
+ initMetadataForClass(Text, 'Text', VOID, Frame);
149
+ initMetadataForClass(Close, 'Close', Close_init_$Create$_0, Frame);
150
+ initMetadataForClass(Ping, 'Ping', VOID, Frame);
151
+ initMetadataForClass(Pong, 'Pong', VOID, Frame);
152
+ initMetadataForCompanion(Companion_5);
153
+ //endregion
154
+ var Codes_NORMAL_instance;
155
+ var Codes_GOING_AWAY_instance;
156
+ var Codes_PROTOCOL_ERROR_instance;
157
+ var Codes_CANNOT_ACCEPT_instance;
158
+ var Codes_CLOSED_ABNORMALLY_instance;
159
+ var Codes_NOT_CONSISTENT_instance;
160
+ var Codes_VIOLATED_POLICY_instance;
161
+ var Codes_TOO_BIG_instance;
162
+ var Codes_NO_EXTENSION_instance;
163
+ var Codes_INTERNAL_ERROR_instance;
164
+ var Codes_SERVICE_RESTART_instance;
165
+ var Codes_TRY_AGAIN_LATER_instance;
166
+ function Companion() {
167
+ Companion_instance = this;
168
+ var tmp = this;
169
+ // Inline function 'kotlin.collections.associateBy' call
170
+ var this_0 = get_entries();
171
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
172
+ // Inline function 'kotlin.collections.associateByTo' call
173
+ var destination = LinkedHashMap_init_$Create$(capacity);
174
+ var _iterator__ex2g4s = this_0.t();
175
+ while (_iterator__ex2g4s.u()) {
176
+ var element = _iterator__ex2g4s.v();
177
+ var tmp$ret$0 = element.r31_1;
178
+ destination.s2(tmp$ret$0, element);
179
+ }
180
+ tmp.s31_1 = destination;
181
+ this.t31_1 = Codes_INTERNAL_ERROR_getInstance();
182
+ }
183
+ protoOf(Companion).u31 = function (code) {
184
+ return this.s31_1.z2(code);
185
+ };
186
+ var Companion_instance;
187
+ function Companion_getInstance() {
188
+ Codes_initEntries();
189
+ if (Companion_instance == null)
190
+ new Companion();
191
+ return Companion_instance;
192
+ }
193
+ function values() {
194
+ return [Codes_NORMAL_getInstance(), Codes_GOING_AWAY_getInstance(), Codes_PROTOCOL_ERROR_getInstance(), Codes_CANNOT_ACCEPT_getInstance(), Codes_CLOSED_ABNORMALLY_getInstance(), Codes_NOT_CONSISTENT_getInstance(), Codes_VIOLATED_POLICY_getInstance(), Codes_TOO_BIG_getInstance(), Codes_NO_EXTENSION_getInstance(), Codes_INTERNAL_ERROR_getInstance(), Codes_SERVICE_RESTART_getInstance(), Codes_TRY_AGAIN_LATER_getInstance()];
195
+ }
196
+ function get_entries() {
197
+ if ($ENTRIES == null)
198
+ $ENTRIES = enumEntries(values());
199
+ return $ENTRIES;
200
+ }
201
+ var Codes_entriesInitialized;
202
+ function Codes_initEntries() {
203
+ if (Codes_entriesInitialized)
204
+ return Unit_instance;
205
+ Codes_entriesInitialized = true;
206
+ Codes_NORMAL_instance = new Codes('NORMAL', 0, 1000);
207
+ Codes_GOING_AWAY_instance = new Codes('GOING_AWAY', 1, 1001);
208
+ Codes_PROTOCOL_ERROR_instance = new Codes('PROTOCOL_ERROR', 2, 1002);
209
+ Codes_CANNOT_ACCEPT_instance = new Codes('CANNOT_ACCEPT', 3, 1003);
210
+ Codes_CLOSED_ABNORMALLY_instance = new Codes('CLOSED_ABNORMALLY', 4, 1006);
211
+ Codes_NOT_CONSISTENT_instance = new Codes('NOT_CONSISTENT', 5, 1007);
212
+ Codes_VIOLATED_POLICY_instance = new Codes('VIOLATED_POLICY', 6, 1008);
213
+ Codes_TOO_BIG_instance = new Codes('TOO_BIG', 7, 1009);
214
+ Codes_NO_EXTENSION_instance = new Codes('NO_EXTENSION', 8, 1010);
215
+ Codes_INTERNAL_ERROR_instance = new Codes('INTERNAL_ERROR', 9, 1011);
216
+ Codes_SERVICE_RESTART_instance = new Codes('SERVICE_RESTART', 10, 1012);
217
+ Codes_TRY_AGAIN_LATER_instance = new Codes('TRY_AGAIN_LATER', 11, 1013);
218
+ Companion_getInstance();
219
+ }
220
+ var $ENTRIES;
221
+ function CloseReason_init_$Init$(code, message, $this) {
222
+ CloseReason.call($this, code.r31_1, message);
223
+ return $this;
224
+ }
225
+ function CloseReason_init_$Create$(code, message) {
226
+ return CloseReason_init_$Init$(code, message, objectCreate(protoOf(CloseReason)));
227
+ }
228
+ function Codes(name, ordinal, code) {
229
+ Enum.call(this, name, ordinal);
230
+ this.r31_1 = code;
231
+ }
232
+ function Codes_NORMAL_getInstance() {
233
+ Codes_initEntries();
234
+ return Codes_NORMAL_instance;
235
+ }
236
+ function Codes_GOING_AWAY_getInstance() {
237
+ Codes_initEntries();
238
+ return Codes_GOING_AWAY_instance;
239
+ }
240
+ function Codes_PROTOCOL_ERROR_getInstance() {
241
+ Codes_initEntries();
242
+ return Codes_PROTOCOL_ERROR_instance;
243
+ }
244
+ function Codes_CANNOT_ACCEPT_getInstance() {
245
+ Codes_initEntries();
246
+ return Codes_CANNOT_ACCEPT_instance;
247
+ }
248
+ function Codes_CLOSED_ABNORMALLY_getInstance() {
249
+ Codes_initEntries();
250
+ return Codes_CLOSED_ABNORMALLY_instance;
251
+ }
252
+ function Codes_NOT_CONSISTENT_getInstance() {
253
+ Codes_initEntries();
254
+ return Codes_NOT_CONSISTENT_instance;
255
+ }
256
+ function Codes_VIOLATED_POLICY_getInstance() {
257
+ Codes_initEntries();
258
+ return Codes_VIOLATED_POLICY_instance;
259
+ }
260
+ function Codes_TOO_BIG_getInstance() {
261
+ Codes_initEntries();
262
+ return Codes_TOO_BIG_instance;
263
+ }
264
+ function Codes_NO_EXTENSION_getInstance() {
265
+ Codes_initEntries();
266
+ return Codes_NO_EXTENSION_instance;
267
+ }
268
+ function Codes_INTERNAL_ERROR_getInstance() {
269
+ Codes_initEntries();
270
+ return Codes_INTERNAL_ERROR_instance;
271
+ }
272
+ function Codes_SERVICE_RESTART_getInstance() {
273
+ Codes_initEntries();
274
+ return Codes_SERVICE_RESTART_instance;
275
+ }
276
+ function Codes_TRY_AGAIN_LATER_getInstance() {
277
+ Codes_initEntries();
278
+ return Codes_TRY_AGAIN_LATER_instance;
279
+ }
280
+ function CloseReason(code, message) {
281
+ this.v31_1 = code;
282
+ this.w31_1 = message;
283
+ }
284
+ protoOf(CloseReason).x31 = function () {
285
+ return Companion_getInstance().u31(this.v31_1);
286
+ };
287
+ protoOf(CloseReason).toString = function () {
288
+ var tmp0_elvis_lhs = this.x31();
289
+ return 'CloseReason(reason=' + toString(tmp0_elvis_lhs == null ? this.v31_1 : tmp0_elvis_lhs) + ', message=' + this.w31_1 + ')';
290
+ };
291
+ protoOf(CloseReason).hashCode = function () {
292
+ var result = this.v31_1;
293
+ result = imul(result, 31) + getStringHashCode(this.w31_1) | 0;
294
+ return result;
295
+ };
296
+ protoOf(CloseReason).equals = function (other) {
297
+ if (this === other)
298
+ return true;
299
+ if (!(other instanceof CloseReason))
300
+ return false;
301
+ if (!(this.v31_1 === other.v31_1))
302
+ return false;
303
+ if (!(this.w31_1 === other.w31_1))
304
+ return false;
305
+ return true;
306
+ };
307
+ function get_LOGGER() {
308
+ _init_properties_DefaultWebSocketSession_kt__469s0y();
309
+ return LOGGER;
310
+ }
311
+ var LOGGER;
312
+ function get_IncomingProcessorCoroutineName() {
313
+ _init_properties_DefaultWebSocketSession_kt__469s0y();
314
+ return IncomingProcessorCoroutineName;
315
+ }
316
+ var IncomingProcessorCoroutineName;
317
+ function get_OutgoingProcessorCoroutineName() {
318
+ _init_properties_DefaultWebSocketSession_kt__469s0y();
319
+ return OutgoingProcessorCoroutineName;
320
+ }
321
+ var OutgoingProcessorCoroutineName;
322
+ function get_NORMAL_CLOSE() {
323
+ _init_properties_DefaultWebSocketSession_kt__469s0y();
324
+ return NORMAL_CLOSE;
325
+ }
326
+ var NORMAL_CLOSE;
327
+ var OUTGOING_CHANNEL_CONFIG;
328
+ function DefaultWebSocketSession() {
329
+ }
330
+ function DefaultWebSocketSession_0(session, pingIntervalMillis, timeoutMillis, channelsConfig) {
331
+ pingIntervalMillis = pingIntervalMillis === VOID ? 0n : pingIntervalMillis;
332
+ timeoutMillis = timeoutMillis === VOID ? 15000n : timeoutMillis;
333
+ channelsConfig = channelsConfig === VOID ? Companion_getInstance_2().e32_1 : channelsConfig;
334
+ _init_properties_DefaultWebSocketSession_kt__469s0y();
335
+ // Inline function 'kotlin.require' call
336
+ if (!!isInterface(session, DefaultWebSocketSession)) {
337
+ var message = 'Cannot wrap other DefaultWebSocketSession';
338
+ throw IllegalArgumentException_init_$Create$(toString(message));
339
+ }
340
+ return new DefaultWebSocketSessionImpl(session, pingIntervalMillis, timeoutMillis, channelsConfig.f32_1, channelsConfig.g32_1);
341
+ }
342
+ function runIncomingProcessor($this, ponger) {
343
+ var tmp = get_IncomingProcessorCoroutineName().lf(Dispatchers_getInstance().s12_1);
344
+ return launch($this, tmp, VOID, DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0($this, ponger, null));
345
+ }
346
+ function runOutgoingProcessor($this) {
347
+ var tmp = get_OutgoingProcessorCoroutineName().lf(Dispatchers_getInstance().s12_1);
348
+ var tmp_0 = CoroutineStart_UNDISPATCHED_getInstance();
349
+ return launch($this, tmp, tmp_0, DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0($this, null));
350
+ }
351
+ function outgoingProcessorLoop($this, $completion) {
352
+ var tmp = new $outgoingProcessorLoopCOROUTINE$($this, $completion);
353
+ tmp.l8_1 = Unit_instance;
354
+ tmp.m8_1 = null;
355
+ return tmp.r8();
356
+ }
357
+ function sendCloseSequence($this, reason, exception, $completion) {
358
+ var tmp = new $sendCloseSequenceCOROUTINE$($this, reason, exception, $completion);
359
+ tmp.l8_1 = Unit_instance;
360
+ tmp.m8_1 = null;
361
+ return tmp.r8();
362
+ }
363
+ function sendCloseSequence$default($this, reason, exception, $completion, $super) {
364
+ exception = exception === VOID ? null : exception;
365
+ return sendCloseSequence($this, reason, exception, $completion);
366
+ }
367
+ function tryClose($this) {
368
+ return $this.l33_1.atomicfu$compareAndSet(false, true);
369
+ }
370
+ function runOrCancelPinger($this) {
371
+ var interval = $this.o33_1;
372
+ var tmp;
373
+ if ($this.l33_1.kotlinx$atomicfu$value) {
374
+ tmp = null;
375
+ } else if (interval > 0n) {
376
+ var tmp_0 = $this.e33_1.c32();
377
+ var tmp_1 = $this.p33_1;
378
+ tmp = pinger($this, tmp_0, interval, tmp_1, DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0($this, null));
379
+ } else {
380
+ tmp = null;
381
+ }
382
+ var newPinger = tmp;
383
+ var tmp0_safe_receiver = $this.f33_1.atomicfu$getAndSet(newPinger);
384
+ if (tmp0_safe_receiver == null)
385
+ null;
386
+ else
387
+ tmp0_safe_receiver.i19();
388
+ var tmp2_safe_receiver = newPinger == null ? null : new ChannelResult(newPinger.b19(Companion_getInstance_0().r33_1));
389
+ if (tmp2_safe_receiver == null)
390
+ null;
391
+ else
392
+ _ChannelResult___get_isSuccess__impl__odq1z9(tmp2_safe_receiver.l17_1);
393
+ if ($this.l33_1.kotlinx$atomicfu$value && !(newPinger == null)) {
394
+ runOrCancelPinger($this);
395
+ }
396
+ }
397
+ function checkMaxFrameSize($this, packet, frame, $completion) {
398
+ var tmp = new $checkMaxFrameSizeCOROUTINE$($this, packet, frame, $completion);
399
+ tmp.l8_1 = Unit_instance;
400
+ tmp.m8_1 = null;
401
+ return tmp.r8();
402
+ }
403
+ function processIncomingExtensions($this, frame) {
404
+ // Inline function 'kotlin.collections.fold' call
405
+ var accumulator = frame;
406
+ var _iterator__ex2g4s = $this.e34().t();
407
+ while (_iterator__ex2g4s.u()) {
408
+ var element = _iterator__ex2g4s.v();
409
+ var current = accumulator;
410
+ accumulator = element.f34(current);
411
+ }
412
+ return accumulator;
413
+ }
414
+ function processOutgoingExtensions($this, frame) {
415
+ // Inline function 'kotlin.collections.fold' call
416
+ var accumulator = frame;
417
+ var _iterator__ex2g4s = $this.e34().t();
418
+ while (_iterator__ex2g4s.u()) {
419
+ var element = _iterator__ex2g4s.v();
420
+ var current = accumulator;
421
+ accumulator = element.g34(current);
422
+ }
423
+ return accumulator;
424
+ }
425
+ function Companion_0() {
426
+ Companion_instance_0 = this;
427
+ this.r33_1 = new Pong(new Int8Array(0), NonDisposableHandle_instance);
428
+ }
429
+ var Companion_instance_0;
430
+ function Companion_getInstance_0() {
431
+ if (Companion_instance_0 == null)
432
+ new Companion_0();
433
+ return Companion_instance_0;
434
+ }
435
+ function DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation) {
436
+ this.p34_1 = $incomingJob;
437
+ this.q34_1 = $outgoingJob;
438
+ this.r34_1 = this$0;
439
+ CoroutineImpl.call(this, resultContinuation);
440
+ }
441
+ protoOf(DefaultWebSocketSessionImpl$start$slambda).w1p = function ($this$launch, $completion) {
442
+ var tmp = this.x1p($this$launch, $completion);
443
+ tmp.l8_1 = Unit_instance;
444
+ tmp.m8_1 = null;
445
+ return tmp.r8();
446
+ };
447
+ protoOf(DefaultWebSocketSessionImpl$start$slambda).d9 = function (p1, $completion) {
448
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
449
+ };
450
+ protoOf(DefaultWebSocketSessionImpl$start$slambda).r8 = function () {
451
+ var suspendResult = this.l8_1;
452
+ $sm: do
453
+ try {
454
+ var tmp = this.j8_1;
455
+ switch (tmp) {
456
+ case 0:
457
+ this.k8_1 = 3;
458
+ this.j8_1 = 1;
459
+ suspendResult = this.p34_1.it(this);
460
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
461
+ return suspendResult;
462
+ }
463
+
464
+ continue $sm;
465
+ case 1:
466
+ this.j8_1 = 2;
467
+ suspendResult = this.q34_1.it(this);
468
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
469
+ return suspendResult;
470
+ }
471
+
472
+ continue $sm;
473
+ case 2:
474
+ this.r34_1.h33_1.mt();
475
+ return Unit_instance;
476
+ case 3:
477
+ throw this.m8_1;
478
+ }
479
+ } catch ($p) {
480
+ var e = $p;
481
+ if (this.k8_1 === 3) {
482
+ throw e;
483
+ } else {
484
+ this.j8_1 = this.k8_1;
485
+ this.m8_1 = e;
486
+ }
487
+ }
488
+ while (true);
489
+ };
490
+ protoOf(DefaultWebSocketSessionImpl$start$slambda).x1p = function ($this$launch, completion) {
491
+ var i = new DefaultWebSocketSessionImpl$start$slambda(this.p34_1, this.q34_1, this.r34_1, completion);
492
+ i.s34_1 = $this$launch;
493
+ return i;
494
+ };
495
+ function DefaultWebSocketSessionImpl$start$slambda_0($incomingJob, $outgoingJob, this$0, resultContinuation) {
496
+ var i = new DefaultWebSocketSessionImpl$start$slambda($incomingJob, $outgoingJob, this$0, resultContinuation);
497
+ var l = function ($this$launch, $completion) {
498
+ return i.w1p($this$launch, $completion);
499
+ };
500
+ l.$arity = 1;
501
+ return l;
502
+ }
503
+ function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation) {
504
+ this.b35_1 = this$0;
505
+ this.c35_1 = $ponger;
506
+ CoroutineImpl.call(this, resultContinuation);
507
+ }
508
+ protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).w1p = function ($this$launch, $completion) {
509
+ var tmp = this.x1p($this$launch, $completion);
510
+ tmp.l8_1 = Unit_instance;
511
+ tmp.m8_1 = null;
512
+ return tmp.r8();
513
+ };
514
+ protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).d9 = function (p1, $completion) {
515
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
516
+ };
517
+ protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).r8 = function () {
518
+ var suspendResult = this.l8_1;
519
+ $sm: do
520
+ try {
521
+ var tmp = this.j8_1;
522
+ switch (tmp) {
523
+ case 0:
524
+ this.k8_1 = 39;
525
+ this.n35_1 = null;
526
+ this.g35_1 = null;
527
+ this.f35_1 = false;
528
+ this.h35_1 = Unit_instance;
529
+ this.j8_1 = 1;
530
+ continue $sm;
531
+ case 1:
532
+ this.j8_1 = 2;
533
+ continue $sm;
534
+ case 2:
535
+ this.k8_1 = 33;
536
+ this.k8_1 = 32;
537
+ this.r35_1 = this.b35_1.e33_1.b32();
538
+ this.j8_1 = 3;
539
+ continue $sm;
540
+ case 3:
541
+ this.k35_1 = this.r35_1;
542
+ this.j35_1 = null;
543
+ this.j8_1 = 4;
544
+ continue $sm;
545
+ case 4:
546
+ this.j8_1 = 5;
547
+ continue $sm;
548
+ case 5:
549
+ this.j8_1 = 6;
550
+ continue $sm;
551
+ case 6:
552
+ this.k8_1 = 29;
553
+ this.k8_1 = 28;
554
+ this.q35_1 = this.k35_1.t();
555
+ this.j8_1 = 7;
556
+ continue $sm;
557
+ case 7:
558
+ this.j8_1 = 8;
559
+ suspendResult = this.q35_1.d17(this);
560
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
561
+ return suspendResult;
562
+ }
563
+
564
+ continue $sm;
565
+ case 8:
566
+ if (!suspendResult) {
567
+ this.j8_1 = 26;
568
+ continue $sm;
569
+ }
570
+
571
+ var e = this.q35_1.v();
572
+ this.p35_1 = e;
573
+ this.j8_1 = 9;
574
+ continue $sm;
575
+ case 9:
576
+ this.o35_1 = this.p35_1;
577
+ var this_0 = get_LOGGER();
578
+ if (get_isTraceEnabled(this_0)) {
579
+ this_0.r2i('WebSocketSession(' + toString(this.d35_1) + ') receiving frame ' + this.o35_1.toString());
580
+ }
581
+
582
+ var tmp0_subject = this.o35_1;
583
+ if (tmp0_subject instanceof Close) {
584
+ if (!this.b35_1.c32().f17()) {
585
+ this.j8_1 = 18;
586
+ var tmp_0 = this.b35_1.c32();
587
+ var tmp1_elvis_lhs = readReason(this.o35_1);
588
+ suspendResult = tmp_0.a19(Close_init_$Create$(tmp1_elvis_lhs == null ? get_NORMAL_CLOSE() : tmp1_elvis_lhs), this);
589
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
590
+ return suspendResult;
591
+ }
592
+ continue $sm;
593
+ } else {
594
+ this.j8_1 = 19;
595
+ continue $sm;
596
+ }
597
+ } else {
598
+ if (tmp0_subject instanceof Pong) {
599
+ var tmp2_safe_receiver = this.b35_1.f33_1.kotlinx$atomicfu$value;
600
+ if (tmp2_safe_receiver == null) {
601
+ this.m35_1 = null;
602
+ this.j8_1 = 17;
603
+ continue $sm;
604
+ } else {
605
+ this.j8_1 = 16;
606
+ suspendResult = tmp2_safe_receiver.a19(this.o35_1, this);
607
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
608
+ return suspendResult;
609
+ }
610
+ continue $sm;
611
+ }
612
+ } else {
613
+ if (tmp0_subject instanceof Ping) {
614
+ this.j8_1 = 15;
615
+ suspendResult = this.c35_1.a19(this.o35_1, this);
616
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
617
+ return suspendResult;
618
+ }
619
+ continue $sm;
620
+ } else {
621
+ this.j8_1 = 10;
622
+ suspendResult = checkMaxFrameSize(this.b35_1, this.g35_1, this.o35_1, this);
623
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
624
+ return suspendResult;
625
+ }
626
+ continue $sm;
627
+ }
628
+ }
629
+ }
630
+
631
+ case 10:
632
+ if (!this.o35_1.s35_1) {
633
+ if (this.n35_1 == null) {
634
+ this.n35_1 = this.o35_1;
635
+ }
636
+ if (this.g35_1 == null) {
637
+ this.g35_1 = BytePacketBuilder();
638
+ }
639
+ writeFully(this.g35_1, this.o35_1.u35_1);
640
+ this.j8_1 = 21;
641
+ continue $sm;
642
+ } else {
643
+ this.j8_1 = 11;
644
+ continue $sm;
645
+ }
646
+
647
+ case 11:
648
+ if (this.n35_1 == null) {
649
+ this.j8_1 = 14;
650
+ suspendResult = this.b35_1.j33_1.a19(processIncomingExtensions(this.b35_1, this.o35_1), this);
651
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
652
+ return suspendResult;
653
+ }
654
+ continue $sm;
655
+ } else {
656
+ this.j8_1 = 12;
657
+ continue $sm;
658
+ }
659
+
660
+ case 12:
661
+ writeFully(ensureNotNull(this.g35_1), this.o35_1.u35_1);
662
+ var defragmented = Companion_getInstance_5().a36(true, this.n35_1.t35_1, readByteArray(build(this.g35_1)), this.n35_1.w35_1, this.n35_1.x35_1, this.n35_1.y35_1);
663
+ this.n35_1 = null;
664
+ this.j8_1 = 13;
665
+ suspendResult = this.b35_1.j33_1.a19(processIncomingExtensions(this.b35_1, defragmented), this);
666
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
667
+ return suspendResult;
668
+ }
669
+
670
+ continue $sm;
671
+ case 13:
672
+ var tmp_1 = this;
673
+ tmp_1.l35_1 = Unit_instance;
674
+ this.j8_1 = 20;
675
+ continue $sm;
676
+ case 14:
677
+ this.j8_1 = 21;
678
+ continue $sm;
679
+ case 15:
680
+ var tmp_2 = this;
681
+ tmp_2.l35_1 = Unit_instance;
682
+ this.j8_1 = 20;
683
+ continue $sm;
684
+ case 16:
685
+ var tmp_3 = this;
686
+ tmp_3.m35_1 = Unit_instance;
687
+ this.j8_1 = 17;
688
+ continue $sm;
689
+ case 17:
690
+ this.l35_1 = this.m35_1;
691
+ this.j8_1 = 20;
692
+ continue $sm;
693
+ case 18:
694
+ this.j8_1 = 19;
695
+ continue $sm;
696
+ case 19:
697
+ this.f35_1 = true;
698
+ this.j8_1 = 22;
699
+ var tmp_4 = this;
700
+ continue $sm;
701
+ case 20:
702
+ if (false) {
703
+ this.j8_1 = 9;
704
+ continue $sm;
705
+ }
706
+
707
+ this.j8_1 = 21;
708
+ continue $sm;
709
+ case 21:
710
+ this.j8_1 = 7;
711
+ continue $sm;
712
+ case 22:
713
+ this.k8_1 = 32;
714
+ cancelConsumed(this.k35_1, this.j35_1);
715
+ this.k8_1 = 39;
716
+ this.j8_1 = 23;
717
+ continue $sm;
718
+ case 23:
719
+ this.k8_1 = 39;
720
+ this.c35_1.i19();
721
+ var tmp0_safe_receiver = this.g35_1;
722
+ if (tmp0_safe_receiver == null)
723
+ null;
724
+ else {
725
+ tmp0_safe_receiver.j4();
726
+ }
727
+
728
+ this.b35_1.j33_1.i19();
729
+ if (!this.f35_1) {
730
+ this.j8_1 = 24;
731
+ suspendResult = close(this.b35_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
732
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
733
+ return suspendResult;
734
+ }
735
+ continue $sm;
736
+ } else {
737
+ this.j8_1 = 25;
738
+ continue $sm;
739
+ }
740
+
741
+ case 24:
742
+ this.j8_1 = 25;
743
+ continue $sm;
744
+ case 25:
745
+ var tmp_5 = this;
746
+ return Unit_instance;
747
+ case 26:
748
+ this.j8_1 = 27;
749
+ var tmp_6 = this;
750
+ continue $sm;
751
+ case 27:
752
+ this.k8_1 = 32;
753
+ cancelConsumed(this.k35_1, this.j35_1);
754
+ this.j8_1 = 31;
755
+ continue $sm;
756
+ case 28:
757
+ this.k8_1 = 29;
758
+ var tmp_7 = this.m8_1;
759
+ if (tmp_7 instanceof Error) {
760
+ var e_0 = this.m8_1;
761
+ var tmp_8 = this;
762
+ this.j35_1 = e_0;
763
+ throw e_0;
764
+ } else {
765
+ throw this.m8_1;
766
+ }
767
+
768
+ case 29:
769
+ this.k8_1 = 32;
770
+ var t = this.m8_1;
771
+ cancelConsumed(this.k35_1, this.j35_1);
772
+ throw t;
773
+ case 30:
774
+ this.k8_1 = 32;
775
+ cancelConsumed(this.k35_1, this.j35_1);
776
+ if (false) {
777
+ this.j8_1 = 3;
778
+ continue $sm;
779
+ }
780
+
781
+ this.j8_1 = 31;
782
+ continue $sm;
783
+ case 31:
784
+ this.h35_1 = Unit_instance;
785
+ this.k8_1 = 39;
786
+ this.j8_1 = 36;
787
+ continue $sm;
788
+ case 32:
789
+ this.k8_1 = 33;
790
+ var tmp_9 = this.m8_1;
791
+ if (tmp_9 instanceof ClosedSendChannelException) {
792
+ var _unused_var__etf5q3 = this.m8_1;
793
+ var tmp_10 = this;
794
+ tmp_10.h35_1 = Unit_instance;
795
+ this.k8_1 = 39;
796
+ this.j8_1 = 36;
797
+ continue $sm;
798
+ } else {
799
+ var tmp_11 = this.m8_1;
800
+ if (tmp_11 instanceof Error) {
801
+ var cause = this.m8_1;
802
+ var tmp_12 = this;
803
+ this.c35_1.i19();
804
+ tmp_12.h35_1 = this.b35_1.j33_1.g19(cause);
805
+ this.k8_1 = 39;
806
+ this.j8_1 = 36;
807
+ continue $sm;
808
+ } else {
809
+ throw this.m8_1;
810
+ }
811
+ }
812
+
813
+ case 33:
814
+ this.k8_1 = 39;
815
+ this.i35_1 = this.m8_1;
816
+ this.c35_1.i19();
817
+ var tmp0_safe_receiver_0 = this.g35_1;
818
+ if (tmp0_safe_receiver_0 == null)
819
+ null;
820
+ else {
821
+ tmp0_safe_receiver_0.j4();
822
+ }
823
+
824
+ this.b35_1.j33_1.i19();
825
+ if (!this.f35_1) {
826
+ this.j8_1 = 34;
827
+ suspendResult = close(this.b35_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
828
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
829
+ return suspendResult;
830
+ }
831
+ continue $sm;
832
+ } else {
833
+ this.j8_1 = 35;
834
+ continue $sm;
835
+ }
836
+
837
+ case 34:
838
+ this.j8_1 = 35;
839
+ continue $sm;
840
+ case 35:
841
+ throw this.i35_1;
842
+ case 36:
843
+ this.e35_1 = this.h35_1;
844
+ this.k8_1 = 39;
845
+ this.c35_1.i19();
846
+ var tmp0_safe_receiver_1 = this.g35_1;
847
+ if (tmp0_safe_receiver_1 == null)
848
+ null;
849
+ else {
850
+ tmp0_safe_receiver_1.j4();
851
+ }
852
+
853
+ this.b35_1.j33_1.i19();
854
+ if (!this.f35_1) {
855
+ this.j8_1 = 37;
856
+ suspendResult = close(this.b35_1, CloseReason_init_$Create$(Codes_CLOSED_ABNORMALLY_getInstance(), 'Connection was closed without close frame'), this);
857
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
858
+ return suspendResult;
859
+ }
860
+ continue $sm;
861
+ } else {
862
+ this.j8_1 = 38;
863
+ continue $sm;
864
+ }
865
+
866
+ case 37:
867
+ this.j8_1 = 38;
868
+ continue $sm;
869
+ case 38:
870
+ return Unit_instance;
871
+ case 39:
872
+ throw this.m8_1;
873
+ }
874
+ } catch ($p) {
875
+ var e_1 = $p;
876
+ if (this.k8_1 === 39) {
877
+ throw e_1;
878
+ } else {
879
+ this.j8_1 = this.k8_1;
880
+ this.m8_1 = e_1;
881
+ }
882
+ }
883
+ while (true);
884
+ };
885
+ protoOf(DefaultWebSocketSessionImpl$runIncomingProcessor$slambda).x1p = function ($this$launch, completion) {
886
+ var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this.b35_1, this.c35_1, completion);
887
+ i.d35_1 = $this$launch;
888
+ return i;
889
+ };
890
+ function DefaultWebSocketSessionImpl$runIncomingProcessor$slambda_0(this$0, $ponger, resultContinuation) {
891
+ var i = new DefaultWebSocketSessionImpl$runIncomingProcessor$slambda(this$0, $ponger, resultContinuation);
892
+ var l = function ($this$launch, $completion) {
893
+ return i.w1p($this$launch, $completion);
894
+ };
895
+ l.$arity = 1;
896
+ return l;
897
+ }
898
+ function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation) {
899
+ this.j36_1 = this$0;
900
+ CoroutineImpl.call(this, resultContinuation);
901
+ }
902
+ protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).w1p = function ($this$launch, $completion) {
903
+ var tmp = this.x1p($this$launch, $completion);
904
+ tmp.l8_1 = Unit_instance;
905
+ tmp.m8_1 = null;
906
+ return tmp.r8();
907
+ };
908
+ protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).d9 = function (p1, $completion) {
909
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
910
+ };
911
+ protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).r8 = function () {
912
+ var suspendResult = this.l8_1;
913
+ $sm: do
914
+ try {
915
+ var tmp = this.j8_1;
916
+ switch (tmp) {
917
+ case 0:
918
+ this.k8_1 = 13;
919
+ this.j8_1 = 1;
920
+ continue $sm;
921
+ case 1:
922
+ this.j8_1 = 2;
923
+ continue $sm;
924
+ case 2:
925
+ this.k8_1 = 9;
926
+ this.k8_1 = 4;
927
+ this.j8_1 = 3;
928
+ suspendResult = outgoingProcessorLoop(this.j36_1, this);
929
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
930
+ return suspendResult;
931
+ }
932
+
933
+ continue $sm;
934
+ case 3:
935
+ this.k8_1 = 13;
936
+ this.j8_1 = 11;
937
+ continue $sm;
938
+ case 4:
939
+ this.k8_1 = 9;
940
+ var tmp_0 = this.m8_1;
941
+ if (tmp_0 instanceof ClosedSendChannelException) {
942
+ var _unused_var__etf5q3 = this.m8_1;
943
+ this.k8_1 = 13;
944
+ this.j8_1 = 11;
945
+ continue $sm;
946
+ } else {
947
+ var tmp_1 = this.m8_1;
948
+ if (tmp_1 instanceof ClosedReceiveChannelException) {
949
+ var _unused_var__etf5q3_0 = this.m8_1;
950
+ this.k8_1 = 13;
951
+ this.j8_1 = 11;
952
+ continue $sm;
953
+ } else {
954
+ var tmp_2 = this.m8_1;
955
+ if (tmp_2 instanceof CancellationException) {
956
+ var _unused_var__etf5q3_1 = this.m8_1;
957
+ this.j8_1 = 5;
958
+ suspendResult = sendCloseSequence$default(this.j36_1, CloseReason_init_$Create$(Codes_NORMAL_getInstance(), ''), VOID, this);
959
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
960
+ return suspendResult;
961
+ }
962
+ continue $sm;
963
+ } else {
964
+ var tmp_3 = this.m8_1;
965
+ if (tmp_3 instanceof ChannelIOException) {
966
+ var _unused_var__etf5q3_2 = this.m8_1;
967
+ this.k8_1 = 13;
968
+ this.j8_1 = 11;
969
+ continue $sm;
970
+ } else {
971
+ var tmp_4 = this.m8_1;
972
+ if (tmp_4 instanceof Error) {
973
+ var cause = this.m8_1;
974
+ this.j36_1.k33_1.lt(CancellationException_init_$Create$('Failed to send frame', cause));
975
+ this.j8_1 = 6;
976
+ suspendResult = closeExceptionally(this.j36_1.e33_1, cause, this);
977
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
978
+ return suspendResult;
979
+ }
980
+ continue $sm;
981
+ } else {
982
+ throw this.m8_1;
983
+ }
984
+ }
985
+ }
986
+ }
987
+ }
988
+
989
+ case 5:
990
+ this.k8_1 = 13;
991
+ this.j8_1 = 11;
992
+ continue $sm;
993
+ case 6:
994
+ this.k8_1 = 13;
995
+ this.j8_1 = 7;
996
+ continue $sm;
997
+ case 7:
998
+ this.k8_1 = 13;
999
+ this.j36_1.k33_1.k19();
1000
+ this.j8_1 = 8;
1001
+ suspendResult = close(this.j36_1.e33_1, VOID, this);
1002
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1003
+ return suspendResult;
1004
+ }
1005
+
1006
+ continue $sm;
1007
+ case 8:
1008
+ return Unit_instance;
1009
+ case 9:
1010
+ this.k8_1 = 13;
1011
+ this.l36_1 = this.m8_1;
1012
+ this.j36_1.k33_1.k19();
1013
+ this.j8_1 = 10;
1014
+ suspendResult = close(this.j36_1.e33_1, VOID, this);
1015
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1016
+ return suspendResult;
1017
+ }
1018
+
1019
+ continue $sm;
1020
+ case 10:
1021
+ throw this.l36_1;
1022
+ case 11:
1023
+ this.k8_1 = 13;
1024
+ this.j36_1.k33_1.k19();
1025
+ this.j8_1 = 12;
1026
+ suspendResult = close(this.j36_1.e33_1, VOID, this);
1027
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1028
+ return suspendResult;
1029
+ }
1030
+
1031
+ continue $sm;
1032
+ case 12:
1033
+ return Unit_instance;
1034
+ case 13:
1035
+ throw this.m8_1;
1036
+ }
1037
+ } catch ($p) {
1038
+ var e = $p;
1039
+ if (this.k8_1 === 13) {
1040
+ throw e;
1041
+ } else {
1042
+ this.j8_1 = this.k8_1;
1043
+ this.m8_1 = e;
1044
+ }
1045
+ }
1046
+ while (true);
1047
+ };
1048
+ protoOf(DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda).x1p = function ($this$launch, completion) {
1049
+ var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this.j36_1, completion);
1050
+ i.k36_1 = $this$launch;
1051
+ return i;
1052
+ };
1053
+ function DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda_0(this$0, resultContinuation) {
1054
+ var i = new DefaultWebSocketSessionImpl$runOutgoingProcessor$slambda(this$0, resultContinuation);
1055
+ var l = function ($this$launch, $completion) {
1056
+ return i.w1p($this$launch, $completion);
1057
+ };
1058
+ l.$arity = 1;
1059
+ return l;
1060
+ }
1061
+ function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation) {
1062
+ this.u36_1 = this$0;
1063
+ CoroutineImpl.call(this, resultContinuation);
1064
+ }
1065
+ protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).w36 = function (it, $completion) {
1066
+ var tmp = this.x36(it, $completion);
1067
+ tmp.l8_1 = Unit_instance;
1068
+ tmp.m8_1 = null;
1069
+ return tmp.r8();
1070
+ };
1071
+ protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).d9 = function (p1, $completion) {
1072
+ return this.w36(p1 instanceof CloseReason ? p1 : THROW_CCE(), $completion);
1073
+ };
1074
+ protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).r8 = function () {
1075
+ var suspendResult = this.l8_1;
1076
+ $sm: do
1077
+ try {
1078
+ var tmp = this.j8_1;
1079
+ switch (tmp) {
1080
+ case 0:
1081
+ this.k8_1 = 2;
1082
+ this.j8_1 = 1;
1083
+ suspendResult = sendCloseSequence(this.u36_1, this.v36_1, IOException_init_$Create$('Ping timeout'), this);
1084
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1085
+ return suspendResult;
1086
+ }
1087
+
1088
+ continue $sm;
1089
+ case 1:
1090
+ return Unit_instance;
1091
+ case 2:
1092
+ throw this.m8_1;
1093
+ }
1094
+ } catch ($p) {
1095
+ var e = $p;
1096
+ if (this.k8_1 === 2) {
1097
+ throw e;
1098
+ } else {
1099
+ this.j8_1 = this.k8_1;
1100
+ this.m8_1 = e;
1101
+ }
1102
+ }
1103
+ while (true);
1104
+ };
1105
+ protoOf(DefaultWebSocketSessionImpl$runOrCancelPinger$slambda).x36 = function (it, completion) {
1106
+ var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this.u36_1, completion);
1107
+ i.v36_1 = it;
1108
+ return i;
1109
+ };
1110
+ function DefaultWebSocketSessionImpl$runOrCancelPinger$slambda_0(this$0, resultContinuation) {
1111
+ var i = new DefaultWebSocketSessionImpl$runOrCancelPinger$slambda(this$0, resultContinuation);
1112
+ var l = function (it, $completion) {
1113
+ return i.w36(it, $completion);
1114
+ };
1115
+ l.$arity = 1;
1116
+ return l;
1117
+ }
1118
+ function $outgoingProcessorLoopCOROUTINE$(_this__u8e3s4, resultContinuation) {
1119
+ CoroutineImpl.call(this, resultContinuation);
1120
+ this.p32_1 = _this__u8e3s4;
1121
+ }
1122
+ protoOf($outgoingProcessorLoopCOROUTINE$).r8 = function () {
1123
+ var suspendResult = this.l8_1;
1124
+ $sm: do
1125
+ try {
1126
+ var tmp = this.j8_1;
1127
+ switch (tmp) {
1128
+ case 0:
1129
+ this.k8_1 = 7;
1130
+ this.r32_1 = this.p32_1.k33_1.t();
1131
+ this.j8_1 = 1;
1132
+ continue $sm;
1133
+ case 1:
1134
+ this.j8_1 = 2;
1135
+ suspendResult = this.r32_1.d17(this);
1136
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1137
+ return suspendResult;
1138
+ }
1139
+
1140
+ continue $sm;
1141
+ case 2:
1142
+ if (!suspendResult) {
1143
+ this.j8_1 = 6;
1144
+ continue $sm;
1145
+ }
1146
+
1147
+ var frame = this.r32_1.v();
1148
+ var this_0 = get_LOGGER();
1149
+ if (get_isTraceEnabled(this_0)) {
1150
+ this_0.r2i('Sending ' + frame.toString() + ' from session ' + toString(this.p32_1));
1151
+ }
1152
+
1153
+ if (frame instanceof Close) {
1154
+ this.j8_1 = 3;
1155
+ suspendResult = sendCloseSequence$default(this.p32_1, readReason(frame), VOID, this);
1156
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1157
+ return suspendResult;
1158
+ }
1159
+ continue $sm;
1160
+ } else {
1161
+ var tmp_0;
1162
+ if (frame instanceof Text) {
1163
+ tmp_0 = true;
1164
+ } else {
1165
+ tmp_0 = frame instanceof Binary;
1166
+ }
1167
+ if (tmp_0) {
1168
+ this.q32_1 = processOutgoingExtensions(this.p32_1, frame);
1169
+ this.j8_1 = 4;
1170
+ continue $sm;
1171
+ } else {
1172
+ this.q32_1 = frame;
1173
+ this.j8_1 = 4;
1174
+ continue $sm;
1175
+ }
1176
+ }
1177
+
1178
+ case 3:
1179
+ this.j8_1 = 6;
1180
+ var tmp_1 = this;
1181
+ continue $sm;
1182
+ case 4:
1183
+ var processedFrame = this.q32_1;
1184
+ this.j8_1 = 5;
1185
+ suspendResult = this.p32_1.e33_1.c32().a19(processedFrame, this);
1186
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1187
+ return suspendResult;
1188
+ }
1189
+
1190
+ continue $sm;
1191
+ case 5:
1192
+ this.j8_1 = 1;
1193
+ continue $sm;
1194
+ case 6:
1195
+ return Unit_instance;
1196
+ case 7:
1197
+ throw this.m8_1;
1198
+ }
1199
+ } catch ($p) {
1200
+ var e = $p;
1201
+ if (this.k8_1 === 7) {
1202
+ throw e;
1203
+ } else {
1204
+ this.j8_1 = this.k8_1;
1205
+ this.m8_1 = e;
1206
+ }
1207
+ }
1208
+ while (true);
1209
+ };
1210
+ function $sendCloseSequenceCOROUTINE$(_this__u8e3s4, reason, exception, resultContinuation) {
1211
+ CoroutineImpl.call(this, resultContinuation);
1212
+ this.a33_1 = _this__u8e3s4;
1213
+ this.b33_1 = reason;
1214
+ this.c33_1 = exception;
1215
+ }
1216
+ protoOf($sendCloseSequenceCOROUTINE$).r8 = function () {
1217
+ var suspendResult = this.l8_1;
1218
+ $sm: do
1219
+ try {
1220
+ var tmp = this.j8_1;
1221
+ switch (tmp) {
1222
+ case 0:
1223
+ this.k8_1 = 6;
1224
+ if (!tryClose(this.a33_1))
1225
+ return Unit_instance;
1226
+ var this_0 = get_LOGGER();
1227
+ if (get_isTraceEnabled(this_0)) {
1228
+ this_0.r2i('Sending Close Sequence for session ' + toString(this.a33_1) + ' with reason ' + toString_0(this.b33_1) + ' and exception ' + toString_0(this.c33_1));
1229
+ }
1230
+
1231
+ this.a33_1.h33_1.uy();
1232
+ var tmp_0 = this;
1233
+ var tmp0_elvis_lhs = this.b33_1;
1234
+ tmp_0.d33_1 = tmp0_elvis_lhs == null ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : tmp0_elvis_lhs;
1235
+ this.j8_1 = 1;
1236
+ continue $sm;
1237
+ case 1:
1238
+ this.k8_1 = 5;
1239
+ runOrCancelPinger(this.a33_1);
1240
+ if (!(this.d33_1.v31_1 === Codes_CLOSED_ABNORMALLY_getInstance().r31_1)) {
1241
+ this.j8_1 = 2;
1242
+ suspendResult = this.a33_1.e33_1.c32().a19(Close_init_$Create$(this.d33_1), this);
1243
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1244
+ return suspendResult;
1245
+ }
1246
+ continue $sm;
1247
+ } else {
1248
+ this.j8_1 = 3;
1249
+ continue $sm;
1250
+ }
1251
+
1252
+ case 2:
1253
+ this.j8_1 = 3;
1254
+ continue $sm;
1255
+ case 3:
1256
+ this.k8_1 = 6;
1257
+ this.j8_1 = 4;
1258
+ continue $sm;
1259
+ case 4:
1260
+ this.k8_1 = 6;
1261
+ this.a33_1.g33_1.sy(this.d33_1);
1262
+ if (!(this.c33_1 == null)) {
1263
+ this.a33_1.k33_1.g19(this.c33_1);
1264
+ this.a33_1.j33_1.g19(this.c33_1);
1265
+ }
1266
+
1267
+ return Unit_instance;
1268
+ case 5:
1269
+ this.k8_1 = 6;
1270
+ var t = this.m8_1;
1271
+ this.a33_1.g33_1.sy(this.d33_1);
1272
+ if (!(this.c33_1 == null)) {
1273
+ this.a33_1.k33_1.g19(this.c33_1);
1274
+ this.a33_1.j33_1.g19(this.c33_1);
1275
+ }
1276
+
1277
+ throw t;
1278
+ case 6:
1279
+ throw this.m8_1;
1280
+ }
1281
+ } catch ($p) {
1282
+ var e = $p;
1283
+ if (this.k8_1 === 6) {
1284
+ throw e;
1285
+ } else {
1286
+ this.j8_1 = this.k8_1;
1287
+ this.m8_1 = e;
1288
+ }
1289
+ }
1290
+ while (true);
1291
+ };
1292
+ function $checkMaxFrameSizeCOROUTINE$(_this__u8e3s4, packet, frame, resultContinuation) {
1293
+ CoroutineImpl.call(this, resultContinuation);
1294
+ this.a34_1 = _this__u8e3s4;
1295
+ this.b34_1 = packet;
1296
+ this.c34_1 = frame;
1297
+ }
1298
+ protoOf($checkMaxFrameSizeCOROUTINE$).r8 = function () {
1299
+ var suspendResult = this.l8_1;
1300
+ $sm: do
1301
+ try {
1302
+ var tmp = this.j8_1;
1303
+ switch (tmp) {
1304
+ case 0:
1305
+ this.k8_1 = 3;
1306
+ var tmp_0 = this;
1307
+ var tmp_1 = this.c34_1.u35_1.length;
1308
+ var tmp0_safe_receiver = this.b34_1;
1309
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_size(tmp0_safe_receiver);
1310
+ tmp_0.d34_1 = tmp_1 + (tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs) | 0;
1311
+ if (fromInt(this.d34_1) > this.a34_1.a32()) {
1312
+ var tmp2_safe_receiver = this.b34_1;
1313
+ if (tmp2_safe_receiver == null)
1314
+ null;
1315
+ else {
1316
+ tmp2_safe_receiver.j4();
1317
+ }
1318
+ this.j8_1 = 2;
1319
+ suspendResult = close(this.a34_1, CloseReason_init_$Create$(Codes_TOO_BIG_getInstance(), 'Frame is too big: ' + this.d34_1 + '. Max size is ' + this.a34_1.a32().toString()), this);
1320
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1321
+ return suspendResult;
1322
+ }
1323
+ continue $sm;
1324
+ } else {
1325
+ this.j8_1 = 1;
1326
+ continue $sm;
1327
+ }
1328
+
1329
+ case 1:
1330
+ return Unit_instance;
1331
+ case 2:
1332
+ throw new FrameTooBigException(fromInt(this.d34_1));
1333
+ case 3:
1334
+ throw this.m8_1;
1335
+ }
1336
+ } catch ($p) {
1337
+ var e = $p;
1338
+ if (this.k8_1 === 3) {
1339
+ throw e;
1340
+ } else {
1341
+ this.j8_1 = this.k8_1;
1342
+ this.m8_1 = e;
1343
+ }
1344
+ }
1345
+ while (true);
1346
+ };
1347
+ function DefaultWebSocketSessionImpl(raw, pingIntervalMillis, timeoutMillis, incomingFramesConfig, outgoingFramesConfig) {
1348
+ Companion_getInstance_0();
1349
+ this.e33_1 = raw;
1350
+ this.f33_1 = atomic$ref$1(null);
1351
+ this.g33_1 = CompletableDeferred();
1352
+ this.h33_1 = Job();
1353
+ this.i33_1 = this.e33_1.cs().jf(Key_instance).lf(this.h33_1).lf(new CoroutineName('ws-default'));
1354
+ this.j33_1 = from(Factory_getInstance(), incomingFramesConfig);
1355
+ this.k33_1 = from(Factory_getInstance(), outgoingFramesConfig);
1356
+ this.l33_1 = atomic$boolean$1(false);
1357
+ var tmp = this;
1358
+ // Inline function 'kotlin.collections.mutableListOf' call
1359
+ tmp.m33_1 = ArrayList_init_$Create$();
1360
+ this.n33_1 = atomic$boolean$1(false);
1361
+ this.o33_1 = pingIntervalMillis;
1362
+ this.p33_1 = timeoutMillis;
1363
+ this.q33_1 = this.g33_1;
1364
+ }
1365
+ protoOf(DefaultWebSocketSessionImpl).cs = function () {
1366
+ return this.i33_1;
1367
+ };
1368
+ protoOf(DefaultWebSocketSessionImpl).b32 = function () {
1369
+ return this.j33_1;
1370
+ };
1371
+ protoOf(DefaultWebSocketSessionImpl).c32 = function () {
1372
+ return this.k33_1;
1373
+ };
1374
+ protoOf(DefaultWebSocketSessionImpl).e34 = function () {
1375
+ return this.m33_1;
1376
+ };
1377
+ protoOf(DefaultWebSocketSessionImpl).z31 = function (value) {
1378
+ this.e33_1.z31(value);
1379
+ };
1380
+ protoOf(DefaultWebSocketSessionImpl).a32 = function () {
1381
+ return this.e33_1.a32();
1382
+ };
1383
+ protoOf(DefaultWebSocketSessionImpl).y31 = function (negotiatedExtensions) {
1384
+ if (!this.n33_1.atomicfu$compareAndSet(false, true)) {
1385
+ // Inline function 'kotlin.error' call
1386
+ var message = 'WebSocket session ' + toString(this) + ' is already started.';
1387
+ throw IllegalStateException_init_$Create$(toString(message));
1388
+ }
1389
+ // Inline function 'io.ktor.util.logging.trace' call
1390
+ var this_0 = get_LOGGER();
1391
+ if (get_isTraceEnabled(this_0)) {
1392
+ var tmp$ret$0 = 'Starting default WebSocketSession(' + toString(this) + ') ' + ('with negotiated extensions: ' + joinToString(negotiatedExtensions));
1393
+ this_0.r2i(tmp$ret$0);
1394
+ }
1395
+ this.m33_1.j1(negotiatedExtensions);
1396
+ runOrCancelPinger(this);
1397
+ var incomingJob = runIncomingProcessor(this, ponger(this, this.c32()));
1398
+ var outgoingJob = runOutgoingProcessor(this);
1399
+ launch(this, VOID, VOID, DefaultWebSocketSessionImpl$start$slambda_0(incomingJob, outgoingJob, this, null));
1400
+ };
1401
+ protoOf(DefaultWebSocketSessionImpl).q1g = function ($completion) {
1402
+ return this.e33_1.q1g($completion);
1403
+ };
1404
+ var properties_initialized_DefaultWebSocketSession_kt_6cjlhc;
1405
+ function _init_properties_DefaultWebSocketSession_kt__469s0y() {
1406
+ if (!properties_initialized_DefaultWebSocketSession_kt_6cjlhc) {
1407
+ properties_initialized_DefaultWebSocketSession_kt_6cjlhc = true;
1408
+ LOGGER = KtorSimpleLogger('io.ktor.websocket.WebSocket');
1409
+ IncomingProcessorCoroutineName = new CoroutineName('ws-incoming-processor');
1410
+ OutgoingProcessorCoroutineName = new CoroutineName('ws-outgoing-processor');
1411
+ NORMAL_CLOSE = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), 'OK');
1412
+ var tmp0_safe_receiver = get_OUTGOING_CHANNEL_CAPACITY();
1413
+ var tmp;
1414
+ if (tmp0_safe_receiver == null) {
1415
+ tmp = null;
1416
+ } else {
1417
+ // Inline function 'kotlin.let' call
1418
+ tmp = new ChannelConfig(tmp0_safe_receiver, ChannelOverflow_SUSPEND_getInstance());
1419
+ }
1420
+ OUTGOING_CHANNEL_CONFIG = tmp;
1421
+ }
1422
+ }
1423
+ function readReason(_this__u8e3s4) {
1424
+ if (_this__u8e3s4.u35_1.length < 2) {
1425
+ return null;
1426
+ }
1427
+ // Inline function 'io.ktor.utils.io.core.buildPacket' call
1428
+ var builder = new Buffer();
1429
+ writeFully(builder, _this__u8e3s4.u35_1);
1430
+ var packet = builder;
1431
+ var code = packet.ep();
1432
+ var message = readText(packet);
1433
+ return new CloseReason(code, message);
1434
+ }
1435
+ function NonDisposableHandle() {
1436
+ }
1437
+ protoOf(NonDisposableHandle).nv = function () {
1438
+ return Unit_instance;
1439
+ };
1440
+ protoOf(NonDisposableHandle).toString = function () {
1441
+ return 'NonDisposableHandle';
1442
+ };
1443
+ protoOf(NonDisposableHandle).hashCode = function () {
1444
+ return 207988788;
1445
+ };
1446
+ protoOf(NonDisposableHandle).equals = function (other) {
1447
+ if (this === other)
1448
+ return true;
1449
+ if (!(other instanceof NonDisposableHandle))
1450
+ return false;
1451
+ return true;
1452
+ };
1453
+ var NonDisposableHandle_instance;
1454
+ function NonDisposableHandle_getInstance() {
1455
+ return NonDisposableHandle_instance;
1456
+ }
1457
+ function FrameTooBigException(frameSize) {
1458
+ Exception_init_$Init$(this);
1459
+ captureStack(this, FrameTooBigException);
1460
+ this.y36_1 = frameSize;
1461
+ delete this.message;
1462
+ }
1463
+ protoOf(FrameTooBigException).e = function () {
1464
+ return 'Frame is too big: ' + this.y36_1.toString();
1465
+ };
1466
+ protoOf(FrameTooBigException).dz = function () {
1467
+ // Inline function 'kotlin.also' call
1468
+ var this_0 = new FrameTooBigException(this.y36_1);
1469
+ initCauseBridge(this_0, this);
1470
+ return this_0;
1471
+ };
1472
+ var FrameType_TEXT_instance;
1473
+ var FrameType_BINARY_instance;
1474
+ var FrameType_CLOSE_instance;
1475
+ var FrameType_PING_instance;
1476
+ var FrameType_PONG_instance;
1477
+ function Companion_1() {
1478
+ Companion_instance_1 = this;
1479
+ var tmp = this;
1480
+ var tmp0 = get_entries_0();
1481
+ var tmp$ret$0;
1482
+ $l$block_0: {
1483
+ // Inline function 'kotlin.collections.maxByOrNull' call
1484
+ var iterator = tmp0.t();
1485
+ if (!iterator.u()) {
1486
+ tmp$ret$0 = null;
1487
+ break $l$block_0;
1488
+ }
1489
+ var maxElem = iterator.v();
1490
+ if (!iterator.u()) {
1491
+ tmp$ret$0 = maxElem;
1492
+ break $l$block_0;
1493
+ }
1494
+ var maxValue = maxElem.c37_1;
1495
+ do {
1496
+ var e = iterator.v();
1497
+ var v = e.c37_1;
1498
+ if (compareTo(maxValue, v) < 0) {
1499
+ maxElem = e;
1500
+ maxValue = v;
1501
+ }
1502
+ }
1503
+ while (iterator.u());
1504
+ tmp$ret$0 = maxElem;
1505
+ }
1506
+ tmp.d37_1 = ensureNotNull(tmp$ret$0).c37_1;
1507
+ var tmp_0 = this;
1508
+ var tmp_1 = 0;
1509
+ var tmp_2 = this.d37_1 + 1 | 0;
1510
+ // Inline function 'kotlin.arrayOfNulls' call
1511
+ var tmp_3 = Array(tmp_2);
1512
+ while (tmp_1 < tmp_2) {
1513
+ var tmp_4 = tmp_1;
1514
+ var tmp0_0 = get_entries_0();
1515
+ var tmp$ret$5;
1516
+ $l$block_2: {
1517
+ // Inline function 'kotlin.collections.singleOrNull' call
1518
+ var single = null;
1519
+ var found = false;
1520
+ var _iterator__ex2g4s = tmp0_0.t();
1521
+ while (_iterator__ex2g4s.u()) {
1522
+ var element = _iterator__ex2g4s.v();
1523
+ if (element.c37_1 === tmp_4) {
1524
+ if (found) {
1525
+ tmp$ret$5 = null;
1526
+ break $l$block_2;
1527
+ }
1528
+ single = element;
1529
+ found = true;
1530
+ }
1531
+ }
1532
+ if (!found) {
1533
+ tmp$ret$5 = null;
1534
+ break $l$block_2;
1535
+ }
1536
+ tmp$ret$5 = single;
1537
+ }
1538
+ tmp_3[tmp_4] = tmp$ret$5;
1539
+ tmp_1 = tmp_1 + 1 | 0;
1540
+ }
1541
+ tmp_0.e37_1 = tmp_3;
1542
+ }
1543
+ var Companion_instance_1;
1544
+ function Companion_getInstance_1() {
1545
+ FrameType_initEntries();
1546
+ if (Companion_instance_1 == null)
1547
+ new Companion_1();
1548
+ return Companion_instance_1;
1549
+ }
1550
+ function values_0() {
1551
+ return [FrameType_TEXT_getInstance(), FrameType_BINARY_getInstance(), FrameType_CLOSE_getInstance(), FrameType_PING_getInstance(), FrameType_PONG_getInstance()];
1552
+ }
1553
+ function get_entries_0() {
1554
+ if ($ENTRIES_0 == null)
1555
+ $ENTRIES_0 = enumEntries(values_0());
1556
+ return $ENTRIES_0;
1557
+ }
1558
+ var FrameType_entriesInitialized;
1559
+ function FrameType_initEntries() {
1560
+ if (FrameType_entriesInitialized)
1561
+ return Unit_instance;
1562
+ FrameType_entriesInitialized = true;
1563
+ FrameType_TEXT_instance = new FrameType('TEXT', 0, false, 1);
1564
+ FrameType_BINARY_instance = new FrameType('BINARY', 1, false, 2);
1565
+ FrameType_CLOSE_instance = new FrameType('CLOSE', 2, true, 8);
1566
+ FrameType_PING_instance = new FrameType('PING', 3, true, 9);
1567
+ FrameType_PONG_instance = new FrameType('PONG', 4, true, 10);
1568
+ Companion_getInstance_1();
1569
+ }
1570
+ var $ENTRIES_0;
1571
+ function FrameType(name, ordinal, controlFrame, opcode) {
1572
+ Enum.call(this, name, ordinal);
1573
+ this.b37_1 = controlFrame;
1574
+ this.c37_1 = opcode;
1575
+ }
1576
+ function FrameType_TEXT_getInstance() {
1577
+ FrameType_initEntries();
1578
+ return FrameType_TEXT_instance;
1579
+ }
1580
+ function FrameType_BINARY_getInstance() {
1581
+ FrameType_initEntries();
1582
+ return FrameType_BINARY_instance;
1583
+ }
1584
+ function FrameType_CLOSE_getInstance() {
1585
+ FrameType_initEntries();
1586
+ return FrameType_CLOSE_instance;
1587
+ }
1588
+ function FrameType_PING_getInstance() {
1589
+ FrameType_initEntries();
1590
+ return FrameType_PING_instance;
1591
+ }
1592
+ function FrameType_PONG_getInstance() {
1593
+ FrameType_initEntries();
1594
+ return FrameType_PONG_instance;
1595
+ }
1596
+ function get_PongerCoroutineName() {
1597
+ _init_properties_PingPong_kt__9aqxey();
1598
+ return PongerCoroutineName;
1599
+ }
1600
+ var PongerCoroutineName;
1601
+ function get_PingerCoroutineName() {
1602
+ _init_properties_PingPong_kt__9aqxey();
1603
+ return PingerCoroutineName;
1604
+ }
1605
+ var PingerCoroutineName;
1606
+ function ponger(_this__u8e3s4, outgoing) {
1607
+ _init_properties_PingPong_kt__9aqxey();
1608
+ var channel = Channel(5);
1609
+ var tmp = get_PongerCoroutineName();
1610
+ launch(_this__u8e3s4, tmp, VOID, ponger$slambda_0(channel, outgoing, null));
1611
+ return channel;
1612
+ }
1613
+ function pinger(_this__u8e3s4, outgoing, periodMillis, timeoutMillis, onTimeout) {
1614
+ _init_properties_PingPong_kt__9aqxey();
1615
+ var actorJob = Job();
1616
+ var channel = Channel(2147483647);
1617
+ var tmp = actorJob.lf(get_PingerCoroutineName());
1618
+ launch(_this__u8e3s4, tmp, VOID, pinger$slambda_0(periodMillis, timeoutMillis, onTimeout, channel, outgoing, null));
1619
+ var tmp_0 = ensureNotNull(_this__u8e3s4.cs().w8(Key_instance));
1620
+ tmp_0.et(pinger$lambda(actorJob));
1621
+ return channel;
1622
+ }
1623
+ function ponger$slambda($channel, $outgoing, resultContinuation) {
1624
+ this.n37_1 = $channel;
1625
+ this.o37_1 = $outgoing;
1626
+ CoroutineImpl.call(this, resultContinuation);
1627
+ }
1628
+ protoOf(ponger$slambda).w1p = function ($this$launch, $completion) {
1629
+ var tmp = this.x1p($this$launch, $completion);
1630
+ tmp.l8_1 = Unit_instance;
1631
+ tmp.m8_1 = null;
1632
+ return tmp.r8();
1633
+ };
1634
+ protoOf(ponger$slambda).d9 = function (p1, $completion) {
1635
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1636
+ };
1637
+ protoOf(ponger$slambda).r8 = function () {
1638
+ var suspendResult = this.l8_1;
1639
+ $sm: do
1640
+ try {
1641
+ var tmp = this.j8_1;
1642
+ switch (tmp) {
1643
+ case 0:
1644
+ this.k8_1 = 14;
1645
+ this.k8_1 = 13;
1646
+ this.t37_1 = this.n37_1;
1647
+ this.j8_1 = 1;
1648
+ continue $sm;
1649
+ case 1:
1650
+ this.r37_1 = this.t37_1;
1651
+ this.q37_1 = null;
1652
+ this.j8_1 = 2;
1653
+ continue $sm;
1654
+ case 2:
1655
+ this.j8_1 = 3;
1656
+ continue $sm;
1657
+ case 3:
1658
+ this.k8_1 = 10;
1659
+ this.k8_1 = 9;
1660
+ this.s37_1 = this.r37_1.t();
1661
+ this.j8_1 = 4;
1662
+ continue $sm;
1663
+ case 4:
1664
+ this.j8_1 = 5;
1665
+ suspendResult = this.s37_1.d17(this);
1666
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1667
+ return suspendResult;
1668
+ }
1669
+
1670
+ continue $sm;
1671
+ case 5:
1672
+ if (!suspendResult) {
1673
+ this.j8_1 = 7;
1674
+ continue $sm;
1675
+ }
1676
+
1677
+ var e = this.s37_1.v();
1678
+ get_LOGGER().r2i('Received ping message, sending pong message');
1679
+ this.j8_1 = 6;
1680
+ suspendResult = this.o37_1.a19(new Pong(e.u35_1), this);
1681
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1682
+ return suspendResult;
1683
+ }
1684
+
1685
+ continue $sm;
1686
+ case 6:
1687
+ this.j8_1 = 4;
1688
+ continue $sm;
1689
+ case 7:
1690
+ this.j8_1 = 8;
1691
+ var tmp_0 = this;
1692
+ continue $sm;
1693
+ case 8:
1694
+ this.k8_1 = 13;
1695
+ cancelConsumed(this.r37_1, this.q37_1);
1696
+ this.j8_1 = 12;
1697
+ continue $sm;
1698
+ case 9:
1699
+ this.k8_1 = 10;
1700
+ var tmp_1 = this.m8_1;
1701
+ if (tmp_1 instanceof Error) {
1702
+ var e_0 = this.m8_1;
1703
+ var tmp_2 = this;
1704
+ this.q37_1 = e_0;
1705
+ throw e_0;
1706
+ } else {
1707
+ throw this.m8_1;
1708
+ }
1709
+
1710
+ case 10:
1711
+ this.k8_1 = 13;
1712
+ var t = this.m8_1;
1713
+ cancelConsumed(this.r37_1, this.q37_1);
1714
+ throw t;
1715
+ case 11:
1716
+ this.k8_1 = 13;
1717
+ cancelConsumed(this.r37_1, this.q37_1);
1718
+ if (false) {
1719
+ this.j8_1 = 1;
1720
+ continue $sm;
1721
+ }
1722
+
1723
+ this.j8_1 = 12;
1724
+ continue $sm;
1725
+ case 12:
1726
+ this.k8_1 = 14;
1727
+ this.j8_1 = 15;
1728
+ continue $sm;
1729
+ case 13:
1730
+ this.k8_1 = 14;
1731
+ var tmp_3 = this.m8_1;
1732
+ if (tmp_3 instanceof ClosedSendChannelException) {
1733
+ var _unused_var__etf5q3 = this.m8_1;
1734
+ this.j8_1 = 15;
1735
+ continue $sm;
1736
+ } else {
1737
+ throw this.m8_1;
1738
+ }
1739
+
1740
+ case 14:
1741
+ throw this.m8_1;
1742
+ case 15:
1743
+ this.k8_1 = 14;
1744
+ return Unit_instance;
1745
+ }
1746
+ } catch ($p) {
1747
+ var e_1 = $p;
1748
+ if (this.k8_1 === 14) {
1749
+ throw e_1;
1750
+ } else {
1751
+ this.j8_1 = this.k8_1;
1752
+ this.m8_1 = e_1;
1753
+ }
1754
+ }
1755
+ while (true);
1756
+ };
1757
+ protoOf(ponger$slambda).x1p = function ($this$launch, completion) {
1758
+ var i = new ponger$slambda(this.n37_1, this.o37_1, completion);
1759
+ i.p37_1 = $this$launch;
1760
+ return i;
1761
+ };
1762
+ function ponger$slambda_0($channel, $outgoing, resultContinuation) {
1763
+ var i = new ponger$slambda($channel, $outgoing, resultContinuation);
1764
+ var l = function ($this$launch, $completion) {
1765
+ return i.w1p($this$launch, $completion);
1766
+ };
1767
+ l.$arity = 1;
1768
+ return l;
1769
+ }
1770
+ function pinger$slambda$slambda($channel, resultContinuation) {
1771
+ this.c38_1 = $channel;
1772
+ CoroutineImpl.call(this, resultContinuation);
1773
+ }
1774
+ protoOf(pinger$slambda$slambda).w1p = function ($this$withTimeoutOrNull, $completion) {
1775
+ var tmp = this.x1p($this$withTimeoutOrNull, $completion);
1776
+ tmp.l8_1 = Unit_instance;
1777
+ tmp.m8_1 = null;
1778
+ return tmp.r8();
1779
+ };
1780
+ protoOf(pinger$slambda$slambda).d9 = function (p1, $completion) {
1781
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1782
+ };
1783
+ protoOf(pinger$slambda$slambda).r8 = function () {
1784
+ var suspendResult = this.l8_1;
1785
+ $sm: do
1786
+ try {
1787
+ var tmp = this.j8_1;
1788
+ switch (tmp) {
1789
+ case 0:
1790
+ this.k8_1 = 3;
1791
+ this.j8_1 = 1;
1792
+ continue $sm;
1793
+ case 1:
1794
+ if (!true) {
1795
+ this.j8_1 = 4;
1796
+ continue $sm;
1797
+ }
1798
+
1799
+ this.j8_1 = 2;
1800
+ suspendResult = this.c38_1.e19(this);
1801
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1802
+ return suspendResult;
1803
+ }
1804
+
1805
+ continue $sm;
1806
+ case 2:
1807
+ this.j8_1 = 1;
1808
+ continue $sm;
1809
+ case 3:
1810
+ throw this.m8_1;
1811
+ case 4:
1812
+ return Unit_instance;
1813
+ }
1814
+ } catch ($p) {
1815
+ var e = $p;
1816
+ if (this.k8_1 === 3) {
1817
+ throw e;
1818
+ } else {
1819
+ this.j8_1 = this.k8_1;
1820
+ this.m8_1 = e;
1821
+ }
1822
+ }
1823
+ while (true);
1824
+ };
1825
+ protoOf(pinger$slambda$slambda).x1p = function ($this$withTimeoutOrNull, completion) {
1826
+ var i = new pinger$slambda$slambda(this.c38_1, completion);
1827
+ i.d38_1 = $this$withTimeoutOrNull;
1828
+ return i;
1829
+ };
1830
+ function pinger$slambda$slambda_0($channel, resultContinuation) {
1831
+ var i = new pinger$slambda$slambda($channel, resultContinuation);
1832
+ var l = function ($this$withTimeoutOrNull, $completion) {
1833
+ return i.w1p($this$withTimeoutOrNull, $completion);
1834
+ };
1835
+ l.$arity = 1;
1836
+ return l;
1837
+ }
1838
+ function pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation) {
1839
+ this.m38_1 = $outgoing;
1840
+ this.n38_1 = $pingMessage;
1841
+ this.o38_1 = $channel;
1842
+ CoroutineImpl.call(this, resultContinuation);
1843
+ }
1844
+ protoOf(pinger$slambda$slambda_1).w1p = function ($this$withTimeoutOrNull, $completion) {
1845
+ var tmp = this.x1p($this$withTimeoutOrNull, $completion);
1846
+ tmp.l8_1 = Unit_instance;
1847
+ tmp.m8_1 = null;
1848
+ return tmp.r8();
1849
+ };
1850
+ protoOf(pinger$slambda$slambda_1).d9 = function (p1, $completion) {
1851
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1852
+ };
1853
+ protoOf(pinger$slambda$slambda_1).r8 = function () {
1854
+ var suspendResult = this.l8_1;
1855
+ $sm: do
1856
+ try {
1857
+ var tmp = this.j8_1;
1858
+ switch (tmp) {
1859
+ case 0:
1860
+ this.k8_1 = 6;
1861
+ get_LOGGER().r2i('WebSocket Pinger: sending ping frame');
1862
+ this.j8_1 = 1;
1863
+ suspendResult = this.m38_1.a19(new Ping(toByteArray(this.n38_1, Charsets_getInstance().x1q_1)), this);
1864
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1865
+ return suspendResult;
1866
+ }
1867
+
1868
+ continue $sm;
1869
+ case 1:
1870
+ this.j8_1 = 2;
1871
+ continue $sm;
1872
+ case 2:
1873
+ if (!true) {
1874
+ this.j8_1 = 5;
1875
+ continue $sm;
1876
+ }
1877
+
1878
+ this.j8_1 = 3;
1879
+ suspendResult = this.o38_1.e19(this);
1880
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1881
+ return suspendResult;
1882
+ }
1883
+
1884
+ continue $sm;
1885
+ case 3:
1886
+ this.q38_1 = suspendResult;
1887
+ if (decodeToString(this.q38_1.u35_1, 0, 0 + this.q38_1.u35_1.length | 0) === this.n38_1) {
1888
+ get_LOGGER().r2i('WebSocket Pinger: received valid pong frame ' + this.q38_1.toString());
1889
+ this.j8_1 = 5;
1890
+ continue $sm;
1891
+ } else {
1892
+ this.j8_1 = 4;
1893
+ continue $sm;
1894
+ }
1895
+
1896
+ case 4:
1897
+ get_LOGGER().r2i('WebSocket Pinger: received invalid pong frame ' + this.q38_1.toString() + ', continue waiting');
1898
+ this.j8_1 = 2;
1899
+ continue $sm;
1900
+ case 5:
1901
+ return Unit_instance;
1902
+ case 6:
1903
+ throw this.m8_1;
1904
+ }
1905
+ } catch ($p) {
1906
+ var e = $p;
1907
+ if (this.k8_1 === 6) {
1908
+ throw e;
1909
+ } else {
1910
+ this.j8_1 = this.k8_1;
1911
+ this.m8_1 = e;
1912
+ }
1913
+ }
1914
+ while (true);
1915
+ };
1916
+ protoOf(pinger$slambda$slambda_1).x1p = function ($this$withTimeoutOrNull, completion) {
1917
+ var i = new pinger$slambda$slambda_1(this.m38_1, this.n38_1, this.o38_1, completion);
1918
+ i.p38_1 = $this$withTimeoutOrNull;
1919
+ return i;
1920
+ };
1921
+ function pinger$slambda$slambda_2($outgoing, $pingMessage, $channel, resultContinuation) {
1922
+ var i = new pinger$slambda$slambda_1($outgoing, $pingMessage, $channel, resultContinuation);
1923
+ var l = function ($this$withTimeoutOrNull, $completion) {
1924
+ return i.w1p($this$withTimeoutOrNull, $completion);
1925
+ };
1926
+ l.$arity = 1;
1927
+ return l;
1928
+ }
1929
+ function pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
1930
+ this.z38_1 = $periodMillis;
1931
+ this.a39_1 = $timeoutMillis;
1932
+ this.b39_1 = $onTimeout;
1933
+ this.c39_1 = $channel;
1934
+ this.d39_1 = $outgoing;
1935
+ CoroutineImpl.call(this, resultContinuation);
1936
+ }
1937
+ protoOf(pinger$slambda).w1p = function ($this$launch, $completion) {
1938
+ var tmp = this.x1p($this$launch, $completion);
1939
+ tmp.l8_1 = Unit_instance;
1940
+ tmp.m8_1 = null;
1941
+ return tmp.r8();
1942
+ };
1943
+ protoOf(pinger$slambda).d9 = function (p1, $completion) {
1944
+ return this.w1p((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
1945
+ };
1946
+ protoOf(pinger$slambda).r8 = function () {
1947
+ var suspendResult = this.l8_1;
1948
+ $sm: do
1949
+ try {
1950
+ var tmp = this.j8_1;
1951
+ switch (tmp) {
1952
+ case 0:
1953
+ this.k8_1 = 9;
1954
+ get_LOGGER().r2i('Starting WebSocket pinger coroutine with period ' + this.z38_1.toString() + ' ms and timeout ' + this.a39_1.toString() + ' ms');
1955
+ this.g39_1 = Random(getTimeMillis());
1956
+ this.f39_1 = new Int8Array(32);
1957
+ this.k8_1 = 7;
1958
+ this.j8_1 = 1;
1959
+ continue $sm;
1960
+ case 1:
1961
+ if (!true) {
1962
+ this.j8_1 = 6;
1963
+ continue $sm;
1964
+ }
1965
+
1966
+ this.j8_1 = 2;
1967
+ suspendResult = withTimeoutOrNull(this.z38_1, pinger$slambda$slambda_0(this.c39_1, null), this);
1968
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1969
+ return suspendResult;
1970
+ }
1971
+
1972
+ continue $sm;
1973
+ case 2:
1974
+ this.g39_1.hh(this.f39_1);
1975
+ var pingMessage = '[ping ' + hex(this.f39_1) + ' ping]';
1976
+ this.j8_1 = 3;
1977
+ suspendResult = withTimeoutOrNull(this.a39_1, pinger$slambda$slambda_2(this.d39_1, pingMessage, this.c39_1, null), this);
1978
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1979
+ return suspendResult;
1980
+ }
1981
+
1982
+ continue $sm;
1983
+ case 3:
1984
+ var rc = suspendResult;
1985
+ if (rc == null) {
1986
+ get_LOGGER().r2i('WebSocket pinger has timed out');
1987
+ this.j8_1 = 5;
1988
+ suspendResult = this.b39_1(CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), 'Ping timeout'), this);
1989
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1990
+ return suspendResult;
1991
+ }
1992
+ continue $sm;
1993
+ } else {
1994
+ this.j8_1 = 4;
1995
+ continue $sm;
1996
+ }
1997
+
1998
+ case 4:
1999
+ this.j8_1 = 1;
2000
+ continue $sm;
2001
+ case 5:
2002
+ this.j8_1 = 6;
2003
+ continue $sm;
2004
+ case 6:
2005
+ this.k8_1 = 9;
2006
+ this.j8_1 = 8;
2007
+ continue $sm;
2008
+ case 7:
2009
+ this.k8_1 = 9;
2010
+ var tmp_0 = this.m8_1;
2011
+ if (tmp_0 instanceof CancellationException) {
2012
+ var ignore = this.m8_1;
2013
+ this.j8_1 = 8;
2014
+ continue $sm;
2015
+ } else {
2016
+ var tmp_1 = this.m8_1;
2017
+ if (tmp_1 instanceof ClosedReceiveChannelException) {
2018
+ var ignore_0 = this.m8_1;
2019
+ this.j8_1 = 8;
2020
+ continue $sm;
2021
+ } else {
2022
+ var tmp_2 = this.m8_1;
2023
+ if (tmp_2 instanceof ClosedSendChannelException) {
2024
+ var ignore_1 = this.m8_1;
2025
+ this.j8_1 = 8;
2026
+ continue $sm;
2027
+ } else {
2028
+ var tmp_3 = this.m8_1;
2029
+ if (tmp_3 instanceof ClosedByteChannelException) {
2030
+ var ignore_2 = this.m8_1;
2031
+ this.j8_1 = 8;
2032
+ continue $sm;
2033
+ } else {
2034
+ throw this.m8_1;
2035
+ }
2036
+ }
2037
+ }
2038
+ }
2039
+
2040
+ case 8:
2041
+ this.k8_1 = 9;
2042
+ return Unit_instance;
2043
+ case 9:
2044
+ throw this.m8_1;
2045
+ }
2046
+ } catch ($p) {
2047
+ var e = $p;
2048
+ if (this.k8_1 === 9) {
2049
+ throw e;
2050
+ } else {
2051
+ this.j8_1 = this.k8_1;
2052
+ this.m8_1 = e;
2053
+ }
2054
+ }
2055
+ while (true);
2056
+ };
2057
+ protoOf(pinger$slambda).x1p = function ($this$launch, completion) {
2058
+ var i = new pinger$slambda(this.z38_1, this.a39_1, this.b39_1, this.c39_1, this.d39_1, completion);
2059
+ i.e39_1 = $this$launch;
2060
+ return i;
2061
+ };
2062
+ function pinger$slambda_0($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation) {
2063
+ var i = new pinger$slambda($periodMillis, $timeoutMillis, $onTimeout, $channel, $outgoing, resultContinuation);
2064
+ var l = function ($this$launch, $completion) {
2065
+ return i.w1p($this$launch, $completion);
2066
+ };
2067
+ l.$arity = 1;
2068
+ return l;
2069
+ }
2070
+ function pinger$lambda($actorJob) {
2071
+ return function (it) {
2072
+ $actorJob.mt();
2073
+ return Unit_instance;
2074
+ };
2075
+ }
2076
+ var properties_initialized_PingPong_kt_fbfhmc;
2077
+ function _init_properties_PingPong_kt__9aqxey() {
2078
+ if (!properties_initialized_PingPong_kt_fbfhmc) {
2079
+ properties_initialized_PingPong_kt_fbfhmc = true;
2080
+ PongerCoroutineName = new CoroutineName('ws-ponger');
2081
+ PingerCoroutineName = new CoroutineName('ws-pinger');
2082
+ }
2083
+ }
2084
+ function Companion_2() {
2085
+ Companion_instance_2 = this;
2086
+ var tmp = this;
2087
+ // Inline function 'kotlin.apply' call
2088
+ var this_0 = new WebSocketChannelsConfig();
2089
+ this_0.f32_1 = this_0.h39();
2090
+ this_0.g32_1 = this_0.h39();
2091
+ tmp.e32_1 = this_0;
2092
+ }
2093
+ var Companion_instance_2;
2094
+ function Companion_getInstance_2() {
2095
+ if (Companion_instance_2 == null)
2096
+ new Companion_2();
2097
+ return Companion_instance_2;
2098
+ }
2099
+ function WebSocketChannelsConfig() {
2100
+ Companion_getInstance_2();
2101
+ this.f32_1 = Companion_getInstance_3().i39_1;
2102
+ this.g32_1 = Companion_getInstance_3().i39_1;
2103
+ }
2104
+ protoOf(WebSocketChannelsConfig).h39 = function () {
2105
+ return Companion_getInstance_3().i39_1;
2106
+ };
2107
+ function from(_this__u8e3s4, config) {
2108
+ // Inline function 'kotlin.with' call
2109
+ var tmp;
2110
+ if (config.j39_1 === 2147483647) {
2111
+ tmp = Channel(2147483647);
2112
+ } else if (config.k39_1.equals(ChannelOverflow_SUSPEND_getInstance())) {
2113
+ tmp = Channel(config.j39_1, BufferOverflow_SUSPEND_getInstance());
2114
+ } else if (config.k39_1.equals(ChannelOverflow_CLOSE_getInstance())) {
2115
+ tmp = new BoundedChannel(config.j39_1);
2116
+ } else {
2117
+ var message = 'Unsupported channel config.';
2118
+ throw IllegalStateException_init_$Create$(toString(message));
2119
+ }
2120
+ return tmp;
2121
+ }
2122
+ function Companion_3() {
2123
+ Companion_instance_3 = this;
2124
+ this.i39_1 = new ChannelConfig(2147483647, ChannelOverflow_SUSPEND_getInstance());
2125
+ }
2126
+ var Companion_instance_3;
2127
+ function Companion_getInstance_3() {
2128
+ if (Companion_instance_3 == null)
2129
+ new Companion_3();
2130
+ return Companion_instance_3;
2131
+ }
2132
+ function ChannelConfig(capacity, onOverflow) {
2133
+ Companion_getInstance_3();
2134
+ this.j39_1 = capacity;
2135
+ this.k39_1 = onOverflow;
2136
+ }
2137
+ protoOf(ChannelConfig).l39 = function () {
2138
+ return this.k39_1.equals(ChannelOverflow_SUSPEND_getInstance()) && !(this.j39_1 === 2147483647);
2139
+ };
2140
+ var ChannelOverflow_SUSPEND_instance;
2141
+ var ChannelOverflow_CLOSE_instance;
2142
+ var ChannelOverflow_entriesInitialized;
2143
+ function ChannelOverflow_initEntries() {
2144
+ if (ChannelOverflow_entriesInitialized)
2145
+ return Unit_instance;
2146
+ ChannelOverflow_entriesInitialized = true;
2147
+ ChannelOverflow_SUSPEND_instance = new ChannelOverflow('SUSPEND', 0);
2148
+ ChannelOverflow_CLOSE_instance = new ChannelOverflow('CLOSE', 1);
2149
+ }
2150
+ function ChannelOverflow(name, ordinal) {
2151
+ Enum.call(this, name, ordinal);
2152
+ }
2153
+ function BoundedChannel$Companion$createDelegate$lambda($channel) {
2154
+ return function (it) {
2155
+ var tmp;
2156
+ var tmp_0;
2157
+ if ($channel._v == null) {
2158
+ throwUninitializedPropertyAccessException('channel');
2159
+ } else {
2160
+ tmp_0 = $channel._v;
2161
+ }
2162
+ if (!tmp_0.f17()) {
2163
+ var tmp_1;
2164
+ if ($channel._v == null) {
2165
+ throwUninitializedPropertyAccessException('channel');
2166
+ } else {
2167
+ tmp_1 = $channel._v;
2168
+ }
2169
+ tmp_1.g19(new ChannelOverflowException('Channel overflowed'));
2170
+ tmp = Unit_instance;
2171
+ }
2172
+ return Unit_instance;
2173
+ };
2174
+ }
2175
+ function Companion_4() {
2176
+ }
2177
+ protoOf(Companion_4).m39 = function (capacity) {
2178
+ var channel = {_v: null};
2179
+ var tmp = BufferOverflow_DROP_OLDEST_getInstance();
2180
+ // Inline function 'kotlin.also' call
2181
+ var this_0 = Channel(capacity, tmp, BoundedChannel$Companion$createDelegate$lambda(channel));
2182
+ channel._v = this_0;
2183
+ return this_0;
2184
+ };
2185
+ var Companion_instance_4;
2186
+ function Companion_getInstance_4() {
2187
+ return Companion_instance_4;
2188
+ }
2189
+ function BoundedChannel(capacity, delegate) {
2190
+ delegate = delegate === VOID ? Companion_instance_4.m39(capacity) : delegate;
2191
+ this.n39_1 = delegate;
2192
+ }
2193
+ protoOf(BoundedChannel).o39 = function (element) {
2194
+ var result = this.n39_1.b19(element);
2195
+ if (!_ChannelResult___get_isSuccess__impl__odq1z9(result) && !_ChannelResult___get_isClosed__impl__mg7kuu(result)) {
2196
+ this.g19(new ChannelOverflowException('Channel overflowed'));
2197
+ }
2198
+ return result;
2199
+ };
2200
+ protoOf(BoundedChannel).b19 = function (element) {
2201
+ return this.o39((element == null ? true : !(element == null)) ? element : THROW_CCE());
2202
+ };
2203
+ protoOf(BoundedChannel).p39 = function (element, $completion) {
2204
+ return this.n39_1.a19(element, $completion);
2205
+ };
2206
+ protoOf(BoundedChannel).a19 = function (element, $completion) {
2207
+ return this.p39((element == null ? true : !(element == null)) ? element : THROW_CCE(), $completion);
2208
+ };
2209
+ protoOf(BoundedChannel).g19 = function (cause) {
2210
+ return this.n39_1.g19(cause);
2211
+ };
2212
+ protoOf(BoundedChannel).f17 = function () {
2213
+ return this.n39_1.f17();
2214
+ };
2215
+ protoOf(BoundedChannel).q39 = function ($completion) {
2216
+ return this.n39_1.e19($completion);
2217
+ };
2218
+ protoOf(BoundedChannel).e19 = function ($completion) {
2219
+ return this.q39($completion);
2220
+ };
2221
+ protoOf(BoundedChannel).t = function () {
2222
+ return this.n39_1.t();
2223
+ };
2224
+ protoOf(BoundedChannel).lt = function (cause) {
2225
+ this.n39_1.lt(cause);
2226
+ };
2227
+ function ChannelOverflowException(message) {
2228
+ RuntimeException_init_$Init$(message, this);
2229
+ captureStack(this, ChannelOverflowException);
2230
+ }
2231
+ function ChannelOverflow_SUSPEND_getInstance() {
2232
+ ChannelOverflow_initEntries();
2233
+ return ChannelOverflow_SUSPEND_instance;
2234
+ }
2235
+ function ChannelOverflow_CLOSE_getInstance() {
2236
+ ChannelOverflow_initEntries();
2237
+ return ChannelOverflow_CLOSE_instance;
2238
+ }
2239
+ function WebSocketExtension() {
2240
+ }
2241
+ function WebSocketExtensionsConfig() {
2242
+ var tmp = this;
2243
+ // Inline function 'kotlin.collections.mutableListOf' call
2244
+ tmp.t39_1 = ArrayList_init_$Create$();
2245
+ var tmp_0 = this;
2246
+ // Inline function 'kotlin.arrayOf' call
2247
+ // Inline function 'kotlin.js.unsafeCast' call
2248
+ // Inline function 'kotlin.js.asDynamic' call
2249
+ tmp_0.u39_1 = [false, false, false];
2250
+ }
2251
+ protoOf(WebSocketExtensionsConfig).i2l = function () {
2252
+ // Inline function 'kotlin.collections.map' call
2253
+ var this_0 = this.t39_1;
2254
+ // Inline function 'kotlin.collections.mapTo' call
2255
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2256
+ var _iterator__ex2g4s = this_0.t();
2257
+ while (_iterator__ex2g4s.u()) {
2258
+ var item = _iterator__ex2g4s.v();
2259
+ var tmp$ret$0 = item();
2260
+ destination.e1(tmp$ret$0);
2261
+ }
2262
+ return destination;
2263
+ };
2264
+ function parametersToString($this) {
2265
+ return $this.w39_1.r() ? '' : '; ' + joinToString($this.w39_1, ';');
2266
+ }
2267
+ function WebSocketExtensionHeader(name, parameters) {
2268
+ this.v39_1 = name;
2269
+ this.w39_1 = parameters;
2270
+ }
2271
+ protoOf(WebSocketExtensionHeader).toString = function () {
2272
+ return this.v39_1 + ' ' + parametersToString(this);
2273
+ };
2274
+ function parseWebSocketExtensions(value) {
2275
+ // Inline function 'kotlin.collections.map' call
2276
+ var this_0 = split(value, [',']);
2277
+ // Inline function 'kotlin.collections.mapTo' call
2278
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
2279
+ var _iterator__ex2g4s = this_0.t();
2280
+ while (_iterator__ex2g4s.u()) {
2281
+ var item = _iterator__ex2g4s.v();
2282
+ var extension = split(item, [';']);
2283
+ // Inline function 'kotlin.text.trim' call
2284
+ var this_1 = first(extension);
2285
+ var name = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
2286
+ // Inline function 'kotlin.collections.map' call
2287
+ var this_2 = drop(extension, 1);
2288
+ // Inline function 'kotlin.collections.mapTo' call
2289
+ var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
2290
+ var _iterator__ex2g4s_0 = this_2.t();
2291
+ while (_iterator__ex2g4s_0.u()) {
2292
+ var item_0 = _iterator__ex2g4s_0.v();
2293
+ // Inline function 'kotlin.text.trim' call
2294
+ var tmp$ret$2 = toString(trim(isCharSequence(item_0) ? item_0 : THROW_CCE()));
2295
+ destination_0.e1(tmp$ret$2);
2296
+ }
2297
+ var parameters = destination_0;
2298
+ var tmp$ret$5 = new WebSocketExtensionHeader(name, parameters);
2299
+ destination.e1(tmp$ret$5);
2300
+ }
2301
+ return destination;
2302
+ }
2303
+ function WebSocketSession() {
2304
+ }
2305
+ function close(_this__u8e3s4, reason, $completion) {
2306
+ reason = reason === VOID ? CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '') : reason;
2307
+ var tmp = new $closeCOROUTINE$(_this__u8e3s4, reason, $completion);
2308
+ tmp.l8_1 = Unit_instance;
2309
+ tmp.m8_1 = null;
2310
+ return tmp.r8();
2311
+ }
2312
+ function closeExceptionally(_this__u8e3s4, cause, $completion) {
2313
+ var tmp;
2314
+ if (cause instanceof CancellationException) {
2315
+ tmp = CloseReason_init_$Create$(Codes_NORMAL_getInstance(), '');
2316
+ } else {
2317
+ tmp = CloseReason_init_$Create$(Codes_INTERNAL_ERROR_getInstance(), cause.toString());
2318
+ }
2319
+ var reason = tmp;
2320
+ return close(_this__u8e3s4, reason, $completion);
2321
+ }
2322
+ function $closeCOROUTINE$(_this__u8e3s4, reason, resultContinuation) {
2323
+ CoroutineImpl.call(this, resultContinuation);
2324
+ this.f3a_1 = _this__u8e3s4;
2325
+ this.g3a_1 = reason;
2326
+ }
2327
+ protoOf($closeCOROUTINE$).r8 = function () {
2328
+ var suspendResult = this.l8_1;
2329
+ $sm: do
2330
+ try {
2331
+ var tmp = this.j8_1;
2332
+ switch (tmp) {
2333
+ case 0:
2334
+ this.k8_1 = 4;
2335
+ this.k8_1 = 3;
2336
+ this.j8_1 = 1;
2337
+ suspendResult = this.f3a_1.d32(Close_init_$Create$(this.g3a_1), this);
2338
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2339
+ return suspendResult;
2340
+ }
2341
+
2342
+ continue $sm;
2343
+ case 1:
2344
+ this.j8_1 = 2;
2345
+ suspendResult = this.f3a_1.q1g(this);
2346
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2347
+ return suspendResult;
2348
+ }
2349
+
2350
+ continue $sm;
2351
+ case 2:
2352
+ this.k8_1 = 4;
2353
+ this.j8_1 = 5;
2354
+ continue $sm;
2355
+ case 3:
2356
+ this.k8_1 = 4;
2357
+ var tmp_0 = this.m8_1;
2358
+ if (tmp_0 instanceof Error) {
2359
+ var _unused_var__etf5q3 = this.m8_1;
2360
+ this.j8_1 = 5;
2361
+ continue $sm;
2362
+ } else {
2363
+ throw this.m8_1;
2364
+ }
2365
+
2366
+ case 4:
2367
+ throw this.m8_1;
2368
+ case 5:
2369
+ this.k8_1 = 4;
2370
+ return Unit_instance;
2371
+ }
2372
+ } catch ($p) {
2373
+ var e = $p;
2374
+ if (this.k8_1 === 4) {
2375
+ throw e;
2376
+ } else {
2377
+ this.j8_1 = this.k8_1;
2378
+ this.m8_1 = e;
2379
+ }
2380
+ }
2381
+ while (true);
2382
+ };
2383
+ function Binary_init_$Init$(fin, data, $this) {
2384
+ Binary.call($this, fin, data, false, false, false);
2385
+ return $this;
2386
+ }
2387
+ function Binary_init_$Create$(fin, data) {
2388
+ return Binary_init_$Init$(fin, data, objectCreate(protoOf(Binary)));
2389
+ }
2390
+ function Text_init_$Init$(fin, data, $this) {
2391
+ Text.call($this, fin, data, false, false, false);
2392
+ return $this;
2393
+ }
2394
+ function Text_init_$Init$_0(text, $this) {
2395
+ Text_init_$Init$(true, toByteArray(text), $this);
2396
+ return $this;
2397
+ }
2398
+ function Text_init_$Create$(text) {
2399
+ return Text_init_$Init$_0(text, objectCreate(protoOf(Text)));
2400
+ }
2401
+ function Close_init_$Init$(reason, $this) {
2402
+ // Inline function 'io.ktor.utils.io.core.buildPacket' call
2403
+ var builder = new Buffer();
2404
+ builder.mq(reason.v31_1);
2405
+ writeText(builder, reason.w31_1);
2406
+ Close_init_$Init$_0(builder, $this);
2407
+ return $this;
2408
+ }
2409
+ function Close_init_$Create$(reason) {
2410
+ return Close_init_$Init$(reason, objectCreate(protoOf(Close)));
2411
+ }
2412
+ function Close_init_$Init$_0(packet, $this) {
2413
+ Close.call($this, readByteArray(packet));
2414
+ return $this;
2415
+ }
2416
+ function Close_init_$Init$_1($this) {
2417
+ Close.call($this, Companion_getInstance_5().z35_1);
2418
+ return $this;
2419
+ }
2420
+ function Close_init_$Create$_0() {
2421
+ return Close_init_$Init$_1(objectCreate(protoOf(Close)));
2422
+ }
2423
+ function Binary(fin, data, rsv1, rsv2, rsv3) {
2424
+ rsv1 = rsv1 === VOID ? false : rsv1;
2425
+ rsv2 = rsv2 === VOID ? false : rsv2;
2426
+ rsv3 = rsv3 === VOID ? false : rsv3;
2427
+ Frame.call(this, fin, FrameType_BINARY_getInstance(), data, NonDisposableHandle_instance, rsv1, rsv2, rsv3);
2428
+ }
2429
+ function Text(fin, data, rsv1, rsv2, rsv3) {
2430
+ rsv1 = rsv1 === VOID ? false : rsv1;
2431
+ rsv2 = rsv2 === VOID ? false : rsv2;
2432
+ rsv3 = rsv3 === VOID ? false : rsv3;
2433
+ Frame.call(this, fin, FrameType_TEXT_getInstance(), data, NonDisposableHandle_instance, rsv1, rsv2, rsv3);
2434
+ }
2435
+ function Close(data) {
2436
+ Frame.call(this, true, FrameType_CLOSE_getInstance(), data, NonDisposableHandle_instance, false, false, false);
2437
+ }
2438
+ function Ping(data) {
2439
+ Frame.call(this, true, FrameType_PING_getInstance(), data, NonDisposableHandle_instance, false, false, false);
2440
+ }
2441
+ function Pong(data, disposableHandle) {
2442
+ disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
2443
+ Frame.call(this, true, FrameType_PONG_getInstance(), data, disposableHandle, false, false, false);
2444
+ }
2445
+ function Companion_5() {
2446
+ Companion_instance_5 = this;
2447
+ this.z35_1 = new Int8Array(0);
2448
+ }
2449
+ protoOf(Companion_5).a36 = function (fin, frameType, data, rsv1, rsv2, rsv3) {
2450
+ var tmp;
2451
+ switch (frameType.a1_1) {
2452
+ case 1:
2453
+ tmp = new Binary(fin, data, rsv1, rsv2, rsv3);
2454
+ break;
2455
+ case 0:
2456
+ tmp = new Text(fin, data, rsv1, rsv2, rsv3);
2457
+ break;
2458
+ case 2:
2459
+ tmp = new Close(data);
2460
+ break;
2461
+ case 3:
2462
+ tmp = new Ping(data);
2463
+ break;
2464
+ case 4:
2465
+ tmp = new Pong(data, NonDisposableHandle_instance);
2466
+ break;
2467
+ default:
2468
+ noWhenBranchMatchedException();
2469
+ break;
2470
+ }
2471
+ return tmp;
2472
+ };
2473
+ var Companion_instance_5;
2474
+ function Companion_getInstance_5() {
2475
+ if (Companion_instance_5 == null)
2476
+ new Companion_5();
2477
+ return Companion_instance_5;
2478
+ }
2479
+ function Frame(fin, frameType, data, disposableHandle, rsv1, rsv2, rsv3) {
2480
+ Companion_getInstance_5();
2481
+ disposableHandle = disposableHandle === VOID ? NonDisposableHandle_instance : disposableHandle;
2482
+ rsv1 = rsv1 === VOID ? false : rsv1;
2483
+ rsv2 = rsv2 === VOID ? false : rsv2;
2484
+ rsv3 = rsv3 === VOID ? false : rsv3;
2485
+ this.s35_1 = fin;
2486
+ this.t35_1 = frameType;
2487
+ this.u35_1 = data;
2488
+ this.v35_1 = disposableHandle;
2489
+ this.w35_1 = rsv1;
2490
+ this.x35_1 = rsv2;
2491
+ this.y35_1 = rsv3;
2492
+ }
2493
+ protoOf(Frame).toString = function () {
2494
+ return 'Frame ' + this.t35_1.toString() + ' (fin=' + this.s35_1 + ', buffer len = ' + this.u35_1.length + ')';
2495
+ };
2496
+ function get_OUTGOING_CHANNEL_CAPACITY() {
2497
+ return OUTGOING_CHANNEL_CAPACITY;
2498
+ }
2499
+ var OUTGOING_CHANNEL_CAPACITY;
2500
+ //region block: post-declaration
2501
+ protoOf(DefaultWebSocketSessionImpl).d32 = send;
2502
+ defineProp(protoOf(FrameTooBigException), 'message', function () {
2503
+ return this.e();
2504
+ });
2505
+ protoOf(BoundedChannel).i19 = close$default;
2506
+ protoOf(BoundedChannel).k19 = cancel$default;
2507
+ //endregion
2508
+ //region block: init
2509
+ NonDisposableHandle_instance = new NonDisposableHandle();
2510
+ Companion_instance_4 = new Companion_4();
2511
+ OUTGOING_CHANNEL_CAPACITY = null;
2512
+ //endregion
2513
+ //region block: exports
2514
+ export {
2515
+ Codes_CLOSED_ABNORMALLY_getInstance as Codes_CLOSED_ABNORMALLY_getInstance18g5hbbmrws6x,
2516
+ Codes_NORMAL_getInstance as Codes_NORMAL_getInstance21orcjign6rr6,
2517
+ send as send3oe3simbzresd,
2518
+ Binary_init_$Create$ as Binary_init_$Create$csls592kbxno,
2519
+ Close_init_$Create$ as Close_init_$Create$dozxuqp7q7sy,
2520
+ Text_init_$Create$ as Text_init_$Create$2gym5fpve8nxx,
2521
+ Companion_getInstance as Companion_getInstance3h3c6jlu8qefd,
2522
+ Companion_getInstance_2 as Companion_getInstance1onda8f6dyvl,
2523
+ CloseReason as CloseReason10cphaqpp3ct7,
2524
+ DefaultWebSocketSession_0 as DefaultWebSocketSessionmehckluw85jl,
2525
+ DefaultWebSocketSession as DefaultWebSocketSession3h8506yqzs5fx,
2526
+ WebSocketChannelsConfig as WebSocketChannelsConfig1qogztyrywmj9,
2527
+ WebSocketExtensionsConfig as WebSocketExtensionsConfig3sf1f7u7xi63m,
2528
+ WebSocketExtension as WebSocketExtensionixqq2y77p4e0,
2529
+ WebSocketSession as WebSocketSessionzi1ianvyj32u,
2530
+ from as from3gpkuvfyl3bft,
2531
+ parseWebSocketExtensions as parseWebSocketExtensionszyo25w86ylog,
2532
+ };
2533
+ //endregion
2534
+
2535
+ //# sourceMappingURL=ktor-ktor-websockets.mjs.map