@ekyc_qoobiss/qbs-ect-cmp 3.6.29 → 3.6.30

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.
@@ -3,266 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const TranslationUtils = require('./TranslationUtils-b918ffb1.js');
7
-
8
- var OrderStatuses;
9
- (function (OrderStatuses) {
10
- OrderStatuses[OrderStatuses["Capturing"] = 0] = "Capturing";
11
- OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
12
- OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
13
- OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
14
- OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
15
- })(OrderStatuses || (OrderStatuses = {}));
16
-
17
- var FlowSteps;
18
- (function (FlowSteps) {
19
- FlowSteps[FlowSteps["ComponentLoaded"] = 'component-loaded'] = "ComponentLoaded";
20
- FlowSteps[FlowSteps["MobileRedirect"] = 'mobile-redirect'] = "MobileRedirect";
21
- FlowSteps[FlowSteps["Landing"] = 'landing'] = "Landing";
22
- FlowSteps[FlowSteps["Agreements"] = 'agreements'] = "Agreements";
23
- FlowSteps[FlowSteps["OtpSend"] = 'otp-send'] = "OtpSend";
24
- FlowSteps[FlowSteps["OtpCheck"] = 'otp-check'] = "OtpCheck";
25
- FlowSteps[FlowSteps["CiFront"] = 'ci-front'] = "CiFront";
26
- FlowSteps[FlowSteps["CiFrontHowTo"] = 'ci-front-how-to'] = "CiFrontHowTo";
27
- FlowSteps[FlowSteps["CiFrontCapture"] = 'ci-front-capture'] = "CiFrontCapture";
28
- FlowSteps[FlowSteps["CiBack"] = 'ci-back'] = "CiBack";
29
- FlowSteps[FlowSteps["CiBackHowTo"] = 'ci-back-how-to'] = "CiBackHowTo";
30
- FlowSteps[FlowSteps["CiBackCapture"] = 'ci-back-capture'] = "CiBackCapture";
31
- FlowSteps[FlowSteps["CiTilt"] = 'ci-tilt'] = "CiTilt";
32
- FlowSteps[FlowSteps["CiError"] = 'ci-error'] = "CiError";
33
- FlowSteps[FlowSteps["SelfieHowTo"] = 'selfie-how-to'] = "SelfieHowTo";
34
- FlowSteps[FlowSteps["SelfieTilt"] = 'selfie-tilt'] = "SelfieTilt";
35
- FlowSteps[FlowSteps["SelfieCapture"] = 'selfie-capture'] = "SelfieCapture";
36
- FlowSteps[FlowSteps["Selfie"] = 'selfie'] = "Selfie";
37
- FlowSteps[FlowSteps["SelfieError"] = 'selfie-error'] = "SelfieError";
38
- FlowSteps[FlowSteps["End"] = 'end'] = "End";
39
- FlowSteps[FlowSteps["CameraError"] = 'camera-error'] = "CameraError";
40
- })(FlowSteps || (FlowSteps = {}));
41
- var FlowMoments;
42
- (function (FlowMoments) {
43
- FlowMoments[FlowMoments["Initialized"] = 'initialized'] = "Initialized";
44
- FlowMoments[FlowMoments["Finalized"] = 'finalized'] = "Finalized";
45
- FlowMoments[FlowMoments["None"] = 'none'] = "None";
46
- })(FlowMoments || (FlowMoments = {}));
47
-
48
- class ApiCall {
49
- constructor() {
50
- this.serviceErrors = ['Service Unavailable', 'Unauthorized'];
51
- this.toBase64 = (file) => new Promise((resolve, reject) => {
52
- const reader = new FileReader();
53
- reader.readAsDataURL(file);
54
- reader.onload = () => resolve(reader.result);
55
- reader.onerror = error => reject(error);
56
- });
57
- this.urls = new TranslationUtils.ApiUrls();
58
- }
59
- // private async http2<T>(method: string, url: string, data: string): Promise<T> {
60
- // return new Promise((resolve, reject) => {
61
- // var xhr = new XMLHttpRequest();
62
- // xhr.open(method, url);
63
- // xhr.onload = function () {
64
- // if (xhr.status >= 200 && xhr.status < 300) {
65
- // resolve(xhr.response);
66
- // } else {
67
- // reject({
68
- // status: xhr.status,
69
- // statusText: xhr.statusText,
70
- // });
71
- // }
72
- // };
73
- // xhr.onerror = function () {
74
- // reject({
75
- // status: xhr.status,
76
- // statusText: xhr.statusText,
77
- // });
78
- // };
79
- // xhr.send(data);
80
- // });
81
- // }
82
- async http(request) {
83
- const response = await fetch(request);
84
- if (!response.ok) {
85
- throw new Error(response.statusText);
86
- }
87
- try {
88
- // may error if there is no body
89
- return await response.json();
90
- }
91
- catch (ex) {
92
- throw new Error('No json found in response ' + ex);
93
- }
94
- }
95
- async post(url, data, withRetry = true) {
96
- var request = new Request(TranslationUtils.state.apiBaseUrl + url, {
97
- method: 'POST',
98
- body: data,
99
- headers: {
100
- 'Content-Type': 'application/json',
101
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
102
- },
103
- });
104
- try {
105
- return await this.http(request);
106
- }
107
- catch (ex) {
108
- if (!withRetry || this.serviceErrors.includes(ex.message)) {
109
- throw ex;
110
- }
111
- this.AddLog('Error in post ', ex);
112
- try {
113
- var request2 = new Request(TranslationUtils.state.apiBaseUrl + url, {
114
- method: 'POST',
115
- body: data,
116
- headers: {
117
- 'Content-Type': 'application/json',
118
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
119
- },
120
- });
121
- return await this.http(request2);
122
- }
123
- catch (ex2) {
124
- this.AddLog('Error in post ', ex2);
125
- var request3 = new Request(TranslationUtils.state.apiBaseUrl + url, {
126
- method: 'POST',
127
- body: data,
128
- headers: {
129
- 'Content-Type': 'application/json',
130
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
131
- },
132
- });
133
- return await this.http(request3);
134
- }
135
- }
136
- }
137
- async get(url, withRetry = true) {
138
- var request = new Request(TranslationUtils.state.apiBaseUrl + url, {
139
- method: 'GET',
140
- headers: {
141
- 'Content-Type': 'application/json',
142
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
143
- },
144
- });
145
- try {
146
- return await this.http(request);
147
- }
148
- catch (ex) {
149
- if (!withRetry || this.serviceErrors.includes(ex.message)) {
150
- throw ex;
151
- }
152
- this.AddLog('Error in get ', ex);
153
- try {
154
- var request2 = new Request(TranslationUtils.state.apiBaseUrl + url, {
155
- method: 'GET',
156
- headers: {
157
- 'Content-Type': 'application/json',
158
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
159
- },
160
- });
161
- return await this.http(request2);
162
- }
163
- catch (ex2) {
164
- this.AddLog('Error in get ', ex2);
165
- var request3 = new Request(TranslationUtils.state.apiBaseUrl + url, {
166
- method: 'GET',
167
- headers: {
168
- 'Content-Type': 'application/json',
169
- 'Authorization': 'IDKYC-TOKEN ' + TranslationUtils.state.token,
170
- },
171
- });
172
- return await this.http(request3);
173
- }
174
- }
175
- }
176
- async SendOTPCode(requestId, phoneNumber) {
177
- let data = { requestId: requestId, phone: phoneNumber };
178
- let jsonResp = await this.post(this.urls.OtpSend, JSON.stringify(data));
179
- return jsonResp.sent;
180
- }
181
- async CheckOTPCode(requestId, otpCode) {
182
- let data = { requestId: requestId, otp: otpCode };
183
- let jsonResp = await this.post(this.urls.OtpCheck, JSON.stringify(data));
184
- return jsonResp.valid;
185
- }
186
- async AddIdentificationRequest(deviceInfo, version) {
187
- if (TranslationUtils.state.debug)
188
- console.log('Calling identity request with store:' + JSON.stringify(TranslationUtils.state));
189
- let data = {
190
- requestId: TranslationUtils.state.requestId,
191
- clientDeviceInfo: JSON.stringify(deviceInfo),
192
- redirectId: TranslationUtils.state.redirectId,
193
- phoneNumber: TranslationUtils.state.phoneNumber,
194
- version: version,
195
- };
196
- let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
197
- if (TranslationUtils.state.requestId == '') {
198
- TranslationUtils.state.requestId = jsonResp.requestId;
199
- }
200
- TranslationUtils.state.hasIdBack = jsonResp.hasIdBack;
201
- TranslationUtils.state.hasIdTilt = jsonResp.hasIdTilt;
202
- TranslationUtils.state.hasSelfieGesture = jsonResp.hasSelfieGesture;
203
- TranslationUtils.state.agreementsValidation = jsonResp.agreementsValidation;
204
- TranslationUtils.state.phoneValidation = jsonResp.phoneValidation;
205
- TranslationUtils.state.phoneNumber = jsonResp.phoneNumber;
206
- return true;
207
- }
208
- async UploadFileForRequestB64(requestId, type, file) {
209
- let data = {
210
- requestId: requestId,
211
- type: type,
212
- data: await this.toBase64(file),
213
- };
214
- let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
215
- if (!TranslationUtils.state.hasIdBack && type == 'IdFront') {
216
- return respJson.isValid;
217
- }
218
- if (TranslationUtils.state.hasIdBack && type == 'IdBack') {
219
- return respJson.isValid;
220
- }
221
- if (type == 'Selfie') {
222
- return respJson.isValid;
223
- }
224
- return true;
225
- }
226
- async GetAgreement(agreementType) {
227
- let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + TranslationUtils.state.requestId);
228
- return resp.htmlText;
229
- }
230
- async GenerateAgreement(agreementType) {
231
- let data = { requestId: TranslationUtils.state.requestId, documentType: agreementType };
232
- let resp = await this.post(this.urls.GenerateAgreement, JSON.stringify(data));
233
- return resp.generation;
234
- }
235
- async GetStatus(requestId) {
236
- let resp = await this.get(this.urls.GetStatus + '?orderId=' + requestId);
237
- return OrderStatuses[resp.status];
238
- }
239
- async SendLink(link, phoneNumber) {
240
- let data = { requestId: TranslationUtils.state.requestId, link: link, phoneNumber: phoneNumber };
241
- let resp = await this.post(this.urls.SendLink, JSON.stringify(data));
242
- return resp.sent;
243
- }
244
- async AddLog(error, context) {
245
- try {
246
- let data = {
247
- requestId: TranslationUtils.state.requestId,
248
- action: TranslationUtils.FlowStatus[TranslationUtils.state.flowStatus],
249
- message: JSON.stringify({ error, context }),
250
- };
251
- let result = await this.post(this.urls.AddLog, JSON.stringify(data), false);
252
- return result.saved;
253
- }
254
- catch (_a) { }
255
- }
256
- async AddStep(step, moment) {
257
- let data = { requestId: TranslationUtils.state.requestId, redirectId: TranslationUtils.state.redirectId, step: FlowSteps[step], moment: FlowMoments[moment], timestamp: new Date().toISOString() };
258
- let result = await this.post(this.urls.AddStep, JSON.stringify(data));
259
- return result.saved;
260
- }
261
- async AbortRequest() {
262
- let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: TranslationUtils.state.requestId }));
263
- return result.saved;
264
- }
265
- }
6
+ const TranslationUtils = require('./TranslationUtils-e23d3c71.js');
266
7
 
