ss-component-new 1.1.203 → 1.1.204

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/array-BFhKYj7r.js +2466 -0
  2. package/dist/array-bExKAUYR.cjs +7 -0
  3. package/dist/{cloneDeep-CAdgmyte.cjs → cloneDeep-BCr0AurG.cjs} +1 -1
  4. package/dist/{cloneDeep-BLQghEgs.js → cloneDeep-Dq88RgWY.js} +1 -1
  5. package/dist/{index-8zvtyKvJ.cjs → index--Xb7ij8h.cjs} +1 -1
  6. package/dist/index-0eAIyYff.cjs +1 -0
  7. package/dist/{index-CZcQb49C.cjs → index-B-TxGWuh.cjs} +11 -11
  8. package/dist/index-B7u8L5ZJ.cjs +1 -0
  9. package/dist/index-B8Miz_Cq.cjs +1 -0
  10. package/dist/{index-DHO-TIRh.js → index-BDiB9HCu.js} +5 -5
  11. package/dist/index-BF7CacOf.cjs +1 -0
  12. package/dist/{index-BtK6i9pV.js → index-BI8Ay1S1.js} +369 -369
  13. package/dist/{index-Cdua8FdU.js → index-BJuKaxGz.js} +10 -10
  14. package/dist/{index-CIh-8WPZ.js → index-BTe5xHk0.js} +676 -671
  15. package/dist/{index-CbQ_9CDv.cjs → index-BTmQwpJo.cjs} +1 -1
  16. package/dist/index-BYTj8UHM.cjs +1 -0
  17. package/dist/{index-BOCRVlu3.js → index-B_ldqUKR.js} +6 -6
  18. package/dist/index-Bd5QGxn7.cjs +1 -0
  19. package/dist/index-CAGxWFn3.cjs +1 -0
  20. package/dist/{index-CYzuIrEX.js → index-CC4cb6ld.js} +2 -2
  21. package/dist/index-CNviXSeZ.js +409 -0
  22. package/dist/index-CSs-MY84.cjs +1 -0
  23. package/dist/{index-iHgg-F_A.js → index-CVzNs53h.js} +10 -10
  24. package/dist/{index-DQrgyQpG.cjs → index-CWrT1c43.cjs} +1 -1
  25. package/dist/{index-BMVKpGjH.cjs → index-Ci--zW_l.cjs} +1 -1
  26. package/dist/{index-CVOu0TLp.js → index-CphtNZ9f.js} +22 -23
  27. package/dist/index-CrDB6nwv.cjs +1 -0
  28. package/dist/{index-BispWQeW.cjs → index-D73Q_nmy.cjs} +1 -1
  29. package/dist/{index-DwdOlNEH.js → index-DAbdQlPV.js} +1 -1
  30. package/dist/{index-Bu89TD1D.js → index-DFQ7hQT3.js} +254 -231
  31. package/dist/{index-CeJhazIQ.js → index-DJ9JnJgt.js} +1 -1
  32. package/dist/{index-zkm3iJQ1.js → index-DOEcQixr.js} +3 -3
  33. package/dist/{index-BE4uhsw4.js → index-DQj83_aM.js} +17 -18
  34. package/dist/index-DT5En52_.cjs +1 -0
  35. package/dist/{index-DknHePUM.js → index-DVw7tf49.js} +6 -6
  36. package/dist/{index-C_SFjPGc.js → index-DelI4OVL.js} +7 -7
  37. package/dist/{formToTable--4_ply1A.js → index-DmVGnOrm.js} +7 -23
  38. package/dist/index-DogEyKcQ.js +4 -0
  39. package/dist/{index-CdFTOAEw.js → index-DxIdjoxy.js} +13 -13
  40. package/dist/{index-C24hUN_f.js → index-JFe7di24.js} +9 -25
  41. package/dist/index-YDZx5P00.cjs +1 -0
  42. package/dist/{index-D64eMcNi.js → index-bPZ2MclO.js} +60 -61
  43. package/dist/{index-C_4U5pAc.cjs → index-dr1odtaY.cjs} +2 -2
  44. package/dist/index-gJZhOiq9.js +192 -0
  45. package/dist/{index-B7KlE4Iz.cjs → index-kMOvkC5Z.cjs} +1 -1
  46. package/dist/{index-DpVDVL0C.js → index-lfgJD0L5.js} +13 -12
  47. package/dist/{index-Dt6dA5b3.cjs → index-m4bWHH6F.cjs} +19 -19
  48. package/dist/{index-tYeHnS70.cjs → index-nc4_Bpdv.cjs} +6 -6
  49. package/dist/index-r3Nx3snx.cjs +1 -0
  50. package/dist/index-snM5YAh4.cjs +1 -0
  51. package/dist/{index-Co-2rSih.cjs → index.vue_vue_type_script_setup_true_lang-1n66gqmK.cjs} +3 -3
  52. package/dist/index.vue_vue_type_script_setup_true_lang-9MyavSYE.js +157 -0
  53. package/dist/{index-Be5FUSN9.js → index.vue_vue_type_script_setup_true_lang-BjyJ6UQq.js} +58 -59
  54. package/dist/index.vue_vue_type_script_setup_true_lang-CPm96puV.cjs +1 -0
  55. package/dist/index.vue_vue_type_style_index_0_scoped_997b1786_lang-Bz7R4y-8.cjs +1 -0
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CS0CxTyd.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-CtfzWM73.js} +6 -6
  57. package/dist/index.vue_vue_type_style_index_0_scoped_fb273504_lang-CqrG0OgP.cjs +1 -0
  58. package/dist/index.vue_vue_type_style_index_0_scoped_fb273504_lang-MwT97C_Q.js +491 -0
  59. package/dist/{login-YVUKYLQ_.js → login-MlPjBP9y.js} +2 -2
  60. package/dist/{login-CHHhxW8B.cjs → login-RagDvJln.cjs} +1 -1
  61. package/dist/{main-CxKKAHce.js → main-D3QI9caW.js} +7 -8
  62. package/dist/main-Df6GUSmS.cjs +1 -0
  63. package/dist/{menu-CloMe28c.cjs → menu-CK3bK1Rk.cjs} +1 -1
  64. package/dist/{menu-ClqeFk6S.js → menu-CgUytgzT.js} +1 -1
  65. package/dist/obj/model.mtl +42 -0
  66. package/dist/obj/model.obj +26110 -0
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +1 -1
  69. package/dist/ss-component.js +7 -7
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +1 -1
  72. package/package.json +1 -1
  73. package/public/obj/model.mtl +42 -0
  74. package/public/obj/model.obj +26110 -0
  75. package/dist/array-CFjAQKy7.js +0 -2289
  76. package/dist/array-D7Sl6w5S.cjs +0 -7
  77. package/dist/formToTable-DfXTizQm.cjs +0 -1
  78. package/dist/index-70ma5PtB.js +0 -120
  79. package/dist/index-BE1qDBEi.cjs +0 -1
  80. package/dist/index-Bh1Og1wO.js +0 -375
  81. package/dist/index-BoWb2Khh.cjs +0 -1
  82. package/dist/index-BqiaKavV.cjs +0 -1
  83. package/dist/index-CNeO7_VE.cjs +0 -1
  84. package/dist/index-D9RWfn8t.cjs +0 -1
  85. package/dist/index-DKwl8Syi.cjs +0 -1
  86. package/dist/index-DU4fEU0q.cjs +0 -1
  87. package/dist/index-DwBKBHl2.cjs +0 -1
  88. package/dist/index-S3sfBb6v.cjs +0 -1
  89. package/dist/index-XKs8yoYm.cjs +0 -1
  90. package/dist/index-xjDqSCvD.cjs +0 -1
  91. package/dist/index.vue_vue_type_script_setup_true_lang-CsHQ7Z5q.cjs +0 -1
  92. package/dist/index.vue_vue_type_script_setup_true_lang-DP5Alumh.js +0 -293
  93. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-82FJYtra.js +0 -481
  94. package/dist/index.vue_vue_type_style_index_0_scoped_baf99455_lang-DABNQUIV.cjs +0 -1
  95. package/dist/index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-6shkmv3t.cjs +0 -1
  96. package/dist/main-Ma-ZG7Ku.cjs +0 -1
  97. package/dist/modelComp-D8PxHDjf.js +0 -26
  98. package/dist/modelComp-zpEEQ6Tj.cjs +0 -1
