ss-component-new 1.1.155 → 1.1.156

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