raspberry_games_server_game_logic 1.8.248

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 (68) hide show
  1. package/Kosi-Kaverit-kaverit.js +339 -0
  2. package/Kosi-Kaverit-kaverit.js.map +1 -0
  3. package/Kosi-Kodein-kodein-di.js +2389 -0
  4. package/Kosi-Kodein-kodein-di.js.map +1 -0
  5. package/Kotlin-DateTime-library-kotlinx-datetime.js +6215 -0
  6. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
  7. package/Logic_Debertz-core.js +6885 -0
  8. package/Logic_Debertz-core.js.map +1 -0
  9. package/Logic_Debertz-engine.js +52055 -0
  10. package/Logic_Debertz-engine.js.map +1 -0
  11. package/Logic_Debertz-game_server.d.ts +1918 -0
  12. package/Logic_Debertz-game_server.js +5140 -0
  13. package/Logic_Debertz-game_server.js.map +1 -0
  14. package/kotlin-kotlin-stdlib.js +15597 -0
  15. package/kotlin-kotlin-stdlib.js.map +1 -0
  16. package/kotlin-kotlinx-atomicfu-runtime.js +15 -0
  17. package/kotlin-kotlinx-atomicfu-runtime.js.map +1 -0
  18. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  19. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  20. package/kotlinx-atomicfu.js +276 -0
  21. package/kotlinx-atomicfu.js.map +1 -0
  22. package/kotlinx-coroutines-core.js +11628 -0
  23. package/kotlinx-coroutines-core.js.map +1 -0
  24. package/kotlinx-io-kotlinx-io-bytestring.js +15 -0
  25. package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
  26. package/kotlinx-io-kotlinx-io-core.js +1557 -0
  27. package/kotlinx-io-kotlinx-io-core.js.map +1 -0
  28. package/kotlinx-serialization-kotlinx-serialization-core.js +6315 -0
  29. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  30. package/kotlinx-serialization-kotlinx-serialization-json.js +5092 -0
  31. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
  32. package/ktor-ktor-client-content-negotiation.js +713 -0
  33. package/ktor-ktor-client-content-negotiation.js.map +1 -0
  34. package/ktor-ktor-client-core.js +7235 -0
  35. package/ktor-ktor-client-core.js.map +1 -0
  36. package/ktor-ktor-client-js.js +15 -0
  37. package/ktor-ktor-client-js.js.map +1 -0
  38. package/ktor-ktor-client-logging.js +1530 -0
  39. package/ktor-ktor-client-logging.js.map +1 -0
  40. package/ktor-ktor-events.js +97 -0
  41. package/ktor-ktor-events.js.map +1 -0
  42. package/ktor-ktor-http.js +3285 -0
  43. package/ktor-ktor-http.js.map +1 -0
  44. package/ktor-ktor-io.js +6463 -0
  45. package/ktor-ktor-io.js.map +1 -0
  46. package/ktor-ktor-serialization-kotlinx-json.js +67 -0
  47. package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
  48. package/ktor-ktor-serialization-kotlinx.js +893 -0
  49. package/ktor-ktor-serialization-kotlinx.js.map +1 -0
  50. package/ktor-ktor-serialization.js +395 -0
  51. package/ktor-ktor-serialization.js.map +1 -0
  52. package/ktor-ktor-utils.js +2659 -0
  53. package/ktor-ktor-utils.js.map +1 -0
  54. package/ktor-ktor-websocket-serialization.js +15 -0
  55. package/ktor-ktor-websocket-serialization.js.map +1 -0
  56. package/ktor-ktor-websockets.js +466 -0
  57. package/ktor-ktor-websockets.js.map +1 -0
  58. package/package.json +13 -0
  59. package/raspberry-cardgame-lib-core.js +1429 -0
  60. package/raspberry-cardgame-lib-core.js.map +1 -0
  61. package/raspberry-cardgame-lib-logger.js +423 -0
  62. package/raspberry-cardgame-lib-logger.js.map +1 -0
  63. package/raspberry-cardgame-lib-random.js +3060 -0
  64. package/raspberry-cardgame-lib-random.js.map +1 -0
  65. package/secure-random-secure-random.js +173 -0
  66. package/secure-random-secure-random.js.map +1 -0
  67. package/uuid.js +163 -0
  68. package/uuid.js.map +1 -0
