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