@strands.gg/accui 2.17.12 → 2.17.13
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/accui.css +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +389 -389
- package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +1 -1
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
- package/dist/{useStrandsAuth-DSDtq0F7.cjs.js → useStrandsAuth-CA_pJ6rc.cjs.js} +1 -1
- package/dist/{useStrandsAuth-C2WOjQ2Z.es.js → useStrandsAuth-D0lFZGwG.es.js} +74 -70
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3,7 +3,7 @@ import { m as Hu } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
|
3
3
|
import { defineComponent as Ve, computed as H, provide as Yt, onMounted as Ye, onUnmounted as Mt, createElementBlock as o, openBlock as a, normalizeClass as Me, createElementVNode as e, createBlock as ye, renderSlot as Pe, Teleport as Wt, createCommentVNode as I, toDisplayString as R, ref as M, watch as Le, createTextVNode as J, reactive as Ge, withModifiers as qe, createStaticVNode as Qt, createVNode as d, withDirectives as Qe, withCtx as _, unref as i, vModelText as Xe, nextTick as yt, Fragment as De, Transition as rt, createSlots as Ft, normalizeStyle as je, renderList as Ze, mergeProps as xa, useSlots as ha, inject as fa, resolveDynamicComponent as ot, onBeforeUnmount as Ra, withKeys as st, h as oe, isMemoSame as as, getCurrentInstance as ss } from "vue";
|
|
4
4
|
import { u as vt, p as La } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
5
5
|
import { s as Du } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
6
|
-
import { u as ft } from "./useStrandsAuth-
|
|
6
|
+
import { u as ft } from "./useStrandsAuth-D0lFZGwG.es.js";
|
|
7
7
|
const os = { class: "app-content" }, ls = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "ui-app-loading-overlay"
|
|
@@ -23,18 +23,18 @@ const os = { class: "app-content" }, ls = {
|
|
|
23
23
|
"ui-app--dark": r.theme === "dark",
|
|
24
24
|
"ui-app--auto": r.theme === "auto",
|
|
25
25
|
"ui-app--loading": t.value
|
|
26
|
-
})),
|
|
27
|
-
},
|
|
26
|
+
})), V = (C) => {
|
|
27
|
+
}, T = H(() => r.theme);
|
|
28
28
|
return Yt("uiApp", {
|
|
29
|
-
theme:
|
|
29
|
+
theme: T,
|
|
30
30
|
isLoading: t
|
|
31
31
|
}), Yt("themeProvider", {
|
|
32
|
-
theme:
|
|
32
|
+
theme: T,
|
|
33
33
|
isForced: H(() => r.theme !== "auto")
|
|
34
34
|
}), Ye(() => {
|
|
35
|
-
document.addEventListener("keydown",
|
|
35
|
+
document.addEventListener("keydown", V), document.body.classList.add("ui-app-body"), r.theme !== "auto" && document.body.classList.add(`ui-app-theme--${r.theme}`);
|
|
36
36
|
}), Mt(() => {
|
|
37
|
-
document.removeEventListener("keydown",
|
|
37
|
+
document.removeEventListener("keydown", V), document.body.classList.remove("ui-app-body"), document.body.classList.remove("ui-app-theme--light", "ui-app-theme--dark");
|
|
38
38
|
}), (C, w) => (a(), o("div", {
|
|
39
39
|
class: Me(["ui-app", l.value])
|
|
40
40
|
}, [
|
|
@@ -136,26 +136,26 @@ const Ha = kt("users", [
|
|
|
136
136
|
},
|
|
137
137
|
emits: ["update:modelValue", "change"],
|
|
138
138
|
setup(s, { emit: r }) {
|
|
139
|
-
const t = s, l = r,
|
|
139
|
+
const t = s, l = r, V = M(!1), T = H(() => t.modelValue !== void 0 ? !!t.modelValue : t.checked !== void 0 ? typeof t.checked == "string" ? t.checked === "" || t.checked === "true" : !!t.checked : V.value);
|
|
140
140
|
Le(() => t.checked, (x) => {
|
|
141
|
-
x !== void 0 && (typeof x == "string" ?
|
|
141
|
+
x !== void 0 && (typeof x == "string" ? V.value = x === "" || x === "true" : V.value = !!x);
|
|
142
142
|
}, { immediate: !0 });
|
|
143
143
|
const C = H(() => t.id || `ui-toggle-${Math.random().toString(36).substr(2, 9)}`), w = H(() => [
|
|
144
144
|
"ui-toggle",
|
|
145
145
|
{
|
|
146
|
-
"ui-toggle--on":
|
|
147
|
-
"ui-toggle--off": !
|
|
146
|
+
"ui-toggle--on": T.value,
|
|
147
|
+
"ui-toggle--off": !T.value,
|
|
148
148
|
"ui-toggle--disabled": t.disabled
|
|
149
149
|
}
|
|
150
150
|
]), c = H(() => [
|
|
151
151
|
{
|
|
152
|
-
"ui-toggle-thumb--on":
|
|
153
|
-
"ui-toggle-thumb--off": !
|
|
152
|
+
"ui-toggle-thumb--on": T.value,
|
|
153
|
+
"ui-toggle-thumb--off": !T.value
|
|
154
154
|
}
|
|
155
155
|
]), h = () => {
|
|
156
156
|
if (t.disabled) return;
|
|
157
|
-
const x = !
|
|
158
|
-
|
|
157
|
+
const x = !T.value;
|
|
158
|
+
V.value = x, l("update:modelValue", x), l("change", x);
|
|
159
159
|
};
|
|
160
160
|
return (x, S) => (a(), o("div", ms, [
|
|
161
161
|
s.label ? (a(), o("label", {
|
|
@@ -170,7 +170,7 @@ const Ha = kt("users", [
|
|
|
170
170
|
id: C.value,
|
|
171
171
|
type: "button",
|
|
172
172
|
class: Me(w.value),
|
|
173
|
-
"aria-pressed":
|
|
173
|
+
"aria-pressed": T.value,
|
|
174
174
|
"aria-labelledby": s.label ? `${C.value}-label` : void 0,
|
|
175
175
|
onClick: h
|
|
176
176
|
}, [
|
|
@@ -194,15 +194,15 @@ const Ha = kt("users", [
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["upload", "error"],
|
|
196
196
|
setup(s, { emit: r }) {
|
|
197
|
-
const t = s, l = r,
|
|
197
|
+
const t = s, l = r, V = M(), T = M(), C = M(), w = M(""), c = M(), h = M(t.size), x = M(t.previewSize), S = M(t.size / 2.5), u = Ge({ x: 0, y: 0 }), m = M(1), U = M(0.1), D = M(3), g = M(!1), N = M(!1), y = M(!1), L = Ge({ x: 0, y: 0, imageX: 0, imageY: 0 });
|
|
198
198
|
Ye(() => {
|
|
199
|
-
if (
|
|
200
|
-
const W =
|
|
199
|
+
if (T.value) {
|
|
200
|
+
const W = T.value.getContext("2d");
|
|
201
201
|
W && (W.fillStyle = "#f9fafb", W.fillRect(0, 0, h.value, h.value));
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
const F = () => {
|
|
205
|
-
|
|
205
|
+
V.value?.click();
|
|
206
206
|
}, $ = (W) => {
|
|
207
207
|
const ie = W.target.files?.[0];
|
|
208
208
|
ie && O(ie);
|
|
@@ -242,20 +242,20 @@ const Ha = kt("users", [
|
|
|
242
242
|
});
|
|
243
243
|
}, Z.src = W;
|
|
244
244
|
}, b = () => {
|
|
245
|
-
if (!c.value || !
|
|
246
|
-
const W =
|
|
245
|
+
if (!c.value || !T.value) return;
|
|
246
|
+
const W = T.value.getContext("2d");
|
|
247
247
|
if (!W) return;
|
|
248
248
|
W.fillStyle = "#f9fafb", W.fillRect(0, 0, h.value, h.value);
|
|
249
249
|
const Z = c.value, ie = Z.width * m.value, te = Z.height * m.value;
|
|
250
|
-
W.drawImage(Z, u.x, u.y, ie, te),
|
|
251
|
-
},
|
|
252
|
-
if (!c.value || !C.value || !
|
|
250
|
+
W.drawImage(Z, u.x, u.y, ie, te), z();
|
|
251
|
+
}, z = () => {
|
|
252
|
+
if (!c.value || !C.value || !T.value) return;
|
|
253
253
|
const W = C.value.getContext("2d");
|
|
254
254
|
if (!W) return;
|
|
255
255
|
W.fillStyle = "#ffffff", W.fillRect(0, 0, x.value, x.value), W.save(), W.beginPath(), W.arc(x.value / 2, x.value / 2, x.value / 2, 0, Math.PI * 2), W.clip();
|
|
256
256
|
const Z = h.value / 2 - S.value, ie = h.value / 2 - S.value, te = S.value * 2;
|
|
257
257
|
W.drawImage(
|
|
258
|
-
|
|
258
|
+
T.value,
|
|
259
259
|
Z,
|
|
260
260
|
ie,
|
|
261
261
|
te,
|
|
@@ -301,7 +301,7 @@ const Ha = kt("users", [
|
|
|
301
301
|
N.value = !1;
|
|
302
302
|
}), b();
|
|
303
303
|
}, be = async () => {
|
|
304
|
-
if (!c.value || !
|
|
304
|
+
if (!c.value || !T.value) return;
|
|
305
305
|
const W = document.createElement("canvas");
|
|
306
306
|
W.width = 256, W.height = 256;
|
|
307
307
|
const Z = W.getContext("2d");
|
|
@@ -309,7 +309,7 @@ const Ha = kt("users", [
|
|
|
309
309
|
Z.fillStyle = "#ffffff", Z.fillRect(0, 0, 256, 256), Z.save(), Z.beginPath(), Z.arc(128, 128, 128, 0, Math.PI * 2), Z.clip();
|
|
310
310
|
const ie = h.value / 2 - S.value, te = h.value / 2 - S.value, Y = S.value * 2;
|
|
311
311
|
Z.drawImage(
|
|
312
|
-
|
|
312
|
+
T.value,
|
|
313
313
|
ie,
|
|
314
314
|
te,
|
|
315
315
|
Y,
|
|
@@ -341,7 +341,7 @@ const Ha = kt("users", [
|
|
|
341
341
|
e("div", ws, [
|
|
342
342
|
e("input", {
|
|
343
343
|
ref_key: "fileInput",
|
|
344
|
-
ref:
|
|
344
|
+
ref: V,
|
|
345
345
|
type: "file",
|
|
346
346
|
accept: "image/*",
|
|
347
347
|
class: "hidden-input",
|
|
@@ -352,7 +352,7 @@ const Ha = kt("users", [
|
|
|
352
352
|
e("div", xs, [
|
|
353
353
|
e("canvas", {
|
|
354
354
|
ref_key: "canvas",
|
|
355
|
-
ref:
|
|
355
|
+
ref: T,
|
|
356
356
|
width: h.value,
|
|
357
357
|
height: h.value,
|
|
358
358
|
class: "canvas",
|
|
@@ -540,8 +540,8 @@ class $a {
|
|
|
540
540
|
* A pleasant major chord with arpeggio and bell overtones
|
|
541
541
|
*/
|
|
542
542
|
static playLevelUp(r, t) {
|
|
543
|
-
const
|
|
544
|
-
t && (
|
|
543
|
+
const V = r && [10, 25, 50, 100, 150, 200].includes(r);
|
|
544
|
+
t && (V && t.milestoneSounds === !1 || !V && t.levelUpSounds === !1) || (V ? this.playMilestoneLevelUp() : this.playRegularLevelUp());
|
|
545
545
|
}
|
|
546
546
|
/**
|
|
547
547
|
* Play regular level up sound for normal levels
|
|
@@ -562,8 +562,8 @@ class $a {
|
|
|
562
562
|
const h = r.createOscillator(), x = r.createGain();
|
|
563
563
|
h.connect(x), x.connect(r.destination), h.type = "sine", h.frequency.setValueAtTime(c.freq, t + c.time), h.frequency.exponentialRampToValueAtTime(c.freq * 1.02, t + c.time + 0.1), h.frequency.exponentialRampToValueAtTime(c.freq, t + c.time + 0.4), x.gain.setValueAtTime(0, t + c.time), x.gain.linearRampToValueAtTime(0.08, t + c.time + 0.03), x.gain.linearRampToValueAtTime(0.06, t + c.time + 0.2), x.gain.exponentialRampToValueAtTime(0.01, t + c.time + 0.5), h.start(t + c.time), h.stop(t + c.time + 0.5);
|
|
564
564
|
});
|
|
565
|
-
const
|
|
566
|
-
|
|
565
|
+
const V = r.createOscillator(), T = r.createGain();
|
|
566
|
+
V.connect(T), T.connect(r.destination), V.type = "triangle", V.frequency.setValueAtTime(261.63, t), T.gain.setValueAtTime(0, t), T.gain.linearRampToValueAtTime(0.04, t + 0.1), T.gain.linearRampToValueAtTime(0.03, t + 0.4), T.gain.exponentialRampToValueAtTime(0.01, t + 0.8), V.start(t), V.stop(t + 0.8);
|
|
567
567
|
const C = r.createOscillator(), w = r.createGain();
|
|
568
568
|
C.connect(w), w.connect(r.destination), C.type = "sine", C.frequency.setValueAtTime(1046.5, t + 0.2), w.gain.setValueAtTime(0, t + 0.2), w.gain.linearRampToValueAtTime(0.03, t + 0.25), w.gain.exponentialRampToValueAtTime(1e-3, t + 0.6), C.start(t + 0.2), C.stop(t + 0.6);
|
|
569
569
|
}
|
|
@@ -620,10 +620,10 @@ class $a {
|
|
|
620
620
|
const r = this.getAudioContext();
|
|
621
621
|
if (!r) return;
|
|
622
622
|
const t = r.currentTime;
|
|
623
|
-
[659.25, 830.61].forEach((
|
|
623
|
+
[659.25, 830.61].forEach((V, T) => {
|
|
624
624
|
const C = r.createOscillator(), w = r.createGain();
|
|
625
|
-
C.connect(w), w.connect(r.destination), C.type = "sine", C.frequency.setValueAtTime(
|
|
626
|
-
const c =
|
|
625
|
+
C.connect(w), w.connect(r.destination), C.type = "sine", C.frequency.setValueAtTime(V, t);
|
|
626
|
+
const c = T * 0.1, h = 0.15;
|
|
627
627
|
w.gain.setValueAtTime(0, t), w.gain.linearRampToValueAtTime(0.2, t + c + 0.01), w.gain.exponentialRampToValueAtTime(0.01, t + c + h), C.start(t + c), C.stop(t + c + h);
|
|
628
628
|
});
|
|
629
629
|
}
|
|
@@ -634,8 +634,8 @@ class $a {
|
|
|
634
634
|
static playError() {
|
|
635
635
|
const r = this.getAudioContext();
|
|
636
636
|
if (!r) return;
|
|
637
|
-
const t = r.currentTime, l = r.createOscillator(),
|
|
638
|
-
l.connect(
|
|
637
|
+
const t = r.currentTime, l = r.createOscillator(), V = r.createGain();
|
|
638
|
+
l.connect(V), V.connect(r.destination), l.type = "sawtooth", l.frequency.setValueAtTime(200, t), l.frequency.exponentialRampToValueAtTime(100, t + 0.3), V.gain.setValueAtTime(0.15, t), V.gain.exponentialRampToValueAtTime(0.01, t + 0.3), l.start(t), l.stop(t + 0.3);
|
|
639
639
|
}
|
|
640
640
|
/**
|
|
641
641
|
* Play a click/button press sound
|
|
@@ -644,8 +644,8 @@ class $a {
|
|
|
644
644
|
static playClick() {
|
|
645
645
|
const r = this.getAudioContext();
|
|
646
646
|
if (!r) return;
|
|
647
|
-
const t = r.currentTime, l = r.createOscillator(),
|
|
648
|
-
l.connect(
|
|
647
|
+
const t = r.currentTime, l = r.createOscillator(), V = r.createGain();
|
|
648
|
+
l.connect(V), V.connect(r.destination), l.type = "sine", l.frequency.setValueAtTime(1e3, t), V.gain.setValueAtTime(0.1, t), V.gain.exponentialRampToValueAtTime(0.01, t + 0.03), l.start(t), l.stop(t + 0.03);
|
|
649
649
|
}
|
|
650
650
|
/**
|
|
651
651
|
* Play a notification sound
|
|
@@ -655,10 +655,10 @@ class $a {
|
|
|
655
655
|
const r = this.getAudioContext();
|
|
656
656
|
if (!r) return;
|
|
657
657
|
const t = r.currentTime;
|
|
658
|
-
[880, 1174.66].forEach((
|
|
658
|
+
[880, 1174.66].forEach((V, T) => {
|
|
659
659
|
const C = r.createOscillator(), w = r.createGain();
|
|
660
|
-
C.connect(w), w.connect(r.destination), C.type = "sine", C.frequency.setValueAtTime(
|
|
661
|
-
const c =
|
|
660
|
+
C.connect(w), w.connect(r.destination), C.type = "sine", C.frequency.setValueAtTime(V, t);
|
|
661
|
+
const c = T * 0.15;
|
|
662
662
|
w.gain.setValueAtTime(0, t), w.gain.linearRampToValueAtTime(0.12, t + c + 0.02), w.gain.exponentialRampToValueAtTime(0.01, t + c + 0.4), C.start(t + c), C.stop(t + c + 0.4);
|
|
663
663
|
});
|
|
664
664
|
}
|
|
@@ -669,8 +669,8 @@ class $a {
|
|
|
669
669
|
static playXpGain() {
|
|
670
670
|
const r = this.getAudioContext();
|
|
671
671
|
if (!r) return;
|
|
672
|
-
const t = r.currentTime, l = r.createOscillator(),
|
|
673
|
-
l.connect(
|
|
672
|
+
const t = r.currentTime, l = r.createOscillator(), V = r.createGain();
|
|
673
|
+
l.connect(V), V.connect(r.destination), l.type = "sine", l.frequency.setValueAtTime(440, t), l.frequency.exponentialRampToValueAtTime(880, t + 0.15), V.gain.setValueAtTime(0, t), V.gain.linearRampToValueAtTime(0.15, t + 0.01), V.gain.exponentialRampToValueAtTime(0.01, t + 0.2), l.start(t), l.stop(t + 0.2);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-container" }, qs = ["width", "height", "viewBox"], Zs = { key: 0 }, Ks = ["r"], Gs = ["y"], Ys = ["d", "stroke-width"], Ws = ["d", "stroke", "stroke-width"], Qs = ["d"], Xs = ["d", "stroke", "stroke-width"], Js = {
|
|
@@ -701,7 +701,7 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
701
701
|
},
|
|
702
702
|
emits: ["levelup"],
|
|
703
703
|
setup(s, { emit: r }) {
|
|
704
|
-
const t = s, l = r,
|
|
704
|
+
const t = s, l = r, V = M(!1), T = M(t.value), C = M("forward");
|
|
705
705
|
let w = null, c = t.value, h = t.level;
|
|
706
706
|
const x = qt, S = t.size ?? qt, u = qt / 2, m = H(() => t.thickness ?? 24), U = H(() => t.labelThickness ?? 46), D = H(() => t.gapAngle ?? 16), g = H(() => (qt - m.value) / 2 - Da), N = H(() => (qt - U.value) / 1.9 - Da), y = H(() => N.value + 10), L = H(() => g.value - m.value / 2 - ao), F = H(() => t.levelLabel?.length ?? 0), $ = H(() => F.value * lo + oo), k = H(() => -$.value / 2), O = H(() => $.value / 2), q = H(
|
|
707
707
|
() => be(u, u, N.value, k.value, O.value)
|
|
@@ -710,8 +710,8 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
710
710
|
// Top arc: right to left, so text is right-side up at the top after rotation
|
|
711
711
|
be(u, u, y.value, -90, 90)
|
|
712
712
|
)
|
|
713
|
-
),
|
|
714
|
-
const ie = Math.max(0, Math.min(1,
|
|
713
|
+
), z = H(() => {
|
|
714
|
+
const ie = Math.max(0, Math.min(1, T.value / t.max)), te = O.value + D.value, Y = 360 - $.value - 3 * D.value;
|
|
715
715
|
if (ie >= 1) {
|
|
716
716
|
const Te = k.value - D.value + 360;
|
|
717
717
|
return be(u, u, g.value, te, Te);
|
|
@@ -719,13 +719,13 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
719
719
|
const le = Y * ie, _e = te + le;
|
|
720
720
|
return be(u, u, g.value, te, _e);
|
|
721
721
|
}), ae = H(() => {
|
|
722
|
-
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1,
|
|
722
|
+
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1, T.value / t.max)), le = te * Y, _e = ie + le, Te = Y === 0 ? ie : _e + D.value, Ee = k.value - D.value + 360;
|
|
723
723
|
return be(u, u, g.value, Te, Ee);
|
|
724
724
|
}), ce = H(() => "url(#staticGradient)"), Ce = H(() => "url(#progressGradient)"), xe = H(() => {
|
|
725
725
|
const ie = O.value + D.value;
|
|
726
726
|
return Se(u, u, g.value, ie);
|
|
727
727
|
}), Ae = H(() => {
|
|
728
|
-
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1,
|
|
728
|
+
const ie = O.value + D.value, te = 360 - $.value - 3 * D.value, Y = Math.max(0, Math.min(1, T.value / t.max)), le = te * Y, _e = ie + le;
|
|
729
729
|
return Se(u, u, g.value, _e);
|
|
730
730
|
});
|
|
731
731
|
function Se(ie, te, Y, le) {
|
|
@@ -759,15 +759,15 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
759
759
|
const Y = te, le = ie - Y, _e = performance.now();
|
|
760
760
|
function Te(Ee) {
|
|
761
761
|
const $e = Ee - _e, re = Math.min($e / so, 1), ve = ne(re);
|
|
762
|
-
|
|
762
|
+
T.value = Y + le * ve, re < 1 ? w = requestAnimationFrame(Te) : (T.value = ie, w = null);
|
|
763
763
|
}
|
|
764
764
|
w = requestAnimationFrame(Te);
|
|
765
765
|
}
|
|
766
766
|
function Z() {
|
|
767
|
-
|
|
767
|
+
V.value = !0, Rs(t.level, t.userSettings), l("levelup");
|
|
768
768
|
const te = [10, 25, 50, 100, 150, 200].includes(t.level);
|
|
769
769
|
setTimeout(() => {
|
|
770
|
-
|
|
770
|
+
V.value = !1;
|
|
771
771
|
}, te ? 2e3 : 1200);
|
|
772
772
|
}
|
|
773
773
|
return Le(() => t.value, (ie) => {
|
|
@@ -781,7 +781,7 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
781
781
|
viewBox: `0 0 ${i(x)} ${i(x)}`,
|
|
782
782
|
style: { position: "relative" }
|
|
783
783
|
}, [
|
|
784
|
-
|
|
784
|
+
V.value ? (a(), o("g", Zs, [
|
|
785
785
|
e("circle", {
|
|
786
786
|
cx: u,
|
|
787
787
|
cy: u,
|
|
@@ -799,7 +799,7 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
799
799
|
style: { "font-family": "'Montserrat', sans-serif" }
|
|
800
800
|
}, "Level Up", 8, Gs)
|
|
801
801
|
])) : I("", !0),
|
|
802
|
-
|
|
802
|
+
T.value >= 0 && T.value < t.max ? (a(), o("path", {
|
|
803
803
|
key: 1,
|
|
804
804
|
d: ae.value,
|
|
805
805
|
stroke: "#ddd",
|
|
@@ -821,9 +821,9 @@ const Rs = (s, r) => $a.playLevelUp(s, r), Fs = { class: "level-progress-contain
|
|
|
821
821
|
fill: "none",
|
|
822
822
|
transform: "scale(-1, 1) translate(-400, 0)"
|
|
823
823
|
}, null, 8, Qs),
|
|
824
|
-
|
|
824
|
+
T.value > 0 ? (a(), o("path", {
|
|
825
825
|
key: 2,
|
|
826
|
-
d:
|
|
826
|
+
d: z.value,
|
|
827
827
|
stroke: Ce.value,
|
|
828
828
|
"stroke-width": m.value,
|
|
829
829
|
fill: "none",
|
|
@@ -890,8 +890,8 @@ class io {
|
|
|
890
890
|
normal: 100,
|
|
891
891
|
high: 200,
|
|
892
892
|
critical: 300
|
|
893
|
-
}, l = this.baseZIndex + t[r],
|
|
894
|
-
return l +
|
|
893
|
+
}, l = this.baseZIndex + t[r], V = this.stack.length;
|
|
894
|
+
return l + V;
|
|
895
895
|
}
|
|
896
896
|
lockBodyScroll() {
|
|
897
897
|
typeof document > "u" || (this.originalBodyOverflow === null && (this.originalBodyOverflow = document.body.style.overflow || ""), document.body.style.overflow = "hidden");
|
|
@@ -953,10 +953,10 @@ function ro(s = {}) {
|
|
|
953
953
|
closeOnEscape: r = !0,
|
|
954
954
|
priority: t = "normal",
|
|
955
955
|
component: l
|
|
956
|
-
} = s,
|
|
957
|
-
if (
|
|
956
|
+
} = s, V = M(null), T = M(!1), C = M(null), w = async (S) => {
|
|
957
|
+
if (T.value) return;
|
|
958
958
|
const u = /* @__PURE__ */ Symbol("modal");
|
|
959
|
-
|
|
959
|
+
V.value = u;
|
|
960
960
|
const m = Rt.add({
|
|
961
961
|
id: u,
|
|
962
962
|
closeModal: S || c,
|
|
@@ -964,20 +964,20 @@ function ro(s = {}) {
|
|
|
964
964
|
priority: t,
|
|
965
965
|
component: l
|
|
966
966
|
});
|
|
967
|
-
return C.value = m,
|
|
967
|
+
return C.value = m, T.value = !0, await yt(), m;
|
|
968
968
|
}, c = () => {
|
|
969
|
-
!
|
|
970
|
-
}, h = () =>
|
|
969
|
+
!V.value || !T.value || (Rt.remove(V.value), V.value = null, C.value = null, T.value = !1);
|
|
970
|
+
}, h = () => V.value ? document.querySelector(`[data-modal-id="${V.value.toString()}"]`) : null, x = () => C.value ? document.querySelector(`.ui-app-modal-backdrop[style*="z-index: ${C.value.zIndex - 1}"]`) : null;
|
|
971
971
|
try {
|
|
972
972
|
Mt(() => {
|
|
973
|
-
|
|
973
|
+
T.value && c();
|
|
974
974
|
});
|
|
975
975
|
} catch {
|
|
976
976
|
}
|
|
977
977
|
return {
|
|
978
978
|
// State
|
|
979
|
-
isOpen:
|
|
980
|
-
modalId:
|
|
979
|
+
isOpen: T,
|
|
980
|
+
modalId: V,
|
|
981
981
|
modalInstance: C,
|
|
982
982
|
// Actions
|
|
983
983
|
openModal: w,
|
|
@@ -1046,13 +1046,13 @@ const co = {
|
|
|
1046
1046
|
},
|
|
1047
1047
|
emits: ["update:modelValue", "open", "close"],
|
|
1048
1048
|
setup(s, { emit: r }) {
|
|
1049
|
-
const t = s, l = r,
|
|
1049
|
+
const t = s, l = r, V = M(!1), T = M(null), C = M(null), w = M(null), c = ro({
|
|
1050
1050
|
closeOnEscape: t.closeOnEscape,
|
|
1051
1051
|
priority: "normal",
|
|
1052
1052
|
component: "UiModal"
|
|
1053
1053
|
});
|
|
1054
1054
|
M(!0);
|
|
1055
|
-
const h = H(() => t.modelValue !== void 0 ? t.modelValue :
|
|
1055
|
+
const h = H(() => t.modelValue !== void 0 ? t.modelValue : V.value), x = H(() => ({
|
|
1056
1056
|
sm: "ui-modal-size-sm",
|
|
1057
1057
|
md: "ui-modal-size-md",
|
|
1058
1058
|
lg: "ui-modal-size-lg",
|
|
@@ -1065,11 +1065,11 @@ const co = {
|
|
|
1065
1065
|
full: "ui-modal-size-full",
|
|
1066
1066
|
auto: "ui-modal-size-auto"
|
|
1067
1067
|
})[t.size]), S = async () => {
|
|
1068
|
-
w.value = document.activeElement, await c.openModal(m), t.modelValue !== void 0 ? l("update:modelValue", !0) :
|
|
1068
|
+
w.value = document.activeElement, await c.openModal(m), t.modelValue !== void 0 ? l("update:modelValue", !0) : V.value = !0, l("open");
|
|
1069
1069
|
}, u = () => {
|
|
1070
|
-
|
|
1070
|
+
T.value && (w.value = T.value.querySelector('button, [tabindex]:not([tabindex="-1"]), a[href], input, select, textarea'), w.value || (w.value = T.value)), S();
|
|
1071
1071
|
}, m = () => {
|
|
1072
|
-
t.modelValue !== void 0 ? l("update:modelValue", !1) :
|
|
1072
|
+
t.modelValue !== void 0 ? l("update:modelValue", !1) : V.value = !1, l("close"), c.closeModal(), yt(() => {
|
|
1073
1073
|
w.value && document.contains(w.value) && w.value.focus(), w.value = null;
|
|
1074
1074
|
});
|
|
1075
1075
|
};
|
|
@@ -1093,7 +1093,7 @@ const co = {
|
|
|
1093
1093
|
D.$slots.trigger ? (a(), o("span", {
|
|
1094
1094
|
key: 0,
|
|
1095
1095
|
ref_key: "triggerElement",
|
|
1096
|
-
ref:
|
|
1096
|
+
ref: T,
|
|
1097
1097
|
onClick: u
|
|
1098
1098
|
}, [
|
|
1099
1099
|
Pe(D.$slots, "trigger", {
|
|
@@ -1837,8 +1837,8 @@ const co = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return "#EA00A8";
|
|
1839
1839
|
}
|
|
1840
|
-
const l = s,
|
|
1841
|
-
let
|
|
1840
|
+
const l = s, V = r, T = M(), C = M(), w = M(), c = M(0), h = M(1), x = M(1), S = M(1), u = M(l.modelValue || t()), m = M({ r: 234, g: 0, b: 168 }), U = M(100), D = M(l.defaultColorFormat || "hex"), g = M({ h: 0, s: 0, l: 0 }), N = M({ l: 0, c: 0, h: 0 }), y = M(!1), L = M(!1), F = M(!1), $ = M(!1), k = M(!1), O = H(() => y.value), q = M(null), b = M(l.compareColor);
|
|
1841
|
+
let z = null, ae = null;
|
|
1842
1842
|
const ce = M(!1);
|
|
1843
1843
|
let Ce = "";
|
|
1844
1844
|
Le(() => [l.showContrast, l.compareColor], ([v, n], f) => {
|
|
@@ -2075,7 +2075,7 @@ const co = {
|
|
|
2075
2075
|
currentColor: v,
|
|
2076
2076
|
compareColor: l.compareColor
|
|
2077
2077
|
};
|
|
2078
|
-
}, Je = H(() => (
|
|
2078
|
+
}, Je = H(() => (z && clearTimeout(z), z = setTimeout(() => {
|
|
2079
2079
|
Xt();
|
|
2080
2080
|
}, 100), q.value)), Jt = H(() => {
|
|
2081
2081
|
if (!$.value || !b.value) return "";
|
|
@@ -2519,8 +2519,8 @@ const co = {
|
|
|
2519
2519
|
}, $t = () => {
|
|
2520
2520
|
y.value = !1, document.removeEventListener("mousemove", xt), document.removeEventListener("mouseup", $t), document.removeEventListener("touchmove", xt), document.removeEventListener("touchend", $t);
|
|
2521
2521
|
}, na = (v) => {
|
|
2522
|
-
if (!
|
|
2523
|
-
const n =
|
|
2522
|
+
if (!T.value) return;
|
|
2523
|
+
const n = T.value.getBoundingClientRect(), f = "touches" in v ? v.touches[0].clientX : v.clientX, ee = "touches" in v ? v.touches[0].clientY : v.clientY, A = Math.max(0, Math.min(n.width, f - n.left)), G = Math.max(0, Math.min(n.height, ee - n.top));
|
|
2524
2524
|
h.value = A / n.width, x.value = 1 - G / n.height;
|
|
2525
2525
|
}, ia = (v) => {
|
|
2526
2526
|
l.disabled || (L.value = !0, ra(v), document.addEventListener("mousemove", Dt), document.addEventListener("mouseup", Nt), document.addEventListener("touchmove", Dt), document.addEventListener("touchend", Nt));
|
|
@@ -2622,10 +2622,10 @@ const co = {
|
|
|
2622
2622
|
const v = He(tt.value);
|
|
2623
2623
|
v !== Ce && (k.value ? (ae && clearTimeout(ae), ae = setTimeout(() => {
|
|
2624
2624
|
const n = He(tt.value);
|
|
2625
|
-
n !== Ce && (ce.value = !0, Ce = n,
|
|
2625
|
+
n !== Ce && (ce.value = !0, Ce = n, V("update:modelValue", n), V("change", n), setTimeout(() => {
|
|
2626
2626
|
ce.value = !1;
|
|
2627
2627
|
}, 5));
|
|
2628
|
-
}, 16)) : (ce.value = !0, Ce = v,
|
|
2628
|
+
}, 16)) : (ce.value = !0, Ce = v, V("update:modelValue", v), V("change", v), setTimeout(() => {
|
|
2629
2629
|
ce.value = !1;
|
|
2630
2630
|
}, 5)));
|
|
2631
2631
|
}, { deep: !0 }), Le(c, () => {
|
|
@@ -2638,12 +2638,12 @@ const co = {
|
|
|
2638
2638
|
}), Ye(() => {
|
|
2639
2639
|
Va();
|
|
2640
2640
|
}), Mt(() => {
|
|
2641
|
-
|
|
2641
|
+
z && clearTimeout(z), document.removeEventListener("mousemove", xt), document.removeEventListener("mouseup", $t), document.removeEventListener("touchmove", xt), document.removeEventListener("touchend", $t);
|
|
2642
2642
|
}), (v, n) => (a(), o("div", Co, [
|
|
2643
2643
|
e("div", yo, [
|
|
2644
2644
|
e("div", {
|
|
2645
2645
|
ref_key: "colorAreaRef",
|
|
2646
|
-
ref:
|
|
2646
|
+
ref: T,
|
|
2647
2647
|
class: "ui-color-picker-area",
|
|
2648
2648
|
style: je({ "--_global-picker-width": `${ut}px`, "--_global-picker-height": `${dt}px`, backgroundColor: `hsl(${c.value}, 100%, 50%)` }),
|
|
2649
2649
|
onMousedown: la,
|
|
@@ -3289,7 +3289,7 @@ const co = {
|
|
|
3289
3289
|
},
|
|
3290
3290
|
emits: ["update:modelValue"],
|
|
3291
3291
|
setup(s, { emit: r }) {
|
|
3292
|
-
const t = s, l = r,
|
|
3292
|
+
const t = s, l = r, V = M(), T = M(), C = M(!1), w = H({
|
|
3293
3293
|
get: () => t.modelValue,
|
|
3294
3294
|
set: (m) => l("update:modelValue", m)
|
|
3295
3295
|
}), c = H(() => t.modelValue || "#000000"), {
|
|
@@ -3297,8 +3297,8 @@ const co = {
|
|
|
3297
3297
|
updatePosition: x,
|
|
3298
3298
|
cleanup: S
|
|
3299
3299
|
} = ja({
|
|
3300
|
-
trigger:
|
|
3301
|
-
floating:
|
|
3300
|
+
trigger: V,
|
|
3301
|
+
floating: T,
|
|
3302
3302
|
placement: "bottom-start",
|
|
3303
3303
|
offset: 8,
|
|
3304
3304
|
shift: !0,
|
|
@@ -3336,7 +3336,7 @@ const co = {
|
|
|
3336
3336
|
S();
|
|
3337
3337
|
}), (m, U) => (a(), o("div", {
|
|
3338
3338
|
ref_key: "containerRef",
|
|
3339
|
-
ref:
|
|
3339
|
+
ref: V,
|
|
3340
3340
|
class: "ui-color-picker-button-container"
|
|
3341
3341
|
}, [
|
|
3342
3342
|
d(lt, {
|
|
@@ -3364,7 +3364,7 @@ const co = {
|
|
|
3364
3364
|
C.value ? (a(), o("div", {
|
|
3365
3365
|
key: 0,
|
|
3366
3366
|
ref_key: "popoverRef",
|
|
3367
|
-
ref:
|
|
3367
|
+
ref: T,
|
|
3368
3368
|
class: "ui-color-picker-popover",
|
|
3369
3369
|
style: je(i(h))
|
|
3370
3370
|
}, [
|
|
@@ -3397,7 +3397,7 @@ const co = {
|
|
|
3397
3397
|
emits: ["update:modelValue", "change"],
|
|
3398
3398
|
setup(s, { emit: r }) {
|
|
3399
3399
|
const t = s, l = r;
|
|
3400
|
-
function
|
|
3400
|
+
function V() {
|
|
3401
3401
|
if (typeof window < "u") {
|
|
3402
3402
|
const C = getComputedStyle(document.documentElement).getPropertyValue("--strands-accent").trim();
|
|
3403
3403
|
if (C)
|
|
@@ -3405,20 +3405,20 @@ const co = {
|
|
|
3405
3405
|
}
|
|
3406
3406
|
return "#EA00A8";
|
|
3407
3407
|
}
|
|
3408
|
-
const
|
|
3409
|
-
get: () => t.modelValue === "#EA00A8" ?
|
|
3408
|
+
const T = H({
|
|
3409
|
+
get: () => t.modelValue === "#EA00A8" ? V() : t.modelValue,
|
|
3410
3410
|
set: (C) => {
|
|
3411
3411
|
l("update:modelValue", C), l("change", C);
|
|
3412
3412
|
}
|
|
3413
3413
|
});
|
|
3414
3414
|
return (C, w) => t.variant === "button" ? (a(), ye(C1, xa({
|
|
3415
3415
|
key: 0,
|
|
3416
|
-
modelValue:
|
|
3417
|
-
"onUpdate:modelValue": w[0] || (w[0] = (c) =>
|
|
3416
|
+
modelValue: T.value,
|
|
3417
|
+
"onUpdate:modelValue": w[0] || (w[0] = (c) => T.value = c)
|
|
3418
3418
|
}, t), null, 16, ["modelValue"])) : (a(), ye(qa, xa({
|
|
3419
3419
|
key: 1,
|
|
3420
|
-
modelValue:
|
|
3421
|
-
"onUpdate:modelValue": w[1] || (w[1] = (c) =>
|
|
3420
|
+
modelValue: T.value,
|
|
3421
|
+
"onUpdate:modelValue": w[1] || (w[1] = (c) => T.value = c)
|
|
3422
3422
|
}, t), null, 16, ["modelValue"]));
|
|
3423
3423
|
}
|
|
3424
3424
|
}), y1 = { class: "ui-table-container" }, k1 = {
|
|
@@ -3458,7 +3458,7 @@ const co = {
|
|
|
3458
3458
|
},
|
|
3459
3459
|
emits: ["rowClick", "rowSelect", "sort", "columnReorder", "cellUpdate"],
|
|
3460
3460
|
setup(s, { expose: r, emit: t }) {
|
|
3461
|
-
const l = s,
|
|
3461
|
+
const l = s, V = t, T = ha(), C = M(null), w = M([...l.data]), c = M([...l.columns]);
|
|
3462
3462
|
Le(() => l.data, (K) => {
|
|
3463
3463
|
w.value = [...K];
|
|
3464
3464
|
}, { deep: !0 }), Le(() => l.columns, (K) => {
|
|
@@ -3473,7 +3473,7 @@ const co = {
|
|
|
3473
3473
|
"--_cols": l.columns.length.toString()
|
|
3474
3474
|
};
|
|
3475
3475
|
return l.maxHeight && (K.maxHeight = typeof l.maxHeight == "number" || !l.maxHeight.endsWith("px") ? `${l.maxHeight}px` : l.maxHeight), l.maxWidth && (K.maxWidth = typeof l.maxWidth == "number" || !l.maxWidth.endsWith("px") ? `${l.maxWidth}px` : l.maxWidth), K;
|
|
3476
|
-
}),
|
|
3476
|
+
}), z = H(() => ({
|
|
3477
3477
|
gridColumn: `1 / ${l.columns.length + 1}`
|
|
3478
3478
|
})), ae = (K) => k.value ? K === F.value ? {
|
|
3479
3479
|
transform: `translateX(${q.value - O.value}px)`,
|
|
@@ -3526,9 +3526,9 @@ const co = {
|
|
|
3526
3526
|
}, pe)), pe;
|
|
3527
3527
|
}, Ae = (K) => {
|
|
3528
3528
|
const he = l.columns.find((Q) => Q.key === K);
|
|
3529
|
-
!l.sortable && !he?.sortable || (S.value === K ? u.value = u.value === "asc" ? "desc" : "asc" : (S.value = K, u.value = "asc"),
|
|
3530
|
-
}, Se = H(() => l.stickyColumns || []), be = H(() => l.columns.some((K) =>
|
|
3531
|
-
const Q =
|
|
3529
|
+
!l.sortable && !he?.sortable || (S.value === K ? u.value = u.value === "asc" ? "desc" : "asc" : (S.value = K, u.value = "asc"), V("sort", K, u.value));
|
|
3530
|
+
}, Se = H(() => l.stickyColumns || []), be = H(() => l.columns.some((K) => T[`footer-${K.key}`])), ne = (K, he) => {
|
|
3531
|
+
const Q = T[`cell-${K.key}`] || K.key === "actions" || T.actions;
|
|
3532
3532
|
return K.key === "actions" && Q;
|
|
3533
3533
|
}, W = (K) => {
|
|
3534
3534
|
if (K.filterOptions)
|
|
@@ -3543,7 +3543,7 @@ const co = {
|
|
|
3543
3543
|
}, ie = (K) => {
|
|
3544
3544
|
D.value = D.value === K ? "" : K;
|
|
3545
3545
|
}, te = (K, he) => {
|
|
3546
|
-
K._isGroupHeader || (l.expandable && (g.value.has(he) ? g.value.delete(he) : g.value.add(he)), l.selectable && (N.value.has(he) ? N.value.delete(he) : N.value.add(he),
|
|
3546
|
+
K._isGroupHeader || (l.expandable && (g.value.has(he) ? g.value.delete(he) : g.value.add(he)), l.selectable && (N.value.has(he) ? N.value.delete(he) : N.value.add(he), V("rowSelect", N.value)), V("rowClick", K, he));
|
|
3547
3547
|
}, Y = (K, he, Q, fe) => {
|
|
3548
3548
|
const pe = w.value.findIndex((Be) => Be === K);
|
|
3549
3549
|
if (pe === -1) return;
|
|
@@ -3558,7 +3558,7 @@ const co = {
|
|
|
3558
3558
|
Oe = Oe[Ne[Be]];
|
|
3559
3559
|
Oe[Ne[Ne.length - 1]] = Q;
|
|
3560
3560
|
const gt = L.value.get(He);
|
|
3561
|
-
Q !== gt ? y.value.add(He) : y.value.delete(He),
|
|
3561
|
+
Q !== gt ? y.value.add(He) : y.value.delete(He), V("cellUpdate", K, he, Q, pe);
|
|
3562
3562
|
}, le = (K, he) => {
|
|
3563
3563
|
if (l.reorderable) {
|
|
3564
3564
|
if (F.value = he, k.value = !0, O.value = K.clientX, q.value = K.clientX, K.dataTransfer) {
|
|
@@ -3585,7 +3585,7 @@ const co = {
|
|
|
3585
3585
|
const Q = F.value;
|
|
3586
3586
|
if (Q !== he) {
|
|
3587
3587
|
const fe = [...c.value], pe = fe.splice(Q, 1)[0];
|
|
3588
|
-
fe.splice(he, 0, pe), c.value = fe,
|
|
3588
|
+
fe.splice(he, 0, pe), c.value = fe, V("columnReorder", Q, he, fe);
|
|
3589
3589
|
}
|
|
3590
3590
|
ve();
|
|
3591
3591
|
}, re = () => {
|
|
@@ -3812,7 +3812,7 @@ const co = {
|
|
|
3812
3812
|
g.value.has(fe) ? (a(), o("div", {
|
|
3813
3813
|
key: 2,
|
|
3814
3814
|
class: "ui-table-subrow",
|
|
3815
|
-
style: je(
|
|
3815
|
+
style: je(z.value)
|
|
3816
3816
|
}, [
|
|
3817
3817
|
e("div", D1, [
|
|
3818
3818
|
Pe(K.$slots, "expanded-row", {
|
|
@@ -3891,7 +3891,7 @@ const co = {
|
|
|
3891
3891
|
borderColor: { default: "transparent" }
|
|
3892
3892
|
},
|
|
3893
3893
|
setup(s) {
|
|
3894
|
-
const r = s, t = ha(), l = H(() => !!t.default),
|
|
3894
|
+
const r = s, t = ha(), l = H(() => !!t.default), V = H(() => !!t.header), T = H(() => !!t.navigation), C = H(() => r.sticky ? r.sticky === !0 ? { side: "top", offset: "0" } : {
|
|
3895
3895
|
side: r.sticky.side || "top",
|
|
3896
3896
|
offset: r.sticky.offset || "0"
|
|
3897
3897
|
} : null), w = H(() => {
|
|
@@ -3933,13 +3933,13 @@ const co = {
|
|
|
3933
3933
|
style: je(h.value)
|
|
3934
3934
|
}, [
|
|
3935
3935
|
e("div", O1, [
|
|
3936
|
-
|
|
3936
|
+
V.value || s.title || s.description ? (a(), o("div", R1, [
|
|
3937
3937
|
Pe(S.$slots, "header", {}, () => [
|
|
3938
3938
|
s.title ? (a(), o("h1", F1, R(s.title), 1)) : I("", !0),
|
|
3939
3939
|
s.description ? (a(), o("p", q1, R(s.description), 1)) : I("", !0)
|
|
3940
3940
|
], !0)
|
|
3941
3941
|
])) : I("", !0),
|
|
3942
|
-
|
|
3942
|
+
T.value ? (a(), o("div", Z1, [
|
|
3943
3943
|
Pe(S.$slots, "navigation", {}, void 0, !0)
|
|
3944
3944
|
])) : I("", !0),
|
|
3945
3945
|
l.value ? (a(), o("div", K1, [
|
|
@@ -4000,7 +4000,7 @@ function el() {
|
|
|
4000
4000
|
const C = s.value ? "light" : "dark";
|
|
4001
4001
|
t(C);
|
|
4002
4002
|
}
|
|
4003
|
-
function
|
|
4003
|
+
function V() {
|
|
4004
4004
|
switch (At.value) {
|
|
4005
4005
|
case "light":
|
|
4006
4006
|
t("dark");
|
|
@@ -4016,7 +4016,7 @@ function el() {
|
|
|
4016
4016
|
break;
|
|
4017
4017
|
}
|
|
4018
4018
|
}
|
|
4019
|
-
function
|
|
4019
|
+
function T() {
|
|
4020
4020
|
if (typeof window > "u") return;
|
|
4021
4021
|
Ma.value = Q1();
|
|
4022
4022
|
const C = window.matchMedia("(prefers-color-scheme: dark)"), w = (h) => {
|
|
@@ -4029,7 +4029,7 @@ function el() {
|
|
|
4029
4029
|
}, { immediate: !1 });
|
|
4030
4030
|
}
|
|
4031
4031
|
return Ye(() => {
|
|
4032
|
-
|
|
4032
|
+
T();
|
|
4033
4033
|
}), {
|
|
4034
4034
|
// State
|
|
4035
4035
|
currentTheme: H(() => At.value),
|
|
@@ -4038,8 +4038,8 @@ function el() {
|
|
|
4038
4038
|
// Actions
|
|
4039
4039
|
setTheme: t,
|
|
4040
4040
|
toggle: l,
|
|
4041
|
-
cycleTheme:
|
|
4042
|
-
initialize:
|
|
4041
|
+
cycleTheme: V,
|
|
4042
|
+
initialize: T,
|
|
4043
4043
|
// Theme options for UI
|
|
4044
4044
|
themeOptions: [
|
|
4045
4045
|
{ value: "light", label: "Light", icon: "sun" },
|
|
@@ -4053,16 +4053,16 @@ function tl() {
|
|
|
4053
4053
|
return da || (da = el(), typeof window < "u" && (localStorage.getItem(Ta) === null && (At.value = "system"), da.initialize())), da;
|
|
4054
4054
|
}
|
|
4055
4055
|
function al(s = "auto") {
|
|
4056
|
-
const r = fa("themeProvider", null), t = fa("uiApp", null), l = H(() => r?.isForced.value ? r.theme.value : t?.theme.value ? t.theme.value : s),
|
|
4056
|
+
const r = fa("themeProvider", null), t = fa("uiApp", null), l = H(() => r?.isForced.value ? r.theme.value : t?.theme.value ? t.theme.value : s), V = H(() => r?.isForced.value ?? !1), T = H(() => l.value === "auto" ? typeof window < "u" ? window.matchMedia("(prefers-color-scheme: dark)").matches : !1 : l.value === "dark"), C = H(() => l.value === "auto" ? typeof window < "u" ? !window.matchMedia("(prefers-color-scheme: dark)").matches : !0 : l.value === "light"), w = H(() => ({
|
|
4057
4057
|
"ui-theme--light": C.value,
|
|
4058
|
-
"ui-theme--dark":
|
|
4059
|
-
"ui-theme--forced":
|
|
4058
|
+
"ui-theme--dark": T.value,
|
|
4059
|
+
"ui-theme--forced": V.value
|
|
4060
4060
|
}));
|
|
4061
4061
|
return {
|
|
4062
4062
|
theme: l,
|
|
4063
|
-
isDark:
|
|
4063
|
+
isDark: T,
|
|
4064
4064
|
isLight: C,
|
|
4065
|
-
isForced:
|
|
4065
|
+
isForced: V,
|
|
4066
4066
|
themeClass: w
|
|
4067
4067
|
};
|
|
4068
4068
|
}
|
|
@@ -4086,7 +4086,7 @@ const sl = {
|
|
|
4086
4086
|
includeLabel: { type: Boolean, default: !1 }
|
|
4087
4087
|
},
|
|
4088
4088
|
setup(s) {
|
|
4089
|
-
const r = s, { isForced: t } = al(), { currentTheme: l, themeLabel:
|
|
4089
|
+
const r = s, { isForced: t } = al(), { currentTheme: l, themeLabel: V, setTheme: T, cycleTheme: C, themeOptions: w } = tl(), c = H(() => t.value), h = M(!1), x = {
|
|
4090
4090
|
sun: fs,
|
|
4091
4091
|
moon: vs,
|
|
4092
4092
|
monitor: Ea,
|
|
@@ -4117,7 +4117,7 @@ const sl = {
|
|
|
4117
4117
|
}, Ft({
|
|
4118
4118
|
default: _(() => [
|
|
4119
4119
|
s.includeLabel ? (a(), o(De, { key: 0 }, [
|
|
4120
|
-
J(R(i(
|
|
4120
|
+
J(R(i(V)) + R(c.value ? " (Locked)" : ""), 1)
|
|
4121
4121
|
], 64)) : I("", !0)
|
|
4122
4122
|
]),
|
|
4123
4123
|
_: 2
|
|
@@ -4152,7 +4152,7 @@ const sl = {
|
|
|
4152
4152
|
(a(), ye(ot(S(h.value ? "chevron-up" : "chevron-down"))))
|
|
4153
4153
|
]),
|
|
4154
4154
|
default: _(() => [
|
|
4155
|
-
J(" " + R(i(
|
|
4155
|
+
J(" " + R(i(V)) + R(c.value ? " (Locked)" : "") + " ", 1)
|
|
4156
4156
|
]),
|
|
4157
4157
|
_: 1
|
|
4158
4158
|
}, 8, ["size", "disabled", "class", "title"]),
|
|
@@ -4171,7 +4171,7 @@ const sl = {
|
|
|
4171
4171
|
}
|
|
4172
4172
|
]),
|
|
4173
4173
|
disabled: c.value,
|
|
4174
|
-
onClick: (L) => c.value ? null : i(
|
|
4174
|
+
onClick: (L) => c.value ? null : i(T)(y.value)
|
|
4175
4175
|
}, [
|
|
4176
4176
|
(a(), ye(ot(S(y.icon)), { class: "ui-theme-toggle-option-icon" })),
|
|
4177
4177
|
e("span", null, R(y.label), 1),
|
|
@@ -4192,7 +4192,7 @@ const sl = {
|
|
|
4192
4192
|
]),
|
|
4193
4193
|
"aria-pressed": i(l) === y.value,
|
|
4194
4194
|
"aria-label": `${y.label} theme`,
|
|
4195
|
-
onClick: (L) => i(
|
|
4195
|
+
onClick: (L) => i(T)(y.value),
|
|
4196
4196
|
title: `Switch to ${y.label.toLowerCase()} theme`
|
|
4197
4197
|
}, Ft({
|
|
4198
4198
|
default: _(() => [
|
|
@@ -4274,7 +4274,7 @@ const sl = {
|
|
|
4274
4274
|
},
|
|
4275
4275
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
4276
4276
|
setup(s, { emit: r }) {
|
|
4277
|
-
const t = s, l = r,
|
|
4277
|
+
const t = s, l = r, V = M(), T = M(!1), C = M(0), w = M(null), c = M(0), h = H(() => t.modelValue !== void 0 ? Number(t.modelValue) : t.value !== void 0 ? Number(t.value) : c.value);
|
|
4278
4278
|
Le(() => t.value, ($) => {
|
|
4279
4279
|
$ !== void 0 && (c.value = Number($));
|
|
4280
4280
|
}, { immediate: !0 }), Le(() => t.modelValue, ($) => {
|
|
@@ -4287,18 +4287,18 @@ const sl = {
|
|
|
4287
4287
|
if (!t.showTicks) return [];
|
|
4288
4288
|
const $ = [], k = t.max - t.min, O = k / (t.tickCount - 1);
|
|
4289
4289
|
for (let q = 0; q < t.tickCount; q++) {
|
|
4290
|
-
const b = t.min + O * q,
|
|
4290
|
+
const b = t.min + O * q, z = (b - t.min) / k * 100;
|
|
4291
4291
|
$.push({
|
|
4292
4292
|
value: b,
|
|
4293
|
-
position:
|
|
4293
|
+
position: z,
|
|
4294
4294
|
label: b.toFixed(t.step < 1 ? 1 : 0)
|
|
4295
4295
|
});
|
|
4296
4296
|
}
|
|
4297
4297
|
return $;
|
|
4298
4298
|
}), D = ($) => {
|
|
4299
4299
|
const k = $.target, O = parseFloat(k.value);
|
|
4300
|
-
C.value++, C.value > 1 && (
|
|
4301
|
-
|
|
4300
|
+
C.value++, C.value > 1 && (T.value = !0, w.value && clearTimeout(w.value), w.value = setTimeout(() => {
|
|
4301
|
+
T.value = !1, C.value = 0;
|
|
4302
4302
|
}, 100)), c.value = O, l("update:modelValue", O), l("input", O);
|
|
4303
4303
|
}, g = ($) => {
|
|
4304
4304
|
const k = $.target, O = parseFloat(k.value);
|
|
@@ -4310,7 +4310,7 @@ const sl = {
|
|
|
4310
4310
|
}, L = () => {
|
|
4311
4311
|
C.value = 0;
|
|
4312
4312
|
}, F = () => {
|
|
4313
|
-
C.value = 0,
|
|
4313
|
+
C.value = 0, T.value = !1, w.value && (clearTimeout(w.value), w.value = null);
|
|
4314
4314
|
};
|
|
4315
4315
|
return ($, k) => (a(), o("div", {
|
|
4316
4316
|
class: Me(["slider-wrapper", [
|
|
@@ -4318,7 +4318,7 @@ const sl = {
|
|
|
4318
4318
|
m.value,
|
|
4319
4319
|
{
|
|
4320
4320
|
"slider-disabled": s.disabled,
|
|
4321
|
-
"slider-dragging":
|
|
4321
|
+
"slider-dragging": T.value
|
|
4322
4322
|
}
|
|
4323
4323
|
]])
|
|
4324
4324
|
}, [
|
|
@@ -4341,7 +4341,7 @@ const sl = {
|
|
|
4341
4341
|
e("input", {
|
|
4342
4342
|
id: s.inputId,
|
|
4343
4343
|
ref_key: "sliderRef",
|
|
4344
|
-
ref:
|
|
4344
|
+
ref: V,
|
|
4345
4345
|
type: "range",
|
|
4346
4346
|
value: h.value,
|
|
4347
4347
|
min: s.min,
|
|
@@ -4429,7 +4429,7 @@ const sl = {
|
|
|
4429
4429
|
},
|
|
4430
4430
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4431
4431
|
setup(s, { emit: r }) {
|
|
4432
|
-
const t = s, l = r,
|
|
4432
|
+
const t = s, l = r, V = H(() => `radio-group-size-${t.size}`), T = H(() => t.orientation === "horizontal" ? "radio-options-horizontal" : "radio-options-vertical"), C = (x) => {
|
|
4433
4433
|
t.disabled || x.disabled || t.modelValue !== x.value && (l("update:modelValue", x.value), l("change", x.value));
|
|
4434
4434
|
}, w = (x) => {
|
|
4435
4435
|
const u = x.target.value;
|
|
@@ -4441,7 +4441,7 @@ const sl = {
|
|
|
4441
4441
|
};
|
|
4442
4442
|
return (x, S) => (a(), o("div", {
|
|
4443
4443
|
class: Me(["radio-group", [
|
|
4444
|
-
|
|
4444
|
+
V.value,
|
|
4445
4445
|
{ "radio-group-disabled": s.disabled }
|
|
4446
4446
|
]])
|
|
4447
4447
|
}, [
|
|
@@ -4452,7 +4452,7 @@ const sl = {
|
|
|
4452
4452
|
s.description ? (a(), o("p", $l, R(s.description), 1)) : I("", !0),
|
|
4453
4453
|
e("div", {
|
|
4454
4454
|
class: Me(["radio-options", [
|
|
4455
|
-
|
|
4455
|
+
T.value,
|
|
4456
4456
|
{ "radio-options-cards": s.variant === "card" }
|
|
4457
4457
|
]])
|
|
4458
4458
|
}, [
|
|
@@ -4567,7 +4567,7 @@ const sl = {
|
|
|
4567
4567
|
},
|
|
4568
4568
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4569
4569
|
setup(s, { emit: r }) {
|
|
4570
|
-
const t = s, l = r,
|
|
4570
|
+
const t = s, l = r, V = H(() => `checkbox-group-size-${t.size}`), T = H(() => t.orientation === "horizontal" ? "checkbox-options-horizontal" : "checkbox-options-vertical"), C = H(() => {
|
|
4571
4571
|
const g = t.options.filter((N) => !N.disabled);
|
|
4572
4572
|
return g.length > 0 && g.every(
|
|
4573
4573
|
(N) => t.modelValue.includes(N.value)
|
|
@@ -4597,7 +4597,7 @@ const sl = {
|
|
|
4597
4597
|
};
|
|
4598
4598
|
return (g, N) => (a(), o("div", {
|
|
4599
4599
|
class: Me(["checkbox-group", [
|
|
4600
|
-
|
|
4600
|
+
V.value,
|
|
4601
4601
|
{ "checkbox-group-disabled": s.disabled }
|
|
4602
4602
|
]])
|
|
4603
4603
|
}, [
|
|
@@ -4608,7 +4608,7 @@ const sl = {
|
|
|
4608
4608
|
s.description ? (a(), o("p", Nl, R(s.description), 1)) : I("", !0),
|
|
4609
4609
|
e("div", {
|
|
4610
4610
|
class: Me(["checkbox-options", [
|
|
4611
|
-
|
|
4611
|
+
T.value,
|
|
4612
4612
|
{ "checkbox-options-cards": s.variant === "card" }
|
|
4613
4613
|
]])
|
|
4614
4614
|
}, [
|
|
@@ -4742,39 +4742,39 @@ const sl = {
|
|
|
4742
4742
|
t.iconOnly ? "ui-pill-icon-only" : "",
|
|
4743
4743
|
t.removable ? "ui-pill-removable" : "",
|
|
4744
4744
|
t.disabled ? "ui-pill-disabled" : ""
|
|
4745
|
-
].filter(Boolean).join(" ")),
|
|
4746
|
-
return (
|
|
4745
|
+
].filter(Boolean).join(" ")), V = H(() => ({}));
|
|
4746
|
+
return (T, C) => (a(), o("div", on, [
|
|
4747
4747
|
s.variant === "dot-only" ? (a(), ye(Kt, {
|
|
4748
4748
|
key: 0,
|
|
4749
|
-
content: s.tooltip ||
|
|
4749
|
+
content: s.tooltip || T.$slots.default?.()?.[0]?.children || "",
|
|
4750
4750
|
delay: 0
|
|
4751
4751
|
}, {
|
|
4752
4752
|
default: _(() => [
|
|
4753
4753
|
e("span", {
|
|
4754
4754
|
class: Me(l.value),
|
|
4755
|
-
style: je(
|
|
4755
|
+
style: je(V.value)
|
|
4756
4756
|
}, null, 6)
|
|
4757
4757
|
]),
|
|
4758
4758
|
_: 1
|
|
4759
4759
|
}, 8, ["content"])) : (a(), o("span", {
|
|
4760
4760
|
key: 1,
|
|
4761
4761
|
class: Me([l.value, {
|
|
4762
|
-
"ui-pill-has-leading-icon":
|
|
4763
|
-
"ui-pill-has-trailing-icon":
|
|
4762
|
+
"ui-pill-has-leading-icon": T.$slots["leading-icon"],
|
|
4763
|
+
"ui-pill-has-trailing-icon": T.$slots["trailing-icon"]
|
|
4764
4764
|
}]),
|
|
4765
|
-
style: je(
|
|
4765
|
+
style: je(V.value)
|
|
4766
4766
|
}, [
|
|
4767
|
-
|
|
4768
|
-
Pe(
|
|
4767
|
+
T.$slots["leading-icon"] && !s.iconOnly ? (a(), o("span", ln, [
|
|
4768
|
+
Pe(T.$slots, "leading-icon", {}, void 0, !0)
|
|
4769
4769
|
])) : I("", !0),
|
|
4770
4770
|
s.icon && s.iconOnly ? (a(), o("span", nn, [
|
|
4771
|
-
Pe(
|
|
4771
|
+
Pe(T.$slots, "icon", {}, void 0, !0)
|
|
4772
4772
|
])) : I("", !0),
|
|
4773
4773
|
s.iconOnly ? I("", !0) : (a(), o("span", rn, [
|
|
4774
|
-
Pe(
|
|
4774
|
+
Pe(T.$slots, "default", {}, void 0, !0)
|
|
4775
4775
|
])),
|
|
4776
|
-
|
|
4777
|
-
Pe(
|
|
4776
|
+
T.$slots["trailing-icon"] && !s.iconOnly ? (a(), o("span", cn, [
|
|
4777
|
+
Pe(T.$slots, "trailing-icon", {}, void 0, !0)
|
|
4778
4778
|
])) : I("", !0)
|
|
4779
4779
|
], 6))
|
|
4780
4780
|
]));
|
|
@@ -4796,11 +4796,11 @@ const sl = {
|
|
|
4796
4796
|
config: {}
|
|
4797
4797
|
},
|
|
4798
4798
|
setup(s) {
|
|
4799
|
-
const r = s, { config: t } = vt(r.config), l = H(() => t.value.baseUrl !== "https://accounts.strands.gg"),
|
|
4799
|
+
const r = s, { config: t } = vt(r.config), l = H(() => t.value.baseUrl !== "https://accounts.strands.gg"), V = ha(), T = H(() => dn("default", V));
|
|
4800
4800
|
return (C, w) => (a(), o("div", pn, [
|
|
4801
4801
|
l.value ? (a(), o("div", {
|
|
4802
4802
|
key: 0,
|
|
4803
|
-
class: Me(["secured-footer", { "secured-footer-with-content":
|
|
4803
|
+
class: Me(["secured-footer", { "secured-footer-with-content": T.value, "secured-footer-centered": !T.value }])
|
|
4804
4804
|
}, [
|
|
4805
4805
|
Pe(C.$slots, "default", {}, void 0, !0),
|
|
4806
4806
|
l.value ? (a(), o("div", fn, [
|
|
@@ -4821,7 +4821,7 @@ function Tt() {
|
|
|
4821
4821
|
() => va.value.filter(
|
|
4822
4822
|
(g) => g.is_active && g.device_type !== "hardware" && g.device_type !== "passkey"
|
|
4823
4823
|
)
|
|
4824
|
-
),
|
|
4824
|
+
), V = async (g, N = {}) => {
|
|
4825
4825
|
const y = {
|
|
4826
4826
|
"Content-Type": "application/json",
|
|
4827
4827
|
...N.headers || {}
|
|
@@ -4843,10 +4843,10 @@ function Tt() {
|
|
|
4843
4843
|
throw new Error($);
|
|
4844
4844
|
}
|
|
4845
4845
|
return L.json();
|
|
4846
|
-
},
|
|
4846
|
+
}, T = async () => {
|
|
4847
4847
|
We.value = !0;
|
|
4848
4848
|
try {
|
|
4849
|
-
const g = await
|
|
4849
|
+
const g = await V(s("mfaDevices"), {
|
|
4850
4850
|
method: "GET"
|
|
4851
4851
|
});
|
|
4852
4852
|
return va.value = g.devices || [], Ba.value = g.mfa_enabled || !1, g;
|
|
@@ -4856,42 +4856,42 @@ function Tt() {
|
|
|
4856
4856
|
}, C = async (g) => {
|
|
4857
4857
|
We.value = !0;
|
|
4858
4858
|
try {
|
|
4859
|
-
const N = await
|
|
4859
|
+
const N = await V(s("mfaTotpSetup"), {
|
|
4860
4860
|
method: "POST",
|
|
4861
4861
|
body: JSON.stringify({ device_name: g })
|
|
4862
4862
|
});
|
|
4863
|
-
return await
|
|
4863
|
+
return await T(), N;
|
|
4864
4864
|
} finally {
|
|
4865
4865
|
We.value = !1;
|
|
4866
4866
|
}
|
|
4867
4867
|
}, w = async (g, N) => {
|
|
4868
4868
|
We.value = !0;
|
|
4869
4869
|
try {
|
|
4870
|
-
await
|
|
4870
|
+
await V(s("mfaTotpVerify"), {
|
|
4871
4871
|
method: "POST",
|
|
4872
4872
|
body: JSON.stringify({
|
|
4873
4873
|
device_id: g,
|
|
4874
4874
|
totp_code: N
|
|
4875
4875
|
})
|
|
4876
|
-
}), await
|
|
4876
|
+
}), await T();
|
|
4877
4877
|
} finally {
|
|
4878
4878
|
We.value = !1;
|
|
4879
4879
|
}
|
|
4880
4880
|
}, c = async (g) => {
|
|
4881
4881
|
We.value = !0;
|
|
4882
4882
|
try {
|
|
4883
|
-
const N = await
|
|
4883
|
+
const N = await V(s("mfaEmailSetup"), {
|
|
4884
4884
|
method: "POST",
|
|
4885
4885
|
body: JSON.stringify({ device_name: g })
|
|
4886
4886
|
});
|
|
4887
|
-
return await
|
|
4887
|
+
return await T(), N;
|
|
4888
4888
|
} finally {
|
|
4889
4889
|
We.value = !1;
|
|
4890
4890
|
}
|
|
4891
4891
|
}, h = async (g) => {
|
|
4892
4892
|
We.value = !0;
|
|
4893
4893
|
try {
|
|
4894
|
-
await
|
|
4894
|
+
await V(s("mfaEmailSend"), {
|
|
4895
4895
|
method: "POST",
|
|
4896
4896
|
body: JSON.stringify({ device_id: g })
|
|
4897
4897
|
});
|
|
@@ -4901,7 +4901,7 @@ function Tt() {
|
|
|
4901
4901
|
}, x = async (g, N) => {
|
|
4902
4902
|
We.value = !0;
|
|
4903
4903
|
try {
|
|
4904
|
-
return (await
|
|
4904
|
+
return (await V(s("mfaEmailVerify"), {
|
|
4905
4905
|
method: "POST",
|
|
4906
4906
|
body: JSON.stringify({
|
|
4907
4907
|
device_id: g,
|
|
@@ -4914,17 +4914,17 @@ function Tt() {
|
|
|
4914
4914
|
}, S = async (g) => {
|
|
4915
4915
|
We.value = !0;
|
|
4916
4916
|
try {
|
|
4917
|
-
await
|
|
4917
|
+
await V(s("mfaDeviceDisable"), {
|
|
4918
4918
|
method: "POST",
|
|
4919
4919
|
body: JSON.stringify({ device_id: g })
|
|
4920
|
-
}), await
|
|
4920
|
+
}), await T();
|
|
4921
4921
|
} finally {
|
|
4922
4922
|
We.value = !1;
|
|
4923
4923
|
}
|
|
4924
4924
|
}, u = async (g) => {
|
|
4925
4925
|
We.value = !0;
|
|
4926
4926
|
try {
|
|
4927
|
-
return await
|
|
4927
|
+
return await V(s("mfaBackupCodes"), {
|
|
4928
4928
|
method: "POST",
|
|
4929
4929
|
body: JSON.stringify({ device_id: g })
|
|
4930
4930
|
});
|
|
@@ -4974,7 +4974,7 @@ function Tt() {
|
|
|
4974
4974
|
hasMfaDevices: t,
|
|
4975
4975
|
activeMfaDevices: l,
|
|
4976
4976
|
// Methods
|
|
4977
|
-
fetchMfaDevices:
|
|
4977
|
+
fetchMfaDevices: T,
|
|
4978
4978
|
setupTotp: C,
|
|
4979
4979
|
verifyTotpSetup: w,
|
|
4980
4980
|
setupEmailMfa: c,
|
|
@@ -5062,7 +5062,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5062
5062
|
oe("path", { d: "m22 6-10 7L2 6" })
|
|
5063
5063
|
]);
|
|
5064
5064
|
}
|
|
5065
|
-
},
|
|
5065
|
+
}, V = {
|
|
5066
5066
|
props: ["size"],
|
|
5067
5067
|
render() {
|
|
5068
5068
|
return oe("svg", {
|
|
@@ -5077,7 +5077,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5077
5077
|
oe("path", { d: "m15.5 7.5 3 3L22 7l-3-3" })
|
|
5078
5078
|
]);
|
|
5079
5079
|
}
|
|
5080
|
-
},
|
|
5080
|
+
}, T = {
|
|
5081
5081
|
props: ["size"],
|
|
5082
5082
|
render() {
|
|
5083
5083
|
return oe("svg", {
|
|
@@ -5136,7 +5136,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5136
5136
|
set: ($e) => {
|
|
5137
5137
|
$e || h("close");
|
|
5138
5138
|
}
|
|
5139
|
-
}), k = M(null), O = M(""), q = M(""), b = M(""),
|
|
5139
|
+
}), k = M(null), O = M(""), q = M(""), b = M(""), z = M(""), ae = M(!1), ce = M(!1), Ce = M(!1), xe = M(0);
|
|
5140
5140
|
let Ae = null;
|
|
5141
5141
|
const Se = H(() => (c.availableMfaMethods || []).filter(
|
|
5142
5142
|
(re) => re.device_type !== "hardware" && re.device_type !== "passkey"
|
|
@@ -5144,7 +5144,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5144
5144
|
Le(() => Se.value, ($e) => {
|
|
5145
5145
|
$e.length === 1 ? k.value = $e[0] : $e.length === 0 && (k.value = null);
|
|
5146
5146
|
}, { immediate: !0 }), Le(() => c.show, async ($e) => {
|
|
5147
|
-
$e ? (O.value = "", q.value = "", b.value = "",
|
|
5147
|
+
$e ? (O.value = "", q.value = "", b.value = "", z.value = "", ae.value = !1, ce.value = !1, Ce.value = !1, xe.value = 0, Ae && (clearInterval(Ae), Ae = null), Se.value.length === 1 && (k.value = Se.value[0], k.value.device_type === "email" && setTimeout(async () => {
|
|
5148
5148
|
try {
|
|
5149
5149
|
await m(k.value.id), ce.value = !0, Y();
|
|
5150
5150
|
} catch (re) {
|
|
@@ -5166,7 +5166,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5166
5166
|
const ve = re.substring(0, 4), Ie = re.substring(4, 8);
|
|
5167
5167
|
re = Ie ? `${ve}-${Ie}` : ve;
|
|
5168
5168
|
}
|
|
5169
|
-
re.replace(/-/g, "").length <= 8 && (b.value = re),
|
|
5169
|
+
re.replace(/-/g, "").length <= 8 && (b.value = re), z.value = "";
|
|
5170
5170
|
}, ie = ($e) => {
|
|
5171
5171
|
$e.preventDefault();
|
|
5172
5172
|
let ve = ($e.clipboardData?.getData("text/plain") || "").replace(/[^a-zA-Z0-9-]/g, "").toLowerCase();
|
|
@@ -5174,7 +5174,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5174
5174
|
const Ie = ve.substring(0, 4), K = ve.substring(4, 8);
|
|
5175
5175
|
ve = K ? `${Ie}-${K}` : Ie;
|
|
5176
5176
|
}
|
|
5177
|
-
ve.replace(/-/g, "").length <= 8 && (b.value = ve),
|
|
5177
|
+
ve.replace(/-/g, "").length <= 8 && (b.value = ve), z.value = "";
|
|
5178
5178
|
}, te = async () => {
|
|
5179
5179
|
if (!(!k.value || k.value.device_type !== "email"))
|
|
5180
5180
|
try {
|
|
@@ -5197,11 +5197,11 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5197
5197
|
}
|
|
5198
5198
|
}, _e = async () => {
|
|
5199
5199
|
if (b.value) {
|
|
5200
|
-
|
|
5200
|
+
z.value = "";
|
|
5201
5201
|
try {
|
|
5202
5202
|
await u("", b.value, !0), h("success");
|
|
5203
5203
|
} catch ($e) {
|
|
5204
|
-
|
|
5204
|
+
z.value = $e instanceof Error ? $e.message : "Invalid backup code";
|
|
5205
5205
|
}
|
|
5206
5206
|
}
|
|
5207
5207
|
}, Te = ($e) => {
|
|
@@ -5211,11 +5211,11 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5211
5211
|
case "email":
|
|
5212
5212
|
return l;
|
|
5213
5213
|
case "hardware":
|
|
5214
|
-
return z;
|
|
5215
|
-
case "passkey":
|
|
5216
5214
|
return V;
|
|
5215
|
+
case "passkey":
|
|
5216
|
+
return T;
|
|
5217
5217
|
default:
|
|
5218
|
-
return
|
|
5218
|
+
return T;
|
|
5219
5219
|
}
|
|
5220
5220
|
}, Ee = async () => {
|
|
5221
5221
|
const $e = c.sessionId || D.value;
|
|
@@ -5381,7 +5381,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5381
5381
|
e("div", Hn, [
|
|
5382
5382
|
e("div", Un, [
|
|
5383
5383
|
e("div", Dn, [
|
|
5384
|
-
(a(), ye(ot(k.value.device_type === "passkey" ?
|
|
5384
|
+
(a(), ye(ot(k.value.device_type === "passkey" ? T : V), {
|
|
5385
5385
|
size: 24,
|
|
5386
5386
|
class: "mfa-hardware-icon-svg"
|
|
5387
5387
|
}))
|
|
@@ -5411,7 +5411,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5411
5411
|
class: "mfa-backup-toggle-button"
|
|
5412
5412
|
}, {
|
|
5413
5413
|
default: _(() => [
|
|
5414
|
-
d(
|
|
5414
|
+
d(V, {
|
|
5415
5415
|
size: 16,
|
|
5416
5416
|
class: "mfa-backup-toggle-icon"
|
|
5417
5417
|
}),
|
|
@@ -5436,7 +5436,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5436
5436
|
"onUpdate:modelValue": re[1] || (re[1] = (ve) => b.value = ve),
|
|
5437
5437
|
label: "Backup Code",
|
|
5438
5438
|
placeholder: "abcd-1234",
|
|
5439
|
-
error:
|
|
5439
|
+
error: z.value,
|
|
5440
5440
|
disabled: F.value,
|
|
5441
5441
|
onInput: Z,
|
|
5442
5442
|
onPaste: ie,
|
|
@@ -5513,7 +5513,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5513
5513
|
class: "mfa-backup-toggle-button"
|
|
5514
5514
|
}, {
|
|
5515
5515
|
default: _(() => [
|
|
5516
|
-
d(
|
|
5516
|
+
d(V, {
|
|
5517
5517
|
size: 16,
|
|
5518
5518
|
class: "mfa-backup-toggle-icon"
|
|
5519
5519
|
}),
|
|
@@ -5538,7 +5538,7 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5538
5538
|
"onUpdate:modelValue": re[4] || (re[4] = (ve) => b.value = ve),
|
|
5539
5539
|
label: "Backup Code",
|
|
5540
5540
|
placeholder: "abcd-1234",
|
|
5541
|
-
error:
|
|
5541
|
+
error: z.value,
|
|
5542
5542
|
disabled: F.value,
|
|
5543
5543
|
onInput: Z,
|
|
5544
5544
|
onPaste: ie,
|
|
@@ -5562,13 +5562,13 @@ const gn = { class: "accui-component-scope" }, Cn = { class: "mfa-verification-c
|
|
|
5562
5562
|
}
|
|
5563
5563
|
}), Za = /* @__PURE__ */ Ue(Jn, [["__scopeId", "data-v-f0750b5a"]]), Pa = /* @__PURE__ */ new Map(), ei = 300 * 1e3;
|
|
5564
5564
|
function za(s = {}) {
|
|
5565
|
-
const { getUrl: r, config: t } = vt(), l = M([]),
|
|
5565
|
+
const { getUrl: r, config: t } = vt(), l = M([]), V = M(!1), T = M(null), C = H(
|
|
5566
5566
|
() => l.value.filter((u) => u.enabled)
|
|
5567
5567
|
), w = async () => {
|
|
5568
5568
|
const u = JSON.stringify(s), m = Pa.get(u);
|
|
5569
5569
|
if (m && Date.now() - m.timestamp < ei)
|
|
5570
5570
|
return l.value = m.data, m.data;
|
|
5571
|
-
|
|
5571
|
+
V.value = !0, T.value = null;
|
|
5572
5572
|
try {
|
|
5573
5573
|
let U = r("oauthProviders");
|
|
5574
5574
|
const D = s.redirectUrl || t.value?.oauth2RedirectUrl;
|
|
@@ -5594,9 +5594,9 @@ function za(s = {}) {
|
|
|
5594
5594
|
});
|
|
5595
5595
|
} catch (U) {
|
|
5596
5596
|
const D = U instanceof Error ? U.message : "Failed to fetch OAuth providers";
|
|
5597
|
-
|
|
5597
|
+
T.value = D;
|
|
5598
5598
|
} finally {
|
|
5599
|
-
|
|
5599
|
+
V.value = !1;
|
|
5600
5600
|
}
|
|
5601
5601
|
}, c = async (u, m) => {
|
|
5602
5602
|
const U = { ...s, ...m }, D = new URLSearchParams();
|
|
@@ -5634,7 +5634,7 @@ function za(s = {}) {
|
|
|
5634
5634
|
throw new Error(`No auth URL configured for provider '${u}'`);
|
|
5635
5635
|
window.location.href = U.auth_url;
|
|
5636
5636
|
} catch (U) {
|
|
5637
|
-
throw
|
|
5637
|
+
throw T.value = U instanceof Error ? U.message : "Failed to redirect to OAuth provider", U;
|
|
5638
5638
|
}
|
|
5639
5639
|
}, x = (u) => l.value.find((m) => m.id === u), S = (u) => {
|
|
5640
5640
|
if (u.iconUrl)
|
|
@@ -5656,8 +5656,8 @@ function za(s = {}) {
|
|
|
5656
5656
|
return {
|
|
5657
5657
|
providers: H(() => l.value),
|
|
5658
5658
|
enabledProviders: C,
|
|
5659
|
-
loading: H(() =>
|
|
5660
|
-
error: H(() =>
|
|
5659
|
+
loading: H(() => V.value),
|
|
5660
|
+
error: H(() => T.value),
|
|
5661
5661
|
fetchProviders: w,
|
|
5662
5662
|
getProviderAuthUrl: c,
|
|
5663
5663
|
redirectToProvider: h,
|
|
@@ -5813,7 +5813,7 @@ const ti = {
|
|
|
5813
5813
|
},
|
|
5814
5814
|
emits: ["success", "error", "forgot-password", "password-reset-sent", "mode-changed"],
|
|
5815
5815
|
setup(s, { emit: r }) {
|
|
5816
|
-
const t = s, l = r, { getUrl:
|
|
5816
|
+
const t = s, l = r, { getUrl: V, getSupportEmail: T, config: C } = vt(t.config), {
|
|
5817
5817
|
signIn: w,
|
|
5818
5818
|
mfaRequired: c,
|
|
5819
5819
|
availableMfaMethods: h,
|
|
@@ -5833,7 +5833,7 @@ const ti = {
|
|
|
5833
5833
|
});
|
|
5834
5834
|
const g = H(() => u.value), N = {
|
|
5835
5835
|
async signIn(te, Y) {
|
|
5836
|
-
const le = await fetch(
|
|
5836
|
+
const le = await fetch(V("signIn"), {
|
|
5837
5837
|
method: "POST",
|
|
5838
5838
|
headers: {
|
|
5839
5839
|
"Content-Type": "application/json"
|
|
@@ -5845,7 +5845,7 @@ const ti = {
|
|
|
5845
5845
|
return await le.json();
|
|
5846
5846
|
},
|
|
5847
5847
|
async signUp(te, Y, le, _e) {
|
|
5848
|
-
const Te = await fetch(
|
|
5848
|
+
const Te = await fetch(V("signUp"), {
|
|
5849
5849
|
method: "POST",
|
|
5850
5850
|
headers: {
|
|
5851
5851
|
"Content-Type": "application/json"
|
|
@@ -5869,7 +5869,7 @@ const ti = {
|
|
|
5869
5869
|
confirmPassword: ""
|
|
5870
5870
|
}), q = H(() => y.value === "signup"), b = H(() => y.value === "reset-password");
|
|
5871
5871
|
H(() => O.password === O.confirmPassword);
|
|
5872
|
-
const
|
|
5872
|
+
const z = H(() => b.value ? O.email.trim() && !$.value : q.value ? O.email.trim() : O.email.trim() && O.password);
|
|
5873
5873
|
Le(c, (te) => {
|
|
5874
5874
|
te && (k.value = !0);
|
|
5875
5875
|
}, { immediate: !0 });
|
|
@@ -6154,7 +6154,7 @@ const ti = {
|
|
|
6154
6154
|
type: "submit",
|
|
6155
6155
|
variant: "primary",
|
|
6156
6156
|
"full-width": "",
|
|
6157
|
-
disabled: L.value || !
|
|
6157
|
+
disabled: L.value || !z.value,
|
|
6158
6158
|
loading: L.value,
|
|
6159
6159
|
"loading-text": i(S)
|
|
6160
6160
|
}, {
|
|
@@ -6226,7 +6226,7 @@ const ti = {
|
|
|
6226
6226
|
config: t.config
|
|
6227
6227
|
}, {
|
|
6228
6228
|
default: _(() => [
|
|
6229
|
-
i(
|
|
6229
|
+
i(T)() ? (a(), ye(rt, {
|
|
6230
6230
|
key: 0,
|
|
6231
6231
|
name: "support-fade"
|
|
6232
6232
|
}, {
|
|
@@ -6235,7 +6235,7 @@ const ti = {
|
|
|
6235
6235
|
Y[12] || (Y[12] = J(" Need help? ", -1)),
|
|
6236
6236
|
d(i(mt), {
|
|
6237
6237
|
variant: "primary",
|
|
6238
|
-
href: `mailto:${i(
|
|
6238
|
+
href: `mailto:${i(T)()}`
|
|
6239
6239
|
}, {
|
|
6240
6240
|
default: _(() => [...Y[11] || (Y[11] = [
|
|
6241
6241
|
J(" Contact Support ", -1)
|
|
@@ -6321,8 +6321,8 @@ const ti = {
|
|
|
6321
6321
|
const t = s, l = r;
|
|
6322
6322
|
vt(t.config);
|
|
6323
6323
|
const {
|
|
6324
|
-
signIn:
|
|
6325
|
-
mfaRequired:
|
|
6324
|
+
signIn: V,
|
|
6325
|
+
mfaRequired: T,
|
|
6326
6326
|
mfaSessionId: C,
|
|
6327
6327
|
availableMfaMethods: w,
|
|
6328
6328
|
loading: c,
|
|
@@ -6342,7 +6342,7 @@ const ti = {
|
|
|
6342
6342
|
});
|
|
6343
6343
|
});
|
|
6344
6344
|
const U = H(() => c.value), D = M(""), g = M(!1);
|
|
6345
|
-
Le(
|
|
6345
|
+
Le(T, (O) => {
|
|
6346
6346
|
O && (g.value = !0);
|
|
6347
6347
|
});
|
|
6348
6348
|
const N = Ge({
|
|
@@ -6351,7 +6351,7 @@ const ti = {
|
|
|
6351
6351
|
}), y = async () => {
|
|
6352
6352
|
D.value = "";
|
|
6353
6353
|
try {
|
|
6354
|
-
const O = await
|
|
6354
|
+
const O = await V({
|
|
6355
6355
|
email: N.email,
|
|
6356
6356
|
password: N.password
|
|
6357
6357
|
});
|
|
@@ -6400,7 +6400,7 @@ const ti = {
|
|
|
6400
6400
|
])
|
|
6401
6401
|
], -1)),
|
|
6402
6402
|
i(x)?.length ? (a(), o("div", Di, [
|
|
6403
|
-
(a(!0), o(De, null, Ze(i(x), (b,
|
|
6403
|
+
(a(!0), o(De, null, Ze(i(x), (b, z, ae, ce) => {
|
|
6404
6404
|
const Ce = [b.id, b.name, b.displayName, i(S)];
|
|
6405
6405
|
if (ce && ce.key === b.id && as(ce, Ce)) return ce;
|
|
6406
6406
|
const xe = (a(), ye(i(ue), {
|
|
@@ -6590,7 +6590,7 @@ const ti = {
|
|
|
6590
6590
|
},
|
|
6591
6591
|
emits: ["success", "error", "switch-to-signin"],
|
|
6592
6592
|
setup(s, { emit: r }) {
|
|
6593
|
-
const t = s, l = r, { getUrl:
|
|
6593
|
+
const t = s, l = r, { getUrl: V, getSupportEmail: T } = vt(t.config), {
|
|
6594
6594
|
enabledProviders: C,
|
|
6595
6595
|
loading: w,
|
|
6596
6596
|
fetchProviders: c,
|
|
@@ -6611,7 +6611,7 @@ const ti = {
|
|
|
6611
6611
|
const N = async () => {
|
|
6612
6612
|
x.value = !0, S.value = "";
|
|
6613
6613
|
try {
|
|
6614
|
-
const F =
|
|
6614
|
+
const F = V("signUp"), $ = await fetch(F, {
|
|
6615
6615
|
method: "POST",
|
|
6616
6616
|
headers: {
|
|
6617
6617
|
"Content-Type": "application/json"
|
|
@@ -6641,7 +6641,7 @@ const ti = {
|
|
|
6641
6641
|
if (F.message.includes("fetch"))
|
|
6642
6642
|
$ = "Unable to connect to authentication service. Please check your internet connection and try again.";
|
|
6643
6643
|
else if (F.message.includes("CORS")) {
|
|
6644
|
-
const k =
|
|
6644
|
+
const k = T();
|
|
6645
6645
|
$ = k ? `Authentication service configuration error. Please contact ${k}.` : "Authentication service configuration error.";
|
|
6646
6646
|
} else
|
|
6647
6647
|
$ = F.message;
|
|
@@ -6876,7 +6876,7 @@ const ti = {
|
|
|
6876
6876
|
},
|
|
6877
6877
|
emits: ["success", "error", "invalid-token", "request-new-link", "start-registration"],
|
|
6878
6878
|
setup(s, { emit: r }) {
|
|
6879
|
-
const t = s, l = r, { getUrl:
|
|
6879
|
+
const t = s, l = r, { getUrl: V, getSupportEmail: T } = vt(t.config), { setAuthData: C } = ft(), w = M(!1), c = M(!1), h = M(!1), x = M(""), S = M(""), u = Ge({
|
|
6880
6880
|
firstName: "",
|
|
6881
6881
|
lastName: "",
|
|
6882
6882
|
password: ""
|
|
@@ -6926,7 +6926,7 @@ const ti = {
|
|
|
6926
6926
|
"Content-Type": "application/json"
|
|
6927
6927
|
};
|
|
6928
6928
|
typeof window < "u" && window.location && (y.Origin = window.location.origin);
|
|
6929
|
-
const L = await fetch(
|
|
6929
|
+
const L = await fetch(V("completeRegistration"), {
|
|
6930
6930
|
method: "POST",
|
|
6931
6931
|
headers: y,
|
|
6932
6932
|
body: JSON.stringify({
|
|
@@ -7079,12 +7079,12 @@ const ti = {
|
|
|
7079
7079
|
config: t.config
|
|
7080
7080
|
}, {
|
|
7081
7081
|
default: _(() => [
|
|
7082
|
-
i(
|
|
7082
|
+
i(T)() ? (a(), o("div", jr, [
|
|
7083
7083
|
e("p", Or, [
|
|
7084
7084
|
L[22] || (L[22] = J(" Need help? ", -1)),
|
|
7085
7085
|
d(i(mt), {
|
|
7086
7086
|
variant: "primary",
|
|
7087
|
-
href: `mailto:${i(
|
|
7087
|
+
href: `mailto:${i(T)()}`
|
|
7088
7088
|
}, {
|
|
7089
7089
|
default: _(() => [...L[21] || (L[21] = [
|
|
7090
7090
|
J(" Contact Support ", -1)
|
|
@@ -7153,7 +7153,7 @@ const ti = {
|
|
|
7153
7153
|
},
|
|
7154
7154
|
emits: ["close", "success"],
|
|
7155
7155
|
setup(s, { emit: r }) {
|
|
7156
|
-
const t = s, l = r, { setupTotp:
|
|
7156
|
+
const t = s, l = r, { setupTotp: V, verifyTotpSetup: T, loading: C } = Tt(), w = H({
|
|
7157
7157
|
get: () => t.show,
|
|
7158
7158
|
set: ($) => {
|
|
7159
7159
|
$ || l("close");
|
|
@@ -7179,7 +7179,7 @@ const ti = {
|
|
|
7179
7179
|
}
|
|
7180
7180
|
x.value = "";
|
|
7181
7181
|
try {
|
|
7182
|
-
const $ = await
|
|
7182
|
+
const $ = await V(h.value.trim());
|
|
7183
7183
|
m.value = $, c.value = 2;
|
|
7184
7184
|
} catch ($) {
|
|
7185
7185
|
console.error("Failed to setup TOTP:", $), x.value = $ instanceof Error ? $.message : "Failed to setup TOTP";
|
|
@@ -7190,7 +7190,7 @@ const ti = {
|
|
|
7190
7190
|
if (!(!m.value || !S.value)) {
|
|
7191
7191
|
u.value = "";
|
|
7192
7192
|
try {
|
|
7193
|
-
await
|
|
7193
|
+
await T(m.value.device_id, S.value), c.value = 4;
|
|
7194
7194
|
} catch ($) {
|
|
7195
7195
|
console.error("Failed to verify TOTP code:", $), u.value = $ instanceof Error ? $.message : "Invalid verification code";
|
|
7196
7196
|
}
|
|
@@ -7446,7 +7446,7 @@ const ti = {
|
|
|
7446
7446
|
},
|
|
7447
7447
|
emits: ["close", "success"],
|
|
7448
7448
|
setup(s, { emit: r }) {
|
|
7449
|
-
const t = s, l = r, { setupEmailMfa:
|
|
7449
|
+
const t = s, l = r, { setupEmailMfa: V, sendEmailMfaCode: T, verifyEmailMfaCode: C, loading: w } = Tt(), c = H({
|
|
7450
7450
|
get: () => t.show,
|
|
7451
7451
|
set: (b) => {
|
|
7452
7452
|
b || l("close");
|
|
@@ -7469,8 +7469,8 @@ const ti = {
|
|
|
7469
7469
|
}
|
|
7470
7470
|
S.value = "";
|
|
7471
7471
|
try {
|
|
7472
|
-
const b = await
|
|
7473
|
-
U.value = b.device_id, await
|
|
7472
|
+
const b = await V(x.value.trim());
|
|
7473
|
+
U.value = b.device_id, await T(b.device_id), h.value = 2, O();
|
|
7474
7474
|
} catch (b) {
|
|
7475
7475
|
console.error("Failed to setup email MFA:", b), S.value = b instanceof Error ? b.message : "Failed to setup email MFA";
|
|
7476
7476
|
}
|
|
@@ -7488,7 +7488,7 @@ const ti = {
|
|
|
7488
7488
|
}, k = async () => {
|
|
7489
7489
|
if (!(!U.value || D.value))
|
|
7490
7490
|
try {
|
|
7491
|
-
await
|
|
7491
|
+
await T(U.value), O();
|
|
7492
7492
|
} catch (b) {
|
|
7493
7493
|
console.warn("Failed to resend email MFA verification code:", b);
|
|
7494
7494
|
}
|
|
@@ -7499,21 +7499,21 @@ const ti = {
|
|
|
7499
7499
|
}, q = () => {
|
|
7500
7500
|
l("success");
|
|
7501
7501
|
};
|
|
7502
|
-
return (b,
|
|
7502
|
+
return (b, z) => (a(), ye(pt, {
|
|
7503
7503
|
modelValue: c.value,
|
|
7504
|
-
"onUpdate:modelValue":
|
|
7504
|
+
"onUpdate:modelValue": z[3] || (z[3] = (ae) => c.value = ae),
|
|
7505
7505
|
title: "Setup Email 2FA",
|
|
7506
7506
|
"card-class": "email-mfa-setup-modal"
|
|
7507
7507
|
}, {
|
|
7508
7508
|
default: _(() => [
|
|
7509
7509
|
h.value === 1 ? (a(), o("div", v2, [
|
|
7510
|
-
|
|
7510
|
+
z[7] || (z[7] = e("div", null, [
|
|
7511
7511
|
e("h3", { class: "email-mfa-setup-step-title" }, "Name Your Email 2FA"),
|
|
7512
7512
|
e("p", { class: "email-mfa-setup-step-description" }, ' Give this email 2FA method a memorable name (e.g., "Personal Email", "Work Email") ')
|
|
7513
7513
|
], -1)),
|
|
7514
7514
|
d(i(Fe), {
|
|
7515
7515
|
modelValue: x.value,
|
|
7516
|
-
"onUpdate:modelValue":
|
|
7516
|
+
"onUpdate:modelValue": z[0] || (z[0] = (ae) => x.value = ae),
|
|
7517
7517
|
label: "Device Name",
|
|
7518
7518
|
placeholder: "Personal Email",
|
|
7519
7519
|
error: S.value,
|
|
@@ -7523,7 +7523,7 @@ const ti = {
|
|
|
7523
7523
|
variant: "info",
|
|
7524
7524
|
title: "Email 2FA"
|
|
7525
7525
|
}, {
|
|
7526
|
-
default: _(() => [...
|
|
7526
|
+
default: _(() => [...z[4] || (z[4] = [
|
|
7527
7527
|
J(" Verification codes will be sent to your registered email address when logging in. ", -1)
|
|
7528
7528
|
])]),
|
|
7529
7529
|
_: 1
|
|
@@ -7534,7 +7534,7 @@ const ti = {
|
|
|
7534
7534
|
onClick: y,
|
|
7535
7535
|
disabled: i(w)
|
|
7536
7536
|
}, {
|
|
7537
|
-
default: _(() => [...
|
|
7537
|
+
default: _(() => [...z[5] || (z[5] = [
|
|
7538
7538
|
J(" Cancel ", -1)
|
|
7539
7539
|
])]),
|
|
7540
7540
|
_: 1
|
|
@@ -7544,7 +7544,7 @@ const ti = {
|
|
|
7544
7544
|
disabled: !x.value.trim() || i(w),
|
|
7545
7545
|
loading: i(w)
|
|
7546
7546
|
}, {
|
|
7547
|
-
default: _(() => [...
|
|
7547
|
+
default: _(() => [...z[6] || (z[6] = [
|
|
7548
7548
|
J(" Setup Email 2FA ", -1)
|
|
7549
7549
|
])]),
|
|
7550
7550
|
_: 1
|
|
@@ -7552,11 +7552,11 @@ const ti = {
|
|
|
7552
7552
|
])
|
|
7553
7553
|
])) : I("", !0),
|
|
7554
7554
|
h.value === 2 ? (a(), o("div", f2, [
|
|
7555
|
-
|
|
7555
|
+
z[10] || (z[10] = e("div", null, [
|
|
7556
7556
|
e("h3", { class: "email-mfa-setup-step-title" }, "Test Email 2FA"),
|
|
7557
7557
|
e("p", { class: "email-mfa-setup-step-description" }, " We've sent a test verification code to your email. Enter it below to complete setup. ")
|
|
7558
7558
|
], -1)),
|
|
7559
|
-
|
|
7559
|
+
z[11] || (z[11] = e("div", { class: "email-mfa-setup-success-notification" }, [
|
|
7560
7560
|
e("div", { class: "email-mfa-setup-success-content" }, [
|
|
7561
7561
|
e("svg", {
|
|
7562
7562
|
class: "email-mfa-setup-success-icon",
|
|
@@ -7577,7 +7577,7 @@ const ti = {
|
|
|
7577
7577
|
], -1)),
|
|
7578
7578
|
d(i(Fe), {
|
|
7579
7579
|
modelValue: u.value,
|
|
7580
|
-
"onUpdate:modelValue":
|
|
7580
|
+
"onUpdate:modelValue": z[1] || (z[1] = (ae) => u.value = ae),
|
|
7581
7581
|
type: "pincode",
|
|
7582
7582
|
label: "Verification Code",
|
|
7583
7583
|
"max-length": 6,
|
|
@@ -7602,10 +7602,10 @@ const ti = {
|
|
|
7602
7602
|
e("div", h2, [
|
|
7603
7603
|
d(i(ue), {
|
|
7604
7604
|
color: "secondary",
|
|
7605
|
-
onClick:
|
|
7605
|
+
onClick: z[2] || (z[2] = (ae) => h.value = 1),
|
|
7606
7606
|
disabled: i(w)
|
|
7607
7607
|
}, {
|
|
7608
|
-
default: _(() => [...
|
|
7608
|
+
default: _(() => [...z[8] || (z[8] = [
|
|
7609
7609
|
J(" Back ", -1)
|
|
7610
7610
|
])]),
|
|
7611
7611
|
_: 1
|
|
@@ -7615,7 +7615,7 @@ const ti = {
|
|
|
7615
7615
|
disabled: u.value.length !== 6 || i(w),
|
|
7616
7616
|
loading: i(w)
|
|
7617
7617
|
}, {
|
|
7618
|
-
default: _(() => [...
|
|
7618
|
+
default: _(() => [...z[9] || (z[9] = [
|
|
7619
7619
|
J(" Verify & Enable ", -1)
|
|
7620
7620
|
])]),
|
|
7621
7621
|
_: 1
|
|
@@ -7623,7 +7623,7 @@ const ti = {
|
|
|
7623
7623
|
])
|
|
7624
7624
|
])) : I("", !0),
|
|
7625
7625
|
h.value === 3 ? (a(), o("div", g2, [
|
|
7626
|
-
|
|
7626
|
+
z[13] || (z[13] = e("div", { class: "email-mfa-setup-completion" }, [
|
|
7627
7627
|
e("div", { class: "email-mfa-setup-completion-icon" }, [
|
|
7628
7628
|
e("svg", {
|
|
7629
7629
|
class: "email-mfa-setup-check-icon",
|
|
@@ -7642,7 +7642,7 @@ const ti = {
|
|
|
7642
7642
|
e("h3", { class: "email-mfa-setup-step-title" }, "Email 2FA Setup Complete!"),
|
|
7643
7643
|
e("p", { class: "email-mfa-setup-completion-description" }, " Email verification is now active for your account. You'll receive codes at your registered email address. ")
|
|
7644
7644
|
], -1)),
|
|
7645
|
-
|
|
7645
|
+
z[14] || (z[14] = e("div", { class: "email-mfa-setup-info" }, [
|
|
7646
7646
|
e("div", { class: "email-mfa-setup-info-content" }, [
|
|
7647
7647
|
e("svg", {
|
|
7648
7648
|
class: "email-mfa-setup-info-icon",
|
|
@@ -7666,7 +7666,7 @@ const ti = {
|
|
|
7666
7666
|
variant: "primary",
|
|
7667
7667
|
onClick: q
|
|
7668
7668
|
}, {
|
|
7669
|
-
default: _(() => [...
|
|
7669
|
+
default: _(() => [...z[12] || (z[12] = [
|
|
7670
7670
|
J(" Done ", -1)
|
|
7671
7671
|
])]),
|
|
7672
7672
|
_: 1
|
|
@@ -7700,7 +7700,7 @@ const ti = {
|
|
|
7700
7700
|
},
|
|
7701
7701
|
emits: ["close", "success"],
|
|
7702
7702
|
setup(s, { emit: r }) {
|
|
7703
|
-
const t = s, l = r, { loading:
|
|
7703
|
+
const t = s, l = r, { loading: V } = Tt(), { registerHardwareKey: T, completeHardwareKeyRegistration: C, currentSession: w } = ft(), c = M(!1), h = H(() => V.value || c.value), x = H(() => t.deviceType === "passkey" ? "Setup Passkey" : "Setup Hardware Key"), S = H({
|
|
7704
7704
|
get: () => t.show,
|
|
7705
7705
|
set: (b) => {
|
|
7706
7706
|
b || l("close");
|
|
@@ -7726,7 +7726,7 @@ const ti = {
|
|
|
7726
7726
|
residentKey: "discouraged",
|
|
7727
7727
|
userVerification: "discouraged"
|
|
7728
7728
|
// YubiKeys work better with discouraged
|
|
7729
|
-
}, F = (b,
|
|
7729
|
+
}, F = (b, z) => {
|
|
7730
7730
|
const ae = (ce) => {
|
|
7731
7731
|
try {
|
|
7732
7732
|
if (!ce)
|
|
@@ -7779,10 +7779,10 @@ const ti = {
|
|
|
7779
7779
|
{ type: "public-key", alg: -8 }
|
|
7780
7780
|
// EdDSA (Ed25519)
|
|
7781
7781
|
],
|
|
7782
|
-
timeout: b.timeout || (
|
|
7782
|
+
timeout: b.timeout || (z === "passkey" ? 3e5 : 12e4),
|
|
7783
7783
|
// Longer timeout for passkeys
|
|
7784
|
-
authenticatorSelection: b.authenticatorSelection || L(
|
|
7785
|
-
attestation: b.attestation || (
|
|
7784
|
+
authenticatorSelection: b.authenticatorSelection || L(z),
|
|
7785
|
+
attestation: b.attestation || (z === "passkey" ? "none" : "direct")
|
|
7786
7786
|
// Different attestation preferences
|
|
7787
7787
|
};
|
|
7788
7788
|
return b.excludeCredentials && Array.isArray(b.excludeCredentials) && b.excludeCredentials.length > 0 && (ce.excludeCredentials = b.excludeCredentials.map((Ce) => ({
|
|
@@ -7809,10 +7809,10 @@ const ti = {
|
|
|
7809
7809
|
}
|
|
7810
7810
|
if (!w.value?.accessToken)
|
|
7811
7811
|
throw new Error("Not authenticated. Please sign in again.");
|
|
7812
|
-
const { device_id: b, challenge:
|
|
7813
|
-
if (!
|
|
7812
|
+
const { device_id: b, challenge: z } = await T(m.value.trim(), w.value.accessToken);
|
|
7813
|
+
if (!z || typeof z != "object")
|
|
7814
7814
|
throw new Error("Invalid challenge received from server");
|
|
7815
|
-
const ae = F(
|
|
7815
|
+
const ae = F(z, t.deviceType);
|
|
7816
7816
|
D.value = "Please touch your hardware key now...";
|
|
7817
7817
|
const ce = await navigator.credentials.create({
|
|
7818
7818
|
publicKey: ae
|
|
@@ -7842,12 +7842,12 @@ const ti = {
|
|
|
7842
7842
|
throw new Error(`Failed to process hardware key data: ${xe instanceof Error ? xe.message : String(xe)}`);
|
|
7843
7843
|
}
|
|
7844
7844
|
} catch (b) {
|
|
7845
|
-
let
|
|
7845
|
+
let z = "Hardware key registration failed";
|
|
7846
7846
|
if (b instanceof Error) {
|
|
7847
7847
|
const ae = b.message.toLowerCase();
|
|
7848
|
-
ae.includes("not supported") || ae.includes("webauthn") ?
|
|
7848
|
+
ae.includes("not supported") || ae.includes("webauthn") ? z = "WebAuthn is not supported in this browser. Please use Chrome, Firefox, Safari, or Edge." : ae.includes("cancelled") || ae.includes("aborted") ? z = "Hardware key registration was cancelled. Please try again and touch your key when prompted." : ae.includes("timeout") ? z = "Hardware key registration timed out. Please ensure your key is connected and try again." : ae.includes("not allowed") || ae.includes("invalid state") ? z = "This hardware key may already be registered or cannot be used. Try a different key or contact support." : ae.includes("can't be used") || ae.includes("newer or different") ? z = "Your hardware key is not compatible. Please ensure you have a FIDO2/WebAuthn compatible key like YubiKey 5 Series, and that it's properly connected." : ae.includes("user verification") || ae.includes("pin") ? z = "Hardware key verification failed. If your key has a PIN, please enter it when prompted." : z = b.message;
|
|
7849
7849
|
}
|
|
7850
|
-
g.value =
|
|
7850
|
+
g.value = z, u.value = 5;
|
|
7851
7851
|
} finally {
|
|
7852
7852
|
c.value = !1;
|
|
7853
7853
|
}
|
|
@@ -7862,21 +7862,21 @@ const ti = {
|
|
|
7862
7862
|
}, q = () => {
|
|
7863
7863
|
l("success");
|
|
7864
7864
|
};
|
|
7865
|
-
return (b,
|
|
7865
|
+
return (b, z) => (a(), ye(pt, {
|
|
7866
7866
|
modelValue: S.value,
|
|
7867
|
-
"onUpdate:modelValue":
|
|
7867
|
+
"onUpdate:modelValue": z[3] || (z[3] = (ae) => S.value = ae),
|
|
7868
7868
|
title: x.value,
|
|
7869
7869
|
"card-class": "hardware-key-setup-modal"
|
|
7870
7870
|
}, {
|
|
7871
7871
|
default: _(() => [
|
|
7872
7872
|
u.value === 1 ? (a(), o("div", k2, [
|
|
7873
|
-
|
|
7873
|
+
z[6] || (z[6] = e("div", null, [
|
|
7874
7874
|
e("h3", { class: "hardware-key-setup-step-title" }, "Name Your Hardware Key"),
|
|
7875
7875
|
e("p", { class: "hardware-key-setup-step-description" }, ' Give your hardware key a memorable name (e.g., "YubiKey 5", "Work Security Key") ')
|
|
7876
7876
|
], -1)),
|
|
7877
7877
|
d(i(Fe), {
|
|
7878
7878
|
modelValue: m.value,
|
|
7879
|
-
"onUpdate:modelValue":
|
|
7879
|
+
"onUpdate:modelValue": z[0] || (z[0] = (ae) => m.value = ae),
|
|
7880
7880
|
label: "Device Name",
|
|
7881
7881
|
placeholder: "My Hardware Key",
|
|
7882
7882
|
error: U.value,
|
|
@@ -7888,7 +7888,7 @@ const ti = {
|
|
|
7888
7888
|
onClick: y,
|
|
7889
7889
|
disabled: h.value
|
|
7890
7890
|
}, {
|
|
7891
|
-
default: _(() => [...
|
|
7891
|
+
default: _(() => [...z[4] || (z[4] = [
|
|
7892
7892
|
J(" Cancel ", -1)
|
|
7893
7893
|
])]),
|
|
7894
7894
|
_: 1
|
|
@@ -7899,7 +7899,7 @@ const ti = {
|
|
|
7899
7899
|
disabled: !m.value.trim() || h.value,
|
|
7900
7900
|
loading: h.value
|
|
7901
7901
|
}, {
|
|
7902
|
-
default: _(() => [...
|
|
7902
|
+
default: _(() => [...z[5] || (z[5] = [
|
|
7903
7903
|
J(" Continue ", -1)
|
|
7904
7904
|
])]),
|
|
7905
7905
|
_: 1
|
|
@@ -7907,11 +7907,11 @@ const ti = {
|
|
|
7907
7907
|
])
|
|
7908
7908
|
])) : I("", !0),
|
|
7909
7909
|
u.value === 2 ? (a(), o("div", b2, [
|
|
7910
|
-
|
|
7910
|
+
z[17] || (z[17] = e("div", null, [
|
|
7911
7911
|
e("h3", { class: "hardware-key-setup-step-title" }, "Register Hardware Key"),
|
|
7912
7912
|
e("p", { class: "hardware-key-setup-step-description" }, " Insert your hardware key and follow your browser's prompts to complete registration. ")
|
|
7913
7913
|
], -1)),
|
|
7914
|
-
|
|
7914
|
+
z[18] || (z[18] = e("div", { class: "hardware-key-setup-illustration" }, [
|
|
7915
7915
|
e("div", { class: "hardware-key-setup-illustration-content" }, [
|
|
7916
7916
|
e("div", { class: "hardware-key-setup-icon-container" }, [
|
|
7917
7917
|
e("svg", {
|
|
@@ -7934,7 +7934,7 @@ const ti = {
|
|
|
7934
7934
|
], -1)),
|
|
7935
7935
|
e("div", M2, [
|
|
7936
7936
|
e("div", x2, [
|
|
7937
|
-
|
|
7937
|
+
z[14] || (z[14] = e("svg", {
|
|
7938
7938
|
class: "hardware-key-setup-info-icon",
|
|
7939
7939
|
fill: "currentColor",
|
|
7940
7940
|
viewBox: "0 0 20 20"
|
|
@@ -7946,16 +7946,16 @@ const ti = {
|
|
|
7946
7946
|
})
|
|
7947
7947
|
], -1)),
|
|
7948
7948
|
e("div", null, [
|
|
7949
|
-
|
|
7949
|
+
z[13] || (z[13] = e("p", { class: "hardware-key-setup-instructions-title" }, "Setup Instructions", -1)),
|
|
7950
7950
|
e("ul", $2, [
|
|
7951
7951
|
t.deviceType === "passkey" ? (a(), o(De, { key: 0 }, [
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7952
|
+
z[7] || (z[7] = e("li", null, "• Your browser will prompt you to create a passkey", -1)),
|
|
7953
|
+
z[8] || (z[8] = e("li", null, "• Use Touch ID, Face ID, Windows Hello, or PIN", -1)),
|
|
7954
|
+
z[9] || (z[9] = e("li", null, "• Follow the prompts to complete setup", -1))
|
|
7955
7955
|
], 64)) : (a(), o(De, { key: 1 }, [
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7956
|
+
z[10] || (z[10] = e("li", null, "• Insert your hardware key into a USB port", -1)),
|
|
7957
|
+
z[11] || (z[11] = e("li", null, "• Your browser will prompt you to interact with the key", -1)),
|
|
7958
|
+
z[12] || (z[12] = e("li", null, "• Touch the key's button or sensor when prompted", -1))
|
|
7959
7959
|
], 64))
|
|
7960
7960
|
])
|
|
7961
7961
|
])
|
|
@@ -7964,10 +7964,10 @@ const ti = {
|
|
|
7964
7964
|
e("div", S2, [
|
|
7965
7965
|
d(i(ue), {
|
|
7966
7966
|
variant: "secondary",
|
|
7967
|
-
onClick:
|
|
7967
|
+
onClick: z[1] || (z[1] = (ae) => u.value = 1),
|
|
7968
7968
|
disabled: h.value
|
|
7969
7969
|
}, {
|
|
7970
|
-
default: _(() => [...
|
|
7970
|
+
default: _(() => [...z[15] || (z[15] = [
|
|
7971
7971
|
J(" Back ", -1)
|
|
7972
7972
|
])]),
|
|
7973
7973
|
_: 1
|
|
@@ -7978,7 +7978,7 @@ const ti = {
|
|
|
7978
7978
|
disabled: h.value,
|
|
7979
7979
|
loading: h.value
|
|
7980
7980
|
}, {
|
|
7981
|
-
default: _(() => [...
|
|
7981
|
+
default: _(() => [...z[16] || (z[16] = [
|
|
7982
7982
|
J(" Register Key ", -1)
|
|
7983
7983
|
])]),
|
|
7984
7984
|
_: 1
|
|
@@ -7993,10 +7993,10 @@ const ti = {
|
|
|
7993
7993
|
class: "hardware-key-setup-loader"
|
|
7994
7994
|
})
|
|
7995
7995
|
]),
|
|
7996
|
-
|
|
7996
|
+
z[19] || (z[19] = e("h3", { class: "hardware-key-setup-step-title" }, "Registering Hardware Key", -1)),
|
|
7997
7997
|
e("p", z2, R(D.value), 1)
|
|
7998
7998
|
]),
|
|
7999
|
-
|
|
7999
|
+
z[20] || (z[20] = e("div", { class: "hardware-key-setup-progress-indicator" }, [
|
|
8000
8000
|
e("div", { class: "hardware-key-setup-progress-content" }, [
|
|
8001
8001
|
e("div", { class: "hardware-key-setup-progress-check" }, [
|
|
8002
8002
|
e("div", { class: "hardware-key-setup-check-icon" }, [
|
|
@@ -8020,7 +8020,7 @@ const ti = {
|
|
|
8020
8020
|
], -1))
|
|
8021
8021
|
])) : I("", !0),
|
|
8022
8022
|
u.value === 4 ? (a(), o("div", V2, [
|
|
8023
|
-
|
|
8023
|
+
z[24] || (z[24] = e("div", { class: "hardware-key-setup-success" }, [
|
|
8024
8024
|
e("div", { class: "hardware-key-setup-success-icon" }, [
|
|
8025
8025
|
e("svg", {
|
|
8026
8026
|
class: "hardware-key-setup-success-check",
|
|
@@ -8040,7 +8040,7 @@ const ti = {
|
|
|
8040
8040
|
e("p", { class: "hardware-key-setup-success-message" }, " Your hardware key is now active for two-factor authentication. ")
|
|
8041
8041
|
], -1)),
|
|
8042
8042
|
e("div", I2, [
|
|
8043
|
-
|
|
8043
|
+
z[22] || (z[22] = e("div", { class: "hardware-key-setup-backup-codes-header" }, [
|
|
8044
8044
|
e("svg", {
|
|
8045
8045
|
class: "hardware-key-setup-warning-icon",
|
|
8046
8046
|
fill: "currentColor",
|
|
@@ -8071,7 +8071,7 @@ const ti = {
|
|
|
8071
8071
|
size: "sm",
|
|
8072
8072
|
onClick: O
|
|
8073
8073
|
}, {
|
|
8074
|
-
default: _(() => [...
|
|
8074
|
+
default: _(() => [...z[21] || (z[21] = [
|
|
8075
8075
|
J(" 📋 Copy Codes ", -1)
|
|
8076
8076
|
])]),
|
|
8077
8077
|
_: 1
|
|
@@ -8083,7 +8083,7 @@ const ti = {
|
|
|
8083
8083
|
variant: "primary",
|
|
8084
8084
|
onClick: q
|
|
8085
8085
|
}, {
|
|
8086
|
-
default: _(() => [...
|
|
8086
|
+
default: _(() => [...z[23] || (z[23] = [
|
|
8087
8087
|
J(" Done ", -1)
|
|
8088
8088
|
])]),
|
|
8089
8089
|
_: 1
|
|
@@ -8092,7 +8092,7 @@ const ti = {
|
|
|
8092
8092
|
])) : I("", !0),
|
|
8093
8093
|
u.value === 5 ? (a(), o("div", D2, [
|
|
8094
8094
|
e("div", N2, [
|
|
8095
|
-
|
|
8095
|
+
z[25] || (z[25] = e("div", { class: "hardware-key-setup-error-icon" }, [
|
|
8096
8096
|
e("svg", {
|
|
8097
8097
|
class: "hardware-key-setup-error-x",
|
|
8098
8098
|
fill: "none",
|
|
@@ -8107,15 +8107,15 @@ const ti = {
|
|
|
8107
8107
|
})
|
|
8108
8108
|
])
|
|
8109
8109
|
], -1)),
|
|
8110
|
-
|
|
8110
|
+
z[26] || (z[26] = e("h3", { class: "hardware-key-setup-step-title" }, "Registration Failed", -1)),
|
|
8111
8111
|
e("p", B2, R(g.value), 1)
|
|
8112
8112
|
]),
|
|
8113
8113
|
e("div", P2, [
|
|
8114
8114
|
d(i(ue), {
|
|
8115
8115
|
variant: "secondary",
|
|
8116
|
-
onClick:
|
|
8116
|
+
onClick: z[2] || (z[2] = (ae) => u.value = 1)
|
|
8117
8117
|
}, {
|
|
8118
|
-
default: _(() => [...
|
|
8118
|
+
default: _(() => [...z[27] || (z[27] = [
|
|
8119
8119
|
J(" Start Over ", -1)
|
|
8120
8120
|
])]),
|
|
8121
8121
|
_: 1
|
|
@@ -8124,7 +8124,7 @@ const ti = {
|
|
|
8124
8124
|
variant: "primary",
|
|
8125
8125
|
onClick: y
|
|
8126
8126
|
}, {
|
|
8127
|
-
default: _(() => [...
|
|
8127
|
+
default: _(() => [...z[28] || (z[28] = [
|
|
8128
8128
|
J(" Close ", -1)
|
|
8129
8129
|
])]),
|
|
8130
8130
|
_: 1
|
|
@@ -8155,7 +8155,7 @@ const ti = {
|
|
|
8155
8155
|
},
|
|
8156
8156
|
emits: ["close"],
|
|
8157
8157
|
setup(s, { emit: r }) {
|
|
8158
|
-
const t = s, l = r, { regenerateBackupCodes:
|
|
8158
|
+
const t = s, l = r, { regenerateBackupCodes: V, loading: T, getDeviceTypeName: C } = Tt(), w = H({
|
|
8159
8159
|
get: () => t.show,
|
|
8160
8160
|
set: (D) => {
|
|
8161
8161
|
D || l("close");
|
|
@@ -8173,7 +8173,7 @@ const ti = {
|
|
|
8173
8173
|
}, u = async () => {
|
|
8174
8174
|
if (t.device)
|
|
8175
8175
|
try {
|
|
8176
|
-
const D = await
|
|
8176
|
+
const D = await V(t.device.id);
|
|
8177
8177
|
c.value = D.backup_codes, h.value = !1;
|
|
8178
8178
|
} catch (D) {
|
|
8179
8179
|
console.error("Failed to regenerate backup codes:", D);
|
|
@@ -8217,7 +8217,7 @@ const ti = {
|
|
|
8217
8217
|
"card-class": "backup-codes-modal"
|
|
8218
8218
|
}, {
|
|
8219
8219
|
default: _(() => [
|
|
8220
|
-
i(
|
|
8220
|
+
i(T) ? (a(), o("div", R2, [
|
|
8221
8221
|
d(i(ht), { size: 24 }),
|
|
8222
8222
|
g[2] || (g[2] = e("span", { class: "backup-codes-loading-text" }, "Loading backup codes...", -1))
|
|
8223
8223
|
])) : (a(), o("div", F2, [
|
|
@@ -8292,8 +8292,8 @@ const ti = {
|
|
|
8292
8292
|
d(i(ue), {
|
|
8293
8293
|
variant: "secondary",
|
|
8294
8294
|
onClick: S,
|
|
8295
|
-
disabled: i(
|
|
8296
|
-
loading: i(
|
|
8295
|
+
disabled: i(T),
|
|
8296
|
+
loading: i(T)
|
|
8297
8297
|
}, {
|
|
8298
8298
|
default: _(() => [...g[7] || (g[7] = [
|
|
8299
8299
|
J(" 🔄 Regenerate Codes ", -1)
|
|
@@ -8332,8 +8332,8 @@ const ti = {
|
|
|
8332
8332
|
variant: "primary",
|
|
8333
8333
|
size: "sm",
|
|
8334
8334
|
onClick: u,
|
|
8335
|
-
disabled: i(
|
|
8336
|
-
loading: i(
|
|
8335
|
+
disabled: i(T),
|
|
8336
|
+
loading: i(T)
|
|
8337
8337
|
}, {
|
|
8338
8338
|
default: _(() => [...g[9] || (g[9] = [
|
|
8339
8339
|
J(" Yes, Regenerate ", -1)
|
|
@@ -8372,20 +8372,20 @@ const ti = {
|
|
|
8372
8372
|
},
|
|
8373
8373
|
emits: ["confirm", "cancel"],
|
|
8374
8374
|
setup(s, { emit: r }) {
|
|
8375
|
-
const t = s, l = r,
|
|
8375
|
+
const t = s, l = r, V = M(!1), T = H({
|
|
8376
8376
|
get: () => t.show,
|
|
8377
8377
|
set: (c) => {
|
|
8378
8378
|
c || l("cancel");
|
|
8379
8379
|
}
|
|
8380
8380
|
}), C = () => {
|
|
8381
|
-
|
|
8381
|
+
V.value = !0, l("confirm");
|
|
8382
8382
|
}, w = () => {
|
|
8383
8383
|
l("cancel");
|
|
8384
8384
|
};
|
|
8385
8385
|
return (c, h) => (a(), o("div", n3, [
|
|
8386
8386
|
d(pt, {
|
|
8387
|
-
modelValue:
|
|
8388
|
-
"onUpdate:modelValue": h[0] || (h[0] = (x) =>
|
|
8387
|
+
modelValue: T.value,
|
|
8388
|
+
"onUpdate:modelValue": h[0] || (h[0] = (x) => T.value = x),
|
|
8389
8389
|
"card-class": "confirm-modal"
|
|
8390
8390
|
}, {
|
|
8391
8391
|
header: _(() => [
|
|
@@ -8397,7 +8397,7 @@ const ti = {
|
|
|
8397
8397
|
d(i(ue), {
|
|
8398
8398
|
variant: "secondary",
|
|
8399
8399
|
onClick: w,
|
|
8400
|
-
disabled:
|
|
8400
|
+
disabled: V.value
|
|
8401
8401
|
}, {
|
|
8402
8402
|
default: _(() => [
|
|
8403
8403
|
J(R(s.cancelText), 1)
|
|
@@ -8407,8 +8407,8 @@ const ti = {
|
|
|
8407
8407
|
d(i(ue), {
|
|
8408
8408
|
variant: s.variant,
|
|
8409
8409
|
onClick: C,
|
|
8410
|
-
disabled:
|
|
8411
|
-
loading:
|
|
8410
|
+
disabled: V.value,
|
|
8411
|
+
loading: V.value
|
|
8412
8412
|
}, {
|
|
8413
8413
|
default: _(() => [
|
|
8414
8414
|
J(R(s.confirmText), 1)
|
|
@@ -8459,8 +8459,8 @@ const ti = {
|
|
|
8459
8459
|
emits: ["update:modelValue", "mfa-updated"],
|
|
8460
8460
|
setup(s, { emit: r }) {
|
|
8461
8461
|
const t = s, l = r, {
|
|
8462
|
-
mfaEnabled:
|
|
8463
|
-
loading:
|
|
8462
|
+
mfaEnabled: V,
|
|
8463
|
+
loading: T,
|
|
8464
8464
|
activeMfaDevices: C,
|
|
8465
8465
|
fetchMfaDevices: w,
|
|
8466
8466
|
disableMfaDevice: c,
|
|
@@ -8542,7 +8542,7 @@ const ti = {
|
|
|
8542
8542
|
} finally {
|
|
8543
8543
|
N[be.id] = !1;
|
|
8544
8544
|
}
|
|
8545
|
-
},
|
|
8545
|
+
}, z = async (be) => {
|
|
8546
8546
|
try {
|
|
8547
8547
|
y[be.id] = !0, await c(be.id), await w(), l("mfa-updated");
|
|
8548
8548
|
} catch (ne) {
|
|
@@ -8577,7 +8577,7 @@ const ti = {
|
|
|
8577
8577
|
}, {
|
|
8578
8578
|
default: _(() => [
|
|
8579
8579
|
e("div", v3, [
|
|
8580
|
-
i(
|
|
8580
|
+
i(T) ? (a(), o("div", p3, [
|
|
8581
8581
|
d(i(ht), { size: 32 }),
|
|
8582
8582
|
ne[11] || (ne[11] = e("span", { class: "mfa-loading-text" }, "Loading MFA settings...", -1))
|
|
8583
8583
|
])) : (a(), o("div", f3, [
|
|
@@ -8585,10 +8585,10 @@ const ti = {
|
|
|
8585
8585
|
e("div", h3, [
|
|
8586
8586
|
e("div", null, [
|
|
8587
8587
|
ne[12] || (ne[12] = e("h3", { class: "mfa-status-title" }, "Two-Factor Authentication", -1)),
|
|
8588
|
-
e("p", g3, R(i(
|
|
8588
|
+
e("p", g3, R(i(V) ? "Enabled" : "Add extra security to your account"), 1)
|
|
8589
8589
|
]),
|
|
8590
8590
|
e("div", C3, [
|
|
8591
|
-
i(
|
|
8591
|
+
i(V) ? (a(), o("span", y3, [
|
|
8592
8592
|
d(U, {
|
|
8593
8593
|
size: 12,
|
|
8594
8594
|
class: "mfa-badge-icon"
|
|
@@ -8756,7 +8756,7 @@ const ti = {
|
|
|
8756
8756
|
message: `Are you sure you want to remove this ${Ae(Z.device_type).toLowerCase()}? You will no longer be able to use it for authentication.`,
|
|
8757
8757
|
"confirm-text": "Remove Device",
|
|
8758
8758
|
"confirm-variant": "danger",
|
|
8759
|
-
onConfirm: (ie) =>
|
|
8759
|
+
onConfirm: (ie) => z(Z)
|
|
8760
8760
|
}, {
|
|
8761
8761
|
trigger: _(() => [
|
|
8762
8762
|
d(i(ue), {
|
|
@@ -8860,7 +8860,7 @@ const ti = {
|
|
|
8860
8860
|
},
|
|
8861
8861
|
emits: ["close", "settings-updated"],
|
|
8862
8862
|
setup(s, { emit: r }) {
|
|
8863
|
-
const t = r, { currentUser: l, updateUserSettings:
|
|
8863
|
+
const t = r, { currentUser: l, updateUserSettings: V } = ft(), T = M(!1), C = M(null), w = Ge({
|
|
8864
8864
|
levelUpSounds: l.value?.settings?.levelUpSounds ?? !0,
|
|
8865
8865
|
milestoneSounds: l.value?.settings?.milestoneSounds ?? !0
|
|
8866
8866
|
});
|
|
@@ -8878,17 +8878,17 @@ const ti = {
|
|
|
8878
8878
|
C.value === "milestone" && (C.value = null);
|
|
8879
8879
|
}, 2500));
|
|
8880
8880
|
}, S = async (u) => {
|
|
8881
|
-
if (!
|
|
8882
|
-
|
|
8881
|
+
if (!T.value) {
|
|
8882
|
+
T.value = !0;
|
|
8883
8883
|
try {
|
|
8884
|
-
await
|
|
8884
|
+
await V({
|
|
8885
8885
|
...l.value?.settings,
|
|
8886
8886
|
...w
|
|
8887
8887
|
}), t("settings-updated", { ...w });
|
|
8888
8888
|
} catch (m) {
|
|
8889
8889
|
console.warn("Failed to save settings:", m);
|
|
8890
8890
|
} finally {
|
|
8891
|
-
|
|
8891
|
+
T.value = !1, u();
|
|
8892
8892
|
}
|
|
8893
8893
|
}
|
|
8894
8894
|
};
|
|
@@ -8912,10 +8912,10 @@ const ti = {
|
|
|
8912
8912
|
d(lt, {
|
|
8913
8913
|
variant: "primary",
|
|
8914
8914
|
onClick: (D) => S(U),
|
|
8915
|
-
loading:
|
|
8915
|
+
loading: T.value
|
|
8916
8916
|
}, {
|
|
8917
8917
|
default: _(() => [
|
|
8918
|
-
J(R(
|
|
8918
|
+
J(R(T.value ? "Saving..." : "Save Settings"), 1)
|
|
8919
8919
|
]),
|
|
8920
8920
|
_: 1
|
|
8921
8921
|
}, 8, ["onClick", "loading"])
|
|
@@ -9057,7 +9057,7 @@ const ti = {
|
|
|
9057
9057
|
},
|
|
9058
9058
|
emits: ["update:modelValue", "sessions-updated"],
|
|
9059
9059
|
setup(s, { emit: r }) {
|
|
9060
|
-
const t = s, l = r, { getUserSessions:
|
|
9060
|
+
const t = s, l = r, { getUserSessions: V, revokeSession: T, revokeAllOtherSessions: C } = ft(), w = {
|
|
9061
9061
|
props: ["size"],
|
|
9062
9062
|
render() {
|
|
9063
9063
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -9103,18 +9103,18 @@ const ti = {
|
|
|
9103
9103
|
}
|
|
9104
9104
|
}, u = M([]), m = M(null), U = M(!1), D = M(null), g = Ge({}), N = M(!1), y = H({
|
|
9105
9105
|
get: () => t.modelValue || !1,
|
|
9106
|
-
set: (
|
|
9106
|
+
set: (z) => l("update:modelValue", z)
|
|
9107
9107
|
});
|
|
9108
|
-
Le(() => y.value, (
|
|
9109
|
-
|
|
9108
|
+
Le(() => y.value, (z) => {
|
|
9109
|
+
z && L();
|
|
9110
9110
|
}), Ye(() => {
|
|
9111
9111
|
(typeof t.modelValue > "u" || t.modelValue) && L();
|
|
9112
9112
|
});
|
|
9113
9113
|
const L = async () => {
|
|
9114
9114
|
U.value = !0, D.value = null;
|
|
9115
9115
|
try {
|
|
9116
|
-
const
|
|
9117
|
-
if (u.value =
|
|
9116
|
+
const z = await V();
|
|
9117
|
+
if (u.value = z || [], u.value.length > 0) {
|
|
9118
9118
|
const ae = u.value.filter((Ce) => Ce.is_current || Ce.last_activity_at), ce = [...new Set(u.value.map((Ce) => O(Ce)).filter(Boolean))];
|
|
9119
9119
|
m.value = {
|
|
9120
9120
|
total_sessions: u.value.length,
|
|
@@ -9123,48 +9123,48 @@ const ti = {
|
|
|
9123
9123
|
};
|
|
9124
9124
|
} else
|
|
9125
9125
|
m.value = null;
|
|
9126
|
-
} catch (
|
|
9127
|
-
D.value =
|
|
9126
|
+
} catch (z) {
|
|
9127
|
+
D.value = z instanceof Error ? z.message : "Failed to load sessions", console.error("Failed to load sessions:", z);
|
|
9128
9128
|
} finally {
|
|
9129
9129
|
U.value = !1;
|
|
9130
9130
|
}
|
|
9131
|
-
}, F = async (
|
|
9132
|
-
g[
|
|
9131
|
+
}, F = async (z) => {
|
|
9132
|
+
g[z] = !0;
|
|
9133
9133
|
try {
|
|
9134
|
-
await
|
|
9134
|
+
await T(z), await L(), l("sessions-updated");
|
|
9135
9135
|
} catch (ae) {
|
|
9136
9136
|
console.error("Failed to revoke session:", ae), D.value = ae instanceof Error ? ae.message : "Failed to revoke session";
|
|
9137
9137
|
} finally {
|
|
9138
|
-
g[
|
|
9138
|
+
g[z] = !1;
|
|
9139
9139
|
}
|
|
9140
9140
|
}, $ = async () => {
|
|
9141
9141
|
N.value = !0;
|
|
9142
9142
|
try {
|
|
9143
9143
|
await C(), await L(), l("sessions-updated");
|
|
9144
|
-
} catch (
|
|
9145
|
-
console.error("Failed to revoke all other sessions:",
|
|
9144
|
+
} catch (z) {
|
|
9145
|
+
console.error("Failed to revoke all other sessions:", z), D.value = z instanceof Error ? z.message : "Failed to revoke sessions";
|
|
9146
9146
|
} finally {
|
|
9147
9147
|
N.value = !1;
|
|
9148
9148
|
}
|
|
9149
|
-
}, k = (
|
|
9150
|
-
if (
|
|
9151
|
-
const ae =
|
|
9149
|
+
}, k = (z) => {
|
|
9150
|
+
if (z.device_name) return z.device_name;
|
|
9151
|
+
const ae = z.user_agent || "";
|
|
9152
9152
|
return ae.includes("Mobile") || ae.includes("Android") || ae.includes("iPhone") ? "Mobile Device" : ae.includes("iPad") ? "iPad" : ae.includes("Mac") ? "Mac" : ae.includes("Windows") ? "Windows PC" : ae.includes("Linux") ? "Linux" : "Unknown Device";
|
|
9153
|
-
}, O = (
|
|
9153
|
+
}, O = (z) => {
|
|
9154
9154
|
const ae = [];
|
|
9155
|
-
return
|
|
9156
|
-
}, q = (
|
|
9157
|
-
if (!
|
|
9158
|
-
const ae = new Date(
|
|
9155
|
+
return z.city && ae.push(z.city), z.region && ae.push(z.region), z.country && ae.push(z.country), ae.length > 0 ? ae.join(", ") : z.ip_address || "Unknown Location";
|
|
9156
|
+
}, q = (z) => {
|
|
9157
|
+
if (!z) return "Unknown";
|
|
9158
|
+
const ae = new Date(z), Ce = (/* @__PURE__ */ new Date()).getTime() - ae.getTime(), xe = Math.floor(Ce / (1e3 * 60)), Ae = Math.floor(Ce / (1e3 * 60 * 60)), Se = Math.floor(Ce / (1e3 * 60 * 60 * 24));
|
|
9159
9159
|
return xe < 1 ? "Just now" : xe < 60 ? `${xe}m ago` : Ae < 24 ? `${Ae}h ago` : Se < 7 ? `${Se}d ago` : Se < 30 ? `${Math.floor(Se / 7)}w ago` : Se < 365 ? `${Math.floor(Se / 30)}mo ago` : `${Math.floor(Se / 365)}y ago`;
|
|
9160
|
-
}, b = (
|
|
9160
|
+
}, b = (z) => z ? new Date(z).toLocaleDateString(void 0, {
|
|
9161
9161
|
year: "numeric",
|
|
9162
9162
|
month: "short",
|
|
9163
9163
|
day: "numeric",
|
|
9164
9164
|
hour: "2-digit",
|
|
9165
9165
|
minute: "2-digit"
|
|
9166
9166
|
}) : "Unknown";
|
|
9167
|
-
return (
|
|
9167
|
+
return (z, ae) => (a(), ye(i(pt), {
|
|
9168
9168
|
modelValue: y.value,
|
|
9169
9169
|
"onUpdate:modelValue": ae[0] || (ae[0] = (ce) => y.value = ce),
|
|
9170
9170
|
title: "Active Sessions",
|
|
@@ -9377,7 +9377,7 @@ const ti = {
|
|
|
9377
9377
|
oe("polyline", { points: "22,6 12,13 2,6" })
|
|
9378
9378
|
]);
|
|
9379
9379
|
}
|
|
9380
|
-
},
|
|
9380
|
+
}, V = {
|
|
9381
9381
|
props: ["size"],
|
|
9382
9382
|
render() {
|
|
9383
9383
|
return oe("svg", {
|
|
@@ -9391,7 +9391,7 @@ const ti = {
|
|
|
9391
9391
|
oe("circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
9392
9392
|
]);
|
|
9393
9393
|
}
|
|
9394
|
-
},
|
|
9394
|
+
}, T = s, C = r, { getSupportEmail: w, getUrl: c } = vt(T.config), { fetchProfile: h, updateProfile: x, changeEmail: S, changeUsername: u, getUsernameCooldown: m, checkUsernameAvailability: U, getUserSessions: D, currentUser: g, currentSession: N, isAuthenticated: y, refreshToken: L, signOut: F } = ft(), { activeMfaDevices: $, fetchMfaDevices: k } = Tt(), O = M(null), q = M(!1), b = H(() => g.value || T.user || O.value), z = M(!1), ae = M(!1), ce = M(!1), Ce = M(!1), xe = M(!1), Ae = M(!1), Se = M(!1), be = M(!1), ne = M(!1), W = M(!1), Z = M(!1), ie = M(null), te = M(""), Y = M(""), le = M([]), _e = M(!1), Te = Ge({
|
|
9395
9395
|
canChange: !0,
|
|
9396
9396
|
cooldownEnd: null,
|
|
9397
9397
|
daysRemaining: 0
|
|
@@ -9474,7 +9474,7 @@ const ti = {
|
|
|
9474
9474
|
type: "hardware",
|
|
9475
9475
|
count: we,
|
|
9476
9476
|
label: we === 1 ? "Key" : "Keys",
|
|
9477
|
-
icon:
|
|
9477
|
+
icon: V,
|
|
9478
9478
|
color: "chip-purple"
|
|
9479
9479
|
});
|
|
9480
9480
|
}
|
|
@@ -9504,7 +9504,7 @@ const ti = {
|
|
|
9504
9504
|
return Ut.value - ea.value - X;
|
|
9505
9505
|
});
|
|
9506
9506
|
const ta = (X, P) => !X && !P ? "U" : `${X?.[0] || ""}${P?.[0] || ""}`.toUpperCase(), Ct = async () => {
|
|
9507
|
-
if (!(!
|
|
9507
|
+
if (!(!T.autoFetch || T.user || !y.value)) {
|
|
9508
9508
|
q.value = !0;
|
|
9509
9509
|
try {
|
|
9510
9510
|
await h(), y.value && await k();
|
|
@@ -9547,7 +9547,7 @@ const ti = {
|
|
|
9547
9547
|
he[X] = "";
|
|
9548
9548
|
});
|
|
9549
9549
|
}, zt = async () => {
|
|
9550
|
-
it(),
|
|
9550
|
+
it(), z.value = !0;
|
|
9551
9551
|
try {
|
|
9552
9552
|
const X = await x({
|
|
9553
9553
|
firstName: re.firstName,
|
|
@@ -9559,17 +9559,17 @@ const ti = {
|
|
|
9559
9559
|
const P = X instanceof Error ? X.message : "Failed to update profile";
|
|
9560
9560
|
Y.value = P, C("error", P);
|
|
9561
9561
|
} finally {
|
|
9562
|
-
|
|
9562
|
+
z.value = !1;
|
|
9563
9563
|
}
|
|
9564
9564
|
}, Vt = async () => {
|
|
9565
9565
|
if (fe.value) {
|
|
9566
|
-
it(),
|
|
9566
|
+
it(), z.value = !0;
|
|
9567
9567
|
try {
|
|
9568
9568
|
await new Promise((X) => setTimeout(X, 1e3)), te.value = "Password updated successfully", Ce.value = !1, Ie.current = "", Ie.new = "", Ie.confirm = "";
|
|
9569
9569
|
} catch (X) {
|
|
9570
9570
|
console.error("Failed to update password:", X), Y.value = "Failed to update password";
|
|
9571
9571
|
} finally {
|
|
9572
|
-
|
|
9572
|
+
z.value = !1;
|
|
9573
9573
|
}
|
|
9574
9574
|
}
|
|
9575
9575
|
}, It = async () => {
|
|
@@ -9826,7 +9826,7 @@ const ti = {
|
|
|
9826
9826
|
label: "First name",
|
|
9827
9827
|
placeholder: "Enter your first name",
|
|
9828
9828
|
autocomplete: "given-name",
|
|
9829
|
-
disabled:
|
|
9829
|
+
disabled: z.value || q.value,
|
|
9830
9830
|
error: he.firstName
|
|
9831
9831
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
9832
9832
|
d(i(Fe), {
|
|
@@ -9837,7 +9837,7 @@ const ti = {
|
|
|
9837
9837
|
label: "Last name",
|
|
9838
9838
|
placeholder: "Enter your last name",
|
|
9839
9839
|
autocomplete: "family-name",
|
|
9840
|
-
disabled:
|
|
9840
|
+
disabled: z.value || q.value,
|
|
9841
9841
|
error: he.lastName
|
|
9842
9842
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
9843
9843
|
e("div", l0, [
|
|
@@ -10063,18 +10063,18 @@ const ti = {
|
|
|
10063
10063
|
Q.value ? (a(), o("div", T0, [
|
|
10064
10064
|
d(i(ue), {
|
|
10065
10065
|
type: "submit",
|
|
10066
|
-
disabled:
|
|
10067
|
-
loading:
|
|
10066
|
+
disabled: z.value,
|
|
10067
|
+
loading: z.value
|
|
10068
10068
|
}, {
|
|
10069
10069
|
default: _(() => [
|
|
10070
|
-
J(R(
|
|
10070
|
+
J(R(z.value ? "Saving changes..." : "Save changes"), 1)
|
|
10071
10071
|
]),
|
|
10072
10072
|
_: 1
|
|
10073
10073
|
}, 8, ["disabled", "loading"]),
|
|
10074
10074
|
d(i(ue), {
|
|
10075
10075
|
color: "secondary",
|
|
10076
10076
|
onClick: ra,
|
|
10077
|
-
disabled:
|
|
10077
|
+
disabled: z.value
|
|
10078
10078
|
}, {
|
|
10079
10079
|
default: _(() => [...P[24] || (P[24] = [
|
|
10080
10080
|
J(" Cancel ", -1)
|
|
@@ -10120,7 +10120,7 @@ const ti = {
|
|
|
10120
10120
|
])
|
|
10121
10121
|
])) : I("", !0),
|
|
10122
10122
|
d(Lt, {
|
|
10123
|
-
config:
|
|
10123
|
+
config: T.config
|
|
10124
10124
|
}, {
|
|
10125
10125
|
default: _(() => [
|
|
10126
10126
|
e("div", N0, [
|
|
@@ -10244,16 +10244,16 @@ const ti = {
|
|
|
10244
10244
|
},
|
|
10245
10245
|
emits: ["success", "error", "back-to-signin"],
|
|
10246
10246
|
setup(s, { emit: r }) {
|
|
10247
|
-
const t = s, l = r, { getSupportEmail:
|
|
10247
|
+
const t = s, l = r, { getSupportEmail: V } = vt(t.config), T = M(!1), C = M(""), w = M(!1), c = Ge({
|
|
10248
10248
|
email: ""
|
|
10249
10249
|
}), h = async () => {
|
|
10250
|
-
|
|
10250
|
+
T.value = !0, C.value = "";
|
|
10251
10251
|
try {
|
|
10252
10252
|
await new Promise((x) => setTimeout(x, 1e3)), w.value = !0, l("success", c.email);
|
|
10253
10253
|
} catch {
|
|
10254
10254
|
C.value = "Failed to send password reset email. Please try again.", l("error", C.value);
|
|
10255
10255
|
} finally {
|
|
10256
|
-
|
|
10256
|
+
T.value = !1;
|
|
10257
10257
|
}
|
|
10258
10258
|
};
|
|
10259
10259
|
return (x, S) => (a(), o("div", Z0, [
|
|
@@ -10280,15 +10280,15 @@ const ti = {
|
|
|
10280
10280
|
placeholder: "Enter your email address",
|
|
10281
10281
|
autocomplete: "email",
|
|
10282
10282
|
required: "",
|
|
10283
|
-
disabled:
|
|
10283
|
+
disabled: T.value || w.value,
|
|
10284
10284
|
error: C.value ? "Email address not found" : void 0
|
|
10285
10285
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
10286
10286
|
d(i(ue), {
|
|
10287
10287
|
type: "submit",
|
|
10288
10288
|
variant: "primary",
|
|
10289
10289
|
"full-width": "",
|
|
10290
|
-
disabled:
|
|
10291
|
-
loading:
|
|
10290
|
+
disabled: T.value || !c.email.trim() || w.value,
|
|
10291
|
+
loading: T.value,
|
|
10292
10292
|
"loading-text": "Sending link..."
|
|
10293
10293
|
}, {
|
|
10294
10294
|
default: _(() => [
|
|
@@ -10339,12 +10339,12 @@ const ti = {
|
|
|
10339
10339
|
config: t.config
|
|
10340
10340
|
}, {
|
|
10341
10341
|
default: _(() => [
|
|
10342
|
-
i(
|
|
10342
|
+
i(V)() ? (a(), o("div", Y0, [
|
|
10343
10343
|
e("p", W0, [
|
|
10344
10344
|
S[5] || (S[5] = J(" Need help? ", -1)),
|
|
10345
10345
|
d(i(mt), {
|
|
10346
10346
|
variant: "primary",
|
|
10347
|
-
href: `mailto:${i(
|
|
10347
|
+
href: `mailto:${i(V)()}`
|
|
10348
10348
|
}, {
|
|
10349
10349
|
default: _(() => [...S[4] || (S[4] = [
|
|
10350
10350
|
J(" Contact Support ", -1)
|
|
@@ -10376,9 +10376,9 @@ const ti = {
|
|
|
10376
10376
|
},
|
|
10377
10377
|
emits: ["sign-in-required"],
|
|
10378
10378
|
setup(s, { emit: r }) {
|
|
10379
|
-
const t = r, l = M(!1), { isAuthenticated:
|
|
10379
|
+
const t = r, l = M(!1), { isAuthenticated: V, isInitializing: T, user: C, signOut: w, initialize: c } = ft(), h = H(() => (console.log("[SignedIn] isLoading check:", { isInitializing: T.value, isReady: l.value }), T.value || !l.value)), x = H(() => !h.value && V.value), S = H(() => !h.value && !V.value);
|
|
10380
10380
|
Ye(async () => {
|
|
10381
|
-
await c(), l.value = !0;
|
|
10381
|
+
console.log("[SignedIn] onMounted - calling initialize()"), await c(), console.log("[SignedIn] initialize() completed, isInitializing:", T.value), l.value = !0, console.log("[SignedIn] isReady set to true");
|
|
10382
10382
|
});
|
|
10383
10383
|
const u = () => {
|
|
10384
10384
|
t("sign-in-required");
|
|
@@ -10394,7 +10394,7 @@ const ti = {
|
|
|
10394
10394
|
], 2)) : S.value && s.showFallback ? (a(), o("div", X0, [
|
|
10395
10395
|
Pe(m.$slots, "fallback", { signIn: u }, () => [
|
|
10396
10396
|
e("div", { class: "signed-in-fallback" }, [
|
|
10397
|
-
U[0] || (U[0] = Qt('<div class="signed-in-icon-container" data-v-
|
|
10397
|
+
U[0] || (U[0] = Qt('<div class="signed-in-icon-container" data-v-58af2734><svg class="signed-in-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-58af2734><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" data-v-58af2734></path></svg></div><h3 class="signed-in-title" data-v-58af2734>Sign in required</h3><p class="signed-in-subtitle" data-v-58af2734>You need to be signed in to access this content.</p>', 3)),
|
|
10398
10398
|
e("button", {
|
|
10399
10399
|
onClick: u,
|
|
10400
10400
|
class: "signed-in-button"
|
|
@@ -10411,7 +10411,7 @@ const ti = {
|
|
|
10411
10411
|
], !0)
|
|
10412
10412
|
])) : I("", !0);
|
|
10413
10413
|
}
|
|
10414
|
-
}), tc = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-
|
|
10414
|
+
}), tc = /* @__PURE__ */ Ue(ec, [["__scopeId", "data-v-58af2734"]]), Cu = /* @__PURE__ */ Ve({
|
|
10415
10415
|
__name: "StrandsConfigProvider",
|
|
10416
10416
|
props: {
|
|
10417
10417
|
config: {}
|
|
@@ -10439,7 +10439,7 @@ const ti = {
|
|
|
10439
10439
|
md: "w-5 h-5",
|
|
10440
10440
|
lg: "w-6 h-6",
|
|
10441
10441
|
xl: "w-8 h-8"
|
|
10442
|
-
}, l = H(() => `${t[r.size]} ${r.class}`),
|
|
10442
|
+
}, l = H(() => `${t[r.size]} ${r.class}`), V = H(() => "0 0 24 24"), T = {
|
|
10443
10443
|
eye: () => oe("g", [
|
|
10444
10444
|
oe("path", {
|
|
10445
10445
|
"stroke-linecap": "round",
|
|
@@ -10535,14 +10535,14 @@ const ti = {
|
|
|
10535
10535
|
"clip-rule": "evenodd"
|
|
10536
10536
|
})
|
|
10537
10537
|
}, C = H(() => {
|
|
10538
|
-
const w =
|
|
10538
|
+
const w = T[r.name];
|
|
10539
10539
|
return w ? w() : oe("path", { d: "" });
|
|
10540
10540
|
});
|
|
10541
10541
|
return (w, c) => (a(), o("svg", {
|
|
10542
10542
|
class: Me(l.value),
|
|
10543
10543
|
fill: s.fill,
|
|
10544
10544
|
stroke: s.stroke,
|
|
10545
|
-
viewBox:
|
|
10545
|
+
viewBox: V.value,
|
|
10546
10546
|
"aria-hidden": s.ariaHidden
|
|
10547
10547
|
}, [
|
|
10548
10548
|
(a(), ye(ot(C.value)))
|
|
@@ -10580,7 +10580,7 @@ const ti = {
|
|
|
10580
10580
|
},
|
|
10581
10581
|
emits: ["profile-updated", "signed-out", "signed-in"],
|
|
10582
10582
|
setup(s, { emit: r }) {
|
|
10583
|
-
const t = s, l = r, { currentUser:
|
|
10583
|
+
const t = s, l = r, { currentUser: V, signOut: T, isAuthenticated: C } = ft(), w = M(!1), c = M(!1), h = M(!1), x = M(), S = M(), u = M(), m = H(() => S.value), { floatingStyle: U, updatePosition: D } = ja({
|
|
10584
10584
|
trigger: m,
|
|
10585
10585
|
floating: u,
|
|
10586
10586
|
placement: "bottom-end",
|
|
@@ -10625,7 +10625,7 @@ const ti = {
|
|
|
10625
10625
|
default:
|
|
10626
10626
|
return 64;
|
|
10627
10627
|
}
|
|
10628
|
-
}), y = H(() => t.user ? t.user : C.value ?
|
|
10628
|
+
}), y = H(() => t.user ? t.user : C.value ? V.value : null), L = H(() => y.value ? y.value.username ? y.value.username : y.value.firstName && y.value.lastName ? `${y.value.firstName} ${y.value.lastName}` : y.value.firstName ? y.value.firstName : y.value.email || "User" : "User"), F = () => {
|
|
10629
10629
|
w.value = !w.value, w.value && yt(() => {
|
|
10630
10630
|
D();
|
|
10631
10631
|
});
|
|
@@ -10637,7 +10637,7 @@ const ti = {
|
|
|
10637
10637
|
}, q = () => {
|
|
10638
10638
|
}, b = () => {
|
|
10639
10639
|
S.value?.$el?.focus();
|
|
10640
|
-
},
|
|
10640
|
+
}, z = () => {
|
|
10641
10641
|
}, ae = () => {
|
|
10642
10642
|
c.value = !0, k();
|
|
10643
10643
|
}, ce = () => {
|
|
@@ -10650,7 +10650,7 @@ const ti = {
|
|
|
10650
10650
|
}, Se = () => {
|
|
10651
10651
|
}, be = async () => {
|
|
10652
10652
|
try {
|
|
10653
|
-
await
|
|
10653
|
+
await T(), k(), l("signed-out");
|
|
10654
10654
|
} catch {
|
|
10655
10655
|
}
|
|
10656
10656
|
};
|
|
@@ -10857,7 +10857,7 @@ const ti = {
|
|
|
10857
10857
|
st(qe(q, ["prevent"]), ["arrow-up"]),
|
|
10858
10858
|
st(qe(O, ["prevent"]), ["arrow-down"]),
|
|
10859
10859
|
st(qe(b, ["prevent"]), ["home"]),
|
|
10860
|
-
st(qe(
|
|
10860
|
+
st(qe(z, ["prevent"]), ["end"])
|
|
10861
10861
|
]
|
|
10862
10862
|
}, [
|
|
10863
10863
|
e("div", fc, [
|
|
@@ -10954,19 +10954,19 @@ const ti = {
|
|
|
10954
10954
|
const t = s, l = () => [
|
|
10955
10955
|
"user-nav",
|
|
10956
10956
|
`user-nav-${t.direction}`
|
|
10957
|
-
],
|
|
10957
|
+
], V = Ge({
|
|
10958
10958
|
items: []
|
|
10959
10959
|
});
|
|
10960
|
-
Yt("userNavState",
|
|
10961
|
-
const
|
|
10962
|
-
const c =
|
|
10963
|
-
c >= 0 ?
|
|
10960
|
+
Yt("userNavState", V);
|
|
10961
|
+
const T = (w) => {
|
|
10962
|
+
const c = V.items.findIndex((h) => h.id === w.id);
|
|
10963
|
+
c >= 0 ? V.items[c] = w : V.items.push(w);
|
|
10964
10964
|
}, C = (w) => {
|
|
10965
|
-
const c =
|
|
10966
|
-
c >= 0 &&
|
|
10965
|
+
const c = V.items.findIndex((h) => h.id === w);
|
|
10966
|
+
c >= 0 && V.items.splice(c, 1);
|
|
10967
10967
|
};
|
|
10968
|
-
return Yt("registerNavItem",
|
|
10969
|
-
items:
|
|
10968
|
+
return Yt("registerNavItem", T), Yt("unregisterNavItem", C), r({
|
|
10969
|
+
items: V.items
|
|
10970
10970
|
}), (w, c) => (a(), o("div", {
|
|
10971
10971
|
class: Me(l())
|
|
10972
10972
|
}, [
|
|
@@ -11007,7 +11007,7 @@ const ti = {
|
|
|
11007
11007
|
align: {}
|
|
11008
11008
|
},
|
|
11009
11009
|
setup(s) {
|
|
11010
|
-
const r = s, t = ha(), l = fa("registerNavItem"),
|
|
11010
|
+
const r = s, t = ha(), l = fa("registerNavItem"), V = fa("unregisterNavItem"), T = M(`nav-item-${Math.random().toString(36).substring(2, 11)}`), C = ss(), w = H(() => {
|
|
11011
11011
|
if (typeof window < "u" && C) {
|
|
11012
11012
|
const m = C.vnode.el?.parentElement;
|
|
11013
11013
|
if (m)
|
|
@@ -11037,7 +11037,7 @@ const ti = {
|
|
|
11037
11037
|
};
|
|
11038
11038
|
return U[m] || U.dashboard;
|
|
11039
11039
|
}, u = H(() => ({
|
|
11040
|
-
id:
|
|
11040
|
+
id: T.value,
|
|
11041
11041
|
label: c(),
|
|
11042
11042
|
to: r.to,
|
|
11043
11043
|
icon: r.icon,
|
|
@@ -11048,7 +11048,7 @@ const ti = {
|
|
|
11048
11048
|
return Ye(() => {
|
|
11049
11049
|
l && l(u.value);
|
|
11050
11050
|
}), Mt(() => {
|
|
11051
|
-
|
|
11051
|
+
V && V(T.value);
|
|
11052
11052
|
}), Le(() => [r.to, r.icon, r.disabled], () => {
|
|
11053
11053
|
l && l(u.value);
|
|
11054
11054
|
}, { deep: !0 }), (m, U) => (a(), ye(i(ue), {
|
|
@@ -11105,8 +11105,8 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11105
11105
|
overscan: { default: 5 }
|
|
11106
11106
|
},
|
|
11107
11107
|
setup(s, { expose: r }) {
|
|
11108
|
-
const t = s, l = M(),
|
|
11109
|
-
const u = Math.floor(
|
|
11108
|
+
const t = s, l = M(), V = M(0), T = H(() => {
|
|
11109
|
+
const u = Math.floor(V.value / t.itemHeight), m = Math.min(
|
|
11110
11110
|
u + Math.ceil(t.containerHeight / t.itemHeight),
|
|
11111
11111
|
t.items.length - 1
|
|
11112
11112
|
);
|
|
@@ -11115,7 +11115,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11115
11115
|
end: Math.min(t.items.length - 1, m + t.overscan)
|
|
11116
11116
|
};
|
|
11117
11117
|
}), C = H(() => {
|
|
11118
|
-
const { start: u, end: m } =
|
|
11118
|
+
const { start: u, end: m } = T.value, U = [];
|
|
11119
11119
|
for (let D = u; D <= m; D++)
|
|
11120
11120
|
U.push({
|
|
11121
11121
|
index: D,
|
|
@@ -11128,7 +11128,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11128
11128
|
const x = (u) => {
|
|
11129
11129
|
h && clearTimeout(h), h = setTimeout(() => {
|
|
11130
11130
|
const m = u.target;
|
|
11131
|
-
|
|
11131
|
+
V.value = m.scrollTop;
|
|
11132
11132
|
}, 16);
|
|
11133
11133
|
};
|
|
11134
11134
|
return Mt(() => {
|
|
@@ -11227,7 +11227,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11227
11227
|
oe("polyline", { points: "22,6 12,13 2,6" })
|
|
11228
11228
|
]);
|
|
11229
11229
|
}
|
|
11230
|
-
},
|
|
11230
|
+
}, V = {
|
|
11231
11231
|
props: {
|
|
11232
11232
|
size: {
|
|
11233
11233
|
type: [String, Number],
|
|
@@ -11245,7 +11245,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11245
11245
|
oe("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" })
|
|
11246
11246
|
]);
|
|
11247
11247
|
}
|
|
11248
|
-
},
|
|
11248
|
+
}, T = {
|
|
11249
11249
|
props: {
|
|
11250
11250
|
size: {
|
|
11251
11251
|
type: [String, Number],
|
|
@@ -11335,7 +11335,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11335
11335
|
i(c) || i(x).length > 0 ? (a(), o("div", Pc, [
|
|
11336
11336
|
e("div", jc, [
|
|
11337
11337
|
e("div", Oc, [
|
|
11338
|
-
d(
|
|
11338
|
+
d(V, {
|
|
11339
11339
|
size: 20,
|
|
11340
11340
|
class: "mfa-setup-shield-icon"
|
|
11341
11341
|
})
|
|
@@ -11422,7 +11422,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11422
11422
|
disabled: i(h)
|
|
11423
11423
|
}, {
|
|
11424
11424
|
default: _(() => [
|
|
11425
|
-
d(
|
|
11425
|
+
d(T, {
|
|
11426
11426
|
size: 16,
|
|
11427
11427
|
class: "mfa-setup-manage-icon"
|
|
11428
11428
|
}),
|
|
@@ -11465,7 +11465,7 @@ const Ic = { class: "accui-p-2 accui-border-b" }, Lc = /* @__PURE__ */ Ve({
|
|
|
11465
11465
|
}
|
|
11466
11466
|
}), Mu = /* @__PURE__ */ Ue(Xc, [["__scopeId", "data-v-5e4af8e5"]]);
|
|
11467
11467
|
function Zt() {
|
|
11468
|
-
const { config: s } = vt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(),
|
|
11468
|
+
const { config: s } = vt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(), V = async (x, S = {}) => {
|
|
11469
11469
|
const {
|
|
11470
11470
|
autoRefresh: u = !0,
|
|
11471
11471
|
requireAuth: m = !0,
|
|
@@ -11507,11 +11507,11 @@ function Zt() {
|
|
|
11507
11507
|
return F;
|
|
11508
11508
|
};
|
|
11509
11509
|
return {
|
|
11510
|
-
authenticatedFetch:
|
|
11511
|
-
get: (x, S) =>
|
|
11510
|
+
authenticatedFetch: V,
|
|
11511
|
+
get: (x, S) => V(x, { ...S, method: "GET" }),
|
|
11512
11512
|
post: (x, S, u) => {
|
|
11513
11513
|
const m = new Headers(u?.headers);
|
|
11514
|
-
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"),
|
|
11514
|
+
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"), V(x, {
|
|
11515
11515
|
...u,
|
|
11516
11516
|
method: "POST",
|
|
11517
11517
|
headers: m,
|
|
@@ -11520,17 +11520,17 @@ function Zt() {
|
|
|
11520
11520
|
},
|
|
11521
11521
|
put: (x, S, u) => {
|
|
11522
11522
|
const m = new Headers(u?.headers);
|
|
11523
|
-
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"),
|
|
11523
|
+
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"), V(x, {
|
|
11524
11524
|
...u,
|
|
11525
11525
|
method: "PUT",
|
|
11526
11526
|
headers: m,
|
|
11527
11527
|
body: typeof S == "object" ? JSON.stringify(S) : S
|
|
11528
11528
|
});
|
|
11529
11529
|
},
|
|
11530
|
-
delete: (x, S) =>
|
|
11530
|
+
delete: (x, S) => V(x, { ...S, method: "DELETE" }),
|
|
11531
11531
|
patch: (x, S, u) => {
|
|
11532
11532
|
const m = new Headers(u?.headers);
|
|
11533
|
-
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"),
|
|
11533
|
+
return S && typeof S == "object" && !m.has("Content-Type") && m.set("Content-Type", "application/json"), V(x, {
|
|
11534
11534
|
...u,
|
|
11535
11535
|
method: "PATCH",
|
|
11536
11536
|
headers: m,
|
|
@@ -11565,8 +11565,8 @@ const xu = {
|
|
|
11565
11565
|
let t = 0;
|
|
11566
11566
|
s.length < 8 ? r.push("Password must be at least 8 characters long") : t += 1, /[A-Z]/.test(s) ? t += 1 : r.push("Password must contain at least one uppercase letter"), /[a-z]/.test(s) ? t += 1 : r.push("Password must contain at least one lowercase letter"), /\d/.test(s) ? t += 1 : r.push("Password must contain at least one number"), /[!@#$%^&*(),.?":{}|<>]/.test(s) ? t += 1 : r.push("Password must contain at least one special character");
|
|
11567
11567
|
const l = r.length === 0;
|
|
11568
|
-
let
|
|
11569
|
-
return t >= 4 ?
|
|
11568
|
+
let V = "weak";
|
|
11569
|
+
return t >= 4 ? V = "strong" : t >= 3 && (V = "medium"), { isValid: l, strength: V, errors: r };
|
|
11570
11570
|
}, Au = (s) => s.trim().length >= 2, _u = (s) => s.trim().length > 0, Tu = (s, r) => s === r, zu = (s, r) => {
|
|
11571
11571
|
const t = s?.charAt(0).toUpperCase() || "", l = r?.charAt(0).toUpperCase() || "";
|
|
11572
11572
|
return t + l || "U";
|