@@ -0,0 +1,2466 @@
1
+ import { u as $l, g as _l, s as Ol } from "./index-BTe5xHk0.js";
2
+ import { ref as R, watch as te, createElementBlock as Y, openBlock as z, createVNode as V, resolveComponent as nl, createElementVNode as I, toDisplayString as X, withCtx as se, createTextVNode as ce, Fragment as he, renderList as xe, createBlock as Be, resolveDynamicComponent as Fe, createCommentVNode as Tl } from "vue";
3
+ import { p as ke, u as al, g as je, b as xl } from "./index-DFQ7hQT3.js";
4
+ import { s as Ee, f as vl, a as ue, b as El } from "./index-BI8Ay1S1.js";
5
+ import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { U as Ue, g as Re, a as we, i as Je, S as Ae, b as Dl, c as p } from "./cloneDeep-Dq88RgWY.js";
7
+ import { _ as Nl } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
8
+ import { s as De, u as Sl } from "./menu-CgUytgzT.js";
9
+ import { _ as Pl, s as Bl } from "./index.vue_vue_type_script_setup_true_lang-9MyavSYE.js";
10
+ import { M as Fl, S as Le, e as jl, i as Ge, b as Me } from "./index-DelI4OVL.js";
11
+ var Ul = "__lodash_hash_undefined__";
12
+ function Rl(e) {
13
+ return this.__data__.set(e, Ul), this;
14
+ }
15
+ function wl(e) {
16
+ return this.__data__.has(e);
17
+ }
18
+ function be(e) {
19
+ var a = -1, n = e == null ? 0 : e.length;
20
+ for (this.__data__ = new Fl(); ++a < n; )
21
+ this.add(e[a]);
22
+ }
23
+ be.prototype.add = be.prototype.push = Rl;
24
+ be.prototype.has = wl;
25
+ function Jl(e, a) {
26
+ for (var n = -1, l = e == null ? 0 : e.length; ++n < l; )
27
+ if (a(e[n], n, e))
28
+ return !0;
29
+ return !1;
30
+ }
31
+ function Ll(e, a) {
32
+ return e.has(a);
33
+ }
34
+ var Gl = 1, Ml = 2;
35
+ function tl(e, a, n, l, t, s) {
36
+ var o = n & Gl, u = e.length, f = a.length;
37
+ if (u != f && !(o && f > u))
38
+ return !1;
39
+ var h = s.get(e), k = s.get(a);
40
+ if (h && k)
41
+ return h == a && k == e;
42
+ var A = -1, $ = !0, O = n & Ml ? new be() : void 0;
43
+ for (s.set(e, a), s.set(a, e); ++A < u; ) {
44
+ var C = e[A], N = a[A];
45
+ if (l)
46
+ var y = o ? l(N, C, A, a, e, s) : l(C, N, A, e, a, s);
47
+ if (y !== void 0) {
48
+ if (y)
49
+ continue;
50
+ $ = !1;
51
+ break;
52
+ }
53
+ if (O) {
54
+ if (!Jl(a, function(d, i) {
55
+ if (!Ll(O, i) && (C === d || t(C, d, n, l, s)))
56
+ return O.push(i);
57
+ })) {
58
+ $ = !1;
59
+ break;
60
+ }
61
+ } else if (!(C === N || t(C, N, n, l, s))) {
62
+ $ = !1;
63
+ break;
64
+ }
65
+ }
66
+ return s.delete(e), s.delete(a), $;
67
+ }
68
+ function Il(e) {
69
+ var a = -1, n = Array(e.size);
70
+ return e.forEach(function(l, t) {
71
+ n[++a] = [t, l];
72
+ }), n;
73
+ }
74
+ function Hl(e) {
75
+ var a = -1, n = Array(e.size);
76
+ return e.forEach(function(l) {
77
+ n[++a] = l;
78
+ }), n;
79
+ }
80
+ var Wl = 1, Zl = 2, Kl = "[object Boolean]", ql = "[object Date]", zl = "[object Error]", Ql = "[object Map]", Xl = "[object Number]", Yl = "[object RegExp]", Vl = "[object Set]", en = "[object String]", ln = "[object Symbol]", nn = "[object ArrayBuffer]", an = "[object DataView]", Ie = Le ? Le.prototype : void 0, $e = Ie ? Ie.valueOf : void 0;
81
+ function tn(e, a, n, l, t, s, o) {
82
+ switch (n) {
83
+ case an:
84
+ if (e.byteLength != a.byteLength || e.byteOffset != a.byteOffset)
85
+ return !1;
86
+ e = e.buffer, a = a.buffer;
87
+ case nn:
88
+ return !(e.byteLength != a.byteLength || !s(new Ue(e), new Ue(a)));
89
+ case Kl:
90
+ case ql:
91
+ case Xl:
92
+ return jl(+e, +a);
93
+ case zl:
94
+ return e.name == a.name && e.message == a.message;
95
+ case Yl:
96
+ case en:
97
+ return e == a + "";
98
+ case Ql:
99
+ var u = Il;
100
+ case Vl:
101
+ var f = l & Wl;
102
+ if (u || (u = Hl), e.size != a.size && !f)
103
+ return !1;
104
+ var h = o.get(e);
105
+ if (h)
106
+ return h == a;
107
+ l |= Zl, o.set(e, a);
108
+ var k = tl(u(e), u(a), l, t, s, o);
109
+ return o.delete(e), k;
110
+ case ln:
111
+ if ($e)
112
+ return $e.call(e) == $e.call(a);
113
+ }
114
+ return !1;
115
+ }
116
+ var sn = 1, rn = Object.prototype, on = rn.hasOwnProperty;
117
+ function cn(e, a, n, l, t, s) {
118
+ var o = n & sn, u = Re(e), f = u.length, h = Re(a), k = h.length;
119
+ if (f != k && !o)
120
+ return !1;
121
+ for (var A = f; A--; ) {
122
+ var $ = u[A];
123
+ if (!(o ? $ in a : on.call(a, $)))
124
+ return !1;
125
+ }
126
+ var O = s.get(e), C = s.get(a);
127
+ if (O && C)
128
+ return O == a && C == e;
129
+ var N = !0;
130
+ s.set(e, a), s.set(a, e);
131
+ for (var y = o; ++A < f; ) {
132
+ $ = u[A];
133
+ var d = e[$], i = a[$];
134
+ if (l)
135
+ var g = o ? l(i, d, $, a, e, s) : l(d, i, $, e, a, s);
136
+ if (!(g === void 0 ? d === i || t(d, i, n, l, s) : g)) {
137
+ N = !1;
138
+ break;
139
+ }
140
+ y || (y = $ == "constructor");
141
+ }
142
+ if (N && !y) {
143
+ var c = e.constructor, r = a.constructor;
144
+ c != r && "constructor" in e && "constructor" in a && !(typeof c == "function" && c instanceof c && typeof r == "function" && r instanceof r) && (N = !1);
145
+ }
146
+ return s.delete(e), s.delete(a), N;
147
+ }
148
+ var un = 1, He = "[object Arguments]", We = "[object Array]", ie = "[object Object]", pn = Object.prototype, Ze = pn.hasOwnProperty;
149
+ function fn(e, a, n, l, t, s) {
150
+ var o = Ge(e), u = Ge(a), f = o ? We : we(e), h = u ? We : we(a);
151
+ f = f == He ? ie : f, h = h == He ? ie : h;
152
+ var k = f == ie, A = h == ie, $ = f == h;
153
+ if ($ && Je(e)) {
154
+ if (!Je(a))
155
+ return !1;
156
+ o = !0, k = !1;
157
+ }
158
+ if ($ && !k)
159
+ return s || (s = new Ae()), o || Dl(e) ? tl(e, a, n, l, t, s) : tn(e, a, f, n, l, t, s);
160
+ if (!(n & un)) {
161
+ var O = k && Ze.call(e, "__wrapped__"), C = A && Ze.call(a, "__wrapped__");
162
+ if (O || C) {
163
+ var N = O ? e.value() : e, y = C ? a.value() : a;
164
+ return s || (s = new Ae()), t(N, y, n, l, s);
165
+ }
166
+ }
167
+ return $ ? (s || (s = new Ae()), cn(e, a, n, l, t, s)) : !1;
168
+ }
169
+ function sl(e, a, n, l, t) {
170
+ return e === a ? !0 : e == null || a == null || !Me(e) && !Me(a) ? e !== e && a !== a : fn(e, a, n, l, sl, t);
171
+ }
172
+ function dn(e, a) {
173
+ return sl(e, a);
174
+ }
175
+ const fe = [
176
+ {
177
+ key: "单选",
178
+ value: "Select"
179
+ },
180
+ {
181
+ key: "日期",
182
+ value: "Date"
183
+ },
184
+ {
185
+ key: "长文本",
186
+ value: "TextArea"
187
+ },
188
+ {
189
+ key: "上传",
190
+ value: "Upload"
191
+ }
192
+ ], yn = { class: "form-content" }, hn = {
193
+ __name: "index",
194
+ props: {
195
+ itemData: {
196
+ type: Array,
197
+ default: () => []
198
+ },
199
+ childItemData: {
200
+ type: Array,
201
+ default: () => []
202
+ },
203
+ index: Number
204
+ },
205
+ emits: ["change", "contentChange"],
206
+ setup(e, { emit: a }) {
207
+ const n = e, l = a, t = R([]), s = R(!1), o = R([]), u = $l(ke), f = R(), h = (A) => {
208
+ var y, d, i, g;
209
+ const $ = (d = (y = p(n.itemData)) == null ? void 0 : y.find((c) => (c == null ? void 0 : c.key) === "formContent")) == null ? void 0 : d.contents, O = p(A.content);
210
+ let C = {};
211
+ O && ((i = Object.values(O)) == null ? void 0 : i.length) > 0 && ((g = Object.values(O)) == null || g.forEach((c, r) => {
212
+ C[$[r].key] = c;
213
+ }));
214
+ const N = {
215
+ content: C,
216
+ index: n == null ? void 0 : n.index,
217
+ buttonName: A == null ? void 0 : A.buttonName
218
+ };
219
+ l("change", N);
220
+ }, k = (A) => {
221
+ var C, N;
222
+ if (!A) return;
223
+ if (((C = Object.values(p(A))) == null ? void 0 : C.length) > 0) {
224
+ const y = (N = Object.values(p(A))) == null ? void 0 : N.map((i) => i);
225
+ let d = "";
226
+ y == null || y.forEach((i) => {
227
+ i !== "" && i !== void 0 && (d = d === "" ? i : d + "/" + i);
228
+ }), u.setSelectArray(y), u.setSelectString(d);
229
+ }
230
+ const $ = p(n.itemData), O = $ == null ? void 0 : $.map((y) => {
231
+ var d;
232
+ return (y == null ? void 0 : y.key) === "formContent" && ((d = y.contents) == null || d.map((i, g) => {
233
+ var c, r, m, _, T, v, x, j, E, D, B, P, S, b, F, U, w, W, K;
234
+ return i.type = i != null && i.type ? i.type : (_ = (m = (r = (c = i == null ? void 0 : i.key) == null ? void 0 : c.split("$")) == null ? void 0 : r[1]) == null ? void 0 : m.split("(")) != null && _[0] ? (T = fe == null ? void 0 : fe.find((Z) => {
235
+ var le, ee, G, Q;
236
+ return (Z == null ? void 0 : Z.key) === ((Q = (G = (ee = (le = i == null ? void 0 : i.key) == null ? void 0 : le.split("$")) == null ? void 0 : ee[1]) == null ? void 0 : G.split("(")) == null ? void 0 : Q[0]);
237
+ })) == null ? void 0 : T.value : "Input", i.options = i != null && i.options ? i.options : ((j = (x = (v = i == null ? void 0 : i.key) == null ? void 0 : v.split("$")) == null ? void 0 : x[1]) == null ? void 0 : j.length) > 0 ? (P = (B = vl((D = (E = i == null ? void 0 : i.key) == null ? void 0 : E.split("$")) == null ? void 0 : D[1])) == null ? void 0 : B.split(",")) == null ? void 0 : P.map((Z) => ({
238
+ label: Z,
239
+ value: Z
240
+ })) : [], (S = i == null ? void 0 : i.key) != null && S.includes("$") && (i.key = (F = (b = i == null ? void 0 : i.key) == null ? void 0 : b.split("$")) == null ? void 0 : F[0]), i.value = Array.isArray((U = Object.values(A)) == null ? void 0 : U[g]) ? (W = (w = Object.values(A)) == null ? void 0 : w[g]) == null ? void 0 : W[0] : (K = Object.values(A)) == null ? void 0 : K[g], i;
241
+ })), y;
242
+ });
243
+ l("contentChange", {
244
+ contents: O,
245
+ index: n.index
246
+ });
247
+ };
248
+ return te(
249
+ () => n.itemData,
250
+ () => {
251
+ var N, y, d, i, g, c, r, m, _, T;
252
+ const A = (N = p(n.itemData)) == null ? void 0 : N.find((v) => (v == null ? void 0 : v.key) === "formContent"), $ = (y = p(n.itemData)) == null ? void 0 : y.find((v) => (v == null ? void 0 : v.key) === "formButton"), O = (d = p(n.itemData)) == null ? void 0 : d.find((v) => (v == null ? void 0 : v.key) === "formFlex"), C = (i = p(n.itemData)) == null ? void 0 : i.find((v) => (v == null ? void 0 : v.key) === "formWrap");
253
+ if ((C == null ? void 0 : C.contents) === "纵向" ? s.value = !1 : s.value = !0, f.value = typeof (O == null ? void 0 : O.contents) != "boolean" ? !(!(O != null && O.contents) === "" || ((g = O == null ? void 0 : O.contents) == null ? void 0 : g.toUpperCase()) === "VERTICAL") : O == null ? void 0 : O.contents, ((c = A == null ? void 0 : A.contents) == null ? void 0 : c.length) > 0 && Array.isArray(A == null ? void 0 : A.contents)) {
254
+ const v = [];
255
+ (r = A == null ? void 0 : A.contents) == null || r.forEach((E, D) => {
256
+ var B, P, S, b, F, U, w, W, K, Z;
257
+ if ((E == null ? void 0 : E.label) !== "") {
258
+ let le = (E == null ? void 0 : E.key) ?? "", ee = (E == null ? void 0 : E.type) ?? "", G = (E == null ? void 0 : E.options) ?? [];
259
+ if ((B = E == null ? void 0 : E.key) != null && B.includes("$") && (le = (P = p(E == null ? void 0 : E.key).split("$")) == null ? void 0 : P[0], ((b = (S = p(E == null ? void 0 : E.key).split("$")) == null ? void 0 : S[1]) == null ? void 0 : b.length) > 0)) {
260
+ const [Q, q] = (U = (F = p(E == null ? void 0 : E.key).split("$")) == null ? void 0 : F[1]) == null ? void 0 : U.split(/[()]/);
261
+ ee = ((w = fe.find((H) => (H == null ? void 0 : H.key) === Q)) == null ? void 0 : w.value) ?? "", ((W = q == null ? void 0 : q.split(",")) == null ? void 0 : W.length) > 0 && (G = (K = q == null ? void 0 : q.split(",")) == null ? void 0 : K.map((H) => ({
262
+ label: H,
263
+ value: H
264
+ })));
265
+ }
266
+ v.push({
267
+ label: le ?? "",
268
+ name: "t" + D,
269
+ type: ee === "" ? "Input" : ee,
270
+ value: E != null && E.value ? E.value : (G == null ? void 0 : G.length) > 0 ? (Z = G == null ? void 0 : G[0]) == null ? void 0 : Z.value : (E == null ? void 0 : E.value) ?? "",
271
+ id: (E == null ? void 0 : E.id) ?? D,
272
+ contents: G ?? [],
273
+ width: (E == null ? void 0 : E.width) ?? 1
274
+ });
275
+ }
276
+ });
277
+ const x = (m = p(v)) == null ? void 0 : m.map((E) => E.value);
278
+ let j = "";
279
+ x == null || x.forEach((E) => {
280
+ E !== "" && E !== void 0 && (j = j === "" ? E : j + "/" + E);
281
+ }), u.setSelectArray(x), u.setSelectString(j), t.value = v;
282
+ } else
283
+ t.value = [];
284
+ if (((_ = $ == null ? void 0 : $.contents) == null ? void 0 : _.length) > 0) {
285
+ const v = [];
286
+ (T = $ == null ? void 0 : $.contents) == null || T.forEach((x, j) => {
287
+ (x == null ? void 0 : x.label) !== "" && v.push({
288
+ label: (x == null ? void 0 : x.label) ?? "",
289
+ id: (x == null ? void 0 : x.id) ?? j,
290
+ type: (x == null ? void 0 : x.type) ?? "",
291
+ background: x == null ? void 0 : x.background
292
+ });
293
+ }), o.value = v;
294
+ } else
295
+ o.value = [];
296
+ },
297
+ { deep: !0, immediate: !0 }
298
+ ), (A, $) => (z(), Y("div", yn, [
299
+ V(Ee, {
300
+ rowContents: t.value,
301
+ buttonValue: o.value,
302
+ isRowFlex: f.value,
303
+ isEnableWrap: !1,
304
+ onOnButtonClick: h,
305
+ onChange: k,
306
+ isButtonRow: s.value
307
+ }, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
308
+ ]));
309
+ }
310
+ }, mn = /* @__PURE__ */ pe(hn, [["__scopeId", "data-v-3775f389"]]), gn = { class: "table-operate-content" }, bn = { class: "table-operate-item" }, kn = { class: "operate-title" }, Cn = { class: "operate-content" }, An = { class: "operate-title" }, $n = { class: "operate-content" }, _n = { class: "operate-title" }, On = { class: "operate-content" }, Tn = { class: "operate-content" }, xn = {
311
+ __name: "operate",
312
+ props: {
313
+ itemContents: {
314
+ type: Array,
315
+ default: () => []
316
+ },
317
+ originalItemContents: {
318
+ type: Array,
319
+ default: () => []
320
+ }
321
+ },
322
+ emits: ["change"],
323
+ setup(e, { emit: a }) {
324
+ const n = e, l = a, t = R([]), s = R([]), o = R([]), u = R([{
325
+ label: "按钮名称",
326
+ prop: "label",
327
+ type: "edit"
328
+ }, {
329
+ label: "按钮类型",
330
+ prop: "type",
331
+ type: "edit"
332
+ }, {
333
+ label: "按钮背景颜色",
334
+ prop: "background",
335
+ type: "edit",
336
+ columnType: "Color"
337
+ }, {
338
+ label: "操作",
339
+ prop: "operate",
340
+ type: "operate",
341
+ sortable: !1
342
+ }]), f = R([{
343
+ label: "标签名称",
344
+ prop: "label",
345
+ type: "edit"
346
+ }, {
347
+ label: "标签类型",
348
+ prop: "type",
349
+ type: "edit"
350
+ }, {
351
+ label: "按钮文字颜色",
352
+ prop: "textColor",
353
+ type: "edit",
354
+ columnType: "Color"
355
+ }, {
356
+ label: "操作",
357
+ prop: "operate",
358
+ type: "operate",
359
+ sortable: !1
360
+ }]), h = R([]), k = R(0), A = R([{
361
+ name: "isPagination",
362
+ label: "是否显示分页",
363
+ type: "Switch",
364
+ value: !0
365
+ }]), $ = [{
366
+ label: "标签名",
367
+ prop: "label",
368
+ type: "edit"
369
+ }, {
370
+ label: "属性名",
371
+ prop: "prop",
372
+ type: "edit"
373
+ }, {
374
+ label: "宽度",
375
+ prop: "width",
376
+ type: "edit",
377
+ columnType: "Number"
378
+ }, {
379
+ label: "是否固定列",
380
+ prop: "fixed",
381
+ type: "edit",
382
+ columnType: "Radio",
383
+ contents: [{
384
+ label: "left",
385
+ value: "左"
386
+ }, {
387
+ label: "right",
388
+ value: "右"
389
+ }]
390
+ }, {
391
+ label: "是否支持排序",
392
+ prop: "sortable",
393
+ type: "edit",
394
+ columnType: "Switch"
395
+ }, {
396
+ label: "文本所在位置",
397
+ prop: "align",
398
+ type: "edit",
399
+ columnType: "Radio",
400
+ contents: [{
401
+ label: "left",
402
+ value: "左"
403
+ }, {
404
+ label: "center",
405
+ value: "中"
406
+ }, {
407
+ label: "right",
408
+ value: "右"
409
+ }]
410
+ }, {
411
+ label: "溢出悬浮文字",
412
+ prop: "showOverflowTooltip",
413
+ type: "edit",
414
+ columnType: "Switch"
415
+ }, {
416
+ label: "是否不可拖动",
417
+ prop: "isNotDrag",
418
+ type: "edit",
419
+ columnType: "Switch"
420
+ }, {
421
+ label: "是否可编辑列名",
422
+ //暂不支持
423
+ prop: "isEditCol",
424
+ type: "edit",
425
+ columnType: "Switch"
426
+ }, {
427
+ label: "是否出现在附属界面",
428
+ //暂不支持
429
+ prop: "isOperate",
430
+ type: "edit",
431
+ columnType: "Switch"
432
+ }, {
433
+ label: "操作",
434
+ prop: "operate",
435
+ type: "operate",
436
+ sortable: !1
437
+ }], O = (c) => {
438
+ let r = p(t.value);
439
+ const m = r == null ? void 0 : r.find((_) => _.key === "page");
440
+ (m == null ? void 0 : m.contents) !== void 0 ? r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "page" && (_.contents = c == null ? void 0 : c.isPagination), _)) : r.push({
441
+ key: "page",
442
+ contents: c == null ? void 0 : c.isPagination
443
+ }), t.value = r;
444
+ };
445
+ te(
446
+ () => n.originalItemContents,
447
+ () => {
448
+ var c, r, m, _, T, v, x, j, E, D, B, P, S;
449
+ !n.originalItemContents || n.originalItemContents.length === 0 || (t.value = p(n.originalItemContents), s.value = (r = (c = t.value) == null ? void 0 : c.find((b) => (b == null ? void 0 : b.key) === "header")) == null ? void 0 : r.contents, o.value = (_ = (m = t.value) == null ? void 0 : m.find((b) => (b == null ? void 0 : b.key) === "rowButton")) == null ? void 0 : _.contents, u.value = (v = (T = t.value) == null ? void 0 : T.find((b) => (b == null ? void 0 : b.key) === "extraButton")) == null ? void 0 : v.contents, A.value = (j = (x = t.value) == null ? void 0 : x.find((b) => (b == null ? void 0 : b.key) === "page")) != null && j.contents ? [{
450
+ name: "isPagination",
451
+ label: "是否显示分页",
452
+ type: "Switch",
453
+ value: (D = (E = t.value) == null ? void 0 : E.find((b) => (b == null ? void 0 : b.key) === "page")) == null ? void 0 : D.contents
454
+ }] : [{
455
+ name: "isPagination",
456
+ label: "是否显示分页",
457
+ type: "Switch",
458
+ value: !0
459
+ }], s.value = (B = s.value) == null ? void 0 : B.map((b, F) => b = {
460
+ label: (b == null ? void 0 : b.label) ?? "",
461
+ prop: (b == null ? void 0 : b.label) === "操作" ? "operate" : b == null ? void 0 : b.prop,
462
+ width: b != null && b.width ? parseInt(b.width) : "",
463
+ fixed: (b == null ? void 0 : b.fixed) ?? void 0,
464
+ sortable: (b == null ? void 0 : b.sortable) ?? !1,
465
+ align: (b == null ? void 0 : b.align) ?? "center",
466
+ showOverflowTooltip: (b == null ? void 0 : b.showOverflowTooltip) ?? !0,
467
+ isNotDrag: (b == null ? void 0 : b.isNotDrag) ?? !1,
468
+ isEditCol: (b == null ? void 0 : b.isEditCol) ?? !1,
469
+ isOperate: (b == null ? void 0 : b.isOperate) ?? !1,
470
+ id: (b == null ? void 0 : b.id) ?? F
471
+ }), o.value = (P = o.value) == null ? void 0 : P.map((b, F) => b = {
472
+ label: (b == null ? void 0 : b.label) ?? "",
473
+ type: (b == null ? void 0 : b.type) ?? "",
474
+ textColor: (b == null ? void 0 : b.textColor) ?? "#000000",
475
+ id: (b == null ? void 0 : b.id) ?? F
476
+ }), u.value = (S = u.value) == null ? void 0 : S.map((b, F) => b = {
477
+ label: (b == null ? void 0 : b.label) ?? "",
478
+ type: (b == null ? void 0 : b.type) ?? "",
479
+ background: (b == null ? void 0 : b.textColor) ?? "#FFFFFF",
480
+ id: (b == null ? void 0 : b.id) ?? F
481
+ }));
482
+ },
483
+ { deep: !0, immediate: !0 }
484
+ ), te(
485
+ () => A.value,
486
+ () => {
487
+ var m;
488
+ let c = p(t.value);
489
+ const r = c == null ? void 0 : c.find((_) => _.key === "page");
490
+ r != null && r.contents ? c = c == null ? void 0 : c.map((_) => {
491
+ var T;
492
+ return (_ == null ? void 0 : _.key) === "page" && (_.contents = (T = A.value) == null ? void 0 : T[0].value), _;
493
+ }) : c.push({
494
+ key: "page",
495
+ contents: (m = A.value) == null ? void 0 : m[0].value
496
+ }), t.value = c;
497
+ },
498
+ { immediate: !0, deep: !0 }
499
+ );
500
+ const C = () => {
501
+ const c = p(s.value);
502
+ let r = p(t.value);
503
+ c.push({
504
+ label: "",
505
+ prop: "",
506
+ width: "",
507
+ fixed: void 0,
508
+ sortable: !1,
509
+ align: "center",
510
+ showOverflowTooltip: !0,
511
+ isNotDrag: !1,
512
+ isEditCol: !1,
513
+ isOperate: !1,
514
+ id: k.value
515
+ }), s.value = c, k.value++;
516
+ const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "header");
517
+ m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "header" && (_.contents = c), _))) : r.push({
518
+ key: "header",
519
+ contents: c
520
+ }), t.value = r;
521
+ }, N = () => {
522
+ const c = p(o.value);
523
+ let r = p(t.value);
524
+ c.push({
525
+ label: "",
526
+ type: "",
527
+ textColor: "#000000",
528
+ id: k.value
529
+ }), o.value = c, k.value++;
530
+ const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "rowButton");
531
+ m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "rowButton" && (_.contents = c), _))) : r.push({
532
+ key: "rowButton",
533
+ contents: c
534
+ }), t.value = r;
535
+ }, y = () => {
536
+ const c = p(h.value);
537
+ let r = p(t.value);
538
+ c.push({
539
+ label: "",
540
+ type: "",
541
+ background: "#FFFFFF",
542
+ id: k.value
543
+ }), h.value = c, k.value++;
544
+ const m = r == null ? void 0 : r.find((_) => (_ == null ? void 0 : _.key) === "extraButton");
545
+ m != null && m.contents ? (m.contents = c, r = r == null ? void 0 : r.map((_) => ((_ == null ? void 0 : _.key) === "extraButton" && (_.contents = c), _))) : r.push({
546
+ key: "extraButton",
547
+ contents: c
548
+ }), t.value = r;
549
+ }, d = (c) => {
550
+ const r = p(o.value);
551
+ let m = p(t.value);
552
+ o.value = r.filter((T) => T.id !== c.id);
553
+ const _ = m == null ? void 0 : m.find((T) => T.key === "rowButton");
554
+ _ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "rowButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), t.value = m;
555
+ }, i = (c) => {
556
+ const r = p(h.value);
557
+ let m = p(t.value);
558
+ h.value = r.filter((T) => T.id !== c.id);
559
+ const _ = m == null ? void 0 : m.find((T) => T.key === "extraButton");
560
+ _ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "extraButton" && (T.contents = r.filter((v) => v.id !== c.id)), T))), t.value = m;
561
+ }, g = (c) => {
562
+ const r = p(s.value);
563
+ let m = p(t.value);
564
+ s.value = r.filter((T) => T.id !== c.id);
565
+ const _ = m == null ? void 0 : m.find((T) => T.key === "header");
566
+ _ != null && _.contents && (m = m == null ? void 0 : m.map((T) => ((T == null ? void 0 : T.key) === "header" && (T.contents = r.filter((v) => v.id !== c.id)), T))), t.value = m;
567
+ };
568
+ return te(
569
+ () => [t.value, s.value],
570
+ () => {
571
+ let c = p(t.value);
572
+ const r = c == null ? void 0 : c.find((m) => (m == null ? void 0 : m.key) === "header");
573
+ r != null && r.contents ? (r.contents = s.value, c = c == null ? void 0 : c.map((m) => ((m == null ? void 0 : m.key) === "header" && (m.contents = s.value), m))) : c.push({
574
+ key: "header",
575
+ contents: s.value
576
+ }), l("change", c);
577
+ },
578
+ { deep: !0, immediate: !0 }
579
+ ), (c, r) => {
580
+ const m = nl("el-button");
581
+ return z(), Y("div", gn, [
582
+ I("div", bn, [
583
+ I("div", kn, [
584
+ r[1] || (r[1] = I("div", null, X("表头"), -1)),
585
+ V(m, {
586
+ class: "blue-operate-button",
587
+ icon: "ele-Plus",
588
+ onClick: C
589
+ }, {
590
+ default: se(() => r[0] || (r[0] = [
591
+ ce(X("新建"))
592
+ ])),
593
+ _: 1,
594
+ __: [0]
595
+ })
596
+ ]),
597
+ I("div", Cn, [
598
+ V(ue, {
599
+ columns: $,
600
+ isShowPagination: !1,
601
+ isShowEdit: !1,
602
+ isMoveColumn: !1,
603
+ tableData: s.value,
604
+ onDeleteRow: g
605
+ }, null, 8, ["tableData"])
606
+ ]),
607
+ I("div", An, [
608
+ r[3] || (r[3] = I("div", null, X("行内按钮"), -1)),
609
+ V(m, {
610
+ class: "blue-operate-button",
611
+ icon: "ele-Plus",
612
+ onClick: N
613
+ }, {
614
+ default: se(() => r[2] || (r[2] = [
615
+ ce(X("新建"))
616
+ ])),
617
+ _: 1,
618
+ __: [2]
619
+ })
620
+ ]),
621
+ I("div", $n, [
622
+ V(ue, {
623
+ columns: f.value,
624
+ isShowPagination: !1,
625
+ isShowEdit: !1,
626
+ isMoveColumn: !1,
627
+ tableData: o.value,
628
+ onDeleteRow: d
629
+ }, null, 8, ["columns", "tableData"])
630
+ ]),
631
+ I("div", _n, [
632
+ r[5] || (r[5] = I("div", null, X("表格外部按钮"), -1)),
633
+ V(m, {
634
+ class: "blue-operate-button",
635
+ icon: "ele-Plus",
636
+ onClick: y
637
+ }, {
638
+ default: se(() => r[4] || (r[4] = [
639
+ ce(X("新建"))
640
+ ])),
641
+ _: 1,
642
+ __: [4]
643
+ })
644
+ ]),
645
+ I("div", On, [
646
+ V(ue, {
647
+ columns: u.value,
648
+ isShowPagination: !1,
649
+ isShowEdit: !1,
650
+ isMoveColumn: !1,
651
+ tableData: h.value,
652
+ onDeleteRow: i
653
+ }, null, 8, ["columns", "tableData"])
654
+ ]),
655
+ r[6] || (r[6] = I("div", { class: "operate-title" }, [
656
+ I("div", null, X("分页"))
657
+ ], -1)),
658
+ I("div", Tn, [
659
+ V(Ee, {
660
+ rowContents: A.value,
661
+ onChange: O
662
+ }, null, 8, ["rowContents"])
663
+ ])
664
+ ])
665
+ ]);
666
+ };
667
+ }
668
+ }, vn = /* @__PURE__ */ pe(xn, [["__scopeId", "data-v-877911eb"]]), En = { class: "form-operate-content" }, Dn = { class: "form-operate-item" }, Nn = { class: "operate-title" }, Sn = { class: "operate-content" }, Pn = { class: "operate-title" }, Bn = { class: "operate-content" }, Fn = { class: "operate-content" }, jn = {
669
+ __name: "operate",
670
+ props: {
671
+ itemContents: {
672
+ type: Array,
673
+ default: () => []
674
+ },
675
+ originalItemContents: {
676
+ type: Array,
677
+ default: () => []
678
+ }
679
+ },
680
+ emits: ["change"],
681
+ setup(e, { emit: a }) {
682
+ const n = e, l = a, t = R([{
683
+ name: "isRowFlex",
684
+ label: "是否横向布局",
685
+ type: "Switch",
686
+ value: !0
687
+ }]), s = R([{
688
+ label: "字段名称",
689
+ prop: "label",
690
+ type: "edit"
691
+ }, {
692
+ label: "字段类型",
693
+ prop: "type",
694
+ type: "edit"
695
+ }, {
696
+ label: "字段值",
697
+ prop: "key",
698
+ type: "edit"
699
+ }, {
700
+ label: "字段选项值",
701
+ prop: "options",
702
+ type: "edit"
703
+ }, {
704
+ label: "操作",
705
+ prop: "operate",
706
+ type: "operate",
707
+ sortable: !1
708
+ }]), o = R([{
709
+ label: "字段名称",
710
+ prop: "label",
711
+ type: "edit"
712
+ }, {
713
+ label: "字段类型",
714
+ prop: "type",
715
+ type: "edit"
716
+ }, {
717
+ label: "按钮背景颜色",
718
+ prop: "background",
719
+ type: "edit",
720
+ columnType: "Color"
721
+ }, {
722
+ label: "操作",
723
+ prop: "operate",
724
+ type: "operate",
725
+ sortable: !1
726
+ }]), u = R([]), f = R([]), h = R([]), k = R(0);
727
+ te(
728
+ () => n.originalItemContents,
729
+ () => {
730
+ var y, d, i, g, c, r, m, _, T, v;
731
+ !n.originalItemContents || n.originalItemContents.length === 0 || (f.value = p(n.originalItemContents), h.value = (d = (y = f.value) == null ? void 0 : y.find((x) => (x == null ? void 0 : x.key) === "formContent")) == null ? void 0 : d.contents, u.value = (g = (i = f.value) == null ? void 0 : i.find((x) => (x == null ? void 0 : x.key) === "formButton")) == null ? void 0 : g.contents, h.value = (c = h.value) == null ? void 0 : c.map((x, j) => x = {
732
+ label: (x == null ? void 0 : x.label) ?? "",
733
+ type: (x == null ? void 0 : x.type) ?? "",
734
+ key: (x == null ? void 0 : x.key) ?? "",
735
+ options: (x == null ? void 0 : x.options) ?? "",
736
+ id: (x == null ? void 0 : x.id) ?? j
737
+ }), u.value = (r = u.value) == null ? void 0 : r.map((x, j) => x = {
738
+ label: (x == null ? void 0 : x.label) ?? "",
739
+ type: (x == null ? void 0 : x.type) ?? "",
740
+ background: (x == null ? void 0 : x.background) ?? "#000000",
741
+ id: (x == null ? void 0 : x.id) ?? j
742
+ }), t.value = (_ = (m = f.value) == null ? void 0 : m.find((x) => (x == null ? void 0 : x.key) === "formFlex")) != null && _.contents ? [{
743
+ name: "isRowFlex",
744
+ label: "是否横向布局",
745
+ type: "Switch",
746
+ value: (v = (T = f.value) == null ? void 0 : T.find((x) => (x == null ? void 0 : x.key) === "formFlex")) == null ? void 0 : v.contents
747
+ }] : [{
748
+ name: "isRowFlex",
749
+ label: "是否横向布局",
750
+ type: "Switch",
751
+ value: !0
752
+ }]);
753
+ },
754
+ { deep: !0, immediate: !0 }
755
+ );
756
+ const A = () => {
757
+ const y = p(u.value);
758
+ let d = p(f.value);
759
+ y.push({
760
+ label: "",
761
+ type: "",
762
+ background: "#000000",
763
+ id: k.value
764
+ }), u.value = y, k.value++;
765
+ const i = d == null ? void 0 : d.find((g) => (g == null ? void 0 : g.key) === "formButton");
766
+ i != null && i.contents ? (i.contents = y, d = d == null ? void 0 : d.map((g) => ((g == null ? void 0 : g.key) === "formButton" && (g.contents = y), g))) : d.push({
767
+ key: "formButton",
768
+ contents: y
769
+ }), f.value = d;
770
+ }, $ = () => {
771
+ const y = p(h.value);
772
+ let d = p(f.value);
773
+ y.push({
774
+ label: "",
775
+ type: "",
776
+ key: "",
777
+ options: "",
778
+ id: k.value
779
+ }), h.value = y, k.value++;
780
+ const i = d == null ? void 0 : d.find((g) => (g == null ? void 0 : g.key) === "formContent");
781
+ i != null && i.contents ? (i.contents = y, d = d == null ? void 0 : d.map((g) => ((g == null ? void 0 : g.key) === "formContent" && (g.contents = y), g))) : d.push({
782
+ key: "formContent",
783
+ contents: y
784
+ }), f.value = d;
785
+ }, O = (y) => {
786
+ const d = p(u.value);
787
+ let i = p(f.value);
788
+ u.value = d.filter((c) => c.id !== y.id);
789
+ const g = i == null ? void 0 : i.find((c) => c.key === "formButton");
790
+ g != null && g.contents && (i = i == null ? void 0 : i.map((c) => ((c == null ? void 0 : c.key) === "formButton" && (c.contents = d.filter((r) => r.id !== y.id)), c))), f.value = i;
791
+ }, C = (y) => {
792
+ const d = p(h.value);
793
+ let i = p(f.value);
794
+ h.value = d.filter((c) => c.id !== y.id);
795
+ const g = i == null ? void 0 : i.find((c) => c.key === "formContent");
796
+ g != null && g.contents && (i = i == null ? void 0 : i.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = d.filter((r) => r.id !== y.id)), c))), f.value = i;
797
+ }, N = (y) => {
798
+ let d = p(f.value);
799
+ const i = d == null ? void 0 : d.find((g) => g.key === "formFlex");
800
+ (i == null ? void 0 : i.contents) !== void 0 ? d = d == null ? void 0 : d.map((g) => ((g == null ? void 0 : g.key) === "formFlex" && (g.contents = y == null ? void 0 : y.isRowFlex), g)) : d.push({
801
+ key: "formFlex",
802
+ contents: y == null ? void 0 : y.isRowFlex
803
+ }), f.value = d;
804
+ };
805
+ return te(
806
+ () => [f.value, h.value],
807
+ () => {
808
+ let y = p(f.value);
809
+ const d = y == null ? void 0 : y.find((i) => (i == null ? void 0 : i.key) === "formContent");
810
+ d != null && d.contents ? (d.contents = h.value, y = y == null ? void 0 : y.map((i) => ((i == null ? void 0 : i.key) === "formContent" && (i.contents = h.value), i))) : y.push({
811
+ key: "formContent",
812
+ contents: h.value
813
+ }), l("change", y);
814
+ },
815
+ { deep: !0, immediate: !0 }
816
+ ), (y, d) => {
817
+ const i = nl("el-button");
818
+ return z(), Y("div", En, [
819
+ I("div", Dn, [
820
+ I("div", Nn, [
821
+ d[1] || (d[1] = I("div", null, X("表单信息"), -1)),
822
+ V(i, {
823
+ class: "blue-operate-button",
824
+ icon: "ele-Plus",
825
+ onClick: $
826
+ }, {
827
+ default: se(() => d[0] || (d[0] = [
828
+ ce(X("新建"))
829
+ ])),
830
+ _: 1,
831
+ __: [0]
832
+ })
833
+ ]),
834
+ I("div", Sn, [
835
+ V(ue, {
836
+ columns: s.value,
837
+ isShowPagination: !1,
838
+ isShowEdit: !1,
839
+ isMoveColumn: !1,
840
+ tableData: h.value,
841
+ onDeleteRow: C
842
+ }, null, 8, ["columns", "tableData"])
843
+ ]),
844
+ I("div", Pn, [
845
+ d[3] || (d[3] = I("div", null, X("表单按钮"), -1)),
846
+ V(i, {
847
+ class: "blue-operate-button",
848
+ icon: "ele-Plus",
849
+ onClick: A
850
+ }, {
851
+ default: se(() => d[2] || (d[2] = [
852
+ ce(X("新建"))
853
+ ])),
854
+ _: 1,
855
+ __: [2]
856
+ })
857
+ ]),
858
+ I("div", Bn, [
859
+ V(ue, {
860
+ columns: o.value,
861
+ isShowPagination: !1,
862
+ isShowEdit: !1,
863
+ isMoveColumn: !1,
864
+ tableData: u.value,
865
+ onDeleteRow: O
866
+ }, null, 8, ["columns", "tableData"])
867
+ ]),
868
+ d[4] || (d[4] = I("div", { class: "operate-title" }, [
869
+ I("div", null, X("表单布局"))
870
+ ], -1)),
871
+ I("div", Fn, [
872
+ V(Ee, {
873
+ rowContents: t.value,
874
+ onChange: N
875
+ }, null, 8, ["rowContents"])
876
+ ])
877
+ ])
878
+ ]);
879
+ };
880
+ }
881
+ }, Un = /* @__PURE__ */ pe(jn, [["__scopeId", "data-v-a36b8468"]]), Rn = { class: "extra-content" }, wn = { key: 0 }, Jn = { key: 1 }, Ln = {
882
+ __name: "index",
883
+ props: {
884
+ itemData: {
885
+ type: Array,
886
+ default: () => []
887
+ },
888
+ childItemData: {
889
+ type: Array,
890
+ default: () => []
891
+ },
892
+ index: Number,
893
+ changedContent: {
894
+ type: Object,
895
+ default: () => {
896
+ }
897
+ }
898
+ },
899
+ emits: ["change"],
900
+ setup(e, { emit: a }) {
901
+ const n = e, l = R(0), t = R(), s = R(), o = a, u = R(!1), f = R({}), h = R({}), k = R();
902
+ te(
903
+ () => [n.itemData],
904
+ () => {
905
+ var c;
906
+ const g = p(n.itemData);
907
+ t.value = (c = p(g)) == null ? void 0 : c.map((r) => {
908
+ var m;
909
+ if (r.key === "extra") {
910
+ let _ = [];
911
+ (m = r.value) == null || m.forEach((T) => {
912
+ var v;
913
+ _.push((v = Object.values(T)) == null ? void 0 : v[0]);
914
+ }), r.value = _;
915
+ }
916
+ return r;
917
+ });
918
+ },
919
+ { deep: !0, immediate: !0 }
920
+ );
921
+ const A = (g, c, r, m) => {
922
+ var T;
923
+ let _ = {};
924
+ ((T = g == null ? void 0 : g[0]) == null ? void 0 : T.contents) === "详情" && (u.value = !0, _[c] = g, s.value = g == null ? void 0 : g.filter((v) => (v == null ? void 0 : v.key) !== "tableContentName"), f.value = _, h.value = r, k.value = m.id);
925
+ }, $ = (g) => {
926
+ var v, x, j, E;
927
+ const c = (x = (v = Object.values(p(f.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((D) => (D == null ? void 0 : D.key) === "tableContentName"), r = (E = (j = Object.values(p(f.value))) == null ? void 0 : j[0]) == null ? void 0 : E.filter((D) => (D == null ? void 0 : D.key) !== "tableContentName"), m = r == null ? void 0 : r.map((D, B) => {
928
+ var P;
929
+ return B === g.index && (D == null ? void 0 : D.comp) === "Table" && (D.compData = (P = D.compData) == null ? void 0 : P.map((S) => {
930
+ var b, F;
931
+ return (S == null ? void 0 : S.key) === "tableContents" && (S.contents = (F = (b = g.content) == null ? void 0 : b.map((U) => {
932
+ let w = {};
933
+ for (let W in U)
934
+ W !== "id" && (w[W] = U[W]);
935
+ return w;
936
+ })) == null ? void 0 : F.map((U) => Object.values(U))), S;
937
+ })), D;
938
+ });
939
+ m.unshift(c == null ? void 0 : c[0]);
940
+ let _ = p(f.value), T = {};
941
+ for (let D in _)
942
+ T[D] = m;
943
+ f.value = T;
944
+ }, O = () => {
945
+ u.value = !1, f.value = {}, h.value = {}, k.value = void 0, l.value++;
946
+ }, C = (g) => {
947
+ var v, x, j, E;
948
+ const c = (x = (v = Object.values(p(f.value))) == null ? void 0 : v[0]) == null ? void 0 : x.filter((D) => (D == null ? void 0 : D.key) === "tableContentName"), r = (E = (j = Object.values(p(f.value))) == null ? void 0 : j[0]) == null ? void 0 : E.filter((D) => (D == null ? void 0 : D.key) !== "tableContentName"), m = r == null ? void 0 : r.map((D, B) => (B === g.index && (D.compData = g.contents), D));
949
+ m.unshift(c == null ? void 0 : c[0]);
950
+ let _ = p(f.value), T = {};
951
+ for (let D in _)
952
+ T[D] = m;
953
+ f.value = T;
954
+ }, N = () => {
955
+ var c, r;
956
+ let g = {};
957
+ for (let m in h.value)
958
+ m === ((c = Object.keys(f.value)) == null ? void 0 : c[0]) ? g[m] = (r = Object.values(f.value)) == null ? void 0 : r[0] : g[m] = h.value[m];
959
+ o("change", {
960
+ buttonName: "编辑",
961
+ index: k.value,
962
+ singleContent: g
963
+ }, "methodData"), u.value = !1, f.value = {}, h.value = {}, k.value = void 0;
964
+ }, y = () => {
965
+ u.value = !1, f.value = {}, h.value = {}, k.value = void 0;
966
+ }, d = (g) => {
967
+ o("change", g, "methodData");
968
+ }, i = (g) => zn(g);
969
+ return (g, c) => (z(), Y(he, null, [
970
+ I("div", Rn, [
971
+ (z(!0), Y(he, null, xe(t.value, (r, m) => (z(), Y("div", { key: l.value }, [
972
+ (r == null ? void 0 : r.key) === "extra" ? (z(), Y("div", wn)) : (z(), Y("div", Jn, [
973
+ (z(), Be(Fe(i(r.comp)), {
974
+ itemData: r == null ? void 0 : r.compData,
975
+ childItemData: r == null ? void 0 : r.itemChildData,
976
+ key: m,
977
+ index: (r == null ? void 0 : r.id) ?? m,
978
+ onContentClick: A,
979
+ onChange: d
980
+ }, null, 40, ["itemData", "childItemData", "index"]))
981
+ ]))
982
+ ]))), 128))
983
+ ]),
984
+ V(El, {
985
+ visible: u.value,
986
+ onBeforeDestroy: y
987
+ }, {
988
+ default: se(() => [
989
+ (z(!0), Y(he, null, xe(s.value, (r, m) => (z(), Y("div", {
990
+ key: m,
991
+ class: "extra-dialog"
992
+ }, [
993
+ (z(), Be(Fe(i(r.comp)), {
994
+ itemData: r == null ? void 0 : r.compData,
995
+ onChange: $,
996
+ childItemData: r == null ? void 0 : r.itemChildData,
997
+ key: m,
998
+ onContentChange: C,
999
+ index: (r == null ? void 0 : r.id) ?? m,
1000
+ class: "extra-component"
1001
+ }, null, 40, ["itemData", "childItemData", "index"]))
1002
+ ]))), 128))
1003
+ ]),
1004
+ footer: se(() => [
1005
+ I("div", { class: "dialog-footer" }, [
1006
+ I("div", {
1007
+ class: "cancel-button footer-button",
1008
+ onClick: O
1009
+ }, X("取消")),
1010
+ I("div", {
1011
+ class: "confirm-button footer-button",
1012
+ onClick: N
1013
+ }, X("确认"))
1014
+ ])
1015
+ ]),
1016
+ _: 1
1017
+ }, 8, ["visible"])
1018
+ ], 64));
1019
+ }
1020
+ }, Gn = /* @__PURE__ */ pe(Ln, [["__scopeId", "data-v-e3e0f29d"]]), Ke = (e) => {
1021
+ let a = [];
1022
+ function n(t) {
1023
+ t == null || t.forEach((s) => {
1024
+ Array.isArray(s) || (s = [s]), s == null || s.forEach((o) => {
1025
+ !(o != null && o.children) || o.children.length === 0 ? a.push(o.label) : l(o.children);
1026
+ });
1027
+ });
1028
+ }
1029
+ function l(t) {
1030
+ t == null || t.forEach((s) => {
1031
+ !(s != null && s.children) || s.children.length === 0 ? a.push(s.label) : l(s.children);
1032
+ });
1033
+ }
1034
+ return n(e), a;
1035
+ }, Mn = (e, a, n) => {
1036
+ var t;
1037
+ let l = (t = p(e)) == null ? void 0 : t.map((s) => (s = s.filter((o) => !o.id), s));
1038
+ return l = l == null ? void 0 : l.map((s) => {
1039
+ var o;
1040
+ return s = (o = s.map((u, f) => {
1041
+ let h = {};
1042
+ if (n != null && n.find((k) => k === a[f]))
1043
+ return h[a[f]] = u, h;
1044
+ })) == null ? void 0 : o.filter((u) => u), s;
1045
+ }), l;
1046
+ }, In = (e, a) => {
1047
+ var o, u;
1048
+ const n = p(e), l = (o = n == null ? void 0 : n.find((f) => (f == null ? void 0 : f.key) === "header")) == null ? void 0 : o.contents, t = (u = n == null ? void 0 : n.find((f) => (f == null ? void 0 : f.key) === "tableContents")) == null ? void 0 : u.contents;
1049
+ return Mn(t, Ke(l).slice(0, Ke(l).length - 1), a);
1050
+ }, Hn = { class: "method-content" }, Wn = ["onClick"], Zn = {
1051
+ __name: "index",
1052
+ props: {
1053
+ itemData: {
1054
+ type: Array,
1055
+ default: () => []
1056
+ },
1057
+ childItemData: {
1058
+ type: Array,
1059
+ default: () => []
1060
+ },
1061
+ index: Number,
1062
+ changedContent: {
1063
+ type: Object,
1064
+ default: () => {
1065
+ }
1066
+ }
1067
+ },
1068
+ setup(e) {
1069
+ const a = R([]), n = e, l = al(ke), { itemData: t } = De(l), s = (f, h) => {
1070
+ var A;
1071
+ const k = (A = h == null ? void 0 : h[0]) == null ? void 0 : A.children;
1072
+ return f == null ? void 0 : f.map(($) => {
1073
+ var O;
1074
+ return $ = (O = $ == null ? void 0 : $.map((C, N) => {
1075
+ var y;
1076
+ return {
1077
+ key: (y = k[N]) == null ? void 0 : y.label,
1078
+ value: C
1079
+ };
1080
+ })) == null ? void 0 : O.filter((C) => C.key), $;
1081
+ });
1082
+ };
1083
+ te(
1084
+ () => t.value,
1085
+ async () => {
1086
+ await u(p(n.itemData));
1087
+ },
1088
+ { deep: !0 }
1089
+ );
1090
+ const o = async (f) => {
1091
+ var i, g, c, r, m, _;
1092
+ let h = {};
1093
+ if ((i = p(f.content)) == null || i.forEach((T, v) => {
1094
+ var x, j, E, D, B, P, S, b, F, U, w, W, K, Z, le, ee, G;
1095
+ if ((T == null ? void 0 : T.comp) === "Table") {
1096
+ let Q = (D = (E = (j = (x = T == null ? void 0 : T.compData) == null ? void 0 : x.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : j.contents) == null ? void 0 : E[0]) == null ? void 0 : D.some((M) => M == null ? void 0 : M.children), q = (S = (P = (B = T == null ? void 0 : T.compData) == null ? void 0 : B.find((M) => (M == null ? void 0 : M.key) === "tableContents")) == null ? void 0 : P.contents) == null ? void 0 : S.map((M) => M.slice(1)), H = (W = (w = (U = (F = (b = T == null ? void 0 : T.compData) == null ? void 0 : b.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : F.contents) == null ? void 0 : U[0]) == null ? void 0 : w[0]) == null ? void 0 : W.label, ne = (le = (Z = (K = T == null ? void 0 : T.compData) == null ? void 0 : K.find((M) => (M == null ? void 0 : M.key) === "header")) == null ? void 0 : Z.contents) == null ? void 0 : le[0];
1097
+ if (Q)
1098
+ h[H] = s(q, ne);
1099
+ else {
1100
+ const M = [];
1101
+ ne = ne.slice(1, ne.length - 1), ne == null || ne.forEach((Cl, Al) => {
1102
+ q == null || q.forEach((Pe) => {
1103
+ M.push({
1104
+ key: Cl.label + Pe[0],
1105
+ value: Pe[Al + 1]
1106
+ });
1107
+ });
1108
+ }), h["form" + v] = M;
1109
+ }
1110
+ } else {
1111
+ const Q = (G = (ee = T.compData) == null ? void 0 : ee.find((H) => (H == null ? void 0 : H.key) === "formContent")) == null ? void 0 : G.contents;
1112
+ h.form = {};
1113
+ const q = [];
1114
+ Q == null || Q.forEach((H) => {
1115
+ H.key !== "" && (H = {
1116
+ key: H == null ? void 0 : H.key,
1117
+ value: H == null ? void 0 : H.value
1118
+ }, q.push(H));
1119
+ }), h.form = q;
1120
+ }
1121
+ }), f.api) {
1122
+ const T = await xl.post(f.api, {
1123
+ data: h,
1124
+ templateFileName: (g = f == null ? void 0 : f.extraContent) == null ? void 0 : g[0]
1125
+ }, {
1126
+ responseType: "blob",
1127
+ // 必须设置
1128
+ headers: {
1129
+ "Content-Type": "application/json"
1130
+ }
1131
+ });
1132
+ var k = new Blob([T.data], {
1133
+ type: "application/octet-stream;charset=UTF-8"
1134
+ }), A = T.headers["content-disposition"], $ = new RegExp("filename=([^;]+\\.[^\\.;]+);*"), O = $.exec(A), C = ((m = (r = (c = f == null ? void 0 : f.extraContent) == null ? void 0 : c[0]) == null ? void 0 : r.split(".")) == null ? void 0 : m[0]) + "." + ((_ = O[1].split(".")) == null ? void 0 : _[1]), N = document.createElement("a"), y = window.URL.createObjectURL(k), d = /^["](.*)["]$/g;
1135
+ N.style.display = "none", N.href = y, N.download = decodeURI(C.replace(d, "$1")), document.body.appendChild(N), N.click(), document.body.removeChild(N), window.URL.revokeObjectURL(y);
1136
+ }
1137
+ }, u = async (f) => {
1138
+ var $;
1139
+ const h = p(f), k = h == null ? void 0 : h.map(async (O) => {
1140
+ var g, c, r, m, _, T;
1141
+ const N = (g = (await je({
1142
+ key: {
1143
+ systemKey: sessionStorage.getItem("systemKey"),
1144
+ parentTable: "",
1145
+ type: "method",
1146
+ methodName: O.method
1147
+ }
1148
+ })).data.result) == null ? void 0 : g[0], y = await je({
1149
+ key: {
1150
+ systemKey: sessionStorage.getItem("systemKey"),
1151
+ type: "methodData",
1152
+ tableId: N == null ? void 0 : N.id
1153
+ }
1154
+ }), d = await _l((c = O == null ? void 0 : O.value) == null ? void 0 : c[0], sessionStorage.getItem("systemKey"), ""), i = (r = y.data.result) == null ? void 0 : r[0];
1155
+ return {
1156
+ buttonName: (m = N == null ? void 0 : N.key) == null ? void 0 : m.methodKey,
1157
+ api: (T = (_ = i == null ? void 0 : i.value) == null ? void 0 : _.tableData) == null ? void 0 : T[0],
1158
+ content: d == null ? void 0 : d.filter((v) => v.comp !== "methodButton"),
1159
+ extraContent: p(O.value).slice(1)
1160
+ };
1161
+ }), A = await Promise.all(k);
1162
+ a.value = A, ($ = a.value) == null || $.forEach((O) => {
1163
+ var C;
1164
+ O.api === "" && ((C = O.content) == null || C.forEach((N) => {
1165
+ var y;
1166
+ N.comp == "Table" && l.setExtraContents(In(N.compData, (y = O.extraContent) == null ? void 0 : y[0]));
1167
+ }));
1168
+ });
1169
+ };
1170
+ return te(
1171
+ () => n.itemData,
1172
+ async () => {
1173
+ await u(p(n.itemData));
1174
+ },
1175
+ { immediate: !0, deep: !0 }
1176
+ ), (f, h) => (z(), Y("div", Hn, [
1177
+ (z(!0), Y(he, null, xe(a.value, (k) => (z(), Y("div", null, [
1178
+ k.api !== "" ? (z(), Y("div", {
1179
+ key: 0,
1180
+ onClick: (A) => o(k),
1181
+ class: "method-buttons"
1182
+ }, X(k.buttonName), 9, Wn)) : Tl("", !0)
1183
+ ]))), 256))
1184
+ ]));
1185
+ }
1186
+ }, Kn = /* @__PURE__ */ pe(Zn, [["__scopeId", "data-v-3daae5c9"]]), Qa = R([
1187
+ {
1188
+ name: "表格",
1189
+ type: "table",
1190
+ comp: "Table",
1191
+ icon: "Grid"
1192
+ },
1193
+ {
1194
+ name: "表单",
1195
+ type: "form",
1196
+ comp: "Form",
1197
+ icon: "Film"
1198
+ },
1199
+ {
1200
+ name: "折叠",
1201
+ type: "fold",
1202
+ comp: "Fold",
1203
+ icon: "Fold"
1204
+ },
1205
+ {
1206
+ name: "头像",
1207
+ type: "avatar",
1208
+ comp: "AvatarUpload",
1209
+ icon: "Avatar"
1210
+ },
1211
+ {
1212
+ name: "签名",
1213
+ type: "signature",
1214
+ comp: "Signature",
1215
+ icon: "Signature"
1216
+ }
1217
+ ]), qn = {
1218
+ TABLE: Ol,
1219
+ FORM: mn,
1220
+ TABLEOPERATE: vn,
1221
+ FORMOPERATE: Un,
1222
+ FOLD: Nl,
1223
+ CALCULATOR: Gn,
1224
+ METHODBUTTON: Kn,
1225
+ AVATARUPLOAD: Bl,
1226
+ SIGNATURE: Pl
1227
+ // 添加其他组件...
1228
+ };
1229
+ function zn(e) {
1230
+ return qn[e == null ? void 0 : e.toUpperCase()] || null;
1231
+ }
1232
+ const L = [
1233
+ {
1234
+ key: "FormName",
1235
+ value: "Form"
1236
+ },
1237
+ {
1238
+ key: "TableName",
1239
+ value: "Table"
1240
+ },
1241
+ {
1242
+ key: "MenuName",
1243
+ value: "Menu"
1244
+ },
1245
+ {
1246
+ key: "GroupName",
1247
+ value: "Group"
1248
+ },
1249
+ {
1250
+ key: "SystemKey",
1251
+ value: "System"
1252
+ }
1253
+ ], J = [
1254
+ {
1255
+ key: "FormDirect",
1256
+ value: "formFlex"
1257
+ },
1258
+ {
1259
+ key: "Form",
1260
+ value: "formContent"
1261
+ },
1262
+ {
1263
+ key: "FormButton",
1264
+ value: "formButton"
1265
+ },
1266
+ {
1267
+ key: "FormFlex",
1268
+ value: "formWrap"
1269
+ },
1270
+ {
1271
+ key: "TableColumns",
1272
+ value: "header"
1273
+ },
1274
+ {
1275
+ key: "TableButton",
1276
+ value: "extraButton"
1277
+ },
1278
+ {
1279
+ key: "TableLineButton",
1280
+ value: "rowButton"
1281
+ },
1282
+ {
1283
+ key: "Table",
1284
+ value: "tableContents"
1285
+ },
1286
+ {
1287
+ key: "TableIndex",
1288
+ value: "tableIndex"
1289
+ },
1290
+ {
1291
+ key: "Menus",
1292
+ value: "menuContents"
1293
+ },
1294
+ {
1295
+ key: "GroupContents",
1296
+ value: "groupContents"
1297
+ }
1298
+ ], re = R(0), Qn = (e) => {
1299
+ const [a, n] = e.split(/=(.+)/), l = a.replace(/['"]/g, "").trim(), t = n.replace(/^['"]|['"]$/g, "");
1300
+ return { key: l, value: t };
1301
+ }, me = (e) => {
1302
+ try {
1303
+ return JSON.parse(e), !0;
1304
+ } catch {
1305
+ return !1;
1306
+ }
1307
+ }, Xn = (e) => e.includes("$") && e.trim().endsWith("(") ? e + ")" : e, Yn = (e) => {
1308
+ let a = e;
1309
+ const n = [];
1310
+ let l = "";
1311
+ for (const t of a)
1312
+ t.includes("{") || l.includes("{") || t.includes("[") || l.includes("[") || t.includes("【") || l.includes("【") || t.includes("(") || l.includes("(") || t.includes("(") || l.includes("(") || t.includes("/*") || l.includes("/*") ? (l += t.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && (n.push(l), l = "")) : n.push(t.trim());
1313
+ return n == null ? void 0 : n.filter((t) => t.includes("{"));
1314
+ }, Vn = (e) => {
1315
+ var n;
1316
+ let a = [];
1317
+ return (n = Yn(e.slice(1, -1))) == null || n.forEach((l) => {
1318
+ var s, o, u, f;
1319
+ let t = ((o = (s = l.slice(1, -1)) == null ? void 0 : s.split(",")) == null ? void 0 : o.length) ?? 1;
1320
+ (f = (u = l.slice(1, -1)) == null ? void 0 : u.split(",")) == null || f.forEach((h) => {
1321
+ var O, C, N, y, d, i, g, c, r, m, _, T, v;
1322
+ let k = h == null ? void 0 : h.split(":"), A = k != null && k[0] ? (k == null ? void 0 : k[1].split("$").length) - 1 === 1 ? ((O = k == null ? void 0 : k[0]) == null ? void 0 : O.replace(/^"(.*)"$/, "$1")) + ((C = k == null ? void 0 : k[1]) == null ? void 0 : C.replace(/^"(.*)"$/, "$1")) : Array.isArray((y = (N = k == null ? void 0 : k[1]) == null ? void 0 : N.replace(/^"(.*)"$/, "$1")) == null ? void 0 : y.split("(")) && ((g = (i = (d = k == null ? void 0 : k[1]) == null ? void 0 : d.replace(/^"(.*)"$/, "$1")) == null ? void 0 : i.split("(")) == null ? void 0 : g.length) > 1 ? ((c = k == null ? void 0 : k[0]) == null ? void 0 : c.replace(/^"(.*)"$/, "$1")) + ((_ = (m = (r = k == null ? void 0 : k[1]) == null ? void 0 : r.replace(/^"(.*)"$/, "$1")) == null ? void 0 : m.split("(")) == null ? void 0 : _[0]) + "()" : (T = k == null ? void 0 : k[0]) == null ? void 0 : T.replace(/^"(.*)"$/, "$1") : "", $ = (k == null ? void 0 : k[1].split("$").length) - 1 === 0 ? (v = k == null ? void 0 : k[1]) == null ? void 0 : v.replace(/^"(.*)"$/, "$1") : "";
1323
+ re.value++, a.push({
1324
+ id: re.value,
1325
+ key: A,
1326
+ value: $,
1327
+ // 如果值为空,则key设为空字符串,否则保留原值
1328
+ width: t,
1329
+ extraContent: k == null ? void 0 : k[1]
1330
+ });
1331
+ });
1332
+ }), a;
1333
+ }, rl = (e) => {
1334
+ var a, n;
1335
+ try {
1336
+ const l = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
1337
+ if (p(l).split("{").length - 1 > 1) {
1338
+ let t = p(l).replace(/^\{(.*)\}$/, "[$1]");
1339
+ if (me(t) && !t.includes("$") || (t = t.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), me(t)) {
1340
+ const s = JSON.parse(t);
1341
+ let o = [];
1342
+ return s == null || s.forEach((u) => {
1343
+ var f;
1344
+ (f = Object.entries(p(u))) == null || f.forEach((h) => {
1345
+ re.value++, o.push({
1346
+ id: re.value,
1347
+ key: (h == null ? void 0 : h[0]) ?? "",
1348
+ value: (h == null ? void 0 : h[1]) === "" ? "" : h == null ? void 0 : h[1],
1349
+ // 如果值为空,则key设为空字符串,否则保留原值
1350
+ width: Object.keys(p(u)).length
1351
+ });
1352
+ });
1353
+ }), o;
1354
+ } else
1355
+ return l.trim().startsWith("{{") ? Vn(l.trim()) : _e(t);
1356
+ } else if (me(l)) {
1357
+ const t = JSON.parse(l);
1358
+ return Object.entries(t).map(([s, o]) => (re.value++, {
1359
+ id: re.value,
1360
+ key: s,
1361
+ value: o === "" ? "" : o,
1362
+ // 如果值为空,则key设为空字符串,否则保留原值
1363
+ width: 1
1364
+ }));
1365
+ } else
1366
+ return ((a = _e(l)) == null ? void 0 : a.length) === 0 ? l : (n = _e(l)) == null ? void 0 : n.map((t) => ({
1367
+ label: t.label,
1368
+ method: Xn(t.method)
1369
+ }));
1370
+ } catch (l) {
1371
+ return console.error("转换失败:", l), [];
1372
+ }
1373
+ }, _e = (e) => {
1374
+ e = e.trim().replace(/^\{|\}$/g, "").trim();
1375
+ const a = [];
1376
+ let n = 0;
1377
+ for (; n < e.length; ) {
1378
+ const l = e.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);
1379
+ if (!l) break;
1380
+ const t = l[1];
1381
+ n += l[0].length;
1382
+ let s = "", o = 0, u = !1, f = "";
1383
+ for (let h = n; h < e.length; h++) {
1384
+ const k = e[h];
1385
+ if ((k === '"' || k === "'") && !u ? (u = !0, f = k) : k === f && u && (u = !1, f = ""), !u && ((k === "{" || k === "(" || k === "[") && o++, (k === "}" || k === ")" || k === "]") && o--, k === "," && o === 0 || h === e.length - 1)) {
1386
+ s = e.slice(n, h + 1).trim(), n = h + 1;
1387
+ break;
1388
+ }
1389
+ }
1390
+ a.push({
1391
+ label: t,
1392
+ method: s
1393
+ });
1394
+ }
1395
+ return a;
1396
+ }, ea = (e, a) => {
1397
+ try {
1398
+ if (L != null && L.find((n) => (n == null ? void 0 : n.key) === a))
1399
+ return e.replace(/['"]/g, "").trim();
1400
+ if (p(e).split("[").length - 1 > 1) {
1401
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1402
+ return JSON.parse(n);
1403
+ } else {
1404
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
1405
+ if (me(n)) {
1406
+ const l = JSON.parse(n);
1407
+ return Array.isArray(l) ? l.map((t) => ({ label: t })) : l;
1408
+ } else
1409
+ return rl(p(e));
1410
+ }
1411
+ } catch (n) {
1412
+ return console.error("解析失败:", n), e;
1413
+ }
1414
+ }, la = (e) => ({ [e == null ? void 0 : e.key]: ea(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), na = (e) => {
1415
+ try {
1416
+ if (p(e).split("[").length - 1 > 1) {
1417
+ const a = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1418
+ return JSON.parse(a);
1419
+ } else
1420
+ return JSON.parse(p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
1421
+ } catch (a) {
1422
+ return console.error("解析失败:", a), e;
1423
+ }
1424
+ }, aa = (e) => {
1425
+ const a = e.match(/\(([^)]+)\)/);
1426
+ return a ? a[1] : "";
1427
+ }, ta = (e) => {
1428
+ const a = e.match(/^([^(]+)\s*\(/);
1429
+ return a ? a[1].trim() : e;
1430
+ }, qe = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((a) => a.trim()).filter((a) => a).join("/"), sa = (e) => {
1431
+ var o, u;
1432
+ let a = [], n = [];
1433
+ const l = (o = p(e)) == null ? void 0 : o.map((f) => f == null ? void 0 : f.key), t = [...new Set((u = p(l)) == null ? void 0 : u.map((f) => aa(f)))];
1434
+ t == null || t.forEach((f) => {
1435
+ let h = e == null ? void 0 : e.filter(($) => $.key.includes(f));
1436
+ h == null || h.forEach(($) => {
1437
+ $ != null && $.key.includes("Menus") && (a.push({
1438
+ key: "GroupName",
1439
+ value: qe($ == null ? void 0 : $.value)
1440
+ }), n.push(qe($ == null ? void 0 : $.value)));
1441
+ });
1442
+ let k = e == null ? void 0 : e.filter(($) => $.key.includes(f) && !($ != null && $.key.includes("Menus")));
1443
+ k = k == null ? void 0 : k.map(($) => ($.key = ta($.key), $));
1444
+ const A = {
1445
+ key: "GroupContents",
1446
+ value: k
1447
+ };
1448
+ a.push(A);
1449
+ });
1450
+ const s = {
1451
+ key: "Menus",
1452
+ value: n
1453
+ };
1454
+ return a.unshift(s), a;
1455
+ }, ol = (e) => {
1456
+ var a, n;
1457
+ if (Array.isArray(Object.keys(e)) && ((a = Object.keys(e)) == null ? void 0 : a.length) > 0) {
1458
+ let l = [];
1459
+ return (n = Object.entries(e)) == null || n.forEach(([t, s]) => {
1460
+ var u, f;
1461
+ let o = [];
1462
+ if (o.push(t), ((u = Object.keys(s)) == null ? void 0 : u.length) > 0) {
1463
+ let h = [];
1464
+ (f = ol(s)) == null || f.forEach((k) => {
1465
+ h.push(k);
1466
+ }), h == null || h.forEach((k) => {
1467
+ o.push(k);
1468
+ });
1469
+ }
1470
+ l.push(o);
1471
+ }), l;
1472
+ }
1473
+ }, ra = (e, a) => {
1474
+ var l;
1475
+ let n = a;
1476
+ return Array.isArray(Object.keys(e)) && ((l = Object.entries(e)) == null || l.forEach(([t, s]) => {
1477
+ let o = [t];
1478
+ if (typeof s == "object" && s !== null) {
1479
+ let u = ol(s);
1480
+ u == null || u.forEach((f) => {
1481
+ o.push(f);
1482
+ });
1483
+ }
1484
+ n.push(o);
1485
+ })), n;
1486
+ }, oa = (e) => {
1487
+ const a = {};
1488
+ return e.forEach((l) => {
1489
+ const t = l.split("/");
1490
+ let s = a;
1491
+ t.forEach((o) => {
1492
+ s[o] || (s[o] = {}), s = s[o];
1493
+ });
1494
+ }), ra(a, []);
1495
+ }, cl = (e) => oa(e), Xa = (e) => {
1496
+ var a, n, l, t, s, o, u, f;
1497
+ try {
1498
+ const h = Se((n = (a = p(e)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), k = (t = (l = p(h)) == null ? void 0 : l.filter((C) => !C.includes("/*"))) == null ? void 0 : t.map((C) => Qn(C)), A = sa(k), $ = [];
1499
+ if (((s = A == null ? void 0 : A.find((C) => (C == null ? void 0 : C.key) === "Menus")) == null ? void 0 : s.value.length) === 0)
1500
+ return !1;
1501
+ (o = p(A)) == null || o.forEach((C) => {
1502
+ var N, y, d, i, g;
1503
+ L != null && L.find((c) => {
1504
+ var r, m;
1505
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
1506
+ }) ? $.push({
1507
+ comp: ((N = L == null ? void 0 : L.find((c) => {
1508
+ var r, m;
1509
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
1510
+ })) == null ? void 0 : N.value) ?? "",
1511
+ name: (y = C == null ? void 0 : C.value) == null ? void 0 : y.replace(/[’]|[‘]|[']/g, ""),
1512
+ compData: []
1513
+ }) : J != null && J.find((c) => {
1514
+ var r, m;
1515
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
1516
+ }) && (($ == null ? void 0 : $.length) === 0 && (d = C.key) != null && d.includes("Menus") && $.push({
1517
+ comp: "Menu",
1518
+ name: "",
1519
+ compData: []
1520
+ }), (i = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && i.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
1521
+ key: (g = J == null ? void 0 : J.find((c) => {
1522
+ var r, m;
1523
+ return ((r = c == null ? void 0 : c.key) == null ? void 0 : r.toUpperCase()) === ((m = C == null ? void 0 : C.key) == null ? void 0 : m.toUpperCase());
1524
+ })) == null ? void 0 : g.value,
1525
+ contents: C == null ? void 0 : C.value
1526
+ }));
1527
+ });
1528
+ let O = (u = p($)) == null ? void 0 : u.map((C) => {
1529
+ var N;
1530
+ return C != null && C.compData && (C.compData = (N = C == null ? void 0 : C.compData) == null ? void 0 : N.map((y) => {
1531
+ var d, i, g, c, r, m, _, T, v, x, j;
1532
+ if ((y == null ? void 0 : y.key) === "formFlex")
1533
+ y.contents = ((i = (d = y.contents) == null ? void 0 : d.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : i.toUpperCase()) !== "Vertical".toUpperCase();
1534
+ else if ((y == null ? void 0 : y.key) === "groupContents")
1535
+ y.contents = (g = p(y.contents)) == null ? void 0 : g.map((E) => la(p(E)));
1536
+ else if (Array.isArray(y == null ? void 0 : y.contents))
1537
+ y.contents = cl(y.contents);
1538
+ else if (((r = (c = y == null ? void 0 : y.contents) == null ? void 0 : c.trim()) != null && r.startsWith("[") || (_ = (m = y.contents) == null ? void 0 : m.trim()) != null && _.startsWith("【")) && ((v = (T = y.contents) == null ? void 0 : T.trim()) != null && v.endsWith("]") || (j = (x = y.contents) == null ? void 0 : x.trim()) != null && j.endsWith("】")))
1539
+ y.contents = na(p(y.contents));
1540
+ else {
1541
+ if (!y.contents) return;
1542
+ y.contents = rl(p(y.contents));
1543
+ }
1544
+ return y;
1545
+ })), C;
1546
+ });
1547
+ return O = (f = p(O)) == null ? void 0 : f.map((C) => {
1548
+ var N;
1549
+ return (C == null ? void 0 : C.comp) === "Group" && (C.compData = (N = C.compData) == null ? void 0 : N.map((y) => {
1550
+ var i;
1551
+ let d = [];
1552
+ return (i = y.contents) == null || i.forEach((g) => {
1553
+ var c, r, m, _, T, v, x, j, E, D, B, P;
1554
+ if (L != null && L.find((S) => {
1555
+ var b, F, U;
1556
+ return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(g)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
1557
+ }))
1558
+ d.push({
1559
+ comp: (c = L == null ? void 0 : L.find((S) => {
1560
+ var b, F, U;
1561
+ return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(g)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
1562
+ })) == null ? void 0 : c.value,
1563
+ name: (m = (r = Object.values(g)) == null ? void 0 : r[0]) == null ? void 0 : m.replace(/[’]|[‘]|[']/g, ""),
1564
+ compData: []
1565
+ });
1566
+ else if (J != null && J.find((S) => {
1567
+ var b, F, U;
1568
+ return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(g)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
1569
+ })) {
1570
+ if ((d == null ? void 0 : d.length) === 0) return;
1571
+ (_ = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && _.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
1572
+ key: (T = J == null ? void 0 : J.find((S) => {
1573
+ var b, F, U;
1574
+ return ((b = S == null ? void 0 : S.key) == null ? void 0 : b.toUpperCase()) === ((U = (F = Object.keys(g)) == null ? void 0 : F[0]) == null ? void 0 : U.toUpperCase());
1575
+ })) == null ? void 0 : T.value,
1576
+ contents: (v = Object.values(g)) == null ? void 0 : v[0]
1577
+ });
1578
+ } else if ((j = (x = Object.keys(g)) == null ? void 0 : x[0]) != null && j.includes("$")) {
1579
+ const S = (D = (E = Object.keys(p(g))) == null ? void 0 : E[0]) == null ? void 0 : D.split("$");
1580
+ d[(d == null ? void 0 : d.length) - 1].compData.push({
1581
+ key: (B = J == null ? void 0 : J.find((b) => {
1582
+ var F, U;
1583
+ return ((F = b == null ? void 0 : b.key) == null ? void 0 : F.toUpperCase()) === ((U = S == null ? void 0 : S[0]) == null ? void 0 : U.toUpperCase());
1584
+ })) == null ? void 0 : B.value,
1585
+ contents: (P = Object.values(g)) == null ? void 0 : P[0],
1586
+ selectLabel: S == null ? void 0 : S[1]
1587
+ });
1588
+ }
1589
+ return g;
1590
+ }), y.contents = d, y;
1591
+ })), C;
1592
+ }), O;
1593
+ } catch {
1594
+ return !1;
1595
+ }
1596
+ }, ae = (e) => {
1597
+ try {
1598
+ return JSON.parse(e), !0;
1599
+ } catch {
1600
+ return !1;
1601
+ }
1602
+ }, Ya = (e, a) => dn(e, a), ze = R(0), ul = (e) => {
1603
+ const a = [];
1604
+ let n = null;
1605
+ for (let l = 0; l < e.length; l++) {
1606
+ const t = e[l];
1607
+ if (Array.isArray(t))
1608
+ n && (n.children = ul(t));
1609
+ else {
1610
+ const s = { label: t };
1611
+ a.push(s), n = s;
1612
+ }
1613
+ }
1614
+ return a;
1615
+ }, pl = (e) => {
1616
+ let a = 0;
1617
+ for (const n of e)
1618
+ a++, n.children && (a += pl(n.children));
1619
+ return a;
1620
+ }, il = (e, a, n = []) => {
1621
+ let l = 0;
1622
+ for (const t of a) {
1623
+ if (l >= e.length) break;
1624
+ const s = [...e[l]];
1625
+ if (n.push(s), l++, t.children && t.children.length > 0) {
1626
+ const o = [];
1627
+ il(
1628
+ e.slice(l),
1629
+ t.children,
1630
+ o
1631
+ ), o.length > 0 && (s.push(o), l += pl(t.children));
1632
+ }
1633
+ }
1634
+ return n;
1635
+ }, ca = (e, a) => {
1636
+ let n = [];
1637
+ return e == null || e.forEach((t) => {
1638
+ t.some((s) => Array.isArray(s)) ? n.push(...t) : n.push(t);
1639
+ }), il(n, a);
1640
+ }, ve = (e) => {
1641
+ const a = { label: e[0].trim() };
1642
+ if (e.length > 1) {
1643
+ const n = e.slice(1);
1644
+ n.length === 1 && Array.isArray(n[0]) ? a.children = n[0].map(
1645
+ (l) => Array.isArray(l) ? ve(l) : { label: l.trim() }
1646
+ ) : a.children = n.map(
1647
+ (l) => Array.isArray(l) ? ve(l) : { label: l.trim() }
1648
+ );
1649
+ }
1650
+ return a;
1651
+ }, Qe = (e) => {
1652
+ let a = e.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
1653
+ return a = a.replace(/:}(?=,|]|}|$)/g, ':""}'), a = a.replace(/:,(?=\s*")/g, ':"",'), a = a.replace(
1654
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
1655
+ (n, l, t) => `"${l}://${t}"`
1656
+ ), a = a.replace(
1657
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
1658
+ '$1"$2"$3'
1659
+ ), a;
1660
+ }, ua = (e) => {
1661
+ var n;
1662
+ return e.some((l) => !Array.isArray(l)) ? e : (n = p(e)) == null ? void 0 : n.map((l) => {
1663
+ let t = [];
1664
+ return l.some((s) => Array.isArray(s)) ? l == null || l.forEach((s) => {
1665
+ Array.isArray(s) && t.push(ve(s));
1666
+ }) : l.some((s) => s.includes("[")) ? t.push(l) : t = l.map((s) => ({ label: s.trim() })), t;
1667
+ });
1668
+ }, fl = (e, a, n) => {
1669
+ let l = e, t = n, s = a;
1670
+ return s.children && (Array.isArray(t[t.length - 1]) ? t[t.length - 1].push(l[0]) : t.push(l[0]), l.shift(), s = s.children), Array.isArray(s) && s.forEach((o) => {
1671
+ if (o.children) {
1672
+ const u = fl(l, o, t);
1673
+ t = u[0], l = u[1];
1674
+ }
1675
+ }), [t, l];
1676
+ }, pa = (e, a) => {
1677
+ let n = e, l = [];
1678
+ return a.length > 0 ? a == null || a.forEach((t) => {
1679
+ let s = n == null ? void 0 : n[0];
1680
+ n.shift();
1681
+ const o = fl(p(n), t, s);
1682
+ s = o[0], n = o[1], l.push(s);
1683
+ }) : l = n, l;
1684
+ }, Ne = (e, a) => {
1685
+ const n = ua(p(e));
1686
+ return pa(n, a);
1687
+ }, ia = (e) => {
1688
+ const a = [];
1689
+ let n = 0;
1690
+ const l = e.length;
1691
+ for (; n < l; ) {
1692
+ const t = e[n];
1693
+ t.key === "tableColumns" && n + 1 < l && e[n + 1].key === "tableContents" ? (a.push({
1694
+ comp: "Table",
1695
+ compData: [t, e[n + 1]],
1696
+ name: ""
1697
+ }), n += 2) : (a.push(t), n += 1);
1698
+ }
1699
+ return a;
1700
+ }, dl = (e) => Ne([e], []), Xe = (e) => {
1701
+ const a = [];
1702
+ return e == null || e.forEach((n) => n == null ? void 0 : n.forEach((t) => {
1703
+ var s, o;
1704
+ ze.value++, a.push({
1705
+ id: ze.value,
1706
+ key: (s = Object.keys(t)) == null ? void 0 : s[0],
1707
+ value: (o = Object.values(t)) == null ? void 0 : o[0],
1708
+ // 如果值为空,则key设为空字符串,否则保留原值
1709
+ width: n.length
1710
+ });
1711
+ })), a;
1712
+ }, Ye = (e) => {
1713
+ let a = ia(e);
1714
+ return a = a == null ? void 0 : a.map((n) => {
1715
+ var l, t, s, o;
1716
+ if (n.comp === "Table")
1717
+ (l = n.compData) != null && l.find((u) => (u == null ? void 0 : u.key) === "header") || (n.compData = (t = n.compData) == null ? void 0 : t.map((u) => (u.key === "tableColumns" ? u = {
1718
+ key: "header",
1719
+ contents: Ne(u.value, [])
1720
+ } : u = {
1721
+ key: u.key,
1722
+ contents: u.value
1723
+ }, u)), n.compData.push({
1724
+ key: "extraButton",
1725
+ contents: [{ label: "新增" }]
1726
+ }), n.compData.push({
1727
+ key: "rowButton",
1728
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1729
+ }));
1730
+ else if (n.key === "form") {
1731
+ const u = (s = n == null ? void 0 : n.value) == null ? void 0 : s.map((f) => (Array.isArray(f) || (f = [f]), f));
1732
+ n = {
1733
+ comp: "Form",
1734
+ compData: [
1735
+ {
1736
+ key: "formFlex",
1737
+ contents: ""
1738
+ },
1739
+ {
1740
+ key: "formContent",
1741
+ contents: Xe(u)
1742
+ }
1743
+ ],
1744
+ name: ""
1745
+ };
1746
+ } else if (n.key === "formTop") {
1747
+ const u = (o = n == null ? void 0 : n.value) == null ? void 0 : o.map((f) => (Array.isArray(f) || (f = [f]), f));
1748
+ n = {
1749
+ comp: "FormTop",
1750
+ compData: [
1751
+ {
1752
+ key: "formFlex",
1753
+ contents: ""
1754
+ },
1755
+ {
1756
+ key: "formContent",
1757
+ contents: Xe(u)
1758
+ }
1759
+ ],
1760
+ name: ""
1761
+ };
1762
+ }
1763
+ return n;
1764
+ }), a;
1765
+ }, fa = (e, a) => {
1766
+ var u, f, h, k, A, $;
1767
+ const n = [], l = ul((f = (u = e == null ? void 0 : e.find((O) => O.key === "tableIndex")) == null ? void 0 : u.value) == null ? void 0 : f[0]);
1768
+ n.push({
1769
+ key: "tableIndexColumn",
1770
+ contents: a
1771
+ }), n.push({
1772
+ key: "tableIndex",
1773
+ contents: l
1774
+ });
1775
+ let t = [];
1776
+ const s = (h = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : h.value;
1777
+ s.length === 1 && !(s != null && s[0].some((O) => Array.isArray(O))) ? t = (k = s == null ? void 0 : s[0]) == null ? void 0 : k.map((O) => ({ label: O })) : t = Ne((A = e == null ? void 0 : e.find((O) => O.key === "tableColumns")) == null ? void 0 : A.value, l), n.push({
1778
+ key: "header",
1779
+ contents: t
1780
+ });
1781
+ const o = ca(($ = e == null ? void 0 : e.find((O) => O.key === "tableContents")) == null ? void 0 : $.value, l);
1782
+ return n.push({
1783
+ key: "tableContents",
1784
+ contents: o
1785
+ }), n.push({
1786
+ key: "extraButton",
1787
+ contents: [{ label: "新增" }]
1788
+ }), n.push({
1789
+ key: "rowButton",
1790
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
1791
+ }), n;
1792
+ }, yl = (e) => e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (a, n, l) => {
1793
+ const t = yl(l);
1794
+ return `"${n}",${t}`;
1795
+ }), de = (e) => {
1796
+ const a = e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
1797
+ return yl(a).replace(/^"(.*)"$/, "$1");
1798
+ }, da = (e) => {
1799
+ const a = /* @__PURE__ */ new Set();
1800
+ return e.filter((n) => {
1801
+ const l = JSON.stringify(n);
1802
+ return a.has(l) ? !1 : a.add(l);
1803
+ });
1804
+ }, Ve = (e) => {
1805
+ var n;
1806
+ let a = [];
1807
+ return (n = p(e)) == null || n.forEach((l) => {
1808
+ var t;
1809
+ (t = l.contents) == null || t.forEach((s) => {
1810
+ a.push(s);
1811
+ });
1812
+ }), a = da(a), a.push({
1813
+ label: "操作"
1814
+ }), [a];
1815
+ }, ya = (e, a) => e.reduce((n, l, t) => {
1816
+ const s = Math.floor(t / a);
1817
+ return n[s] || (n[s] = []), n[s].push(l), n;
1818
+ }, []), hl = (e) => e.reduce((a, n) => n.children && n.children.length > 0 ? a + hl(n.children) : a + 1, 0), ha = (e, a) => {
1819
+ var l;
1820
+ let n = [];
1821
+ return (l = ya(e, hl(a == null ? void 0 : a[0]) - 1)) == null || l.forEach((t) => {
1822
+ let s = [];
1823
+ t.forEach((o) => {
1824
+ var u;
1825
+ Array.isArray(o.contents) ? (u = o.contents) == null || u.forEach((f) => {
1826
+ s.push(f);
1827
+ }) : s.push(o.contents);
1828
+ }), n.push(s);
1829
+ }), [n];
1830
+ }, ma = ["方法体", "输入", "输出"], el = R(1), Se = (e) => {
1831
+ let a;
1832
+ e.replaceAll(" ", `\r
1833
+ `).includes(`\r
1834
+ `) ? a = e.replaceAll(" ", `\r
1835
+ `).split(`\r
1836
+ `).filter((t) => t.trim() !== "") : a = e.replaceAll(" ", `\r
1837
+ `).split(`
1838
+ `).filter((t) => t.trim() !== "");
1839
+ const n = [];
1840
+ let l = "";
1841
+ for (const t of a)
1842
+ t.includes("{") || l.includes("{") || t.includes("[") || l.includes("[") || t.includes("【") || l.includes("【") || t.includes("(") || l.includes("(") || t.includes("(") || l.includes("(") || t.includes("/*") || l.includes("/*") ? (l += t.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && l[l.length - 1] !== "," && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1843
+ return n;
1844
+ }, ga = (e) => {
1845
+ const [a, n] = e.split(/=(.+)/), l = a.replace(/['"]/g, "").trim(), t = n.replace(/^['"]|['"]$/g, "");
1846
+ return { key: l, value: t };
1847
+ }, Ce = (e) => {
1848
+ let a;
1849
+ e.includes(":") ? a = e.split(":").filter((t) => t.trim() !== "") : a = e.split(":").filter((t) => t.trim() !== "");
1850
+ const n = [];
1851
+ let l = "";
1852
+ for (const t of a)
1853
+ t.includes("{") || l.includes("{") || t.includes("[") || l.includes("[") || t.includes("【") || l.includes("【") || t.includes("(") || l.includes("(") || t.includes("(") || l.includes("(") || t.includes("/*") || l.includes("/*") ? (l = l !== "" ? l + ":" + t.trim() : t.trim(), p(l).split("{").length - 1 === p(l).split("}").length - 1 && p(l).split("【").length - 1 === p(l).split("】").length - 1 && p(l).split("[").length - 1 === p(l).split("]").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("(").length - 1 === p(l).split(")").length - 1 && p(l).split("/*").length - 1 === p(l).split("*/").length - 1 && (n.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : n.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1854
+ return n;
1855
+ }, ba = (e) => /^[\x00-\x7F]*$/.test(e), ka = (e) => {
1856
+ var t;
1857
+ const a = e.map((s) => {
1858
+ var u, f;
1859
+ let o = (f = (u = s.key.split("(")) == null ? void 0 : u[1]) == null ? void 0 : f.trim();
1860
+ return o.slice(0, o.length - 1);
1861
+ }), n = a == null ? void 0 : a.map((s) => {
1862
+ var u;
1863
+ return (u = Ce(s)) == null ? void 0 : u.map((f) => {
1864
+ var h;
1865
+ if (f.includes("{")) {
1866
+ let k = (h = f.split(":")) == null ? void 0 : h[0];
1867
+ f = k.slice(1, k.length);
1868
+ }
1869
+ return f;
1870
+ });
1871
+ }).filter((s) => s.length !== 0), l = (t = n == null ? void 0 : n.filter((s) => s.length !== 0)) == null ? void 0 : t.map((s) => {
1872
+ let o = "";
1873
+ return s.forEach((u) => {
1874
+ u.includes("{") || (o = o === "" ? o + p(u) : o + "/" + p(u));
1875
+ }), o;
1876
+ });
1877
+ return cl([...new Set(l)]);
1878
+ }, ml = (e) => {
1879
+ var n, l, t, s, o, u, f, h;
1880
+ const a = (l = (n = e.split("(")) == null ? void 0 : n[1]) == null ? void 0 : l.trim();
1881
+ return ((t = Ce(a.slice(0, a.length - 1))) == null ? void 0 : t.length) > 0 ? a.slice(0, a.length - 1) : (h = (f = (u = (o = (s = e.split("(")) == null ? void 0 : s[1]) == null ? void 0 : o.trim()) == null ? void 0 : u.split(")")) == null ? void 0 : f[0]) == null ? void 0 : h.trim();
1882
+ }, Ca = (e) => {
1883
+ var t;
1884
+ if (!e) return;
1885
+ const a = ml(e), n = (t = Ce(a)) == null ? void 0 : t.map((s) => {
1886
+ var o;
1887
+ if (s.includes("{")) {
1888
+ let u = (o = s.split(":")) == null ? void 0 : o[0];
1889
+ s = u.slice(1, u.length);
1890
+ }
1891
+ return s;
1892
+ });
1893
+ let l = "";
1894
+ return n.forEach((s) => {
1895
+ s.includes("{") || (l = l === "" ? l + p(s) : l + "/" + p(s));
1896
+ }), l;
1897
+ }, Aa = (e) => {
1898
+ const a = e.match(/\[(.*)\]/s);
1899
+ if (a) {
1900
+ const n = `[${a[1]}]`;
1901
+ try {
1902
+ const l = n.replace(/([^\[\],\s]+)/g, '"$1"');
1903
+ return JSON.parse(l);
1904
+ } catch {
1905
+ return JSON.parse(n.replace(/\[(\s*)(,|])/g, '[""$2').replace(/([^\[\],\s]+)/g, '"$1"').replace(/""/g, '"'));
1906
+ }
1907
+ }
1908
+ }, $a = (e) => {
1909
+ var s;
1910
+ if (!e) return;
1911
+ const a = ml(e);
1912
+ let n = [], l = [], t = [];
1913
+ return (s = Ce(a)) == null || s.forEach((o) => {
1914
+ var u;
1915
+ o.includes("[") ? n.push(Aa(o)) : o.includes("{") && (ba((u = o.slice(1, o.length - 1).split(":")) == null ? void 0 : u[0]) ? t.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : ae(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? l.push(JSON.parse(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : o.includes("$") || l.push(o.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')));
1916
+ }), [n, l, t];
1917
+ }, _a = (e) => {
1918
+ const a = [];
1919
+ let n = "";
1920
+ for (const l of e)
1921
+ l.includes("[") || n.includes("[") || l.includes("/*") || n.includes("/*") ? (n += l.trim(), p(n).split("{").length - 1 === p(n).split("}").length - 1 && p(n).split("【").length - 1 === p(n).split("】").length - 1 && p(n).split("[").length - 1 === p(n).split("]").length - 1 && p(n).split("(").length - 1 === p(n).split(")").length - 1 && p(n).split("(").length - 1 === p(n).split(")").length - 1 && p(n).split("/*").length - 1 === p(n).split("*/").length - 1 && (a.push(n.replace(/\/\*[\s\S]*?\*\//g, "")), n = "")) : a.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
1922
+ return a;
1923
+ }, ll = (e) => {
1924
+ var o, u;
1925
+ const a = [], n = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, l = e.match(n);
1926
+ if (l) {
1927
+ const f = l[1] || l[3], h = l[2] || l[4];
1928
+ if (f && h) {
1929
+ const k = `${f}/${h}`;
1930
+ a.push(k);
1931
+ }
1932
+ }
1933
+ const t = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, s = e.match(t);
1934
+ return s ? a.push(s[0].replace(/\)+$/, "")) : (e == null ? void 0 : e.split(",").length) === 2 && a.push((u = (o = e == null ? void 0 : e.split(",")) == null ? void 0 : o[1]) == null ? void 0 : u.trim()), a;
1935
+ }, Oe = (e) => {
1936
+ let a = e.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
1937
+ return a = a.replace(/\[\s*,/g, '[{"": ""},'), a = a.replace(/,\s*,/g, ', {"": ""},'), a = a.replace(/,\s*\]/g, ', {"": ""}]'), a = a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (n, l, t, s, o) => t.includes("'") ? `:${l}${t}${s}${o}` : `:${l}"${t}"${s}${o}`), a = a.replace(/:\s*([,\]}])/g, ': ""$1'), a;
1938
+ }, Oa = (e) => !/\[[^\]]*\{[^\]]*\]/.test(e), Ta = (e) => {
1939
+ const a = p(e).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), n = a ? `${a[2]}/${a[3]}` : null, l = e.match(/\[\{([^}]+)\}\]/), t = l == null ? void 0 : l[1].replaceAll(":", "").replaceAll("'", '"').trim();
1940
+ let s = null;
1941
+ if (t)
1942
+ try {
1943
+ s = JSON.parse(t);
1944
+ } catch (o) {
1945
+ console.error("解析数组失败:", o);
1946
+ }
1947
+ return [n, s];
1948
+ }, xa = (e) => {
1949
+ var u, f, h, k, A, $, O, C, N, y, d;
1950
+ let a = [], n = [], l = {}, t = [], s = e.trim(), o = [];
1951
+ if (s.trim().includes("输入") && s.trim().includes("输出")) {
1952
+ let i = [], g = e.trim();
1953
+ g = p(g).slice(1, p(g).length - 1);
1954
+ const c = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
1955
+ (C = g.match(c)) == null || C.forEach((r, m) => {
1956
+ var v;
1957
+ const _ = r;
1958
+ let T = [];
1959
+ (v = _.slice(1, _.length - 1).replace(":", "$:").split("$:")) == null || v.forEach((x) => {
1960
+ var j, E, D;
1961
+ if (ma.find((B) => x.includes(B)))
1962
+ if (!x.includes("=="))
1963
+ T.push({ key: "tableIndexColumn", contents: x.replaceAll("'", "") });
1964
+ else {
1965
+ let B = [];
1966
+ const P = x.replaceAll("'", "").split("==");
1967
+ B.push(P == null ? void 0 : P[0]), P != null && P[1].includes("[") ? B.push(P == null ? void 0 : P[1].trim().slice(1, (P == null ? void 0 : P[1].length) - 1).split(",")) : B.push([P == null ? void 0 : P[1]]), T.push({ key: "header", contents: [(E = (j = dl([B])) == null ? void 0 : j[0]) == null ? void 0 : E[0]] });
1968
+ }
1969
+ else {
1970
+ let B = x.trim().replaceAll(",", ",").replaceAll("'", '"');
1971
+ if (m % 3 === 0)
1972
+ B.slice(1, B.length - 1).includes("[") ? i.push({
1973
+ key: "tableIndex",
1974
+ contents: [{ label: B }]
1975
+ }) : i.push({
1976
+ key: "tableIndex",
1977
+ contents: [{ label: B.slice(1, B.length - 1) }]
1978
+ });
1979
+ else if ((B == null ? void 0 : B[0]) === "{") {
1980
+ let P = [];
1981
+ const S = B.slice(1, B.length - 1).split(":");
1982
+ if (S.every((b) => ae(b.trim()))) {
1983
+ P.push({ key: "tableContentName", contents: "详情" });
1984
+ let b = [];
1985
+ S.forEach((F, U) => {
1986
+ if (U === 0) {
1987
+ const w = JSON.parse(F).map((W) => ({ label: W }));
1988
+ w.push({
1989
+ label: "操作"
1990
+ }), b.push({
1991
+ key: "header",
1992
+ contents: w
1993
+ });
1994
+ } else
1995
+ b.push({
1996
+ key: "tableContents",
1997
+ contents: JSON.parse(F)
1998
+ });
1999
+ }), b.push({
2000
+ key: "extraButton",
2001
+ contents: [{ label: "新增" }]
2002
+ }), b.push({
2003
+ key: "rowButton",
2004
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2005
+ }), P.push({
2006
+ comp: "Table",
2007
+ compData: b,
2008
+ name: ""
2009
+ }), i.push({
2010
+ key: "tableContents",
2011
+ contents: [P]
2012
+ });
2013
+ }
2014
+ } else {
2015
+ let P = B;
2016
+ P.slice(1, P.length - 1).includes("[") || P.slice(1, P.length - 1).includes("{") ? ae(Qe(P.replace(/\s+/g, ""))) && ((D = JSON.parse(Qe(P.replace(/\s+/g, "")))) == null || D.map((S) => {
2017
+ if (Array.isArray(S == null ? void 0 : S[0])) {
2018
+ const b = [];
2019
+ b.push({ key: "tableContentName", contents: "详情" });
2020
+ let F = [];
2021
+ S.forEach((U) => {
2022
+ U.forEach((w) => {
2023
+ var W, K;
2024
+ el.value++, F.push({
2025
+ id: el.value,
2026
+ key: (W = Object.keys(w)) == null ? void 0 : W[0],
2027
+ value: (K = Object.values(w)) == null ? void 0 : K[0],
2028
+ width: U.length
2029
+ });
2030
+ });
2031
+ }), b.push({
2032
+ comp: "Form",
2033
+ compData: [{
2034
+ key: "formFlex",
2035
+ contents: ""
2036
+ }, {
2037
+ key: "formContent",
2038
+ contents: F
2039
+ }],
2040
+ name: ""
2041
+ }), i.push({
2042
+ key: "tableContents",
2043
+ contents: [b]
2044
+ });
2045
+ } else
2046
+ i.push({
2047
+ key: "tableContents",
2048
+ contents: S == null ? void 0 : S[0]
2049
+ });
2050
+ })) : i.push({
2051
+ key: "tableContents",
2052
+ contents: P.trim().slice(1, P.length - 1)
2053
+ });
2054
+ }
2055
+ }
2056
+ }), i.push(T == null ? void 0 : T[0]);
2057
+ }), o.push({
2058
+ key: "tableIndex",
2059
+ contents: (N = i == null ? void 0 : i.filter((r) => (r == null ? void 0 : r.key) === "tableIndex")) == null ? void 0 : N.map((r) => {
2060
+ var m;
2061
+ return (m = r.contents) == null ? void 0 : m[0];
2062
+ })
2063
+ }), o.push({
2064
+ key: "extraButton",
2065
+ contents: [{ label: "新增" }]
2066
+ }), o.push({
2067
+ key: "rowButton",
2068
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2069
+ }), o.push({
2070
+ key: "tableIndexColumn",
2071
+ contents: (d = (y = i == null ? void 0 : i.filter((r) => (r == null ? void 0 : r.key) === "tableIndexColumn")) == null ? void 0 : y[0]) == null ? void 0 : d.contents
2072
+ }), o.push({
2073
+ key: "header",
2074
+ contents: Ve(i == null ? void 0 : i.filter((r) => (r == null ? void 0 : r.key) === "header"))
2075
+ }), o.push({
2076
+ key: "tableContents",
2077
+ contents: ha(i == null ? void 0 : i.filter((r) => (r == null ? void 0 : r.key) === "tableContents"), Ve(i == null ? void 0 : i.filter((r) => (r == null ? void 0 : r.key) === "header")))
2078
+ });
2079
+ } else {
2080
+ const i = (u = s.trim().split(",$")) == null ? void 0 : u[0];
2081
+ i[0] === "[" ? s = i.slice(1, i.length - 1) : s.includes(",$") && (s = (f = s.trim().split(",$")) == null ? void 0 : f[0]);
2082
+ let g;
2083
+ if (s.includes("$")) {
2084
+ s = p(s), l.method = (k = (h = p(s).trim()) == null ? void 0 : h.slice(1, s.length).split("(")) == null ? void 0 : k[0];
2085
+ let c;
2086
+ ll(s.slice(1, s.length - 2)).length > 1 ? c = ll(s.slice(1, s.length - 2)) : c = Ta(s), l.value = c;
2087
+ } else
2088
+ ae("[" + Oe(s).replaceAll("'", '"') + "]") && !Oa(Oe(s).replaceAll("'", '"')) ? (s = JSON.parse("[" + Oe(s).replaceAll("'", '"') + "]"), t = s) : g = ($ = (A = p(s).split("}")) == null ? void 0 : A.filter((c) => c !== "")) == null ? void 0 : $.map((c) => {
2089
+ let r = c;
2090
+ return r[0] === "," ? r = r.slice(2, r.length) : r = r.slice(1, r.length), r;
2091
+ });
2092
+ (O = p(g)) == null || O.forEach((c) => {
2093
+ var r, m, _, T, v, x, j, E, D, B, P, S, b, F, U;
2094
+ if (c.includes("==")) {
2095
+ const w = (S = c == null ? void 0 : c.split(":")) == null ? void 0 : S[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), W = (b = c == null ? void 0 : c.split(":")) == null ? void 0 : b[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
2096
+ if (ae(W.trim()) ? n.push(JSON.parse(W.trim())) : n.push(JSON.parse(W.replaceAll("'", '"').trim())), w[0] !== "[") {
2097
+ let K = [];
2098
+ ae("[" + de(w) + "]") ? K.push(JSON.parse("[" + de(w) + "]")) : ae("[" + de(w).replaceAll("==", ",") + "]") && K.push(JSON.parse("[" + de(w).replaceAll("==", ",") + "]"));
2099
+ const Z = p(K);
2100
+ Z.push(["操作"]), a.push(Z);
2101
+ } else {
2102
+ const K = (F = w.slice(1, w.length - 1).replaceAll(",", ",|")) == null ? void 0 : F.split("|"), Z = (U = _a(K)) == null ? void 0 : U.map((G) => ((G == null ? void 0 : G[G.length - 1]) === "," && (G = G.slice(0, G.length - 1)), G));
2103
+ let le = [];
2104
+ Z == null || Z.forEach((G) => {
2105
+ var q, H, ne, M;
2106
+ let Q = [];
2107
+ Q.push((q = G.split("==")) == null ? void 0 : q[0].trim().replace(/^"|"$/g, "")), ((H = G.split("==")) == null ? void 0 : H[1].trim()[0]) === "[" ? Q.push(JSON.parse((ne = G.split("==")) == null ? void 0 : ne[1].trim())) : Q.push([JSON.parse((M = G.split("==")) == null ? void 0 : M[1].trim())]), le.push(Q);
2108
+ });
2109
+ const ee = p(le);
2110
+ ee.push(["操作"]), a.push(ee);
2111
+ }
2112
+ } else {
2113
+ if (ae((r = c == null ? void 0 : c.split(":")) == null ? void 0 : r[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
2114
+ let w = JSON.parse((m = c == null ? void 0 : c.split(":")) == null ? void 0 : m[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
2115
+ Array.isArray(w) || (w = [w]), w.push("操作"), a.push(w);
2116
+ }
2117
+ ae((v = (T = (_ = c == null ? void 0 : c.split(":")) == null ? void 0 : _[1]) == null ? void 0 : T.replace(/^"|"$/g, "'")) == null ? void 0 : v.replace(/'([^']+)'/g, '"$1"')) ? n.push(JSON.parse((x = c == null ? void 0 : c.split(":")) == null ? void 0 : x[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : ae((B = (D = (E = (j = c == null ? void 0 : c.split(":")) == null ? void 0 : j[1]) == null ? void 0 : E.replace(/^"|"$/g, "'")) == null ? void 0 : D.replaceAll("'", '"')) == null ? void 0 : B.replace(/'([^']+)'/g, '"$1"')) && n.push(JSON.parse((P = c == null ? void 0 : c.split(":")) == null ? void 0 : P[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
2118
+ }
2119
+ });
2120
+ }
2121
+ return [a, n, o, l, t];
2122
+ }, va = (e) => {
2123
+ const a = [], n = Ca(e == null ? void 0 : e.key), l = $a(e == null ? void 0 : e.key), t = xa(e == null ? void 0 : e.value), s = l == null ? void 0 : l[0], o = t == null ? void 0 : t[4], u = l == null ? void 0 : l[1], f = l == null ? void 0 : l[2], h = t == null ? void 0 : t[0], k = t == null ? void 0 : t[1], A = t == null ? void 0 : t[2], $ = t == null ? void 0 : t[3];
2124
+ return n && a.push({
2125
+ key: "contentPath",
2126
+ value: n
2127
+ }), (s == null ? void 0 : s.length) > 0 && a.push({
2128
+ key: "tableIndex",
2129
+ value: s
2130
+ }), $ && a.push({
2131
+ key: "extraButton",
2132
+ value: $
2133
+ }), (o == null ? void 0 : o.length) > 0 && a.push({
2134
+ key: "form",
2135
+ value: o
2136
+ }), (u == null ? void 0 : u.length) > 0 && a.push({
2137
+ key: "formTop",
2138
+ value: u
2139
+ }), (f == null ? void 0 : f.length) > 0 && a.push({
2140
+ key: "extra",
2141
+ value: f
2142
+ }), (A == null ? void 0 : A.length) > 0 && a.push({
2143
+ comp: "Table",
2144
+ compData: A,
2145
+ name: ""
2146
+ }), (h == null ? void 0 : h.length) > 0 && a.push({
2147
+ key: "tableColumns",
2148
+ value: h
2149
+ }), (k == null ? void 0 : k.length) > 0 && a.push({
2150
+ key: "tableContents",
2151
+ value: k
2152
+ }), a;
2153
+ }, Ea = (e) => {
2154
+ let a = [], n = [];
2155
+ e == null || e.forEach((t) => {
2156
+ Array.isArray(t) && (t == null || t.forEach((s) => {
2157
+ var o;
2158
+ s.comp === "FormTop" && ((o = s.compData) == null || o.forEach((u) => {
2159
+ (u == null ? void 0 : u.key) === "formContent" && (n = [...n, ...u.contents]);
2160
+ }));
2161
+ }));
2162
+ });
2163
+ const l = n.reduce((t, s) => t.find((u) => (u == null ? void 0 : u.key) === (s == null ? void 0 : s.key)) ? t : t.concat([s]), []);
2164
+ return l.length !== 0 && a.push([{
2165
+ comp: "FormTop",
2166
+ compData: [{
2167
+ key: "formFlex",
2168
+ contents: ""
2169
+ }, {
2170
+ key: "formContent",
2171
+ contents: l
2172
+ }]
2173
+ }]), e == null || e.forEach((t) => {
2174
+ if (Array.isArray(t)) {
2175
+ const s = t.filter((o) => o.comp !== "FormTop");
2176
+ a.push(s);
2177
+ } else
2178
+ a.push(t);
2179
+ }), a;
2180
+ }, Da = (e, a) => {
2181
+ const n = a.split("/");
2182
+ let l = [];
2183
+ return e == null || e.forEach((t) => {
2184
+ var u, f, h, k, A, $, O, C, N;
2185
+ const s = [], o = (f = (u = t.find((y) => y.key === "tableIndex")) == null ? void 0 : u.value) == null ? void 0 : f[0];
2186
+ if (o && !o.some((y) => Array.isArray(y))) {
2187
+ const y = (k = (h = t.find((d) => d.key === "tableColumns")) == null ? void 0 : h.value) == null ? void 0 : k[0];
2188
+ s.push({
2189
+ key: "tableIndexColumn",
2190
+ contents: n[n.length - 1]
2191
+ }), s.push({
2192
+ key: "tableIndex",
2193
+ contents: o == null ? void 0 : o.map((d) => ({ label: d }))
2194
+ }), s.push({
2195
+ key: "extraButton",
2196
+ contents: [{ label: "新增" }]
2197
+ }), s.push({
2198
+ key: "rowButton",
2199
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
2200
+ }), Array.isArray(y) && y.some((d) => Array.isArray(d)) ? s.push({
2201
+ key: "header",
2202
+ contents: dl(y)
2203
+ }) : s.push({
2204
+ key: "header",
2205
+ contents: Array.isArray(y) ? y == null ? void 0 : y.map((d) => ({ label: d })) : [y].map((d) => ({ label: d }))
2206
+ }), s.push({
2207
+ key: "tableContents",
2208
+ contents: Array.isArray(y) ? ($ = (A = t.find((d) => d.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : $[0] : (N = (C = (O = t.find((d) => d.key === "tableContents")) == null ? void 0 : O.value) == null ? void 0 : C[0]) == null ? void 0 : N.map((d) => [d])
2209
+ }), l.push({
2210
+ comp: "Table",
2211
+ name: "",
2212
+ compData: s
2213
+ });
2214
+ } else o ? l.push({
2215
+ comp: "Table",
2216
+ name: "",
2217
+ compData: fa(t, n[n.length - 1])
2218
+ }) : t.some((y) => y.key === "extra") ? l.push({
2219
+ comp: "calculator",
2220
+ name: "",
2221
+ compData: Ye(t)
2222
+ }) : l.push(Ye(t));
2223
+ }), Ea(l);
2224
+ }, Na = (e, a) => {
2225
+ var t, s;
2226
+ const n = e.map((o) => o.filter((u) => u.key !== "contentPath"));
2227
+ return {
2228
+ comp: "Group",
2229
+ compData: [{
2230
+ contents: Da(n, a),
2231
+ key: "groupContents"
2232
+ }],
2233
+ name: (s = (t = e[0]) == null ? void 0 : t.find((o) => o.key === "contentPath")) == null ? void 0 : s.value
2234
+ };
2235
+ }, Sa = (e) => {
2236
+ var t;
2237
+ const a = [], n = p(e).map((s) => {
2238
+ var o;
2239
+ if (s != null && s.find((u) => (u == null ? void 0 : u.key) === "contentPath"))
2240
+ return (o = s == null ? void 0 : s.find((u) => (u == null ? void 0 : u.key) === "contentPath")) == null ? void 0 : o.value;
2241
+ }).filter((s) => s !== ""), l = [...new Set(n)];
2242
+ return (t = l == null ? void 0 : l.filter((s) => s)) == null || t.forEach((s) => {
2243
+ var o;
2244
+ a.push(Na((o = p(e)) == null ? void 0 : o.filter((u) => u.find((f) => f.key === "contentPath" && f.value === s)), s));
2245
+ }), a;
2246
+ }, Pa = (e) => {
2247
+ let a = [];
2248
+ a.push({
2249
+ comp: "Menu",
2250
+ compData: [{
2251
+ contents: ka(p(e)),
2252
+ key: "menuContents"
2253
+ }],
2254
+ name: ""
2255
+ });
2256
+ const n = e.map((l) => va(l)).filter((l) => l.length !== 0);
2257
+ return a = [...a, ...Sa(n)], a;
2258
+ }, Va = (e) => {
2259
+ var t, s, o, u, f;
2260
+ const a = (o = Se((s = (t = p(e)) == null ? void 0 : t.replace("(", "(")) == null ? void 0 : s.replace(")", ")"))) == null ? void 0 : o.filter((h) => h !== ""), n = (f = (u = p(a)) == null ? void 0 : u.filter((h) => !h.includes("/*"))) == null ? void 0 : f.map((h) => ga(h));
2261
+ return Pa(n);
2262
+ }, ye = R(0), Te = R(0), Ba = (e) => {
2263
+ const a = 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, l = {};
2264
+ let t;
2265
+ for (; (t = n.exec(a)) !== null; ) {
2266
+ const s = t[1];
2267
+ let o = t[2].trim();
2268
+ (o.match(/\[/g) || []).length !== (o.match(/\]/g) || []).length && (o = o == null ? void 0 : o.replace(/]$/, "")), l[s] ? (l[s + Te.value] && Te.value++, l[s + Te.value] = s + "=" + o) : l[s] = s + "=" + o;
2269
+ }
2270
+ return l;
2271
+ }, gl = (e) => {
2272
+ const [a, n] = e.split("=").map((s) => s.trim()), l = a.replace(/['"]/g, ""), t = n.replace(/^['"]|['"]$/g, "");
2273
+ return { key: l, value: t };
2274
+ }, Fa = (e) => {
2275
+ var o;
2276
+ let a = [];
2277
+ const [n, l] = e.split(/=(.+)/), t = n.replace(/['"]/g, "").trim(), s = l.replace(/^['"]|['"]$/g, "");
2278
+ return (o = Object.values(Ba(s))) == null || o.forEach((u) => {
2279
+ a.push(gl(u));
2280
+ }), { key: t, value: a };
2281
+ }, ge = (e) => {
2282
+ try {
2283
+ return JSON.parse(e), !0;
2284
+ } catch {
2285
+ return !1;
2286
+ }
2287
+ }, bl = (e) => {
2288
+ try {
2289
+ const a = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
2290
+ if (p(a).split("{").length - 1 > 1) {
2291
+ let n = p(a).replace(/^\{(.*)\}$/, "[$1]");
2292
+ if (ge(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), ge(n)) {
2293
+ const l = JSON.parse(n);
2294
+ let t = [];
2295
+ return l == null || l.forEach((s) => {
2296
+ var o;
2297
+ (o = Object.entries(p(s))) == null || o.forEach((u) => {
2298
+ ye.value++, t.push({
2299
+ id: ye.value,
2300
+ key: (u == null ? void 0 : u[0]) ?? "",
2301
+ value: (u == null ? void 0 : u[1]) === "" ? "" : u == null ? void 0 : u[1],
2302
+ // 如果值为空,则key设为空字符串,否则保留原值
2303
+ width: Object.keys(p(s)).length
2304
+ });
2305
+ });
2306
+ }), t;
2307
+ } else
2308
+ return console.error("转换类型不正确:"), [];
2309
+ } else if (ge(a)) {
2310
+ const n = JSON.parse(a);
2311
+ return Object.entries(n).map(([l, t]) => (ye.value++, {
2312
+ id: ye.value,
2313
+ key: l,
2314
+ value: t === "" ? "" : t,
2315
+ // 如果值为空,则key设为空字符串,否则保留原值
2316
+ width: 1
2317
+ }));
2318
+ } else
2319
+ return a;
2320
+ } catch (a) {
2321
+ return console.error("转换失败:", a), [];
2322
+ }
2323
+ }, ja = (e, a) => {
2324
+ try {
2325
+ if (L != null && L.find((n) => (n == null ? void 0 : n.key) === a))
2326
+ return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
2327
+ if (p(e).split("[").length - 1 > 1) {
2328
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2329
+ return JSON.parse(n);
2330
+ } else {
2331
+ const n = p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
2332
+ if (ge(n)) {
2333
+ const l = JSON.parse(n);
2334
+ return Array.isArray(l) ? l.map((t) => ({ label: t })) : l;
2335
+ } else
2336
+ return bl(p(e));
2337
+ }
2338
+ } catch (n) {
2339
+ return console.error("解析失败:", n), e;
2340
+ }
2341
+ }, Ua = (e) => ({ [e == null ? void 0 : e.key]: ja(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), Ra = (e) => {
2342
+ try {
2343
+ if (p(e).split("[").length - 1 > 1) {
2344
+ const a = p(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
2345
+ return JSON.parse(a);
2346
+ } else
2347
+ return JSON.parse(p(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
2348
+ } catch (a) {
2349
+ return console.error("解析失败:", a), e;
2350
+ }
2351
+ }, kl = (e) => {
2352
+ var a, n, l, t, s, o;
2353
+ try {
2354
+ const u = Se((n = (a = p(e)) == null ? void 0 : a.replace("(", "(")) == null ? void 0 : n.replace(")", ")")), f = (l = p(u)) == null ? void 0 : l.map((A) => {
2355
+ var O, C;
2356
+ let $ = (C = (O = p(A)) == null ? void 0 : O.split("=")) == null ? void 0 : C[0];
2357
+ return $ != null && $.includes("GroupContents") ? Fa(A) : gl(A);
2358
+ }), h = [];
2359
+ (t = p(f)) == null || t.forEach((A) => {
2360
+ var $, O, C, N, y;
2361
+ L != null && L.find((d) => {
2362
+ var i, g;
2363
+ return ((i = d == null ? void 0 : d.key) == null ? void 0 : i.toUpperCase()) === ((g = A == null ? void 0 : A.key) == null ? void 0 : g.toUpperCase());
2364
+ }) ? h.push({
2365
+ comp: (($ = L == null ? void 0 : L.find((d) => {
2366
+ var i, g;
2367
+ return ((i = d == null ? void 0 : d.key) == null ? void 0 : i.toUpperCase()) === ((g = A == null ? void 0 : A.key) == null ? void 0 : g.toUpperCase());
2368
+ })) == null ? void 0 : $.value) ?? "",
2369
+ name: (O = A == null ? void 0 : A.value) == null ? void 0 : O.replace(/[’]|[‘]|[']/g, ""),
2370
+ compData: []
2371
+ }) : J != null && J.find((d) => {
2372
+ var i, g;
2373
+ return ((i = d == null ? void 0 : d.key) == null ? void 0 : i.toUpperCase()) === ((g = A == null ? void 0 : A.key) == null ? void 0 : g.toUpperCase());
2374
+ }) && ((h == null ? void 0 : h.length) === 0 && (C = A.key) != null && C.includes("Menus") && h.push({
2375
+ comp: "Menu",
2376
+ name: "",
2377
+ compData: []
2378
+ }), (N = h == null ? void 0 : h[(h == null ? void 0 : h.length) - 1]) != null && N.compData && h[(h == null ? void 0 : h.length) - 1].compData.push({
2379
+ key: (y = J == null ? void 0 : J.find((d) => {
2380
+ var i, g;
2381
+ return ((i = d == null ? void 0 : d.key) == null ? void 0 : i.toUpperCase()) === ((g = A == null ? void 0 : A.key) == null ? void 0 : g.toUpperCase());
2382
+ })) == null ? void 0 : y.value,
2383
+ contents: A == null ? void 0 : A.value
2384
+ }));
2385
+ }), console.log("newContents", h);
2386
+ let k = (s = p(h)) == null ? void 0 : s.map((A) => {
2387
+ var $;
2388
+ return A != null && A.compData && (A.compData = ($ = A == null ? void 0 : A.compData) == null ? void 0 : $.map((O) => {
2389
+ var C, N, y, d, i, g, c, r, m, _, T;
2390
+ if ((O == null ? void 0 : O.key) === "formFlex")
2391
+ O.contents = ((N = (C = O.contents) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : N.toUpperCase()) !== "Vertical".toUpperCase();
2392
+ else if ((O == null ? void 0 : O.key) === "groupContents")
2393
+ O.contents = (y = p(O.contents)) == null ? void 0 : y.map((v) => Ua(p(v)));
2394
+ else if (((i = (d = O.contents) == null ? void 0 : d.trim()) != null && i.startsWith("[") || (c = (g = O.contents) == null ? void 0 : g.trim()) != null && c.startsWith("【")) && ((m = (r = O.contents) == null ? void 0 : r.trim()) != null && m.endsWith("]") || (T = (_ = O.contents) == null ? void 0 : _.trim()) != null && T.endsWith("】")))
2395
+ O.contents = Ra(p(O.contents));
2396
+ else {
2397
+ if (!O.contents) return;
2398
+ O.contents = bl(p(O.contents));
2399
+ }
2400
+ return O;
2401
+ })), A;
2402
+ });
2403
+ return k = (o = p(k)) == null ? void 0 : o.map((A) => {
2404
+ var $;
2405
+ return (A == null ? void 0 : A.comp) === "Group" && (A.compData = ($ = A.compData) == null ? void 0 : $.map((O) => {
2406
+ var N;
2407
+ let C = [];
2408
+ return (N = O.contents) == null || N.forEach((y) => {
2409
+ var d, i, g, c, r, m, _, T, v, x, j, E;
2410
+ if (L != null && L.find((D) => {
2411
+ var B, P, S;
2412
+ return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
2413
+ }))
2414
+ C.push({
2415
+ comp: (d = L == null ? void 0 : L.find((D) => {
2416
+ var B, P, S;
2417
+ return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
2418
+ })) == null ? void 0 : d.value,
2419
+ name: (g = (i = Object.values(y)) == null ? void 0 : i[0]) == null ? void 0 : g.replace(/[’]|[‘]|[']/g, ""),
2420
+ compData: []
2421
+ });
2422
+ else if (J != null && J.find((D) => {
2423
+ var B, P, S;
2424
+ return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
2425
+ })) {
2426
+ if ((C == null ? void 0 : C.length) === 0) return;
2427
+ (c = C == null ? void 0 : C[(C == null ? void 0 : C.length) - 1]) != null && c.compData && C[(C == null ? void 0 : C.length) - 1].compData.push({
2428
+ key: (r = J == null ? void 0 : J.find((D) => {
2429
+ var B, P, S;
2430
+ return ((B = D == null ? void 0 : D.key) == null ? void 0 : B.toUpperCase()) === ((S = (P = Object.keys(y)) == null ? void 0 : P[0]) == null ? void 0 : S.toUpperCase());
2431
+ })) == null ? void 0 : r.value,
2432
+ contents: (m = Object.values(y)) == null ? void 0 : m[0]
2433
+ });
2434
+ } else if ((T = (_ = Object.keys(y)) == null ? void 0 : _[0]) != null && T.includes("$")) {
2435
+ const D = (x = (v = Object.keys(p(y))) == null ? void 0 : v[0]) == null ? void 0 : x.split("$");
2436
+ C[(C == null ? void 0 : C.length) - 1].compData.push({
2437
+ key: (j = J == null ? void 0 : J.find((B) => {
2438
+ var P, S;
2439
+ return ((P = B == null ? void 0 : B.key) == null ? void 0 : P.toUpperCase()) === ((S = D == null ? void 0 : D[0]) == null ? void 0 : S.toUpperCase());
2440
+ })) == null ? void 0 : j.value,
2441
+ contents: (E = Object.values(y)) == null ? void 0 : E[0],
2442
+ selectLabel: D == null ? void 0 : D[1]
2443
+ });
2444
+ }
2445
+ return y;
2446
+ }), O.contents = C, O;
2447
+ })), A;
2448
+ }), k;
2449
+ } catch {
2450
+ return !1;
2451
+ }
2452
+ }, et = (e) => kl(e), lt = (e) => !!kl(e), wa = al(ke), { itemData: nt } = De(wa), Ja = Sl(ke), { systemKey: at, activeMenuPath: tt } = De(Ja), oe = R(0), st = (e) => e.reduce((n, l) => {
2453
+ var s, o;
2454
+ const t = Object.values(n);
2455
+ return (((s = Object.keys(n)) == null ? void 0 : s.length) === 0 || t[t.length - 1].length >= (l == null ? void 0 : l.width)) && (n[oe.value] = [], oe.value++), n[oe.value - 1].push(l), ((o = Object.keys(n)) == null ? void 0 : o.length) === (l == null ? void 0 : l.width) && (n[oe.value] = [], oe.value++), n;
2456
+ }, {});
2457
+ export {
2458
+ st as a,
2459
+ Xa as b,
2460
+ Va as c,
2461
+ Ya as d,
2462
+ et as e,
2463
+ zn as g,
2464
+ lt as i,
2465
+ Qa as s
2466
+ };