@ekyc_qoobiss/qbs-ect-cmp 3.6.55 → 3.6.57

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.
@@ -1590,6 +1590,8 @@ class IDML5Detector {
1590
1590
  }
1591
1591
  if (results[0].label == this.targetedLabel && results[0].confidence > 0.9 && !this.checked) {
1592
1592
  this.checked = true;
1593
+ if (TranslationUtils.state.debug)
1594
+ console.log('idml5detector | gotResults | autoCapturing');
1593
1595
  this.stream.autoCapturing();
1594
1596
  await this.drawFrame('green');
1595
1597
  }
@@ -4419,24 +4421,36 @@ class Stream {
4419
4421
  this.streamPaused = false;
4420
4422
  this.recordedChunks = [];
4421
4423
  this.videoSize = { width: 0, height: 0 };
4424
+ if (TranslationUtils.state.debug)
4425
+ console.log('stream | constructor');
4422
4426
  this.initFacePose();
4423
4427
  this.idML5Detector = IDML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
4424
4428
  this.faceML5Detector = FaceML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
4425
4429
  this.verificationMode = mode;
4426
4430
  }
4427
4431
  static getNewInstance(mode) {
4432
+ if (TranslationUtils.state.debug)
4433
+ console.log('stream | getNewInstance');
4428
4434
  if (!Stream.instance) {
4435
+ if (TranslationUtils.state.debug)
4436
+ console.log('stream | getNewInstance | new instance');
4429
4437
  Stream.instance = new Stream(mode);
4430
4438
  }
4431
4439
  return Stream.instance;
4432
4440
  }
4433
4441
  autoCapturing() {
4442
+ if (TranslationUtils.state.debug)
4443
+ console.log('stream | autoCapturing');
4434
4444
  this.callbackAutoCapturing();
4435
4445
  }
4436
4446
  timeElapsed() {
4447
+ if (TranslationUtils.state.debug)
4448
+ console.log('stream | timeElapsed');
4437
4449
  this.callbackTimeElapsed();
4438
4450
  }
4439
4451
  verificationReady() {
4452
+ if (TranslationUtils.state.debug)
4453
+ console.log('stream | verificationReady');
4440
4454
  this.verificationFinished();
4441
4455
  }
