@ekyc_qoobiss/qbs-ect-cmp 3.6.64 → 3.6.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/cjs/{TranslationUtils-fbb2c39c.js → TranslationUtils-eeb71e60.js} +15 -10
  2. package/dist/cjs/agreement-check_17.cjs.entry.js +136 -90
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
  5. package/dist/cjs/random-actions.cjs.entry.js +1 -1
  6. package/dist/collection/components/common/how-to-info/how-to-info.js +25 -25
  7. package/dist/collection/components/common/id-capture/id-capture.js +0 -6
  8. package/dist/collection/components/flow/process-id/process-id.js +50 -42
  9. package/dist/collection/components/flow/user-liveness/user-liveness.js +47 -38
  10. package/dist/collection/components/identification-component/identification-component.js +25 -0
  11. package/dist/collection/models/FlowStatus.js +15 -11
  12. package/dist/esm/{TranslationUtils-32c06882.js → TranslationUtils-21a568f6.js} +15 -10
  13. package/dist/esm/agreement-check_17.entry.js +136 -90
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/qbs-ect-cmp.js +1 -1
  16. package/dist/esm/random-actions.entry.js +1 -1
  17. package/dist/qbs-ect-cmp/p-2735b5f4.js +1 -0
  18. package/dist/qbs-ect-cmp/{p-fc771dd3.entry.js → p-4fef4884.entry.js} +1 -1
  19. package/dist/qbs-ect-cmp/{p-98a9c331.entry.js → p-87851dcb.entry.js} +2 -2
  20. package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
  21. package/dist/types/components/common/how-to-info/how-to-info.d.ts +3 -2
  22. package/dist/types/components/flow/process-id/process-id.d.ts +3 -1
  23. package/dist/types/components/flow/user-liveness/user-liveness.d.ts +3 -2
  24. package/dist/types/components.d.ts +0 -1
  25. package/dist/types/models/CaptureFlow.d.ts +0 -1
  26. package/dist/types/models/FlowStatus.d.ts +15 -10
  27. package/package.json +1 -1
  28. package/dist/qbs-ect-cmp/p-601c9197.js +0 -1
@@ -210,16 +210,21 @@ exports.FlowStatus = void 0;
210
210
  FlowStatus[FlowStatus["PHONE"] = 3] = "PHONE";
211
211
  FlowStatus[FlowStatus["CODE"] = 4] = "CODE";
212
212
  FlowStatus[FlowStatus["CODEERROR"] = 5] = "CODEERROR";
213
- FlowStatus[FlowStatus["IDFRONT"] = 6] = "IDFRONT";
214
- FlowStatus[FlowStatus["IDBACK"] = 7] = "IDBACK";
215
- FlowStatus[FlowStatus["IDTILT"] = 8] = "IDTILT";
216
- FlowStatus[FlowStatus["LIVENESS"] = 9] = "LIVENESS";
217
- FlowStatus[FlowStatus["LIVENESSGESTURE"] = 10] = "LIVENESSGESTURE";
218
- FlowStatus[FlowStatus["COMPLETE"] = 11] = "COMPLETE";
219
- FlowStatus[FlowStatus["ERROREND"] = 12] = "ERROREND";
220
- FlowStatus[FlowStatus["CAMERAERROR"] = 13] = "CAMERAERROR";
221
- FlowStatus[FlowStatus["ABORTED"] = 14] = "ABORTED";
222
- FlowStatus[FlowStatus["NONE"] = 15] = "NONE";
213
+ FlowStatus[FlowStatus["IDFRONTHOWTO"] = 6] = "IDFRONTHOWTO";
214
+ FlowStatus[FlowStatus["IDFRONT"] = 7] = "IDFRONT";
215
+ FlowStatus[FlowStatus["IDBACKHOWTO"] = 8] = "IDBACKHOWTO";
216
+ FlowStatus[FlowStatus["IDBACK"] = 9] = "IDBACK";
217
+ FlowStatus[FlowStatus["IDTILTHOWTO"] = 10] = "IDTILTHOWTO";
218
+ FlowStatus[FlowStatus["IDTILT"] = 11] = "IDTILT";
219
+ FlowStatus[FlowStatus["LIVENESSHOWTO"] = 12] = "LIVENESSHOWTO";
220
+ FlowStatus[FlowStatus["LIVENESS"] = 13] = "LIVENESS";
221
+ FlowStatus[FlowStatus["LIVENESSGESTUREHOWTO"] = 14] = "LIVENESSGESTUREHOWTO";
222
+ FlowStatus[FlowStatus["LIVENESSGESTURE"] = 15] = "LIVENESSGESTURE";
223
+ FlowStatus[FlowStatus["COMPLETE"] = 16] = "COMPLETE";
224
+ FlowStatus[FlowStatus["ERROREND"] = 17] = "ERROREND";
225
+ FlowStatus[FlowStatus["CAMERAERROR"] = 18] = "CAMERAERROR";
226
+ FlowStatus[FlowStatus["ABORTED"] = 19] = "ABORTED";
227
+ FlowStatus[FlowStatus["NONE"] = 20] = "NONE";
223
228
  })(exports.FlowStatus || (exports.FlowStatus = {}));
