idmission-web-sdk 2.3.67 → 2.3.69

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.3.67';
214
+ var webSdkVersion = '2.3.69';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9533,11 +9533,18 @@
9533
9533
  return listeners["delete"](listener);
9534
9534
  };
9535
9535
  };
9536
+ var destroy = function destroy() {
9537
+ if ((undefined ? undefined.MODE : void 0) !== "production") {
9538
+ console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");
9539
+ }
9540
+ listeners.clear();
9541
+ };
9536
9542
  var api = {
9537
9543
  setState: setState,
9538
9544
  getState: getState,
9539
9545
  getInitialState: getInitialState,
9540
- subscribe: subscribe
9546
+ subscribe: subscribe,
9547
+ destroy: destroy
9541
9548
  };
9542
9549
  var initialState = state = createState(setState, getState, api);
9543
9550
  return api;
@@ -9546,25 +9553,213 @@
9546
9553
  return createState ? createStoreImpl(createState) : createStoreImpl;
9547
9554
  };
9548
9555
 
9556
+ var withSelector = {exports: {}};
9557
+
9558
+ var shim = {exports: {}};
9559
+
9560
+ var useSyncExternalStoreShim_development = {};
9561
+
9562
+ /**
9563
+ * @license React
9564
+ * use-sync-external-store-shim.development.js
9565
+ *
9566
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9567
+ *
9568
+ * This source code is licensed under the MIT license found in the
9569
+ * LICENSE file in the root directory of this source tree.
9570
+ */
9571
+ var hasRequiredUseSyncExternalStoreShim_development;
9572
+ function requireUseSyncExternalStoreShim_development() {
9573
+ if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
9574
+ hasRequiredUseSyncExternalStoreShim_development = 1;
9575
+ (function () {
9576
+ function is(x, y) {
9577
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
9578
+ }
9579
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
9580
+ didWarnOld18Alpha || void 0 === React$1.startTransition || (didWarnOld18Alpha = !0, console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
9581
+ var value = getSnapshot();
9582
+ if (!didWarnUncachedGetSnapshot) {
9583
+ var cachedValue = getSnapshot();
9584
+ objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
9585
+ }
9586
+ cachedValue = useState({
9587
+ inst: {
9588
+ value: value,
9589
+ getSnapshot: getSnapshot
9590
+ }
9591
+ });
9592
+ var inst = cachedValue[0].inst,
9593
+ forceUpdate = cachedValue[1];
9594
+ useLayoutEffect(function () {
9595
+ inst.value = value;
9596
+ inst.getSnapshot = getSnapshot;
9597
+ checkIfSnapshotChanged(inst) && forceUpdate({
9598
+ inst: inst
9599
+ });
9600
+ }, [subscribe, value, getSnapshot]);
9601
+ useEffect(function () {
9602
+ checkIfSnapshotChanged(inst) && forceUpdate({
9603
+ inst: inst
9604
+ });
9605
+ return subscribe(function () {
9606
+ checkIfSnapshotChanged(inst) && forceUpdate({
9607
+ inst: inst
9608
+ });
9609
+ });
9610
+ }, [subscribe]);
9611
+ useDebugValue(value);
9612
+ return value;
9613
+ }
9614
+ function checkIfSnapshotChanged(inst) {
9615
+ var latestGetSnapshot = inst.getSnapshot;
9616
+ inst = inst.value;
9617
+ try {
9618
+ var nextValue = latestGetSnapshot();
9619
+ return !objectIs(inst, nextValue);
9620
+ } catch (error) {
9621
+ return !0;
9622
+ }
9623
+ }
9624
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
9625
+ return getSnapshot();
9626
+ }
9627
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
9628
+ var React$1 = React,
9629
+ objectIs = "function" === typeof Object.is ? Object.is : is,
9630
+ useState = React$1.useState,
9631
+ useEffect = React$1.useEffect,
9632
+ useLayoutEffect = React$1.useLayoutEffect,
9633
+ useDebugValue = React$1.useDebugValue,
9634
+ didWarnOld18Alpha = !1,
9635
+ didWarnUncachedGetSnapshot = !1,
9636
+ shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
9637
+ useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
9638
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
9639
+ })();
9640
+ return useSyncExternalStoreShim_development;
9641
+ }
9642
+
9643
+ var hasRequiredShim;
9644
+ function requireShim() {
9645
+ if (hasRequiredShim) return shim.exports;
9646
+ hasRequiredShim = 1;
9647
+ {
9648
+ shim.exports = requireUseSyncExternalStoreShim_development();
9649
+ }
9650
+ return shim.exports;
9651
+ }
9652
+
9653
+ var withSelector_development = {};
9654
+
9655
+ /**
9656
+ * @license React
9657
+ * use-sync-external-store-shim/with-selector.development.js
9658
+ *
9659
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9660
+ *
9661
+ * This source code is licensed under the MIT license found in the
9662
+ * LICENSE file in the root directory of this source tree.
9663
+ */
9664
+ var hasRequiredWithSelector_development;
9665
+ function requireWithSelector_development() {
9666
+ if (hasRequiredWithSelector_development) return withSelector_development;
9667
+ hasRequiredWithSelector_development = 1;
9668
+ (function () {
9669
+ function is(x, y) {
9670
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
9671
+ }
9672
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
9673
+ var React$1 = React,
9674
+ shim = requireShim(),
9675
+ objectIs = "function" === typeof Object.is ? Object.is : is,
9676
+ useSyncExternalStore = shim.useSyncExternalStore,
9677
+ useRef = React$1.useRef,
9678
+ useEffect = React$1.useEffect,
9679
+ useMemo = React$1.useMemo,
9680
+ useDebugValue = React$1.useDebugValue;
9681
+ withSelector_development.useSyncExternalStoreWithSelector = function (subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
9682
+ var instRef = useRef(null);
9683
+ if (null === instRef.current) {
9684
+ var inst = {
9685
+ hasValue: !1,
9686
+ value: null
9687
+ };
9688
+ instRef.current = inst;
9689
+ } else inst = instRef.current;
9690
+ instRef = useMemo(function () {
9691
+ function memoizedSelector(nextSnapshot) {
9692
+ if (!hasMemo) {
9693
+ hasMemo = !0;
9694
+ memoizedSnapshot = nextSnapshot;
9695
+ nextSnapshot = selector(nextSnapshot);
9696
+ if (void 0 !== isEqual && inst.hasValue) {
9697
+ var currentSelection = inst.value;
9698
+ if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
9699
+ }
9700
+ return memoizedSelection = nextSnapshot;
9701
+ }
9702
+ currentSelection = memoizedSelection;
9703
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
9704
+ var nextSelection = selector(nextSnapshot);
9705
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
9706
+ memoizedSnapshot = nextSnapshot;
9707
+ return memoizedSelection = nextSelection;
9708
+ }
9709
+ var hasMemo = !1,
9710
+ memoizedSnapshot,
9711
+ memoizedSelection,
9712
+ maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
9713
+ return [function () {
9714
+ return memoizedSelector(getSnapshot());
9715
+ }, null === maybeGetServerSnapshot ? void 0 : function () {
9716
+ return memoizedSelector(maybeGetServerSnapshot());
9717
+ }];
9718
+ }, [getSnapshot, getServerSnapshot, selector, isEqual]);
9719
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
9720
+ useEffect(function () {
9721
+ inst.hasValue = !0;
9722
+ inst.value = value;
9723
+ }, [value]);
9724
+ useDebugValue(value);
9725
+ return value;
9726
+ };
9727
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
9728
+ })();
9729
+ return withSelector_development;
9730
+ }
9731
+
9732
+ {
9733
+ withSelector.exports = requireWithSelector_development();
9734
+ }
9735
+ var withSelectorExports = withSelector.exports;
9736
+ var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
9737
+
9738
+ var useDebugValue = React.useDebugValue;
9739
+ var useSyncExternalStoreWithSelector = useSyncExternalStoreExports.useSyncExternalStoreWithSelector;
9740
+ var didWarnAboutEqualityFn = false;
9549
9741
  var identity = function identity(arg) {
9550
9742
  return arg;
9551
9743
  };
