idmission-web-sdk 2.3.55 → 2.3.56

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.55';
214
+ var webSdkVersion = '2.3.56';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9477,18 +9477,11 @@
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
- };
9486
9480
  var api = {
9487
9481
  setState: setState,
9488
9482
  getState: getState,
9489
9483
  getInitialState: getInitialState,
9490
- subscribe: subscribe,
9491
- destroy: destroy
9484
+ subscribe: subscribe
9492
9485
  };
9493
9486
  var initialState = state = createState(setState, getState, api);
9494
9487
  return api;
@@ -9497,213 +9490,25 @@
9497
9490
  return createState ? createStoreImpl(createState) : createStoreImpl;
9498
9491
  };
9499
9492
 
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;
9685
9493
  var identity = function identity(arg) {
9686
9494
  return arg;
9687
9495
  };
9688
- function useStore(api, selector, equalityFn) {
9496
+ function useStore(api, selector) {
9689
9497
  if (selector === void 0) {
9690
9498
  selector = identity;
9691
9499
  }
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);
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);
9698
9506
  return slice;
9699
9507
  }
9700
9508
  var createImpl = function createImpl(createState) {
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);
9509
+ var api = createStore(createState);
9510
+ var useBoundStore = function useBoundStore(selector) {
9511
+ return useStore(api, selector);
9707
9512
  };
9708
9513
  Object.assign(useBoundStore, api);
9709
9514
  return useBoundStore;
@@ -14903,11 +14708,8 @@
14903
14708
  var extensionConnector;
14904
14709
  try {
14905
14710
  extensionConnector = (enabled != null ? enabled : (undefined ? undefined.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
14906
- } catch (_e) {}
14711
+ } catch (e) {}
14907
14712
  if (!extensionConnector) {
14908
- if ((undefined ? undefined.MODE : void 0) !== "production" && enabled) {
14909
- console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension");
14910
- }
14911
14713
  return fn(set, get, api);
14912
14714
  }
14913
14715
  var _extractConnectionInf = extractConnectionInformation(store, extensionConnector, options),
@@ -14978,7 +14780,7 @@
14978
14780
  return;
14979
14781
  }
14980
14782
  if (Object.keys(action.state).length !== 1) {
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 ");
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 ");
14982
14784
  }
14983
14785
  var stateFromDevtools = action.state[store];
14984
14786
  if (stateFromDevtools === void 0 || stateFromDevtools === null) {
@@ -15066,50 +14868,71 @@
15066
14868
  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."); }
15067
14869
  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; } }
15068
14870
  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; }
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) {
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) {
15074
14884
  return false;
15075
14885
  }
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
- }
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;
15085
14892
  }
15086
- return true;
15087
14893
  }
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
- }
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;
15095
14904
  }
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)) {
15096
14912
  return true;
15097
14913
  }
15098
- var keysA = Object.keys(objA);
15099
- if (keysA.length !== Object.keys(objB).length) {
14914
+ if (typeof valueA !== "object" || valueA === null || typeof valueB !== "object" || valueB === null) {
15100
14915
  return false;
15101
14916
  }
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
- }
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
+ });
15107
14927
  }
15108
- return true;
14928
+ if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {
14929
+ return compareEntries(valueA, valueB);
14930
+ }
14931
+ return compareIterables(valueA, valueB);
15109
14932
  }