224
229
 
225
230
  class IdCaptureValues {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const TranslationUtils = require('./TranslationUtils-fbb2c39c.js');
6
+ const TranslationUtils = require('./TranslationUtils-eeb71e60.js');
7
7
 
8
8
  const agreementCheckCss = "";
9
9
 
@@ -4795,46 +4795,64 @@ const ErrorEnd = class {
4795
4795
  };
4796
4796
  ErrorEnd.style = errorEndCss;
4797
4797
 
4798
+ var IDPose;
4799
+ (function (IDPose) {
4800
+ IDPose[IDPose["Straight"] = 0] = "Straight";
4801
+ IDPose[IDPose["Tilted"] = 1] = "Tilted";
4802
+ IDPose[IDPose["Rotate"] = 2] = "Rotate";
4803
+ IDPose[IDPose["BackStraight"] = 3] = "BackStraight";
4804
+ IDPose[IDPose["BackTilted"] = 4] = "BackTilted";
4805
+ })(IDPose || (IDPose = {}));
4806
+
4798
4807
  const howToInfoCss = "";
4799
4808
 
4800
4809
  const HowToInfo = class {
4801
- constructor(hostRef) { index.registerInstance(this, hostRef); this.eventHowToInfoDone = index.createEvent(this, "howToInfoDone", 7); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
4810
+ constructor(hostRef) { index.registerInstance(this, hostRef); this.apiErrorEvent = index.createEvent(this, "apiError", 7); this.showVideo = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; this.demoVideo = undefined; }
4802
4811
  async componentDidLoad() {
4803
4812
  await BaseComponent.initialize(this.currentStep);
4804
4813
  }
4805
4814
  async disconnectedCallback() {
4806
4815
  await BaseComponent.finalize(this.currentStep);
4807
4816
  }
4808
- buttonClick() {
4817
+ async buttonClick() {
4809
4818
  this.buttonEnabled = false;
4810
- this.eventHowToInfoDone.emit();
4819
+ TranslationUtils.state.flowStatus = await TranslationUtils.ApiCall.instance.GetNextFlowState();
4811
4820
  }
4812
4821
  async componentWillLoad() {
4822
+ this.showVideo = false;
4813
4823
  this.translations = await TranslationUtils.Translations.getValues();
4814
4824
  this.subTitle = '';
4815
4825
  this.buttonEnabled = true;
4816
4826
  this.topTitle = this.translations.HowToValues.IdTitile;
4817
4827
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
4818
4828
  this.buttonText = this.translations.HowToValues.IdButton;
4819
- if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
4829
+ if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONTHOWTO) {
4820
4830
  this.currentStep = TranslationUtils.FlowSteps.CiFrontHowTo;
4821
4831
  this.subTitle = this.translations.HowToValues.IdSubTitileFace;
4822
4832
  }
4823
- else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
4833
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACKHOWTO) {
4834
+ this.showVideo = true;
4824
4835
  this.currentStep = TranslationUtils.FlowSteps.CiBackHowTo;
4825
- this.subTitle = this.translations.HowToValues.IdSubTitileBack;
4836
+ this.subTitle = '';
4837
+ this.topTitle = this.translations.IdCaptureValues.TitleBack;
4838
+ this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
4839
+ this.demoVideo.play();
4840
+ await delay(this.translations.GlobalValues.VideoLenght);
4841
+ await this.buttonClick();
4826
4842
  }
4827
- if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
4843
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSHOWTO) {
4828
4844
  this.currentStep = TranslationUtils.FlowSteps.SelfieHowTo;
4829
4845
  this.topTitle = this.translations.HowToValues.SelfieTitile;
4830
4846
  this.subTitle = this.translations.HowToValues.SelfieSubTitile;
4831
4847
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
4832
4848
  this.buttonText = this.translations.HowToValues.SelfieButton;
4833
4849
  }
4850
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTUREHOWTO) {
4851
+ await this.buttonClick();
4852
+ }
4834
4853
  }
