ss-component-new 1.3.592 → 1.3.593

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 (54) hide show
  1. package/dist/{MTLLoader-DLRwDSq9.js → MTLLoader-IoORm7Xy.js} +1 -1
  2. package/dist/{OrbitControls-VdSvi6qo.js → OrbitControls-DjKxlySM.js} +1 -1
  3. package/dist/{URDFLoader-DhyvlhkT.js → URDFLoader-5h_AgL9v.js} +2 -2
  4. package/dist/{animationData-ByZIPDPc.js → animationData-DCvSnnkl.js} +7 -7
  5. package/dist/array-Bn8J1Ybt.js +1044 -0
  6. package/dist/{clone-D5TKyMdO.js → clone-MyfSNInd.js} +1 -1
  7. package/dist/{iconfont-CqFSe5EU.js → iconfont-C1vgOyVl.js} +2 -2
  8. package/dist/{index-mQI3ujkE.js → index-B2LYEScO.js} +1 -1
  9. package/dist/{index-BSMt0OZo.js → index-B8NQAdR4.js} +5 -5
  10. package/dist/{index-CVk15ReJ.js → index-B9jvDVI4.js} +2 -2
  11. package/dist/{index-C67TeTN3.js → index-BEIX2w-s.js} +4 -4
  12. package/dist/{index-Ifg8aVTq.js → index-BkkvdZXm.js} +2 -2
  13. package/dist/{index-BVS7HHp4.js → index-BooTxrf0.js} +1 -1
  14. package/dist/{index-DlxAjIs9.js → index-BvtOLltL.js} +15 -15
  15. package/dist/{index-Bytb2Q_T.js → index-BvyM6d06.js} +414 -346
  16. package/dist/{index-Bb88Fjjp.js → index-BybrpYzx.js} +1 -1
  17. package/dist/{index-D9vhij7d.js → index-CHITXBP8.js} +2 -2
  18. package/dist/{index-rsglChpR.js → index-CM6aWexA.js} +2 -2
  19. package/dist/{index-DIlCmYlU.js → index-CT1LWsrT.js} +3 -3
  20. package/dist/{index-Do6KLvYX.js → index-CYjsE5Gs.js} +2 -2
  21. package/dist/{index-B3DudN3T.js → index-CahXu506.js} +16 -16
  22. package/dist/{index-JZWQVbZk.js → index-CcNofqvR.js} +2 -2
  23. package/dist/{index-DWCGStVg.js → index-CkO7j_i1.js} +4 -4
  24. package/dist/{index-DYBugViC.js → index-CnVTTuJX.js} +1 -1
  25. package/dist/{index-Dk-QuykT.js → index-CymdCuJN.js} +6 -6
  26. package/dist/index-D33gkv3n.js +10843 -0
  27. package/dist/{index-CM_QMg_M.js → index-D9UIlesH.js} +18609 -18609
  28. package/dist/{index-BXuFvudN.js → index-DGuZ5wp-.js} +7 -7
  29. package/dist/{index-C0Qvl5_h.js → index-DIVct0z6.js} +1 -1
  30. package/dist/{index-qzqfH3bH.js → index-DO2hRjRp.js} +2 -2
  31. package/dist/{index-DQpp2FMD.js → index-DYGcFilp.js} +8 -8
  32. package/dist/{index-gKCLMm1H.js → index-DcPtyCDm.js} +23 -23
  33. package/dist/{index-B_X5U5tn.js → index-DfDUkCbN.js} +1 -1
  34. package/dist/{index-CnH0AhvF.js → index-DmILGKv9.js} +3 -3
  35. package/dist/{index-DzGsNMvh.js → index-M7J_qxQw.js} +32 -32
  36. package/dist/{index-DBI9NUGP.js → index-o5SO709_.js} +4 -4
  37. package/dist/{index.vue_vue_type_style_index_0_scoped_07c75c98_lang-CSKqhil-.js → index.vue_vue_type_style_index_0_scoped_07c75c98_lang-Dp7tIi0S.js} +7 -7
  38. package/dist/main-1mbUGlWA.js +502 -0
  39. package/dist/{menuIndex-_8JUtdkK.js → menuIndex-BiUB7t5q.js} +1 -1
  40. package/dist/{ss-component3.js → router.js} +12 -12
  41. package/dist/{ss-component.css → ss-component-new.css} +1 -1
  42. package/dist/ss-component.js +71 -9
  43. package/dist/svg.js +12 -0
  44. package/dist/{threeModel-9I62DmQE.js → threeModel-BpG-AcGZ.js} +4 -4
  45. package/dist/{threePreview-BbFA3Cr_.js → threePreview-CwE8MXTl.js} +4 -4
  46. package/dist/{threeSceneView-BSaAqV79.js → threeSceneView-DGvDz7Lr.js} +11 -11
  47. package/dist/{threeSceneViewForCPMPIP-B2nOcHD0.js → threeSceneViewForCPMPIP-CalaPv9B.js} +8 -8
  48. package/dist/{threeTrackPathView-BlOfpQQx.js → threeTrackPathView-6-V10AFb.js} +4 -4
  49. package/dist/{threeViewerHost-CfL6vu2n.js → threeViewerHost-BsUgakNM.js} +3 -3
  50. package/dist/{urdfTree-RhU4c2KY.js → urdfTree-PYe9AY5_.js} +1 -1
  51. package/dist/{workpieceTreePanel-Cf62OkTw.js → workpieceTreePanel-D5mGwMQx.js} +4 -4
  52. package/package.json +20 -2
  53. package/dist/index-B7vro097.js +0 -11873
  54. package/dist/ss-component2.js +0 -70
