@ekyc_qoobiss/qbs-ect-cmp 3.6.44 → 3.6.45

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 (46) hide show
  1. package/dist/cjs/{TranslationUtils-2d932eab.js → TranslationUtils-006f5c9e.js} +7 -0
  2. package/dist/cjs/agreement-check_17.cjs.entry.js +204 -290
  3. package/dist/cjs/random-actions.cjs.entry.js +1 -1
  4. package/dist/collection/components/base-component.js +11 -44
  5. package/dist/collection/components/common/agreement-check/agreement-check.js +0 -4
  6. package/dist/collection/components/common/camera-error/camera-error.js +3 -10
  7. package/dist/collection/components/common/capture-error/capture-error.js +3 -8
  8. package/dist/collection/components/common/how-to-info/how-to-info.js +2 -4
  9. package/dist/collection/components/common/id-capture/id-capture.js +2 -3
  10. package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -3
  11. package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
  12. package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -11
  13. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +6 -7
  14. package/dist/collection/components/flow/process-id/process-id.js +10 -8
  15. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +5 -12
  16. package/dist/collection/components/flow/sms-send/sms-send.js +5 -11
  17. package/dist/collection/components/flow/user-liveness/user-liveness.js +7 -10
  18. package/dist/collection/components/identification-component/identification-component.js +10 -7
  19. package/dist/collection/helpers/ApiCall.js +6 -0
  20. package/dist/collection/models/FlowSteps.js +1 -0
  21. package/dist/esm/{TranslationUtils-0039c82d.js → TranslationUtils-13cb9b8c.js} +7 -0
  22. package/dist/esm/agreement-check_17.entry.js +204 -290
  23. package/dist/esm/random-actions.entry.js +1 -1
  24. package/dist/qbs-ect-cmp/p-004a2264.js +1 -0
  25. package/dist/qbs-ect-cmp/{p-fca9e256.entry.js → p-44d4faec.entry.js} +2 -2
  26. package/dist/qbs-ect-cmp/{p-0c1eead0.entry.js → p-c93d153b.entry.js} +1 -1
  27. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  28. package/dist/types/components/base-component.d.ts +3 -12
  29. package/dist/types/components/common/agreement-check/agreement-check.d.ts +0 -1
  30. package/dist/types/components/common/camera-error/camera-error.d.ts +0 -1
  31. package/dist/types/components/common/capture-error/capture-error.d.ts +0 -1
  32. package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
  33. package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
  34. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
  35. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +0 -1
  36. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +0 -1
  37. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +0 -1
  38. package/dist/types/components/flow/process-id/process-id.d.ts +1 -1
  39. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -1
  40. package/dist/types/components/flow/sms-send/sms-send.d.ts +0 -1
  41. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +0 -1
  42. package/dist/types/components/identification-component/identification-component.d.ts +0 -1
  43. package/dist/types/helpers/ApiCall.d.ts +2 -0
  44. package/dist/types/models/FlowSteps.d.ts +2 -1
  45. package/package.json +1 -1
  46. package/dist/qbs-ect-cmp/p-b969ca3e.js +0 -1
@@ -1,114 +1,41 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cf54a432.js';
2
- import { A as ApiCall, s as state, F as FlowMoments, a as FlowSteps, T as Translations, S as SessionKeys, b as FlowStatus, I as IdCaptureValues, O as OrderStatuses, c as SelfieCaptureValues } from './TranslationUtils-0039c82d.js';
2
+ import { A as ApiCall, T as Translations, F as FlowMoments, a as FlowSteps, s as state, S as SessionKeys, b as FlowStatus, I as IdCaptureValues, O as OrderStatuses, c as SelfieCaptureValues } from './TranslationUtils-13cb9b8c.js';
3
3
 
4
- var MobileOS;
5
- (function (MobileOS) {
6
- MobileOS["Android"] = "android";
7
- MobileOS["iOS"] = "ios";
8
- MobileOS["Unknown"] = "unknown";
9
- MobileOS["WindowsPhone"] = "Windows Phone";
10
- })(MobileOS || (MobileOS = {}));
11
- var DesktopOS;
12
- (function (DesktopOS) {
13
- DesktopOS["Linux"] = "linux";
14
- DesktopOS["MacOS"] = "mac_os";
15
- DesktopOS["Unix"] = "unix";
16
- DesktopOS["Unknown"] = "unknown";
17
- DesktopOS["Windows"] = "windows";
18
- })(DesktopOS || (DesktopOS = {}));
19
- var Browser;
20
- (function (Browser) {
21
- Browser["Chrome"] = "chrome";
22
- Browser["Firefox"] = "firefox";
23
- Browser["Safari"] = "safari";
24
- Browser["Mi"] = "mi";
25
- Browser["Unknown"] = "unknown";
26
- })(Browser || (Browser = {}));
4
+ const agreementCheckCss = "";
27
5
 
