idmission-web-sdk 2.6.3-changeset-release-develop-52641d0 → 2.6.3-changeset-release-develop-a0d6141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +70 -9
- package/dist/props.json +5 -5
- package/dist/sdk2.cjs.development.js +194 -45
- 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 +194 -45
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +194 -45
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -1443,6 +1443,15 @@ function encodeProgressBatch(batch) {
|
|
|
1443
1443
|
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."); }
|
|
1444
1444
|
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; } }
|
|
1445
1445
|
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; }
|
|
1446
|
+
/** Visible time without progress in a capture phase that arms a stream. */
|
|
1447
|
+
var stallMs = 20000;
|
|
1448
|
+
var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
|
|
1449
|
+
/**
|
|
1450
|
+
* Milestones that show the person is getting somewhere. Detection,
|
|
1451
|
+
* camera/model readiness, guidance, upload and validation deliberately don't
|
|
1452
|
+
* count: the document detector fires readily, and uploads aren't captures.
|
|
1453
|
+
*/
|
|
1454
|
+
var progressMilestones = new Set(["document-captured", "selfie-captured", "challenge-completed", "capture-completed", "capture-skipped", "recording-started", "first-recording-chunk", "drawing-started"]);
|
|
1446
1455
|
var taskOpeners = new WeakMap();
|
|
1447
1456
|
var inertObserver = {
|
|
1448
1457
|
observe: function observe() {},
|
|
@@ -1511,6 +1520,7 @@ function createSessionActor(options, deps) {
|
|
|
1511
1520
|
if (delay === void 0) {
|
|
1512
1521
|
delay = 0;
|
|
1513
1522
|
}
|
|
1523
|
+
if (!stream.armed) return;
|
|
1514
1524
|
var report = snapshotAt(stream.state, deps.now(), ++sequence, reason);
|
|
1515
1525
|
if (report.attemptStatus !== "active") {
|
|
1516
1526
|
var existing = terminal.findIndex(function (item) {
|
|
@@ -1642,10 +1652,16 @@ function createSessionActor(options, deps) {
|
|
|
1642
1652
|
}
|
|
1643
1653
|
return result.batch;
|
|
1644
1654
|
}
|
|
1645
|
-
function authorizedReports(queued, deadline) {
|
|
1655
|
+
function authorizedReports(queued, deadline, admits) {
|
|
1656
|
+
if (admits === void 0) {
|
|
1657
|
+
admits = function admits(context) {
|
|
1658
|
+
var _contexts$get;
|
|
1659
|
+
return ((_contexts$get = contexts.get(context)) == null ? void 0 : _contexts$get.kind) === "enabled";
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1646
1662
|
var ready = queued.filter(function (report) {
|
|
1647
|
-
var
|
|
1648
|
-
return (
|
|
1663
|
+
var _due$get2;
|
|
1664
|
+
return admits(report.context) && ((_due$get2 = due.get(report.sequence)) != null ? _due$get2 : 0) <= deadline;
|
|
1649
1665
|
});
|
|
1650
1666
|
return ready.filter(function (report) {
|
|
1651
1667
|
var _ready$;
|
|
@@ -1702,7 +1718,7 @@ function createSessionActor(options, deps) {
|
|
|
1702
1718
|
}
|
|
1703
1719
|
function _pump() {
|
|
1704
1720
|
_pump = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
1705
|
-
var queued, authorizing, sending, unresolved, _result, outgoing, result, _iterator11, _step11, report, _iterator12, _step12, _report, _iterator13, _step13, _report2;
|
|
1721
|
+
var queued, authorizing, sending, unresolved, _contexts$get8, _result, outgoing, result, _iterator11, _step11, report, _iterator12, _step12, _report, _contexts$get9, _iterator13, _step13, _report2;
|
|
1706
1722
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
1707
1723
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1708
1724
|
case 0:
|
|
@@ -1728,15 +1744,15 @@ function createSessionActor(options, deps) {
|
|
|
1728
1744
|
sending = null;
|
|
1729
1745
|
_context2.prev = 3;
|
|
1730
1746
|
if (frozen) {
|
|
1731
|
-
_context2.next =
|
|
1747
|
+
_context2.next = 11;
|
|
1732
1748
|
break;
|
|
1733
1749
|
}
|
|
1734
1750
|
unresolved = queued.find(function (report) {
|
|
1735
|
-
var _contexts$
|
|
1736
|
-
return !contexts.has(report.context) || ((_contexts$
|
|
1751
|
+
var _contexts$get7;
|
|
1752
|
+
return !contexts.has(report.context) || ((_contexts$get7 = contexts.get(report.context)) == null ? void 0 : _contexts$get7.kind) === "temporary";
|
|
1737
1753
|
});
|
|
1738
1754
|
if (!unresolved) {
|
|
1739
|
-
_context2.next =
|
|
1755
|
+
_context2.next = 9;
|
|
1740
1756
|
break;
|
|
1741
1757
|
}
|
|
1742
1758
|
authorizing = unresolved.context;
|
|
@@ -1759,44 +1775,50 @@ function createSessionActor(options, deps) {
|
|
|
1759
1775
|
stop();
|
|
1760
1776
|
return _context2.abrupt("return");
|
|
1761
1777
|
case 6:
|
|
1762
|
-
if (!(
|
|
1778
|
+
if (!(((_contexts$get8 = contexts.get(unresolved.context)) == null ? void 0 : _contexts$get8.kind) === "disabled")) {
|
|
1763
1779
|
_context2.next = 7;
|
|
1764
1780
|
break;
|
|
1765
1781
|
}
|
|
1782
|
+
return _context2.abrupt("return");
|
|
1783
|
+
case 7:
|
|
1784
|
+
if (!(_result.kind === "temporary")) {
|
|
1785
|
+
_context2.next = 8;
|
|
1786
|
+
break;
|
|
1787
|
+
}
|
|
1766
1788
|
backoff(_result);
|
|
1767
1789
|
failedEligibility(unresolved.context);
|
|
1768
1790
|
return _context2.abrupt("return");
|
|
1769
|
-
case
|
|
1791
|
+
case 8:
|
|
1770
1792
|
eligibilityRetries["delete"](unresolved.context);
|
|
1771
1793
|
contexts.set(unresolved.context, _result);
|
|
1772
1794
|
if (_result.kind === "disabled") disable(unresolved.context);
|
|
1773
1795
|
failureStreak = 0;
|
|
1774
1796
|
return _context2.abrupt("return");
|
|
1775
|
-
case
|
|
1797
|
+
case 9:
|
|
1776
1798
|
frozen = batch(authorizedReports(queued, deps.now()));
|
|
1777
1799
|
retries = 0;
|
|
1778
1800
|
if (frozen) {
|
|
1779
|
-
_context2.next =
|
|
1801
|
+
_context2.next = 10;
|
|
1780
1802
|
break;
|
|
1781
1803
|
}
|
|
1782
1804
|
return _context2.abrupt("return");
|
|
1783
|
-
case 9:
|
|
1784
|
-
removeReports(frozen.reports);
|
|
1785
1805
|
case 10:
|
|
1806
|
+
removeReports(frozen.reports);
|
|
1807
|
+
case 11:
|
|
1786
1808
|
outgoing = frozen;
|
|
1787
1809
|
sending = outgoing;
|
|
1788
|
-
_context2.next =
|
|
1810
|
+
_context2.next = 12;
|
|
1789
1811
|
return request(function (signal) {
|
|
1790
1812
|
return deps.transport.send(outgoing, signal);
|
|
1791
1813
|
});
|
|
1792
|
-
case
|
|
1814
|
+
case 12:
|
|
1793
1815
|
result = _context2.sent;
|
|
1794
1816
|
if (!(disposed || frozen !== sending)) {
|
|
1795
|
-
_context2.next =
|
|
1817
|
+
_context2.next = 13;
|
|
1796
1818
|
break;
|
|
1797
1819
|
}
|
|
1798
1820
|
return _context2.abrupt("return");
|
|
1799
|
-
case
|
|
1821
|
+
case 13:
|
|
1800
1822
|
if (result.kind === "unsupported") {
|
|
1801
1823
|
stop();
|
|
1802
1824
|
} else if (result.kind === "committed") {
|
|
@@ -1820,17 +1842,23 @@ function createSessionActor(options, deps) {
|
|
|
1820
1842
|
frozen = null;
|
|
1821
1843
|
}
|
|
1822
1844
|
}
|
|
1823
|
-
_context2.next =
|
|
1845
|
+
_context2.next = 17;
|
|
1824
1846
|
break;
|
|
1825
|
-
case
|
|
1826
|
-
_context2.prev =
|
|
1847
|
+
case 14:
|
|
1848
|
+
_context2.prev = 14;
|
|
1827
1849
|
_context2["catch"](3);
|
|
1828
1850
|
if (!(disposed || sending && frozen !== sending)) {
|
|
1829
|
-
_context2.next =
|
|
1851
|
+
_context2.next = 15;
|
|
1830
1852
|
break;
|
|
1831
1853
|
}
|
|
1832
1854
|
return _context2.abrupt("return");
|
|
1833
|
-
case
|
|
1855
|
+
case 15:
|
|
1856
|
+
if (!(authorizing && ((_contexts$get9 = contexts.get(authorizing)) == null ? void 0 : _contexts$get9.kind) === "disabled")) {
|
|
1857
|
+
_context2.next = 16;
|
|
1858
|
+
break;
|
|
1859
|
+
}
|
|
1860
|
+
return _context2.abrupt("return");
|
|
1861
|
+
case 16:
|
|
1834
1862
|
backoff({});
|
|
1835
1863
|
if (authorizing) failedEligibility(authorizing);
|
|
1836
1864
|
if (frozen && ++retries > 3) {
|
|
@@ -1841,23 +1869,30 @@ function createSessionActor(options, deps) {
|
|
|
1841
1869
|
if (emergency === frozen) emergency = null;
|
|
1842
1870
|
frozen = null;
|
|
1843
1871
|
}
|
|
1844
|
-
case
|
|
1845
|
-
_context2.prev =
|
|
1872
|
+
case 17:
|
|
1873
|
+
_context2.prev = 17;
|
|
1846
1874
|
busy = false;
|
|
1847
1875
|
refreshReadyAt();
|
|
1848
1876
|
schedule();
|
|
1849
|
-
return _context2.finish(
|
|
1850
|
-
case
|
|
1877
|
+
return _context2.finish(17);
|
|
1878
|
+
case 18:
|
|
1851
1879
|
case "end":
|
|
1852
1880
|
return _context2.stop();
|
|
1853
1881
|
}
|
|
1854
|
-
}, _callee2, null, [[3,
|
|
1882
|
+
}, _callee2, null, [[3, 14, 17, 18]]);
|
|
1855
1883
|
}));
|
|
1856
1884
|
return _pump.apply(this, arguments);
|
|
1857
1885
|
}
|
|
1858
1886
|
function emergencyFlush() {
|
|
1859
1887
|
if (emergency || disposed || deps.now() < backoffUntil) return;
|
|
1860
|
-
|
|
1888
|
+
// A stream can arm for the first time as the page hides or the session
|
|
1889
|
+
// ends, before any eligibility round trip. Portal authorizes and binds
|
|
1890
|
+
// each report inline, so the last-chance batch includes unresolved
|
|
1891
|
+
// contexts too; only disabled ones stay out.
|
|
1892
|
+
var reports = authorizedReports([].concat(terminal, _toConsumableArray(pending.values())), Infinity, function (context) {
|
|
1893
|
+
var _contexts$get2;
|
|
1894
|
+
return ((_contexts$get2 = contexts.get(context)) == null ? void 0 : _contexts$get2.kind) !== "disabled";
|
|
1895
|
+
});
|
|
1861
1896
|
if (!reports.length) return;
|
|
1862
1897
|
var sending = batch(reports);
|
|
1863
1898
|
if (!sending) return;
|
|
@@ -1868,13 +1903,18 @@ function createSessionActor(options, deps) {
|
|
|
1868
1903
|
removeReports(sending.reports);
|
|
1869
1904
|
if (result.confirmation) void result.confirmation.then(function (outcome) {
|
|
1870
1905
|
guard$2(function () {
|
|
1871
|
-
if (disposed
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
})) return;
|
|
1906
|
+
if (disposed) return;
|
|
1907
|
+
// Missing routes stop the root even if a context was denied
|
|
1908
|
+
// while this beacon was unconfirmed.
|
|
1875
1909
|
if (outcome.kind === "unsupported") {
|
|
1876
1910
|
stop();
|
|
1877
|
-
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
if (sending.reports.some(function (report) {
|
|
1914
|
+
var _contexts$get3;
|
|
1915
|
+
return ((_contexts$get3 = contexts.get(report.context)) == null ? void 0 : _contexts$get3.kind) === "disabled";
|
|
1916
|
+
})) return;
|
|
1917
|
+
if (outcome.kind === "committed") {
|
|
1878
1918
|
if (emergency === sending) emergency = null;
|
|
1879
1919
|
} else if (outcome.kind === "permanent") {
|
|
1880
1920
|
for (var _iterator8 = _createForOfIteratorHelperLoose$t(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
@@ -1887,8 +1927,8 @@ function createSessionActor(options, deps) {
|
|
|
1887
1927
|
}, function () {
|
|
1888
1928
|
return guard$2(function () {
|
|
1889
1929
|
if (disposed || sending.reports.some(function (report) {
|
|
1890
|
-
var _contexts$
|
|
1891
|
-
return ((_contexts$
|
|
1930
|
+
var _contexts$get4;
|
|
1931
|
+
return ((_contexts$get4 = contexts.get(report.context)) == null ? void 0 : _contexts$get4.kind) === "disabled";
|
|
1892
1932
|
})) return;
|
|
1893
1933
|
backoff({});
|
|
1894
1934
|
schedule();
|
|
@@ -1907,6 +1947,43 @@ function createSessionActor(options, deps) {
|
|
|
1907
1947
|
}
|
|
1908
1948
|
return report;
|
|
1909
1949
|
}
|
|
1950
|
+
/** Visible milliseconds until an unarmed stream stalls, or null outside capture. */
|
|
1951
|
+
function untilStall(stream, report) {
|
|
1952
|
+
if (report.lane !== "sdk" || !report.current) return null;
|
|
1953
|
+
if (!capturePhases.has(report.current.phase)) return null;
|
|
1954
|
+
var stalled = Math.min(report.current.phaseRunVisibleMs, report.visibleMs - stream.progressVisibleMs);
|
|
1955
|
+
return stallMs - stalled;
|
|
1956
|
+
}
|
|
1957
|
+
function arm(stream, report) {
|
|
1958
|
+
var _report$current$phase, _report$current, _report$current$phase2, _report$current2;
|
|
1959
|
+
stream.armed = true;
|
|
1960
|
+
var run = (_report$current$phase = (_report$current = report.current) == null ? void 0 : _report$current.phaseRunVisibleMs) != null ? _report$current$phase : 0;
|
|
1961
|
+
stream.checkpointPhase = (_report$current$phase2 = (_report$current2 = report.current) == null ? void 0 : _report$current2.phaseEntryOrdinal) != null ? _report$current$phase2 : -1;
|
|
1962
|
+
stream.checkpoint = nextCheckpointAfter(run);
|
|
1963
|
+
stream.lastValuableVisibleMs = report.visibleMs;
|
|
1964
|
+
enqueue(stream, "checkpoint");
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Arms a stream whose stall already elapsed. Runs before anything that could
|
|
1968
|
+
* erase it (progress, leaving the phase, retry, close, hiding), because a
|
|
1969
|
+
* busy main thread can delay the tick that would otherwise arm it.
|
|
1970
|
+
*/
|
|
1971
|
+
function armIfStalled(stream) {
|
|
1972
|
+
if (stream.armed || stream.disposed) return;
|
|
1973
|
+
var report = snapshotAt(stream.state, deps.now(), sequence, "checkpoint");
|
|
1974
|
+
if (!report.current || report.current.ended) return;
|
|
1975
|
+
var remaining = untilStall(stream, report);
|
|
1976
|
+
if (remaining !== null && remaining <= 0) arm(stream, report);
|
|
1977
|
+
}
|
|
1978
|
+
/** Whether a progress milestone count rose, including recorder-derived ones. */
|
|
1979
|
+
function madeProgress(previous, next) {
|
|
1980
|
+
var before = previous.report.milestones;
|
|
1981
|
+
var after = next.report.milestones;
|
|
1982
|
+
return _toConsumableArray(progressMilestones).some(function (code) {
|
|
1983
|
+
var _after$code, _before$code;
|
|
1984
|
+
return ((_after$code = after[code]) != null ? _after$code : 0) > ((_before$code = before[code]) != null ? _before$code : 0);
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1910
1987
|
function tick() {
|
|
1911
1988
|
if (disposed || visibility === "hidden") return;
|
|
1912
1989
|
for (var _iterator9 = _createForOfIteratorHelperLoose$t(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
@@ -1917,6 +1994,10 @@ function createSessionActor(options, deps) {
|
|
|
1917
1994
|
close(stream, "disposed");
|
|
1918
1995
|
continue;
|
|
1919
1996
|
}
|
|
1997
|
+
if (!stream.armed) {
|
|
1998
|
+
armIfStalled(stream);
|
|
1999
|
+
continue;
|
|
2000
|
+
}
|
|
1920
2001
|
if (report.current.phaseRunVisibleMs >= stream.checkpoint) {
|
|
1921
2002
|
enqueue(stream, "checkpoint");
|
|
1922
2003
|
var next = nextCheckpointAfter(report.current.phaseRunVisibleMs);
|
|
@@ -1940,6 +2021,11 @@ function createSessionActor(options, deps) {
|
|
|
1940
2021
|
var stream = _step0.value;
|
|
1941
2022
|
var report = prepareDeadline(stream);
|
|
1942
2023
|
if (!(report != null && report.current)) continue;
|
|
2024
|
+
if (!stream.armed) {
|
|
2025
|
+
var remaining = untilStall(stream, report);
|
|
2026
|
+
if (remaining !== null) delay = Math.min(delay, Math.max(1, remaining));
|
|
2027
|
+
continue;
|
|
2028
|
+
}
|
|
1943
2029
|
delay = Math.min(delay, Math.max(1, stream.checkpoint - report.current.phaseRunVisibleMs));
|
|
1944
2030
|
if (report.lane === "sdk" && report.current.exposure.kind === "displayed") delay = Math.min(delay, Math.max(1, 15000 - report.current.guidanceRunVisibleMs, 20000 - (report.visibleMs - stream.lastValuableVisibleMs)));
|
|
1945
2031
|
}
|
|
@@ -1948,8 +2034,8 @@ function createSessionActor(options, deps) {
|
|
|
1948
2034
|
}, delay);
|
|
1949
2035
|
}
|
|
1950
2036
|
function open(lane, context) {
|
|
1951
|
-
var _contexts$
|
|
1952
|
-
if (disposed || ((_contexts$
|
|
2037
|
+
var _contexts$get5;
|
|
2038
|
+
if (disposed || ((_contexts$get5 = contexts.get(context)) == null ? void 0 : _contexts$get5.kind) === "disabled" || streams.size >= 8) return null;
|
|
1953
2039
|
var stream = {
|
|
1954
2040
|
state: createRecorder({
|
|
1955
2041
|
lane: lane,
|
|
@@ -1964,6 +2050,8 @@ function createSessionActor(options, deps) {
|
|
|
1964
2050
|
checkpoint: 20000,
|
|
1965
2051
|
checkpointPhase: -1,
|
|
1966
2052
|
lastValuableVisibleMs: -2e4,
|
|
2053
|
+
progressVisibleMs: 0,
|
|
2054
|
+
armed: deps.reporting === "always",
|
|
1967
2055
|
disposed: false
|
|
1968
2056
|
};
|
|
1969
2057
|
streams.add(stream);
|
|
@@ -1971,6 +2059,7 @@ function createSessionActor(options, deps) {
|
|
|
1971
2059
|
}
|
|
1972
2060
|
function close(stream, status) {
|
|
1973
2061
|
if (stream.disposed) return;
|
|
2062
|
+
armIfStalled(stream);
|
|
1974
2063
|
if (stream.state.report.attemptStatus === "active") {
|
|
1975
2064
|
stream.state = endAttempt(stream.state, status, deps.now());
|
|
1976
2065
|
enqueue(stream, status === "disposed" ? "dispose" : "completion");
|
|
@@ -2003,16 +2092,19 @@ function createSessionActor(options, deps) {
|
|
|
2003
2092
|
});
|
|
2004
2093
|
stream.checkpointPhase = -1;
|
|
2005
2094
|
stream.lastValuableVisibleMs = -2e4;
|
|
2095
|
+
stream.progressVisibleMs = 0;
|
|
2006
2096
|
}
|
|
2007
2097
|
function _observe(stream, observation) {
|
|
2008
2098
|
if (disposed || stream.disposed) return;
|
|
2099
|
+
armIfStalled(stream);
|
|
2009
2100
|
var previous = stream.state;
|
|
2010
2101
|
stream.state = reduceObservation(previous, observation, deps.now());
|
|
2102
|
+
if (madeProgress(previous, stream.state)) stream.progressVisibleMs = snapshotAt(stream.state, deps.now(), sequence, "milestone").visibleMs;
|
|
2011
2103
|
if (observation.kind === "phase") {
|
|
2012
2104
|
if (stream.state.phaseIndex !== previous.phaseIndex) enqueue(stream, "phase-change");
|
|
2013
2105
|
} else if (observation.kind === "milestone") enqueue(stream, observation.code === "operation-entered" ? "entry" : "milestone", observation.code === "operation-entered" ? 0 : 250);else if (observation.kind === "failure") enqueue(stream, "failure", 250);else if (["phase-completed", "flow-completed", "completed"].includes(observation.kind)) enqueue(stream, "completion");
|
|
2014
2106
|
var valuable = snapshotAt(stream.state, deps.now(), sequence, "valuable-state");
|
|
2015
|
-
if (valuable.lane === "sdk" && valuableStateDue(valuable, stream.lastValuableVisibleMs, stream.state.guidanceChanges)) {
|
|
2107
|
+
if (stream.armed && valuable.lane === "sdk" && valuableStateDue(valuable, stream.lastValuableVisibleMs, stream.state.guidanceChanges)) {
|
|
2016
2108
|
stream.lastValuableVisibleMs = valuable.visibleMs;
|
|
2017
2109
|
enqueue(stream, "valuable-state");
|
|
2018
2110
|
}
|
|
@@ -2025,6 +2117,7 @@ function createSessionActor(options, deps) {
|
|
|
2025
2117
|
for (var _iterator1 = _createForOfIteratorHelperLoose$t(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2026
2118
|
var stream = _step1.value;
|
|
2027
2119
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2120
|
+
armIfStalled(stream);
|
|
2028
2121
|
stream.state = reduceObservation(stream.state, {
|
|
2029
2122
|
kind: "visibility",
|
|
2030
2123
|
visibility: next
|
|
@@ -2038,8 +2131,8 @@ function createSessionActor(options, deps) {
|
|
|
2038
2131
|
return {
|
|
2039
2132
|
task: function task(context) {
|
|
2040
2133
|
try {
|
|
2041
|
-
var _contexts$
|
|
2042
|
-
if (disposed || !context || new TextEncoder().encode(context).length > 2048 || ((_contexts$
|
|
2134
|
+
var _contexts$get6;
|
|
2135
|
+
if (disposed || !context || new TextEncoder().encode(context).length > 2048 || ((_contexts$get6 = contexts.get(context)) == null ? void 0 : _contexts$get6.kind) === "disabled") return inertTask;
|
|
2043
2136
|
if (!contexts.has(context)) {
|
|
2044
2137
|
if (contexts.size >= 16) return inertTask;
|
|
2045
2138
|
contexts.set(context, {
|
|
@@ -48480,7 +48573,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48480
48573
|
});
|
|
48481
48574
|
}
|
|
48482
48575
|
|
|
48483
|
-
var webSdkVersion = '2.6.3-changeset-release-develop-
|
|
48576
|
+
var webSdkVersion = '2.6.3-changeset-release-develop-a0d6141';
|
|
48484
48577
|
|
|
48485
48578
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
48486
48579
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|
|
@@ -50993,6 +51086,59 @@ function isBag(value) {
|
|
|
50993
51086
|
var proto = Object.getPrototypeOf(value);
|
|
50994
51087
|
return proto === null || Object.getPrototypeOf(proto) === null;
|
|
50995
51088
|
}
|
|
51089
|
+
/**
|
|
51090
|
+
* Top-level style keys a flow forwards to its 3.0 view beyond the 2.x paths,
|
|
51091
|
+
* so the 2.x check below must not call them typos. `satisfies` keeps each list
|
|
51092
|
+
* in step with the type it mirrors.
|
|
51093
|
+
*/
|
|
51094
|
+
var FORWARDED_STYLE_KEYS = {
|
|
51095
|
+
DocumentCapture: {
|
|
51096
|
+
classNames: {
|
|
51097
|
+
cameraFeedWrapper: true,
|
|
51098
|
+
cameraFeed: true,
|
|
51099
|
+
previewImage: true,
|
|
51100
|
+
captureContainer: true,
|
|
51101
|
+
headingRow: true,
|
|
51102
|
+
heading: true,
|
|
51103
|
+
guideOverlay: true,
|
|
51104
|
+
footerRow: true,
|
|
51105
|
+
instructions: true,
|
|
51106
|
+
buttonsRow: true,
|
|
51107
|
+
retryCameraAccessBtn: true,
|
|
51108
|
+
retryCaptureBtn: true,
|
|
51109
|
+
uploadBtn: true,
|
|
51110
|
+
uploadProgressBtn: true,
|
|
51111
|
+
captureBtn: true,
|
|
51112
|
+
autoCaptureGuidance: true,
|
|
51113
|
+
manualCaptureHint: true,
|
|
51114
|
+
reviewContainer: true,
|
|
51115
|
+
reviewCard: true,
|
|
51116
|
+
reviewHeading: true
|
|
51117
|
+
},
|
|
51118
|
+
verbiage: {
|
|
51119
|
+
headingText: true,
|
|
51120
|
+
loadingBtnText: true,
|
|
51121
|
+
retryCameraAccessBtnText: true,
|
|
51122
|
+
exitBtnText: true,
|
|
51123
|
+
captureBtnText: true,
|
|
51124
|
+
capturingBtnText: true,
|
|
51125
|
+
retryCaptureBtnText: true,
|
|
51126
|
+
uploadBtnText: true,
|
|
51127
|
+
uploadingBtnText: true,
|
|
51128
|
+
retryUploadBtnText: true,
|
|
51129
|
+
successBtnText: true,
|
|
51130
|
+
autoCaptureNoDocumentText: true,
|
|
51131
|
+
autoCaptureTooCloseText: true,
|
|
51132
|
+
autoCaptureTooFarText: true,
|
|
51133
|
+
autoCaptureNotStableText: true,
|
|
51134
|
+
autoCaptureOutOfFocusText: true,
|
|
51135
|
+
autoCaptureHoldStillText: true,
|
|
51136
|
+
manualCaptureHintText: true,
|
|
51137
|
+
reviewHeadingText: true,
|
|
51138
|
+
reviewImageAltText: true
|
|
51139
|
+
}
|
|
51140
|
+
}
|
|
51141
|
+
};
|
|
50996
51142
|
/**
|
|
50997
51143
|
* Warns once per page load for each style-bag key the caller set that 2.x
|
|
50998
51144
|
* never had — a typo a type checker would have caught, which plain-JS
|
|
@@ -51002,22 +51148,25 @@ function isBag(value) {
|
|
|
51002
51148
|
* is reported too, since nothing reads it.
|
|
51003
51149
|
*/
|
|
51004
51150
|
function reportStyleKeys(flow, props) {
|
|
51151
|
+
var _a;
|
|
51005
51152
|
if (getLogLevel() < LogLevel.Warn) return;
|
|
51006
51153
|
var drops = STYLE_BAG_DROPS[flow] || {};
|
|
51007
51154
|
var _loop_1 = function _loop_1(bag) {
|
|
51008
51155
|
if (!hasOwn.call(STYLE_BAG_KEYS, bag)) return "continue";
|
|
51009
|
-
var
|
|
51010
|
-
flows =
|
|
51011
|
-
aliases =
|
|
51156
|
+
var _b = STYLE_BAG_KEYS[bag],
|
|
51157
|
+
flows = _b.flows,
|
|
51158
|
+
aliases = _b.aliases;
|
|
51012
51159
|
var bagValue = props[bag];
|
|
51013
51160
|
if (!hasOwn.call(flows, flow) || !isBag(bagValue)) return "continue";
|
|
51014
51161
|
var bagDrops = drops[bag] || {};
|
|
51162
|
+
var forwarded = ((_a = FORWARDED_STYLE_KEYS[flow]) === null || _a === void 0 ? void 0 : _a[bag]) || {};
|
|
51015
51163
|
var _walk = function walk(value, alias, prefix) {
|
|
51016
51164
|
var keys = aliases[alias];
|
|
51017
51165
|
for (var key in value) {
|
|
51018
51166
|
if (!hasOwn.call(value, key) || value[key] === undefined) continue;
|
|
51019
51167
|
var path = prefix + key;
|
|
51020
51168
|
if (!hasOwn.call(keys, key)) {
|
|
51169
|
+
if (prefix === '' && hasOwn.call(forwarded, key)) continue;
|
|
51021
51170
|
report(flow, bag + '.' + path, 'is not a 2.x `' + bag + '` key, so it has no effect.');
|
|
51022
51171
|
} else if (hasOwn.call(bagDrops, path)) {
|
|
51023
51172
|
report(flow, bag + '.' + path, 'has no effect in 3.0: ' + NO_EFFECT[bagDrops[path]]);
|