@ekyc_qoobiss/qbs-ect-cmp 3.3.0 → 3.3.2

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 (35) hide show
  1. package/dist/cjs/agreement-check_18.cjs.entry.js +101 -31
  2. package/dist/collection/components/common/camera-error/camera-error.js +3 -1
  3. package/dist/collection/components/common/id-back-capture/id-back-capture.js +17 -4
  4. package/dist/collection/components/common/id-capture/id-capture.js +17 -4
  5. package/dist/collection/components/common/selfie-capture/selfie-capture.js +17 -4
  6. package/dist/collection/components/flow/agreement-info/agreement-info.js +3 -1
  7. package/dist/collection/components/flow/error-end/error-end.js +1 -5
  8. package/dist/collection/components/flow/id-double-side/id-double-side.js +3 -1
  9. package/dist/collection/components/flow/id-single-side/id-single-side.js +3 -1
  10. package/dist/collection/components/flow/landing-validation/landing-validation.js +3 -2
  11. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +3 -1
  12. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +3 -1
  13. package/dist/collection/components/flow/user-liveness/user-liveness.js +3 -1
  14. package/dist/collection/components/identification-component/identification-component.js +11 -3
  15. package/dist/collection/helpers/ApiCall.js +53 -5
  16. package/dist/collection/helpers/DeviceDetection.js +2 -0
  17. package/dist/collection/models/IDevice.js +1 -0
  18. package/dist/esm/agreement-check_18.entry.js +101 -31
  19. package/dist/qbs-ect-cmp/{p-01d8fff0.entry.js → p-5c7d0547.entry.js} +2 -2
  20. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  21. package/dist/types/components/common/camera-error/camera-error.d.ts +1 -0
  22. package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +1 -0
  23. package/dist/types/components/common/id-capture/id-capture.d.ts +1 -0
  24. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +1 -0
  25. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +1 -0
  26. package/dist/types/components/flow/id-double-side/id-double-side.d.ts +1 -0
  27. package/dist/types/components/flow/id-single-side/id-single-side.d.ts +1 -0
  28. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -0
  29. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
  30. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +1 -0
  31. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +1 -0
  32. package/dist/types/components.d.ts +3 -0
  33. package/dist/types/helpers/ApiCall.d.ts +1 -0
  34. package/dist/types/models/IDevice.d.ts +1 -0
  35. package/package.json +1 -1
@@ -8,6 +8,7 @@ import * as uuid from 'uuid';
8
8
  import packageJson from '../../../package.json';
9
9
  import { getLogMessage } from '../../utils/utils';
10
10
  import { BaseComponent } from '../base-component';
