@cal.macconnachie/web-components 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/auth.js +167 -142
- package/dist/index.js +164 -139
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -247,14 +247,14 @@ let Q = class extends HTMLElement {
|
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
249
|
Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[de("elementProperties")] = /* @__PURE__ */ new Map(), Q[de("finalized")] = /* @__PURE__ */ new Map(), Ns?.({ ReactiveElement: Q }), (xe.reactiveElementVersions ??= []).push("2.1.1");
|
|
250
|
-
const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$",
|
|
251
|
-
\f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }),
|
|
250
|
+
const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + j, Ls = `<${Wt}>`, G = document, ue = () => G.createComment(""), pe = (t) => t === null || typeof t != "object" && typeof t != "function", Qe = Array.isArray, Is = (t) => Qe(t) || typeof t?.[Symbol.iterator] == "function", He = `[
|
|
251
|
+
\f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${He}(?:([^\\s"'>=/]+)(${He}*=${He}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), w = Bs(1), F = Symbol.for("lit-noChange"), S = Symbol.for("lit-nothing"), At = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
|
|
253
253
|
function Jt(t, e) {
|
|
254
254
|
if (!Qe(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
255
|
return yt !== void 0 ? yt.createHTML(e) : e;
|
|
256
256
|
}
|
|
257
|
-
const
|
|
257
|
+
const Hs = (t, e) => {
|
|
258
258
|
const s = t.length - 1, r = [];
|
|
259
259
|
let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = le;
|
|
260
260
|
for (let a = 0; a < s; a++) {
|
|
@@ -262,7 +262,7 @@ const js = (t, e) => {
|
|
|
262
262
|
let h, c, u = -1, f = 0;
|
|
263
263
|
for (; f < l.length && (n.lastIndex = f, c = n.exec(l), c !== null); ) f = n.lastIndex, n === le ? c[1] === "!--" ? n = bt : c[1] !== void 0 ? n = wt : c[2] !== void 0 ? (Yt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = K) : c[3] !== void 0 && (n = K) : n === K ? c[0] === ">" ? (n = i ?? le, u = -1) : c[1] === void 0 ? u = -2 : (u = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? K : c[3] === '"' ? $t : St) : n === $t || n === St ? n = K : n === bt || n === wt ? n = le : (n = K, i = void 0);
|
|
264
264
|
const y = n === K && t[a + 1].startsWith("/>") ? " " : "";
|
|
265
|
-
o += n === le ? l + Ls : u >= 0 ? (r.push(h), l.slice(0, u) + Vt + l.slice(u) +
|
|
265
|
+
o += n === le ? l + Ls : u >= 0 ? (r.push(h), l.slice(0, u) + Vt + l.slice(u) + j + y) : l + j + (u === -2 ? a : y);
|
|
266
266
|
}
|
|
267
267
|
return [Jt(t, o + (t[s] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
268
268
|
};
|
|
@@ -271,7 +271,7 @@ class fe {
|
|
|
271
271
|
let i;
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let o = 0, n = 0;
|
|
274
|
-
const a = e.length - 1, l = this.parts, [h, c] =
|
|
274
|
+
const a = e.length - 1, l = this.parts, [h, c] = Hs(e, s);
|
|
275
275
|
if (this.el = fe.createElement(h, r), W.currentNode = this.el.content, s === 2 || s === 3) {
|
|
276
276
|
const u = this.el.content.firstChild;
|
|
277
277
|
u.replaceWith(...u.childNodes);
|
|
@@ -279,11 +279,11 @@ class fe {
|
|
|
279
279
|
for (; (i = W.nextNode()) !== null && l.length < a; ) {
|
|
280
280
|
if (i.nodeType === 1) {
|
|
281
281
|
if (i.hasAttributes()) for (const u of i.getAttributeNames()) if (u.endsWith(Vt)) {
|
|
282
|
-
const f = c[n++], y = i.getAttribute(u).split(
|
|
283
|
-
l.push({ type: 1, index: o, name: p[2], strings: y, ctor: p[1] === "." ?
|
|
284
|
-
} else u.startsWith(
|
|
282
|
+
const f = c[n++], y = i.getAttribute(u).split(j), p = /([.?@])?(.*)/.exec(f);
|
|
283
|
+
l.push({ type: 1, index: o, name: p[2], strings: y, ctor: p[1] === "." ? Fs : p[1] === "?" ? Ms : p[1] === "@" ? qs : Re }), i.removeAttribute(u);
|
|
284
|
+
} else u.startsWith(j) && (l.push({ type: 6, index: o }), i.removeAttribute(u));
|
|
285
285
|
if (Yt.test(i.tagName)) {
|
|
286
|
-
const u = i.textContent.split(
|
|
286
|
+
const u = i.textContent.split(j), f = u.length - 1;
|
|
287
287
|
if (f > 0) {
|
|
288
288
|
i.textContent = Ce ? Ce.emptyScript : "";
|
|
289
289
|
for (let y = 0; y < f; y++) i.append(u[y], ue()), W.nextNode(), l.push({ type: 2, index: ++o });
|
|
@@ -293,7 +293,7 @@ class fe {
|
|
|
293
293
|
} else if (i.nodeType === 8) if (i.data === Wt) l.push({ type: 2, index: o });
|
|
294
294
|
else {
|
|
295
295
|
let u = -1;
|
|
296
|
-
for (; (u = i.data.indexOf(
|
|
296
|
+
for (; (u = i.data.indexOf(j, u + 1)) !== -1; ) l.push({ type: 7, index: o }), u += j.length - 1;
|
|
297
297
|
}
|
|
298
298
|
o++;
|
|
299
299
|
}
|
|
@@ -304,12 +304,12 @@ class fe {
|
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
function te(t, e, s = t, r) {
|
|
307
|
-
if (e ===
|
|
307
|
+
if (e === F) return e;
|
|
308
308
|
let i = r !== void 0 ? s._$Co?.[r] : s._$Cl;
|
|
309
309
|
const o = pe(e) ? void 0 : e._$litDirective$;
|
|
310
310
|
return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(t), i._$AT(t, s, r)), r !== void 0 ? (s._$Co ??= [])[r] = i : s._$Cl = i), i !== void 0 && (e = te(t, i._$AS(t, e.values), i, r)), e;
|
|
311
311
|
}
|
|
312
|
-
let
|
|
312
|
+
let js = class {
|
|
313
313
|
constructor(e, s) {
|
|
314
314
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = s;
|
|
315
315
|
}
|
|
@@ -342,7 +342,7 @@ class re {
|
|
|
342
342
|
return this._$AM?._$AU ?? this._$Cv;
|
|
343
343
|
}
|
|
344
344
|
constructor(e, s, r, i) {
|
|
345
|
-
this.type = 2, this._$AH =
|
|
345
|
+
this.type = 2, this._$AH = S, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
346
346
|
}
|
|
347
347
|
get parentNode() {
|
|
348
348
|
let e = this._$AA.parentNode;
|
|
@@ -356,7 +356,7 @@ class re {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(e, s = this) {
|
|
359
|
-
e = te(this, e, s), pe(e) ? e ===
|
|
359
|
+
e = te(this, e, s), pe(e) ? e === S || e == null || e === "" ? (this._$AH !== S && this._$AR(), this._$AH = S) : e !== this._$AH && e !== F && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Is(e) ? this.k(e) : this._(e);
|
|
360
360
|
}
|
|
361
361
|
O(e) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -365,13 +365,13 @@ class re {
|
|
|
365
365
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
366
366
|
}
|
|
367
367
|
_(e) {
|
|
368
|
-
this._$AH !==
|
|
368
|
+
this._$AH !== S && pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(G.createTextNode(e)), this._$AH = e;
|
|
369
369
|
}
|
|
370
370
|
$(e) {
|
|
371
371
|
const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = fe.createElement(Jt(r.h, r.h[0]), this.options)), r);
|
|
372
372
|
if (this._$AH?._$AD === i) this._$AH.p(s);
|
|
373
373
|
else {
|
|
374
|
-
const o = new
|
|
374
|
+
const o = new js(i, this), n = o.u(this.options);
|
|
375
375
|
o.p(s), this.T(n), this._$AH = o;
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -404,37 +404,37 @@ class Re {
|
|
|
404
404
|
return this._$AM._$AU;
|
|
405
405
|
}
|
|
406
406
|
constructor(e, s, r, i, o) {
|
|
407
|
-
this.type = 1, this._$AH =
|
|
407
|
+
this.type = 1, this._$AH = S, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = S;
|
|
408
408
|
}
|
|
409
409
|
_$AI(e, s = this, r, i) {
|
|
410
410
|
const o = this.strings;
|
|
411
411
|
let n = !1;
|
|
412
|
-
if (o === void 0) e = te(this, e, s, 0), n = !pe(e) || e !== this._$AH && e !==
|
|
412
|
+
if (o === void 0) e = te(this, e, s, 0), n = !pe(e) || e !== this._$AH && e !== F, n && (this._$AH = e);
|
|
413
413
|
else {
|
|
414
414
|
const a = e;
|
|
415
415
|
let l, h;
|
|
416
|
-
for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h ===
|
|
416
|
+
for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h === F && (h = this._$AH[l]), n ||= !pe(h) || h !== this._$AH[l], h === S ? e = S : e !== S && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
|
|
417
417
|
}
|
|
418
418
|
n && !i && this.j(e);
|
|
419
419
|
}
|
|
420
420
|
j(e) {
|
|
421
|
-
e ===
|
|
421
|
+
e === S ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class Fs extends Re {
|
|
425
425
|
constructor() {
|
|
426
426
|
super(...arguments), this.type = 3;
|
|
427
427
|
}
|
|
428
428
|
j(e) {
|
|
429
|
-
this.element[this.name] = e ===
|
|
429
|
+
this.element[this.name] = e === S ? void 0 : e;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
class
|
|
432
|
+
class Ms extends Re {
|
|
433
433
|
constructor() {
|
|
434
434
|
super(...arguments), this.type = 4;
|
|
435
435
|
}
|
|
436
436
|
j(e) {
|
|
437
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
437
|
+
this.element.toggleAttribute(this.name, !!e && e !== S);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
class qs extends Re {
|
|
@@ -442,8 +442,8 @@ class qs extends Re {
|
|
|
442
442
|
super(e, s, r, i, o), this.type = 5;
|
|
443
443
|
}
|
|
444
444
|
_$AI(e, s = this) {
|
|
445
|
-
if ((e = te(this, e, s, 0) ??
|
|
446
|
-
const r = this._$AH, i = e ===
|
|
445
|
+
if ((e = te(this, e, s, 0) ?? S) === F) return;
|
|
446
|
+
const r = this._$AH, i = e === S && r !== S || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== S && (r === S || i);
|
|
447
447
|
i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
448
448
|
}
|
|
449
449
|
handleEvent(e) {
|
|
@@ -492,7 +492,7 @@ let ee = class extends Q {
|
|
|
492
492
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
493
|
}
|
|
494
494
|
render() {
|
|
495
|
-
return
|
|
495
|
+
return F;
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
ee._$litElement$ = !0, ee.finalized = !0, et.litElementHydrateSupport?.({ LitElement: ee });
|
|
@@ -579,7 +579,7 @@ const vt = Xt(class extends Qt {
|
|
|
579
579
|
const i = !!e[r];
|
|
580
580
|
i === this.st.has(r) || this.nt?.has(r) || (i ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
|
|
581
581
|
}
|
|
582
|
-
return
|
|
582
|
+
return F;
|
|
583
583
|
}
|
|
584
584
|
});
|
|
585
585
|
const { I: Xs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
|
|
@@ -602,7 +602,7 @@ const { I: Xs } = Ks, Et = () => document.createComment(""), ce = (t, e, s) => {
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
return s;
|
|
605
|
-
}, V = (t, e, s = t) => (t._$AI(e, s), t), Qs = {}, er = (t, e = Qs) => t._$AH = e, tr = (t) => t._$AH,
|
|
605
|
+
}, V = (t, e, s = t) => (t._$AI(e, s), t), Qs = {}, er = (t, e = Qs) => t._$AH = e, tr = (t) => t._$AH, je = (t) => {
|
|
606
606
|
t._$AR(), t._$AA.remove();
|
|
607
607
|
};
|
|
608
608
|
const _t = (t, e, s) => {
|
|
@@ -642,17 +642,17 @@ const _t = (t, e, s) => {
|
|
|
642
642
|
V(b, o[y]), l[y] = b;
|
|
643
643
|
} else l[y] = V(m, o[y]), ce(t, i[u], m), i[g] = null;
|
|
644
644
|
y++;
|
|
645
|
-
} else
|
|
646
|
-
else
|
|
645
|
+
} else je(i[f]), f--;
|
|
646
|
+
else je(i[u]), u++;
|
|
647
647
|
for (; y <= p; ) {
|
|
648
648
|
const g = ce(t, l[p + 1]);
|
|
649
649
|
V(g, o[y]), l[y++] = g;
|
|
650
650
|
}
|
|
651
651
|
for (; u <= f; ) {
|
|
652
652
|
const g = i[u++];
|
|
653
|
-
g !== null &&
|
|
653
|
+
g !== null && je(g);
|
|
654
654
|
}
|
|
655
|
-
return this.ut = n, er(t, l),
|
|
655
|
+
return this.ut = n, er(t, l), F;
|
|
656
656
|
}
|
|
657
657
|
}), es = ({
|
|
658
658
|
baseUrl: t
|
|
@@ -814,7 +814,7 @@ const _t = (t, e, s) => {
|
|
|
814
814
|
return f.json();
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
},
|
|
817
|
+
}, Fe = {
|
|
818
818
|
AUTH_TOKEN: "authToken",
|
|
819
819
|
ACCESS_TOKEN: "accessToken",
|
|
820
820
|
REFRESH_TOKEN: "refreshToken"
|
|
@@ -851,9 +851,9 @@ const _t = (t, e, s) => {
|
|
|
851
851
|
maxAge: -1
|
|
852
852
|
});
|
|
853
853
|
}, r = (l) => e(l) !== null, i = (l, h) => {
|
|
854
|
-
t(
|
|
855
|
-
}, o = (l) => e(
|
|
856
|
-
s(
|
|
854
|
+
t(Fe[l], h, sr);
|
|
855
|
+
}, o = (l) => e(Fe[l]), n = (l) => {
|
|
856
|
+
s(Fe[l]);
|
|
857
857
|
};
|
|
858
858
|
return {
|
|
859
859
|
setCookie: t,
|
|
@@ -1790,7 +1790,7 @@ let A = class extends ee {
|
|
|
1790
1790
|
}), await this.handleSignIn();
|
|
1791
1791
|
}
|
|
1792
1792
|
isUserLoggedIn() {
|
|
1793
|
-
return this.isLoggedIn;
|
|
1793
|
+
return this.isLoggedIn || !!this.cookies.getAuthToken("ACCESS_TOKEN") && !!this.cookies.getAuthToken("REFRESH_TOKEN") && !!this.cookies.getAuthToken("AUTH_TOKEN");
|
|
1794
1794
|
}
|
|
1795
1795
|
async logout() {
|
|
1796
1796
|
const t = this.cookies.getAuthToken("ACCESS_TOKEN"), e = this.cookies.getAuthToken("AUTH_TOKEN"), s = this.cookies.getAuthToken("REFRESH_TOKEN");
|
|
@@ -1898,7 +1898,7 @@ let A = class extends ee {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
render() {
|
|
1900
1900
|
if (!this.isVisible)
|
|
1901
|
-
return
|
|
1901
|
+
return S;
|
|
1902
1902
|
const t = {
|
|
1903
1903
|
"modal-overlay": !0,
|
|
1904
1904
|
"modal-overlay--closing": this.isClosing
|
|
@@ -1909,7 +1909,7 @@ let A = class extends ee {
|
|
|
1909
1909
|
"modal-container--dragging": this.isDragging,
|
|
1910
1910
|
[`modal-container--${this.size}`]: !0
|
|
1911
1911
|
};
|
|
1912
|
-
return
|
|
1912
|
+
return w`
|
|
1913
1913
|
<!-- Modal/Drawer -->
|
|
1914
1914
|
<div
|
|
1915
1915
|
class=${vt(t)}
|
|
@@ -1949,8 +1949,8 @@ let A = class extends ee {
|
|
|
1949
1949
|
renderContent() {
|
|
1950
1950
|
if (!this.hasApiBaseUrl()) {
|
|
1951
1951
|
const t = this.baseUrlErrorMessage;
|
|
1952
|
-
return
|
|
1953
|
-
${this.logoUrl.length > 0 ?
|
|
1952
|
+
return w`
|
|
1953
|
+
${this.logoUrl.length > 0 ? w`
|
|
1954
1954
|
<header class="modal-header">
|
|
1955
1955
|
<div class="auth-header">
|
|
1956
1956
|
<img
|
|
@@ -1962,7 +1962,7 @@ let A = class extends ee {
|
|
|
1962
1962
|
/>
|
|
1963
1963
|
</div>
|
|
1964
1964
|
</header>
|
|
1965
|
-
` :
|
|
1965
|
+
` : S}
|
|
1966
1966
|
|
|
1967
1967
|
<div class="modal-body">
|
|
1968
1968
|
<div class="auth-form">
|
|
@@ -1973,9 +1973,34 @@ let A = class extends ee {
|
|
|
1973
1973
|
</div>
|
|
1974
1974
|
`;
|
|
1975
1975
|
}
|
|
1976
|
-
return this.
|
|
1976
|
+
return this.isLoading && this.hasHandledOAuthCallback ? w`
|
|
1977
|
+
${this.logoUrl.length > 0 ? w`
|
|
1978
|
+
<header class="modal-header">
|
|
1979
|
+
<div class="auth-header">
|
|
1980
|
+
<img
|
|
1981
|
+
src="${this.logoUrl}"
|
|
1982
|
+
width="48"
|
|
1983
|
+
height="48"
|
|
1984
|
+
alt="Logo"
|
|
1985
|
+
class="auth-logo"
|
|
1986
|
+
/>
|
|
1987
|
+
</div>
|
|
1988
|
+
</header>
|
|
1989
|
+
` : S}
|
|
1990
|
+
|
|
1991
|
+
<div class="modal-body">
|
|
1992
|
+
<div class="auth-form">
|
|
1993
|
+
<div class="form-actions">
|
|
1994
|
+
<button type="button" class="cta" disabled>
|
|
1995
|
+
Signing in...
|
|
1996
|
+
</button>
|
|
1997
|
+
</div>
|
|
1998
|
+
${this.renderAlerts()}
|
|
1999
|
+
</div>
|
|
2000
|
+
</div>
|
|
2001
|
+
` : this.isLoggedIn ? w`
|
|
1977
2002
|
<!-- Header -->
|
|
1978
|
-
${this.logoUrl.length > 0 ?
|
|
2003
|
+
${this.logoUrl.length > 0 ? w`
|
|
1979
2004
|
<header class="modal-header">
|
|
1980
2005
|
<div class="auth-header">
|
|
1981
2006
|
<img
|
|
@@ -1987,7 +2012,7 @@ let A = class extends ee {
|
|
|
1987
2012
|
/>
|
|
1988
2013
|
</div>
|
|
1989
2014
|
</header>
|
|
1990
|
-
` :
|
|
2015
|
+
` : S}
|
|
1991
2016
|
|
|
1992
2017
|
<!-- Body -->
|
|
1993
2018
|
<div class="modal-body">
|
|
@@ -1998,9 +2023,9 @@ let A = class extends ee {
|
|
|
1998
2023
|
${this.renderAlerts()}
|
|
1999
2024
|
</div>
|
|
2000
2025
|
</div>
|
|
2001
|
-
` :
|
|
2026
|
+
` : w`
|
|
2002
2027
|
<!-- Header -->
|
|
2003
|
-
${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ?
|
|
2028
|
+
${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? w`
|
|
2004
2029
|
<header class="modal-header">
|
|
2005
2030
|
|
|
2006
2031
|
<div class="auth-header">
|
|
@@ -2013,7 +2038,7 @@ let A = class extends ee {
|
|
|
2013
2038
|
/>
|
|
2014
2039
|
</div>
|
|
2015
2040
|
</header>
|
|
2016
|
-
` :
|
|
2041
|
+
` : S}
|
|
2017
2042
|
|
|
2018
2043
|
<!-- Body -->
|
|
2019
2044
|
<div class="modal-body">
|
|
@@ -2034,7 +2059,7 @@ let A = class extends ee {
|
|
|
2034
2059
|
}
|
|
2035
2060
|
renderFormContent() {
|
|
2036
2061
|
if (this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form"))
|
|
2037
|
-
return
|
|
2062
|
+
return w`
|
|
2038
2063
|
<!-- Email -->
|
|
2039
2064
|
<label class="field">
|
|
2040
2065
|
<span class="field-label">Email Address</span>
|
|
@@ -2048,7 +2073,7 @@ let A = class extends ee {
|
|
|
2048
2073
|
required
|
|
2049
2074
|
autocomplete="email"
|
|
2050
2075
|
/>
|
|
2051
|
-
${this.errors.email ?
|
|
2076
|
+
${this.errors.email ? w`<span class="field-error">${this.errors.email}</span>` : S}
|
|
2052
2077
|
</label>
|
|
2053
2078
|
|
|
2054
2079
|
<!-- Password -->
|
|
@@ -2063,18 +2088,18 @@ let A = class extends ee {
|
|
|
2063
2088
|
required
|
|
2064
2089
|
autocomplete=${this.mode === "signup" ? "new-password" : "current-password"}
|
|
2065
2090
|
/>
|
|
2066
|
-
${this.errors.password ?
|
|
2091
|
+
${this.errors.password ? w`<span class="field-error">${this.errors.password}</span>` : S}
|
|
2067
2092
|
</label>
|
|
2068
2093
|
|
|
2069
|
-
${this.mode === "signin" && this.error ?
|
|
2094
|
+
${this.mode === "signin" && this.error ? w`
|
|
2070
2095
|
<div class="forgot-row">
|
|
2071
2096
|
<button type="button" class="text-btn" @click=${this.startReset}>
|
|
2072
2097
|
Forgot your password?
|
|
2073
2098
|
</button>
|
|
2074
2099
|
</div>
|
|
2075
|
-
` :
|
|
2100
|
+
` : S}
|
|
2076
2101
|
|
|
2077
|
-
${this.mode === "signup" ?
|
|
2102
|
+
${this.mode === "signup" ? w`
|
|
2078
2103
|
<!-- Confirm Password -->
|
|
2079
2104
|
<label class="field">
|
|
2080
2105
|
<span class="field-label">Confirm Password</span>
|
|
@@ -2087,7 +2112,7 @@ let A = class extends ee {
|
|
|
2087
2112
|
required
|
|
2088
2113
|
autocomplete="new-password"
|
|
2089
2114
|
/>
|
|
2090
|
-
${this.errors.confirm_password ?
|
|
2115
|
+
${this.errors.confirm_password ? w`<span class="field-error">${this.errors.confirm_password}</span>` : S}
|
|
2091
2116
|
</label>
|
|
2092
2117
|
|
|
2093
2118
|
<!-- First Name -->
|
|
@@ -2102,7 +2127,7 @@ let A = class extends ee {
|
|
|
2102
2127
|
required
|
|
2103
2128
|
autocomplete="given-name"
|
|
2104
2129
|
/>
|
|
2105
|
-
${this.errors.givenName ?
|
|
2130
|
+
${this.errors.givenName ? w`<span class="field-error">${this.errors.givenName}</span>` : S}
|
|
2106
2131
|
</label>
|
|
2107
2132
|
|
|
2108
2133
|
<!-- Last Name -->
|
|
@@ -2117,19 +2142,19 @@ let A = class extends ee {
|
|
|
2117
2142
|
required
|
|
2118
2143
|
autocomplete="family-name"
|
|
2119
2144
|
/>
|
|
2120
|
-
${this.errors.familyName ?
|
|
2145
|
+
${this.errors.familyName ? w`<span class="field-error">${this.errors.familyName}</span>` : S}
|
|
2121
2146
|
</label>
|
|
2122
|
-
` :
|
|
2147
|
+
` : S}
|
|
2123
2148
|
`;
|
|
2124
2149
|
if (this.mode === "signup" && this.signupStep === "otp")
|
|
2125
|
-
return
|
|
2150
|
+
return w`
|
|
2126
2151
|
<div class="otp-section">
|
|
2127
2152
|
<label class="otp-label">Enter 6-digit code</label>
|
|
2128
2153
|
<div class="otp-inputs" role="group" aria-label="One time code">
|
|
2129
2154
|
${Tt(
|
|
2130
2155
|
Array.from({ length: 6 }, (t, e) => e),
|
|
2131
2156
|
(t) => t,
|
|
2132
|
-
(t) =>
|
|
2157
|
+
(t) => w`
|
|
2133
2158
|
<input
|
|
2134
2159
|
class="otp-input signup-otp-input ${this.errors.signup_otp ? "otp-input--error" : ""}"
|
|
2135
2160
|
type="text"
|
|
@@ -2146,7 +2171,7 @@ let A = class extends ee {
|
|
|
2146
2171
|
`
|
|
2147
2172
|
)}
|
|
2148
2173
|
</div>
|
|
2149
|
-
${this.errors.signup_otp ?
|
|
2174
|
+
${this.errors.signup_otp ? w`<p class="otp-error">${this.errors.signup_otp}</p>` : S}
|
|
2150
2175
|
</div>
|
|
2151
2176
|
<div class="forgot-row">
|
|
2152
2177
|
<button type="button" class="text-btn" @click=${this.backToSignupForm}>
|
|
@@ -2155,7 +2180,7 @@ let A = class extends ee {
|
|
|
2155
2180
|
</div>
|
|
2156
2181
|
`;
|
|
2157
2182
|
if (this.resetStep === "request")
|
|
2158
|
-
return
|
|
2183
|
+
return w`
|
|
2159
2184
|
<label class="field">
|
|
2160
2185
|
<span class="field-label">Email Address</span>
|
|
2161
2186
|
<input
|
|
@@ -2168,7 +2193,7 @@ let A = class extends ee {
|
|
|
2168
2193
|
required
|
|
2169
2194
|
autocomplete="email"
|
|
2170
2195
|
/>
|
|
2171
|
-
${this.errors.email ?
|
|
2196
|
+
${this.errors.email ? w`<span class="field-error">${this.errors.email}</span>` : S}
|
|
2172
2197
|
</label>
|
|
2173
2198
|
<div class="forgot-row">
|
|
2174
2199
|
<button type="button" class="text-btn" @click=${this.cancelReset}>
|
|
@@ -2178,7 +2203,7 @@ let A = class extends ee {
|
|
|
2178
2203
|
`;
|
|
2179
2204
|
if (this.resetStep === "confirm") {
|
|
2180
2205
|
const t = this.otpDigits.every((e) => /^\d$/.test(e));
|
|
2181
|
-
return
|
|
2206
|
+
return w`
|
|
2182
2207
|
<label class="field">
|
|
2183
2208
|
<span class="field-label">Email Address</span>
|
|
2184
2209
|
<input
|
|
@@ -2190,7 +2215,7 @@ let A = class extends ee {
|
|
|
2190
2215
|
required
|
|
2191
2216
|
autocomplete="email"
|
|
2192
2217
|
/>
|
|
2193
|
-
${this.errors.email ?
|
|
2218
|
+
${this.errors.email ? w`<span class="field-error">${this.errors.email}</span>` : S}
|
|
2194
2219
|
</label>
|
|
2195
2220
|
|
|
2196
2221
|
<div class="otp-section">
|
|
@@ -2199,7 +2224,7 @@ let A = class extends ee {
|
|
|
2199
2224
|
${Tt(
|
|
2200
2225
|
Array.from({ length: 6 }, (e, s) => s),
|
|
2201
2226
|
(e) => e,
|
|
2202
|
-
(e) =>
|
|
2227
|
+
(e) => w`
|
|
2203
2228
|
<input
|
|
2204
2229
|
class="otp-input reset-otp-input ${this.errors.otp ? "otp-input--error" : ""}"
|
|
2205
2230
|
type="text"
|
|
@@ -2216,10 +2241,10 @@ let A = class extends ee {
|
|
|
2216
2241
|
`
|
|
2217
2242
|
)}
|
|
2218
2243
|
</div>
|
|
2219
|
-
${this.errors.otp ?
|
|
2244
|
+
${this.errors.otp ? w`<p class="otp-error">${this.errors.otp}</p>` : S}
|
|
2220
2245
|
</div>
|
|
2221
2246
|
|
|
2222
|
-
${t ?
|
|
2247
|
+
${t ? w`
|
|
2223
2248
|
<div class="new-password-fields">
|
|
2224
2249
|
<label class="field">
|
|
2225
2250
|
<span class="field-label">New Password</span>
|
|
@@ -2232,7 +2257,7 @@ let A = class extends ee {
|
|
|
2232
2257
|
required
|
|
2233
2258
|
autocomplete="new-password"
|
|
2234
2259
|
/>
|
|
2235
|
-
${this.errors.new_password ?
|
|
2260
|
+
${this.errors.new_password ? w`<span class="field-error">${this.errors.new_password}</span>` : S}
|
|
2236
2261
|
</label>
|
|
2237
2262
|
|
|
2238
2263
|
<label class="field">
|
|
@@ -2246,10 +2271,10 @@ let A = class extends ee {
|
|
|
2246
2271
|
required
|
|
2247
2272
|
autocomplete="new-password"
|
|
2248
2273
|
/>
|
|
2249
|
-
${this.errors.confirm_password ?
|
|
2274
|
+
${this.errors.confirm_password ? w`<span class="field-error">${this.errors.confirm_password}</span>` : S}
|
|
2250
2275
|
</label>
|
|
2251
2276
|
</div>
|
|
2252
|
-
` :
|
|
2277
|
+
` : S}
|
|
2253
2278
|
|
|
2254
2279
|
<div class="forgot-row">
|
|
2255
2280
|
<button type="button" class="text-btn" @click=${this.backToRequest}>
|
|
@@ -2258,35 +2283,35 @@ let A = class extends ee {
|
|
|
2258
2283
|
</div>
|
|
2259
2284
|
`;
|
|
2260
2285
|
}
|
|
2261
|
-
return
|
|
2286
|
+
return S;
|
|
2262
2287
|
}
|
|
2263
2288
|
renderActions() {
|
|
2264
2289
|
if (this.resetStep === "request")
|
|
2265
|
-
return
|
|
2290
|
+
return w`
|
|
2266
2291
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2267
2292
|
${this.isLoading ? "Sending..." : "Send Reset Code"}
|
|
2268
2293
|
</button>
|
|
2269
2294
|
`;
|
|
2270
2295
|
if (this.resetStep === "confirm")
|
|
2271
|
-
return this.otpDigits.every((e) => /^\d$/.test(e)) ?
|
|
2296
|
+
return this.otpDigits.every((e) => /^\d$/.test(e)) ? w`
|
|
2272
2297
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2273
2298
|
${this.isLoading ? "Resetting..." : "Reset Password"}
|
|
2274
2299
|
</button>
|
|
2275
|
-
` :
|
|
2300
|
+
` : S;
|
|
2276
2301
|
if (this.mode === "signup" && this.signupStep === "otp") {
|
|
2277
2302
|
const t = this.signupOtpDigits.every((e) => /^\d$/.test(e));
|
|
2278
|
-
return
|
|
2303
|
+
return w`
|
|
2279
2304
|
<button type="submit" class="cta" ?disabled=${!t || this.isLoading}>
|
|
2280
2305
|
${this.isLoading ? "Completing..." : "Complete Registration"}
|
|
2281
2306
|
</button>
|
|
2282
2307
|
`;
|
|
2283
2308
|
}
|
|
2284
|
-
return
|
|
2309
|
+
return w`
|
|
2285
2310
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2286
2311
|
${this.isLoading ? "Loading..." : this.mode === "signup" ? "Continue" : "Sign In"}
|
|
2287
2312
|
</button>
|
|
2288
2313
|
|
|
2289
|
-
${this.isOAuthConfigured() && this.mode === "signin" ?
|
|
2314
|
+
${this.isOAuthConfigured() && this.mode === "signin" ? w`
|
|
2290
2315
|
<div class="button-row">
|
|
2291
2316
|
<button
|
|
2292
2317
|
type="button"
|
|
@@ -2306,31 +2331,31 @@ let A = class extends ee {
|
|
|
2306
2331
|
${this.renderAppleIcon()}
|
|
2307
2332
|
</button>
|
|
2308
2333
|
</div>
|
|
2309
|
-
` :
|
|
2334
|
+
` : S}
|
|
2310
2335
|
`;
|
|
2311
2336
|
}
|
|
2312
2337
|
renderAlerts() {
|
|
2313
|
-
return
|
|
2314
|
-
${this.notice ?
|
|
2338
|
+
return w`
|
|
2339
|
+
${this.notice ? w`
|
|
2315
2340
|
<div class="alert alert--success">
|
|
2316
2341
|
${this.notice}
|
|
2317
2342
|
<button class="alert-close" @click=${() => this.notice = ""} aria-label="Dismiss">
|
|
2318
2343
|
×
|
|
2319
2344
|
</button>
|
|
2320
2345
|
</div>
|
|
2321
|
-
` :
|
|
2322
|
-
${this.error ?
|
|
2346
|
+
` : S}
|
|
2347
|
+
${this.error ? w`
|
|
2323
2348
|
<div class="alert alert--error">
|
|
2324
2349
|
${this.error}
|
|
2325
2350
|
<button class="alert-close" @click=${() => this.error = ""} aria-label="Dismiss">
|
|
2326
2351
|
×
|
|
2327
2352
|
</button>
|
|
2328
2353
|
</div>
|
|
2329
|
-
` :
|
|
2354
|
+
` : S}
|
|
2330
2355
|
`;
|
|
2331
2356
|
}
|
|
2332
2357
|
renderFooter() {
|
|
2333
|
-
return this.isLoggedIn ?
|
|
2358
|
+
return this.isLoggedIn ? S : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? S : w`
|
|
2334
2359
|
<div class="auth-footer">
|
|
2335
2360
|
<p class="toggle-text">
|
|
2336
2361
|
${this.mode === "signup" ? "Already have an account?" : "Don't have an account?"}
|
|
@@ -2339,7 +2364,7 @@ let A = class extends ee {
|
|
|
2339
2364
|
${this.mode === "signup" ? "Sign In" : "Sign Up"}
|
|
2340
2365
|
</button>
|
|
2341
2366
|
</div>
|
|
2342
|
-
` :
|
|
2367
|
+
` : w`
|
|
2343
2368
|
<div class="auth-footer">
|
|
2344
2369
|
<p class="toggle-text">
|
|
2345
2370
|
Having trouble? Email
|
|
@@ -2349,7 +2374,7 @@ let A = class extends ee {
|
|
|
2349
2374
|
`;
|
|
2350
2375
|
}
|
|
2351
2376
|
renderGoogleIcon() {
|
|
2352
|
-
return
|
|
2377
|
+
return w`
|
|
2353
2378
|
<svg viewBox="-0.5 0 48 48" width="18" height="18" fill="none">
|
|
2354
2379
|
<path d="M9.82727273,24 C9.82727273,22.4757333 10.0804318,21.0144 10.5322727,19.6437333 L2.62345455,13.6042667 C1.08206818,16.7338667 0.213636364,20.2602667 0.213636364,24 C0.213636364,27.7365333 1.081,31.2608 2.62025,34.3882667 L10.5247955,28.3370667 C10.0772273,26.9728 9.82727273,25.5168 9.82727273,24" fill="#FBBC05"></path>
|
|
2355
2380
|
<path d="M23.7136364,10.1333333 C27.025,10.1333333 30.0159091,11.3066667 32.3659091,13.2266667 L39.2022727,6.4 C35.0363636,2.77333333 29.6954545,0.533333333 23.7136364,0.533333333 C14.4268636,0.533333333 6.44540909,5.84426667 2.62345455,13.6042667 L10.5322727,19.6437333 C12.3545909,14.112 17.5491591,10.1333333 23.7136364,10.1333333" fill="#EB4335"></path>
|
|
@@ -2359,7 +2384,7 @@ let A = class extends ee {
|
|
|
2359
2384
|
`;
|
|
2360
2385
|
}
|
|
2361
2386
|
renderAppleIcon() {
|
|
2362
|
-
return
|
|
2387
|
+
return w`
|
|
2363
2388
|
<svg viewBox="-3.5 0 48 48" width="18" height="18" class="apple-icon">
|
|
2364
2389
|
<path d="M231.174735,567.792499 C232.740177,565.771699 233.926883,562.915484 233.497649,560 C230.939077,560.177808 227.948466,561.814769 226.203475,563.948463 C224.612784,565.88177 223.305444,568.757742 223.816036,571.549042 C226.613071,571.636535 229.499881,569.960061 231.174735,567.792499 L231.174735,567.792499 Z M245,595.217241 C243.880625,597.712195 243.341978,598.827022 241.899976,601.03692 C239.888467,604.121745 237.052156,607.962958 233.53412,607.991182 C230.411652,608.02505 229.606488,605.94498 225.367451,605.970382 C221.128414,605.99296 220.244696,608.030695 217.116618,607.999649 C213.601387,607.968603 210.913765,604.502761 208.902256,601.417937 C203.27452,592.79849 202.68257,582.680377 206.152914,577.298162 C208.621711,573.476705 212.515678,571.241407 216.173986,571.241407 C219.89682,571.241407 222.239372,573.296075 225.322563,573.296075 C228.313175,573.296075 230.133913,571.235762 234.440281,571.235762 C237.700215,571.235762 241.153726,573.022307 243.611302,576.10431 C235.554045,580.546683 236.85858,592.121127 245,595.217241 L245,595.217241 Z" transform="translate(-204.000000, -560.000000)" fill="#0b0b0a"></path>
|
|
2365
2390
|
</svg>
|
|
@@ -2524,7 +2549,7 @@ var hr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (t, e
|
|
|
2524
2549
|
(n = t[o]) && (i = (r ? n(e, s, i) : n(i)) || i);
|
|
2525
2550
|
return r && i && hr(e, s, i), i;
|
|
2526
2551
|
};
|
|
2527
|
-
let
|
|
2552
|
+
let M = class extends ee {
|
|
2528
2553
|
constructor() {
|
|
2529
2554
|
super(...arguments), this.theme = "light", this.storageKey = "theme-preference", this.size = "sm", this.variant = "ghost", this.isDark = !1;
|
|
2530
2555
|
}
|
|
@@ -2563,14 +2588,14 @@ let F = class extends ee {
|
|
|
2563
2588
|
}
|
|
2564
2589
|
render() {
|
|
2565
2590
|
const t = this.isDark ? "Switch to light mode" : "Switch to dark mode";
|
|
2566
|
-
return
|
|
2591
|
+
return w`
|
|
2567
2592
|
<button
|
|
2568
2593
|
class="theme-toggle ${this.getSizeClass()} ${this.getVariantClass()}"
|
|
2569
2594
|
@click=${this.toggleTheme}
|
|
2570
2595
|
aria-label=${t}
|
|
2571
2596
|
type="button"
|
|
2572
2597
|
>
|
|
2573
|
-
${this.isDark ?
|
|
2598
|
+
${this.isDark ? w`
|
|
2574
2599
|
<svg
|
|
2575
2600
|
viewBox="0 0 20 20"
|
|
2576
2601
|
fill="currentColor"
|
|
@@ -2583,7 +2608,7 @@ let F = class extends ee {
|
|
|
2583
2608
|
clip-rule="evenodd"
|
|
2584
2609
|
/>
|
|
2585
2610
|
</svg>
|
|
2586
|
-
` :
|
|
2611
|
+
` : w`
|
|
2587
2612
|
<svg
|
|
2588
2613
|
viewBox="0 0 20 20"
|
|
2589
2614
|
fill="currentColor"
|
|
@@ -2599,7 +2624,7 @@ let F = class extends ee {
|
|
|
2599
2624
|
`;
|
|
2600
2625
|
}
|
|
2601
2626
|
};
|
|
2602
|
-
|
|
2627
|
+
M.styles = Kt`
|
|
2603
2628
|
:host {
|
|
2604
2629
|
display: inline-block;
|
|
2605
2630
|
}
|
|
@@ -2751,22 +2776,22 @@ F.styles = Kt`
|
|
|
2751
2776
|
`;
|
|
2752
2777
|
ie([
|
|
2753
2778
|
O({ type: String, reflect: !0 })
|
|
2754
|
-
],
|
|
2779
|
+
], M.prototype, "theme", 2);
|
|
2755
2780
|
ie([
|
|
2756
2781
|
O({ type: String, attribute: "storage-key" })
|
|
2757
|
-
],
|
|
2782
|
+
], M.prototype, "storageKey", 2);
|
|
2758
2783
|
ie([
|
|
2759
2784
|
O({ type: String, attribute: "size" })
|
|
2760
|
-
],
|
|
2785
|
+
], M.prototype, "size", 2);
|
|
2761
2786
|
ie([
|
|
2762
2787
|
O({ type: String, attribute: "variant" })
|
|
2763
|
-
],
|
|
2788
|
+
], M.prototype, "variant", 2);
|
|
2764
2789
|
ie([
|
|
2765
2790
|
T()
|
|
2766
|
-
],
|
|
2767
|
-
|
|
2791
|
+
], M.prototype, "isDark", 2);
|
|
2792
|
+
M = ie([
|
|
2768
2793
|
Gt("theme-toggle")
|
|
2769
|
-
],
|
|
2794
|
+
], M);
|
|
2770
2795
|
function ss(t, e) {
|
|
2771
2796
|
return function() {
|
|
2772
2797
|
return t.apply(e, arguments);
|
|
@@ -2881,18 +2906,18 @@ const Or = (t, e, s, { allOwnKeys: r } = {}) => (ye(e, (i, o) => {
|
|
|
2881
2906
|
for (; (s = t.exec(e)) !== null; )
|
|
2882
2907
|
r.push(s);
|
|
2883
2908
|
return r;
|
|
2884
|
-
}, Br = N("HTMLFormElement"),
|
|
2909
|
+
}, Br = N("HTMLFormElement"), Hr = (t) => t.toLowerCase().replace(
|
|
2885
2910
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
2886
2911
|
function(s, r, i) {
|
|
2887
2912
|
return r.toUpperCase() + i;
|
|
2888
2913
|
}
|
|
2889
|
-
), kt = (({ hasOwnProperty: t }) => (e, s) => t.call(e, s))(Object.prototype),
|
|
2914
|
+
), kt = (({ hasOwnProperty: t }) => (e, s) => t.call(e, s))(Object.prototype), jr = N("RegExp"), ls = (t, e) => {
|
|
2890
2915
|
const s = Object.getOwnPropertyDescriptors(t), r = {};
|
|
2891
2916
|
ye(s, (i, o) => {
|
|
2892
2917
|
let n;
|
|
2893
2918
|
(n = e(i, o, t)) !== !1 && (r[o] = n || i);
|
|
2894
2919
|
}), Object.defineProperties(t, r);
|
|
2895
|
-
},
|
|
2920
|
+
}, Fr = (t) => {
|
|
2896
2921
|
ls(t, (e, s) => {
|
|
2897
2922
|
if (P(t) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
|
|
2898
2923
|
return !1;
|
|
@@ -2907,7 +2932,7 @@ const Or = (t, e, s, { allOwnKeys: r } = {}) => (ye(e, (i, o) => {
|
|
|
2907
2932
|
});
|
|
2908
2933
|
}
|
|
2909
2934
|
});
|
|
2910
|
-
},
|
|
2935
|
+
}, Mr = (t, e) => {
|
|
2911
2936
|
const s = {}, r = (i) => {
|
|
2912
2937
|
i.forEach((o) => {
|
|
2913
2938
|
s[o] = !0;
|
|
@@ -2965,7 +2990,7 @@ const Vr = (t) => {
|
|
|
2965
2990
|
isDate: yr,
|
|
2966
2991
|
isFile: br,
|
|
2967
2992
|
isBlob: wr,
|
|
2968
|
-
isRegExp:
|
|
2993
|
+
isRegExp: jr,
|
|
2969
2994
|
isFunction: P,
|
|
2970
2995
|
isStream: $r,
|
|
2971
2996
|
isURLSearchParams: vr,
|
|
@@ -2989,9 +3014,9 @@ const Vr = (t) => {
|
|
|
2989
3014
|
hasOwnProp: kt,
|
|
2990
3015
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2991
3016
|
reduceDescriptors: ls,
|
|
2992
|
-
freezeMethods:
|
|
2993
|
-
toObjectSet:
|
|
2994
|
-
toCamelCase:
|
|
3017
|
+
freezeMethods: Fr,
|
|
3018
|
+
toObjectSet: Mr,
|
|
3019
|
+
toCamelCase: Hr,
|
|
2995
3020
|
noop: qr,
|
|
2996
3021
|
toFiniteNumber: zr,
|
|
2997
3022
|
findKey: ns,
|
|
@@ -3417,7 +3442,7 @@ function mi(t) {
|
|
|
3417
3442
|
return e;
|
|
3418
3443
|
}
|
|
3419
3444
|
const gi = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
3420
|
-
function
|
|
3445
|
+
function Me(t, e, s, r, i) {
|
|
3421
3446
|
if (d.isFunction(r))
|
|
3422
3447
|
return r.call(this, e, s);
|
|
3423
3448
|
if (i && (e = s), !!d.isString(e)) {
|
|
@@ -3491,7 +3516,7 @@ class D {
|
|
|
3491
3516
|
has(e, s) {
|
|
3492
3517
|
if (e = he(e), e) {
|
|
3493
3518
|
const r = d.findKey(this, e);
|
|
3494
|
-
return !!(r && this[r] !== void 0 && (!s ||
|
|
3519
|
+
return !!(r && this[r] !== void 0 && (!s || Me(this, this[r], r, s)));
|
|
3495
3520
|
}
|
|
3496
3521
|
return !1;
|
|
3497
3522
|
}
|
|
@@ -3501,7 +3526,7 @@ class D {
|
|
|
3501
3526
|
function o(n) {
|
|
3502
3527
|
if (n = he(n), n) {
|
|
3503
3528
|
const a = d.findKey(r, n);
|
|
3504
|
-
a && (!s ||
|
|
3529
|
+
a && (!s || Me(r, r[a], a, s)) && (delete r[a], i = !0);
|
|
3505
3530
|
}
|
|
3506
3531
|
}
|
|
3507
3532
|
return d.isArray(e) ? e.forEach(o) : o(e), i;
|
|
@@ -3511,7 +3536,7 @@ class D {
|
|
|
3511
3536
|
let r = s.length, i = !1;
|
|
3512
3537
|
for (; r--; ) {
|
|
3513
3538
|
const o = s[r];
|
|
3514
|
-
(!e ||
|
|
3539
|
+
(!e || Me(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
3515
3540
|
}
|
|
3516
3541
|
return i;
|
|
3517
3542
|
}
|
|
@@ -3934,7 +3959,7 @@ const Ss = (t) => {
|
|
|
3934
3959
|
}))(d.global), {
|
|
3935
3960
|
ReadableStream: It,
|
|
3936
3961
|
TextEncoder: Bt
|
|
3937
|
-
} = d.global,
|
|
3962
|
+
} = d.global, Ht = (t, ...e) => {
|
|
3938
3963
|
try {
|
|
3939
3964
|
return !!t(...e);
|
|
3940
3965
|
} catch {
|
|
@@ -3947,7 +3972,7 @@ const Ss = (t) => {
|
|
|
3947
3972
|
const { fetch: e, Request: s, Response: r } = t, i = e ? Ae(e) : typeof fetch == "function", o = Ae(s), n = Ae(r);
|
|
3948
3973
|
if (!i)
|
|
3949
3974
|
return !1;
|
|
3950
|
-
const a = i && Ae(It), l = i && (typeof Bt == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new Bt()) : async (p) => new Uint8Array(await new s(p).arrayBuffer())), h = o && a &&
|
|
3975
|
+
const a = i && Ae(It), l = i && (typeof Bt == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new Bt()) : async (p) => new Uint8Array(await new s(p).arrayBuffer())), h = o && a && Ht(() => {
|
|
3951
3976
|
let p = !1;
|
|
3952
3977
|
const g = new s(x.origin, {
|
|
3953
3978
|
body: new It(),
|
|
@@ -3957,7 +3982,7 @@ const Ss = (t) => {
|
|
|
3957
3982
|
}
|
|
3958
3983
|
}).headers.has("Content-Type");
|
|
3959
3984
|
return p && !g;
|
|
3960
|
-
}), c = n && a &&
|
|
3985
|
+
}), c = n && a && Ht(() => d.isReadableStream(new r("").body)), u = {
|
|
3961
3986
|
stream: c && ((p) => p.body)
|
|
3962
3987
|
};
|
|
3963
3988
|
i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
@@ -4009,17 +4034,17 @@ const Ss = (t) => {
|
|
|
4009
4034
|
let ct;
|
|
4010
4035
|
try {
|
|
4011
4036
|
if (q && h && m !== "get" && m !== "head" && (ct = await y(Ie, b)) !== 0) {
|
|
4012
|
-
let
|
|
4037
|
+
let H = new s(g, {
|
|
4013
4038
|
method: "POST",
|
|
4014
4039
|
body: b,
|
|
4015
4040
|
duplex: "half"
|
|
4016
4041
|
}), X;
|
|
4017
|
-
if (d.isFormData(b) && (X =
|
|
4042
|
+
if (d.isFormData(b) && (X = H.headers.get("content-type")) && Ie.setContentType(X), H.body) {
|
|
4018
4043
|
const [Be, $e] = Pt(
|
|
4019
4044
|
ct,
|
|
4020
4045
|
Oe(Dt(q))
|
|
4021
4046
|
);
|
|
4022
|
-
b = Nt(
|
|
4047
|
+
b = Nt(H.body, Lt, Be, $e);
|
|
4023
4048
|
}
|
|
4024
4049
|
}
|
|
4025
4050
|
d.isString(we) || (we = we ? "include" : "omit");
|
|
@@ -4036,9 +4061,9 @@ const Ss = (t) => {
|
|
|
4036
4061
|
let B = await (o ? lt(ae, at) : lt(g, ht));
|
|
4037
4062
|
const dt = c && (U === "stream" || U === "response");
|
|
4038
4063
|
if (c && (R || dt && z)) {
|
|
4039
|
-
const
|
|
4064
|
+
const H = {};
|
|
4040
4065
|
["status", "statusText", "headers"].forEach((ut) => {
|
|
4041
|
-
|
|
4066
|
+
H[ut] = B[ut];
|
|
4042
4067
|
});
|
|
4043
4068
|
const X = d.toFiniteNumber(B.headers.get("content-length")), [Be, $e] = R && Pt(
|
|
4044
4069
|
X,
|
|
@@ -4048,13 +4073,13 @@ const Ss = (t) => {
|
|
|
4048
4073
|
Nt(B.body, Lt, Be, () => {
|
|
4049
4074
|
$e && $e(), z && z();
|
|
4050
4075
|
}),
|
|
4051
|
-
|
|
4076
|
+
H
|
|
4052
4077
|
);
|
|
4053
4078
|
}
|
|
4054
4079
|
U = U || "text";
|
|
4055
4080
|
let _s = await u[d.findKey(u, U) || "text"](B, p);
|
|
4056
|
-
return !dt && z && z(), await new Promise((
|
|
4057
|
-
bs(
|
|
4081
|
+
return !dt && z && z(), await new Promise((H, X) => {
|
|
4082
|
+
bs(H, X, {
|
|
4058
4083
|
data: _s,
|
|
4059
4084
|
headers: D.from(B.headers),
|
|
4060
4085
|
status: B.status,
|
|
@@ -4101,7 +4126,7 @@ d.forEach(ot, (t, e) => {
|
|
|
4101
4126
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
4102
4127
|
}
|
|
4103
4128
|
});
|
|
4104
|
-
const
|
|
4129
|
+
const jt = (t) => `- ${t}`, Ni = (t) => d.isFunction(t) || t === null || t === !1;
|
|
4105
4130
|
function Li(t, e) {
|
|
4106
4131
|
t = d.isArray(t) ? t : [t];
|
|
4107
4132
|
const { length: s } = t;
|
|
@@ -4121,8 +4146,8 @@ function Li(t, e) {
|
|
|
4121
4146
|
([l, h]) => `adapter ${l} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
4122
4147
|
);
|
|
4123
4148
|
let a = s ? n.length > 1 ? `since :
|
|
4124
|
-
` + n.map(
|
|
4125
|
-
`) : " " +
|
|
4149
|
+
` + n.map(jt).join(`
|
|
4150
|
+
`) : " " + jt(n[0]) : "as no adapter specified";
|
|
4126
4151
|
throw new $(
|
|
4127
4152
|
"There is no suitable adapter to dispatch the request " + a,
|
|
4128
4153
|
"ERR_NOT_SUPPORT"
|
|
@@ -4146,7 +4171,7 @@ function ze(t) {
|
|
|
4146
4171
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
4147
4172
|
throw new ne(null, t);
|
|
4148
4173
|
}
|
|
4149
|
-
function
|
|
4174
|
+
function Ft(t) {
|
|
4150
4175
|
return ze(t), t.headers = D.from(t.headers), t.data = qe.call(
|
|
4151
4176
|
t,
|
|
4152
4177
|
t.transformRequest
|
|
@@ -4170,7 +4195,7 @@ const vs = "1.13.2", Le = {};
|
|
|
4170
4195
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
4171
4196
|
};
|
|
4172
4197
|
});
|
|
4173
|
-
const
|
|
4198
|
+
const Mt = {};
|
|
4174
4199
|
Le.transitional = function(e, s, r) {
|
|
4175
4200
|
function i(o, n) {
|
|
4176
4201
|
return "[Axios v" + vs + "] Transitional option '" + o + "'" + n + (r ? ". " + r : "");
|
|
@@ -4181,7 +4206,7 @@ Le.transitional = function(e, s, r) {
|
|
|
4181
4206
|
i(n, " has been removed" + (s ? " in " + s : "")),
|
|
4182
4207
|
$.ERR_DEPRECATED
|
|
4183
4208
|
);
|
|
4184
|
-
return s && !
|
|
4209
|
+
return s && !Mt[n] && (Mt[n] = !0), e ? e(o, n, a) : !0;
|
|
4185
4210
|
};
|
|
4186
4211
|
};
|
|
4187
4212
|
Le.spelling = function(e) {
|
|
@@ -4277,7 +4302,7 @@ class J {
|
|
|
4277
4302
|
});
|
|
4278
4303
|
let c, u = 0, f;
|
|
4279
4304
|
if (!l) {
|
|
4280
|
-
const p = [
|
|
4305
|
+
const p = [Ft.bind(this), void 0];
|
|
4281
4306
|
for (p.unshift(...a), p.push(...h), f = p.length, c = Promise.resolve(s); u < f; )
|
|
4282
4307
|
c = c.then(p[u++], p[u++]);
|
|
4283
4308
|
return c;
|
|
@@ -4294,7 +4319,7 @@ class J {
|
|
|
4294
4319
|
}
|
|
4295
4320
|
}
|
|
4296
4321
|
try {
|
|
4297
|
-
c =
|
|
4322
|
+
c = Ft.call(this, y);
|
|
4298
4323
|
} catch (p) {
|
|
4299
4324
|
return Promise.reject(p);
|
|
4300
4325
|
}
|
|
@@ -4410,7 +4435,7 @@ function Bi(t) {
|
|
|
4410
4435
|
return t.apply(null, s);
|
|
4411
4436
|
};
|
|
4412
4437
|
}
|
|
4413
|
-
function
|
|
4438
|
+
function Hi(t) {
|
|
4414
4439
|
return d.isObject(t) && t.isAxiosError === !0;
|
|
4415
4440
|
}
|
|
4416
4441
|
const Ye = {
|
|
@@ -4506,7 +4531,7 @@ C.all = function(e) {
|
|
|
4506
4531
|
return Promise.all(e);
|
|
4507
4532
|
};
|
|
4508
4533
|
C.spread = Bi;
|
|
4509
|
-
C.isAxiosError =
|
|
4534
|
+
C.isAxiosError = Hi;
|
|
4510
4535
|
C.mergeConfig = Z;
|
|
4511
4536
|
C.AxiosHeaders = D;
|
|
4512
4537
|
C.formToJSON = (t) => gs(d.isHTMLForm(t) ? new FormData(t) : t);
|
|
@@ -4518,7 +4543,7 @@ class qt extends Error {
|
|
|
4518
4543
|
super(e), this.name = "AuthRefreshError";
|
|
4519
4544
|
}
|
|
4520
4545
|
}
|
|
4521
|
-
const
|
|
4546
|
+
const ji = ({ baseUrl: t, apiBaseUrl: e }) => {
|
|
4522
4547
|
const s = ts(), r = e || t, i = C.create({
|
|
4523
4548
|
baseURL: t,
|
|
4524
4549
|
headers: {
|
|
@@ -4571,11 +4596,11 @@ const Hi = ({ baseUrl: t, apiBaseUrl: e }) => {
|
|
|
4571
4596
|
return Promise.reject(a);
|
|
4572
4597
|
}
|
|
4573
4598
|
), i;
|
|
4574
|
-
}, Ki =
|
|
4599
|
+
}, Ki = ji;
|
|
4575
4600
|
export {
|
|
4576
4601
|
A as Auth,
|
|
4577
4602
|
qt as AuthRefreshError,
|
|
4578
|
-
|
|
4603
|
+
M as ThemeToggle,
|
|
4579
4604
|
Ki as apiClient,
|
|
4580
|
-
|
|
4605
|
+
ji as createApiClient
|
|
4581
4606
|
};
|