@wishbone-media/spark 0.9.0 → 0.9.2
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 +171 -171
- package/package.json +1 -1
- package/src/plugins/router.js +1 -1
- package/src/utils/cookies.js +21 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as $, resolveComponent as V, createElementBlock as y, openBlock as g, normalizeClass as _, createElementVNode as p, createVNode as v, unref as x, renderSlot as q, Fragment as ne, renderList as de, createCommentVNode as R, toDisplayString as F, reactive as re, ref as z, inject as tn, provide as nn, markRaw as xt, createBlock as Y, withCtx as O, resolveDynamicComponent as St, mergeProps as vt, toHandlers as Ct, createTextVNode as ze, withModifiers as le, onMounted as sn, watch as rn } from "vue";
|
|
2
2
|
import { library as _t } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as on } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as
|
|
4
|
+
import { faSignOut as an, faXmark as ln, faTimes as cn, faStreetView as un, faSortUp as dn, faSortDown as fn, faSort as pn, faScaleBalanced as hn, faSatelliteDish as mn, faLayerPlus as gn, faLaptopMobile as yn, faInfoCircle as wn, faGripDotsVertical as bn, faGearComplex as xn, faFlag as Sn, faFaceSmileWink as vn, faFaceSmileRelaxed as Cn, faExclamationTriangle as _n, faEllipsisVertical as kn, faEllipsis as Rn, faEdit as En, faComments as On, faCircleXmark as An, faCircleUser as $n, faChevronUp as Tn, faChevronRight as Ln, faChevronLeft as Fn, faChevronDown as Bn, faCheckCircle as Nn, faCheck as Pn, faBullhorn as Hn, faBellRing as Un, faBarsSort as Vn, faArrowRightToLine as Dn, faArrowLeftToLine as jn } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { defineStore as Re } from "pinia";
|
|
6
6
|
import { TransitionRoot as kt, Dialog as Rt, TransitionChild as _e, DialogPanel as Et } from "@headlessui/vue";
|
|
7
7
|
import { useRouter as Ee, useRoute as Oe } from "vue-router";
|
|
@@ -32,8 +32,8 @@ const N = {
|
|
|
32
32
|
farInfoCircle: wn,
|
|
33
33
|
farLaptopMobile: yn,
|
|
34
34
|
farLayerPlus: gn,
|
|
35
|
-
farSatelliteDish:
|
|
36
|
-
farScaleBalanced:
|
|
35
|
+
farSatelliteDish: mn,
|
|
36
|
+
farScaleBalanced: hn,
|
|
37
37
|
farSort: pn,
|
|
38
38
|
farSortDown: fn,
|
|
39
39
|
farSortUp: dn,
|
|
@@ -48,7 +48,7 @@ function va(e) {
|
|
|
48
48
|
function Ca(e) {
|
|
49
49
|
_t.add(...Object.values(N)), e.component("FontAwesomeIcon", on);
|
|
50
50
|
}
|
|
51
|
-
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, qn = { class: "ml-3" }, zn = { class: "ml-auto pl-3 pt-1 self-start" },
|
|
51
|
+
const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }, qn = { class: "ml-3" }, zn = { class: "ml-auto pl-3 pt-1 self-start" }, Wn = { class: "-mx-1.5 -my-1.5" }, _a = {
|
|
52
52
|
__name: "SparkAlert",
|
|
53
53
|
props: {
|
|
54
54
|
type: {
|
|
@@ -96,7 +96,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
96
96
|
q(o.$slots, "default")
|
|
97
97
|
]),
|
|
98
98
|
p("div", zn, [
|
|
99
|
-
p("div",
|
|
99
|
+
p("div", Wn, [
|
|
100
100
|
p("button", {
|
|
101
101
|
type: "button",
|
|
102
102
|
class: _(["inline-flex rounded-md px-2 py-1.5", a.value]),
|
|
@@ -112,7 +112,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
112
112
|
], 2);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, Jn = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, Kn = { class: "flex flex-1 flex-col" }, Gn = { class: "divide-y divide-gray-200" }, Zn = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, Xn = { class: "ml-auto flex items-center" }, Qn = ["onClick"], Yn = { class: "gap-y-1" }, es = { class: "text-base text-gray-800 flex items-center" }, ts = { class: "font-medium" }, ns = {
|
|
116
116
|
key: 0,
|
|
117
117
|
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
118
|
}, ss = { class: "text-sm text-gray-500" }, rs = { class: "ml-auto flex items-center" }, os = {
|
|
@@ -176,7 +176,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
176
176
|
};
|
|
177
177
|
return (o, c) => {
|
|
178
178
|
const l = V("font-awesome-icon");
|
|
179
|
-
return g(), y("div",
|
|
179
|
+
return g(), y("div", Jn, [
|
|
180
180
|
p("div", Kn, [
|
|
181
181
|
p("div", Gn, [
|
|
182
182
|
p("div", Zn, [
|
|
@@ -265,7 +265,7 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
265
265
|
), as = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white rounded-lg" }, is = { class: "flex flex-1 flex-col" }, ls = { class: "divide-y divide-gray-200" }, cs = { class: "flex px-[22px] py-2.5 text-[12px] items-center" }, us = { class: "ml-auto flex items-center" }, ds = {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "flex px-[22px] py-[15px] text-gray-500 text-sm"
|
|
268
|
-
}, fs = ["onClick"], ps = { class: "gap-y-1 flex" },
|
|
268
|
+
}, fs = ["onClick"], ps = { class: "gap-y-1 flex" }, hs = { class: "flex items-center mr-4" }, ms = ["src", "alt"], gs = { class: "ml-auto flex flex-col" }, ys = { class: "text-base text-gray-800 flex items-center" }, ws = { class: "font-medium" }, bs = {
|
|
269
269
|
key: 0,
|
|
270
270
|
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
271
|
}, xs = { class: "text-sm text-gray-500" }, Ss = {
|
|
@@ -297,12 +297,12 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
297
297
|
onClick: (i) => r(l)
|
|
298
298
|
}, [
|
|
299
299
|
p("div", ps, [
|
|
300
|
-
p("div",
|
|
300
|
+
p("div", hs, [
|
|
301
301
|
p("img", {
|
|
302
302
|
src: l.logo,
|
|
303
303
|
alt: `${l.name} logo`,
|
|
304
304
|
class: "h-8 w-auto"
|
|
305
|
-
}, null, 8,
|
|
305
|
+
}, null, 8, ms)
|
|
306
306
|
]),
|
|
307
307
|
p("div", gs, [
|
|
308
308
|
p("div", ys, [
|
|
@@ -364,13 +364,13 @@ const Mn = { class: "flex items-center" }, In = { class: "shrink-0 self-start" }
|
|
|
364
364
|
}, o = (l, i) => {
|
|
365
365
|
if (!i) return l;
|
|
366
366
|
const d = l.split(" ").filter(Boolean), f = i.split(" ").filter(Boolean);
|
|
367
|
-
return [...d.filter((E) => !f.some((
|
|
367
|
+
return [...d.filter((E) => !f.some((h) => {
|
|
368
368
|
const w = Object.entries(a).find(
|
|
369
369
|
([k, T]) => T.test(E)
|
|
370
|
-
)?.[0],
|
|
371
|
-
([k, T]) => T.test(
|
|
370
|
+
)?.[0], m = Object.entries(a).find(
|
|
371
|
+
([k, T]) => T.test(h)
|
|
372
372
|
)?.[0];
|
|
373
|
-
return w && w ===
|
|
373
|
+
return w && w === m;
|
|
374
374
|
})), ...f].join(" ");
|
|
375
375
|
}, c = $(() => {
|
|
376
376
|
let l = "", i = "";
|
|
@@ -807,7 +807,7 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
807
807
|
}, Ms = ["href", "onClick"], Is = {
|
|
808
808
|
key: 1,
|
|
809
809
|
class: "text-[13px]"
|
|
810
|
-
}, qs = { class: "mt-auto" }, zs = { class: "p-[10px] flex-shrink-0" },
|
|
810
|
+
}, qs = { class: "mt-auto" }, zs = { class: "p-[10px] flex-shrink-0" }, Ws = { class: "flex flex-1 items-center gap-x-6" }, Js = { class: "relative flex flex-1 items-center gap-4" }, Ks = { class: "cursor-pointer" }, Gs = ["src"], Zs = { class: "ml-auto" }, Xs = { class: "mr-[10px] pb-[10px] flex-1 flex flex-col" }, Oa = {
|
|
811
811
|
__name: "SparkDefaultContainer",
|
|
812
812
|
props: {
|
|
813
813
|
appStore: {
|
|
@@ -935,8 +935,8 @@ const Z = new Fs(), Bs = { class: "flex grow m-2.5 p-[10px] rounded-lg" }, Ns =
|
|
|
935
935
|
class: _([o.value, "h-full transition-all flex flex-col"])
|
|
936
936
|
}, [
|
|
937
937
|
p("div", zs, [
|
|
938
|
-
p("div",
|
|
939
|
-
p("div",
|
|
938
|
+
p("div", Ws, [
|
|
939
|
+
p("div", Js, [
|
|
940
940
|
q(c.$slots, "header-left", {}, () => [
|
|
941
941
|
p("div", Ks, [
|
|
942
942
|
v(i, {
|
|
@@ -1014,7 +1014,7 @@ function At(e, t) {
|
|
|
1014
1014
|
return e.apply(t, arguments);
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
const { toString: nr } = Object.prototype, { getPrototypeOf:
|
|
1017
|
+
const { toString: nr } = Object.prototype, { getPrototypeOf: We } = Object, { iterator: $e, toStringTag: $t } = Symbol, Te = /* @__PURE__ */ ((e) => (t) => {
|
|
1018
1018
|
const n = nr.call(t);
|
|
1019
1019
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1020
1020
|
})(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => Te(t) === e), Le = (e) => (t) => typeof t === e, { isArray: oe } = Array, se = Le("undefined");
|
|
@@ -1029,7 +1029,7 @@ function sr(e) {
|
|
|
1029
1029
|
const rr = Le("string"), P = Le("function"), Lt = Le("number"), pe = (e) => e !== null && typeof e == "object", or = (e) => e === !0 || e === !1, Se = (e) => {
|
|
1030
1030
|
if (Te(e) !== "object")
|
|
1031
1031
|
return !1;
|
|
1032
|
-
const t =
|
|
1032
|
+
const t = We(e);
|
|
1033
1033
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !($t in e) && !($e in e);
|
|
1034
1034
|
}, ar = (e) => {
|
|
1035
1035
|
if (!pe(e) || fe(e))
|
|
@@ -1043,8 +1043,8 @@ const rr = Le("string"), P = Le("function"), Lt = Le("number"), pe = (e) => e !=
|
|
|
1043
1043
|
let t;
|
|
1044
1044
|
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = Te(e)) === "formdata" || // detect form-data instance
|
|
1045
1045
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
1046
|
-
}, pr = j("URLSearchParams"), [
|
|
1047
|
-
function
|
|
1046
|
+
}, pr = j("URLSearchParams"), [hr, mr, gr, yr] = ["ReadableStream", "Request", "Response", "Headers"].map(j), wr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1047
|
+
function he(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1048
1048
|
if (e === null || typeof e > "u")
|
|
1049
1049
|
return;
|
|
1050
1050
|
let s, r;
|
|
@@ -1078,10 +1078,10 @@ function je() {
|
|
|
1078
1078
|
Se(n[o]) && Se(r) ? n[o] = je(n[o], r) : Se(r) ? n[o] = je({}, r) : oe(r) ? n[o] = r.slice() : (!t || !se(r)) && (n[o] = r);
|
|
1079
1079
|
};
|
|
1080
1080
|
for (let r = 0, a = arguments.length; r < a; r++)
|
|
1081
|
-
arguments[r] &&
|
|
1081
|
+
arguments[r] && he(arguments[r], s);
|
|
1082
1082
|
return n;
|
|
1083
1083
|
}
|
|
1084
|
-
const br = (e, t, n, { allOwnKeys: s } = {}) => (
|
|
1084
|
+
const br = (e, t, n, { allOwnKeys: s } = {}) => (he(t, (r, a) => {
|
|
1085
1085
|
n && P(r) ? e[a] = At(r, n) : e[a] = r;
|
|
1086
1086
|
}, { allOwnKeys: s }), e), xr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Sr = (e, t, n, s) => {
|
|
1087
1087
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -1094,7 +1094,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1094
1094
|
do {
|
|
1095
1095
|
for (r = Object.getOwnPropertyNames(e), a = r.length; a-- > 0; )
|
|
1096
1096
|
o = r[a], (!s || s(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
1097
|
-
e = n !== !1 &&
|
|
1097
|
+
e = n !== !1 && We(e);
|
|
1098
1098
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1099
1099
|
return t;
|
|
1100
1100
|
}, Cr = (e, t, n) => {
|
|
@@ -1110,7 +1110,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1110
1110
|
for (; t-- > 0; )
|
|
1111
1111
|
n[t] = e[t];
|
|
1112
1112
|
return n;
|
|
1113
|
-
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
1113
|
+
}, kr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && We(Uint8Array)), Rr = (e, t) => {
|
|
1114
1114
|
const s = (e && e[$e]).call(e);
|
|
1115
1115
|
let r;
|
|
1116
1116
|
for (; (r = s.next()) && !r.done; ) {
|
|
@@ -1130,7 +1130,7 @@ const br = (e, t, n, { allOwnKeys: s } = {}) => (me(t, (r, a) => {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
), rt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), $r = j("RegExp"), Nt = (e, t) => {
|
|
1132
1132
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
1133
|
-
|
|
1133
|
+
he(n, (r, a) => {
|
|
1134
1134
|
let o;
|
|
1135
1135
|
(o = t(r, a, e)) !== !1 && (s[a] = o || r);
|
|
1136
1136
|
}), Object.defineProperties(e, s);
|
|
@@ -1171,7 +1171,7 @@ const Pr = (e) => {
|
|
|
1171
1171
|
if (!("toJSON" in s)) {
|
|
1172
1172
|
t[r] = s;
|
|
1173
1173
|
const a = oe(s) ? [] : {};
|
|
1174
|
-
return
|
|
1174
|
+
return he(s, (o, c) => {
|
|
1175
1175
|
const l = n(o, r + 1);
|
|
1176
1176
|
!se(l) && (a[c] = l);
|
|
1177
1177
|
}), t[r] = void 0, a;
|
|
@@ -1199,8 +1199,8 @@ const Pr = (e) => {
|
|
|
1199
1199
|
isObject: pe,
|
|
1200
1200
|
isPlainObject: Se,
|
|
1201
1201
|
isEmptyObject: ar,
|
|
1202
|
-
isReadableStream:
|
|
1203
|
-
isRequest:
|
|
1202
|
+
isReadableStream: hr,
|
|
1203
|
+
isRequest: mr,
|
|
1204
1204
|
isResponse: gr,
|
|
1205
1205
|
isHeaders: yr,
|
|
1206
1206
|
isUndefined: se,
|
|
@@ -1213,7 +1213,7 @@ const Pr = (e) => {
|
|
|
1213
1213
|
isURLSearchParams: pr,
|
|
1214
1214
|
isTypedArray: kr,
|
|
1215
1215
|
isFileList: ur,
|
|
1216
|
-
forEach:
|
|
1216
|
+
forEach: he,
|
|
1217
1217
|
merge: je,
|
|
1218
1218
|
extend: br,
|
|
1219
1219
|
trim: wr,
|
|
@@ -1324,28 +1324,28 @@ function Fe(e, t, n) {
|
|
|
1324
1324
|
metaTokens: !0,
|
|
1325
1325
|
dots: !1,
|
|
1326
1326
|
indexes: !1
|
|
1327
|
-
}, !1, function(w,
|
|
1328
|
-
return !u.isUndefined(
|
|
1327
|
+
}, !1, function(w, m) {
|
|
1328
|
+
return !u.isUndefined(m[w]);
|
|
1329
1329
|
});
|
|
1330
1330
|
const s = n.metaTokens, r = n.visitor || d, a = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
1331
1331
|
if (!u.isFunction(r))
|
|
1332
1332
|
throw new TypeError("visitor must be a function");
|
|
1333
|
-
function i(
|
|
1334
|
-
if (
|
|
1335
|
-
if (u.isDate(
|
|
1336
|
-
return
|
|
1337
|
-
if (u.isBoolean(
|
|
1338
|
-
return
|
|
1339
|
-
if (!l && u.isBlob(
|
|
1333
|
+
function i(h) {
|
|
1334
|
+
if (h === null) return "";
|
|
1335
|
+
if (u.isDate(h))
|
|
1336
|
+
return h.toISOString();
|
|
1337
|
+
if (u.isBoolean(h))
|
|
1338
|
+
return h.toString();
|
|
1339
|
+
if (!l && u.isBlob(h))
|
|
1340
1340
|
throw new S("Blob is not supported. Use a Buffer instead.");
|
|
1341
|
-
return u.isArrayBuffer(
|
|
1341
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
1342
1342
|
}
|
|
1343
|
-
function d(
|
|
1344
|
-
let k =
|
|
1345
|
-
if (
|
|
1343
|
+
function d(h, w, m) {
|
|
1344
|
+
let k = h;
|
|
1345
|
+
if (h && !m && typeof h == "object") {
|
|
1346
1346
|
if (u.endsWith(w, "{}"))
|
|
1347
|
-
w = s ? w : w.slice(0, -2),
|
|
1348
|
-
else if (u.isArray(
|
|
1347
|
+
w = s ? w : w.slice(0, -2), h = JSON.stringify(h);
|
|
1348
|
+
else if (u.isArray(h) && Mr(h) || (u.isFileList(h) || u.endsWith(w, "[]")) && (k = u.toArray(h)))
|
|
1349
1349
|
return w = Vt(w), k.forEach(function(A, B) {
|
|
1350
1350
|
!(u.isUndefined(A) || A === null) && t.append(
|
|
1351
1351
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -1354,18 +1354,18 @@ function Fe(e, t, n) {
|
|
|
1354
1354
|
);
|
|
1355
1355
|
}), !1;
|
|
1356
1356
|
}
|
|
1357
|
-
return Me(
|
|
1357
|
+
return Me(h) ? !0 : (t.append(ot(m, w, a), i(h)), !1);
|
|
1358
1358
|
}
|
|
1359
1359
|
const f = [], b = Object.assign(Ir, {
|
|
1360
1360
|
defaultVisitor: d,
|
|
1361
1361
|
convertValue: i,
|
|
1362
1362
|
isVisitable: Me
|
|
1363
1363
|
});
|
|
1364
|
-
function E(
|
|
1365
|
-
if (!u.isUndefined(
|
|
1366
|
-
if (f.indexOf(
|
|
1364
|
+
function E(h, w) {
|
|
1365
|
+
if (!u.isUndefined(h)) {
|
|
1366
|
+
if (f.indexOf(h) !== -1)
|
|
1367
1367
|
throw Error("Circular reference detected in " + w.join("."));
|
|
1368
|
-
f.push(
|
|
1368
|
+
f.push(h), u.forEach(h, function(k, T) {
|
|
1369
1369
|
(!(u.isUndefined(k) || k === null) && r.call(
|
|
1370
1370
|
t,
|
|
1371
1371
|
k,
|
|
@@ -1394,10 +1394,10 @@ function at(e) {
|
|
|
1394
1394
|
return t[s];
|
|
1395
1395
|
});
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Je(e, t) {
|
|
1398
1398
|
this._pairs = [], e && Fe(e, this, t);
|
|
1399
1399
|
}
|
|
1400
|
-
const Dt =
|
|
1400
|
+
const Dt = Je.prototype;
|
|
1401
1401
|
Dt.append = function(t, n) {
|
|
1402
1402
|
this._pairs.push([t, n]);
|
|
1403
1403
|
};
|
|
@@ -1421,7 +1421,7 @@ function jt(e, t, n) {
|
|
|
1421
1421
|
});
|
|
1422
1422
|
const r = n && n.serialize;
|
|
1423
1423
|
let a;
|
|
1424
|
-
if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new
|
|
1424
|
+
if (r ? a = r(t, n) : a = u.isURLSearchParams(t) ? t.toString() : new Je(t, n).toString(s), a) {
|
|
1425
1425
|
const o = e.indexOf("#");
|
|
1426
1426
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
|
|
1427
1427
|
}
|
|
@@ -1485,12 +1485,12 @@ const Mt = {
|
|
|
1485
1485
|
silentJSONParsing: !0,
|
|
1486
1486
|
forcedJSONParsing: !0,
|
|
1487
1487
|
clarifyTimeoutError: !1
|
|
1488
|
-
}, zr = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
1488
|
+
}, zr = typeof URLSearchParams < "u" ? URLSearchParams : Je, Wr = typeof FormData < "u" ? FormData : null, Jr = typeof Blob < "u" ? Blob : null, Kr = {
|
|
1489
1489
|
isBrowser: !0,
|
|
1490
1490
|
classes: {
|
|
1491
1491
|
URLSearchParams: zr,
|
|
1492
|
-
FormData:
|
|
1493
|
-
Blob:
|
|
1492
|
+
FormData: Wr,
|
|
1493
|
+
Blob: Jr
|
|
1494
1494
|
},
|
|
1495
1495
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1496
1496
|
}, Ke = typeof window < "u" && typeof document < "u", Ie = typeof navigator == "object" && navigator || void 0, Gr = Ke && (!Ie || ["ReactNative", "NativeScript", "NS"].indexOf(Ie.product) < 0), Zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
@@ -1550,7 +1550,7 @@ function no(e, t, n) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
return (n || JSON.stringify)(e);
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const me = {
|
|
1554
1554
|
transitional: Mt,
|
|
1555
1555
|
adapter: ["xhr", "http", "fetch"],
|
|
1556
1556
|
transformRequest: [function(t, n) {
|
|
@@ -1579,7 +1579,7 @@ const he = {
|
|
|
1579
1579
|
return a || r ? (n.setContentType("application/json", !1), no(t)) : t;
|
|
1580
1580
|
}],
|
|
1581
1581
|
transformResponse: [function(t) {
|
|
1582
|
-
const n = this.transitional ||
|
|
1582
|
+
const n = this.transitional || me.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
1583
1583
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
1584
1584
|
return t;
|
|
1585
1585
|
if (t && u.isString(t) && (s && !this.responseType || r)) {
|
|
@@ -1617,7 +1617,7 @@ const he = {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
};
|
|
1619
1619
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1620
|
-
|
|
1620
|
+
me.headers[e] = {};
|
|
1621
1621
|
});
|
|
1622
1622
|
const so = u.toObjectSet([
|
|
1623
1623
|
"age",
|
|
@@ -1821,7 +1821,7 @@ u.reduceDescriptors(H.prototype, ({ value: e }, t) => {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
u.freezeMethods(H);
|
|
1823
1823
|
function Ue(e, t) {
|
|
1824
|
-
const n = this ||
|
|
1824
|
+
const n = this || me, s = t || n, r = H.from(s.headers);
|
|
1825
1825
|
let a = s.data;
|
|
1826
1826
|
return u.forEach(e, function(c) {
|
|
1827
1827
|
a = c.call(n, a, r.normalize(), t ? t.status : void 0);
|
|
@@ -1907,7 +1907,7 @@ const ke = (e, t, n = 3) => {
|
|
|
1907
1907
|
}, ut = (e) => (...t) => u.asap(() => e(...t)), po = L.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, L.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1908
1908
|
new URL(L.origin),
|
|
1909
1909
|
L.navigator && /(msie|trident)/i.test(L.navigator.userAgent)
|
|
1910
|
-
) : () => !0,
|
|
1910
|
+
) : () => !0, ho = L.hasStandardBrowserEnv ? (
|
|
1911
1911
|
// Standard browser envs support document.cookie
|
|
1912
1912
|
{
|
|
1913
1913
|
write(e, t, n, s, r, a, o) {
|
|
@@ -1936,14 +1936,14 @@ const ke = (e, t, n = 3) => {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
);
|
|
1939
|
-
function
|
|
1939
|
+
function mo(e) {
|
|
1940
1940
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1941
1941
|
}
|
|
1942
1942
|
function go(e, t) {
|
|
1943
1943
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1946
|
-
let s = !
|
|
1945
|
+
function Wt(e, t, n) {
|
|
1946
|
+
let s = !mo(t);
|
|
1947
1947
|
return e && (s || n == !1) ? go(e, t) : t;
|
|
1948
1948
|
}
|
|
1949
1949
|
const dt = (e) => e instanceof H ? { ...e } : e;
|
|
@@ -2011,10 +2011,10 @@ function ee(e, t) {
|
|
|
2011
2011
|
u.isUndefined(b) && f !== c || (n[d] = b);
|
|
2012
2012
|
}), n;
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const Jt = (e) => {
|
|
2015
2015
|
const t = ee({}, e);
|
|
2016
2016
|
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: a, headers: o, auth: c } = t;
|
|
2017
|
-
if (t.headers = o = H.from(o), t.url = jt(
|
|
2017
|
+
if (t.headers = o = H.from(o), t.url = jt(Wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
2018
2018
|
"Authorization",
|
|
2019
2019
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
2020
2020
|
), u.isFormData(n)) {
|
|
@@ -2028,67 +2028,67 @@ const Wt = (e) => {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
if (L.hasStandardBrowserEnv && (s && u.isFunction(s) && (s = s(t)), s || s !== !1 && po(t.url))) {
|
|
2031
|
-
const l = r && a &&
|
|
2031
|
+
const l = r && a && ho.read(a);
|
|
2032
2032
|
l && o.set(r, l);
|
|
2033
2033
|
}
|
|
2034
2034
|
return t;
|
|
2035
2035
|
}, yo = typeof XMLHttpRequest < "u", wo = yo && function(e) {
|
|
2036
2036
|
return new Promise(function(n, s) {
|
|
2037
|
-
const r =
|
|
2037
|
+
const r = Jt(e);
|
|
2038
2038
|
let a = r.data;
|
|
2039
2039
|
const o = H.from(r.headers).normalize();
|
|
2040
|
-
let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E,
|
|
2040
|
+
let { responseType: c, onUploadProgress: l, onDownloadProgress: i } = r, d, f, b, E, h;
|
|
2041
2041
|
function w() {
|
|
2042
|
-
E && E(),
|
|
2042
|
+
E && E(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(d), r.signal && r.signal.removeEventListener("abort", d);
|
|
2043
2043
|
}
|
|
2044
|
-
let
|
|
2045
|
-
|
|
2044
|
+
let m = new XMLHttpRequest();
|
|
2045
|
+
m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
|
|
2046
2046
|
function k() {
|
|
2047
|
-
if (!
|
|
2047
|
+
if (!m)
|
|
2048
2048
|
return;
|
|
2049
2049
|
const A = H.from(
|
|
2050
|
-
"getAllResponseHeaders" in
|
|
2050
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
2051
2051
|
), D = {
|
|
2052
|
-
data: !c || c === "text" || c === "json" ?
|
|
2053
|
-
status:
|
|
2054
|
-
statusText:
|
|
2052
|
+
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
2053
|
+
status: m.status,
|
|
2054
|
+
statusText: m.statusText,
|
|
2055
2055
|
headers: A,
|
|
2056
2056
|
config: e,
|
|
2057
|
-
request:
|
|
2057
|
+
request: m
|
|
2058
2058
|
};
|
|
2059
2059
|
zt(function(U) {
|
|
2060
2060
|
n(U), w();
|
|
2061
2061
|
}, function(U) {
|
|
2062
2062
|
s(U), w();
|
|
2063
|
-
}, D),
|
|
2063
|
+
}, D), m = null;
|
|
2064
2064
|
}
|
|
2065
|
-
"onloadend" in
|
|
2066
|
-
!
|
|
2067
|
-
},
|
|
2068
|
-
|
|
2069
|
-
},
|
|
2070
|
-
const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e,
|
|
2071
|
-
K.event = B || null, s(K),
|
|
2072
|
-
},
|
|
2065
|
+
"onloadend" in m ? m.onloadend = k : m.onreadystatechange = function() {
|
|
2066
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(k);
|
|
2067
|
+
}, m.onabort = function() {
|
|
2068
|
+
m && (s(new S("Request aborted", S.ECONNABORTED, e, m)), m = null);
|
|
2069
|
+
}, m.onerror = function(B) {
|
|
2070
|
+
const D = B && B.message ? B.message : "Network Error", K = new S(D, S.ERR_NETWORK, e, m);
|
|
2071
|
+
K.event = B || null, s(K), m = null;
|
|
2072
|
+
}, m.ontimeout = function() {
|
|
2073
2073
|
let B = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
2074
2074
|
const D = r.transitional || Mt;
|
|
2075
2075
|
r.timeoutErrorMessage && (B = r.timeoutErrorMessage), s(new S(
|
|
2076
2076
|
B,
|
|
2077
2077
|
D.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
2078
2078
|
e,
|
|
2079
|
-
|
|
2080
|
-
)),
|
|
2081
|
-
}, a === void 0 && o.setContentType(null), "setRequestHeader" in
|
|
2082
|
-
|
|
2083
|
-
}), u.isUndefined(r.withCredentials) || (
|
|
2084
|
-
|
|
2079
|
+
m
|
|
2080
|
+
)), m = null;
|
|
2081
|
+
}, a === void 0 && o.setContentType(null), "setRequestHeader" in m && u.forEach(o.toJSON(), function(B, D) {
|
|
2082
|
+
m.setRequestHeader(D, B);
|
|
2083
|
+
}), u.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), c && c !== "json" && (m.responseType = r.responseType), i && ([b, h] = ke(i, !0), m.addEventListener("progress", b)), l && m.upload && ([f, E] = ke(l), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (d = (A) => {
|
|
2084
|
+
m && (s(!A || A.type ? new ae(null, e, m) : A), m.abort(), m = null);
|
|
2085
2085
|
}, r.cancelToken && r.cancelToken.subscribe(d), r.signal && (r.signal.aborted ? d() : r.signal.addEventListener("abort", d)));
|
|
2086
2086
|
const T = co(r.url);
|
|
2087
2087
|
if (T && L.protocols.indexOf(T) === -1) {
|
|
2088
2088
|
s(new S("Unsupported protocol " + T + ":", S.ERR_BAD_REQUEST, e));
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
|
-
|
|
2091
|
+
m.send(a || null);
|
|
2092
2092
|
});
|
|
2093
2093
|
}, bo = (e, t) => {
|
|
2094
2094
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
@@ -2174,8 +2174,8 @@ const Wt = (e) => {
|
|
|
2174
2174
|
Request: e,
|
|
2175
2175
|
Response: t
|
|
2176
2176
|
}))(u.global), {
|
|
2177
|
-
ReadableStream:
|
|
2178
|
-
TextEncoder:
|
|
2177
|
+
ReadableStream: ht,
|
|
2178
|
+
TextEncoder: mt
|
|
2179
2179
|
} = u.global, gt = (e, ...t) => {
|
|
2180
2180
|
try {
|
|
2181
2181
|
return !!e(...t);
|
|
@@ -2189,49 +2189,49 @@ const Wt = (e) => {
|
|
|
2189
2189
|
const { fetch: t, Request: n, Response: s } = e, r = t ? xe(t) : typeof fetch == "function", a = xe(n), o = xe(s);
|
|
2190
2190
|
if (!r)
|
|
2191
2191
|
return !1;
|
|
2192
|
-
const c = r && xe(
|
|
2193
|
-
let
|
|
2192
|
+
const c = r && xe(ht), l = r && (typeof mt == "function" ? /* @__PURE__ */ ((h) => (w) => h.encode(w))(new mt()) : async (h) => new Uint8Array(await new n(h).arrayBuffer())), i = a && c && gt(() => {
|
|
2193
|
+
let h = !1;
|
|
2194
2194
|
const w = new n(L.origin, {
|
|
2195
|
-
body: new
|
|
2195
|
+
body: new ht(),
|
|
2196
2196
|
method: "POST",
|
|
2197
2197
|
get duplex() {
|
|
2198
|
-
return
|
|
2198
|
+
return h = !0, "half";
|
|
2199
2199
|
}
|
|
2200
2200
|
}).headers.has("Content-Type");
|
|
2201
|
-
return
|
|
2201
|
+
return h && !w;
|
|
2202
2202
|
}), d = o && c && gt(() => u.isReadableStream(new s("").body)), f = {
|
|
2203
|
-
stream: d && ((
|
|
2203
|
+
stream: d && ((h) => h.body)
|
|
2204
2204
|
};
|
|
2205
|
-
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2206
|
-
!f[
|
|
2207
|
-
let k = w && w[
|
|
2205
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
|
|
2206
|
+
!f[h] && (f[h] = (w, m) => {
|
|
2207
|
+
let k = w && w[h];
|
|
2208
2208
|
if (k)
|
|
2209
2209
|
return k.call(w);
|
|
2210
|
-
throw new S(`Response type '${
|
|
2210
|
+
throw new S(`Response type '${h}' is not supported`, S.ERR_NOT_SUPPORT, m);
|
|
2211
2211
|
});
|
|
2212
2212
|
});
|
|
2213
|
-
const b = async (
|
|
2214
|
-
if (
|
|
2213
|
+
const b = async (h) => {
|
|
2214
|
+
if (h == null)
|
|
2215
2215
|
return 0;
|
|
2216
|
-
if (u.isBlob(
|
|
2217
|
-
return
|
|
2218
|
-
if (u.isSpecCompliantForm(
|
|
2216
|
+
if (u.isBlob(h))
|
|
2217
|
+
return h.size;
|
|
2218
|
+
if (u.isSpecCompliantForm(h))
|
|
2219
2219
|
return (await new n(L.origin, {
|
|
2220
2220
|
method: "POST",
|
|
2221
|
-
body:
|
|
2221
|
+
body: h
|
|
2222
2222
|
}).arrayBuffer()).byteLength;
|
|
2223
|
-
if (u.isArrayBufferView(
|
|
2224
|
-
return
|
|
2225
|
-
if (u.isURLSearchParams(
|
|
2226
|
-
return (await l(
|
|
2227
|
-
}, E = async (
|
|
2228
|
-
const
|
|
2229
|
-
return
|
|
2223
|
+
if (u.isArrayBufferView(h) || u.isArrayBuffer(h))
|
|
2224
|
+
return h.byteLength;
|
|
2225
|
+
if (u.isURLSearchParams(h) && (h = h + ""), u.isString(h))
|
|
2226
|
+
return (await l(h)).byteLength;
|
|
2227
|
+
}, E = async (h, w) => {
|
|
2228
|
+
const m = u.toFiniteNumber(h.getContentLength());
|
|
2229
|
+
return m ?? b(w);
|
|
2230
2230
|
};
|
|
2231
|
-
return async (
|
|
2231
|
+
return async (h) => {
|
|
2232
2232
|
let {
|
|
2233
2233
|
url: w,
|
|
2234
|
-
method:
|
|
2234
|
+
method: m,
|
|
2235
2235
|
data: k,
|
|
2236
2236
|
signal: T,
|
|
2237
2237
|
cancelToken: A,
|
|
@@ -2242,7 +2242,7 @@ const Wt = (e) => {
|
|
|
2242
2242
|
headers: Ne,
|
|
2243
2243
|
withCredentials: ye = "same-origin",
|
|
2244
2244
|
fetchOptions: Ze
|
|
2245
|
-
} =
|
|
2245
|
+
} = Jt(h), Xe = t || fetch;
|
|
2246
2246
|
U = U ? (U + "").toLowerCase() : "text";
|
|
2247
2247
|
let we = bo([T, A && A.toAbortSignal()], B), ie = null;
|
|
2248
2248
|
const G = we && we.unsubscribe && (() => {
|
|
@@ -2250,68 +2250,68 @@ const Wt = (e) => {
|
|
|
2250
2250
|
});
|
|
2251
2251
|
let Qe;
|
|
2252
2252
|
try {
|
|
2253
|
-
if (K && i &&
|
|
2254
|
-
let
|
|
2253
|
+
if (K && i && m !== "get" && m !== "head" && (Qe = await E(Ne, k)) !== 0) {
|
|
2254
|
+
let J = new n(w, {
|
|
2255
2255
|
method: "POST",
|
|
2256
2256
|
body: k,
|
|
2257
2257
|
duplex: "half"
|
|
2258
2258
|
}), te;
|
|
2259
|
-
if (u.isFormData(k) && (te =
|
|
2259
|
+
if (u.isFormData(k) && (te = J.headers.get("content-type")) && Ne.setContentType(te), J.body) {
|
|
2260
2260
|
const [Pe, be] = ct(
|
|
2261
2261
|
Qe,
|
|
2262
2262
|
ke(ut(K))
|
|
2263
2263
|
);
|
|
2264
|
-
k = ft(
|
|
2264
|
+
k = ft(J.body, pt, Pe, be);
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
u.isString(ye) || (ye = ye ? "include" : "omit");
|
|
2268
2268
|
const M = a && "credentials" in n.prototype, Ye = {
|
|
2269
2269
|
...Ze,
|
|
2270
2270
|
signal: we,
|
|
2271
|
-
method:
|
|
2271
|
+
method: m.toUpperCase(),
|
|
2272
2272
|
headers: Ne.normalize().toJSON(),
|
|
2273
2273
|
body: k,
|
|
2274
2274
|
duplex: "half",
|
|
2275
2275
|
credentials: M ? ye : void 0
|
|
2276
2276
|
};
|
|
2277
2277
|
ie = a && new n(w, Ye);
|
|
2278
|
-
let
|
|
2278
|
+
let W = await (a ? Xe(ie, Ze) : Xe(w, Ye));
|
|
2279
2279
|
const et = d && (U === "stream" || U === "response");
|
|
2280
2280
|
if (d && (D || et && G)) {
|
|
2281
|
-
const
|
|
2281
|
+
const J = {};
|
|
2282
2282
|
["status", "statusText", "headers"].forEach((tt) => {
|
|
2283
|
-
|
|
2283
|
+
J[tt] = W[tt];
|
|
2284
2284
|
});
|
|
2285
|
-
const te = u.toFiniteNumber(
|
|
2285
|
+
const te = u.toFiniteNumber(W.headers.get("content-length")), [Pe, be] = D && ct(
|
|
2286
2286
|
te,
|
|
2287
2287
|
ke(ut(D), !0)
|
|
2288
2288
|
) || [];
|
|
2289
|
-
|
|
2290
|
-
ft(
|
|
2289
|
+
W = new s(
|
|
2290
|
+
ft(W.body, pt, Pe, () => {
|
|
2291
2291
|
be && be(), G && G();
|
|
2292
2292
|
}),
|
|
2293
|
-
|
|
2293
|
+
J
|
|
2294
2294
|
);
|
|
2295
2295
|
}
|
|
2296
2296
|
U = U || "text";
|
|
2297
|
-
let en = await f[u.findKey(f, U) || "text"](
|
|
2298
|
-
return !et && G && G(), await new Promise((
|
|
2299
|
-
zt(
|
|
2297
|
+
let en = await f[u.findKey(f, U) || "text"](W, h);
|
|
2298
|
+
return !et && G && G(), await new Promise((J, te) => {
|
|
2299
|
+
zt(J, te, {
|
|
2300
2300
|
data: en,
|
|
2301
|
-
headers: H.from(
|
|
2302
|
-
status:
|
|
2303
|
-
statusText:
|
|
2304
|
-
config:
|
|
2301
|
+
headers: H.from(W.headers),
|
|
2302
|
+
status: W.status,
|
|
2303
|
+
statusText: W.statusText,
|
|
2304
|
+
config: h,
|
|
2305
2305
|
request: ie
|
|
2306
2306
|
});
|
|
2307
2307
|
});
|
|
2308
2308
|
} catch (M) {
|
|
2309
2309
|
throw G && G(), M && M.name === "TypeError" && /Load failed|fetch/i.test(M.message) ? Object.assign(
|
|
2310
|
-
new S("Network Error", S.ERR_NETWORK,
|
|
2310
|
+
new S("Network Error", S.ERR_NETWORK, h, ie),
|
|
2311
2311
|
{
|
|
2312
2312
|
cause: M.cause || M
|
|
2313
2313
|
}
|
|
2314
|
-
) : S.from(M, M && M.code,
|
|
2314
|
+
) : S.from(M, M && M.code, h, ie);
|
|
2315
2315
|
}
|
|
2316
2316
|
};
|
|
2317
2317
|
}, ko = /* @__PURE__ */ new Map(), Kt = (e) => {
|
|
@@ -2392,7 +2392,7 @@ function wt(e) {
|
|
|
2392
2392
|
return Ve(e), e.headers = H.from(e.headers), e.data = Ue.call(
|
|
2393
2393
|
e,
|
|
2394
2394
|
e.transformRequest
|
|
2395
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter ||
|
|
2395
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gt.getAdapter(e.adapter || me.adapter, e)(e).then(function(s) {
|
|
2396
2396
|
return Ve(e), s.data = Ue.call(
|
|
2397
2397
|
e,
|
|
2398
2398
|
e.transformResponse,
|
|
@@ -2509,8 +2509,8 @@ let Q = class {
|
|
|
2509
2509
|
);
|
|
2510
2510
|
a && u.forEach(
|
|
2511
2511
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2512
|
-
(
|
|
2513
|
-
delete a[
|
|
2512
|
+
(h) => {
|
|
2513
|
+
delete a[h];
|
|
2514
2514
|
}
|
|
2515
2515
|
), n.headers = H.concat(o, a);
|
|
2516
2516
|
const c = [];
|
|
@@ -2524,26 +2524,26 @@ let Q = class {
|
|
|
2524
2524
|
});
|
|
2525
2525
|
let d, f = 0, b;
|
|
2526
2526
|
if (!l) {
|
|
2527
|
-
const
|
|
2528
|
-
for (
|
|
2529
|
-
d = d.then(
|
|
2527
|
+
const h = [wt.bind(this), void 0];
|
|
2528
|
+
for (h.unshift(...c), h.push(...i), b = h.length, d = Promise.resolve(n); f < b; )
|
|
2529
|
+
d = d.then(h[f++], h[f++]);
|
|
2530
2530
|
return d;
|
|
2531
2531
|
}
|
|
2532
2532
|
b = c.length;
|
|
2533
2533
|
let E = n;
|
|
2534
2534
|
for (; f < b; ) {
|
|
2535
|
-
const
|
|
2535
|
+
const h = c[f++], w = c[f++];
|
|
2536
2536
|
try {
|
|
2537
|
-
E =
|
|
2538
|
-
} catch (
|
|
2539
|
-
w.call(this,
|
|
2537
|
+
E = h(E);
|
|
2538
|
+
} catch (m) {
|
|
2539
|
+
w.call(this, m);
|
|
2540
2540
|
break;
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
try {
|
|
2544
2544
|
d = wt.call(this, E);
|
|
2545
|
-
} catch (
|
|
2546
|
-
return Promise.reject(
|
|
2545
|
+
} catch (h) {
|
|
2546
|
+
return Promise.reject(h);
|
|
2547
2547
|
}
|
|
2548
2548
|
for (f = 0, b = i.length; f < b; )
|
|
2549
2549
|
d = d.then(i[f++], i[f++]);
|
|
@@ -2551,7 +2551,7 @@ let Q = class {
|
|
|
2551
2551
|
}
|
|
2552
2552
|
getUri(t) {
|
|
2553
2553
|
t = ee(this.defaults, t);
|
|
2554
|
-
const n =
|
|
2554
|
+
const n = Wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2555
2555
|
return jt(n, t.params, t.paramsSerializer);
|
|
2556
2556
|
}
|
|
2557
2557
|
};
|
|
@@ -2740,7 +2740,7 @@ function Qt(e) {
|
|
|
2740
2740
|
return Qt(ee(e, r));
|
|
2741
2741
|
}, n;
|
|
2742
2742
|
}
|
|
2743
|
-
const C = Qt(
|
|
2743
|
+
const C = Qt(me);
|
|
2744
2744
|
C.Axios = Q;
|
|
2745
2745
|
C.CanceledError = ae;
|
|
2746
2746
|
C.CancelToken = Ao;
|
|
@@ -2775,8 +2775,8 @@ const {
|
|
|
2775
2775
|
AxiosHeaders: Ia,
|
|
2776
2776
|
HttpStatusCode: qa,
|
|
2777
2777
|
formToJSON: za,
|
|
2778
|
-
getAdapter:
|
|
2779
|
-
mergeConfig:
|
|
2778
|
+
getAdapter: Wa,
|
|
2779
|
+
mergeConfig: Ja
|
|
2780
2780
|
} = C, Lo = (e) => {
|
|
2781
2781
|
const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
2782
2782
|
return t ? t[2] : null;
|
|
@@ -2796,8 +2796,8 @@ const {
|
|
|
2796
2796
|
let r = `${e}=; max-age=0; path=${s}`;
|
|
2797
2797
|
n && (r += `; domain=${n}`), document.cookie = r;
|
|
2798
2798
|
}, Yt = () => {
|
|
2799
|
-
|
|
2800
|
-
return
|
|
2799
|
+
const e = window.location.hostname;
|
|
2800
|
+
return e === "localhost" ? "localhost" : e.endsWith(".test") || e.endsWith(".io") ? "." + e.split(".").slice(-2).join(".") : e.endsWith(".com.au") ? "." + e.split(".").slice(-3).join(".") : e;
|
|
2801
2801
|
}, De = "bolt-token", ge = Re("auth", () => {
|
|
2802
2802
|
const e = re({
|
|
2803
2803
|
user: null,
|
|
@@ -2892,7 +2892,7 @@ const {
|
|
|
2892
2892
|
}, Vo = { class: "max-w-sm grid gap-y-1 -mt-8" }, Do = { class: "mb-7" }, jo = { class: "text-gray-600" }, Mo = { class: "grid grid-flow-col justify-between mt-1 mb-4" }, Io = {
|
|
2893
2893
|
key: 0,
|
|
2894
2894
|
class: "text-red-600 text-sm mb-2"
|
|
2895
|
-
}, qo = { key: 0 }, zo = { key: 1 },
|
|
2895
|
+
}, qo = { key: 0 }, zo = { key: 1 }, Wo = {
|
|
2896
2896
|
__name: "SparkLoginView",
|
|
2897
2897
|
props: {
|
|
2898
2898
|
logo: {
|
|
@@ -2909,7 +2909,7 @@ const {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
},
|
|
2911
2911
|
setup(e) {
|
|
2912
|
-
const t = Ee(), n = Oe(), s =
|
|
2912
|
+
const t = Ee(), n = Oe(), s = ha(), r = ge(), a = e, o = z(!1), c = z(""), l = async (i) => {
|
|
2913
2913
|
o.value = !0, c.value = "";
|
|
2914
2914
|
try {
|
|
2915
2915
|
await r.login(i);
|
|
@@ -3016,7 +3016,7 @@ const {
|
|
|
3016
3016
|
]);
|
|
3017
3017
|
};
|
|
3018
3018
|
}
|
|
3019
|
-
},
|
|
3019
|
+
}, Jo = {
|
|
3020
3020
|
__name: "SparkLogoutView",
|
|
3021
3021
|
props: {
|
|
3022
3022
|
defaultRedirect: {
|
|
@@ -3270,14 +3270,14 @@ function Ka(e = {}) {
|
|
|
3270
3270
|
{
|
|
3271
3271
|
path: t,
|
|
3272
3272
|
name: "login",
|
|
3273
|
-
component:
|
|
3273
|
+
component: Wo,
|
|
3274
3274
|
props: { logo: a, defaultRedirect: o },
|
|
3275
3275
|
meta: { auth: !1 }
|
|
3276
3276
|
},
|
|
3277
3277
|
{
|
|
3278
3278
|
path: n,
|
|
3279
3279
|
name: "logout",
|
|
3280
|
-
component:
|
|
3280
|
+
component: Jo,
|
|
3281
3281
|
props: { defaultRedirect: t },
|
|
3282
3282
|
meta: { auth: !1 }
|
|
3283
3283
|
},
|
|
@@ -3320,7 +3320,7 @@ function pa(e, t, n, s) {
|
|
|
3320
3320
|
t({ path: n.state.routes.auth });
|
|
3321
3321
|
return;
|
|
3322
3322
|
}
|
|
3323
|
-
o.includes("%") && (o = decodeURIComponent(o)),
|
|
3323
|
+
o.includes("%") && (o = decodeURIComponent(o)), t({
|
|
3324
3324
|
path: n.state.routes.auth,
|
|
3325
3325
|
query: { redirect: o }
|
|
3326
3326
|
});
|
|
@@ -3338,7 +3338,7 @@ function pa(e, t, n, s) {
|
|
|
3338
3338
|
t();
|
|
3339
3339
|
}
|
|
3340
3340
|
}
|
|
3341
|
-
const
|
|
3341
|
+
const ha = Re("sparkApp", () => {
|
|
3342
3342
|
const e = re({
|
|
3343
3343
|
app: "",
|
|
3344
3344
|
icon: "",
|
|
@@ -3417,8 +3417,8 @@ export {
|
|
|
3417
3417
|
Ra as SparkCard,
|
|
3418
3418
|
Oa as SparkDefaultContainer,
|
|
3419
3419
|
sa as SparkForgotPasswordView,
|
|
3420
|
-
|
|
3421
|
-
|
|
3420
|
+
Wo as SparkLoginView,
|
|
3421
|
+
Jo as SparkLogoutView,
|
|
3422
3422
|
As as SparkModalContainer,
|
|
3423
3423
|
Ea as SparkModalDialog,
|
|
3424
3424
|
nt as SparkOverlay,
|
|
@@ -3430,7 +3430,7 @@ export {
|
|
|
3430
3430
|
Ca as setupFontAwesome,
|
|
3431
3431
|
ce as sparkModalService,
|
|
3432
3432
|
Z as sparkOverlayService,
|
|
3433
|
-
|
|
3433
|
+
ha as useSparkAppStore,
|
|
3434
3434
|
ge as useSparkAuthStore,
|
|
3435
3435
|
Ot as useSparkBrandFilterStore,
|
|
3436
3436
|
Za as useSparkNavStore,
|
package/package.json
CHANGED
package/src/plugins/router.js
CHANGED
|
@@ -93,7 +93,7 @@ function processNavigation(to, next, authStore, defaultAuthenticatedRoute) {
|
|
|
93
93
|
if (redirect.includes('%')) {
|
|
94
94
|
redirect = decodeURIComponent(redirect)
|
|
95
95
|
}
|
|
96
|
-
redirect = encodeURIComponent(redirect)
|
|
96
|
+
// redirect = encodeURIComponent(redirect)
|
|
97
97
|
|
|
98
98
|
next({
|
|
99
99
|
path: authStore.state.routes.auth,
|
package/src/utils/cookies.js
CHANGED
|
@@ -38,14 +38,28 @@ export const deleteCookie = (name, options = {}) => {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export const getDomain = () => {
|
|
41
|
-
|
|
42
|
-
// For STAGING: returns .ENV.letsbolt.io
|
|
43
|
-
// For DEV: returns .letsbolt.test
|
|
44
|
-
let reserveSlices = -3
|
|
41
|
+
const hostname = window.location.hostname
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
// Case 1: Pure localhost (localhost:5173)
|
|
44
|
+
if (hostname === 'localhost') {
|
|
45
|
+
return 'localhost'
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
// Case 2: .test domain (web.bolt.test, dash.bolt.test:8080) -> .bolt.test
|
|
49
|
+
if (hostname.endsWith('.test')) {
|
|
50
|
+
return '.' + hostname.split('.').slice(-2).join('.')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Case 3: Staging .io domain (alpha.letsbolt.io, buzz.letsbolt.io) -> .letsbolt.io
|
|
54
|
+
if (hostname.endsWith('.io')) {
|
|
55
|
+
return '.' + hostname.split('.').slice(-2).join('.')
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Case 4: Production .com.au domain (letsbolt.com.au, buzz.letsbolt.com.au) -> .letsbolt.com.au
|
|
59
|
+
if (hostname.endsWith('.com.au')) {
|
|
60
|
+
return '.' + hostname.split('.').slice(-3).join('.')
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Fallback: return hostname as-is
|
|
64
|
+
return hostname
|
|
51
65
|
}
|