ss-component-new 1.3.701 → 1.3.702
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.
- package/dist/config.js +1 -1
- package/dist/{index-ChNfRlIP.js → index-BKoAuSBh.js} +223 -18
- package/dist/index-BZ6XZp4O.js +182 -0
- package/dist/index-DMqUY4yR.js +27 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-D9DRZPyb.js → index-DXYV8CAc.js} +112065 -110832
- package/dist/index-Dad_IdSm.js +213 -0
- package/dist/index-Nxu5ivW5.js +1044 -0
- package/dist/index-T_MmKXF1.js +50 -0
- package/dist/menu-BYmz2cKN.js +5229 -0
- package/dist/platform-C9131Sg-.js +11490 -0
- package/dist/ss-component.css +8 -8
- package/dist/ss-component.js +28 -64
- package/dist/ss-component2.js +15 -75
- package/dist/ss-component3.js +1 -1
- package/package.json +8 -6
- package/public/config.js +1 -1
- package/dist/JSEncrypt-B36c1iN5.js +0 -1983
- package/dist/MTLLoader-DC5Di-ql.js +0 -657
- package/dist/URDFLoader-BqfNCQLH.js +0 -2299
- package/dist/animationData-BNQm3jIu.js +0 -83
- package/dist/array-BXz16Xf3.js +0 -1045
- package/dist/clone-Dp_gc9ll.js +0 -8
- package/dist/eleIcon-qStmsM1q.js +0 -29
- package/dist/fileUtil-UOt_otFo.js +0 -20
- package/dist/iconfont-B2Moc_Mi.js +0 -1026
- package/dist/icons/svg/functionList.svg +0 -1
- package/dist/icons/svg/method.svg +0 -1
- package/dist/index-11kpzK0A.js +0 -209
- package/dist/index-B0H3C7WG.js +0 -103
- package/dist/index-B3OyTnhN.js +0 -119
- package/dist/index-BHtNKL1L.js +0 -27
- package/dist/index-Bbwy0rRx.js +0 -411
- package/dist/index-BbyrFzEO.js +0 -93
- package/dist/index-Bk_HGMFV.js +0 -20578
- package/dist/index-BooO2Bml.js +0 -78
- package/dist/index-BpgixwCC.js +0 -83
- package/dist/index-Bw3sTXPI.js +0 -8993
- package/dist/index-Bz8vSCfN.js +0 -84
- package/dist/index-CAm10a_p.js +0 -107
- package/dist/index-CGVmScXF.js +0 -470
- package/dist/index-CGi0g-VN.js +0 -627
- package/dist/index-CTD1ZbEQ.js +0 -873
- package/dist/index-CV_jQDcg.js +0 -9
- package/dist/index-CWOXvFfD.js +0 -44
- package/dist/index-Ch_Lf81f.js +0 -63004
- package/dist/index-CjsQSzV6.js +0 -572
- package/dist/index-Ck_oTi7E.js +0 -25297
- package/dist/index-CydXQbtX.js +0 -622
- package/dist/index-DAJxL40d.js +0 -55
- package/dist/index-DBsEVMiM.js +0 -201
- package/dist/index-DG4hoOWt.js +0 -665
- package/dist/index-DUbk5m5P.js +0 -99
- package/dist/index-Ds6m_4JJ.js +0 -28500
- package/dist/index-DupTchhl.js +0 -1000
- package/dist/index-DyCq_odP.js +0 -331
- package/dist/index-DynGQqC3.js +0 -93
- package/dist/index-UB_oCdlo.js +0 -62
- package/dist/index-YjBTGOkO.js +0 -61
- package/dist/index-ib1DMe8v.js +0 -98
- package/dist/index-jbOjjV0j.js +0 -447
- package/dist/index-ke-XsSa7.js +0 -30
- package/dist/index-lPVVum78.js +0 -48
- package/dist/index-rlStojTL.js +0 -52
- package/dist/index-uF-ibwG0.js +0 -9
- package/dist/isString-0ZglyOfu.js +0 -8
- package/dist/localIcon-D5UoFBU5.js +0 -76
- package/dist/main-1uytY6Nj.js +0 -502
- package/dist/menuIndex-BB0uVPRX.js +0 -159
- package/dist/request-1RPa2bBn.js +0 -9048
- package/dist/threeModel-BEmaHjYZ.js +0 -1109
- package/dist/threePreview-D7ncVQLV.js +0 -2810
- package/dist/threeSceneView-ClvW-1FZ.js +0 -1290
- package/dist/threeSceneViewForCPMPIP-D7zwZFBW.js +0 -539
- package/dist/threeTrackPathView-VySiazeH.js +0 -620
- package/dist/threeViewerHost-sD-GHVTI.js +0 -233
- package/dist/urdfTree-B-7DfE39.js +0 -254
- package/dist/workpieceTreePanel-DB06G34P.js +0 -559
- package/public/icons/svg/functionList.svg +0 -1
- package/public/icons/svg/method.svg +0 -1
- /package/dist/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/dist/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
- /package/dist/icons/svg/{Update.svg → update.svg} +0 -0
- /package/public/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/public/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
- /package/public/icons/svg/{Update.svg → update.svg} +0 -0
package/dist/main-1uytY6Nj.js
DELETED
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
import { ref as U, watch as v, createElementBlock as E, createCommentVNode as q, openBlock as I, Fragment as de, renderList as fe, createElementVNode as S, createBlock as se, toDisplayString as oe, resolveDynamicComponent as ye, 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-BXz16Xf3.js";
|
|
3
|
-
import { c, a as ce, p as re, s as ue, u as Oe } from "./index-Bw3sTXPI.js";
|
|
4
|
-
import { g as Ae } from "./index-Ch_Lf81f.js";
|
|
5
|
-
import { v as H, a as K } from "./index-Ds6m_4JJ.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, oe(u.name), 1),
|
|
312
|
-
(I(), se(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, oe(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(), se(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,159 +0,0 @@
|
|
|
1
|
-
import { c as $ } from "./index-Bw3sTXPI.js";
|
|
2
|
-
function M(s, n, e, r = "children") {
|
|
3
|
-
var l;
|
|
4
|
-
for (const t of s) {
|
|
5
|
-
if (t[n] === e)
|
|
6
|
-
return t;
|
|
7
|
-
if (t[r] && ((l = t[r]) == null ? void 0 : l.length) > 0) {
|
|
8
|
-
const o = M(t[r], n, e);
|
|
9
|
-
if (o)
|
|
10
|
-
return o;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
function q(s, n) {
|
|
16
|
-
const e = n.split("/");
|
|
17
|
-
let r = s, l = null;
|
|
18
|
-
for (let t of e) {
|
|
19
|
-
const o = r.find((f) => f.title === t);
|
|
20
|
-
if (!o)
|
|
21
|
-
return null;
|
|
22
|
-
l || (l = o), r = o.children ?? [];
|
|
23
|
-
}
|
|
24
|
-
return l;
|
|
25
|
-
}
|
|
26
|
-
const j = (s) => {
|
|
27
|
-
var e;
|
|
28
|
-
const n = s;
|
|
29
|
-
return n.children = (e = n.children) == null ? void 0 : e.map((r) => {
|
|
30
|
-
var l;
|
|
31
|
-
return (l = r == null ? void 0 : r.title) != null && l.children ? r == null ? void 0 : r.title : r;
|
|
32
|
-
}), n;
|
|
33
|
-
}, F = (s) => {
|
|
34
|
-
var n, e, r;
|
|
35
|
-
return Array.isArray(s == null ? void 0 : s.title) && ((n = s == null ? void 0 : s.title) == null ? void 0 : n.length) === ((r = (e = s == null ? void 0 : s.title) == null ? void 0 : e.filter((l) => l.title)) == null ? void 0 : r.length) ? s == null ? void 0 : s.title : Array.isArray(s == null ? void 0 : s.children) ? j(s) : s;
|
|
36
|
-
}, T = (s, n) => {
|
|
37
|
-
const e = n, r = [];
|
|
38
|
-
s == null || s.forEach((t) => {
|
|
39
|
-
Array.isArray(t) ? r.push({ children: T(t, []) }) : r.push({ title: t });
|
|
40
|
-
});
|
|
41
|
-
let l = r.reduce((t, o) => (Object.entries(o).forEach(([f, h]) => {
|
|
42
|
-
t[f] === void 0 ? h != null && h.title ? t[f] = [h] : t[f] = h : (Array.isArray(t[f]) || (t[f] = [{ title: t[f] }]), h != null && h.title || Array.isArray(h) ? t[f].push(h) : t[f].push({ title: h }));
|
|
43
|
-
}), t), {});
|
|
44
|
-
return l = F($(l)), e.push(l), Array.isArray(e) && (e == null ? void 0 : e.length) > 1 ? e : e == null ? void 0 : e[0];
|
|
45
|
-
}, z = (s) => {
|
|
46
|
-
let n = [], e = [];
|
|
47
|
-
return s == null || s.forEach((r) => {
|
|
48
|
-
n = T(r, e);
|
|
49
|
-
}), n;
|
|
50
|
-
}, R = (s, n) => {
|
|
51
|
-
const e = {};
|
|
52
|
-
return Object.keys(s).forEach((r) => {
|
|
53
|
-
n.includes(r) || (e[r] = s[r]), r === "id" && (e.prop = s.id);
|
|
54
|
-
}), e;
|
|
55
|
-
}, B = (s, n) => !s || !Array.isArray(s) ? [] : s.map((e) => {
|
|
56
|
-
const r = R(e, n);
|
|
57
|
-
return r.children && Array.isArray(r.children) && (r.children = B(r.children, n)), r;
|
|
58
|
-
}), I = (s, n = 0) => s == null ? void 0 : s.map((e) => {
|
|
59
|
-
const r = {
|
|
60
|
-
...e,
|
|
61
|
-
level: n
|
|
62
|
-
};
|
|
63
|
-
return r.children && r.children.length > 0 && (r.children = I(r.children, n + 1)), r;
|
|
64
|
-
}), G = (s, n = "id", e = "path", r = "name") => {
|
|
65
|
-
if (!s || !Array.isArray(s) || s.length === 0) return [];
|
|
66
|
-
const l = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), o = s[0] || {};
|
|
67
|
-
s.forEach((i) => {
|
|
68
|
-
const u = {
|
|
69
|
-
...i,
|
|
70
|
-
children: [],
|
|
71
|
-
comp: (i == null ? void 0 : i.comp) || "ParentItem"
|
|
72
|
-
//兼容showItems
|
|
73
|
-
};
|
|
74
|
-
l.set(i[n], u), i[e] && t.set(i[e], u);
|
|
75
|
-
});
|
|
76
|
-
const f = [...s].sort((i, u) => {
|
|
77
|
-
var c, d;
|
|
78
|
-
const g = (((c = i[e]) == null ? void 0 : c.match(/\//g)) || []).length, y = (((d = u[e]) == null ? void 0 : d.match(/\//g)) || []).length;
|
|
79
|
-
return g - y;
|
|
80
|
-
}), h = [], O = (i, u = "") => {
|
|
81
|
-
const g = u ? `${u}/${i}` : i, y = `virtual_${i}`, c = {
|
|
82
|
-
...JSON.parse(JSON.stringify(o)),
|
|
83
|
-
[n]: y,
|
|
84
|
-
[r]: i,
|
|
85
|
-
[e]: g,
|
|
86
|
-
groupName: i,
|
|
87
|
-
nameObj: {
|
|
88
|
-
name0: i
|
|
89
|
-
},
|
|
90
|
-
hasContent: 0,
|
|
91
|
-
children: [],
|
|
92
|
-
data: [],
|
|
93
|
-
isVirtual: !0,
|
|
94
|
-
// 标记为虚拟节点
|
|
95
|
-
comp: "ParentItem"
|
|
96
|
-
//兼容showItems
|
|
97
|
-
};
|
|
98
|
-
return g.split("/").forEach((a, A) => {
|
|
99
|
-
c.nameObj[`name${A}`] = a;
|
|
100
|
-
}), l.set(y, c), t.set(g, c), c;
|
|
101
|
-
};
|
|
102
|
-
f.forEach((i) => {
|
|
103
|
-
let u = l.get(i[n]);
|
|
104
|
-
const g = i[e], y = i[r];
|
|
105
|
-
if (!g || g === y) {
|
|
106
|
-
h.push(u);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const c = g.split("/");
|
|
110
|
-
let d = null;
|
|
111
|
-
for (let a = c.length - 1; a > 0; a--) {
|
|
112
|
-
const A = c.slice(0, a).join("/");
|
|
113
|
-
if (d = t.get(A), d) break;
|
|
114
|
-
}
|
|
115
|
-
if (!d && c.length > 1 && !(i != null && i.groupId)) {
|
|
116
|
-
let a = "", A = null;
|
|
117
|
-
for (let N = 0; N < c.length - 1; N++) {
|
|
118
|
-
const E = c[N];
|
|
119
|
-
a = a ? `${a}/${E}` : E;
|
|
120
|
-
let p = t.get(a);
|
|
121
|
-
if (!p) {
|
|
122
|
-
const b = N > 0 ? c.slice(0, N).join("/") : "";
|
|
123
|
-
t.get(E) || (p = O(E, b));
|
|
124
|
-
}
|
|
125
|
-
A ? A.children.some((b) => b[n] === p[n]) || A.children.push(p) : h.some((b) => b[n] === p[n]) || h.push(p), A = p;
|
|
126
|
-
}
|
|
127
|
-
d = A;
|
|
128
|
-
}
|
|
129
|
-
d ? d.children.some((a) => a[n] === u[n]) || d.children.push(u) : h.some((a) => a[n] === u[n]) || h.push(u);
|
|
130
|
-
});
|
|
131
|
-
const w = (i) => i.filter((u) => (u.children && (u.children = w(u.children)), !0)), S = w(h);
|
|
132
|
-
return I(S);
|
|
133
|
-
}, J = (s, n) => {
|
|
134
|
-
var e;
|
|
135
|
-
return Array.isArray(s) ? (e = s == null ? void 0 : s.map((r) => {
|
|
136
|
-
const l = { ...r };
|
|
137
|
-
return l.children && Array.isArray(l.children) && (l.children = J(l.children, n)), l;
|
|
138
|
-
})) == null ? void 0 : e.filter((r) => !((r == null ? void 0 : r[n]) && Array.isArray(r == null ? void 0 : r[n]) && (r == null ? void 0 : r[n].length) > 0)) : [];
|
|
139
|
-
}, L = (s, n, e = "id", r = "children") => {
|
|
140
|
-
if (!Array.isArray(s)) return null;
|
|
141
|
-
for (const l of s)
|
|
142
|
-
if (l[r] && Array.isArray(l[r])) {
|
|
143
|
-
if (l[r].find((f) => f[e] === n))
|
|
144
|
-
return l;
|
|
145
|
-
const o = L(l[r], n, e, r);
|
|
146
|
-
if (o)
|
|
147
|
-
return o;
|
|
148
|
-
}
|
|
149
|
-
return null;
|
|
150
|
-
};
|
|
151
|
-
export {
|
|
152
|
-
J as a,
|
|
153
|
-
G as b,
|
|
154
|
-
z as c,
|
|
155
|
-
B as d,
|
|
156
|
-
q as e,
|
|
157
|
-
M as f,
|
|
158
|
-
L as g
|
|
159
|
-
};
|