@wishbone-media/spark 0.11.0 → 0.12.1
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 +1392 -1320
- package/package.json +1 -1
- package/src/components/SparkAppSelector.vue +31 -55
- package/src/components/SparkOverlay.vue +1 -1
- package/src/composables/useSparkOverlay.js +2 -0
- package/src/containers/SparkDefaultContainer.vue +30 -5
- package/src/plugins/router.js +2 -2
- package/src/stores/app-selector.js +140 -0
- package/src/stores/app.js +0 -2
- package/src/stores/index.js +1 -0
- package/src/views/SparkResetPasswordView.vue +1 -1
package/dist/index.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { library as
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { faSignOut as
|
|
5
|
-
import { defineStore as
|
|
6
|
-
import { TransitionRoot as
|
|
7
|
-
import { useRouter as
|
|
1
|
+
import { computed as A, resolveComponent as U, createElementBlock as g, openBlock as m, normalizeClass as k, createElementVNode as f, createVNode as C, unref as b, renderSlot as M, reactive as se, Fragment as ie, renderList as me, createCommentVNode as _, toDisplayString as O, createBlock as Z, resolveDynamicComponent as $e, ref as q, inject as on, provide as an, markRaw as vt, withCtx as R, mergeProps as _t, toHandlers as kt, createTextVNode as J, useSlots as ln, withModifiers as fe, h as rt, onMounted as cn, watch as un } from "vue";
|
|
2
|
+
import { library as Rt } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import { FontAwesomeIcon as dn } from "@fortawesome/vue-fontawesome";
|
|
4
|
+
import { faSignOut as fn, faXmark as pn, faTimes as hn, faStreetView as mn, faSortUp as gn, faSortDown as yn, faSort as wn, faScaleBalanced as bn, faSatelliteDish as xn, faLayerPlus as Sn, faLaptopMobile as Cn, faInfoCircle as vn, faGripDotsVertical as _n, faGearComplex as kn, faFlag as Rn, faFaceSmileWink as En, faFaceSmileRelaxed as $n, faExclamationTriangle as An, faEllipsisVertical as Ln, faEllipsis as On, faEdit as Tn, faComments as Hn, faCircleXmark as Fn, faCircleUser as Bn, faChevronUp as Vn, faChevronRight as Nn, faChevronLeft as Pn, faChevronDown as Mn, faCheckCircle as Un, faCheck as jn, faBullhorn as Dn, faBellRing as In, faBarsSort as zn, faArrowRightToLine as qn, faArrowLeftToLine as Zn } from "@fortawesome/pro-regular-svg-icons";
|
|
5
|
+
import { defineStore as ge } from "pinia";
|
|
6
|
+
import { TransitionRoot as Et, Dialog as $t, TransitionChild as Ae, DialogPanel as At } from "@headlessui/vue";
|
|
7
|
+
import { useRouter as re, useRoute as Oe } from "vue-router";
|
|
8
8
|
const B = {
|
|
9
|
-
farArrowLeftToLine:
|
|
10
|
-
farArrowRightToLine:
|
|
11
|
-
farBarsSort:
|
|
12
|
-
farBellRing:
|
|
13
|
-
farBullhorn:
|
|
14
|
-
farCheck:
|
|
15
|
-
farCheckCircle:
|
|
16
|
-
farChevronDown:
|
|
17
|
-
farChevronLeft:
|
|
18
|
-
farChevronRight:
|
|
19
|
-
farChevronUp:
|
|
20
|
-
farCircleUser:
|
|
21
|
-
farCircleXmark:
|
|
22
|
-
farComments:
|
|
23
|
-
farEdit:
|
|
24
|
-
farEllipsis:
|
|
25
|
-
farEllipsisVertical:
|
|
26
|
-
farExclamationTriangle:
|
|
27
|
-
farFaceSmileRelaxed:
|
|
28
|
-
farFaceSmileWink:
|
|
29
|
-
farFlag:
|
|
30
|
-
farGearComplex:
|
|
31
|
-
farGripDotsVertical:
|
|
32
|
-
farInfoCircle:
|
|
33
|
-
farLaptopMobile:
|
|
34
|
-
farLayerPlus:
|
|
35
|
-
farSatelliteDish:
|
|
36
|
-
farScaleBalanced:
|
|
37
|
-
farSort:
|
|
38
|
-
farSortDown:
|
|
39
|
-
farSortUp:
|
|
40
|
-
farStreetView:
|
|
41
|
-
farTimes:
|
|
42
|
-
farXmark:
|
|
43
|
-
farSignOut:
|
|
9
|
+
farArrowLeftToLine: Zn,
|
|
10
|
+
farArrowRightToLine: qn,
|
|
11
|
+
farBarsSort: zn,
|
|
12
|
+
farBellRing: In,
|
|
13
|
+
farBullhorn: Dn,
|
|
14
|
+
farCheck: jn,
|
|
15
|
+
farCheckCircle: Un,
|
|
16
|
+
farChevronDown: Mn,
|
|
17
|
+
farChevronLeft: Pn,
|
|
18
|
+
farChevronRight: Nn,
|
|
19
|
+
farChevronUp: Vn,
|
|
20
|
+
farCircleUser: Bn,
|
|
21
|
+
farCircleXmark: Fn,
|
|
22
|
+
farComments: Hn,
|
|
23
|
+
farEdit: Tn,
|
|
24
|
+
farEllipsis: On,
|
|
25
|
+
farEllipsisVertical: Ln,
|
|
26
|
+
farExclamationTriangle: An,
|
|
27
|
+
farFaceSmileRelaxed: $n,
|
|
28
|
+
farFaceSmileWink: En,
|
|
29
|
+
farFlag: Rn,
|
|
30
|
+
farGearComplex: kn,
|
|
31
|
+
farGripDotsVertical: _n,
|
|
32
|
+
farInfoCircle: vn,
|
|
33
|
+
farLaptopMobile: Cn,
|
|
34
|
+
farLayerPlus: Sn,
|
|
35
|
+
farSatelliteDish: xn,
|
|
36
|
+
farScaleBalanced: bn,
|
|
37
|
+
farSort: wn,
|
|
38
|
+
farSortDown: yn,
|
|
39
|
+
farSortUp: gn,
|
|
40
|
+
farStreetView: mn,
|
|
41
|
+
farTimes: hn,
|
|
42
|
+
farXmark: pn,
|
|
43
|
+
farSignOut: fn
|
|
44
44
|
};
|
|
45
|
-
function
|
|
46
|
-
Object.assign(B, e),
|
|
45
|
+
function Qa(e) {
|
|
46
|
+
Object.assign(B, e), Rt.add(...Object.values(e));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
48
|
+
function ei(e) {
|
|
49
|
+
Rt.add(...Object.values(B)), e.component("FontAwesomeIcon", dn);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const Wn = { class: "flex items-center" }, Gn = { class: "shrink-0 self-start" }, Jn = { class: "ml-3" }, Kn = { class: "ml-auto pl-3 pt-1 self-start" }, Xn = { class: "-mx-1.5 -my-1.5" }, ti = {
|
|
52
52
|
__name: "SparkAlert",
|
|
53
53
|
props: {
|
|
54
54
|
type: {
|
|
@@ -59,51 +59,51 @@ const jn = { 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 = A(() => ({
|
|
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 = A(() => ({
|
|
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 = A(() => ({
|
|
73
73
|
success: "farCheckCircle",
|
|
74
74
|
warning: "farExclamationTriangle",
|
|
75
75
|
danger: "farCircleXmark",
|
|
76
76
|
info: "farInfoCircle"
|
|
77
|
-
})[t.type]), o =
|
|
77
|
+
})[t.type]), o = A(() => ({
|
|
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",
|
|
81
81
|
info: "text-blue-400 hover:bg-blue-100"
|
|
82
82
|
})[t.type]);
|
|
83
|
-
return (a,
|
|
84
|
-
const l =
|
|
83
|
+
return (a, i) => {
|
|
84
|
+
const l = U("font-awesome-icon");
|
|
85
85
|
return m(), g("div", {
|
|
86
|
-
class:
|
|
86
|
+
class: k(["rounded-md border p-4", n.value])
|
|
87
87
|
}, [
|
|
88
|
-
f("div",
|
|
89
|
-
f("div",
|
|
90
|
-
|
|
91
|
-
icon:
|
|
92
|
-
class:
|
|
88
|
+
f("div", Wn, [
|
|
89
|
+
f("div", Gn, [
|
|
90
|
+
C(l, {
|
|
91
|
+
icon: b(B)[r.value],
|
|
92
|
+
class: k(s.value)
|
|
93
93
|
}, null, 8, ["icon", "class"])
|
|
94
94
|
]),
|
|
95
|
-
f("div",
|
|
96
|
-
|
|
95
|
+
f("div", Jn, [
|
|
96
|
+
M(a.$slots, "default")
|
|
97
97
|
]),
|
|
98
|
-
f("div",
|
|
99
|
-
f("div",
|
|
98
|
+
f("div", Kn, [
|
|
99
|
+
f("div", Xn, [
|
|
100
100
|
f("button", {
|
|
101
101
|
type: "button",
|
|
102
|
-
class:
|
|
103
|
-
onClick:
|
|
102
|
+
class: k(["inline-flex rounded-md px-2 py-1.5", o.value]),
|
|
103
|
+
onClick: i[0] || (i[0] = (u) => a.$emit("close"))
|
|
104
104
|
}, [
|
|
105
|
-
|
|
106
|
-
icon:
|
|
105
|
+
C(l, {
|
|
106
|
+
icon: b(B).farXmark
|
|
107
107
|
}, null, 8, ["icon"])
|
|
108
108
|
], 2)
|
|
109
109
|
])
|
|
@@ -112,116 +112,198 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
112
112
|
], 2);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, Me = [
|
|
116
|
+
{
|
|
117
|
+
name: "3CX",
|
|
118
|
+
description: "VOIP Phone",
|
|
119
|
+
href: "https://tmrg.3cx.com.au:5001/webclient",
|
|
120
|
+
icon: "farLaptopMobile"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "Buzz",
|
|
124
|
+
description: "Communication on the go",
|
|
125
|
+
href: "https://buzz-next.letsbolt.io",
|
|
126
|
+
icon: "farSatelliteDish"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "Dash",
|
|
130
|
+
description: "Financial powerhouse",
|
|
131
|
+
href: "https://dash-next.letsbolt.io",
|
|
132
|
+
icon: "farScaleBalanced"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "MAPit",
|
|
136
|
+
description: "Geolocation everything",
|
|
137
|
+
href: "https://mapit-next.letsbolt.io",
|
|
138
|
+
icon: "farStreetView"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "ProspectR",
|
|
142
|
+
description: "Leads management",
|
|
143
|
+
href: "https://prospectr-next.letsbolt.io",
|
|
144
|
+
icon: "farFaceSmileRelaxed"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "ReVuze",
|
|
148
|
+
description: "Get Customer feedback",
|
|
149
|
+
href: "https://revuze-next.letsbolt.io",
|
|
150
|
+
icon: "farComments"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "Tabula",
|
|
154
|
+
description: "Admin interface",
|
|
155
|
+
href: "https://tabula.letsbolt.io",
|
|
156
|
+
icon: "farCompass"
|
|
157
|
+
}
|
|
158
|
+
], Lt = ge("sparkAppSelector", () => {
|
|
159
|
+
const e = se({
|
|
160
|
+
apps: [...Me]
|
|
161
|
+
}), t = (o = {}) => {
|
|
162
|
+
if (o.apps && Array.isArray(o.apps)) {
|
|
163
|
+
const a = o.apps.filter((i) => {
|
|
164
|
+
const l = i.name && i.description && i.icon && i.href;
|
|
165
|
+
return l || console.warn("useSparkAppSelectorStore: Invalid app object", i), l;
|
|
166
|
+
});
|
|
167
|
+
e.apps = a.map((i) => ({
|
|
168
|
+
name: i.name,
|
|
169
|
+
description: i.description,
|
|
170
|
+
icon: i.icon,
|
|
171
|
+
href: i.href
|
|
172
|
+
}));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (o.appHrefs && typeof o.appHrefs == "object") {
|
|
176
|
+
const a = /* @__PURE__ */ new Map();
|
|
177
|
+
Object.keys(o.appHrefs).forEach((i) => {
|
|
178
|
+
a.set(i.toLowerCase(), o.appHrefs[i]);
|
|
179
|
+
}), e.apps = Me.map((i) => {
|
|
180
|
+
const l = a.get(i.name.toLowerCase());
|
|
181
|
+
return {
|
|
182
|
+
...i,
|
|
183
|
+
href: l || i.href
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
e.apps = [...Me];
|
|
189
|
+
}, n = A(() => e.apps), s = (o) => {
|
|
190
|
+
if (!o) return null;
|
|
191
|
+
const a = o.toLowerCase();
|
|
192
|
+
return e.apps.find((i) => i.name.toLowerCase() === a) || null;
|
|
193
|
+
};
|
|
194
|
+
return {
|
|
195
|
+
state: e,
|
|
196
|
+
initialize: t,
|
|
197
|
+
allApps: n,
|
|
198
|
+
getAppByName: s,
|
|
199
|
+
getAppIcon: (o) => {
|
|
200
|
+
const a = s(o);
|
|
201
|
+
return a ? a.icon : "";
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}), Ot = ge("sparkApp", () => {
|
|
205
|
+
const e = se({
|
|
206
|
+
app: "",
|
|
207
|
+
homeRoute: "dashboard",
|
|
208
|
+
showBrandSelector: !0,
|
|
209
|
+
showAppSelector: !0
|
|
210
|
+
});
|
|
211
|
+
return {
|
|
212
|
+
state: e,
|
|
213
|
+
initialize: (n = {}) => {
|
|
214
|
+
e.app = n.app || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}), Yn = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Qn = { class: "flex flex-1 flex-col" }, es = { class: "divide-y divide-gray-200" }, ts = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, ns = { class: "ml-auto flex items-center" }, ss = ["href", "onClick"], rs = { class: "gap-y-1" }, os = { class: "text-base text-gray-800 flex items-center" }, as = { class: "font-medium" }, is = {
|
|
116
218
|
key: 0,
|
|
117
219
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
|
|
118
|
-
},
|
|
220
|
+
}, ls = { class: "text-sm text-gray-500" }, cs = { class: "ml-auto flex items-center" }, us = { class: "mt-auto" }, ds = {
|
|
221
|
+
key: 0,
|
|
222
|
+
class: "p-6"
|
|
223
|
+
}, fs = {
|
|
224
|
+
key: 1,
|
|
225
|
+
class: "bg-gray-50 p-6"
|
|
226
|
+
}, ps = {
|
|
119
227
|
__name: "SparkAppSelector",
|
|
120
228
|
props: {
|
|
121
|
-
|
|
122
|
-
type:
|
|
123
|
-
default
|
|
124
|
-
return [
|
|
125
|
-
{
|
|
126
|
-
name: "3CX",
|
|
127
|
-
description: "VOIP Phone",
|
|
128
|
-
href: "https://3cx.letsbolt.com.au",
|
|
129
|
-
icon: "farLaptopMobile"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
name: "Buzz",
|
|
133
|
-
description: "Communication on the go",
|
|
134
|
-
href: "https://buzz.letsbolt.com.au",
|
|
135
|
-
icon: "farSatelliteDish"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: "Dash",
|
|
139
|
-
description: "Financial powerhouse",
|
|
140
|
-
href: "https://dash.letsbolt.com.au",
|
|
141
|
-
icon: "farScaleBalanced"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: "MAPit",
|
|
145
|
-
description: "Geolocation everything",
|
|
146
|
-
href: "https://mapit.letsbolt.com.au",
|
|
147
|
-
icon: "farStreetView"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: "ProspectR",
|
|
151
|
-
description: "Leads management",
|
|
152
|
-
href: "https://prospectr.letsbolt.com.au",
|
|
153
|
-
icon: "farFaceSmileRelaxed"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "ReVuze",
|
|
157
|
-
description: "Get Customer feedback",
|
|
158
|
-
href: "https://revuze.letsbolt.com.au",
|
|
159
|
-
icon: "farComments"
|
|
160
|
-
}
|
|
161
|
-
];
|
|
162
|
-
}
|
|
229
|
+
bottomSlot: {
|
|
230
|
+
type: [Object, Function],
|
|
231
|
+
default: null
|
|
163
232
|
},
|
|
164
|
-
|
|
165
|
-
type:
|
|
166
|
-
default:
|
|
233
|
+
footerSlot: {
|
|
234
|
+
type: [Object, Function],
|
|
235
|
+
default: null
|
|
167
236
|
}
|
|
168
237
|
},
|
|
169
238
|
emits: ["close", "select"],
|
|
170
239
|
setup(e, { emit: t }) {
|
|
171
|
-
const n =
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
240
|
+
const n = t, s = Lt(), r = Ot(), o = A(() => {
|
|
241
|
+
const i = r.state.app;
|
|
242
|
+
return s.state.apps.map((l) => ({
|
|
243
|
+
...l,
|
|
244
|
+
current: i && l.name.toLowerCase() === i.toLowerCase()
|
|
245
|
+
}));
|
|
246
|
+
}), a = (i, l) => {
|
|
247
|
+
n("select", i);
|
|
176
248
|
};
|
|
177
|
-
return (
|
|
178
|
-
const
|
|
179
|
-
return m(), g("div",
|
|
180
|
-
f("div",
|
|
181
|
-
f("div",
|
|
182
|
-
f("div",
|
|
183
|
-
|
|
184
|
-
f("div",
|
|
185
|
-
|
|
186
|
-
icon:
|
|
249
|
+
return (i, l) => {
|
|
250
|
+
const u = U("font-awesome-icon");
|
|
251
|
+
return m(), g("div", Yn, [
|
|
252
|
+
f("div", Qn, [
|
|
253
|
+
f("div", es, [
|
|
254
|
+
f("div", ts, [
|
|
255
|
+
l[1] || (l[1] = f("div", null, "Mr Group Network", -1)),
|
|
256
|
+
f("div", ns, [
|
|
257
|
+
C(u, {
|
|
258
|
+
icon: b(B).farTimes,
|
|
187
259
|
class: "h-[15px] w-[15px] shrink-0 text-gray-400 cursor-pointer",
|
|
188
|
-
onClick:
|
|
260
|
+
onClick: l[0] || (l[0] = (c) => n("close"))
|
|
189
261
|
}, null, 8, ["icon"])
|
|
190
262
|
])
|
|
191
263
|
]),
|
|
192
|
-
(m(!0), g(
|
|
193
|
-
key:
|
|
194
|
-
|
|
195
|
-
|
|
264
|
+
(m(!0), g(ie, null, me(o.value, (c) => (m(), g("a", {
|
|
265
|
+
key: c.name,
|
|
266
|
+
href: c.href,
|
|
267
|
+
target: "_blank",
|
|
268
|
+
class: k([c.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
269
|
+
onClick: (h) => c.current ? h.preventDefault() : a(c)
|
|
196
270
|
}, [
|
|
197
|
-
f("div",
|
|
198
|
-
f("div",
|
|
199
|
-
f("div",
|
|
200
|
-
|
|
271
|
+
f("div", rs, [
|
|
272
|
+
f("div", os, [
|
|
273
|
+
f("div", as, O(c.name), 1),
|
|
274
|
+
c.current ? (m(), g("span", is, " Active ")) : _("", !0)
|
|
201
275
|
]),
|
|
202
|
-
f("div",
|
|
276
|
+
f("div", ls, O(c.description), 1)
|
|
203
277
|
]),
|
|
204
|
-
f("div",
|
|
205
|
-
|
|
206
|
-
class:
|
|
207
|
-
icon:
|
|
278
|
+
f("div", cs, [
|
|
279
|
+
C(u, {
|
|
280
|
+
class: k([c.current ? "text-gray-700" : "text-gray-400", "h-5 w-5 shrink-0"]),
|
|
281
|
+
icon: b(B)[c.icon]
|
|
208
282
|
}, null, 8, ["class", "icon"])
|
|
209
283
|
])
|
|
210
|
-
], 10,
|
|
211
|
-
|
|
284
|
+
], 10, ss))), 128)),
|
|
285
|
+
l[2] || (l[2] = f("div", null, null, -1))
|
|
212
286
|
]),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
287
|
+
f("div", us, [
|
|
288
|
+
i.$slots.bottom || e.bottomSlot ? (m(), g("div", ds, [
|
|
289
|
+
M(i.$slots, "bottom", {}, () => [
|
|
290
|
+
e.bottomSlot ? (m(), Z($e(e.bottomSlot), { key: 0 })) : _("", !0)
|
|
291
|
+
])
|
|
292
|
+
])) : _("", !0),
|
|
293
|
+
i.$slots.footer || e.footerSlot ? (m(), g("div", fs, [
|
|
294
|
+
M(i.$slots, "footer", {}, () => [
|
|
295
|
+
e.footerSlot ? (m(), Z($e(e.footerSlot), { key: 0 })) : _("", !0)
|
|
296
|
+
])
|
|
297
|
+
])) : _("", !0)
|
|
298
|
+
])
|
|
217
299
|
])
|
|
218
300
|
]);
|
|
219
301
|
};
|
|
220
302
|
}
|
|
221
|
-
},
|
|
303
|
+
}, Tt = ge(
|
|
222
304
|
"brandFilter",
|
|
223
305
|
() => {
|
|
224
|
-
const e =
|
|
306
|
+
const e = se({
|
|
225
307
|
brands: []
|
|
226
308
|
}), t = (o = {}) => {
|
|
227
309
|
if (!o.brands || !Array.isArray(o.brands)) {
|
|
@@ -229,18 +311,18 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
229
311
|
return;
|
|
230
312
|
}
|
|
231
313
|
const a = o.brands.filter((l) => {
|
|
232
|
-
const
|
|
233
|
-
return
|
|
234
|
-
}),
|
|
235
|
-
|
|
236
|
-
l.current = l ===
|
|
314
|
+
const u = l.id && l.name && l.logo;
|
|
315
|
+
return u || console.warn("useSparkBrandFilterStore: Invalid brand object", l), u;
|
|
316
|
+
}), i = a.filter((l) => l.current);
|
|
317
|
+
i.length === 0 && a.length > 0 ? a[0].current = !0 : i.length > 1 && a.forEach((l) => {
|
|
318
|
+
l.current = l === i[0];
|
|
237
319
|
}), e.brands = a.map((l) => ({
|
|
238
320
|
id: l.id,
|
|
239
321
|
name: l.name,
|
|
240
322
|
logo: l.logo,
|
|
241
323
|
current: l.current || !1
|
|
242
324
|
}));
|
|
243
|
-
}, n =
|
|
325
|
+
}, n = A(() => e.brands.find((o) => o.current) || null), s = A(() => e.brands);
|
|
244
326
|
return {
|
|
245
327
|
state: e,
|
|
246
328
|
initialize: t,
|
|
@@ -262,57 +344,57 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
262
344
|
paths: ["state.brands"]
|
|
263
345
|
}
|
|
264
346
|
}
|
|
265
|
-
),
|
|
347
|
+
), hs = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, ms = { class: "flex flex-1 flex-col" }, gs = { class: "divide-y divide-gray-200" }, ys = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, ws = { class: "ml-auto flex items-center" }, bs = {
|
|
266
348
|
key: 0,
|
|
267
349
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
268
|
-
},
|
|
350
|
+
}, xs = ["onClick"], Ss = { class: "gap-y-1 flex" }, Cs = { class: "flex items-center mr-4" }, vs = ["src", "alt"], _s = { class: "ml-auto flex flex-col" }, ks = { class: "text-base text-gray-800 flex items-center" }, Rs = { class: "font-medium" }, Es = {
|
|
269
351
|
key: 0,
|
|
270
352
|
class: "inline-flex items-center rounded-full bg-green-100 px-1.5 py-0.5 text-xs font-medium text-green-700 ml-1"
|
|
271
|
-
},
|
|
353
|
+
}, $s = { class: "text-sm text-gray-500" }, As = {
|
|
272
354
|
__name: "SparkBrandSelector",
|
|
273
355
|
emits: ["close", "select"],
|
|
274
356
|
setup(e, { emit: t }) {
|
|
275
|
-
const n = t, s =
|
|
357
|
+
const n = t, s = Tt(), r = (o) => {
|
|
276
358
|
n("select", o);
|
|
277
359
|
};
|
|
278
360
|
return (o, a) => {
|
|
279
|
-
const
|
|
280
|
-
return m(), g("div",
|
|
281
|
-
f("div",
|
|
282
|
-
f("div",
|
|
283
|
-
f("div",
|
|
361
|
+
const i = U("font-awesome-icon");
|
|
362
|
+
return m(), g("div", hs, [
|
|
363
|
+
f("div", ms, [
|
|
364
|
+
f("div", gs, [
|
|
365
|
+
f("div", ys, [
|
|
284
366
|
a[1] || (a[1] = f("div", null, "Filter by Brand", -1)),
|
|
285
|
-
f("div",
|
|
286
|
-
|
|
287
|
-
icon:
|
|
367
|
+
f("div", ws, [
|
|
368
|
+
C(i, {
|
|
369
|
+
icon: b(B).farTimes,
|
|
288
370
|
class: "size-4 text-gray-400 cursor-pointer",
|
|
289
371
|
onClick: a[0] || (a[0] = (l) => n("close"))
|
|
290
372
|
}, null, 8, ["icon"])
|
|
291
373
|
])
|
|
292
374
|
]),
|
|
293
|
-
|
|
294
|
-
(m(!0), g(
|
|
375
|
+
b(s).allBrands.length === 0 ? (m(), g("div", bs, " No brands configured ")) : _("", !0),
|
|
376
|
+
(m(!0), g(ie, null, me(b(s).allBrands, (l) => (m(), g("div", {
|
|
295
377
|
key: l.id,
|
|
296
|
-
class:
|
|
297
|
-
onClick: (
|
|
378
|
+
class: k([l.current ? "bg-gray-50" : "hover:bg-gray-50", "flex px-[22px] py-[15px] cursor-pointer"]),
|
|
379
|
+
onClick: (u) => r(l)
|
|
298
380
|
}, [
|
|
299
|
-
f("div",
|
|
300
|
-
f("div",
|
|
381
|
+
f("div", Ss, [
|
|
382
|
+
f("div", Cs, [
|
|
301
383
|
f("img", {
|
|
302
384
|
src: l.logo,
|
|
303
385
|
alt: `${l.name} logo`,
|
|
304
386
|
class: "h-8 w-auto"
|
|
305
|
-
}, null, 8,
|
|
387
|
+
}, null, 8, vs)
|
|
306
388
|
]),
|
|
307
|
-
f("div",
|
|
308
|
-
f("div",
|
|
309
|
-
f("div",
|
|
310
|
-
l.current ? (m(), g("span",
|
|
389
|
+
f("div", _s, [
|
|
390
|
+
f("div", ks, [
|
|
391
|
+
f("div", Rs, O(l.name), 1),
|
|
392
|
+
l.current ? (m(), g("span", Es, " Current ")) : _("", !0)
|
|
311
393
|
]),
|
|
312
|
-
f("div",
|
|
394
|
+
f("div", $s, O(l.current ? "Current Brand" : "Change to"), 1)
|
|
313
395
|
])
|
|
314
396
|
])
|
|
315
|
-
], 10,
|
|
397
|
+
], 10, xs))), 128)),
|
|
316
398
|
a[2] || (a[2] = f("div", null, null, -1))
|
|
317
399
|
]),
|
|
318
400
|
a[3] || (a[3] = f("div", { class: "mt-auto" }, null, -1))
|
|
@@ -320,7 +402,7 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
320
402
|
]);
|
|
321
403
|
};
|
|
322
404
|
}
|
|
323
|
-
},
|
|
405
|
+
}, Ls = ["disabled"], oe = {
|
|
324
406
|
__name: "SparkButton",
|
|
325
407
|
props: {
|
|
326
408
|
size: {
|
|
@@ -342,14 +424,14 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
342
424
|
}
|
|
343
425
|
},
|
|
344
426
|
setup(e) {
|
|
345
|
-
const t = e, n = q(null), s =
|
|
427
|
+
const t = e, n = q(null), s = on("buttonGroup", null), r = A(() => {
|
|
346
428
|
if (!s?.isInGroup || !n.value) return null;
|
|
347
|
-
const l = s.getButtonIndex(n.value),
|
|
429
|
+
const l = s.getButtonIndex(n.value), u = s.getButtonCount();
|
|
348
430
|
return {
|
|
349
431
|
isFirst: l === 0,
|
|
350
|
-
isLast: l ===
|
|
432
|
+
isLast: l === u - 1,
|
|
351
433
|
index: l,
|
|
352
|
-
total:
|
|
434
|
+
total: u
|
|
353
435
|
};
|
|
354
436
|
}), o = {
|
|
355
437
|
paddingX: /^px-/,
|
|
@@ -361,41 +443,41 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
361
443
|
borderRadius: /^rounded-/,
|
|
362
444
|
background: /^bg-/,
|
|
363
445
|
text: /^text-(?!white|black)/
|
|
364
|
-
}, a = (l,
|
|
365
|
-
if (!
|
|
366
|
-
const
|
|
367
|
-
return [...
|
|
446
|
+
}, a = (l, u) => {
|
|
447
|
+
if (!u) return l;
|
|
448
|
+
const c = l.split(" ").filter(Boolean), h = u.split(" ").filter(Boolean);
|
|
449
|
+
return [...c.filter((E) => !h.some((p) => {
|
|
368
450
|
const w = Object.entries(o).find(
|
|
369
|
-
([
|
|
451
|
+
([$, T]) => T.test(E)
|
|
370
452
|
)?.[0], y = Object.entries(o).find(
|
|
371
|
-
([
|
|
453
|
+
([$, T]) => T.test(p)
|
|
372
454
|
)?.[0];
|
|
373
455
|
return w && w === y;
|
|
374
|
-
})), ...
|
|
375
|
-
},
|
|
376
|
-
let l = "",
|
|
456
|
+
})), ...h].join(" ");
|
|
457
|
+
}, i = A(() => {
|
|
458
|
+
let l = "", u = "";
|
|
377
459
|
switch (t.size) {
|
|
378
460
|
case "xs":
|
|
379
|
-
l += " px-2 py-1 text-xs",
|
|
461
|
+
l += " px-2 py-1 text-xs", u = "sm";
|
|
380
462
|
break;
|
|
381
463
|
case "sm":
|
|
382
|
-
l += " px-2 py-1 text-sm",
|
|
464
|
+
l += " px-2 py-1 text-sm", u = "sm";
|
|
383
465
|
break;
|
|
384
466
|
case "md":
|
|
385
|
-
l += " px-2.5 py-1.5 text-sm",
|
|
467
|
+
l += " px-2.5 py-1.5 text-sm", u = "md";
|
|
386
468
|
break;
|
|
387
469
|
case "lg":
|
|
388
|
-
l += " px-3 py-2 text-sm",
|
|
470
|
+
l += " px-3 py-2 text-sm", u = "md";
|
|
389
471
|
break;
|
|
390
472
|
case "xl":
|
|
391
|
-
l += " px-3.5 py-2.5 text-sm",
|
|
473
|
+
l += " px-3.5 py-2.5 text-sm", u = "md";
|
|
392
474
|
break;
|
|
393
475
|
}
|
|
394
476
|
if (s?.isInGroup && r.value) {
|
|
395
|
-
const { isFirst:
|
|
396
|
-
l += " relative inline-flex items-center focus:z-10",
|
|
477
|
+
const { isFirst: c, isLast: h } = r.value;
|
|
478
|
+
l += " relative inline-flex items-center focus:z-10", c && h ? l += ` rounded-${u}` : c ? l += ` rounded-l-${u} rounded-r-none` : h ? l += ` rounded-r-${u} rounded-l-none -ml-px` : l += " rounded-none -ml-px";
|
|
397
479
|
} else
|
|
398
|
-
l += ` shadow-xs rounded-${
|
|
480
|
+
l += ` shadow-xs rounded-${u}`;
|
|
399
481
|
switch (t.variant) {
|
|
400
482
|
case "primary":
|
|
401
483
|
l += " bg-primary-600 hover:bg-primary-500 text-white";
|
|
@@ -420,22 +502,22 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
420
502
|
}
|
|
421
503
|
return l = a(l, t.buttonClass), l;
|
|
422
504
|
});
|
|
423
|
-
return (l,
|
|
505
|
+
return (l, u) => (m(), g("button", {
|
|
424
506
|
type: "button",
|
|
425
507
|
ref_key: "buttonRef",
|
|
426
508
|
ref: n,
|
|
427
|
-
class:
|
|
509
|
+
class: k(i.value),
|
|
428
510
|
disabled: e.disabled,
|
|
429
|
-
onClick:
|
|
511
|
+
onClick: u[0] || (u[0] = (c) => l.$emit("click"))
|
|
430
512
|
}, [
|
|
431
|
-
|
|
432
|
-
], 10,
|
|
513
|
+
M(l.$slots, "default")
|
|
514
|
+
], 10, Ls));
|
|
433
515
|
}
|
|
434
|
-
},
|
|
516
|
+
}, ni = {
|
|
435
517
|
__name: "SparkButtonGroup",
|
|
436
518
|
setup(e) {
|
|
437
519
|
const t = q(null);
|
|
438
|
-
return
|
|
520
|
+
return an("buttonGroup", {
|
|
439
521
|
isInGroup: !0,
|
|
440
522
|
getButtonIndex: (r) => t.value ? Array.from(t.value.children).indexOf(r) : -1,
|
|
441
523
|
getButtonCount: () => t.value?.children.length || 0
|
|
@@ -444,16 +526,16 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
444
526
|
ref_key: "groupRef",
|
|
445
527
|
ref: t
|
|
446
528
|
}, [
|
|
447
|
-
|
|
529
|
+
M(r.$slots, "default")
|
|
448
530
|
], 512));
|
|
449
531
|
}
|
|
450
|
-
},
|
|
532
|
+
}, Os = { class: "divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, Ts = {
|
|
451
533
|
key: 0,
|
|
452
534
|
class: "p-5"
|
|
453
|
-
},
|
|
535
|
+
}, Hs = {
|
|
454
536
|
key: 1,
|
|
455
537
|
class: "p-5"
|
|
456
|
-
},
|
|
538
|
+
}, si = {
|
|
457
539
|
__name: "SparkCard",
|
|
458
540
|
props: {
|
|
459
541
|
padded: {
|
|
@@ -467,24 +549,24 @@ const jn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
467
549
|
},
|
|
468
550
|
setup(e) {
|
|
469
551
|
const t = e;
|
|
470
|
-
return (n, s) => (m(), g("div",
|
|
471
|
-
n.$slots.header ? (m(), g("div",
|
|
472
|
-
|
|
473
|
-
])) :
|
|
552
|
+
return (n, s) => (m(), g("div", Os, [
|
|
553
|
+
n.$slots.header ? (m(), g("div", Ts, [
|
|
554
|
+
M(n.$slots, "header")
|
|
555
|
+
])) : _("", !0),
|
|
474
556
|
f("div", {
|
|
475
|
-
class:
|
|
557
|
+
class: k([t.padded ? t.paddedClass : ""])
|
|
476
558
|
}, [
|
|
477
|
-
|
|
559
|
+
M(n.$slots, "default")
|
|
478
560
|
], 2),
|
|
479
|
-
n.$slots.footer ? (m(), g("div",
|
|
480
|
-
|
|
481
|
-
])) :
|
|
561
|
+
n.$slots.footer ? (m(), g("div", Hs, [
|
|
562
|
+
M(n.$slots, "footer")
|
|
563
|
+
])) : _("", !0)
|
|
482
564
|
]));
|
|
483
565
|
}
|
|
484
566
|
};
|
|
485
|
-
class
|
|
567
|
+
class Fs {
|
|
486
568
|
constructor() {
|
|
487
|
-
this.state =
|
|
569
|
+
this.state = se({
|
|
488
570
|
isVisible: !1,
|
|
489
571
|
content: null,
|
|
490
572
|
props: {},
|
|
@@ -492,26 +574,26 @@ class Rs {
|
|
|
492
574
|
});
|
|
493
575
|
}
|
|
494
576
|
show = (t, n = {}, s = {}) => {
|
|
495
|
-
this.state.content =
|
|
577
|
+
this.state.content = vt(t), this.state.props = n, this.state.eventHandlers = s, this.state.isVisible = !0;
|
|
496
578
|
};
|
|
497
579
|
hide = () => {
|
|
498
580
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
499
581
|
};
|
|
500
582
|
}
|
|
501
|
-
const pe = new
|
|
583
|
+
const pe = new Fs(), Bs = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Vs = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Ns = {
|
|
502
584
|
__name: "SparkModalContainer",
|
|
503
585
|
setup(e) {
|
|
504
|
-
return (t, n) => (m(),
|
|
586
|
+
return (t, n) => (m(), Z(b(Et), {
|
|
505
587
|
as: "template",
|
|
506
|
-
show:
|
|
588
|
+
show: b(pe).state.isVisible
|
|
507
589
|
}, {
|
|
508
|
-
default:
|
|
509
|
-
|
|
590
|
+
default: R(() => [
|
|
591
|
+
C(b($t), {
|
|
510
592
|
class: "relative z-200",
|
|
511
|
-
onClose:
|
|
593
|
+
onClose: b(pe).hide
|
|
512
594
|
}, {
|
|
513
|
-
default:
|
|
514
|
-
|
|
595
|
+
default: R(() => [
|
|
596
|
+
C(b(Ae), {
|
|
515
597
|
as: "template",
|
|
516
598
|
enter: "ease-out duration-300",
|
|
517
599
|
"enter-from": "opacity-0",
|
|
@@ -520,14 +602,14 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
520
602
|
"leave-from": "opacity-100",
|
|
521
603
|
"leave-to": "opacity-0"
|
|
522
604
|
}, {
|
|
523
|
-
default:
|
|
605
|
+
default: R(() => [...n[0] || (n[0] = [
|
|
524
606
|
f("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
525
607
|
])]),
|
|
526
608
|
_: 1
|
|
527
609
|
}),
|
|
528
|
-
f("div",
|
|
529
|
-
f("div",
|
|
530
|
-
|
|
610
|
+
f("div", Bs, [
|
|
611
|
+
f("div", Vs, [
|
|
612
|
+
C(b(Ae), {
|
|
531
613
|
as: "template",
|
|
532
614
|
enter: "ease-out duration-300",
|
|
533
615
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -536,10 +618,10 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
536
618
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
537
619
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
538
620
|
}, {
|
|
539
|
-
default:
|
|
540
|
-
|
|
541
|
-
default:
|
|
542
|
-
(m(),
|
|
621
|
+
default: R(() => [
|
|
622
|
+
C(b(At), { 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" }, {
|
|
623
|
+
default: R(() => [
|
|
624
|
+
(m(), Z($e(b(pe).state.content), _t(b(pe).state.props, kt(b(pe).state.eventHandlers)), null, 16))
|
|
543
625
|
]),
|
|
544
626
|
_: 1
|
|
545
627
|
})
|
|
@@ -555,10 +637,10 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
555
637
|
_: 1
|
|
556
638
|
}, 8, ["show"]));
|
|
557
639
|
}
|
|
558
|
-
},
|
|
640
|
+
}, Ps = { class: "px-4 pt-5 pb-4 sm:p-6" }, Ms = {
|
|
559
641
|
key: 0,
|
|
560
642
|
class: "text-lg font-medium text-gray-900"
|
|
561
|
-
},
|
|
643
|
+
}, ri = {
|
|
562
644
|
__name: "SparkModalDialog",
|
|
563
645
|
props: {
|
|
564
646
|
title: {
|
|
@@ -608,7 +690,7 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
608
690
|
"input"
|
|
609
691
|
],
|
|
610
692
|
setup(e) {
|
|
611
|
-
const t = e, n =
|
|
693
|
+
const t = e, n = A(() => !t.buttons || t.buttons.length === 0 ? [{ text: "OK", variant: "primary", event: "ok" }] : t.buttons), s = A(() => {
|
|
612
694
|
switch (n.value.length) {
|
|
613
695
|
case 1:
|
|
614
696
|
return "sm:grid sm:grid-flow-row-dense";
|
|
@@ -624,48 +706,48 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
624
706
|
success: "farCheckCircle",
|
|
625
707
|
warning: "farExclamationTriangle",
|
|
626
708
|
danger: "farCircleXmark"
|
|
627
|
-
}, o =
|
|
709
|
+
}, o = A(() => t.icon || r[t.type]), a = A(() => ({
|
|
628
710
|
info: "bg-blue-100",
|
|
629
711
|
success: "bg-green-100",
|
|
630
712
|
warning: "bg-yellow-100",
|
|
631
713
|
danger: "bg-red-100"
|
|
632
|
-
})[t.type]),
|
|
714
|
+
})[t.type]), i = A(() => ({
|
|
633
715
|
info: "text-blue-400",
|
|
634
716
|
success: "text-green-400",
|
|
635
717
|
warning: "text-yellow-400",
|
|
636
718
|
danger: "text-red-400"
|
|
637
719
|
})[t.type]);
|
|
638
|
-
return (l,
|
|
639
|
-
const
|
|
640
|
-
return m(), g("div",
|
|
720
|
+
return (l, u) => {
|
|
721
|
+
const c = U("font-awesome-icon");
|
|
722
|
+
return m(), g("div", Ps, [
|
|
641
723
|
o.value ? (m(), g("div", {
|
|
642
724
|
key: 0,
|
|
643
|
-
class:
|
|
725
|
+
class: k(["mx-auto flex size-12 items-center justify-center rounded-full", a.value])
|
|
644
726
|
}, [
|
|
645
|
-
|
|
646
|
-
icon:
|
|
647
|
-
class:
|
|
727
|
+
C(c, {
|
|
728
|
+
icon: b(B)[o.value],
|
|
729
|
+
class: k(["h-5 w-5", i.value])
|
|
648
730
|
}, null, 8, ["icon", "class"])
|
|
649
|
-
], 2)) :
|
|
731
|
+
], 2)) : _("", !0),
|
|
650
732
|
f("div", {
|
|
651
|
-
class:
|
|
733
|
+
class: k(["text-center", { "mt-3 sm:mt-5": o.value }])
|
|
652
734
|
}, [
|
|
653
|
-
e.title ? (m(), g("h3",
|
|
735
|
+
e.title ? (m(), g("h3", Ms, O(e.title), 1)) : _("", !0),
|
|
654
736
|
e.message ? (m(), g("div", {
|
|
655
737
|
key: 1,
|
|
656
|
-
class:
|
|
657
|
-
}, O(e.message), 3)) :
|
|
738
|
+
class: k([{ "mt-2": e.title }, "text-sm text-gray-500"])
|
|
739
|
+
}, O(e.message), 3)) : _("", !0)
|
|
658
740
|
], 2),
|
|
659
741
|
f("div", {
|
|
660
|
-
class:
|
|
742
|
+
class: k(["mt-5 sm:mt-6", s.value])
|
|
661
743
|
}, [
|
|
662
|
-
(m(!0), g(
|
|
663
|
-
key:
|
|
664
|
-
variant:
|
|
665
|
-
onClick: (
|
|
744
|
+
(m(!0), g(ie, null, me(n.value, (h, x) => (m(), Z(b(oe), {
|
|
745
|
+
key: x,
|
|
746
|
+
variant: h.variant,
|
|
747
|
+
onClick: (E) => l.$emit(h.event, h)
|
|
666
748
|
}, {
|
|
667
|
-
default:
|
|
668
|
-
|
|
749
|
+
default: R(() => [
|
|
750
|
+
J(O(h.text), 1)
|
|
669
751
|
]),
|
|
670
752
|
_: 2
|
|
671
753
|
}, 1032, ["variant", "onClick"]))), 128))
|
|
@@ -673,7 +755,7 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
673
755
|
]);
|
|
674
756
|
};
|
|
675
757
|
}
|
|
676
|
-
},
|
|
758
|
+
}, Us = { class: "fixed inset-0 flex" }, ot = {
|
|
677
759
|
__name: "SparkOverlay",
|
|
678
760
|
props: {
|
|
679
761
|
position: {
|
|
@@ -688,18 +770,18 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
688
770
|
},
|
|
689
771
|
setup(e) {
|
|
690
772
|
const t = q(null);
|
|
691
|
-
return (n, s) => (m(),
|
|
773
|
+
return (n, s) => (m(), Z(b(Et), {
|
|
692
774
|
show: e.overlayInstance.state.isVisible,
|
|
693
775
|
as: "template"
|
|
694
776
|
}, {
|
|
695
|
-
default:
|
|
696
|
-
|
|
777
|
+
default: R(() => [
|
|
778
|
+
C(b($t), {
|
|
697
779
|
initialFocus: t.value,
|
|
698
780
|
class: "relative z-200",
|
|
699
781
|
onClose: e.overlayInstance.close
|
|
700
782
|
}, {
|
|
701
|
-
default:
|
|
702
|
-
|
|
783
|
+
default: R(() => [
|
|
784
|
+
C(b(Ae), {
|
|
703
785
|
as: "template",
|
|
704
786
|
enter: "transition-opacity ease-linear duration-150",
|
|
705
787
|
"enter-from": "opacity-0",
|
|
@@ -708,13 +790,13 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
708
790
|
"leave-from": "opacity-100",
|
|
709
791
|
"leave-to": "opacity-0"
|
|
710
792
|
}, {
|
|
711
|
-
default:
|
|
793
|
+
default: R(() => [...s[0] || (s[0] = [
|
|
712
794
|
f("div", { class: "fixed inset-0 bg-gray-600/30" }, null, -1)
|
|
713
795
|
])]),
|
|
714
796
|
_: 1
|
|
715
797
|
}),
|
|
716
|
-
f("div",
|
|
717
|
-
|
|
798
|
+
f("div", Us, [
|
|
799
|
+
C(b(Ae), {
|
|
718
800
|
as: "template",
|
|
719
801
|
enter: "transition ease-in-out duration-150 transform",
|
|
720
802
|
"enter-from": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
@@ -723,17 +805,17 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
723
805
|
"leave-from": "translate-x-0 opacity-100",
|
|
724
806
|
"leave-to": e.position === "left" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
725
807
|
}, {
|
|
726
|
-
default:
|
|
727
|
-
|
|
808
|
+
default: R(() => [
|
|
809
|
+
C(b(At), {
|
|
728
810
|
ref_key: "panelRef",
|
|
729
811
|
ref: t,
|
|
730
|
-
class:
|
|
812
|
+
class: k([
|
|
731
813
|
"flex w-[400px] py-2.5",
|
|
732
814
|
e.position === "left" ? "relative left-[10px]" : "absolute right-[10px] h-full"
|
|
733
815
|
])
|
|
734
816
|
}, {
|
|
735
|
-
default:
|
|
736
|
-
(m(),
|
|
817
|
+
default: R(() => [
|
|
818
|
+
(m(), Z($e(e.overlayInstance.state.content), _t(e.overlayInstance.state.props, kt(e.overlayInstance.state.eventHandlers)), null, 16))
|
|
737
819
|
]),
|
|
738
820
|
_: 1
|
|
739
821
|
}, 8, ["class"])
|
|
@@ -749,8 +831,8 @@ const pe = new Rs(), Es = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
749
831
|
}, 8, ["show"]));
|
|
750
832
|
}
|
|
751
833
|
};
|
|
752
|
-
function
|
|
753
|
-
const e =
|
|
834
|
+
function at() {
|
|
835
|
+
const e = se({
|
|
754
836
|
isVisible: !1,
|
|
755
837
|
content: null,
|
|
756
838
|
props: {},
|
|
@@ -758,11 +840,11 @@ function st() {
|
|
|
758
840
|
}), t = () => {
|
|
759
841
|
e.isVisible = !e.isVisible;
|
|
760
842
|
}, n = () => {
|
|
761
|
-
e.isVisible = !1, e.eventHandlers = {};
|
|
843
|
+
e.isVisible = !1, e.content = null, e.props = {}, e.eventHandlers = {};
|
|
762
844
|
}, s = () => {
|
|
763
845
|
e.isVisible = !0;
|
|
764
|
-
}, r = (a,
|
|
765
|
-
e.content =
|
|
846
|
+
}, r = (a, i = {}, l = {}) => {
|
|
847
|
+
e.content = vt(a), e.props = i, e.eventHandlers = l;
|
|
766
848
|
};
|
|
767
849
|
return {
|
|
768
850
|
state: e,
|
|
@@ -770,14 +852,14 @@ function st() {
|
|
|
770
852
|
close: n,
|
|
771
853
|
open: s,
|
|
772
854
|
setContent: r,
|
|
773
|
-
show: (a,
|
|
774
|
-
a && r(a,
|
|
855
|
+
show: (a, i = {}, l = {}) => {
|
|
856
|
+
a && r(a, i, l), s();
|
|
775
857
|
}
|
|
776
858
|
};
|
|
777
859
|
}
|
|
778
|
-
class
|
|
860
|
+
class js {
|
|
779
861
|
constructor() {
|
|
780
|
-
this.left =
|
|
862
|
+
this.left = at(), this.right = at();
|
|
781
863
|
}
|
|
782
864
|
showLeft = (t, n = {}, s = {}) => {
|
|
783
865
|
this.left.show(t, n, s);
|
|
@@ -795,19 +877,19 @@ class Hs {
|
|
|
795
877
|
this.left.close(), this.right.close();
|
|
796
878
|
};
|
|
797
879
|
}
|
|
798
|
-
const
|
|
880
|
+
const Q = new js(), Ds = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Is = { class: "flex flex-1 flex-col" }, zs = {
|
|
799
881
|
class: "flex flex-1 flex-col gap-y-7",
|
|
800
882
|
role: "list"
|
|
801
|
-
},
|
|
883
|
+
}, qs = { role: "list" }, Zs = { class: "flex items-center pb-8" }, Ws = ["href", "onClick"], Gs = {
|
|
802
884
|
key: 2,
|
|
803
885
|
class: "w-full flex justify-center"
|
|
804
|
-
},
|
|
886
|
+
}, Js = {
|
|
805
887
|
key: 0,
|
|
806
888
|
class: "mt-[5px] flex flex-col gap-[5px]"
|
|
807
|
-
},
|
|
889
|
+
}, Ks = ["href", "onClick"], Xs = {
|
|
808
890
|
key: 1,
|
|
809
891
|
class: "text-[13px]"
|
|
810
|
-
},
|
|
892
|
+
}, Ys = { class: "mt-auto" }, Qs = { class: "p-[10px] flex-shrink-0" }, er = { class: "flex flex-1 items-center gap-x-6" }, tr = { class: "relative flex flex-1 items-center gap-4" }, nr = { class: "cursor-pointer" }, sr = ["src"], rr = { class: "ml-auto" }, or = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, oi = {
|
|
811
893
|
__name: "SparkDefaultContainer",
|
|
812
894
|
props: {
|
|
813
895
|
appStore: {
|
|
@@ -817,112 +899,115 @@ const Y = new Hs(), Fs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Bs =
|
|
|
817
899
|
mainNavStore: {
|
|
818
900
|
type: Object,
|
|
819
901
|
required: !0
|
|
902
|
+
},
|
|
903
|
+
appSelectorSlots: {
|
|
904
|
+
type: Object,
|
|
905
|
+
default: () => ({})
|
|
820
906
|
}
|
|
821
907
|
},
|
|
822
908
|
setup(e) {
|
|
823
|
-
const t = e, n =
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
Cs,
|
|
909
|
+
const t = e, n = ln(), s = Tt(), r = Lt(), o = A(() => r.getAppIcon(t.appStore.state.app)), a = () => {
|
|
910
|
+
const c = {};
|
|
911
|
+
n["app-selector-bottom"] ? c.bottomSlot = () => rt("div", {}, n["app-selector-bottom"]()) : t.appSelectorSlots.bottomSlot && (c.bottomSlot = t.appSelectorSlots.bottomSlot), n["app-selector-footer"] ? c.footerSlot = () => rt("div", {}, n["app-selector-footer"]()) : t.appSelectorSlots.footerSlot && (c.footerSlot = t.appSelectorSlots.footerSlot), Q.showRight(ps, c);
|
|
912
|
+
}, i = () => {
|
|
913
|
+
Q.showLeft(
|
|
914
|
+
As,
|
|
830
915
|
{},
|
|
831
916
|
{
|
|
832
917
|
select: (c) => {
|
|
833
|
-
|
|
918
|
+
s.toggleBrand(c), Q.closeLeft();
|
|
834
919
|
}
|
|
835
920
|
}
|
|
836
921
|
);
|
|
837
|
-
},
|
|
838
|
-
return (c,
|
|
839
|
-
const
|
|
840
|
-
return m(), g(
|
|
922
|
+
}, l = A(() => t.mainNavStore.state.hidden ? ["w-0 overflow-hidden"] : [t.mainNavStore.state.collapsed ? "w-[80px]" : "w-[240px]"]), u = A(() => t.mainNavStore.state.hidden ? ["pl-2.5"] : [t.mainNavStore.state.collapsed ? "pl-[80px]" : "pl-[240px]"]);
|
|
923
|
+
return (c, h) => {
|
|
924
|
+
const x = U("font-awesome-icon"), E = U("router-view");
|
|
925
|
+
return m(), g(ie, null, [
|
|
841
926
|
f("div", {
|
|
842
|
-
class:
|
|
927
|
+
class: k([l.value, "fixed inset-y-0 flex transition-all z-100"])
|
|
843
928
|
}, [
|
|
844
|
-
f("div",
|
|
845
|
-
f("nav",
|
|
846
|
-
f("ul",
|
|
929
|
+
f("div", Ds, [
|
|
930
|
+
f("nav", Is, [
|
|
931
|
+
f("ul", zs, [
|
|
847
932
|
f("li", null, [
|
|
848
|
-
f("ul",
|
|
849
|
-
f("li",
|
|
933
|
+
f("ul", qs, [
|
|
934
|
+
f("li", Zs, [
|
|
850
935
|
f("a", {
|
|
851
936
|
class: "grid w-[40px] h-[40px] place-items-center rounded-md bg-primary-600 text-white text-[13px] cursor-pointer",
|
|
852
|
-
onClick:
|
|
937
|
+
onClick: h[0] || (h[0] = fe((p) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"]))
|
|
853
938
|
}, [
|
|
854
|
-
|
|
855
|
-
icon:
|
|
939
|
+
C(x, {
|
|
940
|
+
icon: b(B)[o.value],
|
|
856
941
|
class: "size-5"
|
|
857
942
|
}, null, 8, ["icon"])
|
|
858
943
|
]),
|
|
859
|
-
e.mainNavStore.state.collapsed ?
|
|
944
|
+
e.mainNavStore.state.collapsed ? _("", !0) : (m(), g("a", {
|
|
860
945
|
key: 0,
|
|
861
|
-
onClick:
|
|
946
|
+
onClick: h[1] || (h[1] = fe((p) => e.mainNavStore.goto(e.appStore.state.homeRoute), ["prevent"])),
|
|
862
947
|
class: "font-medium text-gray-800 ml-[10px] cursor-pointer"
|
|
863
948
|
}, O(e.appStore.state.app), 1))
|
|
864
949
|
]),
|
|
865
|
-
(m(!0), g(
|
|
950
|
+
(m(!0), g(ie, null, me(e.mainNavStore.state.menu, (p) => (m(), g("li", {
|
|
866
951
|
key: p.name,
|
|
867
|
-
class:
|
|
952
|
+
class: k({
|
|
868
953
|
"mt-[10px]": p.children
|
|
869
954
|
})
|
|
870
955
|
}, [
|
|
871
956
|
f("a", {
|
|
872
|
-
class:
|
|
957
|
+
class: k([{
|
|
873
958
|
"bg-gray-100": p.current,
|
|
874
959
|
"hover:bg-gray-100": p?.href
|
|
875
960
|
}, "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
961
|
href: p?.href,
|
|
877
|
-
onClick: fe((
|
|
962
|
+
onClick: fe((w) => e.mainNavStore.goto(p.href), ["prevent"])
|
|
878
963
|
}, [
|
|
879
|
-
p.icon ? (m(),
|
|
964
|
+
p.icon ? (m(), Z(x, {
|
|
880
965
|
key: 0,
|
|
881
|
-
icon:
|
|
882
|
-
class:
|
|
883
|
-
}, null, 8, ["icon", "class"])) :
|
|
884
|
-
e.mainNavStore.state.collapsed ? p?.children ? (m(), g("div",
|
|
966
|
+
icon: b(B)[p.icon],
|
|
967
|
+
class: k([[(p.current, "text-gray-400")], "size-4"])
|
|
968
|
+
}, null, 8, ["icon", "class"])) : _("", !0),
|
|
969
|
+
e.mainNavStore.state.collapsed ? p?.children ? (m(), g("div", Gs, [...h[4] || (h[4] = [
|
|
885
970
|
f("div", { class: "w-[10px] h-px bg-gray-400" }, null, -1)
|
|
886
|
-
])])) :
|
|
971
|
+
])])) : _("", !0) : (m(), g("span", {
|
|
887
972
|
key: 1,
|
|
888
|
-
class:
|
|
973
|
+
class: k({
|
|
889
974
|
"text-[11px]": p?.children,
|
|
890
975
|
"text-[13px]": !p?.children,
|
|
891
976
|
"font-semibold": p?.children,
|
|
892
977
|
"text-gray-500": p?.children
|
|
893
978
|
})
|
|
894
979
|
}, O(p.name), 3))
|
|
895
|
-
], 10,
|
|
896
|
-
p.children ? (m(), g("ul",
|
|
897
|
-
(m(!0), g(
|
|
898
|
-
key:
|
|
980
|
+
], 10, Ws),
|
|
981
|
+
p.children ? (m(), g("ul", Js, [
|
|
982
|
+
(m(!0), g(ie, null, me(p.children, (w) => (m(), g("li", {
|
|
983
|
+
key: w.name
|
|
899
984
|
}, [
|
|
900
985
|
f("a", {
|
|
901
|
-
class:
|
|
902
|
-
href:
|
|
903
|
-
onClick: fe((
|
|
986
|
+
class: k([[w.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"]),
|
|
987
|
+
href: w.href,
|
|
988
|
+
onClick: fe((y) => e.mainNavStore.goto(w.href), ["prevent"])
|
|
904
989
|
}, [
|
|
905
|
-
|
|
990
|
+
w.icon ? (m(), Z(x, {
|
|
906
991
|
key: 0,
|
|
907
|
-
icon:
|
|
908
|
-
class:
|
|
909
|
-
}, null, 8, ["icon", "class"])) :
|
|
910
|
-
e.mainNavStore.state.collapsed ?
|
|
911
|
-
], 10,
|
|
992
|
+
icon: b(B)[w.icon],
|
|
993
|
+
class: k([[(w.current, "text-gray-400")], "size-4"])
|
|
994
|
+
}, null, 8, ["icon", "class"])) : _("", !0),
|
|
995
|
+
e.mainNavStore.state.collapsed ? _("", !0) : (m(), g("span", Xs, O(w.name), 1))
|
|
996
|
+
], 10, Ks)
|
|
912
997
|
]))), 128))
|
|
913
|
-
])) :
|
|
998
|
+
])) : _("", !0)
|
|
914
999
|
], 2))), 128))
|
|
915
1000
|
])
|
|
916
1001
|
]),
|
|
917
|
-
f("li",
|
|
918
|
-
|
|
1002
|
+
f("li", Ys, [
|
|
1003
|
+
M(c.$slots, "sidebar-footer"),
|
|
919
1004
|
f("a", {
|
|
920
1005
|
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
1006
|
href: "#",
|
|
922
|
-
onClick:
|
|
1007
|
+
onClick: h[2] || (h[2] = fe((p) => e.mainNavStore.toggleCollapsed(), ["prevent"]))
|
|
923
1008
|
}, [
|
|
924
|
-
|
|
925
|
-
icon:
|
|
1009
|
+
C(x, {
|
|
1010
|
+
icon: b(B)[e.mainNavStore.state.collapsed ? "farArrowRightToLine" : "farArrowLeftToLine"],
|
|
926
1011
|
class: "class-5"
|
|
927
1012
|
}, null, 8, ["icon"])
|
|
928
1013
|
])
|
|
@@ -932,119 +1017,119 @@ const Y = new Hs(), Fs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Bs =
|
|
|
932
1017
|
])
|
|
933
1018
|
], 2),
|
|
934
1019
|
f("div", {
|
|
935
|
-
class:
|
|
1020
|
+
class: k([u.value, "h-full transition-all flex flex-col"])
|
|
936
1021
|
}, [
|
|
937
|
-
f("div",
|
|
938
|
-
f("div",
|
|
939
|
-
f("div",
|
|
940
|
-
|
|
941
|
-
f("div",
|
|
942
|
-
|
|
943
|
-
icon:
|
|
1022
|
+
f("div", Qs, [
|
|
1023
|
+
f("div", er, [
|
|
1024
|
+
f("div", tr, [
|
|
1025
|
+
M(c.$slots, "header-left", {}, () => [
|
|
1026
|
+
f("div", nr, [
|
|
1027
|
+
C(x, {
|
|
1028
|
+
icon: b(B).farBarsSort,
|
|
944
1029
|
class: "size-5",
|
|
945
|
-
onClick:
|
|
1030
|
+
onClick: h[3] || (h[3] = (p) => e.mainNavStore.toggleHidden())
|
|
946
1031
|
}, null, 8, ["icon"])
|
|
947
1032
|
])
|
|
948
1033
|
]),
|
|
949
|
-
|
|
1034
|
+
M(c.$slots, "header-center", {}, () => [
|
|
950
1035
|
e.appStore.state.showBrandSelector ? (m(), g("div", {
|
|
951
1036
|
key: 0,
|
|
952
1037
|
class: "absolute left-1/2 -translate-x-1/2 cursor-pointer h-9 flex items-center",
|
|
953
|
-
onClick:
|
|
1038
|
+
onClick: i
|
|
954
1039
|
}, [
|
|
955
|
-
|
|
1040
|
+
b(s).currentBrand ? (m(), g("img", {
|
|
956
1041
|
key: 0,
|
|
957
|
-
src:
|
|
1042
|
+
src: b(s).currentBrand.logo,
|
|
958
1043
|
alt: "",
|
|
959
1044
|
class: "h-[30px] w-auto"
|
|
960
|
-
}, null, 8,
|
|
961
|
-
])) :
|
|
1045
|
+
}, null, 8, sr)) : _("", !0)
|
|
1046
|
+
])) : _("", !0)
|
|
962
1047
|
]),
|
|
963
|
-
f("div",
|
|
964
|
-
|
|
1048
|
+
f("div", rr, [
|
|
1049
|
+
M(c.$slots, "header-right", {}, () => [
|
|
965
1050
|
e.appStore.state.showAppSelector ? (m(), g("button", {
|
|
966
1051
|
key: 0,
|
|
967
1052
|
class: "rounded-sm bg-white w-[42px] h-[42px] ring-1 ring-inset ring-gray-300",
|
|
968
1053
|
type: "button",
|
|
969
|
-
onClick:
|
|
1054
|
+
onClick: a
|
|
970
1055
|
}, [
|
|
971
|
-
|
|
972
|
-
icon:
|
|
1056
|
+
C(x, {
|
|
1057
|
+
icon: b(B).farGripDotsVertical,
|
|
973
1058
|
class: "size-4 text-gray-400"
|
|
974
1059
|
}, null, 8, ["icon"])
|
|
975
|
-
])) :
|
|
1060
|
+
])) : _("", !0)
|
|
976
1061
|
])
|
|
977
1062
|
])
|
|
978
1063
|
])
|
|
979
1064
|
])
|
|
980
1065
|
]),
|
|
981
|
-
f("main",
|
|
982
|
-
|
|
1066
|
+
f("main", or, [
|
|
1067
|
+
C(E)
|
|
983
1068
|
])
|
|
984
1069
|
], 2),
|
|
985
|
-
|
|
1070
|
+
C(b(ot), {
|
|
986
1071
|
position: "left",
|
|
987
|
-
"overlay-instance":
|
|
988
|
-
onClose:
|
|
1072
|
+
"overlay-instance": b(Q).left,
|
|
1073
|
+
onClose: b(Q).closeLeft
|
|
989
1074
|
}, null, 8, ["overlay-instance", "onClose"]),
|
|
990
|
-
|
|
1075
|
+
C(b(ot), {
|
|
991
1076
|
position: "right",
|
|
992
|
-
"overlay-instance":
|
|
993
|
-
onClose:
|
|
1077
|
+
"overlay-instance": b(Q).right,
|
|
1078
|
+
onClose: b(Q).closeRight
|
|
994
1079
|
}, null, 8, ["overlay-instance", "onClose"]),
|
|
995
|
-
|
|
1080
|
+
C(b(Ns))
|
|
996
1081
|
], 64);
|
|
997
1082
|
};
|
|
998
1083
|
}
|
|
999
|
-
},
|
|
1084
|
+
}, ar = (e, t) => {
|
|
1000
1085
|
const n = e.__vccOpts || e;
|
|
1001
1086
|
for (const [s, r] of t)
|
|
1002
1087
|
n[s] = r;
|
|
1003
1088
|
return n;
|
|
1004
|
-
},
|
|
1005
|
-
function
|
|
1006
|
-
const n =
|
|
1007
|
-
return m(), g("main",
|
|
1008
|
-
|
|
1089
|
+
}, ir = {}, lr = { class: "h-full" };
|
|
1090
|
+
function cr(e, t) {
|
|
1091
|
+
const n = U("router-view");
|
|
1092
|
+
return m(), g("main", lr, [
|
|
1093
|
+
C(n)
|
|
1009
1094
|
]);
|
|
1010
1095
|
}
|
|
1011
|
-
const
|
|
1012
|
-
function
|
|
1096
|
+
const ai = /* @__PURE__ */ ar(ir, [["render", cr]]);
|
|
1097
|
+
function Ht(e, t) {
|
|
1013
1098
|
return function() {
|
|
1014
1099
|
return e.apply(t, arguments);
|
|
1015
1100
|
};
|
|
1016
1101
|
}
|
|
1017
|
-
const { toString:
|
|
1018
|
-
const n =
|
|
1102
|
+
const { toString: ur } = Object.prototype, { getPrototypeOf: Ge } = Object, { iterator: Te, toStringTag: Ft } = Symbol, He = /* @__PURE__ */ ((e) => (t) => {
|
|
1103
|
+
const n = ur.call(t);
|
|
1019
1104
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1020
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) =>
|
|
1021
|
-
function
|
|
1022
|
-
return e !== null && !
|
|
1105
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => He(t) === e), Fe = (e) => (t) => typeof t === e, { isArray: ce } = Array, le = Fe("undefined");
|
|
1106
|
+
function ye(e) {
|
|
1107
|
+
return e !== null && !le(e) && e.constructor !== null && !le(e.constructor) && V(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
1023
1108
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1109
|
+
const Bt = D("ArrayBuffer");
|
|
1110
|
+
function dr(e) {
|
|
1026
1111
|
let t;
|
|
1027
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
1112
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Bt(e.buffer), t;
|
|
1028
1113
|
}
|
|
1029
|
-
const
|
|
1030
|
-
if (
|
|
1114
|
+
const fr = Fe("string"), V = Fe("function"), Vt = Fe("number"), we = (e) => e !== null && typeof e == "object", pr = (e) => e === !0 || e === !1, ke = (e) => {
|
|
1115
|
+
if (He(e) !== "object")
|
|
1031
1116
|
return !1;
|
|
1032
|
-
const t =
|
|
1033
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
1034
|
-
},
|
|
1035
|
-
if (!
|
|
1117
|
+
const t = Ge(e);
|
|
1118
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ft in e) && !(Te in e);
|
|
1119
|
+
}, hr = (e) => {
|
|
1120
|
+
if (!we(e) || ye(e))
|
|
1036
1121
|
return !1;
|
|
1037
1122
|
try {
|
|
1038
1123
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
1039
1124
|
} catch {
|
|
1040
1125
|
return !1;
|
|
1041
1126
|
}
|
|
1042
|
-
},
|
|
1127
|
+
}, mr = D("Date"), gr = D("File"), yr = D("Blob"), wr = D("FileList"), br = (e) => we(e) && V(e.pipe), xr = (e) => {
|
|
1043
1128
|
let t;
|
|
1044
|
-
return e && (typeof FormData == "function" && e instanceof FormData || V(e.append) && ((t =
|
|
1129
|
+
return e && (typeof FormData == "function" && e instanceof FormData || V(e.append) && ((t = He(e)) === "formdata" || // detect form-data instance
|
|
1045
1130
|
t === "object" && V(e.toString) && e.toString() === "[object FormData]"));
|
|
1046
|
-
},
|
|
1047
|
-
function
|
|
1131
|
+
}, Sr = D("URLSearchParams"), [Cr, vr, _r, kr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Rr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1132
|
+
function be(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1048
1133
|
if (e === null || typeof e > "u")
|
|
1049
1134
|
return;
|
|
1050
1135
|
let s, r;
|
|
@@ -1052,16 +1137,16 @@ function we(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
1052
1137
|
for (s = 0, r = e.length; s < r; s++)
|
|
1053
1138
|
t.call(null, e[s], s, e);
|
|
1054
1139
|
else {
|
|
1055
|
-
if (
|
|
1140
|
+
if (ye(e))
|
|
1056
1141
|
return;
|
|
1057
1142
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = o.length;
|
|
1058
|
-
let
|
|
1143
|
+
let i;
|
|
1059
1144
|
for (s = 0; s < a; s++)
|
|
1060
|
-
|
|
1145
|
+
i = o[s], t.call(null, e[i], i, e);
|
|
1061
1146
|
}
|
|
1062
1147
|
}
|
|
1063
|
-
function
|
|
1064
|
-
if (
|
|
1148
|
+
function Nt(e, t) {
|
|
1149
|
+
if (ye(e))
|
|
1065
1150
|
return null;
|
|
1066
1151
|
t = t.toLowerCase();
|
|
1067
1152
|
const n = Object.keys(e);
|
|
@@ -1071,71 +1156,71 @@ function Ht(e, t) {
|
|
|
1071
1156
|
return r;
|
|
1072
1157
|
return null;
|
|
1073
1158
|
}
|
|
1074
|
-
const
|
|
1075
|
-
function
|
|
1076
|
-
const { caseless: e, skipUndefined: t } =
|
|
1077
|
-
const a = e &&
|
|
1078
|
-
|
|
1159
|
+
const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Pt = (e) => !le(e) && e !== ee;
|
|
1160
|
+
function ze() {
|
|
1161
|
+
const { caseless: e, skipUndefined: t } = Pt(this) && this || {}, n = {}, s = (r, o) => {
|
|
1162
|
+
const a = e && Nt(n, o) || o;
|
|
1163
|
+
ke(n[a]) && ke(r) ? n[a] = ze(n[a], r) : ke(r) ? n[a] = ze({}, r) : ce(r) ? n[a] = r.slice() : (!t || !le(r)) && (n[a] = r);
|
|
1079
1164
|
};
|
|
1080
1165
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
1081
|
-
arguments[r] &&
|
|
1166
|
+
arguments[r] && be(arguments[r], s);
|
|
1082
1167
|
return n;
|
|
1083
1168
|
}
|
|
1084
|
-
const
|
|
1085
|
-
n && V(r) ? e[o] =
|
|
1086
|
-
}, { allOwnKeys: s }), e),
|
|
1169
|
+
const Er = (e, t, n, { allOwnKeys: s } = {}) => (be(t, (r, o) => {
|
|
1170
|
+
n && V(r) ? e[o] = Ht(r, n) : e[o] = r;
|
|
1171
|
+
}, { allOwnKeys: s }), e), $r = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ar = (e, t, n, s) => {
|
|
1087
1172
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
1088
1173
|
value: t.prototype
|
|
1089
1174
|
}), n && Object.assign(e.prototype, n);
|
|
1090
|
-
},
|
|
1175
|
+
}, Lr = (e, t, n, s) => {
|
|
1091
1176
|
let r, o, a;
|
|
1092
|
-
const
|
|
1177
|
+
const i = {};
|
|
1093
1178
|
if (t = t || {}, e == null) return t;
|
|
1094
1179
|
do {
|
|
1095
1180
|
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
1096
|
-
a = r[o], (!s || s(a, e, t)) && !
|
|
1097
|
-
e = n !== !1 &&
|
|
1181
|
+
a = r[o], (!s || s(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
|
|
1182
|
+
e = n !== !1 && Ge(e);
|
|
1098
1183
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1099
1184
|
return t;
|
|
1100
|
-
},
|
|
1185
|
+
}, Or = (e, t, n) => {
|
|
1101
1186
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
1102
1187
|
const s = e.indexOf(t, n);
|
|
1103
1188
|
return s !== -1 && s === n;
|
|
1104
|
-
},
|
|
1189
|
+
}, Tr = (e) => {
|
|
1105
1190
|
if (!e) return null;
|
|
1106
1191
|
if (ce(e)) return e;
|
|
1107
1192
|
let t = e.length;
|
|
1108
|
-
if (!
|
|
1193
|
+
if (!Vt(t)) return null;
|
|
1109
1194
|
const n = new Array(t);
|
|
1110
1195
|
for (; t-- > 0; )
|
|
1111
1196
|
n[t] = e[t];
|
|
1112
1197
|
return n;
|
|
1113
|
-
},
|
|
1114
|
-
const s = (e && e[
|
|
1198
|
+
}, Hr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ge(Uint8Array)), Fr = (e, t) => {
|
|
1199
|
+
const s = (e && e[Te]).call(e);
|
|
1115
1200
|
let r;
|
|
1116
1201
|
for (; (r = s.next()) && !r.done; ) {
|
|
1117
1202
|
const o = r.value;
|
|
1118
1203
|
t.call(e, o[0], o[1]);
|
|
1119
1204
|
}
|
|
1120
|
-
},
|
|
1205
|
+
}, Br = (e, t) => {
|
|
1121
1206
|
let n;
|
|
1122
1207
|
const s = [];
|
|
1123
1208
|
for (; (n = e.exec(t)) !== null; )
|
|
1124
1209
|
s.push(n);
|
|
1125
1210
|
return s;
|
|
1126
|
-
},
|
|
1211
|
+
}, Vr = D("HTMLFormElement"), Nr = (e) => e.toLowerCase().replace(
|
|
1127
1212
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1128
1213
|
function(n, s, r) {
|
|
1129
1214
|
return s.toUpperCase() + r;
|
|
1130
1215
|
}
|
|
1131
|
-
),
|
|
1216
|
+
), it = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Pr = D("RegExp"), Mt = (e, t) => {
|
|
1132
1217
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
1133
|
-
|
|
1218
|
+
be(n, (r, o) => {
|
|
1134
1219
|
let a;
|
|
1135
1220
|
(a = t(r, o, e)) !== !1 && (s[o] = a || r);
|
|
1136
1221
|
}), Object.defineProperties(e, s);
|
|
1137
|
-
},
|
|
1138
|
-
|
|
1222
|
+
}, Mr = (e) => {
|
|
1223
|
+
Mt(e, (t, n) => {
|
|
1139
1224
|
if (V(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1140
1225
|
return !1;
|
|
1141
1226
|
const s = e[n];
|
|
@@ -1149,108 +1234,108 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (we(t, (r, o) => {
|
|
|
1149
1234
|
});
|
|
1150
1235
|
}
|
|
1151
1236
|
});
|
|
1152
|
-
},
|
|
1237
|
+
}, Ur = (e, t) => {
|
|
1153
1238
|
const n = {}, s = (r) => {
|
|
1154
1239
|
r.forEach((o) => {
|
|
1155
1240
|
n[o] = !0;
|
|
1156
1241
|
});
|
|
1157
1242
|
};
|
|
1158
1243
|
return ce(e) ? s(e) : s(String(e).split(t)), n;
|
|
1159
|
-
},
|
|
1160
|
-
},
|
|
1161
|
-
function
|
|
1162
|
-
return !!(e && V(e.append) && e[
|
|
1244
|
+
}, jr = () => {
|
|
1245
|
+
}, Dr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1246
|
+
function Ir(e) {
|
|
1247
|
+
return !!(e && V(e.append) && e[Ft] === "FormData" && e[Te]);
|
|
1163
1248
|
}
|
|
1164
|
-
const
|
|
1249
|
+
const zr = (e) => {
|
|
1165
1250
|
const t = new Array(10), n = (s, r) => {
|
|
1166
|
-
if (
|
|
1251
|
+
if (we(s)) {
|
|
1167
1252
|
if (t.indexOf(s) >= 0)
|
|
1168
1253
|
return;
|
|
1169
|
-
if (
|
|
1254
|
+
if (ye(s))
|
|
1170
1255
|
return s;
|
|
1171
1256
|
if (!("toJSON" in s)) {
|
|
1172
1257
|
t[r] = s;
|
|
1173
1258
|
const o = ce(s) ? [] : {};
|
|
1174
|
-
return
|
|
1259
|
+
return be(s, (a, i) => {
|
|
1175
1260
|
const l = n(a, r + 1);
|
|
1176
|
-
!
|
|
1261
|
+
!le(l) && (o[i] = l);
|
|
1177
1262
|
}), t[r] = void 0, o;
|
|
1178
1263
|
}
|
|
1179
1264
|
}
|
|
1180
1265
|
return s;
|
|
1181
1266
|
};
|
|
1182
1267
|
return n(e, 0);
|
|
1183
|
-
},
|
|
1184
|
-
r ===
|
|
1268
|
+
}, qr = D("AsyncFunction"), Zr = (e) => e && (we(e) || V(e)) && V(e.then) && V(e.catch), Ut = ((e, t) => e ? setImmediate : t ? ((n, s) => (ee.addEventListener("message", ({ source: r, data: o }) => {
|
|
1269
|
+
r === ee && o === n && s.length && s.shift()();
|
|
1185
1270
|
}, !1), (r) => {
|
|
1186
|
-
s.push(r),
|
|
1271
|
+
s.push(r), ee.postMessage(n, "*");
|
|
1187
1272
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1188
1273
|
typeof setImmediate == "function",
|
|
1189
|
-
V(
|
|
1190
|
-
),
|
|
1274
|
+
V(ee.postMessage)
|
|
1275
|
+
), Wr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Ut, Gr = (e) => e != null && V(e[Te]), d = {
|
|
1191
1276
|
isArray: ce,
|
|
1192
|
-
isArrayBuffer:
|
|
1193
|
-
isBuffer:
|
|
1194
|
-
isFormData:
|
|
1195
|
-
isArrayBufferView:
|
|
1196
|
-
isString:
|
|
1197
|
-
isNumber:
|
|
1198
|
-
isBoolean:
|
|
1199
|
-
isObject:
|
|
1200
|
-
isPlainObject:
|
|
1201
|
-
isEmptyObject:
|
|
1202
|
-
isReadableStream:
|
|
1203
|
-
isRequest:
|
|
1204
|
-
isResponse:
|
|
1205
|
-
isHeaders:
|
|
1206
|
-
isUndefined:
|
|
1207
|
-
isDate:
|
|
1208
|
-
isFile:
|
|
1209
|
-
isBlob:
|
|
1210
|
-
isRegExp:
|
|
1277
|
+
isArrayBuffer: Bt,
|
|
1278
|
+
isBuffer: ye,
|
|
1279
|
+
isFormData: xr,
|
|
1280
|
+
isArrayBufferView: dr,
|
|
1281
|
+
isString: fr,
|
|
1282
|
+
isNumber: Vt,
|
|
1283
|
+
isBoolean: pr,
|
|
1284
|
+
isObject: we,
|
|
1285
|
+
isPlainObject: ke,
|
|
1286
|
+
isEmptyObject: hr,
|
|
1287
|
+
isReadableStream: Cr,
|
|
1288
|
+
isRequest: vr,
|
|
1289
|
+
isResponse: _r,
|
|
1290
|
+
isHeaders: kr,
|
|
1291
|
+
isUndefined: le,
|
|
1292
|
+
isDate: mr,
|
|
1293
|
+
isFile: gr,
|
|
1294
|
+
isBlob: yr,
|
|
1295
|
+
isRegExp: Pr,
|
|
1211
1296
|
isFunction: V,
|
|
1212
|
-
isStream:
|
|
1213
|
-
isURLSearchParams:
|
|
1214
|
-
isTypedArray:
|
|
1215
|
-
isFileList:
|
|
1216
|
-
forEach:
|
|
1217
|
-
merge:
|
|
1218
|
-
extend:
|
|
1219
|
-
trim:
|
|
1220
|
-
stripBOM:
|
|
1221
|
-
inherits:
|
|
1222
|
-
toFlatObject:
|
|
1223
|
-
kindOf:
|
|
1297
|
+
isStream: br,
|
|
1298
|
+
isURLSearchParams: Sr,
|
|
1299
|
+
isTypedArray: Hr,
|
|
1300
|
+
isFileList: wr,
|
|
1301
|
+
forEach: be,
|
|
1302
|
+
merge: ze,
|
|
1303
|
+
extend: Er,
|
|
1304
|
+
trim: Rr,
|
|
1305
|
+
stripBOM: $r,
|
|
1306
|
+
inherits: Ar,
|
|
1307
|
+
toFlatObject: Lr,
|
|
1308
|
+
kindOf: He,
|
|
1224
1309
|
kindOfTest: D,
|
|
1225
|
-
endsWith:
|
|
1226
|
-
toArray:
|
|
1227
|
-
forEachEntry:
|
|
1228
|
-
matchAll:
|
|
1229
|
-
isHTMLForm:
|
|
1230
|
-
hasOwnProperty:
|
|
1231
|
-
hasOwnProp:
|
|
1310
|
+
endsWith: Or,
|
|
1311
|
+
toArray: Tr,
|
|
1312
|
+
forEachEntry: Fr,
|
|
1313
|
+
matchAll: Br,
|
|
1314
|
+
isHTMLForm: Vr,
|
|
1315
|
+
hasOwnProperty: it,
|
|
1316
|
+
hasOwnProp: it,
|
|
1232
1317
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1233
|
-
reduceDescriptors:
|
|
1234
|
-
freezeMethods:
|
|
1235
|
-
toObjectSet:
|
|
1236
|
-
toCamelCase:
|
|
1237
|
-
noop:
|
|
1238
|
-
toFiniteNumber:
|
|
1239
|
-
findKey:
|
|
1240
|
-
global:
|
|
1241
|
-
isContextDefined:
|
|
1242
|
-
isSpecCompliantForm:
|
|
1243
|
-
toJSONObject:
|
|
1244
|
-
isAsyncFn:
|
|
1245
|
-
isThenable:
|
|
1246
|
-
setImmediate:
|
|
1247
|
-
asap:
|
|
1248
|
-
isIterable:
|
|
1318
|
+
reduceDescriptors: Mt,
|
|
1319
|
+
freezeMethods: Mr,
|
|
1320
|
+
toObjectSet: Ur,
|
|
1321
|
+
toCamelCase: Nr,
|
|
1322
|
+
noop: jr,
|
|
1323
|
+
toFiniteNumber: Dr,
|
|
1324
|
+
findKey: Nt,
|
|
1325
|
+
global: ee,
|
|
1326
|
+
isContextDefined: Pt,
|
|
1327
|
+
isSpecCompliantForm: Ir,
|
|
1328
|
+
toJSONObject: zr,
|
|
1329
|
+
isAsyncFn: qr,
|
|
1330
|
+
isThenable: Zr,
|
|
1331
|
+
setImmediate: Ut,
|
|
1332
|
+
asap: Wr,
|
|
1333
|
+
isIterable: Gr
|
|
1249
1334
|
};
|
|
1250
|
-
function
|
|
1335
|
+
function S(e, t, n, s, r) {
|
|
1251
1336
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
|
|
1252
1337
|
}
|
|
1253
|
-
|
|
1338
|
+
d.inherits(S, Error, {
|
|
1254
1339
|
toJSON: function() {
|
|
1255
1340
|
return {
|
|
1256
1341
|
// Standard
|
|
@@ -1265,13 +1350,13 @@ u.inherits(C, Error, {
|
|
|
1265
1350
|
columnNumber: this.columnNumber,
|
|
1266
1351
|
stack: this.stack,
|
|
1267
1352
|
// Axios
|
|
1268
|
-
config:
|
|
1353
|
+
config: d.toJSONObject(this.config),
|
|
1269
1354
|
code: this.code,
|
|
1270
1355
|
status: this.status
|
|
1271
1356
|
};
|
|
1272
1357
|
}
|
|
1273
1358
|
});
|
|
1274
|
-
const
|
|
1359
|
+
const jt = S.prototype, Dt = {};
|
|
1275
1360
|
[
|
|
1276
1361
|
"ERR_BAD_OPTION_VALUE",
|
|
1277
1362
|
"ERR_BAD_OPTION",
|
|
@@ -1287,100 +1372,100 @@ const Nt = C.prototype, Pt = {};
|
|
|
1287
1372
|
"ERR_INVALID_URL"
|
|
1288
1373
|
// eslint-disable-next-line func-names
|
|
1289
1374
|
].forEach((e) => {
|
|
1290
|
-
|
|
1375
|
+
Dt[e] = { value: e };
|
|
1291
1376
|
});
|
|
1292
|
-
Object.defineProperties(
|
|
1293
|
-
Object.defineProperty(
|
|
1294
|
-
|
|
1295
|
-
const a = Object.create(
|
|
1296
|
-
|
|
1297
|
-
return
|
|
1298
|
-
}, (
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1377
|
+
Object.defineProperties(S, Dt);
|
|
1378
|
+
Object.defineProperty(jt, "isAxiosError", { value: !0 });
|
|
1379
|
+
S.from = (e, t, n, s, r, o) => {
|
|
1380
|
+
const a = Object.create(jt);
|
|
1381
|
+
d.toFlatObject(e, a, function(c) {
|
|
1382
|
+
return c !== Error.prototype;
|
|
1383
|
+
}, (u) => u !== "isAxiosError");
|
|
1384
|
+
const i = e && e.message ? e.message : "Error", l = t == null && e ? e.code : t;
|
|
1385
|
+
return S.call(a, i, l, n, s, r), e && a.cause == null && Object.defineProperty(a, "cause", { value: e, configurable: !0 }), a.name = e && e.name || "Error", o && Object.assign(a, o), a;
|
|
1301
1386
|
};
|
|
1302
|
-
const
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1387
|
+
const Jr = null;
|
|
1388
|
+
function qe(e) {
|
|
1389
|
+
return d.isPlainObject(e) || d.isArray(e);
|
|
1305
1390
|
}
|
|
1306
|
-
function
|
|
1307
|
-
return
|
|
1391
|
+
function It(e) {
|
|
1392
|
+
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
1308
1393
|
}
|
|
1309
|
-
function
|
|
1394
|
+
function lt(e, t, n) {
|
|
1310
1395
|
return e ? e.concat(t).map(function(r, o) {
|
|
1311
|
-
return r =
|
|
1396
|
+
return r = It(r), !n && o ? "[" + r + "]" : r;
|
|
1312
1397
|
}).join(n ? "." : "") : t;
|
|
1313
1398
|
}
|
|
1314
|
-
function
|
|
1315
|
-
return
|
|
1399
|
+
function Kr(e) {
|
|
1400
|
+
return d.isArray(e) && !e.some(qe);
|
|
1316
1401
|
}
|
|
1317
|
-
const
|
|
1402
|
+
const Xr = d.toFlatObject(d, {}, null, function(t) {
|
|
1318
1403
|
return /^is[A-Z]/.test(t);
|
|
1319
1404
|
});
|
|
1320
|
-
function
|
|
1321
|
-
if (!
|
|
1405
|
+
function Be(e, t, n) {
|
|
1406
|
+
if (!d.isObject(e))
|
|
1322
1407
|
throw new TypeError("target must be an object");
|
|
1323
|
-
t = t || new FormData(), n =
|
|
1408
|
+
t = t || new FormData(), n = d.toFlatObject(n, {
|
|
1324
1409
|
metaTokens: !0,
|
|
1325
1410
|
dots: !1,
|
|
1326
1411
|
indexes: !1
|
|
1327
1412
|
}, !1, function(w, y) {
|
|
1328
|
-
return !
|
|
1413
|
+
return !d.isUndefined(y[w]);
|
|
1329
1414
|
});
|
|
1330
|
-
const s = n.metaTokens, r = n.visitor ||
|
|
1331
|
-
if (!
|
|
1415
|
+
const s = n.metaTokens, r = n.visitor || c, o = n.dots, a = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
|
|
1416
|
+
if (!d.isFunction(r))
|
|
1332
1417
|
throw new TypeError("visitor must be a function");
|
|
1333
|
-
function
|
|
1334
|
-
if (
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1339
|
-
if (!l &&
|
|
1340
|
-
throw new
|
|
1341
|
-
return
|
|
1342
|
-
}
|
|
1343
|
-
function
|
|
1344
|
-
let
|
|
1345
|
-
if (
|
|
1346
|
-
if (
|
|
1347
|
-
w = s ? w : w.slice(0, -2),
|
|
1348
|
-
else if (
|
|
1349
|
-
return w =
|
|
1350
|
-
!(
|
|
1418
|
+
function u(p) {
|
|
1419
|
+
if (p === null) return "";
|
|
1420
|
+
if (d.isDate(p))
|
|
1421
|
+
return p.toISOString();
|
|
1422
|
+
if (d.isBoolean(p))
|
|
1423
|
+
return p.toString();
|
|
1424
|
+
if (!l && d.isBlob(p))
|
|
1425
|
+
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
1426
|
+
return d.isArrayBuffer(p) || d.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
1427
|
+
}
|
|
1428
|
+
function c(p, w, y) {
|
|
1429
|
+
let $ = p;
|
|
1430
|
+
if (p && !y && typeof p == "object") {
|
|
1431
|
+
if (d.endsWith(w, "{}"))
|
|
1432
|
+
w = s ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
1433
|
+
else if (d.isArray(p) && Kr(p) || (d.isFileList(p) || d.endsWith(w, "[]")) && ($ = d.toArray(p)))
|
|
1434
|
+
return w = It(w), $.forEach(function(L, F) {
|
|
1435
|
+
!(d.isUndefined(L) || L === null) && t.append(
|
|
1351
1436
|
// eslint-disable-next-line no-nested-ternary
|
|
1352
|
-
a === !0 ?
|
|
1353
|
-
|
|
1437
|
+
a === !0 ? lt([w], F, o) : a === null ? w : w + "[]",
|
|
1438
|
+
u(L)
|
|
1354
1439
|
);
|
|
1355
1440
|
}), !1;
|
|
1356
1441
|
}
|
|
1357
|
-
return
|
|
1442
|
+
return qe(p) ? !0 : (t.append(lt(y, w, o), u(p)), !1);
|
|
1358
1443
|
}
|
|
1359
|
-
const
|
|
1360
|
-
defaultVisitor:
|
|
1361
|
-
convertValue:
|
|
1362
|
-
isVisitable:
|
|
1444
|
+
const h = [], x = Object.assign(Xr, {
|
|
1445
|
+
defaultVisitor: c,
|
|
1446
|
+
convertValue: u,
|
|
1447
|
+
isVisitable: qe
|
|
1363
1448
|
});
|
|
1364
|
-
function
|
|
1365
|
-
if (!
|
|
1366
|
-
if (
|
|
1449
|
+
function E(p, w) {
|
|
1450
|
+
if (!d.isUndefined(p)) {
|
|
1451
|
+
if (h.indexOf(p) !== -1)
|
|
1367
1452
|
throw Error("Circular reference detected in " + w.join("."));
|
|
1368
|
-
|
|
1369
|
-
(!(
|
|
1453
|
+
h.push(p), d.forEach(p, function($, T) {
|
|
1454
|
+
(!(d.isUndefined($) || $ === null) && r.call(
|
|
1370
1455
|
t,
|
|
1371
|
-
|
|
1372
|
-
|
|
1456
|
+
$,
|
|
1457
|
+
d.isString(T) ? T.trim() : T,
|
|
1373
1458
|
w,
|
|
1374
|
-
|
|
1375
|
-
)) === !0 &&
|
|
1376
|
-
}),
|
|
1459
|
+
x
|
|
1460
|
+
)) === !0 && E($, w ? w.concat(T) : [T]);
|
|
1461
|
+
}), h.pop();
|
|
1377
1462
|
}
|
|
1378
1463
|
}
|
|
1379
|
-
if (!
|
|
1464
|
+
if (!d.isObject(e))
|
|
1380
1465
|
throw new TypeError("data must be an object");
|
|
1381
|
-
return
|
|
1466
|
+
return E(e), t;
|
|
1382
1467
|
}
|
|
1383
|
-
function
|
|
1468
|
+
function ct(e) {
|
|
1384
1469
|
const t = {
|
|
1385
1470
|
"!": "%21",
|
|
1386
1471
|
"'": "%27",
|
|
@@ -1394,40 +1479,40 @@ function at(e) {
|
|
|
1394
1479
|
return t[s];
|
|
1395
1480
|
});
|
|
1396
1481
|
}
|
|
1397
|
-
function
|
|
1398
|
-
this._pairs = [], e &&
|
|
1482
|
+
function Je(e, t) {
|
|
1483
|
+
this._pairs = [], e && Be(e, this, t);
|
|
1399
1484
|
}
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1485
|
+
const zt = Je.prototype;
|
|
1486
|
+
zt.append = function(t, n) {
|
|
1402
1487
|
this._pairs.push([t, n]);
|
|
1403
1488
|
};
|
|
1404
|
-
|
|
1489
|
+
zt.toString = function(t) {
|
|
1405
1490
|
const n = t ? function(s) {
|
|
1406
|
-
return t.call(this, s,
|
|
1407
|
-
} :
|
|
1491
|
+
return t.call(this, s, ct);
|
|
1492
|
+
} : ct;
|
|
1408
1493
|
return this._pairs.map(function(r) {
|
|
1409
1494
|
return n(r[0]) + "=" + n(r[1]);
|
|
1410
1495
|
}, "").join("&");
|
|
1411
1496
|
};
|
|
1412
|
-
function
|
|
1497
|
+
function Yr(e) {
|
|
1413
1498
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1414
1499
|
}
|
|
1415
|
-
function
|
|
1500
|
+
function qt(e, t, n) {
|
|
1416
1501
|
if (!t)
|
|
1417
1502
|
return e;
|
|
1418
|
-
const s = n && n.encode ||
|
|
1419
|
-
|
|
1503
|
+
const s = n && n.encode || Yr;
|
|
1504
|
+
d.isFunction(n) && (n = {
|
|
1420
1505
|
serialize: n
|
|
1421
1506
|
});
|
|
1422
1507
|
const r = n && n.serialize;
|
|
1423
1508
|
let o;
|
|
1424
|
-
if (r ? o = r(t, n) : o =
|
|
1509
|
+
if (r ? o = r(t, n) : o = d.isURLSearchParams(t) ? t.toString() : new Je(t, n).toString(s), o) {
|
|
1425
1510
|
const a = e.indexOf("#");
|
|
1426
1511
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1427
1512
|
}
|
|
1428
1513
|
return e;
|
|
1429
1514
|
}
|
|
1430
|
-
class
|
|
1515
|
+
class ut {
|
|
1431
1516
|
constructor() {
|
|
1432
1517
|
this.handlers = [];
|
|
1433
1518
|
}
|
|
@@ -1476,47 +1561,47 @@ class it {
|
|
|
1476
1561
|
* @returns {void}
|
|
1477
1562
|
*/
|
|
1478
1563
|
forEach(t) {
|
|
1479
|
-
|
|
1564
|
+
d.forEach(this.handlers, function(s) {
|
|
1480
1565
|
s !== null && t(s);
|
|
1481
1566
|
});
|
|
1482
1567
|
}
|
|
1483
1568
|
}
|
|
1484
|
-
const
|
|
1569
|
+
const Zt = {
|
|
1485
1570
|
silentJSONParsing: !0,
|
|
1486
1571
|
forcedJSONParsing: !0,
|
|
1487
1572
|
clarifyTimeoutError: !1
|
|
1488
|
-
},
|
|
1573
|
+
}, Qr = typeof URLSearchParams < "u" ? URLSearchParams : Je, eo = typeof FormData < "u" ? FormData : null, to = typeof Blob < "u" ? Blob : null, no = {
|
|
1489
1574
|
isBrowser: !0,
|
|
1490
1575
|
classes: {
|
|
1491
|
-
URLSearchParams:
|
|
1492
|
-
FormData:
|
|
1493
|
-
Blob:
|
|
1576
|
+
URLSearchParams: Qr,
|
|
1577
|
+
FormData: eo,
|
|
1578
|
+
Blob: to
|
|
1494
1579
|
},
|
|
1495
1580
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1496
|
-
},
|
|
1497
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1581
|
+
}, Ke = typeof window < "u" && typeof document < "u", Ze = typeof navigator == "object" && navigator || void 0, so = Ke && (!Ze || ["ReactNative", "NativeScript", "NS"].indexOf(Ze.product) < 0), ro = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1582
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", oo = Ke && window.location.href || "http://localhost", ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1498
1583
|
__proto__: null,
|
|
1499
|
-
hasBrowserEnv:
|
|
1500
|
-
hasStandardBrowserEnv:
|
|
1501
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1502
|
-
navigator:
|
|
1503
|
-
origin:
|
|
1584
|
+
hasBrowserEnv: Ke,
|
|
1585
|
+
hasStandardBrowserEnv: so,
|
|
1586
|
+
hasStandardBrowserWebWorkerEnv: ro,
|
|
1587
|
+
navigator: Ze,
|
|
1588
|
+
origin: oo
|
|
1504
1589
|
}, Symbol.toStringTag, { value: "Module" })), H = {
|
|
1505
|
-
...
|
|
1506
|
-
...
|
|
1590
|
+
...ao,
|
|
1591
|
+
...no
|
|
1507
1592
|
};
|
|
1508
|
-
function
|
|
1509
|
-
return
|
|
1593
|
+
function io(e, t) {
|
|
1594
|
+
return Be(e, new H.classes.URLSearchParams(), {
|
|
1510
1595
|
visitor: function(n, s, r, o) {
|
|
1511
|
-
return H.isNode &&
|
|
1596
|
+
return H.isNode && d.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1512
1597
|
},
|
|
1513
1598
|
...t
|
|
1514
1599
|
});
|
|
1515
1600
|
}
|
|
1516
|
-
function
|
|
1517
|
-
return
|
|
1601
|
+
function lo(e) {
|
|
1602
|
+
return d.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1518
1603
|
}
|
|
1519
|
-
function
|
|
1604
|
+
function co(e) {
|
|
1520
1605
|
const t = {}, n = Object.keys(e);
|
|
1521
1606
|
let s;
|
|
1522
1607
|
const r = n.length;
|
|
@@ -1525,70 +1610,70 @@ function to(e) {
|
|
|
1525
1610
|
o = n[s], t[o] = e[o];
|
|
1526
1611
|
return t;
|
|
1527
1612
|
}
|
|
1528
|
-
function
|
|
1613
|
+
function Wt(e) {
|
|
1529
1614
|
function t(n, s, r, o) {
|
|
1530
1615
|
let a = n[o++];
|
|
1531
1616
|
if (a === "__proto__") return !0;
|
|
1532
|
-
const
|
|
1533
|
-
return a = !a &&
|
|
1617
|
+
const i = Number.isFinite(+a), l = o >= n.length;
|
|
1618
|
+
return a = !a && d.isArray(r) ? r.length : a, l ? (d.hasOwnProp(r, a) ? r[a] = [r[a], s] : r[a] = s, !i) : ((!r[a] || !d.isObject(r[a])) && (r[a] = []), t(n, s, r[a], o) && d.isArray(r[a]) && (r[a] = co(r[a])), !i);
|
|
1534
1619
|
}
|
|
1535
|
-
if (
|
|
1620
|
+
if (d.isFormData(e) && d.isFunction(e.entries)) {
|
|
1536
1621
|
const n = {};
|
|
1537
|
-
return
|
|
1538
|
-
t(
|
|
1622
|
+
return d.forEachEntry(e, (s, r) => {
|
|
1623
|
+
t(lo(s), r, n, 0);
|
|
1539
1624
|
}), n;
|
|
1540
1625
|
}
|
|
1541
1626
|
return null;
|
|
1542
1627
|
}
|
|
1543
|
-
function
|
|
1544
|
-
if (
|
|
1628
|
+
function uo(e, t, n) {
|
|
1629
|
+
if (d.isString(e))
|
|
1545
1630
|
try {
|
|
1546
|
-
return (t || JSON.parse)(e),
|
|
1631
|
+
return (t || JSON.parse)(e), d.trim(e);
|
|
1547
1632
|
} catch (s) {
|
|
1548
1633
|
if (s.name !== "SyntaxError")
|
|
1549
1634
|
throw s;
|
|
1550
1635
|
}
|
|
1551
1636
|
return (n || JSON.stringify)(e);
|
|
1552
1637
|
}
|
|
1553
|
-
const
|
|
1554
|
-
transitional:
|
|
1638
|
+
const xe = {
|
|
1639
|
+
transitional: Zt,
|
|
1555
1640
|
adapter: ["xhr", "http", "fetch"],
|
|
1556
1641
|
transformRequest: [function(t, n) {
|
|
1557
|
-
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o =
|
|
1558
|
-
if (o &&
|
|
1559
|
-
return r ? JSON.stringify(
|
|
1560
|
-
if (
|
|
1642
|
+
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = d.isObject(t);
|
|
1643
|
+
if (o && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
|
|
1644
|
+
return r ? JSON.stringify(Wt(t)) : t;
|
|
1645
|
+
if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
|
|
1561
1646
|
return t;
|
|
1562
|
-
if (
|
|
1647
|
+
if (d.isArrayBufferView(t))
|
|
1563
1648
|
return t.buffer;
|
|
1564
|
-
if (
|
|
1649
|
+
if (d.isURLSearchParams(t))
|
|
1565
1650
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1566
|
-
let
|
|
1651
|
+
let i;
|
|
1567
1652
|
if (o) {
|
|
1568
1653
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1569
|
-
return
|
|
1570
|
-
if ((
|
|
1654
|
+
return io(t, this.formSerializer).toString();
|
|
1655
|
+
if ((i = d.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
1571
1656
|
const l = this.env && this.env.FormData;
|
|
1572
|
-
return
|
|
1573
|
-
|
|
1657
|
+
return Be(
|
|
1658
|
+
i ? { "files[]": t } : t,
|
|
1574
1659
|
l && new l(),
|
|
1575
1660
|
this.formSerializer
|
|
1576
1661
|
);
|
|
1577
1662
|
}
|
|
1578
1663
|
}
|
|
1579
|
-
return o || r ? (n.setContentType("application/json", !1),
|
|
1664
|
+
return o || r ? (n.setContentType("application/json", !1), uo(t)) : t;
|
|
1580
1665
|
}],
|
|
1581
1666
|
transformResponse: [function(t) {
|
|
1582
|
-
const n = this.transitional ||
|
|
1583
|
-
if (
|
|
1667
|
+
const n = this.transitional || xe.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
1668
|
+
if (d.isResponse(t) || d.isReadableStream(t))
|
|
1584
1669
|
return t;
|
|
1585
|
-
if (t &&
|
|
1670
|
+
if (t && d.isString(t) && (s && !this.responseType || r)) {
|
|
1586
1671
|
const a = !(n && n.silentJSONParsing) && r;
|
|
1587
1672
|
try {
|
|
1588
1673
|
return JSON.parse(t, this.parseReviver);
|
|
1589
|
-
} catch (
|
|
1674
|
+
} catch (i) {
|
|
1590
1675
|
if (a)
|
|
1591
|
-
throw
|
|
1676
|
+
throw i.name === "SyntaxError" ? S.from(i, S.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
1592
1677
|
}
|
|
1593
1678
|
}
|
|
1594
1679
|
return t;
|
|
@@ -1616,10 +1701,10 @@ const be = {
|
|
|
1616
1701
|
}
|
|
1617
1702
|
}
|
|
1618
1703
|
};
|
|
1619
|
-
|
|
1620
|
-
|
|
1704
|
+
d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1705
|
+
xe.headers[e] = {};
|
|
1621
1706
|
});
|
|
1622
|
-
const
|
|
1707
|
+
const fo = d.toObjectSet([
|
|
1623
1708
|
"age",
|
|
1624
1709
|
"authorization",
|
|
1625
1710
|
"content-length",
|
|
@@ -1637,43 +1722,43 @@ const so = u.toObjectSet([
|
|
|
1637
1722
|
"referer",
|
|
1638
1723
|
"retry-after",
|
|
1639
1724
|
"user-agent"
|
|
1640
|
-
]),
|
|
1725
|
+
]), po = (e) => {
|
|
1641
1726
|
const t = {};
|
|
1642
1727
|
let n, s, r;
|
|
1643
1728
|
return e && e.split(`
|
|
1644
1729
|
`).forEach(function(a) {
|
|
1645
|
-
r = a.indexOf(":"), n = a.substring(0, r).trim().toLowerCase(), s = a.substring(r + 1).trim(), !(!n || t[n] &&
|
|
1730
|
+
r = a.indexOf(":"), n = a.substring(0, r).trim().toLowerCase(), s = a.substring(r + 1).trim(), !(!n || t[n] && fo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
1646
1731
|
}), t;
|
|
1647
|
-
},
|
|
1732
|
+
}, dt = Symbol("internals");
|
|
1648
1733
|
function he(e) {
|
|
1649
1734
|
return e && String(e).trim().toLowerCase();
|
|
1650
1735
|
}
|
|
1651
|
-
function
|
|
1652
|
-
return e === !1 || e == null ? e :
|
|
1736
|
+
function Re(e) {
|
|
1737
|
+
return e === !1 || e == null ? e : d.isArray(e) ? e.map(Re) : String(e);
|
|
1653
1738
|
}
|
|
1654
|
-
function
|
|
1739
|
+
function ho(e) {
|
|
1655
1740
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1656
1741
|
let s;
|
|
1657
1742
|
for (; s = n.exec(e); )
|
|
1658
1743
|
t[s[1]] = s[2];
|
|
1659
1744
|
return t;
|
|
1660
1745
|
}
|
|
1661
|
-
const
|
|
1662
|
-
function
|
|
1663
|
-
if (
|
|
1746
|
+
const mo = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1747
|
+
function Ue(e, t, n, s, r) {
|
|
1748
|
+
if (d.isFunction(s))
|
|
1664
1749
|
return s.call(this, t, n);
|
|
1665
|
-
if (r && (t = n), !!
|
|
1666
|
-
if (
|
|
1750
|
+
if (r && (t = n), !!d.isString(t)) {
|
|
1751
|
+
if (d.isString(s))
|
|
1667
1752
|
return t.indexOf(s) !== -1;
|
|
1668
|
-
if (
|
|
1753
|
+
if (d.isRegExp(s))
|
|
1669
1754
|
return s.test(t);
|
|
1670
1755
|
}
|
|
1671
1756
|
}
|
|
1672
|
-
function
|
|
1757
|
+
function go(e) {
|
|
1673
1758
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
1674
1759
|
}
|
|
1675
|
-
function
|
|
1676
|
-
const n =
|
|
1760
|
+
function yo(e, t) {
|
|
1761
|
+
const n = d.toCamelCase(" " + t);
|
|
1677
1762
|
["get", "set", "has"].forEach((s) => {
|
|
1678
1763
|
Object.defineProperty(e, s + n, {
|
|
1679
1764
|
value: function(r, o, a) {
|
|
@@ -1689,42 +1774,42 @@ let N = class {
|
|
|
1689
1774
|
}
|
|
1690
1775
|
set(t, n, s) {
|
|
1691
1776
|
const r = this;
|
|
1692
|
-
function o(
|
|
1693
|
-
const
|
|
1694
|
-
if (!
|
|
1777
|
+
function o(i, l, u) {
|
|
1778
|
+
const c = he(l);
|
|
1779
|
+
if (!c)
|
|
1695
1780
|
throw new Error("header name must be a non-empty string");
|
|
1696
|
-
const
|
|
1697
|
-
(!
|
|
1781
|
+
const h = d.findKey(r, c);
|
|
1782
|
+
(!h || r[h] === void 0 || u === !0 || u === void 0 && r[h] !== !1) && (r[h || l] = Re(i));
|
|
1698
1783
|
}
|
|
1699
|
-
const a = (
|
|
1700
|
-
if (
|
|
1784
|
+
const a = (i, l) => d.forEach(i, (u, c) => o(u, c, l));
|
|
1785
|
+
if (d.isPlainObject(t) || t instanceof this.constructor)
|
|
1701
1786
|
a(t, n);
|
|
1702
|
-
else if (
|
|
1703
|
-
a(
|
|
1704
|
-
else if (
|
|
1705
|
-
let
|
|
1706
|
-
for (const
|
|
1707
|
-
if (!
|
|
1787
|
+
else if (d.isString(t) && (t = t.trim()) && !mo(t))
|
|
1788
|
+
a(po(t), n);
|
|
1789
|
+
else if (d.isObject(t) && d.isIterable(t)) {
|
|
1790
|
+
let i = {}, l, u;
|
|
1791
|
+
for (const c of t) {
|
|
1792
|
+
if (!d.isArray(c))
|
|
1708
1793
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1709
|
-
|
|
1794
|
+
i[u = c[0]] = (l = i[u]) ? d.isArray(l) ? [...l, c[1]] : [l, c[1]] : c[1];
|
|
1710
1795
|
}
|
|
1711
|
-
a(
|
|
1796
|
+
a(i, n);
|
|
1712
1797
|
} else
|
|
1713
1798
|
t != null && o(n, t, s);
|
|
1714
1799
|
return this;
|
|
1715
1800
|
}
|
|
1716
1801
|
get(t, n) {
|
|
1717
1802
|
if (t = he(t), t) {
|
|
1718
|
-
const s =
|
|
1803
|
+
const s = d.findKey(this, t);
|
|
1719
1804
|
if (s) {
|
|
1720
1805
|
const r = this[s];
|
|
1721
1806
|
if (!n)
|
|
1722
1807
|
return r;
|
|
1723
1808
|
if (n === !0)
|
|
1724
|
-
return
|
|
1725
|
-
if (
|
|
1809
|
+
return ho(r);
|
|
1810
|
+
if (d.isFunction(n))
|
|
1726
1811
|
return n.call(this, r, s);
|
|
1727
|
-
if (
|
|
1812
|
+
if (d.isRegExp(n))
|
|
1728
1813
|
return n.exec(r);
|
|
1729
1814
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1730
1815
|
}
|
|
@@ -1732,8 +1817,8 @@ let N = class {
|
|
|
1732
1817
|
}
|
|
1733
1818
|
has(t, n) {
|
|
1734
1819
|
if (t = he(t), t) {
|
|
1735
|
-
const s =
|
|
1736
|
-
return !!(s && this[s] !== void 0 && (!n ||
|
|
1820
|
+
const s = d.findKey(this, t);
|
|
1821
|
+
return !!(s && this[s] !== void 0 && (!n || Ue(this, this[s], s, n)));
|
|
1737
1822
|
}
|
|
1738
1823
|
return !1;
|
|
1739
1824
|
}
|
|
@@ -1742,31 +1827,31 @@ let N = class {
|
|
|
1742
1827
|
let r = !1;
|
|
1743
1828
|
function o(a) {
|
|
1744
1829
|
if (a = he(a), a) {
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1830
|
+
const i = d.findKey(s, a);
|
|
1831
|
+
i && (!n || Ue(s, s[i], i, n)) && (delete s[i], r = !0);
|
|
1747
1832
|
}
|
|
1748
1833
|
}
|
|
1749
|
-
return
|
|
1834
|
+
return d.isArray(t) ? t.forEach(o) : o(t), r;
|
|
1750
1835
|
}
|
|
1751
1836
|
clear(t) {
|
|
1752
1837
|
const n = Object.keys(this);
|
|
1753
1838
|
let s = n.length, r = !1;
|
|
1754
1839
|
for (; s--; ) {
|
|
1755
1840
|
const o = n[s];
|
|
1756
|
-
(!t ||
|
|
1841
|
+
(!t || Ue(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
1757
1842
|
}
|
|
1758
1843
|
return r;
|
|
1759
1844
|
}
|
|
1760
1845
|
normalize(t) {
|
|
1761
1846
|
const n = this, s = {};
|
|
1762
|
-
return
|
|
1763
|
-
const a =
|
|
1847
|
+
return d.forEach(this, (r, o) => {
|
|
1848
|
+
const a = d.findKey(s, o);
|
|
1764
1849
|
if (a) {
|
|
1765
|
-
n[a] =
|
|
1850
|
+
n[a] = Re(r), delete n[o];
|
|
1766
1851
|
return;
|
|
1767
1852
|
}
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1853
|
+
const i = t ? go(o) : String(o).trim();
|
|
1854
|
+
i !== o && delete n[o], n[i] = Re(r), s[i] = !0;
|
|
1770
1855
|
}), this;
|
|
1771
1856
|
}
|
|
1772
1857
|
concat(...t) {
|
|
@@ -1774,8 +1859,8 @@ let N = class {
|
|
|
1774
1859
|
}
|
|
1775
1860
|
toJSON(t) {
|
|
1776
1861
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1777
|
-
return
|
|
1778
|
-
s != null && s !== !1 && (n[r] = t &&
|
|
1862
|
+
return d.forEach(this, (s, r) => {
|
|
1863
|
+
s != null && s !== !1 && (n[r] = t && d.isArray(s) ? s.join(", ") : s);
|
|
1779
1864
|
}), n;
|
|
1780
1865
|
}
|
|
1781
1866
|
[Symbol.iterator]() {
|
|
@@ -1799,18 +1884,18 @@ let N = class {
|
|
|
1799
1884
|
return n.forEach((r) => s.set(r)), s;
|
|
1800
1885
|
}
|
|
1801
1886
|
static accessor(t) {
|
|
1802
|
-
const s = (this[
|
|
1887
|
+
const s = (this[dt] = this[dt] = {
|
|
1803
1888
|
accessors: {}
|
|
1804
1889
|
}).accessors, r = this.prototype;
|
|
1805
1890
|
function o(a) {
|
|
1806
|
-
const
|
|
1807
|
-
s[
|
|
1891
|
+
const i = he(a);
|
|
1892
|
+
s[i] || (yo(r, a), s[i] = !0);
|
|
1808
1893
|
}
|
|
1809
|
-
return
|
|
1894
|
+
return d.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1810
1895
|
}
|
|
1811
1896
|
};
|
|
1812
1897
|
N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1813
|
-
|
|
1898
|
+
d.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
1814
1899
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1815
1900
|
return {
|
|
1816
1901
|
get: () => e,
|
|
@@ -1819,101 +1904,101 @@ u.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
1819
1904
|
}
|
|
1820
1905
|
};
|
|
1821
1906
|
});
|
|
1822
|
-
|
|
1823
|
-
function
|
|
1824
|
-
const n = this ||
|
|
1907
|
+
d.freezeMethods(N);
|
|
1908
|
+
function je(e, t) {
|
|
1909
|
+
const n = this || xe, s = t || n, r = N.from(s.headers);
|
|
1825
1910
|
let o = s.data;
|
|
1826
|
-
return
|
|
1827
|
-
o =
|
|
1911
|
+
return d.forEach(e, function(i) {
|
|
1912
|
+
o = i.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
1828
1913
|
}), r.normalize(), o;
|
|
1829
1914
|
}
|
|
1830
|
-
function
|
|
1915
|
+
function Gt(e) {
|
|
1831
1916
|
return !!(e && e.__CANCEL__);
|
|
1832
1917
|
}
|
|
1833
1918
|
function ue(e, t, n) {
|
|
1834
|
-
|
|
1919
|
+
S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1835
1920
|
}
|
|
1836
|
-
|
|
1921
|
+
d.inherits(ue, S, {
|
|
1837
1922
|
__CANCEL__: !0
|
|
1838
1923
|
});
|
|
1839
|
-
function
|
|
1924
|
+
function Jt(e, t, n) {
|
|
1840
1925
|
const s = n.config.validateStatus;
|
|
1841
|
-
!n.status || !s || s(n.status) ? e(n) : t(new
|
|
1926
|
+
!n.status || !s || s(n.status) ? e(n) : t(new S(
|
|
1842
1927
|
"Request failed with status code " + n.status,
|
|
1843
|
-
[
|
|
1928
|
+
[S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1844
1929
|
n.config,
|
|
1845
1930
|
n.request,
|
|
1846
1931
|
n
|
|
1847
1932
|
));
|
|
1848
1933
|
}
|
|
1849
|
-
function
|
|
1934
|
+
function wo(e) {
|
|
1850
1935
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1851
1936
|
return t && t[1] || "";
|
|
1852
1937
|
}
|
|
1853
|
-
function
|
|
1938
|
+
function bo(e, t) {
|
|
1854
1939
|
e = e || 10;
|
|
1855
1940
|
const n = new Array(e), s = new Array(e);
|
|
1856
1941
|
let r = 0, o = 0, a;
|
|
1857
1942
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
1858
|
-
const
|
|
1859
|
-
a || (a =
|
|
1860
|
-
let
|
|
1861
|
-
for (;
|
|
1862
|
-
|
|
1863
|
-
if (r = (r + 1) % e, r === o && (o = (o + 1) % e),
|
|
1943
|
+
const u = Date.now(), c = s[o];
|
|
1944
|
+
a || (a = u), n[r] = l, s[r] = u;
|
|
1945
|
+
let h = o, x = 0;
|
|
1946
|
+
for (; h !== r; )
|
|
1947
|
+
x += n[h++], h = h % e;
|
|
1948
|
+
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - a < t)
|
|
1864
1949
|
return;
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1950
|
+
const E = c && u - c;
|
|
1951
|
+
return E ? Math.round(x * 1e3 / E) : void 0;
|
|
1867
1952
|
};
|
|
1868
1953
|
}
|
|
1869
|
-
function
|
|
1954
|
+
function xo(e, t) {
|
|
1870
1955
|
let n = 0, s = 1e3 / t, r, o;
|
|
1871
|
-
const a = (
|
|
1872
|
-
n =
|
|
1956
|
+
const a = (u, c = Date.now()) => {
|
|
1957
|
+
n = c, r = null, o && (clearTimeout(o), o = null), e(...u);
|
|
1873
1958
|
};
|
|
1874
|
-
return [(...
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1959
|
+
return [(...u) => {
|
|
1960
|
+
const c = Date.now(), h = c - n;
|
|
1961
|
+
h >= s ? a(u, c) : (r = u, o || (o = setTimeout(() => {
|
|
1877
1962
|
o = null, a(r);
|
|
1878
|
-
}, s -
|
|
1963
|
+
}, s - h)));
|
|
1879
1964
|
}, () => r && a(r)];
|
|
1880
1965
|
}
|
|
1881
|
-
const
|
|
1966
|
+
const Le = (e, t, n = 3) => {
|
|
1882
1967
|
let s = 0;
|
|
1883
|
-
const r =
|
|
1884
|
-
return
|
|
1885
|
-
const a = o.loaded,
|
|
1968
|
+
const r = bo(50, 250);
|
|
1969
|
+
return xo((o) => {
|
|
1970
|
+
const a = o.loaded, i = o.lengthComputable ? o.total : void 0, l = a - s, u = r(l), c = a <= i;
|
|
1886
1971
|
s = a;
|
|
1887
|
-
const
|
|
1972
|
+
const h = {
|
|
1888
1973
|
loaded: a,
|
|
1889
|
-
total:
|
|
1890
|
-
progress:
|
|
1974
|
+
total: i,
|
|
1975
|
+
progress: i ? a / i : void 0,
|
|
1891
1976
|
bytes: l,
|
|
1892
|
-
rate:
|
|
1893
|
-
estimated:
|
|
1977
|
+
rate: u || void 0,
|
|
1978
|
+
estimated: u && i && c ? (i - a) / u : void 0,
|
|
1894
1979
|
event: o,
|
|
1895
|
-
lengthComputable:
|
|
1980
|
+
lengthComputable: i != null,
|
|
1896
1981
|
[t ? "download" : "upload"]: !0
|
|
1897
1982
|
};
|
|
1898
|
-
e(
|
|
1983
|
+
e(h);
|
|
1899
1984
|
}, n);
|
|
1900
|
-
},
|
|
1985
|
+
}, ft = (e, t) => {
|
|
1901
1986
|
const n = e != null;
|
|
1902
1987
|
return [(s) => t[0]({
|
|
1903
1988
|
lengthComputable: n,
|
|
1904
1989
|
total: e,
|
|
1905
1990
|
loaded: s
|
|
1906
1991
|
}), t[1]];
|
|
1907
|
-
},
|
|
1992
|
+
}, pt = (e) => (...t) => d.asap(() => e(...t)), So = H.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, H.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1908
1993
|
new URL(H.origin),
|
|
1909
1994
|
H.navigator && /(msie|trident)/i.test(H.navigator.userAgent)
|
|
1910
|
-
) : () => !0,
|
|
1995
|
+
) : () => !0, Co = H.hasStandardBrowserEnv ? (
|
|
1911
1996
|
// Standard browser envs support document.cookie
|
|
1912
1997
|
{
|
|
1913
1998
|
write(e, t, n, s, r, o, a) {
|
|
1914
1999
|
if (typeof document > "u") return;
|
|
1915
|
-
const
|
|
1916
|
-
|
|
2000
|
+
const i = [`${e}=${encodeURIComponent(t)}`];
|
|
2001
|
+
d.isNumber(n) && i.push(`expires=${new Date(n).toUTCString()}`), d.isString(s) && i.push(`path=${s}`), d.isString(r) && i.push(`domain=${r}`), o === !0 && i.push("secure"), d.isString(a) && i.push(`SameSite=${a}`), document.cookie = i.join("; ");
|
|
1917
2002
|
},
|
|
1918
2003
|
read(e) {
|
|
1919
2004
|
if (typeof document > "u") return null;
|
|
@@ -1936,44 +2021,44 @@ const $e = (e, t, n = 3) => {
|
|
|
1936
2021
|
}
|
|
1937
2022
|
}
|
|
1938
2023
|
);
|
|
1939
|
-
function
|
|
2024
|
+
function vo(e) {
|
|
1940
2025
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1941
2026
|
}
|
|
1942
|
-
function
|
|
2027
|
+
function _o(e, t) {
|
|
1943
2028
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1944
2029
|
}
|
|
1945
|
-
function
|
|
1946
|
-
let s = !
|
|
1947
|
-
return e && (s || n == !1) ?
|
|
2030
|
+
function Kt(e, t, n) {
|
|
2031
|
+
let s = !vo(t);
|
|
2032
|
+
return e && (s || n == !1) ? _o(e, t) : t;
|
|
1948
2033
|
}
|
|
1949
|
-
const
|
|
2034
|
+
const ht = (e) => e instanceof N ? { ...e } : e;
|
|
1950
2035
|
function ne(e, t) {
|
|
1951
2036
|
t = t || {};
|
|
1952
2037
|
const n = {};
|
|
1953
|
-
function s(
|
|
1954
|
-
return
|
|
1955
|
-
}
|
|
1956
|
-
function r(
|
|
1957
|
-
if (
|
|
1958
|
-
if (!
|
|
1959
|
-
return s(void 0,
|
|
1960
|
-
} else return s(
|
|
1961
|
-
}
|
|
1962
|
-
function o(
|
|
1963
|
-
if (!
|
|
1964
|
-
return s(void 0,
|
|
1965
|
-
}
|
|
1966
|
-
function a(
|
|
1967
|
-
if (
|
|
1968
|
-
if (!
|
|
1969
|
-
return s(void 0,
|
|
1970
|
-
} else return s(void 0,
|
|
1971
|
-
}
|
|
1972
|
-
function
|
|
1973
|
-
if (
|
|
1974
|
-
return s(
|
|
1975
|
-
if (
|
|
1976
|
-
return s(void 0,
|
|
2038
|
+
function s(u, c, h, x) {
|
|
2039
|
+
return d.isPlainObject(u) && d.isPlainObject(c) ? d.merge.call({ caseless: x }, u, c) : d.isPlainObject(c) ? d.merge({}, c) : d.isArray(c) ? c.slice() : c;
|
|
2040
|
+
}
|
|
2041
|
+
function r(u, c, h, x) {
|
|
2042
|
+
if (d.isUndefined(c)) {
|
|
2043
|
+
if (!d.isUndefined(u))
|
|
2044
|
+
return s(void 0, u, h, x);
|
|
2045
|
+
} else return s(u, c, h, x);
|
|
2046
|
+
}
|
|
2047
|
+
function o(u, c) {
|
|
2048
|
+
if (!d.isUndefined(c))
|
|
2049
|
+
return s(void 0, c);
|
|
2050
|
+
}
|
|
2051
|
+
function a(u, c) {
|
|
2052
|
+
if (d.isUndefined(c)) {
|
|
2053
|
+
if (!d.isUndefined(u))
|
|
2054
|
+
return s(void 0, u);
|
|
2055
|
+
} else return s(void 0, c);
|
|
2056
|
+
}
|
|
2057
|
+
function i(u, c, h) {
|
|
2058
|
+
if (h in t)
|
|
2059
|
+
return s(u, c);
|
|
2060
|
+
if (h in e)
|
|
2061
|
+
return s(void 0, u);
|
|
1977
2062
|
}
|
|
1978
2063
|
const l = {
|
|
1979
2064
|
url: o,
|
|
@@ -2003,117 +2088,117 @@ function ne(e, t) {
|
|
|
2003
2088
|
cancelToken: a,
|
|
2004
2089
|
socketPath: a,
|
|
2005
2090
|
responseEncoding: a,
|
|
2006
|
-
validateStatus:
|
|
2007
|
-
headers: (
|
|
2091
|
+
validateStatus: i,
|
|
2092
|
+
headers: (u, c, h) => r(ht(u), ht(c), h, !0)
|
|
2008
2093
|
};
|
|
2009
|
-
return
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2094
|
+
return d.forEach(Object.keys({ ...e, ...t }), function(c) {
|
|
2095
|
+
const h = l[c] || r, x = h(e[c], t[c], c);
|
|
2096
|
+
d.isUndefined(x) && h !== i || (n[c] = x);
|
|
2012
2097
|
}), n;
|
|
2013
2098
|
}
|
|
2014
|
-
const
|
|
2099
|
+
const Xt = (e) => {
|
|
2015
2100
|
const t = ne({}, e);
|
|
2016
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: a, auth:
|
|
2017
|
-
if (t.headers = a = N.from(a), t.url =
|
|
2101
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: a, auth: i } = t;
|
|
2102
|
+
if (t.headers = a = N.from(a), t.url = qt(Kt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set(
|
|
2018
2103
|
"Authorization",
|
|
2019
|
-
"Basic " + btoa((
|
|
2020
|
-
),
|
|
2104
|
+
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
2105
|
+
), d.isFormData(n)) {
|
|
2021
2106
|
if (H.hasStandardBrowserEnv || H.hasStandardBrowserWebWorkerEnv)
|
|
2022
2107
|
a.setContentType(void 0);
|
|
2023
|
-
else if (
|
|
2024
|
-
const l = n.getHeaders(),
|
|
2025
|
-
Object.entries(l).forEach(([
|
|
2026
|
-
|
|
2108
|
+
else if (d.isFunction(n.getHeaders)) {
|
|
2109
|
+
const l = n.getHeaders(), u = ["content-type", "content-length"];
|
|
2110
|
+
Object.entries(l).forEach(([c, h]) => {
|
|
2111
|
+
u.includes(c.toLowerCase()) && a.set(c, h);
|
|
2027
2112
|
});
|
|
2028
2113
|
}
|
|
2029
2114
|
}
|
|
2030
|
-
if (H.hasStandardBrowserEnv && (s &&
|
|
2031
|
-
const l = r && o &&
|
|
2115
|
+
if (H.hasStandardBrowserEnv && (s && d.isFunction(s) && (s = s(t)), s || s !== !1 && So(t.url))) {
|
|
2116
|
+
const l = r && o && Co.read(o);
|
|
2032
2117
|
l && a.set(r, l);
|
|
2033
2118
|
}
|
|
2034
2119
|
return t;
|
|
2035
|
-
},
|
|
2120
|
+
}, ko = typeof XMLHttpRequest < "u", Ro = ko && function(e) {
|
|
2036
2121
|
return new Promise(function(n, s) {
|
|
2037
|
-
const r =
|
|
2122
|
+
const r = Xt(e);
|
|
2038
2123
|
let o = r.data;
|
|
2039
2124
|
const a = N.from(r.headers).normalize();
|
|
2040
|
-
let { responseType:
|
|
2125
|
+
let { responseType: i, onUploadProgress: l, onDownloadProgress: u } = r, c, h, x, E, p;
|
|
2041
2126
|
function w() {
|
|
2042
|
-
|
|
2127
|
+
E && E(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(c), r.signal && r.signal.removeEventListener("abort", c);
|
|
2043
2128
|
}
|
|
2044
2129
|
let y = new XMLHttpRequest();
|
|
2045
2130
|
y.open(r.method.toUpperCase(), r.url, !0), y.timeout = r.timeout;
|
|
2046
|
-
function
|
|
2131
|
+
function $() {
|
|
2047
2132
|
if (!y)
|
|
2048
2133
|
return;
|
|
2049
|
-
const
|
|
2134
|
+
const L = N.from(
|
|
2050
2135
|
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
|
|
2051
|
-
),
|
|
2052
|
-
data: !
|
|
2136
|
+
), j = {
|
|
2137
|
+
data: !i || i === "text" || i === "json" ? y.responseText : y.response,
|
|
2053
2138
|
status: y.status,
|
|
2054
2139
|
statusText: y.statusText,
|
|
2055
|
-
headers:
|
|
2140
|
+
headers: L,
|
|
2056
2141
|
config: e,
|
|
2057
2142
|
request: y
|
|
2058
2143
|
};
|
|
2059
|
-
|
|
2144
|
+
Jt(function(P) {
|
|
2060
2145
|
n(P), w();
|
|
2061
2146
|
}, function(P) {
|
|
2062
2147
|
s(P), w();
|
|
2063
|
-
},
|
|
2148
|
+
}, j), y = null;
|
|
2064
2149
|
}
|
|
2065
|
-
"onloadend" in y ? y.onloadend =
|
|
2066
|
-
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
2150
|
+
"onloadend" in y ? y.onloadend = $ : y.onreadystatechange = function() {
|
|
2151
|
+
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout($);
|
|
2067
2152
|
}, y.onabort = function() {
|
|
2068
|
-
y && (s(new
|
|
2153
|
+
y && (s(new S("Request aborted", S.ECONNABORTED, e, y)), y = null);
|
|
2069
2154
|
}, y.onerror = function(F) {
|
|
2070
|
-
const
|
|
2071
|
-
|
|
2155
|
+
const j = F && F.message ? F.message : "Network Error", X = new S(j, S.ERR_NETWORK, e, y);
|
|
2156
|
+
X.event = F || null, s(X), y = null;
|
|
2072
2157
|
}, y.ontimeout = function() {
|
|
2073
2158
|
let F = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
2074
|
-
const
|
|
2075
|
-
r.timeoutErrorMessage && (F = r.timeoutErrorMessage), s(new
|
|
2159
|
+
const j = r.transitional || Zt;
|
|
2160
|
+
r.timeoutErrorMessage && (F = r.timeoutErrorMessage), s(new S(
|
|
2076
2161
|
F,
|
|
2077
|
-
|
|
2162
|
+
j.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
2078
2163
|
e,
|
|
2079
2164
|
y
|
|
2080
2165
|
)), y = null;
|
|
2081
|
-
}, o === void 0 && a.setContentType(null), "setRequestHeader" in y &&
|
|
2082
|
-
y.setRequestHeader(
|
|
2083
|
-
}),
|
|
2084
|
-
y && (s(!
|
|
2085
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
2086
|
-
const T =
|
|
2166
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in y && d.forEach(a.toJSON(), function(F, j) {
|
|
2167
|
+
y.setRequestHeader(j, F);
|
|
2168
|
+
}), d.isUndefined(r.withCredentials) || (y.withCredentials = !!r.withCredentials), i && i !== "json" && (y.responseType = r.responseType), u && ([x, p] = Le(u, !0), y.addEventListener("progress", x)), l && y.upload && ([h, E] = Le(l), y.upload.addEventListener("progress", h), y.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (c = (L) => {
|
|
2169
|
+
y && (s(!L || L.type ? new ue(null, e, y) : L), y.abort(), y = null);
|
|
2170
|
+
}, r.cancelToken && r.cancelToken.subscribe(c), r.signal && (r.signal.aborted ? c() : r.signal.addEventListener("abort", c)));
|
|
2171
|
+
const T = wo(r.url);
|
|
2087
2172
|
if (T && H.protocols.indexOf(T) === -1) {
|
|
2088
|
-
s(new
|
|
2173
|
+
s(new S("Unsupported protocol " + T + ":", S.ERR_BAD_REQUEST, e));
|
|
2089
2174
|
return;
|
|
2090
2175
|
}
|
|
2091
2176
|
y.send(o || null);
|
|
2092
2177
|
});
|
|
2093
|
-
},
|
|
2178
|
+
}, Eo = (e, t) => {
|
|
2094
2179
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
2095
2180
|
if (t || n) {
|
|
2096
2181
|
let s = new AbortController(), r;
|
|
2097
|
-
const o = function(
|
|
2182
|
+
const o = function(u) {
|
|
2098
2183
|
if (!r) {
|
|
2099
|
-
r = !0,
|
|
2100
|
-
const
|
|
2101
|
-
s.abort(
|
|
2184
|
+
r = !0, i();
|
|
2185
|
+
const c = u instanceof Error ? u : this.reason;
|
|
2186
|
+
s.abort(c instanceof S ? c : new ue(c instanceof Error ? c.message : c));
|
|
2102
2187
|
}
|
|
2103
2188
|
};
|
|
2104
2189
|
let a = t && setTimeout(() => {
|
|
2105
|
-
a = null, o(new
|
|
2190
|
+
a = null, o(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
|
|
2106
2191
|
}, t);
|
|
2107
|
-
const
|
|
2108
|
-
e && (a && clearTimeout(a), a = null, e.forEach((
|
|
2109
|
-
|
|
2192
|
+
const i = () => {
|
|
2193
|
+
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
|
|
2194
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
2110
2195
|
}), e = null);
|
|
2111
2196
|
};
|
|
2112
|
-
e.forEach((
|
|
2197
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
2113
2198
|
const { signal: l } = s;
|
|
2114
|
-
return l.unsubscribe = () =>
|
|
2199
|
+
return l.unsubscribe = () => d.asap(i), l;
|
|
2115
2200
|
}
|
|
2116
|
-
},
|
|
2201
|
+
}, $o = function* (e, t) {
|
|
2117
2202
|
let n = e.byteLength;
|
|
2118
2203
|
if (n < t) {
|
|
2119
2204
|
yield e;
|
|
@@ -2122,10 +2207,10 @@ const Wt = (e) => {
|
|
|
2122
2207
|
let s = 0, r;
|
|
2123
2208
|
for (; s < n; )
|
|
2124
2209
|
r = s + t, yield e.slice(s, r), s = r;
|
|
2125
|
-
},
|
|
2126
|
-
for await (const n of
|
|
2127
|
-
yield*
|
|
2128
|
-
},
|
|
2210
|
+
}, Ao = async function* (e, t) {
|
|
2211
|
+
for await (const n of Lo(e))
|
|
2212
|
+
yield* $o(n, t);
|
|
2213
|
+
}, Lo = async function* (e) {
|
|
2129
2214
|
if (e[Symbol.asyncIterator]) {
|
|
2130
2215
|
yield* e;
|
|
2131
2216
|
return;
|
|
@@ -2141,200 +2226,200 @@ const Wt = (e) => {
|
|
|
2141
2226
|
} finally {
|
|
2142
2227
|
await t.cancel();
|
|
2143
2228
|
}
|
|
2144
|
-
},
|
|
2145
|
-
const r =
|
|
2146
|
-
let o = 0, a,
|
|
2229
|
+
}, mt = (e, t, n, s) => {
|
|
2230
|
+
const r = Ao(e, t);
|
|
2231
|
+
let o = 0, a, i = (l) => {
|
|
2147
2232
|
a || (a = !0, s && s(l));
|
|
2148
2233
|
};
|
|
2149
2234
|
return new ReadableStream({
|
|
2150
2235
|
async pull(l) {
|
|
2151
2236
|
try {
|
|
2152
|
-
const { done:
|
|
2153
|
-
if (
|
|
2154
|
-
|
|
2237
|
+
const { done: u, value: c } = await r.next();
|
|
2238
|
+
if (u) {
|
|
2239
|
+
i(), l.close();
|
|
2155
2240
|
return;
|
|
2156
2241
|
}
|
|
2157
|
-
let
|
|
2242
|
+
let h = c.byteLength;
|
|
2158
2243
|
if (n) {
|
|
2159
|
-
let
|
|
2160
|
-
n(
|
|
2244
|
+
let x = o += h;
|
|
2245
|
+
n(x);
|
|
2161
2246
|
}
|
|
2162
|
-
l.enqueue(new Uint8Array(
|
|
2163
|
-
} catch (
|
|
2164
|
-
throw
|
|
2247
|
+
l.enqueue(new Uint8Array(c));
|
|
2248
|
+
} catch (u) {
|
|
2249
|
+
throw i(u), u;
|
|
2165
2250
|
}
|
|
2166
2251
|
},
|
|
2167
2252
|
cancel(l) {
|
|
2168
|
-
return
|
|
2253
|
+
return i(l), r.return();
|
|
2169
2254
|
}
|
|
2170
2255
|
}, {
|
|
2171
2256
|
highWaterMark: 2
|
|
2172
2257
|
});
|
|
2173
|
-
},
|
|
2258
|
+
}, gt = 64 * 1024, { isFunction: _e } = d, Oo = (({ Request: e, Response: t }) => ({
|
|
2174
2259
|
Request: e,
|
|
2175
2260
|
Response: t
|
|
2176
|
-
}))(
|
|
2177
|
-
ReadableStream:
|
|
2178
|
-
TextEncoder:
|
|
2179
|
-
} =
|
|
2261
|
+
}))(d.global), {
|
|
2262
|
+
ReadableStream: yt,
|
|
2263
|
+
TextEncoder: wt
|
|
2264
|
+
} = d.global, bt = (e, ...t) => {
|
|
2180
2265
|
try {
|
|
2181
2266
|
return !!e(...t);
|
|
2182
2267
|
} catch {
|
|
2183
2268
|
return !1;
|
|
2184
2269
|
}
|
|
2185
|
-
},
|
|
2186
|
-
e =
|
|
2270
|
+
}, To = (e) => {
|
|
2271
|
+
e = d.merge.call({
|
|
2187
2272
|
skipUndefined: !0
|
|
2188
|
-
},
|
|
2189
|
-
const { fetch: t, Request: n, Response: s } = e, r = t ?
|
|
2273
|
+
}, Oo, e);
|
|
2274
|
+
const { fetch: t, Request: n, Response: s } = e, r = t ? _e(t) : typeof fetch == "function", o = _e(n), a = _e(s);
|
|
2190
2275
|
if (!r)
|
|
2191
2276
|
return !1;
|
|
2192
|
-
const
|
|
2193
|
-
let
|
|
2277
|
+
const i = r && _e(yt), l = r && (typeof wt == "function" ? /* @__PURE__ */ ((p) => (w) => p.encode(w))(new wt()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), u = o && i && bt(() => {
|
|
2278
|
+
let p = !1;
|
|
2194
2279
|
const w = new n(H.origin, {
|
|
2195
|
-
body: new
|
|
2280
|
+
body: new yt(),
|
|
2196
2281
|
method: "POST",
|
|
2197
2282
|
get duplex() {
|
|
2198
|
-
return
|
|
2283
|
+
return p = !0, "half";
|
|
2199
2284
|
}
|
|
2200
2285
|
}).headers.has("Content-Type");
|
|
2201
|
-
return
|
|
2202
|
-
}),
|
|
2203
|
-
stream:
|
|
2286
|
+
return p && !w;
|
|
2287
|
+
}), c = a && i && bt(() => d.isReadableStream(new s("").body)), h = {
|
|
2288
|
+
stream: c && ((p) => p.body)
|
|
2204
2289
|
};
|
|
2205
|
-
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2206
|
-
!p
|
|
2207
|
-
let
|
|
2208
|
-
if (
|
|
2209
|
-
return
|
|
2210
|
-
throw new
|
|
2290
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
2291
|
+
!h[p] && (h[p] = (w, y) => {
|
|
2292
|
+
let $ = w && w[p];
|
|
2293
|
+
if ($)
|
|
2294
|
+
return $.call(w);
|
|
2295
|
+
throw new S(`Response type '${p}' is not supported`, S.ERR_NOT_SUPPORT, y);
|
|
2211
2296
|
});
|
|
2212
2297
|
});
|
|
2213
|
-
const
|
|
2214
|
-
if (
|
|
2298
|
+
const x = async (p) => {
|
|
2299
|
+
if (p == null)
|
|
2215
2300
|
return 0;
|
|
2216
|
-
if (
|
|
2217
|
-
return
|
|
2218
|
-
if (
|
|
2301
|
+
if (d.isBlob(p))
|
|
2302
|
+
return p.size;
|
|
2303
|
+
if (d.isSpecCompliantForm(p))
|
|
2219
2304
|
return (await new n(H.origin, {
|
|
2220
2305
|
method: "POST",
|
|
2221
|
-
body:
|
|
2306
|
+
body: p
|
|
2222
2307
|
}).arrayBuffer()).byteLength;
|
|
2223
|
-
if (
|
|
2224
|
-
return
|
|
2225
|
-
if (
|
|
2226
|
-
return (await l(
|
|
2227
|
-
},
|
|
2228
|
-
const y =
|
|
2229
|
-
return y ??
|
|
2308
|
+
if (d.isArrayBufferView(p) || d.isArrayBuffer(p))
|
|
2309
|
+
return p.byteLength;
|
|
2310
|
+
if (d.isURLSearchParams(p) && (p = p + ""), d.isString(p))
|
|
2311
|
+
return (await l(p)).byteLength;
|
|
2312
|
+
}, E = async (p, w) => {
|
|
2313
|
+
const y = d.toFiniteNumber(p.getContentLength());
|
|
2314
|
+
return y ?? x(w);
|
|
2230
2315
|
};
|
|
2231
|
-
return async (
|
|
2316
|
+
return async (p) => {
|
|
2232
2317
|
let {
|
|
2233
2318
|
url: w,
|
|
2234
2319
|
method: y,
|
|
2235
|
-
data:
|
|
2320
|
+
data: $,
|
|
2236
2321
|
signal: T,
|
|
2237
|
-
cancelToken:
|
|
2322
|
+
cancelToken: L,
|
|
2238
2323
|
timeout: F,
|
|
2239
|
-
onDownloadProgress:
|
|
2240
|
-
onUploadProgress:
|
|
2324
|
+
onDownloadProgress: j,
|
|
2325
|
+
onUploadProgress: X,
|
|
2241
2326
|
responseType: P,
|
|
2242
|
-
headers:
|
|
2243
|
-
withCredentials:
|
|
2244
|
-
fetchOptions:
|
|
2245
|
-
} =
|
|
2327
|
+
headers: Ne,
|
|
2328
|
+
withCredentials: Se = "same-origin",
|
|
2329
|
+
fetchOptions: Ye
|
|
2330
|
+
} = Xt(p), Qe = t || fetch;
|
|
2246
2331
|
P = P ? (P + "").toLowerCase() : "text";
|
|
2247
|
-
let Ce =
|
|
2248
|
-
const
|
|
2332
|
+
let Ce = Eo([T, L && L.toAbortSignal()], F), de = null;
|
|
2333
|
+
const Y = Ce && Ce.unsubscribe && (() => {
|
|
2249
2334
|
Ce.unsubscribe();
|
|
2250
2335
|
});
|
|
2251
|
-
let
|
|
2336
|
+
let et;
|
|
2252
2337
|
try {
|
|
2253
|
-
if (
|
|
2254
|
-
let
|
|
2338
|
+
if (X && u && y !== "get" && y !== "head" && (et = await E(Ne, $)) !== 0) {
|
|
2339
|
+
let G = new n(w, {
|
|
2255
2340
|
method: "POST",
|
|
2256
|
-
body:
|
|
2341
|
+
body: $,
|
|
2257
2342
|
duplex: "half"
|
|
2258
|
-
}),
|
|
2259
|
-
if (
|
|
2260
|
-
const [
|
|
2261
|
-
|
|
2262
|
-
|
|
2343
|
+
}), ae;
|
|
2344
|
+
if (d.isFormData($) && (ae = G.headers.get("content-type")) && Ne.setContentType(ae), G.body) {
|
|
2345
|
+
const [Pe, ve] = ft(
|
|
2346
|
+
et,
|
|
2347
|
+
Le(pt(X))
|
|
2263
2348
|
);
|
|
2264
|
-
|
|
2349
|
+
$ = mt(G.body, gt, Pe, ve);
|
|
2265
2350
|
}
|
|
2266
2351
|
}
|
|
2267
|
-
|
|
2268
|
-
const
|
|
2269
|
-
...
|
|
2352
|
+
d.isString(Se) || (Se = Se ? "include" : "omit");
|
|
2353
|
+
const I = o && "credentials" in n.prototype, tt = {
|
|
2354
|
+
...Ye,
|
|
2270
2355
|
signal: Ce,
|
|
2271
2356
|
method: y.toUpperCase(),
|
|
2272
|
-
headers:
|
|
2273
|
-
body:
|
|
2357
|
+
headers: Ne.normalize().toJSON(),
|
|
2358
|
+
body: $,
|
|
2274
2359
|
duplex: "half",
|
|
2275
|
-
credentials:
|
|
2360
|
+
credentials: I ? Se : void 0
|
|
2276
2361
|
};
|
|
2277
|
-
de = o && new n(w,
|
|
2278
|
-
let
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2281
|
-
const
|
|
2282
|
-
["status", "statusText", "headers"].forEach((
|
|
2283
|
-
|
|
2362
|
+
de = o && new n(w, tt);
|
|
2363
|
+
let W = await (o ? Qe(de, Ye) : Qe(w, tt));
|
|
2364
|
+
const nt = c && (P === "stream" || P === "response");
|
|
2365
|
+
if (c && (j || nt && Y)) {
|
|
2366
|
+
const G = {};
|
|
2367
|
+
["status", "statusText", "headers"].forEach((st) => {
|
|
2368
|
+
G[st] = W[st];
|
|
2284
2369
|
});
|
|
2285
|
-
const
|
|
2286
|
-
|
|
2287
|
-
|
|
2370
|
+
const ae = d.toFiniteNumber(W.headers.get("content-length")), [Pe, ve] = j && ft(
|
|
2371
|
+
ae,
|
|
2372
|
+
Le(pt(j), !0)
|
|
2288
2373
|
) || [];
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
ve && ve(),
|
|
2374
|
+
W = new s(
|
|
2375
|
+
mt(W.body, gt, Pe, () => {
|
|
2376
|
+
ve && ve(), Y && Y();
|
|
2292
2377
|
}),
|
|
2293
|
-
|
|
2378
|
+
G
|
|
2294
2379
|
);
|
|
2295
2380
|
}
|
|
2296
2381
|
P = P || "text";
|
|
2297
|
-
let
|
|
2298
|
-
return !
|
|
2299
|
-
|
|
2300
|
-
data:
|
|
2301
|
-
headers: N.from(
|
|
2302
|
-
status:
|
|
2303
|
-
statusText:
|
|
2304
|
-
config:
|
|
2382
|
+
let rn = await h[d.findKey(h, P) || "text"](W, p);
|
|
2383
|
+
return !nt && Y && Y(), await new Promise((G, ae) => {
|
|
2384
|
+
Jt(G, ae, {
|
|
2385
|
+
data: rn,
|
|
2386
|
+
headers: N.from(W.headers),
|
|
2387
|
+
status: W.status,
|
|
2388
|
+
statusText: W.statusText,
|
|
2389
|
+
config: p,
|
|
2305
2390
|
request: de
|
|
2306
2391
|
});
|
|
2307
2392
|
});
|
|
2308
|
-
} catch (
|
|
2309
|
-
throw
|
|
2310
|
-
new
|
|
2393
|
+
} catch (I) {
|
|
2394
|
+
throw Y && Y(), I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message) ? Object.assign(
|
|
2395
|
+
new S("Network Error", S.ERR_NETWORK, p, de),
|
|
2311
2396
|
{
|
|
2312
|
-
cause:
|
|
2397
|
+
cause: I.cause || I
|
|
2313
2398
|
}
|
|
2314
|
-
) :
|
|
2399
|
+
) : S.from(I, I && I.code, p, de);
|
|
2315
2400
|
}
|
|
2316
2401
|
};
|
|
2317
|
-
},
|
|
2402
|
+
}, Ho = /* @__PURE__ */ new Map(), Yt = (e) => {
|
|
2318
2403
|
let t = e && e.env || {};
|
|
2319
2404
|
const { fetch: n, Request: s, Response: r } = t, o = [
|
|
2320
2405
|
s,
|
|
2321
2406
|
r,
|
|
2322
2407
|
n
|
|
2323
2408
|
];
|
|
2324
|
-
let a = o.length,
|
|
2325
|
-
for (;
|
|
2326
|
-
l = o[
|
|
2327
|
-
return
|
|
2409
|
+
let a = o.length, i = a, l, u, c = Ho;
|
|
2410
|
+
for (; i--; )
|
|
2411
|
+
l = o[i], u = c.get(l), u === void 0 && c.set(l, u = i ? /* @__PURE__ */ new Map() : To(t)), c = u;
|
|
2412
|
+
return u;
|
|
2328
2413
|
};
|
|
2329
|
-
|
|
2330
|
-
const
|
|
2331
|
-
http:
|
|
2332
|
-
xhr:
|
|
2414
|
+
Yt();
|
|
2415
|
+
const Xe = {
|
|
2416
|
+
http: Jr,
|
|
2417
|
+
xhr: Ro,
|
|
2333
2418
|
fetch: {
|
|
2334
|
-
get:
|
|
2419
|
+
get: Yt
|
|
2335
2420
|
}
|
|
2336
2421
|
};
|
|
2337
|
-
|
|
2422
|
+
d.forEach(Xe, (e, t) => {
|
|
2338
2423
|
if (e) {
|
|
2339
2424
|
try {
|
|
2340
2425
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -2343,123 +2428,123 @@ u.forEach(Je, (e, t) => {
|
|
|
2343
2428
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
2344
2429
|
}
|
|
2345
2430
|
});
|
|
2346
|
-
const
|
|
2347
|
-
function
|
|
2348
|
-
e =
|
|
2431
|
+
const xt = (e) => `- ${e}`, Fo = (e) => d.isFunction(e) || e === null || e === !1;
|
|
2432
|
+
function Bo(e, t) {
|
|
2433
|
+
e = d.isArray(e) ? e : [e];
|
|
2349
2434
|
const { length: n } = e;
|
|
2350
2435
|
let s, r;
|
|
2351
2436
|
const o = {};
|
|
2352
2437
|
for (let a = 0; a < n; a++) {
|
|
2353
2438
|
s = e[a];
|
|
2354
|
-
let
|
|
2355
|
-
if (r = s, !
|
|
2356
|
-
throw new
|
|
2357
|
-
if (r && (
|
|
2439
|
+
let i;
|
|
2440
|
+
if (r = s, !Fo(s) && (r = Xe[(i = String(s)).toLowerCase()], r === void 0))
|
|
2441
|
+
throw new S(`Unknown adapter '${i}'`);
|
|
2442
|
+
if (r && (d.isFunction(r) || (r = r.get(t))))
|
|
2358
2443
|
break;
|
|
2359
|
-
o[
|
|
2444
|
+
o[i || "#" + a] = r;
|
|
2360
2445
|
}
|
|
2361
2446
|
if (!r) {
|
|
2362
2447
|
const a = Object.entries(o).map(
|
|
2363
|
-
([l,
|
|
2448
|
+
([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2364
2449
|
);
|
|
2365
|
-
let
|
|
2366
|
-
` + a.map(
|
|
2367
|
-
`) : " " +
|
|
2368
|
-
throw new
|
|
2369
|
-
"There is no suitable adapter to dispatch the request " +
|
|
2450
|
+
let i = n ? a.length > 1 ? `since :
|
|
2451
|
+
` + a.map(xt).join(`
|
|
2452
|
+
`) : " " + xt(a[0]) : "as no adapter specified";
|
|
2453
|
+
throw new S(
|
|
2454
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
2370
2455
|
"ERR_NOT_SUPPORT"
|
|
2371
2456
|
);
|
|
2372
2457
|
}
|
|
2373
2458
|
return r;
|
|
2374
2459
|
}
|
|
2375
|
-
const
|
|
2460
|
+
const Qt = {
|
|
2376
2461
|
/**
|
|
2377
2462
|
* Resolve an adapter from a list of adapter names or functions.
|
|
2378
2463
|
* @type {Function}
|
|
2379
2464
|
*/
|
|
2380
|
-
getAdapter:
|
|
2465
|
+
getAdapter: Bo,
|
|
2381
2466
|
/**
|
|
2382
2467
|
* Exposes all known adapters
|
|
2383
2468
|
* @type {Object<string, Function|Object>}
|
|
2384
2469
|
*/
|
|
2385
|
-
adapters:
|
|
2470
|
+
adapters: Xe
|
|
2386
2471
|
};
|
|
2387
|
-
function
|
|
2472
|
+
function De(e) {
|
|
2388
2473
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2389
2474
|
throw new ue(null, e);
|
|
2390
2475
|
}
|
|
2391
|
-
function
|
|
2392
|
-
return
|
|
2476
|
+
function St(e) {
|
|
2477
|
+
return De(e), e.headers = N.from(e.headers), e.data = je.call(
|
|
2393
2478
|
e,
|
|
2394
2479
|
e.transformRequest
|
|
2395
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
2396
|
-
return
|
|
2480
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Qt.getAdapter(e.adapter || xe.adapter, e)(e).then(function(s) {
|
|
2481
|
+
return De(e), s.data = je.call(
|
|
2397
2482
|
e,
|
|
2398
2483
|
e.transformResponse,
|
|
2399
2484
|
s
|
|
2400
2485
|
), s.headers = N.from(s.headers), s;
|
|
2401
2486
|
}, function(s) {
|
|
2402
|
-
return
|
|
2487
|
+
return Gt(s) || (De(e), s && s.response && (s.response.data = je.call(
|
|
2403
2488
|
e,
|
|
2404
2489
|
e.transformResponse,
|
|
2405
2490
|
s.response
|
|
2406
2491
|
), s.response.headers = N.from(s.response.headers))), Promise.reject(s);
|
|
2407
2492
|
});
|
|
2408
2493
|
}
|
|
2409
|
-
const
|
|
2494
|
+
const en = "1.13.2", Ve = {};
|
|
2410
2495
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2411
|
-
|
|
2496
|
+
Ve[e] = function(s) {
|
|
2412
2497
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2413
2498
|
};
|
|
2414
2499
|
});
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2500
|
+
const Ct = {};
|
|
2501
|
+
Ve.transitional = function(t, n, s) {
|
|
2417
2502
|
function r(o, a) {
|
|
2418
|
-
return "[Axios v" +
|
|
2503
|
+
return "[Axios v" + en + "] Transitional option '" + o + "'" + a + (s ? ". " + s : "");
|
|
2419
2504
|
}
|
|
2420
|
-
return (o, a,
|
|
2505
|
+
return (o, a, i) => {
|
|
2421
2506
|
if (t === !1)
|
|
2422
|
-
throw new
|
|
2507
|
+
throw new S(
|
|
2423
2508
|
r(a, " has been removed" + (n ? " in " + n : "")),
|
|
2424
|
-
|
|
2509
|
+
S.ERR_DEPRECATED
|
|
2425
2510
|
);
|
|
2426
|
-
return n && !
|
|
2511
|
+
return n && !Ct[a] && (Ct[a] = !0, console.warn(
|
|
2427
2512
|
r(
|
|
2428
2513
|
a,
|
|
2429
2514
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2430
2515
|
)
|
|
2431
|
-
)), t ? t(o, a,
|
|
2516
|
+
)), t ? t(o, a, i) : !0;
|
|
2432
2517
|
};
|
|
2433
2518
|
};
|
|
2434
|
-
|
|
2519
|
+
Ve.spelling = function(t) {
|
|
2435
2520
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
2436
2521
|
};
|
|
2437
|
-
function
|
|
2522
|
+
function Vo(e, t, n) {
|
|
2438
2523
|
if (typeof e != "object")
|
|
2439
|
-
throw new
|
|
2524
|
+
throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
|
|
2440
2525
|
const s = Object.keys(e);
|
|
2441
2526
|
let r = s.length;
|
|
2442
2527
|
for (; r-- > 0; ) {
|
|
2443
2528
|
const o = s[r], a = t[o];
|
|
2444
2529
|
if (a) {
|
|
2445
|
-
const
|
|
2530
|
+
const i = e[o], l = i === void 0 || a(i, o, e);
|
|
2446
2531
|
if (l !== !0)
|
|
2447
|
-
throw new
|
|
2532
|
+
throw new S("option " + o + " must be " + l, S.ERR_BAD_OPTION_VALUE);
|
|
2448
2533
|
continue;
|
|
2449
2534
|
}
|
|
2450
2535
|
if (n !== !0)
|
|
2451
|
-
throw new
|
|
2536
|
+
throw new S("Unknown option " + o, S.ERR_BAD_OPTION);
|
|
2452
2537
|
}
|
|
2453
2538
|
}
|
|
2454
|
-
const
|
|
2455
|
-
assertOptions:
|
|
2456
|
-
validators:
|
|
2457
|
-
},
|
|
2458
|
-
let
|
|
2539
|
+
const Ee = {
|
|
2540
|
+
assertOptions: Vo,
|
|
2541
|
+
validators: Ve
|
|
2542
|
+
}, z = Ee.validators;
|
|
2543
|
+
let te = class {
|
|
2459
2544
|
constructor(t) {
|
|
2460
2545
|
this.defaults = t || {}, this.interceptors = {
|
|
2461
|
-
request: new
|
|
2462
|
-
response: new
|
|
2546
|
+
request: new ut(),
|
|
2547
|
+
response: new ut()
|
|
2463
2548
|
};
|
|
2464
2549
|
}
|
|
2465
2550
|
/**
|
|
@@ -2490,73 +2575,73 @@ let ee = class {
|
|
|
2490
2575
|
_request(t, n) {
|
|
2491
2576
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ne(this.defaults, n);
|
|
2492
2577
|
const { transitional: s, paramsSerializer: r, headers: o } = n;
|
|
2493
|
-
s !== void 0 &&
|
|
2494
|
-
silentJSONParsing:
|
|
2495
|
-
forcedJSONParsing:
|
|
2496
|
-
clarifyTimeoutError:
|
|
2497
|
-
}, !1), r != null && (
|
|
2578
|
+
s !== void 0 && Ee.assertOptions(s, {
|
|
2579
|
+
silentJSONParsing: z.transitional(z.boolean),
|
|
2580
|
+
forcedJSONParsing: z.transitional(z.boolean),
|
|
2581
|
+
clarifyTimeoutError: z.transitional(z.boolean)
|
|
2582
|
+
}, !1), r != null && (d.isFunction(r) ? n.paramsSerializer = {
|
|
2498
2583
|
serialize: r
|
|
2499
|
-
} :
|
|
2500
|
-
encode:
|
|
2501
|
-
serialize:
|
|
2502
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
2503
|
-
baseUrl:
|
|
2504
|
-
withXsrfToken:
|
|
2584
|
+
} : Ee.assertOptions(r, {
|
|
2585
|
+
encode: z.function,
|
|
2586
|
+
serialize: z.function
|
|
2587
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ee.assertOptions(n, {
|
|
2588
|
+
baseUrl: z.spelling("baseURL"),
|
|
2589
|
+
withXsrfToken: z.spelling("withXSRFToken")
|
|
2505
2590
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2506
|
-
let a = o &&
|
|
2591
|
+
let a = o && d.merge(
|
|
2507
2592
|
o.common,
|
|
2508
2593
|
o[n.method]
|
|
2509
2594
|
);
|
|
2510
|
-
o &&
|
|
2595
|
+
o && d.forEach(
|
|
2511
2596
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2512
|
-
(
|
|
2513
|
-
delete o[
|
|
2597
|
+
(p) => {
|
|
2598
|
+
delete o[p];
|
|
2514
2599
|
}
|
|
2515
2600
|
), n.headers = N.concat(a, o);
|
|
2516
|
-
const
|
|
2601
|
+
const i = [];
|
|
2517
2602
|
let l = !0;
|
|
2518
2603
|
this.interceptors.request.forEach(function(w) {
|
|
2519
|
-
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous,
|
|
2604
|
+
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous, i.unshift(w.fulfilled, w.rejected));
|
|
2520
2605
|
});
|
|
2521
|
-
const
|
|
2606
|
+
const u = [];
|
|
2522
2607
|
this.interceptors.response.forEach(function(w) {
|
|
2523
|
-
|
|
2608
|
+
u.push(w.fulfilled, w.rejected);
|
|
2524
2609
|
});
|
|
2525
|
-
let
|
|
2610
|
+
let c, h = 0, x;
|
|
2526
2611
|
if (!l) {
|
|
2527
|
-
const
|
|
2528
|
-
for (
|
|
2529
|
-
|
|
2530
|
-
return
|
|
2531
|
-
}
|
|
2532
|
-
|
|
2533
|
-
let
|
|
2534
|
-
for (;
|
|
2535
|
-
const
|
|
2612
|
+
const p = [St.bind(this), void 0];
|
|
2613
|
+
for (p.unshift(...i), p.push(...u), x = p.length, c = Promise.resolve(n); h < x; )
|
|
2614
|
+
c = c.then(p[h++], p[h++]);
|
|
2615
|
+
return c;
|
|
2616
|
+
}
|
|
2617
|
+
x = i.length;
|
|
2618
|
+
let E = n;
|
|
2619
|
+
for (; h < x; ) {
|
|
2620
|
+
const p = i[h++], w = i[h++];
|
|
2536
2621
|
try {
|
|
2537
|
-
|
|
2622
|
+
E = p(E);
|
|
2538
2623
|
} catch (y) {
|
|
2539
2624
|
w.call(this, y);
|
|
2540
2625
|
break;
|
|
2541
2626
|
}
|
|
2542
2627
|
}
|
|
2543
2628
|
try {
|
|
2544
|
-
|
|
2545
|
-
} catch (
|
|
2546
|
-
return Promise.reject(
|
|
2629
|
+
c = St.call(this, E);
|
|
2630
|
+
} catch (p) {
|
|
2631
|
+
return Promise.reject(p);
|
|
2547
2632
|
}
|
|
2548
|
-
for (
|
|
2549
|
-
|
|
2550
|
-
return
|
|
2633
|
+
for (h = 0, x = u.length; h < x; )
|
|
2634
|
+
c = c.then(u[h++], u[h++]);
|
|
2635
|
+
return c;
|
|
2551
2636
|
}
|
|
2552
2637
|
getUri(t) {
|
|
2553
2638
|
t = ne(this.defaults, t);
|
|
2554
|
-
const n =
|
|
2555
|
-
return
|
|
2639
|
+
const n = Kt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2640
|
+
return qt(n, t.params, t.paramsSerializer);
|
|
2556
2641
|
}
|
|
2557
2642
|
};
|
|
2558
|
-
|
|
2559
|
-
|
|
2643
|
+
d.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2644
|
+
te.prototype[t] = function(n, s) {
|
|
2560
2645
|
return this.request(ne(s || {}, {
|
|
2561
2646
|
method: t,
|
|
2562
2647
|
url: n,
|
|
@@ -2564,10 +2649,10 @@ u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2564
2649
|
}));
|
|
2565
2650
|
};
|
|
2566
2651
|
});
|
|
2567
|
-
|
|
2652
|
+
d.forEach(["post", "put", "patch"], function(t) {
|
|
2568
2653
|
function n(s) {
|
|
2569
|
-
return function(o, a,
|
|
2570
|
-
return this.request(ne(
|
|
2654
|
+
return function(o, a, i) {
|
|
2655
|
+
return this.request(ne(i || {}, {
|
|
2571
2656
|
method: t,
|
|
2572
2657
|
headers: s ? {
|
|
2573
2658
|
"Content-Type": "multipart/form-data"
|
|
@@ -2577,9 +2662,9 @@ u.forEach(["post", "put", "patch"], function(t) {
|
|
|
2577
2662
|
}));
|
|
2578
2663
|
};
|
|
2579
2664
|
}
|
|
2580
|
-
|
|
2665
|
+
te.prototype[t] = n(), te.prototype[t + "Form"] = n(!0);
|
|
2581
2666
|
});
|
|
2582
|
-
let
|
|
2667
|
+
let No = class tn {
|
|
2583
2668
|
constructor(t) {
|
|
2584
2669
|
if (typeof t != "function")
|
|
2585
2670
|
throw new TypeError("executor must be a function.");
|
|
@@ -2596,14 +2681,14 @@ let Ao = class Xt {
|
|
|
2596
2681
|
s._listeners = null;
|
|
2597
2682
|
}), this.promise.then = (r) => {
|
|
2598
2683
|
let o;
|
|
2599
|
-
const a = new Promise((
|
|
2600
|
-
s.subscribe(
|
|
2684
|
+
const a = new Promise((i) => {
|
|
2685
|
+
s.subscribe(i), o = i;
|
|
2601
2686
|
}).then(r);
|
|
2602
2687
|
return a.cancel = function() {
|
|
2603
2688
|
s.unsubscribe(o);
|
|
2604
2689
|
}, a;
|
|
2605
|
-
}, t(function(o, a,
|
|
2606
|
-
s.reason || (s.reason = new ue(o, a,
|
|
2690
|
+
}, t(function(o, a, i) {
|
|
2691
|
+
s.reason || (s.reason = new ue(o, a, i), n(s.reason));
|
|
2607
2692
|
});
|
|
2608
2693
|
}
|
|
2609
2694
|
/**
|
|
@@ -2645,22 +2730,22 @@ let Ao = class Xt {
|
|
|
2645
2730
|
static source() {
|
|
2646
2731
|
let t;
|
|
2647
2732
|
return {
|
|
2648
|
-
token: new
|
|
2733
|
+
token: new tn(function(r) {
|
|
2649
2734
|
t = r;
|
|
2650
2735
|
}),
|
|
2651
2736
|
cancel: t
|
|
2652
2737
|
};
|
|
2653
2738
|
}
|
|
2654
2739
|
};
|
|
2655
|
-
function
|
|
2740
|
+
function Po(e) {
|
|
2656
2741
|
return function(n) {
|
|
2657
2742
|
return e.apply(null, n);
|
|
2658
2743
|
};
|
|
2659
2744
|
}
|
|
2660
|
-
function
|
|
2661
|
-
return
|
|
2745
|
+
function Mo(e) {
|
|
2746
|
+
return d.isObject(e) && e.isAxiosError === !0;
|
|
2662
2747
|
}
|
|
2663
|
-
const
|
|
2748
|
+
const We = {
|
|
2664
2749
|
Continue: 100,
|
|
2665
2750
|
SwitchingProtocols: 101,
|
|
2666
2751
|
Processing: 102,
|
|
@@ -2731,75 +2816,75 @@ const qe = {
|
|
|
2731
2816
|
SslHandshakeFailed: 525,
|
|
2732
2817
|
InvalidSslCertificate: 526
|
|
2733
2818
|
};
|
|
2734
|
-
Object.entries(
|
|
2735
|
-
|
|
2819
|
+
Object.entries(We).forEach(([e, t]) => {
|
|
2820
|
+
We[t] = e;
|
|
2736
2821
|
});
|
|
2737
|
-
function
|
|
2738
|
-
const t = new
|
|
2739
|
-
return
|
|
2740
|
-
return
|
|
2822
|
+
function nn(e) {
|
|
2823
|
+
const t = new te(e), n = Ht(te.prototype.request, t);
|
|
2824
|
+
return d.extend(n, te.prototype, t, { allOwnKeys: !0 }), d.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
2825
|
+
return nn(ne(e, r));
|
|
2741
2826
|
}, n;
|
|
2742
2827
|
}
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2828
|
+
const v = nn(xe);
|
|
2829
|
+
v.Axios = te;
|
|
2830
|
+
v.CanceledError = ue;
|
|
2831
|
+
v.CancelToken = No;
|
|
2832
|
+
v.isCancel = Gt;
|
|
2833
|
+
v.VERSION = en;
|
|
2834
|
+
v.toFormData = Be;
|
|
2835
|
+
v.AxiosError = S;
|
|
2836
|
+
v.Cancel = v.CanceledError;
|
|
2837
|
+
v.all = function(t) {
|
|
2753
2838
|
return Promise.all(t);
|
|
2754
2839
|
};
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2840
|
+
v.spread = Po;
|
|
2841
|
+
v.isAxiosError = Mo;
|
|
2842
|
+
v.mergeConfig = ne;
|
|
2843
|
+
v.AxiosHeaders = N;
|
|
2844
|
+
v.formToJSON = (e) => Wt(d.isHTMLForm(e) ? new FormData(e) : e);
|
|
2845
|
+
v.getAdapter = Qt.getAdapter;
|
|
2846
|
+
v.HttpStatusCode = We;
|
|
2847
|
+
v.default = v;
|
|
2763
2848
|
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:
|
|
2776
|
-
HttpStatusCode:
|
|
2777
|
-
formToJSON:
|
|
2778
|
-
getAdapter:
|
|
2779
|
-
mergeConfig:
|
|
2780
|
-
} =
|
|
2849
|
+
Axios: ci,
|
|
2850
|
+
AxiosError: ui,
|
|
2851
|
+
CanceledError: di,
|
|
2852
|
+
isCancel: fi,
|
|
2853
|
+
CancelToken: pi,
|
|
2854
|
+
VERSION: hi,
|
|
2855
|
+
all: mi,
|
|
2856
|
+
Cancel: gi,
|
|
2857
|
+
isAxiosError: yi,
|
|
2858
|
+
spread: wi,
|
|
2859
|
+
toFormData: bi,
|
|
2860
|
+
AxiosHeaders: xi,
|
|
2861
|
+
HttpStatusCode: Si,
|
|
2862
|
+
formToJSON: Ci,
|
|
2863
|
+
getAdapter: vi,
|
|
2864
|
+
mergeConfig: _i
|
|
2865
|
+
} = v, Uo = (e) => {
|
|
2781
2866
|
const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2782
2867
|
return t ? t[2] : null;
|
|
2783
|
-
},
|
|
2868
|
+
}, jo = (e, t, n = {}) => {
|
|
2784
2869
|
const {
|
|
2785
2870
|
maxAge: s = 31536e3,
|
|
2786
2871
|
// 365 days in seconds
|
|
2787
|
-
domain: r =
|
|
2872
|
+
domain: r = sn(),
|
|
2788
2873
|
secure: o = !0,
|
|
2789
2874
|
sameSite: a = "Lax",
|
|
2790
|
-
path:
|
|
2875
|
+
path: i = "/"
|
|
2791
2876
|
} = n;
|
|
2792
|
-
let l = `${e}=${t}; max-age=${s}; path=${
|
|
2877
|
+
let l = `${e}=${t}; max-age=${s}; path=${i}; samesite=${a}`;
|
|
2793
2878
|
r && (l += `; domain=${r}`), o && (l += "; secure"), document.cookie = l;
|
|
2794
|
-
},
|
|
2795
|
-
const { domain: n =
|
|
2879
|
+
}, Do = (e, t = {}) => {
|
|
2880
|
+
const { domain: n = sn(), path: s = "/" } = t;
|
|
2796
2881
|
let r = `${e}=; max-age=0; path=${s}`;
|
|
2797
2882
|
n && (r += `; domain=${n}`), document.cookie = r;
|
|
2798
|
-
},
|
|
2883
|
+
}, sn = () => {
|
|
2799
2884
|
const e = window.location.hostname;
|
|
2800
2885
|
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
|
-
},
|
|
2802
|
-
const e =
|
|
2886
|
+
}, Ie = "bolt-next-token", K = ge("auth", () => {
|
|
2887
|
+
const e = se({
|
|
2803
2888
|
user: null,
|
|
2804
2889
|
token: null,
|
|
2805
2890
|
ready: !1,
|
|
@@ -2831,18 +2916,18 @@ const {
|
|
|
2831
2916
|
onLogoutSuccess: null,
|
|
2832
2917
|
onLogoutError: null
|
|
2833
2918
|
}
|
|
2834
|
-
}), t = (
|
|
2835
|
-
|
|
2836
|
-
}, n = (
|
|
2837
|
-
|
|
2919
|
+
}), t = (u = {}) => {
|
|
2920
|
+
u.endpoints && Object.assign(e.endpoints, u.endpoints), u.routes && Object.assign(e.routes, u.routes), u.devCredentials && Object.assign(e.devCredentials, u.devCredentials), u.callbacks && Object.assign(e.callbacks, u.callbacks), u.overrideToken && (e.overrideToken = u.overrideToken);
|
|
2921
|
+
}, n = (u) => {
|
|
2922
|
+
jo(Ie, u), e.token = u;
|
|
2838
2923
|
}, s = () => {
|
|
2839
|
-
|
|
2840
|
-
}, r = () =>
|
|
2841
|
-
const
|
|
2842
|
-
return n(
|
|
2924
|
+
Do(Ie), e.token = null;
|
|
2925
|
+
}, r = () => Uo(Ie), o = async (u) => {
|
|
2926
|
+
const c = await v.post(e.endpoints.login, u), h = c.headers.authorization;
|
|
2927
|
+
return n(h), e.user = c.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(c.data), c.data;
|
|
2843
2928
|
}, a = async () => {
|
|
2844
2929
|
try {
|
|
2845
|
-
await
|
|
2930
|
+
await v.post(
|
|
2846
2931
|
e.endpoints.logout,
|
|
2847
2932
|
{},
|
|
2848
2933
|
{
|
|
@@ -2851,50 +2936,50 @@ const {
|
|
|
2851
2936
|
}
|
|
2852
2937
|
}
|
|
2853
2938
|
), e.callbacks.onLogoutSuccess && await e.callbacks.onLogoutSuccess();
|
|
2854
|
-
} catch (
|
|
2855
|
-
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(
|
|
2939
|
+
} catch (u) {
|
|
2940
|
+
throw e.callbacks.onLogoutError && await e.callbacks.onLogoutError(u), u;
|
|
2856
2941
|
} finally {
|
|
2857
2942
|
s(), e.user = null;
|
|
2858
2943
|
}
|
|
2859
|
-
},
|
|
2860
|
-
const
|
|
2861
|
-
if (!
|
|
2944
|
+
}, i = async () => {
|
|
2945
|
+
const u = e.overrideToken || r();
|
|
2946
|
+
if (!u)
|
|
2862
2947
|
return e.ready = !0, null;
|
|
2863
2948
|
try {
|
|
2864
|
-
const { data:
|
|
2949
|
+
const { data: c } = await v.get(e.endpoints.fetch, {
|
|
2865
2950
|
headers: {
|
|
2866
|
-
Authorization: `Bearer ${
|
|
2951
|
+
Authorization: `Bearer ${u}`
|
|
2867
2952
|
}
|
|
2868
2953
|
});
|
|
2869
|
-
e.user =
|
|
2954
|
+
e.user = c, e.overrideToken || (e.token = u);
|
|
2870
2955
|
} catch {
|
|
2871
2956
|
e.overrideToken || s();
|
|
2872
2957
|
} finally {
|
|
2873
2958
|
e.ready = !0;
|
|
2874
2959
|
}
|
|
2875
|
-
}, l =
|
|
2960
|
+
}, l = A(() => e.overrideToken ? !0 : !!e.token && !!e.user);
|
|
2876
2961
|
return {
|
|
2877
2962
|
state: e,
|
|
2878
2963
|
initialize: t,
|
|
2879
2964
|
login: o,
|
|
2880
2965
|
logout: a,
|
|
2881
|
-
fetchUser:
|
|
2966
|
+
fetchUser: i,
|
|
2882
2967
|
check: l,
|
|
2883
2968
|
setTokenCookie: n,
|
|
2884
2969
|
clearTokenCookie: s,
|
|
2885
2970
|
getTokenCookie: r
|
|
2886
2971
|
};
|
|
2887
|
-
}),
|
|
2972
|
+
}), Io = { class: "h-full grid place-content-center relative" }, zo = { class: "absolute top-8 left-8" }, qo = ["src"], Zo = {
|
|
2888
2973
|
key: 1,
|
|
2889
2974
|
width: "59",
|
|
2890
2975
|
height: "23",
|
|
2891
2976
|
viewBox: "0 0 59 23",
|
|
2892
2977
|
fill: "none",
|
|
2893
2978
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2894
|
-
},
|
|
2979
|
+
}, Wo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Go = { class: "mb-7" }, Jo = { class: "text-gray-600" }, Ko = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Xo = {
|
|
2895
2980
|
key: 0,
|
|
2896
2981
|
class: "text-red-600 text-sm mb-2"
|
|
2897
|
-
},
|
|
2982
|
+
}, Yo = { key: 0 }, Qo = { key: 1 }, ea = {
|
|
2898
2983
|
__name: "SparkLoginView",
|
|
2899
2984
|
props: {
|
|
2900
2985
|
logo: {
|
|
@@ -2911,35 +2996,35 @@ const {
|
|
|
2911
2996
|
}
|
|
2912
2997
|
},
|
|
2913
2998
|
setup(e) {
|
|
2914
|
-
const t =
|
|
2915
|
-
a.value = !0,
|
|
2999
|
+
const t = re(), n = Oe(), s = Ot(), r = K(), o = e, a = q(!1), i = q(""), l = async (u) => {
|
|
3000
|
+
a.value = !0, i.value = "";
|
|
2916
3001
|
try {
|
|
2917
|
-
await r.login(
|
|
2918
|
-
const
|
|
2919
|
-
if (
|
|
2920
|
-
if (
|
|
2921
|
-
window.location.href =
|
|
3002
|
+
await r.login(u);
|
|
3003
|
+
const c = n.query.redirect;
|
|
3004
|
+
if (c) {
|
|
3005
|
+
if (c.startsWith("http")) {
|
|
3006
|
+
window.location.href = c;
|
|
2922
3007
|
return;
|
|
2923
3008
|
}
|
|
2924
|
-
await t.push(
|
|
3009
|
+
await t.push(c);
|
|
2925
3010
|
} else
|
|
2926
3011
|
await t.push(o.defaultRedirect);
|
|
2927
|
-
} catch (
|
|
2928
|
-
|
|
3012
|
+
} catch (c) {
|
|
3013
|
+
i.value = c.response?.data?.message || c.message || "Login failed. Please try again.";
|
|
2929
3014
|
} finally {
|
|
2930
3015
|
a.value = !1;
|
|
2931
3016
|
}
|
|
2932
3017
|
};
|
|
2933
|
-
return (
|
|
2934
|
-
const
|
|
2935
|
-
return m(), g("div",
|
|
2936
|
-
f("div",
|
|
3018
|
+
return (u, c) => {
|
|
3019
|
+
const h = U("FormKit"), x = U("router-link");
|
|
3020
|
+
return m(), g("div", Io, [
|
|
3021
|
+
f("div", zo, [
|
|
2937
3022
|
o.logo ? (m(), g("img", {
|
|
2938
3023
|
key: 0,
|
|
2939
3024
|
src: o.logo,
|
|
2940
3025
|
alt: "Logo",
|
|
2941
3026
|
class: "h-[23px] w-auto"
|
|
2942
|
-
}, null, 8,
|
|
3027
|
+
}, null, 8, qo)) : (m(), g("svg", Zo, [...c[0] || (c[0] = [
|
|
2943
3028
|
f("path", {
|
|
2944
3029
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
2945
3030
|
fill: "#1C64F2"
|
|
@@ -2958,56 +3043,56 @@ const {
|
|
|
2958
3043
|
}, null, -1)
|
|
2959
3044
|
])]))
|
|
2960
3045
|
]),
|
|
2961
|
-
f("div",
|
|
2962
|
-
f("div",
|
|
2963
|
-
|
|
2964
|
-
f("p",
|
|
3046
|
+
f("div", Wo, [
|
|
3047
|
+
f("div", Go, [
|
|
3048
|
+
c[1] || (c[1] = f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Log in", -1)),
|
|
3049
|
+
f("p", Jo, " Welcome back" + O(b(s).state.app ? ` to ${b(s).state.app}` : "") + "! Please enter your details. ", 1)
|
|
2965
3050
|
]),
|
|
2966
|
-
|
|
3051
|
+
C(h, {
|
|
2967
3052
|
type: "form",
|
|
2968
3053
|
onSubmit: l,
|
|
2969
3054
|
actions: !1
|
|
2970
3055
|
}, {
|
|
2971
|
-
default:
|
|
2972
|
-
|
|
3056
|
+
default: R(() => [
|
|
3057
|
+
C(h, {
|
|
2973
3058
|
label: "Email",
|
|
2974
3059
|
name: "email",
|
|
2975
3060
|
placeholder: "Enter your email",
|
|
2976
3061
|
type: "email",
|
|
2977
3062
|
validation: "required|email",
|
|
2978
3063
|
"outer-class": "max-w-full",
|
|
2979
|
-
value:
|
|
3064
|
+
value: b(r).state.devCredentials.username
|
|
2980
3065
|
}, null, 8, ["value"]),
|
|
2981
|
-
|
|
3066
|
+
C(h, {
|
|
2982
3067
|
label: "Password",
|
|
2983
3068
|
name: "password",
|
|
2984
3069
|
placeholder: "••••••••",
|
|
2985
3070
|
type: "password",
|
|
2986
3071
|
validation: "required",
|
|
2987
3072
|
"outer-class": "max-w-full",
|
|
2988
|
-
value:
|
|
3073
|
+
value: b(r).state.devCredentials.password
|
|
2989
3074
|
}, null, 8, ["value"]),
|
|
2990
|
-
f("div",
|
|
2991
|
-
|
|
2992
|
-
|
|
3075
|
+
f("div", Ko, [
|
|
3076
|
+
c[3] || (c[3] = f("span", null, null, -1)),
|
|
3077
|
+
C(x, {
|
|
2993
3078
|
to: o.forgotPasswordRoute,
|
|
2994
3079
|
class: "text-sm text-primary-600 font-semibold"
|
|
2995
3080
|
}, {
|
|
2996
|
-
default:
|
|
2997
|
-
|
|
3081
|
+
default: R(() => [...c[2] || (c[2] = [
|
|
3082
|
+
J(" Forgot password ", -1)
|
|
2998
3083
|
])]),
|
|
2999
3084
|
_: 1
|
|
3000
3085
|
}, 8, ["to"])
|
|
3001
3086
|
]),
|
|
3002
|
-
|
|
3003
|
-
|
|
3087
|
+
i.value ? (m(), g("div", Xo, O(i.value), 1)) : _("", !0),
|
|
3088
|
+
C(b(oe), {
|
|
3004
3089
|
type: "submit",
|
|
3005
3090
|
size: "xl",
|
|
3006
3091
|
disabled: a.value,
|
|
3007
3092
|
"button-class": "w-full mb-2"
|
|
3008
3093
|
}, {
|
|
3009
|
-
default:
|
|
3010
|
-
a.value ? (m(), g("span",
|
|
3094
|
+
default: R(() => [
|
|
3095
|
+
a.value ? (m(), g("span", Qo, "Signing in...")) : (m(), g("span", Yo, "Sign in"))
|
|
3011
3096
|
]),
|
|
3012
3097
|
_: 1
|
|
3013
3098
|
}, 8, ["disabled"])
|
|
@@ -3018,7 +3103,7 @@ const {
|
|
|
3018
3103
|
]);
|
|
3019
3104
|
};
|
|
3020
3105
|
}
|
|
3021
|
-
},
|
|
3106
|
+
}, ta = {
|
|
3022
3107
|
__name: "SparkLogoutView",
|
|
3023
3108
|
props: {
|
|
3024
3109
|
defaultRedirect: {
|
|
@@ -3027,27 +3112,27 @@ const {
|
|
|
3027
3112
|
}
|
|
3028
3113
|
},
|
|
3029
3114
|
setup(e) {
|
|
3030
|
-
const t =
|
|
3031
|
-
return
|
|
3115
|
+
const t = re(), n = Oe(), s = K(), r = e;
|
|
3116
|
+
return cn(async () => {
|
|
3032
3117
|
await s.logout();
|
|
3033
3118
|
const o = n.query.redirect;
|
|
3034
3119
|
o && o.startsWith("http") ? window.location.href = o : await t.push(o || r.defaultRedirect);
|
|
3035
3120
|
}), (o, a) => null;
|
|
3036
3121
|
}
|
|
3037
|
-
},
|
|
3122
|
+
}, na = { class: "h-full grid place-content-center relative" }, sa = { class: "absolute top-8 left-8" }, ra = ["src"], oa = {
|
|
3038
3123
|
key: 1,
|
|
3039
3124
|
width: "59",
|
|
3040
3125
|
height: "23",
|
|
3041
3126
|
viewBox: "0 0 59 23",
|
|
3042
3127
|
fill: "none",
|
|
3043
3128
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3044
|
-
},
|
|
3129
|
+
}, aa = { class: "max-w-sm grid gap-y-1 -mt-8" }, ia = {
|
|
3045
3130
|
key: 0,
|
|
3046
3131
|
class: "text-red-600 text-sm mb-2"
|
|
3047
|
-
},
|
|
3132
|
+
}, la = {
|
|
3048
3133
|
key: 1,
|
|
3049
3134
|
class: "text-green-600 text-sm mb-2"
|
|
3050
|
-
},
|
|
3135
|
+
}, ca = { key: 0 }, ua = { key: 1 }, da = {
|
|
3051
3136
|
__name: "SparkForgotPasswordView",
|
|
3052
3137
|
props: {
|
|
3053
3138
|
logo: {
|
|
@@ -3060,26 +3145,26 @@ const {
|
|
|
3060
3145
|
}
|
|
3061
3146
|
},
|
|
3062
3147
|
setup(e) {
|
|
3063
|
-
const t =
|
|
3148
|
+
const t = K(), n = e, s = q(!1), r = q(""), o = q(""), a = async ({ email: i }) => {
|
|
3064
3149
|
s.value = !0, r.value = "", o.value = "";
|
|
3065
3150
|
try {
|
|
3066
|
-
await
|
|
3151
|
+
await v.post(t.state.endpoints.passwordEmail, { email: i }), o.value = "Password reset link sent! Check your email.";
|
|
3067
3152
|
} catch (l) {
|
|
3068
3153
|
r.value = l.response?.data?.message || "Failed to send reset link.";
|
|
3069
3154
|
} finally {
|
|
3070
3155
|
s.value = !1;
|
|
3071
3156
|
}
|
|
3072
3157
|
};
|
|
3073
|
-
return (
|
|
3074
|
-
const
|
|
3075
|
-
return m(), g("div",
|
|
3076
|
-
f("div",
|
|
3158
|
+
return (i, l) => {
|
|
3159
|
+
const u = U("FormKit"), c = U("router-link");
|
|
3160
|
+
return m(), g("div", na, [
|
|
3161
|
+
f("div", sa, [
|
|
3077
3162
|
n.logo ? (m(), g("img", {
|
|
3078
3163
|
key: 0,
|
|
3079
3164
|
src: n.logo,
|
|
3080
3165
|
alt: "Logo",
|
|
3081
3166
|
class: "h-[23px] w-auto"
|
|
3082
|
-
}, null, 8,
|
|
3167
|
+
}, null, 8, ra)) : (m(), g("svg", oa, [...l[0] || (l[0] = [
|
|
3083
3168
|
f("path", {
|
|
3084
3169
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3085
3170
|
fill: "#1C64F2"
|
|
@@ -3098,18 +3183,18 @@ const {
|
|
|
3098
3183
|
}, null, -1)
|
|
3099
3184
|
])]))
|
|
3100
3185
|
]),
|
|
3101
|
-
f("div",
|
|
3186
|
+
f("div", aa, [
|
|
3102
3187
|
l[2] || (l[2] = f("div", { class: "mb-7" }, [
|
|
3103
3188
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Reset password"),
|
|
3104
3189
|
f("p", { class: "text-gray-600" }, " Enter your email and we'll send you a link to reset your password. ")
|
|
3105
3190
|
], -1)),
|
|
3106
|
-
|
|
3191
|
+
C(u, {
|
|
3107
3192
|
type: "form",
|
|
3108
3193
|
onSubmit: a,
|
|
3109
3194
|
actions: !1
|
|
3110
3195
|
}, {
|
|
3111
|
-
default:
|
|
3112
|
-
|
|
3196
|
+
default: R(() => [
|
|
3197
|
+
C(u, {
|
|
3113
3198
|
label: "Email",
|
|
3114
3199
|
name: "email",
|
|
3115
3200
|
placeholder: "Enter your email",
|
|
@@ -3117,25 +3202,25 @@ const {
|
|
|
3117
3202
|
validation: "required|email",
|
|
3118
3203
|
"outer-class": "max-w-full"
|
|
3119
3204
|
}),
|
|
3120
|
-
r.value ? (m(), g("div",
|
|
3121
|
-
o.value ? (m(), g("div",
|
|
3122
|
-
|
|
3205
|
+
r.value ? (m(), g("div", ia, O(r.value), 1)) : _("", !0),
|
|
3206
|
+
o.value ? (m(), g("div", la, O(o.value), 1)) : _("", !0),
|
|
3207
|
+
C(b(oe), {
|
|
3123
3208
|
type: "submit",
|
|
3124
3209
|
size: "xl",
|
|
3125
3210
|
disabled: s.value,
|
|
3126
3211
|
"button-class": "w-full mb-2"
|
|
3127
3212
|
}, {
|
|
3128
|
-
default:
|
|
3129
|
-
s.value ? (m(), g("span",
|
|
3213
|
+
default: R(() => [
|
|
3214
|
+
s.value ? (m(), g("span", ua, "Sending...")) : (m(), g("span", ca, "Send reset link"))
|
|
3130
3215
|
]),
|
|
3131
3216
|
_: 1
|
|
3132
3217
|
}, 8, ["disabled"]),
|
|
3133
|
-
|
|
3218
|
+
C(c, {
|
|
3134
3219
|
to: n.loginRoute,
|
|
3135
3220
|
class: "text-sm text-center text-primary-600 font-semibold block"
|
|
3136
3221
|
}, {
|
|
3137
|
-
default:
|
|
3138
|
-
|
|
3222
|
+
default: R(() => [...l[1] || (l[1] = [
|
|
3223
|
+
J(" Back to login ", -1)
|
|
3139
3224
|
])]),
|
|
3140
3225
|
_: 1
|
|
3141
3226
|
}, 8, ["to"])
|
|
@@ -3146,17 +3231,17 @@ const {
|
|
|
3146
3231
|
]);
|
|
3147
3232
|
};
|
|
3148
3233
|
}
|
|
3149
|
-
},
|
|
3234
|
+
}, fa = { class: "h-full grid place-content-center relative" }, pa = { class: "absolute top-8 left-8" }, ha = ["src"], ma = {
|
|
3150
3235
|
key: 1,
|
|
3151
3236
|
width: "59",
|
|
3152
3237
|
height: "23",
|
|
3153
3238
|
viewBox: "0 0 59 23",
|
|
3154
3239
|
fill: "none",
|
|
3155
3240
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3156
|
-
},
|
|
3241
|
+
}, ga = { class: "max-w-sm grid gap-y-1 -mt-8" }, ya = {
|
|
3157
3242
|
key: 0,
|
|
3158
3243
|
class: "text-red-600 text-sm mb-2"
|
|
3159
|
-
},
|
|
3244
|
+
}, wa = { key: 0 }, ba = { key: 1 }, xa = {
|
|
3160
3245
|
__name: "SparkResetPasswordView",
|
|
3161
3246
|
props: {
|
|
3162
3247
|
logo: {
|
|
@@ -3169,31 +3254,31 @@ const {
|
|
|
3169
3254
|
}
|
|
3170
3255
|
},
|
|
3171
3256
|
setup(e) {
|
|
3172
|
-
const t =
|
|
3257
|
+
const t = re(), n = Oe(), s = K(), r = e, o = q(!1), a = q(""), i = async ({ password: l, password_confirmation: u }) => {
|
|
3173
3258
|
o.value = !0, a.value = "";
|
|
3174
3259
|
try {
|
|
3175
|
-
await
|
|
3260
|
+
await v.post(s.state.endpoints.passwordReset, {
|
|
3176
3261
|
email: n.query.email,
|
|
3177
3262
|
token: n.query.token,
|
|
3178
3263
|
password: l,
|
|
3179
|
-
password_confirmation:
|
|
3264
|
+
password_confirmation: u
|
|
3180
3265
|
}), await t.push(r.loginRoute);
|
|
3181
|
-
} catch (
|
|
3182
|
-
a.value =
|
|
3266
|
+
} catch (c) {
|
|
3267
|
+
a.value = c.response?.data?.message || "Failed to reset password.";
|
|
3183
3268
|
} finally {
|
|
3184
3269
|
o.value = !1;
|
|
3185
3270
|
}
|
|
3186
3271
|
};
|
|
3187
|
-
return (l,
|
|
3188
|
-
const
|
|
3189
|
-
return m(), g("div",
|
|
3190
|
-
f("div",
|
|
3272
|
+
return (l, u) => {
|
|
3273
|
+
const c = U("FormKit");
|
|
3274
|
+
return m(), g("div", fa, [
|
|
3275
|
+
f("div", pa, [
|
|
3191
3276
|
r.logo ? (m(), g("img", {
|
|
3192
3277
|
key: 0,
|
|
3193
3278
|
src: r.logo,
|
|
3194
3279
|
alt: "Logo",
|
|
3195
3280
|
class: "h-[23px] w-auto"
|
|
3196
|
-
}, null, 8,
|
|
3281
|
+
}, null, 8, ha)) : (m(), g("svg", ma, [...u[0] || (u[0] = [
|
|
3197
3282
|
f("path", {
|
|
3198
3283
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3199
3284
|
fill: "#1C64F2"
|
|
@@ -3212,18 +3297,18 @@ const {
|
|
|
3212
3297
|
}, null, -1)
|
|
3213
3298
|
])]))
|
|
3214
3299
|
]),
|
|
3215
|
-
f("div",
|
|
3216
|
-
|
|
3300
|
+
f("div", ga, [
|
|
3301
|
+
u[1] || (u[1] = f("div", { class: "mb-7" }, [
|
|
3217
3302
|
f("h1", { class: "text-4xl text-gray-900 semibold tracking-tight mb-3" }, "Set new password"),
|
|
3218
3303
|
f("p", { class: "text-gray-600" }, " Enter your new password below. ")
|
|
3219
3304
|
], -1)),
|
|
3220
|
-
|
|
3305
|
+
C(c, {
|
|
3221
3306
|
type: "form",
|
|
3222
|
-
onSubmit:
|
|
3307
|
+
onSubmit: i,
|
|
3223
3308
|
actions: !1
|
|
3224
3309
|
}, {
|
|
3225
|
-
default:
|
|
3226
|
-
|
|
3310
|
+
default: R(() => [
|
|
3311
|
+
C(c, {
|
|
3227
3312
|
label: "New Password",
|
|
3228
3313
|
name: "password",
|
|
3229
3314
|
placeholder: "••••••••",
|
|
@@ -3231,23 +3316,23 @@ const {
|
|
|
3231
3316
|
validation: "required|length:8",
|
|
3232
3317
|
"outer-class": "max-w-full"
|
|
3233
3318
|
}),
|
|
3234
|
-
|
|
3319
|
+
C(c, {
|
|
3235
3320
|
label: "Confirm Password",
|
|
3236
3321
|
name: "password_confirmation",
|
|
3237
3322
|
placeholder: "••••••••",
|
|
3238
3323
|
type: "password",
|
|
3239
|
-
validation: "required|confirm",
|
|
3324
|
+
validation: "required|confirm:password",
|
|
3240
3325
|
"outer-class": "max-w-full"
|
|
3241
3326
|
}),
|
|
3242
|
-
a.value ? (m(), g("div",
|
|
3243
|
-
|
|
3327
|
+
a.value ? (m(), g("div", ya, O(a.value), 1)) : _("", !0),
|
|
3328
|
+
C(b(oe), {
|
|
3244
3329
|
type: "submit",
|
|
3245
3330
|
size: "xl",
|
|
3246
3331
|
disabled: o.value,
|
|
3247
3332
|
"button-class": "w-full mb-2"
|
|
3248
3333
|
}, {
|
|
3249
|
-
default:
|
|
3250
|
-
o.value ? (m(), g("span",
|
|
3334
|
+
default: R(() => [
|
|
3335
|
+
o.value ? (m(), g("span", ba, "Resetting...")) : (m(), g("span", wa, "Reset password"))
|
|
3251
3336
|
]),
|
|
3252
3337
|
_: 1
|
|
3253
3338
|
}, 8, ["disabled"])
|
|
@@ -3258,14 +3343,14 @@ const {
|
|
|
3258
3343
|
]);
|
|
3259
3344
|
};
|
|
3260
3345
|
}
|
|
3261
|
-
},
|
|
3346
|
+
}, Sa = { class: "h-full grid place-content-center relative" }, Ca = { class: "absolute top-8 left-8" }, va = ["src"], _a = {
|
|
3262
3347
|
key: 1,
|
|
3263
3348
|
width: "59",
|
|
3264
3349
|
height: "23",
|
|
3265
3350
|
viewBox: "0 0 59 23",
|
|
3266
3351
|
fill: "none",
|
|
3267
3352
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3268
|
-
},
|
|
3353
|
+
}, ka = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Ra = { class: "flex gap-4 justify-center" }, Ea = {
|
|
3269
3354
|
__name: "SparkError403View",
|
|
3270
3355
|
props: {
|
|
3271
3356
|
logo: {
|
|
@@ -3278,17 +3363,17 @@ const {
|
|
|
3278
3363
|
}
|
|
3279
3364
|
},
|
|
3280
3365
|
setup(e) {
|
|
3281
|
-
const t =
|
|
3366
|
+
const t = re(), n = e, s = () => {
|
|
3282
3367
|
t.push(n.homeRoute);
|
|
3283
3368
|
};
|
|
3284
|
-
return (r, o) => (m(), g("div",
|
|
3285
|
-
f("div",
|
|
3369
|
+
return (r, o) => (m(), g("div", Sa, [
|
|
3370
|
+
f("div", Ca, [
|
|
3286
3371
|
n.logo ? (m(), g("img", {
|
|
3287
3372
|
key: 0,
|
|
3288
3373
|
src: n.logo,
|
|
3289
3374
|
alt: "Logo",
|
|
3290
3375
|
class: "h-[23px] w-auto"
|
|
3291
|
-
}, null, 8,
|
|
3376
|
+
}, null, 8, va)) : (m(), g("svg", _a, [...o[0] || (o[0] = [
|
|
3292
3377
|
f("path", {
|
|
3293
3378
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3294
3379
|
fill: "#1C64F2"
|
|
@@ -3307,23 +3392,23 @@ const {
|
|
|
3307
3392
|
}, null, -1)
|
|
3308
3393
|
])]))
|
|
3309
3394
|
]),
|
|
3310
|
-
f("div",
|
|
3395
|
+
f("div", ka, [
|
|
3311
3396
|
o[2] || (o[2] = f("div", null, [
|
|
3312
3397
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "403"),
|
|
3313
3398
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Access Forbidden "),
|
|
3314
3399
|
f("p", { class: "text-gray-600" }, [
|
|
3315
|
-
|
|
3400
|
+
J(" You don't have permission to access this resource."),
|
|
3316
3401
|
f("br"),
|
|
3317
|
-
|
|
3402
|
+
J(" If you believe this is an error, please contact your administrator. ")
|
|
3318
3403
|
])
|
|
3319
3404
|
], -1)),
|
|
3320
|
-
f("div",
|
|
3321
|
-
|
|
3405
|
+
f("div", Ra, [
|
|
3406
|
+
C(b(oe), {
|
|
3322
3407
|
onClick: s,
|
|
3323
3408
|
size: "lg"
|
|
3324
3409
|
}, {
|
|
3325
|
-
default:
|
|
3326
|
-
|
|
3410
|
+
default: R(() => [...o[1] || (o[1] = [
|
|
3411
|
+
J(" Go to Home ", -1)
|
|
3327
3412
|
])]),
|
|
3328
3413
|
_: 1
|
|
3329
3414
|
})
|
|
@@ -3331,14 +3416,14 @@ const {
|
|
|
3331
3416
|
])
|
|
3332
3417
|
]));
|
|
3333
3418
|
}
|
|
3334
|
-
},
|
|
3419
|
+
}, $a = { class: "h-full grid place-content-center relative" }, Aa = { class: "absolute top-8 left-8" }, La = ["src"], Oa = {
|
|
3335
3420
|
key: 1,
|
|
3336
3421
|
width: "59",
|
|
3337
3422
|
height: "23",
|
|
3338
3423
|
viewBox: "0 0 59 23",
|
|
3339
3424
|
fill: "none",
|
|
3340
3425
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3341
|
-
},
|
|
3426
|
+
}, Ta = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Ha = { class: "flex gap-4 justify-center" }, Fa = {
|
|
3342
3427
|
__name: "SparkError404View",
|
|
3343
3428
|
props: {
|
|
3344
3429
|
logo: {
|
|
@@ -3351,17 +3436,17 @@ const {
|
|
|
3351
3436
|
}
|
|
3352
3437
|
},
|
|
3353
3438
|
setup(e) {
|
|
3354
|
-
const t =
|
|
3439
|
+
const t = re(), n = e, s = () => {
|
|
3355
3440
|
t.push(n.homeRoute);
|
|
3356
3441
|
};
|
|
3357
|
-
return (r, o) => (m(), g("div",
|
|
3358
|
-
f("div",
|
|
3442
|
+
return (r, o) => (m(), g("div", $a, [
|
|
3443
|
+
f("div", Aa, [
|
|
3359
3444
|
n.logo ? (m(), g("img", {
|
|
3360
3445
|
key: 0,
|
|
3361
3446
|
src: n.logo,
|
|
3362
3447
|
alt: "Logo",
|
|
3363
3448
|
class: "h-[23px] w-auto"
|
|
3364
|
-
}, null, 8,
|
|
3449
|
+
}, null, 8, La)) : (m(), g("svg", Oa, [...o[0] || (o[0] = [
|
|
3365
3450
|
f("path", {
|
|
3366
3451
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3367
3452
|
fill: "#1C64F2"
|
|
@@ -3380,19 +3465,19 @@ const {
|
|
|
3380
3465
|
}, null, -1)
|
|
3381
3466
|
])]))
|
|
3382
3467
|
]),
|
|
3383
|
-
f("div",
|
|
3468
|
+
f("div", Ta, [
|
|
3384
3469
|
o[2] || (o[2] = f("div", null, [
|
|
3385
3470
|
f("div", { class: "text-primary-600 text-7xl font-bold mb-4" }, "404"),
|
|
3386
3471
|
f("h1", { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, " Page Not Found "),
|
|
3387
3472
|
f("p", { class: "text-gray-600" }, " The page you're looking for doesn't exist or has been moved. ")
|
|
3388
3473
|
], -1)),
|
|
3389
|
-
f("div",
|
|
3390
|
-
|
|
3474
|
+
f("div", Ha, [
|
|
3475
|
+
C(b(oe), {
|
|
3391
3476
|
onClick: s,
|
|
3392
3477
|
size: "lg"
|
|
3393
3478
|
}, {
|
|
3394
|
-
default:
|
|
3395
|
-
|
|
3479
|
+
default: R(() => [...o[1] || (o[1] = [
|
|
3480
|
+
J(" Go to Home ", -1)
|
|
3396
3481
|
])]),
|
|
3397
3482
|
_: 1
|
|
3398
3483
|
})
|
|
@@ -3400,14 +3485,14 @@ const {
|
|
|
3400
3485
|
])
|
|
3401
3486
|
]));
|
|
3402
3487
|
}
|
|
3403
|
-
},
|
|
3488
|
+
}, Ba = { class: "h-full grid place-content-center relative" }, Va = { class: "absolute top-8 left-8" }, Na = ["src"], Pa = {
|
|
3404
3489
|
key: 1,
|
|
3405
3490
|
width: "59",
|
|
3406
3491
|
height: "23",
|
|
3407
3492
|
viewBox: "0 0 59 23",
|
|
3408
3493
|
fill: "none",
|
|
3409
3494
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3410
|
-
},
|
|
3495
|
+
}, Ma = { class: "max-w-lg grid gap-y-6 text-center -mt-8" }, Ua = { class: "text-primary-600 text-7xl font-bold mb-4" }, ja = { class: "text-3xl text-gray-900 font-semibold tracking-tight mb-3" }, Da = { class: "text-gray-600" }, Ia = { class: "flex gap-4 justify-center" }, ki = {
|
|
3411
3496
|
__name: "SparkErrorGeneralView",
|
|
3412
3497
|
props: {
|
|
3413
3498
|
logo: {
|
|
@@ -3432,17 +3517,17 @@ const {
|
|
|
3432
3517
|
}
|
|
3433
3518
|
},
|
|
3434
3519
|
setup(e) {
|
|
3435
|
-
const t =
|
|
3520
|
+
const t = re(), n = e, s = () => {
|
|
3436
3521
|
t.push(n.homeRoute);
|
|
3437
3522
|
};
|
|
3438
|
-
return (r, o) => (m(), g("div",
|
|
3439
|
-
f("div",
|
|
3523
|
+
return (r, o) => (m(), g("div", Ba, [
|
|
3524
|
+
f("div", Va, [
|
|
3440
3525
|
n.logo ? (m(), g("img", {
|
|
3441
3526
|
key: 0,
|
|
3442
3527
|
src: n.logo,
|
|
3443
3528
|
alt: "Logo",
|
|
3444
3529
|
class: "h-[23px] w-auto"
|
|
3445
|
-
}, null, 8,
|
|
3530
|
+
}, null, 8, Na)) : (m(), g("svg", Pa, [...o[0] || (o[0] = [
|
|
3446
3531
|
f("path", {
|
|
3447
3532
|
d: "M49.2029 17.1264V8.03835H44.0829V5.22235H58.0989V8.03835H52.9629V17.1264H49.2029Z",
|
|
3448
3533
|
fill: "#1C64F2"
|
|
@@ -3461,19 +3546,19 @@ const {
|
|
|
3461
3546
|
}, null, -1)
|
|
3462
3547
|
])]))
|
|
3463
3548
|
]),
|
|
3464
|
-
f("div",
|
|
3549
|
+
f("div", Ma, [
|
|
3465
3550
|
f("div", null, [
|
|
3466
|
-
f("div",
|
|
3467
|
-
f("h1",
|
|
3468
|
-
f("p",
|
|
3551
|
+
f("div", Ua, O(n.errorCode || "Error"), 1),
|
|
3552
|
+
f("h1", ja, O(n.title || "Something went wrong"), 1),
|
|
3553
|
+
f("p", Da, O(n.message || "An unexpected error occurred. Please try again later."), 1)
|
|
3469
3554
|
]),
|
|
3470
|
-
f("div",
|
|
3471
|
-
|
|
3555
|
+
f("div", Ia, [
|
|
3556
|
+
C(b(oe), {
|
|
3472
3557
|
onClick: s,
|
|
3473
3558
|
size: "lg"
|
|
3474
3559
|
}, {
|
|
3475
|
-
default:
|
|
3476
|
-
|
|
3560
|
+
default: R(() => [...o[1] || (o[1] = [
|
|
3561
|
+
J(" Go to Home ", -1)
|
|
3477
3562
|
])]),
|
|
3478
3563
|
_: 1
|
|
3479
3564
|
})
|
|
@@ -3482,12 +3567,12 @@ const {
|
|
|
3482
3567
|
]));
|
|
3483
3568
|
}
|
|
3484
3569
|
};
|
|
3485
|
-
function
|
|
3570
|
+
function Ri(e = {}) {
|
|
3486
3571
|
const {
|
|
3487
3572
|
loginPath: t = "/login",
|
|
3488
3573
|
logoutPath: n = "/logout",
|
|
3489
3574
|
forgotPasswordPath: s = "/forgot-password",
|
|
3490
|
-
resetPasswordPath: r = "/reset
|
|
3575
|
+
resetPasswordPath: r = "/password/reset",
|
|
3491
3576
|
logo: o = "",
|
|
3492
3577
|
defaultRedirect: a = "/dashboard"
|
|
3493
3578
|
} = e;
|
|
@@ -3495,41 +3580,41 @@ function bi(e = {}) {
|
|
|
3495
3580
|
{
|
|
3496
3581
|
path: t,
|
|
3497
3582
|
name: "login",
|
|
3498
|
-
component:
|
|
3583
|
+
component: ea,
|
|
3499
3584
|
props: { logo: o, defaultRedirect: a },
|
|
3500
3585
|
meta: { auth: !1 }
|
|
3501
3586
|
},
|
|
3502
3587
|
{
|
|
3503
3588
|
path: n,
|
|
3504
3589
|
name: "logout",
|
|
3505
|
-
component:
|
|
3590
|
+
component: ta,
|
|
3506
3591
|
props: { defaultRedirect: t },
|
|
3507
3592
|
meta: { auth: !1 }
|
|
3508
3593
|
},
|
|
3509
3594
|
{
|
|
3510
3595
|
path: s,
|
|
3511
3596
|
name: "forgot-password",
|
|
3512
|
-
component:
|
|
3597
|
+
component: da,
|
|
3513
3598
|
props: { logo: o, loginRoute: t },
|
|
3514
3599
|
meta: { auth: !1 }
|
|
3515
3600
|
},
|
|
3516
3601
|
{
|
|
3517
3602
|
path: r,
|
|
3518
|
-
name: "reset
|
|
3519
|
-
component:
|
|
3603
|
+
name: "password-reset",
|
|
3604
|
+
component: xa,
|
|
3520
3605
|
props: { logo: o, loginRoute: t },
|
|
3521
3606
|
meta: { auth: !1 }
|
|
3522
3607
|
}
|
|
3523
3608
|
];
|
|
3524
3609
|
}
|
|
3525
|
-
function
|
|
3610
|
+
function Ei(e, t = {}) {
|
|
3526
3611
|
const { defaultAuthenticatedRoute: n = "/dashboard" } = t;
|
|
3527
3612
|
e.beforeEach(async (s, r, o) => {
|
|
3528
|
-
const a =
|
|
3529
|
-
a.state.ready || await a.fetchUser(),
|
|
3613
|
+
const a = K();
|
|
3614
|
+
a.state.ready || await a.fetchUser(), za(s, o, a, n);
|
|
3530
3615
|
});
|
|
3531
3616
|
}
|
|
3532
|
-
function
|
|
3617
|
+
function za(e, t, n, s) {
|
|
3533
3618
|
const r = e.meta.auth !== !1, o = n.check;
|
|
3534
3619
|
if (n.state.overrideToken && e.path === "/logout") {
|
|
3535
3620
|
t({ path: s });
|
|
@@ -3567,7 +3652,7 @@ function Va(e, t, n, s) {
|
|
|
3567
3652
|
t();
|
|
3568
3653
|
}
|
|
3569
3654
|
}
|
|
3570
|
-
function
|
|
3655
|
+
function $i(e = {}) {
|
|
3571
3656
|
const {
|
|
3572
3657
|
forbiddenPath: t = "/error/403",
|
|
3573
3658
|
logo: n = "",
|
|
@@ -3576,12 +3661,12 @@ function Ci(e = {}) {
|
|
|
3576
3661
|
return {
|
|
3577
3662
|
path: t,
|
|
3578
3663
|
name: "error-403",
|
|
3579
|
-
component:
|
|
3664
|
+
component: Ea,
|
|
3580
3665
|
props: { logo: n, homeRoute: s },
|
|
3581
3666
|
meta: { auth: !1 }
|
|
3582
3667
|
};
|
|
3583
3668
|
}
|
|
3584
|
-
function
|
|
3669
|
+
function Ai(e = {}) {
|
|
3585
3670
|
const {
|
|
3586
3671
|
logo: t = "",
|
|
3587
3672
|
homeRoute: n = "/dashboard"
|
|
@@ -3589,13 +3674,13 @@ function vi(e = {}) {
|
|
|
3589
3674
|
return {
|
|
3590
3675
|
path: "/:pathMatch(.*)*",
|
|
3591
3676
|
name: "error-404",
|
|
3592
|
-
component:
|
|
3677
|
+
component: Fa,
|
|
3593
3678
|
props: { logo: t, homeRoute: n },
|
|
3594
3679
|
meta: { auth: !1 }
|
|
3595
3680
|
};
|
|
3596
3681
|
}
|
|
3597
|
-
function
|
|
3598
|
-
const t =
|
|
3682
|
+
function qa(e = {}) {
|
|
3683
|
+
const t = v.create({
|
|
3599
3684
|
baseURL: e.baseURL || "",
|
|
3600
3685
|
timeout: e.timeout || 3e4,
|
|
3601
3686
|
headers: {
|
|
@@ -3606,7 +3691,7 @@ function Na(e = {}) {
|
|
|
3606
3691
|
return t.interceptors.request.use(
|
|
3607
3692
|
(n) => {
|
|
3608
3693
|
try {
|
|
3609
|
-
const s =
|
|
3694
|
+
const s = K();
|
|
3610
3695
|
s.state.overrideToken ? n.headers.Authorization = `Bearer ${s.state.overrideToken}` : s.state.token && (n.headers.Authorization = `Bearer ${s.state.token}`);
|
|
3611
3696
|
} catch {
|
|
3612
3697
|
}
|
|
@@ -3618,14 +3703,14 @@ function Na(e = {}) {
|
|
|
3618
3703
|
async (n) => {
|
|
3619
3704
|
if (n.response?.status === 401)
|
|
3620
3705
|
try {
|
|
3621
|
-
const s =
|
|
3706
|
+
const s = K();
|
|
3622
3707
|
await s.logout(), window.location.href = s.state.routes.auth;
|
|
3623
3708
|
} catch (s) {
|
|
3624
3709
|
console.error("Error during auto-logout:", s), window.location.href = "/login";
|
|
3625
3710
|
}
|
|
3626
3711
|
if (n.response?.status === 403)
|
|
3627
3712
|
try {
|
|
3628
|
-
const s =
|
|
3713
|
+
const s = K();
|
|
3629
3714
|
window.location.href = s.state.routes.forbidden;
|
|
3630
3715
|
} catch (s) {
|
|
3631
3716
|
console.error("Error during 403 redirect:", s), window.location.href = "/error/403";
|
|
@@ -3634,65 +3719,51 @@ function Na(e = {}) {
|
|
|
3634
3719
|
}
|
|
3635
3720
|
), t;
|
|
3636
3721
|
}
|
|
3637
|
-
function
|
|
3638
|
-
const n =
|
|
3722
|
+
function Li(e, t = {}) {
|
|
3723
|
+
const n = qa(t);
|
|
3639
3724
|
return e.provide("axios", n), e.config.globalProperties.$axios = n, n;
|
|
3640
3725
|
}
|
|
3641
|
-
const
|
|
3642
|
-
const e =
|
|
3643
|
-
app: "",
|
|
3644
|
-
icon: "",
|
|
3645
|
-
homeRoute: "dashboard",
|
|
3646
|
-
showBrandSelector: !0,
|
|
3647
|
-
showAppSelector: !0
|
|
3648
|
-
});
|
|
3649
|
-
return {
|
|
3650
|
-
state: e,
|
|
3651
|
-
initialize: (n = {}) => {
|
|
3652
|
-
e.app = n.app || "", e.icon = n.icon || "", e.homeRoute = n.homeRoute ?? "dashboard", e.showBrandSelector = n.showBrandSelector ?? !0, e.showAppSelector = n.showAppSelector ?? !0;
|
|
3653
|
-
}
|
|
3654
|
-
};
|
|
3655
|
-
}), _i = Ae("sparkNav", () => {
|
|
3656
|
-
const e = le({
|
|
3726
|
+
const Oi = ge("sparkNav", () => {
|
|
3727
|
+
const e = se({
|
|
3657
3728
|
menu: [],
|
|
3658
3729
|
collapsed: !1,
|
|
3659
3730
|
hidden: !1
|
|
3660
|
-
}), t =
|
|
3661
|
-
e.menu =
|
|
3662
|
-
}, r = (
|
|
3663
|
-
for (const
|
|
3664
|
-
if (
|
|
3665
|
-
if (
|
|
3666
|
-
const
|
|
3667
|
-
if (
|
|
3731
|
+
}), t = re(), n = Oe(), s = (u = []) => {
|
|
3732
|
+
e.menu = u;
|
|
3733
|
+
}, r = (u, c) => {
|
|
3734
|
+
for (const h of u) {
|
|
3735
|
+
if (h.href === c) return h;
|
|
3736
|
+
if (h.children) {
|
|
3737
|
+
const x = r(h.children, c);
|
|
3738
|
+
if (x) return x;
|
|
3668
3739
|
}
|
|
3669
3740
|
}
|
|
3670
3741
|
return null;
|
|
3671
|
-
}, o = async (
|
|
3672
|
-
if (
|
|
3673
|
-
const
|
|
3674
|
-
if (
|
|
3675
|
-
|
|
3742
|
+
}, o = async (u) => {
|
|
3743
|
+
if (u) {
|
|
3744
|
+
const c = r(e.menu, u);
|
|
3745
|
+
if (c && typeof c.action == "function") {
|
|
3746
|
+
c.action();
|
|
3676
3747
|
return;
|
|
3677
3748
|
}
|
|
3678
|
-
await t.push(
|
|
3749
|
+
await t.push(u);
|
|
3679
3750
|
}
|
|
3680
3751
|
}, a = () => {
|
|
3681
3752
|
e.collapsed = !e.collapsed;
|
|
3682
|
-
},
|
|
3753
|
+
}, i = () => {
|
|
3683
3754
|
e.hidden = !e.hidden;
|
|
3684
3755
|
}, l = () => {
|
|
3685
|
-
const
|
|
3686
|
-
if (
|
|
3687
|
-
const
|
|
3688
|
-
|
|
3689
|
-
|
|
3756
|
+
const u = n.name || n.path.replace("/", "");
|
|
3757
|
+
if (u) {
|
|
3758
|
+
const c = (h) => {
|
|
3759
|
+
h.forEach((x) => {
|
|
3760
|
+
x.current = x.href === u, x.children && c(x.children);
|
|
3690
3761
|
});
|
|
3691
3762
|
};
|
|
3692
|
-
|
|
3763
|
+
c(e.menu);
|
|
3693
3764
|
}
|
|
3694
3765
|
};
|
|
3695
|
-
return
|
|
3766
|
+
return un(
|
|
3696
3767
|
() => n.path,
|
|
3697
3768
|
() => {
|
|
3698
3769
|
l();
|
|
@@ -3703,43 +3774,44 @@ const Pa = Ae("sparkApp", () => {
|
|
|
3703
3774
|
initialize: s,
|
|
3704
3775
|
goto: o,
|
|
3705
3776
|
toggleCollapsed: a,
|
|
3706
|
-
toggleHidden:
|
|
3777
|
+
toggleHidden: i,
|
|
3707
3778
|
syncWithRoute: l
|
|
3708
3779
|
};
|
|
3709
3780
|
});
|
|
3710
3781
|
export {
|
|
3711
3782
|
B as Icons,
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3783
|
+
ti as SparkAlert,
|
|
3784
|
+
ps as SparkAppSelector,
|
|
3785
|
+
As as SparkBrandSelector,
|
|
3786
|
+
oe as SparkButton,
|
|
3787
|
+
ni as SparkButtonGroup,
|
|
3788
|
+
si as SparkCard,
|
|
3789
|
+
oi as SparkDefaultContainer,
|
|
3790
|
+
Ea as SparkError403View,
|
|
3791
|
+
Fa as SparkError404View,
|
|
3792
|
+
ki as SparkErrorGeneralView,
|
|
3793
|
+
da as SparkForgotPasswordView,
|
|
3794
|
+
ea as SparkLoginView,
|
|
3795
|
+
ta as SparkLogoutView,
|
|
3796
|
+
Ns as SparkModalContainer,
|
|
3797
|
+
ri as SparkModalDialog,
|
|
3798
|
+
ot as SparkOverlay,
|
|
3799
|
+
ai as SparkPublicContainer,
|
|
3800
|
+
xa as SparkResetPasswordView,
|
|
3801
|
+
Qa as addIcons,
|
|
3802
|
+
$i as create403Route,
|
|
3803
|
+
Ai as create404Route,
|
|
3804
|
+
Ri as createAuthRoutes,
|
|
3805
|
+
qa as createAxiosInstance,
|
|
3806
|
+
Ei as setupAuthGuards,
|
|
3807
|
+
Li as setupAxios,
|
|
3808
|
+
ei as setupFontAwesome,
|
|
3738
3809
|
pe as sparkModalService,
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3810
|
+
Q as sparkOverlayService,
|
|
3811
|
+
Lt as useSparkAppSelectorStore,
|
|
3812
|
+
Ot as useSparkAppStore,
|
|
3813
|
+
K as useSparkAuthStore,
|
|
3814
|
+
Tt as useSparkBrandFilterStore,
|
|
3815
|
+
Oi as useSparkNavStore,
|
|
3816
|
+
at as useSparkOverlay
|
|
3745
3817
|
};
|