idmission-web-sdk 2.2.51 → 2.2.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.51';
206
+ var webSdkVersion = '2.2.53';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -4885,6 +4885,7 @@ var esTranslation = {
4885
4885
  'Performing facial recognition, please hold still...': 'Realizando el reconocimiento facial, por favor no te muevas',
4886
4886
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
4887
4887
  'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
4888
+ 'Display the ID page of your passport...': 'Hay que mostrar el página de datos del pasaporte...',
4888
4889
  'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
4889
4890
  'Searching for ID card...': 'Localizando la identificación...',
4890
4891
  'Please read the following text aloud': 'Hay que leer el siguiente texto en voz alta',
@@ -11705,49 +11706,52 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
11705
11706
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
11706
11707
  var _z = _a.requestedAction,
11707
11708
  requestedAction = _z === void 0 ? 'SHOW_ID_FRONT' : _z,
11708
- _0 = _a.satisfied,
11709
- satisfied = _0 === void 0 ? false : _0,
11710
- _1 = _a.faceGuideStatus,
11711
- faceGuideStatus = _1 === void 0 ? 'success' : _1,
11709
+ _0 = _a.idDocumentType,
11710
+ idDocumentType = _0 === void 0 ? 'idCard' : _0,
11711
+ _1 = _a.satisfied,
11712
+ satisfied = _1 === void 0 ? false : _1,
11713
+ _2 = _a.faceGuideStatus,
11714
+ faceGuideStatus = _2 === void 0 ? 'success' : _2,
11712
11715
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
11713
11716
  faceGuideBorderColor = _a.faceGuideBorderColor,
11714
- _2 = _a.idCardGuideStatus,
11715
- idCardGuideStatus = _2 === void 0 ? 'ready' : _2,
11717
+ _3 = _a.idCardGuideStatus,
11718
+ idCardGuideStatus = _3 === void 0 ? 'ready' : _3,
11716
11719
  idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
11717
11720
  idCardGuideBorderColor = _a.idCardGuideBorderColor,
11718
11721
  idCardCaptureProgress = _a.idCardCaptureProgress,
11719
- _3 = _a.idCardCaptureGuideImages,
11720
- userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
11721
- _4 = _a.classNames,
11722
- classNames = _4 === void 0 ? {} : _4,
11723
- _5 = _a.verbiage,
11724
- rawVerbiage = _5 === void 0 ? {} : _5;
11722
+ _4 = _a.idCaptureGuideImages,
11723
+ userSuppliedImages = _4 === void 0 ? defaultIdCaptureGuideImages : _4,
11724
+ _5 = _a.classNames,
11725
+ classNames = _5 === void 0 ? {} : _5,
11726
+ _6 = _a.verbiage,
11727
+ rawVerbiage = _6 === void 0 ? {} : _6;
11725
11728
  var isRearFacing = useCameraStore(function (state) {
11726
11729
  return state.isRearFacing;
11727
11730
  });
11728
11731
  var verbiage = useTranslations(rawVerbiage, {
11729
11732
  idFrontInstructionText: 'Display the front of your ID card...',
11730
11733
  idBackInstructionText: 'Display the back of your ID card...',
11734
+ passportInstructionText: 'Display the ID page of your passport...',
11731
11735
  flipIdInstructionText: 'Please flip your ID card...',
11732
11736
  verifyLivenessInstructionText: 'Performing facial recognition, please hold still...'
11733
11737
  });
11734
- var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
11738
+ var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_PASSPORT' ? verbiage.passportInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
11735
11739
  var theme = useTheme();
11736
11740
  if (faceGuideBorderWidth === undefined) faceGuideBorderWidth = (_d = (_c = (_b = theme.idVideoCapture) === null || _b === void 0 ? void 0 : _b.faceGuides) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 5;
11737
11741
  if (faceGuideBorderColor === undefined) faceGuideBorderColor = (_j = satisfied ? (_f = (_e = theme.idVideoCapture) === null || _e === void 0 ? void 0 : _e.faceGuides) === null || _f === void 0 ? void 0 : _f.satisfiedColor : (_h = (_g = theme.idVideoCapture) === null || _g === void 0 ? void 0 : _g.faceGuides) === null || _h === void 0 ? void 0 : _h.unsatisfiedColor) !== null && _j !== void 0 ? _j : '#D6DCE7';
11738
11742
  if (idCardGuideBorderWidth === undefined) idCardGuideBorderWidth = (_m = (_l = (_k = theme.idVideoCapture) === null || _k === void 0 ? void 0 : _k.idCardGuides) === null || _l === void 0 ? void 0 : _l.borderWidth) !== null && _m !== void 0 ? _m : 20;
11739
11743
  if (idCardGuideBorderColor === undefined) idCardGuideBorderColor = (_s = satisfied ? (_p = (_o = theme.idVideoCapture) === null || _o === void 0 ? void 0 : _o.idCardGuides) === null || _p === void 0 ? void 0 : _p.satisfiedColor : (_r = (_q = theme.idVideoCapture) === null || _q === void 0 ? void 0 : _q.idCardGuides) === null || _r === void 0 ? void 0 : _r.unsatisfiedColor) !== null && _s !== void 0 ? _s : '#D6DCE7';
11740
- var _6 = useResizeObserver(),
11741
- idCardGuideRef = _6.ref,
11742
- _7 = _6.width,
11743
- idCardGuideWidth = _7 === void 0 ? 0 : _7,
11744
- _8 = _6.height,
11745
- idCardGuideHeight = _8 === void 0 ? 0 : _8;
11744
+ var _7 = useResizeObserver(),
11745
+ idCardGuideRef = _7.ref,
11746
+ _8 = _7.width,
11747
+ idCardGuideWidth = _8 === void 0 ? 0 : _8,
11748
+ _9 = _7.height,
11749
+ idCardGuideHeight = _9 === void 0 ? 0 : _9;
11746
11750
  var idCaptureGuideImages = useGuideImages(userSuppliedImages);
11747
11751
  var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
11748
- var _9 = useState(undefined),
11749
- aspectRatio = _9[0],
11750
- setAspectRatio = _9[1];
11752
+ var _10 = useState(undefined),
11753
+ aspectRatio = _10[0],
11754
+ setAspectRatio = _10[1];
11751
11755
  var onImageLoaded = useCallback(function (e) {
11752
11756
  var _a, _b, _c, _d;
11753
11757
  var img = e.currentTarget;
@@ -11796,7 +11800,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
11796
11800
  className: classNames.idCardGuideImage,
11797
11801
  "$isMirrored": !isRearFacing,
11798
11802
  style: idCardImageStyle,
11799
- src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
11803
+ src: idDocumentType === 'passport' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
11800
11804
  onLoad: onImageLoaded
11801
11805
  })), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__default.createElement(IdVideoCaptureFlipIdPrompt, {
11802
11806
  idCaptureGuideImages: idCaptureGuideImages,
@@ -11931,7 +11935,7 @@ var defaultVideoIdCaptureThresholds = {
11931
11935
  detection: {
11932
11936
  idCardFront: 0.4,
11933
11937
  idCardBack: 0.5,
11934
- passport: 1
11938
+ passport: 0.3
11935
11939
  },
11936
11940
  focus: {
11937
11941
  idCardFront: {
@@ -11949,7 +11953,8 @@ var defaultVideoIdCaptureThresholds = {
11949
11953
  },
11950
11954
  goodFrames: {
11951
11955
  idCardFront: 1,
11952
- idCardBack: 1
11956
+ idCardBack: 1,
11957
+ passport: 1
11953
11958
  },
11954
11959
  flipShortcutThreshold: 0.7
11955
11960
  };
@@ -11963,91 +11968,93 @@ var IdVideoCapture = function IdVideoCapture(_a) {
11963
11968
  onExitCapture = _a.onExitCapture,
11964
11969
  _w = _a.idCaptureModelsEnabled,
11965
11970
  idCaptureModelsEnabled = _w === void 0 ? true : _w,
11966
- _x = _a.idCardCaptureGuideImages,
11967
- idCardCaptureGuideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
11968
- _y = _a.idCardFrontDelay,
11969
- idCardFrontDelay = _y === void 0 ? 1000 : _y,
11970
- _z = _a.videoIdCaptureThresholds,
11971
- videoIdCaptureThresholds = _z === void 0 ? defaultVideoIdCaptureThresholds : _z,
11972
- _0 = _a.skipShowIdCardBack,
11973
- skipShowIdCardBack = _0 === void 0 ? false : _0,
11974
- _1 = _a.captureCountdownSeconds,
11975
- captureCountdownSeconds = _1 === void 0 ? 3 : _1,
11971
+ _x = _a.idDocumentType,
11972
+ idDocumentType = _x === void 0 ? 'idCard' : _x,
11973
+ _y = _a.idCaptureGuideImages,
11974
+ idCaptureGuideImages = _y === void 0 ? defaultIdCaptureGuideImages : _y,
11975
+ _z = _a.idCardFrontDelay,
11976
+ idCardFrontDelay = _z === void 0 ? 1000 : _z,
11977
+ _0 = _a.videoIdCaptureThresholds,
11978
+ videoIdCaptureThresholds = _0 === void 0 ? defaultVideoIdCaptureThresholds : _0,
11979
+ _1 = _a.skipShowIdCardBack,
11980
+ skipShowIdCardBack = _1 === void 0 ? false : _1,
11981
+ _2 = _a.captureCountdownSeconds,
11982
+ captureCountdownSeconds = _2 === void 0 ? 3 : _2,
11976
11983
  readTextPrompt = _a.readTextPrompt,
11977
- _2 = _a.readTextTimeoutDurationMs,
11978
- readTextTimeoutDurationMs = _2 === void 0 ? 15000 : _2,
11979
- _3 = _a.readTextMinReadingMs,
11980
- readTextMinReadingMs = _3 === void 0 ? 10000 : _3,
11981
- _4 = _a.disableFaceDetectionWhileAudioCapture,
11982
- disableFaceDetectionWhileAudioCapture = _4 === void 0 ? false : _4,
11983
- _5 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
11984
- disableFaceDetectionWhileAudioCaptureMsDelay = _5 === void 0 ? 2000 : _5,
11985
- _6 = _a.mergeAVStreams,
11986
- mergeAVStreams = _6 === void 0 ? false : _6,
11987
- _7 = _a.classNames,
11988
- classNames = _7 === void 0 ? {} : _7,
11989
- _8 = _a.colors,
11990
- colors = _8 === void 0 ? {} : _8,
11991
- _9 = _a.verbiage,
11992
- rawVerbiage = _9 === void 0 ? {} : _9,
11993
- _10 = _a.debugMode,
11994
- debugMode = _10 === void 0 ? false : _10;
11995
- var _11 = useResizeObserver(),
11996
- ref = _11.ref,
11997
- _12 = _11.width,
11998
- width = _12 === void 0 ? 1 : _12,
11999
- _13 = _11.height,
12000
- height = _13 === void 0 ? 1 : _13;
12001
- var _14 = useCameraStore(),
12002
- camera = _14.camera,
12003
- videoRef = _14.videoRef,
12004
- videoLoaded = _14.videoLoaded,
12005
- cameraReady = _14.cameraReady,
12006
- microphoneReady = _14.microphoneReady,
12007
- audioStream = _14.audioStream,
12008
- isRearFacing = _14.isRearFacing,
12009
- releaseCameraAccess = _14.releaseCameraAccess;
12010
- var _15 = useState([]),
12011
- detectedObjects = _15[0],
12012
- setDetectedObjects = _15[1];
12013
- var _16 = useState(null),
12014
- face = _16[0],
12015
- setFace = _16[1];
12016
- var _17 = useContext(IdCaptureModelsContext),
12017
- idModelsReady = _17.ready,
12018
- startIdModels = _17.start,
12019
- stopIdModels = _17.stop,
12020
- onIdPredictionMade = _17.onPredictionMade,
12021
- setThresholds = _17.setThresholds,
12022
- setDocumentDetectionBoundaries = _17.setDocumentDetectionBoundaries,
12023
- bestFrameDetails = _17.bestFrameDetails,
12024
- resetBestFrame = _17.resetBestFrame,
12025
- idModelError = _17.modelError;
12026
- var _18 = useState(null),
12027
- videoStartsAt = _18[0],
12028
- setVideoStartsAt = _18[1];
12029
- var _19 = useContext(SubmissionContext),
12030
- setIdCaptureVideoAudioStartsAt = _19.setIdCaptureVideoAudioStartsAt,
12031
- setExpectedAudioText = _19.setExpectedAudioText;
12032
- var _20 = useContext(SelfieGuidanceModelsContext),
12033
- startSelfieGuidance = _20.start,
12034
- stopSelfieGuidance = _20.stop,
12035
- onSelfiePredictionMade = _20.onPredictionMade,
12036
- selfieModelError = _20.error;
12037
- var _21 = useVideoRecorder(camera, audioStream, mergeAVStreams),
12038
- isRecordingVideo = _21.isRecordingVideo,
12039
- startRecordingVideo = _21.startRecordingVideo,
12040
- startRecordingAudio = _21.startRecordingAudio,
12041
- stopRecordingVideo = _21.stopRecordingVideo,
12042
- stopRecordingAudio = _21.stopRecordingAudio,
12043
- videoRecordingUnintentionallyStopped = _21.videoRecordingUnintentionallyStopped,
12044
- audioRecordingUnintentionallyStopped = _21.audioRecordingUnintentionallyStopped,
12045
- videoUrl = _21.videoUrl,
12046
- audioUrl = _21.audioUrl;
11984
+ _3 = _a.readTextTimeoutDurationMs,
11985
+ readTextTimeoutDurationMs = _3 === void 0 ? 15000 : _3,
11986
+ _4 = _a.readTextMinReadingMs,
11987
+ readTextMinReadingMs = _4 === void 0 ? 10000 : _4,
11988
+ _5 = _a.disableFaceDetectionWhileAudioCapture,
11989
+ disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
11990
+ _6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
11991
+ disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
11992
+ _7 = _a.mergeAVStreams,
11993
+ mergeAVStreams = _7 === void 0 ? false : _7,
11994
+ _8 = _a.classNames,
11995
+ classNames = _8 === void 0 ? {} : _8,
11996
+ _9 = _a.colors,
11997
+ colors = _9 === void 0 ? {} : _9,
11998
+ _10 = _a.verbiage,
11999
+ rawVerbiage = _10 === void 0 ? {} : _10,
12000
+ _11 = _a.debugMode,
12001
+ debugMode = _11 === void 0 ? false : _11;
12002
+ var _12 = useResizeObserver(),
12003
+ ref = _12.ref,
12004
+ _13 = _12.width,
12005
+ width = _13 === void 0 ? 1 : _13,
12006
+ _14 = _12.height,
12007
+ height = _14 === void 0 ? 1 : _14;
12008
+ var _15 = useCameraStore(),
12009
+ camera = _15.camera,
12010
+ videoRef = _15.videoRef,
12011
+ videoLoaded = _15.videoLoaded,
12012
+ cameraReady = _15.cameraReady,
12013
+ microphoneReady = _15.microphoneReady,
12014
+ audioStream = _15.audioStream,
12015
+ isRearFacing = _15.isRearFacing,
12016
+ releaseCameraAccess = _15.releaseCameraAccess;
12017
+ var _16 = useState([]),
12018
+ detectedObjects = _16[0],
12019
+ setDetectedObjects = _16[1];
12020
+ var _17 = useState(null),
12021
+ face = _17[0],
12022
+ setFace = _17[1];
12023
+ var _18 = useContext(IdCaptureModelsContext),
12024
+ idModelsReady = _18.ready,
12025
+ startIdModels = _18.start,
12026
+ stopIdModels = _18.stop,
12027
+ onIdPredictionMade = _18.onPredictionMade,
12028
+ setThresholds = _18.setThresholds,
12029
+ setDocumentDetectionBoundaries = _18.setDocumentDetectionBoundaries,
12030
+ bestFrameDetails = _18.bestFrameDetails,
12031
+ resetBestFrame = _18.resetBestFrame,
12032
+ idModelError = _18.modelError;
12033
+ var _19 = useState(null),
12034
+ videoStartsAt = _19[0],
12035
+ setVideoStartsAt = _19[1];
12036
+ var _20 = useContext(SubmissionContext),
12037
+ setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
12038
+ setExpectedAudioText = _20.setExpectedAudioText;
12039
+ var _21 = useContext(SelfieGuidanceModelsContext),
12040
+ startSelfieGuidance = _21.start,
12041
+ stopSelfieGuidance = _21.stop,
12042
+ onSelfiePredictionMade = _21.onPredictionMade,
12043
+ selfieModelError = _21.error;
12044
+ var _22 = useVideoRecorder(camera, audioStream, mergeAVStreams),
12045
+ isRecordingVideo = _22.isRecordingVideo,
12046
+ startRecordingVideo = _22.startRecordingVideo,
12047
+ startRecordingAudio = _22.startRecordingAudio,
12048
+ stopRecordingVideo = _22.stopRecordingVideo,
12049
+ stopRecordingAudio = _22.stopRecordingAudio,
12050
+ videoRecordingUnintentionallyStopped = _22.videoRecordingUnintentionallyStopped,
12051
+ audioRecordingUnintentionallyStopped = _22.audioRecordingUnintentionallyStopped,
12052
+ videoUrl = _22.videoUrl,
12053
+ audioUrl = _22.audioUrl;
12047
12054
  var countdownTimeoutRef = useRef(undefined);
12048
- var _22 = useState(-1),
12049
- countdownRemaining = _22[0],
12050
- setCountdownRemaining = _22[1];
12055
+ var _23 = useState(-1),
12056
+ countdownRemaining = _23[0],
12057
+ setCountdownRemaining = _23[1];
12051
12058
  useEffect(function () {
12052
12059
  if (!isRecordingVideo && !videoUrl) {
12053
12060
  startRecordingVideo();
@@ -12067,9 +12074,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12067
12074
  onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
12068
12075
  }
12069
12076
  }, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
12070
- var _23 = useState('SHOW_ID_FRONT'),
12071
- requestedAction = _23[0],
12072
- setRequestedAction = _23[1];
12077
+ var _24 = useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
12078
+ requestedAction = _24[0],
12079
+ setRequestedAction = _24[1];
12073
12080
  var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
12074
12081
  useEffect(function startModelsWhenCapturing() {
12075
12082
  if (!shouldRunIdModels) return;
@@ -12078,9 +12085,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12078
12085
  return stopIdModels();
12079
12086
  };
12080
12087
  }, [shouldRunIdModels, startIdModels, stopIdModels]);
12088
+ var adjustedThresholds = useMemo(function () {
12089
+ if (idDocumentType === 'idCard') {
12090
+ return _assign(_assign({}, videoIdCaptureThresholds), {
12091
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
12092
+ passport: 1
12093
+ })
12094
+ });
12095
+ } else {
12096
+ return _assign(_assign({}, videoIdCaptureThresholds), {
12097
+ detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
12098
+ idCardFront: 1,
12099
+ idCardBack: 1
12100
+ })
12101
+ });
12102
+ }
12103
+ }, [idDocumentType, videoIdCaptureThresholds]);
12081
12104
  useEffect(function () {
12082
- setThresholds(videoIdCaptureThresholds);
12083
- }, [requestedAction, setThresholds, videoIdCaptureThresholds]);
12105
+ setThresholds(adjustedThresholds);
12106
+ }, [requestedAction, setThresholds, adjustedThresholds]);
12084
12107
  useEffect(function () {
12085
12108
  setDocumentDetectionBoundaries({
12086
12109
  top: 20,
@@ -12089,19 +12112,19 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12089
12112
  bottom: 0
12090
12113
  });
12091
12114
  }, [setDocumentDetectionBoundaries]);
