idmission-web-sdk 2.3.57 → 2.3.59

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 (30) hide show
  1. package/dist/components/CompositeWizard.d.ts.map +1 -1
  2. package/dist/components/camera/CameraVideoTag.d.ts.map +1 -1
  3. package/dist/components/face_liveness/FaceLivenessWizard.d.ts +6 -1
  4. package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
  5. package/dist/components/id_capture/IdCaptureStateProvider.d.ts +11 -2
  6. package/dist/components/id_capture/IdCaptureStateProvider.d.ts.map +1 -1
  7. package/dist/components/id_capture/IdCaptureWizard.d.ts +7 -1
  8. package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
  9. package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
  10. package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
  11. package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
  12. package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +12 -4
  13. package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
  14. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
  15. package/dist/lib/camera/cameraStore.d.ts +3 -3
  16. package/dist/lib/camera/cameraStore.d.ts.map +1 -1
  17. package/dist/lib/camera/useVideoRecorder.d.ts +12 -4
  18. package/dist/lib/camera/useVideoRecorder.d.ts.map +1 -1
  19. package/dist/sdk2.cjs.development.js +165 -152
  20. package/dist/sdk2.cjs.development.js.map +1 -1
  21. package/dist/sdk2.cjs.production.js +1 -1
  22. package/dist/sdk2.cjs.production.js.map +1 -1
  23. package/dist/sdk2.esm.js +165 -152
  24. package/dist/sdk2.esm.js.map +1 -1
  25. package/dist/sdk2.umd.development.js +234 -399
  26. package/dist/sdk2.umd.development.js.map +1 -1
  27. package/dist/sdk2.umd.production.js +1 -1
  28. package/dist/sdk2.umd.production.js.map +1 -1
  29. package/dist/version.d.ts +1 -1
  30. package/package.json +3 -3
package/dist/sdk2.esm.js CHANGED
@@ -16,6 +16,7 @@ import { devtools } from 'zustand/middleware';
16
16
  import { useShallow } from 'zustand/react/shallow';
17
17
  import cn from 'clsx';
18
18
  import SignatureCanvas from 'react-signature-canvas';
19
+ import { renderToString } from 'react-dom/server';
19
20
 
20
21
  /******************************************************************************
21
22
  Copyright (c) Microsoft Corporation.
@@ -204,7 +205,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
204
205
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
205
206
  };
206
207
 
207
- var webSdkVersion = '2.3.57';
208
+ var webSdkVersion = '2.3.59';
208
209
 
209
210
  function getPlatform() {
210
211
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -3640,8 +3641,8 @@ function obtainCameraAccess(stream, deviceLabel, video) {
3640
3641
  release: release
3641
3642
  };
3642
3643
  log('camera access granted');
3643
- if (video) video.srcObject = stream;
3644
- log('video source initialized');
3644
+ // if (video) video.srcObject = stream
3645
+ // log('video source initialized')
3645
3646
  return currentCamera;
3646
3647
  }
3647
3648
  function releaseCameraAccess() {
@@ -4774,24 +4775,24 @@ function useTranslations(verbiage, fallbacks) {
4774
4775
  }, [fallbacks, i18n.language, t, verbiage]);
4775
4776
  }
4776
4777
 
4778
+ var camera = null;
4779
+ var videoStream = null;
4780
+ var audioStream = null;
4777
4781
  var initialState$6 = {
4778
4782
  videoRef: {
4779
4783
  current: null
4780
4784
  },
4781
4785
  videoLoaded: false,
4782
- videoStream: null,
4783
4786
  videoDevice: null,
4784
4787
  videoWidth: 0,
4785
4788
  videoHeight: 0,
4786
4789
  isRearFacing: false,
4787
- camera: null,
4788
4790
  cameraReady: false,
4789
4791
  cameraAccessDenied: false,
4790
4792
  iphoneContinuityCameraAvailable: false,
4791
4793
  iphoneContinuityCameraDenied: false,
4792
4794
  preferIphoneContinuityCamera: true,
4793
4795
  cameraTamperingDetected: false,
4794
- audioStream: null,
4795
4796
  microphoneReady: false,
4796
4797
  microphoneAccessDenied: false
4797
4798
  };
@@ -4805,8 +4806,7 @@ var createCameraStore = function createCameraStore(config) {
4805
4806
  return set(config);
4806
4807
  },
4807
4808
  onVideoMounted: function onVideoMounted(e) {
4808
- var _a;
4809
- var selectedVideoStreamId = (_a = get().videoStream) === null || _a === void 0 ? void 0 : _a.id;
4809
+ var selectedVideoStreamId = videoStream === null || videoStream === void 0 ? void 0 : videoStream.id;
4810
4810
  if (!selectedVideoStreamId) return;
4811
4811
  var srcObject = e.currentTarget.srcObject;
4812
4812
  if (srcObject.id === selectedVideoStreamId) {
@@ -4826,19 +4826,19 @@ var createCameraStore = function createCameraStore(config) {
4826
4826
  },
4827
4827
  requestCameraAccess: function requestCameraAccess() {
4828
4828
  return __awaiter(this, void 0, void 0, function () {
4829
- var _a, videoRef, releaseCameraAccess, preferFrontFacingCamera, preferIphoneContinuityCamera, iphoneContinuityCameraDenied, availableCameras, selectedCamera, platform_1, iphoneContinuityCamera, constraints, stream_1, e_1, e_2, handleStreamEnded_1, videoTrack_1, camera_1, e_3;
4830
- var _b, _c, _d;
4831
- return __generator(this, function (_e) {
4832
- switch (_e.label) {
4829
+ var _a, videoRef, releaseCameraAccess, preferFrontFacingCamera, preferIphoneContinuityCamera, iphoneContinuityCameraDenied, availableCameras, selectedCamera, platform_1, iphoneContinuityCamera, constraints, stream_1, e_1, e_2, handleStreamEnded_1, videoTrack_1, e_3;
4830
+ var _b, _c, _d, _e;
4831
+ return __generator(this, function (_f) {
4832
+ switch (_f.label) {
4833
4833
  case 0:
4834
4834
  _a = get(), videoRef = _a.videoRef, releaseCameraAccess = _a.releaseCameraAccess, preferFrontFacingCamera = _a.preferFrontFacingCamera, preferIphoneContinuityCamera = _a.preferIphoneContinuityCamera, iphoneContinuityCameraDenied = _a.iphoneContinuityCameraDenied;
4835
4835
  releaseCameraAccess();
4836
- _e.label = 1;
4836
+ _f.label = 1;
4837
4837
  case 1:
4838
- _e.trys.push([1, 11,, 12]);
4838
+ _f.trys.push([1, 11,, 12]);
4839
4839
  return [4 /*yield*/, listAvailableCameras()];
