idmission-web-sdk 2.5.78 → 2.5.79-react16compat.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/customer_flows/IdValidation.d.ts +26 -128
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +0 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +2 -9
- package/dist/index.d.ts +136 -1057
- package/dist/props.json +1 -1
- package/dist/sdk2.cjs.development.js +1233 -266
- 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 +1224 -257
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +210 -119
- 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 +12 -8
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var vanilla = require('zustand/vanilla');
|
|
5
4
|
var platform = require('platform');
|
|
6
5
|
var tusJsClient = require('tus-js-client');
|
|
7
6
|
var SparkMD5 = require('spark-md5');
|
|
@@ -11,10 +10,8 @@ var shim = require('use-sync-external-store/shim');
|
|
|
11
10
|
var reactI18next = require('react-i18next');
|
|
12
11
|
var LanguageDetector = require('i18next-browser-languagedetector');
|
|
13
12
|
var i18next = require('i18next');
|
|
14
|
-
var
|
|
13
|
+
var ReactDOM = require('react-dom');
|
|
15
14
|
var SignaturePad = require('signature_pad');
|
|
16
|
-
var thinkingOrbs = require('thinking-orbs');
|
|
17
|
-
var ReactDOM = require('react-dom/client');
|
|
18
15
|
var tasksVision = require('@mediapipe/tasks-vision');
|
|
19
16
|
var core = require('@litertjs/core');
|
|
20
17
|
|
|
@@ -24,8 +21,8 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
24
21
|
var platform__default = /*#__PURE__*/_interopDefaultCompat(platform);
|
|
25
22
|
var SparkMD5__default = /*#__PURE__*/_interopDefaultCompat(SparkMD5);
|
|
26
23
|
var LanguageDetector__default = /*#__PURE__*/_interopDefaultCompat(LanguageDetector);
|
|
27
|
-
var SignaturePad__default = /*#__PURE__*/_interopDefaultCompat(SignaturePad);
|
|
28
24
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultCompat(ReactDOM);
|
|
25
|
+
var SignaturePad__default = /*#__PURE__*/_interopDefaultCompat(SignaturePad);
|
|
29
26
|
|
|
30
27
|
// Extracted from the barrel so modules inside this package can read the
|
|
31
28
|
// version without importing index.ts (which would be circular).
|
|
@@ -457,17 +454,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
457
454
|
}
|
|
458
455
|
}
|
|
459
456
|
|
|
460
|
-
function _arrayLikeToArray$
|
|
457
|
+
function _arrayLikeToArray$w(r, a) {
|
|
461
458
|
(null == a || a > r.length) && (a = r.length);
|
|
462
459
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
463
460
|
return n;
|
|
464
461
|
}
|
|
465
462
|
|
|
466
|
-
function _unsupportedIterableToArray$
|
|
463
|
+
function _unsupportedIterableToArray$w(r, a) {
|
|
467
464
|
if (r) {
|
|
468
|
-
if ("string" == typeof r) return _arrayLikeToArray$
|
|
465
|
+
if ("string" == typeof r) return _arrayLikeToArray$w(r, a);
|
|
469
466
|
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$
|
|
467
|
+
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
468
|
}
|
|
472
469
|
}
|
|
473
470
|
|
|
@@ -476,11 +473,11 @@ function _nonIterableRest() {
|
|
|
476
473
|
}
|
|
477
474
|
|
|
478
475
|
function _slicedToArray(r, e) {
|
|
479
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$
|
|
476
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$w(r, e) || _nonIterableRest();
|
|
480
477
|
}
|
|
481
478
|
|
|
482
479
|
function _arrayWithoutHoles(r) {
|
|
483
|
-
if (Array.isArray(r)) return _arrayLikeToArray$
|
|
480
|
+
if (Array.isArray(r)) return _arrayLikeToArray$w(r);
|
|
484
481
|
}
|
|
485
482
|
|
|
486
483
|
function _iterableToArray(r) {
|
|
@@ -492,7 +489,7 @@ function _nonIterableSpread() {
|
|
|
492
489
|
}
|
|
493
490
|
|
|
494
491
|
function _toConsumableArray(r) {
|
|
495
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
492
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$w(r) || _nonIterableSpread();
|
|
496
493
|
}
|
|
497
494
|
|
|
498
495
|
var webSdkCoreVersion = '0.4.0';
|
|
@@ -1267,9 +1264,9 @@ var attemptStatuses = ["active", "completed", "failed", "superseded", "disposed"
|
|
|
1267
1264
|
({
|
|
1268
1265
|
workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
|
|
1269
1266
|
|
|
1270
|
-
function _createForOfIteratorHelperLoose$
|
|
1271
|
-
function _unsupportedIterableToArray$
|
|
1272
|
-
function _arrayLikeToArray$
|
|
1267
|
+
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."); }
|
|
1268
|
+
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; } }
|
|
1269
|
+
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
1270
|
var maximumBytes = 32 * 1024;
|
|
1274
1271
|
var maximumTime = 86400000;
|
|
1275
1272
|
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 +1334,7 @@ function validateSnapshot(report) {
|
|
|
1337
1334
|
unique(report.phaseTotals.map(function (total) {
|
|
1338
1335
|
return total.phase;
|
|
1339
1336
|
}));
|
|
1340
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1337
|
+
for (var _iterator = _createForOfIteratorHelperLoose$v(report.phaseTotals), _step; !(_step = _iterator()).done;) {
|
|
1341
1338
|
var _total4 = _step.value;
|
|
1342
1339
|
requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
|
|
1343
1340
|
durationValid(_total4.duration);
|
|
@@ -1359,7 +1356,7 @@ function validateSnapshot(report) {
|
|
|
1359
1356
|
requireValid(report.recentTransitions.length <= 32);
|
|
1360
1357
|
var index = 0;
|
|
1361
1358
|
var atMs = 0;
|
|
1362
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1359
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$v(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
|
|
1363
1360
|
var transition = _step2.value;
|
|
1364
1361
|
requireValid(member(transitionKinds, transition.kind));
|
|
1365
1362
|
requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
|
|
@@ -1383,12 +1380,12 @@ function validateSnapshot(report) {
|
|
|
1383
1380
|
unique(report.controllerGuidanceTotals.map(function (total) {
|
|
1384
1381
|
return JSON.stringify([total.phase, total.guidance]);
|
|
1385
1382
|
}));
|
|
1386
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1383
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$v(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
|
|
1387
1384
|
var _total2 = _step3.value;
|
|
1388
1385
|
durationValid(_total2.duration);
|
|
1389
1386
|
exposureValid(_total2.phase, _total2.exposure);
|
|
1390
1387
|
}
|
|
1391
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1388
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$v(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
|
|
1392
1389
|
var _total3 = _step4.value;
|
|
1393
1390
|
durationValid(_total3.duration);
|
|
1394
1391
|
guidanceValid(_total3.phase, _total3.guidance, false);
|
|
@@ -1422,7 +1419,7 @@ function encodeProgressBatch(batch) {
|
|
|
1422
1419
|
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
1420
|
var reports = [];
|
|
1424
1421
|
var dropped = [];
|
|
1425
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1422
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$v(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
|
|
1426
1423
|
var report = _step5.value;
|
|
1427
1424
|
try {
|
|
1428
1425
|
validateSnapshot(report);
|
|
@@ -1451,9 +1448,9 @@ function encodeProgressBatch(batch) {
|
|
|
1451
1448
|
};
|
|
1452
1449
|
}
|
|
1453
1450
|
|
|
1454
|
-
function _createForOfIteratorHelperLoose$
|
|
1455
|
-
function _unsupportedIterableToArray$
|
|
1456
|
-
function _arrayLikeToArray$
|
|
1451
|
+
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."); }
|
|
1452
|
+
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; } }
|
|
1453
|
+
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
1454
|
var taskOpeners = new WeakMap();
|
|
1458
1455
|
var inertObserver = {
|
|
1459
1456
|
observe: function observe() {},
|
|
@@ -1507,7 +1504,7 @@ function createSessionActor(options, deps) {
|
|
|
1507
1504
|
var due = new Map();
|
|
1508
1505
|
var eligibilityRetries = new Map();
|
|
1509
1506
|
function dropped(report) {
|
|
1510
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1507
|
+
for (var _iterator = _createForOfIteratorHelperLoose$u(streams), _step; !(_step = _iterator()).done;) {
|
|
1511
1508
|
var stream = _step.value;
|
|
1512
1509
|
if (stream.state.report.streamId === report.streamId) stream.state = _extends({}, stream.state, {
|
|
1513
1510
|
report: _extends({}, stream.state.report, {
|
|
@@ -1551,7 +1548,7 @@ function createSessionActor(options, deps) {
|
|
|
1551
1548
|
var retained = new Set(queued.map(function (report) {
|
|
1552
1549
|
return report.sequence;
|
|
1553
1550
|
}));
|
|
1554
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1551
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$u(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
|
|
1555
1552
|
var _sequence = _step2.value;
|
|
1556
1553
|
if (!retained.has(_sequence)) due["delete"](_sequence);
|
|
1557
1554
|
}
|
|
@@ -1564,7 +1561,7 @@ function createSessionActor(options, deps) {
|
|
|
1564
1561
|
var keys = new Set(reports.map(function (report) {
|
|
1565
1562
|
return report.sequence;
|
|
1566
1563
|
}));
|
|
1567
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1564
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$u(pending), _step3; !(_step3 = _iterator3()).done;) {
|
|
1568
1565
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
1569
1566
|
key = _step3$value[0],
|
|
1570
1567
|
report = _step3$value[1];
|
|
@@ -1588,14 +1585,14 @@ function createSessionActor(options, deps) {
|
|
|
1588
1585
|
if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
|
|
1589
1586
|
return report.context === context;
|
|
1590
1587
|
})) emergency = null;
|
|
1591
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1588
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$u(pending), _step4; !(_step4 = _iterator4()).done;) {
|
|
1592
1589
|
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
1593
1590
|
key = _step4$value[0],
|
|
1594
1591
|
report = _step4$value[1];
|
|
1595
1592
|
if (report.context === context) pending["delete"](key);
|
|
1596
1593
|
}
|
|
1597
1594
|
for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
|
|
1598
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1595
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$u(streams), _step5; !(_step5 = _iterator5()).done;) {
|
|
1599
1596
|
var stream = _step5.value;
|
|
1600
1597
|
if (stream.state.report.context === context) {
|
|
1601
1598
|
stream.disposed = true;
|
|
@@ -1624,7 +1621,7 @@ function createSessionActor(options, deps) {
|
|
|
1624
1621
|
unsubscribe();
|
|
1625
1622
|
cancelTimer == null || cancelTimer();
|
|
1626
1623
|
cancelRequest == null || cancelRequest();
|
|
1627
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
1624
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$u(streams), _step6; !(_step6 = _iterator6()).done;) {
|
|
1628
1625
|
var stream = _step6.value;
|
|
1629
1626
|
stream.disposed = true;
|
|
1630
1627
|
}
|
|
@@ -1646,7 +1643,7 @@ function createSessionActor(options, deps) {
|
|
|
1646
1643
|
sentAtUnixMs: Math.floor(deps.unixMs()),
|
|
1647
1644
|
reports: reports
|
|
1648
1645
|
});
|
|
1649
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
1646
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$u(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
|
|
1650
1647
|
var report = _step7.value;
|
|
1651
1648
|
dropped(report);
|
|
1652
1649
|
removeReports([report]);
|
|
@@ -1816,14 +1813,14 @@ function createSessionActor(options, deps) {
|
|
|
1816
1813
|
retries = 0;
|
|
1817
1814
|
failureStreak = 0;
|
|
1818
1815
|
} else if (result.kind === "permanent") {
|
|
1819
|
-
for (_iterator11 = _createForOfIteratorHelperLoose$
|
|
1816
|
+
for (_iterator11 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step11 = _iterator11()).done;) {
|
|
1820
1817
|
report = _step11.value;
|
|
1821
1818
|
disable(report.context);
|
|
1822
1819
|
}
|
|
1823
1820
|
} else {
|
|
1824
1821
|
backoff(result);
|
|
1825
1822
|
if (++retries > 3) {
|
|
1826
|
-
for (_iterator12 = _createForOfIteratorHelperLoose$
|
|
1823
|
+
for (_iterator12 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step12 = _iterator12()).done;) {
|
|
1827
1824
|
_report = _step12.value;
|
|
1828
1825
|
dropped(_report);
|
|
1829
1826
|
}
|
|
@@ -1845,7 +1842,7 @@ function createSessionActor(options, deps) {
|
|
|
1845
1842
|
backoff({});
|
|
1846
1843
|
if (authorizing) failedEligibility(authorizing);
|
|
1847
1844
|
if (frozen && ++retries > 3) {
|
|
1848
|
-
for (_iterator13 = _createForOfIteratorHelperLoose$
|
|
1845
|
+
for (_iterator13 = _createForOfIteratorHelperLoose$u(frozen.reports); !(_step13 = _iterator13()).done;) {
|
|
1849
1846
|
_report2 = _step13.value;
|
|
1850
1847
|
dropped(_report2);
|
|
1851
1848
|
}
|
|
@@ -1888,7 +1885,7 @@ function createSessionActor(options, deps) {
|
|
|
1888
1885
|
} else if (outcome.kind === "committed") {
|
|
1889
1886
|
if (emergency === sending) emergency = null;
|
|
1890
1887
|
} else if (outcome.kind === "permanent") {
|
|
1891
|
-
for (var _iterator8 = _createForOfIteratorHelperLoose$
|
|
1888
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose$u(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
1892
1889
|
var report = _step8.value;
|
|
1893
1890
|
disable(report.context);
|
|
1894
1891
|
}
|
|
@@ -1920,7 +1917,7 @@ function createSessionActor(options, deps) {
|
|
|
1920
1917
|
}
|
|
1921
1918
|
function tick() {
|
|
1922
1919
|
if (disposed || visibility === "hidden") return;
|
|
1923
|
-
for (var _iterator9 = _createForOfIteratorHelperLoose$
|
|
1920
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose$u(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
1924
1921
|
var stream = _step9.value;
|
|
1925
1922
|
var report = prepareDeadline(stream);
|
|
1926
1923
|
if (!(report != null && report.current)) continue;
|
|
@@ -1947,7 +1944,7 @@ function createSessionActor(options, deps) {
|
|
|
1947
1944
|
if (disposed || visibility === "hidden") return;
|
|
1948
1945
|
var delay = Infinity;
|
|
1949
1946
|
if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
|
|
1950
|
-
for (var _iterator0 = _createForOfIteratorHelperLoose$
|
|
1947
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose$u(streams), _step0; !(_step0 = _iterator0()).done;) {
|
|
1951
1948
|
var stream = _step0.value;
|
|
1952
1949
|
var report = prepareDeadline(stream);
|
|
1953
1950
|
if (!(report != null && report.current)) continue;
|
|
@@ -2033,7 +2030,7 @@ function createSessionActor(options, deps) {
|
|
|
2033
2030
|
return guard$2(function () {
|
|
2034
2031
|
if (disposed || next === visibility) return;
|
|
2035
2032
|
visibility = next;
|
|
2036
|
-
for (var _iterator1 = _createForOfIteratorHelperLoose$
|
|
2033
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose$u(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2037
2034
|
var stream = _step1.value;
|
|
2038
2035
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2039
2036
|
stream.state = reduceObservation(stream.state, {
|
|
@@ -2074,7 +2071,7 @@ function createSessionActor(options, deps) {
|
|
|
2074
2071
|
if (taskDisposed) return;
|
|
2075
2072
|
taskDisposed = true;
|
|
2076
2073
|
if (workflowStream) close(workflowStream, "disposed");
|
|
2077
|
-
for (var _iterator10 = _createForOfIteratorHelperLoose$
|
|
2074
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose$u(captures), _step10; !(_step10 = _iterator10()).done;) {
|
|
2078
2075
|
var capture = _step10.value;
|
|
2079
2076
|
capture.dispose();
|
|
2080
2077
|
}
|
|
@@ -2212,6 +2209,44 @@ function isApprovedResponse(action, response) {
|
|
|
2212
2209
|
return action === SubmissionAction.ENROLL ? result === "Customer Onboarded" : result === "Approved";
|
|
2213
2210
|
}
|
|
2214
2211
|
|
|
2212
|
+
var createStoreImpl = function createStoreImpl(createState) {
|
|
2213
|
+
var state;
|
|
2214
|
+
var listeners = /* @__PURE__ */new Set();
|
|
2215
|
+
var setState = function setState(partial, replace) {
|
|
2216
|
+
var nextState = typeof partial === "function" ? partial(state) : partial;
|
|
2217
|
+
if (!Object.is(nextState, state)) {
|
|
2218
|
+
var previousState = state;
|
|
2219
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
2220
|
+
listeners.forEach(function (listener) {
|
|
2221
|
+
return listener(state, previousState);
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
};
|
|
2225
|
+
var getState = function getState() {
|
|
2226
|
+
return state;
|
|
2227
|
+
};
|
|
2228
|
+
var getInitialState = function getInitialState() {
|
|
2229
|
+
return initialState;
|
|
2230
|
+
};
|
|
2231
|
+
var subscribe = function subscribe(listener) {
|
|
2232
|
+
listeners.add(listener);
|
|
2233
|
+
return function () {
|
|
2234
|
+
return listeners["delete"](listener);
|
|
2235
|
+
};
|
|
2236
|
+
};
|
|
2237
|
+
var api = {
|
|
2238
|
+
setState: setState,
|
|
2239
|
+
getState: getState,
|
|
2240
|
+
getInitialState: getInitialState,
|
|
2241
|
+
subscribe: subscribe
|
|
2242
|
+
};
|
|
2243
|
+
var initialState = state = createState(setState, getState, api);
|
|
2244
|
+
return api;
|
|
2245
|
+
};
|
|
2246
|
+
var createStore = function createStore(createState) {
|
|
2247
|
+
return createState ? createStoreImpl(createState) : createStoreImpl;
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2215
2250
|
function sessionReducer(state, action) {
|
|
2216
2251
|
switch (action.type) {
|
|
2217
2252
|
case 'setSessionId':
|
|
@@ -2872,7 +2907,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
2872
2907
|
return t;
|
|
2873
2908
|
}
|
|
2874
2909
|
|
|
2875
|
-
var _excluded$
|
|
2910
|
+
var _excluded$k = ["nonce", "web", "os"];
|
|
2876
2911
|
/**
|
|
2877
2912
|
* Grade the envelope from whichever inputs are present:
|
|
2878
2913
|
* - OS token present -> 'os-attested' (attach `os`)
|
|
@@ -2886,7 +2921,7 @@ function buildClientAttestation(input) {
|
|
|
2886
2921
|
var nonce = input.nonce,
|
|
2887
2922
|
web = input.web,
|
|
2888
2923
|
os = input.os,
|
|
2889
|
-
versions = _objectWithoutPropertiesLoose(input, _excluded$
|
|
2924
|
+
versions = _objectWithoutPropertiesLoose(input, _excluded$k);
|
|
2890
2925
|
if (os) {
|
|
2891
2926
|
return _extends({
|
|
2892
2927
|
assuranceLevel: 'os-attested',
|
|
@@ -3469,9 +3504,9 @@ function blobToB64(blob) {
|
|
|
3469
3504
|
});
|
|
3470
3505
|
}
|
|
3471
3506
|
|
|
3472
|
-
function _createForOfIteratorHelperLoose$
|
|
3473
|
-
function _unsupportedIterableToArray$
|
|
3474
|
-
function _arrayLikeToArray$
|
|
3507
|
+
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."); }
|
|
3508
|
+
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; } }
|
|
3509
|
+
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; }
|
|
3475
3510
|
/**
|
|
3476
3511
|
* Parser for AAMVA (American Association of Motor Vehicle Administrators)
|
|
3477
3512
|
* PDF417 barcode data found on US and Canadian driver's licenses.
|
|
@@ -3733,7 +3768,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3733
3768
|
DAD: false
|
|
3734
3769
|
};
|
|
3735
3770
|
var daaValue = null;
|
|
3736
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
3771
|
+
for (var _iterator = _createForOfIteratorHelperLoose$t(lines), _step; !(_step = _iterator()).done;) {
|
|
3737
3772
|
var line = _step.value;
|
|
3738
3773
|
var match = line.match(fieldRegex);
|
|
3739
3774
|
if (match) {
|
|
@@ -3774,7 +3809,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3774
3809
|
result.fields.push(field);
|
|
3775
3810
|
}
|
|
3776
3811
|
};
|
|
3777
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
3812
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$t(daaFields), _step2; !(_step2 = _iterator2()).done;) {
|
|
3778
3813
|
_loop();
|
|
3779
3814
|
}
|
|
3780
3815
|
}
|
|
@@ -4830,7 +4865,7 @@ function createIdmissionClient(config) {
|
|
|
4830
4865
|
sessionCheckState: 'READY',
|
|
4831
4866
|
canRefreshSession: typeof config.sessionId === 'function'
|
|
4832
4867
|
};
|
|
4833
|
-
var store =
|
|
4868
|
+
var store = createStore(function () {
|
|
4834
4869
|
return {
|
|
4835
4870
|
session: initialSession,
|
|
4836
4871
|
submissionStatus: SubmissionStatus.READY
|
|
@@ -6467,7 +6502,7 @@ var fr = {
|
|
|
6467
6502
|
'Barcode capture in progress, please hold still': 'Capture du code-barres en cours, veuillez ne pas bouger'
|
|
6468
6503
|
};
|
|
6469
6504
|
|
|
6470
|
-
var it = {
|
|
6505
|
+
var it$1 = {
|
|
6471
6506
|
'English - en': 'Italian - it',
|
|
6472
6507
|
'Use your device camera to capture your ID': 'Utilizzare la fotocamera del dispositivo per acquisire il documento',
|
|
6473
6508
|
'Use your iPhone as a webcam': 'Utilizza iPhone come webcam',
|
|
@@ -6763,7 +6798,7 @@ var ja = {
|
|
|
6763
6798
|
'Barcode capture in progress, please hold still': 'バーコードを読み取っています。動かないでください'
|
|
6764
6799
|
};
|
|
6765
6800
|
|
|
6766
|
-
var pt = {
|
|
6801
|
+
var pt$1 = {
|
|
6767
6802
|
'English - en': 'Portuguese (Brazil) - pt',
|
|
6768
6803
|
'Use your device camera to capture your ID': 'Usar a câmera do dispositivo para fotografar sua identidade',
|
|
6769
6804
|
'Use your iPhone as a webcam': 'Use seu iPhone como uma câmera Web',
|
|
@@ -7313,13 +7348,13 @@ var resources = {
|
|
|
7313
7348
|
translation: withThreeOhTranslations('fr', fr)
|
|
7314
7349
|
},
|
|
7315
7350
|
it: {
|
|
7316
|
-
translation: withThreeOhTranslations('it', it)
|
|
7351
|
+
translation: withThreeOhTranslations('it', it$1)
|
|
7317
7352
|
},
|
|
7318
7353
|
ja: {
|
|
7319
7354
|
translation: withThreeOhTranslations('ja', ja)
|
|
7320
7355
|
},
|
|
7321
7356
|
pt: {
|
|
7322
|
-
translation: withThreeOhTranslations('pt', pt)
|
|
7357
|
+
translation: withThreeOhTranslations('pt', pt$1)
|
|
7323
7358
|
},
|
|
7324
7359
|
ru: {
|
|
7325
7360
|
translation: withThreeOhTranslations('ru', ru)
|
|
@@ -7634,10 +7669,10 @@ function useGuideOrientationContext() {
|
|
|
7634
7669
|
}
|
|
7635
7670
|
|
|
7636
7671
|
var _templateObject$_, _templateObject2$Q;
|
|
7637
|
-
var _excluded$
|
|
7672
|
+
var _excluded$j = ["isRearFacing"];
|
|
7638
7673
|
var CameraVideoTag = /*#__PURE__*/React.forwardRef(function CameraVideoTag(_ref, ref) {
|
|
7639
7674
|
var isRearFacing = _ref.isRearFacing,
|
|
7640
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7675
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
7641
7676
|
return jsxRuntime.jsx(FullscreenVideoTag, _extends({
|
|
7642
7677
|
autoPlay: true,
|
|
7643
7678
|
playsInline: true,
|
|
@@ -7705,9 +7740,9 @@ function ScalingCameraFeed(_ref2) {
|
|
|
7705
7740
|
}
|
|
7706
7741
|
|
|
7707
7742
|
var _templateObject$Z, _templateObject2$P, _templateObject3$D, _templateObject4$y, _templateObject5$t, _templateObject6$l;
|
|
7708
|
-
function _createForOfIteratorHelperLoose$
|
|
7709
|
-
function _unsupportedIterableToArray$
|
|
7710
|
-
function _arrayLikeToArray$
|
|
7743
|
+
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."); }
|
|
7744
|
+
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; } }
|
|
7745
|
+
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; }
|
|
7711
7746
|
/** Displays camera readiness and available source-frame dimensions. */
|
|
7712
7747
|
function CameraDebugStatus(_ref) {
|
|
7713
7748
|
var ready = _ref.ready,
|
|
@@ -7724,7 +7759,7 @@ function DebugStatsPane(_ref2) {
|
|
|
7724
7759
|
});
|
|
7725
7760
|
var portalLocation = document.getElementById('idmission-above-guides-content');
|
|
7726
7761
|
if (!portalLocation) return element;
|
|
7727
|
-
return /*#__PURE__*/
|
|
7762
|
+
return /*#__PURE__*/ReactDOM.createPortal(element, portalLocation);
|
|
7728
7763
|
}
|
|
7729
7764
|
var DebugStatsPaneDiv = styledComponents.styled.span(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"])));
|
|
7730
7765
|
var ObjectDetectionDebugOverlayDiv = styledComponents.styled.div(_templateObject2$P || (_templateObject2$P = _taggedTemplateLiteralLoose(["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"])), function (_ref3) {
|
|
@@ -7972,7 +8007,7 @@ function SelfieCaptureFaceMesh(_ref15) {
|
|
|
7972
8007
|
groups.forEach(function (indices, color) {
|
|
7973
8008
|
ctx.fillStyle = color;
|
|
7974
8009
|
ctx.beginPath();
|
|
7975
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
8010
|
+
for (var _iterator = _createForOfIteratorHelperLoose$s(indices), _step; !(_step = _iterator()).done;) {
|
|
7976
8011
|
var _i = _step.value;
|
|
7977
8012
|
var p = meshLandmarks[_i];
|
|
7978
8013
|
ctx.moveTo(p.x + dotRadius, p.y);
|
|
@@ -8127,7 +8162,7 @@ function BrowserEdgeTint(_ref) {
|
|
|
8127
8162
|
}, []);
|
|
8128
8163
|
if (!target) return null;
|
|
8129
8164
|
var bottomColor = hiddenBottomColor != null ? hiddenBottomColor : color;
|
|
8130
|
-
return /*#__PURE__*/
|
|
8165
|
+
return /*#__PURE__*/ReactDOM.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8131
8166
|
children: [jsxRuntime.jsx(EdgeStrip, {
|
|
8132
8167
|
"$edge": "top",
|
|
8133
8168
|
"$color": color,
|
|
@@ -8154,7 +8189,7 @@ var EdgeStrip = styledComponents.styled.div(_templateObject$Y || (_templateObjec
|
|
|
8154
8189
|
});
|
|
8155
8190
|
|
|
8156
8191
|
var _templateObject$X;
|
|
8157
|
-
var _excluded$
|
|
8192
|
+
var _excluded$i = ["children", "className", "colors", "disabled", "finished", "variant"];
|
|
8158
8193
|
var LoaderButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8159
8194
|
var children = _ref.children,
|
|
8160
8195
|
className = _ref.className,
|
|
@@ -8164,7 +8199,7 @@ var LoaderButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
8164
8199
|
finished = _ref.finished,
|
|
8165
8200
|
_ref$variant = _ref.variant,
|
|
8166
8201
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
8167
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8202
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
8168
8203
|
var buttonRef = React.useRef(null);
|
|
8169
8204
|
var laddaRef = React.useRef(null);
|
|
8170
8205
|
var _useState = React.useState(false),
|
|
@@ -8241,7 +8276,7 @@ var GuidanceMessageContainer = function GuidanceMessageContainer(props) {
|
|
|
8241
8276
|
var element = jsxRuntime.jsx(GuidanceMessageContainerDiv, _extends({}, props));
|
|
8242
8277
|
var portalLocation = document.getElementById('idmission-above-guides-content');
|
|
8243
8278
|
if (!portalLocation) return element;
|
|
8244
|
-
return /*#__PURE__*/
|
|
8279
|
+
return /*#__PURE__*/ReactDOM.createPortal(element, portalLocation);
|
|
8245
8280
|
};
|
|
8246
8281
|
var GuidanceMessage = styledComponents.styled.div(_templateObject2$O || (_templateObject2$O = _taggedTemplateLiteralLoose(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])), function (props) {
|
|
8247
8282
|
var _ref3, _props$$background, _props$theme, _props$$variant;
|
|
@@ -8475,7 +8510,7 @@ var error = function error() {
|
|
|
8475
8510
|
return (console.error ).apply(void 0, arguments);
|
|
8476
8511
|
}; // eslint-disable-line no-console
|
|
8477
8512
|
|
|
8478
|
-
var _excluded$
|
|
8513
|
+
var _excluded$h = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
|
|
8479
8514
|
_excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
|
|
8480
8515
|
var _templateObject$S, _templateObject2$L, _templateObject3$A, _templateObject4$v, _templateObject5$r, _templateObject6$j, _templateObject7$g;
|
|
8481
8516
|
var IdCardGuideImageContainer = styledComponents.styled(IdCardBorder)(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n position: relative;\n ", "\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n ", ";\n"])), function (props) {
|
|
@@ -8505,7 +8540,7 @@ function IdCardBorder(_ref) {
|
|
|
8505
8540
|
progress = _ref$progress === void 0 ? 0 : _ref$progress,
|
|
8506
8541
|
_ref$guideBoxDisabled = _ref.guideBoxDisabled,
|
|
8507
8542
|
guideBoxDisabled = _ref$guideBoxDisabled === void 0 ? false : _ref$guideBoxDisabled,
|
|
8508
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8543
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8509
8544
|
var _useResizeObserver = useResizeObserver(),
|
|
8510
8545
|
ref = _useResizeObserver.ref,
|
|
8511
8546
|
_useResizeObserver$wi = _useResizeObserver.width,
|
|
@@ -9895,11 +9930,11 @@ var LoadingGraphicPhoneGroup = styledComponents.styled.g(_templateObject4$s || (
|
|
|
9895
9930
|
return props.$offScreen ? '40px' : '0';
|
|
9896
9931
|
});
|
|
9897
9932
|
|
|
9898
|
-
var _excluded$
|
|
9933
|
+
var _excluded$g = ["state"];
|
|
9899
9934
|
function LoadingListItemIndicator(_ref) {
|
|
9900
9935
|
var _ref$state = _ref.state,
|
|
9901
9936
|
state = _ref$state === void 0 ? 'running' : _ref$state,
|
|
9902
|
-
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9937
|
+
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
9903
9938
|
return jsxRuntime.jsx("svg", _extends({
|
|
9904
9939
|
width: "16",
|
|
9905
9940
|
height: "16",
|
|
@@ -10404,9 +10439,9 @@ function loadingOverlayBottomEdgeColor(theme, modelsReady) {
|
|
|
10404
10439
|
});
|
|
10405
10440
|
}
|
|
10406
10441
|
|
|
10407
|
-
function _createForOfIteratorHelperLoose$
|
|
10408
|
-
function _unsupportedIterableToArray$
|
|
10409
|
-
function _arrayLikeToArray$
|
|
10442
|
+
function _createForOfIteratorHelperLoose$r(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$r(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."); }
|
|
10443
|
+
function _unsupportedIterableToArray$r(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$r(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$r(r, a) : void 0; } }
|
|
10444
|
+
function _arrayLikeToArray$r(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; }
|
|
10410
10445
|
var DEFAULT_THRESHOLD = 0.03;
|
|
10411
10446
|
// Minimum confidence a `'Finger'` detection must clear before it counts
|
|
10412
10447
|
// toward occlusion. The LiteRT document detector emits low-score
|
|
@@ -10457,7 +10492,7 @@ function computeFingerOcclusion(bestDocument, detectedObjects, documentType, thr
|
|
|
10457
10492
|
// overlap each other the shared area gets double-counted — that errs
|
|
10458
10493
|
// toward over-blocking, which is the safer direction for occlusion.
|
|
10459
10494
|
var totalOverlap = 0;
|
|
10460
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10495
|
+
for (var _iterator = _createForOfIteratorHelperLoose$r(detectedObjects), _step; !(_step = _iterator()).done;) {
|
|
10461
10496
|
var obj = _step.value;
|
|
10462
10497
|
if (obj.label !== 'Finger') continue;
|
|
10463
10498
|
if (obj.score < MIN_FINGER_SCORE) continue;
|
|
@@ -10489,7 +10524,7 @@ function anyOverlapByLabel(bestDocument, detectedObjects, label, minScore) {
|
|
|
10489
10524
|
if (!bestDocument) return false;
|
|
10490
10525
|
var docBox = bestDocument.box;
|
|
10491
10526
|
if (docBox.width <= 0 || docBox.height <= 0) return false;
|
|
10492
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
10527
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$r(detectedObjects), _step2; !(_step2 = _iterator2()).done;) {
|
|
10493
10528
|
var obj = _step2.value;
|
|
10494
10529
|
if (obj.label !== label) continue;
|
|
10495
10530
|
if (obj.score < minScore) continue;
|
|
@@ -10665,9 +10700,9 @@ var initialFlowState = {
|
|
|
10665
10700
|
|
|
10666
10701
|
var CapturedDocumentTypeValues = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'selfie', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage', 'idBarcodeImage'];
|
|
10667
10702
|
|
|
10668
|
-
function _createForOfIteratorHelperLoose$
|
|
10669
|
-
function _unsupportedIterableToArray$
|
|
10670
|
-
function _arrayLikeToArray$
|
|
10703
|
+
function _createForOfIteratorHelperLoose$q(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$q(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."); }
|
|
10704
|
+
function _unsupportedIterableToArray$q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$q(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$q(r, a) : void 0; } }
|
|
10705
|
+
function _arrayLikeToArray$q(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; }
|
|
10671
10706
|
// Tuning constants — seeded estimates. Expect on-device tuning against real
|
|
10672
10707
|
// captures across angles/devices (same posture as the liveness geometry).
|
|
10673
10708
|
var CONTAINMENT_MIN = 0.8; // fraction of inner box inside the outer box
|
|
@@ -10695,7 +10730,7 @@ function containment(inner, outer) {
|
|
|
10695
10730
|
}
|
|
10696
10731
|
function bestByLabel(objs, label) {
|
|
10697
10732
|
var best = null;
|
|
10698
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10733
|
+
for (var _iterator = _createForOfIteratorHelperLoose$q(objs), _step; !(_step = _iterator()).done;) {
|
|
10699
10734
|
var o = _step.value;
|
|
10700
10735
|
if (o.label !== label) continue;
|
|
10701
10736
|
if (o.score < MIN_BOOKLET_SCORE) continue;
|
|
@@ -10870,9 +10905,9 @@ function remainingIdCaptureRequirements(captureRequirement, capturedDocuments, r
|
|
|
10870
10905
|
});
|
|
10871
10906
|
}
|
|
10872
10907
|
|
|
10873
|
-
function _createForOfIteratorHelperLoose$
|
|
10874
|
-
function _unsupportedIterableToArray$
|
|
10875
|
-
function _arrayLikeToArray$
|
|
10908
|
+
function _createForOfIteratorHelperLoose$p(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$p(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."); }
|
|
10909
|
+
function _unsupportedIterableToArray$p(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$p(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$p(r, a) : void 0; } }
|
|
10910
|
+
function _arrayLikeToArray$p(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; }
|
|
10876
10911
|
/**
|
|
10877
10912
|
* Clears the current frame's verdict (sdk2 idCaptureReducer.ts:367-389). Both
|
|
10878
10913
|
* of these describe "the last frame we looked at", so they are meaningless —
|
|
@@ -10956,7 +10991,7 @@ var _reduceIdCapture = function reduceIdCapture(state, action, now) {
|
|
|
10956
10991
|
// from one the user captured -- `documentCaptured` erases the
|
|
10957
10992
|
// difference by design (see state.ts precapturedDocumentTypes).
|
|
10958
10993
|
var seeded = [];
|
|
10959
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10994
|
+
for (var _iterator = _createForOfIteratorHelperLoose$p(CapturedDocumentTypeValues), _step; !(_step = _iterator()).done;) {
|
|
10960
10995
|
var k = _step.value;
|
|
10961
10996
|
var payload = precapturedDocuments[k];
|
|
10962
10997
|
if (payload) {
|
|
@@ -11294,7 +11329,7 @@ var _reduceIdCapture = function reduceIdCapture(state, action, now) {
|
|
|
11294
11329
|
case 'documentsCaptured':
|
|
11295
11330
|
{
|
|
11296
11331
|
var _newState2 = _extends({}, state);
|
|
11297
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
11332
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$p(action.payload), _step2; !(_step2 = _iterator2()).done;) {
|
|
11298
11333
|
var doc = _step2.value;
|
|
11299
11334
|
_newState2 = _reduceIdCapture(_newState2, {
|
|
11300
11335
|
type: 'documentCaptured',
|
|
@@ -13496,9 +13531,9 @@ function evaluateIsMobile(nav) {
|
|
|
13496
13531
|
return false;
|
|
13497
13532
|
}
|
|
13498
13533
|
|
|
13499
|
-
function _createForOfIteratorHelperLoose$
|
|
13500
|
-
function _unsupportedIterableToArray$
|
|
13501
|
-
function _arrayLikeToArray$
|
|
13534
|
+
function _createForOfIteratorHelperLoose$o(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$o(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."); }
|
|
13535
|
+
function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(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$o(r, a) : void 0; } }
|
|
13536
|
+
function _arrayLikeToArray$o(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; }
|
|
13502
13537
|
// zxing-js UMD build, self-hosted on the SDK's own CDN (version-pinned) rather
|
|
13503
13538
|
// than fetched from unpkg. The previous `@latest` URL was both an external
|
|
13504
13539
|
// dependency and a supply-chain risk — it executed whatever unpkg served as
|
|
@@ -14238,7 +14273,7 @@ function _decodePDF() {
|
|
|
14238
14273
|
}
|
|
14239
14274
|
base = _bases[_i];
|
|
14240
14275
|
log$1("[NativeBarcodeDecoder] Trying fine rotation deskew around " + base.angle + "\xB0...");
|
|
14241
|
-
_iterator = _createForOfIteratorHelperLoose$
|
|
14276
|
+
_iterator = _createForOfIteratorHelperLoose$o(FINE_ROTATION_ANGLES);
|
|
14242
14277
|
case 11:
|
|
14243
14278
|
if ((_step = _iterator()).done) {
|
|
14244
14279
|
_context0.next = 14;
|
|
@@ -14763,7 +14798,7 @@ function _decodePDF417WithDetails() {
|
|
|
14763
14798
|
}
|
|
14764
14799
|
base = _bases2[_i2];
|
|
14765
14800
|
log$1("[NativeBarcodeDecoder] Trying fine rotation deskew around " + base.angle + "\xB0 (detailed)...");
|
|
14766
|
-
_iterator2 = _createForOfIteratorHelperLoose$
|
|
14801
|
+
_iterator2 = _createForOfIteratorHelperLoose$o(FINE_ROTATION_ANGLES);
|
|
14767
14802
|
case 12:
|
|
14768
14803
|
if ((_step2 = _iterator2()).done) {
|
|
14769
14804
|
_context12.next = 15;
|
|
@@ -14882,9 +14917,9 @@ var CaptureAttachError = /*#__PURE__*/function (_Error) {
|
|
|
14882
14917
|
return CaptureAttachError;
|
|
14883
14918
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
14884
14919
|
|
|
14885
|
-
function _createForOfIteratorHelperLoose$
|
|
14886
|
-
function _unsupportedIterableToArray$
|
|
14887
|
-
function _arrayLikeToArray$
|
|
14920
|
+
function _createForOfIteratorHelperLoose$n(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$n(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."); }
|
|
14921
|
+
function _unsupportedIterableToArray$n(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$n(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$n(r, a) : void 0; } }
|
|
14922
|
+
function _arrayLikeToArray$n(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; }
|
|
14888
14923
|
/**
|
|
14889
14924
|
* Analyzes barcode readability for a detected document
|
|
14890
14925
|
* (IdCaptureModelsProvider.tsx:83-199, ported verbatim; the last two
|
|
@@ -15345,7 +15380,7 @@ function createDetectionPipeline(opts) {
|
|
|
15345
15380
|
});
|
|
15346
15381
|
if (failed) {
|
|
15347
15382
|
loadSettled = true;
|
|
15348
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
15383
|
+
for (var _iterator = _createForOfIteratorHelperLoose$n(lifecycleHandles), _step; !(_step = _iterator()).done;) {
|
|
15349
15384
|
var handle = _step.value;
|
|
15350
15385
|
handle.cancel();
|
|
15351
15386
|
}
|
|
@@ -16631,9 +16666,9 @@ function maybeDataUrlToBase64Sync(url) {
|
|
|
16631
16666
|
return dataUrlToBase64Sync(url);
|
|
16632
16667
|
}
|
|
16633
16668
|
|
|
16634
|
-
function _createForOfIteratorHelperLoose$
|
|
16635
|
-
function _unsupportedIterableToArray$
|
|
16636
|
-
function _arrayLikeToArray$
|
|
16669
|
+
function _createForOfIteratorHelperLoose$m(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$m(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."); }
|
|
16670
|
+
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(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$m(r, a) : void 0; } }
|
|
16671
|
+
function _arrayLikeToArray$m(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; }
|
|
16637
16672
|
// Document types whose capture attempt becomes an upload's `filemetadata`, in
|
|
16638
16673
|
// write order: `singlePage` after `idCardFront` so it wins `idFrontImage`,
|
|
16639
16674
|
// exactly as the image does below.
|
|
@@ -16723,7 +16758,7 @@ function buildIdCaptureArtifacts(inputs, now) {
|
|
|
16723
16758
|
};
|
|
16724
16759
|
if (ocrMetadata) meta.ocrMetadata = ocrMetadata;
|
|
16725
16760
|
var documentFileMetadata = {};
|
|
16726
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
16761
|
+
for (var _iterator = _createForOfIteratorHelperLoose$m(FILE_METADATA_KEYS), _step; !(_step = _iterator()).done;) {
|
|
16727
16762
|
var _step$value = _slicedToArray(_step.value, 2),
|
|
16728
16763
|
documentType = _step$value[0],
|
|
16729
16764
|
documentKey = _step$value[1];
|
|
@@ -16750,10 +16785,10 @@ function buildIdCaptureArtifacts(inputs, now) {
|
|
|
16750
16785
|
};
|
|
16751
16786
|
}
|
|
16752
16787
|
|
|
16753
|
-
var _excluded$
|
|
16754
|
-
function _createForOfIteratorHelperLoose$
|
|
16755
|
-
function _unsupportedIterableToArray$
|
|
16756
|
-
function _arrayLikeToArray$
|
|
16788
|
+
var _excluded$f = ["bestBarcodeScore", "barcodeBoundingBox"];
|
|
16789
|
+
function _createForOfIteratorHelperLoose$l(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$l(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."); }
|
|
16790
|
+
function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(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$l(r, a) : void 0; } }
|
|
16791
|
+
function _arrayLikeToArray$l(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; }
|
|
16757
16792
|
// sdk2/src/components/id_capture/IdCaptureWizard.tsx:253-262
|
|
16758
16793
|
var lastDocumentDetectedAtDefaults = {
|
|
16759
16794
|
idCardFront: null,
|
|
@@ -16834,7 +16869,7 @@ function createIdCaptureController(config) {
|
|
|
16834
16869
|
// ---------------------------------------------------------------------
|
|
16835
16870
|
// Store
|
|
16836
16871
|
// ---------------------------------------------------------------------
|
|
16837
|
-
var internal =
|
|
16872
|
+
var internal = createStore(function () {
|
|
16838
16873
|
return _extends({}, initialFlowState, {
|
|
16839
16874
|
error: null,
|
|
16840
16875
|
submission: 'idle',
|
|
@@ -16923,7 +16958,7 @@ function createIdCaptureController(config) {
|
|
|
16923
16958
|
// payload.ts's buildNoBarcodeOCRMetadata fallback counts).
|
|
16924
16959
|
var bestBarcodeScore = metadata.bestBarcodeScore,
|
|
16925
16960
|
barcodeBoundingBox = metadata.barcodeBoundingBox,
|
|
16926
|
-
captureAttemptWithoutBarcode = _objectWithoutPropertiesLoose(metadata, _excluded$
|
|
16961
|
+
captureAttemptWithoutBarcode = _objectWithoutPropertiesLoose(metadata, _excluded$f);
|
|
16927
16962
|
captureAttempts.back.push(captureAttemptWithoutBarcode);
|
|
16928
16963
|
// :619-629 -- appended whenever a barcode score was recorded at all
|
|
16929
16964
|
// (0 counts: auto-capture stamps `bestBarcodeScore: bestBarcode?.score
|
|
@@ -16963,7 +16998,7 @@ function createIdCaptureController(config) {
|
|
|
16963
16998
|
}
|
|
16964
16999
|
}
|
|
16965
17000
|
function clearAllTimers() {
|
|
16966
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
17001
|
+
for (var _iterator = _createForOfIteratorHelperLoose$l(timers.values()), _step; !(_step = _iterator()).done;) {
|
|
16967
17002
|
var handle = _step.value;
|
|
16968
17003
|
io.clearTimeout(handle);
|
|
16969
17004
|
}
|
|
@@ -19970,7 +20005,7 @@ var ContinueButton$2 = styledComponents.styled(LoaderButton)(_templateObject7$c
|
|
|
19970
20005
|
return (_props$theme$idCaptur5 = (_props$theme7 = props.theme) == null || (_props$theme7 = _props$theme7.idCapture) == null || (_props$theme7 = _props$theme7.loadingOverlay) == null ? void 0 : _props$theme7.continueBtnDisabledBorder) != null ? _props$theme$idCaptur5 : 'none';
|
|
19971
20006
|
});
|
|
19972
20007
|
|
|
19973
|
-
var _excluded$
|
|
20008
|
+
var _excluded$e = ["mode"];
|
|
19974
20009
|
var components$1 = {
|
|
19975
20010
|
"default": IdCaptureLoadingOverlayDefault,
|
|
19976
20011
|
legacy: IdCaptureLoadingOverlayLegacy,
|
|
@@ -19980,7 +20015,7 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_ref) {
|
|
|
19980
20015
|
var _components$mode;
|
|
19981
20016
|
var _ref$mode = _ref.mode,
|
|
19982
20017
|
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
19983
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
20018
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
19984
20019
|
var Component = (_components$mode = components$1[mode]) != null ? _components$mode : components$1["default"];
|
|
19985
20020
|
return jsxRuntime.jsx(Component, _extends({}, props));
|
|
19986
20021
|
};
|
|
@@ -20641,7 +20676,9 @@ var ReviewScreen = function ReviewScreen(_ref) {
|
|
|
20641
20676
|
_ref$verbiage = _ref.verbiage,
|
|
20642
20677
|
rawVerbiage = _ref$verbiage === void 0 ? {} : _ref$verbiage,
|
|
20643
20678
|
_ref$classNames = _ref.classNames,
|
|
20644
|
-
classNames = _ref$classNames === void 0 ? {} : _ref$classNames
|
|
20679
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20680
|
+
_ref$colors = _ref.colors,
|
|
20681
|
+
colors = _ref$colors === void 0 ? {} : _ref$colors;
|
|
20645
20682
|
var submitButtonRef = React.useRef(null);
|
|
20646
20683
|
// Auto-focus submit button when session becomes ready.
|
|
20647
20684
|
React.useEffect(function () {
|
|
@@ -20695,6 +20732,7 @@ var ReviewScreen = function ReviewScreen(_ref) {
|
|
|
20695
20732
|
children: [jsxRuntime.jsx(WideButton, {
|
|
20696
20733
|
ref: submitButtonRef,
|
|
20697
20734
|
className: classNames.submitBtn,
|
|
20735
|
+
colors: colors.submitBtn,
|
|
20698
20736
|
variant: "positive",
|
|
20699
20737
|
onClick: onSubmit,
|
|
20700
20738
|
disabled: submission === 'submitting' || !sessionReady,
|
|
@@ -20702,6 +20740,7 @@ var ReviewScreen = function ReviewScreen(_ref) {
|
|
|
20702
20740
|
children: submission === 'submitting' ? verbiage.submittingText : !sessionReady ? 'Initializing...' : verbiage.submitText
|
|
20703
20741
|
}), jsxRuntime.jsx(WideBorderButton, {
|
|
20704
20742
|
className: classNames.retryBtn,
|
|
20743
|
+
colors: colors.retryBtn,
|
|
20705
20744
|
variant: "warning",
|
|
20706
20745
|
onClick: onRetry,
|
|
20707
20746
|
disabled: submission !== 'idle',
|
|
@@ -21563,9 +21602,9 @@ function useSessionReady() {
|
|
|
21563
21602
|
}
|
|
21564
21603
|
|
|
21565
21604
|
var _templateObject$w;
|
|
21566
|
-
function _createForOfIteratorHelperLoose$
|
|
21567
|
-
function _unsupportedIterableToArray$
|
|
21568
|
-
function _arrayLikeToArray$
|
|
21605
|
+
function _createForOfIteratorHelperLoose$k(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$k(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."); }
|
|
21606
|
+
function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(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$k(r, a) : void 0; } }
|
|
21607
|
+
function _arrayLikeToArray$k(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; }
|
|
21569
21608
|
// Unlike SelfieCaptureView/FaceLivenessView, this view has no root
|
|
21570
21609
|
// container of its own -- ScalingCameraFeed/IdCaptureGuides/etc. render as
|
|
21571
21610
|
// siblings relying on whatever positioned ancestor the host page provides.
|
|
@@ -21833,7 +21872,7 @@ function IdCaptureViewContent(_ref) {
|
|
|
21833
21872
|
// after this effect first runs with an empty state). Folding it in here,
|
|
21834
21873
|
// rather than seeding once on mount, is what makes the skip actually
|
|
21835
21874
|
// apply. `seen` keeps a consumed exclusion from being re-armed.
|
|
21836
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
21875
|
+
for (var _iterator = _createForOfIteratorHelperLoose$k(state.precapturedDocumentTypes), _step; !(_step = _iterator()).done;) {
|
|
21837
21876
|
var _documentType = _step.value;
|
|
21838
21877
|
if (seenPrecapturedRef.current.has(_documentType)) continue;
|
|
21839
21878
|
seenPrecapturedRef.current.add(_documentType);
|
|
@@ -22198,7 +22237,8 @@ function IdCaptureViewContent(_ref) {
|
|
|
22198
22237
|
onSubmit: isFlipInterstitial ? handleConfirmFlip : handleSubmit,
|
|
22199
22238
|
onRetry: handleRetake,
|
|
22200
22239
|
verbiage: isFlipInterstitial ? reviewFlipVerbiage : verbiage.review,
|
|
22201
|
-
classNames: classNames.review
|
|
22240
|
+
classNames: classNames.review,
|
|
22241
|
+
colors: colors.review
|
|
22202
22242
|
}), !screenTakeover && state.phase === 'error' && state.error !== null && jsxRuntime.jsx(ErrorScreen, {
|
|
22203
22243
|
error: state.error,
|
|
22204
22244
|
onRetry: handleRetry,
|
|
@@ -23222,9 +23262,9 @@ function guidanceFor(state, prediction, at) {
|
|
|
23222
23262
|
return code === SelfieGuidanceCode.HOLD_STILL && handOverFaceHeld(state.handOverFaceAt, at) ? SelfieGuidanceCode.HAND_OVER_FACE : code;
|
|
23223
23263
|
}
|
|
23224
23264
|
|
|
23225
|
-
function _createForOfIteratorHelperLoose$
|
|
23226
|
-
function _unsupportedIterableToArray$
|
|
23227
|
-
function _arrayLikeToArray$
|
|
23265
|
+
function _createForOfIteratorHelperLoose$j(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$j(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."); }
|
|
23266
|
+
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(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$j(r, a) : void 0; } }
|
|
23267
|
+
function _arrayLikeToArray$j(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; }
|
|
23228
23268
|
// sdk2 componenets/selfie_capture/faceDetectorDefault.ts:5
|
|
23229
23269
|
// (DEFAULT_FACE_DETECTOR): face-landmarker is the default face model as of
|
|
23230
23270
|
// 2.4.0.
|
|
@@ -23254,7 +23294,7 @@ function mapDetectionsToFaces(prediction) {
|
|
|
23254
23294
|
if (!prediction) return null;
|
|
23255
23295
|
var faceDetections = [];
|
|
23256
23296
|
var noseDetections = [];
|
|
23257
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
23297
|
+
for (var _iterator = _createForOfIteratorHelperLoose$j(prediction.detections), _step; !(_step = _iterator()).done;) {
|
|
23258
23298
|
var detection = _step.value;
|
|
23259
23299
|
if (isNoseDetection(detection)) {
|
|
23260
23300
|
noseDetections.push(detection);
|
|
@@ -23268,7 +23308,7 @@ function mapDetectionsToFaces(prediction) {
|
|
|
23268
23308
|
var faceBox = d.boundingBox;
|
|
23269
23309
|
if (!faceBox) continue;
|
|
23270
23310
|
var nose = null;
|
|
23271
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
23311
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$j(noseDetections), _step2; !(_step2 = _iterator2()).done;) {
|
|
23272
23312
|
var n = _step2.value;
|
|
23273
23313
|
var noseBox = n.boundingBox;
|
|
23274
23314
|
if (!noseBox) continue;
|
|
@@ -24070,9 +24110,9 @@ function captureQualityException(reason, measurements, originalThresholds, recov
|
|
|
24070
24110
|
};
|
|
24071
24111
|
}
|
|
24072
24112
|
|
|
24073
|
-
function _createForOfIteratorHelperLoose$
|
|
24074
|
-
function _unsupportedIterableToArray$
|
|
24075
|
-
function _arrayLikeToArray$
|
|
24113
|
+
function _createForOfIteratorHelperLoose$i(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$i(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."); }
|
|
24114
|
+
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(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$i(r, a) : void 0; } }
|
|
24115
|
+
function _arrayLikeToArray$i(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; }
|
|
24076
24116
|
// sdk2 SelfieGuidanceModelsProvider.tsx onPredictionMade's useThrottledCallback
|
|
24077
24117
|
// second argument (SelfieCapture.tsx:225 -- "locks to 60fps maximum").
|
|
24078
24118
|
var DEFAULT_PREDICTION_THROTTLE_MS = 16;
|
|
@@ -24157,7 +24197,7 @@ function createSelfieCaptureController(config) {
|
|
|
24157
24197
|
}
|
|
24158
24198
|
var handCheckEnabled = ((_config$handOverFaceC2 = config.handOverFaceCheck) == null ? void 0 : _config$handOverFaceC2.enabled) === true && detectorKind === 'face-landmarker';
|
|
24159
24199
|
if (config.captureRecovery) validateCaptureRecovery(config.captureRecovery);
|
|
24160
|
-
var internal =
|
|
24200
|
+
var internal = createStore(function () {
|
|
24161
24201
|
return _extends({}, createInitialSelfieCaptureState({
|
|
24162
24202
|
thresholds: config.thresholds
|
|
24163
24203
|
}), {
|
|
@@ -24194,7 +24234,7 @@ function createSelfieCaptureController(config) {
|
|
|
24194
24234
|
// --- timers (idCapture pattern, colon-namespaced) ---
|
|
24195
24235
|
var timers = new Map();
|
|
24196
24236
|
function clearAllTimers() {
|
|
24197
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
24237
|
+
for (var _iterator = _createForOfIteratorHelperLoose$i(timers.values()), _step; !(_step = _iterator()).done;) {
|
|
24198
24238
|
var handle = _step.value;
|
|
24199
24239
|
io.clearTimeout(handle);
|
|
24200
24240
|
}
|
|
@@ -25993,7 +26033,7 @@ function SelfieCameraFeed(_ref) {
|
|
|
25993
26033
|
}
|
|
25994
26034
|
|
|
25995
26035
|
var _templateObject$u, _templateObject2$s, _templateObject3$j, _templateObject4$f;
|
|
25996
|
-
var _excluded$
|
|
26036
|
+
var _excluded$d = ["borderColor", "borderOpacity", "borderWidth", "status"],
|
|
25997
26037
|
_excluded2$4 = ["status", "guideStyle"],
|
|
25998
26038
|
_excluded3 = ["frame", "borderWidth", "borderColor", "borderOpacity", "verticalAlign", "status", "guideStyle"],
|
|
25999
26039
|
_excluded4 = ["status"];
|
|
@@ -26010,7 +26050,7 @@ var HeadGuideSvg = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
26010
26050
|
borderWidth = _ref$borderWidth === void 0 ? 5 : _ref$borderWidth,
|
|
26011
26051
|
_ref$status = _ref.status,
|
|
26012
26052
|
status = _ref$status === void 0 ? 'ready' : _ref$status,
|
|
26013
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
26053
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
26014
26054
|
return jsxRuntime.jsxs("svg", _extends({}, props, {
|
|
26015
26055
|
ref: ref,
|
|
26016
26056
|
viewBox: "271 92 297 406",
|
|
@@ -26136,13 +26176,12 @@ var RelativeSvgContainer = styledComponents.styled.div(_templateObject4$f || (_t
|
|
|
26136
26176
|
return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
|
|
26137
26177
|
});
|
|
26138
26178
|
function SelfieCaptureAnimatedMask(_ref3) {
|
|
26139
|
-
var _theme$selfieCapture$4, _theme$
|
|
26179
|
+
var _ref4, _theme$selfieCapture4, _theme$selfieCapture$4, _theme$selfieCapture5, _theme$selfieCapture$5, _theme$selfieCapture6;
|
|
26140
26180
|
var _ref3$frame = _ref3.frame,
|
|
26141
26181
|
frame = _ref3$frame === void 0 ? 0 : _ref3$frame,
|
|
26142
26182
|
_ref3$borderWidth = _ref3.borderWidth,
|
|
26143
26183
|
borderWidth = _ref3$borderWidth === void 0 ? 5 : _ref3$borderWidth,
|
|
26144
|
-
|
|
26145
|
-
borderColor = _ref3$borderColor === void 0 ? 'white' : _ref3$borderColor,
|
|
26184
|
+
borderColor = _ref3.borderColor,
|
|
26146
26185
|
_ref3$borderOpacity = _ref3.borderOpacity,
|
|
26147
26186
|
borderOpacity = _ref3$borderOpacity === void 0 ? 0.8 : _ref3$borderOpacity,
|
|
26148
26187
|
_ref3$verticalAlign = _ref3.verticalAlign,
|
|
@@ -26152,9 +26191,12 @@ function SelfieCaptureAnimatedMask(_ref3) {
|
|
|
26152
26191
|
guideStyle = _ref3.guideStyle,
|
|
26153
26192
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
26154
26193
|
var theme = styledComponents.useTheme();
|
|
26155
|
-
|
|
26156
|
-
|
|
26157
|
-
var
|
|
26194
|
+
// The outline while no face is framed yet. An explicit `borderColor` wins,
|
|
26195
|
+
// as the video-ID guides pass their own.
|
|
26196
|
+
var unsatisfiedColor = (_ref4 = borderColor != null ? borderColor : (_theme$selfieCapture4 = theme.selfieCapture) == null || (_theme$selfieCapture4 = _theme$selfieCapture4.guides) == null ? void 0 : _theme$selfieCapture4.unsatisfiedColor) != null ? _ref4 : 'white';
|
|
26197
|
+
var satisfiedColor = (_theme$selfieCapture$4 = (_theme$selfieCapture5 = theme.selfieCapture) == null || (_theme$selfieCapture5 = _theme$selfieCapture5.guides) == null ? void 0 : _theme$selfieCapture5.satisfiedColor) != null ? _theme$selfieCapture$4 : 'var(--idm-color-positive-600)';
|
|
26198
|
+
var negativeColor = (_theme$selfieCapture$5 = (_theme$selfieCapture6 = theme.selfieCapture) == null || (_theme$selfieCapture6 = _theme$selfieCapture6.guides) == null ? void 0 : _theme$selfieCapture6.failureColor) != null ? _theme$selfieCapture$5 : 'var(--idm-color-negative-600)';
|
|
26199
|
+
var statusBorderColor = status === 'failure' ? negativeColor : status === 'success' ? satisfiedColor : unsatisfiedColor;
|
|
26158
26200
|
return jsxRuntime.jsxs(RelativeSvgContainer, {
|
|
26159
26201
|
"$verticalAlign": verticalAlign,
|
|
26160
26202
|
children: [jsxRuntime.jsx(HeadGuide, _extends({
|
|
@@ -26350,10 +26392,10 @@ function SelfieCaptureAnimatedMask(_ref3) {
|
|
|
26350
26392
|
}))]
|
|
26351
26393
|
});
|
|
26352
26394
|
}
|
|
26353
|
-
function SelfieCaptureAnimatedMaskWithStatus(
|
|
26354
|
-
var
|
|
26355
|
-
status =
|
|
26356
|
-
props = _objectWithoutPropertiesLoose(
|
|
26395
|
+
function SelfieCaptureAnimatedMaskWithStatus(_ref5) {
|
|
26396
|
+
var _ref5$status = _ref5.status,
|
|
26397
|
+
status = _ref5$status === void 0 ? 'ready' : _ref5$status,
|
|
26398
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded4);
|
|
26357
26399
|
var _useState3 = React.useState(1),
|
|
26358
26400
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
26359
26401
|
frame = _useState4[0],
|
|
@@ -26394,8 +26436,7 @@ var FaceCaptureGuideOverlay = /*#__PURE__*/React.memo(function FaceCaptureGuideO
|
|
|
26394
26436
|
guideStyle = _ref.guideStyle,
|
|
26395
26437
|
_ref$borderWidth = _ref.borderWidth,
|
|
26396
26438
|
borderWidth = _ref$borderWidth === void 0 ? 5 : _ref$borderWidth,
|
|
26397
|
-
|
|
26398
|
-
borderColor = _ref$borderColor === void 0 ? 'white' : _ref$borderColor,
|
|
26439
|
+
borderColor = _ref.borderColor,
|
|
26399
26440
|
_ref$borderOpacity = _ref.borderOpacity,
|
|
26400
26441
|
borderOpacity = _ref$borderOpacity === void 0 ? 0.8 : _ref$borderOpacity;
|
|
26401
26442
|
return jsxRuntime.jsx(FaceCaptureGuideContainer, {
|
|
@@ -27296,7 +27337,7 @@ var ContinueButton = styledComponents.styled(LoaderButton)(_templateObject7$8 ||
|
|
|
27296
27337
|
return (_props$theme$selfieCa5 = (_props$theme7 = props.theme) == null || (_props$theme7 = _props$theme7.selfieCapture) == null || (_props$theme7 = _props$theme7.loadingOverlay) == null ? void 0 : _props$theme7.continueBtnDisabledBorder) != null ? _props$theme$selfieCa5 : 'none';
|
|
27297
27338
|
});
|
|
27298
27339
|
|
|
27299
|
-
var _excluded$
|
|
27340
|
+
var _excluded$c = ["mode"];
|
|
27300
27341
|
var components = {
|
|
27301
27342
|
"default": SelfieCaptureLoadingOverlayDefault,
|
|
27302
27343
|
legacy: SelfieCaptureLoadingOverlayLegacy,
|
|
@@ -27306,7 +27347,7 @@ var SelfieCaptureLoadingOverlay = function SelfieCaptureLoadingOverlay(_ref) {
|
|
|
27306
27347
|
var _components$mode;
|
|
27307
27348
|
var _ref$mode = _ref.mode,
|
|
27308
27349
|
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
27309
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
27350
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
27310
27351
|
var Component = (_components$mode = components[mode]) != null ? _components$mode : components["default"];
|
|
27311
27352
|
return jsxRuntime.jsx(Component, _extends({}, props));
|
|
27312
27353
|
};
|
|
@@ -28678,9 +28719,9 @@ function FaceLivenessViewContent(_ref) {
|
|
|
28678
28719
|
});
|
|
28679
28720
|
}
|
|
28680
28721
|
|
|
28681
|
-
function _createForOfIteratorHelperLoose$
|
|
28682
|
-
function _unsupportedIterableToArray$
|
|
28683
|
-
function _arrayLikeToArray$
|
|
28722
|
+
function _createForOfIteratorHelperLoose$h(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$h(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."); }
|
|
28723
|
+
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(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$h(r, a) : void 0; } }
|
|
28724
|
+
function _arrayLikeToArray$h(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; }
|
|
28684
28725
|
/**
|
|
28685
28726
|
* Signature validity estimate (AMEXDESK-676).
|
|
28686
28727
|
*
|
|
@@ -28783,7 +28824,7 @@ function countSignaturePoints(strokes) {
|
|
|
28783
28824
|
*/
|
|
28784
28825
|
function measurePenDownMs(strokes) {
|
|
28785
28826
|
var total = 0;
|
|
28786
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
28827
|
+
for (var _iterator = _createForOfIteratorHelperLoose$h(strokes), _step; !(_step = _iterator()).done;) {
|
|
28787
28828
|
var stroke = _step.value;
|
|
28788
28829
|
if (stroke.length < 2) continue;
|
|
28789
28830
|
total += stroke[stroke.length - 1].time - stroke[0].time;
|
|
@@ -28802,9 +28843,9 @@ function boundingBox(strokes) {
|
|
|
28802
28843
|
var minY = Infinity;
|
|
28803
28844
|
var maxX = -Infinity;
|
|
28804
28845
|
var maxY = -Infinity;
|
|
28805
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
28846
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$h(strokes), _step2; !(_step2 = _iterator2()).done;) {
|
|
28806
28847
|
var stroke = _step2.value;
|
|
28807
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
28848
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$h(stroke), _step3; !(_step3 = _iterator3()).done;) {
|
|
28808
28849
|
var p = _step3.value;
|
|
28809
28850
|
if (p.x < minX) minX = p.x;
|
|
28810
28851
|
if (p.y < minY) minY = p.y;
|
|
@@ -28823,7 +28864,7 @@ function boundingBox(strokes) {
|
|
|
28823
28864
|
/** Sum of Euclidean distances between consecutive points within each stroke. */
|
|
28824
28865
|
function totalPathLength(strokes) {
|
|
28825
28866
|
var length = 0;
|
|
28826
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
28867
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$h(strokes), _step4; !(_step4 = _iterator4()).done;) {
|
|
28827
28868
|
var stroke = _step4.value;
|
|
28828
28869
|
for (var i = 1; i < stroke.length; i++) {
|
|
28829
28870
|
var dx = stroke[i].x - stroke[i - 1].x;
|
|
@@ -28879,7 +28920,7 @@ function resampleStroke(stroke, step) {
|
|
|
28879
28920
|
*/
|
|
28880
28921
|
function countDirectionChanges(strokes, step) {
|
|
28881
28922
|
var totalTurning = 0;
|
|
28882
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
28923
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$h(strokes), _step5; !(_step5 = _iterator5()).done;) {
|
|
28883
28924
|
var stroke = _step5.value;
|
|
28884
28925
|
var pts = resampleStroke(stroke, step);
|
|
28885
28926
|
var prevAngle = null;
|
|
@@ -28912,9 +28953,9 @@ function countZonesCovered(strokes, canvasWidth, canvasHeight, box) {
|
|
|
28912
28953
|
var height = useCanvas ? canvasHeight : box.maxY - box.minY;
|
|
28913
28954
|
if (width <= 0 || height <= 0) return 0;
|
|
28914
28955
|
var occupied = new Set();
|
|
28915
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
28956
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$h(strokes), _step6; !(_step6 = _iterator6()).done;) {
|
|
28916
28957
|
var stroke = _step6.value;
|
|
28917
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
28958
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$h(stroke), _step7; !(_step7 = _iterator7()).done;) {
|
|
28918
28959
|
var p = _step7.value;
|
|
28919
28960
|
var col = Math.min(2, Math.max(0, Math.floor((p.x - originX) / width * 3)));
|
|
28920
28961
|
var row = Math.min(2, Math.max(0, Math.floor((p.y - originY) / height * 3)));
|
|
@@ -29005,9 +29046,9 @@ function evaluateSignatureValidity(strokes, canvasWidth, canvasHeight, config) {
|
|
|
29005
29046
|
};
|
|
29006
29047
|
}
|
|
29007
29048
|
|
|
29008
|
-
function _createForOfIteratorHelperLoose$
|
|
29009
|
-
function _unsupportedIterableToArray$
|
|
29010
|
-
function _arrayLikeToArray$
|
|
29049
|
+
function _createForOfIteratorHelperLoose$g(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$g(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."); }
|
|
29050
|
+
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(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$g(r, a) : void 0; } }
|
|
29051
|
+
function _arrayLikeToArray$g(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; }
|
|
29011
29052
|
/**
|
|
29012
29053
|
* Off-screen, post-capture validation that proves a real frame renders at the
|
|
29013
29054
|
* signature's trim start offset. This is the authoritative detector for the
|
|
@@ -29456,7 +29497,7 @@ function _seekProbes() {
|
|
|
29456
29497
|
while (1) switch (_context4.prev = _context4.next) {
|
|
29457
29498
|
case 0:
|
|
29458
29499
|
probes = [];
|
|
29459
|
-
_iterator = _createForOfIteratorHelperLoose$
|
|
29500
|
+
_iterator = _createForOfIteratorHelperLoose$g(probeTimesMs);
|
|
29460
29501
|
case 1:
|
|
29461
29502
|
if ((_step = _iterator()).done) {
|
|
29462
29503
|
_context4.next = 4;
|
|
@@ -29526,7 +29567,7 @@ function _playbackProbes() {
|
|
|
29526
29567
|
};
|
|
29527
29568
|
var grab = function grab(mediaSec) {
|
|
29528
29569
|
if (mediaSec * 1000 > maxMediaMs) maxMediaMs = mediaSec * 1000;
|
|
29529
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
29570
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$g(targets), _step2; !(_step2 = _iterator2()).done;) {
|
|
29530
29571
|
var t = _step2.value;
|
|
29531
29572
|
if (t.result != null) continue;
|
|
29532
29573
|
if (maxMediaMs + SEEK_TOLERANCE_MS < t.ms) continue;
|
|
@@ -29579,7 +29620,7 @@ function _playbackProbes() {
|
|
|
29579
29620
|
video.play()["catch"](_finish);
|
|
29580
29621
|
});
|
|
29581
29622
|
case 2:
|
|
29582
|
-
_iterator3 = _createForOfIteratorHelperLoose$
|
|
29623
|
+
_iterator3 = _createForOfIteratorHelperLoose$g(targets);
|
|
29583
29624
|
case 3:
|
|
29584
29625
|
if ((_step3 = _iterator3()).done) {
|
|
29585
29626
|
_context5.next = 6;
|
|
@@ -31291,9 +31332,9 @@ function reduceSignatureCapture(state, event) {
|
|
|
31291
31332
|
}
|
|
31292
31333
|
}
|
|
31293
31334
|
|
|
31294
|
-
function _createForOfIteratorHelperLoose$
|
|
31295
|
-
function _unsupportedIterableToArray$
|
|
31296
|
-
function _arrayLikeToArray$
|
|
31335
|
+
function _createForOfIteratorHelperLoose$f(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$f(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."); }
|
|
31336
|
+
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(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$f(r, a) : void 0; } }
|
|
31337
|
+
function _arrayLikeToArray$f(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; }
|
|
31297
31338
|
/**
|
|
31298
31339
|
* Marks a microphone acquisition failure so `captureError` can type it.
|
|
31299
31340
|
*
|
|
@@ -31396,7 +31437,7 @@ function createSignatureCaptureController(config) {
|
|
|
31396
31437
|
var captureAudio = ((_config$captureAudio = config.captureAudio) != null ? _config$captureAudio : false) && mode === 'video';
|
|
31397
31438
|
var microphone = null;
|
|
31398
31439
|
var validityConfig = resolveSignatureValidityConfig(config.signatureValidity, config.minSignaturePadPoints);
|
|
31399
|
-
var store =
|
|
31440
|
+
var store = createStore(function () {
|
|
31400
31441
|
return createInitialSignatureCaptureState(mode);
|
|
31401
31442
|
});
|
|
31402
31443
|
var listeners = new Set();
|
|
@@ -31427,7 +31468,7 @@ function createSignatureCaptureController(config) {
|
|
|
31427
31468
|
}
|
|
31428
31469
|
function publish() {
|
|
31429
31470
|
snapshot = store.getState();
|
|
31430
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
31471
|
+
for (var _iterator = _createForOfIteratorHelperLoose$f(listeners), _step; !(_step = _iterator()).done;) {
|
|
31431
31472
|
var listener = _step.value;
|
|
31432
31473
|
try {
|
|
31433
31474
|
listener(snapshot);
|
|
@@ -32258,7 +32299,7 @@ function useSignatureCapture(controller) {
|
|
|
32258
32299
|
}
|
|
32259
32300
|
|
|
32260
32301
|
var _templateObject$j, _templateObject2$j, _templateObject3$f, _templateObject4$b, _templateObject5$b, _templateObject6$8;
|
|
32261
|
-
var _excluded$
|
|
32302
|
+
var _excluded$b = ["device", "frameDecode"];
|
|
32262
32303
|
var ASSUMED_TRIM_PADDING = {
|
|
32263
32304
|
startMs: TRIM_PADDING_START_MS,
|
|
32264
32305
|
endMs: TRIM_PADDING_END_MS
|
|
@@ -32490,7 +32531,7 @@ function trippedSignals(warning) {
|
|
|
32490
32531
|
var _warning$signals = warning.signals,
|
|
32491
32532
|
device = _warning$signals.device,
|
|
32492
32533
|
frameDecode = _warning$signals.frameDecode,
|
|
32493
|
-
top = _objectWithoutPropertiesLoose(_warning$signals, _excluded$
|
|
32534
|
+
top = _objectWithoutPropertiesLoose(_warning$signals, _excluded$b);
|
|
32494
32535
|
var tripped = [].concat(_toConsumableArray(Object.entries(top).filter(function (_ref2) {
|
|
32495
32536
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
32496
32537
|
signal = _ref3[1];
|
|
@@ -32832,6 +32873,8 @@ function SignatureCaptureViewContent(_ref) {
|
|
|
32832
32873
|
verbiage = _ref.verbiage,
|
|
32833
32874
|
_ref$classNames = _ref.classNames,
|
|
32834
32875
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
32876
|
+
_ref$colors = _ref.colors,
|
|
32877
|
+
colors = _ref$colors === void 0 ? {} : _ref$colors,
|
|
32835
32878
|
_ref$assets = _ref.assets,
|
|
32836
32879
|
assets = _ref$assets === void 0 ? {} : _ref$assets,
|
|
32837
32880
|
providedVideoRef = _ref.videoRef,
|
|
@@ -33205,6 +33248,8 @@ function SignatureCaptureViewContent(_ref) {
|
|
|
33205
33248
|
children: [text.headingText && (!legacyVideoLayout || sessionReady) ? jsxRuntime.jsx(SignatureHeading, {
|
|
33206
33249
|
as: "h1",
|
|
33207
33250
|
className: classNames.heading,
|
|
33251
|
+
"$background": colors.headingBackgroundColor,
|
|
33252
|
+
"$textColor": colors.headingTextColor,
|
|
33208
33253
|
"$legacyVideoLayout": legacyVideoLayout,
|
|
33209
33254
|
children: text.headingText
|
|
33210
33255
|
}) : null, !legacyVideoLayout ? jsxRuntime.jsx(Guidance, {
|
|
@@ -33264,6 +33309,7 @@ function SignatureCaptureViewContent(_ref) {
|
|
|
33264
33309
|
variant: "warning",
|
|
33265
33310
|
finished: true,
|
|
33266
33311
|
className: classNames.retryBtn,
|
|
33312
|
+
colors: colors.retryBtn,
|
|
33267
33313
|
onClick: function onClick() {
|
|
33268
33314
|
var _padRef$current3;
|
|
33269
33315
|
(_padRef$current3 = padRef.current) == null || _padRef$current3.clear();
|
|
@@ -33274,6 +33320,7 @@ function SignatureCaptureViewContent(_ref) {
|
|
|
33274
33320
|
variant: "positive",
|
|
33275
33321
|
finished: true,
|
|
33276
33322
|
className: classNames.doneBtn,
|
|
33323
|
+
colors: colors.doneBtn,
|
|
33277
33324
|
onClick: handleDone,
|
|
33278
33325
|
children: text.doneBtnText
|
|
33279
33326
|
})]
|
|
@@ -33283,6 +33330,7 @@ function SignatureCaptureViewContent(_ref) {
|
|
|
33283
33330
|
return handledByState(controller.actions.retry());
|
|
33284
33331
|
},
|
|
33285
33332
|
classNames: classNames.microphoneAccessDenied,
|
|
33333
|
+
colors: colors.microphoneAccessDenied,
|
|
33286
33334
|
verbiage: verbiage == null ? void 0 : verbiage.microphoneAccessDenied
|
|
33287
33335
|
}) : null, state.phase === "error" && !micDenied && recordingInterrupted && !restarting && RecordingInterruptedScreen ? jsxRuntime.jsx(RecordingInterruptedScreen, {
|
|
33288
33336
|
onStartOver: handleStartOver,
|
|
@@ -33542,9 +33590,9 @@ function buildVideoIdCaptureArtifacts(artifact) {
|
|
|
33542
33590
|
};
|
|
33543
33591
|
}
|
|
33544
33592
|
|
|
33545
|
-
function _createForOfIteratorHelperLoose$
|
|
33546
|
-
function _unsupportedIterableToArray$
|
|
33547
|
-
function _arrayLikeToArray$
|
|
33593
|
+
function _createForOfIteratorHelperLoose$e(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$e(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."); }
|
|
33594
|
+
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(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$e(r, a) : void 0; } }
|
|
33595
|
+
function _arrayLikeToArray$e(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; }
|
|
33548
33596
|
var DEFAULT_VIDEO_ID_PREDICTION_THROTTLE_MS = 16;
|
|
33549
33597
|
var RECENT_DETECTION_WINDOW_MS = 2000;
|
|
33550
33598
|
var defaultVideoIdCaptureThresholds = {
|
|
@@ -33688,7 +33736,7 @@ function createVideoIdCaptureController(config) {
|
|
|
33688
33736
|
var backImage = null;
|
|
33689
33737
|
function update(patch) {
|
|
33690
33738
|
state = _extends({}, state, patch);
|
|
33691
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
33739
|
+
for (var _iterator = _createForOfIteratorHelperLoose$e(listeners), _step; !(_step = _iterator()).done;) {
|
|
33692
33740
|
var listener = _step.value;
|
|
33693
33741
|
try {
|
|
33694
33742
|
listener(state);
|
|
@@ -35130,7 +35178,7 @@ function VideoIdCaptureView(props) {
|
|
|
35130
35178
|
});
|
|
35131
35179
|
}
|
|
35132
35180
|
function VideoIdCaptureViewContent(_ref) {
|
|
35133
|
-
var _state$error, _state$artifact2, _state$artifact4, _state$artifact5, _state$error2, _state$error3;
|
|
35181
|
+
var _state$error, _state$artifact2, _state$artifact4, _state$artifact5, _state$error2, _state$error3, _colors$loadingOverla;
|
|
35134
35182
|
var controller = _ref.controller,
|
|
35135
35183
|
sessionReadyProp = _ref.sessionReady,
|
|
35136
35184
|
_ref$autoStart = _ref.autoStart,
|
|
@@ -35153,6 +35201,8 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35153
35201
|
verbiage = _ref.verbiage,
|
|
35154
35202
|
_ref$classNames = _ref.classNames,
|
|
35155
35203
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
35204
|
+
_ref$colors = _ref.colors,
|
|
35205
|
+
colors = _ref$colors === void 0 ? {} : _ref$colors,
|
|
35156
35206
|
_ref$guideImages = _ref.guideImages,
|
|
35157
35207
|
guideImages = _ref$guideImages === void 0 ? defaultIdCaptureGuideImages : _ref$guideImages,
|
|
35158
35208
|
loadingOverlayAssets = _ref.loadingOverlayAssets,
|
|
@@ -35331,6 +35381,7 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35331
35381
|
finished: true,
|
|
35332
35382
|
disabled: !state.reading.canFinish,
|
|
35333
35383
|
className: classNames.readTextDoneBtn,
|
|
35384
|
+
colors: colors.readTextDoneBtn,
|
|
35334
35385
|
onClick: function onClick() {
|
|
35335
35386
|
onReadingFinished == null || onReadingFinished();
|
|
35336
35387
|
void controller.actions.finishReading();
|
|
@@ -35350,6 +35401,7 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35350
35401
|
transitionFromPreviousStage: transitionFromFaceCapture,
|
|
35351
35402
|
assets: loadingOverlayAssets,
|
|
35352
35403
|
classNames: classNames.loadingOverlay,
|
|
35404
|
+
colors: colors.loadingOverlay,
|
|
35353
35405
|
verbiage: loadingOverlayVerbiage,
|
|
35354
35406
|
onDismissed: function onDismissed() {
|
|
35355
35407
|
return setOverlayDismissed(true);
|
|
@@ -35385,6 +35437,7 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35385
35437
|
finished: true,
|
|
35386
35438
|
variant: "warning",
|
|
35387
35439
|
className: classNames.retryBtn,
|
|
35440
|
+
colors: colors.retryBtn,
|
|
35388
35441
|
onClick: function onClick() {
|
|
35389
35442
|
return void controller.actions.retry();
|
|
35390
35443
|
},
|
|
@@ -35393,6 +35446,7 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35393
35446
|
finished: true,
|
|
35394
35447
|
variant: "positive",
|
|
35395
35448
|
className: classNames.doneBtn,
|
|
35449
|
+
colors: colors.doneBtn,
|
|
35396
35450
|
onClick: controller.actions.done,
|
|
35397
35451
|
children: text.doneBtnText
|
|
35398
35452
|
})]
|
|
@@ -35402,6 +35456,7 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35402
35456
|
return void controller.actions.retry();
|
|
35403
35457
|
},
|
|
35404
35458
|
classNames: classNames.microphoneAccessDenied,
|
|
35459
|
+
colors: colors.microphoneAccessDenied,
|
|
35405
35460
|
verbiage: verbiage == null ? void 0 : verbiage.microphoneAccessDenied
|
|
35406
35461
|
}) : null, state.phase === 'error' && !micDenied ? jsxRuntime.jsxs(ErrorPanel, {
|
|
35407
35462
|
role: "alert",
|
|
@@ -35412,6 +35467,10 @@ function VideoIdCaptureViewContent(_ref) {
|
|
|
35412
35467
|
children: (_state$error2 = state.error) == null ? void 0 : _state$error2.message
|
|
35413
35468
|
}), (_state$error3 = state.error) != null && _state$error3.recoverable ? jsxRuntime.jsx(LoaderButton, {
|
|
35414
35469
|
finished: true,
|
|
35470
|
+
// This panel is the video-ID stage's camera-denied screen too;
|
|
35471
|
+
// sdk2 coloured that screen's retry from the loading overlay bag.
|
|
35472
|
+
// An unavailable camera was the same 2.x screen (see ErrorScreen).
|
|
35473
|
+
colors: state.error.code === 'CAMERA_PERMISSION_DENIED' || state.error.code === 'CAMERA_UNAVAILABLE' ? (_colors$loadingOverla = colors.loadingOverlay) == null || (_colors$loadingOverla = _colors$loadingOverla.cameraAccessDenied) == null ? void 0 : _colors$loadingOverla.retryBtn : undefined,
|
|
35415
35474
|
onClick: function onClick() {
|
|
35416
35475
|
return void controller.actions.retry();
|
|
35417
35476
|
},
|
|
@@ -38518,9 +38577,9 @@ var highlightJson = function highlightJson(str) {
|
|
|
38518
38577
|
};
|
|
38519
38578
|
|
|
38520
38579
|
var _templateObject$3, _templateObject2$3, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
38521
|
-
function _createForOfIteratorHelperLoose$
|
|
38522
|
-
function _unsupportedIterableToArray$
|
|
38523
|
-
function _arrayLikeToArray$
|
|
38580
|
+
function _createForOfIteratorHelperLoose$d(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$d(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."); }
|
|
38581
|
+
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(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$d(r, a) : void 0; } }
|
|
38582
|
+
function _arrayLikeToArray$d(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; }
|
|
38524
38583
|
var SUBMISSION_SUCCESS_FALLBACKS = {
|
|
38525
38584
|
completeText: 'Submission complete',
|
|
38526
38585
|
responseReceivedText: 'Response received',
|
|
@@ -38596,7 +38655,7 @@ var quickFactConfig = [{
|
|
|
38596
38655
|
*/
|
|
38597
38656
|
var readDocumentId = function readDocumentId(request, path) {
|
|
38598
38657
|
var node = request;
|
|
38599
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
38658
|
+
for (var _iterator = _createForOfIteratorHelperLoose$d(path), _step; !(_step = _iterator()).done;) {
|
|
38600
38659
|
var segment = _step.value;
|
|
38601
38660
|
if (!node || typeof node !== 'object') return null;
|
|
38602
38661
|
node = node[segment];
|
|
@@ -38707,10 +38766,10 @@ var ASSET_CONFIG = [{
|
|
|
38707
38766
|
*/
|
|
38708
38767
|
var TRUNCATABLE_IMAGE_PATHS = [['customerData', 'idData', 'idImageFront'], ['customerData', 'idData', 'idImageBack'], ['customerData', 'idData', 'idBarcodeImage'], ['customerData', 'idData', 'idFrontIrImage'], ['customerData', 'idData', 'idBackIrImage'], ['customerData', 'idData', 'idFrontUvImage'], ['customerData', 'idData', 'idBackUvImage'], ['customerData', 'idData', 'videoIdImageFront'], ['customerData', 'idData', 'videoIdImageBack'], ['customerData', 'biometricData', 'selfie']];
|
|
38709
38768
|
function truncateImagePaths(body) {
|
|
38710
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
38769
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$d(TRUNCATABLE_IMAGE_PATHS), _step2; !(_step2 = _iterator2()).done;) {
|
|
38711
38770
|
var path = _step2.value;
|
|
38712
38771
|
var node = body;
|
|
38713
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
38772
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$d(path.slice(0, -1)), _step3; !(_step3 = _iterator3()).done;) {
|
|
38714
38773
|
var segment = _step3.value;
|
|
38715
38774
|
if (!isRecord(node)) break;
|
|
38716
38775
|
node = node[segment];
|
|
@@ -39109,6 +39168,847 @@ var JsonBlockHeader = styledComponents.styled.div(_templateObject22 || (_templat
|
|
|
39109
39168
|
var JsonBlockActions = styledComponents.styled.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n"])));
|
|
39110
39169
|
var ResponsePre = styledComponents.styled.pre(_templateObject24 || (_templateObject24 = _taggedTemplateLiteralLoose(["\n box-sizing: border-box;\n width: 100%;\n overflow: auto;\n padding: 18px;\n border-radius: 8px;\n background: #17211d;\n color: #dff9e9;\n font-size: 0.8rem;\n line-height: 1.55;\n text-align: left;\n"])));
|
|
39111
39170
|
|
|
39171
|
+
var _excluded$a = ["state", "size", "theme", "speed", "paused", "style", "aria-label"];
|
|
39172
|
+
function _createForOfIteratorHelperLoose$c(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$c(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."); }
|
|
39173
|
+
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(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$c(r, a) : void 0; } }
|
|
39174
|
+
function _arrayLikeToArray$c(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; }
|
|
39175
|
+
function F(e, n) {
|
|
39176
|
+
var s = Math.sin(e * 12.9898 + n * 78.233) * 43758.5453;
|
|
39177
|
+
return s - Math.floor(s);
|
|
39178
|
+
}
|
|
39179
|
+
function st(e, n) {
|
|
39180
|
+
var s = Math.PI * (3 - Math.sqrt(5)),
|
|
39181
|
+
r = 1 - 2 * (e + 0.5) / n,
|
|
39182
|
+
t = Math.sqrt(1 - r * r),
|
|
39183
|
+
o = e * s;
|
|
39184
|
+
return [t * Math.cos(o), r, t * Math.sin(o)];
|
|
39185
|
+
}
|
|
39186
|
+
function ot(e, n) {
|
|
39187
|
+
return Math.atan2(Math.sin(e - n), Math.cos(e - n));
|
|
39188
|
+
}
|
|
39189
|
+
function q(e, n, s, r, t) {
|
|
39190
|
+
var o = Math.sin(n),
|
|
39191
|
+
c = Math.cos(n),
|
|
39192
|
+
a = Math.sin(e),
|
|
39193
|
+
i = Math.cos(e);
|
|
39194
|
+
return function (m, g, M) {
|
|
39195
|
+
var u = m * i + M * a,
|
|
39196
|
+
h = -m * a + M * i,
|
|
39197
|
+
b = g * c - h * o,
|
|
39198
|
+
x = g * o + h * c;
|
|
39199
|
+
return [s + u * t, r - b * t, x];
|
|
39200
|
+
};
|
|
39201
|
+
}
|
|
39202
|
+
function _(e, n, s, r) {
|
|
39203
|
+
if (r === void 0) {
|
|
39204
|
+
r = 0.3;
|
|
39205
|
+
}
|
|
39206
|
+
n.sort(function (t, o) {
|
|
39207
|
+
return t.z - o.z;
|
|
39208
|
+
});
|
|
39209
|
+
for (var _iterator = _createForOfIteratorHelperLoose$c(n), _step; !(_step = _iterator()).done;) {
|
|
39210
|
+
var _t$a;
|
|
39211
|
+
var t = _step.value;
|
|
39212
|
+
var o = (_t$a = t.a) != null ? _t$a : 1;
|
|
39213
|
+
if (o < 0.02) continue;
|
|
39214
|
+
var c = Math.min(1, Math.max(0, t.white)),
|
|
39215
|
+
a = Math.round((s ? 1 - c : c) * 255);
|
|
39216
|
+
e.fillStyle = "rgba(" + a + "," + a + "," + a + "," + o + ")", e.beginPath(), e.arc(t.x, t.y, Math.max(r, t.r), 0, Math.PI * 2), e.fill();
|
|
39217
|
+
}
|
|
39218
|
+
}
|
|
39219
|
+
function $(e, n) {
|
|
39220
|
+
return Math.pow(e / 300, n);
|
|
39221
|
+
}
|
|
39222
|
+
function et(e, n, s, r) {
|
|
39223
|
+
var t = 2 * n * s + r,
|
|
39224
|
+
o = e % t,
|
|
39225
|
+
c = new Array(n).fill(0);
|
|
39226
|
+
var a = -1;
|
|
39227
|
+
if (o < 2 * n * s) {
|
|
39228
|
+
var i = Math.floor(o / s),
|
|
39229
|
+
m = (o - i * s) / s,
|
|
39230
|
+
M = 1 - Math.pow(1 - Math.min(1, m / 0.7), 3);
|
|
39231
|
+
if (i < n) {
|
|
39232
|
+
for (var u = 0; u < i; u++) c[u] = 1;
|
|
39233
|
+
c[i] = M, a = i;
|
|
39234
|
+
} else {
|
|
39235
|
+
var _u = 2 * n - 1 - i;
|
|
39236
|
+
for (var h = 0; h < _u; h++) c[h] = 1;
|
|
39237
|
+
c[_u] = 1 - M, a = _u;
|
|
39238
|
+
}
|
|
39239
|
+
}
|
|
39240
|
+
return {
|
|
39241
|
+
amount: c,
|
|
39242
|
+
active: a
|
|
39243
|
+
};
|
|
39244
|
+
}
|
|
39245
|
+
function ct(e, n, s) {
|
|
39246
|
+
var _e = _slicedToArray(e, 3),
|
|
39247
|
+
r = _e[0],
|
|
39248
|
+
t = _e[1],
|
|
39249
|
+
o = _e[2],
|
|
39250
|
+
c = false;
|
|
39251
|
+
for (var a = 0; a < n.length; a++) {
|
|
39252
|
+
if (s.amount[a] <= 0) continue;
|
|
39253
|
+
var i = n[a],
|
|
39254
|
+
m = i.axis === 0 ? r : i.axis === 1 ? t : o;
|
|
39255
|
+
if (m < i.lo || m >= i.hi) continue;
|
|
39256
|
+
a === s.active && (c = true);
|
|
39257
|
+
var g = i.ang * s.amount[a],
|
|
39258
|
+
M = Math.cos(g),
|
|
39259
|
+
u = Math.sin(g);
|
|
39260
|
+
if (i.axis === 0) {
|
|
39261
|
+
var h = t * M - o * u;
|
|
39262
|
+
o = t * u + o * M, t = h;
|
|
39263
|
+
} else if (i.axis === 1) {
|
|
39264
|
+
var _h = r * M + o * u;
|
|
39265
|
+
o = -r * u + o * M, r = _h;
|
|
39266
|
+
} else {
|
|
39267
|
+
var _h2 = r * M - t * u;
|
|
39268
|
+
t = r * u + t * M, r = _h2;
|
|
39269
|
+
}
|
|
39270
|
+
}
|
|
39271
|
+
return [r, t, o, c];
|
|
39272
|
+
}
|
|
39273
|
+
function at(e) {
|
|
39274
|
+
var n = [];
|
|
39275
|
+
for (var s = 0; s < e; s++) {
|
|
39276
|
+
var r = Math.min(2, Math.floor(F(s, 2.3) * 3)),
|
|
39277
|
+
t = -1 + 0.5 * Math.min(3, Math.floor(F(s, 5.9) * 4)),
|
|
39278
|
+
o = F(s, 7.7) < 0.5 ? 1 : -1;
|
|
39279
|
+
n.push({
|
|
39280
|
+
axis: r,
|
|
39281
|
+
lo: t,
|
|
39282
|
+
hi: t + 0.5,
|
|
39283
|
+
ang: o * Math.PI / 2
|
|
39284
|
+
});
|
|
39285
|
+
}
|
|
39286
|
+
return n;
|
|
39287
|
+
}
|
|
39288
|
+
var rt = function rt(e, n, s, r, t) {
|
|
39289
|
+
var _t$scanMul, _t$rsPow, _t$dimBase, _t$latRings, _t$lonDensity;
|
|
39290
|
+
var c = n / 2,
|
|
39291
|
+
a = n / 2,
|
|
39292
|
+
i = n / 2 * 0.82,
|
|
39293
|
+
m = 0.4 + 0.06 * Math.sin(s * 0.35),
|
|
39294
|
+
g = q(s * 0.5, m, c, a, i),
|
|
39295
|
+
M = s * (0.5 + (1.7 - 0.5) * ((_t$scanMul = t.scanMul) != null ? _t$scanMul : 1)),
|
|
39296
|
+
u = $(n, (_t$rsPow = t.rsPow) != null ? _t$rsPow : 0.6),
|
|
39297
|
+
h = (_t$dimBase = t.dimBase) != null ? _t$dimBase : 1,
|
|
39298
|
+
b = [],
|
|
39299
|
+
x = (_t$latRings = t.latRings) != null ? _t$latRings : 17,
|
|
39300
|
+
I = (_t$lonDensity = t.lonDensity) != null ? _t$lonDensity : 44;
|
|
39301
|
+
for (var P = 0; P <= x; P++) {
|
|
39302
|
+
var y = -Math.PI / 2 + P / x * Math.PI,
|
|
39303
|
+
D = Math.cos(y),
|
|
39304
|
+
w = Math.sin(y),
|
|
39305
|
+
k = Math.max(1, Math.round(Math.abs(D) * I));
|
|
39306
|
+
for (var v = 0; v < k; v++) {
|
|
39307
|
+
var _t$rBase, _t$rDepth, _t$rBoost, _t$inkFar, _t$inkSpan;
|
|
39308
|
+
var R = v / k * 2 * Math.PI,
|
|
39309
|
+
_g = g(D * Math.cos(R), w, D * Math.sin(R)),
|
|
39310
|
+
_g2 = _slicedToArray(_g, 3),
|
|
39311
|
+
p = _g2[0],
|
|
39312
|
+
d = _g2[1],
|
|
39313
|
+
l = _g2[2],
|
|
39314
|
+
f = (l + 1) / 2,
|
|
39315
|
+
S = ot(R + s * 0.5, M),
|
|
39316
|
+
L = Math.exp(-(S * S) / 0.18) * Math.max(0, l);
|
|
39317
|
+
b.push({
|
|
39318
|
+
x: p,
|
|
39319
|
+
y: d,
|
|
39320
|
+
z: l,
|
|
39321
|
+
r: (((_t$rBase = t.rBase) != null ? _t$rBase : 0.6) + ((_t$rDepth = t.rDepth) != null ? _t$rDepth : 1.7) * f + ((_t$rBoost = t.rBoost) != null ? _t$rBoost : 1) * L) * u,
|
|
39322
|
+
white: ((_t$inkFar = t.inkFar) != null ? _t$inkFar : 0.62) - ((_t$inkSpan = t.inkSpan) != null ? _t$inkSpan : 0.54) * f,
|
|
39323
|
+
// dimBase < 1 fades un-scanned dots so the meridian reads clearly
|
|
39324
|
+
a: h + (1 - h) * Math.min(1, L)
|
|
39325
|
+
});
|
|
39326
|
+
}
|
|
39327
|
+
}
|
|
39328
|
+
_(e, b, r, t.rMin);
|
|
39329
|
+
},
|
|
39330
|
+
it = function it(e, n, s, r, t) {
|
|
39331
|
+
var _t$rsPow2, _t$moveCount, _t$latRings2, _t$lonDensity2;
|
|
39332
|
+
var o = n / 2,
|
|
39333
|
+
c = n / 2,
|
|
39334
|
+
a = n / 2 * 0.82,
|
|
39335
|
+
i = q(s * 0.55, 0.35 + 0.1 * Math.sin(s * 0.9), o, c, a),
|
|
39336
|
+
m = $(n, (_t$rsPow2 = t.rsPow) != null ? _t$rsPow2 : 0.6),
|
|
39337
|
+
g = (_t$moveCount = t.moveCount) != null ? _t$moveCount : 14,
|
|
39338
|
+
M = at(g),
|
|
39339
|
+
u = et(s, g, 0.42, 1.2),
|
|
39340
|
+
h = [],
|
|
39341
|
+
b = (_t$latRings2 = t.latRings) != null ? _t$latRings2 : 15,
|
|
39342
|
+
x = (_t$lonDensity2 = t.lonDensity) != null ? _t$lonDensity2 : 40;
|
|
39343
|
+
for (var I = 0; I <= b; I++) {
|
|
39344
|
+
var P = -Math.PI / 2 + I / b * Math.PI,
|
|
39345
|
+
y = Math.cos(P),
|
|
39346
|
+
D = Math.sin(P),
|
|
39347
|
+
w = Math.max(1, Math.round(Math.abs(y) * x));
|
|
39348
|
+
for (var k = 0; k < w; k++) {
|
|
39349
|
+
var _t$rBase2, _t$rDepth2, _t$rActive, _t$inkFar2, _t$inkSpan2;
|
|
39350
|
+
var v = k / w * 2 * Math.PI,
|
|
39351
|
+
_ct = ct([y * Math.cos(v), D, y * Math.sin(v)], M, u),
|
|
39352
|
+
_ct2 = _slicedToArray(_ct, 4),
|
|
39353
|
+
R = _ct2[0],
|
|
39354
|
+
p = _ct2[1],
|
|
39355
|
+
d = _ct2[2],
|
|
39356
|
+
l = _ct2[3],
|
|
39357
|
+
_i = i(R, p, d),
|
|
39358
|
+
_i2 = _slicedToArray(_i, 3),
|
|
39359
|
+
f = _i2[0],
|
|
39360
|
+
S = _i2[1],
|
|
39361
|
+
L = _i2[2],
|
|
39362
|
+
A = (L + 1) / 2;
|
|
39363
|
+
h.push({
|
|
39364
|
+
x: f,
|
|
39365
|
+
y: S,
|
|
39366
|
+
z: L,
|
|
39367
|
+
r: (((_t$rBase2 = t.rBase) != null ? _t$rBase2 : 0.6) + ((_t$rDepth2 = t.rDepth) != null ? _t$rDepth2 : 1.7) * A + (l ? (_t$rActive = t.rActive) != null ? _t$rActive : 0.3 : 0)) * m,
|
|
39368
|
+
white: ((_t$inkFar2 = t.inkFar) != null ? _t$inkFar2 : 0.62) - ((_t$inkSpan2 = t.inkSpan) != null ? _t$inkSpan2 : 0.54) * A - (l ? 0.14 : 0)
|
|
39369
|
+
});
|
|
39370
|
+
}
|
|
39371
|
+
}
|
|
39372
|
+
_(e, h, r, t.rMin);
|
|
39373
|
+
},
|
|
39374
|
+
ht = function ht(e, n, s, r, t) {
|
|
39375
|
+
var _t$rsPow3, _t$rings, _t$lonDensity3;
|
|
39376
|
+
var o = n / 2,
|
|
39377
|
+
c = n / 2,
|
|
39378
|
+
a = n / 2 * 0.874,
|
|
39379
|
+
i = q(s * 0.18, 0.38, o, c, 1),
|
|
39380
|
+
m = $(n, (_t$rsPow3 = t.rsPow) != null ? _t$rsPow3 : 0.6),
|
|
39381
|
+
g = [],
|
|
39382
|
+
M = (_t$rings = t.rings) != null ? _t$rings : 15,
|
|
39383
|
+
u = (_t$lonDensity3 = t.lonDensity) != null ? _t$lonDensity3 : 40;
|
|
39384
|
+
for (var h = 0; h <= M; h++) {
|
|
39385
|
+
var b = -Math.PI / 2 + h / M * Math.PI,
|
|
39386
|
+
x = Math.cos(b),
|
|
39387
|
+
I = Math.sin(b),
|
|
39388
|
+
P = 0.62 * Math.sin(s * 2.1 - h * 0.52) + 0.38 * Math.sin(s * 1.27 + h * 0.83),
|
|
39389
|
+
y = a * (0.88 + 0.105 * P),
|
|
39390
|
+
D = Math.max(1, Math.round(Math.abs(x) * u));
|
|
39391
|
+
for (var w = 0; w < D; w++) {
|
|
39392
|
+
var _t$rBase3, _t$rDepth3;
|
|
39393
|
+
var k = w / D * 2 * Math.PI,
|
|
39394
|
+
_i3 = i(x * Math.cos(k) * y, I * y, x * Math.sin(k) * y),
|
|
39395
|
+
_i4 = _slicedToArray(_i3, 3),
|
|
39396
|
+
v = _i4[0],
|
|
39397
|
+
R = _i4[1],
|
|
39398
|
+
p = _i4[2],
|
|
39399
|
+
d = (p / a + 1) / 2,
|
|
39400
|
+
l = Math.max(0, P);
|
|
39401
|
+
g.push({
|
|
39402
|
+
x: v,
|
|
39403
|
+
y: R,
|
|
39404
|
+
z: p,
|
|
39405
|
+
r: (((_t$rBase3 = t.rBase) != null ? _t$rBase3 : 0.6) + ((_t$rDepth3 = t.rDepth) != null ? _t$rDepth3 : 1.7) * d) * (1 + 0.4 * l) * m,
|
|
39406
|
+
white: 0.66 - 0.56 * d - 0.1 * l
|
|
39407
|
+
});
|
|
39408
|
+
}
|
|
39409
|
+
}
|
|
39410
|
+
_(e, g, r, t.rMin);
|
|
39411
|
+
};
|
|
39412
|
+
function lt(e) {
|
|
39413
|
+
return e * e * (3 - 2 * e);
|
|
39414
|
+
}
|
|
39415
|
+
function Q(e) {
|
|
39416
|
+
var n = e.length,
|
|
39417
|
+
s = [];
|
|
39418
|
+
var r = 0;
|
|
39419
|
+
for (var t = 0; t < n; t++) {
|
|
39420
|
+
var o = e[t],
|
|
39421
|
+
c = e[(t + 1) % n],
|
|
39422
|
+
a = Math.hypot(c[0] - o[0], c[1] - o[1]);
|
|
39423
|
+
s.push(a), r += a;
|
|
39424
|
+
}
|
|
39425
|
+
return function (t) {
|
|
39426
|
+
var o = t * r,
|
|
39427
|
+
c = 0;
|
|
39428
|
+
for (; o > s[c] && c < n - 1;) o -= s[c], c++;
|
|
39429
|
+
var a = e[c],
|
|
39430
|
+
i = e[(c + 1) % n],
|
|
39431
|
+
m = s[c] ? Math.min(1, o / s[c]) : 0;
|
|
39432
|
+
return [a[0] + (i[0] - a[0]) * m, a[1] + (i[1] - a[1]) * m];
|
|
39433
|
+
};
|
|
39434
|
+
}
|
|
39435
|
+
var ut = function ut(e) {
|
|
39436
|
+
var n = -Math.PI / 2 + e * 2 * Math.PI;
|
|
39437
|
+
return [Math.cos(n) * 0.24, Math.sin(n) * 0.24];
|
|
39438
|
+
},
|
|
39439
|
+
Mt = Q([[0, -0.26], [0.24, 0.16], [-0.24, 0.16]]),
|
|
39440
|
+
pt = Q([[0, -0.2], [0.2, -0.2], [0.2, 0.2], [-0.2, 0.2], [-0.2, -0.2]]),
|
|
39441
|
+
Y = [ut, Mt, pt];
|
|
39442
|
+
function dt(e) {
|
|
39443
|
+
return Math.max(6, Math.round(34 * e));
|
|
39444
|
+
}
|
|
39445
|
+
var U = 1.4,
|
|
39446
|
+
J = 0.9,
|
|
39447
|
+
K = U + J,
|
|
39448
|
+
ft = function ft(e, n, s, r, t) {
|
|
39449
|
+
var _t$spread, _t$iconD, _t$rDot;
|
|
39450
|
+
var o = Y.length,
|
|
39451
|
+
c = s % (K * o),
|
|
39452
|
+
a = Math.floor(c / K),
|
|
39453
|
+
i = c - a * K,
|
|
39454
|
+
m = i > U ? lt((i - U) / J) : 0,
|
|
39455
|
+
g = (_t$spread = t.spread) != null ? _t$spread : 1,
|
|
39456
|
+
M = Y[a],
|
|
39457
|
+
u = Y[(a + 1) % o],
|
|
39458
|
+
h = 160,
|
|
39459
|
+
b = [];
|
|
39460
|
+
for (var p = 0; p < h; p++) {
|
|
39461
|
+
var d = p / h,
|
|
39462
|
+
l = M(d),
|
|
39463
|
+
f = u(d);
|
|
39464
|
+
b.push([(l[0] + (f[0] - l[0]) * m) * g, (l[1] + (f[1] - l[1]) * m) * g]);
|
|
39465
|
+
}
|
|
39466
|
+
var x = [];
|
|
39467
|
+
var I = 0;
|
|
39468
|
+
for (var _p = 0; _p < h; _p++) {
|
|
39469
|
+
var _d = b[_p],
|
|
39470
|
+
_l = b[(_p + 1) % h],
|
|
39471
|
+
_f = Math.hypot(_l[0] - _d[0], _l[1] - _d[1]);
|
|
39472
|
+
x.push(_f), I += _f;
|
|
39473
|
+
}
|
|
39474
|
+
var P = dt((_t$iconD = t.iconD) != null ? _t$iconD : 1),
|
|
39475
|
+
y = ((_t$rDot = t.rDot) != null ? _t$rDot : 0.021) * 1.35 * g,
|
|
39476
|
+
D = 1 + 0.02 * Math.sin(i * 3.1),
|
|
39477
|
+
w = [],
|
|
39478
|
+
k = n / 2;
|
|
39479
|
+
var v = 0,
|
|
39480
|
+
R = 0;
|
|
39481
|
+
for (var _p2 = 0; _p2 < P; _p2++) {
|
|
39482
|
+
var _d2 = _p2 / P * I;
|
|
39483
|
+
for (; R + x[v] < _d2 && v < h - 1;) R += x[v], v++;
|
|
39484
|
+
var _l2 = b[v],
|
|
39485
|
+
_f2 = b[(v + 1) % h],
|
|
39486
|
+
S = x[v] ? Math.min(1, (_d2 - R) / x[v]) : 0,
|
|
39487
|
+
L = (_l2[0] + (_f2[0] - _l2[0]) * S) * D,
|
|
39488
|
+
A = (_l2[1] + (_f2[1] - _l2[1]) * S) * D;
|
|
39489
|
+
w.push({
|
|
39490
|
+
x: k + L * n,
|
|
39491
|
+
y: k + A * n,
|
|
39492
|
+
z: 0,
|
|
39493
|
+
r: Math.max(0.35, y * n),
|
|
39494
|
+
white: 0.1
|
|
39495
|
+
});
|
|
39496
|
+
}
|
|
39497
|
+
_(e, w, r, t.rMin);
|
|
39498
|
+
},
|
|
39499
|
+
mt = function mt(e, n, s, r, t) {
|
|
39500
|
+
var _t$rsPow4, _t$orbitN, _t$ghostN, _t$particles;
|
|
39501
|
+
var o = n / 2,
|
|
39502
|
+
c = n / 2,
|
|
39503
|
+
a = n / 2 * 0.82,
|
|
39504
|
+
i = q(s * 0.12, 0.3, o, c, 1),
|
|
39505
|
+
m = $(n, (_t$rsPow4 = t.rsPow) != null ? _t$rsPow4 : 0.6),
|
|
39506
|
+
g = [],
|
|
39507
|
+
M = (_t$orbitN = t.orbitN) != null ? _t$orbitN : 12,
|
|
39508
|
+
u = (_t$ghostN = t.ghostN) != null ? _t$ghostN : 40,
|
|
39509
|
+
h = (_t$particles = t.particles) != null ? _t$particles : 3;
|
|
39510
|
+
for (var b = 0; b < M; b++) {
|
|
39511
|
+
var x = F(b, 1.7),
|
|
39512
|
+
I = F(b, 5.2),
|
|
39513
|
+
P = F(b, 8.9),
|
|
39514
|
+
y = a * (0.45 + 0.52 * x),
|
|
39515
|
+
D = x * 2 * Math.PI,
|
|
39516
|
+
w = Math.acos(2 * I - 1),
|
|
39517
|
+
k = Math.sin(w) * Math.cos(D),
|
|
39518
|
+
v = Math.cos(w),
|
|
39519
|
+
R = Math.sin(w) * Math.sin(D);
|
|
39520
|
+
var p = -v,
|
|
39521
|
+
d = k;
|
|
39522
|
+
var l = 0,
|
|
39523
|
+
f = Math.max(1e-6, Math.sqrt(p * p + d * d));
|
|
39524
|
+
p /= f, d /= f;
|
|
39525
|
+
var S = v * l - R * d,
|
|
39526
|
+
L = R * p - k * l,
|
|
39527
|
+
A = k * d - v * p,
|
|
39528
|
+
B = (0.25 + 0.55 * P) * (P > 0.5 ? 1 : -1);
|
|
39529
|
+
for (var C = 0; C < u; C++) {
|
|
39530
|
+
var _t$ghostR, _t$ghostA;
|
|
39531
|
+
var E = C / u * 2 * Math.PI,
|
|
39532
|
+
_i5 = i((p * Math.cos(E) + S * Math.sin(E)) * y, (d * Math.cos(E) + L * Math.sin(E)) * y, (l * Math.cos(E) + A * Math.sin(E)) * y),
|
|
39533
|
+
_i6 = _slicedToArray(_i5, 3),
|
|
39534
|
+
T = _i6[0],
|
|
39535
|
+
z = _i6[1],
|
|
39536
|
+
N = _i6[2],
|
|
39537
|
+
O = (N / y + 1) / 2;
|
|
39538
|
+
g.push({
|
|
39539
|
+
x: T,
|
|
39540
|
+
y: z,
|
|
39541
|
+
z: N,
|
|
39542
|
+
r: ((_t$ghostR = t.ghostR) != null ? _t$ghostR : 0.9) * m,
|
|
39543
|
+
white: 0.72,
|
|
39544
|
+
a: ((_t$ghostA = t.ghostA) != null ? _t$ghostA : 0.5) * (0.4 + 0.6 * O)
|
|
39545
|
+
});
|
|
39546
|
+
}
|
|
39547
|
+
for (var _C = 0; _C < h; _C++) {
|
|
39548
|
+
var _t$partR, _t$partRDepth;
|
|
39549
|
+
var _E = s * B + _C / h * 2 * Math.PI + I * 6,
|
|
39550
|
+
_i7 = i((p * Math.cos(_E) + S * Math.sin(_E)) * y, (d * Math.cos(_E) + L * Math.sin(_E)) * y, (l * Math.cos(_E) + A * Math.sin(_E)) * y),
|
|
39551
|
+
_i8 = _slicedToArray(_i7, 3),
|
|
39552
|
+
_T = _i8[0],
|
|
39553
|
+
_z = _i8[1],
|
|
39554
|
+
_N = _i8[2],
|
|
39555
|
+
_O = (_N / y + 1) / 2;
|
|
39556
|
+
g.push({
|
|
39557
|
+
x: _T,
|
|
39558
|
+
y: _z,
|
|
39559
|
+
z: _N,
|
|
39560
|
+
r: (((_t$partR = t.partR) != null ? _t$partR : 1.2) + ((_t$partRDepth = t.partRDepth) != null ? _t$partRDepth : 1.6) * _O) * m,
|
|
39561
|
+
white: 0.3 - 0.22 * _O
|
|
39562
|
+
});
|
|
39563
|
+
}
|
|
39564
|
+
}
|
|
39565
|
+
_(e, g, r, t.rMin);
|
|
39566
|
+
},
|
|
39567
|
+
gt = function gt(e, n, s, r, t) {
|
|
39568
|
+
var _t$spin, _t$rsPow5, _t$ghostN2, _t$lanes, _t$segs, _t$bandMul;
|
|
39569
|
+
var o = n / 2,
|
|
39570
|
+
c = n / 2,
|
|
39571
|
+
a = n / 2 * 0.78,
|
|
39572
|
+
i = (_t$spin = t.spin) != null ? _t$spin : 1,
|
|
39573
|
+
m = q(s * 0.1 * i, 0.3, o, c, 1),
|
|
39574
|
+
g = $(n, (_t$rsPow5 = t.rsPow) != null ? _t$rsPow5 : 0.6),
|
|
39575
|
+
M = [],
|
|
39576
|
+
u = (_t$ghostN2 = t.ghostN) != null ? _t$ghostN2 : 150;
|
|
39577
|
+
for (var f = 0; f < u; f++) {
|
|
39578
|
+
var S = st(f, u),
|
|
39579
|
+
_m = m(S[0] * a, S[1] * a, S[2] * a),
|
|
39580
|
+
_m2 = _slicedToArray(_m, 3),
|
|
39581
|
+
L = _m2[0],
|
|
39582
|
+
A = _m2[1],
|
|
39583
|
+
B = _m2[2],
|
|
39584
|
+
C = (B / a + 1) / 2;
|
|
39585
|
+
M.push({
|
|
39586
|
+
x: L,
|
|
39587
|
+
y: A,
|
|
39588
|
+
z: B,
|
|
39589
|
+
r: 0.8 * g,
|
|
39590
|
+
white: 0.78,
|
|
39591
|
+
a: 0.1 + 0.22 * C
|
|
39592
|
+
});
|
|
39593
|
+
}
|
|
39594
|
+
var h = s * 0.24 * i,
|
|
39595
|
+
b = 0.55 + 0.3 * Math.sin(s * 0.18) * i,
|
|
39596
|
+
x = Math.cos(h),
|
|
39597
|
+
I = 0,
|
|
39598
|
+
P = Math.sin(h),
|
|
39599
|
+
y = -P * Math.sin(b),
|
|
39600
|
+
D = Math.cos(b),
|
|
39601
|
+
w = x * Math.sin(b),
|
|
39602
|
+
k = I * w - P * D,
|
|
39603
|
+
v = P * y - x * w,
|
|
39604
|
+
R = x * D - I * y,
|
|
39605
|
+
p = (_t$lanes = t.lanes) != null ? _t$lanes : 5,
|
|
39606
|
+
d = (_t$segs = t.segs) != null ? _t$segs : 88,
|
|
39607
|
+
l = Math.max(1, Math.round(p * ((_t$bandMul = t.bandMul) != null ? _t$bandMul : 1)));
|
|
39608
|
+
for (var _f3 = 0; _f3 < l; _f3++) {
|
|
39609
|
+
var _S = (_f3 - (l - 1) / 2) * 0.075,
|
|
39610
|
+
_L = Math.abs(_f3 - (l - 1) / 2) / Math.max(1, (l - 1) / 2);
|
|
39611
|
+
for (var _A = 0; _A < d; _A++) {
|
|
39612
|
+
var _t$wobMul, _t$rBase4, _t$rDepth4;
|
|
39613
|
+
var _B = _A / d * 2 * Math.PI,
|
|
39614
|
+
_C2 = (0.16 * Math.sin(_B * 3 - s * 1.7 + _f3 * 0.22) + 0.07 * Math.sin(_B * 5 + s * 1.1)) * ((_t$wobMul = t.wobMul) != null ? _t$wobMul : 1),
|
|
39615
|
+
E = _S + _C2,
|
|
39616
|
+
T = x * Math.cos(_B) + y * Math.sin(_B) + k * E,
|
|
39617
|
+
z = I * Math.cos(_B) + D * Math.sin(_B) + v * E,
|
|
39618
|
+
N = P * Math.cos(_B) + w * Math.sin(_B) + R * E,
|
|
39619
|
+
O = Math.sqrt(T * T + z * z + N * N),
|
|
39620
|
+
_m3 = m(T / O * a, z / O * a, N / O * a),
|
|
39621
|
+
_m4 = _slicedToArray(_m3, 3),
|
|
39622
|
+
X = _m4[0],
|
|
39623
|
+
Z = _m4[1],
|
|
39624
|
+
W = _m4[2],
|
|
39625
|
+
j = (W / a + 1) / 2;
|
|
39626
|
+
M.push({
|
|
39627
|
+
x: X,
|
|
39628
|
+
y: Z,
|
|
39629
|
+
z: W,
|
|
39630
|
+
r: (((_t$rBase4 = t.rBase) != null ? _t$rBase4 : 1.1) + ((_t$rDepth4 = t.rDepth) != null ? _t$rDepth4 : 1.7) * j) * (1 - 0.25 * _L) * g,
|
|
39631
|
+
white: 0.52 - 0.44 * j + 0.18 * _L,
|
|
39632
|
+
a: 0.4 + 0.6 * j
|
|
39633
|
+
});
|
|
39634
|
+
}
|
|
39635
|
+
}
|
|
39636
|
+
_(e, M, r, t.rMin);
|
|
39637
|
+
},
|
|
39638
|
+
bt = {
|
|
39639
|
+
orbits: mt,
|
|
39640
|
+
globe: rt,
|
|
39641
|
+
rubik: it,
|
|
39642
|
+
wave: ht,
|
|
39643
|
+
ribbon: gt,
|
|
39644
|
+
morph: ft
|
|
39645
|
+
},
|
|
39646
|
+
yt = [["latRings", "lonDensity"], ["rings", "lonDensity"], ["lanes", "segs"]],
|
|
39647
|
+
xt = ["orbitN", "ghostN"],
|
|
39648
|
+
vt = ["iconD"],
|
|
39649
|
+
wt = ["rBase", "rDepth", "rActive", "rDot", "ghostR", "partR", "partRDepth"];
|
|
39650
|
+
function kt(e, n) {
|
|
39651
|
+
var s = _extends({}, e),
|
|
39652
|
+
r = /* @__PURE__ */new Set(),
|
|
39653
|
+
t = Math.sqrt(n);
|
|
39654
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$c(yt), _step2; !(_step2 = _iterator2()).done;) {
|
|
39655
|
+
var _step2$value = _slicedToArray(_step2.value, 2),
|
|
39656
|
+
o = _step2$value[0],
|
|
39657
|
+
c = _step2$value[1];
|
|
39658
|
+
var a = s[o],
|
|
39659
|
+
i = s[c];
|
|
39660
|
+
a != null && i != null && !r.has(o) && !r.has(c) && (s[o] = Math.max(2, Math.round(a * t)), s[c] = Math.max(2, Math.round(i * t)), r.add(o), r.add(c));
|
|
39661
|
+
}
|
|
39662
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$c(xt), _step3; !(_step3 = _iterator3()).done;) {
|
|
39663
|
+
var _o = _step3.value;
|
|
39664
|
+
var _c = s[_o];
|
|
39665
|
+
_c != null && !r.has(_o) && (s[_o] = Math.max(1, Math.round(_c * n)));
|
|
39666
|
+
}
|
|
39667
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$c(vt), _step4; !(_step4 = _iterator4()).done;) {
|
|
39668
|
+
var _o2 = _step4.value;
|
|
39669
|
+
var _c2 = s[_o2];
|
|
39670
|
+
_c2 != null && (s[_o2] = Math.max(0.02, _c2 * n));
|
|
39671
|
+
}
|
|
39672
|
+
return s;
|
|
39673
|
+
}
|
|
39674
|
+
function Pt(e, n) {
|
|
39675
|
+
var _s$rSizeMul;
|
|
39676
|
+
var s = _extends({}, e);
|
|
39677
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$c(wt), _step5; !(_step5 = _iterator5()).done;) {
|
|
39678
|
+
var r = _step5.value;
|
|
39679
|
+
var t = s[r];
|
|
39680
|
+
t != null && (s[r] = t * n);
|
|
39681
|
+
}
|
|
39682
|
+
return s.rSizeMul = ((_s$rSizeMul = s.rSizeMul) != null ? _s$rSizeMul : 1) * n, s;
|
|
39683
|
+
}
|
|
39684
|
+
var Dt = {
|
|
39685
|
+
globe: {
|
|
39686
|
+
latRings: 17,
|
|
39687
|
+
lonDensity: 44,
|
|
39688
|
+
rBase: 0.6,
|
|
39689
|
+
rDepth: 1.7,
|
|
39690
|
+
rBoost: 1,
|
|
39691
|
+
inkFar: 0.62,
|
|
39692
|
+
inkSpan: 0.54,
|
|
39693
|
+
rsPow: 0.6,
|
|
39694
|
+
rMin: 0.3
|
|
39695
|
+
},
|
|
39696
|
+
orbits: {
|
|
39697
|
+
orbitN: 12,
|
|
39698
|
+
ghostN: 40,
|
|
39699
|
+
ghostR: 0.9,
|
|
39700
|
+
ghostA: 0.5,
|
|
39701
|
+
particles: 3,
|
|
39702
|
+
partR: 1.2,
|
|
39703
|
+
partRDepth: 1.6,
|
|
39704
|
+
rsPow: 0.6,
|
|
39705
|
+
rMin: 0.3
|
|
39706
|
+
},
|
|
39707
|
+
rubik: {
|
|
39708
|
+
latRings: 15,
|
|
39709
|
+
lonDensity: 40,
|
|
39710
|
+
moveCount: 14,
|
|
39711
|
+
rBase: 0.6,
|
|
39712
|
+
rDepth: 1.7,
|
|
39713
|
+
rActive: 0.3,
|
|
39714
|
+
inkFar: 0.62,
|
|
39715
|
+
inkSpan: 0.54,
|
|
39716
|
+
rsPow: 0.6,
|
|
39717
|
+
rMin: 0.3
|
|
39718
|
+
},
|
|
39719
|
+
wave: {
|
|
39720
|
+
rings: 15,
|
|
39721
|
+
lonDensity: 40,
|
|
39722
|
+
rBase: 0.6,
|
|
39723
|
+
rDepth: 1.7,
|
|
39724
|
+
rsPow: 0.6,
|
|
39725
|
+
rMin: 0.3
|
|
39726
|
+
},
|
|
39727
|
+
ribbon: {
|
|
39728
|
+
lanes: 5,
|
|
39729
|
+
segs: 88,
|
|
39730
|
+
ghostN: 150,
|
|
39731
|
+
rBase: 1.1,
|
|
39732
|
+
rDepth: 1.7,
|
|
39733
|
+
rsPow: 0.6,
|
|
39734
|
+
rMin: 0.3
|
|
39735
|
+
},
|
|
39736
|
+
morph: {
|
|
39737
|
+
rDot: 0.021,
|
|
39738
|
+
iconD: 1,
|
|
39739
|
+
rMin: 0.25
|
|
39740
|
+
}
|
|
39741
|
+
},
|
|
39742
|
+
Rt = {
|
|
39743
|
+
working: "orbits",
|
|
39744
|
+
searching: "globe",
|
|
39745
|
+
solving: "rubik",
|
|
39746
|
+
listening: "wave",
|
|
39747
|
+
composing: "ribbon",
|
|
39748
|
+
shaping: "morph"
|
|
39749
|
+
},
|
|
39750
|
+
St = {
|
|
39751
|
+
orbits: {
|
|
39752
|
+
64: {
|
|
39753
|
+
speed: 1.885,
|
|
39754
|
+
count: 1,
|
|
39755
|
+
size: 1
|
|
39756
|
+
},
|
|
39757
|
+
20: {
|
|
39758
|
+
speed: 3.9,
|
|
39759
|
+
count: 0.238,
|
|
39760
|
+
size: 2.4
|
|
39761
|
+
}
|
|
39762
|
+
},
|
|
39763
|
+
globe: {
|
|
39764
|
+
64: {
|
|
39765
|
+
speed: 2.015,
|
|
39766
|
+
count: 0.42,
|
|
39767
|
+
size: 1.15,
|
|
39768
|
+
extra: {
|
|
39769
|
+
scanMul: 4.08,
|
|
39770
|
+
dimBase: 0.45
|
|
39771
|
+
}
|
|
39772
|
+
},
|
|
39773
|
+
20: {
|
|
39774
|
+
speed: 2.665,
|
|
39775
|
+
count: 0.105,
|
|
39776
|
+
size: 1.75,
|
|
39777
|
+
extra: {
|
|
39778
|
+
scanMul: 4.335,
|
|
39779
|
+
dimBase: 0.45
|
|
39780
|
+
}
|
|
39781
|
+
}
|
|
39782
|
+
},
|
|
39783
|
+
rubik: {
|
|
39784
|
+
64: {
|
|
39785
|
+
speed: 1.82,
|
|
39786
|
+
count: 0.35,
|
|
39787
|
+
size: 1.05
|
|
39788
|
+
},
|
|
39789
|
+
20: {
|
|
39790
|
+
speed: 1.95,
|
|
39791
|
+
count: 0.088,
|
|
39792
|
+
size: 1.9
|
|
39793
|
+
}
|
|
39794
|
+
},
|
|
39795
|
+
wave: {
|
|
39796
|
+
64: {
|
|
39797
|
+
speed: 4.388,
|
|
39798
|
+
count: 0.341,
|
|
39799
|
+
size: 1
|
|
39800
|
+
},
|
|
39801
|
+
20: {
|
|
39802
|
+
speed: 3.998,
|
|
39803
|
+
count: 0.105,
|
|
39804
|
+
size: 1.6
|
|
39805
|
+
}
|
|
39806
|
+
},
|
|
39807
|
+
ribbon: {
|
|
39808
|
+
64: {
|
|
39809
|
+
speed: 2.34,
|
|
39810
|
+
count: 0.25,
|
|
39811
|
+
size: 0.85,
|
|
39812
|
+
extra: {
|
|
39813
|
+
spin: 0,
|
|
39814
|
+
bandMul: 3.9,
|
|
39815
|
+
wobMul: 1
|
|
39816
|
+
}
|
|
39817
|
+
},
|
|
39818
|
+
20: {
|
|
39819
|
+
speed: 3.12,
|
|
39820
|
+
count: 0.051,
|
|
39821
|
+
size: 1.073,
|
|
39822
|
+
extra: {
|
|
39823
|
+
spin: 0,
|
|
39824
|
+
bandMul: 4.94,
|
|
39825
|
+
wobMul: 1
|
|
39826
|
+
}
|
|
39827
|
+
}
|
|
39828
|
+
},
|
|
39829
|
+
morph: {
|
|
39830
|
+
64: {
|
|
39831
|
+
speed: 2.405,
|
|
39832
|
+
count: 0.54,
|
|
39833
|
+
size: 0.395,
|
|
39834
|
+
extra: {
|
|
39835
|
+
spread: 1.45
|
|
39836
|
+
}
|
|
39837
|
+
},
|
|
39838
|
+
20: {
|
|
39839
|
+
speed: 2.08,
|
|
39840
|
+
count: 0.53,
|
|
39841
|
+
size: 1.011,
|
|
39842
|
+
extra: {
|
|
39843
|
+
spread: 1.45
|
|
39844
|
+
}
|
|
39845
|
+
}
|
|
39846
|
+
}
|
|
39847
|
+
},
|
|
39848
|
+
H = /* @__PURE__ */new Map();
|
|
39849
|
+
function It(e, n) {
|
|
39850
|
+
var s = e + "-" + n,
|
|
39851
|
+
r = H.get(s);
|
|
39852
|
+
if (r) return r;
|
|
39853
|
+
var t = Rt[e],
|
|
39854
|
+
o = St[t][n];
|
|
39855
|
+
var c = _extends({}, Dt[t]);
|
|
39856
|
+
o.count !== 1 && (c = kt(c, o.count)), o.size !== 1 && (c = Pt(c, o.size)), o.extra && (c = _extends({}, c, o.extra));
|
|
39857
|
+
var a = {
|
|
39858
|
+
mode: t,
|
|
39859
|
+
speed: o.speed,
|
|
39860
|
+
opts: c
|
|
39861
|
+
};
|
|
39862
|
+
return H.set(s, a), a;
|
|
39863
|
+
}
|
|
39864
|
+
function Et(e) {
|
|
39865
|
+
var n = e;
|
|
39866
|
+
for (; n;) {
|
|
39867
|
+
var s = n.getAttribute("data-theme");
|
|
39868
|
+
if (s === "dark") return true;
|
|
39869
|
+
if (s === "light") return false;
|
|
39870
|
+
if (n.classList.contains("dark")) return true;
|
|
39871
|
+
if (n.classList.contains("light")) return false;
|
|
39872
|
+
n = n.parentElement;
|
|
39873
|
+
}
|
|
39874
|
+
return null;
|
|
39875
|
+
}
|
|
39876
|
+
function Lt() {
|
|
39877
|
+
return typeof matchMedia > "u" || matchMedia("(prefers-color-scheme: dark)").matches;
|
|
39878
|
+
}
|
|
39879
|
+
function At(e, n) {
|
|
39880
|
+
var _V = React.useState(true),
|
|
39881
|
+
_V2 = _slicedToArray(_V, 2),
|
|
39882
|
+
s = _V2[0],
|
|
39883
|
+
r = _V2[1];
|
|
39884
|
+
return React.useEffect(function () {
|
|
39885
|
+
if (e === "dark") {
|
|
39886
|
+
r(true);
|
|
39887
|
+
return;
|
|
39888
|
+
}
|
|
39889
|
+
if (e === "light") {
|
|
39890
|
+
r(false);
|
|
39891
|
+
return;
|
|
39892
|
+
}
|
|
39893
|
+
var t = function t() {
|
|
39894
|
+
var i = Et(n.current);
|
|
39895
|
+
r(i != null ? i : Lt());
|
|
39896
|
+
};
|
|
39897
|
+
t();
|
|
39898
|
+
var o = typeof matchMedia < "u" ? matchMedia("(prefers-color-scheme: dark)") : null,
|
|
39899
|
+
c = function c() {
|
|
39900
|
+
return t();
|
|
39901
|
+
};
|
|
39902
|
+
o == null || o.addEventListener("change", c);
|
|
39903
|
+
var a = null;
|
|
39904
|
+
return typeof MutationObserver < "u" && n.current && (a = new MutationObserver(t), a.observe(document.documentElement, {
|
|
39905
|
+
attributes: true,
|
|
39906
|
+
attributeFilter: ["class", "data-theme"],
|
|
39907
|
+
subtree: true
|
|
39908
|
+
})), function () {
|
|
39909
|
+
o == null || o.removeEventListener("change", c), a == null || a.disconnect();
|
|
39910
|
+
};
|
|
39911
|
+
}, [e, n]), s;
|
|
39912
|
+
}
|
|
39913
|
+
function Bt() {
|
|
39914
|
+
var _V3 = React.useState(false),
|
|
39915
|
+
_V4 = _slicedToArray(_V3, 2),
|
|
39916
|
+
e = _V4[0],
|
|
39917
|
+
n = _V4[1];
|
|
39918
|
+
return React.useEffect(function () {
|
|
39919
|
+
if (typeof matchMedia > "u") return;
|
|
39920
|
+
var s = matchMedia("(prefers-reduced-motion: reduce)");
|
|
39921
|
+
n(s.matches);
|
|
39922
|
+
var r = function r(t) {
|
|
39923
|
+
return n(t.matches);
|
|
39924
|
+
};
|
|
39925
|
+
return s.addEventListener("change", r), function () {
|
|
39926
|
+
return s.removeEventListener("change", r);
|
|
39927
|
+
};
|
|
39928
|
+
}, []), e;
|
|
39929
|
+
}
|
|
39930
|
+
var Ct = {
|
|
39931
|
+
working: "Working…",
|
|
39932
|
+
searching: "Searching…",
|
|
39933
|
+
solving: "Solving…",
|
|
39934
|
+
listening: "Listening…",
|
|
39935
|
+
composing: "Composing…",
|
|
39936
|
+
shaping: "Shaping…"
|
|
39937
|
+
};
|
|
39938
|
+
function Tt(_ref) {
|
|
39939
|
+
var _ref$state = _ref.state,
|
|
39940
|
+
e = _ref$state === void 0 ? "working" : _ref$state,
|
|
39941
|
+
_ref$size = _ref.size,
|
|
39942
|
+
n = _ref$size === void 0 ? 64 : _ref$size,
|
|
39943
|
+
_ref$theme = _ref.theme,
|
|
39944
|
+
s = _ref$theme === void 0 ? "auto" : _ref$theme,
|
|
39945
|
+
_ref$speed = _ref.speed,
|
|
39946
|
+
r = _ref$speed === void 0 ? 1 : _ref$speed,
|
|
39947
|
+
_ref$paused = _ref.paused,
|
|
39948
|
+
t = _ref$paused === void 0 ? false : _ref$paused,
|
|
39949
|
+
o = _ref.style,
|
|
39950
|
+
c = _ref["aria-label"],
|
|
39951
|
+
a = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
39952
|
+
var i = React.useRef(null),
|
|
39953
|
+
m = At(s, i),
|
|
39954
|
+
g = Bt();
|
|
39955
|
+
return React.useEffect(function () {
|
|
39956
|
+
var M = i.current;
|
|
39957
|
+
if (!M) return;
|
|
39958
|
+
var u = Math.min(2, typeof devicePixelRatio < "u" && devicePixelRatio || 1);
|
|
39959
|
+
M.width = Math.round(n * u), M.height = Math.round(n * u);
|
|
39960
|
+
var h = M.getContext("2d");
|
|
39961
|
+
if (!h) return;
|
|
39962
|
+
var _It = It(e, n),
|
|
39963
|
+
b = _It.mode,
|
|
39964
|
+
x = _It.speed,
|
|
39965
|
+
I = _It.opts,
|
|
39966
|
+
P = bt[b],
|
|
39967
|
+
y = x * r,
|
|
39968
|
+
D = function D(S) {
|
|
39969
|
+
h.setTransform(u, 0, 0, u, 0, 0), h.clearRect(0, 0, n, n), P(h, n, S, m, I);
|
|
39970
|
+
};
|
|
39971
|
+
if (g) {
|
|
39972
|
+
D(0.6);
|
|
39973
|
+
return;
|
|
39974
|
+
}
|
|
39975
|
+
var w = 0,
|
|
39976
|
+
k = false;
|
|
39977
|
+
var _v = function v() {
|
|
39978
|
+
D(performance.now() / 1e3 * y), k && (w = requestAnimationFrame(_v));
|
|
39979
|
+
},
|
|
39980
|
+
R = function R() {
|
|
39981
|
+
k || t || (k = true, w = requestAnimationFrame(_v));
|
|
39982
|
+
},
|
|
39983
|
+
p = function p() {
|
|
39984
|
+
k = false, cancelAnimationFrame(w);
|
|
39985
|
+
};
|
|
39986
|
+
D(performance.now() / 1e3 * y);
|
|
39987
|
+
var d = true;
|
|
39988
|
+
var l = typeof IntersectionObserver < "u" ? new IntersectionObserver(function (_ref2) {
|
|
39989
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
39990
|
+
S = _ref3[0];
|
|
39991
|
+
d = S.isIntersecting, d && document.visibilityState !== "hidden" ? R() : p();
|
|
39992
|
+
}) : null;
|
|
39993
|
+
l == null || l.observe(M);
|
|
39994
|
+
var f = function f() {
|
|
39995
|
+
document.visibilityState === "hidden" ? p() : d && R();
|
|
39996
|
+
};
|
|
39997
|
+
return document.addEventListener("visibilitychange", f), l || R(), function () {
|
|
39998
|
+
p(), l == null || l.disconnect(), document.removeEventListener("visibilitychange", f);
|
|
39999
|
+
};
|
|
40000
|
+
}, [e, n, m, r, t, g]), /* @__PURE__ */jsxRuntime.jsx("canvas", _extends({
|
|
40001
|
+
ref: i,
|
|
40002
|
+
role: "img",
|
|
40003
|
+
"aria-label": c != null ? c : Ct[e],
|
|
40004
|
+
style: _extends({
|
|
40005
|
+
width: n,
|
|
40006
|
+
height: n,
|
|
40007
|
+
display: "block"
|
|
40008
|
+
}, o)
|
|
40009
|
+
}, a));
|
|
40010
|
+
}
|
|
40011
|
+
|
|
39112
40012
|
var _templateObject$2, _templateObject2$2;
|
|
39113
40013
|
function OrbStatusScreen(_ref) {
|
|
39114
40014
|
var state = _ref.state,
|
|
@@ -39117,7 +40017,7 @@ function OrbStatusScreen(_ref) {
|
|
|
39117
40017
|
loadingStage = _ref.loadingStage;
|
|
39118
40018
|
var theme = styledComponents.useTheme();
|
|
39119
40019
|
var label = accessibleLabel != null ? accessibleLabel : typeof text === 'string' ? text : undefined;
|
|
39120
|
-
var orb = jsxRuntime.jsx(
|
|
40020
|
+
var orb = jsxRuntime.jsx(Tt, {
|
|
39121
40021
|
state: state,
|
|
39122
40022
|
size: 64,
|
|
39123
40023
|
style: {
|
|
@@ -43436,7 +44336,7 @@ function createDocumentCaptureController(config) {
|
|
|
43436
44336
|
var createCanvas = (_config$io$createCanv = (_config$io6 = config.io) == null ? void 0 : _config$io6.createCanvas) != null ? _config$io$createCanv : function () {
|
|
43437
44337
|
return document.createElement('canvas');
|
|
43438
44338
|
};
|
|
43439
|
-
var store =
|
|
44339
|
+
var store = createStore(function () {
|
|
43440
44340
|
var _config$documents;
|
|
43441
44341
|
return createInitialDocumentCaptureState(buildEntries((_config$documents = config.documents) != null ? _config$documents : [], createObjectUrl));
|
|
43442
44342
|
});
|
|
@@ -46359,7 +47259,8 @@ function subBag(bag, key) {
|
|
|
46359
47259
|
* async decision, so the mapper cannot know which path will run, and dropping
|
|
46360
47260
|
* the flow-level classes for a customer who set only those would be the same
|
|
46361
47261
|
* "my CSS stopped applying" failure this gate exists to catch. The more
|
|
46362
|
-
* specific bag still wins wherever both name the same leaf.
|
|
47262
|
+
* specific bag still wins wherever both name the same leaf. Callers merge only
|
|
47263
|
+
* when the video path can run at all.
|
|
46363
47264
|
*/
|
|
46364
47265
|
function mergeStyleBags(base, override) {
|
|
46365
47266
|
if (!base) return override;
|
|
@@ -46672,32 +47573,43 @@ function faceCaptureCopy(bag) {
|
|
|
46672
47573
|
}
|
|
46673
47574
|
return compactOrUndefined(copy);
|
|
46674
47575
|
}
|
|
47576
|
+
/**
|
|
47577
|
+
* One stage's colour bag. Unlike `stageBag`, a multi-stage flow (`prefixed`)
|
|
47578
|
+
* never falls back to the root: its root `success` is a DIFFERENT screen's
|
|
47579
|
+
* (the video-ID or signature review), so the fallback would paint that
|
|
47580
|
+
* screen's buttons onto this stage's.
|
|
47581
|
+
*/
|
|
47582
|
+
function colorStage(rawBag, stage, prefixed) {
|
|
47583
|
+
return prefixed ? subBag(rawBag, stage) : stageBag(rawBag, stage);
|
|
47584
|
+
}
|
|
46675
47585
|
/**
|
|
46676
47586
|
* The half of sdk2's `colors` bag that stayed a component prop: the per-screen
|
|
46677
47587
|
* BUTTON colours. Everything else in the bag is a theme field now — see
|
|
46678
47588
|
* `mapThemeWithColors` in ./themes.ts, which the flows apply to `theme`.
|
|
46679
47589
|
*
|
|
46680
|
-
* The ID side keeps the loading overlay's
|
|
46681
|
-
*
|
|
46682
|
-
* `success.doneBtn`/`success.retryBtn` have no per-screen home: 3.0's
|
|
46683
|
-
* ReviewScreen colours its buttons by `variant` off `theme.buttons`, so those
|
|
46684
|
-
* two are reported in `__fixtures__/dispositions.md` as theme-level rather
|
|
46685
|
-
* than silently dropped here.
|
|
47590
|
+
* The ID side keeps the loading overlay's buttons, the fallback screen's, and
|
|
47591
|
+
* sdk2's `success` pair, which is the review screen's.
|
|
46686
47592
|
*/
|
|
46687
|
-
function mapIdColors(rawBag) {
|
|
46688
|
-
var bag =
|
|
47593
|
+
function mapIdColors(rawBag, prefixed) {
|
|
47594
|
+
var bag = colorStage(rawBag, 'idCapture', prefixed);
|
|
46689
47595
|
if (!bag) return undefined;
|
|
46690
47596
|
var loadingOverlay = bag.loadingOverlay;
|
|
47597
|
+
var success = subBag(bag, 'success');
|
|
46691
47598
|
return compactOrUndefined({
|
|
46692
47599
|
loadingOverlay: compactOrUndefined({
|
|
46693
47600
|
continueBtn: loadingOverlay === null || loadingOverlay === void 0 ? void 0 : loadingOverlay.continueBtn,
|
|
46694
47601
|
cameraAccessDenied: loadingOverlay === null || loadingOverlay === void 0 ? void 0 : loadingOverlay.cameraAccessDenied
|
|
47602
|
+
}),
|
|
47603
|
+
fallback: bag.fallback,
|
|
47604
|
+
review: compactOrUndefined({
|
|
47605
|
+
submitBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
|
|
47606
|
+
retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn
|
|
46695
47607
|
})
|
|
46696
47608
|
});
|
|
46697
47609
|
}
|
|
46698
47610
|
/** The same for the face stage, whose success/failure screens DO take colours. */
|
|
46699
|
-
function mapFaceColors(rawBag) {
|
|
46700
|
-
var bag =
|
|
47611
|
+
function mapFaceColors(rawBag, prefixed) {
|
|
47612
|
+
var bag = colorStage(rawBag, 'faceLiveness', prefixed);
|
|
46701
47613
|
if (!bag) return undefined;
|
|
46702
47614
|
var loadingOverlay = bag.loadingOverlay;
|
|
46703
47615
|
return compactOrUndefined({
|
|
@@ -46874,6 +47786,61 @@ function mapVideoIdViewClassNames(bag) {
|
|
|
46874
47786
|
microphoneAccessDenied: subBag(subBag(bag, 'loadingOverlay'), 'microphoneAccessDenied')
|
|
46875
47787
|
});
|
|
46876
47788
|
}
|
|
47789
|
+
/**
|
|
47790
|
+
* The microphone-denied screen's colours. sdk2 showed that screen from the
|
|
47791
|
+
* loading overlay of the stage that asked for the microphone: the selfie
|
|
47792
|
+
* stage, on both the video signature and video ID (IdVideoCaptureWizard.tsx
|
|
47793
|
+
* asks only once ID capture is over). So each view reads that stage, then the
|
|
47794
|
+
* other, then a flat bag's own `loadingOverlay`.
|
|
47795
|
+
*/
|
|
47796
|
+
function micDeniedColors(colors, first, second) {
|
|
47797
|
+
var _a, _b;
|
|
47798
|
+
var read = function read(bag) {
|
|
47799
|
+
return subBag(subBag(bag, 'loadingOverlay'), 'microphoneAccessDenied');
|
|
47800
|
+
};
|
|
47801
|
+
return (_b = (_a = read(subBag(colors, first))) !== null && _a !== void 0 ? _a : read(subBag(colors, second))) !== null && _b !== void 0 ? _b : read(colors);
|
|
47802
|
+
}
|
|
47803
|
+
/**
|
|
47804
|
+
* sdk2's video-signature colours (`VideoSignatureColors`) ->
|
|
47805
|
+
* `SignatureCaptureViewColors`. `bag` is that bag: the root on SignatureKYC,
|
|
47806
|
+
* `videoSignatureCapture` everywhere else. `flowColors` is the flow's whole
|
|
47807
|
+
* bag, for the microphone screen, which the selfie overlay showed first.
|
|
47808
|
+
*/
|
|
47809
|
+
function mapSignatureColors(bag, flowColors) {
|
|
47810
|
+
var success = subBag(bag, 'success');
|
|
47811
|
+
return compactOrUndefined({
|
|
47812
|
+
headingBackgroundColor: bag === null || bag === void 0 ? void 0 : bag.guidanceMessageBackgroundColor,
|
|
47813
|
+
headingTextColor: bag === null || bag === void 0 ? void 0 : bag.guidanceMessageTextColor,
|
|
47814
|
+
retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn,
|
|
47815
|
+
doneBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
|
|
47816
|
+
microphoneAccessDenied: micDeniedColors(flowColors, 'faceLiveness', 'idCapture')
|
|
47817
|
+
});
|
|
47818
|
+
}
|
|
47819
|
+
/**
|
|
47820
|
+
* sdk2's video-ID wizard colours (`VideoIdWizardColors`, or VideoIdValidation's
|
|
47821
|
+
* root, the same shape) -> `VideoIdCaptureViewColors`. The guide colours are
|
|
47822
|
+
* theme fields (./themes.ts). The ID stage's loading overlay is the one this
|
|
47823
|
+
* view embeds. A camera denial here is on the front camera, which sdk2's
|
|
47824
|
+
* selfie stage asked for, so that stage's denied colours come first, as for
|
|
47825
|
+
* the microphone.
|
|
47826
|
+
*/
|
|
47827
|
+
function mapVideoIdColors(bag) {
|
|
47828
|
+
var _a;
|
|
47829
|
+
var capture = subBag(bag, 'idVideoCapture');
|
|
47830
|
+
var success = subBag(bag, 'success');
|
|
47831
|
+
var idOverlay = subBag(subBag(bag, 'idCapture'), 'loadingOverlay');
|
|
47832
|
+
var faceOverlay = subBag(subBag(bag, 'faceLiveness'), 'loadingOverlay');
|
|
47833
|
+
return compactOrUndefined({
|
|
47834
|
+
readTextDoneBtn: capture === null || capture === void 0 ? void 0 : capture.readTextDoneBtn,
|
|
47835
|
+
retryBtn: success === null || success === void 0 ? void 0 : success.retryBtn,
|
|
47836
|
+
doneBtn: success === null || success === void 0 ? void 0 : success.doneBtn,
|
|
47837
|
+
loadingOverlay: compactOrUndefined({
|
|
47838
|
+
continueBtn: idOverlay === null || idOverlay === void 0 ? void 0 : idOverlay.continueBtn,
|
|
47839
|
+
cameraAccessDenied: (_a = faceOverlay === null || faceOverlay === void 0 ? void 0 : faceOverlay.cameraAccessDenied) !== null && _a !== void 0 ? _a : idOverlay === null || idOverlay === void 0 ? void 0 : idOverlay.cameraAccessDenied
|
|
47840
|
+
}),
|
|
47841
|
+
microphoneAccessDenied: micDeniedColors(bag, 'faceLiveness', 'idCapture')
|
|
47842
|
+
});
|
|
47843
|
+
}
|
|
46877
47844
|
/**
|
|
46878
47845
|
* sdk2's `idVideoCapture` and video `success` copy ->
|
|
46879
47846
|
* `VideoIdCaptureViewVerbiage`. The read-aloud keys are renamed, as
|
|
@@ -47021,7 +47988,7 @@ function mapIdCapture(props, prefixed) {
|
|
|
47021
47988
|
onExitAfterTamperSealPopped: props.onExitAfterTamperSealPopped,
|
|
47022
47989
|
verbiage: mapIdVerbiage(props.verbiage),
|
|
47023
47990
|
classNames: mapIdClassNames(props.classNames),
|
|
47024
|
-
colors: mapIdColors(props.colors),
|
|
47991
|
+
colors: mapIdColors(props.colors, prefixed),
|
|
47025
47992
|
assets: mapIdViewAssets(props.assets, guideImages)
|
|
47026
47993
|
});
|
|
47027
47994
|
return {
|
|
@@ -47114,7 +48081,7 @@ function mapFaceCapture(props, prefixed) {
|
|
|
47114
48081
|
customOverlayContent: props.customOverlayContent,
|
|
47115
48082
|
verbiage: mapFaceVerbiage(props.verbiage),
|
|
47116
48083
|
classNames: mapFaceClassNames(props.classNames),
|
|
47117
|
-
colors: mapFaceColors(props.colors),
|
|
48084
|
+
colors: mapFaceColors(props.colors, prefixed),
|
|
47118
48085
|
assets: mapFaceAssets(props.assets)
|
|
47119
48086
|
});
|
|
47120
48087
|
return {
|
|
@@ -47255,6 +48222,8 @@ function mapTheme(theme) {
|
|
|
47255
48222
|
* guidesUnsatisfiedColor -> selfieCapture.guides.unsatisfiedColor
|
|
47256
48223
|
* guidanceMessages*Satisfied* -> guidanceMessages.positive.*
|
|
47257
48224
|
* guidanceMessages*Unsatisfied* -> guidanceMessages.default.*
|
|
48225
|
+
* idVideoCapture.guides*Color -> idVideoCapture.{faceGuides,idCardGuides}.*
|
|
48226
|
+
* and selfieCapture.guides.*, over guides*
|
|
47258
48227
|
*
|
|
47259
48228
|
* The satisfied/unsatisfied split maps onto `positive`/`default` because that
|
|
47260
48229
|
* is the pair the views actually select between (`IdCaptureView` renders the
|
|
@@ -47265,6 +48234,7 @@ function mapTheme(theme) {
|
|
|
47265
48234
|
* (`colors.guideBoxSatisfiedColor ?? theme…`, IdCapture.tsx:236-239).
|
|
47266
48235
|
*/
|
|
47267
48236
|
function themeFromColors(rawColors) {
|
|
48237
|
+
var _a, _b;
|
|
47268
48238
|
if (!rawColors) return undefined;
|
|
47269
48239
|
// Same two shapes as the other style bags (see `stageBag` in ./shared.ts):
|
|
47270
48240
|
// single-stage flows declare these fields FLAT, multi-stage ones nest one
|
|
@@ -47299,9 +48269,15 @@ function themeFromColors(rawColors) {
|
|
|
47299
48269
|
satisfiedColor: fromId('guideBoxSatisfiedColor'),
|
|
47300
48270
|
unsatisfiedColor: fromId('guideBoxUnsatisfiedColor')
|
|
47301
48271
|
});
|
|
48272
|
+
// Only ever nested: no flat flow has a video-ID stage. sdk2 coloured the face
|
|
48273
|
+
// and card guides with the same pair (IdVideoCapture.tsx:608-617), and its
|
|
48274
|
+
// liveness guide too, in place of the face stage's own
|
|
48275
|
+
// (IdVideoCaptureWizard.tsx:357-369). 3.0's video-ID liveness stage is the
|
|
48276
|
+
// flow's selfie stage, so the pair wins the selfie guides.
|
|
48277
|
+
var videoStage = stageColors(rawColors, 'idVideoCapture');
|
|
47302
48278
|
var guides = stripUndefined({
|
|
47303
|
-
satisfiedColor: fromFace('guidesSatisfiedColor'),
|
|
47304
|
-
unsatisfiedColor: fromFace('guidesUnsatisfiedColor')
|
|
48279
|
+
satisfiedColor: (_a = videoStage.guidesSatisfiedColor) !== null && _a !== void 0 ? _a : fromFace('guidesSatisfiedColor'),
|
|
48280
|
+
unsatisfiedColor: (_b = videoStage.guidesUnsatisfiedColor) !== null && _b !== void 0 ? _b : fromFace('guidesUnsatisfiedColor')
|
|
47305
48281
|
});
|
|
47306
48282
|
var positive = stripUndefined({
|
|
47307
48283
|
backgroundColor: shared('guidanceMessagesSatisfiedBackgroundColor'),
|
|
@@ -47311,6 +48287,10 @@ function themeFromColors(rawColors) {
|
|
|
47311
48287
|
backgroundColor: shared('guidanceMessagesUnsatisfiedBackgroundColor'),
|
|
47312
48288
|
textColor: shared('guidanceMessagesUnsatisfiedTextColor')
|
|
47313
48289
|
});
|
|
48290
|
+
var videoGuides = stripUndefined({
|
|
48291
|
+
satisfiedColor: videoStage.guidesSatisfiedColor,
|
|
48292
|
+
unsatisfiedColor: videoStage.guidesUnsatisfiedColor
|
|
48293
|
+
});
|
|
47314
48294
|
var out = {};
|
|
47315
48295
|
if (!isEmptyRecord(guideBox)) out.idCapture = {
|
|
47316
48296
|
guideBox: guideBox
|
|
@@ -47318,6 +48298,12 @@ function themeFromColors(rawColors) {
|
|
|
47318
48298
|
if (!isEmptyRecord(guides)) out.selfieCapture = {
|
|
47319
48299
|
guides: guides
|
|
47320
48300
|
};
|
|
48301
|
+
if (!isEmptyRecord(videoGuides)) {
|
|
48302
|
+
out.idVideoCapture = {
|
|
48303
|
+
faceGuides: videoGuides,
|
|
48304
|
+
idCardGuides: videoGuides
|
|
48305
|
+
};
|
|
48306
|
+
}
|
|
47321
48307
|
var guidanceMessages = {};
|
|
47322
48308
|
if (!isEmptyRecord(positive)) guidanceMessages.positive = positive;
|
|
47323
48309
|
if (!isEmptyRecord(byDefault)) guidanceMessages["default"] = byDefault;
|
|
@@ -47432,7 +48418,10 @@ function mapSignatureView(props) {
|
|
|
47432
48418
|
activeCopy = _b[1];
|
|
47433
48419
|
return compactOrUndefined({
|
|
47434
48420
|
classNames: mapSignatureClassNames(mergeStyleBags(baseClasses, activeClasses)),
|
|
47435
|
-
verbiage: compactOrUndefined(_assign(_assign({}, mapSignatureVerbiage(baseCopy)), mapSignatureVerbiage(activeCopy)))
|
|
48421
|
+
verbiage: compactOrUndefined(_assign(_assign({}, mapSignatureVerbiage(baseCopy)), mapSignatureVerbiage(activeCopy))),
|
|
48422
|
+
// Only the video signature took colours in 2.x; sdk2's still
|
|
48423
|
+
// `SignatureCapture` had no colours prop.
|
|
48424
|
+
colors: props.captureSignature ? undefined : mapSignatureColors(subBag(props.colors, 'videoSignatureCapture'), props.colors)
|
|
47436
48425
|
});
|
|
47437
48426
|
}
|
|
47438
48427
|
/**
|
|
@@ -47709,7 +48698,7 @@ function mapIdAndFaceValidationProps(props, ctx) {
|
|
|
47709
48698
|
}
|
|
47710
48699
|
// --- 4. SignatureKYC ------------------------------------------------------
|
|
47711
48700
|
function mapSignatureKYCProps(props, ctx) {
|
|
47712
|
-
var _a, _b, _c, _d, _e, _f;
|
|
48701
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
47713
48702
|
if (ctx === void 0) {
|
|
47714
48703
|
ctx = EMPTY_CONTEXT;
|
|
47715
48704
|
}
|
|
@@ -47741,7 +48730,10 @@ function mapSignatureKYCProps(props, ctx) {
|
|
|
47741
48730
|
verbiage: mergeStyleBags(compactOrUndefined({
|
|
47742
48731
|
cameraStoreProvider: subBag(signatureVerbiage, 'cameraStoreProvider')
|
|
47743
48732
|
}), (_c = signatureVerbiage === null || signatureVerbiage === void 0 ? void 0 : signatureVerbiage.faceLiveness) !== null && _c !== void 0 ? _c : nestedFaceProps.verbiage),
|
|
47744
|
-
assets: (_d = signatureAssets === null || signatureAssets === void 0 ? void 0 : signatureAssets.faceLiveness) !== null && _d !== void 0 ? _d : nestedFaceProps.assets
|
|
48733
|
+
assets: (_d = signatureAssets === null || signatureAssets === void 0 ? void 0 : signatureAssets.faceLiveness) !== null && _d !== void 0 ? _d : nestedFaceProps.assets,
|
|
48734
|
+
// The root bag's `success` is the signature review's, so the face stage
|
|
48735
|
+
// reads only its own.
|
|
48736
|
+
colors: (_e = subBag(props.colors, 'faceLiveness')) !== null && _e !== void 0 ? _e : nestedFaceProps.colors
|
|
47745
48737
|
});
|
|
47746
48738
|
var face = mapFaceCapture(faceInputs);
|
|
47747
48739
|
var nested = props.faceLivenessProps;
|
|
@@ -47787,7 +48779,7 @@ function mapSignatureKYCProps(props, ctx) {
|
|
|
47787
48779
|
// rather than in the shared mapper: `faceInputs` has already folded the
|
|
47788
48780
|
// nested `faceLivenessProps` bag in, so a nested `true` is honoured and
|
|
47789
48781
|
// only a genuinely absent prop falls back to 2.x's `false`.
|
|
47790
|
-
debugShowSamplePoints: (
|
|
48782
|
+
debugShowSamplePoints: (_f = face.view.debugShowSamplePoints) !== null && _f !== void 0 ? _f : false,
|
|
47791
48783
|
onExitAfterFailure: typeof faceInputs.onExitAfterFailure === 'function' ? function () {
|
|
47792
48784
|
var _a, _b;
|
|
47793
48785
|
return faceInputs.onExitAfterFailure(null, (_b = (_a = ctx.lastLivenessRequest) === null || _a === void 0 ? void 0 : _a.call(ctx)) !== null && _b !== void 0 ? _b : null);
|
|
@@ -47837,7 +48829,8 @@ function mapSignatureKYCProps(props, ctx) {
|
|
|
47837
48829
|
showCaptureDiagnostics: props.debugMode,
|
|
47838
48830
|
recordingInterruptedComponent: props.recordingInterruptedComponent,
|
|
47839
48831
|
classNames: mapSignatureClassNames(signatureClassNames),
|
|
47840
|
-
verbiage: mapSignatureVerbiage(signatureVerbiage)
|
|
48832
|
+
verbiage: mapSignatureVerbiage(signatureVerbiage),
|
|
48833
|
+
colors: mapSignatureColors(props.colors, props.colors)
|
|
47841
48834
|
}),
|
|
47842
48835
|
allowVirtualCameras: props.allowVirtualCameras,
|
|
47843
48836
|
skipLivenessValidation: props.skipLivenessValidation,
|
|
@@ -47848,7 +48841,7 @@ function mapSignatureKYCProps(props, ctx) {
|
|
|
47848
48841
|
showFaceGuideThenSignaturePad: props.showFaceGuideThenSignaturePad,
|
|
47849
48842
|
submission: mapSubmission(props),
|
|
47850
48843
|
theme: mapThemeWithColors(props.theme, props.colors),
|
|
47851
|
-
className: (
|
|
48844
|
+
className: (_g = props.classNames) === null || _g === void 0 ? void 0 : _g.container,
|
|
47852
48845
|
geolocationEnabled: props.geolocationEnabled,
|
|
47853
48846
|
geolocationRequired: props.geolocationRequired,
|
|
47854
48847
|
captureProgress: props.captureProgress,
|
|
@@ -47938,7 +48931,8 @@ function mapVideoIdValidationProps(props, ctx) {
|
|
|
47938
48931
|
guideImages: props.idCaptureGuideImages,
|
|
47939
48932
|
onExit: props.onExitCapture,
|
|
47940
48933
|
classNames: mapVideoIdViewClassNames(props.classNames),
|
|
47941
|
-
verbiage: mapVideoIdViewVerbiage(props.verbiage)
|
|
48934
|
+
verbiage: mapVideoIdViewVerbiage(props.verbiage),
|
|
48935
|
+
colors: mapVideoIdColors(props.colors)
|
|
47942
48936
|
}),
|
|
47943
48937
|
// sdk2 spread the verbiage sentence over this prop, so it wins for
|
|
47944
48938
|
// display; only the prop turns the read-aloud stage on (`readText` above).
|
|
@@ -48219,12 +49213,17 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48219
49213
|
// separate component instances there, but the very same `idView`/`faceView`
|
|
48220
49214
|
// here, because `buildVideoIdSteps` reuses them. Folding the wrapper in
|
|
48221
49215
|
// before the stage mappers run is what gives those sub-bags a destination;
|
|
48222
|
-
// see `mergeStyleBags` for why it merges rather than overriding.
|
|
49216
|
+
// see `mergeStyleBags` for why it merges rather than overriding. With video
|
|
49217
|
+
// ID off (false or unset) the wrapper's wizard never runs, so its bags do not
|
|
49218
|
+
// apply; an async `captureVideoId` might, so they merge.
|
|
49219
|
+
var videoBag = function videoBag(bag) {
|
|
49220
|
+
return props.captureVideoId ? subBag(bag, 'videoIdCapture') : undefined;
|
|
49221
|
+
};
|
|
48223
49222
|
var styled = _assign(_assign({}, props), {
|
|
48224
|
-
classNames: mergeStyleBags(props.classNames,
|
|
48225
|
-
verbiage: mergeStyleBags(props.verbiage,
|
|
48226
|
-
assets: mergeStyleBags(props.assets,
|
|
48227
|
-
colors: mergeStyleBags(props.colors,
|
|
49223
|
+
classNames: mergeStyleBags(props.classNames, videoBag(props.classNames)),
|
|
49224
|
+
verbiage: mergeStyleBags(props.verbiage, videoBag(props.verbiage)),
|
|
49225
|
+
assets: mergeStyleBags(props.assets, videoBag(props.assets)),
|
|
49226
|
+
colors: mergeStyleBags(props.colors, videoBag(props.colors))
|
|
48228
49227
|
});
|
|
48229
49228
|
var id = mapIdCapture(styled, true);
|
|
48230
49229
|
var face = mapFaceCapture(styled, true);
|
|
@@ -48262,7 +49261,8 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48262
49261
|
})),
|
|
48263
49262
|
videoIdView: compactOrUndefined({
|
|
48264
49263
|
classNames: mapVideoIdViewClassNames(subBag(props.classNames, 'videoIdCapture')),
|
|
48265
|
-
verbiage: mapVideoIdViewVerbiage(subBag(props.verbiage, 'videoIdCapture'))
|
|
49264
|
+
verbiage: mapVideoIdViewVerbiage(subBag(props.verbiage, 'videoIdCapture')),
|
|
49265
|
+
colors: mapVideoIdColors(subBag(props.colors, 'videoIdCapture'))
|
|
48266
49266
|
}),
|
|
48267
49267
|
captureSignature: props.captureSignature,
|
|
48268
49268
|
captureSignatureVideo: props.captureSignatureVideo,
|
|
@@ -48271,7 +49271,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48271
49271
|
enrollmentId: props.enrollmentId
|
|
48272
49272
|
}),
|
|
48273
49273
|
initialArtifacts: mapInitialArtifacts(props),
|
|
48274
|
-
theme: mapThemeWithColors(props.theme,
|
|
49274
|
+
theme: mapThemeWithColors(props.theme, styled.colors),
|
|
48275
49275
|
className: (_b = props.classNames) === null || _b === void 0 ? void 0 : _b.container,
|
|
48276
49276
|
ringScreenClassNames: mapRingScreenClassNames(props.classNames),
|
|
48277
49277
|
additionalDocumentClassNames: mapAdditionalDocumentClassNames(props.classNames),
|
|
@@ -48294,7 +49294,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48294
49294
|
});
|
|
48295
49295
|
}
|
|
48296
49296
|
|
|
48297
|
-
var webSdkVersion = '2.5.
|
|
49297
|
+
var webSdkVersion = '2.5.79-react16compat.0';
|
|
48298
49298
|
|
|
48299
49299
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
48300
49300
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|
|
@@ -49645,13 +50645,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49645
50645
|
"videoSignatureCapture.cameraStoreProvider": 2
|
|
49646
50646
|
},
|
|
49647
50647
|
"colors": {
|
|
49648
|
-
"
|
|
49649
|
-
"success": 2,
|
|
49650
|
-
"fallback": 2,
|
|
49651
|
-
"videoSignatureCapture.guidanceMessageBackgroundColor": 2,
|
|
49652
|
-
"videoSignatureCapture.guidanceMessageTextColor": 2,
|
|
49653
|
-
"videoSignatureCapture.faceLiveness": 0,
|
|
49654
|
-
"videoSignatureCapture.success": 2
|
|
50648
|
+
"videoSignatureCapture.faceLiveness": 0
|
|
49655
50649
|
}
|
|
49656
50650
|
},
|
|
49657
50651
|
"FaceValidation": {
|
|
@@ -49665,7 +50659,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49665
50659
|
"successScreen": 2
|
|
49666
50660
|
},
|
|
49667
50661
|
"colors": {
|
|
49668
|
-
"loadingOverlay.microphoneAccessDenied":
|
|
50662
|
+
"loadingOverlay.microphoneAccessDenied": 1
|
|
49669
50663
|
}
|
|
49670
50664
|
},
|
|
49671
50665
|
"IdAndFaceValidation": {
|
|
@@ -49696,14 +50690,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49696
50690
|
"videoSignatureCapture.cameraStoreProvider": 2
|
|
49697
50691
|
},
|
|
49698
50692
|
"colors": {
|
|
49699
|
-
"
|
|
49700
|
-
"idCapture.success": 2,
|
|
49701
|
-
"idCapture.fallback": 2,
|
|
49702
|
-
"faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
|
|
49703
|
-
"videoSignatureCapture.guidanceMessageBackgroundColor": 2,
|
|
49704
|
-
"videoSignatureCapture.guidanceMessageTextColor": 2,
|
|
49705
|
-
"videoSignatureCapture.faceLiveness": 0,
|
|
49706
|
-
"videoSignatureCapture.success": 2
|
|
50693
|
+
"videoSignatureCapture.faceLiveness": 0
|
|
49707
50694
|
}
|
|
49708
50695
|
},
|
|
49709
50696
|
"SignatureKYC": {
|
|
@@ -49722,11 +50709,6 @@ var STYLE_BAG_DROPS = {
|
|
|
49722
50709
|
"verbiage": {
|
|
49723
50710
|
"finishingScreen": 2,
|
|
49724
50711
|
"successScreen": 2
|
|
49725
|
-
},
|
|
49726
|
-
"colors": {
|
|
49727
|
-
"guidanceMessageBackgroundColor": 2,
|
|
49728
|
-
"guidanceMessageTextColor": 2,
|
|
49729
|
-
"faceLiveness.loadingOverlay.microphoneAccessDenied": 2
|
|
49730
50712
|
}
|
|
49731
50713
|
},
|
|
49732
50714
|
"VideoIdValidation": {
|
|
@@ -49766,15 +50748,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49766
50748
|
"videoSignatureCapture.cameraStoreProvider": 2
|
|
49767
50749
|
},
|
|
49768
50750
|
"colors": {
|
|
49769
|
-
"
|
|
49770
|
-
"idCapture.success": 2,
|
|
49771
|
-
"idCapture.fallback": 2,
|
|
49772
|
-
"faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
|
|
49773
|
-
"idVideoCapture": 2,
|
|
49774
|
-
"videoSignatureCapture.guidanceMessageBackgroundColor": 2,
|
|
49775
|
-
"videoSignatureCapture.guidanceMessageTextColor": 2,
|
|
49776
|
-
"videoSignatureCapture.faceLiveness": 0,
|
|
49777
|
-
"videoSignatureCapture.success": 2
|
|
50751
|
+
"videoSignatureCapture.faceLiveness": 0
|
|
49778
50752
|
}
|
|
49779
50753
|
},
|
|
49780
50754
|
"CustomerBiometricsEnrollment": {
|
|
@@ -49797,11 +50771,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49797
50771
|
"videoSignatureCapture.cameraStoreProvider": 2
|
|
49798
50772
|
},
|
|
49799
50773
|
"colors": {
|
|
49800
|
-
"faceLiveness
|
|
49801
|
-
"videoSignatureCapture.guidanceMessageBackgroundColor": 2,
|
|
49802
|
-
"videoSignatureCapture.guidanceMessageTextColor": 2,
|
|
49803
|
-
"videoSignatureCapture.faceLiveness": 0,
|
|
49804
|
-
"videoSignatureCapture.success": 2
|
|
50774
|
+
"videoSignatureCapture.faceLiveness": 0
|
|
49805
50775
|
}
|
|
49806
50776
|
},
|
|
49807
50777
|
"CustomerIdAndBiometricsEnrollment": {
|
|
@@ -49851,31 +50821,7 @@ var STYLE_BAG_DROPS = {
|
|
|
49851
50821
|
"videoSignatureCapture.cameraStoreProvider": 2
|
|
49852
50822
|
},
|
|
49853
50823
|
"colors": {
|
|
49854
|
-
"
|
|
49855
|
-
"idCapture.success": 2,
|
|
49856
|
-
"idCapture.fallback": 2,
|
|
49857
|
-
"faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
|
|
49858
|
-
"videoIdCapture.idCapture.guideBoxUnsatisfiedColor": 2,
|
|
49859
|
-
"videoIdCapture.idCapture.guideBoxSatisfiedColor": 2,
|
|
49860
|
-
"videoIdCapture.idCapture.guidanceMessagesSatisfiedBackgroundColor": 2,
|
|
49861
|
-
"videoIdCapture.idCapture.guidanceMessagesUnsatisfiedBackgroundColor": 2,
|
|
49862
|
-
"videoIdCapture.idCapture.guidanceMessagesSatisfiedTextColor": 2,
|
|
49863
|
-
"videoIdCapture.idCapture.guidanceMessagesUnsatisfiedTextColor": 2,
|
|
49864
|
-
"videoIdCapture.idCapture.loadingOverlay.microphoneAccessDenied": 2,
|
|
49865
|
-
"videoIdCapture.idCapture.success": 2,
|
|
49866
|
-
"videoIdCapture.idCapture.fallback": 2,
|
|
49867
|
-
"videoIdCapture.faceLiveness.guidesUnsatisfiedColor": 2,
|
|
49868
|
-
"videoIdCapture.faceLiveness.guidesSatisfiedColor": 2,
|
|
49869
|
-
"videoIdCapture.faceLiveness.guidanceMessagesSatisfiedBackgroundColor": 2,
|
|
49870
|
-
"videoIdCapture.faceLiveness.guidanceMessagesUnsatisfiedBackgroundColor": 2,
|
|
49871
|
-
"videoIdCapture.faceLiveness.guidanceMessagesSatisfiedTextColor": 2,
|
|
49872
|
-
"videoIdCapture.faceLiveness.guidanceMessagesUnsatisfiedTextColor": 2,
|
|
49873
|
-
"videoIdCapture.faceLiveness.loadingOverlay.microphoneAccessDenied": 2,
|
|
49874
|
-
"videoIdCapture.idVideoCapture": 2,
|
|
49875
|
-
"videoSignatureCapture.guidanceMessageBackgroundColor": 2,
|
|
49876
|
-
"videoSignatureCapture.guidanceMessageTextColor": 2,
|
|
49877
|
-
"videoSignatureCapture.faceLiveness": 0,
|
|
49878
|
-
"videoSignatureCapture.success": 2
|
|
50824
|
+
"videoSignatureCapture.faceLiveness": 0
|
|
49879
50825
|
}
|
|
49880
50826
|
}
|
|
49881
50827
|
};
|
|
@@ -50104,12 +51050,11 @@ var ID_OVERLAY_EXTRAS = {
|
|
|
50104
51050
|
* - guide-box / guide / guidance-message colours become theme overrides
|
|
50105
51051
|
* (`mapThemeWithColors`, ./themes.ts), merged over whatever `theme` the
|
|
50106
51052
|
* caller also passed, with the colours winning exactly as in 2.x;
|
|
50107
|
-
* - per-screen BUTTON colours reach
|
|
50108
|
-
* `
|
|
51053
|
+
* - per-screen BUTTON colours reach each view's `colors` bag (the
|
|
51054
|
+
* `map*Colors` mappers in ./shared.ts).
|
|
50109
51055
|
*
|
|
50110
|
-
* The leaves
|
|
50111
|
-
*
|
|
50112
|
-
* `__fixtures__/dispositions.md` rather than silently implied to work.
|
|
51056
|
+
* The leaves no 3.0 screen renders are in the colours ledger
|
|
51057
|
+
* (./styleBagLedger.ts), and so in the docs tables and the style-key warnings.
|
|
50113
51058
|
*/
|
|
50114
51059
|
var STYLE_WITH_ASSETS = {
|
|
50115
51060
|
assets: MAPPED,
|
|
@@ -50952,6 +51897,25 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
50952
51897
|
}, mapCustomerIdAndBiometricsEnrollmentProps(props, ctx)), props.children);
|
|
50953
51898
|
};
|
|
50954
51899
|
|
|
51900
|
+
/**
|
|
51901
|
+
* react-16-compat: React 16/17 have no `createRoot`, so this adapts the legacy
|
|
51902
|
+
* `ReactDOM.render` API to the root shape the rest of this module expects.
|
|
51903
|
+
* Keeping that shape means the teardown logic below stays byte-identical to
|
|
51904
|
+
* develop and merges cleanly. Runs on React 16.14 through 18; React 19
|
|
51905
|
+
* removed `ReactDOM.render`, which is why this build's peer range stops at 18.
|
|
51906
|
+
*/
|
|
51907
|
+
function createRoot(container) {
|
|
51908
|
+
return {
|
|
51909
|
+
render: function render(element) {
|
|
51910
|
+
// eslint-disable-next-line react/no-deprecated -- the only mount API React 16 has
|
|
51911
|
+
ReactDOM__default.default.render(element, container);
|
|
51912
|
+
},
|
|
51913
|
+
unmount: function unmount() {
|
|
51914
|
+
// eslint-disable-next-line react/no-deprecated -- pairs with ReactDOM.render above
|
|
51915
|
+
ReactDOM__default.default.unmountComponentAtNode(container);
|
|
51916
|
+
}
|
|
51917
|
+
};
|
|
51918
|
+
}
|
|
50955
51919
|
/**
|
|
50956
51920
|
* Targets whose `remove` this module has already wrapped. Permanent: the
|
|
50957
51921
|
* wrapper is installed at most once per element, so repeat renders can never
|
|
@@ -50979,8 +51943,7 @@ function renderElement(component, targetElement) {
|
|
|
50979
51943
|
targetElement = document.createElement('div');
|
|
50980
51944
|
document.body.append(targetElement);
|
|
50981
51945
|
}
|
|
50982
|
-
var root =
|
|
50983
|
-
root.render(/*#__PURE__*/React__default.default.createElement(OverlayContainer, null, component));
|
|
51946
|
+
var root = createRoot(targetElement);
|
|
50984
51947
|
if ('remove' in targetElement) {
|
|
50985
51948
|
var element_1 = targetElement;
|
|
50986
51949
|
// Always point at the newest root, even when the wrapper is already
|
|
@@ -51030,6 +51993,10 @@ function renderElement(component, targetElement) {
|
|
|
51030
51993
|
};
|
|
51031
51994
|
}
|
|
51032
51995
|
}
|
|
51996
|
+
// react-16-compat: render LAST. A legacy root mounts synchronously, so layout
|
|
51997
|
+
// effects (e.g. a customer `loadingSpinner`) run inside this call; one that
|
|
51998
|
+
// calls `.remove()` must already hit the wrapper above, not the native method.
|
|
51999
|
+
root.render(/*#__PURE__*/React__default.default.createElement(OverlayContainer, null, component));
|
|
51033
52000
|
return targetElement;
|
|
51034
52001
|
}
|
|
51035
52002
|
function renderComponent(Component, targetElement, options) {
|