idmission-web-sdk 2.3.87 → 2.3.89

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.
Files changed (42) hide show
  1. package/dist/components/customer_flows/SignatureKYC.d.ts +6 -0
  2. package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
  3. package/dist/components/selfie_capture/SelfieCapture.d.ts +4 -0
  4. package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
  5. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +4 -1
  6. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
  7. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -0
  8. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
  9. package/dist/lib/locales/de.d.ts +1 -0
  10. package/dist/lib/locales/de.d.ts.map +1 -1
  11. package/dist/lib/locales/es.d.ts +1 -0
  12. package/dist/lib/locales/es.d.ts.map +1 -1
  13. package/dist/lib/locales/fr.d.ts +1 -0
  14. package/dist/lib/locales/fr.d.ts.map +1 -1
  15. package/dist/lib/locales/index.d.ts +8 -0
  16. package/dist/lib/locales/index.d.ts.map +1 -1
  17. package/dist/lib/locales/it.d.ts +1 -0
  18. package/dist/lib/locales/it.d.ts.map +1 -1
  19. package/dist/lib/locales/ja.d.ts +1 -0
  20. package/dist/lib/locales/ja.d.ts.map +1 -1
  21. package/dist/lib/locales/pt.d.ts +1 -0
  22. package/dist/lib/locales/pt.d.ts.map +1 -1
  23. package/dist/lib/locales/ru.d.ts +1 -0
  24. package/dist/lib/locales/ru.d.ts.map +1 -1
  25. package/dist/lib/locales/zh.d.ts +1 -0
  26. package/dist/lib/locales/zh.d.ts.map +1 -1
  27. package/dist/lib/models/FaceDetection.d.ts +9 -1
  28. package/dist/lib/models/FaceDetection.d.ts.map +1 -1
  29. package/dist/lib/utils/lighting.d.ts +19 -0
  30. package/dist/lib/utils/lighting.d.ts.map +1 -0
  31. package/dist/sdk2.cjs.development.js +167 -14
  32. package/dist/sdk2.cjs.development.js.map +1 -1
  33. package/dist/sdk2.cjs.production.js +1 -1
  34. package/dist/sdk2.cjs.production.js.map +1 -1
  35. package/dist/sdk2.esm.js +167 -14
  36. package/dist/sdk2.esm.js.map +1 -1
  37. package/dist/sdk2.umd.development.js +167 -14
  38. package/dist/sdk2.umd.development.js.map +1 -1
  39. package/dist/sdk2.umd.production.js +1 -1
  40. package/dist/sdk2.umd.production.js.map +1 -1
  41. package/dist/version.d.ts +1 -1
  42. package/package.json +1 -1
@@ -236,7 +236,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
236
236
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
237
237
  };
238
238
 
239
- var webSdkVersion = '2.3.87';
239
+ var webSdkVersion = '2.3.89';
240
240
 