4840
4840
  case 2:
4841
- availableCameras = _e.sent();
4841
+ availableCameras = _f.sent();
4842
4842
  selectedCamera = void 0;
4843
4843
  debug('availableCameras', availableCameras);
4844
4844
  platform_1 = getPlatform();
@@ -4908,16 +4908,16 @@ var createCameraStore = function createCameraStore(config) {
4908
4908
  };
4909
4909
  }
4910
4910
  stream_1 = null;
4911
- _e.label = 3;
4911
+ _f.label = 3;
4912
4912
  case 3:
4913
- _e.trys.push([3, 5,, 6]);
4913
+ _f.trys.push([3, 5,, 6]);
4914
4914
  debug('obtaining camera access with constraints', constraints);
4915
4915
  return [4 /*yield*/, navigator.mediaDevices.getUserMedia(constraints)];
4916
4916
  case 4:
4917
- stream_1 = _e.sent();
4917
+ stream_1 = _f.sent();
4918
4918
  return [3 /*break*/, 6];
4919
4919
  case 5:
4920
- e_1 = _e.sent();
4920
+ e_1 = _f.sent();
4921
4921
  if (e_1.name === 'NotAllowedError') {
4922
4922
  if (preferIphoneContinuityCamera) {
4923
4923
  set({
@@ -4934,19 +4934,19 @@ var createCameraStore = function createCameraStore(config) {
4934
4934
  return [3 /*break*/, 6];
4935
4935
  case 6:
4936
4936
  if (!!stream_1) return [3 /*break*/, 10];
4937
- _e.label = 7;
4937
+ _f.label = 7;
4938
4938
  case 7:
4939
- _e.trys.push([7, 9,, 10]);
4939
+ _f.trys.push([7, 9,, 10]);
4940
4940
  return [4 /*yield*/, navigator.mediaDevices.getUserMedia({
4941
4941
  audio: false,
4942
4942
  video: true
4943
4943
  })];
4944
4944
  case 8:
4945
- stream_1 = _e.sent();
4945
+ stream_1 = _f.sent();
4946
4946
  debug('opened stream with no width and height constraints');
4947
4947
  return [3 /*break*/, 10];
4948
4948
  case 9:
4949
- e_2 = _e.sent();
4949
+ e_2 = _f.sent();
4950
4950
  debug('cannot open stream at all', e_2);
4951
4951
  return [3 /*break*/, 10];
4952
4952
  case 10:
@@ -4958,8 +4958,8 @@ var createCameraStore = function createCameraStore(config) {
4958
4958
  handleStreamEnded_1 = function handleStreamEnded_1() {
4959
4959
  if (preferIphoneContinuityCamera && get().iphoneContinuityCameraAvailable) {
4960
4960
  debug('someone unplugged the continuity camera');
4961
+ videoStream = null;
4961
4962
  set({
4962
- videoStream: null,
4963
4963
  videoDevice: null,
4964
4964
  cameraReady: false,
4965
4965
  iphoneContinuityCameraAvailable: false,
@@ -4968,9 +4968,9 @@ var createCameraStore = function createCameraStore(config) {
4968
4968
  get().requestCameraAccess();
4969
4969
  } else {
4970
4970
  debug('someone unplugged the webcam');
4971
- releaseCameraAccess();
4971
+ get().releaseCameraAccess();
4972
+ videoStream = null;
4972
4973
  set({
4973
- videoStream: null,
4974
4974
  videoDevice: null,
4975
4975
  videoLoaded: false,
4976
4976
  cameraReady: false,
@@ -4981,25 +4981,26 @@ var createCameraStore = function createCameraStore(config) {
4981
4981
  (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('ended', handleStreamEnded_1);
4982
4982
  videoTrack_1 = stream_1.getVideoTracks()[0];
4983
4983
  videoTrack_1.onended = handleStreamEnded_1;
4984
- camera_1 = obtainCameraAccess(stream_1, selectedCamera.label, videoRef.current);
4984
+ camera = obtainCameraAccess(stream_1, selectedCamera.label, videoRef.current);
4985
4985
  setTimeout(function () {
4986
+ var _a;
4986
4987
  // iOS 17 has a strange behavior where the video track flickers between muted and unmuted
4987
4988
  // when the camera access is being requested. This delay is a workaround for that.
4988
4989
  videoTrack_1.onmute = function () {
4989
4990
  if (videoTrack_1.readyState !== 'live') handleStreamEnded_1();
4990
4991
  };
4992
+ videoStream = stream_1;
4993
+ var isRearFacing = (_a = camera === null || camera === void 0 ? void 0 : camera.isRearFacing) !== null && _a !== void 0 ? _a : false;
4991
4994
  set({
4992
- camera: camera_1,
4993
4995
  cameraReady: true,
4994
4996
  cameraAccessDenied: false,
4995
- isRearFacing: camera_1.isRearFacing,
4996
- videoStream: stream_1
4997
+ isRearFacing: isRearFacing
4997
4998
  });
4998
4999
  }, 500);
4999
5000
  return [3 /*break*/, 12];
5000
5001
  case 11:
5001
- e_3 = _e.sent();
5002
- if (e_3.name === 'NotAllowedError') {
5002
+ e_3 = _f.sent();
5003
+ if (e_3.name === 'NotAllowedError' || ((_e = e_3.message) === null || _e === void 0 ? void 0 : _e.includes('Could not start video source'))) {
5003
5004
  error('camera access has been blocked by the user', e_3);
5004
5005
  set({
5005
5006
  cameraAccessDenied: true
@@ -5017,17 +5018,18 @@ var createCameraStore = function createCameraStore(config) {
5017
5018
  },
5018
5019
  releaseCameraAccess: function releaseCameraAccess() {
5019
5020
  return __awaiter(this, void 0, void 0, function () {
5020
- var camera;
5021
5021
  return __generator(this, function (_a) {
5022
- camera = get().camera;
5023
5022
  if (!camera) return [2 /*return*/];
5024
5023
  camera.release();
5024
+ camera = null;
5025
+ videoStream === null || videoStream === void 0 ? void 0 : videoStream.getTracks().forEach(function (track) {
5026
+ track.stop();
5027
+ });
5028
+ videoStream = null;
5025
5029
  set({
5026
- camera: null,
5027
5030
  cameraReady: false,
5028
5031
  cameraAccessDenied: false,
5029
5032
  videoDevice: null,
5030
- videoStream: null,
5031
5033
  videoLoaded: false
5032
5034
  });
5033
5035
  return [2 /*return*/];
@@ -5056,8 +5058,8 @@ var createCameraStore = function createCameraStore(config) {
5056
5058
  // iOS 17 has a strange behavior where the video track flickers between muted and unmuted
5057
5059
  // when the camera access is being requested. This delay is a workaround for that.
5058
5060
  setTimeout(function () {
5061
+ audioStream = stream_2;
5059
5062
  set({
5060
- audioStream: stream_2,
5061
5063
  microphoneReady: true,
5062
5064
  microphoneAccessDenied: false
5063
5065
  });
@@ -5066,6 +5068,7 @@ var createCameraStore = function createCameraStore(config) {
5066
5068
  microphoneReady: false,
5067
5069
  microphoneAccessDenied: true
5068
5070
  });
5071
+ get().releaseMicrophoneAccess();
5069
5072
  };
5070
5073
  var track = stream_2.getAudioTracks()[0];
5071
5074
  track.onended = handleStreamEnded;
@@ -5089,14 +5092,13 @@ var createCameraStore = function createCameraStore(config) {
5089
5092
  },
5090
5093
  releaseMicrophoneAccess: function releaseMicrophoneAccess() {
5091
5094
  var _a;
5092
- var audioStream = get().audioStream;
5093
5095
  (_a = audioStream === null || audioStream === void 0 ? void 0 : audioStream.stop) === null || _a === void 0 ? void 0 : _a.call(audioStream);
5094
5096
  audioStream === null || audioStream === void 0 ? void 0 : audioStream.getAudioTracks().forEach(function (track) {
5095
5097
  var _a;
5096
5098
  (_a = track.stop) === null || _a === void 0 ? void 0 : _a.call(track);
5097
5099
  });
5100
+ audioStream = null;
5098
5101
  set({
5099
- audioStream: null,
5100
5102
  microphoneReady: false,
5101
5103
  microphoneAccessDenied: false
5102
5104
  });
@@ -6634,15 +6636,13 @@ var IdCapture = function IdCapture(_a) {
6634
6636
  _q = _o.height,
6635
6637
  height = _q === void 0 ? 1 : _q;
6636
6638
  var state = useIdCaptureStore();
6637
- var _r = useCameraStore(),
6638
- camera = _r.camera,
6639
- isRearFacing = _r.isRearFacing;
6640
- var _s = useContext(IdCaptureModelsContext),
6641
- modelsReady = _s.ready,
6642
- setThresholds = _s.setThresholds,
6643
- detectionTime = _s.detectionTime,
6644
- focusPredictionTime = _s.focusPredictionTime,
6645
- getBestFrame = _s.getBestFrame;
6639
+ var isRearFacing = useCameraStore().isRearFacing;
6640
+ var _r = useContext(IdCaptureModelsContext),
6641
+ modelsReady = _r.ready,
6642
+ setThresholds = _r.setThresholds,
6643
+ detectionTime = _r.detectionTime,
6644
+ focusPredictionTime = _r.focusPredictionTime,
6645
+ getBestFrame = _r.getBestFrame;
6646
6646
  useEffect(function () {
6647
6647
  return dispatchIdCaptureAction({
6648
6648
  type: 'captureInitialized'
@@ -9072,9 +9072,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
9072
9072
  var _c = useReducer(documentCaptureStateReducer, documentCaptureInitialState),
9073
9073
  state = _c[0],
9074
9074
  dispatch = _c[1];
9075
- var _d = useCameraStore(),
9076
- videoStream = _d.videoStream,
9077
- videoRef = _d.videoRef;
9075
+ var videoRef = useCameraStore().videoRef;
9078
9076
  var uploadDocument = useContext(SubmissionContext).uploadDocument;
9079
9077
  var uploadCapturedDocument = useCallback(function (content, filetype) {
9080
9078
  return __awaiter(void 0, void 0, void 0, function () {
@@ -9168,7 +9166,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
9168
9166
  }, [onResize]);
9169
9167
  var videoTag = videoRef.current;
9170
9168
  useEffect(function () {
9171
- if (!state.capturing || !(videoStream === null || videoStream === void 0 ? void 0 : videoStream.active)) return;
9169
+ if (!state.capturing) return;
9172
9170
  function onComplete(content) {
9173
9171
  if (!content) return;
9174
9172
  var contentUrl = URL.createObjectURL(content);
@@ -9185,7 +9183,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
9185
9183
  drawToCanvas(canvas, videoTag);
9186
9184
  canvas.toBlob(onComplete);
9187
9185
  }
9188
- }, [state.capturing, videoStream, videoTag]);
9186
+ }, [state.capturing, videoTag]);
9189
9187
  var stateWithActions = useMemo(function () {
9190
9188
  return _assign(_assign({}, state), {
9191
9189
  uploadCapturedDocument: uploadCapturedDocument
@@ -9314,29 +9312,28 @@ var templateObject_1$u;
9314
9312
  var CameraVideoTag = function CameraVideoTag(props) {
9315
9313
  var _a = useCameraStore(useShallow(function (store) {
9316
9314
  return {
9315
+ cameraReady: store.cameraReady,
9317
9316
  videoRef: store.videoRef,
9318
- videoStream: store.videoStream,
9319
9317
  onVideoMounted: store.onVideoMounted,
9320
9318
  isRearFacing: store.isRearFacing
9321
9319
  };
9322
9320
  })),
9321
+ cameraReady = _a.cameraReady,
9323
9322
  videoRef = _a.videoRef,
9324
- videoStream = _a.videoStream,
9325
9323
  onVideoMounted = _a.onVideoMounted,
9326
9324
  isRearFacing = _a.isRearFacing;
9327
- useEffect(function attachCameraStreamToVideoTagWhenReady() {
9328
- if (videoRef.current && videoStream) {
9329
- debug('attaching camera stream to video tag');
9330
- // eslint-disable-next-line react-compiler/react-compiler
9331
- videoRef.current.srcObject = videoStream;
9332
- }
9333
- }, [videoStream, videoRef]);
9325
+ useEffect(function () {
9326
+ if (!cameraReady || !videoRef.current) return;
9327
+ debug('attaching camera stream to video tag');
9328
+ // eslint-disable-next-line react-compiler/react-compiler
9329
+ videoRef.current.srcObject = videoStream;
9330
+ }, [cameraReady, videoRef]);
9334
9331
  return /*#__PURE__*/React__default.createElement(FullscreenVideoTag, _assign({
9335
9332
  autoPlay: true,
9336
9333
  playsInline: true,
9337
9334
  muted: true,
9338
9335
  ref: videoRef,
9339
- onLoadedData: onVideoMounted,
9336
+ onCanPlay: onVideoMounted,
9340
9337
  "$isRearFacing": isRearFacing
9341
9338
  }, props));
9342
9339
  };
@@ -9373,7 +9370,6 @@ var DocumentCaptureScreen = function DocumentCaptureScreen(_a) {
9373
9370
  content = _k.content,
9374
9371
  uploadState = _k.uploadState;
9375
9372
  var _l = useCameraStore(),
9376
- videoStream = _l.videoStream,
9377
9373
  cameraReady = _l.cameraReady,
9378
9374
  cameraAccessDenied = _l.cameraAccessDenied,
9379
9375
  requestCameraAccess = _l.requestCameraAccess;
@@ -9388,7 +9384,7 @@ var DocumentCaptureScreen = function DocumentCaptureScreen(_a) {
9388
9384
  // and the user hasn't passed a media blob for the current document...
9389
9385
  !cameraAccessRequested &&
9390
9386
  // and we haven't already tried to force a camera request...
9391
- !(videoStream === null || videoStream === void 0 ? void 0 : videoStream.active); // and we don't already have camera access.
9387
+ !cameraReady; // and we don't already have camera access.
9392
9388
  useEffect(function requestCameraAccessIfNeeded() {
9393
9389
  if (!cameraAccessNeeded) return;
9394
9390
  setCameraAccessRequested(true);
@@ -10587,7 +10583,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
10587
10583
  focusScore: metadata.bestFocusScore
10588
10584
  }
10589
10585
  });
10590
- }, [logCaptureMetadata]);
10586
+ }, [logCaptureMetadata, onDocumentCaptured]);
10591
10587
  var onSubmitClick = useCallback(function () {
10592
10588
  var _a, _b, _c, _d, _e, _f, _g, _h;
10593
10589
  var docs = state.capturedDocuments;
@@ -10813,6 +10809,30 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
10813
10809
  debugMode: debugMode
10814
10810
  })));
10815
10811
  };
10812
+ function IdCaptureWizardWithProviders(_a) {
10813
+ var _b, _c, _d, _e, _f, _g;
10814
+ var onCameraAccessDenied = _a.onCameraAccessDenied,
10815
+ onCameraTamperingDetected = _a.onCameraTamperingDetected,
10816
+ onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
10817
+ shouldLoadIdCaptureModels = _a.shouldLoadIdCaptureModels,
10818
+ idCaptureProps = __rest(_a, ["onCameraAccessDenied", "onCameraTamperingDetected", "onMicrophoneAccessDenied", "shouldLoadIdCaptureModels"]);
10819
+ return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
10820
+ onCameraAccessDenied: onCameraAccessDenied,
10821
+ onCameraTamperingDetected: onCameraTamperingDetected,
10822
+ onMicrophoneAccessDenied: onMicrophoneAccessDenied,
10823
+ requestAccessAutomatically: shouldLoadIdCaptureModels,
10824
+ classNames: (_b = idCaptureProps.classNames) === null || _b === void 0 ? void 0 : _b.cameraStoreProvider,
10825
+ verbiage: (_c = idCaptureProps.verbiage) === null || _c === void 0 ? void 0 : _c.cameraStoreProvider
10826
+ }, /*#__PURE__*/React__default.createElement(IdCaptureModelsProvider, {
10827
+ autoStart: false,
10828
+ shouldLoadModels: shouldLoadIdCaptureModels,
10829
+ documentDetectionModelUrl: (_e = (_d = idCaptureProps.assets) === null || _d === void 0 ? void 0 : _d.documentDetectionModelUrl) !== null && _e !== void 0 ? _e : '',
10830
+ focusModelUrl: (_g = (_f = idCaptureProps.assets) === null || _f === void 0 ? void 0 : _f.focusModelUrl) !== null && _g !== void 0 ? _g : '',
10831
+ onModelError: idCaptureProps.onModelError,
10832
+ modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs,
10833
+ allowSinglePageIdCapture: idCaptureProps.allowSinglePageIdCapture
10834
+ }, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({}, idCaptureProps))))));
10835
+ }
10816
10836
 
10817
10837
  function SelfieCaptureLoadingGraphic(_a) {
10818
10838
  var _b, _c, _d;
@@ -11826,9 +11846,6 @@ var SelfieCapture = function SelfieCapture(_a) {
11826
11846
  prediction = _o.prediction,
11827
11847
  dispatch = _m[1];
11828
11848
  var lastPredictionCanvas = useRef(null);
11829
- var camera = useCameraStore(useShallow(function (state) {
11830
- return state.camera;
11831
- }));
11832
11849
  var _p = useContext(SelfieGuidanceModelsContext),
11833
11850
  onPredictionMade = _p.onPredictionMade,
11834
11851
  canvasRef = _p.canvasRef,
@@ -13004,6 +13021,26 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
13004
13021
  waitForIdCaptureModels: waitForIdCaptureModels
13005
13022
  })));
13006
13023
  };
13024
+ function FaceLivenessWizardWithProviders(_a) {
13025
+ var _b, _c;
13026
+ var onCameraAccessDenied = _a.onCameraAccessDenied,
13027
+ onCameraTamperingDetected = _a.onCameraTamperingDetected,
13028
+ onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
13029
+ faceLivenessProps = __rest(_a, ["onCameraAccessDenied", "onCameraTamperingDetected", "onMicrophoneAccessDenied"]);
13030
+ return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
13031
+ preferFrontFacingCamera: true,
13032
+ preferIphoneContinuityCamera: false,
13033
+ onCameraAccessDenied: onCameraAccessDenied,
13034
+ onCameraTamperingDetected: onCameraTamperingDetected,
13035
+ onMicrophoneAccessDenied: onMicrophoneAccessDenied,
13036
+ classNames: (_b = faceLivenessProps.classNames) === null || _b === void 0 ? void 0 : _b.cameraStoreProvider,
13037
+ verbiage: (_c = faceLivenessProps.verbiage) === null || _c === void 0 ? void 0 : _c.cameraStoreProvider
13038
+ }, /*#__PURE__*/React__default.createElement(SelfieGuidanceModelsProvider, {
13039
+ autoStart: false,
13040
+ onModelError: faceLivenessProps.onModelError,
13041
+ modelLoadTimeoutMs: faceLivenessProps.modelLoadTimeoutMs
13042
+ }, /*#__PURE__*/React__default.createElement(FaceLivenessWizard, _assign({}, faceLivenessProps))));
13043
+ }
13007
13044
 
13008
13045
  var SubmissionSuccess = function SubmissionSuccess() {
13009
13046
  var _a = useContext(SubmissionContext),
@@ -13420,12 +13457,16 @@ var initialState$2 = {
13420
13457
  };
13421
13458
  var useVideoRecorderStore = create()(devtools(function (set, get) {
13422
13459
  return _assign(_assign({}, initialState$2), {
13423
- startRecordingVideo: function startRecordingVideo(camera, audioStream) {
13460
+ startRecordingVideo: function startRecordingVideo(captureAudio) {
13424
13461
  var _a, _b, _c;
13462
+ if (captureAudio === void 0) {
13463
+ captureAudio = false;
13464
+ }
13465
+ if (!camera) throw new Error('Camera not found');
13425
13466
  var _d = get(),
13426
13467
  mergeAVStreams = _d.mergeAVStreams,
13427
13468
  startRecordingAudio = _d.startRecordingAudio;
13428
- var videoStream = mergeAVStreams ? new MediaStream(__spreadArray(__spreadArray([], (_b = (_a = camera === null || camera === void 0 ? void 0 : camera.stream) === null || _a === void 0 ? void 0 : _a.getTracks()) !== null && _b !== void 0 ? _b : [], true), (_c = audioStream === null || audioStream === void 0 ? void 0 : audioStream.getTracks()) !== null && _c !== void 0 ? _c : [], true)) : camera.stream;
13469
+ var videoStream = mergeAVStreams ? new MediaStream(__spreadArray(__spreadArray([], (_b = (_a = camera === null || camera === void 0 ? void 0 : camera.stream) === null || _a === void 0 ? void 0 : _a.getTracks()) !== null && _b !== void 0 ? _b : [], true), captureAudio ? (_c = audioStream === null || audioStream === void 0 ? void 0 : audioStream.getTracks()) !== null && _c !== void 0 ? _c : [] : [], true)) : camera.stream;
13429
13470
  if (!videoStream) return;
13430
13471
  clearVideoChunks();
13431
13472
  videoRecorder = null;
@@ -13453,8 +13494,8 @@ var useVideoRecorderStore = create()(devtools(function (set, get) {
13453
13494
  // TODO: figure out what to do here
13454
13495
  }
13455
13496
  }, 100);
13456
- if (audioStream && !mergeAVStreams) {
13457
- startRecordingAudio(audioStream);
13497
+ if (captureAudio && !mergeAVStreams) {
13498
+ startRecordingAudio();
13458
13499
  }
13459
13500
  },
13460
13501
  stopRecordingVideo: function stopRecordingVideo() {
@@ -13465,7 +13506,7 @@ var useVideoRecorderStore = create()(devtools(function (set, get) {
13465
13506
  videoRecorder === null || videoRecorder === void 0 ? void 0 : videoRecorder.stop(); // if you call this while state === 'inactive', an exception is thrown.
13466
13507
  }
13467
13508
  },
13468
- startRecordingAudio: function startRecordingAudio(audioStream) {
13509
+ startRecordingAudio: function startRecordingAudio() {
13469
13510
  if (get().mergeAVStreams) return;
13470
13511
  if (!audioStream) return;
13471
13512
  clearAudioChunks();
@@ -13599,18 +13640,19 @@ var videoSignatureInitialState = {
13599
13640
  };
13600
13641
  var useVideoSignatureStore = create()(devtools(function (set, get) {
13601
13642
  return _assign(_assign({}, videoSignatureInitialState), {
13602
- startRecording: function startRecording(camera, audioStream, captureAudio) {
13643
+ startRecording: function startRecording(captureAudio) {
13603
13644
  var _a;
13604
13645
  if (captureAudio === void 0) {
13605
13646
  captureAudio = false;
13606
13647
  }
13648
+ if (!camera) throw new Error('Camera not found');
13607
13649
  // set our flag and clear whatever we have recorded so far.
13608
13650
  set({
13609
13651
  isRecording: true
13610
13652
  });
13611
13653
  signatureChunks = [];
13612
13654
  // start recording video and audio
13613
- useVideoRecorderStore.getState().startRecordingVideo(camera, captureAudio ? audioStream : undefined);
13655
+ useVideoRecorderStore.getState().startRecordingVideo(captureAudio);
13614
13656
  // start recording from the output canvas to capture the signature
13615
13657
  var videoStream = get().outputCanvas.current.captureStream(24); // fps
13616
13658
  var tracks = [videoStream.getVideoTracks()[0]];
@@ -13904,14 +13946,10 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
13904
13946
  debugMode = _l === void 0 ? false : _l;
13905
13947
  var _m = useCameraStore(useShallow(function (state) {
13906
13948
  return {
13907
- camera: state.camera,
13908
- audioStream: state.audioStream,
13909
13949
  videoWidth: state.videoWidth,
13910
13950
  videoHeight: state.videoHeight
13911
13951
  };
13912
13952
  })),
13913
- camera = _m.camera,
13914
- audioStream = _m.audioStream,
13915
13953
  videoWidth = _m.videoWidth,
13916
13954
  videoHeight = _m.videoHeight;
13917
13955
  var _o = useSelfieGuidanceModelsContext(),
@@ -13919,8 +13957,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
13919
13957
  startHeadTracking = _o.start,
13920
13958
  stopHeadTracking = _o.stop;
13921
13959
  var _p = useVideoSignatureStore(),
13922
- startRecording = _p.startRecording,
13923
- stopRecording = _p.stopRecording,
13924
13960
  clearRecordedData = _p.clearRecordedData,
13925
13961
  isRecording = _p.isRecording;
13926
13962
  useEffect(function () {
@@ -13929,10 +13965,11 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
13929
13965
  });
13930
13966
  }, [onSignatureVideoCaptured]);
13931
13967
  useEffect(function () {
13932
- if (!camera) return;
13933
- startRecording(camera, audioStream, captureAudio);
13934
- return stopRecording;
13935
- }, [audioStream, camera, captureAudio, startRecording, stopRecording]);
13968
+ useVideoSignatureStore.getState().startRecording(captureAudio);
13969
+ return function () {
13970
+ return useVideoSignatureStore.getState().stopRecording();
13971
+ };
13972
+ }, [captureAudio]);
13936
13973
  useEffect(function () {
13937
13974
  setTimeout(startHeadTracking, 1);
13938
13975
  return stopHeadTracking;
@@ -13953,7 +13990,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
13953
13990
  setNumFramesWithoutFaces = _s[1];
13954
13991
  onHeadTrackingPredictionMade(useThrottledCallback(useCallback(function (_a) {
13955
13992
  var face = _a.face;
13956
- if (!camera || headTrackingDisabled) return;
13993
+ if (headTrackingDisabled) return;
13957
13994
  var leftEdge = videoWidth * headTrackingBoundaryPercentage;
13958
13995
  var rightEdge = videoWidth * (1 - headTrackingBoundaryPercentage);
13959
13996
  var topEdge = videoHeight * headTrackingBoundaryPercentage;
@@ -13964,7 +14001,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
13964
14001
  setNumFramesWithoutFaces(face ? 0 : function (n) {
13965
14002
  return n + 1;
13966
14003
  });
13967
- }, [camera, headTrackingBoundaryPercentage, headTrackingBoundaryType, headTrackingDisabled, videoHeight, videoWidth]), 16));
14004
+ }, [headTrackingBoundaryPercentage, headTrackingBoundaryType, headTrackingDisabled, videoHeight, videoWidth]), 16));
13968
14005
  var _t = useResizeObserver(),
13969
14006
  ref = _t.ref,
13970
14007
  _u = _t.width,
@@ -14007,7 +14044,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
14007
14044
  face: lastFace,
14008
14045
  scaling: debugScalingDetails,
14009
14046
  color: headTrackingSatisfied ? 'green' : 'red'
14010
- }))), /*#__PURE__*/React__default.createElement(DebugStatsPane, null, "Video: ", camera === null || camera === void 0 ? void 0 : camera.width, "x", camera === null || camera === void 0 ? void 0 : camera.height, /*#__PURE__*/React__default.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false'))), /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
14047
+ }))), /*#__PURE__*/React__default.createElement(DebugStatsPane, null, "Video: ", videoWidth, "x", videoHeight, /*#__PURE__*/React__default.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false'))), /*#__PURE__*/React__default.createElement(ExitCaptureButton, {
14011
14048
  onClick: onExit,
14012
14049
  className: classNames.exitCaptureBtn
14013
14050
  }));
@@ -14513,9 +14550,6 @@ function VideoSignatureWizardGuides(_a) {
14513
14550
  component = _a.component,
14514
14551
  props = __rest(_a, ["status", "restartVideoOnSignaturePadCleared", "captureAudio", "component"]);
14515
14552
  var Component = component !== null && component !== void 0 ? component : VideoSignatureGuides;
14516
- var _d = useCameraStore(),
14517
- camera = _d.camera,
14518
- audioStream = _d.audioStream;
14519
14553
  var onAcceptBtnClicked = useCallback(function () {
14520
14554
  var signaturePad = useVideoSignatureStore.getState().signaturePad;
14521
14555
  if (!signaturePad.current) throw new Error('Signature pad not found');
@@ -14537,11 +14571,11 @@ function VideoSignatureWizardGuides(_a) {
14537
14571
  setTimeout(function () {
14538
14572
  useVideoSignatureStore.getState().clearRecordedData();
14539
14573
  setTimeout(function () {
14540
- useVideoSignatureStore.getState().startRecording(camera, audioStream, captureAudio);
14574
+ useVideoSignatureStore.getState().startRecording(captureAudio);
14541
14575
  }, 100);
14542
14576
  }, 100);
14543
14577
  }
14544
- }, [audioStream, camera, captureAudio, restartVideoOnSignaturePadCleared]);
14578
+ }, [captureAudio, restartVideoOnSignaturePadCleared]);
14545
14579
  return /*#__PURE__*/React__default.createElement(Component, _assign({}, props, {
14546
14580
  faceGuideStatus: status,
14547
14581
  onAcceptBtnClicked: onAcceptBtnClicked,
@@ -14895,12 +14929,10 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14895
14929
  _9 = _7.height,
14896
14930
  height = _9 === void 0 ? 1 : _9;
14897
14931
  var _10 = useCameraStore(),
14898
- camera = _10.camera,
14899
14932
  videoRef = _10.videoRef,
14900
14933
  videoLoaded = _10.videoLoaded,
14901
14934
  cameraReady = _10.cameraReady,
14902
14935
  microphoneReady = _10.microphoneReady,
14903
- audioStream = _10.audioStream,
14904
14936
  isRearFacing = _10.isRearFacing,
14905
14937
  releaseCameraAccess = _10.releaseCameraAccess;
14906
14938
  var _11 = useState([]),
@@ -14942,8 +14974,8 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14942
14974
  countdownRemaining = _18[0],
14943
14975
  setCountdownRemaining = _18[1];
14944
14976
  useEffect(function () {
14945
- if (camera && !isRecordingVideo && !videoUrl) {
14946
- useVideoRecorderStore.getState().startRecordingVideo(camera, audioStream);
14977
+ if (!isRecordingVideo && !videoUrl) {
14978
+ useVideoRecorderStore.getState().startRecordingVideo();
14947
14979
  setVideoStartsAt(new Date());
14948
14980
  }
14949
14981
  // if the mergeAVStreams flag is present, the audio stream is on the video
@@ -14954,7 +14986,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14954
14986
  releaseCameraAccess();
14955
14987
  onComplete === null || onComplete === void 0 ? void 0 : onComplete(videoUrl, audioUrl);
14956
14988
  }
14957
- }, [audioStream, audioUrl, camera, isRecordingVideo, mergeAVStreams, onComplete, readTextPrompt, releaseCameraAccess, videoUrl]);
14989
+ }, [audioUrl, isRecordingVideo, mergeAVStreams, onComplete, readTextPrompt, releaseCameraAccess, videoUrl]);
14958
14990
  useEffect(function () {
14959
14991
  if (videoRecordingUnintentionallyStopped || audioRecordingUnintentionallyStopped || !!readTextPrompt && !microphoneReady) {
14960
14992
  onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
@@ -15049,13 +15081,14 @@ var IdVideoCapture = function IdVideoCapture(_a) {
15049
15081
  var _a;
15050
15082
  if (translatedText) {
15051
15083
  setRequestedAction('READ_TEXT');
15052
- useVideoRecorderStore.getState().startRecordingAudio(audioStream);
15084
+ useVideoRecorderStore.getState().startRecordingAudio();
15053
15085
  setIdCaptureVideoAudioStartsAt(new Date().getTime() - ((_a = videoStartsAt === null || videoStartsAt === void 0 ? void 0 : videoStartsAt.getTime()) !== null && _a !== void 0 ? _a : 0));
15054
- setExpectedAudioText(translatedText);
15086
+ var renderedTranslatedText = typeof translatedText === 'string' ? translatedText : renderToString(translatedText);
15087
+ setExpectedAudioText(renderedTranslatedText);
15055
15088
  } else {
15056
15089
  useVideoRecorderStore.getState().stopRecordingVideo();
15057
15090
  }
15058
- }, [audioStream, setExpectedAudioText, setIdCaptureVideoAudioStartsAt, translatedText, videoStartsAt]);
15091
+ }, [setExpectedAudioText, setIdCaptureVideoAudioStartsAt, translatedText, videoStartsAt]);
15059
15092
  var frameWidth = (_c = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) !== null && _c !== void 0 ? _c : 0;
15060
15093
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
15061
15094
  var faceBox = face === null || face === void 0 ? void 0 : face.box;
@@ -15687,36 +15720,36 @@ var VideoIdWizard = function VideoIdWizard(_a) {
15687
15720
  };
15688
15721
 
15689
15722
  function CompositeWizard(_a) {
15690
- var _b, _c, _d, _e, _f, _g, _h, _j, _k;
15723
+ var _b;
15691
15724
  var userChecks = _a.checks,
15692
- _l = _a.idCaptureProps,
15693
- idCaptureProps = _l === void 0 ? {} : _l,
15694
- _m = _a.faceLivenessProps,
15695
- faceLivenessProps = _m === void 0 ? {} : _m,
15725
+ _c = _a.idCaptureProps,
15726
+ idCaptureProps = _c === void 0 ? {} : _c,
15727
+ _d = _a.faceLivenessProps,
15728
+ faceLivenessProps = _d === void 0 ? {} : _d,
15696
15729
  additionalDocumentCaptureProps = _a.additionalDocumentCaptureProps,
15697
- _o = _a.signatureCaptureProps,
15698
- signatureCaptureProps = _o === void 0 ? {} : _o,
15699
- _p = _a.videoSignatureCaptureProps,
15700
- videoSignatureCaptureProps = _p === void 0 ? {} : _p,
15701
- _q = _a.videoIdCaptureProps,
15702
- videoIdCaptureProps = _q === void 0 ? {} : _q,
15703
- _r = _a.captureSignature,
15704
- captureSignature = _r === void 0 ? false : _r,
15705
- _s = _a.captureSignatureVideo,
15706
- captureSignatureVideo = _s === void 0 ? false : _s,
15730
+ _e = _a.signatureCaptureProps,
15731
+ signatureCaptureProps = _e === void 0 ? {} : _e,
15732
+ _f = _a.videoSignatureCaptureProps,
15733
+ videoSignatureCaptureProps = _f === void 0 ? {} : _f,
15734
+ _g = _a.videoIdCaptureProps,
15735
+ videoIdCaptureProps = _g === void 0 ? {} : _g,
15736
+ _h = _a.captureSignature,
15737
+ captureSignature = _h === void 0 ? false : _h,
15738
+ _j = _a.captureSignatureVideo,
15739
+ captureSignatureVideo = _j === void 0 ? false : _j,
15707
15740
  onCameraAccessDenied = _a.onCameraAccessDenied,
15708
15741
  onCameraTamperingDetected = _a.onCameraTamperingDetected,
15709
15742
  onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
15710
- _t = _a.debugMode,
15711
- debugMode = _t === void 0 ? false : _t;
15712
- var _u = useContext(SubmissionContext),
15713
- submit = _u.submit,
15714
- submissionStatus = _u.submissionStatus,
15715
- setSignatureData = _u.setSignatureData,
15716
- setAdditionalDocuments = _u.setAdditionalDocuments;
15717
- var _v = useState(0),
15718
- checkIndex = _v[0],
15719
- setCheckIndex = _v[1];
15743
+ _k = _a.debugMode,
15744
+ debugMode = _k === void 0 ? false : _k;
15745
+ var _l = useContext(SubmissionContext),
15746
+ submit = _l.submit,
15747
+ submissionStatus = _l.submissionStatus,
15748
+ setSignatureData = _l.setSignatureData,
15749
+ setAdditionalDocuments = _l.setAdditionalDocuments;
15750
+ var _m = useState(0),
15751
+ checkIndex = _m[0],
15752
+ setCheckIndex = _m[1];
15720
15753
  var checks = useMemo(function () {
15721
15754
  var _a, _b;
15722
15755
  var checks = __spreadArray([], userChecks, true);
@@ -15823,24 +15856,13 @@ function CompositeWizard(_a) {
15823
15856
  var shouldLoadIdCaptureModels = !(idCaptureProps === null || idCaptureProps === void 0 ? void 0 : idCaptureProps.forceFallbackMode) && !(idCaptureProps === null || idCaptureProps === void 0 ? void 0 : idCaptureProps.allowUploadingDocumentsFromStorage);
15824
15857
  switch (checks[checkIndex]) {
15825
15858
  case 'IdCapture':
15826
- return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
15859
+ return /*#__PURE__*/React__default.createElement(IdCaptureWizardWithProviders, _assign({}, idCaptureProps, {
15827
15860
  onCameraAccessDenied: onCameraAccessDenied,
15828
15861
  onCameraTamperingDetected: onCameraTamperingDetected,
15829
15862
  onMicrophoneAccessDenied: onMicrophoneAccessDenied,
15830
- requestAccessAutomatically: shouldLoadIdCaptureModels,
15831
- classNames: (_c = idCaptureProps.classNames) === null || _c === void 0 ? void 0 : _c.cameraStoreProvider,
15832
- verbiage: (_d = idCaptureProps.verbiage) === null || _d === void 0 ? void 0 : _d.cameraStoreProvider
15833
- }, /*#__PURE__*/React__default.createElement(IdCaptureModelsProvider, {
15834
- autoStart: false,
15835
- shouldLoadModels: shouldLoadIdCaptureModels,
15836
- documentDetectionModelUrl: (_f = (_e = idCaptureProps.assets) === null || _e === void 0 ? void 0 : _e.documentDetectionModelUrl) !== null && _f !== void 0 ? _f : '',
15837
- focusModelUrl: (_h = (_g = idCaptureProps.assets) === null || _g === void 0 ? void 0 : _g.focusModelUrl) !== null && _h !== void 0 ? _h : '',
15838
- onModelError: idCaptureProps.onModelError,
15839
- modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs,
15840
- allowSinglePageIdCapture: idCaptureProps.allowSinglePageIdCapture
15841
- }, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({}, idCaptureProps, {
15863
+ shouldLoadIdCaptureModels: shouldLoadIdCaptureModels,
15842
15864
  onSuccess: onIdCaptureSuccess
15843
- }))))));
15865
+ }));
15844
15866
  case 'VideoIdCapture':
15845
15867
  return /*#__PURE__*/React__default.createElement(VideoIdWizard, _assign({}, videoIdCaptureProps, {
15846
15868
  onComplete: onVideoIdCaptureComplete,
@@ -15849,21 +15871,12 @@ function CompositeWizard(_a) {
15849
15871
  onMicrophoneAccessDenied: onMicrophoneAccessDenied
15850
15872
  }));
15851
15873
  case 'FaceLiveness':
15852
- return /*#__PURE__*/React__default.createElement(CameraStoreProvider, {
15853
- preferFrontFacingCamera: true,
15854
- preferIphoneContinuityCamera: false,
15874
+ return /*#__PURE__*/React__default.createElement(FaceLivenessWizardWithProviders, _assign({}, faceLivenessProps, {
15855
15875
  onCameraAccessDenied: onCameraAccessDenied,
15856
15876
  onCameraTamperingDetected: onCameraTamperingDetected,
15857
15877
  onMicrophoneAccessDenied: onMicrophoneAccessDenied,
15858
- classNames: (_j = faceLivenessProps.classNames) === null || _j === void 0 ? void 0 : _j.cameraStoreProvider,
15859
- verbiage: (_k = faceLivenessProps.verbiage) === null || _k === void 0 ? void 0 : _k.cameraStoreProvider
15860
- }, /*#__PURE__*/React__default.createElement(SelfieGuidanceModelsProvider, {
15861
- autoStart: false,
15862
- onModelError: faceLivenessProps.onModelError,
15863
- modelLoadTimeoutMs: faceLivenessProps.modelLoadTimeoutMs
15864
- }, /*#__PURE__*/React__default.createElement(FaceLivenessWizard, _assign({}, faceLivenessProps, {
15865
15878
  onComplete: onFaceLivenessComplete
15866
- }))));
15879
+ }));
15867
15880
  case 'SignatureCapture':
15868
15881
  return /*#__PURE__*/React__default.createElement(SignatureCapture, _assign({}, signatureCaptureProps, {
15869
15882
  onAccept: onSignatureCaptureSuccess