28
- class DeviceDetection {
29
- constructor() {
30
- var _a, _b, _c, _d;
31
- this.supportedScreenOrientation = (_b = (_a = ((screen === null || screen === void 0 ? void 0 : screen.orientation) || {}).type) !== null && _a !== void 0 ? _a : screen.mozOrientation) !== null && _b !== void 0 ? _b : screen.msOrientation;
32
- this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
33
- this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
34
- this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
35
- this.isMobile = this.isMobileDevice();
36
- this.isTablet = this.isTabletDevice();
37
- this.isDesktop = !this.isMobile && !this.isTablet;
38
- }
39
- // Device typology
40
- isMobileDevice() {
41
- const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
42
- return regexs.some(b => this.userAgent.match(b));
6
+ const AgreementCheck = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.apiErrorEvent = createEvent(this, "apiError", 7);
10
+ this.agreementAcceptance = createEvent(this, "agreementAcceptance", 7);
11
+ this.agreementType = undefined;
12
+ this.htmlContent = undefined;
13
+ this.buttonEnabled = undefined;
14
+ this.scrollClass = 'scroll';
15
+ this.apiCalls = new ApiCall();
16
+ this.buttonEnabled = true;
43
17
  }
44
- isTabletDevice() {
45
- const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
46
- return regex.test(this.userAgent.toLowerCase());
18
+ async componentWillLoad() {
19
+ this.translations = await Translations.getValues();
47
20
  }
48
- // Device Operating System
49
- getMobileOS() {
50
- if (this.isMobileDevice()) {
51
- if (/windows phone/i.test(this.userAgent))
52
- return MobileOS.WindowsPhone;
53
- else if (/android/i.test(this.userAgent))
54
- return MobileOS.Android;
55
- else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
56
- return MobileOS.iOS;
57
- return MobileOS.Unknown;
21
+ async componentDidLoad() {
22
+ try {
23
+ this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
58
24
  }
59
- else
60
- return undefined;
61
- }
62
- getDesktopOS() {
63
- if (this.isDesktop) {
64
- if (this.userAgent.indexOf('Win') !== -1)
65
- return DesktopOS.Windows;
66
- else if (this.userAgent.indexOf('Mac') !== -1)
67
- return DesktopOS.MacOS;
68
- else if (this.userAgent.indexOf('X11') !== -1)
69
- return DesktopOS.Unix;
70
- else if (this.userAgent.indexOf('Linux') !== -1)
71
- return DesktopOS.Linux;
72
- return DesktopOS.Unknown;
25
+ catch (e) {
26
+ this.apiErrorEvent.emit(e);
73
27
  }
74
- else
75
- return undefined;
76
- }
77
- getDeviceOS() {
78
- var _a;
79
- return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
80
28
  }
81
- getBrowser() {
82
- if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
83
- return Browser.Mi;
84
- var isChrome = /chrome/i.test(this.userAgent);
85
- if (isChrome)
86
- return Browser.Chrome;
87
- if (/firefox/i.test(navigator.userAgent))
88
- return Browser.Firefox;
89
- else if (!isChrome && /safari/i.test(navigator.userAgent))
90
- return Browser.Safari;
91
- else
92
- return Browser.Unknown;
29
+ async buttonClick(result) {
30
+ this.buttonEnabled = false;
31
+ this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
93
32
  }
94
- getDevice() {
95
- var device = {
96
- isDesktop: this.isDesktop,
97
- desktopOS: this.getDesktopOS(),
98
- isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
99
- isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
100
- isMobile: this.isMobile,
101
- mobileOS: this.getMobileOS(),
102
- isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
103
- isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
104
- isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
105
- browser: this.getBrowser(),
106
- isTablet: this.isTablet,
107
- initialScreenOrientation: this.initialScreenOrientation,
108
- };
109
- return device;
33
+ render() {
34
+ let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
35
+ return this.htmlContent ? content : h("div", null);
110
36
  }
111
- }
37
+ };
38
+ AgreementCheck.style = agreementCheckCss;
112
39
 
113
40
  class Events {
114
41
  static init(element) {
@@ -170,98 +97,29 @@ class Events {
170
97
  }
171
98
 
172
99
  class BaseComponent {
173
- constructor(step) {
174
- this.apiErrorEvent = null;
175
- this.processError = null;
176
- this.apiCall = new ApiCall();
177
- if (step)
178
- this.flowStep = step;
179
- if (!state.device) {
180
- state.device = new DeviceDetection().getDevice();
181
- }
182
- }
183
- setEventEmitter(event) {
184
- this.apiErrorEvent = event;
185
- }
186
- setErrorCallback(callback) {
187
- this.processError = callback;
188
- }
189
- async logStep(step, moment) {
100
+ static async logStep(step, moment) {
190
101
  Events.flowEvent(step, moment);
191
102
  try {
192
- await this.apiCall.AddStep(step, moment);
193
- }
194
- catch (e) {
195
- if (this.apiErrorEvent)
196
- this.apiErrorEvent.emit(e);
197
- else
198
- this.processError(e, `${step}-${moment}`);
103
+ await ApiCall.instance.AddStep(step, moment);
199
104
  }
105
+ catch (e) { }
200
106
  }
201
- async initialize() {
202
- Events.flowEvent(this.flowStep, FlowMoments.Initialized);
107
+ static async initialize(flowStep) {
108
+ Events.flowEvent(flowStep, FlowMoments.Initialized);
203
109
  try {
204
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Initialized);
205
- }
206
- catch (e) {
207
- if (this.apiErrorEvent)
208
- this.apiErrorEvent.emit(e);
209
- else
210
- this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
110
+ await ApiCall.instance.AddStep(flowStep, FlowMoments.Initialized);
211
111
  }
112
+ catch (e) { }
212
113
  }
213
- async finalize() {
214
- Events.flowEvent(this.flowStep, FlowMoments.Finalized);
114
+ static async finalize(flowStep) {
115
+ Events.flowEvent(flowStep, FlowMoments.Finalized);
215
116
  try {
216
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Finalized);
217
- }
218
- catch (e) {
219
- if (this.apiErrorEvent)
220
- this.apiErrorEvent.emit(e);
221
- else
222
- this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
117
+ await ApiCall.instance.AddStep(flowStep, FlowMoments.Finalized);
223
118
  }
119
+ catch (e) { }
224
120
  }
225
121
  }
226
122
 
227
- const agreementCheckCss = "";
228
-
229
- const AgreementCheck = class {
230
- constructor(hostRef) {
231
- registerInstance(this, hostRef);
232
- this.apiErrorEvent = createEvent(this, "apiError", 7);
233
- this.agreementAcceptance = createEvent(this, "agreementAcceptance", 7);
234
- this.agreementType = undefined;
235
- this.htmlContent = undefined;
236
- this.buttonEnabled = undefined;
237
- this.scrollClass = 'scroll';
238
- this.apiCalls = new ApiCall();
239
- this.buttonEnabled = true;
240
- this.baseComponent = new BaseComponent(FlowSteps.Agreements);
241
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
242
- }
243
- async componentWillLoad() {
244
- this.translations = await Translations.getValues();
245
- }
246
- async componentDidLoad() {
247
- try {
248
- this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
249
- }
250
- catch (e) {
251
- this.apiErrorEvent.emit(e);
252
- }
253
- }
254
- async buttonClick(result) {
255
- this.buttonEnabled = false;
256
- this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
257
- }
258
- render() {
259
- let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
260
- return this.htmlContent ? content : h("div", null);
261
- }
262
- };
263
- AgreementCheck.style = agreementCheckCss;
264
-
265
123
  const agreementInfoCss = "";
266
124
 
267
125
  const AgreementInfo = class {
@@ -272,13 +130,11 @@ const AgreementInfo = class {
272
130
  this.termsChecked = undefined;
273
131
  this.openAgreements = undefined;
274
132
  this.openTerms = undefined;
275
- this.baseComponent = new BaseComponent(FlowSteps.Agreements);
276
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
277
133
  this.agreementsChecked = false;
278
134
  this.termsChecked = false;
279
135
  }
280
136
  async componentDidLoad() {
281
- await this.baseComponent.initialize();
137
+ await BaseComponent.initialize(FlowSteps.Agreements);
282
138
  }
283
139
  async componentWillLoad() {
284
140
  this.translations = await Translations.getValues();
@@ -286,12 +142,12 @@ const AgreementInfo = class {
286
142
  this.openTerms = false;
287
143
  }
288
144
  async disconnectedCallback() {
289
- await this.baseComponent.finalize();
145
+ await BaseComponent.finalize(FlowSteps.Agreements);
290
146
  }
291
147
  async buttonClick() {
292
148
  if (this.agreementsChecked && this.termsChecked) {
293
149
  try {
294
- state.flowStatus = await this.baseComponent.apiCall.GetNextFlowState();
150
+ state.flowStatus = await ApiCall.instance.GetNextFlowState();
295
151
  }
296
152
  catch (e) {
297
153
  this.apiErrorEvent.emit(e);
@@ -4502,6 +4358,30 @@ const addExifInImg = async (blob, track, videoSize) => {
4502
4358
  return await fetch(newPhotoData).then(res => res.blob());
4503
4359
  };
4504
4360
 
4361
+ var MobileOS;
4362
+ (function (MobileOS) {
4363
+ MobileOS["Android"] = "android";
4364
+ MobileOS["iOS"] = "ios";
4365
+ MobileOS["Unknown"] = "unknown";
4366
+ MobileOS["WindowsPhone"] = "Windows Phone";
4367
+ })(MobileOS || (MobileOS = {}));
4368
+ var DesktopOS;
4369
+ (function (DesktopOS) {
4370
+ DesktopOS["Linux"] = "linux";
4371
+ DesktopOS["MacOS"] = "mac_os";
4372
+ DesktopOS["Unix"] = "unix";
4373
+ DesktopOS["Unknown"] = "unknown";
4374
+ DesktopOS["Windows"] = "windows";
4375
+ })(DesktopOS || (DesktopOS = {}));
4376
+ var Browser;
4377
+ (function (Browser) {
4378
+ Browser["Chrome"] = "chrome";
4379
+ Browser["Firefox"] = "firefox";
4380
+ Browser["Safari"] = "safari";
4381
+ Browser["Mi"] = "mi";
4382
+ Browser["Unknown"] = "unknown";
4383
+ })(Browser || (Browser = {}));
4384
+
4505
4385
  var ImageFormat;
4506
4386
  (function (ImageFormat) {
4507
4387
  ImageFormat["JPEG"] = "image/jpeg";
@@ -4758,16 +4638,7 @@ Camera.style = cameraCss;
4758
4638
  const cameraErrorCss = "";
4759
4639
 
4760
4640
  const CameraError = class {
4761
- constructor(hostRef) {
4762
- registerInstance(this, hostRef);
4763
- this.apiErrorEvent = createEvent(this, "apiError", 7);
4764
- this.title = undefined;
4765
- this.description = undefined;
4766
- this.buttonDisabled = undefined;
4767
- this.demoVideo = undefined;
4768
- this.baseComponent = new BaseComponent(FlowSteps.CameraError);
4769
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
4770
- }
4641
+ constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.title = undefined; this.description = undefined; this.buttonDisabled = undefined; this.demoVideo = undefined; }
4771
4642
  async componentWillLoad() {
4772
4643
  this.translations = await Translations.getValues();
4773
4644
  this.buttonDisabled = false;
@@ -4776,7 +4647,7 @@ const CameraError = class {
4776
4647
  this.buttonText = this.translations.CameraErrorValues.Button;
4777
4648
  }
4778
4649
  async componentDidLoad() {
4779
- await this.baseComponent.initialize();
4650
+ await BaseComponent.initialize(FlowSteps.CameraError);
4780
4651
  if (state.device.mobileOS != MobileOS.iOS) {
4781
4652
  this.demoVideo.src = this.translations.CameraErrorValues.HowToLink;
4782
4653
  this.demoVideo.loop = true;
@@ -4791,7 +4662,7 @@ const CameraError = class {
4791
4662
  }
4792
4663
  }
4793
4664
  async disconnectedCallback() {
4794
- await this.baseComponent.finalize();
4665
+ await BaseComponent.finalize(FlowSteps.CameraError);
4795
4666
  }
4796
4667
  async buttonClick() {
4797
4668
  this.buttonDisabled = true;
@@ -4812,14 +4683,7 @@ CameraError.style = cameraErrorCss;
4812
4683
  const captureErrorCss = "";
4813
4684
 
4814
4685
  const CaptureError = class {
4815
- constructor(hostRef) {
4816
- registerInstance(this, hostRef);
4817
- this.eventCaptureErrorDone = createEvent(this, "captureErrorDone", 7);
4818
- this.type = undefined;
4819
- this.buttonEnabled = undefined;
4820
- this.buttonText = undefined;
4821
- this.baseComponent = new BaseComponent(FlowSteps.CiError);
4822
- }
4686
+ constructor(hostRef) { registerInstance(this, hostRef); this.eventCaptureErrorDone = createEvent(this, "captureErrorDone", 7); this.type = undefined; this.buttonEnabled = undefined; this.buttonText = undefined; }
4823
4687
  async componentWillLoad() {
4824
4688
  this.translations = await Translations.getValues();
4825
4689
  this.buttonEnabled = false;
@@ -4837,7 +4701,7 @@ const CaptureError = class {
4837
4701
  }
4838
4702
  }
4839
4703
  async componentDidLoad() {
4840
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Initialized);
4704
+ await BaseComponent.logStep(FlowSteps.CiError, FlowMoments.Initialized);
4841
4705
  for (let i = 5; i >= 1; i--) {
4842
4706
  this.buttonText = i.toString();
4843
4707
  await delay(1000);
@@ -4847,7 +4711,7 @@ const CaptureError = class {
4847
4711
  }
4848
4712
  async buttonClick() {
4849
4713
  this.buttonEnabled = false;
4850
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Finalized);
4714
+ await BaseComponent.logStep(FlowSteps.CiError, FlowMoments.Finalized);
4851
4715
  this.eventCaptureErrorDone.emit();
4852
4716
  }
4853
4717
  render() {
@@ -4897,10 +4761,10 @@ const howToInfoCss = "";
4897
4761
  const HowToInfo = class {
4898
4762
  constructor(hostRef) { registerInstance(this, hostRef); this.eventHowToInfoDone = createEvent(this, "howToInfoDone", 7); this.apiErrorEvent = createEvent(this, "apiError", 7); this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
4899
4763
  async componentDidLoad() {
4900
- await this.baseComponent.initialize();
4764
+ await BaseComponent.initialize(this.currentStep);
4901
4765
  }
4902
4766
  async disconnectedCallback() {
4903
- await this.baseComponent.finalize();
4767
+ await BaseComponent.finalize(this.currentStep);
4904
4768
  }
4905
4769
  buttonClick() {
4906
4770
  this.buttonEnabled = false;
@@ -4928,8 +4792,6 @@ const HowToInfo = class {
4928
4792
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
4929
4793
  this.buttonText = this.translations.HowToValues.SelfieButton;
4930
4794
  }
4931
- this.baseComponent = new BaseComponent(this.currentStep);
4932
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
4933
4795
  }
4934
4796
  render() {
4935
4797
  let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
@@ -5108,7 +4970,6 @@ const IdCapture = class {
5108
4970
  if (!navigator.mediaDevices) {
5109
4971
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5110
4972
  }
5111
- this.baseComponent = new BaseComponent(this.flowStep);
5112
4973
  }
5113
4974
  initVariables() {
5114
4975
  if (state.flowStatus == FlowStatus.IDFRONT) {
@@ -5131,7 +4992,7 @@ const IdCapture = class {
5131
4992
  }
5132
4993
  }
5133
4994
  async componentDidLoad() {
5134
- await this.baseComponent.logStep(this.flowStep, FlowMoments.Initialized);
4995
+ await BaseComponent.logStep(this.flowStep, FlowMoments.Initialized);
5135
4996
  this.initVariables();
5136
4997
  if (state.flowStatus == FlowStatus.IDBACK) {
5137
4998
  this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
@@ -5182,7 +5043,7 @@ const IdCapture = class {
5182
5043
  else {
5183
5044
  this.eventTimeElapsed.emit();
5184
5045
  }
5185
- await this.baseComponent.logStep(this.flowStep, FlowMoments.Finalized);
5046
+ await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
5186
5047
  }
5187
5048
  async verificationFinished() {
5188
5049
  if (this.verified)
@@ -5283,7 +5144,7 @@ function v4(options, buf, offset) {
5283
5144
  }
5284
5145
 
5285
5146
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5286
- const version$1 = "3.6.44";
5147
+ const version$1 = "3.6.45";
5287
5148
  const description = "Person Identification Component";
5288
5149
  const main = "./dist/index.cjs.js";
5289
5150
  const module = "./dist/index.js";
@@ -5353,6 +5214,91 @@ const packageJson = {
5353
5214
 
5354
5215
  const loaderSvg = 'data:image/svg+xml;base64,PHN2ZyBpZD0ic3Bpbm5lckxvYWRlclJlZiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBvdmVyZmxvdz0idmlzaWJsZSIgZmlsbD0iIzAwMDAwMCIgc3Ryb2tlPSIjMDMwMzAzIiBjbGFzcz0ic2luZ2xlLWxvYWRlciI+DQogIDxkZWZzPg0KICAgIDxjaXJjbGUgaWQ9InNwaW5uZXIiIHI9IjQiIGN4PSI1MCIgY3k9IjUwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC0zMCkiLz4gICAgDQogIDwvZGVmcz4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoNDUgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC4xMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDkwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPg0KICA8L3VzZT4NCiAgPHVzZSB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeGxpbms6aHJlZj0iI3NwaW5uZXIiIHRyYW5zZm9ybT0icm90YXRlKDEzNSA1MCA1MCkiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMDsxOzAiIGR1cj0iMXMiIGJlZ2luPSIwLjM3NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMjI1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuNjI1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQogIDx1c2UgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhsaW5rOmhyZWY9IiNzcGlubmVyIiB0cmFuc2Zvcm09InJvdGF0ZSgyNzAgNTAgNTApIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjA7MTswIiBkdXI9IjFzIiBiZWdpbj0iMC43NXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+DQogIDwvdXNlPg0KICA8dXNlIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bGluazpocmVmPSIjc3Bpbm5lciIgdHJhbnNmb3JtPSJyb3RhdGUoMzE1IDUwIDUwKSI+DQogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgdmFsdWVzPSIwOzE7MCIgZHVyPSIxcyIgYmVnaW49IjAuODc1cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4NCiAgPC91c2U+DQo8L3N2Zz4=';
5355
5216
 
5217
+ class DeviceDetection {
5218
+ constructor() {
5219
+ var _a, _b, _c, _d;
5220
+ this.supportedScreenOrientation = (_b = (_a = ((screen === null || screen === void 0 ? void 0 : screen.orientation) || {}).type) !== null && _a !== void 0 ? _a : screen.mozOrientation) !== null && _b !== void 0 ? _b : screen.msOrientation;
5221
+ this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
5222
+ this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
5223
+ this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
5224
+ this.isMobile = this.isMobileDevice();
5225
+ this.isTablet = this.isTabletDevice();
5226
+ this.isDesktop = !this.isMobile && !this.isTablet;
5227
+ }
5228
+ // Device typology
5229
+ isMobileDevice() {
5230
+ const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
5231
+ return regexs.some(b => this.userAgent.match(b));
5232
+ }
5233
+ isTabletDevice() {
5234
+ const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
5235
+ return regex.test(this.userAgent.toLowerCase());
5236
+ }
5237
+ // Device Operating System
5238
+ getMobileOS() {
5239
+ if (this.isMobileDevice()) {
5240
+ if (/windows phone/i.test(this.userAgent))
5241
+ return MobileOS.WindowsPhone;
5242
+ else if (/android/i.test(this.userAgent))
5243
+ return MobileOS.Android;
5244
+ else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
5245
+ return MobileOS.iOS;
5246
+ return MobileOS.Unknown;
5247
+ }
5248
+ else
5249
+ return undefined;
5250
+ }
5251
+ getDesktopOS() {
5252
+ if (this.isDesktop) {
5253
+ if (this.userAgent.indexOf('Win') !== -1)
5254
+ return DesktopOS.Windows;
5255
+ else if (this.userAgent.indexOf('Mac') !== -1)
5256
+ return DesktopOS.MacOS;
5257
+ else if (this.userAgent.indexOf('X11') !== -1)
5258
+ return DesktopOS.Unix;
5259
+ else if (this.userAgent.indexOf('Linux') !== -1)
5260
+ return DesktopOS.Linux;
5261
+ return DesktopOS.Unknown;
5262
+ }
5263
+ else
5264
+ return undefined;
5265
+ }
5266
+ getDeviceOS() {
5267
+ var _a;
5268
+ return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
5269
+ }
5270
+ getBrowser() {
5271
+ if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
5272
+ return Browser.Mi;
5273
+ var isChrome = /chrome/i.test(this.userAgent);
5274
+ if (isChrome)
5275
+ return Browser.Chrome;
5276
+ if (/firefox/i.test(navigator.userAgent))
5277
+ return Browser.Firefox;
5278
+ else if (!isChrome && /safari/i.test(navigator.userAgent))
5279
+ return Browser.Safari;
5280
+ else
5281
+ return Browser.Unknown;
5282
+ }
5283
+ getDevice() {
5284
+ var device = {
5285
+ isDesktop: this.isDesktop,
5286
+ desktopOS: this.getDesktopOS(),
5287
+ isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
5288
+ isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
5289
+ isMobile: this.isMobile,
5290
+ mobileOS: this.getMobileOS(),
5291
+ isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
5292
+ isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
5293
+ isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
5294
+ browser: this.getBrowser(),
5295
+ isTablet: this.isTablet,
5296
+ initialScreenOrientation: this.initialScreenOrientation,
5297
+ };
5298
+ return device;
5299
+ }
5300
+ }
5301
+
5356
5302
  const identificationComponentCss = "@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-cyrillic-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-greek-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-vietnamese-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-ext-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:900;src:url('./files/inter-latin-900-normal.woff2') format('woff2'), url('./files/inter-all-900-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-cyrillic-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-greek-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-vietnamese-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-ext-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:700;src:url('./files/inter-latin-700-normal.woff2') format('woff2'), url('./files/inter-all-700-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-cyrillic-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-greek-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-vietnamese-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-ext-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:600;src:url('./files/inter-latin-600-normal.woff2') format('woff2'), url('./files/inter-all-600-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-cyrillic-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+1F00-1FFF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-greek-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0370-03FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-vietnamese-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-ext-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Inter';font-style:normal;font-display:swap;font-weight:400;src:url('./files/inter-latin-400-normal.woff2') format('woff2'), url('./files/inter-all-400-normal.woff') format('woff');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{font-family:'Inter', sans-serif}h1{font-weight:900;letter-spacing:0.01em;color:#1f2024;font-size:3.2vh;margin:0;line-height:3.5vh}.row-validare h1{font-size:27px;line-height:29px}body{margin:0;padding:0;height:100vh;position:relative;}.container{width:100%;height:100%;background-color:#fff;max-width:991px;margin:auto;position:relative;overflow:hidden}.container-video{height:99vh;text-align:center;position:relative;overflow:hidden}.row{padding:3.5vh 2.5vh;height:100%;overflow:hidden;position:relative;}.ctheight-100{height:99vh}.d-flex{display:flex}.space-between{justify-content:space-between}.img-info img{width:0.8vh;z-index:5;position:relative}.img-info{width:7vh;height:7vh;border-radius:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.i-effect{animation:2.5s infinite transition-i;position:absolute;z-index:2;border-radius:100%;background:radial-gradient(100% 100% at 50% 0%, #d3b6e9 0%, #fbc2bd 100%)}.two-buttons{margin-top:3vh;justify-content:center}.align-center{align-items:center}.main-text{font-weight:400;color:#71727a}.link-text{margin-top:1vh;text-decoration:underline}.font-size-2{font-size:2vh}.row-validare .font-size-2{font-size:17px;line-height:19px}.img-text{display:flex;align-items:center;margin-bottom:3vh}.img-text .bg-img img{width:100%;padding:2vh}.img-text h3{color:#333333;font-weight:700;font-size:2.3vh;margin:0}.img-text .bg-img{background:#e1e3e9;border-radius:30%;width:11vh;height:11vh;display:flex;align-items:center;justify-content:center;flex:none;margin-right:3vh}.font-weight-bold{font-weight:bold}.font-size-18{font-size:1.8vh}.row-validare .font-size-18{font-size:15px;line-height:16px}a{font-size:inherit;color:inherit;text-decoration:none}.color-black{color:#000}.main-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;width:100%;padding:2vh;color:#fff;border:0;font-size:2vh}.main-button:disabled{color:#71727a}.normal-button{background:#1feaa6;box-shadow:0 6px 8px rgba(71, 182, 162, 0.2);border-radius:25px;text-align:center;padding:2vh;margin-right:1vw;margin-left:1vw;color:#fff;border:0;font-size:2vh}.red-button{background:#ff535d}.row-validare .main-button{font-size:17px}.text-right{text-align:right}.mb-1{margin-bottom:1vh}.mb-0{margin-bottom:0}.row-validare.row{padding:29px 21px}.row-validare .main-button{padding:16px}.row-validare .btn-buletin{position:relative;width:100%;bottom:0}.show-bottom{bottom:-2vh}.row-validare .main-input{padding:14px 12px;border-radius:12px;font-weight:700;border:2px solid #464e58;font-size:19px}.main-input{width:100%;padding:22px 26px;border:3px solid #464e58;border-radius:20px;font-weight:600;font-size:2.3vh;font-family:'Inter', sans-serif}.second-input{width:46px;height:46px;font-weight:700;font-size:16px;font-family:'Inter', sans-serif;text-align:center;border:2px solid #c5c6cc;border-radius:12px;outline:none;padding:2px}.second-input:not(:placeholder-shown){border:2px solid #1feaa6;color:#1feaa6}.mt-9{margin-top:9%}.second-input::placeholder{color:#fff;opacity:0}.second-input:focus{border:2px solid #464e58;color:#464e58}.second-input.error{border:2px solid #b67171}.second-input.error:focus{border:3px solid #b67171;color:#b67171;padding:1px}.second-input.error:not(:placeholder-shown){border:3px solid #b67171;color:#b67171;padding:2px}.second-input-container{margin-top:30%;display:flex;flex-wrap:wrap;justify-content:space-between}.input-container{display:flex;flex-wrap:wrap}.mt-15{margin-top:15%}.row-validare .mt-15{margin-top:40px}.mb-15{margin-bottom:15%}.row-validare .mb-15{margin-bottom:40px}.mb-20{margin-bottom:20%}.row-validare .mb-1{margin-bottom:20px}.row-validare .mb-20{margin-bottom:60px}.mt-90{margin-top:90px}.op-05{opacity:0.5}.color-red{color:#b67171}.error-text{position:relative;top:50px;margin-bottom:0;margin-top:0}.top-50{top:50px}.mt-25{margin-top:25%}.text-center{text-align:center}.scale-2{transform:scale(2)}.mt-20{margin-top:20%}.div-ci img{max-height:60vh;max-width:80vw}.div-ci{text-align:center}.mt-10{margin-top:10vh}.mt-5{margin-top:5vh}.pos-relative{position:relative}.pos-absolute{position:absolute}.btn-buletin{text-align:center}.buletin-container img{width:60%}.buletin-container>img{margin-top:10vh}.buletin-container{text-align:center}.bg-black{background-color:#242426}.color-white{color:#fff}.chenar-buletin{margin-top:3em;text-align:center}.chenar-buletin .ci-img{width:96%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{left:4%;width:92%;top:-20px;min-height:55vw;display:flex;position:absolute;align-items:center;background-color:rgba(255, 255, 255, 0.2);justify-content:center}.chenar-buletin img{width:auto;height:100%;top:0;left:0;position:absolute;border-radius:10px;z-index:4}.chenar-buletin .face-img{background-color:rgba(255, 255, 255, 0.3)}.buletin-container .w-40{width:40%}.animation{width:100%;height:100%;}.color-black-2{color:#71727a}.font-size-3{font-size:3vh}.font-size-25{font-size:2.5vh}.font-weight-900{font-weight:900}.mt-8{margin-top:8vh}.mt-12{margin-top:12vh}.mt-30-i{margin-top:30% !important}.chenar-buletin .face-img{left:-2%;width:104%;top:-40px}.pl-2-5{padding-left:2.5vh}.container-coin{background-color:transparent;perspective:1000px;rotate:120deg 0deg}.coin-flip{animation:flip 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards;visibility:hidden}.coin-scale{animation:show 0.4s ease-in;animation-delay:0.5s;transform-style:preserve-3d;animation-fill-mode:forwards}.scroll{margin:4px, 4px;padding:4px;height:70vh;overflow-x:hidden;overflow-y:auto}.scroll-full{margin:4px, 4px;padding:4px;overflow-x:hidden;overflow-y:auto}.video-demo{z-index:0;width:100%;height:100%;border-radius:20px}.video-capture{padding:2.5vh 2.5vh;margin-top:3em;text-align:center;position:relative}.capture-title{z-index:4;margin-top:3vh;position:absolute;bottom:5vh;padding:2.5vh 2.5vh}@keyframes transition-i{from{width:0;height:0;opacity:1}80%{width:10vh;height:10vh;opacity:0.5}100%{opacity:0}}@keyframes flip{0%{transform:rotateX(140deg);visibility:visible}25%{transform:rotateX(120deg);visibility:visible}50%{transform:rotateX(90deg);visibility:visible}75%{transform:rotateX(75deg);visibility:visible}100%{transform:rotateX(0deg);visibility:visible}}@keyframes show{0%{transform:scale(0)}25%{transform:scale(0.2)}40%{transform:scale(0.4)}50%{transform:scale(0.5)}60%{transform:scale(0.6)}70%{transform:scale(0.7)}100%{transform:scale(1)}}@keyframes rise{0%{visibility:hidden}50%{visibility:visible}100%{visibility:visible}}.buletin-container.rotate-x img{animation:transform-rotate-x 2s infinite ease-in}.rotateimg90{animation:transform-rotate-x2 2s forwards;animation-delay:1s;position:absolute}.rotateimg180{animation:transform-rotate-x3 2s forwards;animation-delay:3s;position:absolute;opacity:0}.buletin-back{display:flex;justify-content:center}@keyframes transform-rotate-x3{from{transform:rotateY(-90deg);opacity:1}to{transform:rotateY(0deg);opacity:1}}@keyframes transform-rotate-x2{to{transform:rotateY(90deg)}}@keyframes transform-rotate-x{to{transform:perspective(600px) rotateX(40deg)}}@media only screen and (max-width: 350px){.second-input{width:36px;height:36px}}@media only screen and (max-width: 390px){.second-input{width:40px;height:40px}}@media only screen and (min-width: 530px) and (max-width: 767px){.chenar-buletin .face-img{width:70%;min-height:auto;margin:auto;left:15%;right:auto;top:-15vh}}@media only screen and (min-width: 600px) and (max-width: 767px){.max-h img{margin-left:15%;margin-right:15%}.max-h{display:flex;align-items:center}}@media only screen and (max-width: 991px){.buletin-container img{max-width:220px}}@media only screen and (min-width: 767px){.container{max-width:530px;margin:40px auto;border-radius:20px;box-shadow:1px 1px 10px rgba(0, 0, 0, 0.1)}body{height:90vh}.btn-buletin{max-width:490px;bottom:7vh}.buletin-container img{width:45%}.chenar-buletin .face-img,.chenar-buletin .chenar-img{min-height:300px}.chenar-buletin .face-img{width:80%;min-height:auto;margin:auto;left:10%;right:auto;top:-10vh}}";
5357
5303
 
5358
5304
  const IdentificationComponent = class {
@@ -5369,7 +5315,7 @@ const IdentificationComponent = class {
5369
5315
  }
5370
5316
  agreementAcceptanceEmitted(data) {
5371
5317
  try {
5372
- this.baseComponent.apiCall.GenerateAgreement(data.detail.agreementType);
5318
+ ApiCall.instance.GenerateAgreement(data.detail.agreementType);
5373
5319
  }
5374
5320
  catch (e) {
5375
5321
  this.apiErrorEmitter(e, 'Agreement Acceptance');
@@ -5393,7 +5339,7 @@ const IdentificationComponent = class {
5393
5339
  }
5394
5340
  let apiLogData = { message: this.errorTitle, stack: this.errorMessage, zone };
5395
5341
  try {
5396
- await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5342
+ await ApiCall.instance.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5397
5343
  }
5398
5344
  catch (_g) { }
5399
5345
  Events.flowError(this.errorTitle);
@@ -5423,8 +5369,6 @@ const IdentificationComponent = class {
5423
5369
  if (this.env && this.env != '') {
5424
5370
  state.environment = this.env;
5425
5371
  }
5426
- this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
5427
- this.baseComponent.setErrorCallback(this.apiErrorEmitter);
5428
5372
  if (state.debug)
5429
5373
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
5430
5374
  if (this.token) {
@@ -5484,13 +5428,17 @@ const IdentificationComponent = class {
5484
5428
  if (state.environment == 'DEMO') {
5485
5429
  return;
5486
5430
  }
5431
+ if (!state.device) {
5432
+ state.device = new DeviceDetection().getDevice();
5433
+ }
5434
+ ApiCall.getInstance();
5487
5435
  if (state.device.browser == Browser.Mi) {
5488
5436
  this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
5489
5437
  return;
5490
5438
  }
5491
5439
  try {
5492
5440
  if (state.debug)
5493
- this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
5441
+ ApiCall.instance.AddLog({ phase: 'debug mode' }, this.logInit);
5494
5442
  }
5495
5443
  catch (_a) { }
5496
5444
  try {
@@ -5499,7 +5447,7 @@ const IdentificationComponent = class {
5499
5447
  this.redirect_id = state.redirectId;
5500
5448
  }
5501
5449
  if (state.token != '' && (state.requestId != '' || state.redirectId != '')) {
5502
- await this.baseComponent.apiCall.AddIdentificationRequest(state.device, packageJson.version);
5450
+ await ApiCall.instance.AddIdentificationRequest(state.device, packageJson.version);
5503
5451
  if (!this.order_id || this.order_id == '') {
5504
5452
  this.order_id = state.requestId;
5505
5453
  }
@@ -5567,24 +5515,16 @@ const deviceSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iMzI
5567
5515
  const landingValidationCss = "";
5568
5516
 
5569
5517
  const LandingValidation = class {
5570
- constructor(hostRef) {
5571
- registerInstance(this, hostRef);
5572
- this.apiErrorEvent = createEvent(this, "apiError", 7);
5573
- this.warningText = undefined;
5574
- this.buttonDisabled = undefined;
5575
- this.baseComponent = new BaseComponent(FlowSteps.Landing);
5576
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
5577
- }
5518
+ constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.warningText = undefined; this.buttonDisabled = undefined; }
5578
5519
  async componentWillLoad() {
5579
5520
  Events.flowStarted();
5580
5521
  this.translations = await Translations.getValues();
5581
- this.baseComponent.apiCall = new ApiCall();
5582
5522
  this.buttonDisabled = false;
5583
5523
  await this.initRequest();
5584
5524
  }
5585
5525
  async componentDidLoad() {
5586
5526
  if (state.environment !== 'DEMO') {
5587
- await this.baseComponent.initialize();
5527
+ await BaseComponent.initialize(FlowSteps.Landing);
5588
5528
  }
5589
5529
  }
5590
5530
  async initRequest() {
@@ -5603,7 +5543,7 @@ const LandingValidation = class {
5603
5543
  sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
5604
5544
  }
5605
5545
  try {
5606
- state.flowStatus = await this.baseComponent.apiCall.LandingValidationStartFlow(cameraIsAccessible);
5546
+ state.flowStatus = await ApiCall.instance.LandingValidationStartFlow(cameraIsAccessible);
5607
5547
  }
5608
5548
  catch (e) {
5609
5549
  this.apiErrorEvent.emit(e);
@@ -5611,13 +5551,13 @@ const LandingValidation = class {
5611
5551
  }
5612
5552
  }
5613
5553
  async disconnectedCallback() {
5614
- await this.baseComponent.finalize();
5554
+ await BaseComponent.finalize(FlowSteps.Landing);
5615
5555
  }
5616
5556
  async leaveFlow() {
5617
5557
  if (this.buttonDisabled)
5618
5558
  return;
5619
5559
  try {
5620
- let abortResult = await this.baseComponent.apiCall.AbortRequest();
5560
+ let abortResult = await ApiCall.instance.AbortRequest();
5621
5561
  state.flowStatus = FlowStatus[abortResult.state];
5622
5562
  Events.flowAborted();
5623
5563
  }
@@ -8520,8 +8460,6 @@ const MobileRedirect = class {
8520
8460
  this.redirectLink = undefined;
8521
8461
  this.qrCode = undefined;
8522
8462
  this.prefilledPhone = false;
8523
- this.baseComponent = new BaseComponent(FlowSteps.MobileRedirect);
8524
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8525
8463
  this.invalidValue = false;
8526
8464
  this.waitingMobile = false;
8527
8465
  }
@@ -8531,7 +8469,7 @@ const MobileRedirect = class {
8531
8469
  this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
8532
8470
  this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
8533
8471
  let envUri = state.environment == 'QA' ? 'test' : 'ect';
8534
- let baseUri = state.apiBaseUrl.includes("apimd") ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8472
+ let baseUri = state.apiBaseUrl.includes('apimd') ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8535
8473
  this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + state.redirectId;
8536
8474
  if (state.phoneNumber && state.phoneNumber != '') {
8537
8475
  this.contact = state.phoneNumber;
@@ -8545,7 +8483,7 @@ const MobileRedirect = class {
8545
8483
  });
8546
8484
  }
8547
8485
  async componentDidLoad() {
8548
- await this.baseComponent.initialize();
8486
+ await BaseComponent.initialize(FlowSteps.MobileRedirect);
8549
8487
  await delay(5000);
8550
8488
  await this.checkStatus();
8551
8489
  while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
@@ -8554,7 +8492,7 @@ const MobileRedirect = class {
8554
8492
  }
8555
8493
  }
8556
8494
  async checkStatus() {
8557
- this.orderStatus = await this.baseComponent.apiCall.GetStatus(state.requestId);
8495
+ this.orderStatus = await ApiCall.instance.GetStatus(state.requestId);
8558
8496
  if (this.orderStatus == OrderStatuses.FinishedCapturing) {
8559
8497
  this.waitingMobile = false;
8560
8498
  state.flowStatus = FlowStatus.COMPLETE;
@@ -8573,7 +8511,7 @@ const MobileRedirect = class {
8573
8511
  }
8574
8512
  }
8575
8513
  async disconnectedCallback() {
8576
- await this.baseComponent.finalize();
8514
+ await BaseComponent.finalize(FlowSteps.MobileRedirect);
8577
8515
  }
8578
8516
  async buttonClick() {
8579
8517
  if (this.contact == '' || this.contact.length != 10) {
@@ -8582,7 +8520,7 @@ const MobileRedirect = class {
8582
8520
  this.waitingMobile = true;
8583
8521
  this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
8584
8522
  try {
8585
- await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
8523
+ await ApiCall.instance.SendLink(this.redirectLink, this.contact);
8586
8524
  }
8587
8525
  catch (e) {
8588
8526
  this.apiErrorEvent.emit(e);
@@ -8626,8 +8564,6 @@ const ProcessId = class {
8626
8564
  this.showTimeout = undefined;
8627
8565
  this.showInvalid = undefined;
8628
8566
  this.flow = undefined;
8629
- this.baseComponent = new BaseComponent(FlowSteps.CiBack);
8630
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8631
8567
  }
8632
8568
  componentWillLoad() {
8633
8569
  this.captureRetryCount = 0;
@@ -8635,6 +8571,7 @@ const ProcessId = class {
8635
8571
  }
8636
8572
  initFlow() {
8637
8573
  if (state.flowStatus == FlowStatus.IDFRONT) {
8574
+ this.currentStep = FlowSteps.CiFront;
8638
8575
  this.flow = {
8639
8576
  capture: {
8640
8577
  fileName: 'idImage.png',
@@ -8646,6 +8583,7 @@ const ProcessId = class {
8646
8583
  };
8647
8584
  }
8648
8585
  else if (state.flowStatus == FlowStatus.IDBACK) {
8586
+ this.currentStep = FlowSteps.CiBack;
8649
8587
  this.flow = {
8650
8588
  capture: {
8651
8589
  fileName: 'idBackImage.png',
@@ -8657,6 +8595,7 @@ const ProcessId = class {
8657
8595
  };
8658
8596
  }
8659
8597
  else if (state.flowStatus == FlowStatus.IDTILT) {
8598
+ this.currentStep = FlowSteps.CiTilt;
8660
8599
  this.flow = {
8661
8600
  capture: {
8662
8601
  fileName: 'idTiltImage.png',
@@ -8685,7 +8624,7 @@ const ProcessId = class {
8685
8624
  async captureIdImage(event) {
8686
8625
  let idPhoto = event.detail;
8687
8626
  if (idPhoto.size == 0) {
8688
- await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
8627
+ await ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
8689
8628
  this.triggerErrorFlow();
8690
8629
  return;
8691
8630
  }
@@ -8707,7 +8646,7 @@ const ProcessId = class {
8707
8646
  return;
8708
8647
  }
8709
8648
  if (idRecording.size == 0) {
8710
- await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
8649
+ await ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
8711
8650
  this.showTimeout = true;
8712
8651
  return;
8713
8652
  }
@@ -8720,13 +8659,13 @@ const ProcessId = class {
8720
8659
  this.recordingResultCount = 0;
8721
8660
  }
8722
8661
  async componentDidLoad() {
8723
- await this.baseComponent.initialize();
8662
+ await BaseComponent.initialize(this.currentStep);
8724
8663
  }
8725
8664
  async uploadPhotos(uploadType, photoFile) {
8726
8665
  if (photoFile == null || uploadType == '') {
8727
8666
  return false;
8728
8667
  }
8729
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, uploadType, photoFile);
8668
+ var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, uploadType, photoFile);
8730
8669
  if (uploadResult) {
8731
8670
  return true;
8732
8671
  }
@@ -8740,7 +8679,7 @@ const ProcessId = class {
8740
8679
  if (recordingFile == null) {
8741
8680
  return;
8742
8681
  }
8743
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, uploadType, recordingFile);
8682
+ var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, uploadType, recordingFile);
8744
8683
  if (uploadResult) {
8745
8684
  return true;
8746
8685
  }
@@ -8753,7 +8692,7 @@ const ProcessId = class {
8753
8692
  this.showInvalid = true;
8754
8693
  }
8755
8694
  async disconnectedCallback() {
8756
- await this.baseComponent.finalize();
8695
+ await BaseComponent.finalize(this.currentStep);
8757
8696
  }
8758
8697
  switchCamera() {
8759
8698
  if (this.captureRetryCount == 1) {
@@ -8831,8 +8770,6 @@ const SelfieCapture = class {
8831
8770
  this.mainStream = Stream.getNewInstance(this.verificationMode);
8832
8771
  this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
8833
8772
  }
8834
- this.baseComponent = new BaseComponent(this.currentStep);
8835
- await this.baseComponent.logStep(this.currentStep, FlowMoments.Initialized);
8836
8773
  this.demoVideo.play();
8837
8774
  await delay(this.translations.GlobalValues.VideoLenght);
8838
8775
  this.demoEnded = true;
@@ -8873,7 +8810,7 @@ const SelfieCapture = class {
8873
8810
  else {
8874
8811
  this.eventTimeElapsed.emit();
8875
8812
  }
8876
- await this.baseComponent.logStep(this.currentStep, FlowMoments.Finalized);
8813
+ await BaseComponent.logStep(this.currentStep, FlowMoments.Finalized);
8877
8814
  }
8878
8815
  async verificationFinished() {
8879
8816
  if (this.verified)
@@ -8912,21 +8849,11 @@ SelfieCapture.style = selfieCaptureCss;
8912
8849
  const smsCodeValidationCss = "";
8913
8850
 
8914
8851
  const SmsCodeValidation = class {
8915
- constructor(hostRef) {
8916
- registerInstance(this, hostRef);
8917
- this.apiErrorEvent = createEvent(this, "apiError", 7);
8918
- this.title = undefined;
8919
- this.details = undefined;
8920
- this.buttonText = undefined;
8921
- this.code = undefined;
8922
- this.canSend = false;
8923
- this.baseComponent = new BaseComponent(FlowSteps.OtpCheck);
8924
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8925
- }
8852
+ constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.title = undefined; this.details = undefined; this.buttonText = undefined; this.code = undefined; this.canSend = false; }
8926
8853
  async doAction() {
8927
8854
  try {
8928
8855
  this.canSend = false;
8929
- var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(state.requestId, this.code);
8856
+ var codeChecked = await ApiCall.instance.CheckOTPCode(state.requestId, this.code);
8930
8857
  state.flowStatus = FlowStatus[codeChecked.state];
8931
8858
  }
8932
8859
  catch (e) {
@@ -8934,7 +8861,7 @@ const SmsCodeValidation = class {
8934
8861
  }
8935
8862
  }
8936
8863
  async disconnectedCallback() {
8937
- await this.baseComponent.finalize();
8864
+ await BaseComponent.finalize(FlowSteps.OtpCheck);
8938
8865
  }
8939
8866
  async componentWillRender() {
8940
8867
  this.translations = await Translations.getValues();
@@ -8943,7 +8870,7 @@ const SmsCodeValidation = class {
8943
8870
  this.buttonText = this.translations.CodeValidationValues.Button;
8944
8871
  }
8945
8872
  async componentDidLoad() {
8946
- await this.baseComponent.initialize();
8873
+ await BaseComponent.initialize(FlowSteps.OtpCheck);
8947
8874
  }
8948
8875
  handleChangeCode(ev) {
8949
8876
  let value = ev.target ? ev.target.value : '';
@@ -8966,20 +8893,11 @@ SmsCodeValidation.style = smsCodeValidationCss;
8966
8893
  const smsSendCss = "";
8967
8894
 
8968
8895
  const SmsSend = class {
8969
- constructor(hostRef) {
8970
- registerInstance(this, hostRef);
8971
- this.apiErrorEvent = createEvent(this, "apiError", 7);
8972
- this.buttonText = undefined;
8973
- this.phoneNumber = undefined;
8974
- this.prefilledPhone = false;
8975
- this.canSend = false;
8976
- this.baseComponent = new BaseComponent(FlowSteps.OtpSend);
8977
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
8978
- }
8896
+ constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.buttonText = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
8979
8897
  async doAction() {
8980
8898
  try {
8981
8899
  this.canSend = false;
8982
- var codeSent = await this.baseComponent.apiCall.SendOTPCode(state.requestId, this.phoneNumber);
8900
+ var codeSent = await ApiCall.instance.SendOTPCode(state.requestId, this.phoneNumber);
8983
8901
  if (codeSent.sent === true) {
8984
8902
  state.flowStatus = FlowStatus[codeSent.state];
8985
8903
  }
@@ -8989,7 +8907,7 @@ const SmsSend = class {
8989
8907
  }
8990
8908
  }
8991
8909
  async disconnectedCallback() {
8992
- await this.baseComponent.finalize();
8910
+ await BaseComponent.finalize(FlowSteps.OtpSend);
8993
8911
  }
8994
8912
  async componentWillRender() {
8995
8913
  this.translations = await Translations.getValues();
@@ -9001,7 +8919,7 @@ const SmsSend = class {
9001
8919
  }
9002
8920
  }
9003
8921
  async componentDidLoad() {
9004
- await this.baseComponent.initialize();
8922
+ await BaseComponent.initialize(FlowSteps.OtpSend);
9005
8923
  }
9006
8924
  handleChangePhone(ev) {
9007
8925
  let value = ev.target ? ev.target.value : '';
@@ -9029,9 +8947,7 @@ const UserLiveness = class {
9029
8947
  this.flow = undefined;
9030
8948
  this.howToDone = false;
9031
8949
  }
9032
- async componentDidLoad() {
9033
- await this.baseComponent.initialize();
9034
- }
8950
+ async componentDidLoad() { }
9035
8951
  componentWillLoad() {
9036
8952
  if (state.flowStatus == FlowStatus.LIVENESS) {
9037
8953
  this.currentStep = FlowSteps.Selfie;
@@ -9057,8 +8973,6 @@ const UserLiveness = class {
9057
8973
  howToDone: false,
9058
8974
  };
9059
8975
  }
9060
- this.baseComponent = new BaseComponent(this.currentStep);
9061
- this.baseComponent.setEventEmitter(this.apiErrorEvent);
9062
8976
  }
9063
8977
  howToDoneEvent() {
9064
8978
  this.howToDone = true;
@@ -9074,13 +8988,13 @@ const UserLiveness = class {
9074
8988
  return;
9075
8989
  let selfiePhoto = event.detail;
9076
8990
  if (selfiePhoto.size == 0) {
9077
- await this.baseComponent.apiCall.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
8991
+ await ApiCall.instance.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
9078
8992
  this.triggerErrorFlow();
9079
8993
  return;
9080
8994
  }
9081
8995
  try {
9082
8996
  var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
9083
- let photoUploaded = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, uploadPhoto);
8997
+ let photoUploaded = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, uploadPhoto);
9084
8998
  if (!photoUploaded) {
9085
8999
  this.triggerErrorFlow();
9086
9000
  }
@@ -9097,14 +9011,14 @@ const UserLiveness = class {
9097
9011
  }
9098
9012
  this.recordingResultCount = 0;
9099
9013
  if (selfieRecording.size == 0) {
9100
- await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
9014
+ await ApiCall.instance.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
9101
9015
  this.triggerErrorFlow();
9102
9016
  return;
9103
9017
  }
9104
9018
  let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
9105
9019
  try {
9106
9020
  let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
9107
- let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, uploadRec);
9021
+ let uplodDone = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, uploadRec);
9108
9022
  if (!uplodDone) {
9109
9023
  this.triggerErrorFlow();
9110
9024
  }
@@ -9120,7 +9034,7 @@ const UserLiveness = class {
9120
9034
  }
9121
9035
  }
9122
9036
  async disconnectedCallback() {
9123
- await this.baseComponent.finalize();
9037
+ await BaseComponent.finalize(this.currentStep);
9124
9038
  }
9125
9039
  triggerErrorFlow() {
9126
9040
  this.showError = true;