ss-component-new 1.1.37 → 1.1.38

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