idmission-web-sdk 2.3.6 → 2.3.8
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/overlay.d.ts +12 -4
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +6 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +6 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +4 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +4 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts +3 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts +3 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +3 -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/SelfieGuidanceModelsProvider.d.ts +3 -0
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +4 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/DocumentDetection.d.ts +3 -0
- package/dist/lib/models/DocumentDetection.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts +3 -0
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/Focus.d.ts +3 -0
- package/dist/lib/models/Focus.d.ts.map +1 -1
- package/dist/lib/models/helpers.d.ts +1 -0
- package/dist/lib/models/helpers.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +10 -0
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -0
- package/dist/sdk2.cjs.development.js +349 -117
- 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 +349 -117
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +349 -117
- 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
|
@@ -235,7 +235,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
235
235
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
236
236
|
};
|
|
237
237
|
|
|
238
|
-
var webSdkVersion = '2.3.
|
|
238
|
+
var webSdkVersion = '2.3.8';
|
|
239
239
|
|
|
240
240
|
function getPlatform() {
|
|
241
241
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -506,8 +506,8 @@ var OverlayInner$2 = styled__default.default.div(templateObject_2$D || (template
|
|
|
506
506
|
var OverlayImageContainer = styled__default.default.div(templateObject_3$r || (templateObject_3$r = __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"])));
|
|
507
507
|
var OverlayImageRow = styled__default.default.div(templateObject_4$l || (templateObject_4$l = __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"])));
|
|
508
508
|
var GrayOverlayContainer = styled__default.default(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
509
|
-
var ButtonsColumn = styled__default.default.div(templateObject_6$
|
|
510
|
-
var WideButton = styled__default.default(LoaderButton)(templateObject_7$
|
|
509
|
+
var ButtonsColumn = styled__default.default.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"])));
|
|
510
|
+
var WideButton = styled__default.default(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
|
|
511
511
|
var WideBorderButton = styled__default.default(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
512
512
|
var _a, _b;
|
|
513
513
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.textColor) !== null && _b !== void 0 ? _b : 'black';
|
|
@@ -518,8 +518,8 @@ var WideBorderButton = styled__default.default(WideButton)(templateObject_8$4 ||
|
|
|
518
518
|
var _a, _b;
|
|
519
519
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.borderColor) !== null && _b !== void 0 ? _b : 'var(--idm-color-secondary-500)';
|
|
520
520
|
});
|
|
521
|
-
var LoadingOverlayInner = styled__default.default(OverlayInner$2)(templateObject_9$
|
|
522
|
-
var LoadingOverlayHeader = styled__default.default.div(templateObject_10$
|
|
521
|
+
var LoadingOverlayInner = styled__default.default(OverlayInner$2)(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"])));
|
|
522
|
+
var LoadingOverlayHeader = styled__default.default.div(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"])), function (props) {
|
|
523
523
|
var _a;
|
|
524
524
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
525
525
|
}, function (props) {
|
|
@@ -527,17 +527,25 @@ var LoadingOverlayHeader = styled__default.default.div(templateObject_10$2 || (t
|
|
|
527
527
|
});
|
|
528
528
|
var LoadingOverlayGuidanceMessage = styled__default.default(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 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 padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\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"])));
|
|
529
529
|
var LoadingOverlayImageContainer = styled__default.default(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"])));
|
|
530
|
-
var LoadingOverlayProgressBarBackground = styled__default.default.div(
|
|
531
|
-
|
|
530
|
+
var LoadingOverlayProgressBarBackground = styled__default.default.div.attrs({
|
|
531
|
+
className: 'loading-overlay-progress-bar-background'
|
|
532
|
+
})(templateObject_13$1 || (templateObject_13$1 = __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"])));
|
|
533
|
+
var LoadingOverlayProgressBar = styled__default.default.span.attrs({
|
|
534
|
+
className: 'loading-overlay-progress-bar'
|
|
535
|
+
})(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"])), function (props) {
|
|
532
536
|
return props.$progress;
|
|
533
537
|
});
|
|
534
|
-
var LoadingOverlayProgressIndicator = styled__default.default.span(
|
|
538
|
+
var LoadingOverlayProgressIndicator = styled__default.default.span.attrs({
|
|
539
|
+
className: 'loading-overlay-progress-indicator'
|
|
540
|
+
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation);
|
|
535
541
|
var LoadingOverlayButtonsRow = styled__default.default(ButtonsRow$2)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"])));
|
|
536
542
|
var LoadingOverlayLoadingListContainer = styled__default.default.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n position: relative;\n z-index: 2;\n"], ["\n display: flex;\n position: relative;\n z-index: 2;\n"])));
|
|
537
543
|
var LoadingOverlayLoadingList = styled__default.default.ul(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"], ["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"])));
|
|
538
544
|
var LoadingOverlayLoadingListItem = styled__default.default.li(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"], ["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"])));
|
|
539
545
|
var LoadingOverlayProgressContainer = styled__default.default.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"])));
|
|
540
|
-
var
|
|
546
|
+
var LoadingOverlayCustomLoadingGraphic = styled__default.default.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
547
|
+
var LoadingOverlayContinueButtonContainer = styled__default.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
548
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$9, templateObject_7$6, templateObject_8$4, templateObject_9$3, 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;
|
|
541
549
|
|
|
542
550
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
543
551
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -2503,19 +2511,23 @@ function useLoadFocusModel(_a) {
|
|
|
2503
2511
|
videoRef = _a.videoRef,
|
|
2504
2512
|
_d = _a.shouldLoadModels,
|
|
2505
2513
|
shouldLoadModels = _d === void 0 ? true : _d;
|
|
2506
|
-
var _e = React.useState(
|
|
2507
|
-
|
|
2508
|
-
|
|
2514
|
+
var _e = React.useState('not-started'),
|
|
2515
|
+
modelLoadState = _e[0],
|
|
2516
|
+
setModelLoadState = _e[1];
|
|
2509
2517
|
var _f = React.useState(0),
|
|
2510
2518
|
modelDownloadProgress = _f[0],
|
|
2511
2519
|
setModelDownloadProgress = _f[1];
|
|
2512
2520
|
var _g = React.useState(null),
|
|
2513
|
-
|
|
2514
|
-
|
|
2521
|
+
modelWarmingStartedAt = _g[0],
|
|
2522
|
+
setModelWarmingStartedAt = _g[1];
|
|
2523
|
+
var _h = React.useState(null),
|
|
2524
|
+
modelError = _h[0],
|
|
2525
|
+
setModelError = _h[1];
|
|
2515
2526
|
React.useEffect(function loadModel() {
|
|
2516
2527
|
var _this = this;
|
|
2517
2528
|
if (!shouldLoadModels) return;
|
|
2518
|
-
|
|
2529
|
+
setModelLoadState('downloading');
|
|
2530
|
+
setModelWarmingStartedAt(null);
|
|
2519
2531
|
function handleDownloadProgress(event) {
|
|
2520
2532
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
2521
2533
|
}
|
|
@@ -2532,6 +2544,8 @@ function useLoadFocusModel(_a) {
|
|
|
2532
2544
|
case 0:
|
|
2533
2545
|
setModelDownloadProgress(100);
|
|
2534
2546
|
clearTimeout(modelLoadTimeout);
|
|
2547
|
+
setModelLoadState('warming');
|
|
2548
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2535
2549
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2536
2550
|
cancelled = false;
|
|
2537
2551
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2544,7 +2558,7 @@ function useLoadFocusModel(_a) {
|
|
|
2544
2558
|
setTimeout(function () {
|
|
2545
2559
|
if (cancelled) return;
|
|
2546
2560
|
loadedModel.classifyForVideo(videoRef.current, performance.now());
|
|
2547
|
-
|
|
2561
|
+
setModelLoadState('ready');
|
|
2548
2562
|
}, 500);
|
|
2549
2563
|
return [2 /*return*/];
|
|
2550
2564
|
}
|
|
@@ -2552,6 +2566,7 @@ function useLoadFocusModel(_a) {
|
|
|
2552
2566
|
});
|
|
2553
2567
|
})["catch"](function (e) {
|
|
2554
2568
|
setModelError(e);
|
|
2569
|
+
setModelLoadState('error');
|
|
2555
2570
|
})["finally"](function () {
|
|
2556
2571
|
clearTimeout(modelLoadTimeout);
|
|
2557
2572
|
});
|
|
@@ -2566,11 +2581,15 @@ function useLoadFocusModel(_a) {
|
|
|
2566
2581
|
React.useEffect(function handleModelError() {
|
|
2567
2582
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2568
2583
|
}, [modelError, onModelError]);
|
|
2569
|
-
return {
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2584
|
+
return React.useMemo(function () {
|
|
2585
|
+
return {
|
|
2586
|
+
ready: modelLoadState === 'ready',
|
|
2587
|
+
modelLoadState: modelLoadState,
|
|
2588
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2589
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2590
|
+
modelError: modelError
|
|
2591
|
+
};
|
|
2592
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2574
2593
|
}
|
|
2575
2594
|
var lastFocusPredictionAt = 0;
|
|
2576
2595
|
var lastFocusPredictionTime = 0;
|
|
@@ -2662,18 +2681,22 @@ function useLoadFaceDetector(_a) {
|
|
|
2662
2681
|
_b = _a.modelLoadTimeoutMs,
|
|
2663
2682
|
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b,
|
|
2664
2683
|
videoRef = _a.videoRef;
|
|
2665
|
-
var _c = React.useState(
|
|
2666
|
-
|
|
2667
|
-
|
|
2684
|
+
var _c = React.useState('not-started'),
|
|
2685
|
+
modelLoadState = _c[0],
|
|
2686
|
+
setModelLoadState = _c[1];
|
|
2668
2687
|
var _d = React.useState(0),
|
|
2669
2688
|
modelDownloadProgress = _d[0],
|
|
2670
2689
|
setModelDownloadProgress = _d[1];
|
|
2671
2690
|
var _e = React.useState(null),
|
|
2672
|
-
|
|
2673
|
-
|
|
2691
|
+
modelWarmingStartedAt = _e[0],
|
|
2692
|
+
setModelWarmingStartedAt = _e[1];
|
|
2693
|
+
var _f = React.useState(null),
|
|
2694
|
+
modelError = _f[0],
|
|
2695
|
+
setModelError = _f[1];
|
|
2674
2696
|
React.useEffect(function loadModel() {
|
|
2675
2697
|
var _this = this;
|
|
2676
|
-
|
|
2698
|
+
setModelLoadState('downloading');
|
|
2699
|
+
setModelWarmingStartedAt(null);
|
|
2677
2700
|
var modelLoadTimeout = setTimeout(function () {
|
|
2678
2701
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
2679
2702
|
}, modelLoadTimeoutMs);
|
|
@@ -2690,6 +2713,8 @@ function useLoadFaceDetector(_a) {
|
|
|
2690
2713
|
case 0:
|
|
2691
2714
|
setModelDownloadProgress(100);
|
|
2692
2715
|
clearTimeout(modelLoadTimeout);
|
|
2716
|
+
setModelLoadState('warming');
|
|
2717
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2693
2718
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2694
2719
|
cancelled = false;
|
|
2695
2720
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2701,13 +2726,14 @@ function useLoadFaceDetector(_a) {
|
|
|
2701
2726
|
_b.sent();
|
|
2702
2727
|
if (cancelled) return [2 /*return*/];
|
|
2703
2728
|
model.detectForVideo(videoRef.current, performance.now());
|
|
2704
|
-
|
|
2729
|
+
setModelLoadState('ready');
|
|
2705
2730
|
return [2 /*return*/];
|
|
2706
2731
|
}
|
|
2707
2732
|
});
|
|
2708
2733
|
});
|
|
2709
2734
|
})["catch"](function (e) {
|
|
2710
2735
|
setModelError(e);
|
|
2736
|
+
setModelLoadState('error');
|
|
2711
2737
|
})["finally"](function () {
|
|
2712
2738
|
clearTimeout(modelLoadTimeout);
|
|
2713
2739
|
});
|
|
@@ -2722,11 +2748,15 @@ function useLoadFaceDetector(_a) {
|
|
|
2722
2748
|
React.useEffect(function handleModelError() {
|
|
2723
2749
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2724
2750
|
}, [modelError, onModelError]);
|
|
2725
|
-
return {
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2751
|
+
return React.useMemo(function () {
|
|
2752
|
+
return {
|
|
2753
|
+
ready: modelLoadState === 'ready',
|
|
2754
|
+
modelLoadState: modelLoadState,
|
|
2755
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2756
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2757
|
+
modelError: modelError
|
|
2758
|
+
};
|
|
2759
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2730
2760
|
}
|
|
2731
2761
|
var lastFaceDetectionAt = 0;
|
|
2732
2762
|
var lastFaceDetectionTime = 0;
|
|
@@ -3168,19 +3198,23 @@ function useLoadDocumentDetector(_a) {
|
|
|
3168
3198
|
scoreThreshold = _e === void 0 ? defaultDocumentDetectionScoreThreshold : _e,
|
|
3169
3199
|
onModelError = _a.onModelError,
|
|
3170
3200
|
videoRef = _a.videoRef;
|
|
3171
|
-
var _f = React.useState(
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
var _g = React.useState(
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
var _h = React.useState(
|
|
3178
|
-
|
|
3179
|
-
|
|
3201
|
+
var _f = React.useState('not-started'),
|
|
3202
|
+
modelLoadState = _f[0],
|
|
3203
|
+
setModelLoadState = _f[1];
|
|
3204
|
+
var _g = React.useState(null),
|
|
3205
|
+
modelWarmingStartedAt = _g[0],
|
|
3206
|
+
setModelWarmingStartedAt = _g[1];
|
|
3207
|
+
var _h = React.useState(0),
|
|
3208
|
+
modelDownloadProgress = _h[0],
|
|
3209
|
+
setModelDownloadProgress = _h[1];
|
|
3210
|
+
var _j = React.useState(null),
|
|
3211
|
+
modelError = _j[0],
|
|
3212
|
+
setModelError = _j[1];
|
|
3180
3213
|
React.useEffect(function loadModel() {
|
|
3181
3214
|
var _this = this;
|
|
3182
3215
|
if (!shouldLoadModels) return;
|
|
3183
|
-
|
|
3216
|
+
setModelLoadState('downloading');
|
|
3217
|
+
setModelWarmingStartedAt(null);
|
|
3184
3218
|
function handleDownloadProgress(event) {
|
|
3185
3219
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
3186
3220
|
}
|
|
@@ -3196,6 +3230,8 @@ function useLoadDocumentDetector(_a) {
|
|
|
3196
3230
|
switch (_b.label) {
|
|
3197
3231
|
case 0:
|
|
3198
3232
|
setModelDownloadProgress(100);
|
|
3233
|
+
setModelLoadState('warming');
|
|
3234
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
3199
3235
|
clearTimeout(modelLoadTimeout);
|
|
3200
3236
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
3201
3237
|
cancelled = false;
|
|
@@ -3209,7 +3245,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3209
3245
|
setTimeout(function () {
|
|
3210
3246
|
if (cancelled) return;
|
|
3211
3247
|
model.detectForVideo(videoRef.current, performance.now());
|
|
3212
|
-
|
|
3248
|
+
setModelLoadState('ready');
|
|
3213
3249
|
}, 500);
|
|
3214
3250
|
return [2 /*return*/];
|
|
3215
3251
|
}
|
|
@@ -3217,6 +3253,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3217
3253
|
});
|
|
3218
3254
|
})["catch"](function (e) {
|
|
3219
3255
|
setModelError(e);
|
|
3256
|
+
setModelLoadState('error');
|
|
3220
3257
|
})["finally"](function () {
|
|
3221
3258
|
clearTimeout(modelLoadTimeout);
|
|
3222
3259
|
});
|
|
@@ -3231,12 +3268,16 @@ function useLoadDocumentDetector(_a) {
|
|
|
3231
3268
|
React.useEffect(function handleModelError() {
|
|
3232
3269
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
3233
3270
|
}, [modelError, onModelError]);
|
|
3234
|
-
return {
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3271
|
+
return React.useMemo(function () {
|
|
3272
|
+
return {
|
|
3273
|
+
ready: modelLoadState === 'ready',
|
|
3274
|
+
modelLoadState: modelLoadState,
|
|
3275
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
3276
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
3277
|
+
modelError: modelError,
|
|
3278
|
+
setModelError: setModelError
|
|
3279
|
+
};
|
|
3280
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
3240
3281
|
}
|
|
3241
3282
|
function makeDocumentDetectorPrediction(frame) {
|
|
3242
3283
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -5200,8 +5241,9 @@ var DocumentDetectionModelContext = /*#__PURE__*/React.createContext({
|
|
|
5200
5241
|
loadDocumentDetectionModel: function loadDocumentDetectionModel() {
|
|
5201
5242
|
return null;
|
|
5202
5243
|
},
|
|
5203
|
-
|
|
5244
|
+
documentDetectionModelState: 'not-started',
|
|
5204
5245
|
documentDetectionModelDownloadProgress: 0,
|
|
5246
|
+
documentDetectionModelWarmingStartedAt: null,
|
|
5205
5247
|
documentDetectionModelError: null,
|
|
5206
5248
|
onDocumentDetected: function onDocumentDetected() {
|
|
5207
5249
|
return null;
|
|
@@ -5274,7 +5316,9 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5274
5316
|
shouldLoadModels: shouldLoadModels
|
|
5275
5317
|
}),
|
|
5276
5318
|
ready = _q.ready,
|
|
5319
|
+
modelLoadState = _q.modelLoadState,
|
|
5277
5320
|
modelDownloadProgress = _q.modelDownloadProgress,
|
|
5321
|
+
modelWarmingStartedAt = _q.modelWarmingStartedAt,
|
|
5278
5322
|
modelError = _q.modelError,
|
|
5279
5323
|
setModelError = _q.setModelError;
|
|
5280
5324
|
var _r = useFrameLoop(React.useCallback(function (frameId, timeRunning) {
|
|
@@ -5341,7 +5385,8 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5341
5385
|
startDocumentDetection: start,
|
|
5342
5386
|
stopDocumentDetection: stop,
|
|
5343
5387
|
loadDocumentDetectionModel: load,
|
|
5344
|
-
|
|
5388
|
+
documentDetectionModelState: modelLoadState,
|
|
5389
|
+
documentDetectionModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5345
5390
|
documentDetectionModelError: modelError,
|
|
5346
5391
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
5347
5392
|
onDocumentDetected: onDocumentDetected,
|
|
@@ -5353,7 +5398,7 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5353
5398
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
5354
5399
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
5355
5400
|
};
|
|
5356
|
-
}, [start, stop, load,
|
|
5401
|
+
}, [start, stop, load, modelLoadState, modelWarmingStartedAt, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
5357
5402
|
return /*#__PURE__*/React__namespace.createElement(DocumentDetectionModelContext.Provider, {
|
|
5358
5403
|
value: value
|
|
5359
5404
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -5366,8 +5411,9 @@ var FocusModelContext = /*#__PURE__*/React.createContext({
|
|
|
5366
5411
|
loadFocusModel: function loadFocusModel() {
|
|
5367
5412
|
return null;
|
|
5368
5413
|
},
|
|
5369
|
-
|
|
5414
|
+
focusModelState: 'not-started',
|
|
5370
5415
|
focusModelDownloadProgress: 0,
|
|
5416
|
+
focusModelWarmingStartedAt: null,
|
|
5371
5417
|
focusModelError: null,
|
|
5372
5418
|
focusThresholds: {},
|
|
5373
5419
|
setFocusThresholds: function setFocusThresholds() {
|
|
@@ -5409,7 +5455,9 @@ function FocusModelProvider(_a) {
|
|
|
5409
5455
|
shouldLoadModels: shouldLoadModels
|
|
5410
5456
|
}),
|
|
5411
5457
|
ready = _h.ready,
|
|
5458
|
+
modelLoadState = _h.modelLoadState,
|
|
5412
5459
|
modelDownloadProgress = _h.modelDownloadProgress,
|
|
5460
|
+
modelWarmingStartedAt = _h.modelWarmingStartedAt,
|
|
5413
5461
|
modelError = _h.modelError;
|
|
5414
5462
|
var makeFocusPrediction = React.useCallback(function (imageData, box) {
|
|
5415
5463
|
if (!ready) return null;
|
|
@@ -5421,15 +5469,16 @@ function FocusModelProvider(_a) {
|
|
|
5421
5469
|
var value = React.useMemo(function () {
|
|
5422
5470
|
return {
|
|
5423
5471
|
loadFocusModel: load,
|
|
5424
|
-
|
|
5472
|
+
focusModelState: modelLoadState,
|
|
5425
5473
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
5474
|
+
focusModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5426
5475
|
focusModelError: modelError,
|
|
5427
5476
|
makeFocusPrediction: makeFocusPrediction,
|
|
5428
5477
|
focusPredictionTime: lastFocusPredictionTime,
|
|
5429
5478
|
focusThresholds: focusThresholds,
|
|
5430
5479
|
setFocusThresholds: setFocusThresholds
|
|
5431
5480
|
};
|
|
5432
|
-
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError,
|
|
5481
|
+
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError, modelLoadState, modelWarmingStartedAt]);
|
|
5433
5482
|
return /*#__PURE__*/React__namespace.default.createElement(FocusModelContext.Provider, {
|
|
5434
5483
|
value: value
|
|
5435
5484
|
}, /*#__PURE__*/React__namespace.default.createElement(InvisibleCanvas, {
|
|
@@ -5494,6 +5543,8 @@ var IdCaptureModelsContext = /*#__PURE__*/React.createContext({
|
|
|
5494
5543
|
return null;
|
|
5495
5544
|
},
|
|
5496
5545
|
modelDownloadProgress: 0,
|
|
5546
|
+
modelLoadState: 'not-started',
|
|
5547
|
+
modelWarmingStartedAt: null,
|
|
5497
5548
|
modelError: null,
|
|
5498
5549
|
thresholds: defaultIdCaptureThresholds,
|
|
5499
5550
|
setThresholds: function setThresholds() {
|
|
@@ -5528,8 +5579,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5528
5579
|
_b = _a.allowSinglePageIdCapture,
|
|
5529
5580
|
allowSinglePageIdCapture = _b === void 0 ? false : _b;
|
|
5530
5581
|
var _c = React.useContext(DocumentDetectionModelContext),
|
|
5531
|
-
|
|
5582
|
+
documentDetectionModelState = _c.documentDetectionModelState,
|
|
5532
5583
|
documentDetectionModelDownloadProgress = _c.documentDetectionModelDownloadProgress,
|
|
5584
|
+
documentDetectionModelWarmingStartedAt = _c.documentDetectionModelWarmingStartedAt,
|
|
5533
5585
|
startDocumentDetection = _c.startDocumentDetection,
|
|
5534
5586
|
stopDocumentDetection = _c.stopDocumentDetection,
|
|
5535
5587
|
loadDocumentDetectionModel = _c.loadDocumentDetectionModel,
|
|
@@ -5544,8 +5596,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5544
5596
|
documentDetectionModelError = _c.documentDetectionModelError;
|
|
5545
5597
|
var _d = React.useContext(FocusModelContext),
|
|
5546
5598
|
loadFocusModel = _d.loadFocusModel,
|
|
5547
|
-
|
|
5599
|
+
focusModelState = _d.focusModelState,
|
|
5548
5600
|
focusModelDownloadProgress = _d.focusModelDownloadProgress,
|
|
5601
|
+
focusModelWarmingStartedAt = _d.focusModelWarmingStartedAt,
|
|
5549
5602
|
makeFocusPrediction = _d.makeFocusPrediction,
|
|
5550
5603
|
focusThresholds = _d.focusThresholds,
|
|
5551
5604
|
setFocusThresholds = _d.setFocusThresholds,
|
|
@@ -5653,10 +5706,17 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5653
5706
|
loadDocumentDetectionModel();
|
|
5654
5707
|
loadFocusModel();
|
|
5655
5708
|
}, [loadDocumentDetectionModel, loadFocusModel]);
|
|
5709
|
+
var ready = documentDetectionModelState === 'ready' && focusModelState === 'ready';
|
|
5710
|
+
var modelLoadState = ready ? 'ready' : documentDetectionModelState === 'warming' || focusModelState === 'warming' ? 'warming' : focusModelState === 'downloading' || documentDetectionModelState === 'downloading' ? 'downloading' : 'not-started';
|
|
5711
|
+
var modelWarmingStartedAt = !documentDetectionModelWarmingStartedAt && !focusModelWarmingStartedAt ? null : Math.min.apply(Math, [documentDetectionModelWarmingStartedAt, focusModelWarmingStartedAt].filter(function (v) {
|
|
5712
|
+
return v !== null;
|
|
5713
|
+
}));
|
|
5656
5714
|
var value = React.useMemo(function () {
|
|
5657
5715
|
return {
|
|
5658
|
-
ready:
|
|
5716
|
+
ready: ready,
|
|
5659
5717
|
modelDownloadProgress: (documentDetectionModelDownloadProgress + focusModelDownloadProgress) / 2,
|
|
5718
|
+
modelLoadState: modelLoadState,
|
|
5719
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
5660
5720
|
modelError: modelError,
|
|
5661
5721
|
start: startDocumentDetection,
|
|
5662
5722
|
stop: stopDocumentDetection,
|
|
@@ -5674,7 +5734,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5674
5734
|
requiredDocumentType: requiredDocumentType,
|
|
5675
5735
|
setRequiredDocumentType: setRequiredDocumentType
|
|
5676
5736
|
};
|
|
5677
|
-
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress,
|
|
5737
|
+
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress, focusModelDownloadProgress, focusPredictionTime, getBestFrame, load, modelLoadState, modelError, modelWarmingStartedAt, onPredictionMade, ready, requiredDocumentType, resetBestFrame, setDocumentDetectionBoundaries, setThresholds, startDocumentDetection, stopDocumentDetection, thresholds]);
|
|
5678
5738
|
return /*#__PURE__*/React__namespace.default.createElement(IdCaptureModelsContext.Provider, {
|
|
5679
5739
|
value: value
|
|
5680
5740
|
}, /*#__PURE__*/React__namespace.default.createElement(InvisibleCanvas, {
|
|
@@ -7314,10 +7374,49 @@ function LoadingListItemIndicator(_a) {
|
|
|
7314
7374
|
}))))));
|
|
7315
7375
|
}
|
|
7316
7376
|
|
|
7377
|
+
function useLoadProgressHooks(_a) {
|
|
7378
|
+
var ready = _a.ready,
|
|
7379
|
+
modelLoadState = _a.modelLoadState,
|
|
7380
|
+
modelLoadProgress = _a.modelLoadProgress,
|
|
7381
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
7382
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
7383
|
+
onLoadingCompleted = _a.onLoadingCompleted;
|
|
7384
|
+
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
7385
|
+
React.useEffect(function () {
|
|
7386
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
7387
|
+
}, [onLoadingStarted]);
|
|
7388
|
+
var onLoadingProgressRef = React.useRef(onLoadingProgress);
|
|
7389
|
+
React.useEffect(function () {
|
|
7390
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
7391
|
+
}, [onLoadingProgress]);
|
|
7392
|
+
var onLoadingCompletedRef = React.useRef(onLoadingCompleted);
|
|
7393
|
+
React.useEffect(function () {
|
|
7394
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
7395
|
+
}, [onLoadingCompleted]);
|
|
7396
|
+
var loadingStarted = modelLoadState !== 'not-started';
|
|
7397
|
+
React.useEffect(function () {
|
|
7398
|
+
var _a;
|
|
7399
|
+
if (loadingStarted) (_a = onLoadingStartedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingStartedRef);
|
|
7400
|
+
}, [loadingStarted]);
|
|
7401
|
+
React.useEffect(function () {
|
|
7402
|
+
var _a;
|
|
7403
|
+
if (modelLoadProgress > 0) {
|
|
7404
|
+
(_a = onLoadingProgressRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingProgressRef, modelLoadProgress);
|
|
7405
|
+
}
|
|
7406
|
+
}, [modelLoadProgress]);
|
|
7407
|
+
React.useEffect(function () {
|
|
7408
|
+
var _a;
|
|
7409
|
+
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
7410
|
+
}, [ready]);
|
|
7411
|
+
}
|
|
7412
|
+
|
|
7317
7413
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
7318
7414
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
7319
7415
|
var _b, _c, _d, _e, _f, _g;
|
|
7320
|
-
var
|
|
7416
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
7417
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
7418
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7419
|
+
onDismissed = _a.onDismissed,
|
|
7321
7420
|
onUserCancel = _a.onUserCancel,
|
|
7322
7421
|
instructions = _a.instructions,
|
|
7323
7422
|
_h = _a.rotateImage,
|
|
@@ -7335,7 +7434,9 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7335
7434
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
7336
7435
|
var _o = useIdCaptureModelsContext(),
|
|
7337
7436
|
modelsReady = _o.ready,
|
|
7338
|
-
|
|
7437
|
+
modelLoadState = _o.modelLoadState,
|
|
7438
|
+
modelDownloadProgress = _o.modelDownloadProgress,
|
|
7439
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt;
|
|
7339
7440
|
var _p = useCameraStore(),
|
|
7340
7441
|
cameraReady = _p.cameraReady,
|
|
7341
7442
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -7346,6 +7447,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7346
7447
|
setDismissed = _q[1];
|
|
7347
7448
|
var theme = styled.useTheme();
|
|
7348
7449
|
assets.instructionImageUrl || (assets.instructionImageUrl = legacyInstructionImageUrl$1);
|
|
7450
|
+
var hasCustomInstructionGraphic = assets.instructionImageUrl !== legacyInstructionImageUrl$1;
|
|
7349
7451
|
var verbiage = useTranslations(rawVerbiage, {
|
|
7350
7452
|
headingText: 'Use your device camera to capture your ID',
|
|
7351
7453
|
useContinuityCameraText: 'Use your iPhone as a webcam',
|
|
@@ -7371,6 +7473,17 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7371
7473
|
};
|
|
7372
7474
|
}, [ready]);
|
|
7373
7475
|
var imageRef = React.useRef(null);
|
|
7476
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
7477
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
7478
|
+
var modelLoadProgress = modelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
7479
|
+
useLoadProgressHooks({
|
|
7480
|
+
ready: ready,
|
|
7481
|
+
modelLoadState: modelLoadState,
|
|
7482
|
+
modelLoadProgress: modelLoadProgress,
|
|
7483
|
+
onLoadingStarted: onLoadingStarted,
|
|
7484
|
+
onLoadingProgress: onLoadingProgress,
|
|
7485
|
+
onLoadingCompleted: onLoadingCompleted
|
|
7486
|
+
});
|
|
7374
7487
|
if (dismissed) return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null);
|
|
7375
7488
|
if (cameraAccessDenied) {
|
|
7376
7489
|
return /*#__PURE__*/React__namespace.default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -7400,7 +7513,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7400
7513
|
className: classNames.heading
|
|
7401
7514
|
}, verbiage.headingText)), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayImageContainer, {
|
|
7402
7515
|
className: classNames.imageContainer
|
|
7403
|
-
},
|
|
7516
|
+
}, hasCustomInstructionGraphic ? ( /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
7404
7517
|
ref: imageRef,
|
|
7405
7518
|
alt: verbiage.headingText,
|
|
7406
7519
|
src: assets.instructionImageUrl,
|
|
@@ -7430,7 +7543,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7430
7543
|
}, /*#__PURE__*/React__namespace.default.createElement(ProgressBarBackground$1, {
|
|
7431
7544
|
className: classNames.progressBackground
|
|
7432
7545
|
}), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayProgressBar, {
|
|
7433
|
-
"$progress":
|
|
7546
|
+
"$progress": modelLoadProgress,
|
|
7434
7547
|
className: classNames.progressBar
|
|
7435
7548
|
}, /*#__PURE__*/React__namespace.default.createElement(ProgressIndicator$1, {
|
|
7436
7549
|
className: classNames.progressIndicator
|
|
@@ -7448,7 +7561,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7448
7561
|
}, /*#__PURE__*/React__namespace.default.createElement(LoadingListItemIndicator, {
|
|
7449
7562
|
className: classNames.loadingListItemIndicator,
|
|
7450
7563
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
7451
|
-
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText :
|
|
7564
|
+
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelLoadState === 'downloading' ? "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)") : modelLoadState === 'warming' ? verbiage.modelsWarmingUpText : verbiage.modelsReadyText))), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayContinueButtonContainer, {
|
|
7452
7565
|
className: classNames.continueBtnContainer
|
|
7453
7566
|
}, (ready || ((_g = (_f = theme.idCapture) === null || _f === void 0 ? void 0 : _f.loadingOverlay) === null || _g === void 0 ? void 0 : _g.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__namespace.default.createElement(ContinueButton$1, {
|
|
7454
7567
|
autoFocus: true,
|
|
@@ -7471,8 +7584,8 @@ var OverlayInner$1 = styled__default.default(LoadingOverlayInner)(templateObject
|
|
|
7471
7584
|
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';
|
|
7472
7585
|
});
|
|
7473
7586
|
var ContinuityCameraCheckboxContainer$1 = styled__default.default.div(templateObject_2$x || (templateObject_2$x = __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"])));
|
|
7474
|
-
var ContinuityCameraCheckboxInner = styled__default.default(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\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 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"])));
|
|
7475
|
-
var ContinuityCameraCheckbox$1 = styled__default.default.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin
|
|
7587
|
+
var ContinuityCameraCheckboxInner = styled__default.default(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __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"])));
|
|
7588
|
+
var ContinuityCameraCheckbox$1 = styled__default.default.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
7476
7589
|
var ButtonsRow$1 = styled__default.default(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
7477
7590
|
var _a, _b, _c, _d;
|
|
7478
7591
|
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.progressBarTextColor) !== null && _d !== void 0 ? _d : 'white';
|
|
@@ -7480,17 +7593,18 @@ var ButtonsRow$1 = styled__default.default(LoadingOverlayButtonsRow)(templateObj
|
|
|
7480
7593
|
var _a, _b, _c, _d, _e, _f;
|
|
7481
7594
|
return ((_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.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
7482
7595
|
});
|
|
7483
|
-
var ProgressBarBackground$1 = styled__default.default(LoadingOverlayProgressBarBackground)(templateObject_6$
|
|
7596
|
+
var ProgressBarBackground$1 = styled__default.default(LoadingOverlayProgressBarBackground)(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
7484
7597
|
var _a, _b, _c, _d;
|
|
7485
7598
|
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.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
7486
7599
|
}, function (props) {
|
|
7487
7600
|
var _a, _b, _c, _d;
|
|
7488
7601
|
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.progressBarBackgroundOpacity) !== null && _d !== void 0 ? _d : 0.75;
|
|
7489
7602
|
});
|
|
7490
|
-
var ProgressIndicator$1 = styled__default.default(LoadingOverlayProgressIndicator)(templateObject_7$
|
|
7491
|
-
var
|
|
7492
|
-
|
|
7493
|
-
|
|
7603
|
+
var ProgressIndicator$1 = styled__default.default(LoadingOverlayProgressIndicator)(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), function (props) {
|
|
7604
|
+
var _a, _b, _c, _d;
|
|
7605
|
+
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.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-primary-500)';
|
|
7606
|
+
});
|
|
7607
|
+
var ContinueButton$1 = styled__default.default(LoaderButton)(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"])), function (props) {
|
|
7494
7608
|
var _a, _b, _c, _d, _e, _f;
|
|
7495
7609
|
return ((_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.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
7496
7610
|
}, function (props) {
|
|
@@ -7509,7 +7623,7 @@ var ContinueButton$1 = styled__default.default(LoaderButton)(templateObject_10$1
|
|
|
7509
7623
|
var _a, _b, _c, _d;
|
|
7510
7624
|
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';
|
|
7511
7625
|
});
|
|
7512
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$
|
|
7626
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$8, templateObject_7$5, templateObject_8$3;
|
|
7513
7627
|
|
|
7514
7628
|
var ContinuityCameraCheckboxContainer = styled__default.default.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
7515
7629
|
var ContinuityCameraCheckbox = styled__default.default.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -7760,8 +7874,8 @@ var ImagesContainer = styled__default.default(OverlayImageContainer)(templateObj
|
|
|
7760
7874
|
var ImageRow = styled__default.default(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __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"])));
|
|
7761
7875
|
var ImageCol$1 = styled__default.default.div(templateObject_4$f || (templateObject_4$f = __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"])));
|
|
7762
7876
|
var StyledImage = styled__default.default(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
7763
|
-
var DebugPre = styled__default.default.pre(templateObject_6$
|
|
7764
|
-
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$
|
|
7877
|
+
var DebugPre = styled__default.default.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"])));
|
|
7878
|
+
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$7;
|
|
7765
7879
|
|
|
7766
7880
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
7767
7881
|
var _this = this;
|
|
@@ -8452,12 +8566,12 @@ var GuideRegion = styled__default.default.div(templateObject_4$d || (templateObj
|
|
|
8452
8566
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
8453
8567
|
});
|
|
8454
8568
|
var Spacer = styled__default.default(GuideRegion)(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
8455
|
-
var GuideCenterRegion = styled__default.default.div(templateObject_6$
|
|
8569
|
+
var GuideCenterRegion = styled__default.default.div(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
8456
8570
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
8457
8571
|
}, function (props) {
|
|
8458
8572
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
8459
8573
|
});
|
|
8460
|
-
var GuideCenterBorder = styled__default.default.div(templateObject_7$
|
|
8574
|
+
var GuideCenterBorder = styled__default.default.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"])), function (props) {
|
|
8461
8575
|
var _a, _b;
|
|
8462
8576
|
return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
|
|
8463
8577
|
}, function (props) {
|
|
@@ -8465,7 +8579,7 @@ var GuideCenterBorder = styled__default.default.div(templateObject_7$5 || (templ
|
|
|
8465
8579
|
});
|
|
8466
8580
|
var GuideText = styled__default.default.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
|
|
8467
8581
|
var GuideCenterInner = styled__default.default.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
|
|
8468
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$
|
|
8582
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$6, templateObject_7$4, templateObject_8$2, templateObject_9$2;
|
|
8469
8583
|
|
|
8470
8584
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
8471
8585
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -9337,9 +9451,9 @@ var Instructions = styled__default.default.div(templateObject_5$8 || (templateOb
|
|
|
9337
9451
|
var _a, _b, _c;
|
|
9338
9452
|
return (_c = (_b = (_a = props.theme.documentCapture) === null || _a === void 0 ? void 0 : _a.instructions) === null || _b === void 0 ? void 0 : _b.maxHeight) !== null && _c !== void 0 ? _c : '8rem';
|
|
9339
9453
|
});
|
|
9340
|
-
var StyledButtonsRow$8 = styled__default.default(ButtonsRow$2)(templateObject_6$
|
|
9341
|
-
var PreviewImage = styled__default.default.img(templateObject_7$
|
|
9342
|
-
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$
|
|
9454
|
+
var StyledButtonsRow$8 = styled__default.default(ButtonsRow$2)(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
9455
|
+
var PreviewImage = styled__default.default.img(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
9456
|
+
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$5, templateObject_7$3;
|
|
9343
9457
|
|
|
9344
9458
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
9345
9459
|
var onSuccess = _a.onSuccess,
|
|
@@ -9615,8 +9729,8 @@ var Heading$8 = styled__default.default.h3(templateObject_2$m || (templateObject
|
|
|
9615
9729
|
var Description$3 = styled__default.default.p(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9616
9730
|
var Instruction = styled__default.default.p(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
9617
9731
|
var ImageCol = styled__default.default.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"])));
|
|
9618
|
-
var StyledButtonsRow$7 = styled__default.default(ButtonsRow$2)(templateObject_6$
|
|
9619
|
-
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$
|
|
9732
|
+
var StyledButtonsRow$7 = styled__default.default(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
9733
|
+
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$4;
|
|
9620
9734
|
|
|
9621
9735
|
function ScalingCameraFeed() {
|
|
9622
9736
|
var _a = useIdCaptureStore(),
|
|
@@ -9976,8 +10090,8 @@ var ScreenPanel = styled__default.default.div(templateObject_2$l || (templateObj
|
|
|
9976
10090
|
var SelectIdCardScreenPanel = styled__default.default(ScreenPanel)(templateObject_3$f || (templateObject_3$f = __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"])));
|
|
9977
10091
|
var ScreenPanelHeading = styled__default.default.h3(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
9978
10092
|
var ScreenActionsBar = styled__default.default.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"])));
|
|
9979
|
-
var DashedSeparator = styled__default.default.div(templateObject_6$
|
|
9980
|
-
var OrWrapper = styled__default.default.div(templateObject_7$
|
|
10093
|
+
var DashedSeparator = styled__default.default.div(templateObject_6$3 || (templateObject_6$3 = __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"])));
|
|
10094
|
+
var OrWrapper = styled__default.default.div(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
9981
10095
|
var UploadIdBackHelpText = styled__default.default.p(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"], ["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"])));
|
|
9982
10096
|
var Button = styled__default.default(WideBorderButton)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
9983
10097
|
var Modal = styled__default.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
|
|
@@ -10257,17 +10371,20 @@ function humanFileSize(bytes, si, dp) {
|
|
|
10257
10371
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
10258
10372
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
10259
10373
|
}
|
|
10260
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$
|
|
10374
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$3, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10261
10375
|
|
|
10262
10376
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
10263
10377
|
var _b, _c, _d, _e, _f;
|
|
10264
|
-
var
|
|
10378
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
10379
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
10380
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
10381
|
+
onSuccess = _a.onSuccess,
|
|
10265
10382
|
onExitCapture = _a.onExitCapture,
|
|
10266
10383
|
onUserCancel = _a.onUserCancel,
|
|
10384
|
+
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10267
10385
|
_g = _a.loadingOverlayMode,
|
|
10268
10386
|
loadingOverlayMode = _g === void 0 ? 'default' : _g,
|
|
10269
10387
|
customOverlayContent = _a.customOverlayContent,
|
|
10270
|
-
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10271
10388
|
precapturedDocuments = _a.precapturedDocuments,
|
|
10272
10389
|
_h = _a.captureRequirement,
|
|
10273
10390
|
captureRequirement = _h === void 0 ? 'idCardOrPassport' : _h,
|
|
@@ -10613,6 +10730,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10613
10730
|
colors: colors.loadingOverlay,
|
|
10614
10731
|
verbiage: verbiage.loadingOverlay,
|
|
10615
10732
|
onUserCancel: onUserCancel,
|
|
10733
|
+
onLoadingStarted: onLoadingStarted,
|
|
10734
|
+
onLoadingProgress: onLoadingProgress,
|
|
10735
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
10616
10736
|
onDismissed: function onDismissed() {
|
|
10617
10737
|
setOverlayDismissed(true);
|
|
10618
10738
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -11270,6 +11390,8 @@ var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
|
|
|
11270
11390
|
},
|
|
11271
11391
|
ready: false,
|
|
11272
11392
|
error: null,
|
|
11393
|
+
modelLoadState: 'not-started',
|
|
11394
|
+
modelWarmingStartedAt: null,
|
|
11273
11395
|
modelDownloadProgress: 0
|
|
11274
11396
|
});
|
|
11275
11397
|
function SelfieGuidanceModelsProvider(_a) {
|
|
@@ -11301,7 +11423,9 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11301
11423
|
videoRef: videoRef
|
|
11302
11424
|
}),
|
|
11303
11425
|
ready = _f.ready,
|
|
11426
|
+
modelLoadState = _f.modelLoadState,
|
|
11304
11427
|
modelDownloadProgress = _f.modelDownloadProgress,
|
|
11428
|
+
modelWarmingStartedAt = _f.modelWarmingStartedAt,
|
|
11305
11429
|
modelError = _f.modelError;
|
|
11306
11430
|
var _g = useFrameLoop(React.useCallback(function () {
|
|
11307
11431
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -11363,9 +11487,11 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11363
11487
|
canvasRef: canvasRef,
|
|
11364
11488
|
onPredictionMade: onPredictionMade,
|
|
11365
11489
|
error: modelError,
|
|
11366
|
-
modelDownloadProgress: modelDownloadProgress
|
|
11490
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
11491
|
+
modelLoadState: modelLoadState,
|
|
11492
|
+
modelWarmingStartedAt: modelWarmingStartedAt
|
|
11367
11493
|
};
|
|
11368
|
-
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress]);
|
|
11494
|
+
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress, modelLoadState, modelWarmingStartedAt]);
|
|
11369
11495
|
return /*#__PURE__*/React__namespace.createElement(SelfieGuidanceModelsContext.Provider, {
|
|
11370
11496
|
value: value
|
|
11371
11497
|
}, /*#__PURE__*/React__namespace.createElement(InvisibleCanvas, {
|
|
@@ -12332,7 +12458,10 @@ var templateObject_1$h, templateObject_2$e;
|
|
|
12332
12458
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
12333
12459
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
12334
12460
|
var _b, _c;
|
|
12335
|
-
var
|
|
12461
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
12462
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
12463
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12464
|
+
onDismissed = _a.onDismissed,
|
|
12336
12465
|
onUserCancel = _a.onUserCancel,
|
|
12337
12466
|
customOverlayContent = _a.customOverlayContent,
|
|
12338
12467
|
_d = _a.waitForIdCaptureModels,
|
|
@@ -12358,8 +12487,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12358
12487
|
cameraAccessDenied = _j.cameraAccessDenied,
|
|
12359
12488
|
microphoneAccessDenied = _j.microphoneAccessDenied;
|
|
12360
12489
|
var _k = useSelfieGuidanceModelsContext(),
|
|
12361
|
-
|
|
12362
|
-
modelDownloadProgress = _k.modelDownloadProgress
|
|
12490
|
+
modelLoadState = _k.modelLoadState,
|
|
12491
|
+
modelDownloadProgress = _k.modelDownloadProgress,
|
|
12492
|
+
modelWarmingStartedAt = _k.modelWarmingStartedAt;
|
|
12363
12493
|
var idCaptureModelsContext = React.useContext(IdCaptureModelsContext);
|
|
12364
12494
|
var theme = styled.useTheme();
|
|
12365
12495
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -12386,6 +12516,19 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12386
12516
|
});
|
|
12387
12517
|
}, 3000);
|
|
12388
12518
|
}, []);
|
|
12519
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
12520
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
12521
|
+
var allModelsReady = modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12522
|
+
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12523
|
+
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
12524
|
+
useLoadProgressHooks({
|
|
12525
|
+
ready: ready,
|
|
12526
|
+
modelLoadState: modelLoadState,
|
|
12527
|
+
modelLoadProgress: modelLoadProgress,
|
|
12528
|
+
onLoadingStarted: onLoadingStarted,
|
|
12529
|
+
onLoadingProgress: onLoadingProgress,
|
|
12530
|
+
onLoadingCompleted: onLoadingCompleted
|
|
12531
|
+
});
|
|
12389
12532
|
var _m = React.useState(false),
|
|
12390
12533
|
dismissed = _m[0],
|
|
12391
12534
|
setDismissed = _m[1];
|
|
@@ -12406,8 +12549,6 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12406
12549
|
verbiage: rawVerbiage.microphoneAccessDenied
|
|
12407
12550
|
});
|
|
12408
12551
|
}
|
|
12409
|
-
var allModelsReady = modelsReady && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12410
|
-
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12411
12552
|
return /*#__PURE__*/React__namespace.default.createElement(OverlayContainer, {
|
|
12412
12553
|
className: classNames.container
|
|
12413
12554
|
}, /*#__PURE__*/React__namespace.default.createElement(OverlayInner, {
|
|
@@ -12421,7 +12562,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12421
12562
|
className: classNames.heading
|
|
12422
12563
|
}, headingText)), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayImageContainer, {
|
|
12423
12564
|
className: classNames.imageContainer
|
|
12424
|
-
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React__namespace.default.createElement(
|
|
12565
|
+
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
12425
12566
|
className: classNames.image,
|
|
12426
12567
|
alt: verbiage.headingText,
|
|
12427
12568
|
src: assets.instructionImageUrl
|
|
@@ -12434,7 +12575,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12434
12575
|
}, /*#__PURE__*/React__namespace.default.createElement(ProgressBarBackground, {
|
|
12435
12576
|
className: classNames.progressBackground
|
|
12436
12577
|
}), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayProgressBar, {
|
|
12437
|
-
"$progress":
|
|
12578
|
+
"$progress": modelLoadProgress,
|
|
12438
12579
|
className: classNames.progressBar
|
|
12439
12580
|
}, /*#__PURE__*/React__namespace.default.createElement(ProgressIndicator, {
|
|
12440
12581
|
className: classNames.progressIndicator
|
|
@@ -12452,7 +12593,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12452
12593
|
}, /*#__PURE__*/React__namespace.default.createElement(LoadingListItemIndicator, {
|
|
12453
12594
|
className: classNames.loadingListItemIndicator,
|
|
12454
12595
|
state: sessionReady && allModelsReady ? 'done' : 'running'
|
|
12455
|
-
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__namespace.default.createElement(
|
|
12596
|
+
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__namespace.default.createElement(LoadingOverlayContinueButtonContainer, {
|
|
12456
12597
|
className: classNames.continueBtnContainer
|
|
12457
12598
|
}, (ready || ((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__namespace.default.createElement(ContinueButton, {
|
|
12458
12599
|
autoFocus: true,
|
|
@@ -12492,9 +12633,7 @@ var ProgressIndicator = styled__default.default(LoadingOverlayProgressIndicator)
|
|
|
12492
12633
|
var _a, _b, _c, _d;
|
|
12493
12634
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
12494
12635
|
});
|
|
12495
|
-
var
|
|
12496
|
-
var ContinueButtonContainer = styled__default.default.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
12497
|
-
var ContinueButton = styled__default.default(LoaderButton)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
12636
|
+
var ContinueButton = styled__default.default(LoaderButton)(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
12498
12637
|
var _a, _b, _c, _d, _e, _f;
|
|
12499
12638
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
12500
12639
|
}, function (props) {
|
|
@@ -12513,7 +12652,7 @@ var ContinueButton = styled__default.default(LoaderButton)(templateObject_7$2 ||
|
|
|
12513
12652
|
var _a, _b, _c, _d;
|
|
12514
12653
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
12515
12654
|
});
|
|
12516
|
-
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4
|
|
12655
|
+
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4;
|
|
12517
12656
|
|
|
12518
12657
|
var components = {
|
|
12519
12658
|
"default": SelfieCaptureLoadingOverlayDefault,
|
|
@@ -12530,7 +12669,10 @@ var SelfieCaptureLoadingOverlay = function SelfieCaptureLoadingOverlay(_a) {
|
|
|
12530
12669
|
|
|
12531
12670
|
var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
12532
12671
|
var _b;
|
|
12533
|
-
var
|
|
12672
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
12673
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
12674
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12675
|
+
onComplete = _a.onComplete,
|
|
12534
12676
|
onSuccess = _a.onSuccess,
|
|
12535
12677
|
onFailure = _a.onFailure,
|
|
12536
12678
|
onTimeout = _a.onTimeout,
|
|
@@ -12797,6 +12939,9 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12797
12939
|
classNames: classNames.loadingOverlay,
|
|
12798
12940
|
colors: colors.loadingOverlay,
|
|
12799
12941
|
verbiage: verbiage.loadingOverlay,
|
|
12942
|
+
onLoadingStarted: onLoadingStarted,
|
|
12943
|
+
onLoadingProgress: onLoadingProgress,
|
|
12944
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
12800
12945
|
onUserCancel: onUserCancel,
|
|
12801
12946
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
12802
12947
|
waitForIdCaptureModels: waitForIdCaptureModels
|
|
@@ -13885,7 +14030,10 @@ var StyledVideo$1 = styled__default.default.video(templateObject_1$9 || (templat
|
|
|
13885
14030
|
var templateObject_1$9;
|
|
13886
14031
|
|
|
13887
14032
|
var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
13888
|
-
var
|
|
14033
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
14034
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
14035
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14036
|
+
onComplete = _a.onComplete,
|
|
13889
14037
|
onVideoCaptured = _a.onVideoCaptured,
|
|
13890
14038
|
onRetryClicked = _a.onRetryClicked,
|
|
13891
14039
|
onExitCapture = _a.onExitCapture,
|
|
@@ -14037,6 +14185,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14037
14185
|
return /*#__PURE__*/React__namespace.default.createElement(FaceLivenessWizard, _assign({
|
|
14038
14186
|
key: "face-liveness-".concat(attempt)
|
|
14039
14187
|
}, faceLivenessProps, {
|
|
14188
|
+
onLoadingStarted: onLoadingStarted,
|
|
14189
|
+
onLoadingProgress: onLoadingProgress,
|
|
14190
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
14040
14191
|
onSuccess: onFaceCaptureSuccess,
|
|
14041
14192
|
onExitCapture: onExitCapture,
|
|
14042
14193
|
onUserCancel: onUserCancel,
|
|
@@ -14982,6 +15133,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14982
15133
|
_s = _a.idCaptureLoadingOverlayMode,
|
|
14983
15134
|
idCaptureLoadingOverlayMode = _s === void 0 ? 'default' : _s,
|
|
14984
15135
|
customOverlayContent = _a.customOverlayContent,
|
|
15136
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
15137
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
15138
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14985
15139
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
14986
15140
|
_t = _a.idDocumentType,
|
|
14987
15141
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -15139,6 +15293,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15139
15293
|
key: "id-capture-".concat(attempt),
|
|
15140
15294
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15141
15295
|
customOverlayContent: customOverlayContent,
|
|
15296
|
+
onLoadingStarted: onLoadingStarted,
|
|
15297
|
+
onLoadingProgress: onLoadingProgress,
|
|
15298
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15142
15299
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15143
15300
|
silentFallback: silentFallback,
|
|
15144
15301
|
guideImages: idCaptureGuideImages
|
|
@@ -15163,6 +15320,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15163
15320
|
key: "face-liveness-".concat(attempt),
|
|
15164
15321
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
15165
15322
|
customOverlayContent: customOverlayContent,
|
|
15323
|
+
onLoadingStarted: onLoadingStarted,
|
|
15324
|
+
onLoadingProgress: onLoadingProgress,
|
|
15325
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15166
15326
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15167
15327
|
silentFallback: silentFallback
|
|
15168
15328
|
}, faceLivenessProps, {
|
|
@@ -15761,6 +15921,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15761
15921
|
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
15762
15922
|
_u = _a.allowUploadingDocumentsFromStorage,
|
|
15763
15923
|
allowUploadingDocumentsFromStorage = _u === void 0 ? false : _u,
|
|
15924
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
15925
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
15926
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15764
15927
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
15765
15928
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15766
15929
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15802,6 +15965,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15802
15965
|
useDebugLogging(debugMode);
|
|
15803
15966
|
var idCaptureProps = React.useMemo(function () {
|
|
15804
15967
|
return {
|
|
15968
|
+
onLoadingStarted: onLoadingStarted,
|
|
15969
|
+
onLoadingProgress: onLoadingProgress,
|
|
15970
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15805
15971
|
onExitCapture: onExitCapture,
|
|
15806
15972
|
onUserCancel: onUserCancel,
|
|
15807
15973
|
onModelError: onModelError,
|
|
@@ -15831,7 +15997,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15831
15997
|
verbiage: verbiage,
|
|
15832
15998
|
debugMode: debugMode
|
|
15833
15999
|
};
|
|
15834
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
16000
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15835
16001
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
15836
16002
|
return {
|
|
15837
16003
|
documents: captureAdditionalDocuments,
|
|
@@ -15960,6 +16126,9 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15960
16126
|
_h = _a.skipSuccessScreen,
|
|
15961
16127
|
skipSuccessScreen = _h === void 0 ? false : _h,
|
|
15962
16128
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
16129
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16130
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16131
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15963
16132
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15964
16133
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
15965
16134
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -15996,6 +16165,9 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15996
16165
|
timeoutDurationMs: timeoutDurationMs,
|
|
15997
16166
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
15998
16167
|
skipSuccessScreen: skipSuccessScreen,
|
|
16168
|
+
onLoadingStarted: onLoadingStarted,
|
|
16169
|
+
onLoadingProgress: onLoadingProgress,
|
|
16170
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15999
16171
|
onComplete: onComplete,
|
|
16000
16172
|
onSuccess: onApproved,
|
|
16001
16173
|
onDenied: onDenied,
|
|
@@ -16009,7 +16181,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16009
16181
|
verbiage: verbiage,
|
|
16010
16182
|
debugMode: debugMode
|
|
16011
16183
|
};
|
|
16012
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16184
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16013
16185
|
return /*#__PURE__*/React__namespace.default.createElement(AuthProvider, {
|
|
16014
16186
|
sessionId: sessionId,
|
|
16015
16187
|
authUrl: authUrl
|
|
@@ -16132,6 +16304,9 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16132
16304
|
enableOverrideWrongDocumentTypeDialog = _w === void 0 ? false : _w,
|
|
16133
16305
|
_x = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
16134
16306
|
allowOverrideWrongDocumentTypeAfterMs = _x === void 0 ? 8000 : _x,
|
|
16307
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16308
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16309
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16135
16310
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16136
16311
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
16137
16312
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16176,6 +16351,9 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16176
16351
|
useDebugLogging(debugMode);
|
|
16177
16352
|
var idCaptureProps = React.useMemo(function () {
|
|
16178
16353
|
return {
|
|
16354
|
+
onLoadingStarted: onLoadingStarted,
|
|
16355
|
+
onLoadingProgress: onLoadingProgress,
|
|
16356
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16179
16357
|
onExitCapture: onExitCapture,
|
|
16180
16358
|
onUserCancel: onUserCancel,
|
|
16181
16359
|
onModelError: onIdCaptureModelError,
|
|
@@ -16203,9 +16381,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16203
16381
|
skipSuccessScreen: skipSuccessScreen,
|
|
16204
16382
|
debugMode: debugMode
|
|
16205
16383
|
};
|
|
16206
|
-
}, [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]);
|
|
16384
|
+
}, [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]);
|
|
16207
16385
|
var faceLivenessProps = React.useMemo(function () {
|
|
16208
16386
|
return {
|
|
16387
|
+
onLoadingStarted: onLoadingStarted,
|
|
16388
|
+
onLoadingProgress: onLoadingProgress,
|
|
16389
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16209
16390
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
16210
16391
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
16211
16392
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -16223,7 +16404,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16223
16404
|
verbiage: verbiage.faceLiveness,
|
|
16224
16405
|
debugMode: debugMode
|
|
16225
16406
|
};
|
|
16226
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16407
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16227
16408
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
16228
16409
|
return {
|
|
16229
16410
|
documents: captureAdditionalDocuments,
|
|
@@ -16399,6 +16580,9 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16399
16580
|
allowUploadingDocumentsFromStorage = _w === void 0 ? false : _w,
|
|
16400
16581
|
_x = _a.separateIdCardCaptureSequence,
|
|
16401
16582
|
separateIdCardCaptureSequence = _x === void 0 ? false : _x,
|
|
16583
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16584
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16585
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16402
16586
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16403
16587
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
16404
16588
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -16445,6 +16629,9 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16445
16629
|
useDebugLogging(debugMode);
|
|
16446
16630
|
var idCaptureProps = React.useMemo(function () {
|
|
16447
16631
|
return {
|
|
16632
|
+
onLoadingStarted: onLoadingStarted,
|
|
16633
|
+
onLoadingProgress: onLoadingProgress,
|
|
16634
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16448
16635
|
assets: assets.idCapture,
|
|
16449
16636
|
classNames: classNames.idCapture,
|
|
16450
16637
|
colors: colors.idCapture,
|
|
@@ -16472,9 +16659,12 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16472
16659
|
skipSuccessScreen: skipSuccessScreen,
|
|
16473
16660
|
debugMode: debugMode
|
|
16474
16661
|
};
|
|
16475
|
-
}, [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]);
|
|
16662
|
+
}, [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]);
|
|
16476
16663
|
var faceLivenessProps = React.useMemo(function () {
|
|
16477
16664
|
return {
|
|
16665
|
+
onLoadingStarted: onLoadingStarted,
|
|
16666
|
+
onLoadingProgress: onLoadingProgress,
|
|
16667
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16478
16668
|
onExitCapture: onExitCapture,
|
|
16479
16669
|
onExitAfterFailure: onExitAfterFailure,
|
|
16480
16670
|
onUserCancel: onUserCancel,
|
|
@@ -16491,7 +16681,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16491
16681
|
verbiage: verbiage.faceLiveness,
|
|
16492
16682
|
debugMode: debugMode
|
|
16493
16683
|
};
|
|
16494
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16684
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16495
16685
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
16496
16686
|
return _assign({
|
|
16497
16687
|
onExitCapture: onExitCapture,
|
|
@@ -16906,7 +17096,10 @@ var templateObject_1$2, templateObject_2$2, templateObject_3$2;
|
|
|
16906
17096
|
|
|
16907
17097
|
var ALLOWED_RETRIES$2 = 2;
|
|
16908
17098
|
var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
16909
|
-
var
|
|
17099
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
17100
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17101
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17102
|
+
onComplete = _a.onComplete,
|
|
16910
17103
|
onCustomerMatched = _a.onCustomerMatched,
|
|
16911
17104
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
16912
17105
|
onExitCapture = _a.onExitCapture,
|
|
@@ -17036,7 +17229,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17036
17229
|
onExitAfterFailure === null || onExitAfterFailure === void 0 ? void 0 : onExitAfterFailure();
|
|
17037
17230
|
},
|
|
17038
17231
|
onRetryClick: function onRetryClick() {
|
|
17039
|
-
setAttempt(function (n) {
|
|
17232
|
+
return setAttempt(function (n) {
|
|
17040
17233
|
return n + 1;
|
|
17041
17234
|
});
|
|
17042
17235
|
}
|
|
@@ -17051,9 +17244,12 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17051
17244
|
classNames: classNames.loadingOverlay,
|
|
17052
17245
|
colors: colors.loadingOverlay,
|
|
17053
17246
|
verbiage: verbiage.loadingOverlay,
|
|
17247
|
+
onLoadingStarted: onLoadingStarted,
|
|
17248
|
+
onLoadingProgress: onLoadingProgress,
|
|
17249
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17054
17250
|
onUserCancel: onUserCancel,
|
|
17055
17251
|
onDismissed: function onDismissed() {
|
|
17056
|
-
setCaptureState('CAPTURING');
|
|
17252
|
+
return setCaptureState('CAPTURING');
|
|
17057
17253
|
}
|
|
17058
17254
|
}));
|
|
17059
17255
|
};
|
|
@@ -17095,6 +17291,9 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17095
17291
|
classNames = _a.classNames,
|
|
17096
17292
|
colors = _a.colors,
|
|
17097
17293
|
verbiage = _a.verbiage,
|
|
17294
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17295
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17296
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17098
17297
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17099
17298
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17100
17299
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17163,6 +17362,9 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17163
17362
|
}, /*#__PURE__*/React__namespace.default.createElement(SdkPage, {
|
|
17164
17363
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
17165
17364
|
}, /*#__PURE__*/React__namespace.default.createElement(CustomerVerificationWizard, {
|
|
17365
|
+
onLoadingStarted: onLoadingStarted,
|
|
17366
|
+
onLoadingProgress: onLoadingProgress,
|
|
17367
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17166
17368
|
onComplete: onComplete,
|
|
17167
17369
|
onCustomerMatched: onCustomerMatched,
|
|
17168
17370
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17476,7 +17678,10 @@ var templateObject_1, templateObject_2, templateObject_3;
|
|
|
17476
17678
|
|
|
17477
17679
|
var ALLOWED_RETRIES = 2;
|
|
17478
17680
|
var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
17479
|
-
var
|
|
17681
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
17682
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17683
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17684
|
+
onComplete = _a.onComplete,
|
|
17480
17685
|
onCustomerMatched = _a.onCustomerMatched,
|
|
17481
17686
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
17482
17687
|
onExitCapture = _a.onExitCapture,
|
|
@@ -17621,6 +17826,9 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
17621
17826
|
classNames: classNames.loadingOverlay,
|
|
17622
17827
|
colors: colors.loadingOverlay,
|
|
17623
17828
|
verbiage: verbiage.loadingOverlay,
|
|
17829
|
+
onLoadingStarted: onLoadingStarted,
|
|
17830
|
+
onLoadingProgress: onLoadingProgress,
|
|
17831
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17624
17832
|
onUserCancel: onUserCancel,
|
|
17625
17833
|
onDismissed: function onDismissed() {
|
|
17626
17834
|
setCaptureState('CAPTURING');
|
|
@@ -17658,6 +17866,9 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
17658
17866
|
modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
|
|
17659
17867
|
_f = _a.skipSuccessScreen,
|
|
17660
17868
|
skipSuccessScreen = _f === void 0 ? false : _f,
|
|
17869
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17870
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17871
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17661
17872
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17662
17873
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17663
17874
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17731,6 +17942,9 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
17731
17942
|
}, /*#__PURE__*/React__namespace.default.createElement(SdkPage, {
|
|
17732
17943
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
17733
17944
|
}, /*#__PURE__*/React__namespace.default.createElement(CustomerIdentificationWizard, {
|
|
17945
|
+
onLoadingStarted: onLoadingStarted,
|
|
17946
|
+
onLoadingProgress: onLoadingProgress,
|
|
17947
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17734
17948
|
onComplete: onComplete,
|
|
17735
17949
|
onCustomerMatched: onCustomerMatched,
|
|
17736
17950
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17762,6 +17976,9 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17762
17976
|
documentServiceUrl = _a.documentServiceUrl,
|
|
17763
17977
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
17764
17978
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
17979
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17980
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17981
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17765
17982
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17766
17983
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17767
17984
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17841,6 +18058,9 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17841
18058
|
onCameraTamperingDetected: onCameraTamperingDetected,
|
|
17842
18059
|
videoSignatureCaptureProps: React.useMemo(function () {
|
|
17843
18060
|
return {
|
|
18061
|
+
onLoadingStarted: onLoadingStarted,
|
|
18062
|
+
onLoadingProgress: onLoadingProgress,
|
|
18063
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17844
18064
|
customOverlayContent: customOverlayContent,
|
|
17845
18065
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
17846
18066
|
loadingOverlayMode: loadingOverlayMode,
|
|
@@ -17859,7 +18079,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17859
18079
|
onModelError: onModelError,
|
|
17860
18080
|
onUserCancel: onUserCancel
|
|
17861
18081
|
};
|
|
17862
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18082
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17863
18083
|
})))));
|
|
17864
18084
|
};
|
|
17865
18085
|
|
|
@@ -17897,6 +18117,9 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17897
18117
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
17898
18118
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
17899
18119
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
18120
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
18121
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
18122
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17900
18123
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17901
18124
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17902
18125
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17981,6 +18204,9 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17981
18204
|
useDebugLogging(debugMode);
|
|
17982
18205
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
17983
18206
|
return {
|
|
18207
|
+
onLoadingStarted: onLoadingStarted,
|
|
18208
|
+
onLoadingProgress: onLoadingProgress,
|
|
18209
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17984
18210
|
idCaptureProps: idCaptureProps,
|
|
17985
18211
|
faceLivenessProps: faceLivenessProps,
|
|
17986
18212
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -18013,7 +18239,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18013
18239
|
verbiage: verbiage,
|
|
18014
18240
|
debugMode: debugMode
|
|
18015
18241
|
};
|
|
18016
|
-
}, [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]);
|
|
18242
|
+
}, [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]);
|
|
18017
18243
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
18018
18244
|
return {
|
|
18019
18245
|
documents: captureAdditionalDocuments,
|
|
@@ -18136,6 +18362,9 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18136
18362
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
18137
18363
|
_g = _a.skipSuccessScreen,
|
|
18138
18364
|
skipSuccessScreen = _g === void 0 ? false : _g,
|
|
18365
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
18366
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
18367
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18139
18368
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18140
18369
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
18141
18370
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -18178,6 +18407,9 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18178
18407
|
useDebugLogging(debugMode);
|
|
18179
18408
|
var faceLivenessProps = React.useMemo(function () {
|
|
18180
18409
|
return {
|
|
18410
|
+
onLoadingStarted: onLoadingStarted,
|
|
18411
|
+
onLoadingProgress: onLoadingProgress,
|
|
18412
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
18181
18413
|
onExitCapture: onExitCapture,
|
|
18182
18414
|
onUserCancel: onUserCancel,
|
|
18183
18415
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -18193,7 +18425,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18193
18425
|
verbiage: verbiage.faceLiveness,
|
|
18194
18426
|
debugMode: debugMode
|
|
18195
18427
|
};
|
|
18196
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18428
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18197
18429
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
18198
18430
|
return {
|
|
18199
18431
|
documents: captureAdditionalDocuments,
|