ss-component-new 1.1.258 → 1.1.260

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 (91) hide show
  1. package/dist/array-D7K5W8Zf.js +1309 -0
  2. package/dist/array-jQLpY9RR.cjs +7 -0
  3. package/dist/{cloneDeep-BferVm6H.js → cloneDeep-C8JkckZX.js} +1 -1
  4. package/dist/{cloneDeep-hYL1Afrz.cjs → cloneDeep-DeaVRf7c.cjs} +1 -1
  5. package/dist/index--VbTYBcj.cjs +3839 -0
  6. package/dist/{index-C_w2xhRh.cjs → index-5fIyzgQ7.cjs} +1 -1
  7. package/dist/{index-BNM5Bbhn.js → index-8K_N0LJN.js} +5 -5
  8. package/dist/{index-DDSwY2o8.cjs → index-B-cH-QNS.cjs} +1 -1
  9. package/dist/{index-B8i3Wijq.cjs → index-B242naIg.cjs} +1 -1
  10. package/dist/{index-ButXOs4c.js → index-B5hAJIVr.js} +14 -13
  11. package/dist/{index-5Auj3phL.cjs → index-BE5JMEUQ.cjs} +1 -1
  12. package/dist/{index-Bzne3pNG.cjs → index-BG3mdvAz.cjs} +1 -1
  13. package/dist/index-BHvTlKd3.cjs +1 -0
  14. package/dist/{index-BqAD0yQU.js → index-BPq6t6hi.js} +4 -4
  15. package/dist/{index-BLUXHcu3.js → index-BUuhAWcq.js} +3 -3
  16. package/dist/{index-BO0JDldf.js → index-BXnbrZ-r.js} +1 -1
  17. package/dist/{index-ZKwBkEiK.cjs → index-BZ8wkZQh.cjs} +1 -1
  18. package/dist/{index-CTX9zSeG.cjs → index-Bet-HAJy.cjs} +1 -1
  19. package/dist/{index-zdAmZt8G.js → index-Bnv__gK8.js} +3 -3
  20. package/dist/{index-DRL6gZpa.cjs → index-BolGTYa3.cjs} +1 -1
  21. package/dist/{index-CgfEj8KO.cjs → index-BsC4kJpk.cjs} +1 -1
  22. package/dist/index-BtiLpCjW.cjs +1 -0
  23. package/dist/{index-BuRA2mCc.js → index-BxFO-CIo.js} +4 -4
  24. package/dist/{index-YrUSo_uZ.js → index-BxujM00j.js} +4 -4
  25. package/dist/index-C-mfzbqw.js +271 -0
  26. package/dist/{index-CgbDpv2z.cjs → index-C1nyUNql.cjs} +3 -3
  27. package/dist/{index-iVpiJixE.js → index-C4PVEc68.js} +5 -5
  28. package/dist/{index-DleDr3pn.cjs → index-C9aXF9WW.cjs} +1 -1
  29. package/dist/{index-6CZj96a9.cjs → index-CAzENawT.cjs} +1 -1
  30. package/dist/{index-BnyTRSOn.js → index-CI2eEV0I.js} +4 -4
  31. package/dist/{index-Bme7QG8P.cjs → index-CQVGpn4s.cjs} +1 -1
  32. package/dist/{index-CQWAAWyV.cjs → index-Ca096wE0.cjs} +1 -1
  33. package/dist/{index-1Pxdg8px.js → index-Ch3MGWzF.js} +1 -1
  34. package/dist/{index-BhKYpS0F.js → index-Cjbhxo1B.js} +3 -3
  35. package/dist/{index-D0PxGV0S.cjs → index-Cpt2pjCu.cjs} +1 -1
  36. package/dist/{index-CVRwsXeS.js → index-CuLrv0cg.js} +36 -34
  37. package/dist/index-CxPa1ZjZ.js +3460 -0
  38. package/dist/{index-D1tWY0PO.js → index-D2uRUT1R.js} +59 -59
  39. package/dist/{index-gaJJh2zB.cjs → index-D5wJBzEa.cjs} +1 -1
  40. package/dist/{index-WWIGsH-g.cjs → index-D79UCoOE.cjs} +1 -1
  41. package/dist/index-DO-JIfiX.cjs +1 -0
  42. package/dist/{index-CD53z5-6.js → index-DPvdIx0y.js} +5 -5
  43. package/dist/{index-B8wV8mLL.js → index-DT3lwd9Q.js} +1 -1
  44. package/dist/index-DXLSBZRm.cjs +1 -0
  45. package/dist/{index-Df1JlOfX.cjs → index-DXLU7g4L.cjs} +1 -1
  46. package/dist/{index-JRAqJZPj.js → index-Ddpd7EpX.js} +3 -3
  47. package/dist/{index-t6-Y8dJh.cjs → index-Di_0a510.cjs} +1 -1
  48. package/dist/{index-Bnma6H_D.cjs → index-DpaMsUnp.cjs} +1 -1
  49. package/dist/{index-C7oO0eCH.js → index-HkIY6QFh.js} +284 -283
  50. package/dist/{index-DDsBn5l0.js → index-NxcH7OVs.js} +1 -1
  51. package/dist/{index-BSOOmOcP.js → index-Xk-IPNQQ.js} +1 -1
  52. package/dist/index-Yey65VaS.js +32138 -0
  53. package/dist/{index-V6fZWmWL.js → index-acH8HUWB.js} +1 -1
  54. package/dist/{index-DjMOTSvE.cjs → index-anmMDMxp.cjs} +1 -1
  55. package/dist/{index-B8G0kWYK.js → index-jTr2VZm5.js} +6 -6
  56. package/dist/{index-6aLV7pyi.js → index-m2bL52w2.js} +6 -6
  57. package/dist/{index-CEIWAp5_.js → index-sAd-uJNH.js} +8 -8
  58. package/dist/{index-BLE2ug66.js → index-swKZ0MXF.js} +16 -14
  59. package/dist/index-uUtEdVD8.cjs +1 -0
  60. package/dist/index-vDrb4qIv.cjs +1 -0
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-_bsSPQD4.js → index.vue_vue_type_script_setup_true_lang-9pU472SX.js} +1 -1
  62. package/dist/{index.vue_vue_type_script_setup_true_lang-Bp0N6DTD.cjs → index.vue_vue_type_script_setup_true_lang-DlbwqDGU.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Ch8nCT3a.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-CbOR0FUi.js} +6 -6
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Bl5NBw-o.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Dvs25f5S.cjs} +1 -1
  65. package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-CiaLVLvs.cjs +1 -0
  66. package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-Dqgty3hN.js +662 -0
  67. package/dist/{login-tvgZPNFj.js → login-DUTVbSkU.js} +2 -2
  68. package/dist/{login-Ci1_gDhC.cjs → login-mSxajr8S.cjs} +1 -1
  69. package/dist/{main-Cfq8oZ9O.js → main-BYNX5wOY.js} +11 -10
  70. package/dist/main-Cn6D1vA7.cjs +1 -0
  71. package/dist/{menu-DBUuyOMU.js → menu-DTnhB7wQ.js} +5 -5
  72. package/dist/{menu-CaXxZ-VB.cjs → menu-Gyigk1Fh.cjs} +2 -2
  73. package/dist/{modelComp-BYGFkfVD.cjs → modelComp-BHvGEjSE.cjs} +1 -1
  74. package/dist/{modelComp-CTOnIeyl.js → modelComp-DL_NgjAv.js} +1 -1
  75. package/dist/ss-component.cjs +1 -1
  76. package/dist/ss-component.css +1 -1
  77. package/dist/ss-component.js +7 -7
  78. package/dist/ss-component3.cjs +1 -1
  79. package/dist/ss-component3.js +1 -1
  80. package/package.json +2 -1
  81. package/dist/array-BeL7J4eu.js +0 -4763
  82. package/dist/array-Dwf3pp1a.cjs +0 -7
  83. package/dist/index-Cm57E8Ql.cjs +0 -1
  84. package/dist/index-CnGFr6Dd.cjs +0 -1
  85. package/dist/index-DEzzOfaa.cjs +0 -1
  86. package/dist/index-DelCtLkT.cjs +0 -3832
  87. package/dist/index-R2K2-Ktx.js +0 -22139
  88. package/dist/index-otwBW56v.cjs +0 -1
  89. package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-DLi_05S6.js +0 -908
  90. package/dist/index.vue_vue_type_style_index_0_scoped_4b7a2e5d_lang-DObCTUZw.cjs +0 -1
  91. package/dist/main-BS2vaGyV.cjs +0 -1
