@smileid/web-components 11.2.0 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/esm/{DocumentCaptureScreens-BbtA-WkX.js → DocumentCaptureScreens-N-0o7eE5.js} +5 -5
  2. package/dist/esm/{DocumentCaptureScreens-BbtA-WkX.js.map → DocumentCaptureScreens-N-0o7eE5.js.map} +1 -1
  3. package/dist/esm/{EndUserConsent-HVufMamg.js → EndUserConsent-BgKCCMMn.js} +3 -3
  4. package/dist/esm/{EndUserConsent-HVufMamg.js.map → EndUserConsent-BgKCCMMn.js.map} +1 -1
  5. package/dist/esm/{Navigation-B-dqPkZj.js → Navigation-DOFYqTZt.js} +2 -2
  6. package/dist/esm/{Navigation-B-dqPkZj.js.map → Navigation-DOFYqTZt.js.map} +1 -1
  7. package/dist/esm/{SelfieCaptureScreens-ChAMfKi3.js → SelfieCaptureScreens-DKd0f7K8.js} +81 -81
  8. package/dist/esm/SelfieCaptureScreens-DKd0f7K8.js.map +1 -0
  9. package/dist/esm/{TotpConsent-XxR8TNxy.js → TotpConsent-BQm8j4-u.js} +2 -2
  10. package/dist/esm/{TotpConsent-XxR8TNxy.js.map → TotpConsent-BQm8j4-u.js.map} +1 -1
  11. package/dist/esm/combobox.js +1 -1
  12. package/dist/esm/document.js +1 -1
  13. package/dist/esm/end-user-consent.js +1 -1
  14. package/dist/esm/{index-B_ozpejI.js → index-Cjzs1eA_.js} +49 -49
  15. package/dist/esm/{index-B_ozpejI.js.map → index-Cjzs1eA_.js.map} +1 -1
  16. package/dist/esm/localisation.js +1 -1
  17. package/dist/esm/main.js +6 -6
  18. package/dist/esm/navigation.js +1 -1
  19. package/dist/esm/{package-u3FEJ3Fm.js → package-KQ2l43v1.js} +3 -3
  20. package/dist/esm/{package-u3FEJ3Fm.js.map → package-KQ2l43v1.js.map} +1 -1
  21. package/dist/esm/selfie.js +1 -1
  22. package/dist/esm/smart-camera-web.js +5 -5
  23. package/dist/esm/totp-consent.js +1 -1
  24. package/dist/package.json +1 -1
  25. package/dist/smart-camera-web.js +2 -2
  26. package/dist/smart-camera-web.js.map +1 -1
  27. package/lib/components/signature-pad/package.json +1 -1
  28. package/package.json +1 -1
  29. package/dist/esm/SelfieCaptureScreens-ChAMfKi3.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { s as Fr } from "./styles-BOEZtbuc.js";
2
- import "./Navigation-B-dqPkZj.js";
3
- import { k as gs, t as I, m as e1, n as t1, o as i1, p as vs, q as r1, c as n1, b as Io, f as s1 } from "./index-B_ozpejI.js";
4
- import { J as br, p as _s, S as me, I as Fo } from "./package-u3FEJ3Fm.js";
2
+ import "./Navigation-DOFYqTZt.js";
3
+ import { b as gs, t as I, m as e1, n as t1, o as i1, p as vs, q as r1, i as n1, j as Io, k as s1 } from "./index-Cjzs1eA_.js";
4
+ import { J as br, p as _s, S as me, I as Fo } from "./package-KQ2l43v1.js";
5
5
  import "./PoweredBySmileId-CxbaihMu.js";