15110
- var useRef = React.useRef;
14933
+
15111
14934
  function useShallow(selector) {
15112
- var prev = useRef();
14935
+ var prev = React.useRef();
15113
14936
  return function (state) {
15114
14937
  var next = selector(state);
15115
14938
  return shallow(prev.current, next) ? prev.current : prev.current = next;
@@ -23967,21 +23790,23 @@
23967
23790
  guidesComponent = _a.guidesComponent,
23968
23791
  _c = _a.minSignaturePadPoints,
23969
23792
  minSignaturePadPoints = _c === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _c,
23970
- _d = _a.headTrackingBoundaryPercentage,
23971
- headTrackingBoundaryPercentage = _d === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _d,
23972
- _e = _a.headTrackingBoundaryType,
23973
- headTrackingBoundaryType = _e === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _e,
23974
- _f = _a.captureAudio,
23975
- captureAudio = _f === void 0 ? false : _f,
23976
- _g = _a.classNames,
23977
- classNames = _g === void 0 ? {} : _g,
23978
- _h = _a.colors,
23979
- colors = _h === void 0 ? {} : _h,
23980
- _j = _a.verbiage,
23981
- rawVerbiage = _j === void 0 ? {} : _j,
23982
- _k = _a.debugMode,
23983
- debugMode = _k === void 0 ? false : _k;
23984
- var _l = useCameraStore(useShallow(function (state) {
23793
+ _d = _a.headTrackingDisabled,
23794
+ headTrackingDisabled = _d === void 0 ? false : _d,
23795
+ _e = _a.headTrackingBoundaryPercentage,
23796
+ headTrackingBoundaryPercentage = _e === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _e,
23797
+ _f = _a.headTrackingBoundaryType,
23798
+ headTrackingBoundaryType = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _f,
23799
+ _g = _a.captureAudio,
23800
+ captureAudio = _g === void 0 ? false : _g,
23801
+ _h = _a.classNames,
23802
+ classNames = _h === void 0 ? {} : _h,
23803
+ _j = _a.colors,
23804
+ colors = _j === void 0 ? {} : _j,
23805
+ _k = _a.verbiage,
23806
+ rawVerbiage = _k === void 0 ? {} : _k,
23807
+ _l = _a.debugMode,
23808
+ debugMode = _l === void 0 ? false : _l;
23809
+ var _m = useCameraStore(useShallow(function (state) {
23985
23810
  return {
23986
23811
  camera: state.camera,
23987
23812
  audioStream: state.audioStream,
@@ -23989,19 +23814,19 @@
23989
23814
  videoHeight: state.videoHeight
23990
23815
  };
23991
23816
  })),
23992
- camera = _l.camera,
23993
- audioStream = _l.audioStream,
23994
- videoWidth = _l.videoWidth,
23995
- videoHeight = _l.videoHeight;
23996
- var _m = useSelfieGuidanceModelsContext(),
23997
- onHeadTrackingPredictionMade = _m.onPredictionMade,
23998
- startHeadTracking = _m.start,
23999
- stopHeadTracking = _m.stop;
24000
- var _o = useVideoSignatureStore(),
24001
- startRecording = _o.startRecording,
24002
- stopRecording = _o.stopRecording,
24003
- clearRecordedData = _o.clearRecordedData,
24004
- isRecording = _o.isRecording;
23817
+ camera = _m.camera,
23818
+ audioStream = _m.audioStream,
23819
+ videoWidth = _m.videoWidth,
23820
+ videoHeight = _m.videoHeight;
23821
+ var _o = useSelfieGuidanceModelsContext(),
23822
+ onHeadTrackingPredictionMade = _o.onPredictionMade,
23823
+ startHeadTracking = _o.start,
23824
+ stopHeadTracking = _o.stop;
23825
+ var _p = useVideoSignatureStore(),
23826
+ startRecording = _p.startRecording,
23827
+ stopRecording = _p.stopRecording,
23828
+ clearRecordedData = _p.clearRecordedData,
23829
+ isRecording = _p.isRecording;
24005
23830
  React.useEffect(function () {
24006
23831
  useVideoSignatureStore.setState({
24007
23832
  onSignatureVideoCaptured: onSignatureVideoCaptured
@@ -24021,18 +23846,18 @@
24021
23846
  var verbiage = useTranslations(rawVerbiage, {
24022
23847
  guidanceMessageText: 'Please sign the box below'
24023
23848
  });
24024
- var _p = React.useState(true),
24025
- headTrackingSatisfied = _p[0],
24026
- setHeadTrackingSatisfied = _p[1];
24027
- var _q = React.useState(null),
24028
- lastFace = _q[0],
24029
- setLastFace = _q[1];
24030
- var _r = React.useState(0),
24031
- numFramesWithoutFaces = _r[0],
24032
- setNumFramesWithoutFaces = _r[1];
23849
+ var _q = React.useState(true),
23850
+ headTrackingSatisfied = _q[0],
23851
+ setHeadTrackingSatisfied = _q[1];
23852
+ var _r = React.useState(null),
23853
+ lastFace = _r[0],
23854
+ setLastFace = _r[1];
23855
+ var _s = React.useState(0),
23856
+ numFramesWithoutFaces = _s[0],
23857
+ setNumFramesWithoutFaces = _s[1];
24033
23858
  onHeadTrackingPredictionMade(f(React.useCallback(function (_a) {
24034
23859
  var face = _a.face;
24035
- if (!camera) return;
23860
+ if (!camera || headTrackingDisabled) return;
24036
23861
  var leftEdge = videoWidth * headTrackingBoundaryPercentage;
24037
23862
  var rightEdge = videoWidth * (1 - headTrackingBoundaryPercentage);
24038
23863
  var topEdge = videoHeight * headTrackingBoundaryPercentage;
@@ -24043,13 +23868,13 @@
24043
23868
  setNumFramesWithoutFaces(face ? 0 : function (n) {
24044
23869
  return n + 1;
24045
23870
  });
24046
- }, [camera, headTrackingBoundaryPercentage, headTrackingBoundaryType, videoHeight, videoWidth]), 16));
24047
- var _s = useResizeObserver(),
24048
- ref = _s.ref,
24049
- _t = _s.width,
24050
- width = _t === void 0 ? 1 : _t,
24051
- _u = _s.height,
24052
- height = _u === void 0 ? 1 : _u;
23871
+ }, [camera, headTrackingBoundaryPercentage, headTrackingBoundaryType, headTrackingDisabled, videoHeight, videoWidth]), 16));
23872
+ var _t = useResizeObserver(),
23873
+ ref = _t.ref,
23874
+ _u = _t.width,
23875
+ width = _u === void 0 ? 1 : _u,
23876
+ _v = _t.height,
23877
+ height = _v === void 0 ? 1 : _v;
24053
23878
  var debugScalingDetails = useDebugScalingDetails({
24054
23879
  enabled: debugMode,
24055
23880
  pageWidth: width,
@@ -24345,49 +24170,51 @@
24345
24170
  captureAudio = _d === void 0 ? false : _d,
24346
24171
  _e = _a.minSignaturePadPoints,
24347
24172
  minSignaturePadPoints = _e === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _e,
24348
- _f = _a.headTrackingBoundaryPercentage,
24349
- headTrackingBoundaryPercentage = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _f,
24350
- _g = _a.headTrackingBoundaryType,
24351
- headTrackingBoundaryType = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _g,
24352
- _h = _a.allowSignatureAfterLivenessCheckFailure,
24353
- allowSignatureAfterLivenessCheckFailure = _h === void 0 ? false : _h,
24354
- _j = _a.restartVideoOnSignaturePadCleared,
24355
- restartVideoOnSignaturePadCleared = _j === void 0 ? true : _j,
24356
- _k = _a.skipLivenessValidation,
24357
- skipLivenessValidation = _k === void 0 ? false : _k,
24173
+ _f = _a.headTrackingDisabled,
24174
+ headTrackingDisabled = _f === void 0 ? false : _f,
24175
+ _g = _a.headTrackingBoundaryPercentage,
24176
+ headTrackingBoundaryPercentage = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _g,
24177
+ _h = _a.headTrackingBoundaryType,
24178
+ headTrackingBoundaryType = _h === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _h,
24179
+ _j = _a.allowSignatureAfterLivenessCheckFailure,
24180
+ allowSignatureAfterLivenessCheckFailure = _j === void 0 ? false : _j,
24181
+ _k = _a.restartVideoOnSignaturePadCleared,
24182
+ restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
24183
+ _l = _a.skipLivenessValidation,
24184
+ skipLivenessValidation = _l === void 0 ? false : _l,
24358
24185
  faceLivenessProps = _a.faceLivenessProps,
24359
24186
  guidesComponent = _a.guidesComponent,
24360
- _l = _a.assets,
24361
- assets = _l === void 0 ? {} : _l,
24362
- _m = _a.classNames,
24363
- classNames = _m === void 0 ? {} : _m,
24364
- _o = _a.colors,
24365
- colors = _o === void 0 ? {} : _o,
24366
- _p = _a.verbiage,
24367
- verbiage = _p === void 0 ? {} : _p,
24368
- _q = _a.debugMode,
24369
- debugMode = _q === void 0 ? false : _q;
24370
- var _r = useSubmissionContext(),
24371
- selfieImage = _r.selfieImage,
24372
- setSelfieImage = _r.setSelfieImage,
24373
- setSignatureData = _r.setSignatureData,
24374
- setSignatureVideoUrl = _r.setSignatureVideoUrl,
24375
- logSelfieCaptureAttempt = _r.logSelfieCaptureAttempt,
24376
- uploadDocument = _r.uploadDocument;
24187
+ _m = _a.assets,
24188
+ assets = _m === void 0 ? {} : _m,
24189
+ _o = _a.classNames,
24190
+ classNames = _o === void 0 ? {} : _o,
24191
+ _p = _a.colors,
24192
+ colors = _p === void 0 ? {} : _p,
24193
+ _q = _a.verbiage,
24194
+ verbiage = _q === void 0 ? {} : _q,
24195
+ _r = _a.debugMode,
24196
+ debugMode = _r === void 0 ? false : _r;
24197
+ var _s = useSubmissionContext(),
24198
+ selfieImage = _s.selfieImage,
24199
+ setSelfieImage = _s.setSelfieImage,
24200
+ setSignatureData = _s.setSignatureData,
24201
+ setSignatureVideoUrl = _s.setSignatureVideoUrl,
24202
+ logSelfieCaptureAttempt = _s.logSelfieCaptureAttempt,
24203
+ uploadDocument = _s.uploadDocument;
24377
24204
  var cameraAccessDenied = useCameraStore(useShallow(function (state) {
24378
24205
  return {
24379
24206
  cameraAccessDenied: state.cameraAccessDenied
24380
24207
  };
24381
24208
  })).cameraAccessDenied;
24382
- var _s = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
24383
- captureState = _s[0],
24384
- setCaptureState = _s[1];
24209
+ var _t = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
24210
+ captureState = _t[0],
24211
+ setCaptureState = _t[1];
24385
24212
  var operationStartedAt = React.useRef();
24386
24213
  var captureStartedAt = React.useRef();
24387
24214
  var captureEndedAt = React.useRef();
24388
- var _t = useSelfieGuidanceModelsContext(),
24389
- start = _t.start,
24390
- stop = _t.stop;
24215
+ var _u = useSelfieGuidanceModelsContext(),
24216
+ start = _u.start,
24217
+ stop = _u.stop;
24391
24218
  React.useEffect(function () {
24392
24219
  operationStartedAt.current = new Date();
24393
24220
  }, []);
@@ -24431,9 +24258,9 @@
24431
24258
  filetype: 'image/jpeg'
24432
24259
  }).then(onSelfieCaptured);
24433
24260
  }, [logCaptureMetadata, onSelfieCaptured, setSelfieImage, uploadDocument]);
24434
- var _u = React.useState(null),
24435
- signatureImageUrl = _u[0],
24436
- setSignatureImageUrl = _u[1];
24261
+ var _v = React.useState(null),
24262
+ signatureImageUrl = _v[0],
24263
+ setSignatureImageUrl = _v[1];
24437
24264
  var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
24438
24265
  setSignatureData(signatureData);
24439
24266
  setSignatureVideoUrl(URL.createObjectURL(videoData));
@@ -24441,17 +24268,17 @@
24441
24268
  setCaptureState('SUCCESS');
24442
24269
  onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
24443
24270
  }, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
24444
- var _v = React.useState(true),
24445
- showLoadingOverlay = _v[0],
24446
- setShowLoadingOverlay = _v[1];
24271
+ var _w = React.useState(true),
24272
+ showLoadingOverlay = _w[0],
24273
+ setShowLoadingOverlay = _w[1];
24447
24274
  var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
24448
24275
  setShowLoadingOverlay(false);
24449
24276
  setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
24450
24277
  useVideoSignatureStore.getState().clearRecordedData();
24451
24278
  }, [skipLivenessValidation]);
