ss-component-new 1.1.18 → 1.1.20
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/array-BJkGW7C1.js +3307 -0
- package/dist/index-BclS1yqg.js +162 -0
- package/dist/{index-BFdnTJMh.js → index-CYJSOYY9.js} +42 -47
- package/dist/index-V133QAT6.js +339 -0
- package/dist/{index-MSbODhhD.js → index-fopmc0W_.js} +7 -7
- package/dist/{main-U3be2-RR.js → main-BGSsmnG3.js} +20 -20
- package/dist/{menu-hS9inuNL.js → menu-V9qTN_Cu.js} +98 -90
- package/dist/{modelComp-Eh2O6nl8.js → modelComp-BHNLY0cK.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component.umd.cjs +14 -14
- package/package.json +2 -1
- package/dist/array-DLhSgLgc.js +0 -3394
- package/dist/index-DM0qZDHo.js +0 -111
- package/dist/index-DjrQsQms.js +0 -242
|
@@ -0,0 +1,3307 @@
|
|
|
1
|
+
import { ref as B, onMounted as jn, watch as de, createElementBlock as Q, openBlock as K, createElementVNode as L, createBlock as Be, createVNode as Y, Fragment as je, renderList as $e, normalizeStyle as Lt, toDisplayString as Z, createSlots as $n, withCtx as ce, createCommentVNode as en, resolveComponent as Ge, createTextVNode as Ue, unref as tn, resolveDynamicComponent as Et } from "vue";
|
|
2
|
+
import { g as Ln, a as qn, d as nn, c as v, _ as Re, s as Ee, E as Mn, u as Jn } from "./menu-V9qTN_Cu.js";
|
|
3
|
+
import { u as Ye } from "./modelComp-BHNLY0cK.js";
|
|
4
|
+
import { s as Te, a as zn, b as et, E as Ne } from "./index-fopmc0W_.js";
|
|
5
|
+
const qt = (e, t) => {
|
|
6
|
+
const n = e.storage || sessionStorage, r = e.key || t.$id;
|
|
7
|
+
if (e.paths) {
|
|
8
|
+
const s = e.paths.reduce((o, a) => (o[a] = t.$state[a], o), {});
|
|
9
|
+
n.setItem(r, JSON.stringify(s));
|
|
10
|
+
} else
|
|
11
|
+
n.setItem(r, JSON.stringify(t.$state));
|
|
12
|
+
};
|
|
13
|
+
var Hn = ({ options: e, store: t }) => {
|
|
14
|
+
var n, r, s, o;
|
|
15
|
+
if ((n = e.persist) != null && n.enabled) {
|
|
16
|
+
const a = [{
|
|
17
|
+
key: t.$id,
|
|
18
|
+
storage: sessionStorage
|
|
19
|
+
}], l = (s = (r = e.persist) == null ? void 0 : r.strategies) != null && s.length ? (o = e.persist) == null ? void 0 : o.strategies : a;
|
|
20
|
+
l.forEach((d) => {
|
|
21
|
+
const f = d.storage || sessionStorage, y = d.key || t.$id, i = f.getItem(y);
|
|
22
|
+
i && (t.$patch(JSON.parse(i)), qt(d, t));
|
|
23
|
+
}), t.$subscribe(() => {
|
|
24
|
+
l.forEach((d) => {
|
|
25
|
+
qt(d, t);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const he = Ln() || qn();
|
|
31
|
+
he.use(Hn);
|
|
32
|
+
const rn = nn("formToTableComp", {
|
|
33
|
+
state: () => ({
|
|
34
|
+
selectArray: [],
|
|
35
|
+
selectString: ""
|
|
36
|
+
}),
|
|
37
|
+
actions: {
|
|
38
|
+
setSelectArray(e) {
|
|
39
|
+
this.selectArray = e;
|
|
40
|
+
},
|
|
41
|
+
setSelectString(e) {
|
|
42
|
+
this.selectString = e;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}), In = nn("unit", {
|
|
46
|
+
state: () => ({
|
|
47
|
+
selectIndex: "",
|
|
48
|
+
selectMenu: "",
|
|
49
|
+
selectTitle: []
|
|
50
|
+
}),
|
|
51
|
+
actions: {
|
|
52
|
+
setSelectIndex(e) {
|
|
53
|
+
this.selectIndex = e;
|
|
54
|
+
},
|
|
55
|
+
setSelectMenu(e) {
|
|
56
|
+
this.selectMenu = e;
|
|
57
|
+
},
|
|
58
|
+
setSelectTitle(e) {
|
|
59
|
+
this.selectTitle = e;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}), Vn = (e, t) => {
|
|
63
|
+
const n = t == null ? void 0 : t.split("-");
|
|
64
|
+
return sn(e, n);
|
|
65
|
+
}, sn = (e, t) => {
|
|
66
|
+
var s;
|
|
67
|
+
let n = e, r = t;
|
|
68
|
+
return Array.isArray(n) ? n = n == null ? void 0 : n[parseInt(v(r == null ? void 0 : r[0]))] : Array.isArray(n == null ? void 0 : n.children) && (n = (s = n == null ? void 0 : n.children) == null ? void 0 : s[parseInt(v(r == null ? void 0 : r[0]))]), r == null || r.shift(), (r == null ? void 0 : r.length) > 0 && (n = sn(n, r)), n;
|
|
69
|
+
}, on = (e, t) => {
|
|
70
|
+
let n = e, r = t == null ? void 0 : t.filter((s) => (s == null ? void 0 : s.prop) !== "index");
|
|
71
|
+
return Array.isArray(n) && (n = n == null ? void 0 : n.map((s, o) => {
|
|
72
|
+
if (Array.isArray(s)) {
|
|
73
|
+
let a = {};
|
|
74
|
+
return s = s == null ? void 0 : s.forEach((l, d) => {
|
|
75
|
+
var f;
|
|
76
|
+
(f = r == null ? void 0 : r[d]) != null && f.prop ? a[r[d].prop] = l : Array.isArray(l) && (a.children = on(l, r));
|
|
77
|
+
}), Object.assign(a, { id: o });
|
|
78
|
+
} else
|
|
79
|
+
return s;
|
|
80
|
+
})), n;
|
|
81
|
+
}, Wn = { class: "table-content" }, Kn = { class: "extra-header" }, Gn = ["onClick"], Xn = ["onClick"], Zn = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "dialog-footer"
|
|
84
|
+
}, Qn = {
|
|
85
|
+
__name: "index",
|
|
86
|
+
props: {
|
|
87
|
+
itemData: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: () => []
|
|
90
|
+
},
|
|
91
|
+
childItemData: {
|
|
92
|
+
type: Array,
|
|
93
|
+
default: () => []
|
|
94
|
+
},
|
|
95
|
+
index: Number
|
|
96
|
+
},
|
|
97
|
+
emits: ["change", "contentChange"],
|
|
98
|
+
setup(e, { emit: t }) {
|
|
99
|
+
const n = e, r = t, s = B([]), o = B([]), a = B(""), l = B(), d = B(!0), f = B(0), y = B(!1), i = B(""), _ = B(!1), w = B([]), g = B(!1), A = B([]), u = B([]), h = B(), p = B(), R = rn(he), b = B(), m = In(he), { selectIndex: E, selectMenu: S, selectTitle: D } = Ee(m), { selectString: N } = Ee(R), T = B(720), G = () => {
|
|
100
|
+
_.value = !1;
|
|
101
|
+
}, F = (O) => {
|
|
102
|
+
var U, V, x, $, J;
|
|
103
|
+
if (M(O), O != null && O.children && Array.isArray(O == null ? void 0 : O.children)) {
|
|
104
|
+
const q = D.value;
|
|
105
|
+
q.push({ key: S.value === "" ? (U = O == null ? void 0 : O.id) == null ? void 0 : U.toString() : S.value + "-" + ((V = O == null ? void 0 : O.id) == null ? void 0 : V.toString()), value: O[(x = Object.keys(O)) == null ? void 0 : x.filter((W) => W !== "index" && W !== "id")[0]] }), m.setSelectMenu(S.value === "" ? ($ = O == null ? void 0 : O.id) == null ? void 0 : $.toString() : S.value + "-" + ((J = O == null ? void 0 : O.id) == null ? void 0 : J.toString())), m.setSelectTitle(q), m.setSelectIndex(n != null && n.index ? n == null ? void 0 : n.index.toString() : "");
|
|
106
|
+
}
|
|
107
|
+
}, M = (O) => {
|
|
108
|
+
var U, V, x;
|
|
109
|
+
if (O != null && O.children && Array.isArray(O == null ? void 0 : O.children)) {
|
|
110
|
+
let $ = [];
|
|
111
|
+
const J = (U = v(h.value)) == null ? void 0 : U.filter((q) => (q == null ? void 0 : q.prop) !== "index");
|
|
112
|
+
(V = O == null ? void 0 : O.children) == null || V.forEach((q, W) => {
|
|
113
|
+
if (!Array.isArray(q))
|
|
114
|
+
$.push(q);
|
|
115
|
+
else {
|
|
116
|
+
let ae = {};
|
|
117
|
+
q == null || q.forEach((le, Ce) => {
|
|
118
|
+
var xe;
|
|
119
|
+
(xe = J == null ? void 0 : J[Ce]) != null && xe.prop ? ae[J[Ce].prop] = le : Array.isArray(le) && (ae.children = le);
|
|
120
|
+
}), $.push(Object.assign(ae, { id: W }));
|
|
121
|
+
}
|
|
122
|
+
}), s.value = (x = v(s.value)) == null ? void 0 : x.filter((q) => (q == null ? void 0 : q.prop) !== "index"), o.value = $;
|
|
123
|
+
}
|
|
124
|
+
}, z = (O, U) => {
|
|
125
|
+
var V, x;
|
|
126
|
+
if (a.value = "", g.value = !0, d.value = !0, O === "删除") {
|
|
127
|
+
const $ = (V = v(o.value)) == null ? void 0 : V.filter((J) => (J == null ? void 0 : J.id) === (U == null ? void 0 : U.id));
|
|
128
|
+
o.value = (x = v(o.value)) == null ? void 0 : x.filter((J) => (J == null ? void 0 : J.id) !== (U == null ? void 0 : U.id)), k(), r("change", {
|
|
129
|
+
content: $,
|
|
130
|
+
index: n == null ? void 0 : n.index,
|
|
131
|
+
buttonName: O
|
|
132
|
+
});
|
|
133
|
+
} else O === "新增" ? (i.value = "新增", H(""), _.value = !0) : O === "编辑" ? (i.value = "编辑", H(U), _.value = !0) : O === "详情" && (i.value = "详情", H(U), g.value = !1, d.value = !1, _.value = !0);
|
|
134
|
+
}, H = (O) => {
|
|
135
|
+
var V;
|
|
136
|
+
const U = [];
|
|
137
|
+
(V = v(s.value)) == null || V.forEach((x, $) => {
|
|
138
|
+
x.label !== "" && (x == null ? void 0 : x.label) !== "操作" && U.push({
|
|
139
|
+
label: (x == null ? void 0 : x.label) ?? "",
|
|
140
|
+
name: (x == null ? void 0 : x.prop) ?? "t" + $,
|
|
141
|
+
type: !(x != null && x.type) || (x == null ? void 0 : x.type) === "" ? "Input" : x == null ? void 0 : x.type,
|
|
142
|
+
value: (O == null ? void 0 : O[x == null ? void 0 : x.prop]) ?? "",
|
|
143
|
+
id: (x == null ? void 0 : x.id) ?? $,
|
|
144
|
+
contents: (x == null ? void 0 : x.options) ?? [],
|
|
145
|
+
width: 1
|
|
146
|
+
});
|
|
147
|
+
}), O === "" || !O || (a.value = O == null ? void 0 : O.id), u.value = U;
|
|
148
|
+
};
|
|
149
|
+
jn(() => {
|
|
150
|
+
});
|
|
151
|
+
const I = () => {
|
|
152
|
+
let O = v(o.value);
|
|
153
|
+
a.value === "" ? (f.value++, O.push(Object.assign(p.value, { id: f.value }))) : O = O == null ? void 0 : O.map((U) => ((U == null ? void 0 : U.id) === a.value && (U = Object.assign(U, p.value)), U)), o.value = O, k(), _.value = !1, r("change", {
|
|
154
|
+
content: O == null ? void 0 : O[O.length - 1],
|
|
155
|
+
index: n == null ? void 0 : n.index,
|
|
156
|
+
buttonName: i.value
|
|
157
|
+
});
|
|
158
|
+
}, k = () => {
|
|
159
|
+
let O = v(n.itemData);
|
|
160
|
+
O = O == null ? void 0 : O.map((U) => ((U == null ? void 0 : U.key) === "tableContents" && (U.contents = o.value), U)), r("contentChange", {
|
|
161
|
+
contents: O,
|
|
162
|
+
index: n.index
|
|
163
|
+
});
|
|
164
|
+
}, oe = (O) => {
|
|
165
|
+
p.value = O;
|
|
166
|
+
};
|
|
167
|
+
return de(
|
|
168
|
+
() => [n.itemData, N.value, E.value, S.value],
|
|
169
|
+
() => {
|
|
170
|
+
var ae, le, Ce, xe, Ot, Tt, _t, At, Ct, xt, Dt, Nt, Ft, Pt, Ut, Bt, jt, $t;
|
|
171
|
+
const O = (ae = v(n.itemData)) == null ? void 0 : ae.filter((P) => (P == null ? void 0 : P.key) === "header"), U = (le = v(n.itemData)) == null ? void 0 : le.find((P) => (P == null ? void 0 : P.key) === "page"), V = (Ce = v(n.itemData)) == null ? void 0 : Ce.find((P) => (P == null ? void 0 : P.key) === "rowButton"), x = (xe = v(n.itemData)) == null ? void 0 : xe.find((P) => (P == null ? void 0 : P.key) === "extraButton"), $ = (Ot = v(n.itemData)) == null ? void 0 : Ot.filter((P) => (P == null ? void 0 : P.key) === "tableContents"), J = (Tt = v(n.itemData)) == null ? void 0 : Tt.filter((P) => (P == null ? void 0 : P.key) === "tableIndex");
|
|
172
|
+
y.value = (U == null ? void 0 : U.contents) ?? !0;
|
|
173
|
+
let q = [];
|
|
174
|
+
N.value === "" ? q = O == null ? void 0 : O[0] : q = (O == null ? void 0 : O.find((P) => (P == null ? void 0 : P.selectLabel) === "(" + N.value + ")")) ?? (O == null ? void 0 : O.find((P) => !(P != null && P.selectLabel)));
|
|
175
|
+
let W = [];
|
|
176
|
+
if (N.value === "" ? W = J == null ? void 0 : J[0] : W = (J == null ? void 0 : J.find((P) => (P == null ? void 0 : P.selectLabel) === "(" + N.value + ")")) ?? (J == null ? void 0 : J.find((P) => !(P != null && P.selectLabel))), ((_t = q == null ? void 0 : q.contents) == null ? void 0 : _t.length) > 0) {
|
|
177
|
+
const P = [];
|
|
178
|
+
W != null && W.contents && ((At = W == null ? void 0 : W.contents) == null ? void 0 : At.length) !== 0 && P.push({
|
|
179
|
+
label: "",
|
|
180
|
+
prop: "index",
|
|
181
|
+
sortable: !1
|
|
182
|
+
}), (Ct = q == null ? void 0 : q.contents) == null || Ct.forEach((C, fe) => {
|
|
183
|
+
(C == null ? void 0 : C.label) !== "" && P.push({
|
|
184
|
+
label: (C == null ? void 0 : C.label) ?? "",
|
|
185
|
+
prop: (C == null ? void 0 : C.label) === "操作" ? "operate" : (C == null ? void 0 : C.prop) ?? "a" + fe,
|
|
186
|
+
width: C != null && C.width ? parseInt(C.width) : "",
|
|
187
|
+
fixed: (C == null ? void 0 : C.fixed) ?? void 0,
|
|
188
|
+
sortable: (C == null ? void 0 : C.sortable) ?? !1,
|
|
189
|
+
align: (C == null ? void 0 : C.align) ?? "center",
|
|
190
|
+
showOverflowTooltip: (C == null ? void 0 : C.showOverflowTooltip) ?? !0,
|
|
191
|
+
isNotDrag: (C == null ? void 0 : C.isNotDrag) ?? !1,
|
|
192
|
+
isEditCol: (C == null ? void 0 : C.isEditCol) ?? !1,
|
|
193
|
+
isOperate: (C == null ? void 0 : C.isOperate) ?? !1,
|
|
194
|
+
id: (C == null ? void 0 : C.id) ?? fe,
|
|
195
|
+
type: (C == null ? void 0 : C.label) === "操作" ? "operate" : void 0
|
|
196
|
+
});
|
|
197
|
+
}), s.value = P;
|
|
198
|
+
let ye = (Dt = (xt = v(s.value)) == null ? void 0 : xt.filter((C) => (C == null ? void 0 : C.type) !== "operate")) == null ? void 0 : Dt.map((C, fe) => ({
|
|
199
|
+
prop: (C == null ? void 0 : C.prop) ?? "a" + fe
|
|
200
|
+
}));
|
|
201
|
+
h.value = ye;
|
|
202
|
+
let me = [];
|
|
203
|
+
if (N.value === "" ? me = $ == null ? void 0 : $[0] : me = ($ == null ? void 0 : $.find((C) => (C == null ? void 0 : C.selectLabel) === "(" + N.value + ")")) ?? ($ == null ? void 0 : $.find((C) => !(C != null && C.selectLabel))), ((Nt = me == null ? void 0 : me.contents) == null ? void 0 : Nt.length) !== 0) {
|
|
204
|
+
let C = v(me == null ? void 0 : me.contents);
|
|
205
|
+
W != null && W.contents && ((Ft = W == null ? void 0 : W.contents) == null ? void 0 : Ft.length) !== 0 && (C = (Pt = v(C)) == null ? void 0 : Pt.map((ie, it) => {
|
|
206
|
+
var we, Oe;
|
|
207
|
+
if (!Array.isArray(ie)) {
|
|
208
|
+
let De = {};
|
|
209
|
+
for (let be in ie)
|
|
210
|
+
be !== "id" && be !== "index" && (De[be] = ie[be]);
|
|
211
|
+
ie = Object.values(De);
|
|
212
|
+
}
|
|
213
|
+
return ie.unshift(((Oe = (we = W == null ? void 0 : W.contents) == null ? void 0 : we[it]) == null ? void 0 : Oe.label) ?? ""), ie;
|
|
214
|
+
}));
|
|
215
|
+
const fe = [];
|
|
216
|
+
C == null || C.forEach((ie, it) => {
|
|
217
|
+
let we = {};
|
|
218
|
+
ie == null || ie.forEach((Oe, De) => {
|
|
219
|
+
var be;
|
|
220
|
+
(be = ye == null ? void 0 : ye[De]) != null && be.prop ? we[ye[De].prop] = Oe : Array.isArray(Oe) && (we.children = on(Oe, ye));
|
|
221
|
+
}), fe.push(Object.assign(we, { id: it }));
|
|
222
|
+
}), o.value = fe;
|
|
223
|
+
} else {
|
|
224
|
+
let C = (Ut = v(ye)) == null ? void 0 : Ut.reduce((fe, ie) => (fe[ie.prop] = "测试数据", fe), {});
|
|
225
|
+
l.value = C, o.value = [Object.assign({}, l.value, { id: f.value })];
|
|
226
|
+
}
|
|
227
|
+
} else
|
|
228
|
+
s.value = [], o.value = [];
|
|
229
|
+
if (((Bt = V == null ? void 0 : V.contents) == null ? void 0 : Bt.length) > 0 ? w.value = V == null ? void 0 : V.contents : w.value = [], ((jt = x == null ? void 0 : x.contents) == null ? void 0 : jt.length) > 0 ? A.value = x == null ? void 0 : x.contents : A.value = [], f.value = (($t = o == null ? void 0 : o.value) == null ? void 0 : $t.length) ?? 0, E.value !== "") {
|
|
230
|
+
b.value = o.value;
|
|
231
|
+
const P = Vn(v(o.value), S.value);
|
|
232
|
+
M(P);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{ deep: !0, immediate: !0 }
|
|
236
|
+
), (O, U) => {
|
|
237
|
+
var V;
|
|
238
|
+
return K(), Q("div", Wn, [
|
|
239
|
+
L("div", Kn, [
|
|
240
|
+
(K(!0), Q(je, null, $e(A.value, (x, $) => (K(), Q("div", {
|
|
241
|
+
class: "extra-contents",
|
|
242
|
+
key: $
|
|
243
|
+
}, [
|
|
244
|
+
L("div", {
|
|
245
|
+
class: "extra-content",
|
|
246
|
+
style: Lt({ background: x == null ? void 0 : x.background }),
|
|
247
|
+
onClick: (J) => z(x == null ? void 0 : x.label, "")
|
|
248
|
+
}, Z(x == null ? void 0 : x.label), 13, Gn)
|
|
249
|
+
]))), 128))
|
|
250
|
+
]),
|
|
251
|
+
(K(), Be(Te, {
|
|
252
|
+
columns: s.value,
|
|
253
|
+
key: s.value,
|
|
254
|
+
tableData: o.value,
|
|
255
|
+
isShowPagination: y.value,
|
|
256
|
+
isShowEdit: !1,
|
|
257
|
+
isShowDelete: !1,
|
|
258
|
+
onDbClickRow: F
|
|
259
|
+
}, $n({ _: 2 }, [
|
|
260
|
+
((V = w.value) == null ? void 0 : V.length) > 0 ? {
|
|
261
|
+
name: "actions",
|
|
262
|
+
fn: ce(({ item: x }) => [
|
|
263
|
+
(K(!0), Q(je, null, $e(w.value, ($, J) => (K(), Q("div", { key: J }, [
|
|
264
|
+
L("div", {
|
|
265
|
+
style: Lt({ color: $ == null ? void 0 : $.textColor }),
|
|
266
|
+
class: "extra-button-label",
|
|
267
|
+
onClick: (q) => z($ == null ? void 0 : $.label, x)
|
|
268
|
+
}, Z($ == null ? void 0 : $.label), 13, Xn)
|
|
269
|
+
]))), 128))
|
|
270
|
+
]),
|
|
271
|
+
key: "0"
|
|
272
|
+
} : void 0
|
|
273
|
+
]), 1032, ["columns", "tableData", "isShowPagination"])),
|
|
274
|
+
Y(zn, {
|
|
275
|
+
title: i.value,
|
|
276
|
+
visible: _.value,
|
|
277
|
+
width: T.value,
|
|
278
|
+
onBeforeDestroy: G
|
|
279
|
+
}, {
|
|
280
|
+
default: ce(() => [
|
|
281
|
+
Y(et, {
|
|
282
|
+
rowContents: u.value,
|
|
283
|
+
isEnableWrap: !1,
|
|
284
|
+
onChange: oe,
|
|
285
|
+
isEdit: d.value
|
|
286
|
+
}, null, 8, ["rowContents", "isEdit"])
|
|
287
|
+
]),
|
|
288
|
+
footer: ce(() => [
|
|
289
|
+
g.value ? (K(), Q("div", Zn, [
|
|
290
|
+
L("div", {
|
|
291
|
+
onClick: U[0] || (U[0] = (x) => _.value = !1),
|
|
292
|
+
class: "cancel-button"
|
|
293
|
+
}, Z("取消")),
|
|
294
|
+
L("div", {
|
|
295
|
+
class: "ok-button",
|
|
296
|
+
onClick: I
|
|
297
|
+
}, Z("确认"))
|
|
298
|
+
])) : en("", !0)
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
}, 8, ["title", "visible", "width"])
|
|
302
|
+
]);
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
}, Yn = /* @__PURE__ */ Re(Qn, [["__scopeId", "data-v-046353b1"]]), Je = [
|
|
306
|
+
{
|
|
307
|
+
key: "单选",
|
|
308
|
+
value: "Select"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
key: "日期",
|
|
312
|
+
value: "Date"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
key: "长文本",
|
|
316
|
+
value: "TextArea"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
key: "上传",
|
|
320
|
+
value: "Upload"
|
|
321
|
+
}
|
|
322
|
+
], er = (e) => e.match(/\((.*)\)/)[1], tr = { class: "form-content" }, nr = {
|
|
323
|
+
__name: "index",
|
|
324
|
+
props: {
|
|
325
|
+
itemData: {
|
|
326
|
+
type: Array,
|
|
327
|
+
default: () => []
|
|
328
|
+
},
|
|
329
|
+
childItemData: {
|
|
330
|
+
type: Array,
|
|
331
|
+
default: () => []
|
|
332
|
+
},
|
|
333
|
+
index: Number
|
|
334
|
+
},
|
|
335
|
+
emits: ["change", "contentChange"],
|
|
336
|
+
setup(e, { emit: t }) {
|
|
337
|
+
const n = e, r = t, s = B([]), o = B(!1), a = B([]), l = rn(he), d = B(), f = (i) => {
|
|
338
|
+
var u, h, p, R;
|
|
339
|
+
const _ = (h = (u = v(n.itemData)) == null ? void 0 : u.find((b) => (b == null ? void 0 : b.key) === "formContent")) == null ? void 0 : h.contents, w = v(i.content);
|
|
340
|
+
let g = {};
|
|
341
|
+
w && ((p = Object.values(w)) == null ? void 0 : p.length) > 0 && ((R = Object.values(w)) == null || R.forEach((b, m) => {
|
|
342
|
+
g[_[m].key] = b;
|
|
343
|
+
}));
|
|
344
|
+
const A = {
|
|
345
|
+
content: g,
|
|
346
|
+
index: n == null ? void 0 : n.index,
|
|
347
|
+
buttonName: i == null ? void 0 : i.buttonName
|
|
348
|
+
};
|
|
349
|
+
r("change", A);
|
|
350
|
+
}, y = (i) => {
|
|
351
|
+
var g, A;
|
|
352
|
+
if (!i) return;
|
|
353
|
+
if (((g = Object.values(v(i))) == null ? void 0 : g.length) > 0) {
|
|
354
|
+
const u = (A = Object.values(v(i))) == null ? void 0 : A.map((p) => p);
|
|
355
|
+
let h = "";
|
|
356
|
+
u == null || u.forEach((p) => {
|
|
357
|
+
p !== "" && p !== void 0 && (h = h === "" ? p : h + "/" + p);
|
|
358
|
+
}), l.setSelectArray(u), l.setSelectString(h);
|
|
359
|
+
}
|
|
360
|
+
const _ = v(n.itemData), w = _ == null ? void 0 : _.map((u) => {
|
|
361
|
+
var h;
|
|
362
|
+
return (u == null ? void 0 : u.key) === "formContent" && ((h = u.contents) == null || h.map((p, R) => {
|
|
363
|
+
var b, m, E, S, D, N, T, G, F, M, z, H, I;
|
|
364
|
+
return p.type = (E = (m = (b = p == null ? void 0 : p.key.split("$")) == null ? void 0 : b[1]) == null ? void 0 : m.split("(")) != null && E[0] ? (S = Je == null ? void 0 : Je.find((k) => {
|
|
365
|
+
var oe, O, U;
|
|
366
|
+
return (k == null ? void 0 : k.key) === ((U = (O = (oe = p == null ? void 0 : p.key.split("$")) == null ? void 0 : oe[1]) == null ? void 0 : O.split("(")) == null ? void 0 : U[0]);
|
|
367
|
+
})) == null ? void 0 : S.value : "text", p.options = ((N = (D = p == null ? void 0 : p.key.split("$")) == null ? void 0 : D[1]) == null ? void 0 : N.length) > 0 ? (G = er((T = p == null ? void 0 : p.key.split("$")) == null ? void 0 : T[1])) == null ? void 0 : G.split(",") : [], p != null && p.key.includes("$") && (p.key = (F = p == null ? void 0 : p.key.split("$")) == null ? void 0 : F[0]), p.value = Array.isArray((M = Object.values(i)) == null ? void 0 : M[R]) ? (H = (z = Object.values(i)) == null ? void 0 : z[R]) == null ? void 0 : H[0] : (I = Object.values(i)) == null ? void 0 : I[R], p;
|
|
368
|
+
})), u;
|
|
369
|
+
});
|
|
370
|
+
r("contentChange", {
|
|
371
|
+
contents: w,
|
|
372
|
+
index: n.index
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
return de(
|
|
376
|
+
() => n.itemData,
|
|
377
|
+
() => {
|
|
378
|
+
var A, u, h, p, R, b, m, E, S, D;
|
|
379
|
+
const i = (A = v(n.itemData)) == null ? void 0 : A.find((N) => (N == null ? void 0 : N.key) === "formContent"), _ = (u = v(n.itemData)) == null ? void 0 : u.find((N) => (N == null ? void 0 : N.key) === "formButton"), w = (h = v(n.itemData)) == null ? void 0 : h.find((N) => (N == null ? void 0 : N.key) === "formFlex"), g = (p = v(n.itemData)) == null ? void 0 : p.find((N) => (N == null ? void 0 : N.key) === "formWrap");
|
|
380
|
+
if ((g == null ? void 0 : g.contents) === "纵向" ? o.value = !1 : o.value = !0, d.value = typeof (w == null ? void 0 : w.contents) != "boolean" ? !(!(w != null && w.contents) === "" || ((R = w == null ? void 0 : w.contents) == null ? void 0 : R.toUpperCase()) === "VERTICAL") : w == null ? void 0 : w.contents, ((b = i == null ? void 0 : i.contents) == null ? void 0 : b.length) > 0) {
|
|
381
|
+
const N = [];
|
|
382
|
+
(m = i == null ? void 0 : i.contents) == null || m.forEach((F, M) => {
|
|
383
|
+
var z, H, I, k, oe, O, U, V, x;
|
|
384
|
+
if ((F == null ? void 0 : F.label) !== "") {
|
|
385
|
+
let $ = (F == null ? void 0 : F.key) ?? "", J = (F == null ? void 0 : F.type) ?? "", q = (F == null ? void 0 : F.options) ?? [];
|
|
386
|
+
if (F != null && F.key.includes("$") && ($ = (z = v(F == null ? void 0 : F.key).split("$")) == null ? void 0 : z[0], ((I = (H = v(F == null ? void 0 : F.key).split("$")) == null ? void 0 : H[1]) == null ? void 0 : I.length) > 0)) {
|
|
387
|
+
const [W, ae] = (oe = (k = v(F == null ? void 0 : F.key).split("$")) == null ? void 0 : k[1]) == null ? void 0 : oe.split(/[()]/);
|
|
388
|
+
J = ((O = Je.find((le) => (le == null ? void 0 : le.key) === W)) == null ? void 0 : O.value) ?? "", ((U = ae == null ? void 0 : ae.split(",")) == null ? void 0 : U.length) > 0 && (q = (V = ae == null ? void 0 : ae.split(",")) == null ? void 0 : V.map((le) => ({
|
|
389
|
+
label: le,
|
|
390
|
+
value: le
|
|
391
|
+
})));
|
|
392
|
+
}
|
|
393
|
+
N.push({
|
|
394
|
+
label: $ ?? "",
|
|
395
|
+
name: "t" + M,
|
|
396
|
+
type: J === "" ? "Input" : J,
|
|
397
|
+
value: (q == null ? void 0 : q.length) > 0 ? (x = q == null ? void 0 : q[0]) == null ? void 0 : x.value : (F == null ? void 0 : F.value) ?? "",
|
|
398
|
+
id: (F == null ? void 0 : F.id) ?? M,
|
|
399
|
+
contents: q ?? [],
|
|
400
|
+
width: (F == null ? void 0 : F.width) ?? 1
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
const T = (E = v(N)) == null ? void 0 : E.map((F) => F.value);
|
|
405
|
+
let G = "";
|
|
406
|
+
T == null || T.forEach((F) => {
|
|
407
|
+
F !== "" && F !== void 0 && (G = G === "" ? F : G + "/" + F);
|
|
408
|
+
}), l.setSelectArray(T), l.setSelectString(G), s.value = N;
|
|
409
|
+
} else
|
|
410
|
+
s.value = [];
|
|
411
|
+
if (((S = _ == null ? void 0 : _.contents) == null ? void 0 : S.length) > 0) {
|
|
412
|
+
const N = [];
|
|
413
|
+
(D = _ == null ? void 0 : _.contents) == null || D.forEach((T, G) => {
|
|
414
|
+
(T == null ? void 0 : T.label) !== "" && N.push({
|
|
415
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
416
|
+
id: (T == null ? void 0 : T.id) ?? G,
|
|
417
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
418
|
+
background: T == null ? void 0 : T.background
|
|
419
|
+
});
|
|
420
|
+
}), a.value = N;
|
|
421
|
+
} else
|
|
422
|
+
a.value = [];
|
|
423
|
+
},
|
|
424
|
+
{ deep: !0, immediate: !0 }
|
|
425
|
+
), (i, _) => (K(), Q("div", tr, [
|
|
426
|
+
Y(et, {
|
|
427
|
+
rowContents: s.value,
|
|
428
|
+
buttonValue: a.value,
|
|
429
|
+
isRowFlex: d.value,
|
|
430
|
+
isEnableWrap: !1,
|
|
431
|
+
onOnButtonClick: f,
|
|
432
|
+
onChange: y,
|
|
433
|
+
isButtonRow: o.value
|
|
434
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
435
|
+
]));
|
|
436
|
+
}
|
|
437
|
+
}, rr = /* @__PURE__ */ Re(nr, [["__scopeId", "data-v-534c109a"]]), sr = { class: "table-operate-content" }, or = { class: "table-operate-item" }, ar = { class: "operate-title" }, lr = { class: "operate-content" }, ir = { class: "operate-title" }, cr = { class: "operate-content" }, ur = { class: "operate-title" }, fr = { class: "operate-content" }, pr = { class: "operate-content" }, dr = {
|
|
438
|
+
__name: "operate",
|
|
439
|
+
props: {
|
|
440
|
+
itemContents: {
|
|
441
|
+
type: Array,
|
|
442
|
+
default: () => []
|
|
443
|
+
},
|
|
444
|
+
originalItemContents: {
|
|
445
|
+
type: Array,
|
|
446
|
+
default: () => []
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
emits: ["change"],
|
|
450
|
+
setup(e, { emit: t }) {
|
|
451
|
+
const n = e, r = t, s = B([]), o = B([]), a = B([]), l = B([{
|
|
452
|
+
label: "按钮名称",
|
|
453
|
+
prop: "label",
|
|
454
|
+
type: "edit"
|
|
455
|
+
}, {
|
|
456
|
+
label: "按钮类型",
|
|
457
|
+
prop: "type",
|
|
458
|
+
type: "edit"
|
|
459
|
+
}, {
|
|
460
|
+
label: "按钮背景颜色",
|
|
461
|
+
prop: "background",
|
|
462
|
+
type: "edit",
|
|
463
|
+
columnType: "Color"
|
|
464
|
+
}, {
|
|
465
|
+
label: "操作",
|
|
466
|
+
prop: "operate",
|
|
467
|
+
type: "operate",
|
|
468
|
+
sortable: !1
|
|
469
|
+
}]), d = B([{
|
|
470
|
+
label: "标签名称",
|
|
471
|
+
prop: "label",
|
|
472
|
+
type: "edit"
|
|
473
|
+
}, {
|
|
474
|
+
label: "标签类型",
|
|
475
|
+
prop: "type",
|
|
476
|
+
type: "edit"
|
|
477
|
+
}, {
|
|
478
|
+
label: "按钮文字颜色",
|
|
479
|
+
prop: "textColor",
|
|
480
|
+
type: "edit",
|
|
481
|
+
columnType: "Color"
|
|
482
|
+
}, {
|
|
483
|
+
label: "操作",
|
|
484
|
+
prop: "operate",
|
|
485
|
+
type: "operate",
|
|
486
|
+
sortable: !1
|
|
487
|
+
}]), f = B([]), y = B(0), i = B([{
|
|
488
|
+
name: "isPagination",
|
|
489
|
+
label: "是否显示分页",
|
|
490
|
+
type: "Switch",
|
|
491
|
+
value: !0
|
|
492
|
+
}]), _ = [{
|
|
493
|
+
label: "标签名",
|
|
494
|
+
prop: "label",
|
|
495
|
+
type: "edit"
|
|
496
|
+
}, {
|
|
497
|
+
label: "属性名",
|
|
498
|
+
prop: "prop",
|
|
499
|
+
type: "edit"
|
|
500
|
+
}, {
|
|
501
|
+
label: "宽度",
|
|
502
|
+
prop: "width",
|
|
503
|
+
type: "edit",
|
|
504
|
+
columnType: "Number"
|
|
505
|
+
}, {
|
|
506
|
+
label: "是否固定列",
|
|
507
|
+
prop: "fixed",
|
|
508
|
+
type: "edit",
|
|
509
|
+
columnType: "Radio",
|
|
510
|
+
contents: [{
|
|
511
|
+
label: "left",
|
|
512
|
+
value: "左"
|
|
513
|
+
}, {
|
|
514
|
+
label: "right",
|
|
515
|
+
value: "右"
|
|
516
|
+
}]
|
|
517
|
+
}, {
|
|
518
|
+
label: "是否支持排序",
|
|
519
|
+
prop: "sortable",
|
|
520
|
+
type: "edit",
|
|
521
|
+
columnType: "Switch"
|
|
522
|
+
}, {
|
|
523
|
+
label: "文本所在位置",
|
|
524
|
+
prop: "align",
|
|
525
|
+
type: "edit",
|
|
526
|
+
columnType: "Radio",
|
|
527
|
+
contents: [{
|
|
528
|
+
label: "left",
|
|
529
|
+
value: "左"
|
|
530
|
+
}, {
|
|
531
|
+
label: "center",
|
|
532
|
+
value: "中"
|
|
533
|
+
}, {
|
|
534
|
+
label: "right",
|
|
535
|
+
value: "右"
|
|
536
|
+
}]
|
|
537
|
+
}, {
|
|
538
|
+
label: "溢出悬浮文字",
|
|
539
|
+
prop: "showOverflowTooltip",
|
|
540
|
+
type: "edit",
|
|
541
|
+
columnType: "Switch"
|
|
542
|
+
}, {
|
|
543
|
+
label: "是否不可拖动",
|
|
544
|
+
prop: "isNotDrag",
|
|
545
|
+
type: "edit",
|
|
546
|
+
columnType: "Switch"
|
|
547
|
+
}, {
|
|
548
|
+
label: "是否可编辑列名",
|
|
549
|
+
//暂不支持
|
|
550
|
+
prop: "isEditCol",
|
|
551
|
+
type: "edit",
|
|
552
|
+
columnType: "Switch"
|
|
553
|
+
}, {
|
|
554
|
+
label: "是否出现在附属界面",
|
|
555
|
+
//暂不支持
|
|
556
|
+
prop: "isOperate",
|
|
557
|
+
type: "edit",
|
|
558
|
+
columnType: "Switch"
|
|
559
|
+
}, {
|
|
560
|
+
label: "操作",
|
|
561
|
+
prop: "operate",
|
|
562
|
+
type: "operate",
|
|
563
|
+
sortable: !1
|
|
564
|
+
}], w = (b) => {
|
|
565
|
+
let m = v(s.value);
|
|
566
|
+
const E = m == null ? void 0 : m.find((S) => S.key === "page");
|
|
567
|
+
(E == null ? void 0 : E.contents) !== void 0 ? m = m == null ? void 0 : m.map((S) => ((S == null ? void 0 : S.key) === "page" && (S.contents = b == null ? void 0 : b.isPagination), S)) : m.push({
|
|
568
|
+
key: "page",
|
|
569
|
+
contents: b == null ? void 0 : b.isPagination
|
|
570
|
+
}), s.value = m;
|
|
571
|
+
};
|
|
572
|
+
de(
|
|
573
|
+
() => n.originalItemContents,
|
|
574
|
+
() => {
|
|
575
|
+
var b, m, E, S, D, N, T, G, F, M, z, H, I;
|
|
576
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (s.value = v(n.originalItemContents), o.value = (m = (b = s.value) == null ? void 0 : b.find((k) => (k == null ? void 0 : k.key) === "header")) == null ? void 0 : m.contents, a.value = (S = (E = s.value) == null ? void 0 : E.find((k) => (k == null ? void 0 : k.key) === "rowButton")) == null ? void 0 : S.contents, l.value = (N = (D = s.value) == null ? void 0 : D.find((k) => (k == null ? void 0 : k.key) === "extraButton")) == null ? void 0 : N.contents, i.value = (G = (T = s.value) == null ? void 0 : T.find((k) => (k == null ? void 0 : k.key) === "page")) != null && G.contents ? [{
|
|
577
|
+
name: "isPagination",
|
|
578
|
+
label: "是否显示分页",
|
|
579
|
+
type: "Switch",
|
|
580
|
+
value: (M = (F = s.value) == null ? void 0 : F.find((k) => (k == null ? void 0 : k.key) === "page")) == null ? void 0 : M.contents
|
|
581
|
+
}] : [{
|
|
582
|
+
name: "isPagination",
|
|
583
|
+
label: "是否显示分页",
|
|
584
|
+
type: "Switch",
|
|
585
|
+
value: !0
|
|
586
|
+
}], o.value = (z = o.value) == null ? void 0 : z.map((k, oe) => k = {
|
|
587
|
+
label: (k == null ? void 0 : k.label) ?? "",
|
|
588
|
+
prop: (k == null ? void 0 : k.label) === "操作" ? "operate" : k == null ? void 0 : k.prop,
|
|
589
|
+
width: k != null && k.width ? parseInt(k.width) : "",
|
|
590
|
+
fixed: (k == null ? void 0 : k.fixed) ?? void 0,
|
|
591
|
+
sortable: (k == null ? void 0 : k.sortable) ?? !1,
|
|
592
|
+
align: (k == null ? void 0 : k.align) ?? "center",
|
|
593
|
+
showOverflowTooltip: (k == null ? void 0 : k.showOverflowTooltip) ?? !0,
|
|
594
|
+
isNotDrag: (k == null ? void 0 : k.isNotDrag) ?? !1,
|
|
595
|
+
isEditCol: (k == null ? void 0 : k.isEditCol) ?? !1,
|
|
596
|
+
isOperate: (k == null ? void 0 : k.isOperate) ?? !1,
|
|
597
|
+
id: (k == null ? void 0 : k.id) ?? oe
|
|
598
|
+
}), a.value = (H = a.value) == null ? void 0 : H.map((k, oe) => k = {
|
|
599
|
+
label: (k == null ? void 0 : k.label) ?? "",
|
|
600
|
+
type: (k == null ? void 0 : k.type) ?? "",
|
|
601
|
+
textColor: (k == null ? void 0 : k.textColor) ?? "#000000",
|
|
602
|
+
id: (k == null ? void 0 : k.id) ?? oe
|
|
603
|
+
}), l.value = (I = l.value) == null ? void 0 : I.map((k, oe) => k = {
|
|
604
|
+
label: (k == null ? void 0 : k.label) ?? "",
|
|
605
|
+
type: (k == null ? void 0 : k.type) ?? "",
|
|
606
|
+
background: (k == null ? void 0 : k.textColor) ?? "#FFFFFF",
|
|
607
|
+
id: (k == null ? void 0 : k.id) ?? oe
|
|
608
|
+
}));
|
|
609
|
+
},
|
|
610
|
+
{ deep: !0, immediate: !0 }
|
|
611
|
+
), de(
|
|
612
|
+
() => i.value,
|
|
613
|
+
() => {
|
|
614
|
+
var E;
|
|
615
|
+
let b = v(s.value);
|
|
616
|
+
const m = b == null ? void 0 : b.find((S) => S.key === "page");
|
|
617
|
+
m != null && m.contents ? b = b == null ? void 0 : b.map((S) => {
|
|
618
|
+
var D;
|
|
619
|
+
return (S == null ? void 0 : S.key) === "page" && (S.contents = (D = i.value) == null ? void 0 : D[0].value), S;
|
|
620
|
+
}) : b.push({
|
|
621
|
+
key: "page",
|
|
622
|
+
contents: (E = i.value) == null ? void 0 : E[0].value
|
|
623
|
+
}), s.value = b;
|
|
624
|
+
},
|
|
625
|
+
{ immediate: !0, deep: !0 }
|
|
626
|
+
);
|
|
627
|
+
const g = () => {
|
|
628
|
+
const b = v(o.value);
|
|
629
|
+
let m = v(s.value);
|
|
630
|
+
b.push({
|
|
631
|
+
label: "",
|
|
632
|
+
prop: "",
|
|
633
|
+
width: "",
|
|
634
|
+
fixed: void 0,
|
|
635
|
+
sortable: !1,
|
|
636
|
+
align: "center",
|
|
637
|
+
showOverflowTooltip: !0,
|
|
638
|
+
isNotDrag: !1,
|
|
639
|
+
isEditCol: !1,
|
|
640
|
+
isOperate: !1,
|
|
641
|
+
id: y.value
|
|
642
|
+
}), o.value = b, y.value++;
|
|
643
|
+
const E = m == null ? void 0 : m.find((S) => (S == null ? void 0 : S.key) === "header");
|
|
644
|
+
E != null && E.contents ? (E.contents = b, m = m == null ? void 0 : m.map((S) => ((S == null ? void 0 : S.key) === "header" && (S.contents = b), S))) : m.push({
|
|
645
|
+
key: "header",
|
|
646
|
+
contents: b
|
|
647
|
+
}), s.value = m;
|
|
648
|
+
}, A = () => {
|
|
649
|
+
const b = v(a.value);
|
|
650
|
+
let m = v(s.value);
|
|
651
|
+
b.push({
|
|
652
|
+
label: "",
|
|
653
|
+
type: "",
|
|
654
|
+
textColor: "#000000",
|
|
655
|
+
id: y.value
|
|
656
|
+
}), a.value = b, y.value++;
|
|
657
|
+
const E = m == null ? void 0 : m.find((S) => (S == null ? void 0 : S.key) === "rowButton");
|
|
658
|
+
E != null && E.contents ? (E.contents = b, m = m == null ? void 0 : m.map((S) => ((S == null ? void 0 : S.key) === "rowButton" && (S.contents = b), S))) : m.push({
|
|
659
|
+
key: "rowButton",
|
|
660
|
+
contents: b
|
|
661
|
+
}), s.value = m;
|
|
662
|
+
}, u = () => {
|
|
663
|
+
const b = v(f.value);
|
|
664
|
+
let m = v(s.value);
|
|
665
|
+
b.push({
|
|
666
|
+
label: "",
|
|
667
|
+
type: "",
|
|
668
|
+
background: "#FFFFFF",
|
|
669
|
+
id: y.value
|
|
670
|
+
}), f.value = b, y.value++;
|
|
671
|
+
const E = m == null ? void 0 : m.find((S) => (S == null ? void 0 : S.key) === "extraButton");
|
|
672
|
+
E != null && E.contents ? (E.contents = b, m = m == null ? void 0 : m.map((S) => ((S == null ? void 0 : S.key) === "extraButton" && (S.contents = b), S))) : m.push({
|
|
673
|
+
key: "extraButton",
|
|
674
|
+
contents: b
|
|
675
|
+
}), s.value = m;
|
|
676
|
+
}, h = (b) => {
|
|
677
|
+
const m = v(a.value);
|
|
678
|
+
let E = v(s.value);
|
|
679
|
+
a.value = m.filter((D) => D.id !== b.id);
|
|
680
|
+
const S = E == null ? void 0 : E.find((D) => D.key === "rowButton");
|
|
681
|
+
S != null && S.contents && (E = E == null ? void 0 : E.map((D) => ((D == null ? void 0 : D.key) === "rowButton" && (D.contents = m.filter((N) => N.id !== b.id)), D))), s.value = E;
|
|
682
|
+
}, p = (b) => {
|
|
683
|
+
const m = v(f.value);
|
|
684
|
+
let E = v(s.value);
|
|
685
|
+
f.value = m.filter((D) => D.id !== b.id);
|
|
686
|
+
const S = E == null ? void 0 : E.find((D) => D.key === "extraButton");
|
|
687
|
+
S != null && S.contents && (E = E == null ? void 0 : E.map((D) => ((D == null ? void 0 : D.key) === "extraButton" && (D.contents = m.filter((N) => N.id !== b.id)), D))), s.value = E;
|
|
688
|
+
}, R = (b) => {
|
|
689
|
+
const m = v(o.value);
|
|
690
|
+
let E = v(s.value);
|
|
691
|
+
o.value = m.filter((D) => D.id !== b.id);
|
|
692
|
+
const S = E == null ? void 0 : E.find((D) => D.key === "header");
|
|
693
|
+
S != null && S.contents && (E = E == null ? void 0 : E.map((D) => ((D == null ? void 0 : D.key) === "header" && (D.contents = m.filter((N) => N.id !== b.id)), D))), s.value = E;
|
|
694
|
+
};
|
|
695
|
+
return de(
|
|
696
|
+
() => [s.value, o.value],
|
|
697
|
+
() => {
|
|
698
|
+
let b = v(s.value);
|
|
699
|
+
const m = b == null ? void 0 : b.find((E) => (E == null ? void 0 : E.key) === "header");
|
|
700
|
+
m != null && m.contents ? (m.contents = o.value, b = b == null ? void 0 : b.map((E) => ((E == null ? void 0 : E.key) === "header" && (E.contents = o.value), E))) : b.push({
|
|
701
|
+
key: "header",
|
|
702
|
+
contents: o.value
|
|
703
|
+
}), r("change", b);
|
|
704
|
+
},
|
|
705
|
+
{ deep: !0, immediate: !0 }
|
|
706
|
+
), (b, m) => {
|
|
707
|
+
const E = Ge("el-button");
|
|
708
|
+
return K(), Q("div", sr, [
|
|
709
|
+
L("div", or, [
|
|
710
|
+
L("div", ar, [
|
|
711
|
+
m[1] || (m[1] = L("div", null, Z("表头"), -1)),
|
|
712
|
+
Y(E, {
|
|
713
|
+
class: "blue-operate-button",
|
|
714
|
+
icon: "ele-Plus",
|
|
715
|
+
onClick: g
|
|
716
|
+
}, {
|
|
717
|
+
default: ce(() => m[0] || (m[0] = [
|
|
718
|
+
Ue(Z("新建"))
|
|
719
|
+
])),
|
|
720
|
+
_: 1
|
|
721
|
+
})
|
|
722
|
+
]),
|
|
723
|
+
L("div", lr, [
|
|
724
|
+
Y(Te, {
|
|
725
|
+
columns: _,
|
|
726
|
+
isShowPagination: !1,
|
|
727
|
+
isShowEdit: !1,
|
|
728
|
+
isMoveColumn: !1,
|
|
729
|
+
tableData: o.value,
|
|
730
|
+
onDeleteRow: R
|
|
731
|
+
}, null, 8, ["tableData"])
|
|
732
|
+
]),
|
|
733
|
+
L("div", ir, [
|
|
734
|
+
m[3] || (m[3] = L("div", null, Z("行内按钮"), -1)),
|
|
735
|
+
Y(E, {
|
|
736
|
+
class: "blue-operate-button",
|
|
737
|
+
icon: "ele-Plus",
|
|
738
|
+
onClick: A
|
|
739
|
+
}, {
|
|
740
|
+
default: ce(() => m[2] || (m[2] = [
|
|
741
|
+
Ue(Z("新建"))
|
|
742
|
+
])),
|
|
743
|
+
_: 1
|
|
744
|
+
})
|
|
745
|
+
]),
|
|
746
|
+
L("div", cr, [
|
|
747
|
+
Y(Te, {
|
|
748
|
+
columns: d.value,
|
|
749
|
+
isShowPagination: !1,
|
|
750
|
+
isShowEdit: !1,
|
|
751
|
+
isMoveColumn: !1,
|
|
752
|
+
tableData: a.value,
|
|
753
|
+
onDeleteRow: h
|
|
754
|
+
}, null, 8, ["columns", "tableData"])
|
|
755
|
+
]),
|
|
756
|
+
L("div", ur, [
|
|
757
|
+
m[5] || (m[5] = L("div", null, Z("表格外部按钮"), -1)),
|
|
758
|
+
Y(E, {
|
|
759
|
+
class: "blue-operate-button",
|
|
760
|
+
icon: "ele-Plus",
|
|
761
|
+
onClick: u
|
|
762
|
+
}, {
|
|
763
|
+
default: ce(() => m[4] || (m[4] = [
|
|
764
|
+
Ue(Z("新建"))
|
|
765
|
+
])),
|
|
766
|
+
_: 1
|
|
767
|
+
})
|
|
768
|
+
]),
|
|
769
|
+
L("div", fr, [
|
|
770
|
+
Y(Te, {
|
|
771
|
+
columns: l.value,
|
|
772
|
+
isShowPagination: !1,
|
|
773
|
+
isShowEdit: !1,
|
|
774
|
+
isMoveColumn: !1,
|
|
775
|
+
tableData: f.value,
|
|
776
|
+
onDeleteRow: p
|
|
777
|
+
}, null, 8, ["columns", "tableData"])
|
|
778
|
+
]),
|
|
779
|
+
m[6] || (m[6] = L("div", { class: "operate-title" }, [
|
|
780
|
+
L("div", null, Z("分页"))
|
|
781
|
+
], -1)),
|
|
782
|
+
L("div", pr, [
|
|
783
|
+
Y(et, {
|
|
784
|
+
rowContents: i.value,
|
|
785
|
+
onChange: w
|
|
786
|
+
}, null, 8, ["rowContents"])
|
|
787
|
+
])
|
|
788
|
+
])
|
|
789
|
+
]);
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
}, hr = /* @__PURE__ */ Re(dr, [["__scopeId", "data-v-877911eb"]]), mr = { class: "form-operate-content" }, yr = { class: "form-operate-item" }, br = { class: "operate-title" }, gr = { class: "operate-content" }, vr = { class: "operate-title" }, kr = { class: "operate-content" }, Er = { class: "operate-content" }, Sr = {
|
|
793
|
+
__name: "operate",
|
|
794
|
+
props: {
|
|
795
|
+
itemContents: {
|
|
796
|
+
type: Array,
|
|
797
|
+
default: () => []
|
|
798
|
+
},
|
|
799
|
+
originalItemContents: {
|
|
800
|
+
type: Array,
|
|
801
|
+
default: () => []
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
emits: ["change"],
|
|
805
|
+
setup(e, { emit: t }) {
|
|
806
|
+
const n = e, r = t, s = B([{
|
|
807
|
+
name: "isRowFlex",
|
|
808
|
+
label: "是否横向布局",
|
|
809
|
+
type: "Switch",
|
|
810
|
+
value: !0
|
|
811
|
+
}]), o = B([{
|
|
812
|
+
label: "字段名称",
|
|
813
|
+
prop: "label",
|
|
814
|
+
type: "edit"
|
|
815
|
+
}, {
|
|
816
|
+
label: "字段类型",
|
|
817
|
+
prop: "type",
|
|
818
|
+
type: "edit"
|
|
819
|
+
}, {
|
|
820
|
+
label: "字段值",
|
|
821
|
+
prop: "key",
|
|
822
|
+
type: "edit"
|
|
823
|
+
}, {
|
|
824
|
+
label: "字段选项值",
|
|
825
|
+
prop: "options",
|
|
826
|
+
type: "edit"
|
|
827
|
+
}, {
|
|
828
|
+
label: "操作",
|
|
829
|
+
prop: "operate",
|
|
830
|
+
type: "operate",
|
|
831
|
+
sortable: !1
|
|
832
|
+
}]), a = B([{
|
|
833
|
+
label: "字段名称",
|
|
834
|
+
prop: "label",
|
|
835
|
+
type: "edit"
|
|
836
|
+
}, {
|
|
837
|
+
label: "字段类型",
|
|
838
|
+
prop: "type",
|
|
839
|
+
type: "edit"
|
|
840
|
+
}, {
|
|
841
|
+
label: "按钮背景颜色",
|
|
842
|
+
prop: "background",
|
|
843
|
+
type: "edit",
|
|
844
|
+
columnType: "Color"
|
|
845
|
+
}, {
|
|
846
|
+
label: "操作",
|
|
847
|
+
prop: "operate",
|
|
848
|
+
type: "operate",
|
|
849
|
+
sortable: !1
|
|
850
|
+
}]), l = B([]), d = B([]), f = B([]), y = B(0);
|
|
851
|
+
de(
|
|
852
|
+
() => n.originalItemContents,
|
|
853
|
+
() => {
|
|
854
|
+
var u, h, p, R, b, m, E, S, D, N;
|
|
855
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (d.value = v(n.originalItemContents), f.value = (h = (u = d.value) == null ? void 0 : u.find((T) => (T == null ? void 0 : T.key) === "formContent")) == null ? void 0 : h.contents, l.value = (R = (p = d.value) == null ? void 0 : p.find((T) => (T == null ? void 0 : T.key) === "formButton")) == null ? void 0 : R.contents, f.value = (b = f.value) == null ? void 0 : b.map((T, G) => T = {
|
|
856
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
857
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
858
|
+
key: (T == null ? void 0 : T.key) ?? "",
|
|
859
|
+
options: (T == null ? void 0 : T.options) ?? "",
|
|
860
|
+
id: (T == null ? void 0 : T.id) ?? G
|
|
861
|
+
}), l.value = (m = l.value) == null ? void 0 : m.map((T, G) => T = {
|
|
862
|
+
label: (T == null ? void 0 : T.label) ?? "",
|
|
863
|
+
type: (T == null ? void 0 : T.type) ?? "",
|
|
864
|
+
background: (T == null ? void 0 : T.background) ?? "#000000",
|
|
865
|
+
id: (T == null ? void 0 : T.id) ?? G
|
|
866
|
+
}), s.value = (S = (E = d.value) == null ? void 0 : E.find((T) => (T == null ? void 0 : T.key) === "formFlex")) != null && S.contents ? [{
|
|
867
|
+
name: "isRowFlex",
|
|
868
|
+
label: "是否横向布局",
|
|
869
|
+
type: "Switch",
|
|
870
|
+
value: (N = (D = d.value) == null ? void 0 : D.find((T) => (T == null ? void 0 : T.key) === "formFlex")) == null ? void 0 : N.contents
|
|
871
|
+
}] : [{
|
|
872
|
+
name: "isRowFlex",
|
|
873
|
+
label: "是否横向布局",
|
|
874
|
+
type: "Switch",
|
|
875
|
+
value: !0
|
|
876
|
+
}]);
|
|
877
|
+
},
|
|
878
|
+
{ deep: !0, immediate: !0 }
|
|
879
|
+
);
|
|
880
|
+
const i = () => {
|
|
881
|
+
const u = v(l.value);
|
|
882
|
+
let h = v(d.value);
|
|
883
|
+
u.push({
|
|
884
|
+
label: "",
|
|
885
|
+
type: "",
|
|
886
|
+
background: "#000000",
|
|
887
|
+
id: y.value
|
|
888
|
+
}), l.value = u, y.value++;
|
|
889
|
+
const p = h == null ? void 0 : h.find((R) => (R == null ? void 0 : R.key) === "formButton");
|
|
890
|
+
p != null && p.contents ? (p.contents = u, h = h == null ? void 0 : h.map((R) => ((R == null ? void 0 : R.key) === "formButton" && (R.contents = u), R))) : h.push({
|
|
891
|
+
key: "formButton",
|
|
892
|
+
contents: u
|
|
893
|
+
}), d.value = h;
|
|
894
|
+
}, _ = () => {
|
|
895
|
+
const u = v(f.value);
|
|
896
|
+
let h = v(d.value);
|
|
897
|
+
u.push({
|
|
898
|
+
label: "",
|
|
899
|
+
type: "",
|
|
900
|
+
key: "",
|
|
901
|
+
options: "",
|
|
902
|
+
id: y.value
|
|
903
|
+
}), f.value = u, y.value++;
|
|
904
|
+
const p = h == null ? void 0 : h.find((R) => (R == null ? void 0 : R.key) === "formContent");
|
|
905
|
+
p != null && p.contents ? (p.contents = u, h = h == null ? void 0 : h.map((R) => ((R == null ? void 0 : R.key) === "formContent" && (R.contents = u), R))) : h.push({
|
|
906
|
+
key: "formContent",
|
|
907
|
+
contents: u
|
|
908
|
+
}), d.value = h;
|
|
909
|
+
}, w = (u) => {
|
|
910
|
+
const h = v(l.value);
|
|
911
|
+
let p = v(d.value);
|
|
912
|
+
l.value = h.filter((b) => b.id !== u.id);
|
|
913
|
+
const R = p == null ? void 0 : p.find((b) => b.key === "formButton");
|
|
914
|
+
R != null && R.contents && (p = p == null ? void 0 : p.map((b) => ((b == null ? void 0 : b.key) === "formButton" && (b.contents = h.filter((m) => m.id !== u.id)), b))), d.value = p;
|
|
915
|
+
}, g = (u) => {
|
|
916
|
+
const h = v(f.value);
|
|
917
|
+
let p = v(d.value);
|
|
918
|
+
f.value = h.filter((b) => b.id !== u.id);
|
|
919
|
+
const R = p == null ? void 0 : p.find((b) => b.key === "formContent");
|
|
920
|
+
R != null && R.contents && (p = p == null ? void 0 : p.map((b) => ((b == null ? void 0 : b.key) === "formContent" && (b.contents = h.filter((m) => m.id !== u.id)), b))), d.value = p;
|
|
921
|
+
}, A = (u) => {
|
|
922
|
+
let h = v(d.value);
|
|
923
|
+
const p = h == null ? void 0 : h.find((R) => R.key === "formFlex");
|
|
924
|
+
(p == null ? void 0 : p.contents) !== void 0 ? h = h == null ? void 0 : h.map((R) => ((R == null ? void 0 : R.key) === "formFlex" && (R.contents = u == null ? void 0 : u.isRowFlex), R)) : h.push({
|
|
925
|
+
key: "formFlex",
|
|
926
|
+
contents: u == null ? void 0 : u.isRowFlex
|
|
927
|
+
}), d.value = h;
|
|
928
|
+
};
|
|
929
|
+
return de(
|
|
930
|
+
() => [d.value, f.value],
|
|
931
|
+
() => {
|
|
932
|
+
let u = v(d.value);
|
|
933
|
+
const h = u == null ? void 0 : u.find((p) => (p == null ? void 0 : p.key) === "formContent");
|
|
934
|
+
h != null && h.contents ? (h.contents = f.value, u = u == null ? void 0 : u.map((p) => ((p == null ? void 0 : p.key) === "formContent" && (p.contents = f.value), p))) : u.push({
|
|
935
|
+
key: "formContent",
|
|
936
|
+
contents: f.value
|
|
937
|
+
}), r("change", u);
|
|
938
|
+
},
|
|
939
|
+
{ deep: !0, immediate: !0 }
|
|
940
|
+
), (u, h) => {
|
|
941
|
+
const p = Ge("el-button");
|
|
942
|
+
return K(), Q("div", mr, [
|
|
943
|
+
L("div", yr, [
|
|
944
|
+
L("div", br, [
|
|
945
|
+
h[1] || (h[1] = L("div", null, Z("表单信息"), -1)),
|
|
946
|
+
Y(p, {
|
|
947
|
+
class: "blue-operate-button",
|
|
948
|
+
icon: "ele-Plus",
|
|
949
|
+
onClick: _
|
|
950
|
+
}, {
|
|
951
|
+
default: ce(() => h[0] || (h[0] = [
|
|
952
|
+
Ue(Z("新建"))
|
|
953
|
+
])),
|
|
954
|
+
_: 1
|
|
955
|
+
})
|
|
956
|
+
]),
|
|
957
|
+
L("div", gr, [
|
|
958
|
+
Y(Te, {
|
|
959
|
+
columns: o.value,
|
|
960
|
+
isShowPagination: !1,
|
|
961
|
+
isShowEdit: !1,
|
|
962
|
+
isMoveColumn: !1,
|
|
963
|
+
tableData: f.value,
|
|
964
|
+
onDeleteRow: g
|
|
965
|
+
}, null, 8, ["columns", "tableData"])
|
|
966
|
+
]),
|
|
967
|
+
L("div", vr, [
|
|
968
|
+
h[3] || (h[3] = L("div", null, Z("表单按钮"), -1)),
|
|
969
|
+
Y(p, {
|
|
970
|
+
class: "blue-operate-button",
|
|
971
|
+
icon: "ele-Plus",
|
|
972
|
+
onClick: i
|
|
973
|
+
}, {
|
|
974
|
+
default: ce(() => h[2] || (h[2] = [
|
|
975
|
+
Ue(Z("新建"))
|
|
976
|
+
])),
|
|
977
|
+
_: 1
|
|
978
|
+
})
|
|
979
|
+
]),
|
|
980
|
+
L("div", kr, [
|
|
981
|
+
Y(Te, {
|
|
982
|
+
columns: a.value,
|
|
983
|
+
isShowPagination: !1,
|
|
984
|
+
isShowEdit: !1,
|
|
985
|
+
isMoveColumn: !1,
|
|
986
|
+
tableData: l.value,
|
|
987
|
+
onDeleteRow: w
|
|
988
|
+
}, null, 8, ["columns", "tableData"])
|
|
989
|
+
]),
|
|
990
|
+
h[4] || (h[4] = L("div", { class: "operate-title" }, [
|
|
991
|
+
L("div", null, Z("表单布局"))
|
|
992
|
+
], -1)),
|
|
993
|
+
L("div", Er, [
|
|
994
|
+
Y(et, {
|
|
995
|
+
rowContents: s.value,
|
|
996
|
+
onChange: A
|
|
997
|
+
}, null, 8, ["rowContents"])
|
|
998
|
+
])
|
|
999
|
+
])
|
|
1000
|
+
]);
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
}, Rr = /* @__PURE__ */ Re(Sr, [["__scopeId", "data-v-a36b8468"]]), wr = B([
|
|
1004
|
+
{
|
|
1005
|
+
name: "表格",
|
|
1006
|
+
type: "table",
|
|
1007
|
+
comp: "Table",
|
|
1008
|
+
icon: "Grid"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
name: "表单",
|
|
1012
|
+
type: "form",
|
|
1013
|
+
comp: "Form",
|
|
1014
|
+
icon: "Film"
|
|
1015
|
+
}
|
|
1016
|
+
]), Or = {
|
|
1017
|
+
Table: Yn,
|
|
1018
|
+
Form: rr,
|
|
1019
|
+
TableOperate: hr,
|
|
1020
|
+
FormOperate: Rr
|
|
1021
|
+
// 添加其他组件...
|
|
1022
|
+
};
|
|
1023
|
+
function an(e) {
|
|
1024
|
+
return Or[e] || null;
|
|
1025
|
+
}
|
|
1026
|
+
const Tr = { class: "type-select" }, _r = ["onClick"], Ar = { class: "list-icon" }, Cr = {
|
|
1027
|
+
__name: "index",
|
|
1028
|
+
setup(e) {
|
|
1029
|
+
const t = Ye(he), { itemData: n } = Ee(t), r = (o) => Mn[o], s = (o) => {
|
|
1030
|
+
const a = v(n.value);
|
|
1031
|
+
a.push({
|
|
1032
|
+
comp: o.comp,
|
|
1033
|
+
name: o.name,
|
|
1034
|
+
compData: []
|
|
1035
|
+
}), t.setItemData(a);
|
|
1036
|
+
};
|
|
1037
|
+
return (o, a) => (K(), Q("div", Tr, [
|
|
1038
|
+
(K(!0), Q(je, null, $e(tn(wr), (l, d) => (K(), Q("div", {
|
|
1039
|
+
class: "type-list",
|
|
1040
|
+
key: d
|
|
1041
|
+
}, [
|
|
1042
|
+
L("div", {
|
|
1043
|
+
class: "list-content",
|
|
1044
|
+
onClick: (f) => s(l)
|
|
1045
|
+
}, [
|
|
1046
|
+
L("div", Ar, [
|
|
1047
|
+
(K(), Be(Et(r(l.icon))))
|
|
1048
|
+
]),
|
|
1049
|
+
L("div", null, Z(l.name), 1)
|
|
1050
|
+
], 8, _r)
|
|
1051
|
+
]))), 128))
|
|
1052
|
+
]));
|
|
1053
|
+
}
|
|
1054
|
+
}, xo = /* @__PURE__ */ Re(Cr, [["__scopeId", "data-v-fe4aecc8"]]), xr = { class: "fill-content" }, Dr = { class: "operate-content" }, Nr = { class: "collapse-title" }, Fr = { class: "comp-child" }, Pr = {
|
|
1055
|
+
__name: "index",
|
|
1056
|
+
setup(e) {
|
|
1057
|
+
const t = Ye(he), { itemData: n, originalData: r } = Ee(t), s = B([]), o = B([]);
|
|
1058
|
+
de(
|
|
1059
|
+
() => n.value,
|
|
1060
|
+
() => {
|
|
1061
|
+
var d;
|
|
1062
|
+
!n.value || ((d = n.value) == null ? void 0 : d.length) === 0 || (s.value = v(n.value));
|
|
1063
|
+
},
|
|
1064
|
+
{ deep: !0, immediate: !0 }
|
|
1065
|
+
);
|
|
1066
|
+
const a = (d) => an(d), l = (d, f, y) => {
|
|
1067
|
+
if (!d || d.length === 0) return;
|
|
1068
|
+
let i = v(n.value);
|
|
1069
|
+
const _ = v(f);
|
|
1070
|
+
_.compData = d, i = i == null ? void 0 : i.map((w, g) => (g === y && (w = _), w)), t.setItemData(i);
|
|
1071
|
+
};
|
|
1072
|
+
return (d, f) => {
|
|
1073
|
+
const y = Ge("el-collapse-item"), i = Ge("el-collapse");
|
|
1074
|
+
return K(), Q("div", xr, [
|
|
1075
|
+
f[1] || (f[1] = L("div", { class: "fill-operate" }, Z("操作栏"), -1)),
|
|
1076
|
+
L("div", Dr, [
|
|
1077
|
+
Y(i, {
|
|
1078
|
+
modelValue: o.value,
|
|
1079
|
+
"onUpdate:modelValue": f[0] || (f[0] = (_) => o.value = _),
|
|
1080
|
+
class: "collapse-content"
|
|
1081
|
+
}, {
|
|
1082
|
+
default: ce(() => [
|
|
1083
|
+
(K(!0), Q(je, null, $e(s.value, (_, w) => (K(), Be(y, {
|
|
1084
|
+
key: w,
|
|
1085
|
+
name: w
|
|
1086
|
+
}, {
|
|
1087
|
+
title: ce(() => [
|
|
1088
|
+
L("div", Nr, Z(_.name), 1)
|
|
1089
|
+
]),
|
|
1090
|
+
default: ce(() => {
|
|
1091
|
+
var g, A;
|
|
1092
|
+
return [
|
|
1093
|
+
L("div", Fr, [
|
|
1094
|
+
(K(), Be(Et(a(_.comp + "Operate")), {
|
|
1095
|
+
itemContents: _ == null ? void 0 : _.compData,
|
|
1096
|
+
originalItemContents: (A = (g = tn(r)) == null ? void 0 : g.find((u, h) => h === w)) == null ? void 0 : A.compData,
|
|
1097
|
+
onChange: (u) => l(u, _, w)
|
|
1098
|
+
}, null, 40, ["itemContents", "originalItemContents", "onChange"]))
|
|
1099
|
+
])
|
|
1100
|
+
];
|
|
1101
|
+
}),
|
|
1102
|
+
_: 2
|
|
1103
|
+
}, 1032, ["name"]))), 128))
|
|
1104
|
+
]),
|
|
1105
|
+
_: 1
|
|
1106
|
+
}, 8, ["modelValue"])
|
|
1107
|
+
])
|
|
1108
|
+
]);
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
}, Do = /* @__PURE__ */ Re(Pr, [["__scopeId", "data-v-a216b035"]]), Ur = {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
class: "show-content"
|
|
1114
|
+
}, Br = {
|
|
1115
|
+
__name: "index",
|
|
1116
|
+
setup(e) {
|
|
1117
|
+
const t = Ye(he), { itemData: n } = Ee(t), r = B([]);
|
|
1118
|
+
de(
|
|
1119
|
+
() => n.value,
|
|
1120
|
+
() => {
|
|
1121
|
+
var o;
|
|
1122
|
+
!n.value || ((o = n.value) == null ? void 0 : o.length) === 0 || (r.value = v(n.value));
|
|
1123
|
+
},
|
|
1124
|
+
{ deep: !0, immediate: !0 }
|
|
1125
|
+
);
|
|
1126
|
+
const s = (o) => an(o);
|
|
1127
|
+
return (o, a) => {
|
|
1128
|
+
var l;
|
|
1129
|
+
return ((l = r.value) == null ? void 0 : l.length) > 0 ? (K(), Q("div", Ur, [
|
|
1130
|
+
(K(!0), Q(je, null, $e(r.value, (d, f) => (K(), Q("div", {
|
|
1131
|
+
class: "item-content",
|
|
1132
|
+
key: f
|
|
1133
|
+
}, [
|
|
1134
|
+
L("div", null, Z(d.name), 1),
|
|
1135
|
+
(K(), Be(Et(s(d.comp)), {
|
|
1136
|
+
itemData: d == null ? void 0 : d.compData,
|
|
1137
|
+
childItemData: d == null ? void 0 : d.itemChildData,
|
|
1138
|
+
key: f
|
|
1139
|
+
}, null, 8, ["itemData", "childItemData"]))
|
|
1140
|
+
]))), 128))
|
|
1141
|
+
])) : en("", !0);
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
}, No = /* @__PURE__ */ Re(Br, [["__scopeId", "data-v-79320497"]]), ne = [
|
|
1145
|
+
{
|
|
1146
|
+
key: "FormName",
|
|
1147
|
+
value: "Form"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
key: "TableName",
|
|
1151
|
+
value: "Table"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
key: "MenuName",
|
|
1155
|
+
value: "Menu"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
key: "GroupName",
|
|
1159
|
+
value: "Group"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
key: "SystemKey",
|
|
1163
|
+
value: "System"
|
|
1164
|
+
}
|
|
1165
|
+
], te = [
|
|
1166
|
+
{
|
|
1167
|
+
key: "FormDirect",
|
|
1168
|
+
value: "formFlex"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
key: "Form",
|
|
1172
|
+
value: "formContent"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
key: "FormButton",
|
|
1176
|
+
value: "formButton"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
key: "FormFlex",
|
|
1180
|
+
value: "formWrap"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
key: "TableColumns",
|
|
1184
|
+
value: "header"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
key: "TableButton",
|
|
1188
|
+
value: "extraButton"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
key: "LineButton",
|
|
1192
|
+
value: "rowButton"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
key: "Table",
|
|
1196
|
+
value: "tableContents"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
key: "TableIndex",
|
|
1200
|
+
value: "tableIndex"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
key: "Menus",
|
|
1204
|
+
value: "menuContents"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
key: "GroupContents",
|
|
1208
|
+
value: "groupContents"
|
|
1209
|
+
}
|
|
1210
|
+
], ze = B(0), ct = B(0), jr = (e) => {
|
|
1211
|
+
let t;
|
|
1212
|
+
e.includes(`\r
|
|
1213
|
+
`) ? t = e.split(`\r
|
|
1214
|
+
`).filter((s) => s.trim() !== "") : t = e.split(`
|
|
1215
|
+
`).filter((s) => s.trim() !== "");
|
|
1216
|
+
const n = [];
|
|
1217
|
+
let r = "";
|
|
1218
|
+
for (const s of t)
|
|
1219
|
+
s.includes("{") || r.includes("{") || s.includes("[") || r.includes("[") || s.includes("【") || r.includes("【") || s.includes("(") || r.includes("(") || s.includes("(") || r.includes("(") ? (r += s.trim(), v(r).split("{").length - 1 === v(r).split("}").length - 1 && v(r).split("【").length - 1 === v(r).split("】").length - 1 && v(r).split("[").length - 1 === v(r).split("]").length - 1 && v(r).split("(").length - 1 === v(r).split(")").length - 1 && v(r).split("(").length - 1 === v(r).split(")").length - 1 && (n.push(r), r = "")) : n.push(s.trim());
|
|
1220
|
+
return n;
|
|
1221
|
+
}, $r = (e) => {
|
|
1222
|
+
const t = e.trim().replace(/^'|'$/g, ""), n = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, r = {};
|
|
1223
|
+
let s;
|
|
1224
|
+
for (; (s = n.exec(t)) !== null; ) {
|
|
1225
|
+
const o = s[1];
|
|
1226
|
+
let a = s[2].trim();
|
|
1227
|
+
(a.match(/\[/g) || []).length !== (a.match(/\]/g) || []).length && (a = a == null ? void 0 : a.replace(/]$/, "")), r[o] ? (r[o + ct.value] && ct.value++, r[o + ct.value] = o + "=" + a) : r[o] = o + "=" + a;
|
|
1228
|
+
}
|
|
1229
|
+
return r;
|
|
1230
|
+
}, ln = (e) => {
|
|
1231
|
+
const [t, n] = e.split("=").map((o) => o.trim()), r = t.replace(/['"]/g, ""), s = n.replace(/^['"]|['"]$/g, "");
|
|
1232
|
+
return console.log("parseKeyValue:", r, s), { key: r, value: s };
|
|
1233
|
+
}, Lr = (e) => {
|
|
1234
|
+
var a;
|
|
1235
|
+
let t = [];
|
|
1236
|
+
const [n, r] = e.split(/=(.+)/), s = n.replace(/['"]/g, "").trim(), o = r.replace(/^['"]|['"]$/g, "");
|
|
1237
|
+
return (a = Object.values($r(o))) == null || a.forEach((l) => {
|
|
1238
|
+
t.push(ln(l));
|
|
1239
|
+
}), { key: s, value: t };
|
|
1240
|
+
}, Ie = (e) => {
|
|
1241
|
+
try {
|
|
1242
|
+
return JSON.parse(e), !0;
|
|
1243
|
+
} catch {
|
|
1244
|
+
return !1;
|
|
1245
|
+
}
|
|
1246
|
+
}, cn = (e) => {
|
|
1247
|
+
try {
|
|
1248
|
+
const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1249
|
+
if (v(t).split("{").length - 1 > 1) {
|
|
1250
|
+
let n = v(t).replace(/^\{(.*)\}$/, "[$1]");
|
|
1251
|
+
if (Ie(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Ie(n)) {
|
|
1252
|
+
const r = JSON.parse(n);
|
|
1253
|
+
let s = [];
|
|
1254
|
+
return r == null || r.forEach((o) => {
|
|
1255
|
+
var a;
|
|
1256
|
+
(a = Object.entries(v(o))) == null || a.forEach((l) => {
|
|
1257
|
+
ze.value++, s.push({
|
|
1258
|
+
id: ze.value,
|
|
1259
|
+
key: (l == null ? void 0 : l[0]) ?? "",
|
|
1260
|
+
value: (l == null ? void 0 : l[1]) === "" ? "" : l == null ? void 0 : l[1],
|
|
1261
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1262
|
+
width: Object.keys(v(o)).length
|
|
1263
|
+
});
|
|
1264
|
+
});
|
|
1265
|
+
}), s;
|
|
1266
|
+
} else
|
|
1267
|
+
return console.error("转换类型不正确:"), [];
|
|
1268
|
+
} else if (Ie(t)) {
|
|
1269
|
+
const n = JSON.parse(t);
|
|
1270
|
+
return Object.entries(n).map(([r, s]) => (ze.value++, {
|
|
1271
|
+
id: ze.value,
|
|
1272
|
+
key: r,
|
|
1273
|
+
value: s === "" ? "" : s,
|
|
1274
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1275
|
+
width: 1
|
|
1276
|
+
}));
|
|
1277
|
+
} else
|
|
1278
|
+
return t;
|
|
1279
|
+
} catch (t) {
|
|
1280
|
+
return console.error("转换失败:", t), [];
|
|
1281
|
+
}
|
|
1282
|
+
}, qr = (e, t) => {
|
|
1283
|
+
try {
|
|
1284
|
+
if (ne != null && ne.find((n) => (n == null ? void 0 : n.key) === t))
|
|
1285
|
+
return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
|
|
1286
|
+
if (v(e).split("[").length - 1 > 1) {
|
|
1287
|
+
const n = v(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1288
|
+
return JSON.parse(n);
|
|
1289
|
+
} else {
|
|
1290
|
+
const n = v(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1291
|
+
if (Ie(n)) {
|
|
1292
|
+
const r = JSON.parse(n);
|
|
1293
|
+
return Array.isArray(r) ? r.map((s) => ({ label: s })) : r;
|
|
1294
|
+
} else
|
|
1295
|
+
return cn(v(e));
|
|
1296
|
+
}
|
|
1297
|
+
} catch (n) {
|
|
1298
|
+
return console.error("解析失败:", n), e;
|
|
1299
|
+
}
|
|
1300
|
+
}, Mr = (e) => ({ [e == null ? void 0 : e.key]: qr(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Jr = (e) => {
|
|
1301
|
+
try {
|
|
1302
|
+
if (v(e).split("[").length - 1 > 1) {
|
|
1303
|
+
const t = v(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1304
|
+
return JSON.parse(t);
|
|
1305
|
+
} else
|
|
1306
|
+
return JSON.parse(v(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1307
|
+
} catch (t) {
|
|
1308
|
+
return console.error("解析失败:", t), e;
|
|
1309
|
+
}
|
|
1310
|
+
}, Fo = (e) => {
|
|
1311
|
+
var o, a, l, d, f, y;
|
|
1312
|
+
const t = jr((a = (o = v(e)) == null ? void 0 : o.replace("(", "(")) == null ? void 0 : a.replace(")", ")")), n = (l = v(t)) == null ? void 0 : l.map((i) => {
|
|
1313
|
+
var w, g;
|
|
1314
|
+
let _ = (g = (w = v(i)) == null ? void 0 : w.split("=")) == null ? void 0 : g[0];
|
|
1315
|
+
return _ != null && _.includes("GroupContents") ? Lr(i) : ln(i);
|
|
1316
|
+
}), r = [];
|
|
1317
|
+
console.log("transContents", n), (d = v(n)) == null || d.forEach((i) => {
|
|
1318
|
+
var _, w, g, A, u;
|
|
1319
|
+
ne != null && ne.find((h) => {
|
|
1320
|
+
var p, R;
|
|
1321
|
+
return ((p = h == null ? void 0 : h.key) == null ? void 0 : p.toUpperCase()) === ((R = i == null ? void 0 : i.key) == null ? void 0 : R.toUpperCase());
|
|
1322
|
+
}) ? r.push({
|
|
1323
|
+
comp: ((_ = ne == null ? void 0 : ne.find((h) => {
|
|
1324
|
+
var p, R;
|
|
1325
|
+
return ((p = h == null ? void 0 : h.key) == null ? void 0 : p.toUpperCase()) === ((R = i == null ? void 0 : i.key) == null ? void 0 : R.toUpperCase());
|
|
1326
|
+
})) == null ? void 0 : _.value) ?? "",
|
|
1327
|
+
name: (w = i == null ? void 0 : i.value) == null ? void 0 : w.replace(/[’]|[‘]|[']/g, ""),
|
|
1328
|
+
compData: []
|
|
1329
|
+
}) : te != null && te.find((h) => {
|
|
1330
|
+
var p, R;
|
|
1331
|
+
return ((p = h == null ? void 0 : h.key) == null ? void 0 : p.toUpperCase()) === ((R = i == null ? void 0 : i.key) == null ? void 0 : R.toUpperCase());
|
|
1332
|
+
}) && ((r == null ? void 0 : r.length) === 0 && (g = i.key) != null && g.includes("Menus") && r.push({
|
|
1333
|
+
comp: "Menu",
|
|
1334
|
+
name: "",
|
|
1335
|
+
compData: []
|
|
1336
|
+
}), (A = r == null ? void 0 : r[(r == null ? void 0 : r.length) - 1]) != null && A.compData && r[(r == null ? void 0 : r.length) - 1].compData.push({
|
|
1337
|
+
key: (u = te == null ? void 0 : te.find((h) => {
|
|
1338
|
+
var p, R;
|
|
1339
|
+
return ((p = h == null ? void 0 : h.key) == null ? void 0 : p.toUpperCase()) === ((R = i == null ? void 0 : i.key) == null ? void 0 : R.toUpperCase());
|
|
1340
|
+
})) == null ? void 0 : u.value,
|
|
1341
|
+
contents: i == null ? void 0 : i.value
|
|
1342
|
+
}));
|
|
1343
|
+
}), console.log("newContents", r);
|
|
1344
|
+
let s = (f = v(r)) == null ? void 0 : f.map((i) => {
|
|
1345
|
+
var _;
|
|
1346
|
+
return i != null && i.compData && (i.compData = (_ = i == null ? void 0 : i.compData) == null ? void 0 : _.map((w) => {
|
|
1347
|
+
var g, A, u, h, p, R, b, m, E, S, D;
|
|
1348
|
+
if ((w == null ? void 0 : w.key) === "formFlex")
|
|
1349
|
+
w.contents = ((A = (g = w.contents) == null ? void 0 : g.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : A.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1350
|
+
else if ((w == null ? void 0 : w.key) === "groupContents")
|
|
1351
|
+
w.contents = (u = v(w.contents)) == null ? void 0 : u.map((N) => Mr(v(N)));
|
|
1352
|
+
else if (((p = (h = w.contents) == null ? void 0 : h.trim()) != null && p.startsWith("[") || (b = (R = w.contents) == null ? void 0 : R.trim()) != null && b.startsWith("【")) && ((E = (m = w.contents) == null ? void 0 : m.trim()) != null && E.endsWith("]") || (D = (S = w.contents) == null ? void 0 : S.trim()) != null && D.endsWith("】")))
|
|
1353
|
+
w.contents = Jr(v(w.contents));
|
|
1354
|
+
else {
|
|
1355
|
+
if (!w.contents) return;
|
|
1356
|
+
w.contents = cn(v(w.contents));
|
|
1357
|
+
}
|
|
1358
|
+
return w;
|
|
1359
|
+
})), i;
|
|
1360
|
+
});
|
|
1361
|
+
return s = (y = v(s)) == null ? void 0 : y.map((i) => {
|
|
1362
|
+
var _;
|
|
1363
|
+
return (i == null ? void 0 : i.comp) === "Group" && (i.compData = (_ = i.compData) == null ? void 0 : _.map((w) => {
|
|
1364
|
+
var A;
|
|
1365
|
+
let g = [];
|
|
1366
|
+
return (A = w.contents) == null || A.forEach((u) => {
|
|
1367
|
+
var h, p, R, b, m, E, S, D, N, T, G, F;
|
|
1368
|
+
if (ne != null && ne.find((M) => {
|
|
1369
|
+
var z, H, I;
|
|
1370
|
+
return ((z = M == null ? void 0 : M.key) == null ? void 0 : z.toUpperCase()) === ((I = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : I.toUpperCase());
|
|
1371
|
+
}))
|
|
1372
|
+
g.push({
|
|
1373
|
+
comp: (h = ne == null ? void 0 : ne.find((M) => {
|
|
1374
|
+
var z, H, I;
|
|
1375
|
+
return ((z = M == null ? void 0 : M.key) == null ? void 0 : z.toUpperCase()) === ((I = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : I.toUpperCase());
|
|
1376
|
+
})) == null ? void 0 : h.value,
|
|
1377
|
+
name: (R = (p = Object.values(u)) == null ? void 0 : p[0]) == null ? void 0 : R.replace(/[’]|[‘]|[']/g, ""),
|
|
1378
|
+
compData: []
|
|
1379
|
+
});
|
|
1380
|
+
else if (te != null && te.find((M) => {
|
|
1381
|
+
var z, H, I;
|
|
1382
|
+
return ((z = M == null ? void 0 : M.key) == null ? void 0 : z.toUpperCase()) === ((I = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : I.toUpperCase());
|
|
1383
|
+
})) {
|
|
1384
|
+
if ((g == null ? void 0 : g.length) === 0) return;
|
|
1385
|
+
(b = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && b.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
1386
|
+
key: (m = te == null ? void 0 : te.find((M) => {
|
|
1387
|
+
var z, H, I;
|
|
1388
|
+
return ((z = M == null ? void 0 : M.key) == null ? void 0 : z.toUpperCase()) === ((I = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : I.toUpperCase());
|
|
1389
|
+
})) == null ? void 0 : m.value,
|
|
1390
|
+
contents: (E = Object.values(u)) == null ? void 0 : E[0]
|
|
1391
|
+
});
|
|
1392
|
+
} else if ((D = (S = Object.keys(u)) == null ? void 0 : S[0]) != null && D.includes("$")) {
|
|
1393
|
+
const M = (T = (N = Object.keys(v(u))) == null ? void 0 : N[0]) == null ? void 0 : T.split("$");
|
|
1394
|
+
g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
1395
|
+
key: (G = te == null ? void 0 : te.find((z) => {
|
|
1396
|
+
var H, I;
|
|
1397
|
+
return ((H = z == null ? void 0 : z.key) == null ? void 0 : H.toUpperCase()) === ((I = M == null ? void 0 : M[0]) == null ? void 0 : I.toUpperCase());
|
|
1398
|
+
})) == null ? void 0 : G.value,
|
|
1399
|
+
contents: (F = Object.values(u)) == null ? void 0 : F[0],
|
|
1400
|
+
selectLabel: M == null ? void 0 : M[1]
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
return u;
|
|
1404
|
+
}), w.contents = g, w;
|
|
1405
|
+
})), i;
|
|
1406
|
+
}), s;
|
|
1407
|
+
};
|
|
1408
|
+
function un(e, t) {
|
|
1409
|
+
return function() {
|
|
1410
|
+
return e.apply(t, arguments);
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
const { toString: zr } = Object.prototype, { getPrototypeOf: St } = Object, { iterator: tt, toStringTag: fn } = Symbol, nt = /* @__PURE__ */ ((e) => (t) => {
|
|
1414
|
+
const n = zr.call(t);
|
|
1415
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1416
|
+
})(/* @__PURE__ */ Object.create(null)), ue = (e) => (e = e.toLowerCase(), (t) => nt(t) === e), rt = (e) => (t) => typeof t === e, { isArray: _e } = Array, Le = rt("undefined");
|
|
1417
|
+
function Hr(e) {
|
|
1418
|
+
return e !== null && !Le(e) && e.constructor !== null && !Le(e.constructor) && re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
1419
|
+
}
|
|
1420
|
+
const pn = ue("ArrayBuffer");
|
|
1421
|
+
function Ir(e) {
|
|
1422
|
+
let t;
|
|
1423
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && pn(e.buffer), t;
|
|
1424
|
+
}
|
|
1425
|
+
const Vr = rt("string"), re = rt("function"), dn = rt("number"), st = (e) => e !== null && typeof e == "object", Wr = (e) => e === !0 || e === !1, Ve = (e) => {
|
|
1426
|
+
if (nt(e) !== "object")
|
|
1427
|
+
return !1;
|
|
1428
|
+
const t = St(e);
|
|
1429
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(fn in e) && !(tt in e);
|
|
1430
|
+
}, Kr = ue("Date"), Gr = ue("File"), Xr = ue("Blob"), Zr = ue("FileList"), Qr = (e) => st(e) && re(e.pipe), Yr = (e) => {
|
|
1431
|
+
let t;
|
|
1432
|
+
return e && (typeof FormData == "function" && e instanceof FormData || re(e.append) && ((t = nt(e)) === "formdata" || // detect form-data instance
|
|
1433
|
+
t === "object" && re(e.toString) && e.toString() === "[object FormData]"));
|
|
1434
|
+
}, es = ue("URLSearchParams"), [ts, ns, rs, ss] = ["ReadableStream", "Request", "Response", "Headers"].map(ue), os = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1435
|
+
function qe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1436
|
+
if (e === null || typeof e > "u")
|
|
1437
|
+
return;
|
|
1438
|
+
let r, s;
|
|
1439
|
+
if (typeof e != "object" && (e = [e]), _e(e))
|
|
1440
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
1441
|
+
t.call(null, e[r], r, e);
|
|
1442
|
+
else {
|
|
1443
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = o.length;
|
|
1444
|
+
let l;
|
|
1445
|
+
for (r = 0; r < a; r++)
|
|
1446
|
+
l = o[r], t.call(null, e[l], l, e);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function hn(e, t) {
|
|
1450
|
+
t = t.toLowerCase();
|
|
1451
|
+
const n = Object.keys(e);
|
|
1452
|
+
let r = n.length, s;
|
|
1453
|
+
for (; r-- > 0; )
|
|
1454
|
+
if (s = n[r], t === s.toLowerCase())
|
|
1455
|
+
return s;
|
|
1456
|
+
return null;
|
|
1457
|
+
}
|
|
1458
|
+
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, mn = (e) => !Le(e) && e !== ge;
|
|
1459
|
+
function dt() {
|
|
1460
|
+
const { caseless: e } = mn(this) && this || {}, t = {}, n = (r, s) => {
|
|
1461
|
+
const o = e && hn(t, s) || s;
|
|
1462
|
+
Ve(t[o]) && Ve(r) ? t[o] = dt(t[o], r) : Ve(r) ? t[o] = dt({}, r) : _e(r) ? t[o] = r.slice() : t[o] = r;
|
|
1463
|
+
};
|
|
1464
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
1465
|
+
arguments[r] && qe(arguments[r], n);
|
|
1466
|
+
return t;
|
|
1467
|
+
}
|
|
1468
|
+
const as = (e, t, n, { allOwnKeys: r } = {}) => (qe(t, (s, o) => {
|
|
1469
|
+
n && re(s) ? e[o] = un(s, n) : e[o] = s;
|
|
1470
|
+
}, { allOwnKeys: r }), e), ls = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), is = (e, t, n, r) => {
|
|
1471
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
1472
|
+
value: t.prototype
|
|
1473
|
+
}), n && Object.assign(e.prototype, n);
|
|
1474
|
+
}, cs = (e, t, n, r) => {
|
|
1475
|
+
let s, o, a;
|
|
1476
|
+
const l = {};
|
|
1477
|
+
if (t = t || {}, e == null) return t;
|
|
1478
|
+
do {
|
|
1479
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
1480
|
+
a = s[o], (!r || r(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
|
|
1481
|
+
e = n !== !1 && St(e);
|
|
1482
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1483
|
+
return t;
|
|
1484
|
+
}, us = (e, t, n) => {
|
|
1485
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
1486
|
+
const r = e.indexOf(t, n);
|
|
1487
|
+
return r !== -1 && r === n;
|
|
1488
|
+
}, fs = (e) => {
|
|
1489
|
+
if (!e) return null;
|
|
1490
|
+
if (_e(e)) return e;
|
|
1491
|
+
let t = e.length;
|
|
1492
|
+
if (!dn(t)) return null;
|
|
1493
|
+
const n = new Array(t);
|
|
1494
|
+
for (; t-- > 0; )
|
|
1495
|
+
n[t] = e[t];
|
|
1496
|
+
return n;
|
|
1497
|
+
}, ps = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && St(Uint8Array)), ds = (e, t) => {
|
|
1498
|
+
const r = (e && e[tt]).call(e);
|
|
1499
|
+
let s;
|
|
1500
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
1501
|
+
const o = s.value;
|
|
1502
|
+
t.call(e, o[0], o[1]);
|
|
1503
|
+
}
|
|
1504
|
+
}, hs = (e, t) => {
|
|
1505
|
+
let n;
|
|
1506
|
+
const r = [];
|
|
1507
|
+
for (; (n = e.exec(t)) !== null; )
|
|
1508
|
+
r.push(n);
|
|
1509
|
+
return r;
|
|
1510
|
+
}, ms = ue("HTMLFormElement"), ys = (e) => e.toLowerCase().replace(
|
|
1511
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
1512
|
+
function(n, r, s) {
|
|
1513
|
+
return r.toUpperCase() + s;
|
|
1514
|
+
}
|
|
1515
|
+
), Mt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), bs = ue("RegExp"), yn = (e, t) => {
|
|
1516
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
1517
|
+
qe(n, (s, o) => {
|
|
1518
|
+
let a;
|
|
1519
|
+
(a = t(s, o, e)) !== !1 && (r[o] = a || s);
|
|
1520
|
+
}), Object.defineProperties(e, r);
|
|
1521
|
+
}, gs = (e) => {
|
|
1522
|
+
yn(e, (t, n) => {
|
|
1523
|
+
if (re(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1524
|
+
return !1;
|
|
1525
|
+
const r = e[n];
|
|
1526
|
+
if (re(r)) {
|
|
1527
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
1528
|
+
t.writable = !1;
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
t.set || (t.set = () => {
|
|
1532
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
}, vs = (e, t) => {
|
|
1537
|
+
const n = {}, r = (s) => {
|
|
1538
|
+
s.forEach((o) => {
|
|
1539
|
+
n[o] = !0;
|
|
1540
|
+
});
|
|
1541
|
+
};
|
|
1542
|
+
return _e(e) ? r(e) : r(String(e).split(t)), n;
|
|
1543
|
+
}, ks = () => {
|
|
1544
|
+
}, Es = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1545
|
+
function Ss(e) {
|
|
1546
|
+
return !!(e && re(e.append) && e[fn] === "FormData" && e[tt]);
|
|
1547
|
+
}
|
|
1548
|
+
const Rs = (e) => {
|
|
1549
|
+
const t = new Array(10), n = (r, s) => {
|
|
1550
|
+
if (st(r)) {
|
|
1551
|
+
if (t.indexOf(r) >= 0)
|
|
1552
|
+
return;
|
|
1553
|
+
if (!("toJSON" in r)) {
|
|
1554
|
+
t[s] = r;
|
|
1555
|
+
const o = _e(r) ? [] : {};
|
|
1556
|
+
return qe(r, (a, l) => {
|
|
1557
|
+
const d = n(a, s + 1);
|
|
1558
|
+
!Le(d) && (o[l] = d);
|
|
1559
|
+
}), t[s] = void 0, o;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
return r;
|
|
1563
|
+
};
|
|
1564
|
+
return n(e, 0);
|
|
1565
|
+
}, ws = ue("AsyncFunction"), Os = (e) => e && (st(e) || re(e)) && re(e.then) && re(e.catch), bn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ge.addEventListener("message", ({ source: s, data: o }) => {
|
|
1566
|
+
s === ge && o === n && r.length && r.shift()();
|
|
1567
|
+
}, !1), (s) => {
|
|
1568
|
+
r.push(s), ge.postMessage(n, "*");
|
|
1569
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1570
|
+
typeof setImmediate == "function",
|
|
1571
|
+
re(ge.postMessage)
|
|
1572
|
+
), Ts = typeof queueMicrotask < "u" ? queueMicrotask.bind(ge) : typeof process < "u" && process.nextTick || bn, _s = (e) => e != null && re(e[tt]), c = {
|
|
1573
|
+
isArray: _e,
|
|
1574
|
+
isArrayBuffer: pn,
|
|
1575
|
+
isBuffer: Hr,
|
|
1576
|
+
isFormData: Yr,
|
|
1577
|
+
isArrayBufferView: Ir,
|
|
1578
|
+
isString: Vr,
|
|
1579
|
+
isNumber: dn,
|
|
1580
|
+
isBoolean: Wr,
|
|
1581
|
+
isObject: st,
|
|
1582
|
+
isPlainObject: Ve,
|
|
1583
|
+
isReadableStream: ts,
|
|
1584
|
+
isRequest: ns,
|
|
1585
|
+
isResponse: rs,
|
|
1586
|
+
isHeaders: ss,
|
|
1587
|
+
isUndefined: Le,
|
|
1588
|
+
isDate: Kr,
|
|
1589
|
+
isFile: Gr,
|
|
1590
|
+
isBlob: Xr,
|
|
1591
|
+
isRegExp: bs,
|
|
1592
|
+
isFunction: re,
|
|
1593
|
+
isStream: Qr,
|
|
1594
|
+
isURLSearchParams: es,
|
|
1595
|
+
isTypedArray: ps,
|
|
1596
|
+
isFileList: Zr,
|
|
1597
|
+
forEach: qe,
|
|
1598
|
+
merge: dt,
|
|
1599
|
+
extend: as,
|
|
1600
|
+
trim: os,
|
|
1601
|
+
stripBOM: ls,
|
|
1602
|
+
inherits: is,
|
|
1603
|
+
toFlatObject: cs,
|
|
1604
|
+
kindOf: nt,
|
|
1605
|
+
kindOfTest: ue,
|
|
1606
|
+
endsWith: us,
|
|
1607
|
+
toArray: fs,
|
|
1608
|
+
forEachEntry: ds,
|
|
1609
|
+
matchAll: hs,
|
|
1610
|
+
isHTMLForm: ms,
|
|
1611
|
+
hasOwnProperty: Mt,
|
|
1612
|
+
hasOwnProp: Mt,
|
|
1613
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1614
|
+
reduceDescriptors: yn,
|
|
1615
|
+
freezeMethods: gs,
|
|
1616
|
+
toObjectSet: vs,
|
|
1617
|
+
toCamelCase: ys,
|
|
1618
|
+
noop: ks,
|
|
1619
|
+
toFiniteNumber: Es,
|
|
1620
|
+
findKey: hn,
|
|
1621
|
+
global: ge,
|
|
1622
|
+
isContextDefined: mn,
|
|
1623
|
+
isSpecCompliantForm: Ss,
|
|
1624
|
+
toJSONObject: Rs,
|
|
1625
|
+
isAsyncFn: ws,
|
|
1626
|
+
isThenable: Os,
|
|
1627
|
+
setImmediate: bn,
|
|
1628
|
+
asap: Ts,
|
|
1629
|
+
isIterable: _s
|
|
1630
|
+
};
|
|
1631
|
+
function j(e, t, n, r, s) {
|
|
1632
|
+
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), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
1633
|
+
}
|
|
1634
|
+
c.inherits(j, Error, {
|
|
1635
|
+
toJSON: function() {
|
|
1636
|
+
return {
|
|
1637
|
+
// Standard
|
|
1638
|
+
message: this.message,
|
|
1639
|
+
name: this.name,
|
|
1640
|
+
// Microsoft
|
|
1641
|
+
description: this.description,
|
|
1642
|
+
number: this.number,
|
|
1643
|
+
// Mozilla
|
|
1644
|
+
fileName: this.fileName,
|
|
1645
|
+
lineNumber: this.lineNumber,
|
|
1646
|
+
columnNumber: this.columnNumber,
|
|
1647
|
+
stack: this.stack,
|
|
1648
|
+
// Axios
|
|
1649
|
+
config: c.toJSONObject(this.config),
|
|
1650
|
+
code: this.code,
|
|
1651
|
+
status: this.status
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1655
|
+
const gn = j.prototype, vn = {};
|
|
1656
|
+
[
|
|
1657
|
+
"ERR_BAD_OPTION_VALUE",
|
|
1658
|
+
"ERR_BAD_OPTION",
|
|
1659
|
+
"ECONNABORTED",
|
|
1660
|
+
"ETIMEDOUT",
|
|
1661
|
+
"ERR_NETWORK",
|
|
1662
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1663
|
+
"ERR_DEPRECATED",
|
|
1664
|
+
"ERR_BAD_RESPONSE",
|
|
1665
|
+
"ERR_BAD_REQUEST",
|
|
1666
|
+
"ERR_CANCELED",
|
|
1667
|
+
"ERR_NOT_SUPPORT",
|
|
1668
|
+
"ERR_INVALID_URL"
|
|
1669
|
+
// eslint-disable-next-line func-names
|
|
1670
|
+
].forEach((e) => {
|
|
1671
|
+
vn[e] = { value: e };
|
|
1672
|
+
});
|
|
1673
|
+
Object.defineProperties(j, vn);
|
|
1674
|
+
Object.defineProperty(gn, "isAxiosError", { value: !0 });
|
|
1675
|
+
j.from = (e, t, n, r, s, o) => {
|
|
1676
|
+
const a = Object.create(gn);
|
|
1677
|
+
return c.toFlatObject(e, a, function(d) {
|
|
1678
|
+
return d !== Error.prototype;
|
|
1679
|
+
}, (l) => l !== "isAxiosError"), j.call(a, e.message, t, n, r, s), a.cause = e, a.name = e.name, o && Object.assign(a, o), a;
|
|
1680
|
+
};
|
|
1681
|
+
const As = null;
|
|
1682
|
+
function ht(e) {
|
|
1683
|
+
return c.isPlainObject(e) || c.isArray(e);
|
|
1684
|
+
}
|
|
1685
|
+
function kn(e) {
|
|
1686
|
+
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
1687
|
+
}
|
|
1688
|
+
function Jt(e, t, n) {
|
|
1689
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
1690
|
+
return s = kn(s), !n && o ? "[" + s + "]" : s;
|
|
1691
|
+
}).join(n ? "." : "") : t;
|
|
1692
|
+
}
|
|
1693
|
+
function Cs(e) {
|
|
1694
|
+
return c.isArray(e) && !e.some(ht);
|
|
1695
|
+
}
|
|
1696
|
+
const xs = c.toFlatObject(c, {}, null, function(t) {
|
|
1697
|
+
return /^is[A-Z]/.test(t);
|
|
1698
|
+
});
|
|
1699
|
+
function ot(e, t, n) {
|
|
1700
|
+
if (!c.isObject(e))
|
|
1701
|
+
throw new TypeError("target must be an object");
|
|
1702
|
+
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
1703
|
+
metaTokens: !0,
|
|
1704
|
+
dots: !1,
|
|
1705
|
+
indexes: !1
|
|
1706
|
+
}, !1, function(A, u) {
|
|
1707
|
+
return !c.isUndefined(u[A]);
|
|
1708
|
+
});
|
|
1709
|
+
const r = n.metaTokens, s = n.visitor || y, o = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
1710
|
+
if (!c.isFunction(s))
|
|
1711
|
+
throw new TypeError("visitor must be a function");
|
|
1712
|
+
function f(g) {
|
|
1713
|
+
if (g === null) return "";
|
|
1714
|
+
if (c.isDate(g))
|
|
1715
|
+
return g.toISOString();
|
|
1716
|
+
if (!d && c.isBlob(g))
|
|
1717
|
+
throw new j("Blob is not supported. Use a Buffer instead.");
|
|
1718
|
+
return c.isArrayBuffer(g) || c.isTypedArray(g) ? d && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
1719
|
+
}
|
|
1720
|
+
function y(g, A, u) {
|
|
1721
|
+
let h = g;
|
|
1722
|
+
if (g && !u && typeof g == "object") {
|
|
1723
|
+
if (c.endsWith(A, "{}"))
|
|
1724
|
+
A = r ? A : A.slice(0, -2), g = JSON.stringify(g);
|
|
1725
|
+
else if (c.isArray(g) && Cs(g) || (c.isFileList(g) || c.endsWith(A, "[]")) && (h = c.toArray(g)))
|
|
1726
|
+
return A = kn(A), h.forEach(function(R, b) {
|
|
1727
|
+
!(c.isUndefined(R) || R === null) && t.append(
|
|
1728
|
+
// eslint-disable-next-line no-nested-ternary
|
|
1729
|
+
a === !0 ? Jt([A], b, o) : a === null ? A : A + "[]",
|
|
1730
|
+
f(R)
|
|
1731
|
+
);
|
|
1732
|
+
}), !1;
|
|
1733
|
+
}
|
|
1734
|
+
return ht(g) ? !0 : (t.append(Jt(u, A, o), f(g)), !1);
|
|
1735
|
+
}
|
|
1736
|
+
const i = [], _ = Object.assign(xs, {
|
|
1737
|
+
defaultVisitor: y,
|
|
1738
|
+
convertValue: f,
|
|
1739
|
+
isVisitable: ht
|
|
1740
|
+
});
|
|
1741
|
+
function w(g, A) {
|
|
1742
|
+
if (!c.isUndefined(g)) {
|
|
1743
|
+
if (i.indexOf(g) !== -1)
|
|
1744
|
+
throw Error("Circular reference detected in " + A.join("."));
|
|
1745
|
+
i.push(g), c.forEach(g, function(h, p) {
|
|
1746
|
+
(!(c.isUndefined(h) || h === null) && s.call(
|
|
1747
|
+
t,
|
|
1748
|
+
h,
|
|
1749
|
+
c.isString(p) ? p.trim() : p,
|
|
1750
|
+
A,
|
|
1751
|
+
_
|
|
1752
|
+
)) === !0 && w(h, A ? A.concat(p) : [p]);
|
|
1753
|
+
}), i.pop();
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
if (!c.isObject(e))
|
|
1757
|
+
throw new TypeError("data must be an object");
|
|
1758
|
+
return w(e), t;
|
|
1759
|
+
}
|
|
1760
|
+
function zt(e) {
|
|
1761
|
+
const t = {
|
|
1762
|
+
"!": "%21",
|
|
1763
|
+
"'": "%27",
|
|
1764
|
+
"(": "%28",
|
|
1765
|
+
")": "%29",
|
|
1766
|
+
"~": "%7E",
|
|
1767
|
+
"%20": "+",
|
|
1768
|
+
"%00": "\0"
|
|
1769
|
+
};
|
|
1770
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
1771
|
+
return t[r];
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
function Rt(e, t) {
|
|
1775
|
+
this._pairs = [], e && ot(e, this, t);
|
|
1776
|
+
}
|
|
1777
|
+
const En = Rt.prototype;
|
|
1778
|
+
En.append = function(t, n) {
|
|
1779
|
+
this._pairs.push([t, n]);
|
|
1780
|
+
};
|
|
1781
|
+
En.toString = function(t) {
|
|
1782
|
+
const n = t ? function(r) {
|
|
1783
|
+
return t.call(this, r, zt);
|
|
1784
|
+
} : zt;
|
|
1785
|
+
return this._pairs.map(function(s) {
|
|
1786
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
1787
|
+
}, "").join("&");
|
|
1788
|
+
};
|
|
1789
|
+
function Ds(e) {
|
|
1790
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1791
|
+
}
|
|
1792
|
+
function Sn(e, t, n) {
|
|
1793
|
+
if (!t)
|
|
1794
|
+
return e;
|
|
1795
|
+
const r = n && n.encode || Ds;
|
|
1796
|
+
c.isFunction(n) && (n = {
|
|
1797
|
+
serialize: n
|
|
1798
|
+
});
|
|
1799
|
+
const s = n && n.serialize;
|
|
1800
|
+
let o;
|
|
1801
|
+
if (s ? o = s(t, n) : o = c.isURLSearchParams(t) ? t.toString() : new Rt(t, n).toString(r), o) {
|
|
1802
|
+
const a = e.indexOf("#");
|
|
1803
|
+
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1804
|
+
}
|
|
1805
|
+
return e;
|
|
1806
|
+
}
|
|
1807
|
+
class Ht {
|
|
1808
|
+
constructor() {
|
|
1809
|
+
this.handlers = [];
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Add a new interceptor to the stack
|
|
1813
|
+
*
|
|
1814
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1815
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
1816
|
+
*
|
|
1817
|
+
* @return {Number} An ID used to remove interceptor later
|
|
1818
|
+
*/
|
|
1819
|
+
use(t, n, r) {
|
|
1820
|
+
return this.handlers.push({
|
|
1821
|
+
fulfilled: t,
|
|
1822
|
+
rejected: n,
|
|
1823
|
+
synchronous: r ? r.synchronous : !1,
|
|
1824
|
+
runWhen: r ? r.runWhen : null
|
|
1825
|
+
}), this.handlers.length - 1;
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Remove an interceptor from the stack
|
|
1829
|
+
*
|
|
1830
|
+
* @param {Number} id The ID that was returned by `use`
|
|
1831
|
+
*
|
|
1832
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
1833
|
+
*/
|
|
1834
|
+
eject(t) {
|
|
1835
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Clear all interceptors from the stack
|
|
1839
|
+
*
|
|
1840
|
+
* @returns {void}
|
|
1841
|
+
*/
|
|
1842
|
+
clear() {
|
|
1843
|
+
this.handlers && (this.handlers = []);
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Iterate over all the registered interceptors
|
|
1847
|
+
*
|
|
1848
|
+
* This method is particularly useful for skipping over any
|
|
1849
|
+
* interceptors that may have become `null` calling `eject`.
|
|
1850
|
+
*
|
|
1851
|
+
* @param {Function} fn The function to call for each interceptor
|
|
1852
|
+
*
|
|
1853
|
+
* @returns {void}
|
|
1854
|
+
*/
|
|
1855
|
+
forEach(t) {
|
|
1856
|
+
c.forEach(this.handlers, function(r) {
|
|
1857
|
+
r !== null && t(r);
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
const Rn = {
|
|
1862
|
+
silentJSONParsing: !0,
|
|
1863
|
+
forcedJSONParsing: !0,
|
|
1864
|
+
clarifyTimeoutError: !1
|
|
1865
|
+
}, Ns = typeof URLSearchParams < "u" ? URLSearchParams : Rt, Fs = typeof FormData < "u" ? FormData : null, Ps = typeof Blob < "u" ? Blob : null, Us = {
|
|
1866
|
+
isBrowser: !0,
|
|
1867
|
+
classes: {
|
|
1868
|
+
URLSearchParams: Ns,
|
|
1869
|
+
FormData: Fs,
|
|
1870
|
+
Blob: Ps
|
|
1871
|
+
},
|
|
1872
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1873
|
+
}, wt = typeof window < "u" && typeof document < "u", mt = typeof navigator == "object" && navigator || void 0, Bs = wt && (!mt || ["ReactNative", "NativeScript", "NS"].indexOf(mt.product) < 0), js = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1874
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $s = wt && window.location.href || "http://localhost", Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1875
|
+
__proto__: null,
|
|
1876
|
+
hasBrowserEnv: wt,
|
|
1877
|
+
hasStandardBrowserEnv: Bs,
|
|
1878
|
+
hasStandardBrowserWebWorkerEnv: js,
|
|
1879
|
+
navigator: mt,
|
|
1880
|
+
origin: $s
|
|
1881
|
+
}, Symbol.toStringTag, { value: "Module" })), ee = {
|
|
1882
|
+
...Ls,
|
|
1883
|
+
...Us
|
|
1884
|
+
};
|
|
1885
|
+
function qs(e, t) {
|
|
1886
|
+
return ot(e, new ee.classes.URLSearchParams(), Object.assign({
|
|
1887
|
+
visitor: function(n, r, s, o) {
|
|
1888
|
+
return ee.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1889
|
+
}
|
|
1890
|
+
}, t));
|
|
1891
|
+
}
|
|
1892
|
+
function Ms(e) {
|
|
1893
|
+
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1894
|
+
}
|
|
1895
|
+
function Js(e) {
|
|
1896
|
+
const t = {}, n = Object.keys(e);
|
|
1897
|
+
let r;
|
|
1898
|
+
const s = n.length;
|
|
1899
|
+
let o;
|
|
1900
|
+
for (r = 0; r < s; r++)
|
|
1901
|
+
o = n[r], t[o] = e[o];
|
|
1902
|
+
return t;
|
|
1903
|
+
}
|
|
1904
|
+
function wn(e) {
|
|
1905
|
+
function t(n, r, s, o) {
|
|
1906
|
+
let a = n[o++];
|
|
1907
|
+
if (a === "__proto__") return !0;
|
|
1908
|
+
const l = Number.isFinite(+a), d = o >= n.length;
|
|
1909
|
+
return a = !a && c.isArray(s) ? s.length : a, d ? (c.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !l) : ((!s[a] || !c.isObject(s[a])) && (s[a] = []), t(n, r, s[a], o) && c.isArray(s[a]) && (s[a] = Js(s[a])), !l);
|
|
1910
|
+
}
|
|
1911
|
+
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
1912
|
+
const n = {};
|
|
1913
|
+
return c.forEachEntry(e, (r, s) => {
|
|
1914
|
+
t(Ms(r), s, n, 0);
|
|
1915
|
+
}), n;
|
|
1916
|
+
}
|
|
1917
|
+
return null;
|
|
1918
|
+
}
|
|
1919
|
+
function zs(e, t, n) {
|
|
1920
|
+
if (c.isString(e))
|
|
1921
|
+
try {
|
|
1922
|
+
return (t || JSON.parse)(e), c.trim(e);
|
|
1923
|
+
} catch (r) {
|
|
1924
|
+
if (r.name !== "SyntaxError")
|
|
1925
|
+
throw r;
|
|
1926
|
+
}
|
|
1927
|
+
return (n || JSON.stringify)(e);
|
|
1928
|
+
}
|
|
1929
|
+
const Me = {
|
|
1930
|
+
transitional: Rn,
|
|
1931
|
+
adapter: ["xhr", "http", "fetch"],
|
|
1932
|
+
transformRequest: [function(t, n) {
|
|
1933
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
1934
|
+
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
1935
|
+
return s ? JSON.stringify(wn(t)) : t;
|
|
1936
|
+
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
1937
|
+
return t;
|
|
1938
|
+
if (c.isArrayBufferView(t))
|
|
1939
|
+
return t.buffer;
|
|
1940
|
+
if (c.isURLSearchParams(t))
|
|
1941
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1942
|
+
let l;
|
|
1943
|
+
if (o) {
|
|
1944
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1945
|
+
return qs(t, this.formSerializer).toString();
|
|
1946
|
+
if ((l = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1947
|
+
const d = this.env && this.env.FormData;
|
|
1948
|
+
return ot(
|
|
1949
|
+
l ? { "files[]": t } : t,
|
|
1950
|
+
d && new d(),
|
|
1951
|
+
this.formSerializer
|
|
1952
|
+
);
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
return o || s ? (n.setContentType("application/json", !1), zs(t)) : t;
|
|
1956
|
+
}],
|
|
1957
|
+
transformResponse: [function(t) {
|
|
1958
|
+
const n = this.transitional || Me.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
1959
|
+
if (c.isResponse(t) || c.isReadableStream(t))
|
|
1960
|
+
return t;
|
|
1961
|
+
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
1962
|
+
const a = !(n && n.silentJSONParsing) && s;
|
|
1963
|
+
try {
|
|
1964
|
+
return JSON.parse(t);
|
|
1965
|
+
} catch (l) {
|
|
1966
|
+
if (a)
|
|
1967
|
+
throw l.name === "SyntaxError" ? j.from(l, j.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
return t;
|
|
1971
|
+
}],
|
|
1972
|
+
/**
|
|
1973
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1974
|
+
* timeout is not created.
|
|
1975
|
+
*/
|
|
1976
|
+
timeout: 0,
|
|
1977
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
1978
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1979
|
+
maxContentLength: -1,
|
|
1980
|
+
maxBodyLength: -1,
|
|
1981
|
+
env: {
|
|
1982
|
+
FormData: ee.classes.FormData,
|
|
1983
|
+
Blob: ee.classes.Blob
|
|
1984
|
+
},
|
|
1985
|
+
validateStatus: function(t) {
|
|
1986
|
+
return t >= 200 && t < 300;
|
|
1987
|
+
},
|
|
1988
|
+
headers: {
|
|
1989
|
+
common: {
|
|
1990
|
+
Accept: "application/json, text/plain, */*",
|
|
1991
|
+
"Content-Type": void 0
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
};
|
|
1995
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1996
|
+
Me.headers[e] = {};
|
|
1997
|
+
});
|
|
1998
|
+
const Hs = c.toObjectSet([
|
|
1999
|
+
"age",
|
|
2000
|
+
"authorization",
|
|
2001
|
+
"content-length",
|
|
2002
|
+
"content-type",
|
|
2003
|
+
"etag",
|
|
2004
|
+
"expires",
|
|
2005
|
+
"from",
|
|
2006
|
+
"host",
|
|
2007
|
+
"if-modified-since",
|
|
2008
|
+
"if-unmodified-since",
|
|
2009
|
+
"last-modified",
|
|
2010
|
+
"location",
|
|
2011
|
+
"max-forwards",
|
|
2012
|
+
"proxy-authorization",
|
|
2013
|
+
"referer",
|
|
2014
|
+
"retry-after",
|
|
2015
|
+
"user-agent"
|
|
2016
|
+
]), Is = (e) => {
|
|
2017
|
+
const t = {};
|
|
2018
|
+
let n, r, s;
|
|
2019
|
+
return e && e.split(`
|
|
2020
|
+
`).forEach(function(a) {
|
|
2021
|
+
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] && Hs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
2022
|
+
}), t;
|
|
2023
|
+
}, It = Symbol("internals");
|
|
2024
|
+
function Fe(e) {
|
|
2025
|
+
return e && String(e).trim().toLowerCase();
|
|
2026
|
+
}
|
|
2027
|
+
function We(e) {
|
|
2028
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(We) : String(e);
|
|
2029
|
+
}
|
|
2030
|
+
function Vs(e) {
|
|
2031
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2032
|
+
let r;
|
|
2033
|
+
for (; r = n.exec(e); )
|
|
2034
|
+
t[r[1]] = r[2];
|
|
2035
|
+
return t;
|
|
2036
|
+
}
|
|
2037
|
+
const Ws = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
2038
|
+
function ut(e, t, n, r, s) {
|
|
2039
|
+
if (c.isFunction(r))
|
|
2040
|
+
return r.call(this, t, n);
|
|
2041
|
+
if (s && (t = n), !!c.isString(t)) {
|
|
2042
|
+
if (c.isString(r))
|
|
2043
|
+
return t.indexOf(r) !== -1;
|
|
2044
|
+
if (c.isRegExp(r))
|
|
2045
|
+
return r.test(t);
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
function Ks(e) {
|
|
2049
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
2050
|
+
}
|
|
2051
|
+
function Gs(e, t) {
|
|
2052
|
+
const n = c.toCamelCase(" " + t);
|
|
2053
|
+
["get", "set", "has"].forEach((r) => {
|
|
2054
|
+
Object.defineProperty(e, r + n, {
|
|
2055
|
+
value: function(s, o, a) {
|
|
2056
|
+
return this[r].call(this, t, s, o, a);
|
|
2057
|
+
},
|
|
2058
|
+
configurable: !0
|
|
2059
|
+
});
|
|
2060
|
+
});
|
|
2061
|
+
}
|
|
2062
|
+
let se = class {
|
|
2063
|
+
constructor(t) {
|
|
2064
|
+
t && this.set(t);
|
|
2065
|
+
}
|
|
2066
|
+
set(t, n, r) {
|
|
2067
|
+
const s = this;
|
|
2068
|
+
function o(l, d, f) {
|
|
2069
|
+
const y = Fe(d);
|
|
2070
|
+
if (!y)
|
|
2071
|
+
throw new Error("header name must be a non-empty string");
|
|
2072
|
+
const i = c.findKey(s, y);
|
|
2073
|
+
(!i || s[i] === void 0 || f === !0 || f === void 0 && s[i] !== !1) && (s[i || d] = We(l));
|
|
2074
|
+
}
|
|
2075
|
+
const a = (l, d) => c.forEach(l, (f, y) => o(f, y, d));
|
|
2076
|
+
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
2077
|
+
a(t, n);
|
|
2078
|
+
else if (c.isString(t) && (t = t.trim()) && !Ws(t))
|
|
2079
|
+
a(Is(t), n);
|
|
2080
|
+
else if (c.isObject(t) && c.isIterable(t)) {
|
|
2081
|
+
let l = {}, d, f;
|
|
2082
|
+
for (const y of t) {
|
|
2083
|
+
if (!c.isArray(y))
|
|
2084
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
2085
|
+
l[f = y[0]] = (d = l[f]) ? c.isArray(d) ? [...d, y[1]] : [d, y[1]] : y[1];
|
|
2086
|
+
}
|
|
2087
|
+
a(l, n);
|
|
2088
|
+
} else
|
|
2089
|
+
t != null && o(n, t, r);
|
|
2090
|
+
return this;
|
|
2091
|
+
}
|
|
2092
|
+
get(t, n) {
|
|
2093
|
+
if (t = Fe(t), t) {
|
|
2094
|
+
const r = c.findKey(this, t);
|
|
2095
|
+
if (r) {
|
|
2096
|
+
const s = this[r];
|
|
2097
|
+
if (!n)
|
|
2098
|
+
return s;
|
|
2099
|
+
if (n === !0)
|
|
2100
|
+
return Vs(s);
|
|
2101
|
+
if (c.isFunction(n))
|
|
2102
|
+
return n.call(this, s, r);
|
|
2103
|
+
if (c.isRegExp(n))
|
|
2104
|
+
return n.exec(s);
|
|
2105
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
has(t, n) {
|
|
2110
|
+
if (t = Fe(t), t) {
|
|
2111
|
+
const r = c.findKey(this, t);
|
|
2112
|
+
return !!(r && this[r] !== void 0 && (!n || ut(this, this[r], r, n)));
|
|
2113
|
+
}
|
|
2114
|
+
return !1;
|
|
2115
|
+
}
|
|
2116
|
+
delete(t, n) {
|
|
2117
|
+
const r = this;
|
|
2118
|
+
let s = !1;
|
|
2119
|
+
function o(a) {
|
|
2120
|
+
if (a = Fe(a), a) {
|
|
2121
|
+
const l = c.findKey(r, a);
|
|
2122
|
+
l && (!n || ut(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
return c.isArray(t) ? t.forEach(o) : o(t), s;
|
|
2126
|
+
}
|
|
2127
|
+
clear(t) {
|
|
2128
|
+
const n = Object.keys(this);
|
|
2129
|
+
let r = n.length, s = !1;
|
|
2130
|
+
for (; r--; ) {
|
|
2131
|
+
const o = n[r];
|
|
2132
|
+
(!t || ut(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
2133
|
+
}
|
|
2134
|
+
return s;
|
|
2135
|
+
}
|
|
2136
|
+
normalize(t) {
|
|
2137
|
+
const n = this, r = {};
|
|
2138
|
+
return c.forEach(this, (s, o) => {
|
|
2139
|
+
const a = c.findKey(r, o);
|
|
2140
|
+
if (a) {
|
|
2141
|
+
n[a] = We(s), delete n[o];
|
|
2142
|
+
return;
|
|
2143
|
+
}
|
|
2144
|
+
const l = t ? Ks(o) : String(o).trim();
|
|
2145
|
+
l !== o && delete n[o], n[l] = We(s), r[l] = !0;
|
|
2146
|
+
}), this;
|
|
2147
|
+
}
|
|
2148
|
+
concat(...t) {
|
|
2149
|
+
return this.constructor.concat(this, ...t);
|
|
2150
|
+
}
|
|
2151
|
+
toJSON(t) {
|
|
2152
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
2153
|
+
return c.forEach(this, (r, s) => {
|
|
2154
|
+
r != null && r !== !1 && (n[s] = t && c.isArray(r) ? r.join(", ") : r);
|
|
2155
|
+
}), n;
|
|
2156
|
+
}
|
|
2157
|
+
[Symbol.iterator]() {
|
|
2158
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
2159
|
+
}
|
|
2160
|
+
toString() {
|
|
2161
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
2162
|
+
`);
|
|
2163
|
+
}
|
|
2164
|
+
getSetCookie() {
|
|
2165
|
+
return this.get("set-cookie") || [];
|
|
2166
|
+
}
|
|
2167
|
+
get [Symbol.toStringTag]() {
|
|
2168
|
+
return "AxiosHeaders";
|
|
2169
|
+
}
|
|
2170
|
+
static from(t) {
|
|
2171
|
+
return t instanceof this ? t : new this(t);
|
|
2172
|
+
}
|
|
2173
|
+
static concat(t, ...n) {
|
|
2174
|
+
const r = new this(t);
|
|
2175
|
+
return n.forEach((s) => r.set(s)), r;
|
|
2176
|
+
}
|
|
2177
|
+
static accessor(t) {
|
|
2178
|
+
const r = (this[It] = this[It] = {
|
|
2179
|
+
accessors: {}
|
|
2180
|
+
}).accessors, s = this.prototype;
|
|
2181
|
+
function o(a) {
|
|
2182
|
+
const l = Fe(a);
|
|
2183
|
+
r[l] || (Gs(s, a), r[l] = !0);
|
|
2184
|
+
}
|
|
2185
|
+
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
2186
|
+
}
|
|
2187
|
+
};
|
|
2188
|
+
se.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
2189
|
+
c.reduceDescriptors(se.prototype, ({ value: e }, t) => {
|
|
2190
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
2191
|
+
return {
|
|
2192
|
+
get: () => e,
|
|
2193
|
+
set(r) {
|
|
2194
|
+
this[n] = r;
|
|
2195
|
+
}
|
|
2196
|
+
};
|
|
2197
|
+
});
|
|
2198
|
+
c.freezeMethods(se);
|
|
2199
|
+
function ft(e, t) {
|
|
2200
|
+
const n = this || Me, r = t || n, s = se.from(r.headers);
|
|
2201
|
+
let o = r.data;
|
|
2202
|
+
return c.forEach(e, function(l) {
|
|
2203
|
+
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
2204
|
+
}), s.normalize(), o;
|
|
2205
|
+
}
|
|
2206
|
+
function On(e) {
|
|
2207
|
+
return !!(e && e.__CANCEL__);
|
|
2208
|
+
}
|
|
2209
|
+
function Ae(e, t, n) {
|
|
2210
|
+
j.call(this, e ?? "canceled", j.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
2211
|
+
}
|
|
2212
|
+
c.inherits(Ae, j, {
|
|
2213
|
+
__CANCEL__: !0
|
|
2214
|
+
});
|
|
2215
|
+
function Tn(e, t, n) {
|
|
2216
|
+
const r = n.config.validateStatus;
|
|
2217
|
+
!n.status || !r || r(n.status) ? e(n) : t(new j(
|
|
2218
|
+
"Request failed with status code " + n.status,
|
|
2219
|
+
[j.ERR_BAD_REQUEST, j.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
2220
|
+
n.config,
|
|
2221
|
+
n.request,
|
|
2222
|
+
n
|
|
2223
|
+
));
|
|
2224
|
+
}
|
|
2225
|
+
function Xs(e) {
|
|
2226
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
2227
|
+
return t && t[1] || "";
|
|
2228
|
+
}
|
|
2229
|
+
function Zs(e, t) {
|
|
2230
|
+
e = e || 10;
|
|
2231
|
+
const n = new Array(e), r = new Array(e);
|
|
2232
|
+
let s = 0, o = 0, a;
|
|
2233
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
2234
|
+
const f = Date.now(), y = r[o];
|
|
2235
|
+
a || (a = f), n[s] = d, r[s] = f;
|
|
2236
|
+
let i = o, _ = 0;
|
|
2237
|
+
for (; i !== s; )
|
|
2238
|
+
_ += n[i++], i = i % e;
|
|
2239
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - a < t)
|
|
2240
|
+
return;
|
|
2241
|
+
const w = y && f - y;
|
|
2242
|
+
return w ? Math.round(_ * 1e3 / w) : void 0;
|
|
2243
|
+
};
|
|
2244
|
+
}
|
|
2245
|
+
function Qs(e, t) {
|
|
2246
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
2247
|
+
const a = (f, y = Date.now()) => {
|
|
2248
|
+
n = y, s = null, o && (clearTimeout(o), o = null), e.apply(null, f);
|
|
2249
|
+
};
|
|
2250
|
+
return [(...f) => {
|
|
2251
|
+
const y = Date.now(), i = y - n;
|
|
2252
|
+
i >= r ? a(f, y) : (s = f, o || (o = setTimeout(() => {
|
|
2253
|
+
o = null, a(s);
|
|
2254
|
+
}, r - i)));
|
|
2255
|
+
}, () => s && a(s)];
|
|
2256
|
+
}
|
|
2257
|
+
const Xe = (e, t, n = 3) => {
|
|
2258
|
+
let r = 0;
|
|
2259
|
+
const s = Zs(50, 250);
|
|
2260
|
+
return Qs((o) => {
|
|
2261
|
+
const a = o.loaded, l = o.lengthComputable ? o.total : void 0, d = a - r, f = s(d), y = a <= l;
|
|
2262
|
+
r = a;
|
|
2263
|
+
const i = {
|
|
2264
|
+
loaded: a,
|
|
2265
|
+
total: l,
|
|
2266
|
+
progress: l ? a / l : void 0,
|
|
2267
|
+
bytes: d,
|
|
2268
|
+
rate: f || void 0,
|
|
2269
|
+
estimated: f && l && y ? (l - a) / f : void 0,
|
|
2270
|
+
event: o,
|
|
2271
|
+
lengthComputable: l != null,
|
|
2272
|
+
[t ? "download" : "upload"]: !0
|
|
2273
|
+
};
|
|
2274
|
+
e(i);
|
|
2275
|
+
}, n);
|
|
2276
|
+
}, Vt = (e, t) => {
|
|
2277
|
+
const n = e != null;
|
|
2278
|
+
return [(r) => t[0]({
|
|
2279
|
+
lengthComputable: n,
|
|
2280
|
+
total: e,
|
|
2281
|
+
loaded: r
|
|
2282
|
+
}), t[1]];
|
|
2283
|
+
}, Wt = (e) => (...t) => c.asap(() => e(...t)), Ys = ee.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ee.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
2284
|
+
new URL(ee.origin),
|
|
2285
|
+
ee.navigator && /(msie|trident)/i.test(ee.navigator.userAgent)
|
|
2286
|
+
) : () => !0, eo = ee.hasStandardBrowserEnv ? (
|
|
2287
|
+
// Standard browser envs support document.cookie
|
|
2288
|
+
{
|
|
2289
|
+
write(e, t, n, r, s, o) {
|
|
2290
|
+
const a = [e + "=" + encodeURIComponent(t)];
|
|
2291
|
+
c.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), c.isString(r) && a.push("path=" + r), c.isString(s) && a.push("domain=" + s), o === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
2292
|
+
},
|
|
2293
|
+
read(e) {
|
|
2294
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
2295
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
2296
|
+
},
|
|
2297
|
+
remove(e) {
|
|
2298
|
+
this.write(e, "", Date.now() - 864e5);
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
) : (
|
|
2302
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
2303
|
+
{
|
|
2304
|
+
write() {
|
|
2305
|
+
},
|
|
2306
|
+
read() {
|
|
2307
|
+
return null;
|
|
2308
|
+
},
|
|
2309
|
+
remove() {
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2313
|
+
function to(e) {
|
|
2314
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
2315
|
+
}
|
|
2316
|
+
function no(e, t) {
|
|
2317
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
2318
|
+
}
|
|
2319
|
+
function _n(e, t, n) {
|
|
2320
|
+
let r = !to(t);
|
|
2321
|
+
return e && (r || n == !1) ? no(e, t) : t;
|
|
2322
|
+
}
|
|
2323
|
+
const Kt = (e) => e instanceof se ? { ...e } : e;
|
|
2324
|
+
function Se(e, t) {
|
|
2325
|
+
t = t || {};
|
|
2326
|
+
const n = {};
|
|
2327
|
+
function r(f, y, i, _) {
|
|
2328
|
+
return c.isPlainObject(f) && c.isPlainObject(y) ? c.merge.call({ caseless: _ }, f, y) : c.isPlainObject(y) ? c.merge({}, y) : c.isArray(y) ? y.slice() : y;
|
|
2329
|
+
}
|
|
2330
|
+
function s(f, y, i, _) {
|
|
2331
|
+
if (c.isUndefined(y)) {
|
|
2332
|
+
if (!c.isUndefined(f))
|
|
2333
|
+
return r(void 0, f, i, _);
|
|
2334
|
+
} else return r(f, y, i, _);
|
|
2335
|
+
}
|
|
2336
|
+
function o(f, y) {
|
|
2337
|
+
if (!c.isUndefined(y))
|
|
2338
|
+
return r(void 0, y);
|
|
2339
|
+
}
|
|
2340
|
+
function a(f, y) {
|
|
2341
|
+
if (c.isUndefined(y)) {
|
|
2342
|
+
if (!c.isUndefined(f))
|
|
2343
|
+
return r(void 0, f);
|
|
2344
|
+
} else return r(void 0, y);
|
|
2345
|
+
}
|
|
2346
|
+
function l(f, y, i) {
|
|
2347
|
+
if (i in t)
|
|
2348
|
+
return r(f, y);
|
|
2349
|
+
if (i in e)
|
|
2350
|
+
return r(void 0, f);
|
|
2351
|
+
}
|
|
2352
|
+
const d = {
|
|
2353
|
+
url: o,
|
|
2354
|
+
method: o,
|
|
2355
|
+
data: o,
|
|
2356
|
+
baseURL: a,
|
|
2357
|
+
transformRequest: a,
|
|
2358
|
+
transformResponse: a,
|
|
2359
|
+
paramsSerializer: a,
|
|
2360
|
+
timeout: a,
|
|
2361
|
+
timeoutMessage: a,
|
|
2362
|
+
withCredentials: a,
|
|
2363
|
+
withXSRFToken: a,
|
|
2364
|
+
adapter: a,
|
|
2365
|
+
responseType: a,
|
|
2366
|
+
xsrfCookieName: a,
|
|
2367
|
+
xsrfHeaderName: a,
|
|
2368
|
+
onUploadProgress: a,
|
|
2369
|
+
onDownloadProgress: a,
|
|
2370
|
+
decompress: a,
|
|
2371
|
+
maxContentLength: a,
|
|
2372
|
+
maxBodyLength: a,
|
|
2373
|
+
beforeRedirect: a,
|
|
2374
|
+
transport: a,
|
|
2375
|
+
httpAgent: a,
|
|
2376
|
+
httpsAgent: a,
|
|
2377
|
+
cancelToken: a,
|
|
2378
|
+
socketPath: a,
|
|
2379
|
+
responseEncoding: a,
|
|
2380
|
+
validateStatus: l,
|
|
2381
|
+
headers: (f, y, i) => s(Kt(f), Kt(y), i, !0)
|
|
2382
|
+
};
|
|
2383
|
+
return c.forEach(Object.keys(Object.assign({}, e, t)), function(y) {
|
|
2384
|
+
const i = d[y] || s, _ = i(e[y], t[y], y);
|
|
2385
|
+
c.isUndefined(_) && i !== l || (n[y] = _);
|
|
2386
|
+
}), n;
|
|
2387
|
+
}
|
|
2388
|
+
const An = (e) => {
|
|
2389
|
+
const t = Se({}, e);
|
|
2390
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: a, auth: l } = t;
|
|
2391
|
+
t.headers = a = se.from(a), t.url = Sn(_n(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && a.set(
|
|
2392
|
+
"Authorization",
|
|
2393
|
+
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
2394
|
+
);
|
|
2395
|
+
let d;
|
|
2396
|
+
if (c.isFormData(n)) {
|
|
2397
|
+
if (ee.hasStandardBrowserEnv || ee.hasStandardBrowserWebWorkerEnv)
|
|
2398
|
+
a.setContentType(void 0);
|
|
2399
|
+
else if ((d = a.getContentType()) !== !1) {
|
|
2400
|
+
const [f, ...y] = d ? d.split(";").map((i) => i.trim()).filter(Boolean) : [];
|
|
2401
|
+
a.setContentType([f || "multipart/form-data", ...y].join("; "));
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
if (ee.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Ys(t.url))) {
|
|
2405
|
+
const f = s && o && eo.read(o);
|
|
2406
|
+
f && a.set(s, f);
|
|
2407
|
+
}
|
|
2408
|
+
return t;
|
|
2409
|
+
}, ro = typeof XMLHttpRequest < "u", so = ro && function(e) {
|
|
2410
|
+
return new Promise(function(n, r) {
|
|
2411
|
+
const s = An(e);
|
|
2412
|
+
let o = s.data;
|
|
2413
|
+
const a = se.from(s.headers).normalize();
|
|
2414
|
+
let { responseType: l, onUploadProgress: d, onDownloadProgress: f } = s, y, i, _, w, g;
|
|
2415
|
+
function A() {
|
|
2416
|
+
w && w(), g && g(), s.cancelToken && s.cancelToken.unsubscribe(y), s.signal && s.signal.removeEventListener("abort", y);
|
|
2417
|
+
}
|
|
2418
|
+
let u = new XMLHttpRequest();
|
|
2419
|
+
u.open(s.method.toUpperCase(), s.url, !0), u.timeout = s.timeout;
|
|
2420
|
+
function h() {
|
|
2421
|
+
if (!u)
|
|
2422
|
+
return;
|
|
2423
|
+
const R = se.from(
|
|
2424
|
+
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
2425
|
+
), m = {
|
|
2426
|
+
data: !l || l === "text" || l === "json" ? u.responseText : u.response,
|
|
2427
|
+
status: u.status,
|
|
2428
|
+
statusText: u.statusText,
|
|
2429
|
+
headers: R,
|
|
2430
|
+
config: e,
|
|
2431
|
+
request: u
|
|
2432
|
+
};
|
|
2433
|
+
Tn(function(S) {
|
|
2434
|
+
n(S), A();
|
|
2435
|
+
}, function(S) {
|
|
2436
|
+
r(S), A();
|
|
2437
|
+
}, m), u = null;
|
|
2438
|
+
}
|
|
2439
|
+
"onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
|
|
2440
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(h);
|
|
2441
|
+
}, u.onabort = function() {
|
|
2442
|
+
u && (r(new j("Request aborted", j.ECONNABORTED, e, u)), u = null);
|
|
2443
|
+
}, u.onerror = function() {
|
|
2444
|
+
r(new j("Network Error", j.ERR_NETWORK, e, u)), u = null;
|
|
2445
|
+
}, u.ontimeout = function() {
|
|
2446
|
+
let b = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
2447
|
+
const m = s.transitional || Rn;
|
|
2448
|
+
s.timeoutErrorMessage && (b = s.timeoutErrorMessage), r(new j(
|
|
2449
|
+
b,
|
|
2450
|
+
m.clarifyTimeoutError ? j.ETIMEDOUT : j.ECONNABORTED,
|
|
2451
|
+
e,
|
|
2452
|
+
u
|
|
2453
|
+
)), u = null;
|
|
2454
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in u && c.forEach(a.toJSON(), function(b, m) {
|
|
2455
|
+
u.setRequestHeader(m, b);
|
|
2456
|
+
}), c.isUndefined(s.withCredentials) || (u.withCredentials = !!s.withCredentials), l && l !== "json" && (u.responseType = s.responseType), f && ([_, g] = Xe(f, !0), u.addEventListener("progress", _)), d && u.upload && ([i, w] = Xe(d), u.upload.addEventListener("progress", i), u.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (y = (R) => {
|
|
2457
|
+
u && (r(!R || R.type ? new Ae(null, e, u) : R), u.abort(), u = null);
|
|
2458
|
+
}, s.cancelToken && s.cancelToken.subscribe(y), s.signal && (s.signal.aborted ? y() : s.signal.addEventListener("abort", y)));
|
|
2459
|
+
const p = Xs(s.url);
|
|
2460
|
+
if (p && ee.protocols.indexOf(p) === -1) {
|
|
2461
|
+
r(new j("Unsupported protocol " + p + ":", j.ERR_BAD_REQUEST, e));
|
|
2462
|
+
return;
|
|
2463
|
+
}
|
|
2464
|
+
u.send(o || null);
|
|
2465
|
+
});
|
|
2466
|
+
}, oo = (e, t) => {
|
|
2467
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
2468
|
+
if (t || n) {
|
|
2469
|
+
let r = new AbortController(), s;
|
|
2470
|
+
const o = function(f) {
|
|
2471
|
+
if (!s) {
|
|
2472
|
+
s = !0, l();
|
|
2473
|
+
const y = f instanceof Error ? f : this.reason;
|
|
2474
|
+
r.abort(y instanceof j ? y : new Ae(y instanceof Error ? y.message : y));
|
|
2475
|
+
}
|
|
2476
|
+
};
|
|
2477
|
+
let a = t && setTimeout(() => {
|
|
2478
|
+
a = null, o(new j(`timeout ${t} of ms exceeded`, j.ETIMEDOUT));
|
|
2479
|
+
}, t);
|
|
2480
|
+
const l = () => {
|
|
2481
|
+
e && (a && clearTimeout(a), a = null, e.forEach((f) => {
|
|
2482
|
+
f.unsubscribe ? f.unsubscribe(o) : f.removeEventListener("abort", o);
|
|
2483
|
+
}), e = null);
|
|
2484
|
+
};
|
|
2485
|
+
e.forEach((f) => f.addEventListener("abort", o));
|
|
2486
|
+
const { signal: d } = r;
|
|
2487
|
+
return d.unsubscribe = () => c.asap(l), d;
|
|
2488
|
+
}
|
|
2489
|
+
}, ao = function* (e, t) {
|
|
2490
|
+
let n = e.byteLength;
|
|
2491
|
+
if (n < t) {
|
|
2492
|
+
yield e;
|
|
2493
|
+
return;
|
|
2494
|
+
}
|
|
2495
|
+
let r = 0, s;
|
|
2496
|
+
for (; r < n; )
|
|
2497
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
2498
|
+
}, lo = async function* (e, t) {
|
|
2499
|
+
for await (const n of io(e))
|
|
2500
|
+
yield* ao(n, t);
|
|
2501
|
+
}, io = async function* (e) {
|
|
2502
|
+
if (e[Symbol.asyncIterator]) {
|
|
2503
|
+
yield* e;
|
|
2504
|
+
return;
|
|
2505
|
+
}
|
|
2506
|
+
const t = e.getReader();
|
|
2507
|
+
try {
|
|
2508
|
+
for (; ; ) {
|
|
2509
|
+
const { done: n, value: r } = await t.read();
|
|
2510
|
+
if (n)
|
|
2511
|
+
break;
|
|
2512
|
+
yield r;
|
|
2513
|
+
}
|
|
2514
|
+
} finally {
|
|
2515
|
+
await t.cancel();
|
|
2516
|
+
}
|
|
2517
|
+
}, Gt = (e, t, n, r) => {
|
|
2518
|
+
const s = lo(e, t);
|
|
2519
|
+
let o = 0, a, l = (d) => {
|
|
2520
|
+
a || (a = !0, r && r(d));
|
|
2521
|
+
};
|
|
2522
|
+
return new ReadableStream({
|
|
2523
|
+
async pull(d) {
|
|
2524
|
+
try {
|
|
2525
|
+
const { done: f, value: y } = await s.next();
|
|
2526
|
+
if (f) {
|
|
2527
|
+
l(), d.close();
|
|
2528
|
+
return;
|
|
2529
|
+
}
|
|
2530
|
+
let i = y.byteLength;
|
|
2531
|
+
if (n) {
|
|
2532
|
+
let _ = o += i;
|
|
2533
|
+
n(_);
|
|
2534
|
+
}
|
|
2535
|
+
d.enqueue(new Uint8Array(y));
|
|
2536
|
+
} catch (f) {
|
|
2537
|
+
throw l(f), f;
|
|
2538
|
+
}
|
|
2539
|
+
},
|
|
2540
|
+
cancel(d) {
|
|
2541
|
+
return l(d), s.return();
|
|
2542
|
+
}
|
|
2543
|
+
}, {
|
|
2544
|
+
highWaterMark: 2
|
|
2545
|
+
});
|
|
2546
|
+
}, at = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Cn = at && typeof ReadableStream == "function", co = at && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), xn = (e, ...t) => {
|
|
2547
|
+
try {
|
|
2548
|
+
return !!e(...t);
|
|
2549
|
+
} catch {
|
|
2550
|
+
return !1;
|
|
2551
|
+
}
|
|
2552
|
+
}, uo = Cn && xn(() => {
|
|
2553
|
+
let e = !1;
|
|
2554
|
+
const t = new Request(ee.origin, {
|
|
2555
|
+
body: new ReadableStream(),
|
|
2556
|
+
method: "POST",
|
|
2557
|
+
get duplex() {
|
|
2558
|
+
return e = !0, "half";
|
|
2559
|
+
}
|
|
2560
|
+
}).headers.has("Content-Type");
|
|
2561
|
+
return e && !t;
|
|
2562
|
+
}), Xt = 64 * 1024, yt = Cn && xn(() => c.isReadableStream(new Response("").body)), Ze = {
|
|
2563
|
+
stream: yt && ((e) => e.body)
|
|
2564
|
+
};
|
|
2565
|
+
at && ((e) => {
|
|
2566
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
2567
|
+
!Ze[t] && (Ze[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
2568
|
+
throw new j(`Response type '${t}' is not supported`, j.ERR_NOT_SUPPORT, r);
|
|
2569
|
+
});
|
|
2570
|
+
});
|
|
2571
|
+
})(new Response());
|
|
2572
|
+
const fo = async (e) => {
|
|
2573
|
+
if (e == null)
|
|
2574
|
+
return 0;
|
|
2575
|
+
if (c.isBlob(e))
|
|
2576
|
+
return e.size;
|
|
2577
|
+
if (c.isSpecCompliantForm(e))
|
|
2578
|
+
return (await new Request(ee.origin, {
|
|
2579
|
+
method: "POST",
|
|
2580
|
+
body: e
|
|
2581
|
+
}).arrayBuffer()).byteLength;
|
|
2582
|
+
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
2583
|
+
return e.byteLength;
|
|
2584
|
+
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
2585
|
+
return (await co(e)).byteLength;
|
|
2586
|
+
}, po = async (e, t) => {
|
|
2587
|
+
const n = c.toFiniteNumber(e.getContentLength());
|
|
2588
|
+
return n ?? fo(t);
|
|
2589
|
+
}, ho = at && (async (e) => {
|
|
2590
|
+
let {
|
|
2591
|
+
url: t,
|
|
2592
|
+
method: n,
|
|
2593
|
+
data: r,
|
|
2594
|
+
signal: s,
|
|
2595
|
+
cancelToken: o,
|
|
2596
|
+
timeout: a,
|
|
2597
|
+
onDownloadProgress: l,
|
|
2598
|
+
onUploadProgress: d,
|
|
2599
|
+
responseType: f,
|
|
2600
|
+
headers: y,
|
|
2601
|
+
withCredentials: i = "same-origin",
|
|
2602
|
+
fetchOptions: _
|
|
2603
|
+
} = An(e);
|
|
2604
|
+
f = f ? (f + "").toLowerCase() : "text";
|
|
2605
|
+
let w = oo([s, o && o.toAbortSignal()], a), g;
|
|
2606
|
+
const A = w && w.unsubscribe && (() => {
|
|
2607
|
+
w.unsubscribe();
|
|
2608
|
+
});
|
|
2609
|
+
let u;
|
|
2610
|
+
try {
|
|
2611
|
+
if (d && uo && n !== "get" && n !== "head" && (u = await po(y, r)) !== 0) {
|
|
2612
|
+
let m = new Request(t, {
|
|
2613
|
+
method: "POST",
|
|
2614
|
+
body: r,
|
|
2615
|
+
duplex: "half"
|
|
2616
|
+
}), E;
|
|
2617
|
+
if (c.isFormData(r) && (E = m.headers.get("content-type")) && y.setContentType(E), m.body) {
|
|
2618
|
+
const [S, D] = Vt(
|
|
2619
|
+
u,
|
|
2620
|
+
Xe(Wt(d))
|
|
2621
|
+
);
|
|
2622
|
+
r = Gt(m.body, Xt, S, D);
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
c.isString(i) || (i = i ? "include" : "omit");
|
|
2626
|
+
const h = "credentials" in Request.prototype;
|
|
2627
|
+
g = new Request(t, {
|
|
2628
|
+
..._,
|
|
2629
|
+
signal: w,
|
|
2630
|
+
method: n.toUpperCase(),
|
|
2631
|
+
headers: y.normalize().toJSON(),
|
|
2632
|
+
body: r,
|
|
2633
|
+
duplex: "half",
|
|
2634
|
+
credentials: h ? i : void 0
|
|
2635
|
+
});
|
|
2636
|
+
let p = await fetch(g);
|
|
2637
|
+
const R = yt && (f === "stream" || f === "response");
|
|
2638
|
+
if (yt && (l || R && A)) {
|
|
2639
|
+
const m = {};
|
|
2640
|
+
["status", "statusText", "headers"].forEach((N) => {
|
|
2641
|
+
m[N] = p[N];
|
|
2642
|
+
});
|
|
2643
|
+
const E = c.toFiniteNumber(p.headers.get("content-length")), [S, D] = l && Vt(
|
|
2644
|
+
E,
|
|
2645
|
+
Xe(Wt(l), !0)
|
|
2646
|
+
) || [];
|
|
2647
|
+
p = new Response(
|
|
2648
|
+
Gt(p.body, Xt, S, () => {
|
|
2649
|
+
D && D(), A && A();
|
|
2650
|
+
}),
|
|
2651
|
+
m
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2654
|
+
f = f || "text";
|
|
2655
|
+
let b = await Ze[c.findKey(Ze, f) || "text"](p, e);
|
|
2656
|
+
return !R && A && A(), await new Promise((m, E) => {
|
|
2657
|
+
Tn(m, E, {
|
|
2658
|
+
data: b,
|
|
2659
|
+
headers: se.from(p.headers),
|
|
2660
|
+
status: p.status,
|
|
2661
|
+
statusText: p.statusText,
|
|
2662
|
+
config: e,
|
|
2663
|
+
request: g
|
|
2664
|
+
});
|
|
2665
|
+
});
|
|
2666
|
+
} catch (h) {
|
|
2667
|
+
throw A && A(), h && h.name === "TypeError" && /Load failed|fetch/i.test(h.message) ? Object.assign(
|
|
2668
|
+
new j("Network Error", j.ERR_NETWORK, e, g),
|
|
2669
|
+
{
|
|
2670
|
+
cause: h.cause || h
|
|
2671
|
+
}
|
|
2672
|
+
) : j.from(h, h && h.code, e, g);
|
|
2673
|
+
}
|
|
2674
|
+
}), bt = {
|
|
2675
|
+
http: As,
|
|
2676
|
+
xhr: so,
|
|
2677
|
+
fetch: ho
|
|
2678
|
+
};
|
|
2679
|
+
c.forEach(bt, (e, t) => {
|
|
2680
|
+
if (e) {
|
|
2681
|
+
try {
|
|
2682
|
+
Object.defineProperty(e, "name", { value: t });
|
|
2683
|
+
} catch {
|
|
2684
|
+
}
|
|
2685
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
2686
|
+
}
|
|
2687
|
+
});
|
|
2688
|
+
const Zt = (e) => `- ${e}`, mo = (e) => c.isFunction(e) || e === null || e === !1, Dn = {
|
|
2689
|
+
getAdapter: (e) => {
|
|
2690
|
+
e = c.isArray(e) ? e : [e];
|
|
2691
|
+
const { length: t } = e;
|
|
2692
|
+
let n, r;
|
|
2693
|
+
const s = {};
|
|
2694
|
+
for (let o = 0; o < t; o++) {
|
|
2695
|
+
n = e[o];
|
|
2696
|
+
let a;
|
|
2697
|
+
if (r = n, !mo(n) && (r = bt[(a = String(n)).toLowerCase()], r === void 0))
|
|
2698
|
+
throw new j(`Unknown adapter '${a}'`);
|
|
2699
|
+
if (r)
|
|
2700
|
+
break;
|
|
2701
|
+
s[a || "#" + o] = r;
|
|
2702
|
+
}
|
|
2703
|
+
if (!r) {
|
|
2704
|
+
const o = Object.entries(s).map(
|
|
2705
|
+
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2706
|
+
);
|
|
2707
|
+
let a = t ? o.length > 1 ? `since :
|
|
2708
|
+
` + o.map(Zt).join(`
|
|
2709
|
+
`) : " " + Zt(o[0]) : "as no adapter specified";
|
|
2710
|
+
throw new j(
|
|
2711
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
2712
|
+
"ERR_NOT_SUPPORT"
|
|
2713
|
+
);
|
|
2714
|
+
}
|
|
2715
|
+
return r;
|
|
2716
|
+
},
|
|
2717
|
+
adapters: bt
|
|
2718
|
+
};
|
|
2719
|
+
function pt(e) {
|
|
2720
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2721
|
+
throw new Ae(null, e);
|
|
2722
|
+
}
|
|
2723
|
+
function Qt(e) {
|
|
2724
|
+
return pt(e), e.headers = se.from(e.headers), e.data = ft.call(
|
|
2725
|
+
e,
|
|
2726
|
+
e.transformRequest
|
|
2727
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Dn.getAdapter(e.adapter || Me.adapter)(e).then(function(r) {
|
|
2728
|
+
return pt(e), r.data = ft.call(
|
|
2729
|
+
e,
|
|
2730
|
+
e.transformResponse,
|
|
2731
|
+
r
|
|
2732
|
+
), r.headers = se.from(r.headers), r;
|
|
2733
|
+
}, function(r) {
|
|
2734
|
+
return On(r) || (pt(e), r && r.response && (r.response.data = ft.call(
|
|
2735
|
+
e,
|
|
2736
|
+
e.transformResponse,
|
|
2737
|
+
r.response
|
|
2738
|
+
), r.response.headers = se.from(r.response.headers))), Promise.reject(r);
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2741
|
+
const Nn = "1.9.0", lt = {};
|
|
2742
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2743
|
+
lt[e] = function(r) {
|
|
2744
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2745
|
+
};
|
|
2746
|
+
});
|
|
2747
|
+
const Yt = {};
|
|
2748
|
+
lt.transitional = function(t, n, r) {
|
|
2749
|
+
function s(o, a) {
|
|
2750
|
+
return "[Axios v" + Nn + "] Transitional option '" + o + "'" + a + (r ? ". " + r : "");
|
|
2751
|
+
}
|
|
2752
|
+
return (o, a, l) => {
|
|
2753
|
+
if (t === !1)
|
|
2754
|
+
throw new j(
|
|
2755
|
+
s(a, " has been removed" + (n ? " in " + n : "")),
|
|
2756
|
+
j.ERR_DEPRECATED
|
|
2757
|
+
);
|
|
2758
|
+
return n && !Yt[a] && (Yt[a] = !0, console.warn(
|
|
2759
|
+
s(
|
|
2760
|
+
a,
|
|
2761
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2762
|
+
)
|
|
2763
|
+
)), t ? t(o, a, l) : !0;
|
|
2764
|
+
};
|
|
2765
|
+
};
|
|
2766
|
+
lt.spelling = function(t) {
|
|
2767
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2768
|
+
};
|
|
2769
|
+
function yo(e, t, n) {
|
|
2770
|
+
if (typeof e != "object")
|
|
2771
|
+
throw new j("options must be an object", j.ERR_BAD_OPTION_VALUE);
|
|
2772
|
+
const r = Object.keys(e);
|
|
2773
|
+
let s = r.length;
|
|
2774
|
+
for (; s-- > 0; ) {
|
|
2775
|
+
const o = r[s], a = t[o];
|
|
2776
|
+
if (a) {
|
|
2777
|
+
const l = e[o], d = l === void 0 || a(l, o, e);
|
|
2778
|
+
if (d !== !0)
|
|
2779
|
+
throw new j("option " + o + " must be " + d, j.ERR_BAD_OPTION_VALUE);
|
|
2780
|
+
continue;
|
|
2781
|
+
}
|
|
2782
|
+
if (n !== !0)
|
|
2783
|
+
throw new j("Unknown option " + o, j.ERR_BAD_OPTION);
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
const Ke = {
|
|
2787
|
+
assertOptions: yo,
|
|
2788
|
+
validators: lt
|
|
2789
|
+
}, pe = Ke.validators;
|
|
2790
|
+
let ve = class {
|
|
2791
|
+
constructor(t) {
|
|
2792
|
+
this.defaults = t || {}, this.interceptors = {
|
|
2793
|
+
request: new Ht(),
|
|
2794
|
+
response: new Ht()
|
|
2795
|
+
};
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Dispatch a request
|
|
2799
|
+
*
|
|
2800
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
2801
|
+
* @param {?Object} config
|
|
2802
|
+
*
|
|
2803
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
2804
|
+
*/
|
|
2805
|
+
async request(t, n) {
|
|
2806
|
+
try {
|
|
2807
|
+
return await this._request(t, n);
|
|
2808
|
+
} catch (r) {
|
|
2809
|
+
if (r instanceof Error) {
|
|
2810
|
+
let s = {};
|
|
2811
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2812
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2813
|
+
try {
|
|
2814
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2815
|
+
` + o) : r.stack = o;
|
|
2816
|
+
} catch {
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
throw r;
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
_request(t, n) {
|
|
2823
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Se(this.defaults, n);
|
|
2824
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2825
|
+
r !== void 0 && Ke.assertOptions(r, {
|
|
2826
|
+
silentJSONParsing: pe.transitional(pe.boolean),
|
|
2827
|
+
forcedJSONParsing: pe.transitional(pe.boolean),
|
|
2828
|
+
clarifyTimeoutError: pe.transitional(pe.boolean)
|
|
2829
|
+
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
2830
|
+
serialize: s
|
|
2831
|
+
} : Ke.assertOptions(s, {
|
|
2832
|
+
encode: pe.function,
|
|
2833
|
+
serialize: pe.function
|
|
2834
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ke.assertOptions(n, {
|
|
2835
|
+
baseUrl: pe.spelling("baseURL"),
|
|
2836
|
+
withXsrfToken: pe.spelling("withXSRFToken")
|
|
2837
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2838
|
+
let a = o && c.merge(
|
|
2839
|
+
o.common,
|
|
2840
|
+
o[n.method]
|
|
2841
|
+
);
|
|
2842
|
+
o && c.forEach(
|
|
2843
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2844
|
+
(g) => {
|
|
2845
|
+
delete o[g];
|
|
2846
|
+
}
|
|
2847
|
+
), n.headers = se.concat(a, o);
|
|
2848
|
+
const l = [];
|
|
2849
|
+
let d = !0;
|
|
2850
|
+
this.interceptors.request.forEach(function(A) {
|
|
2851
|
+
typeof A.runWhen == "function" && A.runWhen(n) === !1 || (d = d && A.synchronous, l.unshift(A.fulfilled, A.rejected));
|
|
2852
|
+
});
|
|
2853
|
+
const f = [];
|
|
2854
|
+
this.interceptors.response.forEach(function(A) {
|
|
2855
|
+
f.push(A.fulfilled, A.rejected);
|
|
2856
|
+
});
|
|
2857
|
+
let y, i = 0, _;
|
|
2858
|
+
if (!d) {
|
|
2859
|
+
const g = [Qt.bind(this), void 0];
|
|
2860
|
+
for (g.unshift.apply(g, l), g.push.apply(g, f), _ = g.length, y = Promise.resolve(n); i < _; )
|
|
2861
|
+
y = y.then(g[i++], g[i++]);
|
|
2862
|
+
return y;
|
|
2863
|
+
}
|
|
2864
|
+
_ = l.length;
|
|
2865
|
+
let w = n;
|
|
2866
|
+
for (i = 0; i < _; ) {
|
|
2867
|
+
const g = l[i++], A = l[i++];
|
|
2868
|
+
try {
|
|
2869
|
+
w = g(w);
|
|
2870
|
+
} catch (u) {
|
|
2871
|
+
A.call(this, u);
|
|
2872
|
+
break;
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
try {
|
|
2876
|
+
y = Qt.call(this, w);
|
|
2877
|
+
} catch (g) {
|
|
2878
|
+
return Promise.reject(g);
|
|
2879
|
+
}
|
|
2880
|
+
for (i = 0, _ = f.length; i < _; )
|
|
2881
|
+
y = y.then(f[i++], f[i++]);
|
|
2882
|
+
return y;
|
|
2883
|
+
}
|
|
2884
|
+
getUri(t) {
|
|
2885
|
+
t = Se(this.defaults, t);
|
|
2886
|
+
const n = _n(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2887
|
+
return Sn(n, t.params, t.paramsSerializer);
|
|
2888
|
+
}
|
|
2889
|
+
};
|
|
2890
|
+
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2891
|
+
ve.prototype[t] = function(n, r) {
|
|
2892
|
+
return this.request(Se(r || {}, {
|
|
2893
|
+
method: t,
|
|
2894
|
+
url: n,
|
|
2895
|
+
data: (r || {}).data
|
|
2896
|
+
}));
|
|
2897
|
+
};
|
|
2898
|
+
});
|
|
2899
|
+
c.forEach(["post", "put", "patch"], function(t) {
|
|
2900
|
+
function n(r) {
|
|
2901
|
+
return function(o, a, l) {
|
|
2902
|
+
return this.request(Se(l || {}, {
|
|
2903
|
+
method: t,
|
|
2904
|
+
headers: r ? {
|
|
2905
|
+
"Content-Type": "multipart/form-data"
|
|
2906
|
+
} : {},
|
|
2907
|
+
url: o,
|
|
2908
|
+
data: a
|
|
2909
|
+
}));
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
ve.prototype[t] = n(), ve.prototype[t + "Form"] = n(!0);
|
|
2913
|
+
});
|
|
2914
|
+
let bo = class Fn {
|
|
2915
|
+
constructor(t) {
|
|
2916
|
+
if (typeof t != "function")
|
|
2917
|
+
throw new TypeError("executor must be a function.");
|
|
2918
|
+
let n;
|
|
2919
|
+
this.promise = new Promise(function(o) {
|
|
2920
|
+
n = o;
|
|
2921
|
+
});
|
|
2922
|
+
const r = this;
|
|
2923
|
+
this.promise.then((s) => {
|
|
2924
|
+
if (!r._listeners) return;
|
|
2925
|
+
let o = r._listeners.length;
|
|
2926
|
+
for (; o-- > 0; )
|
|
2927
|
+
r._listeners[o](s);
|
|
2928
|
+
r._listeners = null;
|
|
2929
|
+
}), this.promise.then = (s) => {
|
|
2930
|
+
let o;
|
|
2931
|
+
const a = new Promise((l) => {
|
|
2932
|
+
r.subscribe(l), o = l;
|
|
2933
|
+
}).then(s);
|
|
2934
|
+
return a.cancel = function() {
|
|
2935
|
+
r.unsubscribe(o);
|
|
2936
|
+
}, a;
|
|
2937
|
+
}, t(function(o, a, l) {
|
|
2938
|
+
r.reason || (r.reason = new Ae(o, a, l), n(r.reason));
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
/**
|
|
2942
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2943
|
+
*/
|
|
2944
|
+
throwIfRequested() {
|
|
2945
|
+
if (this.reason)
|
|
2946
|
+
throw this.reason;
|
|
2947
|
+
}
|
|
2948
|
+
/**
|
|
2949
|
+
* Subscribe to the cancel signal
|
|
2950
|
+
*/
|
|
2951
|
+
subscribe(t) {
|
|
2952
|
+
if (this.reason) {
|
|
2953
|
+
t(this.reason);
|
|
2954
|
+
return;
|
|
2955
|
+
}
|
|
2956
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2957
|
+
}
|
|
2958
|
+
/**
|
|
2959
|
+
* Unsubscribe from the cancel signal
|
|
2960
|
+
*/
|
|
2961
|
+
unsubscribe(t) {
|
|
2962
|
+
if (!this._listeners)
|
|
2963
|
+
return;
|
|
2964
|
+
const n = this._listeners.indexOf(t);
|
|
2965
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2966
|
+
}
|
|
2967
|
+
toAbortSignal() {
|
|
2968
|
+
const t = new AbortController(), n = (r) => {
|
|
2969
|
+
t.abort(r);
|
|
2970
|
+
};
|
|
2971
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2975
|
+
* cancels the `CancelToken`.
|
|
2976
|
+
*/
|
|
2977
|
+
static source() {
|
|
2978
|
+
let t;
|
|
2979
|
+
return {
|
|
2980
|
+
token: new Fn(function(s) {
|
|
2981
|
+
t = s;
|
|
2982
|
+
}),
|
|
2983
|
+
cancel: t
|
|
2984
|
+
};
|
|
2985
|
+
}
|
|
2986
|
+
};
|
|
2987
|
+
function go(e) {
|
|
2988
|
+
return function(n) {
|
|
2989
|
+
return e.apply(null, n);
|
|
2990
|
+
};
|
|
2991
|
+
}
|
|
2992
|
+
function vo(e) {
|
|
2993
|
+
return c.isObject(e) && e.isAxiosError === !0;
|
|
2994
|
+
}
|
|
2995
|
+
const gt = {
|
|
2996
|
+
Continue: 100,
|
|
2997
|
+
SwitchingProtocols: 101,
|
|
2998
|
+
Processing: 102,
|
|
2999
|
+
EarlyHints: 103,
|
|
3000
|
+
Ok: 200,
|
|
3001
|
+
Created: 201,
|
|
3002
|
+
Accepted: 202,
|
|
3003
|
+
NonAuthoritativeInformation: 203,
|
|
3004
|
+
NoContent: 204,
|
|
3005
|
+
ResetContent: 205,
|
|
3006
|
+
PartialContent: 206,
|
|
3007
|
+
MultiStatus: 207,
|
|
3008
|
+
AlreadyReported: 208,
|
|
3009
|
+
ImUsed: 226,
|
|
3010
|
+
MultipleChoices: 300,
|
|
3011
|
+
MovedPermanently: 301,
|
|
3012
|
+
Found: 302,
|
|
3013
|
+
SeeOther: 303,
|
|
3014
|
+
NotModified: 304,
|
|
3015
|
+
UseProxy: 305,
|
|
3016
|
+
Unused: 306,
|
|
3017
|
+
TemporaryRedirect: 307,
|
|
3018
|
+
PermanentRedirect: 308,
|
|
3019
|
+
BadRequest: 400,
|
|
3020
|
+
Unauthorized: 401,
|
|
3021
|
+
PaymentRequired: 402,
|
|
3022
|
+
Forbidden: 403,
|
|
3023
|
+
NotFound: 404,
|
|
3024
|
+
MethodNotAllowed: 405,
|
|
3025
|
+
NotAcceptable: 406,
|
|
3026
|
+
ProxyAuthenticationRequired: 407,
|
|
3027
|
+
RequestTimeout: 408,
|
|
3028
|
+
Conflict: 409,
|
|
3029
|
+
Gone: 410,
|
|
3030
|
+
LengthRequired: 411,
|
|
3031
|
+
PreconditionFailed: 412,
|
|
3032
|
+
PayloadTooLarge: 413,
|
|
3033
|
+
UriTooLong: 414,
|
|
3034
|
+
UnsupportedMediaType: 415,
|
|
3035
|
+
RangeNotSatisfiable: 416,
|
|
3036
|
+
ExpectationFailed: 417,
|
|
3037
|
+
ImATeapot: 418,
|
|
3038
|
+
MisdirectedRequest: 421,
|
|
3039
|
+
UnprocessableEntity: 422,
|
|
3040
|
+
Locked: 423,
|
|
3041
|
+
FailedDependency: 424,
|
|
3042
|
+
TooEarly: 425,
|
|
3043
|
+
UpgradeRequired: 426,
|
|
3044
|
+
PreconditionRequired: 428,
|
|
3045
|
+
TooManyRequests: 429,
|
|
3046
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
3047
|
+
UnavailableForLegalReasons: 451,
|
|
3048
|
+
InternalServerError: 500,
|
|
3049
|
+
NotImplemented: 501,
|
|
3050
|
+
BadGateway: 502,
|
|
3051
|
+
ServiceUnavailable: 503,
|
|
3052
|
+
GatewayTimeout: 504,
|
|
3053
|
+
HttpVersionNotSupported: 505,
|
|
3054
|
+
VariantAlsoNegotiates: 506,
|
|
3055
|
+
InsufficientStorage: 507,
|
|
3056
|
+
LoopDetected: 508,
|
|
3057
|
+
NotExtended: 510,
|
|
3058
|
+
NetworkAuthenticationRequired: 511
|
|
3059
|
+
};
|
|
3060
|
+
Object.entries(gt).forEach(([e, t]) => {
|
|
3061
|
+
gt[t] = e;
|
|
3062
|
+
});
|
|
3063
|
+
function Pn(e) {
|
|
3064
|
+
const t = new ve(e), n = un(ve.prototype.request, t);
|
|
3065
|
+
return c.extend(n, ve.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
3066
|
+
return Pn(Se(e, s));
|
|
3067
|
+
}, n;
|
|
3068
|
+
}
|
|
3069
|
+
const X = Pn(Me);
|
|
3070
|
+
X.Axios = ve;
|
|
3071
|
+
X.CanceledError = Ae;
|
|
3072
|
+
X.CancelToken = bo;
|
|
3073
|
+
X.isCancel = On;
|
|
3074
|
+
X.VERSION = Nn;
|
|
3075
|
+
X.toFormData = ot;
|
|
3076
|
+
X.AxiosError = j;
|
|
3077
|
+
X.Cancel = X.CanceledError;
|
|
3078
|
+
X.all = function(t) {
|
|
3079
|
+
return Promise.all(t);
|
|
3080
|
+
};
|
|
3081
|
+
X.spread = go;
|
|
3082
|
+
X.isAxiosError = vo;
|
|
3083
|
+
X.mergeConfig = Se;
|
|
3084
|
+
X.AxiosHeaders = se;
|
|
3085
|
+
X.formToJSON = (e) => wn(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
3086
|
+
X.getAdapter = Dn.getAdapter;
|
|
3087
|
+
X.HttpStatusCode = gt;
|
|
3088
|
+
X.default = X;
|
|
3089
|
+
const {
|
|
3090
|
+
Axios: Bo,
|
|
3091
|
+
AxiosError: jo,
|
|
3092
|
+
CanceledError: $o,
|
|
3093
|
+
isCancel: Lo,
|
|
3094
|
+
CancelToken: qo,
|
|
3095
|
+
VERSION: Mo,
|
|
3096
|
+
all: Jo,
|
|
3097
|
+
Cancel: zo,
|
|
3098
|
+
isAxiosError: Ho,
|
|
3099
|
+
spread: Io,
|
|
3100
|
+
toFormData: Vo,
|
|
3101
|
+
AxiosHeaders: Wo,
|
|
3102
|
+
HttpStatusCode: Ko,
|
|
3103
|
+
formToJSON: Go,
|
|
3104
|
+
getAdapter: Xo,
|
|
3105
|
+
mergeConfig: Zo
|
|
3106
|
+
} = X;
|
|
3107
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
3108
|
+
function He(e) {
|
|
3109
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3110
|
+
var n = arguments[t];
|
|
3111
|
+
for (var r in n)
|
|
3112
|
+
e[r] = n[r];
|
|
3113
|
+
}
|
|
3114
|
+
return e;
|
|
3115
|
+
}
|
|
3116
|
+
var ko = {
|
|
3117
|
+
read: function(e) {
|
|
3118
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3119
|
+
},
|
|
3120
|
+
write: function(e) {
|
|
3121
|
+
return encodeURIComponent(e).replace(
|
|
3122
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
3123
|
+
decodeURIComponent
|
|
3124
|
+
);
|
|
3125
|
+
}
|
|
3126
|
+
};
|
|
3127
|
+
function vt(e, t) {
|
|
3128
|
+
function n(s, o, a) {
|
|
3129
|
+
if (!(typeof document > "u")) {
|
|
3130
|
+
a = He({}, t, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires && (a.expires = a.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
3131
|
+
var l = "";
|
|
3132
|
+
for (var d in a)
|
|
3133
|
+
a[d] && (l += "; " + d, a[d] !== !0 && (l += "=" + a[d].split(";")[0]));
|
|
3134
|
+
return document.cookie = s + "=" + e.write(o, s) + l;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
function r(s) {
|
|
3138
|
+
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
3139
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], a = {}, l = 0; l < o.length; l++) {
|
|
3140
|
+
var d = o[l].split("="), f = d.slice(1).join("=");
|
|
3141
|
+
try {
|
|
3142
|
+
var y = decodeURIComponent(d[0]);
|
|
3143
|
+
if (a[y] = e.read(f, y), s === y)
|
|
3144
|
+
break;
|
|
3145
|
+
} catch {
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
return s ? a[s] : a;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
return Object.create(
|
|
3152
|
+
{
|
|
3153
|
+
set: n,
|
|
3154
|
+
get: r,
|
|
3155
|
+
remove: function(s, o) {
|
|
3156
|
+
n(
|
|
3157
|
+
s,
|
|
3158
|
+
"",
|
|
3159
|
+
He({}, o, {
|
|
3160
|
+
expires: -1
|
|
3161
|
+
})
|
|
3162
|
+
);
|
|
3163
|
+
},
|
|
3164
|
+
withAttributes: function(s) {
|
|
3165
|
+
return vt(this.converter, He({}, this.attributes, s));
|
|
3166
|
+
},
|
|
3167
|
+
withConverter: function(s) {
|
|
3168
|
+
return vt(He({}, this.converter, s), this.attributes);
|
|
3169
|
+
}
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
attributes: { value: Object.freeze(t) },
|
|
3173
|
+
converter: { value: Object.freeze(e) }
|
|
3174
|
+
}
|
|
3175
|
+
);
|
|
3176
|
+
}
|
|
3177
|
+
vt(ko, { path: "/" });
|
|
3178
|
+
const ke = {
|
|
3179
|
+
// 查看 v2.4.3版本更新日志
|
|
3180
|
+
setKey(e) {
|
|
3181
|
+
return `ss-component-new:${e}`;
|
|
3182
|
+
},
|
|
3183
|
+
// 设置永久缓存
|
|
3184
|
+
set(e, t) {
|
|
3185
|
+
window.localStorage.setItem(ke.setKey(e), JSON.stringify(t));
|
|
3186
|
+
},
|
|
3187
|
+
// 获取永久缓存
|
|
3188
|
+
get(e) {
|
|
3189
|
+
let t = window.localStorage.getItem(ke.setKey(e));
|
|
3190
|
+
return JSON.parse(t);
|
|
3191
|
+
},
|
|
3192
|
+
// 移除永久缓存
|
|
3193
|
+
remove(e) {
|
|
3194
|
+
window.localStorage.removeItem(ke.setKey(e));
|
|
3195
|
+
},
|
|
3196
|
+
// 移除全部永久缓存
|
|
3197
|
+
clear() {
|
|
3198
|
+
window.localStorage.clear();
|
|
3199
|
+
}
|
|
3200
|
+
}, Un = /* @__PURE__ */ new Map();
|
|
3201
|
+
console.log("import.meta.env.VITE_API_URL", "http://139.196.154.85:20013");
|
|
3202
|
+
const Bn = X.create({
|
|
3203
|
+
baseURL: "http://139.196.154.85:20013",
|
|
3204
|
+
timeout: 5e4
|
|
3205
|
+
//headers: { 'Content-Type': 'application/json' }, 这个会导致生成代码的上传文件 file为空
|
|
3206
|
+
}), Qe = "access-token", kt = `x-${Qe}`;
|
|
3207
|
+
Bn.interceptors.request.use(
|
|
3208
|
+
(e) => {
|
|
3209
|
+
var s;
|
|
3210
|
+
const t = new AbortController();
|
|
3211
|
+
e.signal = t.signal;
|
|
3212
|
+
const n = e.url || "";
|
|
3213
|
+
Un.set(n, t);
|
|
3214
|
+
const r = ke.get(Qe);
|
|
3215
|
+
if (r) {
|
|
3216
|
+
e.headers.Authorization = `Bearer ${r}`;
|
|
3217
|
+
const o = So(r), a = Ro(o.exp);
|
|
3218
|
+
if (/* @__PURE__ */ new Date() >= a) {
|
|
3219
|
+
const l = ke.get(kt);
|
|
3220
|
+
l && (e.headers["X-Authorization"] = `Bearer ${l}`);
|
|
3221
|
+
}
|
|
3222
|
+
if (((s = e.method) == null ? void 0 : s.toLowerCase()) === "get" && e.data) {
|
|
3223
|
+
let l = e.url + "?" + Eo(e.data);
|
|
3224
|
+
l = l.slice(0, -1), e.data = {}, e.url = l;
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
return e;
|
|
3228
|
+
},
|
|
3229
|
+
(e) => Promise.reject(e)
|
|
3230
|
+
);
|
|
3231
|
+
Bn.interceptors.response.use(
|
|
3232
|
+
(e) => {
|
|
3233
|
+
const t = e.config.url || "";
|
|
3234
|
+
Un.delete(t);
|
|
3235
|
+
var n = e.status, r = e.data;
|
|
3236
|
+
if (n === 401)
|
|
3237
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3238
|
+
if (n >= 400)
|
|
3239
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3240
|
+
if (r && r.hasOwnProperty("errors") && r.errors)
|
|
3241
|
+
throw new Error(JSON.stringify(r.errors || "Request Error."));
|
|
3242
|
+
var s = e.headers[Qe], o = e.headers[kt];
|
|
3243
|
+
if (s === "invalid_token")
|
|
3244
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3245
|
+
if (o && s && (ke.set(Qe, s), ke.set(kt, o)), r.code === 401)
|
|
3246
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3247
|
+
if (r.code === void 0)
|
|
3248
|
+
return Promise.resolve(e);
|
|
3249
|
+
if (r.code !== 200) {
|
|
3250
|
+
var a;
|
|
3251
|
+
throw r.message && typeof r.message == "object" ? a = JSON.stringify(r.message) : a = r.message, Ne({
|
|
3252
|
+
dangerouslyUseHTMLString: !0,
|
|
3253
|
+
message: a,
|
|
3254
|
+
type: "error"
|
|
3255
|
+
}), new Error(a);
|
|
3256
|
+
}
|
|
3257
|
+
return e;
|
|
3258
|
+
},
|
|
3259
|
+
(e) => {
|
|
3260
|
+
var t, n;
|
|
3261
|
+
if (e.response && e.response.status === 401)
|
|
3262
|
+
throw new Error(res.statusText || "Request Error.");
|
|
3263
|
+
return e.message.indexOf("timeout") != -1 ? Ne.error("网络超时") : e.message == "Network Error" ? Ne.error("网络连接错误") : (t = e.response) != null && t.data ? Ne.error((n = e.response) == null ? void 0 : n.statusText) : Ne.error("接口路径找不到"), Promise.reject(e);
|
|
3264
|
+
}
|
|
3265
|
+
);
|
|
3266
|
+
function Eo(e) {
|
|
3267
|
+
let t = "";
|
|
3268
|
+
for (const s of Object.keys(e)) {
|
|
3269
|
+
const o = e[s];
|
|
3270
|
+
var n = encodeURIComponent(s) + "=";
|
|
3271
|
+
if (o !== null && o !== "" && typeof o < "u")
|
|
3272
|
+
if (typeof o == "object") {
|
|
3273
|
+
for (const a of Object.keys(o))
|
|
3274
|
+
if (o[a] !== null && o[a] !== "" && typeof o[a] < "u") {
|
|
3275
|
+
let l = s + "[" + a + "]";
|
|
3276
|
+
var r = encodeURIComponent(l) + "=";
|
|
3277
|
+
t += r + encodeURIComponent(o[a]) + "&";
|
|
3278
|
+
}
|
|
3279
|
+
} else
|
|
3280
|
+
t += n + encodeURIComponent(o) + "&";
|
|
3281
|
+
}
|
|
3282
|
+
return t;
|
|
3283
|
+
}
|
|
3284
|
+
function So(e) {
|
|
3285
|
+
e = e.replace(/_/g, "/").replace(/-/g, "+");
|
|
3286
|
+
var t = decodeURIComponent(escape(window.atob(e.split(".")[1])));
|
|
3287
|
+
return JSON.parse(t);
|
|
3288
|
+
}
|
|
3289
|
+
function Ro(e) {
|
|
3290
|
+
return new Date(e * 1e3);
|
|
3291
|
+
}
|
|
3292
|
+
const wo = Ye(he), { itemData: Qo } = Ee(wo), Oo = Jn(he), { systemKey: Yo, activeMenuPath: ea } = Ee(Oo), Pe = B(0), ta = (e) => e.reduce((n, r) => {
|
|
3293
|
+
var o, a;
|
|
3294
|
+
const s = Object.values(n);
|
|
3295
|
+
return (((o = Object.keys(n)) == null ? void 0 : o.length) === 0 || s[s.length - 1].length >= (r == null ? void 0 : r.width)) && (n[Pe.value] = [], Pe.value++), n[Pe.value - 1].push(r), ((a = Object.keys(n)) == null ? void 0 : a.length) === (r == null ? void 0 : r.width) && (n[Pe.value] = [], Pe.value++), n;
|
|
3296
|
+
}, {});
|
|
3297
|
+
export {
|
|
3298
|
+
No as a,
|
|
3299
|
+
Do as b,
|
|
3300
|
+
ta as c,
|
|
3301
|
+
In as d,
|
|
3302
|
+
Fo as e,
|
|
3303
|
+
an as g,
|
|
3304
|
+
xo as m,
|
|
3305
|
+
he as p,
|
|
3306
|
+
rn as u
|
|
3307
|
+
};
|