@solibo/solibo-sdk 1.29.1 → 1.29.3

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.
@@ -104,6 +104,7 @@ import {
104
104
  lazy2hsh8ze7j6ikd as lazy_0,
105
105
  split2bvyvnrlcifjv as split,
106
106
  decodeToString1x4faah2liw2p as decodeToString,
107
+ Collection1k04j3hzsbod0 as Collection,
107
108
  Exception_init_$Init$2wjev6i7b48jh as Exception_init_$Init$_1,
108
109
  isCharSequence1ju9jr1w86plq as isCharSequence,
109
110
  trim11nh7r46at6sx as trim,
@@ -127,7 +128,6 @@ import {
127
128
  plus18eogev54fmsa as plus_0,
128
129
  Companion_getInstance138pnyl3l6agm as Companion_getInstance_1,
129
130
  add2suhfggl4zvkk as add,
130
- Collection1k04j3hzsbod0 as Collection,
131
131
  checkCountOverflow1ro2fe1r4xvgf as checkCountOverflow,
132
132
  addAll1k27qatfgp3k5 as addAll,
133
133
  distinct10qe1scfdvu5k as distinct,
@@ -870,10 +870,13 @@ initMetadataForLambda(HomeApi$clientConfigurator$lambda$lambda$slambda_5, Corout
870
870
  initMetadataForLambda(HomeApi$clientConfigurator$lambda$lambda$slambda_7, CoroutineImpl, VOID, [2]);
871
871
  initMetadataForLambda(HomeApi$clientConfigurator$lambda$lambda$lambda$slambda, CoroutineImpl, VOID, [0]);
872
872
  initMetadataForLambda(HomeApi$clientConfigurator$lambda$lambda$lambda$slambda_1, CoroutineImpl, VOID, [1]);
873
+ initMetadataForLambda(HomeApi$clientConfigurator$lambda$lambda$slambda_9, CoroutineImpl, VOID, [2]);
873
874
  initMetadataForLambda(HomeApi$eventBus$delegate$lambda$slambda, CoroutineImpl, VOID, [0]);
874
875
  initMetadataForCoroutine($refreshCOROUTINE$, CoroutineImpl);
875
876
  initMetadataForCoroutine($refresh$suspendBridgeCOROUTINE$, CoroutineImpl);
876
877
  initMetadataForCoroutine($refreshOrFailCOROUTINE$, CoroutineImpl);
878
+ initMetadataForCoroutine($renewCookieSessionAfterCOROUTINE$, CoroutineImpl);
879
+ initMetadataForCoroutine($renewCookieSessionCOROUTINE$, CoroutineImpl);
877
880
  initMetadataForCoroutine($refreshSessionCOROUTINE$, CoroutineImpl);
878
881
  initMetadataForCoroutine($revokeCOROUTINE$, CoroutineImpl);
879
882
  initMetadataForCoroutine($revoke$suspendBridgeCOROUTINE$, CoroutineImpl);
@@ -6576,6 +6579,11 @@ function get_refreshRefusalStatuses() {
6576
6579
  return refreshRefusalStatuses;
6577
6580
  }
6578
6581
  var refreshRefusalStatuses;
6582
+ function get_signInSteps() {
6583
+ _init_properties_HomeApi_kt__c8oemh();
6584
+ return signInSteps;
6585
+ }
6586
+ var signInSteps;
6579
6587
  var static_init_called;
6580
6588
  function static_init() {
6581
6589
  if (static_init_called)
@@ -6926,6 +6934,18 @@ function sanitizeBaseUrl($this, url) {
6926
6934
  var tmp$ret$0 = Regex_init_$Create$('^(https?://api\\.home\\.solibo\\.no)/api(/|$)').replace_1ix0wf_k$(url, '$1$2');
6927
6935
  return removeSuffix(tmp$ret$0, '/');
6928
6936
  }
6937
+ function renewCookieSessionAfter($this, generation, $completion) {
6938
+ var tmp = new $renewCookieSessionAfterCOROUTINE$($this, generation, $completion);
6939
+ tmp.result_1 = Unit_instance;
6940
+ tmp.exception_1 = null;
6941
+ return tmp.doResume_5yljmg_k$();
6942
+ }
6943
+ function renewCookieSession($this, $completion) {
6944
+ var tmp = new $renewCookieSessionCOROUTINE$($this, $completion);
6945
+ tmp.result_1 = Unit_instance;
6946
+ tmp.exception_1 = null;
6947
+ return tmp.doResume_5yljmg_k$();
6948
+ }
6929
6949
  function refreshSession($this, oldTokens, $completion) {
6930
6950
  var tmp = new $refreshSessionCOROUTINE$($this, oldTokens, $completion);
6931
6951
  tmp.result_1 = Unit_instance;
@@ -6944,6 +6964,13 @@ function _get_residentOperations__6i74up($this) {
6944
6964
  getPropertyCallableRef('residentOperations', 1, tmp, HomeApi$_get_residentOperations_$ref_kjezrb(), null);
6945
6965
  return tmp0.get_value_j01efc_k$();
6946
6966
  }
6967
+ function _get_sessionAuth__fjt4oj($this) {
6968
+ var tmp0 = $this.sessionAuth$delegate_1;
6969
+ var tmp = KProperty1;
6970
+ // Inline function 'kotlin.getValue' call
6971
+ getPropertyCallableRef('sessionAuth', 1, tmp, HomeApi$_get_sessionAuth_$ref_i7y67b(), null);
6972
+ return tmp0.get_value_j01efc_k$();
6973
+ }
6947
6974
  function HomeApi$_init_$lambda_prk93k(_this__u8e3s4) {
6948
6975
  return Unit_instance;
6949
6976
  }
@@ -7934,15 +7961,115 @@ function HomeApi$clientConfigurator$lambda$lambda_10(this$0) {
7934
7961
  return Unit_instance;
7935
7962
  };
7936
7963
  }
7937
- function HomeApi$clientConfigurator$lambda$lambda_11(this$0, $platformName) {
7964
+ function HomeApi$clientConfigurator$lambda$lambda$slambda_9(this$0, resultContinuation) {
7965
+ this.this$0__1 = this$0;
7966
+ CoroutineImpl.call(this, resultContinuation);
7967
+ }
7968
+ protoOf(HomeApi$clientConfigurator$lambda$lambda$slambda_9).invoke_nc6r0k_k$ = function ($this$on, request, $completion) {
7969
+ var tmp = this.create_v0j3o4_k$($this$on, request, $completion);
7970
+ tmp.result_1 = Unit_instance;
7971
+ tmp.exception_1 = null;
7972
+ return tmp.doResume_5yljmg_k$();
7973
+ };
7974
+ protoOf(HomeApi$clientConfigurator$lambda$lambda$slambda_9).invoke_4tzzq6_k$ = function (p1, p2, $completion) {
7975
+ var tmp = p1 instanceof Sender ? p1 : THROW_CCE();
7976
+ return this.invoke_nc6r0k_k$(tmp, p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE(), $completion);
7977
+ };
7978
+ protoOf(HomeApi$clientConfigurator$lambda$lambda$slambda_9).doResume_5yljmg_k$ = function () {
7979
+ var suspendResult = this.result_1;
7980
+ $sm: do
7981
+ try {
7982
+ var tmp = this.state_1;
7983
+ switch (tmp) {
7984
+ case 0:
7985
+ this.exceptionState_1 = 6;
7986
+ this.generation2__1 = this.this$0__1.cookieSessionGeneration_1;
7987
+ this.state_1 = 1;
7988
+ suspendResult = this.$this$on_1.proceed_g307xy_k$(this.request_1, this);
7989
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
7990
+ return suspendResult;
7991
+ }
7992
+
7993
+ continue $sm;
7994
+ case 1:
7995
+ this.call0__1 = suspendResult;
7996
+ if (!this.call0__1.get_response_xlk07e_k$().get_status_jnf6d7_k$().equals(Companion_getInstance_19().Unauthorized_1) || isSignInStep(this.request_1.url_1.build_1k0s4u_k$().get_encodedPath_p9zwnq_k$())) {
7997
+ this.WHEN_RESULT1__1 = true;
7998
+ this.state_1 = 3;
7999
+ continue $sm;
8000
+ } else {
8001
+ this.state_1 = 2;
8002
+ suspendResult = renewCookieSessionAfter(this.this$0__1, this.generation2__1, this);
8003
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
8004
+ return suspendResult;
8005
+ }
8006
+ continue $sm;
8007
+ }
8008
+
8009
+ case 2:
8010
+ this.WHEN_RESULT1__1 = !suspendResult;
8011
+ this.state_1 = 3;
8012
+ continue $sm;
8013
+ case 3:
8014
+ if (this.WHEN_RESULT1__1) {
8015
+ return this.call0__1;
8016
+ } else {
8017
+ this.state_1 = 4;
8018
+ continue $sm;
8019
+ }
8020
+
8021
+ case 4:
8022
+ this.state_1 = 5;
8023
+ suspendResult = this.$this$on_1.proceed_g307xy_k$((new HttpRequestBuilder()).takeFrom_mkv7jk_k$(this.request_1), this);
8024
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
8025
+ return suspendResult;
8026
+ }
8027
+
8028
+ continue $sm;
8029
+ case 5:
8030
+ return suspendResult;
8031
+ case 6:
8032
+ throw this.exception_1;
8033
+ }
8034
+ } catch ($p) {
8035
+ var e = $p;
8036
+ if (this.exceptionState_1 === 6) {
8037
+ throw e;
8038
+ } else {
8039
+ this.state_1 = this.exceptionState_1;
8040
+ this.exception_1 = e;
8041
+ }
8042
+ }
8043
+ while (true);
8044
+ };
8045
+ protoOf(HomeApi$clientConfigurator$lambda$lambda$slambda_9).create_v0j3o4_k$ = function ($this$on, request, completion) {
8046
+ var i = new HomeApi$clientConfigurator$lambda$lambda$slambda_9(this.this$0__1, completion);
8047
+ i.$this$on_1 = $this$on;
8048
+ i.request_1 = request;
8049
+ return i;
8050
+ };
8051
+ function HomeApi$clientConfigurator$lambda$lambda$slambda_10(this$0, resultContinuation) {
8052
+ var i = new HomeApi$clientConfigurator$lambda$lambda$slambda_9(this$0, resultContinuation);
8053
+ return constructCallableReference(function ($this$on, request, $completion) {
8054
+ return i.invoke_nc6r0k_k$($this$on, request, $completion);
8055
+ }, 2);
8056
+ }
8057
+ function HomeApi$clientConfigurator$lambda$lambda_11(this$0) {
8058
+ return function ($this$createClientPlugin) {
8059
+ var tmp = Send_instance;
8060
+ $this$createClientPlugin.on_z1oiz_k$(tmp, HomeApi$clientConfigurator$lambda$lambda$slambda_10(this$0, null));
8061
+ return Unit_instance;
8062
+ };
8063
+ }
8064
+ function HomeApi$clientConfigurator$lambda$lambda_12(this$0, $platformName) {
7938
8065
  return function ($this$defaultRequest) {
7939
8066
  if (contentType_0($this$defaultRequest) == null) {
7940
8067
  contentType($this$defaultRequest, Application_getInstance().Json_1);
7941
8068
  }
7942
8069
  accept($this$defaultRequest, Application_getInstance().Json_1);
7943
8070
  header($this$defaultRequest, 'Accept-Language', buildAcceptLanguage(this$0.userLanguage));
7944
- header($this$defaultRequest, 'User-Agent', 'SoliboSDK/1.29.1 (' + $platformName + ')');
7945
- header($this$defaultRequest, 'X-Solibo-SDK-Version', '1.29.1');
8071
+ header($this$defaultRequest, 'User-Agent', 'SoliboSDK/1.29.3 (' + $platformName + ')');
8072
+ header($this$defaultRequest, 'X-Solibo-SDK-Version', '1.29.3');
7946
8073
  return Unit_instance;
7947
8074
  };
7948
8075
  }
@@ -7977,11 +8104,12 @@ function HomeApi$clientConfigurator$lambda(this$0) {
7977
8104
  break;
7978
8105
  default:
7979
8106
  _this__u8e3s4.install$default_lc5jjj_k$(Companion_getInstance_14());
8107
+ _this__u8e3s4.install$default_lc5jjj_k$(createClientPlugin('CookieSessionRefresh', HomeApi$clientConfigurator$lambda$lambda_11(this$0)));
7980
8108
  tmp_5 = Unit_instance;
7981
8109
  break;
7982
8110
  }
7983
8111
  var platformName = (new Platform()).name_1;
7984
- defaultRequest(_this__u8e3s4, HomeApi$clientConfigurator$lambda$lambda_11(this$0, platformName));
8112
+ defaultRequest(_this__u8e3s4, HomeApi$clientConfigurator$lambda$lambda_12(this$0, platformName));
7985
8113
  applyPlatformSpecificHttpClientConfig(_this__u8e3s4);
7986
8114
  this$0.configurator_1(_this__u8e3s4);
7987
8115
  return Unit_instance;
@@ -8215,6 +8343,23 @@ function HomeApi$_get_auth_$ref_6t65a3() {
8215
8343
  return p0.auth;
8216
8344
  }, 1, 0, 146);
8217
8345
  }