11
+ import { Browser } from '../../models/IDevice';
11
12
  export class IdentificationComponent {
12
13
  async onTokenChange(newValue, _oldValue) {
13
14
  if (store.debug)
@@ -96,8 +97,11 @@ export class IdentificationComponent {
96
97
  else {
97
98
  this.errorTitle = data;
98
99
  }
99
- await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
100
- Events.flowError(data);
100
+ try {
101
+ await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
102
+ }
103
+ catch (_c) { }
104
+ Events.flowError(this.errorTitle);
101
105
  store.flowStatus = FlowStatus.ERROREND;
102
106
  }
103
107
  constructor() {
@@ -201,10 +205,14 @@ export class IdentificationComponent {
201
205
  }
202
206
  try {
203
207
  if (store.debug)
204
- this.baseComponent.apiCall.AddLog('init log', this.logInit);
208
+ this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
205
209
  }
206
210
  catch (_a) { }
207
211
  try {
212
+ if (store.device.browser == Browser.Mi) {
213
+ this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
214
+ return;
215
+ }
208
216
  if (!store.device.isMobile && store.redirectId == '') {
209
217
  store.redirectId = uuid.v4();
210
218
  this.redirect_id = store.redirectId;
@@ -13,6 +13,30 @@ export class ApiCall {
13
13
  });
14
14
  this.urls = new ApiUrls();
15
15
  }
16
+ async http2(method, url, data) {
17
+ return new Promise((resolve, reject) => {
18
+ var xhr = new XMLHttpRequest();
19
+ xhr.open(method, url);
20
+ xhr.onload = function () {
21
+ if (xhr.status >= 200 && xhr.status < 300) {
22
+ resolve(xhr.response);
23
+ }
24
+ else {
25
+ reject({
26
+ status: xhr.status,
27
+ statusText: xhr.statusText,
28
+ });
29
+ }
30
+ };
31
+ xhr.onerror = function () {
32
+ reject({
33
+ status: xhr.status,
34
+ statusText: xhr.statusText,
35
+ });
36
+ };
37
+ xhr.send(data);
38
+ });
39
+ }
16
40
  async http(request) {
17
41
  const response = await fetch(request);
18
42
  if (!response.ok) {
@@ -27,23 +51,47 @@ export class ApiCall {
27
51
  }
28
52
  }
29
53
  async post(url, data) {
30
- return await this.http(new Request(store.apiBaseUrl + url, {
54
+ var request = new Request(store.apiBaseUrl + url, {
31
55
  method: 'POST',
32
56
  body: data,
33
57
  headers: {
34
58
  'Content-Type': 'application/json',
35
59
  'Authorization': 'IDKYC-TOKEN ' + store.token,
36
60
  },
37
- }));
61
+ });
62
+ try {
63
+ return await this.http(request);
64
+ }
65
+ catch (ex) {
66
+ this.AddLog('Error in post ', ex);
67
+ try {
68
+ return await this.http(request);
69
+ }
70
+ catch (ex2) {
71
+ return await this.http2('POST', store.apiBaseUrl + url, data);
72
+ }
73
+ }
38
74
  }
39
75
  async get(url) {
40
- return await this.http(new Request(store.apiBaseUrl + url, {
76
+ var request = new Request(store.apiBaseUrl + url, {
41
77
  method: 'GET',
42
78
  headers: {
43
79
  'Content-Type': 'application/json',
44
80
  'Authorization': 'IDKYC-TOKEN ' + store.token,
45
81
  },
46
- }));
82
+ });
83
+ try {
84
+ return await this.http(request);
85
+ }
86
+ catch (ex) {
87
+ this.AddLog('Error in get ', ex);
88
+ try {
89
+ return await this.http(request);
90
+ }
91
+ catch (ex2) {
92
+ return await this.http2('GET', store.apiBaseUrl + url, '');
93
+ }
94
+ }
47
95
  }
48
96
  async SendOTPCode(requestId, phoneNumber) {
49
97
  let data = { requestId: requestId, phone: phoneNumber };
@@ -116,7 +164,7 @@ export class ApiCall {
116
164
  let data = {
117
165
  requestId: store.requestId,
118
166
  action: FlowStatus[store.flowStatus],
119
- message: `${JSON.stringify(error !== null && error !== void 0 ? error : 'no error data')} | ${JSON.stringify(context !== null && context !== void 0 ? context : 'no context data')}`,
167
+ message: JSON.stringify({ error, context }),
120
168
  };
121
169
  let result = await this.post(this.urls.AddLog, JSON.stringify(data));
122
170
  return result.saved;
@@ -60,6 +60,8 @@ export class DeviceDetection {
60
60
  return Browser.Firefox;
61
61
  else if (!isChrome && /safari/i.test(navigator.userAgent))
62
62
  return Browser.Safari;
63
+ else if (!isChrome && / Mi /i.test(navigator.userAgent))
64
+ return Browser.Mi;
63
65
  else
64
66
  return Browser.Unknown;
65
67
  }
@@ -18,5 +18,6 @@ export var Browser;
18
18
  Browser["Chrome"] = "chrome";
19
19
  Browser["Firefox"] = "firefox";
20
20
  Browser["Safari"] = "safari";
21
+ Browser["Mi"] = "mi";
21
22
  Browser["Unknown"] = "unknown";
22
23
  })(Browser || (Browser = {}));
@@ -435,6 +435,30 @@ class ApiCall {
435
435
  });
436
436
  this.urls = new ApiUrls();
437
437
  }
438
+ async http2(method, url, data) {
439
+ return new Promise((resolve, reject) => {
440
+ var xhr = new XMLHttpRequest();
441
+ xhr.open(method, url);
442
+ xhr.onload = function () {
443
+ if (xhr.status >= 200 && xhr.status < 300) {
444
+ resolve(xhr.response);
445
+ }
446
+ else {
447
+ reject({
448
+ status: xhr.status,
449
+ statusText: xhr.statusText,
450
+ });
451
+ }
452
+ };
453
+ xhr.onerror = function () {
454
+ reject({
455
+ status: xhr.status,
456
+ statusText: xhr.statusText,
457
+ });
458
+ };
459
+ xhr.send(data);
460
+ });
461
+ }
438
462
  async http(request) {
439
463
  const response = await fetch(request);
440
464
  if (!response.ok) {
@@ -449,23 +473,47 @@ class ApiCall {
449
473
  }
450
474
  }
451
475
  async post(url, data) {
452
- return await this.http(new Request(state.apiBaseUrl + url, {
476
+ var request = new Request(state.apiBaseUrl + url, {
453
477
  method: 'POST',
454
478
  body: data,
455
479
  headers: {
456
480
  'Content-Type': 'application/json',
457
481
  'Authorization': 'IDKYC-TOKEN ' + state.token,
458
482
  },
459
- }));
483
+ });
484
+ try {
485
+ return await this.http(request);
486
+ }
487
+ catch (ex) {
488
+ this.AddLog('Error in post ', ex);
489
+ try {
490
+ return await this.http(request);
491
+ }
492
+ catch (ex2) {
493
+ return await this.http2('POST', state.apiBaseUrl + url, data);
494
+ }
495
+ }
460
496
  }
461
497
  async get(url) {
462
- return await this.http(new Request(state.apiBaseUrl + url, {
498
+ var request = new Request(state.apiBaseUrl + url, {
463
499
  method: 'GET',
464
500
  headers: {
465
501
  'Content-Type': 'application/json',
466
502
  'Authorization': 'IDKYC-TOKEN ' + state.token,
467
503
  },
468
- }));
504
+ });
505
+ try {
506
+ return await this.http(request);
507
+ }
508
+ catch (ex) {
509
+ this.AddLog('Error in get ', ex);
510
+ try {
511
+ return await this.http(request);
512
+ }
513
+ catch (ex2) {
514
+ return await this.http2('GET', state.apiBaseUrl + url, '');
515
+ }
516
+ }
469
517
  }
470
518
  async SendOTPCode(requestId, phoneNumber) {
471
519
  let data = { requestId: requestId, phone: phoneNumber };
@@ -538,7 +586,7 @@ class ApiCall {
538
586
  let data = {
539
587
  requestId: state.requestId,
540
588
  action: FlowStatus[state.flowStatus],
541
- message: `${JSON.stringify(error !== null && error !== void 0 ? error : 'no error data')} | ${JSON.stringify(context !== null && context !== void 0 ? context : 'no context data')}`,
589
+ message: JSON.stringify({ error, context }),
542
590
  };
543
591
  let result = await this.post(this.urls.AddLog, JSON.stringify(data));
544
592
  return result.saved;
@@ -608,6 +656,7 @@ var Browser;
608
656
  Browser["Chrome"] = "chrome";
609
657
  Browser["Firefox"] = "firefox";
610
658
  Browser["Safari"] = "safari";
659
+ Browser["Mi"] = "mi";
611
660
  Browser["Unknown"] = "unknown";
612
661
  })(Browser || (Browser = {}));
613
662
 
@@ -672,6 +721,8 @@ class DeviceDetection {
672
721
  return Browser.Firefox;
673
722
  else if (!isChrome && /safari/i.test(navigator.userAgent))
674
723
  return Browser.Safari;
724
+ else if (!isChrome && / Mi /i.test(navigator.userAgent))
725
+ return Browser.Mi;
675
726
  else
676
727
  return Browser.Unknown;
677
728
  }
@@ -819,9 +870,11 @@ const AgreementInfo = class {
819
870
  this.openAgreements = false;
820
871
  this.openTerms = false;
821
872
  }
873
+ disconnectedCallback() {
874
+ this.baseComponent.finalize();
875
+ }
822
876
  async buttonClick() {
823
877
  if (this.agreementsChecked && this.termsChecked) {
824
- await this.baseComponent.finalize();
825
878
  state.flowStatus = FlowStatus.PHONE;
826
879
  }
827
880
  }
@@ -5425,9 +5478,11 @@ const CameraError = class {
5425
5478
  }
5426
5479
  }
5427
5480
  }
5481
+ disconnectedCallback() {
5482
+ this.baseComponent.finalize();
5483
+ }
5428
5484
  async buttonClick() {
5429
5485
  this.buttonDisabled = true;
5430
- await this.baseComponent.finalize();
5431
5486
  if (state.device.mobileOS == MobileOS.iOS) {
5432
5487
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'true');
5433
5488
  window.location.reload();
@@ -5516,10 +5571,7 @@ const ErrorEnd = class {
5516
5571
  this.message = undefined;
5517
5572
  this.errorTitle = undefined;
5518
5573
  }
5519
- componentDidLoad() {
5520
- Events.init(window);
5521
- Events.flowError(this.errorTitle + ' ' + this.message);
5522
- }
5574
+ componentDidLoad() { }
5523
5575
  render() {
5524
5576
  return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "text-center" }, h("h1", null, this.errorTitle)), h("div", { class: "text-center" }, h("p", null, state.requestId)), h("div", null, h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
5525
5577
  }
@@ -5699,6 +5751,7 @@ const IdBackCapture = class {
5699
5751
  constructor(hostRef) {
5700
5752
  registerInstance(this, hostRef);
5701
5753
  this.eventPhotoCapture = createEvent(this, "photoIdBackCapture", 7);
5754
+ this.apiErrorEvent = createEvent(this, "apiError", 7);
5702
5755
  this.photoIsReady = photos => {
5703
5756
  //this.closeCamera();
5704
5757
  this.eventPhotoCapture.emit(photos);
@@ -5728,10 +5781,9 @@ const IdBackCapture = class {
5728
5781
  this.cameraSize = event.detail;
5729
5782
  }
5730
5783
  async componentWillLoad() {
5731
- Events.init(this.component);
5732
5784
  //this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
5733
5785
  if (!navigator.mediaDevices) {
5734
- Events.flowError('This browser does not support webRTC');
5786
+ this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5735
5787
  }
5736
5788
  }
5737
5789
  async componentDidLoad() {
@@ -5757,7 +5809,7 @@ const IdBackCapture = class {
5757
5809
  })
5758
5810
  .catch(e => {
5759
5811
  this.closeCamera();
5760
- Events.flowError(e);
5812
+ this.apiErrorEvent.emit(e);
5761
5813
  });
5762
5814
  }, 100);
5763
5815
  }
@@ -5813,6 +5865,7 @@ const IdCapture = class {
5813
5865
  constructor(hostRef) {
5814
5866
  registerInstance(this, hostRef);
5815
5867
  this.eventPhotoCapture = createEvent(this, "photoIdCapture", 7);
5868
+ this.apiErrorEvent = createEvent(this, "apiError", 7);
5816
5869
  this.photoIsReady = photos => {
5817
5870
  //this.closeCamera();
5818
5871
  this.eventPhotoCapture.emit(photos);
@@ -5842,11 +5895,10 @@ const IdCapture = class {
5842
5895
  this.cameraSize = event.detail;
5843
5896
  }
5844
5897
  async componentWillLoad() {
5845
- Events.init(this.component);
5846
5898
  this.titleMesage = IdCaptureValues.Title;
5847
5899
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
5848
5900
  if (!navigator.mediaDevices) {
5849
- Events.flowError('This browser does not support webRTC');
5901
+ this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5850
5902
  }
5851
5903
  }
5852
5904
  async componentDidLoad() {
@@ -5867,7 +5919,7 @@ const IdCapture = class {
5867
5919
  })
5868
5920
  .catch(e => {
5869
5921
  this.closeCamera();
5870
- Events.flowError(e);
5922
+ this.apiErrorEvent.emit(e);
5871
5923
  });
5872
5924
  }, 100);
5873
5925
  }
@@ -6087,9 +6139,11 @@ const IdDoubleSide = class {
6087
6139
  return;
6088
6140
  }
6089
6141
  state.recordingRetryCount = 0;
6090
- await this.baseComponent.finalize();
6091
6142
  state.flowStatus = FlowStatus.LIVENESS;
6092
6143
  }