267
8
  var MobileOS;
268
9
  (function (MobileOS) {
@@ -436,7 +177,7 @@ class BaseComponent {
436
177
  constructor(step) {
437
178
  this.apiErrorEvent = null;
438
179
  this.processError = null;
439
- this.apiCall = new ApiCall();
180
+ this.apiCall = new TranslationUtils.ApiCall();
440
181
  if (step)
441
182
  this.flowStep = step;
442
183
  if (!TranslationUtils.state.device) {
@@ -462,27 +203,27 @@ class BaseComponent {
462
203
  }
463
204
  }
464
205
  async initialize() {
465
- Events.flowEvent(this.flowStep, FlowMoments.Initialized);
206
+ Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Initialized);
466
207
  try {
467
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Initialized);
208
+ await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
468
209
  }
469
210
  catch (e) {
470
211
  if (this.apiErrorEvent)
471
212
  this.apiErrorEvent.emit(e);
472
213
  else
473
- this.processError(e, `${this.flowStep}-${FlowMoments.Initialized}`);
214
+ this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Initialized}`);
474
215
  }
475
216
  }
476
217
  async finalize() {
477
- Events.flowEvent(this.flowStep, FlowMoments.Finalized);
218
+ Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Finalized);
478
219
  try {
479
- await this.apiCall.AddStep(this.flowStep, FlowMoments.Finalized);
220
+ await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
480
221
  }
481
222
  catch (e) {
482
223
  if (this.apiErrorEvent)
483
224
  this.apiErrorEvent.emit(e);
484
225
  else
485
- this.processError(e, `${this.flowStep}-${FlowMoments.Finalized}`);
226
+ this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Finalized}`);
486
227
  }
487
228
  }