241
241
  function getPlatform() {
242
242
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -2927,14 +2927,29 @@ function processFaceDetectorPrediction(_a) {
2927
2927
  // we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
2928
2928
  _k = _a.noseTrackingThreshold,
2929
2929
  // we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
2930
- noseTrackingThreshold = _k === void 0 ? 0.2 : _k;
2930
+ noseTrackingThreshold = _k === void 0 ? 0.2 : _k,
2931
+ // this represents the maximum distance that the nose can be from the center of the face box -- 20% of the face box width or height
2932
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
2933
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
2934
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
2935
+ brightness = _a.brightness,
2936
+ range = _a.range,
2937
+ variance = _a.variance;
2931
2938
  var face = faces[0];
2932
2939
  var faceNotDetected = faces.length === 0;
2933
2940
  var faceNotCentered = false,
2934
2941
  faceLookingAway = false,
2935
2942
  faceTooClose = false,
2936
- faceTooFar = false;
2937
- if (face) {
2943
+ faceTooFar = false,
2944
+ faceVisibilityTooLow = false;
2945
+ var hasAnyThreshold = minCaptureBrightnessThreshold !== undefined || minCaptureRangeThreshold !== undefined || minCaptureVarianceThreshold !== undefined;
2946
+ if (hasAnyThreshold) {
2947
+ var tooDark = minCaptureBrightnessThreshold !== undefined && brightness !== undefined && brightness < minCaptureBrightnessThreshold;
2948
+ var tooLowRange = minCaptureRangeThreshold !== undefined && range !== undefined && range < minCaptureRangeThreshold;
2949
+ var tooLowVariance = minCaptureVarianceThreshold !== undefined && variance !== undefined && variance < minCaptureVarianceThreshold;
2950
+ faceVisibilityTooLow = !!(tooDark || tooLowRange || tooLowVariance);
2951
+ }
2952
+ if (face && !faceVisibilityTooLow) {
2938
2953
  // calculate frame centroids
2939
2954
  var frameCX = videoWidth / 2;
2940
2955
  var frameCY = videoHeight / 2;
@@ -2973,7 +2988,7 @@ function processFaceDetectorPrediction(_a) {
2973
2988
  }
2974
2989
  var faceIsStable = false,
2975
2990
  noseIsStable = false;
2976
- if (faceInGuides) {
2991
+ if (faceInGuides && !faceVisibilityTooLow) {
2977
2992
  var framesNeeded = Math.max(Math.ceil(average(framesNeededSamples$1)), 5);
2978
2993
  trackFace(face, framesNeeded, videoWidth, videoHeight);
2979
2994
  faceIsStable = lastNFaces.length >= framesNeeded && !lastNFacePairs.some(function (pair) {
@@ -2983,7 +2998,7 @@ function processFaceDetectorPrediction(_a) {
2983
2998
  return pair.distance > noseDistanceThreshold;
2984
2999
  });
2985
3000
  }
2986
- var faceReady = faceInGuides && faceIsStable && noseIsStable;
3001
+ var faceReady = faceInGuides && faceIsStable && noseIsStable && !faceVisibilityTooLow;
2987
3002
  return {
2988
3003
  face: face,
2989
3004
  faceNotDetected: faceNotDetected,
@@ -2994,7 +3009,8 @@ function processFaceDetectorPrediction(_a) {
2994
3009
  faceReady: faceReady,
2995
3010
  faceReadyAt: faceReady ? new Date() : null,
2996
3011
  faceIsStable: faceIsStable,
2997
- noseIsStable: noseIsStable
3012
+ noseIsStable: noseIsStable,
3013
+ faceVisibilityTooLow: faceVisibilityTooLow
2998
3014
  };
2999
3015
  }
3000
3016
  function testFaceDetectionAgainstKnownImage(detector) {
@@ -3871,6 +3887,7 @@ var es = {
3871
3887
  'Move forward...': 'Hay que moverse hacia adelante...',
3872
3888
  'Move to the center...': 'Hay que moverse hacia el centro...',
3873
3889
  'Waiting for face to be detected...': 'Esperando que se detecte la cara...',
3890
+ 'Improve lighting conditions...': 'Hay que buscar mejor iluminación...',
3874
3891
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Hay que quitarse lo que cubre los ojos (lentes, parche, etc.)...',
3875
3892
  'Please remove your head coverings (hat scarf etc.)...': 'Hay que quitarse lo que cubre la cabeza (gorra, mascada, etc.)...',
3876
3893
  'Please remove your mask...': 'Hay que quitarse el cubrebocas...',
@@ -4002,6 +4019,7 @@ var de = {
4002
4019
  'Move forward...': 'Nach vorne bewegen...',
4003
4020
  'Move to the center...': 'In die Mitte bewegen...',
4004
4021
  'Waiting for face to be detected...': 'Warte auf die Gesichtserkennung...',
4022
+ 'Improve lighting conditions...': 'Beleuchtungsbedingungen verbessern...',
4005
4023
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Bitte Augenbedeckung entfernen (Sonnenbrille, Augenklappe usw.)...',
4006
4024
  'Please remove your head coverings (hat scarf etc.)...': 'Bitte Kopfbedeckung abnehmen (Mütze, Schal usw.)...',
4007
4025
  'Please remove your mask...': 'Bitte Maske ablegen...',
@@ -4133,6 +4151,7 @@ var fr = {
4133
4151
  'Move forward...': 'Avancez...',
4134
4152
  'Move to the center...': 'Déplacez-vous vers le centre...',
4135
4153
  'Waiting for face to be detected...': 'En attente de détection du visage...',
4154
+ 'Improve lighting conditions...': "Améliorer les conditions d'éclairage...",
4136
4155
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Veuillez retirer ce qui recouvre vos yeux (lunettes de soleil, cache-œil, etc.)...',
4137
4156
  'Please remove your head coverings (hat scarf etc.)...': 'Veuillez retirer vos couvre-chefs (chapeau, foulard, etc.)...',
4138
4157
  'Please remove your mask...': 'Veuillez retirer votre masque...',
@@ -4264,6 +4283,7 @@ var it = {
4264
4283
  'Move forward...': 'Spostarsi più vicino...',
4265
4284
  'Move to the center...': 'Spostarsi al centro...',
4266
4285
  'Waiting for face to be detected...': 'In attesa che venga rilevato il volto...',
4286
+ 'Improve lighting conditions...': 'Migliorare le condizioni di illuminazione...',
4267
4287
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Rimuovere tutto ciò che copre gli occhi (occhiali da sole, bende, ecc.)...',
4268
4288
  'Please remove your head coverings (hat scarf etc.)...': 'Rimuovere tutto ciò che ricopre il capo (cappello, sciarpa, ecc.)...',
4269
4289
  'Please remove your mask...': 'Rimuovere la mascherina...',
@@ -4395,6 +4415,7 @@ var ja = {
4395
4415
  'Move forward...': '近づいてください…',
4396
4416
  'Move to the center...': '中央へ移動してください…',
4397
4417
  'Waiting for face to be detected...': '顔が検出されるのを待っています…',
4418
+ 'Improve lighting conditions...': '照明条件を改善してください…',
4398
4419
  'Please remove your eye coverings (sunglasses eye patch etc.)...': '目を覆うもの(サングラスや眼帯など)を取り外してください…',
4399
4420
  'Please remove your head coverings (hat scarf etc.)...': '頭を覆うもの(帽子やスカーフなど)を取り外してください…',
4400
4421
  'Please remove your mask...': 'マスクを取り外してください…',
@@ -4526,6 +4547,7 @@ var pt = {
4526
4547
  'Move forward...': 'Mover para frente...',
4527
4548
  'Move to the center...': 'Mover para o centro...',
4528
4549
  'Waiting for face to be detected...': 'Aguardando a detecção de rosto...',
4550
+ 'Improve lighting conditions...': 'Melhore as condições de iluminação...',
4529
4551
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Por favor, remova as coberturas dos olhos (óculos de sol, tapa-olho, etc.)...',
4530
4552
  'Please remove your head coverings (hat scarf etc.)...': 'Por favor, remova as coberturas da cabeça (chapéu, cachecol, etc.)...',
4531
4553
  'Please remove your mask...': 'Por favor, remova sua máscara...',
@@ -4657,6 +4679,7 @@ var ru = {
4657
4679
  'Move forward...': 'Подвиньтесь вперед…',
4658
4680
  'Move to the center...': 'Переместите к центру…',
4659
4681
  'Waiting for face to be detected...': 'Ожидание обнаружения лица…',
4682
+ 'Improve lighting conditions...': 'Улучшите условия освещения…',
4660
4683
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Снимите предметы, закрывающие глаза (солнцезащитные очки, повязку и т.д.)…',
4661
4684
  'Please remove your head coverings (hat scarf etc.)...': 'Снимите предметы, покрывающие голову (шапку, шарф и т.д.)…',
4662
4685
  'Please remove your mask...': 'Снимите маску…',
@@ -4788,6 +4811,7 @@ var zh = {
4788
4811
  'Move forward...': '請前進...',
4789
4812
  'Move to the center...': '請移至中心...',
4790
4813
  'Waiting for face to be detected...': '正在等待臉部辨識...',
4814
+ 'Improve lighting conditions...': '改善照明條件...',
4791
4815
  'Please remove your eye coverings (sunglasses eye patch etc.)...': '請取下眼睛遮蓋物(太陽眼鏡、眼罩等)...',
4792
4816
  'Please remove your head coverings (hat scarf etc.)...': '請取下頭部遮蓋物(帽子、圍巾等)...',
4793
4817
  'Please remove your mask...': '請脫下口罩...',
@@ -11667,6 +11691,110 @@ var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
11667
11691
  };
11668
11692
  var templateObject_1$n, templateObject_2$l;
11669
11693
 
11694
+ function detectBrightnessAndContrast(frame, brightnessAverager) {
11695
+ var ctx = frame.getContext('2d');
11696
+ if (!ctx || frame.width === 0 || frame.height === 0) return {};
11697
+ var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
11698
+ var pixels = imageData.data; // This is already Uint8ClampedArray
11699
+ var width = frame.width;
11700
+ var sampleResolution = 10;
11701
+ var xStep = Math.max(1, Math.floor(width / sampleResolution));
11702
+ var yStep = Math.max(1, Math.floor(frame.height / sampleResolution));
11703
+ var brightness = 0;
11704
+ var brightnessForVariance = 0;
11705
+ var minBrightness = Infinity;
11706
+ var maxBrightness = -Infinity;
11707
+ var iterations = 0;
11708
+ for (var y = Math.floor(yStep / 2); y < frame.height; y += yStep) {
11709
+ for (var x = Math.floor(xStep / 2); x < width; x += xStep) {
11710
+ var pixelIndex = (y * width + x) * 4;
11711
+ var r = pixels[pixelIndex];
11712
+ var g = pixels[pixelIndex + 1];
11713
+ var b = pixels[pixelIndex + 2];
11714
+ // https://en.wikipedia.org/wiki/Relative_luminance
11715
+ // pixels are represented by 4 channels/bytes, thus a step of 4
11716
+ // the luminance formula is: 0.2126 * R + 0.7152 * G + 0.0722 * B (alpha is not used in this formula)
11717
+ var luminance = r * 0.2126 + g * 0.7152 + b * 0.0722;
11718
+ brightness += luminance;
11719
+ brightnessForVariance += luminance * luminance;
11720
+ minBrightness = Math.min(minBrightness, luminance);
11721
+ maxBrightness = Math.max(maxBrightness, luminance);
11722
+ iterations++;
11723
+ }
11724
+ }
11725
+ var _a = brightnessAverager(brightness / iterations),
11726
+ avg = _a.avg,
11727
+ isFull = _a.isFull;
11728
+ var range = maxBrightness - minBrightness;
11729
+ var variance = brightnessForVariance / iterations - Math.pow(brightness / iterations, 2);
11730
+ return {
11731
+ brightness: isFull ? avg : undefined,
11732
+ range: isFull ? range : undefined,
11733
+ variance: isFull ? variance : undefined
11734
+ };
11735
+ }
11736
+ function createRunningAvgFIFO(capacity) {
11737
+ var cap = capacity | 0;
11738
+ var buf = new Float64Array(cap);
11739
+ var head = 0; // next write index
11740
+ var count = 0; // how many valid items (<= cap)
11741
+ var sum = 0;
11742
+ return {
11743
+ add: function add(x) {
11744
+ if (count === cap) {
11745
+ sum -= buf[head];
11746
+ } else {
11747
+ count++;
11748
+ }
11749
+ buf[head] = x;
11750
+ sum += x;
11751
+ head = head + 1 === cap ? 0 : head + 1;
11752
+ return {
11753
+ avg: sum / count,
11754
+ isFull: count === cap
11755
+ };
11756
+ },
11757
+ avg: function avg() {
11758
+ return count ? sum / count : 0;
11759
+ },
11760
+ size: function size() {
11761
+ return count;
11762
+ },
11763
+ clear: function clear() {
11764
+ head = 0;
11765
+ count = 0;
11766
+ sum = 0;
11767
+ },
11768
+ isFull: function isFull() {
11769
+ return count === cap;
11770
+ }
11771
+ };
11772
+ }
11773
+ function useRunningAvg(capacity) {
11774
+ var fifoRef = React.useRef();
11775
+ if (!fifoRef.current) fifoRef.current = createRunningAvgFIFO(capacity);
11776
+ React.useEffect(function () {
11777
+ fifoRef.current = createRunningAvgFIFO(capacity);
11778
+ }, [capacity]);
11779
+ return {
11780
+ addToAverage: function addToAverage(x) {
11781
+ return fifoRef.current.add(x);
11782
+ },
11783
+ average: function average() {
11784
+ return fifoRef.current.avg();
11785
+ },
11786
+ size: function size() {
11787
+ return fifoRef.current.size();
11788
+ },
11789
+ isFull: function isFull() {
11790
+ return fifoRef.current.isFull();
11791
+ },
11792
+ clear: function clear() {
11793
+ return fifoRef.current.clear();
11794
+ }
11795
+ };
11796
+ }
11797
+
11670
11798
  var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
11671
11799
  start: function start() {
11672
11800
  return null;
@@ -11696,7 +11824,10 @@ function SelfieGuidanceModelsProvider(_a) {
11696
11824
  _c = _a.modelLoadTimeoutMs,
11697
11825
  modelLoadTimeoutMs = _c === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _c,
11698
11826
  _d = _a.requireVerticalFaceCentering,
11699
- requireVerticalFaceCentering = _d === void 0 ? true : _d;
11827
+ requireVerticalFaceCentering = _d === void 0 ? true : _d,
11828
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
11829
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
11830
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold;
11700
11831
  var _e = useCameraStore(shallow.useShallow(function (state) {
11701
11832
  return {
11702
11833
  videoRef: state.videoRef,
@@ -11709,6 +11840,7 @@ function SelfieGuidanceModelsProvider(_a) {
11709
11840
  cameraReady = _e.cameraReady;
11710
11841
  var canvasRef = React.useRef(null);
11711
11842
  var onPredictionHandler = React.useRef();
11843
+ var addToAverage = useRunningAvg(5).addToAverage;
11712
11844
  var _f = useLoadFaceDetector({
11713
11845
  onModelError: onModelError,
11714
11846
  modelLoadTimeoutMs: modelLoadTimeoutMs,
@@ -11721,7 +11853,7 @@ function SelfieGuidanceModelsProvider(_a) {
11721
11853
  modelError = _f.modelError;
11722
11854
  var _g = useFrameLoop(React.useCallback(function () {
11723
11855
  return __awaiter(_this, void 0, void 0, function () {
11724
- var vw, vh, ctx, prediction, processed, e_1;
11856
+ var vw, vh, ctx, thresholdsProvided, brightnessResults, brightness, range, variance, prediction, processed, e_1;
11725
11857
  var _a, _b;
11726
11858
  return __generator(this, function (_c) {
11727
11859
  switch (_c.label) {
@@ -11739,12 +11871,23 @@ function SelfieGuidanceModelsProvider(_a) {
11739
11871
  _c.label = 1;
11740
11872
  case 1:
11741
11873
  _c.trys.push([1, 3,, 4]);
11874
+ thresholdsProvided = minCaptureBrightnessThreshold !== undefined || minCaptureRangeThreshold !== undefined || minCaptureVarianceThreshold !== undefined;
11875
+ brightnessResults = thresholdsProvided ? detectBrightnessAndContrast(canvasRef.current, addToAverage) : undefined;
11876
+ brightness = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.brightness;
11877
+ range = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.range;
11878
+ variance = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.variance;
11742
11879
  prediction = makeFaceDetectorPrediction(canvasRef.current);
11743
11880
  processed = processFaceDetectorPrediction({
11744
11881
  faces: (_a = prediction === null || prediction === void 0 ? void 0 : prediction.faces) !== null && _a !== void 0 ? _a : [],
11745
11882
  videoWidth: vw,
11746
11883
  videoHeight: vh,
11747
- requireVerticalFaceCentering: requireVerticalFaceCentering
11884
+ requireVerticalFaceCentering: requireVerticalFaceCentering,
11885
+ minCaptureBrightnessThreshold: minCaptureBrightnessThreshold,
11886
+ minCaptureRangeThreshold: minCaptureRangeThreshold,
11887
+ minCaptureVarianceThreshold: minCaptureVarianceThreshold,
11888
+ brightness: brightness,
11889
+ range: range,
11890
+ variance: variance
11748
11891
  });
11749
11892
  setLastFaceDetectionAt(new Date().getTime());
11750
11893
  // setLastPrediction(processed)
@@ -11762,7 +11905,7 @@ function SelfieGuidanceModelsProvider(_a) {
11762
11905
  }
11763
11906
  });
11764
11907
  });
11765
- }, [cameraReady, modelError, ready, requireVerticalFaceCentering, videoLoaded, videoRef]), {
11908
+ }, [cameraReady, modelError, ready, requireVerticalFaceCentering, videoLoaded, videoRef, addToAverage, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold]), {
11766
11909
  throttleMs: throttleMs,
11767
11910
  autoStart: autoStart
11768
11911
  }),
@@ -12135,6 +12278,7 @@ var SelfieCapture = function SelfieCapture(_a) {
12135
12278
  guidanceMoveForwardText: 'Move forward...',
12136
12279
  guidanceMoveToCenterText: 'Move to the center...',
12137
12280
  guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
12281
+ guidanceVisibilityTooLowText: 'Improve lighting conditions...',
12138
12282
  guidanceNotStableText: 'Please hold still...',
12139
12283
  guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
12140
12284
  manualCaptureBtnText: 'Capture'
@@ -12142,7 +12286,7 @@ var SelfieCapture = function SelfieCapture(_a) {
12142
12286
  var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
12143
12287
  var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
12144
12288
  if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
12145
- guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) || !(prediction === null || prediction === void 0 ? void 0 : prediction.noseIsStable) ? verbiage.guidanceNotStableText : '');
12289
+ guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceVisibilityTooLow) ? verbiage.guidanceVisibilityTooLowText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) || !(prediction === null || prediction === void 0 ? void 0 : prediction.noseIsStable) ? verbiage.guidanceNotStableText : '');
12146
12290
  if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
12147
12291
  return /*#__PURE__*/React__namespace.default.createElement(SelfieCaptureFallback, {
12148
12292
  classNames: classNames.fallback
@@ -15042,7 +15186,10 @@ var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProvide
15042
15186
  throttleMs: 250,
15043
15187
  onModelError: props.onModelError,
15044
15188
  modelLoadTimeoutMs: props.modelLoadTimeoutMs,
15045
- requireVerticalFaceCentering: false
15189
+ requireVerticalFaceCentering: false,
15190
+ minCaptureBrightnessThreshold: props.minCaptureBrightnessThreshold,
15191
+ minCaptureRangeThreshold: props.minCaptureRangeThreshold,
15192
+ minCaptureVarianceThreshold: props.minCaptureVarianceThreshold
15046
15193
  }, /*#__PURE__*/React__namespace.default.createElement(VideoSignatureWizard, _assign({}, props, {
15047
15194
  onRetryClicked: onRetryClicked
15048
15195
  }))));
@@ -18793,6 +18940,9 @@ var SignatureKYC = function SignatureKYC(_a) {
18793
18940
  guidesComponent = _a.guidesComponent,
18794
18941
  _q = _a.showFaceGuideThenSignaturePad,
18795
18942
  showFaceGuideThenSignaturePad = _q === void 0 ? false : _q,
18943
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
18944
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
18945
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
18796
18946
  _r = _a.theme,
18797
18947
  theme = _r === void 0 ? 'default' : _r,
18798
18948
  classNames = _a.classNames,
@@ -18863,6 +19013,9 @@ var SignatureKYC = function SignatureKYC(_a) {
18863
19013
  allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
18864
19014
  guidesComponent: guidesComponent,
18865
19015
  showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad,
19016
+ minCaptureBrightnessThreshold: minCaptureBrightnessThreshold,
19017
+ minCaptureRangeThreshold: minCaptureRangeThreshold,
19018
+ minCaptureVarianceThreshold: minCaptureVarianceThreshold,
18866
19019
  classNames: classNames,
18867
19020
  colors: colors,
18868
19021
  debugMode: debugMode,
@@ -18870,7 +19023,7 @@ var SignatureKYC = function SignatureKYC(_a) {
18870
19023
  onModelError: onModelError,
18871
19024
  onUserCancel: onUserCancel
18872
19025
  };
18873
- }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
19026
+ }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
18874
19027
  })))));
18875
19028
  };
18876
19029