@ekyc_qoobiss/qbs-ect-cmp 3.6.28 → 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.
Files changed (54) hide show
  1. package/dist/cjs/{base-component-aa9e52bf.js → TranslationUtils-e23d3c71.js} +19 -234
  2. package/dist/cjs/agreement-check_19.cjs.entry.js +524 -284
  3. package/dist/cjs/random-actions.cjs.entry.js +5 -6
  4. package/dist/collection/components/base-component.js +0 -4
  5. package/dist/collection/components/common/agreement-check/agreement-check.js +6 -2
  6. package/dist/collection/components/common/camera-error/camera-error.js +7 -5
  7. package/dist/collection/components/common/capture-error/capture-error.js +12 -10
  8. package/dist/collection/components/common/how-to-info/how-to-info.js +11 -9
  9. package/dist/collection/components/common/id-back-capture/id-back-capture.js +8 -6
  10. package/dist/collection/components/common/id-capture/id-capture.js +6 -4
  11. package/dist/collection/components/common/id-tilt/id-tilt.js +6 -4
  12. package/dist/collection/components/common/random-actions/random-actions.js +5 -6
  13. package/dist/collection/components/common/selfie-capture/selfie-capture.js +7 -5
  14. package/dist/collection/components/common/selfie-tilt/selfie-tilt.js +8 -6
  15. package/dist/collection/components/flow/agreement-info/agreement-info.js +4 -2
  16. package/dist/collection/components/flow/end-redirect/end-redirect.js +5 -4
  17. package/dist/collection/components/flow/landing-validation/landing-validation.js +5 -3
  18. package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +8 -6
  19. package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +12 -10
  20. package/dist/collection/helpers/ApiCall.js +4 -0
  21. package/dist/collection/helpers/TranslationUtils.js +15 -7
  22. package/dist/collection/helpers/textValues.js +1 -0
  23. package/dist/esm/{base-component-b7f50d31.js → TranslationUtils-7c1f0f39.js} +19 -233
  24. package/dist/esm/agreement-check_19.entry.js +316 -76
  25. package/dist/esm/random-actions.entry.js +5 -6
  26. package/dist/qbs-ect-cmp/p-16f9efd0.entry.js +1 -0
  27. package/dist/qbs-ect-cmp/p-d82d57ff.js +1 -0
  28. package/dist/qbs-ect-cmp/{p-c32a782a.entry.js → p-fea085b0.entry.js} +2 -2
  29. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  30. package/dist/types/components/base-component.d.ts +0 -2
  31. package/dist/types/components/common/agreement-check/agreement-check.d.ts +2 -0
  32. package/dist/types/components/common/camera-error/camera-error.d.ts +1 -0
  33. package/dist/types/components/common/capture-error/capture-error.d.ts +1 -0
  34. package/dist/types/components/common/how-to-info/how-to-info.d.ts +2 -1
  35. package/dist/types/components/common/id-back-capture/id-back-capture.d.ts +1 -0
  36. package/dist/types/components/common/id-capture/id-capture.d.ts +1 -0
  37. package/dist/types/components/common/id-tilt/id-tilt.d.ts +1 -0
  38. package/dist/types/components/common/random-actions/random-actions.d.ts +2 -2
  39. package/dist/types/components/common/selfie-capture/selfie-capture.d.ts +2 -1
  40. package/dist/types/components/common/selfie-tilt/selfie-tilt.d.ts +2 -1
  41. package/dist/types/components/flow/agreement-info/agreement-info.d.ts +2 -1
  42. package/dist/types/components/flow/end-redirect/end-redirect.d.ts +2 -1
  43. package/dist/types/components/flow/landing-validation/landing-validation.d.ts +1 -0
  44. package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
  45. package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +2 -1
  46. package/dist/types/helpers/ApiCall.d.ts +2 -0
  47. package/dist/types/helpers/TranslationUtils.d.ts +1 -0
  48. package/dist/types/helpers/textValues.d.ts +1 -0
  49. package/package.json +1 -1
  50. package/dist/i18n/en.json +0 -100
  51. package/dist/i18n/ro.json +0 -100
  52. package/dist/i18n/ru.json +0 -100
  53. package/dist/qbs-ect-cmp/p-215a7e76.entry.js +0 -1
  54. package/dist/qbs-ect-cmp/p-7bedffaa.js +0 -1
