client_plugin_logic_deb 1.8.305 → 1.8.310

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 (38) hide show
  1. package/Kosi-Kaverit-kaverit.js +58 -58
  2. package/Kosi-Kodein-kodein-di.js +519 -519
  3. package/Kotlin-DateTime-library-kotlinx-datetime.js +14 -14
  4. package/Logic_Debertz-client_plugin.d.ts +1 -0
  5. package/Logic_Debertz-client_plugin.js +2242 -2220
  6. package/Logic_Debertz-client_plugin.js.map +1 -1
  7. package/Logic_Debertz-core.js +1633 -1699
  8. package/Logic_Debertz-core.js.map +1 -1
  9. package/Logic_Debertz-engine.js +11173 -11175
  10. package/Logic_Debertz-engine.js.map +1 -1
  11. package/Logic_Debertz-game_client.js +5480 -5460
  12. package/Logic_Debertz-game_client.js.map +1 -1
  13. package/Logic_Debertz-game_server.js +872 -872
  14. package/kotlin-kotlin-stdlib.js +86 -73
  15. package/kotlin-kotlin-stdlib.js.map +1 -1
  16. package/kotlinx-atomicfu.js +1 -1
  17. package/kotlinx-coroutines-core.js +24 -24
  18. package/kotlinx-coroutines-core.js.map +1 -1
  19. package/kotlinx-io-kotlinx-io-core.js +316 -316
  20. package/kotlinx-serialization-kotlinx-serialization-core.js +29 -29
  21. package/kotlinx-serialization-kotlinx-serialization-json.js +26 -26
  22. package/ktor-ktor-client-content-negotiation.js +4 -4
  23. package/ktor-ktor-client-core.js +17 -17
  24. package/ktor-ktor-client-logging.js +5 -5
  25. package/ktor-ktor-events.js +2 -2
  26. package/ktor-ktor-http.js +15 -15
  27. package/ktor-ktor-io.js +8 -8
  28. package/ktor-ktor-serialization-kotlinx.js +1 -1
  29. package/ktor-ktor-serialization.js +3 -3
  30. package/ktor-ktor-utils.js +11 -11
  31. package/ktor-ktor-websockets.js +3 -3
  32. package/package.json +1 -1
  33. package/raspberry-cardgame-lib-core.js +183 -183
  34. package/raspberry-cardgame-lib-logger.js +4 -4
  35. package/raspberry-cardgame-lib-random.js +332 -230
  36. package/raspberry-cardgame-lib-random.js.map +1 -1
  37. package/secure-random-secure-random.js +3 -3
  38. package/uuid.js +2 -2
@@ -1,8 +1,8 @@
1
1
  (function (factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlinx-serialization-kotlinx-serialization-json.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js', './ktor-ktor-http.js', './kotlinx-coroutines-core.js', './uuid.js', './Kotlin-DateTime-library-kotlinx-datetime.js', './ktor-ktor-client-logging.js', './ktor-ktor-serialization-kotlinx-json.js', './ktor-ktor-client-content-negotiation.js', './secure-random-secure-random.js', './raspberry-cardgame-lib-logger.js'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlinx-serialization-kotlinx-serialization-json.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js', './ktor-ktor-http.js', './Kotlin-DateTime-library-kotlinx-datetime.js', './kotlinx-coroutines-core.js', './uuid.js', './ktor-ktor-client-logging.js', './ktor-ktor-serialization-kotlinx-json.js', './ktor-ktor-client-content-negotiation.js', './secure-random-secure-random.js', './raspberry-cardgame-lib-logger.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js'), require('./uuid.js'), require('./Kotlin-DateTime-library-kotlinx-datetime.js'), require('./ktor-ktor-client-logging.js'), require('./ktor-ktor-serialization-kotlinx-json.js'), require('./ktor-ktor-client-content-negotiation.js'), require('./secure-random-secure-random.js'), require('./raspberry-cardgame-lib-logger.js'));
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-http.js'), require('./Kotlin-DateTime-library-kotlinx-datetime.js'), require('./kotlinx-coroutines-core.js'), require('./uuid.js'), require('./ktor-ktor-client-logging.js'), require('./ktor-ktor-serialization-kotlinx-json.js'), require('./ktor-ktor-client-content-negotiation.js'), require('./secure-random-secure-random.js'), require('./raspberry-cardgame-lib-logger.js'));
6
6
  else {
7
7
  if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
8
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'raspberry-cardgame-lib-random'.");
@@ -22,15 +22,15 @@
22
22
  if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
23
23
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'raspberry-cardgame-lib-random'.");
24
24
  }
25
+ if (typeof globalThis['Kotlin-DateTime-library-kotlinx-datetime'] === 'undefined') {
26
+ throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'Kotlin-DateTime-library-kotlinx-datetime' was not found. Please, check whether 'Kotlin-DateTime-library-kotlinx-datetime' is loaded prior to 'raspberry-cardgame-lib-random'.");
27
+ }
25
28
  if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
26
29
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'raspberry-cardgame-lib-random'.");
27
30
  }
28
31
  if (typeof uuid === 'undefined') {
29
32
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'uuid' was not found. Please, check whether 'uuid' is loaded prior to 'raspberry-cardgame-lib-random'.");
30
33
  }
31
- if (typeof globalThis['Kotlin-DateTime-library-kotlinx-datetime'] === 'undefined') {
32
- throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'Kotlin-DateTime-library-kotlinx-datetime' was not found. Please, check whether 'Kotlin-DateTime-library-kotlinx-datetime' is loaded prior to 'raspberry-cardgame-lib-random'.");
33
- }
34
34
  if (typeof globalThis['ktor-ktor-client-logging'] === 'undefined') {
35
35
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'ktor-ktor-client-logging' was not found. Please, check whether 'ktor-ktor-client-logging' is loaded prior to 'raspberry-cardgame-lib-random'.");
36
36
  }
@@ -46,22 +46,22 @@
46
46
  if (typeof globalThis['raspberry-cardgame-lib-logger'] === 'undefined') {
47
47
  throw new Error("Error loading module 'raspberry-cardgame-lib-random'. Its dependency 'raspberry-cardgame-lib-logger' was not found. Please, check whether 'raspberry-cardgame-lib-logger' is loaded prior to 'raspberry-cardgame-lib-random'.");
48
48
  }
