@ekyc_qoobiss/qbs-ect-cmp 3.6.15 → 3.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agreement-check_19.cjs.entry.js +305 -698
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/cjs/random-actions.cjs.entry.js +22 -0
- package/dist/cjs/store-ab631a7a.js +415 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/common/random-actions/random-actions.css +0 -0
- package/dist/collection/components/common/random-actions/random-actions.js +20 -0
- package/dist/collection/components/flow/process-id/process-id.js +3 -0
- package/dist/collection/components/flow/user-liveness/user-liveness.js +13 -14
- package/dist/esm/agreement-check_19.entry.js +19 -412
- package/dist/esm/{index-9d69e511.js → index-5d6f9123.js} +1 -1
- package/dist/esm/loader-dots.entry.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/qbs-ect-cmp.js +3 -3
- package/dist/esm/random-actions.entry.js +18 -0
- package/dist/esm/store-b5192087.js +399 -0
- package/dist/qbs-ect-cmp/{p-a85dd6fc.entry.js → p-094ad8f3.entry.js} +22 -22
- package/dist/qbs-ect-cmp/{p-4c8e922b.entry.js → p-7c33dd41.entry.js} +1 -1
- package/dist/qbs-ect-cmp/p-927cd530.entry.js +1 -0
- package/dist/qbs-ect-cmp/p-a6506178.js +1 -0
- package/dist/qbs-ect-cmp/{p-06e42b28.js → p-aacd7024.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/random-actions/random-actions.d.ts +7 -0
- package/dist/types/components/flow/user-liveness/user-liveness.d.ts +2 -2
- package/dist/types/components.d.ts +13 -0
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-79f82518.js');
|
|
6
|
+
const store = require('./store-ab631a7a.js');
|
|
6
7
|
|
|
7
8
|
var OrderStatuses;
|
|
8
9
|
(function (OrderStatuses) {
|
|
@@ -13,402 +14,6 @@ var OrderStatuses;
|
|
|
13
14
|
OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
|
|
14
15
|
})(OrderStatuses || (OrderStatuses = {}));
|
|
15
16
|
|
|
16
|
-
const appendToMap = (map, propName, value) => {
|
|
17
|
-
const items = map.get(propName);
|
|
18
|
-
if (!items) {
|
|
19
|
-
map.set(propName, [value]);
|
|
20
|
-
}
|
|
21
|
-
else if (!items.includes(value)) {
|
|
22
|
-
items.push(value);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const debounce = (fn, ms) => {
|
|
26
|
-
let timeoutId;
|
|
27
|
-
return (...args) => {
|
|
28
|
-
if (timeoutId) {
|
|
29
|
-
clearTimeout(timeoutId);
|
|
30
|
-
}
|
|
31
|
-
timeoutId = setTimeout(() => {
|
|
32
|
-
timeoutId = 0;
|
|
33
|
-
fn(...args);
|
|
34
|
-
}, ms);
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Check if a possible element isConnected.
|
|
40
|
-
* The property might not be there, so we check for it.
|
|
41
|
-
*
|
|
42
|
-
* We want it to return true if isConnected is not a property,
|
|
43
|
-
* otherwise we would remove these elements and would not update.
|
|
44
|
-
*
|
|
45
|
-
* Better leak in Edge than to be useless.
|
|
46
|
-
*/
|
|
47
|
-
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
48
|
-
const cleanupElements = debounce((map) => {
|
|
49
|
-
for (let key of map.keys()) {
|
|
50
|
-
map.set(key, map.get(key).filter(isConnected));
|
|
51
|
-
}
|
|
52
|
-
}, 2000);
|
|
53
|
-
const stencilSubscription = () => {
|
|
54
|
-
if (typeof index.getRenderingRef !== 'function') {
|
|
55
|
-
// If we are not in a stencil project, we do nothing.
|
|
56
|
-
// This function is not really exported by @stencil/core.
|
|
57
|
-
return {};
|
|
58
|
-
}
|
|
59
|
-
const elmsToUpdate = new Map();
|
|
60
|
-
return {
|
|
61
|
-
dispose: () => elmsToUpdate.clear(),
|
|
62
|
-
get: (propName) => {
|
|
63
|
-
const elm = index.getRenderingRef();
|
|
64
|
-
if (elm) {
|
|
65
|
-
appendToMap(elmsToUpdate, propName, elm);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
set: (propName) => {
|
|
69
|
-
const elements = elmsToUpdate.get(propName);
|
|
70
|
-
if (elements) {
|
|
71
|
-
elmsToUpdate.set(propName, elements.filter(index.forceUpdate));
|
|
72
|
-
}
|
|
73
|
-
cleanupElements(elmsToUpdate);
|
|
74
|
-
},
|
|
75
|
-
reset: () => {
|
|
76
|
-
elmsToUpdate.forEach((elms) => elms.forEach(index.forceUpdate));
|
|
77
|
-
cleanupElements(elmsToUpdate);
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
83
|
-
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
84
|
-
const unwrappedState = unwrap(defaultState);
|
|
85
|
-
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
|
86
|
-
const handlers = {
|
|
87
|
-
dispose: [],
|
|
88
|
-
get: [],
|
|
89
|
-
set: [],
|
|
90
|
-
reset: [],
|
|
91
|
-
};
|
|
92
|
-
const reset = () => {
|
|
93
|
-
var _a;
|
|
94
|
-
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
95
|
-
// otherwise, the state won't be properly reset
|
|
96
|
-
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
|
97
|
-
handlers.reset.forEach((cb) => cb());
|
|
98
|
-
};
|
|
99
|
-
const dispose = () => {
|
|
100
|
-
// Call first dispose as resetting the state would
|
|
101
|
-
// cause less updates ;)
|
|
102
|
-
handlers.dispose.forEach((cb) => cb());
|
|
103
|
-
reset();
|
|
104
|
-
};
|
|
105
|
-
const get = (propName) => {
|
|
106
|
-
handlers.get.forEach((cb) => cb(propName));
|
|
107
|
-
return states.get(propName);
|
|
108
|
-
};
|
|
109
|
-
const set = (propName, value) => {
|
|
110
|
-
const oldValue = states.get(propName);
|
|
111
|
-
if (shouldUpdate(value, oldValue, propName)) {
|
|
112
|
-
states.set(propName, value);
|
|
113
|
-
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
const state = (typeof Proxy === 'undefined'
|
|
117
|
-
? {}
|
|
118
|
-
: new Proxy(unwrappedState, {
|
|
119
|
-
get(_, propName) {
|
|
120
|
-
return get(propName);
|
|
121
|
-
},
|
|
122
|
-
ownKeys(_) {
|
|
123
|
-
return Array.from(states.keys());
|
|
124
|
-
},
|
|
125
|
-
getOwnPropertyDescriptor() {
|
|
126
|
-
return {
|
|
127
|
-
enumerable: true,
|
|
128
|
-
configurable: true,
|
|
129
|
-
};
|
|
130
|
-
},
|
|
131
|
-
has(_, propName) {
|
|
132
|
-
return states.has(propName);
|
|
133
|
-
},
|
|
134
|
-
set(_, propName, value) {
|
|
135
|
-
set(propName, value);
|
|
136
|
-
return true;
|
|
137
|
-
},
|
|
138
|
-
}));
|
|
139
|
-
const on = (eventName, callback) => {
|
|
140
|
-
handlers[eventName].push(callback);
|
|
141
|
-
return () => {
|
|
142
|
-
removeFromArray(handlers[eventName], callback);
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
const onChange = (propName, cb) => {
|
|
146
|
-
const unSet = on('set', (key, newValue) => {
|
|
147
|
-
if (key === propName) {
|
|
148
|
-
cb(newValue);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
// We need to unwrap the defaultState because it might be a function.
|
|
152
|
-
// Otherwise we might not be sending the right reset value.
|
|
153
|
-
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
|
154
|
-
return () => {
|
|
155
|
-
unSet();
|
|
156
|
-
unReset();
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
const use = (...subscriptions) => {
|
|
160
|
-
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
161
|
-
if (subscription.set) {
|
|
162
|
-
unsubs.push(on('set', subscription.set));
|
|
163
|
-
}
|
|
164
|
-
if (subscription.get) {
|
|
165
|
-
unsubs.push(on('get', subscription.get));
|
|
166
|
-
}
|
|
167
|
-
if (subscription.reset) {
|
|
168
|
-
unsubs.push(on('reset', subscription.reset));
|
|
169
|
-
}
|
|
170
|
-
if (subscription.dispose) {
|
|
171
|
-
unsubs.push(on('dispose', subscription.dispose));
|
|
172
|
-
}
|
|
173
|
-
return unsubs;
|
|
174
|
-
}, []);
|
|
175
|
-
return () => unsubs.forEach((unsub) => unsub());
|
|
176
|
-
};
|
|
177
|
-
const forceUpdate = (key) => {
|
|
178
|
-
const oldValue = states.get(key);
|
|
179
|
-
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
180
|
-
};
|
|
181
|
-
return {
|
|
182
|
-
state,
|
|
183
|
-
get,
|
|
184
|
-
set,
|
|
185
|
-
on,
|
|
186
|
-
onChange,
|
|
187
|
-
use,
|
|
188
|
-
dispose,
|
|
189
|
-
reset,
|
|
190
|
-
forceUpdate,
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
const removeFromArray = (array, item) => {
|
|
194
|
-
const index = array.indexOf(item);
|
|
195
|
-
if (index >= 0) {
|
|
196
|
-
array[index] = array[array.length - 1];
|
|
197
|
-
array.length--;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
const createStore = (defaultState, shouldUpdate) => {
|
|
202
|
-
const map = createObservableMap(defaultState, shouldUpdate);
|
|
203
|
-
map.use(stencilSubscription());
|
|
204
|
-
return map;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
var FlowStatus;
|
|
208
|
-
(function (FlowStatus) {
|
|
209
|
-
FlowStatus[FlowStatus["LANDING"] = 0] = "LANDING";
|
|
210
|
-
FlowStatus[FlowStatus["AGREEMENT"] = 1] = "AGREEMENT";
|
|
211
|
-
FlowStatus[FlowStatus["PHONE"] = 2] = "PHONE";
|
|
212
|
-
FlowStatus[FlowStatus["CODE"] = 3] = "CODE";
|
|
213
|
-
FlowStatus[FlowStatus["CODEERROR"] = 4] = "CODEERROR";
|
|
214
|
-
FlowStatus[FlowStatus["ID"] = 5] = "ID";
|
|
215
|
-
FlowStatus[FlowStatus["LIVENESS"] = 6] = "LIVENESS";
|
|
216
|
-
FlowStatus[FlowStatus["COMPLETE"] = 7] = "COMPLETE";
|
|
217
|
-
FlowStatus[FlowStatus["ERROREND"] = 8] = "ERROREND";
|
|
218
|
-
FlowStatus[FlowStatus["CAMERAERROR"] = 9] = "CAMERAERROR";
|
|
219
|
-
FlowStatus[FlowStatus["NONE"] = 10] = "NONE";
|
|
220
|
-
})(FlowStatus || (FlowStatus = {}));
|
|
221
|
-
|
|
222
|
-
class GlobalValues {
|
|
223
|
-
}
|
|
224
|
-
GlobalValues.FooterText = 'Qoobiss eKYC';
|
|
225
|
-
GlobalValues.VideoLenght = 3100;
|
|
226
|
-
class HowToValues extends GlobalValues {
|
|
227
|
-
}
|
|
228
|
-
HowToValues.IdTitile = 'Prezintă actul tău de identitate';
|
|
229
|
-
HowToValues.IdSubTitileFace = 'Este necesară captarea actului de identitate. Urmează intrucțiunile ce vor fi afișate pe ecran.';
|
|
230
|
-
HowToValues.IdSubTitileBack = 'Este necesară captarea pe verso a actului de identitate. Urmează intrucțiunile ce vor fi afișate pe ecran.';
|
|
231
|
-
HowToValues.IdButton = 'Sunt gata!';
|
|
232
|
-
HowToValues.SelfieTitile = 'Validare video';
|
|
233
|
-
HowToValues.SelfieSubTitile = 'Este necesară realizarea unei înregistrări video. Respectă intrucțiunile ce vor fi afișate pe ecran.';
|
|
234
|
-
HowToValues.SelfieButton = 'Sunt gata!';
|
|
235
|
-
class LandingValues extends GlobalValues {
|
|
236
|
-
}
|
|
237
|
-
LandingValues.Title = 'Validarea identității la distanță este o procedură simplă și rapidă';
|
|
238
|
-
LandingValues.Description = 'Asigură-te că ai:';
|
|
239
|
-
LandingValues.IdInfo = 'Actul de identitate, în original';
|
|
240
|
-
LandingValues.DeviceInfo = 'Un telefon mobil sau un calculator cu camera web';
|
|
241
|
-
LandingValues.SmsInfo = 'Acces la un telefon mobil ce permite primirea de mesaje SMS';
|
|
242
|
-
LandingValues.Warning = 'ATENȚIE! În cadrul acestui proces se poate utiliza doar cartea de identitate Românească.';
|
|
243
|
-
LandingValues.WarningMd = 'ATENȚIE! In cadrul acestui proces se pot utiliza doar buletinele de identitate din Republica Moldova.';
|
|
244
|
-
LandingValues.Terms = 'Prin continuarea procesului, confirmi că ai citit termenii de utilizare și ești de acord cu aceștia.';
|
|
245
|
-
LandingValues.Button = 'Am înțeles';
|
|
246
|
-
LandingValues.ButtonLeave = 'Nu sunt pregătit';
|
|
247
|
-
class PhoneValidationValues extends GlobalValues {
|
|
248
|
-
}
|
|
249
|
-
PhoneValidationValues.Title = 'Este necesar să validăm numărul tău de telefon';
|
|
250
|
-
PhoneValidationValues.Description = 'Introdu mai jos numarul tau de telefon:';
|
|
251
|
-
PhoneValidationValues.Button = 'Trimite SMS de verificare';
|
|
252
|
-
PhoneValidationValues.Label = 'Numarul tau de telefon';
|
|
253
|
-
class CodeValidationValues extends GlobalValues {
|
|
254
|
-
}
|
|
255
|
-
CodeValidationValues.Title = 'Introdu codul de validare primit prin sms:';
|
|
256
|
-
CodeValidationValues.Description = ' ';
|
|
257
|
-
CodeValidationValues.Button = 'Validează';
|
|
258
|
-
CodeValidationValues.Error = 'Codul introdus nu este valid. Asigură-te că îl introduci corect';
|
|
259
|
-
class CompleteValues extends GlobalValues {
|
|
260
|
-
}
|
|
261
|
-
CompleteValues.Title = 'Procesul a fost finalizat.';
|
|
262
|
-
CompleteValues.Description = 'Vei fi redirecționat în câteva momente.';
|
|
263
|
-
CompleteValues.Message = 'Îți mulțumim!';
|
|
264
|
-
class SessionKeys {
|
|
265
|
-
}
|
|
266
|
-
SessionKeys.FlowStatusKey = 'qbs-ect-flowstatus';
|
|
267
|
-
SessionKeys.RequestIdKey = 'qbs-ect-requestid';
|
|
268
|
-
SessionKeys.TokenKey = 'qbs-ect-token';
|
|
269
|
-
SessionKeys.InitialisedKey = 'qbs-ect-initialised';
|
|
270
|
-
SessionKeys.HasIdBackKey = 'qbs-ect-has-id-back';
|
|
271
|
-
SessionKeys.AgreementValidationKey = 'qbs-ect-agreement-validation';
|
|
272
|
-
SessionKeys.PhoneValidationKey = 'qbs-ect-phone-validation';
|
|
273
|
-
SessionKeys.RefreshDoneKey = 'qbs-ect-refresh-done';
|
|
274
|
-
class IdCaptureValues extends GlobalValues {
|
|
275
|
-
}
|
|
276
|
-
IdCaptureValues.Button = 'Încerc din nou';
|
|
277
|
-
IdCaptureValues.Title = 'Încadrează actul de identitate în chenarul de pe ecran.';
|
|
278
|
-
IdCaptureValues.TitleBack = 'Încadrează spatele actului de identitate în chenarul de pe ecran.';
|
|
279
|
-
IdCaptureValues.TtileRotate = 'Întoarce actul de identitate.';
|
|
280
|
-
IdCaptureValues.ErrorTitleR1 = 'Nu am putut colecta informațiile din actul de identitate!';
|
|
281
|
-
IdCaptureValues.ErrorTitleR2 = 'Te rugăm să mai încerci o dată!';
|
|
282
|
-
IdCaptureValues.ErrorR1 = 'Încadrează actul de identitate în așa fel încât chenarul să se potrivească perfect pe colțurile actului de identitate. Trebuie să fie vizibilă întreaga suprafață a actului de identitate. ';
|
|
283
|
-
IdCaptureValues.ErrorR2 = 'Ai grijă să te afli într-o zonă cu suficientă lumină și să nu acoperi părți ale actului de identitate cu degetele. Ai grijă de asemenea să nu se formeze reflexii de lumină pe suprafața acestuia.';
|
|
284
|
-
IdCaptureValues.IDPoseMapping = {
|
|
285
|
-
0: '',
|
|
286
|
-
1: 'Înclină actul de identitate spre spate.',
|
|
287
|
-
2: '',
|
|
288
|
-
3: '',
|
|
289
|
-
4: '',
|
|
290
|
-
};
|
|
291
|
-
IdCaptureValues.IDPoseDemoMapping = {
|
|
292
|
-
0: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front.mp4',
|
|
293
|
-
1: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_front_tilt.mp4',
|
|
294
|
-
2: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_rotate.mp4',
|
|
295
|
-
3: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back.mp4',
|
|
296
|
-
4: 'https://ekyc.blob.core.windows.net/$web/animations/id/id_back_tilt.mp4',
|
|
297
|
-
};
|
|
298
|
-
IdCaptureValues.Loading = 'Transferăm datele. Asteptați...';
|
|
299
|
-
class SelfieCaptureValues extends GlobalValues {
|
|
300
|
-
}
|
|
301
|
-
SelfieCaptureValues.Title = 'Încadrează fața în chenarul de pe ecran.';
|
|
302
|
-
SelfieCaptureValues.FinalTitle = 'Îndreaptă capul și încadrează fața în chenarul de pe ecran.';
|
|
303
|
-
SelfieCaptureValues.ErrorTitleR1 = 'Procesul a eșuat!';
|
|
304
|
-
SelfieCaptureValues.ErrorTitleR2 = 'Te rugăm să mai încerci o dată!';
|
|
305
|
-
SelfieCaptureValues.ErrorR1 = 'Încadrează fața în așa fel încât chenarul să se suprapună peste linia bărbiei și a frunții, exact așa cum vezi în animația de pe ecran. ';
|
|
306
|
-
SelfieCaptureValues.ErrorR2 = 'Rămâi cu fața încadrată în chenar și execută gestul solicitat după ce animația cu explicația a dispărut de pe ecran.';
|
|
307
|
-
SelfieCaptureValues.Loading = 'Transferăm datele. Asteptați...';
|
|
308
|
-
SelfieCaptureValues.FacePoseMapping = {
|
|
309
|
-
0: 'Întoarce capul spre stânga.',
|
|
310
|
-
1: 'Întoarce capul spre dreapta.',
|
|
311
|
-
2: 'Înclină capul spre spate.',
|
|
312
|
-
3: 'Înclină capul în față.',
|
|
313
|
-
// 4: 'Înclină capul spre stânga.',
|
|
314
|
-
// 5: 'Înclină capul spre dreapta.',
|
|
315
|
-
4: '',
|
|
316
|
-
};
|
|
317
|
-
SelfieCaptureValues.FacePoseDemoMapping = {
|
|
318
|
-
0: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_left.mp4',
|
|
319
|
-
1: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_rotate_right.mp4',
|
|
320
|
-
2: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_back.mp4',
|
|
321
|
-
3: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_front.mp4',
|
|
322
|
-
// 4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_left.mp4',
|
|
323
|
-
// 5: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_tilt_right.mp4',
|
|
324
|
-
4: 'https://ekyc.blob.core.windows.net/$web/animations/selfie/selfie_main.mp4',
|
|
325
|
-
};
|
|
326
|
-
class AgreementInfoValues extends GlobalValues {
|
|
327
|
-
}
|
|
328
|
-
AgreementInfoValues.Title = 'Pentru începerea identificării avem nevoie de acordurile tale:';
|
|
329
|
-
AgreementInfoValues.Button = 'Încep identificarea';
|
|
330
|
-
AgreementInfoValues.Terms = 'Am luat la cunoștință și sunt de acord cu Termenii și condițiile generale de utilizare';
|
|
331
|
-
AgreementInfoValues.Agreement = 'Îmi exprim acordul pentru prelucrarea datelor cu caracter personal';
|
|
332
|
-
class AgreementCheckValues extends GlobalValues {
|
|
333
|
-
}
|
|
334
|
-
AgreementCheckValues.ButtonYes = 'Sunt de acord';
|
|
335
|
-
AgreementCheckValues.ButtonNo = 'Nu sunt de acord';
|
|
336
|
-
class ApiUrls {
|
|
337
|
-
constructor() {
|
|
338
|
-
this.uriEnv = '/';
|
|
339
|
-
this.uriEnv = state.environment == 'QA' ? '/dev_' : '/';
|
|
340
|
-
this.OtpSend = this.uriEnv + 'validation/otp/send';
|
|
341
|
-
this.OtpCheck = this.uriEnv + 'validation/otp/check';
|
|
342
|
-
this.IdentityInsert = this.uriEnv + 'validation/identity/insert';
|
|
343
|
-
this.UploadCapture = this.uriEnv + 'validation/upload/capture';
|
|
344
|
-
this.GetAgreement = this.uriEnv + 'validation/agreement/content';
|
|
345
|
-
this.GenerateAgreement = this.uriEnv + 'validation/agreement/generate';
|
|
346
|
-
this.SendLink = this.uriEnv + 'validation/otp/sendlink';
|
|
347
|
-
this.GetStatus = this.uriEnv + 'validation/identity/status';
|
|
348
|
-
this.AddLog = this.uriEnv + 'validation/logs/add';
|
|
349
|
-
this.AddStep = this.uriEnv + 'validation/logs/step';
|
|
350
|
-
this.AbortRequest = this.uriEnv + 'validation/identity/abort';
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
class MobileRedirectValues extends GlobalValues {
|
|
354
|
-
}
|
|
355
|
-
MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu un smartphone.';
|
|
356
|
-
MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
|
|
357
|
-
MobileRedirectValues.Validation = 'Număr de telefon invalid!';
|
|
358
|
-
MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
|
|
359
|
-
MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
360
|
-
class CameraErrorValues extends GlobalValues {
|
|
361
|
-
}
|
|
362
|
-
CameraErrorValues.Title = 'Procesul de indetificare nu poate continua.';
|
|
363
|
-
CameraErrorValues.Description = 'Nu am putut detecta nicio camera. Cel mai probabil nu ai acordat drept de acces acestui site, Te rugam sa dai acces si sa apesi butonul de mai jos dupa aceea.';
|
|
364
|
-
CameraErrorValues.Button = 'Reincep procesul';
|
|
365
|
-
CameraErrorValues.HowToLink = 'https://ekyc.blob.core.windows.net/$web/animations/enable_permissions_sm.mp4';
|
|
366
|
-
|
|
367
|
-
const { state, onChange } = createStore({
|
|
368
|
-
flowStatus: FlowStatus.NONE,
|
|
369
|
-
environment: 'PROD',
|
|
370
|
-
debug: false,
|
|
371
|
-
requestId: '',
|
|
372
|
-
redirectId: '',
|
|
373
|
-
initialised: false,
|
|
374
|
-
token: '',
|
|
375
|
-
cameraIds: [],
|
|
376
|
-
cameraId: '',
|
|
377
|
-
hasIdBack: false,
|
|
378
|
-
hasSelfieGesture: false,
|
|
379
|
-
hasIdTilt: false,
|
|
380
|
-
agreementsValidation: true,
|
|
381
|
-
phoneValidation: true,
|
|
382
|
-
phoneNumber: '',
|
|
383
|
-
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
384
|
-
device: null,
|
|
385
|
-
recordingRetryCount: 0,
|
|
386
|
-
});
|
|
387
|
-
onChange('environment', value => {
|
|
388
|
-
state.debug = value == 'QA';
|
|
389
|
-
});
|
|
390
|
-
onChange('flowStatus', value => {
|
|
391
|
-
sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
|
|
392
|
-
});
|
|
393
|
-
onChange('token', value => {
|
|
394
|
-
sessionStorage.setItem(SessionKeys.TokenKey, value);
|
|
395
|
-
});
|
|
396
|
-
onChange('requestId', value => {
|
|
397
|
-
sessionStorage.setItem(SessionKeys.RequestIdKey, value);
|
|
398
|
-
});
|
|
399
|
-
onChange('initialised', value => {
|
|
400
|
-
sessionStorage.setItem(SessionKeys.InitialisedKey, String(value));
|
|
401
|
-
});
|
|
402
|
-
onChange('hasIdBack', value => {
|
|
403
|
-
sessionStorage.setItem(SessionKeys.HasIdBackKey, String(value));
|
|
404
|
-
});
|
|
405
|
-
onChange('agreementsValidation', value => {
|
|
406
|
-
sessionStorage.setItem(SessionKeys.AgreementValidationKey, String(value));
|
|
407
|
-
});
|
|
408
|
-
onChange('phoneValidation', value => {
|
|
409
|
-
sessionStorage.setItem(SessionKeys.PhoneValidationKey, String(value));
|
|
410
|
-
});
|
|
411
|
-
|
|
412
17
|
var FlowSteps;
|
|
413
18
|
(function (FlowSteps) {
|
|
414
19
|
FlowSteps[FlowSteps["ComponentLoaded"] = 'component-loaded'] = "ComponentLoaded";
|
|
@@ -449,7 +54,7 @@ class ApiCall {
|
|
|
449
54
|
reader.onload = () => resolve(reader.result);
|
|
450
55
|
reader.onerror = error => reject(error);
|
|
451
56
|
});
|
|
452
|
-
this.urls = new ApiUrls();
|
|
57
|
+
this.urls = new store.ApiUrls();
|
|
453
58
|
}
|
|
454
59
|
// private async http2<T>(method: string, url: string, data: string): Promise<T> {
|
|
455
60
|
// return new Promise((resolve, reject) => {
|
|
@@ -488,12 +93,12 @@ class ApiCall {
|
|
|
488
93
|
}
|
|
489
94
|
}
|
|
490
95
|
async post(url, data, withRetry = true) {
|
|
491
|
-
var request = new Request(state.apiBaseUrl + url, {
|
|
96
|
+
var request = new Request(store.state.apiBaseUrl + url, {
|
|
492
97
|
method: 'POST',
|
|
493
98
|
body: data,
|
|
494
99
|
headers: {
|
|
495
100
|
'Content-Type': 'application/json',
|
|
496
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
101
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
497
102
|
},
|
|
498
103
|
});
|
|
499
104
|
try {
|
|
@@ -505,24 +110,24 @@ class ApiCall {
|
|
|
505
110
|
}
|
|
506
111
|
this.AddLog('Error in post ', ex);
|
|
507
112
|
try {
|
|
508
|
-
var request2 = new Request(state.apiBaseUrl + url, {
|
|
113
|
+
var request2 = new Request(store.state.apiBaseUrl + url, {
|
|
509
114
|
method: 'POST',
|
|
510
115
|
body: data,
|
|
511
116
|
headers: {
|
|
512
117
|
'Content-Type': 'application/json',
|
|
513
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
118
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
514
119
|
},
|
|
515
120
|
});
|
|
516
121
|
return await this.http(request2);
|
|
517
122
|
}
|
|
518
123
|
catch (ex2) {
|
|
519
124
|
this.AddLog('Error in post ', ex2);
|
|
520
|
-
var request3 = new Request(state.apiBaseUrl + url, {
|
|
125
|
+
var request3 = new Request(store.state.apiBaseUrl + url, {
|
|
521
126
|
method: 'POST',
|
|
522
127
|
body: data,
|
|
523
128
|
headers: {
|
|
524
129
|
'Content-Type': 'application/json',
|
|
525
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
130
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
526
131
|
},
|
|
527
132
|
});
|
|
528
133
|
return await this.http(request3);
|
|
@@ -530,11 +135,11 @@ class ApiCall {
|
|
|
530
135
|
}
|
|
531
136
|
}
|
|
532
137
|
async get(url, withRetry = true) {
|
|
533
|
-
var request = new Request(state.apiBaseUrl + url, {
|
|
138
|
+
var request = new Request(store.state.apiBaseUrl + url, {
|
|
534
139
|
method: 'GET',
|
|
535
140
|
headers: {
|
|
536
141
|
'Content-Type': 'application/json',
|
|
537
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
142
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
538
143
|
},
|
|
539
144
|
});
|
|
540
145
|
try {
|
|
@@ -546,22 +151,22 @@ class ApiCall {
|
|
|
546
151
|
}
|
|
547
152
|
this.AddLog('Error in get ', ex);
|
|
548
153
|
try {
|
|
549
|
-
var request2 = new Request(state.apiBaseUrl + url, {
|
|
154
|
+
var request2 = new Request(store.state.apiBaseUrl + url, {
|
|
550
155
|
method: 'GET',
|
|
551
156
|
headers: {
|
|
552
157
|
'Content-Type': 'application/json',
|
|
553
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
158
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
554
159
|
},
|
|
555
160
|
});
|
|
556
161
|
return await this.http(request2);
|
|
557
162
|
}
|
|
558
163
|
catch (ex2) {
|
|
559
164
|
this.AddLog('Error in get ', ex2);
|
|
560
|
-
var request3 = new Request(state.apiBaseUrl + url, {
|
|
165
|
+
var request3 = new Request(store.state.apiBaseUrl + url, {
|
|
561
166
|
method: 'GET',
|
|
562
167
|
headers: {
|
|
563
168
|
'Content-Type': 'application/json',
|
|
564
|
-
'Authorization': 'IDKYC-TOKEN ' + state.token,
|
|
169
|
+
'Authorization': 'IDKYC-TOKEN ' + store.state.token,
|
|
565
170
|
},
|
|
566
171
|
});
|
|
567
172
|
return await this.http(request3);
|
|
@@ -579,25 +184,25 @@ class ApiCall {
|
|
|
579
184
|
return jsonResp.valid;
|
|
580
185
|
}
|
|
581
186
|
async AddIdentificationRequest(deviceInfo, version) {
|
|
582
|
-
if (state.debug)
|
|
583
|
-
console.log('Calling identity request with store:' + JSON.stringify(state));
|
|
187
|
+
if (store.state.debug)
|
|
188
|
+
console.log('Calling identity request with store:' + JSON.stringify(store.state));
|
|
584
189
|
let data = {
|
|
585
|
-
requestId: state.requestId,
|
|
190
|
+
requestId: store.state.requestId,
|
|
586
191
|
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
587
|
-
redirectId: state.redirectId,
|
|
588
|
-
phoneNumber: state.phoneNumber,
|
|
192
|
+
redirectId: store.state.redirectId,
|
|
193
|
+
phoneNumber: store.state.phoneNumber,
|
|
589
194
|
version: version,
|
|
590
195
|
};
|
|
591
196
|
let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
|
|
592
|
-
if (state.requestId == '') {
|
|
593
|
-
state.requestId = jsonResp.requestId;
|
|
594
|
-
}
|
|
595
|
-
state.hasIdBack = jsonResp.hasIdBack;
|
|
596
|
-
state.hasIdTilt = jsonResp.hasIdTilt;
|
|
597
|
-
state.hasSelfieGesture = jsonResp.hasSelfieGesture;
|
|
598
|
-
state.agreementsValidation = jsonResp.agreementsValidation;
|
|
599
|
-
state.phoneValidation = jsonResp.phoneValidation;
|
|
600
|
-
state.phoneNumber = jsonResp.phoneNumber;
|
|
197
|
+
if (store.state.requestId == '') {
|
|
198
|
+
store.state.requestId = jsonResp.requestId;
|
|
199
|
+
}
|
|
200
|
+
store.state.hasIdBack = jsonResp.hasIdBack;
|
|
201
|
+
store.state.hasIdTilt = jsonResp.hasIdTilt;
|
|
202
|
+
store.state.hasSelfieGesture = jsonResp.hasSelfieGesture;
|
|
203
|
+
store.state.agreementsValidation = jsonResp.agreementsValidation;
|
|
204
|
+
store.state.phoneValidation = jsonResp.phoneValidation;
|
|
205
|
+
store.state.phoneNumber = jsonResp.phoneNumber;
|
|
601
206
|
return true;
|
|
602
207
|
}
|
|
603
208
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -607,10 +212,10 @@ class ApiCall {
|
|
|
607
212
|
data: await this.toBase64(file),
|
|
608
213
|
};
|
|
609
214
|
let respJson = await this.post(this.urls.UploadCapture, JSON.stringify(data));
|
|
610
|
-
if (!state.hasIdBack && type == 'IdFront') {
|
|
215
|
+
if (!store.state.hasIdBack && type == 'IdFront') {
|
|
611
216
|
return respJson.isValid;
|
|
612
217
|
}
|
|
613
|
-
if (state.hasIdBack && type == 'IdBack') {
|
|
218
|
+
if (store.state.hasIdBack && type == 'IdBack') {
|
|
614
219
|
return respJson.isValid;
|
|
615
220
|
}
|
|
616
221
|
if (type == 'Selfie') {
|
|
@@ -619,11 +224,11 @@ class ApiCall {
|
|
|
619
224
|
return true;
|
|
620
225
|
}
|
|
621
226
|
async GetAgreement(agreementType) {
|
|
622
|
-
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + state.requestId);
|
|
227
|
+
let resp = await this.get(this.urls.GetAgreement + '?type=' + agreementType + '&requestId=' + store.state.requestId);
|
|
623
228
|
return resp.htmlText;
|
|
624
229
|
}
|
|
625
230
|
async GenerateAgreement(agreementType) {
|
|
626
|
-
let data = { requestId: state.requestId, documentType: agreementType };
|
|
231
|
+
let data = { requestId: store.state.requestId, documentType: agreementType };
|
|
627
232
|
let resp = await this.post(this.urls.GenerateAgreement, JSON.stringify(data));
|
|
628
233
|
return resp.generation;
|
|
629
234
|
}
|
|
@@ -632,15 +237,15 @@ class ApiCall {
|
|
|
632
237
|
return OrderStatuses[resp.status];
|
|
633
238
|
}
|
|
634
239
|
async SendLink(link, phoneNumber) {
|
|
635
|
-
let data = { requestId: state.requestId, link: link, phoneNumber: phoneNumber };
|
|
240
|
+
let data = { requestId: store.state.requestId, link: link, phoneNumber: phoneNumber };
|
|
636
241
|
let resp = await this.post(this.urls.SendLink, JSON.stringify(data));
|
|
637
242
|
return resp.sent;
|
|
638
243
|
}
|
|
639
244
|
async AddLog(error, context) {
|
|
640
245
|
try {
|
|
641
246
|
let data = {
|
|
642
|
-
requestId: state.requestId,
|
|
643
|
-
action: FlowStatus[state.flowStatus],
|
|
247
|
+
requestId: store.state.requestId,
|
|
248
|
+
action: store.FlowStatus[store.state.flowStatus],
|
|
644
249
|
message: JSON.stringify({ error, context }),
|
|
645
250
|
};
|
|
646
251
|
let result = await this.post(this.urls.AddLog, JSON.stringify(data), false);
|
|
@@ -649,12 +254,12 @@ class ApiCall {
|
|
|
649
254
|
catch (_a) { }
|
|
650
255
|
}
|
|
651
256
|
async AddStep(step, moment) {
|
|
652
|
-
let data = { requestId: state.requestId, redirectId: state.redirectId, step: FlowSteps[step], moment: FlowMoments[moment], timestamp: new Date().toISOString() };
|
|
257
|
+
let data = { requestId: store.state.requestId, redirectId: store.state.redirectId, step: FlowSteps[step], moment: FlowMoments[moment], timestamp: new Date().toISOString() };
|
|
653
258
|
let result = await this.post(this.urls.AddStep, JSON.stringify(data));
|
|
654
259
|
return result.saved;
|
|
655
260
|
}
|
|
656
261
|
async AbortRequest() {
|
|
657
|
-
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
|
|
262
|
+
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: store.state.requestId }));
|
|
658
263
|
return result.saved;
|
|
659
264
|
}
|
|
660
265
|
}
|
|
@@ -685,7 +290,7 @@ const AgreementCheck = class {
|
|
|
685
290
|
this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
|
|
686
291
|
}
|
|
687
292
|
render() {
|
|
688
|
-
let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "scroll", 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) }, AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
293
|
+
let content = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "scroll", 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) }, store.AgreementCheckValues.ButtonNo), index.h("button", { class: "normal-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(true) }, store.AgreementCheckValues.ButtonYes)), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.AgreementInfoValues.FooterText))))));
|
|
689
294
|
return this.htmlContent ? content : index.h("div", null);
|
|
690
295
|
}
|
|
691
296
|
};
|
|
@@ -866,8 +471,8 @@ class BaseComponent {
|
|
|
866
471
|
this.apiCall = new ApiCall();
|
|
867
472
|
if (step)
|
|
868
473
|
this.flowStep = step;
|
|
869
|
-
if (!state.device) {
|
|
870
|
-
state.device = new DeviceDetection().getDevice();
|
|
474
|
+
if (!store.state.device) {
|
|
475
|
+
store.state.device = new DeviceDetection().getDevice();
|
|
871
476
|
}
|
|
872
477
|
}
|
|
873
478
|
setEventEmitter(event) {
|
|
@@ -941,7 +546,7 @@ const AgreementInfo = class {
|
|
|
941
546
|
}
|
|
942
547
|
async buttonClick() {
|
|
943
548
|
if (this.agreementsChecked && this.termsChecked) {
|
|
944
|
-
state.flowStatus = FlowStatus.PHONE;
|
|
549
|
+
store.state.flowStatus = store.FlowStatus.PHONE;
|
|
945
550
|
}
|
|
946
551
|
}
|
|
947
552
|
agreementAcceptanceEmitted(data) {
|
|
@@ -963,7 +568,7 @@ const AgreementInfo = class {
|
|
|
963
568
|
render() {
|
|
964
569
|
let agreementsCheck = index.h("agreement-check", { agreementType: "agreement" });
|
|
965
570
|
let termsCheck = index.h("agreement-check", { agreementType: "terms" });
|
|
966
|
-
let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, 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 }), 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 }), 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() }, AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
571
|
+
let mainComp = (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.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 }), store.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 }), store.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() }, store.AgreementInfoValues.Button), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.AgreementInfoValues.FooterText))))));
|
|
967
572
|
return this.openAgreements ? agreementsCheck : this.openTerms ? termsCheck : mainComp;
|
|
968
573
|
}
|
|
969
574
|
};
|
|
@@ -2271,7 +1876,7 @@ class ML5 {
|
|
|
2271
1876
|
}
|
|
2272
1877
|
async init() {
|
|
2273
1878
|
return new Promise(async (resolve) => {
|
|
2274
|
-
const modelPath = state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
|
|
1879
|
+
const modelPath = store.state.hasIdBack ? 'https://ekyc.blob.core.windows.net/$web/md/model.json' : 'https://ekyc.blob.core.windows.net/$web/model.json';
|
|
2275
1880
|
this.classifier = await ml5.imageClassifier(modelPath, this.loaded);
|
|
2276
1881
|
this.faceapi = await ml5.faceApi({ withLandmarks: true, withDescriptors: false }, this.loaded);
|
|
2277
1882
|
//warmup
|
|
@@ -2283,13 +1888,13 @@ class ML5 {
|
|
|
2283
1888
|
});
|
|
2284
1889
|
}
|
|
2285
1890
|
loaded() {
|
|
2286
|
-
if (state.debug)
|
|
1891
|
+
if (store.state.debug)
|
|
2287
1892
|
console.log('ML5 LOADED!!!');
|
|
2288
1893
|
}
|
|
2289
1894
|
gotResults(error, results) {
|
|
2290
|
-
if (state.debug)
|
|
1895
|
+
if (store.state.debug)
|
|
2291
1896
|
console.log(error);
|
|
2292
|
-
if (state.debug)
|
|
1897
|
+
if (store.state.debug)
|
|
2293
1898
|
console.log(results);
|
|
2294
1899
|
}
|
|
2295
1900
|
}
|
|
@@ -2308,8 +1913,8 @@ const blobToBase64 = (blob) => {
|
|
|
2308
1913
|
const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
2309
1914
|
const getLogMessage = (param_req_id = '', param_redirect_id = '', param_token = '') => {
|
|
2310
1915
|
return {
|
|
2311
|
-
store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
|
|
2312
|
-
session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
|
|
1916
|
+
store_values: { request_id: store.state.requestId, redirect_id: store.state.redirectId, token: store.state.token },
|
|
1917
|
+
session_values: { request_id: sessionStorage.getItem(store.SessionKeys.RequestIdKey), token: sessionStorage.getItem(store.SessionKeys.TokenKey) },
|
|
2313
1918
|
parameter_values: { request_id: param_req_id, redirect_id: param_redirect_id, token: param_token },
|
|
2314
1919
|
};
|
|
2315
1920
|
};
|
|
@@ -2585,7 +2190,7 @@ class FaceML5Detector {
|
|
|
2585
2190
|
this.stream.autoCapturing();
|
|
2586
2191
|
// this.frontFace = new FaceLandmarks(results[0], this.width, this.height);
|
|
2587
2192
|
await this.drawFrame('green');
|
|
2588
|
-
await delay(GlobalValues.VideoLenght);
|
|
2193
|
+
await delay(store.GlobalValues.VideoLenght);
|
|
2589
2194
|
}
|
|
2590
2195
|
}
|
|
2591
2196
|
}
|
|
@@ -2656,7 +2261,7 @@ class FaceML5Detector {
|
|
|
2656
2261
|
if (this.frontFace == null) {
|
|
2657
2262
|
this.frontFace = face;
|
|
2658
2263
|
// await this.drawFrame('green');
|
|
2659
|
-
if (state.debug)
|
|
2264
|
+
if (store.state.debug)
|
|
2660
2265
|
console.log('face ok');
|
|
2661
2266
|
}
|
|
2662
2267
|
else if (this.frontFace != null && this.presentedFacePose == null) {
|
|
@@ -5249,8 +4854,8 @@ class Stream {
|
|
|
5249
4854
|
// this.dropMask();
|
|
5250
4855
|
// if (this.faceDetection) Detector.getInstance().stopDetector();
|
|
5251
4856
|
};
|
|
5252
|
-
this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
|
|
5253
|
-
this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
|
|
4857
|
+
this.idML5Detector = IDML5Detector.getInstance(this, store.state.device.isMobile);
|
|
4858
|
+
this.faceML5Detector = FaceML5Detector.getInstance(this, store.state.device.isMobile);
|
|
5254
4859
|
this.verificationMode = mode;
|
|
5255
4860
|
}
|
|
5256
4861
|
static getInstance(mode) {
|
|
@@ -5318,7 +4923,7 @@ class Stream {
|
|
|
5318
4923
|
return;
|
|
5319
4924
|
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
5320
4925
|
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
|
|
5321
|
-
if (state.device.mobileOS == MobileOS.iOS || state.device.browser == Browser.Safari)
|
|
4926
|
+
if (store.state.device.mobileOS == MobileOS.iOS || store.state.device.browser == Browser.Safari)
|
|
5322
4927
|
options.mimeType = Stream.mp4MimeType.mime;
|
|
5323
4928
|
}
|
|
5324
4929
|
this.recordedChunks = [];
|
|
@@ -5369,7 +4974,7 @@ class Stream {
|
|
|
5369
4974
|
const context = canvas.getContext('2d');
|
|
5370
4975
|
context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
|
|
5371
4976
|
canvas.toBlob((frame) => {
|
|
5372
|
-
if (frame.type === ImageFormat.JPEG && !state.device.isAppleDevice) {
|
|
4977
|
+
if (frame.type === ImageFormat.JPEG && !store.state.device.isAppleDevice) {
|
|
5373
4978
|
try {
|
|
5374
4979
|
addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
|
|
5375
4980
|
}
|
|
@@ -5471,7 +5076,7 @@ const Camera = class {
|
|
|
5471
5076
|
render() {
|
|
5472
5077
|
let cameraVideoClass = 'cameraVideo';
|
|
5473
5078
|
let cameraCanvasClass = 'cameraCanvas';
|
|
5474
|
-
if (state.device.isDesktop) {
|
|
5079
|
+
if (store.state.device.isDesktop) {
|
|
5475
5080
|
cameraVideoClass = 'cameraVideoSelfieDesk';
|
|
5476
5081
|
cameraCanvasClass = 'cameraCanvasSelfieDesk';
|
|
5477
5082
|
}
|
|
@@ -5523,22 +5128,22 @@ const CameraError = class {
|
|
|
5523
5128
|
}
|
|
5524
5129
|
async componentWillLoad() {
|
|
5525
5130
|
this.buttonDisabled = false;
|
|
5526
|
-
this.title = CameraErrorValues.Title;
|
|
5527
|
-
this.description = CameraErrorValues.Description;
|
|
5528
|
-
this.buttonText = CameraErrorValues.Button;
|
|
5131
|
+
this.title = store.CameraErrorValues.Title;
|
|
5132
|
+
this.description = store.CameraErrorValues.Description;
|
|
5133
|
+
this.buttonText = store.CameraErrorValues.Button;
|
|
5529
5134
|
}
|
|
5530
5135
|
async componentDidLoad() {
|
|
5531
5136
|
await this.baseComponent.initialize();
|
|
5532
|
-
if (state.device.mobileOS != MobileOS.iOS) {
|
|
5533
|
-
this.demoVideo.src = CameraErrorValues.HowToLink;
|
|
5137
|
+
if (store.state.device.mobileOS != MobileOS.iOS) {
|
|
5138
|
+
this.demoVideo.src = store.CameraErrorValues.HowToLink;
|
|
5534
5139
|
this.demoVideo.loop = true;
|
|
5535
5140
|
this.demoVideo.play();
|
|
5536
5141
|
}
|
|
5537
5142
|
else {
|
|
5538
|
-
var loaded = sessionStorage.getItem(SessionKeys.RefreshDoneKey);
|
|
5143
|
+
var loaded = sessionStorage.getItem(store.SessionKeys.RefreshDoneKey);
|
|
5539
5144
|
if (loaded === 'true') {
|
|
5540
|
-
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
5541
|
-
state.flowStatus = FlowStatus.LANDING;
|
|
5145
|
+
sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'false');
|
|
5146
|
+
store.state.flowStatus = store.FlowStatus.LANDING;
|
|
5542
5147
|
}
|
|
5543
5148
|
}
|
|
5544
5149
|
}
|
|
@@ -5547,16 +5152,16 @@ const CameraError = class {
|
|
|
5547
5152
|
}
|
|
5548
5153
|
async buttonClick() {
|
|
5549
5154
|
this.buttonDisabled = true;
|
|
5550
|
-
if (state.device.mobileOS == MobileOS.iOS) {
|
|
5551
|
-
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'true');
|
|
5155
|
+
if (store.state.device.mobileOS == MobileOS.iOS) {
|
|
5156
|
+
sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'true');
|
|
5552
5157
|
window.location.reload();
|
|
5553
5158
|
}
|
|
5554
5159
|
else {
|
|
5555
|
-
state.flowStatus = FlowStatus.LANDING;
|
|
5160
|
+
store.state.flowStatus = store.FlowStatus.LANDING;
|
|
5556
5161
|
}
|
|
5557
5162
|
}
|
|
5558
5163
|
render() {
|
|
5559
|
-
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: 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" }, CameraErrorValues.FooterText))))));
|
|
5164
|
+
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: store.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" }, store.CameraErrorValues.FooterText))))));
|
|
5560
5165
|
}
|
|
5561
5166
|
};
|
|
5562
5167
|
CameraError.style = cameraErrorCss;
|
|
@@ -5575,16 +5180,16 @@ const CaptureError = class {
|
|
|
5575
5180
|
async componentWillLoad() {
|
|
5576
5181
|
this.buttonEnabled = false;
|
|
5577
5182
|
if (this.type == 'ID') {
|
|
5578
|
-
this.titleR1 = IdCaptureValues.ErrorTitleR1;
|
|
5579
|
-
this.titleR2 = IdCaptureValues.ErrorTitleR2;
|
|
5580
|
-
this.descriptionR1 = IdCaptureValues.ErrorR1;
|
|
5581
|
-
this.descriptionR2 = IdCaptureValues.ErrorR2;
|
|
5183
|
+
this.titleR1 = store.IdCaptureValues.ErrorTitleR1;
|
|
5184
|
+
this.titleR2 = store.IdCaptureValues.ErrorTitleR2;
|
|
5185
|
+
this.descriptionR1 = store.IdCaptureValues.ErrorR1;
|
|
5186
|
+
this.descriptionR2 = store.IdCaptureValues.ErrorR2;
|
|
5582
5187
|
}
|
|
5583
5188
|
if (this.type == 'LIVENESS') {
|
|
5584
|
-
this.titleR1 = SelfieCaptureValues.ErrorTitleR1;
|
|
5585
|
-
this.titleR2 = SelfieCaptureValues.ErrorTitleR2;
|
|
5586
|
-
this.descriptionR1 = SelfieCaptureValues.ErrorR1;
|
|
5587
|
-
this.descriptionR2 = SelfieCaptureValues.ErrorR2;
|
|
5189
|
+
this.titleR1 = store.SelfieCaptureValues.ErrorTitleR1;
|
|
5190
|
+
this.titleR2 = store.SelfieCaptureValues.ErrorTitleR2;
|
|
5191
|
+
this.descriptionR1 = store.SelfieCaptureValues.ErrorR1;
|
|
5192
|
+
this.descriptionR2 = store.SelfieCaptureValues.ErrorR2;
|
|
5588
5193
|
}
|
|
5589
5194
|
}
|
|
5590
5195
|
async componentDidLoad() {
|
|
@@ -5593,7 +5198,7 @@ const CaptureError = class {
|
|
|
5593
5198
|
this.buttonText = i.toString();
|
|
5594
5199
|
await delay(1000);
|
|
5595
5200
|
}
|
|
5596
|
-
this.buttonText = IdCaptureValues.Button;
|
|
5201
|
+
this.buttonText = store.IdCaptureValues.Button;
|
|
5597
5202
|
this.buttonEnabled = true;
|
|
5598
5203
|
}
|
|
5599
5204
|
async buttonClick() {
|
|
@@ -5602,7 +5207,7 @@ const CaptureError = class {
|
|
|
5602
5207
|
this.eventCaptureErrorDone.emit();
|
|
5603
5208
|
}
|
|
5604
5209
|
render() {
|
|
5605
|
-
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" }, IdCaptureValues.FooterText))))));
|
|
5210
|
+
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" }, store.IdCaptureValues.FooterText))))));
|
|
5606
5211
|
}
|
|
5607
5212
|
};
|
|
5608
5213
|
CaptureError.style = captureErrorCss;
|
|
@@ -5617,7 +5222,7 @@ const EndRedirect = class {
|
|
|
5617
5222
|
Events.flowCompleted();
|
|
5618
5223
|
}
|
|
5619
5224
|
render() {
|
|
5620
|
-
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, 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" }, CompleteValues.Message), index.h("p", null, state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, CompleteValues.FooterText)))));
|
|
5225
|
+
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.CompleteValues.Title), index.h("p", { class: "main-text font-size-18 mt-8 text-center" }, store.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" }, store.CompleteValues.Message), index.h("p", null, store.state.requestId)), index.h("div", { class: "btn-buletin" }, index.h("p", { class: "main-text font-size-18 text-center mb-0" }, store.CompleteValues.FooterText)))));
|
|
5621
5226
|
}
|
|
5622
5227
|
};
|
|
5623
5228
|
EndRedirect.style = endRedirectCss;
|
|
@@ -5632,7 +5237,7 @@ const ErrorEnd = class {
|
|
|
5632
5237
|
}
|
|
5633
5238
|
componentDidLoad() { }
|
|
5634
5239
|
render() {
|
|
5635
|
-
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, state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
|
|
5240
|
+
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, store.state.requestId)), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.message)))));
|
|
5636
5241
|
}
|
|
5637
5242
|
};
|
|
5638
5243
|
ErrorEnd.style = errorEndCss;
|
|
@@ -5654,31 +5259,31 @@ const HowToInfo = class {
|
|
|
5654
5259
|
componentWillLoad() {
|
|
5655
5260
|
this.subTitle = '';
|
|
5656
5261
|
this.buttonEnabled = true;
|
|
5657
|
-
if (state.flowStatus == FlowStatus.ID) {
|
|
5658
|
-
this.topTitle = HowToValues.IdTitile;
|
|
5262
|
+
if (store.state.flowStatus == store.FlowStatus.ID) {
|
|
5263
|
+
this.topTitle = store.HowToValues.IdTitile;
|
|
5659
5264
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
|
|
5660
|
-
this.buttonText = HowToValues.IdButton;
|
|
5265
|
+
this.buttonText = store.HowToValues.IdButton;
|
|
5661
5266
|
if (this.idSide == 'front') {
|
|
5662
5267
|
this.baseComponent = new BaseComponent(FlowSteps.CiFrontHowTo);
|
|
5663
|
-
this.subTitle = HowToValues.IdSubTitileFace;
|
|
5268
|
+
this.subTitle = store.HowToValues.IdSubTitileFace;
|
|
5664
5269
|
}
|
|
5665
5270
|
if (this.idSide == 'back') {
|
|
5666
5271
|
this.baseComponent = new BaseComponent(FlowSteps.CiBackHowTo);
|
|
5667
|
-
this.subTitle = HowToValues.IdSubTitileBack;
|
|
5272
|
+
this.subTitle = store.HowToValues.IdSubTitileBack;
|
|
5668
5273
|
}
|
|
5669
5274
|
}
|
|
5670
|
-
if (state.flowStatus == FlowStatus.LIVENESS) {
|
|
5275
|
+
if (store.state.flowStatus == store.FlowStatus.LIVENESS) {
|
|
5671
5276
|
this.baseComponent = new BaseComponent(FlowSteps.SelfieHowTo);
|
|
5672
|
-
this.topTitle = HowToValues.SelfieTitile;
|
|
5673
|
-
this.subTitle = HowToValues.SelfieSubTitile;
|
|
5277
|
+
this.topTitle = store.HowToValues.SelfieTitile;
|
|
5278
|
+
this.subTitle = store.HowToValues.SelfieSubTitile;
|
|
5674
5279
|
this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
|
|
5675
|
-
this.buttonText = HowToValues.SelfieButton;
|
|
5280
|
+
this.buttonText = store.HowToValues.SelfieButton;
|
|
5676
5281
|
}
|
|
5677
5282
|
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
5678
5283
|
}
|
|
5679
5284
|
render() {
|
|
5680
5285
|
let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
5681
|
-
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" }, HowToValues.FooterText))))));
|
|
5286
|
+
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" }, store.HowToValues.FooterText))))));
|
|
5682
5287
|
}
|
|
5683
5288
|
};
|
|
5684
5289
|
HowToInfo.style = howToInfoCss;
|
|
@@ -5797,8 +5402,8 @@ class Cameras {
|
|
|
5797
5402
|
let cam = new Cameras();
|
|
5798
5403
|
let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
|
|
5799
5404
|
var recommCamera = cam.GetRecommendedCamera(cameras);
|
|
5800
|
-
state.cameraIds = cameras.map(camera => camera.deviceId);
|
|
5801
|
-
state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
5405
|
+
store.state.cameraIds = cameras.map(camera => camera.deviceId);
|
|
5406
|
+
store.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
5802
5407
|
return true;
|
|
5803
5408
|
}
|
|
5804
5409
|
catch (e) {
|
|
@@ -5857,19 +5462,19 @@ const IdBackCapture = class {
|
|
|
5857
5462
|
}
|
|
5858
5463
|
async componentDidLoad() {
|
|
5859
5464
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
5860
|
-
this.titleMesage = IdCaptureValues.TtileRotate;
|
|
5861
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
5465
|
+
this.titleMesage = store.IdCaptureValues.TtileRotate;
|
|
5466
|
+
this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
|
|
5862
5467
|
this.demoVideo.play();
|
|
5863
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
5864
|
-
this.titleMesage = IdCaptureValues.TitleBack;
|
|
5865
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
|
|
5468
|
+
await delay(store.IdCaptureValues.VideoLenght);
|
|
5469
|
+
this.titleMesage = store.IdCaptureValues.TitleBack;
|
|
5470
|
+
this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.BackStraight];
|
|
5866
5471
|
this.demoVideo.play();
|
|
5867
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
5472
|
+
await delay(store.IdCaptureValues.VideoLenght);
|
|
5868
5473
|
this.showDemo = false;
|
|
5869
5474
|
this.openCamera();
|
|
5870
5475
|
}
|
|
5871
5476
|
async openCamera() {
|
|
5872
|
-
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5477
|
+
const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
|
|
5873
5478
|
setTimeout(() => {
|
|
5874
5479
|
navigator.mediaDevices
|
|
5875
5480
|
.getUserMedia(constraints)
|
|
@@ -5898,7 +5503,7 @@ const IdBackCapture = class {
|
|
|
5898
5503
|
if (this.verified)
|
|
5899
5504
|
return;
|
|
5900
5505
|
this.verified = true;
|
|
5901
|
-
this.titleMesage = IdCaptureValues.Loading;
|
|
5506
|
+
this.titleMesage = store.IdCaptureValues.Loading;
|
|
5902
5507
|
this.closeCamera();
|
|
5903
5508
|
this.showDemo = true;
|
|
5904
5509
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -5923,7 +5528,7 @@ const IdBackCapture = class {
|
|
|
5923
5528
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
5924
5529
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
5925
5530
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
5926
|
-
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" }, IdCaptureValues.FooterText)))));
|
|
5531
|
+
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" }, store.IdCaptureValues.FooterText)))));
|
|
5927
5532
|
}
|
|
5928
5533
|
get component() { return index.getElement(this); }
|
|
5929
5534
|
};
|
|
@@ -5959,7 +5564,7 @@ const IdCapture = class {
|
|
|
5959
5564
|
this.cameraSize = event.detail;
|
|
5960
5565
|
}
|
|
5961
5566
|
async componentWillLoad() {
|
|
5962
|
-
this.titleMesage = IdCaptureValues.Title;
|
|
5567
|
+
this.titleMesage = store.IdCaptureValues.Title;
|
|
5963
5568
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
5964
5569
|
if (!navigator.mediaDevices) {
|
|
5965
5570
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -5967,14 +5572,14 @@ const IdCapture = class {
|
|
|
5967
5572
|
}
|
|
5968
5573
|
async componentDidLoad() {
|
|
5969
5574
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
5970
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
5575
|
+
this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Straight];
|
|
5971
5576
|
this.demoVideo.play();
|
|
5972
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
5577
|
+
await delay(store.IdCaptureValues.VideoLenght);
|
|
5973
5578
|
this.showDemo = false;
|
|
5974
5579
|
this.openCamera();
|
|
5975
5580
|
}
|
|
5976
5581
|
async openCamera() {
|
|
5977
|
-
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5582
|
+
const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
|
|
5978
5583
|
setTimeout(() => {
|
|
5979
5584
|
navigator.mediaDevices
|
|
5980
5585
|
.getUserMedia(constraints)
|
|
@@ -6011,7 +5616,7 @@ const IdCapture = class {
|
|
|
6011
5616
|
if (this.verified)
|
|
6012
5617
|
return;
|
|
6013
5618
|
this.verified = true;
|
|
6014
|
-
this.titleMesage = IdCaptureValues.Loading;
|
|
5619
|
+
this.titleMesage = store.IdCaptureValues.Loading;
|
|
6015
5620
|
this.closeCamera();
|
|
6016
5621
|
this.showDemo = true;
|
|
6017
5622
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -6033,7 +5638,7 @@ const IdCapture = class {
|
|
|
6033
5638
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
6034
5639
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
6035
5640
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
6036
|
-
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" }, IdCaptureValues.FooterText)))));
|
|
5641
|
+
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" }, store.IdCaptureValues.FooterText)))));
|
|
6037
5642
|
}
|
|
6038
5643
|
get component() { return index.getElement(this); }
|
|
6039
5644
|
};
|
|
@@ -6069,7 +5674,7 @@ const IdTilt = class {
|
|
|
6069
5674
|
this.cameraSize = event.detail;
|
|
6070
5675
|
}
|
|
6071
5676
|
async componentWillLoad() {
|
|
6072
|
-
this.titleMesage = IdCaptureValues.IDPoseMapping[1];
|
|
5677
|
+
this.titleMesage = store.IdCaptureValues.IDPoseMapping[1];
|
|
6073
5678
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
6074
5679
|
if (!navigator.mediaDevices) {
|
|
6075
5680
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -6077,14 +5682,14 @@ const IdTilt = class {
|
|
|
6077
5682
|
}
|
|
6078
5683
|
async componentDidLoad() {
|
|
6079
5684
|
await this.baseComponent.logStep(FlowSteps.CiTilt, FlowMoments.Initialized);
|
|
6080
|
-
this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
5685
|
+
this.demoVideo.src = store.IdCaptureValues.IDPoseDemoMapping[IDPose.Tilted];
|
|
6081
5686
|
this.demoVideo.play();
|
|
6082
|
-
await delay(IdCaptureValues.VideoLenght);
|
|
5687
|
+
await delay(store.IdCaptureValues.VideoLenght);
|
|
6083
5688
|
this.showDemo = false;
|
|
6084
5689
|
this.openCamera();
|
|
6085
5690
|
}
|
|
6086
5691
|
async openCamera() {
|
|
6087
|
-
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5692
|
+
const constraints = this.cameras.GetConstraints(store.state.cameraId, store.state.device);
|
|
6088
5693
|
setTimeout(() => {
|
|
6089
5694
|
navigator.mediaDevices
|
|
6090
5695
|
.getUserMedia(constraints)
|
|
@@ -6121,7 +5726,7 @@ const IdTilt = class {
|
|
|
6121
5726
|
if (this.verified)
|
|
6122
5727
|
return;
|
|
6123
5728
|
this.verified = true;
|
|
6124
|
-
this.titleMesage = IdCaptureValues.Loading;
|
|
5729
|
+
this.titleMesage = store.IdCaptureValues.Loading;
|
|
6125
5730
|
this.closeCamera();
|
|
6126
5731
|
this.showDemo = true;
|
|
6127
5732
|
this.demoVideo.src = 'https://ekyc.blob.core.windows.net/$web/animations/uploading_id.mp4';
|
|
@@ -6143,7 +5748,7 @@ const IdTilt = class {
|
|
|
6143
5748
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
6144
5749
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
6145
5750
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
6146
|
-
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" }, IdCaptureValues.FooterText)))));
|
|
5751
|
+
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" }, store.IdCaptureValues.FooterText)))));
|
|
6147
5752
|
}
|
|
6148
5753
|
get component() { return index.getElement(this); }
|
|
6149
5754
|
};
|
|
@@ -6215,7 +5820,7 @@ function v4(options, buf, offset) {
|
|
|
6215
5820
|
}
|
|
6216
5821
|
|
|
6217
5822
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6218
|
-
const version$1 = "3.6.
|
|
5823
|
+
const version$1 = "3.6.16";
|
|
6219
5824
|
const description = "Person Identification Component";
|
|
6220
5825
|
const main = "./dist/index.cjs.js";
|
|
6221
5826
|
const module$1 = "./dist/index.js";
|
|
@@ -6289,66 +5894,66 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
|
|
|
6289
5894
|
|
|
6290
5895
|
const IdentificationComponent = class {
|
|
6291
5896
|
async onTokenChange(newValue, _oldValue) {
|
|
6292
|
-
if (state.debug)
|
|
5897
|
+
if (store.state.debug)
|
|
6293
5898
|
console.log('Token change called with value: ' + newValue);
|
|
6294
5899
|
if (newValue == '') {
|
|
6295
|
-
newValue = state.token;
|
|
5900
|
+
newValue = store.state.token;
|
|
6296
5901
|
return;
|
|
6297
5902
|
}
|
|
6298
|
-
if (state.token !== newValue) {
|
|
6299
|
-
state.token = newValue;
|
|
5903
|
+
if (store.state.token !== newValue) {
|
|
5904
|
+
store.state.token = newValue;
|
|
6300
5905
|
await this.initializeRequest();
|
|
6301
5906
|
}
|
|
6302
5907
|
}
|
|
6303
5908
|
async onOrderIdChange(newValue, _oldValue) {
|
|
6304
|
-
if (state.debug)
|
|
5909
|
+
if (store.state.debug)
|
|
6305
5910
|
console.log('OrderId change called with value: ' + newValue);
|
|
6306
|
-
if (state.requestId !== newValue && newValue != '') {
|
|
6307
|
-
state.requestId = newValue;
|
|
6308
|
-
state.initialised = false;
|
|
5911
|
+
if (store.state.requestId !== newValue && newValue != '') {
|
|
5912
|
+
store.state.requestId = newValue;
|
|
5913
|
+
store.state.initialised = false;
|
|
6309
5914
|
await this.initializeRequest();
|
|
6310
|
-
if (state.flowStatus != FlowStatus.LANDING && state.flowStatus != FlowStatus.NONE) {
|
|
6311
|
-
state.flowStatus = FlowStatus.LANDING;
|
|
5915
|
+
if (store.state.flowStatus != store.FlowStatus.LANDING && store.state.flowStatus != store.FlowStatus.NONE) {
|
|
5916
|
+
store.state.flowStatus = store.FlowStatus.LANDING;
|
|
6312
5917
|
}
|
|
6313
5918
|
}
|
|
6314
5919
|
}
|
|
6315
5920
|
onApiUrlChange(newValue, _oldValue) {
|
|
6316
|
-
if (state.apiBaseUrl != '') {
|
|
6317
|
-
newValue = state.apiBaseUrl;
|
|
5921
|
+
if (store.state.apiBaseUrl != '') {
|
|
5922
|
+
newValue = store.state.apiBaseUrl;
|
|
6318
5923
|
return;
|
|
6319
5924
|
}
|
|
6320
|
-
if (state.apiBaseUrl !== newValue) {
|
|
6321
|
-
state.apiBaseUrl = newValue;
|
|
5925
|
+
if (store.state.apiBaseUrl !== newValue) {
|
|
5926
|
+
store.state.apiBaseUrl = newValue;
|
|
6322
5927
|
}
|
|
6323
5928
|
}
|
|
6324
5929
|
onEnvChange(newValue, _oldValue) {
|
|
6325
|
-
if (state.environment != '') {
|
|
6326
|
-
newValue = state.environment;
|
|
5930
|
+
if (store.state.environment != '') {
|
|
5931
|
+
newValue = store.state.environment;
|
|
6327
5932
|
return;
|
|
6328
5933
|
}
|
|
6329
|
-
if (state.environment !== newValue) {
|
|
6330
|
-
state.environment = newValue;
|
|
5934
|
+
if (store.state.environment !== newValue) {
|
|
5935
|
+
store.state.environment = newValue;
|
|
6331
5936
|
}
|
|
6332
5937
|
}
|
|
6333
5938
|
async onRedirectIdChange(newValue, _oldValue) {
|
|
6334
|
-
if (state.debug)
|
|
5939
|
+
if (store.state.debug)
|
|
6335
5940
|
console.log('RedirectId change called with value: ' + newValue);
|
|
6336
|
-
if (state.redirectId != '') {
|
|
6337
|
-
newValue = state.redirectId;
|
|
5941
|
+
if (store.state.redirectId != '') {
|
|
5942
|
+
newValue = store.state.redirectId;
|
|
6338
5943
|
return;
|
|
6339
5944
|
}
|
|
6340
|
-
if (state.redirectId !== newValue) {
|
|
6341
|
-
state.redirectId = newValue;
|
|
5945
|
+
if (store.state.redirectId !== newValue) {
|
|
5946
|
+
store.state.redirectId = newValue;
|
|
6342
5947
|
}
|
|
6343
5948
|
await this.initializeRequest();
|
|
6344
5949
|
}
|
|
6345
5950
|
async onPhoneChange(newValue, _oldValue) {
|
|
6346
|
-
if (state.phoneNumber != '') {
|
|
6347
|
-
newValue = state.phoneNumber;
|
|
5951
|
+
if (store.state.phoneNumber != '') {
|
|
5952
|
+
newValue = store.state.phoneNumber;
|
|
6348
5953
|
return;
|
|
6349
5954
|
}
|
|
6350
|
-
if (state.phoneNumber !== newValue) {
|
|
6351
|
-
state.phoneNumber = newValue;
|
|
5955
|
+
if (store.state.phoneNumber !== newValue) {
|
|
5956
|
+
store.state.phoneNumber = newValue;
|
|
6352
5957
|
}
|
|
6353
5958
|
}
|
|
6354
5959
|
agreementAcceptanceEmitted(data) {
|
|
@@ -6381,12 +5986,12 @@ const IdentificationComponent = class {
|
|
|
6381
5986
|
}
|
|
6382
5987
|
catch (_g) { }
|
|
6383
5988
|
Events.flowError(this.errorTitle);
|
|
6384
|
-
state.flowStatus = FlowStatus.ERROREND;
|
|
5989
|
+
store.state.flowStatus = store.FlowStatus.ERROREND;
|
|
6385
5990
|
}
|
|
6386
5991
|
constructor(hostRef) {
|
|
6387
5992
|
index.registerInstance(this, hostRef);
|
|
6388
5993
|
this.logInit = {};
|
|
6389
|
-
this.flowStatusToSet = FlowStatus.NONE;
|
|
5994
|
+
this.flowStatusToSet = store.FlowStatus.NONE;
|
|
6390
5995
|
this.token = undefined;
|
|
6391
5996
|
this.order_id = undefined;
|
|
6392
5997
|
this.api_url = undefined;
|
|
@@ -6400,115 +6005,115 @@ const IdentificationComponent = class {
|
|
|
6400
6005
|
async componentWillLoad() {
|
|
6401
6006
|
Events.init(window);
|
|
6402
6007
|
Events.flowEvent(FlowSteps.ComponentLoaded, FlowMoments.Initialized);
|
|
6403
|
-
state.apiBaseUrl = this.api_url;
|
|
6008
|
+
store.state.apiBaseUrl = this.api_url;
|
|
6404
6009
|
if (this.env && this.env != '') {
|
|
6405
|
-
state.environment = this.env;
|
|
6010
|
+
store.state.environment = this.env;
|
|
6406
6011
|
}
|
|
6407
6012
|
this.baseComponent = new BaseComponent(FlowSteps.ComponentLoaded);
|
|
6408
6013
|
this.baseComponent.setErrorCallback(this.apiErrorEmitter);
|
|
6409
|
-
if (state.debug)
|
|
6014
|
+
if (store.state.debug)
|
|
6410
6015
|
this.logInit = getLogMessage(this.order_id, this.redirect_id, this.token);
|
|
6411
6016
|
if (this.token) {
|
|
6412
|
-
if (state.debug)
|
|
6017
|
+
if (store.state.debug)
|
|
6413
6018
|
console.log('Store Token set with property value: ' + this.token);
|
|
6414
|
-
state.token = this.token;
|
|
6019
|
+
store.state.token = this.token;
|
|
6415
6020
|
}
|
|
6416
|
-
else if (state.token == '') {
|
|
6417
|
-
state.token = sessionStorage.getItem(SessionKeys.TokenKey);
|
|
6418
|
-
this.token = state.token;
|
|
6419
|
-
if (state.debug)
|
|
6420
|
-
console.log('Store Token set with session value: ' + state.token);
|
|
6021
|
+
else if (store.state.token == '') {
|
|
6022
|
+
store.state.token = sessionStorage.getItem(store.SessionKeys.TokenKey);
|
|
6023
|
+
this.token = store.state.token;
|
|
6024
|
+
if (store.state.debug)
|
|
6025
|
+
console.log('Store Token set with session value: ' + store.state.token);
|
|
6421
6026
|
}
|
|
6422
6027
|
if (this.redirect_id) {
|
|
6423
|
-
state.redirectId = this.redirect_id;
|
|
6028
|
+
store.state.redirectId = this.redirect_id;
|
|
6424
6029
|
}
|
|
6425
6030
|
if (this.phone_number && this.phone_number != '') {
|
|
6426
|
-
state.phoneNumber = this.phone_number;
|
|
6031
|
+
store.state.phoneNumber = this.phone_number;
|
|
6427
6032
|
}
|
|
6428
|
-
var ini = sessionStorage.getItem(SessionKeys.InitialisedKey);
|
|
6033
|
+
var ini = sessionStorage.getItem(store.SessionKeys.InitialisedKey);
|
|
6429
6034
|
if (ini && ini.toLowerCase() == 'true') {
|
|
6430
|
-
state.initialised = true;
|
|
6035
|
+
store.state.initialised = true;
|
|
6431
6036
|
}
|
|
6432
|
-
var hasIdBk = sessionStorage.getItem(SessionKeys.HasIdBackKey);
|
|
6037
|
+
var hasIdBk = sessionStorage.getItem(store.SessionKeys.HasIdBackKey);
|
|
6433
6038
|
if (hasIdBk && hasIdBk.toLowerCase() == 'true') {
|
|
6434
|
-
state.hasIdBack = true;
|
|
6039
|
+
store.state.hasIdBack = true;
|
|
6435
6040
|
}
|
|
6436
|
-
var agrVal = sessionStorage.getItem(SessionKeys.AgreementValidationKey);
|
|
6041
|
+
var agrVal = sessionStorage.getItem(store.SessionKeys.AgreementValidationKey);
|
|
6437
6042
|
if (agrVal && agrVal.toLowerCase() == 'true') {
|
|
6438
|
-
state.agreementsValidation = true;
|
|
6043
|
+
store.state.agreementsValidation = true;
|
|
6439
6044
|
}
|
|
6440
|
-
var phoneVal = sessionStorage.getItem(SessionKeys.PhoneValidationKey);
|
|
6045
|
+
var phoneVal = sessionStorage.getItem(store.SessionKeys.PhoneValidationKey);
|
|
6441
6046
|
if (phoneVal && phoneVal.toLowerCase() == 'true') {
|
|
6442
|
-
state.phoneValidation = true;
|
|
6047
|
+
store.state.phoneValidation = true;
|
|
6443
6048
|
}
|
|
6444
|
-
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
6049
|
+
const savedRequest = sessionStorage.getItem(store.SessionKeys.RequestIdKey);
|
|
6445
6050
|
if (this.order_id && this.order_id != '') {
|
|
6446
|
-
state.requestId = this.order_id;
|
|
6447
|
-
if (state.debug)
|
|
6051
|
+
store.state.requestId = this.order_id;
|
|
6052
|
+
if (store.state.debug)
|
|
6448
6053
|
console.log('Current RequestId has value: ' + this.order_id);
|
|
6449
6054
|
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
6450
|
-
if (state.debug)
|
|
6055
|
+
if (store.state.debug)
|
|
6451
6056
|
console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
|
|
6452
|
-
this.flowStatusToSet = FlowStatus.LANDING;
|
|
6453
|
-
state.initialised = false;
|
|
6057
|
+
this.flowStatusToSet = store.FlowStatus.LANDING;
|
|
6058
|
+
store.state.initialised = false;
|
|
6454
6059
|
}
|
|
6455
6060
|
}
|
|
6456
6061
|
else if (savedRequest) {
|
|
6457
|
-
if (state.debug)
|
|
6062
|
+
if (store.state.debug)
|
|
6458
6063
|
console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
|
|
6459
|
-
state.requestId = savedRequest;
|
|
6064
|
+
store.state.requestId = savedRequest;
|
|
6460
6065
|
this.order_id = savedRequest;
|
|
6461
6066
|
}
|
|
6462
|
-
if (this.flowStatusToSet == FlowStatus.NONE) {
|
|
6463
|
-
var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
|
|
6067
|
+
if (this.flowStatusToSet == store.FlowStatus.NONE) {
|
|
6068
|
+
var flowSt = sessionStorage.getItem(store.SessionKeys.FlowStatusKey);
|
|
6464
6069
|
if (flowSt) {
|
|
6465
|
-
this.flowStatusToSet = FlowStatus[flowSt];
|
|
6070
|
+
this.flowStatusToSet = store.FlowStatus[flowSt];
|
|
6466
6071
|
}
|
|
6467
6072
|
else {
|
|
6468
|
-
this.flowStatusToSet = FlowStatus.LANDING;
|
|
6073
|
+
this.flowStatusToSet = store.FlowStatus.LANDING;
|
|
6469
6074
|
}
|
|
6470
6075
|
}
|
|
6471
6076
|
}
|
|
6472
6077
|
async componentDidLoad() {
|
|
6473
6078
|
await this.initializeRequest();
|
|
6474
|
-
state.flowStatus = this.flowStatusToSet;
|
|
6079
|
+
store.state.flowStatus = this.flowStatusToSet;
|
|
6475
6080
|
}
|
|
6476
6081
|
componentWillRender() {
|
|
6477
6082
|
if (this.idSide == '') {
|
|
6478
|
-
this.idSide = state.hasIdBack ? 'front' : '';
|
|
6083
|
+
this.idSide = store.state.hasIdBack ? 'front' : '';
|
|
6479
6084
|
}
|
|
6480
6085
|
}
|
|
6481
6086
|
async initializeRequest() {
|
|
6482
|
-
if (state.initialised) {
|
|
6087
|
+
if (store.state.initialised) {
|
|
6483
6088
|
return;
|
|
6484
6089
|
}
|
|
6485
|
-
if (state.environment == 'DEMO') {
|
|
6486
|
-
state.initialised = true;
|
|
6090
|
+
if (store.state.environment == 'DEMO') {
|
|
6091
|
+
store.state.initialised = true;
|
|
6487
6092
|
return;
|
|
6488
6093
|
}
|
|
6489
|
-
if (state.device.browser == Browser.Mi) {
|
|
6490
|
-
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6094
|
+
if (store.state.device.browser == Browser.Mi) {
|
|
6095
|
+
this.apiErrorEmitter('Mi Browser nu este acceptat. Va rugam utilizati Chrome.', 'Request Initialisation RequestId:' + store.state.requestId + ' RedirectId:' + store.state.redirectId);
|
|
6491
6096
|
return;
|
|
6492
6097
|
}
|
|
6493
6098
|
try {
|
|
6494
|
-
if (state.debug)
|
|
6099
|
+
if (store.state.debug)
|
|
6495
6100
|
this.baseComponent.apiCall.AddLog({ phase: 'debug mode' }, this.logInit);
|
|
6496
6101
|
}
|
|
6497
6102
|
catch (_a) { }
|
|
6498
6103
|
try {
|
|
6499
|
-
if (!state.device.isMobile && state.redirectId == '') {
|
|
6500
|
-
state.redirectId = v4();
|
|
6501
|
-
this.redirect_id = state.redirectId;
|
|
6104
|
+
if (!store.state.device.isMobile && store.state.redirectId == '') {
|
|
6105
|
+
store.state.redirectId = v4();
|
|
6106
|
+
this.redirect_id = store.state.redirectId;
|
|
6502
6107
|
}
|
|
6503
|
-
if (state.token != '' && (state.requestId != '' || state.redirectId != '')) {
|
|
6504
|
-
state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(state.device, packageJson.version);
|
|
6108
|
+
if (store.state.token != '' && (store.state.requestId != '' || store.state.redirectId != '')) {
|
|
6109
|
+
store.state.initialised = await this.baseComponent.apiCall.AddIdentificationRequest(store.state.device, packageJson.version);
|
|
6505
6110
|
if (!this.order_id || this.order_id == '') {
|
|
6506
|
-
this.order_id = state.requestId;
|
|
6111
|
+
this.order_id = store.state.requestId;
|
|
6507
6112
|
}
|
|
6508
6113
|
}
|
|
6509
6114
|
}
|
|
6510
6115
|
catch (e) {
|
|
6511
|
-
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
|
|
6116
|
+
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + store.state.requestId + ' RedirectId:' + store.state.redirectId);
|
|
6512
6117
|
}
|
|
6513
6118
|
ML5.getInstance();
|
|
6514
6119
|
}
|
|
@@ -6517,39 +6122,39 @@ const IdentificationComponent = class {
|
|
|
6517
6122
|
}
|
|
6518
6123
|
render() {
|
|
6519
6124
|
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 })))));
|
|
6520
|
-
if (state.device.isMobile || state.environment == 'DEMO') {
|
|
6521
|
-
if (state.flowStatus == FlowStatus.LANDING) {
|
|
6125
|
+
if (store.state.device.isMobile || store.state.environment == 'DEMO') {
|
|
6126
|
+
if (store.state.flowStatus == store.FlowStatus.LANDING) {
|
|
6522
6127
|
currentBlock = index.h("landing-validation", null);
|
|
6523
6128
|
}
|
|
6524
6129
|
}
|
|
6525
|
-
else if (state.flowStatus != FlowStatus.NONE) {
|
|
6130
|
+
else if (store.state.flowStatus != store.FlowStatus.NONE) {
|
|
6526
6131
|
currentBlock = index.h("mobile-redirect", null);
|
|
6527
6132
|
}
|
|
6528
|
-
if (state.flowStatus == FlowStatus.AGREEMENT) {
|
|
6133
|
+
if (store.state.flowStatus == store.FlowStatus.AGREEMENT) {
|
|
6529
6134
|
currentBlock = index.h("agreement-info", null);
|
|
6530
6135
|
}
|
|
6531
|
-
if (state.flowStatus == FlowStatus.PHONE) {
|
|
6136
|
+
if (store.state.flowStatus == store.FlowStatus.PHONE) {
|
|
6532
6137
|
currentBlock = index.h("sms-code-validation", null);
|
|
6533
6138
|
}
|
|
6534
|
-
if (state.flowStatus == FlowStatus.CODE) {
|
|
6139
|
+
if (store.state.flowStatus == store.FlowStatus.CODE) {
|
|
6535
6140
|
currentBlock = index.h("sms-code-validation", null);
|
|
6536
6141
|
}
|
|
6537
|
-
if (state.flowStatus == FlowStatus.CODEERROR) {
|
|
6142
|
+
if (store.state.flowStatus == store.FlowStatus.CODEERROR) {
|
|
6538
6143
|
currentBlock = index.h("sms-code-validation", null);
|
|
6539
6144
|
}
|
|
6540
|
-
if (state.flowStatus == FlowStatus.ID) {
|
|
6145
|
+
if (store.state.flowStatus == store.FlowStatus.ID) {
|
|
6541
6146
|
currentBlock = index.h("process-id", null);
|
|
6542
6147
|
}
|
|
6543
|
-
if (state.flowStatus == FlowStatus.LIVENESS) {
|
|
6148
|
+
if (store.state.flowStatus == store.FlowStatus.LIVENESS) {
|
|
6544
6149
|
currentBlock = index.h("user-liveness", { id: "camera" });
|
|
6545
6150
|
}
|
|
6546
|
-
if (state.flowStatus == FlowStatus.COMPLETE) {
|
|
6151
|
+
if (store.state.flowStatus == store.FlowStatus.COMPLETE) {
|
|
6547
6152
|
currentBlock = index.h("end-redirect", null);
|
|
6548
6153
|
}
|
|
6549
|
-
if (state.flowStatus == FlowStatus.ERROREND) {
|
|
6154
|
+
if (store.state.flowStatus == store.FlowStatus.ERROREND) {
|
|
6550
6155
|
currentBlock = index.h("error-end", { errorTitle: this.errorTitle, message: this.errorMessage });
|
|
6551
6156
|
}
|
|
6552
|
-
if (state.flowStatus == FlowStatus.CAMERAERROR) {
|
|
6157
|
+
if (store.state.flowStatus == store.FlowStatus.CAMERAERROR) {
|
|
6553
6158
|
currentBlock = index.h("camera-error", null);
|
|
6554
6159
|
}
|
|
6555
6160
|
return index.h("div", null, currentBlock);
|
|
@@ -6591,38 +6196,38 @@ const LandingValidation = class {
|
|
|
6591
6196
|
await this.initRequest();
|
|
6592
6197
|
}
|
|
6593
6198
|
async componentDidLoad() {
|
|
6594
|
-
if (state.environment !== 'DEMO') {
|
|
6199
|
+
if (store.state.environment !== 'DEMO') {
|
|
6595
6200
|
await this.baseComponent.initialize();
|
|
6596
6201
|
}
|
|
6597
6202
|
}
|
|
6598
6203
|
async initRequest() {
|
|
6599
|
-
if (state.hasIdBack) {
|
|
6600
|
-
this.warningText = LandingValues.WarningMd;
|
|
6204
|
+
if (store.state.hasIdBack) {
|
|
6205
|
+
this.warningText = store.LandingValues.WarningMd;
|
|
6601
6206
|
}
|
|
6602
6207
|
else {
|
|
6603
|
-
this.warningText = LandingValues.Warning;
|
|
6208
|
+
this.warningText = store.LandingValues.Warning;
|
|
6604
6209
|
}
|
|
6605
6210
|
}
|
|
6606
6211
|
async startFlow() {
|
|
6607
|
-
if (state.initialised) {
|
|
6212
|
+
if (store.state.initialised) {
|
|
6608
6213
|
this.buttonDisabled = true;
|
|
6609
|
-
if (state.environment === 'DEMO') {
|
|
6610
|
-
state.flowStatus = FlowStatus.COMPLETE;
|
|
6214
|
+
if (store.state.environment === 'DEMO') {
|
|
6215
|
+
store.state.flowStatus = store.FlowStatus.COMPLETE;
|
|
6611
6216
|
return;
|
|
6612
6217
|
}
|
|
6613
|
-
if (!(await Cameras.InitCameras(state.device))) {
|
|
6614
|
-
if (state.device.mobileOS == MobileOS.iOS)
|
|
6615
|
-
sessionStorage.setItem(SessionKeys.RefreshDoneKey, 'false');
|
|
6616
|
-
state.flowStatus = FlowStatus.CAMERAERROR;
|
|
6218
|
+
if (!(await Cameras.InitCameras(store.state.device))) {
|
|
6219
|
+
if (store.state.device.mobileOS == MobileOS.iOS)
|
|
6220
|
+
sessionStorage.setItem(store.SessionKeys.RefreshDoneKey, 'false');
|
|
6221
|
+
store.state.flowStatus = store.FlowStatus.CAMERAERROR;
|
|
6617
6222
|
}
|
|
6618
|
-
else if (state.agreementsValidation) {
|
|
6619
|
-
state.flowStatus = FlowStatus.AGREEMENT;
|
|
6223
|
+
else if (store.state.agreementsValidation) {
|
|
6224
|
+
store.state.flowStatus = store.FlowStatus.AGREEMENT;
|
|
6620
6225
|
}
|
|
6621
|
-
else if (state.phoneValidation) {
|
|
6622
|
-
state.flowStatus = FlowStatus.PHONE;
|
|
6226
|
+
else if (store.state.phoneValidation) {
|
|
6227
|
+
store.state.flowStatus = store.FlowStatus.PHONE;
|
|
6623
6228
|
}
|
|
6624
6229
|
else {
|
|
6625
|
-
state.flowStatus = FlowStatus.ID;
|
|
6230
|
+
store.state.flowStatus = store.FlowStatus.ID;
|
|
6626
6231
|
}
|
|
6627
6232
|
}
|
|
6628
6233
|
}
|
|
@@ -6632,7 +6237,7 @@ const LandingValidation = class {
|
|
|
6632
6237
|
async leaveFlow() {
|
|
6633
6238
|
if (this.buttonDisabled)
|
|
6634
6239
|
return;
|
|
6635
|
-
state.initialised = false;
|
|
6240
|
+
store.state.initialised = false;
|
|
6636
6241
|
try {
|
|
6637
6242
|
await this.baseComponent.apiCall.AbortRequest();
|
|
6638
6243
|
Events.flowAborted();
|
|
@@ -6643,7 +6248,7 @@ const LandingValidation = class {
|
|
|
6643
6248
|
}
|
|
6644
6249
|
}
|
|
6645
6250
|
render() {
|
|
6646
|
-
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, 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, LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, 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: !state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
6251
|
+
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, store.LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, store.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, store.LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, store.LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, store.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: !store.state.initialised || this.buttonDisabled, onClick: () => this.startFlow() }, store.LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, store.LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, store.LandingValues.FooterText))))));
|
|
6647
6252
|
}
|
|
6648
6253
|
};
|
|
6649
6254
|
LandingValidation.style = landingValidationCss;
|
|
@@ -9543,13 +9148,13 @@ const MobileRedirect = class {
|
|
|
9543
9148
|
}
|
|
9544
9149
|
async componentWillLoad() {
|
|
9545
9150
|
Events.flowStarted();
|
|
9546
|
-
this.infoTextTop = MobileRedirectValues.InfoTop;
|
|
9547
|
-
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
9548
|
-
let envUri = state.environment == 'QA' ? 'test' : 'ect';
|
|
9549
|
-
let baseUri = state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
9550
|
-
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + state.redirectId;
|
|
9551
|
-
if (state.phoneNumber && state.phoneNumber != '') {
|
|
9552
|
-
this.contact = state.phoneNumber;
|
|
9151
|
+
this.infoTextTop = store.MobileRedirectValues.InfoTop;
|
|
9152
|
+
this.infoTextBottom = store.MobileRedirectValues.InfoBottom;
|
|
9153
|
+
let envUri = store.state.environment == 'QA' ? 'test' : 'ect';
|
|
9154
|
+
let baseUri = store.state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
9155
|
+
this.redirectLink = baseUri + envUri + '/mobileredirect?redirectId=' + store.state.redirectId;
|
|
9156
|
+
if (store.state.phoneNumber && store.state.phoneNumber != '') {
|
|
9157
|
+
this.contact = store.state.phoneNumber;
|
|
9553
9158
|
this.prefilledPhone = true;
|
|
9554
9159
|
}
|
|
9555
9160
|
var self = this;
|
|
@@ -9569,21 +9174,21 @@ const MobileRedirect = class {
|
|
|
9569
9174
|
}
|
|
9570
9175
|
}
|
|
9571
9176
|
async checkStatus() {
|
|
9572
|
-
this.orderStatus = await this.baseComponent.apiCall.GetStatus(state.requestId);
|
|
9177
|
+
this.orderStatus = await this.baseComponent.apiCall.GetStatus(store.state.requestId);
|
|
9573
9178
|
if (this.orderStatus == OrderStatuses.FinishedCapturing) {
|
|
9574
9179
|
this.waitingMobile = false;
|
|
9575
|
-
state.flowStatus = FlowStatus.COMPLETE;
|
|
9180
|
+
store.state.flowStatus = store.FlowStatus.COMPLETE;
|
|
9576
9181
|
}
|
|
9577
9182
|
if (this.orderStatus == OrderStatuses.NotFound) {
|
|
9578
9183
|
this.apiErrorEvent.emit({ message: 'No order was started for this process.' });
|
|
9579
9184
|
}
|
|
9580
9185
|
if (this.orderStatus == OrderStatuses.Capturing) {
|
|
9581
|
-
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
9186
|
+
this.infoTextTop = store.MobileRedirectValues.InfoWaiting;
|
|
9582
9187
|
this.waitingMobile = true;
|
|
9583
9188
|
}
|
|
9584
9189
|
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
9585
9190
|
this.waitingMobile = false;
|
|
9586
|
-
this.infoTextTop = MobileRedirectValues.InfoAborted;
|
|
9191
|
+
this.infoTextTop = store.MobileRedirectValues.InfoAborted;
|
|
9587
9192
|
Events.flowAborted();
|
|
9588
9193
|
}
|
|
9589
9194
|
}
|
|
@@ -9595,7 +9200,7 @@ const MobileRedirect = class {
|
|
|
9595
9200
|
return;
|
|
9596
9201
|
}
|
|
9597
9202
|
this.waitingMobile = true;
|
|
9598
|
-
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
9203
|
+
this.infoTextTop = store.MobileRedirectValues.InfoWaiting;
|
|
9599
9204
|
try {
|
|
9600
9205
|
await this.baseComponent.apiCall.SendLink(this.redirectLink, this.contact);
|
|
9601
9206
|
}
|
|
@@ -9613,7 +9218,7 @@ const MobileRedirect = class {
|
|
|
9613
9218
|
ev.target.value = this.contact;
|
|
9614
9219
|
}
|
|
9615
9220
|
render() {
|
|
9616
|
-
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, 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" }, MobileRedirectValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
|
|
9221
|
+
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, store.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" }, store.MobileRedirectValues.FooterText)))), index.h("div", { hidden: this.waitingMobile == false }, index.h("div", { class: "text-center" }, index.h("p", { class: "font-size-2" }, this.infoTextTop))))));
|
|
9617
9222
|
}
|
|
9618
9223
|
};
|
|
9619
9224
|
MobileRedirect.style = mobileRedirectCss;
|
|
@@ -9675,7 +9280,7 @@ const ProcessId = class {
|
|
|
9675
9280
|
back: null,
|
|
9676
9281
|
tilt: null,
|
|
9677
9282
|
};
|
|
9678
|
-
if (state.hasIdBack) {
|
|
9283
|
+
if (store.state.hasIdBack) {
|
|
9679
9284
|
this.flow.back = {
|
|
9680
9285
|
photoDone: false,
|
|
9681
9286
|
recordingDone: false,
|
|
@@ -9685,7 +9290,7 @@ const ProcessId = class {
|
|
|
9685
9290
|
recType: CaptureUploadTypes.IdBackVideo,
|
|
9686
9291
|
};
|
|
9687
9292
|
}
|
|
9688
|
-
if (state.hasIdTilt) {
|
|
9293
|
+
if (store.state.hasIdTilt) {
|
|
9689
9294
|
this.flow.tilt = {
|
|
9690
9295
|
photoDone: true,
|
|
9691
9296
|
recordingDone: false,
|
|
@@ -9782,7 +9387,7 @@ const ProcessId = class {
|
|
|
9782
9387
|
if (photoFile == null || uploadType == '') {
|
|
9783
9388
|
return false;
|
|
9784
9389
|
}
|
|
9785
|
-
var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, uploadType, photoFile);
|
|
9390
|
+
var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, uploadType, photoFile);
|
|
9786
9391
|
if (uploadResult) {
|
|
9787
9392
|
return true;
|
|
9788
9393
|
}
|
|
@@ -9796,7 +9401,7 @@ const ProcessId = class {
|
|
|
9796
9401
|
if (recordingFile == null) {
|
|
9797
9402
|
return;
|
|
9798
9403
|
}
|
|
9799
|
-
var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, uploadType, recordingFile);
|
|
9404
|
+
var uploadResult = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, uploadType, recordingFile);
|
|
9800
9405
|
if (uploadResult) {
|
|
9801
9406
|
return true;
|
|
9802
9407
|
}
|
|
@@ -9806,6 +9411,9 @@ const ProcessId = class {
|
|
|
9806
9411
|
return false;
|
|
9807
9412
|
}
|
|
9808
9413
|
triggerErrorFlow(restart = false) {
|
|
9414
|
+
if (this.captureStep == IdCaptureFlowStatus.IdBack) {
|
|
9415
|
+
restart = true;
|
|
9416
|
+
}
|
|
9809
9417
|
if (restart) {
|
|
9810
9418
|
this.captureStep = IdCaptureFlowStatus.IdFront;
|
|
9811
9419
|
}
|
|
@@ -9826,10 +9434,10 @@ const ProcessId = class {
|
|
|
9826
9434
|
async endFlow() {
|
|
9827
9435
|
if (this.captureStep == IdCaptureFlowStatus.IdFront) {
|
|
9828
9436
|
if (this.flow.front.photoDone && this.flow.front.recordingDone) {
|
|
9829
|
-
if (state.hasIdBack) {
|
|
9437
|
+
if (store.state.hasIdBack) {
|
|
9830
9438
|
this.captureStep = IdCaptureFlowStatus.IdBack;
|
|
9831
9439
|
}
|
|
9832
|
-
else if (state.hasIdTilt) {
|
|
9440
|
+
else if (store.state.hasIdTilt) {
|
|
9833
9441
|
this.captureStep = IdCaptureFlowStatus.Tilt;
|
|
9834
9442
|
}
|
|
9835
9443
|
else {
|
|
@@ -9840,9 +9448,9 @@ const ProcessId = class {
|
|
|
9840
9448
|
return;
|
|
9841
9449
|
}
|
|
9842
9450
|
}
|
|
9843
|
-
if (this.captureStep == IdCaptureFlowStatus.IdBack && state.hasIdBack) {
|
|
9451
|
+
if (this.captureStep == IdCaptureFlowStatus.IdBack && store.state.hasIdBack) {
|
|
9844
9452
|
if (this.flow.back.photoDone && this.flow.back.recordingDone) {
|
|
9845
|
-
if (state.hasIdTilt) {
|
|
9453
|
+
if (store.state.hasIdTilt) {
|
|
9846
9454
|
this.captureStep = IdCaptureFlowStatus.Tilt;
|
|
9847
9455
|
}
|
|
9848
9456
|
else {
|
|
@@ -9853,7 +9461,7 @@ const ProcessId = class {
|
|
|
9853
9461
|
return;
|
|
9854
9462
|
}
|
|
9855
9463
|
}
|
|
9856
|
-
if (this.captureStep == IdCaptureFlowStatus.Tilt && state.hasIdTilt) {
|
|
9464
|
+
if (this.captureStep == IdCaptureFlowStatus.Tilt && store.state.hasIdTilt) {
|
|
9857
9465
|
if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
|
|
9858
9466
|
this.captureStep = IdCaptureFlowStatus.End;
|
|
9859
9467
|
}
|
|
@@ -9864,15 +9472,15 @@ const ProcessId = class {
|
|
|
9864
9472
|
if (this.captureStep != IdCaptureFlowStatus.End) {
|
|
9865
9473
|
return;
|
|
9866
9474
|
}
|
|
9867
|
-
state.flowStatus = FlowStatus.LIVENESS;
|
|
9475
|
+
store.state.flowStatus = store.FlowStatus.LIVENESS;
|
|
9868
9476
|
}
|
|
9869
9477
|
async disconnectedCallback() {
|
|
9870
9478
|
await this.baseComponent.finalize();
|
|
9871
9479
|
}
|
|
9872
9480
|
switchCamera() {
|
|
9873
9481
|
if (this.captureRetryCount == 1) {
|
|
9874
|
-
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
9875
|
-
state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
|
|
9482
|
+
let camIndex = store.state.cameraIds.indexOf(store.state.cameraId);
|
|
9483
|
+
store.state.cameraId = camIndex === store.state.cameraIds.length - 1 ? store.state.cameraIds[0] : store.state.cameraIds[camIndex + 1];
|
|
9876
9484
|
this.captureRetryCount = 0;
|
|
9877
9485
|
}
|
|
9878
9486
|
else {
|
|
@@ -9944,7 +9552,7 @@ const SelfieCapture = class {
|
|
|
9944
9552
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
9945
9553
|
}
|
|
9946
9554
|
componentWillLoad() {
|
|
9947
|
-
this.titleMesage = SelfieCaptureValues.Title;
|
|
9555
|
+
this.titleMesage = store.SelfieCaptureValues.Title;
|
|
9948
9556
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
9949
9557
|
if (!navigator.mediaDevices) {
|
|
9950
9558
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -9952,14 +9560,14 @@ const SelfieCapture = class {
|
|
|
9952
9560
|
}
|
|
9953
9561
|
async componentDidLoad() {
|
|
9954
9562
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
9955
|
-
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
9563
|
+
this.demoVideo.src = store.SelfieCaptureValues.FacePoseDemoMapping[FacePose.Main];
|
|
9956
9564
|
this.demoVideo.play();
|
|
9957
|
-
await delay(SelfieCaptureValues.VideoLenght);
|
|
9565
|
+
await delay(store.SelfieCaptureValues.VideoLenght);
|
|
9958
9566
|
this.demoEnded = true;
|
|
9959
9567
|
this.openCamera();
|
|
9960
9568
|
}
|
|
9961
9569
|
async openCamera() {
|
|
9962
|
-
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9570
|
+
const constraints = this.cameras.GetConstraints('', store.state.device, true);
|
|
9963
9571
|
setTimeout(() => {
|
|
9964
9572
|
navigator.mediaDevices
|
|
9965
9573
|
.getUserMedia(constraints)
|
|
@@ -9995,7 +9603,7 @@ const SelfieCapture = class {
|
|
|
9995
9603
|
if (this.verified)
|
|
9996
9604
|
return;
|
|
9997
9605
|
this.verified = true;
|
|
9998
|
-
this.titleMesage = SelfieCaptureValues.Loading;
|
|
9606
|
+
this.titleMesage = store.SelfieCaptureValues.Loading;
|
|
9999
9607
|
this.closeCamera();
|
|
10000
9608
|
this.demoEnded = false;
|
|
10001
9609
|
this.demoVideo.src = this.uploadingLink;
|
|
@@ -10004,7 +9612,7 @@ const SelfieCapture = class {
|
|
|
10004
9612
|
}
|
|
10005
9613
|
render() {
|
|
10006
9614
|
let cameraStyle;
|
|
10007
|
-
if (state.device.isMobile && this.videoStarted) {
|
|
9615
|
+
if (store.state.device.isMobile && this.videoStarted) {
|
|
10008
9616
|
cameraStyle = {
|
|
10009
9617
|
'width': this.captureWidth + 'px',
|
|
10010
9618
|
'height': this.captureHeight + 'px',
|
|
@@ -10017,7 +9625,7 @@ const SelfieCapture = class {
|
|
|
10017
9625
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
10018
9626
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
10019
9627
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
10020
|
-
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" }, SelfieCaptureValues.FooterText)))));
|
|
9628
|
+
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" }, store.SelfieCaptureValues.FooterText)))));
|
|
10021
9629
|
}
|
|
10022
9630
|
get component() { return index.getElement(this); }
|
|
10023
9631
|
};
|
|
@@ -10054,14 +9662,14 @@ const SelfieTilt = class {
|
|
|
10054
9662
|
async eventChangeTitle(event) {
|
|
10055
9663
|
// this.stopAnimation = false;
|
|
10056
9664
|
if (event.detail == null) {
|
|
10057
|
-
this.titleMesage = SelfieCaptureValues.FinalTitle;
|
|
9665
|
+
this.titleMesage = store.SelfieCaptureValues.FinalTitle;
|
|
10058
9666
|
}
|
|
10059
9667
|
else {
|
|
10060
|
-
this.titleMesage = SelfieCaptureValues.FacePoseMapping[event.detail];
|
|
9668
|
+
this.titleMesage = store.SelfieCaptureValues.FacePoseMapping[event.detail];
|
|
10061
9669
|
this.demoEnded = false;
|
|
10062
|
-
this.demoVideo.src = SelfieCaptureValues.FacePoseDemoMapping[event.detail];
|
|
9670
|
+
this.demoVideo.src = store.SelfieCaptureValues.FacePoseDemoMapping[event.detail];
|
|
10063
9671
|
this.demoVideo.play();
|
|
10064
|
-
await delay(SelfieCaptureValues.VideoLenght);
|
|
9672
|
+
await delay(store.SelfieCaptureValues.VideoLenght);
|
|
10065
9673
|
this.demoEnded = true;
|
|
10066
9674
|
}
|
|
10067
9675
|
}
|
|
@@ -10073,7 +9681,7 @@ const SelfieTilt = class {
|
|
|
10073
9681
|
this.captureWidth = Math.round((this.captureHeight * 9) / 16);
|
|
10074
9682
|
}
|
|
10075
9683
|
componentWillLoad() {
|
|
10076
|
-
this.titleMesage = SelfieCaptureValues.Title;
|
|
9684
|
+
this.titleMesage = store.SelfieCaptureValues.Title;
|
|
10077
9685
|
//this.videoDemoStyle = this.device.isMobile ? { 'width': window.screen.width + 'px', 'height': window.screen.height + 'px', 'object-fit': 'fill' } : {};
|
|
10078
9686
|
if (!navigator.mediaDevices) {
|
|
10079
9687
|
this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
|
|
@@ -10085,7 +9693,7 @@ const SelfieTilt = class {
|
|
|
10085
9693
|
this.openCamera();
|
|
10086
9694
|
}
|
|
10087
9695
|
async openCamera() {
|
|
10088
|
-
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9696
|
+
const constraints = this.cameras.GetConstraints('', store.state.device, true);
|
|
10089
9697
|
setTimeout(() => {
|
|
10090
9698
|
navigator.mediaDevices
|
|
10091
9699
|
.getUserMedia(constraints)
|
|
@@ -10120,7 +9728,7 @@ const SelfieTilt = class {
|
|
|
10120
9728
|
if (this.verified)
|
|
10121
9729
|
return;
|
|
10122
9730
|
this.verified = true;
|
|
10123
|
-
this.titleMesage = SelfieCaptureValues.Loading;
|
|
9731
|
+
this.titleMesage = store.SelfieCaptureValues.Loading;
|
|
10124
9732
|
this.closeCamera();
|
|
10125
9733
|
this.demoEnded = false;
|
|
10126
9734
|
this.demoVideo.src = this.uploadingLink;
|
|
@@ -10129,7 +9737,7 @@ const SelfieTilt = class {
|
|
|
10129
9737
|
}
|
|
10130
9738
|
render() {
|
|
10131
9739
|
let cameraStyle;
|
|
10132
|
-
if (state.device.isMobile && this.videoStarted) {
|
|
9740
|
+
if (store.state.device.isMobile && this.videoStarted) {
|
|
10133
9741
|
cameraStyle = {
|
|
10134
9742
|
'width': this.captureWidth + 'px',
|
|
10135
9743
|
'height': this.captureHeight + 'px',
|
|
@@ -10142,7 +9750,7 @@ const SelfieTilt = class {
|
|
|
10142
9750
|
let titleClass = this.verified ? 'color-black-2 text-center' : 'color-white text-center';
|
|
10143
9751
|
//let videoClass = this.device.isMobile ? '' : 'video-demo';
|
|
10144
9752
|
let bgDemo = this.verified ? 'container' : 'container bg-black';
|
|
10145
|
-
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" }, SelfieCaptureValues.FooterText)))));
|
|
9753
|
+
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" }, store.SelfieCaptureValues.FooterText)))));
|
|
10146
9754
|
}
|
|
10147
9755
|
get component() { return index.getElement(this); }
|
|
10148
9756
|
};
|
|
@@ -10161,10 +9769,10 @@ const SmsCodeValidation = class {
|
|
|
10161
9769
|
this.code = undefined;
|
|
10162
9770
|
this.prefilledPhone = false;
|
|
10163
9771
|
this.canSend = false;
|
|
10164
|
-
if (state.flowStatus == FlowStatus.PHONE) {
|
|
9772
|
+
if (store.state.flowStatus == store.FlowStatus.PHONE) {
|
|
10165
9773
|
this.baseComponent = new BaseComponent(FlowSteps.OtpSend);
|
|
10166
9774
|
}
|
|
10167
|
-
if (state.flowStatus == FlowStatus.CODE) {
|
|
9775
|
+
if (store.state.flowStatus == store.FlowStatus.CODE) {
|
|
10168
9776
|
this.baseComponent = new BaseComponent(FlowSteps.OtpCheck);
|
|
10169
9777
|
}
|
|
10170
9778
|
this.baseComponent.setEventEmitter(this.apiErrorEvent);
|
|
@@ -10172,19 +9780,19 @@ const SmsCodeValidation = class {
|
|
|
10172
9780
|
async doAction() {
|
|
10173
9781
|
try {
|
|
10174
9782
|
this.canSend = false;
|
|
10175
|
-
if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
|
|
10176
|
-
var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(state.requestId, this.code);
|
|
9783
|
+
if (store.state.flowStatus == store.FlowStatus.CODE || store.state.flowStatus == store.FlowStatus.CODEERROR) {
|
|
9784
|
+
var codeChecked = await this.baseComponent.apiCall.CheckOTPCode(store.state.requestId, this.code);
|
|
10177
9785
|
if (codeChecked === true) {
|
|
10178
|
-
state.flowStatus = FlowStatus.ID;
|
|
9786
|
+
store.state.flowStatus = store.FlowStatus.ID;
|
|
10179
9787
|
}
|
|
10180
9788
|
else {
|
|
10181
|
-
state.flowStatus = FlowStatus.CODEERROR;
|
|
9789
|
+
store.state.flowStatus = store.FlowStatus.CODEERROR;
|
|
10182
9790
|
}
|
|
10183
9791
|
}
|
|
10184
|
-
if (state.flowStatus == FlowStatus.PHONE) {
|
|
10185
|
-
var codeSent = await this.baseComponent.apiCall.SendOTPCode(state.requestId, this.phoneNumber);
|
|
9792
|
+
if (store.state.flowStatus == store.FlowStatus.PHONE) {
|
|
9793
|
+
var codeSent = await this.baseComponent.apiCall.SendOTPCode(store.state.requestId, this.phoneNumber);
|
|
10186
9794
|
if (codeSent === true) {
|
|
10187
|
-
state.flowStatus = FlowStatus.CODE;
|
|
9795
|
+
store.state.flowStatus = store.FlowStatus.CODE;
|
|
10188
9796
|
}
|
|
10189
9797
|
}
|
|
10190
9798
|
}
|
|
@@ -10196,20 +9804,20 @@ const SmsCodeValidation = class {
|
|
|
10196
9804
|
await this.baseComponent.finalize();
|
|
10197
9805
|
}
|
|
10198
9806
|
componentWillRender() {
|
|
10199
|
-
if (state.flowStatus == FlowStatus.PHONE) {
|
|
10200
|
-
this.title = PhoneValidationValues.Title;
|
|
10201
|
-
this.details = PhoneValidationValues.Description;
|
|
10202
|
-
this.buttonText = PhoneValidationValues.Button;
|
|
10203
|
-
if (state.phoneNumber && state.phoneNumber != '') {
|
|
10204
|
-
this.phoneNumber = state.phoneNumber;
|
|
9807
|
+
if (store.state.flowStatus == store.FlowStatus.PHONE) {
|
|
9808
|
+
this.title = store.PhoneValidationValues.Title;
|
|
9809
|
+
this.details = store.PhoneValidationValues.Description;
|
|
9810
|
+
this.buttonText = store.PhoneValidationValues.Button;
|
|
9811
|
+
if (store.state.phoneNumber && store.state.phoneNumber != '') {
|
|
9812
|
+
this.phoneNumber = store.state.phoneNumber;
|
|
10205
9813
|
this.prefilledPhone = true;
|
|
10206
9814
|
this.canSend = true;
|
|
10207
9815
|
}
|
|
10208
9816
|
}
|
|
10209
|
-
if (state.flowStatus == FlowStatus.CODE || state.flowStatus == FlowStatus.CODEERROR) {
|
|
10210
|
-
this.title = CodeValidationValues.Title;
|
|
10211
|
-
this.details = CodeValidationValues.Description;
|
|
10212
|
-
this.buttonText = CodeValidationValues.Button;
|
|
9817
|
+
if (store.state.flowStatus == store.FlowStatus.CODE || store.state.flowStatus == store.FlowStatus.CODEERROR) {
|
|
9818
|
+
this.title = store.CodeValidationValues.Title;
|
|
9819
|
+
this.details = store.CodeValidationValues.Description;
|
|
9820
|
+
this.buttonText = store.CodeValidationValues.Button;
|
|
10213
9821
|
}
|
|
10214
9822
|
}
|
|
10215
9823
|
async componentDidLoad() {
|
|
@@ -10234,16 +9842,16 @@ const SmsCodeValidation = class {
|
|
|
10234
9842
|
render() {
|
|
10235
9843
|
let inputBlock;
|
|
10236
9844
|
let errorBlock;
|
|
10237
|
-
if (state.flowStatus == FlowStatus.CODEERROR) {
|
|
10238
|
-
errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, CodeValidationValues.Error);
|
|
9845
|
+
if (store.state.flowStatus == store.FlowStatus.CODEERROR) {
|
|
9846
|
+
errorBlock = index.h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, store.CodeValidationValues.Error);
|
|
10239
9847
|
}
|
|
10240
|
-
if (state.flowStatus == FlowStatus.PHONE) {
|
|
10241
|
-
inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
|
|
9848
|
+
if (store.state.flowStatus == store.FlowStatus.PHONE) {
|
|
9849
|
+
inputBlock = (index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, store.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
|
|
10242
9850
|
}
|
|
10243
9851
|
else {
|
|
10244
9852
|
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 })));
|
|
10245
9853
|
}
|
|
10246
|
-
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" }, PhoneValidationValues.FooterText))))));
|
|
9854
|
+
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" }, store.PhoneValidationValues.FooterText))))));
|
|
10247
9855
|
}
|
|
10248
9856
|
};
|
|
10249
9857
|
SmsCodeValidation.style = smsCodeValidationCss;
|
|
@@ -10277,7 +9885,7 @@ const UserLiveness = class {
|
|
|
10277
9885
|
back: null,
|
|
10278
9886
|
tilt: null,
|
|
10279
9887
|
};
|
|
10280
|
-
if (state.hasSelfieGesture) {
|
|
9888
|
+
if (store.state.hasSelfieGesture) {
|
|
10281
9889
|
this.flow.tilt = {
|
|
10282
9890
|
photoDone: true,
|
|
10283
9891
|
recordingDone: false,
|
|
@@ -10315,7 +9923,7 @@ const UserLiveness = class {
|
|
|
10315
9923
|
}
|
|
10316
9924
|
try {
|
|
10317
9925
|
var uploadPhoto = new File([selfiePhoto], this.flow.front.fileName, { type: 'image/png' });
|
|
10318
|
-
await this.uploadPhoto(uploadPhoto);
|
|
9926
|
+
await this.uploadPhoto(uploadPhoto, this.flow.front.photoType);
|
|
10319
9927
|
}
|
|
10320
9928
|
catch (e) {
|
|
10321
9929
|
this.apiErrorEvent.emit(e);
|
|
@@ -10333,21 +9941,20 @@ const UserLiveness = class {
|
|
|
10333
9941
|
return;
|
|
10334
9942
|
}
|
|
10335
9943
|
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
10336
|
-
let currentFlow;
|
|
10337
|
-
if (this.captureStep == SelfieFlowStatus.Selfie) {
|
|
10338
|
-
currentFlow = this.flow.front;
|
|
10339
|
-
}
|
|
10340
|
-
if (this.captureStep == SelfieFlowStatus.Gesture) {
|
|
10341
|
-
currentFlow = this.flow.tilt;
|
|
10342
|
-
}
|
|
10343
9944
|
try {
|
|
10344
|
-
|
|
10345
|
-
|
|
9945
|
+
if (this.captureStep == SelfieFlowStatus.Selfie) {
|
|
9946
|
+
let uploadRec = new File([selfieRecording], this.flow.front.recName + mimeType.extension, { type: mimeType.type });
|
|
9947
|
+
this.flow.front.recordingDone = await this.uploadRecording(uploadRec, this.flow.front.recType);
|
|
9948
|
+
}
|
|
9949
|
+
if (this.captureStep == SelfieFlowStatus.Gesture) {
|
|
9950
|
+
let uploadRec = new File([selfieRecording], this.flow.tilt.recName + mimeType.extension, { type: mimeType.type });
|
|
9951
|
+
this.flow.tilt.recordingDone = await this.uploadRecording(uploadRec, this.flow.tilt.recType);
|
|
9952
|
+
}
|
|
10346
9953
|
await this.endFlow();
|
|
10347
9954
|
}
|
|
10348
9955
|
catch (e) {
|
|
10349
|
-
if (state.recordingRetryCount < 3) {
|
|
10350
|
-
state.recordingRetryCount++;
|
|
9956
|
+
if (store.state.recordingRetryCount < 3) {
|
|
9957
|
+
store.state.recordingRetryCount++;
|
|
10351
9958
|
this.triggerErrorFlow();
|
|
10352
9959
|
}
|
|
10353
9960
|
else {
|
|
@@ -10362,11 +9969,11 @@ const UserLiveness = class {
|
|
|
10362
9969
|
async disconnectedCallback() {
|
|
10363
9970
|
await this.baseComponent.finalize();
|
|
10364
9971
|
}
|
|
10365
|
-
async uploadPhoto(photoFile) {
|
|
9972
|
+
async uploadPhoto(photoFile, photoType) {
|
|
10366
9973
|
if (this.flow.front.photoDone) {
|
|
10367
9974
|
return;
|
|
10368
9975
|
}
|
|
10369
|
-
this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId,
|
|
9976
|
+
this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, photoType, photoFile);
|
|
10370
9977
|
if (this.flow.front.photoDone) {
|
|
10371
9978
|
await this.endFlow();
|
|
10372
9979
|
}
|
|
@@ -10374,8 +9981,8 @@ const UserLiveness = class {
|
|
|
10374
9981
|
this.triggerErrorFlow();
|
|
10375
9982
|
}
|
|
10376
9983
|
}
|
|
10377
|
-
async uploadRecording(uploadRec) {
|
|
10378
|
-
let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId,
|
|
9984
|
+
async uploadRecording(uploadRec, recType) {
|
|
9985
|
+
let uplodDone = await this.baseComponent.apiCall.UploadFileForRequestB64(store.state.requestId, recType, uploadRec);
|
|
10379
9986
|
if (uplodDone) {
|
|
10380
9987
|
return true;
|
|
10381
9988
|
}
|
|
@@ -10407,8 +10014,8 @@ const UserLiveness = class {
|
|
|
10407
10014
|
if (this.captureStep != SelfieFlowStatus.End) {
|
|
10408
10015
|
return;
|
|
10409
10016
|
}
|
|
10410
|
-
state.recordingRetryCount = 0;
|
|
10411
|
-
state.flowStatus = FlowStatus.COMPLETE;
|
|
10017
|
+
store.state.recordingRetryCount = 0;
|
|
10018
|
+
store.state.flowStatus = store.FlowStatus.COMPLETE;
|
|
10412
10019
|
}
|
|
10413
10020
|
render() {
|
|
10414
10021
|
let howTo = index.h("how-to-info", { idSide: "" });
|