idmission-web-sdk 2.1.49 → 2.1.50
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/CompositeWizard.d.ts +2 -11
- package/dist/{contexts/GuideOrientationContext.d.ts → components/GuideOrientationContextProvider.d.ts} +6 -2
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +3 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -0
- package/dist/components/customer_flows/IdValidation.d.ts +3 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts +3 -0
- package/dist/components/guide_images/backToFront.d.ts +2 -0
- package/dist/components/guide_images/byUrl.d.ts +4 -0
- package/dist/components/guide_images/defaults.d.ts +36 -0
- package/dist/components/guide_images/index.d.ts +6 -0
- package/dist/components/guide_images/merge.d.ts +2 -0
- package/dist/components/guide_images/orientation.d.ts +1 -0
- package/dist/components/guide_images/types.d.ts +14 -0
- package/dist/components/guide_images/useGuideImages.d.ts +2 -0
- package/dist/components/id_capture/FlipIdPrompt.d.ts +3 -8
- package/dist/components/id_capture/IdCapture.d.ts +1 -6
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +4 -4
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +4 -14
- package/dist/components/id_capture/IdCaptureGuides.d.ts +4 -6
- package/dist/components/id_capture/IdCaptureWizard.d.ts +5 -7
- package/dist/components/video_id/IdVideoCapture.d.ts +4 -6
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -3
- package/dist/sdk2.cjs.development.js +585 -533
- 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 +585 -533
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +585 -533
- 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
- package/dist/components/GuideOrientationProvider.d.ts +0 -4
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.1.
|
|
237
|
+
var webSdkVersion = '2.1.50';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6911,8 +6911,6 @@ var GuidanceMessage = styled__default.default.div(templateObject_2$u || (templat
|
|
|
6911
6911
|
});
|
|
6912
6912
|
var templateObject_1$C, templateObject_2$u;
|
|
6913
6913
|
|
|
6914
|
-
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
6915
|
-
|
|
6916
6914
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
6917
6915
|
var _b = _a.classNames,
|
|
6918
6916
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -6965,32 +6963,30 @@ var IdCapture = function IdCapture(_a) {
|
|
|
6965
6963
|
guidanceMessage = _a.guidanceMessage,
|
|
6966
6964
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
6967
6965
|
onCapture = _a.onCapture,
|
|
6968
|
-
_l = _a.
|
|
6969
|
-
|
|
6970
|
-
_m = _a.
|
|
6971
|
-
|
|
6972
|
-
_o = _a.
|
|
6973
|
-
|
|
6974
|
-
_p = _a.
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
_s =
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
state = _u[0],
|
|
6986
|
-
dispatch = _u[1];
|
|
6966
|
+
_l = _a.classNames,
|
|
6967
|
+
classNames = _l === void 0 ? {} : _l,
|
|
6968
|
+
_m = _a.colors,
|
|
6969
|
+
colors = _m === void 0 ? {} : _m,
|
|
6970
|
+
_o = _a.verbiage,
|
|
6971
|
+
rawVerbiage = _o === void 0 ? {} : _o,
|
|
6972
|
+
_p = _a.debugMode,
|
|
6973
|
+
debugMode = _p === void 0 ? false : _p;
|
|
6974
|
+
var _q = useResizeObserver__default.default(),
|
|
6975
|
+
ref = _q.ref,
|
|
6976
|
+
_r = _q.width,
|
|
6977
|
+
width = _r === void 0 ? 1 : _r,
|
|
6978
|
+
_s = _q.height,
|
|
6979
|
+
height = _s === void 0 ? 1 : _s;
|
|
6980
|
+
var _t = useIdCaptureState(),
|
|
6981
|
+
state = _t[0],
|
|
6982
|
+
dispatch = _t[1];
|
|
6987
6983
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
6988
|
-
var
|
|
6989
|
-
modelsReady =
|
|
6990
|
-
setThresholds =
|
|
6991
|
-
detectionTime =
|
|
6992
|
-
focusPredictionTime =
|
|
6993
|
-
getBestFrame =
|
|
6984
|
+
var _u = React.useContext(IdCaptureModelsContext),
|
|
6985
|
+
modelsReady = _u.ready,
|
|
6986
|
+
setThresholds = _u.setThresholds,
|
|
6987
|
+
detectionTime = _u.detectionTime,
|
|
6988
|
+
focusPredictionTime = _u.focusPredictionTime,
|
|
6989
|
+
getBestFrame = _u.getBestFrame;
|
|
6994
6990
|
React.useEffect(function () {
|
|
6995
6991
|
setThresholds(thresholds);
|
|
6996
6992
|
}, [thresholds, setThresholds]);
|
|
@@ -7055,8 +7051,6 @@ var IdCapture = function IdCapture(_a) {
|
|
|
7055
7051
|
});
|
|
7056
7052
|
}, 0);
|
|
7057
7053
|
}, [dispatch, getBestFrame, onCapture, shouldCapture, state.captureStartedAt, state.requestedDocumentType]);
|
|
7058
|
-
assets.portraitGuidesImageUrl || (assets.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
7059
|
-
assets.landscapeGuidesImageUrl || (assets.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
7060
7054
|
var theme = styled.useTheme();
|
|
7061
7055
|
colors.guideBoxUnsatisfiedColor || (colors.guideBoxUnsatisfiedColor = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.unsatisfiedColor) !== null && _d !== void 0 ? _d : 'white');
|
|
7062
7056
|
colors.guideBoxSatisfiedColor || (colors.guideBoxSatisfiedColor = (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.satisfiedColor) !== null && _g !== void 0 ? _g : 'green');
|
|
@@ -7114,6 +7108,8 @@ var timeSince = function timeSince(t) {
|
|
|
7114
7108
|
return Math.abs(new Date().getTime() - t.getTime());
|
|
7115
7109
|
};
|
|
7116
7110
|
|
|
7111
|
+
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
7112
|
+
|
|
7117
7113
|
var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
|
|
7118
7114
|
var _b;
|
|
7119
7115
|
var _c = _a.assets,
|
|
@@ -8215,21 +8211,6 @@ function resetCanvasDimensions(canvas) {
|
|
|
8215
8211
|
canvas.style.height = '0';
|
|
8216
8212
|
}
|
|
8217
8213
|
|
|
8218
|
-
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
8219
|
-
orientation: 'landscape',
|
|
8220
|
-
wrapperWidth: 1,
|
|
8221
|
-
wrapperHeight: 1,
|
|
8222
|
-
wrapperAspectRatio: 0,
|
|
8223
|
-
imageAspectRatio: 0,
|
|
8224
|
-
wrapperRef: null,
|
|
8225
|
-
setDimensions: function setDimensions() {
|
|
8226
|
-
return null;
|
|
8227
|
-
},
|
|
8228
|
-
onImageLoaded: function onImageLoaded() {
|
|
8229
|
-
return null;
|
|
8230
|
-
}
|
|
8231
|
-
});
|
|
8232
|
-
|
|
8233
8214
|
var IdCardGuideImageContainer = styled__default.default(IdCardBorder)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
|
|
8234
8215
|
return props.$isVisible ? '' : 'opacity: 0;';
|
|
8235
8216
|
});
|
|
@@ -8388,10 +8369,114 @@ var IdCardBorderRect = styled__default.default.rect(templateObject_5$9 || (templ
|
|
|
8388
8369
|
});
|
|
8389
8370
|
var templateObject_1$u, templateObject_2$o, templateObject_3$k, templateObject_4$e, templateObject_5$9;
|
|
8390
8371
|
|
|
8372
|
+
var defaultIdCaptureGuideImages = {
|
|
8373
|
+
portrait: {
|
|
8374
|
+
SHOW_ID_FRONT: {
|
|
8375
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"),
|
|
8376
|
+
width: 386,
|
|
8377
|
+
height: 573
|
|
8378
|
+
},
|
|
8379
|
+
SHOW_ID_BACK: {
|
|
8380
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"),
|
|
8381
|
+
width: 386,
|
|
8382
|
+
height: 573
|
|
8383
|
+
},
|
|
8384
|
+
SHOW_PASSPORT: {
|
|
8385
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-Borderless.svg"),
|
|
8386
|
+
width: 386,
|
|
8387
|
+
height: 573
|
|
8388
|
+
}
|
|
8389
|
+
},
|
|
8390
|
+
landscape: {
|
|
8391
|
+
SHOW_ID_FRONT: {
|
|
8392
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"),
|
|
8393
|
+
width: 573,
|
|
8394
|
+
height: 386
|
|
8395
|
+
},
|
|
8396
|
+
SHOW_ID_BACK: {
|
|
8397
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"),
|
|
8398
|
+
width: 573,
|
|
8399
|
+
height: 386
|
|
8400
|
+
},
|
|
8401
|
+
SHOW_PASSPORT: {
|
|
8402
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-Borderless.svg"),
|
|
8403
|
+
width: 573,
|
|
8404
|
+
height: 386
|
|
8405
|
+
}
|
|
8406
|
+
}
|
|
8407
|
+
};
|
|
8408
|
+
|
|
8409
|
+
function isObject(item) {
|
|
8410
|
+
return !!item && typeof item === 'object' && !Array.isArray(item);
|
|
8411
|
+
}
|
|
8412
|
+
function mergeDeep(target, source) {
|
|
8413
|
+
var output = Object.assign({}, target);
|
|
8414
|
+
if (isObject(target) && isObject(source)) {
|
|
8415
|
+
Object.keys(source).forEach(function (key) {
|
|
8416
|
+
var _a, _b;
|
|
8417
|
+
var keyT = key;
|
|
8418
|
+
if (isObject(source[keyT])) {
|
|
8419
|
+
if (!(keyT in target)) Object.assign(output, (_a = {}, _a[keyT] = source[keyT], _a));else {
|
|
8420
|
+
// @ts-expect-error TS2345
|
|
8421
|
+
output[keyT] = mergeDeep(target[keyT], source[keyT]);
|
|
8422
|
+
}
|
|
8423
|
+
} else {
|
|
8424
|
+
Object.assign(output, (_b = {}, _b[keyT] = source[keyT], _b));
|
|
8425
|
+
}
|
|
8426
|
+
});
|
|
8427
|
+
}
|
|
8428
|
+
return output;
|
|
8429
|
+
}
|
|
8430
|
+
|
|
8431
|
+
function useGuideImagesByUrl(images) {
|
|
8432
|
+
return React.useMemo(function () {
|
|
8433
|
+
return Object.fromEntries(Object.values(images).flatMap(function (v) {
|
|
8434
|
+
return Object.values(v);
|
|
8435
|
+
}).map(function (v) {
|
|
8436
|
+
return [v.url, v];
|
|
8437
|
+
}));
|
|
8438
|
+
}, [images]);
|
|
8439
|
+
}
|
|
8440
|
+
|
|
8441
|
+
function useGuideImages(userSuppliedImages) {
|
|
8442
|
+
return React.useMemo(function () {
|
|
8443
|
+
warnAboutImagesMissingDimensions(userSuppliedImages);
|
|
8444
|
+
return mergeDeep(defaultIdCaptureGuideImages, userSuppliedImages);
|
|
8445
|
+
}, [userSuppliedImages]);
|
|
8446
|
+
}
|
|
8447
|
+
function warnAboutImagesMissingDimensions(userSuppliedImages) {
|
|
8448
|
+
Object.values(userSuppliedImages).forEach(function (images) {
|
|
8449
|
+
Object.values(images).forEach(function (image) {
|
|
8450
|
+
if (image.url && (!image.width || !image.height)) {
|
|
8451
|
+
warn("The image ".concat(image.url, " is missing width and/or height. This will cause the image scaling issues in Safari. Please provide the width and height of the image."));
|
|
8452
|
+
}
|
|
8453
|
+
});
|
|
8454
|
+
});
|
|
8455
|
+
}
|
|
8456
|
+
|
|
8457
|
+
function useImagesWithBackToFront(userSuppliedImages, isBackToFront) {
|
|
8458
|
+
var images = useGuideImages(userSuppliedImages);
|
|
8459
|
+
return React.useMemo(function () {
|
|
8460
|
+
if (!isBackToFront) return images;
|
|
8461
|
+
var _images = structuredClone(images);
|
|
8462
|
+
var temp = _images.portrait.SHOW_ID_FRONT;
|
|
8463
|
+
_images.portrait.SHOW_ID_FRONT = _images.portrait.SHOW_ID_BACK;
|
|
8464
|
+
_images.portrait.SHOW_ID_BACK = temp;
|
|
8465
|
+
var temp2 = _images.landscape.SHOW_ID_FRONT;
|
|
8466
|
+
_images.landscape.SHOW_ID_FRONT = _images.landscape.SHOW_ID_BACK;
|
|
8467
|
+
_images.landscape.SHOW_ID_BACK = temp2;
|
|
8468
|
+
return _images;
|
|
8469
|
+
}, [images, isBackToFront]);
|
|
8470
|
+
}
|
|
8471
|
+
|
|
8472
|
+
function getOrientation(allowPortraitOnMobile) {
|
|
8473
|
+
return allowPortraitOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8474
|
+
}
|
|
8475
|
+
|
|
8391
8476
|
var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
8392
8477
|
var _b;
|
|
8393
|
-
var _c = _a.
|
|
8394
|
-
|
|
8478
|
+
var _c = _a.idCaptureGuideImages,
|
|
8479
|
+
idCaptureGuideImages = _c === void 0 ? defaultIdCaptureGuideImages : _c,
|
|
8395
8480
|
_d = _a.classNames,
|
|
8396
8481
|
classNames = _d === void 0 ? {} : _d,
|
|
8397
8482
|
borderWidth = _a.borderWidth,
|
|
@@ -8399,8 +8484,6 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8399
8484
|
borderRadius = _a.borderRadius,
|
|
8400
8485
|
imageStyle = _a.imageStyle;
|
|
8401
8486
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
8402
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
8403
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
8404
8487
|
var isMirrored = !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing);
|
|
8405
8488
|
var _e = React.useState(1),
|
|
8406
8489
|
transitionTime = _e[0],
|
|
@@ -8439,7 +8522,7 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8439
8522
|
"$transitionTime": transitionTime,
|
|
8440
8523
|
"$isVisible": true
|
|
8441
8524
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8442
|
-
src:
|
|
8525
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
8443
8526
|
className: classNames.frontImage,
|
|
8444
8527
|
alt: "",
|
|
8445
8528
|
style: imageStyle
|
|
@@ -8453,7 +8536,7 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8453
8536
|
"$transitionTime": transitionTime,
|
|
8454
8537
|
"$isVisible": true
|
|
8455
8538
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8456
|
-
src:
|
|
8539
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_BACK.url,
|
|
8457
8540
|
className: classNames.backImage,
|
|
8458
8541
|
alt: "",
|
|
8459
8542
|
style: imageStyle
|
|
@@ -8466,43 +8549,84 @@ var FlipImageContainer = styled__default.default(IdCardGuideImageContainer)(temp
|
|
|
8466
8549
|
});
|
|
8467
8550
|
var templateObject_1$t;
|
|
8468
8551
|
|
|
8552
|
+
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
8553
|
+
orientation: 'landscape',
|
|
8554
|
+
wrapperWidth: 1,
|
|
8555
|
+
wrapperHeight: 1,
|
|
8556
|
+
wrapperAspectRatio: 0,
|
|
8557
|
+
imageAspectRatio: 0,
|
|
8558
|
+
wrapperRef: null,
|
|
8559
|
+
setDimensions: function setDimensions() {
|
|
8560
|
+
return null;
|
|
8561
|
+
},
|
|
8562
|
+
onImageLoaded: function onImageLoaded() {
|
|
8563
|
+
return null;
|
|
8564
|
+
}
|
|
8565
|
+
});
|
|
8566
|
+
function GuideOrientationContextProvider(_a) {
|
|
8567
|
+
var children = _a.children;
|
|
8568
|
+
var setDimensions = React.useState({
|
|
8569
|
+
width: 1,
|
|
8570
|
+
height: 1
|
|
8571
|
+
})[1];
|
|
8572
|
+
var _b = React.useState(1),
|
|
8573
|
+
imageAspectRatio = _b[0],
|
|
8574
|
+
setImageAspectRatio = _b[1];
|
|
8575
|
+
var _c = useResizeObserver__default.default(),
|
|
8576
|
+
wrapperRef = _c.ref,
|
|
8577
|
+
_d = _c.width,
|
|
8578
|
+
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
8579
|
+
_e = _c.height,
|
|
8580
|
+
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
8581
|
+
var wrapperAspectRatio = React.useMemo(function () {
|
|
8582
|
+
return wrapperWidth / wrapperHeight;
|
|
8583
|
+
}, [wrapperHeight, wrapperWidth]);
|
|
8584
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
8585
|
+
var img = e.target;
|
|
8586
|
+
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
8587
|
+
}, []);
|
|
8588
|
+
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
8589
|
+
var value = React.useMemo(function () {
|
|
8590
|
+
return {
|
|
8591
|
+
orientation: orientation,
|
|
8592
|
+
wrapperWidth: wrapperWidth,
|
|
8593
|
+
wrapperHeight: wrapperHeight,
|
|
8594
|
+
wrapperAspectRatio: wrapperAspectRatio,
|
|
8595
|
+
imageAspectRatio: imageAspectRatio,
|
|
8596
|
+
setDimensions: setDimensions,
|
|
8597
|
+
wrapperRef: wrapperRef,
|
|
8598
|
+
onImageLoaded: onImageLoaded
|
|
8599
|
+
};
|
|
8600
|
+
}, [imageAspectRatio, onImageLoaded, setDimensions, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
8601
|
+
return /*#__PURE__*/React__namespace.default.createElement(GuideOrientationContext.Provider, {
|
|
8602
|
+
value: value
|
|
8603
|
+
}, children);
|
|
8604
|
+
}
|
|
8605
|
+
function useGuideOrientationContext() {
|
|
8606
|
+
var ctx = React.useContext(GuideOrientationContext);
|
|
8607
|
+
if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
|
|
8608
|
+
return ctx;
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8469
8611
|
var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
// padding: userSuppliedPadding,
|
|
8473
|
-
// imagePadding: userSuppliedImagePadding,
|
|
8612
|
+
var _b = _a.images,
|
|
8613
|
+
images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
|
|
8474
8614
|
width = _a.width,
|
|
8475
8615
|
height = _a.height,
|
|
8476
|
-
|
|
8477
|
-
borderWidth =
|
|
8478
|
-
|
|
8479
|
-
borderColor =
|
|
8480
|
-
|
|
8481
|
-
borderRadius =
|
|
8482
|
-
|
|
8483
|
-
isMirrored =
|
|
8484
|
-
|
|
8485
|
-
portraitGuidesOnMobile =
|
|
8486
|
-
_g = _a.assets,
|
|
8487
|
-
assets = _g === void 0 ? {} : _g,
|
|
8616
|
+
_c = _a.borderWidth,
|
|
8617
|
+
borderWidth = _c === void 0 ? 20 : _c,
|
|
8618
|
+
_d = _a.borderColor,
|
|
8619
|
+
borderColor = _d === void 0 ? 'white' : _d,
|
|
8620
|
+
_e = _a.borderRadius,
|
|
8621
|
+
borderRadius = _e === void 0 ? 25 : _e,
|
|
8622
|
+
_f = _a.isMirrored,
|
|
8623
|
+
isMirrored = _f === void 0 ? false : _f,
|
|
8624
|
+
_g = _a.portraitGuidesOnMobile,
|
|
8625
|
+
portraitGuidesOnMobile = _g === void 0 ? true : _g,
|
|
8488
8626
|
_h = _a.classNames,
|
|
8489
8627
|
classNames = _h === void 0 ? {} : _h;
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
assets.idCardBackPortraitImageUrl || (assets.idCardBackPortraitImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
8493
|
-
assets.idCardBackLandscapeImageUrl || (assets.idCardBackLandscapeImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
8494
|
-
// const instruction = useVerbiage(
|
|
8495
|
-
// verbiage.instructionText,
|
|
8496
|
-
// 'Please flip your ID card...',
|
|
8497
|
-
// )
|
|
8498
|
-
// const padding =
|
|
8499
|
-
// (userSuppliedPadding ?? isMobile())
|
|
8500
|
-
// ? (theme.idCapture?.guideBox?.mobilePadding ?? 0)
|
|
8501
|
-
// : (theme.idCapture?.guideBox?.desktopPadding ?? 50)
|
|
8502
|
-
var onImageLoaded = React.useContext(GuideOrientationContext).onImageLoaded;
|
|
8503
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8504
|
-
// const imagePadding =
|
|
8505
|
-
// userSuppliedImagePadding ?? theme.idCapture?.guideBox?.imagePadding ?? 0
|
|
8628
|
+
var onImageLoaded = useGuideOrientationContext().onImageLoaded;
|
|
8629
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
8506
8630
|
var _j = React.useState(1),
|
|
8507
8631
|
transitionTime = _j[0],
|
|
8508
8632
|
setTransitionTime = _j[1];
|
|
@@ -8540,10 +8664,9 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8540
8664
|
"$transitionTime": transitionTime,
|
|
8541
8665
|
"$isVisible": true
|
|
8542
8666
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8543
|
-
src: orientation === 'portrait' ? assets.idCardFrontPortraitImageUrl : assets.idCardFrontLandscapeImageUrl,
|
|
8544
8667
|
alt: "",
|
|
8668
|
+
src: images[orientation].SHOW_ID_FRONT.url,
|
|
8545
8669
|
className: classNames.frontImage,
|
|
8546
|
-
// $padding={imagePadding}
|
|
8547
8670
|
onLoad: onImageLoaded,
|
|
8548
8671
|
width: width,
|
|
8549
8672
|
height: height
|
|
@@ -8557,10 +8680,9 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8557
8680
|
"$transitionTime": transitionTime,
|
|
8558
8681
|
"$isVisible": true
|
|
8559
8682
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8560
|
-
src: orientation === 'portrait' ? assets.idCardBackPortraitImageUrl : assets.idCardBackLandscapeImageUrl,
|
|
8561
8683
|
alt: "",
|
|
8684
|
+
src: images[orientation].SHOW_ID_BACK.url,
|
|
8562
8685
|
className: classNames.backImage,
|
|
8563
|
-
// $padding={imagePadding}
|
|
8564
8686
|
width: width,
|
|
8565
8687
|
height: height
|
|
8566
8688
|
})));
|
|
@@ -8568,108 +8690,80 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8568
8690
|
|
|
8569
8691
|
var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
8570
8692
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
8571
|
-
var _p
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
classNames = _u === void 0 ? {} : _u,
|
|
8576
|
-
_v = _a.width,
|
|
8577
|
-
width = _v === void 0 ? 0 : _v,
|
|
8578
|
-
_w = _a.height,
|
|
8579
|
-
height = _w === void 0 ? 0 : _w,
|
|
8693
|
+
var _p = _a.classNames,
|
|
8694
|
+
classNames = _p === void 0 ? {} : _p,
|
|
8695
|
+
_q = _a.images,
|
|
8696
|
+
userSuppliedImages = _q === void 0 ? defaultIdCaptureGuideImages : _q,
|
|
8580
8697
|
userSuppliedPadding = _a.padding,
|
|
8581
8698
|
userSuppliedImagePadding = _a.imagePadding,
|
|
8582
|
-
|
|
8583
|
-
imageVisible =
|
|
8699
|
+
_r = _a.imageVisible,
|
|
8700
|
+
imageVisible = _r === void 0 ? true : _r,
|
|
8584
8701
|
borderWidth = _a.borderWidth,
|
|
8585
8702
|
borderColor = _a.borderColor,
|
|
8586
|
-
|
|
8587
|
-
idCardBorderWidth =
|
|
8588
|
-
|
|
8589
|
-
idCardBorderColor =
|
|
8703
|
+
_s = _a.idCardBorderWidth,
|
|
8704
|
+
idCardBorderWidth = _s === void 0 ? '2.5%' : _s,
|
|
8705
|
+
_t = _a.idCardBorderColor,
|
|
8706
|
+
idCardBorderColor = _t === void 0 ? 'white' : _t,
|
|
8590
8707
|
maskColor = _a.maskColor,
|
|
8591
|
-
|
|
8592
|
-
isMirrored =
|
|
8593
|
-
|
|
8594
|
-
isBackToFront =
|
|
8595
|
-
|
|
8596
|
-
portraitGuidesOnMobile =
|
|
8597
|
-
|
|
8598
|
-
instruction =
|
|
8599
|
-
|
|
8600
|
-
requestedAction =
|
|
8601
|
-
|
|
8602
|
-
progress =
|
|
8603
|
-
|
|
8604
|
-
status =
|
|
8708
|
+
_u = _a.isMirrored,
|
|
8709
|
+
isMirrored = _u === void 0 ? false : _u,
|
|
8710
|
+
_v = _a.isBackToFront,
|
|
8711
|
+
isBackToFront = _v === void 0 ? false : _v,
|
|
8712
|
+
_w = _a.portraitGuidesOnMobile,
|
|
8713
|
+
portraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
8714
|
+
_x = _a.instruction,
|
|
8715
|
+
instruction = _x === void 0 ? '' : _x,
|
|
8716
|
+
_y = _a.requestedAction,
|
|
8717
|
+
requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
|
|
8718
|
+
_z = _a.progress,
|
|
8719
|
+
progress = _z === void 0 ? 0 : _z,
|
|
8720
|
+
_0 = _a.status,
|
|
8721
|
+
status = _0 === void 0 ? 'ready' : _0,
|
|
8605
8722
|
onClick = _a.onClick;
|
|
8606
|
-
var
|
|
8607
|
-
wrapperRef =
|
|
8608
|
-
wrapperWidth =
|
|
8609
|
-
wrapperHeight =
|
|
8610
|
-
imageAspectRatio =
|
|
8611
|
-
wrapperAspectRatio =
|
|
8612
|
-
guideOrientationOnImageLoaded =
|
|
8613
|
-
setDimensions =
|
|
8614
|
-
var
|
|
8615
|
-
state =
|
|
8616
|
-
dispatch =
|
|
8617
|
-
function onImageLoaded(e) {
|
|
8618
|
-
guideOrientationOnImageLoaded(e);
|
|
8619
|
-
var img = e.target;
|
|
8620
|
-
dispatch({
|
|
8621
|
-
type: 'guideImageLoaded',
|
|
8622
|
-
payload: {
|
|
8623
|
-
width: img.naturalWidth,
|
|
8624
|
-
height: img.naturalHeight
|
|
8625
|
-
}
|
|
8626
|
-
});
|
|
8627
|
-
}
|
|
8723
|
+
var _1 = useGuideOrientationContext(),
|
|
8724
|
+
wrapperRef = _1.wrapperRef,
|
|
8725
|
+
wrapperWidth = _1.wrapperWidth,
|
|
8726
|
+
wrapperHeight = _1.wrapperHeight,
|
|
8727
|
+
imageAspectRatio = _1.imageAspectRatio,
|
|
8728
|
+
wrapperAspectRatio = _1.wrapperAspectRatio,
|
|
8729
|
+
guideOrientationOnImageLoaded = _1.onImageLoaded,
|
|
8730
|
+
setDimensions = _1.setDimensions;
|
|
8731
|
+
var _2 = useIdCaptureState(),
|
|
8732
|
+
state = _2[0],
|
|
8733
|
+
dispatch = _2[1];
|
|
8628
8734
|
var theme = styled.useTheme();
|
|
8629
8735
|
if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
8630
|
-
if (width == 0) width = wrapperWidth;
|
|
8631
|
-
if (height == 0) height = wrapperHeight;
|
|
8632
8736
|
React.useEffect(function () {
|
|
8633
8737
|
setDimensions({
|
|
8634
|
-
width:
|
|
8635
|
-
height:
|
|
8738
|
+
width: wrapperWidth,
|
|
8739
|
+
height: wrapperHeight
|
|
8636
8740
|
});
|
|
8637
|
-
}, [
|
|
8741
|
+
}, [setDimensions, wrapperHeight, wrapperWidth]);
|
|
8638
8742
|
var padding = userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile() ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.mobilePadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.desktopPadding) !== null && _k !== void 0 ? _k : 50;
|
|
8639
8743
|
var paddingAndBorderPx = padding * 2 + borderWidth * 2;
|
|
8640
|
-
var images =
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
SHOW_ID_BACK: assets.idCardBackPortraitImageUrl,
|
|
8645
|
-
SHOW_PASSPORT: assets.passportPortraitImageUrl
|
|
8646
|
-
},
|
|
8647
|
-
landscape: {
|
|
8648
|
-
SHOW_ID_FRONT: assets.idCardFrontLandscapeImageUrl,
|
|
8649
|
-
FLIP_ID: assets.idCardFrontLandscapeImageUrl,
|
|
8650
|
-
SHOW_ID_BACK: assets.idCardBackLandscapeImageUrl,
|
|
8651
|
-
SHOW_PASSPORT: assets.passportLandscapeImageUrl
|
|
8652
|
-
}
|
|
8653
|
-
};
|
|
8654
|
-
if (isBackToFront) {
|
|
8655
|
-
var temp = images.portrait.SHOW_ID_FRONT;
|
|
8656
|
-
images.portrait.SHOW_ID_FRONT = images.portrait.SHOW_ID_BACK;
|
|
8657
|
-
images.portrait.SHOW_ID_BACK = temp;
|
|
8658
|
-
var temp2 = images.landscape.SHOW_ID_FRONT;
|
|
8659
|
-
images.landscape.SHOW_ID_FRONT = images.landscape.SHOW_ID_BACK;
|
|
8660
|
-
images.landscape.SHOW_ID_BACK = temp2;
|
|
8661
|
-
}
|
|
8662
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8663
|
-
var imgSrc = images[orientation][requestedAction];
|
|
8664
|
-
assets.flipIdPrompt || (assets.flipIdPrompt = {});
|
|
8665
|
-
(_p = assets.flipIdPrompt).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = images.portrait.SHOW_ID_FRONT);
|
|
8666
|
-
(_q = assets.flipIdPrompt).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = images.landscape.SHOW_ID_FRONT);
|
|
8667
|
-
(_r = assets.flipIdPrompt).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = images.portrait.SHOW_ID_BACK);
|
|
8668
|
-
(_s = assets.flipIdPrompt).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = images.landscape.SHOW_ID_BACK);
|
|
8744
|
+
var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
|
|
8745
|
+
var imagesByUrl = useGuideImagesByUrl(images);
|
|
8746
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
8747
|
+
var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
|
|
8669
8748
|
var imagePadding = (_o = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.imagePadding) !== null && _o !== void 0 ? _o : 50;
|
|
8670
8749
|
var imageWidth = state.guideRectWidth - imagePadding * 2;
|
|
8671
8750
|
var imageHeight = state.guideRectHeight - imagePadding * 2;
|
|
8672
8751
|
var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
|
|
8752
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
8753
|
+
var _a, _b;
|
|
8754
|
+
guideOrientationOnImageLoaded(e);
|
|
8755
|
+
var img = e.currentTarget;
|
|
8756
|
+
var imageByUrl = imagesByUrl[img.src];
|
|
8757
|
+
var width = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth;
|
|
8758
|
+
var height = (_b = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _b !== void 0 ? _b : img.naturalHeight;
|
|
8759
|
+
dispatch({
|
|
8760
|
+
type: 'guideImageLoaded',
|
|
8761
|
+
payload: {
|
|
8762
|
+
width: width,
|
|
8763
|
+
height: height
|
|
8764
|
+
}
|
|
8765
|
+
});
|
|
8766
|
+
}, [dispatch, guideOrientationOnImageLoaded, imagesByUrl]);
|
|
8673
8767
|
return /*#__PURE__*/React__namespace.default.createElement(StyledPageContainer, {
|
|
8674
8768
|
ref: wrapperRef,
|
|
8675
8769
|
onClick: onClick,
|
|
@@ -8706,8 +8800,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8706
8800
|
borderColor: idCardBorderColor,
|
|
8707
8801
|
"$isVisible": requestedAction !== 'FLIP_ID'
|
|
8708
8802
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8709
|
-
src: imgSrc,
|
|
8710
8803
|
alt: "",
|
|
8804
|
+
src: currentImage.url,
|
|
8711
8805
|
onLoad: onImageLoaded,
|
|
8712
8806
|
className: classNames.image,
|
|
8713
8807
|
"$isInvisible": !imageVisible,
|
|
@@ -8715,11 +8809,11 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8715
8809
|
width: imageWidth,
|
|
8716
8810
|
height: imageHeight
|
|
8717
8811
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(FlipIdPrompt, {
|
|
8812
|
+
images: images,
|
|
8718
8813
|
borderWidth: idCardBorderWidth,
|
|
8719
8814
|
borderColor: idCardBorderColor,
|
|
8720
8815
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
8721
8816
|
isMirrored: isMirrored,
|
|
8722
|
-
assets: assets.flipIdPrompt,
|
|
8723
8817
|
classNames: classNames.flipIdPrompt,
|
|
8724
8818
|
width: imageWidth,
|
|
8725
8819
|
height: imageHeight
|
|
@@ -8757,7 +8851,7 @@ var GuideRegion = styled__default.default.div(templateObject_4$d || (templateObj
|
|
|
8757
8851
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
8758
8852
|
});
|
|
8759
8853
|
var Spacer = styled__default.default(GuideRegion)(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
8760
|
-
var GuideCenterRegion = styled__default.default.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n
|
|
8854
|
+
var GuideCenterRegion = styled__default.default.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
8761
8855
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
8762
8856
|
}, function (props) {
|
|
8763
8857
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
@@ -8795,8 +8889,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8795
8889
|
status = _u === void 0 ? 'ready' : _u,
|
|
8796
8890
|
_v = _a.progress,
|
|
8797
8891
|
progress = _v === void 0 ? 0 : _v,
|
|
8798
|
-
_w = _a.
|
|
8799
|
-
|
|
8892
|
+
_w = _a.images,
|
|
8893
|
+
images = _w === void 0 ? defaultIdCaptureGuideImages : _w,
|
|
8800
8894
|
_x = _a.classNames,
|
|
8801
8895
|
classNames = _x === void 0 ? {} : _x;
|
|
8802
8896
|
var _y = useIdCaptureState(),
|
|
@@ -8905,7 +8999,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8905
8999
|
isBackToFront: isBackToFront,
|
|
8906
9000
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
8907
9001
|
instruction: instruction,
|
|
8908
|
-
|
|
9002
|
+
images: images,
|
|
8909
9003
|
classNames: classNames,
|
|
8910
9004
|
imageVisible: imageVisible,
|
|
8911
9005
|
requestedAction: requestedAction,
|
|
@@ -8933,8 +9027,8 @@ function IdCaptureGuides(_a) {
|
|
|
8933
9027
|
requestedAction = _h === void 0 ? 'SHOW_ID_FRONT' : _h,
|
|
8934
9028
|
_j = _a.isBackToFront,
|
|
8935
9029
|
isBackToFront = _j === void 0 ? false : _j,
|
|
8936
|
-
_k = _a.
|
|
8937
|
-
|
|
9030
|
+
_k = _a.images,
|
|
9031
|
+
images = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
8938
9032
|
_l = _a.classNames,
|
|
8939
9033
|
classNames = _l === void 0 ? {} : _l,
|
|
8940
9034
|
_m = _a.colors,
|
|
@@ -8949,10 +9043,8 @@ function IdCaptureGuides(_a) {
|
|
|
8949
9043
|
captureFailedText: 'Capture failed!'
|
|
8950
9044
|
});
|
|
8951
9045
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, guideType === 'overlay' && ( /*#__PURE__*/React__namespace.default.createElement(IdCaptureGuideOverlay, {
|
|
8952
|
-
|
|
9046
|
+
images: images,
|
|
8953
9047
|
classNames: classNames,
|
|
8954
|
-
width: state.pageWidth,
|
|
8955
|
-
height: state.pageHeight,
|
|
8956
9048
|
status: status,
|
|
8957
9049
|
progress: progress,
|
|
8958
9050
|
instruction: state.captureFailed ? verbiage.captureFailedText : state.capturing ? verbiage === null || verbiage === void 0 ? void 0 : verbiage.capturingText : verbiage.instructionText,
|
|
@@ -8960,7 +9052,7 @@ function IdCaptureGuides(_a) {
|
|
|
8960
9052
|
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
|
|
8961
9053
|
imageVisible: requestedAction === 'FLIP_ID' || !state.idCardFrontDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
|
|
8962
9054
|
})), guideType === 'fit' && ( /*#__PURE__*/React__namespace.default.createElement(IdCaptureFitGuide, {
|
|
8963
|
-
|
|
9055
|
+
images: images,
|
|
8964
9056
|
classNames: classNames,
|
|
8965
9057
|
requestedAction: requestedAction,
|
|
8966
9058
|
status: status,
|
|
@@ -9930,76 +10022,77 @@ function ScalingCameraFeed() {
|
|
|
9930
10022
|
|
|
9931
10023
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
9932
10024
|
var _b, _c, _d, _e, _f, _g;
|
|
9933
|
-
var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
9934
10025
|
var onSuccess = _a.onSuccess,
|
|
9935
10026
|
onExitCapture = _a.onExitCapture,
|
|
9936
10027
|
onUserCancel = _a.onUserCancel,
|
|
9937
|
-
|
|
9938
|
-
loadingOverlayMode =
|
|
10028
|
+
_h = _a.loadingOverlayMode,
|
|
10029
|
+
loadingOverlayMode = _h === void 0 ? 'default' : _h,
|
|
9939
10030
|
customOverlayContent = _a.customOverlayContent,
|
|
9940
10031
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
9941
10032
|
precapturedDocuments = _a.precapturedDocuments,
|
|
9942
|
-
|
|
9943
|
-
captureRequirement =
|
|
9944
|
-
|
|
9945
|
-
separateIdCardCaptureSequence =
|
|
9946
|
-
|
|
9947
|
-
thresholds =
|
|
9948
|
-
|
|
9949
|
-
skipSuccessScreen =
|
|
10033
|
+
_j = _a.captureRequirement,
|
|
10034
|
+
captureRequirement = _j === void 0 ? 'idCardOrPassport' : _j,
|
|
10035
|
+
_k = _a.separateIdCardCaptureSequence,
|
|
10036
|
+
separateIdCardCaptureSequence = _k === void 0 ? false : _k,
|
|
10037
|
+
_l = _a.thresholds,
|
|
10038
|
+
thresholds = _l === void 0 ? defaultIdCaptureThresholds : _l,
|
|
10039
|
+
_m = _a.skipSuccessScreen,
|
|
10040
|
+
skipSuccessScreen = _m === void 0 ? false : _m,
|
|
9950
10041
|
instructions = _a.instructions,
|
|
9951
|
-
|
|
9952
|
-
releaseCameraAccessOnExit =
|
|
9953
|
-
|
|
9954
|
-
guideType =
|
|
9955
|
-
|
|
9956
|
-
portraitGuidesOnMobile =
|
|
9957
|
-
|
|
9958
|
-
rotateLoadingOverlayImageWhenPortrait =
|
|
9959
|
-
|
|
9960
|
-
silentFallback =
|
|
9961
|
-
|
|
9962
|
-
forceFallbackMode =
|
|
9963
|
-
|
|
9964
|
-
allowIdCardBackToFrontCapture =
|
|
9965
|
-
|
|
9966
|
-
enableOverrideWrongDocumentTypeDialog =
|
|
9967
|
-
|
|
9968
|
-
allowOverrideWrongDocumentTypeAfterMs =
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10042
|
+
_o = _a.releaseCameraAccessOnExit,
|
|
10043
|
+
releaseCameraAccessOnExit = _o === void 0 ? true : _o,
|
|
10044
|
+
_p = _a.guideType,
|
|
10045
|
+
guideType = _p === void 0 ? 'fit' : _p,
|
|
10046
|
+
_q = _a.portraitGuidesOnMobile,
|
|
10047
|
+
portraitGuidesOnMobile = _q === void 0 ? true : _q,
|
|
10048
|
+
_r = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
10049
|
+
rotateLoadingOverlayImageWhenPortrait = _r === void 0 ? true : _r,
|
|
10050
|
+
_s = _a.silentFallback,
|
|
10051
|
+
silentFallback = _s === void 0 ? false : _s,
|
|
10052
|
+
_t = _a.forceFallbackMode,
|
|
10053
|
+
forceFallbackMode = _t === void 0 ? false : _t,
|
|
10054
|
+
_u = _a.allowIdCardBackToFrontCapture,
|
|
10055
|
+
allowIdCardBackToFrontCapture = _u === void 0 ? false : _u,
|
|
10056
|
+
_v = _a.enableOverrideWrongDocumentTypeDialog,
|
|
10057
|
+
enableOverrideWrongDocumentTypeDialog = _v === void 0 ? false : _v,
|
|
10058
|
+
_w = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
10059
|
+
allowOverrideWrongDocumentTypeAfterMs = _w === void 0 ? 8000 : _w,
|
|
10060
|
+
_x = _a.guideImages,
|
|
10061
|
+
guideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
|
|
10062
|
+
_y = _a.assets,
|
|
10063
|
+
assets = _y === void 0 ? {} : _y,
|
|
10064
|
+
_z = _a.classNames,
|
|
10065
|
+
classNames = _z === void 0 ? {} : _z,
|
|
10066
|
+
_0 = _a.colors,
|
|
10067
|
+
colors = _0 === void 0 ? {} : _0,
|
|
10068
|
+
_1 = _a.verbiage,
|
|
10069
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
10070
|
+
_2 = _a.debugMode,
|
|
10071
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
10072
|
+
var _3 = useIdCaptureState(),
|
|
10073
|
+
state = _3[0],
|
|
10074
|
+
dispatch = _3[1];
|
|
10075
|
+
var _4 = React.useContext(CameraStateContext),
|
|
10076
|
+
cameraAccessDenied = _4.cameraAccessDenied,
|
|
10077
|
+
requestCameraAccess = _4.requestCameraAccess,
|
|
10078
|
+
releaseCameraAccess = _4.releaseCameraAccess;
|
|
10079
|
+
var _5 = React.useState(false),
|
|
10080
|
+
overlayDismissed = _5[0],
|
|
10081
|
+
setOverlayDismissed = _5[1];
|
|
10082
|
+
var _6 = React.useContext(SubmissionContext),
|
|
10083
|
+
submissionStatus = _6.submissionStatus,
|
|
10084
|
+
setIdFrontImage = _6.setIdFrontImage,
|
|
10085
|
+
setIdBackImage = _6.setIdBackImage,
|
|
10086
|
+
setPassportImage = _6.setPassportImage,
|
|
10087
|
+
logIdFrontCaptureAttempt = _6.logIdFrontCaptureAttempt,
|
|
10088
|
+
logIdBackCaptureAttempt = _6.logIdBackCaptureAttempt;
|
|
10089
|
+
var _7 = React.useContext(IdCaptureModelsContext),
|
|
10090
|
+
start = _7.start,
|
|
10091
|
+
stop = _7.stop,
|
|
10092
|
+
onPredictionMade = _7.onPredictionMade,
|
|
10093
|
+
setRequiredDocumentType = _7.setRequiredDocumentType,
|
|
10094
|
+
modelError = _7.modelError,
|
|
10095
|
+
resetBestFrame = _7.resetBestFrame;
|
|
10003
10096
|
React.useEffect(function () {
|
|
10004
10097
|
dispatch({
|
|
10005
10098
|
type: 'configureWizard',
|
|
@@ -10091,9 +10184,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10091
10184
|
type: 'resetWizard'
|
|
10092
10185
|
});
|
|
10093
10186
|
}, [dispatch]);
|
|
10094
|
-
var
|
|
10095
|
-
attempt =
|
|
10096
|
-
setAttempt =
|
|
10187
|
+
var _8 = React.useState(0),
|
|
10188
|
+
attempt = _8[0],
|
|
10189
|
+
setAttempt = _8[1];
|
|
10097
10190
|
var onExit = React.useCallback(function () {
|
|
10098
10191
|
releaseCameraAccess();
|
|
10099
10192
|
setOverlayDismissed(false);
|
|
@@ -10119,27 +10212,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10119
10212
|
});
|
|
10120
10213
|
}
|
|
10121
10214
|
}, [cameraAccessDenied]);
|
|
10122
|
-
assets.idCardFront || (assets.idCardFront = {});
|
|
10123
|
-
(_h = assets.idCardFront).portraitGuidesImageUrl || (_h.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
10124
|
-
(_j = assets.idCardFront).landscapeGuidesImageUrl || (_j.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
10125
|
-
assets.idCardBack || (assets.idCardBack = {});
|
|
10126
|
-
(_k = assets.idCardBack).portraitGuidesImageUrl || (_k.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
10127
|
-
(_l = assets.idCardBack).landscapeGuidesImageUrl || (_l.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
10128
|
-
assets.passport || (assets.passport = {});
|
|
10129
|
-
(_m = assets.passport).portraitGuidesImageUrl || (_m.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
|
|
10130
|
-
(_o = assets.passport).landscapeGuidesImageUrl || (_o.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
|
|
10131
|
-
assets.guides || (assets.guides = {});
|
|
10132
|
-
(_p = assets.guides).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
10133
|
-
(_q = assets.guides).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
10134
|
-
(_r = assets.guides).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
10135
|
-
(_s = assets.guides).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
10136
|
-
(_t = assets.guides).passportPortraitImageUrl || (_t.passportPortraitImageUrl = assets.passport.portraitGuidesImageUrl);
|
|
10137
|
-
(_u = assets.guides).passportLandscapeImageUrl || (_u.passportLandscapeImageUrl = assets.passport.landscapeGuidesImageUrl);
|
|
10138
|
-
(_v = assets.guides).flipIdPrompt || (_v.flipIdPrompt = {});
|
|
10139
|
-
(_w = assets.guides.flipIdPrompt).idCardFrontPortraitImageUrl || (_w.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
10140
|
-
(_x = assets.guides.flipIdPrompt).idCardFrontLandscapeImageUrl || (_x.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
10141
|
-
(_y = assets.guides.flipIdPrompt).idCardBackPortraitImageUrl || (_y.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
10142
|
-
(_z = assets.guides.flipIdPrompt).idCardBackLandscapeImageUrl || (_z.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
10143
10215
|
var idCaptureVerbiages = {
|
|
10144
10216
|
idCardFront: useTranslations(verbiage.idCardFront, {
|
|
10145
10217
|
instructionText: 'Scan the front of ID',
|
|
@@ -10153,7 +10225,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10153
10225
|
})
|
|
10154
10226
|
};
|
|
10155
10227
|
var theme = styled.useTheme();
|
|
10156
|
-
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
10157
10228
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
10158
10229
|
React.useEffect(function () {
|
|
10159
10230
|
if (separateIdCardCaptureSequence) return;
|
|
@@ -10206,9 +10277,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10206
10277
|
});
|
|
10207
10278
|
});
|
|
10208
10279
|
}, [dispatch]);
|
|
10209
|
-
var
|
|
10210
|
-
progressStarted =
|
|
10211
|
-
setProgressStarted =
|
|
10280
|
+
var _9 = React.useState(false),
|
|
10281
|
+
progressStarted = _9[0],
|
|
10282
|
+
setProgressStarted = _9[1];
|
|
10212
10283
|
React.useEffect(function () {
|
|
10213
10284
|
if (state.captureState === 'capturing') {
|
|
10214
10285
|
setProgressStarted(false);
|
|
@@ -10238,7 +10309,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10238
10309
|
requiredDocumentType: state.requestedDocumentType,
|
|
10239
10310
|
thresholds: thresholds,
|
|
10240
10311
|
onCapture: onCapture,
|
|
10241
|
-
assets: idCaptureAssets,
|
|
10242
10312
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
|
|
10243
10313
|
colors: colors,
|
|
10244
10314
|
verbiage: idCaptureVerbiage,
|
|
@@ -10250,7 +10320,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10250
10320
|
progress: progressStarted && state.captureState === 'capturing' ? 1 : 0,
|
|
10251
10321
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
10252
10322
|
requestedAction: requestedAction,
|
|
10253
|
-
|
|
10323
|
+
images: guideImages,
|
|
10254
10324
|
classNames: classNames.guides,
|
|
10255
10325
|
colors: colors,
|
|
10256
10326
|
verbiage: idCaptureVerbiage,
|
|
@@ -12411,42 +12481,6 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12411
12481
|
}));
|
|
12412
12482
|
};
|
|
12413
12483
|
|
|
12414
|
-
var GuideOrientationProvider = function GuideOrientationProvider(_a) {
|
|
12415
|
-
var children = _a.children;
|
|
12416
|
-
var setDimensions = React.useState({
|
|
12417
|
-
width: 1,
|
|
12418
|
-
height: 1
|
|
12419
|
-
})[1];
|
|
12420
|
-
var _b = React.useState(1),
|
|
12421
|
-
imageAspectRatio = _b[0],
|
|
12422
|
-
setImageAspectRatio = _b[1];
|
|
12423
|
-
var _c = useResizeObserver__default.default(),
|
|
12424
|
-
wrapperRef = _c.ref,
|
|
12425
|
-
_d = _c.width,
|
|
12426
|
-
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
12427
|
-
_e = _c.height,
|
|
12428
|
-
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
12429
|
-
var wrapperAspectRatio = wrapperWidth / wrapperHeight;
|
|
12430
|
-
var onImageLoaded = React.useCallback(function (e) {
|
|
12431
|
-
var img = e.target;
|
|
12432
|
-
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
12433
|
-
}, []);
|
|
12434
|
-
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
12435
|
-
var value = {
|
|
12436
|
-
orientation: orientation,
|
|
12437
|
-
wrapperWidth: wrapperWidth,
|
|
12438
|
-
wrapperHeight: wrapperHeight,
|
|
12439
|
-
wrapperAspectRatio: wrapperAspectRatio,
|
|
12440
|
-
imageAspectRatio: imageAspectRatio,
|
|
12441
|
-
setDimensions: setDimensions,
|
|
12442
|
-
wrapperRef: wrapperRef,
|
|
12443
|
-
onImageLoaded: onImageLoaded
|
|
12444
|
-
};
|
|
12445
|
-
return /*#__PURE__*/React__namespace.default.createElement(GuideOrientationContext.Provider, {
|
|
12446
|
-
value: value
|
|
12447
|
-
}, children);
|
|
12448
|
-
};
|
|
12449
|
-
|
|
12450
12484
|
var SubmissionSuccess = function SubmissionSuccess() {
|
|
12451
12485
|
var _a = React.useContext(SubmissionContext),
|
|
12452
12486
|
submissionRequest = _a.submissionRequest,
|
|
@@ -13546,15 +13580,13 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13546
13580
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
13547
13581
|
_2 = _a.idCardCaptureProgress,
|
|
13548
13582
|
idCardCaptureProgress = _2 === void 0 ? 0 : _2,
|
|
13549
|
-
_3 = _a.
|
|
13550
|
-
|
|
13583
|
+
_3 = _a.idCardCaptureGuideImages,
|
|
13584
|
+
userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
|
|
13551
13585
|
_4 = _a.classNames,
|
|
13552
13586
|
classNames = _4 === void 0 ? {} : _4,
|
|
13553
13587
|
_5 = _a.verbiage,
|
|
13554
13588
|
rawVerbiage = _5 === void 0 ? {} : _5;
|
|
13555
13589
|
var cameraRef = React.useContext(CameraStateContext).cameraRef;
|
|
13556
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
13557
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
13558
13590
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13559
13591
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
13560
13592
|
idBackInstructionText: 'Display the back of your ID card...',
|
|
@@ -13573,14 +13605,19 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13573
13605
|
idCardGuideWidth = _7 === void 0 ? 0 : _7,
|
|
13574
13606
|
_8 = _6.height,
|
|
13575
13607
|
idCardGuideHeight = _8 === void 0 ? 0 : _8;
|
|
13608
|
+
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
13609
|
+
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
13576
13610
|
var _9 = React.useState(undefined),
|
|
13577
13611
|
aspectRatio = _9[0],
|
|
13578
13612
|
setAspectRatio = _9[1];
|
|
13579
|
-
|
|
13580
|
-
var _a;
|
|
13613
|
+
var onImageLoaded = React.useCallback(function (e) {
|
|
13614
|
+
var _a, _b, _c, _d;
|
|
13581
13615
|
var img = e.currentTarget;
|
|
13582
|
-
|
|
13583
|
-
|
|
13616
|
+
var imageByUrl = idCaptureGuideImagesByUrl[img.src];
|
|
13617
|
+
var naturalWidth = (_b = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth) !== null && _b !== void 0 ? _b : 0;
|
|
13618
|
+
var naturalHeight = (_d = (_c = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _c !== void 0 ? _c : img.naturalHeight) !== null && _d !== void 0 ? _d : 0;
|
|
13619
|
+
setAspectRatio(naturalHeight > 0 ? naturalWidth / naturalHeight : undefined);
|
|
13620
|
+
}, [idCaptureGuideImagesByUrl]);
|
|
13584
13621
|
var idCardImageStyle = React.useMemo(function () {
|
|
13585
13622
|
return {
|
|
13586
13623
|
maxWidth: idCardGuideWidth > 0 ? idCardGuideWidth : undefined,
|
|
@@ -13620,10 +13657,10 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13620
13657
|
className: classNames.idCardGuideImage,
|
|
13621
13658
|
"$isMirrored": !((_t = cameraRef.current) === null || _t === void 0 ? void 0 : _t.isRearFacing),
|
|
13622
13659
|
style: idCardImageStyle,
|
|
13623
|
-
src: requestedAction === 'SHOW_ID_BACK' ?
|
|
13660
|
+
src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
13624
13661
|
onLoad: onImageLoaded
|
|
13625
13662
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
13626
|
-
|
|
13663
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
13627
13664
|
classNames: classNames.flipIdPrompt,
|
|
13628
13665
|
borderWidth: idCardGuideBorderWidth,
|
|
13629
13666
|
borderColor: idCardGuideBorderColor,
|
|
@@ -13786,27 +13823,27 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
13786
13823
|
onExitCapture = _a.onExitCapture,
|
|
13787
13824
|
_y = _a.idCaptureModelsEnabled,
|
|
13788
13825
|
idCaptureModelsEnabled = _y === void 0 ? true : _y,
|
|
13789
|
-
_z = _a.
|
|
13790
|
-
|
|
13791
|
-
_0 = _a.
|
|
13792
|
-
|
|
13793
|
-
_1 = _a.
|
|
13794
|
-
|
|
13795
|
-
_2 = _a.
|
|
13796
|
-
|
|
13826
|
+
_z = _a.idCardCaptureGuideImages,
|
|
13827
|
+
idCardCaptureGuideImages = _z === void 0 ? defaultIdCaptureGuideImages : _z,
|
|
13828
|
+
_0 = _a.idCardFrontDelay,
|
|
13829
|
+
idCardFrontDelay = _0 === void 0 ? 1000 : _0,
|
|
13830
|
+
_1 = _a.videoIdCaptureThresholds,
|
|
13831
|
+
videoIdCaptureThresholds = _1 === void 0 ? defaultVideoIdCaptureThresholds : _1,
|
|
13832
|
+
_2 = _a.skipShowIdCardBack,
|
|
13833
|
+
skipShowIdCardBack = _2 === void 0 ? false : _2,
|
|
13834
|
+
_3 = _a.captureCountdownSeconds,
|
|
13835
|
+
captureCountdownSeconds = _3 === void 0 ? 3 : _3,
|
|
13797
13836
|
readTextPrompt = _a.readTextPrompt,
|
|
13798
|
-
|
|
13799
|
-
readTextTimeoutDurationMs =
|
|
13800
|
-
|
|
13801
|
-
readTextMinReadingMs =
|
|
13802
|
-
|
|
13803
|
-
disableFaceDetectionWhileAudioCapture =
|
|
13804
|
-
|
|
13805
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
13806
|
-
|
|
13807
|
-
mergeAVStreams =
|
|
13808
|
-
_8 = _a.assets,
|
|
13809
|
-
assets = _8 === void 0 ? {} : _8,
|
|
13837
|
+
_4 = _a.readTextTimeoutDurationMs,
|
|
13838
|
+
readTextTimeoutDurationMs = _4 === void 0 ? 15000 : _4,
|
|
13839
|
+
_5 = _a.readTextMinReadingMs,
|
|
13840
|
+
readTextMinReadingMs = _5 === void 0 ? 10000 : _5,
|
|
13841
|
+
_6 = _a.disableFaceDetectionWhileAudioCapture,
|
|
13842
|
+
disableFaceDetectionWhileAudioCapture = _6 === void 0 ? false : _6,
|
|
13843
|
+
_7 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
13844
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _7 === void 0 ? 2000 : _7,
|
|
13845
|
+
_8 = _a.mergeAVStreams,
|
|
13846
|
+
mergeAVStreams = _8 === void 0 ? false : _8,
|
|
13810
13847
|
_9 = _a.classNames,
|
|
13811
13848
|
classNames = _9 === void 0 ? {} : _9,
|
|
13812
13849
|
_10 = _a.colors,
|
|
@@ -14125,13 +14162,13 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14125
14162
|
verbiage: rawVerbiage.readTextPrompt,
|
|
14126
14163
|
onComplete: stopRecording
|
|
14127
14164
|
})) : ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureGuides, {
|
|
14128
|
-
assets: assets.guides,
|
|
14129
14165
|
classNames: classNames.guides,
|
|
14130
14166
|
verbiage: rawVerbiage.guides,
|
|
14131
14167
|
requestedAction: requestedAction,
|
|
14132
14168
|
satisfied: satisfied,
|
|
14133
14169
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
14134
14170
|
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
14171
|
+
idCardCaptureGuideImages: idCardCaptureGuideImages,
|
|
14135
14172
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
14136
14173
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
14137
14174
|
}), debugMode && capturingId && ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(ObjectDetectionDebugOverlayDiv, {
|
|
@@ -14301,7 +14338,7 @@ var AssetSelectorOption = styled__default.default.div(templateObject_3$4 || (tem
|
|
|
14301
14338
|
var templateObject_1$4, templateObject_2$4, templateObject_3$4;
|
|
14302
14339
|
|
|
14303
14340
|
var VideoIdWizard = function VideoIdWizard(_a) {
|
|
14304
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
14341
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
14305
14342
|
var onComplete = _a.onComplete,
|
|
14306
14343
|
onExitCapture = _a.onExitCapture,
|
|
14307
14344
|
onExitAfterFailure = _a.onExitAfterFailure,
|
|
@@ -14309,29 +14346,31 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14309
14346
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
14310
14347
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14311
14348
|
onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
|
|
14312
|
-
|
|
14313
|
-
idCaptureProps =
|
|
14314
|
-
|
|
14315
|
-
faceLivenessProps =
|
|
14316
|
-
|
|
14317
|
-
idCaptureModelsEnabled =
|
|
14318
|
-
|
|
14319
|
-
videoIdCaptureThresholds =
|
|
14349
|
+
_l = _a.idCaptureProps,
|
|
14350
|
+
idCaptureProps = _l === void 0 ? {} : _l,
|
|
14351
|
+
_m = _a.faceLivenessProps,
|
|
14352
|
+
faceLivenessProps = _m === void 0 ? {} : _m,
|
|
14353
|
+
_o = _a.idCaptureModelsEnabled,
|
|
14354
|
+
idCaptureModelsEnabled = _o === void 0 ? true : _o,
|
|
14355
|
+
_p = _a.videoIdCaptureThresholds,
|
|
14356
|
+
videoIdCaptureThresholds = _p === void 0 ? defaultVideoIdCaptureThresholds : _p,
|
|
14320
14357
|
readTextPrompt = _a.readTextPrompt,
|
|
14321
14358
|
readTextTimeoutDurationMs = _a.readTextTimeoutDurationMs,
|
|
14322
14359
|
readTextMinReadingMs = _a.readTextMinReadingMs,
|
|
14323
|
-
|
|
14324
|
-
skipIdCapture =
|
|
14325
|
-
|
|
14326
|
-
skipShowIdCardBack =
|
|
14327
|
-
|
|
14328
|
-
skipSuccessScreen =
|
|
14329
|
-
|
|
14330
|
-
idCaptureLoadingOverlayMode =
|
|
14360
|
+
_q = _a.skipIdCapture,
|
|
14361
|
+
skipIdCapture = _q === void 0 ? false : _q,
|
|
14362
|
+
_r = _a.skipShowIdCardBack,
|
|
14363
|
+
skipShowIdCardBack = _r === void 0 ? false : _r,
|
|
14364
|
+
_s = _a.skipSuccessScreen,
|
|
14365
|
+
skipSuccessScreen = _s === void 0 ? false : _s,
|
|
14366
|
+
_t = _a.idCaptureLoadingOverlayMode,
|
|
14367
|
+
idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
|
|
14331
14368
|
customOverlayContent = _a.customOverlayContent,
|
|
14332
14369
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
14333
|
-
|
|
14334
|
-
idCaptureGuideType =
|
|
14370
|
+
_u = _a.idCaptureGuideType,
|
|
14371
|
+
idCaptureGuideType = _u === void 0 ? 'fit' : _u,
|
|
14372
|
+
_v = _a.idCaptureGuideImages,
|
|
14373
|
+
idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
|
|
14335
14374
|
_w = _a.idCapturePortraitGuidesOnMobile,
|
|
14336
14375
|
idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
14337
14376
|
_x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
@@ -14435,18 +14474,18 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14435
14474
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
14436
14475
|
}, [onExitCapture]);
|
|
14437
14476
|
var faceLivenessGuides = React.useCallback(function (_a) {
|
|
14438
|
-
var _b, _c, _d, _e
|
|
14477
|
+
var _b, _c, _d, _e;
|
|
14439
14478
|
var status = _a.status;
|
|
14440
14479
|
return /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureGuides, {
|
|
14441
|
-
|
|
14442
|
-
classNames: (
|
|
14443
|
-
verbiage: (
|
|
14480
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
14481
|
+
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
14482
|
+
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
14444
14483
|
requestedAction: "VERIFY_LIVENESS",
|
|
14445
14484
|
faceGuideStatus: status,
|
|
14446
|
-
faceGuideBorderColor: status === 'success' ? (
|
|
14485
|
+
faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
|
|
14447
14486
|
idCardGuideStatus: "disabled"
|
|
14448
14487
|
});
|
|
14449
|
-
}, [(_b =
|
|
14488
|
+
}, [(_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides, (_c = colors.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guidesSatisfiedColor, (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesUnsatisfiedColor, idCaptureGuideImages, (_e = verbiage.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guides]);
|
|
14450
14489
|
if (submissionStatus === SubmissionStatus.SUBMITTING) {
|
|
14451
14490
|
return /*#__PURE__*/React__namespace.default.createElement(PageContainer, {
|
|
14452
14491
|
className: "flex"
|
|
@@ -14464,8 +14503,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14464
14503
|
debugMode: debugMode
|
|
14465
14504
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCaptureModelsProvider, {
|
|
14466
14505
|
autoStart: false,
|
|
14467
|
-
documentDetectionModelUrl: (
|
|
14468
|
-
focusModelUrl: (
|
|
14506
|
+
documentDetectionModelUrl: (_g = (_f = idCaptureProps.assets) === null || _f === void 0 ? void 0 : _f.documentDetectionModelUrl) !== null && _g !== void 0 ? _g : '',
|
|
14507
|
+
focusModelUrl: (_j = (_h = idCaptureProps.assets) === null || _h === void 0 ? void 0 : _h.focusModelUrl) !== null && _j !== void 0 ? _j : '',
|
|
14469
14508
|
onModelError: onIdCaptureModelError,
|
|
14470
14509
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
14471
14510
|
}, /*#__PURE__*/React__namespace.default.createElement(SelfieGuidanceModelsProvider, {
|
|
@@ -14473,18 +14512,19 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14473
14512
|
onModelError: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onModelError,
|
|
14474
14513
|
modelLoadTimeoutMs: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.modelLoadTimeoutMs
|
|
14475
14514
|
}, /*#__PURE__*/React__namespace.default.createElement(PageContainer, {
|
|
14476
|
-
className: "flex ".concat((
|
|
14515
|
+
className: "flex ".concat((_k = classNames.container) !== null && _k !== void 0 ? _k : '')
|
|
14477
14516
|
}, ['CHECKING_LIVENESS', 'CAPTURING_VIDEO'].includes(captureState) && /*#__PURE__*/React__namespace.default.createElement(CameraVideoTag, {
|
|
14478
14517
|
className: classNames.cameraFeed
|
|
14479
14518
|
}), function () {
|
|
14480
14519
|
switch (captureState) {
|
|
14481
14520
|
case 'CAPTURING_ID':
|
|
14482
|
-
return /*#__PURE__*/React__namespace.default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__namespace.default.createElement(
|
|
14521
|
+
return /*#__PURE__*/React__namespace.default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__namespace.default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__namespace.default.createElement(IdCaptureWizard, _assign({
|
|
14483
14522
|
key: "id-capture-".concat(attempt),
|
|
14484
14523
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
14485
14524
|
customOverlayContent: customOverlayContent,
|
|
14486
14525
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
14487
|
-
silentFallback: silentFallback
|
|
14526
|
+
silentFallback: silentFallback,
|
|
14527
|
+
guideImages: idCaptureGuideImages
|
|
14488
14528
|
}, idCaptureProps, {
|
|
14489
14529
|
assets: assets.idCapture,
|
|
14490
14530
|
classNames: classNames.idCapture,
|
|
@@ -14534,6 +14574,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14534
14574
|
onRecordingFailed: onRecordingFailed,
|
|
14535
14575
|
onExitCapture: handleExitCapture,
|
|
14536
14576
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
14577
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
14537
14578
|
videoIdCaptureThresholds: videoIdCaptureThresholds,
|
|
14538
14579
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
14539
14580
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
@@ -14542,7 +14583,6 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14542
14583
|
readTextTimeoutDurationMs: readTextTimeoutDurationMs,
|
|
14543
14584
|
readTextMinReadingMs: readTextMinReadingMs,
|
|
14544
14585
|
mergeAVStreams: mergeAVStreams,
|
|
14545
|
-
assets: assets.idVideoCapture,
|
|
14546
14586
|
classNames: classNames.idVideoCapture,
|
|
14547
14587
|
colors: colors.idVideoCapture,
|
|
14548
14588
|
verbiage: verbiage.idVideoCapture,
|
|
@@ -14566,7 +14606,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14566
14606
|
}()))));
|
|
14567
14607
|
};
|
|
14568
14608
|
|
|
14569
|
-
|
|
14609
|
+
function CompositeWizard(_a) {
|
|
14570
14610
|
var _b, _c, _d, _e, _f;
|
|
14571
14611
|
var userChecks = _a.checks,
|
|
14572
14612
|
_g = _a.idCaptureProps,
|
|
@@ -14722,7 +14762,7 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
14722
14762
|
focusModelUrl: (_f = (_e = idCaptureProps.assets) === null || _e === void 0 ? void 0 : _e.focusModelUrl) !== null && _f !== void 0 ? _f : '',
|
|
14723
14763
|
onModelError: idCaptureProps.onModelError,
|
|
14724
14764
|
modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs
|
|
14725
|
-
}, /*#__PURE__*/React__namespace.default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__namespace.default.createElement(
|
|
14765
|
+
}, /*#__PURE__*/React__namespace.default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__namespace.default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__namespace.default.createElement(IdCaptureWizard, _assign({}, idCaptureProps, {
|
|
14726
14766
|
onSuccess: onIdCaptureSuccess
|
|
14727
14767
|
}))))));
|
|
14728
14768
|
case 'VideoIdCapture':
|
|
@@ -14777,7 +14817,7 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
14777
14817
|
default:
|
|
14778
14818
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null);
|
|
14779
14819
|
}
|
|
14780
|
-
}
|
|
14820
|
+
}
|
|
14781
14821
|
|
|
14782
14822
|
var noneTheme = {};
|
|
14783
14823
|
var defaultTheme = {
|
|
@@ -15044,20 +15084,22 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15044
15084
|
instructions = _a.instructions,
|
|
15045
15085
|
_h = _a.guideType,
|
|
15046
15086
|
guideType = _h === void 0 ? 'fit' : _h,
|
|
15047
|
-
_j = _a.
|
|
15048
|
-
|
|
15049
|
-
_k = _a.
|
|
15050
|
-
|
|
15051
|
-
_l = _a.
|
|
15052
|
-
|
|
15053
|
-
_m = _a.
|
|
15054
|
-
|
|
15055
|
-
_o = _a.
|
|
15056
|
-
|
|
15057
|
-
_p = _a.
|
|
15058
|
-
|
|
15059
|
-
_q = _a.
|
|
15060
|
-
|
|
15087
|
+
_j = _a.guideImages,
|
|
15088
|
+
guideImages = _j === void 0 ? defaultIdCaptureGuideImages : _j,
|
|
15089
|
+
_k = _a.portraitGuidesOnMobile,
|
|
15090
|
+
portraitGuidesOnMobile = _k === void 0 ? true : _k,
|
|
15091
|
+
_l = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
15092
|
+
rotateLoadingOverlayImageWhenPortrait = _l === void 0 ? true : _l,
|
|
15093
|
+
_m = _a.modelLoadTimeoutMs,
|
|
15094
|
+
modelLoadTimeoutMs = _m === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _m,
|
|
15095
|
+
_o = _a.forceFallbackMode,
|
|
15096
|
+
forceFallbackMode = _o === void 0 ? false : _o,
|
|
15097
|
+
_p = _a.allowIdCardBackToFrontCapture,
|
|
15098
|
+
allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
|
|
15099
|
+
_q = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15100
|
+
enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
|
|
15101
|
+
_r = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15102
|
+
allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
|
|
15061
15103
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
15062
15104
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15063
15105
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15071,28 +15113,28 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15071
15113
|
onUserCancel = _a.onUserCancel,
|
|
15072
15114
|
onModelError = _a.onModelError,
|
|
15073
15115
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15074
|
-
|
|
15075
|
-
theme =
|
|
15076
|
-
|
|
15077
|
-
assets =
|
|
15078
|
-
|
|
15079
|
-
classNames =
|
|
15080
|
-
|
|
15081
|
-
colors =
|
|
15082
|
-
|
|
15083
|
-
verbiage =
|
|
15084
|
-
|
|
15085
|
-
captureSignature =
|
|
15086
|
-
|
|
15087
|
-
captureSignatureVideo =
|
|
15088
|
-
|
|
15089
|
-
captureAdditionalDocuments =
|
|
15090
|
-
|
|
15091
|
-
geolocationEnabled =
|
|
15092
|
-
|
|
15093
|
-
geolocationRequired =
|
|
15094
|
-
|
|
15095
|
-
debugMode =
|
|
15116
|
+
_s = _a.theme,
|
|
15117
|
+
theme = _s === void 0 ? 'default' : _s,
|
|
15118
|
+
_t = _a.assets,
|
|
15119
|
+
assets = _t === void 0 ? {} : _t,
|
|
15120
|
+
_u = _a.classNames,
|
|
15121
|
+
classNames = _u === void 0 ? {} : _u,
|
|
15122
|
+
_v = _a.colors,
|
|
15123
|
+
colors = _v === void 0 ? {} : _v,
|
|
15124
|
+
_w = _a.verbiage,
|
|
15125
|
+
verbiage = _w === void 0 ? {} : _w,
|
|
15126
|
+
_x = _a.captureSignature,
|
|
15127
|
+
captureSignature = _x === void 0 ? false : _x,
|
|
15128
|
+
_y = _a.captureSignatureVideo,
|
|
15129
|
+
captureSignatureVideo = _y === void 0 ? false : _y,
|
|
15130
|
+
_z = _a.captureAdditionalDocuments,
|
|
15131
|
+
captureAdditionalDocuments = _z === void 0 ? [] : _z,
|
|
15132
|
+
_0 = _a.geolocationEnabled,
|
|
15133
|
+
geolocationEnabled = _0 === void 0 ? true : _0,
|
|
15134
|
+
_1 = _a.geolocationRequired,
|
|
15135
|
+
geolocationRequired = _1 === void 0 ? false : _1,
|
|
15136
|
+
_2 = _a.debugMode,
|
|
15137
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
15096
15138
|
useLanguage(lang);
|
|
15097
15139
|
useDebugLogging(debugMode);
|
|
15098
15140
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -15112,6 +15154,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15112
15154
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
15113
15155
|
instructions: instructions,
|
|
15114
15156
|
guideType: guideType,
|
|
15157
|
+
guideImages: guideImages,
|
|
15115
15158
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
15116
15159
|
rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
|
|
15117
15160
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
@@ -15123,7 +15166,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15123
15166
|
verbiage: verbiage,
|
|
15124
15167
|
debugMode: debugMode
|
|
15125
15168
|
};
|
|
15126
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15169
|
+
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15127
15170
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
15128
15171
|
return {
|
|
15129
15172
|
documents: captureAdditionalDocuments,
|
|
@@ -15193,7 +15236,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15193
15236
|
onResponseReceived: onResponseReceived,
|
|
15194
15237
|
geolocationEnabled: geolocationEnabled,
|
|
15195
15238
|
geolocationRequired: geolocationRequired
|
|
15196
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
15239
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
15197
15240
|
checks: React.useMemo(function () {
|
|
15198
15241
|
return ['IdCapture'];
|
|
15199
15242
|
}, []),
|
|
@@ -15305,7 +15348,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15305
15348
|
onBeforeLivenessCheck: onBeforeSubmit,
|
|
15306
15349
|
geolocationEnabled: geolocationEnabled,
|
|
15307
15350
|
geolocationRequired: geolocationRequired
|
|
15308
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
15351
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
15309
15352
|
checks: React.useMemo(function () {
|
|
15310
15353
|
return ['FaceLiveness'];
|
|
15311
15354
|
}, []),
|
|
@@ -15359,20 +15402,22 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15359
15402
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
15360
15403
|
_j = _a.idCaptureGuideType,
|
|
15361
15404
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
15362
|
-
_k = _a.
|
|
15363
|
-
|
|
15364
|
-
_l = _a.
|
|
15365
|
-
|
|
15366
|
-
_m = _a.
|
|
15367
|
-
|
|
15368
|
-
_o = _a.
|
|
15369
|
-
|
|
15370
|
-
_p = _a.
|
|
15371
|
-
|
|
15372
|
-
_q = _a.
|
|
15373
|
-
|
|
15374
|
-
_r = _a.
|
|
15375
|
-
|
|
15405
|
+
_k = _a.idCaptureGuideImages,
|
|
15406
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
15407
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
15408
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
15409
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15410
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
15411
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
15412
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
15413
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
15414
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
15415
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
15416
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
15417
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15418
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
15419
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15420
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
15376
15421
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15377
15422
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
15378
15423
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15389,28 +15434,28 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15389
15434
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
15390
15435
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
15391
15436
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15392
|
-
|
|
15393
|
-
captureSignature =
|
|
15394
|
-
|
|
15395
|
-
captureSignatureVideo =
|
|
15396
|
-
|
|
15397
|
-
captureAdditionalDocuments =
|
|
15398
|
-
|
|
15399
|
-
theme =
|
|
15400
|
-
|
|
15401
|
-
assets =
|
|
15402
|
-
|
|
15403
|
-
classNames =
|
|
15404
|
-
|
|
15405
|
-
colors =
|
|
15406
|
-
|
|
15407
|
-
verbiage =
|
|
15408
|
-
|
|
15409
|
-
geolocationEnabled =
|
|
15410
|
-
|
|
15411
|
-
geolocationRequired =
|
|
15412
|
-
|
|
15413
|
-
debugMode =
|
|
15437
|
+
_t = _a.captureSignature,
|
|
15438
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
15439
|
+
_u = _a.captureSignatureVideo,
|
|
15440
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
15441
|
+
_v = _a.captureAdditionalDocuments,
|
|
15442
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
15443
|
+
_w = _a.theme,
|
|
15444
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
15445
|
+
_x = _a.assets,
|
|
15446
|
+
assets = _x === void 0 ? {} : _x,
|
|
15447
|
+
_y = _a.classNames,
|
|
15448
|
+
classNames = _y === void 0 ? {} : _y,
|
|
15449
|
+
_z = _a.colors,
|
|
15450
|
+
colors = _z === void 0 ? {} : _z,
|
|
15451
|
+
_0 = _a.verbiage,
|
|
15452
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
15453
|
+
_1 = _a.geolocationEnabled,
|
|
15454
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
15455
|
+
_2 = _a.geolocationRequired,
|
|
15456
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
15457
|
+
_3 = _a.debugMode,
|
|
15458
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
15414
15459
|
useLanguage(lang);
|
|
15415
15460
|
useDebugLogging(debugMode);
|
|
15416
15461
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -15428,6 +15473,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15428
15473
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15429
15474
|
instructions: idCaptureInstructions,
|
|
15430
15475
|
guideType: idCaptureGuideType,
|
|
15476
|
+
guideImages: idCaptureGuideImages,
|
|
15431
15477
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
15432
15478
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15433
15479
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -15437,7 +15483,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15437
15483
|
skipSuccessScreen: skipSuccessScreen,
|
|
15438
15484
|
debugMode: debugMode
|
|
15439
15485
|
};
|
|
15440
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
15486
|
+
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
15441
15487
|
var faceLivenessProps = React.useMemo(function () {
|
|
15442
15488
|
return {
|
|
15443
15489
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -15529,7 +15575,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15529
15575
|
onResponseReceived: onResponseReceived,
|
|
15530
15576
|
geolocationEnabled: geolocationEnabled,
|
|
15531
15577
|
geolocationRequired: geolocationRequired
|
|
15532
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
15578
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
15533
15579
|
checks: checks,
|
|
15534
15580
|
idCaptureProps: idCaptureProps,
|
|
15535
15581
|
faceLivenessProps: faceLivenessProps,
|
|
@@ -15590,20 +15636,22 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15590
15636
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
15591
15637
|
_j = _a.idCaptureGuideType,
|
|
15592
15638
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
15593
|
-
_k = _a.
|
|
15594
|
-
|
|
15595
|
-
_l = _a.
|
|
15596
|
-
|
|
15597
|
-
_m = _a.
|
|
15598
|
-
|
|
15599
|
-
_o = _a.
|
|
15600
|
-
|
|
15601
|
-
_p = _a.
|
|
15602
|
-
|
|
15603
|
-
_q = _a.
|
|
15604
|
-
|
|
15605
|
-
_r = _a.
|
|
15606
|
-
|
|
15639
|
+
_k = _a.idCaptureGuideImages,
|
|
15640
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
15641
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
15642
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
15643
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15644
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
15645
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
15646
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
15647
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
15648
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
15649
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
15650
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
15651
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15652
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
15653
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15654
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
15607
15655
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15608
15656
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
15609
15657
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -15619,28 +15667,28 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15619
15667
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
15620
15668
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
15621
15669
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15622
|
-
|
|
15623
|
-
captureSignature =
|
|
15624
|
-
|
|
15625
|
-
captureSignatureVideo =
|
|
15626
|
-
|
|
15627
|
-
captureAdditionalDocuments =
|
|
15628
|
-
|
|
15629
|
-
theme =
|
|
15630
|
-
|
|
15631
|
-
assets =
|
|
15632
|
-
|
|
15633
|
-
classNames =
|
|
15634
|
-
|
|
15635
|
-
colors =
|
|
15636
|
-
|
|
15637
|
-
verbiage =
|
|
15638
|
-
|
|
15639
|
-
geolocationEnabled =
|
|
15640
|
-
|
|
15641
|
-
geolocationRequired =
|
|
15642
|
-
|
|
15643
|
-
debugMode =
|
|
15670
|
+
_t = _a.captureSignature,
|
|
15671
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
15672
|
+
_u = _a.captureSignatureVideo,
|
|
15673
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
15674
|
+
_v = _a.captureAdditionalDocuments,
|
|
15675
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
15676
|
+
_w = _a.theme,
|
|
15677
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
15678
|
+
_x = _a.assets,
|
|
15679
|
+
assets = _x === void 0 ? {} : _x,
|
|
15680
|
+
_y = _a.classNames,
|
|
15681
|
+
classNames = _y === void 0 ? {} : _y,
|
|
15682
|
+
_z = _a.colors,
|
|
15683
|
+
colors = _z === void 0 ? {} : _z,
|
|
15684
|
+
_0 = _a.verbiage,
|
|
15685
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
15686
|
+
_1 = _a.geolocationEnabled,
|
|
15687
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
15688
|
+
_2 = _a.geolocationRequired,
|
|
15689
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
15690
|
+
_3 = _a.debugMode,
|
|
15691
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
15644
15692
|
useLanguage(lang);
|
|
15645
15693
|
useDebugLogging(debugMode);
|
|
15646
15694
|
var idCaptureProps = React.useMemo(function () {
|
|
@@ -15654,6 +15702,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15654
15702
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15655
15703
|
instructions: idCaptureInstructions,
|
|
15656
15704
|
guideType: idCaptureGuideType,
|
|
15705
|
+
guideImages: idCaptureGuideImages,
|
|
15657
15706
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
15658
15707
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15659
15708
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -15666,7 +15715,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15666
15715
|
skipSuccessScreen: skipSuccessScreen,
|
|
15667
15716
|
debugMode: debugMode
|
|
15668
15717
|
};
|
|
15669
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
15718
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
15670
15719
|
var faceLivenessProps = React.useMemo(function () {
|
|
15671
15720
|
return {
|
|
15672
15721
|
onExitCapture: onExitCapture,
|
|
@@ -15756,7 +15805,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15756
15805
|
onResponseReceived: onResponseReceived,
|
|
15757
15806
|
geolocationEnabled: geolocationEnabled,
|
|
15758
15807
|
geolocationRequired: geolocationRequired
|
|
15759
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
15808
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
15760
15809
|
checks: React.useMemo(function () {
|
|
15761
15810
|
return ['IdCapture', 'FaceLiveness'];
|
|
15762
15811
|
}, []),
|
|
@@ -16950,7 +16999,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
16950
16999
|
onResponseReceived: onComplete,
|
|
16951
17000
|
geolocationEnabled: geolocationEnabled,
|
|
16952
17001
|
geolocationRequired: geolocationRequired
|
|
16953
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
17002
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
16954
17003
|
checks: React.useMemo(function () {
|
|
16955
17004
|
return ['VideoSignatureCapture'];
|
|
16956
17005
|
}, []),
|
|
@@ -17037,43 +17086,45 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17037
17086
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
17038
17087
|
_l = _a.idCaptureGuideType,
|
|
17039
17088
|
idCaptureGuideType = _l === void 0 ? 'fit' : _l,
|
|
17040
|
-
_m = _a.
|
|
17041
|
-
|
|
17042
|
-
_o = _a.
|
|
17043
|
-
|
|
17089
|
+
_m = _a.idCaptureGuideImages,
|
|
17090
|
+
idCaptureGuideImages = _m === void 0 ? defaultIdCaptureGuideImages : _m,
|
|
17091
|
+
_o = _a.idCapturePortraitGuidesOnMobile,
|
|
17092
|
+
idCapturePortraitGuidesOnMobile = _o === void 0 ? true : _o,
|
|
17093
|
+
_p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
17094
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
|
|
17044
17095
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
17045
|
-
|
|
17046
|
-
faceLivenessLoadingOverlayMode =
|
|
17047
|
-
|
|
17048
|
-
disableFaceDetectionWhileAudioCapture =
|
|
17049
|
-
|
|
17050
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
17051
|
-
|
|
17052
|
-
silentFallback =
|
|
17053
|
-
|
|
17054
|
-
mergeAVStreams =
|
|
17055
|
-
|
|
17056
|
-
theme =
|
|
17057
|
-
|
|
17058
|
-
assets =
|
|
17059
|
-
|
|
17060
|
-
classNames =
|
|
17061
|
-
|
|
17062
|
-
colors =
|
|
17063
|
-
|
|
17064
|
-
verbiage =
|
|
17065
|
-
|
|
17066
|
-
captureSignature =
|
|
17067
|
-
|
|
17068
|
-
captureSignatureVideo =
|
|
17069
|
-
|
|
17070
|
-
captureAdditionalDocuments =
|
|
17071
|
-
|
|
17072
|
-
geolocationEnabled =
|
|
17073
|
-
|
|
17074
|
-
geolocationRequired =
|
|
17075
|
-
|
|
17076
|
-
debugMode =
|
|
17096
|
+
_q = _a.faceLivenessLoadingOverlayMode,
|
|
17097
|
+
faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
|
|
17098
|
+
_r = _a.disableFaceDetectionWhileAudioCapture,
|
|
17099
|
+
disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
|
|
17100
|
+
_s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
17101
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
|
|
17102
|
+
_t = _a.silentFallback,
|
|
17103
|
+
silentFallback = _t === void 0 ? false : _t,
|
|
17104
|
+
_u = _a.mergeAVStreams,
|
|
17105
|
+
mergeAVStreams = _u === void 0 ? false : _u,
|
|
17106
|
+
_v = _a.theme,
|
|
17107
|
+
theme = _v === void 0 ? 'default' : _v,
|
|
17108
|
+
_w = _a.assets,
|
|
17109
|
+
assets = _w === void 0 ? {} : _w,
|
|
17110
|
+
_x = _a.classNames,
|
|
17111
|
+
classNames = _x === void 0 ? {} : _x,
|
|
17112
|
+
_y = _a.colors,
|
|
17113
|
+
colors = _y === void 0 ? {} : _y,
|
|
17114
|
+
_z = _a.verbiage,
|
|
17115
|
+
verbiage = _z === void 0 ? {} : _z,
|
|
17116
|
+
_0 = _a.captureSignature,
|
|
17117
|
+
captureSignature = _0 === void 0 ? false : _0,
|
|
17118
|
+
_1 = _a.captureSignatureVideo,
|
|
17119
|
+
captureSignatureVideo = _1 === void 0 ? false : _1,
|
|
17120
|
+
_2 = _a.captureAdditionalDocuments,
|
|
17121
|
+
captureAdditionalDocuments = _2 === void 0 ? [] : _2,
|
|
17122
|
+
_3 = _a.geolocationEnabled,
|
|
17123
|
+
geolocationEnabled = _3 === void 0 ? true : _3,
|
|
17124
|
+
_4 = _a.geolocationRequired,
|
|
17125
|
+
geolocationRequired = _4 === void 0 ? false : _4,
|
|
17126
|
+
_5 = _a.debugMode,
|
|
17127
|
+
debugMode = _5 === void 0 ? false : _5;
|
|
17077
17128
|
useLanguage(lang);
|
|
17078
17129
|
useDebugLogging(debugMode);
|
|
17079
17130
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
@@ -17095,6 +17146,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17095
17146
|
customOverlayContent: customOverlayContent,
|
|
17096
17147
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
17097
17148
|
idCaptureGuideType: idCaptureGuideType,
|
|
17149
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
17098
17150
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
17099
17151
|
idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
17100
17152
|
faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -17108,7 +17160,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17108
17160
|
verbiage: verbiage,
|
|
17109
17161
|
debugMode: debugMode
|
|
17110
17162
|
};
|
|
17111
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17163
|
+
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17112
17164
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
17113
17165
|
return {
|
|
17114
17166
|
documents: captureAdditionalDocuments,
|
|
@@ -17171,7 +17223,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17171
17223
|
onResponseReceived: onComplete,
|
|
17172
17224
|
geolocationEnabled: geolocationEnabled,
|
|
17173
17225
|
geolocationRequired: geolocationRequired
|
|
17174
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
17226
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
17175
17227
|
checks: React.useMemo(function () {
|
|
17176
17228
|
return ['VideoIdCapture'];
|
|
17177
17229
|
}, []),
|
|
@@ -17330,7 +17382,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
17330
17382
|
onResponseReceived: onResponseReceived,
|
|
17331
17383
|
geolocationEnabled: geolocationEnabled,
|
|
17332
17384
|
geolocationRequired: geolocationRequired
|
|
17333
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
17385
|
+
}, /*#__PURE__*/React__namespace.default.createElement(CompositeWizard, {
|
|
17334
17386
|
checks: React.useMemo(function () {
|
|
17335
17387
|
return ['FaceLiveness'];
|
|
17336
17388
|
}, []),
|