4835
4854
  render() {
4836
- let sub = this.subTitle != '' ? index.h("p", { class: "font-size-2" }, this.subTitle) : null;
4837
- return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", { class: "div-ci align-center" }, index.h("img", { src: this.imagePath })), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), sub), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4855
+ return (index.h("div", { class: "container" }, index.h("div", { class: "row", hidden: TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTUREHOWTO }, index.h("div", { class: "div-ci align-center", hidden: this.showVideo }, index.h("img", { src: this.imagePath })), index.h("div", { hidden: this.showVideo == false }, index.h("video", { id: "howTo", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, index.h("source", { type: "video/mp4" }))), index.h("div", { class: "text-center" }, index.h("h1", null, this.topTitle), index.h("p", { class: "font-size-2", hidden: this.subTitle == '' }, this.subTitle)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(), hidden: this.showVideo == true }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
4838
4856
  }
4839
4857
  };
4840
4858
  HowToInfo.style = howToInfoCss;
@@ -4981,15 +4999,6 @@ class Cameras {
4981
4999
  }
4982
5000
  }
4983
5001
 
4984
- var IDPose;
4985
- (function (IDPose) {
4986
- IDPose[IDPose["Straight"] = 0] = "Straight";
4987
- IDPose[IDPose["Tilted"] = 1] = "Tilted";
4988
- IDPose[IDPose["Rotate"] = 2] = "Rotate";
4989
- IDPose[IDPose["BackStraight"] = 3] = "BackStraight";
4990
- IDPose[IDPose["BackTilted"] = 4] = "BackTilted";
4991
- })(IDPose || (IDPose = {}));
4992
-
4993
5002
  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)}";
4994
5003
 
4995
5004
  const IdCapture = class {
@@ -5048,12 +5057,6 @@ const IdCapture = class {
5048
5057
  console.log('id-capture | componentDidLoad');
5049
5058
  this.initVariables();
5050
5059
  await BaseComponent.logStep(this.flowStep, TranslationUtils.FlowMoments.Initialized);
5051
- if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
5052
- this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
5053
- this.demoVideo.play();
5054
- await delay(this.translations.GlobalValues.VideoLenght);
5055
- this.titleMesage = this.translations.IdCaptureValues.TitleBack;
5056
- }
5057
5060
  this.demoVideo.src = TranslationUtils.IdCaptureValues.IDPoseDemoMapping[this.pose];
5058
5061
  this.demoVideo.play();
5059
5062
  await delay(this.translations.GlobalValues.VideoLenght);
@@ -5208,7 +5211,7 @@ function v4(options, buf, offset) {
5208
5211
  }
5209
5212
 
5210
5213
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5211
- const version$1 = "3.6.64";
5214
+ const version$1 = "3.6.66";
5212
5215
  const description = "Person Identification Component";
5213
5216
  const main = "./dist/index.cjs.js";
5214
5217
  const module$1 = "./dist/index.js";
@@ -5538,26 +5541,51 @@ const IdentificationComponent = class {
5538
5541
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.CODEERROR) {
5539
5542
  currentBlock = index.h("sms-code-validation", null);
5540
5543
  }
5544
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONTHOWTO) {
5545
+ if (TranslationUtils.state.debug)
5546
+ console.log('identification-component | render | IDFRONTHOWTO');
5547
+ currentBlock = index.h("how-to-info", null);
5548
+ }
5541
5549
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDFRONT) {
5542
5550
  if (TranslationUtils.state.debug)
5543
5551
  console.log('identification-component | render | IDFRONT');
5544
5552
  currentBlock = index.h("process-id", { id: "processIdFront", mode: "front" });
5545
5553
  }