8346
+ function HomeApi$sessionAuth$delegate$lambda(this$0) {
8347
+ return function () {
8348
+ var tmp0_elvis_lhs = this$0.baseUrl_1;
8349
+ var tmp;
8350
+ if (tmp0_elvis_lhs == null) {
8351
+ throw IllegalStateException_init_$Create$('No Baseurl set!');
8352
+ } else {
8353
+ tmp = tmp0_elvis_lhs;
8354
+ }
8355
+ return create_8(removeSuffix(tmp, '/api'), this$0.httpClientEngine_1, this$0.clientConfigurator);
8356
+ };
8357
+ }
8358
+ function HomeApi$_get_sessionAuth_$ref_i7y67b() {
8359
+ return constructCallableReference(function (p0) {
8360
+ return _get_sessionAuth__fjt4oj(p0);
8361
+ }, 1, 0, 147);
8362
+ }
8218
8363
  function HomeApi$organization$delegate$lambda(this$0) {
8219
8364
  return function () {
8220
8365
  var tmp0_elvis_lhs = this$0.baseUrl_1;
@@ -8230,7 +8375,7 @@ function HomeApi$organization$delegate$lambda(this$0) {
8230
8375
  function HomeApi$_get_organization_$ref_95rsds() {
8231
8376
  return constructCallableReference(function (p0) {
8232
8377
  return p0.organization;
8233
- }, 1, 0, 147);
8378
+ }, 1, 0, 148);
8234
8379
  }
8235
8380
  function HomeApi$insurance$delegate$lambda(this$0) {
8236
8381
  return function () {
@@ -8247,7 +8392,7 @@ function HomeApi$insurance$delegate$lambda(this$0) {
8247
8392
  function HomeApi$_get_insurance_$ref_vd2a1v() {
8248
8393
  return constructCallableReference(function (p0) {
8249
8394
  return p0.insurance;
8250
- }, 1, 0, 148);
8395
+ }, 1, 0, 149);
8251
8396
  }
8252
8397
  function HomeApi$hms$delegate$lambda(this$0) {
8253
8398
  return function () {
@@ -8264,7 +8409,7 @@ function HomeApi$hms$delegate$lambda(this$0) {
8264
8409
  function HomeApi$_get_hms_$ref_87y8bb() {
8265
8410
  return constructCallableReference(function (p0) {
8266
8411
  return p0.hms;
8267
- }, 1, 0, 149);
8412
+ }, 1, 0, 150);
8268
8413
  }
8269
8414
  function HomeApi$routines$delegate$lambda(this$0) {
8270
8415
  return function () {
@@ -8281,7 +8426,7 @@ function HomeApi$routines$delegate$lambda(this$0) {
8281
8426
  function HomeApi$_get_routines_$ref_ngmh3o() {
8282
8427
  return constructCallableReference(function (p0) {
8283
8428
  return p0.routines;
8284
- }, 1, 0, 150);
8429
+ }, 1, 0, 151);
8285
8430
  }
8286
8431
  function HomeApi$storage$delegate$lambda(this$0) {
8287
8432
  return function () {
@@ -8298,7 +8443,7 @@ function HomeApi$storage$delegate$lambda(this$0) {
8298
8443
  function HomeApi$_get_storage_$ref_ggf47w() {
8299
8444
  return constructCallableReference(function (p0) {
8300
8445
  return p0.storage;
8301
- }, 1, 0, 151);
8446
+ }, 1, 0, 152);
8302
8447
  }
8303
8448
  function HomeApi$language$delegate$lambda(this$0) {
8304
8449
  return function () {
@@ -8315,7 +8460,7 @@ function HomeApi$language$delegate$lambda(this$0) {
8315
8460
  function HomeApi$_get_language_$ref_bito51() {
8316
8461
  return constructCallableReference(function (p0) {
8317
8462
  return p0.language;
8318
- }, 1, 0, 152);
8463
+ }, 1, 0, 153);
8319
8464
  }
8320
8465
  function HomeApi$board$delegate$lambda(this$0) {
8321
8466
  return function () {
@@ -8332,7 +8477,7 @@ function HomeApi$board$delegate$lambda(this$0) {
8332
8477
  function HomeApi$_get_board_$ref_4ppatt() {
8333
8478
  return constructCallableReference(function (p0) {
8334
8479
  return p0.board;
8335
- }, 1, 0, 153);
8480
+ }, 1, 0, 154);
8336
8481
  }
8337
8482
  function HomeApi$invoice$delegate$lambda(this$0) {
8338
8483
  return function () {
@@ -8349,7 +8494,7 @@ function HomeApi$invoice$delegate$lambda(this$0) {
8349
8494
  function HomeApi$_get_invoice_$ref_dyvql2() {
8350
8495
  return constructCallableReference(function (p0) {
8351
8496
  return p0.invoice;
8352
- }, 1, 0, 154);
8497
+ }, 1, 0, 155);
8353
8498
  }
8354
8499
  function HomeApi$loan$delegate$lambda(this$0) {
8355
8500
  return function () {
@@ -8366,7 +8511,7 @@ function HomeApi$loan$delegate$lambda(this$0) {
8366
8511
  function HomeApi$_get_loan_$ref_ad6037() {
8367
8512
  return constructCallableReference(function (p0) {
8368
8513
  return p0.loan;
8369
- }, 1, 0, 155);
8514
+ }, 1, 0, 156);
8370
8515
  }
8371
8516
  function HomeApi$meeting$delegate$lambda(this$0) {
8372
8517
  return function () {
@@ -8383,7 +8528,7 @@ function HomeApi$meeting$delegate$lambda(this$0) {
8383
8528
  function HomeApi$_get_meeting_$ref_oxffdw() {
8384
8529
  return constructCallableReference(function (p0) {
8385
8530
  return p0.meeting;
8386
- }, 1, 0, 156);
8531
+ }, 1, 0, 157);
8387
8532
  }
8388
8533
  function HomeApi$task$delegate$lambda(this$0) {
8389
8534
  return function () {
@@ -8400,7 +8545,7 @@ function HomeApi$task$delegate$lambda(this$0) {
8400
8545
  function HomeApi$_get_task_$ref_ecwade() {
8401
8546
  return constructCallableReference(function (p0) {
8402
8547
  return p0.task;
8403
- }, 1, 0, 157);
8548
+ }, 1, 0, 158);
8404
8549
  }
8405
8550
  function HomeApi$communication$delegate$lambda(this$0) {
8406
8551
  return function () {
@@ -8417,7 +8562,7 @@ function HomeApi$communication$delegate$lambda(this$0) {
8417
8562
  function HomeApi$_get_communication_$ref_br2joh() {
8418
8563
  return constructCallableReference(function (p0) {
8419
8564
  return p0.communication;
8420
- }, 1, 0, 158);
8565
+ }, 1, 0, 159);
8421
8566
  }
8422
8567
  function HomeApi$parking$delegate$lambda(this$0) {
8423
8568
  return function () {
@@ -8434,7 +8579,7 @@ function HomeApi$parking$delegate$lambda(this$0) {
8434
8579
  function HomeApi$_get_parking_$ref_s0zdoh() {
8435
8580
  return constructCallableReference(function (p0) {
8436
8581
  return p0.parking;
8437
- }, 1, 0, 159);
8582
+ }, 1, 0, 160);
8438
8583
  }
8439
8584
  function HomeApi$scopedContacts$delegate$lambda(this$0) {
8440
8585
  return function () {
@@ -8451,7 +8596,7 @@ function HomeApi$scopedContacts$delegate$lambda(this$0) {
8451
8596
  function HomeApi$_get_scopedContacts_$ref_fdczeo() {
8452
8597
  return constructCallableReference(function (p0) {
8453
8598
  return p0.scopedContacts;
8454
- }, 1, 0, 160);
8599
+ }, 1, 0, 161);
8455
8600
  }
8456
8601
  function HomeApi$supplier$delegate$lambda(this$0) {
8457
8602
  return function () {
@@ -8468,7 +8613,7 @@ function HomeApi$supplier$delegate$lambda(this$0) {
8468
8613
  function HomeApi$_get_supplier_$ref_trycuv() {
8469
8614
  return constructCallableReference(function (p0) {
8470
8615
  return p0.supplier;
8471
- }, 1, 0, 161);
8616
+ }, 1, 0, 162);
8472
8617
  }
8473
8618
  function HomeApi$accounting$delegate$lambda(this$0) {
8474
8619
  return function () {
@@ -8485,7 +8630,7 @@ function HomeApi$accounting$delegate$lambda(this$0) {
8485
8630
  function HomeApi$_get_accounting_$ref_6f709e() {
8486
8631
  return constructCallableReference(function (p0) {
8487
8632
  return p0.accounting;
8488
- }, 1, 0, 162);
8633
+ }, 1, 0, 163);
8489
8634
  }
8490
8635
  function HomeApi$eventBus$delegate$lambda$lambda(this$0) {
8491
8636
  return function ($this$buildClient) {
@@ -8580,7 +8725,7 @@ function HomeApi$eventBus$delegate$lambda(this$0) {
8580
8725
  function HomeApi$_get_eventBus_$ref_fn407x() {
8581
8726
  return constructCallableReference(function (p0) {
8582
8727
  return p0.eventBus;
8583
- }, 1, 0, 163);
8728
+ }, 1, 0, 164);
8584
8729
  }
8585
8730
  function HomeApi$marketing$delegate$lambda(this$0) {
8586
8731
  return function () {
@@ -8597,7 +8742,7 @@ function HomeApi$marketing$delegate$lambda(this$0) {
8597
8742
  function HomeApi$_get_marketing_$ref_zvqr3() {
8598
8743
  return constructCallableReference(function (p0) {
8599
8744
  return p0.marketing;
8600
- }, 1, 0, 164);
8745
+ }, 1, 0, 165);
8601
8746
  }
8602
8747
  function HomeApi$expense$delegate$lambda(this$0) {
8603
8748
  return function () {
@@ -8614,7 +8759,7 @@ function HomeApi$expense$delegate$lambda(this$0) {
8614
8759
  function HomeApi$_get_expense_$ref_mj5467() {
8615
8760
  return constructCallableReference(function (p0) {
8616
8761
  return p0.expense;
8617
- }, 1, 0, 165);
8762
+ }, 1, 0, 166);
8618
8763
  }
8619
8764
  function HomeApi$issue$delegate$lambda(this$0) {
8620
8765
  return function () {
@@ -8631,7 +8776,7 @@ function HomeApi$issue$delegate$lambda(this$0) {
8631
8776
  function HomeApi$_get_issue_$ref_gxvk2() {
8632
8777
  return constructCallableReference(function (p0) {
8633
8778
  return p0.issue;
8634
- }, 1, 0, 166);
8779
+ }, 1, 0, 167);
8635
8780
  }
8636
8781
  function HomeApi$economy$delegate$lambda(this$0) {
8637
8782
  return function () {
@@ -8648,7 +8793,7 @@ function HomeApi$economy$delegate$lambda(this$0) {
8648
8793
  function HomeApi$_get_economy_$ref_o3970n() {
8649
8794
  return constructCallableReference(function (p0) {
8650
8795
  return p0.economy;
8651
- }, 1, 0, 167);
8796
+ }, 1, 0, 168);
8652
8797
  }
8653
8798
  function HomeApi$bankAccounts$delegate$lambda(this$0) {
8654
8799
  return function () {
@@ -8665,7 +8810,7 @@ function HomeApi$bankAccounts$delegate$lambda(this$0) {
8665
8810
  function HomeApi$_get_bankAccounts_$ref_qjvm73() {
8666
8811
  return constructCallableReference(function (p0) {
8667
8812
  return p0.bankAccounts;
8668
- }, 1, 0, 168);
8813
+ }, 1, 0, 169);
8669
8814
  }
8670
8815
  function HomeApi$settlement$delegate$lambda(this$0) {
8671
8816
  return function () {
@@ -8682,7 +8827,7 @@ function HomeApi$settlement$delegate$lambda(this$0) {
8682
8827
  function HomeApi$_get_settlement_$ref_up6hba() {
8683
8828
  return constructCallableReference(function (p0) {
8684
8829
  return p0.settlement;
8685
- }, 1, 0, 169);
8830
+ }, 1, 0, 170);
8686
8831
  }
8687
8832
  function HomeApi$appStores$delegate$lambda(this$0) {
8688
8833
  return function () {
@@ -8699,7 +8844,7 @@ function HomeApi$appStores$delegate$lambda(this$0) {
8699
8844
  function HomeApi$_get_appStores_$ref_p7pkik() {
8700
8845
  return constructCallableReference(function (p0) {
8701
8846
  return p0.appStores;
8702
- }, 1, 0, 170);
8847
+ }, 1, 0, 171);
8703
8848
  }
8704
8849
  function HomeApi$unsubscribe$delegate$lambda(this$0) {
8705
8850
  return function () {
@@ -8716,7 +8861,7 @@ function HomeApi$unsubscribe$delegate$lambda(this$0) {
8716
8861
  function HomeApi$_get_unsubscribe_$ref_5tpx16() {
8717
8862
  return constructCallableReference(function (p0) {
8718
8863
  return p0.unsubscribe;
8719
- }, 1, 0, 171);
8864
+ }, 1, 0, 172);
8720
8865
  }
8721
8866
  function HomeApi$followUps$delegate$lambda(this$0) {
8722
8867
  return function () {
@@ -8733,7 +8878,7 @@ function HomeApi$followUps$delegate$lambda(this$0) {
8733
8878
  function HomeApi$_get_followUps_$ref_67tb8w() {
8734
8879
  return constructCallableReference(function (p0) {
8735
8880
  return p0.followUps;
8736
- }, 1, 0, 172);
8881
+ }, 1, 0, 173);
8737
8882
  }
8738
8883
  function $refreshCOROUTINE$(_this__u8e3s4, oldTokens, resultContinuation) {
8739
8884
  CoroutineImpl.call(this, resultContinuation);
@@ -8897,6 +9042,244 @@ protoOf($refreshOrFailCOROUTINE$).doResume_5yljmg_k$ = function () {
8897
9042
  }
8898
9043
  while (true);
8899
9044
  };
9045
+ function $renewCookieSessionAfterCOROUTINE$(_this__u8e3s4, generation, resultContinuation) {
9046
+ CoroutineImpl.call(this, resultContinuation);
9047
+ this._this__u8e3s4__1 = _this__u8e3s4;
9048
+ this.generation_1 = generation;
9049
+ }
9050
+ protoOf($renewCookieSessionAfterCOROUTINE$).doResume_5yljmg_k$ = function () {
9051
+ var suspendResult = this.result_1;
9052
+ $sm: do
9053
+ try {
9054
+ var tmp = this.state_1;
9055
+ switch (tmp) {
9056
+ case 0:
9057
+ this.exceptionState_1 = 11;
9058
+ this.this1__1 = this._this__u8e3s4__1.refreshLock_1;
9059
+ this.owner0__1 = null;
9060
+ this.state_1 = 1;
9061
+ suspendResult = this.this1__1.lock_ugrcvf_k$(this.owner0__1, this);
9062
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9063
+ return suspendResult;
9064
+ }
9065
+
9066
+ continue $sm;
9067
+ case 1:
9068
+ this.tmp$ret$22__1 = Unit_instance;
9069
+ this.state_1 = 2;
9070
+ continue $sm;
9071
+ case 2:
9072
+ this.exceptionState_1 = 10;
9073
+ this.tmp$ret$03__1 = Unit_instance;
9074
+ this.state_1 = 3;
9075
+ continue $sm;
9076
+ case 3:
9077
+ if (!(this._this__u8e3s4__1.cookieSessionGeneration_1 === this.generation_1)) {
9078
+ this.tmp$ret$03__1 = true;
9079
+ this.state_1 = 8;
9080
+ continue $sm;
9081
+ } else {
9082
+ this.state_1 = 4;
9083
+ continue $sm;
9084
+ }
9085
+
9086
+ case 4:
9087
+ this.exceptionState_1 = 6;
9088
+ this.state_1 = 5;
9089
+ suspendResult = renewCookieSession(this._this__u8e3s4__1, this);
9090
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9091
+ return suspendResult;
9092
+ }
9093
+
9094
+ continue $sm;
9095
+ case 5:
9096
+ this.TRY_RESULT4__1 = true;
9097
+ this.exceptionState_1 = 10;
9098
+ this.state_1 = 7;
9099
+ continue $sm;
9100
+ case 6:
9101
+ this.exceptionState_1 = 10;
9102
+ var tmp_0 = this.exception_1;
9103
+ if (tmp_0 instanceof CancellationException) {
9104
+ var cancelled = this.exception_1;
9105
+ var tmp_1 = this;
9106
+ throw cancelled;
9107
+ } else {
9108
+ var tmp_2 = this.exception_1;
9109
+ if (tmp_2 instanceof Exception) {
9110
+ var failure = this.exception_1;
9111
+ var tmp_3 = this;
9112
+ tmp_3.TRY_RESULT4__1 = false;
9113
+ this.state_1 = 7;
9114
+ continue $sm;
9115
+ } else {
9116
+ throw this.exception_1;
9117
+ }
9118
+ }
9119
+
9120
+ case 7:
9121
+ this.exceptionState_1 = 10;
9122
+ this.tmp$ret$03__1 = this.TRY_RESULT4__1;
9123
+ if (false) {
9124
+ this.state_1 = 3;
9125
+ continue $sm;
9126
+ }
9127
+
9128
+ this.state_1 = 8;
9129
+ continue $sm;
9130
+ case 8:
9131
+ this.tmp$ret$22__1 = this.tmp$ret$03__1;
9132
+ this.exceptionState_1 = 11;
9133
+ this.state_1 = 9;
9134
+ continue $sm;
9135
+ case 9:
9136
+ var tmp_4 = this.tmp$ret$22__1;
9137
+ this.exceptionState_1 = 11;
9138
+ this.this1__1.unlock_ulcrcl_k$(this.owner0__1);
9139
+ return tmp_4;
9140
+ case 10:
9141
+ this.exceptionState_1 = 11;
9142
+ var t = this.exception_1;
9143
+ this.this1__1.unlock_ulcrcl_k$(this.owner0__1);
9144
+ throw t;
9145
+ case 11:
9146
+ throw this.exception_1;
9147
+ }
9148
+ } catch ($p) {
9149
+ var e = $p;
9150
+ if (this.exceptionState_1 === 11) {
9151
+ throw e;
9152
+ } else {
9153
+ this.state_1 = this.exceptionState_1;
9154
+ this.exception_1 = e;
9155
+ }
9156
+ }
9157
+ while (true);
9158
+ };
9159
+ function $renewCookieSessionCOROUTINE$(_this__u8e3s4, resultContinuation) {
9160
+ CoroutineImpl.call(this, resultContinuation);
9161
+ this._this__u8e3s4__1 = _this__u8e3s4;
9162
+ }
9163
+ protoOf($renewCookieSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9164
+ var suspendResult = this.result_1;
9165
+ $sm: do
9166
+ try {
9167
+ var tmp = this.state_1;
9168
+ switch (tmp) {
9169
+ case 0:
9170
+ this.exceptionState_1 = 9;
9171
+ this.exceptionState_1 = 2;
9172
+ this.state_1 = 1;
9173
+ var tmp_0 = _get_sessionAuth__fjt4oj(this._this__u8e3s4__1);
9174
+ var tmp0_elvis_lhs = this._this__u8e3s4__1.clientId;
9175
+ var tmp_1;
9176
+ if (tmp0_elvis_lhs == null) {
9177
+ throw IllegalStateException_init_$Create$('No ClientId set!');
9178
+ } else {
9179
+ tmp_1 = tmp0_elvis_lhs;
9180
+ }
9181
+
9182
+ var tmp_2 = tmp_1;
9183
+ var tmp1_elvis_lhs = this._this__u8e3s4__1.userId;
9184
+ var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? this._this__u8e3s4__1.settings_1.getStringOrNull_w9a5ex_k$('userLogin') : tmp1_elvis_lhs;
9185
+ suspendResult = tmp_0.refreshTokens$suspendBridge_qhelbw_k$(new RefreshTokensCommand(tmp_2, VOID, this._this__u8e3s4__1.fingerprinter_1.print(tmp2_elvis_lhs == null ? 'unknown' : tmp2_elvis_lhs)), this);
9186
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9187
+ return suspendResult;
9188
+ }
9189
+
9190
+ continue $sm;
9191
+ case 1:
9192
+ this.TRY_RESULT3__1 = suspendResult;
9193
+ this.exceptionState_1 = 9;
9194
+ this.state_1 = 4;
9195
+ continue $sm;
9196
+ case 2:
9197
+ this.exceptionState_1 = 9;
9198
+ var tmp_3 = this.exception_1;
9199
+ if (tmp_3 instanceof SoliboSDKError) {
9200
+ this.failure4__1 = this.exception_1;
9201
+ if (!rejectsRefreshToken(this.failure4__1))
9202
+ throw this.failure4__1;
9203
+ this._this__u8e3s4__1.settings_1.remove_6241ba_k$('userLogin');
9204
+ this.state_1 = 3;
9205
+ suspendResult = endSession(this._this__u8e3s4__1, this);
9206
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9207
+ return suspendResult;
9208
+ }
9209
+ continue $sm;
9210
+ } else {
9211
+ throw this.exception_1;
9212
+ }
9213
+
9214
+ case 3:
9215
+ var tmp_4 = this;
9216
+ throw new RefreshRefused(this.failure4__1);
9217
+ case 4:
9218
+ this.exceptionState_1 = 9;
9219
+ this.response2__1 = this.TRY_RESULT3__1;
9220
+ var tmp3_subject = this.response2__1.status;
9221
+ if (200 <= tmp3_subject ? tmp3_subject <= 299 : false) {
9222
+ this.state_1 = 7;
9223
+ suspendResult = this.response2__1.body$suspendBridge_a6dedm_k$(this);
9224
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9225
+ return suspendResult;
9226
+ }
9227
+ continue $sm;
9228
+ } else {
9229
+ if (tmp3_subject === Companion_getInstance_19().Unauthorized_1.value_1) {
9230
+ this._this__u8e3s4__1.settings_1.remove_6241ba_k$('userLogin');
9231
+ this.state_1 = 5;
9232
+ suspendResult = endSession(this._this__u8e3s4__1, this);
9233
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9234
+ return suspendResult;
9235
+ }
9236
+ continue $sm;
9237
+ } else {
9238
+ var tmp_5 = this;
9239
+ throw new UnknownRefreshErrorException('Refresh failed with status ' + this.response2__1.status);
9240
+ }
9241
+ }
9242
+
9243
+ case 5:
9244
+ this.ARGUMENT1__1 = Companion_getInstance_19().Unauthorized_1.value_1;
9245
+ this.state_1 = 6;
9246
+ suspendResult = bodyAsText(this.response2__1.response, VOID, this);
9247
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
9248
+ return suspendResult;
9249
+ }
9250
+
9251
+ continue $sm;
9252
+ case 6:
9253
+ var ARGUMENT = suspendResult;
9254
+ var ARGUMENT_0 = parseApiErrors(ARGUMENT);
9255
+ var ARGUMENT_1 = new SoliboSDKError(this.ARGUMENT1__1, ARGUMENT_0, FailureKind_EXPECTED_AUTH_getInstance());
9256
+ var tmp_6 = this;
9257
+ throw new RefreshRefused(ARGUMENT_1);
9258
+ case 7:
9259
+ var ARGUMENT_2 = suspendResult.userId;
9260
+ this._this__u8e3s4__1.set_userId_wekl5g_k$(ARGUMENT_2);
9261
+ var tmp_7 = this;
9262
+ var _unary__edvuaz = this._this__u8e3s4__1.cookieSessionGeneration_1;
9263
+ this._this__u8e3s4__1.cookieSessionGeneration_1 = _unary__edvuaz + 1 | 0;
9264
+ tmp_7.WHEN_RESULT0__1 = _unary__edvuaz;
9265
+ this.state_1 = 8;
9266
+ continue $sm;
9267
+ case 8:
9268
+ return Unit_instance;
9269
+ case 9:
9270
+ throw this.exception_1;
9271
+ }
9272
+ } catch ($p) {
9273
+ var e = $p;
9274
+ if (this.exceptionState_1 === 9) {
9275
+ throw e;
9276
+ } else {
9277
+ this.state_1 = this.exceptionState_1;
9278
+ this.exception_1 = e;
9279
+ }
9280
+ }
9281
+ while (true);
9282
+ };
8900
9283
  function $refreshSessionCOROUTINE$(_this__u8e3s4, oldTokens, resultContinuation) {
8901
9284
  CoroutineImpl.call(this, resultContinuation);
8902
9285
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -8909,7 +9292,7 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
8909
9292
  var tmp = this.state_1;
8910
9293
  switch (tmp) {
8911
9294
  case 0:
8912
- this.exceptionState_1 = 34;
9295
+ this.exceptionState_1 = 26;
8913
9296
  this.this1__1 = this._this__u8e3s4__1.refreshLock_1;
8914
9297
  this.owner0__1 = null;
8915
9298
  this.state_1 = 1;
@@ -8924,7 +9307,7 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
8924
9307
  this.state_1 = 2;
8925
9308
  continue $sm;
8926
9309
  case 2:
8927
- this.exceptionState_1 = 33;
9310
+ this.exceptionState_1 = 25;
8928
9311
  this.tmp$ret$03__1 = Unit_instance;
8929
9312
  this.state_1 = 3;
8930
9313
  continue $sm;
@@ -8934,10 +9317,10 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
8934
9317
  var tokenAge = subtract(now, this._this__u8e3s4__1.tokenTimestamp_1);
8935
9318
  if (!(this._this__u8e3s4__1.bearerToken_1 == null) && tokenAge < 900000n) {
8936
9319
  this.tmp$ret$03__1 = new BearerTokens(ensureNotNull(this._this__u8e3s4__1.bearerToken_1), '');
8937
- this.state_1 = 31;
9320
+ this.state_1 = 23;
8938
9321
  continue $sm;
8939
9322
  } else {
8940
- this.state_1 = 28;
9323
+ this.state_1 = 20;
8941
9324
  continue $sm;
8942
9325
  }
8943
9326
  } else {
@@ -8947,24 +9330,8 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
8947
9330
 
8948
9331
  case 4:
8949
9332
  if (this._this__u8e3s4__1.authMode.equals(AuthMode_COOKIE_getInstance())) {
8950
- var tmp4_elvis_lhs = this._this__u8e3s4__1.userId;
8951
- var tmp5_elvis_lhs = tmp4_elvis_lhs == null ? this._this__u8e3s4__1.settings_1.getStringOrNull_w9a5ex_k$('userLogin') : tmp4_elvis_lhs;
8952
- var id = tmp5_elvis_lhs == null ? 'unknown' : tmp5_elvis_lhs;
8953
- var fingerprint = this._this__u8e3s4__1.fingerprinter_1.print(id);
8954
- var this_0 = this._this__u8e3s4__1;
8955
- this.exceptionState_1 = 23;
8956
- this.tmp06__1 = Companion_instance;
8957
- this.$this$runCatching8__1 = this_0;
8958
9333
  this.state_1 = 19;
8959
- var tmp_0 = this.$this$runCatching8__1.auth;
8960
- var tmp0_elvis_lhs = this.$this$runCatching8__1.clientId;
8961
- var tmp_1;
8962
- if (tmp0_elvis_lhs == null) {
8963
- throw IllegalStateException_init_$Create$('No ClientId set!');
8964
- } else {
8965
- tmp_1 = tmp0_elvis_lhs;
8966
- }
8967
- suspendResult = tmp_0.refreshTokens$suspendBridge_qhelbw_k$(new RefreshTokensCommand(tmp_1, VOID, fingerprint), this);
9334
+ suspendResult = renewCookieSession(this._this__u8e3s4__1, this);
8968
9335
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
8969
9336
  return suspendResult;
8970
9337
  }
@@ -8975,40 +9342,40 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
8975
9342
  }
8976
9343
 
8977
9344
  case 5:
8978
- var tmp_2 = this;
8979
- var tmp6_elvis_lhs = this.oldTokens_1;
8980
- var tmp_3;
8981
- if (tmp6_elvis_lhs == null) {
8982
- var tmp7_elvis_lhs = this._this__u8e3s4__1.bearerToken_1;
8983
- tmp_3 = new BearerTokens(tmp7_elvis_lhs == null ? '' : tmp7_elvis_lhs, this._this__u8e3s4__1.refreshToken_1);
9345
+ var tmp_0 = this;
9346
+ var tmp4_elvis_lhs = this.oldTokens_1;
9347
+ var tmp_1;
9348
+ if (tmp4_elvis_lhs == null) {
9349
+ var tmp5_elvis_lhs = this._this__u8e3s4__1.bearerToken_1;
9350
+ tmp_1 = new BearerTokens(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs, this._this__u8e3s4__1.refreshToken_1);
8984
9351
  } else {
8985
- tmp_3 = tmp6_elvis_lhs;
9352
+ tmp_1 = tmp4_elvis_lhs;
8986
9353
  }
8987
9354
 
8988
- tmp_2.tokensToUse10__1 = tmp_3;
9355
+ tmp_0.tokensToUse5__1 = tmp_1;
8989
9356
  var persisted = this._this__u8e3s4__1.settings_1.getStringOrNull_w9a5ex_k$('refreshToken');
8990
9357
  var current = this._this__u8e3s4__1.refreshToken_1;
8991
- var old = this.tokensToUse10__1.refreshToken_1;
8992
- var tmp_4;
8993
- var tmp_5;
9358
+ var old = this.tokensToUse5__1.refreshToken_1;
9359
+ var tmp_2;
9360
+ var tmp_3;
8994
9361
  if (old == null || isBlank(old)) {
8995
- tmp_5 = true;
9362
+ tmp_3 = true;
8996
9363
  } else {
8997
- tmp_5 = !(old == persisted);
9364
+ tmp_3 = !(old == persisted);
8998
9365
  }
8999
9366
 
9000
- if (tmp_5) {
9001
- tmp_4 = true;
9367
+ if (tmp_3) {
9368
+ tmp_2 = true;
9002
9369
  } else {
9003
- tmp_4 = !(old == current);
9370
+ tmp_2 = !(old == current);
9004
9371
  }
9005
9372
 
9006
- if (tmp_4) {
9007
- var tmp_6 = this;
9008
- var tmp0_elvis_lhs_0 = this._this__u8e3s4__1.bearerToken_1;
9009
- var tmp_7 = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
9010
- tmp_6.tmp$ret$03__1 = new BearerTokens(tmp_7, current == null ? '' : current);
9011
- this.state_1 = 31;
9373
+ if (tmp_2) {
9374
+ var tmp_4 = this;
9375
+ var tmp0_elvis_lhs = this._this__u8e3s4__1.bearerToken_1;
9376
+ var tmp_5 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
9377
+ tmp_4.tmp$ret$03__1 = new BearerTokens(tmp_5, current == null ? '' : current);
9378
+ this.state_1 = 23;
9012
9379
  continue $sm;
9013
9380
  } else {
9014
9381
  this.state_1 = 6;
@@ -9016,13 +9383,13 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9016
9383
  }
9017
9384
 
9018
9385
  case 6:
9019
- if (!(this._this__u8e3s4__1.refreshToken_1 == this.tokensToUse10__1.refreshToken_1)) {
9020
- var tmp_8 = this;
9021
- var tmp8_elvis_lhs = this._this__u8e3s4__1.bearerToken_1;
9022
- var tmp_9 = tmp8_elvis_lhs == null ? '' : tmp8_elvis_lhs;
9023
- var tmp9_elvis_lhs = this._this__u8e3s4__1.refreshToken_1;
9024
- tmp_8.tmp$ret$03__1 = new BearerTokens(tmp_9, tmp9_elvis_lhs == null ? '' : tmp9_elvis_lhs);
9025
- this.state_1 = 31;
9386
+ if (!(this._this__u8e3s4__1.refreshToken_1 == this.tokensToUse5__1.refreshToken_1)) {
9387
+ var tmp_6 = this;
9388
+ var tmp6_elvis_lhs = this._this__u8e3s4__1.bearerToken_1;
9389
+ var tmp_7 = tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs;
9390
+ var tmp7_elvis_lhs = this._this__u8e3s4__1.refreshToken_1;
9391
+ tmp_6.tmp$ret$03__1 = new BearerTokens(tmp_7, tmp7_elvis_lhs == null ? '' : tmp7_elvis_lhs);
9392
+ this.state_1 = 23;
9026
9393
  continue $sm;
9027
9394
  } else {
9028
9395
  this.state_1 = 7;
@@ -9030,46 +9397,46 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9030
9397
  }
9031
9398
 
9032
9399
  case 7:
9033
- var this_1 = this.tokensToUse10__1.refreshToken_1;
9034
- if (this_1 == null || isBlank(this_1)) {
9035
- var tmp_10 = this;
9036
- tmp_10.WHEN_RESULT9__1 = null;
9400
+ var this_0 = this.tokensToUse5__1.refreshToken_1;
9401
+ if (this_0 == null || isBlank(this_0)) {
9402
+ var tmp_8 = this;
9403
+ tmp_8.WHEN_RESULT4__1 = null;
9037
9404
  this.state_1 = 18;
9038
9405
  continue $sm;
9039
9406
  } else {
9040
- var this_2 = this._this__u8e3s4__1.userId;
9041
- if (this_2 == null || isBlank(this_2)) {
9042
- var tmp_11 = this;
9043
- tmp_11.WHEN_RESULT9__1 = null;
9407
+ var this_1 = this._this__u8e3s4__1.userId;
9408
+ if (this_1 == null || isBlank(this_1)) {
9409
+ var tmp_9 = this;
9410
+ tmp_9.WHEN_RESULT4__1 = null;
9044
9411
  this.state_1 = 18;
9045
9412
  continue $sm;
9046
9413
  } else {
9047
- var this_3 = this._this__u8e3s4__1.clientId;
9048
- if (this_3 == null || isBlank(this_3)) {
9049
- var tmp_12 = this;
9050
- tmp_12.WHEN_RESULT9__1 = null;
9414
+ var this_2 = this._this__u8e3s4__1.clientId;
9415
+ if (this_2 == null || isBlank(this_2)) {
9416
+ var tmp_10 = this;
9417
+ tmp_10.WHEN_RESULT4__1 = null;
9051
9418
  this.state_1 = 18;
9052
9419
  continue $sm;
9053
9420
  } else {
9054
- var this_4 = this._this__u8e3s4__1;
9421
+ var this_3 = this._this__u8e3s4__1;
9055
9422
  this.exceptionState_1 = 16;
9056
- this.tmp012__1 = Companion_instance;
9057
- this.$this$runCatching16__1 = this_4;
9058
- var deviceKey = this.$this$runCatching16__1.device_1.key(ensureNotNull(this.$this$runCatching16__1.userId));
9059
- var this_5 = logging();
9423
+ this.tmp07__1 = Companion_instance;
9424
+ this.$this$runCatching11__1 = this_3;
9425
+ var deviceKey = this.$this$runCatching11__1.device_1.key(ensureNotNull(this.$this$runCatching11__1.userId));
9426
+ var this_4 = logging();
9060
9427
  if (KmLogging_getInstance().isLoggingDebug_1) {
9061
- this_5.debugApi_8ssb7n_k$(this_5.tagName_1, toString_0('Device key for refresh: ' + deviceKey));
9428
+ this_4.debugApi_8ssb7n_k$(this_4.tagName_1, toString_0('Device key for refresh: ' + deviceKey));
9062
9429
  }
9063
9430
  this.exceptionState_1 = 9;
9064
9431
  this.state_1 = 8;
9065
- var tmp_13 = this.$this$runCatching16__1.auth;
9066
- var tmp1_clientId = ensureNotNull(this.$this$runCatching16__1.clientId);
9067
- var tmp2_fingerprint = this.$this$runCatching16__1.fingerprinter_1.print(ensureNotNull(this.$this$runCatching16__1.userId));
9068
- var tmp0_elvis_lhs_1 = this.$this$runCatching16__1.refreshToken_1;
9069
- var tmp3_refreshToken = tmp0_elvis_lhs_1 == null ? ensureNotNull(this.tokensToUse10__1.refreshToken_1) : tmp0_elvis_lhs_1;
9070
- var tmp4_userId = ensureNotNull(this.$this$runCatching16__1.userId);
9071
- var tmp5_deviceKey = this.$this$runCatching16__1.device_1.key(ensureNotNull(this.$this$runCatching16__1.userId));
9072
- suspendResult = tmp_13.refreshTokens$suspendBridge_qhelbw_k$(new RefreshTokensCommand(tmp1_clientId, tmp5_deviceKey, tmp2_fingerprint, tmp3_refreshToken, tmp4_userId), this);
9432
+ var tmp_11 = this.$this$runCatching11__1.auth;
9433
+ var tmp1_clientId = ensureNotNull(this.$this$runCatching11__1.clientId);
9434
+ var tmp2_fingerprint = this.$this$runCatching11__1.fingerprinter_1.print(ensureNotNull(this.$this$runCatching11__1.userId));
9435
+ var tmp0_elvis_lhs_0 = this.$this$runCatching11__1.refreshToken_1;
9436
+ var tmp3_refreshToken = tmp0_elvis_lhs_0 == null ? ensureNotNull(this.tokensToUse5__1.refreshToken_1) : tmp0_elvis_lhs_0;
9437
+ var tmp4_userId = ensureNotNull(this.$this$runCatching11__1.userId);
9438
+ var tmp5_deviceKey = this.$this$runCatching11__1.device_1.key(ensureNotNull(this.$this$runCatching11__1.userId));
9439
+ suspendResult = tmp_11.refreshTokens$suspendBridge_qhelbw_k$(new RefreshTokensCommand(tmp1_clientId, tmp5_deviceKey, tmp2_fingerprint, tmp3_refreshToken, tmp4_userId), this);
9073
9440
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9074
9441
  return suspendResult;
9075
9442
  }
@@ -9079,19 +9446,19 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9079
9446
  }
9080
9447
 
9081
9448
  case 8:
9082
- this.TRY_RESULT17__1 = suspendResult;
9449
+ this.TRY_RESULT12__1 = suspendResult;
9083
9450
  this.exceptionState_1 = 16;
9084
9451
  this.state_1 = 11;
9085
9452
  continue $sm;
9086
9453
  case 9:
9087
9454
  this.exceptionState_1 = 16;
9088
- var tmp_14 = this.exception_1;
9089
- if (tmp_14 instanceof SoliboSDKError) {
9090
- this.failure18__1 = this.exception_1;
9091
- if (!rejectsRefreshToken(this.failure18__1))
9092
- throw this.failure18__1;
9455
+ var tmp_12 = this.exception_1;
9456
+ if (tmp_12 instanceof SoliboSDKError) {
9457
+ this.failure13__1 = this.exception_1;
9458
+ if (!rejectsRefreshToken(this.failure13__1))
9459
+ throw this.failure13__1;
9093
9460
  this.state_1 = 10;
9094
- suspendResult = endSession(this.$this$runCatching16__1, this);
9461
+ suspendResult = endSession(this.$this$runCatching11__1, this);
9095
9462
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9096
9463
  return suspendResult;
9097
9464
  }
@@ -9101,15 +9468,15 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9101
9468
  }
9102
9469
 
9103
9470
  case 10:
9104
- var tmp_15 = this;
9105
- throw new RefreshRefused(this.failure18__1);
9471
+ var tmp_13 = this;
9472
+ throw new RefreshRefused(this.failure13__1);
9106
9473
  case 11:
9107
9474
  this.exceptionState_1 = 16;
9108
- this.response15__1 = this.TRY_RESULT17__1;
9109
- var tmp6_subject = this.response15__1.status;
9475
+ this.response10__1 = this.TRY_RESULT12__1;
9476
+ var tmp6_subject = this.response10__1.status;
9110
9477
  if (tmp6_subject === Companion_getInstance_19().Accepted_1.value_1) {
9111
9478
  this.state_1 = 14;
9112
- suspendResult = this.response15__1.body$suspendBridge_a6dedm_k$(this);
9479
+ suspendResult = this.response10__1.body$suspendBridge_a6dedm_k$(this);
9113
9480
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9114
9481
  return suspendResult;
9115
9482
  }
@@ -9117,21 +9484,21 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9117
9484
  } else {
9118
9485
  if (tmp6_subject === Companion_getInstance_19().Unauthorized_1.value_1) {
9119
9486
  this.state_1 = 12;
9120
- suspendResult = endSession(this.$this$runCatching16__1, this);
9487
+ suspendResult = endSession(this.$this$runCatching11__1, this);
9121
9488
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9122
9489
  return suspendResult;
9123
9490
  }
9124
9491
  continue $sm;
9125
9492
  } else {
9126
- var tmp_16 = this;
9127
- throw new UnknownRefreshErrorException('Refresh failed with status ' + this.response15__1.status);
9493
+ var tmp_14 = this;
9494
+ throw new UnknownRefreshErrorException('Refresh failed with status ' + this.response10__1.status);
9128
9495
  }
9129
9496
  }
9130
9497
 
9131
9498
  case 12:
9132
- this.ARGUMENT14__1 = Companion_getInstance_19().Unauthorized_1.value_1;
9499
+ this.ARGUMENT9__1 = Companion_getInstance_19().Unauthorized_1.value_1;
9133
9500
  this.state_1 = 13;
9134
- suspendResult = bodyAsText(this.response15__1.response, VOID, this);
9501
+ suspendResult = bodyAsText(this.response10__1.response, VOID, this);
9135
9502
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9136
9503
  return suspendResult;
9137
9504
  }
@@ -9140,28 +9507,28 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9140
9507
  case 13:
9141
9508
  var ARGUMENT = suspendResult;
9142
9509
  var ARGUMENT_0 = parseApiErrors(ARGUMENT);
9143
- var ARGUMENT_1 = new SoliboSDKError(this.ARGUMENT14__1, ARGUMENT_0, FailureKind_EXPECTED_AUTH_getInstance());
9144
- var tmp_17 = this;
9510
+ var ARGUMENT_1 = new SoliboSDKError(this.ARGUMENT9__1, ARGUMENT_0, FailureKind_EXPECTED_AUTH_getInstance());
9511
+ var tmp_15 = this;
9145
9512
  throw new RefreshRefused(ARGUMENT_1);
9146
9513
  case 14:
9147
- this.WHEN_RESULT13__1 = suspendResult;
9514
+ this.WHEN_RESULT8__1 = suspendResult;
9148
9515
  this.state_1 = 15;
9149
9516
  continue $sm;
9150
9517
  case 15:
9151
- var tmp2 = this.WHEN_RESULT13__1;
9152
- var tmp_18 = this;
9153
- this.tmp012__1;
9154
- tmp_18.TRY_RESULT11__1 = _Result___init__impl__xyqfz8(tmp2);
9155
- this.exceptionState_1 = 33;
9518
+ var tmp2 = this.WHEN_RESULT8__1;
9519
+ var tmp_16 = this;
9520
+ this.tmp07__1;
9521
+ tmp_16.TRY_RESULT6__1 = _Result___init__impl__xyqfz8(tmp2);
9522
+ this.exceptionState_1 = 25;
9156
9523
  this.state_1 = 17;
9157
9524
  continue $sm;
9158
9525
  case 16:
9159
- this.exceptionState_1 = 33;
9160
- var tmp_19 = this.exception_1;
9161
- if (tmp_19 instanceof Error) {
9526
+ this.exceptionState_1 = 25;
9527
+ var tmp_17 = this.exception_1;
9528
+ if (tmp_17 instanceof Error) {
9162
9529
  var e = this.exception_1;
9163
- var tmp_20 = this;
9164
- tmp_20.TRY_RESULT11__1 = _Result___init__impl__xyqfz8(createFailure(e));
9530
+ var tmp_18 = this;
9531
+ tmp_18.TRY_RESULT6__1 = _Result___init__impl__xyqfz8(createFailure(e));
9165
9532
  this.state_1 = 17;
9166
9533
  continue $sm;
9167
9534
  } else {
@@ -9169,43 +9536,43 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9169
9536
  }
9170
9537
 
9171
9538
  case 17:
9172
- this.exceptionState_1 = 33;
9173
- var this_6 = this.TRY_RESULT11__1;
9174
- var tmp_21;
9175
- if (_Result___get_isSuccess__impl__sndoy8(this_6)) {
9176
- var this_7 = new Result(this_6);
9177
- var tmp_22;
9539
+ this.exceptionState_1 = 25;
9540
+ var this_5 = this.TRY_RESULT6__1;
9541
+ var tmp_19;
9542
+ if (_Result___get_isSuccess__impl__sndoy8(this_5)) {
9543
+ var this_6 = new Result(this_5);
9544
+ var tmp_20;
9178
9545
  try {
9179
- var $this$runCatching = this_7.value_1;
9546
+ var $this$runCatching = this_6.value_1;
9180
9547
  var authResult = _Result___get_value__impl__bjfvqg($this$runCatching);
9181
- var tmp0_elvis_lhs_2 = authResult.tokens;
9182
- var tmp_23;
9183
- if (tmp0_elvis_lhs_2 == null) {
9548
+ var tmp0_elvis_lhs_1 = authResult.tokens;
9549
+ var tmp_21;
9550
+ if (tmp0_elvis_lhs_1 == null) {
9184
9551
  throw Exception_init_$Create$('Refresh succeeded but tokens were missing');
9185
9552
  } else {
9186
- tmp_23 = tmp0_elvis_lhs_2;
9553
+ tmp_21 = tmp0_elvis_lhs_1;
9187
9554
  }
9188
- var tokens = tmp_23;
9555
+ var tokens = tmp_21;
9189
9556
  var builder = new JsonObjectBuilder();
9190
9557
  builder.put_mrde5n_k$('accessToken', JsonPrimitive(tokens.accessToken));
9191
9558
  builder.put_mrde5n_k$('identity', JsonPrimitive(tokens.identity));
9192
9559
  builder.put_mrde5n_k$('data', JsonPrimitive(tokens.data));
9193
9560
  var jsonObject = builder.build_bkh6qh_k$();
9194
- var this_8 = Default_getInstance_0();
9195
- var this_9 = this_8.get_serializersModule_piitvg_k$();
9196
- var this_10 = serializer(this_9, createKType(getKClass(JsonObject), arrayOf([]), false));
9197
- var jsonString = this_8.encodeToString_k0apqx_k$(isInterface(this_10, KSerializer) ? this_10 : THROW_CCE(), jsonObject);
9561
+ var this_7 = Default_getInstance_0();
9562
+ var this_8 = this_7.get_serializersModule_piitvg_k$();
9563
+ var this_9 = serializer(this_8, createKType(getKClass(JsonObject), arrayOf([]), false));
9564
+ var jsonString = this_7.encodeToString_k0apqx_k$(isInterface(this_9, KSerializer) ? this_9 : THROW_CCE(), jsonObject);
9198
9565
  var encoded = Default_getInstance().UrlSafe_1.encode$default_h4nonq_k$(toByteArray_0(jsonString));
9199
9566
  this._this__u8e3s4__1.setToken(encoded);
9200
9567
  var tmp1_elvis_lhs = authResult.refreshToken;
9201
- var tmp_24;
9568
+ var tmp_22;
9202
9569
  if (tmp1_elvis_lhs == null) {
9203
9570
  var tmp2_safe_receiver = authResult.tokens;
9204
- tmp_24 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.refreshToken;
9571
+ tmp_22 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.refreshToken;
9205
9572
  } else {
9206
- tmp_24 = tmp1_elvis_lhs;
9573
+ tmp_22 = tmp1_elvis_lhs;
9207
9574
  }
9208
- var tmp3_safe_receiver = tmp_24;
9575
+ var tmp3_safe_receiver = tmp_22;
9209
9576
  if (tmp3_safe_receiver == null)
9210
9577
  null;
9211
9578
  else {
@@ -9213,253 +9580,162 @@ protoOf($refreshSessionCOROUTINE$).doResume_5yljmg_k$ = function () {
9213
9580
  }
9214
9581
  this._this__u8e3s4__1.set_userId_wekl5g_k$(tokens.identity);
9215
9582
  var tmp4_elvis_lhs_0 = authResult.refreshToken;
9216
- var tmp_25;
9583
+ var tmp_23;
9217
9584
  if (tmp4_elvis_lhs_0 == null) {
9218
9585
  var tmp5_safe_receiver = authResult.tokens;
9219
- tmp_25 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.refreshToken;
9586
+ tmp_23 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.refreshToken;
9220
9587
  } else {
9221
- tmp_25 = tmp4_elvis_lhs_0;
9588
+ tmp_23 = tmp4_elvis_lhs_0;
9222
9589
  }
9223
- var tmp6_elvis_lhs_0 = tmp_25;
9224
- var value = new BearerTokens(encoded, tmp6_elvis_lhs_0 == null ? this.tokensToUse10__1.refreshToken_1 : tmp6_elvis_lhs_0);
9225
- tmp_22 = _Result___init__impl__xyqfz8(value);
9590
+ var tmp6_elvis_lhs_0 = tmp_23;
9591
+ var value = new BearerTokens(encoded, tmp6_elvis_lhs_0 == null ? this.tokensToUse5__1.refreshToken_1 : tmp6_elvis_lhs_0);
9592
+ tmp_20 = _Result___init__impl__xyqfz8(value);
9226
9593
  } catch ($p) {
9227
- var tmp_26;
9594
+ var tmp_24;
9228
9595
  if ($p instanceof Error) {
9229
9596
  var e_0 = $p;
9230
- tmp_26 = _Result___init__impl__xyqfz8(createFailure(e_0));
9597
+ tmp_24 = _Result___init__impl__xyqfz8(createFailure(e_0));
9231
9598
  } else {
9232
9599
  throw $p;
9233
9600
  }
9234
- tmp_22 = tmp_26;
9601
+ tmp_20 = tmp_24;
9235
9602
  }
9236
- tmp_21 = tmp_22;
9603
+ tmp_19 = tmp_20;
9237
9604
  } else {
9238
- tmp_21 = _Result___init__impl__xyqfz8(_Result___get_value__impl__bjfvqg(this_6));
9605
+ tmp_19 = _Result___init__impl__xyqfz8(_Result___get_value__impl__bjfvqg(this_5));
9239
9606
  }
9240
9607
 
9241
- var this_11 = tmp_21;
9242
- var tmp0_safe_receiver = Result__exceptionOrNull_impl_p6xea9(this_11);
9608
+ var this_10 = tmp_19;
9609
+ var tmp0_safe_receiver = Result__exceptionOrNull_impl_p6xea9(this_10);
9243
9610
  if (tmp0_safe_receiver == null)
9244
9611
  null;
9245
9612
  else {
9246
9613
  if (tmp0_safe_receiver instanceof CancellationException)
9247
9614
  throw tmp0_safe_receiver;
9248
- var this_12 = logging();
9615
+ var this_11 = logging();
9249
9616
  if (KmLogging_getInstance().isLoggingInfo_1) {
9250
- this_12.infoApi_6vw3du_k$(this_12.tagName_1, toString_0('Refresh successfully failed!'));
9617
+ this_11.infoApi_6vw3du_k$(this_11.tagName_1, toString_0('Refresh successfully failed!'));
9251
9618
  }
9252
9619
  }
9253
9620
 
9254
- var tmp_27 = this;
9255
- throwOnFailure(this_11);
9256
- tmp_27.WHEN_RESULT9__1 = _Result___get_value__impl__bjfvqg(this_11);
9621
+ var tmp_25 = this;
9622
+ throwOnFailure(this_10);
9623
+ tmp_25.WHEN_RESULT4__1 = _Result___get_value__impl__bjfvqg(this_10);
9257
9624
  this.state_1 = 18;
9258
9625
  continue $sm;
9259
9626
  case 18:
9260
- this.tmp$ret$03__1 = this.WHEN_RESULT9__1;
9627
+ this.tmp$ret$03__1 = this.WHEN_RESULT4__1;
9261
9628
  if (false) {
9262
9629
  this.state_1 = 3;
9263
9630
  continue $sm;
9264
9631
  }
9265
9632
 
9266
- this.state_1 = 31;
9633
+ this.state_1 = 23;
9267
9634
  continue $sm;
9268
9635
  case 19:
9269
- var response = suspendResult;
9270
- if (response.status === Companion_getInstance_19().Unauthorized_1.value_1) {
9271
- this.$this$runCatching8__1.settings_1.remove_6241ba_k$('activeLogin');
9272
- this.$this$runCatching8__1.settings_1.remove_6241ba_k$('userLogin');
9273
- this.$this$runCatching8__1.clearTokens();
9274
- this.state_1 = 21;
9275
- suspendResult = this.$this$runCatching8__1.refreshFailure_1(this);
9276
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
9277
- return suspendResult;
9278
- }
9279
- continue $sm;
9280
- } else {
9281
- this.state_1 = 20;
9282
- suspendResult = response.body$suspendBridge_a6dedm_k$(this);
9283
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
9284
- return suspendResult;
9285
- }
9286
- continue $sm;
9287
- }
9288
-
9289
- case 20:
9290
- var authResult_0 = suspendResult;
9291
- this.$this$runCatching8__1.set_userId_wekl5g_k$(authResult_0.userId);
9292
- this.WHEN_RESULT7__1 = null;
9293
- this.state_1 = 22;
9294
- continue $sm;
9295
- case 21:
9296
- this.WHEN_RESULT7__1 = null;
9297
- this.state_1 = 22;
9636
+ this.tmp$ret$03__1 = null;
9637
+ this.state_1 = 23;
9298
9638
  continue $sm;
9299
- case 22:
9300
- var tmp2_0 = this.WHEN_RESULT7__1;
9301
- var tmp_28 = this;
9302
- this.tmp06__1;
9303
- tmp_28.TRY_RESULT5__1 = _Result___init__impl__xyqfz8(tmp2_0);
9304
- this.exceptionState_1 = 33;
9305
- this.state_1 = 24;
9306
- continue $sm;
9307
- case 23:
9308
- this.exceptionState_1 = 33;
9309
- var tmp_29 = this.exception_1;
9310
- if (tmp_29 instanceof Error) {
9311
- var e_1 = this.exception_1;
9312
- var tmp_30 = this;
9313
- tmp_30.TRY_RESULT5__1 = _Result___init__impl__xyqfz8(createFailure(e_1));
9314
- this.state_1 = 24;
9315
- continue $sm;
9316
- } else {
9317
- throw this.exception_1;
9318
- }
9319
-
9320
- case 24:
9321
- this.exceptionState_1 = 33;
9322
- var this_13 = this.TRY_RESULT5__1;
9323
- var exception = Result__exceptionOrNull_impl_p6xea9(this_13);
9324
- if (exception == null) {
9325
- this.WHEN_RESULT4__1 = _Result___get_value__impl__bjfvqg(this_13);
9326
- this.state_1 = 27;
9327
- continue $sm;
9328
- } else {
9329
- var tmp_31;
9330
- if (exception instanceof Exception) {
9331
- var tmp0_safe_receiver_0 = exception.message;
9332
- tmp_31 = (tmp0_safe_receiver_0 == null ? null : contains(tmp0_safe_receiver_0, '401')) === true;
9333
- } else {
9334
- tmp_31 = false;
9335
- }
9336
- if (tmp_31) {
9337
- this._this__u8e3s4__1.settings_1.remove_6241ba_k$('activeLogin');
9338
- this._this__u8e3s4__1.settings_1.remove_6241ba_k$('userLogin');
9339
- this._this__u8e3s4__1.clearTokens();
9340
- this.state_1 = 25;
9341
- suspendResult = this._this__u8e3s4__1.refreshFailure_1(this);
9342
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
9343
- return suspendResult;
9344
- }
9345
- continue $sm;
9346
- } else {
9347
- this.state_1 = 26;
9348
- continue $sm;
9349
- }
9350
- }
9351
-
9352
- case 25:
9353
- this.state_1 = 26;
9354
- continue $sm;
9355
- case 26:
9356
- this.WHEN_RESULT4__1 = null;
9357
- this.state_1 = 27;
9358
- continue $sm;
9359
- case 27:
9360
- this.tmp$ret$03__1 = this.WHEN_RESULT4__1;
9361
- this.state_1 = 31;
9362
- continue $sm;
9363
- case 28:
9364
- this.state_1 = 29;
9365
- var tmp_32 = _get_authM2M__c6rkbz(this._this__u8e3s4__1);
9366
- var tmp0_elvis_lhs_3 = this._this__u8e3s4__1.clientId;
9367
- var tmp_33;
9368
- if (tmp0_elvis_lhs_3 == null) {
9639
+ case 20:
9640
+ this.state_1 = 21;
9641
+ var tmp_26 = _get_authM2M__c6rkbz(this._this__u8e3s4__1);
9642
+ var tmp0_elvis_lhs_2 = this._this__u8e3s4__1.clientId;
9643
+ var tmp_27;
9644
+ if (tmp0_elvis_lhs_2 == null) {
9369
9645
  throw Exception_init_$Create$('M2M Client ID not set');
9370
9646
  } else {
9371
- tmp_33 = tmp0_elvis_lhs_3;
9647
+ tmp_27 = tmp0_elvis_lhs_2;
9372
9648
  }
9373
9649
 
9374
- var tmp_34 = tmp_33;
9650
+ var tmp_28 = tmp_27;
9375
9651
  var tmp1_elvis_lhs_0 = this._this__u8e3s4__1.clientSecret;
9376
- var tmp_35;
9652
+ var tmp_29;
9377
9653
  if (tmp1_elvis_lhs_0 == null) {
9378
9654
  throw Exception_init_$Create$('M2M Client Secret not set');
9379
9655
  } else {
9380
- tmp_35 = tmp1_elvis_lhs_0;
9656
+ tmp_29 = tmp1_elvis_lhs_0;
9381
9657
  }
9382
9658
 
9383
- suspendResult = tmp_32.createM2MTokens$suspendBridge_5mlkf0_k$(new CreateM2MTokensCommand(tmp_34, tmp_35, normalizedM2MScopes(this._this__u8e3s4__1.scopes)), this);
9659
+ suspendResult = tmp_26.createM2MTokens$suspendBridge_5mlkf0_k$(new CreateM2MTokensCommand(tmp_28, tmp_29, normalizedM2MScopes(this._this__u8e3s4__1.scopes)), this);
9384
9660
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9385
9661
  return suspendResult;
9386
9662
  }
9387
9663
 
9388
9664
  continue $sm;
9389
- case 29:
9390
- var response_0 = suspendResult;
9391
- if (!(response_0.status === Companion_getInstance_19().Created_1.value_1)) {
9392
- throw Exception_init_$Create$('M2M Token acquisition failed with status ' + response_0.status);
9665
+ case 21:
9666
+ var response = suspendResult;
9667
+ if (!(response.status === Companion_getInstance_19().Created_1.value_1)) {
9668
+ throw Exception_init_$Create$('M2M Token acquisition failed with status ' + response.status);
9393
9669
  }
9394
9670
 
9395
- this.state_1 = 30;
9396
- suspendResult = response_0.body$suspendBridge_a6dedm_k$(this);
9671
+ this.state_1 = 22;
9672
+ suspendResult = response.body$suspendBridge_a6dedm_k$(this);
9397
9673
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
9398
9674
  return suspendResult;
9399
9675
  }
9400
9676
 
9401
9677
  continue $sm;
9402
- case 30:
9403
- var authResult_1 = suspendResult;
9404
- var tmp2_elvis_lhs = authResult_1.tokens;
9405
- var tmp_36;
9678
+ case 22:
9679
+ var authResult_0 = suspendResult;
9680
+ var tmp2_elvis_lhs = authResult_0.tokens;
9681
+ var tmp_30;
9406
9682
  if (tmp2_elvis_lhs == null) {
9407
9683
  throw Exception_init_$Create$('M2M Token acquisition returned no tokens');
9408
9684
  } else {
9409
- tmp_36 = tmp2_elvis_lhs;
9685
+ tmp_30 = tmp2_elvis_lhs;
9410
9686
  }
9411
9687
 
9412
- var tokens_0 = tmp_36;
9688
+ var tokens_0 = tmp_30;
9413
9689
  var builder_0 = new JsonObjectBuilder();
9414
9690
  builder_0.put_mrde5n_k$('accessToken', JsonPrimitive(tokens_0.accessToken));
9415
9691
  builder_0.put_mrde5n_k$('identity', JsonPrimitive(tokens_0.identity));
9416
9692
  builder_0.put_mrde5n_k$('data', JsonPrimitive(tokens_0.data));
9417
9693
  var jsonObject_0 = builder_0.build_bkh6qh_k$();
9418
- var this_14 = Default_getInstance_0();
9419
- var this_15 = this_14.get_serializersModule_piitvg_k$();
9420
- var this_16 = serializer(this_15, createKType(getKClass(JsonObject), arrayOf([]), false));
9421
- var jsonString_0 = this_14.encodeToString_k0apqx_k$(isInterface(this_16, KSerializer) ? this_16 : THROW_CCE(), jsonObject_0);
9694
+ var this_12 = Default_getInstance_0();
9695
+ var this_13 = this_12.get_serializersModule_piitvg_k$();
9696
+ var this_14 = serializer(this_13, createKType(getKClass(JsonObject), arrayOf([]), false));
9697
+ var jsonString_0 = this_12.encodeToString_k0apqx_k$(isInterface(this_14, KSerializer) ? this_14 : THROW_CCE(), jsonObject_0);
9422
9698
  var encoded_0 = Default_getInstance().UrlSafe_1.encode$default_h4nonq_k$(toByteArray_0(jsonString_0));
9423
9699
  this._this__u8e3s4__1.setToken(encoded_0);
9424
9700
  this._this__u8e3s4__1.set_userId_wekl5g_k$(tokens_0.identity);
9425
9701
  this._this__u8e3s4__1.tokenTimestamp_1 = System_instance.now_2cba_k$().toEpochMilliseconds_82cfls_k$();
9426
- var tmp_37 = this;
9702
+ var tmp_31 = this;
9427
9703
  var tmp3_safe_receiver_0 = this._this__u8e3s4__1.bearerToken_1;
9428
- var tmp_38;
9704
+ var tmp_32;
9429
9705
  if (tmp3_safe_receiver_0 == null) {
9430
- tmp_38 = null;
9706
+ tmp_32 = null;
9431
9707
  } else {
9432
- tmp_38 = new BearerTokens(tmp3_safe_receiver_0, '');
9708
+ tmp_32 = new BearerTokens(tmp3_safe_receiver_0, '');
9433
9709
  }
9434
9710
 
9435
- tmp_37.tmp$ret$03__1 = tmp_38;
9436
- this.state_1 = 31;
9711
+ tmp_31.tmp$ret$03__1 = tmp_32;
9712
+ this.state_1 = 23;
9437
9713
  continue $sm;
9438
- case 31:
9714
+ case 23:
9439
9715
  this.tmp$ret$22__1 = this.tmp$ret$03__1;
9440
- this.exceptionState_1 = 34;
9441
- this.state_1 = 32;
9716
+ this.exceptionState_1 = 26;
9717
+ this.state_1 = 24;
9442
9718
  continue $sm;
9443
- case 32:
9444
- var tmp_39 = this.tmp$ret$22__1;
9445
- this.exceptionState_1 = 34;
9719
+ case 24:
9720
+ var tmp_33 = this.tmp$ret$22__1;
9721
+ this.exceptionState_1 = 26;
9446
9722
  this.this1__1.unlock_ulcrcl_k$(this.owner0__1);
9447
- return tmp_39;
9448
- case 33:
9449
- this.exceptionState_1 = 34;
9723
+ return tmp_33;
9724
+ case 25:
9725
+ this.exceptionState_1 = 26;
9450
9726
  var t = this.exception_1;
9451
9727
  this.this1__1.unlock_ulcrcl_k$(this.owner0__1);
9452
9728
  throw t;
9453
- case 34:
9729
+ case 26:
9454
9730
  throw this.exception_1;
9455
9731
  }
9456
9732
  } catch ($p_0) {
9457
- var e_2 = $p_0;
9458
- if (this.exceptionState_1 === 34) {
9459
- throw e_2;
9733
+ var e_1 = $p_0;
9734
+ if (this.exceptionState_1 === 26) {
9735
+ throw e_1;
9460
9736
  } else {
9461
9737
  this.state_1 = this.exceptionState_1;
9462
- this.exception_1 = e_2;
9738
+ this.exception_1 = e_1;
9463
9739
  }
9464
9740
  }
9465
9741
  while (true);
@@ -9600,6 +9876,7 @@ function HomeApi(fingerprinter, device, httpClientEngine, settings, configurator
9600
9876
  var tmp_2 = this;
9601
9877
  tmp_2.authM2M$delegate_1 = lazy_0(HomeApi$authM2M$delegate$lambda(this));
9602
9878
  this.refreshLock_1 = Mutex();
9879
+ this.cookieSessionGeneration_1 = 0;
9603
9880
  this.publicCacheStorage_1 = new InvalidatingCacheStorage(Companion_getInstance_16().Unlimited_1());
9604
9881
  this.privateCacheStorage_1 = new InvalidatingCacheStorage(Companion_getInstance_16().Unlimited_1());
9605
9882
  this.baseUrl_1 = 'https://api.home.solibo.no';
@@ -9645,57 +9922,59 @@ function HomeApi(fingerprinter, device, httpClientEngine, settings, configurator
9645
9922
  var tmp_16 = this;
9646
9923
  tmp_16.auth$delegate_1 = lazy_0(HomeApi$auth$delegate$lambda(this));
9647
9924
  var tmp_17 = this;
9648
- tmp_17.organization$delegate_1 = lazy_0(HomeApi$organization$delegate$lambda(this));
9925
+ tmp_17.sessionAuth$delegate_1 = lazy_0(HomeApi$sessionAuth$delegate$lambda(this));
9649
9926
  var tmp_18 = this;
9650
- tmp_18.insurance$delegate_1 = lazy_0(HomeApi$insurance$delegate$lambda(this));
9927
+ tmp_18.organization$delegate_1 = lazy_0(HomeApi$organization$delegate$lambda(this));
9651
9928
  var tmp_19 = this;
9652
- tmp_19.hms$delegate_1 = lazy_0(HomeApi$hms$delegate$lambda(this));
9929
+ tmp_19.insurance$delegate_1 = lazy_0(HomeApi$insurance$delegate$lambda(this));
9653
9930
  var tmp_20 = this;
9654
- tmp_20.routines$delegate_1 = lazy_0(HomeApi$routines$delegate$lambda(this));
9931
+ tmp_20.hms$delegate_1 = lazy_0(HomeApi$hms$delegate$lambda(this));
9655
9932
  var tmp_21 = this;
9656
- tmp_21.storage$delegate_1 = lazy_0(HomeApi$storage$delegate$lambda(this));
9933
+ tmp_21.routines$delegate_1 = lazy_0(HomeApi$routines$delegate$lambda(this));
9657
9934
  var tmp_22 = this;
9658
- tmp_22.language$delegate_1 = lazy_0(HomeApi$language$delegate$lambda(this));
9935
+ tmp_22.storage$delegate_1 = lazy_0(HomeApi$storage$delegate$lambda(this));
9659
9936
  var tmp_23 = this;
9660
- tmp_23.board$delegate_1 = lazy_0(HomeApi$board$delegate$lambda(this));
9937
+ tmp_23.language$delegate_1 = lazy_0(HomeApi$language$delegate$lambda(this));
9661
9938
  var tmp_24 = this;
9662
- tmp_24.invoice$delegate_1 = lazy_0(HomeApi$invoice$delegate$lambda(this));
9939
+ tmp_24.board$delegate_1 = lazy_0(HomeApi$board$delegate$lambda(this));
9663
9940
  var tmp_25 = this;
9664
- tmp_25.loan$delegate_1 = lazy_0(HomeApi$loan$delegate$lambda(this));
9941
+ tmp_25.invoice$delegate_1 = lazy_0(HomeApi$invoice$delegate$lambda(this));
9665
9942
  var tmp_26 = this;
9666
- tmp_26.meeting$delegate_1 = lazy_0(HomeApi$meeting$delegate$lambda(this));
9943
+ tmp_26.loan$delegate_1 = lazy_0(HomeApi$loan$delegate$lambda(this));
9667
9944
  var tmp_27 = this;
9668
- tmp_27.task$delegate_1 = lazy_0(HomeApi$task$delegate$lambda(this));
9945
+ tmp_27.meeting$delegate_1 = lazy_0(HomeApi$meeting$delegate$lambda(this));
9669
9946
  var tmp_28 = this;
9670
- tmp_28.communication$delegate_1 = lazy_0(HomeApi$communication$delegate$lambda(this));
9947
+ tmp_28.task$delegate_1 = lazy_0(HomeApi$task$delegate$lambda(this));
9671
9948
  var tmp_29 = this;
9672
- tmp_29.parking$delegate_1 = lazy_0(HomeApi$parking$delegate$lambda(this));
9949
+ tmp_29.communication$delegate_1 = lazy_0(HomeApi$communication$delegate$lambda(this));
9673
9950
  var tmp_30 = this;
9674
- tmp_30.scopedContacts$delegate_1 = lazy_0(HomeApi$scopedContacts$delegate$lambda(this));
9951
+ tmp_30.parking$delegate_1 = lazy_0(HomeApi$parking$delegate$lambda(this));
9675
9952
  var tmp_31 = this;
9676
- tmp_31.supplier$delegate_1 = lazy_0(HomeApi$supplier$delegate$lambda(this));
9953
+ tmp_31.scopedContacts$delegate_1 = lazy_0(HomeApi$scopedContacts$delegate$lambda(this));
9677
9954
  var tmp_32 = this;
9678
- tmp_32.accounting$delegate_1 = lazy_0(HomeApi$accounting$delegate$lambda(this));
9955
+ tmp_32.supplier$delegate_1 = lazy_0(HomeApi$supplier$delegate$lambda(this));
9679
9956
  var tmp_33 = this;
9680
- tmp_33.eventBus$delegate_1 = lazy_0(HomeApi$eventBus$delegate$lambda(this));
9957
+ tmp_33.accounting$delegate_1 = lazy_0(HomeApi$accounting$delegate$lambda(this));
9681
9958
  var tmp_34 = this;
9682
- tmp_34.marketing$delegate_1 = lazy_0(HomeApi$marketing$delegate$lambda(this));
9959
+ tmp_34.eventBus$delegate_1 = lazy_0(HomeApi$eventBus$delegate$lambda(this));
9683
9960
  var tmp_35 = this;
9684
- tmp_35.expense$delegate_1 = lazy_0(HomeApi$expense$delegate$lambda(this));
9961
+ tmp_35.marketing$delegate_1 = lazy_0(HomeApi$marketing$delegate$lambda(this));
9685
9962
  var tmp_36 = this;
9686
- tmp_36.issue$delegate_1 = lazy_0(HomeApi$issue$delegate$lambda(this));
9963
+ tmp_36.expense$delegate_1 = lazy_0(HomeApi$expense$delegate$lambda(this));
9687
9964
  var tmp_37 = this;
9688
- tmp_37.economy$delegate_1 = lazy_0(HomeApi$economy$delegate$lambda(this));
9965
+ tmp_37.issue$delegate_1 = lazy_0(HomeApi$issue$delegate$lambda(this));
9689
9966
  var tmp_38 = this;
9690
- tmp_38.bankAccounts$delegate_1 = lazy_0(HomeApi$bankAccounts$delegate$lambda(this));
9967
+ tmp_38.economy$delegate_1 = lazy_0(HomeApi$economy$delegate$lambda(this));
9691
9968
  var tmp_39 = this;
9692
- tmp_39.settlement$delegate_1 = lazy_0(HomeApi$settlement$delegate$lambda(this));
9969
+ tmp_39.bankAccounts$delegate_1 = lazy_0(HomeApi$bankAccounts$delegate$lambda(this));
9693
9970
  var tmp_40 = this;
9694
- tmp_40.appStores$delegate_1 = lazy_0(HomeApi$appStores$delegate$lambda(this));
9971
+ tmp_40.settlement$delegate_1 = lazy_0(HomeApi$settlement$delegate$lambda(this));
9695
9972
  var tmp_41 = this;
9696
- tmp_41.unsubscribe$delegate_1 = lazy_0(HomeApi$unsubscribe$delegate$lambda(this));
9973
+ tmp_41.appStores$delegate_1 = lazy_0(HomeApi$appStores$delegate$lambda(this));
9697
9974
  var tmp_42 = this;
9698
- tmp_42.followUps$delegate_1 = lazy_0(HomeApi$followUps$delegate$lambda(this));
9975
+ tmp_42.unsubscribe$delegate_1 = lazy_0(HomeApi$unsubscribe$delegate$lambda(this));
9976
+ var tmp_43 = this;
9977
+ tmp_43.followUps$delegate_1 = lazy_0(HomeApi$followUps$delegate$lambda(this));
9699
9978
  }
9700
9979
  protoOf(HomeApi).get_authMode_84brv0_k$ = function () {
9701
9980
  return this.authMode_1;
@@ -10288,6 +10567,34 @@ function rejectsRefreshToken(_this__u8e3s4) {
10288
10567
  return false;
10289
10568
  }
10290
10569
  }
10570
+ function isSignInStep(_this__u8e3s4) {
10571
+ _init_properties_HomeApi_kt__c8oemh();
10572
+ var tmp0 = get_signInSteps();
10573
+ var tmp$ret$0;
10574
+ $l$block_0: {
10575
+ // Inline function 'kotlin.collections.any' call
10576
+ var tmp;
10577
+ if (isInterface(tmp0, Collection)) {
10578
+ tmp = tmp0.isEmpty_y1axqb_k$();
10579
+ } else {
10580
+ tmp = false;
10581
+ }
10582
+ if (tmp) {
10583
+ tmp$ret$0 = false;
10584
+ break $l$block_0;
10585
+ }
10586
+ var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
10587
+ while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
10588
+ var element = _iterator__ex2g4s.next_20eer_k$();
10589
+ if (contains(_this__u8e3s4, element)) {
10590
+ tmp$ret$0 = true;
10591
+ break $l$block_0;
10592
+ }
10593
+ }
10594
+ tmp$ret$0 = false;
10595
+ }
10596
+ return tmp$ret$0;
10597
+ }
10291
10598
  function RefreshRefused(failure) {
10292
10599
  Exception_init_$Init$_1(failure, this);
10293
10600
  captureStack(this, RefreshRefused);
@@ -10663,6 +10970,7 @@ function _init_properties_HomeApi_kt__c8oemh() {
10663
10970
  if (!properties_initialized_HomeApi_kt_9m6vbf) {
10664
10971
  properties_initialized_HomeApi_kt_9m6vbf = true;
10665
10972
  refreshRefusalStatuses = setOf([Companion_getInstance_19().BadRequest_1.value_1, Companion_getInstance_19().NotFound_1.value_1, Companion_getInstance_19().UnprocessableEntity_1.value_1]);
10973
+ signInSteps = listOf(['/auth/implicit/', '/auth/mfa/select', '/auth/mfa/sms/', '/auth/mfa/totp/', '/auth/password/', '/auth/devices/srp', '/auth/oauth2/']);
10666
10974
  }
10667
10975
  }
10668
10976
  function get_ALLOWED_LINK_TARGETS() {
@@ -42797,7 +43105,7 @@ function SoliboOpenTelemetry() {
42797
43105
  }
42798
43106
  protoOf(SoliboOpenTelemetry).tracer_4qhv4u_k$ = function () {
42799
43107
  var tmp0_elvis_lhs = this.installed_1;
42800
- return (tmp0_elvis_lhs == null ? get_NoopOpenTelemetry() : tmp0_elvis_lhs).get_tracerProvider_kgfk0p_k$().getTracer$default_y9z64o_k$('no.solibo.oss.sdk', '1.29.1');
43108
+ return (tmp0_elvis_lhs == null ? get_NoopOpenTelemetry() : tmp0_elvis_lhs).get_tracerProvider_kgfk0p_k$().getTracer$default_y9z64o_k$('no.solibo.oss.sdk', '1.29.3');
42801
43109
  };
42802
43110
  var SoliboOpenTelemetry_instance;
42803
43111
  function SoliboOpenTelemetry_getInstance() {