idmission-web-sdk 2.3.164-use-doc-detect-for-face-tracking-new-model-d0b52dd → 2.3.164-video-id-without-face-tracking-3224d5d
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/video_id/IdVideoCapture.d.ts +2 -1
- package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +1 -0
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +214 -199
- 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 +214 -199
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +214 -199
- 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/package.json +1 -1
|
@@ -65,11 +65,12 @@ export type IdVideoCaptureProps = {
|
|
|
65
65
|
disableFaceDetectionWhileAudioCapture: boolean;
|
|
66
66
|
disableFaceDetectionWhileAudioCaptureMsDelay: number;
|
|
67
67
|
faceNotDetectedFrameThreshold?: number;
|
|
68
|
+
disableFaceNotDetectedKickout?: boolean;
|
|
68
69
|
mergeAVStreams?: boolean;
|
|
69
70
|
classNames?: IdVideoCaptureClassNames;
|
|
70
71
|
colors?: IdVideoCaptureColors;
|
|
71
72
|
verbiage?: IdVideoCaptureVerbiage;
|
|
72
73
|
debugMode?: boolean;
|
|
73
74
|
};
|
|
74
|
-
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured,
|
|
75
|
+
export declare const IdVideoCapture: ({ onComplete, onIdFrontImageCaptured, onIdBackImageCaptured, onRecordingFailed, onExitCapture, idCaptureModelsEnabled, idDocumentType, idCaptureGuideImages, idCardFrontDelay, videoIdCaptureThresholds, skipShowIdCardBack, captureCountdownSeconds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, mergeAVStreams, classNames, colors, verbiage: rawVerbiage, debugMode, }: IdVideoCaptureProps) => ReactElement;
|
|
75
76
|
//# sourceMappingURL=IdVideoCapture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdVideoCapture.d.ts","sourceRoot":"","sources":["../../../src/components/video_id/IdVideoCapture.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,YAAY,EAOb,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"IdVideoCapture.d.ts","sourceRoot":"","sources":["../../../src/components/video_id/IdVideoCapture.tsx"],"names":[],"mappings":"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"}
|
|
@@ -37,6 +37,7 @@ export type VideoSignatureCaptureProps = {
|
|
|
37
37
|
headTrackingBoundaryPercentage?: number;
|
|
38
38
|
headTrackingBoundaryType?: 'head' | 'nose';
|
|
39
39
|
faceNotDetectedFrameThreshold?: number;
|
|
40
|
+
disableFaceNotDetectedKickout?: boolean;
|
|
40
41
|
captureAudio?: boolean;
|
|
41
42
|
classNames?: VideoSignatureCaptureClassNames;
|
|
42
43
|
colors?: VideoSignatureCaptureColors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoSignatureCapture.d.ts","sourceRoot":"","sources":["../../../src/components/video_signature_capture/VideoSignatureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EAMd,MAAM,OAAO,CAAA;AAad,OAAO,EAAE,wBAAwB,EAAmB,MAAM,mBAAmB,CAAA;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAA;AACvF,OAA6B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAA;AAQhC,eAAO,MAAM,gCAAgC,KAAK,CAAA;AAClD,eAAO,MAAM,yCAAyC,OAAO,CAAA;AAC7D,eAAO,MAAM,mCAAmC,SAAS,CAAA;AACzD,eAAO,MAAM,yCAAyC,IAAI,CAAA;AAE1D,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,8BAA8B,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,8BAA8B,CAAC,EAAE,MAAM,CAAA;IACvC,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,mBAAmB,CAAC,EAAE,wBAAwB,CAAA;IAC9C,MAAM,CAAC,EAAE,4BAA4B,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,iCAAiC,CAAC,EAAE,OAAO,CAAA;IAC3C,eAAe,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAA;IAC7D,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,8BAA8B,CAAC,EAAE,MAAM,CAAA;IACvC,wBAAwB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1C,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,+BAA+B,CAAA;IAC5C,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC,QAAQ,CAAC,EAAE,6BAA6B,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;
|
|
1
|
+
{"version":3,"file":"VideoSignatureCapture.d.ts","sourceRoot":"","sources":["../../../src/components/video_signature_capture/VideoSignatureCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EAMd,MAAM,OAAO,CAAA;AAad,OAAO,EAAE,wBAAwB,EAAmB,MAAM,mBAAmB,CAAA;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAA;AACvF,OAA6B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,wBAAwB,EAEzB,MAAM,yBAAyB,CAAA;AAQhC,eAAO,MAAM,gCAAgC,KAAK,CAAA;AAClD,eAAO,MAAM,yCAAyC,OAAO,CAAA;AAC7D,eAAO,MAAM,mCAAmC,SAAS,CAAA;AACzD,eAAO,MAAM,yCAAyC,IAAI,CAAA;AAE1D,MAAM,MAAM,wBAAwB,GAAG;IACrC,iBAAiB,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,8BAA8B,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,8BAA8B,CAAC,EAAE,MAAM,CAAA;IACvC,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,mBAAmB,CAAC,EAAE,wBAAwB,CAAA;IAC9C,MAAM,CAAC,EAAE,4BAA4B,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,iCAAiC,CAAC,EAAE,OAAO,CAAA;IAC3C,eAAe,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAA;IAC7D,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,8BAA8B,CAAC,EAAE,MAAM,CAAA;IACvC,wBAAwB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1C,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC,6BAA6B,CAAC,EAAE,OAAO,CAAA;IACvC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,+BAA+B,CAAA;IAC5C,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC,QAAQ,CAAC,EAAE,6BAA6B,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAiND,eAAO,MAAM,qBAAqB,6GAGD,CAAA"}
|
|
@@ -15329,7 +15329,7 @@ var templateObject_1$a, templateObject_2$9, templateObject_3$8, templateObject_4
|
|
|
15329
15329
|
var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
|
|
15330
15330
|
var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
|
|
15331
15331
|
var DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE = 'head';
|
|
15332
|
-
var DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD
|
|
15332
|
+
var DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD = 2;
|
|
15333
15333
|
function VideoSignatureCaptureComponent(_a, ref) {
|
|
15334
15334
|
var onSignatureVideoCaptured = _a.onSignatureVideoCaptured,
|
|
15335
15335
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
@@ -15346,37 +15346,39 @@ function VideoSignatureCaptureComponent(_a, ref) {
|
|
|
15346
15346
|
_f = _a.headTrackingBoundaryType,
|
|
15347
15347
|
headTrackingBoundaryType = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _f,
|
|
15348
15348
|
_g = _a.faceNotDetectedFrameThreshold,
|
|
15349
|
-
faceNotDetectedFrameThreshold = _g === void 0 ? DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD
|
|
15350
|
-
_h = _a.
|
|
15351
|
-
|
|
15352
|
-
_j = _a.
|
|
15353
|
-
|
|
15354
|
-
_k = _a.
|
|
15355
|
-
|
|
15356
|
-
_l = _a.
|
|
15357
|
-
|
|
15358
|
-
_m = _a.
|
|
15359
|
-
|
|
15360
|
-
|
|
15349
|
+
faceNotDetectedFrameThreshold = _g === void 0 ? DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD : _g,
|
|
15350
|
+
_h = _a.disableFaceNotDetectedKickout,
|
|
15351
|
+
disableFaceNotDetectedKickout = _h === void 0 ? false : _h,
|
|
15352
|
+
_j = _a.captureAudio,
|
|
15353
|
+
captureAudio = _j === void 0 ? false : _j,
|
|
15354
|
+
_k = _a.classNames,
|
|
15355
|
+
classNames = _k === void 0 ? {} : _k,
|
|
15356
|
+
_l = _a.colors,
|
|
15357
|
+
colors = _l === void 0 ? {} : _l,
|
|
15358
|
+
_m = _a.verbiage,
|
|
15359
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
15360
|
+
_o = _a.debugMode,
|
|
15361
|
+
debugMode = _o === void 0 ? false : _o;
|
|
15362
|
+
var _p = useCameraStore(shallow.useShallow(function (state) {
|
|
15361
15363
|
return {
|
|
15362
15364
|
videoWidth: state.videoWidth,
|
|
15363
15365
|
videoHeight: state.videoHeight
|
|
15364
15366
|
};
|
|
15365
15367
|
})),
|
|
15366
|
-
videoWidth =
|
|
15367
|
-
videoHeight =
|
|
15368
|
-
var
|
|
15369
|
-
onHeadTrackingPredictionMade =
|
|
15370
|
-
startHeadTracking =
|
|
15371
|
-
stopHeadTracking =
|
|
15372
|
-
var
|
|
15368
|
+
videoWidth = _p.videoWidth,
|
|
15369
|
+
videoHeight = _p.videoHeight;
|
|
15370
|
+
var _q = useSelfieGuidanceModelsContext(),
|
|
15371
|
+
onHeadTrackingPredictionMade = _q.onPredictionMade,
|
|
15372
|
+
startHeadTracking = _q.start,
|
|
15373
|
+
stopHeadTracking = _q.stop;
|
|
15374
|
+
var _r = useVideoSignatureStore(shallow.useShallow(function (state) {
|
|
15373
15375
|
return {
|
|
15374
15376
|
firstChunkReceivedAt: state.firstChunkReceivedAt,
|
|
15375
15377
|
acceptClickedAt: state.acceptClickedAt
|
|
15376
15378
|
};
|
|
15377
15379
|
})),
|
|
15378
|
-
firstChunkReceivedAt =
|
|
15379
|
-
acceptClickedAt =
|
|
15380
|
+
firstChunkReceivedAt = _r.firstChunkReceivedAt,
|
|
15381
|
+
acceptClickedAt = _r.acceptClickedAt;
|
|
15380
15382
|
React.useImperativeHandle(ref, function () {
|
|
15381
15383
|
return {
|
|
15382
15384
|
clearRecordedData: function clearRecordedData() {
|
|
@@ -15402,15 +15404,15 @@ function VideoSignatureCaptureComponent(_a, ref) {
|
|
|
15402
15404
|
var verbiage = useTranslations(rawVerbiage, {
|
|
15403
15405
|
guidanceMessageText: 'Please sign the box below'
|
|
15404
15406
|
});
|
|
15405
|
-
var
|
|
15406
|
-
headTrackingSatisfied =
|
|
15407
|
-
setHeadTrackingSatisfied =
|
|
15408
|
-
var
|
|
15409
|
-
lastFace =
|
|
15410
|
-
setLastFace =
|
|
15411
|
-
var
|
|
15412
|
-
numFramesWithoutFaces =
|
|
15413
|
-
setNumFramesWithoutFaces =
|
|
15407
|
+
var _s = React.useState(true),
|
|
15408
|
+
headTrackingSatisfied = _s[0],
|
|
15409
|
+
setHeadTrackingSatisfied = _s[1];
|
|
15410
|
+
var _t = React.useState(null),
|
|
15411
|
+
lastFace = _t[0],
|
|
15412
|
+
setLastFace = _t[1];
|
|
15413
|
+
var _u = React.useState(0),
|
|
15414
|
+
numFramesWithoutFaces = _u[0],
|
|
15415
|
+
setNumFramesWithoutFaces = _u[1];
|
|
15414
15416
|
onHeadTrackingPredictionMade(useDebounce.useThrottledCallback(React.useCallback(function (_a) {
|
|
15415
15417
|
var face = _a.face;
|
|
15416
15418
|
if (headTrackingDisabled) return;
|
|
@@ -15426,23 +15428,22 @@ function VideoSignatureCaptureComponent(_a, ref) {
|
|
|
15426
15428
|
return n + 1;
|
|
15427
15429
|
});
|
|
15428
15430
|
}, [headTrackingBoundaryPercentage, headTrackingBoundaryType, headTrackingDisabled, videoHeight, videoWidth]), 16));
|
|
15429
|
-
var
|
|
15430
|
-
containerRef =
|
|
15431
|
-
|
|
15432
|
-
width =
|
|
15433
|
-
|
|
15434
|
-
height =
|
|
15431
|
+
var _v = useResizeObserver(),
|
|
15432
|
+
containerRef = _v.ref,
|
|
15433
|
+
_w = _v.width,
|
|
15434
|
+
width = _w === void 0 ? 1 : _w,
|
|
15435
|
+
_x = _v.height,
|
|
15436
|
+
height = _x === void 0 ? 1 : _x;
|
|
15435
15437
|
var debugScalingDetails = useDebugScalingDetails({
|
|
15436
15438
|
enabled: debugMode,
|
|
15437
15439
|
pageWidth: width,
|
|
15438
15440
|
pageHeight: height
|
|
15439
15441
|
});
|
|
15440
15442
|
React.useEffect(function () {
|
|
15441
|
-
if (numFramesWithoutFaces >= faceNotDetectedFrameThreshold) {
|
|
15442
|
-
alert("Face not detected threshold met: ".concat(numFramesWithoutFaces, " frames without face (threshold: ").concat(faceNotDetectedFrameThreshold, ")"));
|
|
15443
|
+
if (!disableFaceNotDetectedKickout && numFramesWithoutFaces >= faceNotDetectedFrameThreshold) {
|
|
15443
15444
|
onFaceNotDetected === null || onFaceNotDetected === void 0 ? void 0 : onFaceNotDetected();
|
|
15444
15445
|
}
|
|
15445
|
-
}, [numFramesWithoutFaces, faceNotDetectedFrameThreshold, onFaceNotDetected]);
|
|
15446
|
+
}, [disableFaceNotDetectedKickout, numFramesWithoutFaces, faceNotDetectedFrameThreshold, onFaceNotDetected]);
|
|
15446
15447
|
var GuidesComponent = guidesComponent !== null && guidesComponent !== void 0 ? guidesComponent : VideoSignatureGuides;
|
|
15447
15448
|
return /*#__PURE__*/React__namespace.default.createElement(Container$2, {
|
|
15448
15449
|
ref: containerRef,
|
|
@@ -16674,8 +16675,6 @@ function getRawTextFromHtml(str) {
|
|
|
16674
16675
|
return s;
|
|
16675
16676
|
}
|
|
16676
16677
|
|
|
16677
|
-
var edgeBoundary = 0.05;
|
|
16678
|
-
var DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD = 5;
|
|
16679
16678
|
var defaultVideoIdCaptureThresholds = {
|
|
16680
16679
|
detection: {
|
|
16681
16680
|
idCardFront: 0.4,
|
|
@@ -16710,99 +16709,100 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
16710
16709
|
flipShortcutThreshold: 0.7
|
|
16711
16710
|
};
|
|
16712
16711
|
var IdVideoCapture = function IdVideoCapture(_a) {
|
|
16713
|
-
var _b, _c, _d, _e
|
|
16712
|
+
var _b, _c, _d, _e;
|
|
16714
16713
|
var onComplete = _a.onComplete,
|
|
16715
16714
|
onIdFrontImageCaptured = _a.onIdFrontImageCaptured,
|
|
16716
16715
|
onIdBackImageCaptured = _a.onIdBackImageCaptured,
|
|
16717
|
-
|
|
16716
|
+
// onFaceNotDetected,
|
|
16718
16717
|
onRecordingFailed = _a.onRecordingFailed,
|
|
16719
16718
|
onExitCapture = _a.onExitCapture,
|
|
16720
|
-
|
|
16721
|
-
idCaptureModelsEnabled =
|
|
16722
|
-
|
|
16723
|
-
idDocumentType =
|
|
16724
|
-
|
|
16725
|
-
idCaptureGuideImages =
|
|
16726
|
-
|
|
16727
|
-
idCardFrontDelay =
|
|
16728
|
-
|
|
16729
|
-
videoIdCaptureThresholds =
|
|
16730
|
-
|
|
16731
|
-
skipShowIdCardBack =
|
|
16732
|
-
|
|
16733
|
-
captureCountdownSeconds =
|
|
16719
|
+
_f = _a.idCaptureModelsEnabled,
|
|
16720
|
+
idCaptureModelsEnabled = _f === void 0 ? true : _f,
|
|
16721
|
+
_g = _a.idDocumentType,
|
|
16722
|
+
idDocumentType = _g === void 0 ? 'idCard' : _g,
|
|
16723
|
+
_h = _a.idCaptureGuideImages,
|
|
16724
|
+
idCaptureGuideImages = _h === void 0 ? defaultIdCaptureGuideImages : _h,
|
|
16725
|
+
_j = _a.idCardFrontDelay,
|
|
16726
|
+
idCardFrontDelay = _j === void 0 ? 1000 : _j,
|
|
16727
|
+
_k = _a.videoIdCaptureThresholds,
|
|
16728
|
+
videoIdCaptureThresholds = _k === void 0 ? defaultVideoIdCaptureThresholds : _k,
|
|
16729
|
+
_l = _a.skipShowIdCardBack,
|
|
16730
|
+
skipShowIdCardBack = _l === void 0 ? false : _l,
|
|
16731
|
+
_m = _a.captureCountdownSeconds,
|
|
16732
|
+
captureCountdownSeconds = _m === void 0 ? 3 : _m,
|
|
16734
16733
|
readTextPrompt = _a.readTextPrompt,
|
|
16735
|
-
|
|
16736
|
-
readTextTimeoutDurationMs =
|
|
16737
|
-
|
|
16738
|
-
readTextMinReadingMs =
|
|
16739
|
-
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
-
|
|
16746
|
-
|
|
16747
|
-
|
|
16748
|
-
|
|
16749
|
-
|
|
16750
|
-
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
16761
|
-
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
var
|
|
16775
|
-
idModelsReady =
|
|
16776
|
-
startIdModels =
|
|
16777
|
-
stopIdModels =
|
|
16778
|
-
onIdPredictionMade =
|
|
16779
|
-
setThresholds =
|
|
16780
|
-
setRequiredDocumentType =
|
|
16781
|
-
setDocumentDetectionBoundaries =
|
|
16782
|
-
bestFrameDetails =
|
|
16783
|
-
resetBestFrame =
|
|
16784
|
-
idModelError =
|
|
16785
|
-
var
|
|
16786
|
-
videoStartsAt =
|
|
16787
|
-
setVideoStartsAt =
|
|
16788
|
-
var
|
|
16789
|
-
setIdCaptureVideoAudioStartsAt =
|
|
16790
|
-
setExpectedAudioText =
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
|
|
16794
|
-
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16734
|
+
_o = _a.readTextTimeoutDurationMs,
|
|
16735
|
+
readTextTimeoutDurationMs = _o === void 0 ? 15000 : _o,
|
|
16736
|
+
_p = _a.readTextMinReadingMs,
|
|
16737
|
+
readTextMinReadingMs = _p === void 0 ? 10000 : _p,
|
|
16738
|
+
// disableFaceDetectionWhileAudioCapture = false,
|
|
16739
|
+
// disableFaceDetectionWhileAudioCaptureMsDelay = 2000,
|
|
16740
|
+
// faceNotDetectedFrameThreshold = DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD,
|
|
16741
|
+
// disableFaceNotDetectedKickout = true,
|
|
16742
|
+
_q = _a.mergeAVStreams,
|
|
16743
|
+
// disableFaceDetectionWhileAudioCapture = false,
|
|
16744
|
+
// disableFaceDetectionWhileAudioCaptureMsDelay = 2000,
|
|
16745
|
+
// faceNotDetectedFrameThreshold = DEFAULT_FACE_NOT_DETECTED_FRAME_THRESHOLD,
|
|
16746
|
+
// disableFaceNotDetectedKickout = true,
|
|
16747
|
+
mergeAVStreams = _q === void 0 ? false : _q,
|
|
16748
|
+
_r = _a.classNames,
|
|
16749
|
+
classNames = _r === void 0 ? {} : _r,
|
|
16750
|
+
_s = _a.colors,
|
|
16751
|
+
colors = _s === void 0 ? {} : _s,
|
|
16752
|
+
_t = _a.verbiage,
|
|
16753
|
+
rawVerbiage = _t === void 0 ? {} : _t,
|
|
16754
|
+
_u = _a.debugMode,
|
|
16755
|
+
debugMode = _u === void 0 ? false : _u;
|
|
16756
|
+
var _v = useResizeObserver(),
|
|
16757
|
+
ref = _v.ref,
|
|
16758
|
+
_w = _v.width,
|
|
16759
|
+
width = _w === void 0 ? 1 : _w,
|
|
16760
|
+
_x = _v.height,
|
|
16761
|
+
height = _x === void 0 ? 1 : _x;
|
|
16762
|
+
var _y = useCameraStore(),
|
|
16763
|
+
videoRef = _y.videoRef,
|
|
16764
|
+
videoLoaded = _y.videoLoaded,
|
|
16765
|
+
cameraReady = _y.cameraReady,
|
|
16766
|
+
microphoneReady = _y.microphoneReady,
|
|
16767
|
+
isRearFacing = _y.isRearFacing,
|
|
16768
|
+
releaseCameraAccess = _y.releaseCameraAccess;
|
|
16769
|
+
var _z = React.useState([]),
|
|
16770
|
+
detectedObjects = _z[0],
|
|
16771
|
+
setDetectedObjects = _z[1];
|
|
16772
|
+
// const [face, setFace] = useState<Face | null>(null)
|
|
16773
|
+
var _0 = React.useContext(IdCaptureModelsContext),
|
|
16774
|
+
idModelsReady = _0.ready,
|
|
16775
|
+
startIdModels = _0.start,
|
|
16776
|
+
stopIdModels = _0.stop,
|
|
16777
|
+
onIdPredictionMade = _0.onPredictionMade,
|
|
16778
|
+
setThresholds = _0.setThresholds,
|
|
16779
|
+
setRequiredDocumentType = _0.setRequiredDocumentType,
|
|
16780
|
+
setDocumentDetectionBoundaries = _0.setDocumentDetectionBoundaries,
|
|
16781
|
+
bestFrameDetails = _0.bestFrameDetails,
|
|
16782
|
+
resetBestFrame = _0.resetBestFrame,
|
|
16783
|
+
idModelError = _0.modelError;
|
|
16784
|
+
var _1 = React.useState(null),
|
|
16785
|
+
videoStartsAt = _1[0],
|
|
16786
|
+
setVideoStartsAt = _1[1];
|
|
16787
|
+
var _2 = useSubmissionContext(),
|
|
16788
|
+
setIdCaptureVideoAudioStartsAt = _2.setIdCaptureVideoAudioStartsAt,
|
|
16789
|
+
setExpectedAudioText = _2.setExpectedAudioText;
|
|
16790
|
+
// const {
|
|
16791
|
+
// start: startSelfieGuidance,
|
|
16792
|
+
// stop: stopSelfieGuidance,
|
|
16793
|
+
// // onPredictionMade: onSelfiePredictionMade,
|
|
16794
|
+
// // error: selfieModelError,
|
|
16795
|
+
// } = useSelfieGuidanceModelsContext()
|
|
16796
|
+
var _3 = useVideoRecorder(mergeAVStreams),
|
|
16797
|
+
isRecordingVideo = _3.isRecordingVideo,
|
|
16798
|
+
videoRecordingUnintentionallyStopped = _3.videoRecordingUnintentionallyStopped,
|
|
16799
|
+
audioRecordingUnintentionallyStopped = _3.audioRecordingUnintentionallyStopped,
|
|
16800
|
+
videoUrl = _3.videoUrl,
|
|
16801
|
+
audioUrl = _3.audioUrl;
|
|
16802
16802
|
var countdownTimeoutRef = React.useRef(undefined);
|
|
16803
|
-
var
|
|
16804
|
-
countdownRemaining =
|
|
16805
|
-
setCountdownRemaining =
|
|
16803
|
+
var _4 = React.useState(-1),
|
|
16804
|
+
countdownRemaining = _4[0],
|
|
16805
|
+
setCountdownRemaining = _4[1];
|
|
16806
16806
|
React.useEffect(function () {
|
|
16807
16807
|
if (!isRecordingVideo && !videoUrl) {
|
|
16808
16808
|
useVideoRecorderStore.getState().startRecordingVideo();
|
|
@@ -16822,9 +16822,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16822
16822
|
onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
|
|
16823
16823
|
}
|
|
16824
16824
|
}, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
|
|
16825
|
-
var
|
|
16826
|
-
requestedAction =
|
|
16827
|
-
setRequestedAction =
|
|
16825
|
+
var _5 = React.useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
|
|
16826
|
+
requestedAction = _5[0],
|
|
16827
|
+
setRequestedAction = _5[1];
|
|
16828
16828
|
var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
|
|
16829
16829
|
React.useEffect(function startModelsWhenCapturing() {
|
|
16830
16830
|
if (!shouldRunIdModels) return;
|
|
@@ -16863,23 +16863,23 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16863
16863
|
bottom: 0
|
|
16864
16864
|
});
|
|
16865
16865
|
}, [setDocumentDetectionBoundaries]);
|
|
16866
|
-
var
|
|
16867
|
-
currentDetectionScore =
|
|
16868
|
-
setCurrentDetectionScore =
|
|
16869
|
-
var
|
|
16870
|
-
currentDetectedDocumentType =
|
|
16871
|
-
setCurrentDetectedDocumentType =
|
|
16872
|
-
var
|
|
16873
|
-
currentFocusScore =
|
|
16874
|
-
setCurrentFocusScore =
|
|
16875
|
-
var
|
|
16876
|
-
goodFramesCount =
|
|
16877
|
-
setGoodFramesCount =
|
|
16866
|
+
var _6 = React.useState(0),
|
|
16867
|
+
currentDetectionScore = _6[0],
|
|
16868
|
+
setCurrentDetectionScore = _6[1];
|
|
16869
|
+
var _7 = React.useState('none'),
|
|
16870
|
+
currentDetectedDocumentType = _7[0],
|
|
16871
|
+
setCurrentDetectedDocumentType = _7[1];
|
|
16872
|
+
var _8 = React.useState(0),
|
|
16873
|
+
currentFocusScore = _8[0],
|
|
16874
|
+
setCurrentFocusScore = _8[1];
|
|
16875
|
+
var _9 = React.useState(0),
|
|
16876
|
+
goodFramesCount = _9[0],
|
|
16877
|
+
setGoodFramesCount = _9[1];
|
|
16878
16878
|
var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
|
|
16879
16879
|
var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
|
|
16880
|
-
var
|
|
16881
|
-
isSinglePage =
|
|
16882
|
-
setIsSinglePage =
|
|
16880
|
+
var _10 = React.useState(false),
|
|
16881
|
+
isSinglePage = _10[0],
|
|
16882
|
+
setIsSinglePage = _10[1];
|
|
16883
16883
|
React.useEffect(function () {
|
|
16884
16884
|
if (!idCaptureModelsEnabled || idModelError) return;
|
|
16885
16885
|
onIdPredictionMade(function (prediction) {
|
|
@@ -16899,9 +16899,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16899
16899
|
} : 0);
|
|
16900
16900
|
});
|
|
16901
16901
|
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
|
|
16902
|
-
var
|
|
16903
|
-
idFrontCaptureStartedAt =
|
|
16904
|
-
setFirstGoodFrameTime =
|
|
16902
|
+
var _11 = React.useState(null),
|
|
16903
|
+
idFrontCaptureStartedAt = _11[0],
|
|
16904
|
+
setFirstGoodFrameTime = _11[1];
|
|
16905
16905
|
React.useEffect(function () {
|
|
16906
16906
|
if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
|
|
16907
16907
|
}, [goodFramesCount]);
|
|
@@ -16923,13 +16923,19 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16923
16923
|
useVideoRecorderStore.getState().stopRecordingVideo();
|
|
16924
16924
|
}
|
|
16925
16925
|
}, [setIdCaptureVideoAudioStartsAt, translatedText, videoStartsAt]);
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
16931
|
-
|
|
16932
|
-
|
|
16926
|
+
// const frameWidth = videoRef.current?.videoWidth ?? 0
|
|
16927
|
+
// const frameHeight = videoRef.current?.videoHeight ?? 0
|
|
16928
|
+
// const faceBox = face?.box
|
|
16929
|
+
// const faceCentered =
|
|
16930
|
+
// !faceBox ||
|
|
16931
|
+
// !frameWidth ||
|
|
16932
|
+
// (faceBox.xMin > frameWidth * edgeBoundary &&
|
|
16933
|
+
// faceBox.yMin > frameHeight * edgeBoundary &&
|
|
16934
|
+
// faceBox.xMax < frameWidth * (1 - edgeBoundary) &&
|
|
16935
|
+
// faceBox.yMax < frameHeight * (1 - edgeBoundary))
|
|
16936
|
+
var _12 = React.useState(),
|
|
16937
|
+
countdownStartedAt = _12[0],
|
|
16938
|
+
setCountdownStartedAt = _12[1];
|
|
16933
16939
|
var photoCanvas = React.useRef(null);
|
|
16934
16940
|
var frameLock = React.useRef(false);
|
|
16935
16941
|
var captureFrame = React.useCallback(function () {
|
|
@@ -16995,7 +17001,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
16995
17001
|
useVideoRecorderStore.getState().stopRecordingVideo();
|
|
16996
17002
|
useVideoRecorderStore.getState().stopRecordingAudio();
|
|
16997
17003
|
}, []);
|
|
16998
|
-
var satisfied = !isFlipping && goodFramesThresholdMet &&
|
|
17004
|
+
var satisfied = !isFlipping && goodFramesThresholdMet &&
|
|
17005
|
+
// faceCentered &&
|
|
17006
|
+
delaySatisfied;
|
|
16999
17007
|
React.useEffect(function () {
|
|
17000
17008
|
if (satisfied && !countdownStartedAt) {
|
|
17001
17009
|
setCountdownStartedAt(new Date());
|
|
@@ -17033,44 +17041,60 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
17033
17041
|
}
|
|
17034
17042
|
}, [captureFrame, countdownRemaining]);
|
|
17035
17043
|
var timeoutStartedAt = useTimeout(readTextTimeoutDurationMs, stopRecording, requestedAction !== 'READ_TEXT', false, requestedAction === 'READ_TEXT').timeoutStartedAt;
|
|
17036
|
-
|
|
17037
|
-
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
}, [startSelfieGuidance, stopSelfieGuidance])
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
|
|
17054
|
-
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17044
|
+
// useEffect(() => {
|
|
17045
|
+
// startSelfieGuidance()
|
|
17046
|
+
// return () => {
|
|
17047
|
+
// stopSelfieGuidance()
|
|
17048
|
+
// }
|
|
17049
|
+
// }, [startSelfieGuidance, stopSelfieGuidance])
|
|
17050
|
+
// const [numFramesWithoutFaces, setNumFramesWithoutFaces] = useState(0)
|
|
17051
|
+
// onSelfiePredictionMade(
|
|
17052
|
+
// useThrottledCallback<SelfieGuidancePredictionHandler>(
|
|
17053
|
+
// useCallback(
|
|
17054
|
+
// ({ face }) => {
|
|
17055
|
+
// if (selfieModelError) return
|
|
17056
|
+
// setFace(face)
|
|
17057
|
+
// setNumFramesWithoutFaces(face ? 0 : (n) => n + 1)
|
|
17058
|
+
// },
|
|
17059
|
+
// [selfieModelError],
|
|
17060
|
+
// ),
|
|
17061
|
+
// 16, // locks to 60fps maximum
|
|
17062
|
+
// ),
|
|
17063
|
+
// )
|
|
17064
|
+
// useEffect(() => {
|
|
17065
|
+
// if (disableFaceNotDetectedKickout) return
|
|
17066
|
+
// const ignoreMissingFaces =
|
|
17067
|
+
// disableFaceDetectionWhileAudioCapture &&
|
|
17068
|
+
// timeoutStartedAt?.getTime() &&
|
|
17069
|
+
// new Date().getTime() - timeoutStartedAt?.getTime() >
|
|
17070
|
+
// disableFaceDetectionWhileAudioCaptureMsDelay
|
|
17071
|
+
// if (
|
|
17072
|
+
// !ignoreMissingFaces &&
|
|
17073
|
+
// numFramesWithoutFaces >= faceNotDetectedFrameThreshold
|
|
17074
|
+
// ) {
|
|
17075
|
+
// onFaceNotDetected?.()
|
|
17076
|
+
// }
|
|
17077
|
+
// }, [
|
|
17078
|
+
// disableFaceNotDetectedKickout,
|
|
17079
|
+
// disableFaceDetectionWhileAudioCapture,
|
|
17080
|
+
// disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
17081
|
+
// faceNotDetectedFrameThreshold,
|
|
17082
|
+
// numFramesWithoutFaces,
|
|
17083
|
+
// onFaceNotDetected,
|
|
17084
|
+
// timeoutStartedAt,
|
|
17085
|
+
// ])
|
|
17086
|
+
// const theme = useTheme()
|
|
17087
|
+
var captureBtnText = useTranslations(rawVerbiage, {
|
|
17088
|
+
faceNotCenteredText: 'Please move your face to the center...',
|
|
17089
|
+
captureBtnText: 'Capture'
|
|
17090
|
+
}).captureBtnText;
|
|
17067
17091
|
var debugScalingDetails = useDebugScalingDetails({
|
|
17068
17092
|
enabled: debugMode,
|
|
17069
17093
|
pageWidth: width,
|
|
17070
17094
|
pageHeight: height
|
|
17071
17095
|
});
|
|
17072
17096
|
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
17073
|
-
|
|
17097
|
+
// const guidanceText = !faceCentered ? faceNotCenteredText : undefined
|
|
17074
17098
|
var readTextPromptVerbiage = React.useMemo(function () {
|
|
17075
17099
|
return _assign({
|
|
17076
17100
|
promptText: readTextPrompt
|
|
@@ -17110,16 +17134,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
17110
17134
|
color: "blue",
|
|
17111
17135
|
flipX: !isRearFacing
|
|
17112
17136
|
});
|
|
17113
|
-
})), /*#__PURE__*/React__namespace.default.createElement(
|
|
17114
|
-
face: face,
|
|
17115
|
-
scaling: debugScalingDetails
|
|
17116
|
-
}))))))), guidanceText && idCaptureModelsEnabled && !idModelError && ( /*#__PURE__*/React__namespace.default.createElement(GuidanceMessageContainer, {
|
|
17117
|
-
className: classNames.guidanceMessageContainer
|
|
17118
|
-
}, /*#__PURE__*/React__namespace.default.createElement(GuidanceMessage, {
|
|
17119
|
-
className: classNames.guidanceMessage,
|
|
17120
|
-
"$background": (_h = (_g = (_f = theme.guidanceMessages) === null || _f === void 0 ? void 0 : _f.negative) === null || _g === void 0 ? void 0 : _g.backgroundColor) !== null && _h !== void 0 ? _h : 'red',
|
|
17121
|
-
"$textColor": (_l = (_k = (_j = theme.guidanceMessages) === null || _j === void 0 ? void 0 : _j.negative) === null || _k === void 0 ? void 0 : _k.textColor) !== null && _l !== void 0 ? _l : 'white'
|
|
17122
|
-
}, guidanceText))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__namespace.default.createElement("br", null), isRecordingVideo ? '✅ Recording' : '❌ Not recording', /*#__PURE__*/React__namespace.default.createElement("br", null), goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', goodFramesCount, "/", goodFramesThreshold, /*#__PURE__*/React__namespace.default.createElement("br", null), "Document Type: ", currentDetectedDocumentType, /*#__PURE__*/React__namespace.default.createElement("br", null), "Detection Score: ", currentDetectionScore, /*#__PURE__*/React__namespace.default.createElement("br", null), "Focus Score: ", currentFocusScore, /*#__PURE__*/React__namespace.default.createElement("br", null), "Best Frame Detection Score:", ' ', (_o = (_m = bestFrameDetails.current) === null || _m === void 0 ? void 0 : _m.detectionScore) !== null && _o !== void 0 ? _o : 0, /*#__PURE__*/React__namespace.default.createElement("br", null), "Best Frame Focus Score: ", (_q = (_p = bestFrameDetails.current) === null || _p === void 0 ? void 0 : _p.focusScore) !== null && _q !== void 0 ? _q : 0)), countdownRemaining > 0 && capturingId && ( /*#__PURE__*/React__namespace.default.createElement(CountdownContainer, {
|
|
17137
|
+
})))))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__namespace.default.createElement("br", null), isRecordingVideo ? '✅ Recording' : '❌ Not recording', /*#__PURE__*/React__namespace.default.createElement("br", null), goodFramesThresholdMet ? '✅' : '❌', " Good Frame Count:", ' ', goodFramesCount, "/", goodFramesThreshold, /*#__PURE__*/React__namespace.default.createElement("br", null), "Document Type: ", currentDetectedDocumentType, /*#__PURE__*/React__namespace.default.createElement("br", null), "Detection Score: ", currentDetectionScore, /*#__PURE__*/React__namespace.default.createElement("br", null), "Focus Score: ", currentFocusScore, /*#__PURE__*/React__namespace.default.createElement("br", null), "Best Frame Detection Score:", ' ', (_c = (_b = bestFrameDetails.current) === null || _b === void 0 ? void 0 : _b.detectionScore) !== null && _c !== void 0 ? _c : 0, /*#__PURE__*/React__namespace.default.createElement("br", null), "Best Frame Focus Score: ", (_e = (_d = bestFrameDetails.current) === null || _d === void 0 ? void 0 : _d.focusScore) !== null && _e !== void 0 ? _e : 0)), countdownRemaining > 0 && capturingId && ( /*#__PURE__*/React__namespace.default.createElement(CountdownContainer, {
|
|
17123
17138
|
className: classNames.countdownContainer
|
|
17124
17139
|
}, /*#__PURE__*/React__namespace.default.createElement(Countdown, {
|
|
17125
17140
|
className: classNames.countdown
|