5554
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACKHOWTO) {
5555
+ if (TranslationUtils.state.debug)
5556
+ console.log('identification-component | render | IDBACKHOWTO');
5557
+ currentBlock = index.h("how-to-info", null);
5558
+ }
5546
5559
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDBACK) {
5547
5560
  if (TranslationUtils.state.debug)
5548
5561
  console.log('identification-component | render | IDBACK');
5549
5562
  currentBlock = index.h("process-id", { id: "processIdBack", mode: "back" });
5550
5563
  }
5564
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILTHOWTO) {
5565
+ if (TranslationUtils.state.debug)
5566
+ console.log('identification-component | render | IDTILTHOWTO');
5567
+ currentBlock = index.h("how-to-info", null);
5568
+ }
5551
5569
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.IDTILT) {
5552
5570
  if (TranslationUtils.state.debug)
5553
5571
  console.log('identification-component | render | TILT');
5554
5572
  currentBlock = index.h("process-id", { id: "processIdTilt", mode: "tilt" });
5555
5573
  }
5574
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSHOWTO) {
5575
+ if (TranslationUtils.state.debug)
5576
+ console.log('identification-component | render | LIVENESSHOWTO');
5577
+ currentBlock = index.h("how-to-info", null);
5578
+ }
5556
5579
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESS) {
5557
5580
  if (TranslationUtils.state.debug)
5558
5581
  console.log('identification-component | render | LIVENESS');
5559
5582
  currentBlock = index.h("user-liveness", { id: "userLiveness", mode: "selfie" });
5560
5583
  }
