game_client_logic_deb 1.8.147 → 1.8.185

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