12092
- var _24 = useState(0),
12093
- currentDetectionScore = _24[0],
12094
- setCurrentDetectionScore = _24[1];
12095
- var _25 = useState('none'),
12096
- currentDetectedDocumentType = _25[0],
12097
- setCurrentDetectedDocumentType = _25[1];
12098
- var _26 = useState(0),
12099
- currentFocusScore = _26[0],
12100
- setCurrentFocusScore = _26[1];
12115
+ var _25 = useState(0),
12116
+ currentDetectionScore = _25[0],
12117
+ setCurrentDetectionScore = _25[1];
12118
+ var _26 = useState('none'),
12119
+ currentDetectedDocumentType = _26[0],
12120
+ setCurrentDetectedDocumentType = _26[1];
12101
12121
  var _27 = useState(0),
12102
- goodFramesCount = _27[0],
12103
- setGoodFramesCount = _27[1];
12104
- var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? videoIdCaptureThresholds.goodFrames.idCardFront : videoIdCaptureThresholds.goodFrames.idCardBack;
12122
+ currentFocusScore = _27[0],
12123
+ setCurrentFocusScore = _27[1];
12124
+ var _28 = useState(0),
12125
+ goodFramesCount = _28[0],
12126
+ setGoodFramesCount = _28[1];
12127
+ var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
12105
12128
  var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
