idmission-web-sdk 2.3.54 → 2.3.55

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.54';
214
+ var webSdkVersion = '2.3.55';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9477,11 +9477,18 @@
9477
9477
  return listeners["delete"](listener);
9478
9478
  };
9479
9479
  };
9480
+ var destroy = function destroy() {
9481
+ if ((undefined ? undefined.MODE : void 0) !== "production") {
9482
+ 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.");
9483
+ }
9484
+ listeners.clear();
9485
+ };
9480
9486
  var api = {
9481
9487
  setState: setState,
9482
9488
  getState: getState,
9483
9489
  getInitialState: getInitialState,
9484
- subscribe: subscribe
9490
+ subscribe: subscribe,
9491
+ destroy: destroy
9485
9492
  };
9486
9493
  var initialState = state = createState(setState, getState, api);
9487
9494
  return api;
@@ -9490,25 +9497,213 @@
9490
9497
  return createState ? createStoreImpl(createState) : createStoreImpl;
9491
9498
  };
9492
9499
 
9500
+ var withSelector = {exports: {}};
9501
+
9502
+ var shim = {exports: {}};
9503
+
9504
+ var useSyncExternalStoreShim_development = {};
9505
+
9506
+ /**
9507
+ * @license React
9508
+ * use-sync-external-store-shim.development.js
9509
+ *
9510
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9511
+ *
9512
+ * This source code is licensed under the MIT license found in the
9513
+ * LICENSE file in the root directory of this source tree.
9514
+ */
9515
+ var hasRequiredUseSyncExternalStoreShim_development;
9516
+ function requireUseSyncExternalStoreShim_development() {
9517
+ if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
9518
+ hasRequiredUseSyncExternalStoreShim_development = 1;
9519
+ (function () {
9520
+ function is(x, y) {
9521
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
9522
+ }
9523
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
9524
+ 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."));
9525
+ var value = getSnapshot();
9526
+ if (!didWarnUncachedGetSnapshot) {
9527
+ var cachedValue = getSnapshot();
9528
+ objectIs(value, cachedValue) || (console.error("The result of getSnapshot should be cached to avoid an infinite loop"), didWarnUncachedGetSnapshot = !0);
9529
+ }
9530
+ cachedValue = useState({
9531
+ inst: {
9532
+ value: value,
9533
+ getSnapshot: getSnapshot
9534
+ }
9535
+ });
9536
+ var inst = cachedValue[0].inst,
9537
+ forceUpdate = cachedValue[1];
9538
+ useLayoutEffect(function () {
9539
+ inst.value = value;
9540
+ inst.getSnapshot = getSnapshot;
9541
+ checkIfSnapshotChanged(inst) && forceUpdate({
9542
+ inst: inst
9543
+ });
9544
+ }, [subscribe, value, getSnapshot]);
9545
+ useEffect(function () {
9546
+ checkIfSnapshotChanged(inst) && forceUpdate({
9547
+ inst: inst
9548
+ });
9549
+ return subscribe(function () {
9550
+ checkIfSnapshotChanged(inst) && forceUpdate({
9551
+ inst: inst
9552
+ });
9553
+ });
9554
+ }, [subscribe]);
9555
+ useDebugValue(value);
9556
+ return value;
9557
+ }
9558
+ function checkIfSnapshotChanged(inst) {
9559
+ var latestGetSnapshot = inst.getSnapshot;
9560
+ inst = inst.value;
9561
+ try {
9562
+ var nextValue = latestGetSnapshot();
9563
+ return !objectIs(inst, nextValue);
9564
+ } catch (error) {
9565
+ return !0;
9566
+ }
9567
+ }
9568
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
9569
+ return getSnapshot();
9570
+ }
9571
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
9572
+ var React$1 = React,
9573
+ objectIs = "function" === typeof Object.is ? Object.is : is,
9574
+ useState = React$1.useState,
9575
+ useEffect = React$1.useEffect,
9576
+ useLayoutEffect = React$1.useLayoutEffect,
9577
+ useDebugValue = React$1.useDebugValue,
9578
+ didWarnOld18Alpha = !1,
9579
+ didWarnUncachedGetSnapshot = !1,
9580
+ shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
9581
+ useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React$1.useSyncExternalStore ? React$1.useSyncExternalStore : shim;
9582
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
9583
+ })();
9584
+ return useSyncExternalStoreShim_development;
9585
+ }
9586
+
9587
+ var hasRequiredShim;
9588
+ function requireShim() {
9589
+ if (hasRequiredShim) return shim.exports;
9590
+ hasRequiredShim = 1;
9591
+ {
9592
+ shim.exports = requireUseSyncExternalStoreShim_development();
9593
+ }
9594
+ return shim.exports;
9595
+ }
9596
+
9597
+ var withSelector_development = {};
9598
+
9599
+ /**
9600
+ * @license React
9601
+ * use-sync-external-store-shim/with-selector.development.js
9602
+ *
9603
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9604
+ *
9605
+ * This source code is licensed under the MIT license found in the
9606
+ * LICENSE file in the root directory of this source tree.
9607
+ */
9608
+ var hasRequiredWithSelector_development;
9609
+ function requireWithSelector_development() {
9610
+ if (hasRequiredWithSelector_development) return withSelector_development;
9611
+ hasRequiredWithSelector_development = 1;
9612
+ (function () {
9613
+ function is(x, y) {
9614
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
9615
+ }
9616
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
9617
+ var React$1 = React,
9618
+ shim = requireShim(),
9619
+ objectIs = "function" === typeof Object.is ? Object.is : is,
9620
+ useSyncExternalStore = shim.useSyncExternalStore,
9621
+ useRef = React$1.useRef,
9622
+ useEffect = React$1.useEffect,
9623
+ useMemo = React$1.useMemo,
9624
+ useDebugValue = React$1.useDebugValue;
9625
+ withSelector_development.useSyncExternalStoreWithSelector = function (subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
9626
+ var instRef = useRef(null);
9627
+ if (null === instRef.current) {
9628
+ var inst = {
9629
+ hasValue: !1,
9630
+ value: null
9631
+ };
9632
+ instRef.current = inst;
9633
+ } else inst = instRef.current;
9634
+ instRef = useMemo(function () {
9635
+ function memoizedSelector(nextSnapshot) {
9636
+ if (!hasMemo) {
9637
+ hasMemo = !0;
9638
+ memoizedSnapshot = nextSnapshot;
9639
+ nextSnapshot = selector(nextSnapshot);
9640
+ if (void 0 !== isEqual && inst.hasValue) {
9641
+ var currentSelection = inst.value;
9642
+ if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
9643
+ }
9644
+ return memoizedSelection = nextSnapshot;
9645
+ }
9646
+ currentSelection = memoizedSelection;
9647
+ if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
9648
+ var nextSelection = selector(nextSnapshot);
9649
+ if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
9650
+ memoizedSnapshot = nextSnapshot;
9651
+ return memoizedSelection = nextSelection;
9652
+ }
9653
+ var hasMemo = !1,
9654
+ memoizedSnapshot,
9655
+ memoizedSelection,
9656
+ maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
9657
+ return [function () {
9658
+ return memoizedSelector(getSnapshot());
9659
+ }, null === maybeGetServerSnapshot ? void 0 : function () {
9660
+ return memoizedSelector(maybeGetServerSnapshot());
9661
+ }];
9662
+ }, [getSnapshot, getServerSnapshot, selector, isEqual]);
9663
+ var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
9664
+ useEffect(function () {
9665
+ inst.hasValue = !0;
9666
+ inst.value = value;
9667
+ }, [value]);
9668
+ useDebugValue(value);
9669
+ return value;
9670
+ };
9671
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
9672
+ })();
9673
+ return withSelector_development;
9674
+ }
9675
+
9676
+ {
9677
+ withSelector.exports = requireWithSelector_development();
9678
+ }
9679
+ var withSelectorExports = withSelector.exports;
9680
+ var useSyncExternalStoreExports = /*@__PURE__*/getDefaultExportFromCjs(withSelectorExports);
9681
+
9682
+ var useDebugValue = React.useDebugValue;
9683
+ var useSyncExternalStoreWithSelector = useSyncExternalStoreExports.useSyncExternalStoreWithSelector;
9684
+ var didWarnAboutEqualityFn = false;
9493
9685
  var identity = function identity(arg) {
9494
9686
  return arg;
9495
9687
  };
