idmission-web-sdk 2.2.51 → 2.2.52
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/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/video_id/Action.d.ts +2 -0
- package/dist/components/video_id/Action.d.ts.map +1 -0
- package/dist/components/video_id/IdVideoCapture.d.ts +5 -3
- package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +5 -4
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/lib/locales/es/translation.d.ts +1 -0
- package/dist/lib/locales/es/translation.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +1 -0
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +258 -223
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +258 -223
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +258 -223
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
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.
|
|
206
|
+
var webSdkVersion = '2.2.52';
|
|
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',
|
|
@@ -11716,7 +11717,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11716
11717
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
11717
11718
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
11718
11719
|
idCardCaptureProgress = _a.idCardCaptureProgress,
|
|
11719
|
-
_3 = _a.
|
|
11720
|
+
_3 = _a.idCaptureGuideImages,
|
|
11720
11721
|
userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
|
|
11721
11722
|
_4 = _a.classNames,
|
|
11722
11723
|
classNames = _4 === void 0 ? {} : _4,
|
|
@@ -11728,10 +11729,11 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11728
11729
|
var verbiage = useTranslations(rawVerbiage, {
|
|
11729
11730
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
11730
11731
|
idBackInstructionText: 'Display the back of your ID card...',
|
|
11732
|
+
passportInstructionText: 'Display the ID page of your passport...',
|
|
11731
11733
|
flipIdInstructionText: 'Please flip your ID card...',
|
|
11732
11734
|
verifyLivenessInstructionText: 'Performing facial recognition, please hold still...'
|
|
11733
11735
|
});
|
|
11734
|
-
var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
|
|
11736
|
+
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
11737
|
var theme = useTheme();
|
|
11736
11738
|
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
11739
|
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';
|
|
@@ -11796,7 +11798,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11796
11798
|
className: classNames.idCardGuideImage,
|
|
11797
11799
|
"$isMirrored": !isRearFacing,
|
|
11798
11800
|
style: idCardImageStyle,
|
|
11799
|
-
src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
11801
|
+
src: requestedAction === 'SHOW_PASSPORT' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
11800
11802
|
onLoad: onImageLoaded
|
|
11801
11803
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__default.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
11802
11804
|
idCaptureGuideImages: idCaptureGuideImages,
|
|
@@ -11931,7 +11933,7 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
11931
11933
|
detection: {
|
|
11932
11934
|
idCardFront: 0.4,
|
|
11933
11935
|
idCardBack: 0.5,
|
|
11934
|
-
passport:
|
|
11936
|
+
passport: 0.3
|
|
11935
11937
|
},
|
|
11936
11938
|
focus: {
|
|
11937
11939
|
idCardFront: {
|
|
@@ -11949,7 +11951,8 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
11949
11951
|
},
|
|
11950
11952
|
goodFrames: {
|
|
11951
11953
|
idCardFront: 1,
|
|
11952
|
-
idCardBack: 1
|
|
11954
|
+
idCardBack: 1,
|
|
11955
|
+
passport: 1
|
|
11953
11956
|
},
|
|
11954
11957
|
flipShortcutThreshold: 0.7
|
|
11955
11958
|
};
|
|
@@ -11963,91 +11966,93 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
11963
11966
|
onExitCapture = _a.onExitCapture,
|
|
11964
11967
|
_w = _a.idCaptureModelsEnabled,
|
|
11965
11968
|
idCaptureModelsEnabled = _w === void 0 ? true : _w,
|
|
11966
|
-
_x = _a.
|
|
11967
|
-
|
|
11968
|
-
_y = _a.
|
|
11969
|
-
|
|
11970
|
-
_z = _a.
|
|
11971
|
-
|
|
11972
|
-
_0 = _a.
|
|
11973
|
-
|
|
11974
|
-
_1 = _a.
|
|
11975
|
-
|
|
11969
|
+
_x = _a.idDocumentType,
|
|
11970
|
+
idDocumentType = _x === void 0 ? 'idCard' : _x,
|
|
11971
|
+
_y = _a.idCaptureGuideImages,
|
|
11972
|
+
idCaptureGuideImages = _y === void 0 ? defaultIdCaptureGuideImages : _y,
|
|
11973
|
+
_z = _a.idCardFrontDelay,
|
|
11974
|
+
idCardFrontDelay = _z === void 0 ? 1000 : _z,
|
|
11975
|
+
_0 = _a.videoIdCaptureThresholds,
|
|
11976
|
+
videoIdCaptureThresholds = _0 === void 0 ? defaultVideoIdCaptureThresholds : _0,
|
|
11977
|
+
_1 = _a.skipShowIdCardBack,
|
|
11978
|
+
skipShowIdCardBack = _1 === void 0 ? false : _1,
|
|
11979
|
+
_2 = _a.captureCountdownSeconds,
|
|
11980
|
+
captureCountdownSeconds = _2 === void 0 ? 3 : _2,
|
|
11976
11981
|
readTextPrompt = _a.readTextPrompt,
|
|
11977
|
-
|
|
11978
|
-
readTextTimeoutDurationMs =
|
|
11979
|
-
|
|
11980
|
-
readTextMinReadingMs =
|
|
11981
|
-
|
|
11982
|
-
disableFaceDetectionWhileAudioCapture =
|
|
11983
|
-
|
|
11984
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
11985
|
-
|
|
11986
|
-
mergeAVStreams =
|
|
11987
|
-
|
|
11988
|
-
classNames =
|
|
11989
|
-
|
|
11990
|
-
colors =
|
|
11991
|
-
|
|
11992
|
-
rawVerbiage =
|
|
11993
|
-
|
|
11994
|
-
debugMode =
|
|
11995
|
-
var
|
|
11996
|
-
ref =
|
|
11997
|
-
|
|
11998
|
-
width =
|
|
11999
|
-
|
|
12000
|
-
height =
|
|
12001
|
-
var
|
|
12002
|
-
camera =
|
|
12003
|
-
videoRef =
|
|
12004
|
-
videoLoaded =
|
|
12005
|
-
cameraReady =
|
|
12006
|
-
microphoneReady =
|
|
12007
|
-
audioStream =
|
|
12008
|
-
isRearFacing =
|
|
12009
|
-
releaseCameraAccess =
|
|
12010
|
-
var
|
|
12011
|
-
detectedObjects =
|
|
12012
|
-
setDetectedObjects =
|
|
12013
|
-
var
|
|
12014
|
-
face =
|
|
12015
|
-
setFace =
|
|
12016
|
-
var
|
|
12017
|
-
idModelsReady =
|
|
12018
|
-
startIdModels =
|
|
12019
|
-
stopIdModels =
|
|
12020
|
-
onIdPredictionMade =
|
|
12021
|
-
setThresholds =
|
|
12022
|
-
setDocumentDetectionBoundaries =
|
|
12023
|
-
bestFrameDetails =
|
|
12024
|
-
resetBestFrame =
|
|
12025
|
-
idModelError =
|
|
12026
|
-
var
|
|
12027
|
-
videoStartsAt =
|
|
12028
|
-
setVideoStartsAt =
|
|
12029
|
-
var
|
|
12030
|
-
setIdCaptureVideoAudioStartsAt =
|
|
12031
|
-
setExpectedAudioText =
|
|
12032
|
-
var
|
|
12033
|
-
startSelfieGuidance =
|
|
12034
|
-
stopSelfieGuidance =
|
|
12035
|
-
onSelfiePredictionMade =
|
|
12036
|
-
selfieModelError =
|
|
12037
|
-
var
|
|
12038
|
-
isRecordingVideo =
|
|
12039
|
-
startRecordingVideo =
|
|
12040
|
-
startRecordingAudio =
|
|
12041
|
-
stopRecordingVideo =
|
|
12042
|
-
stopRecordingAudio =
|
|
12043
|
-
videoRecordingUnintentionallyStopped =
|
|
12044
|
-
audioRecordingUnintentionallyStopped =
|
|
12045
|
-
videoUrl =
|
|
12046
|
-
audioUrl =
|
|
11982
|
+
_3 = _a.readTextTimeoutDurationMs,
|
|
11983
|
+
readTextTimeoutDurationMs = _3 === void 0 ? 15000 : _3,
|
|
11984
|
+
_4 = _a.readTextMinReadingMs,
|
|
11985
|
+
readTextMinReadingMs = _4 === void 0 ? 10000 : _4,
|
|
11986
|
+
_5 = _a.disableFaceDetectionWhileAudioCapture,
|
|
11987
|
+
disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
|
|
11988
|
+
_6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
11989
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
|
|
11990
|
+
_7 = _a.mergeAVStreams,
|
|
11991
|
+
mergeAVStreams = _7 === void 0 ? false : _7,
|
|
11992
|
+
_8 = _a.classNames,
|
|
11993
|
+
classNames = _8 === void 0 ? {} : _8,
|
|
11994
|
+
_9 = _a.colors,
|
|
11995
|
+
colors = _9 === void 0 ? {} : _9,
|
|
11996
|
+
_10 = _a.verbiage,
|
|
11997
|
+
rawVerbiage = _10 === void 0 ? {} : _10,
|
|
11998
|
+
_11 = _a.debugMode,
|
|
11999
|
+
debugMode = _11 === void 0 ? false : _11;
|
|
12000
|
+
var _12 = useResizeObserver(),
|
|
12001
|
+
ref = _12.ref,
|
|
12002
|
+
_13 = _12.width,
|
|
12003
|
+
width = _13 === void 0 ? 1 : _13,
|
|
12004
|
+
_14 = _12.height,
|
|
12005
|
+
height = _14 === void 0 ? 1 : _14;
|
|
12006
|
+
var _15 = useCameraStore(),
|
|
12007
|
+
camera = _15.camera,
|
|
12008
|
+
videoRef = _15.videoRef,
|
|
12009
|
+
videoLoaded = _15.videoLoaded,
|
|
12010
|
+
cameraReady = _15.cameraReady,
|
|
12011
|
+
microphoneReady = _15.microphoneReady,
|
|
12012
|
+
audioStream = _15.audioStream,
|
|
12013
|
+
isRearFacing = _15.isRearFacing,
|
|
12014
|
+
releaseCameraAccess = _15.releaseCameraAccess;
|
|
12015
|
+
var _16 = useState([]),
|
|
12016
|
+
detectedObjects = _16[0],
|
|
12017
|
+
setDetectedObjects = _16[1];
|
|
12018
|
+
var _17 = useState(null),
|
|
12019
|
+
face = _17[0],
|
|
12020
|
+
setFace = _17[1];
|
|
12021
|
+
var _18 = useContext(IdCaptureModelsContext),
|
|
12022
|
+
idModelsReady = _18.ready,
|
|
12023
|
+
startIdModels = _18.start,
|
|
12024
|
+
stopIdModels = _18.stop,
|
|
12025
|
+
onIdPredictionMade = _18.onPredictionMade,
|
|
12026
|
+
setThresholds = _18.setThresholds,
|
|
12027
|
+
setDocumentDetectionBoundaries = _18.setDocumentDetectionBoundaries,
|
|
12028
|
+
bestFrameDetails = _18.bestFrameDetails,
|
|
12029
|
+
resetBestFrame = _18.resetBestFrame,
|
|
12030
|
+
idModelError = _18.modelError;
|
|
12031
|
+
var _19 = useState(null),
|
|
12032
|
+
videoStartsAt = _19[0],
|
|
12033
|
+
setVideoStartsAt = _19[1];
|
|
12034
|
+
var _20 = useContext(SubmissionContext),
|
|
12035
|
+
setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
|
|
12036
|
+
setExpectedAudioText = _20.setExpectedAudioText;
|
|
12037
|
+
var _21 = useContext(SelfieGuidanceModelsContext),
|
|
12038
|
+
startSelfieGuidance = _21.start,
|
|
12039
|
+
stopSelfieGuidance = _21.stop,
|
|
12040
|
+
onSelfiePredictionMade = _21.onPredictionMade,
|
|
12041
|
+
selfieModelError = _21.error;
|
|
12042
|
+
var _22 = useVideoRecorder(camera, audioStream, mergeAVStreams),
|
|
12043
|
+
isRecordingVideo = _22.isRecordingVideo,
|
|
12044
|
+
startRecordingVideo = _22.startRecordingVideo,
|
|
12045
|
+
startRecordingAudio = _22.startRecordingAudio,
|
|
12046
|
+
stopRecordingVideo = _22.stopRecordingVideo,
|
|
12047
|
+
stopRecordingAudio = _22.stopRecordingAudio,
|
|
12048
|
+
videoRecordingUnintentionallyStopped = _22.videoRecordingUnintentionallyStopped,
|
|
12049
|
+
audioRecordingUnintentionallyStopped = _22.audioRecordingUnintentionallyStopped,
|
|
12050
|
+
videoUrl = _22.videoUrl,
|
|
12051
|
+
audioUrl = _22.audioUrl;
|
|
12047
12052
|
var countdownTimeoutRef = useRef(undefined);
|
|
12048
|
-
var
|
|
12049
|
-
countdownRemaining =
|
|
12050
|
-
setCountdownRemaining =
|
|
12053
|
+
var _23 = useState(-1),
|
|
12054
|
+
countdownRemaining = _23[0],
|
|
12055
|
+
setCountdownRemaining = _23[1];
|
|
12051
12056
|
useEffect(function () {
|
|
12052
12057
|
if (!isRecordingVideo && !videoUrl) {
|
|
12053
12058
|
startRecordingVideo();
|
|
@@ -12067,9 +12072,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12067
12072
|
onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
|
|
12068
12073
|
}
|
|
12069
12074
|
}, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
|
|
12070
|
-
var
|
|
12071
|
-
requestedAction =
|
|
12072
|
-
setRequestedAction =
|
|
12075
|
+
var _24 = useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
|
|
12076
|
+
requestedAction = _24[0],
|
|
12077
|
+
setRequestedAction = _24[1];
|
|
12073
12078
|
var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
|
|
12074
12079
|
useEffect(function startModelsWhenCapturing() {
|
|
12075
12080
|
if (!shouldRunIdModels) return;
|
|
@@ -12078,9 +12083,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12078
12083
|
return stopIdModels();
|
|
12079
12084
|
};
|
|
12080
12085
|
}, [shouldRunIdModels, startIdModels, stopIdModels]);
|
|
12086
|
+
var adjustedThresholds = useMemo(function () {
|
|
12087
|
+
if (idDocumentType === 'idCard') {
|
|
12088
|
+
return _assign(_assign({}, videoIdCaptureThresholds), {
|
|
12089
|
+
detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
|
|
12090
|
+
passport: 1
|
|
12091
|
+
})
|
|
12092
|
+
});
|
|
12093
|
+
} else {
|
|
12094
|
+
return _assign(_assign({}, videoIdCaptureThresholds), {
|
|
12095
|
+
detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
|
|
12096
|
+
idCardFront: 1,
|
|
12097
|
+
idCardBack: 1
|
|
12098
|
+
})
|
|
12099
|
+
});
|
|
12100
|
+
}
|
|
12101
|
+
}, [idDocumentType, videoIdCaptureThresholds]);
|
|
12081
12102
|
useEffect(function () {
|
|
12082
|
-
setThresholds(
|
|
12083
|
-
}, [requestedAction, setThresholds,
|
|
12103
|
+
setThresholds(adjustedThresholds);
|
|
12104
|
+
}, [requestedAction, setThresholds, adjustedThresholds]);
|
|
12084
12105
|
useEffect(function () {
|
|
12085
12106
|
setDocumentDetectionBoundaries({
|
|
12086
12107
|
top: 20,
|
|
@@ -12089,19 +12110,19 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12089
12110
|
bottom: 0
|
|
12090
12111
|
});
|
|
12091
12112
|
}, [setDocumentDetectionBoundaries]);
|
|
12092
|
-
var
|
|
12093
|
-
currentDetectionScore =
|
|
12094
|
-
setCurrentDetectionScore =
|
|
12095
|
-
var
|
|
12096
|
-
currentDetectedDocumentType =
|
|
12097
|
-
setCurrentDetectedDocumentType =
|
|
12098
|
-
var _26 = useState(0),
|
|
12099
|
-
currentFocusScore = _26[0],
|
|
12100
|
-
setCurrentFocusScore = _26[1];
|
|
12113
|
+
var _25 = useState(0),
|
|
12114
|
+
currentDetectionScore = _25[0],
|
|
12115
|
+
setCurrentDetectionScore = _25[1];
|
|
12116
|
+
var _26 = useState('none'),
|
|
12117
|
+
currentDetectedDocumentType = _26[0],
|
|
12118
|
+
setCurrentDetectedDocumentType = _26[1];
|
|
12101
12119
|
var _27 = useState(0),
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
var
|
|
12120
|
+
currentFocusScore = _27[0],
|
|
12121
|
+
setCurrentFocusScore = _27[1];
|
|
12122
|
+
var _28 = useState(0),
|
|
12123
|
+
goodFramesCount = _28[0],
|
|
12124
|
+
setGoodFramesCount = _28[1];
|
|
12125
|
+
var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
|
|
12105
12126
|
var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
|
|
12106
12127
|
useEffect(function () {
|
|
12107
12128
|
if (!idCaptureModelsEnabled || idModelError) return;
|
|
@@ -12110,9 +12131,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12110
12131
|
setCurrentDetectionScore(prediction.detectionScore);
|
|
12111
12132
|
setCurrentDetectedDocumentType(prediction.detectedDocumentType);
|
|
12112
12133
|
setCurrentFocusScore(prediction.focusScore);
|
|
12113
|
-
var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
12134
|
+
var detectionThresholdMet = requestedAction === 'SHOW_PASSPORT' ? prediction.passportDetectionThresholdMet : requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
12114
12135
|
var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
|
|
12115
|
-
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >=
|
|
12136
|
+
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= adjustedThresholds.flipShortcutThreshold;
|
|
12116
12137
|
if (shouldShortcutFlipAnimation) {
|
|
12117
12138
|
return setRequestedAction('SHOW_ID_BACK');
|
|
12118
12139
|
}
|
|
@@ -12120,16 +12141,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12120
12141
|
return n + 1;
|
|
12121
12142
|
} : 0);
|
|
12122
12143
|
});
|
|
12123
|
-
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction,
|
|
12124
|
-
var
|
|
12125
|
-
idFrontCaptureStartedAt =
|
|
12126
|
-
setFirstGoodFrameTime =
|
|
12144
|
+
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
|
|
12145
|
+
var _29 = useState(null),
|
|
12146
|
+
idFrontCaptureStartedAt = _29[0],
|
|
12147
|
+
setFirstGoodFrameTime = _29[1];
|
|
12127
12148
|
useEffect(function () {
|
|
12128
12149
|
if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
|
|
12129
12150
|
}, [goodFramesCount]);
|
|
12130
|
-
var delaySatisfied =
|
|
12151
|
+
var delaySatisfied = !['SHOW_ID_FRONT', 'SHOW_PASSPORT'].includes(requestedAction) || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
|
|
12131
12152
|
var translatedText = useVerbiage(readTextPrompt, '');
|
|
12132
|
-
var
|
|
12153
|
+
var onIdCaptureComplete = useCallback(function () {
|
|
12133
12154
|
var _a;
|
|
12134
12155
|
if (translatedText) {
|
|
12135
12156
|
setRequestedAction('READ_TEXT');
|
|
@@ -12144,16 +12165,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12144
12165
|
var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
|
|
12145
12166
|
var faceBox = face === null || face === void 0 ? void 0 : face.box;
|
|
12146
12167
|
var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
|
|
12147
|
-
var
|
|
12148
|
-
countdownStartedAt =
|
|
12149
|
-
setCountdownStartedAt =
|
|
12168
|
+
var _30 = useState(),
|
|
12169
|
+
countdownStartedAt = _30[0],
|
|
12170
|
+
setCountdownStartedAt = _30[1];
|
|
12150
12171
|
var photoCanvas = useRef(null);
|
|
12151
12172
|
var frameLock = useRef(false);
|
|
12152
12173
|
var captureFrame = useCallback(function () {
|
|
12153
12174
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
12154
|
-
var frameBase64;
|
|
12155
|
-
return __generator(this, function (
|
|
12156
|
-
switch (
|
|
12175
|
+
var frameBase64, _a;
|
|
12176
|
+
return __generator(this, function (_b) {
|
|
12177
|
+
switch (_b.label) {
|
|
12157
12178
|
case 0:
|
|
12158
12179
|
if (frameLock.current) return [2 /*return*/];
|
|
12159
12180
|
frameLock.current = true;
|
|
@@ -12163,23 +12184,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12163
12184
|
frameLock.current = false;
|
|
12164
12185
|
return [2 /*return*/];
|
|
12165
12186
|
}
|
|
12166
|
-
|
|
12187
|
+
_b.label = 1;
|
|
12167
12188
|
case 1:
|
|
12168
|
-
|
|
12189
|
+
_b.trys.push([1,, 7, 8]);
|
|
12169
12190
|
if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 5];
|
|
12170
12191
|
if (onIdFrontImageCaptured) {
|
|
12171
12192
|
onIdFrontImageCaptured(frameBase64);
|
|
12172
12193
|
}
|
|
12173
12194
|
if (!skipShowIdCardBack) return [3 /*break*/, 4];
|
|
12174
|
-
|
|
12175
|
-
return [
|
|
12176
|
-
case 2:
|
|
12195
|
+
_a = skipShowIdCardBack === true;
|
|
12196
|
+
if (_a) return [3 /*break*/, 3];
|
|
12177
12197
|
return [4 /*yield*/, skipShowIdCardBack()];
|
|
12198
|
+
case 2:
|
|
12199
|
+
_a = _b.sent();
|
|
12200
|
+
_b.label = 3;
|
|
12178
12201
|
case 3:
|
|
12179
|
-
if (_a
|
|
12180
|
-
return [2 /*return*/,
|
|
12202
|
+
if (_a) {
|
|
12203
|
+
return [2 /*return*/, onIdCaptureComplete()];
|
|
12181
12204
|
}
|
|
12182
|
-
|
|
12205
|
+
_b.label = 4;
|
|
12183
12206
|
case 4:
|
|
12184
12207
|
setRequestedAction('FLIP_ID');
|
|
12185
12208
|
return [3 /*break*/, 6];
|
|
@@ -12188,9 +12211,14 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12188
12211
|
if (onIdBackImageCaptured) {
|
|
12189
12212
|
onIdBackImageCaptured(frameBase64);
|
|
12190
12213
|
}
|
|
12191
|
-
|
|
12214
|
+
onIdCaptureComplete();
|
|
12215
|
+
} else if (requestedAction == 'SHOW_PASSPORT') {
|
|
12216
|
+
if (onIdFrontImageCaptured) {
|
|
12217
|
+
onIdFrontImageCaptured(frameBase64);
|
|
12218
|
+
}
|
|
12219
|
+
onIdCaptureComplete();
|
|
12192
12220
|
}
|
|
12193
|
-
|
|
12221
|
+
_b.label = 6;
|
|
12194
12222
|
case 6:
|
|
12195
12223
|
return [3 /*break*/, 8];
|
|
12196
12224
|
case 7:
|
|
@@ -12210,7 +12238,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12210
12238
|
}
|
|
12211
12239
|
});
|
|
12212
12240
|
});
|
|
12213
|
-
}, [
|
|
12241
|
+
}, [onIdCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
|
|
12214
12242
|
var isFlipping = requestedAction === 'FLIP_ID';
|
|
12215
12243
|
useEffect(function () {
|
|
12216
12244
|
if (!isFlipping) return;
|
|
@@ -12269,9 +12297,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12269
12297
|
stopSelfieGuidance();
|
|
12270
12298
|
};
|
|
12271
12299
|
}, [startSelfieGuidance, stopSelfieGuidance]);
|
|
12272
|
-
var
|
|
12273
|
-
numFramesWithoutFaces =
|
|
12274
|
-
setNumFramesWithoutFaces =
|
|
12300
|
+
var _31 = useState(0),
|
|
12301
|
+
numFramesWithoutFaces = _31[0],
|
|
12302
|
+
setNumFramesWithoutFaces = _31[1];
|
|
12275
12303
|
onSelfiePredictionMade(useThrottledCallback(useCallback(function (_a) {
|
|
12276
12304
|
var face = _a.face;
|
|
12277
12305
|
if (selfieModelError) return;
|
|
@@ -12287,12 +12315,12 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12287
12315
|
}
|
|
12288
12316
|
}, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
|
|
12289
12317
|
var theme = useTheme();
|
|
12290
|
-
var
|
|
12318
|
+
var _32 = useTranslations(rawVerbiage, {
|
|
12291
12319
|
faceNotCenteredText: 'Please move your face to the center...',
|
|
12292
12320
|
captureBtnText: 'Capture'
|
|
12293
12321
|
}),
|
|
12294
|
-
captureBtnText =
|
|
12295
|
-
faceNotCenteredText =
|
|
12322
|
+
captureBtnText = _32.captureBtnText,
|
|
12323
|
+
faceNotCenteredText = _32.faceNotCenteredText;
|
|
12296
12324
|
var debugScalingDetails = useDebugScalingDetails({
|
|
12297
12325
|
enabled: debugMode,
|
|
12298
12326
|
pageWidth: width,
|
|
@@ -12300,7 +12328,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12300
12328
|
videoWidth: (_g = (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.videoWidth) !== null && _g !== void 0 ? _g : 0,
|
|
12301
12329
|
videoHeight: (_j = (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.videoHeight) !== null && _j !== void 0 ? _j : 0
|
|
12302
12330
|
});
|
|
12303
|
-
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction);
|
|
12331
|
+
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
12304
12332
|
var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
|
|
12305
12333
|
return /*#__PURE__*/React__default.createElement(PageContainer, {
|
|
12306
12334
|
ref: ref,
|
|
@@ -12321,8 +12349,8 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12321
12349
|
requestedAction: requestedAction,
|
|
12322
12350
|
satisfied: satisfied,
|
|
12323
12351
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
12324
|
-
idCardCaptureProgress:
|
|
12325
|
-
|
|
12352
|
+
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
12353
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12326
12354
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
12327
12355
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
12328
12356
|
}), debugMode && capturingId && ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlayDiv, {
|
|
@@ -12517,49 +12545,51 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12517
12545
|
idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
|
|
12518
12546
|
customOverlayContent = _a.customOverlayContent,
|
|
12519
12547
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
12520
|
-
_u = _a.
|
|
12521
|
-
|
|
12522
|
-
_v = _a.
|
|
12523
|
-
|
|
12524
|
-
_w = _a.
|
|
12525
|
-
|
|
12526
|
-
_x = _a.
|
|
12527
|
-
|
|
12528
|
-
_y = _a.
|
|
12529
|
-
|
|
12530
|
-
_z = _a.
|
|
12531
|
-
|
|
12532
|
-
_0 = _a.
|
|
12533
|
-
|
|
12534
|
-
_1 = _a.
|
|
12535
|
-
|
|
12536
|
-
_2 = _a.
|
|
12537
|
-
|
|
12538
|
-
_3 = _a.
|
|
12539
|
-
|
|
12540
|
-
_4 = _a.
|
|
12541
|
-
|
|
12542
|
-
_5 = _a.
|
|
12543
|
-
|
|
12544
|
-
_6 = _a.
|
|
12545
|
-
|
|
12546
|
-
_7 = _a.
|
|
12547
|
-
|
|
12548
|
-
_8 = _a.
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12548
|
+
_u = _a.idDocumentType,
|
|
12549
|
+
idDocumentType = _u === void 0 ? 'idCard' : _u,
|
|
12550
|
+
_v = _a.idCaptureGuideType,
|
|
12551
|
+
idCaptureGuideType = _v === void 0 ? 'fit' : _v,
|
|
12552
|
+
_w = _a.idCaptureGuideImages,
|
|
12553
|
+
idCaptureGuideImages = _w === void 0 ? defaultIdCaptureGuideImages : _w,
|
|
12554
|
+
_x = _a.idCapturePortraitGuidesOnMobile,
|
|
12555
|
+
idCapturePortraitGuidesOnMobile = _x === void 0 ? true : _x,
|
|
12556
|
+
_y = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12557
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _y === void 0 ? true : _y,
|
|
12558
|
+
_z = _a.idCaptureModelLoadTimeoutMs,
|
|
12559
|
+
idCaptureModelLoadTimeoutMs = _z === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _z,
|
|
12560
|
+
_0 = _a.faceLivenessLoadingOverlayMode,
|
|
12561
|
+
faceLivenessLoadingOverlayMode = _0 === void 0 ? 'default' : _0,
|
|
12562
|
+
_1 = _a.disableFaceDetectionWhileAudioCapture,
|
|
12563
|
+
disableFaceDetectionWhileAudioCapture = _1 === void 0 ? true : _1,
|
|
12564
|
+
_2 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
12565
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _2 === void 0 ? 2000 : _2,
|
|
12566
|
+
_3 = _a.silentFallback,
|
|
12567
|
+
silentFallback = _3 === void 0 ? false : _3,
|
|
12568
|
+
_4 = _a.mergeAVStreams,
|
|
12569
|
+
mergeAVStreams = _4 === void 0 ? false : _4,
|
|
12570
|
+
_5 = _a.assets,
|
|
12571
|
+
assets = _5 === void 0 ? {} : _5,
|
|
12572
|
+
_6 = _a.classNames,
|
|
12573
|
+
classNames = _6 === void 0 ? {} : _6,
|
|
12574
|
+
_7 = _a.colors,
|
|
12575
|
+
colors = _7 === void 0 ? {} : _7,
|
|
12576
|
+
_8 = _a.verbiage,
|
|
12577
|
+
verbiage = _8 === void 0 ? {} : _8,
|
|
12578
|
+
_9 = _a.debugMode,
|
|
12579
|
+
debugMode = _9 === void 0 ? false : _9;
|
|
12580
|
+
var _10 = useContext(SubmissionContext),
|
|
12581
|
+
submissionStatus = _10.submissionStatus,
|
|
12582
|
+
idCaptureVideoUrl = _10.idCaptureVideoUrl,
|
|
12583
|
+
idCaptureVideoAudioUrl = _10.idCaptureVideoAudioUrl,
|
|
12584
|
+
idCaptureVideoIdFrontImage = _10.idCaptureVideoIdFrontImage,
|
|
12585
|
+
idCaptureVideoIdBackImage = _10.idCaptureVideoIdBackImage,
|
|
12586
|
+
setIdCaptureVideoUrl = _10.setIdCaptureVideoUrl,
|
|
12587
|
+
setIdCaptureVideoIdFrontImage = _10.setIdCaptureVideoIdFrontImage,
|
|
12588
|
+
setIdCaptureVideoIdBackImage = _10.setIdCaptureVideoIdBackImage,
|
|
12589
|
+
setIdCaptureVideoAudioUrl = _10.setIdCaptureVideoAudioUrl;
|
|
12590
|
+
var _11 = useState('CAPTURING_ID'),
|
|
12591
|
+
captureState = _11[0],
|
|
12592
|
+
setCaptureState = _11[1];
|
|
12563
12593
|
useEffect(function () {
|
|
12564
12594
|
if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
|
|
12565
12595
|
}, [captureState, skipIdCapture]);
|
|
@@ -12590,9 +12620,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12590
12620
|
var onVideoCaptureFaceNotDetected = useCallback(function () {
|
|
12591
12621
|
setCaptureState('CHECKING_LIVENESS');
|
|
12592
12622
|
}, []);
|
|
12593
|
-
var
|
|
12594
|
-
attempt =
|
|
12595
|
-
setAttempt =
|
|
12623
|
+
var _12 = useState(0),
|
|
12624
|
+
attempt = _12[0],
|
|
12625
|
+
setAttempt = _12[1];
|
|
12596
12626
|
var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
|
|
12597
12627
|
var onFaceCaptureExitAfterFailure = useCallback(function (resp, req) {
|
|
12598
12628
|
userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
|
|
@@ -12627,7 +12657,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12627
12657
|
var _b, _c, _d, _e;
|
|
12628
12658
|
var status = _a.status;
|
|
12629
12659
|
return /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
|
|
12630
|
-
|
|
12660
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12631
12661
|
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
12632
12662
|
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
12633
12663
|
requestedAction: "VERIFY_LIVENESS",
|
|
@@ -12687,6 +12717,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12687
12717
|
guideType: idCaptureGuideType,
|
|
12688
12718
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
12689
12719
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12720
|
+
captureRequirement: idDocumentType,
|
|
12690
12721
|
debugMode: debugMode
|
|
12691
12722
|
}))));
|
|
12692
12723
|
case 'CHECKING_LIVENESS':
|
|
@@ -12723,7 +12754,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12723
12754
|
onRecordingFailed: onRecordingFailed,
|
|
12724
12755
|
onExitCapture: handleExitCapture,
|
|
12725
12756
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
12726
|
-
|
|
12757
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12758
|
+
idDocumentType: idDocumentType,
|
|
12727
12759
|
videoIdCaptureThresholds: videoIdCaptureThresholds,
|
|
12728
12760
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
12729
12761
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
@@ -15264,40 +15296,42 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15264
15296
|
_p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15265
15297
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
|
|
15266
15298
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
15267
|
-
_q = _a.
|
|
15268
|
-
|
|
15269
|
-
_r = _a.
|
|
15270
|
-
|
|
15271
|
-
_s = _a.
|
|
15272
|
-
|
|
15273
|
-
_t = _a.
|
|
15274
|
-
|
|
15275
|
-
_u = _a.
|
|
15276
|
-
|
|
15277
|
-
_v = _a.
|
|
15278
|
-
|
|
15279
|
-
_w = _a.
|
|
15280
|
-
|
|
15281
|
-
_x = _a.
|
|
15282
|
-
|
|
15283
|
-
_y = _a.
|
|
15284
|
-
|
|
15285
|
-
_z = _a.
|
|
15286
|
-
|
|
15287
|
-
_0 = _a.
|
|
15288
|
-
|
|
15289
|
-
_1 = _a.
|
|
15290
|
-
|
|
15291
|
-
_2 = _a.
|
|
15292
|
-
|
|
15293
|
-
_3 = _a.
|
|
15294
|
-
|
|
15295
|
-
_4 = _a.
|
|
15296
|
-
|
|
15297
|
-
_5 = _a.
|
|
15298
|
-
|
|
15299
|
-
_6 = _a.
|
|
15300
|
-
|
|
15299
|
+
_q = _a.idDocumentType,
|
|
15300
|
+
idDocumentType = _q === void 0 ? 'idCard' : _q,
|
|
15301
|
+
_r = _a.faceLivenessLoadingOverlayMode,
|
|
15302
|
+
faceLivenessLoadingOverlayMode = _r === void 0 ? 'default' : _r,
|
|
15303
|
+
_s = _a.disableFaceDetectionWhileAudioCapture,
|
|
15304
|
+
disableFaceDetectionWhileAudioCapture = _s === void 0 ? false : _s,
|
|
15305
|
+
_t = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
15306
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _t === void 0 ? 2000 : _t,
|
|
15307
|
+
_u = _a.silentFallback,
|
|
15308
|
+
silentFallback = _u === void 0 ? false : _u,
|
|
15309
|
+
_v = _a.mergeAVStreams,
|
|
15310
|
+
mergeAVStreams = _v === void 0 ? false : _v,
|
|
15311
|
+
_w = _a.matchOnly,
|
|
15312
|
+
matchOnly = _w === void 0 ? false : _w,
|
|
15313
|
+
_x = _a.theme,
|
|
15314
|
+
theme = _x === void 0 ? 'default' : _x,
|
|
15315
|
+
_y = _a.assets,
|
|
15316
|
+
assets = _y === void 0 ? {} : _y,
|
|
15317
|
+
_z = _a.classNames,
|
|
15318
|
+
classNames = _z === void 0 ? {} : _z,
|
|
15319
|
+
_0 = _a.colors,
|
|
15320
|
+
colors = _0 === void 0 ? {} : _0,
|
|
15321
|
+
_1 = _a.verbiage,
|
|
15322
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
15323
|
+
_2 = _a.captureSignature,
|
|
15324
|
+
captureSignature = _2 === void 0 ? false : _2,
|
|
15325
|
+
_3 = _a.captureSignatureVideo,
|
|
15326
|
+
captureSignatureVideo = _3 === void 0 ? false : _3,
|
|
15327
|
+
_4 = _a.captureAdditionalDocuments,
|
|
15328
|
+
captureAdditionalDocuments = _4 === void 0 ? [] : _4,
|
|
15329
|
+
_5 = _a.geolocationEnabled,
|
|
15330
|
+
geolocationEnabled = _5 === void 0 ? true : _5,
|
|
15331
|
+
_6 = _a.geolocationRequired,
|
|
15332
|
+
geolocationRequired = _6 === void 0 ? false : _6,
|
|
15333
|
+
_7 = _a.debugMode,
|
|
15334
|
+
debugMode = _7 === void 0 ? false : _7;
|
|
15301
15335
|
useLanguage(lang);
|
|
15302
15336
|
useDebugLogging(debugMode);
|
|
15303
15337
|
var videoIdCaptureProps = useMemo(function () {
|
|
@@ -15318,6 +15352,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15318
15352
|
idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15319
15353
|
customOverlayContent: customOverlayContent,
|
|
15320
15354
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15355
|
+
idDocumentType: idDocumentType,
|
|
15321
15356
|
idCaptureGuideType: idCaptureGuideType,
|
|
15322
15357
|
idCaptureGuideImages: idCaptureGuideImages,
|
|
15323
15358
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
@@ -15333,7 +15368,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15333
15368
|
verbiage: verbiage,
|
|
15334
15369
|
debugMode: debugMode
|
|
15335
15370
|
};
|
|
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]);
|
|
15371
|
+
}, [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
15372
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
15338
15373
|
return {
|
|
15339
15374
|
documents: captureAdditionalDocuments,
|