@ekyc_qoobiss/qbs-ect-cmp 3.6.2 → 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.
@@ -5322,17 +5322,13 @@ class Stream {
5322
5322
  this.recordedChunks.push(event.data);
5323
5323
  };
5324
5324
  this.mediaRecorder.onstop = _e => {
5325
- this.saveVideoRecording(this.recordedChunks, options.mimeType);
5326
- this.recordedChunks = [];
5325
+ var blob = new Blob(this.recordedChunks, {
5326
+ type: options.mimeType.split(';')[0],
5327
+ });
5328
+ this.callbackRecordingReady(blob);
5327
5329
  };
5328
5330
  this.mediaRecorder.start(); // Start recording, and dump data every second
5329
5331
  }
5330
- async saveVideoRecording(videoTosave, mimeType) {
5331
- var blob = new Blob(videoTosave, {
5332
- type: mimeType.split(';')[0],
5333
- });
5334
- this.callbackRecordingReady(blob);
5335
- }
5336
5332
  updateCanvasSize(canvas) {
5337
5333
  this.videoSize = { width: this.videoElement.videoWidth, height: this.videoElement.videoHeight };
5338
5334
  canvas.width = this.videoSize.width;
@@ -5568,7 +5564,6 @@ const CaptureError = class {
5568
5564
  index.registerInstance(this, hostRef);
5569
5565
  this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7);
5570
5566
  this.type = undefined;
5571
- this.message = undefined;
5572
5567
  this.buttonEnabled = undefined;
5573
5568
  this.buttonText = undefined;
5574
5569
  }
@@ -5600,7 +5595,7 @@ const CaptureError = class {
5600
5595
  this.eventCaptureErrorDone.emit();
5601
5596
  }
5602
5597
  render() {
5603
- 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("p", { class: "color-red font-weight-bold font-size-18 mt-5" }, this.message)), 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))))));
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))))));
5604
5599
  }
5605
5600
  };
5606
5601
  CaptureError.style = captureErrorCss;