5584
+ else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTUREHOWTO) {
5585
+ if (TranslationUtils.state.debug)
5586
+ console.log('identification-component | render | LIVENESSGESTUREHOWTO');
5587
+ currentBlock = index.h("how-to-info", null);
5588
+ }
5561
5589
  else if (TranslationUtils.state.flowStatus == TranslationUtils.FlowStatus.LIVENESSGESTURE) {
5562
5590
  if (TranslationUtils.state.debug)
5563
5591
  console.log('identification-component | render | LIVENESSGESTURE');
@@ -8646,45 +8674,33 @@ const ProcessId = class {
8646
8674
  if (this.mode == 'front') {
8647
8675
  this.currentStep = TranslationUtils.FlowSteps.CiFront;
8648
8676
  this.flow = {
8649
- capture: {
8650
- fileName: 'idImage.png',
8651
- recName: 'idVideo.',
8652
- photoType: CaptureUploadTypes.IdFront,
8653
- recType: CaptureUploadTypes.IdFrontVideo,
8654
- },
8655
- howToDone: false,
8677
+ fileName: 'idImage.png',
8678
+ recName: 'idVideo.',
8679
+ photoType: CaptureUploadTypes.IdFront,
8680
+ recType: CaptureUploadTypes.IdFrontVideo,
8656
8681
  };
8657
8682
  }
8658
8683
  else if (this.mode == 'back') {
8659
8684
  this.currentStep = TranslationUtils.FlowSteps.CiBack;
8660
8685
  this.flow = {
8661
- capture: {
8662
- fileName: 'idBackImage.png',
8663
- recName: 'idBackVideo.',
8664
- photoType: CaptureUploadTypes.IdBack,
8665
- recType: CaptureUploadTypes.IdBackVideo,
8666
- },
8667
- howToDone: false,
8686
+ fileName: 'idBackImage.png',
8687
+ recName: 'idBackVideo.',
8688
+ photoType: CaptureUploadTypes.IdBack,
8689
+ recType: CaptureUploadTypes.IdBackVideo,
8668
8690
  };
8669
8691
  }
8670
8692
  else if (this.mode == 'tilt') {
8671
8693
  this.currentStep = TranslationUtils.FlowSteps.CiTilt;
8672
8694
  this.flow = {
8673
- capture: {
8674
- fileName: 'idTiltImage.png',
8675
- recName: 'idTiltVideo.',
8676
- photoType: CaptureUploadTypes.None,
8677
- recType: CaptureUploadTypes.TiltVideo,
8678
- },
8679
- howToDone: false,
8695
+ fileName: 'idTiltImage.png',
8696
+ recName: 'idTiltVideo.',
8697
+ photoType: CaptureUploadTypes.None,
8698
+ recType: CaptureUploadTypes.TiltVideo,
8680
8699
  };
8681
8700
  }
8682
8701
  if (TranslationUtils.state.debug)
8683
8702
  console.log('process-id | initFlow');
8684
8703
  }
8685
- howToDone() {
8686
- this.flow.howToDone = true;
8687
- }
8688
8704
  timeElapsed() {
8689
8705
  this.errorReason = 'Timeout';
8690
8706
  this.showTimeout = true;
@@ -8711,8 +8727,8 @@ const ProcessId = class {
8711
8727
  return;
8712
8728
  }
8713
8729
  try {
8714
- let frontCapture = new File([idPhoto], this.flow.capture.fileName, { type: 'image/png' });
8715
- var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, frontCapture);
8730
+ let frontCapture = new File([idPhoto], this.flow.fileName, { type: 'image/png' });
8731
+ var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.photoType, frontCapture);
8716
8732
  if (TranslationUtils.state.debug)
8717
8733
  console.log('process-id | captureIdImage | uploadResult: ' + uploadResult);
8718
8734
  if (uploadResult.isValid) {
@@ -8743,8 +8759,8 @@ const ProcessId = class {
8743
8759
  return;
8744
8760
  }
8745
8761
  let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
8746
- let captureRec = new File([idRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
8747
- var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, captureRec);
8762
+ let captureRec = new File([idRecording], this.flow.recName + mimeType.extension, { type: mimeType.type });
8763
+ var uploadResult = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.recType, captureRec);
8748
8764
  if (TranslationUtils.state.debug)
8749
8765
  console.log('process-id | capturedIdRecording | uploadResult: ' + uploadResult);
8750
8766
  if (uploadResult.saved) {
@@ -8755,6 +8771,32 @@ const ProcessId = class {
8755
8771
  }
8756
8772
  this.recordingResultCount = 0;
8757
8773
  }
8774
+ async verificationFinished() {
8775
+ if (TranslationUtils.state.debug)
8776
+ console.log('process-id | verificationFinished');
8777
+ this.verificationReceived = Date.now();
8778
+ let initialStatus = TranslationUtils.state.flowStatus;
8779
+ let statusChanged = false;
8780
+ while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
8781
+ await delay(2000);
8782
+ statusChanged = initialStatus != TranslationUtils.state.flowStatus;
8783
+ }
8784
+ if (!statusChanged) {
8785
+ let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
8786
+ if (currentStatus != TranslationUtils.state.flowStatus) {
8787
+ TranslationUtils.state.flowStatus = currentStatus;
8788
+ }
8789
+ else {
8790
+ this.triggerUploadFailedFlow();
8791
+ }
8792
+ }
8793
+ if (TranslationUtils.state.debug)
8794
+ console.log('process-id | verificationFinished | waitingFinished ');
8795
+ }
8796
+ triggerUploadFailedFlow() {
8797
+ this.errorReason = 'Upload Failed';
8798
+ this.showInvalid = true;
8799
+ }
8758
8800
  async componentDidLoad() {
8759
8801
  if (TranslationUtils.state.debug)
8760
8802
  console.log('process-id | componentDidLoad');
@@ -8783,16 +8825,10 @@ const ProcessId = class {
8783
8825
  render() {
8784
8826
  let error = index.h("capture-error", { type: "ID", reason: this.errorReason });
8785
8827
  let capture = index.h("id-capture", null);
8786
- let howTo = index.h("how-to-info", null);
8787
8828
  if (this.showInvalid || this.showTimeout) {
8788
8829
  return error;
8789
8830
  }
8790
- if (TranslationUtils.state.flowStatus != TranslationUtils.FlowStatus.IDTILT && this.flow.howToDone) {
8791
- return howTo;
8792
- }
8793
- else {
8794
- return capture;
8795
- }
8831
+ return capture;
8796
8832
  }
8797
8833
  };
8798
8834
  ProcessId.style = processIdCss;
@@ -9022,38 +9058,28 @@ const UserLiveness = class {
9022
9058
  this.showError = undefined;
9023
9059
  this.showTimeout = undefined;
9024
9060
  this.flow = undefined;
9025
- this.howToDone = false;
9026
9061
  }
9027
9062
  async componentDidLoad() { }
9028
9063
  componentWillLoad() {
9029
9064
  if (this.mode == 'selfie') {
9030
9065
  this.currentStep = TranslationUtils.FlowSteps.Selfie;
9031
9066
  this.flow = {
9032
- capture: {
9033
- fileName: 'selfie.png',
9034
- recName: 'selfieVideo.',
9035
- photoType: CaptureUploadTypes.Selfie,
9036
- recType: CaptureUploadTypes.SelfieVideo,
9037
- },
9038
- howToDone: false,
9067
+ fileName: 'selfie.png',
9068
+ recName: 'selfieVideo.',
9069
+ photoType: CaptureUploadTypes.Selfie,
9070
+ recType: CaptureUploadTypes.SelfieVideo,
9039
9071
  };
9040
9072
  }
9041
9073
  else if (this.mode == 'selfieGesture') {
9042
9074
  this.currentStep = TranslationUtils.FlowSteps.SelfieTilt;
9043
9075
  this.flow = {
9044
- capture: {
9045
- fileName: '',
9046
- recName: 'selfieTiltVideo.',
9047
- photoType: CaptureUploadTypes.None,
9048
- recType: CaptureUploadTypes.SelfieGestureVideo,
9049
- },
9050
- howToDone: false,
9076
+ fileName: '',
9077
+ recName: 'selfieTiltVideo.',
9078
+ photoType: CaptureUploadTypes.None,
9079
+ recType: CaptureUploadTypes.SelfieGestureVideo,
9051
9080
  };
9052
9081
  }
9053
9082
  }
9054
- howToDoneEvent() {
9055
- this.howToDone = true;
9056
- }
9057
9083
  timeElapsed() {
9058
9084
  this.errorReason = 'Timeout';
9059
9085
  this.showTimeout = true;
@@ -9076,8 +9102,8 @@ const UserLiveness = class {
9076
9102
  return;
9077
9103
  }
9078
9104
  try {
9079
- var uploadPhoto = new File([selfiePhoto], this.flow.capture.fileName, { type: 'image/png' });
9080
- let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.photoType, uploadPhoto);
9105
+ var uploadPhoto = new File([selfiePhoto], this.flow.fileName, { type: 'image/png' });
9106
+ let photoUploaded = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.photoType, uploadPhoto);
9081
9107
  if (photoUploaded.isValid) {
9082
9108
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[photoUploaded.state];
9083
9109
  }
@@ -9103,8 +9129,8 @@ const UserLiveness = class {
9103
9129
  }
9104
9130
  let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
9105
9131
  try {
9106
- let uploadRec = new File([selfieRecording], this.flow.capture.recName + mimeType.extension, { type: mimeType.type });
9107
- let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.capture.recType, uploadRec);
9132
+ let uploadRec = new File([selfieRecording], this.flow.recName + mimeType.extension, { type: mimeType.type });
9133
+ let uplodDone = await TranslationUtils.ApiCall.instance.UploadFileForRequestB64(TranslationUtils.state.requestId, this.flow.recType, uploadRec);
9108
9134
  if (uplodDone.saved) {
9109
9135
  TranslationUtils.state.flowStatus = TranslationUtils.FlowStatus[uplodDone.state];
9110
9136
  }
@@ -9122,6 +9148,32 @@ const UserLiveness = class {
9122
9148
  }
9123
9149
  }
9124
9150
  }