9496
- function useStore(api, selector) {
9688
+ function useStore(api, selector, equalityFn) {
9497
9689
  if (selector === void 0) {
9498
9690
  selector = identity;
9499
9691
  }
9500
- var slice = React.useSyncExternalStore(api.subscribe, function () {
9501
- return selector(api.getState());
9502
- }, function () {
9503
- return selector(api.getInitialState());
9504
- });
9505
- React.useDebugValue(slice);
9692
+ if ((undefined ? undefined.MODE : void 0) !== "production" && equalityFn && !didWarnAboutEqualityFn) {
9693
+ 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");
9694
+ didWarnAboutEqualityFn = true;
9695
+ }
9696
+ var slice = useSyncExternalStoreWithSelector(api.subscribe, api.getState, api.getServerState || api.getInitialState, selector, equalityFn);
9697
+ useDebugValue(slice);
9506
9698
  return slice;
9507
9699
  }
9508
9700
  var createImpl = function createImpl(createState) {
9509
- var api = createStore(createState);
9510
- var useBoundStore = function useBoundStore(selector) {
9511
- return useStore(api, selector);
9701
+ if ((undefined ? undefined.MODE : void 0) !== "production" && typeof createState !== "function") {
9702
+ console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
9703
+ }
9704
+ var api = typeof createState === "function" ? createStore(createState) : createState;
9705
+ var useBoundStore = function useBoundStore(selector, equalityFn) {
9706
+ return useStore(api, selector, equalityFn);
9512
9707
  };
9513
9708
  Object.assign(useBoundStore, api);
9514
9709
  return useBoundStore;
@@ -14061,8 +14256,8 @@
14061
14256
  documentDetectionModelPath = _e === void 0 ? defaultDocumentDetectorModelPath : _e,
14062
14257
  _f = _a.documentDetectionModelScoreThreshold,
14063
14258
  documentDetectionModelScoreThreshold = _f === void 0 ? defaultDocumentDetectionScoreThreshold : _f,
14064
- _g = _a.documentDetectionModelLoadTimeoutMs,
14065
- documentDetectionModelLoadTimeoutMs = _g === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _g,
14259
+ _g = _a.modelLoadTimeoutMs,
14260
+ modelLoadTimeoutMs = _g === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _g,
14066
14261
  onDocumentDetectionModelError = _a.onDocumentDetectionModelError,
14067
14262
  _h = _a.shouldLoadModels,
14068
14263
  shouldLoadModelsProp = _h === void 0 ? true : _h;
@@ -14093,7 +14288,7 @@
14093
14288
  }, []);
14094
14289
  var _q = useLoadDocumentDetector({
14095
14290
  modelPath: documentDetectionModelPath,
14096
- modelLoadTimeoutMs: documentDetectionModelLoadTimeoutMs,
14291
+ modelLoadTimeoutMs: modelLoadTimeoutMs,
14097
14292
  scoreThreshold: documentDetectionModelScoreThreshold,
14098
14293
  onModelError: onDocumentDetectionModelError,
14099
14294
  videoRef: videoRef,
@@ -14708,8 +14903,11 @@
14708
14903
  var extensionConnector;
14709
14904
  try {
14710
14905
  extensionConnector = (enabled != null ? enabled : (undefined ? undefined.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
14711
- } catch (e) {}
14906
+ } catch (_e) {}
14712
14907
  if (!extensionConnector) {
14908
+ if ((undefined ? undefined.MODE : void 0) !== "production" && enabled) {
14909
+ console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension");
14910
+ }
14713
14911
  return fn(set, get, api);
14714
14912
  }
14715
14913
  var _extractConnectionInf = extractConnectionInformation(store, extensionConnector, options),
@@ -14780,7 +14978,7 @@
14780
14978
  return;
14781
14979
  }
14782
14980
  if (Object.keys(action.state).length !== 1) {
14783
- 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 ");
14981
+ 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 ");
14784
14982
  }
14785
14983
  var stateFromDevtools = action.state[store];
14786
14984
  if (stateFromDevtools === void 0 || stateFromDevtools === null) {
@@ -14868,71 +15066,50 @@
14868
15066
  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."); }
14869
15067
  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; } }
14870
15068
  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; }
14871
- var isIterable = function isIterable(obj) {
14872
- return Symbol.iterator in obj;
14873
- };
14874
- var hasIterableEntries = function hasIterableEntries(value) {
14875
- return (
14876
- // HACK: avoid checking entries type
14877
- "entries" in value
14878
- );
14879
- };
14880
- var compareEntries = function compareEntries(valueA, valueB) {
14881
- var mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());
14882
- var mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());
14883
- if (mapA.size !== mapB.size) {
15069
+ function shallow(objA, objB) {
15070
+ if (Object.is(objA, objB)) {
15071
+ return true;
15072
+ }
15073
+ if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
14884
15074
  return false;
14885
15075
  }
14886
- for (var _iterator = _createForOfIteratorHelperLoose(mapA), _step; !(_step = _iterator()).done;) {
14887
- var _step$value = _step.value,
14888
- key = _step$value[0],
14889
- value = _step$value[1];
14890
- if (!Object.is(value, mapB.get(key))) {
14891
- return false;
15076
+ if (objA instanceof Map && objB instanceof Map) {
15077
+ if (objA.size !== objB.size) return false;
15078
+ for (var _iterator = _createForOfIteratorHelperLoose(objA), _step; !(_step = _iterator()).done;) {
15079
+ var _step$value = _step.value,
15080
+ key = _step$value[0],
15081
+ value = _step$value[1];
15082
+ if (!Object.is(value, objB.get(key))) {
15083
+ return false;
15084
+ }
14892
15085
  }
15086
+ return true;
14893
15087
  }
14894
- return true;
14895
- };
14896
- var compareIterables = function compareIterables(valueA, valueB) {
14897
- var iteratorA = valueA[Symbol.iterator]();
14898
- var iteratorB = valueB[Symbol.iterator]();
14899
- var nextA = iteratorA.next();
14900
- var nextB = iteratorB.next();
14901
- while (!nextA.done && !nextB.done) {
14902
- if (!Object.is(nextA.value, nextB.value)) {
14903
- return false;
15088
+ if (objA instanceof Set && objB instanceof Set) {
15089
+ if (objA.size !== objB.size) return false;
15090
+ for (var _iterator2 = _createForOfIteratorHelperLoose(objA), _step2; !(_step2 = _iterator2()).done;) {
15091
+ var _value = _step2.value;
15092
+ if (!objB.has(_value)) {
15093
+ return false;
15094
+ }
14904
15095
  }
14905
- nextA = iteratorA.next();
14906
- nextB = iteratorB.next();
14907
- }
14908
- return !!nextA.done && !!nextB.done;
14909
- };
14910
- function shallow(valueA, valueB) {
14911
- if (Object.is(valueA, valueB)) {
14912
15096
  return true;
14913
15097
  }
14914
- if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) {
15098
+ var keysA = Object.keys(objA);
15099
+ if (keysA.length !== Object.keys(objB).length) {
14915
15100
  return false;
14916
15101
  }
14917
- if (!isIterable(valueA) || !isIterable(valueB)) {
14918
- return compareEntries({
14919
- entries: function entries() {
14920
- return Object.entries(valueA);
14921
- }
14922
- }, {
14923
- entries: function entries() {
14924
- return Object.entries(valueB);
14925
- }
14926
- });
14927
- }
14928
- if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {
14929
- return compareEntries(valueA, valueB);
15102
+ for (var _i = 0, _keysA = keysA; _i < _keysA.length; _i++) {
15103
+ var keyA = _keysA[_i];
15104
+ if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
15105
+ return false;
15106
+ }
14930
15107
  }
14931
- return compareIterables(valueA, valueB);
15108
+ return true;
14932
15109
  }
14933
-
15110
+ var useRef = React.useRef;
14934
15111
  function useShallow(selector) {
14935
- var prev = React.useRef();
15112
+ var prev = useRef();
14936
15113
  return function (state) {
14937
15114
  var next = selector(state);
14938
15115
  return shallow(prev.current, next) ? prev.current : prev.current = next;