idmission-web-sdk 1.0.369 → 1.0.370

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.
@@ -88,10 +88,10 @@ export interface CustomerEnrollmentProps extends PropsWithChildren {
88
88
  idAutoCaptureEnabled?: boolean;
89
89
  /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
90
90
  idCardAutoCaptureScoreThreshold?: number;
91
- /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
92
- mrzDetectionScoreThreshold?: number;
93
91
  /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
94
92
  passportAutoCaptureScoreThreshold?: number;
93
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
94
+ mrzDetectionScoreThreshold?: number;
95
95
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
96
96
  idCardFocusScoreThreshold?: number;
97
97
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
@@ -85,10 +85,10 @@ export interface IdAndFaceValidationProps extends PropsWithChildren {
85
85
  idAutoCaptureEnabled?: boolean;
86
86
  /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for ID cards. Defaults to 0.8. */
87
87
  idCardAutoCaptureScoreThreshold?: number;
88
- /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
89
- mrzDetectionScoreThreshold?: number;
90
88
  /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
91
89
  passportAutoCaptureScoreThreshold?: number;
90
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
91
+ mrzDetectionScoreThreshold?: number;
92
92
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
93
93
  idCardFocusScoreThreshold?: number;
94
94
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
@@ -72,6 +72,8 @@ export interface IdValidationProps extends PropsWithChildren {
72
72
  idCardAutoCaptureScoreThreshold?: number;
73
73
  /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for passports. Defaults to 0.75. */
74
74
  passportAutoCaptureScoreThreshold?: number;
75
+ /** Number between 0 and 1 at which document detection guidance score condition is considered to be met for Machine Readable Zones. Defaults to 0.5. */
76
+ mrzDetectionScoreThreshold?: number;
75
77
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for ID cards. */
76
78
  idCardFocusScoreThreshold?: number;
77
79
  /** Number between 0 and 1 at which focus guidance score condition is considered to be met for passports. */
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MutableRefObject, ReactElement, ReactNode } from 'react';
3
- import { DetectedObject, DocumentType } from '../../lib/models/DocumentDetection';
3
+ import { DetectedObject, DocumentDetectionThresholds, DocumentType } from '../../lib/models/DocumentDetection';
4
4
  type PredictionHandler = (prediction: DocumentDetectionPrediction) => Promise<void>;
5
5
  type DocumentDetectionModelState = {
6
6
  documentDetectionModelReady: boolean;
@@ -25,12 +25,6 @@ export type DocumentDetectionModelProviderProps = {
25
25
  documentDetectionModelLoadTimeoutMs?: number;
26
26
  };
27
27
  export declare function DocumentDetectionModelProvider({ autoStart, children, throttleMs, documentDetectionModelPath, documentDetectionModelDelegate, documentDetectionModelScoreThreshold, documentDetectionModelLoadTimeoutMs, }: DocumentDetectionModelProviderProps): ReactElement;
28
- export type DocumentDetectionThresholds = {
29
- document?: number;
30
- passport?: number;
31
- mrz?: number;
32
- pdf417?: number;
33
- };
34
28
  export type DocumentDetectionPrediction = {
35
29
  detectedObjects: DetectedObject[];
36
30
  detectionTime: number;
@@ -1,6 +1,6 @@
1
1
  import React, { ReactElement, ReactNode } from 'react';
2
- import { DetectedObject, DetectedObjectBox, DocumentType } from '../../lib/models/DocumentDetection';
3
- import { DocumentDetectionModelProviderProps, DocumentDetectionThresholds } from './DocumentDetectionModelProvider';
2
+ import { DetectedObject, DetectedObjectBox, DocumentDetectionThresholds, DocumentType } from '../../lib/models/DocumentDetection';
3
+ import { DocumentDetectionModelProviderProps } from './DocumentDetectionModelProvider';
4
4
  import { FocusModelProviderProps } from './FocusModelProvider';
5
5
  import { FocusThresholds } from '../../lib/models/Focus';
6
6
  export type IdCapturePrediction = {
@@ -2,7 +2,7 @@ import { ObjectDetector } from '@mediapipe/tasks-vision';
2
2
  export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240530/model_fp16.tflite";
3
3
  export declare const defaultDocumentDetectionModelLoadTimeoutMs = 45000;
4
4
  export type DocumentType = 'none' | 'idCard' | 'passport';
5
- export type Label = 'Document' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport Page';
5
+ export type Label = 'Document' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page';
6
6
  export type DetectedObjectBox = {
7
7
  xMin: number;
8
8
  xMax: number;
@@ -16,4 +16,16 @@ export type DetectedObject = {
16
16
  label: Label;
17
17
  score: number;
18
18
  };
19
+ export type DocumentDetectionThresholds = {
20
+ document?: number;
21
+ passport?: number;
22
+ mrz?: number;
23
+ pdf417?: number;
24
+ };
25
+ export declare const defaultDocumentDetectionThresholds: {
26
+ idCard: number;
27
+ passport: number;
28
+ mrz: number;
29
+ pdf417: number;
30
+ };
19
31
  export declare function loadDocumentDetector(modelAssetPath: string, scoreThreshold?: number): Promise<ObjectDetector>;
@@ -9,4 +9,8 @@ export type FocusThresholds = {
9
9
  desktop?: number;
10
10
  mobile?: number;
11
11
  };
12
+ export declare const defaultFocusThresholds: {
13
+ idCard: number;
14
+ passport: number;
15
+ };
12
16
  export declare function loadFocusModel(modelAssetPath: string, delegate?: 'CPU' | 'GPU'): Promise<ImageClassifier>;
@@ -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.369';
51
+ var webSdkVersion = '1.0.370';
52
52
 
53
53
  function getPlatform() {
54
54
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2228,6 +2228,12 @@ function loadTinyModel(delegate) {
2228
2228
 
2229
2229
  var defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240530/model_fp16.tflite";
2230
2230
  var defaultDocumentDetectionModelLoadTimeoutMs = 45000;
2231
+ var defaultDocumentDetectionThresholds = {
2232
+ idCard: 0.8,
2233
+ passport: 0.5,
2234
+ mrz: 0.5,
2235
+ pdf417: 0.15
2236
+ };
2231
2237
  var detectors = {};
2232
2238
  function loadDocumentDetector(modelAssetPath, scoreThreshold) {
2233
2239
  if (scoreThreshold === void 0) {
@@ -2270,6 +2276,10 @@ function loadDocumentDetector(modelAssetPath, scoreThreshold) {
2270
2276
  // export const defaultFocusModelPath = `https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240521/model_int8.tflite`
2271
2277
  var defaultFocusModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/focusmp20240523/model_float16.tflite";
2272
2278
  var defaultFocusModelLoadTimeoutMs = 45000;
2279
+ var defaultFocusThresholds = {
2280
+ idCard: 0.3,
2281
+ passport: 0.3
2282
+ };
2273
2283
  var models = {};
2274
2284
  function loadFocusModel(modelAssetPath, delegate) {
2275
2285
  if (delegate === void 0) {
@@ -2962,7 +2972,7 @@ function processPrediction(prediction, thresholds) {
2962
2972
  return obj.label === 'Document';
2963
2973
  });
2964
2974
  var bestPassportPage = detectedObjects.find(function (obj) {
2965
- return obj.label === 'Passport Page';
2975
+ return obj.label === 'Passport page';
2966
2976
  });
2967
2977
  var bestDocumentScore = (_a = bestDocument === null || bestDocument === void 0 ? void 0 : bestDocument.score) !== null && _a !== void 0 ? _a : 0;
2968
2978
  var passportDetectionScore = (_b = bestPassportPage === null || bestPassportPage === void 0 ? void 0 : bestPassportPage.score) !== null && _b !== void 0 ? _b : 0;
@@ -4185,19 +4195,19 @@ var IdCapture = function IdCapture(_a) {
4185
4195
  _k = _a.autoCaptureEnabled,
4186
4196
  autoCaptureEnabled = _k === void 0 ? true : _k,
4187
4197
  _l = _a.autoCaptureScoreThreshold,
4188
- autoCaptureScoreThreshold = _l === void 0 ? 0.8 : _l,
4198
+ autoCaptureScoreThreshold = _l === void 0 ? defaultDocumentDetectionThresholds.idCard : _l,
4189
4199
  _m = _a.autoCaptureGoodFramesRequired,
4190
4200
  autoCaptureGoodFramesRequired = _m === void 0 ? 3 : _m,
4191
4201
  _o = _a.autoCaptureBarcodeRequired,
4192
4202
  autoCaptureBarcodeRequired = _o === void 0 ? 'mobile' : _o,
4193
4203
  _p = _a.mrzDetectionScoreThreshold,
4194
- mrzDetectionScoreThreshold = _p === void 0 ? 0.25 : _p,
4204
+ mrzDetectionScoreThreshold = _p === void 0 ? defaultDocumentDetectionThresholds.mrz : _p,
4195
4205
  _q = _a.passportPageDetectionThreshold,
4196
- passportPageDetectionThreshold = _q === void 0 ? 0.6 : _q,
4206
+ passportPageDetectionThreshold = _q === void 0 ? defaultDocumentDetectionThresholds.passport : _q,
4197
4207
  _r = _a.pdf417DetectionThreshold,
4198
- pdf417DetectionThreshold = _r === void 0 ? 0.15 : _r,
4208
+ pdf417DetectionThreshold = _r === void 0 ? defaultDocumentDetectionThresholds.pdf417 : _r,
4199
4209
  _s = _a.focusScoreThreshold,
4200
- focusScoreThreshold = _s === void 0 ? 0.3 : _s,
4210
+ focusScoreThreshold = _s === void 0 ? defaultFocusThresholds.idCard : _s,
4201
4211
  _t = _a.barcodeScanningEnabled,
4202
4212
  barcodeScanningEnabled = _t === void 0 ? true : _t,
4203
4213
  _u = _a.maxBarcodeScanAttempts,
@@ -4401,7 +4411,7 @@ var IdCapture = function IdCapture(_a) {
4401
4411
  scaling: debugScalingDetails,
4402
4412
  flipX: !((_a = cameraRef.current) === null || _a === void 0 ? void 0 : _a.isRearFacing)
4403
4413
  });
4404
- }))), 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), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React__default['default'].createElement("br", null), modelsReady ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, state.documentDetectionThresholdMet ? '✅' : '❌', " Document Score: ", state.documentDetectionScore, " (", state.documentType, ")", /*#__PURE__*/React__default['default'].createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React__default['default'].createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore, /*#__PURE__*/React__default['default'].createElement("br", null), state.goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', state.goodFramesCount, "/", state.goodFramesThreshold, barcodeScanningEnabled && state.autoCaptureBarcodeRequired ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("br", null), state.barcodeResult ? '✅' : '❌', " Barcode Scanned (", supportsNativeBarcodeScanning() ? 'Native' : 'ZXing', ",", ' ', state.barcodeScanFailedAttempts, "/", state.maxBarcodeScanAttempts, " failed attempts)")) : null)) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u274C Models not ready")))));
4414
+ }))), 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), state.frameCaptureRate > 0.75 ? '✅' : '👎', " Frame Rate:", ' ', Math.round((state.frameCaptureRate + Number.EPSILON) * 1000) / 1000, ' ', "fps (", detectionTime, "ms doc detect, ", focusPredictionTime, "ms focus)", /*#__PURE__*/React__default['default'].createElement("br", null), modelsReady ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, state.documentDetectionThresholdMet ? '✅' : '❌', " Document Score: ", state.documentDetectionScore.toFixed(3), " (", state.documentType, ")", /*#__PURE__*/React__default['default'].createElement("br", null), state.passportPageDetectionThresholdMet ? '✅' : '❌', " Passport Score: ", state.passportPageDetectionScore.toFixed(3), /*#__PURE__*/React__default['default'].createElement("br", null), state.documentInBounds ? '✅' : '❌', " Document In Bounds", /*#__PURE__*/React__default['default'].createElement("br", null), state.focusThresholdMet ? '✅' : '❌', " Focus Score:", ' ', state.focusScore.toFixed(3), /*#__PURE__*/React__default['default'].createElement("br", null), state.goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', state.goodFramesCount, "/", state.goodFramesThreshold, barcodeScanningEnabled && state.autoCaptureBarcodeRequired ? ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("br", null), state.barcodeResult ? '✅' : '❌', " Barcode Scanned (", supportsNativeBarcodeScanning() ? 'Native' : 'ZXing', ",", ' ', state.barcodeScanFailedAttempts, "/", state.maxBarcodeScanAttempts, " failed attempts)")) : null)) : ( /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, "\u274C Models not ready")))));
4405
4415
  };
4406
4416
  var timeSince = function timeSince(t) {
4407
4417
  if (!t) return 0;
@@ -6979,15 +6989,15 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
6979
6989
  _y = _a.barcodeScanningEnabled,
6980
6990
  barcodeScanningEnabled = _y === void 0 ? false : _y,
6981
6991
  _z = _a.idCardAutoCaptureScoreThreshold,
6982
- idCardAutoCaptureScoreThreshold = _z === void 0 ? 0.8 : _z,
6992
+ idCardAutoCaptureScoreThreshold = _z === void 0 ? defaultDocumentDetectionThresholds.idCard : _z,
6983
6993
  _0 = _a.passportAutoCaptureScoreThreshold,
6984
- passportAutoCaptureScoreThreshold = _0 === void 0 ? 0.75 : _0,
6994
+ passportAutoCaptureScoreThreshold = _0 === void 0 ? defaultDocumentDetectionThresholds.passport : _0,
6985
6995
  _1 = _a.mrzDetectionScoreThreshold,
6986
- mrzDetectionScoreThreshold = _1 === void 0 ? 0.25 : _1,
6996
+ mrzDetectionScoreThreshold = _1 === void 0 ? defaultDocumentDetectionThresholds.mrz : _1,
6987
6997
  _2 = _a.idCardFocusScoreThreshold,
6988
- idCardFocusScoreThreshold = _2 === void 0 ? 0.3 : _2,
6998
+ idCardFocusScoreThreshold = _2 === void 0 ? defaultFocusThresholds.idCard : _2,
6989
6999
  _3 = _a.passportFocusScoreThreshold,
6990
- passportFocusScoreThreshold = _3 === void 0 ? 0.3 : _3,
7000
+ passportFocusScoreThreshold = _3 === void 0 ? defaultFocusThresholds.passport : _3,
6991
7001
  _4 = _a.skipSuccessScreen,
6992
7002
  skipSuccessScreen = _4 === void 0 ? false : _4,
6993
7003
  instructions = _a.instructions,
@@ -11394,24 +11404,26 @@ var IdValidation = function IdValidation(_a) {
11394
11404
  _e = _a.idAutoCaptureEnabled,
11395
11405
  idAutoCaptureEnabled = _e === void 0 ? true : _e,
11396
11406
  _f = _a.idCardAutoCaptureScoreThreshold,
11397
- idCardAutoCaptureScoreThreshold = _f === void 0 ? 0.8 : _f,
11407
+ idCardAutoCaptureScoreThreshold = _f === void 0 ? defaultDocumentDetectionThresholds.idCard : _f,
11398
11408
  _g = _a.passportAutoCaptureScoreThreshold,
11399
- passportAutoCaptureScoreThreshold = _g === void 0 ? 0.75 : _g,
11400
- _h = _a.idCardFocusScoreThreshold,
11401
- idCardFocusScoreThreshold = _h === void 0 ? 0.3 : _h,
11402
- _j = _a.passportFocusScoreThreshold,
11403
- passportFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
11404
- _k = _a.skipSuccessScreen,
11405
- skipSuccessScreen = _k === void 0 ? false : _k,
11409
+ passportAutoCaptureScoreThreshold = _g === void 0 ? defaultDocumentDetectionThresholds.passport : _g,
11410
+ _h = _a.mrzDetectionScoreThreshold,
11411
+ mrzDetectionScoreThreshold = _h === void 0 ? defaultDocumentDetectionThresholds.mrz : _h,
11412
+ _j = _a.idCardFocusScoreThreshold,
11413
+ idCardFocusScoreThreshold = _j === void 0 ? defaultFocusThresholds.idCard : _j,
11414
+ _k = _a.passportFocusScoreThreshold,
11415
+ passportFocusScoreThreshold = _k === void 0 ? defaultFocusThresholds.passport : _k,
11416
+ _l = _a.skipSuccessScreen,
11417
+ skipSuccessScreen = _l === void 0 ? false : _l,
11406
11418
  instructions = _a.instructions,
11407
- _l = _a.guideType,
11408
- guideType = _l === void 0 ? 'fit' : _l,
11409
- _m = _a.portraitGuidesOnMobile,
11410
- portraitGuidesOnMobile = _m === void 0 ? false : _m,
11411
- _o = _a.rotateLoadingOverlayImageWhenPortrait,
11412
- rotateLoadingOverlayImageWhenPortrait = _o === void 0 ? true : _o,
11413
- _p = _a.modelLoadTimeoutMs,
11414
- modelLoadTimeoutMs = _p === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _p,
11419
+ _m = _a.guideType,
11420
+ guideType = _m === void 0 ? 'fit' : _m,
11421
+ _o = _a.portraitGuidesOnMobile,
11422
+ portraitGuidesOnMobile = _o === void 0 ? false : _o,
11423
+ _p = _a.rotateLoadingOverlayImageWhenPortrait,
11424
+ rotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
11425
+ _q = _a.modelLoadTimeoutMs,
11426
+ modelLoadTimeoutMs = _q === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _q,
11415
11427
  onBeforeSubmit = _a.onBeforeSubmit,
11416
11428
  onSubmit = _a.onSubmit,
11417
11429
  onComplete = _a.onComplete,
@@ -11420,28 +11432,28 @@ var IdValidation = function IdValidation(_a) {
11420
11432
  onExitCapture = _a.onExitCapture,
11421
11433
  onUserCancel = _a.onUserCancel,
11422
11434
  onModelError = _a.onModelError,
11423
- _q = _a.theme,
11424
- theme = _q === void 0 ? 'default' : _q,
11425
- _r = _a.assets,
11426
- assets = _r === void 0 ? {} : _r,
11427
- _s = _a.classNames,
11428
- classNames = _s === void 0 ? {} : _s,
11429
- _t = _a.colors,
11430
- colors = _t === void 0 ? {} : _t,
11431
- _u = _a.verbiage,
11432
- verbiage = _u === void 0 ? {} : _u,
11433
- _v = _a.captureSignature,
11434
- captureSignature = _v === void 0 ? false : _v,
11435
- _w = _a.captureSignatureVideo,
11436
- captureSignatureVideo = _w === void 0 ? false : _w,
11437
- _x = _a.captureAdditionalDocuments,
11438
- captureAdditionalDocuments = _x === void 0 ? [] : _x,
11439
- _y = _a.geolocationEnabled,
11440
- geolocationEnabled = _y === void 0 ? true : _y,
11441
- _z = _a.geolocationRequired,
11442
- geolocationRequired = _z === void 0 ? false : _z,
11443
- _0 = _a.debugMode,
11444
- debugMode = _0 === void 0 ? false : _0;
11435
+ _r = _a.theme,
11436
+ theme = _r === void 0 ? 'default' : _r,
11437
+ _s = _a.assets,
11438
+ assets = _s === void 0 ? {} : _s,
11439
+ _t = _a.classNames,
11440
+ classNames = _t === void 0 ? {} : _t,
11441
+ _u = _a.colors,
11442
+ colors = _u === void 0 ? {} : _u,
11443
+ _v = _a.verbiage,
11444
+ verbiage = _v === void 0 ? {} : _v,
11445
+ _w = _a.captureSignature,
11446
+ captureSignature = _w === void 0 ? false : _w,
11447
+ _x = _a.captureSignatureVideo,
11448
+ captureSignatureVideo = _x === void 0 ? false : _x,
11449
+ _y = _a.captureAdditionalDocuments,
11450
+ captureAdditionalDocuments = _y === void 0 ? [] : _y,
11451
+ _z = _a.geolocationEnabled,
11452
+ geolocationEnabled = _z === void 0 ? true : _z,
11453
+ _0 = _a.geolocationRequired,
11454
+ geolocationRequired = _0 === void 0 ? false : _0,
11455
+ _1 = _a.debugMode,
11456
+ debugMode = _1 === void 0 ? false : _1;
11445
11457
  useLanguage(lang);
11446
11458
  useDebugLogging(debugMode);
11447
11459
  var idCaptureProps = React.useMemo(function () {
@@ -11454,7 +11466,7 @@ var IdValidation = function IdValidation(_a) {
11454
11466
  autoCaptureEnabled: idAutoCaptureEnabled,
11455
11467
  idCardAutoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
11456
11468
  passportAutoCaptureScoreThreshold: passportAutoCaptureScoreThreshold,
11457
- mrzDetectionScoreThreshold: 0.5,
11469
+ mrzDetectionScoreThreshold: mrzDetectionScoreThreshold,
11458
11470
  idCardFocusScoreThreshold: idCardFocusScoreThreshold,
11459
11471
  passportFocusScoreThreshold: passportFocusScoreThreshold,
11460
11472
  barcodeScanningEnabled: false,
@@ -11471,7 +11483,7 @@ var IdValidation = function IdValidation(_a) {
11471
11483
  verbiage: verbiage,
11472
11484
  debugMode: debugMode
11473
11485
  };
11474
- }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, loadingOverlayMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
11486
+ }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, passportAutoCaptureScoreThreshold, mrzDetectionScoreThreshold, idCardFocusScoreThreshold, passportFocusScoreThreshold, skipSuccessScreen, loadingOverlayMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
11475
11487
  var additionalDocumentCaptureProps = React.useMemo(function () {
11476
11488
  return {
11477
11489
  documents: captureAdditionalDocuments,
@@ -11663,15 +11675,15 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
11663
11675
  _e = _a.idAutoCaptureEnabled,
11664
11676
  idAutoCaptureEnabled = _e === void 0 ? true : _e,
11665
11677
  _f = _a.idCardAutoCaptureScoreThreshold,
11666
- idCardAutoCaptureScoreThreshold = _f === void 0 ? 0.8 : _f,
11667
- _g = _a.mrzDetectionScoreThreshold,
11668
- mrzDetectionScoreThreshold = _g === void 0 ? 0.5 : _g,
11669
- _h = _a.passportAutoCaptureScoreThreshold,
11670
- passportAutoCaptureScoreThreshold = _h === void 0 ? 0.75 : _h,
11678
+ idCardAutoCaptureScoreThreshold = _f === void 0 ? defaultDocumentDetectionThresholds.idCard : _f,
11679
+ _g = _a.passportAutoCaptureScoreThreshold,
11680
+ passportAutoCaptureScoreThreshold = _g === void 0 ? defaultDocumentDetectionThresholds.passport : _g,
11681
+ _h = _a.mrzDetectionScoreThreshold,
11682
+ mrzDetectionScoreThreshold = _h === void 0 ? defaultDocumentDetectionThresholds.mrz : _h,
11671
11683
  _j = _a.idCardFocusScoreThreshold,
11672
- idCardFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
11684
+ idCardFocusScoreThreshold = _j === void 0 ? defaultFocusThresholds.idCard : _j,
11673
11685
  _k = _a.passportFocusScoreThreshold,
11674
- passportFocusScoreThreshold = _k === void 0 ? 0.3 : _k,
11686
+ passportFocusScoreThreshold = _k === void 0 ? defaultFocusThresholds.passport : _k,
11675
11687
  _l = _a.faceLivenessLoadingOverlayMode,
11676
11688
  faceLivenessLoadingOverlayMode = _l === void 0 ? 'default' : _l,
11677
11689
  _m = _a.faceLivenessTimeoutDurationMs,
@@ -11879,15 +11891,15 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
11879
11891
  _e = _a.idAutoCaptureEnabled,
11880
11892
  idAutoCaptureEnabled = _e === void 0 ? true : _e,
11881
11893
  _f = _a.idCardAutoCaptureScoreThreshold,
11882
- idCardAutoCaptureScoreThreshold = _f === void 0 ? 0.8 : _f,
11883
- _g = _a.mrzDetectionScoreThreshold,
11884
- mrzDetectionScoreThreshold = _g === void 0 ? 0.5 : _g,
11885
- _h = _a.passportAutoCaptureScoreThreshold,
11886
- passportAutoCaptureScoreThreshold = _h === void 0 ? 0.75 : _h,
11894
+ idCardAutoCaptureScoreThreshold = _f === void 0 ? defaultDocumentDetectionThresholds.idCard : _f,
11895
+ _g = _a.passportAutoCaptureScoreThreshold,
11896
+ passportAutoCaptureScoreThreshold = _g === void 0 ? defaultDocumentDetectionThresholds.passport : _g,
11897
+ _h = _a.mrzDetectionScoreThreshold,
11898
+ mrzDetectionScoreThreshold = _h === void 0 ? defaultDocumentDetectionThresholds.mrz : _h,
11887
11899
  _j = _a.idCardFocusScoreThreshold,
11888
- idCardFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
11900
+ idCardFocusScoreThreshold = _j === void 0 ? defaultFocusThresholds.idCard : _j,
11889
11901
  _k = _a.passportFocusScoreThreshold,
11890
- passportFocusScoreThreshold = _k === void 0 ? 0.3 : _k,
11902
+ passportFocusScoreThreshold = _k === void 0 ? defaultFocusThresholds.passport : _k,
11891
11903
  _l = _a.faceLivenessTimeoutDurationMs,
11892
11904
  faceLivenessTimeoutDurationMs = _l === void 0 ? 15000 : _l,
11893
11905
  _m = _a.faceLivenessLoadingOverlayMode,