ss-component-new 1.1.136 → 1.1.150

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