9552
- function useStore(api, selector) {
9744
+ function useStore(api, selector, equalityFn) {
9553
9745
  if (selector === void 0) {
9554
9746
  selector = identity;
9555
9747
  }
9556
- var slice = React.useSyncExternalStore(api.subscribe, function () {
9557
- return selector(api.getState());
9558
- }, function () {
9559
- return selector(api.getInitialState());
9560
- });
9561
- React.useDebugValue(slice);
9748
+ if ((undefined ? undefined.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
9749
+ console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937");
9750
+ didWarnAboutEqualityFn = true;
9751
+ }
9752
+ var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getInitialState, selector, equalityFn);
9753
+ useDebugValue(slice);
9562
9754
  return slice;
9563
9755
  }
9564
9756
  var createImpl = function createImpl(createState) {
9565
- var api = createStore(createState);
9566
- var useBoundStore = function useBoundStore(selector) {
9567
- return useStore(api, selector);
9757
+ if ((undefined ? undefined.MODE : void 0) !== "production" && typeof createState !== "function") {
9758
+ console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
9759
+ }
9760
+ var api = typeof createState === "function" ? createStore(createState) : createState;
9761
+ var useBoundStore = function useBoundStore(selector, equalityFn) {
9762
+ return useStore(api, selector, equalityFn);
9568
9763
  };
9569
9764
  Object.assign(useBoundStore, api);
9570
9765
  return useBoundStore;
@@ -13277,7 +13472,7 @@
13277
13472
  'Document is not centered': 'Документ не отцентрирован',
13278
13473
  'Document too close, please back up': 'Документ находится слишком близко, отодвиньтесь назад',
13279
13474
  'Please hold your ID document steady': 'Держите удостоверение личности ровно',
13280
- 'Document out of focus try improving the lighting': 'Документ не в фокусе, попробуйте улучшить освещение',
13475
+ 'Document out of focus - try improving the lighting': 'Документ не в фокусе, попробуйте улучшить освещение',
13281
13476
  'ID card front detected - please flip your ID card': 'Обнаружена лицевая сторона удостоверения личности, переверните удостоверение личности',
13282
13477
  'ID card back detected - please flip your ID card': 'Обнаружена обратная сторона удостоверения личности, переверните удостоверение личности',
13283
13478
  'ID card detected, please scan a passport instead': 'Обнаружено удостоверение личности, отсканируйте вместо него паспорт',
@@ -14773,8 +14968,11 @@
14773
14968
  var extensionConnector;
14774
14969
  try {
14775
14970
  extensionConnector = (enabled != null ? enabled : (undefined ? undefined.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
14776
- } catch (e) {}
14971
+ } catch (_e) {}
14777
14972
  if (!extensionConnector) {
14973
+ if ((undefined ? undefined.MODE : void 0) !== "production" && enabled) {
14974
+ console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension");
14975
+ }
14778
14976
  return fn(set, get, api);
14779
14977
  }
14780
14978
  var _extractConnectionInf = extractConnectionInformation(store, extensionConnector, options),
@@ -14845,7 +15043,7 @@
14845
15043
  return;
14846
15044
  }
14847
15045
  if (Object.keys(action.state).length !== 1) {
14848
- console.error("\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
15046
+ console.error("\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
14849
15047
  }
14850
15048
  var stateFromDevtools = action.state[store];
14851
15049
  if (stateFromDevtools === void 0 || stateFromDevtools === null) {
@@ -14933,71 +15131,50 @@
14933
15131
  function _createForOfIteratorHelperLoose(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)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, 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."); }
14934
15132
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(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, a) : void 0; } }
14935
15133
  function _arrayLikeToArray(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; }
14936
- var isIterable = function isIterable(obj) {
14937
- return Symbol.iterator in obj;
14938
- };
14939
- var hasIterableEntries = function hasIterableEntries(value) {
14940
- return (
14941
- // HACK: avoid checking entries type
14942
- "entries" in value
14943
- );
14944
- };
14945
- var compareEntries = function compareEntries(valueA, valueB) {
14946
- var mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());
14947
- var mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());
14948
- if (mapA.size !== mapB.size) {
15134
+ function shallow(objA, objB) {
15135
+ if (Object.is(objA, objB)) {
15136
+ return true;
15137
+ }
15138
+ if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
14949
15139
  return false;
14950
15140
  }
14951
- for (var _iterator = _createForOfIteratorHelperLoose(mapA), _step; !(_step = _iterator()).done;) {
14952
- var _step$value = _step.value,
14953
- key = _step$value[0],
14954
- value = _step$value[1];
14955
- if (!Object.is(value, mapB.get(key))) {
14956
- return false;
15141
+ if (objA instanceof Map && objB instanceof Map) {
15142
+ if (objA.size !== objB.size) return false;
15143
+ for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
15144
+ var _step$value = _step.value,
15145
+ key = _step$value[0],
15146
+ value = _step$value[1];
15147
+ if (!Object.is(value, objB.get(key))) {
15148
+ return false;
15149
+ }
14957
15150
  }
15151
+ return true;
14958
15152
  }
14959
- return true;
14960
- };
14961
- var compareIterables = function compareIterables(valueA, valueB) {
14962
- var iteratorA = valueA[Symbol.iterator]();
14963
- var iteratorB = valueB[Symbol.iterator]();
14964
- var nextA = iteratorA.next();
14965
- var nextB = iteratorB.next();
14966
- while (!nextA.done && !nextB.done) {
14967
- if (!Object.is(nextA.value, nextB.value)) {
14968
- return false;
15153
+ if (objA instanceof Set && objB instanceof Set) {
15154
+ if (objA.size !== objB.size) return false;
15155
+ for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
15156
+ var _value = _step2.value;
15157
+ if (!objB.has(_value)) {
15158
+ return false;
15159
+ }
14969
15160
  }
14970
- nextA = iteratorA.next();
14971
- nextB = iteratorB.next();
14972
- }
14973
- return !!nextA.done && !!nextB.done;
14974
- };
14975
- function shallow(valueA, valueB) {
14976
- if (Object.is(valueA, valueB)) {
14977
15161
  return true;
14978
15162
  }
14979
- if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) {
15163
+ var keysA = Object.keys(objA);
15164
+ if (keysA.length !== Object.keys(objB).length) {
14980
15165
  return false;
14981
15166
  }
14982
- if (!isIterable(valueA) || !isIterable(valueB)) {
14983
- return compareEntries({
14984
- entries: function entries() {
14985
- return Object.entries(valueA);
14986
- }
14987
- }, {
14988
- entries: function entries() {
14989
- return Object.entries(valueB);
14990
- }
14991
- });
14992
- }
14993
- if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {
14994
- return compareEntries(valueA, valueB);
15167
+ for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
15168
+ var keyA = _keysA[_i];
15169
+ if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
15170
+ return false;
15171
+ }
14995
15172
  }
14996
- return compareIterables(valueA, valueB);
15173
+ return true;
14997
15174
  }
14998
-
15175
+ var useRef = React.useRef;
14999
15176
  function useShallow(selector) {
15000
- var prev = React.useRef();
15177
+ var prev = useRef();
15001
15178
  return function (state) {
15002
15179
  var next = selector(state);
15003
15180
  return shallow(prev.current, next) ? prev.current : prev.current = next;
@@ -15907,7 +16084,7 @@
15907
16084
  guidanceSatisfiedText: "".concat(documentTypeDisplayNames[state.detectedDocumentType], " detected, hold still..."),
15908
16085
  guidancePleaseFlipText: 'ID card front detected - please flip your ID card',
15909
16086
  guidanceBackDetectedFirstText: 'ID card back detected - please flip your ID card',
15910
- guidanceTooBlurryText: 'Document out of focus try improving the lighting',
16087
+ guidanceTooBlurryText: 'Document out of focus - try improving the lighting',
15911
16088
  guidanceNotCenteredText: 'Document is not centered',
15912
16089
  guidanceTooCloseText: 'Document too close, please back up',
15913
16090
  guidanceNotDetectedText: 'Document not detected',