488
229
  }
@@ -498,9 +239,9 @@ const AgreementCheck = class {
498
239
  this.htmlContent = undefined;
499
240
  this.buttonEnabled = undefined;
500
241
  this.scrollClass = 'scroll';
501
- this.apiCalls = new ApiCall();
242
+ this.apiCalls = new TranslationUtils.ApiCall();
502
243
  this.buttonEnabled = true;
503
- this.baseComponent = new BaseComponent(FlowSteps.Agreements);
244
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
504
245
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
505
246
  }
506
247
  async componentWillLoad() {
@@ -535,7 +276,7 @@ const AgreementInfo = class {
535
276
  this.termsChecked = undefined;
536
277
  this.openAgreements = undefined;
537
278
  this.openTerms = undefined;
538
- this.baseComponent = new BaseComponent(FlowSteps.Agreements);
279
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
539
280
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
540
281
  this.agreementsChecked = false;
541
282
  this.termsChecked = false;
@@ -5091,7 +4832,7 @@ const CameraError = class {
5091
4832
  this.description = undefined;
5092
4833
  this.buttonDisabled = undefined;
5093
4834
  this.demoVideo = undefined;
5094
- this.baseComponent = new BaseComponent(FlowSteps.CameraError);
4835
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CameraError);
5095
4836
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
5096
4837
  }
5097
4838
  async componentWillLoad() {
@@ -5144,7 +4885,7 @@ const CaptureError = class {
5144
4885
  this.type = undefined;
5145
4886
  this.buttonEnabled = undefined;
5146
4887
  this.buttonText = undefined;
5147
- this.baseComponent = new BaseComponent(FlowSteps.CiError);
4888
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiError);
5148
4889
  }
5149
4890
  async componentWillLoad() {
5150
4891
  this.translations = await TranslationUtils.Translations.getValues();
@@ -5163,7 +4904,7 @@ const CaptureError = class {
5163
4904
  }
5164
4905
  }
5165
4906
  async componentDidLoad() {
5166
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Initialized);
4907
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Initialized);
5167
4908
  for (let i = 5; i >= 1; i--) {
5168
4909
  this.buttonText = i.toString();
5169
4910
  await delay(1000);
@@ -5173,7 +4914,7 @@ const CaptureError = class {
5173
4914
  }
5174
4915
  async buttonClick() {
5175
4916
  this.buttonEnabled = false;
5176
- await this.baseComponent.logStep(FlowSteps.CiError, FlowMoments.Finalized);
4917
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Finalized);
5177
4918
  this.eventCaptureErrorDone.emit();
5178
4919
  }
