@getauthui/core 0.1.9 → 0.1.11
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 +3 -3
- package/dist/{authui-user-button-lt0fIem4.js → authui-user-button-BErNabVH.js} +847 -670
- package/dist/authui.cdn.js +320 -226
- package/dist/authui.cdn.mjs +896 -719
- package/dist/authui.js +2 -2
- package/dist/components/authui-config.d.ts +4 -0
- package/dist/components/authui-config.d.ts.map +1 -1
- package/dist/components/authui-sign-in.d.ts +12 -0
- package/dist/components/authui-sign-in.d.ts.map +1 -1
- package/dist/components/authui-user-button.d.ts +8 -0
- package/dist/components/authui-user-button.d.ts.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react.js +56 -35
- package/dist/store.d.ts.map +1 -1
- package/dist/styles/base.d.ts.map +1 -1
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/authui.cdn.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const St = globalThis, hi = St.ShadowRoot && (St.ShadyCSS === void 0 || St.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, fi = /* @__PURE__ */ Symbol(), Si = /* @__PURE__ */ new WeakMap();
|
|
2
2
|
let Qi = class {
|
|
3
3
|
constructor(e, n, i) {
|
|
4
4
|
if (this._$cssResult$ = !0, i !== fi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -17,7 +17,7 @@ let Qi = class {
|
|
|
17
17
|
return this.cssText;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi),
|
|
20
|
+
const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi), Ge = (t, ...e) => {
|
|
21
21
|
const n = t.length === 1 ? t[0] : e.reduce((i, o, a) => i + ((s) => {
|
|
22
22
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
23
23
|
if (typeof s == "number") return s;
|
|
@@ -27,7 +27,7 @@ const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi), We = (t
|
|
|
27
27
|
}, dn = (t, e) => {
|
|
28
28
|
if (hi) t.adoptedStyleSheets = e.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
29
29
|
else for (const n of e) {
|
|
30
|
-
const i = document.createElement("style"), o =
|
|
30
|
+
const i = document.createElement("style"), o = St.litNonce;
|
|
31
31
|
o !== void 0 && i.setAttribute("nonce", o), i.textContent = n.cssText, t.appendChild(i);
|
|
32
32
|
}
|
|
33
33
|
}, $i = hi ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
@@ -35,7 +35,7 @@ const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi), We = (t
|
|
|
35
35
|
for (const i of e.cssRules) n += i.cssText;
|
|
36
36
|
return cn(n);
|
|
37
37
|
})(t) : t;
|
|
38
|
-
const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object,
|
|
38
|
+
const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object, Mt = globalThis, ji = Mt.trustedTypes, yn = ji ? ji.emptyScript : "", mn = Mt.reactiveElementPolyfillSupport, ut = (t, e) => t, Pt = { toAttribute(t, e) {
|
|
39
39
|
switch (e) {
|
|
40
40
|
case Boolean:
|
|
41
41
|
t = t ? yn : null;
|
|
@@ -63,8 +63,8 @@ const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnProperty
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return n;
|
|
66
|
-
} }, gi = (t, e) => !ln(t, e), Pi = { attribute: !0, type: String, converter:
|
|
67
|
-
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"),
|
|
66
|
+
} }, gi = (t, e) => !ln(t, e), Pi = { attribute: !0, type: String, converter: Pt, reflect: !1, useDefault: !1, hasChanged: gi };
|
|
67
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Mt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
68
|
let et = class extends HTMLElement {
|
|
69
69
|
static addInitializer(e) {
|
|
70
70
|
this._$Ei(), (this.l ??= []).push(e);
|
|
@@ -162,14 +162,14 @@ let et = class extends HTMLElement {
|
|
|
162
162
|
_$ET(e, n) {
|
|
163
163
|
const i = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, i);
|
|
164
164
|
if (o !== void 0 && i.reflect === !0) {
|
|
165
|
-
const a = (i.converter?.toAttribute !== void 0 ? i.converter :
|
|
165
|
+
const a = (i.converter?.toAttribute !== void 0 ? i.converter : Pt).toAttribute(n, i.type);
|
|
166
166
|
this._$Em = e, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$Em = null;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
_$AK(e, n) {
|
|
170
170
|
const i = this.constructor, o = i._$Eh.get(e);
|
|
171
171
|
if (o !== void 0 && this._$Em !== o) {
|
|
172
|
-
const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter :
|
|
172
|
+
const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : Pt;
|
|
173
173
|
this._$Em = o;
|
|
174
174
|
const r = s.fromAttribute(n, a.type);
|
|
175
175
|
this[o] = r ?? this._$Ej?.get(o) ?? r, this._$Em = null;
|
|
@@ -246,54 +246,54 @@ let et = class extends HTMLElement {
|
|
|
246
246
|
firstUpdated(e) {
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (
|
|
250
|
-
const yi = globalThis, xi = (t) => t,
|
|
251
|
-
\f\r]`,
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
249
|
+
et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (Mt.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
+
const yi = globalThis, xi = (t) => t, xt = yi.trustedTypes, Ci = xt ? xt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Ve = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Ve, bn = `<${zi}>`, Te = document, ft = () => Te.createComment(""), gt = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, wn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Wt = `[
|
|
251
|
+
\f\r]`, dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Ri = />/g, Je = RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mi = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), w = Fi(1), G = Fi(2), nt = /* @__PURE__ */ Symbol.for("lit-noChange"), C = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
|
|
253
253
|
function en(t, e) {
|
|
254
254
|
if (!mi(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
255
|
return Ci !== void 0 ? Ci.createHTML(e) : e;
|
|
256
256
|
}
|
|
257
257
|
const vn = (t, e) => {
|
|
258
258
|
const n = t.length - 1, i = [];
|
|
259
|
-
let o, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s =
|
|
259
|
+
let o, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = dt;
|
|
260
260
|
for (let r = 0; r < n; r++) {
|
|
261
261
|
const d = t[r];
|
|
262
262
|
let c, p, u = -1, m = 0;
|
|
263
|
-
for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s ===
|
|
263
|
+
for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === dt ? p[1] === "!--" ? s = Ui : p[1] !== void 0 ? s = Ri : p[2] !== void 0 ? (Oi.test(p[2]) && (o = RegExp("</" + p[2], "g")), s = Je) : p[3] !== void 0 && (s = Je) : s === Je ? p[0] === ">" ? (s = o ?? dt, u = -1) : p[1] === void 0 ? u = -2 : (u = s.lastIndex - p[2].length, c = p[1], s = p[3] === void 0 ? Je : p[3] === '"' ? Ei : Mi) : s === Ei || s === Mi ? s = Je : s === Ui || s === Ri ? s = dt : (s = Je, o = void 0);
|
|
264
264
|
const $ = s === Je && t[r + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
a += s ===
|
|
265
|
+
a += s === dt ? d + bn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Ve + $) : d + Ve + (u === -2 ? r : $);
|
|
266
266
|
}
|
|
267
267
|
return [en(t, a + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
268
268
|
};
|
|
269
|
-
class
|
|
269
|
+
class yt {
|
|
270
270
|
constructor({ strings: e, _$litType$: n }, i) {
|
|
271
271
|
let o;
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let a = 0, s = 0;
|
|
274
274
|
const r = e.length - 1, d = this.parts, [c, p] = vn(e, n);
|
|
275
|
-
if (this.el =
|
|
275
|
+
if (this.el = yt.createElement(c, i), Ze.currentNode = this.el.content, n === 2 || n === 3) {
|
|
276
276
|
const u = this.el.content.firstChild;
|
|
277
277
|
u.replaceWith(...u.childNodes);
|
|
278
278
|
}
|
|
279
279
|
for (; (o = Ze.nextNode()) !== null && d.length < r; ) {
|
|
280
280
|
if (o.nodeType === 1) {
|
|
281
281
|
if (o.hasAttributes()) for (const u of o.getAttributeNames()) if (u.endsWith(Ti)) {
|
|
282
|
-
const m = p[s++], $ = o.getAttribute(u).split(
|
|
282
|
+
const m = p[s++], $ = o.getAttribute(u).split(Ve), E = /([.?@])?(.*)/.exec(m);
|
|
283
283
|
d.push({ type: 1, index: a, name: E[2], strings: $, ctor: E[1] === "." ? An : E[1] === "?" ? kn : E[1] === "@" ? Sn : Et }), o.removeAttribute(u);
|
|
284
|
-
} else u.startsWith(
|
|
284
|
+
} else u.startsWith(Ve) && (d.push({ type: 6, index: a }), o.removeAttribute(u));
|
|
285
285
|
if (Oi.test(o.tagName)) {
|
|
286
|
-
const u = o.textContent.split(
|
|
286
|
+
const u = o.textContent.split(Ve), m = u.length - 1;
|
|
287
287
|
if (m > 0) {
|
|
288
|
-
o.textContent =
|
|
289
|
-
for (let $ = 0; $ < m; $++) o.append(u[$],
|
|
290
|
-
o.append(u[m],
|
|
288
|
+
o.textContent = xt ? xt.emptyScript : "";
|
|
289
|
+
for (let $ = 0; $ < m; $++) o.append(u[$], ft()), Ze.nextNode(), d.push({ type: 2, index: ++a });
|
|
290
|
+
o.append(u[m], ft());
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
} else if (o.nodeType === 8) if (o.data === zi) d.push({ type: 2, index: a });
|
|
294
294
|
else {
|
|
295
295
|
let u = -1;
|
|
296
|
-
for (; (u = o.data.indexOf(
|
|
296
|
+
for (; (u = o.data.indexOf(Ve, u + 1)) !== -1; ) d.push({ type: 7, index: a }), u += Ve.length - 1;
|
|
297
297
|
}
|
|
298
298
|
a++;
|
|
299
299
|
}
|
|
@@ -303,11 +303,11 @@ class ft {
|
|
|
303
303
|
return i.innerHTML = e, i;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
if (e ===
|
|
306
|
+
function ot(t, e, n = t, i) {
|
|
307
|
+
if (e === nt) return e;
|
|
308
308
|
let o = i !== void 0 ? n._$Co?.[i] : n._$Cl;
|
|
309
|
-
const a =
|
|
310
|
-
return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e =
|
|
309
|
+
const a = gt(e) ? void 0 : e._$litDirective$;
|
|
310
|
+
return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e = ot(t, o._$AS(t, e.values), o, i)), e;
|
|
311
311
|
}
|
|
312
312
|
class In {
|
|
313
313
|
constructor(e, n) {
|
|
@@ -326,7 +326,7 @@ class In {
|
|
|
326
326
|
for (; d !== void 0; ) {
|
|
327
327
|
if (s === d.index) {
|
|
328
328
|
let c;
|
|
329
|
-
d.type === 2 ? c = new
|
|
329
|
+
d.type === 2 ? c = new vt(a, a.nextSibling, this, e) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, e) : d.type === 6 && (c = new $n(a, this, e)), this._$AV.push(c), d = i[++r];
|
|
330
330
|
}
|
|
331
331
|
s !== d?.index && (a = Ze.nextNode(), s++);
|
|
332
332
|
}
|
|
@@ -337,7 +337,7 @@ class In {
|
|
|
337
337
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, n), n += i.strings.length - 2) : i._$AI(e[n])), n++;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
class
|
|
340
|
+
class vt {
|
|
341
341
|
get _$AU() {
|
|
342
342
|
return this._$AM?._$AU ?? this._$Cv;
|
|
343
343
|
}
|
|
@@ -356,7 +356,7 @@ class bt {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(e, n = this) {
|
|
359
|
-
e =
|
|
359
|
+
e = ot(this, e, n), gt(e) ? e === C || e == null || e === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : e !== this._$AH && e !== nt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : wn(e) ? this.k(e) : this._(e);
|
|
360
360
|
}
|
|
361
361
|
O(e) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -365,10 +365,10 @@ class bt {
|
|
|
365
365
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
366
366
|
}
|
|
367
367
|
_(e) {
|
|
368
|
-
this._$AH !== C &&
|
|
368
|
+
this._$AH !== C && gt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Te.createTextNode(e)), this._$AH = e;
|
|
369
369
|
}
|
|
370
370
|
$(e) {
|
|
371
|
-
const { values: n, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el =
|
|
371
|
+
const { values: n, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = yt.createElement(en(i.h, i.h[0]), this.options)), i);
|
|
372
372
|
if (this._$AH?._$AD === o) this._$AH.p(n);
|
|
373
373
|
else {
|
|
374
374
|
const a = new In(o, this), s = a.u(this.options);
|
|
@@ -377,13 +377,13 @@ class bt {
|
|
|
377
377
|
}
|
|
378
378
|
_$AC(e) {
|
|
379
379
|
let n = qi.get(e.strings);
|
|
380
|
-
return n === void 0 && qi.set(e.strings, n = new
|
|
380
|
+
return n === void 0 && qi.set(e.strings, n = new yt(e)), n;
|
|
381
381
|
}
|
|
382
382
|
k(e) {
|
|
383
383
|
mi(this._$AH) || (this._$AH = [], this._$AR());
|
|
384
384
|
const n = this._$AH;
|
|
385
385
|
let i, o = 0;
|
|
386
|
-
for (const a of e) o === n.length ? n.push(i = new
|
|
386
|
+
for (const a of e) o === n.length ? n.push(i = new vt(this.O(ft()), this.O(ft()), this, this.options)) : i = n[o], i._$AI(a), o++;
|
|
387
387
|
o < n.length && (this._$AR(i && i._$AB.nextSibling, o), n.length = o);
|
|
388
388
|
}
|
|
389
389
|
_$AR(e = this._$AA.nextSibling, n) {
|
|
@@ -409,11 +409,11 @@ class Et {
|
|
|
409
409
|
_$AI(e, n = this, i, o) {
|
|
410
410
|
const a = this.strings;
|
|
411
411
|
let s = !1;
|
|
412
|
-
if (a === void 0) e =
|
|
412
|
+
if (a === void 0) e = ot(this, e, n, 0), s = !gt(e) || e !== this._$AH && e !== nt, s && (this._$AH = e);
|
|
413
413
|
else {
|
|
414
414
|
const r = e;
|
|
415
415
|
let d, c;
|
|
416
|
-
for (e = a[0], d = 0; d < a.length - 1; d++) c =
|
|
416
|
+
for (e = a[0], d = 0; d < a.length - 1; d++) c = ot(this, r[i + d], n, d), c === nt && (c = this._$AH[d]), s ||= !gt(c) || c !== this._$AH[d], c === C ? e = C : e !== C && (e += (c ?? "") + a[d + 1]), this._$AH[d] = c;
|
|
417
417
|
}
|
|
418
418
|
s && !o && this.j(e);
|
|
419
419
|
}
|
|
@@ -442,7 +442,7 @@ class Sn extends Et {
|
|
|
442
442
|
super(e, n, i, o, a), this.type = 5;
|
|
443
443
|
}
|
|
444
444
|
_$AI(e, n = this) {
|
|
445
|
-
if ((e =
|
|
445
|
+
if ((e = ot(this, e, n, 0) ?? C) === nt) return;
|
|
446
446
|
const i = this._$AH, o = e === C && i !== C || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, a = e !== C && (i === C || o);
|
|
447
447
|
o && this.element.removeEventListener(this.name, this, i), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
448
448
|
}
|
|
@@ -458,17 +458,17 @@ class $n {
|
|
|
458
458
|
return this._$AM._$AU;
|
|
459
459
|
}
|
|
460
460
|
_$AI(e) {
|
|
461
|
-
|
|
461
|
+
ot(this, e);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
const jn = yi.litHtmlPolyfillSupport;
|
|
465
|
-
jn?.(
|
|
465
|
+
jn?.(yt, vt), (yi.litHtmlVersions ??= []).push("3.3.3");
|
|
466
466
|
const Pn = (t, e, n) => {
|
|
467
467
|
const i = n?.renderBefore ?? e;
|
|
468
468
|
let o = i._$litPart$;
|
|
469
469
|
if (o === void 0) {
|
|
470
470
|
const a = n?.renderBefore ?? null;
|
|
471
|
-
i._$litPart$ = o = new
|
|
471
|
+
i._$litPart$ = o = new vt(e.insertBefore(ft(), a), a, void 0, n ?? {});
|
|
472
472
|
}
|
|
473
473
|
return o._$AI(t), o;
|
|
474
474
|
};
|
|
@@ -492,7 +492,7 @@ class Qe extends et {
|
|
|
492
492
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
493
|
}
|
|
494
494
|
render() {
|
|
495
|
-
return
|
|
495
|
+
return nt;
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
Qe._$litElement$ = !0, Qe.finalized = !0, bi.litElementHydrateSupport?.({ LitElement: Qe });
|
|
@@ -504,7 +504,7 @@ const ze = (t) => (e, n) => {
|
|
|
504
504
|
customElements.define(t, e);
|
|
505
505
|
}) : customElements.define(t, e);
|
|
506
506
|
};
|
|
507
|
-
const Cn = { attribute: !0, type: String, converter:
|
|
507
|
+
const Cn = { attribute: !0, type: String, converter: Pt, reflect: !1, hasChanged: gi }, Un = (t = Cn, e, n) => {
|
|
508
508
|
const { kind: i, metadata: o } = n;
|
|
509
509
|
let a = globalThis.litPropertyMetadata.get(o);
|
|
510
510
|
if (a === void 0 && globalThis.litPropertyMetadata.set(o, a = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), a.set(n.name, t), i === "accessor") {
|
|
@@ -525,34 +525,34 @@ const Cn = { attribute: !0, type: String, converter: $t, reflect: !1, hasChanged
|
|
|
525
525
|
}
|
|
526
526
|
throw Error("Unsupported decorator location: " + i);
|
|
527
527
|
};
|
|
528
|
-
function
|
|
528
|
+
function O(t) {
|
|
529
529
|
return (e, n) => typeof n == "object" ? Un(t, e, n) : ((i, o, a) => {
|
|
530
530
|
const s = o.hasOwnProperty(a);
|
|
531
531
|
return o.constructor.createProperty(a, i), s ? Object.getOwnPropertyDescriptor(o, a) : void 0;
|
|
532
532
|
})(t, e, n);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
return
|
|
534
|
+
function D(t) {
|
|
535
|
+
return O({ ...t, state: !0, attribute: !1 });
|
|
536
536
|
}
|
|
537
|
-
const
|
|
537
|
+
const Rn = (t, e, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, n), n);
|
|
538
538
|
function wi(t, e) {
|
|
539
539
|
return (n, i, o) => {
|
|
540
540
|
const a = (s) => s.renderRoot?.querySelector(t) ?? null;
|
|
541
|
-
return
|
|
541
|
+
return Rn(n, i, { get() {
|
|
542
542
|
return a(this);
|
|
543
543
|
} });
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Mn(t) {
|
|
547
547
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
548
548
|
}
|
|
549
|
-
var
|
|
549
|
+
var lt = { exports: {} }, Gt = { exports: {} }, $t = { exports: {} }, En = $t.exports, _i;
|
|
550
550
|
function tn() {
|
|
551
551
|
return _i || (_i = 1, (function(t) {
|
|
552
552
|
(function(e) {
|
|
553
553
|
var n, i = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, o = Math.ceil, a = Math.floor, s = "[BigNumber Error] ", r = s + "Number primitive has more than 15 significant digits: ", d = 1e14, c = 14, p = 9007199254740991, u = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], m = 1e7, $ = 1e9;
|
|
554
554
|
function E(H) {
|
|
555
|
-
var L, te,
|
|
555
|
+
var L, te, V, R = U.prototype = { constructor: U, toString: null, valueOf: null }, Y = new U(1), Q = 20, ie = 4, ce = -7, le = 21, Re = -1e7, ke = 1e7, _e = !1, rt = 1, Xe = 0, Nt = {
|
|
556
556
|
prefix: "",
|
|
557
557
|
groupSize: 3,
|
|
558
558
|
secondaryGroupSize: 0,
|
|
@@ -568,7 +568,7 @@ function tn() {
|
|
|
568
568
|
if (!(A instanceof U)) return new U(l, f);
|
|
569
569
|
if (f == null) {
|
|
570
570
|
if (l && l._isBigNumber === !0) {
|
|
571
|
-
A.s = l.s, !l.c || l.e > ke ? A.c = A.e = null : l.e <
|
|
571
|
+
A.s = l.s, !l.c || l.e > ke ? A.c = A.e = null : l.e < Re ? A.c = [A.e = 0] : (A.e = l.e, A.c = l.c.slice());
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
574
|
if ((y = typeof l == "number") && l * 0 == 0) {
|
|
@@ -579,7 +579,7 @@ function tn() {
|
|
|
579
579
|
}
|
|
580
580
|
S = String(l);
|
|
581
581
|
} else {
|
|
582
|
-
if (!i.test(S = String(l))) return
|
|
582
|
+
if (!i.test(S = String(l))) return V(A, S, y);
|
|
583
583
|
A.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
|
|
584
584
|
}
|
|
585
585
|
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (j = S.search(/e/i)) > 0 ? (I < 0 && (I = j), I += +S.slice(j + 1), S = S.substring(0, j)) : I < 0 && (I = S.length);
|
|
@@ -587,7 +587,7 @@ function tn() {
|
|
|
587
587
|
if (_(f, 2, Ye.length, "Base"), f == 10 && Ht)
|
|
588
588
|
return A = new U(l), Se(A, Q + A.e + 1, ie);
|
|
589
589
|
if (S = String(l), y = typeof l == "number") {
|
|
590
|
-
if (l * 0 != 0) return
|
|
590
|
+
if (l * 0 != 0) return V(A, S, y, f);
|
|
591
591
|
if (A.s = 1 / l < 0 ? (S = S.slice(1), -1) : 1, U.DEBUG && S.replace(/^0\.0*|\./, "").length > 15)
|
|
592
592
|
throw Error(r + l);
|
|
593
593
|
} else
|
|
@@ -603,7 +603,7 @@ function tn() {
|
|
|
603
603
|
b = !0, j = -1, I = 0;
|
|
604
604
|
continue;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return V(A, String(l), y, f);
|
|
607
607
|
}
|
|
608
608
|
y = !1, S = te(S, f, 10, A.s), (I = S.indexOf(".")) > -1 ? S = S.replace(".", "") : I = S.length;
|
|
609
609
|
}
|
|
@@ -614,7 +614,7 @@ function tn() {
|
|
|
614
614
|
throw Error(r + A.s * l);
|
|
615
615
|
if ((I = I - j - 1) > ke)
|
|
616
616
|
A.c = A.e = null;
|
|
617
|
-
else if (I <
|
|
617
|
+
else if (I < Re)
|
|
618
618
|
A.c = [A.e = 0];
|
|
619
619
|
else {
|
|
620
620
|
if (A.e = I, A.c = [], j = (I + 1) % c, I < 0 && (j += c), j < v) {
|
|
@@ -633,11 +633,11 @@ function tn() {
|
|
|
633
633
|
var f, g;
|
|
634
634
|
if (l != null)
|
|
635
635
|
if (typeof l == "object") {
|
|
636
|
-
if (l.hasOwnProperty(f = "DECIMAL_PLACES") && (g = l[f], _(g, 0, $, f), Q = g), l.hasOwnProperty(f = "ROUNDING_MODE") && (g = l[f], _(g, 0, 8, f), ie = g), l.hasOwnProperty(f = "EXPONENTIAL_AT") && (g = l[f], g && g.pop ? (_(g[0], -$, 0, f), _(g[1], 0, $, f), ce = g[0],
|
|
636
|
+
if (l.hasOwnProperty(f = "DECIMAL_PLACES") && (g = l[f], _(g, 0, $, f), Q = g), l.hasOwnProperty(f = "ROUNDING_MODE") && (g = l[f], _(g, 0, 8, f), ie = g), l.hasOwnProperty(f = "EXPONENTIAL_AT") && (g = l[f], g && g.pop ? (_(g[0], -$, 0, f), _(g[1], 0, $, f), ce = g[0], le = g[1]) : (_(g, -$, $, f), ce = -(le = g < 0 ? -g : g))), l.hasOwnProperty(f = "RANGE"))
|
|
637
637
|
if (g = l[f], g && g.pop)
|
|
638
|
-
_(g[0], -$, -1, f), _(g[1], 1, $, f),
|
|
638
|
+
_(g[0], -$, -1, f), _(g[1], 1, $, f), Re = g[0], ke = g[1];
|
|
639
639
|
else if (_(g, -$, $, f), g)
|
|
640
|
-
|
|
640
|
+
Re = -(ke = g < 0 ? -g : g);
|
|
641
641
|
else
|
|
642
642
|
throw Error(s + f + " cannot be zero: " + g);
|
|
643
643
|
if (l.hasOwnProperty(f = "CRYPTO"))
|
|
@@ -651,7 +651,7 @@ function tn() {
|
|
|
651
651
|
_e = g;
|
|
652
652
|
else
|
|
653
653
|
throw Error(s + f + " not true or false: " + g);
|
|
654
|
-
if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f], _(g, 0, 9, f),
|
|
654
|
+
if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f], _(g, 0, 9, f), rt = g), l.hasOwnProperty(f = "POW_PRECISION") && (g = l[f], _(g, 0, $, f), Xe = g), l.hasOwnProperty(f = "FORMAT"))
|
|
655
655
|
if (g = l[f], typeof g == "object") Nt = g;
|
|
656
656
|
else throw Error(s + f + " not an object: " + g);
|
|
657
657
|
if (l.hasOwnProperty(f = "ALPHABET"))
|
|
@@ -664,11 +664,11 @@ function tn() {
|
|
|
664
664
|
return {
|
|
665
665
|
DECIMAL_PLACES: Q,
|
|
666
666
|
ROUNDING_MODE: ie,
|
|
667
|
-
EXPONENTIAL_AT: [ce,
|
|
668
|
-
RANGE: [
|
|
667
|
+
EXPONENTIAL_AT: [ce, le],
|
|
668
|
+
RANGE: [Re, ke],
|
|
669
669
|
CRYPTO: _e,
|
|
670
|
-
MODULO_MODE:
|
|
671
|
-
POW_PRECISION:
|
|
670
|
+
MODULO_MODE: rt,
|
|
671
|
+
POW_PRECISION: Xe,
|
|
672
672
|
FORMAT: Nt,
|
|
673
673
|
ALPHABET: Ye
|
|
674
674
|
};
|
|
@@ -741,31 +741,31 @@ function tn() {
|
|
|
741
741
|
return y.reverse();
|
|
742
742
|
}
|
|
743
743
|
return function(g, k, b, I, j) {
|
|
744
|
-
var y, v, S, A, x,
|
|
745
|
-
for (
|
|
746
|
-
ae(W(
|
|
744
|
+
var y, v, S, A, x, B, X, ne, ue = g.indexOf("."), ge = Q, ee = ie;
|
|
745
|
+
for (ue >= 0 && (A = Xe, Xe = 0, g = g.replace(".", ""), ne = new U(k), B = ne.pow(g.length - ue), Xe = A, ne.c = f(
|
|
746
|
+
ae(W(B.c), B.e, "0"),
|
|
747
747
|
10,
|
|
748
748
|
b,
|
|
749
749
|
l
|
|
750
|
-
), ne.e = ne.c.length),
|
|
751
|
-
if (!
|
|
752
|
-
if (
|
|
753
|
-
g = x ? ae(y.charAt(1), -
|
|
750
|
+
), ne.e = ne.c.length), X = f(g, k, b, j ? (y = Ye, l) : (y = l, Ye)), S = A = X.length; X[--A] == 0; X.pop()) ;
|
|
751
|
+
if (!X[0]) return y.charAt(0);
|
|
752
|
+
if (ue < 0 ? --S : (B.c = X, B.e = S, B.s = I, B = L(B, ne, ge, ee, b), X = B.c, x = B.r, S = B.e), v = S + ge + 1, ue = X[v], A = b / 2, x = x || v < 0 || X[v + 1] != null, x = ee < 4 ? (ue != null || x) && (ee == 0 || ee == (B.s < 0 ? 3 : 2)) : ue > A || ue == A && (ee == 4 || x || ee == 6 && X[v - 1] & 1 || ee == (B.s < 0 ? 8 : 7)), v < 1 || !X[0])
|
|
753
|
+
g = x ? ae(y.charAt(1), -ge, y.charAt(0)) : y.charAt(0);
|
|
754
754
|
else {
|
|
755
|
-
if (
|
|
756
|
-
for (--b; ++
|
|
757
|
-
|
|
758
|
-
for (A =
|
|
759
|
-
for (
|
|
755
|
+
if (X.length = v, x)
|
|
756
|
+
for (--b; ++X[--v] > b; )
|
|
757
|
+
X[v] = 0, v || (++S, X = [1].concat(X));
|
|
758
|
+
for (A = X.length; !X[--A]; ) ;
|
|
759
|
+
for (ue = 0, g = ""; ue <= A; g += y.charAt(X[ue++])) ;
|
|
760
760
|
g = ae(g, S, y.charAt(0));
|
|
761
761
|
}
|
|
762
762
|
return g;
|
|
763
763
|
};
|
|
764
764
|
})(), L = /* @__PURE__ */ (function() {
|
|
765
765
|
function l(k, b, I) {
|
|
766
|
-
var j, y, v, S, A = 0, x = k.length,
|
|
766
|
+
var j, y, v, S, A = 0, x = k.length, B = b % m, X = b / m | 0;
|
|
767
767
|
for (k = k.slice(); x--; )
|
|
768
|
-
v = k[x] % m, S = k[x] / m | 0, j =
|
|
768
|
+
v = k[x] % m, S = k[x] / m | 0, j = X * v + S * B, y = B * v + j % m * m + A, A = (y / I | 0) + (j / m | 0) + X * S, k[x] = y % I;
|
|
769
769
|
return A && (k = [A].concat(k)), k;
|
|
770
770
|
}
|
|
771
771
|
function f(k, b, I, j) {
|
|
@@ -786,49 +786,49 @@ function tn() {
|
|
|
786
786
|
for (; !k[0] && k.length > 1; k.splice(0, 1)) ;
|
|
787
787
|
}
|
|
788
788
|
return function(k, b, I, j, y) {
|
|
789
|
-
var v, S, A, x,
|
|
790
|
-
if (!
|
|
789
|
+
var v, S, A, x, B, X, ne, ue, ge, ee, re, we, It, Xt, Vt, Me, ct, $e = k.s == b.s ? 1 : -1, Ie = k.c, pe = b.c;
|
|
790
|
+
if (!Ie || !Ie[0] || !pe || !pe[0])
|
|
791
791
|
return new U(
|
|
792
792
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
793
|
-
!k.s || !b.s || (
|
|
793
|
+
!k.s || !b.s || (Ie ? pe && Ie[0] == pe[0] : !pe) ? NaN : (
|
|
794
794
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
795
|
-
|
|
795
|
+
Ie && Ie[0] == 0 || !pe ? $e * 0 : $e / 0
|
|
796
796
|
)
|
|
797
797
|
);
|
|
798
|
-
for (
|
|
799
|
-
if (
|
|
800
|
-
|
|
798
|
+
for (ue = new U($e), ge = ue.c = [], S = k.e - b.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(b.e / c), $e = $e / c | 0), A = 0; pe[A] == (Ie[A] || 0); A++) ;
|
|
799
|
+
if (pe[A] > (Ie[A] || 0) && S--, $e < 0)
|
|
800
|
+
ge.push(1), x = !0;
|
|
801
801
|
else {
|
|
802
|
-
for (Xt =
|
|
803
|
-
|
|
802
|
+
for (Xt = Ie.length, Me = pe.length, A = 0, $e += 2, B = a(y / (pe[0] + 1)), B > 1 && (pe = l(pe, B, y), Ie = l(Ie, B, y), Me = pe.length, Xt = Ie.length), It = Me, ee = Ie.slice(0, Me), re = ee.length; re < Me; ee[re++] = 0) ;
|
|
803
|
+
ct = pe.slice(), ct = [0].concat(ct), Vt = pe[0], pe[1] >= y / 2 && Vt++;
|
|
804
804
|
do {
|
|
805
|
-
if (
|
|
806
|
-
if (
|
|
807
|
-
for (
|
|
808
|
-
|
|
805
|
+
if (B = 0, v = f(pe, ee, Me, re), v < 0) {
|
|
806
|
+
if (we = ee[0], Me != re && (we = we * y + (ee[1] || 0)), B = a(we / Vt), B > 1)
|
|
807
|
+
for (B >= y && (B = y - 1), X = l(pe, B, y), ne = X.length, re = ee.length; f(X, ee, ne, re) == 1; )
|
|
808
|
+
B--, g(X, Me < ne ? ct : pe, ne, y), ne = X.length, v = 1;
|
|
809
809
|
else
|
|
810
|
-
|
|
811
|
-
if (ne < re && (
|
|
812
|
-
for (; f(
|
|
813
|
-
|
|
814
|
-
} else v === 0 && (
|
|
815
|
-
|
|
816
|
-
} while ((
|
|
817
|
-
x =
|
|
810
|
+
B == 0 && (v = B = 1), X = pe.slice(), ne = X.length;
|
|
811
|
+
if (ne < re && (X = [0].concat(X)), g(ee, X, re, y), re = ee.length, v == -1)
|
|
812
|
+
for (; f(pe, ee, Me, re) < 1; )
|
|
813
|
+
B++, g(ee, Me < re ? ct : pe, re, y), re = ee.length;
|
|
814
|
+
} else v === 0 && (B++, ee = [0]);
|
|
815
|
+
ge[A++] = B, ee[0] ? ee[re++] = Ie[It] || 0 : (ee = [Ie[It]], re = 1);
|
|
816
|
+
} while ((It++ < Xt || ee[0] != null) && $e--);
|
|
817
|
+
x = ee[0] != null, ge[0] || ge.splice(0, 1);
|
|
818
818
|
}
|
|
819
819
|
if (y == d) {
|
|
820
|
-
for (A = 1, $e =
|
|
821
|
-
Se(
|
|
820
|
+
for (A = 1, $e = ge[0]; $e >= 10; $e /= 10, A++) ;
|
|
821
|
+
Se(ue, I + (ue.e = A + S * c - 1) + 1, j, x);
|
|
822
822
|
} else
|
|
823
|
-
|
|
824
|
-
return
|
|
823
|
+
ue.e = S, ue.r = +x;
|
|
824
|
+
return ue;
|
|
825
825
|
};
|
|
826
826
|
})();
|
|
827
827
|
function Dt(l, f, g, k) {
|
|
828
828
|
var b, I, j, y, v;
|
|
829
829
|
if (g == null ? g = ie : _(g, 0, 8), !l.c) return l.toString();
|
|
830
830
|
if (b = l.c[0], j = l.e, f == null)
|
|
831
|
-
v = W(l.c), v = k == 1 || k == 2 && (j <= ce || j >=
|
|
831
|
+
v = W(l.c), v = k == 1 || k == 2 && (j <= ce || j >= le) ? J(v, j) : ae(v, j, "0");
|
|
832
832
|
else if (l = Se(new U(l), f, g), I = l.e, v = W(l.c), y = v.length, k == 1 || k == 2 && (f <= I || I <= ce)) {
|
|
833
833
|
for (; y < f; v += "0", y++) ;
|
|
834
834
|
v = J(v, I);
|
|
@@ -846,17 +846,17 @@ function tn() {
|
|
|
846
846
|
function Bt(l, f, g) {
|
|
847
847
|
for (var k = 1, b = f.length; !f[--b]; f.pop()) ;
|
|
848
848
|
for (b = f[0]; b >= 10; b /= 10, k++) ;
|
|
849
|
-
return (g = k + g * c - 1) > ke ? l.c = l.e = null : g <
|
|
849
|
+
return (g = k + g * c - 1) > ke ? l.c = l.e = null : g < Re ? l.c = [l.e = 0] : (l.e = g, l.c = f), l;
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
V = /* @__PURE__ */ (function() {
|
|
852
852
|
var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
853
853
|
return function(I, j, y, v) {
|
|
854
854
|
var S, A = y ? j : j.replace(b, "");
|
|
855
855
|
if (k.test(A))
|
|
856
856
|
I.s = isNaN(A) ? null : A < 0 ? -1 : 1;
|
|
857
857
|
else {
|
|
858
|
-
if (!y && (A = A.replace(l, function(x,
|
|
859
|
-
return S = (
|
|
858
|
+
if (!y && (A = A.replace(l, function(x, B, X) {
|
|
859
|
+
return S = (X = X.toLowerCase()) == "x" ? 16 : X == "b" ? 2 : 8, !v || v == S ? B : x;
|
|
860
860
|
}), v && (S = v, A = A.replace(f, "$1").replace(g, "0.$1")), j != A))
|
|
861
861
|
return new U(A, S);
|
|
862
862
|
if (U.DEBUG)
|
|
@@ -867,12 +867,12 @@ function tn() {
|
|
|
867
867
|
};
|
|
868
868
|
})();
|
|
869
869
|
function Se(l, f, g, k) {
|
|
870
|
-
var b, I, j, y, v, S, A, x = l.c,
|
|
870
|
+
var b, I, j, y, v, S, A, x = l.c, B = u;
|
|
871
871
|
if (x) {
|
|
872
872
|
e: {
|
|
873
873
|
for (b = 1, y = x[0]; y >= 10; y /= 10, b++) ;
|
|
874
874
|
if (I = f - b, I < 0)
|
|
875
|
-
I += c, j = f, v = x[S = 0], A = a(v /
|
|
875
|
+
I += c, j = f, v = x[S = 0], A = a(v / B[b - j - 1] % 10);
|
|
876
876
|
else if (S = o((I + 1) / c), S >= x.length)
|
|
877
877
|
if (k) {
|
|
878
878
|
for (; x.length <= S; x.push(0)) ;
|
|
@@ -881,15 +881,15 @@ function tn() {
|
|
|
881
881
|
break e;
|
|
882
882
|
else {
|
|
883
883
|
for (v = y = x[S], b = 1; y >= 10; y /= 10, b++) ;
|
|
884
|
-
I %= c, j = I - c + b, A = j < 0 ? 0 : a(v /
|
|
884
|
+
I %= c, j = I - c + b, A = j < 0 ? 0 : a(v / B[b - j - 1] % 10);
|
|
885
885
|
}
|
|
886
886
|
if (k = k || f < 0 || // Are there any non-zero digits after the rounding digit?
|
|
887
887
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
888
888
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
889
|
-
x[S + 1] != null || (j < 0 ? v : v %
|
|
890
|
-
(I > 0 ? j > 0 ? v /
|
|
891
|
-
return x.length = 0, k ? (f -= l.e + 1, x[0] =
|
|
892
|
-
if (I == 0 ? (x.length = S, y = 1, S--) : (x.length = S + 1, y =
|
|
889
|
+
x[S + 1] != null || (j < 0 ? v : v % B[b - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
890
|
+
(I > 0 ? j > 0 ? v / B[b - j] : 0 : x[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !x[0])
|
|
891
|
+
return x.length = 0, k ? (f -= l.e + 1, x[0] = B[(c - f % c) % c], l.e = -f || 0) : x[0] = l.e = 0, l;
|
|
892
|
+
if (I == 0 ? (x.length = S, y = 1, S--) : (x.length = S + 1, y = B[c - I], x[S] = j > 0 ? a(v / B[b - j] % B[j]) * y : 0), k)
|
|
893
893
|
for (; ; )
|
|
894
894
|
if (S == 0) {
|
|
895
895
|
for (I = 1, j = x[0]; j >= 10; j /= 10, I++) ;
|
|
@@ -902,31 +902,31 @@ function tn() {
|
|
|
902
902
|
}
|
|
903
903
|
for (I = x.length; x[--I] === 0; x.pop()) ;
|
|
904
904
|
}
|
|
905
|
-
l.e > ke ? l.c = l.e = null : l.e <
|
|
905
|
+
l.e > ke ? l.c = l.e = null : l.e < Re && (l.c = [l.e = 0]);
|
|
906
906
|
}
|
|
907
907
|
return l;
|
|
908
908
|
}
|
|
909
909
|
function Le(l) {
|
|
910
910
|
var f, g = l.e;
|
|
911
|
-
return g === null ? l.toString() : (f = W(l.c), f = g <= ce || g >=
|
|
911
|
+
return g === null ? l.toString() : (f = W(l.c), f = g <= ce || g >= le ? J(f, g) : ae(f, g, "0"), l.s < 0 ? "-" + f : f);
|
|
912
912
|
}
|
|
913
|
-
return
|
|
913
|
+
return R.absoluteValue = R.abs = function() {
|
|
914
914
|
var l = new U(this);
|
|
915
915
|
return l.s < 0 && (l.s = 1), l;
|
|
916
|
-
},
|
|
916
|
+
}, R.comparedTo = function(l, f) {
|
|
917
917
|
return K(this, new U(l, f));
|
|
918
|
-
},
|
|
918
|
+
}, R.decimalPlaces = R.dp = function(l, f) {
|
|
919
919
|
var g, k, b, I = this;
|
|
920
920
|
if (l != null)
|
|
921
921
|
return _(l, 0, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l + I.e + 1, f);
|
|
922
922
|
if (!(g = I.c)) return null;
|
|
923
923
|
if (k = ((b = g.length - 1) - Z(this.e / c)) * c, b = g[b]) for (; b % 10 == 0; b /= 10, k--) ;
|
|
924
924
|
return k < 0 && (k = 0), k;
|
|
925
|
-
},
|
|
925
|
+
}, R.dividedBy = R.div = function(l, f) {
|
|
926
926
|
return L(this, new U(l, f), Q, ie);
|
|
927
|
-
},
|
|
927
|
+
}, R.dividedToIntegerBy = R.idiv = function(l, f) {
|
|
928
928
|
return L(this, new U(l, f), 0, 1);
|
|
929
|
-
},
|
|
929
|
+
}, R.exponentiatedBy = R.pow = function(l, f) {
|
|
930
930
|
var g, k, b, I, j, y, v, S, A, x = this;
|
|
931
931
|
if (l = new U(l), l.c && !l.isInteger())
|
|
932
932
|
throw Error(s + "Exponent not an integer: " + Le(l));
|
|
@@ -938,7 +938,7 @@ function tn() {
|
|
|
938
938
|
} else {
|
|
939
939
|
if (l.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || y && x.c[1] >= 24e7 : x.c[0] < 8e13 || y && x.c[0] <= 9999975e7)))
|
|
940
940
|
return I = x.s < 0 && N(l) ? -0 : 0, x.e > -1 && (I = 1 / I), new U(v ? 1 / I : I);
|
|
941
|
-
|
|
941
|
+
Xe && (I = o(Xe / c + 2));
|
|
942
942
|
}
|
|
943
943
|
for (y ? (g = new U(0.5), v && (l.s = 1), S = N(l)) : (b = Math.abs(+Le(l)), S = b % 2), A = new U(Y); ; ) {
|
|
944
944
|
if (S) {
|
|
@@ -956,33 +956,33 @@ function tn() {
|
|
|
956
956
|
}
|
|
957
957
|
x = x.times(x), I ? x.c && x.c.length > I && (x.c.length = I) : k && (x = x.mod(f));
|
|
958
958
|
}
|
|
959
|
-
return k ? A : (v && (A = Y.div(A)), f ? A.mod(f) : I ? Se(A,
|
|
960
|
-
},
|
|
959
|
+
return k ? A : (v && (A = Y.div(A)), f ? A.mod(f) : I ? Se(A, Xe, ie, j) : A);
|
|
960
|
+
}, R.integerValue = function(l) {
|
|
961
961
|
var f = new U(this);
|
|
962
962
|
return l == null ? l = ie : _(l, 0, 8), Se(f, f.e + 1, l);
|
|
963
|
-
},
|
|
963
|
+
}, R.isEqualTo = R.eq = function(l, f) {
|
|
964
964
|
return K(this, new U(l, f)) === 0;
|
|
965
|
-
},
|
|
965
|
+
}, R.isFinite = function() {
|
|
966
966
|
return !!this.c;
|
|
967
|
-
},
|
|
967
|
+
}, R.isGreaterThan = R.gt = function(l, f) {
|
|
968
968
|
return K(this, new U(l, f)) > 0;
|
|
969
|
-
},
|
|
969
|
+
}, R.isGreaterThanOrEqualTo = R.gte = function(l, f) {
|
|
970
970
|
return (f = K(this, new U(l, f))) === 1 || f === 0;
|
|
971
|
-
},
|
|
971
|
+
}, R.isInteger = function() {
|
|
972
972
|
return !!this.c && Z(this.e / c) > this.c.length - 2;
|
|
973
|
-
},
|
|
973
|
+
}, R.isLessThan = R.lt = function(l, f) {
|
|
974
974
|
return K(this, new U(l, f)) < 0;
|
|
975
|
-
},
|
|
975
|
+
}, R.isLessThanOrEqualTo = R.lte = function(l, f) {
|
|
976
976
|
return (f = K(this, new U(l, f))) === -1 || f === 0;
|
|
977
|
-
},
|
|
977
|
+
}, R.isNaN = function() {
|
|
978
978
|
return !this.s;
|
|
979
|
-
},
|
|
979
|
+
}, R.isNegative = function() {
|
|
980
980
|
return this.s < 0;
|
|
981
|
-
},
|
|
981
|
+
}, R.isPositive = function() {
|
|
982
982
|
return this.s > 0;
|
|
983
|
-
},
|
|
983
|
+
}, R.isZero = function() {
|
|
984
984
|
return !!this.c && this.c[0] == 0;
|
|
985
|
-
},
|
|
985
|
+
}, R.minus = function(l, f) {
|
|
986
986
|
var g, k, b, I, j = this, y = j.s;
|
|
987
987
|
if (l = new U(l, f), f = l.s, !y || !f) return new U(NaN);
|
|
988
988
|
if (y != f)
|
|
@@ -1015,24 +1015,24 @@ function tn() {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
for (; A[0] == 0; A.splice(0, 1), --S) ;
|
|
1017
1017
|
return A[0] ? Bt(l, A, S) : (l.s = ie == 3 ? -1 : 1, l.c = [l.e = 0], l);
|
|
1018
|
-
},
|
|
1018
|
+
}, R.modulo = R.mod = function(l, f) {
|
|
1019
1019
|
var g, k, b = this;
|
|
1020
|
-
return l = new U(l, f), !b.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || b.c && !b.c[0] ? new U(b) : (
|
|
1021
|
-
},
|
|
1022
|
-
var g, k, b, I, j, y, v, S, A, x,
|
|
1023
|
-
if (!re || !
|
|
1024
|
-
return !
|
|
1025
|
-
for (k = Z(
|
|
1026
|
-
for (
|
|
1027
|
-
for (g = 0,
|
|
1028
|
-
S = re[--j] %
|
|
1020
|
+
return l = new U(l, f), !b.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || b.c && !b.c[0] ? new U(b) : (rt == 9 ? (k = l.s, l.s = 1, g = L(b, l, 0, 3), l.s = k, g.s *= k) : g = L(b, l, 0, rt), l = b.minus(g.times(l)), !l.c[0] && rt == 1 && (l.s = b.s), l);
|
|
1021
|
+
}, R.multipliedBy = R.times = function(l, f) {
|
|
1022
|
+
var g, k, b, I, j, y, v, S, A, x, B, X, ne, ue, ge, ee = this, re = ee.c, we = (l = new U(l, f)).c;
|
|
1023
|
+
if (!re || !we || !re[0] || !we[0])
|
|
1024
|
+
return !ee.s || !l.s || re && !re[0] && !we || we && !we[0] && !re ? l.c = l.e = l.s = null : (l.s *= ee.s, !re || !we ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
|
|
1025
|
+
for (k = Z(ee.e / c) + Z(l.e / c), l.s *= ee.s, v = re.length, x = we.length, v < x && (ne = re, re = we, we = ne, b = v, v = x, x = b), b = v + x, ne = []; b--; ne.push(0)) ;
|
|
1026
|
+
for (ue = d, ge = m, b = x; --b >= 0; ) {
|
|
1027
|
+
for (g = 0, B = we[b] % ge, X = we[b] / ge | 0, j = v, I = b + j; I > b; )
|
|
1028
|
+
S = re[--j] % ge, A = re[j] / ge | 0, y = X * S + A * B, S = B * S + y % ge * ge + ne[I] + g, g = (S / ue | 0) + (y / ge | 0) + X * A, ne[I--] = S % ue;
|
|
1029
1029
|
ne[I] = g;
|
|
1030
1030
|
}
|
|
1031
1031
|
return g ? ++k : ne.splice(0, 1), Bt(l, ne, k);
|
|
1032
|
-
},
|
|
1032
|
+
}, R.negated = function() {
|
|
1033
1033
|
var l = new U(this);
|
|
1034
1034
|
return l.s = -l.s || null, l;
|
|
1035
|
-
},
|
|
1035
|
+
}, R.plus = function(l, f) {
|
|
1036
1036
|
var g, k = this, b = k.s;
|
|
1037
1037
|
if (l = new U(l, f), f = l.s, !b || !f) return new U(NaN);
|
|
1038
1038
|
if (b != f)
|
|
@@ -1049,7 +1049,7 @@ function tn() {
|
|
|
1049
1049
|
for (b = y.length, f = v.length, b - f < 0 && (g = v, v = y, y = g, f = b), b = 0; f; )
|
|
1050
1050
|
b = (y[--f] = y[f] + v[f] + b) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
|
|
1051
1051
|
return b && (y = [b].concat(y), ++j), Bt(l, y, j);
|
|
1052
|
-
},
|
|
1052
|
+
}, R.precision = R.sd = function(l, f) {
|
|
1053
1053
|
var g, k, b, I = this;
|
|
1054
1054
|
if (l != null && l !== !!l)
|
|
1055
1055
|
return _(l, 1, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l, f);
|
|
@@ -1059,9 +1059,9 @@ function tn() {
|
|
|
1059
1059
|
for (b = g[0]; b >= 10; b /= 10, k++) ;
|
|
1060
1060
|
}
|
|
1061
1061
|
return l && I.e + 1 > k && (k = I.e + 1), k;
|
|
1062
|
-
},
|
|
1062
|
+
}, R.shiftedBy = function(l) {
|
|
1063
1063
|
return _(l, -p, p), this.times("1e" + l);
|
|
1064
|
-
},
|
|
1064
|
+
}, R.squareRoot = R.sqrt = function() {
|
|
1065
1065
|
var l, f, g, k, b, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new U("0.5");
|
|
1066
1066
|
if (y !== 1 || !j || !j[0])
|
|
1067
1067
|
return new U(!y || y < 0 && (!j || j[0]) ? NaN : j ? I : 1 / 0);
|
|
@@ -1080,21 +1080,21 @@ function tn() {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
return Se(g, g.e + Q + 1, ie, l);
|
|
1083
|
-
},
|
|
1083
|
+
}, R.toExponential = function(l, f) {
|
|
1084
1084
|
return l != null && (_(l, 0, $), l++), Dt(this, l, f, 1);
|
|
1085
|
-
},
|
|
1085
|
+
}, R.toFixed = function(l, f) {
|
|
1086
1086
|
return l != null && (_(l, 0, $), l = l + this.e + 1), Dt(this, l, f);
|
|
1087
|
-
},
|
|
1087
|
+
}, R.toFormat = function(l, f, g) {
|
|
1088
1088
|
var k, b = this;
|
|
1089
1089
|
if (g == null)
|
|
1090
1090
|
l != null && f && typeof f == "object" ? (g = f, f = null) : l && typeof l == "object" ? (g = l, l = f = null) : g = Nt;
|
|
1091
1091
|
else if (typeof g != "object")
|
|
1092
1092
|
throw Error(s + "Argument not an object: " + g);
|
|
1093
1093
|
if (k = b.toFixed(l, f), b.c) {
|
|
1094
|
-
var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], x = j[1],
|
|
1094
|
+
var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], x = j[1], B = b.s < 0, X = B ? A.slice(1) : A, ne = X.length;
|
|
1095
1095
|
if (v && (I = y, y = v, v = I, ne -= I), y > 0 && ne > 0) {
|
|
1096
|
-
for (I = ne % y || y, A =
|
|
1097
|
-
v > 0 && (A += S +
|
|
1096
|
+
for (I = ne % y || y, A = X.substr(0, I); I < ne; I += y) A += S + X.substr(I, y);
|
|
1097
|
+
v > 0 && (A += S + X.slice(I)), B && (A = "-" + A);
|
|
1098
1098
|
}
|
|
1099
1099
|
k = x ? A + (g.decimalSeparator || "") + ((v = +g.fractionGroupSize) ? x.replace(
|
|
1100
1100
|
new RegExp("\\d{" + v + "}\\B", "g"),
|
|
@@ -1102,52 +1102,52 @@ function tn() {
|
|
|
1102
1102
|
) : x) : A;
|
|
1103
1103
|
}
|
|
1104
1104
|
return (g.prefix || "") + k + (g.suffix || "");
|
|
1105
|
-
},
|
|
1106
|
-
var f, g, k, b, I, j, y, v, S, A, x,
|
|
1105
|
+
}, R.toFraction = function(l) {
|
|
1106
|
+
var f, g, k, b, I, j, y, v, S, A, x, B, X = this, ne = X.c;
|
|
1107
1107
|
if (l != null && (y = new U(l), !y.isInteger() && (y.c || y.s !== 1) || y.lt(Y)))
|
|
1108
1108
|
throw Error(s + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + Le(y));
|
|
1109
|
-
if (!ne) return new U(
|
|
1110
|
-
for (f = new U(Y), S = g = new U(Y), k = v = new U(Y),
|
|
1109
|
+
if (!ne) return new U(X);
|
|
1110
|
+
for (f = new U(Y), S = g = new U(Y), k = v = new U(Y), B = W(ne), I = f.e = B.length - X.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = ke, ke = 1 / 0, y = new U(B), v.c[0] = 0; A = L(y, f, 0, 1), b = g.plus(A.times(k)), b.comparedTo(l) != 1; )
|
|
1111
1111
|
g = k, k = b, S = v.plus(A.times(b = S)), v = b, f = y.minus(A.times(b = f)), y = b;
|
|
1112
|
-
return b = L(l.minus(g), k, 0, 1), v = v.plus(b.times(S)), g = g.plus(b.times(k)), v.s = S.s =
|
|
1113
|
-
L(v, g, I, ie).minus(
|
|
1112
|
+
return b = L(l.minus(g), k, 0, 1), v = v.plus(b.times(S)), g = g.plus(b.times(k)), v.s = S.s = X.s, I = I * 2, x = L(S, k, I, ie).minus(X).abs().comparedTo(
|
|
1113
|
+
L(v, g, I, ie).minus(X).abs()
|
|
1114
1114
|
) < 1 ? [S, k] : [v, g], ke = j, x;
|
|
1115
|
-
},
|
|
1115
|
+
}, R.toNumber = function() {
|
|
1116
1116
|
return +Le(this);
|
|
1117
|
-
},
|
|
1117
|
+
}, R.toPrecision = function(l, f) {
|
|
1118
1118
|
return l != null && _(l, 1, $), Dt(this, l, f, 2);
|
|
1119
|
-
},
|
|
1119
|
+
}, R.toString = function(l) {
|
|
1120
1120
|
var f, g = this, k = g.s, b = g.e;
|
|
1121
|
-
return b === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = b <= ce || b >=
|
|
1122
|
-
},
|
|
1121
|
+
return b === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = b <= ce || b >= le ? J(W(g.c), b) : ae(W(g.c), b, "0") : l === 10 && Ht ? (g = Se(new U(g), Q + b + 1, ie), f = ae(W(g.c), g.e, "0")) : (_(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), b, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
|
|
1122
|
+
}, R.valueOf = R.toJSON = function() {
|
|
1123
1123
|
return Le(this);
|
|
1124
|
-
},
|
|
1124
|
+
}, R._isBigNumber = !0, H != null && U.set(H), U;
|
|
1125
1125
|
}
|
|
1126
1126
|
function Z(H) {
|
|
1127
1127
|
var L = H | 0;
|
|
1128
1128
|
return H > 0 || H === L ? L : L - 1;
|
|
1129
1129
|
}
|
|
1130
1130
|
function W(H) {
|
|
1131
|
-
for (var L, te,
|
|
1132
|
-
for (L = H[
|
|
1131
|
+
for (var L, te, V = 1, R = H.length, Y = H[0] + ""; V < R; ) {
|
|
1132
|
+
for (L = H[V++] + "", te = c - L.length; te--; L = "0" + L) ;
|
|
1133
1133
|
Y += L;
|
|
1134
1134
|
}
|
|
1135
|
-
for (
|
|
1136
|
-
return Y.slice(0,
|
|
1135
|
+
for (R = Y.length; Y.charCodeAt(--R) === 48; ) ;
|
|
1136
|
+
return Y.slice(0, R + 1 || 1);
|
|
1137
1137
|
}
|
|
1138
1138
|
function K(H, L) {
|
|
1139
|
-
var te,
|
|
1139
|
+
var te, V, R = H.c, Y = L.c, Q = H.s, ie = L.s, ce = H.e, le = L.e;
|
|
1140
1140
|
if (!Q || !ie) return null;
|
|
1141
|
-
if (te =
|
|
1141
|
+
if (te = R && !R[0], V = Y && !Y[0], te || V) return te ? V ? 0 : -ie : Q;
|
|
1142
1142
|
if (Q != ie) return Q;
|
|
1143
|
-
if (te = Q < 0,
|
|
1144
|
-
if (!
|
|
1145
|
-
for (ie = (ce =
|
|
1146
|
-
return ce ==
|
|
1143
|
+
if (te = Q < 0, V = ce == le, !R || !Y) return V ? 0 : !R ^ te ? 1 : -1;
|
|
1144
|
+
if (!V) return ce > le ^ te ? 1 : -1;
|
|
1145
|
+
for (ie = (ce = R.length) < (le = Y.length) ? ce : le, Q = 0; Q < ie; Q++) if (R[Q] != Y[Q]) return R[Q] > Y[Q] ^ te ? 1 : -1;
|
|
1146
|
+
return ce == le ? 0 : ce > le ^ te ? 1 : -1;
|
|
1147
1147
|
}
|
|
1148
|
-
function _(H, L, te,
|
|
1148
|
+
function _(H, L, te, V) {
|
|
1149
1149
|
if (H < L || H > te || H !== a(H))
|
|
1150
|
-
throw Error(s + (
|
|
1150
|
+
throw Error(s + (V || "Argument") + (typeof H == "number" ? H < L || H > te ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(H));
|
|
1151
1151
|
}
|
|
1152
1152
|
function N(H) {
|
|
1153
1153
|
var L = H.c.length - 1;
|
|
@@ -1157,19 +1157,19 @@ function tn() {
|
|
|
1157
1157
|
return (H.length > 1 ? H.charAt(0) + "." + H.slice(1) : H) + (L < 0 ? "e" : "e+") + L;
|
|
1158
1158
|
}
|
|
1159
1159
|
function ae(H, L, te) {
|
|
1160
|
-
var
|
|
1160
|
+
var V, R;
|
|
1161
1161
|
if (L < 0) {
|
|
1162
|
-
for (
|
|
1163
|
-
H =
|
|
1164
|
-
} else if (
|
|
1165
|
-
for (
|
|
1166
|
-
H +=
|
|
1167
|
-
} else L <
|
|
1162
|
+
for (R = te + "."; ++L; R += te) ;
|
|
1163
|
+
H = R + H;
|
|
1164
|
+
} else if (V = H.length, ++L > V) {
|
|
1165
|
+
for (R = te, L -= V; --L; R += te) ;
|
|
1166
|
+
H += R;
|
|
1167
|
+
} else L < V && (H = H.slice(0, L) + "." + H.slice(L));
|
|
1168
1168
|
return H;
|
|
1169
1169
|
}
|
|
1170
1170
|
n = E(), n.default = n.BigNumber = n, t.exports ? t.exports = n : (e || (e = typeof self < "u" && self ? self : window), e.BigNumber = n);
|
|
1171
1171
|
})(En);
|
|
1172
|
-
})(
|
|
1172
|
+
})($t)), $t.exports;
|
|
1173
1173
|
}
|
|
1174
1174
|
var Li;
|
|
1175
1175
|
function qn() {
|
|
@@ -1384,10 +1384,10 @@ function _n() {
|
|
|
1384
1384
|
}, function(N, J) {
|
|
1385
1385
|
var ae;
|
|
1386
1386
|
return c = N + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
1389
|
-
|
|
1390
|
-
}), J.call(L, te,
|
|
1387
|
+
var V, R = L[te];
|
|
1388
|
+
return R && typeof R == "object" && Object.keys(R).forEach(function(Y) {
|
|
1389
|
+
V = H(R, Y), V !== void 0 ? R[Y] = V : delete R[Y];
|
|
1390
|
+
}), J.call(L, te, R);
|
|
1391
1391
|
})({ "": ae }, "") : ae;
|
|
1392
1392
|
};
|
|
1393
1393
|
};
|
|
@@ -1395,19 +1395,19 @@ function _n() {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
var Hi;
|
|
1397
1397
|
function Ln() {
|
|
1398
|
-
if (Hi) return
|
|
1398
|
+
if (Hi) return lt.exports;
|
|
1399
1399
|
Hi = 1;
|
|
1400
1400
|
var t = qn().stringify, e = _n();
|
|
1401
|
-
return
|
|
1401
|
+
return lt.exports = function(n) {
|
|
1402
1402
|
return {
|
|
1403
1403
|
parse: e(n),
|
|
1404
1404
|
stringify: t
|
|
1405
1405
|
};
|
|
1406
|
-
},
|
|
1406
|
+
}, lt.exports.parse = e(), lt.exports.stringify = t, lt.exports;
|
|
1407
1407
|
}
|
|
1408
1408
|
var Nn = Ln();
|
|
1409
|
-
const vi = /* @__PURE__ */
|
|
1410
|
-
function
|
|
1409
|
+
const vi = /* @__PURE__ */ Mn(Nn);
|
|
1410
|
+
function Ae(t, e, n, i) {
|
|
1411
1411
|
function o(a) {
|
|
1412
1412
|
return a instanceof n ? a : new n(function(s) {
|
|
1413
1413
|
s(a);
|
|
@@ -1438,8 +1438,8 @@ function Hn(t, e, n, i) {
|
|
|
1438
1438
|
if (typeof e == "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1439
1439
|
return n === "m" ? i : n === "a" ? i.call(t) : i ? i.value : e.get(t);
|
|
1440
1440
|
}
|
|
1441
|
-
var
|
|
1442
|
-
class
|
|
1441
|
+
var jt, nn;
|
|
1442
|
+
class We {
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Uses the provided ID as the ID for the resource.
|
|
1445
1445
|
*
|
|
@@ -1456,7 +1456,7 @@ class Ve {
|
|
|
1456
1456
|
* @returns {string}
|
|
1457
1457
|
*/
|
|
1458
1458
|
static unique(e = 7) {
|
|
1459
|
-
const n = Hn(
|
|
1459
|
+
const n = Hn(jt, jt, "m", nn).call(jt);
|
|
1460
1460
|
let i = "";
|
|
1461
1461
|
for (let o = 0; o < e; o++) {
|
|
1462
1462
|
const a = Math.floor(Math.random() * 16).toString(16);
|
|
@@ -1465,7 +1465,7 @@ class Ve {
|
|
|
1465
1465
|
return n + i;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
|
|
1468
|
+
jt = We, nn = function() {
|
|
1469
1469
|
const e = /* @__PURE__ */ new Date(), n = Math.floor(e.getTime() / 1e3), i = e.getMilliseconds();
|
|
1470
1470
|
return n.toString(16) + i.toString(16).padStart(5, "0");
|
|
1471
1471
|
};
|
|
@@ -1583,7 +1583,7 @@ function Yn(t, e) {
|
|
|
1583
1583
|
}
|
|
1584
1584
|
return e;
|
|
1585
1585
|
}
|
|
1586
|
-
const
|
|
1586
|
+
const ve = {
|
|
1587
1587
|
parse: (t) => Dn.parse(t, Yn),
|
|
1588
1588
|
stringify: Bn.stringify
|
|
1589
1589
|
};
|
|
@@ -1652,7 +1652,7 @@ class xe {
|
|
|
1652
1652
|
createHeartbeat: () => {
|
|
1653
1653
|
this.realtime.heartbeat && clearTimeout(this.realtime.heartbeat), this.realtime.heartbeat = window?.setInterval(() => {
|
|
1654
1654
|
var e;
|
|
1655
|
-
(e = this.realtime.socket) === null || e === void 0 || e.send(
|
|
1655
|
+
(e = this.realtime.socket) === null || e === void 0 || e.send(ve.stringify({
|
|
1656
1656
|
type: "ping"
|
|
1657
1657
|
}));
|
|
1658
1658
|
}, 2e4);
|
|
@@ -1687,7 +1687,7 @@ class xe {
|
|
|
1687
1687
|
if (!this.realtime.socket || this.realtime.socket.readyState !== WebSocket.OPEN || this.realtime.pendingSubscribes.size < 1)
|
|
1688
1688
|
return;
|
|
1689
1689
|
const e = Array.from(this.realtime.pendingSubscribes.values());
|
|
1690
|
-
this.realtime.pendingSubscribes.clear(), this.realtime.socket.send(
|
|
1690
|
+
this.realtime.pendingSubscribes.clear(), this.realtime.socket.send(ve.stringify({
|
|
1691
1691
|
type: "subscribe",
|
|
1692
1692
|
data: e
|
|
1693
1693
|
}));
|
|
@@ -1695,16 +1695,16 @@ class xe {
|
|
|
1695
1695
|
onMessage: (e) => {
|
|
1696
1696
|
var n, i;
|
|
1697
1697
|
try {
|
|
1698
|
-
const o =
|
|
1698
|
+
const o = ve.parse(e.data);
|
|
1699
1699
|
switch (this.realtime.lastMessage = o, o.type) {
|
|
1700
1700
|
case "connected": {
|
|
1701
1701
|
const a = o.data;
|
|
1702
1702
|
let s = this.config.session;
|
|
1703
1703
|
if (!s) {
|
|
1704
|
-
const r =
|
|
1704
|
+
const r = ve.parse((n = window.localStorage.getItem("cookieFallback")) !== null && n !== void 0 ? n : "{}");
|
|
1705
1705
|
s = r?.[`a_session_${this.config.project}`];
|
|
1706
1706
|
}
|
|
1707
|
-
s && !a?.user && ((i = this.realtime.socket) === null || i === void 0 || i.send(
|
|
1707
|
+
s && !a?.user && ((i = this.realtime.socket) === null || i === void 0 || i.send(ve.stringify({
|
|
1708
1708
|
type: "authentication",
|
|
1709
1709
|
data: {
|
|
1710
1710
|
session: s
|
|
@@ -1955,7 +1955,7 @@ class xe {
|
|
|
1955
1955
|
let r = "";
|
|
1956
1956
|
const d = this.realtime.subscriptions.size + 1;
|
|
1957
1957
|
for (let c = 0; c < d; c++) {
|
|
1958
|
-
const p =
|
|
1958
|
+
const p = We.unique();
|
|
1959
1959
|
if (!this.realtime.subscriptions.has(p)) {
|
|
1960
1960
|
r = p;
|
|
1961
1961
|
break;
|
|
@@ -1996,7 +1996,7 @@ class xe {
|
|
|
1996
1996
|
else
|
|
1997
1997
|
switch (i["content-type"]) {
|
|
1998
1998
|
case "application/json":
|
|
1999
|
-
a.body =
|
|
1999
|
+
a.body = ve.stringify(o);
|
|
2000
2000
|
break;
|
|
2001
2001
|
case "multipart/form-data": {
|
|
2002
2002
|
const s = new FormData();
|
|
@@ -2015,7 +2015,7 @@ class xe {
|
|
|
2015
2015
|
return { uri: n.toString(), options: a };
|
|
2016
2016
|
}
|
|
2017
2017
|
chunkedUpload(e, n) {
|
|
2018
|
-
return
|
|
2018
|
+
return Ae(this, arguments, void 0, function* (i, o, a = {}, s = {}, r) {
|
|
2019
2019
|
var d;
|
|
2020
2020
|
const [c, p] = (d = Object.entries(s).find(([Y, Q]) => Q instanceof File)) !== null && d !== void 0 ? d : [];
|
|
2021
2021
|
if (!p || !c)
|
|
@@ -2040,48 +2040,48 @@ class xe {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
const N = 8;
|
|
2042
2042
|
let J = 1, ae = m, H = W, L = null, te = !1;
|
|
2043
|
-
const
|
|
2043
|
+
const V = (Y) => {
|
|
2044
2044
|
var Q;
|
|
2045
2045
|
const ie = Y?.chunksUploaded, ce = (Q = Y?.chunksTotal) !== null && Q !== void 0 ? Q : u;
|
|
2046
2046
|
return typeof ie == "number" && typeof ce == "number" && ie >= ce;
|
|
2047
|
-
},
|
|
2047
|
+
}, R = (Y) => Ae(this, void 0, void 0, function* () {
|
|
2048
2048
|
const Q = Object.assign({}, a);
|
|
2049
2049
|
K && (Q["x-appwrite-id"] = K), Q["content-range"] = `bytes ${Y.start}-${Y.end - 1}/${p.size}`;
|
|
2050
2050
|
const ie = p.slice(Y.start, Y.end), ce = Object.assign({}, s);
|
|
2051
2051
|
ce[c] = new File([ie], p.name);
|
|
2052
|
-
const
|
|
2053
|
-
return te || (J++, ae += Y.end - Y.start, H =
|
|
2052
|
+
const le = yield this.call(i, o, Q, ce);
|
|
2053
|
+
return te || (J++, ae += Y.end - Y.start, H = le, V(le) && (L = le), r && typeof r == "function" && r({
|
|
2054
2054
|
$id: K,
|
|
2055
2055
|
progress: Math.round(ae / p.size * 100),
|
|
2056
2056
|
sizeUploaded: ae,
|
|
2057
2057
|
chunksTotal: u,
|
|
2058
2058
|
chunksUploaded: J
|
|
2059
|
-
})),
|
|
2059
|
+
})), le;
|
|
2060
2060
|
});
|
|
2061
2061
|
return yield new Promise((Y, Q) => {
|
|
2062
|
-
let ie = 0, ce = 0,
|
|
2063
|
-
const
|
|
2062
|
+
let ie = 0, ce = 0, le = 0;
|
|
2063
|
+
const Re = () => {
|
|
2064
2064
|
if (!te) {
|
|
2065
|
-
if (
|
|
2065
|
+
if (le === _.length) {
|
|
2066
2066
|
Y();
|
|
2067
2067
|
return;
|
|
2068
2068
|
}
|
|
2069
2069
|
for (; ce < N && ie < _.length; ) {
|
|
2070
2070
|
const ke = _[ie++];
|
|
2071
|
-
ce++,
|
|
2072
|
-
ce--,
|
|
2071
|
+
ce++, R(ke).then(() => {
|
|
2072
|
+
ce--, le++, Re();
|
|
2073
2073
|
}).catch((_e) => {
|
|
2074
2074
|
te = !0, Q(_e);
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
2078
2078
|
};
|
|
2079
|
-
|
|
2079
|
+
Re();
|
|
2080
2080
|
}), L ?? H;
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
2083
2083
|
ping() {
|
|
2084
|
-
return
|
|
2084
|
+
return Ae(this, void 0, void 0, function* () {
|
|
2085
2085
|
return this.call("GET", new URL(this.config.endpoint + "/ping"), {
|
|
2086
2086
|
"X-Appwrite-Project": this.config.project,
|
|
2087
2087
|
accept: "application/json"
|
|
@@ -2089,7 +2089,7 @@ class xe {
|
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
2091
|
call(e, n) {
|
|
2092
|
-
return
|
|
2092
|
+
return Ae(this, arguments, void 0, function* (i, o, a = {}, s = {}, r = "json") {
|
|
2093
2093
|
var d, c, p;
|
|
2094
2094
|
const { uri: u, options: m } = this.prepareRequest(i, o, a, s);
|
|
2095
2095
|
let $ = null;
|
|
@@ -2097,15 +2097,15 @@ class xe {
|
|
|
2097
2097
|
if (E.type === "opaque")
|
|
2098
2098
|
throw new h(`Invalid Origin. Register your new client (${window.location.host}) as a new Web platform on your project console dashboard`, 403, "forbidden", "");
|
|
2099
2099
|
const Z = E.headers.get("x-appwrite-warning");
|
|
2100
|
-
if (Z && Z.split(";").forEach((K) => console.warn("Warning: " + K)), !((d = E.headers.get("content-type")) === null || d === void 0) && d.includes("application/json") ? $ =
|
|
2100
|
+
if (Z && Z.split(";").forEach((K) => console.warn("Warning: " + K)), !((d = E.headers.get("content-type")) === null || d === void 0) && d.includes("application/json") ? $ = ve.parse(yield E.text()) : r === "arrayBuffer" ? $ = yield E.arrayBuffer() : $ = {
|
|
2101
2101
|
message: yield E.text()
|
|
2102
2102
|
}, 400 <= E.status) {
|
|
2103
2103
|
let K;
|
|
2104
|
-
throw !((c = E.headers.get("content-type")) === null || c === void 0) && c.includes("application/json") || r === "arrayBuffer" ? K =
|
|
2104
|
+
throw !((c = E.headers.get("content-type")) === null || c === void 0) && c.includes("application/json") || r === "arrayBuffer" ? K = ve.stringify($) : K = $?.message, new h((p = $?.message) !== null && p !== void 0 ? p : K, E.status, $?.type, K);
|
|
2105
2105
|
}
|
|
2106
2106
|
const W = E.headers.get("X-Fallback-Cookies");
|
|
2107
2107
|
return typeof window < "u" && window.localStorage && W && (window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."), window.localStorage.setItem("cookieFallback", W)), $ && typeof $ == "object" && Object.defineProperty($, "toString", {
|
|
2108
|
-
value: () =>
|
|
2108
|
+
value: () => ve.stringify($),
|
|
2109
2109
|
writable: !0,
|
|
2110
2110
|
enumerable: !1,
|
|
2111
2111
|
configurable: !0
|
|
@@ -2122,7 +2122,7 @@ class xe {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
}
|
|
2124
2124
|
xe.CHUNK_SIZE = 1024 * 1024 * 5;
|
|
2125
|
-
class
|
|
2125
|
+
class be {
|
|
2126
2126
|
constructor(e) {
|
|
2127
2127
|
this.client = e;
|
|
2128
2128
|
}
|
|
@@ -2130,12 +2130,12 @@ class ye {
|
|
|
2130
2130
|
let i = {};
|
|
2131
2131
|
for (const [o, a] of Object.entries(e)) {
|
|
2132
2132
|
const s = n ? n + "[" + o + "]" : o;
|
|
2133
|
-
Array.isArray(a) ? i = Object.assign(Object.assign({}, i),
|
|
2133
|
+
Array.isArray(a) ? i = Object.assign(Object.assign({}, i), be.flatten(a, s)) : i[s] = a;
|
|
2134
2134
|
}
|
|
2135
2135
|
return i;
|
|
2136
2136
|
}
|
|
2137
2137
|
}
|
|
2138
|
-
|
|
2138
|
+
be.CHUNK_SIZE = 5 * 1024 * 1024;
|
|
2139
2139
|
class Yt {
|
|
2140
2140
|
constructor(e) {
|
|
2141
2141
|
this.client = e;
|
|
@@ -2873,7 +2873,7 @@ class Yt {
|
|
|
2873
2873
|
typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
|
|
2874
2874
|
const p = new URL(this.client.config.endpoint + d);
|
|
2875
2875
|
c.project = this.client.config.project;
|
|
2876
|
-
for (const [u, m] of Object.entries(
|
|
2876
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
2877
2877
|
p.searchParams.append(u, m);
|
|
2878
2878
|
if (typeof window < "u" && window?.location) {
|
|
2879
2879
|
window.location.href = p.toString();
|
|
@@ -3091,7 +3091,7 @@ class Yt {
|
|
|
3091
3091
|
typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
|
|
3092
3092
|
const p = new URL(this.client.config.endpoint + d);
|
|
3093
3093
|
c.project = this.client.config.project;
|
|
3094
|
-
for (const [u, m] of Object.entries(
|
|
3094
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3095
3095
|
p.searchParams.append(u, m);
|
|
3096
3096
|
if (typeof window < "u" && window?.location) {
|
|
3097
3097
|
window.location.href = p.toString();
|
|
@@ -3247,7 +3247,7 @@ class on {
|
|
|
3247
3247
|
typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
|
|
3248
3248
|
const p = new URL(this.client.config.endpoint + d);
|
|
3249
3249
|
c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
|
|
3250
|
-
for (const [u, m] of Object.entries(
|
|
3250
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3251
3251
|
p.searchParams.append(u, m);
|
|
3252
3252
|
return p.toString();
|
|
3253
3253
|
}
|
|
@@ -3266,7 +3266,7 @@ class on {
|
|
|
3266
3266
|
typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
|
|
3267
3267
|
const p = new URL(this.client.config.endpoint + d);
|
|
3268
3268
|
c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
|
|
3269
|
-
for (const [u, m] of Object.entries(
|
|
3269
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3270
3270
|
p.searchParams.append(u, m);
|
|
3271
3271
|
return p.toString();
|
|
3272
3272
|
}
|
|
@@ -3282,7 +3282,7 @@ class on {
|
|
|
3282
3282
|
typeof i < "u" && (a.url = i);
|
|
3283
3283
|
const s = new URL(this.client.config.endpoint + o);
|
|
3284
3284
|
a.project = this.client.config.project, a.impersonateuserid = this.client.config.impersonateuserid;
|
|
3285
|
-
for (const [r, d] of Object.entries(
|
|
3285
|
+
for (const [r, d] of Object.entries(be.flatten(a)))
|
|
3286
3286
|
s.searchParams.append(r, d);
|
|
3287
3287
|
return s.toString();
|
|
3288
3288
|
}
|
|
@@ -3301,7 +3301,7 @@ class on {
|
|
|
3301
3301
|
typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
|
|
3302
3302
|
const p = new URL(this.client.config.endpoint + d);
|
|
3303
3303
|
c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
|
|
3304
|
-
for (const [u, m] of Object.entries(
|
|
3304
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3305
3305
|
p.searchParams.append(u, m);
|
|
3306
3306
|
return p.toString();
|
|
3307
3307
|
}
|
|
@@ -3319,7 +3319,7 @@ class on {
|
|
|
3319
3319
|
typeof o < "u" && (d.url = o), typeof a < "u" && (d.width = a), typeof s < "u" && (d.height = s);
|
|
3320
3320
|
const c = new URL(this.client.config.endpoint + r);
|
|
3321
3321
|
d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
|
|
3322
|
-
for (const [p, u] of Object.entries(
|
|
3322
|
+
for (const [p, u] of Object.entries(be.flatten(d)))
|
|
3323
3323
|
c.searchParams.append(p, u);
|
|
3324
3324
|
return c.toString();
|
|
3325
3325
|
}
|
|
@@ -3335,7 +3335,7 @@ class on {
|
|
|
3335
3335
|
typeof o < "u" && (c.name = o), typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.background = r);
|
|
3336
3336
|
const p = new URL(this.client.config.endpoint + d);
|
|
3337
3337
|
c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
|
|
3338
|
-
for (const [u, m] of Object.entries(
|
|
3338
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3339
3339
|
p.searchParams.append(u, m);
|
|
3340
3340
|
return p.toString();
|
|
3341
3341
|
}
|
|
@@ -3355,7 +3355,7 @@ class on {
|
|
|
3355
3355
|
typeof o < "u" && ($.width = o), typeof a < "u" && ($.height = a), typeof s < "u" && ($.quality = s), typeof r < "u" && ($.output = r), typeof d < "u" && ($.rating = d), typeof c < "u" && ($.userId = c), typeof p < "u" && ($.emailHash = p), typeof u < "u" && ($.name = u);
|
|
3356
3356
|
const E = new URL(this.client.config.endpoint + m);
|
|
3357
3357
|
$.project = this.client.config.project, $.impersonateuserid = this.client.config.impersonateuserid;
|
|
3358
|
-
for (const [Z, W] of Object.entries(
|
|
3358
|
+
for (const [Z, W] of Object.entries(be.flatten($)))
|
|
3359
3359
|
E.searchParams.append(Z, W);
|
|
3360
3360
|
return E.toString();
|
|
3361
3361
|
}
|
|
@@ -3374,7 +3374,7 @@ class on {
|
|
|
3374
3374
|
typeof o < "u" && (c.text = o), typeof a < "u" && (c.size = a), typeof s < "u" && (c.margin = s), typeof r < "u" && (c.download = r);
|
|
3375
3375
|
const p = new URL(this.client.config.endpoint + d);
|
|
3376
3376
|
c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
|
|
3377
|
-
for (const [u, m] of Object.entries(
|
|
3377
|
+
for (const [u, m] of Object.entries(be.flatten(c)))
|
|
3378
3378
|
p.searchParams.append(u, m);
|
|
3379
3379
|
return p.toString();
|
|
3380
3380
|
}
|
|
@@ -3405,13 +3405,13 @@ class on {
|
|
|
3405
3405
|
const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, _ = i.permissions, N = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
|
|
3406
3406
|
if (typeof o > "u")
|
|
3407
3407
|
throw new h('Missing required parameter: "url"');
|
|
3408
|
-
const te = "/avatars/screenshots",
|
|
3409
|
-
typeof o < "u" && (
|
|
3410
|
-
const
|
|
3411
|
-
|
|
3412
|
-
for (const [Y, Q] of Object.entries(
|
|
3413
|
-
|
|
3414
|
-
return
|
|
3408
|
+
const te = "/avatars/screenshots", V = {};
|
|
3409
|
+
typeof o < "u" && (V.url = o), typeof a < "u" && (V.headers = a), typeof s < "u" && (V.viewportWidth = s), typeof r < "u" && (V.viewportHeight = r), typeof d < "u" && (V.scale = d), typeof c < "u" && (V.theme = c), typeof p < "u" && (V.userAgent = p), typeof u < "u" && (V.fullpage = u), typeof m < "u" && (V.locale = m), typeof $ < "u" && (V.timezone = $), typeof E < "u" && (V.latitude = E), typeof Z < "u" && (V.longitude = Z), typeof W < "u" && (V.accuracy = W), typeof K < "u" && (V.touch = K), typeof _ < "u" && (V.permissions = _), typeof N < "u" && (V.sleep = N), typeof J < "u" && (V.width = J), typeof ae < "u" && (V.height = ae), typeof H < "u" && (V.quality = H), typeof L < "u" && (V.output = L);
|
|
3410
|
+
const R = new URL(this.client.config.endpoint + te);
|
|
3411
|
+
V.project = this.client.config.project, V.impersonateuserid = this.client.config.impersonateuserid;
|
|
3412
|
+
for (const [Y, Q] of Object.entries(be.flatten(V)))
|
|
3413
|
+
R.searchParams.append(Y, Q);
|
|
3414
|
+
return R.toString();
|
|
3415
3415
|
}
|
|
3416
3416
|
}
|
|
3417
3417
|
class Jn {
|
|
@@ -4605,7 +4605,7 @@ class to {
|
|
|
4605
4605
|
typeof s < "u" && (d.token = s);
|
|
4606
4606
|
const c = new URL(this.client.config.endpoint + r);
|
|
4607
4607
|
d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
|
|
4608
|
-
for (const [p, u] of Object.entries(
|
|
4608
|
+
for (const [p, u] of Object.entries(be.flatten(d)))
|
|
4609
4609
|
c.searchParams.append(p, u);
|
|
4610
4610
|
return c.toString();
|
|
4611
4611
|
}
|
|
@@ -4636,7 +4636,7 @@ class to {
|
|
|
4636
4636
|
typeof s < "u" && (N.width = s), typeof r < "u" && (N.height = r), typeof d < "u" && (N.gravity = d), typeof c < "u" && (N.quality = c), typeof p < "u" && (N.borderWidth = p), typeof u < "u" && (N.borderColor = u), typeof m < "u" && (N.borderRadius = m), typeof $ < "u" && (N.opacity = $), typeof E < "u" && (N.rotation = E), typeof Z < "u" && (N.background = Z), typeof W < "u" && (N.output = W), typeof K < "u" && (N.token = K);
|
|
4637
4637
|
const J = new URL(this.client.config.endpoint + _);
|
|
4638
4638
|
N.project = this.client.config.project, N.impersonateuserid = this.client.config.impersonateuserid;
|
|
4639
|
-
for (const [ae, H] of Object.entries(
|
|
4639
|
+
for (const [ae, H] of Object.entries(be.flatten(N)))
|
|
4640
4640
|
J.searchParams.append(ae, H);
|
|
4641
4641
|
return J.toString();
|
|
4642
4642
|
}
|
|
@@ -4656,7 +4656,7 @@ class to {
|
|
|
4656
4656
|
typeof s < "u" && (d.token = s);
|
|
4657
4657
|
const c = new URL(this.client.config.endpoint + r);
|
|
4658
4658
|
d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
|
|
4659
|
-
for (const [p, u] of Object.entries(
|
|
4659
|
+
for (const [p, u] of Object.entries(be.flatten(d)))
|
|
4660
4660
|
c.searchParams.append(p, u);
|
|
4661
4661
|
return c.toString();
|
|
4662
4662
|
}
|
|
@@ -5582,10 +5582,10 @@ class no {
|
|
|
5582
5582
|
return this.client.call("delete", p, u, c);
|
|
5583
5583
|
}
|
|
5584
5584
|
}
|
|
5585
|
-
var
|
|
5585
|
+
var Ct;
|
|
5586
5586
|
(function(t) {
|
|
5587
5587
|
t[t.NORMAL_CLOSURE = 1e3] = "NORMAL_CLOSURE", t[t.POLICY_VIOLATION = 1008] = "POLICY_VIOLATION", t[t.UNKNOWN_ERROR = -1] = "UNKNOWN_ERROR";
|
|
5588
|
-
})(
|
|
5588
|
+
})(Ct || (Ct = {}));
|
|
5589
5589
|
class oo {
|
|
5590
5590
|
constructor(e) {
|
|
5591
5591
|
this.TYPE_ERROR = "error", this.TYPE_EVENT = "event", this.TYPE_PONG = "pong", this.TYPE_CONNECTED = "connected", this.DEBOUNCE_MS = 1, this.HEARTBEAT_INTERVAL = 2e4, this.activeSubscriptions = /* @__PURE__ */ new Map(), this.pendingSubscribes = /* @__PURE__ */ new Map(), this.appConnected = !1, this.subCallDepth = 0, this.reconnectAttempts = 0, this.connectionId = 0, this.reconnect = !0, this.onErrorCallbacks = [], this.onCloseCallbacks = [], this.onOpenCallbacks = [], this.client = e;
|
|
@@ -5619,7 +5619,7 @@ class oo {
|
|
|
5619
5619
|
}
|
|
5620
5620
|
startHeartbeat() {
|
|
5621
5621
|
this.stopHeartbeat(), this.heartbeatTimer = window?.setInterval(() => {
|
|
5622
|
-
this.socket && this.socket.readyState === WebSocket.OPEN && this.socket.send(
|
|
5622
|
+
this.socket && this.socket.readyState === WebSocket.OPEN && this.socket.send(ve.stringify({ type: "ping" }));
|
|
5623
5623
|
}, this.HEARTBEAT_INTERVAL);
|
|
5624
5624
|
}
|
|
5625
5625
|
stopHeartbeat() {
|
|
@@ -5634,7 +5634,7 @@ class oo {
|
|
|
5634
5634
|
* Returns early when a healthy socket is already present.
|
|
5635
5635
|
*/
|
|
5636
5636
|
createSocket() {
|
|
5637
|
-
return
|
|
5637
|
+
return Ae(this, void 0, void 0, function* () {
|
|
5638
5638
|
if (!(this.socket && this.socket.readyState < WebSocket.CLOSING))
|
|
5639
5639
|
return this.socketCreationPromise ? this.socketCreationPromise : (this.socketCreationPromise = this.createSocketLocked().finally(() => {
|
|
5640
5640
|
this.socketCreationPromise = void 0;
|
|
@@ -5642,7 +5642,7 @@ class oo {
|
|
|
5642
5642
|
});
|
|
5643
5643
|
}
|
|
5644
5644
|
createSocketLocked() {
|
|
5645
|
-
return
|
|
5645
|
+
return Ae(this, void 0, void 0, function* () {
|
|
5646
5646
|
if (this.activeSubscriptions.size === 0 && !this.pendingPresence) {
|
|
5647
5647
|
this.reconnect = !1, yield this.closeSocket();
|
|
5648
5648
|
return;
|
|
@@ -5666,15 +5666,15 @@ class oo {
|
|
|
5666
5666
|
}), p.addEventListener("message", (u) => {
|
|
5667
5667
|
if (c === this.connectionId)
|
|
5668
5668
|
try {
|
|
5669
|
-
const m =
|
|
5669
|
+
const m = ve.parse(u.data);
|
|
5670
5670
|
this.handleMessage(m);
|
|
5671
5671
|
} catch (m) {
|
|
5672
5672
|
console.error("Failed to parse message:", m);
|
|
5673
5673
|
}
|
|
5674
|
-
}), p.addEventListener("close", (u) =>
|
|
5674
|
+
}), p.addEventListener("close", (u) => Ae(this, void 0, void 0, function* () {
|
|
5675
5675
|
if (c !== this.connectionId || p !== this.socket)
|
|
5676
5676
|
return;
|
|
5677
|
-
if (this.appConnected = !1, this.stopHeartbeat(), this.onCloseCallbacks.forEach(($) => $()), !this.reconnect || u.code ===
|
|
5677
|
+
if (this.appConnected = !1, this.stopHeartbeat(), this.onCloseCallbacks.forEach(($) => $()), !this.reconnect || u.code === Ct.POLICY_VIOLATION) {
|
|
5678
5678
|
this.reconnect = !0;
|
|
5679
5679
|
return;
|
|
5680
5680
|
}
|
|
@@ -5699,7 +5699,7 @@ class oo {
|
|
|
5699
5699
|
});
|
|
5700
5700
|
}
|
|
5701
5701
|
closeSocket() {
|
|
5702
|
-
return
|
|
5702
|
+
return Ae(this, void 0, void 0, function* () {
|
|
5703
5703
|
if (this.stopHeartbeat(), this.socket)
|
|
5704
5704
|
return new Promise((e) => {
|
|
5705
5705
|
if (!this.socket) {
|
|
@@ -5708,7 +5708,7 @@ class oo {
|
|
|
5708
5708
|
}
|
|
5709
5709
|
this.socket.readyState === WebSocket.OPEN || this.socket.readyState === WebSocket.CONNECTING ? (this.socket.addEventListener("close", () => {
|
|
5710
5710
|
e();
|
|
5711
|
-
}, { once: !0 }), this.socket.close(
|
|
5711
|
+
}, { once: !0 }), this.socket.close(Ct.NORMAL_CLOSURE)) : e();
|
|
5712
5712
|
});
|
|
5713
5713
|
});
|
|
5714
5714
|
}
|
|
@@ -5720,7 +5720,7 @@ class oo {
|
|
|
5720
5720
|
}
|
|
5721
5721
|
sendUnsubscribeMessage(e) {
|
|
5722
5722
|
const n = e.filter((i) => typeof i == "string" && i.length > 0);
|
|
5723
|
-
n.length !== 0 && (!this.socket || this.socket.readyState !== WebSocket.OPEN || this.socket.send(
|
|
5723
|
+
n.length !== 0 && (!this.socket || this.socket.readyState !== WebSocket.OPEN || this.socket.send(ve.stringify({
|
|
5724
5724
|
type: "unsubscribe",
|
|
5725
5725
|
data: n.map((i) => ({ subscriptionId: i }))
|
|
5726
5726
|
})));
|
|
@@ -5728,7 +5728,7 @@ class oo {
|
|
|
5728
5728
|
generateUniqueSubscriptionId() {
|
|
5729
5729
|
const e = this.activeSubscriptions.size + 1;
|
|
5730
5730
|
for (let n = 0; n < e; n++) {
|
|
5731
|
-
const i =
|
|
5731
|
+
const i = We.unique();
|
|
5732
5732
|
if (!this.activeSubscriptions.has(i))
|
|
5733
5733
|
return i;
|
|
5734
5734
|
}
|
|
@@ -5748,7 +5748,7 @@ class oo {
|
|
|
5748
5748
|
* Use this instead of calling `unsubscribe()` on every subscription when you want to tear everything down.
|
|
5749
5749
|
*/
|
|
5750
5750
|
disconnect() {
|
|
5751
|
-
return
|
|
5751
|
+
return Ae(this, void 0, void 0, function* () {
|
|
5752
5752
|
this.activeSubscriptions.clear(), this.pendingSubscribes.clear(), this.pendingPresence = void 0, this.appConnected = !1, this.reconnect = !1, this.socketCreationPromise = void 0, yield this.closeSocket();
|
|
5753
5753
|
});
|
|
5754
5754
|
}
|
|
@@ -5756,7 +5756,7 @@ class oo {
|
|
|
5756
5756
|
if (!this.socket || this.socket.readyState !== WebSocket.OPEN || !this.appConnected || this.pendingSubscribes.size < 1)
|
|
5757
5757
|
return;
|
|
5758
5758
|
const e = Array.from(this.pendingSubscribes.values());
|
|
5759
|
-
this.pendingSubscribes.clear(), this.socket.send(
|
|
5759
|
+
this.pendingSubscribes.clear(), this.socket.send(ve.stringify({
|
|
5760
5760
|
type: "subscribe",
|
|
5761
5761
|
data: e
|
|
5762
5762
|
}));
|
|
@@ -5772,7 +5772,7 @@ class oo {
|
|
|
5772
5772
|
return typeof e == "string" ? e : e && typeof e.toString == "function" ? e.toString() : String(e);
|
|
5773
5773
|
}
|
|
5774
5774
|
subscribe(e, n) {
|
|
5775
|
-
return
|
|
5775
|
+
return Ae(this, arguments, void 0, function* (i, o, a = []) {
|
|
5776
5776
|
const r = (Array.isArray(i) ? i : [i]).map((E) => this.channelToString(E)), d = new Set(r), c = [];
|
|
5777
5777
|
for (const E of a ?? [])
|
|
5778
5778
|
if (Array.isArray(E))
|
|
@@ -5791,10 +5791,10 @@ class oo {
|
|
|
5791
5791
|
} finally {
|
|
5792
5792
|
this.subCallDepth--;
|
|
5793
5793
|
}
|
|
5794
|
-
const u = () =>
|
|
5794
|
+
const u = () => Ae(this, void 0, void 0, function* () {
|
|
5795
5795
|
this.activeSubscriptions.has(p) && (this.activeSubscriptions.delete(p), this.pendingSubscribes.delete(p), this.sendUnsubscribeMessage([p]));
|
|
5796
5796
|
});
|
|
5797
|
-
return { unsubscribe: u, update: (E) =>
|
|
5797
|
+
return { unsubscribe: u, update: (E) => Ae(this, void 0, void 0, function* () {
|
|
5798
5798
|
const Z = this.activeSubscriptions.get(p);
|
|
5799
5799
|
if (Z) {
|
|
5800
5800
|
if (E.channels !== void 0) {
|
|
@@ -5818,7 +5818,7 @@ class oo {
|
|
|
5818
5818
|
this.subCallDepth--;
|
|
5819
5819
|
}
|
|
5820
5820
|
}
|
|
5821
|
-
}), close: () =>
|
|
5821
|
+
}), close: () => Ae(this, void 0, void 0, function* () {
|
|
5822
5822
|
yield u(), this.activeSubscriptions.size === 0 && (this.reconnect = !1, yield this.closeSocket());
|
|
5823
5823
|
}) };
|
|
5824
5824
|
});
|
|
@@ -5836,7 +5836,7 @@ class oo {
|
|
|
5836
5836
|
* @param {RealtimePresenceCreate} params - Presence payload (status and presenceId required, permissions/metadata optional)
|
|
5837
5837
|
*/
|
|
5838
5838
|
upsertPresence(e) {
|
|
5839
|
-
return
|
|
5839
|
+
return Ae(this, void 0, void 0, function* () {
|
|
5840
5840
|
const n = {
|
|
5841
5841
|
status: e.status,
|
|
5842
5842
|
presenceId: e.presenceId
|
|
@@ -5847,7 +5847,7 @@ class oo {
|
|
|
5847
5847
|
});
|
|
5848
5848
|
}
|
|
5849
5849
|
flushPendingPresence() {
|
|
5850
|
-
this.pendingPresence && (!this.socket || this.socket.readyState !== WebSocket.OPEN || this.appConnected && this.socket.send(
|
|
5850
|
+
this.pendingPresence && (!this.socket || this.socket.readyState !== WebSocket.OPEN || this.appConnected && this.socket.send(ve.stringify({
|
|
5851
5851
|
type: "presence",
|
|
5852
5852
|
data: this.pendingPresence
|
|
5853
5853
|
})));
|
|
@@ -5876,12 +5876,12 @@ class oo {
|
|
|
5876
5876
|
let a = this.client.config.session;
|
|
5877
5877
|
if (!a)
|
|
5878
5878
|
try {
|
|
5879
|
-
const s =
|
|
5879
|
+
const s = ve.parse((n = window.localStorage.getItem("cookieFallback")) !== null && n !== void 0 ? n : "{}");
|
|
5880
5880
|
a = s?.[`a_session_${this.client.config.project}`];
|
|
5881
5881
|
} catch (s) {
|
|
5882
5882
|
console.error("Failed to parse cookie fallback:", s);
|
|
5883
5883
|
}
|
|
5884
|
-
a && !o.user && ((i = this.socket) === null || i === void 0 || i.send(
|
|
5884
|
+
a && !o.user && ((i = this.socket) === null || i === void 0 || i.send(ve.stringify({
|
|
5885
5885
|
type: "authentication",
|
|
5886
5886
|
data: {
|
|
5887
5887
|
session: a
|
|
@@ -5914,13 +5914,13 @@ class oo {
|
|
|
5914
5914
|
}
|
|
5915
5915
|
}
|
|
5916
5916
|
}
|
|
5917
|
-
class
|
|
5917
|
+
class st {
|
|
5918
5918
|
}
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5919
|
+
st.read = (t) => `read("${t}")`;
|
|
5920
|
+
st.write = (t) => `write("${t}")`;
|
|
5921
|
+
st.create = (t) => `create("${t}")`;
|
|
5922
|
+
st.update = (t) => `update("${t}")`;
|
|
5923
|
+
st.delete = (t) => `delete("${t}")`;
|
|
5924
5924
|
class ao {
|
|
5925
5925
|
/**
|
|
5926
5926
|
* Grants access to anyone.
|
|
@@ -6311,7 +6311,7 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6311
6311
|
},
|
|
6312
6312
|
Functions: Qn,
|
|
6313
6313
|
Graphql: Tn,
|
|
6314
|
-
ID:
|
|
6314
|
+
ID: We,
|
|
6315
6315
|
get ImageFormat() {
|
|
6316
6316
|
return ni;
|
|
6317
6317
|
},
|
|
@@ -6325,7 +6325,7 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6325
6325
|
},
|
|
6326
6326
|
Operator: T,
|
|
6327
6327
|
Organization: Fn,
|
|
6328
|
-
Permission:
|
|
6328
|
+
Permission: st,
|
|
6329
6329
|
Presences: eo,
|
|
6330
6330
|
Query: P,
|
|
6331
6331
|
Realtime: oo,
|
|
@@ -6507,7 +6507,9 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6507
6507
|
lastActive: "Last active",
|
|
6508
6508
|
guestAccount: "Guest account",
|
|
6509
6509
|
guestAccountDescription: "Add an email and password to keep your data.",
|
|
6510
|
-
preview: "Preview"
|
|
6510
|
+
preview: "Preview",
|
|
6511
|
+
acceptLegal: "I agree to the",
|
|
6512
|
+
errorLegalRequired: "Accept the terms to continue."
|
|
6511
6513
|
};
|
|
6512
6514
|
function ro(t, e = {}) {
|
|
6513
6515
|
return t.replace(
|
|
@@ -6566,10 +6568,10 @@ const co = {
|
|
|
6566
6568
|
zoho: "Zoho",
|
|
6567
6569
|
zoom: "Zoom"
|
|
6568
6570
|
};
|
|
6569
|
-
function
|
|
6571
|
+
function pt(t) {
|
|
6570
6572
|
return co[t] ?? t.charAt(0).toUpperCase() + t.slice(1);
|
|
6571
6573
|
}
|
|
6572
|
-
const
|
|
6574
|
+
const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), Ce = () => (/* @__PURE__ */ new Date()).toISOString(), He = (t) => new Date(Date.now() - t * 6e4).toISOString(), kt = [
|
|
6573
6575
|
"amber",
|
|
6574
6576
|
"brave",
|
|
6575
6577
|
"calm",
|
|
@@ -6582,7 +6584,7 @@ const vt = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }),
|
|
|
6582
6584
|
"juniper",
|
|
6583
6585
|
"kite",
|
|
6584
6586
|
"lumen"
|
|
6585
|
-
], Di = () => `${
|
|
6587
|
+
], Di = () => `${kt[Math.floor(Math.random() * kt.length)]}-${kt[Math.floor(Math.random() * kt.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
|
|
6586
6588
|
name: "Ada Lovelace",
|
|
6587
6589
|
email: "ada@example.com",
|
|
6588
6590
|
phone: "+15550100"
|
|
@@ -6724,9 +6726,9 @@ class uo {
|
|
|
6724
6726
|
}
|
|
6725
6727
|
requireUser() {
|
|
6726
6728
|
if (!this.user)
|
|
6727
|
-
throw
|
|
6729
|
+
throw At("general_unauthorized_scope", "User (role: guests) missing scope (account)");
|
|
6728
6730
|
if (this.mfaPending)
|
|
6729
|
-
throw
|
|
6731
|
+
throw At(
|
|
6730
6732
|
"user_more_factors_required",
|
|
6731
6733
|
"More factors are required to complete the sign in process."
|
|
6732
6734
|
);
|
|
@@ -6734,7 +6736,7 @@ class uo {
|
|
|
6734
6736
|
}
|
|
6735
6737
|
requireRecentChallenge() {
|
|
6736
6738
|
if (Date.now() - this.lastChallenge > 30 * 6e4)
|
|
6737
|
-
throw
|
|
6739
|
+
throw At(
|
|
6738
6740
|
"user_challenge_required",
|
|
6739
6741
|
"A recently successful challenge is required to complete this action."
|
|
6740
6742
|
);
|
|
@@ -6910,7 +6912,7 @@ class uo {
|
|
|
6910
6912
|
async createMFARecoveryCodes() {
|
|
6911
6913
|
return this.delay(() => {
|
|
6912
6914
|
if (this.recoveryCodes.length > 0)
|
|
6913
|
-
throw
|
|
6915
|
+
throw At("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
|
|
6914
6916
|
return this.recoveryCodes = Array.from({ length: 6 }, Bi), { recoveryCodes: this.recoveryCodes };
|
|
6915
6917
|
});
|
|
6916
6918
|
}
|
|
@@ -6973,7 +6975,7 @@ const oe = {
|
|
|
6973
6975
|
targetAlreadyExists: "user_target_already_exists",
|
|
6974
6976
|
argumentInvalid: "general_argument_invalid"
|
|
6975
6977
|
};
|
|
6976
|
-
function
|
|
6978
|
+
function it(t) {
|
|
6977
6979
|
if (t && typeof t == "object") {
|
|
6978
6980
|
const e = t;
|
|
6979
6981
|
let n = typeof e.message == "string" ? e.message : "Unknown error";
|
|
@@ -6985,11 +6987,11 @@ function tt(t) {
|
|
|
6985
6987
|
}
|
|
6986
6988
|
return { message: String(t), type: "", code: 0 };
|
|
6987
6989
|
}
|
|
6988
|
-
function
|
|
6989
|
-
return
|
|
6990
|
+
function mt(t, e) {
|
|
6991
|
+
return it(t).type === e;
|
|
6990
6992
|
}
|
|
6991
|
-
function
|
|
6992
|
-
const i =
|
|
6993
|
+
function Ut(t, e, n = "link") {
|
|
6994
|
+
const i = it(t);
|
|
6993
6995
|
switch (i.type) {
|
|
6994
6996
|
case oe.invalidCredentials:
|
|
6995
6997
|
return n === "password" ? e.errorCurrentPassword : e.errorInvalidCredentials;
|
|
@@ -7032,7 +7034,7 @@ function Ct(t, e, n = "link") {
|
|
|
7032
7034
|
return i.type === oe.projectNotFound || i.type === oe.unknownOrigin ? e.errorConfig : i.type === oe.routeNotFound ? e.errorConfigEndpoint : i.code === 0 && /fetch|network/i.test(i.message) ? e.errorNetwork : /Invalid `\w+` param/i.test(i.message) ? e.errorGeneric : i.message ? i.message || e.errorGeneric : i.code === 404 || i.type === oe.routeNotFound ? e.errorConfigEndpoint : e.errorGeneric;
|
|
7033
7035
|
}
|
|
7034
7036
|
function ho(t) {
|
|
7035
|
-
const e =
|
|
7037
|
+
const e = it(t);
|
|
7036
7038
|
return !!(e.type === oe.projectNotFound || e.type === oe.unknownOrigin || e.type === oe.routeNotFound || !e.message && e.code === 404 || e.code === 0 && /fetch|network|load failed|failed to fetch/i.test(e.message));
|
|
7037
7039
|
}
|
|
7038
7040
|
const di = (t) => `authui:active-team:${t}`;
|
|
@@ -7052,7 +7054,7 @@ function fo(t, e) {
|
|
|
7052
7054
|
}
|
|
7053
7055
|
}
|
|
7054
7056
|
const Ii = "authui:last-method";
|
|
7055
|
-
function
|
|
7057
|
+
function tt(t) {
|
|
7056
7058
|
if (!(typeof localStorage > "u")) {
|
|
7057
7059
|
if (!t || t === "mfa" || t === "sign-up")
|
|
7058
7060
|
if (t === "sign-up") t = "email-password";
|
|
@@ -7078,26 +7080,26 @@ function ia() {
|
|
|
7078
7080
|
} catch {
|
|
7079
7081
|
}
|
|
7080
7082
|
}
|
|
7081
|
-
const
|
|
7083
|
+
const Rt = "authui:pending-oauth";
|
|
7082
7084
|
function go(t) {
|
|
7083
7085
|
if (!(typeof sessionStorage > "u"))
|
|
7084
7086
|
try {
|
|
7085
|
-
sessionStorage.setItem(
|
|
7087
|
+
sessionStorage.setItem(Rt, t);
|
|
7086
7088
|
} catch {
|
|
7087
7089
|
}
|
|
7088
7090
|
}
|
|
7089
7091
|
function sn() {
|
|
7090
7092
|
if (!(typeof sessionStorage > "u"))
|
|
7091
7093
|
try {
|
|
7092
|
-
const t = sessionStorage.getItem(
|
|
7093
|
-
sessionStorage.removeItem(
|
|
7094
|
+
const t = sessionStorage.getItem(Rt);
|
|
7095
|
+
sessionStorage.removeItem(Rt), t && tt(`oauth:${t}`);
|
|
7094
7096
|
} catch {
|
|
7095
7097
|
}
|
|
7096
7098
|
}
|
|
7097
7099
|
function Vi() {
|
|
7098
7100
|
if (!(typeof sessionStorage > "u"))
|
|
7099
7101
|
try {
|
|
7100
|
-
sessionStorage.removeItem(
|
|
7102
|
+
sessionStorage.removeItem(Rt);
|
|
7101
7103
|
} catch {
|
|
7102
7104
|
}
|
|
7103
7105
|
}
|
|
@@ -7222,7 +7224,7 @@ class yo {
|
|
|
7222
7224
|
this.state = { ...this.state, ...e }, this.emit("change", this.getState());
|
|
7223
7225
|
}
|
|
7224
7226
|
fail(e) {
|
|
7225
|
-
const n =
|
|
7227
|
+
const n = it(e);
|
|
7226
7228
|
throw this.emit("error", n), e;
|
|
7227
7229
|
}
|
|
7228
7230
|
acct() {
|
|
@@ -7242,7 +7244,7 @@ class yo {
|
|
|
7242
7244
|
const n = await this.account.get();
|
|
7243
7245
|
this.setState({ status: "signed-in", user: n, mfaFactors: null, configError: null }), e || this.emit("signed-in", n);
|
|
7244
7246
|
} catch (n) {
|
|
7245
|
-
if (
|
|
7247
|
+
if (mt(n, oe.moreFactorsRequired)) {
|
|
7246
7248
|
let i = null;
|
|
7247
7249
|
try {
|
|
7248
7250
|
i = await je(
|
|
@@ -7253,7 +7255,7 @@ class yo {
|
|
|
7253
7255
|
} catch {
|
|
7254
7256
|
}
|
|
7255
7257
|
this.setState({ status: "mfa-required", user: null, mfaFactors: i });
|
|
7256
|
-
} else if (
|
|
7258
|
+
} else if (mt(n, oe.userBlocked))
|
|
7257
7259
|
await this.purgeLocalSession(), this.setState({
|
|
7258
7260
|
status: "signed-out",
|
|
7259
7261
|
user: null,
|
|
@@ -7265,11 +7267,11 @@ class yo {
|
|
|
7265
7267
|
}
|
|
7266
7268
|
}), e && this.emit("signed-out", void 0);
|
|
7267
7269
|
else if (!e && ho(n)) {
|
|
7268
|
-
const o =
|
|
7270
|
+
const o = Ut(n, this.getStrings()) || this.getStrings().errorConfig;
|
|
7269
7271
|
console.warn(
|
|
7270
7272
|
`[authui] ${o} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
|
|
7271
7273
|
);
|
|
7272
|
-
const a =
|
|
7274
|
+
const a = it(n);
|
|
7273
7275
|
this.emit("error", { message: o, type: a.type, code: a.code }), this.setState({
|
|
7274
7276
|
status: "signed-out",
|
|
7275
7277
|
user: null,
|
|
@@ -7327,7 +7329,7 @@ class yo {
|
|
|
7327
7329
|
}
|
|
7328
7330
|
async signUp(e, n, i) {
|
|
7329
7331
|
try {
|
|
7330
|
-
await this.acct().create(
|
|
7332
|
+
await this.acct().create(We.unique(), e.trim(), n, i?.trim() || void 0), await this.acct().createEmailPasswordSession(e.trim(), n);
|
|
7331
7333
|
} catch (o) {
|
|
7332
7334
|
this.fail(o);
|
|
7333
7335
|
}
|
|
@@ -7370,7 +7372,7 @@ class yo {
|
|
|
7370
7372
|
async sendMagicUrl(e) {
|
|
7371
7373
|
try {
|
|
7372
7374
|
return await this.acct().createMagicURLToken(
|
|
7373
|
-
|
|
7375
|
+
We.unique(),
|
|
7374
7376
|
e.trim(),
|
|
7375
7377
|
this.redirectUrl("magic-url"),
|
|
7376
7378
|
this.config?.securityPhrase ?? !0
|
|
@@ -7382,7 +7384,7 @@ class yo {
|
|
|
7382
7384
|
async sendEmailOtp(e) {
|
|
7383
7385
|
try {
|
|
7384
7386
|
return await this.acct().createEmailToken(
|
|
7385
|
-
|
|
7387
|
+
We.unique(),
|
|
7386
7388
|
e.trim(),
|
|
7387
7389
|
this.config?.securityPhrase ?? !0
|
|
7388
7390
|
);
|
|
@@ -7392,7 +7394,7 @@ class yo {
|
|
|
7392
7394
|
}
|
|
7393
7395
|
async sendPhoneOtp(e) {
|
|
7394
7396
|
try {
|
|
7395
|
-
return await this.acct().createPhoneToken(
|
|
7397
|
+
return await this.acct().createPhoneToken(We.unique(), e.replace(/[\s()-]/g, ""));
|
|
7396
7398
|
} catch (n) {
|
|
7397
7399
|
return this.fail(n);
|
|
7398
7400
|
}
|
|
@@ -7695,7 +7697,7 @@ class yo {
|
|
|
7695
7697
|
switch (n) {
|
|
7696
7698
|
case "oauth":
|
|
7697
7699
|
case "magic-url":
|
|
7698
|
-
i && o ? (await this.acct().createSession(i, o), n === "oauth"
|
|
7700
|
+
i && o ? (await this.acct().createSession(i, o), n === "oauth" ? sn() : tt("magic-url")) : (n === "oauth" && Vi(), a());
|
|
7699
7701
|
break;
|
|
7700
7702
|
case "oauth-failed":
|
|
7701
7703
|
Vi(), this.setState({
|
|
@@ -7724,7 +7726,7 @@ class yo {
|
|
|
7724
7726
|
break;
|
|
7725
7727
|
}
|
|
7726
7728
|
} catch (s) {
|
|
7727
|
-
const r =
|
|
7729
|
+
const r = it(s), d = Ut(s, this.getStrings(), "link");
|
|
7728
7730
|
this.emit("error", r), this.setState({ pending: { type: "notice", message: d, tone: "error" } });
|
|
7729
7731
|
}
|
|
7730
7732
|
return !0;
|
|
@@ -7739,7 +7741,7 @@ class yo {
|
|
|
7739
7741
|
this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = Gi(), this.listeners.clear();
|
|
7740
7742
|
}
|
|
7741
7743
|
}
|
|
7742
|
-
const
|
|
7744
|
+
const M = new yo();
|
|
7743
7745
|
class mo {
|
|
7744
7746
|
constructor() {
|
|
7745
7747
|
this.listeners = /* @__PURE__ */ new Set(), this.observer = null, this.media = null, this.notify = () => {
|
|
@@ -7775,7 +7777,7 @@ const Ki = new mo(), Yi = {
|
|
|
7775
7777
|
lg: "0.875rem",
|
|
7776
7778
|
xl: "1.125rem",
|
|
7777
7779
|
full: "1.5rem"
|
|
7778
|
-
}, bo =
|
|
7780
|
+
}, bo = Ge`
|
|
7779
7781
|
:host {
|
|
7780
7782
|
/* Light theme (matches :root in the console) */
|
|
7781
7783
|
--authui-background: oklch(1 0 0);
|
|
@@ -7853,7 +7855,7 @@ const Ki = new mo(), Yi = {
|
|
|
7853
7855
|
--authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
|
|
7854
7856
|
color-scheme: dark;
|
|
7855
7857
|
}
|
|
7856
|
-
`, wo =
|
|
7858
|
+
`, wo = Ge`
|
|
7857
7859
|
*,
|
|
7858
7860
|
*::before,
|
|
7859
7861
|
*::after {
|
|
@@ -8545,6 +8547,34 @@ const Ki = new mo(), Yi = {
|
|
|
8545
8547
|
.legal a:hover {
|
|
8546
8548
|
color: var(--authui-foreground);
|
|
8547
8549
|
}
|
|
8550
|
+
.legal-accept {
|
|
8551
|
+
display: flex;
|
|
8552
|
+
align-items: flex-start;
|
|
8553
|
+
gap: 10px;
|
|
8554
|
+
font-size: 12px;
|
|
8555
|
+
color: var(--authui-muted-foreground);
|
|
8556
|
+
line-height: 1.5;
|
|
8557
|
+
text-align: start;
|
|
8558
|
+
cursor: pointer;
|
|
8559
|
+
user-select: none;
|
|
8560
|
+
}
|
|
8561
|
+
.legal-accept input {
|
|
8562
|
+
margin-top: 2px;
|
|
8563
|
+
width: 16px;
|
|
8564
|
+
height: 16px;
|
|
8565
|
+
flex-shrink: 0;
|
|
8566
|
+
accent-color: var(--authui-brand);
|
|
8567
|
+
cursor: pointer;
|
|
8568
|
+
}
|
|
8569
|
+
.legal-accept a {
|
|
8570
|
+
color: inherit;
|
|
8571
|
+
text-decoration: underline;
|
|
8572
|
+
text-decoration-style: dotted;
|
|
8573
|
+
text-underline-offset: 3px;
|
|
8574
|
+
}
|
|
8575
|
+
.legal-accept a:hover {
|
|
8576
|
+
color: var(--authui-foreground);
|
|
8577
|
+
}
|
|
8548
8578
|
.links {
|
|
8549
8579
|
display: flex;
|
|
8550
8580
|
justify-content: center;
|
|
@@ -8568,6 +8598,32 @@ const Ki = new mo(), Yi = {
|
|
|
8568
8598
|
width: 18px;
|
|
8569
8599
|
height: 18px;
|
|
8570
8600
|
}
|
|
8601
|
+
/* Compact icon-only OAuth row (oauthLayout: icon / horizontal). */
|
|
8602
|
+
.providers.icon {
|
|
8603
|
+
display: flex;
|
|
8604
|
+
flex-wrap: wrap;
|
|
8605
|
+
gap: 8px;
|
|
8606
|
+
justify-content: center;
|
|
8607
|
+
}
|
|
8608
|
+
.providers.icon .btn {
|
|
8609
|
+
width: 40px;
|
|
8610
|
+
height: 40px;
|
|
8611
|
+
padding: 0;
|
|
8612
|
+
justify-content: center;
|
|
8613
|
+
position: relative;
|
|
8614
|
+
}
|
|
8615
|
+
.providers.icon .btn svg {
|
|
8616
|
+
width: 18px;
|
|
8617
|
+
height: 18px;
|
|
8618
|
+
}
|
|
8619
|
+
.providers.icon .last-used-badge,
|
|
8620
|
+
.providers.icon .oauth-last-used-pill {
|
|
8621
|
+
display: none;
|
|
8622
|
+
}
|
|
8623
|
+
.providers.icon .oauth-last-used-dot {
|
|
8624
|
+
top: 4px;
|
|
8625
|
+
inset-inline-end: 4px;
|
|
8626
|
+
}
|
|
8571
8627
|
/* OAuth accordion: last-used (or focused) expands; others stay icon-compact. */
|
|
8572
8628
|
.providers.accordion {
|
|
8573
8629
|
display: flex;
|
|
@@ -8809,12 +8865,12 @@ var vo = Object.defineProperty, Io = (t, e, n, i) => {
|
|
|
8809
8865
|
}, De;
|
|
8810
8866
|
const rn = (De = class extends Qe {
|
|
8811
8867
|
constructor() {
|
|
8812
|
-
super(...arguments), this.auth =
|
|
8868
|
+
super(...arguments), this.auth = M.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (e) => e.stopPropagation();
|
|
8813
8869
|
}
|
|
8814
8870
|
connectedCallback() {
|
|
8815
8871
|
super.connectedCallback();
|
|
8816
8872
|
for (const e of De.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
|
|
8817
|
-
this.auth =
|
|
8873
|
+
this.auth = M.getState(), this.unsubscribeStore = M.on("change", (e) => {
|
|
8818
8874
|
this.auth = e, this.applyBranding();
|
|
8819
8875
|
}), this.unsubscribeTheme = Ki.subscribe(() => this.applyBranding()), this.applyBranding();
|
|
8820
8876
|
}
|
|
@@ -8824,14 +8880,14 @@ const rn = (De = class extends Qe {
|
|
|
8824
8880
|
this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
|
|
8825
8881
|
}
|
|
8826
8882
|
get strings() {
|
|
8827
|
-
return
|
|
8883
|
+
return M.getStrings();
|
|
8828
8884
|
}
|
|
8829
8885
|
/** Translate a string key with optional `{placeholders}`. */
|
|
8830
8886
|
t(e, n) {
|
|
8831
8887
|
return ro(this.strings[e], n);
|
|
8832
8888
|
}
|
|
8833
8889
|
get config() {
|
|
8834
|
-
return
|
|
8890
|
+
return M.getConfig();
|
|
8835
8891
|
}
|
|
8836
8892
|
get productName() {
|
|
8837
8893
|
return this.config?.branding?.name ?? "";
|
|
@@ -8850,7 +8906,7 @@ const rn = (De = class extends Qe {
|
|
|
8850
8906
|
}
|
|
8851
8907
|
}, De.styles = [bo, wo], De.KEY_EVENTS = ["keydown", "keyup", "keypress"], De);
|
|
8852
8908
|
Io([
|
|
8853
|
-
|
|
8909
|
+
D()
|
|
8854
8910
|
], rn.prototype, "auth");
|
|
8855
8911
|
let qe = rn;
|
|
8856
8912
|
var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, fe = (t, e, n, i) => {
|
|
@@ -8858,9 +8914,9 @@ var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, fe = (t, e
|
|
|
8858
8914
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
8859
8915
|
return i && o && Ao(e, n, o), o;
|
|
8860
8916
|
};
|
|
8861
|
-
let
|
|
8917
|
+
let de = class extends Qe {
|
|
8862
8918
|
constructor() {
|
|
8863
|
-
super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.preview = "";
|
|
8919
|
+
super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.requireAcceptance = "", this.oauthLayout = "", this.preview = "";
|
|
8864
8920
|
}
|
|
8865
8921
|
connectedCallback() {
|
|
8866
8922
|
super.connectedCallback(), this.configure();
|
|
@@ -8871,18 +8927,18 @@ let pe = class extends Qe {
|
|
|
8871
8927
|
configure() {
|
|
8872
8928
|
if (!this.endpoint || !this.project) {
|
|
8873
8929
|
queueMicrotask(() => {
|
|
8874
|
-
(!this.endpoint || !this.project) &&
|
|
8930
|
+
(!this.endpoint || !this.project) && M.notifyConfigIncomplete();
|
|
8875
8931
|
});
|
|
8876
8932
|
return;
|
|
8877
8933
|
}
|
|
8878
|
-
const t = this.toConfig(), e =
|
|
8879
|
-
e && JSON.stringify(e) === JSON.stringify(t) ||
|
|
8934
|
+
const t = this.toConfig(), e = M.getConfig();
|
|
8935
|
+
e && JSON.stringify(e) === JSON.stringify(t) || M.configure(t);
|
|
8880
8936
|
}
|
|
8881
8937
|
toConfig() {
|
|
8882
8938
|
const t = { oauth: [] }, e = this.methods.split(/[\s,]+/).filter(Boolean);
|
|
8883
8939
|
for (const n of e)
|
|
8884
8940
|
n.startsWith("oauth:") ? t.oauth.push(n.slice(6)) : n === "email-password" ? t.emailPassword = !0 : n === "magic-url" ? t.magicUrl = !0 : n === "email-otp" ? t.emailOtp = !0 : n === "phone" ? t.phone = !0 : (n === "anonymous" || n === "guest") && (t.anonymous = !0);
|
|
8885
|
-
return t.emailPassword = e.length > 0 ? e.includes("email-password") : !0, {
|
|
8941
|
+
return t.emailPassword = e.length > 0 ? e.includes("email-password") : !0, this.oauthLayout && (t.oauthLayout = this.oauthLayout), {
|
|
8886
8942
|
endpoint: this.endpoint,
|
|
8887
8943
|
project: this.project,
|
|
8888
8944
|
redirectUrl: this.redirectUrl || void 0,
|
|
@@ -8902,74 +8958,81 @@ let pe = class extends Qe {
|
|
|
8902
8958
|
},
|
|
8903
8959
|
legal: {
|
|
8904
8960
|
termsUrl: this.termsUrl || void 0,
|
|
8905
|
-
privacyUrl: this.privacyUrl || void 0
|
|
8961
|
+
privacyUrl: this.privacyUrl || void 0,
|
|
8962
|
+
requireAcceptance: this.requireAcceptance !== "" && this.requireAcceptance !== "false" ? !0 : void 0
|
|
8906
8963
|
},
|
|
8907
8964
|
preview: this.preview === "" || this.preview === "false" ? void 0 : !0
|
|
8908
8965
|
};
|
|
8909
8966
|
}
|
|
8910
8967
|
};
|
|
8911
|
-
|
|
8968
|
+
de.styles = Ge`
|
|
8912
8969
|
:host {
|
|
8913
8970
|
display: none;
|
|
8914
8971
|
}
|
|
8915
8972
|
`;
|
|
8916
8973
|
fe([
|
|
8917
|
-
|
|
8918
|
-
],
|
|
8974
|
+
O({ type: String })
|
|
8975
|
+
], de.prototype, "endpoint", 2);
|
|
8976
|
+
fe([
|
|
8977
|
+
O({ type: String })
|
|
8978
|
+
], de.prototype, "project", 2);
|
|
8979
|
+
fe([
|
|
8980
|
+
O({ type: String, attribute: "redirect-url" })
|
|
8981
|
+
], de.prototype, "redirectUrl", 2);
|
|
8919
8982
|
fe([
|
|
8920
|
-
|
|
8921
|
-
],
|
|
8983
|
+
O({ type: String, attribute: "success-url" })
|
|
8984
|
+
], de.prototype, "successUrl", 2);
|
|
8922
8985
|
fe([
|
|
8923
|
-
|
|
8924
|
-
],
|
|
8986
|
+
O({ type: String })
|
|
8987
|
+
], de.prototype, "methods", 2);
|
|
8925
8988
|
fe([
|
|
8926
|
-
|
|
8927
|
-
],
|
|
8989
|
+
O({ type: String, attribute: "sign-up" })
|
|
8990
|
+
], de.prototype, "signUp", 2);
|
|
8928
8991
|
fe([
|
|
8929
|
-
|
|
8930
|
-
],
|
|
8992
|
+
O({ type: String, attribute: "require-name" })
|
|
8993
|
+
], de.prototype, "requireName", 2);
|
|
8931
8994
|
fe([
|
|
8932
|
-
|
|
8933
|
-
],
|
|
8995
|
+
O({ type: String })
|
|
8996
|
+
], de.prototype, "mfa", 2);
|
|
8934
8997
|
fe([
|
|
8935
|
-
|
|
8936
|
-
],
|
|
8998
|
+
O({ type: String, attribute: "security-phrase" })
|
|
8999
|
+
], de.prototype, "securityPhrase", 2);
|
|
8937
9000
|
fe([
|
|
8938
|
-
|
|
8939
|
-
],
|
|
9001
|
+
O({ type: String })
|
|
9002
|
+
], de.prototype, "name", 2);
|
|
8940
9003
|
fe([
|
|
8941
|
-
|
|
8942
|
-
],
|
|
9004
|
+
O({ type: String })
|
|
9005
|
+
], de.prototype, "logo", 2);
|
|
8943
9006
|
fe([
|
|
8944
|
-
|
|
8945
|
-
],
|
|
9007
|
+
O({ type: String })
|
|
9008
|
+
], de.prototype, "theme", 2);
|
|
8946
9009
|
fe([
|
|
8947
|
-
|
|
8948
|
-
],
|
|
9010
|
+
O({ type: String })
|
|
9011
|
+
], de.prototype, "radius", 2);
|
|
8949
9012
|
fe([
|
|
8950
|
-
|
|
8951
|
-
],
|
|
9013
|
+
O({ type: String })
|
|
9014
|
+
], de.prototype, "primary", 2);
|
|
8952
9015
|
fe([
|
|
8953
|
-
|
|
8954
|
-
],
|
|
9016
|
+
O({ type: String, attribute: "primary-foreground" })
|
|
9017
|
+
], de.prototype, "primaryForeground", 2);
|
|
8955
9018
|
fe([
|
|
8956
|
-
|
|
8957
|
-
],
|
|
9019
|
+
O({ type: String, attribute: "terms-url" })
|
|
9020
|
+
], de.prototype, "termsUrl", 2);
|
|
8958
9021
|
fe([
|
|
8959
|
-
|
|
8960
|
-
],
|
|
9022
|
+
O({ type: String, attribute: "privacy-url" })
|
|
9023
|
+
], de.prototype, "privacyUrl", 2);
|
|
8961
9024
|
fe([
|
|
8962
|
-
|
|
8963
|
-
],
|
|
9025
|
+
O({ type: String, attribute: "require-acceptance" })
|
|
9026
|
+
], de.prototype, "requireAcceptance", 2);
|
|
8964
9027
|
fe([
|
|
8965
|
-
|
|
8966
|
-
],
|
|
9028
|
+
O({ type: String, attribute: "oauth-layout" })
|
|
9029
|
+
], de.prototype, "oauthLayout", 2);
|
|
8967
9030
|
fe([
|
|
8968
|
-
|
|
8969
|
-
],
|
|
8970
|
-
|
|
9031
|
+
O({ type: String })
|
|
9032
|
+
], de.prototype, "preview", 2);
|
|
9033
|
+
de = fe([
|
|
8971
9034
|
ze("authui-config")
|
|
8972
|
-
],
|
|
9035
|
+
], de);
|
|
8973
9036
|
var So = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, _t = (t, e, n, i) => {
|
|
8974
9037
|
for (var o = i > 1 ? void 0 : i ? $o(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
8975
9038
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
@@ -9003,12 +9066,12 @@ function xo(t, e, n) {
|
|
|
9003
9066
|
const i = ui(e), o = ui(n);
|
|
9004
9067
|
return !(t === "loading" && !i.includes("loading") || i.length > 0 && !i.includes(t) || o.includes(t));
|
|
9005
9068
|
}
|
|
9006
|
-
let
|
|
9069
|
+
let bt = class extends Qe {
|
|
9007
9070
|
constructor() {
|
|
9008
|
-
super(...arguments), this.when = "", this.unless = "", this.status =
|
|
9071
|
+
super(...arguments), this.when = "", this.unless = "", this.status = M.getState().status, this.unsubscribe = null;
|
|
9009
9072
|
}
|
|
9010
9073
|
connectedCallback() {
|
|
9011
|
-
super.connectedCallback(), this.status =
|
|
9074
|
+
super.connectedCallback(), this.status = M.getState().status, this.unsubscribe = M.on("change", (t) => this.status = t.status);
|
|
9012
9075
|
}
|
|
9013
9076
|
disconnectedCallback() {
|
|
9014
9077
|
super.disconnectedCallback(), this.unsubscribe?.(), this.unsubscribe = null;
|
|
@@ -9025,18 +9088,18 @@ let yt = class extends Qe {
|
|
|
9025
9088
|
}
|
|
9026
9089
|
};
|
|
9027
9090
|
_t([
|
|
9028
|
-
|
|
9029
|
-
],
|
|
9091
|
+
O({ type: String })
|
|
9092
|
+
], bt.prototype, "when", 2);
|
|
9030
9093
|
_t([
|
|
9031
|
-
|
|
9032
|
-
],
|
|
9094
|
+
O({ type: String })
|
|
9095
|
+
], bt.prototype, "unless", 2);
|
|
9033
9096
|
_t([
|
|
9034
|
-
|
|
9035
|
-
],
|
|
9036
|
-
|
|
9097
|
+
D()
|
|
9098
|
+
], bt.prototype, "status", 2);
|
|
9099
|
+
bt = _t([
|
|
9037
9100
|
ze("authui-show")
|
|
9038
|
-
],
|
|
9039
|
-
const Co =
|
|
9101
|
+
], bt);
|
|
9102
|
+
const Co = Ge`
|
|
9040
9103
|
:host {
|
|
9041
9104
|
display: block;
|
|
9042
9105
|
width: 100%;
|
|
@@ -9183,75 +9246,75 @@ const Co = We`
|
|
|
9183
9246
|
qr: se(
|
|
9184
9247
|
G`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
|
|
9185
9248
|
)
|
|
9186
|
-
},
|
|
9187
|
-
google:
|
|
9249
|
+
}, me = (t, e = "0 0 24 24") => w`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, Uo = {
|
|
9250
|
+
google: me(
|
|
9188
9251
|
G`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
|
|
9189
9252
|
),
|
|
9190
|
-
github:
|
|
9253
|
+
github: me(
|
|
9191
9254
|
G`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
|
|
9192
9255
|
),
|
|
9193
|
-
apple:
|
|
9256
|
+
apple: me(
|
|
9194
9257
|
G`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
|
|
9195
9258
|
),
|
|
9196
|
-
facebook:
|
|
9259
|
+
facebook: me(
|
|
9197
9260
|
G`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
|
|
9198
9261
|
),
|
|
9199
|
-
x:
|
|
9262
|
+
x: me(
|
|
9200
9263
|
G`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
|
|
9201
9264
|
),
|
|
9202
|
-
microsoft:
|
|
9265
|
+
microsoft: me(
|
|
9203
9266
|
G`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
|
|
9204
9267
|
),
|
|
9205
|
-
discord:
|
|
9268
|
+
discord: me(
|
|
9206
9269
|
G`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
|
|
9207
9270
|
),
|
|
9208
|
-
gitlab:
|
|
9271
|
+
gitlab: me(
|
|
9209
9272
|
G`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
|
|
9210
9273
|
),
|
|
9211
|
-
linkedin:
|
|
9274
|
+
linkedin: me(
|
|
9212
9275
|
G`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
|
|
9213
9276
|
),
|
|
9214
|
-
slack:
|
|
9277
|
+
slack: me(
|
|
9215
9278
|
G`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
|
|
9216
9279
|
),
|
|
9217
|
-
twitch:
|
|
9280
|
+
twitch: me(
|
|
9218
9281
|
G`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
|
|
9219
9282
|
),
|
|
9220
|
-
spotify:
|
|
9283
|
+
spotify: me(
|
|
9221
9284
|
G`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
|
|
9222
9285
|
),
|
|
9223
|
-
notion:
|
|
9286
|
+
notion: me(
|
|
9224
9287
|
G`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
|
|
9225
9288
|
),
|
|
9226
|
-
dropbox:
|
|
9289
|
+
dropbox: me(
|
|
9227
9290
|
G`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
|
|
9228
9291
|
),
|
|
9229
|
-
figma:
|
|
9292
|
+
figma: me(
|
|
9230
9293
|
G`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
|
|
9231
9294
|
),
|
|
9232
|
-
bitbucket:
|
|
9295
|
+
bitbucket: me(
|
|
9233
9296
|
G`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
|
|
9234
9297
|
),
|
|
9235
|
-
amazon:
|
|
9298
|
+
amazon: me(
|
|
9236
9299
|
G`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
|
|
9237
9300
|
),
|
|
9238
|
-
paypal:
|
|
9301
|
+
paypal: me(
|
|
9239
9302
|
G`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
|
|
9240
9303
|
)
|
|
9241
9304
|
};
|
|
9242
|
-
function
|
|
9305
|
+
function ht(t) {
|
|
9243
9306
|
return Uo[t] ?? q.globe;
|
|
9244
9307
|
}
|
|
9245
9308
|
function Ai(t) {
|
|
9246
9309
|
const e = (t.trim()[0] ?? "?").toUpperCase();
|
|
9247
9310
|
return /[A-Z0-9]/i.test(e) ? e : q.user;
|
|
9248
9311
|
}
|
|
9249
|
-
function
|
|
9312
|
+
function wt(t) {
|
|
9250
9313
|
typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
|
|
9251
9314
|
window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: t } }));
|
|
9252
9315
|
}));
|
|
9253
9316
|
}
|
|
9254
|
-
function
|
|
9317
|
+
function Ro() {
|
|
9255
9318
|
typeof window > "u" || window.dispatchEvent(new CustomEvent("authui:close"));
|
|
9256
9319
|
}
|
|
9257
9320
|
function pi(t) {
|
|
@@ -9270,28 +9333,32 @@ function pi(t) {
|
|
|
9270
9333
|
let i, o;
|
|
9271
9334
|
return !e.length || n <= 1 ? (i = 1, o = "passwordStrengthTooWeak") : n === 2 ? (i = 2, o = "passwordStrengthWeak") : n === 3 ? (i = 3, o = "passwordStrengthFair") : n >= 5 && e.long && e.lower && e.upper && e.number && e.symbol ? (i = 4, o = "passwordStrengthVeryStrong") : (i = 4, o = "passwordStrengthStrong"), { level: i, percent: i * 25, labelKey: o, checks: e };
|
|
9272
9335
|
}
|
|
9273
|
-
var
|
|
9336
|
+
var Mo = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, ye = (t, e, n, i) => {
|
|
9274
9337
|
for (var o = i > 1 ? void 0 : i ? Eo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
9275
9338
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
9276
|
-
return i && o &&
|
|
9339
|
+
return i && o && Mo(e, n, o), o;
|
|
9277
9340
|
};
|
|
9278
|
-
let
|
|
9341
|
+
let he = class extends qe {
|
|
9279
9342
|
constructor() {
|
|
9280
|
-
super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.expandedOAuth = null, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.onSignIn = (t) => {
|
|
9343
|
+
super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.showPasswordConfirm = !1, this.expandedOAuth = null, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.legalAccepted = !1, this.legalErrorFromOAuth = !1, this.onSignIn = (t) => {
|
|
9281
9344
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9282
|
-
await
|
|
9345
|
+
await M.signInWithEmailPassword(this.email, this.password), this.password = "", tt("email-password"), this.fire("authui-success", { method: "email-password" });
|
|
9283
9346
|
});
|
|
9284
9347
|
}, this.onSignUp = (t) => {
|
|
9285
|
-
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9286
|
-
await
|
|
9287
|
-
});
|
|
9348
|
+
t.preventDefault(), this.requireValid(t) && (this.legalErrorFromOAuth = !1, this.ensureLegalAccepted() && this.run(async () => {
|
|
9349
|
+
await M.signUp(this.email, this.password, this.name), this.password = "", tt("email-password"), this.fire("authui-success", { method: "sign-up" });
|
|
9350
|
+
}));
|
|
9288
9351
|
}, this.onGuest = () => {
|
|
9289
9352
|
this.run(async () => {
|
|
9290
|
-
await
|
|
9353
|
+
await M.signInAnonymously(), tt("anonymous"), this.fire("authui-success", { method: "anonymous" });
|
|
9291
9354
|
});
|
|
9292
9355
|
}, this.onOAuth = (t) => {
|
|
9293
|
-
this.
|
|
9294
|
-
|
|
9356
|
+
if (this.step === "sign-up" && !this.ensureLegalAccepted()) {
|
|
9357
|
+
this.legalErrorFromOAuth = !0;
|
|
9358
|
+
return;
|
|
9359
|
+
}
|
|
9360
|
+
this.legalErrorFromOAuth = !1, this.run(async () => {
|
|
9361
|
+
if (go(t), await M.signInWithOAuth(t), M.isPreview) {
|
|
9295
9362
|
sn(), this.fire("authui-success", { method: "oauth" });
|
|
9296
9363
|
return;
|
|
9297
9364
|
}
|
|
@@ -9299,7 +9366,7 @@ let we = class extends qe {
|
|
|
9299
9366
|
});
|
|
9300
9367
|
}, this.onForgot = (t) => {
|
|
9301
9368
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9302
|
-
await
|
|
9369
|
+
await M.sendPasswordRecovery(this.email), this.notice = { tone: "success", message: this.t("resetLinkSent", { email: this.email }) };
|
|
9303
9370
|
});
|
|
9304
9371
|
}, this.onReset = (t) => {
|
|
9305
9372
|
if (t.preventDefault(), !this.requireValid(t)) return;
|
|
@@ -9309,11 +9376,11 @@ let we = class extends qe {
|
|
|
9309
9376
|
}
|
|
9310
9377
|
const e = this.recovery;
|
|
9311
9378
|
e && this.run(async () => {
|
|
9312
|
-
await
|
|
9379
|
+
await M.completePasswordRecovery(e.userId, e.secret, this.password), this.password = "", this.passwordConfirm = "", this.recovery = null, this.auth.pending?.type === "reset-password" && M.setPending(null), this.go("sign-in"), this.notice = { tone: "success", message: this.t("passwordUpdated") };
|
|
9313
9380
|
});
|
|
9314
9381
|
}, this.onMagicUrl = (t) => {
|
|
9315
9382
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9316
|
-
const e = await
|
|
9383
|
+
const e = await M.sendMagicUrl(this.email);
|
|
9317
9384
|
this.token = {
|
|
9318
9385
|
userId: e.userId,
|
|
9319
9386
|
kind: "magic-url",
|
|
@@ -9323,47 +9390,47 @@ let we = class extends qe {
|
|
|
9323
9390
|
});
|
|
9324
9391
|
}, this.onEmailOtp = (t) => {
|
|
9325
9392
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9326
|
-
const e = await
|
|
9393
|
+
const e = await M.sendEmailOtp(this.email);
|
|
9327
9394
|
this.token = {
|
|
9328
9395
|
userId: e.userId,
|
|
9329
9396
|
kind: "email-otp",
|
|
9330
9397
|
target: this.email,
|
|
9331
9398
|
phrase: e.phrase
|
|
9332
|
-
}, this.code = "";
|
|
9399
|
+
}, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
|
|
9333
9400
|
});
|
|
9334
9401
|
}, this.onPhoneOtp = (t) => {
|
|
9335
9402
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
9336
|
-
const e = await
|
|
9337
|
-
this.token = { userId: e.userId, kind: "phone", target: this.phone }, this.code = "";
|
|
9403
|
+
const e = await M.sendPhoneOtp(this.phone);
|
|
9404
|
+
this.token = { userId: e.userId, kind: "phone", target: this.phone }, this.code = "", this.resendCooldownUntil = Date.now() + 3e4, window.setTimeout(() => this.requestUpdate(), 3e4);
|
|
9338
9405
|
});
|
|
9339
9406
|
}, this.onVerifyCode = (t) => {
|
|
9340
9407
|
if (t.preventDefault(), !this.requireValid(t)) return;
|
|
9341
9408
|
const e = this.token;
|
|
9342
9409
|
e && this.run(async () => {
|
|
9343
|
-
await
|
|
9410
|
+
await M.signInWithToken(e.userId, this.code), this.code = "", this.token = null, tt(e.kind), this.fire("authui-success", { method: e.kind });
|
|
9344
9411
|
}, "code");
|
|
9345
9412
|
}, this.onChooseFactor = (t) => {
|
|
9346
9413
|
this.run(async () => {
|
|
9347
|
-
const e = await
|
|
9414
|
+
const e = await M.createMfaChallenge(t);
|
|
9348
9415
|
this.challenge = { id: e.$id, factor: t }, this.code = "";
|
|
9349
9416
|
});
|
|
9350
9417
|
}, this.onVerifyFactor = (t) => {
|
|
9351
9418
|
if (t.preventDefault(), !this.requireValid(t)) return;
|
|
9352
9419
|
const e = this.challenge;
|
|
9353
9420
|
e && this.run(async () => {
|
|
9354
|
-
await
|
|
9421
|
+
await M.completeMfaChallenge(e.id, this.code), this.code = "", this.challenge = null, this.go("sign-in"), this.fire("authui-success", { method: "mfa" });
|
|
9355
9422
|
}, "code");
|
|
9356
9423
|
}, this.onCancelMfa = () => {
|
|
9357
9424
|
this.run(async () => {
|
|
9358
9425
|
try {
|
|
9359
|
-
await
|
|
9426
|
+
await M.signOut();
|
|
9360
9427
|
} catch (t) {
|
|
9361
|
-
if (!
|
|
9428
|
+
if (!mt(t, oe.sessionNotFound)) throw t;
|
|
9362
9429
|
}
|
|
9363
9430
|
this.go("sign-in");
|
|
9364
9431
|
});
|
|
9365
9432
|
}, this.onSignOut = () => {
|
|
9366
|
-
this.run(() =>
|
|
9433
|
+
this.run(() => M.signOut());
|
|
9367
9434
|
};
|
|
9368
9435
|
}
|
|
9369
9436
|
connectedCallback() {
|
|
@@ -9387,10 +9454,10 @@ let we = class extends qe {
|
|
|
9387
9454
|
}
|
|
9388
9455
|
/** Navigate between screens and reset transient state. */
|
|
9389
9456
|
dismissNotice() {
|
|
9390
|
-
this.notice = null, this.auth.pending?.type === "notice" &&
|
|
9457
|
+
this.notice = null, this.auth.pending?.type === "notice" && M.setPending(null);
|
|
9391
9458
|
}
|
|
9392
9459
|
go(t) {
|
|
9393
|
-
t === "sign-up" && this.config?.signUp === !1 && (t = "sign-in"), this.focusOnStep = !0, this.step = t, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.password = "", this.passwordConfirm = "", t !== "mfa" && (this.challenge = null), t !== "email-otp" && t !== "phone" && t !== "magic-url" && (this.token = null), this.fire("authui-view", { view: t });
|
|
9460
|
+
t === "sign-up" && this.config?.signUp === !1 && (t = "sign-in"), this.focusOnStep = !0, this.step = t, this.error = "", this.notice = null, this.busy = !1, this.showPassword = !1, this.showPasswordConfirm = !1, this.password = "", this.passwordConfirm = "", this.legalAccepted = !1, this.legalErrorFromOAuth = !1, t !== "mfa" && (this.challenge = null), t !== "email-otp" && t !== "phone" && t !== "magic-url" && (this.token = null), this.fire("authui-view", { view: t });
|
|
9394
9461
|
}
|
|
9395
9462
|
// ───────────────────────────── actions ─────────────────────────────
|
|
9396
9463
|
async run(t, e = "link") {
|
|
@@ -9399,7 +9466,7 @@ let we = class extends qe {
|
|
|
9399
9466
|
try {
|
|
9400
9467
|
await t();
|
|
9401
9468
|
} catch (n) {
|
|
9402
|
-
this.error =
|
|
9469
|
+
this.error = Ut(n, this.strings, e);
|
|
9403
9470
|
} finally {
|
|
9404
9471
|
this.busy = !1;
|
|
9405
9472
|
}
|
|
@@ -9474,7 +9541,7 @@ let we = class extends qe {
|
|
|
9474
9541
|
o.target.hidden = !0;
|
|
9475
9542
|
}}
|
|
9476
9543
|
/>` : C}
|
|
9477
|
-
${
|
|
9544
|
+
${M.isPreview ? w`<span class="badge badge-info preview">${this.t("preview")}</span>` : C}
|
|
9478
9545
|
<h2 class="title" id="authui-title">${n}</h2>
|
|
9479
9546
|
${i ? w`<p class="description">${i}</p>` : C}
|
|
9480
9547
|
</div>
|
|
@@ -9492,7 +9559,7 @@ let we = class extends qe {
|
|
|
9492
9559
|
</button>`;
|
|
9493
9560
|
}
|
|
9494
9561
|
passwordField(t) {
|
|
9495
|
-
const e = this[t.field], n = t.meter ? pi(e) : null;
|
|
9562
|
+
const e = this[t.field], n = t.field === "passwordConfirm" ? this.showPasswordConfirm : this.showPassword, i = t.meter ? pi(e) : null;
|
|
9496
9563
|
return w`
|
|
9497
9564
|
<div class="field">
|
|
9498
9565
|
<div class="field-header">
|
|
@@ -9509,7 +9576,7 @@ let we = class extends qe {
|
|
|
9509
9576
|
<input
|
|
9510
9577
|
class="input"
|
|
9511
9578
|
id=${t.id}
|
|
9512
|
-
type=${
|
|
9579
|
+
type=${n ? "text" : "password"}
|
|
9513
9580
|
autocomplete=${t.autocomplete}
|
|
9514
9581
|
required
|
|
9515
9582
|
minlength="8"
|
|
@@ -9519,26 +9586,28 @@ let we = class extends qe {
|
|
|
9519
9586
|
<button
|
|
9520
9587
|
type="button"
|
|
9521
9588
|
class="btn btn-ghost btn-icon"
|
|
9522
|
-
@click=${() =>
|
|
9523
|
-
|
|
9589
|
+
@click=${() => {
|
|
9590
|
+
t.field === "passwordConfirm" ? this.showPasswordConfirm = !this.showPasswordConfirm : this.showPassword = !this.showPassword;
|
|
9591
|
+
}}
|
|
9592
|
+
aria-label=${n ? this.t("hidePassword") : this.t("showPassword")}
|
|
9524
9593
|
>
|
|
9525
|
-
${
|
|
9594
|
+
${n ? q.eyeOff : q.eye}
|
|
9526
9595
|
</button>
|
|
9527
9596
|
</div>
|
|
9528
|
-
${
|
|
9597
|
+
${i && e ? w`<div class="strength" aria-live="polite">
|
|
9529
9598
|
<div
|
|
9530
9599
|
class="strength-meter"
|
|
9531
|
-
data-level=${String(
|
|
9600
|
+
data-level=${String(i.level)}
|
|
9532
9601
|
role="meter"
|
|
9533
9602
|
aria-label=${this.t("passwordStrengthLabel")}
|
|
9534
9603
|
aria-valuemin="0"
|
|
9535
9604
|
aria-valuemax="4"
|
|
9536
|
-
aria-valuenow=${String(
|
|
9537
|
-
aria-valuetext=${this.t(
|
|
9605
|
+
aria-valuenow=${String(i.level)}
|
|
9606
|
+
aria-valuetext=${this.t(i.labelKey)}
|
|
9538
9607
|
>
|
|
9539
9608
|
<span></span><span></span><span></span><span></span>
|
|
9540
9609
|
</div>
|
|
9541
|
-
<p class="strength-label">${this.t(
|
|
9610
|
+
<p class="strength-label">${this.t(i.labelKey)}</p>
|
|
9542
9611
|
</div>` : t.hint ? w`<p class="hint">${t.hint}</p>` : C}
|
|
9543
9612
|
</div>
|
|
9544
9613
|
`;
|
|
@@ -9579,14 +9648,35 @@ let we = class extends qe {
|
|
|
9579
9648
|
</div>
|
|
9580
9649
|
`;
|
|
9581
9650
|
}
|
|
9651
|
+
/** True when sign-up must show/enforce the legal checkbox. */
|
|
9652
|
+
needsLegalAcceptance() {
|
|
9653
|
+
const t = this.config?.legal;
|
|
9654
|
+
return t?.requireAcceptance ? !!(t.termsUrl || t.privacyUrl) : !1;
|
|
9655
|
+
}
|
|
9656
|
+
/** Block sign-up / OAuth when the required legal checkbox is unchecked. */
|
|
9657
|
+
ensureLegalAccepted() {
|
|
9658
|
+
return !this.needsLegalAcceptance() || this.legalAccepted ? !0 : (this.error = this.t("errorLegalRequired"), !1);
|
|
9659
|
+
}
|
|
9660
|
+
legalLinks() {
|
|
9661
|
+
const t = this.config?.legal;
|
|
9662
|
+
return !t?.termsUrl && !t?.privacyUrl ? C : w`${t.termsUrl ? w`<a href=${t.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : C}${t.termsUrl && t.privacyUrl ? w` ${this.t("and")} ` : C}${t.privacyUrl ? w`<a href=${t.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : C}`;
|
|
9663
|
+
}
|
|
9582
9664
|
legal() {
|
|
9583
9665
|
const t = this.config?.legal;
|
|
9584
|
-
return !t?.termsUrl && !t?.privacyUrl ? C : w`<p class="legal"
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9666
|
+
return !t?.termsUrl && !t?.privacyUrl || this.step === "sign-up" && this.needsLegalAcceptance() ? C : w`<p class="legal">${this.t("agreeTo")} ${this.legalLinks()}.</p>`;
|
|
9667
|
+
}
|
|
9668
|
+
/** Required acceptance checkbox on sign-up when legal.requireAcceptance is set. */
|
|
9669
|
+
legalAcceptField() {
|
|
9670
|
+
return this.needsLegalAcceptance() ? w`<label class="legal-accept">
|
|
9671
|
+
<input
|
|
9672
|
+
type="checkbox"
|
|
9673
|
+
.checked=${this.legalAccepted}
|
|
9674
|
+
@change=${(t) => {
|
|
9675
|
+
this.legalAccepted = t.target.checked, this.legalAccepted && this.error === this.t("errorLegalRequired") && (this.error = "", this.legalErrorFromOAuth = !1);
|
|
9676
|
+
}}
|
|
9677
|
+
/>
|
|
9678
|
+
<span>${this.t("acceptLegal")} ${this.legalLinks()}.</span>
|
|
9679
|
+
</label>` : C;
|
|
9590
9680
|
}
|
|
9591
9681
|
backLink(t = "sign-in") {
|
|
9592
9682
|
return w`<div class="links">
|
|
@@ -9649,7 +9739,7 @@ let we = class extends qe {
|
|
|
9649
9739
|
<button
|
|
9650
9740
|
class="btn btn-outline btn-block"
|
|
9651
9741
|
@click=${() => {
|
|
9652
|
-
this.embedded ? this.fire("authui-open", { view: "account" }) :
|
|
9742
|
+
this.embedded ? this.fire("authui-open", { view: "account" }) : wt("account");
|
|
9653
9743
|
}}
|
|
9654
9744
|
>
|
|
9655
9745
|
${q.settings} ${this.t("manageAccount")}
|
|
@@ -9664,32 +9754,56 @@ let we = class extends qe {
|
|
|
9664
9754
|
renderProviders() {
|
|
9665
9755
|
const t = [...this.config?.methods?.oauth ?? []];
|
|
9666
9756
|
if (t.length === 0) return C;
|
|
9667
|
-
const e = Fe(), n = t.find((
|
|
9668
|
-
if (
|
|
9669
|
-
const
|
|
9670
|
-
const
|
|
9671
|
-
return
|
|
9757
|
+
const e = Fe(), n = t.find((s) => e === `oauth:${s}`) ?? null, i = this.config?.methods?.oauthLayout, o = i === "horizontal" || i === "icon" ? "icon" : i === "stack" || i === "accordion" ? i : t.length <= 2 ? "stack" : "accordion";
|
|
9758
|
+
if (o === "icon") {
|
|
9759
|
+
const s = [...t].sort((r, d) => {
|
|
9760
|
+
const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
|
|
9761
|
+
return c - p;
|
|
9762
|
+
});
|
|
9763
|
+
return w`
|
|
9764
|
+
<div class="providers icon">
|
|
9765
|
+
${s.map((r) => {
|
|
9766
|
+
const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
|
|
9767
|
+
return w`<button
|
|
9768
|
+
type="button"
|
|
9769
|
+
class="btn btn-outline ${d ? "last-used" : ""}"
|
|
9770
|
+
@click=${() => this.onOAuth(r)}
|
|
9771
|
+
?disabled=${this.busy}
|
|
9772
|
+
aria-label=${d ? `${c}. ${this.t("lastUsed")}` : c}
|
|
9773
|
+
title=${c}
|
|
9774
|
+
>
|
|
9775
|
+
${ht(r)}
|
|
9776
|
+
${d ? w`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : C}
|
|
9777
|
+
</button>`;
|
|
9778
|
+
})}
|
|
9779
|
+
</div>
|
|
9780
|
+
`;
|
|
9781
|
+
}
|
|
9782
|
+
if (o === "stack") {
|
|
9783
|
+
const s = [...t].sort((r, d) => {
|
|
9784
|
+
const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
|
|
9785
|
+
return c - p;
|
|
9672
9786
|
});
|
|
9673
9787
|
return w`
|
|
9674
9788
|
<div class="providers">
|
|
9675
|
-
${
|
|
9676
|
-
const
|
|
9789
|
+
${s.map((r) => {
|
|
9790
|
+
const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
|
|
9677
9791
|
return w`<button
|
|
9678
9792
|
type="button"
|
|
9679
|
-
class="btn btn-outline ${
|
|
9680
|
-
@click=${() => this.onOAuth(
|
|
9793
|
+
class="btn btn-outline ${d ? "last-used" : ""}"
|
|
9794
|
+
@click=${() => this.onOAuth(r)}
|
|
9681
9795
|
?disabled=${this.busy}
|
|
9682
|
-
aria-label=${
|
|
9796
|
+
aria-label=${d ? `${c}. ${this.t("lastUsed")}` : c}
|
|
9683
9797
|
>
|
|
9684
|
-
${
|
|
9685
|
-
<span>${
|
|
9686
|
-
${
|
|
9798
|
+
${ht(r)}
|
|
9799
|
+
<span>${c}</span>
|
|
9800
|
+
${d ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
|
|
9687
9801
|
</button>`;
|
|
9688
9802
|
})}
|
|
9689
9803
|
</div>
|
|
9690
9804
|
`;
|
|
9691
9805
|
}
|
|
9692
|
-
const
|
|
9806
|
+
const a = this.expandedOAuth && t.includes(this.expandedOAuth) ? this.expandedOAuth : n ?? t[0];
|
|
9693
9807
|
return w`
|
|
9694
9808
|
<div
|
|
9695
9809
|
class="providers accordion"
|
|
@@ -9697,29 +9811,29 @@ let we = class extends qe {
|
|
|
9697
9811
|
this.expandedOAuth = n ?? t[0];
|
|
9698
9812
|
}}
|
|
9699
9813
|
>
|
|
9700
|
-
${t.map((
|
|
9701
|
-
const
|
|
9814
|
+
${t.map((s) => {
|
|
9815
|
+
const r = e === `oauth:${s}`, d = a === s, c = this.t("continueWith", { provider: pt(s) });
|
|
9702
9816
|
return w`<div
|
|
9703
|
-
class="provider-slot ${
|
|
9817
|
+
class="provider-slot ${d ? "is-expanded" : ""}"
|
|
9704
9818
|
@mouseenter=${() => {
|
|
9705
|
-
this.expandedOAuth =
|
|
9819
|
+
this.expandedOAuth = s;
|
|
9706
9820
|
}}
|
|
9707
9821
|
>
|
|
9708
9822
|
<button
|
|
9709
9823
|
type="button"
|
|
9710
9824
|
class="btn btn-outline"
|
|
9711
|
-
@click=${() => this.onOAuth(
|
|
9825
|
+
@click=${() => this.onOAuth(s)}
|
|
9712
9826
|
@focus=${() => {
|
|
9713
|
-
this.expandedOAuth =
|
|
9827
|
+
this.expandedOAuth = s;
|
|
9714
9828
|
}}
|
|
9715
9829
|
?disabled=${this.busy}
|
|
9716
|
-
aria-label=${
|
|
9830
|
+
aria-label=${r ? `${c}. ${this.t("lastUsed")}` : c}
|
|
9717
9831
|
>
|
|
9718
|
-
${
|
|
9832
|
+
${ht(s)}
|
|
9719
9833
|
<span class="provider-label"
|
|
9720
|
-
><span><span class="provider-label-text">${
|
|
9834
|
+
><span><span class="provider-label-text">${c}</span></span></span
|
|
9721
9835
|
>
|
|
9722
|
-
${
|
|
9836
|
+
${r ? w`<span class="oauth-last-used" data-last-used=${s} aria-hidden="true">
|
|
9723
9837
|
<span class="oauth-last-used-dot"></span>
|
|
9724
9838
|
<span class="oauth-last-used-pill">${this.t("lastUsed")}</span>
|
|
9725
9839
|
</span>` : C}
|
|
@@ -9758,6 +9872,7 @@ let we = class extends qe {
|
|
|
9758
9872
|
type="button"
|
|
9759
9873
|
class="btn btn-secondary btn-block ${a ? "last-used" : ""}"
|
|
9760
9874
|
@click=${() => this.go(o.step)}
|
|
9875
|
+
?disabled=${this.busy}
|
|
9761
9876
|
>
|
|
9762
9877
|
${o.icon} ${o.label}
|
|
9763
9878
|
${a ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
|
|
@@ -9784,9 +9899,10 @@ let we = class extends qe {
|
|
|
9784
9899
|
`;
|
|
9785
9900
|
}
|
|
9786
9901
|
renderSignUp() {
|
|
9902
|
+
const t = this.legalErrorFromOAuth && this.error === this.t("errorLegalRequired");
|
|
9787
9903
|
return w`
|
|
9788
9904
|
<div class="stack">
|
|
9789
|
-
${this.renderProviders()}
|
|
9905
|
+
${this.renderProviders()} ${t ? this.renderError() : C}
|
|
9790
9906
|
${(this.config?.methods?.oauth?.length ?? 0) > 0 ? w`<div class="separator-text">${this.t("or")}</div>` : C}
|
|
9791
9907
|
<form class="form" @submit=${this.onSignUp} novalidate>
|
|
9792
9908
|
${this.config?.requireName !== !1 ? w`<div class="field">
|
|
@@ -9803,7 +9919,8 @@ let we = class extends qe {
|
|
|
9803
9919
|
</div>` : C}
|
|
9804
9920
|
${this.emailField()}
|
|
9805
9921
|
${this.passwordField({ label: this.t("password"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
|
|
9806
|
-
${this.
|
|
9922
|
+
${this.legalAcceptField()} ${t ? C : this.renderError()}
|
|
9923
|
+
${this.submitButton(this.t("createAccount"))}
|
|
9807
9924
|
</form>
|
|
9808
9925
|
<div class="links">
|
|
9809
9926
|
<span>${this.t("haveAccount")}</span>
|
|
@@ -9892,10 +10009,10 @@ let we = class extends qe {
|
|
|
9892
10009
|
const t = this.token;
|
|
9893
10010
|
!t || Date.now() < this.resendCooldownUntil || (this.error = "", await this.run(async () => {
|
|
9894
10011
|
if (t.kind === "phone") {
|
|
9895
|
-
const e = await
|
|
10012
|
+
const e = await M.sendPhoneOtp(t.target);
|
|
9896
10013
|
this.token = { userId: e.userId, kind: "phone", target: t.target };
|
|
9897
10014
|
} else {
|
|
9898
|
-
const e = await
|
|
10015
|
+
const e = await M.sendEmailOtp(t.target);
|
|
9899
10016
|
this.token = {
|
|
9900
10017
|
userId: e.userId,
|
|
9901
10018
|
kind: "email-otp",
|
|
@@ -10057,50 +10174,65 @@ let we = class extends qe {
|
|
|
10057
10174
|
`;
|
|
10058
10175
|
}
|
|
10059
10176
|
};
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
],
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
],
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
],
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
],
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
],
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
],
|
|
10079
|
-
|
|
10080
|
-
|
|
10081
|
-
],
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
],
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
],
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
],
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
],
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
],
|
|
10097
|
-
|
|
10177
|
+
he.styles = [...qe.styles, Co];
|
|
10178
|
+
ye([
|
|
10179
|
+
O({ type: String })
|
|
10180
|
+
], he.prototype, "view", 2);
|
|
10181
|
+
ye([
|
|
10182
|
+
O({ type: Boolean })
|
|
10183
|
+
], he.prototype, "embedded", 2);
|
|
10184
|
+
ye([
|
|
10185
|
+
D()
|
|
10186
|
+
], he.prototype, "step", 2);
|
|
10187
|
+
ye([
|
|
10188
|
+
D()
|
|
10189
|
+
], he.prototype, "busy", 2);
|
|
10190
|
+
ye([
|
|
10191
|
+
D()
|
|
10192
|
+
], he.prototype, "error", 2);
|
|
10193
|
+
ye([
|
|
10194
|
+
D()
|
|
10195
|
+
], he.prototype, "notice", 2);
|
|
10196
|
+
ye([
|
|
10197
|
+
D()
|
|
10198
|
+
], he.prototype, "showPassword", 2);
|
|
10199
|
+
ye([
|
|
10200
|
+
D()
|
|
10201
|
+
], he.prototype, "showPasswordConfirm", 2);
|
|
10202
|
+
ye([
|
|
10203
|
+
D()
|
|
10204
|
+
], he.prototype, "expandedOAuth", 2);
|
|
10205
|
+
ye([
|
|
10206
|
+
D()
|
|
10207
|
+
], he.prototype, "token", 2);
|
|
10208
|
+
ye([
|
|
10209
|
+
D()
|
|
10210
|
+
], he.prototype, "resendCooldownUntil", 2);
|
|
10211
|
+
ye([
|
|
10212
|
+
D()
|
|
10213
|
+
], he.prototype, "challenge", 2);
|
|
10214
|
+
ye([
|
|
10215
|
+
D()
|
|
10216
|
+
], he.prototype, "recovery", 2);
|
|
10217
|
+
ye([
|
|
10098
10218
|
wi("form input:not([type=hidden])")
|
|
10099
|
-
],
|
|
10100
|
-
|
|
10219
|
+
], he.prototype, "firstInput", 2);
|
|
10220
|
+
ye([
|
|
10221
|
+
D()
|
|
10222
|
+
], he.prototype, "password", 2);
|
|
10223
|
+
ye([
|
|
10224
|
+
D()
|
|
10225
|
+
], he.prototype, "passwordConfirm", 2);
|
|
10226
|
+
ye([
|
|
10227
|
+
D()
|
|
10228
|
+
], he.prototype, "legalAccepted", 2);
|
|
10229
|
+
ye([
|
|
10230
|
+
D()
|
|
10231
|
+
], he.prototype, "legalErrorFromOAuth", 2);
|
|
10232
|
+
he = ye([
|
|
10101
10233
|
ze("authui-sign-in")
|
|
10102
|
-
],
|
|
10103
|
-
var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor,
|
|
10234
|
+
], he);
|
|
10235
|
+
var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, F = (t, e, n, i) => {
|
|
10104
10236
|
for (var o = i > 1 ? void 0 : i ? _o(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
10105
10237
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
10106
10238
|
return i && o && qo(e, n, o), o;
|
|
@@ -10122,12 +10254,12 @@ let z = class extends qe {
|
|
|
10122
10254
|
const o = e[i].id.replace("authui-tab-", "");
|
|
10123
10255
|
this.select(o), requestAnimationFrame(() => e[i]?.focus());
|
|
10124
10256
|
}, this.noticeTimer = null, this.factorsLoading = !1, this.onUpdateName = (t) => {
|
|
10125
|
-
t.preventDefault(), this.requireValid(t) && this.run("name", () =>
|
|
10257
|
+
t.preventDefault(), this.requireValid(t) && this.run("name", () => M.updateName(this.nameInput), this.t("nameUpdated"));
|
|
10126
10258
|
}, this.onUpdateEmail = (t) => {
|
|
10127
10259
|
t.preventDefault(), this.requireValid(t) && this.run(
|
|
10128
10260
|
"email",
|
|
10129
10261
|
async () => {
|
|
10130
|
-
await
|
|
10262
|
+
await M.updateEmail(this.emailInput, this.emailPassword), this.emailPassword = "";
|
|
10131
10263
|
},
|
|
10132
10264
|
this.t("emailUpdated")
|
|
10133
10265
|
);
|
|
@@ -10135,7 +10267,7 @@ let z = class extends qe {
|
|
|
10135
10267
|
t.preventDefault(), this.requireValid(t) && this.run(
|
|
10136
10268
|
"phone",
|
|
10137
10269
|
async () => {
|
|
10138
|
-
await
|
|
10270
|
+
await M.updatePhone(this.phoneInput, this.phonePassword), this.phonePassword = "";
|
|
10139
10271
|
},
|
|
10140
10272
|
this.t("phoneUpdated")
|
|
10141
10273
|
);
|
|
@@ -10143,7 +10275,7 @@ let z = class extends qe {
|
|
|
10143
10275
|
t.preventDefault(), this.requireValid(t) && this.run(
|
|
10144
10276
|
"guest",
|
|
10145
10277
|
async () => {
|
|
10146
|
-
await
|
|
10278
|
+
await M.convertGuest(this.emailInput, this.emailPassword, this.guestName), this.emailPassword = "";
|
|
10147
10279
|
},
|
|
10148
10280
|
this.t("accountConverted")
|
|
10149
10281
|
);
|
|
@@ -10151,19 +10283,19 @@ let z = class extends qe {
|
|
|
10151
10283
|
Date.now() < this.verifyEmailCooldownUntil || this.run(
|
|
10152
10284
|
"verify",
|
|
10153
10285
|
async () => {
|
|
10154
|
-
await
|
|
10286
|
+
await M.sendEmailVerification(), this.startVerifyEmailCooldown();
|
|
10155
10287
|
},
|
|
10156
10288
|
this.t("verificationSent")
|
|
10157
10289
|
);
|
|
10158
10290
|
}, this.onSendPhoneVerification = () => {
|
|
10159
10291
|
this.run("verify-phone", async () => {
|
|
10160
|
-
await
|
|
10292
|
+
await M.sendPhoneVerification(), this.phoneCodeSent = !0;
|
|
10161
10293
|
});
|
|
10162
10294
|
}, this.onConfirmPhoneVerification = (t) => {
|
|
10163
10295
|
t.preventDefault(), this.requireValid(t) && this.run(
|
|
10164
10296
|
"verify-phone-code",
|
|
10165
10297
|
async () => {
|
|
10166
|
-
await
|
|
10298
|
+
await M.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1;
|
|
10167
10299
|
},
|
|
10168
10300
|
this.t("phoneVerified")
|
|
10169
10301
|
);
|
|
@@ -10176,7 +10308,7 @@ let z = class extends qe {
|
|
|
10176
10308
|
this.run(
|
|
10177
10309
|
"password",
|
|
10178
10310
|
async () => {
|
|
10179
|
-
await
|
|
10311
|
+
await M.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
|
|
10180
10312
|
},
|
|
10181
10313
|
this.t("passwordChanged")
|
|
10182
10314
|
);
|
|
@@ -10184,17 +10316,17 @@ let z = class extends qe {
|
|
|
10184
10316
|
}, this.onToggleMfa = () => {
|
|
10185
10317
|
const t = !this.user?.mfa;
|
|
10186
10318
|
this.run("mfa", async () => {
|
|
10187
|
-
await
|
|
10319
|
+
await M.setMfaEnabled(t), await this.loadFactors();
|
|
10188
10320
|
});
|
|
10189
10321
|
}, this.onAddAuthenticator = () => {
|
|
10190
10322
|
this.run("authenticator", async () => {
|
|
10191
|
-
this.authenticator = await
|
|
10323
|
+
this.authenticator = await M.addAuthenticator(), this.authenticatorCode = "";
|
|
10192
10324
|
});
|
|
10193
10325
|
}, this.onVerifyAuthenticator = (t) => {
|
|
10194
10326
|
t.preventDefault(), this.requireValid(t) && this.run(
|
|
10195
10327
|
"authenticator-code",
|
|
10196
10328
|
async () => {
|
|
10197
|
-
await
|
|
10329
|
+
await M.verifyAuthenticator(this.authenticatorCode), this.authenticator = null, this.authenticatorCode = "", await this.loadFactors();
|
|
10198
10330
|
},
|
|
10199
10331
|
this.t("authenticatorAdded")
|
|
10200
10332
|
);
|
|
@@ -10204,15 +10336,15 @@ let z = class extends qe {
|
|
|
10204
10336
|
return;
|
|
10205
10337
|
}
|
|
10206
10338
|
this.confirmRemoveAuthenticator = !1, this.run("remove-authenticator", async () => {
|
|
10207
|
-
await
|
|
10339
|
+
await M.removeAuthenticator(), await this.loadFactors();
|
|
10208
10340
|
});
|
|
10209
10341
|
}, this.onRecoveryCodes = () => {
|
|
10210
10342
|
this.run("recovery", async () => {
|
|
10211
10343
|
try {
|
|
10212
|
-
this.recoveryCodes = await
|
|
10344
|
+
this.recoveryCodes = await M.createRecoveryCodes();
|
|
10213
10345
|
} catch (t) {
|
|
10214
|
-
if (!
|
|
10215
|
-
this.recoveryCodes = await
|
|
10346
|
+
if (!mt(t, oe.recoveryCodesExist)) throw t;
|
|
10347
|
+
this.recoveryCodes = await M.getRecoveryCodes();
|
|
10216
10348
|
}
|
|
10217
10349
|
await this.loadFactors();
|
|
10218
10350
|
});
|
|
@@ -10222,7 +10354,7 @@ let z = class extends qe {
|
|
|
10222
10354
|
return;
|
|
10223
10355
|
}
|
|
10224
10356
|
this.confirmRegenerate = !1, this.run("recovery", async () => {
|
|
10225
|
-
this.recoveryCodes = await
|
|
10357
|
+
this.recoveryCodes = await M.regenerateRecoveryCodes();
|
|
10226
10358
|
});
|
|
10227
10359
|
}, this.onCopyCodes = async () => {
|
|
10228
10360
|
if (this.recoveryCodes)
|
|
@@ -10242,7 +10374,7 @@ let z = class extends qe {
|
|
|
10242
10374
|
}
|
|
10243
10375
|
}, this.onStepUpFactor = (t) => {
|
|
10244
10376
|
this.run("stepup", async () => {
|
|
10245
|
-
const e = await
|
|
10377
|
+
const e = await M.createMfaChallenge(t);
|
|
10246
10378
|
this.stepUp = { ...this.stepUp, challenge: { id: e.$id, factor: t } }, this.stepUpCode = "";
|
|
10247
10379
|
});
|
|
10248
10380
|
}, this.onStepUpVerify = (t) => {
|
|
@@ -10251,33 +10383,33 @@ let z = class extends qe {
|
|
|
10251
10383
|
e?.challenge && (async () => {
|
|
10252
10384
|
let n = !1;
|
|
10253
10385
|
await this.run("stepup-code", async () => {
|
|
10254
|
-
await
|
|
10386
|
+
await M.completeMfaChallenge(e.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", n = !0;
|
|
10255
10387
|
}), n && await e.retry();
|
|
10256
10388
|
})();
|
|
10257
10389
|
}, this.onDeleteSession = (t) => {
|
|
10258
10390
|
this.run(`session-${t}`, async () => {
|
|
10259
10391
|
if ((this.sessions ?? []).some((n) => n.$id === t && n.current)) {
|
|
10260
|
-
await
|
|
10392
|
+
await M.signOut(), this.sessions = [];
|
|
10261
10393
|
return;
|
|
10262
10394
|
}
|
|
10263
|
-
await
|
|
10395
|
+
await M.signOut(t), this.sessions = (this.sessions ?? []).filter((n) => n.$id !== t);
|
|
10264
10396
|
});
|
|
10265
10397
|
}, this.onSignOutAll = () => {
|
|
10266
10398
|
if (!this.confirmSignOutAll) {
|
|
10267
10399
|
this.confirmSignOutAll = !0;
|
|
10268
10400
|
return;
|
|
10269
10401
|
}
|
|
10270
|
-
this.confirmSignOutAll = !1, this.run("sessions-all", () =>
|
|
10402
|
+
this.confirmSignOutAll = !1, this.run("sessions-all", () => M.signOutEverywhere());
|
|
10271
10403
|
}, this.onDeleteIdentity = (t) => {
|
|
10272
10404
|
if (this.confirmDisconnectId !== t) {
|
|
10273
10405
|
this.confirmDisconnectId = t;
|
|
10274
10406
|
return;
|
|
10275
10407
|
}
|
|
10276
10408
|
this.confirmDisconnectId = null, this.run(`identity-${t}`, async () => {
|
|
10277
|
-
await
|
|
10409
|
+
await M.deleteIdentity(t), this.identities = (this.identities ?? []).filter((e) => e.$id !== t);
|
|
10278
10410
|
});
|
|
10279
10411
|
}, this.onDeleteAccount = () => {
|
|
10280
|
-
this.run("delete", () =>
|
|
10412
|
+
this.run("delete", () => M.deleteAccount());
|
|
10281
10413
|
};
|
|
10282
10414
|
}
|
|
10283
10415
|
connectedCallback() {
|
|
@@ -10334,9 +10466,9 @@ let z = class extends qe {
|
|
|
10334
10466
|
try {
|
|
10335
10467
|
await e(), n && this.setNotice("success", n);
|
|
10336
10468
|
} catch (i) {
|
|
10337
|
-
|
|
10469
|
+
mt(i, oe.challengeRequired) ? this.stepUp = { retry: () => this.run(t, e, n) } : this.errors = {
|
|
10338
10470
|
...this.errors,
|
|
10339
|
-
[t]:
|
|
10471
|
+
[t]: Ut(
|
|
10340
10472
|
i,
|
|
10341
10473
|
this.strings,
|
|
10342
10474
|
t.includes("code") ? "code" : t === "password" ? "password" : "link"
|
|
@@ -10350,12 +10482,12 @@ let z = class extends qe {
|
|
|
10350
10482
|
// ─────────────────────────── loaders ───────────────────────────
|
|
10351
10483
|
async loadSessions() {
|
|
10352
10484
|
await this.run("sessions", async () => {
|
|
10353
|
-
this.sessions = await
|
|
10485
|
+
this.sessions = await M.listSessions();
|
|
10354
10486
|
});
|
|
10355
10487
|
}
|
|
10356
10488
|
async loadIdentities() {
|
|
10357
10489
|
await this.run("identities", async () => {
|
|
10358
|
-
this.identities = await
|
|
10490
|
+
this.identities = await M.listIdentities();
|
|
10359
10491
|
});
|
|
10360
10492
|
}
|
|
10361
10493
|
/** Probe once so Activity is never shown on servers without /account/logs. */
|
|
@@ -10363,7 +10495,7 @@ let z = class extends qe {
|
|
|
10363
10495
|
if (!this.logsProbeStarted) {
|
|
10364
10496
|
this.logsProbeStarted = !0;
|
|
10365
10497
|
try {
|
|
10366
|
-
this.logs = await
|
|
10498
|
+
this.logs = await M.listLogs(), this.logsSupported = !0;
|
|
10367
10499
|
} catch {
|
|
10368
10500
|
this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
|
|
10369
10501
|
}
|
|
@@ -10376,7 +10508,7 @@ let z = class extends qe {
|
|
|
10376
10508
|
}
|
|
10377
10509
|
this.busy = "logs";
|
|
10378
10510
|
try {
|
|
10379
|
-
this.logs = await
|
|
10511
|
+
this.logs = await M.listLogs();
|
|
10380
10512
|
} catch {
|
|
10381
10513
|
this.logsSupported = !1, this.logs = [], this.active === "activity" && (this.active = "profile");
|
|
10382
10514
|
} finally {
|
|
@@ -10387,7 +10519,7 @@ let z = class extends qe {
|
|
|
10387
10519
|
if (!this.factorsLoading) {
|
|
10388
10520
|
this.factorsLoading = !0;
|
|
10389
10521
|
try {
|
|
10390
|
-
this.factors = await
|
|
10522
|
+
this.factors = await M.listMfaFactors();
|
|
10391
10523
|
} catch {
|
|
10392
10524
|
this.factors = {
|
|
10393
10525
|
totp: !1,
|
|
@@ -10488,12 +10620,12 @@ let z = class extends qe {
|
|
|
10488
10620
|
<span class="row-title" title=${e}>
|
|
10489
10621
|
${e}
|
|
10490
10622
|
${t.mfa ? w`<span class="badge badge-success">${q.shieldCheck} ${this.t("mfaBadge")}</span>` : C}
|
|
10491
|
-
${
|
|
10623
|
+
${M.isPreview ? w`<span class="badge badge-info">${this.t("preview")}</span>` : C}
|
|
10492
10624
|
</span>
|
|
10493
10625
|
${t.email && t.name ? w`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
|
|
10494
10626
|
</div>
|
|
10495
10627
|
</div>
|
|
10496
|
-
<button class="btn btn-outline btn-sm" @click=${() =>
|
|
10628
|
+
<button class="btn btn-outline btn-sm" @click=${() => M.signOut()}>
|
|
10497
10629
|
${q.logOut} ${this.t("signOut")}
|
|
10498
10630
|
</button>
|
|
10499
10631
|
</div>
|
|
@@ -10918,7 +11050,7 @@ let z = class extends qe {
|
|
|
10918
11050
|
</div>`;
|
|
10919
11051
|
}
|
|
10920
11052
|
renderMfaCard() {
|
|
10921
|
-
const t = this.user, e = this.factors?.totp ?? !1, n = this.authenticator ?
|
|
11053
|
+
const t = this.user, e = this.factors?.totp ?? !1, n = this.authenticator ? M.isPreview ? po(this.authenticator.uri) : new on(M.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
|
|
10922
11054
|
return this.card(
|
|
10923
11055
|
this.t("twoFactor"),
|
|
10924
11056
|
this.t("twoFactorDescription"),
|
|
@@ -11253,9 +11385,9 @@ let z = class extends qe {
|
|
|
11253
11385
|
) : t.map(
|
|
11254
11386
|
(n) => w`<div class="row">
|
|
11255
11387
|
<div class="inline">
|
|
11256
|
-
<span class="device">${
|
|
11388
|
+
<span class="device">${ht(n.provider)}</span>
|
|
11257
11389
|
<div class="row-main">
|
|
11258
|
-
<span class="row-title">${
|
|
11390
|
+
<span class="row-title">${pt(n.provider)}</span>
|
|
11259
11391
|
<span class="row-sub">${n.providerEmail || n.providerUid}</span>
|
|
11260
11392
|
</div>
|
|
11261
11393
|
</div>
|
|
@@ -11294,12 +11426,12 @@ let z = class extends qe {
|
|
|
11294
11426
|
(n) => w`<button
|
|
11295
11427
|
class="btn btn-outline btn-sm"
|
|
11296
11428
|
@click=${() => {
|
|
11297
|
-
this.run(`connect-${n}`, () =>
|
|
11429
|
+
this.run(`connect-${n}`, () => M.signInWithOAuth(n));
|
|
11298
11430
|
}}
|
|
11299
11431
|
?disabled=${!!this.busy}
|
|
11300
11432
|
>
|
|
11301
|
-
${this.spinner(`connect-${n}`)} ${
|
|
11302
|
-
${this.t("connectProvider", { provider:
|
|
11433
|
+
${this.spinner(`connect-${n}`)} ${ht(n)}
|
|
11434
|
+
${this.t("connectProvider", { provider: pt(n) })}
|
|
11303
11435
|
</button>`
|
|
11304
11436
|
)}` : void 0
|
|
11305
11437
|
)}
|
|
@@ -11333,7 +11465,7 @@ let z = class extends qe {
|
|
|
11333
11465
|
};
|
|
11334
11466
|
z.styles = [
|
|
11335
11467
|
...qe.styles,
|
|
11336
|
-
|
|
11468
|
+
Ge`
|
|
11337
11469
|
:host {
|
|
11338
11470
|
display: block;
|
|
11339
11471
|
width: 100%;
|
|
@@ -11429,117 +11561,117 @@ z.styles = [
|
|
|
11429
11561
|
}
|
|
11430
11562
|
`
|
|
11431
11563
|
];
|
|
11432
|
-
|
|
11433
|
-
|
|
11564
|
+
F([
|
|
11565
|
+
O({ type: Boolean })
|
|
11434
11566
|
], z.prototype, "embedded", 2);
|
|
11435
|
-
|
|
11436
|
-
|
|
11567
|
+
F([
|
|
11568
|
+
O({ type: String })
|
|
11437
11569
|
], z.prototype, "tab", 2);
|
|
11438
|
-
|
|
11439
|
-
|
|
11570
|
+
F([
|
|
11571
|
+
D()
|
|
11440
11572
|
], z.prototype, "active", 2);
|
|
11441
|
-
|
|
11442
|
-
|
|
11573
|
+
F([
|
|
11574
|
+
D()
|
|
11443
11575
|
], z.prototype, "busy", 2);
|
|
11444
|
-
|
|
11445
|
-
|
|
11576
|
+
F([
|
|
11577
|
+
D()
|
|
11446
11578
|
], z.prototype, "notice", 2);
|
|
11447
|
-
|
|
11448
|
-
|
|
11579
|
+
F([
|
|
11580
|
+
D()
|
|
11449
11581
|
], z.prototype, "errors", 2);
|
|
11450
|
-
|
|
11451
|
-
|
|
11582
|
+
F([
|
|
11583
|
+
D()
|
|
11452
11584
|
], z.prototype, "nameInput", 2);
|
|
11453
|
-
|
|
11454
|
-
|
|
11585
|
+
F([
|
|
11586
|
+
D()
|
|
11455
11587
|
], z.prototype, "emailInput", 2);
|
|
11456
|
-
|
|
11457
|
-
|
|
11588
|
+
F([
|
|
11589
|
+
D()
|
|
11458
11590
|
], z.prototype, "emailPassword", 2);
|
|
11459
|
-
|
|
11460
|
-
|
|
11591
|
+
F([
|
|
11592
|
+
D()
|
|
11461
11593
|
], z.prototype, "phoneInput", 2);
|
|
11462
|
-
|
|
11463
|
-
|
|
11594
|
+
F([
|
|
11595
|
+
D()
|
|
11464
11596
|
], z.prototype, "phonePassword", 2);
|
|
11465
|
-
|
|
11466
|
-
|
|
11597
|
+
F([
|
|
11598
|
+
D()
|
|
11467
11599
|
], z.prototype, "phoneCode", 2);
|
|
11468
|
-
|
|
11469
|
-
|
|
11600
|
+
F([
|
|
11601
|
+
D()
|
|
11470
11602
|
], z.prototype, "phoneCodeSent", 2);
|
|
11471
|
-
|
|
11472
|
-
|
|
11603
|
+
F([
|
|
11604
|
+
D()
|
|
11473
11605
|
], z.prototype, "guestName", 2);
|
|
11474
|
-
|
|
11475
|
-
|
|
11606
|
+
F([
|
|
11607
|
+
D()
|
|
11476
11608
|
], z.prototype, "oldPassword", 2);
|
|
11477
|
-
|
|
11478
|
-
|
|
11609
|
+
F([
|
|
11610
|
+
D()
|
|
11479
11611
|
], z.prototype, "newPassword", 2);
|
|
11480
|
-
|
|
11481
|
-
|
|
11612
|
+
F([
|
|
11613
|
+
D()
|
|
11482
11614
|
], z.prototype, "newPasswordConfirm", 2);
|
|
11483
|
-
|
|
11484
|
-
|
|
11615
|
+
F([
|
|
11616
|
+
D()
|
|
11485
11617
|
], z.prototype, "authenticator", 2);
|
|
11486
|
-
|
|
11487
|
-
|
|
11618
|
+
F([
|
|
11619
|
+
D()
|
|
11488
11620
|
], z.prototype, "authenticatorCode", 2);
|
|
11489
|
-
|
|
11490
|
-
|
|
11621
|
+
F([
|
|
11622
|
+
D()
|
|
11491
11623
|
], z.prototype, "factors", 2);
|
|
11492
|
-
|
|
11493
|
-
|
|
11624
|
+
F([
|
|
11625
|
+
D()
|
|
11494
11626
|
], z.prototype, "recoveryCodes", 2);
|
|
11495
|
-
|
|
11496
|
-
|
|
11627
|
+
F([
|
|
11628
|
+
D()
|
|
11497
11629
|
], z.prototype, "stepUp", 2);
|
|
11498
|
-
|
|
11499
|
-
|
|
11630
|
+
F([
|
|
11631
|
+
D()
|
|
11500
11632
|
], z.prototype, "stepUpCode", 2);
|
|
11501
|
-
|
|
11502
|
-
|
|
11633
|
+
F([
|
|
11634
|
+
D()
|
|
11503
11635
|
], z.prototype, "copied", 2);
|
|
11504
|
-
|
|
11505
|
-
|
|
11636
|
+
F([
|
|
11637
|
+
D()
|
|
11506
11638
|
], z.prototype, "sessions", 2);
|
|
11507
|
-
|
|
11508
|
-
|
|
11639
|
+
F([
|
|
11640
|
+
D()
|
|
11509
11641
|
], z.prototype, "identities", 2);
|
|
11510
|
-
|
|
11511
|
-
|
|
11642
|
+
F([
|
|
11643
|
+
D()
|
|
11512
11644
|
], z.prototype, "logs", 2);
|
|
11513
|
-
|
|
11514
|
-
|
|
11645
|
+
F([
|
|
11646
|
+
D()
|
|
11515
11647
|
], z.prototype, "logsSupported", 2);
|
|
11516
|
-
|
|
11517
|
-
|
|
11648
|
+
F([
|
|
11649
|
+
D()
|
|
11518
11650
|
], z.prototype, "confirmDelete", 2);
|
|
11519
|
-
|
|
11520
|
-
|
|
11651
|
+
F([
|
|
11652
|
+
D()
|
|
11521
11653
|
], z.prototype, "confirmRegenerate", 2);
|
|
11522
|
-
|
|
11523
|
-
|
|
11654
|
+
F([
|
|
11655
|
+
D()
|
|
11524
11656
|
], z.prototype, "confirmRemoveAuthenticator", 2);
|
|
11525
|
-
|
|
11526
|
-
|
|
11657
|
+
F([
|
|
11658
|
+
D()
|
|
11527
11659
|
], z.prototype, "confirmSignOutAll", 2);
|
|
11528
|
-
|
|
11529
|
-
|
|
11660
|
+
F([
|
|
11661
|
+
D()
|
|
11530
11662
|
], z.prototype, "confirmDisconnectId", 2);
|
|
11531
|
-
|
|
11532
|
-
|
|
11663
|
+
F([
|
|
11664
|
+
D()
|
|
11533
11665
|
], z.prototype, "verifyEmailCooldownUntil", 2);
|
|
11534
|
-
z =
|
|
11666
|
+
z = F([
|
|
11535
11667
|
ze("authui-account")
|
|
11536
11668
|
], z);
|
|
11537
|
-
var Lo = Object.defineProperty, No = Object.getOwnPropertyDescriptor,
|
|
11669
|
+
var Lo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Ke = (t, e, n, i) => {
|
|
11538
11670
|
for (var o = i > 1 ? void 0 : i ? No(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11539
11671
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11540
11672
|
return i && o && Lo(e, n, o), o;
|
|
11541
11673
|
};
|
|
11542
|
-
let
|
|
11674
|
+
let Ee = class extends qe {
|
|
11543
11675
|
constructor() {
|
|
11544
11676
|
super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.scrollCue = !1, this.bodyResizeObserver = null, this.onOpenEvent = (t) => {
|
|
11545
11677
|
const e = t.detail ?? {};
|
|
@@ -11635,9 +11767,9 @@ let Re = class extends qe {
|
|
|
11635
11767
|
`;
|
|
11636
11768
|
}
|
|
11637
11769
|
};
|
|
11638
|
-
|
|
11770
|
+
Ee.styles = [
|
|
11639
11771
|
...qe.styles,
|
|
11640
|
-
|
|
11772
|
+
Ge`
|
|
11641
11773
|
:host {
|
|
11642
11774
|
display: contents;
|
|
11643
11775
|
}
|
|
@@ -11725,14 +11857,14 @@ Re.styles = [
|
|
|
11725
11857
|
}
|
|
11726
11858
|
`
|
|
11727
11859
|
];
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
],
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
],
|
|
11734
|
-
|
|
11735
|
-
|
|
11860
|
+
Ke([
|
|
11861
|
+
O({ type: Boolean, reflect: !0 })
|
|
11862
|
+
], Ee.prototype, "open", 2);
|
|
11863
|
+
Ke([
|
|
11864
|
+
O({ type: String })
|
|
11865
|
+
], Ee.prototype, "view", 2);
|
|
11866
|
+
Ke([
|
|
11867
|
+
O({
|
|
11736
11868
|
attribute: "close-on-success",
|
|
11737
11869
|
reflect: !0,
|
|
11738
11870
|
converter: {
|
|
@@ -11746,28 +11878,28 @@ Ge([
|
|
|
11746
11878
|
}
|
|
11747
11879
|
}
|
|
11748
11880
|
})
|
|
11749
|
-
],
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
],
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
],
|
|
11756
|
-
|
|
11881
|
+
], Ee.prototype, "closeOnSuccess", 2);
|
|
11882
|
+
Ke([
|
|
11883
|
+
D()
|
|
11884
|
+
], Ee.prototype, "handledPending", 2);
|
|
11885
|
+
Ke([
|
|
11886
|
+
D()
|
|
11887
|
+
], Ee.prototype, "scrollCue", 2);
|
|
11888
|
+
Ke([
|
|
11757
11889
|
wi("dialog")
|
|
11758
|
-
],
|
|
11759
|
-
|
|
11890
|
+
], Ee.prototype, "dialog", 2);
|
|
11891
|
+
Ke([
|
|
11760
11892
|
wi(".body")
|
|
11761
|
-
],
|
|
11762
|
-
|
|
11893
|
+
], Ee.prototype, "bodyEl", 2);
|
|
11894
|
+
Ee = Ke([
|
|
11763
11895
|
ze("authui-modal")
|
|
11764
|
-
],
|
|
11896
|
+
], Ee);
|
|
11765
11897
|
var Ho = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, Lt = (t, e, n, i) => {
|
|
11766
11898
|
for (var o = i > 1 ? void 0 : i ? Do(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11767
11899
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11768
11900
|
return i && o && Ho(e, n, o), o;
|
|
11769
11901
|
};
|
|
11770
|
-
let
|
|
11902
|
+
let at = class extends qe {
|
|
11771
11903
|
constructor() {
|
|
11772
11904
|
super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
|
|
11773
11905
|
}
|
|
@@ -11775,7 +11907,7 @@ let ot = class extends qe {
|
|
|
11775
11907
|
const t = this.size === "md" ? "" : `btn-${this.size}`;
|
|
11776
11908
|
return w`<button
|
|
11777
11909
|
class="btn btn-${this.variant} ${t}"
|
|
11778
|
-
@click=${() =>
|
|
11910
|
+
@click=${() => wt(this.view)}
|
|
11779
11911
|
part="button"
|
|
11780
11912
|
>
|
|
11781
11913
|
<slot
|
|
@@ -11784,9 +11916,9 @@ let ot = class extends qe {
|
|
|
11784
11916
|
</button>`;
|
|
11785
11917
|
}
|
|
11786
11918
|
};
|
|
11787
|
-
|
|
11919
|
+
at.styles = [
|
|
11788
11920
|
...qe.styles,
|
|
11789
|
-
|
|
11921
|
+
Ge`
|
|
11790
11922
|
:host {
|
|
11791
11923
|
display: inline-block;
|
|
11792
11924
|
}
|
|
@@ -11796,25 +11928,25 @@ ot.styles = [
|
|
|
11796
11928
|
`
|
|
11797
11929
|
];
|
|
11798
11930
|
Lt([
|
|
11799
|
-
|
|
11800
|
-
],
|
|
11931
|
+
O({ type: String })
|
|
11932
|
+
], at.prototype, "view", 2);
|
|
11801
11933
|
Lt([
|
|
11802
|
-
|
|
11803
|
-
],
|
|
11934
|
+
O({ type: String })
|
|
11935
|
+
], at.prototype, "variant", 2);
|
|
11804
11936
|
Lt([
|
|
11805
|
-
|
|
11806
|
-
],
|
|
11807
|
-
|
|
11937
|
+
O({ type: String })
|
|
11938
|
+
], at.prototype, "size", 2);
|
|
11939
|
+
at = Lt([
|
|
11808
11940
|
ze("authui-button")
|
|
11809
|
-
],
|
|
11810
|
-
var Bo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor,
|
|
11941
|
+
], at);
|
|
11942
|
+
var Bo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, Be = (t, e, n, i) => {
|
|
11811
11943
|
for (var o = i > 1 ? void 0 : i ? Xo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11812
11944
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11813
11945
|
return i && o && Bo(e, n, o), o;
|
|
11814
11946
|
};
|
|
11815
|
-
let
|
|
11947
|
+
let Ue = class extends qe {
|
|
11816
11948
|
constructor() {
|
|
11817
|
-
super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
|
|
11949
|
+
super(...arguments), this.showTeams = !1, this.menuItems = [], this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
|
|
11818
11950
|
this.menuOpen && this.placeMenu();
|
|
11819
11951
|
}, this.onDocumentClick = (t) => {
|
|
11820
11952
|
t.composedPath().includes(this) || (this.menuOpen = !1);
|
|
@@ -11836,7 +11968,7 @@ let Ee = class extends qe {
|
|
|
11836
11968
|
}, this.toggleMenu = () => {
|
|
11837
11969
|
this.menuOpen = !this.menuOpen, this.menuOpen && this.showTeams && this.loadTeams();
|
|
11838
11970
|
}, this.selectTeam = (t) => {
|
|
11839
|
-
|
|
11971
|
+
M.setActiveTeam({ $id: t.$id, name: t.name }), this.activeTeamId = t.$id, this.dispatchEvent(
|
|
11840
11972
|
new CustomEvent("authui-active-team", {
|
|
11841
11973
|
detail: { teamId: t.$id, team: t },
|
|
11842
11974
|
bubbles: !0,
|
|
@@ -11873,9 +12005,9 @@ let Ee = class extends qe {
|
|
|
11873
12005
|
})) : this.menuAbove = !1), this.menuOpen && (t.has("teams") || t.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
|
|
11874
12006
|
}
|
|
11875
12007
|
async loadTeams() {
|
|
11876
|
-
this.teamsLoading = !0, this.activeTeamId =
|
|
12008
|
+
this.teamsLoading = !0, this.activeTeamId = M.getActiveTeamId();
|
|
11877
12009
|
try {
|
|
11878
|
-
this.teams = await
|
|
12010
|
+
this.teams = await M.listTeams(), this.activeTeamId && !this.teams.some((t) => t.$id === this.activeTeamId) && (this.activeTeamId = null, M.setActiveTeam(null));
|
|
11879
12011
|
} catch {
|
|
11880
12012
|
this.teams = [];
|
|
11881
12013
|
} finally {
|
|
@@ -11887,7 +12019,7 @@ let Ee = class extends qe {
|
|
|
11887
12019
|
if (t === "loading" && n)
|
|
11888
12020
|
return w`<span class="avatar"><span class="spinner"></span></span>`;
|
|
11889
12021
|
if (t !== "signed-in" || !e)
|
|
11890
|
-
return w`<button class="btn btn-primary btn-sm" @click=${() =>
|
|
12022
|
+
return w`<button class="btn btn-primary btn-sm" @click=${() => wt("sign-in")}>
|
|
11891
12023
|
<slot>${this.t("signIn")}</slot>
|
|
11892
12024
|
</button>`;
|
|
11893
12025
|
const i = e.name || e.email || e.phone || this.t("guestAccount");
|
|
@@ -11925,11 +12057,13 @@ let Ee = class extends qe {
|
|
|
11925
12057
|
</button>`
|
|
11926
12058
|
)}
|
|
11927
12059
|
</div>` : C}
|
|
12060
|
+
${this.renderCustomMenuItems()}
|
|
12061
|
+
<slot name="menu-items"></slot>
|
|
11928
12062
|
<button
|
|
11929
12063
|
class="menu-item"
|
|
11930
12064
|
role="menuitem"
|
|
11931
12065
|
@click=${() => {
|
|
11932
|
-
this.menuOpen = !1,
|
|
12066
|
+
this.menuOpen = !1, wt("account");
|
|
11933
12067
|
}}
|
|
11934
12068
|
>
|
|
11935
12069
|
${q.settings} ${this.t("manageAccount")}
|
|
@@ -11938,7 +12072,7 @@ let Ee = class extends qe {
|
|
|
11938
12072
|
class="menu-item"
|
|
11939
12073
|
role="menuitem"
|
|
11940
12074
|
@click=${() => {
|
|
11941
|
-
this.menuOpen = !1,
|
|
12075
|
+
this.menuOpen = !1, M.signOut();
|
|
11942
12076
|
}}
|
|
11943
12077
|
>
|
|
11944
12078
|
${q.logOut} ${this.t("signOut")}
|
|
@@ -11946,10 +12080,46 @@ let Ee = class extends qe {
|
|
|
11946
12080
|
</div>` : C}
|
|
11947
12081
|
`;
|
|
11948
12082
|
}
|
|
12083
|
+
renderCustomMenuItems() {
|
|
12084
|
+
return this.menuItems?.length ? this.menuItems.map((t) => {
|
|
12085
|
+
if (t.href) {
|
|
12086
|
+
const n = t.target;
|
|
12087
|
+
return w`<a
|
|
12088
|
+
class="menu-item"
|
|
12089
|
+
role="menuitem"
|
|
12090
|
+
href=${t.href}
|
|
12091
|
+
target=${n || C}
|
|
12092
|
+
rel=${n === "_blank" ? "noopener noreferrer" : C}
|
|
12093
|
+
@click=${() => {
|
|
12094
|
+
this.menuOpen = !1;
|
|
12095
|
+
}}
|
|
12096
|
+
>
|
|
12097
|
+
${t.label}
|
|
12098
|
+
</a>`;
|
|
12099
|
+
}
|
|
12100
|
+
const e = t.actionId;
|
|
12101
|
+
return w`<button
|
|
12102
|
+
class="menu-item"
|
|
12103
|
+
role="menuitem"
|
|
12104
|
+
type="button"
|
|
12105
|
+
@click=${() => {
|
|
12106
|
+
this.menuOpen = !1, e && this.dispatchEvent(
|
|
12107
|
+
new CustomEvent("authui-menu-action", {
|
|
12108
|
+
detail: { actionId: e },
|
|
12109
|
+
bubbles: !0,
|
|
12110
|
+
composed: !0
|
|
12111
|
+
})
|
|
12112
|
+
);
|
|
12113
|
+
}}
|
|
12114
|
+
>
|
|
12115
|
+
${t.label}
|
|
12116
|
+
</button>`;
|
|
12117
|
+
}) : C;
|
|
12118
|
+
}
|
|
11949
12119
|
};
|
|
11950
|
-
|
|
12120
|
+
Ue.styles = [
|
|
11951
12121
|
...qe.styles,
|
|
11952
|
-
|
|
12122
|
+
Ge`
|
|
11953
12123
|
:host {
|
|
11954
12124
|
display: inline-block;
|
|
11955
12125
|
position: relative;
|
|
@@ -12038,6 +12208,10 @@ Ee.styles = [
|
|
|
12038
12208
|
height: 16px;
|
|
12039
12209
|
color: var(--authui-muted-foreground);
|
|
12040
12210
|
}
|
|
12211
|
+
a.menu-item {
|
|
12212
|
+
text-decoration: none;
|
|
12213
|
+
box-sizing: border-box;
|
|
12214
|
+
}
|
|
12041
12215
|
.menu-section {
|
|
12042
12216
|
border-top: 1px solid var(--authui-border);
|
|
12043
12217
|
margin-top: 4px;
|
|
@@ -12065,59 +12239,62 @@ Ee.styles = [
|
|
|
12065
12239
|
}
|
|
12066
12240
|
`
|
|
12067
12241
|
];
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
],
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
],
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
],
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
],
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
],
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
],
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
],
|
|
12089
|
-
|
|
12242
|
+
Be([
|
|
12243
|
+
O({ type: Boolean, attribute: "show-teams" })
|
|
12244
|
+
], Ue.prototype, "showTeams", 2);
|
|
12245
|
+
Be([
|
|
12246
|
+
O({ attribute: !1 })
|
|
12247
|
+
], Ue.prototype, "menuItems", 2);
|
|
12248
|
+
Be([
|
|
12249
|
+
O({ type: String })
|
|
12250
|
+
], Ue.prototype, "src", 2);
|
|
12251
|
+
Be([
|
|
12252
|
+
D()
|
|
12253
|
+
], Ue.prototype, "menuOpen", 2);
|
|
12254
|
+
Be([
|
|
12255
|
+
D()
|
|
12256
|
+
], Ue.prototype, "menuAbove", 2);
|
|
12257
|
+
Be([
|
|
12258
|
+
D()
|
|
12259
|
+
], Ue.prototype, "teams", 2);
|
|
12260
|
+
Be([
|
|
12261
|
+
D()
|
|
12262
|
+
], Ue.prototype, "teamsLoading", 2);
|
|
12263
|
+
Be([
|
|
12264
|
+
D()
|
|
12265
|
+
], Ue.prototype, "activeTeamId", 2);
|
|
12266
|
+
Ue = Be([
|
|
12090
12267
|
ze("authui-user-button")
|
|
12091
|
-
],
|
|
12268
|
+
], Ue);
|
|
12092
12269
|
function Vo(t) {
|
|
12093
|
-
return
|
|
12270
|
+
return M.configure(t), Oo;
|
|
12094
12271
|
}
|
|
12095
12272
|
function Wo(t) {
|
|
12096
|
-
|
|
12273
|
+
wt(t);
|
|
12097
12274
|
}
|
|
12098
12275
|
function Go() {
|
|
12099
|
-
|
|
12276
|
+
Ro();
|
|
12100
12277
|
}
|
|
12101
12278
|
function Ko() {
|
|
12102
|
-
return
|
|
12279
|
+
return M.signOut();
|
|
12103
12280
|
}
|
|
12104
12281
|
function Yo() {
|
|
12105
|
-
return
|
|
12282
|
+
return M.user;
|
|
12106
12283
|
}
|
|
12107
12284
|
function Jo() {
|
|
12108
|
-
return
|
|
12285
|
+
return M.getState();
|
|
12109
12286
|
}
|
|
12110
12287
|
function Zo() {
|
|
12111
|
-
return
|
|
12288
|
+
return M.getClient();
|
|
12112
12289
|
}
|
|
12113
12290
|
function Qo() {
|
|
12114
|
-
return
|
|
12291
|
+
return M.getAccount();
|
|
12115
12292
|
}
|
|
12116
12293
|
function To() {
|
|
12117
|
-
return
|
|
12294
|
+
return M.previewSignIn();
|
|
12118
12295
|
}
|
|
12119
12296
|
function zo(t, e) {
|
|
12120
|
-
return
|
|
12297
|
+
return M.on(t, e);
|
|
12121
12298
|
}
|
|
12122
12299
|
const Oo = {
|
|
12123
12300
|
init: Vo,
|
|
@@ -12130,31 +12307,31 @@ const Oo = {
|
|
|
12130
12307
|
getAccount: Qo,
|
|
12131
12308
|
on: zo,
|
|
12132
12309
|
previewSignIn: To,
|
|
12133
|
-
store:
|
|
12310
|
+
store: M
|
|
12134
12311
|
};
|
|
12135
12312
|
export {
|
|
12136
12313
|
yo as AuthStore,
|
|
12137
12314
|
Oo as AuthUI,
|
|
12138
12315
|
z as AuthUIAccount,
|
|
12139
|
-
|
|
12140
|
-
|
|
12316
|
+
at as AuthUIButton,
|
|
12317
|
+
de as AuthUIConfigElement,
|
|
12141
12318
|
qe as AuthUIElement,
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12319
|
+
Ee as AuthUIModal,
|
|
12320
|
+
bt as AuthUIShow,
|
|
12321
|
+
he as AuthUISignIn,
|
|
12322
|
+
Ue as AuthUIUserButton,
|
|
12146
12323
|
na as CRITICAL_FOUC_CSS,
|
|
12147
12324
|
oe as ErrorTypes,
|
|
12148
12325
|
Ji as FOUC_CSS,
|
|
12149
12326
|
uo as PreviewAccount,
|
|
12150
12327
|
ta as appwrite,
|
|
12151
|
-
|
|
12328
|
+
M as authStore,
|
|
12152
12329
|
ia as clearLastMethod,
|
|
12153
12330
|
Vi as clearPendingOAuth,
|
|
12154
12331
|
Go as close,
|
|
12155
|
-
|
|
12332
|
+
Ro as closeModal,
|
|
12156
12333
|
so as defaultStrings,
|
|
12157
|
-
|
|
12334
|
+
Ut as describeError,
|
|
12158
12335
|
Qo as getAccount,
|
|
12159
12336
|
Zo as getClient,
|
|
12160
12337
|
Fe as getLastMethod,
|
|
@@ -12165,14 +12342,14 @@ export {
|
|
|
12165
12342
|
ho as isConfigError,
|
|
12166
12343
|
zo as on,
|
|
12167
12344
|
Wo as open,
|
|
12168
|
-
|
|
12345
|
+
wt as openModal,
|
|
12169
12346
|
To as previewSignIn,
|
|
12170
|
-
|
|
12171
|
-
|
|
12347
|
+
pt as providerLabel,
|
|
12348
|
+
tt as rememberLastMethod,
|
|
12172
12349
|
sn as rememberPendingOAuth,
|
|
12173
12350
|
pi as scorePassword,
|
|
12174
12351
|
fo as setStoredActiveTeamId,
|
|
12175
12352
|
Ko as signOut,
|
|
12176
12353
|
go as stashPendingOAuth,
|
|
12177
|
-
|
|
12354
|
+
it as toAuthUIError
|
|
12178
12355
|
};
|