@wishbone-media/spark 0.9.2 → 0.10.0
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/index.js +258 -213
- package/package.json +1 -1
- package/src/plugins/axios.js +86 -0
- package/src/plugins/index.js +2 -1
- package/src/plugins/router.js +6 -0
- package/src/stores/auth.js +25 -5
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as T, resolveComponent as V, createElementBlock as y, openBlock as g, normalizeClass as _, createElementVNode as p, createVNode as v, unref as x, renderSlot as z, Fragment as se, renderList as fe, createCommentVNode as R, toDisplayString as F, reactive as oe, ref as q, inject as tn, provide as nn, markRaw as xt, createBlock as Y, withCtx as O, resolveDynamicComponent as St, mergeProps as vt, toHandlers as Ct, createTextVNode as qe, withModifiers as ce, onMounted as sn, watch as rn } from "vue";
|
|
2
2
|
import { library as _t } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as on } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as hn, faSatelliteDish as mn, faLayerPlus as gn, faLaptopMobile as yn, faInfoCircle as wn, faGripDotsVertical as bn, faGearComplex as xn, faFlag as Sn, faFaceSmileWink as vn, faFaceSmileRelaxed as Cn, faExclamationTriangle as _n, faEllipsisVertical as kn, faEllipsis as Rn, faEdit as En, faComments as On, faCircleXmark as An, faCircleUser as
|
|
4
|
+
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as hn, faSatelliteDish as mn, faLayerPlus as gn, faLaptopMobile as yn, faInfoCircle as wn, faGripDotsVertical as bn, faGearComplex as xn, faFlag as Sn, faFaceSmileWink as vn, faFaceSmileRelaxed as Cn, faExclamationTriangle as _n, faEllipsisVertical as kn, faEllipsis as Rn, faEdit as En, faComments as On, faCircleXmark as An, faCircleUser as Tn, faChevronUp as $n, faChevronRight as Ln, faChevronLeft as Fn, faChevronDown as Bn, faCheckCircle as Nn, faCheck as Pn, faBullhorn as Hn, faBellRing as Un, faBarsSort as Vn, faArrowRightToLine as Dn, faArrowLeftToLine as jn } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { defineStore as Re } from "pinia";
|
|
6
6
|
import { TransitionRoot as kt, Dialog as Rt, TransitionChild as _e, DialogPanel as Et } from "@headlessui/vue";
|
|
7
7
|
import { useRouter as Ee, useRoute as Oe } from "vue-router";
|
|
@@ -16,8 +16,8 @@ const N = {
|
|
|
16
16
|
farChevronDown: Bn,
|
|
17
17
|
farChevronLeft: Fn,
|
|
18
18
|
farChevronRight: Ln,
|
|
19
|
-
farChevronUp:
|
|
20
|
-
farCircleUser:
|
|
19
|
+
farChevronUp: $n,
|
|
20
|
+
farCircleUser: Tn,
|
|
21
21
|
farCircleXmark: An,
|
|
22
22
|
farComments: On,
|
|
23
23
|
farEdit: En,
|
|
@@ -42,13 +42,13 @@ const N = {
|
|
|
42
42
|
farXmark: ln,
|
|
43
43
|
farSignOut: an
|
|
44
44
|
};
|
|
45
|
-
function
|
|
45
|
+
function Ca(e) {
|
|
46
46
|
Object.assign(N, e), _t.add(...Object.values(e));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function _a(e) {
|
|
49
49
|
_t.add(...Object.values(N)), e.component("FontAwesomeIcon", on);
|
|
50
50
|
}
|
|
51
|
-
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" },
|
|
51
|
+
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, zn = { class: "ml-3" }, qn = { class: "ml-auto pl-3 pt-1 self-start" }, Wn = { class: "-mx-1.5 -my-1.5" }, ka = {
|
|
52
52
|
__name: "SparkAlert",
|
|
53
53
|
props: {
|
|
54
54
|
type: {
|
|
@@ -59,22 +59,22 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
59
59
|
},
|
|
60
60
|
emits: ["close"],
|
|
61
61
|
setup(e) {
|
|
62
|
-
const t = e, n =
|
|
62
|
+
const t = e, n = T(() => ({
|
|
63
63
|
success: "bg-green-50 border-green-200 text-green-700",
|
|
64
64
|
warning: "bg-yellow-50 border-yellow-200 text-yellow-700",
|
|
65
65
|
danger: "bg-red-50 border-red-200 text-red-700",
|
|
66
66
|
info: "bg-blue-50 border-blue-200 text-blue-700"
|
|
67
|
-
})[t.type]), s =
|
|
67
|
+
})[t.type]), s = T(() => ({
|
|
68
68
|
success: "text-green-400",
|
|
69
69
|
warning: "text-yellow-400",
|
|
70
70
|
danger: "text-red-400",
|
|
71
71
|
info: "text-blue-400"
|
|
72
|
-
})[t.type]), r =
|
|
72
|
+
})[t.type]), r = T(() => ({
|
|
73
73
|
success: "farCheckCircle",
|
|
74
74
|
warning: "farExclamationTriangle",
|
|
75
75
|
danger: "farCircleXmark",
|
|
76
76
|
info: "farInfoCircle"
|
|
77
|
-
})[t.type]), a =
|
|
77
|
+
})[t.type]), a = T(() => ({
|
|
78
78
|
success: "text-green-400 hover:bg-green-100",
|
|
79
79
|
warning: "text-yellow-400 hover:bg-yellow-100",
|
|
80
80
|
danger: "text-red-400 hover:bg-red-100",
|
|
@@ -92,10 +92,10 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
92
92
|
class: _(s.value)
|
|
93
93
|
}, null, 8, ["icon", "class"])
|
|
94
94
|
]),
|
|
95
|
-
p("div", qn, [
|
|
96
|
-
q(o.$slots, "default")
|
|
97
|
-
]),
|
|
98
95
|
p("div", zn, [
|
|
96
|
+
z(o.$slots, "default")
|
|
97
|
+
]),
|
|
98
|
+
p("div", qn, [
|
|
99
99
|
p("div", Wn, [
|
|
100
100
|
p("button", {
|
|
101
101
|
type: "button",
|
|
@@ -168,7 +168,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
168
168
|
},
|
|
169
169
|
emits: ["close", "select"],
|
|
170
170
|
setup(e, { emit: t }) {
|
|
171
|
-
const n = e, s = t, r =
|
|
171
|
+
const n = e, s = t, r = T(() => n.appItems.map((o) => ({
|
|
172
172
|
...o,
|
|
173
173
|
current: o.name === n.currentApp
|
|
174
174
|
}))), a = (o) => {
|
|
@@ -189,7 +189,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
189
189
|
}, null, 8, ["icon"])
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
(g(!0), y(
|
|
192
|
+
(g(!0), y(se, null, fe(r.value, (i) => (g(), y("div", {
|
|
193
193
|
key: i.name,
|
|
194
194
|
class: _([i.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
195
195
|
onClick: (d) => a(i)
|
|
@@ -221,7 +221,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
221
221
|
}, Ot = Re(
|
|
222
222
|
"brandFilter",
|
|
223
223
|
() => {
|
|
224
|
-
const e =
|
|
224
|
+
const e = oe({
|
|
225
225
|
brands: []
|
|
226
226
|
}), t = (a = {}) => {
|
|
227
227
|
if (!a.brands || !Array.isArray(a.brands)) {
|
|
@@ -240,7 +240,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
240
240
|
logo: l.logo,
|
|
241
241
|
current: l.current || !1
|
|
242
242
|
}));
|
|
243
|
-
}, n =
|
|
243
|
+
}, n = T(() => e.brands.find((a) => a.current) || null), s = T(() => e.brands);
|
|
244
244
|
return {
|
|
245
245
|
state: e,
|
|
246
246
|
initialize: t,
|
|
@@ -291,7 +291,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
291
291
|
])
|
|
292
292
|
]),
|
|
293
293
|
x(s).allBrands.length === 0 ? (g(), y("div", ds, " No brands configured ")) : R("", !0),
|
|
294
|
-
(g(!0), y(
|
|
294
|
+
(g(!0), y(se, null, fe(x(s).allBrands, (l) => (g(), y("div", {
|
|
295
295
|
key: l.id,
|
|
296
296
|
class: _([l.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
297
297
|
onClick: (i) => r(l)
|
|
@@ -342,7 +342,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
setup(e) {
|
|
345
|
-
const t = e, n =
|
|
345
|
+
const t = e, n = q(null), s = tn("buttonGroup", null), r = T(() => {
|
|
346
346
|
if (!s?.isInGroup || !n.value) return null;
|
|
347
347
|
const l = s.getButtonIndex(n.value), i = s.getButtonCount();
|
|
348
348
|
return {
|
|
@@ -366,13 +366,13 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
366
366
|
const d = l.split(" ").filter(Boolean), f = i.split(" ").filter(Boolean);
|
|
367
367
|
return [...d.filter((E) => !f.some((h) => {
|
|
368
368
|
const w = Object.entries(a).find(
|
|
369
|
-
([k,
|
|
369
|
+
([k, $]) => $.test(E)
|
|
370
370
|
)?.[0], m = Object.entries(a).find(
|
|
371
|
-
([k,
|
|
371
|
+
([k, $]) => $.test(h)
|
|
372
372
|
)?.[0];
|
|
373
373
|
return w && w === m;
|
|
374
374
|
})), ...f].join(" ");
|
|
375
|
-
}, c =
|
|
375
|
+
}, c = T(() => {
|
|
376
376
|
let l = "", i = "";
|
|
377
377
|
switch (t.size) {
|
|
378
378
|
case "xs":
|
|
@@ -428,13 +428,13 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
428
428
|
disabled: e.disabled,
|
|
429
429
|
onClick: i[0] || (i[0] = (d) => l.$emit("click"))
|
|
430
430
|
}, [
|
|
431
|
-
|
|
431
|
+
z(l.$slots, "default")
|
|
432
432
|
], 10, vs));
|
|
433
433
|
}
|
|
434
|
-
},
|
|
434
|
+
}, Ra = {
|
|
435
435
|
__name: "SparkButtonGroup",
|
|
436
436
|
setup(e) {
|
|
437
|
-
const t =
|
|
437
|
+
const t = q(null);
|
|
438
438
|
return nn("buttonGroup", {
|
|
439
439
|
isInGroup: !0,
|
|
440
440
|
getButtonIndex: (r) => t.value ? Array.from(t.value.children).indexOf(r) : -1,
|
|
@@ -444,7 +444,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
444
444
|
ref_key: "groupRef",
|
|
445
445
|
ref: t
|
|
446
446
|
}, [
|
|
447
|
-
|
|
447
|
+
z(r.$slots, "default")
|
|
448
448
|
], 512));
|
|
449
449
|
}
|
|
450
450
|
}, Cs = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, _s = {
|
|
@@ -453,7 +453,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
453
453
|
}, ks = {
|
|
454
454
|
key: 1,
|
|
455
455
|
class: "p-5"
|
|
456
|
-
},
|
|
456
|
+
}, Ea = {
|
|
457
457
|
__name: "SparkCard",
|
|
458
458
|
props: {
|
|
459
459
|
padded: {
|
|
@@ -469,22 +469,22 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
469
469
|
const t = e;
|
|
470
470
|
return (n, s) => (g(), y("div", Cs, [
|
|
471
471
|
n.$slots.header ? (g(), y("div", _s, [
|
|
472
|
-
|
|
472
|
+
z(n.$slots, "header")
|
|
473
473
|
])) : R("", !0),
|
|
474
474
|
p("div", {
|
|
475
475
|
class: _([t.padded ? t.paddedClass : ""])
|
|
476
476
|
}, [
|
|
477
|
-
|
|
477
|
+
z(n.$slots, "default")
|
|
478
478
|
], 2),
|
|
479
479
|
n.$slots.footer ? (g(), y("div", ks, [
|
|
480
|
-
|
|
480
|
+
z(n.$slots, "footer")
|
|
481
481
|
])) : R("", !0)
|
|
482
482
|
]));
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
class Rs {
|
|
486
486
|
constructor() {
|
|
487
|
-
this.state =
|
|
487
|
+
this.state = oe({
|
|
488
488
|
isVisible: !1,
|
|
489
489
|
content: null,
|
|
490
490
|
props: {},
|
|
@@ -498,17 +498,17 @@ class Rs {
|
|
|
498
498
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
-
const
|
|
501
|
+
const ue = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Os = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, As = {
|
|
502
502
|
__name: "SparkModalContainer",
|
|
503
503
|
setup(e) {
|
|
504
504
|
return (t, n) => (g(), Y(x(kt), {
|
|
505
505
|
as: "template",
|
|
506
|
-
show: x(
|
|
506
|
+
show: x(ue).state.isVisible
|
|
507
507
|
}, {
|
|
508
508
|
default: O(() => [
|
|
509
509
|
v(x(Rt), {
|
|
510
510
|
class: "relative z-200",
|
|
511
|
-
onClose: x(
|
|
511
|
+
onClose: x(ue).hide
|
|
512
512
|
}, {
|
|
513
513
|
default: O(() => [
|
|
514
514
|
v(x(_e), {
|
|
@@ -539,7 +539,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
539
539
|
default: O(() => [
|
|
540
540
|
v(x(Et), { class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:min-w-lg sm:max-w-max" }, {
|
|
541
541
|
default: O(() => [
|
|
542
|
-
(g(), Y(St(x(
|
|
542
|
+
(g(), Y(St(x(ue).state.content), vt(x(ue).state.props, Ct(x(ue).state.eventHandlers)), null, 16))
|
|
543
543
|
]),
|
|
544
544
|
_: 1
|
|
545
545
|
})
|
|
@@ -555,10 +555,10 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
555
555
|
_: 1
|
|
556
556
|
}, 8, ["show"]));
|
|
557
557
|
}
|
|
558
|
-
},
|
|
558
|
+
}, Ts = { class: "px-4 pt-5 pb-4 sm:p-6" }, $s = {
|
|
559
559
|
key: 0,
|
|
560
560
|
class: "text-lg font-medium text-gray-900"
|
|
561
|
-
},
|
|
561
|
+
}, Oa = {
|
|
562
562
|
__name: "SparkModalDialog",
|
|
563
563
|
props: {
|
|
564
564
|
title: {
|
|
@@ -608,7 +608,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
608
608
|
"input"
|
|
609
609
|
],
|
|
610
610
|
setup(e) {
|
|
611
|
-
const t = e, n =
|
|
611
|
+
const t = e, n = T(() => !t.buttons || t.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : t.buttons), s = T(() => {
|
|
612
612
|
switch (n.value.length) {
|
|
613
613
|
case 1:
|
|
614
614
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -624,12 +624,12 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
624
624
|
success: "farCheckCircle",
|
|
625
625
|
warning: "farExclamationTriangle",
|
|
626
626
|
danger: "farCircleXmark"
|
|
627
|
-
}, a =
|
|
627
|
+
}, a = T(() => t.icon || r[t.type]), o = T(() => ({
|
|
628
628
|
info: "bg-blue-100",
|
|
629
629
|
success: "bg-green-100",
|
|
630
630
|
warning: "bg-yellow-100",
|
|
631
631
|
danger: "bg-red-100"
|
|
632
|
-
})[t.type]), c =
|
|
632
|
+
})[t.type]), c = T(() => ({
|
|
633
633
|
info: "text-blue-400",
|
|
634
634
|
success: "text-green-400",
|
|
635
635
|
warning: "text-yellow-400",
|
|
@@ -637,7 +637,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
637
637
|
})[t.type]);
|
|
638
638
|
return (l, i) => {
|
|
639
639
|
const d = V("font-awesome-icon");
|
|
640
|
-
return g(), y("div",
|
|
640
|
+
return g(), y("div", Ts, [
|
|
641
641
|
a.value ? (g(), y("div", {
|
|
642
642
|
key: 0,
|
|
643
643
|
class: _(["mx-auto flex size-12 items-center justify-center rounded-full", o.value])
|
|
@@ -650,7 +650,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
650
650
|
p("div", {
|
|
651
651
|
class: _(["text-center", { "mt-3 sm:mt-5": a.value }])
|
|
652
652
|
}, [
|
|
653
|
-
e.title ? (g(), y("h3",
|
|
653
|
+
e.title ? (g(), y("h3", $s, F(e.title), 1)) : R("", !0),
|
|
654
654
|
e.message ? (g(), y("div", {
|
|
655
655
|
key: 1,
|
|
656
656
|
class: _([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
@@ -659,13 +659,13 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
659
659
|
p("div", {
|
|
660
660
|
class: _(["mt-5 sm:mt-6", s.value])
|
|
661
661
|
}, [
|
|
662
|
-
(g(!0), y(
|
|
662
|
+
(g(!0), y(se, null, fe(n.value, (f, b) => (g(), Y(x(Ae), {
|
|
663
663
|
key: b,
|
|
664
664
|
variant: f.variant,
|
|
665
665
|
onClick: (E) => l.$emit(f.event, f)
|
|
666
666
|
}, {
|
|
667
667
|
default: O(() => [
|
|
668
|
-
|
|
668
|
+
qe(F(f.text), 1)
|
|
669
669
|
]),
|
|
670
670
|
_: 2
|
|
671
671
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -687,7 +687,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
689
|
setup(e) {
|
|
690
|
-
const t =
|
|
690
|
+
const t = q(null);
|
|
691
691
|
return (n, s) => (g(), Y(x(kt), {
|
|
692
692
|
show: e.overlayInstance.state.isVisible,
|
|
693
693
|
as: "template"
|
|
@@ -750,7 +750,7 @@ const ce = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
750
750
|
}
|
|
751
751
|
};
|
|
752
752
|
function st() {
|
|
753
|
-
const e =
|
|
753
|
+
const e = oe({
|
|
754
754
|
isVisible: !1,
|
|
755
755
|
content: null,
|
|
756
756
|
props: {},
|
|
@@ -807,7 +807,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
807
807
|
}, Ms = ["href", "onClick"], Is = {
|
|
808
808
|
key: 1,
|
|
809
809
|
class: "text-[13px]"
|
|
810
|
-
},
|
|
810
|
+
}, zs = { class: "mt-auto" }, qs = { class: "p-[10px] flex-shrink-0" }, Ws = { class: "flex flex-1 items-center gap-x-6" }, Js = { class: "relative flex flex-1 items-center gap-4" }, Ks = { class: "cursor-pointer" }, Gs = ["src"], Zs = { class: "ml-auto" }, Xs = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Aa = {
|
|
811
811
|
__name: "SparkDefaultContainer",
|
|
812
812
|
props: {
|
|
813
813
|
appStore: {
|
|
@@ -834,10 +834,10 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
);
|
|
837
|
-
}, a =
|
|
837
|
+
}, a = T(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), o = T(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
838
838
|
return (c, l) => {
|
|
839
839
|
const i = V("font-awesome-icon"), d = V("router-view");
|
|
840
|
-
return g(), y(
|
|
840
|
+
return g(), y(se, null, [
|
|
841
841
|
p("div", {
|
|
842
842
|
class: _([a.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
843
843
|
}, [
|
|
@@ -849,7 +849,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
849
849
|
p("li", Us, [
|
|
850
850
|
p("a", {
|
|
851
851
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
852
|
-
onClick: l[0] || (l[0] =
|
|
852
|
+
onClick: l[0] || (l[0] = ce((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
853
853
|
}, [
|
|
854
854
|
v(i, {
|
|
855
855
|
icon: x(N)[e.appStore.state.icon],
|
|
@@ -858,11 +858,11 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
858
858
|
]),
|
|
859
859
|
e.mainNavStore.state.collapsed ? R("", !0) : (g(), y("a", {
|
|
860
860
|
key: 0,
|
|
861
|
-
onClick: l[1] || (l[1] =
|
|
861
|
+
onClick: l[1] || (l[1] = ce((f) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
862
862
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
863
863
|
}, F(e.appStore.state.app), 1))
|
|
864
864
|
]),
|
|
865
|
-
(g(!0), y(
|
|
865
|
+
(g(!0), y(se, null, fe(e.mainNavStore.state.menu, (f) => (g(), y("li", {
|
|
866
866
|
key: f.name,
|
|
867
867
|
class: _({
|
|
868
868
|
"mt-[10px]": f.children
|
|
@@ -874,7 +874,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
874
874
|
"hover:bg-gray-100": f?.href
|
|
875
875
|
}, "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
876
876
|
href: f?.href,
|
|
877
|
-
onClick:
|
|
877
|
+
onClick: ce((b) => e.mainNavStore.goto(f.href), ["prevent"])
|
|
878
878
|
}, [
|
|
879
879
|
f.icon ? (g(), Y(i, {
|
|
880
880
|
key: 0,
|
|
@@ -894,13 +894,13 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
894
894
|
}, F(f.name), 3))
|
|
895
895
|
], 10, Vs),
|
|
896
896
|
f.children ? (g(), y("ul", js, [
|
|
897
|
-
(g(!0), y(
|
|
897
|
+
(g(!0), y(se, null, fe(f.children, (b) => (g(), y("li", {
|
|
898
898
|
key: b.name
|
|
899
899
|
}, [
|
|
900
900
|
p("a", {
|
|
901
901
|
class: _([[b.current ? "bg-gray-100" : "", "hover:bg-gray-100"], "h-[37px] sgroup flex items-center gap-x-2 rounded-md p-3 text-gray-800 leading-5 transition-all duration-300 ease-in-out"]),
|
|
902
902
|
href: b.href,
|
|
903
|
-
onClick:
|
|
903
|
+
onClick: ce((E) => e.mainNavStore.goto(b.href), ["prevent"])
|
|
904
904
|
}, [
|
|
905
905
|
b.icon ? (g(), Y(i, {
|
|
906
906
|
key: 0,
|
|
@@ -914,12 +914,12 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
914
914
|
], 2))), 128))
|
|
915
915
|
])
|
|
916
916
|
]),
|
|
917
|
-
p("li",
|
|
918
|
-
|
|
917
|
+
p("li", zs, [
|
|
918
|
+
z(c.$slots, "sidebar-footer"),
|
|
919
919
|
p("a", {
|
|
920
920
|
class: "font-medium grid place-content-center gap-x-3 rounded-md h-10 p-2.5 text-gray-800 text-[13px] hover:bg-gray-100 transition-all duration-300 ease-in-out",
|
|
921
921
|
href: "#",
|
|
922
|
-
onClick: l[2] || (l[2] =
|
|
922
|
+
onClick: l[2] || (l[2] = ce((f) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
923
923
|
}, [
|
|
924
924
|
v(i, {
|
|
925
925
|
icon: x(N)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
@@ -934,10 +934,10 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
934
934
|
p("div", {
|
|
935
935
|
class: _([o.value, "h-full transition-all flex flex-col"])
|
|
936
936
|
}, [
|
|
937
|
-
p("div",
|
|
937
|
+
p("div", qs, [
|
|
938
938
|
p("div", Ws, [
|
|
939
939
|
p("div", Js, [
|
|
940
|
-
|
|
940
|
+
z(c.$slots, "header-left", {}, () => [
|
|
941
941
|
p("div", Ks, [
|
|
942
942
|
v(i, {
|
|
943
943
|
icon: x(N).farBarsSort,
|
|
@@ -946,7 +946,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
946
946
|
}, null, 8, ["icon"])
|
|
947
947
|
])
|
|
948
948
|
]),
|
|
949
|
-
|
|
949
|
+
z(c.$slots, "header-center", {}, () => [
|
|
950
950
|
e.appStore.state.showBrandSelector ? (g(), y("div", {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
@@ -961,7 +961,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
961
961
|
])) : R("", !0)
|
|
962
962
|
]),
|
|
963
963
|
p("div", Zs, [
|
|
964
|
-
|
|
964
|
+
z(c.$slots, "header-right", {}, () => [
|
|
965
965
|
e.appStore.state.showAppSelector ? (g(), y("button", {
|
|
966
966
|
key: 0,
|
|
967
967
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
@@ -1008,51 +1008,51 @@ function tr(e, t) {
|
|
|
1008
1008
|
v(n)
|
|
1009
1009
|
]);
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const Ta = /* @__PURE__ */ Qs(Ys, [["render", tr]]);
|
|
1012
1012
|
function At(e, t) {
|
|
1013
1013
|
return function() {
|
|
1014
1014
|
return e.apply(t, arguments);
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
const { toString: nr } = Object.prototype, { getPrototypeOf: We } = Object, { iterator:
|
|
1017
|
+
const { toString: nr } = Object.prototype, { getPrototypeOf: We } = Object, { iterator: Te, toStringTag: Tt } = Symbol, $e = /* @__PURE__ */ ((e) => (t) => {
|
|
1018
1018
|
const n = nr.call(t);
|
|
1019
1019
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1020
|
-
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) =>
|
|
1021
|
-
function
|
|
1022
|
-
return e !== null && !
|
|
1020
|
+
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => $e(t) === e), Le = (e) => (t) => typeof t === e, { isArray: ae } = Array, re = Le("undefined");
|
|
1021
|
+
function pe(e) {
|
|
1022
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const $t = j("ArrayBuffer");
|
|
1025
1025
|
function sr(e) {
|
|
1026
1026
|
let t;
|
|
1027
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
1027
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && $t(e.buffer), t;
|
|
1028
1028
|
}
|
|
1029
|
-
const rr = Le("string"), P = Le("function"), Lt = Le("number"),
|
|
1030
|
-
if (
|
|
1029
|
+
const rr = Le("string"), P = Le("function"), Lt = Le("number"), he = (e) => e !== null && typeof e == "object", or = (e) => e === !0 || e === !1, Se = (e) => {
|
|
1030
|
+
if ($e(e) !== "object")
|
|
1031
1031
|
return !1;
|
|
1032
1032
|
const t = We(e);
|
|
1033
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
1033
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Tt in e) && !(Te in e);
|
|
1034
1034
|
}, ar = (e) => {
|
|
1035
|
-
if (!
|
|
1035
|
+
if (!he(e) || pe(e))
|
|
1036
1036
|
return !1;
|
|
1037
1037
|
try {
|
|
1038
1038
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
1039
1039
|
} catch {
|
|
1040
1040
|
return !1;
|
|
1041
1041
|
}
|
|
1042
|
-
}, ir = j("Date"), lr = j("File"), cr = j("Blob"), ur = j("FileList"), dr = (e) =>
|
|
1042
|
+
}, ir = j("Date"), lr = j("File"), cr = j("Blob"), ur = j("FileList"), dr = (e) => he(e) && P(e.pipe), fr = (e) => {
|
|
1043
1043
|
let t;
|
|
1044
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
1044
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = $e(e)) === "formdata" || // detect form-data instance
|
|
1045
1045
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
1046
1046
|
}, pr = j("URLSearchParams"), [hr, mr, gr, yr] = ["ReadableStream", "Request", "Response", "Headers"].map(j), wr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1047
|
-
function
|
|
1047
|
+
function me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1048
1048
|
if (e === null || typeof e > "u")
|
|
1049
1049
|
return;
|
|
1050
1050
|
let s, r;
|
|
1051
|
-
if (typeof e != "object" && (e = [e]),
|
|
1051
|
+
if (typeof e != "object" && (e = [e]), ae(e))
|
|
1052
1052
|
for (s = 0, r = e.length; s < r; s++)
|
|
1053
1053
|
t.call(null, e[s], s, e);
|
|
1054
1054
|
else {
|
|
1055
|
-
if (
|
|
1055
|
+
if (pe(e))
|
|
1056
1056
|
return;
|
|
1057
1057
|
const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = a.length;
|
|
1058
1058
|
let c;
|
|
@@ -1061,7 +1061,7 @@ function he(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
1063
|
function Ft(e, t) {
|
|
1064
|
-
if (
|
|
1064
|
+
if (pe(e))
|
|
1065
1065
|
return null;
|
|
1066
1066
|
t = t.toLowerCase();
|
|
1067
1067
|
const n = Object.keys(e);
|
|
@@ -1071,17 +1071,17 @@ function Ft(e, t) {
|
|
|
1071
1071
|
return r;
|
|
1072
1072
|
return null;
|
|
1073
1073
|
}
|
|
1074
|
-
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Bt = (e) => !
|
|
1074
|
+
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Bt = (e) => !re(e) && e !== X;
|
|
1075
1075
|
function je() {
|
|
1076
1076
|
const { caseless: e, skipUndefined: t } = Bt(this) && this || {}, n = {}, s = (r, a) => {
|
|
1077
1077
|
const o = e && Ft(n, a) || a;
|
|
1078
|
-
Se(n[o]) && Se(r) ? n[o] = je(n[o], r) : Se(r) ? n[o] = je({}, r) :
|
|
1078
|
+
Se(n[o]) && Se(r) ? n[o] = je(n[o], r) : Se(r) ? n[o] = je({}, r) : ae(r) ? n[o] = r.slice() : (!t || !re(r)) && (n[o] = r);
|
|
1079
1079
|
};
|
|
1080
1080
|
for (let r = 0, a = arguments.length; r < a; r++)
|
|
1081
|
-
arguments[r] &&
|
|
1081
|
+
arguments[r] && me(arguments[r], s);
|
|
1082
1082
|
return n;
|
|
1083
1083
|
}
|
|
1084
|
-
const br = (e, t, n, { allOwnKeys: s } = {}) => (
|
|
1084
|
+
const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
1085
1085
|
n && P(r) ? e[a] = At(r, n) : e[a] = r;
|
|
1086
1086
|
}, { allOwnKeys: s }), e), xr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Sr = (e, t, n, s) => {
|
|
1087
1087
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -1103,7 +1103,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
|
|
|
1103
1103
|
return s !== -1 && s === n;
|
|
1104
1104
|
}, _r = (e) => {
|
|
1105
1105
|
if (!e) return null;
|
|
1106
|
-
if (
|
|
1106
|
+
if (ae(e)) return e;
|
|
1107
1107
|
let t = e.length;
|
|
1108
1108
|
if (!Lt(t)) return null;
|
|
1109
1109
|
const n = new Array(t);
|
|
@@ -1111,7 +1111,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
|
|
|
1111
1111
|
n[t] = e[t];
|
|
1112
1112
|
return n;
|
|
1113
1113
|
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && We(Uint8Array)), Rr = (e, t) => {
|
|
1114
|
-
const s = (e && e[
|
|
1114
|
+
const s = (e && e[Te]).call(e);
|
|
1115
1115
|
let r;
|
|
1116
1116
|
for (; (r = s.next()) && !r.done; ) {
|
|
1117
1117
|
const a = r.value;
|
|
@@ -1128,13 +1128,13 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
|
|
|
1128
1128
|
function(n, s, r) {
|
|
1129
1129
|
return s.toUpperCase() + r;
|
|
1130
1130
|
}
|
|
1131
|
-
), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
1131
|
+
), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tr = j("RegExp"), Nt = (e, t) => {
|
|
1132
1132
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
1133
|
-
|
|
1133
|
+
me(n, (r, a) => {
|
|
1134
1134
|
let o;
|
|
1135
1135
|
(o = t(r, a, e)) !== !1 && (s[a] = o || r);
|
|
1136
1136
|
}), Object.defineProperties(e, s);
|
|
1137
|
-
},
|
|
1137
|
+
}, $r = (e) => {
|
|
1138
1138
|
Nt(e, (t, n) => {
|
|
1139
1139
|
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1140
1140
|
return !1;
|
|
@@ -1155,72 +1155,72 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
|
|
|
1155
1155
|
n[a] = !0;
|
|
1156
1156
|
});
|
|
1157
1157
|
};
|
|
1158
|
-
return
|
|
1158
|
+
return ae(e) ? s(e) : s(String(e).split(t)), n;
|
|
1159
1159
|
}, Fr = () => {
|
|
1160
1160
|
}, Br = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1161
1161
|
function Nr(e) {
|
|
1162
|
-
return !!(e && P(e.append) && e[
|
|
1162
|
+
return !!(e && P(e.append) && e[Tt] === "FormData" && e[Te]);
|
|
1163
1163
|
}
|
|
1164
1164
|
const Pr = (e) => {
|
|
1165
1165
|
const t = new Array(10), n = (s, r) => {
|
|
1166
|
-
if (
|
|
1166
|
+
if (he(s)) {
|
|
1167
1167
|
if (t.indexOf(s) >= 0)
|
|
1168
1168
|
return;
|
|
1169
|
-
if (
|
|
1169
|
+
if (pe(s))
|
|
1170
1170
|
return s;
|
|
1171
1171
|
if (!("toJSON" in s)) {
|
|
1172
1172
|
t[r] = s;
|
|
1173
|
-
const a =
|
|
1174
|
-
return
|
|
1173
|
+
const a = ae(s) ? [] : {};
|
|
1174
|
+
return me(s, (o, c) => {
|
|
1175
1175
|
const l = n(o, r + 1);
|
|
1176
|
-
!
|
|
1176
|
+
!re(l) && (a[c] = l);
|
|
1177
1177
|
}), t[r] = void 0, a;
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
return s;
|
|
1181
1181
|
};
|
|
1182
1182
|
return n(e, 0);
|
|
1183
|
-
}, Hr = j("AsyncFunction"), Ur = (e) => e && (
|
|
1183
|
+
}, Hr = j("AsyncFunction"), Ur = (e) => e && (he(e) || P(e)) && P(e.then) && P(e.catch), Pt = ((e, t) => e ? setImmediate : t ? ((n, s) => (X.addEventListener("message", ({ source: r, data: a }) => {
|
|
1184
1184
|
r === X && a === n && s.length && s.shift()();
|
|
1185
1185
|
}, !1), (r) => {
|
|
1186
1186
|
s.push(r), X.postMessage(n, "*");
|
|
1187
1187
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1188
1188
|
typeof setImmediate == "function",
|
|
1189
1189
|
P(X.postMessage)
|
|
1190
|
-
), Vr = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Pt, Dr = (e) => e != null && P(e[
|
|
1191
|
-
isArray:
|
|
1192
|
-
isArrayBuffer:
|
|
1193
|
-
isBuffer:
|
|
1190
|
+
), Vr = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Pt, Dr = (e) => e != null && P(e[Te]), u = {
|
|
1191
|
+
isArray: ae,
|
|
1192
|
+
isArrayBuffer: $t,
|
|
1193
|
+
isBuffer: pe,
|
|
1194
1194
|
isFormData: fr,
|
|
1195
1195
|
isArrayBufferView: sr,
|
|
1196
1196
|
isString: rr,
|
|
1197
1197
|
isNumber: Lt,
|
|
1198
1198
|
isBoolean: or,
|
|
1199
|
-
isObject:
|
|
1199
|
+
isObject: he,
|
|
1200
1200
|
isPlainObject: Se,
|
|
1201
1201
|
isEmptyObject: ar,
|
|
1202
1202
|
isReadableStream: hr,
|
|
1203
1203
|
isRequest: mr,
|
|
1204
1204
|
isResponse: gr,
|
|
1205
1205
|
isHeaders: yr,
|
|
1206
|
-
isUndefined:
|
|
1206
|
+
isUndefined: re,
|
|
1207
1207
|
isDate: ir,
|
|
1208
1208
|
isFile: lr,
|
|
1209
1209
|
isBlob: cr,
|
|
1210
|
-
isRegExp:
|
|
1210
|
+
isRegExp: Tr,
|
|
1211
1211
|
isFunction: P,
|
|
1212
1212
|
isStream: dr,
|
|
1213
1213
|
isURLSearchParams: pr,
|
|
1214
1214
|
isTypedArray: kr,
|
|
1215
1215
|
isFileList: ur,
|
|
1216
|
-
forEach:
|
|
1216
|
+
forEach: me,
|
|
1217
1217
|
merge: je,
|
|
1218
1218
|
extend: br,
|
|
1219
1219
|
trim: wr,
|
|
1220
1220
|
stripBOM: xr,
|
|
1221
1221
|
inherits: Sr,
|
|
1222
1222
|
toFlatObject: vr,
|
|
1223
|
-
kindOf:
|
|
1223
|
+
kindOf: $e,
|
|
1224
1224
|
kindOfTest: j,
|
|
1225
1225
|
endsWith: Cr,
|
|
1226
1226
|
toArray: _r,
|
|
@@ -1231,7 +1231,7 @@ const Pr = (e) => {
|
|
|
1231
1231
|
hasOwnProp: rt,
|
|
1232
1232
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1233
1233
|
reduceDescriptors: Nt,
|
|
1234
|
-
freezeMethods:
|
|
1234
|
+
freezeMethods: $r,
|
|
1235
1235
|
toObjectSet: Lr,
|
|
1236
1236
|
toCamelCase: Ar,
|
|
1237
1237
|
noop: Fr,
|
|
@@ -1365,14 +1365,14 @@ function Fe(e, t, n) {
|
|
|
1365
1365
|
if (!u.isUndefined(h)) {
|
|
1366
1366
|
if (f.indexOf(h) !== -1)
|
|
1367
1367
|
throw Error("Circular reference detected in " + w.join("."));
|
|
1368
|
-
f.push(h), u.forEach(h, function(k,
|
|
1368
|
+
f.push(h), u.forEach(h, function(k, $) {
|
|
1369
1369
|
(!(u.isUndefined(k) || k === null) && r.call(
|
|
1370
1370
|
t,
|
|
1371
1371
|
k,
|
|
1372
|
-
u.isString(
|
|
1372
|
+
u.isString($) ? $.trim() : $,
|
|
1373
1373
|
w,
|
|
1374
1374
|
b
|
|
1375
|
-
)) === !0 && E(k, w ? w.concat(
|
|
1375
|
+
)) === !0 && E(k, w ? w.concat($) : [$]);
|
|
1376
1376
|
}), f.pop();
|
|
1377
1377
|
}
|
|
1378
1378
|
}
|
|
@@ -1409,13 +1409,13 @@ Dt.toString = function(t) {
|
|
|
1409
1409
|
return n(r[0]) + "=" + n(r[1]);
|
|
1410
1410
|
}, "").join("&");
|
|
1411
1411
|
};
|
|
1412
|
-
function
|
|
1412
|
+
function zr(e) {
|
|
1413
1413
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1414
1414
|
}
|
|
1415
1415
|
function jt(e, t, n) {
|
|
1416
1416
|
if (!t)
|
|
1417
1417
|
return e;
|
|
1418
|
-
const s = n && n.encode ||
|
|
1418
|
+
const s = n && n.encode || zr;
|
|
1419
1419
|
u.isFunction(n) && (n = {
|
|
1420
1420
|
serialize: n
|
|
1421
1421
|
});
|
|
@@ -1485,10 +1485,10 @@ const Mt = {
|
|
|
1485
1485
|
silentJSONParsing: !0,
|
|
1486
1486
|
forcedJSONParsing: !0,
|
|
1487
1487
|
clarifyTimeoutError: !1
|
|
1488
|
-
},
|
|
1488
|
+
}, qr = typeof URLSearchParams < "u" ? URLSearchParams : Je, Wr = typeof FormData < "u" ? FormData : null, Jr = typeof Blob < "u" ? Blob : null, Kr = {
|
|
1489
1489
|
isBrowser: !0,
|
|
1490
1490
|
classes: {
|
|
1491
|
-
URLSearchParams:
|
|
1491
|
+
URLSearchParams: qr,
|
|
1492
1492
|
FormData: Wr,
|
|
1493
1493
|
Blob: Jr
|
|
1494
1494
|
},
|
|
@@ -1550,7 +1550,7 @@ function no(e, t, n) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
return (n || JSON.stringify)(e);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const ge = {
|
|
1554
1554
|
transitional: Mt,
|
|
1555
1555
|
adapter: ["xhr", "http", "fetch"],
|
|
1556
1556
|
transformRequest: [function(t, n) {
|
|
@@ -1579,7 +1579,7 @@ const me = {
|
|
|
1579
1579
|
return a || r ? (n.setContentType("application/json", !1), no(t)) : t;
|
|
1580
1580
|
}],
|
|
1581
1581
|
transformResponse: [function(t) {
|
|
1582
|
-
const n = this.transitional ||
|
|
1582
|
+
const n = this.transitional || ge.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
1583
1583
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
1584
1584
|
return t;
|
|
1585
1585
|
if (t && u.isString(t) && (s && !this.responseType || r)) {
|
|
@@ -1617,7 +1617,7 @@ const me = {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
};
|
|
1619
1619
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1620
|
-
|
|
1620
|
+
ge.headers[e] = {};
|
|
1621
1621
|
});
|
|
1622
1622
|
const so = u.toObjectSet([
|
|
1623
1623
|
"age",
|
|
@@ -1645,7 +1645,7 @@ const so = u.toObjectSet([
|
|
|
1645
1645
|
r = o.indexOf(":"), n = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!n || t[n] && so[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
1646
1646
|
}), t;
|
|
1647
1647
|
}, lt = Symbol("internals");
|
|
1648
|
-
function
|
|
1648
|
+
function de(e) {
|
|
1649
1649
|
return e && String(e).trim().toLowerCase();
|
|
1650
1650
|
}
|
|
1651
1651
|
function ve(e) {
|
|
@@ -1690,7 +1690,7 @@ let H = class {
|
|
|
1690
1690
|
set(t, n, s) {
|
|
1691
1691
|
const r = this;
|
|
1692
1692
|
function a(c, l, i) {
|
|
1693
|
-
const d =
|
|
1693
|
+
const d = de(l);
|
|
1694
1694
|
if (!d)
|
|
1695
1695
|
throw new Error("header name must be a non-empty string");
|
|
1696
1696
|
const f = u.findKey(r, d);
|
|
@@ -1714,7 +1714,7 @@ let H = class {
|
|
|
1714
1714
|
return this;
|
|
1715
1715
|
}
|
|
1716
1716
|
get(t, n) {
|
|
1717
|
-
if (t =
|
|
1717
|
+
if (t = de(t), t) {
|
|
1718
1718
|
const s = u.findKey(this, t);
|
|
1719
1719
|
if (s) {
|
|
1720
1720
|
const r = this[s];
|
|
@@ -1731,7 +1731,7 @@ let H = class {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
has(t, n) {
|
|
1734
|
-
if (t =
|
|
1734
|
+
if (t = de(t), t) {
|
|
1735
1735
|
const s = u.findKey(this, t);
|
|
1736
1736
|
return !!(s && this[s] !== void 0 && (!n || He(this, this[s], s, n)));
|
|
1737
1737
|
}
|
|
@@ -1741,7 +1741,7 @@ let H = class {
|
|
|
1741
1741
|
const s = this;
|
|
1742
1742
|
let r = !1;
|
|
1743
1743
|
function a(o) {
|
|
1744
|
-
if (o =
|
|
1744
|
+
if (o = de(o), o) {
|
|
1745
1745
|
const c = u.findKey(s, o);
|
|
1746
1746
|
c && (!n || He(s, s[c], c, n)) && (delete s[c], r = !0);
|
|
1747
1747
|
}
|
|
@@ -1803,7 +1803,7 @@ let H = class {
|
|
|
1803
1803
|
accessors: {}
|
|
1804
1804
|
}).accessors, r = this.prototype;
|
|
1805
1805
|
function a(o) {
|
|
1806
|
-
const c =
|
|
1806
|
+
const c = de(o);
|
|
1807
1807
|
s[c] || (lo(r, o), s[c] = !0);
|
|
1808
1808
|
}
|
|
1809
1809
|
return u.isArray(t) ? t.forEach(a) : a(t), this;
|
|
@@ -1821,22 +1821,22 @@ u.reduceDescriptors(H.prototype, ({ value: e }, t) => {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
u.freezeMethods(H);
|
|
1823
1823
|
function Ue(e, t) {
|
|
1824
|
-
const n = this ||
|
|
1824
|
+
const n = this || ge, s = t || n, r = H.from(s.headers);
|
|
1825
1825
|
let a = s.data;
|
|
1826
1826
|
return u.forEach(e, function(c) {
|
|
1827
1827
|
a = c.call(n, a, r.normalize(), t ? t.status : void 0);
|
|
1828
1828
|
}), r.normalize(), a;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function zt(e) {
|
|
1831
1831
|
return !!(e && e.__CANCEL__);
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function ie(e, t, n) {
|
|
1834
1834
|
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1835
1835
|
}
|
|
1836
|
-
u.inherits(
|
|
1836
|
+
u.inherits(ie, S, {
|
|
1837
1837
|
__CANCEL__: !0
|
|
1838
1838
|
});
|
|
1839
|
-
function
|
|
1839
|
+
function qt(e, t, n) {
|
|
1840
1840
|
const s = n.config.validateStatus;
|
|
1841
1841
|
!n.status || !s || s(n.status) ? e(n) : t(new S(
|
|
1842
1842
|
"Request failed with status code " + n.status,
|
|
@@ -2056,7 +2056,7 @@ const Jt = (e) => {
|
|
|
2056
2056
|
config: e,
|
|
2057
2057
|
request: m
|
|
2058
2058
|
};
|
|
2059
|
-
|
|
2059
|
+
qt(function(U) {
|
|
2060
2060
|
n(U), w();
|
|
2061
2061
|
}, function(U) {
|
|
2062
2062
|
s(U), w();
|
|
@@ -2081,11 +2081,11 @@ const Jt = (e) => {
|
|
|
2081
2081
|
}, a === void 0 && o.setContentType(null), "setRequestHeader" in m && u.forEach(o.toJSON(), function(B, D) {
|
|
2082
2082
|
m.setRequestHeader(D, B);
|
|
2083
2083
|
}), u.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), c && c !== "json" && (m.responseType = r.responseType), i && ([b, h] = ke(i, !0), m.addEventListener("progress", b)), l && m.upload && ([f, E] = ke(l), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (d = (A) => {
|
|
2084
|
-
m && (s(!A || A.type ? new
|
|
2084
|
+
m && (s(!A || A.type ? new ie(null, e, m) : A), m.abort(), m = null);
|
|
2085
2085
|
}, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
|
|
2086
|
-
const
|
|
2087
|
-
if (
|
|
2088
|
-
s(new S("Unsupported protocol " +
|
|
2086
|
+
const $ = co(r.url);
|
|
2087
|
+
if ($ && L.protocols.indexOf($) === -1) {
|
|
2088
|
+
s(new S("Unsupported protocol " + $ + ":", S.ERR_BAD_REQUEST, e));
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
2091
|
m.send(a || null);
|
|
@@ -2098,7 +2098,7 @@ const Jt = (e) => {
|
|
|
2098
2098
|
if (!r) {
|
|
2099
2099
|
r = !0, c();
|
|
2100
2100
|
const d = i instanceof Error ? i : this.reason;
|
|
2101
|
-
s.abort(d instanceof S ? d : new
|
|
2101
|
+
s.abort(d instanceof S ? d : new ie(d instanceof Error ? d.message : d));
|
|
2102
2102
|
}
|
|
2103
2103
|
};
|
|
2104
2104
|
let o = t && setTimeout(() => {
|
|
@@ -2233,7 +2233,7 @@ const Jt = (e) => {
|
|
|
2233
2233
|
url: w,
|
|
2234
2234
|
method: m,
|
|
2235
2235
|
data: k,
|
|
2236
|
-
signal:
|
|
2236
|
+
signal: $,
|
|
2237
2237
|
cancelToken: A,
|
|
2238
2238
|
timeout: B,
|
|
2239
2239
|
onDownloadProgress: D,
|
|
@@ -2244,7 +2244,7 @@ const Jt = (e) => {
|
|
|
2244
2244
|
fetchOptions: Ze
|
|
2245
2245
|
} = Jt(h), Xe = t || fetch;
|
|
2246
2246
|
U = U ? (U + "").toLowerCase() : "text";
|
|
2247
|
-
let we = bo([
|
|
2247
|
+
let we = bo([$, A && A.toAbortSignal()], B), le = null;
|
|
2248
2248
|
const G = we && we.unsubscribe && (() => {
|
|
2249
2249
|
we.unsubscribe();
|
|
2250
2250
|
});
|
|
@@ -2255,8 +2255,8 @@ const Jt = (e) => {
|
|
|
2255
2255
|
method: "POST",
|
|
2256
2256
|
body: k,
|
|
2257
2257
|
duplex: "half"
|
|
2258
|
-
}),
|
|
2259
|
-
if (u.isFormData(k) && (
|
|
2258
|
+
}), ne;
|
|
2259
|
+
if (u.isFormData(k) && (ne = J.headers.get("content-type")) && Ne.setContentType(ne), J.body) {
|
|
2260
2260
|
const [Pe, be] = ct(
|
|
2261
2261
|
Qe,
|
|
2262
2262
|
ke(ut(K))
|
|
@@ -2274,16 +2274,16 @@ const Jt = (e) => {
|
|
|
2274
2274
|
duplex: "half",
|
|
2275
2275
|
credentials: M ? ye : void 0
|
|
2276
2276
|
};
|
|
2277
|
-
|
|
2278
|
-
let W = await (a ? Xe(
|
|
2277
|
+
le = a && new n(w, Ye);
|
|
2278
|
+
let W = await (a ? Xe(le, Ze) : Xe(w, Ye));
|
|
2279
2279
|
const et = d && (U === "stream" || U === "response");
|
|
2280
2280
|
if (d && (D || et && G)) {
|
|
2281
2281
|
const J = {};
|
|
2282
2282
|
["status", "statusText", "headers"].forEach((tt) => {
|
|
2283
2283
|
J[tt] = W[tt];
|
|
2284
2284
|
});
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2285
|
+
const ne = u.toFiniteNumber(W.headers.get("content-length")), [Pe, be] = D && ct(
|
|
2286
|
+
ne,
|
|
2287
2287
|
ke(ut(D), !0)
|
|
2288
2288
|
) || [];
|
|
2289
2289
|
W = new s(
|
|
@@ -2295,23 +2295,23 @@ const Jt = (e) => {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
U = U || "text";
|
|
2297
2297
|
let en = await f[u.findKey(f, U) || "text"](W, h);
|
|
2298
|
-
return !et && G && G(), await new Promise((J,
|
|
2299
|
-
|
|
2298
|
+
return !et && G && G(), await new Promise((J, ne) => {
|
|
2299
|
+
qt(J, ne, {
|
|
2300
2300
|
data: en,
|
|
2301
2301
|
headers: H.from(W.headers),
|
|
2302
2302
|
status: W.status,
|
|
2303
2303
|
statusText: W.statusText,
|
|
2304
2304
|
config: h,
|
|
2305
|
-
request:
|
|
2305
|
+
request: le
|
|
2306
2306
|
});
|
|
2307
2307
|
});
|
|
2308
2308
|
} catch (M) {
|
|
2309
2309
|
throw G && G(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
|
|
2310
|
-
new S("Network Error", S.ERR_NETWORK, h,
|
|
2310
|
+
new S("Network Error", S.ERR_NETWORK, h, le),
|
|
2311
2311
|
{
|
|
2312
2312
|
cause: M.cause || M
|
|
2313
2313
|
}
|
|
2314
|
-
) : S.from(M, M && M.code, h,
|
|
2314
|
+
) : S.from(M, M && M.code, h, le);
|
|
2315
2315
|
}
|
|
2316
2316
|
};
|
|
2317
2317
|
}, ko = /* @__PURE__ */ new Map(), Kt = (e) => {
|
|
@@ -2386,20 +2386,20 @@ const Gt = {
|
|
|
2386
2386
|
};
|
|
2387
2387
|
function Ve(e) {
|
|
2388
2388
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2389
|
-
throw new
|
|
2389
|
+
throw new ie(null, e);
|
|
2390
2390
|
}
|
|
2391
2391
|
function wt(e) {
|
|
2392
2392
|
return Ve(e), e.headers = H.from(e.headers), e.data = Ue.call(
|
|
2393
2393
|
e,
|
|
2394
2394
|
e.transformRequest
|
|
2395
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter ||
|
|
2395
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || ge.adapter, e)(e).then(function(s) {
|
|
2396
2396
|
return Ve(e), s.data = Ue.call(
|
|
2397
2397
|
e,
|
|
2398
2398
|
e.transformResponse,
|
|
2399
2399
|
s
|
|
2400
2400
|
), s.headers = H.from(s.headers), s;
|
|
2401
2401
|
}, function(s) {
|
|
2402
|
-
return
|
|
2402
|
+
return zt(s) || (Ve(e), s && s.response && (s.response.data = Ue.call(
|
|
2403
2403
|
e,
|
|
2404
2404
|
e.transformResponse,
|
|
2405
2405
|
s.response
|
|
@@ -2603,7 +2603,7 @@ let Ao = class Xt {
|
|
|
2603
2603
|
s.unsubscribe(a);
|
|
2604
2604
|
}, o;
|
|
2605
2605
|
}, t(function(a, o, c) {
|
|
2606
|
-
s.reason || (s.reason = new
|
|
2606
|
+
s.reason || (s.reason = new ie(a, o, c), n(s.reason));
|
|
2607
2607
|
});
|
|
2608
2608
|
}
|
|
2609
2609
|
/**
|
|
@@ -2652,15 +2652,15 @@ let Ao = class Xt {
|
|
|
2652
2652
|
};
|
|
2653
2653
|
}
|
|
2654
2654
|
};
|
|
2655
|
-
function
|
|
2655
|
+
function To(e) {
|
|
2656
2656
|
return function(n) {
|
|
2657
2657
|
return e.apply(null, n);
|
|
2658
2658
|
};
|
|
2659
2659
|
}
|
|
2660
|
-
function
|
|
2660
|
+
function $o(e) {
|
|
2661
2661
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
2662
2662
|
}
|
|
2663
|
-
const
|
|
2663
|
+
const ze = {
|
|
2664
2664
|
Continue: 100,
|
|
2665
2665
|
SwitchingProtocols: 101,
|
|
2666
2666
|
Processing: 102,
|
|
@@ -2731,8 +2731,8 @@ const qe = {
|
|
|
2731
2731
|
SslHandshakeFailed: 525,
|
|
2732
2732
|
InvalidSslCertificate: 526
|
|
2733
2733
|
};
|
|
2734
|
-
Object.entries(
|
|
2735
|
-
|
|
2734
|
+
Object.entries(ze).forEach(([e, t]) => {
|
|
2735
|
+
ze[t] = e;
|
|
2736
2736
|
});
|
|
2737
2737
|
function Qt(e) {
|
|
2738
2738
|
const t = new Q(e), n = At(Q.prototype.request, t);
|
|
@@ -2740,11 +2740,11 @@ function Qt(e) {
|
|
|
2740
2740
|
return Qt(ee(e, r));
|
|
2741
2741
|
}, n;
|
|
2742
2742
|
}
|
|
2743
|
-
const C = Qt(
|
|
2743
|
+
const C = Qt(ge);
|
|
2744
2744
|
C.Axios = Q;
|
|
2745
|
-
C.CanceledError =
|
|
2745
|
+
C.CanceledError = ie;
|
|
2746
2746
|
C.CancelToken = Ao;
|
|
2747
|
-
C.isCancel =
|
|
2747
|
+
C.isCancel = zt;
|
|
2748
2748
|
C.VERSION = Zt;
|
|
2749
2749
|
C.toFormData = Fe;
|
|
2750
2750
|
C.AxiosError = S;
|
|
@@ -2752,31 +2752,31 @@ C.Cancel = C.CanceledError;
|
|
|
2752
2752
|
C.all = function(t) {
|
|
2753
2753
|
return Promise.all(t);
|
|
2754
2754
|
};
|
|
2755
|
-
C.spread =
|
|
2756
|
-
C.isAxiosError =
|
|
2755
|
+
C.spread = To;
|
|
2756
|
+
C.isAxiosError = $o;
|
|
2757
2757
|
C.mergeConfig = ee;
|
|
2758
2758
|
C.AxiosHeaders = H;
|
|
2759
2759
|
C.formToJSON = (e) => It(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
2760
2760
|
C.getAdapter = Gt.getAdapter;
|
|
2761
|
-
C.HttpStatusCode =
|
|
2761
|
+
C.HttpStatusCode = ze;
|
|
2762
2762
|
C.default = C;
|
|
2763
2763
|
const {
|
|
2764
|
-
Axios:
|
|
2765
|
-
AxiosError:
|
|
2766
|
-
CanceledError:
|
|
2767
|
-
isCancel:
|
|
2768
|
-
CancelToken:
|
|
2769
|
-
VERSION:
|
|
2770
|
-
all:
|
|
2771
|
-
Cancel:
|
|
2772
|
-
isAxiosError:
|
|
2773
|
-
spread:
|
|
2774
|
-
toFormData:
|
|
2775
|
-
AxiosHeaders:
|
|
2764
|
+
Axios: Fa,
|
|
2765
|
+
AxiosError: Ba,
|
|
2766
|
+
CanceledError: Na,
|
|
2767
|
+
isCancel: Pa,
|
|
2768
|
+
CancelToken: Ha,
|
|
2769
|
+
VERSION: Ua,
|
|
2770
|
+
all: Va,
|
|
2771
|
+
Cancel: Da,
|
|
2772
|
+
isAxiosError: ja,
|
|
2773
|
+
spread: Ma,
|
|
2774
|
+
toFormData: Ia,
|
|
2775
|
+
AxiosHeaders: za,
|
|
2776
2776
|
HttpStatusCode: qa,
|
|
2777
|
-
formToJSON:
|
|
2778
|
-
getAdapter:
|
|
2779
|
-
mergeConfig:
|
|
2777
|
+
formToJSON: Wa,
|
|
2778
|
+
getAdapter: Ja,
|
|
2779
|
+
mergeConfig: Ka
|
|
2780
2780
|
} = C, Lo = (e) => {
|
|
2781
2781
|
const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2782
2782
|
return t ? t[2] : null;
|
|
@@ -2798,11 +2798,13 @@ const {
|
|
|
2798
2798
|
}, Yt = () => {
|
|
2799
2799
|
const e = window.location.hostname;
|
|
2800
2800
|
return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
|
|
2801
|
-
}, De = "bolt-token",
|
|
2802
|
-
const e =
|
|
2801
|
+
}, De = "bolt-next-token", te = Re("auth", () => {
|
|
2802
|
+
const e = oe({
|
|
2803
2803
|
user: null,
|
|
2804
2804
|
token: null,
|
|
2805
2805
|
ready: !1,
|
|
2806
|
+
// Dev JWT override token (bypasses normal auth flow)
|
|
2807
|
+
overrideToken: null,
|
|
2806
2808
|
// Configurable endpoints
|
|
2807
2809
|
endpoints: {
|
|
2808
2810
|
login: "/login",
|
|
@@ -2830,7 +2832,7 @@ const {
|
|
|
2830
2832
|
onLogoutError: null
|
|
2831
2833
|
}
|
|
2832
2834
|
}), t = (i = {}) => {
|
|
2833
|
-
i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks);
|
|
2835
|
+
i.endpoints && Object.assign(e.endpoints, i.endpoints), i.routes && Object.assign(e.routes, i.routes), i.devCredentials && Object.assign(e.devCredentials, i.devCredentials), i.callbacks && Object.assign(e.callbacks, i.callbacks), i.overrideToken && (e.overrideToken = i.overrideToken);
|
|
2834
2836
|
}, n = (i) => {
|
|
2835
2837
|
Fo(De, i), e.token = i;
|
|
2836
2838
|
}, s = () => {
|
|
@@ -2855,7 +2857,7 @@ const {
|
|
|
2855
2857
|
s(), e.user = null;
|
|
2856
2858
|
}
|
|
2857
2859
|
}, c = async () => {
|
|
2858
|
-
const i = r();
|
|
2860
|
+
const i = e.overrideToken || r();
|
|
2859
2861
|
if (!i)
|
|
2860
2862
|
return e.ready = !0, null;
|
|
2861
2863
|
try {
|
|
@@ -2864,13 +2866,13 @@ const {
|
|
|
2864
2866
|
Authorization: `Bearer ${i}`
|
|
2865
2867
|
}
|
|
2866
2868
|
});
|
|
2867
|
-
e.user = d, e.token = i;
|
|
2869
|
+
e.user = d, e.overrideToken || (e.token = i);
|
|
2868
2870
|
} catch {
|
|
2869
|
-
s();
|
|
2871
|
+
e.overrideToken || s();
|
|
2870
2872
|
} finally {
|
|
2871
2873
|
e.ready = !0;
|
|
2872
2874
|
}
|
|
2873
|
-
}, l =
|
|
2875
|
+
}, l = T(() => e.overrideToken ? !0 : !!e.token && !!e.user);
|
|
2874
2876
|
return {
|
|
2875
2877
|
state: e,
|
|
2876
2878
|
initialize: t,
|
|
@@ -2892,7 +2894,7 @@ const {
|
|
|
2892
2894
|
}, Vo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Do = { class: "mb-7" }, jo = { class: "text-gray-600" }, Mo = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Io = {
|
|
2893
2895
|
key: 0,
|
|
2894
2896
|
class: "text-red-600 text-sm mb-2"
|
|
2895
|
-
},
|
|
2897
|
+
}, zo = { key: 0 }, qo = { key: 1 }, Wo = {
|
|
2896
2898
|
__name: "SparkLoginView",
|
|
2897
2899
|
props: {
|
|
2898
2900
|
logo: {
|
|
@@ -2909,7 +2911,7 @@ const {
|
|
|
2909
2911
|
}
|
|
2910
2912
|
},
|
|
2911
2913
|
setup(e) {
|
|
2912
|
-
const t = Ee(), n = Oe(), s =
|
|
2914
|
+
const t = Ee(), n = Oe(), s = ma(), r = te(), a = e, o = q(!1), c = q(""), l = async (i) => {
|
|
2913
2915
|
o.value = !0, c.value = "";
|
|
2914
2916
|
try {
|
|
2915
2917
|
await r.login(i);
|
|
@@ -2992,7 +2994,7 @@ const {
|
|
|
2992
2994
|
class: "text-sm text-primary-600 font-semibold"
|
|
2993
2995
|
}, {
|
|
2994
2996
|
default: O(() => [...d[2] || (d[2] = [
|
|
2995
|
-
|
|
2997
|
+
qe(" Forgot password ", -1)
|
|
2996
2998
|
])]),
|
|
2997
2999
|
_: 1
|
|
2998
3000
|
}, 8, ["to"])
|
|
@@ -3005,7 +3007,7 @@ const {
|
|
|
3005
3007
|
"button-class": "w-full mb-2"
|
|
3006
3008
|
}, {
|
|
3007
3009
|
default: O(() => [
|
|
3008
|
-
o.value ? (g(), y("span",
|
|
3010
|
+
o.value ? (g(), y("span", qo, "Signing in...")) : (g(), y("span", zo, "Sign in"))
|
|
3009
3011
|
]),
|
|
3010
3012
|
_: 1
|
|
3011
3013
|
}, 8, ["disabled"])
|
|
@@ -3025,7 +3027,7 @@ const {
|
|
|
3025
3027
|
}
|
|
3026
3028
|
},
|
|
3027
3029
|
setup(e) {
|
|
3028
|
-
const t = Ee(), n = Oe(), s =
|
|
3030
|
+
const t = Ee(), n = Oe(), s = te(), r = e;
|
|
3029
3031
|
return sn(async () => {
|
|
3030
3032
|
await s.logout();
|
|
3031
3033
|
const a = n.query.redirect;
|
|
@@ -3058,7 +3060,7 @@ const {
|
|
|
3058
3060
|
}
|
|
3059
3061
|
},
|
|
3060
3062
|
setup(e) {
|
|
3061
|
-
const t =
|
|
3063
|
+
const t = te(), n = e, s = q(!1), r = q(""), a = q(""), o = async ({ email: c }) => {
|
|
3062
3064
|
s.value = !0, r.value = "", a.value = "";
|
|
3063
3065
|
try {
|
|
3064
3066
|
await C.post(t.state.endpoints.passwordEmail, { email: c }), a.value = "Password reset link sent! Check your email.";
|
|
@@ -3133,7 +3135,7 @@ const {
|
|
|
3133
3135
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
3134
3136
|
}, {
|
|
3135
3137
|
default: O(() => [...l[1] || (l[1] = [
|
|
3136
|
-
|
|
3138
|
+
qe(" Back to login ", -1)
|
|
3137
3139
|
])]),
|
|
3138
3140
|
_: 1
|
|
3139
3141
|
}, 8, ["to"])
|
|
@@ -3167,7 +3169,7 @@ const {
|
|
|
3167
3169
|
}
|
|
3168
3170
|
},
|
|
3169
3171
|
setup(e) {
|
|
3170
|
-
const t = Ee(), n = Oe(), s =
|
|
3172
|
+
const t = Ee(), n = Oe(), s = te(), r = e, a = q(!1), o = q(""), c = async ({ password: l, password_confirmation: i }) => {
|
|
3171
3173
|
a.value = !0, o.value = "";
|
|
3172
3174
|
try {
|
|
3173
3175
|
await C.post(s.state.endpoints.passwordReset, {
|
|
@@ -3257,7 +3259,7 @@ const {
|
|
|
3257
3259
|
};
|
|
3258
3260
|
}
|
|
3259
3261
|
};
|
|
3260
|
-
function
|
|
3262
|
+
function Ga(e = {}) {
|
|
3261
3263
|
const {
|
|
3262
3264
|
loginPath: t = "/login",
|
|
3263
3265
|
logoutPath: n = "/logout",
|
|
@@ -3297,15 +3299,19 @@ function Ka(e = {}) {
|
|
|
3297
3299
|
}
|
|
3298
3300
|
];
|
|
3299
3301
|
}
|
|
3300
|
-
function
|
|
3302
|
+
function Za(e, t = {}) {
|
|
3301
3303
|
const { defaultAuthenticatedRoute: n = "/dashboard" } = t;
|
|
3302
3304
|
e.beforeEach(async (s, r, a) => {
|
|
3303
|
-
const o =
|
|
3305
|
+
const o = te();
|
|
3304
3306
|
o.state.ready || await o.fetchUser(), pa(s, a, o, n);
|
|
3305
3307
|
});
|
|
3306
3308
|
}
|
|
3307
3309
|
function pa(e, t, n, s) {
|
|
3308
3310
|
const r = e.meta.auth !== !1, a = n.check;
|
|
3311
|
+
if (n.state.overrideToken && e.path === "/logout") {
|
|
3312
|
+
t({ path: s });
|
|
3313
|
+
return;
|
|
3314
|
+
}
|
|
3309
3315
|
if (!a) {
|
|
3310
3316
|
if (!r) {
|
|
3311
3317
|
if (e.path === "/logout") {
|
|
@@ -3338,8 +3344,45 @@ function pa(e, t, n, s) {
|
|
|
3338
3344
|
t();
|
|
3339
3345
|
}
|
|
3340
3346
|
}
|
|
3341
|
-
|
|
3342
|
-
const
|
|
3347
|
+
function ha(e = {}) {
|
|
3348
|
+
const t = C.create({
|
|
3349
|
+
baseURL: e.baseURL || "",
|
|
3350
|
+
timeout: e.timeout || 3e4,
|
|
3351
|
+
headers: {
|
|
3352
|
+
"Content-Type": "application/json",
|
|
3353
|
+
...e.headers
|
|
3354
|
+
}
|
|
3355
|
+
});
|
|
3356
|
+
return t.interceptors.request.use(
|
|
3357
|
+
(n) => {
|
|
3358
|
+
try {
|
|
3359
|
+
const s = te();
|
|
3360
|
+
s.state.overrideToken ? n.headers.Authorization = `Bearer ${s.state.overrideToken}` : s.state.token && (n.headers.Authorization = `Bearer ${s.state.token}`);
|
|
3361
|
+
} catch {
|
|
3362
|
+
}
|
|
3363
|
+
return n;
|
|
3364
|
+
},
|
|
3365
|
+
(n) => Promise.reject(n)
|
|
3366
|
+
), t.interceptors.response.use(
|
|
3367
|
+
(n) => n,
|
|
3368
|
+
async (n) => {
|
|
3369
|
+
if (n.response?.status === 401)
|
|
3370
|
+
try {
|
|
3371
|
+
const s = te();
|
|
3372
|
+
await s.logout(), window.location.href = s.state.routes.auth;
|
|
3373
|
+
} catch (s) {
|
|
3374
|
+
console.error("Error during auto-logout:", s), window.location.href = "/login";
|
|
3375
|
+
}
|
|
3376
|
+
return Promise.reject(n);
|
|
3377
|
+
}
|
|
3378
|
+
), t;
|
|
3379
|
+
}
|
|
3380
|
+
function Xa(e, t = {}) {
|
|
3381
|
+
const n = ha(t);
|
|
3382
|
+
return e.provide("axios", n), e.config.globalProperties.$axios = n, n;
|
|
3383
|
+
}
|
|
3384
|
+
const ma = Re("sparkApp", () => {
|
|
3385
|
+
const e = oe({
|
|
3343
3386
|
app: "",
|
|
3344
3387
|
icon: "",
|
|
3345
3388
|
homeRoute: "dashboard",
|
|
@@ -3352,8 +3395,8 @@ const ha = Re("sparkApp", () => {
|
|
|
3352
3395
|
e.app = n.app || "", e.icon = n.icon || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
|
|
3353
3396
|
}
|
|
3354
3397
|
};
|
|
3355
|
-
}),
|
|
3356
|
-
const e =
|
|
3398
|
+
}), Qa = Re("sparkNav", () => {
|
|
3399
|
+
const e = oe({
|
|
3357
3400
|
menu: [],
|
|
3358
3401
|
collapsed: !1,
|
|
3359
3402
|
hidden: !1
|
|
@@ -3409,30 +3452,32 @@ const ha = Re("sparkApp", () => {
|
|
|
3409
3452
|
});
|
|
3410
3453
|
export {
|
|
3411
3454
|
N as Icons,
|
|
3412
|
-
|
|
3455
|
+
ka as SparkAlert,
|
|
3413
3456
|
os as SparkAppSelector,
|
|
3414
3457
|
Ss as SparkBrandSelector,
|
|
3415
3458
|
Ae as SparkButton,
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3459
|
+
Ra as SparkButtonGroup,
|
|
3460
|
+
Ea as SparkCard,
|
|
3461
|
+
Aa as SparkDefaultContainer,
|
|
3419
3462
|
sa as SparkForgotPasswordView,
|
|
3420
3463
|
Wo as SparkLoginView,
|
|
3421
3464
|
Jo as SparkLogoutView,
|
|
3422
3465
|
As as SparkModalContainer,
|
|
3423
|
-
|
|
3466
|
+
Oa as SparkModalDialog,
|
|
3424
3467
|
nt as SparkOverlay,
|
|
3425
|
-
|
|
3468
|
+
Ta as SparkPublicContainer,
|
|
3426
3469
|
fa as SparkResetPasswordView,
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3470
|
+
Ca as addIcons,
|
|
3471
|
+
Ga as createAuthRoutes,
|
|
3472
|
+
ha as createAxiosInstance,
|
|
3473
|
+
Za as setupAuthGuards,
|
|
3474
|
+
Xa as setupAxios,
|
|
3475
|
+
_a as setupFontAwesome,
|
|
3476
|
+
ue as sparkModalService,
|
|
3432
3477
|
Z as sparkOverlayService,
|
|
3433
|
-
|
|
3434
|
-
|
|
3478
|
+
ma as useSparkAppStore,
|
|
3479
|
+
te as useSparkAuthStore,
|
|
3435
3480
|
Ot as useSparkBrandFilterStore,
|
|
3436
|
-
|
|
3481
|
+
Qa as useSparkNavStore,
|
|
3437
3482
|
st as useSparkOverlay
|
|
3438
3483
|
};
|