@hotosm/hanko-auth 0.3.4 → 0.3.5
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/README.md +0 -37
- package/dist/hanko-auth.esm.js +872 -882
- package/dist/hanko-auth.iife.js +152 -87
- package/dist/hanko-auth.umd.js +152 -87
- package/package.json +1 -1
- package/src/hanko-auth.ts +209 -107
package/dist/hanko-auth.esm.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const on = globalThis, Jn = on.ShadowRoot && (on.ShadyCSS === void 0 || on.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Qn = Symbol(), bo = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let ni = class {
|
|
8
8
|
constructor(e, t, o) {
|
|
9
|
-
if (this._$cssResult$ = !0, o !==
|
|
9
|
+
if (this._$cssResult$ = !0, o !== Qn) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let e = this.o;
|
|
14
14
|
const t = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (Jn && e === void 0) {
|
|
16
16
|
const o = t !== void 0 && t.length === 1;
|
|
17
|
-
o && (e =
|
|
17
|
+
o && (e = bo.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), o && bo.set(t, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let si = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const Ti = (n) => new ni(typeof n == "string" ? n : n + "", void 0, Qn), Ni = (n, ...e) => {
|
|
26
26
|
const t = n.length === 1 ? n[0] : e.reduce((o, i, s) => o + ((a) => {
|
|
27
27
|
if (a._$cssResult$ === !0) return a.cssText;
|
|
28
28
|
if (typeof a == "number") return a;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(i) + n[s + 1], n[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new ni(t, n, Qn);
|
|
32
|
+
}, Ui = (n, e) => {
|
|
33
|
+
if (Jn) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const o = document.createElement("style"), i =
|
|
35
|
+
const o = document.createElement("style"), i = on.litNonce;
|
|
36
36
|
i !== void 0 && o.setAttribute("nonce", i), o.textContent = t.cssText, n.appendChild(o);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ko = Jn ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
40
|
for (const o of e.cssRules) t += o.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Ti(t);
|
|
42
42
|
})(n) : n;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Mi, defineProperty: Hi, getOwnPropertyDescriptor: Ri, getOwnPropertyNames: Wi, getOwnPropertySymbols: zi, getPrototypeOf: qi } = Object, at = globalThis, wo = at.trustedTypes, Fi = wo ? wo.emptyScript : "", In = at.reactiveElementPolyfillSupport, Tt = (n, e) => n, mn = { toAttribute(n, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
n = n ?
|
|
51
|
+
n = n ? Fi : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,8 +73,8 @@ const { is: Ki, defineProperty: Bi, getOwnPropertyDescriptor: Vi, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, Gn = (n, e) => !Mi(n, e), xo = { attribute: !0, type: String, converter: mn, reflect: !1, useDefault: !1, hasChanged: Gn };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), at.litPropertyMetadata ?? (at.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let pt = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
@@ -82,14 +82,14 @@ let pt = class extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(e, t =
|
|
85
|
+
static createProperty(e, t = xo) {
|
|
86
86
|
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
87
87
|
const o = Symbol(), i = this.getPropertyDescriptor(e, o, t);
|
|
88
|
-
i !== void 0 &&
|
|
88
|
+
i !== void 0 && Hi(this.prototype, e, i);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(e, t, o) {
|
|
92
|
-
const { get: i, set: s } =
|
|
92
|
+
const { get: i, set: s } = Ri(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
94
|
}, set(a) {
|
|
95
95
|
this[t] = a;
|
|
@@ -100,17 +100,17 @@ let pt = class extends HTMLElement {
|
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(e) {
|
|
103
|
-
return this.elementProperties.get(e) ??
|
|
103
|
+
return this.elementProperties.get(e) ?? xo;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(Tt("elementProperties"))) return;
|
|
107
|
-
const e =
|
|
107
|
+
const e = qi(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
111
|
if (this.hasOwnProperty(Tt("finalized"))) return;
|
|
112
112
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Tt("properties"))) {
|
|
113
|
-
const t = this.properties, o = [...
|
|
113
|
+
const t = this.properties, o = [...Wi(t), ...zi(t)];
|
|
114
114
|
for (const i of o) this.createProperty(i, t[i]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
@@ -129,8 +129,8 @@ let pt = class extends HTMLElement {
|
|
|
129
129
|
const t = [];
|
|
130
130
|
if (Array.isArray(e)) {
|
|
131
131
|
const o = new Set(e.flat(1 / 0).reverse());
|
|
132
|
-
for (const i of o) t.unshift(
|
|
133
|
-
} else e !== void 0 && t.push(
|
|
132
|
+
for (const i of o) t.unshift(ko(i));
|
|
133
|
+
} else e !== void 0 && t.push(ko(e));
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, t) {
|
|
@@ -159,7 +159,7 @@ let pt = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return Ui(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
@@ -184,7 +184,7 @@ let pt = class extends HTMLElement {
|
|
|
184
184
|
var s;
|
|
185
185
|
const o = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, o);
|
|
186
186
|
if (i !== void 0 && o.reflect === !0) {
|
|
187
|
-
const a = (((s = o.converter) == null ? void 0 : s.toAttribute) !== void 0 ? o.converter :
|
|
187
|
+
const a = (((s = o.converter) == null ? void 0 : s.toAttribute) !== void 0 ? o.converter : mn).toAttribute(t, o.type);
|
|
188
188
|
this._$Em = e, a == null ? this.removeAttribute(i) : this.setAttribute(i, a), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -192,7 +192,7 @@ let pt = class extends HTMLElement {
|
|
|
192
192
|
var s, a;
|
|
193
193
|
const o = this.constructor, i = o._$Eh.get(e);
|
|
194
194
|
if (i !== void 0 && this._$Em !== i) {
|
|
195
|
-
const c = o.getPropertyOptions(i), d = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((s = c.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? c.converter :
|
|
195
|
+
const c = o.getPropertyOptions(i), d = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((s = c.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? c.converter : mn;
|
|
196
196
|
this._$Em = i;
|
|
197
197
|
const l = d.fromAttribute(t, c.type);
|
|
198
198
|
this[i] = l ?? ((a = this._$Ej) == null ? void 0 : a.get(i)) ?? l, this._$Em = null;
|
|
@@ -202,7 +202,7 @@ let pt = class extends HTMLElement {
|
|
|
202
202
|
var i;
|
|
203
203
|
if (e !== void 0) {
|
|
204
204
|
const s = this.constructor, a = this[e];
|
|
205
|
-
if (o ?? (o = s.getPropertyOptions(e)), !((o.hasChanged ??
|
|
205
|
+
if (o ?? (o = s.getPropertyOptions(e)), !((o.hasChanged ?? Gn)(a, t) || o.useDefault && o.reflect && a === ((i = this._$Ej) == null ? void 0 : i.get(e)) && !this.hasAttribute(s._$Eu(e, o)))) return;
|
|
206
206
|
this.C(e, t, o);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -278,59 +278,59 @@ let pt = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[Tt("elementProperties")] = /* @__PURE__ */ new Map(), pt[Tt("finalized")] = /* @__PURE__ */ new Map(),
|
|
281
|
+
pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[Tt("elementProperties")] = /* @__PURE__ */ new Map(), pt[Tt("finalized")] = /* @__PURE__ */ new Map(), In == null || In({ ReactiveElement: pt }), (at.reactiveElementVersions ?? (at.reactiveElementVersions = [])).push("2.1.1");
|
|
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,
|
|
288
|
-
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
290
|
-
function
|
|
291
|
-
if (!
|
|
292
|
-
return
|
|
287
|
+
const Nt = globalThis, gn = Nt.trustedTypes, So = gn ? gn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, oi = "$lit$", rt = `lit$${Math.random().toFixed(9).slice(2)}$`, ii = "?" + rt, Ki = `<${ii}>`, ht = document, Mt = () => ht.createComment(""), Ht = (n) => n === null || typeof n != "object" && typeof n != "function", Yn = Array.isArray, Bi = (n) => Yn(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", jn = `[
|
|
288
|
+
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Co = /-->/g, Ao = />/g, ct = RegExp(`>|${jn}(?:([^\\s"'>=/]+)(${jn}*=${jn}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Oo = /'/g, Po = /"/g, si = /^(?:script|style|textarea|title)$/i, Vi = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), He = Vi(1), gt = Symbol.for("lit-noChange"), Te = Symbol.for("lit-nothing"), Eo = /* @__PURE__ */ new WeakMap(), dt = ht.createTreeWalker(ht, 129);
|
|
290
|
+
function ri(n, e) {
|
|
291
|
+
if (!Yn(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return So !== void 0 ? So.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
294
|
+
const Zi = (n, e) => {
|
|
295
295
|
const t = n.length - 1, o = [];
|
|
296
296
|
let i, s = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = yt;
|
|
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 && (a.lastIndex = g, u = a.exec(d), u !== null); ) g = a.lastIndex, a === yt ? u[1] === "!--" ? a =
|
|
300
|
+
for (; g < d.length && (a.lastIndex = g, u = a.exec(d), u !== null); ) g = a.lastIndex, a === yt ? u[1] === "!--" ? a = Co : u[1] !== void 0 ? a = Ao : u[2] !== void 0 ? (si.test(u[2]) && (i = RegExp("</" + u[2], "g")), a = ct) : u[3] !== void 0 && (a = ct) : a === ct ? u[0] === ">" ? (a = i ?? yt, h = -1) : u[1] === void 0 ? h = -2 : (h = a.lastIndex - u[2].length, l = u[1], a = u[3] === void 0 ? ct : u[3] === '"' ? Po : Oo) : a === Po || a === Oo ? a = ct : a === Co || a === Ao ? a = yt : (a = ct, i = void 0);
|
|
301
301
|
const f = a === ct && n[c + 1].startsWith("/>") ? " " : "";
|
|
302
|
-
s += a === yt ? d +
|
|
302
|
+
s += a === yt ? d + Ki : h >= 0 ? (o.push(l), d.slice(0, h) + oi + d.slice(h) + rt + f) : d + rt + (h === -2 ? c : f);
|
|
303
303
|
}
|
|
304
|
-
return [
|
|
304
|
+
return [ri(n, s + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), o];
|
|
305
305
|
};
|
|
306
|
-
let
|
|
306
|
+
let Kn = class ai {
|
|
307
307
|
constructor({ strings: e, _$litType$: t }, o) {
|
|
308
308
|
let i;
|
|
309
309
|
this.parts = [];
|
|
310
310
|
let s = 0, a = 0;
|
|
311
|
-
const c = e.length - 1, d = this.parts, [l, u] =
|
|
312
|
-
if (this.el =
|
|
311
|
+
const c = e.length - 1, d = this.parts, [l, u] = Zi(e, t);
|
|
312
|
+
if (this.el = ai.createElement(l, o), dt.currentNode = this.el.content, t === 2 || t === 3) {
|
|
313
313
|
const h = this.el.content.firstChild;
|
|
314
314
|
h.replaceWith(...h.childNodes);
|
|
315
315
|
}
|
|
316
316
|
for (; (i = dt.nextNode()) !== null && d.length < c; ) {
|
|
317
317
|
if (i.nodeType === 1) {
|
|
318
|
-
if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(
|
|
319
|
-
const g = u[a++], f = i.getAttribute(h).split(
|
|
320
|
-
d.push({ type: 1, index: s, name:
|
|
321
|
-
} else h.startsWith(
|
|
322
|
-
if (
|
|
323
|
-
const h = i.textContent.split(
|
|
318
|
+
if (i.hasAttributes()) for (const h of i.getAttributeNames()) if (h.endsWith(oi)) {
|
|
319
|
+
const g = u[a++], f = i.getAttribute(h).split(rt), S = /([.?@])?(.*)/.exec(g);
|
|
320
|
+
d.push({ type: 1, index: s, name: S[2], strings: f, ctor: S[1] === "." ? Qi : S[1] === "?" ? Gi : S[1] === "@" ? Yi : bn }), i.removeAttribute(h);
|
|
321
|
+
} else h.startsWith(rt) && (d.push({ type: 6, index: s }), i.removeAttribute(h));
|
|
322
|
+
if (si.test(i.tagName)) {
|
|
323
|
+
const h = i.textContent.split(rt), g = h.length - 1;
|
|
324
324
|
if (g > 0) {
|
|
325
|
-
i.textContent =
|
|
325
|
+
i.textContent = gn ? gn.emptyScript : "";
|
|
326
326
|
for (let f = 0; f < g; f++) i.append(h[f], Mt()), dt.nextNode(), d.push({ type: 2, index: ++s });
|
|
327
327
|
i.append(h[g], Mt());
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
} else if (i.nodeType === 8) if (i.data ===
|
|
330
|
+
} else if (i.nodeType === 8) if (i.data === ii) d.push({ type: 2, index: s });
|
|
331
331
|
else {
|
|
332
332
|
let h = -1;
|
|
333
|
-
for (; (h = i.data.indexOf(
|
|
333
|
+
for (; (h = i.data.indexOf(rt, h + 1)) !== -1; ) d.push({ type: 7, index: s }), h += rt.length - 1;
|
|
334
334
|
}
|
|
335
335
|
s++;
|
|
336
336
|
}
|
|
@@ -347,7 +347,7 @@ function vt(n, e, t = n, o) {
|
|
|
347
347
|
const s = Ht(e) ? void 0 : e._$litDirective$;
|
|
348
348
|
return (i == null ? void 0 : i.constructor) !== s && ((c = i == null ? void 0 : i._$AO) == null || c.call(i, !1), s === void 0 ? i = void 0 : (i = new s(n), i._$AT(n, t, o)), o !== void 0 ? (t._$Co ?? (t._$Co = []))[o] = i : t._$Cl = i), i !== void 0 && (e = vt(n, i._$AS(n, e.values), i, o)), e;
|
|
349
349
|
}
|
|
350
|
-
let
|
|
350
|
+
let Ji = class {
|
|
351
351
|
constructor(e, t) {
|
|
352
352
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
353
353
|
}
|
|
@@ -364,7 +364,7 @@ let ns = class {
|
|
|
364
364
|
for (; d !== void 0; ) {
|
|
365
365
|
if (a === d.index) {
|
|
366
366
|
let l;
|
|
367
|
-
d.type === 2 ? l = new
|
|
367
|
+
d.type === 2 ? l = new Xn(s, s.nextSibling, this, e) : d.type === 1 ? l = new d.ctor(s, d.name, d.strings, this, e) : d.type === 6 && (l = new Xi(s, this, e)), this._$AV.push(l), d = o[++c];
|
|
368
368
|
}
|
|
369
369
|
a !== (d == null ? void 0 : d.index) && (s = dt.nextNode(), a++);
|
|
370
370
|
}
|
|
@@ -374,7 +374,7 @@ let ns = class {
|
|
|
374
374
|
let t = 0;
|
|
375
375
|
for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(e, o, t), t += o.strings.length - 2) : o._$AI(e[t])), t++;
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, Xn = class li {
|
|
378
378
|
get _$AU() {
|
|
379
379
|
var e;
|
|
380
380
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
@@ -394,7 +394,7 @@ let ns = class {
|
|
|
394
394
|
return this._$AB;
|
|
395
395
|
}
|
|
396
396
|
_$AI(e, t = this) {
|
|
397
|
-
e = vt(this, e, t), Ht(e) ? e === Te || e == null || e === "" ? (this._$AH !== Te && this._$AR(), this._$AH = Te) : e !== this._$AH && e !== gt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) :
|
|
397
|
+
e = vt(this, e, t), Ht(e) ? e === Te || e == null || e === "" ? (this._$AH !== Te && this._$AR(), this._$AH = Te) : e !== this._$AH && e !== gt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Bi(e) ? this.k(e) : this._(e);
|
|
398
398
|
}
|
|
399
399
|
O(e) {
|
|
400
400
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -407,22 +407,22 @@ let ns = class {
|
|
|
407
407
|
}
|
|
408
408
|
$(e) {
|
|
409
409
|
var s;
|
|
410
|
-
const { values: t, _$litType$: o } = e, i = typeof o == "number" ? this._$AC(e) : (o.el === void 0 && (o.el =
|
|
410
|
+
const { values: t, _$litType$: o } = e, i = typeof o == "number" ? this._$AC(e) : (o.el === void 0 && (o.el = Kn.createElement(ri(o.h, o.h[0]), this.options)), o);
|
|
411
411
|
if (((s = this._$AH) == null ? void 0 : s._$AD) === i) this._$AH.p(t);
|
|
412
412
|
else {
|
|
413
|
-
const a = new
|
|
413
|
+
const a = new Ji(i, this), c = a.u(this.options);
|
|
414
414
|
a.p(t), this.T(c), this._$AH = a;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
_$AC(e) {
|
|
418
|
-
let t =
|
|
419
|
-
return t === void 0 &&
|
|
418
|
+
let t = Eo.get(e.strings);
|
|
419
|
+
return t === void 0 && Eo.set(e.strings, t = new Kn(e)), t;
|
|
420
420
|
}
|
|
421
421
|
k(e) {
|
|
422
|
-
|
|
422
|
+
Yn(this._$AH) || (this._$AH = [], this._$AR());
|
|
423
423
|
const t = this._$AH;
|
|
424
424
|
let o, i = 0;
|
|
425
|
-
for (const s of e) i === t.length ? t.push(o = new
|
|
425
|
+
for (const s of e) i === t.length ? t.push(o = new li(this.O(Mt()), this.O(Mt()), this, this.options)) : o = t[i], o._$AI(s), i++;
|
|
426
426
|
i < t.length && (this._$AR(o && o._$AB.nextSibling, i), t.length = i);
|
|
427
427
|
}
|
|
428
428
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
@@ -436,7 +436,7 @@ let ns = class {
|
|
|
436
436
|
var t;
|
|
437
437
|
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
438
438
|
}
|
|
439
|
-
},
|
|
439
|
+
}, bn = class {
|
|
440
440
|
get tagName() {
|
|
441
441
|
return this.element.tagName;
|
|
442
442
|
}
|
|
@@ -460,21 +460,21 @@ let ns = class {
|
|
|
460
460
|
j(e) {
|
|
461
461
|
e === Te ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
462
462
|
}
|
|
463
|
-
},
|
|
463
|
+
}, Qi = class extends bn {
|
|
464
464
|
constructor() {
|
|
465
465
|
super(...arguments), this.type = 3;
|
|
466
466
|
}
|
|
467
467
|
j(e) {
|
|
468
468
|
this.element[this.name] = e === Te ? void 0 : e;
|
|
469
469
|
}
|
|
470
|
-
},
|
|
470
|
+
}, Gi = class extends bn {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(...arguments), this.type = 4;
|
|
473
473
|
}
|
|
474
474
|
j(e) {
|
|
475
475
|
this.element.toggleAttribute(this.name, !!e && e !== Te);
|
|
476
476
|
}
|
|
477
|
-
},
|
|
477
|
+
}, Yi = class extends bn {
|
|
478
478
|
constructor(e, t, o, i, s) {
|
|
479
479
|
super(e, t, o, i, s), this.type = 5;
|
|
480
480
|
}
|
|
@@ -487,7 +487,7 @@ let ns = class {
|
|
|
487
487
|
var t;
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
489
489
|
}
|
|
490
|
-
},
|
|
490
|
+
}, Xi = class {
|
|
491
491
|
constructor(e, t, o) {
|
|
492
492
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = o;
|
|
493
493
|
}
|
|
@@ -498,14 +498,14 @@ let ns = class {
|
|
|
498
498
|
vt(this, e);
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
const
|
|
501
|
+
const Dn = Nt.litHtmlPolyfillSupport;
|
|
502
|
+
Dn == null || Dn(Kn, Xn), (Nt.litHtmlVersions ?? (Nt.litHtmlVersions = [])).push("3.3.1");
|
|
503
|
+
const es = (n, e, t) => {
|
|
504
504
|
const o = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
505
505
|
let i = o._$litPart$;
|
|
506
506
|
if (i === void 0) {
|
|
507
507
|
const s = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
508
|
-
o._$litPart$ = i = new
|
|
508
|
+
o._$litPart$ = i = new Xn(e.insertBefore(Mt(), s), s, void 0, t ?? {});
|
|
509
509
|
}
|
|
510
510
|
return i._$AI(n), i;
|
|
511
511
|
};
|
|
@@ -526,7 +526,7 @@ let Ut = class extends pt {
|
|
|
526
526
|
}
|
|
527
527
|
update(e) {
|
|
528
528
|
const t = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = es(t, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var e;
|
|
@@ -540,17 +540,17 @@ let Ut = class extends pt {
|
|
|
540
540
|
return gt;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
Ut._$litElement$ = !0, Ut.finalized = !0, (
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var ti;
|
|
544
|
+
Ut._$litElement$ = !0, Ut.finalized = !0, (ti = ut.litElementHydrateSupport) == null || ti.call(ut, { LitElement: Ut });
|
|
545
|
+
const $n = ut.litElementPolyfillSupport;
|
|
546
|
+
$n == null || $n({ LitElement: Ut });
|
|
547
547
|
(ut.litElementVersions ?? (ut.litElementVersions = [])).push("4.2.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const
|
|
553
|
+
const ts = (n) => (e, t) => {
|
|
554
554
|
t !== void 0 ? t.addInitializer(() => {
|
|
555
555
|
customElements.define(n, e);
|
|
556
556
|
}) : customElements.define(n, e);
|
|
@@ -560,7 +560,7 @@ const ls = (n) => (e, t) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const
|
|
563
|
+
const ns = { attribute: !0, type: String, converter: mn, reflect: !1, hasChanged: Gn }, os = (n = ns, e, t) => {
|
|
564
564
|
const { kind: o, metadata: i } = t;
|
|
565
565
|
let s = globalThis.litPropertyMetadata.get(i);
|
|
566
566
|
if (s === void 0 && globalThis.litPropertyMetadata.set(i, s = /* @__PURE__ */ new Map()), o === "setter" && ((n = Object.create(n)).wrapped = !0), s.set(t.name, n), o === "accessor") {
|
|
@@ -582,7 +582,7 @@ const cs = { attribute: !0, type: String, converter: gn, reflect: !1, hasChanged
|
|
|
582
582
|
throw Error("Unsupported decorator location: " + o);
|
|
583
583
|
};
|
|
584
584
|
function We(n) {
|
|
585
|
-
return (e, t) => typeof t == "object" ?
|
|
585
|
+
return (e, t) => typeof t == "object" ? os(n, e, t) : ((o, i, s) => {
|
|
586
586
|
const a = i.hasOwnProperty(s);
|
|
587
587
|
return i.constructor.createProperty(s, o), a ? Object.getOwnPropertyDescriptor(i, s) : void 0;
|
|
588
588
|
})(n, e, t);
|
|
@@ -592,60 +592,60 @@ function We(n) {
|
|
|
592
592
|
* Copyright 2017 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
|
-
function
|
|
595
|
+
function it(n) {
|
|
596
596
|
return We({ ...n, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
/*! For license information please see elements.js.LICENSE.txt */
|
|
599
|
-
var
|
|
599
|
+
var is = { 7: function(n, e, t) {
|
|
600
600
|
(function(o, i, s) {
|
|
601
601
|
var a = function() {
|
|
602
|
-
return a = Object.assign || function(
|
|
603
|
-
for (var O, C = 1,
|
|
604
|
-
return
|
|
602
|
+
return a = Object.assign || function(S) {
|
|
603
|
+
for (var O, C = 1, x = arguments.length; C < x; C++) for (var P in O = arguments[C]) Object.prototype.hasOwnProperty.call(O, P) && (S[P] = O[P]);
|
|
604
|
+
return S;
|
|
605
605
|
}, a.apply(this, arguments);
|
|
606
606
|
};
|
|
607
|
-
function c(
|
|
608
|
-
var C = typeof Symbol == "function" &&
|
|
609
|
-
if (!C) return
|
|
610
|
-
var
|
|
607
|
+
function c(S, O) {
|
|
608
|
+
var C = typeof Symbol == "function" && S[Symbol.iterator];
|
|
609
|
+
if (!C) return S;
|
|
610
|
+
var x, P, D = C.call(S), N = [];
|
|
611
611
|
try {
|
|
612
|
-
for (; (O === void 0 || O-- > 0) && !(
|
|
612
|
+
for (; (O === void 0 || O-- > 0) && !(x = D.next()).done; ) N.push(x.value);
|
|
613
613
|
} catch (U) {
|
|
614
614
|
P = { error: U };
|
|
615
615
|
} finally {
|
|
616
616
|
try {
|
|
617
|
-
|
|
617
|
+
x && !x.done && (C = D.return) && C.call(D);
|
|
618
618
|
} finally {
|
|
619
619
|
if (P) throw P.error;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
return N;
|
|
623
623
|
}
|
|
624
|
-
function d(
|
|
625
|
-
return [
|
|
624
|
+
function d(S, O) {
|
|
625
|
+
return [S, !S || S.endsWith("/") ? "" : "/", O, ".json"].join("");
|
|
626
626
|
}
|
|
627
|
-
function l(
|
|
628
|
-
var C =
|
|
629
|
-
return O && Object.keys(O).forEach(function(
|
|
630
|
-
var P = O[
|
|
627
|
+
function l(S, O) {
|
|
628
|
+
var C = S;
|
|
629
|
+
return O && Object.keys(O).forEach(function(x) {
|
|
630
|
+
var P = O[x], D = new RegExp("{".concat(x, "}"), "gm");
|
|
631
631
|
C = C.replace(D, P.toString());
|
|
632
632
|
}), C;
|
|
633
633
|
}
|
|
634
|
-
function u(
|
|
635
|
-
var
|
|
636
|
-
if (!
|
|
634
|
+
function u(S, O, C) {
|
|
635
|
+
var x = S[O];
|
|
636
|
+
if (!x) return C;
|
|
637
637
|
var P = C.split("."), D = "";
|
|
638
638
|
do {
|
|
639
|
-
var N =
|
|
640
|
-
N === void 0 || typeof N != "object" && P.length ? P.length ? D += "." :
|
|
639
|
+
var N = x[D += P.shift()];
|
|
640
|
+
N === void 0 || typeof N != "object" && P.length ? P.length ? D += "." : x = C : (x = N, D = "");
|
|
641
641
|
} while (P.length);
|
|
642
|
-
return
|
|
642
|
+
return x;
|
|
643
643
|
}
|
|
644
644
|
var h = {}, g = { root: "", lang: "en", fallbackLang: "en" }, f = i.createContext(null);
|
|
645
|
-
o.TranslateContext = f, o.TranslateProvider = function(
|
|
645
|
+
o.TranslateContext = f, o.TranslateProvider = function(S) {
|
|
646
646
|
var O = function(N, U) {
|
|
647
647
|
N = Object.assign({}, g, N), h = U || h;
|
|
648
|
-
var ie = c(s.useState(N.lang), 2),
|
|
648
|
+
var ie = c(s.useState(N.lang), 2), be = ie[0], se = ie[1], we = c(s.useState(h), 2), M = we[0], z = we[1], ve = c(s.useState(!1), 2), $e = ve[0], Ee = ve[1], Le = function(re) {
|
|
649
649
|
if (!M.hasOwnProperty(re)) {
|
|
650
650
|
Ee(!1);
|
|
651
651
|
var ae = d(N.root, re);
|
|
@@ -659,14 +659,14 @@ var us = { 7: function(n, e, t) {
|
|
|
659
659
|
}
|
|
660
660
|
};
|
|
661
661
|
return s.useEffect(function() {
|
|
662
|
-
Le(N.fallbackLang), Le(
|
|
663
|
-
}, [
|
|
664
|
-
if (!M.hasOwnProperty(
|
|
665
|
-
var he = u(M,
|
|
666
|
-
return he === re &&
|
|
662
|
+
Le(N.fallbackLang), Le(be);
|
|
663
|
+
}, [be]), { lang: be, setLang: se, t: function(re, ae) {
|
|
664
|
+
if (!M.hasOwnProperty(be)) return re;
|
|
665
|
+
var he = u(M, be, re);
|
|
666
|
+
return he === re && be !== N.fallbackLang && (he = u(M, N.fallbackLang, re)), l(he, ae);
|
|
667
667
|
}, isReady: $e };
|
|
668
|
-
}({ root:
|
|
669
|
-
return i.h(f.Provider, { value: { t: C, setLang:
|
|
668
|
+
}({ root: S.root || "assets", lang: S.lang || "en", fallbackLang: S.fallbackLang || "en" }, S.translations), C = O.t, x = O.setLang, P = O.lang, D = O.isReady;
|
|
669
|
+
return i.h(f.Provider, { value: { t: C, setLang: x, lang: P, isReady: D } }, S.children);
|
|
670
670
|
}, o.format = l, o.getResourceUrl = d, o.getValue = u, Object.defineProperty(o, "__esModule", { value: !0 });
|
|
671
671
|
})(e, t(616), t(78));
|
|
672
672
|
}, 633: (n, e) => {
|
|
@@ -775,8 +775,8 @@ var us = { 7: function(n, e, t) {
|
|
|
775
775
|
return e[1];
|
|
776
776
|
};
|
|
777
777
|
}, 616: (n, e, t) => {
|
|
778
|
-
t.r(e), t.d(e, { Component: () => U, Fragment: () => N, cloneElement: () => qe, createContext: () => Fe, createElement: () =>
|
|
779
|
-
var o, i, s, a, c, d, l, u, h, g = {}, f = [],
|
|
778
|
+
t.r(e), t.d(e, { Component: () => U, Fragment: () => N, cloneElement: () => qe, createContext: () => Fe, createElement: () => x, createRef: () => D, h: () => x, hydrate: () => ze, isValidElement: () => a, options: () => i, render: () => pe, toChildArray: () => ve });
|
|
779
|
+
var o, i, s, a, c, d, l, u, h, g = {}, f = [], S = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
780
780
|
function O(m, v) {
|
|
781
781
|
for (var b in v) m[b] = v[b];
|
|
782
782
|
return m;
|
|
@@ -785,7 +785,7 @@ var us = { 7: function(n, e, t) {
|
|
|
785
785
|
var v = m.parentNode;
|
|
786
786
|
v && v.removeChild(m);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function x(m, v, b) {
|
|
789
789
|
var j, T, I, W = {};
|
|
790
790
|
for (I in v) I == "key" ? j = v[I] : I == "ref" ? T = v[I] : W[I] = v[I];
|
|
791
791
|
if (arguments.length > 2 && (W.children = arguments.length > 3 ? o.call(arguments, 2) : b), typeof m == "function" && m.defaultProps != null) for (I in m.defaultProps) W[I] === void 0 && (W[I] = m.defaultProps[I]);
|
|
@@ -809,14 +809,14 @@ var us = { 7: function(n, e, t) {
|
|
|
809
809
|
for (var b; v < m.__k.length; v++) if ((b = m.__k[v]) != null && b.__e != null) return b.__e;
|
|
810
810
|
return typeof m.type == "function" ? ie(m) : null;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function be(m) {
|
|
813
813
|
var v, b;
|
|
814
814
|
if ((m = m.__) != null && m.__c != null) {
|
|
815
815
|
for (m.__e = m.__c.base = null, v = 0; v < m.__k.length; v++) if ((b = m.__k[v]) != null && b.__e != null) {
|
|
816
816
|
m.__e = m.__c.base = b.__e;
|
|
817
817
|
break;
|
|
818
818
|
}
|
|
819
|
-
return
|
|
819
|
+
return be(m);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
function se(m) {
|
|
@@ -824,32 +824,32 @@ var us = { 7: function(n, e, t) {
|
|
|
824
824
|
}
|
|
825
825
|
function we() {
|
|
826
826
|
var m, v, b, j, T, I, W, X;
|
|
827
|
-
for (c.sort(u); m = c.shift(); ) m.__d && (v = c.length, j = void 0, T = void 0, W = (I = (b = m).__v).__e, (X = b.__P) && (j = [], (T = O({}, I)).__v = I.__v + 1, Ie(X, I, T, b.__n, X.ownerSVGElement !== void 0, I.__h != null ? [W] : null, j, W ?? ie(I), I.__h), k(j, I), I.__e != W &&
|
|
827
|
+
for (c.sort(u); m = c.shift(); ) m.__d && (v = c.length, j = void 0, T = void 0, W = (I = (b = m).__v).__e, (X = b.__P) && (j = [], (T = O({}, I)).__v = I.__v + 1, Ie(X, I, T, b.__n, X.ownerSVGElement !== void 0, I.__h != null ? [W] : null, j, W ?? ie(I), I.__h), k(j, I), I.__e != W && be(I)), c.length > v && c.sort(u));
|
|
828
828
|
we.__r = 0;
|
|
829
829
|
}
|
|
830
830
|
function M(m, v, b, j, T, I, W, X, G, _e) {
|
|
831
|
-
var w,
|
|
831
|
+
var w, ke, J, H, E, xe, B, F = j && j.__k || f, Me = F.length;
|
|
832
832
|
for (b.__k = [], w = 0; w < v.length; w++) if ((H = b.__k[w] = (H = v[w]) == null || typeof H == "boolean" || typeof H == "function" ? null : typeof H == "string" || typeof H == "number" || typeof H == "bigint" ? P(null, H, null, null, H) : Array.isArray(H) ? P(N, { children: H }, null, null, null) : H.__b > 0 ? P(H.type, H.props, H.key, H.ref ? H.ref : null, H.__v) : H) != null) {
|
|
833
833
|
if (H.__ = b, H.__b = b.__b + 1, (J = F[w]) === null || J && H.key == J.key && H.type === J.type) F[w] = void 0;
|
|
834
|
-
else for (
|
|
835
|
-
if ((J = F[
|
|
836
|
-
F[
|
|
834
|
+
else for (ke = 0; ke < Me; ke++) {
|
|
835
|
+
if ((J = F[ke]) && H.key == J.key && H.type === J.type) {
|
|
836
|
+
F[ke] = void 0;
|
|
837
837
|
break;
|
|
838
838
|
}
|
|
839
839
|
J = null;
|
|
840
840
|
}
|
|
841
|
-
Ie(m, H, J = J || g, T, I, W, X, G, _e), E = H.__e, (
|
|
841
|
+
Ie(m, H, J = J || g, T, I, W, X, G, _e), E = H.__e, (ke = H.ref) && J.ref != ke && (B || (B = []), J.ref && B.push(J.ref, null, H), B.push(ke, H.__c || E, H)), E != null ? (xe == null && (xe = E), typeof H.type == "function" && H.__k === J.__k ? H.__d = G = z(H, G, m) : G = $e(m, H, J, F, E, G), typeof b.type == "function" && (b.__d = G)) : G && J.__e == G && G.parentNode != m && (G = ie(J));
|
|
842
842
|
}
|
|
843
|
-
for (b.__e =
|
|
843
|
+
for (b.__e = xe, w = Me; w--; ) F[w] != null && (typeof b.type == "function" && F[w].__e != null && F[w].__e == b.__d && (b.__d = Ee(j).nextSibling), L(F[w], F[w]));
|
|
844
844
|
if (B) for (w = 0; w < B.length; w++) y(B[w], B[++w], B[++w]);
|
|
845
845
|
}
|
|
846
846
|
function z(m, v, b) {
|
|
847
847
|
for (var j, T = m.__k, I = 0; T && I < T.length; I++) (j = T[I]) && (j.__ = m, v = typeof j.type == "function" ? z(j, v, b) : $e(b, j, j, T, j.__e, v));
|
|
848
848
|
return v;
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function ve(m, v) {
|
|
851
851
|
return v = v || [], m == null || typeof m == "boolean" || (Array.isArray(m) ? m.some(function(b) {
|
|
852
|
-
|
|
852
|
+
ve(b, v);
|
|
853
853
|
}) : v.push(m)), v;
|
|
854
854
|
}
|
|
855
855
|
function $e(m, v, b, j, T, I) {
|
|
@@ -871,7 +871,7 @@ var us = { 7: function(n, e, t) {
|
|
|
871
871
|
return null;
|
|
872
872
|
}
|
|
873
873
|
function Le(m, v, b) {
|
|
874
|
-
v[0] === "-" ? m.setProperty(v, b ?? "") : m[v] = b == null ? "" : typeof b != "number" ||
|
|
874
|
+
v[0] === "-" ? m.setProperty(v, b ?? "") : m[v] = b == null ? "" : typeof b != "number" || S.test(v) ? b : b + "px";
|
|
875
875
|
}
|
|
876
876
|
function re(m, v, b, j, T) {
|
|
877
877
|
var I;
|
|
@@ -898,12 +898,12 @@ var us = { 7: function(n, e, t) {
|
|
|
898
898
|
return this.l[m.type + !0](i.event ? i.event(m) : m);
|
|
899
899
|
}
|
|
900
900
|
function Ie(m, v, b, j, T, I, W, X, G) {
|
|
901
|
-
var _e, w,
|
|
901
|
+
var _e, w, ke, J, H, E, xe, B, F, Me, ot, fe, Kt, st, R, V = v.type;
|
|
902
902
|
if (v.constructor !== void 0) return null;
|
|
903
903
|
b.__h != null && (G = b.__h, X = v.__e = b.__e, v.__h = null, I = [X]), (_e = i.__b) && _e(v);
|
|
904
904
|
try {
|
|
905
905
|
e: if (typeof V == "function") {
|
|
906
|
-
if (B = v.props, F = (_e = V.contextType) && j[_e.__c], Me = _e ? F ? F.props.value : _e.__ : j, b.__c ?
|
|
906
|
+
if (B = v.props, F = (_e = V.contextType) && j[_e.__c], Me = _e ? F ? F.props.value : _e.__ : j, b.__c ? xe = (w = v.__c = b.__c).__ = w.__E : ("prototype" in V && V.prototype.render ? v.__c = w = new V(B, Me) : (v.__c = w = new U(B, Me), w.constructor = V, w.render = K), F && F.sub(w), w.props = B, w.state || (w.state = {}), w.context = Me, w.__n = j, ke = w.__d = !0, w.__h = [], w._sb = []), w.__s == null && (w.__s = w.state), V.getDerivedStateFromProps != null && (w.__s == w.state && (w.__s = O({}, w.__s)), O(w.__s, V.getDerivedStateFromProps(B, w.__s))), J = w.props, H = w.state, w.__v = v, ke) V.getDerivedStateFromProps == null && w.componentWillMount != null && w.componentWillMount(), w.componentDidMount != null && w.__h.push(w.componentDidMount);
|
|
907
907
|
else {
|
|
908
908
|
if (V.getDerivedStateFromProps == null && B !== J && w.componentWillReceiveProps != null && w.componentWillReceiveProps(B, Me), !w.__e && w.shouldComponentUpdate != null && w.shouldComponentUpdate(B, w.__s, Me) === !1 || v.__v === b.__v) {
|
|
909
909
|
for (v.__v !== b.__v && (w.props = B, w.state = w.__s, w.__d = !1), w.__e = !1, v.__e = b.__e, v.__k = b.__k, v.__k.forEach(function(Qe) {
|
|
@@ -917,12 +917,12 @@ var us = { 7: function(n, e, t) {
|
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
if (w.context = Me, w.props = B, w.__P = m, fe = i.__r, Kt = 0, "prototype" in V && V.prototype.render) {
|
|
920
|
-
for (w.state = w.__s, w.__d = !1, fe && fe(v), _e = w.render(w.props, w.state, w.context),
|
|
920
|
+
for (w.state = w.__s, w.__d = !1, fe && fe(v), _e = w.render(w.props, w.state, w.context), st = 0; st < w._sb.length; st++) w.__h.push(w._sb[st]);
|
|
921
921
|
w._sb = [];
|
|
922
922
|
} else do
|
|
923
923
|
w.__d = !1, fe && fe(v), _e = w.render(w.props, w.state, w.context), w.state = w.__s;
|
|
924
924
|
while (w.__d && ++Kt < 25);
|
|
925
|
-
w.state = w.__s, w.getChildContext != null && (j = O(O({}, j), w.getChildContext())),
|
|
925
|
+
w.state = w.__s, w.getChildContext != null && (j = O(O({}, j), w.getChildContext())), ke || w.getSnapshotBeforeUpdate == null || (E = w.getSnapshotBeforeUpdate(J, H)), R = _e != null && _e.type === N && _e.key == null ? _e.props.children : _e, M(m, Array.isArray(R) ? R : [R], v, b, j, T, I, W, X, G), w.base = v.__e, v.__h = null, w.__h.length && W.push(w), xe && (w.__E = w.__ = null), w.__e = !1;
|
|
926
926
|
} else I == null && v.__v === b.__v ? (v.__k = b.__k, v.__e = b.__e) : v.__e = p(b.__e, v, b, j, T, I, W, G);
|
|
927
927
|
(_e = i.diffed) && _e(v);
|
|
928
928
|
} catch (Qe) {
|
|
@@ -941,7 +941,7 @@ var us = { 7: function(n, e, t) {
|
|
|
941
941
|
});
|
|
942
942
|
}
|
|
943
943
|
function p(m, v, b, j, T, I, W, X) {
|
|
944
|
-
var G, _e, w,
|
|
944
|
+
var G, _e, w, ke = b.props, J = v.props, H = v.type, E = 0;
|
|
945
945
|
if (H === "svg" && (T = !0), I != null) {
|
|
946
946
|
for (; E < I.length; E++) if ((G = I[E]) && "setAttribute" in G == !!H && (H ? G.localName === H : G.nodeType === 3)) {
|
|
947
947
|
m = G, I[E] = null;
|
|
@@ -952,19 +952,19 @@ var us = { 7: function(n, e, t) {
|
|
|
952
952
|
if (H === null) return document.createTextNode(J);
|
|
953
953
|
m = T ? document.createElementNS("http://www.w3.org/2000/svg", H) : document.createElement(H, J.is && J), I = null, X = !1;
|
|
954
954
|
}
|
|
955
|
-
if (H === null)
|
|
955
|
+
if (H === null) ke === J || X && m.data === J || (m.data = J);
|
|
956
956
|
else {
|
|
957
|
-
if (I = I && o.call(m.childNodes), _e = (
|
|
958
|
-
if (I != null) for (
|
|
957
|
+
if (I = I && o.call(m.childNodes), _e = (ke = b.props || g).dangerouslySetInnerHTML, w = J.dangerouslySetInnerHTML, !X) {
|
|
958
|
+
if (I != null) for (ke = {}, E = 0; E < m.attributes.length; E++) ke[m.attributes[E].name] = m.attributes[E].value;
|
|
959
959
|
(w || _e) && (w && (_e && w.__html == _e.__html || w.__html === m.innerHTML) || (m.innerHTML = w && w.__html || ""));
|
|
960
960
|
}
|
|
961
|
-
if (function(
|
|
961
|
+
if (function(xe, B, F, Me, ot) {
|
|
962
962
|
var fe;
|
|
963
|
-
for (fe in F) fe === "children" || fe === "key" || fe in B || re(
|
|
964
|
-
for (fe in B) ot && typeof B[fe] != "function" || fe === "children" || fe === "key" || fe === "value" || fe === "checked" || F[fe] === B[fe] || re(
|
|
965
|
-
}(m, J,
|
|
963
|
+
for (fe in F) fe === "children" || fe === "key" || fe in B || re(xe, fe, null, F[fe], Me);
|
|
964
|
+
for (fe in B) ot && typeof B[fe] != "function" || fe === "children" || fe === "key" || fe === "value" || fe === "checked" || F[fe] === B[fe] || re(xe, fe, B[fe], F[fe], Me);
|
|
965
|
+
}(m, J, ke, T, X), w) v.__k = [];
|
|
966
966
|
else if (E = v.props.children, M(m, Array.isArray(E) ? E : [E], v, b, j, T && H !== "foreignObject", I, W, I ? I[0] : b.__k && ie(b, 0), X), I != null) for (E = I.length; E--; ) I[E] != null && C(I[E]);
|
|
967
|
-
X || ("value" in J && (E = J.value) !== void 0 && (E !== m.value || H === "progress" && !E || H === "option" && E !==
|
|
967
|
+
X || ("value" in J && (E = J.value) !== void 0 && (E !== m.value || H === "progress" && !E || H === "option" && E !== ke.value) && re(m, "value", E, ke.value, !1), "checked" in J && (E = J.checked) !== void 0 && E !== m.checked && re(m, "checked", E, ke.checked, !1));
|
|
968
968
|
}
|
|
969
969
|
return m;
|
|
970
970
|
}
|
|
@@ -993,7 +993,7 @@ var us = { 7: function(n, e, t) {
|
|
|
993
993
|
}
|
|
994
994
|
function pe(m, v, b) {
|
|
995
995
|
var j, T, I;
|
|
996
|
-
i.__ && i.__(m, v), T = (j = typeof b == "function") ? null : b && b.__k || v.__k, I = [], Ie(v, m = (!j && b || v).__k =
|
|
996
|
+
i.__ && i.__(m, v), T = (j = typeof b == "function") ? null : b && b.__k || v.__k, I = [], Ie(v, m = (!j && b || v).__k = x(N, null, [m]), T || g, g, v.ownerSVGElement !== void 0, !j && b ? [b] : T ? null : v.firstChild ? o.call(v.childNodes) : null, I, !j && b ? b : T ? T.__e : v.firstChild, j), k(I, m);
|
|
997
997
|
}
|
|
998
998
|
function ze(m, v) {
|
|
999
999
|
pe(m, v, ze);
|
|
@@ -1042,14 +1042,14 @@ var us = { 7: function(n, e, t) {
|
|
|
1042
1042
|
return m.__v.__b - v.__v.__b;
|
|
1043
1043
|
}, we.__r = 0, h = 0;
|
|
1044
1044
|
}, 78: (n, e, t) => {
|
|
1045
|
-
t.r(e), t.d(e, { useCallback: () => se, useContext: () => we, useDebugValue: () => M, useEffect: () => D, useErrorBoundary: () => z, useId: () =>
|
|
1046
|
-
var o, i, s, a, c = t(616), d = 0, l = [], u = [], h = c.options.__b, g = c.options.__r, f = c.options.diffed,
|
|
1045
|
+
t.r(e), t.d(e, { useCallback: () => se, useContext: () => we, useDebugValue: () => M, useEffect: () => D, useErrorBoundary: () => z, useId: () => ve, useImperativeHandle: () => ie, useLayoutEffect: () => N, useMemo: () => be, useReducer: () => P, useRef: () => U, useState: () => x });
|
|
1046
|
+
var o, i, s, a, c = t(616), d = 0, l = [], u = [], h = c.options.__b, g = c.options.__r, f = c.options.diffed, S = c.options.__c, O = c.options.unmount;
|
|
1047
1047
|
function C(k, p) {
|
|
1048
1048
|
c.options.__h && c.options.__h(i, k, d || p), d = 0;
|
|
1049
1049
|
var y = i.__H || (i.__H = { __: [], __h: [] });
|
|
1050
1050
|
return k >= y.__.length && y.__.push({ __V: u }), y.__[k];
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function x(k) {
|
|
1053
1053
|
return d = 1, P(Ie, k);
|
|
1054
1054
|
}
|
|
1055
1055
|
function P(k, p, y) {
|
|
@@ -1095,7 +1095,7 @@ var us = { 7: function(n, e, t) {
|
|
|
1095
1095
|
!c.options.__s && he(y.__H, p) && (y.__ = k, y.i = p, i.__h.push(y));
|
|
1096
1096
|
}
|
|
1097
1097
|
function U(k) {
|
|
1098
|
-
return d = 5,
|
|
1098
|
+
return d = 5, be(function() {
|
|
1099
1099
|
return { current: k };
|
|
1100
1100
|
}, []);
|
|
1101
1101
|
}
|
|
@@ -1108,12 +1108,12 @@ var us = { 7: function(n, e, t) {
|
|
|
1108
1108
|
}) : void 0;
|
|
1109
1109
|
}, y == null ? y : y.concat(k));
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function be(k, p) {
|
|
1112
1112
|
var y = C(o++, 7);
|
|
1113
1113
|
return he(y.__H, p) ? (y.__V = k(), y.i = p, y.__h = k, y.__V) : y.__;
|
|
1114
1114
|
}
|
|
1115
1115
|
function se(k, p) {
|
|
1116
|
-
return d = 8,
|
|
1116
|
+
return d = 8, be(function() {
|
|
1117
1117
|
return k;
|
|
1118
1118
|
}, p);
|
|
1119
1119
|
}
|
|
@@ -1125,14 +1125,14 @@ var us = { 7: function(n, e, t) {
|
|
|
1125
1125
|
c.options.useDebugValue && c.options.useDebugValue(p ? p(k) : k);
|
|
1126
1126
|
}
|
|
1127
1127
|
function z(k) {
|
|
1128
|
-
var p = C(o++, 10), y =
|
|
1128
|
+
var p = C(o++, 10), y = x();
|
|
1129
1129
|
return p.__ = k, i.componentDidCatch || (i.componentDidCatch = function(L, K) {
|
|
1130
1130
|
p.__ && p.__(L, K), y[1](L);
|
|
1131
1131
|
}), [y[0], function() {
|
|
1132
1132
|
y[1](void 0);
|
|
1133
1133
|
}];
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function ve() {
|
|
1136
1136
|
var k = C(o++, 11);
|
|
1137
1137
|
if (!k.__) {
|
|
1138
1138
|
for (var p = i.__v; p !== null && !p.__m && p.__ !== null; ) p = p.__;
|
|
@@ -1173,7 +1173,7 @@ var us = { 7: function(n, e, t) {
|
|
|
1173
1173
|
K.__h && (K.__h = []);
|
|
1174
1174
|
}), p = [], c.options.__e(L, y.__v);
|
|
1175
1175
|
}
|
|
1176
|
-
}),
|
|
1176
|
+
}), S && S(k, p);
|
|
1177
1177
|
}, c.options.unmount = function(k) {
|
|
1178
1178
|
O && O(k);
|
|
1179
1179
|
var p, y = k.__c;
|
|
@@ -1221,8 +1221,8 @@ var us = { 7: function(n, e, t) {
|
|
|
1221
1221
|
for (var c = {}, d = [], l = 0; l < s.length; l++) {
|
|
1222
1222
|
var u = s[l], h = a.base ? u[0] + a.base : u[0], g = c[h] || 0, f = "".concat(h, " ").concat(g);
|
|
1223
1223
|
c[h] = g + 1;
|
|
1224
|
-
var
|
|
1225
|
-
if (
|
|
1224
|
+
var S = t(f), O = { css: u[1], media: u[2], sourceMap: u[3], supports: u[4], layer: u[5] };
|
|
1225
|
+
if (S !== -1) e[S].references++, e[S].updater(O);
|
|
1226
1226
|
else {
|
|
1227
1227
|
var C = i(O, a);
|
|
1228
1228
|
a.byIndex = l, e.splice(l, 0, { identifier: f, updater: C, references: 1 });
|
|
@@ -1299,12 +1299,12 @@ var us = { 7: function(n, e, t) {
|
|
|
1299
1299
|
}, 6: (n, e, t) => {
|
|
1300
1300
|
t.d(e, { en: () => o });
|
|
1301
1301
|
const o = { headlines: { error: "An error has occurred", loginEmail: "Sign in or create account", loginEmailNoSignup: "Sign in", loginFinished: "Login successful", loginPasscode: "Enter passcode", loginPassword: "Enter password", registerAuthenticator: "Create a passkey", registerConfirm: "Create account?", registerPassword: "Set new password", otpSetUp: "Set up authenticator app", profileEmails: "Emails", profilePassword: "Password", profilePasskeys: "Passkeys", isPrimaryEmail: "Primary email address", setPrimaryEmail: "Set primary email address", createEmail: "Enter a new email", createUsername: "Enter a new username", emailVerified: "Verified", emailUnverified: "Unverified", emailDelete: "Delete", renamePasskey: "Rename passkey", deletePasskey: "Delete passkey", lastUsedAt: "Last used at", createdAt: "Created at", connectedAccounts: "Connected accounts", deleteAccount: "Delete account", accountNotFound: "Account not found", signIn: "Sign in", signUp: "Create account", selectLoginMethod: "Select login method", setupLoginMethod: "Set up login method", lastUsed: "Last seen", ipAddress: "IP address", revokeSession: "Revoke session", profileSessions: "Sessions", mfaSetUp: "Set up MFA", securityKeySetUp: "Add security key", securityKeyLogin: "Security key", otpLogin: "Authentication code", renameSecurityKey: "Rename security key", deleteSecurityKey: "Delete security key", securityKeys: "Security keys", authenticatorApp: "Authenticator app", authenticatorAppAlreadySetUp: "Authenticator app is set up", authenticatorAppNotSetUp: "Set up authenticator app", trustDevice: "Trust this browser?" }, texts: { enterPasscode: 'Enter the passcode that was sent to "{emailAddress}".', enterPasscodeNoEmail: "Enter the passcode that was sent to your primary email address.", setupPasskey: "Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.", createAccount: 'No account exists for "{emailAddress}". Do you want to create a new account?', otpEnterVerificationCode: "Enter the one-time password (OTP) obtained from your authenticator app below:", otpScanQRCode: "Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.", otpSecretKey: "OTP secret key", passwordFormatHint: "Must be between {minLength} and {maxLength} characters long.", securityKeySetUp: "Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.", setPrimaryEmail: "Set this email address to be used for contacting you.", isPrimaryEmail: "This email address will be used to contact you if necessary.", emailVerified: "This email address has been verified.", emailUnverified: "This email address has not been verified.", emailDelete: "If you delete this email address, it can no longer be used to sign in.", renamePasskey: "Set a name for the passkey.", deletePasskey: "Delete this passkey from your account.", deleteAccount: "Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.", noAccountExists: 'No account exists for "{emailAddress}".', selectLoginMethodForFutureLogins: "Select one of the following login methods to use for future logins.", howDoYouWantToLogin: "How do you want to login?", mfaSetUp: "Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.", securityKeyLogin: "Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.", otpLogin: "Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.", renameSecurityKey: "Set a name for the security key.", deleteSecurityKey: "Delete this security key from your account.", authenticatorAppAlreadySetUp: "Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.", authenticatorAppNotSetUp: "Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.", trustDevice: "If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in." }, labels: { or: "or", no: "no", yes: "yes", email: "Email", continue: "Continue", copied: "copied", skip: "Skip", save: "Save", password: "Password", passkey: "Passkey", passcode: "Passcode", signInPassword: "Sign in with a password", signInPasscode: "Sign in with a passcode", forgotYourPassword: "Forgot your password?", back: "Back", signInPasskey: "Sign in with a passkey", registerAuthenticator: "Create a passkey", signIn: "Sign in", signUp: "Create account", sendNewPasscode: "Send new code", passwordRetryAfter: "Retry in {passwordRetryAfter}", passcodeResendAfter: "Request a new code in {passcodeResendAfter}", unverifiedEmail: "unverified", primaryEmail: "primary", setAsPrimaryEmail: "Set as primary", verify: "Verify", delete: "Delete", newEmailAddress: "New email address", newPassword: "New password", rename: "Rename", newPasskeyName: "New passkey name", addEmail: "Add email", createPasskey: "Create a passkey", webauthnUnsupported: "Passkeys are not supported by your browser", signInWith: "Sign in with {provider}", deleteAccount: "Yes, delete this account.", emailOrUsername: "Email or username", username: "Username", optional: "optional", dontHaveAnAccount: "Don't have an account?", alreadyHaveAnAccount: "Already have an account?", changeUsername: "Change username", setUsername: "Set username", changePassword: "Change password", setPassword: "Set password", revoke: "Revoke", currentSession: "Current session", authenticatorApp: "Authenticator app", securityKey: "Security key", securityKeyUse: "Use security key", newSecurityKeyName: "New security key name", createSecurityKey: "Add a security key", authenticatorAppManage: "Manage authenticator app", authenticatorAppAdd: "Set up", configured: "configured", useAnotherMethod: "Use another method", lastUsed: "Last used", trustDevice: "Trust this browser", staySignedIn: "Stay signed in" }, errors: { somethingWentWrong: "A technical error has occurred. Please try again later.", requestTimeout: "The request timed out.", invalidPassword: "Wrong email or password.", invalidPasscode: "The passcode provided was not correct.", passcodeAttemptsReached: "The passcode was entered incorrectly too many times. Please request a new code.", tooManyRequests: "Too many requests have been made. Please wait to repeat the requested operation.", unauthorized: "Your session has expired. Please log in again.", invalidWebauthnCredential: "This passkey cannot be used anymore.", passcodeExpired: "The passcode has expired. Please request a new one.", userVerification: "User verification required. Please ensure your authenticator device is protected with a PIN or biometric.", emailAddressAlreadyExistsError: "The email address already exists.", maxNumOfEmailAddressesReached: "No further email addresses can be added.", thirdPartyAccessDenied: "Access denied. The request was cancelled by the user or the provider has denied access for other reasons.", thirdPartyMultipleAccounts: "Cannot identify account. The email address is used by multiple accounts.", thirdPartyUnverifiedEmail: "Email verification required. Please verify the used email address with your provider.", signupDisabled: "Account registration is disabled.", handlerNotFoundError: "The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists." }, flowErrors: { technical_error: "A technical error has occurred. Please try again later.", flow_expired_error: "The session has expired, please click the button to restart.", value_invalid_error: "The entered value is invalid.", passcode_invalid: "The passcode provided was not correct.", passkey_invalid: "This passkey cannot be used anymore", passcode_max_attempts_reached: "The passcode was entered incorrectly too many times. Please request a new code.", rate_limit_exceeded: "Too many requests have been made. Please wait to repeat the requested operation.", unknown_username_error: "The username is unknown.", unknown_email_error: "The email address is unknown.", username_already_exists: "The username is already taken.", invalid_username_error: "The username must contain only letters, numbers, and underscores.", email_already_exists: "The email is already taken.", not_found: "The requested resource was not found.", operation_not_permitted_error: "The operation is not permitted.", flow_discontinuity_error: "The process cannot be continued due to user settings or the provider's configuration.", form_data_invalid_error: "The submitted form data contains errors.", unauthorized: "Your session has expired. Please log in again.", value_missing_error: "The value is missing.", value_too_long_error: "Value is too long.", value_too_short_error: "The value is too short.", webauthn_credential_invalid_mfa_only: "This credential can be used as a second factor security key only.", webauthn_credential_already_exists: "The request either timed out, was canceled or the device is already registered. Please try again or try using another device.", platform_authenticator_required: "Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser." } };
|
|
1302
|
-
} },
|
|
1302
|
+
} }, Io = {};
|
|
1303
1303
|
function Y(n) {
|
|
1304
|
-
var e =
|
|
1304
|
+
var e = Io[n];
|
|
1305
1305
|
if (e !== void 0) return e.exports;
|
|
1306
|
-
var t =
|
|
1307
|
-
return
|
|
1306
|
+
var t = Io[n] = { id: n, exports: {} };
|
|
1307
|
+
return is[n].call(t.exports, t, t.exports, Y), t.exports;
|
|
1308
1308
|
}
|
|
1309
1309
|
Y.n = (n) => {
|
|
1310
1310
|
var e = n && n.__esModule ? () => n.default : () => n;
|
|
@@ -1315,28 +1315,28 @@ Y.n = (n) => {
|
|
|
1315
1315
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1316
1316
|
}, Y.nc = void 0;
|
|
1317
1317
|
var oe = {};
|
|
1318
|
-
Y.d(oe, { fK: () =>
|
|
1319
|
-
var
|
|
1320
|
-
Y.r(
|
|
1321
|
-
var A = Y(616),
|
|
1318
|
+
Y.d(oe, { fK: () => kn, tJ: () => ki, Z7: () => Cn, Q9: () => Ci, Lv: () => xi, qQ: () => xn, I4: () => Ei, O8: () => Ce, ku: () => no, ls: () => to, bO: () => oo, yv: () => Sn, AT: () => so, m_: () => zt, KG: () => io, DH: () => wn, kf: () => po, oY: () => De, xg: () => Ai, Wg: () => Je, J: () => Oi, AC: () => ro, D_: () => Ye, jx: () => Si, nX: () => ao, Nx: () => eo, Sd: () => mt, kz: () => Qr, fX: () => lo, qA: () => co, tz: () => ho, gN: () => uo });
|
|
1319
|
+
var Bn = {};
|
|
1320
|
+
Y.r(Bn), Y.d(Bn, { apple: () => Zs, checkmark: () => Js, copy: () => Qs, customProvider: () => Gs, discord: () => Ys, exclamation: () => Xs, facebook: () => er, github: () => tr, google: () => nr, linkedin: () => or, mail: () => ir, microsoft: () => sr, passkey: () => rr, password: () => ar, qrCodeScanner: () => lr, securityKey: () => cr, spinner: () => dr });
|
|
1321
|
+
var A = Y(616), ss = 0;
|
|
1322
1322
|
function r(n, e, t, o, i, s) {
|
|
1323
1323
|
var a, c, d = {};
|
|
1324
1324
|
for (c in e) c == "ref" ? a = e[c] : d[c] = e[c];
|
|
1325
|
-
var l = { type: n, props: d, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --
|
|
1325
|
+
var l = { type: n, props: d, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: --ss, __source: i, __self: s };
|
|
1326
1326
|
if (typeof n == "function" && (a = n.defaultProps)) for (c in a) d[c] === void 0 && (d[c] = a[c]);
|
|
1327
1327
|
return A.options.vnode && A.options.vnode(l), l;
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return
|
|
1329
|
+
function vn() {
|
|
1330
|
+
return vn = Object.assign ? Object.assign.bind() : function(n) {
|
|
1331
1331
|
for (var e = 1; e < arguments.length; e++) {
|
|
1332
1332
|
var t = arguments[e];
|
|
1333
1333
|
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
|
|
1334
1334
|
}
|
|
1335
1335
|
return n;
|
|
1336
|
-
},
|
|
1336
|
+
}, vn.apply(this, arguments);
|
|
1337
1337
|
}
|
|
1338
|
-
var
|
|
1339
|
-
function
|
|
1338
|
+
var rs = ["context", "children"];
|
|
1339
|
+
function as(n) {
|
|
1340
1340
|
this.getChildContext = function() {
|
|
1341
1341
|
return n.context;
|
|
1342
1342
|
};
|
|
@@ -1345,91 +1345,91 @@ function fs(n) {
|
|
|
1345
1345
|
var s, a, c = {}, d = Object.keys(o);
|
|
1346
1346
|
for (a = 0; a < d.length; a++) i.indexOf(s = d[a]) >= 0 || (c[s] = o[s]);
|
|
1347
1347
|
return c;
|
|
1348
|
-
}(n,
|
|
1348
|
+
}(n, rs);
|
|
1349
1349
|
return (0, A.cloneElement)(e, t);
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function ls() {
|
|
1352
1352
|
var n = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
|
|
1353
|
-
this.dispatchEvent(n), this._vdom = (0, A.h)(
|
|
1353
|
+
this.dispatchEvent(n), this._vdom = (0, A.h)(as, vn({}, this._props, { context: n.detail.context }), di(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? A.hydrate : A.render)(this._vdom, this._root);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function ci(n) {
|
|
1356
1356
|
return n.replace(/-(\w)/g, function(e, t) {
|
|
1357
1357
|
return t ? t.toUpperCase() : "";
|
|
1358
1358
|
});
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function cs(n, e, t) {
|
|
1361
1361
|
if (this._vdom) {
|
|
1362
1362
|
var o = {};
|
|
1363
|
-
o[n] = t = t ?? void 0, o[
|
|
1363
|
+
o[n] = t = t ?? void 0, o[ci(n)] = t, this._vdom = (0, A.cloneElement)(this._vdom, o), (0, A.render)(this._vdom, this._root);
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function ds() {
|
|
1367
1367
|
(0, A.render)(this._vdom = null, this._root);
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function jo(n, e) {
|
|
1370
1370
|
var t = this;
|
|
1371
|
-
return (0, A.h)("slot",
|
|
1371
|
+
return (0, A.h)("slot", vn({}, n, { ref: function(o) {
|
|
1372
1372
|
o ? (t.ref = o, t._listener || (t._listener = function(i) {
|
|
1373
1373
|
i.stopPropagation(), i.detail.context = e;
|
|
1374
1374
|
}, o.addEventListener("_preact", t._listener))) : t.ref.removeEventListener("_preact", t._listener);
|
|
1375
1375
|
} }));
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function di(n, e) {
|
|
1378
1378
|
if (n.nodeType === 3) return n.data;
|
|
1379
1379
|
if (n.nodeType !== 1) return null;
|
|
1380
1380
|
var t = [], o = {}, i = 0, s = n.attributes, a = n.childNodes;
|
|
1381
|
-
for (i = s.length; i--; ) s[i].name !== "slot" && (o[s[i].name] = s[i].value, o[
|
|
1381
|
+
for (i = s.length; i--; ) s[i].name !== "slot" && (o[s[i].name] = s[i].value, o[ci(s[i].name)] = s[i].value);
|
|
1382
1382
|
for (i = a.length; i--; ) {
|
|
1383
|
-
var c =
|
|
1384
|
-
d ? o[d] = (0, A.h)(
|
|
1383
|
+
var c = di(a[i], null), d = a[i].slot;
|
|
1384
|
+
d ? o[d] = (0, A.h)(jo, { name: d }, c) : t[i] = c;
|
|
1385
1385
|
}
|
|
1386
|
-
var l = e ? (0, A.h)(
|
|
1386
|
+
var l = e ? (0, A.h)(jo, null, t) : t;
|
|
1387
1387
|
return (0, A.h)(e || n.nodeName.toLowerCase(), o, l);
|
|
1388
1388
|
}
|
|
1389
1389
|
var Z = Y(7), _ = Y(78);
|
|
1390
|
-
function
|
|
1390
|
+
function ui(n, e) {
|
|
1391
1391
|
for (var t in e) n[t] = e[t];
|
|
1392
1392
|
return n;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1394
|
+
function Do(n, e) {
|
|
1395
1395
|
for (var t in n) if (t !== "__source" && !(t in e)) return !0;
|
|
1396
1396
|
for (var o in e) if (o !== "__source" && n[o] !== e[o]) return !0;
|
|
1397
1397
|
return !1;
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function $o(n) {
|
|
1400
1400
|
this.props = n;
|
|
1401
1401
|
}
|
|
1402
|
-
(
|
|
1403
|
-
return
|
|
1402
|
+
($o.prototype = new A.Component()).isPureReactComponent = !0, $o.prototype.shouldComponentUpdate = function(n, e) {
|
|
1403
|
+
return Do(this.props, n) || Do(this.state, e);
|
|
1404
1404
|
};
|
|
1405
|
-
var
|
|
1405
|
+
var Lo = A.options.__b;
|
|
1406
1406
|
A.options.__b = function(n) {
|
|
1407
|
-
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null),
|
|
1407
|
+
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Lo && Lo(n);
|
|
1408
1408
|
};
|
|
1409
|
-
var
|
|
1409
|
+
var us = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911, hs = (A.toChildArray, A.options.__e);
|
|
1410
1410
|
A.options.__e = function(n, e, t, o) {
|
|
1411
1411
|
if (n.then) {
|
|
1412
1412
|
for (var i, s = e; s = s.__; ) if ((i = s.__c) && i.__c) return e.__e == null && (e.__e = t.__e, e.__k = t.__k), i.__c(n, e);
|
|
1413
1413
|
}
|
|
1414
|
-
|
|
1414
|
+
hs(n, e, t, o);
|
|
1415
1415
|
};
|
|
1416
|
-
var
|
|
1417
|
-
function
|
|
1416
|
+
var To = A.options.unmount;
|
|
1417
|
+
function hi(n, e, t) {
|
|
1418
1418
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(o) {
|
|
1419
1419
|
typeof o.__c == "function" && o.__c();
|
|
1420
|
-
}), n.__c.__H = null), (n =
|
|
1421
|
-
return
|
|
1420
|
+
}), n.__c.__H = null), (n = ui({}, n)).__c != null && (n.__c.__P === t && (n.__c.__P = e), n.__c = null), n.__k = n.__k && n.__k.map(function(o) {
|
|
1421
|
+
return hi(o, e, t);
|
|
1422
1422
|
})), n;
|
|
1423
1423
|
}
|
|
1424
|
-
function
|
|
1424
|
+
function pi(n, e, t) {
|
|
1425
1425
|
return n && (n.__v = null, n.__k = n.__k && n.__k.map(function(o) {
|
|
1426
|
-
return
|
|
1426
|
+
return pi(o, e, t);
|
|
1427
1427
|
}), n.__c && n.__c.__P === e && (n.__e && t.insertBefore(n.__e, n.__d), n.__c.__e = !0, n.__c.__P = t)), n;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function Ln() {
|
|
1430
1430
|
this.__u = 0, this.t = null, this.__b = null;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function fi(n) {
|
|
1433
1433
|
var e = n.__.__c;
|
|
1434
1434
|
return e && e.__a && e.__a(n);
|
|
1435
1435
|
}
|
|
@@ -1438,11 +1438,11 @@ function Bt() {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
A.options.unmount = function(n) {
|
|
1440
1440
|
var e = n.__c;
|
|
1441
|
-
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null),
|
|
1442
|
-
}, (
|
|
1441
|
+
e && e.__R && e.__R(), e && n.__h === !0 && (n.type = null), To && To(n);
|
|
1442
|
+
}, (Ln.prototype = new A.Component()).__c = function(n, e) {
|
|
1443
1443
|
var t = e.__c, o = this;
|
|
1444
1444
|
o.t == null && (o.t = []), o.t.push(t);
|
|
1445
|
-
var i =
|
|
1445
|
+
var i = fi(o.__v), s = !1, a = function() {
|
|
1446
1446
|
s || (s = !0, t.__R = null, i ? i(c) : c());
|
|
1447
1447
|
};
|
|
1448
1448
|
t.__R = a;
|
|
@@ -1450,27 +1450,27 @@ A.options.unmount = function(n) {
|
|
|
1450
1450
|
if (!--o.__u) {
|
|
1451
1451
|
if (o.state.__a) {
|
|
1452
1452
|
var l = o.state.__a;
|
|
1453
|
-
o.__v.__k[0] =
|
|
1453
|
+
o.__v.__k[0] = pi(l, l.__c.__P, l.__c.__O);
|
|
1454
1454
|
}
|
|
1455
1455
|
var u;
|
|
1456
1456
|
for (o.setState({ __a: o.__b = null }); u = o.t.pop(); ) u.forceUpdate();
|
|
1457
1457
|
}
|
|
1458
1458
|
}, d = e.__h === !0;
|
|
1459
1459
|
o.__u++ || d || o.setState({ __a: o.__b = o.__v.__k[0] }), n.then(a, a);
|
|
1460
|
-
},
|
|
1460
|
+
}, Ln.prototype.componentWillUnmount = function() {
|
|
1461
1461
|
this.t = [];
|
|
1462
|
-
},
|
|
1462
|
+
}, Ln.prototype.render = function(n, e) {
|
|
1463
1463
|
if (this.__b) {
|
|
1464
1464
|
if (this.__v.__k) {
|
|
1465
1465
|
var t = document.createElement("div"), o = this.__v.__k[0].__c;
|
|
1466
|
-
this.__v.__k[0] =
|
|
1466
|
+
this.__v.__k[0] = hi(this.__b, t, o.__O = o.__P);
|
|
1467
1467
|
}
|
|
1468
1468
|
this.__b = null;
|
|
1469
1469
|
}
|
|
1470
1470
|
var i = e.__a && (0, A.createElement)(A.Fragment, null, n.fallback);
|
|
1471
1471
|
return i && (i.__h = null), [(0, A.createElement)(A.Fragment, null, e.__a ? null : n.children), i];
|
|
1472
1472
|
};
|
|
1473
|
-
var
|
|
1473
|
+
var No = function(n, e, t) {
|
|
1474
1474
|
if (++t[1] === t[0] && n.o.delete(e), n.props.revealOrder && (n.props.revealOrder[0] !== "t" || !n.o.size)) for (t = n.u; t; ) {
|
|
1475
1475
|
for (; t.length > 3; ) t.pop()();
|
|
1476
1476
|
if (t[1] < t[0]) break;
|
|
@@ -1478,10 +1478,10 @@ var Mo = function(n, e, t) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
};
|
|
1480
1480
|
(Bt.prototype = new A.Component()).__a = function(n) {
|
|
1481
|
-
var e = this, t =
|
|
1481
|
+
var e = this, t = fi(e.__v), o = e.o.get(n);
|
|
1482
1482
|
return o[0]++, function(i) {
|
|
1483
1483
|
var s = function() {
|
|
1484
|
-
e.props.revealOrder ? (o.push(i),
|
|
1484
|
+
e.props.revealOrder ? (o.push(i), No(e, n, o)) : i();
|
|
1485
1485
|
};
|
|
1486
1486
|
t ? t(s) : s();
|
|
1487
1487
|
};
|
|
@@ -1494,10 +1494,10 @@ var Mo = function(n, e, t) {
|
|
|
1494
1494
|
}, Bt.prototype.componentDidUpdate = Bt.prototype.componentDidMount = function() {
|
|
1495
1495
|
var n = this;
|
|
1496
1496
|
this.o.forEach(function(e, t) {
|
|
1497
|
-
|
|
1497
|
+
No(n, t, e);
|
|
1498
1498
|
});
|
|
1499
1499
|
};
|
|
1500
|
-
var
|
|
1500
|
+
var ps = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, fs = /^(?: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]/, ms = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, gs = /[A-Z0-9]/g, vs = typeof document < "u", _s = function(n) {
|
|
1501
1501
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
1502
1502
|
};
|
|
1503
1503
|
A.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -1507,57 +1507,57 @@ A.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWi
|
|
|
1507
1507
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
1508
1508
|
} });
|
|
1509
1509
|
});
|
|
1510
|
-
var
|
|
1511
|
-
function
|
|
1510
|
+
var Uo = A.options.event;
|
|
1511
|
+
function ys() {
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function bs() {
|
|
1514
1514
|
return this.cancelBubble;
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function ks() {
|
|
1517
1517
|
return this.defaultPrevented;
|
|
1518
1518
|
}
|
|
1519
1519
|
A.options.event = function(n) {
|
|
1520
|
-
return
|
|
1520
|
+
return Uo && (n = Uo(n)), n.persist = ys, n.isPropagationStopped = bs, n.isDefaultPrevented = ks, n.nativeEvent = n;
|
|
1521
1521
|
};
|
|
1522
|
-
var
|
|
1522
|
+
var Mo = { configurable: !0, get: function() {
|
|
1523
1523
|
return this.class;
|
|
1524
|
-
} },
|
|
1524
|
+
} }, Ho = A.options.vnode;
|
|
1525
1525
|
A.options.vnode = function(n) {
|
|
1526
1526
|
var e = n.type, t = n.props, o = t;
|
|
1527
1527
|
if (typeof e == "string") {
|
|
1528
1528
|
for (var i in o = {}, t) {
|
|
1529
1529
|
var s = t[i];
|
|
1530
|
-
if (!(i === "value" && "defaultValue" in t && s == null ||
|
|
1530
|
+
if (!(i === "value" && "defaultValue" in t && s == null || vs && i === "children" && e === "noscript")) {
|
|
1531
1531
|
var a = i.toLowerCase();
|
|
1532
|
-
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : a === "ondoubleclick" ? i = "ondblclick" : a !== "onchange" || e !== "input" && e !== "textarea" ||
|
|
1532
|
+
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : a === "ondoubleclick" ? i = "ondblclick" : a !== "onchange" || e !== "input" && e !== "textarea" || _s(t.type) ? a === "onfocus" ? i = "onfocusin" : a === "onblur" ? i = "onfocusout" : ms.test(i) ? i = a : e.indexOf("-") === -1 && fs.test(i) ? i = i.replace(gs, "-$&").toLowerCase() : s === null && (s = void 0) : a = i = "oninput", a === "oninput" && o[i = a] && (i = "oninputCapture"), o[i] = s;
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
1535
1535
|
e == "select" && o.multiple && Array.isArray(o.value) && (o.value = (0, A.toChildArray)(t.children).forEach(function(c) {
|
|
1536
1536
|
c.props.selected = o.value.indexOf(c.props.value) != -1;
|
|
1537
1537
|
})), e == "select" && o.defaultValue != null && (o.value = (0, A.toChildArray)(t.children).forEach(function(c) {
|
|
1538
1538
|
c.props.selected = o.multiple ? o.defaultValue.indexOf(c.props.value) != -1 : o.defaultValue == c.props.value;
|
|
1539
|
-
})), n.props = o, t.class != t.className && (
|
|
1539
|
+
})), n.props = o, t.class != t.className && (Mo.enumerable = "className" in t, t.className != null && (o.class = t.className), Object.defineProperty(o, "className", Mo));
|
|
1540
1540
|
}
|
|
1541
|
-
n.$$typeof =
|
|
1541
|
+
n.$$typeof = ps, Ho && Ho(n);
|
|
1542
1542
|
};
|
|
1543
|
-
var
|
|
1543
|
+
var Ro = A.options.__r;
|
|
1544
1544
|
A.options.__r = function(n) {
|
|
1545
|
-
|
|
1545
|
+
Ro && Ro(n), n.__c;
|
|
1546
1546
|
};
|
|
1547
|
-
var
|
|
1548
|
-
function
|
|
1547
|
+
var Wo = A.options.diffed;
|
|
1548
|
+
function mi(n) {
|
|
1549
1549
|
const e = "==".slice(0, (4 - n.length % 4) % 4), t = n.replace(/-/g, "+").replace(/_/g, "/") + e, o = atob(t), i = new ArrayBuffer(o.length), s = new Uint8Array(i);
|
|
1550
1550
|
for (let a = 0; a < o.length; a++) s[a] = o.charCodeAt(a);
|
|
1551
1551
|
return i;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function gi(n) {
|
|
1554
1554
|
const e = new Uint8Array(n);
|
|
1555
1555
|
let t = "";
|
|
1556
1556
|
for (const o of e) t += String.fromCharCode(o);
|
|
1557
1557
|
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
1558
1558
|
}
|
|
1559
1559
|
A.options.diffed = function(n) {
|
|
1560
|
-
|
|
1560
|
+
Wo && Wo(n);
|
|
1561
1561
|
var e = n.props, t = n.__e;
|
|
1562
1562
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
1563
1563
|
}, A.Fragment, _.useLayoutEffect, _.useState, _.useId, _.useReducer, _.useEffect, _.useLayoutEffect, _.useRef, _.useImperativeHandle, _.useMemo, _.useCallback, _.useContext, _.useDebugValue, A.createElement, A.createContext, A.createRef, A.Fragment, A.Component;
|
|
@@ -1579,49 +1579,49 @@ function _t(n, e, t) {
|
|
|
1579
1579
|
return o;
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function Vn(n, e) {
|
|
1583
1583
|
return { required: !0, schema: n, derive: e };
|
|
1584
1584
|
}
|
|
1585
1585
|
function me(n) {
|
|
1586
1586
|
return { required: !0, schema: n };
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function Se(n) {
|
|
1589
1589
|
return { required: !1, schema: n };
|
|
1590
1590
|
}
|
|
1591
|
-
var
|
|
1591
|
+
var vi = { type: me(ce), id: me(Ve), transports: Se(ce) }, _i = { appid: Se(ce), appidExclude: Se(ce), credProps: Se(ce) }, yi = { appid: Se(ce), appidExclude: Se(ce), credProps: Se(ce) }, ws = { publicKey: me({ rp: me(ce), user: me({ id: me(Ve), name: me(ce), displayName: me(ce) }), challenge: me(Ve), pubKeyCredParams: me(ce), timeout: Se(ce), excludeCredentials: Se([vi]), authenticatorSelection: Se(ce), attestation: Se(ce), extensions: Se(_i) }), signal: Se(ce) }, xs = { type: me(ce), id: me(ce), rawId: me(Ve), authenticatorAttachment: Se(ce), response: me({ clientDataJSON: me(Ve), attestationObject: me(Ve), transports: Vn(ce, (n) => {
|
|
1592
1592
|
var e;
|
|
1593
1593
|
return ((e = n.getTransports) == null ? void 0 : e.call(n)) || [];
|
|
1594
|
-
}) }), clientExtensionResults:
|
|
1595
|
-
async function
|
|
1594
|
+
}) }), clientExtensionResults: Vn(yi, (n) => n.getClientExtensionResults()) }, Ss = { mediation: Se(ce), publicKey: me({ challenge: me(Ve), timeout: Se(ce), rpId: Se(ce), allowCredentials: Se([vi]), userVerification: Se(ce), extensions: Se(_i) }), signal: Se(ce) }, Cs = { type: me(ce), id: me(ce), rawId: me(Ve), authenticatorAttachment: Se(ce), response: me({ clientDataJSON: me(Ve), authenticatorData: me(Ve), signature: me(Ve), userHandle: me(Ve) }), clientExtensionResults: Vn(yi, (n) => n.getClientExtensionResults()) };
|
|
1595
|
+
async function zo(n) {
|
|
1596
1596
|
const e = await navigator.credentials.create(function(t) {
|
|
1597
|
-
return _t(
|
|
1597
|
+
return _t(mi, ws, t);
|
|
1598
1598
|
}(n));
|
|
1599
1599
|
return function(t) {
|
|
1600
|
-
return _t(
|
|
1600
|
+
return _t(gi, xs, t);
|
|
1601
1601
|
}(e);
|
|
1602
1602
|
}
|
|
1603
|
-
async function
|
|
1603
|
+
async function qo(n) {
|
|
1604
1604
|
const e = await navigator.credentials.get(function(t) {
|
|
1605
|
-
return _t(
|
|
1605
|
+
return _t(mi, Ss, t);
|
|
1606
1606
|
}(n));
|
|
1607
1607
|
return function(t) {
|
|
1608
|
-
return _t(
|
|
1608
|
+
return _t(gi, Cs, t);
|
|
1609
1609
|
}(e);
|
|
1610
1610
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return
|
|
1611
|
+
function _n() {
|
|
1612
|
+
return _n = Object.assign ? Object.assign.bind() : function(n) {
|
|
1613
1613
|
for (var e = 1; e < arguments.length; e++) {
|
|
1614
1614
|
var t = arguments[e];
|
|
1615
1615
|
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]);
|
|
1616
1616
|
}
|
|
1617
1617
|
return n;
|
|
1618
|
-
},
|
|
1618
|
+
}, _n.apply(this, arguments);
|
|
1619
1619
|
}
|
|
1620
|
-
var
|
|
1621
|
-
function
|
|
1622
|
-
return "__private_" +
|
|
1620
|
+
var As = 0;
|
|
1621
|
+
function bi(n) {
|
|
1622
|
+
return "__private_" + As++ + "_" + n;
|
|
1623
1623
|
}
|
|
1624
|
-
function
|
|
1624
|
+
function Tn(n, e) {
|
|
1625
1625
|
if (!Object.prototype.hasOwnProperty.call(n, e)) throw new TypeError("attempted to use private field on non-instance");
|
|
1626
1626
|
return n;
|
|
1627
1627
|
}
|
|
@@ -1635,44 +1635,44 @@ class De extends Ce {
|
|
|
1635
1635
|
super("Technical error", "somethingWentWrong", e), Object.setPrototypeOf(this, De.prototype);
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
|
-
class
|
|
1638
|
+
class kn extends Ce {
|
|
1639
1639
|
constructor(e, t) {
|
|
1640
|
-
super("Conflict error", "conflict", t), Object.setPrototypeOf(this,
|
|
1640
|
+
super("Conflict error", "conflict", t), Object.setPrototypeOf(this, kn.prototype);
|
|
1641
1641
|
}
|
|
1642
1642
|
}
|
|
1643
|
-
class
|
|
1643
|
+
class wn extends Ce {
|
|
1644
1644
|
constructor(e) {
|
|
1645
|
-
super("Request timed out error", "requestTimeout", e), Object.setPrototypeOf(this,
|
|
1645
|
+
super("Request timed out error", "requestTimeout", e), Object.setPrototypeOf(this, wn.prototype);
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
|
-
class
|
|
1648
|
+
class eo extends Ce {
|
|
1649
1649
|
constructor(e) {
|
|
1650
|
-
super("Request cancelled error", "requestCancelled", e), Object.setPrototypeOf(this,
|
|
1650
|
+
super("Request cancelled error", "requestCancelled", e), Object.setPrototypeOf(this, eo.prototype);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
-
class
|
|
1653
|
+
class to extends Ce {
|
|
1654
1654
|
constructor(e) {
|
|
1655
|
-
super("Invalid password error", "invalidPassword", e), Object.setPrototypeOf(this,
|
|
1655
|
+
super("Invalid password error", "invalidPassword", e), Object.setPrototypeOf(this, to.prototype);
|
|
1656
1656
|
}
|
|
1657
1657
|
}
|
|
1658
|
-
class
|
|
1658
|
+
class no extends Ce {
|
|
1659
1659
|
constructor(e) {
|
|
1660
|
-
super("Invalid Passcode error", "invalidPasscode", e), Object.setPrototypeOf(this,
|
|
1660
|
+
super("Invalid Passcode error", "invalidPasscode", e), Object.setPrototypeOf(this, no.prototype);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
|
-
class
|
|
1663
|
+
class oo extends Ce {
|
|
1664
1664
|
constructor(e) {
|
|
1665
|
-
super("Invalid WebAuthn credential error", "invalidWebauthnCredential", e), Object.setPrototypeOf(this,
|
|
1665
|
+
super("Invalid WebAuthn credential error", "invalidWebauthnCredential", e), Object.setPrototypeOf(this, oo.prototype);
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
|
-
class
|
|
1668
|
+
class io extends Ce {
|
|
1669
1669
|
constructor(e) {
|
|
1670
|
-
super("Passcode expired error", "passcodeExpired", e), Object.setPrototypeOf(this,
|
|
1670
|
+
super("Passcode expired error", "passcodeExpired", e), Object.setPrototypeOf(this, io.prototype);
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
|
-
class
|
|
1673
|
+
class so extends Ce {
|
|
1674
1674
|
constructor(e) {
|
|
1675
|
-
super("Maximum number of Passcode attempts reached error", "passcodeAttemptsReached", e), Object.setPrototypeOf(this,
|
|
1675
|
+
super("Maximum number of Passcode attempts reached error", "passcodeAttemptsReached", e), Object.setPrototypeOf(this, so.prototype);
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
class zt extends Ce {
|
|
@@ -1680,9 +1680,9 @@ class zt extends Ce {
|
|
|
1680
1680
|
super("Not found error", "notFound", e), Object.setPrototypeOf(this, zt.prototype);
|
|
1681
1681
|
}
|
|
1682
1682
|
}
|
|
1683
|
-
class
|
|
1683
|
+
class ro extends Ce {
|
|
1684
1684
|
constructor(e, t) {
|
|
1685
|
-
super("Too many requests error", "tooManyRequests", t), this.retryAfter = void 0, this.retryAfter = e, Object.setPrototypeOf(this,
|
|
1685
|
+
super("Too many requests error", "tooManyRequests", t), this.retryAfter = void 0, this.retryAfter = e, Object.setPrototypeOf(this, ro.prototype);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
class Ye extends Ce {
|
|
@@ -1695,19 +1695,19 @@ class xn extends Ce {
|
|
|
1695
1695
|
super("Forbidden error", "forbidden", e), Object.setPrototypeOf(this, xn.prototype);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
class
|
|
1698
|
+
class ao extends Ce {
|
|
1699
1699
|
constructor(e) {
|
|
1700
|
-
super("User verification error", "userVerification", e), Object.setPrototypeOf(this,
|
|
1700
|
+
super("User verification error", "userVerification", e), Object.setPrototypeOf(this, ao.prototype);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
|
-
class
|
|
1703
|
+
class Sn extends Ce {
|
|
1704
1704
|
constructor(e) {
|
|
1705
|
-
super("Maximum number of email addresses reached error", "maxNumOfEmailAddressesReached", e), Object.setPrototypeOf(this,
|
|
1705
|
+
super("Maximum number of email addresses reached error", "maxNumOfEmailAddressesReached", e), Object.setPrototypeOf(this, Sn.prototype);
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
|
-
class
|
|
1708
|
+
class Cn extends Ce {
|
|
1709
1709
|
constructor(e) {
|
|
1710
|
-
super("The email address already exists", "emailAddressAlreadyExistsError", e), Object.setPrototypeOf(this,
|
|
1710
|
+
super("The email address already exists", "emailAddressAlreadyExistsError", e), Object.setPrototypeOf(this, Cn.prototype);
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
1713
|
class Je extends Ce {
|
|
@@ -1715,30 +1715,30 @@ class Je extends Ce {
|
|
|
1715
1715
|
super("An error occurred during third party sign up/sign in", e, t), Object.setPrototypeOf(this, Je.prototype);
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
const
|
|
1719
|
-
class
|
|
1718
|
+
const lo = "hanko-session-created", co = "hanko-session-expired", uo = "hanko-user-logged-out", ho = "hanko-user-deleted";
|
|
1719
|
+
class ki extends CustomEvent {
|
|
1720
1720
|
constructor(e, t) {
|
|
1721
1721
|
super(e, { detail: t });
|
|
1722
1722
|
}
|
|
1723
1723
|
}
|
|
1724
|
-
class
|
|
1724
|
+
class wi {
|
|
1725
1725
|
constructor() {
|
|
1726
1726
|
this._dispatchEvent = document.dispatchEvent.bind(document);
|
|
1727
1727
|
}
|
|
1728
1728
|
dispatch(e, t) {
|
|
1729
|
-
this._dispatchEvent(new
|
|
1729
|
+
this._dispatchEvent(new ki(e, t));
|
|
1730
1730
|
}
|
|
1731
1731
|
dispatchSessionCreatedEvent(e) {
|
|
1732
|
-
this.dispatch(
|
|
1732
|
+
this.dispatch(lo, e);
|
|
1733
1733
|
}
|
|
1734
1734
|
dispatchSessionExpiredEvent() {
|
|
1735
|
-
this.dispatch(
|
|
1735
|
+
this.dispatch(co, null);
|
|
1736
1736
|
}
|
|
1737
1737
|
dispatchUserLoggedOutEvent() {
|
|
1738
|
-
this.dispatch(
|
|
1738
|
+
this.dispatch(uo, null);
|
|
1739
1739
|
}
|
|
1740
1740
|
dispatchUserDeletedEvent() {
|
|
1741
|
-
this.dispatch(
|
|
1741
|
+
this.dispatch(ho, null);
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
function Vt(n) {
|
|
@@ -1748,7 +1748,7 @@ function Vt(n) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
return n;
|
|
1750
1750
|
}
|
|
1751
|
-
var
|
|
1751
|
+
var Nn = function n(e, t) {
|
|
1752
1752
|
function o(i, s, a) {
|
|
1753
1753
|
if (typeof document < "u") {
|
|
1754
1754
|
typeof (a = Vt({}, t, a)).expires == "number" && (a.expires = new Date(Date.now() + 864e5 * a.expires)), a.expires && (a.expires = a.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
@@ -1781,26 +1781,26 @@ var Un = function n(e, t) {
|
|
|
1781
1781
|
}, write: function(n) {
|
|
1782
1782
|
return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
1783
1783
|
} }, { path: "/" });
|
|
1784
|
-
class
|
|
1784
|
+
class Os {
|
|
1785
1785
|
constructor(e) {
|
|
1786
1786
|
var t;
|
|
1787
1787
|
this.authCookieName = void 0, this.authCookieDomain = void 0, this.authCookieSameSite = void 0, this.authCookieName = e.cookieName, this.authCookieDomain = e.cookieDomain, this.authCookieSameSite = (t = e.cookieSameSite) != null ? t : "lax";
|
|
1788
1788
|
}
|
|
1789
1789
|
getAuthCookie() {
|
|
1790
|
-
return
|
|
1790
|
+
return Nn.get(this.authCookieName);
|
|
1791
1791
|
}
|
|
1792
1792
|
setAuthCookie(e, t) {
|
|
1793
1793
|
const o = { secure: !0, sameSite: this.authCookieSameSite };
|
|
1794
1794
|
this.authCookieDomain !== void 0 && (o.domain = this.authCookieDomain);
|
|
1795
|
-
const i =
|
|
1795
|
+
const i = _n({}, o, t);
|
|
1796
1796
|
if ((i.sameSite === "none" || i.sameSite === "None") && i.secure === !1) throw new De(new Error("Secure attribute must be set when SameSite=None"));
|
|
1797
|
-
|
|
1797
|
+
Nn.set(this.authCookieName, e, i);
|
|
1798
1798
|
}
|
|
1799
1799
|
removeAuthCookie() {
|
|
1800
|
-
|
|
1800
|
+
Nn.remove(this.authCookieName);
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
|
-
class
|
|
1803
|
+
class Ps {
|
|
1804
1804
|
constructor(e) {
|
|
1805
1805
|
this.keyName = void 0, this.keyName = e.keyName;
|
|
1806
1806
|
}
|
|
@@ -1814,7 +1814,7 @@ class Ts {
|
|
|
1814
1814
|
sessionStorage.removeItem(this.keyName);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
class
|
|
1817
|
+
class Es {
|
|
1818
1818
|
constructor(e) {
|
|
1819
1819
|
this._xhr = void 0, this._xhr = e;
|
|
1820
1820
|
}
|
|
@@ -1822,9 +1822,9 @@ class Ns {
|
|
|
1822
1822
|
return this._xhr.getResponseHeader(e);
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
|
-
class
|
|
1825
|
+
class Is {
|
|
1826
1826
|
constructor(e) {
|
|
1827
|
-
this.headers = void 0, this.ok = void 0, this.status = void 0, this.statusText = void 0, this.url = void 0, this._decodedJSON = void 0, this.xhr = void 0, this.headers = new
|
|
1827
|
+
this.headers = void 0, this.ok = void 0, this.status = void 0, this.statusText = void 0, this.url = void 0, this._decodedJSON = void 0, this.xhr = void 0, this.headers = new Es(e), this.ok = e.status >= 200 && e.status <= 299, this.status = e.status, this.statusText = e.statusText, this.url = e.responseURL, this.xhr = e;
|
|
1828
1828
|
}
|
|
1829
1829
|
json() {
|
|
1830
1830
|
return this._decodedJSON || (this._decodedJSON = JSON.parse(this.xhr.response)), this._decodedJSON;
|
|
@@ -1834,19 +1834,19 @@ class Us {
|
|
|
1834
1834
|
return isNaN(t) ? 0 : t;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
class
|
|
1837
|
+
class js {
|
|
1838
1838
|
constructor(e, t) {
|
|
1839
|
-
this.timeout = void 0, this.api = void 0, this.dispatcher = void 0, this.cookie = void 0, this.sessionTokenStorage = void 0, this.lang = void 0, this.sessionTokenLocation = void 0, this.api = e, this.timeout = t.timeout, this.dispatcher = new
|
|
1839
|
+
this.timeout = void 0, this.api = void 0, this.dispatcher = void 0, this.cookie = void 0, this.sessionTokenStorage = void 0, this.lang = void 0, this.sessionTokenLocation = void 0, this.api = e, this.timeout = t.timeout, this.dispatcher = new wi(), this.cookie = new Os(_n({}, t)), this.sessionTokenStorage = new Ps({ keyName: t.cookieName }), this.lang = t.lang, this.sessionTokenLocation = t.sessionTokenLocation;
|
|
1840
1840
|
}
|
|
1841
1841
|
_fetch(e, t, o = new XMLHttpRequest()) {
|
|
1842
1842
|
const i = this, s = this.api + e, a = this.timeout, c = this.getAuthToken(), d = this.lang;
|
|
1843
1843
|
return new Promise(function(l, u) {
|
|
1844
1844
|
o.open(t.method, s, !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 = a, o.withCredentials = !0, o.onload = () => {
|
|
1845
|
-
i.processHeaders(o), l(new
|
|
1845
|
+
i.processHeaders(o), l(new Is(o));
|
|
1846
1846
|
}, o.onerror = () => {
|
|
1847
1847
|
u(new De());
|
|
1848
1848
|
}, o.ontimeout = () => {
|
|
1849
|
-
u(new
|
|
1849
|
+
u(new wn());
|
|
1850
1850
|
}, o.send(t.body ? t.body.toString() : null);
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
@@ -1902,10 +1902,10 @@ class Ms {
|
|
|
1902
1902
|
}
|
|
1903
1903
|
class lt {
|
|
1904
1904
|
constructor(e, t) {
|
|
1905
|
-
this.client = void 0, this.client = new
|
|
1905
|
+
this.client = void 0, this.client = new js(e, t);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
class
|
|
1908
|
+
class xi extends lt {
|
|
1909
1909
|
getDomain(e) {
|
|
1910
1910
|
if (!e) throw new Je("somethingWentWrong", new Error("email missing from request"));
|
|
1911
1911
|
const t = e.split("@");
|
|
@@ -1954,7 +1954,7 @@ class Ai extends lt {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
|
-
class
|
|
1957
|
+
class Si extends lt {
|
|
1958
1958
|
async getInfo(e) {
|
|
1959
1959
|
const t = await this.client.post("/user", { email: e });
|
|
1960
1960
|
if (t.status === 404) throw new zt();
|
|
@@ -1963,7 +1963,7 @@ class Oi extends lt {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
async create(e) {
|
|
1965
1965
|
const t = await this.client.post("/users", { email: e });
|
|
1966
|
-
if (t.status === 409) throw new
|
|
1966
|
+
if (t.status === 409) throw new kn();
|
|
1967
1967
|
if (t.status === 403) throw new xn();
|
|
1968
1968
|
if (!t.ok) throw new De();
|
|
1969
1969
|
return t.json();
|
|
@@ -1987,7 +1987,7 @@ class Oi extends lt {
|
|
|
1987
1987
|
if (this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), this.client.dispatcher.dispatchUserLoggedOutEvent(), e.status !== 401 && !e.ok) throw new De();
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
|
-
class
|
|
1990
|
+
class Ci extends lt {
|
|
1991
1991
|
async list() {
|
|
1992
1992
|
const e = await this.client.get("/emails");
|
|
1993
1993
|
if (e.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Ye();
|
|
@@ -1997,7 +1997,7 @@ class Pi extends lt {
|
|
|
1997
1997
|
async create(e) {
|
|
1998
1998
|
const t = await this.client.post("/emails", { address: e });
|
|
1999
1999
|
if (t.ok) return t.json();
|
|
2000
|
-
throw t.status === 400 ? new
|
|
2000
|
+
throw t.status === 400 ? new Cn() : t.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Ye()) : t.status === 409 ? new Sn() : new De();
|
|
2001
2001
|
}
|
|
2002
2002
|
async setPrimaryEmail(e) {
|
|
2003
2003
|
const t = await this.client.post(`/emails/${e}/set_primary`);
|
|
@@ -2010,7 +2010,7 @@ class Pi extends lt {
|
|
|
2010
2010
|
if (!t.ok) throw new De();
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
|
-
class
|
|
2013
|
+
class Ai extends lt {
|
|
2014
2014
|
async auth(e, t) {
|
|
2015
2015
|
const o = new URL("/thirdparty/auth", this.client.api);
|
|
2016
2016
|
if (!e) throw new Je("somethingWentWrong", new Error("provider missing from request"));
|
|
@@ -2047,7 +2047,7 @@ class Ei extends lt {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
|
-
class
|
|
2050
|
+
class Oi extends lt {
|
|
2051
2051
|
async validate() {
|
|
2052
2052
|
const e = new URLSearchParams(window.location.search).get("hanko_token");
|
|
2053
2053
|
if (!e) return;
|
|
@@ -2057,7 +2057,7 @@ class Ii extends lt {
|
|
|
2057
2057
|
return t.json();
|
|
2058
2058
|
}
|
|
2059
2059
|
}
|
|
2060
|
-
class
|
|
2060
|
+
class Ds {
|
|
2061
2061
|
static throttle(e, t, o = {}) {
|
|
2062
2062
|
const { leading: i = !0, trailing: s = !0 } = o;
|
|
2063
2063
|
let a, c, d, l = 0;
|
|
@@ -2072,9 +2072,9 @@ class Hs {
|
|
|
2072
2072
|
};
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
class
|
|
2075
|
+
class An {
|
|
2076
2076
|
constructor() {
|
|
2077
|
-
this.throttleLimit = 1e3, this._addEventListener = document.addEventListener.bind(document), this._removeEventListener = document.removeEventListener.bind(document), this._throttle =
|
|
2077
|
+
this.throttleLimit = 1e3, this._addEventListener = document.addEventListener.bind(document), this._removeEventListener = document.removeEventListener.bind(document), this._throttle = Ds.throttle;
|
|
2078
2078
|
}
|
|
2079
2079
|
wrapCallback(e, t) {
|
|
2080
2080
|
const o = (i) => {
|
|
@@ -2090,29 +2090,29 @@ class On {
|
|
|
2090
2090
|
return { type: e, callback: o, once: t, throttle: i };
|
|
2091
2091
|
}
|
|
2092
2092
|
addEventListener(e, t, o) {
|
|
2093
|
-
return this.addEventListenerWithType(
|
|
2093
|
+
return this.addEventListenerWithType(An.mapAddEventListenerParams(e, t, o));
|
|
2094
2094
|
}
|
|
2095
2095
|
onSessionCreated(e, t) {
|
|
2096
|
-
return this.addEventListener(
|
|
2096
|
+
return this.addEventListener(lo, { callback: e, once: t }, !0);
|
|
2097
2097
|
}
|
|
2098
2098
|
onSessionExpired(e, t) {
|
|
2099
|
-
return this.addEventListener(
|
|
2099
|
+
return this.addEventListener(co, { callback: e, once: t }, !0);
|
|
2100
2100
|
}
|
|
2101
2101
|
onUserLoggedOut(e, t) {
|
|
2102
|
-
return this.addEventListener(
|
|
2102
|
+
return this.addEventListener(uo, { callback: e, once: t });
|
|
2103
2103
|
}
|
|
2104
2104
|
onUserDeleted(e, t) {
|
|
2105
|
-
return this.addEventListener(
|
|
2105
|
+
return this.addEventListener(ho, { callback: e, once: t });
|
|
2106
2106
|
}
|
|
2107
2107
|
}
|
|
2108
|
-
class
|
|
2108
|
+
class po extends lt {
|
|
2109
2109
|
async validate() {
|
|
2110
2110
|
const e = await this.client.get("/sessions/validate");
|
|
2111
2111
|
if (!e.ok) throw new De();
|
|
2112
2112
|
return await e.json();
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
2115
|
-
class
|
|
2115
|
+
class $s extends lt {
|
|
2116
2116
|
isValid() {
|
|
2117
2117
|
let e;
|
|
2118
2118
|
try {
|
|
@@ -2124,7 +2124,7 @@ class Rs extends lt {
|
|
|
2124
2124
|
return !!e && e.is_valid;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
class
|
|
2127
|
+
class Ls {
|
|
2128
2128
|
constructor(e) {
|
|
2129
2129
|
this.storageKey = void 0, this.defaultState = { expiration: 0, lastCheck: 0 }, this.storageKey = e;
|
|
2130
2130
|
}
|
|
@@ -2136,7 +2136,7 @@ class Ws {
|
|
|
2136
2136
|
window.localStorage.setItem(this.storageKey, JSON.stringify(e || this.defaultState));
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
|
-
class
|
|
2139
|
+
class Ts {
|
|
2140
2140
|
constructor(e, t) {
|
|
2141
2141
|
this.onActivityCallback = void 0, this.onInactivityCallback = void 0, this.handleFocus = () => {
|
|
2142
2142
|
this.onActivityCallback();
|
|
@@ -2147,7 +2147,7 @@ class zs {
|
|
|
2147
2147
|
}, this.hasFocus = () => document.hasFocus(), this.onActivityCallback = e, this.onInactivityCallback = t, window.addEventListener("focus", this.handleFocus), window.addEventListener("blur", this.handleBlur), document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
|
2148
2148
|
}
|
|
2149
2149
|
}
|
|
2150
|
-
class
|
|
2150
|
+
class Ns {
|
|
2151
2151
|
constructor(e, t, o) {
|
|
2152
2152
|
this.intervalID = null, this.timeoutID = null, this.checkInterval = void 0, this.checkSession = void 0, this.onSessionExpired = void 0, this.checkInterval = e, this.checkSession = t, this.onSessionExpired = o;
|
|
2153
2153
|
}
|
|
@@ -2184,7 +2184,7 @@ class qs {
|
|
|
2184
2184
|
return this.checkInterval >= t ? this.checkInterval - t % this.checkInterval : 0;
|
|
2185
2185
|
}
|
|
2186
2186
|
}
|
|
2187
|
-
class
|
|
2187
|
+
class Us {
|
|
2188
2188
|
constructor(e = "hanko_session", t, o, i) {
|
|
2189
2189
|
this.channel = void 0, this.onSessionExpired = void 0, this.onSessionCreated = void 0, this.onLeadershipRequested = void 0, this.handleMessage = (s) => {
|
|
2190
2190
|
const a = s.data;
|
|
@@ -2204,9 +2204,9 @@ class Fs {
|
|
|
2204
2204
|
this.channel.postMessage(e);
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
class
|
|
2207
|
+
class Ms extends wi {
|
|
2208
2208
|
constructor(e, t) {
|
|
2209
|
-
super(), this.listener = new
|
|
2209
|
+
super(), this.listener = new An(), this.checkInterval = 3e4, this.client = void 0, this.sessionState = void 0, this.windowActivityManager = void 0, this.scheduler = void 0, this.sessionChannel = void 0, this.isLoggedIn = void 0, this.client = new po(e, t), this.checkInterval = t.sessionCheckInterval, this.sessionState = new Ls(`${t.cookieName}_session_state`), this.sessionChannel = new Us(this.getSessionCheckChannelName(t.sessionTokenLocation, t.sessionCheckChannelName), () => this.onChannelSessionExpired(), (s) => this.onChannelSessionCreated(s), () => this.onChannelLeadershipRequested()), this.scheduler = new Ns(this.checkInterval, () => this.checkSession(), () => this.onSessionExpired()), this.windowActivityManager = new Ts(() => this.startSessionCheck(), () => this.scheduler.stop());
|
|
2210
2210
|
const o = Date.now(), { expiration: i } = this.sessionState.load();
|
|
2211
2211
|
this.isLoggedIn = o < i, this.initializeEventListeners(), this.startSessionCheck();
|
|
2212
2212
|
}
|
|
@@ -2246,13 +2246,13 @@ class Ks extends Ci {
|
|
|
2246
2246
|
return o != null && o !== "" || (o = `${t}-${Math.floor(100 * Math.random()) + 1}`, sessionStorage.setItem("sessionCheckChannelName", o)), o;
|
|
2247
2247
|
}
|
|
2248
2248
|
}
|
|
2249
|
-
var ft, bt =
|
|
2250
|
-
class
|
|
2249
|
+
var ft, bt = bi("actionDefinitions"), Un = bi("createActionsProxy");
|
|
2250
|
+
class Mn {
|
|
2251
2251
|
toJSON() {
|
|
2252
|
-
return { name: this.name, payload: this.payload, error: this.error, status: this.status, csrf_token: this.csrf_token, actions:
|
|
2252
|
+
return { name: this.name, payload: this.payload, error: this.error, status: this.status, csrf_token: this.csrf_token, actions: Tn(this, bt)[bt] };
|
|
2253
2253
|
}
|
|
2254
2254
|
constructor({ name: e, payload: t, error: o, status: i, actions: s, csrf_token: a }, c) {
|
|
2255
|
-
Object.defineProperty(this,
|
|
2255
|
+
Object.defineProperty(this, Un, { value: Hs }), 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 = a, Tn(this, bt)[bt] = s, this.actions = Tn(this, Un)[Un](s, a), this.fetchNextState = c;
|
|
2256
2256
|
}
|
|
2257
2257
|
runAction(e, t) {
|
|
2258
2258
|
const o = {};
|
|
@@ -2268,14 +2268,14 @@ class Hn {
|
|
|
2268
2268
|
validateAction(e) {
|
|
2269
2269
|
if ("inputs" in e) for (const t in e.inputs) {
|
|
2270
2270
|
let i = function(a, c, d, l) {
|
|
2271
|
-
throw new
|
|
2271
|
+
throw new Pi({ reason: a, inputName: t, wanted: d, actual: l, message: c });
|
|
2272
2272
|
};
|
|
2273
2273
|
const o = e.inputs[t], s = o.value;
|
|
2274
2274
|
o.required && !s && i(ft.Required, "is required"), (o.min_length != null || o.max_length != null) && ("length" in s || i(ft.InvalidInputDefinition, 'has min/max length requirement, but is missing "length" property', "string", typeof s), o.min_length != null && s < o.min_length && i(ft.MinLength, `too short (min ${o.min_length})`, o.min_length, s.length), o.max_length != null && s > o.max_length && i(ft.MaxLength, `too long (max ${o.max_length})`, o.max_length, s.length));
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
2277
|
}
|
|
2278
|
-
function
|
|
2278
|
+
function Hs(n, e) {
|
|
2279
2279
|
const t = (i) => this.runAction(i, e), o = (i) => this.validateAction(i);
|
|
2280
2280
|
return new Proxy(n, { get(i, s) {
|
|
2281
2281
|
if (typeof s == "symbol") return i[s];
|
|
@@ -2285,7 +2285,7 @@ function Bs(n, e) {
|
|
|
2285
2285
|
try {
|
|
2286
2286
|
o(d);
|
|
2287
2287
|
} catch (l) {
|
|
2288
|
-
if (l instanceof
|
|
2288
|
+
if (l instanceof Pi) return l;
|
|
2289
2289
|
throw l;
|
|
2290
2290
|
}
|
|
2291
2291
|
}, run: () => t(d) });
|
|
@@ -2300,24 +2300,24 @@ function Bs(n, e) {
|
|
|
2300
2300
|
(function(n) {
|
|
2301
2301
|
n[n.InvalidInputDefinition = 0] = "InvalidInputDefinition", n[n.MinLength = 1] = "MinLength", n[n.MaxLength = 2] = "MaxLength", n[n.Required = 3] = "Required";
|
|
2302
2302
|
})(ft || (ft = {}));
|
|
2303
|
-
class
|
|
2303
|
+
class Pi extends Error {
|
|
2304
2304
|
constructor(e) {
|
|
2305
2305
|
super(`"${e.inputName}" ${e.message}`), this.reason = void 0, this.inputName = void 0, this.wanted = void 0, this.actual = void 0, this.name = "ValidationError", this.reason = e.reason, this.inputName = e.inputName, this.wanted = e.wanted, this.actual = e.actual;
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function Fo(n) {
|
|
2309
2309
|
return typeof n == "object" && n !== null && "status" in n && "error" in n && "name" in n && !!n.name && !!n.status;
|
|
2310
2310
|
}
|
|
2311
|
-
class
|
|
2311
|
+
class Rs extends lt {
|
|
2312
2312
|
constructor(...e) {
|
|
2313
2313
|
var t;
|
|
2314
2314
|
super(...e), t = this, this.run = async function(o, i) {
|
|
2315
2315
|
try {
|
|
2316
|
-
if (!
|
|
2316
|
+
if (!Fo(o)) throw new Ws(o);
|
|
2317
2317
|
const a = i[o.name];
|
|
2318
|
-
if (!a) throw new
|
|
2318
|
+
if (!a) throw new fo(o);
|
|
2319
2319
|
let c = await a(o);
|
|
2320
|
-
if (typeof (s = c) == "object" && s !== null && "href" in s && "inputs" in s && (c = await c.run()),
|
|
2320
|
+
if (typeof (s = c) == "object" && s !== null && "href" in s && "inputs" in s && (c = await c.run()), Fo(c)) return t.run(c, i);
|
|
2321
2321
|
} catch (a) {
|
|
2322
2322
|
if (typeof i.onError == "function") return i.onError(a);
|
|
2323
2323
|
}
|
|
@@ -2329,7 +2329,7 @@ class Vs extends lt {
|
|
|
2329
2329
|
const i = await async function s(a, c) {
|
|
2330
2330
|
try {
|
|
2331
2331
|
const d = await o.client.post(a, c);
|
|
2332
|
-
return new
|
|
2332
|
+
return new Mn(d.json(), s);
|
|
2333
2333
|
} catch (d) {
|
|
2334
2334
|
t.onError == null || t.onError(d);
|
|
2335
2335
|
}
|
|
@@ -2338,10 +2338,10 @@ class Vs extends lt {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
async fromString(e, t) {
|
|
2340
2340
|
var o = this;
|
|
2341
|
-
const i = new
|
|
2341
|
+
const i = new Mn(JSON.parse(e), async function s(a, c) {
|
|
2342
2342
|
try {
|
|
2343
2343
|
const d = await o.client.post(a, c);
|
|
2344
|
-
return new
|
|
2344
|
+
return new Mn(d.json(), s);
|
|
2345
2345
|
} catch (d) {
|
|
2346
2346
|
t.onError == null || t.onError(d);
|
|
2347
2347
|
}
|
|
@@ -2349,21 +2349,21 @@ class Vs extends lt {
|
|
|
2349
2349
|
await this.run(i, t);
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
|
-
class
|
|
2352
|
+
class fo extends Ce {
|
|
2353
2353
|
constructor(e) {
|
|
2354
|
-
super("No handler found for state: " + (typeof e.name == "string" ? `"${e.name}"` : `(${typeof e.name})`), "handlerNotFoundError"), this.state = void 0, this.state = e, Object.setPrototypeOf(this,
|
|
2354
|
+
super("No handler found for state: " + (typeof e.name == "string" ? `"${e.name}"` : `(${typeof e.name})`), "handlerNotFoundError"), this.state = void 0, this.state = e, Object.setPrototypeOf(this, fo.prototype);
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
|
-
class
|
|
2357
|
+
class Ws extends Error {
|
|
2358
2358
|
constructor(e) {
|
|
2359
2359
|
super("Invalid state: " + (typeof e.name == "string" ? `"${e.name}"` : `(${typeof e.name})`)), this.state = void 0, this.state = e;
|
|
2360
2360
|
}
|
|
2361
2361
|
}
|
|
2362
|
-
class
|
|
2362
|
+
class Ei extends An {
|
|
2363
2363
|
constructor(e, t) {
|
|
2364
2364
|
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;
|
|
2365
2365
|
const o = { timeout: 13e3, cookieName: "hanko", localStorageKey: "hanko", sessionCheckInterval: 3e4, sessionCheckChannelName: "hanko-session-check", sessionTokenLocation: "cookie" };
|
|
2366
|
-
(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
|
|
2366
|
+
(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 Si(e, o), this.email = new Ci(e, o), this.thirdParty = new Ai(e, o), this.enterprise = new xi(e, o), this.token = new Oi(e, o), this.sessionClient = new po(e, o), this.session = new $s(e, o), this.relay = new Ms(e, o), this.flow = new Rs(e, o);
|
|
2367
2367
|
}
|
|
2368
2368
|
setLang(e) {
|
|
2369
2369
|
this.flow.client.lang = e;
|
|
@@ -2383,70 +2383,70 @@ class mt {
|
|
|
2383
2383
|
return !(!window.PublicKeyCredential || !window.PublicKeyCredential.isConditionalMediationAvailable) && window.PublicKeyCredential.isConditionalMediationAvailable();
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
|
-
var
|
|
2386
|
+
var zs = Y(292), Xe = Y.n(zs), qs = Y(360), et = Y.n(qs), Fs = Y(884), tt = Y.n(Fs), Ks = Y(88), nt = Y.n(Ks), sn = Y(914), kt = {};
|
|
2387
2387
|
kt.setAttributes = tt(), kt.insert = (n) => {
|
|
2388
2388
|
window._hankoStyle = n;
|
|
2389
|
-
}, kt.domAPI = et(), kt.insertStyleElement = nt(), Xe()(
|
|
2390
|
-
const Rt =
|
|
2389
|
+
}, kt.domAPI = et(), kt.insertStyleElement = nt(), Xe()(sn.A, kt);
|
|
2390
|
+
const Rt = sn.A && sn.A.locals ? sn.A.locals : void 0, Bs = function(n) {
|
|
2391
2391
|
function e(t) {
|
|
2392
|
-
var o =
|
|
2392
|
+
var o = ui({}, t);
|
|
2393
2393
|
return delete o.ref, n(o, t.ref || null);
|
|
2394
2394
|
}
|
|
2395
|
-
return e.$$typeof =
|
|
2395
|
+
return e.$$typeof = us, e.render = e, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", e;
|
|
2396
2396
|
}((n, e) => {
|
|
2397
2397
|
const { lang: t, hanko: o, setHanko: i } = (0, _.useContext)(ue), { setLang: s } = (0, _.useContext)(Z.TranslateContext);
|
|
2398
2398
|
return (0, _.useEffect)(() => {
|
|
2399
2399
|
s(t.replace(/[-]/, "")), i((a) => (a.setLang(t), a));
|
|
2400
2400
|
}, [o, t, i, s]), r("section", Object.assign({ part: "container", className: Rt.container, ref: e }, { children: n.children }));
|
|
2401
2401
|
});
|
|
2402
|
-
var
|
|
2402
|
+
var rn = Y(697), wt = {};
|
|
2403
2403
|
wt.setAttributes = tt(), wt.insert = (n) => {
|
|
2404
2404
|
window._hankoStyle = n;
|
|
2405
|
-
}, wt.domAPI = et(), wt.insertStyleElement = nt(), Xe()(
|
|
2406
|
-
const $ =
|
|
2407
|
-
var
|
|
2408
|
-
const tr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), nr = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => r("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: r("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" }) })), or = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), ir = ({ size: n, secondary: e, disabled: t }) => r("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: [r("path", { d: "M0 0h24v24H0z", fill: "none" }), r("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" })] })), sr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), rr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), ar = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [r("defs", Object.assign({ id: "defs13" }, { children: r("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: r("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), r("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: r("g", Object.assign({ id: "g19" }, { children: r("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [r("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: r("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" }) })), r("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: r("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" }) }))] })) })) }))] })), lr = ({ size: n, secondary: e, disabled: t }) => r("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: [r("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" }), " "] })), cr = ({ size: n, disabled: e }) => r("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: [r("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" }), r("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" }), r("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" }), r("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" }), r("path", { d: "M1 1h22v22H1z", fill: "none" })] })), dr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), ur = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), hr = ({ size: n, disabled: e }) => r("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: [r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.blue), x: "1", y: "1", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.green), x: "1", y: "11", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.yellow), x: "11", y: "1", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.red), x: "11", y: "11", width: "9", height: "9" })] })), pr = ({ size: n, secondary: e, disabled: t }) => r("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: r("g", Object.assign({ id: "icon-passkey-all" }, { children: [r("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), r("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" }), r("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" })] })) })), fr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), mr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), gr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), vr = ({ size: n, disabled: e }) => r("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: [r("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" }), r("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" })] })), Wt = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => r(Vn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), vo = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: s, maxWidth: a }) => r(A.Fragment, { children: r("div", e ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, a && $.maxWidth) }, { children: r(Wt, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, a && $.maxWidth) }, { children: r(Wt, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: s ? $.loadingSpinnerWrapperIcon : $.loadingSpinnerWrapper }, { children: n })) }), _r = () => {
|
|
2405
|
+
}, wt.domAPI = et(), wt.insertStyleElement = nt(), Xe()(rn.A, wt);
|
|
2406
|
+
const $ = rn.A && rn.A.locals ? rn.A.locals : void 0;
|
|
2407
|
+
var Vs = Y(633), Q = Y.n(Vs);
|
|
2408
|
+
const Zs = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), Js = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => r("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: r("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" }) })), Qs = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), Gs = ({ size: n, secondary: e, disabled: t }) => r("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: [r("path", { d: "M0 0h24v24H0z", fill: "none" }), r("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" })] })), Ys = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), Xs = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), er = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [r("defs", Object.assign({ id: "defs13" }, { children: r("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: r("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), r("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: r("g", Object.assign({ id: "g19" }, { children: r("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [r("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: r("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" }) })), r("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: r("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" }) }))] })) })) }))] })), tr = ({ size: n, secondary: e, disabled: t }) => r("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: [r("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" }), " "] })), nr = ({ size: n, disabled: e }) => r("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: [r("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" }), r("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" }), r("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" }), r("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" }), r("path", { d: "M1 1h22v22H1z", fill: "none" })] })), or = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), ir = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), sr = ({ size: n, disabled: e }) => r("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: [r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.blue), x: "1", y: "1", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.green), x: "1", y: "11", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.yellow), x: "11", y: "1", width: "9", height: "9" }), r("rect", { className: Q()($.microsoftIcon, e ? $.disabled : $.red), x: "11", y: "11", width: "9", height: "9" })] })), rr = ({ size: n, secondary: e, disabled: t }) => r("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: r("g", Object.assign({ id: "icon-passkey-all" }, { children: [r("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), r("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" }), r("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" })] })) })), ar = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), lr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), cr = ({ size: n, secondary: e, disabled: t }) => r("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: r("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" }) })), dr = ({ size: n, disabled: e }) => r("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: [r("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" }), r("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" })] })), Wt = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => r(Bn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), mo = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: s, maxWidth: a }) => r(A.Fragment, { children: r("div", e ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, a && $.maxWidth) }, { children: r(Wt, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Q()($.loadingSpinnerWrapper, $.centerContent, a && $.maxWidth) }, { children: r(Wt, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: s ? $.loadingSpinnerWrapperIcon : $.loadingSpinnerWrapper }, { children: n })) }), ur = () => {
|
|
2409
2409
|
const { setLoadingAction: n } = (0, _.useContext)(ue);
|
|
2410
2410
|
return (0, _.useEffect)(() => {
|
|
2411
2411
|
n(null);
|
|
2412
|
-
}, []), r(
|
|
2412
|
+
}, []), r(mo, { isLoading: !0 });
|
|
2413
2413
|
}, Ne = (n) => {
|
|
2414
2414
|
const [e, t] = (0, _.useState)(n);
|
|
2415
2415
|
return (0, _.useEffect)(() => {
|
|
2416
2416
|
n && t(n);
|
|
2417
2417
|
}, [n]), { flowState: e };
|
|
2418
2418
|
};
|
|
2419
|
-
var
|
|
2420
|
-
|
|
2419
|
+
var an = Y(577), xt = {};
|
|
2420
|
+
xt.setAttributes = tt(), xt.insert = (n) => {
|
|
2421
2421
|
window._hankoStyle = n;
|
|
2422
|
-
},
|
|
2423
|
-
const Ae =
|
|
2422
|
+
}, xt.domAPI = et(), xt.insertStyleElement = nt(), Xe()(an.A, xt);
|
|
2423
|
+
const Ae = an.A && an.A.locals ? an.A.locals : void 0, hr = () => {
|
|
2424
2424
|
const { t: n } = (0, _.useContext)(Z.TranslateContext);
|
|
2425
2425
|
return r("span", Object.assign({ className: Q()(Ae.lastUsed) }, { children: n("labels.lastUsed") }));
|
|
2426
2426
|
}, te = (n) => {
|
|
2427
|
-
var { uiAction: e, title: t, children: o, secondary: i, dangerous: s, autofocus: a, showLastUsed: c, onClick: d, icon: l } = n, u = function(
|
|
2427
|
+
var { uiAction: e, title: t, children: o, secondary: i, dangerous: s, autofocus: a, showLastUsed: c, onClick: d, icon: l } = n, u = function(x, P) {
|
|
2428
2428
|
var D = {};
|
|
2429
|
-
for (var N in
|
|
2430
|
-
if (
|
|
2429
|
+
for (var N in x) Object.prototype.hasOwnProperty.call(x, N) && P.indexOf(N) < 0 && (D[N] = x[N]);
|
|
2430
|
+
if (x != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2431
2431
|
var U = 0;
|
|
2432
|
-
for (N = Object.getOwnPropertySymbols(
|
|
2432
|
+
for (N = Object.getOwnPropertySymbols(x); U < N.length; U++) P.indexOf(N[U]) < 0 && Object.prototype.propertyIsEnumerable.call(x, N[U]) && (D[N[U]] = x[N[U]]);
|
|
2433
2433
|
}
|
|
2434
2434
|
return D;
|
|
2435
2435
|
}(n, ["uiAction", "title", "children", "secondary", "dangerous", "autofocus", "showLastUsed", "onClick", "icon"]);
|
|
2436
2436
|
const h = (0, _.useRef)(null), { uiState: g, isDisabled: f } = (0, _.useContext)(ue);
|
|
2437
2437
|
(0, _.useEffect)(() => {
|
|
2438
|
-
const { current:
|
|
2439
|
-
|
|
2438
|
+
const { current: x } = h;
|
|
2439
|
+
x && a && x.focus();
|
|
2440
2440
|
}, [a]);
|
|
2441
|
-
const
|
|
2442
|
-
return r("button", Object.assign({ part: s ? "button dangerous-button" : i ? "button secondary-button" : "button primary-button", title: t, ref: h, type: "submit", disabled: C, onClick: d, className: Q()(Ae.button, s ? Ae.dangerous : i ? Ae.secondary : Ae.primary) }, { children: r(
|
|
2441
|
+
const S = (0, _.useMemo)(() => e && g.loadingAction === e || u.isLoading, [u, e, g]), O = (0, _.useMemo)(() => e && g.succeededAction === e || u.isSuccess, [u, e, g]), C = (0, _.useMemo)(() => f || u.disabled, [u, f]);
|
|
2442
|
+
return r("button", Object.assign({ part: s ? "button dangerous-button" : i ? "button secondary-button" : "button primary-button", title: t, ref: h, type: "submit", disabled: C, onClick: d, className: Q()(Ae.button, s ? Ae.dangerous : i ? Ae.secondary : Ae.primary) }, { children: r(mo, Object.assign({ isLoading: S, isSuccess: O, secondary: !0, hasIcon: !!l, maxWidth: !0 }, { children: [l ? r(Wt, { name: l, secondary: i, disabled: C }) : null, r("div", Object.assign({ className: Ae.caption }, { children: [r("span", { children: o }), c ? r(hr, {}) : null] }))] })) }));
|
|
2443
2443
|
}, Be = (n) => {
|
|
2444
|
-
var e, t, o, i, s, { label: a } = n, c = function(f,
|
|
2444
|
+
var e, t, o, i, s, { label: a } = n, c = function(f, S) {
|
|
2445
2445
|
var O = {};
|
|
2446
|
-
for (var C in f) Object.prototype.hasOwnProperty.call(f, C) &&
|
|
2446
|
+
for (var C in f) Object.prototype.hasOwnProperty.call(f, C) && S.indexOf(C) < 0 && (O[C] = f[C]);
|
|
2447
2447
|
if (f != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2448
|
-
var
|
|
2449
|
-
for (C = Object.getOwnPropertySymbols(f);
|
|
2448
|
+
var x = 0;
|
|
2449
|
+
for (C = Object.getOwnPropertySymbols(f); x < C.length; x++) S.indexOf(C[x]) < 0 && Object.prototype.propertyIsEnumerable.call(f, C[x]) && (O[C[x]] = f[C[x]]);
|
|
2450
2450
|
}
|
|
2451
2451
|
return O;
|
|
2452
2452
|
}(n, ["label"]);
|
|
@@ -2461,16 +2461,16 @@ const Ae = ln.A && ln.A.locals ? ln.A.locals : void 0, yr = () => {
|
|
|
2461
2461
|
}, [c.markOptional, c.placeholder, c.flowInput, u]);
|
|
2462
2462
|
return r("div", Object.assign({ className: Ae.inputWrapper }, { children: r("input", Object.assign({ part: "input text-input", required: (e = c.flowInput) === null || e === void 0 ? void 0 : e.required, maxLength: (t = c.flowInput) === null || t === void 0 ? void 0 : t.max_length, minLength: (o = c.flowInput) === null || o === void 0 ? void 0 : o.min_length, hidden: (i = c.flowInput) === null || i === void 0 ? void 0 : i.hidden }, c, { ref: d, "aria-label": g, placeholder: g, className: Q()(Ae.input, !!(!((s = c.flowInput) === null || s === void 0) && s.error) && c.markError && Ae.error), disabled: h })) }));
|
|
2463
2463
|
}, Oe = ({ children: n }) => r("section", Object.assign({ className: Rt.content }, { children: n })), ne = ({ onSubmit: n, children: e, hidden: t, maxWidth: o }) => t ? null : r("form", Object.assign({ onSubmit: n, className: Ae.form }, { children: r("ul", Object.assign({ className: Ae.ul }, { children: (0, A.toChildArray)(e).map((i, s) => r("li", Object.assign({ part: "form-item", className: Q()(Ae.li, o ? Ae.maxWidth : null) }, { children: i }), s)) })) }));
|
|
2464
|
-
var
|
|
2465
|
-
|
|
2464
|
+
var ln = Y(111), St = {};
|
|
2465
|
+
St.setAttributes = tt(), St.insert = (n) => {
|
|
2466
2466
|
window._hankoStyle = n;
|
|
2467
|
-
},
|
|
2468
|
-
const Lt =
|
|
2469
|
-
var
|
|
2467
|
+
}, St.domAPI = et(), St.insertStyleElement = nt(), Xe()(ln.A, St);
|
|
2468
|
+
const Lt = ln.A && ln.A.locals ? ln.A.locals : void 0, go = ({ children: n, hidden: e }) => e ? null : r("section", Object.assign({ part: "divider", className: Lt.divider }, { children: [r("div", { part: "divider-line", className: Lt.line }), n ? r("div", Object.assign({ part: "divider-text", class: Lt.text }, { children: n })) : null, r("div", { part: "divider-line", className: Lt.line })] }));
|
|
2469
|
+
var cn = Y(905), Ct = {};
|
|
2470
2470
|
Ct.setAttributes = tt(), Ct.insert = (n) => {
|
|
2471
2471
|
window._hankoStyle = n;
|
|
2472
|
-
}, Ct.domAPI = et(), Ct.insertStyleElement = nt(), Xe()(
|
|
2473
|
-
const
|
|
2472
|
+
}, Ct.domAPI = et(), Ct.insertStyleElement = nt(), Xe()(cn.A, Ct);
|
|
2473
|
+
const Ii = cn.A && cn.A.locals ? cn.A.locals : void 0, Pe = ({ state: n, error: e, flowError: t }) => {
|
|
2474
2474
|
var o, i;
|
|
2475
2475
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { uiState: a, setUIState: c } = (0, _.useContext)(ue);
|
|
2476
2476
|
return (0, _.useEffect)(() => {
|
|
@@ -2482,18 +2482,18 @@ const $i = dn.A && dn.A.locals ? dn.A.locals : void 0, Pe = ({ state: n, error:
|
|
|
2482
2482
|
g || c(Object.assign(Object.assign({}, a), { error: n.error }));
|
|
2483
2483
|
}
|
|
2484
2484
|
else n != null && n.error && c(Object.assign(Object.assign({}, a), { error: n == null ? void 0 : n.error }));
|
|
2485
|
-
}, [n]), r("section", Object.assign({ part: "error", className:
|
|
2485
|
+
}, [n]), r("section", Object.assign({ part: "error", className: Ii.errorBox, hidden: !(!((o = a.error) === null || o === void 0) && o.code) && !(t != null && t.code) && !e }, { children: [r("span", { children: r(Wt, { name: "exclamation", size: 15 }) }), r("span", Object.assign({ id: "errorMessage", part: "error-text" }, { children: s(e ? `errors.${e.code}` : `flowErrors.${((i = a.error) === null || i === void 0 ? void 0 : i.code) || (t == null ? void 0 : t.code)}`) }))] }));
|
|
2486
2486
|
};
|
|
2487
|
-
var
|
|
2487
|
+
var dn = Y(619), At = {};
|
|
2488
2488
|
At.setAttributes = tt(), At.insert = (n) => {
|
|
2489
2489
|
window._hankoStyle = n;
|
|
2490
|
-
}, At.domAPI = et(), At.insertStyleElement = nt(), Xe()(
|
|
2491
|
-
const
|
|
2492
|
-
var
|
|
2490
|
+
}, At.domAPI = et(), At.insertStyleElement = nt(), Xe()(dn.A, At);
|
|
2491
|
+
const yn = dn.A && dn.A.locals ? dn.A.locals : void 0, de = ({ children: n }) => r("h1", Object.assign({ part: "headline1", className: Q()(yn.headline, yn.grade1) }, { children: n }));
|
|
2492
|
+
var un = Y(995), Ot = {};
|
|
2493
2493
|
Ot.setAttributes = tt(), Ot.insert = (n) => {
|
|
2494
2494
|
window._hankoStyle = n;
|
|
2495
|
-
}, Ot.domAPI = et(), Ot.insertStyleElement = nt(), Xe()(
|
|
2496
|
-
const Zt =
|
|
2495
|
+
}, Ot.domAPI = et(), Ot.insertStyleElement = nt(), Xe()(un.A, Ot);
|
|
2496
|
+
const Zt = un.A && un.A.locals ? un.A.locals : void 0, Zn = (n) => {
|
|
2497
2497
|
var { loadingSpinnerPosition: e, dangerous: t = !1, onClick: o, uiAction: i } = n, s = function(P, D) {
|
|
2498
2498
|
var N = {};
|
|
2499
2499
|
for (var U in P) Object.prototype.hasOwnProperty.call(P, U) && D.indexOf(U) < 0 && (N[U] = P[U]);
|
|
@@ -2509,17 +2509,17 @@ const Zt = hn.A && hn.A.locals ? hn.A.locals : void 0, Jn = (n) => {
|
|
|
2509
2509
|
P.preventDefault(), u(!0);
|
|
2510
2510
|
}, f = (P) => {
|
|
2511
2511
|
P.preventDefault(), u(!1);
|
|
2512
|
-
},
|
|
2512
|
+
}, S = (0, _.useMemo)(() => i && c.loadingAction === i || s.isLoading, [s, i, c]), O = (0, _.useMemo)(() => i && c.succeededAction === i || s.isSuccess, [s, i, c]), C = (0, _.useCallback)((P) => {
|
|
2513
2513
|
P.preventDefault(), u(!1), o(P);
|
|
2514
|
-
}, [o]),
|
|
2514
|
+
}, [o]), x = (0, _.useCallback)(() => r(A.Fragment, { children: [l ? r(A.Fragment, { children: [r(Zn, Object.assign({ onClick: C }, { children: a("labels.yes") })), " / ", r(Zn, Object.assign({ onClick: f }, { children: a("labels.no") })), " "] }) : null, r("button", Object.assign({}, s, { onClick: t ? g : o, disabled: l || s.disabled || d, part: "link", className: Q()(Zt.link, t ? Zt.danger : null) }, { children: s.children }))] }), [l, t, o, C, s, a, d]);
|
|
2515
2515
|
return r(A.Fragment, { children: r("span", Object.assign({ className: Q()(Zt.linkWrapper, e === "right" ? Zt.reverse : null), hidden: s.hidden, onMouseEnter: () => {
|
|
2516
2516
|
h && window.clearTimeout(h);
|
|
2517
2517
|
}, onMouseLeave: () => {
|
|
2518
2518
|
h = window.setTimeout(() => {
|
|
2519
2519
|
u(!1);
|
|
2520
2520
|
}, 1e3);
|
|
2521
|
-
} }, { children: r(A.Fragment, e && (
|
|
2522
|
-
}, ee =
|
|
2521
|
+
} }, { children: r(A.Fragment, e && (S || O) ? { children: [r(mo, { isLoading: S, isSuccess: O, secondary: s.secondary, fadeOut: !0 }), x()] } : { children: x() }) })) });
|
|
2522
|
+
}, ee = Zn, Ue = ({ children: n, hidden: e = !1 }) => e ? null : r("section", Object.assign({ className: Rt.footer }, { children: n })), vo = (n) => {
|
|
2523
2523
|
var { label: e } = n, t = function(o, i) {
|
|
2524
2524
|
var s = {};
|
|
2525
2525
|
for (var a in o) Object.prototype.hasOwnProperty.call(o, a) && i.indexOf(a) < 0 && (s[a] = o[a]);
|
|
@@ -2530,7 +2530,7 @@ const Zt = hn.A && hn.A.locals ? hn.A.locals : void 0, Jn = (n) => {
|
|
|
2530
2530
|
return s;
|
|
2531
2531
|
}(n, ["label"]);
|
|
2532
2532
|
return r("div", Object.assign({ className: Ae.inputWrapper }, { children: r("label", Object.assign({ className: Ae.checkboxWrapper }, { children: [r("input", Object.assign({ part: "input checkbox-input", type: "checkbox", "aria-label": e, className: Ae.checkbox }, t)), r("span", Object.assign({ className: Q()(Ae.label, t.disabled ? Ae.disabled : null) }, { children: e }))] })) }));
|
|
2533
|
-
},
|
|
2533
|
+
}, On = () => r("section", { className: Lt.spacer });
|
|
2534
2534
|
var Pt = function(n, e, t, o) {
|
|
2535
2535
|
return new (t || (t = Promise))(function(i, s) {
|
|
2536
2536
|
function a(l) {
|
|
@@ -2556,12 +2556,12 @@ var Pt = function(n, e, t, o) {
|
|
|
2556
2556
|
d((o = o.apply(n, [])).next());
|
|
2557
2557
|
});
|
|
2558
2558
|
};
|
|
2559
|
-
const
|
|
2559
|
+
const pr = (n) => {
|
|
2560
2560
|
var e, t, o, i, s, a, c, d, l;
|
|
2561
|
-
const { t: u } = (0, _.useContext)(Z.TranslateContext), { init: h, hanko: g, initialComponentName: f, setLoadingAction:
|
|
2561
|
+
const { t: u } = (0, _.useContext)(Z.TranslateContext), { init: h, hanko: g, initialComponentName: f, setLoadingAction: S, uiState: O, setUIState: C, stateHandler: x, hidePasskeyButtonOnLogin: P, lastLogin: D } = (0, _.useContext)(ue), [N, U] = (0, _.useState)(null), [ie, be] = (0, _.useState)(O.username || O.email), { flowState: se } = Ne(n.state), we = mt.supported(), [M, z] = (0, _.useState)(void 0), [ve, $e] = (0, _.useState)(null), [Ee, Le] = (0, _.useState)(!1), re = (k) => {
|
|
2562
2562
|
if (k.preventDefault(), k.target instanceof HTMLInputElement) {
|
|
2563
2563
|
const { value: p } = k.target;
|
|
2564
|
-
|
|
2564
|
+
be(p), ae(p);
|
|
2565
2565
|
}
|
|
2566
2566
|
}, ae = (k) => {
|
|
2567
2567
|
const p = () => C((L) => Object.assign(Object.assign({}, L), { email: k, username: null })), y = () => C((L) => Object.assign(Object.assign({}, L), { email: null, username: k }));
|
|
@@ -2591,24 +2591,24 @@ const br = (n) => {
|
|
|
2591
2591
|
const y = { name: p, code: p, message: k.get("error_description") };
|
|
2592
2592
|
z(y), k.delete("error"), k.delete("error_description"), history.replaceState(null, null, window.location.pathname + (k.size < 1 ? "" : `?${k.toString()}`));
|
|
2593
2593
|
}, []), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: u("headlines.signIn") }), r(Pe, { state: se, error: M }), Ie ? r(A.Fragment, { children: [r(ne, Object.assign({ onSubmit: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2594
|
-
k.preventDefault(),
|
|
2594
|
+
k.preventDefault(), S("email-submit");
|
|
2595
2595
|
const p = yield se.actions.continue_with_login_identifier({ [N]: ie }).run();
|
|
2596
|
-
ae(ie),
|
|
2597
|
-
}), maxWidth: !0 }, { children: [Ie.email ? r(Be, { type: "email", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.email, onInput: re, value: ie, placeholder: u("labels.email"), pattern: "^[^@]+@[^@]+\\.[^@]+$" }) : Ie.username ? r(Be, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.username, onInput: re, value: ie, placeholder: u("labels.username") }) : r(Be, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.identifier, onInput: re, value: ie, placeholder: u("labels.emailOrUsername") }), r(te, Object.assign({ uiAction: "email-submit" }, { children: u("labels.continue") }))] })), r(
|
|
2598
|
-
p.preventDefault(),
|
|
2596
|
+
ae(ie), S(null), yield g.flow.run(p, x);
|
|
2597
|
+
}), maxWidth: !0 }, { children: [Ie.email ? r(Be, { type: "email", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.email, onInput: re, value: ie, placeholder: u("labels.email"), pattern: "^[^@]+@[^@]+\\.[^@]+$" }) : Ie.username ? r(Be, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.username, onInput: re, value: ie, placeholder: u("labels.username") }) : r(Be, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: Ie.identifier, onInput: re, value: ie, placeholder: u("labels.emailOrUsername") }), r(te, Object.assign({ uiAction: "email-submit" }, { children: u("labels.continue") }))] })), r(go, Object.assign({ hidden: !he }, { children: u("labels.or") }))] }) : null, !((i = (o = se.actions).webauthn_generate_request_options) === null || i === void 0) && i.call(o, null) && !P ? r(ne, Object.assign({ onSubmit: (k) => ((p) => Pt(void 0, void 0, void 0, function* () {
|
|
2598
|
+
p.preventDefault(), S("passkey-submit");
|
|
2599
2599
|
const y = yield se.actions.webauthn_generate_request_options(null).run();
|
|
2600
|
-
yield g.flow.run(y,
|
|
2600
|
+
yield g.flow.run(y, x);
|
|
2601
2601
|
}))(k) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", secondary: !0, title: we ? null : u("labels.webauthnUnsupported"), disabled: !we, icon: "passkey" }, { children: u("labels.signInPasskey") })) })) : null, !((a = (s = se.actions).thirdparty_oauth) === null || a === void 0) && a.call(s, null) ? (c = se.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || c === void 0 ? void 0 : c.map((k) => r(ne, Object.assign({ onSubmit: (p) => ((y, L) => Pt(void 0, void 0, void 0, function* () {
|
|
2602
2602
|
y.preventDefault(), $e(L);
|
|
2603
2603
|
const K = yield se.actions.thirdparty_oauth({ provider: L, redirect_to: window.location.toString() }).run();
|
|
2604
|
-
K.error && $e(null), yield g.flow.run(K,
|
|
2605
|
-
}))(p, k.value) }, { children: r(te, Object.assign({ isLoading: k.value ==
|
|
2604
|
+
K.error && $e(null), yield g.flow.run(K, x);
|
|
2605
|
+
}))(p, k.value) }, { children: r(te, Object.assign({ isLoading: k.value == ve, secondary: !0, icon: k.value.startsWith("custom_") ? "customProvider" : k.value, showLastUsed: (D == null ? void 0 : D.login_method) == "third_party" && (D == null ? void 0 : D.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)) && r(A.Fragment, { children: [r(On, {}), r(vo, { required: !1, type: "checkbox", label: u("labels.staySignedIn"), checked: Ee, onChange: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2606
2606
|
const p = yield se.actions.remember_me({ remember_me: !Ee }).run();
|
|
2607
|
-
Le((y) => !y), yield g.flow.run(p,
|
|
2607
|
+
Le((y) => !y), yield g.flow.run(p, x);
|
|
2608
2608
|
}) })] })] }), r(Ue, Object.assign({ hidden: f !== "auth" }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "switch-flow", onClick: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2609
2609
|
k.preventDefault(), h("registration");
|
|
2610
2610
|
}), loadingSpinnerPosition: "left" }, { children: u("labels.dontHaveAnAccount") }))] }))] });
|
|
2611
|
-
},
|
|
2611
|
+
}, fr = (n) => {
|
|
2612
2612
|
var { index: e, focus: t, digit: o = "" } = n, i = function(l, u) {
|
|
2613
2613
|
var h = {};
|
|
2614
2614
|
for (var g in l) Object.prototype.hasOwnProperty.call(l, g) && u.indexOf(g) < 0 && (h[g] = l[g]);
|
|
@@ -2627,19 +2627,19 @@ const br = (n) => {
|
|
|
2627
2627
|
}, [e, i.disabled]), (0, _.useMemo)(() => {
|
|
2628
2628
|
t && c();
|
|
2629
2629
|
}, [t]), r("div", Object.assign({ className: Ae.passcodeDigitWrapper }, { children: r("input", Object.assign({}, i, { part: "input passcode-input", "aria-label": `${i.name}-digit-${e + 1}`, name: i.name + e.toString(10), type: "text", inputMode: "numeric", maxLength: 1, ref: s, value: o.charAt(0), required: !0, className: Ae.input, disabled: d })) }));
|
|
2630
|
-
},
|
|
2630
|
+
}, _o = ({ passcodeDigits: n = [], numberOfInputs: e = 6, onInput: t, disabled: o = !1 }) => {
|
|
2631
2631
|
const [i, s] = (0, _.useState)(0), a = () => n.slice(), c = () => {
|
|
2632
2632
|
i < e - 1 && s(i + 1);
|
|
2633
2633
|
}, d = () => {
|
|
2634
2634
|
i > 0 && s(i - 1);
|
|
2635
2635
|
}, l = (f) => {
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2636
|
+
const S = a();
|
|
2637
|
+
S[i] = f.charAt(0), t(S);
|
|
2638
2638
|
}, u = (f) => {
|
|
2639
2639
|
if (f.preventDefault(), o) return;
|
|
2640
|
-
const
|
|
2640
|
+
const S = f.clipboardData.getData("text/plain").slice(0, e - i).split(""), O = a();
|
|
2641
2641
|
let C = i;
|
|
2642
|
-
for (let
|
|
2642
|
+
for (let x = 0; x < e; ++x) x >= i && S.length > 0 && (O[x] = S.shift(), C++);
|
|
2643
2643
|
s(C), t(O);
|
|
2644
2644
|
}, h = (f) => {
|
|
2645
2645
|
f.key === "Backspace" ? (f.preventDefault(), l(""), d()) : f.key === "Delete" ? (f.preventDefault(), l("")) : f.key === "ArrowLeft" ? (f.preventDefault(), d()) : f.key === "ArrowRight" ? (f.preventDefault(), c()) : f.key !== " " && f.key !== "Spacebar" && f.key !== "Space" || f.preventDefault();
|
|
@@ -2648,15 +2648,15 @@ const br = (n) => {
|
|
|
2648
2648
|
};
|
|
2649
2649
|
return (0, _.useEffect)(() => {
|
|
2650
2650
|
n.length === 0 && s(0);
|
|
2651
|
-
}, [n]), r("div", Object.assign({ className: Ae.passcodeInputWrapper }, { children: Array.from(Array(e)).map((f,
|
|
2651
|
+
}, [n]), r("div", Object.assign({ className: Ae.passcodeInputWrapper }, { children: Array.from(Array(e)).map((f, S) => r(fr, { name: "passcode", index: S, focus: i === S, digit: n[S], onKeyDown: h, onInput: g, onPaste: u, onFocus: () => ((O) => {
|
|
2652
2652
|
s(O);
|
|
2653
|
-
})(
|
|
2653
|
+
})(S), disabled: o }, S)) }));
|
|
2654
2654
|
};
|
|
2655
|
-
var
|
|
2655
|
+
var hn = Y(489), Et = {};
|
|
2656
2656
|
Et.setAttributes = tt(), Et.insert = (n) => {
|
|
2657
2657
|
window._hankoStyle = n;
|
|
2658
|
-
}, Et.domAPI = et(), Et.insertStyleElement = nt(), Xe()(
|
|
2659
|
-
const
|
|
2658
|
+
}, Et.domAPI = et(), Et.insertStyleElement = nt(), Xe()(hn.A, Et);
|
|
2659
|
+
const mr = hn.A && hn.A.locals ? hn.A.locals : void 0, q = ({ children: n, hidden: e }) => e ? null : r("p", Object.assign({ part: "paragraph", className: mr.paragraph }, { children: n }));
|
|
2660
2660
|
var Jt = function(n, e, t, o) {
|
|
2661
2661
|
return new (t || (t = Promise))(function(i, s) {
|
|
2662
2662
|
function a(l) {
|
|
@@ -2682,9 +2682,9 @@ var Jt = function(n, e, t, o) {
|
|
|
2682
2682
|
d((o = o.apply(n, [])).next());
|
|
2683
2683
|
});
|
|
2684
2684
|
};
|
|
2685
|
-
const
|
|
2685
|
+
const gr = (n) => {
|
|
2686
2686
|
var e, t;
|
|
2687
|
-
const { t: o } = (0, _.useContext)(Z.TranslateContext), { flowState: i } = Ne(n.state), { hanko: s, uiState: a, setUIState: c, setLoadingAction: d, setSucceededAction: l, stateHandler: u } = (0, _.useContext)(ue), [h, g] = (0, _.useState)(), [f,
|
|
2687
|
+
const { t: o } = (0, _.useContext)(Z.TranslateContext), { flowState: i } = Ne(n.state), { hanko: s, uiState: a, setUIState: c, setLoadingAction: d, setSucceededAction: l, stateHandler: u } = (0, _.useContext)(ue), [h, g] = (0, _.useState)(), [f, S] = (0, _.useState)(i.payload.resend_after), [O, C] = (0, _.useState)([]), x = (0, _.useMemo)(() => {
|
|
2688
2688
|
var D;
|
|
2689
2689
|
return ((D = i.error) === null || D === void 0 ? void 0 : D.code) === "passcode_max_attempts_reached";
|
|
2690
2690
|
}, [i]), P = (0, _.useCallback)((D) => Jt(void 0, void 0, void 0, function* () {
|
|
@@ -2701,7 +2701,7 @@ const Sr = (n) => {
|
|
|
2701
2701
|
return () => clearInterval(D);
|
|
2702
2702
|
}, [h]), (0, _.useEffect)(() => {
|
|
2703
2703
|
const D = f > 0 && setInterval(() => {
|
|
2704
|
-
|
|
2704
|
+
S(f - 1);
|
|
2705
2705
|
}, 1e3);
|
|
2706
2706
|
return () => clearInterval(D);
|
|
2707
2707
|
}, [f]), (0, _.useEffect)(() => {
|
|
@@ -2709,12 +2709,12 @@ const Sr = (n) => {
|
|
|
2709
2709
|
f == 0 && ((D = i.error) === null || D === void 0 ? void 0 : D.code) == "rate_limit_exceeded" && c((N) => Object.assign(Object.assign({}, N), { error: null }));
|
|
2710
2710
|
}, [f]), (0, _.useEffect)(() => {
|
|
2711
2711
|
var D;
|
|
2712
|
-
((D = i.error) === null || D === void 0 ? void 0 : D.code) === "passcode_invalid" && C([]), i.payload.resend_after >= 0 &&
|
|
2712
|
+
((D = i.error) === null || D === void 0 ? void 0 : D.code) === "passcode_invalid" && C([]), i.payload.resend_after >= 0 && S(i.payload.resend_after);
|
|
2713
2713
|
}, [i]), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: o("headlines.loginPasscode") }), r(Pe, { state: i }), r(q, { children: a.email ? o("texts.enterPasscode", { emailAddress: a.email }) : o("texts.enterPasscodeNoEmail") }), r(ne, Object.assign({ onSubmit: (D) => Jt(void 0, void 0, void 0, function* () {
|
|
2714
2714
|
return D.preventDefault(), P(O.join(""));
|
|
2715
|
-
}) }, { children: [r(
|
|
2715
|
+
}) }, { children: [r(_o, { onInput: (D) => {
|
|
2716
2716
|
if (C(D), D.filter((N) => N !== "").length === 6) return P(D.join(""));
|
|
2717
|
-
}, passcodeDigits: O, numberOfInputs: 6, disabled: h <= 0 ||
|
|
2717
|
+
}, passcodeDigits: O, numberOfInputs: 6, disabled: h <= 0 || x }), r(te, Object.assign({ disabled: h <= 0 || x, uiAction: "passcode-submit" }, { children: o("labels.continue") }))] }))] }), r(Ue, { children: [r(ee, Object.assign({ hidden: !(!((t = (e = i.actions).back) === null || t === void 0) && t.call(e, null)), onClick: (D) => Jt(void 0, void 0, void 0, function* () {
|
|
2718
2718
|
D.preventDefault(), d("back");
|
|
2719
2719
|
const N = yield i.actions.back(null).run();
|
|
2720
2720
|
d(null), yield s.flow.run(N, u);
|
|
@@ -2724,7 +2724,7 @@ const Sr = (n) => {
|
|
|
2724
2724
|
d(null), yield s.flow.run(N, u);
|
|
2725
2725
|
}), loadingSpinnerPosition: "left" }, { children: f > 0 ? o("labels.passcodeResendAfter", { passcodeResendAfter: f }) : o("labels.sendNewPasscode") }))] })] });
|
|
2726
2726
|
};
|
|
2727
|
-
var
|
|
2727
|
+
var Hn = function(n, e, t, o) {
|
|
2728
2728
|
return new (t || (t = Promise))(function(i, s) {
|
|
2729
2729
|
function a(l) {
|
|
2730
2730
|
try {
|
|
@@ -2749,19 +2749,19 @@ var Rn = function(n, e, t, o) {
|
|
|
2749
2749
|
d((o = o.apply(n, [])).next());
|
|
2750
2750
|
});
|
|
2751
2751
|
};
|
|
2752
|
-
const
|
|
2752
|
+
const vr = (n) => {
|
|
2753
2753
|
var e, t, o, i, s, a, c, d;
|
|
2754
2754
|
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, setLoadingAction: h, stateHandler: g } = (0, _.useContext)(ue), { flowState: f } = Ne(n.state);
|
|
2755
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: l("headlines.registerAuthenticator") }), r(Pe, { state: f }), r(q, { children: l("texts.setupPasskey") }), r(ne, Object.assign({ onSubmit: (
|
|
2756
|
-
|
|
2755
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: l("headlines.registerAuthenticator") }), r(Pe, { state: f }), r(q, { children: l("texts.setupPasskey") }), r(ne, Object.assign({ onSubmit: (S) => Hn(void 0, void 0, void 0, function* () {
|
|
2756
|
+
S.preventDefault(), h("passkey-submit");
|
|
2757
2757
|
const O = yield f.actions.webauthn_generate_creation_options(null).run();
|
|
2758
2758
|
yield u.flow.run(O, g);
|
|
2759
|
-
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "passkey" }, { children: l("labels.registerAuthenticator") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = f.actions).skip) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = f.actions).back) === null || i === void 0) && i.call(o, null)) }, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (
|
|
2760
|
-
|
|
2759
|
+
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "passkey" }, { children: l("labels.registerAuthenticator") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = f.actions).skip) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = f.actions).back) === null || i === void 0) && i.call(o, null)) }, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (S) => Hn(void 0, void 0, void 0, function* () {
|
|
2760
|
+
S.preventDefault(), h("back");
|
|
2761
2761
|
const O = yield f.actions.back(null).run();
|
|
2762
2762
|
h(null), yield u.flow.run(O, g);
|
|
2763
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((a = (s = f.actions).back) === null || a === void 0) && a.call(s, null)) }, { children: l("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (
|
|
2764
|
-
|
|
2763
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((a = (s = f.actions).back) === null || a === void 0) && a.call(s, null)) }, { children: l("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (S) => Hn(void 0, void 0, void 0, function* () {
|
|
2764
|
+
S.preventDefault(), h("skip");
|
|
2765
2765
|
const O = yield f.actions.skip(null).run();
|
|
2766
2766
|
h(null), yield u.flow.run(O, g);
|
|
2767
2767
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = f.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] }))] });
|
|
@@ -2791,9 +2791,9 @@ var It = function(n, e, t, o) {
|
|
|
2791
2791
|
d((o = o.apply(n, [])).next());
|
|
2792
2792
|
});
|
|
2793
2793
|
};
|
|
2794
|
-
const
|
|
2794
|
+
const _r = (n) => {
|
|
2795
2795
|
var e, t, o, i;
|
|
2796
|
-
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, stateHandler: c, setLoadingAction: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state), [u, h] = (0, _.useState)(), [g, f] = (0, _.useState)(),
|
|
2796
|
+
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, stateHandler: c, setLoadingAction: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state), [u, h] = (0, _.useState)(), [g, f] = (0, _.useState)(), S = (P) => It(void 0, void 0, void 0, function* () {
|
|
2797
2797
|
P.preventDefault(), d("password-recovery");
|
|
2798
2798
|
const D = yield l.actions.continue_to_passcode_confirmation_recovery(null).run();
|
|
2799
2799
|
d(null), yield a.flow.run(D, c);
|
|
@@ -2803,8 +2803,8 @@ const Cr = (n) => {
|
|
|
2803
2803
|
d(null), yield a.flow.run(D, c);
|
|
2804
2804
|
}), C = (0, _.useMemo)(() => {
|
|
2805
2805
|
var P, D;
|
|
2806
|
-
return r(ee, Object.assign({ hidden: !(!((D = (P = l.actions).continue_to_passcode_confirmation_recovery) === null || D === void 0) && D.call(P, null)), uiAction: "password-recovery", onClick:
|
|
2807
|
-
}, [
|
|
2806
|
+
return r(ee, Object.assign({ hidden: !(!((D = (P = l.actions).continue_to_passcode_confirmation_recovery) === null || D === void 0) && D.call(P, null)), uiAction: "password-recovery", onClick: S, loadingSpinnerPosition: "left" }, { children: s("labels.forgotYourPassword") }));
|
|
2807
|
+
}, [S, s]), x = (0, _.useMemo)(() => r(ee, Object.assign({ uiAction: "choose-login-method", onClick: O, loadingSpinnerPosition: "left" }, { children: "Choose another method" })), [O]);
|
|
2808
2808
|
return (0, _.useEffect)(() => {
|
|
2809
2809
|
const P = g > 0 && setInterval(() => f(g - 1), 1e3);
|
|
2810
2810
|
return () => clearInterval(P);
|
|
@@ -2818,9 +2818,9 @@ const Cr = (n) => {
|
|
|
2818
2818
|
P.preventDefault(), d("back");
|
|
2819
2819
|
const D = yield l.actions.back(null).run();
|
|
2820
2820
|
d(null), yield a.flow.run(D, c);
|
|
2821
|
-
}), loadingSpinnerPosition: "right" }, { children: s("labels.back") })), !((i = (o = l.actions).continue_to_login_method_chooser) === null || i === void 0) && i.call(o, null) ?
|
|
2821
|
+
}), loadingSpinnerPosition: "right" }, { children: s("labels.back") })), !((i = (o = l.actions).continue_to_login_method_chooser) === null || i === void 0) && i.call(o, null) ? x : C] })] });
|
|
2822
2822
|
};
|
|
2823
|
-
var
|
|
2823
|
+
var Ko = function(n, e, t, o) {
|
|
2824
2824
|
return new (t || (t = Promise))(function(i, s) {
|
|
2825
2825
|
function a(l) {
|
|
2826
2826
|
try {
|
|
@@ -2845,13 +2845,13 @@ var Vo = function(n, e, t, o) {
|
|
|
2845
2845
|
d((o = o.apply(n, [])).next());
|
|
2846
2846
|
});
|
|
2847
2847
|
};
|
|
2848
|
-
const
|
|
2848
|
+
const yr = (n) => {
|
|
2849
2849
|
const { t: e } = (0, _.useContext)(Z.TranslateContext), { hanko: t, stateHandler: o, setLoadingAction: i } = (0, _.useContext)(ue), { flowState: s } = Ne(n.state), [a, c] = (0, _.useState)();
|
|
2850
|
-
return r(Oe, { children: [r(de, { children: e("headlines.registerPassword") }), r(Pe, { state: s }), r(q, { children: e("texts.passwordFormatHint", { minLength: s.actions.password_recovery(null).inputs.new_password.min_length, maxLength: 72 }) }), r(ne, Object.assign({ onSubmit: (d) =>
|
|
2850
|
+
return r(Oe, { children: [r(de, { children: e("headlines.registerPassword") }), r(Pe, { state: s }), r(q, { children: e("texts.passwordFormatHint", { minLength: s.actions.password_recovery(null).inputs.new_password.min_length, maxLength: 72 }) }), r(ne, Object.assign({ onSubmit: (d) => Ko(void 0, void 0, void 0, function* () {
|
|
2851
2851
|
d.preventDefault(), i("password-submit");
|
|
2852
2852
|
const l = yield s.actions.password_recovery({ new_password: a }).run();
|
|
2853
2853
|
i(null), yield t.flow.run(l, o);
|
|
2854
|
-
}) }, { children: [r(Be, { type: "password", autocomplete: "new-password", flowInput: s.actions.password_recovery(null).inputs.new_password, placeholder: e("labels.newPassword"), onInput: (d) =>
|
|
2854
|
+
}) }, { children: [r(Be, { type: "password", autocomplete: "new-password", flowInput: s.actions.password_recovery(null).inputs.new_password, placeholder: e("labels.newPassword"), onInput: (d) => Ko(void 0, void 0, void 0, function* () {
|
|
2855
2855
|
d.target instanceof HTMLInputElement && c(d.target.value);
|
|
2856
2856
|
}), autofocus: !0 }), r(te, Object.assign({ uiAction: "password-submit" }, { children: e("labels.continue") }))] }))] });
|
|
2857
2857
|
};
|
|
@@ -2880,25 +2880,25 @@ var Qt = function(n, e, t, o) {
|
|
|
2880
2880
|
d((o = o.apply(n, [])).next());
|
|
2881
2881
|
});
|
|
2882
2882
|
};
|
|
2883
|
-
const
|
|
2883
|
+
const br = (n) => {
|
|
2884
2884
|
var e, t, o, i, s, a;
|
|
2885
2885
|
const { t: c } = (0, _.useContext)(Z.TranslateContext), { hanko: d, setLoadingAction: l, stateHandler: u, lastLogin: h } = (0, _.useContext)(ue), { flowState: g } = Ne(n.state);
|
|
2886
2886
|
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: c("headlines.selectLoginMethod") }), r(Pe, { flowError: g == null ? void 0 : g.error }), r(q, { children: c("texts.howDoYouWantToLogin") }), r(ne, Object.assign({ hidden: !(!((t = (e = g.actions).continue_to_passcode_confirmation) === null || t === void 0) && t.call(e, null)), onSubmit: (f) => Qt(void 0, void 0, void 0, function* () {
|
|
2887
2887
|
f.preventDefault(), l("passcode-submit");
|
|
2888
|
-
const
|
|
2889
|
-
l(null), yield d.flow.run(
|
|
2888
|
+
const S = yield g.actions.continue_to_passcode_confirmation(null).run();
|
|
2889
|
+
l(null), yield d.flow.run(S, u);
|
|
2890
2890
|
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "passcode-submit", icon: "mail" }, { children: c("labels.passcode") })) })), r(ne, Object.assign({ hidden: !(!((i = (o = g.actions).continue_to_password_login) === null || i === void 0) && i.call(o, null)), onSubmit: (f) => Qt(void 0, void 0, void 0, function* () {
|
|
2891
2891
|
f.preventDefault(), l("password-submit");
|
|
2892
|
-
const
|
|
2893
|
-
l(null), yield d.flow.run(
|
|
2892
|
+
const S = yield g.actions.continue_to_password_login(null).run();
|
|
2893
|
+
l(null), yield d.flow.run(S, u);
|
|
2894
2894
|
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: c("labels.password") })) })), r(ne, Object.assign({ hidden: !(!((a = (s = g.actions).webauthn_generate_request_options) === null || a === void 0) && a.call(s, null)), onSubmit: (f) => Qt(void 0, void 0, void 0, function* () {
|
|
2895
2895
|
f.preventDefault(), l("passkey-submit");
|
|
2896
|
-
const
|
|
2897
|
-
l(null), yield d.flow.run(
|
|
2896
|
+
const S = yield g.actions.webauthn_generate_request_options(null).run();
|
|
2897
|
+
l(null), yield d.flow.run(S, u);
|
|
2898
2898
|
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: c("labels.passkey") })) }))] }), r(Ue, { children: r(ee, Object.assign({ uiAction: "back", onClick: (f) => Qt(void 0, void 0, void 0, function* () {
|
|
2899
2899
|
f.preventDefault(), l("back");
|
|
2900
|
-
const
|
|
2901
|
-
l(null), yield d.flow.run(
|
|
2900
|
+
const S = yield g.actions.back(null).run();
|
|
2901
|
+
l(null), yield d.flow.run(S, u);
|
|
2902
2902
|
}), loadingSpinnerPosition: "right" }, { children: c("labels.back") })) })] });
|
|
2903
2903
|
};
|
|
2904
2904
|
var Gt = function(n, e, t, o) {
|
|
@@ -2926,9 +2926,9 @@ var Gt = function(n, e, t, o) {
|
|
|
2926
2926
|
d((o = o.apply(n, [])).next());
|
|
2927
2927
|
});
|
|
2928
2928
|
};
|
|
2929
|
-
const
|
|
2929
|
+
const kr = (n) => {
|
|
2930
2930
|
var e, t, o, i, s, a, c;
|
|
2931
|
-
const { t: d } = (0, _.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: g, stateHandler: f, setLoadingAction:
|
|
2931
|
+
const { t: d } = (0, _.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: g, stateHandler: f, setLoadingAction: S, initialComponentName: O } = (0, _.useContext)(ue), { flowState: C } = Ne(n.state), x = (t = (e = C.actions).register_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs, P = !(!(x != null && x.email) || !(x != null && x.username)), [D, N] = (0, _.useState)(void 0), [U, ie] = (0, _.useState)(null), [be, se] = (0, _.useState)(!1), we = (0, _.useMemo)(() => {
|
|
2932
2932
|
var M, z;
|
|
2933
2933
|
return !!(!((z = (M = C.actions).thirdparty_oauth) === null || z === void 0) && z.call(M, null));
|
|
2934
2934
|
}, [C.actions]);
|
|
@@ -2937,29 +2937,29 @@ const Pr = (n) => {
|
|
|
2937
2937
|
if (M.get("error") == null || M.get("error").length === 0) return;
|
|
2938
2938
|
let z = "";
|
|
2939
2939
|
z = M.get("error") === "access_denied" ? "thirdPartyAccessDenied" : "somethingWentWrong";
|
|
2940
|
-
const
|
|
2941
|
-
N(
|
|
2942
|
-
}, []), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: d("headlines.signUp") }), r(Pe, { state: C, error: D }),
|
|
2943
|
-
M.preventDefault(),
|
|
2940
|
+
const ve = { name: z, code: z, message: M.get("error_description") };
|
|
2941
|
+
N(ve), M.delete("error"), M.delete("error_description"), history.replaceState(null, null, window.location.pathname + (M.size < 1 ? "" : `?${M.toString()}`));
|
|
2942
|
+
}, []), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: d("headlines.signUp") }), r(Pe, { state: C, error: D }), x ? r(A.Fragment, { children: [r(ne, Object.assign({ onSubmit: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
2943
|
+
M.preventDefault(), S("email-submit");
|
|
2944
2944
|
const z = yield C.actions.register_login_identifier({ email: h.email, username: h.username }).run();
|
|
2945
|
-
|
|
2946
|
-
}), maxWidth: !0 }, { children: [
|
|
2945
|
+
S(null), yield u.flow.run(z, f);
|
|
2946
|
+
}), maxWidth: !0 }, { children: [x.username ? r(Be, { markOptional: P, markError: P, type: "text", autoComplete: "username", autoCorrect: "off", flowInput: x.username, onInput: (M) => {
|
|
2947
2947
|
if (M.preventDefault(), M.target instanceof HTMLInputElement) {
|
|
2948
2948
|
const { value: z } = M.target;
|
|
2949
|
-
g((
|
|
2949
|
+
g((ve) => Object.assign(Object.assign({}, ve), { username: z }));
|
|
2950
2950
|
}
|
|
2951
|
-
}, value: h.username, placeholder: d("labels.username") }) : null,
|
|
2951
|
+
}, value: h.username, placeholder: d("labels.username") }) : null, x.email ? r(Be, { markOptional: P, markError: P, type: "email", autoComplete: "email", autoCorrect: "off", flowInput: x.email, onInput: (M) => {
|
|
2952
2952
|
if (M.preventDefault(), M.target instanceof HTMLInputElement) {
|
|
2953
2953
|
const { value: z } = M.target;
|
|
2954
|
-
g((
|
|
2954
|
+
g((ve) => Object.assign(Object.assign({}, ve), { email: z }));
|
|
2955
2955
|
}
|
|
2956
|
-
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, r(te, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), r(
|
|
2957
|
-
|
|
2956
|
+
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, r(te, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), r(go, Object.assign({ hidden: !we }, { children: d("labels.or") }))] }) : null, !((i = (o = C.actions).thirdparty_oauth) === null || i === void 0) && i.call(o, null) ? (s = C.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || s === void 0 ? void 0 : s.map((M) => r(ne, Object.assign({ onSubmit: (z) => ((ve, $e) => Gt(void 0, void 0, void 0, function* () {
|
|
2957
|
+
ve.preventDefault(), ie($e);
|
|
2958
2958
|
const Ee = yield C.actions.thirdparty_oauth({ provider: $e, redirect_to: window.location.toString() }).run();
|
|
2959
2959
|
ie(null), yield u.flow.run(Ee, f);
|
|
2960
|
-
}))(z, M.value) }, { children: r(te, Object.assign({ isLoading: M.value == U, secondary: !0, icon: M.value.startsWith("custom_") ? "customProvider" : M.value }, { children: d("labels.signInWith", { provider: M.name }) })) }), M.value)) : null, ((c = (a = C.actions).remember_me) === null || c === void 0 ? void 0 : c.call(a, null)) && r(A.Fragment, { children: [r(
|
|
2961
|
-
const z = yield C.actions.remember_me({ remember_me: !
|
|
2962
|
-
se((
|
|
2960
|
+
}))(z, M.value) }, { children: r(te, Object.assign({ isLoading: M.value == U, secondary: !0, icon: M.value.startsWith("custom_") ? "customProvider" : M.value }, { children: d("labels.signInWith", { provider: M.name }) })) }), M.value)) : null, ((c = (a = C.actions).remember_me) === null || c === void 0 ? void 0 : c.call(a, null)) && r(A.Fragment, { children: [r(On, {}), r(vo, { required: !1, type: "checkbox", label: d("labels.staySignedIn"), checked: be, onChange: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
2961
|
+
const z = yield C.actions.remember_me({ remember_me: !be }).run();
|
|
2962
|
+
se((ve) => !ve), yield u.flow.run(z, f);
|
|
2963
2963
|
}) })] })] }), r(Ue, Object.assign({ hidden: O !== "auth" }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "switch-flow", onClick: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
2964
2964
|
M.preventDefault(), l("login");
|
|
2965
2965
|
}), loadingSpinnerPosition: "left" }, { children: d("labels.alreadyHaveAnAccount") }))] }))] });
|
|
@@ -2989,118 +2989,118 @@ var Yt = function(n, e, t, o) {
|
|
|
2989
2989
|
d((o = o.apply(n, [])).next());
|
|
2990
2990
|
});
|
|
2991
2991
|
};
|
|
2992
|
-
const
|
|
2992
|
+
const wr = (n) => {
|
|
2993
2993
|
var e, t, o, i, s, a, c, d;
|
|
2994
|
-
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, stateHandler: h, setLoadingAction: g } = (0, _.useContext)(ue), { flowState: f } = Ne(n.state), [
|
|
2994
|
+
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, stateHandler: h, setLoadingAction: g } = (0, _.useContext)(ue), { flowState: f } = Ne(n.state), [S, O] = (0, _.useState)();
|
|
2995
2995
|
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: l("headlines.registerPassword") }), r(Pe, { state: f }), r(q, { children: l("texts.passwordFormatHint", { minLength: f.actions.register_password(null).inputs.new_password.min_length, maxLength: 72 }) }), r(ne, Object.assign({ onSubmit: (C) => Yt(void 0, void 0, void 0, function* () {
|
|
2996
2996
|
C.preventDefault(), g("password-submit");
|
|
2997
|
-
const
|
|
2998
|
-
g(null), yield u.flow.run(
|
|
2997
|
+
const x = yield f.actions.register_password({ new_password: S }).run();
|
|
2998
|
+
g(null), yield u.flow.run(x, h);
|
|
2999
2999
|
}) }, { children: [r(Be, { type: "password", autocomplete: "new-password", flowInput: f.actions.register_password(null).inputs.new_password, placeholder: l("labels.newPassword"), onInput: (C) => Yt(void 0, void 0, void 0, function* () {
|
|
3000
3000
|
C.target instanceof HTMLInputElement && O(C.target.value);
|
|
3001
3001
|
}), autofocus: !0 }), r(te, Object.assign({ uiAction: "password-submit" }, { children: l("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = f.actions).back) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = f.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (C) => Yt(void 0, void 0, void 0, function* () {
|
|
3002
3002
|
C.preventDefault(), g("back");
|
|
3003
|
-
const
|
|
3004
|
-
g(null), yield u.flow.run(
|
|
3003
|
+
const x = yield f.actions.back(null).run();
|
|
3004
|
+
g(null), yield u.flow.run(x, h);
|
|
3005
3005
|
}), loadingSpinnerPosition: "right", hidden: !(!((a = (s = f.actions).back) === null || a === void 0) && a.call(s, null)) }, { children: l("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (C) => Yt(void 0, void 0, void 0, function* () {
|
|
3006
3006
|
C.preventDefault(), g("skip");
|
|
3007
|
-
const
|
|
3008
|
-
g(null), yield u.flow.run(
|
|
3007
|
+
const x = yield f.actions.skip(null).run();
|
|
3008
|
+
g(null), yield u.flow.run(x, h);
|
|
3009
3009
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = f.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] }))] });
|
|
3010
3010
|
};
|
|
3011
|
-
var
|
|
3011
|
+
var pn = Y(21), jt = {};
|
|
3012
3012
|
jt.setAttributes = tt(), jt.insert = (n) => {
|
|
3013
3013
|
window._hankoStyle = n;
|
|
3014
|
-
}, jt.domAPI = et(), jt.insertStyleElement = nt(), Xe()(
|
|
3015
|
-
const Ze =
|
|
3014
|
+
}, jt.domAPI = et(), jt.insertStyleElement = nt(), Xe()(pn.A, jt);
|
|
3015
|
+
const Ze = pn.A && pn.A.locals ? pn.A.locals : void 0, Pn = function({ name: n, columnSelector: e, contentSelector: t, data: o, checkedItemID: i, setCheckedItemID: s, dropdown: a = !1 }) {
|
|
3016
3016
|
const c = (0, _.useCallback)((u) => `${n}-${u}`, [n]), d = (0, _.useCallback)((u) => c(u) === i, [i, c]), l = (u) => {
|
|
3017
3017
|
if (!(u.target instanceof HTMLInputElement)) return;
|
|
3018
3018
|
const h = parseInt(u.target.value, 10), g = c(h);
|
|
3019
3019
|
s(g === i ? null : g);
|
|
3020
3020
|
};
|
|
3021
3021
|
return r("div", Object.assign({ className: Ze.accordion }, { children: o.map((u, h) => r("div", Object.assign({ className: Ze.accordionItem }, { children: [r("input", { type: "radio", className: Ze.accordionInput, id: `${n}-${h}`, name: n, onClick: l, value: h, checked: d(h) }), r("label", Object.assign({ className: Q()(Ze.label, a && Ze.dropdown), for: `${n}-${h}` }, { children: r("span", Object.assign({ className: Ze.labelText }, { children: e(u, h) })) })), r("div", Object.assign({ className: Q()(Ze.accordionContent, a && Ze.dropdownContent) }, { children: t(u, h) }))] }), h)) }));
|
|
3022
|
-
}, Re = ({ children: n }) => r("h2", Object.assign({ part: "headline2", className: Q()(
|
|
3022
|
+
}, Re = ({ children: n }) => r("h2", Object.assign({ part: "headline2", className: Q()(yn.headline, yn.grade2) }, { children: n })), xr = ({ onEmailDelete: n, onEmailSetPrimary: e, onEmailVerify: t, checkedItemID: o, setCheckedItemID: i, emails: s = [], deletableEmailIDs: a = [] }) => {
|
|
3023
3023
|
const { t: c } = (0, _.useContext)(Z.TranslateContext), d = (0, _.useMemo)(() => !1, []);
|
|
3024
|
-
return r(
|
|
3024
|
+
return r(Pn, { name: "email-edit-dropdown", columnSelector: (l) => {
|
|
3025
3025
|
const u = r("span", Object.assign({ className: Ze.description }, { children: l.is_verified ? l.is_primary ? r(A.Fragment, { children: [" -", " ", c("labels.primaryEmail")] }) : null : r(A.Fragment, { children: [" -", " ", c("labels.unverifiedEmail")] }) }));
|
|
3026
3026
|
return l.is_primary ? r(A.Fragment, { children: [r("b", { children: l.address }), u] }) : r(A.Fragment, { children: [l.address, u] });
|
|
3027
3027
|
}, data: s, contentSelector: (l) => {
|
|
3028
3028
|
var u;
|
|
3029
3029
|
return r(A.Fragment, { children: [l.is_primary ? r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.isPrimaryEmail") }), c("texts.isPrimaryEmail")] }) }) : r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.setPrimaryEmail") }), c("texts.setPrimaryEmail"), r("br", {}), r(ee, Object.assign({ uiAction: "email-set-primary", onClick: (h) => e(h, l.id), loadingSpinnerPosition: "right" }, { children: c("labels.setAsPrimaryEmail") }))] }) }), l.is_verified ? r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.emailVerified") }), c("texts.emailVerified")] }) }) : r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.emailUnverified") }), c("texts.emailUnverified"), r("br", {}), r(ee, Object.assign({ uiAction: "email-verify", onClick: (h) => t(h, l.id), loadingSpinnerPosition: "right" }, { children: c("labels.verify") }))] }) }), a.includes(l.id) ? r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.emailDelete") }), c("texts.emailDelete"), r("br", {}), r(ee, Object.assign({ uiAction: "email-delete", dangerous: !0, onClick: (h) => n(h, l.id), disabled: d, loadingSpinnerPosition: "right" }, { children: c("labels.delete") }))] }) }) : null, ((u = l.identities) === null || u === void 0 ? void 0 : u.length) > 0 ? r(A.Fragment, { children: r(q, { children: [r(Re, { children: c("headlines.connectedAccounts") }), l.identities.map((h) => h.provider).join(", ")] }) }) : null] });
|
|
3030
3030
|
}, checkedItemID: o, setCheckedItemID: i });
|
|
3031
|
-
},
|
|
3031
|
+
}, Sr = ({ onCredentialNameSubmit: n, oldName: e, onBack: t, credential: o, credentialType: i }) => {
|
|
3032
3032
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), [a, c] = (0, _.useState)(e);
|
|
3033
3033
|
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s(i === "security-key" ? "headlines.renameSecurityKey" : "headlines.renamePasskey") }), r(Pe, { flowError: null }), r(q, { children: s(i === "security-key" ? "texts.renameSecurityKey" : "texts.renamePasskey") }), r(ne, Object.assign({ onSubmit: (d) => n(d, o.id, a) }, { children: [r(Be, { type: "text", name: i, value: a, minLength: 3, maxLength: 32, required: !0, placeholder: s(i === "security-key" ? "labels.newSecurityKeyName" : "labels.newPasskeyName"), onInput: (d) => {
|
|
3034
3034
|
return l = void 0, u = void 0, g = function* () {
|
|
3035
3035
|
d.target instanceof HTMLInputElement && c(d.target.value);
|
|
3036
|
-
}, new ((h = void 0) || (h = Promise))(function(f,
|
|
3036
|
+
}, new ((h = void 0) || (h = Promise))(function(f, S) {
|
|
3037
3037
|
function O(P) {
|
|
3038
3038
|
try {
|
|
3039
|
-
|
|
3039
|
+
x(g.next(P));
|
|
3040
3040
|
} catch (D) {
|
|
3041
|
-
|
|
3041
|
+
S(D);
|
|
3042
3042
|
}
|
|
3043
3043
|
}
|
|
3044
3044
|
function C(P) {
|
|
3045
3045
|
try {
|
|
3046
|
-
|
|
3046
|
+
x(g.throw(P));
|
|
3047
3047
|
} catch (D) {
|
|
3048
|
-
|
|
3048
|
+
S(D);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
|
-
function
|
|
3051
|
+
function x(P) {
|
|
3052
3052
|
var D;
|
|
3053
3053
|
P.done ? f(P.value) : (D = P.value, D instanceof h ? D : new h(function(N) {
|
|
3054
3054
|
N(D);
|
|
3055
3055
|
})).then(O, C);
|
|
3056
3056
|
}
|
|
3057
|
-
|
|
3057
|
+
x((g = g.apply(l, u || [])).next());
|
|
3058
3058
|
});
|
|
3059
3059
|
var l, u, h, g;
|
|
3060
3060
|
}, autofocus: !0 }), r(te, Object.assign({ uiAction: "webauthn-credential-rename" }, { children: s("labels.save") }))] }))] }), r(Ue, { children: r(ee, Object.assign({ onClick: t, loadingSpinnerPosition: "right" }, { children: s("labels.back") })) })] });
|
|
3061
|
-
},
|
|
3061
|
+
}, Bo = ({ credentials: n = [], checkedItemID: e, setCheckedItemID: t, onBack: o, onCredentialNameSubmit: i, onCredentialDelete: s, allowCredentialDeletion: a, credentialType: c }) => {
|
|
3062
3062
|
const { t: d } = (0, _.useContext)(Z.TranslateContext), { setPage: l } = (0, _.useContext)(ue), u = (g) => {
|
|
3063
3063
|
if (g.name) return g.name;
|
|
3064
3064
|
const f = g.public_key.replace(/[\W_]/g, "");
|
|
3065
3065
|
return `${c === "security-key" ? "SecurityKey" : "Passkey"}-${f.substring(f.length - 7, f.length)}`;
|
|
3066
3066
|
}, h = (g) => new Date(g).toLocaleString();
|
|
3067
|
-
return r(
|
|
3068
|
-
|
|
3067
|
+
return r(Pn, { name: c === "security-key" ? "security-key-edit-dropdown" : "passkey-edit-dropdown", columnSelector: (g) => u(g), data: n, contentSelector: (g) => r(A.Fragment, { children: [r(q, { children: [r(Re, { children: d(c === "security-key" ? "headlines.renameSecurityKey" : "headlines.renamePasskey") }), d(c === "security-key" ? "texts.renameSecurityKey" : "texts.renamePasskey"), r("br", {}), r(ee, Object.assign({ onClick: (f) => ((S, O, C) => {
|
|
3068
|
+
S.preventDefault(), l(r(Sr, { oldName: u(O), credential: O, credentialType: C, onBack: o, onCredentialNameSubmit: i }));
|
|
3069
3069
|
})(f, g, c), loadingSpinnerPosition: "right" }, { children: d("labels.rename") }))] }), r(q, Object.assign({ hidden: !a }, { children: [r(Re, { children: d(c === "security-key" ? "headlines.deleteSecurityKey" : "headlines.deletePasskey") }), d(c === "security-key" ? "texts.deleteSecurityKey" : "texts.deletePasskey"), r("br", {}), r(ee, Object.assign({ uiAction: "password-delete", dangerous: !0, onClick: (f) => s(f, g.id), loadingSpinnerPosition: "right" }, { children: d("labels.delete") }))] })), r(q, { children: [r(Re, { children: d("headlines.lastUsedAt") }), g.last_used_at ? h(g.last_used_at) : "-"] }), r(q, { children: [r(Re, { children: d("headlines.createdAt") }), h(g.created_at)] })] }), checkedItemID: e, setCheckedItemID: t });
|
|
3070
|
-
}, qt = ({ name: n, title: e, children: t, checkedItemID: o, setCheckedItemID: i }) => r(
|
|
3070
|
+
}, qt = ({ name: n, title: e, children: t, checkedItemID: o, setCheckedItemID: i }) => r(Pn, { dropdown: !0, name: n, columnSelector: () => e, contentSelector: () => r(A.Fragment, { children: t }), setCheckedItemID: i, checkedItemID: o, data: [{}] }), yo = ({ flowError: n }) => {
|
|
3071
3071
|
const { t: e } = (0, _.useContext)(Z.TranslateContext);
|
|
3072
|
-
return r(A.Fragment, { children: n ? r("div", Object.assign({ className:
|
|
3073
|
-
},
|
|
3072
|
+
return r(A.Fragment, { children: n ? r("div", Object.assign({ className: Ii.errorMessage }, { children: e(`flowErrors.${n == null ? void 0 : n.code}`) })) : null });
|
|
3073
|
+
}, Cr = ({ inputs: n, onEmailSubmit: e, checkedItemID: t, setCheckedItemID: o }) => {
|
|
3074
3074
|
var i;
|
|
3075
3075
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), [a, c] = (0, _.useState)();
|
|
3076
|
-
return r(qt, Object.assign({ name: "email-create-dropdown", title: s("labels.addEmail"), checkedItemID: t, setCheckedItemID: o }, { children: [r(
|
|
3076
|
+
return r(qt, Object.assign({ name: "email-create-dropdown", title: s("labels.addEmail"), checkedItemID: t, setCheckedItemID: o }, { children: [r(yo, { flowError: (i = n.email) === null || i === void 0 ? void 0 : i.error }), r(ne, Object.assign({ onSubmit: (d) => e(d, a).then(() => c("")) }, { children: [r(Be, { markError: !0, type: "email", placeholder: s("labels.newEmailAddress"), onInput: (d) => {
|
|
3077
3077
|
d.preventDefault(), d.target instanceof HTMLInputElement && c(d.target.value);
|
|
3078
3078
|
}, value: a, flowInput: n.email }), r(te, Object.assign({ uiAction: "email-submit" }, { children: s("labels.save") }))] }))] }));
|
|
3079
|
-
},
|
|
3079
|
+
}, Vo = ({ inputs: n, checkedItemID: e, setCheckedItemID: t, onPasswordSubmit: o, onPasswordDelete: i, allowPasswordDelete: s, passwordExists: a }) => {
|
|
3080
3080
|
var c, d, l;
|
|
3081
3081
|
const { t: u } = (0, _.useContext)(Z.TranslateContext), [h, g] = (0, _.useState)("");
|
|
3082
|
-
return r(qt, Object.assign({ name: "password-edit-dropdown", title: u(a ? "labels.changePassword" : "labels.setPassword"), checkedItemID: e, setCheckedItemID: t }, { children: [r(q, { children: u("texts.passwordFormatHint", { minLength: (c = n.password.min_length) === null || c === void 0 ? void 0 : c.toString(10), maxLength: (d = n.password.max_length) === null || d === void 0 ? void 0 : d.toString(10) }) }), r(
|
|
3082
|
+
return r(qt, Object.assign({ name: "password-edit-dropdown", title: u(a ? "labels.changePassword" : "labels.setPassword"), checkedItemID: e, setCheckedItemID: t }, { children: [r(q, { children: u("texts.passwordFormatHint", { minLength: (c = n.password.min_length) === null || c === void 0 ? void 0 : c.toString(10), maxLength: (d = n.password.max_length) === null || d === void 0 ? void 0 : d.toString(10) }) }), r(yo, { flowError: (l = n.password) === null || l === void 0 ? void 0 : l.error }), r(ne, Object.assign({ onSubmit: (f) => o(f, h).then(() => g("")) }, { children: [r(Be, { markError: !0, autoComplete: "new-password", placeholder: u("labels.newPassword"), type: "password", onInput: (f) => {
|
|
3083
3083
|
f.preventDefault(), f.target instanceof HTMLInputElement && g(f.target.value);
|
|
3084
3084
|
}, value: h, flowInput: n.password }), r(te, Object.assign({ uiAction: "password-submit" }, { children: u("labels.save") }))] })), r(ee, Object.assign({ hidden: !s, uiAction: "password-delete", dangerous: !0, onClick: (f) => i(f).then(() => g("")), loadingSpinnerPosition: "right" }, { children: u("labels.delete") }))] }));
|
|
3085
|
-
},
|
|
3085
|
+
}, Zo = ({ checkedItemID: n, setCheckedItemID: e, onCredentialSubmit: t, credentialType: o }) => {
|
|
3086
3086
|
const { t: i } = (0, _.useContext)(Z.TranslateContext), s = mt.supported();
|
|
3087
3087
|
return r(qt, Object.assign({ name: o === "security-key" ? "security-key-create-dropdown" : "passkey-create-dropdown", title: i(o === "security-key" ? "labels.createSecurityKey" : "labels.createPasskey"), checkedItemID: n, setCheckedItemID: e }, { children: [r(q, { children: i(o === "security-key" ? "texts.securityKeySetUp" : "texts.setupPasskey") }), r(ne, Object.assign({ onSubmit: t }, { children: r(te, Object.assign({ uiAction: o === "security-key" ? "security-key-submit" : "passkey-submit", title: s ? null : i("labels.webauthnUnsupported") }, { children: i(o === "security-key" ? "labels.createSecurityKey" : "labels.createPasskey") })) }))] }));
|
|
3088
|
-
},
|
|
3088
|
+
}, Jo = ({ inputs: n, checkedItemID: e, setCheckedItemID: t, onUsernameSubmit: o, onUsernameDelete: i, hasUsername: s, allowUsernameDeletion: a }) => {
|
|
3089
3089
|
var c;
|
|
3090
3090
|
const { t: d } = (0, _.useContext)(Z.TranslateContext), [l, u] = (0, _.useState)();
|
|
3091
|
-
return r(qt, Object.assign({ name: "username-edit-dropdown", title: d(s ? "labels.changeUsername" : "labels.setUsername"), checkedItemID: e, setCheckedItemID: t }, { children: [r(
|
|
3091
|
+
return r(qt, Object.assign({ name: "username-edit-dropdown", title: d(s ? "labels.changeUsername" : "labels.setUsername"), checkedItemID: e, setCheckedItemID: t }, { children: [r(yo, { flowError: (c = n.username) === null || c === void 0 ? void 0 : c.error }), r(ne, Object.assign({ onSubmit: (h) => o(h, l).then(() => u("")) }, { children: [r(Be, { markError: !0, placeholder: d("labels.username"), type: "text", onInput: (h) => {
|
|
3092
3092
|
h.preventDefault(), h.target instanceof HTMLInputElement && u(h.target.value);
|
|
3093
3093
|
}, value: l, flowInput: n.username }), r(te, Object.assign({ uiAction: "username-set" }, { children: d("labels.save") }))] })), r(ee, Object.assign({ hidden: !a, uiAction: "username-delete", dangerous: !0, onClick: (h) => i(h).then(() => u("")), loadingSpinnerPosition: "right" }, { children: d("labels.delete") }))] }));
|
|
3094
|
-
},
|
|
3094
|
+
}, Ar = ({ onBack: n, onAccountDelete: e }) => {
|
|
3095
3095
|
const { t } = (0, _.useContext)(Z.TranslateContext);
|
|
3096
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: t("headlines.deleteAccount") }), r(Pe, { flowError: null }), r(q, { children: t("texts.deleteAccount") }), r(ne, Object.assign({ onSubmit: e }, { children: [r(
|
|
3097
|
-
},
|
|
3096
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: t("headlines.deleteAccount") }), r(Pe, { flowError: null }), r(q, { children: t("texts.deleteAccount") }), r(ne, Object.assign({ onSubmit: e }, { children: [r(vo, { required: !0, type: "checkbox", label: t("labels.deleteAccount") }), r(te, Object.assign({ uiAction: "account_delete" }, { children: t("labels.delete") }))] }))] }), r(Ue, { children: r(ee, Object.assign({ onClick: n }, { children: t("labels.back") })) })] });
|
|
3097
|
+
}, Or = ({ sessions: n = [], checkedItemID: e, setCheckedItemID: t, onSessionDelete: o, deletableSessionIDs: i }) => {
|
|
3098
3098
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), a = (c) => new Date(c).toLocaleString();
|
|
3099
|
-
return r(
|
|
3099
|
+
return r(Pn, { name: "session-edit-dropdown", columnSelector: (c) => {
|
|
3100
3100
|
const d = r("b", { children: c.user_agent ? c.user_agent : c.id }), l = c.current ? r("span", Object.assign({ className: Ze.description }, { children: r(A.Fragment, { children: [" -", " ", s("labels.currentSession")] }) })) : null;
|
|
3101
3101
|
return r(A.Fragment, { children: [d, l] });
|
|
3102
3102
|
}, data: n, contentSelector: (c) => r(A.Fragment, { children: [r(q, Object.assign({ hidden: !c.ip_address }, { children: [r(Re, { children: s("headlines.ipAddress") }), c.ip_address] })), r(q, { children: [r(Re, { children: s("headlines.lastUsed") }), a(c.last_used)] }), r(q, { children: [r(Re, { children: s("headlines.createdAt") }), a(c.created_at)] }), i != null && i.includes(c.id) ? r(q, { children: [r(Re, { children: s("headlines.revokeSession") }), r(ee, Object.assign({ uiAction: "session-delete", dangerous: !0, onClick: (d) => o(d, c.id), loadingSpinnerPosition: "right" }, { children: s("labels.revoke") }))] }) : null] }), checkedItemID: e, setCheckedItemID: t });
|
|
3103
|
-
},
|
|
3103
|
+
}, Pr = ({ checkedItemID: n, setCheckedItemID: e, onDelete: t, onConnect: o, authAppSetUp: i, allowDeletion: s }) => {
|
|
3104
3104
|
const { t: a } = (0, _.useContext)(Z.TranslateContext), c = r("span", Object.assign({ className: Ze.description }, { children: i ? r(A.Fragment, { children: [" -", " ", a("labels.configured")] }) : null })), d = r(A.Fragment, { children: [a("labels.authenticatorAppManage"), " ", c] });
|
|
3105
3105
|
return r(qt, Object.assign({ name: "authenticator-app-manage-dropdown", title: d, checkedItemID: n, setCheckedItemID: e }, { children: [r(Re, { children: a(i ? "headlines.authenticatorAppAlreadySetUp" : "headlines.authenticatorAppNotSetUp") }), r(q, { children: [a(i ? "texts.authenticatorAppAlreadySetUp" : "texts.authenticatorAppNotSetUp"), r("br", {}), r(ee, i ? Object.assign({ hidden: !s, uiAction: "auth-app-remove", onClick: (l) => t(l), loadingSpinnerPosition: "right", dangerous: !0 }, { children: a("labels.delete") }) : Object.assign({ uiAction: "auth-app-add", onClick: (l) => o(l), loadingSpinnerPosition: "right" }, { children: a("labels.authenticatorAppAdd") }))] })] }));
|
|
3106
3106
|
};
|
|
@@ -3129,12 +3129,12 @@ var je = function(n, e, t, o) {
|
|
|
3129
3129
|
d((o = o.apply(n, [])).next());
|
|
3130
3130
|
});
|
|
3131
3131
|
};
|
|
3132
|
-
const
|
|
3133
|
-
var e, t, o, i, s, a, c, d, l, u, h, g, f,
|
|
3134
|
-
const { t: G } = (0, _.useContext)(Z.TranslateContext), { hanko: _e, setLoadingAction: w, stateHandler:
|
|
3132
|
+
const ji = (n) => {
|
|
3133
|
+
var e, t, o, i, s, a, c, d, l, u, h, g, f, S, O, C, x, P, D, N, U, ie, be, se, we, M, z, ve, $e, Ee, Le, re, ae, he, Ie, k, p, y, L, K, pe, ze, qe, Fe, m, v, b, j, T, I, W, X;
|
|
3134
|
+
const { t: G } = (0, _.useContext)(Z.TranslateContext), { hanko: _e, setLoadingAction: w, stateHandler: ke, setUIState: J, setPage: H } = (0, _.useContext)(ue), { flowState: E } = Ne(n.state), [xe, B] = (0, _.useState)(""), F = (R, V, Qe) => je(void 0, void 0, void 0, function* () {
|
|
3135
3135
|
R.preventDefault(), w(V);
|
|
3136
|
-
const
|
|
3137
|
-
|
|
3136
|
+
const En = yield Qe();
|
|
3137
|
+
En != null && En.error || (B(null), yield new Promise((Li) => setTimeout(Li, 360))), w(null), yield _e.flow.run(En, ke);
|
|
3138
3138
|
}), Me = (R) => je(void 0, void 0, void 0, function* () {
|
|
3139
3139
|
return F(R, "password-delete", E.actions.password_delete(null).run);
|
|
3140
3140
|
}), ot = (R) => je(void 0, void 0, void 0, function* () {
|
|
@@ -3143,39 +3143,39 @@ const Li = (n) => {
|
|
|
3143
3143
|
return F(R, "webauthn-credential-rename", E.actions.webauthn_credential_rename({ passkey_id: V, passkey_name: Qe }).run);
|
|
3144
3144
|
}), Kt = (R) => je(void 0, void 0, void 0, function* () {
|
|
3145
3145
|
return F(R, "account_delete", E.actions.account_delete(null).run);
|
|
3146
|
-
}),
|
|
3147
|
-
return r(Oe, { children: [r(Pe, { 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) || !((s = (i = E.actions).username_update) === null || s === void 0) && s.call(i, null) || !((c = (a = E.actions).username_delete) === null || c === void 0) && c.call(a, null) ? r(A.Fragment, { children: [r(de, { children: G("labels.username") }), E.payload.user.username ? r(q, { children: r("b", { children: E.payload.user.username.username }) }) : null, r(q, { children: [!((l = (d = E.actions).username_create) === null || l === void 0) && l.call(d, null) ? r(
|
|
3146
|
+
}), st = (R) => (R.preventDefault(), H(r(ji, { state: E, enablePasskeys: n.enablePasskeys })), Promise.resolve());
|
|
3147
|
+
return r(Oe, { children: [r(Pe, { 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) || !((s = (i = E.actions).username_update) === null || s === void 0) && s.call(i, null) || !((c = (a = E.actions).username_delete) === null || c === void 0) && c.call(a, null) ? r(A.Fragment, { children: [r(de, { children: G("labels.username") }), E.payload.user.username ? r(q, { children: r("b", { children: E.payload.user.username.username }) }) : null, r(q, { children: [!((l = (d = E.actions).username_create) === null || l === void 0) && l.call(d, null) ? r(Jo, { 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: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3148
3148
|
return F(R, "username-set", E.actions.username_create({ username: V }).run);
|
|
3149
|
-
}), onUsernameDelete: ot, checkedItemID:
|
|
3149
|
+
}), onUsernameDelete: ot, checkedItemID: xe, setCheckedItemID: B }) : null, !((f = (g = E.actions).username_update) === null || f === void 0) && f.call(g, null) ? r(Jo, { inputs: E.actions.username_update(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((O = (S = E.actions).username_delete) === null || O === void 0) && O.call(S, null)), onUsernameSubmit: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3150
3150
|
return F(R, "username-set", E.actions.username_update({ username: V }).run);
|
|
3151
|
-
}), onUsernameDelete: ot, checkedItemID:
|
|
3151
|
+
}), onUsernameDelete: ot, checkedItemID: xe, setCheckedItemID: B }) : null] })] }) : null, !((x = (C = E.payload) === null || C === void 0 ? void 0 : C.user) === null || x === void 0) && x.emails || !((D = (P = E.actions).email_create) === null || D === void 0) && D.call(P, null) ? r(A.Fragment, { children: [r(de, { children: G("headlines.profileEmails") }), r(q, { children: [r(xr, { emails: E.payload.user.emails, onEmailDelete: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3152
3152
|
return F(R, "email-delete", E.actions.email_delete({ email_id: V }).run);
|
|
3153
3153
|
}), onEmailSetPrimary: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3154
3154
|
return F(R, "email-set-primary", E.actions.email_set_primary({ email_id: V }).run);
|
|
3155
3155
|
}), onEmailVerify: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3156
3156
|
return F(R, "email-verify", E.actions.email_verify({ email_id: V }).run);
|
|
3157
|
-
}), checkedItemID:
|
|
3157
|
+
}), checkedItemID: xe, setCheckedItemID: B, deletableEmailIDs: (ie = (U = (N = E.actions).email_delete) === null || U === void 0 ? void 0 : U.call(N, null).inputs.email_id.allowed_values) === null || ie === void 0 ? void 0 : ie.map((R) => R.value) }), !((se = (be = E.actions).email_create) === null || se === void 0) && se.call(be, null) ? r(Cr, { inputs: E.actions.email_create(null).inputs, onEmailSubmit: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3158
3158
|
return J((Qe) => Object.assign(Object.assign({}, Qe), { email: V })), F(R, "email-submit", E.actions.email_create({ email: V }).run);
|
|
3159
|
-
}), checkedItemID:
|
|
3159
|
+
}), checkedItemID: xe, setCheckedItemID: B }) : null] })] }) : null, !((M = (we = E.actions).password_create) === null || M === void 0) && M.call(we, null) ? r(A.Fragment, { children: [r(de, { children: G("headlines.profilePassword") }), r(q, { children: r(Vo, { inputs: E.actions.password_create(null).inputs, onPasswordSubmit: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3160
3160
|
return F(R, "password-submit", E.actions.password_create({ password: V }).run);
|
|
3161
|
-
}), onPasswordDelete: Me, checkedItemID:
|
|
3161
|
+
}), onPasswordDelete: Me, checkedItemID: xe, setCheckedItemID: B }) })] }) : null, !((ve = (z = E.actions).password_update) === null || ve === void 0) && ve.call(z, null) ? r(A.Fragment, { children: [r(de, { children: G("headlines.profilePassword") }), r(q, { children: r(Vo, { allowPasswordDelete: !!(!((Ee = ($e = E.actions).password_delete) === null || Ee === void 0) && Ee.call($e, null)), inputs: E.actions.password_update(null).inputs, onPasswordSubmit: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3162
3162
|
return F(R, "password-submit", E.actions.password_update({ password: V }).run);
|
|
3163
|
-
}), onPasswordDelete: Me, checkedItemID:
|
|
3163
|
+
}), onPasswordDelete: Me, checkedItemID: xe, setCheckedItemID: B, passwordExists: !0 }) })] }) : null, n.enablePasskeys && (!((re = (Le = E.payload) === null || Le === void 0 ? void 0 : Le.user) === null || re === void 0) && re.passkeys || !((he = (ae = E.actions).webauthn_credential_create) === null || he === void 0) && he.call(ae, null)) ? r(A.Fragment, { children: [r(de, { children: G("headlines.profilePasskeys") }), r(q, { children: [r(Bo, { onBack: st, onCredentialNameSubmit: fe, onCredentialDelete: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3164
3164
|
return F(R, "passkey-delete", E.actions.webauthn_credential_delete({ passkey_id: V }).run);
|
|
3165
|
-
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID:
|
|
3165
|
+
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID: xe, setCheckedItemID: B, allowCredentialDeletion: !!(!((k = (Ie = E.actions).webauthn_credential_delete) === null || k === void 0) && k.call(Ie, null)), credentialType: "passkey" }), !((y = (p = E.actions).webauthn_credential_create) === null || y === void 0) && y.call(p, null) ? r(Zo, { credentialType: "passkey", onCredentialSubmit: (R) => je(void 0, void 0, void 0, function* () {
|
|
3166
3166
|
return F(R, "passkey-submit", E.actions.webauthn_credential_create(null).run);
|
|
3167
|
-
}), setError: null, checkedItemID:
|
|
3167
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: B }) : null] })] }) : null, !((L = E.payload.user.mfa_config) === null || L === void 0) && L.security_keys_enabled ? r(A.Fragment, { children: [r(de, { children: G("headlines.securityKeys") }), r(q, { children: [r(Bo, { onBack: st, onCredentialNameSubmit: fe, onCredentialDelete: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3168
3168
|
return F(R, "security-key-delete", E.actions.security_key_delete({ security_key_id: V }).run);
|
|
3169
|
-
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID:
|
|
3169
|
+
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID: xe, setCheckedItemID: B, allowCredentialDeletion: !!(!((pe = (K = E.actions).security_key_delete) === null || pe === void 0) && pe.call(K, null)), credentialType: "security-key" }), !((qe = (ze = E.actions).security_key_create) === null || qe === void 0) && qe.call(ze, null) ? r(Zo, { credentialType: "security-key", onCredentialSubmit: (R) => je(void 0, void 0, void 0, function* () {
|
|
3170
3170
|
return F(R, "security-key-submit", E.actions.security_key_create(null).run);
|
|
3171
|
-
}), setError: null, checkedItemID:
|
|
3171
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: B }) : null] })] }) : null, !((Fe = E.payload.user.mfa_config) === null || Fe === void 0) && Fe.totp_enabled ? r(A.Fragment, { children: [r(de, { children: G("headlines.authenticatorApp") }), r(q, { children: r(Pr, { onConnect: (R) => je(void 0, void 0, void 0, function* () {
|
|
3172
3172
|
return F(R, "auth-app-add", E.actions.continue_to_otp_secret_creation(null).run);
|
|
3173
3173
|
}), onDelete: (R) => je(void 0, void 0, void 0, function* () {
|
|
3174
3174
|
return F(R, "auth-app-remove", E.actions.otp_secret_delete(null).run);
|
|
3175
|
-
}), allowDeletion: !!(!((v = (m = E.actions).otp_secret_delete) === null || v === void 0) && v.call(m, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID:
|
|
3175
|
+
}), allowDeletion: !!(!((v = (m = E.actions).otp_secret_delete) === null || v === void 0) && v.call(m, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID: xe, setCheckedItemID: B }) })] }) : null, E.payload.sessions ? r(A.Fragment, { children: [r(de, { children: G("headlines.profileSessions") }), r(q, { children: r(Or, { sessions: E.payload.sessions, setError: null, checkedItemID: xe, setCheckedItemID: B, onSessionDelete: (R, V) => je(void 0, void 0, void 0, function* () {
|
|
3176
3176
|
return F(R, "session-delete", E.actions.session_delete({ session_id: V }).run);
|
|
3177
|
-
}), deletableSessionIDs: (I = (T = (j = E.actions).session_delete) === null || T === void 0 ? void 0 : T.call(j, null).inputs.session_id.allowed_values) === null || I === void 0 ? void 0 : I.map((R) => R.value) }) })] }) : null, !((X = (W = E.actions).account_delete) === null || X === void 0) && X.call(W, null) ? r(A.Fragment, { children: [r(
|
|
3178
|
-
},
|
|
3177
|
+
}), deletableSessionIDs: (I = (T = (j = E.actions).session_delete) === null || T === void 0 ? void 0 : T.call(j, null).inputs.session_id.allowed_values) === null || I === void 0 ? void 0 : I.map((R) => R.value) }) })] }) : null, !((X = (W = E.actions).account_delete) === null || X === void 0) && X.call(W, null) ? r(A.Fragment, { children: [r(On, {}), r(q, { children: r(go, {}) }), r(q, { children: r(ne, Object.assign({ onSubmit: (R) => (R.preventDefault(), H(r(Ar, { onBack: st, onAccountDelete: Kt })), Promise.resolve()) }, { children: r(te, Object.assign({ dangerous: !0 }, { children: G("headlines.deleteAccount") })) })) })] }) : null] });
|
|
3178
|
+
}, Er = ji, Qo = ({ state: n, error: e }) => {
|
|
3179
3179
|
const { t } = (0, _.useContext)(Z.TranslateContext), { init: o, componentName: i } = (0, _.useContext)(ue), s = (0, _.useCallback)(() => o(i), [i, o]);
|
|
3180
3180
|
return (0, _.useEffect)(() => (addEventListener("hankoAuthSuccess", s), () => {
|
|
3181
3181
|
removeEventListener("hankoAuthSuccess", s);
|
|
@@ -3183,7 +3183,7 @@ const Li = (n) => {
|
|
|
3183
3183
|
a.preventDefault(), s();
|
|
3184
3184
|
} }, { children: r(te, Object.assign({ uiAction: "retry" }, { children: t("labels.continue") })) }))] });
|
|
3185
3185
|
};
|
|
3186
|
-
var
|
|
3186
|
+
var Rn = function(n, e, t, o) {
|
|
3187
3187
|
return new (t || (t = Promise))(function(i, s) {
|
|
3188
3188
|
function a(l) {
|
|
3189
3189
|
try {
|
|
@@ -3208,22 +3208,22 @@ var Wn = function(n, e, t, o) {
|
|
|
3208
3208
|
d((o = o.apply(n, [])).next());
|
|
3209
3209
|
});
|
|
3210
3210
|
};
|
|
3211
|
-
const
|
|
3211
|
+
const Ir = (n) => {
|
|
3212
3212
|
var e, t, o, i;
|
|
3213
3213
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, stateHandler: c, setLoadingAction: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state), [u, h] = (0, _.useState)();
|
|
3214
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.createEmail") }), r(Pe, { state: l }), r(ne, Object.assign({ onSubmit: (g) =>
|
|
3214
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.createEmail") }), r(Pe, { state: l }), r(ne, Object.assign({ onSubmit: (g) => Rn(void 0, void 0, void 0, function* () {
|
|
3215
3215
|
g.preventDefault(), d("email-submit");
|
|
3216
3216
|
const f = yield l.actions.email_address_set({ email: u }).run();
|
|
3217
3217
|
d(null), yield a.flow.run(f, c);
|
|
3218
|
-
}) }, { children: [r(Be, { type: "email", autoComplete: "email", autoCorrect: "off", flowInput: (t = (e = l.actions).email_address_set) === null || t === void 0 ? void 0 : t.call(e, null).inputs.email, onInput: (g) =>
|
|
3218
|
+
}) }, { children: [r(Be, { type: "email", autoComplete: "email", autoCorrect: "off", flowInput: (t = (e = l.actions).email_address_set) === null || t === void 0 ? void 0 : t.call(e, null).inputs.email, onInput: (g) => Rn(void 0, void 0, void 0, function* () {
|
|
3219
3219
|
g.target instanceof HTMLInputElement && h(g.target.value);
|
|
3220
|
-
}), placeholder: s("labels.email"), pattern: "^.*[^0-9]+$", value: u }), r(te, Object.assign({ uiAction: "email-submit" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "skip", onClick: (g) =>
|
|
3220
|
+
}), placeholder: s("labels.email"), pattern: "^.*[^0-9]+$", value: u }), r(te, Object.assign({ uiAction: "email-submit" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "skip", onClick: (g) => Rn(void 0, void 0, void 0, function* () {
|
|
3221
3221
|
g.preventDefault(), d("skip");
|
|
3222
3222
|
const f = yield l.actions.skip(null).run();
|
|
3223
3223
|
d(null), yield a.flow.run(f, c);
|
|
3224
3224
|
}), loadingSpinnerPosition: "left" }, { children: s("labels.skip") }))] }))] });
|
|
3225
3225
|
};
|
|
3226
|
-
var
|
|
3226
|
+
var Wn = function(n, e, t, o) {
|
|
3227
3227
|
return new (t || (t = Promise))(function(i, s) {
|
|
3228
3228
|
function a(l) {
|
|
3229
3229
|
try {
|
|
@@ -3248,16 +3248,16 @@ var zn = function(n, e, t, o) {
|
|
|
3248
3248
|
d((o = o.apply(n, [])).next());
|
|
3249
3249
|
});
|
|
3250
3250
|
};
|
|
3251
|
-
const
|
|
3251
|
+
const jr = (n) => {
|
|
3252
3252
|
var e, t, o, i;
|
|
3253
3253
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, stateHandler: c, setLoadingAction: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state), [u, h] = (0, _.useState)();
|
|
3254
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.createUsername") }), r(Pe, { state: l }), r(ne, Object.assign({ onSubmit: (g) =>
|
|
3254
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.createUsername") }), r(Pe, { state: l }), r(ne, Object.assign({ onSubmit: (g) => Wn(void 0, void 0, void 0, function* () {
|
|
3255
3255
|
g.preventDefault(), d("username-set");
|
|
3256
3256
|
const f = yield l.actions.username_create({ username: u }).run();
|
|
3257
3257
|
d(null), yield a.flow.run(f, c);
|
|
3258
|
-
}) }, { children: [r(Be, { type: "text", autoComplete: "username", autoCorrect: "off", flowInput: (t = (e = l.actions).username_create) === null || t === void 0 ? void 0 : t.call(e, null).inputs.username, onInput: (g) =>
|
|
3258
|
+
}) }, { children: [r(Be, { type: "text", autoComplete: "username", autoCorrect: "off", flowInput: (t = (e = l.actions).username_create) === null || t === void 0 ? void 0 : t.call(e, null).inputs.username, onInput: (g) => Wn(void 0, void 0, void 0, function* () {
|
|
3259
3259
|
g.target instanceof HTMLInputElement && h(g.target.value);
|
|
3260
|
-
}), value: u, placeholder: s("labels.username") }), r(te, Object.assign({ uiAction: "username-set" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "skip", onClick: (g) =>
|
|
3260
|
+
}), value: u, placeholder: s("labels.username") }), r(te, Object.assign({ uiAction: "username-set" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(ee, Object.assign({ uiAction: "skip", onClick: (g) => Wn(void 0, void 0, void 0, function* () {
|
|
3261
3261
|
g.preventDefault(), d("skip");
|
|
3262
3262
|
const f = yield l.actions.skip(null).run();
|
|
3263
3263
|
d(null), yield a.flow.run(f, c);
|
|
@@ -3288,28 +3288,28 @@ var Xt = function(n, e, t, o) {
|
|
|
3288
3288
|
d((o = o.apply(n, [])).next());
|
|
3289
3289
|
});
|
|
3290
3290
|
};
|
|
3291
|
-
const
|
|
3291
|
+
const Dr = (n) => {
|
|
3292
3292
|
var e, t, o, i, s, a, c, d, l, u, h, g;
|
|
3293
|
-
const { t: f } = (0, _.useContext)(Z.TranslateContext), { hanko:
|
|
3294
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: f("headlines.setupLoginMethod") }), r(Pe, { flowError:
|
|
3293
|
+
const { t: f } = (0, _.useContext)(Z.TranslateContext), { hanko: S, setLoadingAction: O, stateHandler: C } = (0, _.useContext)(ue), { flowState: x } = Ne(n.state);
|
|
3294
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: f("headlines.setupLoginMethod") }), r(Pe, { flowError: x == null ? void 0 : x.error }), r(q, { children: f("texts.selectLoginMethodForFutureLogins") }), r(ne, Object.assign({ hidden: !(!((t = (e = x.actions).continue_to_passkey_registration) === null || t === void 0) && t.call(e, null)), onSubmit: (P) => Xt(void 0, void 0, void 0, function* () {
|
|
3295
3295
|
P.preventDefault(), O("passkey-submit");
|
|
3296
|
-
const D = yield
|
|
3297
|
-
O(null), yield
|
|
3298
|
-
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: f("labels.passkey") })) })), r(ne, Object.assign({ hidden: !(!((i = (o =
|
|
3296
|
+
const D = yield x.actions.continue_to_passkey_registration(null).run();
|
|
3297
|
+
O(null), yield S.flow.run(D, C);
|
|
3298
|
+
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: f("labels.passkey") })) })), r(ne, Object.assign({ hidden: !(!((i = (o = x.actions).continue_to_password_registration) === null || i === void 0) && i.call(o, null)), onSubmit: (P) => Xt(void 0, void 0, void 0, function* () {
|
|
3299
3299
|
P.preventDefault(), O("password-submit");
|
|
3300
|
-
const D = yield
|
|
3301
|
-
O(null), yield
|
|
3302
|
-
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: f("labels.password") })) }))] }), r(Ue, Object.assign({ hidden: !(!((a = (s =
|
|
3300
|
+
const D = yield x.actions.continue_to_password_registration(null).run();
|
|
3301
|
+
O(null), yield S.flow.run(D, C);
|
|
3302
|
+
}) }, { children: r(te, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: f("labels.password") })) }))] }), r(Ue, Object.assign({ hidden: !(!((a = (s = x.actions).back) === null || a === void 0) && a.call(s, null)) && !(!((d = (c = x.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (P) => Xt(void 0, void 0, void 0, function* () {
|
|
3303
3303
|
P.preventDefault(), O("back");
|
|
3304
|
-
const D = yield
|
|
3305
|
-
O(null), yield
|
|
3306
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((u = (l =
|
|
3304
|
+
const D = yield x.actions.back(null).run();
|
|
3305
|
+
O(null), yield S.flow.run(D, C);
|
|
3306
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((u = (l = x.actions).back) === null || u === void 0) && u.call(l, null)) }, { children: f("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (P) => Xt(void 0, void 0, void 0, function* () {
|
|
3307
3307
|
P.preventDefault(), O("skip");
|
|
3308
|
-
const D = yield
|
|
3309
|
-
O(null), yield
|
|
3310
|
-
}), loadingSpinnerPosition: "left", hidden: !(!((g = (h =
|
|
3308
|
+
const D = yield x.actions.skip(null).run();
|
|
3309
|
+
O(null), yield S.flow.run(D, C);
|
|
3310
|
+
}), loadingSpinnerPosition: "left", hidden: !(!((g = (h = x.actions).skip) === null || g === void 0) && g.call(h, null)) }, { children: f("labels.skip") }))] }))] });
|
|
3311
3311
|
};
|
|
3312
|
-
var
|
|
3312
|
+
var zn = function(n, e, t, o) {
|
|
3313
3313
|
return new (t || (t = Promise))(function(i, s) {
|
|
3314
3314
|
function a(l) {
|
|
3315
3315
|
try {
|
|
@@ -3334,27 +3334,27 @@ var qn = function(n, e, t, o) {
|
|
|
3334
3334
|
d((o = o.apply(n, [])).next());
|
|
3335
3335
|
});
|
|
3336
3336
|
};
|
|
3337
|
-
const
|
|
3337
|
+
const $r = (n) => {
|
|
3338
3338
|
var e, t, o, i;
|
|
3339
|
-
const { t: s } = (0, _.useContext)(Z.TranslateContext), { flowState: a } = Ne(n.state), { hanko: c, setLoadingAction: d, stateHandler: l } = (0, _.useContext)(ue), [u, h] = (0, _.useState)([]), g = (0, _.useCallback)((f) =>
|
|
3339
|
+
const { t: s } = (0, _.useContext)(Z.TranslateContext), { flowState: a } = Ne(n.state), { hanko: c, setLoadingAction: d, stateHandler: l } = (0, _.useContext)(ue), [u, h] = (0, _.useState)([]), g = (0, _.useCallback)((f) => zn(void 0, void 0, void 0, function* () {
|
|
3340
3340
|
d("passcode-submit");
|
|
3341
|
-
const
|
|
3342
|
-
d(null), yield c.flow.run(
|
|
3341
|
+
const S = yield a.actions.otp_code_validate({ otp_code: f }).run();
|
|
3342
|
+
d(null), yield c.flow.run(S, l);
|
|
3343
3343
|
}), [c, a, d, l]);
|
|
3344
3344
|
return (0, _.useEffect)(() => {
|
|
3345
3345
|
var f;
|
|
3346
3346
|
((f = a.error) === null || f === void 0 ? void 0 : f.code) === "passcode_invalid" && h([]);
|
|
3347
|
-
}, [a]), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.otpLogin") }), r(Pe, { state: a }), r(q, { children: s("texts.otpLogin") }), r(ne, Object.assign({ onSubmit: (f) =>
|
|
3347
|
+
}, [a]), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.otpLogin") }), r(Pe, { state: a }), r(q, { children: s("texts.otpLogin") }), r(ne, Object.assign({ onSubmit: (f) => zn(void 0, void 0, void 0, function* () {
|
|
3348
3348
|
return f.preventDefault(), g(u.join(""));
|
|
3349
|
-
}) }, { children: [r(
|
|
3350
|
-
if (h(f), f.filter((
|
|
3351
|
-
}, passcodeDigits: u, numberOfInputs: 6 }), r(te, Object.assign({ uiAction: "passcode-submit" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = a.actions).continue_to_login_security_key) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "skip", onClick: (f) =>
|
|
3349
|
+
}) }, { children: [r(_o, { onInput: (f) => {
|
|
3350
|
+
if (h(f), f.filter((S) => S !== "").length === 6) return g(f.join(""));
|
|
3351
|
+
}, passcodeDigits: u, numberOfInputs: 6 }), r(te, Object.assign({ uiAction: "passcode-submit" }, { children: s("labels.continue") }))] }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = a.actions).continue_to_login_security_key) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "skip", onClick: (f) => zn(void 0, void 0, void 0, function* () {
|
|
3352
3352
|
f.preventDefault(), d("skip");
|
|
3353
|
-
const
|
|
3354
|
-
d(null), yield c.flow.run(
|
|
3353
|
+
const S = yield a.actions.continue_to_login_security_key(null).run();
|
|
3354
|
+
d(null), yield c.flow.run(S, l);
|
|
3355
3355
|
}), loadingSpinnerPosition: "right", hidden: !(!((i = (o = a.actions).continue_to_login_security_key) === null || i === void 0) && i.call(o, null)) }, { children: s("labels.useAnotherMethod") })) }))] });
|
|
3356
3356
|
};
|
|
3357
|
-
var
|
|
3357
|
+
var Go = function(n, e, t, o) {
|
|
3358
3358
|
return new (t || (t = Promise))(function(i, s) {
|
|
3359
3359
|
function a(l) {
|
|
3360
3360
|
try {
|
|
@@ -3379,14 +3379,14 @@ var Xo = function(n, e, t, o) {
|
|
|
3379
3379
|
d((o = o.apply(n, [])).next());
|
|
3380
3380
|
});
|
|
3381
3381
|
};
|
|
3382
|
-
const
|
|
3382
|
+
const Lr = (n) => {
|
|
3383
3383
|
var e, t, o, i;
|
|
3384
3384
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, setLoadingAction: c, stateHandler: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state);
|
|
3385
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.securityKeyLogin") }), r(Pe, { state: l }), r(q, { children: s("texts.securityKeyLogin") }), r(ne, Object.assign({ onSubmit: (u) =>
|
|
3385
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.securityKeyLogin") }), r(Pe, { state: l }), r(q, { children: s("texts.securityKeyLogin") }), r(ne, Object.assign({ onSubmit: (u) => Go(void 0, void 0, void 0, function* () {
|
|
3386
3386
|
u.preventDefault(), c("passkey-submit");
|
|
3387
3387
|
const h = yield l.actions.webauthn_generate_request_options(null).run();
|
|
3388
3388
|
yield a.flow.run(h, d);
|
|
3389
|
-
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: s("labels.securityKeyUse") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = l.actions).continue_to_login_otp) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "skip", onClick: (u) =>
|
|
3389
|
+
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: s("labels.securityKeyUse") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = l.actions).continue_to_login_otp) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "skip", onClick: (u) => Go(void 0, void 0, void 0, function* () {
|
|
3390
3390
|
u.preventDefault(), c("skip");
|
|
3391
3391
|
const h = yield l.actions.continue_to_login_otp(null).run();
|
|
3392
3392
|
c(null), yield a.flow.run(h, d);
|
|
@@ -3417,35 +3417,35 @@ var en = function(n, e, t, o) {
|
|
|
3417
3417
|
d((o = o.apply(n, [])).next());
|
|
3418
3418
|
});
|
|
3419
3419
|
};
|
|
3420
|
-
const
|
|
3420
|
+
const Tr = (n) => {
|
|
3421
3421
|
var e, t, o, i, s, a, c, d;
|
|
3422
|
-
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, setLoadingAction: h, stateHandler: g } = (0, _.useContext)(ue), { flowState: f } = Ne(n.state),
|
|
3423
|
-
|
|
3422
|
+
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, setLoadingAction: h, stateHandler: g } = (0, _.useContext)(ue), { flowState: f } = Ne(n.state), S = (x) => en(void 0, void 0, void 0, function* () {
|
|
3423
|
+
x.preventDefault(), h("passcode-submit");
|
|
3424
3424
|
const P = yield f.actions.continue_to_security_key_creation(null).run();
|
|
3425
3425
|
h(null), yield u.flow.run(P, g);
|
|
3426
|
-
}), O = (
|
|
3427
|
-
|
|
3426
|
+
}), O = (x) => en(void 0, void 0, void 0, function* () {
|
|
3427
|
+
x.preventDefault(), h("password-submit");
|
|
3428
3428
|
const P = yield f.actions.continue_to_otp_secret_creation(null).run();
|
|
3429
3429
|
h(null), yield u.flow.run(P, g);
|
|
3430
3430
|
}), C = (0, _.useMemo)(() => {
|
|
3431
|
-
const { actions:
|
|
3432
|
-
return
|
|
3433
|
-
}, [f,
|
|
3434
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: l("headlines.mfaSetUp") }), r(Pe, { flowError: f == null ? void 0 : f.error }), r(q, { children: l("texts.mfaSetUp") }), C ? r(ne, Object.assign({ onSubmit: C }, { children: r(te, Object.assign({ uiAction: "passcode-submit" }, { children: l("labels.continue") })) })) : r(A.Fragment, { children: [r(ne, Object.assign({ hidden: !(!((t = (e = f.actions).continue_to_security_key_creation) === null || t === void 0) && t.call(e, null)), onSubmit:
|
|
3435
|
-
|
|
3431
|
+
const { actions: x } = f;
|
|
3432
|
+
return x.continue_to_security_key_creation && !x.continue_to_otp_secret_creation ? S : !x.continue_to_security_key_creation && x.continue_to_otp_secret_creation ? O : void 0;
|
|
3433
|
+
}, [f, S, O]);
|
|
3434
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: l("headlines.mfaSetUp") }), r(Pe, { flowError: f == null ? void 0 : f.error }), r(q, { children: l("texts.mfaSetUp") }), C ? r(ne, Object.assign({ onSubmit: C }, { children: r(te, Object.assign({ uiAction: "passcode-submit" }, { children: l("labels.continue") })) })) : r(A.Fragment, { children: [r(ne, Object.assign({ hidden: !(!((t = (e = f.actions).continue_to_security_key_creation) === null || t === void 0) && t.call(e, null)), onSubmit: S }, { children: r(te, Object.assign({ secondary: !0, uiAction: "passcode-submit", icon: "securityKey" }, { children: l("labels.securityKey") })) })), r(ne, Object.assign({ hidden: !(!((i = (o = f.actions).continue_to_otp_secret_creation) === null || i === void 0) && i.call(o, null)), onSubmit: O }, { children: r(te, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "qrCodeScanner" }, { children: l("labels.authenticatorApp") })) }))] })] }), r(Ue, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (x) => en(void 0, void 0, void 0, function* () {
|
|
3435
|
+
x.preventDefault(), h("back");
|
|
3436
3436
|
const P = yield f.actions.back(null).run();
|
|
3437
3437
|
h(null), yield u.flow.run(P, g);
|
|
3438
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((a = (s = f.actions).back) === null || a === void 0) && a.call(s, null)) }, { children: l("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (
|
|
3439
|
-
|
|
3438
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((a = (s = f.actions).back) === null || a === void 0) && a.call(s, null)) }, { children: l("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (x) => en(void 0, void 0, void 0, function* () {
|
|
3439
|
+
x.preventDefault(), h("skip");
|
|
3440
3440
|
const P = yield f.actions.skip(null).run();
|
|
3441
3441
|
h(null), yield u.flow.run(P, g);
|
|
3442
3442
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = f.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] })] });
|
|
3443
3443
|
};
|
|
3444
|
-
var
|
|
3444
|
+
var fn = Y(560), Dt = {};
|
|
3445
3445
|
Dt.setAttributes = tt(), Dt.insert = (n) => {
|
|
3446
3446
|
window._hankoStyle = n;
|
|
3447
|
-
}, Dt.domAPI = et(), Dt.insertStyleElement = nt(), Xe()(
|
|
3448
|
-
const
|
|
3447
|
+
}, Dt.domAPI = et(), Dt.insertStyleElement = nt(), Xe()(fn.A, Dt);
|
|
3448
|
+
const Nr = fn.A && fn.A.locals ? fn.A.locals : void 0, Ur = ({ children: n, text: e }) => {
|
|
3449
3449
|
const { t } = (0, _.useContext)(Z.TranslateContext), [o, i] = (0, _.useState)(!1);
|
|
3450
3450
|
return r("section", Object.assign({ className: Rt.clipboardContainer }, { children: [r("div", { children: [n, " "] }), r("div", Object.assign({ className: Rt.clipboardIcon, onClick: (s) => {
|
|
3451
3451
|
return a = void 0, c = void 0, l = function* () {
|
|
@@ -3458,33 +3458,33 @@ const qr = mn.A && mn.A.locals ? mn.A.locals : void 0, Fr = ({ children: n, text
|
|
|
3458
3458
|
}, new ((d = void 0) || (d = Promise))(function(u, h) {
|
|
3459
3459
|
function g(O) {
|
|
3460
3460
|
try {
|
|
3461
|
-
|
|
3461
|
+
S(l.next(O));
|
|
3462
3462
|
} catch (C) {
|
|
3463
3463
|
h(C);
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
3466
|
function f(O) {
|
|
3467
3467
|
try {
|
|
3468
|
-
|
|
3468
|
+
S(l.throw(O));
|
|
3469
3469
|
} catch (C) {
|
|
3470
3470
|
h(C);
|
|
3471
3471
|
}
|
|
3472
3472
|
}
|
|
3473
|
-
function
|
|
3473
|
+
function S(O) {
|
|
3474
3474
|
var C;
|
|
3475
|
-
O.done ? u(O.value) : (C = O.value, C instanceof d ? C : new d(function(
|
|
3476
|
-
|
|
3475
|
+
O.done ? u(O.value) : (C = O.value, C instanceof d ? C : new d(function(x) {
|
|
3476
|
+
x(C);
|
|
3477
3477
|
})).then(g, f);
|
|
3478
3478
|
}
|
|
3479
|
-
|
|
3479
|
+
S((l = l.apply(a, c || [])).next());
|
|
3480
3480
|
});
|
|
3481
3481
|
var a, c, d, l;
|
|
3482
3482
|
} }, { children: o ? r("span", { children: ["- ", t("labels.copied")] }) : r(Wt, { name: "copy", secondary: !0, size: 13 }) }))] }));
|
|
3483
|
-
},
|
|
3483
|
+
}, Mr = ({ src: n, secret: e }) => {
|
|
3484
3484
|
const { t } = (0, _.useContext)(Z.TranslateContext);
|
|
3485
|
-
return r("div", Object.assign({ className:
|
|
3485
|
+
return r("div", Object.assign({ className: Nr.otpCreationDetails }, { children: [r("img", { alt: "QR-Code", src: n }), r(On, {}), r(Ur, Object.assign({ text: e }, { children: t("texts.otpSecretKey") })), r("div", { children: e })] }));
|
|
3486
3486
|
};
|
|
3487
|
-
var
|
|
3487
|
+
var qn = function(n, e, t, o) {
|
|
3488
3488
|
return new (t || (t = Promise))(function(i, s) {
|
|
3489
3489
|
function a(l) {
|
|
3490
3490
|
try {
|
|
@@ -3509,8 +3509,8 @@ var Fn = function(n, e, t, o) {
|
|
|
3509
3509
|
d((o = o.apply(n, [])).next());
|
|
3510
3510
|
});
|
|
3511
3511
|
};
|
|
3512
|
-
const
|
|
3513
|
-
const { t: e } = (0, _.useContext)(Z.TranslateContext), { flowState: t } = Ne(n.state), { hanko: o, uiState: i, setLoadingAction: s, stateHandler: a } = (0, _.useContext)(ue), [c, d] = (0, _.useState)([]), l = (0, _.useCallback)((u) =>
|
|
3512
|
+
const Hr = (n) => {
|
|
3513
|
+
const { t: e } = (0, _.useContext)(Z.TranslateContext), { flowState: t } = Ne(n.state), { hanko: o, uiState: i, setLoadingAction: s, stateHandler: a } = (0, _.useContext)(ue), [c, d] = (0, _.useState)([]), l = (0, _.useCallback)((u) => qn(void 0, void 0, void 0, function* () {
|
|
3514
3514
|
s("passcode-submit");
|
|
3515
3515
|
const h = yield t.actions.otp_code_verify({ otp_code: u }).run();
|
|
3516
3516
|
s(null), yield o.flow.run(h, a);
|
|
@@ -3518,17 +3518,17 @@ const Br = (n) => {
|
|
|
3518
3518
|
return (0, _.useEffect)(() => {
|
|
3519
3519
|
var u;
|
|
3520
3520
|
((u = t.error) === null || u === void 0 ? void 0 : u.code) === "passcode_invalid" && d([]);
|
|
3521
|
-
}, [t]), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: e("headlines.otpSetUp") }), r(Pe, { state: t }), r(q, { children: e("texts.otpScanQRCode") }), r(
|
|
3521
|
+
}, [t]), r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: e("headlines.otpSetUp") }), r(Pe, { state: t }), r(q, { children: e("texts.otpScanQRCode") }), r(Mr, { src: t.payload.otp_image_source, secret: t.payload.otp_secret }), r(q, { children: e("texts.otpEnterVerificationCode") }), r(ne, Object.assign({ onSubmit: (u) => qn(void 0, void 0, void 0, function* () {
|
|
3522
3522
|
return u.preventDefault(), l(c.join(""));
|
|
3523
|
-
}) }, { children: [r(
|
|
3523
|
+
}) }, { children: [r(_o, { onInput: (u) => {
|
|
3524
3524
|
if (d(u), u.filter((h) => h !== "").length === 6) return l(u.join(""));
|
|
3525
|
-
}, passcodeDigits: c, numberOfInputs: 6 }), r(te, Object.assign({ uiAction: "passcode-submit" }, { children: e("labels.continue") }))] }))] }), r(Ue, { children: r(ee, Object.assign({ onClick: (u) =>
|
|
3525
|
+
}, passcodeDigits: c, numberOfInputs: 6 }), r(te, Object.assign({ uiAction: "passcode-submit" }, { children: e("labels.continue") }))] }))] }), r(Ue, { children: r(ee, Object.assign({ onClick: (u) => qn(void 0, void 0, void 0, function* () {
|
|
3526
3526
|
u.preventDefault(), s("back");
|
|
3527
3527
|
const h = yield t.actions.back(null).run();
|
|
3528
3528
|
s(null), yield o.flow.run(h, a);
|
|
3529
3529
|
}), loadingSpinnerPosition: "right", isLoading: i.loadingAction === "back" }, { children: e("labels.back") })) })] });
|
|
3530
3530
|
};
|
|
3531
|
-
var
|
|
3531
|
+
var Yo = function(n, e, t, o) {
|
|
3532
3532
|
return new (t || (t = Promise))(function(i, s) {
|
|
3533
3533
|
function a(l) {
|
|
3534
3534
|
try {
|
|
@@ -3553,20 +3553,20 @@ var ei = function(n, e, t, o) {
|
|
|
3553
3553
|
d((o = o.apply(n, [])).next());
|
|
3554
3554
|
});
|
|
3555
3555
|
};
|
|
3556
|
-
const
|
|
3556
|
+
const Rr = (n) => {
|
|
3557
3557
|
var e, t, o, i;
|
|
3558
3558
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, setLoadingAction: c, stateHandler: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state);
|
|
3559
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.securityKeySetUp") }), r(Pe, { state: l }), r(q, { children: s("texts.securityKeySetUp") }), r(ne, Object.assign({ onSubmit: (u) =>
|
|
3559
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.securityKeySetUp") }), r(Pe, { state: l }), r(q, { children: s("texts.securityKeySetUp") }), r(ne, Object.assign({ onSubmit: (u) => Yo(void 0, void 0, void 0, function* () {
|
|
3560
3560
|
u.preventDefault(), c("passkey-submit");
|
|
3561
3561
|
const h = yield l.actions.webauthn_generate_creation_options(null).run();
|
|
3562
3562
|
yield a.flow.run(h, d);
|
|
3563
|
-
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: s("labels.createSecurityKey") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "back", onClick: (u) =>
|
|
3563
|
+
}) }, { children: r(te, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: s("labels.createSecurityKey") })) }))] }), r(Ue, Object.assign({ hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: r(ee, Object.assign({ uiAction: "back", onClick: (u) => Yo(void 0, void 0, void 0, function* () {
|
|
3564
3564
|
u.preventDefault(), c("back");
|
|
3565
3565
|
const h = yield l.actions.back(null).run();
|
|
3566
3566
|
c(null), yield a.flow.run(h, d);
|
|
3567
3567
|
}), loadingSpinnerPosition: "right", hidden: !(!((i = (o = l.actions).back) === null || i === void 0) && i.call(o, null)) }, { children: s("labels.back") })) }))] });
|
|
3568
3568
|
};
|
|
3569
|
-
var
|
|
3569
|
+
var Fn = function(n, e, t, o) {
|
|
3570
3570
|
return new (t || (t = Promise))(function(i, s) {
|
|
3571
3571
|
function a(l) {
|
|
3572
3572
|
try {
|
|
@@ -3591,18 +3591,18 @@ var Kn = function(n, e, t, o) {
|
|
|
3591
3591
|
d((o = o.apply(n, [])).next());
|
|
3592
3592
|
});
|
|
3593
3593
|
};
|
|
3594
|
-
const
|
|
3594
|
+
const Wr = (n) => {
|
|
3595
3595
|
var e, t, o, i;
|
|
3596
3596
|
const { t: s } = (0, _.useContext)(Z.TranslateContext), { hanko: a, setLoadingAction: c, stateHandler: d } = (0, _.useContext)(ue), { flowState: l } = Ne(n.state);
|
|
3597
|
-
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.trustDevice") }), r(Pe, { flowError: l == null ? void 0 : l.error }), r(q, { children: s("texts.trustDevice") }), r(ne, Object.assign({ onSubmit: (u) =>
|
|
3597
|
+
return r(A.Fragment, { children: [r(Oe, { children: [r(de, { children: s("headlines.trustDevice") }), r(Pe, { flowError: l == null ? void 0 : l.error }), r(q, { children: s("texts.trustDevice") }), r(ne, Object.assign({ onSubmit: (u) => Fn(void 0, void 0, void 0, function* () {
|
|
3598
3598
|
u.preventDefault(), c("trust-device-submit");
|
|
3599
3599
|
const h = yield l.actions.trust_device(null).run();
|
|
3600
3600
|
c(null), yield a.flow.run(h, d);
|
|
3601
|
-
}) }, { children: r(te, Object.assign({ uiAction: "trust-device-submit" }, { children: s("labels.trustDevice") })) }))] }), r(Ue, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (u) =>
|
|
3601
|
+
}) }, { children: r(te, Object.assign({ uiAction: "trust-device-submit" }, { children: s("labels.trustDevice") })) }))] }), r(Ue, { children: [r(ee, Object.assign({ uiAction: "back", onClick: (u) => Fn(void 0, void 0, void 0, function* () {
|
|
3602
3602
|
u.preventDefault(), c("back");
|
|
3603
3603
|
const h = yield l.actions.back(null).run();
|
|
3604
3604
|
c(null), yield a.flow.run(h, d);
|
|
3605
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: s("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (u) =>
|
|
3605
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: s("labels.back") })), r(ee, Object.assign({ uiAction: "skip", onClick: (u) => Fn(void 0, void 0, void 0, function* () {
|
|
3606
3606
|
u.preventDefault(), c("skip");
|
|
3607
3607
|
const h = yield l.actions.skip(null).run();
|
|
3608
3608
|
c(null), yield a.flow.run(h, d);
|
|
@@ -3633,7 +3633,7 @@ var Ke = function(n, e, t, o) {
|
|
|
3633
3633
|
d((o = o.apply(n, [])).next());
|
|
3634
3634
|
});
|
|
3635
3635
|
};
|
|
3636
|
-
const tn = "flow-state", ue = (0, A.createContext)(null),
|
|
3636
|
+
const tn = "flow-state", ue = (0, A.createContext)(null), zr = (n) => {
|
|
3637
3637
|
var { lang: e, experimental: t = "", prefilledEmail: o, prefilledUsername: i, globalOptions: s, createWebauthnAbortSignal: a } = n, c = function(p, y) {
|
|
3638
3638
|
var L = {};
|
|
3639
3639
|
for (var K in p) Object.prototype.hasOwnProperty.call(p, K) && y.indexOf(K) < 0 && (L[K] = p[K]);
|
|
@@ -3645,17 +3645,17 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3645
3645
|
}(n, ["lang", "experimental", "prefilledEmail", "prefilledUsername", "globalOptions", "createWebauthnAbortSignal"]);
|
|
3646
3646
|
const { hanko: d, injectStyles: l, hidePasskeyButtonOnLogin: u, translations: h, translationsLocation: g, fallbackLanguage: f } = s;
|
|
3647
3647
|
d.setLang((e == null ? void 0 : e.toString()) || f);
|
|
3648
|
-
const
|
|
3648
|
+
const S = (0, _.useRef)(null), O = (0, _.useMemo)(() => `${s.storageKey}_last_login`, [s.storageKey]), [C, x] = (0, _.useState)(c.componentName), P = (0, _.useMemo)(() => t.split(" ").filter((p) => p.length).map((p) => p), [t]), D = (0, _.useMemo)(() => r(ur, {}), []), [N, U] = (0, _.useState)(D), [, ie] = (0, _.useState)(d), [be, se] = (0, _.useState)(), [we, M] = (0, _.useState)({ email: o, username: i }), z = (0, _.useCallback)((p) => {
|
|
3649
3649
|
M((y) => Object.assign(Object.assign({}, y), { loadingAction: p, succeededAction: null, error: null, lastAction: p || y.lastAction }));
|
|
3650
|
-
}, []),
|
|
3650
|
+
}, []), ve = (0, _.useCallback)((p) => {
|
|
3651
3651
|
M((y) => Object.assign(Object.assign({}, y), { succeededAction: p, loadingAction: null }));
|
|
3652
3652
|
}, []), $e = (0, _.useCallback)(() => {
|
|
3653
3653
|
M((p) => Object.assign(Object.assign({}, p), { succeededAction: p.lastAction, loadingAction: null, error: null }));
|
|
3654
3654
|
}, []), Ee = (0, _.useMemo)(() => !!we.loadingAction || !!we.succeededAction, [we]), Le = function(p, y) {
|
|
3655
3655
|
var L;
|
|
3656
|
-
(L =
|
|
3656
|
+
(L = S.current) === null || L === void 0 || L.dispatchEvent(new CustomEvent(p, { detail: y, bubbles: !1, composed: !0 }));
|
|
3657
3657
|
}, re = (p) => {
|
|
3658
|
-
z(null), U(r(
|
|
3658
|
+
z(null), U(r(Qo, { error: p instanceof Ce ? p : new De(p) }));
|
|
3659
3659
|
}, ae = (0, _.useMemo)(() => ({ onError: (p) => {
|
|
3660
3660
|
re(p);
|
|
3661
3661
|
}, preflight(p) {
|
|
@@ -3665,12 +3665,12 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3665
3665
|
});
|
|
3666
3666
|
}, login_init(p) {
|
|
3667
3667
|
return Ke(this, void 0, void 0, function* () {
|
|
3668
|
-
U(r(
|
|
3668
|
+
U(r(pr, { state: p })), function() {
|
|
3669
3669
|
Ke(this, void 0, void 0, function* () {
|
|
3670
3670
|
if (p.payload.request_options) {
|
|
3671
3671
|
let y;
|
|
3672
3672
|
try {
|
|
3673
|
-
y = yield
|
|
3673
|
+
y = yield qo({ publicKey: p.payload.request_options.publicKey, mediation: "conditional", signal: a() });
|
|
3674
3674
|
} catch {
|
|
3675
3675
|
return;
|
|
3676
3676
|
}
|
|
@@ -3682,17 +3682,17 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3682
3682
|
}();
|
|
3683
3683
|
});
|
|
3684
3684
|
}, passcode_confirmation(p) {
|
|
3685
|
-
U(r(
|
|
3685
|
+
U(r(gr, { state: p }));
|
|
3686
3686
|
}, login_otp(p) {
|
|
3687
3687
|
return Ke(this, void 0, void 0, function* () {
|
|
3688
|
-
U(r(
|
|
3688
|
+
U(r($r, { state: p }));
|
|
3689
3689
|
});
|
|
3690
3690
|
}, login_passkey(p) {
|
|
3691
3691
|
return Ke(this, void 0, void 0, function* () {
|
|
3692
3692
|
let y;
|
|
3693
3693
|
z("passkey-submit");
|
|
3694
3694
|
try {
|
|
3695
|
-
y = yield
|
|
3695
|
+
y = yield qo(Object.assign(Object.assign({}, p.payload.request_options), { signal: a() }));
|
|
3696
3696
|
} catch {
|
|
3697
3697
|
const pe = yield p.actions.back(null).run();
|
|
3698
3698
|
return M((ze) => Object.assign(Object.assign({}, ze), { error: p.error, loadingAction: null })), d.flow.run(pe, ae);
|
|
@@ -3701,12 +3701,12 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3701
3701
|
z(null), yield d.flow.run(L, ae);
|
|
3702
3702
|
});
|
|
3703
3703
|
}, onboarding_create_passkey(p) {
|
|
3704
|
-
U(r(
|
|
3704
|
+
U(r(vr, { state: p }));
|
|
3705
3705
|
}, onboarding_verify_passkey_attestation(p) {
|
|
3706
3706
|
return Ke(this, void 0, void 0, function* () {
|
|
3707
3707
|
let y;
|
|
3708
3708
|
try {
|
|
3709
|
-
y = yield
|
|
3709
|
+
y = yield zo(Object.assign(Object.assign({}, p.payload.creation_options), { signal: a() }));
|
|
3710
3710
|
} catch {
|
|
3711
3711
|
const pe = yield p.actions.back(null).run();
|
|
3712
3712
|
return z(null), yield d.flow.run(pe, ae), void M((ze) => Object.assign(Object.assign({}, ze), { error: { code: "webauthn_credential_already_exists", message: "Webauthn credential already exists" } }));
|
|
@@ -3718,7 +3718,7 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3718
3718
|
return Ke(this, void 0, void 0, function* () {
|
|
3719
3719
|
let y;
|
|
3720
3720
|
try {
|
|
3721
|
-
y = yield
|
|
3721
|
+
y = yield zo(Object.assign(Object.assign({}, p.payload.creation_options), { signal: a() }));
|
|
3722
3722
|
} catch {
|
|
3723
3723
|
const pe = yield p.actions.back(null).run();
|
|
3724
3724
|
return z(null), yield d.flow.run(pe, ae), void M((ze) => Object.assign(Object.assign({}, ze), { error: { code: "webauthn_credential_already_exists", message: "Webauthn credential already exists" } }));
|
|
@@ -3727,38 +3727,38 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3727
3727
|
yield d.flow.run(L, ae);
|
|
3728
3728
|
});
|
|
3729
3729
|
}, login_password(p) {
|
|
3730
|
-
U(r(
|
|
3730
|
+
U(r(_r, { state: p }));
|
|
3731
3731
|
}, login_password_recovery(p) {
|
|
3732
|
-
U(r(
|
|
3732
|
+
U(r(yr, { state: p }));
|
|
3733
3733
|
}, login_security_key(p) {
|
|
3734
3734
|
return Ke(this, void 0, void 0, function* () {
|
|
3735
|
-
U(r(
|
|
3735
|
+
U(r(Lr, { state: p }));
|
|
3736
3736
|
});
|
|
3737
3737
|
}, mfa_method_chooser(p) {
|
|
3738
3738
|
return Ke(this, void 0, void 0, function* () {
|
|
3739
|
-
U(r(
|
|
3739
|
+
U(r(Tr, { state: p }));
|
|
3740
3740
|
});
|
|
3741
3741
|
}, mfa_otp_secret_creation(p) {
|
|
3742
3742
|
return Ke(this, void 0, void 0, function* () {
|
|
3743
|
-
U(r(
|
|
3743
|
+
U(r(Hr, { state: p }));
|
|
3744
3744
|
});
|
|
3745
3745
|
}, mfa_security_key_creation(p) {
|
|
3746
3746
|
return Ke(this, void 0, void 0, function* () {
|
|
3747
|
-
U(r(
|
|
3747
|
+
U(r(Rr, { state: p }));
|
|
3748
3748
|
});
|
|
3749
3749
|
}, login_method_chooser(p) {
|
|
3750
|
-
U(r(
|
|
3750
|
+
U(r(br, { state: p }));
|
|
3751
3751
|
}, registration_init(p) {
|
|
3752
|
-
U(r(
|
|
3752
|
+
U(r(kr, { state: p }));
|
|
3753
3753
|
}, password_creation(p) {
|
|
3754
|
-
U(r(
|
|
3754
|
+
U(r(wr, { state: p }));
|
|
3755
3755
|
}, success(p) {
|
|
3756
3756
|
var y;
|
|
3757
3757
|
!((y = p.payload) === null || y === void 0) && y.last_login && localStorage.setItem(O, JSON.stringify(p.payload.last_login));
|
|
3758
3758
|
const { claims: L } = p.payload, K = Date.parse(L.expiration) - Date.now();
|
|
3759
3759
|
d.relay.dispatchSessionCreatedEvent({ claims: L, expirationSeconds: K }), $e();
|
|
3760
3760
|
}, profile_init(p) {
|
|
3761
|
-
U(r(
|
|
3761
|
+
U(r(Er, { state: p, enablePasskeys: s.enablePasskeys }));
|
|
3762
3762
|
}, thirdparty(p) {
|
|
3763
3763
|
return Ke(this, void 0, void 0, function* () {
|
|
3764
3764
|
const y = new URLSearchParams(window.location.search).get("hanko_token");
|
|
@@ -3768,19 +3768,19 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3768
3768
|
} else M((L) => Object.assign(Object.assign({}, L), { lastAction: null })), localStorage.setItem(tn, JSON.stringify(p.toJSON())), window.location.assign(p.payload.redirect_url);
|
|
3769
3769
|
});
|
|
3770
3770
|
}, error(p) {
|
|
3771
|
-
z(null), U(r(
|
|
3771
|
+
z(null), U(r(Qo, { state: p }));
|
|
3772
3772
|
}, onboarding_email(p) {
|
|
3773
|
-
U(r(
|
|
3773
|
+
U(r(Ir, { state: p }));
|
|
3774
3774
|
}, onboarding_username(p) {
|
|
3775
|
-
U(r(
|
|
3775
|
+
U(r(jr, { state: p }));
|
|
3776
3776
|
}, credential_onboarding_chooser(p) {
|
|
3777
|
-
U(r(
|
|
3777
|
+
U(r(Dr, { state: p }));
|
|
3778
3778
|
}, account_deleted(p) {
|
|
3779
3779
|
return Ke(this, void 0, void 0, function* () {
|
|
3780
3780
|
yield d.user.logout(), d.relay.dispatchUserDeletedEvent();
|
|
3781
3781
|
});
|
|
3782
3782
|
}, device_trust(p) {
|
|
3783
|
-
U(r(
|
|
3783
|
+
U(r(Wr, { state: p }));
|
|
3784
3784
|
} }), [s.enablePasskeys, d, $e, z]), he = (0, _.useCallback)((p) => Ke(void 0, void 0, void 0, function* () {
|
|
3785
3785
|
z("switch-flow");
|
|
3786
3786
|
const y = localStorage.getItem(O);
|
|
@@ -3817,9 +3817,9 @@ const tn = "flow-state", ue = (0, A.createContext)(null), Jr = (n) => {
|
|
|
3817
3817
|
["auth", "login", "registration"].includes(C) ? (d.onUserLoggedOut(p), d.onSessionExpired(p), d.onUserDeleted(p)) : C === "profile" && d.onSessionCreated(p);
|
|
3818
3818
|
}, []);
|
|
3819
3819
|
const k = mt.supported();
|
|
3820
|
-
return r(ue.Provider, Object.assign({ value: { init: Ie, initialComponentName: c.componentName, isDisabled: Ee, setUIState: M, setLoadingAction: z, setSucceededAction:
|
|
3821
|
-
},
|
|
3822
|
-
var
|
|
3820
|
+
return r(ue.Provider, Object.assign({ value: { init: Ie, initialComponentName: c.componentName, isDisabled: Ee, setUIState: M, setLoadingAction: z, setSucceededAction: ve, uiState: we, hanko: d, setHanko: ie, lang: (e == null ? void 0 : e.toString()) || f, prefilledEmail: o, prefilledUsername: i, componentName: C, setComponentName: x, experimentalFeatures: P, hidePasskeyButtonOnLogin: u, page: N, setPage: U, stateHandler: ae, lastLogin: be } }, { children: r(Z.TranslateProvider, Object.assign({ translations: h, fallbackLang: f, root: g }, { children: r(Bs, Object.assign({ ref: S }, { children: C !== "events" ? r(A.Fragment, { children: [l ? r("style", { dangerouslySetInnerHTML: { __html: window._hankoStyle.innerHTML } }) : null, N] }) : null })) })) }));
|
|
3821
|
+
}, qr = { en: Y(6).en };
|
|
3822
|
+
var Di = function(n, e, t, o) {
|
|
3823
3823
|
return new (t || (t = Promise))(function(i, s) {
|
|
3824
3824
|
function a(l) {
|
|
3825
3825
|
try {
|
|
@@ -3844,15 +3844,15 @@ var Ti = function(n, e, t, o) {
|
|
|
3844
3844
|
d((o = o.apply(n, [])).next());
|
|
3845
3845
|
});
|
|
3846
3846
|
};
|
|
3847
|
-
const Ge = {}, Ft = (n, e) => r(
|
|
3847
|
+
const Ge = {}, Ft = (n, e) => r(zr, Object.assign({ componentName: n, globalOptions: Ge, createWebauthnAbortSignal: Jr }, e)), Fr = (n) => Ft("auth", n), Kr = (n) => Ft("login", n), Br = (n) => Ft("registration", n), Vr = (n) => Ft("profile", n), Zr = (n) => Ft("events", n);
|
|
3848
3848
|
let nn = new AbortController();
|
|
3849
|
-
const
|
|
3849
|
+
const Jr = () => (nn && nn.abort(), nn = new AbortController(), nn.signal), $t = ({ tagName: n, entryComponent: e, shadow: t = !0, observedAttributes: o }) => Di(void 0, void 0, void 0, function* () {
|
|
3850
3850
|
customElements.get(n) || function(i, s, a, c) {
|
|
3851
3851
|
function d() {
|
|
3852
3852
|
var l = Reflect.construct(HTMLElement, [], d);
|
|
3853
3853
|
return l._vdomComponent = i, l._root = c && c.shadow ? l.attachShadow({ mode: "open" }) : l, l;
|
|
3854
3854
|
}
|
|
3855
|
-
(d.prototype = Object.create(HTMLElement.prototype)).constructor = d, d.prototype.connectedCallback =
|
|
3855
|
+
(d.prototype = Object.create(HTMLElement.prototype)).constructor = d, d.prototype.connectedCallback = ls, d.prototype.attributeChangedCallback = cs, d.prototype.disconnectedCallback = ds, a = a || i.observedAttributes || Object.keys(i.propTypes || {}), d.observedAttributes = a, a.forEach(function(l) {
|
|
3856
3856
|
Object.defineProperty(d.prototype, l, { get: function() {
|
|
3857
3857
|
var u, h, g, f;
|
|
3858
3858
|
return (u = (h = this._vdom) == null || (g = h.props) == null ? void 0 : g[l]) != null ? u : (f = this._props) == null ? void 0 : f[l];
|
|
@@ -3863,9 +3863,9 @@ const na = () => (nn && nn.abort(), nn = new AbortController(), nn.signal), $t =
|
|
|
3863
3863
|
} });
|
|
3864
3864
|
}), customElements.define(s || i.tagName || i.displayName || i.name, d);
|
|
3865
3865
|
}(e, n, o, { shadow: t });
|
|
3866
|
-
}),
|
|
3866
|
+
}), Qr = (n, e = {}) => Di(void 0, void 0, void 0, function* () {
|
|
3867
3867
|
const t = ["api", "lang", "experimental", "prefilled-email", "entry"];
|
|
3868
|
-
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
|
|
3868
|
+
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 Ei(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 || qr, 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: Fr, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-login", entryComponent: Kr, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-registration", entryComponent: Br, observedAttributes: t })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-profile", entryComponent: Vr, observedAttributes: t.filter((o) => ["api", "lang"].includes(o)) })), $t(Object.assign(Object.assign({}, e), { tagName: "hanko-events", entryComponent: Zr, observedAttributes: [] }))]), { hanko: Ge.hanko };
|
|
3869
3869
|
});
|
|
3870
3870
|
oe.fK;
|
|
3871
3871
|
oe.tJ;
|
|
@@ -3873,7 +3873,7 @@ oe.Z7;
|
|
|
3873
3873
|
oe.Q9;
|
|
3874
3874
|
oe.Lv;
|
|
3875
3875
|
oe.qQ;
|
|
3876
|
-
var
|
|
3876
|
+
var Gr = oe.I4;
|
|
3877
3877
|
oe.O8;
|
|
3878
3878
|
oe.ku;
|
|
3879
3879
|
oe.ls;
|
|
@@ -3894,121 +3894,20 @@ oe.jx;
|
|
|
3894
3894
|
oe.nX;
|
|
3895
3895
|
oe.Nx;
|
|
3896
3896
|
oe.Sd;
|
|
3897
|
-
var
|
|
3897
|
+
var $i = oe.kz;
|
|
3898
3898
|
oe.fX;
|
|
3899
3899
|
oe.qA;
|
|
3900
3900
|
oe.tz;
|
|
3901
3901
|
oe.gN;
|
|
3902
|
-
const
|
|
3902
|
+
const Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3903
3903
|
__proto__: null,
|
|
3904
|
-
Hanko:
|
|
3905
|
-
register:
|
|
3906
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
3907
|
-
var
|
|
3908
|
-
|
|
3909
|
-
Qn = n;
|
|
3910
|
-
}
|
|
3911
|
-
function ra(n = "") {
|
|
3912
|
-
if (!Qn) {
|
|
3913
|
-
const e = document.querySelector("[data-webawesome]");
|
|
3914
|
-
if (e != null && e.hasAttribute("data-webawesome")) {
|
|
3915
|
-
const t = new URL(e.getAttribute("data-webawesome") ?? "", window.location.href).pathname;
|
|
3916
|
-
ti(t);
|
|
3917
|
-
} else {
|
|
3918
|
-
const o = [...document.getElementsByTagName("script")].find(
|
|
3919
|
-
(i) => i.src.endsWith("webawesome.js") || i.src.endsWith("webawesome.loader.js") || i.src.endsWith("webawesome.ssr-loader.js")
|
|
3920
|
-
);
|
|
3921
|
-
if (o) {
|
|
3922
|
-
const i = String(o.getAttribute("src"));
|
|
3923
|
-
ti(i.split("/").slice(0, -1).join("/"));
|
|
3924
|
-
}
|
|
3925
|
-
}
|
|
3926
|
-
}
|
|
3927
|
-
return Qn.replace(/\/$/, "") + (n ? `/${n.replace(/^\//, "")}` : "");
|
|
3928
|
-
}
|
|
3929
|
-
new MutationObserver((n) => {
|
|
3930
|
-
for (const { addedNodes: e } of n)
|
|
3931
|
-
for (const t of e)
|
|
3932
|
-
t.nodeType === Node.ELEMENT_NODE && aa(t);
|
|
3933
|
-
});
|
|
3934
|
-
async function aa(n) {
|
|
3935
|
-
const e = n instanceof Element ? n.tagName.toLowerCase() : "", t = e == null ? void 0 : e.startsWith("wa-"), o = [...n.querySelectorAll(":not(:defined)")].map((a) => a.tagName.toLowerCase()).filter((a) => a.startsWith("wa-"));
|
|
3936
|
-
t && !customElements.get(e) && o.push(e);
|
|
3937
|
-
const i = [...new Set(o)], s = await Promise.allSettled(i.map((a) => la(a)));
|
|
3938
|
-
for (const a of s)
|
|
3939
|
-
a.status === "rejected" && console.warn(a.reason);
|
|
3940
|
-
await new Promise(requestAnimationFrame), n.dispatchEvent(
|
|
3941
|
-
new CustomEvent("wa-discovery-complete", {
|
|
3942
|
-
bubbles: !1,
|
|
3943
|
-
cancelable: !1,
|
|
3944
|
-
composed: !0
|
|
3945
|
-
})
|
|
3946
|
-
);
|
|
3947
|
-
}
|
|
3948
|
-
function la(n) {
|
|
3949
|
-
if (customElements.get(n))
|
|
3950
|
-
return Promise.resolve();
|
|
3951
|
-
const e = n.replace(/^wa-/i, ""), t = ra(`components/${e}/${e}.js`);
|
|
3952
|
-
return new Promise((o, i) => {
|
|
3953
|
-
import(t).then(() => o()).catch(() => i(new Error(`Unable to autoload <${n}> from ${t}`)));
|
|
3954
|
-
});
|
|
3955
|
-
}
|
|
3956
|
-
const ca = /* @__PURE__ */ new Set(), on = /* @__PURE__ */ new Map(), Ui = typeof MutationObserver < "u" && typeof document < "u" && typeof document.documentElement < "u";
|
|
3957
|
-
if (Ui) {
|
|
3958
|
-
const n = new MutationObserver(Hi);
|
|
3959
|
-
document.documentElement.dir, document.documentElement.lang || navigator.language, n.observe(document.documentElement, {
|
|
3960
|
-
attributes: !0,
|
|
3961
|
-
attributeFilter: ["dir", "lang"]
|
|
3962
|
-
});
|
|
3963
|
-
}
|
|
3964
|
-
function Mi(...n) {
|
|
3965
|
-
n.map((e) => {
|
|
3966
|
-
const t = e.$code.toLowerCase();
|
|
3967
|
-
on.has(t) ? on.set(t, Object.assign(Object.assign({}, on.get(t)), e)) : on.set(t, e);
|
|
3968
|
-
}), Hi();
|
|
3969
|
-
}
|
|
3970
|
-
function Hi() {
|
|
3971
|
-
Ui && (document.documentElement.dir, document.documentElement.lang || navigator.language), [...ca.keys()].map((n) => {
|
|
3972
|
-
typeof n.requestUpdate == "function" && n.requestUpdate();
|
|
3973
|
-
});
|
|
3974
|
-
}
|
|
3975
|
-
var Ri = {
|
|
3976
|
-
$code: "en",
|
|
3977
|
-
$name: "English",
|
|
3978
|
-
$dir: "ltr",
|
|
3979
|
-
carousel: "Carousel",
|
|
3980
|
-
clearEntry: "Clear entry",
|
|
3981
|
-
close: "Close",
|
|
3982
|
-
copied: "Copied",
|
|
3983
|
-
copy: "Copy",
|
|
3984
|
-
currentValue: "Current value",
|
|
3985
|
-
error: "Error",
|
|
3986
|
-
goToSlide: (n, e) => `Go to slide ${n} of ${e}`,
|
|
3987
|
-
hidePassword: "Hide password",
|
|
3988
|
-
loading: "Loading",
|
|
3989
|
-
nextSlide: "Next slide",
|
|
3990
|
-
numOptionsSelected: (n) => n === 0 ? "No options selected" : n === 1 ? "1 option selected" : `${n} options selected`,
|
|
3991
|
-
previousSlide: "Previous slide",
|
|
3992
|
-
progress: "Progress",
|
|
3993
|
-
remove: "Remove",
|
|
3994
|
-
resize: "Resize",
|
|
3995
|
-
scrollableRegion: "Scrollable region",
|
|
3996
|
-
scrollToEnd: "Scroll to end",
|
|
3997
|
-
scrollToStart: "Scroll to start",
|
|
3998
|
-
selectAColorFromTheScreen: "Select a color from the screen",
|
|
3999
|
-
showPassword: "Show password",
|
|
4000
|
-
slideNum: (n) => `Slide ${n}`,
|
|
4001
|
-
toggleColorFormat: "Toggle color format",
|
|
4002
|
-
zoomIn: "Zoom in",
|
|
4003
|
-
zoomOut: "Zoom out"
|
|
4004
|
-
};
|
|
4005
|
-
Mi(Ri);
|
|
4006
|
-
var da = Ri;
|
|
4007
|
-
Mi(da);
|
|
4008
|
-
var ua = Object.defineProperty, ha = Object.getOwnPropertyDescriptor, ke = (n, e, t, o) => {
|
|
4009
|
-
for (var i = o > 1 ? void 0 : o ? ha(e, t) : e, s = n.length - 1, a; s >= 0; s--)
|
|
3904
|
+
Hanko: Gr,
|
|
3905
|
+
register: $i
|
|
3906
|
+
}, Symbol.toStringTag, { value: "Module" })), Xr = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-vcard'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M5%208a2%202%200%201%200%200-4%202%202%200%200%200%200%204m4-2.5a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4a.5.5%200%200%201-.5-.5M9%208a.5.5%200%200%201%20.5-.5h4a.5.5%200%200%201%200%201h-4A.5.5%200%200%201%209%208m1%202.5a.5.5%200%200%201%20.5-.5h3a.5.5%200%200%201%200%201h-3a.5.5%200%200%201-.5-.5'/%3e%3cpath%20d='M2%202a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V4a2%202%200%200%200-2-2zM1%204a1%201%200%200%201%201-1h12a1%201%200%200%201%201%201v8a1%201%200%200%201-1%201H8.96q.04-.245.04-.5C9%2010.567%207.21%209%205%209c-2.086%200-3.8%201.398-3.984%203.181A1%201%200%200%201%201%2012z'/%3e%3c/svg%3e", ea = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-box-arrow-right'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M10%2012.5a.5.5%200%200%201-.5.5h-8a.5.5%200%200%201-.5-.5v-9a.5.5%200%200%201%20.5-.5h8a.5.5%200%200%201%20.5.5v2a.5.5%200%200%200%201%200v-2A1.5%201.5%200%200%200%209.5%202h-8A1.5%201.5%200%200%200%200%203.5v9A1.5%201.5%200%200%200%201.5%2014h8a1.5%201.5%200%200%200%201.5-1.5v-2a.5.5%200%200%200-1%200z'/%3e%3cpath%20fill-rule='evenodd'%20d='M15.854%208.354a.5.5%200%200%200%200-.708l-3-3a.5.5%200%200%200-.708.708L14.293%207.5H5.5a.5.5%200%200%200%200%201h8.793l-2.147%202.146a.5.5%200%200%200%20.708.708z'/%3e%3c/svg%3e", ta = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-map'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill-rule='evenodd'%20d='M15.817.113A.5.5%200%200%201%2016%20.5v14a.5.5%200%200%201-.402.49l-5%201a.5.5%200%200%201-.196%200L5.5%2015.01l-4.902.98A.5.5%200%200%201%200%2015.5v-14a.5.5%200%200%201%20.402-.49l5-1a.5.5%200%200%201%20.196%200L10.5.99l4.902-.98a.5.5%200%200%201%20.415.103M10%201.91l-4-.8v12.98l4%20.8zm1%2012.98%204-.8V1.11l-4%20.8zm-6-.8V1.11l-4%20.8v12.98z'/%3e%3c/svg%3e", na = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20class='bi%20bi-person-check'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M12.5%2016a3.5%203.5%200%201%200%200-7%203.5%203.5%200%200%200%200%207m1.679-4.493-1.335%202.226a.75.75%200%200%201-1.174.144l-.774-.773a.5.5%200%200%201%20.708-.708l.547.548%201.17-1.951a.5.5%200%201%201%20.858.514M11%205a3%203%200%201%201-6%200%203%203%200%200%201%206%200M8%207a2%202%200%201%200%200-4%202%202%200%200%200%200%204'/%3e%3cpath%20d='M8.256%2014a4.5%204.5%200%200%201-.229-1.004H3c.001-.246.154-.986.832-1.664C4.484%2010.68%205.711%2010%208%2010q.39%200%20.74.025c.226-.341.496-.65.804-.918Q8.844%209.002%208%209c-5%200-6%203-6%204s1%201%201%201z'/%3e%3c/svg%3e";
|
|
3907
|
+
var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, ye = (n, e, t, o) => {
|
|
3908
|
+
for (var i = o > 1 ? void 0 : o ? ia(e, t) : e, s = n.length - 1, a; s >= 0; s--)
|
|
4010
3909
|
(a = n[s]) && (i = (o ? a(e, t, i) : a(i)) || i);
|
|
4011
|
-
return o && i &&
|
|
3910
|
+
return o && i && oa(e, t, i), i;
|
|
4012
3911
|
};
|
|
4013
3912
|
const le = {
|
|
4014
3913
|
primary: null,
|
|
@@ -4022,10 +3921,12 @@ const le = {
|
|
|
4022
3921
|
instances: /* @__PURE__ */ new Set(),
|
|
4023
3922
|
profileDisplayName: ""
|
|
4024
3923
|
// Shared profile display name
|
|
4025
|
-
},
|
|
4026
|
-
let
|
|
3924
|
+
}, Xo = (n) => `hanko-verified-${n}`, ei = (n) => `hanko-onboarding-${n}`;
|
|
3925
|
+
let ge = class extends Ut {
|
|
4027
3926
|
constructor() {
|
|
4028
|
-
super(...arguments), 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.user = null, this.osmConnected = !1, this.osmData = null, this.osmLoading = !1, this.loading = !0, this.error = null, this.profileDisplayName = "", this.hasAppMapping = !1, this.
|
|
3927
|
+
super(...arguments), 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.user = null, this.osmConnected = !1, this.osmData = null, this.osmLoading = !1, this.loading = !0, this.error = null, this.profileDisplayName = "", this.hasAppMapping = !1, this.isOpen = !1, this.handleOutsideClick = (n) => {
|
|
3928
|
+
this.contains(n.target) || this.closeDropdown();
|
|
3929
|
+
}, this._trailingSlashCache = {}, this._debugMode = !1, this._lastSessionId = null, this._hanko = null, this._isPrimary = !1, this._handleVisibilityChange = () => {
|
|
4029
3930
|
this._isPrimary && !document.hidden && !this.showProfile && !this.user && (this.log("👁️ Page visible, re-checking session..."), this.checkSession());
|
|
4030
3931
|
}, this._handleWindowFocus = () => {
|
|
4031
3932
|
this._isPrimary && !this.showProfile && !this.user && (this.log("🎯 Window focused, re-checking session..."), this.checkSession());
|
|
@@ -4036,6 +3937,12 @@ let ve = class extends Ut {
|
|
|
4036
3937
|
!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());
|
|
4037
3938
|
};
|
|
4038
3939
|
}
|
|
3940
|
+
toggleDropdown() {
|
|
3941
|
+
this.isOpen = !this.isOpen;
|
|
3942
|
+
}
|
|
3943
|
+
closeDropdown() {
|
|
3944
|
+
this.isOpen = !1;
|
|
3945
|
+
}
|
|
4039
3946
|
// Get computed hankoUrl (priority: attribute > meta tag > window.HANKO_URL > origin)
|
|
4040
3947
|
get hankoUrl() {
|
|
4041
3948
|
if (this.hankoUrlAttr)
|
|
@@ -4055,7 +3962,7 @@ let ve = class extends Ut {
|
|
|
4055
3962
|
return this.log("🔍 hanko-url auto-detected from window.location.origin:", e), e;
|
|
4056
3963
|
}
|
|
4057
3964
|
connectedCallback() {
|
|
4058
|
-
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("🔌 hanko-auth connectedCallback called"), this.
|
|
3965
|
+
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("🔌 hanko-auth connectedCallback called"), this.injectHotStyles(), le.instances.add(this), document.addEventListener("visibilitychange", this._handleVisibilityChange), window.addEventListener("focus", this._handleWindowFocus), document.addEventListener("hanko-login", this._handleExternalLogin);
|
|
4059
3966
|
}
|
|
4060
3967
|
// Use firstUpdated instead of connectedCallback to ensure React props are set
|
|
4061
3968
|
firstUpdated() {
|
|
@@ -4065,7 +3972,7 @@ let ve = class extends Ut {
|
|
|
4065
3972
|
if (super.disconnectedCallback(), document.removeEventListener(
|
|
4066
3973
|
"visibilitychange",
|
|
4067
3974
|
this._handleVisibilityChange
|
|
4068
|
-
), window.removeEventListener("focus", this._handleWindowFocus), document.removeEventListener("hanko-login", this._handleExternalLogin), le.instances.delete(this), this._isPrimary && le.instances.size > 0) {
|
|
3975
|
+
), window.removeEventListener("focus", this._handleWindowFocus), document.removeEventListener("hanko-login", this._handleExternalLogin), document.removeEventListener("click", this.handleOutsideClick), le.instances.delete(this), this._isPrimary && le.instances.size > 0) {
|
|
4069
3976
|
const n = le.instances.values().next().value;
|
|
4070
3977
|
n && (this.log("👑 Promoting new primary instance"), n._isPrimary = !0, le.primary = n);
|
|
4071
3978
|
}
|
|
@@ -4106,18 +4013,22 @@ let ve = class extends Ut {
|
|
|
4106
4013
|
const t = this._trailingSlashCache[e];
|
|
4107
4014
|
return t !== void 0 && t && !n.endsWith("/") ? n + "/" : n;
|
|
4108
4015
|
}
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4016
|
+
injectHotStyles() {
|
|
4017
|
+
[
|
|
4018
|
+
{
|
|
4019
|
+
id: "hot-design-system",
|
|
4020
|
+
href: "https://cdn.jsdelivr.net/npm/hotosm-ui-design@latest/dist/hot.css"
|
|
4021
|
+
},
|
|
4022
|
+
{
|
|
4023
|
+
id: "google-font-archivo",
|
|
4024
|
+
href: "https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap"
|
|
4025
|
+
}
|
|
4026
|
+
].forEach(({ id: e, href: t }) => {
|
|
4027
|
+
if (!document.getElementById(e)) {
|
|
4028
|
+
const o = document.createElement("link");
|
|
4029
|
+
o.rel = "stylesheet", o.href = t, o.id = e, document.head.appendChild(o);
|
|
4030
|
+
}
|
|
4031
|
+
});
|
|
4121
4032
|
}
|
|
4122
4033
|
async init() {
|
|
4123
4034
|
if (!this._isPrimary) {
|
|
@@ -4125,11 +4036,11 @@ let ve = class extends Ut {
|
|
|
4125
4036
|
return;
|
|
4126
4037
|
}
|
|
4127
4038
|
try {
|
|
4128
|
-
await
|
|
4039
|
+
await $i(this.hankoUrl, {
|
|
4129
4040
|
enablePasskeys: !1,
|
|
4130
4041
|
hidePasskeyButtonOnLogin: !0
|
|
4131
4042
|
});
|
|
4132
|
-
const { Hanko: n } = await Promise.resolve().then(() =>
|
|
4043
|
+
const { Hanko: n } = await Promise.resolve().then(() => Yr), e = window.location.hostname, t = e === "localhost" || e === "127.0.0.1", o = e.split("."), i = o.length >= 2 ? `.${o.slice(-2).join(".")}` : e, s = t ? {} : {
|
|
4133
4044
|
cookieDomain: i,
|
|
4134
4045
|
cookieName: "hanko",
|
|
4135
4046
|
cookieSameSite: "lax"
|
|
@@ -4209,7 +4120,7 @@ let ve = class extends Ut {
|
|
|
4209
4120
|
});
|
|
4210
4121
|
}
|
|
4211
4122
|
if (this.user) {
|
|
4212
|
-
const t =
|
|
4123
|
+
const t = Xo(window.location.hostname), o = sessionStorage.getItem(t);
|
|
4213
4124
|
if (this.verifySession && this.redirectAfterLogin && !o) {
|
|
4214
4125
|
this.log(
|
|
4215
4126
|
"🔄 verify-session enabled, redirecting to callback for app verification..."
|
|
@@ -4291,7 +4202,7 @@ let ve = class extends Ut {
|
|
|
4291
4202
|
async checkAppMapping() {
|
|
4292
4203
|
if (!this.mappingCheckUrl || !this.user)
|
|
4293
4204
|
return !0;
|
|
4294
|
-
const n =
|
|
4205
|
+
const n = ei(window.location.hostname), e = sessionStorage.getItem(n);
|
|
4295
4206
|
this.log("🔍 Checking app mapping at:", this.mappingCheckUrl);
|
|
4296
4207
|
try {
|
|
4297
4208
|
const t = await fetch(this.mappingCheckUrl, {
|
|
@@ -4519,7 +4430,7 @@ let ve = class extends Ut {
|
|
|
4519
4430
|
_clearAuthState() {
|
|
4520
4431
|
const n = window.location.hostname;
|
|
4521
4432
|
document.cookie = `hanko=; path=/; domain=${n}; max-age=0`, document.cookie = "hanko=; path=/; max-age=0", document.cookie = `osm_connection=; path=/; domain=${n}; max-age=0`, document.cookie = "osm_connection=; path=/; max-age=0", this.log("🍪 Cookies cleared");
|
|
4522
|
-
const e =
|
|
4433
|
+
const e = Xo(n), t = ei(n);
|
|
4523
4434
|
sessionStorage.removeItem(e), sessionStorage.removeItem(t), this.log("🔄 Session flags cleared"), this.user = null, this.osmConnected = !1, this.osmData = null, this.hasAppMapping = !1, this._isPrimary && this._broadcastState(), this.dispatchEvent(
|
|
4524
4435
|
new CustomEvent("logout", {
|
|
4525
4436
|
bubbles: !0,
|
|
@@ -4566,6 +4477,17 @@ let ve = class extends Ut {
|
|
|
4566
4477
|
this.log("🚪 User logged out in another window/tab"), this.handleSessionExpired();
|
|
4567
4478
|
}
|
|
4568
4479
|
handleDropdownSelect(n) {
|
|
4480
|
+
const t = n.currentTarget.dataset.action;
|
|
4481
|
+
if (this.log("🎯 Dropdown item selected:", t), t === "profile") {
|
|
4482
|
+
const o = this.hankoUrl, i = this.redirectAfterLogin || window.location.origin;
|
|
4483
|
+
window.location.href = `${o}/app/profile?return_to=${encodeURIComponent(i)}`;
|
|
4484
|
+
} else if (t === "connect-osm") {
|
|
4485
|
+
const s = window.location.pathname.includes("/app") ? window.location.origin : window.location.href, a = this.hankoUrl;
|
|
4486
|
+
window.location.href = `${a}/app?return_to=${encodeURIComponent(s)}&osm_required=true`;
|
|
4487
|
+
} else t === "logout" && this.handleLogout();
|
|
4488
|
+
this.closeDropdown();
|
|
4489
|
+
}
|
|
4490
|
+
oldHandleDropdownSelect(n) {
|
|
4569
4491
|
const e = n.detail.item.value;
|
|
4570
4492
|
if (this.log("🎯 Dropdown item selected:", e), e === "profile") {
|
|
4571
4493
|
const t = this.redirectAfterLogin || window.location.origin, o = this.loginUrl ? `${this.loginUrl}/profile` : `${this.hankoUrl}/app/profile`;
|
|
@@ -4590,9 +4512,7 @@ let ve = class extends Ut {
|
|
|
4590
4512
|
"loading:",
|
|
4591
4513
|
this.loading
|
|
4592
4514
|
), this.loading)
|
|
4593
|
-
return He`
|
|
4594
|
-
<wa-button appearance="plain" size="small" disabled>Log in</wa-button>
|
|
4595
|
-
`;
|
|
4515
|
+
return He` <button disabled>Log in</button> `;
|
|
4596
4516
|
if (this.error)
|
|
4597
4517
|
return He`
|
|
4598
4518
|
<div class="container">
|
|
@@ -4658,25 +4578,22 @@ let ve = class extends Ut {
|
|
|
4658
4578
|
</div>
|
|
4659
4579
|
` : ""}
|
|
4660
4580
|
|
|
4661
|
-
<button @click=${this.handleLogout} class="btn-
|
|
4662
|
-
|
|
4581
|
+
<button @click=${this.handleLogout} class="btn-secondary">
|
|
4582
|
+
Log out
|
|
4663
4583
|
</button>
|
|
4664
4584
|
</div>
|
|
4665
4585
|
</div>
|
|
4666
4586
|
` : He`
|
|
4667
|
-
<
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
class="no-hover"
|
|
4675
|
-
appearance="plain"
|
|
4676
|
-
size="small"
|
|
4677
|
-
style="position: relative;"
|
|
4587
|
+
<div class="dropdown">
|
|
4588
|
+
<button
|
|
4589
|
+
@click=${this.toggleDropdown}
|
|
4590
|
+
aria-label="Open account menu"
|
|
4591
|
+
aria-expanded=${this.isOpen}
|
|
4592
|
+
aria-haspopup="true"
|
|
4593
|
+
class="dropdown-trigger"
|
|
4678
4594
|
>
|
|
4679
4595
|
<span class="header-avatar">${s}</span>
|
|
4596
|
+
|
|
4680
4597
|
${this.osmConnected ? He`
|
|
4681
4598
|
<span
|
|
4682
4599
|
class="osm-status-badge connected"
|
|
@@ -4690,33 +4607,37 @@ let ve = class extends Ut {
|
|
|
4690
4607
|
>!</span
|
|
4691
4608
|
>
|
|
4692
4609
|
` : ""}
|
|
4693
|
-
</
|
|
4694
|
-
<div class="
|
|
4695
|
-
<div class="profile-
|
|
4696
|
-
|
|
4697
|
-
|
|
4610
|
+
</button>
|
|
4611
|
+
<div class="dropdown-content ${this.isOpen ? "open" : ""}">
|
|
4612
|
+
<div class="profile-info">
|
|
4613
|
+
<div class="profile-email">
|
|
4614
|
+
${this.user.email || this.user.id}
|
|
4615
|
+
</div>
|
|
4698
4616
|
</div>
|
|
4617
|
+
<button data-action="profile" @click=${this.handleDropdownSelect}>
|
|
4618
|
+
<img src="${Xr}" class="icon" alt="Account icon" />
|
|
4619
|
+
My HOT Account
|
|
4620
|
+
</button>
|
|
4621
|
+
${this.osmRequired ? this.osmConnected ? He`
|
|
4622
|
+
<button class="osm-connected" disabled>
|
|
4623
|
+
<img src="${na}" alt="Check icon" class="icon" />
|
|
4624
|
+
Connected to OSM (@${(t = this.osmData) == null ? void 0 : t.osm_username})
|
|
4625
|
+
</button>
|
|
4626
|
+
` : He`
|
|
4627
|
+
<button
|
|
4628
|
+
data-action="connect-osm"
|
|
4629
|
+
@click=${this.handleDropdownSelect}
|
|
4630
|
+
>
|
|
4631
|
+
<img src="${ta}" alt="Check icon" class="icon" />
|
|
4632
|
+
Connect to OSM
|
|
4633
|
+
</button>
|
|
4634
|
+
` : ""}
|
|
4635
|
+
<button data-action="logout" @click=${this.handleDropdownSelect}>
|
|
4636
|
+
<img src="${ea}" alt="Log out icon" class="icon" />
|
|
4637
|
+
Log Out
|
|
4638
|
+
</button>
|
|
4699
4639
|
</div>
|
|
4700
|
-
|
|
4701
|
-
<wa-icon slot="icon" name="address-card"></wa-icon>
|
|
4702
|
-
My HOT Account
|
|
4703
|
-
</wa-dropdown-item>
|
|
4704
|
-
${this.osmRequired ? this.osmConnected ? He`
|
|
4705
|
-
<wa-dropdown-item value="osm-connected" disabled>
|
|
4706
|
-
<wa-icon slot="icon" name="check"></wa-icon>
|
|
4707
|
-
Connected to OSM (@${(t = this.osmData) == null ? void 0 : t.osm_username})
|
|
4708
|
-
</wa-dropdown-item>
|
|
4709
|
-
` : He`
|
|
4710
|
-
<wa-dropdown-item value="connect-osm">
|
|
4711
|
-
<wa-icon slot="icon" name="map"></wa-icon>
|
|
4712
|
-
Connect OSM
|
|
4713
|
-
</wa-dropdown-item>
|
|
4714
|
-
` : ""}
|
|
4715
|
-
<wa-dropdown-item value="logout" variant="danger">
|
|
4716
|
-
<wa-icon slot="icon" name="right-from-bracket"></wa-icon>
|
|
4717
|
-
Sign Out
|
|
4718
|
-
</wa-dropdown-item>
|
|
4719
|
-
</wa-dropdown>
|
|
4640
|
+
</div>
|
|
4720
4641
|
`;
|
|
4721
4642
|
} else {
|
|
4722
4643
|
if (this.showProfile)
|
|
@@ -4754,17 +4675,12 @@ let ve = class extends Ut {
|
|
|
4754
4675
|
const u = `${this.loginUrl || `${d}/app`}?return_to=${encodeURIComponent(
|
|
4755
4676
|
s
|
|
4756
4677
|
)}${this.osmRequired ? "&osm_required=true" : ""}${c}`;
|
|
4757
|
-
return He`<
|
|
4758
|
-
appearance="plain"
|
|
4759
|
-
size="small"
|
|
4760
|
-
href="${u}"
|
|
4761
|
-
>Log in
|
|
4762
|
-
</wa-button> `;
|
|
4678
|
+
return He`<a class="login-link" href="${u}">Log in</a> `;
|
|
4763
4679
|
}
|
|
4764
4680
|
}
|
|
4765
4681
|
}
|
|
4766
4682
|
};
|
|
4767
|
-
|
|
4683
|
+
ge.styles = Ni`
|
|
4768
4684
|
:host {
|
|
4769
4685
|
display: block;
|
|
4770
4686
|
font-family: var(--hot-font-sans);
|
|
@@ -4813,7 +4729,7 @@ ve.styles = qi`
|
|
|
4813
4729
|
color: var(--hot-color-gray-600);
|
|
4814
4730
|
font-weight: var(--hot-font-weight-semibold);
|
|
4815
4731
|
}
|
|
4816
|
-
|
|
4732
|
+
|
|
4817
4733
|
button {
|
|
4818
4734
|
width: 100%;
|
|
4819
4735
|
padding: 12px 20px;
|
|
@@ -4826,22 +4742,24 @@ ve.styles = qi`
|
|
|
4826
4742
|
}
|
|
4827
4743
|
|
|
4828
4744
|
.btn-primary {
|
|
4829
|
-
background:
|
|
4745
|
+
background: var(--hot-color-gray-700);
|
|
4830
4746
|
color: white;
|
|
4831
4747
|
}
|
|
4832
4748
|
|
|
4833
4749
|
.btn-primary:hover {
|
|
4834
|
-
background:
|
|
4750
|
+
background: var(--hot-color-gray-600);
|
|
4835
4751
|
}
|
|
4836
4752
|
|
|
4837
4753
|
.btn-secondary {
|
|
4838
|
-
|
|
4839
|
-
|
|
4754
|
+
border: 1px solid var(--hot-color-gray-700);
|
|
4755
|
+
border-radius: var(--hot-border-radius-medium);
|
|
4756
|
+
background-color: white;
|
|
4757
|
+
color: var(--hot-color-gray-700);
|
|
4840
4758
|
margin-top: 8px;
|
|
4841
4759
|
}
|
|
4842
4760
|
|
|
4843
4761
|
.btn-secondary:hover {
|
|
4844
|
-
background:
|
|
4762
|
+
background: var(--hot-color-gray-50);
|
|
4845
4763
|
}
|
|
4846
4764
|
|
|
4847
4765
|
.error {
|
|
@@ -4892,9 +4810,8 @@ ve.styles = qi`
|
|
|
4892
4810
|
.osm-section {
|
|
4893
4811
|
border-top: var(--hot-border-width, 1px) solid var(--hot-color-gray-100);
|
|
4894
4812
|
padding-top: var(--hot-spacing-medium);
|
|
4895
|
-
padding-bottom: var(--hot-spacing-
|
|
4813
|
+
padding-bottom: var(--hot-spacing-small);
|
|
4896
4814
|
margin-top: var(--hot-spacing-medium);
|
|
4897
|
-
margin-bottom: var(--hot-spacing-medium);
|
|
4898
4815
|
text-align: center;
|
|
4899
4816
|
}
|
|
4900
4817
|
|
|
@@ -4958,8 +4875,8 @@ ve.styles = qi`
|
|
|
4958
4875
|
|
|
4959
4876
|
.osm-status-badge {
|
|
4960
4877
|
position: absolute;
|
|
4961
|
-
top:
|
|
4962
|
-
right:
|
|
4878
|
+
top: 2px;
|
|
4879
|
+
right: 2px;
|
|
4963
4880
|
width: var(--hot-font-size-small);
|
|
4964
4881
|
height: var(--hot-font-size-small);
|
|
4965
4882
|
border-radius: 50%;
|
|
@@ -4992,101 +4909,174 @@ ve.styles = qi`
|
|
|
4992
4909
|
color: white;
|
|
4993
4910
|
}
|
|
4994
4911
|
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4912
|
+
.login-link {
|
|
4913
|
+
color: var(--hot-color-neutral-950);
|
|
4914
|
+
font-size: var(--hot-font-size-small);
|
|
4915
|
+
border-radius: var(--hot-border-radius-medium);
|
|
4916
|
+
text-decoration: none;
|
|
4917
|
+
padding: 14px;
|
|
4918
|
+
}
|
|
4919
|
+
.login-link:hover {
|
|
4920
|
+
background: var(--hot-color-gray-50);
|
|
4921
|
+
}
|
|
4922
|
+
/* Dropdown styles */
|
|
4923
|
+
.dropdown {
|
|
4924
|
+
position: relative;
|
|
4925
|
+
display: inline-block;
|
|
4926
|
+
}
|
|
4927
|
+
.dropdown-trigger {
|
|
4928
|
+
background: none;
|
|
4929
|
+
border: none;
|
|
4930
|
+
padding: var(--hot-spacing-x-small);
|
|
4931
|
+
cursor: pointer;
|
|
4932
|
+
position: relative;
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
.dropdown-trigger.no-hover:hover,
|
|
4936
|
+
.dropdown-trigger.no-hover:active,
|
|
4937
|
+
.dropdown-trigger.no-hover:focus {
|
|
4938
|
+
background: none;
|
|
4939
|
+
outline: none;
|
|
4940
|
+
}
|
|
4941
|
+
.dropdown-content {
|
|
4942
|
+
position: absolute;
|
|
4943
|
+
right: 0;
|
|
4944
|
+
background: white;
|
|
4945
|
+
border: 1px solid var(--hot-color-gray-100);
|
|
4946
|
+
border-radius: var(--hot-border-radius-medium);
|
|
4947
|
+
z-index: 1000;
|
|
4948
|
+
opacity: 0;
|
|
4949
|
+
visibility: hidden;
|
|
4950
|
+
transform: translateY(-10px);
|
|
4951
|
+
transition:
|
|
4952
|
+
opacity 0.2s ease,
|
|
4953
|
+
visibility 0.2s ease,
|
|
4954
|
+
transform 0.2s ease;
|
|
4955
|
+
}
|
|
4956
|
+
@media (max-width: 768px) {
|
|
4957
|
+
.dropdown-content {
|
|
4958
|
+
position: fixed;
|
|
4959
|
+
width: 100%;
|
|
4960
|
+
}
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
.dropdown-content.open {
|
|
4964
|
+
opacity: 1;
|
|
4965
|
+
visibility: visible;
|
|
4966
|
+
transform: translateY(0);
|
|
4967
|
+
}
|
|
4968
|
+
|
|
4969
|
+
.dropdown-content button {
|
|
4970
|
+
display: flex;
|
|
4971
|
+
align-items: center;
|
|
4972
|
+
width: 100%;
|
|
4973
|
+
padding: var(--hot-spacing-small) var(--hot-spacing-medium);
|
|
4974
|
+
background: none;
|
|
4975
|
+
border: none;
|
|
4976
|
+
cursor: pointer;
|
|
4977
|
+
text-align: left;
|
|
4978
|
+
transition: background-color 0.2s ease;
|
|
4979
|
+
gap: var(--hot-spacing-small);
|
|
4980
|
+
font-size: var(--hot-font-size-small);
|
|
4981
|
+
color: var(--hot-color-gray-900);
|
|
4982
|
+
}
|
|
4983
|
+
|
|
4984
|
+
.dropdown-content button:hover {
|
|
4985
|
+
background-color: var(--hot-color-gray-50);
|
|
4998
4986
|
}
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
4987
|
+
|
|
4988
|
+
.dropdown-content button:focus {
|
|
4989
|
+
background-color: var(--hot-color-gray-50);
|
|
4990
|
+
outline: 2px solid var(--hot-color-gray-500);
|
|
4991
|
+
outline-offset: -2px;
|
|
5004
4992
|
}
|
|
5005
4993
|
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
*/
|
|
5009
|
-
right: 0 !important;
|
|
5010
|
-
left: auto !important; /* Ensures 'right' takes precedence */
|
|
4994
|
+
.dropdown-content .profile-info {
|
|
4995
|
+
padding: var(--hot-spacing-small) var(--hot-spacing-medium);
|
|
5011
4996
|
}
|
|
5012
4997
|
|
|
5013
|
-
|
|
4998
|
+
.dropdown-content .profile-email {
|
|
5014
4999
|
font-size: var(--hot-font-size-small);
|
|
5000
|
+
font-weight: var(--hot-font-weight-bold);
|
|
5015
5001
|
}
|
|
5016
5002
|
|
|
5017
|
-
|
|
5018
|
-
|
|
5003
|
+
.icon {
|
|
5004
|
+
width: 20px;
|
|
5005
|
+
height: 20px;
|
|
5019
5006
|
}
|
|
5020
5007
|
`;
|
|
5021
|
-
|
|
5008
|
+
ye([
|
|
5022
5009
|
We({ type: String, attribute: "hanko-url" })
|
|
5023
|
-
],
|
|
5024
|
-
|
|
5010
|
+
], ge.prototype, "hankoUrlAttr", 2);
|
|
5011
|
+
ye([
|
|
5025
5012
|
We({ type: String, attribute: "base-path" })
|
|
5026
|
-
],
|
|
5027
|
-
|
|
5013
|
+
], ge.prototype, "basePath", 2);
|
|
5014
|
+
ye([
|
|
5028
5015
|
We({ type: String, attribute: "auth-path" })
|
|
5029
|
-
],
|
|
5030
|
-
|
|
5016
|
+
], ge.prototype, "authPath", 2);
|
|
5017
|
+
ye([
|
|
5031
5018
|
We({ type: Boolean, attribute: "osm-required" })
|
|
5032
|
-
],
|
|
5033
|
-
|
|
5019
|
+
], ge.prototype, "osmRequired", 2);
|
|
5020
|
+
ye([
|
|
5034
5021
|
We({ type: String, attribute: "osm-scopes" })
|
|
5035
|
-
],
|
|
5036
|
-
|
|
5022
|
+
], ge.prototype, "osmScopes", 2);
|
|
5023
|
+
ye([
|
|
5037
5024
|
We({ type: Boolean, attribute: "show-profile" })
|
|
5038
|
-
],
|
|
5039
|
-
|
|
5025
|
+
], ge.prototype, "showProfile", 2);
|
|
5026
|
+
ye([
|
|
5040
5027
|
We({ type: String, attribute: "redirect-after-login" })
|
|
5041
|
-
],
|
|
5042
|
-
|
|
5028
|
+
], ge.prototype, "redirectAfterLogin", 2);
|
|
5029
|
+
ye([
|
|
5043
5030
|
We({ type: Boolean, attribute: "auto-connect" })
|
|
5044
|
-
],
|
|
5045
|
-
|
|
5031
|
+
], ge.prototype, "autoConnect", 2);
|
|
5032
|
+
ye([
|
|
5046
5033
|
We({ type: Boolean, attribute: "verify-session" })
|
|
5047
|
-
],
|
|
5048
|
-
|
|
5034
|
+
], ge.prototype, "verifySession", 2);
|
|
5035
|
+
ye([
|
|
5049
5036
|
We({ type: String, attribute: "redirect-after-logout" })
|
|
5050
|
-
],
|
|
5051
|
-
|
|
5037
|
+
], ge.prototype, "redirectAfterLogout", 2);
|
|
5038
|
+
ye([
|
|
5052
5039
|
We({ type: String, attribute: "display-name" })
|
|
5053
|
-
],
|
|
5054
|
-
|
|
5040
|
+
], ge.prototype, "displayNameAttr", 2);
|
|
5041
|
+
ye([
|
|
5055
5042
|
We({ type: String, attribute: "mapping-check-url" })
|
|
5056
|
-
],
|
|
5057
|
-
|
|
5043
|
+
], ge.prototype, "mappingCheckUrl", 2);
|
|
5044
|
+
ye([
|
|
5058
5045
|
We({ type: String, attribute: "app-id" })
|
|
5059
|
-
],
|
|
5060
|
-
|
|
5046
|
+
], ge.prototype, "appId", 2);
|
|
5047
|
+
ye([
|
|
5061
5048
|
We({ type: String, attribute: "login-url" })
|
|
5062
|
-
],
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
],
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
],
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
],
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
],
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
],
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
],
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
],
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
],
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
],
|
|
5049
|
+
], ge.prototype, "loginUrl", 2);
|
|
5050
|
+
ye([
|
|
5051
|
+
it()
|
|
5052
|
+
], ge.prototype, "user", 2);
|
|
5053
|
+
ye([
|
|
5054
|
+
it()
|
|
5055
|
+
], ge.prototype, "osmConnected", 2);
|
|
5056
|
+
ye([
|
|
5057
|
+
it()
|
|
5058
|
+
], ge.prototype, "osmData", 2);
|
|
5059
|
+
ye([
|
|
5060
|
+
it()
|
|
5061
|
+
], ge.prototype, "osmLoading", 2);
|
|
5062
|
+
ye([
|
|
5063
|
+
it()
|
|
5064
|
+
], ge.prototype, "loading", 2);
|
|
5065
|
+
ye([
|
|
5066
|
+
it()
|
|
5067
|
+
], ge.prototype, "error", 2);
|
|
5068
|
+
ye([
|
|
5069
|
+
it()
|
|
5070
|
+
], ge.prototype, "profileDisplayName", 2);
|
|
5071
|
+
ye([
|
|
5072
|
+
it()
|
|
5073
|
+
], ge.prototype, "hasAppMapping", 2);
|
|
5074
|
+
ye([
|
|
5075
|
+
it()
|
|
5076
|
+
], ge.prototype, "isOpen", 2);
|
|
5077
|
+
ge = ye([
|
|
5078
|
+
ts("hotosm-auth")
|
|
5079
|
+
], ge);
|
|
5090
5080
|
export {
|
|
5091
|
-
|
|
5081
|
+
ge as HankoAuth
|
|
5092
5082
|
};
|