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
|
@@ -29,7 +29,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefaultCompat(ReactDOM);
|
|
|
29
29
|
|
|
30
30
|
// Extracted from the barrel so modules inside this package can read the
|
|
31
31
|
// version without importing index.ts (which would be circular).
|
|
32
|
-
var webSdkUiVersion = '0.
|
|
32
|
+
var webSdkUiVersion = '0.6.0';
|
|
33
33
|
|
|
34
34
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
35
35
|
try {
|
|
@@ -457,17 +457,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
-
function _arrayLikeToArray$
|
|
460
|
+
function _arrayLikeToArray$w(r, a) {
|
|
461
461
|
(null == a || a > r.length) && (a = r.length);
|
|
462
462
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
463
463
|
return n;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
function _unsupportedIterableToArray$
|
|
466
|
+
function _unsupportedIterableToArray$w(r, a) {
|
|
467
467
|
if (r) {
|
|
468
|
-
if ("string" == typeof r) return _arrayLikeToArray$
|
|
468
|
+
if ("string" == typeof r) return _arrayLikeToArray$w(r, a);
|
|
469
469
|
var t = {}.toString.call(r).slice(8, -1);
|
|
470
|
-
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$
|
|
470
|
+
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$w(r, a) : void 0;
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
|
|
@@ -476,11 +476,11 @@ function _nonIterableRest() {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
function _slicedToArray(r, e) {
|
|
479
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$
|
|
479
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$w(r, e) || _nonIterableRest();
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
function _arrayWithoutHoles(r) {
|
|
483
|
-
if (Array.isArray(r)) return _arrayLikeToArray$
|
|
483
|
+
if (Array.isArray(r)) return _arrayLikeToArray$w(r);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
function _iterableToArray(r) {
|
|
@@ -492,10 +492,10 @@ function _nonIterableSpread() {
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
function _toConsumableArray(r) {
|
|
495
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
495
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$w(r) || _nonIterableSpread();
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
-
var webSdkCoreVersion = '0.
|
|
498
|
+
var webSdkCoreVersion = '0.6.0';
|
|
499
499
|
|
|
500
500
|
var maxTime = 86400000;
|
|
501
501
|
var maxCount = 1000000;
|
|
@@ -1267,9 +1267,9 @@ var attemptStatuses = ["active", "completed", "failed", "superseded", "disposed"
|
|
|
1267
1267
|
({
|
|
1268
1268
|
workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
|
|
1269
1269
|
|
|
1270
|
-
function _createForOfIteratorHelperLoose$
|
|
1271
|
-
function _unsupportedIterableToArray$
|
|
1272
|
-
function _arrayLikeToArray$
|
|
1270
|
+
function _createForOfIteratorHelperLoose$v(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$v(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."); }
|
|
1271
|
+
function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(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$v(r, a) : void 0; } }
|
|
1272
|
+
function _arrayLikeToArray$v(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; }
|
|
1273
1273
|
var maximumBytes = 32 * 1024;
|
|
1274
1274
|
var maximumTime = 86400000;
|
|
1275
1275
|
var uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -1337,7 +1337,7 @@ function validateSnapshot(report) {
|
|
|
1337
1337
|
unique(report.phaseTotals.map(function (total) {
|
|
1338
1338
|
return total.phase;
|
|
1339
1339
|
}));
|
|
1340
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1340
|
+
for (var _iterator = _createForOfIteratorHelperLoose$v(report.phaseTotals), _step; !(_step = _iterator()).done;) {
|
|
1341
1341
|
var _total4 = _step.value;
|
|
1342
1342
|
requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
|
|
1343
1343
|
durationValid(_total4.duration);
|
|
@@ -1359,7 +1359,7 @@ function validateSnapshot(report) {
|
|
|
1359
1359
|
requireValid(report.recentTransitions.length <= 32);
|
|
1360
1360
|
var index = 0;
|
|
1361
1361
|
var atMs = 0;
|
|
1362
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1362
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$v(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
|
|
1363
1363
|
var transition = _step2.value;
|
|
1364
1364
|
requireValid(member(transitionKinds, transition.kind));
|
|
1365
1365
|
requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
|
|
@@ -1383,12 +1383,12 @@ function validateSnapshot(report) {
|
|
|
1383
1383
|
unique(report.controllerGuidanceTotals.map(function (total) {
|
|
1384
1384
|
return JSON.stringify([total.phase, total.guidance]);
|
|
1385
1385
|
}));
|
|
1386
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1386
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$v(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
|
|
1387
1387
|
var _total2 = _step3.value;
|
|
1388
1388
|
durationValid(_total2.duration);
|
|
1389
1389
|
exposureValid(_total2.phase, _total2.exposure);
|
|
1390
1390
|
}
|
|
1391
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1391
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$v(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
|
|
1392
1392
|
var _total3 = _step4.value;
|
|
1393
1393
|
durationValid(_total3.duration);
|
|
1394
1394
|
guidanceValid(_total3.phase, _total3.guidance, false);
|
|
@@ -1422,7 +1422,7 @@ function encodeProgressBatch(batch) {
|
|
|
1422
1422
|
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));
|
|
1423
1423
|
var reports = [];
|
|
1424
1424
|
var dropped = [];
|
|
1425
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1425
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$v(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
|
|
1426
1426
|
var report = _step5.value;
|
|
1427
1427
|
try {
|
|
1428
1428
|
validateSnapshot(report);
|
|
@@ -1451,9 +1451,9 @@ function encodeProgressBatch(batch) {
|
|
|
1451
1451
|
};
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
1454
|
-
function _createForOfIteratorHelperLoose$
|
|
1455
|
-
function _unsupportedIterableToArray$
|
|
1456
|
-
function _arrayLikeToArray$
|
|
1454
|
+
function _createForOfIteratorHelperLoose$u(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$u(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."); }
|
|
1455
|
+
function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(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$u(r, a) : void 0; } }
|
|
1456
|
+
function _arrayLikeToArray$u(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; }
|
|
1457
1457
|
/** Visible time without progress in a capture phase that arms a stream. */
|
|
1458
1458
|
var stallMs = 20000;
|
|
1459
1459
|
var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
|
|
@@ -1516,7 +1516,7 @@ function createSessionActor(options, deps) {
|
|
|
1516
1516
|
var due = new Map();
|
|
1517
1517
|
var eligibilityRetries = new Map();
|
|
1518
1518
|
function dropped(report) {
|
|
1519
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1519
|
+
for (var _iterator = _createForOfIteratorHelperLoose$u(streams), _step; !(_step = _iterator()).done;) {
|
|
1520
1520
|
var stream = _step.value;
|
|
1521
1521
|
if (stream.state.report.streamId === report.streamId) stream.state = _extends({}, stream.state, {
|
|
1522
1522
|
report: _extends({}, stream.state.report, {
|
|
@@ -1561,7 +1561,7 @@ function createSessionActor(options, deps) {
|
|
|
1561
1561
|
var retained = new Set(queued.map(function (report) {
|
|
1562
1562
|
return report.sequence;
|
|
1563
1563
|
}));
|
|
1564
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1564
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$u(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
|
|
1565
1565
|
var _sequence = _step2.value;
|
|
1566
1566
|
if (!retained.has(_sequence)) due["delete"](_sequence);
|
|
1567
1567
|
}
|
|
@@ -1574,7 +1574,7 @@ function createSessionActor(options, deps) {
|
|
|
1574
1574
|
var keys = new Set(reports.map(function (report) {
|
|
1575
1575
|
return report.sequence;
|
|
1576
1576
|
}));
|
|
1577
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1577
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$u(pending), _step3; !(_step3 = _iterator3()).done;) {
|
|
1578
1578
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
1579
1579
|
key = _step3$value[0],
|
|
1580
1580
|
report = _step3$value[1];
|
|
@@ -1598,14 +1598,14 @@ function createSessionActor(options, deps) {
|
|
|
1598
1598
|
if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
|
|
1599
1599
|
return report.context === context;
|
|
1600
1600
|
})) emergency = null;
|
|
1601
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1601
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$u(pending), _step4; !(_step4 = _iterator4()).done;) {
|
|
1602
1602
|
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
1603
1603
|
key = _step4$value[0],
|
|
1604
1604
|
report = _step4$value[1];
|
|
1605
1605
|
if (report.context === context) pending["delete"](key);
|
|
1606
1606
|
}
|
|
1607
1607
|
for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
|
|
1608
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1608
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$u(streams), _step5; !(_step5 = _iterator5()).done;) {
|
|
1609
1609
|
var stream = _step5.value;
|
|
1610
1610
|
if (stream.state.report.context === context) {
|
|
1611
1611
|
stream.disposed = true;
|
|
@@ -1634,7 +1634,7 @@ function createSessionActor(options, deps) {
|
|
|
1634
1634
|
unsubscribe();
|
|
1635
1635
|
cancelTimer == null || cancelTimer();
|
|
1636
1636
|
cancelRequest == null || cancelRequest();
|
|
1637
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
1637
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$u(streams), _step6; !(_step6 = _iterator6()).done;) {
|
|
1638
1638
|
var stream = _step6.value;
|
|
1639
1639
|
stream.disposed = true;
|
|
1640
1640
|
}
|
|
@@ -1656,7 +1656,7 @@ function createSessionActor(options, deps) {
|
|
|
1656
1656
|
sentAtUnixMs: Math.floor(deps.unixMs()),
|
|
1657
1657
|
reports: reports
|
|
1658
1658
|
});
|
|
1659
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
1659
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$u(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
|
|
1660
1660
|
var report = _step7.value;
|
|
1661
1661
|
dropped(report);
|
|
1662
1662
|
removeReports([report]);
|
|
@@ -1838,14 +1838,14 @@ function createSessionActor(options, deps) {
|
|
|
1838
1838
|
retries = 0;
|
|
1839
1839
|
failureStreak = 0;
|
|
1840
1840
|
} else if (result.kind === "permanent") {
|
|
1841
|
-
for (_iterator11 = _createForOfIteratorHelperLoose$
|
|
1841
|
+
for (_iterator11 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step11 = _iterator11()).done;) {
|
|
1842
1842
|
report = _step11.value;
|
|
1843
1843
|
disable(report.context);
|
|
1844
1844
|
}
|
|
1845
1845
|
} else {
|
|
1846
1846
|
backoff(result);
|
|
1847
1847
|
if (++retries > 3) {
|
|
1848
|
-
for (_iterator12 = _createForOfIteratorHelperLoose$
|
|
1848
|
+
for (_iterator12 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step12 = _iterator12()).done;) {
|
|
1849
1849
|
_report = _step12.value;
|
|
1850
1850
|
dropped(_report);
|
|
1851
1851
|
}
|
|
@@ -1873,7 +1873,7 @@ function createSessionActor(options, deps) {
|
|
|
1873
1873
|
backoff({});
|
|
1874
1874
|
if (authorizing) failedEligibility(authorizing);
|
|
1875
1875
|
if (frozen && ++retries > 3) {
|
|
1876
|
-
for (_iterator13 = _createForOfIteratorHelperLoose$
|
|
1876
|
+
for (_iterator13 = _createForOfIteratorHelperLoose$u(frozen.reports); !(_step13 = _iterator13()).done;) {
|
|
1877
1877
|
_report2 = _step13.value;
|
|
1878
1878
|
dropped(_report2);
|
|
1879
1879
|
}
|
|
@@ -1928,7 +1928,7 @@ function createSessionActor(options, deps) {
|
|
|
1928
1928
|
if (outcome.kind === "committed") {
|
|
1929
1929
|
if (emergency === sending) emergency = null;
|
|
1930
1930
|
} else if (outcome.kind === "permanent") {
|
|
1931
|
-
for (var _iterator8 = _createForOfIteratorHelperLoose$
|
|
1931
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose$u(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
1932
1932
|
var report = _step8.value;
|
|
1933
1933
|
disable(report.context);
|
|
1934
1934
|
}
|
|
@@ -1997,7 +1997,7 @@ function createSessionActor(options, deps) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
function tick() {
|
|
1999
1999
|
if (disposed || visibility === "hidden") return;
|
|
2000
|
-
for (var _iterator9 = _createForOfIteratorHelperLoose$
|
|
2000
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose$u(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
2001
2001
|
var stream = _step9.value;
|
|
2002
2002
|
var report = prepareDeadline(stream);
|
|
2003
2003
|
if (!(report != null && report.current)) continue;
|
|
@@ -2028,7 +2028,7 @@ function createSessionActor(options, deps) {
|
|
|
2028
2028
|
if (disposed || visibility === "hidden") return;
|
|
2029
2029
|
var delay = Infinity;
|
|
2030
2030
|
if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
|
|
2031
|
-
for (var _iterator0 = _createForOfIteratorHelperLoose$
|
|
2031
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose$u(streams), _step0; !(_step0 = _iterator0()).done;) {
|
|
2032
2032
|
var stream = _step0.value;
|
|
2033
2033
|
var report = prepareDeadline(stream);
|
|
2034
2034
|
if (!(report != null && report.current)) continue;
|
|
@@ -2125,7 +2125,7 @@ function createSessionActor(options, deps) {
|
|
|
2125
2125
|
return guard$2(function () {
|
|
2126
2126
|
if (disposed || next === visibility) return;
|
|
2127
2127
|
visibility = next;
|
|
2128
|
-
for (var _iterator1 = _createForOfIteratorHelperLoose$
|
|
2128
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose$u(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2129
2129
|
var stream = _step1.value;
|
|
2130
2130
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2131
2131
|
armIfStalled(stream);
|
|
@@ -2167,7 +2167,7 @@ function createSessionActor(options, deps) {
|
|
|
2167
2167
|
if (taskDisposed) return;
|
|
2168
2168
|
taskDisposed = true;
|
|
2169
2169
|
if (workflowStream) close(workflowStream, "disposed");
|
|
2170
|
-
for (var _iterator10 = _createForOfIteratorHelperLoose$
|
|
2170
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose$u(captures), _step10; !(_step10 = _iterator10()).done;) {
|
|
2171
2171
|
var capture = _step10.value;
|
|
2172
2172
|
capture.dispose();
|
|
2173
2173
|
}
|
|
@@ -3562,9 +3562,9 @@ function blobToB64(blob) {
|
|
|
3562
3562
|
});
|
|
3563
3563
|
}
|
|
3564
3564
|
|
|
3565
|
-
function _createForOfIteratorHelperLoose$
|
|
3566
|
-
function _unsupportedIterableToArray$
|
|
3567
|
-
function _arrayLikeToArray$
|
|
3565
|
+
function _createForOfIteratorHelperLoose$t(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$t(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."); }
|
|
3566
|
+
function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(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$t(r, a) : void 0; } }
|
|
3567
|
+
function _arrayLikeToArray$t(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; }
|
|
3568
3568
|
/**
|
|
3569
3569
|
* Parser for AAMVA (American Association of Motor Vehicle Administrators)
|
|
3570
3570
|
* PDF417 barcode data found on US and Canadian driver's licenses.
|
|
@@ -3826,7 +3826,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3826
3826
|
DAD: false
|
|
3827
3827
|
};
|
|
3828
3828
|
var daaValue = null;
|
|
3829
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
3829
|
+
for (var _iterator = _createForOfIteratorHelperLoose$t(lines), _step; !(_step = _iterator()).done;) {
|
|
3830
3830
|
var line = _step.value;
|
|
3831
3831
|
var match = line.match(fieldRegex);
|
|
3832
3832
|
if (match) {
|
|
@@ -3867,7 +3867,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3867
3867
|
result.fields.push(field);
|
|
3868
3868
|
}
|
|
3869
3869
|
};
|
|
3870
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
3870
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$t(daaFields), _step2; !(_step2 = _iterator2()).done;) {
|
|
3871
3871
|
_loop();
|
|
3872
3872
|
}
|
|
3873
3873
|
}
|
|
@@ -5937,6 +5937,131 @@ function useLatestCallbacks(config) {
|
|
|
5937
5937
|
})[0];
|
|
5938
5938
|
}
|
|
5939
5939
|
|
|
5940
|
+
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
5941
|
+
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
5942
|
+
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
5943
|
+
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
5944
|
+
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
5945
|
+
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
5946
|
+
// LogLevel.X` comparisons behave identically.
|
|
5947
|
+
var noop = function noop() {};
|
|
5948
|
+
var debug = function debug() {
|
|
5949
|
+
return (noop).apply(void 0, arguments);
|
|
5950
|
+
}; // eslint-disable-line no-console
|
|
5951
|
+
var log = function log() {
|
|
5952
|
+
return (noop).apply(void 0, arguments);
|
|
5953
|
+
}; // eslint-disable-line no-console
|
|
5954
|
+
var warn = function warn() {
|
|
5955
|
+
return (console.warn ).apply(void 0, arguments);
|
|
5956
|
+
}; // eslint-disable-line no-console
|
|
5957
|
+
var error = function error() {
|
|
5958
|
+
return (console.error ).apply(void 0, arguments);
|
|
5959
|
+
}; // eslint-disable-line no-console
|
|
5960
|
+
|
|
5961
|
+
function _createForOfIteratorHelperLoose$s(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$s(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."); }
|
|
5962
|
+
function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(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$s(r, a) : void 0; } }
|
|
5963
|
+
function _arrayLikeToArray$s(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; }
|
|
5964
|
+
/**
|
|
5965
|
+
* True unless the host bundle was built for production.
|
|
5966
|
+
*
|
|
5967
|
+
* Follows the `"development"` convention that React and mainstream
|
|
5968
|
+
* bundlers use, and that `websdk-compat`'s rollup build defines. Read inside a
|
|
5969
|
+
* `try` because unbundled ESM has no `process`; that case counts as
|
|
5970
|
+
* production, so a missing define never adds console output.
|
|
5971
|
+
*/
|
|
5972
|
+
function isDevelopment() {
|
|
5973
|
+
try {
|
|
5974
|
+
return "development" !== 'production';
|
|
5975
|
+
} catch (_unused) {
|
|
5976
|
+
return false;
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
/**
|
|
5980
|
+
* Plain objects and arrays are compared field by field, so an inline literal
|
|
5981
|
+
* rebuilt every render with the same values is not a change. Anything else
|
|
5982
|
+
* (class instances, DOM nodes, blobs) is compared by identity.
|
|
5983
|
+
*/
|
|
5984
|
+
function isPlainContainer(value) {
|
|
5985
|
+
if (Array.isArray(value)) return true;
|
|
5986
|
+
if (typeof value !== 'object' || value === null) return false;
|
|
5987
|
+
var prototype = Object.getPrototypeOf(value);
|
|
5988
|
+
return prototype === Object.prototype || prototype === null;
|
|
5989
|
+
}
|
|
5990
|
+
/**
|
|
5991
|
+
* Callbacks the flows wrap with `useLatestCallbacks`: a bag's own top-level
|
|
5992
|
+
* functions and those of its `liveness` sub-bag. Replacing or removing one of
|
|
5993
|
+
* these is live. Any other function (such as `io.acquireCamera`) is a
|
|
5994
|
+
* controller dependency fixed at mount, so it compares by identity.
|
|
5995
|
+
*/
|
|
5996
|
+
var LIVE_CALLBACK_PATH = /^[^.[\]]+(\.liveness)?\.[^.[\]]+$/;
|
|
5997
|
+
/**
|
|
5998
|
+
* Every leaf whose value differs between `before` and `after`.
|
|
5999
|
+
*
|
|
6000
|
+
* A live callback's new implementation, or its removal, is not reported. A
|
|
6001
|
+
* callback ADDED after mount is, because only callbacks present at mount are
|
|
6002
|
+
* wrapped. An absent field and an explicit `undefined` are the same value.
|
|
6003
|
+
*/
|
|
6004
|
+
function mountOnlyChanges(before, after, path) {
|
|
6005
|
+
if (Object.is(before, after)) return [];
|
|
6006
|
+
if (typeof before === 'function' && (typeof after === 'function' || after === undefined) && LIVE_CALLBACK_PATH.test(path)) {
|
|
6007
|
+
return [];
|
|
6008
|
+
}
|
|
6009
|
+
if (!isPlainContainer(before) || !isPlainContainer(after) || Array.isArray(before) !== Array.isArray(after)) {
|
|
6010
|
+
return [{
|
|
6011
|
+
path: path,
|
|
6012
|
+
before: before,
|
|
6013
|
+
after: after
|
|
6014
|
+
}];
|
|
6015
|
+
}
|
|
6016
|
+
var keys = new Set([].concat(_toConsumableArray(Object.keys(before)), _toConsumableArray(Object.keys(after))));
|
|
6017
|
+
return _toConsumableArray(keys).flatMap(function (key) {
|
|
6018
|
+
return mountOnlyChanges(before[key], after[key], Array.isArray(before) ? path + "[" + key + "]" : path + "." + key);
|
|
6019
|
+
});
|
|
6020
|
+
}
|
|
6021
|
+
/**
|
|
6022
|
+
* Whether a value is small and safe enough to print. Long strings are left
|
|
6023
|
+
* out: capture bags can carry image data (`precapturedDocuments`), which is
|
|
6024
|
+
* both personal data and too large to be useful in a warning.
|
|
6025
|
+
*/
|
|
6026
|
+
var isPrintable = function isPrintable(value) {
|
|
6027
|
+
return value === null || value === undefined || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string' && value.length <= 64;
|
|
6028
|
+
};
|
|
6029
|
+
var describe = function describe(value) {
|
|
6030
|
+
return typeof value === 'string' ? JSON.stringify(value) : String(value);
|
|
6031
|
+
};
|
|
6032
|
+
/**
|
|
6033
|
+
* In development builds, warns once per input path when a value in `inputs`
|
|
6034
|
+
* differs from its value at mount. Does nothing in production.
|
|
6035
|
+
*
|
|
6036
|
+
* `owner` names the component or hook in the message, and `remedy` finishes
|
|
6037
|
+
* the sentence "To change it, …". Pass only inputs that really are mount-only:
|
|
6038
|
+
* a live input passed here would warn about a change that did take effect.
|
|
6039
|
+
*/
|
|
6040
|
+
function useMountOnlyWarnings(owner, remedy, inputs) {
|
|
6041
|
+
var mounted = React.useRef(inputs);
|
|
6042
|
+
var warned = React.useRef(new Set());
|
|
6043
|
+
React.useEffect(function () {
|
|
6044
|
+
if (!isDevelopment()) return;
|
|
6045
|
+
for (var _i = 0, _Object$entries = Object.entries(inputs); _i < _Object$entries.length; _i++) {
|
|
6046
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
6047
|
+
name = _Object$entries$_i[0],
|
|
6048
|
+
value = _Object$entries$_i[1];
|
|
6049
|
+
for (var _iterator = _createForOfIteratorHelperLoose$s(mountOnlyChanges(mounted.current[name], value, name)), _step; !(_step = _iterator()).done;) {
|
|
6050
|
+
var _step$value = _step.value,
|
|
6051
|
+
path = _step$value.path,
|
|
6052
|
+
before = _step$value.before,
|
|
6053
|
+
after = _step$value.after;
|
|
6054
|
+
if (warned.current.has(path)) continue;
|
|
6055
|
+
warned.current.add(path);
|
|
6056
|
+
var values = isPrintable(before) && isPrintable(after) ? " (" + describe(before) + " \u2192 " + describe(after) + ")" : '';
|
|
6057
|
+
warn("[" + owner + "] `" + path + "` changed after mount" + values + " and was ignored: " + (owner + " reads it once, at mount. To change it, " + remedy + "."));
|
|
6058
|
+
}
|
|
6059
|
+
}
|
|
6060
|
+
});
|
|
6061
|
+
}
|
|
6062
|
+
/** The `remedy` every flow gives for a changed capture-bag field. */
|
|
6063
|
+
var FLOW_MOUNT_ONLY_REMEDY = 'remount the flow with a React `key`, or pass your own controller';
|
|
6064
|
+
|
|
5940
6065
|
var useIsomorphicLayoutEffect$1 = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
|
5941
6066
|
/**
|
|
5942
6067
|
* Uploads documents to the IDmission document service, one independent call
|
|
@@ -7448,12 +7573,17 @@ var SdkLanguageContext = /*#__PURE__*/React.createContext(undefined);
|
|
|
7448
7573
|
* Binds one rendered SDK tree to its requested language. A fixed translator
|
|
7449
7574
|
* avoids waiting for a post-render changeLanguage() effect and keeps SSR and
|
|
7450
7575
|
* concurrently mounted SDK views independent of the shared detector instance.
|
|
7576
|
+
*
|
|
7577
|
+
* An unset `lang` keeps whatever scope encloses it (or none), so a caller can
|
|
7578
|
+
* render the provider unconditionally: toggling `lang` between unset and set
|
|
7579
|
+
* then never changes the element tree, and never remounts the subtree.
|
|
7451
7580
|
*/
|
|
7452
7581
|
function SdkLanguageProvider(_ref) {
|
|
7453
7582
|
var children = _ref.children,
|
|
7454
7583
|
lang = _ref.lang;
|
|
7584
|
+
var inherited = React.useContext(SdkLanguageContext);
|
|
7455
7585
|
return /*#__PURE__*/React.createElement(SdkLanguageContext.Provider, {
|
|
7456
|
-
value: lang === 'auto' ? detectedLanguage : lang
|
|
7586
|
+
value: lang === undefined ? inherited : lang === 'auto' ? detectedLanguage : lang
|
|
7457
7587
|
}, children);
|
|
7458
7588
|
}
|
|
7459
7589
|
/**
|
|
@@ -8522,27 +8652,6 @@ function evaluateIsMobile$1(nav) {
|
|
|
8522
8652
|
return false;
|
|
8523
8653
|
}
|
|
8524
8654
|
|
|
8525
|
-
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
8526
|
-
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
8527
|
-
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
8528
|
-
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
8529
|
-
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
8530
|
-
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
8531
|
-
// LogLevel.X` comparisons behave identically.
|
|
8532
|
-
var noop = function noop() {};
|
|
8533
|
-
var debug = function debug() {
|
|
8534
|
-
return (noop).apply(void 0, arguments);
|
|
8535
|
-
}; // eslint-disable-line no-console
|
|
8536
|
-
var log = function log() {
|
|
8537
|
-
return (noop).apply(void 0, arguments);
|
|
8538
|
-
}; // eslint-disable-line no-console
|
|
8539
|
-
var warn = function warn() {
|
|
8540
|
-
return (console.warn ).apply(void 0, arguments);
|
|
8541
|
-
}; // eslint-disable-line no-console
|
|
8542
|
-
var error = function error() {
|
|
8543
|
-
return (console.error ).apply(void 0, arguments);
|
|
8544
|
-
}; // eslint-disable-line no-console
|
|
8545
|
-
|
|
8546
8655
|
var _excluded$g = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
|
|
8547
8656
|
_excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
|
|
8548
8657
|
var _templateObject$T, _templateObject2$L, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$j, _templateObject7$g;
|
|
@@ -39329,15 +39438,15 @@ var Root = styledComponents.styled.div(_templateObject$2 || (_templateObject$2 =
|
|
|
39329
39438
|
var Label = styledComponents.styled.span(_templateObject2$2 || (_templateObject2$2 = _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"])));
|
|
39330
39439
|
|
|
39331
39440
|
function CompositeWizard(_ref) {
|
|
39332
|
-
var _successScreen$isAppr;
|
|
39441
|
+
var _successScreen$isAppr, _ref2;
|
|
39333
39442
|
var steps = _ref.steps,
|
|
39334
39443
|
sessionReadyProp = _ref.sessionReady,
|
|
39335
39444
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
39336
39445
|
initialArtifacts = _ref$initialArtifacts === void 0 ? {} : _ref$initialArtifacts,
|
|
39337
39446
|
_ref$captureOnly = _ref.captureOnly,
|
|
39338
39447
|
captureOnly = _ref$captureOnly === void 0 ? false : _ref$captureOnly,
|
|
39339
|
-
|
|
39340
|
-
showSuccessScreen = _ref
|
|
39448
|
+
showResultScreen = _ref.showResultScreen,
|
|
39449
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
39341
39450
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
39342
39451
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
39343
39452
|
successClassNames = _ref.successClassNames,
|
|
@@ -39487,7 +39596,7 @@ function CompositeWizard(_ref) {
|
|
|
39487
39596
|
classNames: successScreen.classNames
|
|
39488
39597
|
});
|
|
39489
39598
|
}
|
|
39490
|
-
if (submissionStatus === SubmissionStatus.SUBMITTED && submissionResponse && showSuccessScreen) {
|
|
39599
|
+
if (submissionStatus === SubmissionStatus.SUBMITTED && submissionResponse && ((_ref2 = showResultScreen != null ? showResultScreen : showSuccessScreen) != null ? _ref2 : false)) {
|
|
39491
39600
|
return jsxRuntime.jsx(SubmissionSuccess, {
|
|
39492
39601
|
response: submissionResponse,
|
|
39493
39602
|
request: lastSubmissionRequest,
|
|
@@ -39524,8 +39633,8 @@ function capturedArtifactLabels(artifacts) {
|
|
|
39524
39633
|
});
|
|
39525
39634
|
return labels;
|
|
39526
39635
|
}
|
|
39527
|
-
function SubmittingScreen(
|
|
39528
|
-
var text =
|
|
39636
|
+
function SubmittingScreen(_ref3) {
|
|
39637
|
+
var text = _ref3.text;
|
|
39529
39638
|
return jsxRuntime.jsx(OrbStatusScreen, {
|
|
39530
39639
|
state: "working",
|
|
39531
39640
|
text: text,
|
|
@@ -40284,7 +40393,7 @@ function RemoteDiagnosticsMount(_ref) {
|
|
|
40284
40393
|
}
|
|
40285
40394
|
|
|
40286
40395
|
var _templateObject$1, _templateObject2$1, _templateObject3, _templateObject4;
|
|
40287
|
-
var _excluded$9 = ["client", "action", "submission", "theme", "className", "geolocationEnabled", "geolocationRequired", "captureProgress", "remoteDiagnostics", "loadingSpinner", "showEnrollmentId", "children"];
|
|
40396
|
+
var _excluded$9 = ["client", "action", "submission", "theme", "className", "geolocationEnabled", "geolocationRequired", "captureProgress", "remoteDiagnostics", "loadingSpinner", "showEnrollmentId", "lang", "children"];
|
|
40288
40397
|
function FlowChassis(_ref) {
|
|
40289
40398
|
var client = _ref.client,
|
|
40290
40399
|
action = _ref.action,
|
|
@@ -40301,6 +40410,7 @@ function FlowChassis(_ref) {
|
|
|
40301
40410
|
loadingSpinner = _ref.loadingSpinner,
|
|
40302
40411
|
_ref$showEnrollmentId = _ref.showEnrollmentId,
|
|
40303
40412
|
showEnrollmentId = _ref$showEnrollmentId === void 0 ? false : _ref$showEnrollmentId,
|
|
40413
|
+
lang = _ref.lang,
|
|
40304
40414
|
children = _ref.children,
|
|
40305
40415
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
40306
40416
|
var geolocation = useGeolocation(geolocationEnabled);
|
|
@@ -40310,26 +40420,29 @@ function FlowChassis(_ref) {
|
|
|
40310
40420
|
client: client,
|
|
40311
40421
|
children: [jsxRuntime.jsx(RemoteDiagnosticsMount, {
|
|
40312
40422
|
remoteDiagnostics: remoteDiagnostics
|
|
40313
|
-
}), jsxRuntime.jsx(
|
|
40314
|
-
|
|
40315
|
-
children: jsxRuntime.jsx(
|
|
40316
|
-
|
|
40317
|
-
children: jsxRuntime.jsx(
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
|
|
40329
|
-
|
|
40423
|
+
}), jsxRuntime.jsx(SdkLanguageProvider, {
|
|
40424
|
+
lang: lang,
|
|
40425
|
+
children: jsxRuntime.jsx(ThemeProvider, {
|
|
40426
|
+
theme: theme,
|
|
40427
|
+
children: jsxRuntime.jsx(LoadingSpinnerProvider, {
|
|
40428
|
+
spinner: loadingSpinner,
|
|
40429
|
+
children: jsxRuntime.jsx(SubmissionProvider, _extends({
|
|
40430
|
+
client: client,
|
|
40431
|
+
action: action,
|
|
40432
|
+
options: submission,
|
|
40433
|
+
geolocation: geolocation.position
|
|
40434
|
+
}, callbacks, {
|
|
40435
|
+
children: jsxRuntime.jsx(FlowPage, {
|
|
40436
|
+
className: className,
|
|
40437
|
+
enrollmentId: showEnrollmentId ? submission == null ? void 0 : submission.enrollmentId : undefined,
|
|
40438
|
+
children: jsxRuntime.jsx(AuthGate, {
|
|
40439
|
+
children: geolocationRequired && geolocation.blocked ? jsxRuntime.jsx(GeolocationAccessDeniedOverlay, {
|
|
40440
|
+
onRetry: geolocation.retry
|
|
40441
|
+
}) : children
|
|
40442
|
+
})
|
|
40330
40443
|
})
|
|
40331
|
-
})
|
|
40332
|
-
})
|
|
40444
|
+
}))
|
|
40445
|
+
})
|
|
40333
40446
|
})
|
|
40334
40447
|
})]
|
|
40335
40448
|
})
|
|
@@ -40489,6 +40602,26 @@ function impliedSkipSuccessScreen(explicit, introActive) {
|
|
|
40489
40602
|
return explicit != null ? explicit : introActive;
|
|
40490
40603
|
}
|
|
40491
40604
|
|
|
40605
|
+
/**
|
|
40606
|
+
* A step bag with the flow's settings filled in wherever the step leaves them
|
|
40607
|
+
* unset: `step ?? flow`, key by key. The step's own value always wins, an
|
|
40608
|
+
* explicit `false` included, so a flow-wide setting never overrides a step.
|
|
40609
|
+
*
|
|
40610
|
+
* `flow` is typed against the step bag, so a setting the step has no prop for
|
|
40611
|
+
* (`debugMode` on the signature step, say) fails to compile instead of being
|
|
40612
|
+
* forwarded to a component that ignores it.
|
|
40613
|
+
*/
|
|
40614
|
+
function inheritFlowSettings(step, flow) {
|
|
40615
|
+
var inherited = {};
|
|
40616
|
+
for (var key in flow) {
|
|
40617
|
+
if (!Object.prototype.hasOwnProperty.call(flow, key)) continue;
|
|
40618
|
+
if ((step == null ? void 0 : step[key]) === undefined && flow[key] !== undefined) {
|
|
40619
|
+
inherited[key] = flow[key];
|
|
40620
|
+
}
|
|
40621
|
+
}
|
|
40622
|
+
return _extends({}, step, inherited);
|
|
40623
|
+
}
|
|
40624
|
+
|
|
40492
40625
|
function buildRingScreenProps(_ref) {
|
|
40493
40626
|
var ringMode = _ref.ringMode,
|
|
40494
40627
|
finishingVerbiage = _ref.finishingVerbiage,
|
|
@@ -40617,7 +40750,7 @@ function withVirtualCameras(camera, allowVirtualCameras) {
|
|
|
40617
40750
|
return base;
|
|
40618
40751
|
}
|
|
40619
40752
|
|
|
40620
|
-
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"];
|
|
40753
|
+
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"];
|
|
40621
40754
|
var EMPTY_ID_CAPTURE$3 = {};
|
|
40622
40755
|
var EMPTY_SIGNATURE_CAPTURE$5 = {};
|
|
40623
40756
|
var EMPTY_ID_VIEW$3 = {};
|
|
@@ -40629,7 +40762,7 @@ function IdValidationFlow(_ref) {
|
|
|
40629
40762
|
_ref$capture = _ref.capture,
|
|
40630
40763
|
capture = _ref$capture === void 0 ? EMPTY_ID_CAPTURE$3 : _ref$capture,
|
|
40631
40764
|
_ref$view = _ref.view,
|
|
40632
|
-
|
|
40765
|
+
viewProp = _ref$view === void 0 ? EMPTY_ID_VIEW$3 : _ref$view,
|
|
40633
40766
|
_ref$submission = _ref.submission,
|
|
40634
40767
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$6 : _ref$submission,
|
|
40635
40768
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
@@ -40639,14 +40772,17 @@ function IdValidationFlow(_ref) {
|
|
|
40639
40772
|
signatureController = _ref.signatureController,
|
|
40640
40773
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
40641
40774
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$5 : _ref$signatureCapture,
|
|
40642
|
-
|
|
40775
|
+
signatureViewProp = _ref.signatureView,
|
|
40643
40776
|
captureSignature = _ref.captureSignature,
|
|
40644
40777
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
40645
40778
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
40646
40779
|
theme = _ref.theme,
|
|
40647
40780
|
className = _ref.className,
|
|
40648
|
-
|
|
40649
|
-
|
|
40781
|
+
lang = _ref.lang,
|
|
40782
|
+
debugMode = _ref.debugMode,
|
|
40783
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
40784
|
+
showResultScreen = _ref.showResultScreen,
|
|
40785
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
40650
40786
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
40651
40787
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
40652
40788
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -40658,6 +40794,27 @@ function IdValidationFlow(_ref) {
|
|
|
40658
40794
|
onSubmitted = _ref.onSubmitted,
|
|
40659
40795
|
children = _ref.children,
|
|
40660
40796
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
40797
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
40798
|
+
var _useMemo = React.useMemo(function () {
|
|
40799
|
+
return {
|
|
40800
|
+
view: inheritFlowSettings(viewProp, {
|
|
40801
|
+
lang: lang,
|
|
40802
|
+
debugMode: debugMode,
|
|
40803
|
+
skipSuccessScreen: skipSuccessScreen
|
|
40804
|
+
}),
|
|
40805
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
40806
|
+
lang: lang,
|
|
40807
|
+
showCaptureDiagnostics: debugMode,
|
|
40808
|
+
skipSuccessScreen: skipSuccessScreen
|
|
40809
|
+
})
|
|
40810
|
+
};
|
|
40811
|
+
}, [debugMode, lang, signatureViewProp, skipSuccessScreen, viewProp]),
|
|
40812
|
+
view = _useMemo.view,
|
|
40813
|
+
signatureView = _useMemo.signatureView;
|
|
40814
|
+
useMountOnlyWarnings('IdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
40815
|
+
capture: capture,
|
|
40816
|
+
signatureCapture: signatureCapture
|
|
40817
|
+
});
|
|
40661
40818
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
40662
40819
|
var latestCapture = useLatestCallbacks(capture);
|
|
40663
40820
|
var latestSignatureCapture = useLatestCallbacks(signatureCapture);
|
|
@@ -40775,13 +40932,14 @@ function IdValidationFlow(_ref) {
|
|
|
40775
40932
|
action: SubmissionAction.VALIDATE,
|
|
40776
40933
|
submission: submission,
|
|
40777
40934
|
theme: theme,
|
|
40778
|
-
className: className
|
|
40935
|
+
className: className,
|
|
40936
|
+
lang: lang
|
|
40779
40937
|
}, callbacks, {
|
|
40780
40938
|
children: [jsxRuntime.jsx(CompositeWizard, _extends({}, ringScreens, {
|
|
40781
40939
|
steps: steps,
|
|
40782
40940
|
initialArtifacts: initialArtifacts,
|
|
40783
40941
|
captureOnly: captureOnly,
|
|
40784
|
-
|
|
40942
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
40785
40943
|
showDiagnostics: showDiagnostics,
|
|
40786
40944
|
onArtifactsCollected: onCaptured,
|
|
40787
40945
|
onSubmitted: onSubmitted
|
|
@@ -40800,13 +40958,16 @@ function FaceValidationFlow(_ref) {
|
|
|
40800
40958
|
_ref$capture = _ref.capture,
|
|
40801
40959
|
capture = _ref$capture === void 0 ? EMPTY_FACE_CAPTURE$5 : _ref$capture,
|
|
40802
40960
|
_ref$view = _ref.view,
|
|
40803
|
-
|
|
40961
|
+
viewProp = _ref$view === void 0 ? EMPTY_FACE_VIEW$5 : _ref$view,
|
|
40804
40962
|
_ref$submission = _ref.submission,
|
|
40805
40963
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$5 : _ref$submission,
|
|
40806
40964
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
40807
40965
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$8 : _ref$initialArtifacts,
|
|
40808
40966
|
theme = _ref.theme,
|
|
40809
40967
|
className = _ref.className,
|
|
40968
|
+
lang = _ref.lang,
|
|
40969
|
+
debugMode = _ref.debugMode,
|
|
40970
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
40810
40971
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
40811
40972
|
geolocationRequired = _ref.geolocationRequired,
|
|
40812
40973
|
captureProgress = _ref.captureProgress,
|
|
@@ -40815,8 +40976,19 @@ function FaceValidationFlow(_ref) {
|
|
|
40815
40976
|
onCaptured = _ref.onCaptured,
|
|
40816
40977
|
onCaptureError = _ref.onCaptureError,
|
|
40817
40978
|
children = _ref.children;
|
|
40979
|
+
// Flow-wide settings reach the step unless its own bag sets them.
|
|
40980
|
+
var view = React.useMemo(function () {
|
|
40981
|
+
return inheritFlowSettings(viewProp, {
|
|
40982
|
+
lang: lang,
|
|
40983
|
+
debugMode: debugMode,
|
|
40984
|
+
skipSuccessScreen: skipSuccessScreen
|
|
40985
|
+
});
|
|
40986
|
+
}, [debugMode, lang, skipSuccessScreen, viewProp]);
|
|
40818
40987
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
40819
40988
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded$7);
|
|
40989
|
+
useMountOnlyWarnings('FaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
40990
|
+
capture: controllerCapture
|
|
40991
|
+
});
|
|
40820
40992
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
40821
40993
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
40822
40994
|
var latestLiveness = useLatestCallbacks(controllerCapture.liveness);
|
|
@@ -40872,6 +41044,7 @@ function FaceValidationFlow(_ref) {
|
|
|
40872
41044
|
submission: submission,
|
|
40873
41045
|
theme: theme,
|
|
40874
41046
|
className: className,
|
|
41047
|
+
lang: lang,
|
|
40875
41048
|
geolocationEnabled: geolocationEnabled,
|
|
40876
41049
|
geolocationRequired: geolocationRequired,
|
|
40877
41050
|
captureProgress: captureProgress,
|
|
@@ -40886,7 +41059,7 @@ function FaceValidationFlow(_ref) {
|
|
|
40886
41059
|
});
|
|
40887
41060
|
}
|
|
40888
41061
|
|
|
40889
|
-
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"],
|
|
41062
|
+
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"],
|
|
40890
41063
|
_excluded2$3 = ["checkLivenessOptions"];
|
|
40891
41064
|
var EMPTY_ID_CAPTURE$2 = {};
|
|
40892
41065
|
var EMPTY_FACE_CAPTURE$4 = {};
|
|
@@ -40908,10 +41081,10 @@ function IdAndFaceValidationFlow(_ref) {
|
|
|
40908
41081
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
40909
41082
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$4 : _ref$signatureCapture,
|
|
40910
41083
|
_ref$idView = _ref.idView,
|
|
40911
|
-
|
|
41084
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW$2 : _ref$idView,
|
|
40912
41085
|
_ref$faceView = _ref.faceView,
|
|
40913
|
-
|
|
40914
|
-
|
|
41086
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$4 : _ref$faceView,
|
|
41087
|
+
signatureViewProp = _ref.signatureView,
|
|
40915
41088
|
captureSignature = _ref.captureSignature,
|
|
40916
41089
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
40917
41090
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -40921,8 +41094,11 @@ function IdAndFaceValidationFlow(_ref) {
|
|
|
40921
41094
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$7 : _ref$initialArtifacts,
|
|
40922
41095
|
theme = _ref.theme,
|
|
40923
41096
|
className = _ref.className,
|
|
40924
|
-
|
|
40925
|
-
|
|
41097
|
+
lang = _ref.lang,
|
|
41098
|
+
debugMode = _ref.debugMode,
|
|
41099
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
41100
|
+
showResultScreen = _ref.showResultScreen,
|
|
41101
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
40926
41102
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
40927
41103
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
40928
41104
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -40936,8 +41112,33 @@ function IdAndFaceValidationFlow(_ref) {
|
|
|
40936
41112
|
onStepCompleted = _ref.onStepCompleted,
|
|
40937
41113
|
children = _ref.children,
|
|
40938
41114
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
41115
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
41116
|
+
var _useMemo = React.useMemo(function () {
|
|
41117
|
+
var settings = {
|
|
41118
|
+
lang: lang,
|
|
41119
|
+
debugMode: debugMode,
|
|
41120
|
+
skipSuccessScreen: skipSuccessScreen
|
|
41121
|
+
};
|
|
41122
|
+
return {
|
|
41123
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
41124
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
41125
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
41126
|
+
lang: lang,
|
|
41127
|
+
showCaptureDiagnostics: debugMode,
|
|
41128
|
+
skipSuccessScreen: skipSuccessScreen
|
|
41129
|
+
})
|
|
41130
|
+
};
|
|
41131
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
41132
|
+
idView = _useMemo.idView,
|
|
41133
|
+
faceView = _useMemo.faceView,
|
|
41134
|
+
signatureView = _useMemo.signatureView;
|
|
40939
41135
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
40940
41136
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$3);
|
|
41137
|
+
useMountOnlyWarnings('IdAndFaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
41138
|
+
faceCapture: selfieCaptureConfig,
|
|
41139
|
+
idCapture: idCapture,
|
|
41140
|
+
signatureCapture: signatureCapture
|
|
41141
|
+
});
|
|
40941
41142
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
40942
41143
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
40943
41144
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -41101,12 +41302,13 @@ function IdAndFaceValidationFlow(_ref) {
|
|
|
41101
41302
|
action: SubmissionAction.VALIDATE,
|
|
41102
41303
|
submission: submission,
|
|
41103
41304
|
theme: theme,
|
|
41104
|
-
className: className
|
|
41305
|
+
className: className,
|
|
41306
|
+
lang: lang
|
|
41105
41307
|
}, callbacks, {
|
|
41106
41308
|
children: [jsxRuntime.jsx(CompositeWizard, _extends({}, ringScreens, {
|
|
41107
41309
|
steps: steps,
|
|
41108
41310
|
initialArtifacts: initialArtifacts,
|
|
41109
|
-
|
|
41311
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
41110
41312
|
showDiagnostics: showDiagnostics,
|
|
41111
41313
|
onSubmitted: onSubmitted,
|
|
41112
41314
|
onStepStarted: onStepStarted,
|
|
@@ -41161,9 +41363,9 @@ function SignatureKYCFlow(_ref) {
|
|
|
41161
41363
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
41162
41364
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$3 : _ref$signatureCapture,
|
|
41163
41365
|
_ref$faceView = _ref.faceView,
|
|
41164
|
-
|
|
41366
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$3 : _ref$faceView,
|
|
41165
41367
|
_ref$signatureView = _ref.signatureView,
|
|
41166
|
-
|
|
41368
|
+
signatureViewProp = _ref$signatureView === void 0 ? EMPTY_SIGNATURE_VIEW : _ref$signatureView,
|
|
41167
41369
|
challengeResponse = _ref.challengeResponse,
|
|
41168
41370
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
41169
41371
|
_ref$allowHigherCamer = _ref.allowHigherCameraResolutions,
|
|
@@ -41189,6 +41391,8 @@ function SignatureKYCFlow(_ref) {
|
|
|
41189
41391
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$6 : _ref$initialArtifacts,
|
|
41190
41392
|
theme = _ref.theme,
|
|
41191
41393
|
className = _ref.className,
|
|
41394
|
+
lang = _ref.lang,
|
|
41395
|
+
debugMode = _ref.debugMode,
|
|
41192
41396
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
41193
41397
|
geolocationRequired = _ref.geolocationRequired,
|
|
41194
41398
|
captureProgress = _ref.captureProgress,
|
|
@@ -41196,13 +41400,33 @@ function SignatureKYCFlow(_ref) {
|
|
|
41196
41400
|
loadingSpinner = _ref.loadingSpinner,
|
|
41197
41401
|
onCaptured = _ref.onCaptured,
|
|
41198
41402
|
onCaptureError = _ref.onCaptureError;
|
|
41403
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
41404
|
+
var _useMemo = React.useMemo(function () {
|
|
41405
|
+
return {
|
|
41406
|
+
faceView: inheritFlowSettings(faceViewProp, {
|
|
41407
|
+
lang: lang,
|
|
41408
|
+
debugMode: debugMode
|
|
41409
|
+
}),
|
|
41410
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
41411
|
+
lang: lang,
|
|
41412
|
+
showCaptureDiagnostics: debugMode,
|
|
41413
|
+
skipSuccessScreen: skipSuccessScreen
|
|
41414
|
+
})
|
|
41415
|
+
};
|
|
41416
|
+
}, [debugMode, faceViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
41417
|
+
faceView = _useMemo.faceView,
|
|
41418
|
+
signatureView = _useMemo.signatureView;
|
|
41199
41419
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
41200
41420
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded$5);
|
|
41421
|
+
useMountOnlyWarnings('SignatureKYCFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
41422
|
+
faceCapture: selfieCaptureConfig,
|
|
41423
|
+
signatureCapture: signatureCapture
|
|
41424
|
+
});
|
|
41201
41425
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
41202
41426
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
41203
41427
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
41204
41428
|
var latestSignatureCapture = useLatestCallbacks(signatureCapture);
|
|
41205
|
-
var legacyVideoLayout = (_signatureView$legacy = signatureView
|
|
41429
|
+
var legacyVideoLayout = (_signatureView$legacy = signatureView.legacyVideoLayout) != null ? _signatureView$legacy : false;
|
|
41206
41430
|
var onExitAfterLivenessFailure = faceView.onExitAfterFailure;
|
|
41207
41431
|
var sharedVideoRef = React.useRef(null);
|
|
41208
41432
|
var _useState = React.useState(null),
|
|
@@ -41386,6 +41610,7 @@ function SignatureKYCFlow(_ref) {
|
|
|
41386
41610
|
submission: submission,
|
|
41387
41611
|
theme: theme,
|
|
41388
41612
|
className: className,
|
|
41613
|
+
lang: lang,
|
|
41389
41614
|
geolocationEnabled: geolocationEnabled,
|
|
41390
41615
|
geolocationRequired: geolocationRequired,
|
|
41391
41616
|
captureProgress: captureProgress,
|
|
@@ -41395,7 +41620,7 @@ function SignatureKYCFlow(_ref) {
|
|
|
41395
41620
|
completed: stage === 'complete'
|
|
41396
41621
|
}), stage !== 'complete' ? jsxRuntime.jsxs(HandoffRoot, {
|
|
41397
41622
|
children: [jsxRuntime.jsx(SignatureCaptureView, _extends({}, signatureView, {
|
|
41398
|
-
skipSuccessScreen: impliedSkipSuccessScreen(
|
|
41623
|
+
skipSuccessScreen: impliedSkipSuccessScreen(signatureView.skipSuccessScreen, isRingIntroActive(faceView)),
|
|
41399
41624
|
controller: resolvedSignatureController,
|
|
41400
41625
|
sessionReady: renderedStage === 'signature-capture',
|
|
41401
41626
|
videoRef: sharedVideoRef,
|
|
@@ -41493,7 +41718,7 @@ var FaceStage = styledComponents.styled.div(_templateObject2 || (_templateObject
|
|
|
41493
41718
|
return props.$visible ? 'block' : 'none';
|
|
41494
41719
|
});
|
|
41495
41720
|
|
|
41496
|
-
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"],
|
|
41721
|
+
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"],
|
|
41497
41722
|
_excluded2$2 = ["checkLivenessOptions"];
|
|
41498
41723
|
var EMPTY_ID_CAPTURE$1 = {};
|
|
41499
41724
|
var EMPTY_FACE_CAPTURE$2 = {};
|
|
@@ -41517,11 +41742,11 @@ function VideoIdValidationFlow(_ref) {
|
|
|
41517
41742
|
_ref$capture = _ref.capture,
|
|
41518
41743
|
capture = _ref$capture === void 0 ? EMPTY_VIDEO_CAPTURE : _ref$capture,
|
|
41519
41744
|
_ref$idView = _ref.idView,
|
|
41520
|
-
|
|
41745
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW$1 : _ref$idView,
|
|
41521
41746
|
_ref$faceView = _ref.faceView,
|
|
41522
|
-
|
|
41747
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$2 : _ref$faceView,
|
|
41523
41748
|
_ref$view = _ref.view,
|
|
41524
|
-
|
|
41749
|
+
viewProp = _ref$view === void 0 ? EMPTY_VIDEO_VIEW : _ref$view,
|
|
41525
41750
|
_ref$submission = _ref.submission,
|
|
41526
41751
|
submission = _ref$submission === void 0 ? EMPTY_SUBMISSION$2 : _ref$submission,
|
|
41527
41752
|
_ref$initialArtifacts = _ref.initialArtifacts,
|
|
@@ -41531,7 +41756,7 @@ function VideoIdValidationFlow(_ref) {
|
|
|
41531
41756
|
signatureController = _ref.signatureController,
|
|
41532
41757
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
41533
41758
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$2 : _ref$signatureCapture,
|
|
41534
|
-
|
|
41759
|
+
signatureViewProp = _ref.signatureView,
|
|
41535
41760
|
captureSignature = _ref.captureSignature,
|
|
41536
41761
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
41537
41762
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -41543,8 +41768,11 @@ function VideoIdValidationFlow(_ref) {
|
|
|
41543
41768
|
onMicrophoneAccessDenied = _ref.onMicrophoneAccessDenied,
|
|
41544
41769
|
theme = _ref.theme,
|
|
41545
41770
|
className = _ref.className,
|
|
41546
|
-
|
|
41547
|
-
|
|
41771
|
+
lang = _ref.lang,
|
|
41772
|
+
debugMode = _ref.debugMode,
|
|
41773
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
41774
|
+
showResultScreen = _ref.showResultScreen,
|
|
41775
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
41548
41776
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
41549
41777
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
41550
41778
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -41557,8 +41785,39 @@ function VideoIdValidationFlow(_ref) {
|
|
|
41557
41785
|
onCaptureError = _ref.onCaptureError,
|
|
41558
41786
|
children = _ref.children,
|
|
41559
41787
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
41788
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
41789
|
+
var _useMemo = React.useMemo(function () {
|
|
41790
|
+
var settings = {
|
|
41791
|
+
lang: lang,
|
|
41792
|
+
debugMode: debugMode,
|
|
41793
|
+
skipSuccessScreen: skipSuccessScreen
|
|
41794
|
+
};
|
|
41795
|
+
return {
|
|
41796
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
41797
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
41798
|
+
view: inheritFlowSettings(viewProp, {
|
|
41799
|
+
lang: lang,
|
|
41800
|
+
debugMode: debugMode
|
|
41801
|
+
}),
|
|
41802
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
41803
|
+
lang: lang,
|
|
41804
|
+
showCaptureDiagnostics: debugMode,
|
|
41805
|
+
skipSuccessScreen: skipSuccessScreen
|
|
41806
|
+
})
|
|
41807
|
+
};
|
|
41808
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen, viewProp]),
|
|
41809
|
+
idView = _useMemo.idView,
|
|
41810
|
+
faceView = _useMemo.faceView,
|
|
41811
|
+
view = _useMemo.view,
|
|
41812
|
+
signatureView = _useMemo.signatureView;
|
|
41560
41813
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
41561
41814
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$2);
|
|
41815
|
+
useMountOnlyWarnings('VideoIdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
41816
|
+
faceCapture: selfieCaptureConfig,
|
|
41817
|
+
idCapture: idCapture,
|
|
41818
|
+
capture: capture,
|
|
41819
|
+
signatureCapture: signatureCapture
|
|
41820
|
+
});
|
|
41562
41821
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
41563
41822
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
41564
41823
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -41716,13 +41975,14 @@ function VideoIdValidationFlow(_ref) {
|
|
|
41716
41975
|
action: action,
|
|
41717
41976
|
submission: submission,
|
|
41718
41977
|
theme: theme,
|
|
41719
|
-
className: className
|
|
41978
|
+
className: className,
|
|
41979
|
+
lang: lang
|
|
41720
41980
|
}, callbacks, {
|
|
41721
41981
|
children: [jsxRuntime.jsx(CompositeWizard, _extends({}, ringScreens, {
|
|
41722
41982
|
steps: steps,
|
|
41723
41983
|
initialArtifacts: initialArtifacts,
|
|
41724
41984
|
captureOnly: captureOnly,
|
|
41725
|
-
|
|
41985
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
41726
41986
|
showDiagnostics: showDiagnostics,
|
|
41727
41987
|
onArtifactsCollected: onCaptured,
|
|
41728
41988
|
onSubmitted: onSubmitted
|
|
@@ -44547,60 +44807,6 @@ function toDocumentCaptureInput(document) {
|
|
|
44547
44807
|
};
|
|
44548
44808
|
}
|
|
44549
44809
|
|
|
44550
|
-
// Makes the mount-time-only `autoCapture` contract audible (#351).
|
|
44551
|
-
//
|
|
44552
|
-
// `DocumentCaptureFlow` builds its controller inside `useState(() => …)` from
|
|
44553
|
-
// `documentsRef.current`, and `documentCapture/controller.ts` has no
|
|
44554
|
-
// reconfigure path — so `autoCapture` is read once, at mount, and every later
|
|
44555
|
-
// change is ignored. A reconfigure path was ruled against: it is real surface
|
|
44556
|
-
// on a controller that has none today, bought to serve a race the consumer can
|
|
44557
|
-
// simply not have (AMEX's `DocumentCaptureScreen` should gate on `flagsLoaded`,
|
|
44558
|
-
// not just `sessionLoaded`).
|
|
44559
|
-
//
|
|
44560
|
-
// The SILENCE is the expensive half. All four of this repo's cascade-default
|
|
44561
|
-
// incidents were "the value was quietly wrong and nothing said so", and this
|
|
44562
|
-
// one has the same shape: a capture screen that mounts before the flags land
|
|
44563
|
-
// has auto-capture off for that applicant's whole session, with no error and
|
|
44564
|
-
// no log. The field-visible half of the same ruling is
|
|
44565
|
-
// `autoCaptureStatus: 'disabled:lateFlag'` on the capture metadata.
|
|
44566
|
-
/**
|
|
44567
|
-
* A comparable summary of what auto-capture each document asked for.
|
|
44568
|
-
*
|
|
44569
|
-
* Resolved rather than compared raw, so a caller who re-spreads an equivalent
|
|
44570
|
-
* bag every render (`autoCapture: {}`, or `{ minScore: undefined }`) does not
|
|
44571
|
-
* trip the warning — only a change that would actually have configured the
|
|
44572
|
-
* engine differently does.
|
|
44573
|
-
*
|
|
44574
|
-
* PRESENCE is preserved as `null` rather than folded into the resolved
|
|
44575
|
-
* defaults, because `undefined` -> `{}` is precisely the late-flag race this
|
|
44576
|
-
* exists to catch, and resolving both would make them identical.
|
|
44577
|
-
*/
|
|
44578
|
-
function autoCaptureSignature(documents) {
|
|
44579
|
-
return JSON.stringify(documents.map(function (document) {
|
|
44580
|
-
return document.autoCapture ? resolveAutoCapture(document.autoCapture, undefined) : null;
|
|
44581
|
-
}));
|
|
44582
|
-
}
|
|
44583
|
-
/**
|
|
44584
|
-
* Warn once if `documents`' auto-capture configuration changes after mount.
|
|
44585
|
-
*
|
|
44586
|
-
* Warns rather than reconfigures: the change genuinely has no effect, and a
|
|
44587
|
-
* caller who cannot see that is the failure mode.
|
|
44588
|
-
*/
|
|
44589
|
-
function useAutoCaptureMountGuard(documents) {
|
|
44590
|
-
var mounted = React.useRef(null);
|
|
44591
|
-
var warned = React.useRef(false);
|
|
44592
|
-
var signature = autoCaptureSignature(documents);
|
|
44593
|
-
React.useEffect(function () {
|
|
44594
|
-
if (mounted.current === null) {
|
|
44595
|
-
mounted.current = signature;
|
|
44596
|
-
return;
|
|
44597
|
-
}
|
|
44598
|
-
if (warned.current || signature === mounted.current) return;
|
|
44599
|
-
warned.current = true;
|
|
44600
|
-
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.');
|
|
44601
|
-
}, [signature]);
|
|
44602
|
-
}
|
|
44603
|
-
|
|
44604
44810
|
function buildDocumentCaptureStep(controller, view, sessionReady) {
|
|
44605
44811
|
if (view === void 0) {
|
|
44606
44812
|
view = {};
|
|
@@ -44619,7 +44825,7 @@ function buildDocumentCaptureStep(controller, view, sessionReady) {
|
|
|
44619
44825
|
};
|
|
44620
44826
|
}
|
|
44621
44827
|
|
|
44622
|
-
var _excluded$3 = ["client", "controller", "capture", "view", "documents", "submission", "initialArtifacts", "theme", "className", "onDocumentCaptured", "onDocumentUploaded", "onComplete", "children"];
|
|
44828
|
+
var _excluded$3 = ["client", "controller", "capture", "view", "documents", "submission", "initialArtifacts", "theme", "className", "lang", "debugMode", "onDocumentCaptured", "onDocumentUploaded", "onComplete", "children"];
|
|
44623
44829
|
var EMPTY_DOCUMENTS = [];
|
|
44624
44830
|
var EMPTY_CAPTURE$1 = {};
|
|
44625
44831
|
var EMPTY_VIEW$2 = {};
|
|
@@ -44640,6 +44846,8 @@ function DocumentCaptureFlow(_ref) {
|
|
|
44640
44846
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$4 : _ref$initialArtifacts,
|
|
44641
44847
|
theme = _ref.theme,
|
|
44642
44848
|
className = _ref.className,
|
|
44849
|
+
lang = _ref.lang,
|
|
44850
|
+
debugMode = _ref.debugMode,
|
|
44643
44851
|
onDocumentCaptured = _ref.onDocumentCaptured,
|
|
44644
44852
|
onDocumentUploaded = _ref.onDocumentUploaded,
|
|
44645
44853
|
onComplete = _ref.onComplete,
|
|
@@ -44649,15 +44857,16 @@ function DocumentCaptureFlow(_ref) {
|
|
|
44649
44857
|
// props without being torn down and rebuilt on every render.
|
|
44650
44858
|
var documentsRef = React.useRef(documents);
|
|
44651
44859
|
documentsRef.current = documents;
|
|
44652
|
-
// `autoCapture` is mount-time-only and the controller has no reconfigure
|
|
44653
|
-
// path, so a late change is ignored — loudly rather than silently (#351).
|
|
44654
|
-
useAutoCaptureMountGuard(documents);
|
|
44655
44860
|
var capturedRef = React.useRef(onDocumentCaptured);
|
|
44656
44861
|
capturedRef.current = onDocumentCaptured;
|
|
44657
44862
|
var uploadedRef = React.useRef(onDocumentUploaded);
|
|
44658
44863
|
uploadedRef.current = onDocumentUploaded;
|
|
44659
44864
|
var completeRef = React.useRef(onComplete);
|
|
44660
44865
|
completeRef.current = onComplete;
|
|
44866
|
+
useMountOnlyWarnings('DocumentCaptureFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
44867
|
+
capture: capture,
|
|
44868
|
+
documents: documents.map(toDocumentCaptureInput)
|
|
44869
|
+
});
|
|
44661
44870
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
44662
44871
|
var latestCapture = useLatestCallbacks(capture);
|
|
44663
44872
|
var _useState = React.useState(function () {
|
|
@@ -44735,8 +44944,11 @@ function DocumentCaptureFlow(_ref) {
|
|
|
44735
44944
|
var steps = React.useMemo(function () {
|
|
44736
44945
|
return [buildDocumentCaptureStep(resolvedController, _extends({
|
|
44737
44946
|
documents: documents
|
|
44738
|
-
}, view
|
|
44739
|
-
|
|
44947
|
+
}, inheritFlowSettings(view, {
|
|
44948
|
+
lang: lang,
|
|
44949
|
+
debugMode: debugMode
|
|
44950
|
+
})))];
|
|
44951
|
+
}, [debugMode, documents, lang, resolvedController, view]);
|
|
44740
44952
|
var onArtifactsCollected = React.useCallback(function () {
|
|
44741
44953
|
// captureOnly hands the (empty) artifacts back here; completion is reported
|
|
44742
44954
|
// through onComplete with the documents instead.
|
|
@@ -44746,7 +44958,8 @@ function DocumentCaptureFlow(_ref) {
|
|
|
44746
44958
|
action: SubmissionAction.NONE,
|
|
44747
44959
|
submission: submission,
|
|
44748
44960
|
theme: theme,
|
|
44749
|
-
className: className
|
|
44961
|
+
className: className,
|
|
44962
|
+
lang: lang
|
|
44750
44963
|
}, callbacks, {
|
|
44751
44964
|
children: [jsxRuntime.jsx(CompositeWizard, {
|
|
44752
44965
|
steps: steps,
|
|
@@ -44757,7 +44970,7 @@ function DocumentCaptureFlow(_ref) {
|
|
|
44757
44970
|
}));
|
|
44758
44971
|
}
|
|
44759
44972
|
|
|
44760
|
-
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"],
|
|
44973
|
+
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"],
|
|
44761
44974
|
_excluded2$1 = ["checkLivenessOptions"];
|
|
44762
44975
|
var EMPTY_FACE_CAPTURE$1 = {};
|
|
44763
44976
|
var EMPTY_SIGNATURE_CAPTURE$1 = {};
|
|
@@ -44774,8 +44987,8 @@ function CustomerBiometricsEnrollmentFlow(_ref) {
|
|
|
44774
44987
|
_ref$signatureCapture = _ref.signatureCapture,
|
|
44775
44988
|
signatureCapture = _ref$signatureCapture === void 0 ? EMPTY_SIGNATURE_CAPTURE$1 : _ref$signatureCapture,
|
|
44776
44989
|
_ref$faceView = _ref.faceView,
|
|
44777
|
-
|
|
44778
|
-
|
|
44990
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW$1 : _ref$faceView,
|
|
44991
|
+
signatureViewProp = _ref.signatureView,
|
|
44779
44992
|
captureSignature = _ref.captureSignature,
|
|
44780
44993
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
44781
44994
|
allowVirtualCameras = _ref.allowVirtualCameras,
|
|
@@ -44783,8 +44996,11 @@ function CustomerBiometricsEnrollmentFlow(_ref) {
|
|
|
44783
44996
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$3 : _ref$initialArtifacts,
|
|
44784
44997
|
theme = _ref.theme,
|
|
44785
44998
|
className = _ref.className,
|
|
44786
|
-
|
|
44787
|
-
|
|
44999
|
+
lang = _ref.lang,
|
|
45000
|
+
debugMode = _ref.debugMode,
|
|
45001
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
45002
|
+
showResultScreen = _ref.showResultScreen,
|
|
45003
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
44788
45004
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
44789
45005
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
44790
45006
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -44796,8 +45012,29 @@ function CustomerBiometricsEnrollmentFlow(_ref) {
|
|
|
44796
45012
|
onCaptureError = _ref.onCaptureError,
|
|
44797
45013
|
children = _ref.children,
|
|
44798
45014
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
45015
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
45016
|
+
var _useMemo = React.useMemo(function () {
|
|
45017
|
+
return {
|
|
45018
|
+
faceView: inheritFlowSettings(faceViewProp, {
|
|
45019
|
+
lang: lang,
|
|
45020
|
+
debugMode: debugMode,
|
|
45021
|
+
skipSuccessScreen: skipSuccessScreen
|
|
45022
|
+
}),
|
|
45023
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
45024
|
+
lang: lang,
|
|
45025
|
+
showCaptureDiagnostics: debugMode,
|
|
45026
|
+
skipSuccessScreen: skipSuccessScreen
|
|
45027
|
+
})
|
|
45028
|
+
};
|
|
45029
|
+
}, [debugMode, faceViewProp, lang, signatureViewProp, skipSuccessScreen]),
|
|
45030
|
+
faceView = _useMemo.faceView,
|
|
45031
|
+
signatureView = _useMemo.signatureView;
|
|
44799
45032
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
44800
45033
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$1);
|
|
45034
|
+
useMountOnlyWarnings('CustomerBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
45035
|
+
faceCapture: selfieCaptureConfig,
|
|
45036
|
+
signatureCapture: signatureCapture
|
|
45037
|
+
});
|
|
44801
45038
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
44802
45039
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
44803
45040
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -44923,19 +45160,20 @@ function CustomerBiometricsEnrollmentFlow(_ref) {
|
|
|
44923
45160
|
submission: submission,
|
|
44924
45161
|
showEnrollmentId: showDiagnostics,
|
|
44925
45162
|
theme: theme,
|
|
44926
|
-
className: className
|
|
45163
|
+
className: className,
|
|
45164
|
+
lang: lang
|
|
44927
45165
|
}, callbacks, {
|
|
44928
45166
|
children: [jsxRuntime.jsx(CompositeWizard, _extends({}, ringScreens, {
|
|
44929
45167
|
steps: steps,
|
|
44930
45168
|
initialArtifacts: initialArtifacts,
|
|
44931
|
-
|
|
45169
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
44932
45170
|
showDiagnostics: showDiagnostics,
|
|
44933
45171
|
onSubmitted: onSubmitted
|
|
44934
45172
|
})), children]
|
|
44935
45173
|
}));
|
|
44936
45174
|
}
|
|
44937
45175
|
|
|
44938
|
-
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"],
|
|
45176
|
+
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"],
|
|
44939
45177
|
_excluded2 = ["checkLivenessOptions"];
|
|
44940
45178
|
var EMPTY_ID_CAPTURE = {};
|
|
44941
45179
|
var EMPTY_FACE_CAPTURE = {};
|
|
@@ -44968,11 +45206,11 @@ function CustomerIdAndBiometricsEnrollmentFlow(_ref) {
|
|
|
44968
45206
|
_ref$videoIdCapture = _ref.videoIdCapture,
|
|
44969
45207
|
videoIdCapture = _ref$videoIdCapture === void 0 ? EMPTY_VIDEO_ID_CAPTURE : _ref$videoIdCapture,
|
|
44970
45208
|
_ref$idView = _ref.idView,
|
|
44971
|
-
|
|
45209
|
+
idViewProp = _ref$idView === void 0 ? EMPTY_ID_VIEW : _ref$idView,
|
|
44972
45210
|
_ref$faceView = _ref.faceView,
|
|
44973
|
-
|
|
44974
|
-
|
|
44975
|
-
|
|
45211
|
+
faceViewProp = _ref$faceView === void 0 ? EMPTY_FACE_VIEW : _ref$faceView,
|
|
45212
|
+
signatureViewProp = _ref.signatureView,
|
|
45213
|
+
videoIdViewProp = _ref.videoIdView,
|
|
44976
45214
|
captureSignature = _ref.captureSignature,
|
|
44977
45215
|
captureSignatureVideo = _ref.captureSignatureVideo,
|
|
44978
45216
|
_ref$captureVideoId = _ref.captureVideoId,
|
|
@@ -44982,8 +45220,11 @@ function CustomerIdAndBiometricsEnrollmentFlow(_ref) {
|
|
|
44982
45220
|
initialArtifacts = _ref$initialArtifacts === void 0 ? EMPTY_ARTIFACTS$2 : _ref$initialArtifacts,
|
|
44983
45221
|
theme = _ref.theme,
|
|
44984
45222
|
className = _ref.className,
|
|
44985
|
-
|
|
44986
|
-
|
|
45223
|
+
lang = _ref.lang,
|
|
45224
|
+
debugMode = _ref.debugMode,
|
|
45225
|
+
skipSuccessScreen = _ref.skipSuccessScreen,
|
|
45226
|
+
showResultScreen = _ref.showResultScreen,
|
|
45227
|
+
showSuccessScreen = _ref.showSuccessScreen,
|
|
44987
45228
|
_ref$showDiagnostics = _ref.showDiagnostics,
|
|
44988
45229
|
showDiagnostics = _ref$showDiagnostics === void 0 ? false : _ref$showDiagnostics,
|
|
44989
45230
|
captureAdditionalDocuments = _ref.captureAdditionalDocuments,
|
|
@@ -44995,9 +45236,39 @@ function CustomerIdAndBiometricsEnrollmentFlow(_ref) {
|
|
|
44995
45236
|
onCaptureError = _ref.onCaptureError,
|
|
44996
45237
|
children = _ref.children,
|
|
44997
45238
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
44998
|
-
|
|
45239
|
+
// Flow-wide settings reach each step unless its own bag sets them.
|
|
45240
|
+
var _useMemo = React.useMemo(function () {
|
|
45241
|
+
var settings = {
|
|
45242
|
+
lang: lang,
|
|
45243
|
+
debugMode: debugMode,
|
|
45244
|
+
skipSuccessScreen: skipSuccessScreen
|
|
45245
|
+
};
|
|
45246
|
+
return {
|
|
45247
|
+
idView: inheritFlowSettings(idViewProp, settings),
|
|
45248
|
+
faceView: inheritFlowSettings(faceViewProp, settings),
|
|
45249
|
+
signatureView: inheritFlowSettings(signatureViewProp, {
|
|
45250
|
+
lang: lang,
|
|
45251
|
+
showCaptureDiagnostics: debugMode,
|
|
45252
|
+
skipSuccessScreen: skipSuccessScreen
|
|
45253
|
+
}),
|
|
45254
|
+
videoIdView: inheritFlowSettings(videoIdViewProp, {
|
|
45255
|
+
lang: lang,
|
|
45256
|
+
debugMode: debugMode
|
|
45257
|
+
})
|
|
45258
|
+
};
|
|
45259
|
+
}, [debugMode, faceViewProp, idViewProp, lang, signatureViewProp, skipSuccessScreen, videoIdViewProp]),
|
|
45260
|
+
idView = _useMemo.idView,
|
|
45261
|
+
faceView = _useMemo.faceView,
|
|
45262
|
+
signatureView = _useMemo.signatureView,
|
|
45263
|
+
videoIdView = _useMemo.videoIdView;
|
|
44999
45264
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
45000
45265
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2);
|
|
45266
|
+
useMountOnlyWarnings('CustomerIdAndBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
45267
|
+
faceCapture: selfieCaptureConfig,
|
|
45268
|
+
idCapture: idCapture,
|
|
45269
|
+
signatureCapture: signatureCapture,
|
|
45270
|
+
videoIdCapture: videoIdCapture
|
|
45271
|
+
});
|
|
45001
45272
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
45002
45273
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
45003
45274
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -45205,26 +45476,31 @@ function CustomerIdAndBiometricsEnrollmentFlow(_ref) {
|
|
|
45205
45476
|
submission: submission,
|
|
45206
45477
|
showEnrollmentId: showDiagnostics,
|
|
45207
45478
|
theme: theme,
|
|
45208
|
-
className: className
|
|
45479
|
+
className: className,
|
|
45480
|
+
lang: lang
|
|
45209
45481
|
}, callbacks, {
|
|
45210
45482
|
children: [steps ? jsxRuntime.jsx(CompositeWizard, _extends({}, ringScreens, {
|
|
45211
45483
|
steps: steps,
|
|
45212
45484
|
initialArtifacts: initialArtifacts,
|
|
45213
|
-
|
|
45485
|
+
showResultScreen: showResultScreen != null ? showResultScreen : showSuccessScreen,
|
|
45214
45486
|
showDiagnostics: showDiagnostics,
|
|
45215
45487
|
onSubmitted: onSubmitted
|
|
45216
|
-
})) :
|
|
45217
|
-
// `loadingStage` is what enables the customer's `loadingSpinner`:
|
|
45218
|
-
// without it OrbStatusScreen hard-renders the orb, so this was the one
|
|
45219
|
-
// loading surface in the SDK that ignored a supplied component
|
|
45220
|
-
// outright — in the flow whose double-loader prompted the fix.
|
|
45221
|
-
jsxRuntime.jsx(OrbStatusScreen, {
|
|
45222
|
-
state: "solving",
|
|
45223
|
-
text: preparing.preparingText,
|
|
45224
|
-
loadingStage: "preparing"
|
|
45225
|
-
}), children]
|
|
45488
|
+
})) : jsxRuntime.jsx(PreparingScreen, {}), children]
|
|
45226
45489
|
}));
|
|
45227
45490
|
}
|
|
45491
|
+
/** Translated inside the chassis, so the flow's `lang` reaches it. */
|
|
45492
|
+
function PreparingScreen() {
|
|
45493
|
+
var preparing = useTranslations(undefined, PREPARING_FALLBACKS);
|
|
45494
|
+
// `loadingStage` is what enables the customer's `loadingSpinner`: without it
|
|
45495
|
+
// OrbStatusScreen hard-renders the orb, so this was the one loading surface
|
|
45496
|
+
// in the SDK that ignored a supplied component outright — in the flow whose
|
|
45497
|
+
// double-loader prompted the fix.
|
|
45498
|
+
return jsxRuntime.jsx(OrbStatusScreen, {
|
|
45499
|
+
state: "solving",
|
|
45500
|
+
text: preparing.preparingText,
|
|
45501
|
+
loadingStage: "preparing"
|
|
45502
|
+
});
|
|
45503
|
+
}
|
|
45228
45504
|
|
|
45229
45505
|
var ALLOWED_MISMATCH_RETRIES$1 = 0;
|
|
45230
45506
|
var MAX_LIVENESS_ATTEMPTS$1 = 3;
|
|
@@ -45892,6 +46168,8 @@ function CustomerMatchFlow(_ref) {
|
|
|
45892
46168
|
view = _ref$view === void 0 ? EMPTY_VIEW : _ref$view,
|
|
45893
46169
|
theme = _ref.theme,
|
|
45894
46170
|
className = _ref.className,
|
|
46171
|
+
lang = _ref.lang,
|
|
46172
|
+
debugMode = _ref.debugMode,
|
|
45895
46173
|
geolocationEnabled = _ref.geolocationEnabled,
|
|
45896
46174
|
geolocationRequired = _ref.geolocationRequired,
|
|
45897
46175
|
remoteDiagnostics = _ref.remoteDiagnostics,
|
|
@@ -45920,6 +46198,9 @@ function CustomerMatchFlow(_ref) {
|
|
|
45920
46198
|
onExitAfterFailure = _ref.onExitAfterFailure;
|
|
45921
46199
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
45922
46200
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded);
|
|
46201
|
+
useMountOnlyWarnings(variant === 'identification' ? 'CustomerIdentificationFlow' : 'CustomerVerificationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
46202
|
+
capture: controllerCapture
|
|
46203
|
+
});
|
|
45923
46204
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
45924
46205
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
45925
46206
|
// These flows drive the live-check themselves, per capture, and read its
|
|
@@ -45951,7 +46232,10 @@ function CustomerMatchFlow(_ref) {
|
|
|
45951
46232
|
// Only the auto-continue half applies here: the plain SelfieCaptureView has
|
|
45952
46233
|
// no capture review screen to skip (that is FaceLivenessView's), and this
|
|
45953
46234
|
// flow's own terminal screens are governed by `skipSuccessScreen` below.
|
|
45954
|
-
var resolvedView = _extends({}, view, {
|
|
46235
|
+
var resolvedView = _extends({}, inheritFlowSettings(view, {
|
|
46236
|
+
lang: lang,
|
|
46237
|
+
debugMode: debugMode
|
|
46238
|
+
}), {
|
|
45955
46239
|
autoContinueAfterLoading: impliedAutoContinueAfterLoading(view.autoContinueAfterLoading, introActive)
|
|
45956
46240
|
});
|
|
45957
46241
|
// Reset during render, not in an effect: an auto-requesting capture stage
|
|
@@ -46046,6 +46330,7 @@ function CustomerMatchFlow(_ref) {
|
|
|
46046
46330
|
submission: submission,
|
|
46047
46331
|
theme: theme,
|
|
46048
46332
|
className: className,
|
|
46333
|
+
lang: lang,
|
|
46049
46334
|
geolocationEnabled: geolocationEnabled,
|
|
46050
46335
|
geolocationRequired: geolocationRequired,
|
|
46051
46336
|
remoteDiagnostics: remoteDiagnostics,
|
|
@@ -47785,7 +48070,7 @@ function mapIdValidationProps(props, ctx) {
|
|
|
47785
48070
|
// post-submission diagnostics page on this one flag
|
|
47786
48071
|
// (CompositeWizard.tsx:381, `if (debugMode) return <SubmissionSuccess />`);
|
|
47787
48072
|
// here the capture-surface overlays live on `view.debugMode` (mapIdCapture)
|
|
47788
|
-
// while the terminal page needs `
|
|
48073
|
+
// while the terminal page needs `showResultScreen` to render at all and
|
|
47789
48074
|
// `showDiagnostics` to include the request/response bodies. Mapping only
|
|
47790
48075
|
// the first left `debugMode` customers on a blank screen after submitting,
|
|
47791
48076
|
// because CompositeWizard falls through to `return null`.
|
|
@@ -47793,7 +48078,7 @@ function mapIdValidationProps(props, ctx) {
|
|
|
47793
48078
|
// Both take the same flag: sdk2's page showed the response body (behind a
|
|
47794
48079
|
// toggle) whenever debugMode was on, so gating diagnostics separately here
|
|
47795
48080
|
// would be a NEW restriction, not parity.
|
|
47796
|
-
|
|
48081
|
+
showResultScreen: props.debugMode,
|
|
47797
48082
|
showDiagnostics: props.debugMode,
|
|
47798
48083
|
// `onSubmit` is NOT mapped to a flow prop: it goes to the client config
|
|
47799
48084
|
// (see mapClientConfig), which is the layer sdk2 put it at and the only
|
|
@@ -47974,7 +48259,7 @@ function mapIdAndFaceValidationProps(props, ctx) {
|
|
|
47974
48259
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
47975
48260
|
loadingSpinner: props.loadingSpinner,
|
|
47976
48261
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
47977
|
-
|
|
48262
|
+
showResultScreen: props.debugMode,
|
|
47978
48263
|
showDiagnostics: props.debugMode,
|
|
47979
48264
|
onStepStarted: emit ? function (stepId) {
|
|
47980
48265
|
var stage = journeyStageForStepId(stepId);
|
|
@@ -48096,7 +48381,7 @@ function mapSignatureKYCProps(props, ctx) {
|
|
|
48096
48381
|
// both the boolean and async callback forms at the flow-level seam.
|
|
48097
48382
|
//
|
|
48098
48383
|
// `debugMode` forces it back on, completing the fold mapIdValidationProps
|
|
48099
|
-
// does with `
|
|
48384
|
+
// does with `showResultScreen`/`showDiagnostics`: the capture readout
|
|
48100
48385
|
// renders INSIDE the review, so a consumer who skips the review and turns
|
|
48101
48386
|
// debugMode on would otherwise get the switch with nowhere for it to show
|
|
48102
48387
|
// — silently, in the one configuration it exists for.
|
|
@@ -48267,7 +48552,7 @@ function mapVideoIdValidationProps(props, ctx) {
|
|
|
48267
48552
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
48268
48553
|
loadingSpinner: props.loadingSpinner,
|
|
48269
48554
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
48270
|
-
|
|
48555
|
+
showResultScreen: props.debugMode,
|
|
48271
48556
|
showDiagnostics: props.debugMode,
|
|
48272
48557
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
48273
48558
|
onRequestFailure: props.onRequestFailure,
|
|
@@ -48498,7 +48783,7 @@ function mapCustomerBiometricsEnrollmentProps(props, ctx) {
|
|
|
48498
48783
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
48499
48784
|
loadingSpinner: props.loadingSpinner,
|
|
48500
48785
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
48501
|
-
|
|
48786
|
+
showResultScreen: props.debugMode,
|
|
48502
48787
|
showDiagnostics: props.debugMode,
|
|
48503
48788
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
48504
48789
|
// sdk2's enrollment twin of `onApproved`.
|
|
@@ -48591,7 +48876,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48591
48876
|
remoteDiagnostics: props.remoteDiagnostics,
|
|
48592
48877
|
loadingSpinner: props.loadingSpinner,
|
|
48593
48878
|
// See mapIdValidationProps for why `debugMode` feeds both.
|
|
48594
|
-
|
|
48879
|
+
showResultScreen: props.debugMode,
|
|
48595
48880
|
showDiagnostics: props.debugMode,
|
|
48596
48881
|
onComplete: withSubmissionRequest(props.onComplete, ctx),
|
|
48597
48882
|
onApproved: withSubmissionRequest(props.onEnrolled, ctx),
|
|
@@ -48601,7 +48886,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48601
48886
|
});
|
|
48602
48887
|
}
|
|
48603
48888
|
|
|
48604
|
-
var webSdkVersion = '2.6.3-changeset-release-develop-
|
|
48889
|
+
var webSdkVersion = '2.6.3-changeset-release-develop-124a427';
|
|
48605
48890
|
|
|
48606
48891
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
48607
48892
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|