ss-component-new 1.1.87 → 1.1.89

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