5179
4920
  render() {
@@ -5241,16 +4982,16 @@ const HowToInfo = class {
5241
4982
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
5242
4983
  this.buttonText = this.translations.HowToValues.IdButton;
5243
4984
  if (this.idSide == 'front') {
5244
- this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
4985
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiFrontHowTo);
5245
4986
  this.subTitle = this.translations.HowToValues.IdSubTitileFace;
5246
4987
  }
5247
4988
  if (this.idSide == 'back') {
5248
- this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
4989
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBackHowTo);
5249
4990
  this.subTitle = this.translations.HowToValues.IdSubTitileBack;
5250
4991
  }
5251
4992
  }
5252
4993
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
5253
- this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
4994
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieHowTo);
5254
4995
  this.topTitle = this.translations.HowToValues.SelfieTitile;
5255
4996
  this.subTitle = this.translations.HowToValues.SelfieSubTitile;
5256
4997
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
@@ -5425,7 +5166,7 @@ const IdBackCapture = class {
5425
5166
  this.verified = false;
5426
5167
  this.cameras = new Cameras();
5427
5168
  this.showDemo = true;
5428
- this.baseComponent = new BaseComponent(FlowSteps.CiBackCapture);
5169
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBackCapture);
5429
5170
  }
5430
5171
  eventVideoStarted(event) {
5431
5172
  this.videoStarted = true;
@@ -5439,7 +5180,7 @@ const IdBackCapture = class {
5439
5180
  }
5440
5181
  }
