@blueking/ai-blueking 0.3.20 → 0.3.21
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var He = Object.defineProperty;
|
|
2
2
|
var Te = (o, n, e) => n in o ? He(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
|
|
3
|
-
var
|
|
3
|
+
var O = (o, n, e) => (Te(o, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
4
|
import { Popover as Re, Input as ve, Exception as Ve, clickoutside as De, bkTooltips as pe, Tag as xe, Alert as Ee, Button as Ye, Message as fe, Select as be, provideGlobalConfig as Ie } from "bkui-vue";
|
|
5
|
-
import { inject as Ae, ref as Y, onMounted as ae, onBeforeUnmount as le, defineComponent as I, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as
|
|
5
|
+
import { inject as Ae, ref as Y, onMounted as ae, onBeforeUnmount as le, defineComponent as I, withDirectives as q, openBlock as h, createElementBlock as g, createElementVNode as u, toDisplayString as T, unref as c, createCommentVNode as S, vShow as ke, createTextVNode as te, pushScopeId as ie, popScopeId as re, computed as K, normalizeStyle as Z, normalizeClass as ee, createVNode as R, Fragment as j, watch as we, createBlock as U, withCtx as F, renderList as ce, nextTick as Le, withModifiers as E, onBeforeMount as Xe, renderSlot as qe, provide as Ke } from "vue";
|
|
6
6
|
import se from "dayjs";
|
|
7
7
|
import ye from "highlight.js";
|
|
8
8
|
import Ue from "markdown-it";
|
|
@@ -159,14 +159,14 @@ const We = (o) => {
|
|
|
159
159
|
"section",
|
|
160
160
|
_e,
|
|
161
161
|
[
|
|
162
|
-
|
|
162
|
+
u(
|
|
163
163
|
"span",
|
|
164
164
|
$e,
|
|
165
165
|
T(n.text),
|
|
166
166
|
1
|
|
167
167
|
/* TEXT */
|
|
168
168
|
),
|
|
169
|
-
|
|
169
|
+
u(
|
|
170
170
|
"span",
|
|
171
171
|
et,
|
|
172
172
|
T(c(f)("您选择的文本内容")),
|
|
@@ -190,7 +190,7 @@ const We = (o) => {
|
|
|
190
190
|
for (const [s, l] of n)
|
|
191
191
|
e[s] = l;
|
|
192
192
|
return e;
|
|
193
|
-
}, ze = /* @__PURE__ */ A(tt, [["__scopeId", "data-v-3fd96961"]]), ot = (o) => (ie("data-v-a8d839da"), o = o(), re(), o), nt = /* @__PURE__ */ ot(() => /* @__PURE__ */
|
|
193
|
+
}, ze = /* @__PURE__ */ A(tt, [["__scopeId", "data-v-3fd96961"]]), ot = (o) => (ie("data-v-a8d839da"), o = o(), re(), o), nt = /* @__PURE__ */ ot(() => /* @__PURE__ */ u(
|
|
194
194
|
"i",
|
|
195
195
|
{ class: "ai-blueking-icon ai-blueking-xiangxia-2" },
|
|
196
196
|
null,
|
|
@@ -243,14 +243,14 @@ const rt = /* @__PURE__ */ I({
|
|
|
243
243
|
return (l, i) => (h(), g(
|
|
244
244
|
"span",
|
|
245
245
|
{
|
|
246
|
-
style:
|
|
246
|
+
style: Z(e.value),
|
|
247
247
|
class: "message-photo ai"
|
|
248
248
|
},
|
|
249
249
|
[
|
|
250
|
-
|
|
250
|
+
u(
|
|
251
251
|
"i",
|
|
252
252
|
{
|
|
253
|
-
style:
|
|
253
|
+
style: Z(s.value),
|
|
254
254
|
class: "ai-blueking-icon ai-blueking-ai"
|
|
255
255
|
},
|
|
256
256
|
null,
|
|
@@ -277,7 +277,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
277
277
|
height: "16",
|
|
278
278
|
class: "loading-message",
|
|
279
279
|
"aria-hidden": "true"
|
|
280
|
-
}, kt = /* @__PURE__ */
|
|
280
|
+
}, kt = /* @__PURE__ */ u(
|
|
281
281
|
"use",
|
|
282
282
|
{ "xlink:href": "#ai-blueking-quanquan" },
|
|
283
283
|
null,
|
|
@@ -331,12 +331,12 @@ const rt = /* @__PURE__ */ I({
|
|
|
331
331
|
text: t.message.cite
|
|
332
332
|
}, null, 8, ["text"])
|
|
333
333
|
])) : S("v-if", !0),
|
|
334
|
-
|
|
334
|
+
u("div", ut, [
|
|
335
335
|
t.message.role === c(Ce).User ? (h(), g(
|
|
336
|
-
|
|
336
|
+
j,
|
|
337
337
|
{ key: 0 },
|
|
338
338
|
[
|
|
339
|
-
|
|
339
|
+
u("p", pt, [
|
|
340
340
|
i.value ? (h(), g(
|
|
341
341
|
"span",
|
|
342
342
|
ht,
|
|
@@ -344,23 +344,23 @@ const rt = /* @__PURE__ */ I({
|
|
|
344
344
|
1
|
|
345
345
|
/* TEXT */
|
|
346
346
|
)) : S("v-if", !0),
|
|
347
|
-
|
|
347
|
+
u("span", {
|
|
348
348
|
class: "markdown-message",
|
|
349
349
|
innerHTML: l.value
|
|
350
350
|
}, null, 8, mt)
|
|
351
351
|
]),
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
u("span", gt, [
|
|
353
|
+
u("img", { src: t.userPhoto }, null, 8, vt)
|
|
354
354
|
])
|
|
355
355
|
],
|
|
356
356
|
64
|
|
357
357
|
/* STABLE_FRAGMENT */
|
|
358
358
|
)) : (h(), g(
|
|
359
|
-
|
|
359
|
+
j,
|
|
360
360
|
{ key: 1 },
|
|
361
361
|
[
|
|
362
362
|
R(ct),
|
|
363
|
-
|
|
363
|
+
u("p", ft, [
|
|
364
364
|
i.value ? (h(), g(
|
|
365
365
|
"span",
|
|
366
366
|
bt,
|
|
@@ -424,23 +424,23 @@ const rt = /* @__PURE__ */ I({
|
|
|
424
424
|
}, D = () => {
|
|
425
425
|
var v;
|
|
426
426
|
e.value === "/" && ((v = e.prompts) != null && v.length) ? b() : k();
|
|
427
|
-
},
|
|
427
|
+
}, p = () => {
|
|
428
428
|
Le(() => {
|
|
429
429
|
var L;
|
|
430
430
|
const v = (L = y.value) == null ? void 0 : L.$el.querySelector("textarea");
|
|
431
431
|
(v == null ? void 0 : v.scrollHeight) > 40 && e.value ? M.value = v.scrollHeight <= 300 ? v.scrollHeight : 300 : M.value = 40;
|
|
432
432
|
});
|
|
433
433
|
}, x = (v) => {
|
|
434
|
-
s("update:value", v.content), s("choose-prompt", v), k(),
|
|
435
|
-
},
|
|
434
|
+
s("update:value", v.content), s("choose-prompt", v), k(), N();
|
|
435
|
+
}, Q = (v, L) => {
|
|
436
436
|
L.key === "Enter" && !L.shiftKey && (L.preventDefault(), s("enter"));
|
|
437
|
-
},
|
|
437
|
+
}, W = () => {
|
|
438
438
|
H("");
|
|
439
|
-
},
|
|
439
|
+
}, N = () => {
|
|
440
440
|
var L;
|
|
441
441
|
const v = (L = y.value) == null ? void 0 : L.$el.querySelector("textarea");
|
|
442
442
|
v == null || v.focus();
|
|
443
|
-
},
|
|
443
|
+
}, d = () => {
|
|
444
444
|
m.value && (a.value = !0);
|
|
445
445
|
}, b = () => {
|
|
446
446
|
z.value = !0;
|
|
@@ -450,9 +450,9 @@ const rt = /* @__PURE__ */ I({
|
|
|
450
450
|
return we(
|
|
451
451
|
() => e.value,
|
|
452
452
|
() => {
|
|
453
|
-
|
|
453
|
+
p(), D();
|
|
454
454
|
}
|
|
455
|
-
), ae(
|
|
455
|
+
), ae(N), (v, L) => (h(), U(c(Re), {
|
|
456
456
|
width: "calc(100% - 118px)",
|
|
457
457
|
"ext-cls": "empty-padding",
|
|
458
458
|
arrow: !1,
|
|
@@ -463,37 +463,37 @@ const rt = /* @__PURE__ */ I({
|
|
|
463
463
|
theme: "light",
|
|
464
464
|
trigger: "manual"
|
|
465
465
|
}, {
|
|
466
|
-
content:
|
|
466
|
+
content: F(() => {
|
|
467
467
|
var oe;
|
|
468
468
|
return [
|
|
469
|
-
|
|
469
|
+
u("div", null, [
|
|
470
470
|
q((h(), g("section", zt, [
|
|
471
471
|
R(c(ve), {
|
|
472
472
|
class: "input-search",
|
|
473
473
|
modelValue: V.value,
|
|
474
|
-
"onUpdate:modelValue": L[0] || (L[0] = (
|
|
474
|
+
"onUpdate:modelValue": L[0] || (L[0] = (G) => V.value = G),
|
|
475
475
|
behavior: "simplicity",
|
|
476
476
|
clearable: ""
|
|
477
477
|
}, null, 8, ["modelValue"]),
|
|
478
|
-
|
|
478
|
+
u("section", Ct, [
|
|
479
479
|
(h(!0), g(
|
|
480
|
-
|
|
480
|
+
j,
|
|
481
481
|
null,
|
|
482
|
-
ce(B.value, (
|
|
482
|
+
ce(B.value, (G, de) => q((h(), g("span", {
|
|
483
483
|
class: "group-prompt",
|
|
484
484
|
key: de,
|
|
485
|
-
onClick: (ge) => x(
|
|
485
|
+
onClick: (ge) => x(G)
|
|
486
486
|
}, [
|
|
487
|
-
|
|
487
|
+
u(
|
|
488
488
|
"span",
|
|
489
489
|
Bt,
|
|
490
|
-
T(
|
|
490
|
+
T(G.content),
|
|
491
491
|
1
|
|
492
492
|
/* TEXT */
|
|
493
493
|
)
|
|
494
494
|
], 8, Pt)), [
|
|
495
495
|
[c(t), {
|
|
496
|
-
content:
|
|
496
|
+
content: G.content,
|
|
497
497
|
placement: "right",
|
|
498
498
|
theme: "light",
|
|
499
499
|
width: 300,
|
|
@@ -516,11 +516,11 @@ const rt = /* @__PURE__ */ I({
|
|
|
516
516
|
])
|
|
517
517
|
];
|
|
518
518
|
}),
|
|
519
|
-
default:
|
|
520
|
-
|
|
519
|
+
default: F(() => [
|
|
520
|
+
u(
|
|
521
521
|
"section",
|
|
522
522
|
{
|
|
523
|
-
style:
|
|
523
|
+
style: Z({
|
|
524
524
|
"--text-height": M.value + "px"
|
|
525
525
|
}),
|
|
526
526
|
class: "send-prompt-container"
|
|
@@ -537,14 +537,14 @@ const rt = /* @__PURE__ */ I({
|
|
|
537
537
|
placeholder: C.value,
|
|
538
538
|
row: "1",
|
|
539
539
|
type: "textarea",
|
|
540
|
-
onFocus:
|
|
540
|
+
onFocus: d,
|
|
541
541
|
onInput: H,
|
|
542
|
-
onKeydown:
|
|
542
|
+
onKeydown: Q
|
|
543
543
|
}, null, 8, ["model-value", "placeholder"]),
|
|
544
544
|
v.value ? (h(), U(c(je), {
|
|
545
545
|
key: 0,
|
|
546
546
|
class: "show-clear-only-hover bk-input--clear-icon clear-icon",
|
|
547
|
-
onClick:
|
|
547
|
+
onClick: W
|
|
548
548
|
})) : S("v-if", !0)
|
|
549
549
|
],
|
|
550
550
|
4
|
|
@@ -567,7 +567,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
567
567
|
};
|
|
568
568
|
return (l, i) => (h(), g("ul", Rt, [
|
|
569
569
|
(h(!0), g(
|
|
570
|
-
|
|
570
|
+
j,
|
|
571
571
|
null,
|
|
572
572
|
ce(l.shortcuts, (t) => (h(), U(c(xe), {
|
|
573
573
|
class: "ai-blueking-shortcut",
|
|
@@ -575,7 +575,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
575
575
|
theme: "info",
|
|
576
576
|
onClick: (m) => s(t)
|
|
577
577
|
}, {
|
|
578
|
-
default:
|
|
578
|
+
default: F(() => [
|
|
579
579
|
te(
|
|
580
580
|
T(t.label),
|
|
581
581
|
1
|
|
@@ -590,7 +590,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
590
590
|
))
|
|
591
591
|
]));
|
|
592
592
|
}
|
|
593
|
-
}), Dt = /* @__PURE__ */ A(Vt, [["__scopeId", "data-v-266e17ca"]]), xt = (o) => (ie("data-v-fd57f18d"), o = o(), re(), o), Et = /* @__PURE__ */ xt(() => /* @__PURE__ */
|
|
593
|
+
}), Dt = /* @__PURE__ */ A(Vt, [["__scopeId", "data-v-266e17ca"]]), xt = (o) => (ie("data-v-fd57f18d"), o = o(), re(), o), Et = /* @__PURE__ */ xt(() => /* @__PURE__ */ u(
|
|
594
594
|
"svg",
|
|
595
595
|
{
|
|
596
596
|
width: "10",
|
|
@@ -599,7 +599,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
599
599
|
"aria-hidden": "true"
|
|
600
600
|
},
|
|
601
601
|
[
|
|
602
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ u("use", { "xlink:href": "#ai-blueking-tingzhi" })
|
|
603
603
|
],
|
|
604
604
|
-1
|
|
605
605
|
/* HOISTED */
|
|
@@ -651,7 +651,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
651
651
|
) ? "" : (window.showTimes = [...window.showTimes || [], n.message.time], l.isSame(s, "day") ? s.format("HH:mm:ss") : l.subtract(1, "day").isSame(s, "week") ? f("昨天") + " " + s.format("HH:mm:ss") : l.isSame(s, "week") ? f("本周") + i[s.day()] + " " + s.format("HH:mm:ss") : l.subtract(1, "week").isSame(s, "week") ? f("上周") + i[s.day()] + " " + s.format("HH:mm:ss") : l.isSame(s, "year") ? s.format("MM-DD HH:mm:ss") : s.format("YYYY-MM-DD HH:mm:ss"));
|
|
652
652
|
});
|
|
653
653
|
return (s, l) => e.value ? (h(), g("section", At, [
|
|
654
|
-
|
|
654
|
+
u(
|
|
655
655
|
"span",
|
|
656
656
|
Xt,
|
|
657
657
|
T(e.value),
|
|
@@ -666,7 +666,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
666
666
|
height: "18",
|
|
667
667
|
class: "scroll-loading-icon",
|
|
668
668
|
"aria-hidden": "true"
|
|
669
|
-
}, Qt = /* @__PURE__ */ Pe(() => /* @__PURE__ */
|
|
669
|
+
}, Qt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ u(
|
|
670
670
|
"use",
|
|
671
671
|
{ "xlink:href": "#ai-blueking-loading-2" },
|
|
672
672
|
null,
|
|
@@ -674,7 +674,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
674
674
|
/* HOISTED */
|
|
675
675
|
)), jt = [
|
|
676
676
|
Qt
|
|
677
|
-
], Wt = { class: "ai-operation" }, Gt = { class: "ai-operation-input-wrapper" }, Jt = { class: "ai-cite-tips" }, Ot = { class: "ai-operation-input" }, Zt = /* @__PURE__ */ Pe(() => /* @__PURE__ */
|
|
677
|
+
], Wt = { class: "ai-operation" }, Gt = { class: "ai-operation-input-wrapper" }, Jt = { class: "ai-cite-tips" }, Ot = { class: "ai-operation-input" }, Zt = /* @__PURE__ */ Pe(() => /* @__PURE__ */ u(
|
|
678
678
|
"i",
|
|
679
679
|
{ class: "ai-blueking-icon ai-blueking-fasong" },
|
|
680
680
|
null,
|
|
@@ -698,13 +698,13 @@ const rt = /* @__PURE__ */ I({
|
|
|
698
698
|
setup(o, { expose: n, emit: e }) {
|
|
699
699
|
const s = o, l = e, { enablePopup: i } = he(), t = pe, m = Y(""), { selectedText: a, clearSelection: V } = me(i), { isShow: M } = Me(), y = () => {
|
|
700
700
|
Le(() => {
|
|
701
|
-
const
|
|
702
|
-
|
|
701
|
+
const d = document.querySelector(".ai-blueking-messages");
|
|
702
|
+
d.scrollTop = d.scrollHeight;
|
|
703
703
|
});
|
|
704
|
-
}, z = Je((
|
|
704
|
+
}, z = Je((d) => {
|
|
705
705
|
if (s.scrollLoading || s.scrollLoadingEnd)
|
|
706
706
|
return;
|
|
707
|
-
|
|
707
|
+
d.target.scrollTop < 200 && l("scroll-load");
|
|
708
708
|
}), B = () => {
|
|
709
709
|
if (m.value) {
|
|
710
710
|
if (s.loading) {
|
|
@@ -716,33 +716,33 @@ const rt = /* @__PURE__ */ I({
|
|
|
716
716
|
cite: a.value
|
|
717
717
|
}), m.value = "", a.value = "";
|
|
718
718
|
}
|
|
719
|
-
}, C = (
|
|
720
|
-
l("choose-prompt",
|
|
721
|
-
}, H = (
|
|
722
|
-
l("change-prompt",
|
|
719
|
+
}, C = (d) => {
|
|
720
|
+
l("choose-prompt", d);
|
|
721
|
+
}, H = (d) => {
|
|
722
|
+
l("change-prompt", d);
|
|
723
723
|
}, D = () => {
|
|
724
724
|
l("stop");
|
|
725
|
-
},
|
|
726
|
-
const b =
|
|
725
|
+
}, p = (d) => {
|
|
726
|
+
const b = d.target;
|
|
727
727
|
if (b != null && b.classList.contains("ai-blueking-angle-up")) {
|
|
728
728
|
const k = b == null ? void 0 : b.parentElement;
|
|
729
729
|
k != null && k.classList.contains("closed") ? k == null || k.classList.remove("closed") : k == null || k.classList.add("closed");
|
|
730
730
|
}
|
|
731
731
|
b != null && b.classList.contains("ai-clickable") && l("ai-click", b.dataset.ai);
|
|
732
732
|
}, x = () => {
|
|
733
|
-
y(), document.addEventListener("click",
|
|
734
|
-
},
|
|
735
|
-
window.showTimes = [], document.removeEventListener("click",
|
|
736
|
-
},
|
|
737
|
-
m.value =
|
|
738
|
-
},
|
|
739
|
-
const b =
|
|
733
|
+
y(), document.addEventListener("click", p);
|
|
734
|
+
}, Q = () => {
|
|
735
|
+
window.showTimes = [], document.removeEventListener("click", p);
|
|
736
|
+
}, W = (d) => {
|
|
737
|
+
m.value = d;
|
|
738
|
+
}, N = (d) => {
|
|
739
|
+
const b = d.prompt.replace("{{ SELECTED_TEXT }}", a.value);
|
|
740
740
|
if (s.loading) {
|
|
741
741
|
fe({ theme: "warning", message: f("内容正在执行中,请执行完成后再发送") });
|
|
742
742
|
return;
|
|
743
743
|
}
|
|
744
744
|
l("send", {
|
|
745
|
-
content:
|
|
745
|
+
content: d.label,
|
|
746
746
|
cite: a.value,
|
|
747
747
|
prompt: b
|
|
748
748
|
}), a.value = "";
|
|
@@ -750,30 +750,30 @@ const rt = /* @__PURE__ */ I({
|
|
|
750
750
|
return we(
|
|
751
751
|
() => s.messages,
|
|
752
752
|
() => {
|
|
753
|
-
const
|
|
754
|
-
(
|
|
753
|
+
const d = document.querySelector(".ai-blueking-messages");
|
|
754
|
+
(d == null ? void 0 : d.scrollTop) + (d == null ? void 0 : d.clientHeight) + 100 >= (d == null ? void 0 : d.scrollHeight) && y();
|
|
755
755
|
},
|
|
756
756
|
{
|
|
757
757
|
deep: !0
|
|
758
758
|
}
|
|
759
|
-
), ae(x), le(
|
|
760
|
-
setInputMessage:
|
|
761
|
-
}), (
|
|
759
|
+
), ae(x), le(Q), n({
|
|
760
|
+
setInputMessage: W
|
|
761
|
+
}), (d, b) => (h(), g(
|
|
762
762
|
"section",
|
|
763
763
|
{
|
|
764
|
-
style:
|
|
765
|
-
background:
|
|
764
|
+
style: Z({
|
|
765
|
+
background: d.background
|
|
766
766
|
}),
|
|
767
767
|
class: "ai-content"
|
|
768
768
|
},
|
|
769
769
|
[
|
|
770
|
-
|
|
770
|
+
d.alert ? (h(), U(c(Ee), {
|
|
771
771
|
key: 0,
|
|
772
|
-
title:
|
|
772
|
+
title: d.alert,
|
|
773
773
|
theme: "warning",
|
|
774
774
|
closable: ""
|
|
775
775
|
}, null, 8, ["title"])) : S("v-if", !0),
|
|
776
|
-
|
|
776
|
+
u(
|
|
777
777
|
"ul",
|
|
778
778
|
{
|
|
779
779
|
class: "ai-messages ai-blueking-messages",
|
|
@@ -781,12 +781,12 @@ const rt = /* @__PURE__ */ I({
|
|
|
781
781
|
(...k) => c(z) && c(z)(...k))
|
|
782
782
|
},
|
|
783
783
|
[
|
|
784
|
-
|
|
784
|
+
d.scrollLoading ? (h(), g("svg", Ut, jt)) : S("v-if", !0),
|
|
785
785
|
(h(!0), g(
|
|
786
|
-
|
|
786
|
+
j,
|
|
787
787
|
null,
|
|
788
|
-
ce(
|
|
789
|
-
|
|
788
|
+
ce(d.messages, (k) => (h(), g(
|
|
789
|
+
j,
|
|
790
790
|
{
|
|
791
791
|
key: k.content
|
|
792
792
|
},
|
|
@@ -798,7 +798,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
798
798
|
R(Mt, {
|
|
799
799
|
class: "render-message",
|
|
800
800
|
message: k,
|
|
801
|
-
"user-photo":
|
|
801
|
+
"user-photo": d.userPhoto
|
|
802
802
|
}, null, 8, ["message", "user-photo"])
|
|
803
803
|
],
|
|
804
804
|
64
|
|
@@ -811,8 +811,8 @@ const rt = /* @__PURE__ */ I({
|
|
|
811
811
|
32
|
|
812
812
|
/* NEED_HYDRATION */
|
|
813
813
|
),
|
|
814
|
-
|
|
815
|
-
|
|
814
|
+
u("section", Wt, [
|
|
815
|
+
u(
|
|
816
816
|
"section",
|
|
817
817
|
{
|
|
818
818
|
class: "ai-operation-tools",
|
|
@@ -822,14 +822,14 @@ const rt = /* @__PURE__ */ I({
|
|
|
822
822
|
[
|
|
823
823
|
R(at),
|
|
824
824
|
R(It, {
|
|
825
|
-
"is-show":
|
|
825
|
+
"is-show": d.loading,
|
|
826
826
|
onStop: D
|
|
827
827
|
}, null, 8, ["is-show"])
|
|
828
828
|
],
|
|
829
829
|
32
|
|
830
830
|
/* NEED_HYDRATION */
|
|
831
831
|
),
|
|
832
|
-
|
|
832
|
+
u("section", Gt, [
|
|
833
833
|
c(a) ? (h(), g(
|
|
834
834
|
"div",
|
|
835
835
|
{
|
|
@@ -844,7 +844,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
844
844
|
text: c(a),
|
|
845
845
|
onClose: c(V)
|
|
846
846
|
}, null, 8, ["text", "onClose"]),
|
|
847
|
-
|
|
847
|
+
u(
|
|
848
848
|
"span",
|
|
849
849
|
Jt,
|
|
850
850
|
T(c(f)("想对选中的文本做什么")),
|
|
@@ -852,31 +852,31 @@ const rt = /* @__PURE__ */ I({
|
|
|
852
852
|
/* TEXT */
|
|
853
853
|
),
|
|
854
854
|
R(Dt, {
|
|
855
|
-
shortcuts:
|
|
856
|
-
onSelect:
|
|
855
|
+
shortcuts: d.shortcuts,
|
|
856
|
+
onSelect: N
|
|
857
857
|
}, null, 8, ["shortcuts"])
|
|
858
858
|
],
|
|
859
859
|
34
|
|
860
860
|
/* CLASS, NEED_HYDRATION */
|
|
861
861
|
)) : S("v-if", !0),
|
|
862
|
-
|
|
862
|
+
u("section", Ot, [
|
|
863
863
|
R(Tt, {
|
|
864
864
|
value: m.value,
|
|
865
865
|
"onUpdate:value": b[3] || (b[3] = (k) => m.value = k),
|
|
866
|
-
placeholder:
|
|
867
|
-
prompts:
|
|
866
|
+
placeholder: d.placeholder,
|
|
867
|
+
prompts: d.prompts,
|
|
868
868
|
onChangePrompt: H,
|
|
869
869
|
onChoosePrompt: C,
|
|
870
870
|
onEnter: B
|
|
871
871
|
}, null, 8, ["value", "placeholder", "prompts"]),
|
|
872
872
|
q((h(), U(c(Ye), {
|
|
873
873
|
class: "ai-operation-button",
|
|
874
|
-
disabled:
|
|
874
|
+
disabled: d.loading || !m.value,
|
|
875
875
|
size: "large",
|
|
876
876
|
theme: "primary",
|
|
877
877
|
onClick: B
|
|
878
878
|
}, {
|
|
879
|
-
default:
|
|
879
|
+
default: F(() => [
|
|
880
880
|
Zt,
|
|
881
881
|
te(
|
|
882
882
|
" " + T(c(f)("发送")),
|
|
@@ -889,7 +889,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
889
889
|
}, 8, ["disabled"])), [
|
|
890
890
|
[c(t), {
|
|
891
891
|
content: c(f)("内容正在执行中,请执行完成后再发送"),
|
|
892
|
-
disabled: !
|
|
892
|
+
disabled: !d.loading
|
|
893
893
|
}]
|
|
894
894
|
])
|
|
895
895
|
])
|
|
@@ -936,13 +936,13 @@ const rt = /* @__PURE__ */ I({
|
|
|
936
936
|
clientX: 0,
|
|
937
937
|
clientY: 0
|
|
938
938
|
}, a = Y((() => {
|
|
939
|
-
var w, P, X,
|
|
939
|
+
var w, P, X, J;
|
|
940
940
|
const r = (_, Be) => _ === void 0 ? Be : _;
|
|
941
941
|
return {
|
|
942
942
|
top: r((w = e.startPosition) == null ? void 0 : w.top, i.height - e.sizeLimit.height),
|
|
943
943
|
bottom: r((P = e.startPosition) == null ? void 0 : P.bottom, 0),
|
|
944
944
|
left: r((X = e.startPosition) == null ? void 0 : X.left, 0),
|
|
945
|
-
right: r((
|
|
945
|
+
right: r((J = e.startPosition) == null ? void 0 : J.right, i.width - e.sizeLimit.width)
|
|
946
946
|
};
|
|
947
947
|
})()), V = K(() => a.value.top <= e.positionLimit.top && a.value.bottom <= e.positionLimit.bottom), M = (r) => {
|
|
948
948
|
s("choose-model", r);
|
|
@@ -962,23 +962,23 @@ const rt = /* @__PURE__ */ I({
|
|
|
962
962
|
y(), t.isMove = !0, t.type = "leftDrag", t.clientX = r.clientX;
|
|
963
963
|
}, D = (r) => {
|
|
964
964
|
y(), t.isMove = !0, t.type = "topDrag", t.clientY = r.clientY;
|
|
965
|
-
},
|
|
965
|
+
}, p = (r) => {
|
|
966
966
|
y(), t.isMove = !0, t.type = "bottomDrag", t.clientY = r.clientY;
|
|
967
967
|
}, x = (r) => {
|
|
968
968
|
y(), t.isMove = !0, t.type = "topLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
|
|
969
|
-
},
|
|
969
|
+
}, Q = (r) => {
|
|
970
970
|
y(), t.isMove = !0, t.type = "topRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
|
|
971
|
-
},
|
|
971
|
+
}, W = (r) => {
|
|
972
972
|
y(), t.isMove = !0, t.type = "bottomLeftDrag", t.clientY = r.clientY, t.clientX = r.clientX;
|
|
973
|
-
},
|
|
973
|
+
}, N = (r) => {
|
|
974
974
|
y(), t.isMove = !0, t.type = "bottomRightDrag", t.clientY = r.clientY, t.clientX = r.clientX;
|
|
975
|
-
},
|
|
975
|
+
}, d = () => {
|
|
976
976
|
t.isMove = !1, z();
|
|
977
977
|
}, b = (r, w) => {
|
|
978
978
|
["move", "leftDrag"].includes(t.type) && (a.value.left += r), ["move", "rightDrag"].includes(t.type) && (a.value.right -= r), ["move", "topDrag"].includes(t.type) && (a.value.top += w), ["move", "bottomDrag"].includes(t.type) && (a.value.bottom -= w), ["topLeftDrag"].includes(t.type) && (a.value.left += r, a.value.top += w), ["topRightDrag"].includes(t.type) && (a.value.right -= r, a.value.top += w), ["bottomLeftDrag"].includes(t.type) && (a.value.left += r, a.value.bottom -= w), ["bottomRightDrag"].includes(t.type) && (a.value.right -= r, a.value.bottom -= w);
|
|
979
979
|
}, k = (r, w) => {
|
|
980
|
-
const { top: P, bottom: X, left:
|
|
981
|
-
(i.width -
|
|
980
|
+
const { top: P, bottom: X, left: J, right: _ } = a.value;
|
|
981
|
+
(i.width - J - _ < e.sizeLimit.width || J < e.positionLimit.left || _ < e.positionLimit.right) && (["move", "leftDrag", "topLeftDrag", "bottomLeftDrag"].includes(t.type) && (a.value.left -= r), ["move", "rightDrag", "topRightDrag", "bottomRightDrag"].includes(t.type) && (a.value.right += r)), (i.height - P - X < e.sizeLimit.height || P < e.positionLimit.top || X < e.positionLimit.bottom) && (["move", "topDrag", "topRightDrag", "topLeftDrag"].includes(t.type) && (a.value.top -= w), ["move", "bottomDrag", "bottomLeftDrag", "bottomRightDrag"].includes(t.type) && (a.value.bottom += w));
|
|
982
982
|
}, v = (r) => {
|
|
983
983
|
if (!t.isMove)
|
|
984
984
|
return;
|
|
@@ -988,13 +988,13 @@ const rt = /* @__PURE__ */ I({
|
|
|
988
988
|
}, L = () => {
|
|
989
989
|
const r = window.innerWidth - i.width, w = window.innerHeight - i.height;
|
|
990
990
|
i.height = window.innerHeight, i.width = window.innerWidth;
|
|
991
|
-
const P = (X,
|
|
992
|
-
a.value[X] +=
|
|
991
|
+
const P = (X, J) => {
|
|
992
|
+
a.value[X] += J, a.value[X] < 0 && (a.value[X] = 0);
|
|
993
993
|
};
|
|
994
994
|
P(a.value.top > a.value.bottom ? "top" : "bottom", w), P(a.value.left > a.value.right ? "left" : "right", r);
|
|
995
995
|
}, oe = () => {
|
|
996
996
|
a.value.top = e.positionLimit.top, a.value.bottom = e.positionLimit.bottom;
|
|
997
|
-
},
|
|
997
|
+
}, G = () => {
|
|
998
998
|
a.value.top = i.height - e.sizeLimit.height, a.value.bottom = e.positionLimit.bottom;
|
|
999
999
|
}, de = () => {
|
|
1000
1000
|
s("clear");
|
|
@@ -1002,13 +1002,13 @@ const rt = /* @__PURE__ */ I({
|
|
|
1002
1002
|
s("close");
|
|
1003
1003
|
};
|
|
1004
1004
|
return Xe(() => {
|
|
1005
|
-
window.addEventListener("mousemove", v, !0), window.addEventListener("mouseup",
|
|
1005
|
+
window.addEventListener("mousemove", v, !0), window.addEventListener("mouseup", d), window.addEventListener("resize", L);
|
|
1006
1006
|
}), le(() => {
|
|
1007
|
-
window.removeEventListener("mousemove", v, !0), window.removeEventListener("mouseup",
|
|
1007
|
+
window.removeEventListener("mousemove", v, !0), window.removeEventListener("mouseup", d), window.removeEventListener("resize", L);
|
|
1008
1008
|
}), (r, w) => (h(), g(
|
|
1009
1009
|
"section",
|
|
1010
1010
|
{
|
|
1011
|
-
style:
|
|
1011
|
+
style: Z({
|
|
1012
1012
|
top: a.value.top + "px",
|
|
1013
1013
|
bottom: a.value.bottom + "px",
|
|
1014
1014
|
left: a.value.left + "px",
|
|
@@ -1017,18 +1017,18 @@ const rt = /* @__PURE__ */ I({
|
|
|
1017
1017
|
class: "ai-modal"
|
|
1018
1018
|
},
|
|
1019
1019
|
[
|
|
1020
|
-
|
|
1020
|
+
u(
|
|
1021
1021
|
"header",
|
|
1022
1022
|
{
|
|
1023
|
-
style:
|
|
1023
|
+
style: Z({
|
|
1024
1024
|
background: r.headBackground
|
|
1025
1025
|
}),
|
|
1026
1026
|
class: "ai-modal-header",
|
|
1027
1027
|
onMousedown: E(B, ["stop"])
|
|
1028
1028
|
},
|
|
1029
1029
|
[
|
|
1030
|
-
|
|
1031
|
-
|
|
1030
|
+
u("span", _t, [
|
|
1031
|
+
u(
|
|
1032
1032
|
"i",
|
|
1033
1033
|
{
|
|
1034
1034
|
class: ee(r.logo)
|
|
@@ -1049,9 +1049,9 @@ const rt = /* @__PURE__ */ I({
|
|
|
1049
1049
|
size: "small",
|
|
1050
1050
|
onChange: M
|
|
1051
1051
|
}, {
|
|
1052
|
-
default:
|
|
1052
|
+
default: F(() => [
|
|
1053
1053
|
(h(!0), g(
|
|
1054
|
-
|
|
1054
|
+
j,
|
|
1055
1055
|
null,
|
|
1056
1056
|
ce(r.models, (P) => (h(), U(c(be).Option, {
|
|
1057
1057
|
key: P.id,
|
|
@@ -1066,13 +1066,13 @@ const rt = /* @__PURE__ */ I({
|
|
|
1066
1066
|
/* STABLE */
|
|
1067
1067
|
}, 8, ["model-value"])) : S("v-if", !0)
|
|
1068
1068
|
]),
|
|
1069
|
-
|
|
1069
|
+
u("span", null, [
|
|
1070
1070
|
V.value ? q((h(), g(
|
|
1071
1071
|
"i",
|
|
1072
1072
|
{
|
|
1073
1073
|
key: 0,
|
|
1074
1074
|
class: "ai-header-tool ai-blueking-icon ai-blueking-shangxiajuhe",
|
|
1075
|
-
onClick:
|
|
1075
|
+
onClick: G
|
|
1076
1076
|
},
|
|
1077
1077
|
null,
|
|
1078
1078
|
512
|
|
@@ -1098,7 +1098,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1098
1098
|
distance: 20
|
|
1099
1099
|
}]
|
|
1100
1100
|
]),
|
|
1101
|
-
q(
|
|
1101
|
+
q(u(
|
|
1102
1102
|
"i",
|
|
1103
1103
|
{
|
|
1104
1104
|
class: "ai-header-tool ai-blueking-icon ai-blueking-saoba",
|
|
@@ -1113,7 +1113,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1113
1113
|
distance: 20
|
|
1114
1114
|
}]
|
|
1115
1115
|
]),
|
|
1116
|
-
q(
|
|
1116
|
+
q(u(
|
|
1117
1117
|
"i",
|
|
1118
1118
|
{
|
|
1119
1119
|
class: "ai-header-tool ai-blueking-icon ai-blueking-shanchu-2",
|
|
@@ -1134,7 +1134,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1134
1134
|
/* STYLE, NEED_HYDRATION */
|
|
1135
1135
|
),
|
|
1136
1136
|
qe(r.$slots, "default", {}, void 0, !0),
|
|
1137
|
-
|
|
1137
|
+
u(
|
|
1138
1138
|
"span",
|
|
1139
1139
|
{
|
|
1140
1140
|
class: "drag-line left",
|
|
@@ -1144,7 +1144,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1144
1144
|
32
|
|
1145
1145
|
/* NEED_HYDRATION */
|
|
1146
1146
|
),
|
|
1147
|
-
|
|
1147
|
+
u(
|
|
1148
1148
|
"span",
|
|
1149
1149
|
{
|
|
1150
1150
|
class: "drag-line right",
|
|
@@ -1154,7 +1154,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1154
1154
|
32
|
|
1155
1155
|
/* NEED_HYDRATION */
|
|
1156
1156
|
),
|
|
1157
|
-
|
|
1157
|
+
u(
|
|
1158
1158
|
"span",
|
|
1159
1159
|
{
|
|
1160
1160
|
class: "drag-line top",
|
|
@@ -1164,17 +1164,17 @@ const rt = /* @__PURE__ */ I({
|
|
|
1164
1164
|
32
|
|
1165
1165
|
/* NEED_HYDRATION */
|
|
1166
1166
|
),
|
|
1167
|
-
|
|
1167
|
+
u(
|
|
1168
1168
|
"span",
|
|
1169
1169
|
{
|
|
1170
1170
|
class: "drag-line bottom",
|
|
1171
|
-
onMousedown: E(
|
|
1171
|
+
onMousedown: E(p, ["stop"])
|
|
1172
1172
|
},
|
|
1173
1173
|
null,
|
|
1174
1174
|
32
|
|
1175
1175
|
/* NEED_HYDRATION */
|
|
1176
1176
|
),
|
|
1177
|
-
|
|
1177
|
+
u(
|
|
1178
1178
|
"span",
|
|
1179
1179
|
{
|
|
1180
1180
|
class: "drag-line top-left-corner",
|
|
@@ -1184,31 +1184,31 @@ const rt = /* @__PURE__ */ I({
|
|
|
1184
1184
|
32
|
|
1185
1185
|
/* NEED_HYDRATION */
|
|
1186
1186
|
),
|
|
1187
|
-
|
|
1187
|
+
u(
|
|
1188
1188
|
"span",
|
|
1189
1189
|
{
|
|
1190
1190
|
class: "drag-line top-right-corner",
|
|
1191
|
-
onMousedown: E(
|
|
1191
|
+
onMousedown: E(Q, ["stop"])
|
|
1192
1192
|
},
|
|
1193
1193
|
null,
|
|
1194
1194
|
32
|
|
1195
1195
|
/* NEED_HYDRATION */
|
|
1196
1196
|
),
|
|
1197
|
-
|
|
1197
|
+
u(
|
|
1198
1198
|
"span",
|
|
1199
1199
|
{
|
|
1200
1200
|
class: "drag-line bottom-left-corner",
|
|
1201
|
-
onMousedown: E(
|
|
1201
|
+
onMousedown: E(W, ["stop"])
|
|
1202
1202
|
},
|
|
1203
1203
|
null,
|
|
1204
1204
|
32
|
|
1205
1205
|
/* NEED_HYDRATION */
|
|
1206
1206
|
),
|
|
1207
|
-
|
|
1207
|
+
u(
|
|
1208
1208
|
"span",
|
|
1209
1209
|
{
|
|
1210
1210
|
class: "drag-line bottom-right-corner",
|
|
1211
|
-
onMousedown: E(
|
|
1211
|
+
onMousedown: E(N, ["stop"])
|
|
1212
1212
|
},
|
|
1213
1213
|
null,
|
|
1214
1214
|
32
|
|
@@ -1219,7 +1219,7 @@ const rt = /* @__PURE__ */ I({
|
|
|
1219
1219
|
/* STYLE */
|
|
1220
1220
|
));
|
|
1221
1221
|
}
|
|
1222
|
-
}), eo = /* @__PURE__ */ A($t, [["__scopeId", "data-v-e67f8e05"]]), to = (o) => (ie("data-v-367a166a"), o = o(), re(), o), oo = /* @__PURE__ */ to(() => /* @__PURE__ */
|
|
1222
|
+
}), eo = /* @__PURE__ */ A($t, [["__scopeId", "data-v-e67f8e05"]]), to = (o) => (ie("data-v-367a166a"), o = o(), re(), o), oo = /* @__PURE__ */ to(() => /* @__PURE__ */ u(
|
|
1223
1223
|
"i",
|
|
1224
1224
|
{ class: "ai-blueking-icon ai-blueking-ai" },
|
|
1225
1225
|
null,
|
|
@@ -1236,18 +1236,18 @@ const rt = /* @__PURE__ */ I({
|
|
|
1236
1236
|
"div",
|
|
1237
1237
|
{
|
|
1238
1238
|
key: 0,
|
|
1239
|
-
style:
|
|
1239
|
+
style: Z(c(l)),
|
|
1240
1240
|
class: "ai-blueking-render-popup",
|
|
1241
1241
|
onMousedown: a[0] || (a[0] = E(() => {
|
|
1242
1242
|
}, ["prevent"]))
|
|
1243
1243
|
},
|
|
1244
1244
|
[
|
|
1245
|
-
|
|
1245
|
+
u("div", {
|
|
1246
1246
|
class: "popup-content",
|
|
1247
1247
|
onClick: t
|
|
1248
1248
|
}, [
|
|
1249
1249
|
oo,
|
|
1250
|
-
|
|
1250
|
+
u(
|
|
1251
1251
|
"span",
|
|
1252
1252
|
no,
|
|
1253
1253
|
T(c(f)("问小鲸")),
|
|
@@ -1287,63 +1287,63 @@ const rt = /* @__PURE__ */ I({
|
|
|
1287
1287
|
emits: ["clear", "close", "scroll-load", "stop", "ai-click", "change-prompt", "update:model", "choose-prompt", "send", "update:isShow"],
|
|
1288
1288
|
setup(o, { expose: n, emit: e }) {
|
|
1289
1289
|
Ke(Se, o.enablePopup);
|
|
1290
|
-
const l = e, i = Y(), t = (
|
|
1290
|
+
const l = e, i = Y(), t = (p) => {
|
|
1291
1291
|
var x;
|
|
1292
|
-
(x = i.value) == null || x.setInputMessage(
|
|
1292
|
+
(x = i.value) == null || x.setInputMessage(p);
|
|
1293
1293
|
}, m = () => {
|
|
1294
1294
|
l("update:isShow", !0);
|
|
1295
1295
|
}, a = () => {
|
|
1296
1296
|
l("clear");
|
|
1297
1297
|
}, V = () => {
|
|
1298
1298
|
l("update:isShow", !1), l("close");
|
|
1299
|
-
}, M = (
|
|
1300
|
-
l("update:model",
|
|
1301
|
-
}, y = (
|
|
1302
|
-
l("send",
|
|
1299
|
+
}, M = (p) => {
|
|
1300
|
+
l("update:model", p);
|
|
1301
|
+
}, y = (p) => {
|
|
1302
|
+
l("send", p);
|
|
1303
1303
|
}, z = () => {
|
|
1304
1304
|
l("stop");
|
|
1305
1305
|
}, B = () => {
|
|
1306
1306
|
l("scroll-load");
|
|
1307
|
-
}, C = (
|
|
1308
|
-
l("ai-click",
|
|
1309
|
-
}, H = (
|
|
1310
|
-
l("choose-prompt",
|
|
1311
|
-
}, D = (
|
|
1312
|
-
l("change-prompt",
|
|
1307
|
+
}, C = (p) => {
|
|
1308
|
+
l("ai-click", p);
|
|
1309
|
+
}, H = (p) => {
|
|
1310
|
+
l("choose-prompt", p);
|
|
1311
|
+
}, D = (p) => {
|
|
1312
|
+
l("change-prompt", p);
|
|
1313
1313
|
};
|
|
1314
1314
|
return n({
|
|
1315
1315
|
setInputMessage: t
|
|
1316
|
-
}), (
|
|
1317
|
-
|
|
1316
|
+
}), (p, x) => (h(), g(
|
|
1317
|
+
j,
|
|
1318
1318
|
null,
|
|
1319
1319
|
[
|
|
1320
1320
|
q(R(eo, {
|
|
1321
|
-
"head-background":
|
|
1322
|
-
logo:
|
|
1323
|
-
model:
|
|
1324
|
-
models:
|
|
1325
|
-
name:
|
|
1326
|
-
"position-limit":
|
|
1327
|
-
"size-limit":
|
|
1328
|
-
"start-position":
|
|
1321
|
+
"head-background": p.headBackground,
|
|
1322
|
+
logo: p.logo,
|
|
1323
|
+
model: p.model,
|
|
1324
|
+
models: p.models,
|
|
1325
|
+
name: p.name,
|
|
1326
|
+
"position-limit": p.positionLimit,
|
|
1327
|
+
"size-limit": p.sizeLimit,
|
|
1328
|
+
"start-position": p.startPosition,
|
|
1329
1329
|
onChooseModel: M,
|
|
1330
1330
|
onClear: a,
|
|
1331
1331
|
onClose: V
|
|
1332
1332
|
}, {
|
|
1333
|
-
default:
|
|
1333
|
+
default: F(() => [
|
|
1334
1334
|
R(Ft, {
|
|
1335
1335
|
ref_key: "contentRef",
|
|
1336
1336
|
ref: i,
|
|
1337
|
-
alert:
|
|
1338
|
-
background:
|
|
1339
|
-
loading:
|
|
1340
|
-
messages:
|
|
1341
|
-
placeholder:
|
|
1342
|
-
prompts:
|
|
1343
|
-
"scroll-loading":
|
|
1344
|
-
"scroll-loading-end":
|
|
1345
|
-
shortcuts:
|
|
1346
|
-
"user-photo":
|
|
1337
|
+
alert: p.alert,
|
|
1338
|
+
background: p.background,
|
|
1339
|
+
loading: p.loading,
|
|
1340
|
+
messages: p.messages,
|
|
1341
|
+
placeholder: p.placeholder,
|
|
1342
|
+
prompts: p.prompts,
|
|
1343
|
+
"scroll-loading": p.scrollLoading,
|
|
1344
|
+
"scroll-loading-end": p.scrollLoadingEnd,
|
|
1345
|
+
shortcuts: p.shortcuts,
|
|
1346
|
+
"user-photo": p.userPhoto,
|
|
1347
1347
|
onAiClick: C,
|
|
1348
1348
|
onChangePrompt: D,
|
|
1349
1349
|
onChoosePrompt: H,
|
|
@@ -1355,9 +1355,9 @@ const rt = /* @__PURE__ */ I({
|
|
|
1355
1355
|
_: 1
|
|
1356
1356
|
/* STABLE */
|
|
1357
1357
|
}, 8, ["head-background", "logo", "model", "models", "name", "position-limit", "size-limit", "start-position"]), [
|
|
1358
|
-
[ke,
|
|
1358
|
+
[ke, p.isShow]
|
|
1359
1359
|
]),
|
|
1360
|
-
|
|
1360
|
+
p.enablePopup !== !1 ? (h(), U(ao, {
|
|
1361
1361
|
key: 0,
|
|
1362
1362
|
onClick: m
|
|
1363
1363
|
})) : S("v-if", !0)
|
|
@@ -1392,12 +1392,12 @@ const lo = (o) => {
|
|
|
1392
1392
|
};
|
|
1393
1393
|
class fo {
|
|
1394
1394
|
constructor(n, e, s, l, i) {
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1395
|
+
O(this, "controllerMap");
|
|
1396
|
+
O(this, "handleEnd");
|
|
1397
|
+
O(this, "handleError");
|
|
1398
|
+
O(this, "handleReceiveMessage");
|
|
1399
|
+
O(this, "handleStart");
|
|
1400
|
+
O(this, "url");
|
|
1401
1401
|
this.url = n, this.handleStart = e, this.handleReceiveMessage = s, this.handleEnd = l, this.handleError = i, this.controllerMap = {};
|
|
1402
1402
|
}
|
|
1403
1403
|
stop(n) {
|
|
@@ -1434,9 +1434,9 @@ class fo {
|
|
|
1434
1434
|
`).forEach((y) => {
|
|
1435
1435
|
const z = y.replace("data:", "").trim();
|
|
1436
1436
|
if (Ge(z)) {
|
|
1437
|
-
const { event: B, content: C,
|
|
1438
|
-
if (
|
|
1439
|
-
this.handleError(
|
|
1437
|
+
const { event: B, content: C, cover: H, documents: D, result: p, code: x, message: Q } = JSON.parse(z);
|
|
1438
|
+
if (p === !1 || i.status !== 200) {
|
|
1439
|
+
this.handleError(Q, x, e);
|
|
1440
1440
|
return;
|
|
1441
1441
|
}
|
|
1442
1442
|
switch (B) {
|
|
@@ -1444,14 +1444,14 @@ class fo {
|
|
|
1444
1444
|
this.handleReceiveMessage(C, e);
|
|
1445
1445
|
break;
|
|
1446
1446
|
case "reference_doc":
|
|
1447
|
-
const
|
|
1448
|
-
this.handleReceiveMessage(
|
|
1447
|
+
const W = lo(D);
|
|
1448
|
+
this.handleReceiveMessage(W, e);
|
|
1449
1449
|
break;
|
|
1450
1450
|
case "done":
|
|
1451
|
-
this.handleEnd(e, C);
|
|
1451
|
+
this.handleEnd(e, H ? C : "");
|
|
1452
1452
|
break;
|
|
1453
1453
|
case "error":
|
|
1454
|
-
this.handleError(
|
|
1454
|
+
this.handleError(Q, x, e);
|
|
1455
1455
|
break;
|
|
1456
1456
|
}
|
|
1457
1457
|
} else
|