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