@ekyc_qoobiss/qbs-ect-cmp 3.6.3 → 3.6.4
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_18.cjs.entry.js +37 -48
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/components/common/capture-error/capture-error.js +1 -19
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +1 -1
- package/dist/collection/components/common/id-capture/id-capture.js +2 -1
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -1
- package/dist/collection/components/flow/id-double-side/id-double-side.js +3 -3
- package/dist/collection/components/flow/id-single-side/id-single-side.js +3 -13
- package/dist/collection/components/flow/user-liveness/user-liveness.js +2 -2
- package/dist/collection/helpers/Cameras.js +23 -24
- package/dist/esm/agreement-check_18.entry.js +37 -48
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/qbs-ect-cmp/{p-11c604f3.entry.js → p-10b02e29.entry.js} +24 -24
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/capture-error/capture-error.d.ts +0 -1
- package/dist/types/components/flow/id-single-side/id-single-side.d.ts +0 -1
- package/dist/types/components.d.ts +0 -2
- package/dist/types/helpers/Cameras.d.ts +0 -1
- package/package.json +1 -1
|
@@ -5564,7 +5564,6 @@ const CaptureError = class {
|
|
|
5564
5564
|
index.registerInstance(this, hostRef);
|
|
5565
5565
|
this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7);
|
|
5566
5566
|
this.type = undefined;
|
|
5567
|
-
this.message = undefined;
|
|
5568
5567
|
this.buttonEnabled = undefined;
|
|
5569
5568
|
this.buttonText = undefined;
|
|
5570
5569
|
}
|
|
@@ -5596,7 +5595,7 @@ const CaptureError = class {
|
|
|
5596
5595
|
this.eventCaptureErrorDone.emit();
|
|
5597
5596
|
}
|
|
5598
5597
|
render() {
|
|
5599
|
-
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)
|
|
5598
|
+
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))))));
|
|
5600
5599
|
}
|
|
5601
5600
|
};
|
|
5602
5601
|
CaptureError.style = captureErrorCss;
|
|
@@ -5683,7 +5682,8 @@ class Cameras {
|
|
|
5683
5682
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
5684
5683
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
5685
5684
|
for (const device of videoDevices) {
|
|
5686
|
-
const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
5685
|
+
//const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
5686
|
+
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
5687
5687
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
5688
5688
|
stream.getVideoTracks().forEach(track => {
|
|
5689
5689
|
var _a, _b;
|
|
@@ -5771,29 +5771,27 @@ class Cameras {
|
|
|
5771
5771
|
constraints.video = mediaTrack;
|
|
5772
5772
|
return constraints;
|
|
5773
5773
|
}
|
|
5774
|
-
GetConstraintsIOs(device, portrait = false) {
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
return constraints;
|
|
5796
|
-
}
|
|
5774
|
+
// public GetConstraintsIOs(device: DeviceState, portrait: boolean = false): MediaStreamConstraints | any {
|
|
5775
|
+
// let constraints: MediaStreamConstraints = {
|
|
5776
|
+
// audio: false,
|
|
5777
|
+
// };
|
|
5778
|
+
// let mediaTrack: MediaTrackConstraints = {};
|
|
5779
|
+
// if (device.isDesktop) {
|
|
5780
|
+
// mediaTrack.width = 1280;
|
|
5781
|
+
// } else {
|
|
5782
|
+
// if (portrait) {
|
|
5783
|
+
// mediaTrack.facingMode = 'user';
|
|
5784
|
+
// mediaTrack.width = 1280;
|
|
5785
|
+
// mediaTrack.height = 720;
|
|
5786
|
+
// } else {
|
|
5787
|
+
// mediaTrack.facingMode = 'environment';
|
|
5788
|
+
// mediaTrack.width = 1280;
|
|
5789
|
+
// mediaTrack.height = 720;
|
|
5790
|
+
// }
|
|
5791
|
+
// }
|
|
5792
|
+
// constraints.video = mediaTrack;
|
|
5793
|
+
// return constraints;
|
|
5794
|
+
// }
|
|
5797
5795
|
GetRecommendedCamera(cameras) {
|
|
5798
5796
|
if (cameras && cameras.length > 0) {
|
|
5799
5797
|
var recommDevice = cameras.find(c => c.recommended);
|
|
@@ -5883,7 +5881,7 @@ const IdBackCapture = class {
|
|
|
5883
5881
|
}
|
|
5884
5882
|
async openCamera() {
|
|
5885
5883
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
5886
|
-
const constraints =
|
|
5884
|
+
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5887
5885
|
setTimeout(() => {
|
|
5888
5886
|
navigator.mediaDevices
|
|
5889
5887
|
.getUserMedia(constraints)
|
|
@@ -6000,7 +5998,8 @@ const IdCapture = class {
|
|
|
6000
5998
|
}
|
|
6001
5999
|
async openCamera() {
|
|
6002
6000
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
6003
|
-
const constraints =
|
|
6001
|
+
//const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
|
|
6002
|
+
const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
|
|
6004
6003
|
setTimeout(() => {
|
|
6005
6004
|
navigator.mediaDevices
|
|
6006
6005
|
.getUserMedia(constraints)
|
|
@@ -6123,7 +6122,7 @@ const IdDoubleSide = class {
|
|
|
6123
6122
|
}
|
|
6124
6123
|
async captureIdImage(event) {
|
|
6125
6124
|
let idPhoto = event.detail;
|
|
6126
|
-
if (idPhoto.
|
|
6125
|
+
if (idPhoto.size == 0) {
|
|
6127
6126
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
6128
6127
|
this.triggerErrorFlow();
|
|
6129
6128
|
return;
|
|
@@ -6138,7 +6137,7 @@ const IdDoubleSide = class {
|
|
|
6138
6137
|
}
|
|
6139
6138
|
async captureIdBackImage(event) {
|
|
6140
6139
|
let idPhoto = event.detail;
|
|
6141
|
-
if (idPhoto.
|
|
6140
|
+
if (idPhoto.size == 0) {
|
|
6142
6141
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
6143
6142
|
this.triggerErrorFlow();
|
|
6144
6143
|
return;
|
|
@@ -6153,7 +6152,7 @@ const IdDoubleSide = class {
|
|
|
6153
6152
|
}
|
|
6154
6153
|
async capturedIdRecording(event) {
|
|
6155
6154
|
let idRecording = event.detail;
|
|
6156
|
-
if (idRecording.
|
|
6155
|
+
if (idRecording.size == 0) {
|
|
6157
6156
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
|
|
6158
6157
|
this.triggerErrorFlow();
|
|
6159
6158
|
return;
|
|
@@ -6283,22 +6282,17 @@ const IdSingleSide = class {
|
|
|
6283
6282
|
this.idFlow.photoFile = null;
|
|
6284
6283
|
this.idFlow.recordingFile = null;
|
|
6285
6284
|
this.showTimeout = false;
|
|
6286
|
-
this.errorMessage = '';
|
|
6287
6285
|
}
|
|
6288
6286
|
howToDone() {
|
|
6289
6287
|
this.showHowTo = false;
|
|
6290
6288
|
}
|
|
6291
6289
|
timeElapsed() {
|
|
6292
6290
|
this.showTimeout = true;
|
|
6293
|
-
this.errorMessage = 'timeout';
|
|
6294
6291
|
}
|
|
6295
6292
|
async captureIdImage(event) {
|
|
6296
|
-
console.log('photoIdCapture');
|
|
6297
|
-
console.log(event);
|
|
6298
6293
|
let idPhoto = event.detail;
|
|
6299
|
-
if (idPhoto.
|
|
6294
|
+
if (idPhoto.size == 0) {
|
|
6300
6295
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
6301
|
-
this.errorMessage = 'Empty id photo';
|
|
6302
6296
|
this.showTimeout = true;
|
|
6303
6297
|
return;
|
|
6304
6298
|
}
|
|
@@ -6315,12 +6309,9 @@ const IdSingleSide = class {
|
|
|
6315
6309
|
await this.endFlow();
|
|
6316
6310
|
}
|
|
6317
6311
|
async capturedIdRecording(event) {
|
|
6318
|
-
console.log('recordingIdCapture');
|
|
6319
|
-
console.log(event);
|
|
6320
6312
|
let idRecording = event.detail;
|
|
6321
|
-
if (idRecording.
|
|
6313
|
+
if (idRecording.size == 0) {
|
|
6322
6314
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
6323
|
-
this.errorMessage = 'Empty id recording';
|
|
6324
6315
|
this.showTimeout = true;
|
|
6325
6316
|
return;
|
|
6326
6317
|
}
|
|
@@ -6350,7 +6341,6 @@ const IdSingleSide = class {
|
|
|
6350
6341
|
this.idFlow.photoFile = null;
|
|
6351
6342
|
this.idFlow.recordingFile = null;
|
|
6352
6343
|
this.switchCamera();
|
|
6353
|
-
this.errorMessage = 'Upload photo not successful';
|
|
6354
6344
|
this.showTimeout = true;
|
|
6355
6345
|
}
|
|
6356
6346
|
}
|
|
@@ -6365,7 +6355,6 @@ const IdSingleSide = class {
|
|
|
6365
6355
|
else {
|
|
6366
6356
|
this.idFlow.photoFile = null;
|
|
6367
6357
|
this.idFlow.recordingFile = null;
|
|
6368
|
-
this.errorMessage = 'Upload recording not successful';
|
|
6369
6358
|
this.showTimeout = true;
|
|
6370
6359
|
}
|
|
6371
6360
|
}
|
|
@@ -6395,7 +6384,7 @@ const IdSingleSide = class {
|
|
|
6395
6384
|
}
|
|
6396
6385
|
}
|
|
6397
6386
|
render() {
|
|
6398
|
-
let error = index.h("capture-error", { type: "ID"
|
|
6387
|
+
let error = index.h("capture-error", { type: "ID" });
|
|
6399
6388
|
let capture = index.h("id-capture", { id: "idFront" });
|
|
6400
6389
|
let howToInfo = index.h("how-to-info", { idSide: "front" });
|
|
6401
6390
|
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
@@ -6469,7 +6458,7 @@ function v4(options, buf, offset) {
|
|
|
6469
6458
|
}
|
|
6470
6459
|
|
|
6471
6460
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6472
|
-
const version$1 = "3.6.
|
|
6461
|
+
const version$1 = "3.6.4";
|
|
6473
6462
|
const description = "Person Identification Component";
|
|
6474
6463
|
const main = "./dist/index.cjs.js";
|
|
6475
6464
|
const module$1 = "./dist/index.js";
|
|
@@ -9944,7 +9933,7 @@ const SelfieCapture = class {
|
|
|
9944
9933
|
}
|
|
9945
9934
|
async openCamera() {
|
|
9946
9935
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
9947
|
-
const constraints =
|
|
9936
|
+
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9948
9937
|
setTimeout(() => {
|
|
9949
9938
|
navigator.mediaDevices
|
|
9950
9939
|
.getUserMedia(constraints)
|
|
@@ -10147,7 +10136,7 @@ const UserLiveness = class {
|
|
|
10147
10136
|
}
|
|
10148
10137
|
async captureSelfieImage(event) {
|
|
10149
10138
|
let selfiePhoto = event.detail;
|
|
10150
|
-
if (selfiePhoto.
|
|
10139
|
+
if (selfiePhoto.size == 0) {
|
|
10151
10140
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
|
|
10152
10141
|
this.triggerErrorFlow();
|
|
10153
10142
|
return;
|
|
@@ -10162,7 +10151,7 @@ const UserLiveness = class {
|
|
|
10162
10151
|
}
|
|
10163
10152
|
async capturedSelfieRecording(event) {
|
|
10164
10153
|
let selfieRecording = event.detail;
|
|
10165
|
-
if (selfieRecording.
|
|
10154
|
+
if (selfieRecording.size == 0) {
|
|
10166
10155
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
|
|
10167
10156
|
this.triggerErrorFlow();
|
|
10168
10157
|
return;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"
|
|
17
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -4,7 +4,6 @@ import { delay } from '../../../utils/utils';
|
|
|
4
4
|
export class CaptureError {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.type = undefined;
|
|
7
|
-
this.message = undefined;
|
|
8
7
|
this.buttonEnabled = undefined;
|
|
9
8
|
this.buttonText = undefined;
|
|
10
9
|
}
|
|
@@ -36,7 +35,7 @@ export class CaptureError {
|
|
|
36
35
|
this.eventCaptureErrorDone.emit();
|
|
37
36
|
}
|
|
38
37
|
render() {
|
|
39
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)
|
|
38
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
40
39
|
}
|
|
41
40
|
static get is() { return "capture-error"; }
|
|
42
41
|
static get originalStyleUrls() {
|
|
@@ -67,23 +66,6 @@ export class CaptureError {
|
|
|
67
66
|
},
|
|
68
67
|
"attribute": "type",
|
|
69
68
|
"reflect": false
|
|
70
|
-
},
|
|
71
|
-
"message": {
|
|
72
|
-
"type": "string",
|
|
73
|
-
"mutable": false,
|
|
74
|
-
"complexType": {
|
|
75
|
-
"original": "string",
|
|
76
|
-
"resolved": "string",
|
|
77
|
-
"references": {}
|
|
78
|
-
},
|
|
79
|
-
"required": false,
|
|
80
|
-
"optional": false,
|
|
81
|
-
"docs": {
|
|
82
|
-
"tags": [],
|
|
83
|
-
"text": ""
|
|
84
|
-
},
|
|
85
|
-
"attribute": "message",
|
|
86
|
-
"reflect": false
|
|
87
69
|
}
|
|
88
70
|
};
|
|
89
71
|
}
|
|
@@ -66,7 +66,7 @@ export class IdBackCapture {
|
|
|
66
66
|
}
|
|
67
67
|
async openCamera() {
|
|
68
68
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
69
|
-
const constraints =
|
|
69
|
+
const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
70
70
|
setTimeout(() => {
|
|
71
71
|
navigator.mediaDevices
|
|
72
72
|
.getUserMedia(constraints)
|
|
@@ -62,7 +62,8 @@ export class IdCapture {
|
|
|
62
62
|
}
|
|
63
63
|
async openCamera() {
|
|
64
64
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
65
|
-
const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
|
|
65
|
+
//const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
|
|
66
|
+
const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
|
|
66
67
|
setTimeout(() => {
|
|
67
68
|
navigator.mediaDevices
|
|
68
69
|
.getUserMedia(constraints)
|
|
@@ -72,7 +72,7 @@ export class SelfieCapture {
|
|
|
72
72
|
}
|
|
73
73
|
async openCamera() {
|
|
74
74
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
75
|
-
const constraints =
|
|
75
|
+
const constraints = this.cameras.GetConstraints('', store.device, true);
|
|
76
76
|
setTimeout(() => {
|
|
77
77
|
navigator.mediaDevices
|
|
78
78
|
.getUserMedia(constraints)
|
|
@@ -60,7 +60,7 @@ export class IdDoubleSide {
|
|
|
60
60
|
}
|
|
61
61
|
async captureIdImage(event) {
|
|
62
62
|
let idPhoto = event.detail;
|
|
63
|
-
if (idPhoto.
|
|
63
|
+
if (idPhoto.size == 0) {
|
|
64
64
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
65
65
|
this.triggerErrorFlow();
|
|
66
66
|
return;
|
|
@@ -75,7 +75,7 @@ export class IdDoubleSide {
|
|
|
75
75
|
}
|
|
76
76
|
async captureIdBackImage(event) {
|
|
77
77
|
let idPhoto = event.detail;
|
|
78
|
-
if (idPhoto.
|
|
78
|
+
if (idPhoto.size == 0) {
|
|
79
79
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
80
80
|
this.triggerErrorFlow();
|
|
81
81
|
return;
|
|
@@ -90,7 +90,7 @@ export class IdDoubleSide {
|
|
|
90
90
|
}
|
|
91
91
|
async capturedIdRecording(event) {
|
|
92
92
|
let idRecording = event.detail;
|
|
93
|
-
if (idRecording.
|
|
93
|
+
if (idRecording.size == 0) {
|
|
94
94
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
|
|
95
95
|
this.triggerErrorFlow();
|
|
96
96
|
return;
|
|
@@ -26,22 +26,17 @@ export class IdSingleSide {
|
|
|
26
26
|
this.idFlow.photoFile = null;
|
|
27
27
|
this.idFlow.recordingFile = null;
|
|
28
28
|
this.showTimeout = false;
|
|
29
|
-
this.errorMessage = '';
|
|
30
29
|
}
|
|
31
30
|
howToDone() {
|
|
32
31
|
this.showHowTo = false;
|
|
33
32
|
}
|
|
34
33
|
timeElapsed() {
|
|
35
34
|
this.showTimeout = true;
|
|
36
|
-
this.errorMessage = 'timeout';
|
|
37
35
|
}
|
|
38
36
|
async captureIdImage(event) {
|
|
39
|
-
console.log('photoIdCapture');
|
|
40
|
-
console.log(event);
|
|
41
37
|
let idPhoto = event.detail;
|
|
42
|
-
if (idPhoto.
|
|
38
|
+
if (idPhoto.size == 0) {
|
|
43
39
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
44
|
-
this.errorMessage = 'Empty id photo';
|
|
45
40
|
this.showTimeout = true;
|
|
46
41
|
return;
|
|
47
42
|
}
|
|
@@ -58,12 +53,9 @@ export class IdSingleSide {
|
|
|
58
53
|
await this.endFlow();
|
|
59
54
|
}
|
|
60
55
|
async capturedIdRecording(event) {
|
|
61
|
-
console.log('recordingIdCapture');
|
|
62
|
-
console.log(event);
|
|
63
56
|
let idRecording = event.detail;
|
|
64
|
-
if (idRecording.
|
|
57
|
+
if (idRecording.size == 0) {
|
|
65
58
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
66
|
-
this.errorMessage = 'Empty id recording';
|
|
67
59
|
this.showTimeout = true;
|
|
68
60
|
return;
|
|
69
61
|
}
|
|
@@ -93,7 +85,6 @@ export class IdSingleSide {
|
|
|
93
85
|
this.idFlow.photoFile = null;
|
|
94
86
|
this.idFlow.recordingFile = null;
|
|
95
87
|
this.switchCamera();
|
|
96
|
-
this.errorMessage = 'Upload photo not successful';
|
|
97
88
|
this.showTimeout = true;
|
|
98
89
|
}
|
|
99
90
|
}
|
|
@@ -108,7 +99,6 @@ export class IdSingleSide {
|
|
|
108
99
|
else {
|
|
109
100
|
this.idFlow.photoFile = null;
|
|
110
101
|
this.idFlow.recordingFile = null;
|
|
111
|
-
this.errorMessage = 'Upload recording not successful';
|
|
112
102
|
this.showTimeout = true;
|
|
113
103
|
}
|
|
114
104
|
}
|
|
@@ -138,7 +128,7 @@ export class IdSingleSide {
|
|
|
138
128
|
}
|
|
139
129
|
}
|
|
140
130
|
render() {
|
|
141
|
-
let error = h("capture-error", { type: "ID"
|
|
131
|
+
let error = h("capture-error", { type: "ID" });
|
|
142
132
|
let capture = h("id-capture", { id: "idFront" });
|
|
143
133
|
let howToInfo = h("how-to-info", { idSide: "front" });
|
|
144
134
|
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
@@ -40,7 +40,7 @@ export class UserLiveness {
|
|
|
40
40
|
}
|
|
41
41
|
async captureSelfieImage(event) {
|
|
42
42
|
let selfiePhoto = event.detail;
|
|
43
|
-
if (selfiePhoto.
|
|
43
|
+
if (selfiePhoto.size == 0) {
|
|
44
44
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
|
|
45
45
|
this.triggerErrorFlow();
|
|
46
46
|
return;
|
|
@@ -55,7 +55,7 @@ export class UserLiveness {
|
|
|
55
55
|
}
|
|
56
56
|
async capturedSelfieRecording(event) {
|
|
57
57
|
let selfieRecording = event.detail;
|
|
58
|
-
if (selfieRecording.
|
|
58
|
+
if (selfieRecording.size == 0) {
|
|
59
59
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
|
|
60
60
|
this.triggerErrorFlow();
|
|
61
61
|
return;
|
|
@@ -6,7 +6,8 @@ export class Cameras {
|
|
|
6
6
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
7
7
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
8
8
|
for (const device of videoDevices) {
|
|
9
|
-
const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
9
|
+
//const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
10
|
+
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
10
11
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
11
12
|
stream.getVideoTracks().forEach(track => {
|
|
12
13
|
var _a, _b;
|
|
@@ -94,29 +95,27 @@ export class Cameras {
|
|
|
94
95
|
constraints.video = mediaTrack;
|
|
95
96
|
return constraints;
|
|
96
97
|
}
|
|
97
|
-
GetConstraintsIOs(device, portrait = false) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return constraints;
|
|
119
|
-
}
|
|
98
|
+
// public GetConstraintsIOs(device: DeviceState, portrait: boolean = false): MediaStreamConstraints | any {
|
|
99
|
+
// let constraints: MediaStreamConstraints = {
|
|
100
|
+
// audio: false,
|
|
101
|
+
// };
|
|
102
|
+
// let mediaTrack: MediaTrackConstraints = {};
|
|
103
|
+
// if (device.isDesktop) {
|
|
104
|
+
// mediaTrack.width = 1280;
|
|
105
|
+
// } else {
|
|
106
|
+
// if (portrait) {
|
|
107
|
+
// mediaTrack.facingMode = 'user';
|
|
108
|
+
// mediaTrack.width = 1280;
|
|
109
|
+
// mediaTrack.height = 720;
|
|
110
|
+
// } else {
|
|
111
|
+
// mediaTrack.facingMode = 'environment';
|
|
112
|
+
// mediaTrack.width = 1280;
|
|
113
|
+
// mediaTrack.height = 720;
|
|
114
|
+
// }
|
|
115
|
+
// }
|
|
116
|
+
// constraints.video = mediaTrack;
|
|
117
|
+
// return constraints;
|
|
118
|
+
// }
|
|
120
119
|
GetRecommendedCamera(cameras) {
|
|
121
120
|
if (cameras && cameras.length > 0) {
|
|
122
121
|
var recommDevice = cameras.find(c => c.recommended);
|