idmission-web-sdk 1.0.182 → 1.0.183

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.
@@ -89,8 +89,12 @@ export interface VideoIdValidationProps extends PropsWithChildren {
89
89
  idCardFrontFocusThreshold?: number;
90
90
  /** Number of good frames of the ID card front that must be captured before moving on during video capture. */
91
91
  goodIdCardFrontFramesThreshold?: number;
92
- /** The duration of time in milliseconds that the user is instructed to show the back of their ID card during video capture. */
93
- showIdCardBackDurationMs?: number;
92
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for the ID card back during video capture. */
93
+ idCardBackDetectionThreshold?: number;
94
+ /** Number between 0 and 1 at which focus guidance score condition is considered to be met for the ID card back during video capture. */
95
+ idCardBackFocusThreshold?: number;
96
+ /** Number of good frames of the ID card back that must be captured before moving on during video capture. */
97
+ goodIdCardBackFramesThreshold?: number;
94
98
  /** An optional text prompt to display on screen for the user to read during video capture after the ID card has been shown. */
95
99
  readTextPrompt?: CustomerSuppliedVerbiage;
96
100
  /** The duration of time in milliseconds that the user is allowed to spend reading the `readTextPrompt`. */
@@ -27,9 +27,11 @@ export type IdVideoCaptureProps = {
27
27
  onIdBackImageCaptured?: (imageUrl: string) => void;
28
28
  onFaceNotDetected?: () => void;
29
29
  idCardFrontDetectionThreshold?: number;
30
+ idCardBackDetectionThreshold?: number;
30
31
  idCardFrontFocusThreshold?: number;
32
+ idCardBackFocusThreshold?: number;
31
33
  goodIdCardFrontFramesThreshold?: number;
32
- showIdCardBackDurationMs?: number;
34
+ goodIdCardBackFramesThreshold?: number;
33
35
  skipShowIdCardBack?: boolean | (() => Promise<boolean>);
34
36
  readTextPrompt?: CustomerSuppliedVerbiage;
35
37
  readTextTimeoutDurationMs?: number;
@@ -39,4 +41,4 @@ export type IdVideoCaptureProps = {
39
41
  verbiage?: IdVideoCaptureVerbiage;
40
42
  debugMode?: boolean;
41
43
  };
42
- export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, skipShowIdCardBack, readTextPrompt, readTextTimeoutDurationMs, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
44
+ export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onFaceNotDetected, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, idCardBackDetectionThreshold, idCardBackFocusThreshold, goodIdCardBackFramesThreshold, skipShowIdCardBack, readTextPrompt, readTextTimeoutDurationMs, assets, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
@@ -37,9 +37,11 @@ export type VideoIdWizardProps = {
37
37
  idCaptureProps?: IdCaptureWizardProps;
38
38
  faceLivenessProps?: FaceLivenessWizardProps;
39
39
  idCardFrontDetectionThreshold?: number;
40
+ idCardBackDetectionThreshold?: number;
40
41
  idCardFrontFocusThreshold?: number;
42
+ idCardBackFocusThreshold?: number;
41
43
  goodIdCardFrontFramesThreshold?: number;
42
- showIdCardBackDurationMs?: number;
44
+ goodIdCardBackFramesThreshold?: number;
43
45
  readTextPrompt?: CustomerSuppliedVerbiage;
44
46
  readTextTimeoutDurationMs?: number;
45
47
  skipSuccessScreen?: boolean | (() => Promise<boolean>);
@@ -53,4 +55,4 @@ export type VideoIdWizardProps = {
53
55
  verbiage?: VideoIdWizardVerbiage;
54
56
  debugMode?: boolean;
55
57
  };
56
- export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, goodIdCardFrontFramesThreshold, showIdCardBackDurationMs, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
58
+ export declare const VideoIdWizard: ({ onComplete, onExitCapture, onExitAfterFailure, onUserCancel, idCaptureProps, faceLivenessProps, idCardFrontDetectionThreshold, idCardBackDetectionThreshold, idCardFrontFocusThreshold, idCardBackFocusThreshold, goodIdCardFrontFramesThreshold, goodIdCardBackFramesThreshold, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, idCaptureGuideType, idCapturePortraitGuidesOnMobile, assets, classNames, colors, verbiage, debugMode, }: VideoIdWizardProps) => ReactElement;
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.182';
51
+ var webSdkVersion = '1.0.183';
52
52
 
53
53
  function getPlatform() {
54
54
  if (typeof window === 'undefined') return;
@@ -8853,6 +8853,9 @@ var IdCaptureModelsProvider = function IdCaptureModelsProvider(_a) {
8853
8853
  var resetBestFrame = React.useCallback(function () {
8854
8854
  bestFocusScore.current = 0;
8855
8855
  clearCanvas(bestPredictionCanvas.current);
8856
+ setBestFrameBoundingBox([]);
8857
+ setBestFrameDetectionScore(0);
8858
+ setBestFrameFocusScore(0);
8856
8859
  }, []);
8857
8860
  var value = React.useMemo(function () {
8858
8861
  return {
@@ -9658,7 +9661,7 @@ var esTranslation = {
9658
9661
  'Document Capture': 'Captura de documento',
9659
9662
  Capture: 'Capturar',
9660
9663
  'Retry capture': 'Reintentar la captura',
9661
- Upload: 'Adjuntar',
9664
+ Upload: 'Enviar',
9662
9665
  'Uploading...': 'Procesando...',
9663
9666
  'Upload succeeded!': 'Proceso completo!',
9664
9667
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
@@ -14017,59 +14020,64 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14017
14020
  onIdBackImageCaptured = _a.onIdBackImageCaptured,
14018
14021
  onFaceNotDetected = _a.onFaceNotDetected,
14019
14022
  _j = _a.idCardFrontDetectionThreshold,
14020
- idCardFrontDetectionThreshold = _j === void 0 ? 0.48 : _j,
14023
+ idCardFrontDetectionThreshold = _j === void 0 ? 0.6 : _j,
14021
14024
  _k = _a.idCardFrontFocusThreshold,
14022
14025
  idCardFrontFocusThreshold = _k === void 0 ? 0 : _k,
14023
14026
  _l = _a.goodIdCardFrontFramesThreshold,
14024
14027
  goodIdCardFrontFramesThreshold = _l === void 0 ? 3 : _l,
14025
- _m = _a.showIdCardBackDurationMs,
14026
- showIdCardBackDurationMs = _m === void 0 ? 5000 : _m,
14027
- _o = _a.skipShowIdCardBack,
14028
- skipShowIdCardBack = _o === void 0 ? false : _o,
14028
+ _m = _a.idCardBackDetectionThreshold,
14029
+ idCardBackDetectionThreshold = _m === void 0 ? 0.6 : _m,
14030
+ _o = _a.idCardBackFocusThreshold,
14031
+ idCardBackFocusThreshold = _o === void 0 ? 0 : _o,
14032
+ _p = _a.goodIdCardBackFramesThreshold,
14033
+ goodIdCardBackFramesThreshold = _p === void 0 ? 3 : _p,
14034
+ _q = _a.skipShowIdCardBack,
14035
+ skipShowIdCardBack = _q === void 0 ? false : _q,
14029
14036
  readTextPrompt = _a.readTextPrompt,
14030
- _p = _a.readTextTimeoutDurationMs,
14031
- readTextTimeoutDurationMs = _p === void 0 ? 15000 : _p,
14032
- _q = _a.assets,
14033
- assets = _q === void 0 ? {} : _q,
14034
- _r = _a.classNames,
14035
- classNames = _r === void 0 ? {} : _r,
14036
- _s = _a.colors,
14037
- colors = _s === void 0 ? {} : _s,
14038
- _t = _a.verbiage,
14039
- rawVerbiage = _t === void 0 ? {} : _t,
14040
- _u = _a.debugMode,
14041
- debugMode = _u === void 0 ? false : _u;
14042
- var _v = useResizeObserver__default['default'](),
14043
- ref = _v.ref,
14044
- _w = _v.width,
14045
- width = _w === void 0 ? 1 : _w,
14046
- _x = _v.height,
14047
- height = _x === void 0 ? 1 : _x;
14048
- var _y = React.useContext(CameraStateContext),
14049
- cameraRef = _y.cameraRef,
14050
- videoRef = _y.videoRef,
14051
- videoLoaded = _y.videoLoaded,
14052
- cameraReady = _y.cameraReady;
14053
- var _z = React.useState([]),
14054
- detectedObjects = _z[0],
14055
- setDetectedObjects = _z[1];
14056
- var _0 = React.useState([]),
14057
- faces = _0[0],
14058
- setFaces = _0[1];
14059
- var _1 = React.useContext(IdCaptureModelsContext),
14060
- idModelsReady = _1.ready,
14061
- idModelsWorking = _1.working,
14062
- makeIdPrediction = _1.makePrediction,
14063
- onIdPredictionMade = _1.onPredictionMade,
14064
- setThresholds = _1.setThresholds,
14065
- bestFrameDetectionScore = _1.bestFrameDetectionScore,
14066
- bestFrameFocusScore = _1.bestFrameFocusScore;
14037
+ _r = _a.readTextTimeoutDurationMs,
14038
+ readTextTimeoutDurationMs = _r === void 0 ? 15000 : _r,
14039
+ _s = _a.assets,
14040
+ assets = _s === void 0 ? {} : _s,
14041
+ _t = _a.classNames,
14042
+ classNames = _t === void 0 ? {} : _t,
14043
+ _u = _a.colors,
14044
+ colors = _u === void 0 ? {} : _u,
14045
+ _v = _a.verbiage,
14046
+ rawVerbiage = _v === void 0 ? {} : _v,
14047
+ _w = _a.debugMode,
14048
+ debugMode = _w === void 0 ? false : _w;
14049
+ var _x = useResizeObserver__default['default'](),
14050
+ ref = _x.ref,
14051
+ _y = _x.width,
14052
+ width = _y === void 0 ? 1 : _y,
14053
+ _z = _x.height,
14054
+ height = _z === void 0 ? 1 : _z;
14055
+ var _0 = React.useContext(CameraStateContext),
14056
+ cameraRef = _0.cameraRef,
14057
+ videoRef = _0.videoRef,
14058
+ videoLoaded = _0.videoLoaded,
14059
+ cameraReady = _0.cameraReady;
14060
+ var _1 = React.useState([]),
14061
+ detectedObjects = _1[0],
14062
+ setDetectedObjects = _1[1];
14063
+ var _2 = React.useState([]),
14064
+ faces = _2[0],
14065
+ setFaces = _2[1];
14066
+ var _3 = React.useContext(IdCaptureModelsContext),
14067
+ idModelsReady = _3.ready,
14068
+ idModelsWorking = _3.working,
14069
+ makeIdPrediction = _3.makePrediction,
14070
+ onIdPredictionMade = _3.onPredictionMade,
14071
+ setThresholds = _3.setThresholds,
14072
+ bestFrameDetectionScore = _3.bestFrameDetectionScore,
14073
+ bestFrameFocusScore = _3.bestFrameFocusScore,
14074
+ resetBestFrame = _3.resetBestFrame;
14067
14075
  var onSelfiePredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
14068
- var _2 = useVideoRecorder(cameraRef.current),
14069
- isRecording = _2.isRecording,
14070
- startRecording = _2.startRecording,
14071
- stopRecording = _2.stopRecording,
14072
- videoUrl = _2.videoUrl;
14076
+ var _4 = useVideoRecorder(cameraRef.current),
14077
+ isRecording = _4.isRecording,
14078
+ startRecording = _4.startRecording,
14079
+ stopRecording = _4.stopRecording,
14080
+ videoUrl = _4.videoUrl;
14073
14081
  React.useEffect(function () {
14074
14082
  if (!isRecording && !videoUrl) startRecording();
14075
14083
  if (videoUrl) onComplete === null || onComplete === void 0 ? void 0 : onComplete(videoUrl);
@@ -14079,11 +14087,11 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14079
14087
  React.useEffect(function () {
14080
14088
  shouldCaptureFrames.current = videoLoaded && cameraReady && idModelsReady;
14081
14089
  }, [cameraReady, idModelsReady, videoLoaded]);
14082
- var _3 = React.useState('SHOW_ID_FRONT'),
14083
- requestedAction = _3[0],
14084
- setRequestedAction = _3[1];
14090
+ var _5 = React.useState('SHOW_ID_FRONT'),
14091
+ requestedAction = _5[0],
14092
+ setRequestedAction = _5[1];
14085
14093
  React.useEffect(function () {
14086
- if (requestedAction !== 'SHOW_ID_FRONT') return;
14094
+ if (requestedAction !== 'SHOW_ID_FRONT' && requestedAction !== 'SHOW_ID_BACK') return;
14087
14095
  if (!idModelsReady || !cameraReady || !videoLoaded) return;
14088
14096
  animationFrame.current = requestAnimationFrame(function runFrame() {
14089
14097
  return tslib.__awaiter(this, void 0, void 0, function () {
@@ -14102,23 +14110,24 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14102
14110
  }, [cameraReady, idModelsReady, idModelsWorking, makeIdPrediction, requestedAction, videoLoaded, videoRef]);
14103
14111
  React.useEffect(function () {
14104
14112
  setThresholds({
14105
- document: idCardFrontDetectionThreshold,
14113
+ document: requestedAction === 'SHOW_ID_FRONT' ? idCardFrontDetectionThreshold : requestedAction === 'SHOW_ID_BACK' ? idCardBackDetectionThreshold : 1,
14106
14114
  passport: 1,
14107
14115
  focus: {
14108
- mobile: idCardFrontFocusThreshold
14116
+ mobile: requestedAction === 'SHOW_ID_FRONT' ? idCardFrontFocusThreshold : requestedAction === 'SHOW_ID_BACK' ? idCardBackFocusThreshold : 0
14109
14117
  }
14110
14118
  });
14111
- }, [idCardFrontDetectionThreshold, idCardFrontFocusThreshold, setThresholds]);
14112
- var _4 = React.useState(0),
14113
- currentDetectionScore = _4[0],
14114
- setCurrentDetectionScore = _4[1];
14115
- var _5 = React.useState(0),
14116
- currentFocusScore = _5[0],
14117
- setCurrentFocusScore = _5[1];
14119
+ }, [idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, requestedAction, setThresholds]);
14118
14120
  var _6 = React.useState(0),
14119
- goodIdCardFrontFramesCount = _6[0],
14120
- setGoodFramesCount = _6[1];
14121
- var goodFramesThresholdMet = goodIdCardFrontFramesCount >= goodIdCardFrontFramesThreshold;
14121
+ currentDetectionScore = _6[0],
14122
+ setCurrentDetectionScore = _6[1];
14123
+ var _7 = React.useState(0),
14124
+ currentFocusScore = _7[0],
14125
+ setCurrentFocusScore = _7[1];
14126
+ var _8 = React.useState(0),
14127
+ goodFramesCount = _8[0],
14128
+ setGoodFramesCount = _8[1];
14129
+ var goodFramesThreshold = requestedAction === 'SHOW_ID_FRONT' ? goodIdCardFrontFramesThreshold : goodIdCardBackFramesThreshold;
14130
+ var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
14122
14131
  React.useEffect(function () {
14123
14132
  onIdPredictionMade(function (prediction) {
14124
14133
  setDetectedObjects(prediction.detectedObjects);
@@ -14151,15 +14160,18 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14151
14160
  React.useEffect(function () {
14152
14161
  (function () {
14153
14162
  return tslib.__awaiter(void 0, void 0, void 0, function () {
14154
- var frame;
14163
+ var frame, frame;
14155
14164
  return tslib.__generator(this, function (_a) {
14156
14165
  switch (_a.label) {
14157
14166
  case 0:
14158
- if (!(goodFramesThresholdMet && requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 4];
14167
+ if (!goodFramesThresholdMet) return [3 /*break*/, 5];
14168
+ setCurrentDetectionScore(0);
14169
+ setCurrentFocusScore(0);
14170
+ setGoodFramesCount(0);
14171
+ resetBestFrame();
14172
+ if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 4];
14159
14173
  if (onIdFrontImageCaptured) {
14160
- console.log('capturing front frame!');
14161
14174
  frame = captureFrame();
14162
- console.log(frame);
14163
14175
  frame && onIdFrontImageCaptured(frame);
14164
14176
  }
14165
14177
  if (!skipShowIdCardBack) return [3 /*break*/, 3];
@@ -14176,31 +14188,31 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14176
14188
  setRequestedAction('FLIP_ID');
14177
14189
  setTimeout(function () {
14178
14190
  setRequestedAction('SHOW_ID_BACK');
14179
- setTimeout(function () {
14180
- if (onIdBackImageCaptured) {
14181
- console.log('capturing rear frame!');
14182
- var frame = captureFrame();
14183
- console.log(frame);
14184
- frame && onIdBackImageCaptured(frame);
14185
- }
14186
- }, showIdCardBackDurationMs - 1000);
14187
14191
  }, 3500);
14188
- _a.label = 4;
14192
+ return [3 /*break*/, 5];
14189
14193
  case 4:
14194
+ if (requestedAction == 'SHOW_ID_BACK') {
14195
+ if (onIdBackImageCaptured) {
14196
+ frame = captureFrame();
14197
+ frame && onIdBackImageCaptured(frame);
14198
+ }
14199
+ onIdBackCaptureComplete();
14200
+ }
14201
+ _a.label = 5;
14202
+ case 5:
14190
14203
  return [2 /*return*/];
14191
14204
  }
14192
14205
  });
14193
14206
  });
14194
14207
  })();
14195
- }, [captureFrame, goodFramesThresholdMet, onIdBackCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, showIdCardBackDurationMs, skipShowIdCardBack]);
14196
- useTimeout(showIdCardBackDurationMs, onIdBackCaptureComplete, requestedAction !== 'SHOW_ID_BACK', false, requestedAction === 'SHOW_ID_BACK');
14208
+ }, [captureFrame, goodFramesThresholdMet, onIdBackCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack]);
14197
14209
  var onReadTextTimeout = React.useCallback(function () {
14198
14210
  stopRecording();
14199
14211
  }, [stopRecording]);
14200
14212
  var timeoutStartedAt = useTimeout(readTextTimeoutDurationMs, onReadTextTimeout, requestedAction !== 'READ_TEXT', false, requestedAction === 'READ_TEXT').timeoutStartedAt;
14201
- var _7 = React.useState(0),
14202
- numFramesWithoutFaces = _7[0],
14203
- setNumFramesWithoutFaces = _7[1];
14213
+ var _9 = React.useState(0),
14214
+ numFramesWithoutFaces = _9[0],
14215
+ setNumFramesWithoutFaces = _9[1];
14204
14216
  React.useEffect(function () {
14205
14217
  onSelfiePredictionMade(function (faces) {
14206
14218
  setFaces(faces);
@@ -14223,7 +14235,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14223
14235
  videoWidth: (_c = (_b = videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) !== null && _c !== void 0 ? _c : 0,
14224
14236
  videoHeight: (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0
14225
14237
  });
14226
- var satisfied = requestedAction === 'SHOW_ID_BACK' || goodIdCardFrontFramesCount > 0;
14238
+ var satisfied = goodFramesCount > 0;
14227
14239
  return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
14228
14240
  ref: ref,
14229
14241
  className: "flex ".concat((_f = classNames.container) !== null && _f !== void 0 ? _f : '')
@@ -14243,7 +14255,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14243
14255
  verbiage: rawVerbiage.guides,
14244
14256
  requestedAction: requestedAction,
14245
14257
  borderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
14246
- }), debugMode && requestedAction === 'SHOW_ID_FRONT' && ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlayDiv, {
14258
+ }), debugMode && ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction) && ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlayDiv, {
14247
14259
  "$flipX": !((_g = cameraRef.current) === null || _g === void 0 ? void 0 : _g.isRearFacing)
14248
14260
  }, detectedObjects.map(function (obj, i) {
14249
14261
  var _a;
@@ -14264,7 +14276,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
14264
14276
  scaling: debugScalingDetails,
14265
14277
  flipX: !((_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.isRearFacing)
14266
14278
  });
14267
- })))))), debugMode && ( /*#__PURE__*/React__default['default'].createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default['default'].createElement("br", null), isRecording ? '✅ Recording' : '❌ Not recording', /*#__PURE__*/React__default['default'].createElement("br", null), goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', goodIdCardFrontFramesCount, "/", goodIdCardFrontFramesThreshold, /*#__PURE__*/React__default['default'].createElement("br", null), "Detection Score: ", currentDetectionScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Focus Score: ", currentFocusScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Best Frame Detection Score: ", bestFrameDetectionScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Best Frame Focus Score: ", bestFrameFocusScore)));
14279
+ })))))), debugMode && ( /*#__PURE__*/React__default['default'].createElement(DebugStatsPane, null, cameraRef.current ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u2705 Camera: ", cameraRef.current.label, " (", cameraRef.current.width, "x", cameraRef.current.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__default['default'].createElement("br", null), isRecording ? '✅ Recording' : '❌ Not recording', /*#__PURE__*/React__default['default'].createElement("br", null), goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', goodFramesCount, "/", goodFramesThreshold, /*#__PURE__*/React__default['default'].createElement("br", null), "Detection Score: ", currentDetectionScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Focus Score: ", currentFocusScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Best Frame Detection Score: ", bestFrameDetectionScore, /*#__PURE__*/React__default['default'].createElement("br", null), "Best Frame Focus Score: ", bestFrameFocusScore)));
14268
14280
  };
14269
14281
 
14270
14282
  var IdVideoCaptureSuccess = function IdVideoCaptureSuccess(_a) {
@@ -14327,9 +14339,11 @@ var VideoIdWizard = function VideoIdWizard(_a) {
14327
14339
  _g = _a.faceLivenessProps,
14328
14340
  faceLivenessProps = _g === void 0 ? {} : _g,
14329
14341
  idCardFrontDetectionThreshold = _a.idCardFrontDetectionThreshold,
14342
+ idCardBackDetectionThreshold = _a.idCardBackDetectionThreshold,
14330
14343
  idCardFrontFocusThreshold = _a.idCardFrontFocusThreshold,
14344
+ idCardBackFocusThreshold = _a.idCardBackFocusThreshold,
14331
14345
  goodIdCardFrontFramesThreshold = _a.goodIdCardFrontFramesThreshold,
14332
- showIdCardBackDurationMs = _a.showIdCardBackDurationMs,
14346
+ goodIdCardBackFramesThreshold = _a.goodIdCardBackFramesThreshold,
14333
14347
  readTextPrompt = _a.readTextPrompt,
14334
14348
  readTextTimeoutDurationMs = _a.readTextTimeoutDurationMs,
14335
14349
  _h = _a.skipIdCapture,
@@ -14468,9 +14482,11 @@ var VideoIdWizard = function VideoIdWizard(_a) {
14468
14482
  onIdBackImageCaptured: setIdCaptureVideoIdBackImage,
14469
14483
  onFaceNotDetected: onVideoCaptureFaceNotDetected,
14470
14484
  idCardFrontDetectionThreshold: idCardFrontDetectionThreshold,
14485
+ idCardBackDetectionThreshold: idCardBackDetectionThreshold,
14471
14486
  idCardFrontFocusThreshold: idCardFrontFocusThreshold,
14487
+ idCardBackFocusThreshold: idCardBackFocusThreshold,
14472
14488
  goodIdCardFrontFramesThreshold: goodIdCardFrontFramesThreshold,
14473
- showIdCardBackDurationMs: showIdCardBackDurationMs,
14489
+ goodIdCardBackFramesThreshold: goodIdCardBackFramesThreshold,
14474
14490
  skipShowIdCardBack: skipShowIdCardBack,
14475
14491
  readTextPrompt: readTextPrompt,
14476
14492
  readTextTimeoutDurationMs: readTextTimeoutDurationMs,
@@ -16591,48 +16607,52 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16591
16607
  idCaptureProps = _a.idCaptureProps,
16592
16608
  faceLivenessProps = _a.faceLivenessProps,
16593
16609
  _c = _a.idCardFrontDetectionThreshold,
16594
- idCardFrontDetectionThreshold = _c === void 0 ? 0.48 : _c,
16610
+ idCardFrontDetectionThreshold = _c === void 0 ? 0.6 : _c,
16595
16611
  _d = _a.idCardFrontFocusThreshold,
16596
16612
  idCardFrontFocusThreshold = _d === void 0 ? 0 : _d,
16597
16613
  _e = _a.goodIdCardFrontFramesThreshold,
16598
16614
  goodIdCardFrontFramesThreshold = _e === void 0 ? 3 : _e,
16599
- _f = _a.showIdCardBackDurationMs,
16600
- showIdCardBackDurationMs = _f === void 0 ? 5000 : _f,
16615
+ _f = _a.idCardBackDetectionThreshold,
16616
+ idCardBackDetectionThreshold = _f === void 0 ? 0.6 : _f,
16617
+ _g = _a.idCardBackFocusThreshold,
16618
+ idCardBackFocusThreshold = _g === void 0 ? 0 : _g,
16619
+ _h = _a.goodIdCardBackFramesThreshold,
16620
+ goodIdCardBackFramesThreshold = _h === void 0 ? 3 : _h,
16601
16621
  readTextPrompt = _a.readTextPrompt,
16602
- _g = _a.readTextTimeoutDurationMs,
16603
- readTextTimeoutDurationMs = _g === void 0 ? 15000 : _g,
16604
- _h = _a.skipSuccessScreen,
16605
- skipSuccessScreen = _h === void 0 ? false : _h,
16606
- _j = _a.skipIdCapture,
16607
- skipIdCapture = _j === void 0 ? false : _j,
16608
- _k = _a.skipShowIdCardBack,
16609
- skipShowIdCardBack = _k === void 0 ? false : _k,
16610
- _l = _a.idCaptureGuideType,
16611
- idCaptureGuideType = _l === void 0 ? 'fit' : _l,
16612
- _m = _a.idCapturePortraitGuidesOnMobile,
16613
- idCapturePortraitGuidesOnMobile = _m === void 0 ? false : _m,
16614
- _o = _a.theme,
16615
- theme = _o === void 0 ? 'default' : _o,
16616
- _p = _a.assets,
16617
- assets = _p === void 0 ? {} : _p,
16618
- _q = _a.classNames,
16619
- classNames = _q === void 0 ? {} : _q,
16620
- _r = _a.colors,
16621
- colors = _r === void 0 ? {} : _r,
16622
- _s = _a.verbiage,
16623
- verbiage = _s === void 0 ? {} : _s,
16624
- _t = _a.captureSignature,
16625
- captureSignature = _t === void 0 ? false : _t,
16626
- _u = _a.captureSignatureVideo,
16627
- captureSignatureVideo = _u === void 0 ? false : _u,
16628
- _v = _a.captureAdditionalDocuments,
16629
- captureAdditionalDocuments = _v === void 0 ? [] : _v,
16630
- _w = _a.geolocationEnabled,
16631
- geolocationEnabled = _w === void 0 ? true : _w,
16632
- _x = _a.geolocationRequired,
16633
- geolocationRequired = _x === void 0 ? false : _x,
16634
- _y = _a.debugMode,
16635
- debugMode = _y === void 0 ? false : _y;
16622
+ _j = _a.readTextTimeoutDurationMs,
16623
+ readTextTimeoutDurationMs = _j === void 0 ? 15000 : _j,
16624
+ _k = _a.skipSuccessScreen,
16625
+ skipSuccessScreen = _k === void 0 ? false : _k,
16626
+ _l = _a.skipIdCapture,
16627
+ skipIdCapture = _l === void 0 ? false : _l,
16628
+ _m = _a.skipShowIdCardBack,
16629
+ skipShowIdCardBack = _m === void 0 ? false : _m,
16630
+ _o = _a.idCaptureGuideType,
16631
+ idCaptureGuideType = _o === void 0 ? 'fit' : _o,
16632
+ _p = _a.idCapturePortraitGuidesOnMobile,
16633
+ idCapturePortraitGuidesOnMobile = _p === void 0 ? false : _p,
16634
+ _q = _a.theme,
16635
+ theme = _q === void 0 ? 'default' : _q,
16636
+ _r = _a.assets,
16637
+ assets = _r === void 0 ? {} : _r,
16638
+ _s = _a.classNames,
16639
+ classNames = _s === void 0 ? {} : _s,
16640
+ _t = _a.colors,
16641
+ colors = _t === void 0 ? {} : _t,
16642
+ _u = _a.verbiage,
16643
+ verbiage = _u === void 0 ? {} : _u,
16644
+ _v = _a.captureSignature,
16645
+ captureSignature = _v === void 0 ? false : _v,
16646
+ _w = _a.captureSignatureVideo,
16647
+ captureSignatureVideo = _w === void 0 ? false : _w,
16648
+ _x = _a.captureAdditionalDocuments,
16649
+ captureAdditionalDocuments = _x === void 0 ? [] : _x,
16650
+ _y = _a.geolocationEnabled,
16651
+ geolocationEnabled = _y === void 0 ? true : _y,
16652
+ _z = _a.geolocationRequired,
16653
+ geolocationRequired = _z === void 0 ? false : _z,
16654
+ _0 = _a.debugMode,
16655
+ debugMode = _0 === void 0 ? false : _0;
16636
16656
  useLanguage(lang);
16637
16657
  var videoIdCaptureProps = React.useMemo(function () {
16638
16658
  return {
@@ -16641,7 +16661,9 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16641
16661
  idCardFrontDetectionThreshold: idCardFrontDetectionThreshold,
16642
16662
  idCardFrontFocusThreshold: idCardFrontFocusThreshold,
16643
16663
  goodIdCardFrontFramesThreshold: goodIdCardFrontFramesThreshold,
16644
- showIdCardBackDurationMs: showIdCardBackDurationMs,
16664
+ idCardBackDetectionThreshold: idCardBackDetectionThreshold,
16665
+ idCardBackFocusThreshold: idCardBackFocusThreshold,
16666
+ goodIdCardBackFramesThreshold: goodIdCardBackFramesThreshold,
16645
16667
  readTextPrompt: readTextPrompt,
16646
16668
  readTextTimeoutDurationMs: readTextTimeoutDurationMs,
16647
16669
  onExitCapture: onExitCapture,
@@ -16658,7 +16680,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
16658
16680
  verbiage: verbiage,
16659
16681
  debugMode: debugMode
16660
16682
  };
16661
- }, [assets, classNames, colors, debugMode, faceLivenessProps, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureProps, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, showIdCardBackDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
16683
+ }, [assets, classNames, colors, debugMode, faceLivenessProps, goodIdCardBackFramesThreshold, goodIdCardFrontFramesThreshold, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureProps, idCardBackDetectionThreshold, idCardBackFocusThreshold, idCardFrontDetectionThreshold, idCardFrontFocusThreshold, onExitAfterFailure, onExitCapture, onUserCancel, readTextPrompt, readTextTimeoutDurationMs, skipIdCapture, skipShowIdCardBack, skipSuccessScreen, verbiage]);
16662
16684
  var additionalDocumentCaptureProps = React.useMemo(function () {
16663
16685
  return {
16664
16686
  documents: captureAdditionalDocuments,