6144
+ disconnectedCallback() {
6145
+ this.baseComponent.finalize();
6146
+ }
6093
6147
  switchCamera() {
6094
6148
  if (this.captureRetryCount == 1) {
6095
6149
  let camIndex = state.cameraIds.indexOf(state.cameraId);
@@ -6218,9 +6272,11 @@ const IdSingleSide = class {
6218
6272
  if (!this.idFlow.verificationFinished) {
6219
6273
  return;
6220
6274
  }
6221
- await this.baseComponent.finalize();
6222
6275
  state.flowStatus = FlowStatus.LIVENESS;
6223
6276
  }
6277
+ disconnectedCallback() {
6278
+ this.baseComponent.finalize();
6279
+ }
6224
6280
  switchCamera() {
6225
6281
  if (this.captureRetryCount == 1) {
6226
6282
  let camIndex = state.cameraIds.indexOf(state.cameraId);
@@ -6306,7 +6362,7 @@ function v4(options, buf, offset) {
6306
6362
  }
6307
6363
 
6308
6364
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6309
- const version$1 = "3.3.0";
6365
+ const version$1 = "3.3.2";
6310
6366
  const description = "Person Identification Component";
6311
6367
  const main = "./dist/index.cjs.js";
6312
6368
  const module = "./dist/index.js";
@@ -6464,8 +6520,11 @@ const IdentificationComponent = class {
6464
6520
  else {
6465
6521
  this.errorTitle = data;
6466
6522
  }
6467
- await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
6468
- Events.flowError(data);
6523
+ try {
6524
+ await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
6525
+ }
6526
+ catch (_c) { }
6527
+ Events.flowError(this.errorTitle);
6469
6528
  state.flowStatus = FlowStatus.ERROREND;
6470
6529
  }
6471
6530
  constructor(hostRef) {
@@ -6570,10 +6629,14 @@ const IdentificationComponent = class {
6570
6629
  }
6571
6630
  try {
6572
6631
  if (state.debug)
6573
- this.baseComponent.apiCall.AddLog('init log', this.logInit);
6632
+ this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
6574
6633
  }
6575
6634
  catch (_a) { }
6576
6635
  try {
6636
+ if (state.device.browser == Browser.Mi) {
6637
+ this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
6638
+ return;
6639
+ }
6577
6640
  if (!state.device.isMobile && state.redirectId == '') {
6578
6641
  state.redirectId = v4();
6579
6642
  this.redirect_id = state.redirectId;
@@ -6689,7 +6752,6 @@ const LandingValidation = class {
6689
6752
  state.flowStatus = FlowStatus.COMPLETE;
6690
6753
  return;
6691
6754
  }
6692
- await this.baseComponent.finalize();
6693
6755
  if (!(await Cameras.InitCameras(state.device))) {
6694
6756
  if (state.device.mobileOS == MobileOS.iOS)
6695
6757
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
@@ -6706,13 +6768,15 @@ const LandingValidation = class {
6706
6768
  }
6707
6769
  }
6708
6770
  }
6771
+ disconnectedCallback() {
6772
+ this.baseComponent.finalize();
6773
+ }
6709
6774
  async leaveFlow() {
6710
6775
  if (this.buttonDisabled)
6711
6776
  return;
6712
6777
  state.initialised = false;
6713
6778
  try {
6714
6779
  await this.baseComponent.apiCall.AbortRequest();
6715
- await this.baseComponent.finalize();
6716
6780
  Events.flowAborted();
6717
6781
  }
6718
6782
  catch (e) {
@@ -9651,7 +9715,6 @@ const MobileRedirect = class {
9651
9715
  this.orderStatus = await this.baseComponent.apiCall.GetStatus(state.requestId);
9652
9716
  if (this.orderStatus == OrderStatuses.FinishedCapturing) {
9653
9717
  this.waitingMobile = false;
9654
- await this.baseComponent.finalize();
9655
9718
  state.flowStatus = FlowStatus.COMPLETE;
9656
9719
  }
9657
9720
  if (this.orderStatus == OrderStatuses.NotFound) {
@@ -9667,6 +9730,9 @@ const MobileRedirect = class {
9667
9730
  Events.flowAborted();
9668
9731
  }
9669
9732
  }
9733
+ disconnectedCallback() {
9734
+ this.baseComponent.finalize();
9735
+ }
9670
9736
  async buttonClick() {
9671
9737
  if (this.contact == '' || this.contact.length != 10) {
9672
9738
  return;
@@ -9702,6 +9768,7 @@ const SelfieCapture = class {
9702
9768
  constructor(hostRef) {
9703
9769
  registerInstance(this, hostRef);
9704
9770
  this.eventPhotoCapture = createEvent(this, "photoSelfieCapture", 7);
9771
+ this.apiErrorEvent = createEvent(this, "apiError", 7);
9705
9772
  this.photoIsReady = photos => {
9706
9773
  //this.closeCamera();
9707
9774
  this.eventPhotoCapture.emit(photos);
@@ -9743,11 +9810,10 @@ const SelfieCapture = class {
9743
9810
  this.captureWidth = Math.round((this.captureHeight * 9) / 16);
9744
9811
  }
9745
9812
  componentWillLoad() {
9746
- Events.init(this.component);
9747
9813
  this.titleMesage = SelfieCaptureValues.Title;
9748
9814
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
9749
9815
  if (!navigator.mediaDevices) {
9750
- Events.flowError('This browser does not support webRTC');
9816
+ this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
9751
9817
  }
9752
9818
  }
9753
9819
  async componentDidLoad() {
@@ -9768,7 +9834,7 @@ const SelfieCapture = class {
9768
9834
  })
9769
9835
  .catch(e => {
9770
9836
  this.closeCamera();
9771
- Events.flowError(e);
9837
+ this.apiErrorEvent.emit(e);
9772
9838
  });
9773
9839
  }, 100);
9774
9840
  }
@@ -9845,7 +9911,6 @@ const SmsCodeValidation = class {
9845
9911
  async doAction() {
9846
9912
  try {
9847
9913
  this.canSend = false;
9848
- await this.baseComponent.finalize();
9849
9914
  if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
9850
9915
  var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(state.requestId, this.code);
9851
9916
  if (codeChecked === true) {
@@ -9866,6 +9931,9 @@ const SmsCodeValidation = class {
9866
9931
  this.apiErrorEvent.emit(e);
9867
9932
  }
9868
9933
  }
9934
+ disconnectedCallback() {
9935
+ this.baseComponent.finalize();
9936
+ }
9869
9937
  componentWillRender() {
9870
9938
  if (state.flowStatus == FlowStatus.PHONE) {
9871
9939
  this.title = PhoneValidationValues.Title;
@@ -9995,6 +10063,9 @@ const UserLiveness = class {
9995
10063
  this.selfieFlow.verificationFinished = true;
9996
10064
  await this.endFlow();
9997
10065
  }
10066
+ disconnectedCallback() {
10067
+ this.baseComponent.finalize();
10068
+ }
9998
10069
  async uploadPhoto() {
9999
10070
  if (this.selfieFlow.photoFile == null || this.selfieFlow.photoDone) {
10000
10071
  return;
@@ -10035,7 +10106,6 @@ const UserLiveness = class {
10035
10106
  return;
10036
10107
  }
10037
10108
  state.recordingRetryCount = 0;
10038
- await this.baseComponent.finalize();
10039
10109
  state.flowStatus = FlowStatus.COMPLETE;
10040
10110
  }
10041
10111
  render() {