@hotosm/hanko-auth 0.4.9 → 0.4.10
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.
- package/dist/hanko-auth.esm.js +293 -313
- package/dist/hanko-auth.iife.js +14 -14
- package/dist/hanko-auth.umd.js +14 -14
- package/package.json +1 -1
- package/src/hanko-auth.ts +35 -115
package/dist/hanko-auth.esm.js
CHANGED
|
@@ -45,7 +45,7 @@ const Ki = (n) => new ui(typeof n == "string" ? n : n + "", void 0, Xn), Vi = (n
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Zi, defineProperty: Ji, getOwnPropertyDescriptor: Yi, getOwnPropertyNames: Qi, getOwnPropertySymbols: Gi, getPrototypeOf: Xi } = Object, st = globalThis, Ao = st.trustedTypes, er = Ao ? Ao.emptyScript : "", Dn = st.reactiveElementPolyfillSupport,
|
|
48
|
+
const { is: Zi, defineProperty: Ji, getOwnPropertyDescriptor: Yi, getOwnPropertyNames: Qi, getOwnPropertySymbols: Gi, getPrototypeOf: Xi } = Object, st = globalThis, Ao = st.trustedTypes, er = Ao ? Ao.emptyScript : "", Dn = st.reactiveElementPolyfillSupport, Ut = (n, e) => n, gn = { toAttribute(n, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
n = n ? er : null;
|
|
@@ -103,13 +103,13 @@ let pt = class extends HTMLElement {
|
|
|
103
103
|
return this.elementProperties.get(e) ?? Co;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(Ut("elementProperties"))) return;
|
|
107
107
|
const e = Xi(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
111
|
+
if (this.hasOwnProperty(Ut("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Ut("properties"))) {
|
|
113
113
|
const t = this.properties, o = [...Qi(t), ...Gi(t)];
|
|
114
114
|
for (const i of o) this.createProperty(i, t[i]);
|
|
115
115
|
}
|
|
@@ -278,15 +278,15 @@ let pt = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[
|
|
281
|
+
pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[Ut("elementProperties")] = /* @__PURE__ */ new Map(), pt[Ut("finalized")] = /* @__PURE__ */ new Map(), Dn == null || Dn({ ReactiveElement: pt }), (st.reactiveElementVersions ?? (st.reactiveElementVersions = [])).push("2.1.2");
|
|
282
282
|
/**
|
|
283
283
|
* @license
|
|
284
284
|
* Copyright 2017 Google LLC
|
|
285
285
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
286
|
*/
|
|
287
|
-
const Nt = globalThis, Po = (n) => n, vn = Nt.trustedTypes, Oo = vn ? vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, hi = "$lit$", at = `lit$${Math.random().toFixed(9).slice(2)}$`, pi = "?" + at, tr = `<${pi}>`, ht = document, Rt = () => ht.createComment(""), qt = (n) => n === null || typeof n != "object" && typeof n != "function", to = Array.isArray, nr = (n) => to(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function",
|
|
288
|
-
\f\r]`, _t = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Eo = /-->/g, Io = />/g, ct = RegExp(`>|${
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Do = /'/g,
|
|
287
|
+
const Nt = globalThis, Po = (n) => n, vn = Nt.trustedTypes, Oo = vn ? vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, hi = "$lit$", at = `lit$${Math.random().toFixed(9).slice(2)}$`, pi = "?" + at, tr = `<${pi}>`, ht = document, Rt = () => ht.createComment(""), qt = (n) => n === null || typeof n != "object" && typeof n != "function", to = Array.isArray, nr = (n) => to(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", jn = `[
|
|
288
|
+
\f\r]`, _t = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Eo = /-->/g, Io = />/g, ct = RegExp(`>|${jn}(?:([^\\s"'>=/]+)(${jn}*=${jn}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Do = /'/g, jo = /"/g, mi = /^(?:script|style|textarea|title)$/i, or = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), _e = or(1), gt = Symbol.for("lit-noChange"), Le = Symbol.for("lit-nothing"), $o = /* @__PURE__ */ new WeakMap(), dt = ht.createTreeWalker(ht, 129);
|
|
290
290
|
function fi(n, e) {
|
|
291
291
|
if (!to(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
292
|
return Oo !== void 0 ? Oo.createHTML(e) : e;
|
|
@@ -297,7 +297,7 @@ const ir = (n, e) => {
|
|
|
297
297
|
for (let c = 0; c < t; c++) {
|
|
298
298
|
const d = n[c];
|
|
299
299
|
let l, u, h = -1, g = 0;
|
|
300
|
-
for (; g < d.length && (s.lastIndex = g, u = s.exec(d), u !== null); ) g = s.lastIndex, s === _t ? u[1] === "!--" ? s = Eo : u[1] !== void 0 ? s = Io : u[2] !== void 0 ? (mi.test(u[2]) && (i = RegExp("</" + u[2], "g")), s = ct) : u[3] !== void 0 && (s = ct) : s === ct ? u[0] === ">" ? (s = i ?? _t, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, l = u[1], s = u[3] === void 0 ? ct : u[3] === '"' ?
|
|
300
|
+
for (; g < d.length && (s.lastIndex = g, u = s.exec(d), u !== null); ) g = s.lastIndex, s === _t ? u[1] === "!--" ? s = Eo : u[1] !== void 0 ? s = Io : u[2] !== void 0 ? (mi.test(u[2]) && (i = RegExp("</" + u[2], "g")), s = ct) : u[3] !== void 0 && (s = ct) : s === ct ? u[0] === ">" ? (s = i ?? _t, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, l = u[1], s = u[3] === void 0 ? ct : u[3] === '"' ? jo : Do) : s === jo || s === Do ? s = ct : s === Eo || s === Io ? s = _t : (s = ct, i = void 0);
|
|
301
301
|
const m = s === ct && n[c + 1].startsWith("/>") ? " " : "";
|
|
302
302
|
r += s === _t ? d + tr : h >= 0 ? (o.push(l), d.slice(0, h) + hi + d.slice(h) + at + m) : d + at + (h === -2 ? c : m);
|
|
303
303
|
}
|
|
@@ -415,8 +415,8 @@ let rr = class {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
_$AC(e) {
|
|
418
|
-
let t =
|
|
419
|
-
return t === void 0 &&
|
|
418
|
+
let t = $o.get(e.strings);
|
|
419
|
+
return t === void 0 && $o.set(e.strings, t = new Bn(e)), t;
|
|
420
420
|
}
|
|
421
421
|
k(e) {
|
|
422
422
|
to(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -498,8 +498,8 @@ let rr = class {
|
|
|
498
498
|
vt(this, e);
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
|
-
const
|
|
502
|
-
|
|
501
|
+
const $n = Nt.litHtmlPolyfillSupport;
|
|
502
|
+
$n == null || $n(Bn, no), (Nt.litHtmlVersions ?? (Nt.litHtmlVersions = [])).push("3.3.2");
|
|
503
503
|
const dr = (n, e, t) => {
|
|
504
504
|
const o = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
505
505
|
let i = o._$litPart$;
|
|
@@ -581,7 +581,7 @@ const hr = { attribute: !0, type: String, converter: gn, reflect: !1, hasChanged
|
|
|
581
581
|
}
|
|
582
582
|
throw Error("Unsupported decorator location: " + o);
|
|
583
583
|
};
|
|
584
|
-
function
|
|
584
|
+
function Te(n) {
|
|
585
585
|
return (e, t) => typeof t == "object" ? pr(n, e, t) : ((o, i, r) => {
|
|
586
586
|
const s = i.hasOwnProperty(r);
|
|
587
587
|
return i.constructor.createProperty(r, o), s ? Object.getOwnPropertyDescriptor(i, r) : void 0;
|
|
@@ -593,7 +593,7 @@ function Ue(n) {
|
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
595
|
function Ze(n) {
|
|
596
|
-
return
|
|
596
|
+
return Te({ ...n, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
599
599
|
* @license
|
|
@@ -651,19 +651,19 @@ var _r = { 7: function(n, e, t) {
|
|
|
651
651
|
function c(x, P) {
|
|
652
652
|
var A = typeof Symbol == "function" && x[Symbol.iterator];
|
|
653
653
|
if (!A) return x;
|
|
654
|
-
var S, O,
|
|
654
|
+
var S, O, j = A.call(x), U = [];
|
|
655
655
|
try {
|
|
656
|
-
for (; (P === void 0 || P-- > 0) && !(S =
|
|
656
|
+
for (; (P === void 0 || P-- > 0) && !(S = j.next()).done; ) U.push(S.value);
|
|
657
657
|
} catch (N) {
|
|
658
658
|
O = { error: N };
|
|
659
659
|
} finally {
|
|
660
660
|
try {
|
|
661
|
-
S && !S.done && (A =
|
|
661
|
+
S && !S.done && (A = j.return) && A.call(j);
|
|
662
662
|
} finally {
|
|
663
663
|
if (O) throw O.error;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
return
|
|
666
|
+
return U;
|
|
667
667
|
}
|
|
668
668
|
function d(x, P) {
|
|
669
669
|
return [x, !x || x.endsWith("/") ? "" : "/", P, ".json"].join("");
|
|
@@ -671,28 +671,28 @@ var _r = { 7: function(n, e, t) {
|
|
|
671
671
|
function l(x, P) {
|
|
672
672
|
var A = x;
|
|
673
673
|
return P && Object.keys(P).forEach(function(S) {
|
|
674
|
-
var O = P[S],
|
|
675
|
-
A = A.replace(
|
|
674
|
+
var O = P[S], j = new RegExp("{".concat(S, "}"), "gm");
|
|
675
|
+
A = A.replace(j, O.toString());
|
|
676
676
|
}), A;
|
|
677
677
|
}
|
|
678
678
|
function u(x, P, A) {
|
|
679
679
|
var S = x[P];
|
|
680
680
|
if (!S) return A;
|
|
681
|
-
var O = A.split("."),
|
|
681
|
+
var O = A.split("."), j = "";
|
|
682
682
|
do {
|
|
683
|
-
var
|
|
684
|
-
|
|
683
|
+
var U = S[j += O.shift()];
|
|
684
|
+
U === void 0 || typeof U != "object" && O.length ? O.length ? j += "." : S = A : (S = U, j = "");
|
|
685
685
|
} while (O.length);
|
|
686
686
|
return S;
|
|
687
687
|
}
|
|
688
688
|
var h = {}, g = { root: "", lang: "en", fallbackLang: "en" }, m = i.createContext(null);
|
|
689
689
|
o.TranslateContext = m, o.TranslateProvider = function(x) {
|
|
690
|
-
var P = function(
|
|
691
|
-
|
|
692
|
-
var ae = c(r.useState(
|
|
690
|
+
var P = function(U, N) {
|
|
691
|
+
U = Object.assign({}, g, U), h = N || h;
|
|
692
|
+
var ae = c(r.useState(U.lang), 2), ke = ae[0], se = ae[1], Se = c(r.useState(h), 2), M = Se[0], H = Se[1], ye = c(r.useState(!1), 2), Ue = ye[0], Ie = ye[1], Ne = function(le) {
|
|
693
693
|
if (!M.hasOwnProperty(le)) {
|
|
694
694
|
Ie(!1);
|
|
695
|
-
var ce = d(
|
|
695
|
+
var ce = d(U.root, le);
|
|
696
696
|
fetch(ce).then(function(me) {
|
|
697
697
|
return me.json();
|
|
698
698
|
}).then(function(me) {
|
|
@@ -703,14 +703,14 @@ var _r = { 7: function(n, e, t) {
|
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
705
|
return r.useEffect(function() {
|
|
706
|
-
Ne(
|
|
706
|
+
Ne(U.fallbackLang), Ne(ke);
|
|
707
707
|
}, [ke]), { lang: ke, setLang: se, t: function(le, ce) {
|
|
708
708
|
if (!M.hasOwnProperty(ke)) return le;
|
|
709
709
|
var me = u(M, ke, le);
|
|
710
|
-
return me === le && ke !==
|
|
711
|
-
}, isReady:
|
|
712
|
-
}({ root: x.root || "assets", lang: x.lang || "en", fallbackLang: x.fallbackLang || "en" }, x.translations), A = P.t, S = P.setLang, O = P.lang,
|
|
713
|
-
return i.h(m.Provider, { value: { t: A, setLang: S, lang: O, isReady:
|
|
710
|
+
return me === le && ke !== U.fallbackLang && (me = u(M, U.fallbackLang, le)), l(me, ce);
|
|
711
|
+
}, isReady: Ue };
|
|
712
|
+
}({ root: x.root || "assets", lang: x.lang || "en", fallbackLang: x.fallbackLang || "en" }, x.translations), A = P.t, S = P.setLang, O = P.lang, j = P.isReady;
|
|
713
|
+
return i.h(m.Provider, { value: { t: A, setLang: S, lang: O, isReady: j } }, x.children);
|
|
714
714
|
}, o.format = l, o.getResourceUrl = d, o.getValue = u, Object.defineProperty(o, "__esModule", { value: !0 });
|
|
715
715
|
})(e, t(616), t(78));
|
|
716
716
|
}, 633: (n, e) => {
|
|
@@ -819,7 +819,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
819
819
|
return e[1];
|
|
820
820
|
};
|
|
821
821
|
}, 616: (n, e, t) => {
|
|
822
|
-
t.r(e), t.d(e, { Component: () => N, Fragment: () =>
|
|
822
|
+
t.r(e), t.d(e, { Component: () => N, Fragment: () => U, cloneElement: () => We, createContext: () => Fe, createElement: () => S, createRef: () => j, h: () => S, hydrate: () => He, isValidElement: () => s, options: () => i, render: () => fe, toChildArray: () => ye });
|
|
823
823
|
var o, i, r, s, c, d, l, u, h, g = {}, m = [], x = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
824
824
|
function P(f, v) {
|
|
825
825
|
for (var b in v) f[b] = v[b];
|
|
@@ -830,19 +830,19 @@ var _r = { 7: function(n, e, t) {
|
|
|
830
830
|
v && v.removeChild(f);
|
|
831
831
|
}
|
|
832
832
|
function S(f, v, b) {
|
|
833
|
-
var D,
|
|
834
|
-
for (I in v) I == "key" ? D = v[I] : I == "ref" ?
|
|
833
|
+
var D, T, I, z = {};
|
|
834
|
+
for (I in v) I == "key" ? D = v[I] : I == "ref" ? T = v[I] : z[I] = v[I];
|
|
835
835
|
if (arguments.length > 2 && (z.children = arguments.length > 3 ? o.call(arguments, 2) : b), typeof f == "function" && f.defaultProps != null) for (I in f.defaultProps) z[I] === void 0 && (z[I] = f.defaultProps[I]);
|
|
836
|
-
return O(f, z, D,
|
|
836
|
+
return O(f, z, D, T, null);
|
|
837
837
|
}
|
|
838
|
-
function O(f, v, b, D,
|
|
839
|
-
var I = { type: f, props: v, key: b, ref: D, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v:
|
|
840
|
-
return
|
|
838
|
+
function O(f, v, b, D, T) {
|
|
839
|
+
var I = { type: f, props: v, key: b, ref: D, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: T ?? ++r };
|
|
840
|
+
return T == null && i.vnode != null && i.vnode(I), I;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function j() {
|
|
843
843
|
return { current: null };
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function U(f) {
|
|
846
846
|
return f.children;
|
|
847
847
|
}
|
|
848
848
|
function N(f, v) {
|
|
@@ -867,13 +867,13 @@ var _r = { 7: function(n, e, t) {
|
|
|
867
867
|
(!f.__d && (f.__d = !0) && c.push(f) && !Se.__r++ || d !== i.debounceRendering) && ((d = i.debounceRendering) || l)(Se);
|
|
868
868
|
}
|
|
869
869
|
function Se() {
|
|
870
|
-
var f, v, b, D,
|
|
871
|
-
for (c.sort(u); f = c.shift(); ) f.__d && (v = c.length, D = void 0,
|
|
870
|
+
var f, v, b, D, T, I, z, ee;
|
|
871
|
+
for (c.sort(u); f = c.shift(); ) f.__d && (v = c.length, D = void 0, T = void 0, z = (I = (b = f).__v).__e, (ee = b.__P) && (D = [], (T = P({}, I)).__v = I.__v + 1, De(ee, I, T, b.__n, ee.ownerSVGElement !== void 0, I.__h != null ? [z] : null, D, z ?? ae(I), I.__h), k(D, I), I.__e != z && ke(I)), c.length > v && c.sort(u));
|
|
872
872
|
Se.__r = 0;
|
|
873
873
|
}
|
|
874
|
-
function M(f, v, b, D,
|
|
874
|
+
function M(f, v, b, D, T, I, z, ee, G, be) {
|
|
875
875
|
var w, we, J, R, E, xe, V, F = D && D.__k || m, qe = F.length;
|
|
876
|
-
for (b.__k = [], w = 0; w < v.length; w++) if ((R = b.__k[w] = (R = v[w]) == null || typeof R == "boolean" || typeof R == "function" ? null : typeof R == "string" || typeof R == "number" || typeof R == "bigint" ? O(null, R, null, null, R) : Array.isArray(R) ? O(
|
|
876
|
+
for (b.__k = [], w = 0; w < v.length; w++) if ((R = b.__k[w] = (R = v[w]) == null || typeof R == "boolean" || typeof R == "function" ? null : typeof R == "string" || typeof R == "number" || typeof R == "bigint" ? O(null, R, null, null, R) : Array.isArray(R) ? O(U, { children: R }, null, null, null) : R.__b > 0 ? O(R.type, R.props, R.key, R.ref ? R.ref : null, R.__v) : R) != null) {
|
|
877
877
|
if (R.__ = b, R.__b = b.__b + 1, (J = F[w]) === null || J && R.key == J.key && R.type === J.type) F[w] = void 0;
|
|
878
878
|
else for (we = 0; we < qe; we++) {
|
|
879
879
|
if ((J = F[we]) && R.key == J.key && R.type === J.type) {
|
|
@@ -882,13 +882,13 @@ var _r = { 7: function(n, e, t) {
|
|
|
882
882
|
}
|
|
883
883
|
J = null;
|
|
884
884
|
}
|
|
885
|
-
De(f, R, J = J || g,
|
|
885
|
+
De(f, R, J = J || g, T, I, z, ee, G, be), E = R.__e, (we = R.ref) && J.ref != we && (V || (V = []), J.ref && V.push(J.ref, null, R), V.push(we, R.__c || E, R)), E != null ? (xe == null && (xe = E), typeof R.type == "function" && R.__k === J.__k ? R.__d = G = H(R, G, f) : G = Ue(f, R, J, F, E, G), typeof b.type == "function" && (b.__d = G)) : G && J.__e == G && G.parentNode != f && (G = ae(J));
|
|
886
886
|
}
|
|
887
887
|
for (b.__e = xe, w = qe; w--; ) F[w] != null && (typeof b.type == "function" && F[w].__e != null && F[w].__e == b.__d && (b.__d = Ie(D).nextSibling), L(F[w], F[w]));
|
|
888
888
|
if (V) for (w = 0; w < V.length; w++) _(V[w], V[++w], V[++w]);
|
|
889
889
|
}
|
|
890
890
|
function H(f, v, b) {
|
|
891
|
-
for (var D,
|
|
891
|
+
for (var D, T = f.__k, I = 0; T && I < T.length; I++) (D = T[I]) && (D.__ = f, v = typeof D.type == "function" ? H(D, v, b) : Ue(b, D, D, T, D.__e, v));
|
|
892
892
|
return v;
|
|
893
893
|
}
|
|
894
894
|
function ye(f, v) {
|
|
@@ -896,15 +896,15 @@ var _r = { 7: function(n, e, t) {
|
|
|
896
896
|
ye(b, v);
|
|
897
897
|
}) : v.push(f)), v;
|
|
898
898
|
}
|
|
899
|
-
function
|
|
899
|
+
function Ue(f, v, b, D, T, I) {
|
|
900
900
|
var z, ee, G;
|
|
901
901
|
if (v.__d !== void 0) z = v.__d, v.__d = void 0;
|
|
902
|
-
else if (b == null ||
|
|
902
|
+
else if (b == null || T != I || T.parentNode == null) e: if (I == null || I.parentNode !== f) f.appendChild(T), z = null;
|
|
903
903
|
else {
|
|
904
|
-
for (ee = I, G = 0; (ee = ee.nextSibling) && G < D.length; G += 1) if (ee ==
|
|
905
|
-
f.insertBefore(
|
|
904
|
+
for (ee = I, G = 0; (ee = ee.nextSibling) && G < D.length; G += 1) if (ee == T) break e;
|
|
905
|
+
f.insertBefore(T, I), z = I;
|
|
906
906
|
}
|
|
907
|
-
return z !== void 0 ? z :
|
|
907
|
+
return z !== void 0 ? z : T.nextSibling;
|
|
908
908
|
}
|
|
909
909
|
function Ie(f) {
|
|
910
910
|
var v, b, D;
|
|
@@ -917,7 +917,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
917
917
|
function Ne(f, v, b) {
|
|
918
918
|
v[0] === "-" ? f.setProperty(v, b ?? "") : f[v] = b == null ? "" : typeof b != "number" || x.test(v) ? b : b + "px";
|
|
919
919
|
}
|
|
920
|
-
function le(f, v, b, D,
|
|
920
|
+
function le(f, v, b, D, T) {
|
|
921
921
|
var I;
|
|
922
922
|
e: if (v === "style") if (typeof b == "string") f.style.cssText = b;
|
|
923
923
|
else {
|
|
@@ -926,7 +926,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
926
926
|
}
|
|
927
927
|
else if (v[0] === "o" && v[1] === "n") I = v !== (v = v.replace(/Capture$/, "")), v = v.toLowerCase() in f ? v.toLowerCase().slice(2) : v.slice(2), f.l || (f.l = {}), f.l[v + I] = b, b ? D || f.addEventListener(v, I ? me : ce, I) : f.removeEventListener(v, I ? me : ce, I);
|
|
928
928
|
else if (v !== "dangerouslySetInnerHTML") {
|
|
929
|
-
if (
|
|
929
|
+
if (T) v = v.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
930
930
|
else if (v !== "width" && v !== "height" && v !== "href" && v !== "list" && v !== "form" && v !== "tabIndex" && v !== "download" && v in f) try {
|
|
931
931
|
f[v] = b ?? "";
|
|
932
932
|
break e;
|
|
@@ -941,7 +941,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
941
941
|
function me(f) {
|
|
942
942
|
return this.l[f.type + !0](i.event ? i.event(f) : f);
|
|
943
943
|
}
|
|
944
|
-
function De(f, v, b, D,
|
|
944
|
+
function De(f, v, b, D, T, I, z, ee, G) {
|
|
945
945
|
var be, w, we, J, R, E, xe, V, F, qe, it, ge, Vt, rt, q, B = v.type;
|
|
946
946
|
if (v.constructor !== void 0) return null;
|
|
947
947
|
b.__h != null && (G = b.__h, ee = v.__e = b.__e, v.__h = null, I = [ee]), (be = i.__b) && be(v);
|
|
@@ -966,8 +966,8 @@ var _r = { 7: function(n, e, t) {
|
|
|
966
966
|
} else do
|
|
967
967
|
w.__d = !1, ge && ge(v), be = w.render(w.props, w.state, w.context), w.state = w.__s;
|
|
968
968
|
while (w.__d && ++Vt < 25);
|
|
969
|
-
w.state = w.__s, w.getChildContext != null && (D = P(P({}, D), w.getChildContext())), we || w.getSnapshotBeforeUpdate == null || (E = w.getSnapshotBeforeUpdate(J, R)), q = be != null && be.type ===
|
|
970
|
-
} else I == null && v.__v === b.__v ? (v.__k = b.__k, v.__e = b.__e) : v.__e = p(b.__e, v, b, D,
|
|
969
|
+
w.state = w.__s, w.getChildContext != null && (D = P(P({}, D), w.getChildContext())), we || w.getSnapshotBeforeUpdate == null || (E = w.getSnapshotBeforeUpdate(J, R)), q = be != null && be.type === U && be.key == null ? be.props.children : be, M(f, Array.isArray(q) ? q : [q], v, b, D, T, I, z, ee, G), w.base = v.__e, v.__h = null, w.__h.length && z.push(w), xe && (w.__E = w.__ = null), w.__e = !1;
|
|
970
|
+
} else I == null && v.__v === b.__v ? (v.__k = b.__k, v.__e = b.__e) : v.__e = p(b.__e, v, b, D, T, I, z, G);
|
|
971
971
|
(be = i.diffed) && be(v);
|
|
972
972
|
} catch (Qe) {
|
|
973
973
|
v.__v = null, (G || I != null) && (v.__e = ee, v.__h = !!G, I[I.indexOf(ee)] = null), i.__e(Qe, v, b);
|
|
@@ -984,9 +984,9 @@ var _r = { 7: function(n, e, t) {
|
|
|
984
984
|
}
|
|
985
985
|
});
|
|
986
986
|
}
|
|
987
|
-
function p(f, v, b, D,
|
|
987
|
+
function p(f, v, b, D, T, I, z, ee) {
|
|
988
988
|
var G, be, w, we = b.props, J = v.props, R = v.type, E = 0;
|
|
989
|
-
if (R === "svg" && (
|
|
989
|
+
if (R === "svg" && (T = !0), I != null) {
|
|
990
990
|
for (; E < I.length; E++) if ((G = I[E]) && "setAttribute" in G == !!R && (R ? G.localName === R : G.nodeType === 3)) {
|
|
991
991
|
f = G, I[E] = null;
|
|
992
992
|
break;
|
|
@@ -994,7 +994,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
994
994
|
}
|
|
995
995
|
if (f == null) {
|
|
996
996
|
if (R === null) return document.createTextNode(J);
|
|
997
|
-
f =
|
|
997
|
+
f = T ? document.createElementNS("http://www.w3.org/2000/svg", R) : document.createElement(R, J.is && J), I = null, ee = !1;
|
|
998
998
|
}
|
|
999
999
|
if (R === null) we === J || ee && f.data === J || (f.data = J);
|
|
1000
1000
|
else {
|
|
@@ -1006,8 +1006,8 @@ var _r = { 7: function(n, e, t) {
|
|
|
1006
1006
|
var ge;
|
|
1007
1007
|
for (ge in F) ge === "children" || ge === "key" || ge in V || le(xe, ge, null, F[ge], qe);
|
|
1008
1008
|
for (ge in V) it && typeof V[ge] != "function" || ge === "children" || ge === "key" || ge === "value" || ge === "checked" || F[ge] === V[ge] || le(xe, ge, V[ge], F[ge], qe);
|
|
1009
|
-
}(f, J, we,
|
|
1010
|
-
else if (E = v.props.children, M(f, Array.isArray(E) ? E : [E], v, b, D,
|
|
1009
|
+
}(f, J, we, T, ee), w) v.__k = [];
|
|
1010
|
+
else if (E = v.props.children, M(f, Array.isArray(E) ? E : [E], v, b, D, T && R !== "foreignObject", I, z, I ? I[0] : b.__k && ae(b, 0), ee), I != null) for (E = I.length; E--; ) I[E] != null && A(I[E]);
|
|
1011
1011
|
ee || ("value" in J && (E = J.value) !== void 0 && (E !== f.value || R === "progress" && !E || R === "option" && E !== we.value) && le(f, "value", E, we.value, !1), "checked" in J && (E = J.checked) !== void 0 && E !== f.checked && le(f, "checked", E, we.checked, !1));
|
|
1012
1012
|
}
|
|
1013
1013
|
return f;
|
|
@@ -1020,7 +1020,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
function L(f, v, b) {
|
|
1023
|
-
var D,
|
|
1023
|
+
var D, T;
|
|
1024
1024
|
if (i.unmount && i.unmount(f), (D = f.ref) && (D.current && D.current !== f.__e || _(D, null, v)), (D = f.__c) != null) {
|
|
1025
1025
|
if (D.componentWillUnmount) try {
|
|
1026
1026
|
D.componentWillUnmount();
|
|
@@ -1029,48 +1029,48 @@ var _r = { 7: function(n, e, t) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
D.base = D.__P = null, f.__c = void 0;
|
|
1031
1031
|
}
|
|
1032
|
-
if (D = f.__k) for (
|
|
1032
|
+
if (D = f.__k) for (T = 0; T < D.length; T++) D[T] && L(D[T], v, b || typeof f.type != "function");
|
|
1033
1033
|
b || f.__e == null || A(f.__e), f.__ = f.__e = f.__d = void 0;
|
|
1034
1034
|
}
|
|
1035
1035
|
function K(f, v, b) {
|
|
1036
1036
|
return this.constructor(f, b);
|
|
1037
1037
|
}
|
|
1038
1038
|
function fe(f, v, b) {
|
|
1039
|
-
var D,
|
|
1040
|
-
i.__ && i.__(f, v),
|
|
1039
|
+
var D, T, I;
|
|
1040
|
+
i.__ && i.__(f, v), T = (D = typeof b == "function") ? null : b && b.__k || v.__k, I = [], De(v, f = (!D && b || v).__k = S(U, null, [f]), T || g, g, v.ownerSVGElement !== void 0, !D && b ? [b] : T ? null : v.firstChild ? o.call(v.childNodes) : null, I, !D && b ? b : T ? T.__e : v.firstChild, D), k(I, f);
|
|
1041
1041
|
}
|
|
1042
1042
|
function He(f, v) {
|
|
1043
1043
|
fe(f, v, He);
|
|
1044
1044
|
}
|
|
1045
1045
|
function We(f, v, b) {
|
|
1046
|
-
var D,
|
|
1047
|
-
for (I in v) I == "key" ? D = v[I] : I == "ref" ?
|
|
1048
|
-
return arguments.length > 2 && (z.children = arguments.length > 3 ? o.call(arguments, 2) : b), O(f.type, z, D || f.key,
|
|
1046
|
+
var D, T, I, z = P({}, f.props);
|
|
1047
|
+
for (I in v) I == "key" ? D = v[I] : I == "ref" ? T = v[I] : z[I] = v[I];
|
|
1048
|
+
return arguments.length > 2 && (z.children = arguments.length > 3 ? o.call(arguments, 2) : b), O(f.type, z, D || f.key, T || f.ref, null);
|
|
1049
1049
|
}
|
|
1050
1050
|
function Fe(f, v) {
|
|
1051
|
-
var b = { __c: v = "__cC" + h++, __: f, Consumer: function(D,
|
|
1052
|
-
return D.children(
|
|
1051
|
+
var b = { __c: v = "__cC" + h++, __: f, Consumer: function(D, T) {
|
|
1052
|
+
return D.children(T);
|
|
1053
1053
|
}, Provider: function(D) {
|
|
1054
|
-
var
|
|
1055
|
-
return this.getChildContext || (
|
|
1054
|
+
var T, I;
|
|
1055
|
+
return this.getChildContext || (T = [], (I = {})[v] = this, this.getChildContext = function() {
|
|
1056
1056
|
return I;
|
|
1057
1057
|
}, this.shouldComponentUpdate = function(z) {
|
|
1058
|
-
this.props.value !== z.value &&
|
|
1058
|
+
this.props.value !== z.value && T.some(function(ee) {
|
|
1059
1059
|
ee.__e = !0, se(ee);
|
|
1060
1060
|
});
|
|
1061
1061
|
}, this.sub = function(z) {
|
|
1062
|
-
|
|
1062
|
+
T.push(z);
|
|
1063
1063
|
var ee = z.componentWillUnmount;
|
|
1064
1064
|
z.componentWillUnmount = function() {
|
|
1065
|
-
|
|
1065
|
+
T.splice(T.indexOf(z), 1), ee && ee.call(z);
|
|
1066
1066
|
};
|
|
1067
1067
|
}), D.children;
|
|
1068
1068
|
} };
|
|
1069
1069
|
return b.Provider.__ = b.Consumer.contextType = b;
|
|
1070
1070
|
}
|
|
1071
1071
|
o = m.slice, i = { __e: function(f, v, b, D) {
|
|
1072
|
-
for (var
|
|
1073
|
-
if ((I =
|
|
1072
|
+
for (var T, I, z; v = v.__; ) if ((T = v.__c) && !T.__) try {
|
|
1073
|
+
if ((I = T.constructor) && I.getDerivedStateFromError != null && (T.setState(I.getDerivedStateFromError(f)), z = T.__d), T.componentDidCatch != null && (T.componentDidCatch(f, D || {}), z = T.__d), z) return T.__E = T;
|
|
1074
1074
|
} catch (ee) {
|
|
1075
1075
|
f = ee;
|
|
1076
1076
|
}
|
|
@@ -1082,11 +1082,11 @@ var _r = { 7: function(n, e, t) {
|
|
|
1082
1082
|
b = this.__s != null && this.__s !== this.state ? this.__s : this.__s = P({}, this.state), typeof f == "function" && (f = f(P({}, b), this.props)), f && P(b, f), f != null && this.__v && (v && this._sb.push(v), se(this));
|
|
1083
1083
|
}, N.prototype.forceUpdate = function(f) {
|
|
1084
1084
|
this.__v && (this.__e = !0, f && this.__h.push(f), se(this));
|
|
1085
|
-
}, N.prototype.render =
|
|
1085
|
+
}, N.prototype.render = U, c = [], l = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, u = function(f, v) {
|
|
1086
1086
|
return f.__v.__b - v.__v.__b;
|
|
1087
1087
|
}, Se.__r = 0, h = 0;
|
|
1088
1088
|
}, 78: (n, e, t) => {
|
|
1089
|
-
t.r(e), t.d(e, { useCallback: () => se, useContext: () => Se, useDebugValue: () => M, useEffect: () =>
|
|
1089
|
+
t.r(e), t.d(e, { useCallback: () => se, useContext: () => Se, useDebugValue: () => M, useEffect: () => j, useErrorBoundary: () => H, useId: () => ye, useImperativeHandle: () => ae, useLayoutEffect: () => U, useMemo: () => ke, useReducer: () => O, useRef: () => N, useState: () => S });
|
|
1090
1090
|
var o, i, r, s, c = t(616), d = 0, l = [], u = [], h = c.options.__b, g = c.options.__r, m = c.options.diffed, x = c.options.__c, P = c.options.unmount;
|
|
1091
1091
|
function A(k, p) {
|
|
1092
1092
|
c.options.__h && c.options.__h(i, k, d || p), d = 0;
|
|
@@ -1113,8 +1113,8 @@ var _r = { 7: function(n, e, t) {
|
|
|
1113
1113
|
var b = !1;
|
|
1114
1114
|
return v.forEach(function(D) {
|
|
1115
1115
|
if (D.__N) {
|
|
1116
|
-
var
|
|
1117
|
-
D.__ = D.__N, D.__N = void 0,
|
|
1116
|
+
var T = D.__[0];
|
|
1117
|
+
D.__ = D.__N, D.__N = void 0, T !== D.__[0] && (b = !0);
|
|
1118
1118
|
}
|
|
1119
1119
|
}), !(!b && L.__c.props === We) && (!fe || fe.call(this, We, Fe, f));
|
|
1120
1120
|
};
|
|
@@ -1130,11 +1130,11 @@ var _r = { 7: function(n, e, t) {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
return L.__N || L.__;
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function j(k, p) {
|
|
1134
1134
|
var _ = A(o++, 3);
|
|
1135
1135
|
!c.options.__s && me(_.__H, p) && (_.__ = k, _.i = p, i.__H.__h.push(_));
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function U(k, p) {
|
|
1138
1138
|
var _ = A(o++, 4);
|
|
1139
1139
|
!c.options.__s && me(_.__H, p) && (_.__ = k, _.i = p, i.__h.push(_));
|
|
1140
1140
|
}
|
|
@@ -1144,7 +1144,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
1144
1144
|
}, []);
|
|
1145
1145
|
}
|
|
1146
1146
|
function ae(k, p, _) {
|
|
1147
|
-
d = 6,
|
|
1147
|
+
d = 6, U(function() {
|
|
1148
1148
|
return typeof k == "function" ? (k(p()), function() {
|
|
1149
1149
|
return k(null);
|
|
1150
1150
|
}) : k ? (k.current = p(), function() {
|
|
@@ -1185,7 +1185,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
1185
1185
|
}
|
|
1186
1186
|
return k.__;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function Ue() {
|
|
1189
1189
|
for (var k; k = l.shift(); ) if (k.__P && k.__H) try {
|
|
1190
1190
|
k.__H.__h.forEach(le), k.__H.__h.forEach(ce), k.__H.__h = [];
|
|
1191
1191
|
} catch (p) {
|
|
@@ -1203,7 +1203,7 @@ var _r = { 7: function(n, e, t) {
|
|
|
1203
1203
|
}, c.options.diffed = function(k) {
|
|
1204
1204
|
m && m(k);
|
|
1205
1205
|
var p = k.__c;
|
|
1206
|
-
p && p.__H && (p.__H.__h.length && (l.push(p) !== 1 && s === c.options.requestAnimationFrame || ((s = c.options.requestAnimationFrame) || Ne)(
|
|
1206
|
+
p && p.__H && (p.__H.__h.length && (l.push(p) !== 1 && s === c.options.requestAnimationFrame || ((s = c.options.requestAnimationFrame) || Ne)(Ue)), p.__H.__.forEach(function(_) {
|
|
1207
1207
|
_.i && (_.__H = _.i), _.__V !== u && (_.__ = _.__V), _.i = void 0, _.__V = u;
|
|
1208
1208
|
})), r = i = null;
|
|
1209
1209
|
}, c.options.__c = function(k, p) {
|
|
@@ -1359,7 +1359,7 @@ X.n = (n) => {
|
|
|
1359
1359
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1360
1360
|
}, X.nc = void 0;
|
|
1361
1361
|
var re = {};
|
|
1362
|
-
X.d(re, { fK: () => wn, tJ: () => Ii, Z7: () => Cn, Q9: () => Li, Lv: () =>
|
|
1362
|
+
X.d(re, { fK: () => wn, tJ: () => Ii, Z7: () => Cn, Q9: () => Li, Lv: () => ji, qQ: () => xn, I4: () => Mi, O8: () => Ce, ku: () => ro, ls: () => io, bO: () => ao, yv: () => An, AT: () => lo, m_: () => Wt, KG: () => so, DH: () => Sn, kf: () => go, oY: () => $e, xg: () => Ti, Wg: () => Ye, J: () => Ui, AC: () => co, D_: () => Xe, jx: () => $i, nX: () => uo, Nx: () => oo, Sd: () => ft, kz: () => us, fX: () => ho, qA: () => po, tz: () => fo, gN: () => mo });
|
|
1363
1363
|
var Zn = {};
|
|
1364
1364
|
X.r(Zn), X.d(Zn, { apple: () => ca, checkmark: () => da, copy: () => ua, customProvider: () => ha, discord: () => pa, exclamation: () => ma, facebook: () => fa, github: () => ga, google: () => va, linkedin: () => ya, mail: () => _a, microsoft: () => ba, passkey: () => ka, password: () => wa, qrCodeScanner: () => Sa, securityKey: () => xa, spinner: () => Aa });
|
|
1365
1365
|
var C = X(616), br = 0;
|
|
@@ -1410,7 +1410,7 @@ function xr(n, e, t) {
|
|
|
1410
1410
|
function Ar() {
|
|
1411
1411
|
(0, C.render)(this._vdom = null, this._root);
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function To(n, e) {
|
|
1414
1414
|
var t = this;
|
|
1415
1415
|
return (0, C.h)("slot", yn({}, n, { ref: function(o) {
|
|
1416
1416
|
o ? (t.ref = o, t._listener || (t._listener = function(i) {
|
|
@@ -1425,9 +1425,9 @@ function _i(n, e) {
|
|
|
1425
1425
|
for (i = r.length; i--; ) r[i].name !== "slot" && (o[r[i].name] = r[i].value, o[yi(r[i].name)] = r[i].value);
|
|
1426
1426
|
for (i = s.length; i--; ) {
|
|
1427
1427
|
var c = _i(s[i], null), d = s[i].slot;
|
|
1428
|
-
d ? o[d] = (0, C.h)(
|
|
1428
|
+
d ? o[d] = (0, C.h)(To, { name: d }, c) : t[i] = c;
|
|
1429
1429
|
}
|
|
1430
|
-
var l = e ? (0, C.h)(
|
|
1430
|
+
var l = e ? (0, C.h)(To, null, t) : t;
|
|
1431
1431
|
return (0, C.h)(e || n.nodeName.toLowerCase(), o, l);
|
|
1432
1432
|
}
|
|
1433
1433
|
var Z = X(7), y = X(78);
|
|
@@ -1435,7 +1435,7 @@ function bi(n, e) {
|
|
|
1435
1435
|
for (var t in e) n[t] = e[t];
|
|
1436
1436
|
return n;
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1438
|
+
function Uo(n, e) {
|
|
1439
1439
|
for (var t in n) if (t !== "__source" && !(t in e)) return !0;
|
|
1440
1440
|
for (var o in e) if (o !== "__source" && n[o] !== e[o]) return !0;
|
|
1441
1441
|
return !1;
|
|
@@ -1444,7 +1444,7 @@ function No(n) {
|
|
|
1444
1444
|
this.props = n;
|
|
1445
1445
|
}
|
|
1446
1446
|
(No.prototype = new C.Component()).isPureReactComponent = !0, No.prototype.shouldComponentUpdate = function(n, e) {
|
|
1447
|
-
return
|
|
1447
|
+
return Uo(this.props, n) || Uo(this.state, e);
|
|
1448
1448
|
};
|
|
1449
1449
|
var Mo = C.options.__b;
|
|
1450
1450
|
C.options.__b = function(n) {
|
|
@@ -1470,7 +1470,7 @@ function wi(n, e, t) {
|
|
|
1470
1470
|
return wi(o, e, t);
|
|
1471
1471
|
}), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function Tn() {
|
|
1474
1474
|
this.__u = 0, this.t = null, this.__b = null;
|
|
1475
1475
|
}
|
|
1476
1476
|
function Si(n) {
|
|
@@ -1483,7 +1483,7 @@ function Bt() {
|
|
|
1483
1483
|
C.options.unmount = function(n) {
|
|
1484
1484
|
var e = n.__c;
|
|
1485
1485
|
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), Ro && Ro(n);
|
|
1486
|
-
}, (
|
|
1486
|
+
}, (Tn.prototype = new C.Component()).__c = function(n, e) {
|
|
1487
1487
|
var t = e.__c, o = this;
|
|
1488
1488
|
o.t == null && (o.t = []), o.t.push(t);
|
|
1489
1489
|
var i = Si(o.__v), r = !1, s = function() {
|
|
@@ -1501,9 +1501,9 @@ C.options.unmount = function(n) {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
}, d = e.__h === !0;
|
|
1503
1503
|
o.__u++ || d || o.setState({ __a: o.__b = o.__v.__k[0] }), n.then(s, s);
|
|
1504
|
-
},
|
|
1504
|
+
}, Tn.prototype.componentWillUnmount = function() {
|
|
1505
1505
|
this.t = [];
|
|
1506
|
-
},
|
|
1506
|
+
}, Tn.prototype.render = function(n, e) {
|
|
1507
1507
|
if (this.__b) {
|
|
1508
1508
|
if (this.__v.__k) {
|
|
1509
1509
|
var t = document.createElement("div"), o = this.__v.__k[0].__c;
|
|
@@ -1541,7 +1541,7 @@ var qo = function(n, e, t) {
|
|
|
1541
1541
|
qo(n, t, e);
|
|
1542
1542
|
});
|
|
1543
1543
|
};
|
|
1544
|
-
var Or = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Er = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ir = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Dr = /[A-Z0-9]/g,
|
|
1544
|
+
var Or = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Er = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ir = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Dr = /[A-Z0-9]/g, jr = typeof document < "u", $r = function(n) {
|
|
1545
1545
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
1546
1546
|
};
|
|
1547
1547
|
C.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -1554,14 +1554,14 @@ C.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWi
|
|
|
1554
1554
|
var zo = C.options.event;
|
|
1555
1555
|
function Lr() {
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function Tr() {
|
|
1558
1558
|
return this.cancelBubble;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function Ur() {
|
|
1561
1561
|
return this.defaultPrevented;
|
|
1562
1562
|
}
|
|
1563
1563
|
C.options.event = function(n) {
|
|
1564
|
-
return zo && (n = zo(n)), n.persist = Lr, n.isPropagationStopped =
|
|
1564
|
+
return zo && (n = zo(n)), n.persist = Lr, n.isPropagationStopped = Tr, n.isDefaultPrevented = Ur, n.nativeEvent = n;
|
|
1565
1565
|
};
|
|
1566
1566
|
var Ho = { configurable: !0, get: function() {
|
|
1567
1567
|
return this.class;
|
|
@@ -1571,9 +1571,9 @@ C.options.vnode = function(n) {
|
|
|
1571
1571
|
if (typeof e == "string") {
|
|
1572
1572
|
for (var i in o = {}, t) {
|
|
1573
1573
|
var r = t[i];
|
|
1574
|
-
if (!(i === "value" && "defaultValue" in t && r == null ||
|
|
1574
|
+
if (!(i === "value" && "defaultValue" in t && r == null || jr && i === "children" && e === "noscript")) {
|
|
1575
1575
|
var s = i.toLowerCase();
|
|
1576
|
-
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && r === !0 ? r = "" : s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || e !== "input" && e !== "textarea" ||
|
|
1576
|
+
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && r === !0 ? r = "" : s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || e !== "input" && e !== "textarea" || $r(t.type) ? s === "onfocus" ? i = "onfocusin" : s === "onblur" ? i = "onfocusout" : Ir.test(i) ? i = s : e.indexOf("-") === -1 && Er.test(i) ? i = i.replace(Dr, "-$&").toLowerCase() : r === null && (r = void 0) : s = i = "oninput", s === "oninput" && o[i = s] && (i = "oninputCapture"), o[i] = r;
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
e == "select" && o.multiple && Array.isArray(o.value) && (o.value = (0, C.toChildArray)(t.children).forEach(function(c) {
|
|
@@ -1665,7 +1665,7 @@ var zr = 0;
|
|
|
1665
1665
|
function Ei(n) {
|
|
1666
1666
|
return "__private_" + zr++ + "_" + n;
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function Un(n, e) {
|
|
1669
1669
|
if (!Object.prototype.hasOwnProperty.call(n, e)) throw new TypeError("attempted to use private field on non-instance");
|
|
1670
1670
|
return n;
|
|
1671
1671
|
}
|
|
@@ -1674,9 +1674,9 @@ class Ce extends Error {
|
|
|
1674
1674
|
super(e), this.code = void 0, this.cause = void 0, this.code = t, this.cause = o, Object.setPrototypeOf(this, Ce.prototype);
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
-
class
|
|
1677
|
+
class $e extends Ce {
|
|
1678
1678
|
constructor(e) {
|
|
1679
|
-
super("Technical error", "somethingWentWrong", e), Object.setPrototypeOf(this,
|
|
1679
|
+
super("Technical error", "somethingWentWrong", e), Object.setPrototypeOf(this, $e.prototype);
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
1682
|
class wn extends Ce {
|
|
@@ -1837,7 +1837,7 @@ class Hr {
|
|
|
1837
1837
|
const o = { secure: !0, sameSite: this.authCookieSameSite };
|
|
1838
1838
|
this.authCookieDomain !== void 0 && (o.domain = this.authCookieDomain);
|
|
1839
1839
|
const i = _n({}, o, t);
|
|
1840
|
-
if ((i.sameSite === "none" || i.sameSite === "None") && i.secure === !1) throw new
|
|
1840
|
+
if ((i.sameSite === "none" || i.sameSite === "None") && i.secure === !1) throw new $e(new Error("Secure attribute must be set when SameSite=None"));
|
|
1841
1841
|
Nn.set(this.authCookieName, e, i);
|
|
1842
1842
|
}
|
|
1843
1843
|
removeAuthCookie() {
|
|
@@ -1888,7 +1888,7 @@ class Vr {
|
|
|
1888
1888
|
o.open(t.method, r, !0), o.setRequestHeader("Accept", "application/json"), o.setRequestHeader("Content-Type", "application/json"), o.setRequestHeader("X-Language", d), c && o.setRequestHeader("Authorization", `Bearer ${c}`), o.timeout = s, o.withCredentials = !0, o.onload = () => {
|
|
1889
1889
|
i.processHeaders(o), l(new Kr(o));
|
|
1890
1890
|
}, o.onerror = () => {
|
|
1891
|
-
u(new
|
|
1891
|
+
u(new $e());
|
|
1892
1892
|
}, o.ontimeout = () => {
|
|
1893
1893
|
u(new Sn());
|
|
1894
1894
|
}, o.send(t.body ? t.body.toString() : null);
|
|
@@ -1949,7 +1949,7 @@ class lt {
|
|
|
1949
1949
|
this.client = void 0, this.client = new Vr(e, t);
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
|
-
class
|
|
1952
|
+
class ji extends lt {
|
|
1953
1953
|
getDomain(e) {
|
|
1954
1954
|
if (!e) throw new Ye("somethingWentWrong", new Error("email missing from request"));
|
|
1955
1955
|
const t = e.split("@");
|
|
@@ -1962,7 +1962,7 @@ class $i extends lt {
|
|
|
1962
1962
|
const t = this.getDomain(e);
|
|
1963
1963
|
return this.client.get(`/saml/provider?domain=${t}`).then((o) => {
|
|
1964
1964
|
if (o.status == 404) throw new Wt(new Error("provider not found"));
|
|
1965
|
-
if (!o.ok) throw new
|
|
1965
|
+
if (!o.ok) throw new $e(new Error("unable to fetch provider"));
|
|
1966
1966
|
return o.ok;
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
@@ -1998,63 +1998,63 @@ class $i extends lt {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
|
-
class
|
|
2001
|
+
class $i extends lt {
|
|
2002
2002
|
async getInfo(e) {
|
|
2003
2003
|
const t = await this.client.post("/user", { email: e });
|
|
2004
2004
|
if (t.status === 404) throw new Wt();
|
|
2005
|
-
if (!t.ok) throw new
|
|
2005
|
+
if (!t.ok) throw new $e();
|
|
2006
2006
|
return t.json();
|
|
2007
2007
|
}
|
|
2008
2008
|
async create(e) {
|
|
2009
2009
|
const t = await this.client.post("/users", { email: e });
|
|
2010
2010
|
if (t.status === 409) throw new wn();
|
|
2011
2011
|
if (t.status === 403) throw new xn();
|
|
2012
|
-
if (!t.ok) throw new
|
|
2012
|
+
if (!t.ok) throw new $e();
|
|
2013
2013
|
return t.json();
|
|
2014
2014
|
}
|
|
2015
2015
|
async getCurrent() {
|
|
2016
2016
|
const e = await this.client.get("/me");
|
|
2017
2017
|
if (e.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2018
|
-
if (!e.ok) throw new
|
|
2018
|
+
if (!e.ok) throw new $e();
|
|
2019
2019
|
const t = e.json(), o = await this.client.get(`/users/${t.id}`);
|
|
2020
2020
|
if (o.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2021
|
-
if (!o.ok) throw new
|
|
2021
|
+
if (!o.ok) throw new $e();
|
|
2022
2022
|
return o.json();
|
|
2023
2023
|
}
|
|
2024
2024
|
async delete() {
|
|
2025
2025
|
const e = await this.client.delete("/user");
|
|
2026
2026
|
if (e.ok) return this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), void this.client.dispatcher.dispatchUserDeletedEvent();
|
|
2027
|
-
throw e.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : new
|
|
2027
|
+
throw e.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : new $e();
|
|
2028
2028
|
}
|
|
2029
2029
|
async logout() {
|
|
2030
2030
|
const e = await this.client.post("/logout");
|
|
2031
|
-
if (this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), this.client.dispatcher.dispatchUserLoggedOutEvent(), e.status !== 401 && !e.ok) throw new
|
|
2031
|
+
if (this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), this.client.dispatcher.dispatchUserLoggedOutEvent(), e.status !== 401 && !e.ok) throw new $e();
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
class Li extends lt {
|
|
2035
2035
|
async list() {
|
|
2036
2036
|
const e = await this.client.get("/emails");
|
|
2037
2037
|
if (e.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2038
|
-
if (!e.ok) throw new
|
|
2038
|
+
if (!e.ok) throw new $e();
|
|
2039
2039
|
return e.json();
|
|
2040
2040
|
}
|
|
2041
2041
|
async create(e) {
|
|
2042
2042
|
const t = await this.client.post("/emails", { address: e });
|
|
2043
2043
|
if (t.ok) return t.json();
|
|
2044
|
-
throw t.status === 400 ? new Cn() : t.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : t.status === 409 ? new An() : new
|
|
2044
|
+
throw t.status === 400 ? new Cn() : t.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : t.status === 409 ? new An() : new $e();
|
|
2045
2045
|
}
|
|
2046
2046
|
async setPrimaryEmail(e) {
|
|
2047
2047
|
const t = await this.client.post(`/emails/${e}/set_primary`);
|
|
2048
2048
|
if (t.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2049
|
-
if (!t.ok) throw new
|
|
2049
|
+
if (!t.ok) throw new $e();
|
|
2050
2050
|
}
|
|
2051
2051
|
async delete(e) {
|
|
2052
2052
|
const t = await this.client.delete(`/emails/${e}`);
|
|
2053
2053
|
if (t.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2054
|
-
if (!t.ok) throw new
|
|
2054
|
+
if (!t.ok) throw new $e();
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
|
-
class
|
|
2057
|
+
class Ti extends lt {
|
|
2058
2058
|
async auth(e, t) {
|
|
2059
2059
|
const o = new URL("/thirdparty/auth", this.client.api);
|
|
2060
2060
|
if (!e) throw new Ye("somethingWentWrong", new Error("provider missing from request"));
|
|
@@ -2091,13 +2091,13 @@ class Ui extends lt {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
class
|
|
2094
|
+
class Ui extends lt {
|
|
2095
2095
|
async validate() {
|
|
2096
2096
|
const e = new URLSearchParams(window.location.search).get("hanko_token");
|
|
2097
2097
|
if (!e) return;
|
|
2098
2098
|
window.history.replaceState(null, null, window.location.pathname);
|
|
2099
2099
|
const t = await this.client.post("/token", { value: e });
|
|
2100
|
-
if (!t.ok) throw new
|
|
2100
|
+
if (!t.ok) throw new $e();
|
|
2101
2101
|
return t.json();
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
@@ -2152,7 +2152,7 @@ class Pn {
|
|
|
2152
2152
|
class go extends lt {
|
|
2153
2153
|
async validate() {
|
|
2154
2154
|
const e = await this.client.get("/sessions/validate");
|
|
2155
|
-
if (!e.ok) throw new
|
|
2155
|
+
if (!e.ok) throw new $e();
|
|
2156
2156
|
return await e.json();
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
@@ -2163,7 +2163,7 @@ class Zr extends lt {
|
|
|
2163
2163
|
const t = this.client._fetch_blocking("/sessions/validate", { method: "GET" });
|
|
2164
2164
|
e = JSON.parse(t);
|
|
2165
2165
|
} catch (t) {
|
|
2166
|
-
throw new
|
|
2166
|
+
throw new $e(t);
|
|
2167
2167
|
}
|
|
2168
2168
|
return !!e && e.is_valid;
|
|
2169
2169
|
}
|
|
@@ -2293,10 +2293,10 @@ class Xr extends Di {
|
|
|
2293
2293
|
var mt, bt = Ei("actionDefinitions"), Mn = Ei("createActionsProxy");
|
|
2294
2294
|
class Rn {
|
|
2295
2295
|
toJSON() {
|
|
2296
|
-
return { name: this.name, payload: this.payload, error: this.error, status: this.status, csrf_token: this.csrf_token, actions:
|
|
2296
|
+
return { name: this.name, payload: this.payload, error: this.error, status: this.status, csrf_token: this.csrf_token, actions: Un(this, bt)[bt] };
|
|
2297
2297
|
}
|
|
2298
2298
|
constructor({ name: e, payload: t, error: o, status: i, actions: r, csrf_token: s }, c) {
|
|
2299
|
-
Object.defineProperty(this, Mn, { value: ea }), this.name = void 0, this.payload = void 0, this.error = void 0, this.status = void 0, this.csrf_token = void 0, Object.defineProperty(this, bt, { writable: !0, value: void 0 }), this.actions = void 0, this.fetchNextState = void 0, this.name = e, this.payload = t, this.error = o, this.status = i, this.csrf_token = s,
|
|
2299
|
+
Object.defineProperty(this, Mn, { value: ea }), this.name = void 0, this.payload = void 0, this.error = void 0, this.status = void 0, this.csrf_token = void 0, Object.defineProperty(this, bt, { writable: !0, value: void 0 }), this.actions = void 0, this.fetchNextState = void 0, this.name = e, this.payload = t, this.error = o, this.status = i, this.csrf_token = s, Un(this, bt)[bt] = r, this.actions = Un(this, Mn)[Mn](r, s), this.fetchNextState = c;
|
|
2300
2300
|
}
|
|
2301
2301
|
runAction(e, t) {
|
|
2302
2302
|
const o = {};
|
|
@@ -2407,7 +2407,7 @@ class Mi extends Pn {
|
|
|
2407
2407
|
constructor(e, t) {
|
|
2408
2408
|
super(), this.api = void 0, this.user = void 0, this.email = void 0, this.thirdParty = void 0, this.enterprise = void 0, this.token = void 0, this.sessionClient = void 0, this.session = void 0, this.relay = void 0, this.flow = void 0;
|
|
2409
2409
|
const o = { timeout: 13e3, cookieName: "hanko", localStorageKey: "hanko", sessionCheckInterval: 3e4, sessionCheckChannelName: "hanko-session-check", sessionTokenLocation: "cookie" };
|
|
2410
|
-
(t == null ? void 0 : t.cookieName) !== void 0 && (o.cookieName = t.cookieName), (t == null ? void 0 : t.timeout) !== void 0 && (o.timeout = t.timeout), (t == null ? void 0 : t.localStorageKey) !== void 0 && (o.localStorageKey = t.localStorageKey), (t == null ? void 0 : t.cookieDomain) !== void 0 && (o.cookieDomain = t.cookieDomain), (t == null ? void 0 : t.cookieSameSite) !== void 0 && (o.cookieSameSite = t.cookieSameSite), (t == null ? void 0 : t.lang) !== void 0 && (o.lang = t.lang), (t == null ? void 0 : t.sessionCheckInterval) !== void 0 && (o.sessionCheckInterval = t.sessionCheckInterval < 3e3 ? 3e3 : t.sessionCheckInterval), (t == null ? void 0 : t.sessionCheckChannelName) !== void 0 && (o.sessionCheckChannelName = t.sessionCheckChannelName), (t == null ? void 0 : t.sessionTokenLocation) !== void 0 && (o.sessionTokenLocation = t.sessionTokenLocation), this.api = e, this.user = new
|
|
2410
|
+
(t == null ? void 0 : t.cookieName) !== void 0 && (o.cookieName = t.cookieName), (t == null ? void 0 : t.timeout) !== void 0 && (o.timeout = t.timeout), (t == null ? void 0 : t.localStorageKey) !== void 0 && (o.localStorageKey = t.localStorageKey), (t == null ? void 0 : t.cookieDomain) !== void 0 && (o.cookieDomain = t.cookieDomain), (t == null ? void 0 : t.cookieSameSite) !== void 0 && (o.cookieSameSite = t.cookieSameSite), (t == null ? void 0 : t.lang) !== void 0 && (o.lang = t.lang), (t == null ? void 0 : t.sessionCheckInterval) !== void 0 && (o.sessionCheckInterval = t.sessionCheckInterval < 3e3 ? 3e3 : t.sessionCheckInterval), (t == null ? void 0 : t.sessionCheckChannelName) !== void 0 && (o.sessionCheckChannelName = t.sessionCheckChannelName), (t == null ? void 0 : t.sessionTokenLocation) !== void 0 && (o.sessionTokenLocation = t.sessionTokenLocation), this.api = e, this.user = new $i(e, o), this.email = new Li(e, o), this.thirdParty = new Ti(e, o), this.enterprise = new ji(e, o), this.token = new Ui(e, o), this.sessionClient = new go(e, o), this.session = new Zr(e, o), this.relay = new Xr(e, o), this.flow = new ta(e, o);
|
|
2411
2411
|
}
|
|
2412
2412
|
setLang(e) {
|
|
2413
2413
|
this.flow.client.lang = e;
|
|
@@ -2447,9 +2447,9 @@ var sn = X(697), wt = {};
|
|
|
2447
2447
|
wt.setAttributes = nt(), wt.insert = (n) => {
|
|
2448
2448
|
window._hankoStyle = n;
|
|
2449
2449
|
}, wt.domAPI = tt(), wt.insertStyleElement = ot(), et()(sn.A, wt);
|
|
2450
|
-
const
|
|
2450
|
+
const $ = sn.A && sn.A.locals ? sn.A.locals : void 0;
|
|
2451
2451
|
var la = X(633), Q = X.n(la);
|
|
2452
|
-
const ca = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-apple", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "20.5 16 15 19", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z" }) })), da = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => a("svg", Object.assign({ id: "icon-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "4 4 40 40", width: e, height: e, className: Q()(j.checkmark, n && j.secondary, t && j.fadeOut, o && j.disabled) }, { children: a("path", { d: "M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" }) })), ua = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" }) })), ha = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-custom-provider", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: [a("path", { d: "M0 0h24v24H0z", fill: "none" }), a("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" })] })), pa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-discord", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 0 127.14 96.36", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" }) })), ma = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-exclamation", xmlns: "http://www.w3.org/2000/svg", viewBox: "5 2 13 20", width: n, height: n, className: Q()(j.exclamationMark, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) })), fa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [a("defs", Object.assign({ id: "defs13" }, { children: a("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: a("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), a("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: a("g", Object.assign({ id: "g19" }, { children: a("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [a("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: a("path", { className: Q()(j.facebookIcon, t ? j.disabledOutline : j.outline), d: "m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0", id: "path29" }) })), a("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: a("path", { className: Q()(j.facebookIcon, t ? j.disabledLetter : j.letter), d: "M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z", id: "path33" }) }))] })) })) }))] })), ga = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-github", xmlns: "http://www.w3.org/2000/svg", fill: "#fff", viewBox: "0 0 97.63 96", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: [a("path", { d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" }), " "] })), va = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-google", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: j.googleIcon }, { children: [a("path", { className: Q()(j.googleIcon, e ? j.disabled : j.blue), d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), a("path", { className: Q()(j.googleIcon, e ? j.disabled : j.green), d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), a("path", { className: Q()(j.googleIcon, e ? j.disabled : j.yellow), d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), a("path", { className: Q()(j.googleIcon, e ? j.disabled : j.red), d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }), a("path", { d: "M1 1h22v22H1z", fill: "none" })] })), ya = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-linkedin", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, viewBox: "0 0 24 24", height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z" }) })), _a = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-mail", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z" }) })), ba = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-microsoft", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: j.microsoftIcon }, { children: [a("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.blue), x: "1", y: "1", width: "9", height: "9" }), a("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.green), x: "1", y: "11", width: "9", height: "9" }), a("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.yellow), x: "11", y: "1", width: "9", height: "9" }), a("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.red), x: "11", y: "11", width: "9", height: "9" })] })), ka = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-passkey", xmlns: "http://www.w3.org/2000/svg", viewBox: "3 1.5 19.5 19", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("g", Object.assign({ id: "icon-passkey-all" }, { children: [a("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), a("path", { id: "icon-passkey-key", d: "M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z" }), a("path", { id: "icon-passkey-body", d: "M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z" })] })) })), wa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-password", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z" }) })), Sa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z" }) })), xa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: a("path", { d: "M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z" }) })), Aa = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-spinner", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()(j.loadingSpinner, e && j.disabled) }, { children: [a("path", { d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z", opacity: ".25" }), a("path", { d: "M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z" })] })), Ht = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => a(Zn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), yo = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: r, maxWidth: s }) => a(C.Fragment, { children: a("div", e ? Object.assign({ className: Q()(j.loadingSpinnerWrapper, j.centerContent, s && j.maxWidth) }, { children: a(Ht, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Q()(j.loadingSpinnerWrapper, j.centerContent, s && j.maxWidth) }, { children: a(Ht, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: r ? j.loadingSpinnerWrapperIcon : j.loadingSpinnerWrapper }, { children: n })) }), Ca = () => {
|
|
2452
|
+
const ca = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-apple", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "20.5 16 15 19", className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z" }) })), da = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => a("svg", Object.assign({ id: "icon-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "4 4 40 40", width: e, height: e, className: Q()($.checkmark, n && $.secondary, t && $.fadeOut, o && $.disabled) }, { children: a("path", { d: "M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" }) })), ua = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" }) })), ha = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-custom-provider", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: [a("path", { d: "M0 0h24v24H0z", fill: "none" }), a("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" })] })), pa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-discord", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 0 127.14 96.36", className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" }) })), ma = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-exclamation", xmlns: "http://www.w3.org/2000/svg", viewBox: "5 2 13 20", width: n, height: n, className: Q()($.exclamationMark, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) })), fa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [a("defs", Object.assign({ id: "defs13" }, { children: a("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: a("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), a("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: a("g", Object.assign({ id: "g19" }, { children: a("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [a("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: a("path", { className: Q()($.facebookIcon, t ? $.disabledOutline : $.outline), d: "m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0", id: "path29" }) })), a("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: a("path", { className: Q()($.facebookIcon, t ? $.disabledLetter : $.letter), d: "M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z", id: "path33" }) }))] })) })) }))] })), ga = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-github", xmlns: "http://www.w3.org/2000/svg", fill: "#fff", viewBox: "0 0 97.63 96", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: [a("path", { d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" }), " "] })), va = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-google", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: $.googleIcon }, { children: [a("path", { className: Q()($.googleIcon, e ? $.disabled : $.blue), d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), a("path", { className: Q()($.googleIcon, e ? $.disabled : $.green), d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), a("path", { className: Q()($.googleIcon, e ? $.disabled : $.yellow), d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), a("path", { className: Q()($.googleIcon, e ? $.disabled : $.red), d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }), a("path", { d: "M1 1h22v22H1z", fill: "none" })] })), ya = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-linkedin", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, viewBox: "0 0 24 24", height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z" }) })), _a = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-mail", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z" }) })), ba = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-microsoft", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: $.microsoftIcon }, { children: [a("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.blue), x: "1", y: "1", width: "9", height: "9" }), a("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.green), x: "1", y: "11", width: "9", height: "9" }), a("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.yellow), x: "11", y: "1", width: "9", height: "9" }), a("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.red), x: "11", y: "11", width: "9", height: "9" })] })), ka = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-passkey", xmlns: "http://www.w3.org/2000/svg", viewBox: "3 1.5 19.5 19", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("g", Object.assign({ id: "icon-passkey-all" }, { children: [a("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), a("path", { id: "icon-passkey-key", d: "M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z" }), a("path", { id: "icon-passkey-body", d: "M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z" })] })) })), wa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ id: "icon-password", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z" }) })), Sa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z" }) })), xa = ({ size: n, secondary: e, disabled: t }) => a("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()($.icon, e && $.secondary, t && $.disabled) }, { children: a("path", { d: "M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z" }) })), Aa = ({ size: n, disabled: e }) => a("svg", Object.assign({ id: "icon-spinner", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()($.loadingSpinner, e && $.disabled) }, { children: [a("path", { d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z", opacity: ".25" }), a("path", { d: "M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z" })] })), Ht = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => a(Zn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), yo = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: r, maxWidth: s }) => a(C.Fragment, { children: a("div", e ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, s && $.maxWidth) }, { children: a(Ht, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, s && $.maxWidth) }, { children: a(Ht, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: r ? $.loadingSpinnerWrapperIcon : $.loadingSpinnerWrapper }, { children: n })) }), Ca = () => {
|
|
2453
2453
|
const { setLoadingAction: n } = (0, y.useContext)(pe);
|
|
2454
2454
|
return (0, y.useEffect)(() => {
|
|
2455
2455
|
n(null);
|
|
@@ -2469,13 +2469,13 @@ const Pe = ln.A && ln.A.locals ? ln.A.locals : void 0, Pa = () => {
|
|
|
2469
2469
|
return a("span", Object.assign({ className: Q()(Pe.lastUsed) }, { children: n("labels.lastUsed") }));
|
|
2470
2470
|
}, ne = (n) => {
|
|
2471
2471
|
var { uiAction: e, title: t, children: o, secondary: i, dangerous: r, autofocus: s, showLastUsed: c, onClick: d, icon: l } = n, u = function(S, O) {
|
|
2472
|
-
var
|
|
2473
|
-
for (var
|
|
2472
|
+
var j = {};
|
|
2473
|
+
for (var U in S) Object.prototype.hasOwnProperty.call(S, U) && O.indexOf(U) < 0 && (j[U] = S[U]);
|
|
2474
2474
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2475
2475
|
var N = 0;
|
|
2476
|
-
for (
|
|
2476
|
+
for (U = Object.getOwnPropertySymbols(S); N < U.length; N++) O.indexOf(U[N]) < 0 && Object.prototype.propertyIsEnumerable.call(S, U[N]) && (j[U[N]] = S[U[N]]);
|
|
2477
2477
|
}
|
|
2478
|
-
return
|
|
2478
|
+
return j;
|
|
2479
2479
|
}(n, ["uiAction", "title", "children", "secondary", "dangerous", "autofocus", "showLastUsed", "onClick", "icon"]);
|
|
2480
2480
|
const h = (0, y.useRef)(null), { uiState: g, isDisabled: m } = (0, y.useContext)(pe);
|
|
2481
2481
|
(0, y.useEffect)(() => {
|
|
@@ -2509,7 +2509,7 @@ var cn = X(111), xt = {};
|
|
|
2509
2509
|
xt.setAttributes = nt(), xt.insert = (n) => {
|
|
2510
2510
|
window._hankoStyle = n;
|
|
2511
2511
|
}, xt.domAPI = tt(), xt.insertStyleElement = ot(), et()(cn.A, xt);
|
|
2512
|
-
const
|
|
2512
|
+
const Tt = cn.A && cn.A.locals ? cn.A.locals : void 0, _o = ({ children: n, hidden: e }) => e ? null : a("section", Object.assign({ part: "divider", className: Tt.divider }, { children: [a("div", { part: "divider-line", className: Tt.line }), n ? a("div", Object.assign({ part: "divider-text", class: Tt.text }, { children: n })) : null, a("div", { part: "divider-line", className: Tt.line })] }));
|
|
2513
2513
|
var dn = X(905), At = {};
|
|
2514
2514
|
At.setAttributes = nt(), At.insert = (n) => {
|
|
2515
2515
|
window._hankoStyle = n;
|
|
@@ -2538,14 +2538,14 @@ Pt.setAttributes = nt(), Pt.insert = (n) => {
|
|
|
2538
2538
|
window._hankoStyle = n;
|
|
2539
2539
|
}, Pt.domAPI = tt(), Pt.insertStyleElement = ot(), et()(hn.A, Pt);
|
|
2540
2540
|
const Jt = hn.A && hn.A.locals ? hn.A.locals : void 0, Yn = (n) => {
|
|
2541
|
-
var { loadingSpinnerPosition: e, dangerous: t = !1, onClick: o, uiAction: i } = n, r = function(O,
|
|
2542
|
-
var
|
|
2543
|
-
for (var N in O) Object.prototype.hasOwnProperty.call(O, N) &&
|
|
2541
|
+
var { loadingSpinnerPosition: e, dangerous: t = !1, onClick: o, uiAction: i } = n, r = function(O, j) {
|
|
2542
|
+
var U = {};
|
|
2543
|
+
for (var N in O) Object.prototype.hasOwnProperty.call(O, N) && j.indexOf(N) < 0 && (U[N] = O[N]);
|
|
2544
2544
|
if (O != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2545
2545
|
var ae = 0;
|
|
2546
|
-
for (N = Object.getOwnPropertySymbols(O); ae < N.length; ae++)
|
|
2546
|
+
for (N = Object.getOwnPropertySymbols(O); ae < N.length; ae++) j.indexOf(N[ae]) < 0 && Object.prototype.propertyIsEnumerable.call(O, N[ae]) && (U[N[ae]] = O[N[ae]]);
|
|
2547
2547
|
}
|
|
2548
|
-
return
|
|
2548
|
+
return U;
|
|
2549
2549
|
}(n, ["loadingSpinnerPosition", "dangerous", "onClick", "uiAction"]);
|
|
2550
2550
|
const { t: s } = (0, y.useContext)(Z.TranslateContext), { uiState: c, isDisabled: d } = (0, y.useContext)(pe), [l, u] = (0, y.useState)();
|
|
2551
2551
|
let h;
|
|
@@ -2574,7 +2574,7 @@ const Jt = hn.A && hn.A.locals ? hn.A.locals : void 0, Yn = (n) => {
|
|
|
2574
2574
|
return r;
|
|
2575
2575
|
}(n, ["label"]);
|
|
2576
2576
|
return a("div", Object.assign({ className: Pe.inputWrapper }, { children: a("label", Object.assign({ className: Pe.checkboxWrapper }, { children: [a("input", Object.assign({ part: "input checkbox-input", type: "checkbox", "aria-label": e, className: Pe.checkbox }, t)), a("span", Object.assign({ className: Q()(Pe.label, t.disabled ? Pe.disabled : null) }, { children: e }))] })) }));
|
|
2577
|
-
}, On = () => a("section", { className:
|
|
2577
|
+
}, On = () => a("section", { className: Tt.spacer });
|
|
2578
2578
|
var Ot = function(n, e, t, o) {
|
|
2579
2579
|
return new (t || (t = Promise))(function(i, r) {
|
|
2580
2580
|
function s(l) {
|
|
@@ -2602,14 +2602,14 @@ var Ot = function(n, e, t, o) {
|
|
|
2602
2602
|
};
|
|
2603
2603
|
const Oa = (n) => {
|
|
2604
2604
|
var e, t, o, i, r, s, c, d, l;
|
|
2605
|
-
const { t: u } = (0, y.useContext)(Z.TranslateContext), { init: h, hanko: g, initialComponentName: m, setLoadingAction: x, uiState: P, setUIState: A, stateHandler: S, hidePasskeyButtonOnLogin: O, lastLogin:
|
|
2605
|
+
const { t: u } = (0, y.useContext)(Z.TranslateContext), { init: h, hanko: g, initialComponentName: m, setLoadingAction: x, uiState: P, setUIState: A, stateHandler: S, hidePasskeyButtonOnLogin: O, lastLogin: j } = (0, y.useContext)(pe), [U, N] = (0, y.useState)(null), [ae, ke] = (0, y.useState)(P.username || P.email), { flowState: se } = Me(n.state), Se = ft.supported(), [M, H] = (0, y.useState)(void 0), [ye, Ue] = (0, y.useState)(null), [Ie, Ne] = (0, y.useState)(!1), le = (k) => {
|
|
2606
2606
|
if (k.preventDefault(), k.target instanceof HTMLInputElement) {
|
|
2607
2607
|
const { value: p } = k.target;
|
|
2608
2608
|
ke(p), ce(p);
|
|
2609
2609
|
}
|
|
2610
2610
|
}, ce = (k) => {
|
|
2611
2611
|
const p = () => A((L) => Object.assign(Object.assign({}, L), { email: k, username: null })), _ = () => A((L) => Object.assign(Object.assign({}, L), { email: null, username: k }));
|
|
2612
|
-
switch (
|
|
2612
|
+
switch (U) {
|
|
2613
2613
|
case "email":
|
|
2614
2614
|
p();
|
|
2615
2615
|
break;
|
|
@@ -2636,17 +2636,17 @@ const Oa = (n) => {
|
|
|
2636
2636
|
H(_), k.delete("error"), k.delete("error_description"), history.replaceState(null, null, window.location.pathname + (k.size < 1 ? "" : `?${k.toString()}`));
|
|
2637
2637
|
}, []), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: u("headlines.signIn") }), a(Ee, { state: se, error: M }), De ? a(C.Fragment, { children: [a(oe, Object.assign({ onSubmit: (k) => Ot(void 0, void 0, void 0, function* () {
|
|
2638
2638
|
k.preventDefault(), x("email-submit");
|
|
2639
|
-
const p = yield se.actions.continue_with_login_identifier({ [
|
|
2639
|
+
const p = yield se.actions.continue_with_login_identifier({ [U]: ae }).run();
|
|
2640
2640
|
ce(ae), x(null), yield g.flow.run(p, S);
|
|
2641
2641
|
}), maxWidth: !0 }, { children: [De.email ? a(Ve, { type: "email", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.email, onInput: le, value: ae, placeholder: u("labels.email"), pattern: "^[^@]+@[^@]+\\.[^@]+$" }) : De.username ? a(Ve, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.username, onInput: le, value: ae, placeholder: u("labels.username") }) : a(Ve, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.identifier, onInput: le, value: ae, placeholder: u("labels.emailOrUsername") }), a(ne, Object.assign({ uiAction: "email-submit" }, { children: u("labels.continue") }))] })), a(_o, Object.assign({ hidden: !me }, { children: u("labels.or") }))] }) : null, !((i = (o = se.actions).webauthn_generate_request_options) === null || i === void 0) && i.call(o, null) && !O ? a(oe, Object.assign({ onSubmit: (k) => ((p) => Ot(void 0, void 0, void 0, function* () {
|
|
2642
2642
|
p.preventDefault(), x("passkey-submit");
|
|
2643
2643
|
const _ = yield se.actions.webauthn_generate_request_options(null).run();
|
|
2644
2644
|
yield g.flow.run(_, S);
|
|
2645
2645
|
}))(k) }, { children: a(ne, Object.assign({ uiAction: "passkey-submit", secondary: !0, title: Se ? null : u("labels.webauthnUnsupported"), disabled: !Se, icon: "passkey" }, { children: u("labels.signInPasskey") })) })) : null, !((s = (r = se.actions).thirdparty_oauth) === null || s === void 0) && s.call(r, null) ? (c = se.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || c === void 0 ? void 0 : c.map((k) => a(oe, Object.assign({ onSubmit: (p) => ((_, L) => Ot(void 0, void 0, void 0, function* () {
|
|
2646
|
-
_.preventDefault(),
|
|
2646
|
+
_.preventDefault(), Ue(L);
|
|
2647
2647
|
const K = yield se.actions.thirdparty_oauth({ provider: L, redirect_to: window.location.toString() }).run();
|
|
2648
|
-
K.error &&
|
|
2649
|
-
}))(p, k.value) }, { children: a(ne, Object.assign({ isLoading: k.value == ye, secondary: !0, icon: k.value.startsWith("custom_") ? "customProvider" : k.value, showLastUsed: (
|
|
2648
|
+
K.error && Ue(null), yield g.flow.run(K, S);
|
|
2649
|
+
}))(p, k.value) }, { children: a(ne, Object.assign({ isLoading: k.value == ye, secondary: !0, icon: k.value.startsWith("custom_") ? "customProvider" : k.value, showLastUsed: (j == null ? void 0 : j.login_method) == "third_party" && (j == null ? void 0 : j.third_party_provider) == k.value }, { children: u("labels.signInWith", { provider: k.name }) })) }), k.value)) : null, ((l = (d = se.actions).remember_me) === null || l === void 0 ? void 0 : l.call(d, null)) && a(C.Fragment, { children: [a(On, {}), a(bo, { required: !1, type: "checkbox", label: u("labels.staySignedIn"), checked: Ie, onChange: (k) => Ot(void 0, void 0, void 0, function* () {
|
|
2650
2650
|
const p = yield se.actions.remember_me({ remember_me: !Ie }).run();
|
|
2651
2651
|
Ne((_) => !_), yield g.flow.run(p, S);
|
|
2652
2652
|
}) })] })] }), a(Re, Object.assign({ hidden: m !== "auth" }, { children: [a("span", { hidden: !0 }), a(te, Object.assign({ uiAction: "switch-flow", onClick: (k) => Ot(void 0, void 0, void 0, function* () {
|
|
@@ -2729,43 +2729,43 @@ var Yt = function(n, e, t, o) {
|
|
|
2729
2729
|
const Da = (n) => {
|
|
2730
2730
|
var e, t;
|
|
2731
2731
|
const { t: o } = (0, y.useContext)(Z.TranslateContext), { flowState: i } = Me(n.state), { hanko: r, uiState: s, setUIState: c, setLoadingAction: d, setSucceededAction: l, stateHandler: u } = (0, y.useContext)(pe), [h, g] = (0, y.useState)(), [m, x] = (0, y.useState)(i.payload.resend_after), [P, A] = (0, y.useState)([]), S = (0, y.useMemo)(() => {
|
|
2732
|
-
var
|
|
2733
|
-
return ((
|
|
2734
|
-
}, [i]), O = (0, y.useCallback)((
|
|
2732
|
+
var j;
|
|
2733
|
+
return ((j = i.error) === null || j === void 0 ? void 0 : j.code) === "passcode_max_attempts_reached";
|
|
2734
|
+
}, [i]), O = (0, y.useCallback)((j) => Yt(void 0, void 0, void 0, function* () {
|
|
2735
2735
|
d("passcode-submit");
|
|
2736
|
-
const
|
|
2737
|
-
d(null), yield r.flow.run(
|
|
2736
|
+
const U = yield i.actions.verify_passcode({ code: j }).run();
|
|
2737
|
+
d(null), yield r.flow.run(U, u);
|
|
2738
2738
|
}), [r, i, d, u]);
|
|
2739
2739
|
return (0, y.useEffect)(() => {
|
|
2740
2740
|
i.payload.passcode_resent && (l("passcode-resend"), setTimeout(() => l(null), 1e3));
|
|
2741
2741
|
}, [i, l]), (0, y.useEffect)(() => {
|
|
2742
2742
|
h <= 0 && s.succeededAction;
|
|
2743
2743
|
}, [s, h]), (0, y.useEffect)(() => {
|
|
2744
|
-
const
|
|
2745
|
-
return () => clearInterval(
|
|
2744
|
+
const j = h > 0 && setInterval(() => g(h - 1), 1e3);
|
|
2745
|
+
return () => clearInterval(j);
|
|
2746
2746
|
}, [h]), (0, y.useEffect)(() => {
|
|
2747
|
-
const
|
|
2747
|
+
const j = m > 0 && setInterval(() => {
|
|
2748
2748
|
x(m - 1);
|
|
2749
2749
|
}, 1e3);
|
|
2750
|
-
return () => clearInterval(
|
|
2750
|
+
return () => clearInterval(j);
|
|
2751
2751
|
}, [m]), (0, y.useEffect)(() => {
|
|
2752
|
-
var
|
|
2753
|
-
m == 0 && ((
|
|
2752
|
+
var j;
|
|
2753
|
+
m == 0 && ((j = i.error) === null || j === void 0 ? void 0 : j.code) == "rate_limit_exceeded" && c((U) => Object.assign(Object.assign({}, U), { error: null }));
|
|
2754
2754
|
}, [m]), (0, y.useEffect)(() => {
|
|
2755
|
-
var
|
|
2756
|
-
((
|
|
2757
|
-
}, [i]), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: o("headlines.loginPasscode") }), a(Ee, { state: i }), a(W, { children: s.email ? o("texts.enterPasscode", { emailAddress: s.email }) : o("texts.enterPasscodeNoEmail") }), a(oe, Object.assign({ onSubmit: (
|
|
2758
|
-
return
|
|
2759
|
-
}) }, { children: [a(ko, { onInput: (
|
|
2760
|
-
if (A(
|
|
2761
|
-
}, passcodeDigits: P, numberOfInputs: 6, disabled: h <= 0 || S }), a(ne, Object.assign({ disabled: h <= 0 || S, uiAction: "passcode-submit" }, { children: o("labels.continue") }))] }))] }), a(Re, { children: [a(te, Object.assign({ hidden: !(!((t = (e = i.actions).back) === null || t === void 0) && t.call(e, null)), onClick: (
|
|
2762
|
-
|
|
2763
|
-
const
|
|
2764
|
-
d(null), yield r.flow.run(
|
|
2765
|
-
}), loadingSpinnerPosition: "right", isLoading: s.loadingAction === "back" }, { children: o("labels.back") })), a(te, Object.assign({ uiAction: "passcode-resend", disabled: m > 0, onClick: (
|
|
2766
|
-
|
|
2767
|
-
const
|
|
2768
|
-
d(null), yield r.flow.run(
|
|
2755
|
+
var j;
|
|
2756
|
+
((j = i.error) === null || j === void 0 ? void 0 : j.code) === "passcode_invalid" && A([]), i.payload.resend_after >= 0 && x(i.payload.resend_after);
|
|
2757
|
+
}, [i]), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: o("headlines.loginPasscode") }), a(Ee, { state: i }), a(W, { children: s.email ? o("texts.enterPasscode", { emailAddress: s.email }) : o("texts.enterPasscodeNoEmail") }), a(oe, Object.assign({ onSubmit: (j) => Yt(void 0, void 0, void 0, function* () {
|
|
2758
|
+
return j.preventDefault(), O(P.join(""));
|
|
2759
|
+
}) }, { children: [a(ko, { onInput: (j) => {
|
|
2760
|
+
if (A(j), j.filter((U) => U !== "").length === 6) return O(j.join(""));
|
|
2761
|
+
}, passcodeDigits: P, numberOfInputs: 6, disabled: h <= 0 || S }), a(ne, Object.assign({ disabled: h <= 0 || S, uiAction: "passcode-submit" }, { children: o("labels.continue") }))] }))] }), a(Re, { children: [a(te, Object.assign({ hidden: !(!((t = (e = i.actions).back) === null || t === void 0) && t.call(e, null)), onClick: (j) => Yt(void 0, void 0, void 0, function* () {
|
|
2762
|
+
j.preventDefault(), d("back");
|
|
2763
|
+
const U = yield i.actions.back(null).run();
|
|
2764
|
+
d(null), yield r.flow.run(U, u);
|
|
2765
|
+
}), loadingSpinnerPosition: "right", isLoading: s.loadingAction === "back" }, { children: o("labels.back") })), a(te, Object.assign({ uiAction: "passcode-resend", disabled: m > 0, onClick: (j) => Yt(void 0, void 0, void 0, function* () {
|
|
2766
|
+
j.preventDefault(), d("passcode-resend");
|
|
2767
|
+
const U = yield i.actions.resend_passcode(null).run();
|
|
2768
|
+
d(null), yield r.flow.run(U, u);
|
|
2769
2769
|
}), loadingSpinnerPosition: "left" }, { children: m > 0 ? o("labels.passcodeResendAfter", { passcodeResendAfter: m }) : o("labels.sendNewPasscode") }))] })] });
|
|
2770
2770
|
};
|
|
2771
2771
|
var qn = function(n, e, t, o) {
|
|
@@ -2793,7 +2793,7 @@ var qn = function(n, e, t, o) {
|
|
|
2793
2793
|
d((o = o.apply(n, [])).next());
|
|
2794
2794
|
});
|
|
2795
2795
|
};
|
|
2796
|
-
const
|
|
2796
|
+
const ja = (n) => {
|
|
2797
2797
|
var e, t, o, i, r, s, c, d;
|
|
2798
2798
|
const { t: l } = (0, y.useContext)(Z.TranslateContext), { hanko: u, setLoadingAction: h, stateHandler: g } = (0, y.useContext)(pe), { flowState: m } = Me(n.state);
|
|
2799
2799
|
return a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: l("headlines.registerAuthenticator") }), a(Ee, { state: m }), a(W, { children: l("texts.setupPasskey") }), a(oe, Object.assign({ onSubmit: (x) => qn(void 0, void 0, void 0, function* () {
|
|
@@ -2835,33 +2835,33 @@ var It = function(n, e, t, o) {
|
|
|
2835
2835
|
d((o = o.apply(n, [])).next());
|
|
2836
2836
|
});
|
|
2837
2837
|
};
|
|
2838
|
-
const
|
|
2838
|
+
const $a = (n) => {
|
|
2839
2839
|
var e, t, o, i;
|
|
2840
2840
|
const { t: r } = (0, y.useContext)(Z.TranslateContext), { hanko: s, stateHandler: c, setLoadingAction: d } = (0, y.useContext)(pe), { flowState: l } = Me(n.state), [u, h] = (0, y.useState)(), [g, m] = (0, y.useState)(), x = (O) => It(void 0, void 0, void 0, function* () {
|
|
2841
2841
|
O.preventDefault(), d("password-recovery");
|
|
2842
|
-
const
|
|
2843
|
-
d(null), yield s.flow.run(
|
|
2842
|
+
const j = yield l.actions.continue_to_passcode_confirmation_recovery(null).run();
|
|
2843
|
+
d(null), yield s.flow.run(j, c);
|
|
2844
2844
|
}), P = (O) => It(void 0, void 0, void 0, function* () {
|
|
2845
2845
|
O.preventDefault(), d("choose-login-method");
|
|
2846
|
-
const
|
|
2847
|
-
d(null), yield s.flow.run(
|
|
2846
|
+
const j = yield l.actions.continue_to_login_method_chooser(null).run();
|
|
2847
|
+
d(null), yield s.flow.run(j, c);
|
|
2848
2848
|
}), A = (0, y.useMemo)(() => {
|
|
2849
|
-
var O,
|
|
2850
|
-
return a(te, Object.assign({ hidden: !(!((
|
|
2849
|
+
var O, j;
|
|
2850
|
+
return a(te, Object.assign({ hidden: !(!((j = (O = l.actions).continue_to_passcode_confirmation_recovery) === null || j === void 0) && j.call(O, null)), uiAction: "password-recovery", onClick: x, loadingSpinnerPosition: "left" }, { children: r("labels.forgotYourPassword") }));
|
|
2851
2851
|
}, [x, r]), S = (0, y.useMemo)(() => a(te, Object.assign({ uiAction: "choose-login-method", onClick: P, loadingSpinnerPosition: "left" }, { children: "Choose another method" })), [P]);
|
|
2852
2852
|
return (0, y.useEffect)(() => {
|
|
2853
2853
|
const O = g > 0 && setInterval(() => m(g - 1), 1e3);
|
|
2854
2854
|
return () => clearInterval(O);
|
|
2855
2855
|
}, [g]), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: r("headlines.loginPassword") }), a(Ee, { state: l }), a(oe, Object.assign({ onSubmit: (O) => It(void 0, void 0, void 0, function* () {
|
|
2856
2856
|
O.preventDefault(), d("password-submit");
|
|
2857
|
-
const
|
|
2858
|
-
d(null), yield s.flow.run(
|
|
2857
|
+
const j = yield l.actions.password_login({ password: u }).run();
|
|
2858
|
+
d(null), yield s.flow.run(j, c);
|
|
2859
2859
|
}) }, { children: [a(Ve, { type: "password", flowInput: l.actions.password_login(null).inputs.password, autocomplete: "current-password", placeholder: r("labels.password"), onInput: (O) => It(void 0, void 0, void 0, function* () {
|
|
2860
2860
|
O.target instanceof HTMLInputElement && h(O.target.value);
|
|
2861
2861
|
}), autofocus: !0 }), a(ne, Object.assign({ uiAction: "password-submit", disabled: g > 0 }, { children: g > 0 ? r("labels.passwordRetryAfter", { passwordRetryAfter: g }) : r("labels.signIn") }))] })), !((t = (e = l.actions).continue_to_login_method_chooser) === null || t === void 0) && t.call(e, null) ? A : null] }), a(Re, { children: [a(te, Object.assign({ uiAction: "back", onClick: (O) => It(void 0, void 0, void 0, function* () {
|
|
2862
2862
|
O.preventDefault(), d("back");
|
|
2863
|
-
const
|
|
2864
|
-
d(null), yield s.flow.run(
|
|
2863
|
+
const j = yield l.actions.back(null).run();
|
|
2864
|
+
d(null), yield s.flow.run(j, c);
|
|
2865
2865
|
}), loadingSpinnerPosition: "right" }, { children: r("labels.back") })), !((i = (o = l.actions).continue_to_login_method_chooser) === null || i === void 0) && i.call(o, null) ? S : A] })] });
|
|
2866
2866
|
};
|
|
2867
2867
|
var Jo = function(n, e, t, o) {
|
|
@@ -2924,7 +2924,7 @@ var Qt = function(n, e, t, o) {
|
|
|
2924
2924
|
d((o = o.apply(n, [])).next());
|
|
2925
2925
|
});
|
|
2926
2926
|
};
|
|
2927
|
-
const
|
|
2927
|
+
const Ta = (n) => {
|
|
2928
2928
|
var e, t, o, i, r, s;
|
|
2929
2929
|
const { t: c } = (0, y.useContext)(Z.TranslateContext), { hanko: d, setLoadingAction: l, stateHandler: u, lastLogin: h } = (0, y.useContext)(pe), { flowState: g } = Me(n.state);
|
|
2930
2930
|
return a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: c("headlines.selectLoginMethod") }), a(Ee, { flowError: g == null ? void 0 : g.error }), a(W, { children: c("texts.howDoYouWantToLogin") }), a(oe, Object.assign({ hidden: !(!((t = (e = g.actions).continue_to_passcode_confirmation) === null || t === void 0) && t.call(e, null)), onSubmit: (m) => Qt(void 0, void 0, void 0, function* () {
|
|
@@ -2970,9 +2970,9 @@ var Gt = function(n, e, t, o) {
|
|
|
2970
2970
|
d((o = o.apply(n, [])).next());
|
|
2971
2971
|
});
|
|
2972
2972
|
};
|
|
2973
|
-
const
|
|
2973
|
+
const Ua = (n) => {
|
|
2974
2974
|
var e, t, o, i, r, s, c;
|
|
2975
|
-
const { t: d } = (0, y.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: g, stateHandler: m, setLoadingAction: x, initialComponentName: P } = (0, y.useContext)(pe), { flowState: A } = Me(n.state), S = (t = (e = A.actions).register_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs, O = !(!(S != null && S.email) || !(S != null && S.username)), [
|
|
2975
|
+
const { t: d } = (0, y.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: g, stateHandler: m, setLoadingAction: x, initialComponentName: P } = (0, y.useContext)(pe), { flowState: A } = Me(n.state), S = (t = (e = A.actions).register_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs, O = !(!(S != null && S.email) || !(S != null && S.username)), [j, U] = (0, y.useState)(void 0), [N, ae] = (0, y.useState)(null), [ke, se] = (0, y.useState)(!1), Se = (0, y.useMemo)(() => {
|
|
2976
2976
|
var M, H;
|
|
2977
2977
|
return !!(!((H = (M = A.actions).thirdparty_oauth) === null || H === void 0) && H.call(M, null));
|
|
2978
2978
|
}, [A.actions]);
|
|
@@ -2982,8 +2982,8 @@ const Ta = (n) => {
|
|
|
2982
2982
|
let H = "";
|
|
2983
2983
|
H = M.get("error") === "access_denied" ? "thirdPartyAccessDenied" : "somethingWentWrong";
|
|
2984
2984
|
const ye = { name: H, code: H, message: M.get("error_description") };
|
|
2985
|
-
|
|
2986
|
-
}, []), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: d("headlines.signUp") }), a(Ee, { state: A, error:
|
|
2985
|
+
U(ye), M.delete("error"), M.delete("error_description"), history.replaceState(null, null, window.location.pathname + (M.size < 1 ? "" : `?${M.toString()}`));
|
|
2986
|
+
}, []), a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: d("headlines.signUp") }), a(Ee, { state: A, error: j }), S ? a(C.Fragment, { children: [a(oe, Object.assign({ onSubmit: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
2987
2987
|
M.preventDefault(), x("email-submit");
|
|
2988
2988
|
const H = yield A.actions.register_login_identifier({ email: h.email, username: h.username }).run();
|
|
2989
2989
|
x(null), yield u.flow.run(H, m);
|
|
@@ -2997,9 +2997,9 @@ const Ta = (n) => {
|
|
|
2997
2997
|
const { value: H } = M.target;
|
|
2998
2998
|
g((ye) => Object.assign(Object.assign({}, ye), { email: H }));
|
|
2999
2999
|
}
|
|
3000
|
-
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, a(ne, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), a(_o, Object.assign({ hidden: !Se }, { children: d("labels.or") }))] }) : null, !((i = (o = A.actions).thirdparty_oauth) === null || i === void 0) && i.call(o, null) ? (r = A.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || r === void 0 ? void 0 : r.map((M) => a(oe, Object.assign({ onSubmit: (H) => ((ye,
|
|
3001
|
-
ye.preventDefault(), ae(
|
|
3002
|
-
const Ie = yield A.actions.thirdparty_oauth({ provider:
|
|
3000
|
+
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, a(ne, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), a(_o, Object.assign({ hidden: !Se }, { children: d("labels.or") }))] }) : null, !((i = (o = A.actions).thirdparty_oauth) === null || i === void 0) && i.call(o, null) ? (r = A.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || r === void 0 ? void 0 : r.map((M) => a(oe, Object.assign({ onSubmit: (H) => ((ye, Ue) => Gt(void 0, void 0, void 0, function* () {
|
|
3001
|
+
ye.preventDefault(), ae(Ue);
|
|
3002
|
+
const Ie = yield A.actions.thirdparty_oauth({ provider: Ue, redirect_to: window.location.toString() }).run();
|
|
3003
3003
|
ae(null), yield u.flow.run(Ie, m);
|
|
3004
3004
|
}))(H, M.value) }, { children: a(ne, Object.assign({ isLoading: M.value == N, secondary: !0, icon: M.value.startsWith("custom_") ? "customProvider" : M.value }, { children: d("labels.signInWith", { provider: M.name }) })) }), M.value)) : null, ((c = (s = A.actions).remember_me) === null || c === void 0 ? void 0 : c.call(s, null)) && a(C.Fragment, { children: [a(On, {}), a(bo, { required: !1, type: "checkbox", label: d("labels.staySignedIn"), checked: ke, onChange: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
3005
3005
|
const H = yield A.actions.remember_me({ remember_me: !ke }).run();
|
|
@@ -3081,21 +3081,21 @@ const Je = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n,
|
|
|
3081
3081
|
function P(O) {
|
|
3082
3082
|
try {
|
|
3083
3083
|
S(g.next(O));
|
|
3084
|
-
} catch (
|
|
3085
|
-
x(
|
|
3084
|
+
} catch (j) {
|
|
3085
|
+
x(j);
|
|
3086
3086
|
}
|
|
3087
3087
|
}
|
|
3088
3088
|
function A(O) {
|
|
3089
3089
|
try {
|
|
3090
3090
|
S(g.throw(O));
|
|
3091
|
-
} catch (
|
|
3092
|
-
x(
|
|
3091
|
+
} catch (j) {
|
|
3092
|
+
x(j);
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
function S(O) {
|
|
3096
|
-
var
|
|
3097
|
-
O.done ? m(O.value) : (
|
|
3098
|
-
|
|
3096
|
+
var j;
|
|
3097
|
+
O.done ? m(O.value) : (j = O.value, j instanceof h ? j : new h(function(U) {
|
|
3098
|
+
U(j);
|
|
3099
3099
|
})).then(P, A);
|
|
3100
3100
|
}
|
|
3101
3101
|
S((g = g.apply(l, u || [])).next());
|
|
@@ -3148,7 +3148,7 @@ const Je = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n,
|
|
|
3148
3148
|
const { t: s } = (0, y.useContext)(Z.TranslateContext), c = a("span", Object.assign({ className: Je.description }, { children: i ? a(C.Fragment, { children: [" -", " ", s("labels.configured")] }) : null })), d = a(C.Fragment, { children: [s("labels.authenticatorAppManage"), " ", c] });
|
|
3149
3149
|
return a(Ft, Object.assign({ name: "authenticator-app-manage-dropdown", title: d, checkedItemID: n, setCheckedItemID: e }, { children: [a(ze, { children: s(i ? "headlines.authenticatorAppAlreadySetUp" : "headlines.authenticatorAppNotSetUp") }), a(W, { children: [s(i ? "texts.authenticatorAppAlreadySetUp" : "texts.authenticatorAppNotSetUp"), a("br", {}), a(te, i ? Object.assign({ hidden: !r, uiAction: "auth-app-remove", onClick: (l) => t(l), loadingSpinnerPosition: "right", dangerous: !0 }, { children: s("labels.delete") }) : Object.assign({ uiAction: "auth-app-add", onClick: (l) => o(l), loadingSpinnerPosition: "right" }, { children: s("labels.authenticatorAppAdd") }))] })] }));
|
|
3150
3150
|
};
|
|
3151
|
-
var
|
|
3151
|
+
var je = function(n, e, t, o) {
|
|
3152
3152
|
return new (t || (t = Promise))(function(i, r) {
|
|
3153
3153
|
function s(l) {
|
|
3154
3154
|
try {
|
|
@@ -3174,51 +3174,51 @@ var $e = function(n, e, t, o) {
|
|
|
3174
3174
|
});
|
|
3175
3175
|
};
|
|
3176
3176
|
const qi = (n) => {
|
|
3177
|
-
var e, t, o, i, r, s, c, d, l, u, h, g, m, x, P, A, S, O,
|
|
3178
|
-
const { t: G } = (0, y.useContext)(Z.TranslateContext), { hanko: be, setLoadingAction: w, stateHandler: we, setUIState: J, setPage: R } = (0, y.useContext)(pe), { flowState: E } = Me(n.state), [xe, V] = (0, y.useState)(""), F = (q, B, Qe) =>
|
|
3177
|
+
var e, t, o, i, r, s, c, d, l, u, h, g, m, x, P, A, S, O, j, U, N, ae, ke, se, Se, M, H, ye, Ue, Ie, Ne, le, ce, me, De, k, p, _, L, K, fe, He, We, Fe, f, v, b, D, T, I, z, ee;
|
|
3178
|
+
const { t: G } = (0, y.useContext)(Z.TranslateContext), { hanko: be, setLoadingAction: w, stateHandler: we, setUIState: J, setPage: R } = (0, y.useContext)(pe), { flowState: E } = Me(n.state), [xe, V] = (0, y.useState)(""), F = (q, B, Qe) => je(void 0, void 0, void 0, function* () {
|
|
3179
3179
|
q.preventDefault(), w(B);
|
|
3180
3180
|
const In = yield Qe();
|
|
3181
3181
|
In != null && In.error || (V(null), yield new Promise((Fi) => setTimeout(Fi, 360))), w(null), yield be.flow.run(In, we);
|
|
3182
|
-
}), qe = (q) =>
|
|
3182
|
+
}), qe = (q) => je(void 0, void 0, void 0, function* () {
|
|
3183
3183
|
return F(q, "password-delete", E.actions.password_delete(null).run);
|
|
3184
|
-
}), it = (q) =>
|
|
3184
|
+
}), it = (q) => je(void 0, void 0, void 0, function* () {
|
|
3185
3185
|
return F(q, "username-delete", E.actions.username_delete(null).run);
|
|
3186
|
-
}), ge = (q, B, Qe) =>
|
|
3186
|
+
}), ge = (q, B, Qe) => je(void 0, void 0, void 0, function* () {
|
|
3187
3187
|
return F(q, "webauthn-credential-rename", E.actions.webauthn_credential_rename({ passkey_id: B, passkey_name: Qe }).run);
|
|
3188
|
-
}), Vt = (q) =>
|
|
3188
|
+
}), Vt = (q) => je(void 0, void 0, void 0, function* () {
|
|
3189
3189
|
return F(q, "account_delete", E.actions.account_delete(null).run);
|
|
3190
3190
|
}), rt = (q) => (q.preventDefault(), R(a(qi, { state: E, enablePasskeys: n.enablePasskeys })), Promise.resolve());
|
|
3191
|
-
return a(Oe, { children: [a(Ee, { state: ((e = E == null ? void 0 : E.error) === null || e === void 0 ? void 0 : e.code) !== "form_data_invalid_error" ? E : null }), !((o = (t = E.actions).username_create) === null || o === void 0) && o.call(t, null) || !((r = (i = E.actions).username_update) === null || r === void 0) && r.call(i, null) || !((c = (s = E.actions).username_delete) === null || c === void 0) && c.call(s, null) ? a(C.Fragment, { children: [a(he, { children: G("labels.username") }), E.payload.user.username ? a(W, { children: a("b", { children: E.payload.user.username.username }) }) : null, a(W, { children: [!((l = (d = E.actions).username_create) === null || l === void 0) && l.call(d, null) ? a(Xo, { inputs: E.actions.username_create(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((h = (u = E.actions).username_delete) === null || h === void 0) && h.call(u, null)), onUsernameSubmit: (q, B) =>
|
|
3191
|
+
return a(Oe, { children: [a(Ee, { state: ((e = E == null ? void 0 : E.error) === null || e === void 0 ? void 0 : e.code) !== "form_data_invalid_error" ? E : null }), !((o = (t = E.actions).username_create) === null || o === void 0) && o.call(t, null) || !((r = (i = E.actions).username_update) === null || r === void 0) && r.call(i, null) || !((c = (s = E.actions).username_delete) === null || c === void 0) && c.call(s, null) ? a(C.Fragment, { children: [a(he, { children: G("labels.username") }), E.payload.user.username ? a(W, { children: a("b", { children: E.payload.user.username.username }) }) : null, a(W, { children: [!((l = (d = E.actions).username_create) === null || l === void 0) && l.call(d, null) ? a(Xo, { inputs: E.actions.username_create(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((h = (u = E.actions).username_delete) === null || h === void 0) && h.call(u, null)), onUsernameSubmit: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3192
3192
|
return F(q, "username-set", E.actions.username_create({ username: B }).run);
|
|
3193
|
-
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null, !((m = (g = E.actions).username_update) === null || m === void 0) && m.call(g, null) ? a(Xo, { inputs: E.actions.username_update(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((P = (x = E.actions).username_delete) === null || P === void 0) && P.call(x, null)), onUsernameSubmit: (q, B) =>
|
|
3193
|
+
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null, !((m = (g = E.actions).username_update) === null || m === void 0) && m.call(g, null) ? a(Xo, { inputs: E.actions.username_update(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((P = (x = E.actions).username_delete) === null || P === void 0) && P.call(x, null)), onUsernameSubmit: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3194
3194
|
return F(q, "username-set", E.actions.username_update({ username: B }).run);
|
|
3195
|
-
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((S = (A = E.payload) === null || A === void 0 ? void 0 : A.user) === null || S === void 0) && S.emails || !((
|
|
3195
|
+
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((S = (A = E.payload) === null || A === void 0 ? void 0 : A.user) === null || S === void 0) && S.emails || !((j = (O = E.actions).email_create) === null || j === void 0) && j.call(O, null) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profileEmails") }), a(W, { children: [a(Ma, { emails: E.payload.user.emails, onEmailDelete: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3196
3196
|
return F(q, "email-delete", E.actions.email_delete({ email_id: B }).run);
|
|
3197
|
-
}), onEmailSetPrimary: (q, B) =>
|
|
3197
|
+
}), onEmailSetPrimary: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3198
3198
|
return F(q, "email-set-primary", E.actions.email_set_primary({ email_id: B }).run);
|
|
3199
|
-
}), onEmailVerify: (q, B) =>
|
|
3199
|
+
}), onEmailVerify: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3200
3200
|
return F(q, "email-verify", E.actions.email_verify({ email_id: B }).run);
|
|
3201
|
-
}), checkedItemID: xe, setCheckedItemID: V, deletableEmailIDs: (ae = (N = (
|
|
3201
|
+
}), checkedItemID: xe, setCheckedItemID: V, deletableEmailIDs: (ae = (N = (U = E.actions).email_delete) === null || N === void 0 ? void 0 : N.call(U, null).inputs.email_id.allowed_values) === null || ae === void 0 ? void 0 : ae.map((q) => q.value) }), !((se = (ke = E.actions).email_create) === null || se === void 0) && se.call(ke, null) ? a(qa, { inputs: E.actions.email_create(null).inputs, onEmailSubmit: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3202
3202
|
return J((Qe) => Object.assign(Object.assign({}, Qe), { email: B })), F(q, "email-submit", E.actions.email_create({ email: B }).run);
|
|
3203
|
-
}), checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((M = (Se = E.actions).password_create) === null || M === void 0) && M.call(Se, null) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePassword") }), a(W, { children: a(Qo, { inputs: E.actions.password_create(null).inputs, onPasswordSubmit: (q, B) =>
|
|
3203
|
+
}), checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((M = (Se = E.actions).password_create) === null || M === void 0) && M.call(Se, null) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePassword") }), a(W, { children: a(Qo, { inputs: E.actions.password_create(null).inputs, onPasswordSubmit: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3204
3204
|
return F(q, "password-submit", E.actions.password_create({ password: B }).run);
|
|
3205
|
-
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, !((ye = (H = E.actions).password_update) === null || ye === void 0) && ye.call(H, null) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePassword") }), a(W, { children: a(Qo, { allowPasswordDelete: !!(!((Ie = (
|
|
3205
|
+
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, !((ye = (H = E.actions).password_update) === null || ye === void 0) && ye.call(H, null) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePassword") }), a(W, { children: a(Qo, { allowPasswordDelete: !!(!((Ie = (Ue = E.actions).password_delete) === null || Ie === void 0) && Ie.call(Ue, null)), inputs: E.actions.password_update(null).inputs, onPasswordSubmit: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3206
3206
|
return F(q, "password-submit", E.actions.password_update({ password: B }).run);
|
|
3207
|
-
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V, passwordExists: !0 }) })] }) : null, n.enablePasskeys && (!((le = (Ne = E.payload) === null || Ne === void 0 ? void 0 : Ne.user) === null || le === void 0) && le.passkeys || !((me = (ce = E.actions).webauthn_credential_create) === null || me === void 0) && me.call(ce, null)) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePasskeys") }), a(W, { children: [a(Yo, { onBack: rt, onCredentialNameSubmit: ge, onCredentialDelete: (q, B) =>
|
|
3207
|
+
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V, passwordExists: !0 }) })] }) : null, n.enablePasskeys && (!((le = (Ne = E.payload) === null || Ne === void 0 ? void 0 : Ne.user) === null || le === void 0) && le.passkeys || !((me = (ce = E.actions).webauthn_credential_create) === null || me === void 0) && me.call(ce, null)) ? a(C.Fragment, { children: [a(he, { children: G("headlines.profilePasskeys") }), a(W, { children: [a(Yo, { onBack: rt, onCredentialNameSubmit: ge, onCredentialDelete: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3208
3208
|
return F(q, "passkey-delete", E.actions.webauthn_credential_delete({ passkey_id: B }).run);
|
|
3209
|
-
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((k = (De = E.actions).webauthn_credential_delete) === null || k === void 0) && k.call(De, null)), credentialType: "passkey" }), !((_ = (p = E.actions).webauthn_credential_create) === null || _ === void 0) && _.call(p, null) ? a(Go, { credentialType: "passkey", onCredentialSubmit: (q) =>
|
|
3209
|
+
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((k = (De = E.actions).webauthn_credential_delete) === null || k === void 0) && k.call(De, null)), credentialType: "passkey" }), !((_ = (p = E.actions).webauthn_credential_create) === null || _ === void 0) && _.call(p, null) ? a(Go, { credentialType: "passkey", onCredentialSubmit: (q) => je(void 0, void 0, void 0, function* () {
|
|
3210
3210
|
return F(q, "passkey-submit", E.actions.webauthn_credential_create(null).run);
|
|
3211
|
-
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((L = E.payload.user.mfa_config) === null || L === void 0) && L.security_keys_enabled ? a(C.Fragment, { children: [a(he, { children: G("headlines.securityKeys") }), a(W, { children: [a(Yo, { onBack: rt, onCredentialNameSubmit: ge, onCredentialDelete: (q, B) =>
|
|
3211
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((L = E.payload.user.mfa_config) === null || L === void 0) && L.security_keys_enabled ? a(C.Fragment, { children: [a(he, { children: G("headlines.securityKeys") }), a(W, { children: [a(Yo, { onBack: rt, onCredentialNameSubmit: ge, onCredentialDelete: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3212
3212
|
return F(q, "security-key-delete", E.actions.security_key_delete({ security_key_id: B }).run);
|
|
3213
|
-
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((fe = (K = E.actions).security_key_delete) === null || fe === void 0) && fe.call(K, null)), credentialType: "security-key" }), !((We = (He = E.actions).security_key_create) === null || We === void 0) && We.call(He, null) ? a(Go, { credentialType: "security-key", onCredentialSubmit: (q) =>
|
|
3213
|
+
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((fe = (K = E.actions).security_key_delete) === null || fe === void 0) && fe.call(K, null)), credentialType: "security-key" }), !((We = (He = E.actions).security_key_create) === null || We === void 0) && We.call(He, null) ? a(Go, { credentialType: "security-key", onCredentialSubmit: (q) => je(void 0, void 0, void 0, function* () {
|
|
3214
3214
|
return F(q, "security-key-submit", E.actions.security_key_create(null).run);
|
|
3215
|
-
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((Fe = E.payload.user.mfa_config) === null || Fe === void 0) && Fe.totp_enabled ? a(C.Fragment, { children: [a(he, { children: G("headlines.authenticatorApp") }), a(W, { children: a(Wa, { onConnect: (q) =>
|
|
3215
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((Fe = E.payload.user.mfa_config) === null || Fe === void 0) && Fe.totp_enabled ? a(C.Fragment, { children: [a(he, { children: G("headlines.authenticatorApp") }), a(W, { children: a(Wa, { onConnect: (q) => je(void 0, void 0, void 0, function* () {
|
|
3216
3216
|
return F(q, "auth-app-add", E.actions.continue_to_otp_secret_creation(null).run);
|
|
3217
|
-
}), onDelete: (q) =>
|
|
3217
|
+
}), onDelete: (q) => je(void 0, void 0, void 0, function* () {
|
|
3218
3218
|
return F(q, "auth-app-remove", E.actions.otp_secret_delete(null).run);
|
|
3219
|
-
}), allowDeletion: !!(!((v = (f = E.actions).otp_secret_delete) === null || v === void 0) && v.call(f, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, E.payload.sessions ? a(C.Fragment, { children: [a(he, { children: G("headlines.profileSessions") }), a(W, { children: a(Ha, { sessions: E.payload.sessions, setError: null, checkedItemID: xe, setCheckedItemID: V, onSessionDelete: (q, B) =>
|
|
3219
|
+
}), allowDeletion: !!(!((v = (f = E.actions).otp_secret_delete) === null || v === void 0) && v.call(f, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, E.payload.sessions ? a(C.Fragment, { children: [a(he, { children: G("headlines.profileSessions") }), a(W, { children: a(Ha, { sessions: E.payload.sessions, setError: null, checkedItemID: xe, setCheckedItemID: V, onSessionDelete: (q, B) => je(void 0, void 0, void 0, function* () {
|
|
3220
3220
|
return F(q, "session-delete", E.actions.session_delete({ session_id: B }).run);
|
|
3221
|
-
}), deletableSessionIDs: (I = (
|
|
3221
|
+
}), deletableSessionIDs: (I = (T = (D = E.actions).session_delete) === null || T === void 0 ? void 0 : T.call(D, null).inputs.session_id.allowed_values) === null || I === void 0 ? void 0 : I.map((q) => q.value) }) })] }) : null, !((ee = (z = E.actions).account_delete) === null || ee === void 0) && ee.call(z, null) ? a(C.Fragment, { children: [a(On, {}), a(W, { children: a(_o, {}) }), a(W, { children: a(oe, Object.assign({ onSubmit: (q) => (q.preventDefault(), R(a(za, { onBack: rt, onAccountDelete: Vt })), Promise.resolve()) }, { children: a(ne, Object.assign({ dangerous: !0 }, { children: G("headlines.deleteAccount") })) })) })] }) : null] });
|
|
3222
3222
|
}, Fa = qi, ei = ({ state: n, error: e }) => {
|
|
3223
3223
|
const { t } = (0, y.useContext)(Z.TranslateContext), { init: o, componentName: i } = (0, y.useContext)(pe), r = (0, y.useCallback)(() => o(i), [i, o]);
|
|
3224
3224
|
return (0, y.useEffect)(() => (addEventListener("hankoAuthSuccess", r), () => {
|
|
@@ -3337,20 +3337,20 @@ const Ba = (n) => {
|
|
|
3337
3337
|
const { t: m } = (0, y.useContext)(Z.TranslateContext), { hanko: x, setLoadingAction: P, stateHandler: A } = (0, y.useContext)(pe), { flowState: S } = Me(n.state);
|
|
3338
3338
|
return a(C.Fragment, { children: [a(Oe, { children: [a(he, { children: m("headlines.setupLoginMethod") }), a(Ee, { flowError: S == null ? void 0 : S.error }), a(W, { children: m("texts.selectLoginMethodForFutureLogins") }), a(oe, Object.assign({ hidden: !(!((t = (e = S.actions).continue_to_passkey_registration) === null || t === void 0) && t.call(e, null)), onSubmit: (O) => en(void 0, void 0, void 0, function* () {
|
|
3339
3339
|
O.preventDefault(), P("passkey-submit");
|
|
3340
|
-
const
|
|
3341
|
-
P(null), yield x.flow.run(
|
|
3340
|
+
const j = yield S.actions.continue_to_passkey_registration(null).run();
|
|
3341
|
+
P(null), yield x.flow.run(j, A);
|
|
3342
3342
|
}) }, { children: a(ne, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: m("labels.passkey") })) })), a(oe, Object.assign({ hidden: !(!((i = (o = S.actions).continue_to_password_registration) === null || i === void 0) && i.call(o, null)), onSubmit: (O) => en(void 0, void 0, void 0, function* () {
|
|
3343
3343
|
O.preventDefault(), P("password-submit");
|
|
3344
|
-
const
|
|
3345
|
-
P(null), yield x.flow.run(
|
|
3344
|
+
const j = yield S.actions.continue_to_password_registration(null).run();
|
|
3345
|
+
P(null), yield x.flow.run(j, A);
|
|
3346
3346
|
}) }, { children: a(ne, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: m("labels.password") })) }))] }), a(Re, Object.assign({ hidden: !(!((s = (r = S.actions).back) === null || s === void 0) && s.call(r, null)) && !(!((d = (c = S.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: [a(te, Object.assign({ uiAction: "back", onClick: (O) => en(void 0, void 0, void 0, function* () {
|
|
3347
3347
|
O.preventDefault(), P("back");
|
|
3348
|
-
const
|
|
3349
|
-
P(null), yield x.flow.run(
|
|
3348
|
+
const j = yield S.actions.back(null).run();
|
|
3349
|
+
P(null), yield x.flow.run(j, A);
|
|
3350
3350
|
}), loadingSpinnerPosition: "right", hidden: !(!((u = (l = S.actions).back) === null || u === void 0) && u.call(l, null)) }, { children: m("labels.back") })), a(te, Object.assign({ uiAction: "skip", onClick: (O) => en(void 0, void 0, void 0, function* () {
|
|
3351
3351
|
O.preventDefault(), P("skip");
|
|
3352
|
-
const
|
|
3353
|
-
P(null), yield x.flow.run(
|
|
3352
|
+
const j = yield S.actions.skip(null).run();
|
|
3353
|
+
P(null), yield x.flow.run(j, A);
|
|
3354
3354
|
}), loadingSpinnerPosition: "left", hidden: !(!((g = (h = S.actions).skip) === null || g === void 0) && g.call(h, null)) }, { children: m("labels.skip") }))] }))] });
|
|
3355
3355
|
};
|
|
3356
3356
|
var Wn = function(n, e, t, o) {
|
|
@@ -3485,10 +3485,10 @@ const Ya = (n) => {
|
|
|
3485
3485
|
h(null), yield u.flow.run(O, g);
|
|
3486
3486
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = m.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] })] });
|
|
3487
3487
|
};
|
|
3488
|
-
var fn = X(560),
|
|
3489
|
-
|
|
3488
|
+
var fn = X(560), jt = {};
|
|
3489
|
+
jt.setAttributes = nt(), jt.insert = (n) => {
|
|
3490
3490
|
window._hankoStyle = n;
|
|
3491
|
-
},
|
|
3491
|
+
}, jt.domAPI = tt(), jt.insertStyleElement = ot(), et()(fn.A, jt);
|
|
3492
3492
|
const Qa = fn.A && fn.A.locals ? fn.A.locals : void 0, Ga = ({ children: n, text: e }) => {
|
|
3493
3493
|
const { t } = (0, y.useContext)(Z.TranslateContext), [o, i] = (0, y.useState)(!1);
|
|
3494
3494
|
return a("section", Object.assign({ className: zt.clipboardContainer }, { children: [a("div", { children: [n, " "] }), a("div", Object.assign({ className: zt.clipboardIcon, onClick: (r) => {
|
|
@@ -3689,17 +3689,17 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3689
3689
|
}(n, ["lang", "experimental", "prefilledEmail", "prefilledUsername", "globalOptions", "createWebauthnAbortSignal"]);
|
|
3690
3690
|
const { hanko: d, injectStyles: l, hidePasskeyButtonOnLogin: u, translations: h, translationsLocation: g, fallbackLanguage: m } = r;
|
|
3691
3691
|
d.setLang((e == null ? void 0 : e.toString()) || m);
|
|
3692
|
-
const x = (0, y.useRef)(null), P = (0, y.useMemo)(() => `${r.storageKey}_last_login`, [r.storageKey]), [A, S] = (0, y.useState)(c.componentName), O = (0, y.useMemo)(() => t.split(" ").filter((p) => p.length).map((p) => p), [t]),
|
|
3692
|
+
const x = (0, y.useRef)(null), P = (0, y.useMemo)(() => `${r.storageKey}_last_login`, [r.storageKey]), [A, S] = (0, y.useState)(c.componentName), O = (0, y.useMemo)(() => t.split(" ").filter((p) => p.length).map((p) => p), [t]), j = (0, y.useMemo)(() => a(Ca, {}), []), [U, N] = (0, y.useState)(j), [, ae] = (0, y.useState)(d), [ke, se] = (0, y.useState)(), [Se, M] = (0, y.useState)({ email: o, username: i }), H = (0, y.useCallback)((p) => {
|
|
3693
3693
|
M((_) => Object.assign(Object.assign({}, _), { loadingAction: p, succeededAction: null, error: null, lastAction: p || _.lastAction }));
|
|
3694
3694
|
}, []), ye = (0, y.useCallback)((p) => {
|
|
3695
3695
|
M((_) => Object.assign(Object.assign({}, _), { succeededAction: p, loadingAction: null }));
|
|
3696
|
-
}, []),
|
|
3696
|
+
}, []), Ue = (0, y.useCallback)(() => {
|
|
3697
3697
|
M((p) => Object.assign(Object.assign({}, p), { succeededAction: p.lastAction, loadingAction: null, error: null }));
|
|
3698
3698
|
}, []), Ie = (0, y.useMemo)(() => !!Se.loadingAction || !!Se.succeededAction, [Se]), Ne = function(p, _) {
|
|
3699
3699
|
var L;
|
|
3700
3700
|
(L = x.current) === null || L === void 0 || L.dispatchEvent(new CustomEvent(p, { detail: _, bubbles: !1, composed: !0 }));
|
|
3701
3701
|
}, le = (p) => {
|
|
3702
|
-
H(null), N(a(ei, { error: p instanceof Ce ? p : new
|
|
3702
|
+
H(null), N(a(ei, { error: p instanceof Ce ? p : new $e(p) }));
|
|
3703
3703
|
}, ce = (0, y.useMemo)(() => ({ onError: (p) => {
|
|
3704
3704
|
le(p);
|
|
3705
3705
|
}, preflight(p) {
|
|
@@ -3745,7 +3745,7 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3745
3745
|
H(null), yield d.flow.run(L, ce);
|
|
3746
3746
|
});
|
|
3747
3747
|
}, onboarding_create_passkey(p) {
|
|
3748
|
-
N(a(
|
|
3748
|
+
N(a(ja, { state: p }));
|
|
3749
3749
|
}, onboarding_verify_passkey_attestation(p) {
|
|
3750
3750
|
return Ke(this, void 0, void 0, function* () {
|
|
3751
3751
|
let _;
|
|
@@ -3771,7 +3771,7 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3771
3771
|
yield d.flow.run(L, ce);
|
|
3772
3772
|
});
|
|
3773
3773
|
}, login_password(p) {
|
|
3774
|
-
N(a(
|
|
3774
|
+
N(a($a, { state: p }));
|
|
3775
3775
|
}, login_password_recovery(p) {
|
|
3776
3776
|
N(a(La, { state: p }));
|
|
3777
3777
|
}, login_security_key(p) {
|
|
@@ -3791,16 +3791,16 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3791
3791
|
N(a(ts, { state: p }));
|
|
3792
3792
|
});
|
|
3793
3793
|
}, login_method_chooser(p) {
|
|
3794
|
-
N(a(Ua, { state: p }));
|
|
3795
|
-
}, registration_init(p) {
|
|
3796
3794
|
N(a(Ta, { state: p }));
|
|
3795
|
+
}, registration_init(p) {
|
|
3796
|
+
N(a(Ua, { state: p }));
|
|
3797
3797
|
}, password_creation(p) {
|
|
3798
3798
|
N(a(Na, { state: p }));
|
|
3799
3799
|
}, success(p) {
|
|
3800
3800
|
var _;
|
|
3801
3801
|
!((_ = p.payload) === null || _ === void 0) && _.last_login && localStorage.setItem(P, JSON.stringify(p.payload.last_login));
|
|
3802
3802
|
const { claims: L } = p.payload, K = Date.parse(L.expiration) - Date.now();
|
|
3803
|
-
d.relay.dispatchSessionCreatedEvent({ claims: L, expirationSeconds: K }),
|
|
3803
|
+
d.relay.dispatchSessionCreatedEvent({ claims: L, expirationSeconds: K }), Ue();
|
|
3804
3804
|
}, profile_init(p) {
|
|
3805
3805
|
N(a(Fa, { state: p, enablePasskeys: r.enablePasskeys }));
|
|
3806
3806
|
}, thirdparty(p) {
|
|
@@ -3825,7 +3825,7 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3825
3825
|
});
|
|
3826
3826
|
}, device_trust(p) {
|
|
3827
3827
|
N(a(ns, { state: p }));
|
|
3828
|
-
} }), [r.enablePasskeys, d,
|
|
3828
|
+
} }), [r.enablePasskeys, d, Ue, H]), me = (0, y.useCallback)((p) => Ke(void 0, void 0, void 0, function* () {
|
|
3829
3829
|
H("switch-flow");
|
|
3830
3830
|
const _ = localStorage.getItem(P);
|
|
3831
3831
|
_ && se(JSON.parse(_));
|
|
@@ -3861,7 +3861,7 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3861
3861
|
["auth", "login", "registration"].includes(A) ? (d.onUserLoggedOut(p), d.onSessionExpired(p), d.onUserDeleted(p)) : A === "profile" && d.onSessionCreated(p);
|
|
3862
3862
|
}, []);
|
|
3863
3863
|
const k = ft.supported();
|
|
3864
|
-
return a(pe.Provider, Object.assign({ value: { init: De, initialComponentName: c.componentName, isDisabled: Ie, setUIState: M, setLoadingAction: H, setSucceededAction: ye, uiState: Se, hanko: d, setHanko: ae, lang: (e == null ? void 0 : e.toString()) || m, prefilledEmail: o, prefilledUsername: i, componentName: A, setComponentName: S, experimentalFeatures: O, hidePasskeyButtonOnLogin: u, page:
|
|
3864
|
+
return a(pe.Provider, Object.assign({ value: { init: De, initialComponentName: c.componentName, isDisabled: Ie, setUIState: M, setLoadingAction: H, setSucceededAction: ye, uiState: Se, hanko: d, setHanko: ae, lang: (e == null ? void 0 : e.toString()) || m, prefilledEmail: o, prefilledUsername: i, componentName: A, setComponentName: S, experimentalFeatures: O, hidePasskeyButtonOnLogin: u, page: U, setPage: N, stateHandler: ce, lastLogin: ke } }, { children: a(Z.TranslateProvider, Object.assign({ translations: h, fallbackLang: m, root: g }, { children: a(sa, Object.assign({ ref: x }, { children: A !== "events" ? a(C.Fragment, { children: [l ? a("style", { dangerouslySetInnerHTML: { __html: window._hankoStyle.innerHTML } }) : null, U] }) : null })) })) }));
|
|
3865
3865
|
}, is = { en: X(6).en };
|
|
3866
3866
|
var zi = function(n, e, t, o) {
|
|
3867
3867
|
return new (t || (t = Promise))(function(i, r) {
|
|
@@ -3890,7 +3890,7 @@ var zi = function(n, e, t, o) {
|
|
|
3890
3890
|
};
|
|
3891
3891
|
const Ge = {}, Kt = (n, e) => a(os, Object.assign({ componentName: n, globalOptions: Ge, createWebauthnAbortSignal: ds }, e)), rs = (n) => Kt("auth", n), as = (n) => Kt("login", n), ss = (n) => Kt("registration", n), ls = (n) => Kt("profile", n), cs = (n) => Kt("events", n);
|
|
3892
3892
|
let on = new AbortController();
|
|
3893
|
-
const ds = () => (on && on.abort(), on = new AbortController(), on.signal),
|
|
3893
|
+
const ds = () => (on && on.abort(), on = new AbortController(), on.signal), $t = ({ tagName: n, entryComponent: e, shadow: t = !0, observedAttributes: o }) => zi(void 0, void 0, void 0, function* () {
|
|
3894
3894
|
customElements.get(n) || function(i, r, s, c) {
|
|
3895
3895
|
function d() {
|
|
3896
3896
|
var l = Reflect.construct(HTMLElement, [], d);
|
|
@@ -3909,9 +3909,9 @@ const ds = () => (on && on.abort(), on = new AbortController(), on.signal), jt =
|
|
|
3909
3909
|
}(e, n, o, { shadow: t });
|
|
3910
3910
|
}), us = (n, e = {}) => zi(void 0, void 0, void 0, function* () {
|
|
3911
3911
|
const t = ["api", "lang", "experimental", "prefilled-email", "entry"];
|
|
3912
|
-
return e = Object.assign({ shadow: !0, injectStyles: !0, enablePasskeys: !0, hidePasskeyButtonOnLogin: !1, translations: null, translationsLocation: "/i18n", fallbackLanguage: "en", storageKey: "hanko", sessionCheckInterval: 3e4 }, e), Ge.hanko = new Mi(n, { cookieName: e.storageKey, cookieDomain: e.cookieDomain, cookieSameSite: e.cookieSameSite, localStorageKey: e.storageKey, sessionCheckInterval: e.sessionCheckInterval, sessionTokenLocation: e.sessionTokenLocation }), Ge.injectStyles = e.injectStyles, Ge.enablePasskeys = e.enablePasskeys, Ge.hidePasskeyButtonOnLogin = e.hidePasskeyButtonOnLogin, Ge.translations = e.translations || is, Ge.translationsLocation = e.translationsLocation, Ge.fallbackLanguage = e.fallbackLanguage, Ge.storageKey = e.storageKey, yield Promise.all([
|
|
3912
|
+
return e = Object.assign({ shadow: !0, injectStyles: !0, enablePasskeys: !0, hidePasskeyButtonOnLogin: !1, translations: null, translationsLocation: "/i18n", fallbackLanguage: "en", storageKey: "hanko", sessionCheckInterval: 3e4 }, e), Ge.hanko = new Mi(n, { cookieName: e.storageKey, cookieDomain: e.cookieDomain, cookieSameSite: e.cookieSameSite, localStorageKey: e.storageKey, sessionCheckInterval: e.sessionCheckInterval, sessionTokenLocation: e.sessionTokenLocation }), Ge.injectStyles = e.injectStyles, Ge.enablePasskeys = e.enablePasskeys, Ge.hidePasskeyButtonOnLogin = e.hidePasskeyButtonOnLogin, Ge.translations = e.translations || is, Ge.translationsLocation = e.translationsLocation, Ge.fallbackLanguage = e.fallbackLanguage, Ge.storageKey = e.storageKey, yield Promise.all([$t(Object.assign(Object.assign({}, e), { tagName: "hanko-auth", entryComponent: rs, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-login", entryComponent: as, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-registration", entryComponent: ss, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-profile", entryComponent: ls, observedAttributes: t.filter((o) => ["api", "lang"].includes(o)) })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-events", entryComponent: cs, observedAttributes: [] }))]), { hanko: Ge.hanko };
|
|
3913
3913
|
});
|
|
3914
|
-
var hs = re.fK, ps = re.tJ, ms = re.Z7, fs = re.Q9, gs = re.Lv, vs = re.qQ, ys = re.I4, _s = re.O8, bs = re.ku, ks = re.ls, ws = re.bO, Ss = re.yv, xs = re.AT, As = re.m_, Cs = re.KG, Ps = re.DH, Os = re.kf, Es = re.oY, Is = re.xg, Ds = re.Wg,
|
|
3914
|
+
var hs = re.fK, ps = re.tJ, ms = re.Z7, fs = re.Q9, gs = re.Lv, vs = re.qQ, ys = re.I4, _s = re.O8, bs = re.ku, ks = re.ls, ws = re.bO, Ss = re.yv, xs = re.AT, As = re.m_, Cs = re.KG, Ps = re.DH, Os = re.kf, Es = re.oY, Is = re.xg, Ds = re.Wg, js = re.J, $s = re.AC, Ls = re.D_, Ts = re.jx, Us = re.nX, Ns = re.Nx, Ms = re.Sd, Hi = re.kz, Rs = re.fX, qs = re.qA, zs = re.tz, Hs = re.gN;
|
|
3915
3915
|
const Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3916
3916
|
__proto__: null,
|
|
3917
3917
|
ConflictError: hs,
|
|
@@ -3934,11 +3934,11 @@ const Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3934
3934
|
TechnicalError: Es,
|
|
3935
3935
|
ThirdPartyClient: Is,
|
|
3936
3936
|
ThirdPartyError: Ds,
|
|
3937
|
-
TokenClient:
|
|
3938
|
-
TooManyRequestsError:
|
|
3937
|
+
TokenClient: js,
|
|
3938
|
+
TooManyRequestsError: $s,
|
|
3939
3939
|
UnauthorizedError: Ls,
|
|
3940
|
-
UserClient:
|
|
3941
|
-
UserVerificationError:
|
|
3940
|
+
UserClient: Ts,
|
|
3941
|
+
UserVerificationError: Us,
|
|
3942
3942
|
WebauthnRequestCancelledError: Ns,
|
|
3943
3943
|
WebauthnSupport: Ms,
|
|
3944
3944
|
register: Hi,
|
|
@@ -5140,15 +5140,15 @@ let ie = class extends Mt {
|
|
|
5140
5140
|
constructor() {
|
|
5141
5141
|
super(), this.hankoUrlAttr = "", this.basePath = "", this.authPath = "/api/auth/osm", this.osmRequired = !1, this.osmScopes = "read_prefs", this.showProfile = !1, this.redirectAfterLogin = "", this.autoConnect = !1, this.verifySession = !1, this.redirectAfterLogout = "", this.displayNameAttr = "", this.mappingCheckUrl = "", this.appId = "", this.loginUrl = "", this.lang = "en", this.buttonVariant = "plain", this.buttonColor = "primary", this.display = "default", this.user = null, this.osmConnected = !1, this.osmData = null, this.osmLoading = !1, this.loading = !0, this.error = null, this.hankoReady = !1, this.profileDisplayName = "", this.profilePictureUrl = "", this.hasAppMapping = !1, this.userProfileLanguage = null, this.isOpen = !1, this.handleOutsideClick = (n) => {
|
|
5142
5142
|
this.contains(n.target) || this.closeDropdown();
|
|
5143
|
-
}, this.
|
|
5143
|
+
}, this._debugMode = !1, this._lastSessionId = null, this._hanko = null, this._isPrimary = !1, this._handleVisibilityChange = () => {
|
|
5144
5144
|
this._isPrimary && !document.hidden && !this.showProfile && !this.user && (this.log("Page visible, re-checking session..."), this.checkSession());
|
|
5145
5145
|
}, this._handleWindowFocus = () => {
|
|
5146
|
-
this._isPrimary && !this.showProfile && !this.user && (this.log("
|
|
5146
|
+
this._isPrimary && !this.showProfile && !this.user && (this.log("Window focused, re-checking session..."), this.checkSession());
|
|
5147
5147
|
}, this._handleExternalLogin = (n) => {
|
|
5148
5148
|
var t;
|
|
5149
5149
|
if (!this._isPrimary) return;
|
|
5150
5150
|
const e = n;
|
|
5151
|
-
!this.showProfile && !this.user && ((t = e.detail) != null && t.user) && (this.log("
|
|
5151
|
+
!this.showProfile && !this.user && ((t = e.detail) != null && t.user) && (this.log("External login detected, updating user state..."), this.user = e.detail.user, this._broadcastState(), this.osmRequired && this.checkOSMConnection());
|
|
5152
5152
|
}, this._currentHankoAuthElement = null;
|
|
5153
5153
|
try {
|
|
5154
5154
|
const n = localStorage.getItem("hotosm-auth-user");
|
|
@@ -5205,22 +5205,22 @@ let ie = class extends Mt {
|
|
|
5205
5205
|
if (n) {
|
|
5206
5206
|
const t = n.getAttribute("content");
|
|
5207
5207
|
if (t)
|
|
5208
|
-
return this.log("
|
|
5208
|
+
return this.log("hanko-url auto-detected from <meta> tag:", t), t;
|
|
5209
5209
|
}
|
|
5210
5210
|
if (window.HANKO_URL)
|
|
5211
5211
|
return this.log(
|
|
5212
|
-
"
|
|
5212
|
+
"hanko-url auto-detected from window.HANKO_URL:",
|
|
5213
5213
|
window.HANKO_URL
|
|
5214
5214
|
), window.HANKO_URL;
|
|
5215
5215
|
const e = window.location.origin;
|
|
5216
|
-
return this.log("
|
|
5216
|
+
return this.log("hanko-url auto-detected from window.location.origin:", e), e;
|
|
5217
5217
|
}
|
|
5218
5218
|
connectedCallback() {
|
|
5219
|
-
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("
|
|
5219
|
+
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("hanko-auth connectedCallback called"), this.injectHotStyles(), Y.instances.add(this), document.addEventListener("visibilitychange", this._handleVisibilityChange), window.addEventListener("focus", this._handleWindowFocus), document.addEventListener("hanko-login", this._handleExternalLogin);
|
|
5220
5220
|
}
|
|
5221
5221
|
// Use firstUpdated instead of connectedCallback to ensure React props are set
|
|
5222
5222
|
firstUpdated() {
|
|
5223
|
-
this.log("
|
|
5223
|
+
this.log("hanko-auth firstUpdated called"), this.log(" hankoUrl:", this.hankoUrl), this.log(" basePath:", this.basePath), Y.initialized || Y.primary ? (this.log("Using shared state from primary instance"), this._syncFromShared(), this._isPrimary = !1) : (this.log("This is the primary instance"), this._isPrimary = !0, Y.primary = this, Y.initialized = !0, this.init());
|
|
5224
5224
|
}
|
|
5225
5225
|
disconnectedCallback() {
|
|
5226
5226
|
if (super.disconnectedCallback(), document.removeEventListener(
|
|
@@ -5259,18 +5259,11 @@ let ie = class extends Mt {
|
|
|
5259
5259
|
const e = this.user && this.userProfileLanguage ? this.userProfileLanguage : this.lang;
|
|
5260
5260
|
return (Vn[e] || Vn.en)[n] || Vn.en[n] || n;
|
|
5261
5261
|
}
|
|
5262
|
-
warn(...n) {
|
|
5263
|
-
console.warn(...n);
|
|
5264
|
-
}
|
|
5265
5262
|
logError(...n) {
|
|
5266
5263
|
console.error(...n);
|
|
5267
5264
|
}
|
|
5268
5265
|
getBasePath() {
|
|
5269
|
-
return this.basePath ? (this.log("
|
|
5270
|
-
}
|
|
5271
|
-
addTrailingSlash(n, e) {
|
|
5272
|
-
const t = this._trailingSlashCache[e];
|
|
5273
|
-
return t !== void 0 && t && !n.endsWith("/") ? n + "/" : n;
|
|
5266
|
+
return this.basePath ? (this.log("getBasePath() using basePath:", this.basePath), this.basePath) : (this.log("getBasePath() using default: empty string"), "");
|
|
5274
5267
|
}
|
|
5275
5268
|
// styles injected to ensure global availability
|
|
5276
5269
|
injectHotStyles() {
|
|
@@ -5292,7 +5285,7 @@ let ie = class extends Mt {
|
|
|
5292
5285
|
}
|
|
5293
5286
|
async init() {
|
|
5294
5287
|
if (!this._isPrimary) {
|
|
5295
|
-
this.log("
|
|
5288
|
+
this.log("Not primary, skipping init...");
|
|
5296
5289
|
return;
|
|
5297
5290
|
}
|
|
5298
5291
|
try {
|
|
@@ -5305,16 +5298,16 @@ let ie = class extends Mt {
|
|
|
5305
5298
|
cookieSameSite: "lax"
|
|
5306
5299
|
};
|
|
5307
5300
|
this._hanko = new n(this.hankoUrl, r), Y.hanko = this._hanko, this._hanko.onSessionExpired(() => {
|
|
5308
|
-
this.log("
|
|
5301
|
+
this.log("Hanko session expired event received"), this.handleSessionExpired();
|
|
5309
5302
|
}), this._hanko.onUserLoggedOut(() => {
|
|
5310
|
-
this.log("
|
|
5303
|
+
this.log("Hanko user logged out event received"), this.handleUserLoggedOut();
|
|
5311
5304
|
}), await this.checkSession(), this.user && (this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName()), this.loading = !1, this._broadcastState(), this.setupEventListeners();
|
|
5312
5305
|
} catch (n) {
|
|
5313
5306
|
this.logError("Failed to initialize hanko-auth:", n), this.error = n.message, this.loading = !1, this._broadcastState();
|
|
5314
5307
|
}
|
|
5315
5308
|
}
|
|
5316
5309
|
async checkSession() {
|
|
5317
|
-
if (this.log("
|
|
5310
|
+
if (this.log("Checking for existing Hanko session..."), !this._hanko) {
|
|
5318
5311
|
this.log("Hanko instance not initialized yet");
|
|
5319
5312
|
return;
|
|
5320
5313
|
}
|
|
@@ -5337,7 +5330,9 @@ let ie = class extends Mt {
|
|
|
5337
5330
|
if (e.is_valid === !1) {
|
|
5338
5331
|
this.log(
|
|
5339
5332
|
"Session validation returned is_valid:false - no valid session"
|
|
5340
|
-
)
|
|
5333
|
+
), this.user && (this.user = null, this.profilePictureUrl = "", this.dispatchEvent(
|
|
5334
|
+
new CustomEvent("logout", { bubbles: !0, composed: !0 })
|
|
5335
|
+
));
|
|
5341
5336
|
return;
|
|
5342
5337
|
}
|
|
5343
5338
|
this.log("Valid Hanko session found via cookie"), this.log("Session data:", e);
|
|
@@ -5498,15 +5493,15 @@ let ie = class extends Mt {
|
|
|
5498
5493
|
if (e.ok) {
|
|
5499
5494
|
const t = await e.json();
|
|
5500
5495
|
this.log("Profile data:", t), (t.first_name || t.last_name) && (this.profileDisplayName = `${t.first_name || ""} ${t.last_name || ""}`.trim(), this.log("Display name set to:", this.profileDisplayName));
|
|
5501
|
-
const o = t.
|
|
5502
|
-
|
|
5496
|
+
const o = t.osm_avatar_url || t.picture_url;
|
|
5497
|
+
this.profilePictureUrl = o || "", this.log("Profile picture set to:", this.profilePictureUrl), t.language && (this.userProfileLanguage = t.language, this.log("Language set from profile:", this.userProfileLanguage));
|
|
5503
5498
|
}
|
|
5504
5499
|
} catch (n) {
|
|
5505
5500
|
this.log("Could not fetch profile:", n);
|
|
5506
5501
|
}
|
|
5507
5502
|
}
|
|
5508
5503
|
updated(n) {
|
|
5509
|
-
super.updated(n), n.has("user") && this.user === null && this.showProfile && (this.log("
|
|
5504
|
+
super.updated(n), n.has("user") && this.user === null && this.showProfile && (this.log("User logged out, re-attaching event listeners..."), this._currentHankoAuthElement = null, this.setupEventListeners());
|
|
5510
5505
|
}
|
|
5511
5506
|
setupEventListeners() {
|
|
5512
5507
|
this.updateComplete.then(() => {
|
|
@@ -5516,7 +5511,7 @@ let ie = class extends Mt {
|
|
|
5516
5511
|
this.log("Event listeners already attached to this element");
|
|
5517
5512
|
return;
|
|
5518
5513
|
}
|
|
5519
|
-
n && (this._currentHankoAuthElement = n, this.log("
|
|
5514
|
+
n && (this._currentHankoAuthElement = n, this.log("Attaching event listeners to hanko-auth element"), n.addEventListener("onSessionCreated", (t) => {
|
|
5520
5515
|
var i, r;
|
|
5521
5516
|
this.log("Hanko event: onSessionCreated", t.detail);
|
|
5522
5517
|
const o = (r = (i = t.detail) == null ? void 0 : i.claims) == null ? void 0 : r.session_id;
|
|
@@ -5745,25 +5740,10 @@ let ie = class extends Mt {
|
|
|
5745
5740
|
} else t === "logout" && this.handleLogout();
|
|
5746
5741
|
this.closeDropdown();
|
|
5747
5742
|
}
|
|
5748
|
-
oldHandleDropdownSelect(n) {
|
|
5749
|
-
const e = n.detail.item.value;
|
|
5750
|
-
if (this.log("🎯 Dropdown item selected:", e), e === "profile") {
|
|
5751
|
-
const t = this.redirectAfterLogin || window.location.origin, o = this.loginUrl ? `${this.loginUrl}/profile` : `${this.hankoUrl}/app/profile`;
|
|
5752
|
-
window.location.href = `${o}?return_to=${encodeURIComponent(t)}`;
|
|
5753
|
-
} else if (e === "connect-osm") {
|
|
5754
|
-
const i = window.location.pathname.includes("/app") ? window.location.origin : window.location.href, r = this.hankoUrl;
|
|
5755
|
-
window.location.href = `${r}/app?return_to=${encodeURIComponent(
|
|
5756
|
-
i
|
|
5757
|
-
)}&osm_required=true`;
|
|
5758
|
-
} else e === "logout" && this.handleLogout();
|
|
5759
|
-
}
|
|
5760
|
-
handleSkipOSM() {
|
|
5761
|
-
this.dispatchEvent(new CustomEvent("osm-skipped")), this.dispatchEvent(new CustomEvent("auth-complete")), this.redirectAfterLogin && (window.location.href = this.redirectAfterLogin);
|
|
5762
|
-
}
|
|
5763
5743
|
render() {
|
|
5764
5744
|
var n, e, t;
|
|
5765
5745
|
if (this.log(
|
|
5766
|
-
"
|
|
5746
|
+
"RENDER - showProfile:",
|
|
5767
5747
|
this.showProfile,
|
|
5768
5748
|
"user:",
|
|
5769
5749
|
!!this.user,
|
|
@@ -5990,14 +5970,14 @@ let ie = class extends Mt {
|
|
|
5990
5970
|
)}
|
|
5991
5971
|
</div>
|
|
5992
5972
|
` : (this.log(
|
|
5993
|
-
"
|
|
5973
|
+
"Waiting for Hanko registration before rendering form..."
|
|
5994
5974
|
), _e`<span class="loading-placeholder"
|
|
5995
5975
|
><span class="loading-placeholder-text">${this.t("logIn")}</span
|
|
5996
5976
|
><span class="spinner-small"></span
|
|
5997
5977
|
></span>`);
|
|
5998
5978
|
{
|
|
5999
5979
|
const i = window.location.pathname.includes("/app"), r = this.redirectAfterLogin || (i ? window.location.origin : window.location.href), c = new URLSearchParams(window.location.search).get("auto_connect") === "true" ? "&auto_connect=true" : "", d = this.hankoUrl;
|
|
6000
|
-
this.log("
|
|
5980
|
+
this.log("Login URL base:", d);
|
|
6001
5981
|
const u = `${this.loginUrl || `${d}/app`}?return_to=${encodeURIComponent(
|
|
6002
5982
|
r
|
|
6003
5983
|
)}${this.osmRequired ? "&osm_required=true" : ""}${c}&lang=${this.lang}`;
|
|
@@ -6015,58 +5995,58 @@ let ie = class extends Mt {
|
|
|
6015
5995
|
};
|
|
6016
5996
|
ie.styles = Fs;
|
|
6017
5997
|
de([
|
|
6018
|
-
|
|
5998
|
+
Te({ type: String, attribute: "hanko-url" })
|
|
6019
5999
|
], ie.prototype, "hankoUrlAttr", 2);
|
|
6020
6000
|
de([
|
|
6021
|
-
|
|
6001
|
+
Te({ type: String, attribute: "base-path" })
|
|
6022
6002
|
], ie.prototype, "basePath", 2);
|
|
6023
6003
|
de([
|
|
6024
|
-
|
|
6004
|
+
Te({ type: String, attribute: "auth-path" })
|
|
6025
6005
|
], ie.prototype, "authPath", 2);
|
|
6026
6006
|
de([
|
|
6027
|
-
|
|
6007
|
+
Te({ type: Boolean, attribute: "osm-required" })
|
|
6028
6008
|
], ie.prototype, "osmRequired", 2);
|
|
6029
6009
|
de([
|
|
6030
|
-
|
|
6010
|
+
Te({ type: String, attribute: "osm-scopes" })
|
|
6031
6011
|
], ie.prototype, "osmScopes", 2);
|
|
6032
6012
|
de([
|
|
6033
|
-
|
|
6013
|
+
Te({ type: Boolean, attribute: "show-profile" })
|
|
6034
6014
|
], ie.prototype, "showProfile", 2);
|
|
6035
6015
|
de([
|
|
6036
|
-
|
|
6016
|
+
Te({ type: String, attribute: "redirect-after-login" })
|
|
6037
6017
|
], ie.prototype, "redirectAfterLogin", 2);
|
|
6038
6018
|
de([
|
|
6039
|
-
|
|
6019
|
+
Te({ type: Boolean, attribute: "auto-connect" })
|
|
6040
6020
|
], ie.prototype, "autoConnect", 2);
|
|
6041
6021
|
de([
|
|
6042
|
-
|
|
6022
|
+
Te({ type: Boolean, attribute: "verify-session" })
|
|
6043
6023
|
], ie.prototype, "verifySession", 2);
|
|
6044
6024
|
de([
|
|
6045
|
-
|
|
6025
|
+
Te({ type: String, attribute: "redirect-after-logout" })
|
|
6046
6026
|
], ie.prototype, "redirectAfterLogout", 2);
|
|
6047
6027
|
de([
|
|
6048
|
-
|
|
6028
|
+
Te({ type: String, attribute: "display-name" })
|
|
6049
6029
|
], ie.prototype, "displayNameAttr", 2);
|
|
6050
6030
|
de([
|
|
6051
|
-
|
|
6031
|
+
Te({ type: String, attribute: "mapping-check-url" })
|
|
6052
6032
|
], ie.prototype, "mappingCheckUrl", 2);
|
|
6053
6033
|
de([
|
|
6054
|
-
|
|
6034
|
+
Te({ type: String, attribute: "app-id" })
|
|
6055
6035
|
], ie.prototype, "appId", 2);
|
|
6056
6036
|
de([
|
|
6057
|
-
|
|
6037
|
+
Te({ type: String, attribute: "login-url" })
|
|
6058
6038
|
], ie.prototype, "loginUrl", 2);
|
|
6059
6039
|
de([
|
|
6060
|
-
|
|
6040
|
+
Te({ type: String, reflect: !0 })
|
|
6061
6041
|
], ie.prototype, "lang", 2);
|
|
6062
6042
|
de([
|
|
6063
|
-
|
|
6043
|
+
Te({ type: String, attribute: "button-variant" })
|
|
6064
6044
|
], ie.prototype, "buttonVariant", 2);
|
|
6065
6045
|
de([
|
|
6066
|
-
|
|
6046
|
+
Te({ type: String, attribute: "button-color" })
|
|
6067
6047
|
], ie.prototype, "buttonColor", 2);
|
|
6068
6048
|
de([
|
|
6069
|
-
|
|
6049
|
+
Te({ type: String, reflect: !0 })
|
|
6070
6050
|
], ie.prototype, "display", 2);
|
|
6071
6051
|
de([
|
|
6072
6052
|
Ze()
|