9151
+ async verificationFinished() {
9152
+ if (TranslationUtils.state.debug)
9153
+ console.log('user-liveness | verificationFinished');
9154
+ this.verificationReceived = Date.now();
9155
+ let initialStatus = TranslationUtils.state.flowStatus;
9156
+ let statusChanged = false;
9157
+ while (Date.now() - this.verificationReceived < 25000 && !statusChanged) {
9158
+ await delay(2000);
9159
+ statusChanged = initialStatus != TranslationUtils.state.flowStatus;
9160
+ }
9161
+ if (!statusChanged) {
9162
+ let currentStatus = await TranslationUtils.ApiCall.instance.GetFlowState();
9163
+ if (currentStatus != TranslationUtils.state.flowStatus) {
9164
+ TranslationUtils.state.flowStatus = currentStatus;
9165
+ }
9166
+ else {
9167
+ this.triggerUploadFailedFlow();
9168
+ }
9169
+ }
9170
+ if (TranslationUtils.state.debug)
9171
+ console.log('user-liveness | verificationFinished | waitingFinished ');
9172
+ }
9173
+ triggerUploadFailedFlow() {
9174
+ this.errorReason = 'Upload Failed';
9175
+ this.showError = true;
9176
+ }
9125
9177
  async disconnectedCallback() {
9126
9178
  await BaseComponent.finalize(this.currentStep);
9127
9179
  }