4442
4456
  updateHtmlElements(videoElement, canvasElement, component) {
@@ -4446,6 +4460,8 @@ class Stream {
4446
4460
  this.faceML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
4447
4461
  }
4448
4462
  startStream(stream) {
4463
+ if (TranslationUtils.state.debug)
4464
+ console.log('stream | startStream');
4449
4465
  if (this.stream)
4450
4466
  this.stream.getTracks().forEach((track) => track.stop());
4451
4467
  this.stream = stream;
@@ -4477,6 +4493,8 @@ class Stream {
4477
4493
  this.recordStream();
4478
4494
  }
4479
4495
  recordStream() {
4496
+ if (TranslationUtils.state.debug)
4497
+ console.log('stream | recordStream');
4480
4498
  if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
4481
4499
  return;
4482
4500
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
@@ -4487,9 +4505,13 @@ class Stream {
4487
4505
  this.recordedChunks = [];
4488
4506
  this.mediaRecorder = new MediaRecorder(this.stream, options);
4489
4507
  this.mediaRecorder.ondataavailable = event => {
4508
+ if (TranslationUtils.state.debug)
4509
+ console.log('stream | recordStream | ondataavailable');
4490
4510
  this.recordedChunks.push(event.data);
4491
4511
  };
4492
4512
  this.mediaRecorder.onstop = _e => {
4513
+ if (TranslationUtils.state.debug)
4514
+ console.log('stream | recordStream | onstop');
4493
4515
  var rec = new Blob(this.recordedChunks, {
4494
4516
  type: options.mimeType.split(';')[0],
4495
4517
  });
@@ -4520,6 +4542,8 @@ class Stream {
4520
4542
  return !(this.stream && this.stream.getTracks && this.stream.getTracks().length > 0);
4521
4543
  }
4522
4544
  async takePhoto() {
4545
+ if (TranslationUtils.state.debug)
4546
+ console.log('stream | takePhoto');
4523
4547
  const canvas = document.createElement('canvas');
4524
4548
  canvas.style.visibility = 'hidden';
4525
4549
  canvas.width = this.videoElement.videoWidth;
@@ -4527,12 +4551,16 @@ class Stream {
4527
4551
  return await this.getFrame(canvas);
4528
4552
  }
4529
4553
  getFrame(canvas) {
4554
+ if (TranslationUtils.state.debug)
4555
+ console.log('stream | getFrame');
4530
4556
  return new Promise(resolve => {
4531
4557
  const context = canvas.getContext('2d');
4532
4558
  context.drawImage(this.videoElement, 0, 0, canvas.width, canvas.height);
4533
4559
  canvas.toBlob((frame) => {
4534
4560
  if (frame.type === ImageFormat.JPEG && !TranslationUtils.state.device.isAppleDevice) {
4535
4561
  try {
4562
+ if (TranslationUtils.state.debug)
4563
+ console.log('stream | getFrame | addExifInImg');
4536
4564
  addExifInImg(frame, this.stream.getTracks()[0], this.videoSize).then(updatedFrame => resolve(updatedFrame));
4537
4565
  }
4538
4566
  catch (e) {
@@ -4541,6 +4569,8 @@ class Stream {
4541
4569
  }
4542
4570
  }
4543
4571
  else {
4572
+ if (TranslationUtils.state.debug)
4573
+ console.log('stream | getFrame | resolve');
4544
4574
  resolve(frame);
4545
4575
  }
4546
4576
  }, ImageFormat.PNG, 1);
@@ -4600,6 +4630,8 @@ const Camera = class {
4600
4630
  this.captureMode = undefined;
4601
4631
  }
4602
4632
  componentDidLoad() {
4633
+ if (TranslationUtils.state.debug)
4634
+ console.log('camera | componentDidLoad');
4603
4635
  this.startStream();
4604
4636
  }
4605
4637
  render() {
@@ -4616,6 +4648,8 @@ const Camera = class {
4616
4648
  return (index.h("div", { class: "camera" }, index.h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), index.h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
4617
4649
  }
4618
4650
  startStream() {
4651
+ if (TranslationUtils.state.debug)
4652
+ console.log('camera | startStream');
4619
4653
  let verificationMode = [TranslationUtils.FlowStatus.IDTILT, TranslationUtils.FlowStatus.LIVENESSGESTURE].includes(TranslationUtils.state.flowStatus) ? VerificationMode.Tilt : VerificationMode.Full;
4620
4654
  const stream = Stream.getNewInstance(verificationMode);
4621
4655
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
@@ -4720,7 +4754,7 @@ const CaptureError = class {
4720
4754
  this.eventCaptureErrorDone.emit();
4721
4755
  }
4722
4756
  render() {
4723
- 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.reason), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4757
+ 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: "font-size-1" }, this.reason)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4724
4758
  }
4725
4759
  };
4726
4760
  CaptureError.style = captureErrorCss;
@@ -4806,7 +4840,7 @@ const HowToInfo = class {
4806
4840
  HowToInfo.style = howToInfoCss;
4807
4841
 
4808
4842
  class Cameras {
4809
- async GetCameras(deviceInfo) {
4843
+ static async GetCameras(deviceInfo) {
4810
4844
  var allDevices = [];
4811
4845
  const devices = await navigator.mediaDevices.enumerateDevices();
4812
4846
  const videoDevices = devices.filter(device => device.kind === 'videoinput');
@@ -4869,7 +4903,7 @@ class Cameras {
4869
4903
  }
4870
4904
  return allDevices;
4871
4905
  }
4872
- GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
4906
+ static GetConstraints(selectedDeviceId, device, portrait = false, audio = true) {
4873
4907
  let constraints = {
4874
4908
  audio: audio,
4875
4909
  };
@@ -4905,7 +4939,7 @@ class Cameras {
4905
4939
  constraints.video = mediaTrack;
4906
4940
  return constraints;
4907
4941
  }
4908
- GetRecommendedCamera(cameras) {
4942
+ static GetRecommendedCamera(cameras) {
4909
4943
  if (cameras && cameras.length > 0) {
4910
4944
  var recommDevice = cameras.find(c => c.recommended);
4911
4945
  if (recommDevice) {
@@ -4915,12 +4949,16 @@ class Cameras {
4915
4949
  return null;
4916
4950
  }
4917
4951
  static async InitCameras(device) {
4952
+ if (TranslationUtils.state.debug)
4953
+ console.log('cameras | initCameras');
4918
4954
  try {
4919
- let cam = new Cameras();
4920
- let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
4921
- var recommCamera = cam.GetRecommendedCamera(cameras);
4922
- TranslationUtils.state.cameraIds = cameras.map(camera => camera.deviceId);
4955
+ let cameras = await Cameras.GetCameras(device);
4956
+ let envCameras = cameras.filter(c => c.facingMode == 'environment');
4957
+ var recommCamera = Cameras.GetRecommendedCamera(envCameras);
4958
+ TranslationUtils.state.cameraIds = envCameras.map(camera => camera.deviceId);
4923
4959
  TranslationUtils.state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
4960
+ if (TranslationUtils.state.debug)
4961
+ console.log(`cameras | initCameras | cameraIds ${TranslationUtils.state.cameraIds} | cameraId ${TranslationUtils.state.cameraId}`);
4924
4962
  return true;
4925
4963
  }
4926
4964
  catch (e) {
@@ -4955,15 +4993,11 @@ var IDPose;
4955
4993
  const idCaptureCss = ".logo{max-height:450px;max-width:450px}.canvas-on-video{max-width:100%;max-height:100%;position:absolute;z-index:2;transform:scale(-1, 1)}";
4956
4994
 
4957
4995
  const IdCapture = class {
4958
- // @State() private animationPath: string;
4959
4996
  constructor(hostRef) {
4960
4997
  index.registerInstance(this, hostRef);
4961
4998
  this.eventPhotoCapture = index.createEvent(this, "photoIdCapture", 7);
4962
4999
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
4963
5000
  this.eventTimeElapsed = index.createEvent(this, "timeElapsed", 7);
4964
- this.photoIsReady = (photos) => {
4965
- this.eventPhotoCapture.emit(photos);
4966
- };
4967
5001
  this.videoStarted = undefined;
4968
5002
  this.cameraSize = undefined;
4969
5003
  this.captureTaken = undefined;
@@ -4973,7 +5007,6 @@ const IdCapture = class {
4973
5007
  this.demoVideo = undefined;
4974
5008
  this.captureTaken = false;
4975
5009
  this.verified = false;
4976
- this.cameras = new Cameras();
4977
5010
  this.showDemo = true;
4978
5011
  }
4979
5012
  eventVideoStarted(event) {
@@ -4981,12 +5014,16 @@ const IdCapture = class {
4981
5014
  this.cameraSize = event.detail;
4982
5015
  }
4983
5016
  async componentWillLoad() {
5017
+ if (TranslationUtils.state.debug)
5018
+ console.log('id-capture | componentWillLoad');
4984
5019
  this.translations = await TranslationUtils.Translations.getValues();
4985
5020
  if (!navigator.mediaDevices) {
4986
5021
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
4987
5022
  }
4988
5023
  }
4989
5024
  initVariables() {
5025
+ if (TranslationUtils.state.debug)
5026
+ console.log('id-capture | initVariables');
4990
5027
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
4991
5028
  this.pose = IDPose.Straight;
4992
5029
  this.flowStep = TranslationUtils.FlowSteps.CiFrontCapture;
@@ -5007,6 +5044,8 @@ const IdCapture = class {
5007
5044
  }
5008
5045
  }
5009
5046
  async componentDidLoad() {
5047
+ if (TranslationUtils.state.debug)
5048
+ console.log('id-capture | componentDidLoad');
5010
5049
  this.initVariables();
5011
5050
  await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
5012
5051
  if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
@@ -5022,11 +5061,15 @@ const IdCapture = class {
5022
5061
  this.openCamera();
5023
5062
  }
5024
5063
  async openCamera() {
5025
- const constraints = this.cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
5064
+ if (TranslationUtils.state.debug)
5065
+ console.log('id-capture | openCamera');
5066
+ const constraints = Cameras.GetConstraints(TranslationUtils.state.cameraId, TranslationUtils.state.device);
5026
5067
  setTimeout(() => {
5027
5068
  navigator.mediaDevices
5028
5069
  .getUserMedia(constraints)
5029
5070
  .then(stream => {
5071
+ if (TranslationUtils.state.debug)
5072
+ console.log('id-capture | openCamera | streamObtained');
5030
5073
  const superStream = Stream.getNewInstance(this.verificationMode);
5031
5074
  superStream.initStream(stream);
5032
5075
  })
@@ -5037,30 +5080,35 @@ const IdCapture = class {
5037
5080
  }, 100);
5038
5081
  }
5039
5082
  closeCamera() {
5083
+ if (TranslationUtils.state.debug)
5084
+ console.log('id-capture | closeCamera');
5040
5085
  if (Stream.instance) {
5041
5086
  Stream.instance.dropStream();
5042
5087
  }
5043
5088
  }
5044
5089
  disconnectedCallback() {
5090
+ if (TranslationUtils.state.debug)
5091
+ console.log('id-capture | disconnectedCallback');
5045
5092
  this.closeCamera();
5046
5093
  Stream.instance = null;
5047
5094
  IDML5Detector.instance = null;
5048
5095
  FaceML5Detector.instance = null;
5049
5096
  }
5050
5097
  async takePhoto() {
5098
+ if (TranslationUtils.state.debug)
5099
+ console.log('id-capture | takePhoto');
5051
5100
  if (this.captureTaken)
5052
5101
  return;
5053
5102
  this.captureTaken = true;
5054
- if (Stream.instance) {
5055
- let res = await Stream.instance.takePhoto();
5056
- this.photoIsReady(res);
5057
- }
5058
- else {
5059
- this.eventTimeElapsed.emit();
5060
- }
5103
+ if (TranslationUtils.state.debug)
5104
+ console.log('id-capture | takePhoto | sendingPhoto');
5105
+ let res = await Stream.instance.takePhoto();
5106
+ this.eventPhotoCapture.emit(res);
5061
5107
  await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Finalized);
5062
5108
  }
5063
5109
  async verificationFinished() {
5110
+ if (TranslationUtils.state.debug)
5111
+ console.log('id-capture | verificationFinished');
5064
5112
  if (this.verified)
5065
5113
  return;
5066
5114
  this.verified = true;
@@ -5157,7 +5205,7 @@ function v4(options, buf, offset) {
5157
5205
  }
5158
5206
 
5159
5207
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5160
- const version$1 = "3.6.55";
5208
+ const version$1 = "3.6.57";
5161
5209
  const description = "Person Identification Component";
5162
5210
  const main = "./dist/index.cjs.js";
5163
5211
  const module$1 = "./dist/index.js";
@@ -8616,6 +8664,8 @@ const ProcessId = class {
8616
8664
  howToDone: false,
8617
8665
  };
8618
8666
  }
8667
+ if (TranslationUtils.state.debug)
8668
+ console.log('process-id | initFlow');
8619
8669
  }
8620
8670
  howToDone() {
8621
8671
  this.flow.howToDone = true;
@@ -8633,8 +8683,12 @@ const ProcessId = class {
8633
8683
  }
8634
8684
  }
8635
8685
  async captureIdImage(event) {
8686
+ if (TranslationUtils.state.debug)
8687
+ console.log('process-id | captureIdImage');
8636
8688
  let idPhoto = event.detail;
8637
8689
  if (idPhoto.size == 0) {
8690
+ if (TranslationUtils.state.debug)
8691
+ console.log('process-id | captureIdImage | Empty id photo');
8638
8692
  await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
8639
8693
  this.triggerErrorFlow();
8640
8694
  return;
@@ -8642,6 +8696,8 @@ const ProcessId = class {
8642
8696
  try {
8643
8697
  let frontCapture = new File([idPhoto], this.flow.capture.fileName, { type: 'image/png' });
8644
8698
  var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, frontCapture);
8699
+ if (TranslationUtils.state.debug)
8700
+ console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
8645
8701
  if (!uploadResult) {
8646
8702
  this.switchCamera();
8647
8703
  this.triggerErrorFlow();
@@ -8652,12 +8708,16 @@ const ProcessId = class {
8652
8708
  }
8653
8709
  }
8654
8710
  async capturedIdRecording(event) {
8711
+ if (TranslationUtils.state.debug)
8712
+ console.log('process-id | capturedIdRecording');
8655
8713
  let idRecording = event.detail;
8656
8714
  if (idRecording.size == 0 && this.recordingResultCount == 0) {
8657
8715
  this.recordingResultCount++;
8658
8716
  return;
8659
8717
  }
8660
8718
  if (idRecording.size == 0) {
8719
+ if (TranslationUtils.state.debug)
8720
+ console.log('process-id | capturedIdRecording | Empty ID recording');
8661
8721
  await TranslationUtils.ApiCall.instance.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
8662
8722
  this.triggerErrorFlow();
8663
8723
  return;
@@ -8665,12 +8725,16 @@ const ProcessId = class {
8665
8725
  let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
8666
8726
  let captureRec = new File([idRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
8667
8727
  var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, captureRec);
8728
+ if (TranslationUtils.state.debug)
8729
+ console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
8668
8730
  if (!uploadResult) {
8669
8731
  this.triggerErrorFlow();
8670
8732
  }
8671
8733
  this.recordingResultCount = 0;
8672
8734
  }
8673
8735
  async verificationFinished() {
8736
+ if (TranslationUtils.state.debug)
8737
+ console.log('process-id | verificationFinished');
8674
8738
  this.verificationReceived = Date.now();
8675
8739
  while (Date.now() - this.verificationReceived < 25000) {
8676
8740
  await delay(2000);
@@ -8680,9 +8744,13 @@ const ProcessId = class {
8680
8744
  break;
8681
8745
  }
8682
8746
  }
8747
+ if (TranslationUtils.state.debug)
8748
+ console.log('process-id | verificationFinished | waitingFinished ');
8683
8749
  this.triggerErrorFlow();
8684
8750
  }
8685
8751
  async componentDidLoad() {
8752
+ if (TranslationUtils.state.debug)
8753
+ console.log('process-id | componentDidLoad');
8686
8754
  await BaseComponent.initialize(this.currentStep);
8687
8755
  }
8688
8756
  triggerErrorFlow() {
@@ -8690,9 +8758,13 @@ const ProcessId = class {
8690
8758
  this.showInvalid = true;
8691
8759
  }
8692
8760
  async disconnectedCallback() {
8761
+ if (TranslationUtils.state.debug)
8762
+ console.log('process-id | disconnectedCallback');
8693
8763
  await BaseComponent.finalize(this.currentStep);
8694
8764
  }
8695
8765
  switchCamera() {
8766
+ if (TranslationUtils.state.debug)
8767
+ console.log('process-id | switchCamera');
8696
8768
  if (this.captureRetryCount == 1) {
8697
8769
  Cameras.switchCamera();
8698
8770
  this.captureRetryCount = 0;
@@ -8736,7 +8808,6 @@ const SelfieCapture = class {
8736
8808
  this.captureWidth = undefined;
8737
8809
  this.captureTaken = false;
8738
8810
  this.verified = false;
8739
- this.cameras = new Cameras();
8740
8811
  this.demoEnded = false;
8741
8812
  }
8742
8813
  eventVideoStarted(event) {
@@ -8773,7 +8844,7 @@ const SelfieCapture = class {
8773
8844
  this.openCamera();
8774
8845
  }
8775
8846
  async openCamera() {
8776
- const constraints = this.cameras.GetConstraints('', TranslationUtils.state.device, true);
8847
+ const constraints = Cameras.GetConstraints('', TranslationUtils.state.device, true);
8777
8848
  setTimeout(() => {
8778
8849
  navigator.mediaDevices
8779
8850
  .getUserMedia(constraints)
@@ -8888,7 +8959,7 @@ SmsCodeValidation.style = smsCodeValidationCss;
8888
8959
  const smsSendCss = "";
8889
8960
 
8890
8961
  const SmsSend = class {
8891
- constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.buttonText = undefined; this.title = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
8962
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.buttonText = undefined; this.title = undefined; this.details = undefined; this.phoneNumber = undefined; this.prefilledPhone = false; this.canSend = false; }
8892
8963
  async doAction() {
8893
8964
  try {
8894
8965
  this.canSend = false;
@@ -8908,6 +8979,7 @@ const SmsSend = class {
8908
8979
  this.translations = await TranslationUtils.Translations.getValues();
8909
8980
  this.buttonText = this.translations.PhoneValidationValues.Button;
8910
8981
  this.title = this.translations.PhoneValidationValues.Title;
8982
+ this.details = this.translations.PhoneValidationValues.Description;
8911
8983
  if (TranslationUtils.state.phoneNumber && TranslationUtils.state.phoneNumber != '') {
8912
8984
  this.phoneNumber = TranslationUtils.state.phoneNumber;
8913
8985
  this.prefilledPhone = true;
@@ -8926,7 +8998,7 @@ const SmsSend = class {
8926
8998
  ev.target.value = this.phoneNumber;
8927
8999
  }
8928
9000
  render() {
8929
- 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)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, this.translations.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
9001
+ 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), index.h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details)), index.h("div", { class: "input-container mb-15" }, index.h("label", { class: "font-size-18 mb-1" }, index.h("b", null, this.translations.PhoneValidationValues.Label)), index.h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
8930
9002
  }
8931
9003
  };
8932
9004
  SmsSend.style = smsSendCss;
@@ -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"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[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],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"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"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[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],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"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"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[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],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"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"]]],["random-actions.cjs",[[0,"random-actions"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"lang_iso":[1537],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"],[9,"scroll","handleScroll"]]],[0,"process-id",{"mode":[1],"showTimeout":[32],"showInvalid":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"user-liveness",{"mode":[1],"showError":[32],"showTimeout":[32],"flow":[32],"howToDone":[32]},[[0,"howToInfoDone","howToDoneEvent"],[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],"code":[32],"canSend":[32]}],[0,"sms-send",{"buttonText":[32],"title":[32],"details":[32],"phoneNumber":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32],"scrollClass":[32]}],[0,"capture-error",{"type":[1],"reason":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"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;
@@ -36,7 +36,7 @@ export class CaptureError {
36
36
  this.eventCaptureErrorDone.emit();
37
37
  }
38
38
  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.reason), 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" }, this.translations.GlobalValues.FooterText))))));
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: "font-size-1" }, this.reason)), 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" }, this.translations.GlobalValues.FooterText))))));
40
40
  }
41
41
  static get is() { return "capture-error"; }
42
42
  static get originalStyleUrls() {
@@ -14,11 +14,7 @@ import { Translations } from '../../../helpers/TranslationUtils';
14
14
  import { FlowStatus } from '../../../models/FlowStatus';
15
15
  // import { IDPose } from '../../libs/IDML5Detector/IDPose';
16
16
  export class IdCapture {
17
- // @State() private animationPath: string;
18
17
  constructor() {
19
- this.photoIsReady = (photos) => {
20
- this.eventPhotoCapture.emit(photos);
21
- };
22
18
  this.videoStarted = undefined;
23
19
  this.cameraSize = undefined;
24
20
  this.captureTaken = undefined;
@@ -28,7 +24,6 @@ export class IdCapture {
28
24
  this.demoVideo = undefined;
29
25
  this.captureTaken = false;
30
26
  this.verified = false;
31
- this.cameras = new Cameras();
32
27
  this.showDemo = true;
33
28
  }
34
29
  eventVideoStarted(event) {
@@ -36,12 +31,16 @@ export class IdCapture {
36
31
  this.cameraSize = event.detail;
37
32
  }
38
33
  async componentWillLoad() {
34
+ if (store.debug)
35
+ console.log('id-capture | componentWillLoad');
39
36
  this.translations = await Translations.getValues();
40
37
  if (!navigator.mediaDevices) {
41
38
  this.apiErrorEvent.emit({ message: 'This browser does not support webRTC' });
42
39
  }
43
40
  }
44
41
  initVariables() {
42
+ if (store.debug)
43
+ console.log('id-capture | initVariables');
45
44
  if (store.flowStatus == FlowStatus.IDFRONT) {
46
45
  this.pose = IDPose.Straight;
47
46
  this.flowStep = FlowSteps.CiFrontCapture;
@@ -62,6 +61,8 @@ export class IdCapture {
62
61
  }
63
62
  }
64
63
  async componentDidLoad() {
64
+ if (store.debug)
65
+ console.log('id-capture | componentDidLoad');
65
66
  this.initVariables();
66
67
  await BaseComponent.logStep(this.flowStep, FlowMoments.Initialized);
67
68
  if (store.flowStatus == FlowStatus.IDBACK) {
@@ -77,11 +78,15 @@ export class IdCapture {
77
78
  this.openCamera();
78
79
  }
79
80
  async openCamera() {
80
- const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
81
+ if (store.debug)
82
+ console.log('id-capture | openCamera');
83
+ const constraints = Cameras.GetConstraints(store.cameraId, store.device);
81
84
  setTimeout(() => {
82
85
  navigator.mediaDevices
83
86
  .getUserMedia(constraints)
84
87
  .then(stream => {
88
+ if (store.debug)
89
+ console.log('id-capture | openCamera | streamObtained');
85
90
  const superStream = Stream.getNewInstance(this.verificationMode);
86
91
  superStream.initStream(stream);
87
92
  })
@@ -92,30 +97,35 @@ export class IdCapture {
92
97
  }, 100);
93
98
  }
94
99
  closeCamera() {
100
+ if (store.debug)
101
+ console.log('id-capture | closeCamera');
95
102
  if (Stream.instance) {
96
103
  Stream.instance.dropStream();
97
104
  }
98
105
  }
99
106
  disconnectedCallback() {
107
+ if (store.debug)
108
+ console.log('id-capture | disconnectedCallback');
100
109
  this.closeCamera();
101
110
  Stream.instance = null;
102
111
  IDML5Detector.instance = null;
103
112
  FaceML5Detector.instance = null;
104
113
  }
105
114
  async takePhoto() {
115
+ if (store.debug)
116
+ console.log('id-capture | takePhoto');
106
117
  if (this.captureTaken)
107
118
  return;
108
119
  this.captureTaken = true;
109
- if (Stream.instance) {
110
- let res = await Stream.instance.takePhoto();
111
- this.photoIsReady(res);
112
- }
113
- else {
114
- this.eventTimeElapsed.emit();
115
- }
120
+ if (store.debug)
121
+ console.log('id-capture | takePhoto | sendingPhoto');
122
+ let res = await Stream.instance.takePhoto();
123
+ this.eventPhotoCapture.emit(res);
116
124
  await BaseComponent.logStep(this.flowStep, FlowMoments.Finalized);
117
125
  }
118
126
  async verificationFinished() {
127
+ if (store.debug)
128
+ console.log('id-capture | verificationFinished');
119
129
  if (this.verified)
120
130
  return;
121
131
  this.verified = true;
@@ -23,7 +23,6 @@ export class SelfieCapture {
23
23
  this.captureWidth = undefined;
24
24
  this.captureTaken = false;
25
25
  this.verified = false;
26
- this.cameras = new Cameras();
27
26
  this.demoEnded = false;
28
27
  }
29
28
  eventVideoStarted(event) {
@@ -60,7 +59,7 @@ export class SelfieCapture {
60
59
  this.openCamera();
61
60
  }
62
61
  async openCamera() {
63
- const constraints = this.cameras.GetConstraints('', store.device, true);
62
+ const constraints = Cameras.GetConstraints('', store.device, true);
64
63
  setTimeout(() => {
65
64
  navigator.mediaDevices
66
65
  .getUserMedia(constraints)
@@ -32,6 +32,8 @@ export class Camera {
32
32
  this.captureMode = undefined;
33
33
  }
34
34
  componentDidLoad() {
35
+ if (store.debug)
36
+ console.log('camera | componentDidLoad');
35
37
  this.startStream();
36
38
  }
37
39
  render() {
@@ -48,6 +50,8 @@ export class Camera {
48
50
  return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
49
51
  }
50
52
  startStream() {
53
+ if (store.debug)
54
+ console.log('camera | startStream');
51
55
  let verificationMode = [FlowStatus.IDTILT, FlowStatus.LIVENESSGESTURE].includes(store.flowStatus) ? VerificationMode.Tilt : VerificationMode.Full;
52
56
  const stream = Stream.getNewInstance(verificationMode);
53
57
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);