idmission-web-sdk 2.6.3-changeset-release-develop-c045c91 → 2.6.3-changeset-release-develop-124a427
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/index.d.ts +1 -1
- package/dist/props.json +1 -1
- package/dist/sdk2.cjs.development.js +499 -214
- 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 +499 -214
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +515 -230
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
// Extracted from the barrel so modules inside this package can read the
|
|
27
27
|
// version without importing index.ts (which would be circular).
|
|
28
|
-
var webSdkUiVersion = '0.
|
|
28
|
+
var webSdkUiVersion = '0.6.0';
|
|
29
29
|
|
|
30
30
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
31
31
|
try {
|
|
@@ -453,17 +453,17 @@
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
function _arrayLikeToArray$
|
|
456
|
+
function _arrayLikeToArray$C(r, a) {
|
|
457
457
|
(null == a || a > r.length) && (a = r.length);
|
|
458
458
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
459
459
|
return n;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
function _unsupportedIterableToArray$
|
|
462
|
+
function _unsupportedIterableToArray$C(r, a) {
|
|
463
463
|
if (r) {
|
|
464
|
-
if ("string" == typeof r) return _arrayLikeToArray$
|
|
464
|
+
if ("string" == typeof r) return _arrayLikeToArray$C(r, a);
|
|
465
465
|
var t = {}.toString.call(r).slice(8, -1);
|
|
466
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$
|
|
466
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$C(r, a) : void 0;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -472,11 +472,11 @@
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
function _slicedToArray$1(r, e) {
|
|
475
|
-
return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$
|
|
475
|
+
return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$C(r, e) || _nonIterableRest$1();
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
function _arrayWithoutHoles(r) {
|
|
479
|
-
if (Array.isArray(r)) return _arrayLikeToArray$
|
|
479
|
+
if (Array.isArray(r)) return _arrayLikeToArray$C(r);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
function _iterableToArray(r) {
|
|
@@ -488,10 +488,10 @@
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
function _toConsumableArray(r) {
|
|
491
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
491
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$C(r) || _nonIterableSpread();
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
var webSdkCoreVersion = '0.
|
|
494
|
+
var webSdkCoreVersion = '0.6.0';
|
|
495
495
|
|
|
496
496
|
var maxTime = 86400000;
|
|
497
497
|
var maxCount = 1000000;
|
|
@@ -1263,9 +1263,9 @@
|
|
|
1263
1263
|
({
|
|
1264
1264
|
workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
|
|
1265
1265
|
|
|
1266
|
-
function _createForOfIteratorHelperLoose$
|
|
1267
|
-
function _unsupportedIterableToArray$
|
|
1268
|
-
function _arrayLikeToArray$
|
|
1266
|
+
function _createForOfIteratorHelperLoose$A(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$B(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1267
|
+
function _unsupportedIterableToArray$B(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$B(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$B(r, a) : void 0; } }
|
|
1268
|
+
function _arrayLikeToArray$B(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1269
1269
|
var maximumBytes = 32 * 1024;
|
|
1270
1270
|
var maximumTime = 86400000;
|
|
1271
1271
|
var uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -1333,7 +1333,7 @@
|
|
|
1333
1333
|
unique(report.phaseTotals.map(function (total) {
|
|
1334
1334
|
return total.phase;
|
|
1335
1335
|
}));
|
|
1336
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1336
|
+
for (var _iterator = _createForOfIteratorHelperLoose$A(report.phaseTotals), _step; !(_step = _iterator()).done;) {
|
|
1337
1337
|
var _total4 = _step.value;
|
|
1338
1338
|
requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
|
|
1339
1339
|
durationValid(_total4.duration);
|
|
@@ -1355,7 +1355,7 @@
|
|
|
1355
1355
|
requireValid(report.recentTransitions.length <= 32);
|
|
1356
1356
|
var index = 0;
|
|
1357
1357
|
var atMs = 0;
|
|
1358
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1358
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$A(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
|
|
1359
1359
|
var transition = _step2.value;
|
|
1360
1360
|
requireValid(member(transitionKinds, transition.kind));
|
|
1361
1361
|
requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
|
|
@@ -1379,12 +1379,12 @@
|
|
|
1379
1379
|
unique(report.controllerGuidanceTotals.map(function (total) {
|
|
1380
1380
|
return JSON.stringify([total.phase, total.guidance]);
|
|
1381
1381
|
}));
|
|
1382
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1382
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$A(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
|
|
1383
1383
|
var _total2 = _step3.value;
|
|
1384
1384
|
durationValid(_total2.duration);
|
|
1385
1385
|
exposureValid(_total2.phase, _total2.exposure);
|
|
1386
1386
|
}
|
|
1387
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1387
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$A(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
|
|
1388
1388
|
var _total3 = _step4.value;
|
|
1389
1389
|
durationValid(_total3.duration);
|
|
1390
1390
|
guidanceValid(_total3.phase, _total3.guidance, false);
|
|
@@ -1418,7 +1418,7 @@
|
|
|
1418
1418
|
requireValid(batch.schemaVersion === 1 && batch.sdkVersion.length > 0 && batch.sdkVersion.length <= 32 && batch.sessionId.length > 0 && uuidPattern.test(batch.producerId) && integer(batch.sentAtUnixMs, Number.MAX_SAFE_INTEGER));
|
|
1419
1419
|
var reports = [];
|
|
1420
1420
|
var dropped = [];
|
|
1421
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1421
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$A(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
|
|
1422
1422
|
var report = _step5.value;
|
|
1423
1423
|
try {
|
|
1424
1424
|
validateSnapshot(report);
|
|
@@ -1447,9 +1447,9 @@
|
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
1449
|
|
|
1450
|
-
function _createForOfIteratorHelperLoose$
|
|
1451
|
-
function _unsupportedIterableToArray$
|
|
1452
|
-
function _arrayLikeToArray$
|
|
1450
|
+
function _createForOfIteratorHelperLoose$z(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$A(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1451
|
+
function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$A(r, a) : void 0; } }
|
|
1452
|
+
function _arrayLikeToArray$A(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1453
1453
|
/** Visible time without progress in a capture phase that arms a stream. */
|
|
1454
1454
|
var stallMs = 20000;
|
|
1455
1455
|
var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
var due = new Map();
|
|
1513
1513
|
var eligibilityRetries = new Map();
|
|
1514
1514
|
function dropped(report) {
|
|
1515
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1515
|
+
for (var _iterator = _createForOfIteratorHelperLoose$z(streams), _step; !(_step = _iterator()).done;) {
|
|
1516
1516
|
var stream = _step.value;
|
|
1517
1517
|
if (stream.state.report.streamId === report.streamId) stream.state = _extends$1({}, stream.state, {
|
|
1518
1518
|
report: _extends$1({}, stream.state.report, {
|
|
@@ -1557,7 +1557,7 @@
|
|
|
1557
1557
|
var retained = new Set(queued.map(function (report) {
|
|
1558
1558
|
return report.sequence;
|
|
1559
1559
|
}));
|
|
1560
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1560
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$z(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
|
|
1561
1561
|
var _sequence = _step2.value;
|
|
1562
1562
|
if (!retained.has(_sequence)) due["delete"](_sequence);
|
|
1563
1563
|
}
|
|
@@ -1570,7 +1570,7 @@
|
|
|
1570
1570
|
var keys = new Set(reports.map(function (report) {
|
|
1571
1571
|
return report.sequence;
|
|
1572
1572
|
}));
|
|
1573
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1573
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$z(pending), _step3; !(_step3 = _iterator3()).done;) {
|
|
1574
1574
|
var _step3$value = _slicedToArray$1(_step3.value, 2),
|
|
1575
1575
|
key = _step3$value[0],
|
|
1576
1576
|
report = _step3$value[1];
|
|
@@ -1594,14 +1594,14 @@
|
|
|
1594
1594
|
if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
|
|
1595
1595
|
return report.context === context;
|
|
1596
1596
|
})) emergency = null;
|
|
1597
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1597
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$z(pending), _step4; !(_step4 = _iterator4()).done;) {
|
|
1598
1598
|
var _step4$value = _slicedToArray$1(_step4.value, 2),
|
|
1599
1599
|
key = _step4$value[0],
|
|
1600
1600
|
report = _step4$value[1];
|
|
1601
1601
|
if (report.context === context) pending["delete"](key);
|
|
1602
1602
|
}
|
|
1603
1603
|
for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
|
|
1604
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1604
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$z(streams), _step5; !(_step5 = _iterator5()).done;) {
|
|
1605
1605
|
var stream = _step5.value;
|
|
1606
1606
|
if (stream.state.report.context === context) {
|
|
1607
1607
|
stream.disposed = true;
|
|
@@ -1630,7 +1630,7 @@
|
|
|
1630
1630
|
unsubscribe();
|
|
1631
1631
|
cancelTimer == null || cancelTimer();
|
|
1632
1632
|
cancelRequest == null || cancelRequest();
|
|
1633
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
1633
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$z(streams), _step6; !(_step6 = _iterator6()).done;) {
|
|
1634
1634
|
var stream = _step6.value;
|
|
1635
1635
|
stream.disposed = true;
|
|
1636
1636
|
}
|
|
@@ -1652,7 +1652,7 @@
|
|
|
1652
1652
|
sentAtUnixMs: Math.floor(deps.unixMs()),
|
|
1653
1653
|
reports: reports
|
|
1654
1654
|
});
|
|
1655
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
1655
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$z(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
|
|
1656
1656
|
var report = _step7.value;
|
|
1657
1657
|
dropped(report);
|
|
1658
1658
|
removeReports([report]);
|
|
@@ -1834,14 +1834,14 @@
|
|
|
1834
1834
|
retries = 0;
|
|
1835
1835
|
failureStreak = 0;
|
|
1836
1836
|
} else if (result.kind === "permanent") {
|
|
1837
|
-
for (_iterator11 = _createForOfIteratorHelperLoose$
|
|
1837
|
+
for (_iterator11 = _createForOfIteratorHelperLoose$z(sending.reports); !(_step11 = _iterator11()).done;) {
|
|
1838
1838
|
report = _step11.value;
|
|
1839
1839
|
disable(report.context);
|
|
1840
1840
|
}
|
|
1841
1841
|
} else {
|
|
1842
1842
|
backoff(result);
|
|
1843
1843
|
if (++retries > 3) {
|
|
1844
|
-
for (_iterator12 = _createForOfIteratorHelperLoose$
|
|
1844
|
+
for (_iterator12 = _createForOfIteratorHelperLoose$z(sending.reports); !(_step12 = _iterator12()).done;) {
|
|
1845
1845
|
_report = _step12.value;
|
|
1846
1846
|
dropped(_report);
|
|
1847
1847
|
}
|
|
@@ -1869,7 +1869,7 @@
|
|
|
1869
1869
|
backoff({});
|
|
1870
1870
|
if (authorizing) failedEligibility(authorizing);
|
|
1871
1871
|
if (frozen && ++retries > 3) {
|
|
1872
|
-
for (_iterator13 = _createForOfIteratorHelperLoose$
|
|
1872
|
+
for (_iterator13 = _createForOfIteratorHelperLoose$z(frozen.reports); !(_step13 = _iterator13()).done;) {
|
|
1873
1873
|
_report2 = _step13.value;
|
|
1874
1874
|
dropped(_report2);
|
|
1875
1875
|
}
|
|
@@ -1924,7 +1924,7 @@
|
|
|
1924
1924
|
if (outcome.kind === "committed") {
|
|
1925
1925
|
if (emergency === sending) emergency = null;
|
|
1926
1926
|
} else if (outcome.kind === "permanent") {
|
|
1927
|
-
for (var _iterator8 = _createForOfIteratorHelperLoose$
|
|
1927
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose$z(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
1928
1928
|
var report = _step8.value;
|
|
1929
1929
|
disable(report.context);
|
|
1930
1930
|
}
|
|
@@ -1993,7 +1993,7 @@
|
|
|
1993
1993
|
}
|
|
1994
1994
|
function tick() {
|
|
1995
1995
|
if (disposed || visibility === "hidden") return;
|
|
1996
|
-
for (var _iterator9 = _createForOfIteratorHelperLoose$
|
|
1996
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose$z(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
1997
1997
|
var stream = _step9.value;
|
|
1998
1998
|
var report = prepareDeadline(stream);
|
|
1999
1999
|
if (!(report != null && report.current)) continue;
|
|
@@ -2024,7 +2024,7 @@
|
|
|
2024
2024
|
if (disposed || visibility === "hidden") return;
|
|
2025
2025
|
var delay = Infinity;
|
|
2026
2026
|
if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
|
|
2027
|
-
for (var _iterator0 = _createForOfIteratorHelperLoose$
|
|
2027
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose$z(streams), _step0; !(_step0 = _iterator0()).done;) {
|
|
2028
2028
|
var stream = _step0.value;
|
|
2029
2029
|
var report = prepareDeadline(stream);
|
|
2030
2030
|
if (!(report != null && report.current)) continue;
|
|
@@ -2121,7 +2121,7 @@
|
|
|
2121
2121
|
return guard$2(function () {
|
|
2122
2122
|
if (disposed || next === visibility) return;
|
|
2123
2123
|
visibility = next;
|
|
2124
|
-
for (var _iterator1 = _createForOfIteratorHelperLoose$
|
|
2124
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose$z(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2125
2125
|
var stream = _step1.value;
|
|
2126
2126
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2127
2127
|
armIfStalled(stream);
|
|
@@ -2163,7 +2163,7 @@
|
|
|
2163
2163
|
if (taskDisposed) return;
|
|
2164
2164
|
taskDisposed = true;
|
|
2165
2165
|
if (workflowStream) close(workflowStream, "disposed");
|
|
2166
|
-
for (var _iterator10 = _createForOfIteratorHelperLoose$
|
|
2166
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose$z(captures), _step10; !(_step10 = _iterator10()).done;) {
|
|
2167
2167
|
var capture = _step10.value;
|
|
2168
2168
|
capture.dispose();
|
|
2169
2169
|
}
|
|
@@ -3596,9 +3596,9 @@
|
|
|
3596
3596
|
});
|
|
3597
3597
|
}
|
|
3598
3598
|
|
|
3599
|
-
function _createForOfIteratorHelperLoose$
|
|
3600
|
-
function _unsupportedIterableToArray$
|
|
3601
|
-
function _arrayLikeToArray$
|
|
3599
|
+
function _createForOfIteratorHelperLoose$y(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$z(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3600
|
+
function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$z(r, a) : void 0; } }
|
|
3601
|
+
function _arrayLikeToArray$z(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3602
3602
|
/**
|
|
3603
3603
|
* Parser for AAMVA (American Association of Motor Vehicle Administrators)
|
|
3604
3604
|
* PDF417 barcode data found on US and Canadian driver's licenses.
|
|
@@ -3860,7 +3860,7 @@
|
|
|
3860
3860
|
DAD: false
|
|
3861
3861
|
};
|
|
3862
3862
|
var daaValue = null;
|
|
3863
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
3863
|
+
for (var _iterator = _createForOfIteratorHelperLoose$y(lines), _step; !(_step = _iterator()).done;) {
|
|
3864
3864
|
var line = _step.value;
|
|
3865
3865
|
var match = line.match(fieldRegex);
|
|
3866
3866
|
if (match) {
|
|
@@ -3901,7 +3901,7 @@
|
|
|
3901
3901
|
result.fields.push(field);
|
|
3902
3902
|
}
|
|
3903
3903
|
};
|
|
3904
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
3904
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$y(daaFields), _step2; !(_step2 = _iterator2()).done;) {
|
|
3905
3905
|
_loop();
|
|
3906
3906
|
}
|
|
3907
3907
|
}
|
|
@@ -6627,6 +6627,131 @@
|
|
|
6627
6627
|
})[0];
|
|
6628
6628
|
}
|
|
6629
6629
|
|
|
6630
|
+
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
6631
|
+
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
6632
|
+
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
6633
|
+
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
6634
|
+
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
6635
|
+
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
6636
|
+
// LogLevel.X` comparisons behave identically.
|
|
6637
|
+
var noop$1 = function noop() {};
|
|
6638
|
+
var debug = function debug() {
|
|
6639
|
+
return (noop$1).apply(void 0, arguments);
|
|
6640
|
+
}; // eslint-disable-line no-console
|
|
6641
|
+
var log = function log() {
|
|
6642
|
+
return (noop$1).apply(void 0, arguments);
|
|
6643
|
+
}; // eslint-disable-line no-console
|
|
6644
|
+
var warn$1 = function warn() {
|
|
6645
|
+
return (console.warn ).apply(void 0, arguments);
|
|
6646
|
+
}; // eslint-disable-line no-console
|
|
6647
|
+
var error = function error() {
|
|
6648
|
+
return (console.error ).apply(void 0, arguments);
|
|
6649
|
+
}; // eslint-disable-line no-console
|
|
6650
|
+
|
|
6651
|
+
function _createForOfIteratorHelperLoose$x(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$y(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6652
|
+
function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$y(r, a) : void 0; } }
|
|
6653
|
+
function _arrayLikeToArray$y(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6654
|
+
/**
|
|
6655
|
+
* True unless the host bundle was built for production.
|
|
6656
|
+
*
|
|
6657
|
+
* Follows the `"development"` convention that React and mainstream
|
|
6658
|
+
* bundlers use, and that `websdk-compat`'s rollup build defines. Read inside a
|
|
6659
|
+
* `try` because unbundled ESM has no `process`; that case counts as
|
|
6660
|
+
* production, so a missing define never adds console output.
|
|
6661
|
+
*/
|
|
6662
|
+
function isDevelopment() {
|
|
6663
|
+
try {
|
|
6664
|
+
return "development" !== 'production';
|
|
6665
|
+
} catch (_unused) {
|
|
6666
|
+
return false;
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6669
|
+
/**
|
|
6670
|
+
* Plain objects and arrays are compared field by field, so an inline literal
|
|
6671
|
+
* rebuilt every render with the same values is not a change. Anything else
|
|
6672
|
+
* (class instances, DOM nodes, blobs) is compared by identity.
|
|
6673
|
+
*/
|
|
6674
|
+
function isPlainContainer(value) {
|
|
6675
|
+
if (Array.isArray(value)) return true;
|
|
6676
|
+
if (typeof value !== 'object' || value === null) return false;
|
|
6677
|
+
var prototype = Object.getPrototypeOf(value);
|
|
6678
|
+
return prototype === Object.prototype || prototype === null;
|
|
6679
|
+
}
|
|
6680
|
+
/**
|
|
6681
|
+
* Callbacks the flows wrap with `useLatestCallbacks`: a bag's own top-level
|
|
6682
|
+
* functions and those of its `liveness` sub-bag. Replacing or removing one of
|
|
6683
|
+
* these is live. Any other function (such as `io.acquireCamera`) is a
|
|
6684
|
+
* controller dependency fixed at mount, so it compares by identity.
|
|
6685
|
+
*/
|
|
6686
|
+
var LIVE_CALLBACK_PATH = /^[^.[\]]+(\.liveness)?\.[^.[\]]+$/;
|
|
6687
|
+
/**
|
|
6688
|
+
* Every leaf whose value differs between `before` and `after`.
|
|
6689
|
+
*
|
|
6690
|
+
* A live callback's new implementation, or its removal, is not reported. A
|
|
6691
|
+
* callback ADDED after mount is, because only callbacks present at mount are
|
|
6692
|
+
* wrapped. An absent field and an explicit `undefined` are the same value.
|
|
6693
|
+
*/
|
|
6694
|
+
function mountOnlyChanges(before, after, path) {
|
|
6695
|
+
if (Object.is(before, after)) return [];
|
|
6696
|
+
if (typeof before === 'function' && (typeof after === 'function' || after === undefined) && LIVE_CALLBACK_PATH.test(path)) {
|
|
6697
|
+
return [];
|
|
6698
|
+
}
|
|
6699
|
+
if (!isPlainContainer(before) || !isPlainContainer(after) || Array.isArray(before) !== Array.isArray(after)) {
|
|
6700
|
+
return [{
|
|
6701
|
+
path: path,
|
|
6702
|
+
before: before,
|
|
6703
|
+
after: after
|
|
6704
|
+
}];
|
|
6705
|
+
}
|
|
6706
|
+
var keys = new Set([].concat(_toConsumableArray(Object.keys(before)), _toConsumableArray(Object.keys(after))));
|
|
6707
|
+
return _toConsumableArray(keys).flatMap(function (key) {
|
|
6708
|
+
return mountOnlyChanges(before[key], after[key], Array.isArray(before) ? path + "[" + key + "]" : path + "." + key);
|
|
6709
|
+
});
|
|
6710
|
+
}
|
|
6711
|
+
/**
|
|
6712
|
+
* Whether a value is small and safe enough to print. Long strings are left
|
|
6713
|
+
* out: capture bags can carry image data (`precapturedDocuments`), which is
|
|
6714
|
+
* both personal data and too large to be useful in a warning.
|
|
6715
|
+
*/
|
|
6716
|
+
var isPrintable = function isPrintable(value) {
|
|
6717
|
+
return value === null || value === undefined || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string' && value.length <= 64;
|
|
6718
|
+
};
|
|
6719
|
+
var describe = function describe(value) {
|
|
6720
|
+
return typeof value === 'string' ? JSON.stringify(value) : String(value);
|
|
6721
|
+
};
|
|
6722
|
+
/**
|
|
6723
|
+
* In development builds, warns once per input path when a value in `inputs`
|
|
6724
|
+
* differs from its value at mount. Does nothing in production.
|
|
6725
|
+
*
|
|
6726
|
+
* `owner` names the component or hook in the message, and `remedy` finishes
|
|
6727
|
+
* the sentence "To change it, …". Pass only inputs that really are mount-only:
|
|
6728
|
+
* a live input passed here would warn about a change that did take effect.
|
|
6729
|
+
*/
|
|
6730
|
+
function useMountOnlyWarnings(owner, remedy, inputs) {
|
|
6731
|
+
var mounted = React.useRef(inputs);
|
|
6732
|
+
var warned = React.useRef(new Set());
|
|
6733
|
+
React.useEffect(function () {
|
|
6734
|
+
if (!isDevelopment()) return;
|
|
6735
|
+
for (var _i = 0, _Object$entries = Object.entries(inputs); _i < _Object$entries.length; _i++) {
|
|
6736
|
+
var _Object$entries$_i = _slicedToArray$1(_Object$entries[_i], 2),
|
|
6737
|
+
name = _Object$entries$_i[0],
|
|
6738
|
+
value = _Object$entries$_i[1];
|
|
6739
|
+
for (var _iterator = _createForOfIteratorHelperLoose$x(mountOnlyChanges(mounted.current[name], value, name)), _step; !(_step = _iterator()).done;) {
|
|
6740
|
+
var _step$value = _step.value,
|
|
6741
|
+
path = _step$value.path,
|
|
6742
|
+
before = _step$value.before,
|
|
6743
|
+
after = _step$value.after;
|
|
6744
|
+
if (warned.current.has(path)) continue;
|
|
6745
|
+
warned.current.add(path);
|
|
6746
|
+
var values = isPrintable(before) && isPrintable(after) ? " (" + describe(before) + " \u2192 " + describe(after) + ")" : '';
|
|
6747
|
+
warn$1("[" + owner + "] `" + path + "` changed after mount" + values + " and was ignored: " + (owner + " reads it once, at mount. To change it, " + remedy + "."));
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
});
|
|
6751
|
+
}
|
|
6752
|
+
/** The `remedy` every flow gives for a changed capture-bag field. */
|
|
6753
|
+
var FLOW_MOUNT_ONLY_REMEDY = 'remount the flow with a React `key`, or pass your own controller';
|
|
6754
|
+
|
|
6630
6755
|
var useIsomorphicLayoutEffect$1 = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
|
6631
6756
|
/**
|
|
6632
6757
|
* Uploads documents to the IDmission document service, one independent call
|
|
@@ -6959,7 +7084,7 @@
|
|
|
6959
7084
|
}
|
|
6960
7085
|
|
|
6961
7086
|
function _toArray(r) {
|
|
6962
|
-
return _arrayWithHoles$1(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
7087
|
+
return _arrayWithHoles$1(r) || _iterableToArray(r) || _unsupportedIterableToArray$C(r) || _nonIterableRest$1();
|
|
6963
7088
|
}
|
|
6964
7089
|
|
|
6965
7090
|
function _createForOfIteratorHelperLoose$w(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$w(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -9022,7 +9147,7 @@
|
|
|
9022
9147
|
}
|
|
9023
9148
|
return options;
|
|
9024
9149
|
};
|
|
9025
|
-
var noop
|
|
9150
|
+
var noop = function noop() {};
|
|
9026
9151
|
var loggerOwner;
|
|
9027
9152
|
var bindMemberFunctions = function bindMemberFunctions(inst) {
|
|
9028
9153
|
var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
|
|
@@ -9167,7 +9292,7 @@
|
|
|
9167
9292
|
});
|
|
9168
9293
|
}
|
|
9169
9294
|
this.format = this.options.interpolation.format;
|
|
9170
|
-
if (!callback) callback = noop
|
|
9295
|
+
if (!callback) callback = noop;
|
|
9171
9296
|
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
9172
9297
|
var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
9173
9298
|
if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
|
|
@@ -9214,7 +9339,7 @@
|
|
|
9214
9339
|
_proto1.loadResources = function loadResources(language, callback) {
|
|
9215
9340
|
var _this22 = this;
|
|
9216
9341
|
if (callback === void 0) {
|
|
9217
|
-
callback = noop
|
|
9342
|
+
callback = noop;
|
|
9218
9343
|
}
|
|
9219
9344
|
var usedCallback = callback;
|
|
9220
9345
|
var usedLng = isString$1(language) ? language : this.language;
|
|
@@ -9270,7 +9395,7 @@
|
|
|
9270
9395
|
});
|
|
9271
9396
|
}
|
|
9272
9397
|
if (!ns) ns = this.options.ns;
|
|
9273
|
-
if (!callback) callback = noop
|
|
9398
|
+
if (!callback) callback = noop;
|
|
9274
9399
|
this.services.backendConnector.reload(lngs, ns, function (err) {
|
|
9275
9400
|
deferred.resolve();
|
|
9276
9401
|
callback(err);
|
|
@@ -9577,7 +9702,7 @@
|
|
|
9577
9702
|
options = {};
|
|
9578
9703
|
}
|
|
9579
9704
|
if (callback === void 0) {
|
|
9580
|
-
callback = noop
|
|
9705
|
+
callback = noop;
|
|
9581
9706
|
}
|
|
9582
9707
|
var forkResourceStore = options.forkResourceStore;
|
|
9583
9708
|
if (forkResourceStore) {
|
|
@@ -9661,7 +9786,7 @@
|
|
|
9661
9786
|
instance.loadNamespaces;
|
|
9662
9787
|
instance.loadLanguages;
|
|
9663
9788
|
|
|
9664
|
-
var warn
|
|
9789
|
+
var warn = function warn(i18n, code, msg, rest) {
|
|
9665
9790
|
var _i18n$services, _i18n$services2, _console;
|
|
9666
9791
|
var args = [msg, _extends({
|
|
9667
9792
|
code: code
|
|
@@ -9682,7 +9807,7 @@
|
|
|
9682
9807
|
var warnOnce = function warnOnce(i18n, code, msg, rest) {
|
|
9683
9808
|
if (isString(msg) && alreadyWarned[msg]) return;
|
|
9684
9809
|
if (isString(msg)) alreadyWarned[msg] = new Date();
|
|
9685
|
-
warn
|
|
9810
|
+
warn(i18n, code, msg, rest);
|
|
9686
9811
|
};
|
|
9687
9812
|
var loadedClb = function loadedClb(i18n, cb) {
|
|
9688
9813
|
return function () {
|
|
@@ -12164,12 +12289,17 @@
|
|
|
12164
12289
|
* Binds one rendered SDK tree to its requested language. A fixed translator
|
|
12165
12290
|
* avoids waiting for a post-render changeLanguage() effect and keeps SSR and
|
|
12166
12291
|
* concurrently mounted SDK views independent of the shared detector instance.
|
|
12292
|
+
*
|
|
12293
|
+
* An unset `lang` keeps whatever scope encloses it (or none), so a caller can
|
|
12294
|
+
* render the provider unconditionally: toggling `lang` between unset and set
|
|
12295
|
+
* then never changes the element tree, and never remounts the subtree.
|
|
12167
12296
|
*/
|
|
12168
12297
|
function SdkLanguageProvider(_ref) {
|
|
12169
12298
|
var children = _ref.children,
|
|
12170
12299
|
lang = _ref.lang;
|
|
12300
|
+
var inherited = React.useContext(SdkLanguageContext);
|
|
12171
12301
|
return /*#__PURE__*/React.createElement(SdkLanguageContext.Provider, {
|
|
12172
|
-
value: lang === 'auto' ? detectedLanguage : lang
|
|
12302
|
+
value: lang === undefined ? inherited : lang === 'auto' ? detectedLanguage : lang
|
|
12173
12303
|
}, children);
|
|
12174
12304
|
}
|
|
12175
12305
|
/**
|
|
@@ -13238,27 +13368,6 @@
|
|
|
13238
13368
|
return false;
|
|
13239
13369
|
}
|
|
13240
13370
|
|
|
13241
|
-
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
13242
|
-
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
13243
|
-
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
13244
|
-
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
13245
|
-
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
13246
|
-
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
13247
|
-
// LogLevel.X` comparisons behave identically.
|
|
13248
|
-
var noop = function noop() {};
|
|
13249
|
-
var debug = function debug() {
|
|
13250
|
-
return (noop).apply(void 0, arguments);
|
|
13251
|
-
}; // eslint-disable-line no-console
|
|
13252
|
-
var log = function log() {
|
|
13253
|
-
return (noop).apply(void 0, arguments);
|
|
13254
|
-
}; // eslint-disable-line no-console
|
|
13255
|
-
var warn = function warn() {
|
|
13256
|
-
return (console.warn ).apply(void 0, arguments);
|
|
13257
|
-
}; // eslint-disable-line no-console
|
|
13258
|
-
var error = function error() {
|
|
13259
|
-
return (console.error ).apply(void 0, arguments);
|
|
13260
|
-
}; // eslint-disable-line no-console
|
|
13261
|
-
|
|
13262
13371
|
var _excluded$h = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
|
|
13263
13372
|
_excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
|
|
13264
13373
|
var _templateObject$U, _templateObject2$M, _templateObject3$C, _templateObject4$x, _templateObject5$r, _templateObject6$j, _templateObject7$g;
|
|
@@ -13523,7 +13632,7 @@
|
|
|
13523
13632
|
Object.values(userSuppliedImages).forEach(function (images) {
|
|
13524
13633
|
Object.values(images).forEach(function (image) {
|
|
13525
13634
|
if (image.url && (!image.width || !image.height)) {
|
|
13526
|
-
warn("The image " + 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.");
|
|
13635
|
+
warn$1("The image " + 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.");
|
|
13527
13636
|
}
|
|
13528
13637
|
});
|
|
13529
13638
|
});
|
|
@@ -25921,7 +26030,7 @@
|
|
|
25921
26030
|
// `readFile` rejects on FileReader's error/abort. Swallowing it left
|
|
25922
26031
|
// an unhandled rejection and a user staring at a screen that silently
|
|
25923
26032
|
// did nothing; the retry is simply picking the file again.
|
|
25924
|
-
warn('[websdk-ui] the selected ID image could not be read', _t);
|
|
26033
|
+
warn$1('[websdk-ui] the selected ID image could not be read', _t);
|
|
25925
26034
|
setReadFailed(true);
|
|
25926
26035
|
case 5:
|
|
25927
26036
|
_context.prev = 5;
|
|
@@ -26088,7 +26197,7 @@
|
|
|
26088
26197
|
_t2 = _context["catch"](2);
|
|
26089
26198
|
// Same reasoning as the fallback screen's: an unhandled rejection and
|
|
26090
26199
|
// a silently empty upload slot is the worst of both.
|
|
26091
|
-
warn('[websdk-ui] the selected document could not be read', _t2);
|
|
26200
|
+
warn$1('[websdk-ui] the selected document could not be read', _t2);
|
|
26092
26201
|
setReadFailed(true);
|
|
26093
26202
|
case 5:
|
|
26094
26203
|
_context.prev = 5;
|
|
@@ -32222,7 +32331,7 @@
|
|
|
32222
32331
|
case 4:
|
|
32223
32332
|
_context.prev = 4;
|
|
32224
32333
|
_t = _context["catch"](2);
|
|
32225
|
-
warn('[websdk-ui] the selected selfie could not be read', _t);
|
|
32334
|
+
warn$1('[websdk-ui] the selected selfie could not be read', _t);
|
|
32226
32335
|
setReadFailed(true);
|
|
32227
32336
|
case 5:
|
|
32228
32337
|
case "end":
|
|
@@ -41365,7 +41474,7 @@
|
|
|
41365
41474
|
// Deliberately the UI package's own logger, per AGENTS.md. `debugMode`
|
|
41366
41475
|
// raises CORE's level, not this one, so routing through `debug()` here
|
|
41367
41476
|
// would silence the fallback in exactly the session that needs it.
|
|
41368
|
-
warn('[autoCapture] diagnostics log', text);
|
|
41477
|
+
warn$1('[autoCapture] diagnostics log', text);
|
|
41369
41478
|
setCopied(log.length + "f \u2192 console");
|
|
41370
41479
|
};
|
|
41371
41480
|
if (!((_navigator$clipboard = navigator.clipboard) != null && _navigator$clipboard.writeText)) {
|
|
@@ -43146,7 +43255,7 @@
|
|
|
43146
43255
|
_context.prev = 3;
|
|
43147
43256
|
_t = _context["catch"](1);
|
|
43148
43257
|
if (!cancelled) {
|
|
43149
|
-
warn("[AdditionalDocumentCaptureWizard] skip() rejected for \"" + current.name + "\"; showing the document", _t);
|
|
43258
|
+
warn$1("[AdditionalDocumentCaptureWizard] skip() rejected for \"" + current.name + "\"; showing the document", _t);
|
|
43150
43259
|
}
|
|
43151
43260
|
return _context.abrupt("return");
|
|
43152
43261
|
case 4:
|
|
@@ -45738,15 +45847,15 @@
|
|
|
45738
45847
|
var Label = styled.span(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n max-width: 32rem;\n text-align: center;\n text-wrap: pretty;\n font-size: 14px;\n font-weight: 600;\n letter-spacing: 0.01em;\n"])));
|
|
45739
45848
|
|
|
45740
45849
|
function CompositeWizard(_ref) {
|
|
45741
|
-
var _successScreen$isAppr;
|
|
45850
|
+
var _successScreen$isAppr, _ref2;
|
|
45742
45851
|
var steps = _ref.steps,
|
|
45743
45852
|
sessionReadyProp = _ref.sessionReady,
|
|
45744
45853
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
45745
45854
|
initialArtifacts = _ref$initialArtifacts === void 0 ? {} : _ref$initialArtifacts,
|
|
45746
45855
|
_ref$captureOnly = _ref.captureOnly,
|
|
45747
45856
|
captureOnly = _ref$captureOnly === void 0 ? false : _ref$captureOnly,
|
|
45748
|
-
|
|
45749
|
-
showSuccessScreen = _ref
|
|
45857
|
+
showResultScreen = _ref.showResultScreen,
|
|
45858
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
45750
45859
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
45751
45860
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
45752
45861
|
successClassNames = _ref.successClassNames,
|
|
@@ -45896,7 +46005,7 @@
|
|
|
45896
46005
|
classNames: successScreen.classNames
|
|
45897
46006
|
});
|
|
45898
46007
|
}
|
|
45899
|
-
if (submissionStatus === SubmissionStatus.SUBMITTED && submissionResponse && showSuccessScreen) {
|
|
46008
|
+
if (submissionStatus === SubmissionStatus.SUBMITTED && submissionResponse && ((_ref2 = showResultScreen != null ? showResultScreen : showSuccessScreen) != null ? _ref2 : false)) {
|
|
45900
46009
|
return jsx(SubmissionSuccess, {
|
|
45901
46010
|
response: submissionResponse,
|
|
45902
46011
|
request: lastSubmissionRequest,
|
|
@@ -45933,8 +46042,8 @@
|
|
|
45933
46042
|
});
|
|
45934
46043
|
return labels;
|
|
45935
46044
|
}
|
|
45936
|
-
function SubmittingScreen(
|
|
45937
|
-
var text =
|
|
46045
|
+
function SubmittingScreen(_ref3) {
|
|
46046
|
+
var text = _ref3.text;
|
|
45938
46047
|
return jsx(OrbStatusScreen, {
|
|
45939
46048
|
state: "working",
|
|
45940
46049
|
text: text,
|
|
@@ -46061,7 +46170,7 @@
|
|
|
46061
46170
|
if (shouldProceed) setIncluded(true);else onCompleteRef.current();
|
|
46062
46171
|
}, function (cause) {
|
|
46063
46172
|
if (!active) return;
|
|
46064
|
-
warn('[websdk-ui] signature stage decision rejected; capturing anyway', cause);
|
|
46173
|
+
warn$1('[websdk-ui] signature stage decision rejected; capturing anyway', cause);
|
|
46065
46174
|
setIncluded(true);
|
|
46066
46175
|
});
|
|
46067
46176
|
return function () {
|
|
@@ -46693,7 +46802,7 @@
|
|
|
46693
46802
|
}
|
|
46694
46803
|
|
|
46695
46804
|
var _templateObject$2, _templateObject2$2, _templateObject3$1, _templateObject4$1;
|
|
46696
|
-
var _excluded$9 = ["client", "action", "submission", "theme", "className", "geolocationEnabled", "geolocationRequired", "captureProgress", "remoteDiagnostics", "loadingSpinner", "showEnrollmentId", "children"];
|
|
46805
|
+
var _excluded$9 = ["client", "action", "submission", "theme", "className", "geolocationEnabled", "geolocationRequired", "captureProgress", "remoteDiagnostics", "loadingSpinner", "showEnrollmentId", "lang", "children"];
|
|
46697
46806
|
function FlowChassis(_ref) {
|
|
46698
46807
|
var client = _ref.client,
|
|
46699
46808
|
action = _ref.action,
|
|
@@ -46710,6 +46819,7 @@
|
|
|
46710
46819
|
loadingSpinner = _ref.loadingSpinner,
|
|
46711
46820
|
_ref$showEnrollmentId = _ref.showEnrollmentId,
|
|
46712
46821
|
showEnrollmentId = _ref$showEnrollmentId === void 0 ? false : _ref$showEnrollmentId,
|
|
46822
|
+
lang = _ref.lang,
|
|
46713
46823
|
children = _ref.children,
|
|
46714
46824
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
46715
46825
|
var geolocation = useGeolocation(geolocationEnabled);
|
|
@@ -46719,26 +46829,29 @@
|
|
|
46719
46829
|
client: client,
|
|
46720
46830
|
children: [jsx(RemoteDiagnosticsMount, {
|
|
46721
46831
|
remoteDiagnostics: remoteDiagnostics
|
|
46722
|
-
}), jsx(
|
|
46723
|
-
|
|
46724
|
-
children: jsx(
|
|
46725
|
-
|
|
46726
|
-
children: jsx(
|
|
46727
|
-
|
|
46728
|
-
|
|
46729
|
-
|
|
46730
|
-
|
|
46731
|
-
|
|
46732
|
-
|
|
46733
|
-
|
|
46734
|
-
|
|
46735
|
-
|
|
46736
|
-
|
|
46737
|
-
|
|
46738
|
-
|
|
46832
|
+
}), jsx(SdkLanguageProvider, {
|
|
46833
|
+
lang: lang,
|
|
46834
|
+
children: jsx(ThemeProvider, {
|
|
46835
|
+
theme: theme,
|
|
46836
|
+
children: jsx(LoadingSpinnerProvider, {
|
|
46837
|
+
spinner: loadingSpinner,
|
|
46838
|
+
children: jsx(SubmissionProvider, _extends$1({
|
|
46839
|
+
client: client,
|
|
46840
|
+
action: action,
|
|
46841
|
+
options: submission,
|
|
46842
|
+
geolocation: geolocation.position
|
|
46843
|
+
}, callbacks, {
|
|
46844
|
+
children: jsx(FlowPage, {
|
|
46845
|
+
className: className,
|
|
46846
|
+
enrollmentId: showEnrollmentId ? submission == null ? void 0 : submission.enrollmentId : undefined,
|
|
46847
|
+
children: jsx(AuthGate, {
|
|
46848
|
+
children: geolocationRequired && geolocation.blocked ? jsx(GeolocationAccessDeniedOverlay, {
|
|
46849
|
+
onRetry: geolocation.retry
|
|
46850
|
+
}) : children
|
|
46851
|
+
})
|
|
46739
46852
|
})
|
|
46740
|
-
})
|
|
46741
|
-
})
|
|
46853
|
+
}))
|
|
46854
|
+
})
|
|
46742
46855
|
})
|
|
46743
46856
|
})]
|
|
46744
46857
|
})
|
|
@@ -46898,6 +47011,26 @@
|
|
|
46898
47011
|
return explicit != null ? explicit : introActive;
|
|
46899
47012
|
}
|
|
46900
47013
|
|
|
47014
|
+
/**
|
|
47015
|
+
* A step bag with the flow's settings filled in wherever the step leaves them
|
|
47016
|
+
* unset: `step ?? flow`, key by key. The step's own value always wins, an
|
|
47017
|
+
* explicit `false` included, so a flow-wide setting never overrides a step.
|
|
47018
|
+
*
|
|
47019
|
+
* `flow` is typed against the step bag, so a setting the step has no prop for
|
|
47020
|
+
* (`debugMode` on the signature step, say) fails to compile instead of being
|
|
47021
|
+
* forwarded to a component that ignores it.
|
|
47022
|
+
*/
|
|
47023
|
+
function inheritFlowSettings(step, flow) {
|
|
47024
|
+
var inherited = {};
|
|
47025
|
+
for (var key in flow) {
|
|
47026
|
+
if (!Object.prototype.hasOwnProperty.call(flow, key)) continue;
|
|
47027
|
+
if ((step == null ? void 0 : step[key]) === undefined && flow[key] !== undefined) {
|
|
47028
|
+
inherited[key] = flow[key];
|
|
47029
|
+
}
|
|
47030
|
+
}
|
|
47031
|
+
return _extends$1({}, step, inherited);
|
|
47032
|
+
}
|
|
47033
|
+
|
|
46901
47034
|
function buildRingScreenProps(_ref) {
|
|
46902
47035
|
var ringMode = _ref.ringMode,
|
|
46903
47036
|
finishingVerbiage = _ref.finishingVerbiage,
|
|
@@ -47026,7 +47159,7 @@
|
|
|
47026
47159
|
return base;
|
|
47027
47160
|
}
|
|
47028
47161
|
|
|
47029
|
-
var _excluded$8 = ["client", "controller", "capture", "view", "submission", "initialArtifacts", "captureOnly", "signatureController", "signatureCapture", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "theme", "className", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onCaptured", "onSubmitted", "children"];
|
|
47162
|
+
var _excluded$8 = ["client", "controller", "capture", "view", "submission", "initialArtifacts", "captureOnly", "signatureController", "signatureCapture", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "theme", "className", "lang", "debugMode", "skipSuccessScreen", "showResultScreen", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onCaptured", "onSubmitted", "children"];
|
|
47030
47163
|
var EMPTY_ID_CAPTURE$3 = {};
|
|
47031
47164
|
var EMPTY_SIGNATURE_CAPTURE$5 = {};
|
|
47032
47165
|
var EMPTY_ID_VIEW$3 = {};
|
|
@@ -47038,7 +47171,7 @@
|
|
|
47038
47171
|
_ref$capture = _ref.capture,
|
|
47039
47172
|
capture = _ref$capture === void 0 ? EMPTY_ID_CAPTURE$3 : _ref$capture,
|
|
47040
47173
|
_ref$view = _ref.view,
|
|
47041
|
-
|
|
47174
|
+
viewProp = _ref$view === void 0 ? EMPTY_ID_VIEW$3 : _ref$view,
|
|
47042
47175
|
_ref$submission = _ref.submission,
|
|
47043
47176
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$6 : _ref$submission,
|
|
47044
47177
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
@@ -47048,14 +47181,17 @@
|
|
|
47048
47181
|
signatureController = _ref.signatureController,
|
|
47049
47182
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
47050
47183
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$5 : _ref$signatureCapture,
|
|
47051
|
-
|
|
47184
|
+
signatureViewProp = _ref.signatureView,
|
|
47052
47185
|
captureSignature = _ref.captureSignature,
|
|
47053
47186
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
47054
47187
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
47055
47188
|
theme = _ref.theme,
|
|
47056
47189
|
className = _ref.className,
|
|
47057
|
-
|
|
47058
|
-
|
|
47190
|
+
lang = _ref.lang,
|
|
47191
|
+
debugMode = _ref.debugMode,
|
|
47192
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
47193
|
+
showResultScreen = _ref.showResultScreen,
|
|
47194
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
47059
47195
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
47060
47196
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
47061
47197
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -47067,6 +47203,27 @@
|
|
|
47067
47203
|
onSubmitted = _ref.onSubmitted,
|
|
47068
47204
|
children = _ref.children,
|
|
47069
47205
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
47206
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
47207
|
+
var _useMemo = React.useMemo(function () {
|
|
47208
|
+
return {
|
|
47209
|
+
view: inheritFlowSettings(viewProp, {
|
|
47210
|
+
lang: lang,
|
|
47211
|
+
debugMode: debugMode,
|
|
47212
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47213
|
+
}),
|
|
47214
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
47215
|
+
lang: lang,
|
|
47216
|
+
showCaptureDiagnostics: debugMode,
|
|
47217
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47218
|
+
})
|
|
47219
|
+
};
|
|
47220
|
+
}, [debugMode, lang, signatureViewProp, skipSuccessScreen, viewProp]),
|
|
47221
|
+
view = _useMemo.view,
|
|
47222
|
+
signatureView = _useMemo.signatureView;
|
|
47223
|
+
useMountOnlyWarnings('IdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47224
|
+
capture: capture,
|
|
47225
|
+
signatureCapture: signatureCapture
|
|
47226
|
+
});
|
|
47070
47227
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47071
47228
|
var latestCapture = useLatestCallbacks(capture);
|
|
47072
47229
|
var latestSignatureCapture = useLatestCallbacks(signatureCapture);
|
|
@@ -47184,13 +47341,14 @@
|
|
|
47184
47341
|
action: SubmissionAction.VALIDATE,
|
|
47185
47342
|
submission: submission,
|
|
47186
47343
|
theme: theme,
|
|
47187
|
-
className: className
|
|
47344
|
+
className: className,
|
|
47345
|
+
lang: lang
|
|
47188
47346
|
}, callbacks, {
|
|
47189
47347
|
children: [jsx(CompositeWizard, _extends$1({}, ringScreens, {
|
|
47190
47348
|
steps: steps,
|
|
47191
47349
|
initialArtifacts: initialArtifacts,
|
|
47192
47350
|
captureOnly: captureOnly,
|
|
47193
|
-
|
|
47351
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
47194
47352
|
showDiagnostics: showDiagnostics,
|
|
47195
47353
|
onArtifactsCollected: onCaptured,
|
|
47196
47354
|
onSubmitted: onSubmitted
|
|
@@ -47209,13 +47367,16 @@
|
|
|
47209
47367
|
_ref$capture = _ref.capture,
|
|
47210
47368
|
capture = _ref$capture === void 0 ? EMPTY_FACE_CAPTURE$5 : _ref$capture,
|
|
47211
47369
|
_ref$view = _ref.view,
|
|
47212
|
-
|
|
47370
|
+
viewProp = _ref$view === void 0 ? EMPTY_FACE_VIEW$5 : _ref$view,
|
|
47213
47371
|
_ref$submission = _ref.submission,
|
|
47214
47372
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$5 : _ref$submission,
|
|
47215
47373
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
47216
47374
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$8 : _ref$initialArtifacts,
|
|
47217
47375
|
theme = _ref.theme,
|
|
47218
47376
|
className = _ref.className,
|
|
47377
|
+
lang = _ref.lang,
|
|
47378
|
+
debugMode = _ref.debugMode,
|
|
47379
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
47219
47380
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
47220
47381
|
geolocationRequired = _ref.geolocationRequired,
|
|
47221
47382
|
captureProgress = _ref.captureProgress,
|
|
@@ -47224,8 +47385,19 @@
|
|
|
47224
47385
|
onCaptured = _ref.onCaptured,
|
|
47225
47386
|
onCaptureError = _ref.onCaptureError,
|
|
47226
47387
|
children = _ref.children;
|
|
47388
|
+
// Flow-wide settings reach the step unless its own bag sets them.
|
|
47389
|
+
var view = React.useMemo(function () {
|
|
47390
|
+
return inheritFlowSettings(viewProp, {
|
|
47391
|
+
lang: lang,
|
|
47392
|
+
debugMode: debugMode,
|
|
47393
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47394
|
+
});
|
|
47395
|
+
}, [debugMode, lang, skipSuccessScreen, viewProp]);
|
|
47227
47396
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
47228
47397
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded$7);
|
|
47398
|
+
useMountOnlyWarnings('FaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47399
|
+
capture: controllerCapture
|
|
47400
|
+
});
|
|
47229
47401
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47230
47402
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
47231
47403
|
var latestLiveness = useLatestCallbacks(controllerCapture.liveness);
|
|
@@ -47281,6 +47453,7 @@
|
|
|
47281
47453
|
submission: submission,
|
|
47282
47454
|
theme: theme,
|
|
47283
47455
|
className: className,
|
|
47456
|
+
lang: lang,
|
|
47284
47457
|
geolocationEnabled: geolocationEnabled,
|
|
47285
47458
|
geolocationRequired: geolocationRequired,
|
|
47286
47459
|
captureProgress: captureProgress,
|
|
@@ -47295,7 +47468,7 @@
|
|
|
47295
47468
|
});
|
|
47296
47469
|
}
|
|
47297
47470
|
|
|
47298
|
-
var _excluded$6 = ["client", "idController", "selfieController", "signatureController", "idCapture", "faceCapture", "signatureCapture", "idView", "faceView", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "submission", "initialArtifacts", "theme", "className", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "onStepStarted", "onStepCompleted", "children"],
|
|
47471
|
+
var _excluded$6 = ["client", "idController", "selfieController", "signatureController", "idCapture", "faceCapture", "signatureCapture", "idView", "faceView", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "submission", "initialArtifacts", "theme", "className", "lang", "debugMode", "skipSuccessScreen", "showResultScreen", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "onStepStarted", "onStepCompleted", "children"],
|
|
47299
47472
|
_excluded2$3 = ["checkLivenessOptions"];
|
|
47300
47473
|
var EMPTY_ID_CAPTURE$2 = {};
|
|
47301
47474
|
var EMPTY_FACE_CAPTURE$4 = {};
|
|
@@ -47317,10 +47490,10 @@
|
|
|
47317
47490
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
47318
47491
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$4 : _ref$signatureCapture,
|
|
47319
47492
|
_ref$idView = _ref.idView,
|
|
47320
|
-
|
|
47493
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW$2 : _ref$idView,
|
|
47321
47494
|
_ref$faceView = _ref.faceView,
|
|
47322
|
-
|
|
47323
|
-
|
|
47495
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$4 : _ref$faceView,
|
|
47496
|
+
signatureViewProp = _ref.signatureView,
|
|
47324
47497
|
captureSignature = _ref.captureSignature,
|
|
47325
47498
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
47326
47499
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -47330,8 +47503,11 @@
|
|
|
47330
47503
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$7 : _ref$initialArtifacts,
|
|
47331
47504
|
theme = _ref.theme,
|
|
47332
47505
|
className = _ref.className,
|
|
47333
|
-
|
|
47334
|
-
|
|
47506
|
+
lang = _ref.lang,
|
|
47507
|
+
debugMode = _ref.debugMode,
|
|
47508
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
47509
|
+
showResultScreen = _ref.showResultScreen,
|
|
47510
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
47335
47511
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
47336
47512
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
47337
47513
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -47345,8 +47521,33 @@
|
|
|
47345
47521
|
onStepCompleted = _ref.onStepCompleted,
|
|
47346
47522
|
children = _ref.children,
|
|
47347
47523
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
47524
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
47525
|
+
var _useMemo = React.useMemo(function () {
|
|
47526
|
+
var settings = {
|
|
47527
|
+
lang: lang,
|
|
47528
|
+
debugMode: debugMode,
|
|
47529
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47530
|
+
};
|
|
47531
|
+
return {
|
|
47532
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
47533
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
47534
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
47535
|
+
lang: lang,
|
|
47536
|
+
showCaptureDiagnostics: debugMode,
|
|
47537
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47538
|
+
})
|
|
47539
|
+
};
|
|
47540
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
47541
|
+
idView = _useMemo.idView,
|
|
47542
|
+
faceView = _useMemo.faceView,
|
|
47543
|
+
signatureView = _useMemo.signatureView;
|
|
47348
47544
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47349
47545
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$3);
|
|
47546
|
+
useMountOnlyWarnings('IdAndFaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47547
|
+
faceCapture: selfieCaptureConfig,
|
|
47548
|
+
idCapture: idCapture,
|
|
47549
|
+
signatureCapture: signatureCapture
|
|
47550
|
+
});
|
|
47350
47551
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47351
47552
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47352
47553
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -47510,12 +47711,13 @@
|
|
|
47510
47711
|
action: SubmissionAction.VALIDATE,
|
|
47511
47712
|
submission: submission,
|
|
47512
47713
|
theme: theme,
|
|
47513
|
-
className: className
|
|
47714
|
+
className: className,
|
|
47715
|
+
lang: lang
|
|
47514
47716
|
}, callbacks, {
|
|
47515
47717
|
children: [jsx(CompositeWizard, _extends$1({}, ringScreens, {
|
|
47516
47718
|
steps: steps,
|
|
47517
47719
|
initialArtifacts: initialArtifacts,
|
|
47518
|
-
|
|
47720
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
47519
47721
|
showDiagnostics: showDiagnostics,
|
|
47520
47722
|
onSubmitted: onSubmitted,
|
|
47521
47723
|
onStepStarted: onStepStarted,
|
|
@@ -47570,9 +47772,9 @@
|
|
|
47570
47772
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
47571
47773
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$3 : _ref$signatureCapture,
|
|
47572
47774
|
_ref$faceView = _ref.faceView,
|
|
47573
|
-
|
|
47775
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$3 : _ref$faceView,
|
|
47574
47776
|
_ref$signatureView = _ref.signatureView,
|
|
47575
|
-
|
|
47777
|
+
signatureViewProp = _ref$signatureView === void 0 ? EMPTY_SIGNATURE_VIEW : _ref$signatureView,
|
|
47576
47778
|
challengeResponse = _ref.challengeResponse,
|
|
47577
47779
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
47578
47780
|
_ref$allowHigherCamer = _ref.allowHigherCameraResolutions,
|
|
@@ -47598,6 +47800,8 @@
|
|
|
47598
47800
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$6 : _ref$initialArtifacts,
|
|
47599
47801
|
theme = _ref.theme,
|
|
47600
47802
|
className = _ref.className,
|
|
47803
|
+
lang = _ref.lang,
|
|
47804
|
+
debugMode = _ref.debugMode,
|
|
47601
47805
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
47602
47806
|
geolocationRequired = _ref.geolocationRequired,
|
|
47603
47807
|
captureProgress = _ref.captureProgress,
|
|
@@ -47605,13 +47809,33 @@
|
|
|
47605
47809
|
loadingSpinner = _ref.loadingSpinner,
|
|
47606
47810
|
onCaptured = _ref.onCaptured,
|
|
47607
47811
|
onCaptureError = _ref.onCaptureError;
|
|
47812
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
47813
|
+
var _useMemo = React.useMemo(function () {
|
|
47814
|
+
return {
|
|
47815
|
+
faceView: inheritFlowSettings(faceViewProp, {
|
|
47816
|
+
lang: lang,
|
|
47817
|
+
debugMode: debugMode
|
|
47818
|
+
}),
|
|
47819
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
47820
|
+
lang: lang,
|
|
47821
|
+
showCaptureDiagnostics: debugMode,
|
|
47822
|
+
skipSuccessScreen: skipSuccessScreen
|
|
47823
|
+
})
|
|
47824
|
+
};
|
|
47825
|
+
}, [debugMode, faceViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
47826
|
+
faceView = _useMemo.faceView,
|
|
47827
|
+
signatureView = _useMemo.signatureView;
|
|
47608
47828
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47609
47829
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded$5);
|
|
47830
|
+
useMountOnlyWarnings('SignatureKYCFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47831
|
+
faceCapture: selfieCaptureConfig,
|
|
47832
|
+
signatureCapture: signatureCapture
|
|
47833
|
+
});
|
|
47610
47834
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47611
47835
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47612
47836
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
47613
47837
|
var latestSignatureCapture = useLatestCallbacks(signatureCapture);
|
|
47614
|
-
var legacyVideoLayout = (_signatureView$legacy = signatureView
|
|
47838
|
+
var legacyVideoLayout = (_signatureView$legacy = signatureView.legacyVideoLayout) != null ? _signatureView$legacy : false;
|
|
47615
47839
|
var onExitAfterLivenessFailure = faceView.onExitAfterFailure;
|
|
47616
47840
|
var sharedVideoRef = React.useRef(null);
|
|
47617
47841
|
var _useState = React.useState(null),
|
|
@@ -47795,6 +48019,7 @@
|
|
|
47795
48019
|
submission: submission,
|
|
47796
48020
|
theme: theme,
|
|
47797
48021
|
className: className,
|
|
48022
|
+
lang: lang,
|
|
47798
48023
|
geolocationEnabled: geolocationEnabled,
|
|
47799
48024
|
geolocationRequired: geolocationRequired,
|
|
47800
48025
|
captureProgress: captureProgress,
|
|
@@ -47804,7 +48029,7 @@
|
|
|
47804
48029
|
completed: stage === 'complete'
|
|
47805
48030
|
}), stage !== 'complete' ? jsxs(HandoffRoot, {
|
|
47806
48031
|
children: [jsx(SignatureCaptureView, _extends$1({}, signatureView, {
|
|
47807
|
-
skipSuccessScreen: impliedSkipSuccessScreen(
|
|
48032
|
+
skipSuccessScreen: impliedSkipSuccessScreen(signatureView.skipSuccessScreen, isRingIntroActive(faceView)),
|
|
47808
48033
|
controller: resolvedSignatureController,
|
|
47809
48034
|
sessionReady: renderedStage === 'signature-capture',
|
|
47810
48035
|
videoRef: sharedVideoRef,
|
|
@@ -47902,7 +48127,7 @@
|
|
|
47902
48127
|
return props.$visible ? 'block' : 'none';
|
|
47903
48128
|
});
|
|
47904
48129
|
|
|
47905
|
-
var _excluded$4 = ["client", "idController", "selfieController", "controller", "idCapture", "faceCapture", "capture", "idView", "faceView", "view", "submission", "initialArtifacts", "captureOnly", "signatureController", "signatureCapture", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "skipIdCapture", "matchOnly", "readTextPrompt", "onMicrophoneAccessDenied", "theme", "className", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onCaptured", "onSubmitted", "onCaptureError", "children"],
|
|
48130
|
+
var _excluded$4 = ["client", "idController", "selfieController", "controller", "idCapture", "faceCapture", "capture", "idView", "faceView", "view", "submission", "initialArtifacts", "captureOnly", "signatureController", "signatureCapture", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "skipIdCapture", "matchOnly", "readTextPrompt", "onMicrophoneAccessDenied", "theme", "className", "lang", "debugMode", "skipSuccessScreen", "showResultScreen", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onCaptured", "onSubmitted", "onCaptureError", "children"],
|
|
47906
48131
|
_excluded2$2 = ["checkLivenessOptions"];
|
|
47907
48132
|
var EMPTY_ID_CAPTURE$1 = {};
|
|
47908
48133
|
var EMPTY_FACE_CAPTURE$2 = {};
|
|
@@ -47926,11 +48151,11 @@
|
|
|
47926
48151
|
_ref$capture = _ref.capture,
|
|
47927
48152
|
capture = _ref$capture === void 0 ? EMPTY_VIDEO_CAPTURE : _ref$capture,
|
|
47928
48153
|
_ref$idView = _ref.idView,
|
|
47929
|
-
|
|
48154
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW$1 : _ref$idView,
|
|
47930
48155
|
_ref$faceView = _ref.faceView,
|
|
47931
|
-
|
|
48156
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$2 : _ref$faceView,
|
|
47932
48157
|
_ref$view = _ref.view,
|
|
47933
|
-
|
|
48158
|
+
viewProp = _ref$view === void 0 ? EMPTY_VIDEO_VIEW : _ref$view,
|
|
47934
48159
|
_ref$submission = _ref.submission,
|
|
47935
48160
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$2 : _ref$submission,
|
|
47936
48161
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
@@ -47940,7 +48165,7 @@
|
|
|
47940
48165
|
signatureController = _ref.signatureController,
|
|
47941
48166
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
47942
48167
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$2 : _ref$signatureCapture,
|
|
47943
|
-
|
|
48168
|
+
signatureViewProp = _ref.signatureView,
|
|
47944
48169
|
captureSignature = _ref.captureSignature,
|
|
47945
48170
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
47946
48171
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -47952,8 +48177,11 @@
|
|
|
47952
48177
|
onMicrophoneAccessDenied = _ref.onMicrophoneAccessDenied,
|
|
47953
48178
|
theme = _ref.theme,
|
|
47954
48179
|
className = _ref.className,
|
|
47955
|
-
|
|
47956
|
-
|
|
48180
|
+
lang = _ref.lang,
|
|
48181
|
+
debugMode = _ref.debugMode,
|
|
48182
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
48183
|
+
showResultScreen = _ref.showResultScreen,
|
|
48184
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
47957
48185
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
47958
48186
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
47959
48187
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -47966,8 +48194,39 @@
|
|
|
47966
48194
|
onCaptureError = _ref.onCaptureError,
|
|
47967
48195
|
children = _ref.children,
|
|
47968
48196
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
48197
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
48198
|
+
var _useMemo = React.useMemo(function () {
|
|
48199
|
+
var settings = {
|
|
48200
|
+
lang: lang,
|
|
48201
|
+
debugMode: debugMode,
|
|
48202
|
+
skipSuccessScreen: skipSuccessScreen
|
|
48203
|
+
};
|
|
48204
|
+
return {
|
|
48205
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
48206
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
48207
|
+
view: inheritFlowSettings(viewProp, {
|
|
48208
|
+
lang: lang,
|
|
48209
|
+
debugMode: debugMode
|
|
48210
|
+
}),
|
|
48211
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
48212
|
+
lang: lang,
|
|
48213
|
+
showCaptureDiagnostics: debugMode,
|
|
48214
|
+
skipSuccessScreen: skipSuccessScreen
|
|
48215
|
+
})
|
|
48216
|
+
};
|
|
48217
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen, viewProp]),
|
|
48218
|
+
idView = _useMemo.idView,
|
|
48219
|
+
faceView = _useMemo.faceView,
|
|
48220
|
+
view = _useMemo.view,
|
|
48221
|
+
signatureView = _useMemo.signatureView;
|
|
47969
48222
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47970
48223
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$2);
|
|
48224
|
+
useMountOnlyWarnings('VideoIdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
48225
|
+
faceCapture: selfieCaptureConfig,
|
|
48226
|
+
idCapture: idCapture,
|
|
48227
|
+
capture: capture,
|
|
48228
|
+
signatureCapture: signatureCapture
|
|
48229
|
+
});
|
|
47971
48230
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47972
48231
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47973
48232
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -48125,13 +48384,14 @@
|
|
|
48125
48384
|
action: action,
|
|
48126
48385
|
submission: submission,
|
|
48127
48386
|
theme: theme,
|
|
48128
|
-
className: className
|
|
48387
|
+
className: className,
|
|
48388
|
+
lang: lang
|
|
48129
48389
|
}, callbacks, {
|
|
48130
48390
|
children: [jsx(CompositeWizard, _extends$1({}, ringScreens, {
|
|
48131
48391
|
steps: steps,
|
|
48132
48392
|
initialArtifacts: initialArtifacts,
|
|
48133
48393
|
captureOnly: captureOnly,
|
|
48134
|
-
|
|
48394
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
48135
48395
|
showDiagnostics: showDiagnostics,
|
|
48136
48396
|
onArtifactsCollected: onCaptured,
|
|
48137
48397
|
onSubmitted: onSubmitted
|
|
@@ -50956,60 +51216,6 @@
|
|
|
50956
51216
|
};
|
|
50957
51217
|
}
|
|
50958
51218
|
|
|
50959
|
-
// Makes the mount-time-only `autoCapture` contract audible (#351).
|
|
50960
|
-
//
|
|
50961
|
-
// `DocumentCaptureFlow` builds its controller inside `useState(() => …)` from
|
|
50962
|
-
// `documentsRef.current`, and `documentCapture/controller.ts` has no
|
|
50963
|
-
// reconfigure path — so `autoCapture` is read once, at mount, and every later
|
|
50964
|
-
// change is ignored. A reconfigure path was ruled against: it is real surface
|
|
50965
|
-
// on a controller that has none today, bought to serve a race the consumer can
|
|
50966
|
-
// simply not have (AMEX's `DocumentCaptureScreen` should gate on `flagsLoaded`,
|
|
50967
|
-
// not just `sessionLoaded`).
|
|
50968
|
-
//
|
|
50969
|
-
// The SILENCE is the expensive half. All four of this repo's cascade-default
|
|
50970
|
-
// incidents were "the value was quietly wrong and nothing said so", and this
|
|
50971
|
-
// one has the same shape: a capture screen that mounts before the flags land
|
|
50972
|
-
// has auto-capture off for that applicant's whole session, with no error and
|
|
50973
|
-
// no log. The field-visible half of the same ruling is
|
|
50974
|
-
// `autoCaptureStatus: 'disabled:lateFlag'` on the capture metadata.
|
|
50975
|
-
/**
|
|
50976
|
-
* A comparable summary of what auto-capture each document asked for.
|
|
50977
|
-
*
|
|
50978
|
-
* Resolved rather than compared raw, so a caller who re-spreads an equivalent
|
|
50979
|
-
* bag every render (`autoCapture: {}`, or `{ minScore: undefined }`) does not
|
|
50980
|
-
* trip the warning — only a change that would actually have configured the
|
|
50981
|
-
* engine differently does.
|
|
50982
|
-
*
|
|
50983
|
-
* PRESENCE is preserved as `null` rather than folded into the resolved
|
|
50984
|
-
* defaults, because `undefined` -> `{}` is precisely the late-flag race this
|
|
50985
|
-
* exists to catch, and resolving both would make them identical.
|
|
50986
|
-
*/
|
|
50987
|
-
function autoCaptureSignature(documents) {
|
|
50988
|
-
return JSON.stringify(documents.map(function (document) {
|
|
50989
|
-
return document.autoCapture ? resolveAutoCapture(document.autoCapture, undefined) : null;
|
|
50990
|
-
}));
|
|
50991
|
-
}
|
|
50992
|
-
/**
|
|
50993
|
-
* Warn once if `documents`' auto-capture configuration changes after mount.
|
|
50994
|
-
*
|
|
50995
|
-
* Warns rather than reconfigures: the change genuinely has no effect, and a
|
|
50996
|
-
* caller who cannot see that is the failure mode.
|
|
50997
|
-
*/
|
|
50998
|
-
function useAutoCaptureMountGuard(documents) {
|
|
50999
|
-
var mounted = React.useRef(null);
|
|
51000
|
-
var warned = React.useRef(false);
|
|
51001
|
-
var signature = autoCaptureSignature(documents);
|
|
51002
|
-
React.useEffect(function () {
|
|
51003
|
-
if (mounted.current === null) {
|
|
51004
|
-
mounted.current = signature;
|
|
51005
|
-
return;
|
|
51006
|
-
}
|
|
51007
|
-
if (warned.current || signature === mounted.current) return;
|
|
51008
|
-
warned.current = true;
|
|
51009
|
-
warn('[DocumentCaptureFlow] `autoCapture` changed after mount and has been ' + 'ignored: the controller is built once and has no reconfigure path. ' + 'Mount this flow only once the value is known — if it comes from a ' + 'feature flag, gate the screen on the flags having loaded, not just ' + 'the session.');
|
|
51010
|
-
}, [signature]);
|
|
51011
|
-
}
|
|
51012
|
-
|
|
51013
51219
|
function buildDocumentCaptureStep(controller, view, sessionReady) {
|
|
51014
51220
|
if (view === void 0) {
|
|
51015
51221
|
view = {};
|
|
@@ -51028,7 +51234,7 @@
|
|
|
51028
51234
|
};
|
|
51029
51235
|
}
|
|
51030
51236
|
|
|
51031
|
-
var _excluded$3 = ["client", "controller", "capture", "view", "documents", "submission", "initialArtifacts", "theme", "className", "onDocumentCaptured", "onDocumentUploaded", "onComplete", "children"];
|
|
51237
|
+
var _excluded$3 = ["client", "controller", "capture", "view", "documents", "submission", "initialArtifacts", "theme", "className", "lang", "debugMode", "onDocumentCaptured", "onDocumentUploaded", "onComplete", "children"];
|
|
51032
51238
|
var EMPTY_DOCUMENTS = [];
|
|
51033
51239
|
var EMPTY_CAPTURE$1 = {};
|
|
51034
51240
|
var EMPTY_VIEW$2 = {};
|
|
@@ -51049,6 +51255,8 @@
|
|
|
51049
51255
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$4 : _ref$initialArtifacts,
|
|
51050
51256
|
theme = _ref.theme,
|
|
51051
51257
|
className = _ref.className,
|
|
51258
|
+
lang = _ref.lang,
|
|
51259
|
+
debugMode = _ref.debugMode,
|
|
51052
51260
|
onDocumentCaptured = _ref.onDocumentCaptured,
|
|
51053
51261
|
onDocumentUploaded = _ref.onDocumentUploaded,
|
|
51054
51262
|
onComplete = _ref.onComplete,
|
|
@@ -51058,15 +51266,16 @@
|
|
|
51058
51266
|
// props without being torn down and rebuilt on every render.
|
|
51059
51267
|
var documentsRef = React.useRef(documents);
|
|
51060
51268
|
documentsRef.current = documents;
|
|
51061
|
-
// `autoCapture` is mount-time-only and the controller has no reconfigure
|
|
51062
|
-
// path, so a late change is ignored — loudly rather than silently (#351).
|
|
51063
|
-
useAutoCaptureMountGuard(documents);
|
|
51064
51269
|
var capturedRef = React.useRef(onDocumentCaptured);
|
|
51065
51270
|
capturedRef.current = onDocumentCaptured;
|
|
51066
51271
|
var uploadedRef = React.useRef(onDocumentUploaded);
|
|
51067
51272
|
uploadedRef.current = onDocumentUploaded;
|
|
51068
51273
|
var completeRef = React.useRef(onComplete);
|
|
51069
51274
|
completeRef.current = onComplete;
|
|
51275
|
+
useMountOnlyWarnings('DocumentCaptureFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51276
|
+
capture: capture,
|
|
51277
|
+
documents: documents.map(toDocumentCaptureInput)
|
|
51278
|
+
});
|
|
51070
51279
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51071
51280
|
var latestCapture = useLatestCallbacks(capture);
|
|
51072
51281
|
var _useState = React.useState(function () {
|
|
@@ -51144,8 +51353,11 @@
|
|
|
51144
51353
|
var steps = React.useMemo(function () {
|
|
51145
51354
|
return [buildDocumentCaptureStep(resolvedController, _extends$1({
|
|
51146
51355
|
documents: documents
|
|
51147
|
-
}, view
|
|
51148
|
-
|
|
51356
|
+
}, inheritFlowSettings(view, {
|
|
51357
|
+
lang: lang,
|
|
51358
|
+
debugMode: debugMode
|
|
51359
|
+
})))];
|
|
51360
|
+
}, [debugMode, documents, lang, resolvedController, view]);
|
|
51149
51361
|
var onArtifactsCollected = React.useCallback(function () {
|
|
51150
51362
|
// captureOnly hands the (empty) artifacts back here; completion is reported
|
|
51151
51363
|
// through onComplete with the documents instead.
|
|
@@ -51155,7 +51367,8 @@
|
|
|
51155
51367
|
action: SubmissionAction.NONE,
|
|
51156
51368
|
submission: submission,
|
|
51157
51369
|
theme: theme,
|
|
51158
|
-
className: className
|
|
51370
|
+
className: className,
|
|
51371
|
+
lang: lang
|
|
51159
51372
|
}, callbacks, {
|
|
51160
51373
|
children: [jsx(CompositeWizard, {
|
|
51161
51374
|
steps: steps,
|
|
@@ -51166,7 +51379,7 @@
|
|
|
51166
51379
|
}));
|
|
51167
51380
|
}
|
|
51168
51381
|
|
|
51169
|
-
var _excluded$2 = ["client", "submission", "selfieController", "signatureController", "faceCapture", "signatureCapture", "faceView", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "initialArtifacts", "theme", "className", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "children"],
|
|
51382
|
+
var _excluded$2 = ["client", "submission", "selfieController", "signatureController", "faceCapture", "signatureCapture", "faceView", "signatureView", "captureSignature", "captureSignatureVideo", "allowVirtualCameras", "initialArtifacts", "theme", "className", "lang", "debugMode", "skipSuccessScreen", "showResultScreen", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "children"],
|
|
51170
51383
|
_excluded2$1 = ["checkLivenessOptions"];
|
|
51171
51384
|
var EMPTY_FACE_CAPTURE$1 = {};
|
|
51172
51385
|
var EMPTY_SIGNATURE_CAPTURE$1 = {};
|
|
@@ -51183,8 +51396,8 @@
|
|
|
51183
51396
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
51184
51397
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$1 : _ref$signatureCapture,
|
|
51185
51398
|
_ref$faceView = _ref.faceView,
|
|
51186
|
-
|
|
51187
|
-
|
|
51399
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$1 : _ref$faceView,
|
|
51400
|
+
signatureViewProp = _ref.signatureView,
|
|
51188
51401
|
captureSignature = _ref.captureSignature,
|
|
51189
51402
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
51190
51403
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -51192,8 +51405,11 @@
|
|
|
51192
51405
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$3 : _ref$initialArtifacts,
|
|
51193
51406
|
theme = _ref.theme,
|
|
51194
51407
|
className = _ref.className,
|
|
51195
|
-
|
|
51196
|
-
|
|
51408
|
+
lang = _ref.lang,
|
|
51409
|
+
debugMode = _ref.debugMode,
|
|
51410
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
51411
|
+
showResultScreen = _ref.showResultScreen,
|
|
51412
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
51197
51413
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
51198
51414
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
51199
51415
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -51205,8 +51421,29 @@
|
|
|
51205
51421
|
onCaptureError = _ref.onCaptureError,
|
|
51206
51422
|
children = _ref.children,
|
|
51207
51423
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
51424
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
51425
|
+
var _useMemo = React.useMemo(function () {
|
|
51426
|
+
return {
|
|
51427
|
+
faceView: inheritFlowSettings(faceViewProp, {
|
|
51428
|
+
lang: lang,
|
|
51429
|
+
debugMode: debugMode,
|
|
51430
|
+
skipSuccessScreen: skipSuccessScreen
|
|
51431
|
+
}),
|
|
51432
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
51433
|
+
lang: lang,
|
|
51434
|
+
showCaptureDiagnostics: debugMode,
|
|
51435
|
+
skipSuccessScreen: skipSuccessScreen
|
|
51436
|
+
})
|
|
51437
|
+
};
|
|
51438
|
+
}, [debugMode, faceViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
51439
|
+
faceView = _useMemo.faceView,
|
|
51440
|
+
signatureView = _useMemo.signatureView;
|
|
51208
51441
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
51209
51442
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$1);
|
|
51443
|
+
useMountOnlyWarnings('CustomerBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51444
|
+
faceCapture: selfieCaptureConfig,
|
|
51445
|
+
signatureCapture: signatureCapture
|
|
51446
|
+
});
|
|
51210
51447
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51211
51448
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
51212
51449
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -51332,19 +51569,20 @@
|
|
|
51332
51569
|
submission: submission,
|
|
51333
51570
|
showEnrollmentId: showDiagnostics,
|
|
51334
51571
|
theme: theme,
|
|
51335
|
-
className: className
|
|
51572
|
+
className: className,
|
|
51573
|
+
lang: lang
|
|
51336
51574
|
}, callbacks, {
|
|
51337
51575
|
children: [jsx(CompositeWizard, _extends$1({}, ringScreens, {
|
|
51338
51576
|
steps: steps,
|
|
51339
51577
|
initialArtifacts: initialArtifacts,
|
|
51340
|
-
|
|
51578
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
51341
51579
|
showDiagnostics: showDiagnostics,
|
|
51342
51580
|
onSubmitted: onSubmitted
|
|
51343
51581
|
})), children]
|
|
51344
51582
|
}));
|
|
51345
51583
|
}
|
|
51346
51584
|
|
|
51347
|
-
var _excluded$1 = ["client", "submission", "idController", "selfieController", "signatureController", "videoIdController", "idCapture", "faceCapture", "signatureCapture", "videoIdCapture", "idView", "faceView", "signatureView", "videoIdView", "captureSignature", "captureSignatureVideo", "captureVideoId", "allowVirtualCameras", "initialArtifacts", "theme", "className", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "children"],
|
|
51585
|
+
var _excluded$1 = ["client", "submission", "idController", "selfieController", "signatureController", "videoIdController", "idCapture", "faceCapture", "signatureCapture", "videoIdCapture", "idView", "faceView", "signatureView", "videoIdView", "captureSignature", "captureSignatureVideo", "captureVideoId", "allowVirtualCameras", "initialArtifacts", "theme", "className", "lang", "debugMode", "skipSuccessScreen", "showResultScreen", "showSuccessScreen", "showDiagnostics", "captureAdditionalDocuments", "additionalDocumentClassNames", "additionalDocumentVerbiage", "ringScreenClassNames", "ringScreenVerbiage", "onSubmitted", "onCaptureError", "children"],
|
|
51348
51586
|
_excluded2 = ["checkLivenessOptions"];
|
|
51349
51587
|
var EMPTY_ID_CAPTURE = {};
|
|
51350
51588
|
var EMPTY_FACE_CAPTURE = {};
|
|
@@ -51377,11 +51615,11 @@
|
|
|
51377
51615
|
_ref$videoIdCapture = _ref.videoIdCapture,
|
|
51378
51616
|
videoIdCapture = _ref$videoIdCapture === void 0 ? EMPTY_VIDEO_ID_CAPTURE : _ref$videoIdCapture,
|
|
51379
51617
|
_ref$idView = _ref.idView,
|
|
51380
|
-
|
|
51618
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW : _ref$idView,
|
|
51381
51619
|
_ref$faceView = _ref.faceView,
|
|
51382
|
-
|
|
51383
|
-
|
|
51384
|
-
|
|
51620
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW : _ref$faceView,
|
|
51621
|
+
signatureViewProp = _ref.signatureView,
|
|
51622
|
+
videoIdViewProp = _ref.videoIdView,
|
|
51385
51623
|
captureSignature = _ref.captureSignature,
|
|
51386
51624
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
51387
51625
|
_ref$captureVideoId = _ref.captureVideoId,
|
|
@@ -51391,8 +51629,11 @@
|
|
|
51391
51629
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$2 : _ref$initialArtifacts,
|
|
51392
51630
|
theme = _ref.theme,
|
|
51393
51631
|
className = _ref.className,
|
|
51394
|
-
|
|
51395
|
-
|
|
51632
|
+
lang = _ref.lang,
|
|
51633
|
+
debugMode = _ref.debugMode,
|
|
51634
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
51635
|
+
showResultScreen = _ref.showResultScreen,
|
|
51636
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
51396
51637
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
51397
51638
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
51398
51639
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -51404,9 +51645,39 @@
|
|
|
51404
51645
|
onCaptureError = _ref.onCaptureError,
|
|
51405
51646
|
children = _ref.children,
|
|
51406
51647
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
51407
|
-
|
|
51648
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
51649
|
+
var _useMemo = React.useMemo(function () {
|
|
51650
|
+
var settings = {
|
|
51651
|
+
lang: lang,
|
|
51652
|
+
debugMode: debugMode,
|
|
51653
|
+
skipSuccessScreen: skipSuccessScreen
|
|
51654
|
+
};
|
|
51655
|
+
return {
|
|
51656
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
51657
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
51658
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
51659
|
+
lang: lang,
|
|
51660
|
+
showCaptureDiagnostics: debugMode,
|
|
51661
|
+
skipSuccessScreen: skipSuccessScreen
|
|
51662
|
+
}),
|
|
51663
|
+
videoIdView: inheritFlowSettings(videoIdViewProp, {
|
|
51664
|
+
lang: lang,
|
|
51665
|
+
debugMode: debugMode
|
|
51666
|
+
})
|
|
51667
|
+
};
|
|
51668
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen, videoIdViewProp]),
|
|
51669
|
+
idView = _useMemo.idView,
|
|
51670
|
+
faceView = _useMemo.faceView,
|
|
51671
|
+
signatureView = _useMemo.signatureView,
|
|
51672
|
+
videoIdView = _useMemo.videoIdView;
|
|
51408
51673
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
51409
51674
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2);
|
|
51675
|
+
useMountOnlyWarnings('CustomerIdAndBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51676
|
+
faceCapture: selfieCaptureConfig,
|
|
51677
|
+
idCapture: idCapture,
|
|
51678
|
+
signatureCapture: signatureCapture,
|
|
51679
|
+
videoIdCapture: videoIdCapture
|
|
51680
|
+
});
|
|
51410
51681
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51411
51682
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
51412
51683
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -51441,7 +51712,7 @@
|
|
|
51441
51712
|
if (!active) return;
|
|
51442
51713
|
// Same rule as the signature stage's rejected decision: fall back to
|
|
51443
51714
|
// the stage set the flow would run without the opt-in, and say so.
|
|
51444
|
-
warn('[websdk-ui] captureVideoId decision rejected; using ID + face liveness', cause);
|
|
51715
|
+
warn$1('[websdk-ui] captureVideoId decision rejected; using ID + face liveness', cause);
|
|
51445
51716
|
setUseVideoId(false);
|
|
51446
51717
|
});
|
|
51447
51718
|
return function () {
|
|
@@ -51614,26 +51885,31 @@
|
|
|
51614
51885
|
submission: submission,
|
|
51615
51886
|
showEnrollmentId: showDiagnostics,
|
|
51616
51887
|
theme: theme,
|
|
51617
|
-
className: className
|
|
51888
|
+
className: className,
|
|
51889
|
+
lang: lang
|
|
51618
51890
|
}, callbacks, {
|
|
51619
51891
|
children: [steps ? jsx(CompositeWizard, _extends$1({}, ringScreens, {
|
|
51620
51892
|
steps: steps,
|
|
51621
51893
|
initialArtifacts: initialArtifacts,
|
|
51622
|
-
|
|
51894
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
51623
51895
|
showDiagnostics: showDiagnostics,
|
|
51624
51896
|
onSubmitted: onSubmitted
|
|
51625
|
-
})) :
|
|
51626
|
-
// `loadingStage` is what enables the customer's `loadingSpinner`:
|
|
51627
|
-
// without it OrbStatusScreen hard-renders the orb, so this was the one
|
|
51628
|
-
// loading surface in the SDK that ignored a supplied component
|
|
51629
|
-
// outright — in the flow whose double-loader prompted the fix.
|
|
51630
|
-
jsx(OrbStatusScreen, {
|
|
51631
|
-
state: "solving",
|
|
51632
|
-
text: preparing.preparingText,
|
|
51633
|
-
loadingStage: "preparing"
|
|
51634
|
-
}), children]
|
|
51897
|
+
})) : jsx(PreparingScreen, {}), children]
|
|
51635
51898
|
}));
|
|
51636
51899
|
}
|
|
51900
|
+
/** Translated inside the chassis, so the flow's `lang` reaches it. */
|
|
51901
|
+
function PreparingScreen() {
|
|
51902
|
+
var preparing = useTranslations(undefined, PREPARING_FALLBACKS);
|
|
51903
|
+
// `loadingStage` is what enables the customer's `loadingSpinner`: without it
|
|
51904
|
+
// OrbStatusScreen hard-renders the orb, so this was the one loading surface
|
|
51905
|
+
// in the SDK that ignored a supplied component outright — in the flow whose
|
|
51906
|
+
// double-loader prompted the fix.
|
|
51907
|
+
return jsx(OrbStatusScreen, {
|
|
51908
|
+
state: "solving",
|
|
51909
|
+
text: preparing.preparingText,
|
|
51910
|
+
loadingStage: "preparing"
|
|
51911
|
+
});
|
|
51912
|
+
}
|
|
51637
51913
|
|
|
51638
51914
|
var ALLOWED_MISMATCH_RETRIES$1 = 0;
|
|
51639
51915
|
var MAX_LIVENESS_ATTEMPTS$1 = 3;
|
|
@@ -52301,6 +52577,8 @@
|
|
|
52301
52577
|
view = _ref$view === void 0 ? EMPTY_VIEW : _ref$view,
|
|
52302
52578
|
theme = _ref.theme,
|
|
52303
52579
|
className = _ref.className,
|
|
52580
|
+
lang = _ref.lang,
|
|
52581
|
+
debugMode = _ref.debugMode,
|
|
52304
52582
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
52305
52583
|
geolocationRequired = _ref.geolocationRequired,
|
|
52306
52584
|
remoteDiagnostics = _ref.remoteDiagnostics,
|
|
@@ -52329,6 +52607,9 @@
|
|
|
52329
52607
|
onExitAfterFailure = _ref.onExitAfterFailure;
|
|
52330
52608
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
52331
52609
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded);
|
|
52610
|
+
useMountOnlyWarnings(variant === 'identification' ? 'CustomerIdentificationFlow' : 'CustomerVerificationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
52611
|
+
capture: controllerCapture
|
|
52612
|
+
});
|
|
52332
52613
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
52333
52614
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
52334
52615
|
// These flows drive the live-check themselves, per capture, and read its
|
|
@@ -52360,7 +52641,10 @@
|
|
|
52360
52641
|
// Only the auto-continue half applies here: the plain SelfieCaptureView has
|
|
52361
52642
|
// no capture review screen to skip (that is FaceLivenessView's), and this
|
|
52362
52643
|
// flow's own terminal screens are governed by `skipSuccessScreen` below.
|
|
52363
|
-
var resolvedView = _extends$1({}, view, {
|
|
52644
|
+
var resolvedView = _extends$1({}, inheritFlowSettings(view, {
|
|
52645
|
+
lang: lang,
|
|
52646
|
+
debugMode: debugMode
|
|
52647
|
+
}), {
|
|
52364
52648
|
autoContinueAfterLoading: impliedAutoContinueAfterLoading(view.autoContinueAfterLoading, introActive)
|
|
52365
52649
|
});
|
|
52366
52650
|
// Reset during render, not in an effect: an auto-requesting capture stage
|
|
@@ -52455,6 +52739,7 @@
|
|
|
52455
52739
|
submission: submission,
|
|
52456
52740
|
theme: theme,
|
|
52457
52741
|
className: className,
|
|
52742
|
+
lang: lang,
|
|
52458
52743
|
geolocationEnabled: geolocationEnabled,
|
|
52459
52744
|
geolocationRequired: geolocationRequired,
|
|
52460
52745
|
remoteDiagnostics: remoteDiagnostics,
|
|
@@ -54194,7 +54479,7 @@
|
|
|
54194
54479
|
// post-submission diagnostics page on this one flag
|
|
54195
54480
|
// (CompositeWizard.tsx:381, `if (debugMode) return <SubmissionSuccess />`);
|
|
54196
54481
|
// here the capture-surface overlays live on `view.debugMode` (mapIdCapture)
|
|
54197
|
-
// while the terminal page needs `
|
|
54482
|
+
// while the terminal page needs `showResultScreen` to render at all and
|
|
54198
54483
|
// `showDiagnostics` to include the request/response bodies. Mapping only
|
|
54199
54484
|
// the first left `debugMode` customers on a blank screen after submitting,
|
|
54200
54485
|
// because CompositeWizard falls through to `return null`.
|
|
@@ -54202,7 +54487,7 @@
|
|
|
54202
54487
|
// Both take the same flag: sdk2's page showed the response body (behind a
|
|
54203
54488
|
// toggle) whenever debugMode was on, so gating diagnostics separately here
|
|
54204
54489
|
// would be a NEW restriction, not parity.
|
|
54205
|
-
|
|
54490
|
+
showResultScreen: props.debugMode,
|
|
54206
54491
|
showDiagnostics: props.debugMode,
|
|
54207
54492
|
// `onSubmit` is NOT mapped to a flow prop: it goes to the client config
|
|
54208
54493
|
// (see mapClientConfig), which is the layer sdk2 put it at and the only
|
|
@@ -54383,7 +54668,7 @@
|
|
|
54383
54668
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
54384
54669
|
loadingSpinner: props.loadingSpinner,
|
|
54385
54670
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
54386
|
-
|
|
54671
|
+
showResultScreen: props.debugMode,
|
|
54387
54672
|
showDiagnostics: props.debugMode,
|
|
54388
54673
|
onStepStarted: emit ? function (stepId) {
|
|
54389
54674
|
var stage = journeyStageForStepId(stepId);
|
|
@@ -54505,7 +54790,7 @@
|
|
|
54505
54790
|
// both the boolean and async callback forms at the flow-level seam.
|
|
54506
54791
|
//
|
|
54507
54792
|
// `debugMode` forces it back on, completing the fold mapIdValidationProps
|
|
54508
|
-
// does with `
|
|
54793
|
+
// does with `showResultScreen`/`showDiagnostics`: the capture readout
|
|
54509
54794
|
// renders INSIDE the review, so a consumer who skips the review and turns
|
|
54510
54795
|
// debugMode on would otherwise get the switch with nowhere for it to show
|
|
54511
54796
|
// — silently, in the one configuration it exists for.
|
|
@@ -54676,7 +54961,7 @@
|
|
|
54676
54961
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
54677
54962
|
loadingSpinner: props.loadingSpinner,
|
|
54678
54963
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
54679
|
-
|
|
54964
|
+
showResultScreen: props.debugMode,
|
|
54680
54965
|
showDiagnostics: props.debugMode,
|
|
54681
54966
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
54682
54967
|
onRequestFailure: props.onRequestFailure,
|
|
@@ -54907,7 +55192,7 @@
|
|
|
54907
55192
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
54908
55193
|
loadingSpinner: props.loadingSpinner,
|
|
54909
55194
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
54910
|
-
|
|
55195
|
+
showResultScreen: props.debugMode,
|
|
54911
55196
|
showDiagnostics: props.debugMode,
|
|
54912
55197
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
54913
55198
|
// sdk2's enrollment twin of `onApproved`.
|
|
@@ -55000,7 +55285,7 @@
|
|
|
55000
55285
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
55001
55286
|
loadingSpinner: props.loadingSpinner,
|
|
55002
55287
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
55003
|
-
|
|
55288
|
+
showResultScreen: props.debugMode,
|
|
55004
55289
|
showDiagnostics: props.debugMode,
|
|
55005
55290
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
55006
55291
|
onApproved: withSubmissionRequest(props.onEnrolled, ctx),
|
|
@@ -55010,7 +55295,7 @@
|
|
|
55010
55295
|
});
|
|
55011
55296
|
}
|
|
55012
55297
|
|
|
55013
|
-
var webSdkVersion = '2.6.3-changeset-release-develop-
|
|
55298
|
+
var webSdkVersion = '2.6.3-changeset-release-develop-124a427';
|
|
55014
55299
|
|
|
55015
55300
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
55016
55301
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|