5441
5182
  async componentDidLoad() {
5442
- await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
5183
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiBackCapture, TranslationUtils.FlowMoments.Initialized);
5443
5184
  this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
5444
5185
  this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
5445
5186
  this.demoVideo.play();
@@ -5494,7 +5235,7 @@ const IdBackCapture = class {
5494
5235
  this.captureTaken = true;
5495
5236
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5496
5237
  this.photoIsReady(res);
5497
- await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Finalized);
5238
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiBackCapture, TranslationUtils.FlowMoments.Finalized);
5498
5239
  }
5499
5240
  render() {
5500
5241
  let cameraStyle;
@@ -5535,7 +5276,7 @@ const IdCapture = class {
5535
5276
  this.verified = false;
5536
5277
  this.cameras = new Cameras();
5537
5278
  this.showDemo = true;
5538
- this.baseComponent = new BaseComponent(FlowSteps.CiFrontCapture);
5279
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiFrontCapture);
5539
5280
  }
5540
5281
  eventVideoStarted(event) {
5541
5282
  this.videoStarted = true;
@@ -5550,7 +5291,7 @@ const IdCapture = class {
5550
5291
  }
5551
5292
  }
5552
5293
  async componentDidLoad() {
5553
- await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
5294
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiFrontCapture, TranslationUtils.FlowMoments.Initialized);
5554
5295
  this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
5555
5296
  this.demoVideo.play();
5556
5297
  await delay(this.translations.GlobalValues.VideoLenght);
@@ -5589,7 +5330,7 @@ const IdCapture = class {
5589
5330
  this.captureTaken = true;
5590
5331
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5591
5332
  this.photoIsReady(res);
5592
- await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Finalized);
5333
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiFrontCapture, TranslationUtils.FlowMoments.Finalized);
5593
5334
  }
5594
5335
  async verificationFinished() {
5595
5336
  if (this.verified)
@@ -5646,7 +5387,7 @@ const IdTilt = class {
5646
5387
  this.verified = false;
5647
5388
  this.cameras = new Cameras();
5648
5389
  this.showDemo = true;
5649
- this.baseComponent = new BaseComponent(FlowSteps.CiTilt);
5390
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiTilt);
5650
5391
  }
5651
5392
  eventVideoStarted(event) {
5652
5393
  this.videoStarted = true;
@@ -5661,7 +5402,7 @@ const IdTilt = class {
5661
5402
  }
5662
5403
  }
5663
5404
  async componentDidLoad() {
5664
- await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Initialized);
5405
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiTilt, TranslationUtils.FlowMoments.Initialized);
5665
5406
  this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
5666
5407
  this.demoVideo.play();
5667
5408
  await delay(this.translations.GlobalValues.VideoLenght);
@@ -5700,7 +5441,7 @@ const IdTilt = class {
5700
5441
  this.captureTaken = true;
5701
5442
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5702
5443
  this.photoIsReady(res);
5703
- await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Finalized);
5444
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiTilt, TranslationUtils.FlowMoments.Finalized);
5704
5445
  }
5705
5446
  async verificationFinished() {
5706
5447
  if (this.verified)
@@ -5800,7 +5541,7 @@ function v4(options, buf, offset) {
5800
5541
  }
5801
5542
 
5802
5543
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5803
- const version$1 = "3.6.29";
5544
+ const version$1 = "3.6.30";
5804
5545
  const description = "Person Identification Component";
5805
5546
  const main = "./dist/index.cjs.js";
5806
5547
  const module$1 = "./dist/index.js";
@@ -5935,12 +5676,12 @@ const IdentificationComponent = class {
5935
5676
  }
5936
5677
  async componentWillLoad() {
5937
5678
  Events.init(window);
5938
- Events.flowEvent(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
5679
+ Events.flowEvent(TranslationUtils.FlowSteps.ComponentLoaded, TranslationUtils.FlowMoments.Initialized);
5939
5680
  TranslationUtils.state.apiBaseUrl = this.api_url;
5940
5681
  if (this.env && this.env != '') {
5941
5682
  TranslationUtils.state.environment = this.env;
5942
5683
  }
5943
- this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
5684
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.ComponentLoaded);
5944
5685
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
5945
5686
  if (TranslationUtils.state.debug)
5946
5687
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
@@ -6052,7 +5793,7 @@ const IdentificationComponent = class {
6052
5793
  ML5.getInstance();
6053
5794
  }
6054
5795
  disconnectedCallback() {
6055
- Events.flowEvent(FlowSteps.ComponentLoaded, FlowMoments.Finalized);
5796
+ Events.flowEvent(TranslationUtils.FlowSteps.ComponentLoaded, TranslationUtils.FlowMoments.Finalized);
6056
5797
  }
6057
5798
  render() {
6058
5799
  let currentBlock = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: loaderSvg })))));