49
- globalThis['raspberry-cardgame-lib-random'] = factory(typeof globalThis['raspberry-cardgame-lib-random'] === 'undefined' ? {} : globalThis['raspberry-cardgame-lib-random'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['kotlinx-serialization-kotlinx-serialization-json'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils'], globalThis['ktor-ktor-http'], globalThis['kotlinx-coroutines-core'], uuid, globalThis['Kotlin-DateTime-library-kotlinx-datetime'], globalThis['ktor-ktor-client-logging'], globalThis['ktor-ktor-serialization-kotlinx-json'], globalThis['ktor-ktor-client-content-negotiation'], globalThis['secure-random-secure-random'], globalThis['raspberry-cardgame-lib-logger']);
49
+ globalThis['raspberry-cardgame-lib-random'] = factory(typeof globalThis['raspberry-cardgame-lib-random'] === 'undefined' ? {} : globalThis['raspberry-cardgame-lib-random'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['kotlinx-serialization-kotlinx-serialization-json'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils'], globalThis['ktor-ktor-http'], globalThis['Kotlin-DateTime-library-kotlinx-datetime'], globalThis['kotlinx-coroutines-core'], uuid, globalThis['ktor-ktor-client-logging'], globalThis['ktor-ktor-serialization-kotlinx-json'], globalThis['ktor-ktor-client-content-negotiation'], globalThis['secure-random-secure-random'], globalThis['raspberry-cardgame-lib-logger']);
50
50
  }
51
- }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_benasher44_uuid, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_io_ktor_ktor_client_logging, kotlin_io_ktor_ktor_serialization_kotlinx_json, kotlin_io_ktor_ktor_client_content_negotiation, kotlin_org_kotlincrypto_secure_random, kotlin_io_raspberryapps_cardgame_logger) {
51
+ }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_benasher44_uuid, kotlin_io_ktor_ktor_client_logging, kotlin_io_ktor_ktor_serialization_kotlinx_json, kotlin_io_ktor_ktor_client_content_negotiation, kotlin_org_kotlincrypto_secure_random, kotlin_io_raspberryapps_cardgame_logger) {
52
52
  'use strict';
53
53
  //region block: imports
54
54
  var imul = Math.imul;
55
55
  var clz32 = Math.clz32;
56
56
  var protoOf = kotlin_kotlin.$_$.vc;
57
57
  var initMetadataForCompanion = kotlin_kotlin.$_$.vb;
58
- var RuntimeException = kotlin_kotlin.$_$.sg;
58
+ var RuntimeException = kotlin_kotlin.$_$.tg;
59
59
  var VOID = kotlin_kotlin.$_$.f;
60
60
  var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.i2;
61
61
  var captureStack = kotlin_kotlin.$_$.eb;
62
62
  var initMetadataForClass = kotlin_kotlin.$_$.ub;
63
63
  var getStringHashCode = kotlin_kotlin.$_$.sb;
64
- var THROW_CCE = kotlin_kotlin.$_$.tg;
64
+ var THROW_CCE = kotlin_kotlin.$_$.ug;
65
65
  var toString = kotlin_kotlin.$_$.zc;
66
66
  var hashCode = kotlin_kotlin.$_$.tb;
67
67
  var equals = kotlin_kotlin.$_$.mb;
@@ -80,7 +80,7 @@
80
80
  var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
81
81
  var Unit_instance = kotlin_kotlin.$_$.p5;
82
82
  var objectCreate = kotlin_kotlin.$_$.uc;
83
- var toString_0 = kotlin_kotlin.$_$.xh;
83
+ var toString_0 = kotlin_kotlin.$_$.yh;
84
84
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s;
85
85
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d2;
86
86
  var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v1;
@@ -95,7 +95,7 @@
95
95
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
96
96
  var JsType_instance = kotlin_io_ktor_ktor_utils.$_$.b;
97
97
  var getKClass = kotlin_kotlin.$_$.e;
98
- var arrayOf = kotlin_kotlin.$_$.hh;
98
+ var arrayOf = kotlin_kotlin.$_$.ih;
99
99
  var createKType = kotlin_kotlin.$_$.b;
100
100
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
101
101
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.l;
@@ -109,24 +109,24 @@
109
109
  var KtMap = kotlin_kotlin.$_$.a6;
110
110
  var isInterface = kotlin_kotlin.$_$.ic;
111
111
  var Companion_getInstance_0 = kotlin_kotlin.$_$.g5;
112
- var Long = kotlin_kotlin.$_$.ng;
112
+ var Long = kotlin_kotlin.$_$.og;
113
113
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.g;
114
- var toDuration = kotlin_kotlin.$_$.zf;
114
+ var toDuration = kotlin_kotlin.$_$.ag;
115
115
  var Duration__toString_impl_8d916b = kotlin_kotlin.$_$.v2;
116
116
  var Duration__hashCode_impl_u4exz6 = kotlin_kotlin.$_$.o2;
117
117
  var emptyMap = kotlin_kotlin.$_$.o7;
118
118
  var toMutableMap = kotlin_kotlin.$_$.y9;
119
119
  var toMap = kotlin_kotlin.$_$.v9;
120
120
  var get_lastIndex = kotlin_kotlin.$_$.i8;
121
+ var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
122
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s1;
121
123
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
122
124
  var uuid4 = kotlin_com_benasher44_uuid.$_$.a;
123
- var Result = kotlin_kotlin.$_$.rg;
125
+ var Result = kotlin_kotlin.$_$.sg;
124
126
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
125
- var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
126
127
  var Companion_instance = kotlin_kotlin.$_$.k5;
127
- var createFailure = kotlin_kotlin.$_$.jh;
128
+ var createFailure = kotlin_kotlin.$_$.kh;
128
129
  var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.f3;
129
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s1;
130
130
  var initMetadataForLambda = kotlin_kotlin.$_$.yb;
131
131
  var Duration__compareTo_impl_pchp0f = kotlin_kotlin.$_$.n2;
132
132
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.w;
@@ -208,10 +208,10 @@
208
208
  initMetadataForClass(RandomPoolValue, 'RandomPoolValue');
209
209
  initMetadataForCompanion(Companion_9);
210
210
  initMetadataForLambda(RandomPoolProviderImpl$getCardDeck$slambda, CoroutineImpl, VOID, [1]);
211
+ initMetadataForLambda(RandomPoolProviderImpl$prefetchCardDecks$slambda, CoroutineImpl, VOID, [1]);
211
212
  initMetadataForLambda(RandomPoolProviderImpl$requestNewPool$slambda, CoroutineImpl, VOID, [1]);
212
- initMetadataForCoroutine($prefetchCardDecksCOROUTINE$3, CoroutineImpl);
213
- initMetadataForCoroutine($getOrLoadGameCardDeckDataCOROUTINE$4, CoroutineImpl);
214
- initMetadataForCoroutine($getPreparedOrRequestPoolCOROUTINE$5, CoroutineImpl);
213
+ initMetadataForCoroutine($getOrLoadGameCardDeckDataCOROUTINE$3, CoroutineImpl);
214
+ initMetadataForCoroutine($getPreparedOrRequestPoolCOROUTINE$4, CoroutineImpl);
215
215
  initMetadataForClass(RandomPoolProviderImpl, 'RandomPoolProviderImpl', VOID, VOID, [RandomPoolProvider], [7, 5]);
216
216
  initMetadataForClass(ApiCommonConfigs$setupLogging$1$1);
217
217
  initMetadataForObject(ApiCommonConfigs, 'ApiCommonConfigs');
@@ -2235,14 +2235,54 @@
2235
2235
  return false;
2236
2236
  return true;
2237
2237
  };
2238
+ function getExceptionIfCooldown($this) {
2239
+ var failedAttemptTime = $this.h5v_1;
2240
+ var currentTime = System_instance.f59();
2241
+ if (!(failedAttemptTime == null) && $this.i5v_1 >= $this.z5u_1.failedRequestAttempts) {
2242
+ var allowedRequestTime = failedAttemptTime.t5o($this.z5u_1.failedAttemptCooldown);
2243
+ if (allowedRequestTime.x5o(currentTime) > 0) {
2244
+ var exception = new RandomException(VOID, 'getCardDeck: cooldown ends in ' + allowedRequestTime.toString() + ', ' + ('failedAttemptTime = ' + toString_0(failedAttemptTime) + ', ') + ('currentTime = ' + currentTime.toString()));
2245
+ return exception;
2246
+ } else {
2247
+ $this.h5v_1 = null;
2248
+ $this.i5v_1 = 0;
2249
+ }
2250
+ }
2251
+ return null;
2252
+ }
2253
+ function mapToRandomExceptionIfError($this, error) {
2254
+ $this.h5v_1 = System_instance.f59();
2255
+ $this.i5v_1 = $this.i5v_1 + 1 | 0;
2256
+ var tmp = 'getCardDeck: error message = ' + error.message + ', ';
2257
+ // Inline function 'kotlin.requireNotNull' call
2258
+ var value = $this.h5v_1;
2259
+ // Inline function 'kotlin.contracts.contract' call
2260
+ var tmp$ret$1;
2261
+ $l$block: {
2262
+ // Inline function 'kotlin.requireNotNull' call
2263
+ // Inline function 'kotlin.contracts.contract' call
2264
+ if (value == null) {
2265
+ // Inline function 'kotlin.requireNotNull.<anonymous>' call
2266
+ var message = 'Required value was null.';
2267
+ throw IllegalArgumentException_init_$Create$(toString(message));
2268
+ } else {
2269
+ tmp$ret$1 = value;
2270
+ break $l$block;
2271
+ }
2272
+ }
2273
+ var tmp$ret$2 = tmp$ret$1;
2274
+ var randomException = new RandomException(VOID, tmp + ('cooldown ends in ' + tmp$ret$2.t5o($this.z5u_1.failedAttemptCooldown).toString() + ', ') + ('currentTime = ' + toString_0($this.h5v_1)), error);
2275
+ $this.b5v_1.w('RandomPoolProvider', VOID, randomException);
2276
+ return randomException;
2277
+ }
2238
2278
  function getOrLoadGameCardDeckData($this, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, $completion) {
2239
- var tmp = new $getOrLoadGameCardDeckDataCOROUTINE$4($this, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, $completion);
2279
+ var tmp = new $getOrLoadGameCardDeckDataCOROUTINE$3($this, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, $completion);
2240
2280
  tmp.h9_1 = Unit_instance;
2241
2281
  tmp.i9_1 = null;
2242
2282
  return tmp.n9();
2243
2283
  }
2244
2284
  function getPreparedGameCardDecksRecord($this, poolId, signature, cardDeckData, userData) {
2245
- var existingCardDeck = $this.x5v_1.h2(userData.gameId);
2285
+ var existingCardDeck = $this.g5v_1.h2(userData.gameId);
2246
2286
  var tmp;
2247
2287
  if (!(existingCardDeck == null)) {
2248
2288
  tmp = Companion_instance_2.nextRound(existingCardDeck, cardDeckData);
@@ -2252,13 +2292,13 @@
2252
2292
  return tmp;
2253
2293
  }
2254
2294
  function getPreparedOrRequestPool($this, gameId, min, max, minRoundsCount, cardsCount, signed, requestDurationWarnMillis, $completion) {
2255
- var tmp = new $getPreparedOrRequestPoolCOROUTINE$5($this, gameId, min, max, minRoundsCount, cardsCount, signed, requestDurationWarnMillis, $completion);
2295
+ var tmp = new $getPreparedOrRequestPoolCOROUTINE$4($this, gameId, min, max, minRoundsCount, cardsCount, signed, requestDurationWarnMillis, $completion);
2256
2296
  tmp.h9_1 = Unit_instance;
2257
2297
  tmp.i9_1 = null;
2258
2298
  return tmp.n9();
2259
2299
  }
2260
2300
  function requestNewPool($this, min, max, cardsCount, signed, requestDurationWarnMillis, $completion) {
2261
- return withContext($this.t5v_1, RandomPoolProviderImpl$requestNewPool$slambda_0($this, min, max, cardsCount, signed, requestDurationWarnMillis, null), $completion);
2301
+ return withContext($this.c5v_1, RandomPoolProviderImpl$requestNewPool$slambda_0($this, min, max, cardsCount, signed, requestDurationWarnMillis, null), $completion);
2262
2302
  }
2263
2303
  function Companion_9() {
2264
2304
  this.s5w_1 = 100;
@@ -2284,7 +2324,7 @@
2284
2324
  this.l5x_1 = $requestDurationWarnMillis;
2285
2325
  CoroutineImpl.call(this, resultContinuation);
2286
2326
  }
2287
- protoOf(RandomPoolProviderImpl$getCardDeck$slambda).v5x = function ($this$withContext, $completion) {
2327
+ protoOf(RandomPoolProviderImpl$getCardDeck$slambda).s5x = function ($this$withContext, $completion) {
2288
2328
  var tmp = this.t1e($this$withContext, $completion);
2289
2329
  tmp.h9_1 = Unit_instance;
2290
2330
  tmp.i9_1 = null;
@@ -2294,7 +2334,7 @@
2294
2334
  return tmp_0;
2295
2335
  };
2296
2336
  protoOf(RandomPoolProviderImpl$getCardDeck$slambda).x9 = function (p1, $completion) {
2297
- return this.v5x((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2337
+ return this.s5x((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2298
2338
  };
2299
2339
  protoOf(RandomPoolProviderImpl$getCardDeck$slambda).n9 = function () {
2300
2340
  var suspendResult = this.h9_1;
@@ -2303,9 +2343,9 @@
2303
2343
  var tmp = this.f9_1;
2304
2344
  switch (tmp) {
2305
2345
  case 0:
2306
- this.g9_1 = 11;
2346
+ this.g9_1 = 10;
2307
2347
  var tmp_0 = this;
2308
- tmp_0.n5x_1 = this.e5x_1.v5v_1;
2348
+ tmp_0.n5x_1 = this.e5x_1.e5v_1;
2309
2349
  var tmp_1 = this;
2310
2350
  tmp_1.o5x_1 = null;
2311
2351
  this.f9_1 = 1;
@@ -2320,103 +2360,73 @@
2320
2360
  this.f9_1 = 2;
2321
2361
  continue $sm;
2322
2362
  case 2:
2323
- this.g9_1 = 10;
2363
+ this.g9_1 = 9;
2324
2364
  this.q5x_1 = Unit_instance;
2325
2365
  this.f9_1 = 3;
2326
2366
  continue $sm;
2327
2367
  case 3:
2328
- this.r5x_1 = this.e5x_1.y5v_1;
2329
- this.s5x_1 = System_instance.f59();
2330
- if (!(this.r5x_1 == null) && this.e5x_1.z5v_1 >= this.e5x_1.q5v_1.failedRequestAttempts) {
2331
- this.t5x_1 = this.r5x_1.t5o(this.e5x_1.q5v_1.failedAttemptCooldown);
2332
- if (this.t5x_1.x5o(this.s5x_1) > 0) {
2333
- this.u5x_1 = new RandomException(VOID, 'getCardDeck: cooldown ends in ' + this.t5x_1.toString() + ', ' + ('failedAttemptTime = ' + toString_0(this.r5x_1) + ', ') + ('currentTime = ' + this.s5x_1.toString()));
2334
- var tmp_2 = this;
2335
- var exception = this.u5x_1;
2336
- tmp_2.q5x_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception)));
2337
- this.f9_1 = 8;
2338
- continue $sm;
2339
- } else {
2340
- this.e5x_1.y5v_1 = null;
2341
- this.e5x_1.z5v_1 = 0;
2342
- this.f9_1 = 4;
2343
- continue $sm;
2344
- }
2368
+ this.r5x_1 = getExceptionIfCooldown(this.e5x_1);
2369
+ if (!(this.r5x_1 == null)) {
2370
+ var tmp_2 = this;
2371
+ var exception = this.r5x_1;
2372
+ tmp_2.q5x_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception)));
2373
+ this.f9_1 = 7;
2374
+ continue $sm;
2345
2375
  } else {
2346
- this.f9_1 = 5;
2376
+ this.f9_1 = 4;
2347
2377
  continue $sm;
2348
2378
  }
2349
2379
 
2350
2380
  case 4:
2381
+ this.g9_1 = 6;
2351
2382
  this.f9_1 = 5;
2352
- continue $sm;
2353
- case 5:
2354
- this.g9_1 = 7;
2355
- this.f9_1 = 6;
2356
2383
  suspendResult = getOrLoadGameCardDeckData(this.e5x_1, this.f5x_1, this.g5x_1, this.h5x_1, this.i5x_1, this.j5x_1, this.k5x_1, this.l5x_1, this);
2357
2384
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2358
2385
  return suspendResult;
2359
2386
  }
2360
2387
 
2361
2388
  continue $sm;
2362
- case 6:
2389
+ case 5:
2363
2390
  var cardDeckData = suspendResult;
2364
2391
  var tmp_3 = this;
2365
2392
  tmp_3.q5x_1 = new Result(_Result___init__impl__xyqfz8(cardDeckData));
2366
- this.f9_1 = 8;
2393
+ this.f9_1 = 7;
2367
2394
  continue $sm;
2368
- case 7:
2369
- this.g9_1 = 10;
2395
+ case 6:
2396
+ this.g9_1 = 9;
2370
2397
  var tmp_4 = this.i9_1;
2371
2398
  if (tmp_4 instanceof Error) {
2372
2399
  var error = this.i9_1;
2373
- this.e5x_1.y5v_1 = this.s5x_1;
2374
- var _unary__edvuaz = this.e5x_1.z5v_1;
2375
- this.e5x_1.z5v_1 = _unary__edvuaz + 1 | 0;
2376
- var tmp_5 = 'getCardDeck: error message = ' + error.message + ', ';
2377
- var value = this.e5x_1.y5v_1;
2378
- var tmp$ret$2 = Unit_instance;
2379
- l$ret$3: do {
2380
- if (value == null) {
2381
- var message = 'Required value was null.';
2382
- throw IllegalArgumentException_init_$Create$(toString(message));
2383
- } else {
2384
- tmp$ret$2 = value;
2385
- break l$ret$3;
2386
- }
2387
- }
2388
- while (false);
2389
- var exception_0 = new RandomException(VOID, tmp_5 + ('cooldown ends in ' + tmp$ret$2.t5o(this.e5x_1.q5v_1.failedAttemptCooldown).toString() + ', ') + ('failedAttemptTime = ' + toString_0(this.r5x_1) + ', ') + ('currentTime = ' + this.s5x_1.toString()), error);
2390
- this.e5x_1.s5v_1.w('RandomPoolProvider', VOID, exception_0);
2391
- var tmp_6 = this;
2392
- tmp_6.q5x_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception_0)));
2393
- this.f9_1 = 8;
2400
+ var tmp_5 = this;
2401
+ var exception_0 = mapToRandomExceptionIfError(this.e5x_1, error);
2402
+ tmp_5.q5x_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception_0)));
2403
+ this.f9_1 = 7;
2394
2404
  continue $sm;
