@blueking/ai-blueking 1.2.4-beta.10 → 1.2.4-beta.12
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-B7ZwKlGR.mjs → arc-D70f0dEE.mjs} +1 -1
- package/dist/vue2/{blockDiagram-38ab4fdb-gpK6DXI4.mjs → blockDiagram-38ab4fdb-BaN1jH7F.mjs} +5 -5
- package/dist/{vue3/c4Diagram-3d4e48cf-rv8XOvtE.mjs → vue2/c4Diagram-3d4e48cf-DroRU3CR.mjs} +2 -2
- package/dist/{vue3/channel-CNEMJXK_.mjs → vue2/channel-CZw3yjHm.mjs} +1 -1
- package/dist/vue2/{classDiagram-70f12bd4-Bnx9vGFG.mjs → classDiagram-70f12bd4-CZEkLUy8.mjs} +5 -5
- package/dist/vue2/{classDiagram-v2-f2320105-y-c7Dq8I.mjs → classDiagram-v2-f2320105-B0Ic56cx.mjs} +5 -5
- package/dist/vue2/{clone-BPN2IX3Z.mjs → clone-Bjb2QTaM.mjs} +1 -1
- package/dist/vue2/{createText-2e5e7dd3-DTzDRtvJ.mjs → createText-2e5e7dd3-B_kyXJyC.mjs} +1 -1
- package/dist/{vue3/edges-e0da2a9e-CknvYNw2.mjs → vue2/edges-e0da2a9e-BrNI3vgq.mjs} +3 -3
- package/dist/{vue3/erDiagram-9861fffd-BW_uwb1o.mjs → vue2/erDiagram-9861fffd-6GCevu14.mjs} +4 -4
- package/dist/vue2/{flowDb-956e92f1-0xO5dJJO.mjs → flowDb-956e92f1-BwMtvkM7.mjs} +1 -1
- package/dist/{vue3/flowDiagram-66a62f08-C7QmFSrx.mjs → vue2/flowDiagram-66a62f08-AWw7Hm9V.mjs} +6 -6
- package/dist/vue2/{flowDiagram-v2-96b9c2cf-Cl4BbKYe.mjs → flowDiagram-v2-96b9c2cf-Dg3BEIT_.mjs} +5 -5
- package/dist/vue2/{flowchart-elk-definition-4a651766-hq5t-fPY.mjs → flowchart-elk-definition-4a651766-Ds80zob2.mjs} +4 -4
- package/dist/vue2/{ganttDiagram-c361ad54-Dl6LFacQ.mjs → ganttDiagram-c361ad54-D2aIRYxS.mjs} +2 -2
- package/dist/{vue3/gitGraphDiagram-72cf32ee-8snVO4Ku.mjs → vue2/gitGraphDiagram-72cf32ee-BM4wxrJd.mjs} +1 -1
- package/dist/vue2/{graph-CJ6Q29Yp.mjs → graph-BexrzQi5.mjs} +1 -1
- package/dist/{vue3/index-3862675e-BULtFHuT.mjs → vue2/index-3862675e-Dna04y2c.mjs} +6 -6
- package/dist/vue2/index.es.min.js +1 -1
- package/dist/vue2/index.iife.min.js +1 -1
- package/dist/vue2/index.umd.min.js +1 -1
- package/dist/vue2/{infoDiagram-f8f76790-BNsFvbUr.mjs → infoDiagram-f8f76790-BiLxv_BR.mjs} +1 -1
- package/dist/vue2/{journeyDiagram-49397b02-DJDl7LNc.mjs → journeyDiagram-49397b02-gs-JAB_g.mjs} +3 -3
- package/dist/vue2/{layout-uUsAwLCH.mjs → layout-DQXr-uz9.mjs} +2 -2
- package/dist/vue2/{line-COBavOka.mjs → line-C3ItzrSr.mjs} +1 -1
- package/dist/vue2/{linear-Chr4TuEF.mjs → linear-Bz1tAB87.mjs} +1 -1
- package/dist/vue2/{mindmap-definition-fc14e90a-hS-yLho_.mjs → mindmap-definition-fc14e90a-BA78Ogy8.mjs} +2 -2
- package/dist/vue2/{pieDiagram-8a3498a8-Biy8MakG.mjs → pieDiagram-8a3498a8-CHVFZ2hd.mjs} +2 -2
- package/dist/vue2/{quadrantDiagram-120e2f19-CX8Ui8m0.mjs → quadrantDiagram-120e2f19-DtO8qGtH.mjs} +2 -2
- package/dist/vue2/{requirementDiagram-deff3bca-BF0HMKh0.mjs → requirementDiagram-deff3bca-Bu2Paw2_.mjs} +4 -4
- package/dist/vue2/{sankeyDiagram-04a897e0-rW_i6Lax.mjs → sankeyDiagram-04a897e0-pUaKUyx_.mjs} +1 -1
- package/dist/vue2/{sequenceDiagram-704730f1-L6kjK98B.mjs → sequenceDiagram-704730f1-HB5zXYCo.mjs} +2 -2
- package/dist/{vue3/stateDiagram-587899a1-B3SoKQva.mjs → vue2/stateDiagram-587899a1-C8u8_pf1.mjs} +5 -5
- package/dist/vue2/{stateDiagram-v2-d93cdb3a-B7EcSTsQ.mjs → stateDiagram-v2-d93cdb3a-Dw4GJ0_a.mjs} +5 -5
- package/dist/{vue3/styles-6aaf32cf-bddX_laf.mjs → vue2/styles-6aaf32cf-XCPHVlr6.mjs} +1 -1
- package/dist/vue2/{styles-9a916d00-B3sHtoXD.mjs → styles-9a916d00-DBKZ3gWR.mjs} +1 -1
- package/dist/{vue3/styles-c10674c1-Curz0rOg.mjs → vue2/styles-c10674c1-B5AUTIe1.mjs} +4 -4
- package/dist/vue2/{svgDrawCommon-08f97a94-DR9T8hA4.mjs → svgDrawCommon-08f97a94-CFlqDMU1.mjs} +1 -1
- package/dist/vue2/{timeline-definition-85554ec2-LTvSSxTH.mjs → timeline-definition-85554ec2-BZb5hJaD.mjs} +2 -2
- package/dist/vue2/{vue2-Dc_E_1uq.mjs → vue2-D3e7cygv.mjs} +605 -603
- package/dist/vue2/{xychartDiagram-e933f94c-BiAyEJDU.mjs → xychartDiagram-e933f94c-DL6vUZ8U.mjs} +4 -4
- package/dist/vue3/{arc-gpulh4Xj.mjs → arc-Cb3CzA-k.mjs} +1 -1
- package/dist/vue3/{blockDiagram-38ab4fdb-D1cxosQT.mjs → blockDiagram-38ab4fdb-B1JRGHC_.mjs} +5 -5
- package/dist/{vue2/c4Diagram-3d4e48cf-D8EUG-q4.mjs → vue3/c4Diagram-3d4e48cf-CQvSXbHM.mjs} +2 -2
- package/dist/{vue2/channel-BRTak76_.mjs → vue3/channel-yYWpJ993.mjs} +1 -1
- package/dist/vue3/{classDiagram-70f12bd4-BgxSOF7Q.mjs → classDiagram-70f12bd4-mbPXtD3-.mjs} +5 -5
- package/dist/vue3/{classDiagram-v2-f2320105-P4g5Vtf4.mjs → classDiagram-v2-f2320105-Cmbrw33e.mjs} +5 -5
- package/dist/vue3/{clone-7HYx6t-Y.mjs → clone-BR4_ViRP.mjs} +1 -1
- package/dist/vue3/{createText-2e5e7dd3-BF2a90rT.mjs → createText-2e5e7dd3-Cj0Zj5LH.mjs} +1 -1
- package/dist/{vue2/edges-e0da2a9e-Bc9hFokA.mjs → vue3/edges-e0da2a9e-DDJHBbAH.mjs} +3 -3
- package/dist/{vue2/erDiagram-9861fffd-DoE3VTe4.mjs → vue3/erDiagram-9861fffd-BI_wDYuX.mjs} +4 -4
- package/dist/vue3/{flowDb-956e92f1-Co_3IWwN.mjs → flowDb-956e92f1-DjPEh_-Z.mjs} +1 -1
- package/dist/{vue2/flowDiagram-66a62f08-D2kM9cor.mjs → vue3/flowDiagram-66a62f08-DmAoQgx7.mjs} +6 -6
- package/dist/vue3/{flowDiagram-v2-96b9c2cf-CkvAgaJC.mjs → flowDiagram-v2-96b9c2cf-ChaMmtXD.mjs} +5 -5
- package/dist/vue3/{flowchart-elk-definition-4a651766-B08akU-k.mjs → flowchart-elk-definition-4a651766-CHpNw3FL.mjs} +4 -4
- package/dist/vue3/{ganttDiagram-c361ad54-RpW_WnrB.mjs → ganttDiagram-c361ad54-B1T68tA0.mjs} +2 -2
- package/dist/{vue2/gitGraphDiagram-72cf32ee-WVah6apw.mjs → vue3/gitGraphDiagram-72cf32ee-CJNR2N97.mjs} +1 -1
- package/dist/vue3/{graph-Cvp6YLBh.mjs → graph-tLvpEqkw.mjs} +1 -1
- package/dist/{vue2/index-3862675e-BwRo_Y6E.mjs → vue3/index-3862675e-Czo-hCuA.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-CkNgug34.mjs → infoDiagram-f8f76790-CKw2u2e8.mjs} +1 -1
- package/dist/vue3/{journeyDiagram-49397b02-CTbU9MjE.mjs → journeyDiagram-49397b02-DzA0-zsL.mjs} +3 -3
- package/dist/vue3/{layout-UFCw2LTx.mjs → layout-CFM8zqfW.mjs} +2 -2
- package/dist/vue3/{line-iwKVcb0W.mjs → line-Dm41nimj.mjs} +1 -1
- package/dist/vue3/{linear-BrDNrbO_.mjs → linear-D6XfDSnI.mjs} +1 -1
- package/dist/vue3/{mindmap-definition-fc14e90a-DkmyuRY7.mjs → mindmap-definition-fc14e90a-CL-sSWRb.mjs} +2 -2
- package/dist/vue3/{pieDiagram-8a3498a8-dOs-MS-X.mjs → pieDiagram-8a3498a8-vW1rR20F.mjs} +2 -2
- package/dist/vue3/{quadrantDiagram-120e2f19-BP9srm3n.mjs → quadrantDiagram-120e2f19-CCH28gdd.mjs} +2 -2
- package/dist/vue3/{requirementDiagram-deff3bca-DupXp7ne.mjs → requirementDiagram-deff3bca-DevFp_zW.mjs} +4 -4
- package/dist/vue3/{sankeyDiagram-04a897e0-CQTesKUV.mjs → sankeyDiagram-04a897e0-DvZOn-J0.mjs} +1 -1
- package/dist/vue3/{sequenceDiagram-704730f1-BLmUA741.mjs → sequenceDiagram-704730f1-wcVNmvO4.mjs} +2 -2
- package/dist/{vue2/stateDiagram-587899a1-CEyMKrqf.mjs → vue3/stateDiagram-587899a1-2dRU0Kxx.mjs} +5 -5
- package/dist/vue3/{stateDiagram-v2-d93cdb3a-D8HfN3Su.mjs → stateDiagram-v2-d93cdb3a-CXk4oaQa.mjs} +5 -5
- package/dist/{vue2/styles-6aaf32cf-9jw4wwYw.mjs → vue3/styles-6aaf32cf-rG1W7nZf.mjs} +1 -1
- package/dist/vue3/{styles-9a916d00-BHEbvdP_.mjs → styles-9a916d00-CV2rBRCf.mjs} +1 -1
- package/dist/{vue2/styles-c10674c1-BNGjLjdN.mjs → vue3/styles-c10674c1-J_dfetJa.mjs} +4 -4
- package/dist/vue3/{svgDrawCommon-08f97a94-BNVLxhRX.mjs → svgDrawCommon-08f97a94-CvnYtafO.mjs} +1 -1
- package/dist/vue3/{timeline-definition-85554ec2-C5H4vNBN.mjs → timeline-definition-85554ec2-41vEtdaw.mjs} +2 -2
- package/dist/vue3/{vue3-Cp4N18Gn.mjs → vue3-CifEXzEO.mjs} +632 -630
- package/dist/vue3/{xychartDiagram-e933f94c-C-Ingqf0.mjs → xychartDiagram-e933f94c-CYlJ5KMs.mjs} +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as ln, c as O } from "./path-DLwuMfdd.mjs";
|
|
2
|
-
import { au as an, av as G, aw as D, ax as rn, ay as y, Q as on, az as K, aA as _, aB as un, aC as t, aD as sn, aE as tn, aF as fn } from "./vue2-
|
|
2
|
+
import { au as an, av as G, aw as D, ax as rn, ay as y, Q as on, az as K, aA as _, aB as un, aC as t, aD as sn, aE as tn, aF as fn } from "./vue2-D3e7cygv.mjs";
|
|
3
3
|
function cn(l) {
|
|
4
4
|
return l.innerRadius;
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { X as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./vue2-
|
|
2
|
-
import { c as Ne } from "./clone-
|
|
3
|
-
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-
|
|
4
|
-
import { G as Ce } from "./graph-
|
|
1
|
+
import { X as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { c as Ne } from "./clone-Bjb2QTaM.mjs";
|
|
3
|
+
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-BrNI3vgq.mjs";
|
|
4
|
+
import { G as Ce } from "./graph-BexrzQi5.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { c as Ae } from "./channel-
|
|
6
|
+
import { c as Ae } from "./channel-CZw3yjHm.mjs";
|
|
7
7
|
import { o as Re } from "./ordinal-C0oynhte.mjs";
|
|
8
8
|
import { s as Be } from "./Tableau10-D7jGxypv.mjs";
|
|
9
9
|
var le, oe, ee = function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./
|
|
2
|
-
import { d as Le, g as Ne } from "./svgDrawCommon-08f97a94-
|
|
1
|
+
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { d as Le, g as Ne } from "./svgDrawCommon-08f97a94-CFlqDMU1.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
var Yt = function() {
|
|
5
5
|
var e = function(bt, _, x, m) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as G, d as S, p as A } from "./styles-9a916d00-
|
|
2
|
-
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./vue2-
|
|
3
|
-
import { G as O } from "./graph-
|
|
4
|
-
import { l as P } from "./layout-
|
|
1
|
+
import { s as G, d as S, p as A } from "./styles-9a916d00-DBKZ3gWR.mjs";
|
|
2
|
+
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./vue2-D3e7cygv.mjs";
|
|
3
|
+
import { G as O } from "./graph-BexrzQi5.mjs";
|
|
4
|
+
import { l as P } from "./layout-DQXr-uz9.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { l as X } from "./line-
|
|
6
|
+
import { l as X } from "./line-C3ItzrSr.mjs";
|
|
7
7
|
let H = 0;
|
|
8
8
|
const Y = function(i, a, t, o, p) {
|
|
9
9
|
const g = function(e) {
|
package/dist/vue2/{classDiagram-v2-f2320105-y-c7Dq8I.mjs → classDiagram-v2-f2320105-B0Ic56cx.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as M, d as _, p as B } from "./styles-9a916d00-
|
|
2
|
-
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./vue2-
|
|
3
|
-
import { G as q } from "./graph-
|
|
4
|
-
import { r as z } from "./index-3862675e-
|
|
1
|
+
import { s as M, d as _, p as B } from "./styles-9a916d00-DBKZ3gWR.mjs";
|
|
2
|
+
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./vue2-D3e7cygv.mjs";
|
|
3
|
+
import { G as q } from "./graph-BexrzQi5.mjs";
|
|
4
|
+
import { r as z } from "./index-3862675e-Dna04y2c.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import "./layout-
|
|
6
|
+
import "./layout-DQXr-uz9.mjs";
|
|
7
7
|
const S = (s) => D.sanitizeText(s, c());
|
|
8
8
|
let k = {
|
|
9
9
|
dividerMargin: 10,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as At, b5 as zt, b6 as It } from "./vue2-
|
|
1
|
+
import { l as At, b5 as zt, b6 as It } from "./vue2-D3e7cygv.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, b5 as Q } from "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { a as st } from "./createText-2e5e7dd3-B_kyXJyC.mjs";
|
|
3
|
+
import { l as ct } from "./line-C3ItzrSr.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 "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { G as Mt } from "./graph-BexrzQi5.mjs";
|
|
3
|
+
import { l as St } from "./layout-DQXr-uz9.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as wt } from "./line-
|
|
5
|
+
import { l as wt } from "./line-C3ItzrSr.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, ap as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue2-
|
|
1
|
+
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, ap as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue2-D3e7cygv.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/{vue3/flowDiagram-66a62f08-C7QmFSrx.mjs → vue2/flowDiagram-66a62f08-AWw7Hm9V.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-BwMtvkM7.mjs";
|
|
2
|
+
import { h as S, f as tt, G as _t } from "./graph-BexrzQi5.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 "./vue2-D3e7cygv.mjs";
|
|
4
|
+
import { u as Tt, r as Nt, p as At, l as Ct, d as M } from "./layout-DQXr-uz9.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-B5AUTIe1.mjs";
|
|
6
|
+
import { l as Dt } from "./line-C3ItzrSr.mjs";
|
|
7
7
|
import "dayjs";
|
|
8
8
|
function Rt(r) {
|
|
9
9
|
if (!r.ok) throw new Error(r.status + " " + r.statusText);
|
package/dist/vue2/{flowDiagram-v2-96b9c2cf-Cl4BbKYe.mjs → flowDiagram-v2-96b9c2cf-Dg3BEIT_.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 "./vue2-
|
|
4
|
-
import "./graph-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { f as o, p as a } from "./flowDb-956e92f1-BwMtvkM7.mjs";
|
|
2
|
+
import { f as t, g as e } from "./styles-c10674c1-B5AUTIe1.mjs";
|
|
3
|
+
import { u as s } from "./vue2-D3e7cygv.mjs";
|
|
4
|
+
import "./graph-BexrzQi5.mjs";
|
|
5
|
+
import "./layout-DQXr-uz9.mjs";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
const b = {
|
|
8
8
|
parser: a,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as xNe, d as FNe } from "./flowDb-956e92f1-
|
|
2
|
-
import { an as BNe, ao as Nse, d as IO, l as Ba, X as xU, o as RNe, p as E0n, q as j0n, n as $U, k as KNe } from "./vue2-
|
|
3
|
-
import { i as _Ne, a as HNe, l as qNe, b as UNe, k as GNe, m as zNe } from "./edges-e0da2a9e-
|
|
1
|
+
import { p as xNe, d as FNe } from "./flowDb-956e92f1-BwMtvkM7.mjs";
|
|
2
|
+
import { an as BNe, ao as Nse, d as IO, l as Ba, X as xU, o as RNe, p as E0n, q as j0n, n as $U, k as KNe } from "./vue2-D3e7cygv.mjs";
|
|
3
|
+
import { i as _Ne, a as HNe, l as qNe, b as UNe, k as GNe, m as zNe } from "./edges-e0da2a9e-BrNI3vgq.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as XNe } from "./line-
|
|
5
|
+
import { l as XNe } from "./line-C3ItzrSr.mjs";
|
|
6
6
|
function NU(ct) {
|
|
7
7
|
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.');
|
|
8
8
|
}
|
|
@@ -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 "./vue2-
|
|
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 "./vue2-D3e7cygv.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-Bz1tAB87.mjs";
|
|
7
7
|
import { i as Vn } from "./init-DjUOC4st.mjs";
|
|
8
8
|
function Pn(t, e) {
|
|
9
9
|
let n;
|
|
@@ -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 "./
|
|
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 "./vue2-D3e7cygv.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 { aI as C, aJ as Ze, ad as y, aK as m, aL as qe, aM as Xe, ac as Te, aN as Je, aO as Ee, aP as G, aa as X, aQ as Qe, aR as me, aS as We, aT as I, aj as Oe, aU as D, a5 as we, aV as ze, aW as Z, aX as Ve, aY as ke, aZ as $, ai as en, a_ as nn, ab as rn, a$ as re, b0 as tn, b1 as sn, ah as an, ag as ve, ae as un, b2 as j, a8 as fn, b3 as on, ak as M, z as te, b4 as ie } from "./vue2-
|
|
1
|
+
import { aI as C, aJ as Ze, ad as y, aK as m, aL as qe, aM as Xe, ac as Te, aN as Je, aO as Ee, aP as G, aa as X, aQ as Qe, aR as me, aS as We, aT as I, aj as Oe, aU as D, a5 as we, aV as ze, aW as Z, aX as Ve, aY as ke, aZ as $, ai as en, a_ as nn, ab as rn, a$ as re, b0 as tn, b1 as sn, ah as an, ag as ve, ae as un, b2 as j, a8 as fn, b3 as on, ak as M, z as te, b4 as ie } from "./vue2-D3e7cygv.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-BexrzQi5.mjs";
|
|
2
|
+
import { m as $, l as H } from "./layout-DQXr-uz9.mjs";
|
|
3
|
+
import { c as V } from "./clone-Bjb2QTaM.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-BrNI3vgq.mjs";
|
|
5
|
+
import { l as s, g as T, r as S, d as L } from "./vue2-D3e7cygv.mjs";
|
|
6
|
+
import { a as I } from "./createText-2e5e7dd3-B_kyXJyC.mjs";
|
|
7
7
|
function m(e) {
|
|
8
8
|
var t = {
|
|
9
9
|
options: {
|
|
@@ -756,7 +756,7 @@ Use Shift + Enter to enter a new line`,"你好,我是小鲸":"Hello, I am BK G
|
|
|
756
756
|
只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
|
|
757
757
|
'''
|
|
758
758
|
{{ SELECTED_TEXT }}
|
|
759
|
-
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},Ko=t=>c1r!=="en"?u1r[t]||t:l1r[t]||t;function f1r(){const t=wr([]),n=wr(null),i=wr(!1),o=wr({});let s={};const u=wr({}),f=wr({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),h=D=>{if(!s[D])throw new Error(`${D} not registered`);return s[D]},g=async D=>{try{await h("setCurrentSessionChain")(D),I(D)}catch(z){throw console.error("Failed to switch session:",z),z}},b=D=>{if(t.value=D.map(z=>({...z,isEdit:!1})),n.value){const z=D.find(F=>{var H;return F.sessionCode===((H=n.value)==null?void 0:H.sessionCode)});z&&(n.value={...n.value,...z,isEdit:n.value.isEdit})}},_=D=>{const z={...D,isEdit:!1};return t.value.unshift(z),z},E=async D=>{const z=D||o1r(),F=Ko("新会话"),H={sessionCode:z,sessionName:F,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},V=_(H);return await h("plusSessionApi")(V),await g(V),V},T=D=>{const z=t.value.find(F=>F.sessionCode===D);z&&(u.value[D]={...z},x(D,{isEdit:!0},{syncBackend:!1}))},S=async(D,z)=>{const F=u.value[D];if(!F)return null;const H=Object.entries(z).some(([G,q])=>G==="isEdit"?!1:F[G]!==q),V=await x(D,{...z,isEdit:!1},{syncBackend:H});return delete u.value[D],V},x=async(D,z,F={})=>{const{syncBackend:H=!0,forceSync:V=!1}=F,G=t.value.findIndex(W=>W.sessionCode===D);if(G===-1)return null;const q=t.value[G],j={...q,...z};if(t.value[G]=j,t.value=[...t.value],o.value[D]||(o.value[D]=0),o.value[D]++,n.value&&n.value.sessionCode===D&&(n.value={...n.value,...z}),H&&!z.isEdit||V)try{const W=h("modifySessionApi"),U={...j,isEdit:!1};await W(U)}catch(W){console.error("Failed to sync session to backend:",W),t.value[G]=q,t.value=[...t.value],n.value&&n.value.sessionCode===D&&(n.value=q)}return j},A=async D=>{var V;await h("deleteSessionApi")(D);const F=t.value.findIndex(G=>G.sessionCode===D);if(F===-1)return null;const H=((V=n.value)==null?void 0:V.sessionCode)===D;if(t.value.splice(F,1),H){if(t.value.length>0){const G=new Date().toDateString(),q=t.value.filter(W=>new Date(W.createdAt||"").toDateString()===G),j=q.length>0?q[0]:t.value[0];return await g(j),j}return await L(!1),null}return null},I=D=>{const z=t.value.find(F=>F.sessionCode===D.sessionCode);if(z)n.value=z;else{const F=_(D);n.value=F}},N=D=>{s=D},L=async(D=!0)=>{var V,G,q,j;let z=t.value;if(D){const U=await h("getSessionsApi")();b(U)}let F=null,H=[];if(z.length>0){const W=z.sort((Z,Q)=>new Date(Q.createdAt||"").getTime()-new Date(Z.createdAt||"").getTime())[0];H=await h("getSessionContentsApi")(W.sessionCode),H.filter(Z=>!Wae.includes(Z.role)).some(Z=>Z.content&&Z.content.trim()!=="")||(F={...W,isEdit:!1})}if(F?(h("setSessionContents")(H),g(F)):F=await E(),!f.value||D){const W=h("getAgentInfoApi"),{conversationSettings:U,promptSetting:J,agentName:Z}=await W();Object.assign(f.value,{conversationSettings:U,promptSetting:J,agentName:Z})}return(q=(G=(V=f.value)==null?void 0:V.promptSetting)==null?void 0:G.content)!=null&&q.length&&await h("handleCompleteRole")(F.sessionCode,f.value.promptSetting.content),{conversationSettings:(j=f.value)==null?void 0:j.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:b,addSession:_,addNewSession:E,initSession:L,updateSession:x,startEditSession:T,finishEditSession:S,deleteSession:A,setCurrentSession:I,registerSdkMethods:N,switchSessionWithContents:g,sessionContentLoading:i,agentInfo:f,getSessionList:async()=>{const z=await h("getSessionsApi")();if(b(z),n.value){const F=z.find(H=>{var V;return H.sessionCode===((V=n.value)==null?void 0:V.sessionCode)});F&&(n.value={...n.value,...F,isEdit:n.value.isEdit})}return z.forEach(F=>{o.value[F.sessionCode]||(o.value[F.sessionCode]=0),o.value[F.sessionCode]++}),t.value},sessionUpdateCounter:o}}const $mt=Symbol("session-store");function d1r(){const t=f1r();return AC($mt,t),t}function h1r(){const t=Wv($mt);if(!t)throw new Error("Session store not provided");return t}function Q9(t={}){const n="ai-blueking-tooltip",i=wr([]),o=(b,_,E={})=>{try{const T=typeof b=="string"?document.querySelector(b):b;if(!T)return console.warn(`Tooltip target not found: ${b}`),null;const S={content:_,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...E},x=zN(T,S);return i.value.push(x),x}catch(T){return console.error("Failed to create tooltip:",T),null}},s=(b,_,E={})=>{const T=document.querySelectorAll(b),S=[];return T.forEach(x=>{const A=o(x,_,E);A&&S.push(A)}),S},u=b=>{const _=[];return b.forEach(({element:E,content:T,options:S})=>{const x=o(E,T,S);x&&_.push(x)}),_},f=()=>{i.value.forEach(b=>{b.destroy()}),i.value=[]},h=(b,_)=>{b.setContent(_)},g=b=>{b.destroy()};return Xf(()=>{f()}),{instances:i,createTooltip:o,createTooltipsForSelector:s,createMultipleTooltips:u,destroyAll:f,updateContent:h,destroyInstance:g}}const p1r={class:"bkai-history-panel"},g1r={class:"history-panel-header"},m1r={class:"history-panel-header-title"},b1r={class:"input-icon"},v1r={class:"history-panel-content"},y1r={class:"history-panel-content-item-title"},_1r={class:"history-panel-content-item-list"},w1r=["onClick"],E1r={class:"history-panel-content-item-list-item-action"},S1r=["onClick"],T1r=Cs({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,s=Eft,u=wr(""),f=i.sessionStore,h=wr({}),g=Qa(()=>{const A={today:{key:"today",alias:Ko("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Ko("昨天"),sessionList:[]},before:{key:"before",alias:Ko("之前"),sessionList:[]}},I=f.sessionList.value.filter(N=>N.sessionName.toLowerCase().includes(u.value.toLowerCase()));for(const N of I){const L=new Date(N.createdAt||""),P=new Date,D=new Date;D.setDate(D.getDate()-1),L.toDateString()===P.toDateString()?A.today.sessionList.push(N):L.toDateString()===D.toDateString()?A.yesterday.sessionList.push(N):A.before.sessionList.push(N)}return Object.values(A).filter(N=>N.sessionList.length>0)}),b=A=>{var I;return((I=f.currentSession.value)==null?void 0:I.sessionCode)===A.sessionCode},_=A=>{b(A)||(f.switchSessionWithContents(A),o("close"))},E=A=>{f.deleteSession(A)},T=A=>{f.finishEditSession(A.sessionCode,{sessionName:A.sessionName})},S=A=>{f.startEditSession(A.sessionCode),Hu(()=>{const I=h.value[A.sessionCode];I&&I.focus()})},x=(A,I)=>{I.target.blur()};return(A,I)=>(di(),_a("div",p1r,[_i("div",g1r,[_i("h1",m1r,Al(Wn(Ko)("历史会话")),1),ui(Wn(qG),{modelValue:u.value,"onUpdate:modelValue":I[0]||(I[0]=N=>u.value=N),behavior:"simplicity",placeholder:Wn(Ko)("搜索会话名称"),style:{height:"22px"}},{suffix:Vu(()=>[_i("span",b1r,[ui(Wn(TEe))])]),_:1},8,["modelValue","placeholder"])]),_i("div",v1r,[g.value.length>0?(di(!0),_a(Wc,{key:0},Xw(g.value,N=>(di(),_a("div",{key:N.key,class:"history-panel-content-item"},[_i("div",y1r,[_i("span",null,Al(N.alias),1)]),_i("div",_1r,[(di(!0),_a(Wc,null,Xw(N.sessionList,L=>(di(),_a("div",{key:`${L.sessionCode}-${Wn(f).sessionUpdateCounter.value[L.sessionCode]||0}`,class:Gl(["history-panel-content-item-list-item",{active:b(L)}]),onClick:P=>_(L)},[L.isEdit?(di(),lf(Wn(qG),{key:1,ref_for:!0,ref:P=>{L.isEdit&&(h.value[L.sessionCode]=P)},modelValue:L.sessionName,"onUpdate:modelValue":P=>L.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>T(L),onEnter:x,onClick:I[2]||(I[2]=K6(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(di(),_a(Wc,{key:0},[ui(Wn(f$n),{style:{width:"calc(100% - 42px)"}},{default:Vu(()=>[Qv(Al(L.sessionName),1)]),_:2},1024),_i("span",E1r,[Sb(_i("i",{class:"bkai-icon bkai-bianji",onClick:K6(P=>S(L),["stop"])},null,8,S1r),[[Wn(s),{content:Wn(Ko)("编辑"),boundary:"parent"}]]),ui(Wn(QQn),{title:Wn(Ko)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>E(L.sessionCode)},{default:Vu(()=>[Sb(_i("i",{class:"bkai-icon bkai-shanchu",onClick:I[1]||(I[1]=K6(()=>{},["stop"]))},null,512),[[Wn(s),{content:Wn(Ko)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,w1r))),128))])]))),128)):(di(),lf(Wn(WWn),{key:1,style:{"margin-top":"100px"},description:u.value?Wn(Ko)("搜索为空"):Wn(Ko)("暂无对话"),scene:"part",type:u.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),v0=(t,n)=>{const i=t.__vccOpts||t;for(const[o,s]of n)i[o]=s;return i},C1r=v0(T1r,[["__scopeId","data-v-538e5107"]]),x1r={class:"left-section"},k1r={class:"logo"},A1r=["src"],O1r={class:"title"},I1r={class:"right-section"},N1r=v0(Cs({__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,s=Eft,u=h1r(),f=wr(null),{handleTriggerClick:h}=i1r({triggerRef:f,panelComponent:C1r,panelProps:{sessionStore:u},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),g=Qa(()=>{var L,P,D;return i.enableChatSession?i.title||`${((P=u.agentInfo.value)==null?void 0:P.agentName)||""}-${(D=u.currentSession.value)==null?void 0:D.sessionName}`:(L=u.agentInfo.value)==null?void 0:L.agentName}),b=Qa(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),_=Qa(()=>i.isCompressionHeight?Ko("恢复默认尺寸"):Ko("缩小高度")),E=wr(null),T=wr(null),S=wr(null),{createTooltip:x,destroyAll:A}=Q9({arrow:!0,delay:[0,0]}),I=()=>{A(),T.value&&x(T.value,_.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),S.value&&x(S.value,Ko("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};nl(()=>i.isCompressionHeight,()=>{I()}),ru(()=>{I()}),Xf(()=>{A()});const N=async()=>{try{o("newChat"),await u.initSession(!1)}catch(L){console.error("Failed to create new chat:",L)}};return(L,P)=>(di(),_a("div",{ref_key:"headerRef",ref:E,class:Gl(["header drag-handle",{draggable:i.draggable}])},[_i("div",x1r,[_i("div",k1r,[_i("img",{src:Wn(j3e),alt:"logo"},null,8,A1r)]),_i("div",O1r,Al(g.value),1)]),_i("div",I1r,[i.showNewChatIcon&&i.enableChatSession!==!1?Sb((di(),_a("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:N},null,512)),[[Wn(s),{content:Wn(Ko)("新增会话"),boundary:"parent"}]]):iu("",!0),i.showHistoryIcon&&i.enableChatSession!==!1?Sb((di(),_a("i",{key:1,ref_key:"historyIconRef",ref:f,class:"bkai-icon bkai-history",onClick:P[0]||(P[0]=(...D)=>Wn(h)&&Wn(h)(...D))},null,512)),[[Wn(s),{content:Wn(Ko)("历史会话"),boundary:"parent"}]]):iu("",!0),_i("i",{ref_key:"compressionRef",ref:T,class:Gl(["bkai-icon",b.value]),onClick:P[1]||(P[1]=D=>o("toggleCompression"))},null,2),_i("i",{ref_key:"closeRef",ref:S,class:"bkai-icon bkai-close-line-2",onClick:P[2]||(P[2]=D=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),M1r={class:"bar-button-text"},Umt=v0(Cs({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:n}){Oz(s=>({"5ec4534a":s.color}));const i=n,o=t;return(s,u)=>(di(),_a("div",{class:"bar-button",onClick:u[0]||(u[0]=f=>i("click"))},[_i("i",{class:Gl(["bkai-icon",o.icon])},null,2),_i("span",M1r,Al(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),L1r={class:"ai-cite"},R1r={class:"content"},zmt=v0(Cs({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const n=t,i=wr(null);nl(()=>n.text,()=>{i.value&&f(i.value),Hu(()=>{h()})});const o=wr(null),s=g=>g.scrollWidth>g.clientWidth,{createTooltip:u,destroyInstance:f}=Q9({arrow:!0,delay:[0,0]}),h=()=>{if(o.value){const g=o.value;s(g)&&(i.value=u(g,n.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return ru(()=>{Hu(()=>{h()})}),(g,b)=>Sb((di(),_a("section",L1r,[_i("span",R1r,[_i("span",{class:Gl(["content-text",{"show-close-icon":g.showCloseIcon}])},[b[1]||(b[1]=_i("i",{class:"bkai-icon bkai-yinyong"},null,-1)),_i("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},Al(g.text),513)],2),g.showCloseIcon?(di(),_a("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:b[0]||(b[0]=_=>g.$emit("close"))})):iu("",!0)])],512)),[[kz,g.text]])}}),[["__scopeId","data-v-af2b067c"]]);function Gmt(t={}){const n=wr(!1);return{isComposing:n,handleCompositionStart:()=>{n.value=!0},handleCompositionEnd:()=>{n.value=!1},handleEnter:h=>{const{isLoading:g,onSend:b,getInputValue:_=()=>"",clearInput:E=()=>{}}=t;if(h.shiftKey)return;h.preventDefault();const T=_();g!=null&&g.value||!T.trim()||n.value||(b==null||b(T),E())},handleSend:()=>{const{onSend:h,getInputValue:g=()=>"",clearInput:b=()=>{}}=t,_=g();_.trim()&&(h==null||h(_),b())},handleStop:()=>{const{onStop:h}=t;h==null||h()}}}const Hmt="enablePopup";function q3e(){return{enablePopup:Wv(Hmt,!0)}}const cV=wr(""),Vmt=wr(""),W3e=wr(!1),K3e={width:80,height:34,offset:15,debounceTime:300};function lV(t){const n=wr(!1),i=wr({top:"0px",left:"0px"});let o,s=null;const u=wr(null);let f=!1,h=null;const g=P=>{h={x:P.clientX,y:P.clientY}},b=P=>{s=P,h&&(f=Math.sqrt(Math.pow(P.clientX-h.x,2)+Math.pow(P.clientY-h.y,2))>5),h=null},_=(P,D)=>{const z=window.innerWidth,{width:F,height:H,offset:V}=K3e;let G=P+window.scrollX-F/2;G=Math.max(V,Math.min(G,z-F-V));let q=D+window.scrollY-H-V;return D<=H+V&&(q=D+window.scrollY+V),{top:`${q}px`,left:`${G}px`}},E=P=>{const D=window.innerWidth,{width:z,height:F,offset:H}=K3e;let V=P.left+window.scrollX+P.width/2-z/2;V=Math.max(H,Math.min(V,D-z-H));let G=P.top+window.scrollY-F-H;return P.top<=F+H&&(G=P.bottom+window.scrollY+H),{top:`${G}px`,left:`${V}px`}},T=(P,D)=>{let z=P;for(;z&&z!==document.documentElement;){if(z.hasAttribute&&z.hasAttribute(D))return!0;z=z.parentElement}return!1},S=()=>{clearTimeout(o),o=setTimeout(()=>{var V;const P=window.getSelection();if(!(P!=null&&P.toString().trim())){x();return}const D=P.getRangeAt(0);if((V=D.commonAncestorContainer.parentElement)!=null&&V.closest(".ai-blueking-wrapper")){x();return}const z=D.commonAncestorContainer,F=z.nodeType===Node.ELEMENT_NODE?z:z.parentElement;if(T(F,"ai-blueking-hide")){x();return}W3e.value=!1,cV.value=P.toString().trim();const H=document.activeElement;if((H==null?void 0:H.tagName)==="TEXTAREA"){if(!s){x();return}const{clientX:G,clientY:q}=s;i.value=_(G,q),n.value=!0,s=null}else{const G=D.getBoundingClientRect();if(!G.width||!G.height){x();return}i.value=E(G),n.value=!0}},K3e.debounceTime)},x=()=>{n.value=!1,W3e.value||(cV.value="")},A=P=>{var H,V,G;const D=P.target,z=((H=D.classList)==null?void 0:H.contains("ai-blueking-tag-text"))||((V=D.classList)==null?void 0:V.contains("shortcut-btn")),F=(G=u.value)==null?void 0:G.contains(D);if(!(z||!f)){if(f){P.preventDefault(),P.stopPropagation(),f=!1;return}F||(x(),I())}},I=()=>{const P=window.getSelection();P&&P.removeAllRanges(),cV.value=""},N=P=>{cV.value=P},L=P=>{Vmt.value=P};return ru(()=>{t&&(document.addEventListener("selectionchange",S),document.addEventListener("mousedown",g),document.addEventListener("mouseup",b),document.addEventListener("click",A,!0))}),Xf(()=>{t&&(document.removeEventListener("selectionchange",S),document.removeEventListener("mousedown",g),document.removeEventListener("mouseup",b),document.removeEventListener("click",A,!0)),clearTimeout(o)}),{isIconVisible:n,iconPosition:i,selectedText:cV,citeText:Vmt,hideIcon:x,clearSelection:I,setSelection:N,setCiteText:L,lockSelectedText:W3e,popupRef:u}}function D1r(t={}){const{minHeight:n=68,maxHeight:i=248,defaultHeight:o=68}=t,s=wr(o),u=wr(),f=()=>{if(!u.value)return;u.value.style.height=`${n}px`;const b=u.value.scrollHeight;s.value=Math.min(Math.max(b,n),i)};return{textareaHeight:s,textareaRef:u,updateHeight:f,resetHeight:()=>{s.value=o},bindTextarea:b=>{u.value=b,f()}}}function Ymt(t,n,i=wr(null),o={}){const s=wr([]),u=wr([]),{theme:f="ai-blueking-light light",placement:h="bottom",trigger:g="mouseenter",interactive:b=!0,allowHTML:_=!0,arrow:E=!0,offset:T=[0,4],onItemClick:S}=o,{createTooltip:x,destroyAll:A}=Q9({theme:f,placement:h,trigger:g,interactive:b,allowHTML:_,arrow:E,offset:T}),I=Qa(()=>u.value.length===0?"":`<div class="tippy-dropdown-menu">${u.value.map(z=>`<div class="tippy-menu-item" data-item-id="${z.id}">
|
|
759
|
+
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},Ko=t=>c1r!=="en"?u1r[t]||t:l1r[t]||t;function f1r(){const t=wr([]),n=wr(null),i=wr(!1),o=wr({});let s={};const u=wr({}),f=wr({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),h=D=>{if(!s[D])throw new Error(`${D} not registered`);return s[D]},g=async D=>{try{await h("setCurrentSessionChain")(D),I(D)}catch(z){throw console.error("Failed to switch session:",z),z}},b=D=>{if(t.value=D.map(z=>({...z,isEdit:!1})),n.value){const z=D.find(F=>{var H;return F.sessionCode===((H=n.value)==null?void 0:H.sessionCode)});z&&(n.value={...n.value,...z,isEdit:n.value.isEdit})}},_=D=>{const z={...D,isEdit:!1};return t.value.unshift(z),z},E=async D=>{const z=D||o1r(),F=Ko("新会话"),H={sessionCode:z,sessionName:F,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},V=_(H);return await h("plusSessionApi")(V),await g(V),V},T=D=>{const z=t.value.find(F=>F.sessionCode===D);z&&(u.value[D]={...z},x(D,{isEdit:!0},{syncBackend:!1}))},S=async(D,z)=>{const F=u.value[D];if(!F)return null;const H=Object.entries(z).some(([G,q])=>G==="isEdit"?!1:F[G]!==q),V=await x(D,{...z,isEdit:!1},{syncBackend:H});return delete u.value[D],V},x=async(D,z,F={})=>{const{syncBackend:H=!0,forceSync:V=!1}=F,G=t.value.findIndex(W=>W.sessionCode===D);if(G===-1)return null;const q=t.value[G],j={...q,...z};if(t.value[G]=j,t.value=[...t.value],o.value[D]||(o.value[D]=0),o.value[D]++,n.value&&n.value.sessionCode===D&&(n.value={...n.value,...z}),H&&!z.isEdit||V)try{const W=h("modifySessionApi"),U={...j,isEdit:!1};await W(U)}catch(W){console.error("Failed to sync session to backend:",W),t.value[G]=q,t.value=[...t.value],n.value&&n.value.sessionCode===D&&(n.value=q)}return j},A=async D=>{var V;await h("deleteSessionApi")(D);const F=t.value.findIndex(G=>G.sessionCode===D);if(F===-1)return null;const H=((V=n.value)==null?void 0:V.sessionCode)===D;if(t.value.splice(F,1),H){if(t.value.length>0){const G=new Date().toDateString(),q=t.value.filter(W=>new Date(W.createdAt||"").toDateString()===G),j=q.length>0?q[0]:t.value[0];return await g(j),j}return await L(!1),null}return null},I=D=>{const z=t.value.find(F=>F.sessionCode===D.sessionCode);if(z)n.value=z;else{const F=_(D);n.value=F}},N=D=>{s=D},L=async(D=!0)=>{var V,G,q,j;let z=t.value;if(D){const U=await h("getSessionsApi")();b(U)}let F=null,H=[];if(z.length>0){const W=z.sort((Z,Q)=>new Date(Q.createdAt||"").getTime()-new Date(Z.createdAt||"").getTime())[0];H=await h("getSessionContentsApi")(W.sessionCode),H.filter(Z=>!Wae.includes(Z.role)).some(Z=>Z.content&&Z.content.trim()!=="")||(F={...W,isEdit:!1})}if(F?(h("setSessionContents")(H),g(F)):F=await E(),!f.value||D){const W=h("getAgentInfoApi"),{conversationSettings:U,promptSetting:J,agentName:Z}=await W();Object.assign(f.value,{conversationSettings:U,promptSetting:J,agentName:Z})}return(q=(G=(V=f.value)==null?void 0:V.promptSetting)==null?void 0:G.content)!=null&&q.length&&await h("handleCompleteRole")(F.sessionCode,f.value.promptSetting.content),{conversationSettings:(j=f.value)==null?void 0:j.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:b,addSession:_,addNewSession:E,initSession:L,updateSession:x,startEditSession:T,finishEditSession:S,deleteSession:A,setCurrentSession:I,registerSdkMethods:N,switchSessionWithContents:g,sessionContentLoading:i,agentInfo:f,getSessionList:async()=>{const z=await h("getSessionsApi")();if(b(z),n.value){const F=z.find(H=>{var V;return H.sessionCode===((V=n.value)==null?void 0:V.sessionCode)});F&&(n.value={...n.value,...F,isEdit:n.value.isEdit})}return z.forEach(F=>{o.value[F.sessionCode]||(o.value[F.sessionCode]=0),o.value[F.sessionCode]++}),t.value},sessionUpdateCounter:o}}const $mt=Symbol("session-store");function d1r(){const t=f1r();return AC($mt,t),t}function h1r(){const t=Wv($mt);if(!t)throw new Error("Session store not provided");return t}function Q9(t={}){const n="ai-blueking-tooltip",i=wr([]),o=(b,_,E={})=>{try{const T=typeof b=="string"?document.querySelector(b):b;if(!T)return console.warn(`Tooltip target not found: ${b}`),null;const S={content:_,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...E},x=zN(T,S);return i.value.push(x),x}catch(T){return console.error("Failed to create tooltip:",T),null}},s=(b,_,E={})=>{const T=document.querySelectorAll(b),S=[];return T.forEach(x=>{const A=o(x,_,E);A&&S.push(A)}),S},u=b=>{const _=[];return b.forEach(({element:E,content:T,options:S})=>{const x=o(E,T,S);x&&_.push(x)}),_},f=()=>{i.value.forEach(b=>{b.destroy()}),i.value=[]},h=(b,_)=>{b.setContent(_)},g=b=>{b.destroy()};return Xf(()=>{f()}),{instances:i,createTooltip:o,createTooltipsForSelector:s,createMultipleTooltips:u,destroyAll:f,updateContent:h,destroyInstance:g}}const p1r={class:"bkai-history-panel"},g1r={class:"history-panel-header"},m1r={class:"history-panel-header-title"},b1r={class:"input-icon"},v1r={class:"history-panel-content"},y1r={class:"history-panel-content-item-title"},_1r={class:"history-panel-content-item-list"},w1r=["onClick"],E1r={class:"history-panel-content-item-list-item-action"},S1r=["onClick"],T1r=Cs({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,s=Eft,u=wr(""),f=i.sessionStore,h=wr({}),g=Qa(()=>{const A={today:{key:"today",alias:Ko("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Ko("昨天"),sessionList:[]},before:{key:"before",alias:Ko("之前"),sessionList:[]}},I=f.sessionList.value.filter(N=>N.sessionName.toLowerCase().includes(u.value.toLowerCase()));for(const N of I){const L=new Date(N.createdAt||""),P=new Date,D=new Date;D.setDate(D.getDate()-1),L.toDateString()===P.toDateString()?A.today.sessionList.push(N):L.toDateString()===D.toDateString()?A.yesterday.sessionList.push(N):A.before.sessionList.push(N)}return Object.values(A).filter(N=>N.sessionList.length>0)}),b=A=>{var I;return((I=f.currentSession.value)==null?void 0:I.sessionCode)===A.sessionCode},_=A=>{b(A)||(f.switchSessionWithContents(A),o("close"))},E=A=>{f.deleteSession(A)},T=A=>{f.finishEditSession(A.sessionCode,{sessionName:A.sessionName})},S=A=>{f.startEditSession(A.sessionCode),Hu(()=>{const I=h.value[A.sessionCode];I&&I.focus()})},x=(A,I)=>{I.target.blur()};return(A,I)=>(di(),_a("div",p1r,[_i("div",g1r,[_i("h1",m1r,Al(Wn(Ko)("历史会话")),1),ui(Wn(qG),{modelValue:u.value,"onUpdate:modelValue":I[0]||(I[0]=N=>u.value=N),behavior:"simplicity",placeholder:Wn(Ko)("搜索会话名称"),style:{height:"22px"}},{suffix:Vu(()=>[_i("span",b1r,[ui(Wn(TEe))])]),_:1},8,["modelValue","placeholder"])]),_i("div",v1r,[g.value.length>0?(di(!0),_a(Wc,{key:0},Xw(g.value,N=>(di(),_a("div",{key:N.key,class:"history-panel-content-item"},[_i("div",y1r,[_i("span",null,Al(N.alias),1)]),_i("div",_1r,[(di(!0),_a(Wc,null,Xw(N.sessionList,L=>(di(),_a("div",{key:`${L.sessionCode}-${Wn(f).sessionUpdateCounter.value[L.sessionCode]||0}`,class:Gl(["history-panel-content-item-list-item",{active:b(L)}]),onClick:P=>_(L)},[L.isEdit?(di(),lf(Wn(qG),{key:1,ref_for:!0,ref:P=>{L.isEdit&&(h.value[L.sessionCode]=P)},modelValue:L.sessionName,"onUpdate:modelValue":P=>L.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>T(L),onEnter:x,onClick:I[2]||(I[2]=K6(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(di(),_a(Wc,{key:0},[ui(Wn(f$n),{style:{width:"calc(100% - 42px)"}},{default:Vu(()=>[Qv(Al(L.sessionName),1)]),_:2},1024),_i("span",E1r,[Sb(_i("i",{class:"bkai-icon bkai-bianji",onClick:K6(P=>S(L),["stop"])},null,8,S1r),[[Wn(s),{content:Wn(Ko)("编辑"),boundary:"parent"}]]),ui(Wn(QQn),{title:Wn(Ko)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>E(L.sessionCode)},{default:Vu(()=>[Sb(_i("i",{class:"bkai-icon bkai-shanchu",onClick:I[1]||(I[1]=K6(()=>{},["stop"]))},null,512),[[Wn(s),{content:Wn(Ko)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,w1r))),128))])]))),128)):(di(),lf(Wn(WWn),{key:1,style:{"margin-top":"100px"},description:u.value?Wn(Ko)("搜索为空"):Wn(Ko)("暂无对话"),scene:"part",type:u.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),v0=(t,n)=>{const i=t.__vccOpts||t;for(const[o,s]of n)i[o]=s;return i},C1r=v0(T1r,[["__scopeId","data-v-538e5107"]]),x1r={class:"left-section"},k1r={class:"logo"},A1r=["src"],O1r={class:"title"},I1r={class:"right-section"},N1r=v0(Cs({__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,s=Eft,u=h1r(),f=wr(null),{handleTriggerClick:h}=i1r({triggerRef:f,panelComponent:C1r,panelProps:{sessionStore:u},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),g=Qa(()=>{var L,P,D;return i.enableChatSession?i.title||`${((P=u.agentInfo.value)==null?void 0:P.agentName)||""}-${(D=u.currentSession.value)==null?void 0:D.sessionName}`:(L=u.agentInfo.value)==null?void 0:L.agentName}),b=Qa(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),_=Qa(()=>i.isCompressionHeight?Ko("恢复默认尺寸"):Ko("缩小高度")),E=wr(null),T=wr(null),S=wr(null),{createTooltip:x,destroyAll:A}=Q9({arrow:!0,delay:[0,0]}),I=()=>{A(),T.value&&x(T.value,_.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),S.value&&x(S.value,Ko("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};nl(()=>i.isCompressionHeight,()=>{I()}),ru(()=>{I()}),Xf(()=>{A()});const N=async()=>{try{o("newChat"),await u.initSession(!1)}catch(L){console.error("Failed to create new chat:",L)}};return(L,P)=>(di(),_a("div",{ref_key:"headerRef",ref:E,class:Gl(["header drag-handle",{draggable:i.draggable}])},[_i("div",x1r,[_i("div",k1r,[_i("img",{src:Wn(j3e),alt:"logo"},null,8,A1r)]),_i("div",O1r,Al(g.value),1)]),_i("div",I1r,[i.showNewChatIcon&&i.enableChatSession!==!1?Sb((di(),_a("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:N},null,512)),[[Wn(s),{content:Wn(Ko)("新增会话"),boundary:"parent"}]]):iu("",!0),i.showHistoryIcon&&i.enableChatSession!==!1?Sb((di(),_a("i",{key:1,ref_key:"historyIconRef",ref:f,class:"bkai-icon bkai-history",onClick:P[0]||(P[0]=(...D)=>Wn(h)&&Wn(h)(...D))},null,512)),[[Wn(s),{content:Wn(Ko)("历史会话"),boundary:"parent"}]]):iu("",!0),_i("i",{ref_key:"compressionRef",ref:T,class:Gl(["bkai-icon",b.value]),onClick:P[1]||(P[1]=D=>o("toggleCompression"))},null,2),_i("i",{ref_key:"closeRef",ref:S,class:"bkai-icon bkai-close-line-2",onClick:P[2]||(P[2]=D=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),M1r={class:"bar-button-text"},Umt=v0(Cs({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:n}){Oz(s=>({"5ec4534a":s.color}));const i=n,o=t;return(s,u)=>(di(),_a("div",{class:"bar-button",onClick:u[0]||(u[0]=f=>i("click"))},[_i("i",{class:Gl(["bkai-icon",o.icon])},null,2),_i("span",M1r,Al(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),L1r={class:"ai-cite"},R1r={class:"content"},zmt=v0(Cs({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const n=t,i=wr(null);nl(()=>n.text,()=>{i.value&&f(i.value),Hu(()=>{h()})});const o=wr(null),s=g=>g.scrollWidth>g.clientWidth,{createTooltip:u,destroyInstance:f}=Q9({arrow:!0,delay:[0,0]}),h=()=>{if(o.value){const g=o.value;s(g)&&(i.value=u(g,n.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return ru(()=>{Hu(()=>{h()})}),(g,b)=>Sb((di(),_a("section",L1r,[_i("span",R1r,[_i("span",{class:Gl(["content-text",{"show-close-icon":g.showCloseIcon}])},[b[1]||(b[1]=_i("i",{class:"bkai-icon bkai-yinyong"},null,-1)),_i("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},Al(g.text),513)],2),g.showCloseIcon?(di(),_a("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:b[0]||(b[0]=_=>g.$emit("close"))})):iu("",!0)])],512)),[[kz,g.text]])}}),[["__scopeId","data-v-af2b067c"]]);function Gmt(t={}){const n=wr(!1);return{isComposing:n,handleCompositionStart:()=>{n.value=!0},handleCompositionEnd:()=>{n.value=!1},handleEnter:h=>{const{isLoading:g,onSend:b,getInputValue:_=()=>"",clearInput:E=()=>{}}=t;if(h.shiftKey)return;h.preventDefault();const T=_();g!=null&&g.value||!T.trim()||n.value||(b==null||b(T),E())},handleSend:()=>{const{onSend:h,getInputValue:g=()=>"",clearInput:b=()=>{}}=t,_=g();_.trim()&&(h==null||h(_),b())},handleStop:()=>{const{onStop:h}=t;h==null||h()}}}const Hmt="enablePopup";function q3e(){return{enablePopup:Wv(Hmt,!0)}}const cV=wr(""),Vmt=wr(""),W3e=wr(!1),K3e={width:80,height:34,offset:15,debounceTime:300};function lV(t){const n=wr(!1),i=wr({top:"0px",left:"0px"});let o,s=null;const u=wr(null);let f=!1,h=null;const g=P=>{h={x:P.clientX,y:P.clientY}},b=P=>{s=P,h&&(f=Math.sqrt(Math.pow(P.clientX-h.x,2)+Math.pow(P.clientY-h.y,2))>5),h=null},_=(P,D)=>{const z=window.innerWidth,{width:F,height:H,offset:V}=K3e;let G=P+window.scrollX-F/2;G=Math.max(V,Math.min(G,z-F-V));let q=D+window.scrollY-H-V;return D<=H+V&&(q=D+window.scrollY+V),{top:`${q}px`,left:`${G}px`}},E=P=>{const D=window.innerWidth,{width:z,height:F,offset:H}=K3e;let V=P.left+window.scrollX+P.width/2-z/2;V=Math.max(H,Math.min(V,D-z-H));let G=P.top+window.scrollY-F-H;return P.top<=F+H&&(G=P.bottom+window.scrollY+H),{top:`${G}px`,left:`${V}px`}},T=(P,D)=>{let z=P;for(;z&&z!==document.documentElement;){if(z.hasAttribute&&z.hasAttribute(D))return!0;z=z.parentElement}return!1},S=()=>{clearTimeout(o);const P=window.getSelection();if(!(P!=null&&P.toString().trim())){x();return}const D=P.getRangeAt(0);o=setTimeout(()=>{var V,G,q,j;if((V=D.commonAncestorContainer.parentElement)!=null&&V.closest(".ai-blueking-wrapper")){x();return}const z=D.commonAncestorContainer,F=z.nodeType===Node.ELEMENT_NODE?z:z.parentElement;if(T(F,"ai-blueking-hide")){x();return}W3e.value=!1,cV.value=P.toString().trim();const H=document.activeElement;if((H==null?void 0:H.tagName)==="TEXTAREA"){if(!s){x();return}const{clientX:W,clientY:U}=s;i.value=_(W,U),n.value=!0,s=null}else{let W=D.getBoundingClientRect();const U=(G=D.commonAncestorContainer.firstChild)==null?void 0:G.shadowRoot;if(U&&(W=((j=(q=U.getSelection())==null?void 0:q.getRangeAt(0))==null?void 0:j.getBoundingClientRect())||W),!W.width||!W.height){x();return}i.value=E(W),n.value=!0}},K3e.debounceTime)},x=()=>{n.value=!1,W3e.value||(cV.value="")},A=P=>{var H,V,G;const D=P.target,z=((H=D.classList)==null?void 0:H.contains("ai-blueking-tag-text"))||((V=D.classList)==null?void 0:V.contains("shortcut-btn")),F=(G=u.value)==null?void 0:G.contains(D);if(!(z||!f)){if(f){P.preventDefault(),P.stopPropagation(),f=!1;return}F||(x(),I())}},I=()=>{const P=window.getSelection();P&&P.removeAllRanges(),cV.value=""},N=P=>{cV.value=P},L=P=>{Vmt.value=P};return ru(()=>{t&&(document.addEventListener("selectionchange",S),document.addEventListener("mousedown",g),document.addEventListener("mouseup",b),document.addEventListener("click",A,!0))}),Xf(()=>{t&&(document.removeEventListener("selectionchange",S),document.removeEventListener("mousedown",g),document.removeEventListener("mouseup",b),document.removeEventListener("click",A,!0)),clearTimeout(o)}),{isIconVisible:n,iconPosition:i,selectedText:cV,citeText:Vmt,hideIcon:x,clearSelection:I,setSelection:N,setCiteText:L,lockSelectedText:W3e,popupRef:u}}function D1r(t={}){const{minHeight:n=68,maxHeight:i=248,defaultHeight:o=68}=t,s=wr(o),u=wr(),f=()=>{if(!u.value)return;u.value.style.height=`${n}px`;const b=u.value.scrollHeight;s.value=Math.min(Math.max(b,n),i)};return{textareaHeight:s,textareaRef:u,updateHeight:f,resetHeight:()=>{s.value=o},bindTextarea:b=>{u.value=b,f()}}}function Ymt(t,n,i=wr(null),o={}){const s=wr([]),u=wr([]),{theme:f="ai-blueking-light light",placement:h="bottom",trigger:g="mouseenter",interactive:b=!0,allowHTML:_=!0,arrow:E=!0,offset:T=[0,4],onItemClick:S}=o,{createTooltip:x,destroyAll:A}=Q9({theme:f,placement:h,trigger:g,interactive:b,allowHTML:_,arrow:E,offset:T}),I=Qa(()=>u.value.length===0?"":`<div class="tippy-dropdown-menu">${u.value.map(z=>`<div class="tippy-menu-item" data-item-id="${z.id}">
|
|
760
760
|
${z.icon?`<i class="${z.icon}"></i>`:""}
|
|
761
761
|
<span>${z.name}</span>
|
|
762
762
|
</div>`).join("")}</div>`),N=async()=>{var J;const D=t.value;if(!D)return;s.value=[...n.value],u.value=[],await Hu();const z=D.clientWidth,F=Array.from(D.children),H=window.getComputedStyle(D),V=parseFloat(H.gap)||0;let G=0;if(F.forEach((Z,Q)=>{G+=Z.getBoundingClientRect().width,Q<F.length-1&&(G+=V)}),G<=z)return;const q=((J=i.value)==null?void 0:J.offsetWidth)||70,j=z-q;let W=0,U=-1;for(let Z=0;Z<F.length;Z++){const Q=F[Z];if(W+=Q.getBoundingClientRect().width,Z<F.length-1&&(W+=V),W>j){U=Z;break}}U===-1&&(U=n.value.length),s.value=n.value.slice(0,U),u.value=n.value.slice(U)};nl(()=>n.value,()=>{requestAnimationFrame(N)},{deep:!0,immediate:!0}),nl(()=>u.value,D=>{Hu(()=>{D.length>0&&i.value?(A(),x(i.value,I.value,{onShow:()=>{setTimeout(()=>{document.querySelectorAll(".tippy-menu-item").forEach(F=>{F.addEventListener("click",L)})},0)},onHide:()=>{document.querySelectorAll(".tippy-menu-item").forEach(F=>{F.removeEventListener("click",L)})}})):A()})},{immediate:!0});const L=D=>{const F=D.currentTarget.dataset.itemId,H=u.value.find(V=>V.id===F);H&&S&&S(H)};let P=null;return ru(()=>{t.value&&(P=new ResizeObserver(()=>{requestAnimationFrame(N)}),P.observe(t.value))}),Xf(()=>{P&&t.value&&P.unobserve(t.value),A()}),{visibleItems:s,hiddenItems:u,calculateVisibleItems:N}}const P1r={class:"ai-selected-box"},B1r={class:"ai-selected-tip"},F1r={class:"ai-selected-tip-text"},j1r={class:"ai-selected-box-content"},$1r=["onClick"],U1r=v0(Cs({__name:"ai-selected-box",props:{selectedText:{},actions:{}},emits:["shortcut-click"],setup(t,{emit:n}){const i=n,o=t,{clearSelection:s}=lV(!0),u=wr(null),f=wr(null),h=Qa(()=>o.actions),{visibleItems:g,hiddenItems:b}=Ymt(u,h,f,{theme:"ai-blueking-light light",placement:"top",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:E=>{i("shortcut-click",{shortcut:E,source:"ai-selected"})}}),_=E=>{i("shortcut-click",{shortcut:E,source:"ai-selected"})};return(E,T)=>(di(),_a("div",P1r,[_i("i",{class:"bkai-icon bkai-close-circle-shape",onClick:T[0]||(T[0]=(...S)=>Wn(s)&&Wn(s)(...S))}),_i("div",B1r,[T[1]||(T[1]=_i("i",{class:"bkai-icon bkai-yinyong"},null,-1)),_i("span",F1r,Al(Wn(Ko)("已框选内容")),1)]),_i("div",j1r,Al(o.selectedText),1),_i("div",{ref_key:"actionsContainerRef",ref:u,class:"ai-selected-box-actions"},[(di(!0),_a(Wc,null,Xw(Wn(g),S=>(di(),_a("div",{key:S.id,class:"ai-selected-box-action",onClick:x=>_(S)},[_i("i",{class:Gl(["bkai-icon",S.icon])},null,2),_i("span",null,Al(S.name),1)],8,$1r))),128)),Wn(b).length>0?(di(),_a("div",{key:0,ref_key:"moreButtonRef",ref:f,class:"ai-selected-box-action more-container"},[...T[2]||(T[2]=[_i("span",null,"更多",-1),_i("i",{class:"bkai-icon bkai-angle-down"},null,-1)])],512)):iu("",!0)],512)]))}}),[["__scopeId","data-v-42b29188"]]),z1r={class:"bkai-prompt-list-search"},G1r={class:"bkai-prompt-list-content"},H1r={key:0,class:"bkai-prompt-list-empty"},V1r=["onClick","onMouseover"],Y1r=v0(Cs({__name:"prompt-list",props:{prompts:{},show:{type:Boolean}},emits:["select","height-change","update:show"],setup(t,{expose:n,emit:i}){const o=t,s=i,u=wr(""),f=wr(null),h=wr(null),g=Qa(()=>u.value.trim()?o.prompts.filter(A=>A.toLowerCase().includes(u.value.toLowerCase())):o.prompts);nl(()=>o.show,A=>{A&&Hu(()=>{h.value=null})});const b=A=>{s("select",A),s("update:show",!1),u.value=""},_=()=>{g.value.length&&(h.value===null||h.value===g.value.length-1?h.value=0:h.value++,S())},E=()=>{g.value.length&&(h.value===null||h.value===0?h.value=g.value.length-1:h.value--,S())},T=()=>!g.value.length||h.value===null?!1:(b(g.value[h.value]),!0),S=()=>{if(h.value===null||!f.value)return;const A=f.value.querySelector(".bkai-prompt-list-content");if(!A)return;const I=A.children[h.value];if(!I)return;const N=A.getBoundingClientRect(),L=I.getBoundingClientRect();L.top<N.top?A.scrollTop=I.offsetTop:L.bottom>N.bottom&&(A.scrollTop=I.offsetTop+I.offsetHeight-A.clientHeight)};let x=null;return ru(()=>{f.value&&(x=new ResizeObserver(A=>{for(const I of A)s("height-change",I.contentRect.height)}),x.observe(f.value))}),Xf(()=>{x&&f.value&&(x.unobserve(f.value),x.disconnect())}),n({handleArrowDown:_,handleArrowUp:E,handleEnter:T}),(A,I)=>Sb((di(),_a("div",{ref_key:"promptListEl",ref:f,class:"bkai-prompt-list"},[_i("div",z1r,[ui(Wn(qG),{modelValue:u.value,"onUpdate:modelValue":I[0]||(I[0]=N=>u.value=N),behavior:"simplicity",placeholder:"请输入关键词"},null,8,["modelValue"])]),_i("div",G1r,[g.value.length===0?(di(),_a("div",H1r,Al(Wn(Ko)("无匹配结果")),1)):(di(!0),_a(Wc,{key:1},Xw(g.value,(N,L)=>(di(),_a("div",{key:N,style:{overflow:"hidden"},class:Gl(["bkai-prompt-list-item",{active:h.value===L}]),onClick:P=>b(N),onMouseleave:I[1]||(I[1]=P=>h.value=null),onMouseover:P=>h.value=L},Al(N),43,V1r))),128))])],512)),[[kz,A.show]])}}),[["__scopeId","data-v-64af2ecb"]]),q1r=["onClick"],W1r={class:"shortcut-text"},K1r=v0(Cs({__name:"shortcuts-bar",props:{shortcuts:{}},emits:["shortcut-click"],setup(t,{emit:n}){const i=t,o=n,s=wr(null),u=wr(null),f=Qa(()=>i.shortcuts),{visibleItems:h,hiddenItems:g}=Ymt(s,f,u,{theme:"ai-blueking-light light",placement:"bottom",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:b=>{o("shortcut-click",{shortcut:b,source:"main"})}});return(b,_)=>(di(),_a("div",{ref_key:"containerRef",ref:s,class:"shortcuts-bar"},[(di(!0),_a(Wc,null,Xw(Wn(h),E=>(di(),_a("div",{key:E.id,class:"shortcut-item",onClick:T=>o("shortcut-click",{shortcut:E,source:"main"})},[_i("i",{class:Gl(E.icon)},null,2),_i("span",W1r,Al(E.name),1)],8,q1r))),128)),Wn(g).length>0?(di(),_a("div",{key:0,ref_key:"moreButtonRef",ref:u,class:"shortcut-item more-container"},[..._[0]||(_[0]=[_i("span",{class:"shortcut-text"},"更多",-1),_i("i",{class:"bkai-icon bkai-angle-down"},null,-1)])],512)):iu("",!0)],512))}}),[["__scopeId","data-v-e115e445"]]),Q1r={class:"chat-input-box"},J1r={key:0,class:"cite"},X1r=["disabled","placeholder"],Z1r={class:"input-tools"},emr=v0(Cs({__name:"chat-input-box",props:{shortcuts:{default:()=>[]},conversationSettings:{},loading:{type:Boolean},prompts:{},disabled:{type:Boolean},placeholder:{default:()=>Ko(`输入 "/" 唤出 Prompt
|
|
@@ -722,7 +722,7 @@ Use Shift + Enter to enter a new line`,"你好,我是小鲸":"Hello, I am BK G
|
|
|
722
722
|
只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
|
|
723
723
|
'''
|
|
724
724
|
{{ SELECTED_TEXT }}
|
|
725
|
-
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},_o=t=>EKn!=="en"?LKn[t]||t:OKn[t]||t;function DKn(){const t=ee.ref([]),r=ee.ref(null),i=ee.ref(!1),o=ee.ref({});let l={};const f=ee.ref({}),h=ee.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),g=F=>{if(!l[F])throw new Error(`${F} not registered`);return l[F]},m=async F=>{try{await g("setCurrentSessionChain")(F),O(F)}catch(H){throw console.error("Failed to switch session:",H),H}},y=F=>{if(t.value=F.map(H=>({...H,isEdit:!1})),r.value){const H=F.find($=>{var Q;return $.sessionCode===((Q=r.value)==null?void 0:Q.sessionCode)});H&&(r.value={...r.value,...H,isEdit:r.value.isEdit})}},A=F=>{const H={...F,isEdit:!1};return t.value.unshift(H),H},x=async F=>{const H=F||IKn(),$=_o("新会话"),Q={sessionCode:H,sessionName:$,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},Y=A(Q);return await g("plusSessionApi")(Y),await m(Y),Y},T=F=>{const H=t.value.find($=>$.sessionCode===F);H&&(f.value[F]={...H},S(F,{isEdit:!0},{syncBackend:!1}))},C=async(F,H)=>{const $=f.value[F];if(!$)return null;const Q=Object.entries(H).some(([V,U])=>V==="isEdit"?!1:$[V]!==U),Y=await S(F,{...H,isEdit:!1},{syncBackend:Q});return delete f.value[F],Y},S=async(F,H,$={})=>{const{syncBackend:Q=!0,forceSync:Y=!1}=$,V=t.value.findIndex(W=>W.sessionCode===F);if(V===-1)return null;const U=t.value[V],_={...U,...H};if(t.value[V]=_,t.value=[...t.value],o.value[F]||(o.value[F]=0),o.value[F]++,r.value&&r.value.sessionCode===F&&(r.value={...r.value,...H}),Q&&!H.isEdit||Y)try{const W=g("modifySessionApi"),z={..._,isEdit:!1};await W(z)}catch(W){console.error("Failed to sync session to backend:",W),t.value[V]=U,t.value=[...t.value],r.value&&r.value.sessionCode===F&&(r.value=U)}return _},E=async F=>{var Y;await g("deleteSessionApi")(F);const $=t.value.findIndex(V=>V.sessionCode===F);if($===-1)return null;const Q=((Y=r.value)==null?void 0:Y.sessionCode)===F;if(t.value.splice($,1),Q){if(t.value.length>0){const V=new Date().toDateString(),U=t.value.filter(W=>new Date(W.createdAt||"").toDateString()===V),_=U.length>0?U[0]:t.value[0];return await m(_),_}return await j(!1),null}return null},O=F=>{const H=t.value.find($=>$.sessionCode===F.sessionCode);if(H)r.value=H;else{const $=A(F);r.value=$}},D=F=>{l=F},j=async(F=!0)=>{var Y,V,U,_;let H=t.value;if(F){const z=await g("getSessionsApi")();y(z)}let $=null,Q=[];if(H.length>0){const W=H.sort((X,oe)=>new Date(oe.createdAt||"").getTime()-new Date(X.createdAt||"").getTime())[0];Q=await g("getSessionContentsApi")(W.sessionCode),Q.filter(X=>!Ene.includes(X.role)).some(X=>X.content&&X.content.trim()!=="")||($={...W,isEdit:!1})}if($?(g("setSessionContents")(Q),m($)):$=await x(),!h.value||F){const W=g("getAgentInfoApi"),{conversationSettings:z,promptSetting:te,agentName:X}=await W();Object.assign(h.value,{conversationSettings:z,promptSetting:te,agentName:X})}return(U=(V=(Y=h.value)==null?void 0:Y.promptSetting)==null?void 0:V.content)!=null&&U.length&&await g("handleCompleteRole")($.sessionCode,h.value.promptSetting.content),{conversationSettings:(_=h.value)==null?void 0:_.conversationSettings}};return{sessionList:t,currentSession:r,setSessionList:y,addSession:A,addNewSession:x,initSession:j,updateSession:S,startEditSession:T,finishEditSession:C,deleteSession:E,setCurrentSession:O,registerSdkMethods:D,switchSessionWithContents:m,sessionContentLoading:i,agentInfo:h,getSessionList:async()=>{const H=await g("getSessionsApi")();if(y(H),r.value){const $=H.find(Q=>{var Y;return Q.sessionCode===((Y=r.value)==null?void 0:Y.sessionCode)});$&&(r.value={...r.value,...$,isEdit:r.value.isEdit})}return H.forEach($=>{o.value[$.sessionCode]||(o.value[$.sessionCode]=0),o.value[$.sessionCode]++}),t.value},sessionUpdateCounter:o}}const Vst=Symbol("session-store");function NKn(){const t=DKn();return ee.provide(Vst,t),t}function PKn(){const t=ee.inject(Vst);if(!t)throw new Error("Session store not provided");return t}function YN(t={}){const r="ai-blueking-tooltip",i=ee.ref([]),o=(y,A,x={})=>{try{const T=typeof y=="string"?document.querySelector(y):y;if(!T)return console.warn(`Tooltip target not found: ${y}`),null;const C={content:A,placement:"top",arrow:!0,delay:[300,0],theme:r,...t,...x},S=XS(T,C);return i.value.push(S),S}catch(T){return console.error("Failed to create tooltip:",T),null}},l=(y,A,x={})=>{const T=document.querySelectorAll(y),C=[];return T.forEach(S=>{const E=o(S,A,x);E&&C.push(E)}),C},f=y=>{const A=[];return y.forEach(({element:x,content:T,options:C})=>{const S=o(x,T,C);S&&A.push(S)}),A},h=()=>{i.value.forEach(y=>{y.destroy()}),i.value=[]},g=(y,A)=>{y.setContent(A)},m=y=>{y.destroy()};return ee.onBeforeUnmount(()=>{h()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:f,destroyAll:h,updateContent:g,destroyInstance:m}}const jKn={class:"bkai-history-panel"},BKn={class:"history-panel-header"},FKn={class:"history-panel-header-title"},RKn={class:"input-icon"},zKn={class:"history-panel-content"},_Kn={class:"history-panel-content-item-title"},$Kn={class:"history-panel-content-item-list"},HKn=["onClick"],VKn={class:"history-panel-content-item-list-item-action"},QKn=["onClick"],GKn=ee.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:r}){const i=t,o=r,l=Eet,f=ee.ref(""),h=i.sessionStore,g=ee.ref({}),m=ee.computed(()=>{const E={today:{key:"today",alias:_o("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:_o("昨天"),sessionList:[]},before:{key:"before",alias:_o("之前"),sessionList:[]}},O=h.sessionList.value.filter(D=>D.sessionName.toLowerCase().includes(f.value.toLowerCase()));for(const D of O){const j=new Date(D.createdAt||""),R=new Date,F=new Date;F.setDate(F.getDate()-1),j.toDateString()===R.toDateString()?E.today.sessionList.push(D):j.toDateString()===F.toDateString()?E.yesterday.sessionList.push(D):E.before.sessionList.push(D)}return Object.values(E).filter(D=>D.sessionList.length>0)}),y=E=>{var O;return((O=h.currentSession.value)==null?void 0:O.sessionCode)===E.sessionCode},A=E=>{y(E)||(h.switchSessionWithContents(E),o("close"))},x=E=>{h.deleteSession(E)},T=E=>{h.finishEditSession(E.sessionCode,{sessionName:E.sessionName})},C=E=>{h.startEditSession(E.sessionCode),ee.nextTick(()=>{const O=g.value[E.sessionCode];O&&O.focus()})},S=(E,O)=>{O.target.blur()};return(E,O)=>(ee.openBlock(),ee.createElementBlock("div",jKn,[ee.createElementVNode("div",BKn,[ee.createElementVNode("h1",FKn,ee.toDisplayString(ee.unref(_o)("历史会话")),1),ee.createVNode(ee.unref(p$),{modelValue:f.value,"onUpdate:modelValue":O[0]||(O[0]=D=>f.value=D),behavior:"simplicity",placeholder:ee.unref(_o)("搜索会话名称"),style:{height:"22px"}},{suffix:ee.withCtx(()=>[ee.createElementVNode("span",RKn,[ee.createVNode(ee.unref(Jbe))])]),_:1},8,["modelValue","placeholder"])]),ee.createElementVNode("div",zKn,[m.value.length>0?(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,{key:0},ee.renderList(m.value,D=>(ee.openBlock(),ee.createElementBlock("div",{key:D.key,class:"history-panel-content-item"},[ee.createElementVNode("div",_Kn,[ee.createElementVNode("span",null,ee.toDisplayString(D.alias),1)]),ee.createElementVNode("div",$Kn,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(D.sessionList,j=>(ee.openBlock(),ee.createElementBlock("div",{key:`${j.sessionCode}-${ee.unref(h).sessionUpdateCounter.value[j.sessionCode]||0}`,class:ee.normalizeClass(["history-panel-content-item-list-item",{active:y(j)}]),onClick:R=>A(j)},[j.isEdit?(ee.openBlock(),ee.createBlock(ee.unref(p$),{key:1,ref_for:!0,ref:R=>{j.isEdit&&(g.value[j.sessionCode]=R)},modelValue:j.sessionName,"onUpdate:modelValue":R=>j.sessionName=R,style:{width:"100%",height:"28px"},onBlur:R=>T(j),onEnter:S,onClick:O[2]||(O[2]=ee.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(ee.openBlock(),ee.createElementBlock(ee.Fragment,{key:0},[ee.createVNode(ee.unref(V9n),{style:{width:"calc(100% - 42px)"}},{default:ee.withCtx(()=>[ee.createTextVNode(ee.toDisplayString(j.sessionName),1)]),_:2},1024),ee.createElementVNode("span",VKn,[ee.withDirectives(ee.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:ee.withModifiers(R=>C(j),["stop"])},null,8,QKn),[[ee.unref(l),{content:ee.unref(_o)("编辑"),boundary:"parent"}]]),ee.createVNode(ee.unref(MDn),{title:ee.unref(_o)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:R=>x(j.sessionCode)},{default:ee.withCtx(()=>[ee.withDirectives(ee.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:O[1]||(O[1]=ee.withModifiers(()=>{},["stop"]))},null,512),[[ee.unref(l),{content:ee.unref(_o)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,HKn))),128))])]))),128)):(ee.openBlock(),ee.createBlock(ee.unref(SOn),{key:1,style:{"margin-top":"100px"},description:f.value?ee.unref(_o)("搜索为空"):ee.unref(_o)("暂无对话"),scene:"part",type:f.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),_d=(t,r)=>{const i=t.__vccOpts||t;for(const[o,l]of r)i[o]=l;return i},YKn=_d(GKn,[["__scopeId","data-v-538e5107"]]),UKn={class:"left-section"},JKn={class:"logo"},WKn=["src"],qKn={class:"title"},ZKn={class:"right-section"},KKn=_d(ee.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:r}){const i=t,o=r,l=Eet,f=PKn(),h=ee.ref(null),{handleTriggerClick:g}=TKn({triggerRef:h,panelComponent:YKn,panelProps:{sessionStore:f},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),m=ee.computed(()=>{var j,R,F;return i.enableChatSession?i.title||`${((R=f.agentInfo.value)==null?void 0:R.agentName)||""}-${(F=f.currentSession.value)==null?void 0:F.sessionName}`:(j=f.agentInfo.value)==null?void 0:j.agentName}),y=ee.computed(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),A=ee.computed(()=>i.isCompressionHeight?_o("恢复默认尺寸"):_o("缩小高度")),x=ee.ref(null),T=ee.ref(null),C=ee.ref(null),{createTooltip:S,destroyAll:E}=YN({arrow:!0,delay:[0,0]}),O=()=>{E(),T.value&&S(T.value,A.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),C.value&&S(C.value,_o("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};ee.watch(()=>i.isCompressionHeight,()=>{O()}),ee.onMounted(()=>{O()}),ee.onBeforeUnmount(()=>{E()});const D=async()=>{try{o("newChat"),await f.initSession(!1)}catch(j){console.error("Failed to create new chat:",j)}};return(j,R)=>(ee.openBlock(),ee.createElementBlock("div",{ref_key:"headerRef",ref:x,class:ee.normalizeClass(["header drag-handle",{draggable:i.draggable}])},[ee.createElementVNode("div",UKn,[ee.createElementVNode("div",JKn,[ee.createElementVNode("img",{src:ee.unref(lye),alt:"logo"},null,8,WKn)]),ee.createElementVNode("div",qKn,ee.toDisplayString(m.value),1)]),ee.createElementVNode("div",ZKn,[i.showNewChatIcon&&i.enableChatSession!==!1?ee.withDirectives((ee.openBlock(),ee.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:D},null,512)),[[ee.unref(l),{content:ee.unref(_o)("新增会话"),boundary:"parent"}]]):ee.createCommentVNode("",!0),i.showHistoryIcon&&i.enableChatSession!==!1?ee.withDirectives((ee.openBlock(),ee.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:h,class:"bkai-icon bkai-history",onClick:R[0]||(R[0]=(...F)=>ee.unref(g)&&ee.unref(g)(...F))},null,512)),[[ee.unref(l),{content:ee.unref(_o)("历史会话"),boundary:"parent"}]]):ee.createCommentVNode("",!0),ee.createElementVNode("i",{ref_key:"compressionRef",ref:T,class:ee.normalizeClass(["bkai-icon",y.value]),onClick:R[1]||(R[1]=F=>o("toggleCompression"))},null,2),ee.createElementVNode("i",{ref_key:"closeRef",ref:C,class:"bkai-icon bkai-close-line-2",onClick:R[2]||(R[2]=F=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),XKn={class:"bar-button-text"},Qst=_d(ee.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:r}){ee.useCssVars(l=>({"5ec4534a":l.color}));const i=r,o=t;return(l,f)=>(ee.openBlock(),ee.createElementBlock("div",{class:"bar-button",onClick:f[0]||(f[0]=h=>i("click"))},[ee.createElementVNode("i",{class:ee.normalizeClass(["bkai-icon",o.icon])},null,2),ee.createElementVNode("span",XKn,ee.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),eXn={class:"ai-cite"},tXn={class:"content"},Gst=_d(ee.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const r=t,i=ee.ref(null);ee.watch(()=>r.text,()=>{i.value&&h(i.value),ee.nextTick(()=>{g()})});const o=ee.ref(null),l=m=>m.scrollWidth>m.clientWidth,{createTooltip:f,destroyInstance:h}=YN({arrow:!0,delay:[0,0]}),g=()=>{if(o.value){const m=o.value;l(m)&&(i.value=f(m,r.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return ee.onMounted(()=>{ee.nextTick(()=>{g()})}),(m,y)=>ee.withDirectives((ee.openBlock(),ee.createElementBlock("section",eXn,[ee.createElementVNode("span",tXn,[ee.createElementVNode("span",{class:ee.normalizeClass(["content-text",{"show-close-icon":m.showCloseIcon}])},[y[1]||(y[1]=ee.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),ee.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},ee.toDisplayString(m.text),513)],2),m.showCloseIcon?(ee.openBlock(),ee.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:y[0]||(y[0]=A=>m.$emit("close"))})):ee.createCommentVNode("",!0)])],512)),[[ee.vShow,m.text]])}}),[["__scopeId","data-v-af2b067c"]]);function Yst(t={}){const r=ee.ref(!1);return{isComposing:r,handleCompositionStart:()=>{r.value=!0},handleCompositionEnd:()=>{r.value=!1},handleEnter:g=>{const{isLoading:m,onSend:y,getInputValue:A=()=>"",clearInput:x=()=>{}}=t;if(g.shiftKey)return;g.preventDefault();const T=A();m!=null&&m.value||!T.trim()||r.value||(y==null||y(T),x())},handleSend:()=>{const{onSend:g,getInputValue:m=()=>"",clearInput:y=()=>{}}=t,A=m();A.trim()&&(g==null||g(A),y())},handleStop:()=>{const{onStop:g}=t;g==null||g()}}}const Ust="enablePopup";function bye(){return{enablePopup:ee.inject(Ust,!0)}}const EH=ee.ref(""),Jst=ee.ref(""),vye=ee.ref(!1),yye={width:80,height:34,offset:15,debounceTime:300};function OH(t){const r=ee.ref(!1),i=ee.ref({top:"0px",left:"0px"});let o,l=null;const f=ee.ref(null);let h=!1,g=null;const m=R=>{g={x:R.clientX,y:R.clientY}},y=R=>{l=R,g&&(h=Math.sqrt(Math.pow(R.clientX-g.x,2)+Math.pow(R.clientY-g.y,2))>5),g=null},A=(R,F)=>{const H=window.innerWidth,{width:$,height:Q,offset:Y}=yye;let V=R+window.scrollX-$/2;V=Math.max(Y,Math.min(V,H-$-Y));let U=F+window.scrollY-Q-Y;return F<=Q+Y&&(U=F+window.scrollY+Y),{top:`${U}px`,left:`${V}px`}},x=R=>{const F=window.innerWidth,{width:H,height:$,offset:Q}=yye;let Y=R.left+window.scrollX+R.width/2-H/2;Y=Math.max(Q,Math.min(Y,F-H-Q));let V=R.top+window.scrollY-$-Q;return R.top<=$+Q&&(V=R.bottom+window.scrollY+Q),{top:`${V}px`,left:`${Y}px`}},T=(R,F)=>{let H=R;for(;H&&H!==document.documentElement;){if(H.hasAttribute&&H.hasAttribute(F))return!0;H=H.parentElement}return!1},C=()=>{clearTimeout(o),o=setTimeout(()=>{var Y;const R=window.getSelection();if(!(R!=null&&R.toString().trim())){S();return}const F=R.getRangeAt(0);if((Y=F.commonAncestorContainer.parentElement)!=null&&Y.closest(".ai-blueking-wrapper")){S();return}const H=F.commonAncestorContainer,$=H.nodeType===Node.ELEMENT_NODE?H:H.parentElement;if(T($,"ai-blueking-hide")){S();return}vye.value=!1,EH.value=R.toString().trim();const Q=document.activeElement;if((Q==null?void 0:Q.tagName)==="TEXTAREA"){if(!l){S();return}const{clientX:V,clientY:U}=l;i.value=A(V,U),r.value=!0,l=null}else{const V=F.getBoundingClientRect();if(!V.width||!V.height){S();return}i.value=x(V),r.value=!0}},yye.debounceTime)},S=()=>{r.value=!1,vye.value||(EH.value="")},E=R=>{var Q,Y,V;const F=R.target,H=((Q=F.classList)==null?void 0:Q.contains("ai-blueking-tag-text"))||((Y=F.classList)==null?void 0:Y.contains("shortcut-btn")),$=(V=f.value)==null?void 0:V.contains(F);if(!(H||!h)){if(h){R.preventDefault(),R.stopPropagation(),h=!1;return}$||(S(),O())}},O=()=>{const R=window.getSelection();R&&R.removeAllRanges(),EH.value=""},D=R=>{EH.value=R},j=R=>{Jst.value=R};return ee.onMounted(()=>{t&&(document.addEventListener("selectionchange",C),document.addEventListener("mousedown",m),document.addEventListener("mouseup",y),document.addEventListener("click",E,!0))}),ee.onBeforeUnmount(()=>{t&&(document.removeEventListener("selectionchange",C),document.removeEventListener("mousedown",m),document.removeEventListener("mouseup",y),document.removeEventListener("click",E,!0)),clearTimeout(o)}),{isIconVisible:r,iconPosition:i,selectedText:EH,citeText:Jst,hideIcon:S,clearSelection:O,setSelection:D,setCiteText:j,lockSelectedText:vye,popupRef:f}}function nXn(t={}){const{minHeight:r=68,maxHeight:i=248,defaultHeight:o=68}=t,l=ee.ref(o),f=ee.ref(),h=()=>{if(!f.value)return;f.value.style.height=`${r}px`;const y=f.value.scrollHeight;l.value=Math.min(Math.max(y,r),i)};return{textareaHeight:l,textareaRef:f,updateHeight:h,resetHeight:()=>{l.value=o},bindTextarea:y=>{f.value=y,h()}}}function Wst(t,r,i=ee.ref(null),o={}){const l=ee.ref([]),f=ee.ref([]),{theme:h="ai-blueking-light light",placement:g="bottom",trigger:m="mouseenter",interactive:y=!0,allowHTML:A=!0,arrow:x=!0,offset:T=[0,4],onItemClick:C}=o,{createTooltip:S,destroyAll:E}=YN({theme:h,placement:g,trigger:m,interactive:y,allowHTML:A,arrow:x,offset:T}),O=ee.computed(()=>f.value.length===0?"":`<div class="tippy-dropdown-menu">${f.value.map(H=>`<div class="tippy-menu-item" data-item-id="${H.id}">
|
|
725
|
+
'''`,explanationShortcut:"您是一位专业的解释者。请详细解释“{{ SELECTED_TEXT }}”。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。",新会话:"新会话"},_o=t=>EKn!=="en"?LKn[t]||t:OKn[t]||t;function DKn(){const t=ee.ref([]),r=ee.ref(null),i=ee.ref(!1),o=ee.ref({});let l={};const f=ee.ref({}),h=ee.ref({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),g=F=>{if(!l[F])throw new Error(`${F} not registered`);return l[F]},m=async F=>{try{await g("setCurrentSessionChain")(F),O(F)}catch(H){throw console.error("Failed to switch session:",H),H}},y=F=>{if(t.value=F.map(H=>({...H,isEdit:!1})),r.value){const H=F.find($=>{var Q;return $.sessionCode===((Q=r.value)==null?void 0:Q.sessionCode)});H&&(r.value={...r.value,...H,isEdit:r.value.isEdit})}},A=F=>{const H={...F,isEdit:!1};return t.value.unshift(H),H},x=async F=>{const H=F||IKn(),$=_o("新会话"),Q={sessionCode:H,sessionName:$,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},Y=A(Q);return await g("plusSessionApi")(Y),await m(Y),Y},T=F=>{const H=t.value.find($=>$.sessionCode===F);H&&(f.value[F]={...H},S(F,{isEdit:!0},{syncBackend:!1}))},C=async(F,H)=>{const $=f.value[F];if(!$)return null;const Q=Object.entries(H).some(([V,U])=>V==="isEdit"?!1:$[V]!==U),Y=await S(F,{...H,isEdit:!1},{syncBackend:Q});return delete f.value[F],Y},S=async(F,H,$={})=>{const{syncBackend:Q=!0,forceSync:Y=!1}=$,V=t.value.findIndex(W=>W.sessionCode===F);if(V===-1)return null;const U=t.value[V],_={...U,...H};if(t.value[V]=_,t.value=[...t.value],o.value[F]||(o.value[F]=0),o.value[F]++,r.value&&r.value.sessionCode===F&&(r.value={...r.value,...H}),Q&&!H.isEdit||Y)try{const W=g("modifySessionApi"),z={..._,isEdit:!1};await W(z)}catch(W){console.error("Failed to sync session to backend:",W),t.value[V]=U,t.value=[...t.value],r.value&&r.value.sessionCode===F&&(r.value=U)}return _},E=async F=>{var Y;await g("deleteSessionApi")(F);const $=t.value.findIndex(V=>V.sessionCode===F);if($===-1)return null;const Q=((Y=r.value)==null?void 0:Y.sessionCode)===F;if(t.value.splice($,1),Q){if(t.value.length>0){const V=new Date().toDateString(),U=t.value.filter(W=>new Date(W.createdAt||"").toDateString()===V),_=U.length>0?U[0]:t.value[0];return await m(_),_}return await j(!1),null}return null},O=F=>{const H=t.value.find($=>$.sessionCode===F.sessionCode);if(H)r.value=H;else{const $=A(F);r.value=$}},D=F=>{l=F},j=async(F=!0)=>{var Y,V,U,_;let H=t.value;if(F){const z=await g("getSessionsApi")();y(z)}let $=null,Q=[];if(H.length>0){const W=H.sort((X,oe)=>new Date(oe.createdAt||"").getTime()-new Date(X.createdAt||"").getTime())[0];Q=await g("getSessionContentsApi")(W.sessionCode),Q.filter(X=>!Ene.includes(X.role)).some(X=>X.content&&X.content.trim()!=="")||($={...W,isEdit:!1})}if($?(g("setSessionContents")(Q),m($)):$=await x(),!h.value||F){const W=g("getAgentInfoApi"),{conversationSettings:z,promptSetting:te,agentName:X}=await W();Object.assign(h.value,{conversationSettings:z,promptSetting:te,agentName:X})}return(U=(V=(Y=h.value)==null?void 0:Y.promptSetting)==null?void 0:V.content)!=null&&U.length&&await g("handleCompleteRole")($.sessionCode,h.value.promptSetting.content),{conversationSettings:(_=h.value)==null?void 0:_.conversationSettings}};return{sessionList:t,currentSession:r,setSessionList:y,addSession:A,addNewSession:x,initSession:j,updateSession:S,startEditSession:T,finishEditSession:C,deleteSession:E,setCurrentSession:O,registerSdkMethods:D,switchSessionWithContents:m,sessionContentLoading:i,agentInfo:h,getSessionList:async()=>{const H=await g("getSessionsApi")();if(y(H),r.value){const $=H.find(Q=>{var Y;return Q.sessionCode===((Y=r.value)==null?void 0:Y.sessionCode)});$&&(r.value={...r.value,...$,isEdit:r.value.isEdit})}return H.forEach($=>{o.value[$.sessionCode]||(o.value[$.sessionCode]=0),o.value[$.sessionCode]++}),t.value},sessionUpdateCounter:o}}const Vst=Symbol("session-store");function NKn(){const t=DKn();return ee.provide(Vst,t),t}function PKn(){const t=ee.inject(Vst);if(!t)throw new Error("Session store not provided");return t}function YN(t={}){const r="ai-blueking-tooltip",i=ee.ref([]),o=(y,A,x={})=>{try{const T=typeof y=="string"?document.querySelector(y):y;if(!T)return console.warn(`Tooltip target not found: ${y}`),null;const C={content:A,placement:"top",arrow:!0,delay:[300,0],theme:r,...t,...x},S=XS(T,C);return i.value.push(S),S}catch(T){return console.error("Failed to create tooltip:",T),null}},l=(y,A,x={})=>{const T=document.querySelectorAll(y),C=[];return T.forEach(S=>{const E=o(S,A,x);E&&C.push(E)}),C},f=y=>{const A=[];return y.forEach(({element:x,content:T,options:C})=>{const S=o(x,T,C);S&&A.push(S)}),A},h=()=>{i.value.forEach(y=>{y.destroy()}),i.value=[]},g=(y,A)=>{y.setContent(A)},m=y=>{y.destroy()};return ee.onBeforeUnmount(()=>{h()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:f,destroyAll:h,updateContent:g,destroyInstance:m}}const jKn={class:"bkai-history-panel"},BKn={class:"history-panel-header"},FKn={class:"history-panel-header-title"},RKn={class:"input-icon"},zKn={class:"history-panel-content"},_Kn={class:"history-panel-content-item-title"},$Kn={class:"history-panel-content-item-list"},HKn=["onClick"],VKn={class:"history-panel-content-item-list-item-action"},QKn=["onClick"],GKn=ee.defineComponent({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:r}){const i=t,o=r,l=Eet,f=ee.ref(""),h=i.sessionStore,g=ee.ref({}),m=ee.computed(()=>{const E={today:{key:"today",alias:_o("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:_o("昨天"),sessionList:[]},before:{key:"before",alias:_o("之前"),sessionList:[]}},O=h.sessionList.value.filter(D=>D.sessionName.toLowerCase().includes(f.value.toLowerCase()));for(const D of O){const j=new Date(D.createdAt||""),R=new Date,F=new Date;F.setDate(F.getDate()-1),j.toDateString()===R.toDateString()?E.today.sessionList.push(D):j.toDateString()===F.toDateString()?E.yesterday.sessionList.push(D):E.before.sessionList.push(D)}return Object.values(E).filter(D=>D.sessionList.length>0)}),y=E=>{var O;return((O=h.currentSession.value)==null?void 0:O.sessionCode)===E.sessionCode},A=E=>{y(E)||(h.switchSessionWithContents(E),o("close"))},x=E=>{h.deleteSession(E)},T=E=>{h.finishEditSession(E.sessionCode,{sessionName:E.sessionName})},C=E=>{h.startEditSession(E.sessionCode),ee.nextTick(()=>{const O=g.value[E.sessionCode];O&&O.focus()})},S=(E,O)=>{O.target.blur()};return(E,O)=>(ee.openBlock(),ee.createElementBlock("div",jKn,[ee.createElementVNode("div",BKn,[ee.createElementVNode("h1",FKn,ee.toDisplayString(ee.unref(_o)("历史会话")),1),ee.createVNode(ee.unref(p$),{modelValue:f.value,"onUpdate:modelValue":O[0]||(O[0]=D=>f.value=D),behavior:"simplicity",placeholder:ee.unref(_o)("搜索会话名称"),style:{height:"22px"}},{suffix:ee.withCtx(()=>[ee.createElementVNode("span",RKn,[ee.createVNode(ee.unref(Jbe))])]),_:1},8,["modelValue","placeholder"])]),ee.createElementVNode("div",zKn,[m.value.length>0?(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,{key:0},ee.renderList(m.value,D=>(ee.openBlock(),ee.createElementBlock("div",{key:D.key,class:"history-panel-content-item"},[ee.createElementVNode("div",_Kn,[ee.createElementVNode("span",null,ee.toDisplayString(D.alias),1)]),ee.createElementVNode("div",$Kn,[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(D.sessionList,j=>(ee.openBlock(),ee.createElementBlock("div",{key:`${j.sessionCode}-${ee.unref(h).sessionUpdateCounter.value[j.sessionCode]||0}`,class:ee.normalizeClass(["history-panel-content-item-list-item",{active:y(j)}]),onClick:R=>A(j)},[j.isEdit?(ee.openBlock(),ee.createBlock(ee.unref(p$),{key:1,ref_for:!0,ref:R=>{j.isEdit&&(g.value[j.sessionCode]=R)},modelValue:j.sessionName,"onUpdate:modelValue":R=>j.sessionName=R,style:{width:"100%",height:"28px"},onBlur:R=>T(j),onEnter:S,onClick:O[2]||(O[2]=ee.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(ee.openBlock(),ee.createElementBlock(ee.Fragment,{key:0},[ee.createVNode(ee.unref(V9n),{style:{width:"calc(100% - 42px)"}},{default:ee.withCtx(()=>[ee.createTextVNode(ee.toDisplayString(j.sessionName),1)]),_:2},1024),ee.createElementVNode("span",VKn,[ee.withDirectives(ee.createElementVNode("i",{class:"bkai-icon bkai-bianji",onClick:ee.withModifiers(R=>C(j),["stop"])},null,8,QKn),[[ee.unref(l),{content:ee.unref(_o)("编辑"),boundary:"parent"}]]),ee.createVNode(ee.unref(MDn),{title:ee.unref(_o)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:R=>x(j.sessionCode)},{default:ee.withCtx(()=>[ee.withDirectives(ee.createElementVNode("i",{class:"bkai-icon bkai-shanchu",onClick:O[1]||(O[1]=ee.withModifiers(()=>{},["stop"]))},null,512),[[ee.unref(l),{content:ee.unref(_o)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,HKn))),128))])]))),128)):(ee.openBlock(),ee.createBlock(ee.unref(SOn),{key:1,style:{"margin-top":"100px"},description:f.value?ee.unref(_o)("搜索为空"):ee.unref(_o)("暂无对话"),scene:"part",type:f.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),_d=(t,r)=>{const i=t.__vccOpts||t;for(const[o,l]of r)i[o]=l;return i},YKn=_d(GKn,[["__scopeId","data-v-538e5107"]]),UKn={class:"left-section"},JKn={class:"logo"},WKn=["src"],qKn={class:"title"},ZKn={class:"right-section"},KKn=_d(ee.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:r}){const i=t,o=r,l=Eet,f=PKn(),h=ee.ref(null),{handleTriggerClick:g}=TKn({triggerRef:h,panelComponent:YKn,panelProps:{sessionStore:f},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),m=ee.computed(()=>{var j,R,F;return i.enableChatSession?i.title||`${((R=f.agentInfo.value)==null?void 0:R.agentName)||""}-${(F=f.currentSession.value)==null?void 0:F.sessionName}`:(j=f.agentInfo.value)==null?void 0:j.agentName}),y=ee.computed(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),A=ee.computed(()=>i.isCompressionHeight?_o("恢复默认尺寸"):_o("缩小高度")),x=ee.ref(null),T=ee.ref(null),C=ee.ref(null),{createTooltip:S,destroyAll:E}=YN({arrow:!0,delay:[0,0]}),O=()=>{E(),T.value&&S(T.value,A.value,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}),C.value&&S(C.value,_o("关闭"),{appendTo:document.querySelector(".ai-blueking-container-wrapper")})};ee.watch(()=>i.isCompressionHeight,()=>{O()}),ee.onMounted(()=>{O()}),ee.onBeforeUnmount(()=>{E()});const D=async()=>{try{o("newChat"),await f.initSession(!1)}catch(j){console.error("Failed to create new chat:",j)}};return(j,R)=>(ee.openBlock(),ee.createElementBlock("div",{ref_key:"headerRef",ref:x,class:ee.normalizeClass(["header drag-handle",{draggable:i.draggable}])},[ee.createElementVNode("div",UKn,[ee.createElementVNode("div",JKn,[ee.createElementVNode("img",{src:ee.unref(lye),alt:"logo"},null,8,WKn)]),ee.createElementVNode("div",qKn,ee.toDisplayString(m.value),1)]),ee.createElementVNode("div",ZKn,[i.showNewChatIcon&&i.enableChatSession!==!1?ee.withDirectives((ee.openBlock(),ee.createElementBlock("i",{key:0,class:"bkai-icon bkai-xinzengliaotian",onClick:D},null,512)),[[ee.unref(l),{content:ee.unref(_o)("新增会话"),boundary:"parent"}]]):ee.createCommentVNode("",!0),i.showHistoryIcon&&i.enableChatSession!==!1?ee.withDirectives((ee.openBlock(),ee.createElementBlock("i",{key:1,ref_key:"historyIconRef",ref:h,class:"bkai-icon bkai-history",onClick:R[0]||(R[0]=(...F)=>ee.unref(g)&&ee.unref(g)(...F))},null,512)),[[ee.unref(l),{content:ee.unref(_o)("历史会话"),boundary:"parent"}]]):ee.createCommentVNode("",!0),ee.createElementVNode("i",{ref_key:"compressionRef",ref:T,class:ee.normalizeClass(["bkai-icon",y.value]),onClick:R[1]||(R[1]=F=>o("toggleCompression"))},null,2),ee.createElementVNode("i",{ref_key:"closeRef",ref:C,class:"bkai-icon bkai-close-line-2",onClick:R[2]||(R[2]=F=>o("close"))},null,512)])],2))}}),[["__scopeId","data-v-00deaee7"]]),XKn={class:"bar-button-text"},Qst=_d(ee.defineComponent({__name:"bar-button",props:{icon:{},color:{},text:{}},emits:["click"],setup(t,{emit:r}){ee.useCssVars(l=>({"5ec4534a":l.color}));const i=r,o=t;return(l,f)=>(ee.openBlock(),ee.createElementBlock("div",{class:"bar-button",onClick:f[0]||(f[0]=h=>i("click"))},[ee.createElementVNode("i",{class:ee.normalizeClass(["bkai-icon",o.icon])},null,2),ee.createElementVNode("span",XKn,ee.toDisplayString(o.text),1)]))}}),[["__scopeId","data-v-8ce57e71"]]),eXn={class:"ai-cite"},tXn={class:"content"},Gst=_d(ee.defineComponent({__name:"ai-cite",props:{text:{},showCloseIcon:{type:Boolean}},emits:["close"],setup(t){const r=t,i=ee.ref(null);ee.watch(()=>r.text,()=>{i.value&&h(i.value),ee.nextTick(()=>{g()})});const o=ee.ref(null),l=m=>m.scrollWidth>m.clientWidth,{createTooltip:f,destroyInstance:h}=YN({arrow:!0,delay:[0,0]}),g=()=>{if(o.value){const m=o.value;l(m)&&(i.value=f(m,r.text,{appendTo:document.querySelector(".ai-blueking-container-wrapper")}))}};return ee.onMounted(()=>{ee.nextTick(()=>{g()})}),(m,y)=>ee.withDirectives((ee.openBlock(),ee.createElementBlock("section",eXn,[ee.createElementVNode("span",tXn,[ee.createElementVNode("span",{class:ee.normalizeClass(["content-text",{"show-close-icon":m.showCloseIcon}])},[y[1]||(y[1]=ee.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),ee.createElementVNode("span",{ref_key:"citeTextRef",ref:o,class:"ai-cite-text"},ee.toDisplayString(m.text),513)],2),m.showCloseIcon?(ee.openBlock(),ee.createElementBlock("i",{key:0,class:"bkai-icon bkai-close-line-2 close-icon",onClick:y[0]||(y[0]=A=>m.$emit("close"))})):ee.createCommentVNode("",!0)])],512)),[[ee.vShow,m.text]])}}),[["__scopeId","data-v-af2b067c"]]);function Yst(t={}){const r=ee.ref(!1);return{isComposing:r,handleCompositionStart:()=>{r.value=!0},handleCompositionEnd:()=>{r.value=!1},handleEnter:g=>{const{isLoading:m,onSend:y,getInputValue:A=()=>"",clearInput:x=()=>{}}=t;if(g.shiftKey)return;g.preventDefault();const T=A();m!=null&&m.value||!T.trim()||r.value||(y==null||y(T),x())},handleSend:()=>{const{onSend:g,getInputValue:m=()=>"",clearInput:y=()=>{}}=t,A=m();A.trim()&&(g==null||g(A),y())},handleStop:()=>{const{onStop:g}=t;g==null||g()}}}const Ust="enablePopup";function bye(){return{enablePopup:ee.inject(Ust,!0)}}const EH=ee.ref(""),Jst=ee.ref(""),vye=ee.ref(!1),yye={width:80,height:34,offset:15,debounceTime:300};function OH(t){const r=ee.ref(!1),i=ee.ref({top:"0px",left:"0px"});let o,l=null;const f=ee.ref(null);let h=!1,g=null;const m=R=>{g={x:R.clientX,y:R.clientY}},y=R=>{l=R,g&&(h=Math.sqrt(Math.pow(R.clientX-g.x,2)+Math.pow(R.clientY-g.y,2))>5),g=null},A=(R,F)=>{const H=window.innerWidth,{width:$,height:Q,offset:Y}=yye;let V=R+window.scrollX-$/2;V=Math.max(Y,Math.min(V,H-$-Y));let U=F+window.scrollY-Q-Y;return F<=Q+Y&&(U=F+window.scrollY+Y),{top:`${U}px`,left:`${V}px`}},x=R=>{const F=window.innerWidth,{width:H,height:$,offset:Q}=yye;let Y=R.left+window.scrollX+R.width/2-H/2;Y=Math.max(Q,Math.min(Y,F-H-Q));let V=R.top+window.scrollY-$-Q;return R.top<=$+Q&&(V=R.bottom+window.scrollY+Q),{top:`${V}px`,left:`${Y}px`}},T=(R,F)=>{let H=R;for(;H&&H!==document.documentElement;){if(H.hasAttribute&&H.hasAttribute(F))return!0;H=H.parentElement}return!1},C=()=>{clearTimeout(o);const R=window.getSelection();if(!(R!=null&&R.toString().trim())){S();return}const F=R.getRangeAt(0);o=setTimeout(()=>{var Y,V,U,_;if((Y=F.commonAncestorContainer.parentElement)!=null&&Y.closest(".ai-blueking-wrapper")){S();return}const H=F.commonAncestorContainer,$=H.nodeType===Node.ELEMENT_NODE?H:H.parentElement;if(T($,"ai-blueking-hide")){S();return}vye.value=!1,EH.value=R.toString().trim();const Q=document.activeElement;if((Q==null?void 0:Q.tagName)==="TEXTAREA"){if(!l){S();return}const{clientX:W,clientY:z}=l;i.value=A(W,z),r.value=!0,l=null}else{let W=F.getBoundingClientRect();const z=(V=F.commonAncestorContainer.firstChild)==null?void 0:V.shadowRoot;if(z&&(W=((_=(U=z.getSelection())==null?void 0:U.getRangeAt(0))==null?void 0:_.getBoundingClientRect())||W),!W.width||!W.height){S();return}i.value=x(W),r.value=!0}},yye.debounceTime)},S=()=>{r.value=!1,vye.value||(EH.value="")},E=R=>{var Q,Y,V;const F=R.target,H=((Q=F.classList)==null?void 0:Q.contains("ai-blueking-tag-text"))||((Y=F.classList)==null?void 0:Y.contains("shortcut-btn")),$=(V=f.value)==null?void 0:V.contains(F);if(!(H||!h)){if(h){R.preventDefault(),R.stopPropagation(),h=!1;return}$||(S(),O())}},O=()=>{const R=window.getSelection();R&&R.removeAllRanges(),EH.value=""},D=R=>{EH.value=R},j=R=>{Jst.value=R};return ee.onMounted(()=>{t&&(document.addEventListener("selectionchange",C),document.addEventListener("mousedown",m),document.addEventListener("mouseup",y),document.addEventListener("click",E,!0))}),ee.onBeforeUnmount(()=>{t&&(document.removeEventListener("selectionchange",C),document.removeEventListener("mousedown",m),document.removeEventListener("mouseup",y),document.removeEventListener("click",E,!0)),clearTimeout(o)}),{isIconVisible:r,iconPosition:i,selectedText:EH,citeText:Jst,hideIcon:S,clearSelection:O,setSelection:D,setCiteText:j,lockSelectedText:vye,popupRef:f}}function nXn(t={}){const{minHeight:r=68,maxHeight:i=248,defaultHeight:o=68}=t,l=ee.ref(o),f=ee.ref(),h=()=>{if(!f.value)return;f.value.style.height=`${r}px`;const y=f.value.scrollHeight;l.value=Math.min(Math.max(y,r),i)};return{textareaHeight:l,textareaRef:f,updateHeight:h,resetHeight:()=>{l.value=o},bindTextarea:y=>{f.value=y,h()}}}function Wst(t,r,i=ee.ref(null),o={}){const l=ee.ref([]),f=ee.ref([]),{theme:h="ai-blueking-light light",placement:g="bottom",trigger:m="mouseenter",interactive:y=!0,allowHTML:A=!0,arrow:x=!0,offset:T=[0,4],onItemClick:C}=o,{createTooltip:S,destroyAll:E}=YN({theme:h,placement:g,trigger:m,interactive:y,allowHTML:A,arrow:x,offset:T}),O=ee.computed(()=>f.value.length===0?"":`<div class="tippy-dropdown-menu">${f.value.map(H=>`<div class="tippy-menu-item" data-item-id="${H.id}">
|
|
726
726
|
${H.icon?`<i class="${H.icon}"></i>`:""}
|
|
727
727
|
<span>${H.name}</span>
|
|
728
728
|
</div>`).join("")}</div>`),D=async()=>{var te;const F=t.value;if(!F)return;l.value=[...r.value],f.value=[],await ee.nextTick();const H=F.clientWidth,$=Array.from(F.children),Q=window.getComputedStyle(F),Y=parseFloat(Q.gap)||0;let V=0;if($.forEach((X,oe)=>{V+=X.getBoundingClientRect().width,oe<$.length-1&&(V+=Y)}),V<=H)return;const U=((te=i.value)==null?void 0:te.offsetWidth)||70,_=H-U;let W=0,z=-1;for(let X=0;X<$.length;X++){const oe=$[X];if(W+=oe.getBoundingClientRect().width,X<$.length-1&&(W+=Y),W>_){z=X;break}}z===-1&&(z=r.value.length),l.value=r.value.slice(0,z),f.value=r.value.slice(z)};ee.watch(()=>r.value,()=>{requestAnimationFrame(D)},{deep:!0,immediate:!0}),ee.watch(()=>f.value,F=>{ee.nextTick(()=>{F.length>0&&i.value?(E(),S(i.value,O.value,{onShow:()=>{setTimeout(()=>{document.querySelectorAll(".tippy-menu-item").forEach($=>{$.addEventListener("click",j)})},0)},onHide:()=>{document.querySelectorAll(".tippy-menu-item").forEach($=>{$.removeEventListener("click",j)})}})):E()})},{immediate:!0});const j=F=>{const $=F.currentTarget.dataset.itemId,Q=f.value.find(Y=>Y.id===$);Q&&C&&C(Q)};let R=null;return ee.onMounted(()=>{t.value&&(R=new ResizeObserver(()=>{requestAnimationFrame(D)}),R.observe(t.value))}),ee.onBeforeUnmount(()=>{R&&t.value&&R.unobserve(t.value),E()}),{visibleItems:l,hiddenItems:f,calculateVisibleItems:D}}const rXn={class:"ai-selected-box"},iXn={class:"ai-selected-tip"},aXn={class:"ai-selected-tip-text"},oXn={class:"ai-selected-box-content"},sXn=["onClick"],cXn=_d(ee.defineComponent({__name:"ai-selected-box",props:{selectedText:{},actions:{}},emits:["shortcut-click"],setup(t,{emit:r}){const i=r,o=t,{clearSelection:l}=OH(!0),f=ee.ref(null),h=ee.ref(null),g=ee.computed(()=>o.actions),{visibleItems:m,hiddenItems:y}=Wst(f,g,h,{theme:"ai-blueking-light light",placement:"top",trigger:"mouseenter",interactive:!0,allowHTML:!0,arrow:!0,offset:[0,4],onItemClick:x=>{i("shortcut-click",{shortcut:x,source:"ai-selected"})}}),A=x=>{i("shortcut-click",{shortcut:x,source:"ai-selected"})};return(x,T)=>(ee.openBlock(),ee.createElementBlock("div",rXn,[ee.createElementVNode("i",{class:"bkai-icon bkai-close-circle-shape",onClick:T[0]||(T[0]=(...C)=>ee.unref(l)&&ee.unref(l)(...C))}),ee.createElementVNode("div",iXn,[T[1]||(T[1]=ee.createElementVNode("i",{class:"bkai-icon bkai-yinyong"},null,-1)),ee.createElementVNode("span",aXn,ee.toDisplayString(ee.unref(_o)("已框选内容")),1)]),ee.createElementVNode("div",oXn,ee.toDisplayString(o.selectedText),1),ee.createElementVNode("div",{ref_key:"actionsContainerRef",ref:f,class:"ai-selected-box-actions"},[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(ee.unref(m),C=>(ee.openBlock(),ee.createElementBlock("div",{key:C.id,class:"ai-selected-box-action",onClick:S=>A(C)},[ee.createElementVNode("i",{class:ee.normalizeClass(["bkai-icon",C.icon])},null,2),ee.createElementVNode("span",null,ee.toDisplayString(C.name),1)],8,sXn))),128)),ee.unref(y).length>0?(ee.openBlock(),ee.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:h,class:"ai-selected-box-action more-container"},[...T[2]||(T[2]=[ee.createElementVNode("span",null,"更多",-1),ee.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)])],512)):ee.createCommentVNode("",!0)],512)]))}}),[["__scopeId","data-v-42b29188"]]),lXn={class:"bkai-prompt-list-search"},uXn={class:"bkai-prompt-list-content"},fXn={key:0,class:"bkai-prompt-list-empty"},hXn=["onClick","onMouseover"],dXn=_d(ee.defineComponent({__name:"prompt-list",props:{prompts:{},show:{type:Boolean}},emits:["select","height-change","update:show"],setup(t,{expose:r,emit:i}){const o=t,l=i,f=ee.ref(""),h=ee.ref(null),g=ee.ref(null),m=ee.computed(()=>f.value.trim()?o.prompts.filter(E=>E.toLowerCase().includes(f.value.toLowerCase())):o.prompts);ee.watch(()=>o.show,E=>{E&&ee.nextTick(()=>{g.value=null})});const y=E=>{l("select",E),l("update:show",!1),f.value=""},A=()=>{m.value.length&&(g.value===null||g.value===m.value.length-1?g.value=0:g.value++,C())},x=()=>{m.value.length&&(g.value===null||g.value===0?g.value=m.value.length-1:g.value--,C())},T=()=>!m.value.length||g.value===null?!1:(y(m.value[g.value]),!0),C=()=>{if(g.value===null||!h.value)return;const E=h.value.querySelector(".bkai-prompt-list-content");if(!E)return;const O=E.children[g.value];if(!O)return;const D=E.getBoundingClientRect(),j=O.getBoundingClientRect();j.top<D.top?E.scrollTop=O.offsetTop:j.bottom>D.bottom&&(E.scrollTop=O.offsetTop+O.offsetHeight-E.clientHeight)};let S=null;return ee.onMounted(()=>{h.value&&(S=new ResizeObserver(E=>{for(const O of E)l("height-change",O.contentRect.height)}),S.observe(h.value))}),ee.onBeforeUnmount(()=>{S&&h.value&&(S.unobserve(h.value),S.disconnect())}),r({handleArrowDown:A,handleArrowUp:x,handleEnter:T}),(E,O)=>ee.withDirectives((ee.openBlock(),ee.createElementBlock("div",{ref_key:"promptListEl",ref:h,class:"bkai-prompt-list"},[ee.createElementVNode("div",lXn,[ee.createVNode(ee.unref(p$),{modelValue:f.value,"onUpdate:modelValue":O[0]||(O[0]=D=>f.value=D),behavior:"simplicity",placeholder:"请输入关键词"},null,8,["modelValue"])]),ee.createElementVNode("div",uXn,[m.value.length===0?(ee.openBlock(),ee.createElementBlock("div",fXn,ee.toDisplayString(ee.unref(_o)("无匹配结果")),1)):(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,{key:1},ee.renderList(m.value,(D,j)=>(ee.openBlock(),ee.createElementBlock("div",{key:D,style:{overflow:"hidden"},class:ee.normalizeClass(["bkai-prompt-list-item",{active:g.value===j}]),onClick:R=>y(D),onMouseleave:O[1]||(O[1]=R=>g.value=null),onMouseover:R=>g.value=j},ee.toDisplayString(D),43,hXn))),128))])],512)),[[ee.vShow,E.show]])}}),[["__scopeId","data-v-64af2ecb"]]),pXn=["onClick"],gXn={class:"shortcut-text"},mXn=_d(ee.defineComponent({__name:"shortcuts-bar",props:{shortcuts:{}},emits:["shortcut-click"],setup(t,{emit:r}){const i=t,o=r,l=ee.ref(null),f=ee.ref(null),h=ee.computed(()=>i.shortcuts),{visibleItems:g,hiddenItems:m}=Wst(l,h,f,{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)=>(ee.openBlock(),ee.createElementBlock("div",{ref_key:"containerRef",ref:l,class:"shortcuts-bar"},[(ee.openBlock(!0),ee.createElementBlock(ee.Fragment,null,ee.renderList(ee.unref(g),x=>(ee.openBlock(),ee.createElementBlock("div",{key:x.id,class:"shortcut-item",onClick:T=>o("shortcut-click",{shortcut:x,source:"main"})},[ee.createElementVNode("i",{class:ee.normalizeClass(x.icon)},null,2),ee.createElementVNode("span",gXn,ee.toDisplayString(x.name),1)],8,pXn))),128)),ee.unref(m).length>0?(ee.openBlock(),ee.createElementBlock("div",{key:0,ref_key:"moreButtonRef",ref:f,class:"shortcut-item more-container"},[...A[0]||(A[0]=[ee.createElementVNode("span",{class:"shortcut-text"},"更多",-1),ee.createElementVNode("i",{class:"bkai-icon bkai-angle-down"},null,-1)])],512)):ee.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-e115e445"]]),bXn={class:"chat-input-box"},vXn={key:0,class:"cite"},yXn=["disabled","placeholder"],wXn={class:"input-tools"},AXn=_d(ee.defineComponent({__name:"chat-input-box",props:{shortcuts:{default:()=>[]},conversationSettings:{},loading:{type:Boolean},prompts:{},disabled:{type:Boolean},placeholder:{default:()=>_o(`输入 "/" 唤出 Prompt
|
package/dist/vue2/{journeyDiagram-49397b02-DJDl7LNc.mjs → journeyDiagram-49397b02-gs-JAB_g.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 "./vue2-
|
|
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 "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-08f97a94-CFlqDMU1.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
|
-
import { a as Q } from "./arc-
|
|
4
|
+
import { a as Q } from "./arc-D70f0dEE.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 "./vue2-
|
|
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-BexrzQi5.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 "./vue2-D3e7cygv.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 "./vue2-
|
|
1
|
+
import { Y as un, Z as I, _ as Y, $ as fn, a0 as Z } from "./vue2-D3e7cygv.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,5 +1,5 @@
|
|
|
1
|
-
import { ao as ro, an as yv, l as Nr, aq as mv, ar as bv, as as wv, g as ao, P as Ev, o as xv, V as En, i as xn, d as Tv, U as Cv } from "./vue2-
|
|
2
|
-
import { a as Dv } from "./createText-2e5e7dd3-
|
|
1
|
+
import { ao as ro, an as yv, l as Nr, aq as mv, ar as bv, as as wv, g as ao, P as Ev, o as xv, V as En, i as xn, d as Tv, U as Cv } from "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { a as Dv } from "./createText-2e5e7dd3-B_kyXJyC.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
function Ns(t, e) {
|
|
5
5
|
(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 "./vue2-
|
|
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 "./vue2-D3e7cygv.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
|
-
import { a as tt } from "./arc-
|
|
3
|
+
import { a as tt } from "./arc-D70f0dEE.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/vue2/{quadrantDiagram-120e2f19-CX8Ui8m0.mjs → quadrantDiagram-120e2f19-DtO8qGtH.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 "./vue2-
|
|
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 "./vue2-D3e7cygv.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
|
-
import { l as mt } from "./linear-
|
|
3
|
+
import { l as mt } from "./linear-Bz1tAB87.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 "./vue2-
|
|
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 "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { G as Ue } from "./graph-BexrzQi5.mjs";
|
|
3
|
+
import { l as Be } from "./layout-DQXr-uz9.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as Qe } from "./line-
|
|
5
|
+
import { l as Qe } from "./line-C3ItzrSr.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/vue2/{sankeyDiagram-04a897e0-rW_i6Lax.mjs → sankeyDiagram-04a897e0-pUaKUyx_.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, ap as wt, d as G, o as St, E as Lt, k as Et } from "./vue2-
|
|
1
|
+
import { D as mt, C as kt, s as _t, a as xt, c as vt, b as bt, g as rt, ap as wt, d as G, o as St, E as Lt, k as Et } from "./vue2-D3e7cygv.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/vue2/{sequenceDiagram-704730f1-L6kjK98B.mjs → sequenceDiagram-704730f1-HB5zXYCo.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 "./vue2-
|
|
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 "./vue2-D3e7cygv.mjs";
|
|
2
|
+
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./svgDrawCommon-08f97a94-CFlqDMU1.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
var Yt = function() {
|
|
5
5
|
var t = function(dt, w, k, L) {
|
package/dist/{vue3/stateDiagram-587899a1-B3SoKQva.mjs → vue2/stateDiagram-587899a1-C8u8_pf1.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-XCPHVlr6.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 "./vue2-D3e7cygv.mjs";
|
|
3
|
+
import { G as C } from "./graph-BexrzQi5.mjs";
|
|
4
|
+
import { l as F } from "./layout-DQXr-uz9.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { l as $ } from "./line-
|
|
6
|
+
import { l as $ } from "./line-C3ItzrSr.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;
|