@blueking/ai-blueking 1.2.3 → 1.2.4-beta.1
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/vue2/{arc-CoITCIeg.mjs → arc-Drr1lna9.mjs} +1 -1
- package/dist/vue2/{blockDiagram-38ab4fdb-B79ALQFr.mjs → blockDiagram-38ab4fdb-8VEckXli.mjs} +5 -5
- package/dist/{vue3/c4Diagram-3d4e48cf-DBY6dYfi.mjs → vue2/c4Diagram-3d4e48cf-D1St4KBG.mjs} +2 -2
- package/dist/{vue3/channel-B_u2Kbah.mjs → vue2/channel-BTGSeZkN.mjs} +1 -1
- package/dist/vue2/{classDiagram-70f12bd4-TUGX41Hr.mjs → classDiagram-70f12bd4-zJlK-CVS.mjs} +5 -5
- package/dist/vue2/{classDiagram-v2-f2320105-DD7zTzsZ.mjs → classDiagram-v2-f2320105-Bn1PI3qD.mjs} +5 -5
- package/dist/vue2/{clone-kSlC3ZuF.mjs → clone-DSRoKuoN.mjs} +1 -1
- package/dist/vue2/{createText-2e5e7dd3-Bs4zLwec.mjs → createText-2e5e7dd3-DqsPaEjK.mjs} +1 -1
- package/dist/{vue3/edges-e0da2a9e-cskaPHoA.mjs → vue2/edges-e0da2a9e-DguIlV36.mjs} +3 -3
- package/dist/{vue3/erDiagram-9861fffd-cZK-bNAM.mjs → vue2/erDiagram-9861fffd--l5rdh7F.mjs} +4 -4
- package/dist/vue2/{flowDb-956e92f1-DqLnUF-k.mjs → flowDb-956e92f1-DSnaz_zm.mjs} +1 -1
- package/dist/{vue3/flowDiagram-66a62f08-DalCgmrg.mjs → vue2/flowDiagram-66a62f08-BCSGtMBp.mjs} +6 -6
- package/dist/vue2/{flowDiagram-v2-96b9c2cf-CIEmz0g3.mjs → flowDiagram-v2-96b9c2cf-D0VnA-oM.mjs} +5 -5
- package/dist/vue2/{flowchart-elk-definition-4a651766-j2EoWTmc.mjs → flowchart-elk-definition-4a651766-B-EPmTHz.mjs} +4 -4
- package/dist/{vue3/ganttDiagram-c361ad54-Cs4P9X7B.mjs → vue2/ganttDiagram-c361ad54-CIn9qcKu.mjs} +2 -2
- package/dist/vue2/{gitGraphDiagram-72cf32ee-BCTVjY7p.mjs → gitGraphDiagram-72cf32ee-Q3MoJoM_.mjs} +1 -1
- package/dist/vue2/{graph-Dcxz709E.mjs → graph-CqTVh0y2.mjs} +1 -1
- package/dist/{vue3/index-3862675e-C7lJNnnh.mjs → vue2/index-3862675e-CBZFDFaT.mjs} +6 -6
- package/dist/vue2/index.es.min.js +1 -1
- package/dist/vue2/index.iife.min.js +111 -111
- package/dist/vue2/index.umd.min.js +1 -1
- package/dist/vue2/{infoDiagram-f8f76790-hj8k-SBv.mjs → infoDiagram-f8f76790-CJTohBF4.mjs} +1 -1
- package/dist/vue2/{journeyDiagram-49397b02-C0DCZid3.mjs → journeyDiagram-49397b02-DTZNUioo.mjs} +3 -3
- package/dist/vue2/{layout-DH8CMw1a.mjs → layout-CgBQyEUg.mjs} +2 -2
- package/dist/vue2/{line-yLO7kdd0.mjs → line-0wnAzFqe.mjs} +1 -1
- package/dist/vue2/{linear-B17g9H1-.mjs → linear-D7Djgzby.mjs} +1 -1
- package/dist/vue2/{mindmap-definition-fc14e90a-Bz_gLosq.mjs → mindmap-definition-fc14e90a-Cxl3J4Pu.mjs} +2 -2
- package/dist/vue2/{pieDiagram-8a3498a8-Dv-vMRyC.mjs → pieDiagram-8a3498a8-BVohjor2.mjs} +2 -2
- package/dist/vue2/{quadrantDiagram-120e2f19-fuR7zO_t.mjs → quadrantDiagram-120e2f19-C_8zgnv2.mjs} +2 -2
- package/dist/vue2/{requirementDiagram-deff3bca-LC2xsHoX.mjs → requirementDiagram-deff3bca-CSHCqIRB.mjs} +4 -4
- package/dist/vue2/{sankeyDiagram-04a897e0-BZuuDL9W.mjs → sankeyDiagram-04a897e0-DEzIC42H.mjs} +1 -1
- package/dist/vue2/{sequenceDiagram-704730f1-DZ7wY6si.mjs → sequenceDiagram-704730f1-CKTIQpn4.mjs} +2 -2
- package/dist/{vue3/stateDiagram-587899a1-JBSELOt8.mjs → vue2/stateDiagram-587899a1-CtylTld_.mjs} +5 -5
- package/dist/vue2/{stateDiagram-v2-d93cdb3a-DflkHVal.mjs → stateDiagram-v2-d93cdb3a-Cn1TZ26i.mjs} +5 -5
- package/dist/{vue3/styles-6aaf32cf-DaAE-dN6.mjs → vue2/styles-6aaf32cf-BP8SJusz.mjs} +1 -1
- package/dist/vue2/{styles-9a916d00-DbQ5RQXR.mjs → styles-9a916d00-CHMxICUF.mjs} +1 -1
- package/dist/{vue3/styles-c10674c1-C8cDBA3I.mjs → vue2/styles-c10674c1-B7zi_L5K.mjs} +4 -4
- package/dist/vue2/{svgDrawCommon-08f97a94-Dl3rEnvk.mjs → svgDrawCommon-08f97a94-ZUY6lyW4.mjs} +1 -1
- package/dist/vue2/{timeline-definition-85554ec2-BX7myD6R.mjs → timeline-definition-85554ec2-CZLJmwCU.mjs} +2 -2
- package/dist/vue2/{vue2-BDVsNVVl.mjs → vue2-Dp2pIAD8.mjs} +25 -23
- package/dist/{vue3/xychartDiagram-e933f94c-BR8JWdpv.mjs → vue2/xychartDiagram-e933f94c-CQxvdVkD.mjs} +4 -4
- package/dist/vue3/{arc-JbBswLsk.mjs → arc-DzkgqoKW.mjs} +1 -1
- package/dist/vue3/{blockDiagram-38ab4fdb-B11c8tmJ.mjs → blockDiagram-38ab4fdb-BG0hF33e.mjs} +5 -5
- package/dist/{vue2/c4Diagram-3d4e48cf-ZjBKDmcG.mjs → vue3/c4Diagram-3d4e48cf-I5_Ue3He.mjs} +2 -2
- package/dist/{vue2/channel-CHAr-DS3.mjs → vue3/channel-Cg1WNRjP.mjs} +1 -1
- package/dist/vue3/{classDiagram-70f12bd4-RpyKqv0B.mjs → classDiagram-70f12bd4-C55jMcYL.mjs} +5 -5
- package/dist/vue3/{classDiagram-v2-f2320105-SdFoPeNM.mjs → classDiagram-v2-f2320105-CI2ryo6X.mjs} +5 -5
- package/dist/vue3/{clone-DF0Wb5-s.mjs → clone-N_An9_4B.mjs} +1 -1
- package/dist/vue3/{createText-2e5e7dd3-CUjkXu6x.mjs → createText-2e5e7dd3-CBYk3AP-.mjs} +1 -1
- package/dist/{vue2/edges-e0da2a9e-BhabJjR5.mjs → vue3/edges-e0da2a9e-jF50JG4A.mjs} +3 -3
- package/dist/{vue2/erDiagram-9861fffd-DDxJjunn.mjs → vue3/erDiagram-9861fffd-DjpYtIdj.mjs} +4 -4
- package/dist/vue3/{flowDb-956e92f1-C-nhzbo8.mjs → flowDb-956e92f1-IHiXbv03.mjs} +1 -1
- package/dist/{vue2/flowDiagram-66a62f08-YLZEfNd-.mjs → vue3/flowDiagram-66a62f08-BoXxPb9F.mjs} +6 -6
- package/dist/vue3/{flowDiagram-v2-96b9c2cf-CsX812_d.mjs → flowDiagram-v2-96b9c2cf-xeNvQf5J.mjs} +5 -5
- package/dist/vue3/{flowchart-elk-definition-4a651766-CC21tNNF.mjs → flowchart-elk-definition-4a651766-CyDlDGZ8.mjs} +4 -4
- package/dist/{vue2/ganttDiagram-c361ad54-CuLDPZ5c.mjs → vue3/ganttDiagram-c361ad54-DVwCqfzI.mjs} +2 -2
- package/dist/vue3/{gitGraphDiagram-72cf32ee-er7l1Vwu.mjs → gitGraphDiagram-72cf32ee-BxqZcPwN.mjs} +1 -1
- package/dist/vue3/{graph-BkdYTwQY.mjs → graph-BfejK7j1.mjs} +1 -1
- package/dist/{vue2/index-3862675e-D0ly-ftk.mjs → vue3/index-3862675e-pGQYev1i.mjs} +6 -6
- package/dist/vue3/index.es.min.js +1 -1
- package/dist/vue3/index.iife.min.js +1 -1
- package/dist/vue3/index.umd.min.js +1 -1
- package/dist/vue3/{infoDiagram-f8f76790-CfS0AerJ.mjs → infoDiagram-f8f76790-Ch22a7hC.mjs} +1 -1
- package/dist/vue3/{journeyDiagram-49397b02-C7AiQpxY.mjs → journeyDiagram-49397b02-CRO5IUYN.mjs} +3 -3
- package/dist/vue3/{layout-DuPGw-d8.mjs → layout-Dy1NuV40.mjs} +2 -2
- package/dist/vue3/{line-BeJeAfJl.mjs → line-DiEybcOh.mjs} +1 -1
- package/dist/vue3/{linear-BOacLYWl.mjs → linear-CYyiZrJd.mjs} +1 -1
- package/dist/vue3/{mindmap-definition-fc14e90a-Dhd4NZUr.mjs → mindmap-definition-fc14e90a-DQnCHU7_.mjs} +2 -2
- package/dist/vue3/{pieDiagram-8a3498a8-zT5CvSpw.mjs → pieDiagram-8a3498a8-Dn9_rwL1.mjs} +2 -2
- package/dist/vue3/{quadrantDiagram-120e2f19-DPJcxru3.mjs → quadrantDiagram-120e2f19-BazjVmHA.mjs} +2 -2
- package/dist/vue3/{requirementDiagram-deff3bca-CP6G_Zoz.mjs → requirementDiagram-deff3bca-CfG3HG6B.mjs} +4 -4
- package/dist/vue3/{sankeyDiagram-04a897e0-DcJ7vqUs.mjs → sankeyDiagram-04a897e0-C52jvBpz.mjs} +1 -1
- package/dist/vue3/{sequenceDiagram-704730f1-Czk1oC0y.mjs → sequenceDiagram-704730f1-DTiycqeh.mjs} +2 -2
- package/dist/{vue2/stateDiagram-587899a1-5fbTvUa3.mjs → vue3/stateDiagram-587899a1-BuLhdLQ9.mjs} +5 -5
- package/dist/vue3/{stateDiagram-v2-d93cdb3a-DcDRwvpk.mjs → stateDiagram-v2-d93cdb3a-BpQYfGCZ.mjs} +5 -5
- package/dist/{vue2/styles-6aaf32cf-Dzah28hh.mjs → vue3/styles-6aaf32cf-F3oT21Y2.mjs} +1 -1
- package/dist/vue3/{styles-9a916d00-DypTgbKt.mjs → styles-9a916d00-2gb7abH5.mjs} +1 -1
- package/dist/{vue2/styles-c10674c1-B0tAwQC_.mjs → vue3/styles-c10674c1-CcF3j502.mjs} +4 -4
- package/dist/vue3/{svgDrawCommon-08f97a94-BLrA7RFB.mjs → svgDrawCommon-08f97a94-Dfa51b1C.mjs} +1 -1
- package/dist/vue3/{timeline-definition-85554ec2-YAY6t41S.mjs → timeline-definition-85554ec2-DrGK2rNM.mjs} +2 -2
- package/dist/vue3/{vue3-DlNXJSWb.mjs → vue3-Tv8faLO-.mjs} +25 -23
- package/dist/{vue2/xychartDiagram-e933f94c-BjK8nBCp.mjs → vue3/xychartDiagram-e933f94c-ByJM4fvN.mjs} +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as At, b3 as zt, b4 as It } from "./vue3-
|
|
1
|
+
import { l as At, b3 as zt, b4 as It } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
const Tt = {};
|
|
3
3
|
function Bt(n, r) {
|
|
4
4
|
const t = Tt, e = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, u = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as q,
|
|
2
|
-
import { a as st } from "./createText-2e5e7dd3-
|
|
3
|
-
import { l as ct } from "./line-
|
|
1
|
+
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as q, b3 as Q } from "./vue3-Tv8faLO-.mjs";
|
|
2
|
+
import { a as st } from "./createText-2e5e7dd3-CBYk3AP-.mjs";
|
|
3
|
+
import { l as ct } from "./line-DiEybcOh.mjs";
|
|
4
4
|
const ht = (e, t, a, i) => {
|
|
5
5
|
t.forEach((l) => {
|
|
6
6
|
wt[l](e, a, i);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./
|
|
2
|
-
import { G as Mt } from "./graph-
|
|
3
|
-
import { l as St } from "./layout-
|
|
1
|
+
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./vue3-Tv8faLO-.mjs";
|
|
2
|
+
import { G as Mt } from "./graph-BfejK7j1.mjs";
|
|
3
|
+
import { l as St } from "./layout-Dy1NuV40.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as wt } from "./line-
|
|
5
|
+
import { l as wt } from "./line-DiEybcOh.mjs";
|
|
6
6
|
const It = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
7
7
|
function Dt(t) {
|
|
8
8
|
return typeof t == "string" && It.test(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, an as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue3-
|
|
1
|
+
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, an as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
var pt = function() {
|
|
3
3
|
var e = function(f1, a, o, f) {
|
|
4
4
|
for (o = o || {}, f = f1.length; f--; o[f1[f]] = a)
|
package/dist/{vue2/flowDiagram-66a62f08-YLZEfNd-.mjs → vue3/flowDiagram-66a62f08-BoXxPb9F.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as V, p as Lt } from "./flowDb-956e92f1-
|
|
2
|
-
import { h as S, f as tt, G as _t } from "./graph-
|
|
3
|
-
import { d as m, n as U, l as R, g as G, o as Et, p as Y, q as z, r as et, t as rt, k as at } from "./
|
|
4
|
-
import { u as Tt, r as Nt, p as At, l as Ct, d as M } from "./layout-
|
|
5
|
-
import { a as N, b as nt, i as st, c as E, e as it, d as ot, f as It, g as Bt, s as Mt } from "./styles-c10674c1-
|
|
6
|
-
import { l as Dt } from "./line-
|
|
1
|
+
import { f as V, p as Lt } from "./flowDb-956e92f1-IHiXbv03.mjs";
|
|
2
|
+
import { h as S, f as tt, G as _t } from "./graph-BfejK7j1.mjs";
|
|
3
|
+
import { d as m, n as U, l as R, g as G, o as Et, p as Y, q as z, r as et, t as rt, k as at } from "./vue3-Tv8faLO-.mjs";
|
|
4
|
+
import { u as Tt, r as Nt, p as At, l as Ct, d as M } from "./layout-Dy1NuV40.mjs";
|
|
5
|
+
import { a as N, b as nt, i as st, c as E, e as it, d as ot, f as It, g as Bt, s as Mt } from "./styles-c10674c1-CcF3j502.mjs";
|
|
6
|
+
import { l as Dt } from "./line-DiEybcOh.mjs";
|
|
7
7
|
import "dayjs";
|
|
8
8
|
function Rt(r) {
|
|
9
9
|
if (!r.ok) throw new Error(r.status + " " + r.statusText);
|
package/dist/vue3/{flowDiagram-v2-96b9c2cf-CsX812_d.mjs → flowDiagram-v2-96b9c2cf-xeNvQf5J.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as o, p as a } from "./flowDb-956e92f1-
|
|
2
|
-
import { f as t, g as e } from "./styles-c10674c1-
|
|
3
|
-
import { u as s } from "./vue3-
|
|
4
|
-
import "./graph-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { f as o, p as a } from "./flowDb-956e92f1-IHiXbv03.mjs";
|
|
2
|
+
import { f as t, g as e } from "./styles-c10674c1-CcF3j502.mjs";
|
|
3
|
+
import { u as s } from "./vue3-Tv8faLO-.mjs";
|
|
4
|
+
import "./graph-BfejK7j1.mjs";
|
|
5
|
+
import "./layout-Dy1NuV40.mjs";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
const b = {
|
|
8
8
|
parser: a,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as xNe, d as FNe } from "./flowDb-956e92f1-
|
|
2
|
-
import { d as IO, l as Ba, X as xU, o as BNe, p as E0n, q as j0n, n as $U, k as RNe } from "./vue3-
|
|
3
|
-
import { i as KNe, a as _Ne, l as HNe, b as qNe, k as UNe, m as GNe } from "./edges-e0da2a9e-
|
|
1
|
+
import { p as xNe, d as FNe } from "./flowDb-956e92f1-IHiXbv03.mjs";
|
|
2
|
+
import { d as IO, l as Ba, X as xU, o as BNe, p as E0n, q as j0n, n as $U, k as RNe } from "./vue3-Tv8faLO-.mjs";
|
|
3
|
+
import { i as KNe, a as _Ne, l as HNe, b as qNe, k as UNe, m as GNe } from "./edges-e0da2a9e-jF50JG4A.mjs";
|
|
4
4
|
import { g as zNe, c as Nse } from "./_commonjsHelpers-DaMA6jEr.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { l as XNe } from "./line-
|
|
6
|
+
import { l as XNe } from "./line-DiEybcOh.mjs";
|
|
7
7
|
function NU(ct) {
|
|
8
8
|
throw new Error('Could not dynamically require "' + ct + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
9
9
|
}
|
package/dist/{vue2/ganttDiagram-c361ad54-CuLDPZ5c.mjs → vue3/ganttDiagram-c361ad54-DVwCqfzI.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { R as Re, J as bn, K as ze, L as Be, M as qe, N as $t, O as vn, a as xn, s as wn, C as Cn, D as Dn, b as Mn, c as _n, g as wt, d as Rt, e as Sn, l as Xt, k as Un, j as Fn, E as En, B as An } from "./
|
|
1
|
+
import { R as Re, J as bn, K as ze, L as Be, M as qe, N as $t, O as vn, a as xn, s as wn, C as Cn, D as Dn, b as Mn, c as _n, g as wt, d as Rt, e as Sn, l as Xt, k as Un, j as Fn, E as En, B as An } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import K from "dayjs";
|
|
3
3
|
import In from "dayjs/plugin/isoWeek.js";
|
|
4
4
|
import Ln from "dayjs/plugin/customParseFormat.js";
|
|
5
5
|
import Yn from "dayjs/plugin/advancedFormat.js";
|
|
6
|
-
import { b as Wn, t as _e, c as Nn, a as On, l as Hn } from "./linear-
|
|
6
|
+
import { b as Wn, t as _e, c as Nn, a as On, l as Hn } from "./linear-CYyiZrJd.mjs";
|
|
7
7
|
import { i as Vn } from "./init-DjUOC4st.mjs";
|
|
8
8
|
function Pn(t, e) {
|
|
9
9
|
let n;
|
package/dist/vue3/{gitGraphDiagram-72cf32ee-er7l1Vwu.mjs → gitGraphDiagram-72cf32ee-BxqZcPwN.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./vue3-
|
|
1
|
+
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
3
|
var mt = function() {
|
|
4
4
|
var r = function(I, o, u, d) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aG as C, aH as Ze, ad as y, aI as m, aJ as qe, aK as Xe, ac as Te, aL as Je, aM as Ee, aN as G, aa as X, aO as Qe, aP as me, aQ as We, aR as I, aj as Oe, aS as D, a5 as we, aT as ze, aU as Z, aV as Ve, aW as ke, aX as $, ai as en, aY as nn, ab as rn, aZ as re, a_ as tn, a$ as sn, ah as an, ag as ve, ae as un, b0 as j, a8 as fn, b1 as on, ak as M, z as te, b2 as ie } from "./vue3-
|
|
1
|
+
import { aG as C, aH as Ze, ad as y, aI as m, aJ as qe, aK as Xe, ac as Te, aL as Je, aM as Ee, aN as G, aa as X, aO as Qe, aP as me, aQ as We, aR as I, aj as Oe, aS as D, a5 as we, aT as ze, aU as Z, aV as Ve, aW as ke, aX as $, ai as en, aY as nn, ab as rn, aZ as re, a_ as tn, a$ as sn, ah as an, ag as ve, ae as un, b0 as j, a8 as fn, b1 as on, ak as M, z as te, b2 as ie } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
var dn = "[object Symbol]";
|
|
3
3
|
function J(e) {
|
|
4
4
|
return typeof e == "symbol" || C(e) && Ze(e) == dn;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as N, G as A } from "./graph-
|
|
2
|
-
import { m as $, l as H } from "./layout-
|
|
3
|
-
import { c as V } from "./clone-
|
|
4
|
-
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-e0da2a9e-
|
|
5
|
-
import { l as s, g as T, r as S, d as L } from "./
|
|
6
|
-
import { a as I } from "./createText-2e5e7dd3-
|
|
1
|
+
import { i as N, G as A } from "./graph-BfejK7j1.mjs";
|
|
2
|
+
import { m as $, l as H } from "./layout-Dy1NuV40.mjs";
|
|
3
|
+
import { c as V } from "./clone-N_An9_4B.mjs";
|
|
4
|
+
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-e0da2a9e-jF50JG4A.mjs";
|
|
5
|
+
import { l as s, g as T, r as S, d as L } from "./vue3-Tv8faLO-.mjs";
|
|
6
|
+
import { a as I } from "./createText-2e5e7dd3-CBYk3AP-.mjs";
|
|
7
7
|
function m(e) {
|
|
8
8
|
var t = {
|
|
9
9
|
options: {
|
|
@@ -518,7 +518,7 @@ Use Shift + Enter to enter a new line`,"你好,我是小鲸":"Hello, I am BK G
|
|
|
518
518
|
只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
|
|
519
519
|
'''
|
|
520
520
|
{{ SELECTED_TEXT }}
|
|
521
|
-
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},Mo=t=>zUn!=="en"?UUn[t]||t:GUn[t]||t;function $Un(){const t=re.ref([]),n=re.ref(null),i=re.ref(!1),o=re.ref({});let l={};const f=re.ref({}),d=re.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),p=F=>{if(!l[F])throw new Error(`${F} not registered`);return l[F]},m=async F=>{try{await p("setCurrentSessionChain")(F),A(F)}catch(U){throw console.error("Failed to switch session:",U),U}},v=F=>{if(t.value=F.map(U=>({...U,isEdit:!1})),n.value){const U=F.find(G=>{var V;return G.sessionCode===((V=n.value)==null?void 0:V.sessionCode)});U&&(n.value={...n.value,...U,isEdit:n.value.isEdit})}},w=F=>{const U={...F,isEdit:!1};return t.value.unshift(U),U},S=async F=>{const U=F||BUn(),G=Mo("新会话"),V={sessionCode:U,sessionName:G,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},H=w(V);return await p("plusSessionApi")(H),await m(H),H},T=F=>{const U=t.value.find(G=>G.sessionCode===F);U&&(f.value[F]={...U},C(F,{isEdit:!0},{syncBackend:!1}))},x=async(F,U)=>{const G=f.value[F];if(!G)return null;const V=Object.entries(U).some(([$,q])=>$==="isEdit"?!1:G[$]!==q),H=await C(F,{...U,isEdit:!1},{syncBackend:V});return delete f.value[F],H},C=async(F,U,G={})=>{const{syncBackend:V=!0,forceSync:H=!1}=G,$=t.value.findIndex(Q=>Q.sessionCode===F);if($===-1)return null;const q=t.value[$],j={...q,...U};if(t.value[$]=j,t.value=[...t.value],o.value[F]||(o.value[F]=0),o.value[F]++,n.value&&n.value.sessionCode===F&&(n.value={...n.value,...U}),V&&!U.isEdit||H)try{const Q=p("modifySessionApi"),z={...j,isEdit:!1};await Q(z)}catch(Q){console.error("Failed to sync session to backend:",Q),t.value[$]=q,t.value=[...t.value],n.value&&n.value.sessionCode===F&&(n.value=q)}return j},N=async F=>{var H;await p("deleteSessionApi")(F);const G=t.value.findIndex($=>$.sessionCode===F);if(G===-1)return null;const V=((H=n.value)==null?void 0:H.sessionCode)===F;if(t.value.splice(G,1),V){if(t.value.length>0){const $=new Date().toDateString(),q=t.value.filter(Q=>new Date(Q.createdAt||"").toDateString()===$),j=q.length>0?q[0]:t.value[0];return await m(j),j}return await D(!1),null}return null},A=F=>{const U=t.value.find(G=>G.sessionCode===F.sessionCode);if(U)n.value=U;else{const G=w(F);n.value=G}},O=F=>{l=F},D=async(F=!0)=>{var H,$,q,j;let U=t.value;if(F){const z=await p("getSessionsApi")();v(z)}let G=null,V=[];if(U.length>0){const Q=U.sort((X,K)=>new Date(K.createdAt||"").getTime()-new Date(X.createdAt||"").getTime())[0];V=await p("getSessionContentsApi")(Q.sessionCode),V.filter(X=>!mee.includes(X.role)).some(X=>X.content&&X.content.trim()!=="")||(G={...Q,isEdit:!1})}if(G?(p("setSessionContents")(V),m(G)):G=await S(),!d.value||F){const Q=p("getAgentInfoApi"),{conversationSettings:z,promptSetting:J,agentName:X}=await Q();Object.assign(d.value,{conversationSettings:z,promptSetting:J,agentName:X})}return(q=($=(H=d.value)==null?void 0:H.promptSetting)==null?void 0:$.content)!=null&&q.length&&await p("handleCompleteRole")(G.sessionCode,d.value.promptSetting.content),{conversationSettings:(j=d.value)==null?void 0:j.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:v,addSession:w,addNewSession:S,initSession:D,updateSession:C,startEditSession:T,finishEditSession:x,deleteSession:N,setCurrentSession:A,registerSdkMethods:O,switchSessionWithContents:m,sessionContentLoading:i,agentInfo:d,getSessionList:async()=>{const U=await p("getSessionsApi")();if(v(U),n.value){const G=U.find(V=>{var H;return V.sessionCode===((H=n.value)==null?void 0:H.sessionCode)});G&&(n.value={...n.value,...G,isEdit:n.value.isEdit})}return t.value},sessionUpdateCounter:o}}const eot=Symbol("session-store");function VUn(){const t=$Un();return re.provide(eot,t),t}function HUn(){const t=re.inject(eot);if(!t)throw new Error("Session store not provided");return t}function X9(t={}){const n="ai-blueking-tooltip",i=re.ref([]),o=(v,w,S={})=>{try{const T=typeof v=="string"?document.querySelector(v):v;if(!T)return console.warn(`Tooltip target not found: ${v}`),null;const x={content:w,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...S},C=NN(T,x);return i.value.push(C),C}catch(T){return console.error("Failed to create tooltip:",T),null}},l=(v,w,S={})=>{const T=document.querySelectorAll(v),x=[];return T.forEach(C=>{const N=o(C,w,S);N&&x.push(N)}),x},f=v=>{const w=[];return v.forEach(({element:S,content:T,options:x})=>{const C=o(S,T,x);C&&w.push(C)}),w},d=()=>{i.value.forEach(v=>{v.destroy()}),i.value=[]},p=(v,w)=>{v.setContent(w)},m=v=>{v.destroy()};return re.onBeforeUnmount(()=>{d()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:f,destroyAll:d,updateContent:p,destroyInstance:m}}const YUn={class:"bkai-history-panel"},qUn={class:"history-panel-header"},WUn={class:"history-panel-header-title"},QUn={class:"input-icon"},KUn={class:"history-panel-content"},JUn={class:"history-panel-content-item-title"},ZUn={class:"history-panel-content-item-list"},XUn=["onClick"],e$n={class:"history-panel-content-item-list-item-action"},t$n=["onClick"],n$n=re.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,l=Dtt,f=re.ref(""),d=i.sessionStore,p=re.ref({}),m=re.computed(()=>{const N={today:{key:"today",alias:Mo("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Mo("昨天"),sessionList:[]},before:{key:"before",alias:Mo("之前"),sessionList:[]}},A=d.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(f.value.toLowerCase()));for(const O of A){const D=new Date(O.createdAt||""),P=new Date,F=new Date;F.setDate(F.getDate()-1),D.toDateString()===P.toDateString()?N.today.sessionList.push(O):D.toDateString()===F.toDateString()?N.yesterday.sessionList.push(O):N.before.sessionList.push(O)}return Object.values(N).filter(O=>O.sessionList.length>0)}),v=N=>{var A;return((A=d.currentSession.value)==null?void 0:A.sessionCode)===N.sessionCode},w=N=>{v(N)||(d.switchSessionWithContents(N),o("close"))},S=N=>{d.deleteSession(N)},T=N=>{d.finishEditSession(N.sessionCode,{sessionName:N.sessionName})},x=N=>{d.startEditSession(N.sessionCode),re.nextTick(()=>{const A=p.value[N.sessionCode];A&&A.focus()})},C=(N,A)=>{A.target.blur()};return(N,A)=>(re.openBlock(),re.createElementBlock("div",YUn,[re.createElementVNode("div",qUn,[re.createElementVNode("h1",WUn,re.toDisplayString(re.unref(Mo)("历史会话")),1),re.createVNode(re.unref(Cz),{modelValue:f.value,"onUpdate:modelValue":A[0]||(A[0]=O=>f.value=O),behavior:"simplicity",placeholder:re.unref(Mo)("搜索会话名称"),style:{height:"22px"}},{suffix:re.withCtx(()=>[re.createElementVNode("span",QUn,[re.createVNode(re.unref(Kme))])]),_:1},8,["modelValue","placeholder"])]),re.createElementVNode("div",KUn,[m.value.length>0?(re.openBlock(!0),re.createElementBlock(re.Fragment,{key:0},re.renderList(m.value,O=>(re.openBlock(),re.createElementBlock("div",{key:O.key,class:"history-panel-content-item"},[re.createElementVNode("div",JUn,[re.createElementVNode("span",null,re.toDisplayString(O.alias),1)]),re.createElementVNode("div",ZUn,[(re.openBlock(!0),re.createElementBlock(re.Fragment,null,re.renderList(O.sessionList,D=>(re.openBlock(),re.createElementBlock("div",{key:`${D.sessionCode}-${re.unref(d).sessionUpdateCounter.value[D.sessionCode]||0}`,class:re.normalizeClass(["history-panel-content-item-list-item",{active:v(D)}]),onClick:P=>w(D)},[D.isEdit?(re.openBlock(),re.createBlock(re.unref(Cz),{key:1,ref_for:!0,ref:P=>{D.isEdit&&(p.value[D.sessionCode]=P)},modelValue:D.sessionName,"onUpdate:modelValue":P=>D.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>T(D),onEnter:C,onClick:A[2]||(A[2]=re.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(re.openBlock(),re.createElementBlock(re.Fragment,{key:0},[re.createVNode(re.unref(Dkn),{style:{width:"calc(100% - 42px)"}},{default:re.withCtx(()=>[re.createTextVNode(re.toDisplayString(D.sessionName),1)]),_:2},1024),re.createElementVNode("span",e$n,[re.withDirectives(re.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:re.withModifiers(P=>x(D),["stop"])},null,8,t$n),[[re.unref(l),{content:re.unref(Mo)("编辑"),boundary:"parent"}]]),re.createVNode(re.unref(yLn),{title:re.unref(Mo)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>S(D.sessionCode)},{default:re.withCtx(()=>[re.withDirectives(re.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:A[1]||(A[1]=re.withModifiers(()=>{},["stop"]))},null,512),[[re.unref(l),{content:re.unref(Mo)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,XUn))),128))])]))),128)):(re.openBlock(),re.createBlock(re.unref(bRn),{key:1,style:{"margin-top":"100px"},description:f.value?re.unref(Mo)("搜索为空"):re.unref(Mo)("暂无对话"),scene:"part",type:f.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),j0=(t,n)=>{const i=t.__vccOpts||t;for(const[o,l]of n)i[o]=l;return i},r$n=j0(n$n,[["__scopeId","data-v-538e5107"]]),i$n={class:"left-section"},a$n={class:"logo"},o$n=["src"],s$n={class:"title"},c$n={class:"right-section"},l$n=j0(re.defineComponent({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0}},emits:["close","toggleCompression","newChat"],setup(t,{emit:n}){const i=t,o=n,l=Dtt,f=HUn(),d=re.ref(null),{handleTriggerClick:p}=PUn({triggerRef:d,panelComponent:r$n,panelProps:{sessionStore:f},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),m=re.computed(()=>{var D,P,F;return i.enableChatSession?i.title||`${((P=f.agentInfo.value)==null?void 0:P.agentName)||""}-${(F=f.currentSession.value)==null?void 0:F.sessionName}`:(D=f.agentInfo.value)==null?void 0:D.agentName}),v=re.computed(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),w=re.computed(()=>i.isCompressionHeight?Mo("恢复默认尺寸"):Mo("缩小高度")),S=re.ref(null),T=re.ref(null),x=re.ref(null),{createTooltip:C,destroyAll:N}=X9({arrow:!0,delay:[0,0]}),A=()=>{N(),T.value&&C(T.value,w.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),x.value&&C(x.value,Mo("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};re.watch(()=>i.isCompressionHeight,()=>{A()}),re.onMounted(()=>{A()}),re.onBeforeUnmount(()=>{N()});const O=async()=>{try{o("newChat"),await f.initSession(!1)}catch(D){console.error("Failed to create new chat:",D)}};return(D,P)=>(re.openBlock(),re.createElementBlock("div",{ref_key:"headerRef",ref:S,class:re.normalizeClass(["header drag-handle",{draggable:i.draggable}])},[re.createElementVNode("div",i$n,[re.createElementVNode("div",a$n,[re.createElementVNode("img",{src:re.unref(gye),alt:"logo"},null,8,o$n)]),re.createElementVNode("div",s$n,re.toDisplayString(m.value),1)]),re.createElementVNode("div",c$n,[i.showNewChatIcon&&i.enableChatSession!==!1?re.withDirectives((re.openBlock(),re.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:O},null,512)),[[re.unref(l),{content:re.unref(Mo)("新增会话"),boundary:"parent"}]]):re.createCommentVNode("v-if",!0),i.showHistoryIcon&&i.enableChatSession!==!1?re.withDirectives((re.openBlock(),re.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:d,class:"bkai-icon bkai-history",onClick:P[0]||(P[0]=(...F)=>re.unref(p)&&re.unref(p)(...F))},null,512)),[[re.unref(l),{content:re.unref(Mo)("历史会话"),boundary:"parent"}]]):re.createCommentVNode("v-if",!0),re.createElementVNode("i",{ref_key:"compressionRef",ref:T,class:re.normalizeClass(["bkai-icon",v.value]),onClick:P[1]||(P[1]=F=>o("toggleCompression"))},null,2),re.createElementVNode("i",{ref_key:"closeRef",ref:x,class:"bkai-icon bkai-close-line-2",onClick:P[2]||(P[2]=F=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),u$n={class:"bar-button-text"},tot=j0(re.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:n}){re.useCssVars(l=>({"5ec4534a":l.color}));const i=n,o=t;return(l,f)=>(re.openBlock(),re.createElementBlock("div",{class:"bar-button",onClick:f[0]||(f[0]=d=>i("click"))},[re.createElementVNode("i",{class:re.normalizeClass(["bkai-icon",o.icon])},null,2),re.createElementVNode("span",u$n,re.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),f$n={class:"ai-cite"},d$n={class:"content"},not=j0(re.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const n=t,i=re.ref(null);re.watch(()=>n.text,()=>{i.value&&d(i.value),re.nextTick(()=>{p()})});const o=re.ref(null),l=m=>m.scrollWidth>m.clientWidth,{createTooltip:f,destroyInstance:d}=X9({arrow:!0,delay:[0,0]}),p=()=>{if(o.value){const m=o.value;l(m)&&(i.value=f(m,n.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return re.onMounted(()=>{re.nextTick(()=>{p()})}),(m,v)=>re.withDirectives((re.openBlock(),re.createElementBlock("section",f$n,[re.createElementVNode("span",d$n,[re.createElementVNode("span",{class:re.normalizeClass(["content-text",{"show-close-icon":m.showCloseIcon}])},[v[1]||(v[1]=re.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),re.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},re.toDisplayString(m.text),513)],2),m.showCloseIcon?(re.openBlock(),re.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:v[0]||(v[0]=w=>m.$emit("close"))})):re.createCommentVNode("v-if",!0)])],512)),[[re.vShow,m.text]])}}),[["__scopeId","data-v-af2b067c"]]);function rot(t={}){const n=re.ref(!1);return{isComposing:n,handleCompositionStart:()=>{n.value=!0},handleCompositionEnd:()=>{n.value=!1},handleEnter:p=>{const{isLoading:m,onSend:v,getInputValue:w=()=>"",clearInput:S=()=>{}}=t;if(p.shiftKey)return;p.preventDefault();const T=w();m!=null&&m.value||!T.trim()||n.value||(v==null||v(T),S())},handleSend:()=>{const{onSend:p,getInputValue:m=()=>"",clearInput:v=()=>{}}=t,w=m();w.trim()&&(p==null||p(w),v())},handleStop:()=>{const{onStop:p}=t;p==null||p()}}}const iot="enablePopup";function Tye(){return{enablePopup:re.inject(iot,!0)}}const aG=re.ref(""),aot=re.ref(""),Eye=re.ref(!1),xye={width:80,height:34,offset:15,debounceTime:300};function oG(t){const n=re.ref(!1),i=re.ref({top:"0px",left:"0px"});let o,l=null;const f=re.ref(null);let d=!1,p=null;const m=P=>{p={x:P.clientX,y:P.clientY}},v=P=>{l=P,p&&(d=Math.sqrt(Math.pow(P.clientX-p.x,2)+Math.pow(P.clientY-p.y,2))>5),p=null},w=(P,F)=>{const U=window.innerWidth,{width:G,height:V,offset:H}=xye;let $=P+window.scrollX-G/2;$=Math.max(H,Math.min($,U-G-H));let q=F+window.scrollY-V-H;return F<=V+H&&(q=F+window.scrollY+H),{top:`${q}px`,left:`${$}px`}},S=P=>{const F=window.innerWidth,{width:U,height:G,offset:V}=xye;let H=P.left+window.scrollX+P.width/2-U/2;H=Math.max(V,Math.min(H,F-U-V));let $=P.top+window.scrollY-G-V;return P.top<=G+V&&($=P.bottom+window.scrollY+V),{top:`${$}px`,left:`${H}px`}},T=(P,F)=>{let U=P;for(;U&&U!==document.documentElement;){if(U.hasAttribute&&U.hasAttribute(F))return!0;U=U.parentElement}return!1},x=()=>{clearTimeout(o),o=setTimeout(()=>{var H;const P=window.getSelection();if(!(P!=null&&P.toString().trim())){C();return}const F=P.getRangeAt(0);if((H=F.commonAncestorContainer.parentElement)!=null&&H.closest(".ai-blueking-wrapper")){C();return}const U=F.commonAncestorContainer,G=U.nodeType===Node.ELEMENT_NODE?U:U.parentElement;if(T(G,"ai-blueking-hide")){C();return}Eye.value=!1,aG.value=P.toString().trim();const V=document.activeElement;if((V==null?void 0:V.tagName)==="TEXTAREA"){if(!l){C();return}const{clientX:$,clientY:q}=l;i.value=w($,q),n.value=!0,l=null}else{const $=F.getBoundingClientRect();if(!$.width||!$.height){C();return}i.value=S($),n.value=!0}},xye.debounceTime)},C=()=>{n.value=!1,Eye.value||(aG.value="")},N=P=>{var V,H,$;const F=P.target,U=((V=F.classList)==null?void 0:V.contains("ai-blueking-tag-text"))||((H=F.classList)==null?void 0:H.contains("shortcut-btn")),G=($=f.value)==null?void 0:$.contains(F);if(!(U||!d)){if(d){P.preventDefault(),P.stopPropagation(),d=!1;return}G||(C(),A())}},A=()=>{const P=window.getSelection();P&&P.removeAllRanges(),aG.value=""},O=P=>{aG.value=P},D=P=>{aot.value=P};return re.onMounted(()=>{t&&(document.addEventListener("selectionchange",x),document.addEventListener("mousedown",m),document.addEventListener("mouseup",v),document.addEventListener("click",N,!0))}),re.onBeforeUnmount(()=>{t&&(document.removeEventListener("selectionchange",x),document.removeEventListener("mousedown",m),document.removeEventListener("mouseup",v),document.removeEventListener("click",N,!0)),clearTimeout(o)}),{isIconVisible:n,iconPosition:i,selectedText:aG,citeText:aot,hideIcon:C,clearSelection:A,setSelection:O,setCiteText:D,lockSelectedText:Eye,popupRef:f}}function h$n(t={}){const{minHeight:n=68,maxHeight:i=248,defaultHeight:o=68}=t,l=re.ref(o),f=re.ref(),d=()=>{if(!f.value)return;f.value.style.height=`${n}px`;const v=f.value.scrollHeight;l.value=Math.min(Math.max(v,n),i)};return{textareaHeight:l,textareaRef:f,updateHeight:d,resetHeight:()=>{l.value=o},bindTextarea:v=>{f.value=v,d()}}}function oot(t,n,i=re.ref(null),o={}){const l=re.ref([]),f=re.ref([]),{theme:d="ai-blueking-light light",placement:p="bottom",trigger:m="mouseenter",interactive:v=!0,allowHTML:w=!0,arrow:S=!0,offset:T=[0,4],onItemClick:x}=o,{createTooltip:C,destroyAll:N}=X9({theme:d,placement:p,trigger:m,interactive:v,allowHTML:w,arrow:S,offset:T}),A=re.computed(()=>f.value.length===0?"":`<div class="tippy-dropdown-menu">${f.value.map(U=>`<div class="tippy-menu-item" data-item-id="${U.id}">
|
|
521
|
+
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},Mo=t=>zUn!=="en"?UUn[t]||t:GUn[t]||t;function $Un(){const t=re.ref([]),n=re.ref(null),i=re.ref(!1),o=re.ref({});let l={};const f=re.ref({}),d=re.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),p=F=>{if(!l[F])throw new Error(`${F} not registered`);return l[F]},m=async F=>{try{await p("setCurrentSessionChain")(F),A(F)}catch(U){throw console.error("Failed to switch session:",U),U}},v=F=>{if(t.value=F.map(U=>({...U,isEdit:!1})),n.value){const U=F.find(G=>{var V;return G.sessionCode===((V=n.value)==null?void 0:V.sessionCode)});U&&(n.value={...n.value,...U,isEdit:n.value.isEdit})}},w=F=>{const U={...F,isEdit:!1};return t.value.unshift(U),U},S=async F=>{const U=F||BUn(),G=Mo("新会话"),V={sessionCode:U,sessionName:G,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},H=w(V);return await p("plusSessionApi")(H),await m(H),H},T=F=>{const U=t.value.find(G=>G.sessionCode===F);U&&(f.value[F]={...U},C(F,{isEdit:!0},{syncBackend:!1}))},x=async(F,U)=>{const G=f.value[F];if(!G)return null;const V=Object.entries(U).some(([$,q])=>$==="isEdit"?!1:G[$]!==q),H=await C(F,{...U,isEdit:!1},{syncBackend:V});return delete f.value[F],H},C=async(F,U,G={})=>{const{syncBackend:V=!0,forceSync:H=!1}=G,$=t.value.findIndex(Q=>Q.sessionCode===F);if($===-1)return null;const q=t.value[$],j={...q,...U};if(t.value[$]=j,t.value=[...t.value],o.value[F]||(o.value[F]=0),o.value[F]++,n.value&&n.value.sessionCode===F&&(n.value={...n.value,...U}),V&&!U.isEdit||H)try{const Q=p("modifySessionApi"),z={...j,isEdit:!1};await Q(z)}catch(Q){console.error("Failed to sync session to backend:",Q),t.value[$]=q,t.value=[...t.value],n.value&&n.value.sessionCode===F&&(n.value=q)}return j},N=async F=>{var H;await p("deleteSessionApi")(F);const G=t.value.findIndex($=>$.sessionCode===F);if(G===-1)return null;const V=((H=n.value)==null?void 0:H.sessionCode)===F;if(t.value.splice(G,1),V){if(t.value.length>0){const $=new Date().toDateString(),q=t.value.filter(Q=>new Date(Q.createdAt||"").toDateString()===$),j=q.length>0?q[0]:t.value[0];return await m(j),j}return await D(!1),null}return null},A=F=>{const U=t.value.find(G=>G.sessionCode===F.sessionCode);if(U)n.value=U;else{const G=w(F);n.value=G}},O=F=>{l=F},D=async(F=!0)=>{var H,$,q,j;let U=t.value;if(F){const z=await p("getSessionsApi")();v(z)}let G=null,V=[];if(U.length>0){const Q=U.sort((X,K)=>new Date(K.createdAt||"").getTime()-new Date(X.createdAt||"").getTime())[0];V=await p("getSessionContentsApi")(Q.sessionCode),V.filter(X=>!mee.includes(X.role)).some(X=>X.content&&X.content.trim()!=="")||(G={...Q,isEdit:!1})}if(G?(p("setSessionContents")(V),m(G)):G=await S(),!d.value||F){const Q=p("getAgentInfoApi"),{conversationSettings:z,promptSetting:J,agentName:X}=await Q();Object.assign(d.value,{conversationSettings:z,promptSetting:J,agentName:X})}return(q=($=(H=d.value)==null?void 0:H.promptSetting)==null?void 0:$.content)!=null&&q.length&&await p("handleCompleteRole")(G.sessionCode,d.value.promptSetting.content),{conversationSettings:(j=d.value)==null?void 0:j.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:v,addSession:w,addNewSession:S,initSession:D,updateSession:C,startEditSession:T,finishEditSession:x,deleteSession:N,setCurrentSession:A,registerSdkMethods:O,switchSessionWithContents:m,sessionContentLoading:i,agentInfo:d,getSessionList:async()=>{const U=await p("getSessionsApi")();if(v(U),n.value){const G=U.find(V=>{var H;return V.sessionCode===((H=n.value)==null?void 0:H.sessionCode)});G&&(n.value={...n.value,...G,isEdit:n.value.isEdit})}return U.forEach(G=>{o.value[G.sessionCode]||(o.value[G.sessionCode]=0),o.value[G.sessionCode]++}),t.value},sessionUpdateCounter:o}}const eot=Symbol("session-store");function VUn(){const t=$Un();return re.provide(eot,t),t}function HUn(){const t=re.inject(eot);if(!t)throw new Error("Session store not provided");return t}function X9(t={}){const n="ai-blueking-tooltip",i=re.ref([]),o=(v,w,S={})=>{try{const T=typeof v=="string"?document.querySelector(v):v;if(!T)return console.warn(`Tooltip target not found: ${v}`),null;const x={content:w,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...S},C=NN(T,x);return i.value.push(C),C}catch(T){return console.error("Failed to create tooltip:",T),null}},l=(v,w,S={})=>{const T=document.querySelectorAll(v),x=[];return T.forEach(C=>{const N=o(C,w,S);N&&x.push(N)}),x},f=v=>{const w=[];return v.forEach(({element:S,content:T,options:x})=>{const C=o(S,T,x);C&&w.push(C)}),w},d=()=>{i.value.forEach(v=>{v.destroy()}),i.value=[]},p=(v,w)=>{v.setContent(w)},m=v=>{v.destroy()};return re.onBeforeUnmount(()=>{d()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:f,destroyAll:d,updateContent:p,destroyInstance:m}}const YUn={class:"bkai-history-panel"},qUn={class:"history-panel-header"},WUn={class:"history-panel-header-title"},QUn={class:"input-icon"},KUn={class:"history-panel-content"},JUn={class:"history-panel-content-item-title"},ZUn={class:"history-panel-content-item-list"},XUn=["onClick"],e$n={class:"history-panel-content-item-list-item-action"},t$n=["onClick"],n$n=re.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,l=Dtt,f=re.ref(""),d=i.sessionStore,p=re.ref({}),m=re.computed(()=>{const N={today:{key:"today",alias:Mo("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Mo("昨天"),sessionList:[]},before:{key:"before",alias:Mo("之前"),sessionList:[]}},A=d.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(f.value.toLowerCase()));for(const O of A){const D=new Date(O.createdAt||""),P=new Date,F=new Date;F.setDate(F.getDate()-1),D.toDateString()===P.toDateString()?N.today.sessionList.push(O):D.toDateString()===F.toDateString()?N.yesterday.sessionList.push(O):N.before.sessionList.push(O)}return Object.values(N).filter(O=>O.sessionList.length>0)}),v=N=>{var A;return((A=d.currentSession.value)==null?void 0:A.sessionCode)===N.sessionCode},w=N=>{v(N)||(d.switchSessionWithContents(N),o("close"))},S=N=>{d.deleteSession(N)},T=N=>{d.finishEditSession(N.sessionCode,{sessionName:N.sessionName})},x=N=>{d.startEditSession(N.sessionCode),re.nextTick(()=>{const A=p.value[N.sessionCode];A&&A.focus()})},C=(N,A)=>{A.target.blur()};return(N,A)=>(re.openBlock(),re.createElementBlock("div",YUn,[re.createElementVNode("div",qUn,[re.createElementVNode("h1",WUn,re.toDisplayString(re.unref(Mo)("历史会话")),1),re.createVNode(re.unref(Cz),{modelValue:f.value,"onUpdate:modelValue":A[0]||(A[0]=O=>f.value=O),behavior:"simplicity",placeholder:re.unref(Mo)("搜索会话名称"),style:{height:"22px"}},{suffix:re.withCtx(()=>[re.createElementVNode("span",QUn,[re.createVNode(re.unref(Kme))])]),_:1},8,["modelValue","placeholder"])]),re.createElementVNode("div",KUn,[m.value.length>0?(re.openBlock(!0),re.createElementBlock(re.Fragment,{key:0},re.renderList(m.value,O=>(re.openBlock(),re.createElementBlock("div",{key:O.key,class:"history-panel-content-item"},[re.createElementVNode("div",JUn,[re.createElementVNode("span",null,re.toDisplayString(O.alias),1)]),re.createElementVNode("div",ZUn,[(re.openBlock(!0),re.createElementBlock(re.Fragment,null,re.renderList(O.sessionList,D=>(re.openBlock(),re.createElementBlock("div",{key:`${D.sessionCode}-${re.unref(d).sessionUpdateCounter.value[D.sessionCode]||0}`,class:re.normalizeClass(["history-panel-content-item-list-item",{active:v(D)}]),onClick:P=>w(D)},[D.isEdit?(re.openBlock(),re.createBlock(re.unref(Cz),{key:1,ref_for:!0,ref:P=>{D.isEdit&&(p.value[D.sessionCode]=P)},modelValue:D.sessionName,"onUpdate:modelValue":P=>D.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>T(D),onEnter:C,onClick:A[2]||(A[2]=re.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(re.openBlock(),re.createElementBlock(re.Fragment,{key:0},[re.createVNode(re.unref(Dkn),{style:{width:"calc(100% - 42px)"}},{default:re.withCtx(()=>[re.createTextVNode(re.toDisplayString(D.sessionName),1)]),_:2},1024),re.createElementVNode("span",e$n,[re.withDirectives(re.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:re.withModifiers(P=>x(D),["stop"])},null,8,t$n),[[re.unref(l),{content:re.unref(Mo)("编辑"),boundary:"parent"}]]),re.createVNode(re.unref(yLn),{title:re.unref(Mo)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>S(D.sessionCode)},{default:re.withCtx(()=>[re.withDirectives(re.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:A[1]||(A[1]=re.withModifiers(()=>{},["stop"]))},null,512),[[re.unref(l),{content:re.unref(Mo)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,XUn))),128))])]))),128)):(re.openBlock(),re.createBlock(re.unref(bRn),{key:1,style:{"margin-top":"100px"},description:f.value?re.unref(Mo)("搜索为空"):re.unref(Mo)("暂无对话"),scene:"part",type:f.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),j0=(t,n)=>{const i=t.__vccOpts||t;for(const[o,l]of n)i[o]=l;return i},r$n=j0(n$n,[["__scopeId","data-v-538e5107"]]),i$n={class:"left-section"},a$n={class:"logo"},o$n=["src"],s$n={class:"title"},c$n={class:"right-section"},l$n=j0(re.defineComponent({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0}},emits:["close","toggleCompression","newChat"],setup(t,{emit:n}){const i=t,o=n,l=Dtt,f=HUn(),d=re.ref(null),{handleTriggerClick:p}=PUn({triggerRef:d,panelComponent:r$n,panelProps:{sessionStore:f},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),m=re.computed(()=>{var D,P,F;return i.enableChatSession?i.title||`${((P=f.agentInfo.value)==null?void 0:P.agentName)||""}-${(F=f.currentSession.value)==null?void 0:F.sessionName}`:(D=f.agentInfo.value)==null?void 0:D.agentName}),v=re.computed(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),w=re.computed(()=>i.isCompressionHeight?Mo("恢复默认尺寸"):Mo("缩小高度")),S=re.ref(null),T=re.ref(null),x=re.ref(null),{createTooltip:C,destroyAll:N}=X9({arrow:!0,delay:[0,0]}),A=()=>{N(),T.value&&C(T.value,w.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),x.value&&C(x.value,Mo("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};re.watch(()=>i.isCompressionHeight,()=>{A()}),re.onMounted(()=>{A()}),re.onBeforeUnmount(()=>{N()});const O=async()=>{try{o("newChat"),await f.initSession(!1)}catch(D){console.error("Failed to create new chat:",D)}};return(D,P)=>(re.openBlock(),re.createElementBlock("div",{ref_key:"headerRef",ref:S,class:re.normalizeClass(["header drag-handle",{draggable:i.draggable}])},[re.createElementVNode("div",i$n,[re.createElementVNode("div",a$n,[re.createElementVNode("img",{src:re.unref(gye),alt:"logo"},null,8,o$n)]),re.createElementVNode("div",s$n,re.toDisplayString(m.value),1)]),re.createElementVNode("div",c$n,[i.showNewChatIcon&&i.enableChatSession!==!1?re.withDirectives((re.openBlock(),re.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:O},null,512)),[[re.unref(l),{content:re.unref(Mo)("新增会话"),boundary:"parent"}]]):re.createCommentVNode("v-if",!0),i.showHistoryIcon&&i.enableChatSession!==!1?re.withDirectives((re.openBlock(),re.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:d,class:"bkai-icon bkai-history",onClick:P[0]||(P[0]=(...F)=>re.unref(p)&&re.unref(p)(...F))},null,512)),[[re.unref(l),{content:re.unref(Mo)("历史会话"),boundary:"parent"}]]):re.createCommentVNode("v-if",!0),re.createElementVNode("i",{ref_key:"compressionRef",ref:T,class:re.normalizeClass(["bkai-icon",v.value]),onClick:P[1]||(P[1]=F=>o("toggleCompression"))},null,2),re.createElementVNode("i",{ref_key:"closeRef",ref:x,class:"bkai-icon bkai-close-line-2",onClick:P[2]||(P[2]=F=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),u$n={class:"bar-button-text"},tot=j0(re.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:n}){re.useCssVars(l=>({"5ec4534a":l.color}));const i=n,o=t;return(l,f)=>(re.openBlock(),re.createElementBlock("div",{class:"bar-button",onClick:f[0]||(f[0]=d=>i("click"))},[re.createElementVNode("i",{class:re.normalizeClass(["bkai-icon",o.icon])},null,2),re.createElementVNode("span",u$n,re.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),f$n={class:"ai-cite"},d$n={class:"content"},not=j0(re.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const n=t,i=re.ref(null);re.watch(()=>n.text,()=>{i.value&&d(i.value),re.nextTick(()=>{p()})});const o=re.ref(null),l=m=>m.scrollWidth>m.clientWidth,{createTooltip:f,destroyInstance:d}=X9({arrow:!0,delay:[0,0]}),p=()=>{if(o.value){const m=o.value;l(m)&&(i.value=f(m,n.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return re.onMounted(()=>{re.nextTick(()=>{p()})}),(m,v)=>re.withDirectives((re.openBlock(),re.createElementBlock("section",f$n,[re.createElementVNode("span",d$n,[re.createElementVNode("span",{class:re.normalizeClass(["content-text",{"show-close-icon":m.showCloseIcon}])},[v[1]||(v[1]=re.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),re.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},re.toDisplayString(m.text),513)],2),m.showCloseIcon?(re.openBlock(),re.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:v[0]||(v[0]=w=>m.$emit("close"))})):re.createCommentVNode("v-if",!0)])],512)),[[re.vShow,m.text]])}}),[["__scopeId","data-v-af2b067c"]]);function rot(t={}){const n=re.ref(!1);return{isComposing:n,handleCompositionStart:()=>{n.value=!0},handleCompositionEnd:()=>{n.value=!1},handleEnter:p=>{const{isLoading:m,onSend:v,getInputValue:w=()=>"",clearInput:S=()=>{}}=t;if(p.shiftKey)return;p.preventDefault();const T=w();m!=null&&m.value||!T.trim()||n.value||(v==null||v(T),S())},handleSend:()=>{const{onSend:p,getInputValue:m=()=>"",clearInput:v=()=>{}}=t,w=m();w.trim()&&(p==null||p(w),v())},handleStop:()=>{const{onStop:p}=t;p==null||p()}}}const iot="enablePopup";function Tye(){return{enablePopup:re.inject(iot,!0)}}const aG=re.ref(""),aot=re.ref(""),Eye=re.ref(!1),xye={width:80,height:34,offset:15,debounceTime:300};function oG(t){const n=re.ref(!1),i=re.ref({top:"0px",left:"0px"});let o,l=null;const f=re.ref(null);let d=!1,p=null;const m=P=>{p={x:P.clientX,y:P.clientY}},v=P=>{l=P,p&&(d=Math.sqrt(Math.pow(P.clientX-p.x,2)+Math.pow(P.clientY-p.y,2))>5),p=null},w=(P,F)=>{const U=window.innerWidth,{width:G,height:V,offset:H}=xye;let $=P+window.scrollX-G/2;$=Math.max(H,Math.min($,U-G-H));let q=F+window.scrollY-V-H;return F<=V+H&&(q=F+window.scrollY+H),{top:`${q}px`,left:`${$}px`}},S=P=>{const F=window.innerWidth,{width:U,height:G,offset:V}=xye;let H=P.left+window.scrollX+P.width/2-U/2;H=Math.max(V,Math.min(H,F-U-V));let $=P.top+window.scrollY-G-V;return P.top<=G+V&&($=P.bottom+window.scrollY+V),{top:`${$}px`,left:`${H}px`}},T=(P,F)=>{let U=P;for(;U&&U!==document.documentElement;){if(U.hasAttribute&&U.hasAttribute(F))return!0;U=U.parentElement}return!1},x=()=>{clearTimeout(o),o=setTimeout(()=>{var H;const P=window.getSelection();if(!(P!=null&&P.toString().trim())){C();return}const F=P.getRangeAt(0);if((H=F.commonAncestorContainer.parentElement)!=null&&H.closest(".ai-blueking-wrapper")){C();return}const U=F.commonAncestorContainer,G=U.nodeType===Node.ELEMENT_NODE?U:U.parentElement;if(T(G,"ai-blueking-hide")){C();return}Eye.value=!1,aG.value=P.toString().trim();const V=document.activeElement;if((V==null?void 0:V.tagName)==="TEXTAREA"){if(!l){C();return}const{clientX:$,clientY:q}=l;i.value=w($,q),n.value=!0,l=null}else{const $=F.getBoundingClientRect();if(!$.width||!$.height){C();return}i.value=S($),n.value=!0}},xye.debounceTime)},C=()=>{n.value=!1,Eye.value||(aG.value="")},N=P=>{var V,H,$;const F=P.target,U=((V=F.classList)==null?void 0:V.contains("ai-blueking-tag-text"))||((H=F.classList)==null?void 0:H.contains("shortcut-btn")),G=($=f.value)==null?void 0:$.contains(F);if(!(U||!d)){if(d){P.preventDefault(),P.stopPropagation(),d=!1;return}G||(C(),A())}},A=()=>{const P=window.getSelection();P&&P.removeAllRanges(),aG.value=""},O=P=>{aG.value=P},D=P=>{aot.value=P};return re.onMounted(()=>{t&&(document.addEventListener("selectionchange",x),document.addEventListener("mousedown",m),document.addEventListener("mouseup",v),document.addEventListener("click",N,!0))}),re.onBeforeUnmount(()=>{t&&(document.removeEventListener("selectionchange",x),document.removeEventListener("mousedown",m),document.removeEventListener("mouseup",v),document.removeEventListener("click",N,!0)),clearTimeout(o)}),{isIconVisible:n,iconPosition:i,selectedText:aG,citeText:aot,hideIcon:C,clearSelection:A,setSelection:O,setCiteText:D,lockSelectedText:Eye,popupRef:f}}function h$n(t={}){const{minHeight:n=68,maxHeight:i=248,defaultHeight:o=68}=t,l=re.ref(o),f=re.ref(),d=()=>{if(!f.value)return;f.value.style.height=`${n}px`;const v=f.value.scrollHeight;l.value=Math.min(Math.max(v,n),i)};return{textareaHeight:l,textareaRef:f,updateHeight:d,resetHeight:()=>{l.value=o},bindTextarea:v=>{f.value=v,d()}}}function oot(t,n,i=re.ref(null),o={}){const l=re.ref([]),f=re.ref([]),{theme:d="ai-blueking-light light",placement:p="bottom",trigger:m="mouseenter",interactive:v=!0,allowHTML:w=!0,arrow:S=!0,offset:T=[0,4],onItemClick:x}=o,{createTooltip:C,destroyAll:N}=X9({theme:d,placement:p,trigger:m,interactive:v,allowHTML:w,arrow:S,offset:T}),A=re.computed(()=>f.value.length===0?"":`<div class="tippy-dropdown-menu">${f.value.map(U=>`<div class="tippy-menu-item" data-item-id="${U.id}">
|
|
522
522
|
${U.icon?`<i class="${U.icon}"></i>`:""}
|
|
523
523
|
<span>${U.name}</span>
|
|
524
524
|
</div>`).join("")}</div>`),O=async()=>{var J;const F=t.value;if(!F)return;l.value=[...n.value],f.value=[],await re.nextTick();const U=F.clientWidth,G=Array.from(F.children),V=window.getComputedStyle(F),H=parseFloat(V.gap)||0;let $=0;if(G.forEach((X,K)=>{$+=X.getBoundingClientRect().width,K<G.length-1&&($+=H)}),$<=U)return;const q=((J=i.value)==null?void 0:J.offsetWidth)||70,j=U-q;let Q=0,z=-1;for(let X=0;X<G.length;X++){const K=G[X];if(Q+=K.getBoundingClientRect().width,X<G.length-1&&(Q+=H),Q>j){z=X;break}}z===-1&&(z=n.value.length),l.value=n.value.slice(0,z),f.value=n.value.slice(z)};re.watch(()=>n.value,()=>{requestAnimationFrame(O)},{deep:!0,immediate:!0}),re.watch(()=>f.value,F=>{re.nextTick(()=>{F.length>0&&i.value?(N(),C(i.value,A.value,{onShow:()=>{setTimeout(()=>{document.querySelectorAll(".tippy-menu-item").forEach(G=>{G.addEventListener("click",D)})},0)},onHide:()=>{document.querySelectorAll(".tippy-menu-item").forEach(G=>{G.removeEventListener("click",D)})}})):N()})},{immediate:!0});const D=F=>{const G=F.currentTarget.dataset.itemId,V=f.value.find(H=>H.id===G);V&&x&&x(V)};let P=null;return re.onMounted(()=>{t.value&&(P=new ResizeObserver(()=>{requestAnimationFrame(O)}),P.observe(t.value))}),re.onBeforeUnmount(()=>{P&&t.value&&P.unobserve(t.value),N()}),{visibleItems:l,hiddenItems:f,calculateVisibleItems:O}}const p$n={class:"ai-selected-box"},g$n={class:"ai-selected-tip"},m$n={class:"ai-selected-tip-text"},b$n={class:"ai-selected-box-content"},v$n=["onClick"],y$n=j0(re.defineComponent({__name:"ai-selected-box",props:{selectedText:{},actions:{}},emits:["shortcut-click"],setup(t,{emit:n}){const i=n,o=t,{clearSelection:l}=oG(!0),f=re.ref(null),d=re.ref(null),p=re.computed(()=>o.actions),{visibleItems:m,hiddenItems:v}=oot(f,p,d,{theme:"ai-blueking-light light",placement:"top",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:S=>{i("shortcut-click",{shortcut:S,source:"ai-selected"})}}),w=S=>{i("shortcut-click",{shortcut:S,source:"ai-selected"})};return(S,T)=>(re.openBlock(),re.createElementBlock("div",p$n,[re.createElementVNode("i",{class:"bkai-icon bkai-close-circle-shape",onClick:T[0]||(T[0]=(...x)=>re.unref(l)&&re.unref(l)(...x))}),re.createElementVNode("div",g$n,[T[1]||(T[1]=re.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),re.createElementVNode("span",m$n,re.toDisplayString(re.unref(Mo)("已框选内容")),1)]),re.createElementVNode("div",b$n,re.toDisplayString(o.selectedText),1),re.createElementVNode("div",{ref_key:"actionsContainerRef",ref:f,class:"ai-selected-box-actions"},[re.createCommentVNode(" 可见的操作项 "),(re.openBlock(!0),re.createElementBlock(re.Fragment,null,re.renderList(re.unref(m),x=>(re.openBlock(),re.createElementBlock("div",{key:x.id,class:"ai-selected-box-action",onClick:C=>w(x)},[re.createElementVNode("i",{class:re.normalizeClass(["bkai-icon",x.icon])},null,2),re.createElementVNode("span",null,re.toDisplayString(x.name),1)],8,v$n))),128)),re.createCommentVNode(' "更多"按钮 '),re.unref(v).length>0?(re.openBlock(),re.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:d,class:"ai-selected-box-action more-container"},T[2]||(T[2]=[re.createElementVNode("span",null,"更多",-1),re.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)]),512)):re.createCommentVNode("v-if",!0)],512)]))}}),[["__scopeId","data-v-42b29188"]]),w$n={class:"bkai-prompt-list-search"},_$n={class:"bkai-prompt-list-content"},S$n={key:0,class:"bkai-prompt-list-empty"},T$n=["onClick","onMouseover"],E$n=j0(re.defineComponent({__name:"prompt-list",props:{prompts:{},show:{type:Boolean}},emits:["select","height-change","update:show"],setup(t,{expose:n,emit:i}){const o=t,l=i,f=re.ref(""),d=re.ref(null),p=re.ref(null),m=re.computed(()=>f.value.trim()?o.prompts.filter(N=>N.toLowerCase().includes(f.value.toLowerCase())):o.prompts);re.watch(()=>o.show,N=>{N&&re.nextTick(()=>{p.value=null})});const v=N=>{l("select",N),l("update:show",!1),f.value=""},w=()=>{m.value.length&&(p.value===null||p.value===m.value.length-1?p.value=0:p.value++,x())},S=()=>{m.value.length&&(p.value===null||p.value===0?p.value=m.value.length-1:p.value--,x())},T=()=>!m.value.length||p.value===null?!1:(v(m.value[p.value]),!0),x=()=>{if(p.value===null||!d.value)return;const N=d.value.querySelector(".bkai-prompt-list-content");if(!N)return;const A=N.children[p.value];if(!A)return;const O=N.getBoundingClientRect(),D=A.getBoundingClientRect();D.top<O.top?N.scrollTop=A.offsetTop:D.bottom>O.bottom&&(N.scrollTop=A.offsetTop+A.offsetHeight-N.clientHeight)};let C=null;return re.onMounted(()=>{d.value&&(C=new ResizeObserver(N=>{for(const A of N)l("height-change",A.contentRect.height)}),C.observe(d.value))}),re.onBeforeUnmount(()=>{C&&d.value&&(C.unobserve(d.value),C.disconnect())}),n({handleArrowDown:w,handleArrowUp:S,handleEnter:T}),(N,A)=>re.withDirectives((re.openBlock(),re.createElementBlock("div",{ref_key:"promptListEl",ref:d,class:"bkai-prompt-list"},[re.createElementVNode("div",w$n,[re.createVNode(re.unref(Cz),{modelValue:f.value,"onUpdate:modelValue":A[0]||(A[0]=O=>f.value=O),behavior:"simplicity",placeholder:"请输入关键词"},null,8,["modelValue"])]),re.createElementVNode("div",_$n,[m.value.length===0?(re.openBlock(),re.createElementBlock("div",S$n,re.toDisplayString(re.unref(Mo)("无匹配结果")),1)):(re.openBlock(!0),re.createElementBlock(re.Fragment,{key:1},re.renderList(m.value,(O,D)=>(re.openBlock(),re.createElementBlock("div",{key:O,style:{overflow:"hidden"},class:re.normalizeClass(["bkai-prompt-list-item",{active:p.value===D}]),onClick:P=>v(O),onMouseleave:A[1]||(A[1]=P=>p.value=null),onMouseover:P=>p.value=D},re.toDisplayString(O),43,T$n))),128))])],512)),[[re.vShow,N.show]])}}),[["__scopeId","data-v-64af2ecb"]]),x$n=["onClick"],C$n={class:"shortcut-text"},k$n=j0(re.defineComponent({__name:"shortcuts-bar",props:{shortcuts:{}},emits:["shortcut-click"],setup(t,{emit:n}){const i=t,o=n,l=re.ref(null),f=re.ref(null),d=re.computed(()=>i.shortcuts),{visibleItems:p,hiddenItems:m}=oot(l,d,f,{theme:"ai-blueking-light light",placement:"bottom",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:v=>{o("shortcut-click",{shortcut:v,source:"main"})}});return(v,w)=>(re.openBlock(),re.createElementBlock("div",{ref_key:"containerRef",ref:l,class:"shortcuts-bar"},[re.createCommentVNode(" 可见的 shortcuts "),(re.openBlock(!0),re.createElementBlock(re.Fragment,null,re.renderList(re.unref(p),S=>(re.openBlock(),re.createElementBlock("div",{key:S.id,class:"shortcut-item",onClick:T=>o("shortcut-click",{shortcut:S,source:"main"})},[re.createElementVNode("i",{class:re.normalizeClass(S.icon)},null,2),re.createElementVNode("span",C$n,re.toDisplayString(S.name),1)],8,x$n))),128)),re.createCommentVNode(' "更多"按钮 '),re.unref(m).length>0?(re.openBlock(),re.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:f,class:"shortcut-item more-container"},w[0]||(w[0]=[re.createElementVNode("span",{class:"shortcut-text"},"更多",-1),re.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)]),512)):re.createCommentVNode("v-if",!0)],512))}}),[["__scopeId","data-v-e115e445"]]),I$n={class:"chat-input-box"},N$n={key:0,class:"cite"},A$n=["disabled","placeholder"],O$n={class:"input-tools"},M$n=j0(re.defineComponent({__name:"chat-input-box",props:{shortcuts:{default:()=>[]},conversationSettings:{},loading:{type:Boolean},prompts:{},disabled:{type:Boolean},placeholder:{default:()=>Mo(`输入 "/" 唤出 Prompt
|
|
@@ -193,7 +193,7 @@ Use Shift + Enter to enter a new line`,"你好,我是小鲸":"Hello, I am BK G
|
|
|
193
193
|
只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
|
|
194
194
|
'''
|
|
195
195
|
{{ SELECTED_TEXT }}
|
|
196
|
-
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},ms=n=>ftn!=="en"?gtn[n]||n:dtn[n]||n;function ptn(){const n=J.ref([]),r=J.ref(null),a=J.ref(!1),o=J.ref({});let u={};const d=J.ref({}),h=J.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),b=z=>{if(!u[z])throw new Error(`${z} not registered`);return u[z]},v=async z=>{try{await b("setCurrentSessionChain")(z),I(z)}catch(q){throw console.error("Failed to switch session:",q),q}},y=z=>{if(n.value=z.map(q=>({...q,isEdit:!1})),r.value){const q=z.find(V=>{var G;return V.sessionCode===((G=r.value)==null?void 0:G.sessionCode)});q&&(r.value={...r.value,...q,isEdit:r.value.isEdit})}},A=z=>{const q={...z,isEdit:!1};return n.value.unshift(q),q},k=async z=>{const q=z||utn(),V=ms("新会话"),G={sessionCode:q,sessionName:V,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},Q=A(G);return await b("plusSessionApi")(Q),await v(Q),Q},E=z=>{const q=n.value.find(V=>V.sessionCode===z);q&&(d.value[z]={...q},B(z,{isEdit:!0},{syncBackend:!1}))},T=async(z,q)=>{const V=d.value[z];if(!V)return null;const G=Object.entries(q).some(([H,Y])=>H==="isEdit"?!1:V[H]!==Y),Q=await B(z,{...q,isEdit:!1},{syncBackend:G});return delete d.value[z],Q},B=async(z,q,V={})=>{const{syncBackend:G=!0,forceSync:Q=!1}=V,H=n.value.findIndex(X=>X.sessionCode===z);if(H===-1)return null;const Y=n.value[H],P={...Y,...q};if(n.value[H]=P,n.value=[...n.value],o.value[z]||(o.value[z]=0),o.value[z]++,r.value&&r.value.sessionCode===z&&(r.value={...r.value,...q}),G&&!q.isEdit||Q)try{const X=b("modifySessionApi"),F={...P,isEdit:!1};await X(F)}catch(X){console.error("Failed to sync session to backend:",X),n.value[H]=Y,n.value=[...n.value],r.value&&r.value.sessionCode===z&&(r.value=Y)}return P},L=async z=>{var Q;await b("deleteSessionApi")(z);const V=n.value.findIndex(H=>H.sessionCode===z);if(V===-1)return null;const G=((Q=r.value)==null?void 0:Q.sessionCode)===z;if(n.value.splice(V,1),G){if(n.value.length>0){const H=new Date().toDateString(),Y=n.value.filter(X=>new Date(X.createdAt||"").toDateString()===H),P=Y.length>0?Y[0]:n.value[0];return await v(P),P}return await N(!1),null}return null},I=z=>{const q=n.value.find(V=>V.sessionCode===z.sessionCode);if(q)r.value=q;else{const V=A(z);r.value=V}},O=z=>{u=z},N=async(z=!0)=>{var Q,H,Y,P;let q=n.value;if(z){const F=await b("getSessionsApi")();y(F)}let V=null,G=[];if(q.length>0){const X=q.sort((le,de)=>new Date(de.createdAt||"").getTime()-new Date(le.createdAt||"").getTime())[0];G=await b("getSessionContentsApi")(X.sessionCode),G.filter(le=>!m$.includes(le.role)).some(le=>le.content&&le.content.trim()!=="")||(V={...X,isEdit:!1})}if(V?(b("setSessionContents")(G),v(V)):V=await k(),!h.value||z){const X=b("getAgentInfoApi"),{conversationSettings:F,promptSetting:ae,agentName:le}=await X();Object.assign(h.value,{conversationSettings:F,promptSetting:ae,agentName:le})}return(Y=(H=(Q=h.value)==null?void 0:Q.promptSetting)==null?void 0:H.content)!=null&&Y.length&&await b("handleCompleteRole")(V.sessionCode,h.value.promptSetting.content),{conversationSettings:(P=h.value)==null?void 0:P.conversationSettings}};return{sessionList:n,currentSession:r,setSessionList:y,addSession:A,addNewSession:k,initSession:N,updateSession:B,startEditSession:E,finishEditSession:T,deleteSession:L,setCurrentSession:I,registerSdkMethods:O,switchSessionWithContents:v,sessionContentLoading:a,agentInfo:h,getSessionList:async()=>{const q=await b("getSessionsApi")();if(y(q),r.value){const V=q.find(G=>{var Q;return G.sessionCode===((Q=r.value)==null?void 0:Q.sessionCode)});V&&(r.value={...r.value,...V,isEdit:r.value.isEdit})}return n.value},sessionUpdateCounter:o}}const jPe=Symbol("session-store");function mtn(){const n=ptn();return J.provide(jPe,n),n}function btn(){const n=J.inject(jPe);if(!n)throw new Error("Session store not provided");return n}function vM(n={}){const r="ai-blueking-tooltip",a=J.ref([]),o=(y,A,k={})=>{try{const E=typeof y=="string"?document.querySelector(y):y;if(!E)return console.warn(`Tooltip target not found: ${y}`),null;const T={content:A,placement:"top",arrow:!0,delay:[300,0],theme:r,...n,...k},B=Yk(E,T);return a.value.push(B),B}catch(E){return console.error("Failed to create tooltip:",E),null}},u=(y,A,k={})=>{const E=document.querySelectorAll(y),T=[];return E.forEach(B=>{const L=o(B,A,k);L&&T.push(L)}),T},d=y=>{const A=[];return y.forEach(({element:k,content:E,options:T})=>{const B=o(k,E,T);B&&A.push(B)}),A},h=()=>{a.value.forEach(y=>{y.destroy()}),a.value=[]},b=(y,A)=>{y.setContent(A)},v=y=>{y.destroy()};return J.onBeforeUnmount(()=>{h()}),{instances:a,createTooltip:o,createTooltipsForSelector:u,createMultipleTooltips:d,destroyAll:h,updateContent:b,destroyInstance:v}}const vtn={class:"bkai-history-panel"},wtn={class:"history-panel-header"},ytn={class:"history-panel-header-title"},Atn={class:"input-icon"},xtn={class:"history-panel-content"},ktn={class:"history-panel-content-item-title"},Etn={class:"history-panel-content-item-list"},Ctn=["onClick"],Ttn={class:"history-panel-content-item-list-item-action"},Stn=["onClick"],Btn=J.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(n,{emit:r}){const a=n,o=r,u=qu.bkTooltips,d=J.ref(""),h=a.sessionStore,b=J.ref({}),v=J.computed(()=>{const L={today:{key:"today",alias:ms("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:ms("昨天"),sessionList:[]},before:{key:"before",alias:ms("之前"),sessionList:[]}},I=h.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(d.value.toLowerCase()));for(const O of I){const N=new Date(O.createdAt||""),j=new Date,z=new Date;z.setDate(z.getDate()-1),N.toDateString()===j.toDateString()?L.today.sessionList.push(O):N.toDateString()===z.toDateString()?L.yesterday.sessionList.push(O):L.before.sessionList.push(O)}return Object.values(L).filter(O=>O.sessionList.length>0)}),y=L=>{var I;return((I=h.currentSession.value)==null?void 0:I.sessionCode)===L.sessionCode},A=L=>{y(L)||(h.switchSessionWithContents(L),o("close"))},k=L=>{h.deleteSession(L)},E=L=>{h.finishEditSession(L.sessionCode,{sessionName:L.sessionName})},T=L=>{h.startEditSession(L.sessionCode),J.nextTick(()=>{const I=b.value[L.sessionCode];I&&I.focus()})},B=(L,I)=>{I.target.blur()};return(L,I)=>(J.openBlock(),J.createElementBlock("div",vtn,[J.createElementVNode("div",wtn,[J.createElementVNode("h1",ytn,J.toDisplayString(J.unref(ms)("历史会话")),1),J.createVNode(J.unref(qu.Input),{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=O=>d.value=O),behavior:"simplicity",placeholder:J.unref(ms)("搜索会话名称"),style:{height:"22px"}},{suffix:J.withCtx(()=>[J.createElementVNode("span",Atn,[J.createVNode(J.unref(b$t.Search))])]),_:1},8,["modelValue","placeholder"])]),J.createElementVNode("div",xtn,[v.value.length>0?(J.openBlock(!0),J.createElementBlock(J.Fragment,{key:0},J.renderList(v.value,O=>(J.openBlock(),J.createElementBlock("div",{key:O.key,class:"history-panel-content-item"},[J.createElementVNode("div",ktn,[J.createElementVNode("span",null,J.toDisplayString(O.alias),1)]),J.createElementVNode("div",Etn,[(J.openBlock(!0),J.createElementBlock(J.Fragment,null,J.renderList(O.sessionList,N=>(J.openBlock(),J.createElementBlock("div",{key:`${N.sessionCode}-${J.unref(h).sessionUpdateCounter.value[N.sessionCode]||0}`,class:J.normalizeClass(["history-panel-content-item-list-item",{active:y(N)}]),onClick:j=>A(N)},[N.isEdit?(J.openBlock(),J.createBlock(J.unref(qu.Input),{key:1,ref_for:!0,ref:j=>{N.isEdit&&(b.value[N.sessionCode]=j)},modelValue:N.sessionName,"onUpdate:modelValue":j=>N.sessionName=j,style:{width:"100%",height:"28px"},onBlur:j=>E(N),onEnter:B,onClick:I[2]||(I[2]=J.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(J.openBlock(),J.createElementBlock(J.Fragment,{key:0},[J.createVNode(J.unref(qu.OverflowTitle),{style:{width:"calc(100% - 42px)"}},{default:J.withCtx(()=>[J.createTextVNode(J.toDisplayString(N.sessionName),1)]),_:2},1024),J.createElementVNode("span",Ttn,[J.withDirectives(J.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:J.withModifiers(j=>T(N),["stop"])},null,8,Stn),[[J.unref(u),{content:J.unref(ms)("编辑"),boundary:"parent"}]]),J.createVNode(J.unref(qu.PopConfirm),{title:J.unref(ms)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:j=>k(N.sessionCode)},{default:J.withCtx(()=>[J.withDirectives(J.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:I[1]||(I[1]=J.withModifiers(()=>{},["stop"]))},null,512),[[J.unref(u),{content:J.unref(ms)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,Ctn))),128))])]))),128)):(J.openBlock(),J.createBlock(J.unref(qu.Exception),{key:1,style:{"margin-top":"100px"},description:d.value?J.unref(ms)("搜索为空"):J.unref(ms)("暂无对话"),scene:"part",type:d.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),Wf=(n,r)=>{const a=n.__vccOpts||n;for(const[o,u]of r)a[o]=u;return a},Mtn=Wf(Btn,[["__scopeId","data-v-538e5107"]]),_tn={class:"left-section"},Ltn={class:"logo"},Dtn=["src"],Itn={class:"title"},Rtn={class:"right-section"},Otn=Wf(J.defineComponent({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0}},emits:["close","toggleCompression","newChat"],setup(n,{emit:r}){const a=n,o=r,u=qu.bkTooltips,d=btn(),h=J.ref(null),{handleTriggerClick:b}=ctn({triggerRef:h,panelComponent:Mtn,panelProps:{sessionStore:d},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),v=J.computed(()=>{var N,j,z;return a.enableChatSession?a.title||`${((j=d.agentInfo.value)==null?void 0:j.agentName)||""}-${(z=d.currentSession.value)==null?void 0:z.sessionName}`:(N=d.agentInfo.value)==null?void 0:N.agentName}),y=J.computed(()=>a.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),A=J.computed(()=>a.isCompressionHeight?ms("恢复默认尺寸"):ms("缩小高度")),k=J.ref(null),E=J.ref(null),T=J.ref(null),{createTooltip:B,destroyAll:L}=vM({arrow:!0,delay:[0,0]}),I=()=>{L(),E.value&&B(E.value,A.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),T.value&&B(T.value,ms("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};J.watch(()=>a.isCompressionHeight,()=>{I()}),J.onMounted(()=>{I()}),J.onBeforeUnmount(()=>{L()});const O=async()=>{try{o("newChat"),await d.initSession(!1)}catch(N){console.error("Failed to create new chat:",N)}};return(N,j)=>(J.openBlock(),J.createElementBlock("div",{ref_key:"headerRef",ref:k,class:J.normalizeClass(["header drag-handle",{draggable:a.draggable}])},[J.createElementVNode("div",_tn,[J.createElementVNode("div",Ltn,[J.createElementVNode("img",{src:J.unref(L0e),alt:"logo"},null,8,Dtn)]),J.createElementVNode("div",Itn,J.toDisplayString(v.value),1)]),J.createElementVNode("div",Rtn,[a.showNewChatIcon&&a.enableChatSession!==!1?J.withDirectives((J.openBlock(),J.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:O},null,512)),[[J.unref(u),{content:J.unref(ms)("新增会话"),boundary:"parent"}]]):J.createCommentVNode("v-if",!0),a.showHistoryIcon&&a.enableChatSession!==!1?J.withDirectives((J.openBlock(),J.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:h,class:"bkai-icon bkai-history",onClick:j[0]||(j[0]=(...z)=>J.unref(b)&&J.unref(b)(...z))},null,512)),[[J.unref(u),{content:J.unref(ms)("历史会话"),boundary:"parent"}]]):J.createCommentVNode("v-if",!0),J.createElementVNode("i",{ref_key:"compressionRef",ref:E,class:J.normalizeClass(["bkai-icon",y.value]),onClick:j[1]||(j[1]=z=>o("toggleCompression"))},null,2),J.createElementVNode("i",{ref_key:"closeRef",ref:T,class:"bkai-icon bkai-close-line-2",onClick:j[2]||(j[2]=z=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),Ftn={class:"bar-button-text"},HPe=Wf(J.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(n,{emit:r}){J.useCssVars(u=>({"5ec4534a":u.color}));const a=r,o=n;return(u,d)=>(J.openBlock(),J.createElementBlock("div",{class:"bar-button",onClick:d[0]||(d[0]=h=>a("click"))},[J.createElementVNode("i",{class:J.normalizeClass(["bkai-icon",o.icon])},null,2),J.createElementVNode("span",Ftn,J.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),Ntn={class:"ai-cite"},Ptn={class:"content"},VPe=Wf(J.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(n){const r=n,a=J.ref(null);J.watch(()=>r.text,()=>{a.value&&h(a.value),J.nextTick(()=>{b()})});const o=J.ref(null),u=v=>v.scrollWidth>v.clientWidth,{createTooltip:d,destroyInstance:h}=vM({arrow:!0,delay:[0,0]}),b=()=>{if(o.value){const v=o.value;u(v)&&(a.value=d(v,r.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return J.onMounted(()=>{J.nextTick(()=>{b()})}),(v,y)=>J.withDirectives((J.openBlock(),J.createElementBlock("section",Ntn,[J.createElementVNode("span",Ptn,[J.createElementVNode("span",{class:J.normalizeClass(["content-text",{"show-close-icon":v.showCloseIcon}])},[y[1]||(y[1]=J.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),J.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},J.toDisplayString(v.text),513)],2),v.showCloseIcon?(J.openBlock(),J.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:y[0]||(y[0]=A=>v.$emit("close"))})):J.createCommentVNode("v-if",!0)])],512)),[[J.vShow,v.text]])}}),[["__scopeId","data-v-af2b067c"]]);function UPe(n={}){const r=J.ref(!1);return{isComposing:r,handleCompositionStart:()=>{r.value=!0},handleCompositionEnd:()=>{r.value=!1},handleEnter:b=>{const{isLoading:v,onSend:y,getInputValue:A=()=>"",clearInput:k=()=>{}}=n;if(b.shiftKey)return;b.preventDefault();const E=A();v!=null&&v.value||!E.trim()||r.value||(y==null||y(E),k())},handleSend:()=>{const{onSend:b,getInputValue:v=()=>"",clearInput:y=()=>{}}=n,A=v();A.trim()&&(b==null||b(A),y())},handleStop:()=>{const{onStop:b}=n;b==null||b()}}}const GPe="enablePopup";function Y0e(){return{enablePopup:J.inject(GPe,!0)}}const WO=J.ref(""),qPe=J.ref(""),W0e=J.ref(!1),K0e={width:80,height:34,offset:15,debounceTime:300};function KO(n){const r=J.ref(!1),a=J.ref({top:"0px",left:"0px"});let o,u=null;const d=J.ref(null);let h=!1,b=null;const v=j=>{b={x:j.clientX,y:j.clientY}},y=j=>{u=j,b&&(h=Math.sqrt(Math.pow(j.clientX-b.x,2)+Math.pow(j.clientY-b.y,2))>5),b=null},A=(j,z)=>{const q=window.innerWidth,{width:V,height:G,offset:Q}=K0e;let H=j+window.scrollX-V/2;H=Math.max(Q,Math.min(H,q-V-Q));let Y=z+window.scrollY-G-Q;return z<=G+Q&&(Y=z+window.scrollY+Q),{top:`${Y}px`,left:`${H}px`}},k=j=>{const z=window.innerWidth,{width:q,height:V,offset:G}=K0e;let Q=j.left+window.scrollX+j.width/2-q/2;Q=Math.max(G,Math.min(Q,z-q-G));let H=j.top+window.scrollY-V-G;return j.top<=V+G&&(H=j.bottom+window.scrollY+G),{top:`${H}px`,left:`${Q}px`}},E=(j,z)=>{let q=j;for(;q&&q!==document.documentElement;){if(q.hasAttribute&&q.hasAttribute(z))return!0;q=q.parentElement}return!1},T=()=>{clearTimeout(o),o=setTimeout(()=>{var Q;const j=window.getSelection();if(!(j!=null&&j.toString().trim())){B();return}const z=j.getRangeAt(0);if((Q=z.commonAncestorContainer.parentElement)!=null&&Q.closest(".ai-blueking-wrapper")){B();return}const q=z.commonAncestorContainer,V=q.nodeType===Node.ELEMENT_NODE?q:q.parentElement;if(E(V,"ai-blueking-hide")){B();return}W0e.value=!1,WO.value=j.toString().trim();const G=document.activeElement;if((G==null?void 0:G.tagName)==="TEXTAREA"){if(!u){B();return}const{clientX:H,clientY:Y}=u;a.value=A(H,Y),r.value=!0,u=null}else{const H=z.getBoundingClientRect();if(!H.width||!H.height){B();return}a.value=k(H),r.value=!0}},K0e.debounceTime)},B=()=>{r.value=!1,W0e.value||(WO.value="")},L=j=>{var G,Q,H;const z=j.target,q=((G=z.classList)==null?void 0:G.contains("ai-blueking-tag-text"))||((Q=z.classList)==null?void 0:Q.contains("shortcut-btn")),V=(H=d.value)==null?void 0:H.contains(z);if(!(q||!h)){if(h){j.preventDefault(),j.stopPropagation(),h=!1;return}V||(B(),I())}},I=()=>{const j=window.getSelection();j&&j.removeAllRanges(),WO.value=""},O=j=>{WO.value=j},N=j=>{qPe.value=j};return J.onMounted(()=>{n&&(document.addEventListener("selectionchange",T),document.addEventListener("mousedown",v),document.addEventListener("mouseup",y),document.addEventListener("click",L,!0))}),J.onBeforeUnmount(()=>{n&&(document.removeEventListener("selectionchange",T),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",y),document.removeEventListener("click",L,!0)),clearTimeout(o)}),{isIconVisible:r,iconPosition:a,selectedText:WO,citeText:qPe,hideIcon:B,clearSelection:I,setSelection:O,setCiteText:N,lockSelectedText:W0e,popupRef:d}}function ztn(n={}){const{minHeight:r=68,maxHeight:a=248,defaultHeight:o=68}=n,u=J.ref(o),d=J.ref(),h=()=>{if(!d.value)return;d.value.style.height=`${r}px`;const y=d.value.scrollHeight;u.value=Math.min(Math.max(y,r),a)};return{textareaHeight:u,textareaRef:d,updateHeight:h,resetHeight:()=>{u.value=o},bindTextarea:y=>{d.value=y,h()}}}function QPe(n,r,a=J.ref(null),o={}){const u=J.ref([]),d=J.ref([]),{theme:h="ai-blueking-light light",placement:b="bottom",trigger:v="mouseenter",interactive:y=!0,allowHTML:A=!0,arrow:k=!0,offset:E=[0,4],onItemClick:T}=o,{createTooltip:B,destroyAll:L}=vM({theme:h,placement:b,trigger:v,interactive:y,allowHTML:A,arrow:k,offset:E}),I=J.computed(()=>d.value.length===0?"":`<div class="tippy-dropdown-menu">${d.value.map(q=>`<div class="tippy-menu-item" data-item-id="${q.id}">
|
|
196
|
+
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},ms=n=>ftn!=="en"?gtn[n]||n:dtn[n]||n;function ptn(){const n=J.ref([]),r=J.ref(null),a=J.ref(!1),o=J.ref({});let u={};const d=J.ref({}),h=J.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),b=z=>{if(!u[z])throw new Error(`${z} not registered`);return u[z]},v=async z=>{try{await b("setCurrentSessionChain")(z),I(z)}catch(q){throw console.error("Failed to switch session:",q),q}},y=z=>{if(n.value=z.map(q=>({...q,isEdit:!1})),r.value){const q=z.find(V=>{var G;return V.sessionCode===((G=r.value)==null?void 0:G.sessionCode)});q&&(r.value={...r.value,...q,isEdit:r.value.isEdit})}},A=z=>{const q={...z,isEdit:!1};return n.value.unshift(q),q},k=async z=>{const q=z||utn(),V=ms("新会话"),G={sessionCode:q,sessionName:V,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},Q=A(G);return await b("plusSessionApi")(Q),await v(Q),Q},E=z=>{const q=n.value.find(V=>V.sessionCode===z);q&&(d.value[z]={...q},B(z,{isEdit:!0},{syncBackend:!1}))},T=async(z,q)=>{const V=d.value[z];if(!V)return null;const G=Object.entries(q).some(([H,Y])=>H==="isEdit"?!1:V[H]!==Y),Q=await B(z,{...q,isEdit:!1},{syncBackend:G});return delete d.value[z],Q},B=async(z,q,V={})=>{const{syncBackend:G=!0,forceSync:Q=!1}=V,H=n.value.findIndex(X=>X.sessionCode===z);if(H===-1)return null;const Y=n.value[H],P={...Y,...q};if(n.value[H]=P,n.value=[...n.value],o.value[z]||(o.value[z]=0),o.value[z]++,r.value&&r.value.sessionCode===z&&(r.value={...r.value,...q}),G&&!q.isEdit||Q)try{const X=b("modifySessionApi"),F={...P,isEdit:!1};await X(F)}catch(X){console.error("Failed to sync session to backend:",X),n.value[H]=Y,n.value=[...n.value],r.value&&r.value.sessionCode===z&&(r.value=Y)}return P},L=async z=>{var Q;await b("deleteSessionApi")(z);const V=n.value.findIndex(H=>H.sessionCode===z);if(V===-1)return null;const G=((Q=r.value)==null?void 0:Q.sessionCode)===z;if(n.value.splice(V,1),G){if(n.value.length>0){const H=new Date().toDateString(),Y=n.value.filter(X=>new Date(X.createdAt||"").toDateString()===H),P=Y.length>0?Y[0]:n.value[0];return await v(P),P}return await N(!1),null}return null},I=z=>{const q=n.value.find(V=>V.sessionCode===z.sessionCode);if(q)r.value=q;else{const V=A(z);r.value=V}},O=z=>{u=z},N=async(z=!0)=>{var Q,H,Y,P;let q=n.value;if(z){const F=await b("getSessionsApi")();y(F)}let V=null,G=[];if(q.length>0){const X=q.sort((le,de)=>new Date(de.createdAt||"").getTime()-new Date(le.createdAt||"").getTime())[0];G=await b("getSessionContentsApi")(X.sessionCode),G.filter(le=>!m$.includes(le.role)).some(le=>le.content&&le.content.trim()!=="")||(V={...X,isEdit:!1})}if(V?(b("setSessionContents")(G),v(V)):V=await k(),!h.value||z){const X=b("getAgentInfoApi"),{conversationSettings:F,promptSetting:ae,agentName:le}=await X();Object.assign(h.value,{conversationSettings:F,promptSetting:ae,agentName:le})}return(Y=(H=(Q=h.value)==null?void 0:Q.promptSetting)==null?void 0:H.content)!=null&&Y.length&&await b("handleCompleteRole")(V.sessionCode,h.value.promptSetting.content),{conversationSettings:(P=h.value)==null?void 0:P.conversationSettings}};return{sessionList:n,currentSession:r,setSessionList:y,addSession:A,addNewSession:k,initSession:N,updateSession:B,startEditSession:E,finishEditSession:T,deleteSession:L,setCurrentSession:I,registerSdkMethods:O,switchSessionWithContents:v,sessionContentLoading:a,agentInfo:h,getSessionList:async()=>{const q=await b("getSessionsApi")();if(y(q),r.value){const V=q.find(G=>{var Q;return G.sessionCode===((Q=r.value)==null?void 0:Q.sessionCode)});V&&(r.value={...r.value,...V,isEdit:r.value.isEdit})}return q.forEach(V=>{o.value[V.sessionCode]||(o.value[V.sessionCode]=0),o.value[V.sessionCode]++}),n.value},sessionUpdateCounter:o}}const jPe=Symbol("session-store");function mtn(){const n=ptn();return J.provide(jPe,n),n}function btn(){const n=J.inject(jPe);if(!n)throw new Error("Session store not provided");return n}function vM(n={}){const r="ai-blueking-tooltip",a=J.ref([]),o=(y,A,k={})=>{try{const E=typeof y=="string"?document.querySelector(y):y;if(!E)return console.warn(`Tooltip target not found: ${y}`),null;const T={content:A,placement:"top",arrow:!0,delay:[300,0],theme:r,...n,...k},B=Yk(E,T);return a.value.push(B),B}catch(E){return console.error("Failed to create tooltip:",E),null}},u=(y,A,k={})=>{const E=document.querySelectorAll(y),T=[];return E.forEach(B=>{const L=o(B,A,k);L&&T.push(L)}),T},d=y=>{const A=[];return y.forEach(({element:k,content:E,options:T})=>{const B=o(k,E,T);B&&A.push(B)}),A},h=()=>{a.value.forEach(y=>{y.destroy()}),a.value=[]},b=(y,A)=>{y.setContent(A)},v=y=>{y.destroy()};return J.onBeforeUnmount(()=>{h()}),{instances:a,createTooltip:o,createTooltipsForSelector:u,createMultipleTooltips:d,destroyAll:h,updateContent:b,destroyInstance:v}}const vtn={class:"bkai-history-panel"},wtn={class:"history-panel-header"},ytn={class:"history-panel-header-title"},Atn={class:"input-icon"},xtn={class:"history-panel-content"},ktn={class:"history-panel-content-item-title"},Etn={class:"history-panel-content-item-list"},Ctn=["onClick"],Ttn={class:"history-panel-content-item-list-item-action"},Stn=["onClick"],Btn=J.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(n,{emit:r}){const a=n,o=r,u=qu.bkTooltips,d=J.ref(""),h=a.sessionStore,b=J.ref({}),v=J.computed(()=>{const L={today:{key:"today",alias:ms("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:ms("昨天"),sessionList:[]},before:{key:"before",alias:ms("之前"),sessionList:[]}},I=h.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(d.value.toLowerCase()));for(const O of I){const N=new Date(O.createdAt||""),j=new Date,z=new Date;z.setDate(z.getDate()-1),N.toDateString()===j.toDateString()?L.today.sessionList.push(O):N.toDateString()===z.toDateString()?L.yesterday.sessionList.push(O):L.before.sessionList.push(O)}return Object.values(L).filter(O=>O.sessionList.length>0)}),y=L=>{var I;return((I=h.currentSession.value)==null?void 0:I.sessionCode)===L.sessionCode},A=L=>{y(L)||(h.switchSessionWithContents(L),o("close"))},k=L=>{h.deleteSession(L)},E=L=>{h.finishEditSession(L.sessionCode,{sessionName:L.sessionName})},T=L=>{h.startEditSession(L.sessionCode),J.nextTick(()=>{const I=b.value[L.sessionCode];I&&I.focus()})},B=(L,I)=>{I.target.blur()};return(L,I)=>(J.openBlock(),J.createElementBlock("div",vtn,[J.createElementVNode("div",wtn,[J.createElementVNode("h1",ytn,J.toDisplayString(J.unref(ms)("历史会话")),1),J.createVNode(J.unref(qu.Input),{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=O=>d.value=O),behavior:"simplicity",placeholder:J.unref(ms)("搜索会话名称"),style:{height:"22px"}},{suffix:J.withCtx(()=>[J.createElementVNode("span",Atn,[J.createVNode(J.unref(b$t.Search))])]),_:1},8,["modelValue","placeholder"])]),J.createElementVNode("div",xtn,[v.value.length>0?(J.openBlock(!0),J.createElementBlock(J.Fragment,{key:0},J.renderList(v.value,O=>(J.openBlock(),J.createElementBlock("div",{key:O.key,class:"history-panel-content-item"},[J.createElementVNode("div",ktn,[J.createElementVNode("span",null,J.toDisplayString(O.alias),1)]),J.createElementVNode("div",Etn,[(J.openBlock(!0),J.createElementBlock(J.Fragment,null,J.renderList(O.sessionList,N=>(J.openBlock(),J.createElementBlock("div",{key:`${N.sessionCode}-${J.unref(h).sessionUpdateCounter.value[N.sessionCode]||0}`,class:J.normalizeClass(["history-panel-content-item-list-item",{active:y(N)}]),onClick:j=>A(N)},[N.isEdit?(J.openBlock(),J.createBlock(J.unref(qu.Input),{key:1,ref_for:!0,ref:j=>{N.isEdit&&(b.value[N.sessionCode]=j)},modelValue:N.sessionName,"onUpdate:modelValue":j=>N.sessionName=j,style:{width:"100%",height:"28px"},onBlur:j=>E(N),onEnter:B,onClick:I[2]||(I[2]=J.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(J.openBlock(),J.createElementBlock(J.Fragment,{key:0},[J.createVNode(J.unref(qu.OverflowTitle),{style:{width:"calc(100% - 42px)"}},{default:J.withCtx(()=>[J.createTextVNode(J.toDisplayString(N.sessionName),1)]),_:2},1024),J.createElementVNode("span",Ttn,[J.withDirectives(J.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:J.withModifiers(j=>T(N),["stop"])},null,8,Stn),[[J.unref(u),{content:J.unref(ms)("编辑"),boundary:"parent"}]]),J.createVNode(J.unref(qu.PopConfirm),{title:J.unref(ms)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:j=>k(N.sessionCode)},{default:J.withCtx(()=>[J.withDirectives(J.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:I[1]||(I[1]=J.withModifiers(()=>{},["stop"]))},null,512),[[J.unref(u),{content:J.unref(ms)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,Ctn))),128))])]))),128)):(J.openBlock(),J.createBlock(J.unref(qu.Exception),{key:1,style:{"margin-top":"100px"},description:d.value?J.unref(ms)("搜索为空"):J.unref(ms)("暂无对话"),scene:"part",type:d.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),Wf=(n,r)=>{const a=n.__vccOpts||n;for(const[o,u]of r)a[o]=u;return a},Mtn=Wf(Btn,[["__scopeId","data-v-538e5107"]]),_tn={class:"left-section"},Ltn={class:"logo"},Dtn=["src"],Itn={class:"title"},Rtn={class:"right-section"},Otn=Wf(J.defineComponent({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0}},emits:["close","toggleCompression","newChat"],setup(n,{emit:r}){const a=n,o=r,u=qu.bkTooltips,d=btn(),h=J.ref(null),{handleTriggerClick:b}=ctn({triggerRef:h,panelComponent:Mtn,panelProps:{sessionStore:d},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),v=J.computed(()=>{var N,j,z;return a.enableChatSession?a.title||`${((j=d.agentInfo.value)==null?void 0:j.agentName)||""}-${(z=d.currentSession.value)==null?void 0:z.sessionName}`:(N=d.agentInfo.value)==null?void 0:N.agentName}),y=J.computed(()=>a.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),A=J.computed(()=>a.isCompressionHeight?ms("恢复默认尺寸"):ms("缩小高度")),k=J.ref(null),E=J.ref(null),T=J.ref(null),{createTooltip:B,destroyAll:L}=vM({arrow:!0,delay:[0,0]}),I=()=>{L(),E.value&&B(E.value,A.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),T.value&&B(T.value,ms("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};J.watch(()=>a.isCompressionHeight,()=>{I()}),J.onMounted(()=>{I()}),J.onBeforeUnmount(()=>{L()});const O=async()=>{try{o("newChat"),await d.initSession(!1)}catch(N){console.error("Failed to create new chat:",N)}};return(N,j)=>(J.openBlock(),J.createElementBlock("div",{ref_key:"headerRef",ref:k,class:J.normalizeClass(["header drag-handle",{draggable:a.draggable}])},[J.createElementVNode("div",_tn,[J.createElementVNode("div",Ltn,[J.createElementVNode("img",{src:J.unref(L0e),alt:"logo"},null,8,Dtn)]),J.createElementVNode("div",Itn,J.toDisplayString(v.value),1)]),J.createElementVNode("div",Rtn,[a.showNewChatIcon&&a.enableChatSession!==!1?J.withDirectives((J.openBlock(),J.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:O},null,512)),[[J.unref(u),{content:J.unref(ms)("新增会话"),boundary:"parent"}]]):J.createCommentVNode("v-if",!0),a.showHistoryIcon&&a.enableChatSession!==!1?J.withDirectives((J.openBlock(),J.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:h,class:"bkai-icon bkai-history",onClick:j[0]||(j[0]=(...z)=>J.unref(b)&&J.unref(b)(...z))},null,512)),[[J.unref(u),{content:J.unref(ms)("历史会话"),boundary:"parent"}]]):J.createCommentVNode("v-if",!0),J.createElementVNode("i",{ref_key:"compressionRef",ref:E,class:J.normalizeClass(["bkai-icon",y.value]),onClick:j[1]||(j[1]=z=>o("toggleCompression"))},null,2),J.createElementVNode("i",{ref_key:"closeRef",ref:T,class:"bkai-icon bkai-close-line-2",onClick:j[2]||(j[2]=z=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),Ftn={class:"bar-button-text"},HPe=Wf(J.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(n,{emit:r}){J.useCssVars(u=>({"5ec4534a":u.color}));const a=r,o=n;return(u,d)=>(J.openBlock(),J.createElementBlock("div",{class:"bar-button",onClick:d[0]||(d[0]=h=>a("click"))},[J.createElementVNode("i",{class:J.normalizeClass(["bkai-icon",o.icon])},null,2),J.createElementVNode("span",Ftn,J.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),Ntn={class:"ai-cite"},Ptn={class:"content"},VPe=Wf(J.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(n){const r=n,a=J.ref(null);J.watch(()=>r.text,()=>{a.value&&h(a.value),J.nextTick(()=>{b()})});const o=J.ref(null),u=v=>v.scrollWidth>v.clientWidth,{createTooltip:d,destroyInstance:h}=vM({arrow:!0,delay:[0,0]}),b=()=>{if(o.value){const v=o.value;u(v)&&(a.value=d(v,r.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return J.onMounted(()=>{J.nextTick(()=>{b()})}),(v,y)=>J.withDirectives((J.openBlock(),J.createElementBlock("section",Ntn,[J.createElementVNode("span",Ptn,[J.createElementVNode("span",{class:J.normalizeClass(["content-text",{"show-close-icon":v.showCloseIcon}])},[y[1]||(y[1]=J.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),J.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},J.toDisplayString(v.text),513)],2),v.showCloseIcon?(J.openBlock(),J.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:y[0]||(y[0]=A=>v.$emit("close"))})):J.createCommentVNode("v-if",!0)])],512)),[[J.vShow,v.text]])}}),[["__scopeId","data-v-af2b067c"]]);function UPe(n={}){const r=J.ref(!1);return{isComposing:r,handleCompositionStart:()=>{r.value=!0},handleCompositionEnd:()=>{r.value=!1},handleEnter:b=>{const{isLoading:v,onSend:y,getInputValue:A=()=>"",clearInput:k=()=>{}}=n;if(b.shiftKey)return;b.preventDefault();const E=A();v!=null&&v.value||!E.trim()||r.value||(y==null||y(E),k())},handleSend:()=>{const{onSend:b,getInputValue:v=()=>"",clearInput:y=()=>{}}=n,A=v();A.trim()&&(b==null||b(A),y())},handleStop:()=>{const{onStop:b}=n;b==null||b()}}}const GPe="enablePopup";function Y0e(){return{enablePopup:J.inject(GPe,!0)}}const WO=J.ref(""),qPe=J.ref(""),W0e=J.ref(!1),K0e={width:80,height:34,offset:15,debounceTime:300};function KO(n){const r=J.ref(!1),a=J.ref({top:"0px",left:"0px"});let o,u=null;const d=J.ref(null);let h=!1,b=null;const v=j=>{b={x:j.clientX,y:j.clientY}},y=j=>{u=j,b&&(h=Math.sqrt(Math.pow(j.clientX-b.x,2)+Math.pow(j.clientY-b.y,2))>5),b=null},A=(j,z)=>{const q=window.innerWidth,{width:V,height:G,offset:Q}=K0e;let H=j+window.scrollX-V/2;H=Math.max(Q,Math.min(H,q-V-Q));let Y=z+window.scrollY-G-Q;return z<=G+Q&&(Y=z+window.scrollY+Q),{top:`${Y}px`,left:`${H}px`}},k=j=>{const z=window.innerWidth,{width:q,height:V,offset:G}=K0e;let Q=j.left+window.scrollX+j.width/2-q/2;Q=Math.max(G,Math.min(Q,z-q-G));let H=j.top+window.scrollY-V-G;return j.top<=V+G&&(H=j.bottom+window.scrollY+G),{top:`${H}px`,left:`${Q}px`}},E=(j,z)=>{let q=j;for(;q&&q!==document.documentElement;){if(q.hasAttribute&&q.hasAttribute(z))return!0;q=q.parentElement}return!1},T=()=>{clearTimeout(o),o=setTimeout(()=>{var Q;const j=window.getSelection();if(!(j!=null&&j.toString().trim())){B();return}const z=j.getRangeAt(0);if((Q=z.commonAncestorContainer.parentElement)!=null&&Q.closest(".ai-blueking-wrapper")){B();return}const q=z.commonAncestorContainer,V=q.nodeType===Node.ELEMENT_NODE?q:q.parentElement;if(E(V,"ai-blueking-hide")){B();return}W0e.value=!1,WO.value=j.toString().trim();const G=document.activeElement;if((G==null?void 0:G.tagName)==="TEXTAREA"){if(!u){B();return}const{clientX:H,clientY:Y}=u;a.value=A(H,Y),r.value=!0,u=null}else{const H=z.getBoundingClientRect();if(!H.width||!H.height){B();return}a.value=k(H),r.value=!0}},K0e.debounceTime)},B=()=>{r.value=!1,W0e.value||(WO.value="")},L=j=>{var G,Q,H;const z=j.target,q=((G=z.classList)==null?void 0:G.contains("ai-blueking-tag-text"))||((Q=z.classList)==null?void 0:Q.contains("shortcut-btn")),V=(H=d.value)==null?void 0:H.contains(z);if(!(q||!h)){if(h){j.preventDefault(),j.stopPropagation(),h=!1;return}V||(B(),I())}},I=()=>{const j=window.getSelection();j&&j.removeAllRanges(),WO.value=""},O=j=>{WO.value=j},N=j=>{qPe.value=j};return J.onMounted(()=>{n&&(document.addEventListener("selectionchange",T),document.addEventListener("mousedown",v),document.addEventListener("mouseup",y),document.addEventListener("click",L,!0))}),J.onBeforeUnmount(()=>{n&&(document.removeEventListener("selectionchange",T),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",y),document.removeEventListener("click",L,!0)),clearTimeout(o)}),{isIconVisible:r,iconPosition:a,selectedText:WO,citeText:qPe,hideIcon:B,clearSelection:I,setSelection:O,setCiteText:N,lockSelectedText:W0e,popupRef:d}}function ztn(n={}){const{minHeight:r=68,maxHeight:a=248,defaultHeight:o=68}=n,u=J.ref(o),d=J.ref(),h=()=>{if(!d.value)return;d.value.style.height=`${r}px`;const y=d.value.scrollHeight;u.value=Math.min(Math.max(y,r),a)};return{textareaHeight:u,textareaRef:d,updateHeight:h,resetHeight:()=>{u.value=o},bindTextarea:y=>{d.value=y,h()}}}function QPe(n,r,a=J.ref(null),o={}){const u=J.ref([]),d=J.ref([]),{theme:h="ai-blueking-light light",placement:b="bottom",trigger:v="mouseenter",interactive:y=!0,allowHTML:A=!0,arrow:k=!0,offset:E=[0,4],onItemClick:T}=o,{createTooltip:B,destroyAll:L}=vM({theme:h,placement:b,trigger:v,interactive:y,allowHTML:A,arrow:k,offset:E}),I=J.computed(()=>d.value.length===0?"":`<div class="tippy-dropdown-menu">${d.value.map(q=>`<div class="tippy-menu-item" data-item-id="${q.id}">
|
|
197
197
|
${q.icon?`<i class="${q.icon}"></i>`:""}
|
|
198
198
|
<span>${q.name}</span>
|
|
199
199
|
</div>`).join("")}</div>`),O=async()=>{var ae;const z=n.value;if(!z)return;u.value=[...r.value],d.value=[],await J.nextTick();const q=z.clientWidth,V=Array.from(z.children),G=window.getComputedStyle(z),Q=parseFloat(G.gap)||0;let H=0;if(V.forEach((le,de)=>{H+=le.getBoundingClientRect().width,de<V.length-1&&(H+=Q)}),H<=q)return;const Y=((ae=a.value)==null?void 0:ae.offsetWidth)||70,P=q-Y;let X=0,F=-1;for(let le=0;le<V.length;le++){const de=V[le];if(X+=de.getBoundingClientRect().width,le<V.length-1&&(X+=Q),X>P){F=le;break}}F===-1&&(F=r.value.length),u.value=r.value.slice(0,F),d.value=r.value.slice(F)};J.watch(()=>r.value,()=>{requestAnimationFrame(O)},{deep:!0,immediate:!0}),J.watch(()=>d.value,z=>{J.nextTick(()=>{z.length>0&&a.value?(L(),B(a.value,I.value,{onShow:()=>{setTimeout(()=>{document.querySelectorAll(".tippy-menu-item").forEach(V=>{V.addEventListener("click",N)})},0)},onHide:()=>{document.querySelectorAll(".tippy-menu-item").forEach(V=>{V.removeEventListener("click",N)})}})):L()})},{immediate:!0});const N=z=>{const V=z.currentTarget.dataset.itemId,G=d.value.find(Q=>Q.id===V);G&&T&&T(G)};let j=null;return J.onMounted(()=>{n.value&&(j=new ResizeObserver(()=>{requestAnimationFrame(O)}),j.observe(n.value))}),J.onBeforeUnmount(()=>{j&&n.value&&j.unobserve(n.value),L()}),{visibleItems:u,hiddenItems:d,calculateVisibleItems:O}}const jtn={class:"ai-selected-box"},Htn={class:"ai-selected-tip"},Vtn={class:"ai-selected-tip-text"},Utn={class:"ai-selected-box-content"},Gtn=["onClick"],qtn=Wf(J.defineComponent({__name:"ai-selected-box",props:{selectedText:{},actions:{}},emits:["shortcut-click"],setup(n,{emit:r}){const a=r,o=n,{clearSelection:u}=KO(!0),d=J.ref(null),h=J.ref(null),b=J.computed(()=>o.actions),{visibleItems:v,hiddenItems:y}=QPe(d,b,h,{theme:"ai-blueking-light light",placement:"top",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:k=>{a("shortcut-click",{shortcut:k,source:"ai-selected"})}}),A=k=>{a("shortcut-click",{shortcut:k,source:"ai-selected"})};return(k,E)=>(J.openBlock(),J.createElementBlock("div",jtn,[J.createElementVNode("i",{class:"bkai-icon bkai-close-circle-shape",onClick:E[0]||(E[0]=(...T)=>J.unref(u)&&J.unref(u)(...T))}),J.createElementVNode("div",Htn,[E[1]||(E[1]=J.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),J.createElementVNode("span",Vtn,J.toDisplayString(J.unref(ms)("已框选内容")),1)]),J.createElementVNode("div",Utn,J.toDisplayString(o.selectedText),1),J.createElementVNode("div",{ref_key:"actionsContainerRef",ref:d,class:"ai-selected-box-actions"},[J.createCommentVNode(" 可见的操作项 "),(J.openBlock(!0),J.createElementBlock(J.Fragment,null,J.renderList(J.unref(v),T=>(J.openBlock(),J.createElementBlock("div",{key:T.id,class:"ai-selected-box-action",onClick:B=>A(T)},[J.createElementVNode("i",{class:J.normalizeClass(["bkai-icon",T.icon])},null,2),J.createElementVNode("span",null,J.toDisplayString(T.name),1)],8,Gtn))),128)),J.createCommentVNode(' "更多"按钮 '),J.unref(y).length>0?(J.openBlock(),J.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:h,class:"ai-selected-box-action more-container"},E[2]||(E[2]=[J.createElementVNode("span",null,"更多",-1),J.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)]),512)):J.createCommentVNode("v-if",!0)],512)]))}}),[["__scopeId","data-v-42b29188"]]),Qtn={class:"bkai-prompt-list-search"},$tn={class:"bkai-prompt-list-content"},Ytn={key:0,class:"bkai-prompt-list-empty"},Wtn=["onClick","onMouseover"],Ktn=Wf(J.defineComponent({__name:"prompt-list",props:{prompts:{},show:{type:Boolean}},emits:["select","height-change","update:show"],setup(n,{expose:r,emit:a}){const o=n,u=a,d=J.ref(""),h=J.ref(null),b=J.ref(null),v=J.computed(()=>d.value.trim()?o.prompts.filter(L=>L.toLowerCase().includes(d.value.toLowerCase())):o.prompts);J.watch(()=>o.show,L=>{L&&J.nextTick(()=>{b.value=null})});const y=L=>{u("select",L),u("update:show",!1),d.value=""},A=()=>{v.value.length&&(b.value===null||b.value===v.value.length-1?b.value=0:b.value++,T())},k=()=>{v.value.length&&(b.value===null||b.value===0?b.value=v.value.length-1:b.value--,T())},E=()=>!v.value.length||b.value===null?!1:(y(v.value[b.value]),!0),T=()=>{if(b.value===null||!h.value)return;const L=h.value.querySelector(".bkai-prompt-list-content");if(!L)return;const I=L.children[b.value];if(!I)return;const O=L.getBoundingClientRect(),N=I.getBoundingClientRect();N.top<O.top?L.scrollTop=I.offsetTop:N.bottom>O.bottom&&(L.scrollTop=I.offsetTop+I.offsetHeight-L.clientHeight)};let B=null;return J.onMounted(()=>{h.value&&(B=new ResizeObserver(L=>{for(const I of L)u("height-change",I.contentRect.height)}),B.observe(h.value))}),J.onBeforeUnmount(()=>{B&&h.value&&(B.unobserve(h.value),B.disconnect())}),r({handleArrowDown:A,handleArrowUp:k,handleEnter:E}),(L,I)=>J.withDirectives((J.openBlock(),J.createElementBlock("div",{ref_key:"promptListEl",ref:h,class:"bkai-prompt-list"},[J.createElementVNode("div",Qtn,[J.createVNode(J.unref(qu.Input),{modelValue:d.value,"onUpdate:modelValue":I[0]||(I[0]=O=>d.value=O),behavior:"simplicity",placeholder:"请输入关键词"},null,8,["modelValue"])]),J.createElementVNode("div",$tn,[v.value.length===0?(J.openBlock(),J.createElementBlock("div",Ytn,J.toDisplayString(J.unref(ms)("无匹配结果")),1)):(J.openBlock(!0),J.createElementBlock(J.Fragment,{key:1},J.renderList(v.value,(O,N)=>(J.openBlock(),J.createElementBlock("div",{key:O,style:{overflow:"hidden"},class:J.normalizeClass(["bkai-prompt-list-item",{active:b.value===N}]),onClick:j=>y(O),onMouseleave:I[1]||(I[1]=j=>b.value=null),onMouseover:j=>b.value=N},J.toDisplayString(O),43,Wtn))),128))])],512)),[[J.vShow,L.show]])}}),[["__scopeId","data-v-64af2ecb"]]),Xtn=["onClick"],Jtn={class:"shortcut-text"},Ztn=Wf(J.defineComponent({__name:"shortcuts-bar",props:{shortcuts:{}},emits:["shortcut-click"],setup(n,{emit:r}){const a=n,o=r,u=J.ref(null),d=J.ref(null),h=J.computed(()=>a.shortcuts),{visibleItems:b,hiddenItems:v}=QPe(u,h,d,{theme:"ai-blueking-light light",placement:"bottom",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:y=>{o("shortcut-click",{shortcut:y,source:"main"})}});return(y,A)=>(J.openBlock(),J.createElementBlock("div",{ref_key:"containerRef",ref:u,class:"shortcuts-bar"},[J.createCommentVNode(" 可见的 shortcuts "),(J.openBlock(!0),J.createElementBlock(J.Fragment,null,J.renderList(J.unref(b),k=>(J.openBlock(),J.createElementBlock("div",{key:k.id,class:"shortcut-item",onClick:E=>o("shortcut-click",{shortcut:k,source:"main"})},[J.createElementVNode("i",{class:J.normalizeClass(k.icon)},null,2),J.createElementVNode("span",Jtn,J.toDisplayString(k.name),1)],8,Xtn))),128)),J.createCommentVNode(' "更多"按钮 '),J.unref(v).length>0?(J.openBlock(),J.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:d,class:"shortcut-item more-container"},A[0]||(A[0]=[J.createElementVNode("span",{class:"shortcut-text"},"更多",-1),J.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)]),512)):J.createCommentVNode("v-if",!0)],512))}}),[["__scopeId","data-v-e115e445"]]),enn={class:"chat-input-box"},tnn={key:0,class:"cite"},nnn=["disabled","placeholder"],rnn={class:"input-tools"},inn=Wf(J.defineComponent({__name:"chat-input-box",props:{shortcuts:{default:()=>[]},conversationSettings:{},loading:{type:Boolean},prompts:{},disabled:{type:Boolean},placeholder:{default:()=>ms(`输入 "/" 唤出 Prompt
|
package/dist/vue3/{journeyDiagram-49397b02-C7AiQpxY.mjs → journeyDiagram-49397b02-CRO5IUYN.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as yt, s as ft, b as dt, c as pt, C as gt, D as mt, g as C, d as W, e as xt, E as kt } from "./vue3-
|
|
2
|
-
import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-08f97a94-
|
|
1
|
+
import { a as yt, s as ft, b as dt, c as pt, C as gt, D as mt, g as C, d as W, e as xt, E as kt } from "./vue3-Tv8faLO-.mjs";
|
|
2
|
+
import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-08f97a94-Dfa51b1C.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
|
-
import { a as Q } from "./arc-
|
|
4
|
+
import { a as Q } from "./arc-DzkgqoKW.mjs";
|
|
5
5
|
var G = function() {
|
|
6
6
|
var t = function(p, s, r, a) {
|
|
7
7
|
for (r = r || {}, a = p.length; a--; r[p[a]] = s)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as F, b as gn, c as zn, d as L, k as Xn, e as Un, g as Hn, j as P, l as xn, m as En, n as kn, t as jn, o as yn, p as Jn, q as Kn, G as x, f as s, h as w, i as g, r as M, v as y, s as Y } from "./graph-
|
|
2
|
-
import { a5 as A, a6 as Zn, a7 as Qn, a8 as Nn, a9 as B, aa as Ln, ab as ne, ac as _n, ad as J, ae as ee, af as re, ag as K, ah as te, ai as Cn, aj as ie, ak as ae, al as H } from "./vue3-
|
|
1
|
+
import { a as F, b as gn, c as zn, d as L, k as Xn, e as Un, g as Hn, j as P, l as xn, m as En, n as kn, t as jn, o as yn, p as Jn, q as Kn, G as x, f as s, h as w, i as g, r as M, v as y, s as Y } from "./graph-BfejK7j1.mjs";
|
|
2
|
+
import { a5 as A, a6 as Zn, a7 as Qn, a8 as Nn, a9 as B, aa as Ln, ab as ne, ac as _n, ad as J, ae as ee, af as re, ag as K, ah as te, ai as Cn, aj as ie, ak as ae, al as H } from "./vue3-Tv8faLO-.mjs";
|
|
3
3
|
var oe = /\s/;
|
|
4
4
|
function ue(n) {
|
|
5
5
|
for (var e = n.length; e-- && oe.test(n.charAt(e)); )
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as un, Z as I, _ as Y, $ as fn, a0 as Z } from "./vue3-
|
|
1
|
+
import { Y as un, Z as I, _ as Y, $ as fn, a0 as Z } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import { i as cn } from "./init-DjUOC4st.mjs";
|
|
3
3
|
function F(n, t) {
|
|
4
4
|
return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as Nr, ao as dv, ap as gv, aq as pv, g as ro, P as yv, o as mv, V as En, i as xn, d as bv, U as wv } from "./vue3-
|
|
1
|
+
import { l as Nr, ao as dv, ap as gv, aq as pv, g as ro, P as yv, o as mv, V as En, i as xn, d as bv, U as wv } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import { c as ao, g as Ev } from "./_commonjsHelpers-DaMA6jEr.mjs";
|
|
3
|
-
import { a as xv } from "./createText-2e5e7dd3-
|
|
3
|
+
import { a as xv } from "./createText-2e5e7dd3-CBYk3AP-.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
function ks(t, e) {
|
|
6
6
|
(e == null || e > t.length) && (e = t.length);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Q as H, a as rt, s as at, b as lt, c as ot, C as ct, D as ht, l as et, g as it, T as ut, P as yt, U as ft, e as pt, i as gt, E as dt, V as mt } from "./vue3-
|
|
1
|
+
import { Q as H, a as rt, s as at, b as lt, c as ot, C as ct, D as ht, l as et, g as it, T as ut, P as yt, U as ft, e as pt, i as gt, E as dt, V as mt } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
|
-
import { a as tt } from "./arc-
|
|
3
|
+
import { a as tt } from "./arc-DzkgqoKW.mjs";
|
|
4
4
|
import { o as _t } from "./ordinal-C0oynhte.mjs";
|
|
5
5
|
import { a as xt } from "./array-CqVTtuYm.mjs";
|
|
6
6
|
import { c as F } from "./path-DLwuMfdd.mjs";
|
package/dist/vue3/{quadrantDiagram-120e2f19-DPJcxru3.mjs → quadrantDiagram-120e2f19-BazjVmHA.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as vt, a as Lt, C as bt, D as Ct, b as zt, c as Et, g as yt, l as ot, d as gt, e as Dt, E as It, V as D, W as Bt, i as wt } from "./vue3-
|
|
1
|
+
import { s as vt, a as Lt, C as bt, D as Ct, b as zt, c as Et, g as yt, l as ot, d as gt, e as Dt, E as It, V as D, W as Bt, i as wt } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
|
-
import { l as mt } from "./linear-
|
|
3
|
+
import { l as mt } from "./linear-CYyiZrJd.mjs";
|
|
4
4
|
var pt = function() {
|
|
5
5
|
var e = function(K, n, r, l) {
|
|
6
6
|
for (r = r || {}, l = K.length; l--; r[K[l]] = n)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as Ce, s as Fe, b as Me, c as De, g as Te, d as oe, e as Pe, E as Ye, l as Ne, k as ke } from "./vue3-
|
|
2
|
-
import { G as Ue } from "./graph-
|
|
3
|
-
import { l as Be } from "./layout-
|
|
1
|
+
import { a as Ce, s as Fe, b as Me, c as De, g as Te, d as oe, e as Pe, E as Ye, l as Ne, k as ke } from "./vue3-Tv8faLO-.mjs";
|
|
2
|
+
import { G as Ue } from "./graph-BfejK7j1.mjs";
|
|
3
|
+
import { l as Be } from "./layout-Dy1NuV40.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as Qe } from "./line-
|
|
5
|
+
import { l as Qe } from "./line-DiEybcOh.mjs";
|
|
6
6
|
var ce = function() {
|
|
7
7
|
var e = function(V, i, r, a) {
|
|
8
8
|
for (r = r || {}, a = V.length; a--; r[V[a]] = i)
|
package/dist/vue3/{sankeyDiagram-04a897e0-DcJ7vqUs.mjs → sankeyDiagram-04a897e0-C52jvBpz.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as mt, C as kt, s as _t, a as xt, c as vt, b as bt, g as rt, an as wt, d as G, o as St, E as Lt, k as Et } from "./vue3-
|
|
1
|
+
import { D as mt, C as kt, s as _t, a as xt, c as vt, b as bt, g as rt, an as wt, d as G, o as St, E as Lt, k as Et } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
3
|
import { o as At } from "./ordinal-C0oynhte.mjs";
|
|
4
4
|
import { s as Tt } from "./Tableau10-D7jGxypv.mjs";
|
package/dist/vue3/{sequenceDiagram-704730f1-Czk1oC0y.mjs → sequenceDiagram-704730f1-DTiycqeh.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as we, s as ve, c as $t, g as st, D as _e, C as ke, b as Pe, d as Lt, l as G, j as te, e as Le, f as Ie, k as v, i as At, E as Ae, B, a1 as nt, a2 as wt, U as ee, a3 as Ne, t as se, X as Bt } from "./vue3-
|
|
2
|
-
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./svgDrawCommon-08f97a94-
|
|
1
|
+
import { a as we, s as ve, c as $t, g as st, D as _e, C as ke, b as Pe, d as Lt, l as G, j as te, e as Le, f as Ie, k as v, i as At, E as Ae, B, a1 as nt, a2 as wt, U as ee, a3 as Ne, t as se, X as Bt } from "./vue3-Tv8faLO-.mjs";
|
|
2
|
+
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./svgDrawCommon-08f97a94-Dfa51b1C.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
var Yt = function() {
|
|
5
5
|
var t = function(dt, w, k, L) {
|
package/dist/{vue2/stateDiagram-587899a1-5fbTvUa3.mjs → vue3/stateDiagram-587899a1-BuLhdLQ9.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as P, d as N, p as W } from "./styles-6aaf32cf-
|
|
2
|
-
import { g as t, d as H, l as b, e as R, k as T, F as v, B as U } from "./
|
|
3
|
-
import { G as C } from "./graph-
|
|
4
|
-
import { l as F } from "./layout-
|
|
1
|
+
import { s as P, d as N, p as W } from "./styles-6aaf32cf-F3oT21Y2.mjs";
|
|
2
|
+
import { g as t, d as H, l as b, e as R, k as T, F as v, B as U } from "./vue3-Tv8faLO-.mjs";
|
|
3
|
+
import { G as C } from "./graph-BfejK7j1.mjs";
|
|
4
|
+
import { l as F } from "./layout-Dy1NuV40.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { l as $ } from "./line-
|
|
6
|
+
import { l as $ } from "./line-DiEybcOh.mjs";
|
|
7
7
|
const O = (e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), X = (e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), J = (e, i) => {
|
|
8
8
|
const o = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = o.node().getBBox();
|
|
9
9
|
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), o;
|
package/dist/vue3/{stateDiagram-v2-d93cdb3a-DcDRwvpk.mjs → stateDiagram-v2-d93cdb3a-BpQYfGCZ.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as Q, d as B, p as X, D as Z, a as H, b as m, S as F, c as I } from "./styles-6aaf32cf-
|
|
2
|
-
import { G as tt } from "./graph-
|
|
3
|
-
import { l as E, g, d as x, B as et, e as ot, k as w } from "./vue3-
|
|
4
|
-
import { r as st } from "./index-3862675e-
|
|
1
|
+
import { s as Q, d as B, p as X, D as Z, a as H, b as m, S as F, c as I } from "./styles-6aaf32cf-F3oT21Y2.mjs";
|
|
2
|
+
import { G as tt } from "./graph-BfejK7j1.mjs";
|
|
3
|
+
import { l as E, g, d as x, B as et, e as ot, k as w } from "./vue3-Tv8faLO-.mjs";
|
|
4
|
+
import { r as st } from "./index-3862675e-pGQYev1i.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import "./layout-
|
|
6
|
+
import "./layout-Dy1NuV40.mjs";
|
|
7
7
|
const h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", Dt = `${_}-${ut}`, bt = "cluster-alt", ft = `${_}-${bt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, M = `${N}${V}`, W = "fill:none", z = "fill: #333", q = "c", K = "text", j = "normal";
|
|
8
8
|
let y = {}, d = 0;
|
|
9
9
|
const yt = function(t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Ut, D as zt, s as Mt, a as Ht, c as Xt, b as Kt, g as Y, k as ot, l as D, E as Wt, a4 as Jt } from "./
|
|
1
|
+
import { C as Ut, D as zt, s as Mt, a as Ht, c as Xt, b as Kt, g as Y, k as ot, l as D, E as Wt, a4 as Jt } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
var gt = function() {
|
|
3
3
|
var t = function(C, r, n, i) {
|
|
4
4
|
for (n = n || {}, i = C.length; i--; n[C[i]] = r)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ut, D as rt, g as F, s as at, a as lt, b as ct, c as ot, k as v, B as We, l as ht, E as At, i as pt, G as Re, d as z } from "./vue3-
|
|
1
|
+
import { C as ut, D as rt, g as F, s as at, a as lt, b as ct, c as ot, k as v, B as We, l as ht, E as At, i as pt, G as Re, d as z } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
var Ve = function() {
|
|
3
3
|
var e = function(x, u, a, h) {
|
|
4
4
|
for (a = a || {}, h = x.length; h--; a[x[h]] = u)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as R } from "./graph-
|
|
2
|
-
import { S as z, v as F, x as U, y as j, z as H, A as K, l as g, g as S, d as C, B as W, o as X, p as N, q as E, n as L, t as G, k as q, r as J } from "./
|
|
3
|
-
import { r as Q } from "./index-3862675e-
|
|
4
|
-
import { c as Y } from "./channel-
|
|
1
|
+
import { G as R } from "./graph-BfejK7j1.mjs";
|
|
2
|
+
import { S as z, v as F, x as U, y as j, z as H, A as K, l as g, g as S, d as C, B as W, o as X, p as N, q as E, n as L, t as G, k as q, r as J } from "./vue3-Tv8faLO-.mjs";
|
|
3
|
+
import { r as Q } from "./index-3862675e-pGQYev1i.mjs";
|
|
4
|
+
import { c as Y } from "./channel-Cg1WNRjP.mjs";
|
|
5
5
|
function Z(e) {
|
|
6
6
|
return typeof e == "string" ? new z([document.querySelectorAll(e)], [document.documentElement]) : new z([U(e)], F);
|
|
7
7
|
}
|
package/dist/vue3/{svgDrawCommon-08f97a94-BLrA7RFB.mjs → svgDrawCommon-08f97a94-Dfa51b1C.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { am as o, j as i } from "./vue3-
|
|
1
|
+
import { am as o, j as i } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
const l = (s, t) => {
|
|
3
3
|
const e = s.append("rect");
|
|
4
4
|
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ao as gt, ap as ft, aq as mt, g as xt, l as E, d as G, o as _t, ar as bt, E as kt } from "./vue3-
|
|
1
|
+
import { ao as gt, ap as ft, aq as mt, g as xt, l as E, d as G, o as _t, ar as bt, E as kt } from "./vue3-Tv8faLO-.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
|
-
import { a as D } from "./arc-
|
|
3
|
+
import { a as D } from "./arc-DzkgqoKW.mjs";
|
|
4
4
|
var K = function() {
|
|
5
5
|
var n = function(f, i, r, c) {
|
|
6
6
|
for (r = r || {}, c = f.length; c--; r[f[c]] = i)
|