24452
- var _w = React.useState(0),
24453
- attempt = _w[0],
24454
- setAttempt = _w[1];
24279
+ var _x = React.useState(0),
24280
+ attempt = _x[0],
24281
+ setAttempt = _x[1];
24455
24282
  var onRetry = React.useCallback(function () {
24456
24283
  onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
24457
24284
  setAttempt(function (n) {
@@ -24555,6 +24382,7 @@
24555
24382
  onFaceNotDetected: onSignatureCaptureFacesNotDetected,
24556
24383
  onExit: onExitSignatureCapture,
24557
24384
  minSignaturePadPoints: minSignaturePadPoints,
24385
+ headTrackingDisabled: headTrackingDisabled,
24558
24386
  headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
24559
24387
  headTrackingBoundaryType: headTrackingBoundaryType,
24560
24388
  restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
@@ -28394,29 +28222,31 @@
28394
28222
  idCardForFaceMatch = _a.idCardForFaceMatch,
28395
28223
  _f = _a.minSignaturePadPoints,
28396
28224
  minSignaturePadPoints = _f === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _f,
28397
- _g = _a.headTrackingBoundaryPercentage,
28398
- headTrackingBoundaryPercentage = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _g,
28399
- _h = _a.headTrackingBoundaryType,
28400
- headTrackingBoundaryType = _h === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _h,
28401
- _j = _a.modelLoadTimeoutMs,
28402
- modelLoadTimeoutMs = _j === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _j,
28403
- _k = _a.allowSignatureAfterLivenessCheckFailure,
28404
- allowSignatureAfterLivenessCheckFailure = _k === void 0 ? false : _k,
28405
- _l = _a.restartVideoOnSignaturePadCleared,
28406
- restartVideoOnSignaturePadCleared = _l === void 0 ? true : _l,
28225
+ _g = _a.headTrackingDisabled,
28226
+ headTrackingDisabled = _g === void 0 ? false : _g,
28227
+ _h = _a.headTrackingBoundaryPercentage,
28228
+ headTrackingBoundaryPercentage = _h === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _h,
28229
+ _j = _a.headTrackingBoundaryType,
28230
+ headTrackingBoundaryType = _j === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_TYPE : _j,
28231
+ _k = _a.modelLoadTimeoutMs,
28232
+ modelLoadTimeoutMs = _k === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _k,
28233
+ _l = _a.allowSignatureAfterLivenessCheckFailure,
28234
+ allowSignatureAfterLivenessCheckFailure = _l === void 0 ? false : _l,
28235
+ _m = _a.restartVideoOnSignaturePadCleared,
28236
+ restartVideoOnSignaturePadCleared = _m === void 0 ? true : _m,
28407
28237
  faceLivenessProps = _a.faceLivenessProps,
28408
- _m = _a.skipLivenessValidation,
28409
- skipLivenessValidation = _m === void 0 ? false : _m,
28238
+ _o = _a.skipLivenessValidation,
28239
+ skipLivenessValidation = _o === void 0 ? false : _o,
28410
28240
  guidesComponent = _a.guidesComponent,
28411
- _o = _a.theme,
28412
- theme = _o === void 0 ? 'default' : _o,
28241
+ _p = _a.theme,
28242
+ theme = _p === void 0 ? 'default' : _p,
28413
28243
  classNames = _a.classNames,
28414
28244
  colors = _a.colors,
28415
28245
  verbiage = _a.verbiage,
28416
28246
  geolocationEnabled = _a.geolocationEnabled,
28417
28247
  geolocationRequired = _a.geolocationRequired,
28418
- _p = _a.debugMode,
28419
- debugMode = _p === void 0 ? false : _p;
28248
+ _q = _a.debugMode,
28249
+ debugMode = _q === void 0 ? false : _q;
28420
28250
  useLanguage(lang);
28421
28251
  useDebugLogging(debugMode);
28422
28252
  return /*#__PURE__*/React.createElement(AuthProvider, {
@@ -28466,6 +28296,7 @@
28466
28296
  skipSuccessScreen: skipSuccessScreen,
28467
28297
  captureAudio: captureAudio,
28468
28298
  minSignaturePadPoints: minSignaturePadPoints,
28299
+ headTrackingDisabled: headTrackingDisabled,
28469
28300
  headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
28470
28301
  headTrackingBoundaryType: headTrackingBoundaryType,
28471
28302
  modelLoadTimeoutMs: modelLoadTimeoutMs,
@@ -28481,7 +28312,7 @@
28481
28312
  onModelError: onModelError,
28482
28313
  onUserCancel: onUserCancel
28483
28314
  };
28484
- }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
28315
+ }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
28485
28316
  })))));
28486
28317
  };
28487
28318