@@ -5687,7 +5682,8 @@ class Cameras {
5687
5682
  const devices = await navigator.mediaDevices.enumerateDevices();
5688
5683
  const videoDevices = devices.filter(device => device.kind === 'videoinput');
5689
5684
  for (const device of videoDevices) {
5690
- 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);
5691
5687
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
5692
5688
  stream.getVideoTracks().forEach(track => {
5693
5689
  var _a, _b;
@@ -5775,28 +5771,27 @@ class Cameras {
5775
5771
  constraints.video = mediaTrack;
5776
5772
  return constraints;
5777
5773
  }
5778
- GetConstraintsIOs(device, portrait = false) {
5779
- let constraints = {
5780
- audio: false,
5781
- };
5782
- let mediaTrack = {};
5783
- if (device.isDesktop) {
5784
- mediaTrack.width = 1280;
5785
- }
5786
- else {
5787
- mediaTrack.facingMode = 'user';
5788
- if (portrait) {
5789
- mediaTrack.width = 1280;
5790
- mediaTrack.height = 720;
5791
- }
5792
- else {
5793
- mediaTrack.facingMode = 'environment';
5794
- //mediaTrack.width = 1280;
5795
- }
5796
- }
5797
- constraints.video = mediaTrack;
5798
- return constraints;
5799
- }
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
+ // }
5800
5795
  GetRecommendedCamera(cameras) {
5801
5796
  if (cameras && cameras.length > 0) {
5802
5797
  var recommDevice = cameras.find(c => c.recommended);
@@ -5886,7 +5881,7 @@ const IdBackCapture = class {
5886
5881
  }
5887
5882
  async openCamera() {
5888
5883
  await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
5889
- const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
5884
+ const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
5890
5885
  setTimeout(() => {
5891
5886
  navigator.mediaDevices
5892
5887
  .getUserMedia(constraints)
@@ -6003,7 +5998,8 @@ const IdCapture = class {
6003
5998
  }
6004
5999
  async openCamera() {
6005
6000
  await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
6006
- const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
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);
6007
6003
  setTimeout(() => {
6008
6004
  navigator.mediaDevices
6009
6005
  .getUserMedia(constraints)
@@ -6126,7 +6122,7 @@ const IdDoubleSide = class {
6126
6122
  }
6127
6123
  async captureIdImage(event) {
6128
6124
  let idPhoto = event.detail;
6129
- if (idPhoto.length == 0 || idPhoto.size == 0) {
6125
+ if (idPhoto.size == 0) {
6130
6126
  await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
6131
6127
  this.triggerErrorFlow();
6132
6128
  return;
@@ -6141,7 +6137,7 @@ const IdDoubleSide = class {
6141
6137
  }
6142
6138
  async captureIdBackImage(event) {
6143
6139
  let idPhoto = event.detail;
6144
- if (idPhoto.length == 0 || idPhoto.size == 0) {
6140
+ if (idPhoto.size == 0) {
6145
6141
  await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
6146
6142
  this.triggerErrorFlow();
6147
6143
  return;
@@ -6156,7 +6152,7 @@ const IdDoubleSide = class {
6156
6152
  }
6157
6153
  async capturedIdRecording(event) {
6158
6154
  let idRecording = event.detail;
6159
- if (idRecording.length == 0 || idRecording.size == 0) {
6155
+ if (idRecording.size == 0) {
6160
6156
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
6161
6157
  this.triggerErrorFlow();
6162
6158
  return;
@@ -6286,20 +6282,17 @@ const IdSingleSide = class {
6286
6282
  this.idFlow.photoFile = null;
6287
6283
  this.idFlow.recordingFile = null;
6288
6284
  this.showTimeout = false;
6289
- this.errorMessage = '';
6290
6285
  }
6291
6286
  howToDone() {
6292
6287
  this.showHowTo = false;
6293
6288
  }
6294
6289
  timeElapsed() {
6295
6290
  this.showTimeout = true;
6296
- this.errorMessage = 'timeout';
6297
6291
  }
6298
6292
  async captureIdImage(event) {
6299
6293
  let idPhoto = event.detail;
6300
- if (idPhoto.length == 0 || idPhoto.size == 0) {
6294
+ if (idPhoto.size == 0) {
6301
6295
  await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
6302
- this.errorMessage = 'Empty id photo';
6303
6296
  this.showTimeout = true;
6304
6297
  return;
6305
6298
  }
@@ -6317,9 +6310,8 @@ const IdSingleSide = class {
6317
6310
  }
6318
6311
  async capturedIdRecording(event) {
6319
6312
  let idRecording = event.detail;
6320
- if (idRecording.length == 0 || idRecording.size == 0) {
6313
+ if (idRecording.size == 0) {
6321
6314
  await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
6322
- this.errorMessage = 'Empty id recording';
6323
6315
  this.showTimeout = true;
6324
6316
  return;
6325
6317
  }
@@ -6349,7 +6341,6 @@ const IdSingleSide = class {
6349
6341
  this.idFlow.photoFile = null;
6350
6342
  this.idFlow.recordingFile = null;
6351
6343
  this.switchCamera();
6352
- this.errorMessage = 'Upload photo not successful';
6353
6344
  this.showTimeout = true;
6354
6345
  }
6355
6346
  }
@@ -6364,7 +6355,6 @@ const IdSingleSide = class {
6364
6355
  else {
6365
6356
  this.idFlow.photoFile = null;
6366
6357
  this.idFlow.recordingFile = null;
6367
- this.errorMessage = 'Upload recording not successful';
6368
6358
  this.showTimeout = true;
6369
6359
  }
6370
6360
  }
@@ -6394,7 +6384,7 @@ const IdSingleSide = class {
6394
6384
  }
6395
6385
  }
6396
6386
  render() {
6397
- let error = index.h("capture-error", { type: "ID", message: this.errorMessage });
6387
+ let error = index.h("capture-error", { type: "ID" });
6398
6388
  let capture = index.h("id-capture", { id: "idFront" });
6399
6389
  let howToInfo = index.h("how-to-info", { idSide: "front" });
6400
6390
  return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
@@ -6468,7 +6458,7 @@ function v4(options, buf, offset) {
6468
6458
  }
6469
6459
 
6470
6460
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6471
- const version$1 = "3.6.2";
6461
+ const version$1 = "3.6.4";
6472
6462
  const description = "Person Identification Component";
6473
6463
  const main = "./dist/index.cjs.js";
6474
6464
  const module$1 = "./dist/index.js";
@@ -9943,7 +9933,7 @@ const SelfieCapture = class {
9943
9933
  }
9944
9934
  async openCamera() {
9945
9935
  await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
9946
- const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device, true) : this.cameras.GetConstraints('', state.device, true);
9936
+ const constraints = this.cameras.GetConstraints('', state.device, true);
9947
9937
  setTimeout(() => {
9948
9938
  navigator.mediaDevices
9949
9939
  .getUserMedia(constraints)
@@ -10146,7 +10136,7 @@ const UserLiveness = class {
10146
10136
  }
10147
10137
  async captureSelfieImage(event) {
10148
10138
  let selfiePhoto = event.detail;
10149
- if (selfiePhoto.length == 0 || selfiePhoto.size == 0) {
10139
+ if (selfiePhoto.size == 0) {
10150
10140
  await this.baseComponent.apiCall.AddLog({ message: 'Empty selfie', blobData: selfiePhoto }, getLogMessage());
10151
10141
  this.triggerErrorFlow();
10152
10142
  return;
@@ -10161,7 +10151,7 @@ const UserLiveness = class {
10161
10151
  }
10162
10152
  async capturedSelfieRecording(event) {
10163
10153
  let selfieRecording = event.detail;
10164
- if (selfieRecording.length == 0 || selfieRecording.size == 0) {
10154
+ if (selfieRecording.size == 0) {
10165
10155
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
10166
10156
  this.triggerErrorFlow();
10167
10157
  return;
@@ -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],"message":[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);
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],"message":[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);
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), h("p", { class: "color-red font-weight-bold font-size-18 mt-5" }, this.message)), 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))))));
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 = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
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 = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device, true) : this.cameras.GetConstraints('', store.device, true);
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.length == 0 || idPhoto.size == 0) {
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.length == 0 || idPhoto.size == 0) {
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.length == 0 || idRecording.size == 0) {
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,20 +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
37
  let idPhoto = event.detail;
40
- if (idPhoto.length == 0 || idPhoto.size == 0) {
38
+ if (idPhoto.size == 0) {
41
39
  await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
42
- this.errorMessage = 'Empty id photo';
43
40
  this.showTimeout = true;
44
41
  return;
45
42
  }
@@ -57,9 +54,8 @@ export class IdSingleSide {
57
54
  }
58
55
  async capturedIdRecording(event) {
59
56
  let idRecording = event.detail;
60
- if (idRecording.length == 0 || idRecording.size == 0) {
57
+ if (idRecording.size == 0) {
61
58
  await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
62
- this.errorMessage = 'Empty id recording';
63
59
  this.showTimeout = true;
64
60
  return;
65
61
  }
@@ -89,7 +85,6 @@ export class IdSingleSide {
89
85
  this.idFlow.photoFile = null;
90
86
  this.idFlow.recordingFile = null;
91
87
  this.switchCamera();
92
- this.errorMessage = 'Upload photo not successful';
93
88
  this.showTimeout = true;
94
89
  }
95
90
  }
@@ -104,7 +99,6 @@ export class IdSingleSide {
104
99
  else {
105
100
  this.idFlow.photoFile = null;
106
101
  this.idFlow.recordingFile = null;
107
- this.errorMessage = 'Upload recording not successful';
108
102
  this.showTimeout = true;
109
103
  }
110
104
  }
@@ -134,7 +128,7 @@ export class IdSingleSide {
134
128
  }
135
129
  }
136
130
  render() {
137
- let error = h("capture-error", { type: "ID", message: this.errorMessage });
131
+ let error = h("capture-error", { type: "ID" });
138
132
  let capture = h("id-capture", { id: "idFront" });
139
133
  let howToInfo = h("how-to-info", { idSide: "front" });
140
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.length == 0 || selfiePhoto.size == 0) {
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.length == 0 || selfieRecording.size == 0) {
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,28 +95,27 @@ export class Cameras {
94
95
  constraints.video = mediaTrack;
95
96
  return constraints;
96
97
  }
97
- GetConstraintsIOs(device, portrait = false) {
98
- let constraints = {
99
- audio: false,
100
- };
101
- let mediaTrack = {};
102
- if (device.isDesktop) {
103
- mediaTrack.width = 1280;
104
- }
105
- else {
106
- mediaTrack.facingMode = 'user';
107
- if (portrait) {
108
- mediaTrack.width = 1280;
109
- mediaTrack.height = 720;
110
- }
111
- else {
112
- mediaTrack.facingMode = 'environment';
113
- //mediaTrack.width = 1280;
114
- }
115
- }
116
- constraints.video = mediaTrack;
117
- return constraints;
118
- }
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
+ // }
119
119
  GetRecommendedCamera(cameras) {
120
120
  if (cameras && cameras.length > 0) {
121
121
  var recommDevice = cameras.find(c => c.recommended);
@@ -132,17 +132,13 @@ export class Stream {
132
132
  this.recordedChunks.push(event.data);
133
133
  };
134
134
  this.mediaRecorder.onstop = _e => {
135
- this.saveVideoRecording(this.recordedChunks, options.mimeType);
136
- this.recordedChunks = [];
135
+ var blob = new Blob(this.recordedChunks, {
136
+ type: options.mimeType.split(';')[0],
137
+ });
138
+ this.callbackRecordingReady(blob);
137
139
  };
138
140
  this.mediaRecorder.start(); // Start recording, and dump data every second
139
141
  }
140
- async saveVideoRecording(videoTosave, mimeType) {
141
- var blob = new Blob(videoTosave, {
142
- type: mimeType.split(';')[0],
143
- });
144
- this.callbackRecordingReady(blob);
145
- }
146
142
  updateCanvasSize(canvas) {
147
143
  this.videoSize = { width: this.videoElement.videoWidth, height: this.videoElement.videoHeight };
148
144
  canvas.width = this.videoSize.width;