2395
2405
  } else {
2396
2406
  throw this.i9_1;
2397
2407
  }
2398
2408
 
2399
- case 8:
2409
+ case 7:
2400
2410
  this.p5x_1 = this.q5x_1;
2401
- this.g9_1 = 11;
2402
- this.f9_1 = 9;
2411
+ this.g9_1 = 10;
2412
+ this.f9_1 = 8;
2403
2413
  continue $sm;
2404
- case 9:
2405
- var tmp_7 = this.p5x_1;
2406
- this.g9_1 = 11;
2414
+ case 8:
2415
+ var tmp_6 = this.p5x_1;
2416
+ this.g9_1 = 10;
2407
2417
  this.n5x_1.k1p(this.o5x_1);
2408
- return tmp_7;
2409
- case 10:
2410
- this.g9_1 = 11;
2418
+ return tmp_6;
2419
+ case 9:
2420
+ this.g9_1 = 10;
2411
2421
  var t = this.i9_1;
2412
2422
  this.n5x_1.k1p(this.o5x_1);
2413
2423
  throw t;
2414
- case 11:
2424
+ case 10:
2415
2425
  throw this.i9_1;
2416
2426
  }
2417
2427
  } catch ($p) {
2418
2428
  var e = $p;
2419
- if (this.g9_1 === 11) {
2429
+ if (this.g9_1 === 10) {
2420
2430
  throw e;
2421
2431
  } else {
2422
2432
  this.f9_1 = this.g9_1;
@@ -2433,66 +2443,126 @@
2433
2443
  function RandomPoolProviderImpl$getCardDeck$slambda_0(this$0, $minRoundsCountInPool, $userData, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2434
2444
  var i = new RandomPoolProviderImpl$getCardDeck$slambda(this$0, $minRoundsCountInPool, $userData, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation);
2435
2445
  var l = function ($this$withContext, $completion) {
2436
- return i.v5x($this$withContext, $completion);
2446
+ return i.s5x($this$withContext, $completion);
2437
2447
  };
2438
2448
  l.$arity = 1;
2439
2449
  return l;
2440
2450
  }
2441
- function RandomPoolProviderImpl$requestNewPool$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2442
- this.e5y_1 = this$0;
2443
- this.f5y_1 = $min;
2444
- this.g5y_1 = $max;
2445
- this.h5y_1 = $cardsCount;
2446
- this.i5y_1 = $signed;
2447
- this.j5y_1 = $requestDurationWarnMillis;
2451
+ function RandomPoolProviderImpl$prefetchCardDecks$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2452
+ this.b5y_1 = this$0;
2453
+ this.c5y_1 = $min;
2454
+ this.d5y_1 = $max;
2455
+ this.e5y_1 = $cardsCount;
2456
+ this.f5y_1 = $signed;
2457
+ this.g5y_1 = $requestDurationWarnMillis;
2448
2458
  CoroutineImpl.call(this, resultContinuation);
2449
2459
  }
2450
- protoOf(RandomPoolProviderImpl$requestNewPool$slambda).m5y = function ($this$withContext, $completion) {
2460
+ protoOf(RandomPoolProviderImpl$prefetchCardDecks$slambda).n5y = function ($this$withContext, $completion) {
2451
2461
  var tmp = this.t1e($this$withContext, $completion);
2452
2462
  tmp.h9_1 = Unit_instance;
2453
2463
  tmp.i9_1 = null;
2454
- return tmp.n9();
2464
+ var tmp_0 = tmp.n9();
2465
+ if (tmp_0 === get_COROUTINE_SUSPENDED())
2466
+ return tmp_0;
2467
+ return tmp_0;
2455
2468
  };
2456
- protoOf(RandomPoolProviderImpl$requestNewPool$slambda).x9 = function (p1, $completion) {
2457
- return this.m5y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2469
+ protoOf(RandomPoolProviderImpl$prefetchCardDecks$slambda).x9 = function (p1, $completion) {
2470
+ return this.n5y((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2458
2471
  };
2459
- protoOf(RandomPoolProviderImpl$requestNewPool$slambda).n9 = function () {
2472
+ protoOf(RandomPoolProviderImpl$prefetchCardDecks$slambda).n9 = function () {
2460
2473
  var suspendResult = this.h9_1;
2461
2474
  $sm: do
2462
2475
  try {
2463
2476
  var tmp = this.f9_1;
2464
2477
  switch (tmp) {
2465
2478
  case 0:
2466
- this.g9_1 = 2;
2467
- this.l5y_1 = System_instance.f59();
2479
+ this.g9_1 = 10;
2480
+ var tmp_0 = this;
2481
+ tmp_0.i5y_1 = this.b5y_1.e5v_1;
2482
+ var tmp_1 = this;
2483
+ tmp_1.j5y_1 = null;
2468
2484
  this.f9_1 = 1;
2469
- suspendResult = this.e5y_1.r5v_1.t5s(this.f5y_1, this.g5y_1, this.e5y_1.q5v_1.poolSize, this.h5y_1, new CardDecksRequestUserData(this.e5y_1.u5v_1(), this.e5y_1.q5v_1.poolSize), this.i5y_1, this);
2485
+ suspendResult = this.i5y_1.z1p(this.j5y_1, this);
2470
2486
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2471
2487
  return suspendResult;
2472
2488
  }
2473
2489
 
2474
2490
  continue $sm;
2475
2491
  case 1:
2476
- var result = suspendResult;
2477
- var requestEndTime = System_instance.f59();
2478
- var requestDuration = requestEndTime.w5o(this.l5y_1);
2479
- Companion_getInstance_0();
2480
- var this_0 = this.j5y_1;
2481
- if (Duration__compareTo_impl_pchp0f(requestDuration, toDuration(this_0, DurationUnit_MILLISECONDS_getInstance())) > 0) {
2482
- var tmp_0 = 'Card deck request took longer then expected: ' + ('actual = ' + Duration__toString_impl_8d916b(requestDuration) + ', ');
2483
- Companion_getInstance_0();
2484
- var this_1 = this.j5y_1;
2485
- this.e5y_1.s5v_1.w('RandomPoolProvider', tmp_0 + ('expected = ' + Duration__toString_impl_8d916b(toDuration(this_1, DurationUnit_MILLISECONDS_getInstance()))));
2492
+ this.k5y_1 = Unit_instance;
2493
+ this.f9_1 = 2;
2494
+ continue $sm;
2495
+ case 2:
2496
+ this.g9_1 = 9;
2497
+ this.l5y_1 = Unit_instance;
2498
+ this.f9_1 = 3;
2499
+ continue $sm;
2500
+ case 3:
2501
+ this.m5y_1 = getExceptionIfCooldown(this.b5y_1);
2502
+ if (!(this.m5y_1 == null)) {
2503
+ var tmp_2 = this;
2504
+ var exception = this.m5y_1;
2505
+ tmp_2.l5y_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception)));
2506
+ this.f9_1 = 7;
2507
+ continue $sm;
2508
+ } else {
2509
+ this.f9_1 = 4;
2510
+ continue $sm;
2486
2511
  }
2487
2512
 
2488
- var newCardDecksValue = new RandomPoolValue(result);
2489
- return newCardDecksValue;
2490
- case 2:
2513
+ case 4:
2514
+ this.g9_1 = 6;
2515
+ this.f9_1 = 5;
2516
+ suspendResult = requestNewPool(this.b5y_1, this.c5y_1, this.d5y_1, this.e5y_1, this.f5y_1, this.g5y_1, this);
2517
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2518
+ return suspendResult;
2519
+ }
2520
+
2521
+ continue $sm;
2522
+ case 5:
2523
+ var randomPoolValue = suspendResult;
2524
+ var this_0 = this.b5y_1.f5v_1;
2525
+ var key = randomPoolValue.p5u_1.a5q_1;
2526
+ this_0.k2(key, randomPoolValue);
2527
+ var tmp_3 = this;
2528
+ tmp_3.l5y_1 = new Result(_Result___init__impl__xyqfz8(Unit_instance));
2529
+ this.f9_1 = 7;
2530
+ continue $sm;
2531
+ case 6:
2532
+ this.g9_1 = 9;
2533
+ var tmp_4 = this.i9_1;
2534
+ if (tmp_4 instanceof Error) {
2535
+ var error = this.i9_1;
2536
+ var tmp_5 = this;
2537
+ var exception_0 = mapToRandomExceptionIfError(this.b5y_1, error);
2538
+ tmp_5.l5y_1 = new Result(_Result___init__impl__xyqfz8(createFailure(exception_0)));
2539
+ this.f9_1 = 7;
2540
+ continue $sm;
2541
+ } else {
2542
+ throw this.i9_1;
2543
+ }
2544
+
2545
+ case 7:
2546
+ this.k5y_1 = this.l5y_1;
2547
+ this.g9_1 = 10;
2548
+ this.f9_1 = 8;
2549
+ continue $sm;
2550
+ case 8:
2551
+ var tmp_6 = this.k5y_1;
2552
+ this.g9_1 = 10;
2553
+ this.i5y_1.k1p(this.j5y_1);
2554
+ return tmp_6;
2555
+ case 9:
2556
+ this.g9_1 = 10;
2557
+ var t = this.i9_1;
2558
+ this.i5y_1.k1p(this.j5y_1);
2559
+ throw t;
2560
+ case 10:
2491
2561
  throw this.i9_1;
2492
2562
  }
2493
2563
  } catch ($p) {
2494
2564
  var e = $p;
2495
- if (this.g9_1 === 2) {
2565
+ if (this.g9_1 === 10) {
2496
2566
  throw e;
2497
2567
  } else {
2498
2568
  this.f9_1 = this.g9_1;
@@ -2501,29 +2571,38 @@
2501
2571
  }
2502
2572
  while (true);
2503
2573
  };
2504
- protoOf(RandomPoolProviderImpl$requestNewPool$slambda).t1e = function ($this$withContext, completion) {
2505
- var i = new RandomPoolProviderImpl$requestNewPool$slambda(this.e5y_1, this.f5y_1, this.g5y_1, this.h5y_1, this.i5y_1, this.j5y_1, completion);
2506
- i.k5y_1 = $this$withContext;
2574
+ protoOf(RandomPoolProviderImpl$prefetchCardDecks$slambda).t1e = function ($this$withContext, completion) {
2575
+ var i = new RandomPoolProviderImpl$prefetchCardDecks$slambda(this.b5y_1, this.c5y_1, this.d5y_1, this.e5y_1, this.f5y_1, this.g5y_1, completion);
2576
+ i.h5y_1 = $this$withContext;
2507
2577
  return i;
2508
2578
  };
2509
- function RandomPoolProviderImpl$requestNewPool$slambda_0(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2510
- var i = new RandomPoolProviderImpl$requestNewPool$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation);
2579
+ function RandomPoolProviderImpl$prefetchCardDecks$slambda_0(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2580
+ var i = new RandomPoolProviderImpl$prefetchCardDecks$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation);
2511
2581
  var l = function ($this$withContext, $completion) {
2512
- return i.m5y($this$withContext, $completion);
2582
+ return i.n5y($this$withContext, $completion);
2513
2583
  };
2514
2584
  l.$arity = 1;
2515
2585
  return l;
2516
2586
  }
2517
- function $prefetchCardDecksCOROUTINE$3(_this__u8e3s4, min, max, cardsCount, signed, requestDurationWarnMillis, resultContinuation) {
2587
+ function RandomPoolProviderImpl$requestNewPool$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2588
+ this.w5y_1 = this$0;
2589
+ this.x5y_1 = $min;
2590
+ this.y5y_1 = $max;
2591
+ this.z5y_1 = $cardsCount;
2592
+ this.a5z_1 = $signed;
2593
+ this.b5z_1 = $requestDurationWarnMillis;
2518
2594
  CoroutineImpl.call(this, resultContinuation);
2519
- this.v5y_1 = _this__u8e3s4;
2520
- this.w5y_1 = min;
2521
- this.x5y_1 = max;
2522
- this.y5y_1 = cardsCount;
2523
- this.z5y_1 = signed;
2524
- this.a5z_1 = requestDurationWarnMillis;
2525
- }
2526
- protoOf($prefetchCardDecksCOROUTINE$3).n9 = function () {
2595
+ }
2596
+ protoOf(RandomPoolProviderImpl$requestNewPool$slambda).e5z = function ($this$withContext, $completion) {
2597
+ var tmp = this.t1e($this$withContext, $completion);
2598
+ tmp.h9_1 = Unit_instance;
2599
+ tmp.i9_1 = null;
2600
+ return tmp.n9();
2601
+ };
2602
+ protoOf(RandomPoolProviderImpl$requestNewPool$slambda).x9 = function (p1, $completion) {
2603
+ return this.e5z((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
2604
+ };
2605
+ protoOf(RandomPoolProviderImpl$requestNewPool$slambda).n9 = function () {
2527
2606
  var suspendResult = this.h9_1;
2528
2607
  $sm: do
2529
2608
  try {
@@ -2531,19 +2610,29 @@
2531
2610
  switch (tmp) {
2532
2611
  case 0:
2533
2612
  this.g9_1 = 2;
2613
+ this.d5z_1 = System_instance.f59();
2534
2614
  this.f9_1 = 1;
2535
- suspendResult = requestNewPool(this.v5y_1, this.w5y_1, this.x5y_1, this.y5y_1, this.z5y_1, this.a5z_1, this);
2615
+ suspendResult = this.w5y_1.a5v_1.t5s(this.x5y_1, this.y5y_1, this.w5y_1.z5u_1.poolSize, this.z5y_1, new CardDecksRequestUserData(this.w5y_1.d5v_1(), this.w5y_1.z5u_1.poolSize), this.a5z_1, this);
2536
2616
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2537
2617
  return suspendResult;
2538
2618
  }
2539
2619
 
2540
2620
  continue $sm;
2541
2621
  case 1:
2542
- var randomPoolValue = suspendResult;
2543
- var this_0 = this.v5y_1.w5v_1;
2544
- var key = randomPoolValue.p5u_1.a5q_1;
2545
- this_0.k2(key, randomPoolValue);
2546
- return Unit_instance;
2622
+ var result = suspendResult;
2623
+ var requestEndTime = System_instance.f59();
2624
+ var requestDuration = requestEndTime.w5o(this.d5z_1);
2625
+ Companion_getInstance_0();
2626
+ var this_0 = this.b5z_1;
2627
+ if (Duration__compareTo_impl_pchp0f(requestDuration, toDuration(this_0, DurationUnit_MILLISECONDS_getInstance())) > 0) {
2628
+ var tmp_0 = 'Card deck request took longer then expected: ' + ('actual = ' + Duration__toString_impl_8d916b(requestDuration) + ', ');
2629
+ Companion_getInstance_0();
2630
+ var this_1 = this.b5z_1;
2631
+ this.w5y_1.b5v_1.w('RandomPoolProvider', tmp_0 + ('expected = ' + Duration__toString_impl_8d916b(toDuration(this_1, DurationUnit_MILLISECONDS_getInstance()))));
2632
+ }
2633
+
2634
+ var newCardDecksValue = new RandomPoolValue(result);
2635
+ return newCardDecksValue;
2547
2636
  case 2:
2548
2637
  throw this.i9_1;
2549
2638
  }
@@ -2558,18 +2647,31 @@
2558
2647
  }
2559
2648
  while (true);
2560
2649
  };
2561
- function $getOrLoadGameCardDeckDataCOROUTINE$4(_this__u8e3s4, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, resultContinuation) {
2650
+ protoOf(RandomPoolProviderImpl$requestNewPool$slambda).t1e = function ($this$withContext, completion) {
2651
+ var i = new RandomPoolProviderImpl$requestNewPool$slambda(this.w5y_1, this.x5y_1, this.y5y_1, this.z5y_1, this.a5z_1, this.b5z_1, completion);
2652
+ i.c5z_1 = $this$withContext;
2653
+ return i;
2654
+ };
2655
+ function RandomPoolProviderImpl$requestNewPool$slambda_0(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation) {
2656
+ var i = new RandomPoolProviderImpl$requestNewPool$slambda(this$0, $min, $max, $cardsCount, $signed, $requestDurationWarnMillis, resultContinuation);
2657
+ var l = function ($this$withContext, $completion) {
2658
+ return i.e5z($this$withContext, $completion);
2659
+ };
2660
+ l.$arity = 1;
2661
+ return l;
2662
+ }
2663
+ function $getOrLoadGameCardDeckDataCOROUTINE$3(_this__u8e3s4, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, resultContinuation) {
2562
2664
  CoroutineImpl.call(this, resultContinuation);
2563
- this.h5v_1 = _this__u8e3s4;
2564
- this.i5v_1 = minRoundsCountInPool;
2565
- this.j5v_1 = userData;
2566
- this.k5v_1 = min;
2567
- this.l5v_1 = max;
2568
- this.m5v_1 = cardsCount;
2569
- this.n5v_1 = signed;
2570
- this.o5v_1 = requestDurationWarnMillis;
2571
- }
2572
- protoOf($getOrLoadGameCardDeckDataCOROUTINE$4).n9 = function () {
2665
+ this.r5v_1 = _this__u8e3s4;
2666
+ this.s5v_1 = minRoundsCountInPool;
2667
+ this.t5v_1 = userData;
2668
+ this.u5v_1 = min;
2669
+ this.v5v_1 = max;
2670
+ this.w5v_1 = cardsCount;
2671
+ this.x5v_1 = signed;
2672
+ this.y5v_1 = requestDurationWarnMillis;
2673
+ }
2674
+ protoOf($getOrLoadGameCardDeckDataCOROUTINE$3).n9 = function () {
2573
2675
  var suspendResult = this.h9_1;
2574
2676
  $sm: do
2575
2677
  try {
@@ -2577,9 +2679,9 @@
2577
2679
  switch (tmp) {
2578
2680
  case 0:
2579
2681
  this.g9_1 = 2;
2580
- this.p5v_1 = this.j5v_1.gameId;
2682
+ this.z5v_1 = this.t5v_1.gameId;
2581
2683
  this.f9_1 = 1;
2582
- suspendResult = getPreparedOrRequestPool(this.h5v_1, this.p5v_1, this.k5v_1, this.l5v_1, this.i5v_1, this.m5v_1, this.n5v_1, this.o5v_1, this);
2684
+ suspendResult = getPreparedOrRequestPool(this.r5v_1, this.z5v_1, this.u5v_1, this.v5v_1, this.s5v_1, this.w5v_1, this.x5v_1, this.y5v_1, this);
2583
2685
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
2584
2686
  return suspendResult;
2585
2687
  }
@@ -2587,15 +2689,15 @@
2587
2689
  continue $sm;
2588
2690
  case 1:
2589
2691
  var randomPoolValue = suspendResult;
2590
- var this_0 = this.h5v_1.w5v_1;
2692
+ var this_0 = this.r5v_1.f5v_1;
2591
2693
  var key = randomPoolValue.p5u_1.a5q_1;
2592
2694
  this_0.k2(key, randomPoolValue);
2593
- var cardDeckData = randomPoolValue.x5u(this.j5v_1.gameId);
2695
+ var cardDeckData = randomPoolValue.x5u(this.t5v_1.gameId);
2594
2696
  var tmp21_poolId = randomPoolValue.p5u_1.a5q_1;
2595
2697
  var tmp22_signature = randomPoolValue.p5u_1.b5q_1;
2596
- var cardDecksRecord = getPreparedGameCardDecksRecord(this.h5v_1, tmp21_poolId, tmp22_signature, cardDeckData, this.j5v_1);
2597
- var this_1 = this.h5v_1.x5v_1;
2598
- var key_0 = this.j5v_1.gameId;
2698
+ var cardDecksRecord = getPreparedGameCardDecksRecord(this.r5v_1, tmp21_poolId, tmp22_signature, cardDeckData, this.t5v_1);
2699
+ var this_1 = this.r5v_1.g5v_1;
2700
+ var key_0 = this.t5v_1.gameId;
2599
2701
  this_1.k2(key_0, cardDecksRecord);
2600
2702
  return cardDeckData;
2601
2703
  case 2:
@@ -2612,7 +2714,7 @@
2612
2714
  }
2613
2715
  while (true);
2614
2716
  };
2615
- function $getPreparedOrRequestPoolCOROUTINE$5(_this__u8e3s4, gameId, min, max, minRoundsCount, cardsCount, signed, requestDurationWarnMillis, resultContinuation) {
2717
+ function $getPreparedOrRequestPoolCOROUTINE$4(_this__u8e3s4, gameId, min, max, minRoundsCount, cardsCount, signed, requestDurationWarnMillis, resultContinuation) {
2616
2718
  CoroutineImpl.call(this, resultContinuation);
2617
2719
  this.i5w_1 = _this__u8e3s4;
2618
2720
  this.j5w_1 = gameId;
@@ -2623,7 +2725,7 @@
2623
2725
  this.o5w_1 = signed;
2624
2726
  this.p5w_1 = requestDurationWarnMillis;
2625
2727
  }
2626
- protoOf($getPreparedOrRequestPoolCOROUTINE$5).n9 = function () {
2728
+ protoOf($getPreparedOrRequestPoolCOROUTINE$4).n9 = function () {
2627
2729
  var suspendResult = this.h9_1;
2628
2730
  $sm: do
2629
2731
  try {
@@ -2632,7 +2734,7 @@
2632
2734
  case 0:
2633
2735
  this.g9_1 = 2;
2634
2736
  var tmp_0 = this;
2635
- var this_0 = this.i5w_1.w5v_1;
2737
+ var this_0 = this.i5w_1.f5v_1;
2636
2738
  var destination = LinkedHashMap_init_$Create$();
2637
2739
  var tmp0_iterator = this_0.s().j();
2638
2740
  while (tmp0_iterator.k()) {
@@ -2650,7 +2752,7 @@
2650
2752
  }
2651
2753
 
2652
2754
  var tmp_1 = this;
2653
- var this_2 = this.i5w_1.w5v_1;
2755
+ var this_2 = this.i5w_1.f5v_1;
2654
2756
  var destination_0 = LinkedHashMap_init_$Create$();
2655
2757
  var tmp0_iterator_0 = this_2.s().j();
2656
2758
  while (tmp0_iterator_0.k()) {
@@ -2662,7 +2764,7 @@
2662
2764
 
2663
2765
  tmp_1.r5w_1 = firstOrNull(destination_0.s());
2664
2766
  if (!(this.r5w_1 == null)) {
2665
- return this.r5w_1.u().u5u(this.j5w_1, this.m5w_1, this.i5w_1.q5v_1.thresholdForUsedPool);
2767
+ return this.r5w_1.u().u5u(this.j5w_1, this.m5w_1, this.i5w_1.z5u_1.thresholdForUsedPool);
2666
2768
  }
2667
2769
 
2668
2770
  this.f9_1 = 1;
@@ -2674,7 +2776,7 @@
2674
2776
  continue $sm;
2675
2777
  case 1:
2676
2778
  var cardDecks = suspendResult;
2677
- return cardDecks.u5u(this.j5w_1, this.m5w_1, this.i5w_1.q5v_1.thresholdForUsedPool);
2779
+ return cardDecks.u5u(this.j5w_1, this.m5w_1, this.i5w_1.z5u_1.thresholdForUsedPool);
2678
2780
  case 2:
2679
2781
  throw this.i9_1;
2680
2782
  }
@@ -2698,55 +2800,55 @@
2698
2800
  tmp = idsProvider;
2699
2801
  }
2700
2802
  idsProvider = tmp;
2701
- this.q5v_1 = params;
2702
- this.r5v_1 = randomOrgApiService;
2703
- this.s5v_1 = logger;
2704
- this.t5v_1 = dispatcher;
2705
- this.u5v_1 = idsProvider;
2706
- this.v5v_1 = Mutex();
2803
+ this.z5u_1 = params;
2804
+ this.a5v_1 = randomOrgApiService;
2805
+ this.b5v_1 = logger;
2806
+ this.c5v_1 = dispatcher;
2807
+ this.d5v_1 = idsProvider;
2808
+ this.e5v_1 = Mutex();
2707
2809
  var tmp_0 = this;
2708
2810
  // Inline function 'kotlin.collections.mutableMapOf' call
2709
- tmp_0.w5v_1 = LinkedHashMap_init_$Create$();
2811
+ tmp_0.f5v_1 = LinkedHashMap_init_$Create$();
2710
2812
  var tmp_1 = this;
2711
2813
  // Inline function 'kotlin.collections.mutableMapOf' call
2712
- tmp_1.x5v_1 = LinkedHashMap_init_$Create$();
2713
- this.y5v_1 = null;
2714
- this.z5v_1 = 0;
2814
+ tmp_1.g5v_1 = LinkedHashMap_init_$Create$();
2815
+ this.h5v_1 = null;
2816
+ this.i5v_1 = 0;
2715
2817
  }
2716
2818
  protoOf(RandomPoolProviderImpl).l5u = function (minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, $completion) {
2717
- var tmp = withContext(this.t5v_1, RandomPoolProviderImpl$getCardDeck$slambda_0(this, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, null), $completion);
2819
+ var tmp = withContext(this.c5v_1, RandomPoolProviderImpl$getCardDeck$slambda_0(this, minRoundsCountInPool, userData, min, max, cardsCount, signed, requestDurationWarnMillis, null), $completion);
2718
2820
  if (tmp === get_COROUTINE_SUSPENDED())
2719
2821
  return tmp;
2720
2822
  return tmp;
2721
2823
  };
2722
2824
  protoOf(RandomPoolProviderImpl).n5u = function (min, max, cardsCount, signed, requestDurationWarnMillis, $completion) {
2723
- var tmp = new $prefetchCardDecksCOROUTINE$3(this, min, max, cardsCount, signed, requestDurationWarnMillis, $completion);
2724
- tmp.h9_1 = Unit_instance;
2725
- tmp.i9_1 = null;
2726
- return tmp.n9();
2825
+ var tmp = withContext(this.c5v_1, RandomPoolProviderImpl$prefetchCardDecks$slambda_0(this, min, max, cardsCount, signed, requestDurationWarnMillis, null), $completion);
2826
+ if (tmp === get_COROUTINE_SUSPENDED())
2827
+ return tmp;
2828
+ return tmp;
2727
2829
  };
2728
- protoOf(RandomPoolProviderImpl).b5z = function (gameId) {
2729
- return this.x5v_1.h2(gameId);
2830
+ protoOf(RandomPoolProviderImpl).f5z = function (gameId) {
2831
+ return this.g5v_1.h2(gameId);
2730
2832
  };
2731
2833
  protoOf(RandomPoolProviderImpl).getGame = function (gameId) {
2732
- return this.b5z(gameId);
2834
+ return this.f5z(gameId);
2733
2835
  };
2734
- protoOf(RandomPoolProviderImpl).c5z = function (id) {
2735
- return this.w5v_1.h2(id);
2836
+ protoOf(RandomPoolProviderImpl).g5z = function (id) {
2837
+ return this.f5v_1.h2(id);
2736
2838
  };
2737
2839
  protoOf(RandomPoolProviderImpl).getRandomPool = function (id) {
2738
- return this.c5z(id);
2840
+ return this.g5z(id);
2739
2841
  };
2740
- protoOf(RandomPoolProviderImpl).d5z = function () {
2741
- return this.w5v_1.m();
2842
+ protoOf(RandomPoolProviderImpl).h5z = function () {
2843
+ return this.f5v_1.m();
2742
2844
  };
2743
2845
  protoOf(RandomPoolProviderImpl).getRandomPoolsCount = function () {
2744
- return this.d5z();
2846
+ return this.h5z();
2745
2847
  };
2746
2848
  protoOf(RandomPoolProviderImpl).o5u = function (gameId) {
2747
- var gameCardDecksRecord = this.x5v_1.h2(gameId);
2849
+ var gameCardDecksRecord = this.g5v_1.h2(gameId);
2748
2850
  if (!(gameCardDecksRecord == null)) {
2749
- var randomPoolValue = this.w5v_1.h2(gameCardDecksRecord.poolId);
2851
+ var randomPoolValue = this.f5v_1.h2(gameCardDecksRecord.poolId);
2750
2852
  if (!(randomPoolValue == null)) {
2751
2853
  // Inline function 'kotlin.apply' call
2752
2854
  var this_0 = toMutableMap(randomPoolValue.q5u_1);
@@ -2755,16 +2857,16 @@
2755
2857
  this_0.l2(gameId);
2756
2858
  var newPoolValue = randomPoolValue.v5u(VOID, toMap(this_0));
2757
2859
  if (newPoolValue.q5u_1.p()) {
2758
- this.w5v_1.l2(gameCardDecksRecord.poolId);
2860
+ this.f5v_1.l2(gameCardDecksRecord.poolId);
2759
2861
  } else {
2760
2862
  // Inline function 'kotlin.collections.set' call
2761
- var this_1 = this.w5v_1;
2863
+ var this_1 = this.f5v_1;
2762
2864
  var key = gameCardDecksRecord.poolId;
2763
2865
  this_1.k2(key, newPoolValue);
2764
2866
  }
2765
2867
  }
2766
2868
  }
2767
- this.x5v_1.l2(gameId);
2869
+ this.g5v_1.l2(gameId);
2768
2870
  };
2769
2871
  function ApiCommonConfigs$setupJsonDefaultRequest$lambda($url) {
2770
2872
  return function ($this$defaultRequest) {
@@ -2774,15 +2876,15 @@
2774
2876
  };
2775
2877
  }
2776
2878
  function ApiCommonConfigs$setupLogging$1$1($externalLogger) {
2777
- this.e5z_1 = $externalLogger;
2879
+ this.i5z_1 = $externalLogger;
2778
2880
  }
2779
2881
  protoOf(ApiCommonConfigs$setupLogging$1$1).o3y = function (message) {
2780
- this.e5z_1(message);
2882
+ this.i5z_1(message);
2781
2883
  };
2782
2884
  function ApiCommonConfigs$setupLogging$lambda($config, $externalLogger) {
2783
2885
  return function ($this$install) {
2784
2886
  $this$install.e40(get_DEFAULT(Companion_instance_0));
2785
- $this$install.d40_1 = $config.h5z_1;
2887
+ $this$install.d40_1 = $config.l5z_1;
2786
2888
  $this$install.e40(new ApiCommonConfigs$setupLogging$1$1($externalLogger));
2787
2889
  return Unit_instance;
2788
2890
  };
@@ -2795,20 +2897,20 @@
2795
2897
  }
2796
2898
  function ApiCommonConfigs() {
2797
2899
  }
2798
- protoOf(ApiCommonConfigs).j5z = function (_this__u8e3s4, config, externalLogger) {
2900
+ protoOf(ApiCommonConfigs).n5z = function (_this__u8e3s4, config, externalLogger) {
2799
2901
  _this__u8e3s4.q2z_1 = true;
2800
- this.k5z(_this__u8e3s4, config.f5z_1);
2801
- this.l5z(_this__u8e3s4, config.i5z_1);
2802
- this.m5z(_this__u8e3s4, config, externalLogger);
2902
+ this.o5z(_this__u8e3s4, config.j5z_1);
2903
+ this.p5z(_this__u8e3s4, config.m5z_1);
2904
+ this.q5z(_this__u8e3s4, config, externalLogger);
2803
2905
  };
2804
- protoOf(ApiCommonConfigs).k5z = function (_this__u8e3s4, url) {
2906
+ protoOf(ApiCommonConfigs).o5z = function (_this__u8e3s4, url) {
2805
2907
  defaultRequest(_this__u8e3s4, ApiCommonConfigs$setupJsonDefaultRequest$lambda(url));
2806
2908
  };
2807
- protoOf(ApiCommonConfigs).m5z = function (_this__u8e3s4, config, externalLogger) {
2909
+ protoOf(ApiCommonConfigs).q5z = function (_this__u8e3s4, config, externalLogger) {
2808
2910
  var tmp = Companion_getInstance_1();
2809
2911
  _this__u8e3s4.l30(tmp, ApiCommonConfigs$setupLogging$lambda(config, externalLogger));
2810
2912
  };
2811
- protoOf(ApiCommonConfigs).l5z = function (_this__u8e3s4, json) {
2913
+ protoOf(ApiCommonConfigs).p5z = function (_this__u8e3s4, json) {
2812
2914
  var tmp = Plugin_getInstance();
2813
2915
  _this__u8e3s4.l30(tmp, ApiCommonConfigs$setupContentNegotiation$lambda(json));
2814
2916
  };
@@ -2833,19 +2935,19 @@
2833
2935
  tmp = json;
2834
2936
  }
2835
2937
  json = tmp;
2836
- this.f5z_1 = baseUrl;
2837
- this.g5z_1 = timeoutMillis;
2838
- this.h5z_1 = loggingLevel;
2839
- this.i5z_1 = json;
2938
+ this.j5z_1 = baseUrl;
2939
+ this.k5z_1 = timeoutMillis;
2940
+ this.l5z_1 = loggingLevel;
2941
+ this.m5z_1 = json;
2840
2942
  }
2841
2943
  protoOf(HttpParams).toString = function () {
2842
- return 'HttpParams(baseUrl=' + this.f5z_1 + ', timeoutMillis=' + this.g5z_1.toString() + ', loggingLevel=' + this.h5z_1.toString() + ', json=' + toString(this.i5z_1) + ')';
2944
+ return 'HttpParams(baseUrl=' + this.j5z_1 + ', timeoutMillis=' + this.k5z_1.toString() + ', loggingLevel=' + this.l5z_1.toString() + ', json=' + toString(this.m5z_1) + ')';
2843
2945
  };
2844
2946
  protoOf(HttpParams).hashCode = function () {
2845
- var result = getStringHashCode(this.f5z_1);
2846
- result = imul(result, 31) + this.g5z_1.hashCode() | 0;
2847
- result = imul(result, 31) + this.h5z_1.hashCode() | 0;
2848
- result = imul(result, 31) + hashCode(this.i5z_1) | 0;
2947
+ var result = getStringHashCode(this.j5z_1);
2948
+ result = imul(result, 31) + this.k5z_1.hashCode() | 0;
2949
+ result = imul(result, 31) + this.l5z_1.hashCode() | 0;
2950
+ result = imul(result, 31) + hashCode(this.m5z_1) | 0;
2849
2951
  return result;
2850
2952
  };
2851
2953
  protoOf(HttpParams).equals = function (other) {
@@ -2854,13 +2956,13 @@
2854
2956
  if (!(other instanceof HttpParams))
2855
2957
  return false;
2856
2958
  var tmp0_other_with_cast = other instanceof HttpParams ? other : THROW_CCE();
2857
- if (!(this.f5z_1 === tmp0_other_with_cast.f5z_1))
2959
+ if (!(this.j5z_1 === tmp0_other_with_cast.j5z_1))
2858
2960
  return false;
2859
- if (!this.g5z_1.equals(tmp0_other_with_cast.g5z_1))
2961
+ if (!this.k5z_1.equals(tmp0_other_with_cast.k5z_1))
2860
2962
  return false;
2861
- if (!this.h5z_1.equals(tmp0_other_with_cast.h5z_1))
2963
+ if (!this.l5z_1.equals(tmp0_other_with_cast.l5z_1))
2862
2964
  return false;
2863
- if (!equals(this.i5z_1, tmp0_other_with_cast.i5z_1))
2965
+ if (!equals(this.m5z_1, tmp0_other_with_cast.m5z_1))
2864
2966
  return false;
2865
2967
  return true;
2866
2968
  };
@@ -2884,12 +2986,12 @@
2884
2986
  }
2885
2987
  function nextBytesCopyTo($this, bytes) {
2886
2988
  try {
2887
- $this.o5z_1.m5p(bytes);
2989
+ $this.s5z_1.m5p(bytes);
2888
2990
  } catch ($p) {
2889
2991
  if ($p instanceof SecRandomCopyException) {
2890
2992
  var error = $p;
2891
- $this.n5z_1.e('SecureGameRandom', 'nextBytesCopyTo error ' + error.toString());
2892
- $this.p5z_1.tg(bytes);
2993
+ $this.r5z_1.e('SecureGameRandom', 'nextBytesCopyTo error ' + error.toString());
2994
+ $this.t5z_1.tg(bytes);
2893
2995
  return Unit_instance;
2894
2996
  } else {
2895
2997
  throw $p;
@@ -2915,9 +3017,9 @@
2915
3017
  }
2916
3018
  function SecureRandom_0(logger) {
2917
3019
  logger = logger === VOID ? new PlatformRaspberryLogger() : logger;
2918
- this.n5z_1 = logger;
2919
- this.o5z_1 = new SecureRandom();
2920
- this.p5z_1 = Default_getInstance();
3020
+ this.r5z_1 = logger;
3021
+ this.s5z_1 = new SecureRandom();
3022
+ this.t5z_1 = Default_getInstance();
2921
3023
  }
2922
3024
  protoOf(SecureRandom_0).qg = function (from, until) {
2923
3025
  checkRangeBounds(this, from, until);
@@ -2946,7 +3048,7 @@
2946
3048
  }
2947
3049
  }
2948
3050
  };
2949
- protoOf(SecureRandom_0).r5z = function () {
3051
+ protoOf(SecureRandom_0).v5z = function () {
2950
3052
  return !(nextBits(this, 1) === 0);
2951
3053
  };
2952
3054
  function CustomRandom() {
@@ -2969,7 +3071,7 @@
2969
3071
  while (pile.m() > 0) {
2970
3072
  // Inline function 'kotlin.comparisons.minOf' call
2971
3073
  var a = pile.m();
2972
- var b = 1 + random.q5z(VOID, twentypc) | 0;
3074
+ var b = 1 + random.u5z(VOID, twentypc) | 0;
2973
3075
  var cards = Math.min(a, b);
2974
3076
  pile2.b2(0, take(pile, cards));
2975
3077
  // Inline function 'kotlin.repeat' call
@@ -3004,11 +3106,11 @@
3004
3106
  // Inline function 'games.raspberry.card_game.random.utils.random.riffle.<anonymous>' call
3005
3107
  var mid = deck.m() / 2 | 0;
3006
3108
  var tenpc = mid / 10 | 0;
3007
- var cut = (mid - tenpc | 0) + random.q5z(VOID, imul(2, tenpc) + 1 | 0) | 0;
3109
+ var cut = (mid - tenpc | 0) + random.u5z(VOID, imul(2, tenpc) + 1 | 0) | 0;
3008
3110
  var deck1 = toMutableList(take(pile, cut));
3009
3111
  var deck2 = toMutableList(drop(pile, cut));
3010
3112
  pile.a2();
3011
- var fromTop = random.r5z();
3113
+ var fromTop = random.v5z();
3012
3114
  while (deck1.m() > 0 && deck2.m() > 0) {
3013
3115
  if (fromTop) {
3014
3116
  pile.e(deck1.e2(0));
@@ -3030,8 +3132,8 @@
3030
3132
  }
3031
3133
  function HttpFactory$provideHttpClient$lambda$lambda($config) {
3032
3134
  return function ($this$install) {
3033
- $this$install.c3k($config.g5z_1);
3034
- $this$install.a3k($config.g5z_1);
3135
+ $this$install.c3k($config.k5z_1);
3136
+ $this$install.a3k($config.k5z_1);
3035
3137
  return Unit_instance;
3036
3138
  };
3037
3139
  }
@@ -3039,13 +3141,13 @@
3039
3141
  return function ($this$HttpClient) {
3040
3142
  var tmp = Plugin_getInstance_0();
3041
3143
  $this$HttpClient.l30(tmp, HttpFactory$provideHttpClient$lambda$lambda($config));
3042
- ApiCommonConfigs_instance.j5z($this$HttpClient, $config, $externalLogger);
3144
+ ApiCommonConfigs_instance.n5z($this$HttpClient, $config, $externalLogger);
3043
3145
  return Unit_instance;
3044
3146
  };
3045
3147
  }
3046
3148
  function HttpFactory() {
3047
3149
  }
3048
- protoOf(HttpFactory).t5z = function (config, externalLogger) {
3150
+ protoOf(HttpFactory).x5z = function (config, externalLogger) {
3049
3151
  var tmp = Js_instance;
3050
3152
  return HttpClient(tmp, HttpFactory$provideHttpClient$lambda(config, externalLogger));
3051
3153
  };
@@ -3061,8 +3163,8 @@
3061
3163
  protoOf($serializer_5).t4j = typeParametersSerializers;
3062
3164
  protoOf($serializer_6).t4j = typeParametersSerializers;
3063
3165
  protoOf(RandomPoolProviderImpl).m5u = getCardDeck$default;
3064
- protoOf(SecureRandom_0).q5z = nextInt$default;
3065
- protoOf(SecureRandom_0).s5z = shuffle;
3166
+ protoOf(SecureRandom_0).u5z = nextInt$default;
3167
+ protoOf(SecureRandom_0).w5z = shuffle;
3066
3168
  //endregion
3067
3169
  //region block: init
3068
3170
  Companion_instance_1 = new Companion();