@ekyc_qoobiss/qbs-ect-cmp 3.6.44 → 3.6.46
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.
- package/dist/cjs/{TranslationUtils-2d932eab.js → TranslationUtils-8f794c41.js} +12 -0
- package/dist/cjs/agreement-check_17.cjs.entry.js +208 -301
- package/dist/cjs/random-actions.cjs.entry.js +1 -1
- package/dist/collection/components/base-component.js +11 -44
- package/dist/collection/components/common/agreement-check/agreement-check.js +0 -4
- package/dist/collection/components/common/camera-error/camera-error.js +3 -10
- package/dist/collection/components/common/capture-error/capture-error.js +3 -8
- package/dist/collection/components/common/how-to-info/how-to-info.js +2 -4
- package/dist/collection/components/common/id-capture/id-capture.js +2 -3
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -3
- package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -5
- package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -11
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +6 -7
- package/dist/collection/components/flow/process-id/process-id.js +10 -8
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +5 -12
- package/dist/collection/components/flow/sms-send/sms-send.js +5 -11
- package/dist/collection/components/flow/user-liveness/user-liveness.js +7 -10
- package/dist/collection/components/identification-component/identification-component.js +14 -18
- package/dist/collection/helpers/ApiCall.js +10 -0
- package/dist/collection/helpers/textValues.js +1 -0
- package/dist/collection/models/FlowSteps.js +1 -0
- package/dist/esm/{TranslationUtils-0039c82d.js → TranslationUtils-770d32d7.js} +12 -0
- package/dist/esm/agreement-check_17.entry.js +208 -301
- package/dist/esm/random-actions.entry.js +1 -1
- package/dist/qbs-ect-cmp/{p-0c1eead0.entry.js → p-1aa8595e.entry.js} +1 -1
- package/dist/qbs-ect-cmp/{p-fca9e256.entry.js → p-36eff211.entry.js} +2 -2
- package/dist/qbs-ect-cmp/p-a073c59e.js +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/base-component.d.ts +3 -12
- package/dist/types/components/common/agreement-check/agreement-check.d.ts +0 -1
- package/dist/types/components/common/camera-error/camera-error.d.ts +0 -1
- package/dist/types/components/common/capture-error/capture-error.d.ts +0 -1
- package/dist/types/components/common/how-to-info/how-to-info.d.ts +0 -1
- package/dist/types/components/common/id-capture/id-capture.d.ts +0 -1
- package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +0 -1
- package/dist/types/components/flow/agreement-info/agreement-info.d.ts +0 -1
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +0 -1
- package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +0 -1
- package/dist/types/components/flow/process-id/process-id.d.ts +1 -1
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +0 -1
- package/dist/types/components/flow/sms-send/sms-send.d.ts +0 -1
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +0 -1
- package/dist/types/components/identification-component/identification-component.d.ts +0 -2
- package/dist/types/helpers/ApiCall.d.ts +3 -0
- package/dist/types/helpers/textValues.d.ts +1 -0
- package/dist/types/models/FlowSteps.d.ts +2 -1
- package/package.json +1 -1
- 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,
|
|
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-770d32d7.js';
|
|
3
3
|
|
|
4
|
-
|
|
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
|
|
29
|
-
constructor() {
|
|
30
|
-
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
return regex.test(this.userAgent.toLowerCase());
|
|
18
|
+
async componentWillLoad() {
|
|
19
|
+
this.translations = await Translations.getValues();
|
|
47
20
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
60
|
-
|
|
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
28
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
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
|
|
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(
|
|
107
|
+
static async initialize(flowStep) {
|
|
108
|
+
Events.flowEvent(flowStep, FlowMoments.Initialized);
|
|
203
109
|
try {
|
|
204
|
-
await
|
|
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(
|
|
114
|
+
static async finalize(flowStep) {
|
|
115
|
+
Events.flowEvent(flowStep, FlowMoments.Finalized);
|
|
215
116
|
try {
|
|
216
|
-
await
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
4764
|
+
await BaseComponent.initialize(this.currentStep);
|
|
4901
4765
|
}
|
|
4902
4766
|
async disconnectedCallback() {
|
|
4903
|
-
await
|
|
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
|
|
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
|
|
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.
|
|
5147
|
+
const version$1 = "3.6.46";
|
|
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
|
-
|
|
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
|
|
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);
|
|
@@ -5404,7 +5350,6 @@ const IdentificationComponent = class {
|
|
|
5404
5350
|
constructor(hostRef) {
|
|
5405
5351
|
registerInstance(this, hostRef);
|
|
5406
5352
|
this.logInit = {};
|
|
5407
|
-
this.flowStatusToSet = FlowStatus.NONE;
|
|
5408
5353
|
this.initialised = false;
|
|
5409
5354
|
this.token = undefined;
|
|
5410
5355
|
this.order_id = undefined;
|
|
@@ -5415,6 +5360,7 @@ const IdentificationComponent = class {
|
|
|
5415
5360
|
this.lang_iso = undefined;
|
|
5416
5361
|
this.errorMessage = undefined;
|
|
5417
5362
|
this.errorTitle = undefined;
|
|
5363
|
+
ApiCall.getInstance();
|
|
5418
5364
|
}
|
|
5419
5365
|
async componentWillLoad() {
|
|
5420
5366
|
Events.init(window);
|
|
@@ -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) {
|
|
@@ -5462,19 +5406,13 @@ const IdentificationComponent = class {
|
|
|
5462
5406
|
state.requestId = savedRequest;
|
|
5463
5407
|
this.order_id = savedRequest;
|
|
5464
5408
|
}
|
|
5465
|
-
if (this.flowStatusToSet == FlowStatus.NONE) {
|
|
5466
|
-
var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
|
|
5467
|
-
if (flowSt) {
|
|
5468
|
-
this.flowStatusToSet = FlowStatus[flowSt];
|
|
5469
|
-
}
|
|
5470
|
-
else {
|
|
5471
|
-
this.flowStatusToSet = FlowStatus.LANDING;
|
|
5472
|
-
}
|
|
5473
|
-
}
|
|
5474
5409
|
}
|
|
5475
5410
|
async componentDidLoad() {
|
|
5411
|
+
try {
|
|
5412
|
+
state.flowStatus = await ApiCall.instance.GetFlowState();
|
|
5413
|
+
}
|
|
5414
|
+
catch (e) { }
|
|
5476
5415
|
await this.initializeRequest();
|
|
5477
|
-
state.flowStatus = this.flowStatusToSet;
|
|
5478
5416
|
}
|
|
5479
5417
|
async initializeRequest() {
|
|
5480
5418
|
if (this.initialised) {
|
|
@@ -5484,13 +5422,16 @@ const IdentificationComponent = class {
|
|
|
5484
5422
|
if (state.environment == 'DEMO') {
|
|
5485
5423
|
return;
|
|
5486
5424
|
}
|
|
5425
|
+
if (!state.device) {
|
|
5426
|
+
state.device = new DeviceDetection().getDevice();
|
|
5427
|
+
}
|
|
5487
5428
|
if (state.device.browser == Browser.Mi) {
|
|
5488
5429
|
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
5489
5430
|
return;
|
|
5490
5431
|
}
|
|
5491
5432
|
try {
|
|
5492
5433
|
if (state.debug)
|
|
5493
|
-
|
|
5434
|
+
ApiCall.instance.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
5494
5435
|
}
|
|
5495
5436
|
catch (_a) { }
|
|
5496
5437
|
try {
|
|
@@ -5499,7 +5440,7 @@ const IdentificationComponent = class {
|
|
|
5499
5440
|
this.redirect_id = state.redirectId;
|
|
5500
5441
|
}
|
|
5501
5442
|
if (state.token != '' && (state.requestId != '' || state.redirectId != '')) {
|
|
5502
|
-
await
|
|
5443
|
+
await ApiCall.instance.AddIdentificationRequest(state.device, packageJson.version);
|
|
5503
5444
|
if (!this.order_id || this.order_id == '') {
|
|
5504
5445
|
this.order_id = state.requestId;
|
|
5505
5446
|
}
|
|
@@ -5567,24 +5508,16 @@ const deviceSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iMzI
|
|
|
5567
5508
|
const landingValidationCss = "";
|
|
5568
5509
|
|
|
5569
5510
|
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
|
-
}
|
|
5511
|
+
constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.warningText = undefined; this.buttonDisabled = undefined; }
|
|
5578
5512
|
async componentWillLoad() {
|
|
5579
5513
|
Events.flowStarted();
|
|
5580
5514
|
this.translations = await Translations.getValues();
|
|
5581
|
-
this.baseComponent.apiCall = new ApiCall();
|
|
5582
5515
|
this.buttonDisabled = false;
|
|
5583
5516
|
await this.initRequest();
|
|
5584
5517
|
}
|
|
5585
5518
|
async componentDidLoad() {
|
|
5586
5519
|
if (state.environment !== 'DEMO') {
|
|
5587
|
-
await
|
|
5520
|
+
await BaseComponent.initialize(FlowSteps.Landing);
|
|
5588
5521
|
}
|
|
5589
5522
|
}
|
|
5590
5523
|
async initRequest() {
|
|
@@ -5603,7 +5536,7 @@ const LandingValidation = class {
|
|
|
5603
5536
|
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
5604
5537
|
}
|
|
5605
5538
|
try {
|
|
5606
|
-
state.flowStatus = await
|
|
5539
|
+
state.flowStatus = await ApiCall.instance.LandingValidationStartFlow(cameraIsAccessible);
|
|
5607
5540
|
}
|
|
5608
5541
|
catch (e) {
|
|
5609
5542
|
this.apiErrorEvent.emit(e);
|
|
@@ -5611,13 +5544,13 @@ const LandingValidation = class {
|
|
|
5611
5544
|
}
|
|
5612
5545
|
}
|
|
5613
5546
|
async disconnectedCallback() {
|
|
5614
|
-
await
|
|
5547
|
+
await BaseComponent.finalize(FlowSteps.Landing);
|
|
5615
5548
|
}
|
|
5616
5549
|
async leaveFlow() {
|
|
5617
5550
|
if (this.buttonDisabled)
|
|
5618
5551
|
return;
|
|
5619
5552
|
try {
|
|
5620
|
-
let abortResult = await
|
|
5553
|
+
let abortResult = await ApiCall.instance.AbortRequest();
|
|
5621
5554
|
state.flowStatus = FlowStatus[abortResult.state];
|
|
5622
5555
|
Events.flowAborted();
|
|
5623
5556
|
}
|
|
@@ -8520,8 +8453,6 @@ const MobileRedirect = class {
|
|
|
8520
8453
|
this.redirectLink = undefined;
|
|
8521
8454
|
this.qrCode = undefined;
|
|
8522
8455
|
this.prefilledPhone = false;
|
|
8523
|
-
this.baseComponent = new BaseComponent(FlowSteps.MobileRedirect);
|
|
8524
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8525
8456
|
this.invalidValue = false;
|
|
8526
8457
|
this.waitingMobile = false;
|
|
8527
8458
|
}
|
|
@@ -8531,7 +8462,7 @@ const MobileRedirect = class {
|
|
|
8531
8462
|
this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
|
|
8532
8463
|
this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
|
|
8533
8464
|
let envUri = state.environment == 'QA' ? 'test' : 'ect';
|
|
8534
|
-
let baseUri = state.apiBaseUrl.includes(
|
|
8465
|
+
let baseUri = state.apiBaseUrl.includes('apimd') ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
8535
8466
|
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + state.redirectId;
|
|
8536
8467
|
if (state.phoneNumber && state.phoneNumber != '') {
|
|
8537
8468
|
this.contact = state.phoneNumber;
|
|
@@ -8545,7 +8476,7 @@ const MobileRedirect = class {
|
|
|
8545
8476
|
});
|
|
8546
8477
|
}
|
|
8547
8478
|
async componentDidLoad() {
|
|
8548
|
-
await
|
|
8479
|
+
await BaseComponent.initialize(FlowSteps.MobileRedirect);
|
|
8549
8480
|
await delay(5000);
|
|
8550
8481
|
await this.checkStatus();
|
|
8551
8482
|
while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
|
|
@@ -8554,7 +8485,7 @@ const MobileRedirect = class {
|
|
|
8554
8485
|
}
|
|
8555
8486
|
}
|
|
8556
8487
|
async checkStatus() {
|
|
8557
|
-
this.orderStatus = await
|
|
8488
|
+
this.orderStatus = await ApiCall.instance.GetStatus(state.requestId);
|
|
8558
8489
|
if (this.orderStatus == OrderStatuses.FinishedCapturing) {
|
|
8559
8490
|
this.waitingMobile = false;
|
|
8560
8491
|
state.flowStatus = FlowStatus.COMPLETE;
|
|
@@ -8573,7 +8504,7 @@ const MobileRedirect = class {
|
|
|
8573
8504
|
}
|
|
8574
8505
|
}
|
|
8575
8506
|
async disconnectedCallback() {
|
|
8576
|
-
await
|
|
8507
|
+
await BaseComponent.finalize(FlowSteps.MobileRedirect);
|
|
8577
8508
|
}
|
|
8578
8509
|
async buttonClick() {
|
|
8579
8510
|
if (this.contact == '' || this.contact.length != 10) {
|
|
@@ -8582,7 +8513,7 @@ const MobileRedirect = class {
|
|
|
8582
8513
|
this.waitingMobile = true;
|
|
8583
8514
|
this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
|
|
8584
8515
|
try {
|
|
8585
|
-
await
|
|
8516
|
+
await ApiCall.instance.SendLink(this.redirectLink, this.contact);
|
|
8586
8517
|
}
|
|
8587
8518
|
catch (e) {
|
|
8588
8519
|
this.apiErrorEvent.emit(e);
|
|
@@ -8626,8 +8557,6 @@ const ProcessId = class {
|
|
|
8626
8557
|
this.showTimeout = undefined;
|
|
8627
8558
|
this.showInvalid = undefined;
|
|
8628
8559
|
this.flow = undefined;
|
|
8629
|
-
this.baseComponent = new BaseComponent(FlowSteps.CiBack);
|
|
8630
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
8631
8560
|
}
|
|
8632
8561
|
componentWillLoad() {
|
|
8633
8562
|
this.captureRetryCount = 0;
|
|
@@ -8635,6 +8564,7 @@ const ProcessId = class {
|
|
|
8635
8564
|
}
|
|
8636
8565
|
initFlow() {
|
|
8637
8566
|
if (state.flowStatus == FlowStatus.IDFRONT) {
|
|
8567
|
+
this.currentStep = FlowSteps.CiFront;
|
|
8638
8568
|
this.flow = {
|
|
8639
8569
|
capture: {
|
|
8640
8570
|
fileName: 'idImage.png',
|
|
@@ -8646,6 +8576,7 @@ const ProcessId = class {
|
|
|
8646
8576
|
};
|
|
8647
8577
|
}
|
|
8648
8578
|
else if (state.flowStatus == FlowStatus.IDBACK) {
|
|
8579
|
+
this.currentStep = FlowSteps.CiBack;
|
|
8649
8580
|
this.flow = {
|
|
8650
8581
|
capture: {
|
|
8651
8582
|
fileName: 'idBackImage.png',
|
|
@@ -8657,6 +8588,7 @@ const ProcessId = class {
|
|
|
8657
8588
|
};
|
|
8658
8589
|
}
|
|
8659
8590
|
else if (state.flowStatus == FlowStatus.IDTILT) {
|
|
8591
|
+
this.currentStep = FlowSteps.CiTilt;
|
|
8660
8592
|
this.flow = {
|
|
8661
8593
|
capture: {
|
|
8662
8594
|
fileName: 'idTiltImage.png',
|
|
@@ -8685,7 +8617,7 @@ const ProcessId = class {
|
|
|
8685
8617
|
async captureIdImage(event) {
|
|
8686
8618
|
let idPhoto = event.detail;
|
|
8687
8619
|
if (idPhoto.size == 0) {
|
|
8688
|
-
await
|
|
8620
|
+
await ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
8689
8621
|
this.triggerErrorFlow();
|
|
8690
8622
|
return;
|
|
8691
8623
|
}
|
|
@@ -8707,7 +8639,7 @@ const ProcessId = class {
|
|
|
8707
8639
|
return;
|
|
8708
8640
|
}
|
|
8709
8641
|
if (idRecording.size == 0) {
|
|
8710
|
-
await
|
|
8642
|
+
await ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
8711
8643
|
this.showTimeout = true;
|
|
8712
8644
|
return;
|
|
8713
8645
|
}
|
|
@@ -8720,13 +8652,13 @@ const ProcessId = class {
|
|
|
8720
8652
|
this.recordingResultCount = 0;
|
|
8721
8653
|
}
|
|
8722
8654
|
async componentDidLoad() {
|
|
8723
|
-
await
|
|
8655
|
+
await BaseComponent.initialize(this.currentStep);
|
|
8724
8656
|
}
|
|
8725
8657
|
async uploadPhotos(uploadType, photoFile) {
|
|
8726
8658
|
if (photoFile == null || uploadType == '') {
|
|
8727
8659
|
return false;
|
|
8728
8660
|
}
|
|
8729
|
-
var uploadResult = await
|
|
8661
|
+
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, uploadType, photoFile);
|
|
8730
8662
|
if (uploadResult) {
|
|
8731
8663
|
return true;
|
|
8732
8664
|
}
|
|
@@ -8740,7 +8672,7 @@ const ProcessId = class {
|
|
|
8740
8672
|
if (recordingFile == null) {
|
|
8741
8673
|
return;
|
|
8742
8674
|
}
|
|
8743
|
-
var uploadResult = await
|
|
8675
|
+
var uploadResult = await ApiCall.instance.UploadFileForRequestB64(state.requestId, uploadType, recordingFile);
|
|
8744
8676
|
if (uploadResult) {
|
|
8745
8677
|
return true;
|
|
8746
8678
|
}
|
|
@@ -8753,7 +8685,7 @@ const ProcessId = class {
|
|
|
8753
8685
|
this.showInvalid = true;
|
|
8754
8686
|
}
|
|
8755
8687
|
async disconnectedCallback() {
|
|
8756
|
-
await
|
|
8688
|
+
await BaseComponent.finalize(this.currentStep);
|
|
8757
8689
|
}
|
|
8758
8690
|
switchCamera() {
|
|
8759
8691
|
if (this.captureRetryCount == 1) {
|
|
@@ -8831,8 +8763,6 @@ const SelfieCapture = class {
|
|
|
8831
8763
|
this.mainStream = Stream.getNewInstance(this.verificationMode);
|
|
8832
8764
|
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
|
|
8833
8765
|
}
|
|
8834
|
-
this.baseComponent = new BaseComponent(this.currentStep);
|
|
8835
|
-
await this.baseComponent.logStep(this.currentStep, FlowMoments.Initialized);
|
|
8836
8766
|
this.demoVideo.play();
|
|
8837
8767
|
await delay(this.translations.GlobalValues.VideoLenght);
|
|
8838
8768
|
this.demoEnded = true;
|
|
@@ -8873,7 +8803,7 @@ const SelfieCapture = class {
|
|
|
8873
8803
|
else {
|
|
8874
8804
|
this.eventTimeElapsed.emit();
|
|
8875
8805
|
}
|
|
8876
|
-
await
|
|
8806
|
+
await BaseComponent.logStep(this.currentStep, FlowMoments.Finalized);
|
|
8877
8807
|
}
|
|
8878
8808
|
async verificationFinished() {
|
|
8879
8809
|
if (this.verified)
|
|
@@ -8912,21 +8842,11 @@ SelfieCapture.style = selfieCaptureCss;
|
|
|
8912
8842
|
const smsCodeValidationCss = "";
|
|
8913
8843
|
|
|
8914
8844
|
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
|
-
}
|
|
8845
|
+
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
8846
|
async doAction() {
|
|
8927
8847
|
try {
|
|
8928
8848
|
this.canSend = false;
|
|
8929
|
-
var codeChecked = await
|
|
8849
|
+
var codeChecked = await ApiCall.instance.CheckOTPCode(state.requestId, this.code);
|
|
8930
8850
|
state.flowStatus = FlowStatus[codeChecked.state];
|
|
8931
8851
|
}
|
|
8932
8852
|
catch (e) {
|
|
@@ -8934,7 +8854,7 @@ const SmsCodeValidation = class {
|
|
|
8934
8854
|
}
|
|
8935
8855
|
}
|
|
8936
8856
|
async disconnectedCallback() {
|
|
8937
|
-
await
|
|
8857
|
+
await BaseComponent.finalize(FlowSteps.OtpCheck);
|
|
8938
8858
|
}
|
|
8939
8859
|
async componentWillRender() {
|
|
8940
8860
|
this.translations = await Translations.getValues();
|
|
@@ -8943,7 +8863,7 @@ const SmsCodeValidation = class {
|
|
|
8943
8863
|
this.buttonText = this.translations.CodeValidationValues.Button;
|
|
8944
8864
|
}
|
|
8945
8865
|
async componentDidLoad() {
|
|
8946
|
-
await
|
|
8866
|
+
await BaseComponent.initialize(FlowSteps.OtpCheck);
|
|
8947
8867
|
}
|
|
8948
8868
|
handleChangeCode(ev) {
|
|
8949
8869
|
let value = ev.target ? ev.target.value : '';
|
|
@@ -8966,20 +8886,11 @@ SmsCodeValidation.style = smsCodeValidationCss;
|
|
|
8966
8886
|
const smsSendCss = "";
|
|
8967
8887
|
|
|
8968
8888
|
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
|
-
}
|
|
8889
|
+
constructor(hostRef) { registerInstance(this, hostRef); this.apiErrorEvent = createEvent(this, "apiError", 7); this.buttonText = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
|
|
8979
8890
|
async doAction() {
|
|
8980
8891
|
try {
|
|
8981
8892
|
this.canSend = false;
|
|
8982
|
-
var codeSent = await
|
|
8893
|
+
var codeSent = await ApiCall.instance.SendOTPCode(state.requestId, this.phoneNumber);
|
|
8983
8894
|
if (codeSent.sent === true) {
|
|
8984
8895
|
state.flowStatus = FlowStatus[codeSent.state];
|
|
8985
8896
|
}
|
|
@@ -8989,7 +8900,7 @@ const SmsSend = class {
|
|
|
8989
8900
|
}
|
|
8990
8901
|
}
|
|
8991
8902
|
async disconnectedCallback() {
|
|
8992
|
-
await
|
|
8903
|
+
await BaseComponent.finalize(FlowSteps.OtpSend);
|
|
8993
8904
|
}
|
|
8994
8905
|
async componentWillRender() {
|
|
8995
8906
|
this.translations = await Translations.getValues();
|
|
@@ -9001,7 +8912,7 @@ const SmsSend = class {
|
|
|
9001
8912
|
}
|
|
9002
8913
|
}
|
|
9003
8914
|
async componentDidLoad() {
|
|
9004
|
-
await
|
|
8915
|
+
await BaseComponent.initialize(FlowSteps.OtpSend);
|
|
9005
8916
|
}
|
|
9006
8917
|
handleChangePhone(ev) {
|
|
9007
8918
|
let value = ev.target ? ev.target.value : '';
|
|
@@ -9029,9 +8940,7 @@ const UserLiveness = class {
|
|
|
9029
8940
|
this.flow = undefined;
|
|
9030
8941
|
this.howToDone = false;
|
|
9031
8942
|
}
|
|
9032
|
-
async componentDidLoad() {
|
|
9033
|
-
await this.baseComponent.initialize();
|
|
9034
|
-
}
|
|
8943
|
+
async componentDidLoad() { }
|
|
9035
8944
|
componentWillLoad() {
|
|
9036
8945
|
if (state.flowStatus == FlowStatus.LIVENESS) {
|
|
9037
8946
|
this.currentStep = FlowSteps.Selfie;
|
|
@@ -9057,8 +8966,6 @@ const UserLiveness = class {
|
|
|
9057
8966
|
howToDone: false,
|
|
9058
8967
|
};
|
|
9059
8968
|
}
|
|
9060
|
-
this.baseComponent = new BaseComponent(this.currentStep);
|
|
9061
|
-
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
9062
8969
|
}
|
|
9063
8970
|
howToDoneEvent() {
|
|
9064
8971
|
this.howToDone = true;
|
|
@@ -9074,13 +8981,13 @@ const UserLiveness = class {
|
|
|
9074
8981
|
return;
|
|
9075
8982
|
let selfiePhoto = event.detail;
|
|
9076
8983
|
if (selfiePhoto.size == 0) {
|
|
9077
|
-
await
|
|
8984
|
+
await ApiCall.instance.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
|
|
9078
8985
|
this.triggerErrorFlow();
|
|
9079
8986
|
return;
|
|
9080
8987
|
}
|
|
9081
8988
|
try {
|
|
9082
8989
|
var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
|
|
9083
|
-
let photoUploaded = await
|
|
8990
|
+
let photoUploaded = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.photoType, uploadPhoto);
|
|
9084
8991
|
if (!photoUploaded) {
|
|
9085
8992
|
this.triggerErrorFlow();
|
|
9086
8993
|
}
|
|
@@ -9097,14 +9004,14 @@ const UserLiveness = class {
|
|
|
9097
9004
|
}
|
|
9098
9005
|
this.recordingResultCount = 0;
|
|
9099
9006
|
if (selfieRecording.size == 0) {
|
|
9100
|
-
await
|
|
9007
|
+
await ApiCall.instance.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
|
|
9101
9008
|
this.triggerErrorFlow();
|
|
9102
9009
|
return;
|
|
9103
9010
|
}
|
|
9104
9011
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9105
9012
|
try {
|
|
9106
9013
|
let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
|
|
9107
|
-
let uplodDone = await
|
|
9014
|
+
let uplodDone = await ApiCall.instance.UploadFileForRequestB64(state.requestId, this.flow.capture.recType, uploadRec);
|
|
9108
9015
|
if (!uplodDone) {
|
|
9109
9016
|
this.triggerErrorFlow();
|
|
9110
9017
|
}
|
|
@@ -9120,7 +9027,7 @@ const UserLiveness = class {
|
|
|
9120
9027
|
}
|
|
9121
9028
|
}
|
|
9122
9029
|
async disconnectedCallback() {
|
|
9123
|
-
await
|
|
9030
|
+
await BaseComponent.finalize(this.currentStep);
|
|
9124
9031
|
}
|
|
9125
9032
|
triggerErrorFlow() {
|
|
9126
9033
|
this.showError = true;
|