idmission-web-sdk 2.3.60 → 2.3.61
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/common/GuidanceMessage.d.ts.map +1 -1
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +4 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +2 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationCapture.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +2 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +2 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +3 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +5 -2
- package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +2 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureWizard.d.ts +3 -1
- package/dist/components/selfie_capture/SelfieCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +3 -1
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -1
- package/dist/lib/utils/cropping.d.ts +1 -1
- package/dist/lib/utils/cropping.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +440 -316
- 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 +440 -316
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +440 -316
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.61';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
var ButtonsRow$2 = styled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"])));
|
|
460
460
|
var templateObject_1$R;
|
|
461
461
|
|
|
462
|
-
var GuidanceMessageContainerDiv = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
462
|
+
var GuidanceMessageContainerDiv = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"])), function (_a) {
|
|
463
463
|
var $top = _a.$top;
|
|
464
464
|
return $top !== null && $top !== void 0 ? $top : '10%';
|
|
465
465
|
}, function (_a) {
|
|
@@ -472,33 +472,33 @@
|
|
|
472
472
|
if (!portalLocation) return element;
|
|
473
473
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
474
474
|
};
|
|
475
|
-
var GuidanceMessage = styled.div(templateObject_2$
|
|
475
|
+
var GuidanceMessage = styled.div(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])), function (props) {
|
|
476
476
|
var _a, _b, _c, _d, _e, _f;
|
|
477
|
-
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : '
|
|
477
|
+
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : 'white';
|
|
478
478
|
}, function (props) {
|
|
479
479
|
var _a, _b, _c, _d, _e, _f;
|
|
480
480
|
return (_f = (_a = props.$textColor) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.textColor) !== null && _f !== void 0 ? _f : 'black';
|
|
481
481
|
});
|
|
482
|
-
var templateObject_1$Q, templateObject_2$
|
|
482
|
+
var templateObject_1$Q, templateObject_2$I;
|
|
483
483
|
|
|
484
484
|
var wavesAnimation = styled.keyframes(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"])));
|
|
485
|
-
var progressBarAnimation = styled.keyframes(templateObject_2$
|
|
486
|
-
var dualRingSpinnerAnimation = styled.keyframes(templateObject_3$
|
|
485
|
+
var progressBarAnimation = styled.keyframes(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"], ["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"])));
|
|
486
|
+
var dualRingSpinnerAnimation = styled.keyframes(templateObject_3$u || (templateObject_3$u = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
487
487
|
var progressBorderAnimation = styled.keyframes(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n to {\n stroke-dashoffset: 0;\n }\n"], ["\n to {\n stroke-dashoffset: 0;\n }\n"])));
|
|
488
|
-
var templateObject_1$P, templateObject_2$
|
|
488
|
+
var templateObject_1$P, templateObject_2$H, templateObject_3$u, templateObject_4$n;
|
|
489
489
|
|
|
490
490
|
var OverlayContainer = styled.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"])), function (props) {
|
|
491
491
|
return props.theme.background ? "".concat(props.theme.background) : "white";
|
|
492
492
|
}, function (props) {
|
|
493
493
|
return props.theme.textColor ? "color: ".concat(props.theme.textColor, ";") : "";
|
|
494
494
|
});
|
|
495
|
-
var OverlayInner$2 = styled.div(templateObject_2$
|
|
495
|
+
var OverlayInner$2 = styled.div(templateObject_2$G || (templateObject_2$G = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"])), function (props) {
|
|
496
496
|
var _a;
|
|
497
497
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
498
498
|
}, function (props) {
|
|
499
499
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
500
500
|
});
|
|
501
|
-
var OverlayImageContainer = styled.div(templateObject_3$
|
|
501
|
+
var OverlayImageContainer = styled.div(templateObject_3$t || (templateObject_3$t = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
|
|
502
502
|
var OverlayImageRow = styled.div(templateObject_4$m || (templateObject_4$m = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
|
|
503
503
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
504
504
|
var ButtonsColumn = styled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
}, function (props) {
|
|
521
521
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
522
522
|
});
|
|
523
|
-
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n
|
|
523
|
+
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"], ["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"])));
|
|
524
524
|
var LoadingOverlayImageContainer = styled(OverlayImageContainer)(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"], ["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"])));
|
|
525
525
|
var LoadingOverlayProgressBarBackground = styled.div.attrs({
|
|
526
526
|
className: 'loading-overlay-progress-bar-background'
|
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
541
541
|
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
542
542
|
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
543
|
-
var templateObject_1$O, templateObject_2$
|
|
543
|
+
var templateObject_1$O, templateObject_2$G, templateObject_3$t, templateObject_4$m, templateObject_5$e, templateObject_6$9, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
544
544
|
|
|
545
545
|
function _extends() {
|
|
546
546
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -8112,6 +8112,7 @@
|
|
|
8112
8112
|
var templateObject_1$N;
|
|
8113
8113
|
|
|
8114
8114
|
function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quality, maxHeight) {
|
|
8115
|
+
var _a;
|
|
8115
8116
|
if (quality === void 0) {
|
|
8116
8117
|
quality = 0.92;
|
|
8117
8118
|
}
|
|
@@ -8128,10 +8129,14 @@
|
|
|
8128
8129
|
cropCanvas.height = frame.height;
|
|
8129
8130
|
cropCtx.drawImage(rawCanvas, 0, 0, cropCanvas.width, cropCanvas.height);
|
|
8130
8131
|
} else {
|
|
8131
|
-
var _a = face.box
|
|
8132
|
-
|
|
8133
|
-
|
|
8132
|
+
var _b = (_a = face === null || face === void 0 ? void 0 : face.box) !== null && _a !== void 0 ? _a : {
|
|
8133
|
+
xMin: 0,
|
|
8134
|
+
width: frame.width
|
|
8135
|
+
},
|
|
8136
|
+
xMin = _b.xMin,
|
|
8137
|
+
width = _b.width;
|
|
8134
8138
|
var desiredWidth = frame.height * 0.6;
|
|
8139
|
+
alert("this side! ".concat(desiredWidth, "x").concat(frame.height));
|
|
8135
8140
|
var faceCenterX = xMin + width / 2;
|
|
8136
8141
|
var xPos = Math.max(0, faceCenterX - desiredWidth / 2);
|
|
8137
8142
|
cropCanvas.width = desiredWidth;
|
|
@@ -8630,6 +8635,9 @@
|
|
|
8630
8635
|
clearTimeout(modelLoadTimeout);
|
|
8631
8636
|
setModelLoadState('warming');
|
|
8632
8637
|
setModelWarmingStartedAt(new Date().getTime());
|
|
8638
|
+
return [4 /*yield*/, testFaceDetectionAgainstKnownImage(model)];
|
|
8639
|
+
case 1:
|
|
8640
|
+
_b.sent();
|
|
8633
8641
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8634
8642
|
cancelled = false;
|
|
8635
8643
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8637,7 +8645,7 @@
|
|
|
8637
8645
|
cancel();
|
|
8638
8646
|
};
|
|
8639
8647
|
return [4 /*yield*/, videoReady];
|
|
8640
|
-
case
|
|
8648
|
+
case 2:
|
|
8641
8649
|
_b.sent();
|
|
8642
8650
|
if (cancelled) return [2 /*return*/];
|
|
8643
8651
|
model.detectForVideo(videoRef.current, performance.now());
|
|
@@ -8789,6 +8797,26 @@
|
|
|
8789
8797
|
faceIsStable: faceIsStable
|
|
8790
8798
|
};
|
|
8791
8799
|
}
|
|
8800
|
+
function testFaceDetectionAgainstKnownImage(detector) {
|
|
8801
|
+
return new Promise(function (resolve, reject) {
|
|
8802
|
+
var img = new Image();
|
|
8803
|
+
img.crossOrigin = 'anonymous';
|
|
8804
|
+
img.onload = function () {
|
|
8805
|
+
var prediction = detector.detectForVideo(img, performance.now());
|
|
8806
|
+
if (prediction.detections.length > 0) {
|
|
8807
|
+
debug('face detection test result', prediction.detections);
|
|
8808
|
+
resolve(void 0);
|
|
8809
|
+
} else {
|
|
8810
|
+
warn('face detection test failed');
|
|
8811
|
+
reject(new Error('testFaceDetectionAgainstKnownImage failed to predict'));
|
|
8812
|
+
}
|
|
8813
|
+
};
|
|
8814
|
+
img.onerror = function () {
|
|
8815
|
+
return reject(new Error('testFaceDetectionAgainstKnownImage failed to load image'));
|
|
8816
|
+
};
|
|
8817
|
+
img.src = "".concat(DEFAULT_CDN_URL, "/head-test.jpg");
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8792
8820
|
|
|
8793
8821
|
var preloadModels = function preloadModels(_a) {
|
|
8794
8822
|
return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -14014,13 +14042,13 @@
|
|
|
14014
14042
|
}, messageText)));
|
|
14015
14043
|
}
|
|
14016
14044
|
var StyledOverlayInner$4 = styled(OverlayInner$2)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
14017
|
-
var StyledOverlayHeading = styled.h3(templateObject_2$
|
|
14045
|
+
var StyledOverlayHeading = styled.h3(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
14018
14046
|
function useCameraStore(selector) {
|
|
14019
14047
|
var store = React.useContext(CameraStoreContext);
|
|
14020
14048
|
if (!store) throw new Error('useCameraStore cannot be used without Provider');
|
|
14021
14049
|
return useStore(store, selector);
|
|
14022
14050
|
}
|
|
14023
|
-
var templateObject_1$M, templateObject_2$
|
|
14051
|
+
var templateObject_1$M, templateObject_2$F;
|
|
14024
14052
|
|
|
14025
14053
|
var DocumentDetectionModelContext = /*#__PURE__*/React.createContext({
|
|
14026
14054
|
startDocumentDetection: function startDocumentDetection() {
|
|
@@ -15368,11 +15396,11 @@
|
|
|
15368
15396
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
15369
15397
|
}
|
|
15370
15398
|
var DebugStatsPaneDiv = styled.span(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"])));
|
|
15371
|
-
var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$
|
|
15399
|
+
var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$E || (templateObject_2$E = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
15372
15400
|
var $flipX = _a.$flipX;
|
|
15373
15401
|
return $flipX ? 'transform: scaleX(-1);' : '';
|
|
15374
15402
|
});
|
|
15375
|
-
var ObjectDetectionDebugBox = styled.div(templateObject_3$
|
|
15403
|
+
var ObjectDetectionDebugBox = styled.div(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"], ["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
15376
15404
|
var $color = _a.$color;
|
|
15377
15405
|
return $color !== null && $color !== void 0 ? $color : 'green';
|
|
15378
15406
|
}, function (_a) {
|
|
@@ -15579,7 +15607,7 @@
|
|
|
15579
15607
|
}
|
|
15580
15608
|
});
|
|
15581
15609
|
}
|
|
15582
|
-
var templateObject_1$L, templateObject_2$
|
|
15610
|
+
var templateObject_1$L, templateObject_2$E, templateObject_3$s, templateObject_4$l;
|
|
15583
15611
|
|
|
15584
15612
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
15585
15613
|
var _b = _a.classNames,
|
|
@@ -15619,11 +15647,11 @@
|
|
|
15619
15647
|
var _a, _b, _c;
|
|
15620
15648
|
return (_c = (_b = (_a = props.theme.idCapture) === null || _a === void 0 ? void 0 : _a.overrideWrongDocumentTypeGuidance) === null || _b === void 0 ? void 0 : _b.textColor) !== null && _c !== void 0 ? _c : 'black';
|
|
15621
15649
|
});
|
|
15622
|
-
var InnerContainer = styled.div(templateObject_2$
|
|
15623
|
-
var Message = styled.span(templateObject_3$
|
|
15650
|
+
var InnerContainer = styled.div(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"])));
|
|
15651
|
+
var Message = styled.span(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n display: block;\n margin: auto 12px auto 0;\n"], ["\n display: block;\n margin: auto 12px auto 0;\n"])));
|
|
15624
15652
|
var ButtonContainer = styled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
|
|
15625
15653
|
var Button$1 = styled(LoaderButton)(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n white-space: nowrap;\n margin: auto;\n"], ["\n white-space: nowrap;\n margin: auto;\n"])));
|
|
15626
|
-
var templateObject_1$K, templateObject_2$
|
|
15654
|
+
var templateObject_1$K, templateObject_2$D, templateObject_3$r, templateObject_4$k, templateObject_5$d;
|
|
15627
15655
|
|
|
15628
15656
|
// This is a simplified version of https://github.com/ZeeCoder/use-resize-observer.
|
|
15629
15657
|
// We have removed all options and made it compliant with React Compiler/React 19.
|
|
@@ -15952,12 +15980,12 @@
|
|
|
15952
15980
|
}, verbiage.retryBtnText)));
|
|
15953
15981
|
};
|
|
15954
15982
|
var StyledOverlayInner$3 = styled(OverlayInner$2)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
|
|
15955
|
-
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$
|
|
15956
|
-
var Description$4 = styled.p(templateObject_3$
|
|
15983
|
+
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$C || (templateObject_2$C = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
|
|
15984
|
+
var Description$4 = styled.p(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
|
|
15957
15985
|
var RetryButton$1 = styled(LoaderButton)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
|
|
15958
|
-
var templateObject_1$J, templateObject_2$
|
|
15986
|
+
var templateObject_1$J, templateObject_2$C, templateObject_3$q, templateObject_4$j;
|
|
15959
15987
|
|
|
15960
|
-
var ExitCaptureStyledButton = styled.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index:
|
|
15988
|
+
var ExitCaptureStyledButton = styled.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
|
|
15961
15989
|
var ExitCaptureButton = function ExitCaptureButton(_a) {
|
|
15962
15990
|
var onClick = _a.onClick,
|
|
15963
15991
|
className = _a.className;
|
|
@@ -16477,20 +16505,20 @@
|
|
|
16477
16505
|
}))));
|
|
16478
16506
|
}
|
|
16479
16507
|
var LoadingGraphicWrapper = styled.div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n width: 100%;\n height: 100%;\n"])));
|
|
16480
|
-
var LoadingGraphicSvg = styled.svg(templateObject_2$
|
|
16508
|
+
var LoadingGraphicSvg = styled.svg(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"], ["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"])), function (props) {
|
|
16481
16509
|
return props.$frame > 1 ? 1 : props.$frame === 1 ? 1.25 : 0.75;
|
|
16482
16510
|
}, function (props) {
|
|
16483
16511
|
return props.$frame >= 5 ? 10 : 0;
|
|
16484
16512
|
}, function (props) {
|
|
16485
16513
|
return props.$borderColor;
|
|
16486
16514
|
});
|
|
16487
|
-
var LoadingGraphicCardGroup = styled.g(templateObject_3$
|
|
16515
|
+
var LoadingGraphicCardGroup = styled.g(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
16488
16516
|
return props.$offScreen ? '-500px' : '0';
|
|
16489
16517
|
});
|
|
16490
16518
|
var LoadingGraphicPhoneGroup = styled.g(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
16491
16519
|
return props.$offScreen ? '40px' : '0';
|
|
16492
16520
|
});
|
|
16493
|
-
var templateObject_1$H, templateObject_2$
|
|
16521
|
+
var templateObject_1$H, templateObject_2$B, templateObject_3$p, templateObject_4$i;
|
|
16494
16522
|
|
|
16495
16523
|
function LoadingListItemIndicator(_a) {
|
|
16496
16524
|
var _b = _a.state,
|
|
@@ -16545,9 +16573,11 @@
|
|
|
16545
16573
|
var ready = _a.ready,
|
|
16546
16574
|
modelLoadState = _a.modelLoadState,
|
|
16547
16575
|
modelLoadProgress = _a.modelLoadProgress,
|
|
16576
|
+
modelError = _a.modelError,
|
|
16548
16577
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16549
16578
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16550
|
-
onLoadingCompleted = _a.onLoadingCompleted
|
|
16579
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16580
|
+
onLoadingFailed = _a.onLoadingFailed;
|
|
16551
16581
|
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
16552
16582
|
React.useEffect(function () {
|
|
16553
16583
|
onLoadingStartedRef.current = onLoadingStarted;
|
|
@@ -16560,6 +16590,10 @@
|
|
|
16560
16590
|
React.useEffect(function () {
|
|
16561
16591
|
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
16562
16592
|
}, [onLoadingCompleted]);
|
|
16593
|
+
var onLoadingFailedRef = React.useRef(onLoadingFailed);
|
|
16594
|
+
React.useEffect(function () {
|
|
16595
|
+
onLoadingFailedRef.current = onLoadingFailed;
|
|
16596
|
+
}, [onLoadingFailed]);
|
|
16563
16597
|
var loadingStarted = modelLoadState !== 'not-started';
|
|
16564
16598
|
React.useEffect(function () {
|
|
16565
16599
|
var _a;
|
|
@@ -16575,6 +16609,12 @@
|
|
|
16575
16609
|
var _a;
|
|
16576
16610
|
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
16577
16611
|
}, [ready]);
|
|
16612
|
+
React.useEffect(function () {
|
|
16613
|
+
var _a;
|
|
16614
|
+
if (modelLoadState === 'error') {
|
|
16615
|
+
(_a = onLoadingFailedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingFailedRef, modelError !== null && modelError !== void 0 ? modelError : undefined);
|
|
16616
|
+
}
|
|
16617
|
+
}, [modelLoadState, modelError]);
|
|
16578
16618
|
}
|
|
16579
16619
|
|
|
16580
16620
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
@@ -16583,6 +16623,7 @@
|
|
|
16583
16623
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
16584
16624
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16585
16625
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16626
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16586
16627
|
onDismissed = _a.onDismissed,
|
|
16587
16628
|
onUserCancel = _a.onUserCancel,
|
|
16588
16629
|
instructions = _a.instructions,
|
|
@@ -16603,7 +16644,8 @@
|
|
|
16603
16644
|
modelsReady = _o.ready,
|
|
16604
16645
|
modelLoadState = _o.modelLoadState,
|
|
16605
16646
|
modelDownloadProgress = _o.modelDownloadProgress,
|
|
16606
|
-
modelWarmingStartedAt = _o.modelWarmingStartedAt
|
|
16647
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt,
|
|
16648
|
+
modelError = _o.modelError;
|
|
16607
16649
|
var _p = useCameraStore(),
|
|
16608
16650
|
cameraReady = _p.cameraReady,
|
|
16609
16651
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -16647,9 +16689,11 @@
|
|
|
16647
16689
|
ready: ready,
|
|
16648
16690
|
modelLoadState: modelLoadState,
|
|
16649
16691
|
modelLoadProgress: modelLoadProgress,
|
|
16692
|
+
modelError: modelError,
|
|
16650
16693
|
onLoadingStarted: onLoadingStarted,
|
|
16651
16694
|
onLoadingProgress: onLoadingProgress,
|
|
16652
|
-
onLoadingCompleted: onLoadingCompleted
|
|
16695
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16696
|
+
onLoadingFailed: onLoadingFailed
|
|
16653
16697
|
});
|
|
16654
16698
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
16655
16699
|
if (cameraAccessDenied) {
|
|
@@ -16750,8 +16794,8 @@
|
|
|
16750
16794
|
var _a, _b, _c, _d;
|
|
16751
16795
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.textColor) !== null && _d !== void 0 ? _d : 'black';
|
|
16752
16796
|
});
|
|
16753
|
-
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$
|
|
16754
|
-
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$
|
|
16797
|
+
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$A || (templateObject_2$A = __makeTemplateObject(["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"])));
|
|
16798
|
+
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$o || (templateObject_3$o = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])));
|
|
16755
16799
|
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
16756
16800
|
var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
16757
16801
|
var _a, _b, _c, _d;
|
|
@@ -16790,10 +16834,10 @@
|
|
|
16790
16834
|
var _a, _b, _c, _d;
|
|
16791
16835
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
16792
16836
|
});
|
|
16793
|
-
var templateObject_1$G, templateObject_2$
|
|
16837
|
+
var templateObject_1$G, templateObject_2$A, templateObject_3$o, templateObject_4$h, templateObject_5$c, templateObject_6$8, templateObject_7$4, templateObject_8$3;
|
|
16794
16838
|
|
|
16795
16839
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
16796
|
-
var ContinuityCameraCheckbox = styled.input(templateObject_2$
|
|
16840
|
+
var ContinuityCameraCheckbox = styled.input(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
16797
16841
|
var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
16798
16842
|
var _b, _c, _d, _e;
|
|
16799
16843
|
var onDismissed = _a.onDismissed,
|
|
@@ -16914,7 +16958,7 @@
|
|
|
16914
16958
|
}
|
|
16915
16959
|
}, ready ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
|
|
16916
16960
|
};
|
|
16917
|
-
var templateObject_1$F, templateObject_2$
|
|
16961
|
+
var templateObject_1$F, templateObject_2$z;
|
|
16918
16962
|
|
|
16919
16963
|
var components$1 = {
|
|
16920
16964
|
"default": IdCaptureLoadingOverlayDefault,
|
|
@@ -16973,8 +17017,8 @@
|
|
|
16973
17017
|
};
|
|
16974
17018
|
|
|
16975
17019
|
var Card = styled.div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"], ["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"])));
|
|
16976
|
-
var FlexCard = styled(Card)(templateObject_2$
|
|
16977
|
-
var templateObject_1$E, templateObject_2$
|
|
17020
|
+
var FlexCard = styled(Card)(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
17021
|
+
var templateObject_1$E, templateObject_2$y;
|
|
16978
17022
|
|
|
16979
17023
|
var imageDisplayOrder = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage'];
|
|
16980
17024
|
var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
@@ -17037,12 +17081,12 @@
|
|
|
17037
17081
|
}, verbiage.retryText)))));
|
|
17038
17082
|
};
|
|
17039
17083
|
var Heading$a = styled.h1(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"], ["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"])));
|
|
17040
|
-
var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$
|
|
17041
|
-
var ImageRow = styled(OverlayImageRow)(templateObject_3$
|
|
17084
|
+
var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"], ["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"])));
|
|
17085
|
+
var ImageRow = styled(OverlayImageRow)(templateObject_3$n || (templateObject_3$n = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
|
|
17042
17086
|
var ImageCol$1 = styled.div(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
|
|
17043
17087
|
var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
17044
17088
|
var DebugPre = styled.pre(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
17045
|
-
var templateObject_1$D, templateObject_2$
|
|
17089
|
+
var templateObject_1$D, templateObject_2$x, templateObject_3$n, templateObject_4$g, templateObject_5$b, templateObject_6$7;
|
|
17046
17090
|
|
|
17047
17091
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
17048
17092
|
var _this = this;
|
|
@@ -17099,7 +17143,7 @@
|
|
|
17099
17143
|
}, function (props) {
|
|
17100
17144
|
return props.$isMobile ? props.$isLandscape ? 'height: 100%;' : 'width: 80%;' : props.$isLandscape ? 'height: 70%;' : 'width: 82%;';
|
|
17101
17145
|
});
|
|
17102
|
-
var IdCardGuideImage = styled.img(templateObject_2$
|
|
17146
|
+
var IdCardGuideImage = styled.img(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
|
|
17103
17147
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
17104
17148
|
}, function (props) {
|
|
17105
17149
|
return props.$isInvisible ? 'opacity: 0;' : '';
|
|
@@ -17249,7 +17293,7 @@
|
|
|
17249
17293
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
17250
17294
|
}));
|
|
17251
17295
|
}
|
|
17252
|
-
var IdCardBorderContainer = styled.div(templateObject_3$
|
|
17296
|
+
var IdCardBorderContainer = styled.div(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
|
|
17253
17297
|
var IdCardBorderInner = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"], ["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"])));
|
|
17254
17298
|
var SvgOverlay = styled.svg(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
|
|
17255
17299
|
var IdCardBorderRect = styled.rect(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
|
|
@@ -17259,7 +17303,7 @@
|
|
|
17259
17303
|
var _a;
|
|
17260
17304
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
17261
17305
|
});
|
|
17262
|
-
var templateObject_1$C, templateObject_2$
|
|
17306
|
+
var templateObject_1$C, templateObject_2$w, templateObject_3$m, templateObject_4$f, templateObject_5$a, templateObject_6$6;
|
|
17263
17307
|
|
|
17264
17308
|
var defaultIdCaptureGuideImages = {
|
|
17265
17309
|
portrait: {
|
|
@@ -17451,12 +17495,12 @@
|
|
|
17451
17495
|
var Wrapper$1 = styled.div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (props) {
|
|
17452
17496
|
return props.$isLandscape ? 'height: 100%;' : 'height: 100%;';
|
|
17453
17497
|
});
|
|
17454
|
-
var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_2$
|
|
17498
|
+
var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"], ["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"])), function (props) {
|
|
17455
17499
|
return props.$transitionTime;
|
|
17456
17500
|
}, function (props) {
|
|
17457
17501
|
return props.$transforms;
|
|
17458
17502
|
});
|
|
17459
|
-
var templateObject_1$B, templateObject_2$
|
|
17503
|
+
var templateObject_1$B, templateObject_2$v;
|
|
17460
17504
|
|
|
17461
17505
|
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17462
17506
|
orientation: 'landscape',
|
|
@@ -17745,8 +17789,8 @@
|
|
|
17745
17789
|
}).join(' ');
|
|
17746
17790
|
};
|
|
17747
17791
|
var StyledPageContainer = styled.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"], ["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"])));
|
|
17748
|
-
var GuidesContainer = styled.div(templateObject_2$
|
|
17749
|
-
var GuideCenterRow = styled.div(templateObject_3$
|
|
17792
|
+
var GuidesContainer = styled.div(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"])));
|
|
17793
|
+
var GuideCenterRow = styled.div(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"], ["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"])));
|
|
17750
17794
|
var GuideRegion = styled.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"])), function (props) {
|
|
17751
17795
|
var _a, _b, _c, _d, _e;
|
|
17752
17796
|
return (_e = (_a = props.$maskColor) !== null && _a !== void 0 ? _a : (_d = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.idCapture) === null || _c === void 0 ? void 0 : _c.guideOverlay) === null || _d === void 0 ? void 0 : _d.backgroundColor) !== null && _e !== void 0 ? _e : 'rgba(0, 0, 0, 0.5)';
|
|
@@ -17774,7 +17818,7 @@
|
|
|
17774
17818
|
var GuideCenterInner = styled.div(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
|
|
17775
17819
|
return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
|
|
17776
17820
|
});
|
|
17777
|
-
var templateObject_1$z, templateObject_2$
|
|
17821
|
+
var templateObject_1$z, templateObject_2$u, templateObject_3$l, templateObject_4$e, templateObject_5$9, templateObject_6$5, templateObject_7$3, templateObject_8$2, templateObject_9$1;
|
|
17778
17822
|
|
|
17779
17823
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
17780
17824
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -17918,8 +17962,8 @@
|
|
|
17918
17962
|
var CanvasWrapper$1 = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
|
|
17919
17963
|
return props.$maskColor;
|
|
17920
17964
|
});
|
|
17921
|
-
var Canvas$1 = styled.canvas(templateObject_2$
|
|
17922
|
-
var templateObject_1$y, templateObject_2$
|
|
17965
|
+
var Canvas$1 = styled.canvas(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
17966
|
+
var templateObject_1$y, templateObject_2$t;
|
|
17923
17967
|
|
|
17924
17968
|
function IdCaptureGuides(_a) {
|
|
17925
17969
|
var _b = _a.guideType,
|
|
@@ -18000,11 +18044,11 @@
|
|
|
18000
18044
|
var $color = _a.$color;
|
|
18001
18045
|
return $color !== null && $color !== void 0 ? $color : '#888';
|
|
18002
18046
|
}, dualRingSpinnerAnimation);
|
|
18003
|
-
var SpinnerPageContainer = styled.div(templateObject_2$
|
|
18047
|
+
var SpinnerPageContainer = styled.div(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
18004
18048
|
function SpinnerPage() {
|
|
18005
18049
|
return /*#__PURE__*/React.createElement(SpinnerPageContainer, null, /*#__PURE__*/React.createElement(Spinner$1, null));
|
|
18006
18050
|
}
|
|
18007
|
-
var templateObject_1$x, templateObject_2$
|
|
18051
|
+
var templateObject_1$x, templateObject_2$s;
|
|
18008
18052
|
|
|
18009
18053
|
var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
|
|
18010
18054
|
var _b = _a.classNames,
|
|
@@ -18092,10 +18136,10 @@
|
|
|
18092
18136
|
})));
|
|
18093
18137
|
};
|
|
18094
18138
|
var StyledSpinner = styled(Spinner$1)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"], ["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"])));
|
|
18095
|
-
var ImagePreviewWrapper = styled.div(templateObject_2$
|
|
18096
|
-
var ImagePreviewText = styled.div(templateObject_3$
|
|
18139
|
+
var ImagePreviewWrapper = styled.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"], ["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"])));
|
|
18140
|
+
var ImagePreviewText = styled.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"], ["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"])));
|
|
18097
18141
|
var ImagePreviewImageWrapper = styled.div(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"], ["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"])));
|
|
18098
|
-
var templateObject_1$w, templateObject_2$
|
|
18142
|
+
var templateObject_1$w, templateObject_2$r, templateObject_3$k, templateObject_4$d;
|
|
18099
18143
|
|
|
18100
18144
|
var documentCaptureInitialState = {
|
|
18101
18145
|
documents: [],
|
|
@@ -18444,8 +18488,8 @@
|
|
|
18444
18488
|
var CanvasWrapper = styled.div(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"], ["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"])), function (props) {
|
|
18445
18489
|
return props.$maskColor;
|
|
18446
18490
|
});
|
|
18447
|
-
var Canvas = styled.canvas(templateObject_2$
|
|
18448
|
-
var templateObject_1$v, templateObject_2$
|
|
18491
|
+
var Canvas = styled.canvas(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
18492
|
+
var templateObject_1$v, templateObject_2$q;
|
|
18449
18493
|
|
|
18450
18494
|
var CameraFeedWrapper = styled.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
18451
18495
|
return props.$mode === 'snapToGuides' ? "display: flex;\n position: absolute;\n left: ".concat(props.$x, "px;\n top: ").concat(props.$y, "px;\n width: ").concat(props.$w, "px;\n height: ").concat(props.$h, "px;") : "";
|
|
@@ -18631,10 +18675,10 @@
|
|
|
18631
18675
|
}, !cameraReady ? verbiage.loadingBtnText : capturing ? verbiage.capturingBtnText : verbiage.captureBtnText))))));
|
|
18632
18676
|
};
|
|
18633
18677
|
var CaptureContainer = styled.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
18634
|
-
var HeadingRow = styled.div(templateObject_2$
|
|
18678
|
+
var HeadingRow = styled.div(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n background: ", ";\n text-align: center;\n color: white;\n"], ["\n background: ", ";\n text-align: center;\n color: white;\n"])), function (props) {
|
|
18635
18679
|
return props.$maskColor;
|
|
18636
18680
|
});
|
|
18637
|
-
var Heading$9 = styled.h1(templateObject_3$
|
|
18681
|
+
var Heading$9 = styled.h1(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n font-size: 22px;\n"], ["\n font-size: 22px;\n"])));
|
|
18638
18682
|
var FooterRow = styled.div(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"], ["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"])), function (props) {
|
|
18639
18683
|
return props.$maskColor;
|
|
18640
18684
|
});
|
|
@@ -18644,7 +18688,7 @@
|
|
|
18644
18688
|
});
|
|
18645
18689
|
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
18646
18690
|
var PreviewImage = styled.img(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
18647
|
-
var templateObject_1$s, templateObject_2$
|
|
18691
|
+
var templateObject_1$s, templateObject_2$p, templateObject_3$j, templateObject_4$c, templateObject_5$8, templateObject_6$4, templateObject_7$2;
|
|
18648
18692
|
|
|
18649
18693
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
18650
18694
|
var onSuccess = _a.onSuccess,
|
|
@@ -18916,12 +18960,12 @@
|
|
|
18916
18960
|
}, verbiage.doneBtnText))))));
|
|
18917
18961
|
};
|
|
18918
18962
|
var StyledOverlayInner$2 = styled(OverlayInner$2)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
18919
|
-
var Heading$8 = styled.h3(templateObject_2$
|
|
18920
|
-
var Description$3 = styled.p(templateObject_3$
|
|
18963
|
+
var Heading$8 = styled.h3(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
18964
|
+
var Description$3 = styled.p(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
18921
18965
|
var Instruction = styled.p(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
18922
18966
|
var ImageCol = styled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"])));
|
|
18923
18967
|
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
18924
|
-
var templateObject_1$r, templateObject_2$
|
|
18968
|
+
var templateObject_1$r, templateObject_2$o, templateObject_3$i, templateObject_4$b, templateObject_5$7, templateObject_6$3;
|
|
18925
18969
|
|
|
18926
18970
|
function ScalingCameraFeed() {
|
|
18927
18971
|
var _a = useIdCaptureStore(),
|
|
@@ -19277,8 +19321,8 @@
|
|
|
19277
19321
|
var _a;
|
|
19278
19322
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
19279
19323
|
});
|
|
19280
|
-
var ScreenPanel = styled.div(templateObject_2$
|
|
19281
|
-
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$
|
|
19324
|
+
var ScreenPanel = styled.div(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"])));
|
|
19325
|
+
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$h || (templateObject_3$h = __makeTemplateObject(["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"], ["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"])));
|
|
19282
19326
|
var ScreenPanelHeading = styled.h3(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
19283
19327
|
var ScreenActionsBar = styled.div(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"])));
|
|
19284
19328
|
var DashedSeparator = styled.div(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
@@ -19562,13 +19606,14 @@
|
|
|
19562
19606
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
19563
19607
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
19564
19608
|
}
|
|
19565
|
-
var templateObject_1$q, templateObject_2$
|
|
19609
|
+
var templateObject_1$q, templateObject_2$n, templateObject_3$h, templateObject_4$a, templateObject_5$6, templateObject_6$2, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19566
19610
|
|
|
19567
19611
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
19568
19612
|
var _b, _c, _d, _e, _f;
|
|
19569
19613
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
19570
19614
|
onLoadingProgress = _a.onLoadingProgress,
|
|
19571
19615
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
19616
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
19572
19617
|
onSuccess = _a.onSuccess,
|
|
19573
19618
|
onExitCapture = _a.onExitCapture,
|
|
19574
19619
|
onUserCancel = _a.onUserCancel,
|
|
@@ -19926,6 +19971,7 @@
|
|
|
19926
19971
|
onLoadingStarted: onLoadingStarted,
|
|
19927
19972
|
onLoadingProgress: onLoadingProgress,
|
|
19928
19973
|
onLoadingCompleted: onLoadingCompleted,
|
|
19974
|
+
onLoadingFailed: onLoadingFailed,
|
|
19929
19975
|
onDismissed: function onDismissed() {
|
|
19930
19976
|
setOverlayDismissed(true);
|
|
19931
19977
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -20340,8 +20386,8 @@
|
|
|
20340
20386
|
height: parentHeight
|
|
20341
20387
|
})));
|
|
20342
20388
|
}
|
|
20343
|
-
var AbsoluteSvg = styled.svg(templateObject_2$
|
|
20344
|
-
var RelativeSvgContainer = styled.div(templateObject_3$
|
|
20389
|
+
var AbsoluteSvg = styled.svg(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"], ["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"])));
|
|
20390
|
+
var RelativeSvgContainer = styled.div(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"])), function (props) {
|
|
20345
20391
|
return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
|
|
20346
20392
|
});
|
|
20347
20393
|
function SelfieCaptureAnimatedMask(_a) {
|
|
@@ -20568,10 +20614,10 @@
|
|
|
20568
20614
|
status: status
|
|
20569
20615
|
}));
|
|
20570
20616
|
}
|
|
20571
|
-
var templateObject_1$p, templateObject_2$
|
|
20617
|
+
var templateObject_1$p, templateObject_2$m, templateObject_3$g;
|
|
20572
20618
|
|
|
20573
20619
|
var FaceCaptureGuideContainer = styled.div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"], ["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"])));
|
|
20574
|
-
var FaceCaptureGuideInner = styled.div(templateObject_2$
|
|
20620
|
+
var FaceCaptureGuideInner = styled.div(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n position: relative;\n height: 60%;\n"], ["\n position: relative;\n height: 60%;\n"])));
|
|
20575
20621
|
var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
20576
20622
|
var _b = _a.classNames,
|
|
20577
20623
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -20593,7 +20639,7 @@
|
|
|
20593
20639
|
verticalAlign: "center"
|
|
20594
20640
|
})));
|
|
20595
20641
|
};
|
|
20596
|
-
var templateObject_1$o, templateObject_2$
|
|
20642
|
+
var templateObject_1$o, templateObject_2$l;
|
|
20597
20643
|
|
|
20598
20644
|
var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
|
|
20599
20645
|
start: function start() {
|
|
@@ -20922,11 +20968,11 @@
|
|
|
20922
20968
|
}, !image ? invalidSelfie ? verbiage.retryButtonText : verbiage.captureBtnText : loading ? verbiage.doneBtnLoadingText : verbiage.doneBtnText)))));
|
|
20923
20969
|
};
|
|
20924
20970
|
var StyledOverlayInner$1 = styled(OverlayInner$2)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
20925
|
-
var Heading$7 = styled.h3(templateObject_2$
|
|
20926
|
-
var Description$2 = styled.p(templateObject_3$
|
|
20971
|
+
var Heading$7 = styled.h3(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
20972
|
+
var Description$2 = styled.p(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
20927
20973
|
var ImageContainer$6 = styled(OverlayImageContainer)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
20928
20974
|
var StyledButtonsRow$6 = styled(ButtonsRow$2)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
20929
|
-
var templateObject_1$n, templateObject_2$
|
|
20975
|
+
var templateObject_1$n, templateObject_2$k, templateObject_3$f, templateObject_4$9, templateObject_5$5;
|
|
20930
20976
|
|
|
20931
20977
|
var initialState$4 = {
|
|
20932
20978
|
busy: false,
|
|
@@ -20967,32 +21013,39 @@
|
|
|
20967
21013
|
guidanceMessage = _a.guidanceMessage,
|
|
20968
21014
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
20969
21015
|
guidesComponent = _a.guidesComponent,
|
|
20970
|
-
_d = _a.
|
|
20971
|
-
|
|
20972
|
-
_e = _a.
|
|
20973
|
-
|
|
20974
|
-
_f = _a.
|
|
20975
|
-
|
|
20976
|
-
_g = _a.
|
|
20977
|
-
|
|
20978
|
-
_h = _a.
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
_l =
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20990
|
-
|
|
21016
|
+
_d = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21017
|
+
allowManualSelfieCaptureOnLoadingError = _d === void 0 ? false : _d,
|
|
21018
|
+
_e = _a.shouldCapture,
|
|
21019
|
+
shouldCapture = _e === void 0 ? true : _e,
|
|
21020
|
+
_f = _a.classNames,
|
|
21021
|
+
classNames = _f === void 0 ? {} : _f,
|
|
21022
|
+
_g = _a.colors,
|
|
21023
|
+
colors = _g === void 0 ? {} : _g,
|
|
21024
|
+
_h = _a.verbiage,
|
|
21025
|
+
rawVerbiage = _h === void 0 ? {} : _h,
|
|
21026
|
+
_j = _a.debugMode,
|
|
21027
|
+
debugMode = _j === void 0 ? false : _j;
|
|
21028
|
+
var _k = useResizeObserver(),
|
|
21029
|
+
ref = _k.ref,
|
|
21030
|
+
_l = _k.width,
|
|
21031
|
+
width = _l === void 0 ? 1 : _l,
|
|
21032
|
+
_m = _k.height,
|
|
21033
|
+
height = _m === void 0 ? 1 : _m;
|
|
21034
|
+
var _o = React.useReducer(reducer$3, initialState$4),
|
|
21035
|
+
_p = _o[0],
|
|
21036
|
+
busy = _p.busy,
|
|
21037
|
+
prediction = _p.prediction,
|
|
21038
|
+
dispatch = _o[1];
|
|
20991
21039
|
var lastPredictionCanvas = React.useRef(null);
|
|
20992
|
-
var
|
|
20993
|
-
|
|
20994
|
-
|
|
20995
|
-
|
|
21040
|
+
var videoRef = useCameraStore(useShallow(function (state) {
|
|
21041
|
+
return {
|
|
21042
|
+
videoRef: state.videoRef
|
|
21043
|
+
};
|
|
21044
|
+
})).videoRef;
|
|
21045
|
+
var _q = useSelfieGuidanceModelsContext(),
|
|
21046
|
+
onPredictionMade = _q.onPredictionMade,
|
|
21047
|
+
canvasRef = _q.canvasRef,
|
|
21048
|
+
guidanceError = _q.error;
|
|
20996
21049
|
onPredictionMade(f(React.useCallback(function (prediction) {
|
|
20997
21050
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
20998
21051
|
return __generator(this, function (_a) {
|
|
@@ -21015,31 +21068,33 @@
|
|
|
21015
21068
|
onGuidanceNotSatisfied === null || onGuidanceNotSatisfied === void 0 ? void 0 : onGuidanceNotSatisfied();
|
|
21016
21069
|
}
|
|
21017
21070
|
}, [onGuidanceNotSatisfied, onGuidanceSatisfied, prediction === null || prediction === void 0 ? void 0 : prediction.faceReady]);
|
|
21071
|
+
var doCapture = React.useCallback(function () {
|
|
21072
|
+
var _a;
|
|
21073
|
+
dispatch({
|
|
21074
|
+
type: 'captureStarted'
|
|
21075
|
+
});
|
|
21076
|
+
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
21077
|
+
var frame = lastPredictionCanvas.current;
|
|
21078
|
+
if (!frame) return;
|
|
21079
|
+
var ctx = frame.getContext('2d');
|
|
21080
|
+
if (!ctx) return;
|
|
21081
|
+
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
21082
|
+
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, (_a = prediction === null || prediction === void 0 ? void 0 : prediction.face) !== null && _a !== void 0 ? _a : undefined);
|
|
21083
|
+
clearCanvas(frame);
|
|
21084
|
+
dispatch({
|
|
21085
|
+
type: 'captureCompleted'
|
|
21086
|
+
});
|
|
21087
|
+
}, [onSelfieCaptureStarted, onSelfieCaptured, prediction]);
|
|
21018
21088
|
React.useEffect(function () {
|
|
21019
21089
|
if (!(prediction === null || prediction === void 0 ? void 0 : prediction.faceReady)) return;
|
|
21020
|
-
var timer = setTimeout(
|
|
21021
|
-
dispatch({
|
|
21022
|
-
type: 'captureStarted'
|
|
21023
|
-
});
|
|
21024
|
-
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
21025
|
-
var frame = lastPredictionCanvas.current;
|
|
21026
|
-
if (!frame) return;
|
|
21027
|
-
var ctx = frame.getContext('2d');
|
|
21028
|
-
if (!ctx) return;
|
|
21029
|
-
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
21030
|
-
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, prediction.face);
|
|
21031
|
-
clearCanvas(frame);
|
|
21032
|
-
dispatch({
|
|
21033
|
-
type: 'captureCompleted'
|
|
21034
|
-
});
|
|
21035
|
-
}, 100);
|
|
21090
|
+
var timer = setTimeout(doCapture, 100);
|
|
21036
21091
|
return function () {
|
|
21037
|
-
|
|
21092
|
+
return timer && clearTimeout(timer);
|
|
21038
21093
|
};
|
|
21039
|
-
}, [
|
|
21040
|
-
var
|
|
21041
|
-
timedOut =
|
|
21042
|
-
timeoutStartedAt =
|
|
21094
|
+
}, [doCapture, prediction]);
|
|
21095
|
+
var _r = useTimeout(timeoutDurationMs, onTimeout),
|
|
21096
|
+
timedOut = _r.timedOut,
|
|
21097
|
+
timeoutStartedAt = _r.timeoutStartedAt;
|
|
21043
21098
|
var debugScalingDetails = useDebugScalingDetails({
|
|
21044
21099
|
enabled: debugMode,
|
|
21045
21100
|
pageWidth: width,
|
|
@@ -21054,17 +21109,21 @@
|
|
|
21054
21109
|
guidanceMoveForwardText: 'Move forward...',
|
|
21055
21110
|
guidanceMoveToCenterText: 'Move to the center...',
|
|
21056
21111
|
guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
|
|
21057
|
-
guidanceNotStableText: 'Please hold still...'
|
|
21112
|
+
guidanceNotStableText: 'Please hold still...',
|
|
21113
|
+
guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
|
|
21114
|
+
manualCaptureBtnText: 'Capture'
|
|
21058
21115
|
});
|
|
21059
|
-
var
|
|
21116
|
+
var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
|
|
21117
|
+
var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
|
|
21060
21118
|
if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
|
|
21061
|
-
guidanceMessage || (guidanceMessage = 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) ? verbiage.guidanceNotStableText : '');
|
|
21062
|
-
if (guidanceError) {
|
|
21119
|
+
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) ? verbiage.guidanceNotStableText : '');
|
|
21120
|
+
if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
|
|
21063
21121
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
21064
21122
|
classNames: classNames.fallback
|
|
21065
21123
|
});
|
|
21066
21124
|
}
|
|
21067
21125
|
var GuidesComponent = guidesComponent !== null && guidesComponent !== void 0 ? guidesComponent : FaceCaptureGuideOverlay;
|
|
21126
|
+
var guidanceVariant = allowManualCapture ? 'default' : satisfied ? 'positive' : 'negative';
|
|
21068
21127
|
return /*#__PURE__*/React.createElement(Container$6, {
|
|
21069
21128
|
ref: ref,
|
|
21070
21129
|
className: classNames.container
|
|
@@ -21074,28 +21133,40 @@
|
|
|
21074
21133
|
classNames: classNames.guides,
|
|
21075
21134
|
status: satisfied ? 'processing' : 'ready'
|
|
21076
21135
|
}), !!guidanceMessage && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
21136
|
+
"$top": "12px",
|
|
21077
21137
|
className: classNames.guidanceMessageContainer
|
|
21078
21138
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
21079
|
-
"$variant":
|
|
21139
|
+
"$variant": guidanceVariant,
|
|
21080
21140
|
className: classNames.guidanceMessage
|
|
21081
21141
|
}, guidanceMessage))), debugMode && (prediction === null || prediction === void 0 ? void 0 : prediction.face) && ( /*#__PURE__*/React.createElement(ObjectDetectionDebugOverlayDiv, null, /*#__PURE__*/React.createElement(SelfieCaptureFaceDebugBox, {
|
|
21082
21142
|
face: prediction.face,
|
|
21083
21143
|
scaling: debugScalingDetails,
|
|
21084
21144
|
color: satisfied ? 'green' : 'red'
|
|
21085
|
-
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), /*#__PURE__*/React.createElement(
|
|
21145
|
+
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), allowManualCapture && ( /*#__PURE__*/React.createElement(CaptureButtonContainer$1, null, /*#__PURE__*/React.createElement(CaptureButton$1, {
|
|
21146
|
+
disabled: !videoRef.current,
|
|
21147
|
+
onClick: function onClick() {
|
|
21148
|
+
var _a;
|
|
21149
|
+
// draw the current frame from videoRef to the canvas
|
|
21150
|
+
if (!lastPredictionCanvas.current || !videoRef.current) return;
|
|
21151
|
+
lastPredictionCanvas.current.width = videoRef.current.videoWidth;
|
|
21152
|
+
lastPredictionCanvas.current.height = videoRef.current.videoHeight;
|
|
21153
|
+
var ctx = (_a = lastPredictionCanvas.current) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
21154
|
+
if (!ctx) return;
|
|
21155
|
+
ctx.drawImage(videoRef.current, 0, 0);
|
|
21156
|
+
doCapture();
|
|
21157
|
+
}
|
|
21158
|
+
}, verbiage.manualCaptureBtnText))), /*#__PURE__*/React.createElement(ExitCaptureButton, {
|
|
21086
21159
|
onClick: onExit,
|
|
21087
21160
|
className: classNames.exitCaptureBtn
|
|
21088
21161
|
}));
|
|
21089
21162
|
};
|
|
21090
21163
|
var Container$6 = styled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
21091
|
-
var
|
|
21164
|
+
var CaptureButtonContainer$1 = styled.div(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"], ["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"])));
|
|
21165
|
+
var CaptureButton$1 = styled(LoaderButton)(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"], ["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"])));
|
|
21166
|
+
var templateObject_1$m, templateObject_2$j, templateObject_3$e;
|
|
21092
21167
|
|
|
21093
21168
|
var initialState$3 = {
|
|
21094
|
-
frame: null,
|
|
21095
|
-
face: null,
|
|
21096
21169
|
requestState: 'CAPTURING',
|
|
21097
|
-
requestError: null,
|
|
21098
|
-
imageUrl: null,
|
|
21099
21170
|
faceLive: false,
|
|
21100
21171
|
eyeCoveringDetected: false,
|
|
21101
21172
|
maskDetected: false,
|
|
@@ -21104,7 +21175,6 @@
|
|
|
21104
21175
|
timesLivenessCheckFailed: 0
|
|
21105
21176
|
};
|
|
21106
21177
|
var reducer$2 = function reducer(state, action) {
|
|
21107
|
-
var _a, _b;
|
|
21108
21178
|
switch (action.type) {
|
|
21109
21179
|
case 'resetLivenessCheck':
|
|
21110
21180
|
return _assign(_assign({}, initialState$3), {
|
|
@@ -21139,12 +21209,12 @@
|
|
|
21139
21209
|
});
|
|
21140
21210
|
case 'livenessChecked':
|
|
21141
21211
|
{
|
|
21142
|
-
var
|
|
21143
|
-
|
|
21144
|
-
statusCode =
|
|
21145
|
-
statusMessage =
|
|
21146
|
-
errorData =
|
|
21147
|
-
resultData =
|
|
21212
|
+
var _a = action.payload.response,
|
|
21213
|
+
_b = _a.status,
|
|
21214
|
+
statusCode = _b.statusCode,
|
|
21215
|
+
statusMessage = _b.statusMessage,
|
|
21216
|
+
errorData = _b.errorData,
|
|
21217
|
+
resultData = _a.resultData;
|
|
21148
21218
|
if (statusCode !== '000') {
|
|
21149
21219
|
return _assign(_assign({}, state), {
|
|
21150
21220
|
requestState: 'ERROR',
|
|
@@ -21165,8 +21235,8 @@
|
|
|
21165
21235
|
timesLivenessCheckFailed += 1;
|
|
21166
21236
|
}
|
|
21167
21237
|
return _assign(_assign({}, state), {
|
|
21168
|
-
frame:
|
|
21169
|
-
face:
|
|
21238
|
+
frame: action.payload.frame,
|
|
21239
|
+
face: action.payload.face,
|
|
21170
21240
|
imageUrl: action.payload.imageUrl,
|
|
21171
21241
|
requestState: requestState,
|
|
21172
21242
|
faceLive: faceLive,
|
|
@@ -21204,23 +21274,25 @@
|
|
|
21204
21274
|
silentFallback = _h === void 0 ? false : _h,
|
|
21205
21275
|
guidesComponent = _a.guidesComponent,
|
|
21206
21276
|
disableCapturePreview = _a.disableCapturePreview,
|
|
21207
|
-
_j = _a.
|
|
21208
|
-
|
|
21209
|
-
_k = _a.
|
|
21210
|
-
|
|
21211
|
-
_l = _a.
|
|
21212
|
-
|
|
21277
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21278
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
21279
|
+
_k = _a.classNames,
|
|
21280
|
+
classNames = _k === void 0 ? {} : _k,
|
|
21281
|
+
_l = _a.colors,
|
|
21282
|
+
colors = _l === void 0 ? {} : _l,
|
|
21283
|
+
_m = _a.verbiage,
|
|
21284
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
21213
21285
|
debugMode = _a.debugMode;
|
|
21214
|
-
var
|
|
21215
|
-
checkLiveness =
|
|
21216
|
-
submissionError =
|
|
21286
|
+
var _o = React.useContext(SubmissionContext),
|
|
21287
|
+
checkLiveness = _o.checkLiveness,
|
|
21288
|
+
submissionError = _o.submissionError;
|
|
21217
21289
|
var modelError = useSelfieGuidanceModelsContext().error;
|
|
21218
|
-
var
|
|
21219
|
-
state =
|
|
21220
|
-
dispatch =
|
|
21221
|
-
var
|
|
21222
|
-
imageUrl =
|
|
21223
|
-
setImageUrl =
|
|
21290
|
+
var _p = React.useReducer(reducer$2, initialState$3),
|
|
21291
|
+
state = _p[0],
|
|
21292
|
+
dispatch = _p[1];
|
|
21293
|
+
var _q = React.useState(null),
|
|
21294
|
+
imageUrl = _q[0],
|
|
21295
|
+
setImageUrl = _q[1];
|
|
21224
21296
|
var rawCanvas = React.useRef(null);
|
|
21225
21297
|
var cropCanvas = React.useRef(null);
|
|
21226
21298
|
var resizeCanvas = React.useRef(null);
|
|
@@ -21246,7 +21318,7 @@
|
|
|
21246
21318
|
var isPassed = state.requestState === 'PASSED';
|
|
21247
21319
|
React.useEffect(function checkLivenessIfPossible() {
|
|
21248
21320
|
var _this = this;
|
|
21249
|
-
if (!frame || !
|
|
21321
|
+
if (!frame || !isReady || submissionError) return;
|
|
21250
21322
|
dispatch({
|
|
21251
21323
|
type: 'livenessChecking'
|
|
21252
21324
|
});
|
|
@@ -21385,7 +21457,7 @@
|
|
|
21385
21457
|
});
|
|
21386
21458
|
}, []);
|
|
21387
21459
|
var initialDelayOver = useTimeout(initialCaptureDelayMs).timedOut;
|
|
21388
|
-
if (modelError) {
|
|
21460
|
+
if (modelError && !allowManualSelfieCaptureOnLoadingError) {
|
|
21389
21461
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
21390
21462
|
key: state.timesLivenessCheckFailed,
|
|
21391
21463
|
onFinished: onFallbackImageCaptured,
|
|
@@ -21412,6 +21484,7 @@
|
|
|
21412
21484
|
onGuidanceSatisfied: onGuidanceSatisfied,
|
|
21413
21485
|
onGuidanceNotSatisfied: onGuidanceNotSatisfied,
|
|
21414
21486
|
guidesComponent: guidesByRequestState,
|
|
21487
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
21415
21488
|
classNames: classNames,
|
|
21416
21489
|
colors: colors,
|
|
21417
21490
|
verbiage: rawVerbiage,
|
|
@@ -21678,35 +21751,39 @@
|
|
|
21678
21751
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
21679
21752
|
onLoadingProgress = _a.onLoadingProgress,
|
|
21680
21753
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21754
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
21681
21755
|
onDismissed = _a.onDismissed,
|
|
21682
21756
|
onUserCancel = _a.onUserCancel,
|
|
21683
21757
|
customOverlayContent = _a.customOverlayContent,
|
|
21684
21758
|
_d = _a.waitForIdCaptureModels,
|
|
21685
21759
|
waitForIdCaptureModels = _d === void 0 ? false : _d,
|
|
21686
|
-
_e = _a.
|
|
21687
|
-
|
|
21688
|
-
_f = _a.
|
|
21689
|
-
|
|
21690
|
-
_g = _a.
|
|
21691
|
-
|
|
21692
|
-
_h = _a.
|
|
21693
|
-
|
|
21760
|
+
_e = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21761
|
+
allowManualSelfieCaptureOnLoadingError = _e === void 0 ? false : _e,
|
|
21762
|
+
_f = _a.assets,
|
|
21763
|
+
assets = _f === void 0 ? {} : _f,
|
|
21764
|
+
_g = _a.classNames,
|
|
21765
|
+
classNames = _g === void 0 ? {} : _g,
|
|
21766
|
+
_h = _a.colors,
|
|
21767
|
+
colors = _h === void 0 ? {} : _h,
|
|
21768
|
+
_j = _a.verbiage,
|
|
21769
|
+
rawVerbiage = _j === void 0 ? {} : _j;
|
|
21694
21770
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
21695
21771
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
21696
|
-
var
|
|
21772
|
+
var _k = useCameraStore(useShallow(function (state) {
|
|
21697
21773
|
return {
|
|
21698
21774
|
cameraReady: state.cameraReady,
|
|
21699
21775
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
21700
21776
|
microphoneAccessDenied: state.microphoneAccessDenied
|
|
21701
21777
|
};
|
|
21702
21778
|
})),
|
|
21703
|
-
cameraReady =
|
|
21704
|
-
cameraAccessDenied =
|
|
21705
|
-
microphoneAccessDenied =
|
|
21706
|
-
var
|
|
21707
|
-
modelLoadState =
|
|
21708
|
-
modelDownloadProgress =
|
|
21709
|
-
modelWarmingStartedAt =
|
|
21779
|
+
cameraReady = _k.cameraReady,
|
|
21780
|
+
cameraAccessDenied = _k.cameraAccessDenied,
|
|
21781
|
+
microphoneAccessDenied = _k.microphoneAccessDenied;
|
|
21782
|
+
var _l = useSelfieGuidanceModelsContext(),
|
|
21783
|
+
modelLoadState = _l.modelLoadState,
|
|
21784
|
+
modelDownloadProgress = _l.modelDownloadProgress,
|
|
21785
|
+
modelWarmingStartedAt = _l.modelWarmingStartedAt,
|
|
21786
|
+
modelError = _l.error;
|
|
21710
21787
|
var idCaptureModelsContext = React.useContext(IdCaptureModelsContext);
|
|
21711
21788
|
var theme = styled.useTheme();
|
|
21712
21789
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -21722,9 +21799,9 @@
|
|
|
21722
21799
|
modelsReadyText: 'Guided capture experience ready',
|
|
21723
21800
|
sessionCheckingText: 'Authenticating...'
|
|
21724
21801
|
});
|
|
21725
|
-
var
|
|
21726
|
-
headingTextIndex =
|
|
21727
|
-
setHeadingTextIndex =
|
|
21802
|
+
var _m = React.useState(0),
|
|
21803
|
+
headingTextIndex = _m[0],
|
|
21804
|
+
setHeadingTextIndex = _m[1];
|
|
21728
21805
|
var headingText = [verbiage.headingText, verbiage.removeEyeCoveringsText, verbiage.avoidExcessiveBacklightingText][headingTextIndex];
|
|
21729
21806
|
React.useEffect(function () {
|
|
21730
21807
|
setInterval(function () {
|
|
@@ -21735,20 +21812,29 @@
|
|
|
21735
21812
|
}, []);
|
|
21736
21813
|
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
21737
21814
|
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
21738
|
-
var
|
|
21815
|
+
var _o = React.useState(false),
|
|
21816
|
+
overrideModelsReady = _o[0],
|
|
21817
|
+
setOverrideModelsReady = _o[1];
|
|
21818
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
21819
|
+
setOverrideModelsReady(allowManualSelfieCaptureOnLoadingError);
|
|
21820
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
21821
|
+
}, [onLoadingFailed, allowManualSelfieCaptureOnLoadingError]);
|
|
21822
|
+
var allModelsReady = overrideModelsReady || modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
21739
21823
|
var ready = sessionReady && allModelsReady && cameraReady;
|
|
21740
21824
|
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
21741
21825
|
useLoadProgressHooks({
|
|
21742
21826
|
ready: ready,
|
|
21743
21827
|
modelLoadState: modelLoadState,
|
|
21744
21828
|
modelLoadProgress: modelLoadProgress,
|
|
21829
|
+
modelError: modelError,
|
|
21745
21830
|
onLoadingStarted: onLoadingStarted,
|
|
21746
21831
|
onLoadingProgress: onLoadingProgress,
|
|
21747
|
-
onLoadingCompleted: onLoadingCompleted
|
|
21832
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
21833
|
+
onLoadingFailed: onLoadingFailedCallback
|
|
21748
21834
|
});
|
|
21749
|
-
var
|
|
21750
|
-
dismissed =
|
|
21751
|
-
setDismissed =
|
|
21835
|
+
var _p = React.useState(false),
|
|
21836
|
+
dismissed = _p[0],
|
|
21837
|
+
setDismissed = _p[1];
|
|
21752
21838
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
21753
21839
|
if (cameraAccessDenied) {
|
|
21754
21840
|
return /*#__PURE__*/React.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -21889,6 +21975,7 @@
|
|
|
21889
21975
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
21890
21976
|
onLoadingProgress = _a.onLoadingProgress,
|
|
21891
21977
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21978
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
21892
21979
|
onComplete = _a.onComplete,
|
|
21893
21980
|
onSuccess = _a.onSuccess,
|
|
21894
21981
|
onFailure = _a.onFailure,
|
|
@@ -21922,49 +22009,51 @@
|
|
|
21922
22009
|
waitForIdCaptureModels = _m === void 0 ? false : _m,
|
|
21923
22010
|
guidesComponent = _a.guidesComponent,
|
|
21924
22011
|
disableCapturePreview = _a.disableCapturePreview,
|
|
21925
|
-
_o = _a.
|
|
21926
|
-
|
|
21927
|
-
_p = _a.
|
|
21928
|
-
|
|
21929
|
-
_q = _a.
|
|
21930
|
-
|
|
21931
|
-
_r = _a.
|
|
21932
|
-
|
|
21933
|
-
_s = _a.
|
|
21934
|
-
|
|
21935
|
-
_t = _a.
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
|
|
21941
|
-
|
|
21942
|
-
|
|
22012
|
+
_o = _a.allowManualSelfieCaptureOnLoadingError,
|
|
22013
|
+
allowManualSelfieCaptureOnLoadingError = _o === void 0 ? false : _o,
|
|
22014
|
+
_p = _a.assets,
|
|
22015
|
+
assets = _p === void 0 ? {} : _p,
|
|
22016
|
+
_q = _a.classNames,
|
|
22017
|
+
classNames = _q === void 0 ? {} : _q,
|
|
22018
|
+
_r = _a.colors,
|
|
22019
|
+
colors = _r === void 0 ? {} : _r,
|
|
22020
|
+
_s = _a.verbiage,
|
|
22021
|
+
verbiage = _s === void 0 ? {} : _s,
|
|
22022
|
+
_t = _a.debugMode,
|
|
22023
|
+
debugMode = _t === void 0 ? false : _t,
|
|
22024
|
+
_u = _a.showLoadingOverlay,
|
|
22025
|
+
showLoadingOverlay = _u === void 0 ? true : _u;
|
|
22026
|
+
var _v = useSubmissionContext(),
|
|
22027
|
+
submissionResponse = _v.submissionResponse,
|
|
22028
|
+
livenessCheckRequest = _v.livenessCheckRequest,
|
|
22029
|
+
setSelfieImage = _v.setSelfieImage,
|
|
22030
|
+
logSelfieCaptureAttempt = _v.logSelfieCaptureAttempt;
|
|
22031
|
+
var _w = useCameraStore(useShallow(function (state) {
|
|
21943
22032
|
return {
|
|
21944
22033
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
21945
22034
|
requestCameraAccess: state.requestCameraAccess,
|
|
21946
22035
|
releaseCameraAccess: state.releaseCameraAccess
|
|
21947
22036
|
};
|
|
21948
22037
|
})),
|
|
21949
|
-
cameraAccessDenied =
|
|
21950
|
-
requestCameraAccess =
|
|
21951
|
-
releaseCameraAccess =
|
|
21952
|
-
var
|
|
21953
|
-
faceCropImageUrl =
|
|
21954
|
-
setFaceCropImageUrl =
|
|
21955
|
-
var
|
|
21956
|
-
retryCount =
|
|
21957
|
-
setRetryCount =
|
|
21958
|
-
var
|
|
21959
|
-
captureState =
|
|
21960
|
-
setCaptureState =
|
|
22038
|
+
cameraAccessDenied = _w.cameraAccessDenied,
|
|
22039
|
+
requestCameraAccess = _w.requestCameraAccess,
|
|
22040
|
+
releaseCameraAccess = _w.releaseCameraAccess;
|
|
22041
|
+
var _x = React.useState(''),
|
|
22042
|
+
faceCropImageUrl = _x[0],
|
|
22043
|
+
setFaceCropImageUrl = _x[1];
|
|
22044
|
+
var _y = React.useState(0),
|
|
22045
|
+
retryCount = _y[0],
|
|
22046
|
+
setRetryCount = _y[1];
|
|
22047
|
+
var _z = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
22048
|
+
captureState = _z[0],
|
|
22049
|
+
setCaptureState = _z[1];
|
|
21961
22050
|
var captureStartedAt = React.useRef();
|
|
21962
22051
|
var operationStartedAt = React.useRef();
|
|
21963
22052
|
var livenessScore = React.useRef();
|
|
21964
|
-
var
|
|
21965
|
-
start =
|
|
21966
|
-
stop =
|
|
21967
|
-
selfieGuidanceCanvasRef =
|
|
22053
|
+
var _0 = useSelfieGuidanceModelsContext(),
|
|
22054
|
+
start = _0.start,
|
|
22055
|
+
stop = _0.stop,
|
|
22056
|
+
selfieGuidanceCanvasRef = _0.canvasRef;
|
|
21968
22057
|
React.useEffect(function () {
|
|
21969
22058
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
21970
22059
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -22047,9 +22136,9 @@
|
|
|
22047
22136
|
}
|
|
22048
22137
|
onDenied === null || onDenied === void 0 ? void 0 : onDenied(submissionResponse, livenessCheckRequest);
|
|
22049
22138
|
}, [allowLivenessFailure, onDenied, submissionResponse, livenessCheckRequest]);
|
|
22050
|
-
var
|
|
22051
|
-
attempt =
|
|
22052
|
-
setAttempt =
|
|
22139
|
+
var _1 = React.useState(0),
|
|
22140
|
+
attempt = _1[0],
|
|
22141
|
+
setAttempt = _1[1];
|
|
22053
22142
|
var onExitCallback = React.useCallback(function () {
|
|
22054
22143
|
setAttempt(function (n) {
|
|
22055
22144
|
return n + 1;
|
|
@@ -22117,6 +22206,7 @@
|
|
|
22117
22206
|
silentFallback: silentFallback,
|
|
22118
22207
|
guidesComponent: guidesComponent,
|
|
22119
22208
|
disableCapturePreview: disableCapturePreview,
|
|
22209
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
22120
22210
|
classNames: classNames.capture,
|
|
22121
22211
|
colors: colors,
|
|
22122
22212
|
verbiage: verbiage,
|
|
@@ -22159,9 +22249,11 @@
|
|
|
22159
22249
|
onLoadingStarted: onLoadingStarted,
|
|
22160
22250
|
onLoadingProgress: onLoadingProgress,
|
|
22161
22251
|
onLoadingCompleted: onLoadingCompleted,
|
|
22252
|
+
onLoadingFailed: onLoadingFailed,
|
|
22162
22253
|
onUserCancel: onUserCancel,
|
|
22163
22254
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
22164
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
22255
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
22256
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
22165
22257
|
})));
|
|
22166
22258
|
};
|
|
22167
22259
|
function FaceLivenessWizardWithProviders(_a) {
|
|
@@ -23885,8 +23977,6 @@
|
|
|
23885
23977
|
setTimeout(startHeadTracking, 1);
|
|
23886
23978
|
return stopHeadTracking;
|
|
23887
23979
|
}, [startHeadTracking, stopHeadTracking]);
|
|
23888
|
-
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
23889
|
-
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
23890
23980
|
var verbiage = useTranslations(rawVerbiage, {
|
|
23891
23981
|
guidanceMessageText: 'Please sign the box below'
|
|
23892
23982
|
});
|
|
@@ -23934,7 +24024,7 @@
|
|
|
23934
24024
|
ref: ref,
|
|
23935
24025
|
className: classNames.container
|
|
23936
24026
|
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23937
|
-
"$top": "
|
|
24027
|
+
"$top": "12px",
|
|
23938
24028
|
className: classNames.guidanceMessageContainer
|
|
23939
24029
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
23940
24030
|
className: classNames.guidanceMessage,
|
|
@@ -24024,6 +24114,7 @@
|
|
|
24024
24114
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
24025
24115
|
onLoadingProgress = _a.onLoadingProgress,
|
|
24026
24116
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
24117
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
24027
24118
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
24028
24119
|
onCapture = _a.onCapture,
|
|
24029
24120
|
onUserCancel = _a.onUserCancel,
|
|
@@ -24042,43 +24133,45 @@
|
|
|
24042
24133
|
initialCaptureDelayMs = _g === void 0 ? 1000 : _g,
|
|
24043
24134
|
_h = _a.silentFallback,
|
|
24044
24135
|
silentFallback = _h === void 0 ? false : _h,
|
|
24136
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
24137
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
24045
24138
|
guidanceMessage = _a.guidanceMessage,
|
|
24046
24139
|
guidesComponent = _a.guidesComponent,
|
|
24047
|
-
|
|
24048
|
-
assets =
|
|
24049
|
-
|
|
24050
|
-
classNames =
|
|
24051
|
-
|
|
24052
|
-
colors =
|
|
24053
|
-
|
|
24054
|
-
verbiage =
|
|
24055
|
-
|
|
24056
|
-
debugMode =
|
|
24057
|
-
var
|
|
24058
|
-
setSelfieImage =
|
|
24059
|
-
logSelfieCaptureAttempt =
|
|
24060
|
-
var
|
|
24140
|
+
_k = _a.assets,
|
|
24141
|
+
assets = _k === void 0 ? {} : _k,
|
|
24142
|
+
_l = _a.classNames,
|
|
24143
|
+
classNames = _l === void 0 ? {} : _l,
|
|
24144
|
+
_m = _a.colors,
|
|
24145
|
+
colors = _m === void 0 ? {} : _m,
|
|
24146
|
+
_o = _a.verbiage,
|
|
24147
|
+
verbiage = _o === void 0 ? {} : _o,
|
|
24148
|
+
_p = _a.debugMode,
|
|
24149
|
+
debugMode = _p === void 0 ? false : _p;
|
|
24150
|
+
var _q = useSubmissionContext(),
|
|
24151
|
+
setSelfieImage = _q.setSelfieImage,
|
|
24152
|
+
logSelfieCaptureAttempt = _q.logSelfieCaptureAttempt;
|
|
24153
|
+
var _r = useCameraStore(useShallow(function (state) {
|
|
24061
24154
|
return {
|
|
24062
24155
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
24063
24156
|
requestCameraAccess: state.requestCameraAccess,
|
|
24064
24157
|
releaseCameraAccess: state.releaseCameraAccess
|
|
24065
24158
|
};
|
|
24066
24159
|
})),
|
|
24067
|
-
cameraAccessDenied =
|
|
24068
|
-
requestCameraAccess =
|
|
24069
|
-
releaseCameraAccess =
|
|
24070
|
-
var
|
|
24071
|
-
captureState =
|
|
24072
|
-
setCaptureState =
|
|
24160
|
+
cameraAccessDenied = _r.cameraAccessDenied,
|
|
24161
|
+
requestCameraAccess = _r.requestCameraAccess,
|
|
24162
|
+
releaseCameraAccess = _r.releaseCameraAccess;
|
|
24163
|
+
var _s = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
24164
|
+
captureState = _s[0],
|
|
24165
|
+
setCaptureState = _s[1];
|
|
24073
24166
|
var rawCanvas = React.useRef(null);
|
|
24074
24167
|
var cropCanvas = React.useRef(null);
|
|
24075
24168
|
var resizeCanvas = React.useRef(null);
|
|
24076
24169
|
var captureStartedAt = React.useRef();
|
|
24077
24170
|
var operationStartedAt = React.useRef();
|
|
24078
|
-
var
|
|
24079
|
-
start =
|
|
24080
|
-
stop =
|
|
24081
|
-
modelError =
|
|
24171
|
+
var _t = useSelfieGuidanceModelsContext(),
|
|
24172
|
+
start = _t.start,
|
|
24173
|
+
stop = _t.stop,
|
|
24174
|
+
modelError = _t.error;
|
|
24082
24175
|
React.useEffect(function () {
|
|
24083
24176
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
24084
24177
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -24126,9 +24219,9 @@
|
|
|
24126
24219
|
status: status
|
|
24127
24220
|
}));
|
|
24128
24221
|
}, [captureState, guidesComponent]);
|
|
24129
|
-
var
|
|
24130
|
-
attempt =
|
|
24131
|
-
setAttempt =
|
|
24222
|
+
var _u = React.useState(0),
|
|
24223
|
+
attempt = _u[0],
|
|
24224
|
+
setAttempt = _u[1];
|
|
24132
24225
|
var onExitCallback = React.useCallback(function () {
|
|
24133
24226
|
setAttempt(function (n) {
|
|
24134
24227
|
return n + 1;
|
|
@@ -24147,6 +24240,9 @@
|
|
|
24147
24240
|
}
|
|
24148
24241
|
}, [cameraAccessDenied]);
|
|
24149
24242
|
var initialDelayOver = useTimeout(initialCaptureDelayMs, undefined, undefined, undefined, captureState === 'CAPTURING').timedOut;
|
|
24243
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
24244
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
24245
|
+
}, [onLoadingFailed]);
|
|
24150
24246
|
if (modelError) {
|
|
24151
24247
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
24152
24248
|
onFinished: onFallbackImageCaptured,
|
|
@@ -24171,6 +24267,7 @@
|
|
|
24171
24267
|
guidanceMessage: guidanceMessage,
|
|
24172
24268
|
guidanceSatisfied: guidanceMessage ? false : undefined,
|
|
24173
24269
|
guidesComponent: guidesByRequestState,
|
|
24270
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24174
24271
|
classNames: classNames.capture,
|
|
24175
24272
|
colors: colors.capture,
|
|
24176
24273
|
verbiage: verbiage.capture,
|
|
@@ -24186,9 +24283,11 @@
|
|
|
24186
24283
|
onLoadingStarted: onLoadingStarted,
|
|
24187
24284
|
onLoadingProgress: onLoadingProgress,
|
|
24188
24285
|
onLoadingCompleted: onLoadingCompleted,
|
|
24286
|
+
onLoadingFailed: onLoadingFailedCallback,
|
|
24189
24287
|
onUserCancel: onUserCancel,
|
|
24190
24288
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
24191
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
24289
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
24290
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
24192
24291
|
})));
|
|
24193
24292
|
}
|
|
24194
24293
|
|
|
@@ -24198,6 +24297,7 @@
|
|
|
24198
24297
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
24199
24298
|
onLoadingProgress = _a.onLoadingProgress,
|
|
24200
24299
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
24300
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
24201
24301
|
onSelfieCaptured = _a.onSelfieCaptured,
|
|
24202
24302
|
onComplete = _a.onComplete,
|
|
24203
24303
|
onVideoCaptured = _a.onVideoCaptured,
|
|
@@ -24226,39 +24326,41 @@
|
|
|
24226
24326
|
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
24227
24327
|
_l = _a.skipLivenessValidation,
|
|
24228
24328
|
skipLivenessValidation = _l === void 0 ? false : _l,
|
|
24329
|
+
_m = _a.allowManualSelfieCaptureOnLoadingError,
|
|
24330
|
+
allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
|
|
24229
24331
|
faceLivenessProps = _a.faceLivenessProps,
|
|
24230
24332
|
guidesComponent = _a.guidesComponent,
|
|
24231
|
-
|
|
24232
|
-
assets =
|
|
24233
|
-
|
|
24234
|
-
classNames =
|
|
24235
|
-
|
|
24236
|
-
colors =
|
|
24237
|
-
|
|
24238
|
-
verbiage =
|
|
24239
|
-
|
|
24240
|
-
debugMode =
|
|
24241
|
-
var
|
|
24242
|
-
selfieImage =
|
|
24243
|
-
setSelfieImage =
|
|
24244
|
-
setSignatureData =
|
|
24245
|
-
setSignatureVideoUrl =
|
|
24246
|
-
logSelfieCaptureAttempt =
|
|
24247
|
-
uploadDocument =
|
|
24333
|
+
_o = _a.assets,
|
|
24334
|
+
assets = _o === void 0 ? {} : _o,
|
|
24335
|
+
_p = _a.classNames,
|
|
24336
|
+
classNames = _p === void 0 ? {} : _p,
|
|
24337
|
+
_q = _a.colors,
|
|
24338
|
+
colors = _q === void 0 ? {} : _q,
|
|
24339
|
+
_r = _a.verbiage,
|
|
24340
|
+
verbiage = _r === void 0 ? {} : _r,
|
|
24341
|
+
_s = _a.debugMode,
|
|
24342
|
+
debugMode = _s === void 0 ? false : _s;
|
|
24343
|
+
var _t = useSubmissionContext(),
|
|
24344
|
+
selfieImage = _t.selfieImage,
|
|
24345
|
+
setSelfieImage = _t.setSelfieImage,
|
|
24346
|
+
setSignatureData = _t.setSignatureData,
|
|
24347
|
+
setSignatureVideoUrl = _t.setSignatureVideoUrl,
|
|
24348
|
+
logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
|
|
24349
|
+
uploadDocument = _t.uploadDocument;
|
|
24248
24350
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
24249
24351
|
return {
|
|
24250
24352
|
cameraAccessDenied: state.cameraAccessDenied
|
|
24251
24353
|
};
|
|
24252
24354
|
})).cameraAccessDenied;
|
|
24253
|
-
var
|
|
24254
|
-
captureState =
|
|
24255
|
-
setCaptureState =
|
|
24355
|
+
var _u = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
|
|
24356
|
+
captureState = _u[0],
|
|
24357
|
+
setCaptureState = _u[1];
|
|
24256
24358
|
var operationStartedAt = React.useRef();
|
|
24257
24359
|
var captureStartedAt = React.useRef();
|
|
24258
24360
|
var captureEndedAt = React.useRef();
|
|
24259
|
-
var
|
|
24260
|
-
start =
|
|
24261
|
-
stop =
|
|
24361
|
+
var _v = useSelfieGuidanceModelsContext(),
|
|
24362
|
+
start = _v.start,
|
|
24363
|
+
stop = _v.stop;
|
|
24262
24364
|
React.useEffect(function () {
|
|
24263
24365
|
operationStartedAt.current = new Date();
|
|
24264
24366
|
}, []);
|
|
@@ -24302,9 +24404,9 @@
|
|
|
24302
24404
|
filetype: 'image/jpeg'
|
|
24303
24405
|
}).then(onSelfieCaptured);
|
|
24304
24406
|
}, [logCaptureMetadata, onSelfieCaptured, setSelfieImage, uploadDocument]);
|
|
24305
|
-
var
|
|
24306
|
-
signatureImageUrl =
|
|
24307
|
-
setSignatureImageUrl =
|
|
24407
|
+
var _w = React.useState(null),
|
|
24408
|
+
signatureImageUrl = _w[0],
|
|
24409
|
+
setSignatureImageUrl = _w[1];
|
|
24308
24410
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
24309
24411
|
setSignatureData(signatureData);
|
|
24310
24412
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -24312,17 +24414,17 @@
|
|
|
24312
24414
|
setCaptureState('SUCCESS');
|
|
24313
24415
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
24314
24416
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
24315
|
-
var
|
|
24316
|
-
showLoadingOverlay =
|
|
24317
|
-
setShowLoadingOverlay =
|
|
24417
|
+
var _x = React.useState(true),
|
|
24418
|
+
showLoadingOverlay = _x[0],
|
|
24419
|
+
setShowLoadingOverlay = _x[1];
|
|
24318
24420
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
24319
24421
|
setShowLoadingOverlay(false);
|
|
24320
24422
|
setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
|
|
24321
24423
|
useVideoSignatureStore.getState().clearRecordedData();
|
|
24322
24424
|
}, [skipLivenessValidation]);
|
|
24323
|
-
var
|
|
24324
|
-
attempt =
|
|
24325
|
-
setAttempt =
|
|
24425
|
+
var _y = React.useState(0),
|
|
24426
|
+
attempt = _y[0],
|
|
24427
|
+
setAttempt = _y[1];
|
|
24326
24428
|
var onRetry = React.useCallback(function () {
|
|
24327
24429
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
24328
24430
|
setAttempt(function (n) {
|
|
@@ -24382,6 +24484,7 @@
|
|
|
24382
24484
|
onLoadingStarted: onLoadingStarted,
|
|
24383
24485
|
onLoadingProgress: onLoadingProgress,
|
|
24384
24486
|
onLoadingCompleted: onLoadingCompleted,
|
|
24487
|
+
onLoadingFailed: onLoadingFailed,
|
|
24385
24488
|
onSuccess: onFaceCaptureSuccess,
|
|
24386
24489
|
onExitCapture: onExitCapture,
|
|
24387
24490
|
onUserCancel: onUserCancel,
|
|
@@ -24390,6 +24493,7 @@
|
|
|
24390
24493
|
showLoadingOverlay: showLoadingOverlay,
|
|
24391
24494
|
customOverlayContent: customOverlayContent,
|
|
24392
24495
|
loadingOverlayMode: loadingOverlayMode,
|
|
24496
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24393
24497
|
guidesComponent: resolvedGuidesComponent,
|
|
24394
24498
|
assets: assets.faceLiveness,
|
|
24395
24499
|
classNames: classNames.faceLiveness,
|
|
@@ -24405,6 +24509,7 @@
|
|
|
24405
24509
|
onLoadingStarted: onLoadingStarted,
|
|
24406
24510
|
onLoadingProgress: onLoadingProgress,
|
|
24407
24511
|
onLoadingCompleted: onLoadingCompleted,
|
|
24512
|
+
onLoadingFailed: onLoadingFailed,
|
|
24408
24513
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
24409
24514
|
onCapture: onSelfieCapture,
|
|
24410
24515
|
onUserCancel: onUserCancel,
|
|
@@ -24412,6 +24517,7 @@
|
|
|
24412
24517
|
showLoadingOverlay: showLoadingOverlay,
|
|
24413
24518
|
customOverlayContent: customOverlayContent,
|
|
24414
24519
|
loadingOverlayMode: loadingOverlayMode,
|
|
24520
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24415
24521
|
guidesComponent: resolvedGuidesComponent,
|
|
24416
24522
|
assets: assets.faceLiveness,
|
|
24417
24523
|
classNames: classNames.faceLiveness,
|
|
@@ -25380,6 +25486,7 @@
|
|
|
25380
25486
|
onLoadingStarted = _a.onLoadingStarted,
|
|
25381
25487
|
onLoadingProgress = _a.onLoadingProgress,
|
|
25382
25488
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
25489
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
25383
25490
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
25384
25491
|
_t = _a.idDocumentType,
|
|
25385
25492
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -25541,6 +25648,7 @@
|
|
|
25541
25648
|
onLoadingStarted: onLoadingStarted,
|
|
25542
25649
|
onLoadingProgress: onLoadingProgress,
|
|
25543
25650
|
onLoadingCompleted: onLoadingCompleted,
|
|
25651
|
+
onLoadingFailed: onLoadingFailed,
|
|
25544
25652
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25545
25653
|
silentFallback: silentFallback,
|
|
25546
25654
|
guideImages: idCaptureGuideImages
|
|
@@ -25568,6 +25676,7 @@
|
|
|
25568
25676
|
onLoadingStarted: onLoadingStarted,
|
|
25569
25677
|
onLoadingProgress: onLoadingProgress,
|
|
25570
25678
|
onLoadingCompleted: onLoadingCompleted,
|
|
25679
|
+
onLoadingFailed: onLoadingFailed,
|
|
25571
25680
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25572
25681
|
silentFallback: silentFallback
|
|
25573
25682
|
}, faceLivenessProps, {
|
|
@@ -25918,7 +26027,7 @@
|
|
|
25918
26027
|
},
|
|
25919
26028
|
guidanceMessages: {
|
|
25920
26029
|
"default": {
|
|
25921
|
-
backgroundColor: '
|
|
26030
|
+
backgroundColor: 'white',
|
|
25922
26031
|
textColor: 'black'
|
|
25923
26032
|
},
|
|
25924
26033
|
positive: {
|
|
@@ -26152,6 +26261,7 @@
|
|
|
26152
26261
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26153
26262
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26154
26263
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26264
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26155
26265
|
onAuthError = _a.onAuthError,
|
|
26156
26266
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
26157
26267
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
@@ -26198,6 +26308,7 @@
|
|
|
26198
26308
|
onLoadingStarted: onLoadingStarted,
|
|
26199
26309
|
onLoadingProgress: onLoadingProgress,
|
|
26200
26310
|
onLoadingCompleted: onLoadingCompleted,
|
|
26311
|
+
onLoadingFailed: onLoadingFailed,
|
|
26201
26312
|
onExitCapture: onExitCapture,
|
|
26202
26313
|
onUserCancel: onUserCancel,
|
|
26203
26314
|
onModelError: onModelError,
|
|
@@ -26229,7 +26340,7 @@
|
|
|
26229
26340
|
verbiage: verbiage,
|
|
26230
26341
|
debugMode: debugMode
|
|
26231
26342
|
};
|
|
26232
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
26343
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
26233
26344
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26234
26345
|
return {
|
|
26235
26346
|
documents: captureAdditionalDocuments,
|
|
@@ -26362,6 +26473,7 @@
|
|
|
26362
26473
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26363
26474
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26364
26475
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26476
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26365
26477
|
onAuthError = _a.onAuthError,
|
|
26366
26478
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26367
26479
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -26402,6 +26514,7 @@
|
|
|
26402
26514
|
onLoadingStarted: onLoadingStarted,
|
|
26403
26515
|
onLoadingProgress: onLoadingProgress,
|
|
26404
26516
|
onLoadingCompleted: onLoadingCompleted,
|
|
26517
|
+
onLoadingFailed: onLoadingFailed,
|
|
26405
26518
|
onComplete: onComplete,
|
|
26406
26519
|
onSuccess: onApproved,
|
|
26407
26520
|
onDenied: onDenied,
|
|
@@ -26415,7 +26528,7 @@
|
|
|
26415
26528
|
verbiage: verbiage,
|
|
26416
26529
|
debugMode: debugMode
|
|
26417
26530
|
};
|
|
26418
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
26531
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
26419
26532
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
26420
26533
|
sessionId: sessionId,
|
|
26421
26534
|
authUrl: authUrl,
|
|
@@ -26542,6 +26655,7 @@
|
|
|
26542
26655
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26543
26656
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26544
26657
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26658
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26545
26659
|
onAuthError = _a.onAuthError,
|
|
26546
26660
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26547
26661
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -26590,6 +26704,7 @@
|
|
|
26590
26704
|
onLoadingStarted: onLoadingStarted,
|
|
26591
26705
|
onLoadingProgress: onLoadingProgress,
|
|
26592
26706
|
onLoadingCompleted: onLoadingCompleted,
|
|
26707
|
+
onLoadingFailed: onLoadingFailed,
|
|
26593
26708
|
onExitCapture: onExitCapture,
|
|
26594
26709
|
onUserCancel: onUserCancel,
|
|
26595
26710
|
onModelError: onIdCaptureModelError,
|
|
@@ -26617,12 +26732,13 @@
|
|
|
26617
26732
|
skipSuccessScreen: skipSuccessScreen,
|
|
26618
26733
|
debugMode: debugMode
|
|
26619
26734
|
};
|
|
26620
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
26735
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
26621
26736
|
var faceLivenessProps = React.useMemo(function () {
|
|
26622
26737
|
return {
|
|
26623
26738
|
onLoadingStarted: onLoadingStarted,
|
|
26624
26739
|
onLoadingProgress: onLoadingProgress,
|
|
26625
26740
|
onLoadingCompleted: onLoadingCompleted,
|
|
26741
|
+
onLoadingFailed: onLoadingFailed,
|
|
26626
26742
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
26627
26743
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
26628
26744
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -26640,7 +26756,7 @@
|
|
|
26640
26756
|
verbiage: verbiage.faceLiveness,
|
|
26641
26757
|
debugMode: debugMode
|
|
26642
26758
|
};
|
|
26643
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26759
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26644
26760
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26645
26761
|
return {
|
|
26646
26762
|
documents: captureAdditionalDocuments,
|
|
@@ -26820,6 +26936,7 @@
|
|
|
26820
26936
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26821
26937
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26822
26938
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26939
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26823
26940
|
onAuthError = _a.onAuthError,
|
|
26824
26941
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26825
26942
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -26870,6 +26987,7 @@
|
|
|
26870
26987
|
onLoadingStarted: onLoadingStarted,
|
|
26871
26988
|
onLoadingProgress: onLoadingProgress,
|
|
26872
26989
|
onLoadingCompleted: onLoadingCompleted,
|
|
26990
|
+
onLoadingFailed: onLoadingFailed,
|
|
26873
26991
|
assets: assets.idCapture,
|
|
26874
26992
|
classNames: classNames.idCapture,
|
|
26875
26993
|
colors: colors.idCapture,
|
|
@@ -26897,12 +27015,13 @@
|
|
|
26897
27015
|
skipSuccessScreen: skipSuccessScreen,
|
|
26898
27016
|
debugMode: debugMode
|
|
26899
27017
|
};
|
|
26900
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
27018
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
26901
27019
|
var faceLivenessProps = React.useMemo(function () {
|
|
26902
27020
|
return {
|
|
26903
27021
|
onLoadingStarted: onLoadingStarted,
|
|
26904
27022
|
onLoadingProgress: onLoadingProgress,
|
|
26905
27023
|
onLoadingCompleted: onLoadingCompleted,
|
|
27024
|
+
onLoadingFailed: onLoadingFailed,
|
|
26906
27025
|
onExitCapture: onExitCapture,
|
|
26907
27026
|
onExitAfterFailure: onExitAfterFailure,
|
|
26908
27027
|
onUserCancel: onUserCancel,
|
|
@@ -26919,7 +27038,7 @@
|
|
|
26919
27038
|
verbiage: verbiage.faceLiveness,
|
|
26920
27039
|
debugMode: debugMode
|
|
26921
27040
|
};
|
|
26922
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
27041
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26923
27042
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
26924
27043
|
return _assign({
|
|
26925
27044
|
onExitCapture: onExitCapture,
|
|
@@ -27039,11 +27158,7 @@
|
|
|
27039
27158
|
|
|
27040
27159
|
var ALLOWED_RETRIES$3 = 0;
|
|
27041
27160
|
var initialState$1 = {
|
|
27042
|
-
frame: null,
|
|
27043
|
-
face: null,
|
|
27044
|
-
imageUrl: null,
|
|
27045
27161
|
requestState: 'CAPTURING',
|
|
27046
|
-
requestError: null,
|
|
27047
27162
|
unverifiedTimes: 0
|
|
27048
27163
|
};
|
|
27049
27164
|
var reducer$1 = function reducer(state, action) {
|
|
@@ -27134,7 +27249,7 @@
|
|
|
27134
27249
|
submissionError = _j.submissionError,
|
|
27135
27250
|
selfieImage = _j.selfieImage,
|
|
27136
27251
|
setSelfieImage = _j.setSelfieImage;
|
|
27137
|
-
var _k = React.useState(
|
|
27252
|
+
var _k = React.useState(),
|
|
27138
27253
|
imageUrl = _k[0],
|
|
27139
27254
|
setImageUrl = _k[1];
|
|
27140
27255
|
var rawCanvas = React.useRef(null);
|
|
@@ -27154,9 +27269,7 @@
|
|
|
27154
27269
|
if (!frame || !face || submissionError) return;
|
|
27155
27270
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
27156
27271
|
setImageUrl(imageUrl);
|
|
27157
|
-
dataUrlToBase64(imageUrl).then(
|
|
27158
|
-
setSelfieImage(img);
|
|
27159
|
-
});
|
|
27272
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
27160
27273
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
27161
27274
|
React.useEffect(function () {
|
|
27162
27275
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -27338,6 +27451,7 @@
|
|
|
27338
27451
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
27339
27452
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27340
27453
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27454
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27341
27455
|
onComplete = _a.onComplete,
|
|
27342
27456
|
onCustomerMatched = _a.onCustomerMatched,
|
|
27343
27457
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -27486,6 +27600,7 @@
|
|
|
27486
27600
|
onLoadingStarted: onLoadingStarted,
|
|
27487
27601
|
onLoadingProgress: onLoadingProgress,
|
|
27488
27602
|
onLoadingCompleted: onLoadingCompleted,
|
|
27603
|
+
onLoadingFailed: onLoadingFailed,
|
|
27489
27604
|
onUserCancel: onUserCancel,
|
|
27490
27605
|
onDismissed: function onDismissed() {
|
|
27491
27606
|
return setCaptureState('CAPTURING');
|
|
@@ -27533,6 +27648,7 @@
|
|
|
27533
27648
|
onLoadingStarted = _a.onLoadingStarted,
|
|
27534
27649
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27535
27650
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27651
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27536
27652
|
onAuthError = _a.onAuthError,
|
|
27537
27653
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
27538
27654
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -27606,6 +27722,7 @@
|
|
|
27606
27722
|
onLoadingStarted: onLoadingStarted,
|
|
27607
27723
|
onLoadingProgress: onLoadingProgress,
|
|
27608
27724
|
onLoadingCompleted: onLoadingCompleted,
|
|
27725
|
+
onLoadingFailed: onLoadingFailed,
|
|
27609
27726
|
onComplete: onComplete,
|
|
27610
27727
|
onCustomerMatched: onCustomerMatched,
|
|
27611
27728
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -27625,11 +27742,7 @@
|
|
|
27625
27742
|
|
|
27626
27743
|
var ALLOWED_RETRIES$1 = 0;
|
|
27627
27744
|
var initialState = {
|
|
27628
|
-
frame: null,
|
|
27629
|
-
face: null,
|
|
27630
|
-
imageUrl: null,
|
|
27631
27745
|
requestState: 'CAPTURING',
|
|
27632
|
-
requestError: null,
|
|
27633
27746
|
notFoundTimes: 0
|
|
27634
27747
|
};
|
|
27635
27748
|
var reducer = function reducer(state, action) {
|
|
@@ -27716,7 +27829,7 @@
|
|
|
27716
27829
|
submissionError = _j.submissionError,
|
|
27717
27830
|
selfieImage = _j.selfieImage,
|
|
27718
27831
|
setSelfieImage = _j.setSelfieImage;
|
|
27719
|
-
var _k = React.useState(
|
|
27832
|
+
var _k = React.useState(),
|
|
27720
27833
|
imageUrl = _k[0],
|
|
27721
27834
|
setImageUrl = _k[1];
|
|
27722
27835
|
var rawCanvas = React.useRef(null);
|
|
@@ -27738,9 +27851,7 @@
|
|
|
27738
27851
|
if (!frame || !face || submissionError) return;
|
|
27739
27852
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
27740
27853
|
setImageUrl(imageUrl);
|
|
27741
|
-
dataUrlToBase64(imageUrl).then(
|
|
27742
|
-
setSelfieImage(img);
|
|
27743
|
-
});
|
|
27854
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
27744
27855
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
27745
27856
|
React.useEffect(function () {
|
|
27746
27857
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -27922,6 +28033,7 @@
|
|
|
27922
28033
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
27923
28034
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27924
28035
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28036
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27925
28037
|
onComplete = _a.onComplete,
|
|
27926
28038
|
onCustomerMatched = _a.onCustomerMatched,
|
|
27927
28039
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -28070,6 +28182,7 @@
|
|
|
28070
28182
|
onLoadingStarted: onLoadingStarted,
|
|
28071
28183
|
onLoadingProgress: onLoadingProgress,
|
|
28072
28184
|
onLoadingCompleted: onLoadingCompleted,
|
|
28185
|
+
onLoadingFailed: onLoadingFailed,
|
|
28073
28186
|
onUserCancel: onUserCancel,
|
|
28074
28187
|
onDismissed: function onDismissed() {
|
|
28075
28188
|
setCaptureState('CAPTURING');
|
|
@@ -28110,6 +28223,7 @@
|
|
|
28110
28223
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28111
28224
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28112
28225
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28226
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28113
28227
|
onAuthError = _a.onAuthError,
|
|
28114
28228
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28115
28229
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28188,6 +28302,7 @@
|
|
|
28188
28302
|
onLoadingStarted: onLoadingStarted,
|
|
28189
28303
|
onLoadingProgress: onLoadingProgress,
|
|
28190
28304
|
onLoadingCompleted: onLoadingCompleted,
|
|
28305
|
+
onLoadingFailed: onLoadingFailed,
|
|
28191
28306
|
onComplete: onComplete,
|
|
28192
28307
|
onCustomerMatched: onCustomerMatched,
|
|
28193
28308
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -28222,6 +28337,7 @@
|
|
|
28222
28337
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28223
28338
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28224
28339
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28340
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28225
28341
|
onAuthError = _a.onAuthError,
|
|
28226
28342
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28227
28343
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28262,16 +28378,18 @@
|
|
|
28262
28378
|
faceLivenessProps = _a.faceLivenessProps,
|
|
28263
28379
|
_o = _a.skipLivenessValidation,
|
|
28264
28380
|
skipLivenessValidation = _o === void 0 ? false : _o,
|
|
28381
|
+
_p = _a.allowManualSelfieCaptureOnLoadingError,
|
|
28382
|
+
allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
|
|
28265
28383
|
guidesComponent = _a.guidesComponent,
|
|
28266
|
-
|
|
28267
|
-
theme =
|
|
28384
|
+
_q = _a.theme,
|
|
28385
|
+
theme = _q === void 0 ? 'default' : _q,
|
|
28268
28386
|
classNames = _a.classNames,
|
|
28269
28387
|
colors = _a.colors,
|
|
28270
28388
|
verbiage = _a.verbiage,
|
|
28271
28389
|
geolocationEnabled = _a.geolocationEnabled,
|
|
28272
28390
|
geolocationRequired = _a.geolocationRequired,
|
|
28273
|
-
|
|
28274
|
-
debugMode =
|
|
28391
|
+
_r = _a.debugMode,
|
|
28392
|
+
debugMode = _r === void 0 ? false : _r;
|
|
28275
28393
|
useLanguage(lang);
|
|
28276
28394
|
useDebugLogging(debugMode);
|
|
28277
28395
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -28314,6 +28432,7 @@
|
|
|
28314
28432
|
onLoadingStarted: onLoadingStarted,
|
|
28315
28433
|
onLoadingProgress: onLoadingProgress,
|
|
28316
28434
|
onLoadingCompleted: onLoadingCompleted,
|
|
28435
|
+
onLoadingFailed: onLoadingFailed,
|
|
28317
28436
|
onSelfieCaptured: onSelfieCaptured,
|
|
28318
28437
|
customOverlayContent: customOverlayContent,
|
|
28319
28438
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
@@ -28329,6 +28448,7 @@
|
|
|
28329
28448
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
28330
28449
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
28331
28450
|
skipLivenessValidation: skipLivenessValidation,
|
|
28451
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
28332
28452
|
guidesComponent: guidesComponent,
|
|
28333
28453
|
classNames: classNames,
|
|
28334
28454
|
colors: colors,
|
|
@@ -28337,7 +28457,7 @@
|
|
|
28337
28457
|
onModelError: onModelError,
|
|
28338
28458
|
onUserCancel: onUserCancel
|
|
28339
28459
|
};
|
|
28340
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
28460
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
28341
28461
|
})))));
|
|
28342
28462
|
};
|
|
28343
28463
|
|
|
@@ -28378,6 +28498,7 @@
|
|
|
28378
28498
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28379
28499
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28380
28500
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28501
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28381
28502
|
onAuthError = _a.onAuthError,
|
|
28382
28503
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28383
28504
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28466,6 +28587,7 @@
|
|
|
28466
28587
|
onLoadingStarted: onLoadingStarted,
|
|
28467
28588
|
onLoadingProgress: onLoadingProgress,
|
|
28468
28589
|
onLoadingCompleted: onLoadingCompleted,
|
|
28590
|
+
onLoadingFailed: onLoadingFailed,
|
|
28469
28591
|
idCaptureProps: idCaptureProps,
|
|
28470
28592
|
faceLivenessProps: faceLivenessProps,
|
|
28471
28593
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -28498,7 +28620,7 @@
|
|
|
28498
28620
|
verbiage: verbiage,
|
|
28499
28621
|
debugMode: debugMode
|
|
28500
28622
|
};
|
|
28501
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
28623
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
28502
28624
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
28503
28625
|
return {
|
|
28504
28626
|
documents: captureAdditionalDocuments,
|
|
@@ -28625,6 +28747,7 @@
|
|
|
28625
28747
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28626
28748
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28627
28749
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28750
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28628
28751
|
onAuthError = _a.onAuthError,
|
|
28629
28752
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28630
28753
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28671,6 +28794,7 @@
|
|
|
28671
28794
|
onLoadingStarted: onLoadingStarted,
|
|
28672
28795
|
onLoadingProgress: onLoadingProgress,
|
|
28673
28796
|
onLoadingCompleted: onLoadingCompleted,
|
|
28797
|
+
onLoadingFailed: onLoadingFailed,
|
|
28674
28798
|
onExitCapture: onExitCapture,
|
|
28675
28799
|
onUserCancel: onUserCancel,
|
|
28676
28800
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -28686,7 +28810,7 @@
|
|
|
28686
28810
|
verbiage: verbiage.faceLiveness,
|
|
28687
28811
|
debugMode: debugMode
|
|
28688
28812
|
};
|
|
28689
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28813
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28690
28814
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
28691
28815
|
return {
|
|
28692
28816
|
documents: captureAdditionalDocuments,
|