idmission-web-sdk 2.2.151 → 2.2.153
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/CompositeWizard.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +2 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts +2 -0
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts +2 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +7 -2
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/camera/useVideoRecorder.d.ts +1 -0
- package/dist/lib/camera/useVideoRecorder.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +166 -116
- 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 +166 -116
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +166 -116
- 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 +1 -1
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.2.
|
|
214
|
+
var webSdkVersion = '2.2.153';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -9831,12 +9831,9 @@
|
|
|
9831
9831
|
}, [preferFrontFacingCamera, preferIphoneContinuityCamera]);
|
|
9832
9832
|
React.useEffect(function () {
|
|
9833
9833
|
var _a;
|
|
9834
|
-
if (
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
var _a;
|
|
9838
|
-
return (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().releaseMicrophoneAccess();
|
|
9839
|
-
};
|
|
9834
|
+
if (requireMicrophoneAccess) {
|
|
9835
|
+
(_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().requestMicrophoneAccess();
|
|
9836
|
+
}
|
|
9840
9837
|
}, [requireMicrophoneAccess]);
|
|
9841
9838
|
React.useEffect(function () {
|
|
9842
9839
|
return function () {
|
|
@@ -22940,18 +22937,25 @@
|
|
|
22940
22937
|
processAudio();
|
|
22941
22938
|
}
|
|
22942
22939
|
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, processAudio]);
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22952
|
-
|
|
22953
|
-
|
|
22954
|
-
|
|
22940
|
+
var clearRecordedData = React.useCallback(function () {
|
|
22941
|
+
videoChunks.current = [];
|
|
22942
|
+
audioChunks.current = [];
|
|
22943
|
+
}, []);
|
|
22944
|
+
return React.useMemo(function () {
|
|
22945
|
+
return {
|
|
22946
|
+
isRecordingVideo: isRecordingVideo,
|
|
22947
|
+
isRecordingAudio: isRecordingAudio,
|
|
22948
|
+
startRecordingVideo: startRecordingVideo,
|
|
22949
|
+
startRecordingAudio: startRecordingAudio,
|
|
22950
|
+
stopRecordingVideo: stopRecordingVideo,
|
|
22951
|
+
stopRecordingAudio: stopRecordingAudio,
|
|
22952
|
+
clearRecordedData: clearRecordedData,
|
|
22953
|
+
videoRecordingUnintentionallyStopped: videoRecordingStopped && !videoRecordingIntentionallyStopped,
|
|
22954
|
+
audioRecordingUnintentionallyStopped: audioRecordingStopped && !audioRecordingIntentionallyStopped,
|
|
22955
|
+
videoUrl: videoUrl,
|
|
22956
|
+
audioUrl: audioUrl
|
|
22957
|
+
};
|
|
22958
|
+
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, audioUrl, clearRecordedData, isRecordingAudio, isRecordingVideo, startRecordingAudio, startRecordingVideo, stopRecordingAudio, stopRecordingVideo, videoRecordingIntentionallyStopped, videoRecordingStopped, videoUrl]);
|
|
22955
22959
|
};
|
|
22956
22960
|
|
|
22957
22961
|
var videoSignatureInitialState = {
|
|
@@ -22961,6 +22965,10 @@
|
|
|
22961
22965
|
stopRecording: function stopRecording() {
|
|
22962
22966
|
return null;
|
|
22963
22967
|
},
|
|
22968
|
+
clearRecordedData: function clearRecordedData() {
|
|
22969
|
+
return null;
|
|
22970
|
+
},
|
|
22971
|
+
isRecording: false,
|
|
22964
22972
|
signatureData: null,
|
|
22965
22973
|
signatureDataUrl: null,
|
|
22966
22974
|
signatureVideoData: null,
|
|
@@ -23004,17 +23012,28 @@
|
|
|
23004
23012
|
startRecordingVideo = _k.startRecordingVideo,
|
|
23005
23013
|
stopRecordingVideo = _k.stopRecordingVideo,
|
|
23006
23014
|
startRecordingAudio = _k.startRecordingAudio,
|
|
23007
|
-
stopRecordingAudio = _k.stopRecordingAudio
|
|
23015
|
+
stopRecordingAudio = _k.stopRecordingAudio,
|
|
23016
|
+
clearRecordedVideoData = _k.clearRecordedData;
|
|
23008
23017
|
var outputCanvas = React.useRef(null);
|
|
23009
23018
|
var recordingLock = React.useRef(false);
|
|
23019
|
+
var onRecordingStopped = React.useRef(function () {});
|
|
23010
23020
|
var _l = React.useState(false),
|
|
23011
23021
|
isRecording = _l[0],
|
|
23012
23022
|
setIsRecording = _l[1];
|
|
23013
23023
|
var startRecording = React.useCallback(function () {
|
|
23014
|
-
setIsRecording(true);
|
|
23024
|
+
return setIsRecording(true);
|
|
23015
23025
|
}, []);
|
|
23016
23026
|
var stopRecording = React.useCallback(function () {
|
|
23027
|
+
return setIsRecording(false);
|
|
23028
|
+
}, []);
|
|
23029
|
+
var clearRecordedData = React.useCallback(function () {
|
|
23030
|
+
var _a;
|
|
23031
|
+
recordingLock.current = false;
|
|
23032
|
+
onRecordingStopped.current = function () {
|
|
23033
|
+
return setIsRecording(true);
|
|
23034
|
+
};
|
|
23017
23035
|
setIsRecording(false);
|
|
23036
|
+
(_a = signatureRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
23018
23037
|
}, []);
|
|
23019
23038
|
React.useEffect(function () {
|
|
23020
23039
|
if (!isRecording) return;
|
|
@@ -23040,6 +23059,8 @@
|
|
|
23040
23059
|
_b.sent();
|
|
23041
23060
|
_b.label = 2;
|
|
23042
23061
|
case 2:
|
|
23062
|
+
recordedChunks.current = [];
|
|
23063
|
+
clearRecordedVideoData();
|
|
23043
23064
|
startRecordingVideo();
|
|
23044
23065
|
if (captureAudio) startRecordingAudio();
|
|
23045
23066
|
stream = outputCanvas.current.captureStream(24 /* fps */);
|
|
@@ -23064,13 +23085,14 @@
|
|
|
23064
23085
|
});
|
|
23065
23086
|
setSignatureVideoData(blob);
|
|
23066
23087
|
setSignatureVideoUrl(URL.createObjectURL(blob));
|
|
23088
|
+
onRecordingStopped.current();
|
|
23067
23089
|
};
|
|
23068
23090
|
return [2 /*return*/];
|
|
23069
23091
|
}
|
|
23070
23092
|
});
|
|
23071
23093
|
});
|
|
23072
23094
|
})();
|
|
23073
|
-
}, [audioStream, captureAudio, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
23095
|
+
}, [audioStream, captureAudio, clearRecordedVideoData, isRecording, startRecordingAudio, startRecordingVideo]);
|
|
23074
23096
|
var animationFrame = React.useRef(0);
|
|
23075
23097
|
React.useEffect(function () {
|
|
23076
23098
|
if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
|
|
@@ -23127,8 +23149,10 @@
|
|
|
23127
23149
|
}, [stopRecordingAudio, stopRecordingVideo]);
|
|
23128
23150
|
var value = React.useMemo(function () {
|
|
23129
23151
|
return {
|
|
23152
|
+
isRecording: isRecording,
|
|
23130
23153
|
startRecording: startRecording,
|
|
23131
23154
|
stopRecording: stopRecording,
|
|
23155
|
+
clearRecordedData: clearRecordedData,
|
|
23132
23156
|
signaturePad: signaturePad,
|
|
23133
23157
|
signatureData: signatureData,
|
|
23134
23158
|
signatureDataUrl: signatureDataUrl,
|
|
@@ -23136,7 +23160,7 @@
|
|
|
23136
23160
|
signatureVideoUrl: signatureVideoUrl,
|
|
23137
23161
|
onAcceptClicked: onAcceptClicked
|
|
23138
23162
|
};
|
|
23139
|
-
}, [onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
23163
|
+
}, [clearRecordedData, isRecording, onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
|
|
23140
23164
|
return /*#__PURE__*/React.createElement(VideoSignatureContext.Provider, {
|
|
23141
23165
|
value: value
|
|
23142
23166
|
}, children, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -23158,6 +23182,7 @@
|
|
|
23158
23182
|
faceGuideStatus = _c === void 0 ? 'success' : _c,
|
|
23159
23183
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
23160
23184
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
23185
|
+
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
23161
23186
|
_d = _a.classNames,
|
|
23162
23187
|
classNames = _d === void 0 ? {} : _d,
|
|
23163
23188
|
_e = _a.verbiage,
|
|
@@ -23219,6 +23244,7 @@
|
|
|
23219
23244
|
var _a, _b;
|
|
23220
23245
|
(_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
23221
23246
|
setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
|
|
23247
|
+
onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
|
|
23222
23248
|
},
|
|
23223
23249
|
disabled: requestedAction === 'VERIFY_LIVENESS',
|
|
23224
23250
|
finished: true
|
|
@@ -23249,30 +23275,32 @@
|
|
|
23249
23275
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
23250
23276
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
23251
23277
|
onExit = _a.onExit,
|
|
23278
|
+
_c = _a.restartVideoOnSignaturePadCleared,
|
|
23279
|
+
restartVideoOnSignaturePadCleared = _c === void 0 ? true : _c,
|
|
23252
23280
|
guidesComponent = _a.guidesComponent,
|
|
23253
|
-
|
|
23254
|
-
classNames =
|
|
23255
|
-
|
|
23256
|
-
colors =
|
|
23257
|
-
|
|
23258
|
-
rawVerbiage =
|
|
23259
|
-
|
|
23260
|
-
debugMode =
|
|
23281
|
+
_d = _a.classNames,
|
|
23282
|
+
classNames = _d === void 0 ? {} : _d,
|
|
23283
|
+
_e = _a.colors,
|
|
23284
|
+
colors = _e === void 0 ? {} : _e,
|
|
23285
|
+
_f = _a.verbiage,
|
|
23286
|
+
rawVerbiage = _f === void 0 ? {} : _f,
|
|
23287
|
+
_g = _a.debugMode,
|
|
23288
|
+
debugMode = _g === void 0 ? false : _g;
|
|
23261
23289
|
var camera = useCameraStore(function (state) {
|
|
23262
23290
|
return state.camera;
|
|
23263
23291
|
});
|
|
23264
23292
|
var onPredictionMade = React.useContext(SelfieGuidanceModelsContext).onPredictionMade;
|
|
23265
|
-
var
|
|
23266
|
-
signatureData =
|
|
23267
|
-
signatureDataUrl =
|
|
23268
|
-
signatureVideoData =
|
|
23269
|
-
startRecording =
|
|
23270
|
-
stopRecording =
|
|
23293
|
+
var _h = useVideoSignatureContext(),
|
|
23294
|
+
signatureData = _h.signatureData,
|
|
23295
|
+
signatureDataUrl = _h.signatureDataUrl,
|
|
23296
|
+
signatureVideoData = _h.signatureVideoData,
|
|
23297
|
+
startRecording = _h.startRecording,
|
|
23298
|
+
stopRecording = _h.stopRecording,
|
|
23299
|
+
clearRecordedData = _h.clearRecordedData,
|
|
23300
|
+
isRecording = _h.isRecording;
|
|
23271
23301
|
React.useEffect(function () {
|
|
23272
23302
|
startRecording();
|
|
23273
|
-
return
|
|
23274
|
-
stopRecording();
|
|
23275
|
-
};
|
|
23303
|
+
return stopRecording;
|
|
23276
23304
|
}, [startRecording, stopRecording]);
|
|
23277
23305
|
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
23278
23306
|
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
@@ -23284,9 +23312,9 @@
|
|
|
23284
23312
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
23285
23313
|
}
|
|
23286
23314
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
23287
|
-
var
|
|
23288
|
-
numFramesWithoutFaces =
|
|
23289
|
-
setNumFramesWithoutFaces =
|
|
23315
|
+
var _j = React.useState(0),
|
|
23316
|
+
numFramesWithoutFaces = _j[0],
|
|
23317
|
+
setNumFramesWithoutFaces = _j[1];
|
|
23290
23318
|
React.useEffect(function () {
|
|
23291
23319
|
onPredictionMade(function (_a) {
|
|
23292
23320
|
var face = _a.face;
|
|
@@ -23311,9 +23339,12 @@
|
|
|
23311
23339
|
"$background": colors.guidanceMessageBackgroundColor,
|
|
23312
23340
|
"$textColor": colors.guidanceMessageTextColor
|
|
23313
23341
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React.createElement(GuidesComponent, {
|
|
23342
|
+
status: "success",
|
|
23314
23343
|
classNames: classNames.videoSignatureGuidesClassNames,
|
|
23315
|
-
|
|
23316
|
-
|
|
23344
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
23345
|
+
return setTimeout(clearRecordedData, 100);
|
|
23346
|
+
} : undefined
|
|
23347
|
+
}), debugMode && ( /*#__PURE__*/React.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.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false')), /*#__PURE__*/React.createElement(ExitCaptureButton, {
|
|
23317
23348
|
onClick: onExit,
|
|
23318
23349
|
className: classNames.exitCaptureBtn
|
|
23319
23350
|
}));
|
|
@@ -23392,37 +23423,30 @@
|
|
|
23392
23423
|
captureAudio = _e === void 0 ? false : _e,
|
|
23393
23424
|
_f = _a.allowSignatureAfterLivenessCheckFailure,
|
|
23394
23425
|
allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
|
|
23426
|
+
_g = _a.restartVideoOnSignaturePadCleared,
|
|
23427
|
+
restartVideoOnSignaturePadCleared = _g === void 0 ? true : _g,
|
|
23395
23428
|
faceLivenessProps = _a.faceLivenessProps,
|
|
23396
|
-
|
|
23397
|
-
assets =
|
|
23398
|
-
|
|
23399
|
-
classNames =
|
|
23400
|
-
|
|
23401
|
-
colors =
|
|
23402
|
-
|
|
23403
|
-
verbiage =
|
|
23404
|
-
|
|
23405
|
-
debugMode =
|
|
23406
|
-
var
|
|
23407
|
-
selfieImage =
|
|
23408
|
-
setSelfieImage =
|
|
23409
|
-
setSignatureData =
|
|
23410
|
-
setSignatureVideoUrl =
|
|
23411
|
-
logSelfieCaptureAttempt =
|
|
23412
|
-
var
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
requestMicrophoneAccess: state.requestMicrophoneAccess,
|
|
23418
|
-
releaseMicrophoneAccess: state.releaseMicrophoneAccess
|
|
23419
|
-
};
|
|
23420
|
-
})),
|
|
23421
|
-
cameraAccessDenied = _o.cameraAccessDenied,
|
|
23422
|
-
requestCameraAccess = _o.requestCameraAccess,
|
|
23423
|
-
releaseCameraAccess = _o.releaseCameraAccess,
|
|
23424
|
-
requestMicrophoneAccess = _o.requestMicrophoneAccess,
|
|
23425
|
-
releaseMicrophoneAccess = _o.releaseMicrophoneAccess;
|
|
23429
|
+
_h = _a.assets,
|
|
23430
|
+
assets = _h === void 0 ? {} : _h,
|
|
23431
|
+
_j = _a.classNames,
|
|
23432
|
+
classNames = _j === void 0 ? {} : _j,
|
|
23433
|
+
_k = _a.colors,
|
|
23434
|
+
colors = _k === void 0 ? {} : _k,
|
|
23435
|
+
_l = _a.verbiage,
|
|
23436
|
+
verbiage = _l === void 0 ? {} : _l,
|
|
23437
|
+
_m = _a.debugMode,
|
|
23438
|
+
debugMode = _m === void 0 ? false : _m;
|
|
23439
|
+
var _o = React.useContext(SubmissionContext),
|
|
23440
|
+
selfieImage = _o.selfieImage,
|
|
23441
|
+
setSelfieImage = _o.setSelfieImage,
|
|
23442
|
+
setSignatureData = _o.setSignatureData,
|
|
23443
|
+
setSignatureVideoUrl = _o.setSignatureVideoUrl,
|
|
23444
|
+
logSelfieCaptureAttempt = _o.logSelfieCaptureAttempt;
|
|
23445
|
+
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
23446
|
+
return {
|
|
23447
|
+
cameraAccessDenied: state.cameraAccessDenied
|
|
23448
|
+
};
|
|
23449
|
+
})).cameraAccessDenied;
|
|
23426
23450
|
var _p = React.useState('CHECKING_LIVENESS'),
|
|
23427
23451
|
captureState = _p[0],
|
|
23428
23452
|
setCaptureState = _p[1];
|
|
@@ -23483,21 +23507,13 @@
|
|
|
23483
23507
|
var _s = React.useState(0),
|
|
23484
23508
|
attempt = _s[0],
|
|
23485
23509
|
setAttempt = _s[1];
|
|
23486
|
-
var
|
|
23487
|
-
|
|
23488
|
-
releaseMicrophoneAccess();
|
|
23510
|
+
var onRetry = React.useCallback(function () {
|
|
23511
|
+
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
23489
23512
|
setAttempt(function (n) {
|
|
23490
23513
|
return n + 1;
|
|
23491
23514
|
});
|
|
23492
23515
|
setCaptureState('CHECKING_LIVENESS');
|
|
23493
|
-
|
|
23494
|
-
void requestCameraAccess();
|
|
23495
|
-
if (captureAudio) void requestMicrophoneAccess();
|
|
23496
|
-
}, [captureAudio, onExitCapture, releaseCameraAccess, releaseMicrophoneAccess, requestCameraAccess, requestMicrophoneAccess]);
|
|
23497
|
-
var onRetry = React.useCallback(function () {
|
|
23498
|
-
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
23499
|
-
onExit();
|
|
23500
|
-
}, [onExit, onRetryClicked]);
|
|
23516
|
+
}, [onRetryClicked]);
|
|
23501
23517
|
var showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, captureState === 'SUCCESS', onComplete);
|
|
23502
23518
|
React.useEffect(function () {
|
|
23503
23519
|
if (cameraAccessDenied) {
|
|
@@ -23507,14 +23523,12 @@
|
|
|
23507
23523
|
setCaptureState('CHECKING_LIVENESS');
|
|
23508
23524
|
}
|
|
23509
23525
|
}, [cameraAccessDenied]);
|
|
23510
|
-
var guidesComponent = React.useCallback(function (
|
|
23511
|
-
|
|
23512
|
-
return /*#__PURE__*/React.createElement(VideoSignatureGuides, {
|
|
23526
|
+
var guidesComponent = React.useCallback(function (props) {
|
|
23527
|
+
return /*#__PURE__*/React.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
23513
23528
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames,
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
|
|
23529
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
23530
|
+
}));
|
|
23531
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames, restartVideoOnSignaturePadCleared]);
|
|
23518
23532
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
23519
23533
|
var onExitAfterFailure = React.useCallback(function (resp, req) {
|
|
23520
23534
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -23540,7 +23554,7 @@
|
|
|
23540
23554
|
key: "face-liveness-".concat(attempt)
|
|
23541
23555
|
}, faceLivenessProps, {
|
|
23542
23556
|
onSuccess: onFaceCaptureSuccess,
|
|
23543
|
-
onExitCapture:
|
|
23557
|
+
onExitCapture: onExitCapture,
|
|
23544
23558
|
onUserCancel: onUserCancel,
|
|
23545
23559
|
onExitAfterFailure: onExitAfterFailure,
|
|
23546
23560
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
@@ -23552,14 +23566,14 @@
|
|
|
23552
23566
|
colors: colors.faceLiveness,
|
|
23553
23567
|
verbiage: verbiage.faceLiveness,
|
|
23554
23568
|
debugMode: debugMode,
|
|
23555
|
-
releaseCameraAccessOnExit: false,
|
|
23556
23569
|
renderCameraFeed: false
|
|
23557
23570
|
}));
|
|
23558
23571
|
case 'CAPTURING_SIGNATURE':
|
|
23559
23572
|
return /*#__PURE__*/React.createElement(VideoSignatureCapture, {
|
|
23560
23573
|
onVideoCaptured: onSignatureCaptureCompleted,
|
|
23561
23574
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
23562
|
-
onExit:
|
|
23575
|
+
onExit: onExitCapture,
|
|
23576
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
23563
23577
|
guidesComponent: guidesComponent,
|
|
23564
23578
|
classNames: classNames,
|
|
23565
23579
|
colors: colors,
|
|
@@ -23581,6 +23595,51 @@
|
|
|
23581
23595
|
}
|
|
23582
23596
|
}()));
|
|
23583
23597
|
};
|
|
23598
|
+
function VideoSignatureWizardGuides(_a) {
|
|
23599
|
+
var status = _a.status,
|
|
23600
|
+
classNames = _a.classNames,
|
|
23601
|
+
_b = _a.restartVideoOnSignaturePadCleared,
|
|
23602
|
+
restartVideoOnSignaturePadCleared = _b === void 0 ? true : _b;
|
|
23603
|
+
var clearRecordedData = useVideoSignatureContext().clearRecordedData;
|
|
23604
|
+
return /*#__PURE__*/React.createElement(VideoSignatureGuides, {
|
|
23605
|
+
classNames: classNames,
|
|
23606
|
+
faceGuideStatus: status,
|
|
23607
|
+
requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
|
|
23608
|
+
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
23609
|
+
return setTimeout(clearRecordedData, 100);
|
|
23610
|
+
} : undefined
|
|
23611
|
+
});
|
|
23612
|
+
}
|
|
23613
|
+
var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
|
|
23614
|
+
var _a = React.useState(0),
|
|
23615
|
+
attempts = _a[0],
|
|
23616
|
+
setAttempts = _a[1];
|
|
23617
|
+
var onRetryClickedProp = props.onRetryClicked;
|
|
23618
|
+
var onRetryClicked = React.useCallback(function () {
|
|
23619
|
+
setAttempts(function (n) {
|
|
23620
|
+
return n + 1;
|
|
23621
|
+
});
|
|
23622
|
+
onRetryClickedProp === null || onRetryClickedProp === void 0 ? void 0 : onRetryClickedProp();
|
|
23623
|
+
}, [onRetryClickedProp]);
|
|
23624
|
+
return /*#__PURE__*/React.createElement(CameraStoreProvider, {
|
|
23625
|
+
key: "camera-store-".concat(attempts),
|
|
23626
|
+
preferIphoneContinuityCamera: false,
|
|
23627
|
+
preferFrontFacingCamera: true,
|
|
23628
|
+
requireMicrophoneAccess: props.captureAudio,
|
|
23629
|
+
maxVideoWidth: 1280,
|
|
23630
|
+
maxFps: 30,
|
|
23631
|
+
onCameraAccessDenied: props.onCameraAccessDenied,
|
|
23632
|
+
onMicrophoneAccessDenied: props.onMicrophoneAccessDenied
|
|
23633
|
+
}, /*#__PURE__*/React.createElement(SelfieGuidanceModelsProvider, {
|
|
23634
|
+
autoStart: false,
|
|
23635
|
+
throttleMs: 250,
|
|
23636
|
+
onModelError: props.onModelError,
|
|
23637
|
+
modelLoadTimeoutMs: props.modelLoadTimeoutMs,
|
|
23638
|
+
requireVerticalFaceCentering: false
|
|
23639
|
+
}, /*#__PURE__*/React.createElement(VideoSignatureWizard, _assign({}, props, {
|
|
23640
|
+
onRetryClicked: onRetryClicked
|
|
23641
|
+
}))));
|
|
23642
|
+
};
|
|
23584
23643
|
|
|
23585
23644
|
var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
23586
23645
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
@@ -24854,23 +24913,11 @@
|
|
|
24854
24913
|
onAccept: onSignatureCaptureSuccess
|
|
24855
24914
|
}));
|
|
24856
24915
|
case 'VideoSignatureCapture':
|
|
24857
|
-
return /*#__PURE__*/React.createElement(
|
|
24858
|
-
|
|
24859
|
-
preferFrontFacingCamera: true,
|
|
24860
|
-
requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
|
|
24861
|
-
maxVideoWidth: 1280,
|
|
24862
|
-
maxFps: 30,
|
|
24916
|
+
return /*#__PURE__*/React.createElement(VideoSignatureWizardWithProviders, _assign({}, videoSignatureCaptureProps, {
|
|
24917
|
+
onComplete: onVideoSignatureComplete,
|
|
24863
24918
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
24864
24919
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied
|
|
24865
|
-
}
|
|
24866
|
-
autoStart: false,
|
|
24867
|
-
throttleMs: 250,
|
|
24868
|
-
onModelError: videoSignatureCaptureProps.onModelError,
|
|
24869
|
-
modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs,
|
|
24870
|
-
requireVerticalFaceCentering: false
|
|
24871
|
-
}, /*#__PURE__*/React.createElement(VideoSignatureWizard, _assign({}, videoSignatureCaptureProps, {
|
|
24872
|
-
onComplete: onVideoSignatureComplete
|
|
24873
|
-
}))));
|
|
24920
|
+
}));
|
|
24874
24921
|
case 'AdditionalDocumentCapture':
|
|
24875
24922
|
return /*#__PURE__*/React.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
|
|
24876
24923
|
documents: documents,
|
|
@@ -27187,16 +27234,18 @@
|
|
|
27187
27234
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
27188
27235
|
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
27189
27236
|
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
27237
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
27238
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
27190
27239
|
faceLivenessProps = _a.faceLivenessProps,
|
|
27191
|
-
|
|
27192
|
-
theme =
|
|
27240
|
+
_j = _a.theme,
|
|
27241
|
+
theme = _j === void 0 ? 'default' : _j,
|
|
27193
27242
|
classNames = _a.classNames,
|
|
27194
27243
|
colors = _a.colors,
|
|
27195
27244
|
verbiage = _a.verbiage,
|
|
27196
27245
|
geolocationEnabled = _a.geolocationEnabled,
|
|
27197
27246
|
geolocationRequired = _a.geolocationRequired,
|
|
27198
|
-
|
|
27199
|
-
debugMode =
|
|
27247
|
+
_k = _a.debugMode,
|
|
27248
|
+
debugMode = _k === void 0 ? false : _k;
|
|
27200
27249
|
useLanguage(lang);
|
|
27201
27250
|
useDebugLogging(debugMode);
|
|
27202
27251
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -27240,6 +27289,7 @@
|
|
|
27240
27289
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
27241
27290
|
faceLivenessProps: faceLivenessProps,
|
|
27242
27291
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
27292
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
27243
27293
|
classNames: classNames,
|
|
27244
27294
|
colors: colors,
|
|
27245
27295
|
debugMode: debugMode,
|
|
@@ -27247,7 +27297,7 @@
|
|
|
27247
27297
|
onModelError: onModelError,
|
|
27248
27298
|
onUserCancel: onUserCancel
|
|
27249
27299
|
};
|
|
27250
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27300
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27251
27301
|
}))));
|
|
27252
27302
|
};
|
|
27253
27303
|
|