6
6
  function o1() {
7
7
  return `
@@ -858,27 +858,27 @@ function Oo(e) {
858
858
  (!e.__d && (e.__d = !0) && Ut.push(e) && !Er.__r++ || Ro != H.debounceRendering) && ((Ro = H.debounceRendering) || yc)(Er);
859
859
  }
860
860
  function Er() {
861
- for (var e, t, i, r, n, s, o, a = 1; Ut.length; ) Ut.length > a && Ut.sort(wc), e = Ut.shift(), a = Ut.length, e.__d && (i = void 0, n = (r = (t = e).__v).__e, s = [], o = [], t.__P && ((i = ot({}, r)).__v = r.__v + 1, H.vnode && H.vnode(i), bs(t.__P, i, r, t.__n, t.__P.namespaceURI, 32 & r.__u ? [n] : null, s, n ?? si(r), !!(32 & r.__u), o), i.__v = r.__v, i.__.__k[i.__i] = i, Tc(s, i, o), i.__e != n && Cc(i)));
861
+ for (var e, t, i, r, n, s, o, a = 1; Ut.length; ) Ut.length > a && Ut.sort(wc), e = Ut.shift(), a = Ut.length, e.__d && (i = void 0, r = void 0, n = (r = (t = e).__v).__e, s = [], o = [], t.__P && ((i = ot({}, r)).__v = r.__v + 1, H.vnode && H.vnode(i), bs(t.__P, i, r, t.__n, t.__P.namespaceURI, 32 & r.__u ? [n] : null, s, n ?? si(r), !!(32 & r.__u), o), i.__v = r.__v, i.__.__k[i.__i] = i, Tc(s, i, o), r.__e = r.__ = null, i.__e != n && Cc(i)));
862
862
  Er.__r = 0;
863
863
  }
864
864
  function kc(e, t, i, r, n, s, o, a, c, l, h) {
865
- var u, d, f, m, y, p, v = r && r.__k || Ec, g = t.length;
866
- for (c = h1(i, t, v, c, g), u = 0; u < g; u++) (f = i.__k[u]) != null && (d = f.__i == -1 ? ji : v[f.__i] || ji, f.__i = u, p = bs(e, f, d, n, s, o, a, c, l, h), m = f.__e, f.ref && d.ref != f.ref && (d.ref && Es(d.ref, null, f), h.push(f.ref, f.__c || m, f)), y == null && m != null && (y = m), 4 & f.__u || d.__k === f.__k ? c = Ac(f, c, e) : typeof f.type == "function" && p !== void 0 ? c = p : m && (c = m.nextSibling), f.__u &= -7);
865
+ var u, d, f, m, y, p, v, g = r && r.__k || Ec, x = t.length;
866
+ for (c = h1(i, t, g, c, x), u = 0; u < x; u++) (f = i.__k[u]) != null && (d = f.__i == -1 ? ji : g[f.__i] || ji, f.__i = u, p = bs(e, f, d, n, s, o, a, c, l, h), m = f.__e, f.ref && d.ref != f.ref && (d.ref && Es(d.ref, null, f), h.push(f.ref, f.__c || m, f)), y == null && m != null && (y = m), (v = !!(4 & f.__u)) || d.__k === f.__k ? c = Ac(f, c, e, v) : typeof f.type == "function" && p !== void 0 ? c = p : m && (c = m.nextSibling), f.__u &= -7);
867
867
  return i.__e = y, c;
868
868
  }
869
869
  function h1(e, t, i, r, n) {
870
870
  var s, o, a, c, l, h = i.length, u = h, d = 0;
871
- for (e.__k = new Array(n), s = 0; s < n; s++) (o = t[s]) != null && typeof o != "boolean" && typeof o != "function" ? (c = s + d, (o = e.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Ni(null, o, null, null, null) : Ji(o) ? Ni(Ft, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Ni(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = e, o.__b = e.__b + 1, a = null, (l = o.__i = d1(o, i, c, u)) != -1 && (u--, (a = i[l]) && (a.__u |= 2)), a == null || a.__v == null ? (l == -1 && (n > h ? d-- : n < h && d++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? d-- : l == c + 1 ? d++ : (l > c ? d-- : d++, o.__u |= 4))) : e.__k[s] = null;
871
+ for (e.__k = new Array(n), s = 0; s < n; s++) (o = t[s]) != null && typeof o != "boolean" && typeof o != "function" ? (c = s + d, (o = e.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Ni(null, o, null, null, null) : Ji(o) ? Ni(Ft, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? Ni(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = e, o.__b = e.__b + 1, a = null, (l = o.__i = d1(o, i, c, u)) != -1 && (u--, (a = i[l]) && (a.__u |= 2)), a == null || a.__v == null ? (l == -1 && (n > h ? d-- : n < h && d++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? d-- : l == c + 1 ? d++ : (l > c ? d-- : d++, o.__u |= 4))) : e.__k[s] = null;
872
872
  if (u) for (s = 0; s < h; s++) (a = i[s]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = si(a)), Lc(a, a));
873
873
  return r;
874
874
  }
875
- function Ac(e, t, i) {
876
- var r, n;
875
+ function Ac(e, t, i, r) {
876
+ var n, s;
877
877
  if (typeof e.type == "function") {
878
- for (r = e.__k, n = 0; r && n < r.length; n++) r[n] && (r[n].__ = e, t = Ac(r[n], t, i));
878
+ for (n = e.__k, s = 0; n && s < n.length; s++) n[s] && (n[s].__ = e, t = Ac(n[s], t, i, r));
879
879
  return t;
880
880
  }
881
- e.__e != t && (t && e.type && !i.contains(t) && (t = si(e)), i.insertBefore(e.__e, t || null), t = e.__e);
881
+ e.__e != t && (r && (t && e.type && !t.parentNode && (t = si(e)), i.insertBefore(e.__e, t || null)), t = e.__e);
882
882
  do
883
883
  t = t && t.nextSibling;
884
884
  while (t != null && t.nodeType == 8);
@@ -929,11 +929,11 @@ function No(e) {
929
929
  };
930
930
  }
931
931
  function bs(e, t, i, r, n, s, o, a, c, l) {
932
- var h, u, d, f, m, y, p, v, g, T, j, D, k, L, x, M, fe, N = t.type;
933
- if (t.constructor != null) return null;
932
+ var h, u, d, f, m, y, p, v, g, x, j, D, k, L, T, M, fe, N = t.type;
933
+ if (t.constructor !== void 0) return null;
934
934
  128 & i.__u && (c = !!(32 & i.__u), s = [a = t.__e = i.__e]), (h = H.__b) && h(t);
935
935
  e: if (typeof N == "function") try {
936
- if (v = t.props, g = "prototype" in N && N.prototype.render, T = (h = N.contextType) && r[h.__c], j = h ? T ? T.props.value : h.__ : r, i.__c ? p = (u = t.__c = i.__c).__ = u.__E : (g ? t.__c = u = new N(v, j) : (t.__c = u = new Di(v, j), u.constructor = N, u.render = p1), T && T.sub(u), u.props = v, u.state || (u.state = {}), u.context = j, u.__n = r, d = u.__d = !0, u.__h = [], u._sb = []), g && u.__s == null && (u.__s = u.state), g && N.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = ot({}, u.__s)), ot(u.__s, N.getDerivedStateFromProps(v, u.__s))), f = u.props, m = u.state, u.__v = t, d) g && N.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), g && u.componentDidMount != null && u.__h.push(u.componentDidMount);
936
+ if (v = t.props, g = "prototype" in N && N.prototype.render, x = (h = N.contextType) && r[h.__c], j = h ? x ? x.props.value : h.__ : r, i.__c ? p = (u = t.__c = i.__c).__ = u.__E : (g ? t.__c = u = new N(v, j) : (t.__c = u = new Di(v, j), u.constructor = N, u.render = p1), x && x.sub(u), u.props = v, u.state || (u.state = {}), u.context = j, u.__n = r, d = u.__d = !0, u.__h = [], u._sb = []), g && u.__s == null && (u.__s = u.state), g && N.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = ot({}, u.__s)), ot(u.__s, N.getDerivedStateFromProps(v, u.__s))), f = u.props, m = u.state, u.__v = t, d) g && N.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), g && u.componentDidMount != null && u.__h.push(u.componentDidMount);
937
937
  else {
938
938
  if (g && N.getDerivedStateFromProps == null && v !== f && u.componentWillReceiveProps != null && u.componentWillReceiveProps(v, j), !u.__e && u.shouldComponentUpdate != null && u.shouldComponentUpdate(v, u.__s, j) === !1 || t.__v == i.__v) {
939
939
  for (t.__v != i.__v && (u.props = v, u.state = u.__s, u.__d = !1), t.__e = i.__e, t.__k = i.__k, t.__k.some(function(Q) {
@@ -947,7 +947,7 @@ function bs(e, t, i, r, n, s, o, a, c, l) {
947
947
  });
948
948
  }
949
949
  if (u.context = j, u.props = v, u.__P = e, u.__e = !1, k = H.__r, L = 0, g) {
950
- for (u.state = u.__s, u.__d = !1, k && k(t), h = u.render(u.props, u.state, u.context), x = 0; x < u._sb.length; x++) u.__h.push(u._sb[x]);
950
+ for (u.state = u.__s, u.__d = !1, k && k(t), h = u.render(u.props, u.state, u.context), T = 0; T < u._sb.length; T++) u.__h.push(u._sb[T]);
951
951
  u._sb = [];
952
952
  } else do
953
953
  u.__d = !1, k && k(t), h = u.render(u.props, u.state, u.context), u.state = u.__s;
@@ -1060,7 +1060,7 @@ Ki = Ec.slice, H = { __e: function(e, t, i, r) {
1060
1060
  }
1061
1061
  throw e;
1062
1062
  } }, vc = 0, _c = function(e) {
1063
- return e != null && e.constructor == null;
1063
+ return e != null && e.constructor === void 0;
1064
1064
  }, Di.prototype.setState = function(e, t) {
1065
1065
  var i;
1066
1066
  i = this.__s != null && this.__s != this.state ? this.__s : this.__s = ot({}, this.state), typeof e == "function" && (e = e(ot({}, i), this.props)), e && ot(i, e), e != null && this.__v && (t && this._sb.push(t), Oo(this));
@@ -1809,16 +1809,16 @@ function $1() {
1809
1809
  Ko = 1;
1810
1810
  var e = vs(), t = R1(), i = D1(), r = "Expected a function", n = Math.max, s = Math.min;
1811
1811
  function o(a, c, l) {
1812
- var h, u, d, f, m, y, p = 0, v = !1, g = !1, T = !0;
1812
+ var h, u, d, f, m, y, p = 0, v = !1, g = !1, x = !0;
1813
1813
  if (typeof a != "function")
1814
1814
  throw new TypeError(r);
1815
- c = i(c) || 0, e(l) && (v = !!l.leading, g = "maxWait" in l, d = g ? n(i(l.maxWait) || 0, c) : d, T = "trailing" in l ? !!l.trailing : T);
1815
+ c = i(c) || 0, e(l) && (v = !!l.leading, g = "maxWait" in l, d = g ? n(i(l.maxWait) || 0, c) : d, x = "trailing" in l ? !!l.trailing : x);
1816
1816
  function j(V) {
1817
1817
  var ne = h, se = u;
1818
1818
  return h = u = void 0, p = V, f = a.apply(se, ne), f;
1819
1819
  }
1820
1820
  function D(V) {
1821
- return p = V, m = setTimeout(x, c), v ? j(V) : f;
1821
+ return p = V, m = setTimeout(T, c), v ? j(V) : f;
1822
1822
  }
1823
1823
  function k(V) {
1824
1824
  var ne = V - y, se = V - p, we = c - ne;
@@ -1828,14 +1828,14 @@ function $1() {
1828
1828
  var ne = V - y, se = V - p;
1829
1829
  return y === void 0 || ne >= c || ne < 0 || g && se >= d;
1830
1830
  }
1831
- function x() {
1831
+ function T() {
1832
1832
  var V = t();
1833
1833
  if (L(V))
1834
1834
  return M(V);
1835
- m = setTimeout(x, k(V));
1835
+ m = setTimeout(T, k(V));
1836
1836
  }
1837
1837
  function M(V) {
1838
- return m = void 0, T && h ? j(V) : (h = u = void 0, f);
1838
+ return m = void 0, x && h ? j(V) : (h = u = void 0, f);
1839
1839
  }
1840
1840
  function fe() {
1841
1841
  m !== void 0 && clearTimeout(m), p = 0, h = y = u = m = void 0;
@@ -1849,9 +1849,9 @@ function $1() {
1849
1849
  if (m === void 0)
1850
1850
  return D(y);
1851
1851
  if (g)
1852
- return clearTimeout(m), m = setTimeout(x, c), j(y);
1852
+ return clearTimeout(m), m = setTimeout(T, c), j(y);
1853
1853
  }
1854
- return m === void 0 && (m = setTimeout(x, c)), f;
1854
+ return m === void 0 && (m = setTimeout(T, c)), f;
1855
1855
  }
1856
1856
  return Q.cancel = fe, Q.flush = N, Q;
1857
1857
  }
@@ -1908,10 +1908,10 @@ const qc = /* @__PURE__ */ r1(B1), H1 = (e = "user") => {
1908
1908
  i.current = g;
1909
1909
  const D = g.getVideoTracks()[0].getSettings().facingMode;
1910
1910
  (D && D !== (p || r) || D && D !== r) && n(D);
1911
- const x = (await navigator.mediaDevices.enumerateDevices()).find(
1911
+ const T = (await navigator.mediaDevices.enumerateDevices()).find(
1912
1912
  (M) => M.kind === "videoinput" && g.getVideoTracks()[0].getSettings().deviceId === M.deviceId
1913
1913
  );
1914
- v?.(x?.label), t.current && (t.current.srcObject = g, await t.current.play());
1914
+ v?.(T?.label), t.current && (t.current.srcObject = g, await t.current.play());
1915
1915
  } catch (g) {
1916
1916
  console.error("Failed to start camera:", g);
1917
1917
  }
@@ -1930,9 +1930,9 @@ const qc = /* @__PURE__ */ r1(B1), H1 = (e = "user") => {
1930
1930
  }
1931
1931
  }
1932
1932
  }, f = () => {
1933
- const p = navigator.userAgent.toLowerCase(), v = p.includes("firefox") || p.includes("gecko") && !p.includes("chrome") && !p.includes("edge"), g = "mozInnerScreenX" in window || "mozInputSource" in window || "mozPaintCount" in window || typeof window.InstallTrigger < "u", T = CSS.supports && (CSS.supports("-moz-appearance", "none") || CSS.supports("-moz-user-select", "none"));
1933
+ const p = navigator.userAgent.toLowerCase(), v = p.includes("firefox") || p.includes("gecko") && !p.includes("chrome") && !p.includes("edge"), g = "mozInnerScreenX" in window || "mozInputSource" in window || "mozPaintCount" in window || typeof window.InstallTrigger < "u", x = CSS.supports && (CSS.supports("-moz-appearance", "none") || CSS.supports("-moz-user-select", "none"));
1934
1934
  return {
1935
- isGecko: v || g || T,
1935
+ isGecko: v || g || x,
1936
1936
  isChromium: p.includes("chrome") || p.includes("chromium") || p.includes("edge"),
1937
1937
  isWebKit: p.includes("webkit") && !p.includes("chrome")
1938
1938
  };
@@ -1953,7 +1953,7 @@ const qc = /* @__PURE__ */ r1(B1), H1 = (e = "user") => {
1953
1953
  return;
1954
1954
  }
1955
1955
  const { isGecko: v } = f();
1956
- let g = null, T = null;
1956
+ let g = null, x = null;
1957
1957
  try {
1958
1958
  const D = await navigator.mediaDevices.getUserMedia({
1959
1959
  video: { facingMode: "user" }
@@ -1965,10 +1965,10 @@ const qc = /* @__PURE__ */ r1(B1), H1 = (e = "user") => {
1965
1965
  const D = await navigator.mediaDevices.getUserMedia({
1966
1966
  video: { facingMode: "environment" }
1967
1967
  });
1968
- T = D.getVideoTracks()[0].getSettings().deviceId ?? null, D.getTracks().forEach((k) => k.stop());
1968
+ x = D.getVideoTracks()[0].getSettings().deviceId ?? null, D.getTracks().forEach((k) => k.stop());
1969
1969
  } catch {
1970
1970
  }
1971
- if (!(g && T && g !== T)) {
1971
+ if (!(g && x && g !== x)) {
1972
1972
  o(!1);
1973
1973
  return;
1974
1974
  }
@@ -4456,8 +4456,8 @@ function za(e, t, i, r) {
4456
4456
  const g = v;
4457
4457
  var y = m.next();
4458
4458
  if (y.done) return !1;
4459
- const [T, j] = y.value;
4460
- if (y = j, f !== T || g[0] !== y[0] || g[1] !== y[1] || g[2] !== y[2] || g[3] !== y[3]) return !1;
4459
+ const [x, j] = y.value;
4460
+ if (y = j, f !== x || g[0] !== y[0] || g[1] !== y[1] || g[2] !== y[2] || g[3] !== y[3]) return !1;
4461
4461
  }
4462
4462
  return !!m.next().done;
4463
4463
  }(c.H, u)) d.activeTexture(d.TEXTURE2), d.bindTexture(d.TEXTURE_2D, c.j);
@@ -5873,11 +5873,11 @@ const vh = (e) => {
5873
5873
  const d = (r + n) / 2, f = (s + o) / 2, m = 0.2, y = h * (1 + m), p = u * (1 + m), g = ((Q, V) => {
5874
5874
  const ne = (Q - a) / y, se = (V - c) / p;
5875
5875
  return ne * ne + se * se <= 1;
5876
- })(d, f), T = 0.2, j = 0.1, D = h * (1 + T), k = u * (1 + j), L = (Q, V) => {
5876
+ })(d, f), x = 0.2, j = 0.1, D = h * (1 + x), k = u * (1 + j), L = (Q, V) => {
5877
5877
  const ne = (Q - a) / D, se = (V - c) / k;
5878
5878
  return ne * ne + se * se <= 1;
5879
- }, x = L(r, s), M = L(n, s), fe = L(r, o), N = L(n, o);
5880
- return g && x && M && fe && N;
5879
+ }, T = L(r, s), M = L(n, s), fe = L(r, o), N = L(n, o);
5880
+ return g && T && M && fe && N;
5881
5881
  }, yh = (e) => {
5882
5882
  if (!e || e.length === 0) return 0;
5883
5883
  const t = e[0];
@@ -6040,12 +6040,12 @@ const vh = (e) => {
6040
6040
  smileCooldown: c,
6041
6041
  getFacingMode: l
6042
6042
  }) => {
6043
- const h = Ee(null), u = Ee(null), d = Ee(null), f = Ee(null), m = te(!1), y = te(!1), p = te("good"), v = te(!1), g = te(16 / 9), T = te([]), j = te(0), D = te(0), k = te(0), L = te(0), x = te(""), M = te(!0), fe = te(!1), N = te(!1), Q = te(0), V = te([]), ne = te(null), se = te(1), we = te(0), xo = te(!1), Yt = wn(
6043
+ const h = Ee(null), u = Ee(null), d = Ee(null), f = Ee(null), m = te(!1), y = te(!1), p = te("good"), v = te(!1), g = te(16 / 9), x = te([]), j = te(0), D = te(0), k = te(0), L = te(0), T = te(""), M = te(!0), fe = te(!1), N = te(!1), Q = te(0), V = te([]), ne = te(null), se = te(1), we = te(0), xo = te(!1), Yt = wn(
6044
6044
  () => Math.floor(se.value * 0.4)
6045
6045
  ), To = wn(() => Math.floor(se.value * 0.2)), W2 = wn(
6046
6046
  () => m.value && y.value && p.value === "good" && !v.value
6047
6047
  ), fn = (W) => {
6048
- W && mc[W] ? x.value = mc[W]?.() : x.value = "";
6048
+ W && mc[W] ? T.value = mc[W]?.() : T.value = "";
6049
6049
  }, Re = Ee(
6050
6050
  qc((W) => {
6051
6051
  fn(W);
@@ -6063,9 +6063,9 @@ const vh = (e) => {
6063
6063
  }
6064
6064
  }, q2 = () => {
6065
6065
  const W = we.value < To.value, Se = we.value >= Yt.value;
6066
- W ? x.value = I("selfie.smart.status.capturing") : Se ? Date.now() - L.value > c ? j.value >= n && k.value < s ? Re("open-mouth-smile") : Re("smile-required") : x.value = I("selfie.smart.status.keepSmiling") : Re(null);
6066
+ W ? T.value = I("selfie.smart.status.capturing") : Se ? Date.now() - L.value > c ? j.value >= n && k.value < s ? Re("open-mouth-smile") : Re("smile-required") : T.value = I("selfie.smart.status.keepSmiling") : Re(null);
6067
6067
  }, Z2 = () => {
6068
- M.value ? fn("initializing") : v.value ? Re("multiple-faces") : m.value ? p.value === "too-close" ? Re("too-close") : p.value === "too-far" ? Re("too-far") : y.value ? fe.value ? q2() : x.value = I("selfie.smart.status.readyToCapture") : Re("out-of-bounds") : Re("no-face");
6068
+ M.value ? fn("initializing") : v.value ? Re("multiple-faces") : m.value ? p.value === "too-close" ? Re("too-close") : p.value === "too-far" ? Re("too-far") : y.value ? fe.value ? q2() : T.value = I("selfie.smart.status.readyToCapture") : Re("out-of-bounds") : Re("no-face");
6069
6069
  }, pn = () => {
6070
6070
  u.current && (cancelAnimationFrame(u.current), u.current = null);
6071
6071
  }, mn = async () => {
@@ -6083,7 +6083,7 @@ const vh = (e) => {
6083
6083
  Se,
6084
6084
  performance.now()
6085
6085
  );
6086
- if (T.value = _e.faceLandmarks || [], _e.faceLandmarks && t.current && e.current)
6086
+ if (x.value = _e.faceLandmarks || [], _e.faceLandmarks && t.current && e.current)
6087
6087
  if (W) {
6088
6088
  const wt = e.current.videoWidth, Nt = e.current.videoHeight, Kt = Math.min(wt, Nt), gn = (wt - Kt) / (2 * wt), or = (Nt - Kt) / (2 * Nt), ar = Kt / wt, Jt = Kt / Nt, J2 = _e.faceLandmarks.map(
6089
6089
  (Q2) => Q2.map((vn) => ({
@@ -6194,12 +6194,12 @@ const vh = (e) => {
6194
6194
  faceProximity: p,
6195
6195
  multipleFaces: v,
6196
6196
  videoAspectRatio: g,
6197
- faceLandmarks: T,
6197
+ faceLandmarks: x,
6198
6198
  currentSmileScore: j,
6199
6199
  currentFaceSize: D,
6200
6200
  currentMouthOpen: k,
6201
6201
  lastSmileTime: L,
6202
- alertTitle: x,
6202
+ alertTitle: T,
6203
6203
  isInitializing: M,
6204
6204
  isReadyToCapture: W2,
6205
6205
  isCapturing: fe,
@@ -6262,7 +6262,7 @@ const vh = (e) => {
6262
6262
  d.current && clearInterval(d.current), pn(), Re.cancel();
6263
6263
  },
6264
6264
  resetFaceDetectionState: () => {
6265
- m.value = !1, y.value = !1, p.value = "good", v.value = !1, T.value = [], j.value = 0, D.value = 0, k.value = 0, L.value = 0, t.current && fc(t.current);
6265
+ m.value = !1, y.value = !1, p.value = "good", v.value = !1, x.value = [], j.value = 0, D.value = 0, k.value = 0, L.value = 0, t.current && fc(t.current);
6266
6266
  }
6267
6267
  };
6268
6268
  }, xh = ({
@@ -6501,12 +6501,12 @@ const vh = (e) => {
6501
6501
  "show-agent-mode-for-tests": s = !1,
6502
6502
  "hide-attribution": o = !1
6503
6503
  }) => {
6504
- const a = Ee(null), c = Ee(null), l = Ht(r), h = Ht(n), u = Ht(s), d = Ht(o), f = 300, m = 0.25, y = 0.05, p = 0.35, v = 0.5, g = h ? "environment" : "user", T = H1(g), j = te(!1), D = Ee(
6504
+ const a = Ee(null), c = Ee(null), l = Ht(r), h = Ht(n), u = Ht(s), d = Ht(o), f = 300, m = 0.25, y = 0.05, p = 0.35, v = 0.5, g = h ? "environment" : "user", x = H1(g), j = te(!1), D = Ee(
6505
6505
  qc((L) => {
6506
6506
  j.value = L;
6507
6507
  }, 100)
6508
6508
  ).current, k = Ah({
6509
- videoRef: T.videoRef,
6509
+ videoRef: x.videoRef,
6510
6510
  canvasRef: a,
6511
6511
  interval: e,
6512
6512
  duration: t,
@@ -6515,41 +6515,41 @@ const vh = (e) => {
6515
6515
  minFaceSize: p,
6516
6516
  maxFaceSize: v,
6517
6517
  smileCooldown: f,
6518
- getFacingMode: () => T.facingMode
6518
+ getFacingMode: () => x.facingMode
6519
6519
  });
6520
6520
  return Xe(() => {
6521
6521
  const L = async () => {
6522
- await T.startCamera(g, (x) => {
6522
+ await x.startCamera(g, (T) => {
6523
6523
  document.querySelector("smart-camera-web")?.dispatchEvent(
6524
6524
  new CustomEvent("metadata.camera-name", {
6525
- detail: { cameraName: x }
6525
+ detail: { cameraName: T }
6526
6526
  })
6527
6527
  );
6528
- }), await T.checkAgentSupport(), await k.initializeFaceLandmarker(), setTimeout(() => {
6528
+ }), await x.checkAgentSupport(), await k.initializeFaceLandmarker(), setTimeout(() => {
6529
6529
  k.setupCanvas(), k.startDetectionLoop();
6530
6530
  }, 500);
6531
6531
  };
6532
- return T.registerCameraSwitchCallback(() => {
6532
+ return x.registerCameraSwitchCallback(() => {
6533
6533
  try {
6534
6534
  k.resetFaceDetectionState(), k.setupCanvas(), k.stopDetectionLoop(), k.startDetectionLoop();
6535
- } catch (x) {
6536
- console.error("Error during camera switch callback:", x);
6535
+ } catch (T) {
6536
+ console.error("Error during camera switch callback:", T);
6537
6537
  }
6538
6538
  }), L(), () => {
6539
- k.stopDetectionLoop(), T.stopCamera(), k.cleanup(), D.cancel();
6539
+ k.stopDetectionLoop(), x.stopCamera(), k.cleanup(), D.cancel();
6540
6540
  };
6541
6541
  }, []), Xe(() => {
6542
6542
  D(k.multipleFaces.value);
6543
6543
  }, [k.multipleFaces.value]), Xe(() => {
6544
6544
  const L = c.current;
6545
6545
  if (L && l) {
6546
- const x = () => {
6546
+ const T = () => {
6547
6547
  k.handleCancel();
6548
6548
  }, M = () => {
6549
6549
  k.handleClose();
6550
6550
  };
6551
- return L.addEventListener("navigation.back", x), L.addEventListener("navigation.close", M), () => {
6552
- L.removeEventListener("navigation.back", x), L.removeEventListener(
6551
+ return L.addEventListener("navigation.back", T), L.addEventListener("navigation.close", M), () => {
6552
+ L.removeEventListener("navigation.back", T), L.removeEventListener(
6553
6553
  "navigation.close",
6554
6554
  M
6555
6555
  );
@@ -6565,9 +6565,9 @@ const vh = (e) => {
6565
6565
  /* @__PURE__ */ S(
6566
6566
  Th,
6567
6567
  {
6568
- videoRef: T.videoRef,
6568
+ videoRef: x.videoRef,
6569
6569
  canvasRef: a,
6570
- facingMode: T.facingMode,
6570
+ facingMode: x.facingMode,
6571
6571
  multipleFaces: j.value,
6572
6572
  progress: k.capturesTaken.value > 0 ? k.capturesTaken.value / k.totalCaptures.value : 0,
6573
6573
  interval: e,
@@ -6582,12 +6582,12 @@ const vh = (e) => {
6582
6582
  hasFinishedCapture: k.hasFinishedCapture.value,
6583
6583
  isReadyToCapture: k.isReadyToCapture.value,
6584
6584
  allowAgentMode: h,
6585
- agentSupported: T.agentSupported,
6585
+ agentSupported: x.agentSupported,
6586
6586
  showAgentModeForTests: u,
6587
- facingMode: T.facingMode,
6587
+ facingMode: x.facingMode,
6588
6588
  themeColor: i,
6589
6589
  onStartCapture: k.startCapture,
6590
- onSwitchCamera: T.switchCamera
6590
+ onSwitchCamera: x.switchCamera
6591
6591
  }
6592
6592
  ),
6593
6593
  !d && /* @__PURE__ */ S("powered-by-smile-id", {}),
@@ -7459,7 +7459,7 @@ const Nh = 90 * 1e3, Dh = 20 * 1e3, $h = ({
7459
7459
  } catch {
7460
7460
  return !1;
7461
7461
  }
7462
- })() || !!window.Cypress || window.navigator.userAgent.includes("Electron") && window.__Cypress, a = Ht(r), c = Ht(t), l = Ht(i), h = l ? Dh : e, [u, d] = Bt(!1), [f, m] = Bt(o ? 100 : 0), [y, p] = Bt(!1), [v, g] = Bt(!1), [T, j] = Bt(!1);
7462
+ })() || !!window.Cypress || window.navigator.userAgent.includes("Electron") && window.__Cypress, a = Ht(r), c = Ht(t), l = Ht(i), h = l ? Dh : e, [u, d] = Bt(!1), [f, m] = Bt(o ? 100 : 0), [y, p] = Bt(!1), [v, g] = Bt(!1), [x, j] = Bt(!1);
7463
7463
  if (Xe(() => {
7464
7464
  if (u || v || o) return;
7465
7465
  (async () => {
@@ -7482,9 +7482,9 @@ const Nh = 90 * 1e3, Dh = 20 * 1e3, $h = ({
7482
7482
  }, [a, c, h, u]), Xe(() => {
7483
7483
  if (a || u || f < 100) return;
7484
7484
  const L = setTimeout(() => {
7485
- const x = document.querySelector("selfie-capture");
7486
- if (x && !x.hasAttribute("data-backup-events-setup")) {
7487
- x.setAttribute("data-backup-events-setup", "true");
7485
+ const T = document.querySelector("selfie-capture");
7486
+ if (T && !T.hasAttribute("data-backup-events-setup")) {
7487
+ T.setAttribute("data-backup-events-setup", "true");
7488
7488
  const M = (fe) => {
7489
7489
  const N = fe;
7490
7490
  window.dispatchEvent(
@@ -7494,17 +7494,17 @@ const Nh = 90 * 1e3, Dh = 20 * 1e3, $h = ({
7494
7494
  })
7495
7495
  );
7496
7496
  };
7497
- return x.addEventListener("selfie-capture.publish", M), x.addEventListener(
7497
+ return T.addEventListener("selfie-capture.publish", M), T.addEventListener(
7498
7498
  "selfie-capture.cancelled",
7499
7499
  M
7500
- ), x.addEventListener("selfie-capture.close", M), () => {
7501
- x.removeEventListener(
7500
+ ), T.addEventListener("selfie-capture.close", M), () => {
7501
+ T.removeEventListener(
7502
7502
  "selfie-capture.publish",
7503
7503
  M
7504
- ), x.removeEventListener(
7504
+ ), T.removeEventListener(
7505
7505
  "selfie-capture.cancelled",
7506
7506
  M
7507
- ), x.removeEventListener(
7507
+ ), T.removeEventListener(
7508
7508
  "selfie-capture.close",
7509
7509
  M
7510
7510
  );
@@ -7528,28 +7528,28 @@ const Nh = 90 * 1e3, Dh = 20 * 1e3, $h = ({
7528
7528
  document.querySelector("smart-camera-web")?.dispatchEvent(
7529
7529
  new CustomEvent("metadata.active-liveness-version", {
7530
7530
  detail: {
7531
- version: T ? "0.0.1" : "1.0.0"
7531
+ version: x ? "0.0.1" : "1.0.0"
7532
7532
  }
7533
7533
  })
7534
7534
  );
7535
- }, [T, a, v]), a)
7535
+ }, [x, a, v]), a)
7536
7536
  return null;
7537
- if (y && u && !T)
7537
+ if (y && u && !x)
7538
7538
  return /* @__PURE__ */ S(ms, { ...n });
7539
- if (!y && u && !T)
7539
+ if (!y && u && !x)
7540
7540
  return /* @__PURE__ */ S(ms, { ...n });
7541
7541
  if (f >= 100) {
7542
7542
  if (l || o) {
7543
- T || j(!0);
7543
+ x || j(!0);
7544
7544
  const L = { ...n };
7545
7545
  return delete L.hidden, // @ts-expect-error --- preact-custom-element doesn't have proper types for refs
7546
7546
  /* @__PURE__ */ S(
7547
7547
  "selfie-capture",
7548
7548
  {
7549
7549
  ...L,
7550
- ref: (x) => {
7551
- if (x && !x.hasAttribute("data-events-setup")) {
7552
- x.setAttribute("data-events-setup", "true");
7550
+ ref: (T) => {
7551
+ if (T && !T.hasAttribute("data-events-setup")) {
7552
+ T.setAttribute("data-events-setup", "true");
7553
7553
  const M = (fe) => {
7554
7554
  const N = fe;
7555
7555
  (N.type === "selfie-capture.publish" || N.type === "selfie-capture.cancelled" || N.type === "selfie-capture.close") && p(!0), window.dispatchEvent(
@@ -7559,7 +7559,7 @@ const Nh = 90 * 1e3, Dh = 20 * 1e3, $h = ({
7559
7559
  })
7560
7560
  );
7561
7561
  };
7562
- x.addEventListener("selfie-capture.publish", M), x.addEventListener("selfie-capture.cancelled", M), x.addEventListener("selfie-capture.close", M);
7562
+ T.addEventListener("selfie-capture.publish", M), T.addEventListener("selfie-capture.cancelled", M), T.addEventListener("selfie-capture.close", M);
7563
7563
  }
7564
7564
  }
7565
7565
  }
@@ -7842,4 +7842,4 @@ class Hh extends HTMLElement {
7842
7842
  export {
7843
7843
  Hh as S
7844
7844
  };
7845
- //# sourceMappingURL=SelfieCaptureScreens-ChAMfKi3.js.map
7845
+ //# sourceMappingURL=SelfieCaptureScreens-DKd0f7K8.js.map