@@ -6115,13 +5856,13 @@ const LandingValidation = class {
6115
5856
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
6116
5857
  this.warningText = undefined;
6117
5858
  this.buttonDisabled = undefined;
6118
- this.baseComponent = new BaseComponent(FlowSteps.Landing);
5859
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Landing);
6119
5860
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
6120
5861
  }
6121
5862
  async componentWillLoad() {
6122
5863
  Events.flowStarted();
6123
5864
  this.translations = await TranslationUtils.Translations.getValues();
6124
- this.baseComponent.apiCall = new ApiCall();
5865
+ this.baseComponent.apiCall = new TranslationUtils.ApiCall();
6125
5866
  this.buttonDisabled = false;
6126
5867
  await this.initRequest();
6127
5868
  }
@@ -9071,7 +8812,7 @@ const MobileRedirect = class {
9071
8812
  this.redirectLink = undefined;
9072
8813
  this.qrCode = undefined;
9073
8814
  this.prefilledPhone = false;
9074
- this.baseComponent = new BaseComponent(FlowSteps.MobileRedirect);
8815
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.MobileRedirect);
9075
8816
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9076
8817
  this.invalidValue = false;
9077
8818
  this.waitingMobile = false;
@@ -9099,25 +8840,25 @@ const MobileRedirect = class {
9099
8840
  await this.baseComponent.initialize();
9100
8841
  await delay(5000);
9101
8842
  await this.checkStatus();
9102
- while (this.orderStatus == OrderStatuses.Capturing || this.orderStatus == OrderStatuses.Waiting) {
8843
+ while (this.orderStatus == TranslationUtils.OrderStatuses.Capturing || this.orderStatus == TranslationUtils.OrderStatuses.Waiting) {
9103
8844
  await this.checkStatus();
9104
8845
  await delay(5000);
9105
8846
  }
9106
8847
  }
9107
8848
  async checkStatus() {
9108
8849
  this.orderStatus = await this.baseComponent.apiCall.GetStatus(TranslationUtils.state.requestId);
9109
- if (this.orderStatus == OrderStatuses.FinishedCapturing) {
8850
+ if (this.orderStatus == TranslationUtils.OrderStatuses.FinishedCapturing) {
9110
8851
  this.waitingMobile = false;
9111
8852
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
9112
8853
  }
9113
- if (this.orderStatus == OrderStatuses.NotFound) {
8854
+ if (this.orderStatus == TranslationUtils.OrderStatuses.NotFound) {
9114
8855
  this.apiErrorEvent.emit({ message: 'No order was started for this process.' });
9115
8856
  }
9116
- if (this.orderStatus == OrderStatuses.Capturing) {
8857
+ if (this.orderStatus == TranslationUtils.OrderStatuses.Capturing) {
9117
8858
  this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
9118
8859
  this.waitingMobile = true;
9119
8860
  }
9120
- if (this.orderStatus == OrderStatuses.Aborted) {
8861
+ if (this.orderStatus == TranslationUtils.OrderStatuses.Aborted) {
9121
8862
  this.waitingMobile = false;
9122
8863
  this.infoTextTop = this.translations.MobileRedirectValues.InfoAborted;
9123
8864
  Events.flowAborted();
@@ -9194,7 +8935,7 @@ const ProcessId = class {
9194
8935
  this.showTimeout = undefined;
9195
8936
  this.showInvalid = undefined;
9196
8937
  this.flow = undefined;
9197
- this.baseComponent = new BaseComponent(FlowSteps.CiBack);
8938
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBack);
9198
8939
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9199
8940
  }
9200
8941
  componentWillLoad() {
@@ -9476,7 +9217,7 @@ const SelfieCapture = class {
9476
9217
  this.cameras = new Cameras();
9477
9218
  this.demoEnded = false;
9478
9219
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
9479
- this.baseComponent = new BaseComponent(FlowSteps.SelfieCapture);
9220
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieCapture);
9480
9221
  }
9481
9222
  eventVideoStarted(event) {
9482
9223
  this.videoStarted = true;
@@ -9494,7 +9235,7 @@ const SelfieCapture = class {
9494
9235
  }
9495
9236
  }
9496
9237
  async componentDidLoad() {
9497
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
9238
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Initialized);
9498
9239
  this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
9499
9240
  this.demoVideo.play();
9500
9241
  await delay(this.translations.GlobalValues.VideoLenght);
@@ -9532,7 +9273,7 @@ const SelfieCapture = class {
9532
9273
  this.captureTaken = true;
9533
9274
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
9534
9275
  this.photoIsReady(res);
9535
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Finalized);
9276
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Finalized);
9536
9277
  }
9537
9278
  verificationFinished() {
9538
9279
  if (this.verified)
@@ -9592,7 +9333,7 @@ const SelfieTilt = class {
9592
9333
  this.cameras = new Cameras();
9593
9334
  this.demoEnded = false;
9594
9335
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
9595
- this.baseComponent = new BaseComponent(FlowSteps.SelfieTilt);
9336
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieTilt);
9596
9337
  }
9597
9338
  eventVideoStarted(event) {
9598
9339
  this.videoStarted = true;
@@ -9611,7 +9352,7 @@ const SelfieTilt = class {
9611
9352
  }
9612
9353
  async componentDidLoad() {
9613
9354
  this.mainStream = Stream.getInstance(VerificationMode.Tilt);
9614
- await this.baseComponent.logStep(FlowSteps.SelfieTilt, FlowMoments.Initialized);
9355
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieTilt, TranslationUtils.FlowMoments.Initialized);
9615
9356
  this.titleMesage = this.translations.SelfieCaptureValues.FacePoseMapping[Object.values(FacePose).indexOf(this.mainStream.facePose)];
9616
9357
  this.demoEnded = false;
9617
9358
  this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
@@ -9650,7 +9391,7 @@ const SelfieTilt = class {
9650
9391
  this.captureTaken = true;
9651
9392
  let res = this.mainStream.takePhoto();
9652
9393
  this.photoIsReady(res);
9653
- await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Finalized);
9394
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Finalized);
9654
9395
  }
9655
9396
  verificationFinished() {
9656
9397
  if (this.verified)
@@ -9698,10 +9439,10 @@ const SmsCodeValidation = class {
9698
9439
  this.prefilledPhone = false;
9699
9440
  this.canSend = false;
9700
9441
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
9701
- this.baseComponent = new BaseComponent(FlowSteps.OtpSend);
9442
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpSend);
9702
9443
  }
9703
9444
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODE) {
9704
- this.baseComponent = new BaseComponent(FlowSteps.OtpCheck);
9445
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpCheck);
9705
9446
  }
9706
9447
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9707
9448
  }
@@ -9796,7 +9537,7 @@ const UserLiveness = class {
9796
9537
  this.showError = undefined;
9797
9538
  this.captureStep = undefined;
9798
9539
  this.flow = undefined;
9799
- this.baseComponent = new BaseComponent(FlowSteps.Selfie);
9540
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Selfie);
9800
9541
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9801
9542
  }
9802
9543
  async componentDidLoad() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const TranslationUtils = require('./TranslationUtils-b918ffb1.js');
6
+ const TranslationUtils = require('./TranslationUtils-e23d3c71.js');
7
7
 
8
8
  const randomActionsCss = "";
9
9
 
@@ -220,4 +220,8 @@ export class ApiCall {
220
220
  let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: store.requestId }));
221
221
  return result.saved;
222
222
  }
223
+ async GetTranslations(langIso) {
224
+ let result = await this.get(this.urls.Translations + '?langIso=' + langIso);
225
+ return result;
226
+ }
223
227
  }