idmission-web-sdk 0.0.38 → 0.0.39
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/README.md +29 -0
- package/dist/components/common/GuidanceMessage.d.ts +5 -261
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +3 -2
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +5 -2
- package/dist/components/customer_flows/CustomerIdentification.d.ts +3 -2
- package/dist/components/customer_flows/CustomerVerification.d.ts +3 -2
- package/dist/components/customer_flows/FaceValidation.d.ts +3 -2
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +5 -2
- package/dist/components/customer_flows/IdValidation.d.ts +3 -1
- package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts +4 -2
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +4 -2
- package/dist/components/customer_verification/CustomerVerificationCapture.d.ts +4 -2
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +4 -2
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +4 -2
- package/dist/components/id_capture/IdCapture.d.ts +6 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -2
- package/dist/components/selfie_capture/SelfieCapture.d.ts +6 -1
- package/dist/sdk2.cjs.development.js +276 -234
- 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 +276 -234
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +276 -234
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +7 -6
|
@@ -12139,43 +12139,45 @@
|
|
|
12139
12139
|
processingDelay = _s === void 0 ? 0 : _s,
|
|
12140
12140
|
_t = _a.assets,
|
|
12141
12141
|
assets = _t === void 0 ? {} : _t,
|
|
12142
|
-
_u = _a.
|
|
12143
|
-
|
|
12144
|
-
_v = _a.
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
_y =
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12142
|
+
_u = _a.colors,
|
|
12143
|
+
colors = _u === void 0 ? {} : _u,
|
|
12144
|
+
_v = _a.verbiage,
|
|
12145
|
+
verbiage = _v === void 0 ? {} : _v,
|
|
12146
|
+
_w = _a.debugMode,
|
|
12147
|
+
debugMode = _w === void 0 ? false : _w;
|
|
12148
|
+
var _x = useResizeObserver(),
|
|
12149
|
+
ref = _x.ref,
|
|
12150
|
+
_y = _x.width,
|
|
12151
|
+
width = _y === void 0 ? 1 : _y,
|
|
12152
|
+
_z = _x.height,
|
|
12153
|
+
height = _z === void 0 ? 1 : _z;
|
|
12154
|
+
var _0 = React.useReducer(reducer$5, initialState$5),
|
|
12155
|
+
state = _0[0],
|
|
12156
|
+
dispatch = _0[1];
|
|
12157
|
+
var _1 = React.useState(''),
|
|
12158
|
+
imageURL = _1[0],
|
|
12159
|
+
setImageURL = _1[1];
|
|
12160
|
+
var _2 = React.useState(false),
|
|
12161
|
+
processingFrame = _2[0],
|
|
12162
|
+
setProcessingFrame = _2[1];
|
|
12163
|
+
var _3 = React.useContext(CameraStateContext),
|
|
12164
|
+
cameraRef = _3.cameraRef,
|
|
12165
|
+
cameraReady = _3.cameraReady,
|
|
12166
|
+
takePhoto = _3.takePhoto,
|
|
12167
|
+
videoRef = _3.videoRef,
|
|
12168
|
+
videoLoaded = _3.videoLoaded;
|
|
12167
12169
|
var t = useTranslation().t;
|
|
12168
12170
|
var captureStartedAt = React.useRef();
|
|
12169
|
-
var
|
|
12170
|
-
modelsReady =
|
|
12171
|
-
modelsWorking =
|
|
12172
|
-
setThresholds =
|
|
12173
|
-
makePrediction =
|
|
12174
|
-
onPredictionMade =
|
|
12175
|
-
detectionTime =
|
|
12176
|
-
focusPredictionTime =
|
|
12177
|
-
getBestFrame =
|
|
12178
|
-
resetBestFrame =
|
|
12171
|
+
var _4 = React.useContext(IdCaptureModelsContext),
|
|
12172
|
+
modelsReady = _4.ready,
|
|
12173
|
+
modelsWorking = _4.working,
|
|
12174
|
+
setThresholds = _4.setThresholds,
|
|
12175
|
+
makePrediction = _4.makePrediction,
|
|
12176
|
+
onPredictionMade = _4.onPredictionMade,
|
|
12177
|
+
detectionTime = _4.detectionTime,
|
|
12178
|
+
focusPredictionTime = _4.focusPredictionTime,
|
|
12179
|
+
getBestFrame = _4.getBestFrame,
|
|
12180
|
+
resetBestFrame = _4.resetBestFrame;
|
|
12179
12181
|
React.useEffect(function () {
|
|
12180
12182
|
captureStartedAt.current = new Date();
|
|
12181
12183
|
}, []);
|
|
@@ -12204,9 +12206,9 @@
|
|
|
12204
12206
|
React.useEffect(function () {
|
|
12205
12207
|
shouldCaptureFrames.current = videoLoaded && cameraReady && modelsReady && !state.capturing && !state.captured;
|
|
12206
12208
|
}, [cameraReady, state.captured, state.capturing, modelsReady, videoLoaded]);
|
|
12207
|
-
var
|
|
12208
|
-
lastFrame =
|
|
12209
|
-
setLastFrame =
|
|
12209
|
+
var _5 = React.useState(null),
|
|
12210
|
+
lastFrame = _5[0],
|
|
12211
|
+
setLastFrame = _5[1];
|
|
12210
12212
|
React.useEffect(function () {
|
|
12211
12213
|
if (!modelsReady || !cameraReady || !videoLoaded) return;
|
|
12212
12214
|
animationFrame.current = requestAnimationFrame(function runFrame() {
|
|
@@ -12381,9 +12383,11 @@
|
|
|
12381
12383
|
}
|
|
12382
12384
|
});
|
|
12383
12385
|
}
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
verbiage.
|
|
12386
|
+
colors.guideBoxUnsatisfiedColor || (colors.guideBoxUnsatisfiedColor = 'white');
|
|
12387
|
+
colors.guideBoxSatisfiedColor || (colors.guideBoxSatisfiedColor = 'green');
|
|
12388
|
+
verbiage.instructionText || (verbiage.instructionText = t('Scan the front of ID'));
|
|
12389
|
+
verbiage.capturingText || (verbiage.capturingText = t('Capturing...'));
|
|
12390
|
+
verbiage.captureFailedText || (verbiage.captureFailedText = t('Capture failed!'));
|
|
12387
12391
|
return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
12388
12392
|
ref: ref,
|
|
12389
12393
|
className: "flex"
|
|
@@ -12394,7 +12398,7 @@
|
|
|
12394
12398
|
portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
|
|
12395
12399
|
landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
|
|
12396
12400
|
isMirrored: !((_c = cameraRef.current) === null || _c === void 0 ? void 0 : _c.isRearFacing),
|
|
12397
|
-
borderColor: state.isGoodFrame ?
|
|
12401
|
+
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
|
|
12398
12402
|
}), debugMode && state.detectedObjects.length > 0 && /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlay, {
|
|
12399
12403
|
"$flipX": !((_d = cameraRef.current) === null || _d === void 0 ? void 0 : _d.isRearFacing)
|
|
12400
12404
|
}, state.detectedObjects.map(function (obj, i) {
|
|
@@ -12989,25 +12993,27 @@
|
|
|
12989
12993
|
passportFocusScoreThreshold = _k === void 0 ? 0.3 : _k,
|
|
12990
12994
|
_l = _a.assets,
|
|
12991
12995
|
assets = _l === void 0 ? {} : _l,
|
|
12992
|
-
_m = _a.
|
|
12993
|
-
|
|
12994
|
-
_o = _a.
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12996
|
+
_m = _a.colors,
|
|
12997
|
+
colors = _m === void 0 ? {} : _m,
|
|
12998
|
+
_o = _a.verbiage,
|
|
12999
|
+
verbiage = _o === void 0 ? {} : _o,
|
|
13000
|
+
_p = _a.debugMode,
|
|
13001
|
+
debugMode = _p === void 0 ? false : _p;
|
|
13002
|
+
var _q = React.useReducer(reducer$4, initialState$4),
|
|
13003
|
+
state = _q[0],
|
|
13004
|
+
dispatch = _q[1];
|
|
12999
13005
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
13000
|
-
var
|
|
13001
|
-
overlayDismissed =
|
|
13002
|
-
setOverlayDismissed =
|
|
13003
|
-
var
|
|
13004
|
-
submissionStatus =
|
|
13005
|
-
submissionResponse =
|
|
13006
|
-
setIdFrontImage =
|
|
13007
|
-
setIdBackImage =
|
|
13008
|
-
setPassportImage =
|
|
13009
|
-
logIdFrontCaptureAttempt =
|
|
13010
|
-
logIdBackCaptureAttempt =
|
|
13006
|
+
var _r = React.useState(false),
|
|
13007
|
+
overlayDismissed = _r[0],
|
|
13008
|
+
setOverlayDismissed = _r[1];
|
|
13009
|
+
var _s = React.useContext(SubmissionContext),
|
|
13010
|
+
submissionStatus = _s.submissionStatus,
|
|
13011
|
+
submissionResponse = _s.submissionResponse,
|
|
13012
|
+
setIdFrontImage = _s.setIdFrontImage,
|
|
13013
|
+
setIdBackImage = _s.setIdBackImage,
|
|
13014
|
+
setPassportImage = _s.setPassportImage,
|
|
13015
|
+
logIdFrontCaptureAttempt = _s.logIdFrontCaptureAttempt,
|
|
13016
|
+
logIdBackCaptureAttempt = _s.logIdBackCaptureAttempt;
|
|
13011
13017
|
var t = useTranslation().t;
|
|
13012
13018
|
var operationStartedAt = React.useRef();
|
|
13013
13019
|
React.useEffect(function () {
|
|
@@ -13099,9 +13105,9 @@
|
|
|
13099
13105
|
type: 'reset'
|
|
13100
13106
|
});
|
|
13101
13107
|
}, []);
|
|
13102
|
-
var
|
|
13103
|
-
attempt =
|
|
13104
|
-
setAttempt =
|
|
13108
|
+
var _t = React.useState(0),
|
|
13109
|
+
attempt = _t[0],
|
|
13110
|
+
setAttempt = _t[1];
|
|
13105
13111
|
var onExit = React.useCallback(function () {
|
|
13106
13112
|
setOverlayDismissed(false);
|
|
13107
13113
|
setAttempt(function (n) {
|
|
@@ -13116,16 +13122,16 @@
|
|
|
13116
13122
|
releaseCameraAccess();
|
|
13117
13123
|
}
|
|
13118
13124
|
}, [releaseCameraAccess, submissionStatus]);
|
|
13119
|
-
assets.idCardFrontPortraitGuidesImageUrl
|
|
13120
|
-
assets.idCardFrontLandscapeGuidesImageUrl
|
|
13121
|
-
assets.idCardBackPortraitGuidesImageUrl
|
|
13122
|
-
assets.idCardBackLandscapeGuidesImageUrl
|
|
13123
|
-
assets.passportPortraitGuidesImageUrl
|
|
13124
|
-
assets.passportLandscapeGuidesImageUrl
|
|
13125
|
-
assets.loadingOverlayInstructionImageUrl
|
|
13126
|
-
verbiage.idCardFrontInstructionText
|
|
13127
|
-
verbiage.idCardBackInstructionText
|
|
13128
|
-
verbiage.passportInstructionText
|
|
13125
|
+
assets.idCardFrontPortraitGuidesImageUrl || (assets.idCardFrontPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-2.svg"));
|
|
13126
|
+
assets.idCardFrontLandscapeGuidesImageUrl || (assets.idCardFrontLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-2.svg"));
|
|
13127
|
+
assets.idCardBackPortraitGuidesImageUrl || (assets.idCardBackPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-2.svg"));
|
|
13128
|
+
assets.idCardBackLandscapeGuidesImageUrl || (assets.idCardBackLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-2.svg"));
|
|
13129
|
+
assets.passportPortraitGuidesImageUrl || (assets.passportPortraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
|
|
13130
|
+
assets.passportLandscapeGuidesImageUrl || (assets.passportLandscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
|
|
13131
|
+
assets.loadingOverlayInstructionImageUrl || (assets.loadingOverlayInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png"));
|
|
13132
|
+
verbiage.idCardFrontInstructionText || (verbiage.idCardFrontInstructionText = t('Scan the front of ID'));
|
|
13133
|
+
verbiage.idCardBackInstructionText || (verbiage.idCardBackInstructionText = t('Scan the back of ID'));
|
|
13134
|
+
verbiage.passportInstructionText || (verbiage.passportInstructionText = t('Scan the ID page of passport'));
|
|
13129
13135
|
var idCardFrontAssets = React.useMemo(function () {
|
|
13130
13136
|
return {
|
|
13131
13137
|
portraitGuidesImageUrl: assets.idCardFrontPortraitGuidesImageUrl,
|
|
@@ -13196,6 +13202,7 @@
|
|
|
13196
13202
|
processingScreen: flipIdPrompt,
|
|
13197
13203
|
processingDelay: 3500,
|
|
13198
13204
|
assets: idCardFrontAssets,
|
|
13205
|
+
colors: colors,
|
|
13199
13206
|
verbiage: idCardFrontVerbiage,
|
|
13200
13207
|
debugMode: debugMode
|
|
13201
13208
|
});
|
|
@@ -13215,6 +13222,7 @@
|
|
|
13215
13222
|
onCapture: onCapture,
|
|
13216
13223
|
onExit: onExit,
|
|
13217
13224
|
assets: idCardBackAssets,
|
|
13225
|
+
colors: colors,
|
|
13218
13226
|
verbiage: idCardBackVerbiage,
|
|
13219
13227
|
debugMode: debugMode
|
|
13220
13228
|
});
|
|
@@ -13234,6 +13242,7 @@
|
|
|
13234
13242
|
onCapture: onCapture,
|
|
13235
13243
|
onExit: onExit,
|
|
13236
13244
|
assets: passportAssets,
|
|
13245
|
+
colors: colors,
|
|
13237
13246
|
verbiage: passportVerbiage,
|
|
13238
13247
|
debugMode: debugMode
|
|
13239
13248
|
});
|
|
@@ -13544,6 +13553,19 @@
|
|
|
13544
13553
|
}, children);
|
|
13545
13554
|
};
|
|
13546
13555
|
|
|
13556
|
+
var GuidanceMessageContainer = styled__default['default'].div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
13557
|
+
var $top = _a.$top;
|
|
13558
|
+
return $top !== null && $top !== void 0 ? $top : '10vh';
|
|
13559
|
+
});
|
|
13560
|
+
var GuidanceMessage = styled__default['default'].div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n padding: 10px 12px 8px;\n border-radius: 8px;\n"])), function (_a) {
|
|
13561
|
+
var $background = _a.$background;
|
|
13562
|
+
return $background !== null && $background !== void 0 ? $background : '#ccc';
|
|
13563
|
+
}, function (_a) {
|
|
13564
|
+
var $textColor = _a.$textColor;
|
|
13565
|
+
return $textColor !== null && $textColor !== void 0 ? $textColor : 'black';
|
|
13566
|
+
});
|
|
13567
|
+
var templateObject_1$2, templateObject_2$1;
|
|
13568
|
+
|
|
13547
13569
|
var initialState$3 = {
|
|
13548
13570
|
videoWidth: 0,
|
|
13549
13571
|
videoHeight: 0,
|
|
@@ -13647,24 +13669,26 @@
|
|
|
13647
13669
|
_e = _a.timeoutDurationMs,
|
|
13648
13670
|
timeoutDurationMs = _e === void 0 ? 15000 : _e,
|
|
13649
13671
|
guidanceMessage = _a.guidanceMessage,
|
|
13650
|
-
_f = _a.
|
|
13651
|
-
|
|
13672
|
+
_f = _a.colors,
|
|
13673
|
+
colors = _f === void 0 ? {} : _f,
|
|
13674
|
+
_g = _a.verbiage,
|
|
13675
|
+
verbiage = _g === void 0 ? {} : _g,
|
|
13652
13676
|
debugMode = _a.debugMode;
|
|
13653
13677
|
var t = useTranslation().t;
|
|
13654
|
-
var
|
|
13655
|
-
ref =
|
|
13656
|
-
|
|
13657
|
-
width =
|
|
13658
|
-
|
|
13659
|
-
height =
|
|
13660
|
-
var
|
|
13661
|
-
state =
|
|
13662
|
-
dispatch =
|
|
13663
|
-
var
|
|
13664
|
-
cameraRef =
|
|
13665
|
-
cameraReady =
|
|
13666
|
-
takePhoto =
|
|
13667
|
-
videoRef =
|
|
13678
|
+
var _h = useResizeObserver(),
|
|
13679
|
+
ref = _h.ref,
|
|
13680
|
+
_j = _h.width,
|
|
13681
|
+
width = _j === void 0 ? 1 : _j,
|
|
13682
|
+
_k = _h.height,
|
|
13683
|
+
height = _k === void 0 ? 1 : _k;
|
|
13684
|
+
var _l = React.useReducer(reducer$3, initialState$3),
|
|
13685
|
+
state = _l[0],
|
|
13686
|
+
dispatch = _l[1];
|
|
13687
|
+
var _m = React.useContext(CameraStateContext),
|
|
13688
|
+
cameraRef = _m.cameraRef,
|
|
13689
|
+
cameraReady = _m.cameraReady,
|
|
13690
|
+
takePhoto = _m.takePhoto,
|
|
13691
|
+
videoRef = _m.videoRef;
|
|
13668
13692
|
var onPredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
|
|
13669
13693
|
React.useEffect(function () {
|
|
13670
13694
|
if (cameraReady && videoRef.current && videoRef.current.videoWidth !== 0) {
|
|
@@ -13687,9 +13711,9 @@
|
|
|
13687
13711
|
});
|
|
13688
13712
|
});
|
|
13689
13713
|
}, [onPredictionMade]);
|
|
13690
|
-
var
|
|
13691
|
-
captureReady =
|
|
13692
|
-
setCaptureReady =
|
|
13714
|
+
var _o = React.useState(false),
|
|
13715
|
+
captureReady = _o[0],
|
|
13716
|
+
setCaptureReady = _o[1];
|
|
13693
13717
|
React.useEffect(function () {
|
|
13694
13718
|
var timer;
|
|
13695
13719
|
if (state.faceReady) {
|
|
@@ -13733,12 +13757,12 @@
|
|
|
13733
13757
|
});
|
|
13734
13758
|
})();
|
|
13735
13759
|
}, [captureReady, onSelfieCaptured, state.faces, takePhoto]);
|
|
13736
|
-
var
|
|
13737
|
-
timeoutStartedAt =
|
|
13738
|
-
setTimeoutStartedAt =
|
|
13739
|
-
var
|
|
13740
|
-
timedOut =
|
|
13741
|
-
setTimedOut =
|
|
13760
|
+
var _p = React.useState(),
|
|
13761
|
+
timeoutStartedAt = _p[0],
|
|
13762
|
+
setTimeoutStartedAt = _p[1];
|
|
13763
|
+
var _q = React.useState(false),
|
|
13764
|
+
timedOut = _q[0],
|
|
13765
|
+
setTimedOut = _q[1];
|
|
13742
13766
|
React.useEffect(function () {
|
|
13743
13767
|
if (!timeoutDurationMs) return;
|
|
13744
13768
|
setTimeoutStartedAt(new Date());
|
|
@@ -13759,36 +13783,24 @@
|
|
|
13759
13783
|
videoWidth: state.videoWidth,
|
|
13760
13784
|
videoHeight: state.videoHeight
|
|
13761
13785
|
});
|
|
13786
|
+
colors.guidesUnsatisfiedColor || (colors.guidesUnsatisfiedColor = 'white');
|
|
13787
|
+
colors.guidesSatisfiedColor || (colors.guidesSatisfiedColor = 'green');
|
|
13762
13788
|
if (!guidanceMessage) {
|
|
13763
|
-
verbiage.guidanceHoldStillText
|
|
13764
|
-
verbiage.guidanceLookStraightText
|
|
13765
|
-
verbiage.guidanceMoveBackText
|
|
13766
|
-
verbiage.guidanceMoveForwardText
|
|
13767
|
-
verbiage.guidanceMoveToCenterText
|
|
13789
|
+
verbiage.guidanceHoldStillText || (verbiage.guidanceHoldStillText = t('Hold still for a few seconds...'));
|
|
13790
|
+
verbiage.guidanceLookStraightText || (verbiage.guidanceLookStraightText = t('Look straight into the camera...'));
|
|
13791
|
+
verbiage.guidanceMoveBackText || (verbiage.guidanceMoveBackText = t('Move back...'));
|
|
13792
|
+
verbiage.guidanceMoveForwardText || (verbiage.guidanceMoveForwardText = t('Move forward...'));
|
|
13793
|
+
verbiage.guidanceMoveToCenterText || (verbiage.guidanceMoveToCenterText = t('Move to the center...'));
|
|
13768
13794
|
guidanceMessage = state.faceReady ? verbiage.guidanceHoldStillText : state.faceLookingAway ? verbiage.guidanceLookStraightText : state.faceTooClose ? verbiage.guidanceMoveBackText : state.faceTooFar ? verbiage.guidanceMoveForwardText : state.faceNotCentered ? verbiage.guidanceMoveToCenterText : '';
|
|
13769
13795
|
}
|
|
13770
13796
|
return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
|
|
13771
13797
|
ref: ref,
|
|
13772
13798
|
className: "flex"
|
|
13773
13799
|
}, /*#__PURE__*/React__default['default'].createElement(CameraVideoTag, null), /*#__PURE__*/React__default['default'].createElement(FaceCaptureGuideOverlay, {
|
|
13774
|
-
borderColor: state.faceReady ?
|
|
13775
|
-
}), guidanceMessage !== '' && /*#__PURE__*/React__default['default'].createElement(
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
top: 'calc(10vh)',
|
|
13779
|
-
fontWeight: 'bold',
|
|
13780
|
-
width: '100%',
|
|
13781
|
-
display: 'flex'
|
|
13782
|
-
}
|
|
13783
|
-
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13784
|
-
style: {
|
|
13785
|
-
marginLeft: 'auto',
|
|
13786
|
-
marginRight: 'auto',
|
|
13787
|
-
background: state.faceReady ? 'green' : 'red',
|
|
13788
|
-
color: 'white',
|
|
13789
|
-
padding: '10px 12px 8px',
|
|
13790
|
-
borderRadius: 8
|
|
13791
|
-
}
|
|
13800
|
+
borderColor: state.faceReady ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
13801
|
+
}), guidanceMessage !== '' && /*#__PURE__*/React__default['default'].createElement(GuidanceMessageContainer, null, /*#__PURE__*/React__default['default'].createElement(GuidanceMessage, {
|
|
13802
|
+
"$background": state.faceReady ? 'green' : 'red',
|
|
13803
|
+
"$textColor": "white"
|
|
13792
13804
|
}, guidanceMessage)), debugMode && state.faces.length > 0 && /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlay, {
|
|
13793
13805
|
"$flipX": !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing)
|
|
13794
13806
|
}, state.faces.map(function (face, i) {
|
|
@@ -13893,14 +13905,16 @@
|
|
|
13893
13905
|
onExit = _a.onExit,
|
|
13894
13906
|
_b = _a.timeoutDurationMs,
|
|
13895
13907
|
timeoutDurationMs = _b === void 0 ? 15000 : _b,
|
|
13896
|
-
_c = _a.
|
|
13897
|
-
|
|
13908
|
+
_c = _a.colors,
|
|
13909
|
+
colors = _c === void 0 ? {} : _c,
|
|
13910
|
+
_d = _a.verbiage,
|
|
13911
|
+
verbiage = _d === void 0 ? {} : _d,
|
|
13898
13912
|
debugMode = _a.debugMode;
|
|
13899
13913
|
var t = useTranslation().t;
|
|
13900
13914
|
var checkLiveness = React.useContext(SubmissionContext).checkLiveness;
|
|
13901
|
-
var
|
|
13902
|
-
state =
|
|
13903
|
-
dispatch =
|
|
13915
|
+
var _e = React.useReducer(reducer$2, initialState$2),
|
|
13916
|
+
state = _e[0],
|
|
13917
|
+
dispatch = _e[1];
|
|
13904
13918
|
var onSelfieCaptured = React.useCallback(function (frame, face) {
|
|
13905
13919
|
onCapture === null || onCapture === void 0 ? void 0 : onCapture();
|
|
13906
13920
|
dispatch({
|
|
@@ -13968,9 +13982,9 @@
|
|
|
13968
13982
|
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
|
|
13969
13983
|
}
|
|
13970
13984
|
}, [onTimeout, state.timesLivenessCheckFailed]);
|
|
13971
|
-
verbiage.guidanceRemoveEyeCoveringsText
|
|
13972
|
-
verbiage.guidanceRemoveHeadCoveringsText
|
|
13973
|
-
verbiage.guidanceRemoveMaskText
|
|
13985
|
+
verbiage.guidanceRemoveEyeCoveringsText || (verbiage.guidanceRemoveEyeCoveringsText = t('Please remove your eye coverings (sunglasses, eye patch, etc.)...'));
|
|
13986
|
+
verbiage.guidanceRemoveHeadCoveringsText || (verbiage.guidanceRemoveHeadCoveringsText = t('Please remove your head coverings (hat, scarf, etc.)...'));
|
|
13987
|
+
verbiage.guidanceRemoveMaskText || (verbiage.guidanceRemoveMaskText = t('Please remove your mask...'));
|
|
13974
13988
|
var guidanceMessage = state.eyeCoveringDetected ? verbiage.guidanceRemoveEyeCoveringsText : state.headCoveringDetected ? verbiage.guidanceRemoveHeadCoveringsText : state.maskDetected ? verbiage.guidanceRemoveMaskText : undefined;
|
|
13975
13989
|
return /*#__PURE__*/React__default['default'].createElement(SelfieCapture, {
|
|
13976
13990
|
onSelfieCaptured: onSelfieCaptured,
|
|
@@ -13978,6 +13992,7 @@
|
|
|
13978
13992
|
onExit: onExit,
|
|
13979
13993
|
timeoutDurationMs: timeoutDurationMs,
|
|
13980
13994
|
guidanceMessage: guidanceMessage,
|
|
13995
|
+
colors: colors,
|
|
13981
13996
|
verbiage: verbiage,
|
|
13982
13997
|
debugMode: debugMode
|
|
13983
13998
|
});
|
|
@@ -14169,26 +14184,28 @@
|
|
|
14169
14184
|
timeoutDurationMs = _b === void 0 ? 15000 : _b,
|
|
14170
14185
|
_c = _a.maxRetries,
|
|
14171
14186
|
maxRetries = _c === void 0 ? 2 : _c,
|
|
14172
|
-
_d = _a.
|
|
14173
|
-
|
|
14174
|
-
_e = _a.
|
|
14175
|
-
|
|
14176
|
-
_f = _a.
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14187
|
+
_d = _a.assets,
|
|
14188
|
+
assets = _d === void 0 ? {} : _d,
|
|
14189
|
+
_e = _a.colors,
|
|
14190
|
+
colors = _e === void 0 ? {} : _e,
|
|
14191
|
+
_f = _a.verbiage,
|
|
14192
|
+
verbiage = _f === void 0 ? {} : _f,
|
|
14193
|
+
_g = _a.debugMode,
|
|
14194
|
+
debugMode = _g === void 0 ? false : _g;
|
|
14195
|
+
var _h = React.useContext(SubmissionContext),
|
|
14196
|
+
submissionResponse = _h.submissionResponse,
|
|
14197
|
+
setSelfieImage = _h.setSelfieImage,
|
|
14198
|
+
logSelfieCaptureAttempt = _h.logSelfieCaptureAttempt;
|
|
14182
14199
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
14183
|
-
var
|
|
14184
|
-
faceCropImageUrl =
|
|
14185
|
-
setFaceCropImageUrl =
|
|
14186
|
-
var
|
|
14187
|
-
retryCount =
|
|
14188
|
-
setRetryCount =
|
|
14189
|
-
var
|
|
14190
|
-
captureState =
|
|
14191
|
-
setCaptureState =
|
|
14200
|
+
var _j = React.useState(''),
|
|
14201
|
+
faceCropImageUrl = _j[0],
|
|
14202
|
+
setFaceCropImageUrl = _j[1];
|
|
14203
|
+
var _k = React.useState(0),
|
|
14204
|
+
retryCount = _k[0],
|
|
14205
|
+
setRetryCount = _k[1];
|
|
14206
|
+
var _l = React.useState('LOADING'),
|
|
14207
|
+
captureState = _l[0],
|
|
14208
|
+
setCaptureState = _l[1];
|
|
14192
14209
|
var captureStartedAt = React.useRef();
|
|
14193
14210
|
var captureEndedAt = React.useRef();
|
|
14194
14211
|
var operationStartedAt = React.useRef();
|
|
@@ -14234,9 +14251,9 @@
|
|
|
14234
14251
|
setCaptureState('FAILED');
|
|
14235
14252
|
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout(submissionResponse);
|
|
14236
14253
|
}, [onTimeout, submissionResponse]);
|
|
14237
|
-
var
|
|
14238
|
-
attempt =
|
|
14239
|
-
setAttempt =
|
|
14254
|
+
var _m = React.useState(0),
|
|
14255
|
+
attempt = _m[0],
|
|
14256
|
+
setAttempt = _m[1];
|
|
14240
14257
|
var onExitCallback = React.useCallback(function () {
|
|
14241
14258
|
setAttempt(function (n) {
|
|
14242
14259
|
return n + 1;
|
|
@@ -14253,6 +14270,7 @@
|
|
|
14253
14270
|
onTimeout: onTimeoutCallback,
|
|
14254
14271
|
onExit: onExitCallback,
|
|
14255
14272
|
timeoutDurationMs: timeoutDurationMs,
|
|
14273
|
+
colors: colors,
|
|
14256
14274
|
verbiage: verbiage,
|
|
14257
14275
|
debugMode: debugMode
|
|
14258
14276
|
});
|
|
@@ -14780,8 +14798,8 @@
|
|
|
14780
14798
|
return truncated;
|
|
14781
14799
|
}
|
|
14782
14800
|
|
|
14783
|
-
var Spinner = styled__default['default'].div(templateObject_1$
|
|
14784
|
-
var templateObject_1$
|
|
14801
|
+
var Spinner = styled__default['default'].div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"], ["\n display: inline-block;\n width: 80px;\n height: 80px;\n margin: auto;\n\n &:after {\n content: ' ';\n display: block;\n width: 64px;\n height: 64px;\n margin: 8px;\n border-radius: 50%;\n border: 6px solid #888;\n border-color: #888 transparent #888 transparent;\n animation: lds-dual-ring 1.2s linear infinite;\n }\n\n @keyframes lds-dual-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n"])));
|
|
14802
|
+
var templateObject_1$1;
|
|
14785
14803
|
|
|
14786
14804
|
var AdditionalDocumentCapture = function AdditionalDocumentCapture(_a) {
|
|
14787
14805
|
var document = _a.document,
|
|
@@ -15547,18 +15565,11 @@
|
|
|
15547
15565
|
return signatureData;
|
|
15548
15566
|
}
|
|
15549
15567
|
|
|
15550
|
-
var SignatureCanvasContainer = styled__default['default'].div(templateObject_1
|
|
15551
|
-
var SignaturePad = styled__default['default'].div(templateObject_2
|
|
15568
|
+
var SignatureCanvasContainer = styled__default['default'].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
|
|
15569
|
+
var SignaturePad = styled__default['default'].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"], ["\n position: relative;\n background: rgba(255, 255, 255, 0.5);\n border-radius: 16px;\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n"])));
|
|
15552
15570
|
var SignatureButtonsContainer = styled__default['default'].div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"], ["\n flex-grow: 0;\n padding-top: 12px;\n display: flex;\n z-index: 1000;\n position: relative;\n"])));
|
|
15553
15571
|
var SignaturePaperBacking = styled__default['default'].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"], ["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #e5e5f7;\n opacity: 0.8;\n background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px),\n radial-gradient(#444cf7 0.5px, #e5e5f7 0.5px);\n background-size: 20px 20px;\n background-position: 0 0, 10px 10px;\n"])));
|
|
15554
|
-
var templateObject_1
|
|
15555
|
-
|
|
15556
|
-
var GuidanceMessageContainer = styled__default['default'].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
15557
|
-
var $top = _a.$top;
|
|
15558
|
-
return $top !== null && $top !== void 0 ? $top : '10vh';
|
|
15559
|
-
});
|
|
15560
|
-
var GuidanceMessage = styled__default['default'].div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"], ["\n margin-left: auto;\n margin-right: auto;\n background: #ccc;\n padding: 10px 12px 8px;\n border-radius: 8px;\n"])));
|
|
15561
|
-
var templateObject_1, templateObject_2;
|
|
15572
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
15562
15573
|
|
|
15563
15574
|
var SignatureCapture = function SignatureCapture(_a) {
|
|
15564
15575
|
var onAccept = _a.onAccept,
|
|
@@ -16259,20 +16270,22 @@
|
|
|
16259
16270
|
onDenied = _a.onDenied,
|
|
16260
16271
|
_j = _a.assets,
|
|
16261
16272
|
assets = _j === void 0 ? {} : _j,
|
|
16262
|
-
_k = _a.
|
|
16263
|
-
|
|
16264
|
-
_l = _a.
|
|
16265
|
-
|
|
16266
|
-
_m = _a.
|
|
16267
|
-
|
|
16268
|
-
_o = _a.
|
|
16269
|
-
|
|
16270
|
-
_p = _a.
|
|
16271
|
-
|
|
16272
|
-
_q = _a.
|
|
16273
|
-
|
|
16274
|
-
_r = _a.
|
|
16275
|
-
|
|
16273
|
+
_k = _a.colors,
|
|
16274
|
+
colors = _k === void 0 ? {} : _k,
|
|
16275
|
+
_l = _a.verbiage,
|
|
16276
|
+
verbiage = _l === void 0 ? {} : _l,
|
|
16277
|
+
_m = _a.captureSignature,
|
|
16278
|
+
captureSignature = _m === void 0 ? false : _m,
|
|
16279
|
+
_o = _a.captureSignatureVideo,
|
|
16280
|
+
captureSignatureVideo = _o === void 0 ? false : _o,
|
|
16281
|
+
_p = _a.captureAdditionalDocuments,
|
|
16282
|
+
captureAdditionalDocuments = _p === void 0 ? [] : _p,
|
|
16283
|
+
_q = _a.geolocationEnabled,
|
|
16284
|
+
geolocationEnabled = _q === void 0 ? true : _q,
|
|
16285
|
+
_r = _a.geolocationRequired,
|
|
16286
|
+
geolocationRequired = _r === void 0 ? false : _r,
|
|
16287
|
+
_s = _a.debugMode,
|
|
16288
|
+
debugMode = _s === void 0 ? false : _s;
|
|
16276
16289
|
useLanguage(lang);
|
|
16277
16290
|
var idCaptureProps = React.useMemo(function () {
|
|
16278
16291
|
return {
|
|
@@ -16284,10 +16297,11 @@
|
|
|
16284
16297
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
16285
16298
|
barcodeScanningEnabled: false,
|
|
16286
16299
|
assets: assets,
|
|
16300
|
+
colors: colors,
|
|
16287
16301
|
verbiage: verbiage,
|
|
16288
16302
|
debugMode: debugMode
|
|
16289
16303
|
};
|
|
16290
|
-
}, [assets, debugMode, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, verbiage]);
|
|
16304
|
+
}, [assets, colors, debugMode, idAutoCaptureEnabled, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold, verbiage]);
|
|
16291
16305
|
var signatureCaptureProps = React.useMemo(function () {
|
|
16292
16306
|
return {
|
|
16293
16307
|
verbiage: {
|
|
@@ -16362,6 +16376,7 @@
|
|
|
16362
16376
|
onDenied = _a.onDenied,
|
|
16363
16377
|
onExitAfterFailure = _a.onExitAfterFailure,
|
|
16364
16378
|
assets = _a.assets,
|
|
16379
|
+
colors = _a.colors,
|
|
16365
16380
|
verbiage = _a.verbiage,
|
|
16366
16381
|
_e = _a.geolocationEnabled,
|
|
16367
16382
|
geolocationEnabled = _e === void 0 ? true : _e,
|
|
@@ -16378,10 +16393,11 @@
|
|
|
16378
16393
|
onTimeout: onDenied,
|
|
16379
16394
|
onExitAfterFailure: onExitAfterFailure,
|
|
16380
16395
|
assets: assets,
|
|
16396
|
+
colors: colors,
|
|
16381
16397
|
verbiage: verbiage,
|
|
16382
16398
|
debugMode: debugMode
|
|
16383
16399
|
};
|
|
16384
|
-
}, [assets, debugMode, onApproved, onComplete, onDenied, onExitAfterFailure, timeoutDurationMs, verbiage]);
|
|
16400
|
+
}, [assets, colors, debugMode, onApproved, onComplete, onDenied, onExitAfterFailure, timeoutDurationMs, verbiage]);
|
|
16385
16401
|
return /*#__PURE__*/React__default['default'].createElement(SubmissionProvider, {
|
|
16386
16402
|
action: SubmissionAction.NONE,
|
|
16387
16403
|
environment: submissionEnvironment,
|
|
@@ -16431,10 +16447,12 @@
|
|
|
16431
16447
|
_j = _a.passportFocusScoreThreshold,
|
|
16432
16448
|
passportFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
|
|
16433
16449
|
idCaptureAssets = _a.idCaptureAssets,
|
|
16450
|
+
idCaptureColors = _a.idCaptureColors,
|
|
16434
16451
|
idCaptureVerbiage = _a.idCaptureVerbiage,
|
|
16435
16452
|
_k = _a.faceLivenessTimeoutDurationMs,
|
|
16436
16453
|
faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
|
|
16437
16454
|
faceLivenessAssets = _a.faceLivenessAssets,
|
|
16455
|
+
faceLivenessColors = _a.faceLivenessColors,
|
|
16438
16456
|
faceLivenessVerbiage = _a.faceLivenessVerbiage,
|
|
16439
16457
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
16440
16458
|
onComplete = _a.onComplete,
|
|
@@ -16457,6 +16475,7 @@
|
|
|
16457
16475
|
var idCaptureProps = React.useMemo(function () {
|
|
16458
16476
|
return {
|
|
16459
16477
|
assets: idCaptureAssets,
|
|
16478
|
+
colors: idCaptureColors,
|
|
16460
16479
|
verbiage: idCaptureVerbiage,
|
|
16461
16480
|
autoCaptureEnabled: idAutoCaptureEnabled,
|
|
16462
16481
|
idCardAutoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
|
|
@@ -16466,17 +16485,18 @@
|
|
|
16466
16485
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
16467
16486
|
debugMode: debugMode
|
|
16468
16487
|
};
|
|
16469
|
-
}, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
|
|
16488
|
+
}, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureColors, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
|
|
16470
16489
|
var faceLivenessProps = React.useMemo(function () {
|
|
16471
16490
|
return {
|
|
16472
16491
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
16473
16492
|
onTimeout: onDenied,
|
|
16474
16493
|
onExitAfterFailure: onExitAfterFailure,
|
|
16475
16494
|
assets: faceLivenessAssets,
|
|
16495
|
+
colors: faceLivenessColors,
|
|
16476
16496
|
verbiage: faceLivenessVerbiage,
|
|
16477
16497
|
debugMode: debugMode
|
|
16478
16498
|
};
|
|
16479
|
-
}, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied, onExitAfterFailure]);
|
|
16499
|
+
}, [debugMode, faceLivenessAssets, faceLivenessColors, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onDenied, onExitAfterFailure]);
|
|
16480
16500
|
var signatureCaptureProps = React.useMemo(function () {
|
|
16481
16501
|
return {
|
|
16482
16502
|
verbiage: {
|
|
@@ -16564,10 +16584,12 @@
|
|
|
16564
16584
|
_j = _a.passportFocusScoreThreshold,
|
|
16565
16585
|
passportFocusScoreThreshold = _j === void 0 ? 0.3 : _j,
|
|
16566
16586
|
idCaptureAssets = _a.idCaptureAssets,
|
|
16587
|
+
idCaptureColors = _a.idCaptureColors,
|
|
16567
16588
|
idCaptureVerbiage = _a.idCaptureVerbiage,
|
|
16568
16589
|
_k = _a.faceLivenessTimeoutDurationMs,
|
|
16569
16590
|
faceLivenessTimeoutDurationMs = _k === void 0 ? 15000 : _k,
|
|
16570
16591
|
faceLivenessAssets = _a.faceLivenessAssets,
|
|
16592
|
+
faceLivenessColors = _a.faceLivenessColors,
|
|
16571
16593
|
faceLivenessVerbiage = _a.faceLivenessVerbiage,
|
|
16572
16594
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
16573
16595
|
onComplete = _a.onComplete,
|
|
@@ -16590,6 +16612,7 @@
|
|
|
16590
16612
|
var idCaptureProps = React.useMemo(function () {
|
|
16591
16613
|
return {
|
|
16592
16614
|
assets: idCaptureAssets,
|
|
16615
|
+
colors: idCaptureColors,
|
|
16593
16616
|
verbiage: idCaptureVerbiage,
|
|
16594
16617
|
autoCaptureEnabled: idAutoCaptureEnabled,
|
|
16595
16618
|
idCardAutoCaptureScoreThreshold: idCardAutoCaptureScoreThreshold,
|
|
@@ -16599,16 +16622,17 @@
|
|
|
16599
16622
|
passportFocusScoreThreshold: passportFocusScoreThreshold,
|
|
16600
16623
|
debugMode: debugMode
|
|
16601
16624
|
};
|
|
16602
|
-
}, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
|
|
16625
|
+
}, [debugMode, idAutoCaptureEnabled, idCaptureAssets, idCaptureColors, idCaptureVerbiage, idCardAutoCaptureScoreThreshold, idCardFocusScoreThreshold, mrzDetectionScoreThreshold, passportAutoCaptureScoreThreshold, passportFocusScoreThreshold]);
|
|
16603
16626
|
var faceLivenessProps = React.useMemo(function () {
|
|
16604
16627
|
return {
|
|
16605
16628
|
onExitAfterFailure: onExitAfterFailure,
|
|
16606
16629
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
16607
16630
|
assets: faceLivenessAssets,
|
|
16631
|
+
colors: faceLivenessColors,
|
|
16608
16632
|
verbiage: faceLivenessVerbiage,
|
|
16609
16633
|
debugMode: debugMode
|
|
16610
16634
|
};
|
|
16611
|
-
}, [debugMode, faceLivenessAssets, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onExitAfterFailure]);
|
|
16635
|
+
}, [debugMode, faceLivenessAssets, faceLivenessColors, faceLivenessTimeoutDurationMs, faceLivenessVerbiage, onExitAfterFailure]);
|
|
16612
16636
|
var signatureCaptureProps = React.useMemo(function () {
|
|
16613
16637
|
return {
|
|
16614
16638
|
verbiage: {
|
|
@@ -16741,20 +16765,22 @@
|
|
|
16741
16765
|
onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
|
|
16742
16766
|
onExit = _a.onExit,
|
|
16743
16767
|
captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
|
|
16744
|
-
_b = _a.
|
|
16745
|
-
|
|
16746
|
-
_c = _a.
|
|
16747
|
-
|
|
16748
|
-
|
|
16749
|
-
|
|
16750
|
-
|
|
16768
|
+
_b = _a.colors,
|
|
16769
|
+
colors = _b === void 0 ? {} : _b,
|
|
16770
|
+
_c = _a.verbiage,
|
|
16771
|
+
verbiage = _c === void 0 ? {} : _c,
|
|
16772
|
+
_d = _a.debugMode,
|
|
16773
|
+
debugMode = _d === void 0 ? false : _d;
|
|
16774
|
+
var _e = React.useReducer(reducer$1, initialState$1),
|
|
16775
|
+
state = _e[0],
|
|
16776
|
+
dispatch = _e[1];
|
|
16751
16777
|
var frame = state.frame,
|
|
16752
16778
|
face = state.face;
|
|
16753
|
-
var
|
|
16754
|
-
submit =
|
|
16755
|
-
submissionResponse =
|
|
16756
|
-
selfieImage =
|
|
16757
|
-
setSelfieImage =
|
|
16779
|
+
var _f = React.useContext(SubmissionContext),
|
|
16780
|
+
submit = _f.submit,
|
|
16781
|
+
submissionResponse = _f.submissionResponse,
|
|
16782
|
+
selfieImage = _f.selfieImage,
|
|
16783
|
+
setSelfieImage = _f.setSelfieImage;
|
|
16758
16784
|
var onSelfieCaptured = React.useCallback(function (frame, face) {
|
|
16759
16785
|
dispatch({
|
|
16760
16786
|
type: 'verificationReady',
|
|
@@ -16827,6 +16853,7 @@
|
|
|
16827
16853
|
onTimeout: onCaptureGuidanceTimeout,
|
|
16828
16854
|
onExit: onExit,
|
|
16829
16855
|
timeoutDurationMs: captureGuidanceTimeoutDurationMs,
|
|
16856
|
+
colors: colors,
|
|
16830
16857
|
verbiage: verbiage,
|
|
16831
16858
|
debugMode: debugMode
|
|
16832
16859
|
});
|
|
@@ -16937,17 +16964,19 @@
|
|
|
16937
16964
|
captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
|
|
16938
16965
|
_b = _a.assets,
|
|
16939
16966
|
assets = _b === void 0 ? {} : _b,
|
|
16940
|
-
_c = _a.
|
|
16941
|
-
|
|
16942
|
-
_d = _a.
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16967
|
+
_c = _a.colors,
|
|
16968
|
+
colors = _c === void 0 ? {} : _c,
|
|
16969
|
+
_d = _a.verbiage,
|
|
16970
|
+
verbiage = _d === void 0 ? {} : _d,
|
|
16971
|
+
_e = _a.debugMode,
|
|
16972
|
+
debugMode = _e === void 0 ? false : _e;
|
|
16973
|
+
var _f = React.useContext(SubmissionContext),
|
|
16974
|
+
submissionResponse = _f.submissionResponse,
|
|
16975
|
+
selfieImage = _f.selfieImage;
|
|
16947
16976
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
16948
|
-
var
|
|
16949
|
-
captureState =
|
|
16950
|
-
setCaptureState =
|
|
16977
|
+
var _g = React.useState('LOADING'),
|
|
16978
|
+
captureState = _g[0],
|
|
16979
|
+
setCaptureState = _g[1];
|
|
16951
16980
|
var onCustomerMatchedCallback = React.useCallback(function (response) {
|
|
16952
16981
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
16953
16982
|
return __generator(this, function (_a) {
|
|
@@ -16979,9 +17008,9 @@
|
|
|
16979
17008
|
onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
|
|
16980
17009
|
}, 0);
|
|
16981
17010
|
}, [onCaptureGuidanceTimeout, releaseCameraAccess]);
|
|
16982
|
-
var
|
|
16983
|
-
attempt =
|
|
16984
|
-
setAttempt =
|
|
17011
|
+
var _h = React.useState(0),
|
|
17012
|
+
attempt = _h[0],
|
|
17013
|
+
setAttempt = _h[1];
|
|
16985
17014
|
var onExitCallback = React.useCallback(function () {
|
|
16986
17015
|
setAttempt(function (n) {
|
|
16987
17016
|
return n + 1;
|
|
@@ -16997,6 +17026,7 @@
|
|
|
16997
17026
|
onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
|
|
16998
17027
|
onExit: onExitCallback,
|
|
16999
17028
|
captureGuidanceTimeoutDurationMs: captureGuidanceTimeoutDurationMs,
|
|
17029
|
+
colors: colors,
|
|
17000
17030
|
verbiage: verbiage,
|
|
17001
17031
|
debugMode: debugMode
|
|
17002
17032
|
});
|
|
@@ -17055,6 +17085,7 @@
|
|
|
17055
17085
|
_d = _a.timeoutDurationMs,
|
|
17056
17086
|
timeoutDurationMs = _d === void 0 ? 15000 : _d,
|
|
17057
17087
|
assets = _a.assets,
|
|
17088
|
+
colors = _a.colors,
|
|
17058
17089
|
verbiage = _a.verbiage,
|
|
17059
17090
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
17060
17091
|
onComplete = _a.onComplete,
|
|
@@ -17090,6 +17121,7 @@
|
|
|
17090
17121
|
onExitAfterFailure: onExitAfterFailure,
|
|
17091
17122
|
captureGuidanceTimeoutDurationMs: timeoutDurationMs,
|
|
17092
17123
|
assets: assets,
|
|
17124
|
+
colors: colors,
|
|
17093
17125
|
verbiage: verbiage,
|
|
17094
17126
|
debugMode: debugMode
|
|
17095
17127
|
}))));
|
|
@@ -17168,18 +17200,20 @@
|
|
|
17168
17200
|
onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
|
|
17169
17201
|
onExit = _a.onExit,
|
|
17170
17202
|
captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
|
|
17171
|
-
_b = _a.
|
|
17172
|
-
|
|
17173
|
-
_c = _a.
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
|
|
17177
|
-
|
|
17178
|
-
|
|
17179
|
-
|
|
17180
|
-
|
|
17181
|
-
|
|
17182
|
-
|
|
17203
|
+
_b = _a.colors,
|
|
17204
|
+
colors = _b === void 0 ? {} : _b,
|
|
17205
|
+
_c = _a.verbiage,
|
|
17206
|
+
verbiage = _c === void 0 ? {} : _c,
|
|
17207
|
+
_d = _a.debugMode,
|
|
17208
|
+
debugMode = _d === void 0 ? false : _d;
|
|
17209
|
+
var _e = React.useReducer(reducer, initialState),
|
|
17210
|
+
state = _e[0],
|
|
17211
|
+
dispatch = _e[1];
|
|
17212
|
+
var _f = React.useContext(SubmissionContext),
|
|
17213
|
+
submit = _f.submit,
|
|
17214
|
+
submissionResponse = _f.submissionResponse,
|
|
17215
|
+
selfieImage = _f.selfieImage,
|
|
17216
|
+
setSelfieImage = _f.setSelfieImage;
|
|
17183
17217
|
var onSelfieCaptured = React.useCallback(function (frame, face) {
|
|
17184
17218
|
dispatch({
|
|
17185
17219
|
type: 'identificationReady',
|
|
@@ -17254,6 +17288,7 @@
|
|
|
17254
17288
|
onTimeout: onCaptureGuidanceTimeout,
|
|
17255
17289
|
onExit: onExit,
|
|
17256
17290
|
timeoutDurationMs: captureGuidanceTimeoutDurationMs,
|
|
17291
|
+
colors: colors,
|
|
17257
17292
|
verbiage: verbiage,
|
|
17258
17293
|
debugMode: debugMode
|
|
17259
17294
|
});
|
|
@@ -17364,17 +17399,19 @@
|
|
|
17364
17399
|
captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
|
|
17365
17400
|
_b = _a.assets,
|
|
17366
17401
|
assets = _b === void 0 ? {} : _b,
|
|
17367
|
-
_c = _a.
|
|
17368
|
-
|
|
17369
|
-
_d = _a.
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17402
|
+
_c = _a.colors,
|
|
17403
|
+
colors = _c === void 0 ? {} : _c,
|
|
17404
|
+
_d = _a.verbiage,
|
|
17405
|
+
verbiage = _d === void 0 ? {} : _d,
|
|
17406
|
+
_e = _a.debugMode,
|
|
17407
|
+
debugMode = _e === void 0 ? false : _e;
|
|
17408
|
+
var _f = React.useContext(SubmissionContext),
|
|
17409
|
+
submissionResponse = _f.submissionResponse,
|
|
17410
|
+
selfieImage = _f.selfieImage;
|
|
17374
17411
|
var releaseCameraAccess = React.useContext(CameraStateContext).releaseCameraAccess;
|
|
17375
|
-
var
|
|
17376
|
-
captureState =
|
|
17377
|
-
setCaptureState =
|
|
17412
|
+
var _g = React.useState('LOADING'),
|
|
17413
|
+
captureState = _g[0],
|
|
17414
|
+
setCaptureState = _g[1];
|
|
17378
17415
|
var onCustomerMatchedCallback = React.useCallback(function (response) {
|
|
17379
17416
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
17380
17417
|
return __generator(this, function (_a) {
|
|
@@ -17406,9 +17443,9 @@
|
|
|
17406
17443
|
onCaptureGuidanceTimeout === null || onCaptureGuidanceTimeout === void 0 ? void 0 : onCaptureGuidanceTimeout();
|
|
17407
17444
|
}, 0);
|
|
17408
17445
|
}, [onCaptureGuidanceTimeout, releaseCameraAccess]);
|
|
17409
|
-
var
|
|
17410
|
-
attempt =
|
|
17411
|
-
setAttempt =
|
|
17446
|
+
var _h = React.useState(0),
|
|
17447
|
+
attempt = _h[0],
|
|
17448
|
+
setAttempt = _h[1];
|
|
17412
17449
|
var onExitCallback = React.useCallback(function () {
|
|
17413
17450
|
setAttempt(function (n) {
|
|
17414
17451
|
return n + 1;
|
|
@@ -17424,6 +17461,7 @@
|
|
|
17424
17461
|
onCaptureGuidanceTimeout: onCaptureGuidanceTimeoutCallback,
|
|
17425
17462
|
onExit: onExitCallback,
|
|
17426
17463
|
captureGuidanceTimeoutDurationMs: captureGuidanceTimeoutDurationMs,
|
|
17464
|
+
colors: colors,
|
|
17427
17465
|
verbiage: verbiage,
|
|
17428
17466
|
debugMode: debugMode
|
|
17429
17467
|
});
|
|
@@ -17488,6 +17526,7 @@
|
|
|
17488
17526
|
onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
|
|
17489
17527
|
onExitAfterFailure = _a.onExitAfterFailure,
|
|
17490
17528
|
assets = _a.assets,
|
|
17529
|
+
colors = _a.colors,
|
|
17491
17530
|
verbiage = _a.verbiage,
|
|
17492
17531
|
geolocationEnabled = _a.geolocationEnabled,
|
|
17493
17532
|
_e = _a.geolocationRequired,
|
|
@@ -17517,6 +17556,7 @@
|
|
|
17517
17556
|
onCaptureGuidanceTimeout: onCaptureGuidanceTimeout,
|
|
17518
17557
|
captureGuidanceTimeoutDurationMs: timeoutDurationMs,
|
|
17519
17558
|
assets: assets,
|
|
17559
|
+
colors: colors,
|
|
17520
17560
|
verbiage: verbiage,
|
|
17521
17561
|
debugMode: debugMode
|
|
17522
17562
|
}))));
|
|
@@ -17574,6 +17614,7 @@
|
|
|
17574
17614
|
_d = _a.timeoutDurationMs,
|
|
17575
17615
|
timeoutDurationMs = _d === void 0 ? 15000 : _d,
|
|
17576
17616
|
assets = _a.assets,
|
|
17617
|
+
colors = _a.colors,
|
|
17577
17618
|
verbiage = _a.verbiage,
|
|
17578
17619
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
17579
17620
|
onComplete = _a.onComplete,
|
|
@@ -17598,10 +17639,11 @@
|
|
|
17598
17639
|
onExitAfterFailure: onExitAfterFailure,
|
|
17599
17640
|
timeoutDurationMs: timeoutDurationMs,
|
|
17600
17641
|
assets: assets,
|
|
17642
|
+
colors: colors,
|
|
17601
17643
|
verbiage: verbiage,
|
|
17602
17644
|
debugMode: debugMode
|
|
17603
17645
|
};
|
|
17604
|
-
}, [assets, debugMode, onExitAfterFailure, timeoutDurationMs, verbiage]);
|
|
17646
|
+
}, [assets, colors, debugMode, onExitAfterFailure, timeoutDurationMs, verbiage]);
|
|
17605
17647
|
var signatureCaptureProps = React.useMemo(function () {
|
|
17606
17648
|
return {
|
|
17607
17649
|
verbiage: {
|