12106
12129
  useEffect(function () {
12107
12130
  if (!idCaptureModelsEnabled || idModelError) return;
@@ -12110,9 +12133,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12110
12133
  setCurrentDetectionScore(prediction.detectionScore);
12111
12134
  setCurrentDetectedDocumentType(prediction.detectedDocumentType);
12112
12135
  setCurrentFocusScore(prediction.focusScore);
12113
- var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
12136
+ var detectionThresholdMet = requestedAction === 'SHOW_PASSPORT' ? prediction.passportDetectionThresholdMet : requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
12114
12137
  var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
12115
- var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= videoIdCaptureThresholds.flipShortcutThreshold;
12138
+ var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= adjustedThresholds.flipShortcutThreshold;
12116
12139
  if (shouldShortcutFlipAnimation) {
12117
12140
  return setRequestedAction('SHOW_ID_BACK');
12118
12141
  }
@@ -12120,16 +12143,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12120
12143
  return n + 1;
12121
12144
  } : 0);
12122
12145
  });
12123
- }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, videoIdCaptureThresholds.flipShortcutThreshold]);
12124
- var _28 = useState(null),
12125
- idFrontCaptureStartedAt = _28[0],
12126
- setFirstGoodFrameTime = _28[1];
12146
+ }, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
12147
+ var _29 = useState(null),
12148
+ idFrontCaptureStartedAt = _29[0],
12149
+ setFirstGoodFrameTime = _29[1];
12127
12150
  useEffect(function () {
12128
12151
  if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
12129
12152
  }, [goodFramesCount]);
