UNPKG

@seontechnologies/seon-id-verification

Version:

An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.

1,044 lines (1,043 loc) 1.94 MB
var V4 = Object.defineProperty; var PF = (D) => { throw TypeError(D); }; var q4 = (D, r, s) => r in D ? V4(D, r, { enumerable: !0, configurable: !0, writable: !0, value: s }) : D[r] = s; var jB = (D, r, s) => q4(D, typeof r != "symbol" ? r + "" : r, s), FY = (D, r, s) => r.has(D) || PF("Cannot " + s); var AA = (D, r, s) => (FY(D, r, "read from private field"), s ? s.call(D) : r.get(D)), Rg = (D, r, s) => r.has(D) ? PF("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(D) : r.set(D, s), wg = (D, r, s, Y) => (FY(D, r, "write to private field"), Y ? Y.call(D, s) : r.set(D, s), s), We = (D, r, s) => (FY(D, r, "access private method"), s); var Oc = (D, r, s, Y) => ({ set _(d) { wg(D, r, d, s); }, get _() { return AA(D, r, Y); } }); import * as mg from "react"; import uB, { useEffect as Ha, createContext as X4, useState as JE, useContext as Z4, useMemo as _4, Fragment as $4, useCallback as yY, useRef as bc, Suspense as Wc } from "react"; (function() { if (typeof document > "u" || "adoptedStyleSheets" in document) return; var D = "ShadyCSS" in window && !ShadyCSS.nativeShadow, r = document.implementation.createHTMLDocument(""), s = /* @__PURE__ */ new WeakMap(), Y = typeof DOMException == "object" ? Error : DOMException, d = Object.defineProperty, L = Array.prototype.forEach, P = /@import.+?;?$/gm; function K(gA) { var IA = gA.replace(P, ""); return IA !== gA && console.warn("@import rules are not allowed here. See https://github.com/WICG/construct-stylesheets/issues/119#issuecomment-588352418"), IA.trim(); } function W(gA) { return "isConnected" in gA ? gA.isConnected : document.contains(gA); } function Z(gA) { return gA.filter(function(IA, OA) { return gA.indexOf(IA) === OA; }); } function cA(gA, IA) { return gA.filter(function(OA) { return IA.indexOf(OA) === -1; }); } function q(gA) { gA.parentNode.removeChild(gA); } function $(gA) { return gA.shadowRoot || s.get(gA); } var V = [ "addRule", "deleteRule", "insertRule", "removeRule" ], CA = CSSStyleSheet, iA = CA.prototype; iA.replace = function() { return Promise.reject(new Y("Can't call replace on non-constructed CSSStyleSheets.")); }, iA.replaceSync = function() { throw new Y("Failed to execute 'replaceSync' on 'CSSStyleSheet': Can't call replaceSync on non-constructed CSSStyleSheets."); }; function aA(gA) { return typeof gA == "object" ? ug.isPrototypeOf(gA) || iA.isPrototypeOf(gA) : !1; } function JA(gA) { return typeof gA == "object" ? iA.isPrototypeOf(gA) : !1; } var lA = /* @__PURE__ */ new WeakMap(), PA = /* @__PURE__ */ new WeakMap(), Ag = /* @__PURE__ */ new WeakMap(), KA = /* @__PURE__ */ new WeakMap(); function rg(gA, IA) { var OA = document.createElement("style"); return Ag.get(gA).set(IA, OA), PA.get(gA).push(IA), OA; } function bA(gA, IA) { return Ag.get(gA).get(IA); } function bg(gA, IA) { Ag.get(gA).delete(IA), PA.set(gA, PA.get(gA).filter(function(OA) { return OA !== IA; })); } function gg(gA, IA) { requestAnimationFrame(function() { IA.textContent = lA.get(gA).textContent, KA.get(gA).forEach(function(OA) { return IA.sheet[OA.method].apply(IA.sheet, OA.args); }); }); } function vg(gA) { if (!lA.has(gA)) throw new TypeError("Illegal invocation"); } function Lg() { var gA = this, IA = document.createElement("style"); r.body.appendChild(IA), lA.set(gA, IA), PA.set(gA, []), Ag.set(gA, /* @__PURE__ */ new WeakMap()), KA.set(gA, []); } var ug = Lg.prototype; ug.replace = function(IA) { try { return this.replaceSync(IA), Promise.resolve(this); } catch (OA) { return Promise.reject(OA); } }, ug.replaceSync = function(IA) { if (vg(this), typeof IA == "string") { var OA = this; lA.get(OA).textContent = K(IA), KA.set(OA, []), PA.get(OA).forEach(function(Cg) { Cg.isConnected() && gg(OA, bA(OA, Cg)); }); } }, d(ug, "cssRules", { configurable: !0, enumerable: !0, get: function() { return vg(this), lA.get(this).sheet.cssRules; } }), d(ug, "media", { configurable: !0, enumerable: !0, get: function() { return vg(this), lA.get(this).sheet.media; } }), V.forEach(function(gA) { ug[gA] = function() { var IA = this; vg(IA); var OA = arguments; KA.get(IA).push({ method: gA, args: OA }), PA.get(IA).forEach(function(ig) { if (ig.isConnected()) { var ng = bA(IA, ig).sheet; ng[gA].apply(ng, OA); } }); var Cg = lA.get(IA).sheet; return Cg[gA].apply(Cg, OA); }; }), d(Lg, Symbol.hasInstance, { configurable: !0, value: aA }); var VA = { childList: !0, subtree: !0 }, zg = /* @__PURE__ */ new WeakMap(); function Ug(gA) { var IA = zg.get(gA); return IA || (IA = new CB(gA), zg.set(gA, IA)), IA; } function Jg(gA) { d(gA.prototype, "adoptedStyleSheets", { configurable: !0, enumerable: !0, get: function() { return Ug(this).sheets; }, set: function(IA) { Ug(this).update(IA); } }); } function mB(gA, IA) { for (var OA = document.createNodeIterator( gA, NodeFilter.SHOW_ELEMENT, function(ig) { return $(ig) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT; }, null, !1 ), Cg = void 0; Cg = OA.nextNode(); ) IA($(Cg)); } var wA = /* @__PURE__ */ new WeakMap(), kA = /* @__PURE__ */ new WeakMap(), YA = /* @__PURE__ */ new WeakMap(); function jA(gA, IA) { return IA instanceof HTMLStyleElement && kA.get(gA).some(function(OA) { return bA(OA, gA); }); } function lg(gA) { var IA = wA.get(gA); return IA instanceof Document ? IA.body : IA; } function wB(gA) { var IA = document.createDocumentFragment(), OA = kA.get(gA), Cg = YA.get(gA), ig = lg(gA); Cg.disconnect(), OA.forEach(function(ng) { IA.appendChild(bA(ng, gA) || rg(ng, gA)); }), ig.insertBefore(IA, null), Cg.observe(ig, VA), OA.forEach(function(ng) { gg(ng, bA(ng, gA)); }); } function CB(gA) { var IA = this; IA.sheets = [], wA.set(IA, gA), kA.set(IA, []), YA.set(IA, new MutationObserver(function(OA, Cg) { if (!document) { Cg.disconnect(); return; } OA.forEach(function(ig) { D || L.call(ig.addedNodes, function(ng) { ng instanceof Element && mB(ng, function(Wg) { Ug(Wg).connect(); }); }), L.call(ig.removedNodes, function(ng) { ng instanceof Element && (jA(IA, ng) && wB(IA), D || mB(ng, function(Wg) { Ug(Wg).disconnect(); })); }); }); })); } if (CB.prototype = { isConnected: function() { var gA = wA.get(this); return gA instanceof Document ? gA.readyState !== "loading" : W(gA.host); }, connect: function() { var gA = lg(this); YA.get(this).observe(gA, VA), kA.get(this).length > 0 && wB(this), mB(gA, function(IA) { Ug(IA).connect(); }); }, disconnect: function() { YA.get(this).disconnect(); }, update: function(gA) { var IA = this, OA = wA.get(IA) === document ? "Document" : "ShadowRoot"; if (!Array.isArray(gA)) throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + OA + ": Iterator getter is not callable."); if (!gA.every(aA)) throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + OA + ": Failed to convert value to 'CSSStyleSheet'"); if (gA.some(JA)) throw new TypeError("Failed to set the 'adoptedStyleSheets' property on " + OA + ": Can't adopt non-constructed stylesheets"); IA.sheets = gA; var Cg = kA.get(IA), ig = Z(gA), ng = cA(Cg, ig); ng.forEach(function(Wg) { q(bA(Wg, IA)), bg(Wg, IA); }), kA.set(IA, ig), IA.isConnected() && ig.length > 0 && wB(IA); } }, window.CSSStyleSheet = Lg, Jg(Document), "ShadowRoot" in window) { Jg(ShadowRoot); var VB = Element.prototype, _g = VB.attachShadow; VB.attachShadow = function(IA) { var OA = _g.call(this, IA); return IA.mode === "closed" && s.set(this, OA), OA; }; } var BB = Ug(document); BB.isConnected() ? BB.connect() : document.addEventListener("DOMContentLoaded", BB.connect.bind(BB)); })(); (function() { var D = window.Document.prototype.createElement, r = window.Document.prototype.createElementNS, s = window.Document.prototype.importNode, Y = window.Document.prototype.prepend, d = window.Document.prototype.append, L = window.DocumentFragment.prototype.prepend, P = window.DocumentFragment.prototype.append, K = window.Node.prototype.cloneNode, W = window.Node.prototype.appendChild, Z = window.Node.prototype.insertBefore, cA = window.Node.prototype.removeChild, q = window.Node.prototype.replaceChild, $ = Object.getOwnPropertyDescriptor( window.Node.prototype, "textContent" ), V = window.Element.prototype.attachShadow, CA = Object.getOwnPropertyDescriptor(window.Element.prototype, "innerHTML"), iA = window.Element.prototype.getAttribute, aA = window.Element.prototype.setAttribute, JA = window.Element.prototype.removeAttribute, lA = window.Element.prototype.toggleAttribute, PA = window.Element.prototype.getAttributeNS, Ag = window.Element.prototype.setAttributeNS, KA = window.Element.prototype.removeAttributeNS, rg = window.Element.prototype.insertAdjacentElement, bA = window.Element.prototype.insertAdjacentHTML, bg = window.Element.prototype.prepend, gg = window.Element.prototype.append, vg = window.Element.prototype.before, Lg = window.Element.prototype.after, ug = window.Element.prototype.replaceWith, VA = window.Element.prototype.remove, zg = window.HTMLElement, Ug = Object.getOwnPropertyDescriptor(window.HTMLElement.prototype, "innerHTML"), Jg = window.HTMLElement.prototype.insertAdjacentElement, mB = window.HTMLElement.prototype.insertAdjacentHTML, wA = /* @__PURE__ */ new Set(); "annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(f) { return wA.add(f); }); function kA(f) { var v = wA.has(f); return f = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(f), !v && f; } var YA = document.contains ? document.contains.bind(document) : document.documentElement.contains.bind(document.documentElement); function jA(f) { var v = f.isConnected; if (v !== void 0) return v; if (YA(f)) return !0; for (; f && !(f.__CE_isImportDocument || f instanceof Document); ) f = f.parentNode || (window.ShadowRoot && f instanceof ShadowRoot ? f.host : void 0); return !(!f || !(f.__CE_isImportDocument || f instanceof Document)); } function lg(f) { var v = f.children; if (v) return Array.prototype.slice.call(v); for (v = [], f = f.firstChild; f; f = f.nextSibling) f.nodeType === Node.ELEMENT_NODE && v.push(f); return v; } function wB(f, v) { for (; v && v !== f && !v.nextSibling; ) v = v.parentNode; return v && v !== f ? v.nextSibling : null; } function CB(f, v, k) { for (var N = f; N; ) { if (N.nodeType === Node.ELEMENT_NODE) { var H = N; v(H); var R = H.localName; if (R === "link" && H.getAttribute("rel") === "import") { if (N = H.import, k === void 0 && (k = /* @__PURE__ */ new Set()), N instanceof Node && !k.has(N)) for (k.add(N), N = N.firstChild; N; N = N.nextSibling) CB(N, v, k); N = wB(f, H); continue; } else if (R === "template") { N = wB(f, H); continue; } if (H = H.__CE_shadowRoot) for (H = H.firstChild; H; H = H.nextSibling) CB(H, v, k); } N = N.firstChild ? N.firstChild : wB(f, N); } } function VB() { var f = !($A == null || !$A.noDocumentConstructionObserver), v = !($A == null || !$A.shadyDomFastWalk); this.m = [], this.g = [], this.j = !1, this.shadyDomFastWalk = v, this.I = !f; } function _g(f, v, k, N) { var H = window.ShadyDOM; if (f.shadyDomFastWalk && H && H.inUse) { if (v.nodeType === Node.ELEMENT_NODE && k(v), v.querySelectorAll) for (f = H.nativeMethods.querySelectorAll.call(v, "*"), v = 0; v < f.length; v++) k(f[v]); } else CB(v, k, N); } function BB(f, v) { f.j = !0, f.m.push(v); } function gA(f, v) { f.j = !0, f.g.push(v); } function IA(f, v) { f.j && _g(f, v, function(k) { return OA(f, k); }); } function OA(f, v) { if (f.j && !v.__CE_patched) { v.__CE_patched = !0; for (var k = 0; k < f.m.length; k++) f.m[k](v); for (k = 0; k < f.g.length; k++) f.g[k](v); } } function Cg(f, v) { var k = []; for (_g(f, v, function(H) { return k.push(H); }), v = 0; v < k.length; v++) { var N = k[v]; N.__CE_state === 1 ? f.connectedCallback(N) : Wg(f, N); } } function ig(f, v) { var k = []; for (_g(f, v, function(H) { return k.push(H); }), v = 0; v < k.length; v++) { var N = k[v]; N.__CE_state === 1 && f.disconnectedCallback(N); } } function ng(f, v, k) { k = k === void 0 ? {} : k; var N = k.J, H = k.upgrade || function(X) { return Wg(f, X); }, R = []; for (_g(f, v, function(X) { if (f.j && OA(f, X), X.localName === "link" && X.getAttribute("rel") === "import") { var rA = X.import; rA instanceof Node && (rA.__CE_isImportDocument = !0, rA.__CE_registry = document.__CE_registry), rA && rA.readyState === "complete" ? rA.__CE_documentLoadHandled = !0 : X.addEventListener("load", function() { var sA = X.import; if (!sA.__CE_documentLoadHandled) { sA.__CE_documentLoadHandled = !0; var eg = /* @__PURE__ */ new Set(); N && (N.forEach(function(jg) { return eg.add(jg); }), eg.delete(sA)), ng(f, sA, { J: eg, upgrade: H }); } }); } else R.push(X); }, N), v = 0; v < R.length; v++) H(R[v]); } function Wg(f, v) { try { var k = v.ownerDocument, N = k.__CE_registry, H = N && (k.defaultView || k.__CE_isImportDocument) ? Xe(N, v.localName) : void 0; if (H && v.__CE_state === void 0) { H.constructionStack.push(v); try { try { if (new H.constructorFunction() !== v) throw Error("The custom element constructor did not produce the element being upgraded."); } finally { H.constructionStack.pop(); } } catch (sA) { throw v.__CE_state = 2, sA; } if (v.__CE_state = 1, v.__CE_definition = H, H.attributeChangedCallback && v.hasAttributes()) { var R = H.observedAttributes; for (H = 0; H < R.length; H++) { var X = R[H], rA = v.getAttribute(X); rA !== null && f.attributeChangedCallback(v, X, null, rA, null); } } jA(v) && f.connectedCallback(v); } } catch (sA) { aB(sA); } } VB.prototype.connectedCallback = function(f) { var v = f.__CE_definition; if (v.connectedCallback) try { v.connectedCallback.call(f); } catch (k) { aB(k); } }, VB.prototype.disconnectedCallback = function(f) { var v = f.__CE_definition; if (v.disconnectedCallback) try { v.disconnectedCallback.call(f); } catch (k) { aB(k); } }, VB.prototype.attributeChangedCallback = function(f, v, k, N, H) { var R = f.__CE_definition; if (R.attributeChangedCallback && -1 < R.observedAttributes.indexOf(v)) try { R.attributeChangedCallback.call(f, v, k, N, H); } catch (X) { aB(X); } }; function hB(f, v, k, N) { var H = v.__CE_registry; if (H && (N === null || N === "http://www.w3.org/1999/xhtml") && (H = Xe(H, k))) try { var R = new H.constructorFunction(); if (R.__CE_state === void 0 || R.__CE_definition === void 0) throw Error("Failed to construct '" + k + "': The returned value was not constructed with the HTMLElement constructor."); if (R.namespaceURI !== "http://www.w3.org/1999/xhtml") throw Error("Failed to construct '" + k + "': The constructed element's namespace must be the HTML namespace."); if (R.hasAttributes()) throw Error("Failed to construct '" + k + "': The constructed element must not have any attributes."); if (R.firstChild !== null) throw Error("Failed to construct '" + k + "': The constructed element must not have any children."); if (R.parentNode !== null) throw Error("Failed to construct '" + k + "': The constructed element must not have a parent node."); if (R.ownerDocument !== v) throw Error("Failed to construct '" + k + "': The constructed element's owner document is incorrect."); if (R.localName !== k) throw Error("Failed to construct '" + k + "': The constructed element's local name is incorrect."); return R; } catch (X) { return aB(X), v = N === null ? D.call(v, k) : r.call(v, N, k), Object.setPrototypeOf(v, HTMLUnknownElement.prototype), v.__CE_state = 2, v.__CE_definition = void 0, OA(f, v), v; } return v = N === null ? D.call(v, k) : r.call(v, N, k), OA(f, v), v; } function aB(f) { var v = "", k = "", N = 0, H = 0; f instanceof Error ? (v = f.message, k = f.sourceURL || f.fileName || "", N = f.line || f.lineNumber || 0, H = f.column || f.columnNumber || 0) : v = "Uncaught " + String(f); var R = void 0; ErrorEvent.prototype.initErrorEvent === void 0 ? R = new ErrorEvent("error", { cancelable: !0, message: v, filename: k, lineno: N, colno: H, error: f }) : (R = document.createEvent("ErrorEvent"), R.initErrorEvent("error", !1, !0, v, k, N), R.preventDefault = function() { Object.defineProperty(this, "defaultPrevented", { configurable: !0, get: function() { return !0; } }); }), R.error === void 0 && Object.defineProperty(R, "error", { configurable: !0, enumerable: !0, get: function() { return f; } }), window.dispatchEvent(R), R.defaultPrevented || console.error(f); } function iQ() { var f = this; this.g = void 0, this.F = new Promise(function(v) { f.l = v; }); } iQ.prototype.resolve = function(f) { if (this.g) throw Error("Already resolved."); this.g = f, this.l(f); }; function OQ(f) { var v = document; this.l = void 0, this.h = f, this.g = v, ng(this.h, this.g), this.g.readyState === "loading" && (this.l = new MutationObserver(this.G.bind(this)), this.l.observe(this.g, { childList: !0, subtree: !0 })); } function qe(f) { f.l && f.l.disconnect(); } OQ.prototype.G = function(f) { var v = this.g.readyState; for (v !== "interactive" && v !== "complete" || qe(this), v = 0; v < f.length; v++) for (var k = f[v].addedNodes, N = 0; N < k.length; N++) ng(this.h, k[N]); }; function Tg(f) { this.s = /* @__PURE__ */ new Map(), this.u = /* @__PURE__ */ new Map(), this.C = /* @__PURE__ */ new Map(), this.A = !1, this.B = /* @__PURE__ */ new Map(), this.o = function(v) { return v(); }, this.i = !1, this.v = [], this.h = f, this.D = f.I ? new OQ(f) : void 0; } Tg.prototype.H = function(f, v) { var k = this; if (!(v instanceof Function)) throw new TypeError("Custom element constructor getters must be functions."); NB(this, f), this.s.set(f, v), this.v.push(f), this.i || (this.i = !0, this.o(function() { return Ie(k); })); }, Tg.prototype.define = function(f, v) { var k = this; if (!(v instanceof Function)) throw new TypeError("Custom element constructors must be functions."); NB(this, f), TB(this, f, v), this.v.push(f), this.i || (this.i = !0, this.o(function() { return Ie(k); })); }; function NB(f, v) { if (!kA(v)) throw new SyntaxError("The element name '" + v + "' is not valid."); if (Xe(f, v)) throw Error("A custom element with name '" + (v + "' has already been defined.")); if (f.A) throw Error("A custom element is already being defined."); } function TB(f, v, k) { f.A = !0; var N; try { var H = k.prototype; if (!(H instanceof Object)) throw new TypeError("The custom element constructor's prototype is not an object."); var R = function(jg) { var wQ = H[jg]; if (wQ !== void 0 && !(wQ instanceof Function)) throw Error("The '" + jg + "' callback must be a function."); return wQ; }, X = R("connectedCallback"), rA = R("disconnectedCallback"), sA = R("adoptedCallback"), eg = (N = R("attributeChangedCallback")) && k.observedAttributes || []; } catch (jg) { throw jg; } finally { f.A = !1; } return k = { localName: v, constructorFunction: k, connectedCallback: X, disconnectedCallback: rA, adoptedCallback: sA, attributeChangedCallback: N, observedAttributes: eg, constructionStack: [] }, f.u.set(v, k), f.C.set(k.constructorFunction, k), k; } Tg.prototype.upgrade = function(f) { ng(this.h, f); }; function Ie(f) { if (f.i !== !1) { f.i = !1; for (var v = [], k = f.v, N = /* @__PURE__ */ new Map(), H = 0; H < k.length; H++) N.set(k[H], []); for (ng(f.h, document, { upgrade: function(sA) { if (sA.__CE_state === void 0) { var eg = sA.localName, jg = N.get(eg); jg ? jg.push(sA) : f.u.has(eg) && v.push(sA); } } }), H = 0; H < v.length; H++) Wg(f.h, v[H]); for (H = 0; H < k.length; H++) { for (var R = k[H], X = N.get(R), rA = 0; rA < X.length; rA++) Wg(f.h, X[rA]); (R = f.B.get(R)) && R.resolve(void 0); } k.length = 0; } } Tg.prototype.get = function(f) { if (f = Xe(this, f)) return f.constructorFunction; }, Tg.prototype.whenDefined = function(f) { if (!kA(f)) return Promise.reject(new SyntaxError("'" + f + "' is not a valid custom element name.")); var v = this.B.get(f); if (v) return v.F; v = new iQ(), this.B.set(f, v); var k = this.u.has(f) || this.s.has(f); return f = this.v.indexOf(f) === -1, k && f && v.resolve(void 0), v.F; }, Tg.prototype.polyfillWrapFlushCallback = function(f) { this.D && qe(this.D); var v = this.o; this.o = function(k) { return f(function() { return v(k); }); }; }; function Xe(f, v) { var k = f.u.get(v); if (k) return k; if (k = f.s.get(v)) { f.s.delete(v); try { return TB(f, v, k()); } catch (N) { aB(N); } } } Tg.prototype.define = Tg.prototype.define, Tg.prototype.upgrade = Tg.prototype.upgrade, Tg.prototype.get = Tg.prototype.get, Tg.prototype.whenDefined = Tg.prototype.whenDefined, Tg.prototype.polyfillDefineLazy = Tg.prototype.H, Tg.prototype.polyfillWrapFlushCallback = Tg.prototype.polyfillWrapFlushCallback; function FB(f, v, k) { function N(H) { return function(R) { for (var X = [], rA = 0; rA < arguments.length; ++rA) X[rA] = arguments[rA]; rA = []; for (var sA = [], eg = 0; eg < X.length; eg++) { var jg = X[eg]; if (jg instanceof Element && jA(jg) && sA.push(jg), jg instanceof DocumentFragment) for (jg = jg.firstChild; jg; jg = jg.nextSibling) rA.push(jg); else rA.push(jg); } for (H.apply(this, X), X = 0; X < sA.length; X++) ig(f, sA[X]); if (jA(this)) for (X = 0; X < rA.length; X++) sA = rA[X], sA instanceof Element && Cg(f, sA); }; } k.prepend !== void 0 && (v.prepend = N(k.prepend)), k.append !== void 0 && (v.append = N(k.append)); } function se(f) { Document.prototype.createElement = function(v) { return hB(f, this, v, null); }, Document.prototype.importNode = function(v, k) { return v = s.call(this, v, !!k), this.__CE_registry ? ng(f, v) : IA(f, v), v; }, Document.prototype.createElementNS = function(v, k) { return hB(f, this, k, v); }, FB(f, Document.prototype, { prepend: Y, append: d }); } function rQ(f) { function v(N) { return function(H) { for (var R = [], X = 0; X < arguments.length; ++X) R[X] = arguments[X]; X = []; for (var rA = [], sA = 0; sA < R.length; sA++) { var eg = R[sA]; if (eg instanceof Element && jA(eg) && rA.push(eg), eg instanceof DocumentFragment) for (eg = eg.firstChild; eg; eg = eg.nextSibling) X.push(eg); else X.push(eg); } for (N.apply(this, R), R = 0; R < rA.length; R++) ig(f, rA[R]); if (jA(this)) for (R = 0; R < X.length; R++) rA = X[R], rA instanceof Element && Cg(f, rA); }; } var k = Element.prototype; vg !== void 0 && (k.before = v(vg)), Lg !== void 0 && (k.after = v(Lg)), ug !== void 0 && (k.replaceWith = function(N) { for (var H = [], R = 0; R < arguments.length; ++R) H[R] = arguments[R]; R = []; for (var X = [], rA = 0; rA < H.length; rA++) { var sA = H[rA]; if (sA instanceof Element && jA(sA) && X.push(sA), sA instanceof DocumentFragment) for (sA = sA.firstChild; sA; sA = sA.nextSibling) R.push(sA); else R.push(sA); } for (rA = jA(this), ug.apply(this, H), H = 0; H < X.length; H++) ig(f, X[H]); if (rA) for (ig(f, this), H = 0; H < R.length; H++) X = R[H], X instanceof Element && Cg(f, X); }), VA !== void 0 && (k.remove = function() { var N = jA(this); VA.call(this), N && ig(f, this); }); } function RQ(f) { function v(H, R) { Object.defineProperty(H, "innerHTML", { enumerable: R.enumerable, configurable: !0, get: R.get, set: function(X) { var rA = this, sA = void 0; if (jA(this) && (sA = [], _g(f, this, function(wQ) { wQ !== rA && sA.push(wQ); })), R.set.call(this, X), sA) for (var eg = 0; eg < sA.length; eg++) { var jg = sA[eg]; jg.__CE_state === 1 && f.disconnectedCallback(jg); } return this.ownerDocument.__CE_registry ? ng(f, this) : IA(f, this), X; } }); } function k(H, R) { H.insertAdjacentElement = function(X, rA) { var sA = jA(rA); return X = R.call(this, X, rA), sA && ig(f, rA), jA(X) && Cg(f, rA), X; }; } function N(H, R) { function X(rA, sA) { for (var eg = []; rA !== sA; rA = rA.nextSibling) eg.push(rA); for (sA = 0; sA < eg.length; sA++) ng(f, eg[sA]); } H.insertAdjacentHTML = function(rA, sA) { if (rA = rA.toLowerCase(), rA === "beforebegin") { var eg = this.previousSibling; R.call(this, rA, sA), X(eg || this.parentNode.firstChild, this); } else if (rA === "afterbegin") eg = this.firstChild, R.call(this, rA, sA), X(this.firstChild, eg); else if (rA === "beforeend") eg = this.lastChild, R.call(this, rA, sA), X(eg || this.firstChild, null); else if (rA === "afterend") eg = this.nextSibling, R.call(this, rA, sA), X(this.nextSibling, eg); else throw new SyntaxError("The value provided (" + String(rA) + ") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'."); }; } V && (Element.prototype.attachShadow = function(H) { if (H = V.call(this, H), f.j && !H.__CE_patched) { H.__CE_patched = !0; for (var R = 0; R < f.m.length; R++) f.m[R](H); } return this.__CE_shadowRoot = H; }), CA && CA.get ? v(Element.prototype, CA) : Ug && Ug.get ? v(HTMLElement.prototype, Ug) : gA(f, function(H) { v(H, { enumerable: !0, configurable: !0, get: function() { return K.call(this, !0).innerHTML; }, set: function(R) { var X = this.localName === "template", rA = X ? this.content : this, sA = r.call(document, this.namespaceURI, this.localName); for (sA.innerHTML = R; 0 < rA.childNodes.length; ) cA.call(rA, rA.childNodes[0]); for (R = X ? sA.content : sA; 0 < R.childNodes.length; ) W.call(rA, R.childNodes[0]); } }); }), Element.prototype.setAttribute = function(H, R) { if (this.__CE_state !== 1) return aA.call(this, H, R); var X = iA.call(this, H); aA.call(this, H, R), R = iA.call(this, H), f.attributeChangedCallback(this, H, X, R, null); }, Element.prototype.setAttributeNS = function(H, R, X) { if (this.__CE_state !== 1) return Ag.call( this, H, R, X ); var rA = PA.call(this, H, R); Ag.call(this, H, R, X), X = PA.call(this, H, R), f.attributeChangedCallback(this, R, rA, X, H); }, Element.prototype.removeAttribute = function(H) { if (this.__CE_state !== 1) return JA.call(this, H); var R = iA.call(this, H); JA.call(this, H), R !== null && f.attributeChangedCallback(this, H, R, null, null); }, lA && (Element.prototype.toggleAttribute = function(H, R) { if (this.__CE_state !== 1) return lA.call(this, H, R); var X = iA.call(this, H), rA = X !== null; return R = lA.call(this, H, R), rA !== R && f.attributeChangedCallback(this, H, X, R ? "" : null, null), R; }), Element.prototype.removeAttributeNS = function(H, R) { if (this.__CE_state !== 1) return KA.call(this, H, R); var X = PA.call(this, H, R); KA.call(this, H, R); var rA = PA.call(this, H, R); X !== rA && f.attributeChangedCallback(this, R, X, rA, H); }, Jg ? k(HTMLElement.prototype, Jg) : rg && k(Element.prototype, rg), mB ? N(HTMLElement.prototype, mB) : bA && N(Element.prototype, bA), FB(f, Element.prototype, { prepend: bg, append: gg }), rQ(f); } var zQ = {}; function DA(f) { function v() { var k = this.constructor, N = document.__CE_registry.C.get(k); if (!N) throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`."); var H = N.constructionStack; if (H.length === 0) return H = D.call(document, N.localName), Object.setPrototypeOf(H, k.prototype), H.__CE_state = 1, H.__CE_definition = N, OA(f, H), H; var R = H.length - 1, X = H[R]; if (X === zQ) throw Error("Failed to construct '" + N.localName + "': This element was already constructed."); return H[R] = zQ, Object.setPrototypeOf(X, k.prototype), OA(f, X), X; } v.prototype = zg.prototype, Object.defineProperty(HTMLElement.prototype, "constructor", { writable: !0, configurable: !0, enumerable: !1, value: v }), window.HTMLElement = v; } function NA(f) { function v(k, N) { Object.defineProperty(k, "textContent", { enumerable: N.enumerable, configurable: !0, get: N.get, set: function(H) { if (this.nodeType === Node.TEXT_NODE) N.set.call(this, H); else { var R = void 0; if (this.firstChild) { var X = this.childNodes, rA = X.length; if (0 < rA && jA(this)) { R = Array(rA); for (var sA = 0; sA < rA; sA++) R[sA] = X[sA]; } } if (N.set.call(this, H), R) for (H = 0; H < R.length; H++) ig(f, R[H]); } } }); } Node.prototype.insertBefore = function(k, N) { if (k instanceof DocumentFragment) { var H = lg(k); if (k = Z.call(this, k, N), jA(this)) for (N = 0; N < H.length; N++) Cg(f, H[N]); return k; } return H = k instanceof Element && jA(k), N = Z.call(this, k, N), H && ig(f, k), jA(this) && Cg(f, k), N; }, Node.prototype.appendChild = function(k) { if (k instanceof DocumentFragment) { var N = lg(k); if (k = W.call(this, k), jA(this)) for (var H = 0; H < N.length; H++) Cg(f, N[H]); return k; } return N = k instanceof Element && jA(k), H = W.call(this, k), N && ig(f, k), jA(this) && Cg(f, k), H; }, Node.prototype.cloneNode = function(k) { return k = K.call(this, !!k), this.ownerDocument.__CE_registry ? ng(f, k) : IA(f, k), k; }, Node.prototype.removeChild = function(k) { var N = k instanceof Element && jA(k), H = cA.call(this, k); return N && ig(f, k), H; }, Node.prototype.replaceChild = function(k, N) { if (k instanceof DocumentFragment) { var H = lg(k); if (k = q.call(this, k, N), jA(this)) for (ig(f, N), N = 0; N < H.length; N++) Cg(f, H[N]); return k; } H = k instanceof Element && jA(k); var R = q.call(this, k, N), X = jA(this); return X && ig(f, N), H && ig(f, k), X && Cg(f, k), R; }, $ && $.get ? v(Node.prototype, $) : BB(f, function(k) { v(k, { enumerable: !0, configurable: !0, get: function() { for (var N = [], H = this.firstChild; H; H = H.nextSibling) H.nodeType !== Node.COMMENT_NODE && N.push(H.textContent); return N.join(""); }, set: function(N) { for (; this.firstChild; ) cA.call(this, this.firstChild); N != null && N !== "" && W.call(this, document.createTextNode(N)); } }); }); } var $A = window.customElements; function yg() { var f = new VB(); DA(f), se(f), FB(f, DocumentFragment.prototype, { prepend: L, append: P }), NA(f), RQ(f), window.CustomElementRegistry = Tg, f = new Tg(f), document.__CE_registry = f, Object.defineProperty(window, "customElements", { configurable: !0, enumerable: !0, value: f }); } $A && !$A.forcePolyfill && typeof $A.define == "function" && typeof $A.get == "function" || yg(), window.__CE_installPolyfill = yg; }).call(self); const A0 = "Back", g0 = "Back to previous step", B0 = "Next", e0 = "Restart", Q0 = "Done", t0 = "OK", C0 = "Cancel", E0 = "Step 1 of 2", n0 = "Step 2 of 2", o0 = "Step 1 of 3", I0 = "Step 2 of 3", i0 = "Step 3 of 3", r0 = "Verify your identity", w0 = "The process only takes a few seconds. Keep in mind that you and your environment will be recorded.", a0 = "Make sure your device's camera(s) are ready to use", D0 = "Have your documents ready", s0 = "Be prepared to take a selfie", c0 = "Make sure you have good lighting", u0 = "Start verification", l0 = "Read more about our personal data processing here", P0 = "Scan your document", Y0 = "Use a valid document issued by your country of residence", M0 = "Use a valid document issued by your country of residence or citizenship", f0 = "Position your document's photo side in the frame", h0 = "Next, position your document's barcode side in the frame", F0 = "Scan your document", G0 = "Choose your document", d0 = "Select the issuing country and type of your document", v0 = "Issuing country", U0 = "Accepted documents", y0 = "Choose country", p0 = "Search", H0 = "No results", k0 = "No matches found on our list of supported countries.", m0 = "Passport", T0 = "ID card", S0 = "Driver's license", O0 = "Residence permit card", R0 = "Scan your document", z0 = "Scan the front side of the document", J0 = "Scan the back side of the document", j0 = `Watch out for flashlight glare. Gently move your ID around to avoid it.`, N0 = "Failed upload", L0 = "Something went wrong while processing the image. Please restart the identity verification process.", K0 = "Incorrect document type", x0 = "Make sure to select the correct document type you are using for verification.", b0 = "Invalid country", W0 = "Make sure to select the issuing country correctly so it matches the document you are using for verification.", V0 = "Too many failed attempts", q0 = "Make sure you read the instructions carefully and follow them precisely.", X0 = "Failed upload", Z0 = "Something went wrong while processing the image. Please restart the identity verification process.", _0 = "Please follow the instructions", $0 = "Make sure you read the instructions carefully and follow them precisely.", Ay = "Something is wrong with your image", gy = "Make sure your image is clear, not blurry and you have enough light", By = "Your session is timed out", ey = "You'll be redirected to the tutorial screen.", Qy = "Camera access required", ty = "In order to complete the validation, you need to give camera access. Please go back and allow camera access.", Cy = "Go back", Ey = "Unsuccessful attempt", ny = "You'll be redirected to the tutorial screen. Make sure you read the instructions carefully and follow them precisely.", oy = "Retry", Iy = "Something went wrong", iy = "Please restart the identity verification process.", ry = "Liveness check", wy = "Prepare for a liveness check", ay = "We'll check for the presence of a live person during the verification process", Dy = "Make sure you have good lighting and your face is visible", sy = "Position your face in the frame", cy = "Follow on-screen instructions", uy = "Take a selfie", ly = "Hold your hand in front of your face and show this gesture", Py = "Now, hold your hand in front of your face and show this gesture", Yy = "Lastly, hold your hand in front of your face and show this gesture", My = "Take a selfie", fy = "Prepare to take a selfie", hy = "We'll check if it matches your document", Fy = "Make sure you have good lighting and your face is visible", Gy = "Position your head in the frame", dy = "Turn your head to the directions shown on the screen", vy = "Take a selfie", Uy = "Slowly turn your head to the right", yy = "Now, slowly turn your head to the right", py = "Slowly turn your head up", Hy = "Now, slowly turn your head up", ky = "Slowly turn your head to the left", my = "Now, slowly turn your head to the left", Ty = "Slowly turn your head down", Sy = "Now, slowly turn your head down", Oy = "Take a selfie", Ry = "Prepare to take a selfie", zy = "We'll check if it matches your document", Jy = "Make sure you have good lighting and your face is visible", jy = "Position your head in the frame", Ny = "Hold still for a few seconds", Ly = "Take a selfie", Ky = "Please keep your eyes open", xy = "Position your face in the frame", by = "Hold still", Wy = "Align your face with the center of the frame", Vy = "Move a bit closer to the camera", qy = "Move a bit further from the camera", Xy = "Keep your face level and upright", Zy = "Look directly at the camera", _y = "Submission completed!", $y = "Your documents will be analyzed and we'll get back to you soon.", Ap = "Verify your identity", gp = "Please scan the QR code or open the link below on another mobile device to complete the session and make the ID verification as precise as possible.", Bp = "Go Back", ep = "Proceed with your session", Qp = "Your session is in progress on another mobile device. Once completed, you can proceed here.", tp = "Failed submission", Cp = "Something went wrong while processing your request. Please restart the identity verification process.", Ep = "I have read and agree to the {{start_screen_terms_link}}", np = "Privacy Notice", op = "Successful verification", Ip = "Your documents have bee analyzed and your id is verified.", ip = "Unsuccessful verification", rp = "Your documents have been analyzed but we couldn’t verify your identity. Please contact us, or try again.", wp = "Verification pending", ap = "Your documents have been uploaded for further inspection. We'll get back to you soon.", Dp = "Step {{X}} of {{Y}}", sp = "Proof of address", cp = "We'll check for proof of your address", up = "Prepare a proof of address document Utility Bill, Bank Statement, etc...", lp = "You can either upload or capture your document", Pp = "Make sure that the documents are in the frame and legible", Yp = "Prepare a proof of address document. Utility Bill, Bank Statement, etc...", Mp = "You can upload your document in pdf, jpg, or png format", fp = "Make sure that the uploaded documents are fully visible and legible", hp = "Provide document", Fp = "Thank you!", Gp = "Double check if the photo is sharp as possible and all the text is legible.", dp = "Upload file", vp = "Upload photo", Up = "Camera", yp = "Photo gallery", pp = "Upload file", Hp = "Upload your document", kp = "You can upload your document in pdf, jpg, or png format", mp = "Drag & Drop or {{poa_upload_action_link}}", Tp = "browse", Sp = "Remove", Op = "Send file", Rp = "Wrong file format", zp = "We couldn’t process your file. Please try another file type (jpeg, png, pdf)", Jp = "Retry", jp = "Something went wrong", Np = "We couldn’t process your file.", Lp = "Upload completed", Kp = "The results will be shown on desktop. You may close this window", xp = "Please use a different device.", bp = "Your camera is not supported", Wp = "Go back", Vp = "Session expired", qp = "This ID verification session has already expired.", Xp = { back_button: A0, back_to_previous_step_button: g0, next_button: B0, restart_button: e0, done_button: Q0, ok_button: t0, cancel_search_button: C0, step_1_of_2_subtitle: E0, step_2_of_2_subtitle: n0, step_1_of_3_subtitle: o0, step_2_of_3_subtitle: I0, step_3_of_3_subtitle: i0, start_screen_title: r0, start_screen_description: w0, start_screen_list_1: a0, start_screen_list_2: D0, start_screen_list_3: s0, start_screen_list_4: c0, start_screen_start_button: u0, start_screen_dpa_link: l0, tutorial_screen_title: P0, tutorial_screen_description: Y0, tutorial_screen_list_1: M0, tutorial_screen_list_2: f0, tutorial_screen_list_3: h0, tutorial_screen_scan_button: F0, id_type_selection_title: G0, id_type_selection_description: d0, id_type_selection_title_country: v0, id_type_selection_title_documents: U0, country_search_default_value: y0, country_search_input_placeholder: p0, country_search_no_result: H0, country_search_no_result_description: k0, document_type_passport: m0, document_type_national_id: T0, document_type_drivers_license: S0, document_type_resident_permit: O0, document_capture_flow_title: R0, document_capture_front_side: z0, document_capture_back_side: J0, document_capture_guidelines: j0, error_document_upload_title: N0, error_document_upload_description: L0, error_document_type_title: K0, error_document_type_description: x0, error_invalid_country_title: b0, error_invalid_country_description: W0, error_many_attempts_title: V0, error_many_attempts_description: q0, error_liveness_upload_title: X0, error_liveness_upload_description: Z0, error_liveness_check_action_follow_instructions_title: _0, error_liveness_check_action_follow_instructions_description: $0, error_liveness_check_action_image_quality_title: Ay, error_liveness_check_action_image_quality_description: gy, error_timeout_title: By, error_timeout_description: ey, error_no_camera_access_title: Qy, error_no_camera_access_description: ty, error_no_camera_access_button: Cy, error_unsuccessful_attempt_title: Ey, error_unsuccessful_attempt_description: ny, error_unsuccessful_attempt_button: oy, error_general_title: Iy, error_general_description: iy, liveness_check_gesture_flow_title: ry, liveness_check_gesture_title: wy, liveness_check_gesture_description: ay, liveness_check_gesture_list_1: Dy, liveness_check_gesture_list_2: sy, liveness_check_gesture_list_3: cy, liveness_check_gesture_button: uy, liveness_check_action_show_gesture_first: ly, liveness_check_action_show_gesture_mid: Py, liveness_check_action_show_gesture_last: Yy, liveness_check_face_turning_flow_title: My, liveness_check_face_turning_title: fy, liveness_check_face_turning_description: hy, liveness_check_face_turning_list_1: Fy, liveness_check_face_turning_list_2: Gy, liveness_check_face_turning_list_3: dy, liveness_check_face_turning_button: vy, liveness_check_action_turn_right_first: Uy, liveness_check_action_turn_right: yy, liveness_check_action_turn_up_first: py, liveness_check_action_turn_up: Hy, liveness_check_action_turn_left_first: ky, liveness_check_action_turn_left: my, liveness_check_action_turn_down_first: Ty, liveness_check_action_turn_down: Sy, liveness_check_selfie_flow_title: Oy, liveness_check_selfie_title: Ry, liveness_check_selfie_description: zy, liveness_check_selfie_list_1: Jy, liveness_check_selfie_list_2: jy, liveness_check_selfie_list_3: Ny, liveness_check_selfie_button: Ly, liveness_check_action_open_eyes: Ky, liveness_check_action_position_face: xy, liveness_check_action_hold: by, liveness_check_action_center_face: Wy, liveness_check_action_move_closer: Vy, liveness_check_action_move_further: qy, liveness_check_action_straighten_face: Xy, liveness_check_action_look_at_camera: Zy, verification_completed_title: _y, verification_completed_description: $y, redirect_screen_title: Ap, redirect_screen_description: gp, redirect_screen_button: Bp, ongoing_screen_title: ep, ongoing_screen_description: Qp, error_redirect_title: tp, error_redirect_description: Cp, start_screen_terms: Ep, start_screen_terms_link: np, verification_success_title: op, verification_success_description: Ip, verification_denied_title: ip, verification_denied_description: rp, verification_review_title: wp, verification_review_description: ap, step_count_subtitle: Dp, poa_screen_title: sp, poa_screen_description: cp, poa_screen_list_1: up, poa_screen_list_2: lp, poa_screen_list_3: Pp, poa_screen_list_1_desktop: Yp, poa_screen_list_2_desktop: Mp, poa_screen_list_3_desktop: fp, poa_screen_start_button: hp, poa_confirm_title: Fp, poa_confirm_description: Gp, poa_confirm_file_button: dp, poa_confirm_photo_button: vp, poa_sheet_camera: Up, poa_sheet_gallery: yp, poa_sheet_file: pp, poa_upload_title: Hp, poa_upload_description: kp, poa_upload_action: mp, poa_upload_action_link: Tp, poa_upload_remove: Sp, poa_upload_button: Op, error_poa_file_title: Rp, error_poa_file_description: zp, error_poa_file_button: Jp, error_poa_upload_title: jp, error_poa_upload_description: Np, upload_completed_title: Lp, upload_completed_description: Kp, error_device_support_description: xp, error_device_support_title: bp, errordevice_supportbutton: Wp, error_unique_expiration_title: Vp, error_unique_expiration_description: qp }; let ve; async function pY(D) { ve = { ...Xp, ...D }; } const cg = { config: {}, baseConfig: {}, setConfig: (D) => { cg.config = { ...cg.config, ...D }; }, setBaseConfig: (D) => { cg.baseConfig = { ...cg.baseConfig, ...D }; }, resetConfig: () => { cg.config = {}; } }, Zc = { value: !1, setValue: (D) => { Zc.value = D; } }, nC = (D, r) => { const s = document.querySelector(`#${kB.getInstanceId()}`); s == null || s.setAttribute("event", D), r ? s == null || s.setAttribute("eventData", JSON.stringify(r)) : s == null || s.removeAttribute("eventData"); }, xF = (...D) => { }, tI = xF, Zp = xF; class _p { constructor() { jB(this, "errorTrigger", null); jB(this, "errorTriggerPromise"); jB(this, "errorTriggerResolve"); this.errorTriggerPromise = new Promise((r) => { this.errorTriggerResolve = r; }); } on(r) { var s; this.errorTrigger = r, (s = this.errorTriggerResolve) == null || s.call(this); } off(r) { this.errorTrigger = null, this.errorTriggerPromise = new Promise((s) => { this.errorTriggerResolve = s; }); } throwError(r = {}) { this.errorTriggerPromise.then(() => { try { this.errorTrigger && (this.errorTrigger(r), r.ERROR ? Zp(r.ERROR) : r.WARN && console.warn(r.WARN)); } catch (s) { console.error("Error while handling custom error:", s); } }); } errorCallback() { nC("error", "unknown"); } unhandledrejectionCallback() { nC("error", "unknown"); } addGlobalErrorListeners() { window.addEventListener("error", this.errorCallback), window.addEventListener("unhandledrejection", this.unhandledrejectionCallback); } removeGlobalErrorListeners() { window.removeEventListener("error", this.errorCallback), window.removeEventListener("unhandledrejection", this.unhandledrejectionCallback); } } const IQ = new _p(), YF = IQ.throwError.bind(IQ), $p = (D) => new URLSearchParams(window.location.search).has(D), bF = (D) => new URLSearchParams(window.location.search).get(D) || null, Ft = () => $p("seon-idv-transfer-token"), AH = () => bF("seon-idv-no-cam-check") === "true", zY = async ({ endpoint: D, headers: r = {}, method: s = "GET", body: Y = {}, excludeJWT: d = !1, isFullUrl: L = !1, binaryBody: P = !1, jwt: K = "", ignoreUnauthorized: W = !1 }) => { const Z = cg.config.sessionToken || K, cA = { "Content-Type": "application/json", ...r }, q = { ...Y }; Z && !d && (cA.Authorization = `Bearer ${Z}`); try { if (s !== "GET") { const $ = await fetch(`${L ? "" : cg.baseConfig.baseUrl}${D}`, { method: s, headers: cA, body: P ? Y : JSON.stringify(q) }), V = $.headers.get("Content-Type"); let CA; V && V.includes("application/json") ? CA = await $.json() : CA = await $.text(), V && V.includes("application/json") ? (CA.ok = $.ok, CA.status = $.status) : CA = { ok: $.ok, status: $.status, data: CA }; const iA = D == null ? void 0 : D.includes("start-session"); if ($.status === 401 && !iA && (cg.setConfig({ sessionToken: "" }), !W)) { YF({ ERROR: "Session expired", hideBtn: Ft(), btnAction() { Ft() && window.close(), nC("error", "error_code_3"); } }); return; } return CA; } else { const $ = await fetch(`${!L && cg.baseConfig.baseUrl}${D}`, { headers: cA }), V = $.headers.get("Content-Type"); let CA; if (V && V.includes("application/json") ? CA = await $.json() : CA = await $.text(), V && V.includes("application/json") ? (CA.ok = $.ok, CA.status = $.status) : CA = { ok: $.ok, status: $.status, data: CA }, $.status === 401 && (cg.setConfig({ sessionToken: "" }), Ft() && window.close(), !W)) { YF({