@@ -0,0 +1,1309 @@
1
+ import { ref as Q } from "vue";
2
+ import { c as o } from "./cloneDeep-C8JkckZX.js";
3
+ import { I as z } from "./index-Yey65VaS.js";
4
+ const J = [
5
+ {
6
+ key: "FormName",
7
+ value: "Form"
8
+ },
9
+ {
10
+ key: "TableName",
11
+ value: "Table"
12
+ },
13
+ {
14
+ key: "MenuName",
15
+ value: "Menu"
16
+ },
17
+ {
18
+ key: "GroupName",
19
+ value: "Group"
20
+ },
21
+ {
22
+ key: "SystemKey",
23
+ value: "System"
24
+ }
25
+ ], j = [
26
+ {
27
+ key: "FormDirect",
28
+ value: "formFlex"
29
+ },
30
+ {
31
+ key: "Form",
32
+ value: "formContent"
33
+ },
34
+ {
35
+ key: "FormButton",
36
+ value: "formButton"
37
+ },
38
+ {
39
+ key: "FormFlex",
40
+ value: "formWrap"
41
+ },
42
+ {
43
+ key: "TableColumns",
44
+ value: "header"
45
+ },
46
+ {
47
+ key: "TableButton",
48
+ value: "extraButton"
49
+ },
50
+ {
51
+ key: "TableLineButton",
52
+ value: "rowButton"
53
+ },
54
+ {
55
+ key: "Table",
56
+ value: "tableContents"
57
+ },
58
+ {
59
+ key: "TableIndex",
60
+ value: "tableIndex"
61
+ },
62
+ {
63
+ key: "Menus",
64
+ value: "menuContents"
65
+ },
66
+ {
67
+ key: "GroupContents",
68
+ value: "groupContents"
69
+ }
70
+ ], q = Q(0), Pe = (s) => {
71
+ const [r, l] = s.split(/=(.+)/), e = r.replace(/['"]/g, "").trim(), t = l.replace(/^['"]|['"]$/g, "");
72
+ return { key: e, value: t };
73
+ }, V = (s) => {
74
+ try {
75
+ return JSON.parse(s), !0;
76
+ } catch {
77
+ return !1;
78
+ }
79
+ }, Be = (s) => s.includes("$") && s.trim().endsWith("(") ? s + ")" : s, Ge = (s) => {
80
+ let r = s;
81
+ const l = [];
82
+ let e = "";
83
+ for (const t of r)
84
+ t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e += t.trim(), o(e).split("{").length - 1 === o(e).split("}").length - 1 && o(e).split("【").length - 1 === o(e).split("】").length - 1 && o(e).split("[").length - 1 === o(e).split("]").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("/*").length - 1 === o(e).split("*/").length - 1 && (l.push(e), e = "")) : l.push(t.trim());
85
+ return l == null ? void 0 : l.filter((t) => t.includes("{"));
86
+ }, We = (s) => {
87
+ var l;
88
+ let r = [];
89
+ return (l = Ge(s.slice(1, -1))) == null || l.forEach((e) => {
90
+ var n, a, c, f;
91
+ let t = ((a = (n = e.slice(1, -1)) == null ? void 0 : n.split(",")) == null ? void 0 : a.length) ?? 1;
92
+ (f = (c = e.slice(1, -1)) == null ? void 0 : c.split(",")) == null || f.forEach((p) => {
93
+ var A, h, U, b, $, i, y, m, g, x, P, I, B;
94
+ let u = p == null ? void 0 : p.split(":"), k = u != null && u[0] ? (u == null ? void 0 : u[1].split("$").length) - 1 === 1 ? ((A = u == null ? void 0 : u[0]) == null ? void 0 : A.replace(/^"(.*)"$/, "$1")) + ((h = u == null ? void 0 : u[1]) == null ? void 0 : h.replace(/^"(.*)"$/, "$1")) : Array.isArray((b = (U = u == null ? void 0 : u[1]) == null ? void 0 : U.replace(/^"(.*)"$/, "$1")) == null ? void 0 : b.split("(")) && ((y = (i = ($ = u == null ? void 0 : u[1]) == null ? void 0 : $.replace(/^"(.*)"$/, "$1")) == null ? void 0 : i.split("(")) == null ? void 0 : y.length) > 1 ? ((m = u == null ? void 0 : u[0]) == null ? void 0 : m.replace(/^"(.*)"$/, "$1")) + ((P = (x = (g = u == null ? void 0 : u[1]) == null ? void 0 : g.replace(/^"(.*)"$/, "$1")) == null ? void 0 : x.split("(")) == null ? void 0 : P[0]) + "()" : (I = u == null ? void 0 : u[0]) == null ? void 0 : I.replace(/^"(.*)"$/, "$1") : "", d = (u == null ? void 0 : u[1].split("$").length) - 1 === 0 ? (B = u == null ? void 0 : u[1]) == null ? void 0 : B.replace(/^"(.*)"$/, "$1") : "";
95
+ q.value++, r.push({
96
+ id: q.value,
97
+ key: k,
98
+ value: d,
99
+ // 如果值为空,则key设为空字符串,否则保留原值
100
+ width: t,
101
+ extraContent: u == null ? void 0 : u[1]
102
+ });
103
+ });
104
+ }), r;
105
+ }, $e = (s) => {
106
+ var r, l;
107
+ try {
108
+ const e = s.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
109
+ if (o(e).split("{").length - 1 > 1) {
110
+ let t = o(e).replace(/^\{(.*)\}$/, "[$1]");
111
+ if (V(t) && !t.includes("$") || (t = t.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), V(t)) {
112
+ const n = JSON.parse(t);
113
+ let a = [];
114
+ return n == null || n.forEach((c) => {
115
+ var f;
116
+ (f = Object.entries(o(c))) == null || f.forEach((p) => {
117
+ q.value++, a.push({
118
+ id: q.value,
119
+ key: (p == null ? void 0 : p[0]) ?? "",
120
+ value: (p == null ? void 0 : p[1]) === "" ? "" : p == null ? void 0 : p[1],
121
+ // 如果值为空,则key设为空字符串,否则保留原值
122
+ width: Object.keys(o(c)).length
123
+ });
124
+ });
125
+ }), a;
126
+ } else
127
+ return e.trim().startsWith("{{") ? We(e.trim()) : se(t);
128
+ } else if (V(e)) {
129
+ const t = JSON.parse(e);
130
+ return Object.entries(t).map(([n, a]) => (q.value++, {
131
+ id: q.value,
132
+ key: n,
133
+ value: a === "" ? "" : a,
134
+ // 如果值为空,则key设为空字符串,否则保留原值
135
+ width: 1
136
+ }));
137
+ } else
138
+ return ((r = se(e)) == null ? void 0 : r.length) === 0 ? e : (l = se(e)) == null ? void 0 : l.map((t) => ({
139
+ label: t.label,
140
+ method: Be(t.method)
141
+ }));
142
+ } catch (e) {
143
+ return console.error("转换失败:", e), [];
144
+ }
145
+ }, se = (s) => {
146
+ s = s.trim().replace(/^\{|\}$/g, "").trim();
147
+ const r = [];
148
+ let l = 0;
149
+ for (; l < s.length; ) {
150
+ const e = s.slice(l).match(/^\s*"([^"]+)"\s*:\s*/);
151
+ if (!e) break;
152
+ const t = e[1];
153
+ l += e[0].length;
154
+ let n = "", a = 0, c = !1, f = "";
155
+ for (let p = l; p < s.length; p++) {
156
+ const u = s[p];
157
+ if ((u === '"' || u === "'") && !c ? (c = !0, f = u) : u === f && c && (c = !1, f = ""), !c && ((u === "{" || u === "(" || u === "[") && a++, (u === "}" || u === ")" || u === "]") && a--, u === "," && a === 0 || p === s.length - 1)) {
158
+ n = s.slice(l, p + 1).trim(), l = p + 1;
159
+ break;
160
+ }
161
+ }
162
+ r.push({
163
+ label: t,
164
+ method: n
165
+ });
166
+ }
167
+ return r;
168
+ }, De = (s, r) => {
169
+ try {
170
+ if (J != null && J.find((l) => (l == null ? void 0 : l.key) === r))
171
+ return s.replace(/['"]/g, "").trim();
172
+ if (o(s).split("[").length - 1 > 1) {
173
+ const l = o(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
174
+ return JSON.parse(l);
175
+ } else {
176
+ const l = o(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
177
+ if (V(l)) {
178
+ const e = JSON.parse(l);
179
+ return Array.isArray(e) ? e.map((t) => ({ label: t })) : e;
180
+ } else
181
+ return $e(o(s));
182
+ }
183
+ } catch (l) {
184
+ return console.error("解析失败:", l), s;
185
+ }
186
+ }, Le = (s) => ({ [s == null ? void 0 : s.key]: De(s == null ? void 0 : s.value, s == null ? void 0 : s.key) }), _e = (s) => {
187
+ try {
188
+ if (o(s).split("[").length - 1 > 1) {
189
+ const r = o(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
190
+ return JSON.parse(r);
191
+ } else
192
+ return JSON.parse(o(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
193
+ } catch (r) {
194
+ return console.error("解析失败:", r), s;
195
+ }
196
+ }, ze = (s) => {
197
+ const r = s.match(/\(([^)]+)\)/);
198
+ return r ? r[1] : "";
199
+ }, Ze = (s) => {
200
+ const r = s.match(/^([^(]+)\s*\(/);
201
+ return r ? r[1].trim() : s;
202
+ }, fe = (s) => s.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((r) => r.trim()).filter((r) => r).join("/"), He = (s) => {
203
+ var a, c;
204
+ let r = [], l = [];
205
+ const e = (a = o(s)) == null ? void 0 : a.map((f) => f == null ? void 0 : f.key), t = [...new Set((c = o(e)) == null ? void 0 : c.map((f) => ze(f)))];
206
+ t == null || t.forEach((f) => {
207
+ let p = s == null ? void 0 : s.filter((d) => d.key.includes(f));
208
+ p == null || p.forEach((d) => {
209
+ d != null && d.key.includes("Menus") && (r.push({
210
+ key: "GroupName",
211
+ value: fe(d == null ? void 0 : d.value)
212
+ }), l.push(fe(d == null ? void 0 : d.value)));
213
+ });
214
+ let u = s == null ? void 0 : s.filter((d) => d.key.includes(f) && !(d != null && d.key.includes("Menus")));
215
+ u = u == null ? void 0 : u.map((d) => (d.key = Ze(d.key), d));
216
+ const k = {
217
+ key: "GroupContents",
218
+ value: u
219
+ };
220
+ r.push(k);
221
+ });
222
+ const n = {
223
+ key: "Menus",
224
+ value: l
225
+ };
226
+ return r.unshift(n), r;
227
+ }, Ae = (s) => {
228
+ var r, l;
229
+ if (Array.isArray(Object.keys(s)) && ((r = Object.keys(s)) == null ? void 0 : r.length) > 0) {
230
+ let e = [];
231
+ return (l = Object.entries(s)) == null || l.forEach(([t, n]) => {
232
+ var c, f;
233
+ let a = [];
234
+ if (a.push(t), ((c = Object.keys(n)) == null ? void 0 : c.length) > 0) {
235
+ let p = [];
236
+ (f = Ae(n)) == null || f.forEach((u) => {
237
+ p.push(u);
238
+ }), p == null || p.forEach((u) => {
239
+ a.push(u);
240
+ });
241
+ }
242
+ e.push(a);
243
+ }), e;
244
+ }
245
+ }, Me = (s, r) => {
246
+ var e;
247
+ let l = r;
248
+ return Array.isArray(Object.keys(s)) && ((e = Object.entries(s)) == null || e.forEach(([t, n]) => {
249
+ let a = [t];
250
+ if (typeof n == "object" && n !== null) {
251
+ let c = Ae(n);
252
+ c == null || c.forEach((f) => {
253
+ a.push(f);
254
+ });
255
+ }
256
+ l.push(a);
257
+ })), l;
258
+ }, qe = (s) => {
259
+ const r = {};
260
+ return s.forEach((e) => {
261
+ const t = e.split("/");
262
+ let n = r;
263
+ t.forEach((a) => {
264
+ n[a] || (n[a] = {}), n = n[a];
265
+ });
266
+ }), Me(r, []);
267
+ }, Ce = (s) => qe(s), xs = (s) => {
268
+ var r, l, e, t, n, a, c, f;
269
+ try {
270
+ const p = ae((l = (r = o(s)) == null ? void 0 : r.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), u = (t = (e = o(p)) == null ? void 0 : e.filter((h) => !h.includes("/*"))) == null ? void 0 : t.map((h) => Pe(h)), k = He(u), d = [];
271
+ if (((n = k == null ? void 0 : k.find((h) => (h == null ? void 0 : h.key) === "Menus")) == null ? void 0 : n.value.length) === 0)
272
+ return !1;
273
+ (a = o(k)) == null || a.forEach((h) => {
274
+ var U, b, $, i, y;
275
+ J != null && J.find((m) => {
276
+ var g, x;
277
+ return ((g = m == null ? void 0 : m.key) == null ? void 0 : g.toUpperCase()) === ((x = h == null ? void 0 : h.key) == null ? void 0 : x.toUpperCase());
278
+ }) ? d.push({
279
+ comp: ((U = J == null ? void 0 : J.find((m) => {
280
+ var g, x;
281
+ return ((g = m == null ? void 0 : m.key) == null ? void 0 : g.toUpperCase()) === ((x = h == null ? void 0 : h.key) == null ? void 0 : x.toUpperCase());
282
+ })) == null ? void 0 : U.value) ?? "",
283
+ name: (b = h == null ? void 0 : h.value) == null ? void 0 : b.replace(/[’]|[‘]|[']/g, ""),
284
+ compData: []
285
+ }) : j != null && j.find((m) => {
286
+ var g, x;
287
+ return ((g = m == null ? void 0 : m.key) == null ? void 0 : g.toUpperCase()) === ((x = h == null ? void 0 : h.key) == null ? void 0 : x.toUpperCase());
288
+ }) && ((d == null ? void 0 : d.length) === 0 && ($ = h.key) != null && $.includes("Menus") && d.push({
289
+ comp: "Menu",
290
+ name: "",
291
+ compData: []
292
+ }), (i = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]) != null && i.compData && d[(d == null ? void 0 : d.length) - 1].compData.push({
293
+ key: (y = j == null ? void 0 : j.find((m) => {
294
+ var g, x;
295
+ return ((g = m == null ? void 0 : m.key) == null ? void 0 : g.toUpperCase()) === ((x = h == null ? void 0 : h.key) == null ? void 0 : x.toUpperCase());
296
+ })) == null ? void 0 : y.value,
297
+ contents: h == null ? void 0 : h.value
298
+ }));
299
+ });
300
+ let A = (c = o(d)) == null ? void 0 : c.map((h) => {
301
+ var U;
302
+ return h != null && h.compData && (h.compData = (U = h == null ? void 0 : h.compData) == null ? void 0 : U.map((b) => {
303
+ var $, i, y, m, g, x, P, I, B, W, D;
304
+ if ((b == null ? void 0 : b.key) === "formFlex")
305
+ b.contents = ((i = ($ = b.contents) == null ? void 0 : $.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : i.toUpperCase()) !== "Vertical".toUpperCase();
306
+ else if ((b == null ? void 0 : b.key) === "groupContents")
307
+ b.contents = (y = o(b.contents)) == null ? void 0 : y.map((L) => Le(o(L)));
308
+ else if (Array.isArray(b == null ? void 0 : b.contents))
309
+ b.contents = Ce(b.contents);
310
+ else if (((g = (m = b == null ? void 0 : b.contents) == null ? void 0 : m.trim()) != null && g.startsWith("[") || (P = (x = b.contents) == null ? void 0 : x.trim()) != null && P.startsWith("【")) && ((B = (I = b.contents) == null ? void 0 : I.trim()) != null && B.endsWith("]") || (D = (W = b.contents) == null ? void 0 : W.trim()) != null && D.endsWith("】")))
311
+ b.contents = _e(o(b.contents));
312
+ else {
313
+ if (!b.contents) return;
314
+ b.contents = $e(o(b.contents));
315
+ }
316
+ return b;
317
+ })), h;
318
+ });
319
+ return A = (f = o(A)) == null ? void 0 : f.map((h) => {
320
+ var U;
321
+ return (h == null ? void 0 : h.comp) === "Group" && (h.compData = (U = h.compData) == null ? void 0 : U.map((b) => {
322
+ var i;
323
+ let $ = [];
324
+ return (i = b.contents) == null || i.forEach((y) => {
325
+ var m, g, x, P, I, B, W, D, L, N, T, O;
326
+ if (J != null && J.find((C) => {
327
+ var E, S, F;
328
+ return ((E = C == null ? void 0 : C.key) == null ? void 0 : E.toUpperCase()) === ((F = (S = Object.keys(y)) == null ? void 0 : S[0]) == null ? void 0 : F.toUpperCase());
329
+ }))
330
+ $.push({
331
+ comp: (m = J == null ? void 0 : J.find((C) => {
332
+ var E, S, F;
333
+ return ((E = C == null ? void 0 : C.key) == null ? void 0 : E.toUpperCase()) === ((F = (S = Object.keys(y)) == null ? void 0 : S[0]) == null ? void 0 : F.toUpperCase());
334
+ })) == null ? void 0 : m.value,
335
+ name: (x = (g = Object.values(y)) == null ? void 0 : g[0]) == null ? void 0 : x.replace(/[’]|[‘]|[']/g, ""),
336
+ compData: []
337
+ });
338
+ else if (j != null && j.find((C) => {
339
+ var E, S, F;
340
+ return ((E = C == null ? void 0 : C.key) == null ? void 0 : E.toUpperCase()) === ((F = (S = Object.keys(y)) == null ? void 0 : S[0]) == null ? void 0 : F.toUpperCase());
341
+ })) {
342
+ if (($ == null ? void 0 : $.length) === 0) return;
343
+ (P = $ == null ? void 0 : $[($ == null ? void 0 : $.length) - 1]) != null && P.compData && $[($ == null ? void 0 : $.length) - 1].compData.push({
344
+ key: (I = j == null ? void 0 : j.find((C) => {
345
+ var E, S, F;
346
+ return ((E = C == null ? void 0 : C.key) == null ? void 0 : E.toUpperCase()) === ((F = (S = Object.keys(y)) == null ? void 0 : S[0]) == null ? void 0 : F.toUpperCase());
347
+ })) == null ? void 0 : I.value,
348
+ contents: (B = Object.values(y)) == null ? void 0 : B[0]
349
+ });
350
+ } else if ((D = (W = Object.keys(y)) == null ? void 0 : W[0]) != null && D.includes("$")) {
351
+ const C = (N = (L = Object.keys(o(y))) == null ? void 0 : L[0]) == null ? void 0 : N.split("$");
352
+ $[($ == null ? void 0 : $.length) - 1].compData.push({
353
+ key: (T = j == null ? void 0 : j.find((E) => {
354
+ var S, F;
355
+ return ((S = E == null ? void 0 : E.key) == null ? void 0 : S.toUpperCase()) === ((F = C == null ? void 0 : C[0]) == null ? void 0 : F.toUpperCase());
356
+ })) == null ? void 0 : T.value,
357
+ contents: (O = Object.values(y)) == null ? void 0 : O[0],
358
+ selectLabel: C == null ? void 0 : C[1]
359
+ });
360
+ }
361
+ return y;
362
+ }), b.contents = $, b;
363
+ })), h;
364
+ }), A;
365
+ } catch {
366
+ return !1;
367
+ }
368
+ }, ye = Q(0), Oe = (s) => {
369
+ const r = [];
370
+ let l = null;
371
+ for (let e = 0; e < s.length; e++) {
372
+ const t = s[e];
373
+ if (Array.isArray(t))
374
+ l && (l.children = Oe(t));
375
+ else {
376
+ const n = { label: t };
377
+ r.push(n), l = n;
378
+ }
379
+ }
380
+ return r;
381
+ }, Te = (s) => {
382
+ let r = 0;
383
+ for (const l of s)
384
+ r++, l.children && (r += Te(l.children));
385
+ return r;
386
+ }, xe = (s, r, l = []) => {
387
+ let e = 0;
388
+ for (const t of r) {
389
+ if (e >= s.length) break;
390
+ const n = [...s[e]];
391
+ if (l.push(n), e++, t.children && t.children.length > 0) {
392
+ const a = [];
393
+ xe(
394
+ s.slice(e),
395
+ t.children,
396
+ a
397
+ ), a.length > 0 && (n.push(a), e += Te(t.children));
398
+ }
399
+ }
400
+ return l;
401
+ }, Qe = (s, r) => {
402
+ let l = [];
403
+ return s == null || s.forEach((t) => {
404
+ t.some((n) => Array.isArray(n)) ? l.push(...t) : l.push(t);
405
+ }), xe(l, r);
406
+ }, re = (s) => {
407
+ const r = { label: s[0].trim() };
408
+ if (s.length > 1) {
409
+ const l = s.slice(1);
410
+ l.length === 1 && Array.isArray(l[0]) ? r.children = l[0].map(
411
+ (e) => Array.isArray(e) ? re(e) : { label: e.trim() }
412
+ ) : r.children = l.map(
413
+ (e) => Array.isArray(e) ? re(e) : { label: e.trim() }
414
+ );
415
+ }
416
+ return r;
417
+ }, me = (s) => {
418
+ let r = s.replace(/:([^{}\[\],\s]+)([,\]}])/g, ':"$1"$2');
419
+ return r = r.replace(/:}(?=,|]|}|$)/g, ':""}'), r = r.replace(/:,(?=\s*")/g, ':"",'), r = r.replace(
420
+ /(https?|HTTPS?):"\/\/([^"]+)"/gi,
421
+ (l, e, t) => `"${e}://${t}"`
422
+ ), r = r.replace(
423
+ /(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,
424
+ '$1"$2"$3'
425
+ ), r;
426
+ }, Re = (s) => {
427
+ var l;
428
+ return s.some((e) => !Array.isArray(e)) ? s : (l = o(s)) == null ? void 0 : l.map((e) => {
429
+ let t = [];
430
+ return e.some((n) => Array.isArray(n)) ? e == null || e.forEach((n) => {
431
+ Array.isArray(n) && t.push(re(n));
432
+ }) : e.some((n) => n.includes("[")) ? t.push(e) : t = e.map((n) => ({ label: n.trim() })), t;
433
+ });
434
+ }, Ne = (s, r, l) => {
435
+ let e = s, t = l, n = r;
436
+ return n.children && (Array.isArray(t[t.length - 1]) ? t[t.length - 1].push(e[0]) : t.push(e[0]), e.shift(), n = n.children), Array.isArray(n) && n.forEach((a) => {
437
+ if (a.children) {
438
+ const c = Ne(e, a, t);
439
+ t = c[0], e = c[1];
440
+ }
441
+ }), [t, e];
442
+ }, Xe = (s, r) => {
443
+ let l = s, e = [];
444
+ return r.length > 0 ? r == null || r.forEach((t) => {
445
+ let n = l == null ? void 0 : l[0];
446
+ l.shift();
447
+ const a = Ne(o(l), t, n);
448
+ n = a[0], l = a[1], e.push(n);
449
+ }) : e = l, e;
450
+ }, ne = (s, r) => {
451
+ const l = Re(o(s));
452
+ return Xe(l, r);
453
+ }, Ye = (s) => {
454
+ const r = [];
455
+ let l = 0;
456
+ const e = s.length;
457
+ for (; l < e; ) {
458
+ const t = s[l];
459
+ t.key === "tableColumns" && l + 1 < e && s[l + 1].key === "tableContents" ? (r.push({
460
+ comp: "Table",
461
+ compData: [t, s[l + 1]],
462
+ name: ""
463
+ }), l += 2) : (r.push(t), l += 1);
464
+ }
465
+ return r;
466
+ }, Ee = (s) => ne([s], []), v = (s) => {
467
+ const r = [];
468
+ return s == null || s.forEach((l) => l == null ? void 0 : l.forEach((t) => {
469
+ var n, a;
470
+ ye.value++, r.push({
471
+ id: ye.value,
472
+ key: (n = Object.keys(t)) == null ? void 0 : n[0],
473
+ value: (a = Object.values(t)) == null ? void 0 : a[0],
474
+ // 如果值为空,则key设为空字符串,否则保留原值
475
+ width: l.length
476
+ });
477
+ })), r;
478
+ }, ke = (s) => {
479
+ let r = Ye(s);
480
+ return r = r == null ? void 0 : r.map((l) => {
481
+ var e, t, n, a;
482
+ if (l.comp === "Table")
483
+ (e = l.compData) != null && e.find((c) => (c == null ? void 0 : c.key) === "header") || (l.compData = (t = l.compData) == null ? void 0 : t.map((c) => (c.key === "tableColumns" ? c = {
484
+ key: "header",
485
+ contents: ne(c.value, [])
486
+ } : c = {
487
+ key: c.key,
488
+ contents: c.value
489
+ }, c)), l.compData.push({
490
+ key: "extraButton",
491
+ contents: [{ label: "新增" }]
492
+ }), l.compData.push({
493
+ key: "rowButton",
494
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
495
+ }));
496
+ else if (l.key === "form") {
497
+ const c = (n = l == null ? void 0 : l.value) == null ? void 0 : n.map((f) => (Array.isArray(f) || (f = [f]), f));
498
+ l = {
499
+ comp: "Form",
500
+ compData: [
501
+ {
502
+ key: "formFlex",
503
+ contents: ""
504
+ },
505
+ {
506
+ key: "formContent",
507
+ contents: v(c)
508
+ }
509
+ ],
510
+ name: ""
511
+ };
512
+ } else if (l.key === "formTop") {
513
+ const c = (a = l == null ? void 0 : l.value) == null ? void 0 : a.map((f) => (Array.isArray(f) || (f = [f]), f));
514
+ l = {
515
+ comp: "FormTop",
516
+ compData: [
517
+ {
518
+ key: "formFlex",
519
+ contents: ""
520
+ },
521
+ {
522
+ key: "formContent",
523
+ contents: v(c)
524
+ },
525
+ {
526
+ key: "enableWrap",
527
+ contents: !0
528
+ },
529
+ {
530
+ key: "formButton",
531
+ contents: [{
532
+ label: "查询"
533
+ }, {
534
+ label: "重置"
535
+ }]
536
+ }
537
+ ],
538
+ name: ""
539
+ };
540
+ }
541
+ return l;
542
+ }), r;
543
+ }, Ke = (s, r) => {
544
+ var c, f, p, u, k, d;
545
+ const l = [], e = Oe((f = (c = s == null ? void 0 : s.find((A) => A.key === "tableIndex")) == null ? void 0 : c.value) == null ? void 0 : f[0]);
546
+ l.push({
547
+ key: "tableIndexColumn",
548
+ contents: r
549
+ }), l.push({
550
+ key: "tableIndex",
551
+ contents: e
552
+ });
553
+ let t = [];
554
+ const n = (p = s == null ? void 0 : s.find((A) => A.key === "tableColumns")) == null ? void 0 : p.value;
555
+ n.length === 1 && !(n != null && n[0].some((A) => Array.isArray(A))) ? t = (u = n == null ? void 0 : n[0]) == null ? void 0 : u.map((A) => ({ label: A })) : t = ne((k = s == null ? void 0 : s.find((A) => A.key === "tableColumns")) == null ? void 0 : k.value, e), l.push({
556
+ key: "header",
557
+ contents: t
558
+ });
559
+ const a = Qe((d = s == null ? void 0 : s.find((A) => A.key === "tableContents")) == null ? void 0 : d.value, e);
560
+ return l.push({
561
+ key: "tableContents",
562
+ contents: a
563
+ }), l.push({
564
+ key: "extraButton",
565
+ contents: [{ label: "新增" }]
566
+ }), l.push({
567
+ key: "rowButton",
568
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
569
+ }), l;
570
+ }, je = (s) => s.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, (r, l, e) => {
571
+ const t = je(e);
572
+ return `"${l}",${t}`;
573
+ }), Y = (s) => {
574
+ const r = s.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g, '"$1",$2');
575
+ return je(r).replace(/^"(.*)"$/, "$1");
576
+ }, Ve = (s) => {
577
+ const r = /* @__PURE__ */ new Set();
578
+ return s.filter((l) => {
579
+ const e = JSON.stringify(l);
580
+ return r.has(e) ? !1 : r.add(e);
581
+ });
582
+ }, de = (s) => {
583
+ var l;
584
+ let r = [];
585
+ return (l = o(s)) == null || l.forEach((e) => {
586
+ var t;
587
+ (t = e.contents) == null || t.forEach((n) => {
588
+ r.push(n);
589
+ });
590
+ }), r = Ve(r), r.push({
591
+ label: "操作"
592
+ }), [r];
593
+ }, we = (s, r) => s.reduce((l, e, t) => {
594
+ const n = Math.floor(t / r);
595
+ return l[n] || (l[n] = []), l[n].push(e), l;
596
+ }, []), Je = (s) => s.reduce((r, l) => l.children && l.children.length > 0 ? r + Je(l.children) : r + 1, 0), ve = (s, r) => {
597
+ var e;
598
+ let l = [];
599
+ return (e = we(s, Je(r == null ? void 0 : r[0]) - 1)) == null || e.forEach((t) => {
600
+ let n = [];
601
+ t.forEach((a) => {
602
+ var c;
603
+ Array.isArray(a.contents) ? (c = a.contents) == null || c.forEach((f) => {
604
+ n.push(f);
605
+ }) : n.push(a.contents);
606
+ }), l.push(n);
607
+ }), [l];
608
+ }, es = ["方法体", "输入", "输出"], ge = Q(1), ae = (s) => {
609
+ let r;
610
+ s.replaceAll(" ", `\r
611
+ `).includes(`\r
612
+ `) ? r = s.replaceAll(" ", `\r
613
+ `).split(`\r
614
+ `).filter((t) => t.trim() !== "") : r = s.replaceAll(" ", `\r
615
+ `).split(`
616
+ `).filter((t) => t.trim() !== "");
617
+ const l = [];
618
+ let e = "";
619
+ for (const t of r)
620
+ t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e += t.trim(), o(e).split("{").length - 1 === o(e).split("}").length - 1 && o(e).split("【").length - 1 === o(e).split("】").length - 1 && o(e).split("[").length - 1 === o(e).split("]").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("/*").length - 1 === o(e).split("*/").length - 1 && e[e.length - 1] !== "," && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
621
+ return l;
622
+ }, ss = (s) => {
623
+ const [r, l] = s.split(/=(.+)/), e = r.replace(/['"]/g, "").trim(), t = l.replace(/^['"]|['"]$/g, "");
624
+ return { key: e, value: t };
625
+ }, ee = (s) => {
626
+ let r;
627
+ s != null && s.includes(":") ? r = s.split(":").filter((t) => t.trim() !== "") : r = s == null ? void 0 : s.split(":").filter((t) => t.trim() !== "");
628
+ const l = [];
629
+ let e = "";
630
+ for (const t of r)
631
+ t.includes("{") || e.includes("{") || t.includes("[") || e.includes("[") || t.includes("【") || e.includes("【") || t.includes("(") || e.includes("(") || t.includes("(") || e.includes("(") || t.includes("/*") || e.includes("/*") ? (e = e !== "" ? e + ":" + t.trim() : t.trim(), o(e).split("{").length - 1 === o(e).split("}").length - 1 && o(e).split("【").length - 1 === o(e).split("】").length - 1 && o(e).split("[").length - 1 === o(e).split("]").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("(").length - 1 === o(e).split(")").length - 1 && o(e).split("/*").length - 1 === o(e).split("*/").length - 1 && (l.push(e.replace(/\/\*[\s\S]*?\*\//g, "")), e = "")) : l.push(t.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
632
+ return l;
633
+ }, ls = (s) => /^[\x00-\x7F]*$/.test(s), ts = (s) => {
634
+ var t, n;
635
+ const r = (t = s.map((a) => {
636
+ var f, p;
637
+ let c = (p = (f = a.key.split("(")) == null ? void 0 : f[1]) == null ? void 0 : p.trim();
638
+ return c == null ? void 0 : c.slice(0, c.length - 1);
639
+ })) == null ? void 0 : t.filter((a) => a), l = r == null ? void 0 : r.map((a) => {
640
+ var f;
641
+ return (f = ee(a)) == null ? void 0 : f.map((p) => {
642
+ var u;
643
+ if (p.includes("{")) {
644
+ let k = (u = p.split(":")) == null ? void 0 : u[0];
645
+ p = k.slice(1, k.length);
646
+ }
647
+ return p;
648
+ });
649
+ }).filter((a) => a.length !== 0), e = (n = l == null ? void 0 : l.filter((a) => a.length !== 0)) == null ? void 0 : n.map((a) => {
650
+ let c = "";
651
+ return a.forEach((f) => {
652
+ f.includes("{") || (c = c === "" ? c + o(f) : c + "/" + o(f));
653
+ }), c;
654
+ });
655
+ return Ce([...new Set(e)]);
656
+ }, Ue = (s) => {
657
+ var l, e, t, n, a, c, f, p;
658
+ const r = (e = (l = s.split("(")) == null ? void 0 : l[1]) == null ? void 0 : e.trim();
659
+ return ((t = ee(r.slice(0, r.length - 1))) == null ? void 0 : t.length) > 0 ? r.slice(0, r.length - 1) : (p = (f = (c = (a = (n = s.split("(")) == null ? void 0 : n[1]) == null ? void 0 : a.trim()) == null ? void 0 : c.split(")")) == null ? void 0 : f[0]) == null ? void 0 : p.trim();
660
+ }, rs = (s) => {
661
+ var t;
662
+ if (!s) return;
663
+ const r = Ue(s), l = (t = ee(r)) == null ? void 0 : t.map((n) => {
664
+ var a;
665
+ if (n.includes("{")) {
666
+ let c = (a = n.split(":")) == null ? void 0 : a[0];
667
+ n = c.slice(1, c.length);
668
+ }
669
+ return n;
670
+ });
671
+ let e = "";
672
+ return l.forEach((n) => {
673
+ n.includes("{") || (e = e === "" ? e + o(n) : e + "/" + o(n));
674
+ }), e;
675
+ }, ns = (s) => {
676
+ const r = s.match(/\[(.*)\]/s);
677
+ if (r) {
678
+ const l = `[${r[1]}]`;
679
+ try {
680
+ const e = l.replace(/([^\[\],\s]+)/g, '"$1"');
681
+ return JSON.parse(e);
682
+ } catch {
683
+ return JSON.parse(l.replace(/\[(\s*)(,|])/g, '[""$2').replace(/([^\[\],\s]+)/g, '"$1"').replace(/""/g, '"'));
684
+ }
685
+ }
686
+ }, as = (s) => {
687
+ var n;
688
+ if (!s) return;
689
+ const r = Ue(s);
690
+ let l = [], e = [], t = [];
691
+ return (n = ee(r)) == null || n.forEach((a) => {
692
+ var c;
693
+ a.includes("[") ? l.push(ns(a)) : a.includes("{") && (ls((c = a.slice(1, a.length - 1).split(":")) == null ? void 0 : c[0]) ? t.push(JSON.parse(a.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : z(a.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3')) ? e.push(JSON.parse(a.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g, '$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g, '$1"$2"$3'))) : a.includes("$"));
694
+ }), [l, e, t];
695
+ }, cs = (s) => {
696
+ const r = [];
697
+ let l = "";
698
+ for (const e of s)
699
+ e.includes("[") || l.includes("[") || e.includes("/*") || l.includes("/*") ? (l += e.trim(), o(l).split("{").length - 1 === o(l).split("}").length - 1 && o(l).split("【").length - 1 === o(l).split("】").length - 1 && o(l).split("[").length - 1 === o(l).split("]").length - 1 && o(l).split("(").length - 1 === o(l).split(")").length - 1 && o(l).split("(").length - 1 === o(l).split(")").length - 1 && o(l).split("/*").length - 1 === o(l).split("*/").length - 1 && (r.push(l.replace(/\/\*[\s\S]*?\*\//g, "")), l = "")) : r.push(e.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
700
+ return r;
701
+ }, be = (s) => {
702
+ var a, c;
703
+ const r = [], l = /(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/, e = s.match(l);
704
+ if (e) {
705
+ const f = e[1] || e[3], p = e[2] || e[4];
706
+ if (f && p) {
707
+ const u = `${f}/${p}`;
708
+ r.push(u);
709
+ }
710
+ }
711
+ const t = /(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i, n = s.match(t);
712
+ return n ? r.push(n[0].replace(/\)+$/, "")) : (s == null ? void 0 : s.split(",").length) === 2 && r.push((c = (a = s == null ? void 0 : s.split(",")) == null ? void 0 : a[1]) == null ? void 0 : c.trim()), r;
713
+ }, le = (s) => {
714
+ let r = s.replace(/\[\s*,\s*,/g, '[{"": ""}, {"": ""},');
715
+ return r = r.replace(/\[\s*,/g, '[{"": ""},'), r = r.replace(/,\s*,/g, ', {"": ""},'), r = r.replace(/,\s*\]/g, ', {"": ""}]'), r = r.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g, (l, e, t, n, a) => t.includes("'") ? `:${e}${t}${n}${a}` : `:${e}"${t}"${n}${a}`), r = r.replace(/:\s*([,\]}])/g, ': ""$1'), r;
716
+ }, os = (s) => !/\[[^\]]*\{[^\]]*\]/.test(s), ps = (s) => {
717
+ const r = o(s).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/), l = r ? `${r[2]}/${r[3]}` : null, e = s.match(/\[\{([^}]+)\}\]/), t = e == null ? void 0 : e[1].replaceAll(":", "").replaceAll("'", '"').trim();
718
+ let n = null;
719
+ if (t)
720
+ try {
721
+ n = JSON.parse(t);
722
+ } catch (a) {
723
+ console.error("解析数组失败:", a);
724
+ }
725
+ return [l, n];
726
+ }, us = (s) => {
727
+ var c, f, p, u, k, d, A, h, U, b, $;
728
+ let r = [], l = [], e = {}, t = [], n = s.trim(), a = [];
729
+ if (n.trim().includes("输入") && n.trim().includes("输出")) {
730
+ let i = [], y = s.trim();
731
+ y = o(y).slice(1, o(y).length - 1);
732
+ const m = /(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;
733
+ (h = y.match(m)) == null || h.forEach((g, x) => {
734
+ var B;
735
+ const P = g;
736
+ let I = [];
737
+ (B = P.slice(1, P.length - 1).replace(":", "$:").split("$:")) == null || B.forEach((W) => {
738
+ var D, L, N;
739
+ if (es.find((T) => W.includes(T)))
740
+ if (!W.includes("=="))
741
+ I.push({ key: "tableIndexColumn", contents: W.replaceAll("'", "") });
742
+ else {
743
+ let T = [];
744
+ const O = W.replaceAll("'", "").split("==");
745
+ T.push(O == null ? void 0 : O[0]), O != null && O[1].includes("[") ? T.push(O == null ? void 0 : O[1].trim().slice(1, (O == null ? void 0 : O[1].length) - 1).split(",")) : T.push([O == null ? void 0 : O[1]]), I.push({ key: "header", contents: [(L = (D = Ee([T])) == null ? void 0 : D[0]) == null ? void 0 : L[0]] });
746
+ }
747
+ else {
748
+ let T = W.trim().replaceAll(",", ",").replaceAll("'", '"');
749
+ if (x % 3 === 0)
750
+ T.slice(1, T.length - 1).includes("[") ? i.push({
751
+ key: "tableIndex",
752
+ contents: [{ label: T }]
753
+ }) : i.push({
754
+ key: "tableIndex",
755
+ contents: [{ label: T.slice(1, T.length - 1) }]
756
+ });
757
+ else if ((T == null ? void 0 : T[0]) === "{") {
758
+ let O = [];
759
+ const C = T.slice(1, T.length - 1).split(":");
760
+ if (C.every((E) => z(E.trim()))) {
761
+ O.push({ key: "tableContentName", contents: "详情" });
762
+ let E = [];
763
+ C.forEach((S, F) => {
764
+ if (F === 0) {
765
+ const G = JSON.parse(S).map((Z) => ({ label: Z }));
766
+ G.push({
767
+ label: "操作"
768
+ }), E.push({
769
+ key: "header",
770
+ contents: G
771
+ });
772
+ } else
773
+ E.push({
774
+ key: "tableContents",
775
+ contents: JSON.parse(S)
776
+ });
777
+ }), E.push({
778
+ key: "extraButton",
779
+ contents: [{ label: "新增" }]
780
+ }), E.push({
781
+ key: "rowButton",
782
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
783
+ }), O.push({
784
+ comp: "Table",
785
+ compData: E,
786
+ name: ""
787
+ }), i.push({
788
+ key: "tableContents",
789
+ contents: [O]
790
+ });
791
+ }
792
+ } else {
793
+ let O = T;
794
+ O.slice(1, O.length - 1).includes("[") || O.slice(1, O.length - 1).includes("{") ? z(me(O.replace(/\s+/g, ""))) && ((N = JSON.parse(me(O.replace(/\s+/g, "")))) == null || N.map((C) => {
795
+ if (Array.isArray(C == null ? void 0 : C[0])) {
796
+ const E = [];
797
+ E.push({ key: "tableContentName", contents: "详情" });
798
+ let S = [];
799
+ C.forEach((F) => {
800
+ F.forEach((G) => {
801
+ var Z, H;
802
+ ge.value++, S.push({
803
+ id: ge.value,
804
+ key: (Z = Object.keys(G)) == null ? void 0 : Z[0],
805
+ value: (H = Object.values(G)) == null ? void 0 : H[0],
806
+ width: F.length
807
+ });
808
+ });
809
+ }), E.push({
810
+ comp: "Form",
811
+ compData: [{
812
+ key: "formFlex",
813
+ contents: ""
814
+ }, {
815
+ key: "formContent",
816
+ contents: S
817
+ }],
818
+ name: ""
819
+ }), i.push({
820
+ key: "tableContents",
821
+ contents: [E]
822
+ });
823
+ } else
824
+ i.push({
825
+ key: "tableContents",
826
+ contents: C == null ? void 0 : C[0]
827
+ });
828
+ })) : i.push({
829
+ key: "tableContents",
830
+ contents: O.trim().slice(1, O.length - 1)
831
+ });
832
+ }
833
+ }
834
+ }), i.push(I == null ? void 0 : I[0]);
835
+ }), a.push({
836
+ key: "tableIndex",
837
+ contents: (U = i == null ? void 0 : i.filter((g) => (g == null ? void 0 : g.key) === "tableIndex")) == null ? void 0 : U.map((g) => {
838
+ var x;
839
+ return (x = g.contents) == null ? void 0 : x[0];
840
+ })
841
+ }), a.push({
842
+ key: "extraButton",
843
+ contents: [{ label: "新增" }]
844
+ }), a.push({
845
+ key: "rowButton",
846
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
847
+ }), a.push({
848
+ key: "tableIndexColumn",
849
+ contents: ($ = (b = i == null ? void 0 : i.filter((g) => (g == null ? void 0 : g.key) === "tableIndexColumn")) == null ? void 0 : b[0]) == null ? void 0 : $.contents
850
+ }), a.push({
851
+ key: "header",
852
+ contents: de(i == null ? void 0 : i.filter((g) => (g == null ? void 0 : g.key) === "header"))
853
+ }), a.push({
854
+ key: "tableContents",
855
+ contents: ve(i == null ? void 0 : i.filter((g) => (g == null ? void 0 : g.key) === "tableContents"), de(i == null ? void 0 : i.filter((g) => (g == null ? void 0 : g.key) === "header")))
856
+ });
857
+ } else {
858
+ const i = (c = n.trim().split(",$")) == null ? void 0 : c[0];
859
+ i[0] === "[" ? n = i.slice(1, i.length - 1) : n.includes(",$") && (n = (f = n.trim().split(",$")) == null ? void 0 : f[0]);
860
+ let y;
861
+ if (n.includes("$")) {
862
+ n = o(n), e.method = (u = (p = o(n).trim()) == null ? void 0 : p.slice(1, n.length).split("(")) == null ? void 0 : u[0];
863
+ let m;
864
+ be(n.slice(1, n.length - 2)).length > 1 ? m = be(n.slice(1, n.length - 2)) : m = ps(n), e.value = m;
865
+ } else
866
+ z("[" + le(n).replaceAll("'", '"') + "]") && !os(le(n).replaceAll("'", '"')) ? (n = JSON.parse("[" + le(n).replaceAll("'", '"') + "]"), t = n) : y = (d = (k = o(n).split("}")) == null ? void 0 : k.filter((m) => m !== "")) == null ? void 0 : d.map((m) => {
867
+ let g = m;
868
+ return g[0] === "," ? g = g.slice(2, g.length) : g = g.slice(1, g.length), g;
869
+ });
870
+ (A = o(y)) == null || A.forEach((m) => {
871
+ var g, x, P, I, B, W, D, L, N, T, O, C, E, S, F;
872
+ if (m.includes("==")) {
873
+ const G = (C = m == null ? void 0 : m.split(":")) == null ? void 0 : C[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'), Z = (E = m == null ? void 0 : m.split(":")) == null ? void 0 : E[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"');
874
+ if (z(Z.trim()) ? l.push(JSON.parse(Z.trim())) : l.push(JSON.parse(Z.replaceAll("'", '"').trim())), G[0] !== "[") {
875
+ let H = [];
876
+ z("[" + Y(G) + "]") ? H.push(JSON.parse("[" + Y(G) + "]")) : z("[" + Y(G).replaceAll("==", ",") + "]") && H.push(JSON.parse("[" + Y(G).replaceAll("==", ",") + "]"));
877
+ const M = o(H);
878
+ M.push(["操作"]), r.push(M);
879
+ } else {
880
+ const H = (S = G.slice(1, G.length - 1).replaceAll(",", ",|")) == null ? void 0 : S.split("|"), M = (F = cs(H)) == null ? void 0 : F.map((_) => ((_ == null ? void 0 : _[_.length - 1]) === "," && (_ = _.slice(0, _.length - 1)), _));
881
+ let ce = [];
882
+ M == null || M.forEach((_) => {
883
+ var pe, ue, he, ie;
884
+ let X = [];
885
+ X.push((pe = _.split("==")) == null ? void 0 : pe[0].trim().replace(/^"|"$/g, "")), ((ue = _.split("==")) == null ? void 0 : ue[1].trim()[0]) === "[" ? X.push(JSON.parse((he = _.split("==")) == null ? void 0 : he[1].trim())) : X.push([JSON.parse((ie = _.split("==")) == null ? void 0 : ie[1].trim())]), ce.push(X);
886
+ });
887
+ const oe = o(ce);
888
+ oe.push(["操作"]), r.push(oe);
889
+ }
890
+ } else {
891
+ if (z((g = m == null ? void 0 : m.split(":")) == null ? void 0 : g[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'))) {
892
+ let G = JSON.parse((x = m == null ? void 0 : m.split(":")) == null ? void 0 : x[0].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"').replaceAll("'", '"'));
893
+ Array.isArray(G) || (G = [G]), G.push("操作"), r.push(G);
894
+ }
895
+ z((B = (I = (P = m == null ? void 0 : m.split(":")) == null ? void 0 : P[1]) == null ? void 0 : I.replace(/^"|"$/g, "'")) == null ? void 0 : B.replace(/'([^']+)'/g, '"$1"')) ? l.push(JSON.parse((W = m == null ? void 0 : m.split(":")) == null ? void 0 : W[1].replace(/^"|"$/g, "'").replace(/'([^']+)'/g, '"$1"'))) : z((T = (N = (L = (D = m == null ? void 0 : m.split(":")) == null ? void 0 : D[1]) == null ? void 0 : L.replace(/^"|"$/g, "'")) == null ? void 0 : N.replaceAll("'", '"')) == null ? void 0 : T.replace(/'([^']+)'/g, '"$1"')) && l.push(JSON.parse((O = m == null ? void 0 : m.split(":")) == null ? void 0 : O[1].replace(/^"|"$/g, "'").replaceAll("'", '"').replace(/'([^']+)'/g, '"$1"')));
896
+ }
897
+ });
898
+ }
899
+ return [r, l, a, e, t];
900
+ }, hs = (s) => {
901
+ const r = [], l = rs(s == null ? void 0 : s.key), e = as(s == null ? void 0 : s.key), t = us(s == null ? void 0 : s.value), n = e == null ? void 0 : e[0], a = t == null ? void 0 : t[4], c = e == null ? void 0 : e[1], f = e == null ? void 0 : e[2], p = t == null ? void 0 : t[0], u = t == null ? void 0 : t[1], k = t == null ? void 0 : t[2], d = t == null ? void 0 : t[3];
902
+ return l && r.push({
903
+ key: "contentPath",
904
+ value: l
905
+ }), (n == null ? void 0 : n.length) > 0 && r.push({
906
+ key: "tableIndex",
907
+ value: n
908
+ }), d && r.push({
909
+ key: "extraButton",
910
+ value: d
911
+ }), (a == null ? void 0 : a.length) > 0 && r.push({
912
+ key: "form",
913
+ value: a
914
+ }), (c == null ? void 0 : c.length) > 0 && r.push({
915
+ key: "formTop",
916
+ value: c
917
+ }), (f == null ? void 0 : f.length) > 0 && r.push({
918
+ key: "extra",
919
+ value: f
920
+ }), (k == null ? void 0 : k.length) > 0 && r.push({
921
+ comp: "Table",
922
+ compData: k,
923
+ name: ""
924
+ }), (p == null ? void 0 : p.length) > 0 && r.push({
925
+ key: "tableColumns",
926
+ value: p
927
+ }), (u == null ? void 0 : u.length) > 0 && r.push({
928
+ key: "tableContents",
929
+ value: u
930
+ }), r;
931
+ }, is = (s) => {
932
+ let r = [], l = [];
933
+ s == null || s.forEach((t) => {
934
+ Array.isArray(t) && (t == null || t.forEach((n) => {
935
+ var a;
936
+ n.comp === "FormTop" && ((a = n.compData) == null || a.forEach((c) => {
937
+ (c == null ? void 0 : c.key) === "formContent" && (l = [...l, ...c.contents]);
938
+ }));
939
+ }));
940
+ });
941
+ const e = l.reduce((t, n) => t.find((c) => (c == null ? void 0 : c.key) === (n == null ? void 0 : n.key)) ? t : t.concat([n]), []);
942
+ return e.length !== 0 && r.push([{
943
+ comp: "FormTop",
944
+ compData: [{
945
+ key: "formFlex",
946
+ contents: ""
947
+ }, {
948
+ key: "formContent",
949
+ contents: e
950
+ }, {
951
+ key: "enableWrap",
952
+ contents: !0
953
+ }, {
954
+ key: "formButton",
955
+ contents: [{
956
+ label: "查询"
957
+ }, {
958
+ label: "重置"
959
+ }]
960
+ }]
961
+ }]), s == null || s.forEach((t) => {
962
+ if (Array.isArray(t)) {
963
+ const n = t.filter((a) => a.comp !== "FormTop");
964
+ r.push(n);
965
+ } else
966
+ t.comp !== "FormTop" && r.push(t);
967
+ }), r;
968
+ }, fs = (s, r) => {
969
+ const l = r.split("/");
970
+ let e = [];
971
+ return s == null || s.forEach((t) => {
972
+ var c, f, p, u, k, d, A, h, U, b, $;
973
+ const n = [], a = (f = (c = t.find((i) => i.key === "tableIndex")) == null ? void 0 : c.value) == null ? void 0 : f[0];
974
+ if (a && !a.some((i) => Array.isArray(i))) {
975
+ const i = (u = (p = t.find((y) => y.key === "tableColumns")) == null ? void 0 : p.value) == null ? void 0 : u[0];
976
+ n.push({
977
+ key: "tableIndexColumn",
978
+ contents: l[l.length - 1]
979
+ }), n.push({
980
+ key: "tableIndex",
981
+ contents: a == null ? void 0 : a.map((y) => ({ label: y }))
982
+ }), n.push({
983
+ key: "extraButton",
984
+ contents: [{ label: "新增" }]
985
+ }), n.push({
986
+ key: "rowButton",
987
+ contents: [{ label: "查看" }, { label: "编辑" }, { label: "删除" }]
988
+ }), Array.isArray(i) && i.some((y) => Array.isArray(y)) ? n.push({
989
+ key: "header",
990
+ contents: Ee(i)
991
+ }) : n.push({
992
+ key: "header",
993
+ contents: Array.isArray(i) ? i == null ? void 0 : i.map((y) => ({ label: y })) : [i].map((y) => ({ label: y }))
994
+ }), n.push({
995
+ key: "tableContents",
996
+ contents: Array.isArray(i) ? (d = (k = t.find((y) => y.key === "tableContents")) == null ? void 0 : k.value) == null ? void 0 : d[0] : (U = (h = (A = t.find((y) => y.key === "tableContents")) == null ? void 0 : A.value) == null ? void 0 : h[0]) == null ? void 0 : U.map((y) => [y])
997
+ }), e.push({
998
+ comp: "Table",
999
+ name: "",
1000
+ compData: n
1001
+ }), t != null && t.find((y) => (y == null ? void 0 : y.key) === "formTop") && e.push({
1002
+ comp: "FormTop",
1003
+ compData: [
1004
+ {
1005
+ key: "formFlex",
1006
+ contents: ""
1007
+ },
1008
+ {
1009
+ key: "formContent",
1010
+ contents: v([(b = t == null ? void 0 : t.find((y) => (y == null ? void 0 : y.key) === "formTop")) == null ? void 0 : b.value])
1011
+ },
1012
+ {
1013
+ key: "enableWrap",
1014
+ contents: !0
1015
+ },
1016
+ {
1017
+ key: "formButton",
1018
+ contents: [{
1019
+ label: "查询"
1020
+ }, {
1021
+ label: "重置"
1022
+ }]
1023
+ }
1024
+ ],
1025
+ name: ""
1026
+ });
1027
+ } else a ? (e.push({
1028
+ comp: "Table",
1029
+ name: "",
1030
+ compData: Ke(t, l[l.length - 1])
1031
+ }), t != null && t.find((i) => (i == null ? void 0 : i.key) === "formTop") && e.push({
1032
+ comp: "FormTop",
1033
+ compData: [
1034
+ {
1035
+ key: "formFlex",
1036
+ contents: ""
1037
+ },
1038
+ {
1039
+ key: "formContent",
1040
+ contents: v([($ = t == null ? void 0 : t.find((i) => (i == null ? void 0 : i.key) === "formTop")) == null ? void 0 : $.value])
1041
+ },
1042
+ {
1043
+ key: "enableWrap",
1044
+ contents: !0
1045
+ },
1046
+ {
1047
+ key: "formButton",
1048
+ contents: [{
1049
+ label: "查询"
1050
+ }, {
1051
+ label: "重置"
1052
+ }]
1053
+ }
1054
+ ],
1055
+ name: ""
1056
+ })) : t.some((i) => i.key === "extra") ? e.push({
1057
+ comp: "calculator",
1058
+ name: "",
1059
+ compData: ke(t)
1060
+ }) : e.push(ke(t));
1061
+ }), is(e);
1062
+ }, ys = (s, r) => {
1063
+ var t, n;
1064
+ const l = s.map((a) => a.filter((c) => c.key !== "contentPath"));
1065
+ return {
1066
+ comp: "Group",
1067
+ compData: [{
1068
+ contents: fs(l, r),
1069
+ key: "groupContents"
1070
+ }],
1071
+ name: (n = (t = s[0]) == null ? void 0 : t.find((a) => a.key === "contentPath")) == null ? void 0 : n.value
1072
+ };
1073
+ }, ms = (s) => {
1074
+ var t;
1075
+ const r = [], l = o(s).map((n) => {
1076
+ var a;
1077
+ if (n != null && n.find((c) => (c == null ? void 0 : c.key) === "contentPath"))
1078
+ return (a = n == null ? void 0 : n.find((c) => (c == null ? void 0 : c.key) === "contentPath")) == null ? void 0 : a.value;
1079
+ }).filter((n) => n !== ""), e = [...new Set(l)];
1080
+ return (t = e == null ? void 0 : e.filter((n) => n)) == null || t.forEach((n) => {
1081
+ var a;
1082
+ r.push(ys((a = o(s)) == null ? void 0 : a.filter((c) => c.find((f) => f.key === "contentPath" && f.value === n)), n));
1083
+ }), r;
1084
+ }, ks = (s) => {
1085
+ let r = [];
1086
+ r.push({
1087
+ comp: "Menu",
1088
+ compData: [{
1089
+ contents: ts(o(s)),
1090
+ key: "menuContents"
1091
+ }],
1092
+ name: ""
1093
+ });
1094
+ const l = s.map((e) => hs(e)).filter((e) => e.length !== 0);
1095
+ return r = [...r, ...ms(l)], r;
1096
+ }, Ns = (s) => {
1097
+ var r, l, e, t, n;
1098
+ try {
1099
+ const a = (e = ae((l = (r = o(s)) == null ? void 0 : r.replace("(", "(")) == null ? void 0 : l.replace(")", ")"))) == null ? void 0 : e.filter((p) => p !== ""), c = (n = (t = o(a)) == null ? void 0 : t.filter((p) => !p.includes("/*"))) == null ? void 0 : n.map((p) => ss(p));
1100
+ return ks(c);
1101
+ } catch {
1102
+ return !1;
1103
+ }
1104
+ }, K = Q(0), te = Q(0), ds = (s) => {
1105
+ const r = s.trim().replace(/^'|'$/g, ""), l = /((?:\$?[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, e = {};
1106
+ let t;
1107
+ for (; (t = l.exec(r)) !== null; ) {
1108
+ const n = t[1];
1109
+ let a = t[2].trim();
1110
+ (a.match(/\[/g) || []).length !== (a.match(/\]/g) || []).length && (a = a == null ? void 0 : a.replace(/]$/, "")), e[n] ? (e[n + te.value] && te.value++, e[n + te.value] = n + "=" + a) : e[n] = n + "=" + a;
1111
+ }
1112
+ return e;
1113
+ }, Ie = (s) => {
1114
+ const [r, l] = s.split("=").map((n) => n.trim()), e = r.replace(/['"]/g, ""), t = l.replace(/^['"]|['"]$/g, "");
1115
+ return { key: e, value: t };
1116
+ }, gs = (s) => {
1117
+ var a;
1118
+ let r = [];
1119
+ const [l, e] = s.split(/=(.+)/), t = l.replace(/['"]/g, "").trim(), n = e.replace(/^['"]|['"]$/g, "");
1120
+ return (a = Object.values(ds(n))) == null || a.forEach((c) => {
1121
+ r.push(Ie(c));
1122
+ }), { key: t, value: r };
1123
+ }, w = (s) => {
1124
+ try {
1125
+ return JSON.parse(s), !0;
1126
+ } catch {
1127
+ return !1;
1128
+ }
1129
+ }, Se = (s) => {
1130
+ try {
1131
+ const r = s.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
1132
+ if (o(r).split("{").length - 1 > 1) {
1133
+ let l = o(r).replace(/^\{(.*)\}$/, "[$1]");
1134
+ if (w(l) && !l.includes("$") || (l = l.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), w(l)) {
1135
+ const e = JSON.parse(l);
1136
+ let t = [];
1137
+ return e == null || e.forEach((n) => {
1138
+ var a;
1139
+ (a = Object.entries(o(n))) == null || a.forEach((c) => {
1140
+ K.value++, t.push({
1141
+ id: K.value,
1142
+ key: (c == null ? void 0 : c[0]) ?? "",
1143
+ value: (c == null ? void 0 : c[1]) === "" ? "" : c == null ? void 0 : c[1],
1144
+ // 如果值为空,则key设为空字符串,否则保留原值
1145
+ width: Object.keys(o(n)).length
1146
+ });
1147
+ });
1148
+ }), t;
1149
+ } else
1150
+ return console.error("转换类型不正确:"), [];
1151
+ } else if (w(r)) {
1152
+ const l = JSON.parse(r);
1153
+ return Object.entries(l).map(([e, t]) => (K.value++, {
1154
+ id: K.value,
1155
+ key: e,
1156
+ value: t === "" ? "" : t,
1157
+ // 如果值为空,则key设为空字符串,否则保留原值
1158
+ width: 1
1159
+ }));
1160
+ } else
1161
+ return r;
1162
+ } catch (r) {
1163
+ return console.error("转换失败:", r), [];
1164
+ }
1165
+ }, bs = (s, r) => {
1166
+ try {
1167
+ if (J != null && J.find((l) => (l == null ? void 0 : l.key) === r))
1168
+ return JSON.parse(s.replace(/[’]|[‘]|[']/g, '"'));
1169
+ if (o(s).split("[").length - 1 > 1) {
1170
+ const l = o(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1171
+ return JSON.parse(l);
1172
+ } else {
1173
+ const l = o(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
1174
+ if (w(l)) {
1175
+ const e = JSON.parse(l);
1176
+ return Array.isArray(e) ? e.map((t) => ({ label: t })) : e;
1177
+ } else
1178
+ return Se(o(s));
1179
+ }
1180
+ } catch (l) {
1181
+ return console.error("解析失败:", l), s;
1182
+ }
1183
+ }, $s = (s) => ({ [s == null ? void 0 : s.key]: bs(s == null ? void 0 : s.value, s == null ? void 0 : s.key) }), As = (s) => {
1184
+ try {
1185
+ if (o(s).split("[").length - 1 > 1) {
1186
+ const r = o(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
1187
+ return JSON.parse(r);
1188
+ } else
1189
+ return JSON.parse(o(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
1190
+ } catch (r) {
1191
+ return console.error("解析失败:", r), s;
1192
+ }
1193
+ }, Fe = (s) => {
1194
+ var r, l, e, t, n, a;
1195
+ try {
1196
+ const c = ae((l = (r = o(s)) == null ? void 0 : r.replace("(", "(")) == null ? void 0 : l.replace(")", ")")), f = (e = o(c)) == null ? void 0 : e.map((k) => {
1197
+ var A, h;
1198
+ let d = (h = (A = o(k)) == null ? void 0 : A.split("=")) == null ? void 0 : h[0];
1199
+ return d != null && d.includes("GroupContents") ? gs(k) : Ie(k);
1200
+ }), p = [];
1201
+ (t = o(f)) == null || t.forEach((k) => {
1202
+ var d, A, h, U, b;
1203
+ J != null && J.find(($) => {
1204
+ var i, y;
1205
+ return ((i = $ == null ? void 0 : $.key) == null ? void 0 : i.toUpperCase()) === ((y = k == null ? void 0 : k.key) == null ? void 0 : y.toUpperCase());
1206
+ }) ? p.push({
1207
+ comp: ((d = J == null ? void 0 : J.find(($) => {
1208
+ var i, y;
1209
+ return ((i = $ == null ? void 0 : $.key) == null ? void 0 : i.toUpperCase()) === ((y = k == null ? void 0 : k.key) == null ? void 0 : y.toUpperCase());
1210
+ })) == null ? void 0 : d.value) ?? "",
1211
+ name: (A = k == null ? void 0 : k.value) == null ? void 0 : A.replace(/[’]|[‘]|[']/g, ""),
1212
+ compData: []
1213
+ }) : j != null && j.find(($) => {
1214
+ var i, y;
1215
+ return ((i = $ == null ? void 0 : $.key) == null ? void 0 : i.toUpperCase()) === ((y = k == null ? void 0 : k.key) == null ? void 0 : y.toUpperCase());
1216
+ }) && ((p == null ? void 0 : p.length) === 0 && (h = k.key) != null && h.includes("Menus") && p.push({
1217
+ comp: "Menu",
1218
+ name: "",
1219
+ compData: []
1220
+ }), (U = p == null ? void 0 : p[(p == null ? void 0 : p.length) - 1]) != null && U.compData && p[(p == null ? void 0 : p.length) - 1].compData.push({
1221
+ key: (b = j == null ? void 0 : j.find(($) => {
1222
+ var i, y;
1223
+ return ((i = $ == null ? void 0 : $.key) == null ? void 0 : i.toUpperCase()) === ((y = k == null ? void 0 : k.key) == null ? void 0 : y.toUpperCase());
1224
+ })) == null ? void 0 : b.value,
1225
+ contents: k == null ? void 0 : k.value
1226
+ }));
1227
+ }), console.log("newContents", p);
1228
+ let u = (n = o(p)) == null ? void 0 : n.map((k) => {
1229
+ var d;
1230
+ return k != null && k.compData && (k.compData = (d = k == null ? void 0 : k.compData) == null ? void 0 : d.map((A) => {
1231
+ var h, U, b, $, i, y, m, g, x, P, I;
1232
+ if ((A == null ? void 0 : A.key) === "formFlex")
1233
+ A.contents = ((U = (h = A.contents) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : U.toUpperCase()) !== "Vertical".toUpperCase();
1234
+ else if ((A == null ? void 0 : A.key) === "groupContents")
1235
+ A.contents = (b = o(A.contents)) == null ? void 0 : b.map((B) => $s(o(B)));
1236
+ else if (((i = ($ = A.contents) == null ? void 0 : $.trim()) != null && i.startsWith("[") || (m = (y = A.contents) == null ? void 0 : y.trim()) != null && m.startsWith("【")) && ((x = (g = A.contents) == null ? void 0 : g.trim()) != null && x.endsWith("]") || (I = (P = A.contents) == null ? void 0 : P.trim()) != null && I.endsWith("】")))
1237
+ A.contents = As(o(A.contents));
1238
+ else {
1239
+ if (!A.contents) return;
1240
+ A.contents = Se(o(A.contents));
1241
+ }
1242
+ return A;
1243
+ })), k;
1244
+ });
1245
+ return u = (a = o(u)) == null ? void 0 : a.map((k) => {
1246
+ var d;
1247
+ return (k == null ? void 0 : k.comp) === "Group" && (k.compData = (d = k.compData) == null ? void 0 : d.map((A) => {
1248
+ var U;
1249
+ let h = [];
1250
+ return (U = A.contents) == null || U.forEach((b) => {
1251
+ var $, i, y, m, g, x, P, I, B, W, D, L;
1252
+ if (J != null && J.find((N) => {
1253
+ var T, O, C;
1254
+ return ((T = N == null ? void 0 : N.key) == null ? void 0 : T.toUpperCase()) === ((C = (O = Object.keys(b)) == null ? void 0 : O[0]) == null ? void 0 : C.toUpperCase());
1255
+ }))
1256
+ h.push({
1257
+ comp: ($ = J == null ? void 0 : J.find((N) => {
1258
+ var T, O, C;
1259
+ return ((T = N == null ? void 0 : N.key) == null ? void 0 : T.toUpperCase()) === ((C = (O = Object.keys(b)) == null ? void 0 : O[0]) == null ? void 0 : C.toUpperCase());
1260
+ })) == null ? void 0 : $.value,
1261
+ name: (y = (i = Object.values(b)) == null ? void 0 : i[0]) == null ? void 0 : y.replace(/[’]|[‘]|[']/g, ""),
1262
+ compData: []
1263
+ });
1264
+ else if (j != null && j.find((N) => {
1265
+ var T, O, C;
1266
+ return ((T = N == null ? void 0 : N.key) == null ? void 0 : T.toUpperCase()) === ((C = (O = Object.keys(b)) == null ? void 0 : O[0]) == null ? void 0 : C.toUpperCase());
1267
+ })) {
1268
+ if ((h == null ? void 0 : h.length) === 0) return;
1269
+ (m = h == null ? void 0 : h[(h == null ? void 0 : h.length) - 1]) != null && m.compData && h[(h == null ? void 0 : h.length) - 1].compData.push({
1270
+ key: (g = j == null ? void 0 : j.find((N) => {
1271
+ var T, O, C;
1272
+ return ((T = N == null ? void 0 : N.key) == null ? void 0 : T.toUpperCase()) === ((C = (O = Object.keys(b)) == null ? void 0 : O[0]) == null ? void 0 : C.toUpperCase());
1273
+ })) == null ? void 0 : g.value,
1274
+ contents: (x = Object.values(b)) == null ? void 0 : x[0]
1275
+ });
1276
+ } else if ((I = (P = Object.keys(b)) == null ? void 0 : P[0]) != null && I.includes("$")) {
1277
+ const N = (W = (B = Object.keys(o(b))) == null ? void 0 : B[0]) == null ? void 0 : W.split("$");
1278
+ h[(h == null ? void 0 : h.length) - 1].compData.push({
1279
+ key: (D = j == null ? void 0 : j.find((T) => {
1280
+ var O, C;
1281
+ return ((O = T == null ? void 0 : T.key) == null ? void 0 : O.toUpperCase()) === ((C = N == null ? void 0 : N[0]) == null ? void 0 : C.toUpperCase());
1282
+ })) == null ? void 0 : D.value,
1283
+ contents: (L = Object.values(b)) == null ? void 0 : L[0],
1284
+ selectLabel: N == null ? void 0 : N[1]
1285
+ });
1286
+ }
1287
+ return b;
1288
+ }), A.contents = h, A;
1289
+ })), k;
1290
+ }), u;
1291
+ } catch {
1292
+ return !1;
1293
+ }
1294
+ }, Es = (s) => Fe(s), js = (s) => !!Fe(s), R = Q(0), Js = (s) => s.reduce((l, e) => {
1295
+ var n, a;
1296
+ const t = Object.values(l);
1297
+ return (((n = Object.keys(l)) == null ? void 0 : n.length) === 0 || t[t.length - 1].length >= (e == null ? void 0 : e.width)) && (l[R.value] = [], R.value++), l[R.value - 1].push(e), ((a = Object.keys(l)) == null ? void 0 : a.length) === (e == null ? void 0 : e.width) && (l[R.value] = [], R.value++), l;
1298
+ }, {});
1299
+ export {
1300
+ Js as a,
1301
+ xs as b,
1302
+ Ns as c,
1303
+ ae as d,
1304
+ Es as e,
1305
+ Ue as g,
1306
+ js as i,
1307
+ Ce as m,
1308
+ ss as p
1309
+ };