12130
- var delaySatisfied = requestedAction !== 'SHOW_ID_FRONT' || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
12153
+ var delaySatisfied = !['SHOW_ID_FRONT', 'SHOW_PASSPORT'].includes(requestedAction) || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
12131
12154
  var translatedText = useVerbiage(readTextPrompt, '');
12132
- var onIdBackCaptureComplete = useCallback(function () {
12155
+ var onIdCaptureComplete = useCallback(function () {
12133
12156
  var _a;
12134
12157
  if (translatedText) {
12135
12158
  setRequestedAction('READ_TEXT');
@@ -12144,16 +12167,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12144
12167
  var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
12145
12168
  var faceBox = face === null || face === void 0 ? void 0 : face.box;
12146
12169
  var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
12147
- var _29 = useState(),
12148
- countdownStartedAt = _29[0],
12149
- setCountdownStartedAt = _29[1];
12170
+ var _30 = useState(),
12171
+ countdownStartedAt = _30[0],
12172
+ setCountdownStartedAt = _30[1];
12150
12173
  var photoCanvas = useRef(null);
12151
12174
  var frameLock = useRef(false);
12152
12175
  var captureFrame = useCallback(function () {
12153
12176
  return __awaiter(void 0, void 0, void 0, function () {
12154
- var frameBase64;
12155
- return __generator(this, function (_a) {
12156
- switch (_a.label) {
12177
+ var frameBase64, _a;
12178
+ return __generator(this, function (_b) {
12179
+ switch (_b.label) {
12157
12180
  case 0:
12158
12181
  if (frameLock.current) return [2 /*return*/];
12159
12182
  frameLock.current = true;
@@ -12163,23 +12186,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12163
12186
  frameLock.current = false;
12164
12187
  return [2 /*return*/];
12165
12188
  }
12166
- _a.label = 1;
12189
+ _b.label = 1;
12167
12190
  case 1:
12168
- _a.trys.push([1,, 7, 8]);
12191
+ _b.trys.push([1,, 7, 8]);
12169
12192
  if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 5];
12170
12193
  if (onIdFrontImageCaptured) {
12171
12194
  onIdFrontImageCaptured(frameBase64);
12172
12195
  }
12173
12196
  if (!skipShowIdCardBack) return [3 /*break*/, 4];
12174
- if (!(skipShowIdCardBack === true)) return [3 /*break*/, 2];
12175
- return [2 /*return*/, onIdBackCaptureComplete()];
12176
- case 2:
12197
+ _a = skipShowIdCardBack === true;
12198
+ if (_a) return [3 /*break*/, 3];
12177
12199
  return [4 /*yield*/, skipShowIdCardBack()];
12200
+ case 2:
12201
+ _a = _b.sent();
12202
+ _b.label = 3;
12178
12203
  case 3:
12179
- if (_a.sent()) {
12180
- return [2 /*return*/, onIdBackCaptureComplete()];
12204
+ if (_a) {
12205
+ return [2 /*return*/, onIdCaptureComplete()];
12181
12206
  }
12182
- _a.label = 4;
12207
+ _b.label = 4;
12183
12208
  case 4:
12184
12209
  setRequestedAction('FLIP_ID');
12185
12210
  return [3 /*break*/, 6];
@@ -12188,9 +12213,14 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12188
12213
  if (onIdBackImageCaptured) {
12189
12214
  onIdBackImageCaptured(frameBase64);
12190
12215
  }
12191
- onIdBackCaptureComplete();
12216
+ onIdCaptureComplete();
12217
+ } else if (requestedAction == 'SHOW_PASSPORT') {
12218
+ if (onIdFrontImageCaptured) {
12219
+ onIdFrontImageCaptured(frameBase64);
12220
+ }
12221
+ onIdCaptureComplete();
12192
12222
  }
12193
- _a.label = 6;
12223
+ _b.label = 6;
12194
12224
  case 6:
12195
12225
  return [3 /*break*/, 8];
12196
12226
  case 7:
@@ -12210,7 +12240,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12210
12240
  }
12211
12241
  });
12212
12242
  });
12213
- }, [onIdBackCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
12243
+ }, [onIdCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
12214
12244
  var isFlipping = requestedAction === 'FLIP_ID';
12215
12245
  useEffect(function () {
12216
12246
  if (!isFlipping) return;
@@ -12269,9 +12299,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12269
12299
  stopSelfieGuidance();
12270
12300
  };
12271
12301
  }, [startSelfieGuidance, stopSelfieGuidance]);
12272
- var _30 = useState(0),
12273
- numFramesWithoutFaces = _30[0],
12274
- setNumFramesWithoutFaces = _30[1];
12302
+ var _31 = useState(0),
12303
+ numFramesWithoutFaces = _31[0],
12304
+ setNumFramesWithoutFaces = _31[1];
12275
12305
  onSelfiePredictionMade(useThrottledCallback(useCallback(function (_a) {
12276
12306
  var face = _a.face;
12277
12307
  if (selfieModelError) return;
@@ -12287,12 +12317,12 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12287
12317
  }
12288
12318
  }, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
12289
12319
  var theme = useTheme();
12290
- var _31 = useTranslations(rawVerbiage, {
12320
+ var _32 = useTranslations(rawVerbiage, {
12291
12321
  faceNotCenteredText: 'Please move your face to the center...',
12292
12322
  captureBtnText: 'Capture'
12293
12323
  }),
12294
- captureBtnText = _31.captureBtnText,
12295
- faceNotCenteredText = _31.faceNotCenteredText;
12324
+ captureBtnText = _32.captureBtnText,
12325
+ faceNotCenteredText = _32.faceNotCenteredText;
12296
12326
  var debugScalingDetails = useDebugScalingDetails({
12297
12327
  enabled: debugMode,
12298
12328
  pageWidth: width,
@@ -12300,7 +12330,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12300
12330
  videoWidth: (_g = (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.videoWidth) !== null && _g !== void 0 ? _g : 0,
12301
12331
  videoHeight: (_j = (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.videoHeight) !== null && _j !== void 0 ? _j : 0
12302
12332
  });
12303
- var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction);
12333
+ var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
12304
12334
  var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
12305
12335
  return /*#__PURE__*/React__default.createElement(PageContainer, {
12306
12336
  ref: ref,
@@ -12319,10 +12349,11 @@ var IdVideoCapture = function IdVideoCapture(_a) {
12319
12349
  classNames: classNames.guides,
12320
12350
  verbiage: rawVerbiage.guides,
12321
12351
  requestedAction: requestedAction,
12352
+ idDocumentType: idDocumentType,
12322
12353
  satisfied: satisfied,
12323
12354
  idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
12324
- idCardCaptureProgress: !!countdownStartedAt ? 1 : 0,
12325
- idCardCaptureGuideImages: idCardCaptureGuideImages,
12355
+ idCardCaptureProgress: countdownStartedAt ? 1 : 0,
12356
+ idCaptureGuideImages: idCaptureGuideImages,
12326
12357
  faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
12327
12358
  idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
12328
12359
  }), debugMode && capturingId && ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlayDiv, {
@@ -12517,49 +12548,51 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12517
12548
  idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
12518
12549
  customOverlayContent = _a.customOverlayContent,
12519
12550
  onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
12520
- _u = _a.idCaptureGuideType,
12521
- idCaptureGuideType = _u === void 0 ? 'fit' : _u,
12522
- _v = _a.idCaptureGuideImages,
12523
- idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
12524
- _w = _a.idCapturePortraitGuidesOnMobile,
12525
- idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
12526
- _x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
12527
- idCaptureRotateLoadingOverlayImageWhenPortrait = _x === void 0 ? true : _x,
12528
- _y = _a.idCaptureModelLoadTimeoutMs,
12529
- idCaptureModelLoadTimeoutMs = _y === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _y,
12530
- _z = _a.faceLivenessLoadingOverlayMode,
12531
- faceLivenessLoadingOverlayMode = _z === void 0 ? 'default' : _z,
12532
- _0 = _a.disableFaceDetectionWhileAudioCapture,
12533
- disableFaceDetectionWhileAudioCapture = _0 === void 0 ? true : _0,
12534
- _1 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12535
- disableFaceDetectionWhileAudioCaptureMsDelay = _1 === void 0 ? 2000 : _1,
12536
- _2 = _a.silentFallback,
12537
- silentFallback = _2 === void 0 ? false : _2,
12538
- _3 = _a.mergeAVStreams,
12539
- mergeAVStreams = _3 === void 0 ? false : _3,
12540
- _4 = _a.assets,
12541
- assets = _4 === void 0 ? {} : _4,
12542
- _5 = _a.classNames,
12543
- classNames = _5 === void 0 ? {} : _5,
12544
- _6 = _a.colors,
12545
- colors = _6 === void 0 ? {} : _6,
12546
- _7 = _a.verbiage,
12547
- verbiage = _7 === void 0 ? {} : _7,
12548
- _8 = _a.debugMode,
12549
- debugMode = _8 === void 0 ? false : _8;
12550
- var _9 = useContext(SubmissionContext),
12551
- submissionStatus = _9.submissionStatus,
12552
- idCaptureVideoUrl = _9.idCaptureVideoUrl,
12553
- idCaptureVideoAudioUrl = _9.idCaptureVideoAudioUrl,
12554
- idCaptureVideoIdFrontImage = _9.idCaptureVideoIdFrontImage,
12555
- idCaptureVideoIdBackImage = _9.idCaptureVideoIdBackImage,
12556
- setIdCaptureVideoUrl = _9.setIdCaptureVideoUrl,
12557
- setIdCaptureVideoIdFrontImage = _9.setIdCaptureVideoIdFrontImage,
12558
- setIdCaptureVideoIdBackImage = _9.setIdCaptureVideoIdBackImage,
12559
- setIdCaptureVideoAudioUrl = _9.setIdCaptureVideoAudioUrl;
12560
- var _10 = useState('CAPTURING_ID'),
12561
- captureState = _10[0],
12562
- setCaptureState = _10[1];
12551
+ _u = _a.idDocumentType,
12552
+ idDocumentType = _u === void 0 ? 'idCard' : _u,
12553
+ _v = _a.idCaptureGuideType,
12554
+ idCaptureGuideType = _v === void 0 ? 'fit' : _v,
12555
+ _w = _a.idCaptureGuideImages,
12556
+ idCaptureGuideImages = _w === void 0 ? defaultIdCaptureGuideImages : _w,
12557
+ _x = _a.idCapturePortraitGuidesOnMobile,
12558
+ idCapturePortraitGuidesOnMobile = _x === void 0 ? true : _x,
12559
+ _y = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
12560
+ idCaptureRotateLoadingOverlayImageWhenPortrait = _y === void 0 ? true : _y,
12561
+ _z = _a.idCaptureModelLoadTimeoutMs,
12562
+ idCaptureModelLoadTimeoutMs = _z === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _z,
12563
+ _0 = _a.faceLivenessLoadingOverlayMode,
12564
+ faceLivenessLoadingOverlayMode = _0 === void 0 ? 'default' : _0,
12565
+ _1 = _a.disableFaceDetectionWhileAudioCapture,
12566
+ disableFaceDetectionWhileAudioCapture = _1 === void 0 ? true : _1,
12567
+ _2 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
12568
+ disableFaceDetectionWhileAudioCaptureMsDelay = _2 === void 0 ? 2000 : _2,
12569
+ _3 = _a.silentFallback,
12570
+ silentFallback = _3 === void 0 ? false : _3,
12571
+ _4 = _a.mergeAVStreams,
12572
+ mergeAVStreams = _4 === void 0 ? false : _4,
12573
+ _5 = _a.assets,
12574
+ assets = _5 === void 0 ? {} : _5,
12575
+ _6 = _a.classNames,
12576
+ classNames = _6 === void 0 ? {} : _6,
12577
+ _7 = _a.colors,
12578
+ colors = _7 === void 0 ? {} : _7,
12579
+ _8 = _a.verbiage,
12580
+ verbiage = _8 === void 0 ? {} : _8,
12581
+ _9 = _a.debugMode,
12582
+ debugMode = _9 === void 0 ? false : _9;
12583
+ var _10 = useContext(SubmissionContext),
12584
+ submissionStatus = _10.submissionStatus,
12585
+ idCaptureVideoUrl = _10.idCaptureVideoUrl,
12586
+ idCaptureVideoAudioUrl = _10.idCaptureVideoAudioUrl,
12587
+ idCaptureVideoIdFrontImage = _10.idCaptureVideoIdFrontImage,
12588
+ idCaptureVideoIdBackImage = _10.idCaptureVideoIdBackImage,
12589
+ setIdCaptureVideoUrl = _10.setIdCaptureVideoUrl,
12590
+ setIdCaptureVideoIdFrontImage = _10.setIdCaptureVideoIdFrontImage,
12591
+ setIdCaptureVideoIdBackImage = _10.setIdCaptureVideoIdBackImage,
12592
+ setIdCaptureVideoAudioUrl = _10.setIdCaptureVideoAudioUrl;
12593
+ var _11 = useState('CAPTURING_ID'),
12594
+ captureState = _11[0],
12595
+ setCaptureState = _11[1];
12563
12596
  useEffect(function () {
12564
12597
  if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
12565
12598
  }, [captureState, skipIdCapture]);
@@ -12590,9 +12623,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12590
12623
  var onVideoCaptureFaceNotDetected = useCallback(function () {
12591
12624
  setCaptureState('CHECKING_LIVENESS');
12592
12625
  }, []);
12593
- var _11 = useState(0),
12594
- attempt = _11[0],
12595
- setAttempt = _11[1];
12626
+ var _12 = useState(0),
12627
+ attempt = _12[0],
12628
+ setAttempt = _12[1];
12596
12629
  var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
12597
12630
  var onFaceCaptureExitAfterFailure = useCallback(function (resp, req) {
12598
12631
  userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
@@ -12627,10 +12660,11 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12627
12660
  var _b, _c, _d, _e;
12628
12661
  var status = _a.status;
12629
12662
  return /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
12630
- idCardCaptureGuideImages: idCaptureGuideImages,
12631
12663
  classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
12632
12664
  verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
12633
12665
  requestedAction: "VERIFY_LIVENESS",
12666
+ idCaptureGuideImages: idCaptureGuideImages,
12667
+ idDocumentType: idDocumentType,
12634
12668
  faceGuideStatus: status,
12635
12669
  faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
12636
12670
  idCardGuideStatus: "disabled"
@@ -12687,6 +12721,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12687
12721
  guideType: idCaptureGuideType,
12688
12722
  portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
12689
12723
  rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
12724
+ captureRequirement: idDocumentType,
12690
12725
  debugMode: debugMode
12691
12726
  }))));
12692
12727
  case 'CHECKING_LIVENESS':
@@ -12723,7 +12758,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12723
12758
  onRecordingFailed: onRecordingFailed,
12724
12759
  onExitCapture: handleExitCapture,
12725
12760
  idCaptureModelsEnabled: idCaptureModelsEnabled,
12726
- idCardCaptureGuideImages: idCaptureGuideImages,
12761
+ idCaptureGuideImages: idCaptureGuideImages,
12762
+ idDocumentType: idDocumentType,
12727
12763
  videoIdCaptureThresholds: videoIdCaptureThresholds,
12728
12764
  skipShowIdCardBack: skipShowIdCardBack,
12729
12765
  disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
@@ -15264,40 +15300,42 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15264
15300
  _p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
15265
15301
  idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
15266
15302
  idCardForFaceMatch = _a.idCardForFaceMatch,
15267
- _q = _a.faceLivenessLoadingOverlayMode,
15268
- faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
15269
- _r = _a.disableFaceDetectionWhileAudioCapture,
15270
- disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
15271
- _s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
15272
- disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
15273
- _t = _a.silentFallback,
15274
- silentFallback = _t === void 0 ? false : _t,
15275
- _u = _a.mergeAVStreams,
15276
- mergeAVStreams = _u === void 0 ? false : _u,
15277
- _v = _a.matchOnly,
15278
- matchOnly = _v === void 0 ? false : _v,
15279
- _w = _a.theme,
15280
- theme = _w === void 0 ? 'default' : _w,
15281
- _x = _a.assets,
15282
- assets = _x === void 0 ? {} : _x,
15283
- _y = _a.classNames,
15284
- classNames = _y === void 0 ? {} : _y,
15285
- _z = _a.colors,
15286
- colors = _z === void 0 ? {} : _z,
15287
- _0 = _a.verbiage,
15288
- verbiage = _0 === void 0 ? {} : _0,
15289
- _1 = _a.captureSignature,
15290
- captureSignature = _1 === void 0 ? false : _1,
15291
- _2 = _a.captureSignatureVideo,
15292
- captureSignatureVideo = _2 === void 0 ? false : _2,
15293
- _3 = _a.captureAdditionalDocuments,
15294
- captureAdditionalDocuments = _3 === void 0 ? [] : _3,
15295
- _4 = _a.geolocationEnabled,
15296
- geolocationEnabled = _4 === void 0 ? true : _4,
15297
- _5 = _a.geolocationRequired,
15298
- geolocationRequired = _5 === void 0 ? false : _5,
15299
- _6 = _a.debugMode,
15300
- debugMode = _6 === void 0 ? false : _6;
15303
+ _q = _a.idDocumentType,
15304
+ idDocumentType = _q === void 0 ? 'idCard' : _q,
15305
+ _r = _a.faceLivenessLoadingOverlayMode,
15306
+ faceLivenessLoadingOverlayMode = _r === void 0 ? 'default' : _r,
15307
+ _s = _a.disableFaceDetectionWhileAudioCapture,
15308
+ disableFaceDetectionWhileAudioCapture = _s === void 0 ? false : _s,
15309
+ _t = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
15310
+ disableFaceDetectionWhileAudioCaptureMsDelay = _t === void 0 ? 2000 : _t,
15311
+ _u = _a.silentFallback,
15312
+ silentFallback = _u === void 0 ? false : _u,
15313
+ _v = _a.mergeAVStreams,
15314
+ mergeAVStreams = _v === void 0 ? false : _v,
15315
+ _w = _a.matchOnly,
15316
+ matchOnly = _w === void 0 ? false : _w,
15317
+ _x = _a.theme,
15318
+ theme = _x === void 0 ? 'default' : _x,
15319
+ _y = _a.assets,
15320
+ assets = _y === void 0 ? {} : _y,
15321
+ _z = _a.classNames,
15322
+ classNames = _z === void 0 ? {} : _z,
15323
+ _0 = _a.colors,
15324
+ colors = _0 === void 0 ? {} : _0,
15325
+ _1 = _a.verbiage,
15326
+ verbiage = _1 === void 0 ? {} : _1,
15327
+ _2 = _a.captureSignature,
15328
+ captureSignature = _2 === void 0 ? false : _2,
15329
+ _3 = _a.captureSignatureVideo,
15330
+ captureSignatureVideo = _3 === void 0 ? false : _3,
15331
+ _4 = _a.captureAdditionalDocuments,
15332
+ captureAdditionalDocuments = _4 === void 0 ? [] : _4,
15333
+ _5 = _a.geolocationEnabled,
15334
+ geolocationEnabled = _5 === void 0 ? true : _5,
15335
+ _6 = _a.geolocationRequired,
15336
+ geolocationRequired = _6 === void 0 ? false : _6,
15337
+ _7 = _a.debugMode,
15338
+ debugMode = _7 === void 0 ? false : _7;
15301
15339
  useLanguage(lang);
15302
15340
  useDebugLogging(debugMode);
15303
15341
  var videoIdCaptureProps = useMemo(function () {
@@ -15318,6 +15356,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15318
15356
  idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
15319
15357
  customOverlayContent: customOverlayContent,
15320
15358
  onLoadingOverlayDismissed: onLoadingOverlayDismissed,
15359
+ idDocumentType: idDocumentType,
15321
15360
  idCaptureGuideType: idCaptureGuideType,
15322
15361
  idCaptureGuideImages: idCaptureGuideImages,
15323
15362
  idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
@@ -15333,7 +15372,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
15333
15372
  verbiage: verbiage,
15334
15373
  debugMode: debugMode
15335
15374
  };
15336
- }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
15375
+ }, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
15337
15376
  var additionalDocumentCaptureProps = useMemo(function () {
15338
15377
  return {
15339
15378
  documents: captureAdditionalDocuments,