@@ -9130,18 +9182,12 @@ const UserLiveness = class {
9130
9182
  this.showError = true;
9131
9183
  }
9132
9184
  render() {
9133
- let howTo = index.h("how-to-info", null);
9134
9185
  let capture = index.h("selfie-capture", null);
9135
9186
  let error = index.h("capture-error", { type: "LIVENESS", reason: this.errorReason });
9136
9187
  if (this.showError || this.showTimeout) {
9137
9188
  return error;
9138
9189
  }
9139
- if (this.howToDone) {
9140
- return capture;
9141
- }
9142
- else {
9143
- return howTo;
9144
- }
9190
+ return capture;
9145
9191
  }
9146
9192
  };
9147
9193
  UserLiveness.style = userLivenessCss;
@@ -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,"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,"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);
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,"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]},[[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,"how-to-info",{"showVideo":[32],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32],"demoVideo":[32]}],[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,"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,"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,"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);
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,"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]},[[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,"how-to-info",{"showVideo":[32],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32],"demoVideo":[32]}],[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,"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;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-41696e0e.js');
6
- const TranslationUtils = require('./TranslationUtils-fbb2c39c.js');
6
+ const TranslationUtils = require('./TranslationUtils-eeb71e60.js');
7
7
 
8
8
  const randomActionsCss = "";
9
9
 
@@ -4,44 +4,57 @@ import { FlowStatus } from '../../../models/FlowStatus';
4
4
  import { BaseComponent } from '../../base-component';
5
5
  import { FlowSteps } from '../../../models/FlowSteps';
6
6
  import { Translations } from '../../../helpers/TranslationUtils';