@@ -3,7 +3,230 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const baseComponent = require('./base-component-aa9e52bf.js');
6
+ const TranslationUtils = require('./TranslationUtils-e23d3c71.js');
7
+
8
+ var MobileOS;
9
+ (function (MobileOS) {
10
+ MobileOS["Android"] = "android";
11
+ MobileOS["iOS"] = "ios";
12
+ MobileOS["Unknown"] = "unknown";
13
+ MobileOS["WindowsPhone"] = "Windows Phone";
14
+ })(MobileOS || (MobileOS = {}));
15
+ var DesktopOS;
16
+ (function (DesktopOS) {
17
+ DesktopOS["Linux"] = "linux";
18
+ DesktopOS["MacOS"] = "mac_os";
19
+ DesktopOS["Unix"] = "unix";
20
+ DesktopOS["Unknown"] = "unknown";
21
+ DesktopOS["Windows"] = "windows";
22
+ })(DesktopOS || (DesktopOS = {}));
23
+ var Browser;
24
+ (function (Browser) {
25
+ Browser["Chrome"] = "chrome";
26
+ Browser["Firefox"] = "firefox";
27
+ Browser["Safari"] = "safari";
28
+ Browser["Mi"] = "mi";
29
+ Browser["Unknown"] = "unknown";
30
+ })(Browser || (Browser = {}));
31
+
32
+ class DeviceDetection {
33
+ constructor() {
34
+ var _a, _b, _c, _d;
35
+ 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;
36
+ this.safariScreenOrientation = !(screen === null || screen === void 0 ? void 0 : screen.orientation) && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
37
+ this.initialScreenOrientation = (_d = (_c = this.supportedScreenOrientation) !== null && _c !== void 0 ? _c : this.safariScreenOrientation) !== null && _d !== void 0 ? _d : 'portrait-primary';
38
+ this.userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
39
+ this.isMobile = this.isMobileDevice();
40
+ this.isTablet = this.isTabletDevice();
41
+ this.isDesktop = !this.isMobile && !this.isTablet;
42
+ }
43
+ // Device typology
44
+ isMobileDevice() {
45
+ const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
46
+ return regexs.some(b => this.userAgent.match(b));
47
+ }
48
+ isTabletDevice() {
49
+ const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
50
+ return regex.test(this.userAgent.toLowerCase());
51
+ }
52
+ // Device Operating System
53
+ getMobileOS() {
54
+ if (this.isMobileDevice()) {
55
+ if (/windows phone/i.test(this.userAgent))
56
+ return MobileOS.WindowsPhone;
57
+ else if (/android/i.test(this.userAgent))
58
+ return MobileOS.Android;
59
+ else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
60
+ return MobileOS.iOS;
61
+ return MobileOS.Unknown;
62
+ }
63
+ else
64
+ return undefined;
65
+ }
66
+ getDesktopOS() {
67
+ if (this.isDesktop) {
68
+ if (this.userAgent.indexOf('Win') !== -1)
69
+ return DesktopOS.Windows;
70
+ else if (this.userAgent.indexOf('Mac') !== -1)
71
+ return DesktopOS.MacOS;
72
+ else if (this.userAgent.indexOf('X11') !== -1)
73
+ return DesktopOS.Unix;
74
+ else if (this.userAgent.indexOf('Linux') !== -1)
75
+ return DesktopOS.Linux;
76
+ return DesktopOS.Unknown;
77
+ }
78
+ else
79
+ return undefined;
80
+ }
81
+ getDeviceOS() {
82
+ var _a;
83
+ return (_a = this.getMobileOS()) !== null && _a !== void 0 ? _a : this.getDesktopOS();
84
+ }
85
+ getBrowser() {
86
+ if (/XiaoMi/i.test(this.userAgent) || /MiuiBrowser/i.test(this.userAgent))
87
+ return Browser.Mi;
88
+ var isChrome = /chrome/i.test(this.userAgent);
89
+ if (isChrome)
90
+ return Browser.Chrome;
91
+ if (/firefox/i.test(navigator.userAgent))
92
+ return Browser.Firefox;
93
+ else if (!isChrome && /safari/i.test(navigator.userAgent))
94
+ return Browser.Safari;
95
+ else
96
+ return Browser.Unknown;
97
+ }
98
+ getDevice() {
99
+ var device = {
100
+ isDesktop: this.isDesktop,
101
+ desktopOS: this.getDesktopOS(),
102
+ isWindowsDesktop: this.getDeviceOS() === DesktopOS.Windows,
103
+ isLinuxOrUnixDesktop: this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix,
104
+ isMobile: this.isMobile,
105
+ mobileOS: this.getMobileOS(),
106
+ isAndroidDevice: this.getDeviceOS() === MobileOS.Android,
107
+ isAppleDevice: this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS,
108
+ isUnknownMobileDevice: this.getDeviceOS() === MobileOS.Unknown,
109
+ browser: this.getBrowser(),
110
+ isTablet: this.isTablet,
111
+ initialScreenOrientation: this.initialScreenOrientation,
112
+ };
113
+ return device;
114
+ }
115
+ }
116
+
117
+ class Events {
118
+ static init(element) {
119
+ this.callingModule = element;
120
+ }
121
+ static flowEvent(step, moment) {
122
+ const eventName = `ect-${step.toString()}-${moment.toString()}-event`;
123
+ this.callingModule.dispatchEvent(new CustomEvent(eventName, {
124
+ detail: {},
125
+ bubbles: true,
126
+ cancelable: true,
127
+ composed: true,
128
+ }));
129
+ }
130
+ static flowStarted() {
131
+ this.callingModule.dispatchEvent(new CustomEvent('ect-started', {
132
+ detail: {},
133
+ bubbles: true,
134
+ cancelable: true,
135
+ composed: true,
136
+ }));
137
+ }
138
+ static flowAborted() {
139
+ sessionStorage.clear();
140
+ this.callingModule.dispatchEvent(new CustomEvent('ect-aborted', {
141
+ detail: {},
142
+ bubbles: true,
143
+ cancelable: true,
144
+ composed: true,
145
+ }));
146
+ }
147
+ static flowCompleted() {
148
+ sessionStorage.clear();
149
+ this.callingModule.dispatchEvent(new CustomEvent('ect-completed', {
150
+ detail: {},
151
+ bubbles: true,
152
+ cancelable: true,
153
+ composed: true,
154
+ }));
155
+ }
156
+ static flowError(error) {
157
+ sessionStorage.clear();
158
+ this.callingModule.dispatchEvent(new CustomEvent('ect-error', {
159
+ detail: { error },
160
+ bubbles: true,
161
+ cancelable: true,
162
+ composed: true,
163
+ }));
164
+ }
165
+ static tokenExpired() {
166
+ sessionStorage.clear();
167
+ this.callingModule.dispatchEvent(new CustomEvent('ect-session-expired', {
168
+ detail: {},
169
+ bubbles: true,
170
+ cancelable: true,
171
+ composed: true,
172
+ }));
173
+ }
174
+ }
175
+
176
+ class BaseComponent {
177
+ constructor(step) {
178
+ this.apiErrorEvent = null;
179
+ this.processError = null;
180
+ this.apiCall = new TranslationUtils.ApiCall();
181
+ if (step)
182
+ this.flowStep = step;
183
+ if (!TranslationUtils.state.device) {
184
+ TranslationUtils.state.device = new DeviceDetection().getDevice();
185
+ }
186
+ }
187
+ setEventEmitter(event) {
188
+ this.apiErrorEvent = event;
189
+ }
190
+ setErrorCallback(callback) {
191
+ this.processError = callback;
192
+ }
193
+ async logStep(step, moment) {
194
+ Events.flowEvent(step, moment);
195
+ try {
196
+ await this.apiCall.AddStep(step, moment);
197
+ }
198
+ catch (e) {
199
+ if (this.apiErrorEvent)
200
+ this.apiErrorEvent.emit(e);
201
+ else
202
+ this.processError(e, `${step}-${moment}`);
203
+ }
204
+ }
205
+ async initialize() {
206
+ Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Initialized);
207
+ try {
208
+ await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
209
+ }
210
+ catch (e) {
211
+ if (this.apiErrorEvent)
212
+ this.apiErrorEvent.emit(e);
213
+ else
214
+ this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Initialized}`);
215
+ }
216
+ }
217
+ async finalize() {
218
+ Events.flowEvent(this.flowStep, TranslationUtils.FlowMoments.Finalized);
219
+ try {
220
+ await this.apiCall.AddStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
221
+ }
222
+ catch (e) {
223
+ if (this.apiErrorEvent)
224
+ this.apiErrorEvent.emit(e);
225
+ else
226
+ this.processError(e, `${this.flowStep}-${TranslationUtils.FlowMoments.Finalized}`);
227
+ }
228
+ }
229
+ }
7
230
 
8
231
  const agreementCheckCss = "";
9
232
 
@@ -16,11 +239,14 @@ const AgreementCheck = class {
16
239
  this.htmlContent = undefined;
17
240
  this.buttonEnabled = undefined;
18
241
  this.scrollClass = 'scroll';
19
- this.apiCalls = new baseComponent.ApiCall();
242
+ this.apiCalls = new TranslationUtils.ApiCall();
20
243
  this.buttonEnabled = true;
21
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CameraError);
244
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
22
245
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
23
246
  }
247
+ async componentWillLoad() {
248
+ this.translations = await TranslationUtils.Translations.getValues();
249
+ }
24
250
  async componentDidLoad() {
25
251
  try {
26
252
  this.htmlContent = await this.apiCalls.GetAgreement(this.agreementType);
@@ -34,7 +260,7 @@ const AgreementCheck = class {
34
260
  this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
35
261
  }
36
262
  render() {
37
- let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.baseComponent.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.baseComponent.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
263
+ let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: this.scrollClass, innerHTML: this.htmlContent }), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("div", { class: "d-flex two-buttons" }, index.h("button", { class: "normal-button red-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(false) }, this.translations.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, this.translations.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
38
264
  return this.htmlContent ? content : index.h("div", null);
39
265
  }
40
266
  };
@@ -50,7 +276,7 @@ const AgreementInfo = class {
50
276
  this.termsChecked = undefined;
51
277
  this.openAgreements = undefined;
52
278
  this.openTerms = undefined;
53
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Agreements);
279
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Agreements);
54
280
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
55
281
  this.agreementsChecked = false;
56
282
  this.termsChecked = false;
@@ -58,7 +284,8 @@ const AgreementInfo = class {
58
284
  async componentDidLoad() {
59
285
  await this.baseComponent.initialize();
60
286
  }
61
- componentWillLoad() {
287
+ async componentWillLoad() {
288
+ this.translations = await TranslationUtils.Translations.getValues();
62
289
  this.openAgreements = false;
63
290
  this.openTerms = false;
64
291
  }
@@ -67,11 +294,11 @@ const AgreementInfo = class {
67
294
  }
68
295
  async buttonClick() {
69
296
  if (this.agreementsChecked && this.termsChecked) {
70
- if (baseComponent.state.phoneValidation) {
71
- baseComponent.state.flowStatus = baseComponent.FlowStatus.PHONE;
297
+ if (TranslationUtils.state.phoneValidation) {
298
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.PHONE;
72
299
  }
73
300
  else {
74
- baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
301
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.ID;
75
302
  }
76
303
  }
77
304
  }
@@ -94,7 +321,7 @@ const AgreementInfo = class {
94
321
  render() {
95
322
  let agreementsCheck = index.h("agreement-check", { agreementType: "agreement" });
96
323
  let termsCheck = index.h("agreement-check", { agreementType: "terms" });
97
- let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.AgreementInfoValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), this.baseComponent.translations.AgreementInfoValues.Agreement)), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), this.baseComponent.translations.AgreementInfoValues.Terms))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.baseComponent.translations.AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
324
+ let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.translations.AgreementInfoValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), this.translations.AgreementInfoValues.Agreement)), index.h("div", { class: "d-flex space-between align-center" }, index.h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, index.h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), this.translations.AgreementInfoValues.Terms))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.translations.AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
98
325
  return this.openAgreements ? agreementsCheck : this.openTerms ? termsCheck : mainComp;
99
326
  }
100
327
  };
@@ -1402,7 +1629,7 @@ class ML5 {
1402
1629
  }
1403
1630
  async init() {
1404
1631
  return new Promise(async (resolve) => {
1405
- const modelPath = baseComponent.state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
1632
+ const modelPath = TranslationUtils.state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
1406
1633
  this.classifier = await ml5.imageClassifier(modelPath, this.loaded);
1407
1634
  this.faceapi = await ml5.faceApi({ withLandmarks: true, withDescriptors: false }, this.loaded);
1408
1635
  //warmup
@@ -1414,13 +1641,13 @@ class ML5 {
1414
1641
  });
1415
1642
  }
1416
1643
  loaded() {
1417
- if (baseComponent.state.debug)
1644
+ if (TranslationUtils.state.debug)
1418
1645
  console.log('ML5 LOADED!!!');
1419
1646
  }
1420
1647
  gotResults(error, results) {
1421
- if (baseComponent.state.debug)
1648
+ if (TranslationUtils.state.debug)
1422
1649
  console.log(error);
1423
- if (baseComponent.state.debug)
1650
+ if (TranslationUtils.state.debug)
1424
1651
  console.log(results);
1425
1652
  }
1426
1653
  }
@@ -1439,8 +1666,8 @@ const blobToBase64 = (blob) => {
1439
1666
  const delay = ms => new Promise(res => setTimeout(res, ms));
1440
1667
  const getLogMessage = (param_req_id = '', param_redirect_id = '', param_token = '') => {
1441
1668
  return {
1442
- store_values: { request_id: baseComponent.state.requestId, redirect_id: baseComponent.state.redirectId, token: baseComponent.state.token },
1443
- session_values: { request_id: sessionStorage.getItem(baseComponent.SessionKeys.RequestIdKey), token: sessionStorage.getItem(baseComponent.SessionKeys.TokenKey) },
1669
+ store_values: { request_id: TranslationUtils.state.requestId, redirect_id: TranslationUtils.state.redirectId, token: TranslationUtils.state.token },
1670
+ session_values: { request_id: sessionStorage.getItem(TranslationUtils.SessionKeys.RequestIdKey), token: sessionStorage.getItem(TranslationUtils.SessionKeys.TokenKey) },
1444
1671
  parameter_values: { request_id: param_req_id, redirect_id: param_redirect_id, token: param_token },
1445
1672
  };
1446
1673
  };
@@ -1784,7 +2011,7 @@ class FaceML5Detector {
1784
2011
  if (this.frontFace == null) {
1785
2012
  this.frontFace = face;
1786
2013
  // await this.drawFrame('green');
1787
- if (baseComponent.state.debug)
2014
+ if (TranslationUtils.state.debug)
1788
2015
  console.log('face ok');
1789
2016
  }
1790
2017
  else if (this.frontFace != null && this.presentedFacePose == null) {
@@ -4331,8 +4558,8 @@ class Stream {
4331
4558
  // if (this.faceDetection) Detector.getInstance().stopDetector();
4332
4559
  };
4333
4560
  this.initFacePose();
4334
- this.idML5Detector = IDML5Detector.getInstance(this, baseComponent.state.device.isMobile);
4335
- this.faceML5Detector = FaceML5Detector.getInstance(this, baseComponent.state.device.isMobile);
4561
+ this.idML5Detector = IDML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
4562
+ this.faceML5Detector = FaceML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
4336
4563
  this.verificationMode = mode;
4337
4564
  }
4338
4565
  static getInstance(mode) {
@@ -4403,7 +4630,7 @@ class Stream {
4403
4630
  return;
4404
4631
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
4405
4632
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
4406
- if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS || baseComponent.state.device.browser == baseComponent.Browser.Safari)
4633
+ if (TranslationUtils.state.device.mobileOS == MobileOS.iOS || TranslationUtils.state.device.browser == Browser.Safari)
4407
4634
  options.mimeType = Stream.mp4MimeType.mime;
4408
4635
  }
4409
4636
  this.recordedChunks = [];
@@ -4454,7 +4681,7 @@ class Stream {
4454
4681
  const context = canvas.getContext('2d');
4455
4682
  context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
4456
4683
  canvas.toBlob((frame) => {
4457
- if (frame.type === ImageFormat.JPEG && !baseComponent.state.device.isAppleDevice) {
4684
+ if (frame.type === ImageFormat.JPEG && !TranslationUtils.state.device.isAppleDevice) {
4458
4685
  try {
4459
4686
  addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
4460
4687
  }
@@ -4558,7 +4785,7 @@ const Camera = class {
4558
4785
  render() {
4559
4786
  let cameraVideoClass = 'cameraVideo';
4560
4787
  let cameraCanvasClass = 'cameraCanvas';
4561
- if (baseComponent.state.device.isDesktop) {
4788
+ if (TranslationUtils.state.device.isDesktop) {
4562
4789
  cameraVideoClass = 'cameraVideoSelfieDesk';
4563
4790
  cameraCanvasClass = 'cameraCanvasSelfieDesk';
4564
4791
  }
@@ -4605,27 +4832,28 @@ const CameraError = class {
4605
4832
  this.description = undefined;
4606
4833
  this.buttonDisabled = undefined;
4607
4834
  this.demoVideo = undefined;
4608
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CameraError);
4835
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CameraError);
4609
4836
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
4610
4837
  }
4611
4838
  async componentWillLoad() {
4839
+ this.translations = await TranslationUtils.Translations.getValues();
4612
4840
  this.buttonDisabled = false;
4613
- this.title = this.baseComponent.translations.CameraErrorValues.Title;
4614
- this.description = this.baseComponent.translations.CameraErrorValues.Description;
4615
- this.buttonText = this.baseComponent.translations.CameraErrorValues.Button;
4841
+ this.title = this.translations.CameraErrorValues.Title;
4842
+ this.description = this.translations.CameraErrorValues.Description;
4843
+ this.buttonText = this.translations.CameraErrorValues.Button;
4616
4844
  }
4617
4845
  async componentDidLoad() {
4618
4846
  await this.baseComponent.initialize();
4619
- if (baseComponent.state.device.mobileOS != baseComponent.MobileOS.iOS) {
4620
- this.demoVideo.src = this.baseComponent.translations.CameraErrorValues.HowToLink;
4847
+ if (TranslationUtils.state.device.mobileOS != MobileOS.iOS) {
4848
+ this.demoVideo.src = this.translations.CameraErrorValues.HowToLink;
4621
4849
  this.demoVideo.loop = true;
4622
4850
  this.demoVideo.play();
4623
4851
  }
4624
4852
  else {
4625
- var loaded = sessionStorage.getItem(baseComponent.SessionKeys.RefreshDoneKey);
4853
+ var loaded = sessionStorage.getItem(TranslationUtils.SessionKeys.RefreshDoneKey);
4626
4854
  if (loaded === 'true') {
4627
- sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'false');
4628
- baseComponent.state.flowStatus = baseComponent.FlowStatus.LANDING;
4855
+ sessionStorage.setItem(TranslationUtils.SessionKeys.RefreshDoneKey, 'false');
4856
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.LANDING;
4629
4857
  }
4630
4858
  }
4631
4859
  }
@@ -4634,16 +4862,16 @@ const CameraError = class {
4634
4862
  }
4635
4863
  async buttonClick() {
4636
4864
  this.buttonDisabled = true;
4637
- if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS) {
4638
- sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'true');
4865
+ if (TranslationUtils.state.device.mobileOS == MobileOS.iOS) {
4866
+ sessionStorage.setItem(TranslationUtils.SessionKeys.RefreshDoneKey, 'true');
4639
4867
  window.location.reload();
4640
4868
  }
4641
4869
  else {
4642
- baseComponent.state.flowStatus = baseComponent.FlowStatus.LANDING;
4870
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.LANDING;
4643
4871
  }
4644
4872
  }
4645
4873
  render() {
4646
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.title), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), index.h("div", { hidden: baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS }, index.h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
4874
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.title), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.description)), index.h("div", { hidden: TranslationUtils.state.device.mobileOS == MobileOS.iOS }, index.h("video", { id: "howtoPermissions", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: this.buttonDisabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4647
4875
  }
4648
4876
  };
4649
4877
  CameraError.style = cameraErrorCss;
@@ -4657,39 +4885,40 @@ const CaptureError = class {
4657
4885
  this.type = undefined;
4658
4886
  this.buttonEnabled = undefined;
4659
4887
  this.buttonText = undefined;
4660
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiError);
4888
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiError);
4661
4889
  }
4662
4890
  async componentWillLoad() {
4891
+ this.translations = await TranslationUtils.Translations.getValues();
4663
4892
  this.buttonEnabled = false;
4664
4893
  if (this.type == 'ID') {
4665
- this.titleR1 = this.baseComponent.translations.IdCaptureValues.ErrorTitleR1;
4666
- this.titleR2 = this.baseComponent.translations.IdCaptureValues.ErrorTitleR2;
4667
- this.descriptionR1 = this.baseComponent.translations.IdCaptureValues.ErrorR1;
4668
- this.descriptionR2 = this.baseComponent.translations.IdCaptureValues.ErrorR2;
4894
+ this.titleR1 = this.translations.IdCaptureValues.ErrorTitleR1;
4895
+ this.titleR2 = this.translations.IdCaptureValues.ErrorTitleR2;
4896
+ this.descriptionR1 = this.translations.IdCaptureValues.ErrorR1;
4897
+ this.descriptionR2 = this.translations.IdCaptureValues.ErrorR2;
4669
4898
  }
4670
4899
  if (this.type == 'LIVENESS') {
4671
- this.titleR1 = this.baseComponent.translations.SelfieCaptureValues.ErrorTitleR1;
4672
- this.titleR2 = this.baseComponent.translations.SelfieCaptureValues.ErrorTitleR2;
4673
- this.descriptionR1 = this.baseComponent.translations.SelfieCaptureValues.ErrorR1;
4674
- this.descriptionR2 = this.baseComponent.translations.SelfieCaptureValues.ErrorR2;
4900
+ this.titleR1 = this.translations.SelfieCaptureValues.ErrorTitleR1;
4901
+ this.titleR2 = this.translations.SelfieCaptureValues.ErrorTitleR2;
4902
+ this.descriptionR1 = this.translations.SelfieCaptureValues.ErrorR1;
4903
+ this.descriptionR2 = this.translations.SelfieCaptureValues.ErrorR2;
4675
4904
  }
4676
4905
  }
4677
4906
  async componentDidLoad() {
4678
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiError, baseComponent.FlowMoments.Initialized);
4907
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Initialized);
4679
4908
  for (let i = 5; i >= 1; i--) {
4680
4909
  this.buttonText = i.toString();
4681
4910
  await delay(1000);
4682
4911
  }
4683
- this.buttonText = this.baseComponent.translations.IdCaptureValues.Button;
4912
+ this.buttonText = this.translations.IdCaptureValues.Button;
4684
4913
  this.buttonEnabled = true;
4685
4914
  }
4686
4915
  async buttonClick() {
4687
4916
  this.buttonEnabled = false;
4688
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiError, baseComponent.FlowMoments.Finalized);
4917
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiError, TranslationUtils.FlowMoments.Finalized);
4689
4918
  this.eventCaptureErrorDone.emit();
4690
4919
  }
4691
4920
  render() {
4692
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
4921
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4693
4922
  }
4694
4923
  };
4695
4924
  CaptureError.style = captureErrorCss;
@@ -4702,13 +4931,15 @@ const EndRedirect = class {
4702
4931
  constructor(hostRef) {
4703
4932
  index.registerInstance(this, hostRef);
4704
4933
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
4705
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.End);
4934
+ }
4935
+ async componentWillLoad() {
4936
+ this.translations = await TranslationUtils.Translations.getValues();
4706
4937
  }
4707
4938
  async componentDidLoad() {
4708
- baseComponent.Events.flowCompleted();
4939
+ Events.flowCompleted();
4709
4940
  }
4710
4941
  render() {
4711
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, this.baseComponent.translations.CompleteValues.Description)), index.h("div", { class: "buletin-container" }, index.h("div", { class: "container-coin" }, index.h("div", { class: "coin-scale" }, index.h("div", { class: "coin-flip" }, index.h("img", { class: "w-40 coin", src: completeSvg }))))), index.h("div", { class: "text-center" }, index.h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, this.baseComponent.translations.CompleteValues.Message), index.h("p", null, baseComponent.state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
4942
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.translations.CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, this.translations.CompleteValues.Description)), index.h("div", { class: "buletin-container" }, index.h("div", { class: "container-coin" }, index.h("div", { class: "coin-scale" }, index.h("div", { class: "coin-flip" }, index.h("img", { class: "w-40 coin", src: completeSvg }))))), index.h("div", { class: "text-center" }, index.h("p", { class: "font-weight-900 font-size-3 color-black-2 text-center mt-20" }, this.translations.CompleteValues.Message), index.h("p", null, TranslationUtils.state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, this.translations.GlobalValues.FooterText)))));
4712
4943
  }
4713
4944
  };
4714
4945
  EndRedirect.style = endRedirectCss;
@@ -4723,7 +4954,7 @@ const ErrorEnd = class {
4723
4954
  }
4724
4955
  componentDidLoad() { }
4725
4956
  render() {
4726
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "text-center" }, index.h("h1", null, this.errorTitle)), index.h("div", { class: "text-center" }, index.h("p", null, baseComponent.state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
4957
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "text-center" }, index.h("h1", null, this.errorTitle)), index.h("div", { class: "text-center" }, index.h("p", null, TranslationUtils.state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
4727
4958
  }
4728
4959
  };
4729
4960
  ErrorEnd.style = errorEndCss;
@@ -4742,34 +4973,35 @@ const HowToInfo = class {
4742
4973
  this.buttonEnabled = false;
4743
4974
  this.eventHowToInfoDone.emit();
4744
4975
  }
4745
- componentWillLoad() {
4976
+ async componentWillLoad() {
4977
+ this.translations = await TranslationUtils.Translations.getValues();
4746
4978
  this.subTitle = '';
4747
4979
  this.buttonEnabled = true;
4748
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ID) {
4749
- this.topTitle = this.baseComponent.translations.HowToValues.IdTitile;
4980
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.ID) {
4981
+ this.topTitle = this.translations.HowToValues.IdTitile;
4750
4982
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
4751
- this.buttonText = this.baseComponent.translations.HowToValues.IdButton;
4983
+ this.buttonText = this.translations.HowToValues.IdButton;
4752
4984
  if (this.idSide == 'front') {
4753
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiFrontHowTo);
4754
- this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileFace;
4985
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiFrontHowTo);
4986
+ this.subTitle = this.translations.HowToValues.IdSubTitileFace;
4755
4987
  }
4756
4988
  if (this.idSide == 'back') {
4757
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBackHowTo);
4758
- this.subTitle = this.baseComponent.translations.HowToValues.IdSubTitileBack;
4989
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBackHowTo);
4990
+ this.subTitle = this.translations.HowToValues.IdSubTitileBack;
4759
4991
  }
4760
4992
  }
4761
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LIVENESS) {
4762
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieHowTo);
4763
- this.topTitle = this.baseComponent.translations.HowToValues.SelfieTitile;
4764
- this.subTitle = this.baseComponent.translations.HowToValues.SelfieSubTitile;
4993
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
4994
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieHowTo);
4995
+ this.topTitle = this.translations.HowToValues.SelfieTitile;
4996
+ this.subTitle = this.translations.HowToValues.SelfieSubTitile;
4765
4997
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
4766
- this.buttonText = this.baseComponent.translations.HowToValues.SelfieButton;
4998
+ this.buttonText = this.translations.HowToValues.SelfieButton;
4767
4999
  }
4768
5000
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
4769
5001
  }
4770
5002
  render() {
4771
5003
  let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
4772
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: this.imagePath })), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), sub), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
5004
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: this.imagePath })), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), sub), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4773
5005
  }
4774
5006
  };
4775
5007
  HowToInfo.style = howToInfoCss;
@@ -4784,7 +5016,7 @@ class Cameras {
4784
5016
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
4785
5017
  stream.getVideoTracks().forEach(track => {
4786
5018
  var _a, _b;
4787
- if (deviceInfo.browser === baseComponent.Browser.Firefox) {
5019
+ if (deviceInfo.browser === Browser.Firefox) {
4788
5020
  const settings = track.getSettings();
4789
5021
  let facingMode = settings.facingMode && settings.facingMode.length > 0 ? settings.facingMode[0] : '';
4790
5022
  facingMode = facingMode === 'e' ? 'environment' : facingMode;
@@ -4888,8 +5120,8 @@ class Cameras {
4888
5120
  let cam = new Cameras();
4889
5121
  let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
4890
5122
  var recommCamera = cam.GetRecommendedCamera(cameras);
4891
- baseComponent.state.cameraIds = cameras.map(camera => camera.deviceId);
4892
- baseComponent.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
5123
+ TranslationUtils.state.cameraIds = cameras.map(camera => camera.deviceId);
5124
+ TranslationUtils.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
4893
5125
  return true;
4894
5126
  }
4895
5127
  catch (e) {
@@ -4934,33 +5166,34 @@ const IdBackCapture = class {
4934
5166
  this.verified = false;
4935
5167
  this.cameras = new Cameras();
4936
5168
  this.showDemo = true;
4937
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBackCapture);
5169
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBackCapture);
4938
5170
  }
4939
5171
  eventVideoStarted(event) {
4940
5172
  this.videoStarted = true;
4941
5173
  this.cameraSize = event.detail;
4942
5174
  }
4943
5175
  async componentWillLoad() {
5176
+ this.translations = await TranslationUtils.Translations.getValues();
4944
5177
  //this.videoDemoStyle = this.device.isMobile ? { width: window.screen.width + 'px', height: window.screen.height + 'px', 'object-fit': 'fill' } : {};
4945
5178
  if (!navigator.mediaDevices) {
4946
5179
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
4947
5180
  }
4948
5181
  }
4949
5182
  async componentDidLoad() {
4950
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiBackCapture, baseComponent.FlowMoments.Initialized);
4951
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.TtileRotate;
4952
- this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
5183
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiBackCapture, TranslationUtils.FlowMoments.Initialized);
5184
+ this.titleMesage = this.translations.IdCaptureValues.TtileRotate;
5185
+ this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
4953
5186
  this.demoVideo.play();
4954
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
4955
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.TitleBack;
4956
- this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
5187
+ await delay(this.translations.GlobalValues.VideoLenght);
5188
+ this.titleMesage = this.translations.IdCaptureValues.TitleBack;
5189
+ this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
4957
5190
  this.demoVideo.play();
4958
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5191
+ await delay(this.translations.GlobalValues.VideoLenght);
4959
5192
  this.showDemo = false;
4960
5193
  this.openCamera();
4961
5194
  }
4962
5195
  async openCamera() {
4963
- const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5196
+ const constraints = this.cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
4964
5197
  setTimeout(() => {
4965
5198
  navigator.mediaDevices
4966
5199
  .getUserMedia(constraints)
@@ -4989,7 +5222,7 @@ const IdBackCapture = class {
4989
5222
  if (this.verified)
4990
5223
  return;
4991
5224
  this.verified = true;
4992
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5225
+ this.titleMesage = this.translations.IdCaptureValues.Loading;
4993
5226
  this.closeCamera();
4994
5227
  this.showDemo = true;
4995
5228
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5002,7 +5235,7 @@ const IdBackCapture = class {
5002
5235
  this.captureTaken = true;
5003
5236
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5004
5237
  this.photoIsReady(res);
5005
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiBackCapture, baseComponent.FlowMoments.Finalized);
5238
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiBackCapture, TranslationUtils.FlowMoments.Finalized);
5006
5239
  }
5007
5240
  render() {
5008
5241
  let cameraStyle;
@@ -5014,7 +5247,7 @@ const IdBackCapture = class {
5014
5247
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5015
5248
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5016
5249
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5017
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5250
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoBack", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
5018
5251
  }
5019
5252
  get component() { return index.getElement(this); }
5020
5253
  };
@@ -5043,29 +5276,30 @@ const IdCapture = class {
5043
5276
  this.verified = false;
5044
5277
  this.cameras = new Cameras();
5045
5278
  this.showDemo = true;
5046
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiFrontCapture);
5279
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiFrontCapture);
5047
5280
  }
5048
5281
  eventVideoStarted(event) {
5049
5282
  this.videoStarted = true;
5050
5283
  this.cameraSize = event.detail;
5051
5284
  }
5052
5285
  async componentWillLoad() {
5053
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Title;
5286
+ this.translations = await TranslationUtils.Translations.getValues();
5287
+ this.titleMesage = this.translations.IdCaptureValues.Title;
5054
5288
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
5055
5289
  if (!navigator.mediaDevices) {
5056
5290
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5057
5291
  }
5058
5292
  }
5059
5293
  async componentDidLoad() {
5060
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiFrontCapture, baseComponent.FlowMoments.Initialized);
5061
- this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
5294
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiFrontCapture, TranslationUtils.FlowMoments.Initialized);
5295
+ this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
5062
5296
  this.demoVideo.play();
5063
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5297
+ await delay(this.translations.GlobalValues.VideoLenght);
5064
5298
  this.showDemo = false;
5065
5299
  this.openCamera();
5066
5300
  }
5067
5301
  async openCamera() {
5068
- const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5302
+ const constraints = this.cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
5069
5303
  setTimeout(() => {
5070
5304
  navigator.mediaDevices
5071
5305
  .getUserMedia(constraints)
@@ -5096,13 +5330,13 @@ const IdCapture = class {
5096
5330
  this.captureTaken = true;
5097
5331
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5098
5332
  this.photoIsReady(res);
5099
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiFrontCapture, baseComponent.FlowMoments.Finalized);
5333
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiFrontCapture, TranslationUtils.FlowMoments.Finalized);
5100
5334
  }
5101
5335
  async verificationFinished() {
5102
5336
  if (this.verified)
5103
5337
  return;
5104
5338
  this.verified = true;
5105
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5339
+ this.titleMesage = this.translations.IdCaptureValues.Loading;
5106
5340
  this.closeCamera();
5107
5341
  this.showDemo = true;
5108
5342
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5124,7 +5358,7 @@ const IdCapture = class {
5124
5358
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5125
5359
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5126
5360
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5127
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5361
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "id" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
5128
5362
  }
5129
5363
  get component() { return index.getElement(this); }
5130
5364
  };
@@ -5153,29 +5387,30 @@ const IdTilt = class {
5153
5387
  this.verified = false;
5154
5388
  this.cameras = new Cameras();
5155
5389
  this.showDemo = true;
5156
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiTilt);
5390
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiTilt);
5157
5391
  }
5158
5392
  eventVideoStarted(event) {
5159
5393
  this.videoStarted = true;
5160
5394
  this.cameraSize = event.detail;
5161
5395
  }
5162
5396
  async componentWillLoad() {
5163
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.IDPoseMapping;
5397
+ this.translations = await TranslationUtils.Translations.getValues();
5398
+ this.titleMesage = this.translations.IdCaptureValues.IDPoseMapping;
5164
5399
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
5165
5400
  if (!navigator.mediaDevices) {
5166
5401
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
5167
5402
  }
5168
5403
  }
5169
5404
  async componentDidLoad() {
5170
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiTilt, baseComponent.FlowMoments.Initialized);
5171
- this.demoVideo.src = baseComponent.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
5405
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiTilt, TranslationUtils.FlowMoments.Initialized);
5406
+ this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
5172
5407
  this.demoVideo.play();
5173
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
5408
+ await delay(this.translations.GlobalValues.VideoLenght);
5174
5409
  this.showDemo = false;
5175
5410
  this.openCamera();
5176
5411
  }
5177
5412
  async openCamera() {
5178
- const constraints = this.cameras.GetConstraints(baseComponent.state.cameraId, baseComponent.state.device);
5413
+ const constraints = this.cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
5179
5414
  setTimeout(() => {
5180
5415
  navigator.mediaDevices
5181
5416
  .getUserMedia(constraints)
@@ -5206,13 +5441,13 @@ const IdTilt = class {
5206
5441
  this.captureTaken = true;
5207
5442
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
5208
5443
  this.photoIsReady(res);
5209
- await this.baseComponent.logStep(baseComponent.FlowSteps.CiTilt, baseComponent.FlowMoments.Finalized);
5444
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.CiTilt, TranslationUtils.FlowMoments.Finalized);
5210
5445
  }
5211
5446
  async verificationFinished() {
5212
5447
  if (this.verified)
5213
5448
  return;
5214
5449
  this.verified = true;
5215
- this.titleMesage = this.baseComponent.translations.IdCaptureValues.Loading;
5450
+ this.titleMesage = this.translations.IdCaptureValues.Loading;
5216
5451
  this.closeCamera();
5217
5452
  this.showDemo = true;
5218
5453
  this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
@@ -5234,7 +5469,7 @@ const IdTilt = class {
5234
5469
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
5235
5470
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
5236
5471
  let bgDemo = this.verified ? 'container' : 'container bg-black';
5237
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "tilt" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
5472
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.showDemo == false }, index.h("video", { id: "howtoFront", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.showDemo }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("div", { style: cameraStyleInner }, index.h("camera-comp", { "capture-mode": "tilt" })))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
5238
5473
  }
5239
5474
  get component() { return index.getElement(this); }
5240
5475
  };
@@ -5306,7 +5541,7 @@ function v4(options, buf, offset) {
5306
5541
  }
5307
5542
 
5308
5543
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5309
- const version$1 = "3.6.28";
5544
+ const version$1 = "3.6.30";
5310
5545
  const description = "Person Identification Component";
5311
5546
  const main = "./dist/index.cjs.js";
5312
5547
  const module$1 = "./dist/index.js";
@@ -5380,14 +5615,14 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
5380
5615
 
5381
5616
  const IdentificationComponent = class {
5382
5617
  async onTokenChange(newValue, _oldValue) {
5383
- if (baseComponent.state.debug)
5618
+ if (TranslationUtils.state.debug)
5384
5619
  console.log('Token change called with value: ' + newValue);
5385
5620
  if (newValue == '') {
5386
- newValue = baseComponent.state.token;
5621
+ newValue = TranslationUtils.state.token;
5387
5622
  return;
5388
5623
  }
5389
- if (baseComponent.state.token !== newValue) {
5390
- baseComponent.state.token = newValue;
5624
+ if (TranslationUtils.state.token !== newValue) {
5625
+ TranslationUtils.state.token = newValue;
5391
5626
  }
5392
5627
  }
5393
5628
  agreementAcceptanceEmitted(data) {
@@ -5419,15 +5654,15 @@ const IdentificationComponent = class {
5419
5654
  await this.baseComponent.apiCall.AddLog(apiLogData, getLogMessage(this.order_id, this.redirect_id, this.token));
5420
5655
  }
5421
5656
  catch (_g) { }
5422
- baseComponent.Events.flowError(this.errorTitle);
5423
- baseComponent.state.flowStatus = baseComponent.FlowStatus.ERROREND;
5657
+ Events.flowError(this.errorTitle);
5658
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.ERROREND;
5424
5659
  }
5425
5660
  handleScroll(ev) {
5426
5661
  }
5427
5662
  constructor(hostRef) {
5428
5663
  index.registerInstance(this, hostRef);
5429
5664
  this.logInit = {};
5430
- this.flowStatusToSet = baseComponent.FlowStatus.NONE;
5665
+ this.flowStatusToSet = TranslationUtils.FlowStatus.NONE;
5431
5666
  this.token = undefined;
5432
5667
  this.order_id = undefined;
5433
5668
  this.api_url = undefined;
@@ -5440,161 +5675,161 @@ const IdentificationComponent = class {
5440
5675
  this.errorTitle = undefined;
5441
5676
  }
5442
5677
  async componentWillLoad() {
5443
- baseComponent.Events.init(window);
5444
- baseComponent.Events.flowEvent(baseComponent.FlowSteps.ComponentLoaded, baseComponent.FlowMoments.Initialized);
5445
- baseComponent.state.apiBaseUrl = this.api_url;
5678
+ Events.init(window);
5679
+ Events.flowEvent(TranslationUtils.FlowSteps.ComponentLoaded, TranslationUtils.FlowMoments.Initialized);
5680
+ TranslationUtils.state.apiBaseUrl = this.api_url;
5446
5681
  if (this.env && this.env != '') {
5447
- baseComponent.state.environment = this.env;
5682
+ TranslationUtils.state.environment = this.env;
5448
5683
  }
5449
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.ComponentLoaded);
5684
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.ComponentLoaded);
5450
5685
  this.baseComponent.setErrorCallback(this.apiErrorEmitter);
5451
- if (baseComponent.state.debug)
5686
+ if (TranslationUtils.state.debug)
5452
5687
  this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
5453
5688
  if (this.token) {
5454
- if (baseComponent.state.debug)
5689
+ if (TranslationUtils.state.debug)
5455
5690
  console.log('Store Token set with property value: ' + this.token);
5456
- baseComponent.state.token = this.token;
5691
+ TranslationUtils.state.token = this.token;
5457
5692
  }
5458
- else if (baseComponent.state.token == '') {
5459
- baseComponent.state.token = sessionStorage.getItem(baseComponent.SessionKeys.TokenKey);
5460
- this.token = baseComponent.state.token;
5461
- if (baseComponent.state.debug)
5462
- console.log('Store Token set with session value: ' + baseComponent.state.token);
5693
+ else if (TranslationUtils.state.token == '') {
5694
+ TranslationUtils.state.token = sessionStorage.getItem(TranslationUtils.SessionKeys.TokenKey);
5695
+ this.token = TranslationUtils.state.token;
5696
+ if (TranslationUtils.state.debug)
5697
+ console.log('Store Token set with session value: ' + TranslationUtils.state.token);
5463
5698
  }
5464
5699
  if (this.redirect_id) {
5465
- baseComponent.state.redirectId = this.redirect_id;
5700
+ TranslationUtils.state.redirectId = this.redirect_id;
5466
5701
  }
5467
5702
  if (this.phone_number && this.phone_number != '') {
5468
- baseComponent.state.phoneNumber = this.phone_number;
5703
+ TranslationUtils.state.phoneNumber = this.phone_number;
5469
5704
  }
5470
5705
  if (this.lang_iso && this.lang_iso != '') {
5471
- baseComponent.state.langIso = this.lang_iso;
5706
+ TranslationUtils.state.langIso = this.lang_iso;
5472
5707
  }
5473
- var ini = sessionStorage.getItem(baseComponent.SessionKeys.InitialisedKey);
5708
+ var ini = sessionStorage.getItem(TranslationUtils.SessionKeys.InitialisedKey);
5474
5709
  if (ini && ini.toLowerCase() == 'true') {
5475
- baseComponent.state.initialised = true;
5710
+ TranslationUtils.state.initialised = true;
5476
5711
  }
5477
- var hasIdBk = sessionStorage.getItem(baseComponent.SessionKeys.HasIdBackKey);
5712
+ var hasIdBk = sessionStorage.getItem(TranslationUtils.SessionKeys.HasIdBackKey);
5478
5713
  if (hasIdBk && hasIdBk.toLowerCase() == 'true') {
5479
- baseComponent.state.hasIdBack = true;
5714
+ TranslationUtils.state.hasIdBack = true;
5480
5715
  }
5481
- var agrVal = sessionStorage.getItem(baseComponent.SessionKeys.AgreementValidationKey);
5716
+ var agrVal = sessionStorage.getItem(TranslationUtils.SessionKeys.AgreementValidationKey);
5482
5717
  if (agrVal && agrVal.toLowerCase() == 'true') {
5483
- baseComponent.state.agreementsValidation = true;
5718
+ TranslationUtils.state.agreementsValidation = true;
5484
5719
  }
5485
- var phoneVal = sessionStorage.getItem(baseComponent.SessionKeys.PhoneValidationKey);
5720
+ var phoneVal = sessionStorage.getItem(TranslationUtils.SessionKeys.PhoneValidationKey);
5486
5721
  if (phoneVal && phoneVal.toLowerCase() == 'true') {
5487
- baseComponent.state.phoneValidation = true;
5722
+ TranslationUtils.state.phoneValidation = true;
5488
5723
  }
5489
- const savedRequest = sessionStorage.getItem(baseComponent.SessionKeys.RequestIdKey);
5724
+ const savedRequest = sessionStorage.getItem(TranslationUtils.SessionKeys.RequestIdKey);
5490
5725
  if (this.order_id && this.order_id != '') {
5491
- baseComponent.state.requestId = this.order_id;
5492
- if (baseComponent.state.debug)
5726
+ TranslationUtils.state.requestId = this.order_id;
5727
+ if (TranslationUtils.state.debug)
5493
5728
  console.log('Current RequestId has value: ' + this.order_id);
5494
5729
  if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
5495
- if (baseComponent.state.debug)
5730
+ if (TranslationUtils.state.debug)
5496
5731
  console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
5497
- this.flowStatusToSet = baseComponent.FlowStatus.LANDING;
5498
- baseComponent.state.initialised = false;
5732
+ this.flowStatusToSet = TranslationUtils.FlowStatus.LANDING;
5733
+ TranslationUtils.state.initialised = false;
5499
5734
  }
5500
5735
  }
5501
5736
  else if (savedRequest) {
5502
- if (baseComponent.state.debug)
5737
+ if (TranslationUtils.state.debug)
5503
5738
  console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
5504
- baseComponent.state.requestId = savedRequest;
5739
+ TranslationUtils.state.requestId = savedRequest;
5505
5740
  this.order_id = savedRequest;
5506
5741
  }
5507
- if (this.flowStatusToSet == baseComponent.FlowStatus.NONE) {
5508
- var flowSt = sessionStorage.getItem(baseComponent.SessionKeys.FlowStatusKey);
5742
+ if (this.flowStatusToSet == TranslationUtils.FlowStatus.NONE) {
5743
+ var flowSt = sessionStorage.getItem(TranslationUtils.SessionKeys.FlowStatusKey);
5509
5744
  if (flowSt) {
5510
- this.flowStatusToSet = baseComponent.FlowStatus[flowSt];
5745
+ this.flowStatusToSet = TranslationUtils.FlowStatus[flowSt];
5511
5746
  }
5512
5747
  else {
5513
- this.flowStatusToSet = baseComponent.FlowStatus.LANDING;
5748
+ this.flowStatusToSet = TranslationUtils.FlowStatus.LANDING;
5514
5749
  }
5515
5750
  }
5516
5751
  }
5517
5752
  async componentDidLoad() {
5518
5753
  await this.initializeRequest();
5519
- baseComponent.state.flowStatus = this.flowStatusToSet;
5754
+ TranslationUtils.state.flowStatus = this.flowStatusToSet;
5520
5755
  }
5521
5756
  componentWillRender() {
5522
5757
  if (this.idSide == '') {
5523
- this.idSide = baseComponent.state.hasIdBack ? 'front' : '';
5758
+ this.idSide = TranslationUtils.state.hasIdBack ? 'front' : '';
5524
5759
  }
5525
5760
  }
5526
5761
  async initializeRequest() {
5527
- if (baseComponent.state.initialised) {
5762
+ if (TranslationUtils.state.initialised) {
5528
5763
  return;
5529
5764
  }
5530
- if (baseComponent.state.environment == 'DEMO') {
5531
- baseComponent.state.initialised = true;
5765
+ if (TranslationUtils.state.environment == 'DEMO') {
5766
+ TranslationUtils.state.initialised = true;
5532
5767
  return;
5533
5768
  }
5534
- if (baseComponent.state.device.browser == baseComponent.Browser.Mi) {
5535
- this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + baseComponent.state.requestId + ' RedirectId:' + baseComponent.state.redirectId);
5769
+ if (TranslationUtils.state.device.browser == Browser.Mi) {
5770
+ this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + TranslationUtils.state.requestId + ' RedirectId:' + TranslationUtils.state.redirectId);
5536
5771
  return;
5537
5772
  }
5538
5773
  try {
5539
- if (baseComponent.state.debug)
5774
+ if (TranslationUtils.state.debug)
5540
5775
  this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
5541
5776
  }
5542
5777
  catch (_a) { }
5543
5778
  try {
5544
- if (!baseComponent.state.device.isMobile && baseComponent.state.redirectId == '') {
5545
- baseComponent.state.redirectId = v4();
5546
- this.redirect_id = baseComponent.state.redirectId;
5779
+ if (!TranslationUtils.state.device.isMobile && TranslationUtils.state.redirectId == '') {
5780
+ TranslationUtils.state.redirectId = v4();
5781
+ this.redirect_id = TranslationUtils.state.redirectId;
5547
5782
  }
5548
- if (baseComponent.state.token != '' && (baseComponent.state.requestId != '' || baseComponent.state.redirectId != '')) {
5549
- baseComponent.state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(baseComponent.state.device, packageJson.version);
5783
+ if (TranslationUtils.state.token != '' && (TranslationUtils.state.requestId != '' || TranslationUtils.state.redirectId != '')) {
5784
+ TranslationUtils.state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(TranslationUtils.state.device, packageJson.version);
5550
5785
  if (!this.order_id || this.order_id == '') {
5551
- this.order_id = baseComponent.state.requestId;
5786
+ this.order_id = TranslationUtils.state.requestId;
5552
5787
  }
5553
5788
  }
5554
5789
  }
5555
5790
  catch (e) {
5556
- this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + baseComponent.state.requestId + ' RedirectId:' + baseComponent.state.redirectId);
5791
+ this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + TranslationUtils.state.requestId + ' RedirectId:' + TranslationUtils.state.redirectId);
5557
5792
  }
5558
5793
  ML5.getInstance();
5559
5794
  }
5560
5795
  disconnectedCallback() {
5561
- baseComponent.Events.flowEvent(baseComponent.FlowSteps.ComponentLoaded, baseComponent.FlowMoments.Finalized);
5796
+ Events.flowEvent(TranslationUtils.FlowSteps.ComponentLoaded, TranslationUtils.FlowMoments.Finalized);
5562
5797
  }
5563
5798
  render() {
5564
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 })))));
5565
- if (baseComponent.state.device.isMobile || baseComponent.state.environment == 'DEMO') {
5566
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LANDING) {
5800
+ if (TranslationUtils.state.device.isMobile || TranslationUtils.state.environment == 'DEMO') {
5801
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LANDING) {
5567
5802
  currentBlock = index.h("landing-validation", null);
5568
5803
  }
5569
5804
  }
5570
- else if (baseComponent.state.flowStatus != baseComponent.FlowStatus.NONE) {
5805
+ else if (TranslationUtils.state.flowStatus != TranslationUtils.FlowStatus.NONE) {
5571
5806
  currentBlock = index.h("mobile-redirect", null);
5572
5807
  }
5573
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.AGREEMENT) {
5808
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.AGREEMENT) {
5574
5809
  currentBlock = index.h("agreement-info", null);
5575
5810
  }
5576
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
5811
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
5577
5812
  currentBlock = index.h("sms-code-validation", null);
5578
5813
  }
5579
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE) {
5814
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODE) {
5580
5815
  currentBlock = index.h("sms-code-validation", null);
5581
5816
  }
5582
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
5817
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
5583
5818
  currentBlock = index.h("sms-code-validation", null);
5584
5819
  }
5585
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ID) {
5820
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.ID) {
5586
5821
  currentBlock = index.h("process-id", null);
5587
5822
  }
5588
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.LIVENESS) {
5823
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
5589
5824
  currentBlock = index.h("user-liveness", { id: "camera" });
5590
5825
  }
5591
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.COMPLETE) {
5826
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.COMPLETE) {
5592
5827
  currentBlock = index.h("end-redirect", null);
5593
5828
  }
5594
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.ERROREND) {
5829
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.ERROREND) {
5595
5830
  currentBlock = index.h("error-end", { errorTitle: this.errorTitle, message: this.errorMessage });
5596
5831
  }
5597
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CAMERAERROR) {
5832
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CAMERAERROR) {
5598
5833
  currentBlock = index.h("camera-error", null);
5599
5834
  }
5600
5835
  return index.h("div", null, currentBlock);
@@ -5621,48 +5856,49 @@ const LandingValidation = class {
5621
5856
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
5622
5857
  this.warningText = undefined;
5623
5858
  this.buttonDisabled = undefined;
5624
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Landing);
5859
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Landing);
5625
5860
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
5626
5861
  }
5627
5862
  async componentWillLoad() {
5628
- baseComponent.Events.flowStarted();
5629
- this.baseComponent.apiCall = new baseComponent.ApiCall();
5863
+ Events.flowStarted();
5864
+ this.translations = await TranslationUtils.Translations.getValues();
5865
+ this.baseComponent.apiCall = new TranslationUtils.ApiCall();
5630
5866
  this.buttonDisabled = false;
5631
5867
  await this.initRequest();
5632
5868
  }
5633
5869
  async componentDidLoad() {
5634
- if (baseComponent.state.environment !== 'DEMO') {
5870
+ if (TranslationUtils.state.environment !== 'DEMO') {
5635
5871
  await this.baseComponent.initialize();
5636
5872
  }
5637
5873
  }
5638
5874
  async initRequest() {
5639
- if (baseComponent.state.hasIdBack) {
5640
- this.warningText = this.baseComponent.translations.LandingValues.WarningMd;
5875
+ if (TranslationUtils.state.hasIdBack) {
5876
+ this.warningText = this.translations.LandingValues.WarningMd;
5641
5877
  }
5642
5878
  else {
5643
- this.warningText = this.baseComponent.translations.LandingValues.Warning;
5879
+ this.warningText = this.translations.LandingValues.Warning;
5644
5880
  }
5645
5881
  }
5646
5882
  async startFlow() {
5647
- if (baseComponent.state.initialised) {
5883
+ if (TranslationUtils.state.initialised) {
5648
5884
  this.buttonDisabled = true;
5649
- if (baseComponent.state.environment === 'DEMO') {
5650
- baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
5885
+ if (TranslationUtils.state.environment === 'DEMO') {
5886
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
5651
5887
  return;
5652
5888
  }
5653
- if (!(await Cameras.InitCameras(baseComponent.state.device))) {
5654
- if (baseComponent.state.device.mobileOS == baseComponent.MobileOS.iOS)
5655
- sessionStorage.setItem(baseComponent.SessionKeys.RefreshDoneKey, 'false');
5656
- baseComponent.state.flowStatus = baseComponent.FlowStatus.CAMERAERROR;
5889
+ if (!(await Cameras.InitCameras(TranslationUtils.state.device))) {
5890
+ if (TranslationUtils.state.device.mobileOS == MobileOS.iOS)
5891
+ sessionStorage.setItem(TranslationUtils.SessionKeys.RefreshDoneKey, 'false');
5892
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.CAMERAERROR;
5657
5893
  }
5658
- else if (baseComponent.state.agreementsValidation) {
5659
- baseComponent.state.flowStatus = baseComponent.FlowStatus.AGREEMENT;
5894
+ else if (TranslationUtils.state.agreementsValidation) {
5895
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.AGREEMENT;
5660
5896
  }
5661
- else if (baseComponent.state.phoneValidation) {
5662
- baseComponent.state.flowStatus = baseComponent.FlowStatus.PHONE;
5897
+ else if (TranslationUtils.state.phoneValidation) {
5898
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.PHONE;
5663
5899
  }
5664
5900
  else {
5665
- baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
5901
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.ID;
5666
5902
  }
5667
5903
  }
5668
5904
  }
@@ -5672,18 +5908,18 @@ const LandingValidation = class {
5672
5908
  async leaveFlow() {
5673
5909
  if (this.buttonDisabled)
5674
5910
  return;
5675
- baseComponent.state.initialised = false;
5911
+ TranslationUtils.state.initialised = false;
5676
5912
  try {
5677
5913
  await this.baseComponent.apiCall.AbortRequest();
5678
- baseComponent.Events.flowAborted();
5914
+ Events.flowAborted();
5679
5915
  }
5680
5916
  catch (e) {
5681
- baseComponent.Events.flowAborted();
5917
+ Events.flowAborted();
5682
5918
  this.apiErrorEvent.emit(e);
5683
5919
  }
5684
5920
  }
5685
5921
  render() {
5686
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.baseComponent.translations.LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, this.baseComponent.translations.LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, this.baseComponent.translations.LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !baseComponent.state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, this.baseComponent.translations.LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, this.baseComponent.translations.LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
5922
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.translations.LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, this.translations.LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, this.translations.LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, this.translations.LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, this.translations.LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !TranslationUtils.state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, this.translations.LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, this.translations.LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
5687
5923
  }
5688
5924
  };
5689
5925
  LandingValidation.style = landingValidationCss;
@@ -8576,20 +8812,21 @@ const MobileRedirect = class {
8576
8812
  this.redirectLink = undefined;
8577
8813
  this.qrCode = undefined;
8578
8814
  this.prefilledPhone = false;
8579
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.MobileRedirect);
8815
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.MobileRedirect);
8580
8816
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
8581
8817
  this.invalidValue = false;
8582
8818
  this.waitingMobile = false;
8583
8819
  }
8584
8820
  async componentWillLoad() {
8585
- baseComponent.Events.flowStarted();
8586
- this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoTop;
8587
- this.infoTextBottom = this.baseComponent.translations.MobileRedirectValues.InfoBottom;
8588
- let envUri = baseComponent.state.environment == 'QA' ? 'test' : 'ect';
8589
- let baseUri = baseComponent.state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8590
- this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + baseComponent.state.redirectId;
8591
- if (baseComponent.state.phoneNumber && baseComponent.state.phoneNumber != '') {
8592
- this.contact = baseComponent.state.phoneNumber;
8821
+ Events.flowStarted();
8822
+ this.translations = await TranslationUtils.Translations.getValues();
8823
+ this.infoTextTop = this.translations.MobileRedirectValues.InfoTop;
8824
+ this.infoTextBottom = this.translations.MobileRedirectValues.InfoBottom;
8825
+ let envUri = TranslationUtils.state.environment == 'QA' ? 'test' : 'ect';
8826
+ let baseUri = TranslationUtils.state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
8827
+ this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + TranslationUtils.state.redirectId;
8828
+ if (TranslationUtils.state.phoneNumber && TranslationUtils.state.phoneNumber != '') {
8829
+ this.contact = TranslationUtils.state.phoneNumber;
8593
8830
  this.prefilledPhone = true;
8594
8831
  }
8595
8832
  var self = this;
@@ -8603,28 +8840,28 @@ const MobileRedirect = class {
8603
8840
  await this.baseComponent.initialize();
8604
8841
  await delay(5000);
8605
8842
  await this.checkStatus();
8606
- while (this.orderStatus == baseComponent.OrderStatuses.Capturing || this.orderStatus == baseComponent.OrderStatuses.Waiting) {
8843
+ while (this.orderStatus == TranslationUtils.OrderStatuses.Capturing || this.orderStatus == TranslationUtils.OrderStatuses.Waiting) {
8607
8844
  await this.checkStatus();
8608
8845
  await delay(5000);
8609
8846
  }
8610
8847
  }
8611
8848
  async checkStatus() {
8612
- this.orderStatus = await this.baseComponent.apiCall.GetStatus(baseComponent.state.requestId);
8613
- if (this.orderStatus == baseComponent.OrderStatuses.FinishedCapturing) {
8849
+ this.orderStatus = await this.baseComponent.apiCall.GetStatus(TranslationUtils.state.requestId);
8850
+ if (this.orderStatus == TranslationUtils.OrderStatuses.FinishedCapturing) {
8614
8851
  this.waitingMobile = false;
8615
- baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
8852
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
8616
8853
  }
8617
- if (this.orderStatus == baseComponent.OrderStatuses.NotFound) {
8854
+ if (this.orderStatus == TranslationUtils.OrderStatuses.NotFound) {
8618
8855
  this.apiErrorEvent.emit({ message: 'No order was started for this process.' });
8619
8856
  }
8620
- if (this.orderStatus == baseComponent.OrderStatuses.Capturing) {
8621
- this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoWaiting;
8857
+ if (this.orderStatus == TranslationUtils.OrderStatuses.Capturing) {
8858
+ this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
8622
8859
  this.waitingMobile = true;
8623
8860
  }
8624
- if (this.orderStatus == baseComponent.OrderStatuses.Aborted) {
8861
+ if (this.orderStatus == TranslationUtils.OrderStatuses.Aborted) {
8625
8862
  this.waitingMobile = false;
8626
- this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoAborted;
8627
- baseComponent.Events.flowAborted();
8863
+ this.infoTextTop = this.translations.MobileRedirectValues.InfoAborted;
8864
+ Events.flowAborted();
8628
8865
  }
8629
8866
  }
8630
8867
  async disconnectedCallback() {
@@ -8635,7 +8872,7 @@ const MobileRedirect = class {
8635
8872
  return;
8636
8873
  }
8637
8874
  this.waitingMobile = true;
8638
- this.infoTextTop = this.baseComponent.translations.MobileRedirectValues.InfoWaiting;
8875
+ this.infoTextTop = this.translations.MobileRedirectValues.InfoWaiting;
8639
8876
  try {
8640
8877
  await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
8641
8878
  }
@@ -8653,7 +8890,7 @@ const MobileRedirect = class {
8653
8890
  ev.target.value = this.contact;
8654
8891
  }
8655
8892
  render() {
8656
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { hidden: this.waitingMobile }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop)), index.h("div", { class: "qr-canvas align-center" }, index.h("img", { src: this.qrCode })), index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextBottom)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, index.h("b", null, this.baseComponent.translations.MobileRedirectValues.Validation)), index.h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), index.h("div", { class: "pos-relative" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
8893
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { hidden: this.waitingMobile }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop)), index.h("div", { class: "qr-canvas align-center" }, index.h("img", { src: this.qrCode })), index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextBottom)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, index.h("b", null, this.translations.MobileRedirectValues.Validation)), index.h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), index.h("div", { class: "pos-relative" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
8657
8894
  }
8658
8895
  };
8659
8896
  MobileRedirect.style = mobileRedirectCss;
@@ -8698,7 +8935,7 @@ const ProcessId = class {
8698
8935
  this.showTimeout = undefined;
8699
8936
  this.showInvalid = undefined;
8700
8937
  this.flow = undefined;
8701
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.CiBack);
8938
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.CiBack);
8702
8939
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
8703
8940
  }
8704
8941
  componentWillLoad() {
@@ -8715,7 +8952,7 @@ const ProcessId = class {
8715
8952
  back: null,
8716
8953
  tilt: null,
8717
8954
  };
8718
- if (baseComponent.state.hasIdBack) {
8955
+ if (TranslationUtils.state.hasIdBack) {
8719
8956
  this.flow.back = {
8720
8957
  photoDone: false,
8721
8958
  recordingDone: false,
@@ -8725,7 +8962,7 @@ const ProcessId = class {
8725
8962
  recType: CaptureUploadTypes.IdBackVideo,
8726
8963
  };
8727
8964
  }
8728
- if (baseComponent.state.hasIdTilt) {
8965
+ if (TranslationUtils.state.hasIdTilt) {
8729
8966
  this.flow.tilt = {
8730
8967
  photoDone: true,
8731
8968
  recordingDone: false,
@@ -8825,7 +9062,7 @@ const ProcessId = class {
8825
9062
  if (photoFile == null || uploadType == '') {
8826
9063
  return false;
8827
9064
  }
8828
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, uploadType, photoFile);
9065
+ var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, photoFile);
8829
9066
  if (uploadResult) {
8830
9067
  return true;
8831
9068
  }
@@ -8839,7 +9076,7 @@ const ProcessId = class {
8839
9076
  if (recordingFile == null) {
8840
9077
  return;
8841
9078
  }
8842
- var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, uploadType, recordingFile);
9079
+ var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, uploadType, recordingFile);
8843
9080
  if (uploadResult) {
8844
9081
  return true;
8845
9082
  }
@@ -8872,10 +9109,10 @@ const ProcessId = class {
8872
9109
  async endFlow() {
8873
9110
  if (this.captureStep == IdCaptureFlowStatus.IdFront) {
8874
9111
  if (this.flow.front.photoDone && this.flow.front.recordingDone) {
8875
- if (baseComponent.state.hasIdBack) {
9112
+ if (TranslationUtils.state.hasIdBack) {
8876
9113
  this.captureStep = IdCaptureFlowStatus.IdBack;
8877
9114
  }
8878
- else if (baseComponent.state.hasIdTilt) {
9115
+ else if (TranslationUtils.state.hasIdTilt) {
8879
9116
  this.captureStep = IdCaptureFlowStatus.Tilt;
8880
9117
  }
8881
9118
  else {
@@ -8886,9 +9123,9 @@ const ProcessId = class {
8886
9123
  return;
8887
9124
  }
8888
9125
  }
8889
- if (this.captureStep == IdCaptureFlowStatus.IdBack && baseComponent.state.hasIdBack) {
9126
+ if (this.captureStep == IdCaptureFlowStatus.IdBack && TranslationUtils.state.hasIdBack) {
8890
9127
  if (this.flow.back.photoDone && this.flow.back.recordingDone) {
8891
- if (baseComponent.state.hasIdTilt) {
9128
+ if (TranslationUtils.state.hasIdTilt) {
8892
9129
  this.captureStep = IdCaptureFlowStatus.Tilt;
8893
9130
  }
8894
9131
  else {
@@ -8899,7 +9136,7 @@ const ProcessId = class {
8899
9136
  return;
8900
9137
  }
8901
9138
  }
8902
- if (this.captureStep == IdCaptureFlowStatus.Tilt && baseComponent.state.hasIdTilt) {
9139
+ if (this.captureStep == IdCaptureFlowStatus.Tilt && TranslationUtils.state.hasIdTilt) {
8903
9140
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
8904
9141
  this.captureStep = IdCaptureFlowStatus.End;
8905
9142
  }
@@ -8910,15 +9147,15 @@ const ProcessId = class {
8910
9147
  if (this.captureStep != IdCaptureFlowStatus.End) {
8911
9148
  return;
8912
9149
  }
8913
- baseComponent.state.flowStatus = baseComponent.FlowStatus.LIVENESS;
9150
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.LIVENESS;
8914
9151
  }
8915
9152
  async disconnectedCallback() {
8916
9153
  await this.baseComponent.finalize();
8917
9154
  }
8918
9155
  switchCamera() {
8919
9156
  if (this.captureRetryCount == 1) {
8920
- let camIndex = baseComponent.state.cameraIds.indexOf(baseComponent.state.cameraId);
8921
- baseComponent.state.cameraId = camIndex === baseComponent.state.cameraIds.length - 1 ? baseComponent.state.cameraIds[0] : baseComponent.state.cameraIds[camIndex + 1];
9157
+ let camIndex = TranslationUtils.state.cameraIds.indexOf(TranslationUtils.state.cameraId);
9158
+ TranslationUtils.state.cameraId = camIndex === TranslationUtils.state.cameraIds.length - 1 ? TranslationUtils.state.cameraIds[0] : TranslationUtils.state.cameraIds[camIndex + 1];
8922
9159
  this.captureRetryCount = 0;
8923
9160
  }
8924
9161
  else {
@@ -8980,7 +9217,7 @@ const SelfieCapture = class {
8980
9217
  this.cameras = new Cameras();
8981
9218
  this.demoEnded = false;
8982
9219
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
8983
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieCapture);
9220
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieCapture);
8984
9221
  }
8985
9222
  eventVideoStarted(event) {
8986
9223
  this.videoStarted = true;
@@ -8989,23 +9226,24 @@ const SelfieCapture = class {
8989
9226
  this.captureHeight = height - Math.round((window.screen.height - height) / 2);
8990
9227
  this.captureWidth = Math.round((this.captureHeight * 9) / 16);
8991
9228
  }
8992
- componentWillLoad() {
8993
- this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Title;
9229
+ async componentWillLoad() {
9230
+ this.translations = await TranslationUtils.Translations.getValues();
9231
+ this.titleMesage = this.translations.SelfieCaptureValues.Title;
8994
9232
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
8995
9233
  if (!navigator.mediaDevices) {
8996
9234
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
8997
9235
  }
8998
9236
  }
8999
9237
  async componentDidLoad() {
9000
- await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Initialized);
9001
- this.demoVideo.src = baseComponent.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
9238
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Initialized);
9239
+ this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
9002
9240
  this.demoVideo.play();
9003
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
9241
+ await delay(this.translations.GlobalValues.VideoLenght);
9004
9242
  this.demoEnded = true;
9005
9243
  this.openCamera();
9006
9244
  }
9007
9245
  async openCamera() {
9008
- const constraints = this.cameras.GetConstraints('', baseComponent.state.device, true);
9246
+ const constraints = this.cameras.GetConstraints('', TranslationUtils.state.device, true);
9009
9247
  setTimeout(() => {
9010
9248
  navigator.mediaDevices
9011
9249
  .getUserMedia(constraints)
@@ -9035,13 +9273,13 @@ const SelfieCapture = class {
9035
9273
  this.captureTaken = true;
9036
9274
  let res = await Stream.getInstance(VerificationMode.Full).takePhoto();
9037
9275
  this.photoIsReady(res);
9038
- await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Finalized);
9276
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Finalized);
9039
9277
  }
9040
9278
  verificationFinished() {
9041
9279
  if (this.verified)
9042
9280
  return;
9043
9281
  this.verified = true;
9044
- this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Loading;
9282
+ this.titleMesage = this.translations.SelfieCaptureValues.Loading;
9045
9283
  this.closeCamera();
9046
9284
  this.demoEnded = false;
9047
9285
  this.demoVideo.src = this.uploadingLink;
@@ -9050,7 +9288,7 @@ const SelfieCapture = class {
9050
9288
  }
9051
9289
  render() {
9052
9290
  let cameraStyle;
9053
- if (baseComponent.state.device.isMobile && this.videoStarted) {
9291
+ if (TranslationUtils.state.device.isMobile && this.videoStarted) {
9054
9292
  cameraStyle = {
9055
9293
  'width': this.captureWidth + 'px',
9056
9294
  'height': this.captureHeight + 'px',
@@ -9063,7 +9301,7 @@ const SelfieCapture = class {
9063
9301
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
9064
9302
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
9065
9303
  let bgDemo = this.verified ? 'container' : 'container bg-black';
9066
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
9304
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
9067
9305
  }
9068
9306
  get component() { return index.getElement(this); }
9069
9307
  };
@@ -9095,7 +9333,7 @@ const SelfieTilt = class {
9095
9333
  this.cameras = new Cameras();
9096
9334
  this.demoEnded = false;
9097
9335
  this.uploadingLink = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_selfie.mp4';
9098
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.SelfieTilt);
9336
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.SelfieTilt);
9099
9337
  }
9100
9338
  eventVideoStarted(event) {
9101
9339
  this.videoStarted = true;
@@ -9104,8 +9342,9 @@ const SelfieTilt = class {
9104
9342
  this.captureHeight = height - Math.round((window.screen.height - height) / 2);
9105
9343
  this.captureWidth = Math.round((this.captureHeight * 9) / 16);
9106
9344
  }
9107
- componentWillLoad() {
9108
- this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Title;
9345
+ async componentWillLoad() {
9346
+ this.translations = await TranslationUtils.Translations.getValues();
9347
+ this.titleMesage = this.translations.SelfieCaptureValues.Title;
9109
9348
  //this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
9110
9349
  if (!navigator.mediaDevices) {
9111
9350
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
@@ -9113,17 +9352,17 @@ const SelfieTilt = class {
9113
9352
  }
9114
9353
  async componentDidLoad() {
9115
9354
  this.mainStream = Stream.getInstance(VerificationMode.Tilt);
9116
- await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieTilt, baseComponent.FlowMoments.Initialized);
9117
- this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.FacePoseMapping[Object.values(FacePose).indexOf(this.mainStream.facePose)];
9355
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieTilt, TranslationUtils.FlowMoments.Initialized);
9356
+ this.titleMesage = this.translations.SelfieCaptureValues.FacePoseMapping[Object.values(FacePose).indexOf(this.mainStream.facePose)];
9118
9357
  this.demoEnded = false;
9119
- this.demoVideo.src = baseComponent.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
9358
+ this.demoVideo.src = TranslationUtils.SelfieCaptureValues.FacePoseDemoMapping[this.mainStream.facePose];
9120
9359
  this.demoVideo.play();
9121
- await delay(this.baseComponent.translations.GlobalValues.VideoLenght);
9360
+ await delay(this.translations.GlobalValues.VideoLenght);
9122
9361
  this.demoEnded = true;
9123
9362
  this.openCamera();
9124
9363
  }
9125
9364
  async openCamera() {
9126
- const constraints = this.cameras.GetConstraints('', baseComponent.state.device, true);
9365
+ const constraints = this.cameras.GetConstraints('', TranslationUtils.state.device, true);
9127
9366
  setTimeout(() => {
9128
9367
  navigator.mediaDevices
9129
9368
  .getUserMedia(constraints)
@@ -9152,13 +9391,13 @@ const SelfieTilt = class {
9152
9391
  this.captureTaken = true;
9153
9392
  let res = this.mainStream.takePhoto();
9154
9393
  this.photoIsReady(res);
9155
- await this.baseComponent.logStep(baseComponent.FlowSteps.SelfieCapture, baseComponent.FlowMoments.Finalized);
9394
+ await this.baseComponent.logStep(TranslationUtils.FlowSteps.SelfieCapture, TranslationUtils.FlowMoments.Finalized);
9156
9395
  }
9157
9396
  verificationFinished() {
9158
9397
  if (this.verified)
9159
9398
  return;
9160
9399
  this.verified = true;
9161
- this.titleMesage = this.baseComponent.translations.SelfieCaptureValues.Loading;
9400
+ this.titleMesage = this.translations.SelfieCaptureValues.Loading;
9162
9401
  this.closeCamera();
9163
9402
  this.demoEnded = false;
9164
9403
  this.demoVideo.src = this.uploadingLink;
@@ -9167,7 +9406,7 @@ const SelfieTilt = class {
9167
9406
  }
9168
9407
  render() {
9169
9408
  let cameraStyle;
9170
- if (baseComponent.state.device.isMobile && this.videoStarted) {
9409
+ if (TranslationUtils.state.device.isMobile && this.videoStarted) {
9171
9410
  cameraStyle = {
9172
9411
  'width': this.captureWidth + 'px',
9173
9412
  'height': this.captureHeight + 'px',
@@ -9180,7 +9419,7 @@ const SelfieTilt = class {
9180
9419
  let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
9181
9420
  //let videoClass = this.device.isMobile ? '' : 'video-demo';
9182
9421
  let bgDemo = this.verified ? 'container' : 'container bg-black';
9183
- return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText)))));
9422
+ return (index.h("div", { class: bgDemo }, index.h("div", { class: "container-video" }, index.h("div", { hidden: this.demoEnded }, index.h("video", { id: "howtoSelfie", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { hidden: this.demoEnded == false }, index.h("div", { hidden: this.verified }, index.h("div", { class: "video-capture" }, index.h("div", { style: cameraStyle }, index.h("camera-comp", { "capture-mode": "selfie" }))))), index.h("div", { class: "capture-title" }, index.h("h1", { class: titleClass }, this.titleMesage), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText)))));
9184
9423
  }
9185
9424
  get component() { return index.getElement(this); }
9186
9425
  };
@@ -9199,30 +9438,30 @@ const SmsCodeValidation = class {
9199
9438
  this.code = undefined;
9200
9439
  this.prefilledPhone = false;
9201
9440
  this.canSend = false;
9202
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9203
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.OtpSend);
9441
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
9442
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpSend);
9204
9443
  }
9205
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE) {
9206
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.OtpCheck);
9444
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODE) {
9445
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.OtpCheck);
9207
9446
  }
9208
9447
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9209
9448
  }
9210
9449
  async doAction() {
9211
9450
  try {
9212
9451
  this.canSend = false;
9213
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE || baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9214
- var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(baseComponent.state.requestId, this.code);
9452
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODE || TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
9453
+ var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(TranslationUtils.state.requestId, this.code);
9215
9454
  if (codeChecked === true) {
9216
- baseComponent.state.flowStatus = baseComponent.FlowStatus.ID;
9455
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.ID;
9217
9456
  }
9218
9457
  else {
9219
- baseComponent.state.flowStatus = baseComponent.FlowStatus.CODEERROR;
9458
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.CODEERROR;
9220
9459
  }
9221
9460
  }
9222
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9223
- var codeSent = await this.baseComponent.apiCall.SendOTPCode(baseComponent.state.requestId, this.phoneNumber);
9461
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
9462
+ var codeSent = await this.baseComponent.apiCall.SendOTPCode(TranslationUtils.state.requestId, this.phoneNumber);
9224
9463
  if (codeSent === true) {
9225
- baseComponent.state.flowStatus = baseComponent.FlowStatus.CODE;
9464
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.CODE;
9226
9465
  }
9227
9466
  }
9228
9467
  }
@@ -9233,21 +9472,22 @@ const SmsCodeValidation = class {
9233
9472
  async disconnectedCallback() {
9234
9473
  await this.baseComponent.finalize();
9235
9474
  }
9236
- componentWillRender() {
9237
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9238
- this.title = this.baseComponent.translations.PhoneValidationValues.Title;
9239
- this.details = this.baseComponent.translations.PhoneValidationValues.Description;
9240
- this.buttonText = this.baseComponent.translations.PhoneValidationValues.Button;
9241
- if (baseComponent.state.phoneNumber && baseComponent.state.phoneNumber != '') {
9242
- this.phoneNumber = baseComponent.state.phoneNumber;
9475
+ async componentWillRender() {
9476
+ this.translations = await TranslationUtils.Translations.getValues();
9477
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
9478
+ this.title = this.translations.PhoneValidationValues.Title;
9479
+ this.details = this.translations.PhoneValidationValues.Description;
9480
+ this.buttonText = this.translations.PhoneValidationValues.Button;
9481
+ if (TranslationUtils.state.phoneNumber && TranslationUtils.state.phoneNumber != '') {
9482
+ this.phoneNumber = TranslationUtils.state.phoneNumber;
9243
9483
  this.prefilledPhone = true;
9244
9484
  this.canSend = true;
9245
9485
  }
9246
9486
  }
9247
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODE || baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9248
- this.title = this.baseComponent.translations.CodeValidationValues.Title;
9249
- this.details = this.baseComponent.translations.CodeValidationValues.Description;
9250
- this.buttonText = this.baseComponent.translations.CodeValidationValues.Button;
9487
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODE || TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
9488
+ this.title = this.translations.CodeValidationValues.Title;
9489
+ this.details = this.translations.CodeValidationValues.Description;
9490
+ this.buttonText = this.translations.CodeValidationValues.Button;
9251
9491
  }
9252
9492
  }
9253
9493
  async componentDidLoad() {
@@ -9272,16 +9512,16 @@ const SmsCodeValidation = class {
9272
9512
  render() {
9273
9513
  let inputBlock;
9274
9514
  let errorBlock;
9275
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.CODEERROR) {
9276
- errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, this.baseComponent.translations.CodeValidationValues.Error);
9515
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
9516
+ errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, this.translations.CodeValidationValues.Error);
9277
9517
  }
9278
- if (baseComponent.state.flowStatus == baseComponent.FlowStatus.PHONE) {
9279
- inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, this.baseComponent.translations.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
9518
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.PHONE) {
9519
+ inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, this.translations.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
9280
9520
  }
9281
9521
  else {
9282
9522
  inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("input", { type: "text", id: "codeInput", class: "main-input", onInput: ev => this.handleChangeCode(ev), value: this.code })));
9283
9523
  }
9284
- return (index.h("div", { class: "container" }, index.h("div", { class: "row row-validare" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.title), errorBlock == null ? index.h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.baseComponent.translations.GlobalValues.FooterText))))));
9524
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row row-validare" }, index.h("div", null, index.h("h1", { class: "text-center" }, this.title), errorBlock == null ? index.h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
9285
9525
  }
9286
9526
  };
9287
9527
  SmsCodeValidation.style = smsCodeValidationCss;
@@ -9297,7 +9537,7 @@ const UserLiveness = class {
9297
9537
  this.showError = undefined;
9298
9538
  this.captureStep = undefined;
9299
9539
  this.flow = undefined;
9300
- this.baseComponent = new baseComponent.BaseComponent(baseComponent.FlowSteps.Selfie);
9540
+ this.baseComponent = new BaseComponent(TranslationUtils.FlowSteps.Selfie);
9301
9541
  this.baseComponent.setEventEmitter(this.apiErrorEvent);
9302
9542
  }
9303
9543
  async componentDidLoad() {
@@ -9316,7 +9556,7 @@ const UserLiveness = class {
9316
9556
  back: null,
9317
9557
  tilt: null,
9318
9558
  };
9319
- if (baseComponent.state.hasSelfieGesture) {
9559
+ if (TranslationUtils.state.hasSelfieGesture) {
9320
9560
  this.flow.tilt = {
9321
9561
  photoDone: true,
9322
9562
  recordingDone: false,
@@ -9407,7 +9647,7 @@ const UserLiveness = class {
9407
9647
  if (this.flow.front.photoDone) {
9408
9648
  return;
9409
9649
  }
9410
- this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, photoType, photoFile);
9650
+ this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, photoType, photoFile);
9411
9651
  if (this.flow.front.photoDone) {
9412
9652
  await this.endFlow();
9413
9653
  }
@@ -9416,7 +9656,7 @@ const UserLiveness = class {
9416
9656
  }
9417
9657
  }
9418
9658
  async uploadRecording(uploadRec, recType) {
9419
- let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(baseComponent.state.requestId, recType, uploadRec);
9659
+ let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(TranslationUtils.state.requestId, recType, uploadRec);
9420
9660
  if (uplodDone) {
9421
9661
  return true;
9422
9662
  }
@@ -9431,7 +9671,7 @@ const UserLiveness = class {
9431
9671
  async endFlow() {
9432
9672
  if (this.captureStep == SelfieFlowStatus.Selfie) {
9433
9673
  if (this.flow.front.photoDone && this.flow.front.recordingDone) {
9434
- if (baseComponent.state.hasSelfieGesture) {
9674
+ if (TranslationUtils.state.hasSelfieGesture) {
9435
9675
  this.captureStep = SelfieFlowStatus.Gesture;
9436
9676
  }
9437
9677
  else {
@@ -9453,7 +9693,7 @@ const UserLiveness = class {
9453
9693
  if (this.captureStep != SelfieFlowStatus.End) {
9454
9694
  return;
9455
9695
  }
9456
- baseComponent.state.flowStatus = baseComponent.FlowStatus.COMPLETE;
9696
+ TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus.COMPLETE;
9457
9697
  }
9458
9698
  render() {
9459
9699
  let howTo = index.h("how-to-info", { idSide: "" });