ss-component-new 1.1.12 → 1.1.15

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