@@ -0,0 +1,1530 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-coroutines-core.js', './kotlinx-atomicfu.js', './ktor-ktor-http.js', './ktor-ktor-client-core.js', './ktor-ktor-io.js', './ktor-ktor-utils.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'), require('./kotlinx-atomicfu.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-utils.js'));
6
+ else {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-client-logging'.");
9
+ }
10
+ if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
11
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-client-logging'.");
12
+ }
13
+ if (typeof globalThis['kotlinx-atomicfu'] === 'undefined') {
14
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'kotlinx-atomicfu' was not found. Please, check whether 'kotlinx-atomicfu' is loaded prior to 'ktor-ktor-client-logging'.");
15
+ }
16
+ if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
17
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'ktor-ktor-client-logging'.");
18
+ }
19
+ if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
20
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'ktor-ktor-client-logging'.");
21
+ }
22
+ if (typeof globalThis['ktor-ktor-io'] === 'undefined') {
23
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-client-logging'.");
24
+ }
25
+ if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
26
+ throw new Error("Error loading module 'ktor-ktor-client-logging'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-client-logging'.");
27
+ }
28
+ globalThis['ktor-ktor-client-logging'] = factory(typeof globalThis['ktor-ktor-client-logging'] === 'undefined' ? {} : globalThis['ktor-ktor-client-logging'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-coroutines-core'], globalThis['kotlinx-atomicfu'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-utils']);
29
+ }
30
+ }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_utils) {
31
+ 'use strict';
32
+ //region block: imports
33
+ var CoroutineImpl = kotlin_kotlin.$_$.va;
34
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ga;
35
+ var THROW_CCE = kotlin_kotlin.$_$.rg;
36
+ var isCharSequence = kotlin_kotlin.$_$.dc;
37
+ var trim = kotlin_kotlin.$_$.vf;
38
+ var toString = kotlin_kotlin.$_$.yc;
39
+ var Unit_instance = kotlin_kotlin.$_$.p5;
40
+ var protoOf = kotlin_kotlin.$_$.uc;
41
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.vb;
42
+ var charSequenceLength = kotlin_kotlin.$_$.hb;
43
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
44
+ var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h1;
45
+ var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
46
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.x2;
47
+ var initMetadataForClass = kotlin_kotlin.$_$.tb;
48
+ var VOID = kotlin_kotlin.$_$.f;
49
+ var Enum = kotlin_kotlin.$_$.hg;
50
+ var ReadChannelContent = kotlin_io_ktor_ktor_http.$_$.n;
51
+ var initMetadataForCompanion = kotlin_kotlin.$_$.ub;
52
+ var println = kotlin_kotlin.$_$.ya;
53
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.n;
54
+ var Phases_getInstance = kotlin_io_ktor_ktor_client_core.$_$.e;
55
+ var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.p;
56
+ var Url = kotlin_io_ktor_ktor_http.$_$.x;
57
+ var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
58
+ var toString_0 = kotlin_kotlin.$_$.vh;
59
+ var charset = kotlin_io_ktor_ktor_http.$_$.b1;
60
+ var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.g;
61
+ var ByteChannel = kotlin_io_ktor_ktor_io.$_$.f1;
62
+ var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m;
63
+ var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
64
+ var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r1;
65
+ var Phases_getInstance_0 = kotlin_io_ktor_ktor_client_core.$_$.f;
66
+ var Phases_getInstance_1 = kotlin_io_ktor_ktor_client_core.$_$.g;
67
+ var Plugin_getInstance = kotlin_io_ktor_ktor_client_core.$_$.b;
68
+ var ResponseObserver = kotlin_io_ktor_ktor_client_core.$_$.i;
69
+ var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.m;
70
+ var HttpClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.j;
71
+ var Collection = kotlin_kotlin.$_$.r5;
72
+ var isInterface = kotlin_kotlin.$_$.hc;
73
+ var PipelineContext = kotlin_io_ktor_ktor_utils.$_$.h;
74
+ var initMetadataForLambda = kotlin_kotlin.$_$.xb;
75
+ var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
76
+ var readText = kotlin_io_ktor_ktor_io.$_$.z;
77
+ var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.q;
78
+ var HttpResponseContainer = kotlin_io_ktor_ktor_client_core.$_$.p;
79
+ var contentType = kotlin_io_ktor_ktor_http.$_$.e1;
80
+ var emptyList = kotlin_kotlin.$_$.n7;
81
+ var toList = kotlin_kotlin.$_$.s9;
82
+ var sortedWith = kotlin_kotlin.$_$.k9;
83
+ var joinToString = kotlin_kotlin.$_$.f8;
84
+ var equals = kotlin_kotlin.$_$.lb;
85
+ var FunctionAdapter = kotlin_kotlin.$_$.za;
86
+ var Comparator = kotlin_kotlin.$_$.eg;
87
+ var hashCode = kotlin_kotlin.$_$.sb;
88
+ var compareValues = kotlin_kotlin.$_$.ea;
89
+ var writer = kotlin_io_ktor_ktor_io.$_$.l1;
90
+ var WriterScope = kotlin_io_ktor_ktor_io.$_$.i1;
91
+ var close = kotlin_io_ktor_ktor_io.$_$.k1;
92
+ var copyToBoth = kotlin_io_ktor_ktor_utils.$_$.v;
93
+ var WriteChannelContent = kotlin_io_ktor_ktor_http.$_$.o;
94
+ var writeFully = kotlin_io_ktor_ktor_io.$_$.d;
95
+ var ByteArrayContent = kotlin_io_ktor_ktor_http.$_$.k;
96
+ //endregion
97
+ //region block: pre-declaration
98
+ initMetadataForCoroutine($logResponseExceptionCOROUTINE$0, CoroutineImpl);
99
+ initMetadataForCoroutine($logResponseBodyCOROUTINE$1, CoroutineImpl);
100
+ initMetadataForCoroutine($closeResponseLogCOROUTINE$2, CoroutineImpl);
101
+ initMetadataForClass(HttpClientCallLogger, 'HttpClientCallLogger', VOID, VOID, VOID, [1, 0]);
102
+ initMetadataForClass(LogLevel, 'LogLevel', VOID, Enum);
103
+ initMetadataForClass(LoggedContent, 'LoggedContent', VOID, ReadChannelContent);
104
+ initMetadataForCompanion(Companion);
105
+ initMetadataForClass(SimpleLogger, 'SimpleLogger', SimpleLogger);
106
+ initMetadataForClass(Config, 'Config', Config);
107
+ initMetadataForCompanion(Companion_0, VOID, [HttpClientPlugin]);
108
+ initMetadataForLambda(Logging$setupRequestLogging$slambda, CoroutineImpl, VOID, [2]);
109
+ initMetadataForLambda(Logging$logRequestBody$slambda, CoroutineImpl, VOID, [1]);
110
+ initMetadataForLambda(Logging$setupResponseLogging$slambda, CoroutineImpl, VOID, [2]);
111
+ initMetadataForLambda(Logging$setupResponseLogging$slambda_1, CoroutineImpl, VOID, [2]);
112
+ initMetadataForLambda(Logging$setupResponseLogging$slambda_3, CoroutineImpl, VOID, [1]);
113
+ initMetadataForClass(Logging, 'Logging', VOID, VOID, VOID, [1, 2]);
114
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
115
+ initMetadataForCoroutine($logResponseBodyCOROUTINE$4, CoroutineImpl);
116
+ initMetadataForLambda(toReadChannel$slambda, CoroutineImpl, VOID, [1]);
117
+ initMetadataForCoroutine($observeCOROUTINE$5, CoroutineImpl);
118
+ //endregion
119
+ function $logResponseExceptionCOROUTINE$0(_this__u8e3s4, message, resultContinuation) {
120
+ CoroutineImpl.call(this, resultContinuation);
121
+ this.i3r_1 = _this__u8e3s4;
122
+ this.j3r_1 = message;
123
+ }
124
+ protoOf($logResponseExceptionCOROUTINE$0).m9 = function () {
125
+ var suspendResult = this.g9_1;
126
+ $sm: do
127
+ try {
128
+ var tmp = this.e9_1;
129
+ switch (tmp) {
130
+ case 0:
131
+ this.f9_1 = 2;
132
+ this.e9_1 = 1;
133
+ suspendResult = this.i3r_1.n3r_1.qw(this);
134
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
135
+ return suspendResult;
136
+ }
137
+
138
+ continue $sm;
139
+ case 1:
140
+ var this_0 = this.j3r_1;
141
+ this.i3r_1.k3r_1.r3r(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE())));
142
+ return Unit_instance;
143
+ case 2:
144
+ throw this.h9_1;
145
+ }
146
+ } catch ($p) {
147
+ var e = $p;
148
+ if (this.f9_1 === 2) {
149
+ throw e;
150
+ } else {
151
+ this.e9_1 = this.f9_1;
152
+ this.h9_1 = e;
153
+ }
154
+ }
155
+ while (true);
156
+ };
157
+ function $logResponseBodyCOROUTINE$1(_this__u8e3s4, message, resultContinuation) {
158
+ CoroutineImpl.call(this, resultContinuation);
159
+ this.a3s_1 = _this__u8e3s4;
160
+ this.b3s_1 = message;
161
+ }
162
+ protoOf($logResponseBodyCOROUTINE$1).m9 = function () {
163
+ var suspendResult = this.g9_1;
164
+ $sm: do
165
+ try {
166
+ var tmp = this.e9_1;
167
+ switch (tmp) {
168
+ case 0:
169
+ this.f9_1 = 2;
170
+ this.e9_1 = 1;
171
+ suspendResult = this.a3s_1.o3r_1.qw(this);
172
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
173
+ return suspendResult;
174
+ }
175
+
176
+ continue $sm;
177
+ case 1:
178
+ this.a3s_1.m3r_1.n8(this.b3s_1);
179
+ return Unit_instance;
180
+ case 2:
181
+ throw this.h9_1;
182
+ }
183
+ } catch ($p) {
184
+ var e = $p;
185
+ if (this.f9_1 === 2) {
186
+ throw e;
187
+ } else {
188
+ this.e9_1 = this.f9_1;
189
+ this.h9_1 = e;
190
+ }
191
+ }
192
+ while (true);
193
+ };
194
+ function $closeResponseLogCOROUTINE$2(_this__u8e3s4, resultContinuation) {
195
+ CoroutineImpl.call(this, resultContinuation);
196
+ this.k3s_1 = _this__u8e3s4;
197
+ }
198
+ protoOf($closeResponseLogCOROUTINE$2).m9 = function () {
199
+ var suspendResult = this.g9_1;
200
+ $sm: do
201
+ try {
202
+ var tmp = this.e9_1;
203
+ switch (tmp) {
204
+ case 0:
205
+ this.f9_1 = 2;
206
+ if (!this.k3s_1.q3r_1.atomicfu$compareAndSet(false, true))
207
+ return Unit_instance;
208
+ this.e9_1 = 1;
209
+ suspendResult = this.k3s_1.n3r_1.qw(this);
210
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
211
+ return suspendResult;
212
+ }
213
+
214
+ continue $sm;
215
+ case 1:
216
+ var message = toString(trim(this.k3s_1.m3r_1));
217
+ if (charSequenceLength(message) > 0) {
218
+ this.k3s_1.k3r_1.r3r(message);
219
+ }
220
+
221
+ return Unit_instance;
222
+ case 2:
223
+ throw this.h9_1;
224
+ }
225
+ } catch ($p) {
226
+ var e = $p;
227
+ if (this.f9_1 === 2) {
228
+ throw e;
229
+ } else {
230
+ this.e9_1 = this.f9_1;
231
+ this.h9_1 = e;
232
+ }
233
+ }
234
+ while (true);
235
+ };
236
+ function HttpClientCallLogger(logger) {
237
+ this.k3r_1 = logger;
238
+ this.l3r_1 = StringBuilder_init_$Create$();
239
+ this.m3r_1 = StringBuilder_init_$Create$();
240
+ this.n3r_1 = Job();
241
+ this.o3r_1 = Job();
242
+ this.p3r_1 = atomic$boolean$1(false);
243
+ this.q3r_1 = atomic$boolean$1(false);
244
+ }
245
+ protoOf(HttpClientCallLogger).l3s = function (message) {
246
+ // Inline function 'kotlin.text.appendLine' call
247
+ var this_0 = this.l3r_1;
248
+ // Inline function 'kotlin.text.trim' call
249
+ var value = toString(trim(isCharSequence(message) ? message : THROW_CCE()));
250
+ // Inline function 'kotlin.text.appendLine' call
251
+ this_0.n8(value).o8(_Char___init__impl__6a9atx(10));
252
+ };
253
+ protoOf(HttpClientCallLogger).m3s = function (message) {
254
+ // Inline function 'kotlin.text.appendLine' call
255
+ var this_0 = this.m3r_1;
256
+ // Inline function 'kotlin.text.trim' call
257
+ var value = toString(trim(isCharSequence(message) ? message : THROW_CCE()));
258
+ // Inline function 'kotlin.text.appendLine' call
259
+ this_0.n8(value).o8(_Char___init__impl__6a9atx(10));
260
+ this.o3r_1.pw();
261
+ };
262
+ protoOf(HttpClientCallLogger).n3s = function (message, $completion) {
263
+ var tmp = new $logResponseExceptionCOROUTINE$0(this, message, $completion);
264
+ tmp.g9_1 = Unit_instance;
265
+ tmp.h9_1 = null;
266
+ return tmp.m9();
267
+ };
268
+ protoOf(HttpClientCallLogger).o3s = function (message, $completion) {
269
+ var tmp = new $logResponseBodyCOROUTINE$1(this, message, $completion);
270
+ tmp.g9_1 = Unit_instance;
271
+ tmp.h9_1 = null;
272
+ return tmp.m9();
273
+ };
274
+ protoOf(HttpClientCallLogger).p3s = function () {
275
+ if (!this.p3r_1.atomicfu$compareAndSet(false, true))
276
+ return Unit_instance;
277
+ try {
278
+ var message = toString(trim(this.l3r_1));
279
+ // Inline function 'kotlin.text.isNotEmpty' call
280
+ if (charSequenceLength(message) > 0) {
281
+ this.k3r_1.r3r(message);
282
+ }
283
+ }finally {
284
+ this.n3r_1.pw();
285
+ }
286
+ };
287
+ protoOf(HttpClientCallLogger).q3s = function ($completion) {
288
+ var tmp = new $closeResponseLogCOROUTINE$2(this, $completion);
289
+ tmp.g9_1 = Unit_instance;
290
+ tmp.h9_1 = null;
291
+ return tmp.m9();
292
+ };
293
+ var LogLevel_ALL_instance;
294
+ var LogLevel_HEADERS_instance;
295
+ var LogLevel_BODY_instance;
296
+ var LogLevel_INFO_instance;
297
+ var LogLevel_NONE_instance;
298
+ var LogLevel_entriesInitialized;
299
+ function LogLevel_initEntries() {
300
+ if (LogLevel_entriesInitialized)
301
+ return Unit_instance;
302
+ LogLevel_entriesInitialized = true;
303
+ LogLevel_ALL_instance = new LogLevel('ALL', 0, true, true, true);
304
+ LogLevel_HEADERS_instance = new LogLevel('HEADERS', 1, true, true, false);
305
+ LogLevel_BODY_instance = new LogLevel('BODY', 2, true, false, true);
306
+ LogLevel_INFO_instance = new LogLevel('INFO', 3, true, false, false);
307
+ LogLevel_NONE_instance = new LogLevel('NONE', 4, false, false, false);
308
+ }
309
+ function LogLevel(name, ordinal, info, headers, body) {
310
+ Enum.call(this, name, ordinal);
311
+ this.t3s_1 = info;
312
+ this.u3s_1 = headers;
313
+ this.v3s_1 = body;
314
+ }
315
+ function LogLevel_ALL_getInstance() {
316
+ LogLevel_initEntries();
317
+ return LogLevel_ALL_instance;
318
+ }
319
+ function LogLevel_HEADERS_getInstance() {
320
+ LogLevel_initEntries();
321
+ return LogLevel_HEADERS_instance;
322
+ }
323
+ function LogLevel_NONE_getInstance() {
324
+ LogLevel_initEntries();
325
+ return LogLevel_NONE_instance;
326
+ }
327
+ function LoggedContent(originalContent, channel) {
328
+ ReadChannelContent.call(this);
329
+ this.x3s_1 = originalContent;
330
+ this.y3s_1 = channel;
331
+ this.z3s_1 = this.x3s_1.c2m();
332
+ this.a3t_1 = this.x3s_1.e2m();
333
+ this.b3t_1 = this.x3s_1.d2m();
334
+ this.c3t_1 = this.x3s_1.y2g();
335
+ }
336
+ protoOf(LoggedContent).c2m = function () {
337
+ return this.z3s_1;
338
+ };
339
+ protoOf(LoggedContent).e2m = function () {
340
+ return this.a3t_1;
341
+ };
342
+ protoOf(LoggedContent).d2m = function () {
343
+ return this.b3t_1;
344
+ };
345
+ protoOf(LoggedContent).y2g = function () {
346
+ return this.c3t_1;
347
+ };
348
+ protoOf(LoggedContent).i2m = function () {
349
+ return this.y3s_1;
350
+ };
351
+ function Companion() {
352
+ }
353
+ var Companion_instance;
354
+ function Companion_getInstance() {
355
+ return Companion_instance;
356
+ }
357
+ function get_SIMPLE(_this__u8e3s4) {
358
+ return new SimpleLogger();
359
+ }
360
+ function SimpleLogger() {
361
+ }
362
+ protoOf(SimpleLogger).r3r = function (message) {
363
+ println('HttpClient: ' + message);
364
+ };
365
+ function get_ClientCallLogger() {
366
+ _init_properties_Logging_kt__66pui5();
367
+ return ClientCallLogger;
368
+ }
369
+ var ClientCallLogger;
370
+ function get_DisableLogging() {
371
+ _init_properties_Logging_kt__66pui5();
372
+ return DisableLogging;
373
+ }
374
+ var DisableLogging;
375
+ function Config() {
376
+ var tmp = this;
377
+ // Inline function 'kotlin.collections.mutableListOf' call
378
+ tmp.d3t_1 = ArrayList_init_$Create$();
379
+ var tmp_0 = this;
380
+ // Inline function 'kotlin.collections.mutableListOf' call
381
+ tmp_0.e3t_1 = ArrayList_init_$Create$();
382
+ this.f3t_1 = null;
383
+ this.g3t_1 = LogLevel_HEADERS_getInstance();
384
+ }
385
+ protoOf(Config).h3t = function (value) {
386
+ this.f3t_1 = value;
387
+ };
388
+ protoOf(Config).i3t = function () {
389
+ var tmp0_elvis_lhs = this.f3t_1;
390
+ return tmp0_elvis_lhs == null ? get_DEFAULT(Companion_instance) : tmp0_elvis_lhs;
391
+ };
392
+ function setupRequestLogging($this, client) {
393
+ var tmp = Phases_getInstance().z2s_1;
394
+ client.j2q_1.e2a(tmp, Logging$setupRequestLogging$slambda_0($this, null));
395
+ }
396
+ function logRequest($this, request, $completion) {
397
+ var tmp = request.k2s_1;
398
+ var content = tmp instanceof OutgoingContent ? tmp : THROW_CCE();
399
+ var logger = new HttpClientCallLogger($this.j3t_1);
400
+ request.m2s_1.w22(get_ClientCallLogger(), logger);
401
+ // Inline function 'kotlin.text.buildString' call
402
+ // Inline function 'kotlin.contracts.contract' call
403
+ // Inline function 'kotlin.apply' call
404
+ var this_0 = StringBuilder_init_$Create$();
405
+ // Inline function 'kotlin.contracts.contract' call
406
+ // Inline function 'io.ktor.client.plugins.logging.Logging.logRequest.<anonymous>' call
407
+ if ($this.k3t_1.t3s_1) {
408
+ // Inline function 'kotlin.text.appendLine' call
409
+ var value = 'REQUEST: ' + Url(request.h2s_1).toString();
410
+ // Inline function 'kotlin.text.appendLine' call
411
+ this_0.n8(value).o8(_Char___init__impl__6a9atx(10));
412
+ // Inline function 'kotlin.text.appendLine' call
413
+ var value_0 = 'METHOD: ' + request.i2s_1.toString();
414
+ // Inline function 'kotlin.text.appendLine' call
415
+ this_0.n8(value_0).o8(_Char___init__impl__6a9atx(10));
416
+ }
417
+ if ($this.k3t_1.u3s_1) {
418
+ // Inline function 'kotlin.text.appendLine' call
419
+ var value_1 = 'COMMON HEADERS';
420
+ // Inline function 'kotlin.text.appendLine' call
421
+ this_0.n8(value_1).o8(_Char___init__impl__6a9atx(10));
422
+ logHeaders(this_0, request.j2s_1.x26(), $this.m3t_1);
423
+ // Inline function 'kotlin.text.appendLine' call
424
+ var value_2 = 'CONTENT HEADERS';
425
+ // Inline function 'kotlin.text.appendLine' call
426
+ this_0.n8(value_2).o8(_Char___init__impl__6a9atx(10));
427
+ var tmp$ret$9;
428
+ $l$block: {
429
+ // Inline function 'kotlin.collections.firstOrNull' call
430
+ var tmp0_iterator = $this.m3t_1.j();
431
+ while (tmp0_iterator.k()) {
432
+ var element = tmp0_iterator.l();
433
+ // Inline function 'io.ktor.client.plugins.logging.Logging.logRequest.<anonymous>.<anonymous>' call
434
+ if (element.o3t_1(HttpHeaders_getInstance().k2d_1)) {
435
+ tmp$ret$9 = element;
436
+ break $l$block;
437
+ }
438
+ }
439
+ tmp$ret$9 = null;
440
+ }
441
+ var tmp0_safe_receiver = tmp$ret$9;
442
+ var contentLengthPlaceholder = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n3t_1;
443
+ var tmp$ret$11;
444
+ $l$block_0: {
445
+ // Inline function 'kotlin.collections.firstOrNull' call
446
+ var tmp0_iterator_0 = $this.m3t_1.j();
447
+ while (tmp0_iterator_0.k()) {
448
+ var element_0 = tmp0_iterator_0.l();
449
+ // Inline function 'io.ktor.client.plugins.logging.Logging.logRequest.<anonymous>.<anonymous>' call
450
+ if (element_0.o3t_1(HttpHeaders_getInstance().n2d_1)) {
451
+ tmp$ret$11 = element_0;
452
+ break $l$block_0;
453
+ }
454
+ }
455
+ tmp$ret$11 = null;
456
+ }
457
+ var tmp1_safe_receiver = tmp$ret$11;
458
+ var contentTypePlaceholder = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n3t_1;
459
+ var tmp2_safe_receiver = content.e2m();
460
+ if (tmp2_safe_receiver == null)
461
+ null;
462
+ else {
463
+ // Inline function 'kotlin.let' call
464
+ // Inline function 'kotlin.contracts.contract' call
465
+ var tmp_0 = HttpHeaders_getInstance().k2d_1;
466
+ logHeader(this_0, tmp_0, contentLengthPlaceholder == null ? tmp2_safe_receiver.toString() : contentLengthPlaceholder);
467
+ }
468
+ var tmp3_safe_receiver = content.c2m();
469
+ if (tmp3_safe_receiver == null)
470
+ null;
471
+ else {
472
+ // Inline function 'kotlin.let' call
473
+ // Inline function 'kotlin.contracts.contract' call
474
+ var tmp_1 = HttpHeaders_getInstance().n2d_1;
475
+ logHeader(this_0, tmp_1, contentTypePlaceholder == null ? tmp3_safe_receiver.toString() : contentTypePlaceholder);
476
+ }
477
+ logHeaders(this_0, content.y2g().x26(), $this.m3t_1);
478
+ }
479
+ var message = this_0.toString();
480
+ // Inline function 'kotlin.text.isNotEmpty' call
481
+ if (charSequenceLength(message) > 0) {
482
+ logger.l3s(message);
483
+ }
484
+ var tmp_2;
485
+ // Inline function 'kotlin.text.isEmpty' call
486
+ if (charSequenceLength(message) === 0) {
487
+ tmp_2 = true;
488
+ } else {
489
+ tmp_2 = !$this.k3t_1.v3s_1;
490
+ }
491
+ if (tmp_2) {
492
+ logger.p3s();
493
+ return null;
494
+ }
495
+ return logRequestBody($this, content, logger, $completion);
496
+ }
497
+ function logRequestBody($this, content, logger, $completion) {
498
+ var requestLog = StringBuilder_init_$Create$();
499
+ // Inline function 'kotlin.text.appendLine' call
500
+ var value = 'BODY Content-Type: ' + toString_0(content.c2m());
501
+ // Inline function 'kotlin.text.appendLine' call
502
+ requestLog.n8(value).o8(_Char___init__impl__6a9atx(10));
503
+ var tmp0_safe_receiver = content.c2m();
504
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
505
+ var charset_0 = tmp1_elvis_lhs == null ? Charsets_getInstance().a1z_1 : tmp1_elvis_lhs;
506
+ var channel = ByteChannel();
507
+ var tmp = GlobalScope_instance;
508
+ var tmp_0 = Dispatchers_getInstance().m10_1;
509
+ var tmp_1 = launch(tmp, tmp_0, VOID, Logging$logRequestBody$slambda_0(channel, charset_0, requestLog, null));
510
+ tmp_1.mp(Logging$logRequestBody$lambda(logger, requestLog));
511
+ return observe(content, channel, $completion);
512
+ }
513
+ function logRequestException($this, context, cause) {
514
+ if ($this.k3t_1.t3s_1) {
515
+ $this.j3t_1.r3r('REQUEST ' + Url(context.h2s_1).toString() + ' failed with exception: ' + cause.toString());
516
+ }
517
+ }
518
+ function setupResponseLogging($this, client) {
519
+ var tmp = Phases_getInstance_0().k2z_1;
520
+ client.k2q_1.e2a(tmp, Logging$setupResponseLogging$slambda_0($this, null));
521
+ var tmp_0 = Phases_getInstance_1().f2t_1;
522
+ client.i2q_1.e2a(tmp_0, Logging$setupResponseLogging$slambda_2($this, null));
523
+ if (!$this.k3t_1.v3s_1)
524
+ return Unit_instance;
525
+ var observer = Logging$setupResponseLogging$slambda_4($this, null);
526
+ Plugin_getInstance().d3h(new ResponseObserver(observer), client);
527
+ }
528
+ function logResponseException($this, log, request, cause) {
529
+ if (!$this.k3t_1.t3s_1)
530
+ return Unit_instance;
531
+ log.n8('RESPONSE ' + request.u2u().toString() + ' failed with exception: ' + cause.toString());
532
+ }
533
+ function Companion_0() {
534
+ Companion_instance_0 = this;
535
+ this.p3t_1 = new AttributeKey('ClientLogging');
536
+ }
537
+ protoOf(Companion_0).t = function () {
538
+ return this.p3t_1;
539
+ };
540
+ protoOf(Companion_0).q3t = function (block) {
541
+ // Inline function 'kotlin.apply' call
542
+ var this_0 = new Config();
543
+ // Inline function 'kotlin.contracts.contract' call
544
+ block(this_0);
545
+ var config = this_0;
546
+ return new Logging(config.i3t(), config.g3t_1, config.d3t_1, config.e3t_1);
547
+ };
548
+ protoOf(Companion_0).m2t = function (block) {
549
+ return this.q3t(block);
550
+ };
551
+ protoOf(Companion_0).r3t = function (plugin, scope) {
552
+ setupRequestLogging(plugin, scope);
553
+ setupResponseLogging(plugin, scope);
554
+ };
555
+ protoOf(Companion_0).n2t = function (plugin, scope) {
556
+ return this.r3t(plugin instanceof Logging ? plugin : THROW_CCE(), scope);
557
+ };
558
+ var Companion_instance_0;
559
+ function Companion_getInstance_0() {
560
+ if (Companion_instance_0 == null)
561
+ new Companion_0();
562
+ return Companion_instance_0;
563
+ }
564
+ function shouldBeLogged($this, request) {
565
+ var tmp;
566
+ if ($this.l3t_1.p()) {
567
+ tmp = true;
568
+ } else {
569
+ var tmp$ret$0;
570
+ $l$block_0: {
571
+ // Inline function 'kotlin.collections.any' call
572
+ var this_0 = $this.l3t_1;
573
+ var tmp_0;
574
+ if (isInterface(this_0, Collection)) {
575
+ tmp_0 = this_0.p();
576
+ } else {
577
+ tmp_0 = false;
578
+ }
579
+ if (tmp_0) {
580
+ tmp$ret$0 = false;
581
+ break $l$block_0;
582
+ }
583
+ var tmp0_iterator = this_0.j();
584
+ while (tmp0_iterator.k()) {
585
+ var element = tmp0_iterator.l();
586
+ // Inline function 'io.ktor.client.plugins.logging.Logging.shouldBeLogged.<anonymous>' call
587
+ if (element(request)) {
588
+ tmp$ret$0 = true;
589
+ break $l$block_0;
590
+ }
591
+ }
592
+ tmp$ret$0 = false;
593
+ }
594
+ tmp = tmp$ret$0;
595
+ }
596
+ return tmp;
597
+ }
598
+ function Logging$setupRequestLogging$slambda(this$0, resultContinuation) {
599
+ this.a3u_1 = this$0;
600
+ CoroutineImpl.call(this, resultContinuation);
601
+ }
602
+ protoOf(Logging$setupRequestLogging$slambda).b2r = function ($this$intercept, it, $completion) {
603
+ var tmp = this.c2r($this$intercept, it, $completion);
604
+ tmp.g9_1 = Unit_instance;
605
+ tmp.h9_1 = null;
606
+ return tmp.m9();
607
+ };
608
+ protoOf(Logging$setupRequestLogging$slambda).x9 = function (p1, p2, $completion) {
609
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
610
+ return this.b2r(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
611
+ };
612
+ protoOf(Logging$setupRequestLogging$slambda).m9 = function () {
613
+ var suspendResult = this.g9_1;
614
+ $sm: do
615
+ try {
616
+ var tmp = this.e9_1;
617
+ switch (tmp) {
618
+ case 0:
619
+ this.f9_1 = 8;
620
+ if (!shouldBeLogged(this.a3u_1, this.b3u_1.a2a_1)) {
621
+ this.b3u_1.a2a_1.m2s_1.w22(get_DisableLogging(), Unit_instance);
622
+ return Unit_instance;
623
+ }
624
+
625
+ this.f9_1 = 2;
626
+ this.e9_1 = 1;
627
+ suspendResult = logRequest(this.a3u_1, this.b3u_1.a2a_1, this);
628
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
629
+ return suspendResult;
630
+ }
631
+
632
+ continue $sm;
633
+ case 1:
634
+ this.d3u_1 = suspendResult;
635
+ this.f9_1 = 8;
636
+ this.e9_1 = 3;
637
+ continue $sm;
638
+ case 2:
639
+ this.f9_1 = 8;
640
+ var tmp_0 = this.h9_1;
641
+ if (tmp_0 instanceof Error) {
642
+ this.e3u_1 = this.h9_1;
643
+ var tmp_1 = this;
644
+ tmp_1.d3u_1 = null;
645
+ this.e9_1 = 3;
646
+ continue $sm;
647
+ } else {
648
+ throw this.h9_1;
649
+ }
650
+
651
+ case 3:
652
+ this.f9_1 = 8;
653
+ this.f3u_1 = this.d3u_1;
654
+ this.e9_1 = 4;
655
+ continue $sm;
656
+ case 4:
657
+ this.f9_1 = 7;
658
+ this.f9_1 = 6;
659
+ this.e9_1 = 5;
660
+ var tmp0_elvis_lhs = this.f3u_1;
661
+ suspendResult = this.b3u_1.e29(tmp0_elvis_lhs == null ? this.b3u_1.d29() : tmp0_elvis_lhs, this);
662
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
663
+ return suspendResult;
664
+ }
665
+
666
+ continue $sm;
667
+ case 5:
668
+ var tmp_2 = this;
669
+ tmp_2.g3u_1 = Unit_instance;
670
+ this.f9_1 = 8;
671
+ this.e9_1 = 9;
672
+ continue $sm;
673
+ case 6:
674
+ this.f9_1 = 7;
675
+ var tmp_3 = this.h9_1;
676
+ if (tmp_3 instanceof Error) {
677
+ var cause = this.h9_1;
678
+ var tmp_4 = this;
679
+ logRequestException(this.a3u_1, this.b3u_1.a2a_1, cause);
680
+ throw cause;
681
+ } else {
682
+ throw this.h9_1;
683
+ }
684
+
685
+ case 7:
686
+ this.f9_1 = 8;
687
+ var t = this.h9_1;
688
+ throw t;
689
+ case 8:
690
+ throw this.h9_1;
691
+ case 9:
692
+ this.f9_1 = 8;
693
+ return Unit_instance;
694
+ }
695
+ } catch ($p) {
696
+ var e = $p;
697
+ if (this.f9_1 === 8) {
698
+ throw e;
699
+ } else {
700
+ this.e9_1 = this.f9_1;
701
+ this.h9_1 = e;
702
+ }
703
+ }
704
+ while (true);
705
+ };
706
+ protoOf(Logging$setupRequestLogging$slambda).c2r = function ($this$intercept, it, completion) {
707
+ var i = new Logging$setupRequestLogging$slambda(this.a3u_1, completion);
708
+ i.b3u_1 = $this$intercept;
709
+ i.c3u_1 = it;
710
+ return i;
711
+ };
712
+ function Logging$setupRequestLogging$slambda_0(this$0, resultContinuation) {
713
+ var i = new Logging$setupRequestLogging$slambda(this$0, resultContinuation);
714
+ var l = function ($this$intercept, it, $completion) {
715
+ return i.b2r($this$intercept, it, $completion);
716
+ };
717
+ l.$arity = 2;
718
+ return l;
719
+ }
720
+ function Logging$logRequestBody$slambda($channel, $charset, $requestLog, resultContinuation) {
721
+ this.p3u_1 = $channel;
722
+ this.q3u_1 = $charset;
723
+ this.r3u_1 = $requestLog;
724
+ CoroutineImpl.call(this, resultContinuation);
725
+ }
726
+ protoOf(Logging$logRequestBody$slambda).h1d = function ($this$launch, $completion) {
727
+ var tmp = this.i1d($this$launch, $completion);
728
+ tmp.g9_1 = Unit_instance;
729
+ tmp.h9_1 = null;
730
+ return tmp.m9();
731
+ };
732
+ protoOf(Logging$logRequestBody$slambda).w9 = function (p1, $completion) {
733
+ return this.h1d((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
734
+ };
735
+ protoOf(Logging$logRequestBody$slambda).m9 = function () {
736
+ var suspendResult = this.g9_1;
737
+ $sm: do
738
+ try {
739
+ var tmp = this.e9_1;
740
+ switch (tmp) {
741
+ case 0:
742
+ this.f9_1 = 3;
743
+ var tmp_0 = this;
744
+ tmp_0.t3u_1 = this.p3u_1;
745
+ var tmp_1 = this;
746
+ tmp_1.u3u_1 = this.q3u_1;
747
+ this.f9_1 = 2;
748
+ this.e9_1 = 1;
749
+ suspendResult = this.t3u_1.l1u(VOID, this);
750
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
751
+ return suspendResult;
752
+ }
753
+
754
+ continue $sm;
755
+ case 1:
756
+ var ARGUMENT = suspendResult;
757
+ this.v3u_1 = readText(ARGUMENT, this.u3u_1);
758
+ this.f9_1 = 3;
759
+ this.e9_1 = 4;
760
+ continue $sm;
761
+ case 2:
762
+ this.f9_1 = 3;
763
+ var tmp_2 = this.h9_1;
764
+ if (tmp_2 instanceof Error) {
765
+ var cause = this.h9_1;
766
+ var tmp_3 = this;
767
+ tmp_3.v3u_1 = null;
768
+ this.e9_1 = 4;
769
+ continue $sm;
770
+ } else {
771
+ throw this.h9_1;
772
+ }
773
+
774
+ case 3:
775
+ throw this.h9_1;
776
+ case 4:
777
+ this.f9_1 = 3;
778
+ var tmp0_elvis_lhs = this.v3u_1;
779
+ var text = tmp0_elvis_lhs == null ? '[request body omitted]' : tmp0_elvis_lhs;
780
+ var this_0 = this.r3u_1;
781
+ var value = 'BODY START';
782
+ this_0.n8(value).o8(_Char___init__impl__6a9atx(10));
783
+ this.r3u_1.n8(text).o8(_Char___init__impl__6a9atx(10));
784
+ this.r3u_1.n8('BODY END');
785
+ return Unit_instance;
786
+ }
787
+ } catch ($p) {
788
+ var e = $p;
789
+ if (this.f9_1 === 3) {
790
+ throw e;
791
+ } else {
792
+ this.e9_1 = this.f9_1;
793
+ this.h9_1 = e;
794
+ }
795
+ }
796
+ while (true);
797
+ };
798
+ protoOf(Logging$logRequestBody$slambda).i1d = function ($this$launch, completion) {
799
+ var i = new Logging$logRequestBody$slambda(this.p3u_1, this.q3u_1, this.r3u_1, completion);
800
+ i.s3u_1 = $this$launch;
801
+ return i;
802
+ };
803
+ function Logging$logRequestBody$slambda_0($channel, $charset, $requestLog, resultContinuation) {
804
+ var i = new Logging$logRequestBody$slambda($channel, $charset, $requestLog, resultContinuation);
805
+ var l = function ($this$launch, $completion) {
806
+ return i.h1d($this$launch, $completion);
807
+ };
808
+ l.$arity = 1;
809
+ return l;
810
+ }
811
+ function Logging$logRequestBody$lambda($logger, $requestLog) {
812
+ return function (it) {
813
+ $logger.l3s($requestLog.toString());
814
+ $logger.p3s();
815
+ return Unit_instance;
816
+ };
817
+ }
818
+ function Logging$setupResponseLogging$slambda(this$0, resultContinuation) {
819
+ this.e3v_1 = this$0;
820
+ CoroutineImpl.call(this, resultContinuation);
821
+ }
822
+ protoOf(Logging$setupResponseLogging$slambda).n30 = function ($this$intercept, response, $completion) {
823
+ var tmp = this.o30($this$intercept, response, $completion);
824
+ tmp.g9_1 = Unit_instance;
825
+ tmp.h9_1 = null;
826
+ return tmp.m9();
827
+ };
828
+ protoOf(Logging$setupResponseLogging$slambda).x9 = function (p1, p2, $completion) {
829
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
830
+ return this.n30(tmp, p2 instanceof HttpResponse ? p2 : THROW_CCE(), $completion);
831
+ };
832
+ protoOf(Logging$setupResponseLogging$slambda).m9 = function () {
833
+ var suspendResult = this.g9_1;
834
+ $sm: do
835
+ try {
836
+ var tmp = this.e9_1;
837
+ switch (tmp) {
838
+ case 0:
839
+ this.f9_1 = 10;
840
+ if (this.e3v_1.k3t_1.equals(LogLevel_NONE_getInstance()) || this.g3v_1.p2v().w2t().v22(get_DisableLogging()))
841
+ return Unit_instance;
842
+ this.h3v_1 = this.g3v_1.p2v().w2t().t22(get_ClientCallLogger());
843
+ this.i3v_1 = StringBuilder_init_$Create$();
844
+ this.j3v_1 = false;
845
+ this.e9_1 = 1;
846
+ continue $sm;
847
+ case 1:
848
+ this.f9_1 = 4;
849
+ this.f9_1 = 3;
850
+ logResponseHeader(this.i3v_1, this.g3v_1.p2v().i2r(), this.e3v_1.k3t_1, this.e3v_1.m3t_1);
851
+ this.e9_1 = 2;
852
+ suspendResult = this.f3v_1.e29(this.f3v_1.d29(), this);
853
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
854
+ return suspendResult;
855
+ }
856
+
857
+ continue $sm;
858
+ case 2:
859
+ var tmp_0 = this;
860
+ tmp_0.k3v_1 = Unit_instance;
861
+ this.f9_1 = 10;
862
+ this.e9_1 = 7;
863
+ continue $sm;
864
+ case 3:
865
+ this.f9_1 = 4;
866
+ var tmp_1 = this.h9_1;
867
+ if (tmp_1 instanceof Error) {
868
+ this.l3v_1 = this.h9_1;
869
+ var tmp_2 = this;
870
+ logResponseException(this.e3v_1, this.i3v_1, this.g3v_1.p2v().r2u(), this.l3v_1);
871
+ this.j3v_1 = true;
872
+ throw this.l3v_1;
873
+ } else {
874
+ throw this.h9_1;
875
+ }
876
+
877
+ case 4:
878
+ this.f9_1 = 10;
879
+ this.m3v_1 = this.h9_1;
880
+ this.h3v_1.m3s(this.i3v_1.toString());
881
+ if (this.j3v_1 || !this.e3v_1.k3t_1.v3s_1) {
882
+ this.e9_1 = 5;
883
+ suspendResult = this.h3v_1.q3s(this);
884
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
885
+ return suspendResult;
886
+ }
887
+ continue $sm;
888
+ } else {
889
+ this.e9_1 = 6;
890
+ continue $sm;
891
+ }
892
+
893
+ case 5:
894
+ this.e9_1 = 6;
895
+ continue $sm;
896
+ case 6:
897
+ throw this.m3v_1;
898
+ case 7:
899
+ this.f9_1 = 10;
900
+ this.h3v_1.m3s(this.i3v_1.toString());
901
+ if (this.j3v_1 || !this.e3v_1.k3t_1.v3s_1) {
902
+ this.e9_1 = 8;
903
+ suspendResult = this.h3v_1.q3s(this);
904
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
905
+ return suspendResult;
906
+ }
907
+ continue $sm;
908
+ } else {
909
+ this.e9_1 = 9;
910
+ continue $sm;
911
+ }
912
+
913
+ case 8:
914
+ this.e9_1 = 9;
915
+ continue $sm;
916
+ case 9:
917
+ return Unit_instance;
918
+ case 10:
919
+ throw this.h9_1;
920
+ }
921
+ } catch ($p) {
922
+ var e = $p;
923
+ if (this.f9_1 === 10) {
924
+ throw e;
925
+ } else {
926
+ this.e9_1 = this.f9_1;
927
+ this.h9_1 = e;
928
+ }
929
+ }
930
+ while (true);
931
+ };
932
+ protoOf(Logging$setupResponseLogging$slambda).o30 = function ($this$intercept, response, completion) {
933
+ var i = new Logging$setupResponseLogging$slambda(this.e3v_1, completion);
934
+ i.f3v_1 = $this$intercept;
935
+ i.g3v_1 = response;
936
+ return i;
937
+ };
938
+ function Logging$setupResponseLogging$slambda_0(this$0, resultContinuation) {
939
+ var i = new Logging$setupResponseLogging$slambda(this$0, resultContinuation);
940
+ var l = function ($this$intercept, response, $completion) {
941
+ return i.n30($this$intercept, response, $completion);
942
+ };
943
+ l.$arity = 2;
944
+ return l;
945
+ }
946
+ function Logging$setupResponseLogging$slambda_1(this$0, resultContinuation) {
947
+ this.v3v_1 = this$0;
948
+ CoroutineImpl.call(this, resultContinuation);
949
+ }
950
+ protoOf(Logging$setupResponseLogging$slambda_1).v2r = function ($this$intercept, it, $completion) {
951
+ var tmp = this.w2r($this$intercept, it, $completion);
952
+ tmp.g9_1 = Unit_instance;
953
+ tmp.h9_1 = null;
954
+ return tmp.m9();
955
+ };
956
+ protoOf(Logging$setupResponseLogging$slambda_1).x9 = function (p1, p2, $completion) {
957
+ var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
958
+ return this.v2r(tmp, p2 instanceof HttpResponseContainer ? p2 : THROW_CCE(), $completion);
959
+ };
960
+ protoOf(Logging$setupResponseLogging$slambda_1).m9 = function () {
961
+ var suspendResult = this.g9_1;
962
+ $sm: do
963
+ try {
964
+ var tmp = this.e9_1;
965
+ switch (tmp) {
966
+ case 0:
967
+ this.f9_1 = 6;
968
+ if (this.v3v_1.k3t_1.equals(LogLevel_NONE_getInstance()) || this.w3v_1.a2a_1.w2t().v22(get_DisableLogging())) {
969
+ return Unit_instance;
970
+ }
971
+
972
+ this.f9_1 = 3;
973
+ this.e9_1 = 1;
974
+ suspendResult = this.w3v_1.f29(this);
975
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
976
+ return suspendResult;
977
+ }
978
+
979
+ continue $sm;
980
+ case 1:
981
+ this.f9_1 = 6;
982
+ this.e9_1 = 2;
983
+ continue $sm;
984
+ case 2:
985
+ this.f9_1 = 6;
986
+ return Unit_instance;
987
+ case 3:
988
+ this.f9_1 = 6;
989
+ var tmp_0 = this.h9_1;
990
+ if (tmp_0 instanceof Error) {
991
+ this.y3v_1 = this.h9_1;
992
+ this.z3v_1 = StringBuilder_init_$Create$();
993
+ this.a3w_1 = this.w3v_1.a2a_1.w2t().t22(get_ClientCallLogger());
994
+ logResponseException(this.v3v_1, this.z3v_1, this.w3v_1.a2a_1.r2u(), this.y3v_1);
995
+ this.e9_1 = 4;
996
+ suspendResult = this.a3w_1.n3s(this.z3v_1.toString(), this);
997
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
998
+ return suspendResult;
999
+ }
1000
+ continue $sm;
1001
+ } else {
1002
+ throw this.h9_1;
1003
+ }
1004
+
1005
+ case 4:
1006
+ this.e9_1 = 5;
1007
+ suspendResult = this.a3w_1.q3s(this);
1008
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1009
+ return suspendResult;
1010
+ }
1011
+
1012
+ continue $sm;
1013
+ case 5:
1014
+ throw this.y3v_1;
1015
+ case 6:
1016
+ throw this.h9_1;
1017
+ }
1018
+ } catch ($p) {
1019
+ var e = $p;
1020
+ if (this.f9_1 === 6) {
1021
+ throw e;
1022
+ } else {
1023
+ this.e9_1 = this.f9_1;
1024
+ this.h9_1 = e;
1025
+ }
1026
+ }
1027
+ while (true);
1028
+ };
1029
+ protoOf(Logging$setupResponseLogging$slambda_1).w2r = function ($this$intercept, it, completion) {
1030
+ var i = new Logging$setupResponseLogging$slambda_1(this.v3v_1, completion);
1031
+ i.w3v_1 = $this$intercept;
1032
+ i.x3v_1 = it;
1033
+ return i;
1034
+ };
1035
+ function Logging$setupResponseLogging$slambda_2(this$0, resultContinuation) {
1036
+ var i = new Logging$setupResponseLogging$slambda_1(this$0, resultContinuation);
1037
+ var l = function ($this$intercept, it, $completion) {
1038
+ return i.v2r($this$intercept, it, $completion);
1039
+ };
1040
+ l.$arity = 2;
1041
+ return l;
1042
+ }
1043
+ function Logging$setupResponseLogging$slambda_3(this$0, resultContinuation) {
1044
+ this.j3w_1 = this$0;
1045
+ CoroutineImpl.call(this, resultContinuation);
1046
+ }
1047
+ protoOf(Logging$setupResponseLogging$slambda_3).f32 = function (it, $completion) {
1048
+ var tmp = this.g32(it, $completion);
1049
+ tmp.g9_1 = Unit_instance;
1050
+ tmp.h9_1 = null;
1051
+ return tmp.m9();
1052
+ };
1053
+ protoOf(Logging$setupResponseLogging$slambda_3).w9 = function (p1, $completion) {
1054
+ return this.f32(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
1055
+ };
1056
+ protoOf(Logging$setupResponseLogging$slambda_3).m9 = function () {
1057
+ var suspendResult = this.g9_1;
1058
+ $sm: do
1059
+ try {
1060
+ var tmp = this.e9_1;
1061
+ switch (tmp) {
1062
+ case 0:
1063
+ this.f9_1 = 10;
1064
+ if (this.j3w_1.k3t_1.equals(LogLevel_NONE_getInstance()) || this.k3w_1.p2v().w2t().v22(get_DisableLogging())) {
1065
+ return Unit_instance;
1066
+ }
1067
+
1068
+ this.l3w_1 = this.k3w_1.p2v().w2t().t22(get_ClientCallLogger());
1069
+ this.m3w_1 = StringBuilder_init_$Create$();
1070
+ this.e9_1 = 1;
1071
+ continue $sm;
1072
+ case 1:
1073
+ this.f9_1 = 4;
1074
+ this.f9_1 = 3;
1075
+ this.e9_1 = 2;
1076
+ suspendResult = logResponseBody(this.m3w_1, contentType(this.k3w_1), this.k3w_1.s2u(), this);
1077
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1078
+ return suspendResult;
1079
+ }
1080
+
1081
+ continue $sm;
1082
+ case 2:
1083
+ this.n3w_1 = suspendResult;
1084
+ this.f9_1 = 10;
1085
+ this.e9_1 = 7;
1086
+ continue $sm;
1087
+ case 3:
1088
+ this.f9_1 = 4;
1089
+ var tmp_0 = this.h9_1;
1090
+ if (tmp_0 instanceof Error) {
1091
+ this.o3w_1 = this.h9_1;
1092
+ var tmp_1 = this;
1093
+ tmp_1.n3w_1 = Unit_instance;
1094
+ this.f9_1 = 10;
1095
+ this.e9_1 = 7;
1096
+ continue $sm;
1097
+ } else {
1098
+ throw this.h9_1;
1099
+ }
1100
+
1101
+ case 4:
1102
+ this.f9_1 = 10;
1103
+ this.p3w_1 = this.h9_1;
1104
+ this.e9_1 = 5;
1105
+ var this_0 = this.m3w_1.toString();
1106
+ suspendResult = this.l3w_1.o3s(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE())), this);
1107
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1108
+ return suspendResult;
1109
+ }
1110
+
1111
+ continue $sm;
1112
+ case 5:
1113
+ this.e9_1 = 6;
1114
+ suspendResult = this.l3w_1.q3s(this);
1115
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1116
+ return suspendResult;
1117
+ }
1118
+
1119
+ continue $sm;
1120
+ case 6:
1121
+ throw this.p3w_1;
1122
+ case 7:
1123
+ this.f9_1 = 10;
1124
+ this.e9_1 = 8;
1125
+ var this_1 = this.m3w_1.toString();
1126
+ suspendResult = this.l3w_1.o3s(toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE())), this);
1127
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1128
+ return suspendResult;
1129
+ }
1130
+
1131
+ continue $sm;
1132
+ case 8:
1133
+ this.e9_1 = 9;
1134
+ suspendResult = this.l3w_1.q3s(this);
1135
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1136
+ return suspendResult;
1137
+ }
1138
+
1139
+ continue $sm;
1140
+ case 9:
1141
+ return Unit_instance;
1142
+ case 10:
1143
+ throw this.h9_1;
1144
+ }
1145
+ } catch ($p) {
1146
+ var e = $p;
1147
+ if (this.f9_1 === 10) {
1148
+ throw e;
1149
+ } else {
1150
+ this.e9_1 = this.f9_1;
1151
+ this.h9_1 = e;
1152
+ }
1153
+ }
1154
+ while (true);
1155
+ };
1156
+ protoOf(Logging$setupResponseLogging$slambda_3).g32 = function (it, completion) {
1157
+ var i = new Logging$setupResponseLogging$slambda_3(this.j3w_1, completion);
1158
+ i.k3w_1 = it;
1159
+ return i;
1160
+ };
1161
+ function Logging$setupResponseLogging$slambda_4(this$0, resultContinuation) {
1162
+ var i = new Logging$setupResponseLogging$slambda_3(this$0, resultContinuation);
1163
+ var l = function (it, $completion) {
1164
+ return i.f32(it, $completion);
1165
+ };
1166
+ l.$arity = 1;
1167
+ return l;
1168
+ }
1169
+ function Logging(logger, level, filters, sanitizedHeaders) {
1170
+ Companion_getInstance_0();
1171
+ filters = filters === VOID ? emptyList() : filters;
1172
+ this.j3t_1 = logger;
1173
+ this.k3t_1 = level;
1174
+ this.l3t_1 = filters;
1175
+ this.m3t_1 = sanitizedHeaders;
1176
+ }
1177
+ var properties_initialized_Logging_kt_588vu7;
1178
+ function _init_properties_Logging_kt__66pui5() {
1179
+ if (!properties_initialized_Logging_kt_588vu7) {
1180
+ properties_initialized_Logging_kt_588vu7 = true;
1181
+ ClientCallLogger = new AttributeKey('CallLogger');
1182
+ DisableLogging = new AttributeKey('DisableLogging');
1183
+ }
1184
+ }
1185
+ function logHeaders(_this__u8e3s4, headers, sanitizedHeaders) {
1186
+ // Inline function 'kotlin.collections.sortedBy' call
1187
+ var this_0 = toList(headers);
1188
+ // Inline function 'kotlin.comparisons.compareBy' call
1189
+ var tmp = logHeaders$lambda;
1190
+ var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
1191
+ var sortedHeaders = sortedWith(this_0, tmp$ret$0);
1192
+ // Inline function 'kotlin.collections.forEach' call
1193
+ var tmp0_iterator = sortedHeaders.j();
1194
+ while (tmp0_iterator.k()) {
1195
+ var element = tmp0_iterator.l();
1196
+ // Inline function 'io.ktor.client.plugins.logging.logHeaders.<anonymous>' call
1197
+ // Inline function 'kotlin.collections.component1' call
1198
+ var key = element.t();
1199
+ // Inline function 'kotlin.collections.component2' call
1200
+ var values = element.u();
1201
+ var tmp$ret$5;
1202
+ $l$block: {
1203
+ // Inline function 'kotlin.collections.firstOrNull' call
1204
+ var tmp0_iterator_0 = sanitizedHeaders.j();
1205
+ while (tmp0_iterator_0.k()) {
1206
+ var element_0 = tmp0_iterator_0.l();
1207
+ // Inline function 'io.ktor.client.plugins.logging.logHeaders.<anonymous>.<anonymous>' call
1208
+ if (element_0.o3t_1(key)) {
1209
+ tmp$ret$5 = element_0;
1210
+ break $l$block;
1211
+ }
1212
+ }
1213
+ tmp$ret$5 = null;
1214
+ }
1215
+ var tmp0_safe_receiver = tmp$ret$5;
1216
+ var placeholder = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n3t_1;
1217
+ logHeader(_this__u8e3s4, key, placeholder == null ? joinToString(values, '; ') : placeholder);
1218
+ }
1219
+ }
1220
+ function logHeader(_this__u8e3s4, key, value) {
1221
+ // Inline function 'kotlin.text.appendLine' call
1222
+ var value_0 = '-> ' + key + ': ' + value;
1223
+ // Inline function 'kotlin.text.appendLine' call
1224
+ _this__u8e3s4.f(value_0).o8(_Char___init__impl__6a9atx(10));
1225
+ }
1226
+ function logResponseHeader(log, response, level, sanitizedHeaders) {
1227
+ // Inline function 'kotlin.with' call
1228
+ // Inline function 'kotlin.contracts.contract' call
1229
+ if (level.t3s_1) {
1230
+ // Inline function 'kotlin.text.appendLine' call
1231
+ var value = 'RESPONSE: ' + response.d2m().toString();
1232
+ // Inline function 'kotlin.text.appendLine' call
1233
+ log.n8(value).o8(_Char___init__impl__6a9atx(10));
1234
+ // Inline function 'kotlin.text.appendLine' call
1235
+ var value_0 = 'METHOD: ' + response.p2v().r2u().q2v().toString();
1236
+ // Inline function 'kotlin.text.appendLine' call
1237
+ log.n8(value_0).o8(_Char___init__impl__6a9atx(10));
1238
+ // Inline function 'kotlin.text.appendLine' call
1239
+ var value_1 = 'FROM: ' + response.p2v().r2u().u2u().toString();
1240
+ // Inline function 'kotlin.text.appendLine' call
1241
+ log.n8(value_1).o8(_Char___init__impl__6a9atx(10));
1242
+ }
1243
+ if (level.u3s_1) {
1244
+ // Inline function 'kotlin.text.appendLine' call
1245
+ var value_2 = 'COMMON HEADERS';
1246
+ // Inline function 'kotlin.text.appendLine' call
1247
+ log.n8(value_2).o8(_Char___init__impl__6a9atx(10));
1248
+ logHeaders(log, response.y2g().x26(), sanitizedHeaders);
1249
+ }
1250
+ }
1251
+ function logResponseBody(log, contentType, content, $completion) {
1252
+ var tmp = new $logResponseBodyCOROUTINE$4(log, contentType, content, $completion);
1253
+ tmp.g9_1 = Unit_instance;
1254
+ tmp.h9_1 = null;
1255
+ return tmp.m9();
1256
+ }
1257
+ function sam$kotlin_Comparator$0(function_0) {
1258
+ this.g3x_1 = function_0;
1259
+ }
1260
+ protoOf(sam$kotlin_Comparator$0).mc = function (a, b) {
1261
+ return this.g3x_1(a, b);
1262
+ };
1263
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
1264
+ return this.mc(a, b);
1265
+ };
1266
+ protoOf(sam$kotlin_Comparator$0).o3 = function () {
1267
+ return this.g3x_1;
1268
+ };
1269
+ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
1270
+ var tmp;
1271
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
1272
+ var tmp_0;
1273
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
1274
+ tmp_0 = equals(this.o3(), other.o3());
1275
+ } else {
1276
+ tmp_0 = false;
1277
+ }
1278
+ tmp = tmp_0;
1279
+ } else {
1280
+ tmp = false;
1281
+ }
1282
+ return tmp;
1283
+ };
1284
+ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
1285
+ return hashCode(this.o3());
1286
+ };
1287
+ function logHeaders$lambda(a, b) {
1288
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
1289
+ // Inline function 'io.ktor.client.plugins.logging.logHeaders.<anonymous>' call
1290
+ var tmp = a.t();
1291
+ // Inline function 'io.ktor.client.plugins.logging.logHeaders.<anonymous>' call
1292
+ var tmp$ret$1 = b.t();
1293
+ return compareValues(tmp, tmp$ret$1);
1294
+ }
1295
+ function $logResponseBodyCOROUTINE$4(log, contentType, content, resultContinuation) {
1296
+ CoroutineImpl.call(this, resultContinuation);
1297
+ this.y3w_1 = log;
1298
+ this.z3w_1 = contentType;
1299
+ this.a3x_1 = content;
1300
+ }
1301
+ protoOf($logResponseBodyCOROUTINE$4).m9 = function () {
1302
+ var suspendResult = this.g9_1;
1303
+ $sm: do
1304
+ try {
1305
+ var tmp = this.e9_1;
1306
+ switch (tmp) {
1307
+ case 0:
1308
+ this.f9_1 = 4;
1309
+ var tmp_0 = this;
1310
+ tmp_0.b3x_1 = this.y3w_1;
1311
+ var tmp_1 = this;
1312
+ tmp_1.c3x_1 = this.b3x_1;
1313
+ var this_0 = this.c3x_1;
1314
+ var value = 'BODY Content-Type: ' + toString_0(this.z3w_1);
1315
+ this_0.n8(value).o8(_Char___init__impl__6a9atx(10));
1316
+ var this_1 = this.c3x_1;
1317
+ var value_0 = 'BODY START';
1318
+ this_1.n8(value_0).o8(_Char___init__impl__6a9atx(10));
1319
+ var tmp_2 = this;
1320
+ tmp_2.d3x_1 = this.a3x_1;
1321
+ var tmp_3 = this;
1322
+ var tmp0_safe_receiver = this.z3w_1;
1323
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
1324
+ tmp_3.e3x_1 = tmp1_elvis_lhs == null ? Charsets_getInstance().a1z_1 : tmp1_elvis_lhs;
1325
+ this.f9_1 = 2;
1326
+ this.e9_1 = 1;
1327
+ suspendResult = this.d3x_1.l1u(VOID, this);
1328
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1329
+ return suspendResult;
1330
+ }
1331
+
1332
+ continue $sm;
1333
+ case 1:
1334
+ var ARGUMENT = suspendResult;
1335
+ this.f3x_1 = readText(ARGUMENT, this.e3x_1);
1336
+ this.f9_1 = 4;
1337
+ this.e9_1 = 3;
1338
+ continue $sm;
1339
+ case 2:
1340
+ this.f9_1 = 4;
1341
+ var tmp_4 = this.h9_1;
1342
+ if (tmp_4 instanceof Error) {
1343
+ var cause = this.h9_1;
1344
+ var tmp_5 = this;
1345
+ tmp_5.f3x_1 = null;
1346
+ this.e9_1 = 3;
1347
+ continue $sm;
1348
+ } else {
1349
+ throw this.h9_1;
1350
+ }
1351
+
1352
+ case 3:
1353
+ this.f9_1 = 4;
1354
+ var tmp2_elvis_lhs = this.f3x_1;
1355
+ var message = tmp2_elvis_lhs == null ? '[response body omitted]' : tmp2_elvis_lhs;
1356
+ this.c3x_1.n8(message).o8(_Char___init__impl__6a9atx(10));
1357
+ this.c3x_1.n8('BODY END');
1358
+ return Unit_instance;
1359
+ case 4:
1360
+ throw this.h9_1;
1361
+ }
1362
+ } catch ($p) {
1363
+ var e = $p;
1364
+ if (this.f9_1 === 4) {
1365
+ throw e;
1366
+ } else {
1367
+ this.e9_1 = this.f9_1;
1368
+ this.h9_1 = e;
1369
+ }
1370
+ }
1371
+ while (true);
1372
+ };
1373
+ function observe(_this__u8e3s4, log, $completion) {
1374
+ var tmp = new $observeCOROUTINE$5(_this__u8e3s4, log, $completion);
1375
+ tmp.g9_1 = Unit_instance;
1376
+ tmp.h9_1 = null;
1377
+ return tmp.m9();
1378
+ }
1379
+ function toReadChannel(_this__u8e3s4) {
1380
+ var tmp = GlobalScope_instance;
1381
+ var tmp_0 = Dispatchers_getInstance().l10_1;
1382
+ return writer(tmp, tmp_0, VOID, toReadChannel$slambda_0(_this__u8e3s4, null)).i11();
1383
+ }
1384
+ function toReadChannel$slambda($this_toReadChannel, resultContinuation) {
1385
+ this.b3y_1 = $this_toReadChannel;
1386
+ CoroutineImpl.call(this, resultContinuation);
1387
+ }
1388
+ protoOf(toReadChannel$slambda).n2w = function ($this$writer, $completion) {
1389
+ var tmp = this.o2w($this$writer, $completion);
1390
+ tmp.g9_1 = Unit_instance;
1391
+ tmp.h9_1 = null;
1392
+ return tmp.m9();
1393
+ };
1394
+ protoOf(toReadChannel$slambda).w9 = function (p1, $completion) {
1395
+ return this.n2w((!(p1 == null) ? isInterface(p1, WriterScope) : false) ? p1 : THROW_CCE(), $completion);
1396
+ };
1397
+ protoOf(toReadChannel$slambda).m9 = function () {
1398
+ var suspendResult = this.g9_1;
1399
+ $sm: do
1400
+ try {
1401
+ var tmp = this.e9_1;
1402
+ switch (tmp) {
1403
+ case 0:
1404
+ this.f9_1 = 2;
1405
+ this.e9_1 = 1;
1406
+ suspendResult = this.b3y_1.k2m(this.c3y_1.i11(), this);
1407
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1408
+ return suspendResult;
1409
+ }
1410
+
1411
+ continue $sm;
1412
+ case 1:
1413
+ return Unit_instance;
1414
+ case 2:
1415
+ throw this.h9_1;
1416
+ }
1417
+ } catch ($p) {
1418
+ var e = $p;
1419
+ if (this.f9_1 === 2) {
1420
+ throw e;
1421
+ } else {
1422
+ this.e9_1 = this.f9_1;
1423
+ this.h9_1 = e;
1424
+ }
1425
+ }
1426
+ while (true);
1427
+ };
1428
+ protoOf(toReadChannel$slambda).o2w = function ($this$writer, completion) {
1429
+ var i = new toReadChannel$slambda(this.b3y_1, completion);
1430
+ i.c3y_1 = $this$writer;
1431
+ return i;
1432
+ };
1433
+ function toReadChannel$slambda_0($this_toReadChannel, resultContinuation) {
1434
+ var i = new toReadChannel$slambda($this_toReadChannel, resultContinuation);
1435
+ var l = function ($this$writer, $completion) {
1436
+ return i.n2w($this$writer, $completion);
1437
+ };
1438
+ l.$arity = 1;
1439
+ return l;
1440
+ }
1441
+ function $observeCOROUTINE$5(_this__u8e3s4, log, resultContinuation) {
1442
+ CoroutineImpl.call(this, resultContinuation);
1443
+ this.p3x_1 = _this__u8e3s4;
1444
+ this.q3x_1 = log;
1445
+ }
1446
+ protoOf($observeCOROUTINE$5).m9 = function () {
1447
+ var suspendResult = this.g9_1;
1448
+ $sm: do
1449
+ try {
1450
+ var tmp = this.e9_1;
1451
+ switch (tmp) {
1452
+ case 0:
1453
+ this.f9_1 = 3;
1454
+ this.r3x_1 = this.p3x_1;
1455
+ var tmp_0 = this.r3x_1;
1456
+ if (tmp_0 instanceof ByteArrayContent) {
1457
+ this.e9_1 = 1;
1458
+ suspendResult = writeFully(this.q3x_1, this.p3x_1.f2m(), this);
1459
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1460
+ return suspendResult;
1461
+ }
1462
+ continue $sm;
1463
+ } else {
1464
+ var tmp_1 = this.r3x_1;
1465
+ if (tmp_1 instanceof ReadChannelContent) {
1466
+ var tmp_2 = this;
1467
+ var responseChannel = ByteChannel();
1468
+ var content = this.p3x_1.i2m();
1469
+ copyToBoth(content, this.q3x_1, responseChannel);
1470
+ tmp_2.s3x_1 = new LoggedContent(this.p3x_1, responseChannel);
1471
+ this.e9_1 = 2;
1472
+ continue $sm;
1473
+ } else {
1474
+ var tmp_3 = this.r3x_1;
1475
+ if (tmp_3 instanceof WriteChannelContent) {
1476
+ var tmp_4 = this;
1477
+ var responseChannel_0 = ByteChannel();
1478
+ var content_0 = toReadChannel(this.p3x_1);
1479
+ copyToBoth(content_0, this.q3x_1, responseChannel_0);
1480
+ tmp_4.s3x_1 = new LoggedContent(this.p3x_1, responseChannel_0);
1481
+ this.e9_1 = 2;
1482
+ continue $sm;
1483
+ } else {
1484
+ var tmp_5 = this;
1485
+ close(this.q3x_1);
1486
+ tmp_5.s3x_1 = this.p3x_1;
1487
+ this.e9_1 = 2;
1488
+ continue $sm;
1489
+ }
1490
+ }
1491
+ }
1492
+
1493
+ case 1:
1494
+ close(this.q3x_1);
1495
+ this.s3x_1 = this.p3x_1;
1496
+ this.e9_1 = 2;
1497
+ continue $sm;
1498
+ case 2:
1499
+ return this.s3x_1;
1500
+ case 3:
1501
+ throw this.h9_1;
1502
+ }
1503
+ } catch ($p) {
1504
+ var e = $p;
1505
+ if (this.f9_1 === 3) {
1506
+ throw e;
1507
+ } else {
1508
+ this.e9_1 = this.f9_1;
1509
+ this.h9_1 = e;
1510
+ }
1511
+ }
1512
+ while (true);
1513
+ };
1514
+ function get_DEFAULT(_this__u8e3s4) {
1515
+ return get_SIMPLE(_this__u8e3s4);
1516
+ }
1517
+ //region block: init
1518
+ Companion_instance = new Companion();
1519
+ //endregion
1520
+ //region block: exports
1521
+ _.$_$ = _.$_$ || {};
1522
+ _.$_$.a = LogLevel_ALL_getInstance;
1523
+ _.$_$.b = Companion_instance;
1524
+ _.$_$.c = Companion_getInstance_0;
1525
+ _.$_$.d = get_DEFAULT;
1526
+ //endregion
1527
+ return _;
1528
+ }));
1529
+
1530
+ //# sourceMappingURL=ktor-ktor-client-logging.js.map