@szjy/ai-coms 0.1.6 → 0.1.8
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/README.md +116 -13
- package/dist/index.mjs +455 -433
- package/dist/index.umd.js +2 -2
- package/dist/packages/api/ai.d.ts +7 -7
- package/dist/packages/components/AiChat/src/index.vue.d.ts +17 -0
- package/dist/packages/components/AiChat/src/transform/index.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { computed as q, openBlock as P, createElementBlock as L, normalizeStyle as K, createElementVNode as x, normalizeClass as W, getCurrentInstance as re, ref as C, watch as ue, onUnmounted as de, createBlock as J, Transition as oe, withCtx as M, createVNode as
|
|
1
|
+
import { computed as q, openBlock as P, createElementBlock as L, normalizeStyle as K, createElementVNode as x, normalizeClass as W, getCurrentInstance as re, ref as C, watch as ue, onUnmounted as de, createBlock as J, Transition as oe, withCtx as M, createVNode as E, createCommentVNode as B, nextTick as ae, resolveComponent as X, toDisplayString as D, createTextVNode as fe, Fragment as Y, renderList as Z, withKeys as pe, defineComponent as me, withModifiers as he } from "vue";
|
|
2
2
|
const ve = "/images/ai-round.png", ye = "/images/ai-sqrt.png", ge = "/images/bars-loading.svg";
|
|
3
3
|
function se(t) {
|
|
4
4
|
return t.startsWith("http://") || t.startsWith("https://") ? t : `${location.protocol}//${location.host}${t}`;
|
|
5
5
|
}
|
|
6
|
-
async function be(t, n,
|
|
7
|
-
const r = se(
|
|
6
|
+
async function be(t, n, s, l = "", r = {}) {
|
|
7
|
+
const { projectId: e } = r, o = se(l), u = new URL(`${o}/v1/chat/completions`), d = (r == null ? void 0 : r.authToken) || "app-oLZVFFdYyJX2QK3rdOLWsC2u";
|
|
8
|
+
r != null && r.authToken || console.error("缺少 authToken!现在默认使用内网的 authToken");
|
|
9
|
+
const y = new Request(u, {
|
|
8
10
|
method: "post",
|
|
9
11
|
headers: {
|
|
10
12
|
"Content-Type": "application/json",
|
|
11
|
-
Authorization:
|
|
13
|
+
Authorization: `Bearer ${d}`
|
|
12
14
|
},
|
|
13
15
|
body: JSON.stringify({
|
|
14
16
|
model: "dify",
|
|
15
17
|
stream: !0,
|
|
16
18
|
inputs: {
|
|
17
|
-
token: n
|
|
19
|
+
token: n,
|
|
20
|
+
projectCode: s,
|
|
21
|
+
...e ? { projectId: e } : {}
|
|
18
22
|
},
|
|
19
23
|
messages: [
|
|
20
24
|
{
|
|
@@ -28,14 +32,14 @@ async function be(t, n, a, s = "") {
|
|
|
28
32
|
]
|
|
29
33
|
})
|
|
30
34
|
});
|
|
31
|
-
return fetch(
|
|
35
|
+
return fetch(y);
|
|
32
36
|
}
|
|
33
|
-
async function we(t) {
|
|
34
|
-
const
|
|
35
|
-
Object.keys(
|
|
36
|
-
|
|
37
|
+
async function we(t, n, s, l = "", r = {}) {
|
|
38
|
+
const e = new URL("http://localhost:11434/api/chat"), o = {};
|
|
39
|
+
Object.keys(o).forEach((d) => {
|
|
40
|
+
e.searchParams.append(d, o[d]);
|
|
37
41
|
});
|
|
38
|
-
const
|
|
42
|
+
const u = new Request(e, {
|
|
39
43
|
mode: "cors",
|
|
40
44
|
method: "post",
|
|
41
45
|
headers: {
|
|
@@ -56,14 +60,14 @@ async function we(t) {
|
|
|
56
60
|
]
|
|
57
61
|
})
|
|
58
62
|
});
|
|
59
|
-
return fetch(
|
|
63
|
+
return fetch(u);
|
|
60
64
|
}
|
|
61
|
-
async function xe(t, n) {
|
|
62
|
-
const
|
|
63
|
-
Object.keys(
|
|
64
|
-
|
|
65
|
+
async function xe(t, n, s, l = "", r = {}) {
|
|
66
|
+
const e = new URL(`${location.origin}/spark/v1/chat/completions`), o = {};
|
|
67
|
+
Object.keys(o).forEach((d) => {
|
|
68
|
+
e.searchParams.append(d, o[d]);
|
|
65
69
|
});
|
|
66
|
-
const
|
|
70
|
+
const u = new Request(e, {
|
|
67
71
|
method: "post",
|
|
68
72
|
headers: {
|
|
69
73
|
"Content-Type": "application/json",
|
|
@@ -80,14 +84,14 @@ async function xe(t, n) {
|
|
|
80
84
|
]
|
|
81
85
|
})
|
|
82
86
|
});
|
|
83
|
-
return fetch(
|
|
87
|
+
return fetch(u);
|
|
84
88
|
}
|
|
85
|
-
async function
|
|
86
|
-
const
|
|
87
|
-
Object.keys(
|
|
88
|
-
|
|
89
|
+
async function ke(t, n, s, l = "", r = {}) {
|
|
90
|
+
const e = new URL(`${location.origin}/siliconflow/v1/chat/completions`), o = {};
|
|
91
|
+
Object.keys(o).forEach((d) => {
|
|
92
|
+
e.searchParams.append(d, o[d]);
|
|
89
93
|
});
|
|
90
|
-
const
|
|
94
|
+
const u = new Request(e, {
|
|
91
95
|
method: "post",
|
|
92
96
|
headers: {
|
|
93
97
|
"Content-Type": "application/json",
|
|
@@ -105,14 +109,14 @@ async function Se(t, n) {
|
|
|
105
109
|
]
|
|
106
110
|
})
|
|
107
111
|
});
|
|
108
|
-
return fetch(
|
|
112
|
+
return fetch(u);
|
|
109
113
|
}
|
|
110
|
-
async function
|
|
111
|
-
const
|
|
112
|
-
Object.keys(
|
|
113
|
-
|
|
114
|
+
async function Se(t, n, s, l = "", r = {}) {
|
|
115
|
+
const e = new URL(`${location.origin}/moonshot/v1/chat/completions`), o = {};
|
|
116
|
+
Object.keys(o).forEach((d) => {
|
|
117
|
+
e.searchParams.append(d, o[d]);
|
|
114
118
|
});
|
|
115
|
-
const
|
|
119
|
+
const u = new Request(e, {
|
|
116
120
|
method: "post",
|
|
117
121
|
headers: {
|
|
118
122
|
"Content-Type": "application/json",
|
|
@@ -133,14 +137,14 @@ async function ke(t, n) {
|
|
|
133
137
|
]
|
|
134
138
|
})
|
|
135
139
|
});
|
|
136
|
-
return fetch(
|
|
140
|
+
return fetch(u);
|
|
137
141
|
}
|
|
138
|
-
async function _e(t, n) {
|
|
139
|
-
const
|
|
140
|
-
Object.keys(
|
|
141
|
-
|
|
142
|
+
async function _e(t, n, s, l = "", r = {}) {
|
|
143
|
+
const e = new URL(`${location.origin}/dashscope/compatible-mode/v1/chat/completions`), o = {};
|
|
144
|
+
Object.keys(o).forEach((d) => {
|
|
145
|
+
e.searchParams.append(d, o[d]);
|
|
142
146
|
});
|
|
143
|
-
const
|
|
147
|
+
const u = new Request(e, {
|
|
144
148
|
method: "post",
|
|
145
149
|
headers: {
|
|
146
150
|
"Content-Type": "application/json",
|
|
@@ -161,14 +165,14 @@ async function _e(t, n) {
|
|
|
161
165
|
]
|
|
162
166
|
})
|
|
163
167
|
});
|
|
164
|
-
return fetch(
|
|
168
|
+
return fetch(u);
|
|
165
169
|
}
|
|
166
|
-
async function Ce(t, n,
|
|
167
|
-
const
|
|
168
|
-
Object.keys(
|
|
169
|
-
|
|
170
|
+
async function Ce(t, n, s, l = "", r = {}) {
|
|
171
|
+
const e = se(l), o = new URL(`${e}/support/${s}/a`), u = {};
|
|
172
|
+
Object.keys(u).forEach((y) => {
|
|
173
|
+
o.searchParams.append(y, u[y]);
|
|
170
174
|
});
|
|
171
|
-
const
|
|
175
|
+
const d = new Request(o, {
|
|
172
176
|
method: "post",
|
|
173
177
|
headers: {
|
|
174
178
|
"Content-Type": "application/json",
|
|
@@ -178,9 +182,9 @@ async function Ce(t, n, a, s = "") {
|
|
|
178
182
|
content: t
|
|
179
183
|
})
|
|
180
184
|
});
|
|
181
|
-
return fetch(
|
|
185
|
+
return fetch(d);
|
|
182
186
|
}
|
|
183
|
-
const
|
|
187
|
+
const Te = (t) => {
|
|
184
188
|
if (t.startsWith("data:")) {
|
|
185
189
|
const n = t.substring(5).trim();
|
|
186
190
|
if (n === "[DONE]")
|
|
@@ -189,8 +193,8 @@ const Re = (t) => {
|
|
|
189
193
|
};
|
|
190
194
|
try {
|
|
191
195
|
return JSON.parse(n);
|
|
192
|
-
} catch (
|
|
193
|
-
console.error("JSON parsing error:",
|
|
196
|
+
} catch (s) {
|
|
197
|
+
console.error("JSON parsing error:", s);
|
|
194
198
|
}
|
|
195
199
|
}
|
|
196
200
|
return null;
|
|
@@ -213,12 +217,12 @@ const Re = (t) => {
|
|
|
213
217
|
{
|
|
214
218
|
label: "SiliconFlow 硅基流动大模型",
|
|
215
219
|
modelName: "siliconflow",
|
|
216
|
-
api:
|
|
220
|
+
api: ke
|
|
217
221
|
},
|
|
218
222
|
{
|
|
219
223
|
label: "Kimi Moonshot 月之暗面大模型",
|
|
220
224
|
modelName: "moonshot",
|
|
221
|
-
api:
|
|
225
|
+
api: Se
|
|
222
226
|
},
|
|
223
227
|
{
|
|
224
228
|
label: "通义千问大模型",
|
|
@@ -237,15 +241,15 @@ const Re = (t) => {
|
|
|
237
241
|
}
|
|
238
242
|
], ee = {
|
|
239
243
|
standard(t, n) {
|
|
240
|
-
let
|
|
241
|
-
return t instanceof Uint8Array ?
|
|
244
|
+
let s = "";
|
|
245
|
+
return t instanceof Uint8Array ? s = n.decode(t, {
|
|
242
246
|
stream: !0
|
|
243
|
-
}) :
|
|
244
|
-
content:
|
|
247
|
+
}) : s = t, {
|
|
248
|
+
content: s
|
|
245
249
|
};
|
|
246
250
|
},
|
|
247
251
|
spark(t) {
|
|
248
|
-
const n =
|
|
252
|
+
const n = Te(t);
|
|
249
253
|
return n.done ? {
|
|
250
254
|
done: !0
|
|
251
255
|
} : {
|
|
@@ -272,47 +276,47 @@ const Re = (t) => {
|
|
|
272
276
|
content: JSON.parse(t).message.content
|
|
273
277
|
};
|
|
274
278
|
}
|
|
275
|
-
}, te = (t, n,
|
|
276
|
-
const
|
|
277
|
-
return
|
|
279
|
+
}, te = (t, n, s) => {
|
|
280
|
+
const l = t.split(s);
|
|
281
|
+
return l.slice(0, -1).forEach((r) => {
|
|
278
282
|
r.trim() !== "" && n.enqueue(r);
|
|
279
|
-
}),
|
|
280
|
-
},
|
|
283
|
+
}), l[l.length - 1];
|
|
284
|
+
}, Re = (t) => {
|
|
281
285
|
let n = "";
|
|
282
286
|
return new TransformStream({
|
|
283
|
-
transform(
|
|
284
|
-
if (n +=
|
|
285
|
-
n = te(n,
|
|
287
|
+
transform(s, l) {
|
|
288
|
+
if (n += s, n.trim().startsWith("data:"))
|
|
289
|
+
n = te(n, l, t);
|
|
286
290
|
else
|
|
287
291
|
try {
|
|
288
|
-
JSON.parse(n), n = te(n,
|
|
292
|
+
JSON.parse(n), n = te(n, l, t);
|
|
289
293
|
} catch {
|
|
290
|
-
|
|
294
|
+
l.enqueue(s), n = "";
|
|
291
295
|
}
|
|
292
296
|
},
|
|
293
|
-
flush(
|
|
294
|
-
n.trim() !== "" &&
|
|
297
|
+
flush(s) {
|
|
298
|
+
n.trim() !== "" && s.enqueue(n);
|
|
295
299
|
}
|
|
296
300
|
});
|
|
297
301
|
};
|
|
298
302
|
async function Pe(t, n) {
|
|
299
|
-
const
|
|
300
|
-
return
|
|
301
|
-
|
|
303
|
+
const s = t.api;
|
|
304
|
+
return s ? new Promise((l) => {
|
|
305
|
+
s(n.text, n.token, n.identifier, n.baseUrl, n.extraConfig).then((r) => {
|
|
302
306
|
if (r.body) {
|
|
303
|
-
const e = r.body.pipeThrough(new TextDecoderStream()).pipeThrough(
|
|
307
|
+
const e = r.body.pipeThrough(new TextDecoderStream()).pipeThrough(Re(`
|
|
304
308
|
`)).getReader();
|
|
305
|
-
console.log("reader from response:", e),
|
|
309
|
+
console.log("reader from response:", e), l({
|
|
306
310
|
error: 0,
|
|
307
311
|
reader: e
|
|
308
312
|
});
|
|
309
313
|
} else
|
|
310
|
-
|
|
314
|
+
l({
|
|
311
315
|
error: 1,
|
|
312
316
|
reader: null
|
|
313
317
|
});
|
|
314
318
|
}).catch((r) => {
|
|
315
|
-
|
|
319
|
+
l({
|
|
316
320
|
error: 1,
|
|
317
321
|
reader: null
|
|
318
322
|
});
|
|
@@ -331,10 +335,10 @@ function Ne() {
|
|
|
331
335
|
}) : console.log("markdownit is not loaded"), F);
|
|
332
336
|
}
|
|
333
337
|
const le = (t, n) => {
|
|
334
|
-
const
|
|
335
|
-
for (const [
|
|
336
|
-
|
|
337
|
-
return
|
|
338
|
+
const s = t.__vccOpts || t;
|
|
339
|
+
for (const [l, r] of n)
|
|
340
|
+
s[l] = r;
|
|
341
|
+
return s;
|
|
338
342
|
}, Oe = ["src", "alt"], Le = {
|
|
339
343
|
__name: "SvgIcon",
|
|
340
344
|
props: {
|
|
@@ -365,12 +369,12 @@ const le = (t, n) => {
|
|
|
365
369
|
}
|
|
366
370
|
},
|
|
367
371
|
setup(t) {
|
|
368
|
-
const n = t,
|
|
372
|
+
const n = t, s = q(() => {
|
|
369
373
|
if (n.name.startsWith("http://") || n.name.startsWith("https://") || n.name.startsWith("/"))
|
|
370
374
|
return n.name;
|
|
371
375
|
const e = n.name.endsWith(".svg") ? n.name : `${n.name}.svg`;
|
|
372
376
|
return `${n.basePath}${e}`;
|
|
373
|
-
}),
|
|
377
|
+
}), l = q(() => {
|
|
374
378
|
const e = typeof n.size == "number" ? `${n.size}px` : n.size;
|
|
375
379
|
return {
|
|
376
380
|
width: e,
|
|
@@ -386,26 +390,26 @@ const le = (t, n) => {
|
|
|
386
390
|
};
|
|
387
391
|
return n.color && (e.filter = `drop-shadow(0 0 0 ${n.color})`), e;
|
|
388
392
|
});
|
|
389
|
-
return (e,
|
|
393
|
+
return (e, o) => (P(), L("div", {
|
|
390
394
|
class: "svg-icon-wrapper",
|
|
391
|
-
style: K(
|
|
395
|
+
style: K(l.value)
|
|
392
396
|
}, [
|
|
393
397
|
x("img", {
|
|
394
|
-
src:
|
|
398
|
+
src: s.value,
|
|
395
399
|
alt: t.name,
|
|
396
400
|
class: W(["svg-icon", t.className]),
|
|
397
401
|
style: K(r.value)
|
|
398
402
|
}, null, 14, Oe)
|
|
399
403
|
], 4));
|
|
400
404
|
}
|
|
401
|
-
}, V = /* @__PURE__ */ le(Le, [["__scopeId", "data-v-490b11c1"]]),
|
|
405
|
+
}, V = /* @__PURE__ */ le(Le, [["__scopeId", "data-v-490b11c1"]]), je = async (t) => {
|
|
402
406
|
if (navigator.clipboard && navigator.permissions)
|
|
403
407
|
await navigator.clipboard.writeText(t);
|
|
404
408
|
else {
|
|
405
409
|
const n = document.createElement("textArea");
|
|
406
410
|
n.value = t, n.style.width = 0, n.style.position = "fixed", n.style.left = "-999px", n.style.top = "10px", n.setAttribute("readonly", "readonly"), document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
|
|
407
411
|
}
|
|
408
|
-
},
|
|
412
|
+
}, ze = ["innerHTML"], Ue = {
|
|
409
413
|
__name: "Previewer",
|
|
410
414
|
props: {
|
|
411
415
|
reader: null,
|
|
@@ -422,78 +426,78 @@ const le = (t, n) => {
|
|
|
422
426
|
"completed",
|
|
423
427
|
"updating"
|
|
424
428
|
],
|
|
425
|
-
setup(t, { expose: n, emit:
|
|
426
|
-
const { appContext:
|
|
427
|
-
let
|
|
428
|
-
const
|
|
429
|
-
e.reader && e.reader.cancel(),
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
429
|
+
setup(t, { expose: n, emit: s }) {
|
|
430
|
+
const { appContext: l } = re(), { $message: r } = l.config.globalProperties, e = t, o = C(e.displayText || ""), u = C(""), d = C(!0), y = C(!1), _ = C(!!e.displayText), U = s, N = C(null);
|
|
431
|
+
let T = null;
|
|
432
|
+
const A = q(() => F ? F.render(o.value) : o.value), I = () => {
|
|
433
|
+
e.reader && e.reader.cancel(), y.value = !0, c.value = !1, p(), _.value = !0, U("completed", o.value), d.value = !1, T && (cancelAnimationFrame(T), T = null);
|
|
434
|
+
}, j = q(() => `${A.value}`), m = C(!1), f = () => {
|
|
435
|
+
m.value = !0;
|
|
436
|
+
}, p = () => {
|
|
437
|
+
m.value = !1;
|
|
434
438
|
}, c = C(!1), i = async () => {
|
|
435
439
|
if (!e.reader) return;
|
|
436
|
-
const
|
|
437
|
-
for (
|
|
440
|
+
const b = new TextDecoder("utf-8");
|
|
441
|
+
for (d.value = !0; !y.value; )
|
|
438
442
|
try {
|
|
439
443
|
if (!e.reader) {
|
|
440
444
|
c.value = !0;
|
|
441
445
|
break;
|
|
442
446
|
}
|
|
443
|
-
const { value:
|
|
447
|
+
const { value: a, done: g } = await e.reader.read();
|
|
444
448
|
if (!e.reader) {
|
|
445
449
|
c.value = !0;
|
|
446
450
|
break;
|
|
447
451
|
}
|
|
448
|
-
if (
|
|
452
|
+
if (g) {
|
|
449
453
|
c.value = !0;
|
|
450
454
|
break;
|
|
451
455
|
}
|
|
452
|
-
const
|
|
453
|
-
if (!
|
|
456
|
+
const S = ee[e.model];
|
|
457
|
+
if (!S)
|
|
454
458
|
break;
|
|
455
|
-
const O =
|
|
459
|
+
const O = S.call(ee, a, b);
|
|
456
460
|
if (O.done) {
|
|
457
461
|
c.value = !0;
|
|
458
462
|
break;
|
|
459
463
|
}
|
|
460
|
-
|
|
461
|
-
} catch (
|
|
462
|
-
c.value = !0, console.log(3333,
|
|
464
|
+
u.value += O.content, T === null && k();
|
|
465
|
+
} catch (a) {
|
|
466
|
+
c.value = !0, console.log(3333, a), U("failed", a), I();
|
|
463
467
|
break;
|
|
464
468
|
} finally {
|
|
465
|
-
|
|
469
|
+
p();
|
|
466
470
|
}
|
|
467
471
|
}, h = async () => {
|
|
468
472
|
e.scrollToBottomFn && e.scrollToBottomFn();
|
|
469
|
-
}, v = (
|
|
470
|
-
},
|
|
473
|
+
}, v = (b = () => {
|
|
474
|
+
}, a = () => {
|
|
471
475
|
}) => {
|
|
472
|
-
if (
|
|
473
|
-
const
|
|
474
|
-
|
|
476
|
+
if (u.value.length > 0) {
|
|
477
|
+
const g = u.value.substring(0, 10);
|
|
478
|
+
o.value += g, u.value = u.value.substring(10), b();
|
|
475
479
|
} else
|
|
476
|
-
|
|
477
|
-
},
|
|
478
|
-
if (
|
|
479
|
-
cancelAnimationFrame(
|
|
480
|
+
a();
|
|
481
|
+
}, k = () => {
|
|
482
|
+
if (y.value && T) {
|
|
483
|
+
cancelAnimationFrame(T), T = null, d.value = !1;
|
|
480
484
|
return;
|
|
481
485
|
}
|
|
482
486
|
c.value ? v(
|
|
483
487
|
() => {
|
|
484
|
-
|
|
488
|
+
T = requestAnimationFrame(k), U("updating", null);
|
|
485
489
|
},
|
|
486
490
|
() => {
|
|
487
|
-
|
|
491
|
+
U("completed", o.value), d.value = !1, _.value = !0, ae(() => {
|
|
488
492
|
if (c.value = !1, e.messagePostRender && N.value)
|
|
489
493
|
try {
|
|
490
|
-
e.messagePostRender(N.value,
|
|
491
|
-
} catch (
|
|
492
|
-
console.error("messagePostRender 执行失败:",
|
|
494
|
+
e.messagePostRender(N.value, o.value);
|
|
495
|
+
} catch (b) {
|
|
496
|
+
console.error("messagePostRender 执行失败:", b);
|
|
493
497
|
}
|
|
494
|
-
}),
|
|
498
|
+
}), T = null;
|
|
495
499
|
}
|
|
496
|
-
) : (v(),
|
|
500
|
+
) : (v(), T = requestAnimationFrame(k)), h();
|
|
497
501
|
};
|
|
498
502
|
ue(
|
|
499
503
|
() => e.reader,
|
|
@@ -505,23 +509,23 @@ const le = (t, n) => {
|
|
|
505
509
|
deep: !0
|
|
506
510
|
}
|
|
507
511
|
), de(() => {
|
|
508
|
-
|
|
512
|
+
I();
|
|
509
513
|
}), n({
|
|
510
|
-
abortReader:
|
|
511
|
-
initializeStart:
|
|
512
|
-
initializeEnd:
|
|
513
|
-
}), q(() =>
|
|
514
|
+
abortReader: I,
|
|
515
|
+
initializeStart: f,
|
|
516
|
+
initializeEnd: p
|
|
517
|
+
}), q(() => m.value ? !0 : (!e.reader || !d || o.value, !1));
|
|
514
518
|
const w = async () => {
|
|
515
519
|
try {
|
|
516
|
-
const
|
|
517
|
-
await
|
|
518
|
-
} catch (
|
|
519
|
-
console.error("复制失败:",
|
|
520
|
+
const b = o.value;
|
|
521
|
+
await je(b), r.success("复制成功");
|
|
522
|
+
} catch (b) {
|
|
523
|
+
console.error("复制失败:", b), r.error("复制失败");
|
|
520
524
|
}
|
|
521
525
|
};
|
|
522
|
-
return (
|
|
526
|
+
return (b, a) => (P(), J(oe, { name: "fade" }, {
|
|
523
527
|
default: M(() => [
|
|
524
|
-
|
|
528
|
+
j.value ? (P(), L("div", {
|
|
525
529
|
key: 0,
|
|
526
530
|
ref_key: "refWrapperContent",
|
|
527
531
|
ref: N,
|
|
@@ -531,25 +535,25 @@ const le = (t, n) => {
|
|
|
531
535
|
}, [
|
|
532
536
|
x("div", {
|
|
533
537
|
class: "markdown-wrapper",
|
|
534
|
-
innerHTML:
|
|
535
|
-
}, null, 8,
|
|
538
|
+
innerHTML: j.value
|
|
539
|
+
}, null, 8, ze),
|
|
536
540
|
_.value ? (P(), L("div", {
|
|
537
541
|
key: 0,
|
|
538
542
|
class: "ai-copy-btn-wrapper",
|
|
539
543
|
onClick: w
|
|
540
544
|
}, [
|
|
541
|
-
|
|
545
|
+
E(V, {
|
|
542
546
|
name: "/images/svg/copy.svg",
|
|
543
547
|
color: "#666666"
|
|
544
548
|
}),
|
|
545
|
-
|
|
549
|
+
a[0] || (a[0] = x("span", { class: "copy-text" }, "复制", -1))
|
|
546
550
|
])) : B("", !0)
|
|
547
551
|
], 512)) : B("", !0)
|
|
548
552
|
]),
|
|
549
553
|
_: 1
|
|
550
554
|
}));
|
|
551
555
|
}
|
|
552
|
-
},
|
|
556
|
+
}, Ie = { class: "panel-header" }, $e = { class: "header-actions" }, Ee = { class: "header-title" }, Ae = { class: "action-icons" }, qe = { class: "body-content" }, Me = {
|
|
553
557
|
key: 0,
|
|
554
558
|
class: "welcome-content"
|
|
555
559
|
}, Fe = { class: "subtitle" }, Be = { class: "highlight" }, De = { class: "quick-questions" }, Ve = ["onClick"], We = {
|
|
@@ -594,110 +598,119 @@ const le = (t, n) => {
|
|
|
594
598
|
messagePostRender: {
|
|
595
599
|
type: Function,
|
|
596
600
|
default: null
|
|
601
|
+
},
|
|
602
|
+
/**
|
|
603
|
+
* 额外配置参数,用于扩展供应商 API 调用
|
|
604
|
+
* 例如:{ projectId: 'xxx' } 供 Dify 等供应商使用
|
|
605
|
+
*/
|
|
606
|
+
extraConfig: {
|
|
607
|
+
type: Object,
|
|
608
|
+
default: () => ({})
|
|
597
609
|
}
|
|
598
610
|
},
|
|
599
611
|
emits: ["update:modelValue", "submit"],
|
|
600
612
|
setup(t, { emit: n }) {
|
|
601
|
-
const { appContext:
|
|
613
|
+
const { appContext: s } = re(), { $message: l } = s.config.globalProperties, r = t, e = q(() => G.find((a) => a.modelName === r.llmName) ?? G.find((a) => a.modelName === "szjy")), o = n, u = C(""), d = C(null), y = C(!1), _ = C([]), U = C([
|
|
602
614
|
"什么是AI助理,能做什么?",
|
|
603
615
|
"当前项目的基本情况?",
|
|
604
616
|
"当前项目的进度情况?",
|
|
605
617
|
"当前项目的参建方有哪些?",
|
|
606
618
|
"数智建管平台有哪些功能?能做什么?"
|
|
607
|
-
]), N = C([]),
|
|
619
|
+
]), N = C([]), T = C(!1), A = C(null), I = () => {
|
|
608
620
|
ae(() => {
|
|
609
|
-
if (
|
|
610
|
-
const
|
|
611
|
-
|
|
612
|
-
top:
|
|
621
|
+
if (A.value) {
|
|
622
|
+
const a = A.value, g = a.scrollHeight, S = a.scrollTop, O = a.clientHeight;
|
|
623
|
+
g - S - O < 100 ? a.scrollTop = g : a.scrollTo({
|
|
624
|
+
top: g
|
|
613
625
|
});
|
|
614
626
|
}
|
|
615
627
|
});
|
|
616
|
-
},
|
|
617
|
-
console.log("onFailedReader",
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
628
|
+
}, j = C(!1), m = q(() => j.value ? "/images/ai-stop.png" : "/images/ai-send.png"), f = (a, g) => {
|
|
629
|
+
console.log("onFailedReader", a, g), T.value = !1;
|
|
630
|
+
const S = w();
|
|
631
|
+
S && S.initializeEnd(), l.error("转换失败,请重试"), j.value = !1, setTimeout(() => {
|
|
632
|
+
d.value && d.value.focus();
|
|
621
633
|
});
|
|
622
|
-
},
|
|
623
|
-
|
|
624
|
-
|
|
634
|
+
}, p = (a, g) => {
|
|
635
|
+
T.value = !1, j.value = !1, I(), g && _.value[a] && (_.value[a].displayText = g), setTimeout(() => {
|
|
636
|
+
d.value && d.value.focus();
|
|
625
637
|
});
|
|
626
|
-
}, c = (
|
|
627
|
-
|
|
638
|
+
}, c = (a) => {
|
|
639
|
+
j.value = !0;
|
|
628
640
|
}, i = () => {
|
|
629
|
-
|
|
641
|
+
j.value = !1, o("update:modelValue", !1), y.value = !1, _.value = [];
|
|
630
642
|
}, h = C(!1), v = () => {
|
|
631
643
|
h.value = !h.value;
|
|
632
|
-
},
|
|
633
|
-
|
|
644
|
+
}, k = (a) => {
|
|
645
|
+
u.value = a, b();
|
|
634
646
|
}, w = () => {
|
|
635
|
-
for (let
|
|
636
|
-
if (N.value[
|
|
637
|
-
return N.value[
|
|
647
|
+
for (let a = N.value.length - 1; a >= 0; a--)
|
|
648
|
+
if (N.value[a])
|
|
649
|
+
return N.value[a];
|
|
638
650
|
return null;
|
|
639
|
-
},
|
|
640
|
-
if (console.log("stylizingLoading:",
|
|
641
|
-
const
|
|
642
|
-
console.log("lastPreviewer:",
|
|
651
|
+
}, b = async () => {
|
|
652
|
+
if (console.log("stylizingLoading:", T.value), T.value) {
|
|
653
|
+
const R = w();
|
|
654
|
+
console.log("lastPreviewer:", R), R && (console.log("abortReader"), R.abortReader());
|
|
643
655
|
return;
|
|
644
656
|
}
|
|
645
|
-
if (!
|
|
646
|
-
console.log("no input, return"),
|
|
657
|
+
if (!u.value.trim()) {
|
|
658
|
+
console.log("no input, return"), d.value.focus();
|
|
647
659
|
return;
|
|
648
660
|
}
|
|
649
661
|
_.value.push({
|
|
650
662
|
type: "user",
|
|
651
|
-
content:
|
|
652
|
-
}),
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
N.value[
|
|
663
|
+
content: u.value
|
|
664
|
+
}), j.value = !0, y.value = !0, o("submit", u.value), I();
|
|
665
|
+
const a = u.value;
|
|
666
|
+
u.value = "";
|
|
667
|
+
const g = _.value.length;
|
|
668
|
+
N.value[g] && N.value[g].initializeStart(), T.value = !0, _.value.push({
|
|
657
669
|
type: "ai"
|
|
658
670
|
});
|
|
659
|
-
const { error:
|
|
660
|
-
text:
|
|
671
|
+
const { error: S, reader: O } = await Pe(e.value, {
|
|
672
|
+
text: a,
|
|
661
673
|
token: r.token,
|
|
662
674
|
identifier: r.identifier,
|
|
663
|
-
baseUrl: r.baseUrl
|
|
675
|
+
baseUrl: r.baseUrl,
|
|
676
|
+
extraConfig: r.extraConfig
|
|
664
677
|
});
|
|
665
|
-
if (
|
|
666
|
-
console.log(45455,
|
|
678
|
+
if (S) {
|
|
679
|
+
console.log(45455, S), f(g, S);
|
|
667
680
|
return;
|
|
668
681
|
}
|
|
669
|
-
O && (_.value[
|
|
682
|
+
O && (_.value[g].reader = O);
|
|
670
683
|
};
|
|
671
|
-
return (
|
|
672
|
-
const
|
|
684
|
+
return (a, g) => {
|
|
685
|
+
const S = X("el-icon"), O = X("el-input");
|
|
673
686
|
return P(), J(oe, { name: "slide" }, {
|
|
674
687
|
default: M(() => [
|
|
675
688
|
t.modelValue ? (P(), L("div", {
|
|
676
689
|
key: 0,
|
|
677
690
|
class: W(["ai-panel", { "drawer-mode": h.value }])
|
|
678
691
|
}, [
|
|
679
|
-
x("div",
|
|
692
|
+
x("div", Ie, [
|
|
680
693
|
x("div", $e, [
|
|
681
|
-
x("div",
|
|
682
|
-
x("div",
|
|
683
|
-
|
|
694
|
+
x("div", Ee, D(t.title), 1),
|
|
695
|
+
x("div", Ae, [
|
|
696
|
+
E(S, {
|
|
684
697
|
class: "action-icon",
|
|
685
698
|
onClick: v
|
|
686
699
|
}, {
|
|
687
700
|
default: M(() => [
|
|
688
|
-
|
|
701
|
+
E(V, {
|
|
689
702
|
name: "/images/svg/drawer-layout.svg",
|
|
690
703
|
color: "#999999"
|
|
691
704
|
})
|
|
692
705
|
]),
|
|
693
706
|
_: 1
|
|
694
707
|
}),
|
|
695
|
-
|
|
708
|
+
E(S, {
|
|
696
709
|
class: "action-icon",
|
|
697
710
|
onClick: i
|
|
698
711
|
}, {
|
|
699
712
|
default: M(() => [
|
|
700
|
-
|
|
713
|
+
E(V, {
|
|
701
714
|
name: "/images/svg/close.svg",
|
|
702
715
|
color: "#999999"
|
|
703
716
|
})
|
|
@@ -708,33 +721,33 @@ const le = (t, n) => {
|
|
|
708
721
|
])
|
|
709
722
|
]),
|
|
710
723
|
x("div", qe, [
|
|
711
|
-
|
|
724
|
+
y.value ? (P(), L("div", {
|
|
712
725
|
key: 1,
|
|
713
726
|
class: "chat-messages",
|
|
714
727
|
ref_key: "messageContainerRef",
|
|
715
|
-
ref:
|
|
728
|
+
ref: A
|
|
716
729
|
}, [
|
|
717
|
-
(P(!0), L(Y, null, Z(_.value, (
|
|
730
|
+
(P(!0), L(Y, null, Z(_.value, (R, $) => (P(), L("div", {
|
|
718
731
|
key: $,
|
|
719
|
-
class: W(["message-item",
|
|
732
|
+
class: W(["message-item", R.type === "user" ? "user-message" : "ai-message"])
|
|
720
733
|
}, [
|
|
721
|
-
|
|
734
|
+
R.type === "ai" ? (P(), J(Ue, {
|
|
722
735
|
key: 0,
|
|
723
736
|
ref_for: !0,
|
|
724
|
-
ref: (
|
|
725
|
-
reader:
|
|
726
|
-
"onUpdate:reader": (
|
|
737
|
+
ref: (z) => N.value[$] = z,
|
|
738
|
+
reader: R.reader,
|
|
739
|
+
"onUpdate:reader": (z) => R.reader = z,
|
|
727
740
|
model: r.llmName,
|
|
728
|
-
displayText:
|
|
729
|
-
scrollToBottomFn:
|
|
741
|
+
displayText: R.displayText,
|
|
742
|
+
scrollToBottomFn: I,
|
|
730
743
|
messagePostRender: t.messagePostRender,
|
|
731
|
-
onFailed: (
|
|
732
|
-
onCompleted: (
|
|
744
|
+
onFailed: (z) => f($, z),
|
|
745
|
+
onCompleted: (z) => p($, z),
|
|
733
746
|
onUpdating: () => c()
|
|
734
|
-
}, null, 8, ["reader", "onUpdate:reader", "model", "displayText", "messagePostRender", "onFailed", "onCompleted", "onUpdating"])) : (P(), L("div", We, D(
|
|
747
|
+
}, null, 8, ["reader", "onUpdate:reader", "model", "displayText", "messagePostRender", "onFailed", "onCompleted", "onUpdating"])) : (P(), L("div", We, D(R.content), 1))
|
|
735
748
|
], 2))), 128))
|
|
736
749
|
], 512)) : (P(), L("div", Me, [
|
|
737
|
-
|
|
750
|
+
g[2] || (g[2] = x("div", { class: "title" }, [
|
|
738
751
|
x("img", {
|
|
739
752
|
src: ye,
|
|
740
753
|
alt: "AI助手",
|
|
@@ -743,19 +756,19 @@ const le = (t, n) => {
|
|
|
743
756
|
x("h3", { class: "title-text" }, "Hi, 您好")
|
|
744
757
|
], -1)),
|
|
745
758
|
x("div", Fe, [
|
|
746
|
-
|
|
759
|
+
g[1] || (g[1] = fe(" 我是", -1)),
|
|
747
760
|
x("span", Be, D(t.title), 1)
|
|
748
761
|
]),
|
|
749
762
|
x("div", De, [
|
|
750
|
-
(P(!0), L(Y, null, Z(
|
|
763
|
+
(P(!0), L(Y, null, Z(U.value, (R, $) => (P(), L("div", {
|
|
751
764
|
key: $,
|
|
752
765
|
class: "question-item",
|
|
753
|
-
onClick: (
|
|
766
|
+
onClick: (z) => k(R)
|
|
754
767
|
}, [
|
|
755
|
-
x("span", null, D(
|
|
756
|
-
|
|
768
|
+
x("span", null, D(R), 1),
|
|
769
|
+
E(S, null, {
|
|
757
770
|
default: M(() => [
|
|
758
|
-
|
|
771
|
+
E(V, {
|
|
759
772
|
name: "/images/svg/arrow-right.svg",
|
|
760
773
|
color: "#999999"
|
|
761
774
|
})
|
|
@@ -767,24 +780,24 @@ const le = (t, n) => {
|
|
|
767
780
|
]))
|
|
768
781
|
]),
|
|
769
782
|
x("div", Je, [
|
|
770
|
-
|
|
783
|
+
j.value ? (P(), L("img", He)) : B("", !0),
|
|
771
784
|
x("div", Qe, [
|
|
772
|
-
|
|
773
|
-
modelValue:
|
|
774
|
-
"onUpdate:modelValue":
|
|
785
|
+
E(O, {
|
|
786
|
+
modelValue: u.value,
|
|
787
|
+
"onUpdate:modelValue": g[0] || (g[0] = (R) => u.value = R),
|
|
775
788
|
ref_key: "refInputTextString",
|
|
776
|
-
ref:
|
|
789
|
+
ref: d,
|
|
777
790
|
placeholder: "请输入您的问题",
|
|
778
791
|
autofocus: "",
|
|
779
|
-
onKeyup: pe(
|
|
792
|
+
onKeyup: pe(b, ["enter"])
|
|
780
793
|
}, {
|
|
781
794
|
append: M(() => [
|
|
782
795
|
x("div", {
|
|
783
796
|
class: "send-icon-box",
|
|
784
|
-
onClick:
|
|
797
|
+
onClick: b
|
|
785
798
|
}, [
|
|
786
799
|
x("img", {
|
|
787
|
-
src:
|
|
800
|
+
src: m.value,
|
|
788
801
|
alt: "发送",
|
|
789
802
|
class: "send-icon"
|
|
790
803
|
}, null, 8, Ke)
|
|
@@ -803,212 +816,212 @@ const le = (t, n) => {
|
|
|
803
816
|
};
|
|
804
817
|
var ie = { exports: {} };
|
|
805
818
|
(function(t, n) {
|
|
806
|
-
(function(
|
|
807
|
-
t.exports =
|
|
819
|
+
(function(s, l) {
|
|
820
|
+
t.exports = l();
|
|
808
821
|
})(window, function() {
|
|
809
|
-
return function(
|
|
810
|
-
var
|
|
822
|
+
return function(s) {
|
|
823
|
+
var l = {};
|
|
811
824
|
function r(e) {
|
|
812
|
-
if (
|
|
813
|
-
var
|
|
814
|
-
return
|
|
825
|
+
if (l[e]) return l[e].exports;
|
|
826
|
+
var o = l[e] = { i: e, l: !1, exports: {} };
|
|
827
|
+
return s[e].call(o.exports, o, o.exports, r), o.l = !0, o.exports;
|
|
815
828
|
}
|
|
816
|
-
return r.m =
|
|
817
|
-
r.o(e,
|
|
829
|
+
return r.m = s, r.c = l, r.d = function(e, o, u) {
|
|
830
|
+
r.o(e, o) || Object.defineProperty(e, o, { enumerable: !0, get: u });
|
|
818
831
|
}, r.r = function(e) {
|
|
819
832
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
|
|
820
|
-
}, r.t = function(e,
|
|
821
|
-
if (1 &
|
|
822
|
-
var
|
|
823
|
-
if (r.r(
|
|
824
|
-
return e[
|
|
825
|
-
}).bind(null,
|
|
826
|
-
return
|
|
833
|
+
}, r.t = function(e, o) {
|
|
834
|
+
if (1 & o && (e = r(e)), 8 & o || 4 & o && typeof e == "object" && e && e.__esModule) return e;
|
|
835
|
+
var u = /* @__PURE__ */ Object.create(null);
|
|
836
|
+
if (r.r(u), Object.defineProperty(u, "default", { enumerable: !0, value: e }), 2 & o && typeof e != "string") for (var d in e) r.d(u, d, (function(y) {
|
|
837
|
+
return e[y];
|
|
838
|
+
}).bind(null, d));
|
|
839
|
+
return u;
|
|
827
840
|
}, r.n = function(e) {
|
|
828
|
-
var
|
|
841
|
+
var o = e && e.__esModule ? function() {
|
|
829
842
|
return e.default;
|
|
830
843
|
} : function() {
|
|
831
844
|
return e;
|
|
832
845
|
};
|
|
833
|
-
return r.d(
|
|
834
|
-
}, r.o = function(e,
|
|
835
|
-
return Object.prototype.hasOwnProperty.call(e,
|
|
846
|
+
return r.d(o, "a", o), o;
|
|
847
|
+
}, r.o = function(e, o) {
|
|
848
|
+
return Object.prototype.hasOwnProperty.call(e, o);
|
|
836
849
|
}, r.p = "", r(r.s = 0);
|
|
837
|
-
}([function(
|
|
838
|
-
function e(
|
|
839
|
-
|
|
850
|
+
}([function(s, l, r) {
|
|
851
|
+
function e(m, f, p, c) {
|
|
852
|
+
p.push(m), c.push([].concat(f[m] || []));
|
|
840
853
|
}
|
|
841
|
-
function
|
|
842
|
-
if (!
|
|
843
|
-
var
|
|
844
|
-
for (e(
|
|
854
|
+
function o(m, f) {
|
|
855
|
+
if (!m) throw new Error("[getMaxDepsChain] dep 参数不能为空");
|
|
856
|
+
var p = [], c = [], i = [];
|
|
857
|
+
for (e(m, f, c, i); c.length; ) {
|
|
845
858
|
var h = i.pop();
|
|
846
859
|
if (h && h.length) {
|
|
847
860
|
var v = h.shift();
|
|
848
861
|
if (i.push(h), ~c.indexOf(v)) throw new Error("[getMaxDepsChain][loop] 存在循环依赖,请检查依赖关系; nextName: " + v + ", mainStack: " + c);
|
|
849
|
-
e(v,
|
|
850
|
-
} else
|
|
862
|
+
e(v, f, c, i);
|
|
863
|
+
} else p.push([].concat(c)), c.pop();
|
|
851
864
|
}
|
|
852
|
-
return
|
|
853
|
-
return w.length >
|
|
865
|
+
return p.reduce(function(k, w) {
|
|
866
|
+
return w.length > k.length ? w : k;
|
|
854
867
|
}, []);
|
|
855
868
|
}
|
|
856
|
-
function
|
|
857
|
-
if (!
|
|
858
|
-
var
|
|
859
|
-
|
|
860
|
-
|
|
869
|
+
function u(m) {
|
|
870
|
+
if (!m) throw new Error("[depsParser] 入参不能为空");
|
|
871
|
+
var f = {};
|
|
872
|
+
m.forEach(function(c) {
|
|
873
|
+
f[c.name] = c.deps || [];
|
|
861
874
|
});
|
|
862
|
-
var
|
|
863
|
-
return
|
|
864
|
-
var i =
|
|
865
|
-
c.priority = i,
|
|
866
|
-
}),
|
|
875
|
+
var p = [];
|
|
876
|
+
return m.forEach(function(c) {
|
|
877
|
+
var i = o(c.name, f).length - 1;
|
|
878
|
+
c.priority = i, p[i] = (p[i] || []).concat(c);
|
|
879
|
+
}), p;
|
|
867
880
|
}
|
|
868
|
-
r.r(
|
|
881
|
+
r.r(l), r.d(l, "loadScript", function() {
|
|
869
882
|
return N;
|
|
870
|
-
}), r.d(
|
|
871
|
-
return
|
|
872
|
-
}), r.d(
|
|
873
|
-
return
|
|
874
|
-
}), r.d(
|
|
875
|
-
return
|
|
876
|
-
}), r.d(
|
|
877
|
-
return
|
|
878
|
-
}), r.d(
|
|
879
|
-
return
|
|
880
|
-
}), r.d(
|
|
881
|
-
return
|
|
883
|
+
}), r.d(l, "loadScripts", function() {
|
|
884
|
+
return T;
|
|
885
|
+
}), r.d(l, "dynamicLoadScripts", function() {
|
|
886
|
+
return A;
|
|
887
|
+
}), r.d(l, "createScriptsLoadIterator", function() {
|
|
888
|
+
return I;
|
|
889
|
+
}), r.d(l, "loadScriptsQueue", function() {
|
|
890
|
+
return j;
|
|
891
|
+
}), r.d(l, "getMaxDepsChain", function() {
|
|
892
|
+
return o;
|
|
893
|
+
}), r.d(l, "depsParser", function() {
|
|
894
|
+
return u;
|
|
882
895
|
});
|
|
883
|
-
var
|
|
884
|
-
return (
|
|
885
|
-
for (var
|
|
886
|
-
return
|
|
896
|
+
var d = function() {
|
|
897
|
+
return (d = Object.assign || function(m) {
|
|
898
|
+
for (var f, p = 1, c = arguments.length; p < c; p++) for (var i in f = arguments[p]) Object.prototype.hasOwnProperty.call(f, i) && (m[i] = f[i]);
|
|
899
|
+
return m;
|
|
887
900
|
}).apply(this, arguments);
|
|
888
|
-
},
|
|
889
|
-
return new (
|
|
890
|
-
function v(
|
|
901
|
+
}, y = function(m, f, p, c) {
|
|
902
|
+
return new (p || (p = Promise))(function(i, h) {
|
|
903
|
+
function v(b) {
|
|
891
904
|
try {
|
|
892
|
-
w(c.next(
|
|
893
|
-
} catch (
|
|
894
|
-
h(
|
|
905
|
+
w(c.next(b));
|
|
906
|
+
} catch (a) {
|
|
907
|
+
h(a);
|
|
895
908
|
}
|
|
896
909
|
}
|
|
897
|
-
function
|
|
910
|
+
function k(b) {
|
|
898
911
|
try {
|
|
899
|
-
w(c.throw(
|
|
900
|
-
} catch (
|
|
901
|
-
h(
|
|
912
|
+
w(c.throw(b));
|
|
913
|
+
} catch (a) {
|
|
914
|
+
h(a);
|
|
902
915
|
}
|
|
903
916
|
}
|
|
904
|
-
function w(
|
|
905
|
-
var
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
})).then(v,
|
|
917
|
+
function w(b) {
|
|
918
|
+
var a;
|
|
919
|
+
b.done ? i(b.value) : (a = b.value, a instanceof p ? a : new p(function(g) {
|
|
920
|
+
g(a);
|
|
921
|
+
})).then(v, k);
|
|
909
922
|
}
|
|
910
|
-
w((c = c.apply(
|
|
923
|
+
w((c = c.apply(m, [])).next());
|
|
911
924
|
});
|
|
912
|
-
}, _ = function(
|
|
913
|
-
var
|
|
925
|
+
}, _ = function(m, f) {
|
|
926
|
+
var p, c, i, h, v = { label: 0, sent: function() {
|
|
914
927
|
if (1 & i[0]) throw i[1];
|
|
915
928
|
return i[1];
|
|
916
929
|
}, trys: [], ops: [] };
|
|
917
|
-
return h = { next:
|
|
930
|
+
return h = { next: k(0), throw: k(1), return: k(2) }, typeof Symbol == "function" && (h[Symbol.iterator] = function() {
|
|
918
931
|
return this;
|
|
919
932
|
}), h;
|
|
920
|
-
function
|
|
921
|
-
return function(
|
|
922
|
-
return function(
|
|
923
|
-
if (
|
|
933
|
+
function k(w) {
|
|
934
|
+
return function(b) {
|
|
935
|
+
return function(a) {
|
|
936
|
+
if (p) throw new TypeError("Generator is already executing.");
|
|
924
937
|
for (; v; ) try {
|
|
925
|
-
if (
|
|
926
|
-
switch (c = 0, i && (
|
|
938
|
+
if (p = 1, c && (i = 2 & a[0] ? c.return : a[0] ? c.throw || ((i = c.return) && i.call(c), 0) : c.next) && !(i = i.call(c, a[1])).done) return i;
|
|
939
|
+
switch (c = 0, i && (a = [2 & a[0], i.value]), a[0]) {
|
|
927
940
|
case 0:
|
|
928
941
|
case 1:
|
|
929
|
-
i =
|
|
942
|
+
i = a;
|
|
930
943
|
break;
|
|
931
944
|
case 4:
|
|
932
|
-
return v.label++, { value:
|
|
945
|
+
return v.label++, { value: a[1], done: !1 };
|
|
933
946
|
case 5:
|
|
934
|
-
v.label++, c =
|
|
947
|
+
v.label++, c = a[1], a = [0];
|
|
935
948
|
continue;
|
|
936
949
|
case 7:
|
|
937
|
-
|
|
950
|
+
a = v.ops.pop(), v.trys.pop();
|
|
938
951
|
continue;
|
|
939
952
|
default:
|
|
940
|
-
if (i = v.trys, !((i = i.length > 0 && i[i.length - 1]) ||
|
|
953
|
+
if (i = v.trys, !((i = i.length > 0 && i[i.length - 1]) || a[0] !== 6 && a[0] !== 2)) {
|
|
941
954
|
v = 0;
|
|
942
955
|
continue;
|
|
943
956
|
}
|
|
944
|
-
if (
|
|
945
|
-
v.label =
|
|
957
|
+
if (a[0] === 3 && (!i || a[1] > i[0] && a[1] < i[3])) {
|
|
958
|
+
v.label = a[1];
|
|
946
959
|
break;
|
|
947
960
|
}
|
|
948
|
-
if (
|
|
949
|
-
v.label = i[1], i =
|
|
961
|
+
if (a[0] === 6 && v.label < i[1]) {
|
|
962
|
+
v.label = i[1], i = a;
|
|
950
963
|
break;
|
|
951
964
|
}
|
|
952
965
|
if (i && v.label < i[2]) {
|
|
953
|
-
v.label = i[2], v.ops.push(
|
|
966
|
+
v.label = i[2], v.ops.push(a);
|
|
954
967
|
break;
|
|
955
968
|
}
|
|
956
969
|
i[2] && v.ops.pop(), v.trys.pop();
|
|
957
970
|
continue;
|
|
958
971
|
}
|
|
959
|
-
|
|
960
|
-
} catch (
|
|
961
|
-
|
|
972
|
+
a = f.call(m, v);
|
|
973
|
+
} catch (g) {
|
|
974
|
+
a = [6, g], c = 0;
|
|
962
975
|
} finally {
|
|
963
|
-
|
|
976
|
+
p = i = 0;
|
|
964
977
|
}
|
|
965
|
-
if (5 &
|
|
966
|
-
return { value:
|
|
967
|
-
}([w,
|
|
978
|
+
if (5 & a[0]) throw a[1];
|
|
979
|
+
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
980
|
+
}([w, b]);
|
|
968
981
|
};
|
|
969
982
|
}
|
|
970
|
-
},
|
|
983
|
+
}, U = function(m) {
|
|
971
984
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
972
|
-
var
|
|
973
|
-
return
|
|
985
|
+
var f, p = m[Symbol.asyncIterator];
|
|
986
|
+
return p ? p.call(m) : (m = typeof __values == "function" ? __values(m) : m[Symbol.iterator](), f = {}, c("next"), c("throw"), c("return"), f[Symbol.asyncIterator] = function() {
|
|
974
987
|
return this;
|
|
975
|
-
},
|
|
988
|
+
}, f);
|
|
976
989
|
function c(i) {
|
|
977
|
-
|
|
978
|
-
return new Promise(function(v,
|
|
979
|
-
(function(w,
|
|
980
|
-
Promise.resolve(
|
|
981
|
-
w({ value:
|
|
982
|
-
},
|
|
983
|
-
})(v,
|
|
990
|
+
f[i] = m[i] && function(h) {
|
|
991
|
+
return new Promise(function(v, k) {
|
|
992
|
+
(function(w, b, a, g) {
|
|
993
|
+
Promise.resolve(g).then(function(S) {
|
|
994
|
+
w({ value: S, done: a });
|
|
995
|
+
}, b);
|
|
996
|
+
})(v, k, (h = m[i](h)).done, h.value);
|
|
984
997
|
});
|
|
985
998
|
};
|
|
986
999
|
}
|
|
987
1000
|
};
|
|
988
|
-
function N(
|
|
989
|
-
return
|
|
990
|
-
var i =
|
|
991
|
-
h.type = "text/javascript", h.src =
|
|
1001
|
+
function N(m, f) {
|
|
1002
|
+
return f === void 0 && (f = !1), new Promise(function(p, c) {
|
|
1003
|
+
var i = f ? document.head : document.body, h = document.createElement("script");
|
|
1004
|
+
h.type = "text/javascript", h.src = m, h.crossOrigin = "anonymous", h.onreadystatechange = p, h.onload = p, h.onerror = c, i.appendChild(h);
|
|
992
1005
|
});
|
|
993
1006
|
}
|
|
994
|
-
var
|
|
995
|
-
return
|
|
996
|
-
var
|
|
997
|
-
return _(this, function(
|
|
998
|
-
switch (
|
|
1007
|
+
var T = function(m, f) {
|
|
1008
|
+
return f === void 0 && (f = {}), y(void 0, void 0, void 0, function() {
|
|
1009
|
+
var p, c, i, h, v;
|
|
1010
|
+
return _(this, function(k) {
|
|
1011
|
+
switch (k.label) {
|
|
999
1012
|
case 0:
|
|
1000
|
-
return
|
|
1001
|
-
return
|
|
1002
|
-
var
|
|
1013
|
+
return p = f.baseUrl, c = p === void 0 ? "" : p, i = f.lastLoadResult, h = f.inHead, v = h !== void 0 && h, [4, Promise.all(m.map(function(w) {
|
|
1014
|
+
return y(void 0, void 0, void 0, function() {
|
|
1015
|
+
var b, a, g, S, O, R, $, z;
|
|
1003
1016
|
return _(this, function(Q) {
|
|
1004
1017
|
switch (Q.label) {
|
|
1005
1018
|
case 0:
|
|
1006
|
-
return
|
|
1019
|
+
return b = w.name, a = w.path, g = w.deps, ($ = {})[b] = !0, S = $, (z = {})[b] = !1, O = z, window[b] ? [2, S] : [3, 1];
|
|
1007
1020
|
case 1:
|
|
1008
|
-
return
|
|
1009
|
-
i[ce] !== !1 && (
|
|
1010
|
-
}),
|
|
1011
|
-
return
|
|
1021
|
+
return R = !0, g && i && [].concat(g).forEach(function(ce) {
|
|
1022
|
+
i[ce] !== !1 && (R = !0);
|
|
1023
|
+
}), R ? [4, N(a.indexOf("http") === 0 || a.indexOf("//:") === 0 ? a : c + a, v).then(function() {
|
|
1024
|
+
return S;
|
|
1012
1025
|
}).catch(function() {
|
|
1013
1026
|
return O;
|
|
1014
1027
|
})] : [3, 3];
|
|
@@ -1021,39 +1034,39 @@ var ie = { exports: {} };
|
|
|
1021
1034
|
});
|
|
1022
1035
|
}))];
|
|
1023
1036
|
case 1:
|
|
1024
|
-
return [2,
|
|
1037
|
+
return [2, k.sent()];
|
|
1025
1038
|
}
|
|
1026
1039
|
});
|
|
1027
1040
|
});
|
|
1028
|
-
},
|
|
1029
|
-
return
|
|
1030
|
-
var
|
|
1041
|
+
}, A = function(m, f) {
|
|
1042
|
+
return f === void 0 && (f = {}), function() {
|
|
1043
|
+
var p = [].concat(u(m));
|
|
1031
1044
|
return { next: function() {
|
|
1032
|
-
if (
|
|
1033
|
-
var c =
|
|
1034
|
-
return
|
|
1045
|
+
if (p.length) {
|
|
1046
|
+
var c = p.shift();
|
|
1047
|
+
return T(c, f).then(function(i) {
|
|
1035
1048
|
return { value: i, done: !1 };
|
|
1036
1049
|
});
|
|
1037
1050
|
}
|
|
1038
1051
|
return Promise.resolve({ done: !0 });
|
|
1039
1052
|
} };
|
|
1040
1053
|
};
|
|
1041
|
-
},
|
|
1042
|
-
var
|
|
1043
|
-
return
|
|
1044
|
-
},
|
|
1045
|
-
return
|
|
1046
|
-
var
|
|
1054
|
+
}, I = function(m, f) {
|
|
1055
|
+
var p;
|
|
1056
|
+
return f === void 0 && (f = {}), (p = {})[Symbol.asyncIterator] = A(m, f), p;
|
|
1057
|
+
}, j = function(m, f) {
|
|
1058
|
+
return f === void 0 && (f = {}), y(void 0, void 0, void 0, function() {
|
|
1059
|
+
var p, c, i, h, v, k;
|
|
1047
1060
|
return _(this, function(w) {
|
|
1048
1061
|
switch (w.label) {
|
|
1049
1062
|
case 0:
|
|
1050
|
-
w.trys.push([0, 5, 6, 11]),
|
|
1063
|
+
w.trys.push([0, 5, 6, 11]), p = U(I(m, f)), w.label = 1;
|
|
1051
1064
|
case 1:
|
|
1052
|
-
return [4,
|
|
1065
|
+
return [4, p.next()];
|
|
1053
1066
|
case 2:
|
|
1054
1067
|
if ((c = w.sent()).done) return [3, 4];
|
|
1055
|
-
i = c.value,
|
|
1056
|
-
|
|
1068
|
+
i = c.value, f.lastLoadResult = f.lastLoadResult || {}, console.log("current load: ", i), i.forEach(function(b) {
|
|
1069
|
+
f.lastLoadResult = d(d({}, f.lastLoadResult), b);
|
|
1057
1070
|
}), w.label = 3;
|
|
1058
1071
|
case 3:
|
|
1059
1072
|
return [3, 1];
|
|
@@ -1062,7 +1075,7 @@ var ie = { exports: {} };
|
|
|
1062
1075
|
case 5:
|
|
1063
1076
|
return h = w.sent(), v = { error: h }, [3, 11];
|
|
1064
1077
|
case 6:
|
|
1065
|
-
return w.trys.push([6, , 9, 10]), c && !c.done && (
|
|
1078
|
+
return w.trys.push([6, , 9, 10]), c && !c.done && (k = p.return) ? [4, k.call(p)] : [3, 8];
|
|
1066
1079
|
case 7:
|
|
1067
1080
|
w.sent(), w.label = 8;
|
|
1068
1081
|
case 8:
|
|
@@ -1073,7 +1086,7 @@ var ie = { exports: {} };
|
|
|
1073
1086
|
case 10:
|
|
1074
1087
|
return [7];
|
|
1075
1088
|
case 11:
|
|
1076
|
-
return [2,
|
|
1089
|
+
return [2, f.lastLoadResult];
|
|
1077
1090
|
}
|
|
1078
1091
|
});
|
|
1079
1092
|
});
|
|
@@ -1125,16 +1138,24 @@ const Ze = {
|
|
|
1125
1138
|
messagePostRender: {
|
|
1126
1139
|
type: Function,
|
|
1127
1140
|
default: null
|
|
1141
|
+
},
|
|
1142
|
+
/**
|
|
1143
|
+
* 额外配置参数,用于扩展供应商 API 调用
|
|
1144
|
+
* 例如:{ projectId: 'xxx' } 供 Dify 等供应商使用
|
|
1145
|
+
*/
|
|
1146
|
+
extraConfig: {
|
|
1147
|
+
type: Object,
|
|
1148
|
+
default: () => ({})
|
|
1128
1149
|
}
|
|
1129
1150
|
},
|
|
1130
1151
|
setup(t) {
|
|
1131
|
-
const n = C(!1),
|
|
1152
|
+
const n = C(!1), s = C(!1), l = () => {
|
|
1132
1153
|
n.value = !n.value;
|
|
1133
1154
|
}, r = () => {
|
|
1134
|
-
|
|
1135
|
-
}, e = (
|
|
1136
|
-
console.log("用户输入:",
|
|
1137
|
-
},
|
|
1155
|
+
s.value = !0, n.value = !1;
|
|
1156
|
+
}, e = (d) => {
|
|
1157
|
+
console.log("用户输入:", d);
|
|
1158
|
+
}, o = [
|
|
1138
1159
|
{
|
|
1139
1160
|
name: "markdownit",
|
|
1140
1161
|
path: "markdown-it.min.js"
|
|
@@ -1144,36 +1165,37 @@ const Ze = {
|
|
|
1144
1165
|
path: "highlight.11.11.1.min.js"
|
|
1145
1166
|
}
|
|
1146
1167
|
];
|
|
1147
|
-
let
|
|
1148
|
-
return Ye.loadScriptsQueue(
|
|
1168
|
+
let u = {};
|
|
1169
|
+
return Ye.loadScriptsQueue(o, {
|
|
1149
1170
|
baseUrl: "/scripts/ai/",
|
|
1150
|
-
lastLoadResult:
|
|
1171
|
+
lastLoadResult: u,
|
|
1151
1172
|
inHead: !1
|
|
1152
|
-
}).then((
|
|
1153
|
-
if (console.log("load ai deps: ",
|
|
1154
|
-
const
|
|
1155
|
-
console.log("markdownit: ",
|
|
1173
|
+
}).then((d) => {
|
|
1174
|
+
if (console.log("load ai deps: ", d), window.markdownit) {
|
|
1175
|
+
const y = window.markdownit();
|
|
1176
|
+
console.log("markdownit: ", y), Ne();
|
|
1156
1177
|
}
|
|
1157
|
-
}), (
|
|
1158
|
-
|
|
1178
|
+
}), (d, y) => s.value ? B("", !0) : (P(), L("div", Ze, [
|
|
1179
|
+
E(Xe, {
|
|
1159
1180
|
modelValue: n.value,
|
|
1160
|
-
"onUpdate:modelValue":
|
|
1181
|
+
"onUpdate:modelValue": y[0] || (y[0] = (_) => n.value = _),
|
|
1161
1182
|
onSubmit: e,
|
|
1162
1183
|
token: t.token,
|
|
1163
1184
|
identifier: t.identifier,
|
|
1164
1185
|
baseUrl: t.baseUrl,
|
|
1165
1186
|
title: t.title,
|
|
1166
1187
|
llmName: t.llmName,
|
|
1167
|
-
messagePostRender: t.messagePostRender
|
|
1168
|
-
|
|
1188
|
+
messagePostRender: t.messagePostRender,
|
|
1189
|
+
extraConfig: t.extraConfig
|
|
1190
|
+
}, null, 8, ["modelValue", "token", "identifier", "baseUrl", "title", "llmName", "messagePostRender", "extraConfig"]),
|
|
1169
1191
|
x("div", {
|
|
1170
1192
|
class: "ai-icon",
|
|
1171
|
-
onClick:
|
|
1193
|
+
onClick: l
|
|
1172
1194
|
}, [
|
|
1173
1195
|
x("div", {
|
|
1174
1196
|
class: "close-icon",
|
|
1175
1197
|
onClick: he(r, ["stop"])
|
|
1176
|
-
}, [...
|
|
1198
|
+
}, [...y[1] || (y[1] = [
|
|
1177
1199
|
x("svg", {
|
|
1178
1200
|
viewBox: "0 0 1024 1024",
|
|
1179
1201
|
width: "8",
|
|
@@ -1185,36 +1207,36 @@ const Ze = {
|
|
|
1185
1207
|
})
|
|
1186
1208
|
], -1)
|
|
1187
1209
|
])]),
|
|
1188
|
-
|
|
1210
|
+
y[2] || (y[2] = x("img", {
|
|
1189
1211
|
src: ve,
|
|
1190
1212
|
alt: "AI助手"
|
|
1191
1213
|
}, null, -1)),
|
|
1192
|
-
|
|
1214
|
+
y[3] || (y[3] = x("span", { class: "ai-icon-text" }, "AI助手", -1))
|
|
1193
1215
|
])
|
|
1194
1216
|
]));
|
|
1195
1217
|
}
|
|
1196
|
-
}), tt = /* @__PURE__ */ le(et, [["__scopeId", "data-v-
|
|
1218
|
+
}), tt = /* @__PURE__ */ le(et, [["__scopeId", "data-v-33f89960"]]), ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1197
1219
|
__proto__: null,
|
|
1198
1220
|
SzAiChat: tt
|
|
1199
1221
|
}, Symbol.toStringTag, { value: "Module" })), H = function(t) {
|
|
1200
1222
|
if (!H.installed) {
|
|
1201
1223
|
H.installed = !0;
|
|
1202
1224
|
for (let n in ne) {
|
|
1203
|
-
const
|
|
1204
|
-
t.component(
|
|
1225
|
+
const s = Reflect.get(ne, n);
|
|
1226
|
+
t.component(s.name, s);
|
|
1205
1227
|
}
|
|
1206
1228
|
}
|
|
1207
1229
|
}, nt = (t, n) => {
|
|
1208
|
-
const
|
|
1209
|
-
console.log(`点击了路由链接: ${t}${
|
|
1230
|
+
const s = n ? `?${new URLSearchParams(n).toString()}` : "";
|
|
1231
|
+
console.log(`点击了路由链接: ${t}${s}`);
|
|
1210
1232
|
}, rt = (t) => {
|
|
1211
1233
|
const n = t.indexOf("?");
|
|
1212
1234
|
if (n === -1)
|
|
1213
1235
|
return { routeName: t };
|
|
1214
|
-
const
|
|
1215
|
-
return new URLSearchParams(
|
|
1216
|
-
r[
|
|
1217
|
-
}), { routeName:
|
|
1236
|
+
const s = t.substring(0, n), l = t.substring(n + 1), r = {};
|
|
1237
|
+
return new URLSearchParams(l).forEach((o, u) => {
|
|
1238
|
+
r[u] = o;
|
|
1239
|
+
}), { routeName: s, queryParams: Object.keys(r).length > 0 ? r : void 0 };
|
|
1218
1240
|
}, ot = {
|
|
1219
1241
|
color: "#536fec",
|
|
1220
1242
|
fontWeight: "bold",
|
|
@@ -1222,71 +1244,71 @@ const Ze = {
|
|
|
1222
1244
|
cursor: "pointer",
|
|
1223
1245
|
padding: "0 3px"
|
|
1224
1246
|
}, at = (t) => {
|
|
1225
|
-
const n = /#router:([^#]+)#/g,
|
|
1226
|
-
let
|
|
1247
|
+
const n = /#router:([^#]+)#/g, s = [];
|
|
1248
|
+
let l = 0, r;
|
|
1227
1249
|
for (; (r = n.exec(t)) !== null; ) {
|
|
1228
|
-
r.index >
|
|
1229
|
-
const e = r[1], { routeName:
|
|
1230
|
-
|
|
1250
|
+
r.index > l && s.push({ text: t.substring(l, r.index) });
|
|
1251
|
+
const e = r[1], { routeName: o, queryParams: u } = rt(e);
|
|
1252
|
+
s.push({ text: o, routeName: o, queryParams: u }), l = n.lastIndex;
|
|
1231
1253
|
}
|
|
1232
|
-
return
|
|
1233
|
-
}, st = (t, n,
|
|
1234
|
-
const { onRouteClick: r = nt, linkStyle: e = {} } =
|
|
1235
|
-
|
|
1236
|
-
const
|
|
1237
|
-
return Object.assign(
|
|
1238
|
-
|
|
1239
|
-
}),
|
|
1254
|
+
return l < t.length && s.push({ text: t.substring(l) }), s;
|
|
1255
|
+
}, st = (t, n, s = {}, l) => {
|
|
1256
|
+
const { onRouteClick: r = nt, linkStyle: e = {} } = s, o = document.createElement("a");
|
|
1257
|
+
o.href = "#", o.textContent = t;
|
|
1258
|
+
const u = { ...ot, ...e };
|
|
1259
|
+
return Object.assign(o.style, u), o.addEventListener("click", (d) => {
|
|
1260
|
+
d.preventDefault(), r(n, l);
|
|
1261
|
+
}), o;
|
|
1240
1262
|
}, lt = (t) => {
|
|
1241
|
-
const n = /#router:([^#]+)#/g,
|
|
1263
|
+
const n = /#router:([^#]+)#/g, s = [], l = document.createTreeWalker(
|
|
1242
1264
|
t,
|
|
1243
1265
|
NodeFilter.SHOW_TEXT,
|
|
1244
1266
|
null
|
|
1245
1267
|
);
|
|
1246
|
-
let r =
|
|
1268
|
+
let r = l.nextNode();
|
|
1247
1269
|
for (; r; ) {
|
|
1248
|
-
const e = r,
|
|
1249
|
-
if (n.test(
|
|
1270
|
+
const e = r, o = e.textContent || "";
|
|
1271
|
+
if (n.test(o)) {
|
|
1250
1272
|
n.lastIndex = 0;
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1273
|
+
const u = at(o);
|
|
1274
|
+
u.length > 0 && s.push({ node: e, replacements: u });
|
|
1253
1275
|
}
|
|
1254
|
-
r =
|
|
1276
|
+
r = l.nextNode();
|
|
1255
1277
|
}
|
|
1256
|
-
return
|
|
1257
|
-
}, dt = (t, n,
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
var
|
|
1261
|
-
const
|
|
1262
|
-
e.forEach(({ text:
|
|
1263
|
-
if (
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1278
|
+
return s;
|
|
1279
|
+
}, dt = (t, n, s = {}) => {
|
|
1280
|
+
const l = lt(t);
|
|
1281
|
+
l.forEach(({ node: r, replacements: e }) => {
|
|
1282
|
+
var u;
|
|
1283
|
+
const o = document.createDocumentFragment();
|
|
1284
|
+
e.forEach(({ text: d, routeName: y, queryParams: _ }) => {
|
|
1285
|
+
if (y) {
|
|
1286
|
+
const U = st(d, y, s, _);
|
|
1287
|
+
o.appendChild(U);
|
|
1266
1288
|
} else
|
|
1267
|
-
|
|
1268
|
-
}), (
|
|
1269
|
-
}),
|
|
1270
|
-
var
|
|
1271
|
-
(
|
|
1289
|
+
o.appendChild(document.createTextNode(d));
|
|
1290
|
+
}), (u = r.parentNode) == null || u.replaceChild(o, r);
|
|
1291
|
+
}), s != null && s.nodeCallback && l.forEach(({ node: r, replacements: e }) => {
|
|
1292
|
+
var o;
|
|
1293
|
+
(o = s.nodeCallback) == null || o.call(s, r, e);
|
|
1272
1294
|
});
|
|
1273
|
-
}, it = "0.1.
|
|
1295
|
+
}, it = "0.1.8", ct = "Sz";
|
|
1274
1296
|
function ft({
|
|
1275
1297
|
componentPrefix: t = ct,
|
|
1276
1298
|
components: n = []
|
|
1277
1299
|
} = {}) {
|
|
1278
|
-
const
|
|
1279
|
-
function
|
|
1280
|
-
e.component(t +
|
|
1281
|
-
t +
|
|
1282
|
-
|
|
1300
|
+
const s = [];
|
|
1301
|
+
function l(e, o, u) {
|
|
1302
|
+
e.component(t + o) || e.component(
|
|
1303
|
+
t + o,
|
|
1304
|
+
u
|
|
1283
1305
|
);
|
|
1284
1306
|
}
|
|
1285
1307
|
function r(e) {
|
|
1286
|
-
|
|
1287
|
-
const { name:
|
|
1288
|
-
|
|
1289
|
-
|
|
1308
|
+
s.includes(e) || (s.push(e), n.forEach((o) => {
|
|
1309
|
+
const { name: u, alias: d } = o;
|
|
1310
|
+
l(e, u, o), d && d.forEach((y) => {
|
|
1311
|
+
l(e, y, o);
|
|
1290
1312
|
});
|
|
1291
1313
|
}));
|
|
1292
1314
|
}
|