7
+ import { ApiCall } from '../../../helpers/ApiCall';
8
+ import { IdCaptureValues } from '../../../helpers/textValues';
9
+ import { delay } from '../../../utils/utils';
10
+ import { IDPose } from '../../../libs/IDML5Detector/IDPose';
7
11
  export class HowToInfo {
8
- constructor() { this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; }
12
+ constructor() { this.showVideo = undefined; this.topTitle = undefined; this.subTitle = undefined; this.imagePath = undefined; this.buttonText = undefined; this.buttonEnabled = undefined; this.demoVideo = undefined; }
9
13
  async componentDidLoad() {
10
14
  await BaseComponent.initialize(this.currentStep);
11
15
  }
12
16
  async disconnectedCallback() {
13
17
  await BaseComponent.finalize(this.currentStep);
14
18
  }
15
- buttonClick() {
19
+ async buttonClick() {
16
20
  this.buttonEnabled = false;
17
- this.eventHowToInfoDone.emit();
21
+ store.flowStatus = await ApiCall.instance.GetNextFlowState();
18
22
  }
19
23
  async componentWillLoad() {
24
+ this.showVideo = false;
20
25
  this.translations = await Translations.getValues();
21
26
  this.subTitle = '';
22
27
  this.buttonEnabled = true;
23
28
  this.topTitle = this.translations.HowToValues.IdTitile;
24
29
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_id.png';
25
30
  this.buttonText = this.translations.HowToValues.IdButton;
26
- if (store.flowStatus == FlowStatus.IDFRONT) {
31
+ if (store.flowStatus == FlowStatus.IDFRONTHOWTO) {
27
32
  this.currentStep = FlowSteps.CiFrontHowTo;
28
33
  this.subTitle = this.translations.HowToValues.IdSubTitileFace;
29
34
  }
30
- else if (store.flowStatus == FlowStatus.IDBACK) {
35
+ else if (store.flowStatus == FlowStatus.IDBACKHOWTO) {
36
+ this.showVideo = true;
31
37
  this.currentStep = FlowSteps.CiBackHowTo;
32
- this.subTitle = this.translations.HowToValues.IdSubTitileBack;
38
+ this.subTitle = '';
39
+ this.topTitle = this.translations.IdCaptureValues.TitleBack;
40
+ this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
41
+ this.demoVideo.play();
42
+ await delay(this.translations.GlobalValues.VideoLenght);
43
+ await this.buttonClick();
33
44
  }
34
- if (store.flowStatus == FlowStatus.LIVENESS) {
45
+ else if (store.flowStatus == FlowStatus.LIVENESSHOWTO) {
35
46
  this.currentStep = FlowSteps.SelfieHowTo;
36
47
  this.topTitle = this.translations.HowToValues.SelfieTitile;
37
48
  this.subTitle = this.translations.HowToValues.SelfieSubTitile;
38
49
  this.imagePath = 'https://ekyc.blob.core.windows.net/$web/howto_selfie.png';
39
50
  this.buttonText = this.translations.HowToValues.SelfieButton;
40
51
  }
52
+ else if (store.flowStatus == FlowStatus.LIVENESSGESTUREHOWTO) {
53
+ await this.buttonClick();
54
+ }
41
55
  }
42
56
  render() {
43
- let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
44
- return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "div-ci align-center" }, h("img", { src: this.imagePath })), h("div", { class: "text-center" }, h("h1", null, this.topTitle), sub), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-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))))));
57
+ return (h("div", { class: "container" }, h("div", { class: "row", hidden: store.flowStatus == FlowStatus.LIVENESSGESTUREHOWTO }, h("div", { class: "div-ci align-center", hidden: this.showVideo }, h("img", { src: this.imagePath })), h("div", { hidden: this.showVideo == false }, h("video", { id: "howTo", class: "video-demo", playsinline: true, ref: el => (this.demoVideo = el) }, h("source", { type: "video/mp4" }))), h("div", { class: "text-center" }, h("h1", null, this.topTitle), h("p", { class: "font-size-2", hidden: this.subTitle == '' }, this.subTitle)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick(), hidden: this.showVideo == true }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, this.translations.GlobalValues.FooterText))))));
45
58
  }
46
59
  static get is() { return "how-to-info"; }
47
60
  static get originalStyleUrls() {
@@ -56,30 +69,17 @@ export class HowToInfo {
56
69
  }
57
70
  static get states() {
58
71
  return {
72
+ "showVideo": {},
59
73
  "topTitle": {},
60
74
  "subTitle": {},
61
75
  "imagePath": {},
62
76
  "buttonText": {},
63
- "buttonEnabled": {}
77
+ "buttonEnabled": {},
78
+ "demoVideo": {}
64
79
  };
65
80
  }
66
81
  static get events() {
67
82
  return [{
68
- "method": "eventHowToInfoDone",
69
- "name": "howToInfoDone",
70
- "bubbles": true,
71
- "cancelable": true,
72
- "composed": true,
73
- "docs": {
74
- "tags": [],
75
- "text": ""
76
- },
77
- "complexType": {
78
- "original": "any",
79
- "resolved": "any",
80
- "references": {}
81
- }
82
- }, {
83
83
  "method": "apiErrorEvent",
84
84
  "name": "apiError",
85
85
  "bubbles": true,
@@ -65,12 +65,6 @@ export class IdCapture {
65
65
  console.log('id-capture | componentDidLoad');
66
66
  this.initVariables();
67
67
  await BaseComponent.logStep(this.flowStep, FlowMoments.Initialized);
68
- if (store.flowStatus == FlowStatus.IDBACK) {
69
- this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[IDPose.Rotate];
70
- this.demoVideo.play();
71
- await delay(this.translations.GlobalValues.VideoLenght);
72
- this.titleMesage = this.translations.IdCaptureValues.TitleBack;
73
- }
74
68
  this.demoVideo.src = IdCaptureValues.IDPoseDemoMapping[this.pose];
75
69
  this.demoVideo.play();
76
70
  await delay(this.translations.GlobalValues.VideoLenght);