@@ -0,0 +1,502 @@
1
+ import { ref as U, watch as v, openBlock as I, createElementBlock as E, Fragment as de, renderList as fe, createElementVNode as S, toDisplayString as se, createBlock as oe, resolveDynamicComponent as ye, createCommentVNode as q, onMounted as he, onUnmounted as ke, createVNode as te } from "vue";
2
+ import { m as ge, a as _e, b as Ce, c as be } from "./array-Bn8J1Ybt.js";
3
+ import { c, a as ce, p as re, s as ue, u as Oe } from "./index-B8NQAdR4.js";
4
+ import { g as Ae } from "./index-D9UIlesH.js";
5
+ import { v as H, a as K } from "./index-BvyM6d06.js";
6
+ import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const B = [
8
+ {
9
+ key: "FormName",
10
+ value: "Form"
11
+ },
12
+ {
13
+ key: "TableName",
14
+ value: "Table"
15
+ }
16
+ ], A = [
17
+ {
18
+ key: "FormDirect",
19
+ value: "formFlex"
20
+ },
21
+ {
22
+ key: "Form",
23
+ value: "formContent"
24
+ },
25
+ {
26
+ key: "FormButton",
27
+ value: "formButton"
28
+ },
29
+ {
30
+ key: "TableColumns",
31
+ value: "header"
32
+ },
33
+ {
34
+ key: "TableButton",
35
+ value: "extraButton"
36
+ },
37
+ {
38
+ key: "LineButton",
39
+ value: "rowButton"
40
+ },
41
+ {
42
+ key: "Table",
43
+ value: "tableContents"
44
+ },
45
+ {
46
+ key: "TableIndex",
47
+ value: "tableIndex"
48
+ }
49
+ ];
50
+ U(0);
51
+ U(0);
52
+ U(1);
53
+ const je = (s) => {
54
+ let i;
55
+ s.replaceAll(" ", `\r
56
+ `).replaceAll(`
57
+ `, `\r
58
+ `).includes(`\r
59
+ `) ? i = s.replaceAll(`
60
+ `, `\r
61
+ `).replaceAll(" ", `\r
62
+ `).split(`\r
63
+ `).filter((l) => l.trim() !== "") : i = s.replaceAll(" ", `\r
64
+ `).split(`
65
+ `).filter((l) => l.trim() !== "");
66
+ const e = [];
67
+ let t = "";
68
+ for (const l of i)
69
+ l.includes("{") || t.includes("{") || l.includes("[") || t.includes("[") || l.includes("【") || t.includes("【") || l.includes("(") || t.includes("(") || l.includes("(") || t.includes("(") || l.includes("/*") || t.includes("/*") ? (t += l.trim(), c(t).split("{").length - 1 === c(t).split("}").length - 1 && c(t).split("【").length - 1 === c(t).split("】").length - 1 && c(t).split("[").length - 1 === c(t).split("]").length - 1 && c(t).split("(").length - 1 === c(t).split(")").length - 1 && c(t).split("(").length - 1 === c(t).split(")").length - 1 && c(t).split("/*").length - 1 === c(t).split("*/").length - 1 && t[t.length - 1] !== "," ? (e.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = "") : t != null && t.includes("*/") && (t = t.replace(/\/\*[\s\S]*?\*\//g, ""))) : e.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
70
+ return e;
71
+ }, X = U(0), ne = U(0), $e = (s) => {
72
+ const i = s.trim().replace(/^'|'$/g, ""), e = /((?:\$?[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, t = {};
73
+ let l;
74
+ for (; (l = e.exec(i)) !== null; ) {
75
+ const f = l[1];
76
+ let y = l[2].trim();
77
+ (y.match(/\[/g) || []).length !== (y.match(/\]/g) || []).length && (y = y == null ? void 0 : y.replace(/]$/, "")), t[f] ? (t[f + ne.value] && ne.value++, t[f + ne.value] = f + "=" + y) : t[f] = f + "=" + y;
78
+ }
79
+ return t;
80
+ }, ie = (s) => {
81
+ const [i, e] = s.split("=").map((f) => f.trim()), t = i.replace(/['"]/g, ""), l = e.replace(/^['"]|['"]$/g, "");
82
+ return { key: t, value: l };
83
+ }, De = (s) => {
84
+ var y;
85
+ let i = [];
86
+ const [e, t] = s.split(/=(.+)/), l = e.replace(/['"]/g, "").trim(), f = t.replace(/^['"]|['"]$/g, "");
87
+ return (y = Object.values($e(f))) == null || y.forEach((g) => {
88
+ i.push(ie(g));
89
+ }), { key: l, value: i };
90
+ }, Y = (s) => {
91
+ try {
92
+ return JSON.parse(s), !0;
93
+ } catch {
94
+ return !1;
95
+ }
96
+ }, me = (s) => {
97
+ try {
98
+ const i = s.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
99
+ if (c(i).split("{").length - 1 > 1) {
100
+ let e = c(i).replace(/^\{(.*)\}$/, "[$1]");
101
+ if (Y(e) && !e.includes("$") || (e = e.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Y(e)) {
102
+ const t = JSON.parse(e);
103
+ let l = [];
104
+ return t == null || t.forEach((f) => {
105
+ var y;
106
+ (y = Object.entries(c(f))) == null || y.forEach((g) => {
107
+ X.value++, l.push({
108
+ id: X.value,
109
+ key: (g == null ? void 0 : g[0]) ?? "",
110
+ value: (g == null ? void 0 : g[1]) === "" ? "" : g == null ? void 0 : g[1],
111
+ // 如果值为空,则key设为空字符串,否则保留原值
112
+ width: Object.keys(c(f)).length
113
+ });
114
+ });
115
+ }), l;
116
+ } else
117
+ return console.error("转换类型不正确:"), [];
118
+ } else if (Y(i)) {
119
+ const e = JSON.parse(i);
120
+ return Object.entries(e).map(([t, l]) => (X.value++, {
121
+ id: X.value,
122
+ key: t,
123
+ value: l === "" ? "" : l,
124
+ // 如果值为空,则key设为空字符串,否则保留原值
125
+ width: 1
126
+ }));
127
+ } else
128
+ return i;
129
+ } catch (i) {
130
+ return console.error("转换失败:", i), [];
131
+ }
132
+ }, Ne = (s, i) => {
133
+ var e;
134
+ try {
135
+ if ((e = H) != null && e.find((t) => (t == null ? void 0 : t.key) === i))
136
+ return JSON.parse(s.replace(/[’]|[‘]|[']/g, '"'));
137
+ if (c(s).split("[").length - 1 > 1) {
138
+ const t = c(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
139
+ return JSON.parse(t);
140
+ } else {
141
+ const t = c(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
142
+ if (Y(t)) {
143
+ const l = JSON.parse(t);
144
+ return Array.isArray(l) ? l.map((f) => ({ label: f })) : l;
145
+ } else
146
+ return me(c(s));
147
+ }
148
+ } catch (t) {
149
+ return console.error("解析失败:", t), s;
150
+ }
151
+ }, xe = (s) => ({ [s == null ? void 0 : s.key]: Ne(s == null ? void 0 : s.value, s == null ? void 0 : s.key) }), Ue = (s) => {
152
+ try {
153
+ if (c(s).split("[").length - 1 > 1) {
154
+ const i = c(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
155
+ return JSON.parse(i);
156
+ } else
157
+ return JSON.parse(c(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((e) => ({ label: e }));
158
+ } catch (i) {
159
+ return console.error("解析失败:", i), s;
160
+ }
161
+ }, Je = (s) => {
162
+ var i, e, t, l, f, y;
163
+ try {
164
+ const g = je((e = (i = c(s)) == null ? void 0 : i.replace("(", "(")) == null ? void 0 : e.replace(")", ")")), Q = (t = c(g)) == null ? void 0 : t.map((n) => {
165
+ var p, u;
166
+ let k = (u = (p = c(n)) == null ? void 0 : p.split("=")) == null ? void 0 : u[0];
167
+ return k != null && k.includes("GroupContents") ? De(n) : ie(n);
168
+ }), b = [];
169
+ (l = c(Q)) == null || l.forEach((n) => {
170
+ var k, p, u, N, C, T, w, F, d;
171
+ (k = H) != null && k.find((a) => {
172
+ var m, o;
173
+ return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
174
+ }) ? b.push({
175
+ comp: ((u = (p = H) == null ? void 0 : p.find((a) => {
176
+ var m, o;
177
+ return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
178
+ })) == null ? void 0 : u.value) ?? "",
179
+ name: (N = n == null ? void 0 : n.value) == null ? void 0 : N.replace(/[’]|[‘]|[']/g, ""),
180
+ compData: []
181
+ }) : (C = K) != null && C.find((a) => {
182
+ var m, o;
183
+ return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
184
+ }) && ((b == null ? void 0 : b.length) === 0 && (T = n.key) != null && T.includes("Menus") && b.push({
185
+ comp: "Menu",
186
+ name: "",
187
+ compData: []
188
+ }), (w = b == null ? void 0 : b[(b == null ? void 0 : b.length) - 1]) != null && w.compData && b[(b == null ? void 0 : b.length) - 1].compData.push({
189
+ key: (d = (F = K) == null ? void 0 : F.find((a) => {
190
+ var m, o;
191
+ return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
192
+ })) == null ? void 0 : d.value,
193
+ contents: n == null ? void 0 : n.value
194
+ }));
195
+ });
196
+ let z = (f = c(b)) == null ? void 0 : f.map((n) => {
197
+ var k;
198
+ return n != null && n.compData && (n.compData = (k = n == null ? void 0 : n.compData) == null ? void 0 : k.map((p) => {
199
+ var u, N, C, T, w, F, d, a, m, o, j;
200
+ if ((p == null ? void 0 : p.key) === "formFlex")
201
+ p.contents = ((N = (u = p.contents) == null ? void 0 : u.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : N.toUpperCase()) !== "Vertical".toUpperCase();
202
+ else if ((p == null ? void 0 : p.key) === "groupContents")
203
+ p.contents = (C = c(p.contents)) == null ? void 0 : C.map((x) => xe(c(x)));
204
+ else if (((w = (T = p.contents) == null ? void 0 : T.trim()) != null && w.startsWith("[") || (d = (F = p.contents) == null ? void 0 : F.trim()) != null && d.startsWith("【")) && ((m = (a = p.contents) == null ? void 0 : a.trim()) != null && m.endsWith("]") || (j = (o = p.contents) == null ? void 0 : o.trim()) != null && j.endsWith("】")))
205
+ p.contents = Ue(c(p.contents));
206
+ else {
207
+ if (!p.contents) return;
208
+ p.contents = me(c(p.contents));
209
+ }
210
+ return p;
211
+ })), n;
212
+ });
213
+ return z = (y = c(z)) == null ? void 0 : y.map((n) => {
214
+ var k;
215
+ return (n == null ? void 0 : n.comp) === "Group" && (n.compData = (k = n.compData) == null ? void 0 : k.map((p) => {
216
+ var N;
217
+ let u = [];
218
+ return (N = p.contents) == null || N.forEach((C) => {
219
+ var T, w, F, d, a, m, o, j, x, r, Z, M, W, L, G, P, R;
220
+ if ((T = H) != null && T.find((h) => {
221
+ var O, $, D;
222
+ return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
223
+ }))
224
+ u.push({
225
+ comp: (F = (w = H) == null ? void 0 : w.find((h) => {
226
+ var O, $, D;
227
+ return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
228
+ })) == null ? void 0 : F.value,
229
+ name: (a = (d = Object.values(C)) == null ? void 0 : d[0]) == null ? void 0 : a.replace(/[’]|[‘]|[']/g, ""),
230
+ compData: []
231
+ });
232
+ else if ((m = K) != null && m.find((h) => {
233
+ var O, $, D;
234
+ return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
235
+ })) {
236
+ if ((u == null ? void 0 : u.length) === 0) return;
237
+ (o = u == null ? void 0 : u[(u == null ? void 0 : u.length) - 1]) != null && o.compData && u[(u == null ? void 0 : u.length) - 1].compData.push({
238
+ key: (x = (j = K) == null ? void 0 : j.find((h) => {
239
+ var O, $, D;
240
+ return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
241
+ })) == null ? void 0 : x.value,
242
+ contents: (r = Object.values(C)) == null ? void 0 : r[0]
243
+ });
244
+ } else if ((M = (Z = Object.keys(C)) == null ? void 0 : Z[0]) != null && M.includes("$")) {
245
+ const h = (L = (W = Object.keys(c(C))) == null ? void 0 : W[0]) == null ? void 0 : L.split("$");
246
+ u[(u == null ? void 0 : u.length) - 1].compData.push({
247
+ key: (P = (G = K) == null ? void 0 : G.find((O) => {
248
+ var $, D;
249
+ return (($ = O == null ? void 0 : O.key) == null ? void 0 : $.toUpperCase()) === ((D = h == null ? void 0 : h[0]) == null ? void 0 : D.toUpperCase());
250
+ })) == null ? void 0 : P.value,
251
+ contents: (R = Object.values(C)) == null ? void 0 : R[0],
252
+ selectLabel: h == null ? void 0 : h[1]
253
+ });
254
+ }
255
+ return C;
256
+ }), p.contents = u, p;
257
+ })), n;
258
+ }), z;
259
+ } catch {
260
+ return !1;
261
+ }
262
+ }, Ve = (s) => Je(s), Ie = {
263
+ key: 0,
264
+ class: "show-content"
265
+ }, Te = { class: "item-view-group" }, we = {
266
+ __name: "index",
267
+ props: {
268
+ content: String,
269
+ jsonContents: Array
270
+ },
271
+ emits: ["change"],
272
+ setup(s, { emit: i }) {
273
+ const e = s, t = i, l = ce(re), { itemData: f } = ue(l), y = U([]), g = U([]), Q = (n) => {
274
+ t("change", {
275
+ wholeValue: y.value,
276
+ editValue: n
277
+ });
278
+ }, b = (n) => {
279
+ const k = c(y.value), p = k == null ? void 0 : k.map((u, N) => (N === (n == null ? void 0 : n.index) && (u.compData = n == null ? void 0 : n.contents), u));
280
+ y.value = p;
281
+ };
282
+ v(
283
+ () => f.value,
284
+ () => {
285
+ var n;
286
+ !f.value || ((n = f.value) == null ? void 0 : n.length) === 0 || (g.value = f.value, y.value = f.value);
287
+ },
288
+ { deep: !0, immediate: !0 }
289
+ ), v(
290
+ () => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
291
+ () => {
292
+ var k;
293
+ if (((k = e == null ? void 0 : e.jsonContents) == null ? void 0 : k.length) > 0) {
294
+ l.setOriginalData(e == null ? void 0 : e.jsonContents), l.setItemData(e == null ? void 0 : e.jsonContents);
295
+ return;
296
+ }
297
+ if (!(e != null && e.content) || (e == null ? void 0 : e.content) === "") return;
298
+ const n = Ve(e == null ? void 0 : e.content);
299
+ l.setOriginalData(n), l.setItemData(n);
300
+ },
301
+ { deep: !0, immediate: !0 }
302
+ );
303
+ const z = (n) => Ae(n);
304
+ return (n, k) => {
305
+ var p;
306
+ return ((p = g.value) == null ? void 0 : p.length) > 0 ? (I(), E("div", Ie, [
307
+ (I(!0), E(de, null, fe(g.value, (u, N) => (I(), E("div", {
308
+ class: "item-content",
309
+ key: N
310
+ }, [
311
+ S("div", Te, se(u.name), 1),
312
+ (I(), oe(ye(z(u.comp)), {
313
+ itemData: u == null ? void 0 : u.compData,
314
+ childItemData: u == null ? void 0 : u.itemChildData,
315
+ key: N,
316
+ onChange: Q,
317
+ index: N,
318
+ onContentChange: b
319
+ }, null, 40, ["itemData", "childItemData", "index"]))
320
+ ]))), 128))
321
+ ])) : q("", !0);
322
+ };
323
+ }
324
+ }, Fe = /* @__PURE__ */ pe(we, [["__scopeId", "data-v-1c04adc8"]]), Ee = { class: "add-model-content" }, ze = {
325
+ key: 0,
326
+ class: "model-import-data"
327
+ }, Be = { class: "import-button" }, Se = { key: 0 }, Ze = {
328
+ key: 1,
329
+ class: "model-operate"
330
+ }, Me = { class: "model-select" }, We = { class: "model-fill" }, Le = {
331
+ key: 2,
332
+ class: "model-view ssComponent"
333
+ }, Ge = {
334
+ __name: "main",
335
+ props: {
336
+ mode: {
337
+ type: String,
338
+ default: "view"
339
+ },
340
+ content: {
341
+ type: String,
342
+ default: ""
343
+ },
344
+ jsonContents: {
345
+ type: Array,
346
+ default: () => []
347
+ },
348
+ showButton: {
349
+ type: Boolean,
350
+ default: !0
351
+ }
352
+ },
353
+ emits: ["change"],
354
+ setup(s, { emit: i }) {
355
+ const e = s, t = i, l = U(""), f = U([]), y = U(0), g = ce(re);
356
+ Oe(re);
357
+ const { itemData: Q, originalData: b } = ue(g), z = U(null), n = U(0), k = U(""), p = () => {
358
+ y.value = window.innerWidth;
359
+ }, u = async (d) => {
360
+ var m;
361
+ const a = (m = c(d == null ? void 0 : d.wholeValue)) == null ? void 0 : m.map((o) => {
362
+ var j;
363
+ return (o == null ? void 0 : o.comp) === "Form" && (o.compData = (j = o.compData) == null ? void 0 : j.map((x) => ((x == null ? void 0 : x.key) === "formContent" && (x.contents = be(x == null ? void 0 : x.contents)), x))), o;
364
+ });
365
+ t("change", {
366
+ originalContents: b.value,
367
+ currentContents: d == null ? void 0 : d.wholeValue,
368
+ editContent: d == null ? void 0 : d.editValue,
369
+ stringContent: N(c(d == null ? void 0 : d.wholeValue)),
370
+ arrayToContents: a
371
+ });
372
+ }, N = (d) => {
373
+ var m;
374
+ let a = [];
375
+ return (m = c(d)) == null || m.forEach((o) => {
376
+ var j, x;
377
+ B != null && B.find((r) => (r == null ? void 0 : r.value) === (o == null ? void 0 : o.comp)) && a.push(((j = B == null ? void 0 : B.find((r) => (r == null ? void 0 : r.value) === (o == null ? void 0 : o.comp))) == null ? void 0 : j.key) + "=" + o.name + "/r/n"), (x = o == null ? void 0 : o.compData) == null || x.forEach((r) => {
378
+ var Z, M, W, L, G, P, R, h, O, $, D, ae;
379
+ if (A != null && A.find((J) => (J == null ? void 0 : J.value) === (r == null ? void 0 : r.key)))
380
+ if (!((Z = r == null ? void 0 : r.contents) != null && Z.length))
381
+ a.push(((M = A == null ? void 0 : A.find((J) => (J == null ? void 0 : J.value) === (r == null ? void 0 : r.key))) == null ? void 0 : M.key) + "=" + (r.contents === !0 ? '""' : "Vertical") + "/r/n");
382
+ else {
383
+ let J = (W = r == null ? void 0 : r.contents) == null ? void 0 : W[0];
384
+ if (!J) return;
385
+ if (Object.keys(J).includes("label") && Object.keys(J).includes("key") && Object.keys(J).includes("width"))
386
+ if (((G = (L = r.contents) == null ? void 0 : L.filter((V) => V.width !== 1)) == null ? void 0 : G.length) === 0) {
387
+ const V = (P = c(r == null ? void 0 : r.contents)) == null ? void 0 : P.map((_) => ({ [_.label]: _.value }));
388
+ a.push(((R = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : R.key) + "=" + JSON.stringify(V) + "/r/n");
389
+ } else {
390
+ let V = [];
391
+ (h = c(r == null ? void 0 : r.contents)) == null || h.reduce((_, ee) => {
392
+ var le;
393
+ return _[ee.label] = ee.key, ((le = Object.keys(c(_))) == null ? void 0 : le.length) >= ee.width && (V.push(c(_)), _ = {}), _;
394
+ }, {}), a.push(((O = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : O.key) + "=" + JSON.stringify(V) + "/r/n");
395
+ }
396
+ else if (Object.keys(J).includes("label")) {
397
+ const V = ($ = c(r == null ? void 0 : r.contents)) == null ? void 0 : $.map((_) => _.label);
398
+ a.push(((D = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : D.key) + "=" + JSON.stringify(V) + "/r/n");
399
+ } else
400
+ a.push(((ae = A == null ? void 0 : A.find((V) => (V == null ? void 0 : V.value) === (r == null ? void 0 : r.key))) == null ? void 0 : ae.key) + "=" + JSON.stringify(r == null ? void 0 : r.contents) + "/r/n");
401
+ }
402
+ });
403
+ }), JSON.stringify(a);
404
+ }, C = U([]), T = () => {
405
+ z.value.click();
406
+ }, w = (d) => {
407
+ const a = d.target.files[0];
408
+ if (!a) return;
409
+ const m = new FileReader();
410
+ m.onload = (o) => {
411
+ try {
412
+ l.value = o.target.result, C.value = F(o.target.result), n.value++;
413
+ } catch (j) {
414
+ console.error("解析失败:", j);
415
+ }
416
+ }, m.onerror = (o) => {
417
+ console.error("文件读取错误:", o);
418
+ }, m.readAsText(a);
419
+ };
420
+ he(() => {
421
+ window.addEventListener("resize", p);
422
+ }), ke(() => {
423
+ window.removeEventListener("resize", p);
424
+ }), v(
425
+ () => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
426
+ () => {
427
+ l.value = e == null ? void 0 : e.content, f.value = e == null ? void 0 : e.jsonContents;
428
+ },
429
+ { deep: !0, immediate: !0 }
430
+ ), v(
431
+ () => n.value,
432
+ () => {
433
+ var d;
434
+ ((d = C.value) == null ? void 0 : d.length) !== 0 && (g.setOriginalData(C.value), g.setItemData(C.value));
435
+ },
436
+ { deep: !0, immediate: !0 }
437
+ );
438
+ const F = (d) => {
439
+ let a = d.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
440
+ a = a.replace(/(\w+)\s*:/g, "$1:"), a = a.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), a = a.replace(/,\s*([}\]])/g, "$1"), a = a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
441
+ try {
442
+ return JSON.parse(a);
443
+ } catch (m) {
444
+ try {
445
+ const j = new Function(`return ${a}`)();
446
+ if (Array.isArray(j) || typeof j == "object")
447
+ return j;
448
+ throw new Error(`解析结果不是有效的数组或对象: ${m}`);
449
+ } catch (o) {
450
+ throw new Error(`无法解析JSON: ${o.message}`);
451
+ }
452
+ }
453
+ };
454
+ return (d, a) => {
455
+ var m;
456
+ return I(), E("div", Ee, [
457
+ ((m = e == null ? void 0 : e.jsonContents) == null ? void 0 : m.length) === 0 ? (I(), E("div", ze, [
458
+ S("div", Be, [
459
+ S("input", {
460
+ type: "file",
461
+ ref_key: "fileInput",
462
+ ref: z,
463
+ accept: ".txt",
464
+ onChange: w,
465
+ style: { display: "none" }
466
+ }, null, 544),
467
+ S("button", {
468
+ onClick: T,
469
+ class: "import-button-content"
470
+ }, "导入文件"),
471
+ k.value ? (I(), E("span", Se, se(k.value), 1)) : q("", !0)
472
+ ])
473
+ ])) : q("", !0),
474
+ (e == null ? void 0 : e.mode) === "edit" ? (I(), E("div", Ze, [
475
+ S("div", Me, [
476
+ te(ge)
477
+ ]),
478
+ (I(), E("div", {
479
+ class: "model-show",
480
+ key: y.value
481
+ }, [
482
+ te(_e)
483
+ ])),
484
+ S("div", We, [
485
+ te(Ce)
486
+ ])
487
+ ])) : q("", !0),
488
+ (e == null ? void 0 : e.mode) === "view" ? (I(), E("div", Le, [
489
+ (I(), oe(Fe, {
490
+ content: l.value,
491
+ onChange: u,
492
+ jsonContents: f.value,
493
+ key: y.value
494
+ }, null, 8, ["content", "jsonContents"]))
495
+ ])) : q("", !0)
496
+ ]);
497
+ };
498
+ }
499
+ }, Xe = /* @__PURE__ */ pe(Ge, [["__scopeId", "data-v-91ce80be"]]);
500
+ export {
501
+ Xe as default
502
+ };
@@ -1,4 +1,4 @@
1
- import { d as $ } from "./index-BSMt0OZo.js";
1
+ import { c as $ } from "./index-B8NQAdR4.js";
2
2
  function M(s, n, e, r = "children") {
3
3
  var l;
4
4
  for (const t of s) {
@@ -8,12 +8,12 @@ const a = [
8
8
  {
9
9
  path: "/login",
10
10
  name: "Login",
11
- component: async () => import("./index-CnH0AhvF.js")
11
+ component: async () => import("./index-DmILGKv9.js")
12
12
  },
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-B7vro097.js"),
16
+ component: async () => import("./index-D33gkv3n.js"),
17
17
  // component: async ()=>import('@/components/views/model/component/main.vue'),
18
18
  // component: async ()=>import('@/components/views/canvas/index.vue'),
19
19
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -31,17 +31,17 @@ const a = [
31
31
  {
32
32
  path: "平台管理/菜单管理",
33
33
  name: "Menu",
34
- component: async () => import("./index-C67TeTN3.js")
34
+ component: async () => import("./index-BEIX2w-s.js")
35
35
  },
36
36
  {
37
37
  path: "平台管理/主菜单管理",
38
38
  name: "MainMenu",
39
- component: async () => import("./index-JZWQVbZk.js")
39
+ component: async () => import("./index-CcNofqvR.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/个人中心",
43
43
  name: "PersonalCenter",
44
- component: async () => import("./index-DQpp2FMD.js")
44
+ component: async () => import("./index-DYGcFilp.js")
45
45
  },
46
46
  // {
47
47
  // path: '系统管理/职位管理',
@@ -66,37 +66,37 @@ const a = [
66
66
  {
67
67
  path: "系统维护/登录日志",
68
68
  name: "LoginLog",
69
- component: async () => import("./index-D9vhij7d.js")
69
+ component: async () => import("./index-CHITXBP8.js")
70
70
  },
71
71
  {
72
72
  path: "系统维护/操作日志",
73
73
  name: "OperateLog",
74
- component: async () => import("./index-qzqfH3bH.js")
74
+ component: async () => import("./index-DO2hRjRp.js")
75
75
  },
76
76
  {
77
77
  path: "角色管理",
78
78
  name: "Role",
79
- component: async () => import("./index-BXuFvudN.js")
79
+ component: async () => import("./index-DGuZ5wp-.js")
80
80
  },
81
81
  {
82
82
  path: "部门管理",
83
83
  name: "Department",
84
- component: async () => import("./index-Ifg8aVTq.js")
84
+ component: async () => import("./index-BkkvdZXm.js")
85
85
  },
86
86
  {
87
87
  path: "职位管理",
88
88
  name: "Position",
89
- component: async () => import("./index-gKCLMm1H.js")
89
+ component: async () => import("./index-DcPtyCDm.js")
90
90
  },
91
91
  {
92
92
  path: "个人中心",
93
93
  name: "PersonalCenter",
94
- component: async () => import("./index-DWCGStVg.js")
94
+ component: async () => import("./index-CkO7j_i1.js")
95
95
  },
96
96
  {
97
97
  path: "log",
98
98
  name: "log",
99
- component: async () => import("./index-DYBugViC.js")
99
+ component: async () => import("./index-CnVTTuJX.js")
100
100
  }
101
101
  // {
102
102
  // path: 'priority',