@blueking/ai-blueking 2.0.0-dev.30 → 2.0.0-dev.32
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/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts +2 -2
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/manager/business/chat-business-manager.d.ts +6 -1
- package/dist/manager/business/chat-business-manager.d.ts.map +1 -1
- package/dist/manager/business/share-business-manager.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +1091 -1026
- package/dist/vue2/index.iife.min.js +13 -13
- package/dist/vue2/index.umd.min.js +29 -29
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +849 -784
- package/dist/vue3/index.iife.min.js +14 -14
- package/dist/vue3/index.umd.min.js +29 -29
- package/dist/vue3/style.css +1 -1
- package/package.json +2 -2
|
@@ -71,6 +71,7 @@ const isImageFile = (e) => e ? e.startsWith("image/") : !1, getFilePreviewUrl =
|
|
|
71
71
|
复制失败: "Copy Failed",
|
|
72
72
|
返回底部: "Return to bottom",
|
|
73
73
|
停止生成: "Stop generating",
|
|
74
|
+
正在停止: "Stopping",
|
|
74
75
|
耗时: "Duration",
|
|
75
76
|
参数: "Parameters",
|
|
76
77
|
描述: "Description",
|
|
@@ -123,7 +124,8 @@ const isImageFile = (e) => e ? e.startsWith("image/") : !1, getFilePreviewUrl =
|
|
|
123
124
|
重新加载: "Reload",
|
|
124
125
|
宽: "W",
|
|
125
126
|
高: "H",
|
|
126
|
-
上传图片: "Upload Image"
|
|
127
|
+
上传图片: "Upload Image",
|
|
128
|
+
"上传图片, 最多支持上传 3 个, 最大支持 2.4MB": "Upload Image, up to 3 images supported, max 2.4MB each"
|
|
127
129
|
}, t$1 = (e) => isEn ? lang$1[e] : e, CHAT_Z_INDEX = 9999;
|
|
128
130
|
CHAT_Z_INDEX + 1;
|
|
129
131
|
const EDITOR_MENU_Z_INDEX = 10001, SHORTCUT_MENU_Z_INDEX = EDITOR_MENU_Z_INDEX + 1, SELECTION_Z_INDEX = SHORTCUT_MENU_Z_INDEX + 1, CONST_MESSAGE_TOOLS = [
|
|
@@ -700,7 +702,7 @@ const AgentIcon = h("svg", {
|
|
|
700
702
|
name: t$1("问问小鲸"),
|
|
701
703
|
icon: () => AIBluekingIcon
|
|
702
704
|
}];
|
|
703
|
-
var _hoisted_1$
|
|
705
|
+
var _hoisted_1$44 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
|
|
704
706
|
__name: "shortcut-btn",
|
|
705
707
|
props: {
|
|
706
708
|
mode: {},
|
|
@@ -722,7 +724,7 @@ var _hoisted_1$45 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
722
724
|
key: 0,
|
|
723
725
|
class: "ai-common-icon ai-shortcut-btn-icon",
|
|
724
726
|
src: e.shortcut.icon
|
|
725
|
-
}, null, 8, _hoisted_1$
|
|
727
|
+
}, null, 8, _hoisted_1$44)) : createCommentVNode("v-if", !0), createElementVNode("span", { class: normalizeClass(e.shortcut.icon) }, null, 2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(typeof e.shortcut?.icon == "function" ? e.shortcut.icon?.(h) : e.shortcut.icon), {
|
|
726
728
|
key: 1,
|
|
727
729
|
class: "ai-shortcut-btn-icon"
|
|
728
730
|
}))], 64)) : e.shortcut && !e.shortcut.components?.length ? (openBlock(), createBlock(unref(AgentIcon), {
|
|
@@ -730,7 +732,7 @@ var _hoisted_1$45 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
730
732
|
class: "ai-shortcut-btn-icon"
|
|
731
733
|
})) : createCommentVNode("v-if", !0), createTextVNode(" " + toDisplayString(e.shortcut?.alias || e.shortcut?.name), 1)]), renderSlot(n.$slots, "append")], 2));
|
|
732
734
|
}
|
|
733
|
-
}), _hoisted_1$
|
|
735
|
+
}), _hoisted_1$43 = { class: "ai-selection-popover-content" }, _hoisted_2$32 = {
|
|
734
736
|
key: 0,
|
|
735
737
|
class: "shortcut-menu"
|
|
736
738
|
}, ai_selection_default = /* @__PURE__ */ defineComponent({
|
|
@@ -832,14 +834,14 @@ var _hoisted_1$45 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
832
834
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
833
835
|
}, B = (e) => {
|
|
834
836
|
z(), a("selectShortcut", e, E.value);
|
|
835
|
-
}, H = null,
|
|
837
|
+
}, H = null, r_ = (e) => {
|
|
836
838
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
837
839
|
L();
|
|
838
840
|
}, e);
|
|
839
841
|
}, G = () => {
|
|
840
|
-
|
|
842
|
+
r_(200);
|
|
841
843
|
}, q = () => {
|
|
842
|
-
|
|
844
|
+
r_(300);
|
|
843
845
|
}, J = (e) => {
|
|
844
846
|
i.value && l.value?.contains(e.target) || z();
|
|
845
847
|
}, Z = (e) => {
|
|
@@ -863,7 +865,7 @@ var _hoisted_1$45 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
863
865
|
zIndex: unref(SELECTION_Z_INDEX)
|
|
864
866
|
}),
|
|
865
867
|
onMousedown: r[2] ||= withModifiers(() => {}, ["stop"])
|
|
866
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
868
|
+
}, [createElementVNode("div", _hoisted_1$43, [renderSlot(n.$slots, "default", { shortcuts: e.shortcuts }, () => [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.shortcuts.slice(0, e.maxShortcutCount), (n, r) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [r < e.maxShortcutCount ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
867
869
|
key: 0,
|
|
868
870
|
shortcut: n,
|
|
869
871
|
onClick: (e) => B(n)
|
|
@@ -935,7 +937,7 @@ const useObserverVisibleList = (e, n, r) => {
|
|
|
935
937
|
calculateVisibleMenuItems: a
|
|
936
938
|
};
|
|
937
939
|
};
|
|
938
|
-
var _hoisted_1$
|
|
940
|
+
var _hoisted_1$42 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
|
|
939
941
|
__name: "shortcut-btns",
|
|
940
942
|
props: { shortcuts: {} },
|
|
941
943
|
emits: ["selectShortcut"],
|
|
@@ -987,7 +989,7 @@ var _hoisted_1$43 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
987
989
|
j.value = !1;
|
|
988
990
|
}
|
|
989
991
|
}, {
|
|
990
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
992
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$42, [(openBlock(!0), createElementBlock(Fragment, null, renderList(k.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
|
|
991
993
|
key: e.id,
|
|
992
994
|
mode: "menu",
|
|
993
995
|
shortcut: e,
|
|
@@ -1005,7 +1007,7 @@ var _hoisted_1$43 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1005
1007
|
_: 1
|
|
1006
1008
|
}, 8, ["append-to", "z-index"])) : createCommentVNode("v-if", !0)], 512));
|
|
1007
1009
|
}
|
|
1008
|
-
}), _hoisted_1$
|
|
1010
|
+
}), _hoisted_1$41 = { class: "shortcut-render" }, _hoisted_2$31 = { class: "shortcut-render-header" }, _hoisted_3$22 = { class: "header-name" }, _hoisted_4$21 = { class: "shortcut-render-content" }, _hoisted_5$14 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
|
|
1009
1011
|
__name: "shortcut-render",
|
|
1010
1012
|
props: {
|
|
1011
1013
|
alias: {},
|
|
@@ -1074,7 +1076,7 @@ var _hoisted_1$43 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1074
1076
|
}, j = () => {
|
|
1075
1077
|
i("close");
|
|
1076
1078
|
};
|
|
1077
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1079
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$41, [createElementVNode("div", _hoisted_2$31, [
|
|
1078
1080
|
createVNode(unref(ThinkingIcon), { class: "header-icon" }),
|
|
1079
1081
|
createElementVNode("span", _hoisted_3$22, toDisplayString(e.alias || e.name), 1),
|
|
1080
1082
|
createVNode(unref(CloseIcon), {
|
|
@@ -1218,17 +1220,17 @@ var _hoisted_1$43 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1218
1220
|
}
|
|
1219
1221
|
function H() {
|
|
1220
1222
|
var e = i();
|
|
1221
|
-
if (B(e)) return
|
|
1223
|
+
if (B(e)) return r_(e);
|
|
1222
1224
|
v = setTimeout(H, z(e));
|
|
1223
1225
|
}
|
|
1224
|
-
function
|
|
1226
|
+
function r_(e) {
|
|
1225
1227
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1226
1228
|
}
|
|
1227
1229
|
function G() {
|
|
1228
1230
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1229
1231
|
}
|
|
1230
1232
|
function K() {
|
|
1231
|
-
return v === void 0 ? _ :
|
|
1233
|
+
return v === void 0 ? _ : r_(i());
|
|
1232
1234
|
}
|
|
1233
1235
|
function q() {
|
|
1234
1236
|
var e = i(), r = B(e);
|
|
@@ -4926,7 +4928,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4926
4928
|
return a;
|
|
4927
4929
|
}).map((e) => `(${e})`).join(n);
|
|
4928
4930
|
}
|
|
4929
|
-
var
|
|
4931
|
+
var r_ = /\b\B/, G = "[a-zA-Z]\\w*", K = "[a-zA-Z_]\\w*", q = "\\b\\d+(\\.\\d+)?", J = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", i_ = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", a_ = (e = {}) => {
|
|
4930
4932
|
let n = /^#![ ]*\//;
|
|
4931
4933
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4932
4934
|
scope: "meta",
|
|
@@ -4940,7 +4942,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4940
4942
|
}, Q = {
|
|
4941
4943
|
begin: "\\\\[\\s\\S]",
|
|
4942
4944
|
relevance: 0
|
|
4943
|
-
},
|
|
4945
|
+
}, o_ = {
|
|
4944
4946
|
scope: "string",
|
|
4945
4947
|
begin: "'",
|
|
4946
4948
|
end: "'",
|
|
@@ -4952,7 +4954,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4952
4954
|
end: "\"",
|
|
4953
4955
|
illegal: "\\n",
|
|
4954
4956
|
contains: [Q]
|
|
4955
|
-
},
|
|
4957
|
+
}, s_ = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, c_ = function(e, n, r = {}) {
|
|
4956
4958
|
let i = o({
|
|
4957
4959
|
scope: "comment",
|
|
4958
4960
|
begin: e,
|
|
@@ -4968,19 +4970,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4968
4970
|
});
|
|
4969
4971
|
let a = I("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
4970
4972
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4971
|
-
},
|
|
4973
|
+
}, l_ = c_("//", "$"), u_ = c_("/\\*", "\\*/"), d_ = c_("#", "$"), f_ = {
|
|
4972
4974
|
scope: "number",
|
|
4973
4975
|
begin: q,
|
|
4974
4976
|
relevance: 0
|
|
4975
|
-
},
|
|
4977
|
+
}, p_ = {
|
|
4976
4978
|
scope: "number",
|
|
4977
4979
|
begin: J,
|
|
4978
4980
|
relevance: 0
|
|
4979
|
-
},
|
|
4981
|
+
}, m_ = {
|
|
4980
4982
|
scope: "number",
|
|
4981
|
-
begin:
|
|
4983
|
+
begin: i_,
|
|
4982
4984
|
relevance: 0
|
|
4983
|
-
},
|
|
4985
|
+
}, h_ = {
|
|
4984
4986
|
scope: "regexp",
|
|
4985
4987
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4986
4988
|
end: /\/[gimuy]*/,
|
|
@@ -4990,27 +4992,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4990
4992
|
relevance: 0,
|
|
4991
4993
|
contains: [Q]
|
|
4992
4994
|
}]
|
|
4993
|
-
},
|
|
4995
|
+
}, g_ = {
|
|
4994
4996
|
scope: "title",
|
|
4995
4997
|
begin: G,
|
|
4996
4998
|
relevance: 0
|
|
4997
|
-
},
|
|
4999
|
+
}, __ = {
|
|
4998
5000
|
scope: "title",
|
|
4999
5001
|
begin: K,
|
|
5000
5002
|
relevance: 0
|
|
5001
|
-
},
|
|
5003
|
+
}, v_ = {
|
|
5002
5004
|
begin: "\\.\\s*" + K,
|
|
5003
5005
|
relevance: 0
|
|
5004
|
-
},
|
|
5006
|
+
}, y_ = /* @__PURE__ */ Object.freeze({
|
|
5005
5007
|
__proto__: null,
|
|
5006
|
-
APOS_STRING_MODE:
|
|
5008
|
+
APOS_STRING_MODE: o_,
|
|
5007
5009
|
BACKSLASH_ESCAPE: Q,
|
|
5008
|
-
BINARY_NUMBER_MODE:
|
|
5009
|
-
BINARY_NUMBER_RE:
|
|
5010
|
-
COMMENT:
|
|
5011
|
-
C_BLOCK_COMMENT_MODE:
|
|
5012
|
-
C_LINE_COMMENT_MODE:
|
|
5013
|
-
C_NUMBER_MODE:
|
|
5010
|
+
BINARY_NUMBER_MODE: m_,
|
|
5011
|
+
BINARY_NUMBER_RE: i_,
|
|
5012
|
+
COMMENT: c_,
|
|
5013
|
+
C_BLOCK_COMMENT_MODE: u_,
|
|
5014
|
+
C_LINE_COMMENT_MODE: l_,
|
|
5015
|
+
C_NUMBER_MODE: p_,
|
|
5014
5016
|
C_NUMBER_RE: J,
|
|
5015
5017
|
END_SAME_AS_BEGIN: function(e) {
|
|
5016
5018
|
return Object.assign(e, {
|
|
@@ -5022,43 +5024,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5022
5024
|
}
|
|
5023
5025
|
});
|
|
5024
5026
|
},
|
|
5025
|
-
HASH_COMMENT_MODE:
|
|
5027
|
+
HASH_COMMENT_MODE: d_,
|
|
5026
5028
|
IDENT_RE: G,
|
|
5027
|
-
MATCH_NOTHING_RE:
|
|
5028
|
-
METHOD_GUARD:
|
|
5029
|
-
NUMBER_MODE:
|
|
5029
|
+
MATCH_NOTHING_RE: r_,
|
|
5030
|
+
METHOD_GUARD: v_,
|
|
5031
|
+
NUMBER_MODE: f_,
|
|
5030
5032
|
NUMBER_RE: q,
|
|
5031
|
-
PHRASAL_WORDS_MODE:
|
|
5033
|
+
PHRASAL_WORDS_MODE: s_,
|
|
5032
5034
|
QUOTE_STRING_MODE: $,
|
|
5033
|
-
REGEXP_MODE:
|
|
5035
|
+
REGEXP_MODE: h_,
|
|
5034
5036
|
RE_STARTERS_RE: Z,
|
|
5035
|
-
SHEBANG:
|
|
5036
|
-
TITLE_MODE:
|
|
5037
|
+
SHEBANG: a_,
|
|
5038
|
+
TITLE_MODE: g_,
|
|
5037
5039
|
UNDERSCORE_IDENT_RE: K,
|
|
5038
|
-
UNDERSCORE_TITLE_MODE:
|
|
5040
|
+
UNDERSCORE_TITLE_MODE: __
|
|
5039
5041
|
});
|
|
5040
|
-
function
|
|
5042
|
+
function b_(e, n) {
|
|
5041
5043
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
5042
5044
|
}
|
|
5043
|
-
function
|
|
5045
|
+
function x_(e, n) {
|
|
5044
5046
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
5045
5047
|
}
|
|
5046
|
-
function
|
|
5047
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
5048
|
+
function S_(e, n) {
|
|
5049
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = b_, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
5048
5050
|
}
|
|
5049
|
-
function
|
|
5051
|
+
function C_(e, n) {
|
|
5050
5052
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
5051
5053
|
}
|
|
5052
|
-
function
|
|
5054
|
+
function w_(e, n) {
|
|
5053
5055
|
if (e.match) {
|
|
5054
5056
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
5055
5057
|
e.begin = e.match, delete e.match;
|
|
5056
5058
|
}
|
|
5057
5059
|
}
|
|
5058
|
-
function
|
|
5060
|
+
function T_(e, n) {
|
|
5059
5061
|
e.relevance === void 0 && (e.relevance = 1);
|
|
5060
5062
|
}
|
|
5061
|
-
var
|
|
5063
|
+
var E_ = (e, n) => {
|
|
5062
5064
|
if (!e.beforeMatch) return;
|
|
5063
5065
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
5064
5066
|
let r = Object.assign({}, e);
|
|
@@ -5068,7 +5070,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5068
5070
|
relevance: 0,
|
|
5069
5071
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
5070
5072
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
5071
|
-
},
|
|
5073
|
+
}, D_ = [
|
|
5072
5074
|
"of",
|
|
5073
5075
|
"and",
|
|
5074
5076
|
"for",
|
|
@@ -5080,58 +5082,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5080
5082
|
"parent",
|
|
5081
5083
|
"list",
|
|
5082
5084
|
"value"
|
|
5083
|
-
],
|
|
5084
|
-
function
|
|
5085
|
+
], O_ = "keyword";
|
|
5086
|
+
function k_(e, n, r = O_) {
|
|
5085
5087
|
let i = Object.create(null);
|
|
5086
5088
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
5087
|
-
Object.assign(i,
|
|
5089
|
+
Object.assign(i, k_(e[r], n, r));
|
|
5088
5090
|
}), i;
|
|
5089
5091
|
function a(e, r) {
|
|
5090
5092
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
5091
5093
|
let r = n.split("|");
|
|
5092
|
-
i[r[0]] = [e,
|
|
5094
|
+
i[r[0]] = [e, A_(r[0], r[1])];
|
|
5093
5095
|
});
|
|
5094
5096
|
}
|
|
5095
5097
|
}
|
|
5096
|
-
function
|
|
5097
|
-
return n ? Number(n) :
|
|
5098
|
+
function A_(e, n) {
|
|
5099
|
+
return n ? Number(n) : j_(e) ? 0 : 1;
|
|
5098
5100
|
}
|
|
5099
|
-
function
|
|
5100
|
-
return
|
|
5101
|
+
function j_(e) {
|
|
5102
|
+
return D_.includes(e.toLowerCase());
|
|
5101
5103
|
}
|
|
5102
|
-
var
|
|
5104
|
+
var M_ = {}, N_ = (e) => {
|
|
5103
5105
|
console.error(e);
|
|
5104
|
-
},
|
|
5106
|
+
}, P_ = (e, ...n) => {
|
|
5105
5107
|
console.log(`WARN: ${e}`, ...n);
|
|
5106
|
-
},
|
|
5107
|
-
|
|
5108
|
-
},
|
|
5109
|
-
function
|
|
5108
|
+
}, F_ = (e, n) => {
|
|
5109
|
+
M_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), M_[`${e}/${n}`] = !0);
|
|
5110
|
+
}, I_ = /* @__PURE__ */ Error();
|
|
5111
|
+
function L_(e, n, { key: r }) {
|
|
5110
5112
|
let i = 0, a = e[r], o = {}, s = {};
|
|
5111
5113
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
5112
5114
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
5113
5115
|
}
|
|
5114
|
-
function
|
|
5116
|
+
function R_(e) {
|
|
5115
5117
|
if (Array.isArray(e.begin)) {
|
|
5116
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
5117
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
5118
|
-
|
|
5118
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw N_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), I_;
|
|
5119
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw N_("beginScope must be object"), I_;
|
|
5120
|
+
L_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
5119
5121
|
}
|
|
5120
5122
|
}
|
|
5121
|
-
function
|
|
5123
|
+
function z_(e) {
|
|
5122
5124
|
if (Array.isArray(e.end)) {
|
|
5123
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
5124
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
5125
|
-
|
|
5125
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw N_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), I_;
|
|
5126
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw N_("endScope must be object"), I_;
|
|
5127
|
+
L_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
5126
5128
|
}
|
|
5127
5129
|
}
|
|
5128
|
-
function
|
|
5130
|
+
function B_(e) {
|
|
5129
5131
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5130
5132
|
}
|
|
5131
|
-
function
|
|
5132
|
-
|
|
5133
|
+
function V_(e) {
|
|
5134
|
+
B_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), R_(e), z_(e);
|
|
5133
5135
|
}
|
|
5134
|
-
function
|
|
5136
|
+
function H_(e) {
|
|
5135
5137
|
function n(n, r) {
|
|
5136
5138
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5137
5139
|
}
|
|
@@ -5193,18 +5195,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5193
5195
|
let o = r;
|
|
5194
5196
|
if (r.isCompiled) return o;
|
|
5195
5197
|
[
|
|
5196
|
-
|
|
5197
|
-
E_,
|
|
5198
|
-
U_,
|
|
5199
|
-
O_
|
|
5200
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5198
|
+
x_,
|
|
5201
5199
|
w_,
|
|
5202
|
-
|
|
5203
|
-
|
|
5200
|
+
V_,
|
|
5201
|
+
E_
|
|
5202
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5203
|
+
S_,
|
|
5204
|
+
C_,
|
|
5205
|
+
T_
|
|
5204
5206
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5205
5207
|
let l = null;
|
|
5206
|
-
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&=
|
|
5207
|
-
return
|
|
5208
|
+
return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= k_(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
|
|
5209
|
+
return W_(e === "self" ? r : e);
|
|
5208
5210
|
})), r.contains.forEach(function(e) {
|
|
5209
5211
|
s(e, o);
|
|
5210
5212
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5212,19 +5214,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5212
5214
|
if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
5213
5215
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5214
5216
|
}
|
|
5215
|
-
function
|
|
5216
|
-
return e ? e.endsWithParent ||
|
|
5217
|
+
function U_(e) {
|
|
5218
|
+
return e ? e.endsWithParent || U_(e.starts) : !1;
|
|
5217
5219
|
}
|
|
5218
|
-
function
|
|
5220
|
+
function W_(e) {
|
|
5219
5221
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5220
5222
|
return o(e, { variants: null }, n);
|
|
5221
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5223
|
+
})), e.cachedVariants ? e.cachedVariants : U_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5222
5224
|
}
|
|
5223
|
-
var
|
|
5225
|
+
var G_ = "11.11.1", K_ = class extends Error {
|
|
5224
5226
|
constructor(e, n) {
|
|
5225
5227
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5226
5228
|
}
|
|
5227
|
-
},
|
|
5229
|
+
}, q_ = a, J_ = o, Y_ = Symbol("nomatch"), X_ = 7, Z_ = function(e) {
|
|
5228
5230
|
let n = Object.create(null), a = Object.create(null), o = [], s = !0, l = "Could not find the language '{}', did you forget to load/include a language module?", u = {
|
|
5229
5231
|
disableAutodetect: !0,
|
|
5230
5232
|
name: "Plain text",
|
|
@@ -5247,21 +5249,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5247
5249
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5248
5250
|
let r = d.languageDetectRe.exec(n);
|
|
5249
5251
|
if (r) {
|
|
5250
|
-
let n =
|
|
5251
|
-
return n || (
|
|
5252
|
+
let n = o_(r[1]);
|
|
5253
|
+
return n || (P_(l.replace("{}", r[1])), P_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5252
5254
|
}
|
|
5253
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5255
|
+
return n.split(/\s+/).find((e) => m(e) || o_(e));
|
|
5254
5256
|
}
|
|
5255
5257
|
function v(e, n, r) {
|
|
5256
5258
|
let i = "", a = "";
|
|
5257
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5259
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (F_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), F_("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
|
|
5258
5260
|
let o = {
|
|
5259
5261
|
code: i,
|
|
5260
5262
|
language: a
|
|
5261
5263
|
};
|
|
5262
|
-
|
|
5264
|
+
d_("before:highlight", o);
|
|
5263
5265
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5264
|
-
return s.code = o.code,
|
|
5266
|
+
return s.code = o.code, d_("after:highlight", s), s;
|
|
5265
5267
|
}
|
|
5266
5268
|
function j(e, r, a, o) {
|
|
5267
5269
|
let u = Object.create(null);
|
|
@@ -5281,7 +5283,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5281
5283
|
let i = q.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5282
5284
|
if (a) {
|
|
5283
5285
|
let [e, o] = a;
|
|
5284
|
-
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <=
|
|
5286
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= X_ && (s_ += o), e.startsWith("_")) r += n[0];
|
|
5285
5287
|
else {
|
|
5286
5288
|
let r = q.classNameAliases[e] || e;
|
|
5287
5289
|
T(n[0], r);
|
|
@@ -5299,9 +5301,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5299
5301
|
Q.addText($);
|
|
5300
5302
|
return;
|
|
5301
5303
|
}
|
|
5302
|
-
e = j(Z.subLanguage, $, !0,
|
|
5304
|
+
e = j(Z.subLanguage, $, !0, a_[Z.subLanguage]), a_[Z.subLanguage] = e._top;
|
|
5303
5305
|
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5304
|
-
Z.relevance > 0 && (
|
|
5306
|
+
Z.relevance > 0 && (s_ += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5305
5307
|
}
|
|
5306
5308
|
function v() {
|
|
5307
5309
|
Z.subLanguage == null ? g() : _(), $ = "";
|
|
@@ -5338,7 +5340,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5338
5340
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5339
5341
|
}
|
|
5340
5342
|
function I(e) {
|
|
5341
|
-
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5343
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (u_ = !0, 0);
|
|
5342
5344
|
}
|
|
5343
5345
|
function L(e) {
|
|
5344
5346
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5347,15 +5349,15 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5347
5349
|
}
|
|
5348
5350
|
function H(e) {
|
|
5349
5351
|
let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
|
|
5350
|
-
if (!a) return
|
|
5352
|
+
if (!a) return Y_;
|
|
5351
5353
|
let o = Z;
|
|
5352
5354
|
Z.endScope && Z.endScope._wrap ? (v(), T(n, Z.endScope._wrap)) : Z.endScope && Z.endScope._multi ? (v(), E(Z.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5353
5355
|
do
|
|
5354
|
-
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (
|
|
5356
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (s_ += Z.relevance), Z = Z.parent;
|
|
5355
5357
|
while (Z !== a.parent);
|
|
5356
5358
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5357
5359
|
}
|
|
5358
|
-
function
|
|
5360
|
+
function r_() {
|
|
5359
5361
|
let e = [];
|
|
5360
5362
|
for (let n = Z; n !== q; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5361
5363
|
e.forEach((e) => Q.openNode(e));
|
|
@@ -5377,33 +5379,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5377
5379
|
throw e.mode = Z, e;
|
|
5378
5380
|
} else if (i.type === "end") {
|
|
5379
5381
|
let e = H(i);
|
|
5380
|
-
if (e !==
|
|
5382
|
+
if (e !== Y_) return e;
|
|
5381
5383
|
}
|
|
5382
5384
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5383
|
-
if (
|
|
5385
|
+
if (l_ > 1e5 && l_ > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5384
5386
|
return $ += o, o.length;
|
|
5385
5387
|
}
|
|
5386
|
-
let q =
|
|
5387
|
-
if (!q) throw
|
|
5388
|
-
let J =
|
|
5389
|
-
|
|
5390
|
-
let $ = "",
|
|
5388
|
+
let q = o_(e);
|
|
5389
|
+
if (!q) throw N_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5390
|
+
let J = H_(q), i_ = "", Z = o || J, a_ = {}, Q = new d.__emitter(d);
|
|
5391
|
+
r_();
|
|
5392
|
+
let $ = "", s_ = 0, c_ = 0, l_ = 0, u_ = !1;
|
|
5391
5393
|
try {
|
|
5392
5394
|
if (q.__emitTokens) q.__emitTokens(r, Q);
|
|
5393
5395
|
else {
|
|
5394
5396
|
for (Z.matcher.considerAll();;) {
|
|
5395
|
-
|
|
5397
|
+
l_++, u_ ? u_ = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = c_;
|
|
5396
5398
|
let e = Z.matcher.exec(r);
|
|
5397
5399
|
if (!e) break;
|
|
5398
|
-
let n = K(r.substring(
|
|
5399
|
-
|
|
5400
|
+
let n = K(r.substring(c_, e.index), e);
|
|
5401
|
+
c_ = e.index + n;
|
|
5400
5402
|
}
|
|
5401
|
-
K(r.substring(
|
|
5403
|
+
K(r.substring(c_));
|
|
5402
5404
|
}
|
|
5403
|
-
return Q.finalize(),
|
|
5405
|
+
return Q.finalize(), i_ = Q.toHTML(), {
|
|
5404
5406
|
language: e,
|
|
5405
|
-
value:
|
|
5406
|
-
relevance:
|
|
5407
|
+
value: i_,
|
|
5408
|
+
relevance: s_,
|
|
5407
5409
|
illegal: !1,
|
|
5408
5410
|
_emitter: Q,
|
|
5409
5411
|
_top: Z
|
|
@@ -5411,21 +5413,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5411
5413
|
} catch (n) {
|
|
5412
5414
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5413
5415
|
language: e,
|
|
5414
|
-
value:
|
|
5416
|
+
value: q_(r),
|
|
5415
5417
|
illegal: !0,
|
|
5416
5418
|
relevance: 0,
|
|
5417
5419
|
_illegalBy: {
|
|
5418
5420
|
message: n.message,
|
|
5419
|
-
index:
|
|
5420
|
-
context: r.slice(
|
|
5421
|
+
index: c_,
|
|
5422
|
+
context: r.slice(c_ - 100, c_ + 100),
|
|
5421
5423
|
mode: n.mode,
|
|
5422
|
-
resultSoFar:
|
|
5424
|
+
resultSoFar: i_
|
|
5423
5425
|
},
|
|
5424
5426
|
_emitter: Q
|
|
5425
5427
|
};
|
|
5426
5428
|
if (s) return {
|
|
5427
5429
|
language: e,
|
|
5428
|
-
value:
|
|
5430
|
+
value: q_(r),
|
|
5429
5431
|
illegal: !1,
|
|
5430
5432
|
relevance: 0,
|
|
5431
5433
|
errorRaised: n,
|
|
@@ -5437,7 +5439,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5437
5439
|
}
|
|
5438
5440
|
function L(e) {
|
|
5439
5441
|
let n = {
|
|
5440
|
-
value:
|
|
5442
|
+
value: q_(e),
|
|
5441
5443
|
illegal: !1,
|
|
5442
5444
|
relevance: 0,
|
|
5443
5445
|
_top: u,
|
|
@@ -5447,13 +5449,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5447
5449
|
}
|
|
5448
5450
|
function B(e, r) {
|
|
5449
5451
|
r = r || d.languages || Object.keys(n);
|
|
5450
|
-
let i = L(e), a = r.filter(
|
|
5452
|
+
let i = L(e), a = r.filter(o_).filter(s_).map((n) => j(n, e, !1));
|
|
5451
5453
|
a.unshift(i);
|
|
5452
5454
|
let [o, s] = a.sort((e, n) => {
|
|
5453
5455
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5454
5456
|
if (e.language && n.language) {
|
|
5455
|
-
if (
|
|
5456
|
-
if (
|
|
5457
|
+
if (o_(e.language).supersetOf === n.language) return 1;
|
|
5458
|
+
if (o_(n.language).supersetOf === e.language) return -1;
|
|
5457
5459
|
}
|
|
5458
5460
|
return 0;
|
|
5459
5461
|
}), l = o;
|
|
@@ -5463,17 +5465,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5463
5465
|
let i = n && a[n] || r;
|
|
5464
5466
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5465
5467
|
}
|
|
5466
|
-
function
|
|
5468
|
+
function r_(e) {
|
|
5467
5469
|
let n = null, r = g(e);
|
|
5468
5470
|
if (m(r)) return;
|
|
5469
|
-
if (
|
|
5471
|
+
if (d_("before:highlightElement", {
|
|
5470
5472
|
el: e,
|
|
5471
5473
|
language: r
|
|
5472
5474
|
}), e.dataset.highlighted) {
|
|
5473
5475
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5474
5476
|
return;
|
|
5475
5477
|
}
|
|
5476
|
-
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new
|
|
5478
|
+
if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new K_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5477
5479
|
n = e;
|
|
5478
5480
|
let i = n.textContent, a = r ? v(i, {
|
|
5479
5481
|
language: r,
|
|
@@ -5486,51 +5488,51 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5486
5488
|
}, a.secondBest && (e.secondBest = {
|
|
5487
5489
|
language: a.secondBest.language,
|
|
5488
5490
|
relevance: a.secondBest.relevance
|
|
5489
|
-
}),
|
|
5491
|
+
}), d_("after:highlightElement", {
|
|
5490
5492
|
el: e,
|
|
5491
5493
|
result: a,
|
|
5492
5494
|
text: i
|
|
5493
5495
|
});
|
|
5494
5496
|
}
|
|
5495
5497
|
function G(e) {
|
|
5496
|
-
d =
|
|
5498
|
+
d = J_(d, e);
|
|
5497
5499
|
}
|
|
5498
5500
|
let K = () => {
|
|
5499
|
-
|
|
5501
|
+
i_(), F_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5500
5502
|
};
|
|
5501
5503
|
function q() {
|
|
5502
|
-
|
|
5504
|
+
i_(), F_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5503
5505
|
}
|
|
5504
5506
|
let J = !1;
|
|
5505
|
-
function
|
|
5507
|
+
function i_() {
|
|
5506
5508
|
function e() {
|
|
5507
|
-
|
|
5509
|
+
i_();
|
|
5508
5510
|
}
|
|
5509
5511
|
if (document.readyState === "loading") {
|
|
5510
5512
|
J || window.addEventListener("DOMContentLoaded", e, !1), J = !0;
|
|
5511
5513
|
return;
|
|
5512
5514
|
}
|
|
5513
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5515
|
+
document.querySelectorAll(d.cssSelector).forEach(r_);
|
|
5514
5516
|
}
|
|
5515
5517
|
function Z(r, i) {
|
|
5516
5518
|
let a = null;
|
|
5517
5519
|
try {
|
|
5518
5520
|
a = i(e);
|
|
5519
5521
|
} catch (e) {
|
|
5520
|
-
if (
|
|
5522
|
+
if (N_("Language definition for '{}' could not be registered.".replace("{}", r)), s) N_(e);
|
|
5521
5523
|
else throw e;
|
|
5522
5524
|
a = u;
|
|
5523
5525
|
}
|
|
5524
5526
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5525
5527
|
}
|
|
5526
|
-
function
|
|
5528
|
+
function a_(e) {
|
|
5527
5529
|
delete n[e];
|
|
5528
5530
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5529
5531
|
}
|
|
5530
5532
|
function Q() {
|
|
5531
5533
|
return Object.keys(n);
|
|
5532
5534
|
}
|
|
5533
|
-
function
|
|
5535
|
+
function o_(e) {
|
|
5534
5536
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5535
5537
|
}
|
|
5536
5538
|
function $(e, { languageName: n }) {
|
|
@@ -5538,65 +5540,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5538
5540
|
a[e.toLowerCase()] = n;
|
|
5539
5541
|
});
|
|
5540
5542
|
}
|
|
5541
|
-
function
|
|
5542
|
-
let n =
|
|
5543
|
+
function s_(e) {
|
|
5544
|
+
let n = o_(e);
|
|
5543
5545
|
return n && !n.disableAutodetect;
|
|
5544
5546
|
}
|
|
5545
|
-
function
|
|
5547
|
+
function c_(e) {
|
|
5546
5548
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5547
5549
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5548
5550
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5549
5551
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5550
5552
|
});
|
|
5551
5553
|
}
|
|
5552
|
-
function
|
|
5553
|
-
|
|
5554
|
+
function l_(e) {
|
|
5555
|
+
c_(e), o.push(e);
|
|
5554
5556
|
}
|
|
5555
|
-
function
|
|
5557
|
+
function u_(e) {
|
|
5556
5558
|
let n = o.indexOf(e);
|
|
5557
5559
|
n !== -1 && o.splice(n, 1);
|
|
5558
5560
|
}
|
|
5559
|
-
function
|
|
5561
|
+
function d_(e, n) {
|
|
5560
5562
|
let r = e;
|
|
5561
5563
|
o.forEach(function(e) {
|
|
5562
5564
|
e[r] && e[r](n);
|
|
5563
5565
|
});
|
|
5564
5566
|
}
|
|
5565
|
-
function
|
|
5566
|
-
return
|
|
5567
|
+
function f_(e) {
|
|
5568
|
+
return F_("10.7.0", "highlightBlock will be removed entirely in v12.0"), F_("10.7.0", "Please use highlightElement now."), r_(e);
|
|
5567
5569
|
}
|
|
5568
5570
|
for (let n in Object.assign(e, {
|
|
5569
5571
|
highlight: v,
|
|
5570
5572
|
highlightAuto: B,
|
|
5571
|
-
highlightAll:
|
|
5572
|
-
highlightElement:
|
|
5573
|
-
highlightBlock:
|
|
5573
|
+
highlightAll: i_,
|
|
5574
|
+
highlightElement: r_,
|
|
5575
|
+
highlightBlock: f_,
|
|
5574
5576
|
configure: G,
|
|
5575
5577
|
initHighlighting: K,
|
|
5576
5578
|
initHighlightingOnLoad: q,
|
|
5577
5579
|
registerLanguage: Z,
|
|
5578
|
-
unregisterLanguage:
|
|
5580
|
+
unregisterLanguage: a_,
|
|
5579
5581
|
listLanguages: Q,
|
|
5580
|
-
getLanguage:
|
|
5582
|
+
getLanguage: o_,
|
|
5581
5583
|
registerAliases: $,
|
|
5582
|
-
autoDetection:
|
|
5583
|
-
inherit:
|
|
5584
|
-
addPlugin:
|
|
5585
|
-
removePlugin:
|
|
5584
|
+
autoDetection: s_,
|
|
5585
|
+
inherit: J_,
|
|
5586
|
+
addPlugin: l_,
|
|
5587
|
+
removePlugin: u_
|
|
5586
5588
|
}), e.debugMode = function() {
|
|
5587
5589
|
s = !1;
|
|
5588
5590
|
}, e.safeMode = function() {
|
|
5589
5591
|
s = !0;
|
|
5590
|
-
}, e.versionString =
|
|
5592
|
+
}, e.versionString = G_, e.regex = {
|
|
5591
5593
|
concat: k,
|
|
5592
5594
|
lookahead: T,
|
|
5593
5595
|
either: I,
|
|
5594
5596
|
optional: O,
|
|
5595
5597
|
anyNumberOfTimes: E
|
|
5596
|
-
},
|
|
5597
|
-
return Object.assign(e,
|
|
5598
|
-
},
|
|
5599
|
-
|
|
5598
|
+
}, y_) typeof y_[n] == "object" && r(y_[n]);
|
|
5599
|
+
return Object.assign(e, y_), e;
|
|
5600
|
+
}, Q_ = Z_({});
|
|
5601
|
+
Q_.newInstance = () => Z_({}), n.exports = Q_, Q_.HighlightJS = Q_, Q_.default = Q_;
|
|
5600
5602
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5601
5603
|
function r(e) {
|
|
5602
5604
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11702,7 +11704,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11702
11704
|
},
|
|
11703
11705
|
z
|
|
11704
11706
|
]
|
|
11705
|
-
},
|
|
11707
|
+
}, r_ = {
|
|
11706
11708
|
scope: "computation-expression",
|
|
11707
11709
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11708
11710
|
}, G = {
|
|
@@ -11723,7 +11725,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11723
11725
|
begin: /@"/,
|
|
11724
11726
|
end: /"/,
|
|
11725
11727
|
contains: [{ match: /""/ }, e.BACKSLASH_ESCAPE]
|
|
11726
|
-
},
|
|
11728
|
+
}, i_ = {
|
|
11727
11729
|
scope: "string",
|
|
11728
11730
|
begin: /"""/,
|
|
11729
11731
|
end: /"""/,
|
|
@@ -11733,7 +11735,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11733
11735
|
begin: /\{/,
|
|
11734
11736
|
end: /\}/,
|
|
11735
11737
|
keywords: g
|
|
11736
|
-
},
|
|
11738
|
+
}, a_ = {
|
|
11737
11739
|
scope: "string",
|
|
11738
11740
|
begin: /\$"/,
|
|
11739
11741
|
end: /"/,
|
|
@@ -11754,7 +11756,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11754
11756
|
e.BACKSLASH_ESCAPE,
|
|
11755
11757
|
Z
|
|
11756
11758
|
]
|
|
11757
|
-
},
|
|
11759
|
+
}, o_ = {
|
|
11758
11760
|
scope: "string",
|
|
11759
11761
|
begin: /\$"""/,
|
|
11760
11762
|
end: /"""/,
|
|
@@ -11770,7 +11772,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11770
11772
|
};
|
|
11771
11773
|
Z.contains = [
|
|
11772
11774
|
Q,
|
|
11773
|
-
|
|
11775
|
+
a_,
|
|
11774
11776
|
J,
|
|
11775
11777
|
q,
|
|
11776
11778
|
$,
|
|
@@ -11778,17 +11780,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11778
11780
|
_,
|
|
11779
11781
|
T,
|
|
11780
11782
|
z,
|
|
11781
|
-
|
|
11783
|
+
r_,
|
|
11782
11784
|
G,
|
|
11783
11785
|
K,
|
|
11784
11786
|
O,
|
|
11785
11787
|
j
|
|
11786
11788
|
];
|
|
11787
|
-
let
|
|
11788
|
-
c_,
|
|
11789
|
-
Q,
|
|
11790
|
-
s_,
|
|
11789
|
+
let s_ = { variants: [
|
|
11791
11790
|
o_,
|
|
11791
|
+
Q,
|
|
11792
|
+
a_,
|
|
11793
|
+
i_,
|
|
11792
11794
|
J,
|
|
11793
11795
|
q,
|
|
11794
11796
|
$
|
|
@@ -11801,7 +11803,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11801
11803
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11802
11804
|
contains: [
|
|
11803
11805
|
i,
|
|
11804
|
-
|
|
11806
|
+
s_,
|
|
11805
11807
|
_,
|
|
11806
11808
|
T,
|
|
11807
11809
|
H,
|
|
@@ -11812,7 +11814,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11812
11814
|
relevance: 2,
|
|
11813
11815
|
contains: [
|
|
11814
11816
|
T,
|
|
11815
|
-
|
|
11817
|
+
i_,
|
|
11816
11818
|
J,
|
|
11817
11819
|
q,
|
|
11818
11820
|
$,
|
|
@@ -11821,7 +11823,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11821
11823
|
},
|
|
11822
11824
|
B,
|
|
11823
11825
|
z,
|
|
11824
|
-
|
|
11826
|
+
r_,
|
|
11825
11827
|
G,
|
|
11826
11828
|
K,
|
|
11827
11829
|
O,
|
|
@@ -13937,7 +13939,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13937
13939
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13938
13940
|
subLanguage: "graphql"
|
|
13939
13941
|
}
|
|
13940
|
-
},
|
|
13942
|
+
}, r_ = {
|
|
13941
13943
|
className: "string",
|
|
13942
13944
|
begin: "`",
|
|
13943
13945
|
end: "`",
|
|
@@ -13985,7 +13987,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13985
13987
|
z,
|
|
13986
13988
|
B,
|
|
13987
13989
|
H,
|
|
13988
|
-
|
|
13990
|
+
r_,
|
|
13989
13991
|
{ match: /\$\d+/ },
|
|
13990
13992
|
I
|
|
13991
13993
|
];
|
|
@@ -14000,7 +14002,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14000
14002
|
end: /\)/,
|
|
14001
14003
|
keywords: E,
|
|
14002
14004
|
contains: ["self"].concat(q)
|
|
14003
|
-
}]),
|
|
14005
|
+
}]), i_ = {
|
|
14004
14006
|
className: "params",
|
|
14005
14007
|
begin: /(\s*)\(/,
|
|
14006
14008
|
end: /\)/,
|
|
@@ -14034,7 +14036,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14034
14036
|
1: "keyword",
|
|
14035
14037
|
3: "title.class"
|
|
14036
14038
|
}
|
|
14037
|
-
}] },
|
|
14039
|
+
}] }, a_ = {
|
|
14038
14040
|
relevance: 0,
|
|
14039
14041
|
match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
14040
14042
|
className: "title.class",
|
|
@@ -14044,7 +14046,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14044
14046
|
className: "meta",
|
|
14045
14047
|
relevance: 10,
|
|
14046
14048
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
14047
|
-
},
|
|
14049
|
+
}, o_ = {
|
|
14048
14050
|
variants: [{ match: [
|
|
14049
14051
|
/function/,
|
|
14050
14052
|
/\s+/,
|
|
@@ -14056,32 +14058,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14056
14058
|
3: "title.function"
|
|
14057
14059
|
},
|
|
14058
14060
|
label: "func.def",
|
|
14059
|
-
contains: [
|
|
14061
|
+
contains: [i_],
|
|
14060
14062
|
illegal: /%/
|
|
14061
14063
|
}, $ = {
|
|
14062
14064
|
relevance: 0,
|
|
14063
14065
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
14064
14066
|
className: "variable.constant"
|
|
14065
14067
|
};
|
|
14066
|
-
function
|
|
14068
|
+
function s_(e) {
|
|
14067
14069
|
return n.concat("(?!", e.join("|"), ")");
|
|
14068
14070
|
}
|
|
14069
|
-
let
|
|
14070
|
-
match: n.concat(/\b/,
|
|
14071
|
+
let c_ = {
|
|
14072
|
+
match: n.concat(/\b/, s_([
|
|
14071
14073
|
...l,
|
|
14072
14074
|
"super",
|
|
14073
14075
|
"import"
|
|
14074
14076
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
14075
14077
|
className: "title.function",
|
|
14076
14078
|
relevance: 0
|
|
14077
|
-
},
|
|
14079
|
+
}, l_ = {
|
|
14078
14080
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
14079
14081
|
end: g,
|
|
14080
14082
|
excludeBegin: !0,
|
|
14081
14083
|
keywords: "prototype",
|
|
14082
14084
|
className: "property",
|
|
14083
14085
|
relevance: 0
|
|
14084
|
-
},
|
|
14086
|
+
}, u_ = {
|
|
14085
14087
|
match: [
|
|
14086
14088
|
/get|set/,
|
|
14087
14089
|
/\s+/,
|
|
@@ -14092,8 +14094,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14092
14094
|
1: "keyword",
|
|
14093
14095
|
3: "title.function"
|
|
14094
14096
|
},
|
|
14095
|
-
contains: [{ begin: /\(\)/ },
|
|
14096
|
-
},
|
|
14097
|
+
contains: [{ begin: /\(\)/ }, i_]
|
|
14098
|
+
}, d_ = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", f_ = {
|
|
14097
14099
|
match: [
|
|
14098
14100
|
/const|var|let/,
|
|
14099
14101
|
/\s+/,
|
|
@@ -14101,14 +14103,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14101
14103
|
/\s*/,
|
|
14102
14104
|
/=\s*/,
|
|
14103
14105
|
/(async\s*)?/,
|
|
14104
|
-
n.lookahead(
|
|
14106
|
+
n.lookahead(d_)
|
|
14105
14107
|
],
|
|
14106
14108
|
keywords: "async",
|
|
14107
14109
|
className: {
|
|
14108
14110
|
1: "keyword",
|
|
14109
14111
|
3: "title.function"
|
|
14110
14112
|
},
|
|
14111
|
-
contains: [
|
|
14113
|
+
contains: [i_]
|
|
14112
14114
|
};
|
|
14113
14115
|
return {
|
|
14114
14116
|
name: "JavaScript",
|
|
@@ -14121,7 +14123,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14121
14123
|
keywords: E,
|
|
14122
14124
|
exports: {
|
|
14123
14125
|
PARAMS_CONTAINS: J,
|
|
14124
|
-
CLASS_REFERENCE:
|
|
14126
|
+
CLASS_REFERENCE: a_
|
|
14125
14127
|
},
|
|
14126
14128
|
illegal: /#(?![$_A-z])/,
|
|
14127
14129
|
contains: [
|
|
@@ -14136,17 +14138,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14136
14138
|
z,
|
|
14137
14139
|
B,
|
|
14138
14140
|
H,
|
|
14139
|
-
|
|
14141
|
+
r_,
|
|
14140
14142
|
G,
|
|
14141
14143
|
{ match: /\$\d+/ },
|
|
14142
14144
|
I,
|
|
14143
|
-
|
|
14145
|
+
a_,
|
|
14144
14146
|
{
|
|
14145
14147
|
scope: "attr",
|
|
14146
14148
|
match: g + n.lookahead(":"),
|
|
14147
14149
|
relevance: 0
|
|
14148
14150
|
},
|
|
14149
|
-
|
|
14151
|
+
f_,
|
|
14150
14152
|
{
|
|
14151
14153
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14152
14154
|
keywords: "return throw case",
|
|
@@ -14156,7 +14158,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14156
14158
|
e.REGEXP_MODE,
|
|
14157
14159
|
{
|
|
14158
14160
|
className: "function",
|
|
14159
|
-
begin:
|
|
14161
|
+
begin: d_,
|
|
14160
14162
|
returnBegin: !0,
|
|
14161
14163
|
end: "\\s*=>",
|
|
14162
14164
|
contains: [{
|
|
@@ -14213,13 +14215,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14213
14215
|
}
|
|
14214
14216
|
]
|
|
14215
14217
|
},
|
|
14216
|
-
|
|
14218
|
+
o_,
|
|
14217
14219
|
{ beginKeywords: "while if switch catch for" },
|
|
14218
14220
|
{
|
|
14219
14221
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
14220
14222
|
returnBegin: !0,
|
|
14221
14223
|
label: "func.def",
|
|
14222
|
-
contains: [
|
|
14224
|
+
contains: [i_, e.inherit(e.TITLE_MODE, {
|
|
14223
14225
|
begin: g,
|
|
14224
14226
|
className: "title.function"
|
|
14225
14227
|
})]
|
|
@@ -14228,7 +14230,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14228
14230
|
match: /\.\.\./,
|
|
14229
14231
|
relevance: 0
|
|
14230
14232
|
},
|
|
14231
|
-
|
|
14233
|
+
l_,
|
|
14232
14234
|
{
|
|
14233
14235
|
match: "\\$" + g,
|
|
14234
14236
|
relevance: 0
|
|
@@ -14236,12 +14238,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14236
14238
|
{
|
|
14237
14239
|
match: [/\bconstructor(?=\s*\()/],
|
|
14238
14240
|
className: { 1: "title.function" },
|
|
14239
|
-
contains: [
|
|
14241
|
+
contains: [i_]
|
|
14240
14242
|
},
|
|
14241
|
-
|
|
14243
|
+
c_,
|
|
14242
14244
|
$,
|
|
14243
14245
|
Z,
|
|
14244
|
-
|
|
14246
|
+
u_,
|
|
14245
14247
|
{ match: /\$[(.]/ }
|
|
14246
14248
|
]
|
|
14247
14249
|
};
|
|
@@ -15195,12 +15197,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15195
15197
|
{ begin: "!important" },
|
|
15196
15198
|
n.FUNCTION_DISPATCH
|
|
15197
15199
|
]
|
|
15198
|
-
},
|
|
15200
|
+
}, r_ = {
|
|
15199
15201
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15200
15202
|
returnBegin: !0,
|
|
15201
15203
|
contains: [H]
|
|
15202
15204
|
};
|
|
15203
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15205
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, r_, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15204
15206
|
name: "Less",
|
|
15205
15207
|
case_insensitive: !0,
|
|
15206
15208
|
illegal: "[=>'/<($\"]",
|
|
@@ -17726,7 +17728,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17726
17728
|
3: "variable.language"
|
|
17727
17729
|
}
|
|
17728
17730
|
}
|
|
17729
|
-
] },
|
|
17731
|
+
] }, r_ = {
|
|
17730
17732
|
scope: "attr",
|
|
17731
17733
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17732
17734
|
}, G = {
|
|
@@ -17735,7 +17737,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17735
17737
|
end: /\)/,
|
|
17736
17738
|
keywords: I,
|
|
17737
17739
|
contains: [
|
|
17738
|
-
|
|
17740
|
+
r_,
|
|
17739
17741
|
s,
|
|
17740
17742
|
H,
|
|
17741
17743
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17757,7 +17759,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17757
17759
|
};
|
|
17758
17760
|
G.contains.push(K);
|
|
17759
17761
|
let q = [
|
|
17760
|
-
|
|
17762
|
+
r_,
|
|
17761
17763
|
H,
|
|
17762
17764
|
e.C_BLOCK_COMMENT_MODE,
|
|
17763
17765
|
T,
|
|
@@ -21175,7 +21177,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21177
|
"unknown",
|
|
21176
21178
|
"usableFromInline",
|
|
21177
21179
|
"warn_unqualified_access"
|
|
21178
|
-
],
|
|
21180
|
+
], r_ = [
|
|
21179
21181
|
"iOS",
|
|
21180
21182
|
"iOSApplicationExtension",
|
|
21181
21183
|
"macOS",
|
|
@@ -21209,7 +21211,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21209
21211
|
O,
|
|
21210
21212
|
I,
|
|
21211
21213
|
K
|
|
21212
|
-
],
|
|
21214
|
+
], i_ = [{
|
|
21213
21215
|
match: a(/\./, s(...E)),
|
|
21214
21216
|
relevance: 0
|
|
21215
21217
|
}, {
|
|
@@ -21218,84 +21220,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21218
21220
|
}], Z = {
|
|
21219
21221
|
match: /->/,
|
|
21220
21222
|
relevance: 0
|
|
21221
|
-
},
|
|
21223
|
+
}, a_ = [Z, {
|
|
21222
21224
|
className: "operator",
|
|
21223
21225
|
relevance: 0,
|
|
21224
21226
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21225
|
-
}], Q = "([0-9]_*)+",
|
|
21227
|
+
}], Q = "([0-9]_*)+", o_ = "([0-9a-fA-F]_*)+", $ = {
|
|
21226
21228
|
className: "number",
|
|
21227
21229
|
relevance: 0,
|
|
21228
21230
|
variants: [
|
|
21229
21231
|
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21230
|
-
{ match: `\\b0x(${
|
|
21232
|
+
{ match: `\\b0x(${o_})(\\.(${o_}))?([pP][+-]?(${Q}))?\\b` },
|
|
21231
21233
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21232
21234
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21233
21235
|
]
|
|
21234
|
-
},
|
|
21236
|
+
}, s_ = (e = "") => ({
|
|
21235
21237
|
className: "subst",
|
|
21236
21238
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21237
|
-
}),
|
|
21239
|
+
}), c_ = (e = "") => ({
|
|
21238
21240
|
className: "subst",
|
|
21239
21241
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21240
|
-
}),
|
|
21242
|
+
}), l_ = (e = "") => ({
|
|
21241
21243
|
className: "subst",
|
|
21242
21244
|
label: "interpol",
|
|
21243
21245
|
begin: a(/\\/, e, /\(/),
|
|
21244
21246
|
end: /\)/
|
|
21245
|
-
}),
|
|
21247
|
+
}), u_ = (e = "") => ({
|
|
21246
21248
|
begin: a(e, /"""/),
|
|
21247
21249
|
end: a(/"""/, e),
|
|
21248
21250
|
contains: [
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21251
|
+
s_(e),
|
|
21252
|
+
c_(e),
|
|
21253
|
+
l_(e)
|
|
21252
21254
|
]
|
|
21253
|
-
}),
|
|
21255
|
+
}), d_ = (e = "") => ({
|
|
21254
21256
|
begin: a(e, /"/),
|
|
21255
21257
|
end: a(/"/, e),
|
|
21256
|
-
contains: [
|
|
21257
|
-
}),
|
|
21258
|
+
contains: [s_(e), l_(e)]
|
|
21259
|
+
}), f_ = {
|
|
21258
21260
|
className: "string",
|
|
21259
21261
|
variants: [
|
|
21260
|
-
|
|
21261
|
-
|
|
21262
|
-
|
|
21263
|
-
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21262
|
+
u_(),
|
|
21263
|
+
u_("#"),
|
|
21264
|
+
u_("##"),
|
|
21265
|
+
u_("###"),
|
|
21266
|
+
d_(),
|
|
21267
|
+
d_("#"),
|
|
21268
|
+
d_("##"),
|
|
21269
|
+
d_("###")
|
|
21268
21270
|
]
|
|
21269
|
-
},
|
|
21271
|
+
}, p_ = [e.BACKSLASH_ESCAPE, {
|
|
21270
21272
|
begin: /\[/,
|
|
21271
21273
|
end: /\]/,
|
|
21272
21274
|
relevance: 0,
|
|
21273
21275
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21274
|
-
}],
|
|
21276
|
+
}], m_ = {
|
|
21275
21277
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21276
21278
|
end: /\//,
|
|
21277
|
-
contains:
|
|
21278
|
-
},
|
|
21279
|
+
contains: p_
|
|
21280
|
+
}, h_ = (e) => {
|
|
21279
21281
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21280
21282
|
return {
|
|
21281
21283
|
begin: n,
|
|
21282
21284
|
end: r,
|
|
21283
|
-
contains: [...
|
|
21285
|
+
contains: [...p_, {
|
|
21284
21286
|
scope: "comment",
|
|
21285
21287
|
begin: `#(?!.*${r})`,
|
|
21286
21288
|
end: /$/
|
|
21287
21289
|
}]
|
|
21288
21290
|
};
|
|
21289
|
-
},
|
|
21291
|
+
}, g_ = {
|
|
21290
21292
|
scope: "regexp",
|
|
21291
21293
|
variants: [
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21294
|
+
h_("###"),
|
|
21295
|
+
h_("##"),
|
|
21296
|
+
h_("#"),
|
|
21297
|
+
m_
|
|
21296
21298
|
]
|
|
21297
|
-
},
|
|
21298
|
-
|
|
21299
|
+
}, __ = { match: a(/`/, z, /`/) }, v_ = [
|
|
21300
|
+
__,
|
|
21299
21301
|
{
|
|
21300
21302
|
className: "variable",
|
|
21301
21303
|
match: /\$\d+/
|
|
@@ -21304,18 +21306,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21304
21306
|
className: "variable",
|
|
21305
21307
|
match: `\\$${L}+`
|
|
21306
21308
|
}
|
|
21307
|
-
],
|
|
21309
|
+
], y_ = [
|
|
21308
21310
|
{
|
|
21309
21311
|
match: /(@|#(un)?)available/,
|
|
21310
21312
|
scope: "keyword",
|
|
21311
21313
|
starts: { contains: [{
|
|
21312
21314
|
begin: /\(/,
|
|
21313
21315
|
end: /\)/,
|
|
21314
|
-
keywords:
|
|
21316
|
+
keywords: r_,
|
|
21315
21317
|
contains: [
|
|
21316
|
-
...
|
|
21318
|
+
...a_,
|
|
21317
21319
|
$,
|
|
21318
|
-
|
|
21320
|
+
f_
|
|
21319
21321
|
]
|
|
21320
21322
|
}] }
|
|
21321
21323
|
},
|
|
@@ -21327,7 +21329,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21327
21329
|
scope: "meta",
|
|
21328
21330
|
match: a(/@/, z)
|
|
21329
21331
|
}
|
|
21330
|
-
],
|
|
21332
|
+
], b_ = {
|
|
21331
21333
|
match: i(/\b[A-Z]/),
|
|
21332
21334
|
relevance: 0,
|
|
21333
21335
|
contains: [
|
|
@@ -21353,20 +21355,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21353
21355
|
relevance: 0
|
|
21354
21356
|
}
|
|
21355
21357
|
]
|
|
21356
|
-
},
|
|
21358
|
+
}, x_ = {
|
|
21357
21359
|
begin: /</,
|
|
21358
21360
|
end: />/,
|
|
21359
21361
|
keywords: q,
|
|
21360
21362
|
contains: [
|
|
21361
21363
|
...o,
|
|
21362
21364
|
...J,
|
|
21363
|
-
...
|
|
21365
|
+
...y_,
|
|
21364
21366
|
Z,
|
|
21365
|
-
|
|
21367
|
+
b_
|
|
21366
21368
|
]
|
|
21367
21369
|
};
|
|
21368
|
-
|
|
21369
|
-
let
|
|
21370
|
+
b_.contains.push(x_);
|
|
21371
|
+
let S_ = {
|
|
21370
21372
|
begin: /\(/,
|
|
21371
21373
|
end: /\)/,
|
|
21372
21374
|
relevance: 0,
|
|
@@ -21379,22 +21381,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21379
21381
|
relevance: 0
|
|
21380
21382
|
},
|
|
21381
21383
|
...o,
|
|
21382
|
-
|
|
21384
|
+
g_,
|
|
21383
21385
|
...J,
|
|
21384
|
-
...
|
|
21385
|
-
...
|
|
21386
|
+
...i_,
|
|
21387
|
+
...a_,
|
|
21386
21388
|
$,
|
|
21387
|
-
|
|
21388
|
-
...
|
|
21389
|
-
...
|
|
21390
|
-
|
|
21389
|
+
f_,
|
|
21390
|
+
...v_,
|
|
21391
|
+
...y_,
|
|
21392
|
+
b_
|
|
21391
21393
|
]
|
|
21392
|
-
},
|
|
21394
|
+
}, C_ = {
|
|
21393
21395
|
begin: /</,
|
|
21394
21396
|
end: />/,
|
|
21395
21397
|
keywords: "repeat each",
|
|
21396
|
-
contains: [...o,
|
|
21397
|
-
},
|
|
21398
|
+
contains: [...o, b_]
|
|
21399
|
+
}, w_ = {
|
|
21398
21400
|
begin: /\(/,
|
|
21399
21401
|
end: /\)/,
|
|
21400
21402
|
keywords: q,
|
|
@@ -21413,41 +21415,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21415
|
},
|
|
21414
21416
|
...o,
|
|
21415
21417
|
...J,
|
|
21416
|
-
...
|
|
21418
|
+
...a_,
|
|
21417
21419
|
$,
|
|
21418
|
-
|
|
21419
|
-
...
|
|
21420
|
-
|
|
21421
|
-
|
|
21420
|
+
f_,
|
|
21421
|
+
...y_,
|
|
21422
|
+
b_,
|
|
21423
|
+
S_
|
|
21422
21424
|
],
|
|
21423
21425
|
endsParent: !0,
|
|
21424
21426
|
illegal: /["']/
|
|
21425
|
-
},
|
|
21427
|
+
}, T_ = {
|
|
21426
21428
|
match: [
|
|
21427
21429
|
/(func|macro)/,
|
|
21428
21430
|
/\s+/,
|
|
21429
|
-
s(
|
|
21431
|
+
s(__.match, z, j)
|
|
21430
21432
|
],
|
|
21431
21433
|
className: {
|
|
21432
21434
|
1: "keyword",
|
|
21433
21435
|
3: "title.function"
|
|
21434
21436
|
},
|
|
21435
21437
|
contains: [
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
+
C_,
|
|
21439
|
+
w_,
|
|
21438
21440
|
n
|
|
21439
21441
|
],
|
|
21440
21442
|
illegal: [/\[/, /%/]
|
|
21441
|
-
},
|
|
21443
|
+
}, E_ = {
|
|
21442
21444
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21443
21445
|
className: { 1: "keyword" },
|
|
21444
21446
|
contains: [
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
+
C_,
|
|
21448
|
+
w_,
|
|
21447
21449
|
n
|
|
21448
21450
|
],
|
|
21449
21451
|
illegal: /\[|%/
|
|
21450
|
-
},
|
|
21452
|
+
}, D_ = {
|
|
21451
21453
|
match: [
|
|
21452
21454
|
/operator/,
|
|
21453
21455
|
/\s+/,
|
|
@@ -21457,7 +21459,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21457
21459
|
1: "keyword",
|
|
21458
21460
|
3: "title"
|
|
21459
21461
|
}
|
|
21460
|
-
},
|
|
21462
|
+
}, O_ = {
|
|
21461
21463
|
begin: [
|
|
21462
21464
|
/precedencegroup/,
|
|
21463
21465
|
/\s+/,
|
|
@@ -21467,10 +21469,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21467
21469
|
1: "keyword",
|
|
21468
21470
|
3: "title"
|
|
21469
21471
|
},
|
|
21470
|
-
contains: [
|
|
21472
|
+
contains: [b_],
|
|
21471
21473
|
keywords: [...v, ..._],
|
|
21472
21474
|
end: /}/
|
|
21473
|
-
},
|
|
21475
|
+
}, k_ = {
|
|
21474
21476
|
match: [
|
|
21475
21477
|
/class\b/,
|
|
21476
21478
|
/\s+/,
|
|
@@ -21483,7 +21485,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21483
21485
|
3: "keyword",
|
|
21484
21486
|
5: "title.function"
|
|
21485
21487
|
}
|
|
21486
|
-
},
|
|
21488
|
+
}, A_ = {
|
|
21487
21489
|
match: [
|
|
21488
21490
|
/class\b/,
|
|
21489
21491
|
/\s+/,
|
|
@@ -21493,7 +21495,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21493
21495
|
1: "keyword",
|
|
21494
21496
|
3: "keyword"
|
|
21495
21497
|
}
|
|
21496
|
-
},
|
|
21498
|
+
}, j_ = {
|
|
21497
21499
|
begin: [
|
|
21498
21500
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21499
21501
|
/\s+/,
|
|
@@ -21506,7 +21508,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21506
21508
|
},
|
|
21507
21509
|
keywords: q,
|
|
21508
21510
|
contains: [
|
|
21509
|
-
|
|
21511
|
+
C_,
|
|
21510
21512
|
...J,
|
|
21511
21513
|
{
|
|
21512
21514
|
begin: /:/,
|
|
@@ -21520,16 +21522,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21520
21522
|
}
|
|
21521
21523
|
]
|
|
21522
21524
|
};
|
|
21523
|
-
for (let e of
|
|
21525
|
+
for (let e of f_.variants) {
|
|
21524
21526
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21525
21527
|
n.keywords = q;
|
|
21526
21528
|
let r = [
|
|
21527
21529
|
...J,
|
|
21528
|
-
...
|
|
21529
|
-
...
|
|
21530
|
+
...i_,
|
|
21531
|
+
...a_,
|
|
21530
21532
|
$,
|
|
21531
|
-
|
|
21532
|
-
...
|
|
21533
|
+
f_,
|
|
21534
|
+
...v_
|
|
21533
21535
|
];
|
|
21534
21536
|
n.contains = [...r, {
|
|
21535
21537
|
begin: /\(/,
|
|
@@ -21542,29 +21544,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21542
21544
|
keywords: q,
|
|
21543
21545
|
contains: [
|
|
21544
21546
|
...o,
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
j_,
|
|
21548
|
-
M_,
|
|
21549
|
-
N_,
|
|
21547
|
+
T_,
|
|
21548
|
+
E_,
|
|
21550
21549
|
k_,
|
|
21551
21550
|
A_,
|
|
21551
|
+
j_,
|
|
21552
|
+
D_,
|
|
21553
|
+
O_,
|
|
21552
21554
|
{
|
|
21553
21555
|
beginKeywords: "import",
|
|
21554
21556
|
end: /$/,
|
|
21555
21557
|
contains: [...o],
|
|
21556
21558
|
relevance: 0
|
|
21557
21559
|
},
|
|
21558
|
-
|
|
21560
|
+
g_,
|
|
21559
21561
|
...J,
|
|
21560
|
-
...
|
|
21561
|
-
...
|
|
21562
|
+
...i_,
|
|
21563
|
+
...a_,
|
|
21562
21564
|
$,
|
|
21563
|
-
|
|
21564
|
-
...
|
|
21565
|
-
...
|
|
21566
|
-
|
|
21567
|
-
|
|
21565
|
+
f_,
|
|
21566
|
+
...v_,
|
|
21567
|
+
...y_,
|
|
21568
|
+
b_,
|
|
21569
|
+
S_
|
|
21568
21570
|
]
|
|
21569
21571
|
};
|
|
21570
21572
|
}
|
|
@@ -22174,7 +22176,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22174
22176
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22175
22177
|
subLanguage: "graphql"
|
|
22176
22178
|
}
|
|
22177
|
-
},
|
|
22179
|
+
}, r_ = {
|
|
22178
22180
|
className: "string",
|
|
22179
22181
|
begin: "`",
|
|
22180
22182
|
end: "`",
|
|
@@ -22222,7 +22224,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22222
22224
|
z,
|
|
22223
22225
|
B,
|
|
22224
22226
|
H,
|
|
22225
|
-
|
|
22227
|
+
r_,
|
|
22226
22228
|
{ match: /\$\d+/ },
|
|
22227
22229
|
I
|
|
22228
22230
|
];
|
|
@@ -22237,7 +22239,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22237
22239
|
end: /\)/,
|
|
22238
22240
|
keywords: E,
|
|
22239
22241
|
contains: ["self"].concat(q)
|
|
22240
|
-
}]),
|
|
22242
|
+
}]), i_ = {
|
|
22241
22243
|
className: "params",
|
|
22242
22244
|
begin: /(\s*)\(/,
|
|
22243
22245
|
end: /\)/,
|
|
@@ -22271,7 +22273,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22271
22273
|
1: "keyword",
|
|
22272
22274
|
3: "title.class"
|
|
22273
22275
|
}
|
|
22274
|
-
}] },
|
|
22276
|
+
}] }, a_ = {
|
|
22275
22277
|
relevance: 0,
|
|
22276
22278
|
match: n.either(/\bJSON/, /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
|
|
22277
22279
|
className: "title.class",
|
|
@@ -22281,7 +22283,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22281
22283
|
className: "meta",
|
|
22282
22284
|
relevance: 10,
|
|
22283
22285
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22284
|
-
},
|
|
22286
|
+
}, o_ = {
|
|
22285
22287
|
variants: [{ match: [
|
|
22286
22288
|
/function/,
|
|
22287
22289
|
/\s+/,
|
|
@@ -22293,32 +22295,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22293
22295
|
3: "title.function"
|
|
22294
22296
|
},
|
|
22295
22297
|
label: "func.def",
|
|
22296
|
-
contains: [
|
|
22298
|
+
contains: [i_],
|
|
22297
22299
|
illegal: /%/
|
|
22298
22300
|
}, $ = {
|
|
22299
22301
|
relevance: 0,
|
|
22300
22302
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22301
22303
|
className: "variable.constant"
|
|
22302
22304
|
};
|
|
22303
|
-
function
|
|
22305
|
+
function s_(e) {
|
|
22304
22306
|
return n.concat("(?!", e.join("|"), ")");
|
|
22305
22307
|
}
|
|
22306
|
-
let
|
|
22307
|
-
match: n.concat(/\b/,
|
|
22308
|
+
let c_ = {
|
|
22309
|
+
match: n.concat(/\b/, s_([
|
|
22308
22310
|
...l,
|
|
22309
22311
|
"super",
|
|
22310
22312
|
"import"
|
|
22311
22313
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22312
22314
|
className: "title.function",
|
|
22313
22315
|
relevance: 0
|
|
22314
|
-
},
|
|
22316
|
+
}, l_ = {
|
|
22315
22317
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22316
22318
|
end: g,
|
|
22317
22319
|
excludeBegin: !0,
|
|
22318
22320
|
keywords: "prototype",
|
|
22319
22321
|
className: "property",
|
|
22320
22322
|
relevance: 0
|
|
22321
|
-
},
|
|
22323
|
+
}, u_ = {
|
|
22322
22324
|
match: [
|
|
22323
22325
|
/get|set/,
|
|
22324
22326
|
/\s+/,
|
|
@@ -22329,8 +22331,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22329
22331
|
1: "keyword",
|
|
22330
22332
|
3: "title.function"
|
|
22331
22333
|
},
|
|
22332
|
-
contains: [{ begin: /\(\)/ },
|
|
22333
|
-
},
|
|
22334
|
+
contains: [{ begin: /\(\)/ }, i_]
|
|
22335
|
+
}, d_ = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", f_ = {
|
|
22334
22336
|
match: [
|
|
22335
22337
|
/const|var|let/,
|
|
22336
22338
|
/\s+/,
|
|
@@ -22338,14 +22340,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22338
22340
|
/\s*/,
|
|
22339
22341
|
/=\s*/,
|
|
22340
22342
|
/(async\s*)?/,
|
|
22341
|
-
n.lookahead(
|
|
22343
|
+
n.lookahead(d_)
|
|
22342
22344
|
],
|
|
22343
22345
|
keywords: "async",
|
|
22344
22346
|
className: {
|
|
22345
22347
|
1: "keyword",
|
|
22346
22348
|
3: "title.function"
|
|
22347
22349
|
},
|
|
22348
|
-
contains: [
|
|
22350
|
+
contains: [i_]
|
|
22349
22351
|
};
|
|
22350
22352
|
return {
|
|
22351
22353
|
name: "JavaScript",
|
|
@@ -22358,7 +22360,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22358
22360
|
keywords: E,
|
|
22359
22361
|
exports: {
|
|
22360
22362
|
PARAMS_CONTAINS: J,
|
|
22361
|
-
CLASS_REFERENCE:
|
|
22363
|
+
CLASS_REFERENCE: a_
|
|
22362
22364
|
},
|
|
22363
22365
|
illegal: /#(?![$_A-z])/,
|
|
22364
22366
|
contains: [
|
|
@@ -22373,17 +22375,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22373
22375
|
z,
|
|
22374
22376
|
B,
|
|
22375
22377
|
H,
|
|
22376
|
-
|
|
22378
|
+
r_,
|
|
22377
22379
|
G,
|
|
22378
22380
|
{ match: /\$\d+/ },
|
|
22379
22381
|
I,
|
|
22380
|
-
|
|
22382
|
+
a_,
|
|
22381
22383
|
{
|
|
22382
22384
|
scope: "attr",
|
|
22383
22385
|
match: g + n.lookahead(":"),
|
|
22384
22386
|
relevance: 0
|
|
22385
22387
|
},
|
|
22386
|
-
|
|
22388
|
+
f_,
|
|
22387
22389
|
{
|
|
22388
22390
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22389
22391
|
keywords: "return throw case",
|
|
@@ -22393,7 +22395,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22393
22395
|
e.REGEXP_MODE,
|
|
22394
22396
|
{
|
|
22395
22397
|
className: "function",
|
|
22396
|
-
begin:
|
|
22398
|
+
begin: d_,
|
|
22397
22399
|
returnBegin: !0,
|
|
22398
22400
|
end: "\\s*=>",
|
|
22399
22401
|
contains: [{
|
|
@@ -22450,13 +22452,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22450
22452
|
}
|
|
22451
22453
|
]
|
|
22452
22454
|
},
|
|
22453
|
-
|
|
22455
|
+
o_,
|
|
22454
22456
|
{ beginKeywords: "while if switch catch for" },
|
|
22455
22457
|
{
|
|
22456
22458
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
22457
22459
|
returnBegin: !0,
|
|
22458
22460
|
label: "func.def",
|
|
22459
|
-
contains: [
|
|
22461
|
+
contains: [i_, e.inherit(e.TITLE_MODE, {
|
|
22460
22462
|
begin: g,
|
|
22461
22463
|
className: "title.function"
|
|
22462
22464
|
})]
|
|
@@ -22465,7 +22467,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22465
22467
|
match: /\.\.\./,
|
|
22466
22468
|
relevance: 0
|
|
22467
22469
|
},
|
|
22468
|
-
|
|
22470
|
+
l_,
|
|
22469
22471
|
{
|
|
22470
22472
|
match: "\\$" + g,
|
|
22471
22473
|
relevance: 0
|
|
@@ -22473,12 +22475,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22473
22475
|
{
|
|
22474
22476
|
match: [/\bconstructor(?=\s*\()/],
|
|
22475
22477
|
className: { 1: "title.function" },
|
|
22476
|
-
contains: [
|
|
22478
|
+
contains: [i_]
|
|
22477
22479
|
},
|
|
22478
|
-
|
|
22480
|
+
c_,
|
|
22479
22481
|
$,
|
|
22480
22482
|
Z,
|
|
22481
|
-
|
|
22483
|
+
u_,
|
|
22482
22484
|
{ match: /\$[(.]/ }
|
|
22483
22485
|
]
|
|
22484
22486
|
};
|
|
@@ -23516,7 +23518,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23516
23518
|
})), es_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
23517
23519
|
var r = require_core();
|
|
23518
23520
|
r.registerLanguage("1c", require__1c()), r.registerLanguage("abnf", require_abnf()), r.registerLanguage("accesslog", require_accesslog()), r.registerLanguage("actionscript", require_actionscript()), r.registerLanguage("ada", require_ada()), r.registerLanguage("angelscript", require_angelscript()), r.registerLanguage("apache", require_apache()), r.registerLanguage("applescript", require_applescript()), r.registerLanguage("arcade", require_arcade()), r.registerLanguage("arduino", require_arduino()), r.registerLanguage("armasm", require_armasm()), r.registerLanguage("xml", require_xml()), r.registerLanguage("asciidoc", require_asciidoc()), r.registerLanguage("aspectj", require_aspectj()), r.registerLanguage("autohotkey", require_autohotkey()), r.registerLanguage("autoit", require_autoit()), r.registerLanguage("avrasm", require_avrasm()), r.registerLanguage("awk", require_awk()), r.registerLanguage("axapta", require_axapta()), r.registerLanguage("bash", require_bash()), r.registerLanguage("basic", require_basic()), r.registerLanguage("bnf", require_bnf()), r.registerLanguage("brainfuck", require_brainfuck()), r.registerLanguage("c", require_c()), r.registerLanguage("cal", require_cal()), r.registerLanguage("capnproto", require_capnproto()), r.registerLanguage("ceylon", require_ceylon()), r.registerLanguage("clean", require_clean()), r.registerLanguage("clojure", require_clojure()), r.registerLanguage("clojure-repl", require_clojure_repl()), r.registerLanguage("cmake", require_cmake()), r.registerLanguage("coffeescript", require_coffeescript()), r.registerLanguage("coq", require_coq()), r.registerLanguage("cos", require_cos()), r.registerLanguage("cpp", require_cpp()), r.registerLanguage("crmsh", require_crmsh()), r.registerLanguage("crystal", require_crystal()), r.registerLanguage("csharp", require_csharp()), r.registerLanguage("csp", require_csp()), r.registerLanguage("css", require_css()), r.registerLanguage("d", require_d()), r.registerLanguage("markdown", require_markdown()), r.registerLanguage("dart", require_dart()), r.registerLanguage("delphi", require_delphi()), r.registerLanguage("diff", require_diff()), r.registerLanguage("django", require_django()), r.registerLanguage("dns", require_dns()), r.registerLanguage("dockerfile", require_dockerfile()), r.registerLanguage("dos", require_dos()), r.registerLanguage("dsconfig", require_dsconfig()), r.registerLanguage("dts", require_dts()), r.registerLanguage("dust", require_dust()), r.registerLanguage("ebnf", require_ebnf()), r.registerLanguage("elixir", require_elixir()), r.registerLanguage("elm", require_elm()), r.registerLanguage("ruby", require_ruby()), r.registerLanguage("erb", require_erb()), r.registerLanguage("erlang-repl", require_erlang_repl()), r.registerLanguage("erlang", require_erlang()), r.registerLanguage("excel", require_excel()), r.registerLanguage("fix", require_fix()), r.registerLanguage("flix", require_flix()), r.registerLanguage("fortran", require_fortran()), r.registerLanguage("fsharp", require_fsharp()), r.registerLanguage("gams", require_gams()), r.registerLanguage("gauss", require_gauss()), r.registerLanguage("gcode", require_gcode()), r.registerLanguage("gherkin", require_gherkin()), r.registerLanguage("glsl", require_glsl()), r.registerLanguage("gml", require_gml()), r.registerLanguage("go", require_go()), r.registerLanguage("golo", require_golo()), r.registerLanguage("gradle", require_gradle()), r.registerLanguage("graphql", require_graphql()), r.registerLanguage("groovy", require_groovy()), r.registerLanguage("haml", require_haml()), r.registerLanguage("handlebars", require_handlebars()), r.registerLanguage("haskell", require_haskell()), r.registerLanguage("haxe", require_haxe()), r.registerLanguage("hsp", require_hsp()), r.registerLanguage("http", require_http()), r.registerLanguage("hy", require_hy()), r.registerLanguage("inform7", require_inform7()), r.registerLanguage("ini", require_ini()), r.registerLanguage("irpf90", require_irpf90()), r.registerLanguage("isbl", require_isbl()), r.registerLanguage("java", require_java()), r.registerLanguage("javascript", require_javascript()), r.registerLanguage("jboss-cli", require_jboss_cli()), r.registerLanguage("json", require_json()), r.registerLanguage("julia", require_julia()), r.registerLanguage("julia-repl", require_julia_repl()), r.registerLanguage("kotlin", require_kotlin()), r.registerLanguage("lasso", require_lasso()), r.registerLanguage("latex", require_latex()), r.registerLanguage("ldif", require_ldif()), r.registerLanguage("leaf", require_leaf()), r.registerLanguage("less", require_less()), r.registerLanguage("lisp", require_lisp()), r.registerLanguage("livecodeserver", require_livecodeserver()), r.registerLanguage("livescript", require_livescript()), r.registerLanguage("llvm", require_llvm()), r.registerLanguage("lsl", require_lsl()), r.registerLanguage("lua", require_lua()), r.registerLanguage("makefile", require_makefile()), r.registerLanguage("mathematica", require_mathematica()), r.registerLanguage("matlab", require_matlab()), r.registerLanguage("maxima", require_maxima()), r.registerLanguage("mel", require_mel()), r.registerLanguage("mercury", require_mercury()), r.registerLanguage("mipsasm", require_mipsasm()), r.registerLanguage("mizar", require_mizar()), r.registerLanguage("perl", require_perl()), r.registerLanguage("mojolicious", require_mojolicious()), r.registerLanguage("monkey", require_monkey()), r.registerLanguage("moonscript", require_moonscript()), r.registerLanguage("n1ql", require_n1ql()), r.registerLanguage("nestedtext", require_nestedtext()), r.registerLanguage("nginx", require_nginx()), r.registerLanguage("nim", require_nim()), r.registerLanguage("nix", require_nix()), r.registerLanguage("node-repl", require_node_repl()), r.registerLanguage("nsis", require_nsis()), r.registerLanguage("objectivec", require_objectivec()), r.registerLanguage("ocaml", require_ocaml()), r.registerLanguage("openscad", require_openscad()), r.registerLanguage("oxygene", require_oxygene()), r.registerLanguage("parser3", require_parser3()), r.registerLanguage("pf", require_pf()), r.registerLanguage("pgsql", require_pgsql()), r.registerLanguage("php", require_php()), r.registerLanguage("php-template", require_php_template()), r.registerLanguage("plaintext", require_plaintext()), r.registerLanguage("pony", require_pony()), r.registerLanguage("powershell", require_powershell()), r.registerLanguage("processing", require_processing()), r.registerLanguage("profile", require_profile()), r.registerLanguage("prolog", require_prolog()), r.registerLanguage("properties", require_properties()), r.registerLanguage("protobuf", require_protobuf()), r.registerLanguage("puppet", require_puppet()), r.registerLanguage("purebasic", require_purebasic()), r.registerLanguage("python", require_python()), r.registerLanguage("python-repl", require_python_repl()), r.registerLanguage("q", require_q()), r.registerLanguage("qml", require_qml()), r.registerLanguage("r", require_r()), r.registerLanguage("reasonml", require_reasonml()), r.registerLanguage("rib", require_rib()), r.registerLanguage("roboconf", require_roboconf()), r.registerLanguage("routeros", require_routeros()), r.registerLanguage("rsl", require_rsl()), r.registerLanguage("ruleslanguage", require_ruleslanguage()), r.registerLanguage("rust", require_rust()), r.registerLanguage("sas", require_sas()), r.registerLanguage("scala", require_scala()), r.registerLanguage("scheme", require_scheme()), r.registerLanguage("scilab", require_scilab()), r.registerLanguage("scss", require_scss()), r.registerLanguage("shell", require_shell()), r.registerLanguage("smali", require_smali()), r.registerLanguage("smalltalk", require_smalltalk()), r.registerLanguage("sml", require_sml()), r.registerLanguage("sqf", require_sqf()), r.registerLanguage("sql", require_sql()), r.registerLanguage("stan", require_stan()), r.registerLanguage("stata", require_stata()), r.registerLanguage("step21", require_step21()), r.registerLanguage("stylus", require_stylus()), r.registerLanguage("subunit", require_subunit()), r.registerLanguage("swift", require_swift()), r.registerLanguage("taggerscript", require_taggerscript()), r.registerLanguage("yaml", require_yaml()), r.registerLanguage("tap", require_tap()), r.registerLanguage("tcl", require_tcl()), r.registerLanguage("thrift", require_thrift()), r.registerLanguage("tp", require_tp()), r.registerLanguage("twig", require_twig()), r.registerLanguage("typescript", require_typescript()), r.registerLanguage("vala", require_vala()), r.registerLanguage("vbnet", require_vbnet()), r.registerLanguage("vbscript", require_vbscript()), r.registerLanguage("vbscript-html", require_vbscript_html()), r.registerLanguage("verilog", require_verilog()), r.registerLanguage("vhdl", require_vhdl()), r.registerLanguage("vim", require_vim()), r.registerLanguage("wasm", require_wasm()), r.registerLanguage("wren", require_wren()), r.registerLanguage("x86asm", require_x86asm()), r.registerLanguage("xl", require_xl()), r.registerLanguage("xquery", require_xquery()), r.registerLanguage("zephir", require_zephir()), r.HighlightJS = r, r.default = r, n.exports = r;
|
|
23519
|
-
})))())).default, _hoisted_1$
|
|
23521
|
+
})))())).default, _hoisted_1$40 = { key: 1 }, tool_btn_default = /* @__PURE__ */ defineComponent({
|
|
23520
23522
|
__name: "tool-btn",
|
|
23521
23523
|
props: {
|
|
23522
23524
|
description: {},
|
|
@@ -23545,9 +23547,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23545
23547
|
}]),
|
|
23546
23548
|
style: normalizeStyle({ "--ai-tool-btn-active-color": e.id === "like" || e.id === "activeLike" ? "#3a84ff" : "#E71818" }),
|
|
23547
23549
|
onClick: o
|
|
23548
|
-
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23550
|
+
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$40, toDisplayString(e.name), 1))], 6)), [[unref(directive), a.value]]);
|
|
23549
23551
|
}
|
|
23550
|
-
}), _hoisted_1$
|
|
23552
|
+
}), _hoisted_1$39 = { class: "code-content-wrapper" }, _hoisted_2$30 = { class: "code-content-header" }, _hoisted_3$21 = { class: "code-header-language" }, _hoisted_4$20 = { class: "hljs-pre" }, _hoisted_5$13 = ["innerHTML"], _hoisted_6$7 = ["innerHTML"], MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
|
|
23551
23553
|
__name: "code-content",
|
|
23552
23554
|
props: { token: {} },
|
|
23553
23555
|
emits: ["mounted"],
|
|
@@ -23617,15 +23619,15 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23617
23619
|
immediate: !0,
|
|
23618
23620
|
deep: !0
|
|
23619
23621
|
});
|
|
23620
|
-
let
|
|
23622
|
+
let r_ = () => {
|
|
23621
23623
|
let e = a.value?.innerText;
|
|
23622
23624
|
e && l(e);
|
|
23623
23625
|
};
|
|
23624
|
-
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23626
|
+
return (e, n) => (openBlock(), createElementBlock("div", _hoisted_1$39, [createElementVNode("div", _hoisted_2$30, [createElementVNode("span", _hoisted_3$21, toDisplayString(s.value), 1), createVNode(tool_btn_default, {
|
|
23625
23627
|
id: "copy",
|
|
23626
23628
|
description: "复制",
|
|
23627
23629
|
name: "复制",
|
|
23628
|
-
onClick:
|
|
23630
|
+
onClick: r_
|
|
23629
23631
|
})]), createElementVNode("pre", _hoisted_4$20, [createElementVNode("code", {
|
|
23630
23632
|
ref_key: "codeRef",
|
|
23631
23633
|
ref: a,
|
|
@@ -23644,7 +23646,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23644
23646
|
}, null, 8, _hoisted_6$7)) : createCommentVNode("v-if", !0)
|
|
23645
23647
|
], 2)])]));
|
|
23646
23648
|
}
|
|
23647
|
-
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$
|
|
23649
|
+
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$38 = { class: "md-image-wrapper" }, _hoisted_2$29 = {
|
|
23648
23650
|
key: 0,
|
|
23649
23651
|
class: "md-image-loading"
|
|
23650
23652
|
}, _hoisted_3$20 = { class: "md-image-loading-text" }, _hoisted_4$19 = { class: "md-image-error" }, _hoisted_5$12 = { class: "md-image-error-text" }, _hoisted_6$6 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -23695,7 +23697,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23695
23697
|
l.value = !1, E(), k.value ? j(e) : (a.value = !0, s.value = !1);
|
|
23696
23698
|
}, { immediate: !0 }), watch(k, (e) => {
|
|
23697
23699
|
e && r.src && j(r.src);
|
|
23698
|
-
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$
|
|
23700
|
+
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$38, [createCommentVNode(" 加载中、URL 不完整、或 URL 不稳定时显示 Loading "), m.value ? (openBlock(), createElementBlock("span", _hoisted_2$29, [createVNode(unref(Loading), {
|
|
23699
23701
|
mode: "spin",
|
|
23700
23702
|
size: "mini",
|
|
23701
23703
|
theme: "primary"
|
|
@@ -23927,7 +23929,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23927
23929
|
innerHTML: r.value
|
|
23928
23930
|
}, null, 8, ["class", "innerHTML"]));
|
|
23929
23931
|
}
|
|
23930
|
-
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
23932
|
+
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$37 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
|
|
23931
23933
|
__name: "mermaid-content",
|
|
23932
23934
|
props: { token: {} },
|
|
23933
23935
|
emits: ["mounted"],
|
|
@@ -23976,13 +23978,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23976
23978
|
ref: i,
|
|
23977
23979
|
class: "mermaid-content",
|
|
23978
23980
|
innerHTML: r.value
|
|
23979
|
-
}, null, 8, _hoisted_1$
|
|
23981
|
+
}, null, 8, _hoisted_1$37));
|
|
23980
23982
|
}
|
|
23981
|
-
}), _hoisted_1$
|
|
23983
|
+
}), _hoisted_1$36 = { class: "ai-error-content" }, _hoisted_2$28 = { class: "ai-error-content-text" }, common_error_content_default = /* @__PURE__ */ defineComponent({
|
|
23982
23984
|
__name: "common-error-content",
|
|
23983
23985
|
props: { content: {} },
|
|
23984
23986
|
setup(e) {
|
|
23985
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
23987
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$36, [createVNode(unref(ErrorIcon)), createElementVNode("div", _hoisted_2$28, toDisplayString(e.content), 1)]));
|
|
23986
23988
|
}
|
|
23987
23989
|
}), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
|
|
23988
23990
|
keyCounterMap = /* @__PURE__ */ new Map();
|
|
@@ -24145,7 +24147,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24145
24147
|
setup(e) {
|
|
24146
24148
|
return () => tokensToVNodes(e.tokens, e.options);
|
|
24147
24149
|
}
|
|
24148
|
-
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
24150
|
+
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$35 = { class: "markdown-content" }, _hoisted_2$27 = {
|
|
24149
24151
|
key: 1,
|
|
24150
24152
|
class: "markdown-body"
|
|
24151
24153
|
}, markdown_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -24238,7 +24240,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24238
24240
|
leading: !0,
|
|
24239
24241
|
trailing: !0
|
|
24240
24242
|
});
|
|
24241
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24243
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$35, [e.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
24242
24244
|
key: 0,
|
|
24243
24245
|
content: e.content
|
|
24244
24246
|
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$27, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e, n) => (openBlock(), createElementBlock(Fragment, { key: n }, [d(e) ? (openBlock(), createBlock(unref(mermaid_content_default), {
|
|
@@ -24260,7 +24262,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24260
24262
|
onVnodeMounted: unref(E)
|
|
24261
24263
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
24262
24264
|
}
|
|
24263
|
-
}), _hoisted_1$
|
|
24265
|
+
}), _hoisted_1$34 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
|
|
24264
24266
|
__name: "reference-content",
|
|
24265
24267
|
props: { content: {} },
|
|
24266
24268
|
setup(e) {
|
|
@@ -24280,7 +24282,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
24280
24282
|
createElementVNode("span", {
|
|
24281
24283
|
class: "ai-reference-item-title",
|
|
24282
24284
|
onClick: (n) => e.url && r(e.url, n)
|
|
24283
|
-
}, toDisplayString(e.title), 9, _hoisted_1$
|
|
24285
|
+
}, toDisplayString(e.title), 9, _hoisted_1$34),
|
|
24284
24286
|
e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
|
|
24285
24287
|
key: 0,
|
|
24286
24288
|
onClick: (n) => e.url && r(e.url, n)
|
|
@@ -24659,7 +24661,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24659
24661
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24660
24662
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24661
24663
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24662
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24664
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, r_ = !1, G = getCurrentDocument(r), K = {
|
|
24663
24665
|
_document: G,
|
|
24664
24666
|
_isBlock: s
|
|
24665
24667
|
};
|
|
@@ -24670,7 +24672,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24670
24672
|
H && setSelectionToDOM(G, r, d, K);
|
|
24671
24673
|
}), J = () => {
|
|
24672
24674
|
d = takeSelectionSnapshot(r, K);
|
|
24673
|
-
},
|
|
24675
|
+
}, i_ = () => {
|
|
24674
24676
|
let e = q._flush();
|
|
24675
24677
|
if (q._record(!1), e.length) {
|
|
24676
24678
|
let n;
|
|
@@ -24693,8 +24695,8 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24693
24695
|
r && (l(n(r[0])), d = r[1]);
|
|
24694
24696
|
}
|
|
24695
24697
|
}
|
|
24696
|
-
},
|
|
24697
|
-
B ||
|
|
24698
|
+
}, a_ = () => {
|
|
24699
|
+
B || i_();
|
|
24698
24700
|
}, Q = (e) => {
|
|
24699
24701
|
e.preventDefault();
|
|
24700
24702
|
let n = e.inputType;
|
|
@@ -24709,47 +24711,47 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24709
24711
|
}
|
|
24710
24712
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24711
24713
|
}
|
|
24712
|
-
B ||
|
|
24713
|
-
},
|
|
24714
|
+
B || i_();
|
|
24715
|
+
}, o_ = () => {
|
|
24714
24716
|
B || J(), B = !0;
|
|
24715
24717
|
}, $ = () => {
|
|
24716
|
-
|
|
24717
|
-
},
|
|
24718
|
+
i_();
|
|
24719
|
+
}, s_ = () => {
|
|
24718
24720
|
H = !0, J();
|
|
24719
|
-
},
|
|
24721
|
+
}, c_ = () => {
|
|
24720
24722
|
H = !1;
|
|
24721
|
-
},
|
|
24723
|
+
}, l_ = () => {
|
|
24722
24724
|
if (L) {
|
|
24723
24725
|
L = !1;
|
|
24724
24726
|
return;
|
|
24725
24727
|
}
|
|
24726
|
-
H && !B && !
|
|
24727
|
-
},
|
|
24728
|
+
H && !B && !r_ && J();
|
|
24729
|
+
}, u_ = (e) => {
|
|
24728
24730
|
J(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24731
|
+
}, d_ = (e) => {
|
|
24732
|
+
e.preventDefault(), u_(e.clipboardData);
|
|
24733
|
+
}, f_ = (e) => {
|
|
24734
|
+
e.preventDefault(), m || (u_(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24729
24735
|
}, p_ = (e) => {
|
|
24730
|
-
e.preventDefault(), f_(e.clipboardData);
|
|
24731
|
-
}, m_ = (e) => {
|
|
24732
|
-
e.preventDefault(), m || (f_(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24733
|
-
}, h_ = (e) => {
|
|
24734
24736
|
e.preventDefault();
|
|
24735
24737
|
let [n, r] = range(d);
|
|
24736
24738
|
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, K)));
|
|
24737
|
-
},
|
|
24739
|
+
}, m_ = (e) => {
|
|
24738
24740
|
e.preventDefault();
|
|
24739
24741
|
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, K);
|
|
24740
24742
|
if (n && i) {
|
|
24741
24743
|
let e = new Transaction();
|
|
24742
|
-
|
|
24744
|
+
r_ && e.delete(...range(d));
|
|
24743
24745
|
let o = e.transform(i);
|
|
24744
24746
|
e.select(o, o).insert(o, a(n, K)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24745
24747
|
}
|
|
24746
|
-
},
|
|
24747
|
-
|
|
24748
|
-
},
|
|
24749
|
-
|
|
24748
|
+
}, h_ = (e) => {
|
|
24749
|
+
r_ = !0, u_(e.dataTransfer);
|
|
24750
|
+
}, g_ = () => {
|
|
24751
|
+
r_ = !1;
|
|
24750
24752
|
};
|
|
24751
|
-
return G.addEventListener("selectionchange",
|
|
24752
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, q._dispose(), G.removeEventListener("selectionchange",
|
|
24753
|
+
return G.addEventListener("selectionchange", l_), r.addEventListener("keydown", Z), r.addEventListener("input", a_), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", o_), r.addEventListener("compositionend", $), r.addEventListener("focus", s_), r.addEventListener("blur", c_), r.addEventListener("copy", d_), r.addEventListener("cut", f_), r.addEventListener("paste", p_), r.addEventListener("drop", m_), r.addEventListener("dragstart", h_), r.addEventListener("dragend", g_), () => {
|
|
24754
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, q._dispose(), G.removeEventListener("selectionchange", l_), r.removeEventListener("keydown", Z), r.removeEventListener("input", a_), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", o_), r.removeEventListener("compositionend", $), r.removeEventListener("focus", s_), r.removeEventListener("blur", c_), r.removeEventListener("copy", d_), r.removeEventListener("cut", f_), r.removeEventListener("paste", p_), r.removeEventListener("drop", m_), r.removeEventListener("dragstart", h_), r.removeEventListener("dragend", g_));
|
|
24753
24755
|
};
|
|
24754
24756
|
},
|
|
24755
24757
|
command: (e, ...n) => {
|
|
@@ -24829,7 +24831,7 @@ let UploadStatus = /* @__PURE__ */ function(e) {
|
|
|
24829
24831
|
}({}), MessageToolsStatus = /* @__PURE__ */ function(e) {
|
|
24830
24832
|
return e.Disabled = "disabled", e.Hidden = "hidden", e;
|
|
24831
24833
|
}({});
|
|
24832
|
-
var _hoisted_1$
|
|
24834
|
+
var _hoisted_1$33 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
|
|
24833
24835
|
__name: "file-upload-btn",
|
|
24834
24836
|
props: {
|
|
24835
24837
|
accept: { default: "image/*" },
|
|
@@ -24858,7 +24860,7 @@ var _hoisted_1$34 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], fi
|
|
|
24858
24860
|
}
|
|
24859
24861
|
n.value = "";
|
|
24860
24862
|
};
|
|
24861
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24863
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$33, [createElementVNode("input", {
|
|
24862
24864
|
ref_key: "fileInputRef",
|
|
24863
24865
|
ref: a,
|
|
24864
24866
|
accept: e.accept,
|
|
@@ -24871,19 +24873,19 @@ var _hoisted_1$34 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], fi
|
|
|
24871
24873
|
onClick: o
|
|
24872
24874
|
}, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
|
|
24873
24875
|
...e.tippyOptions,
|
|
24874
|
-
content: unref(t$1)("
|
|
24876
|
+
content: unref(t$1)("上传图片, 最多支持上传 3 个, 最大支持 2.4MB"),
|
|
24875
24877
|
theme: "ai-chat-box",
|
|
24876
24878
|
offset: [0, 16]
|
|
24877
24879
|
}]])]));
|
|
24878
24880
|
}
|
|
24879
|
-
}), _hoisted_1$
|
|
24881
|
+
}), _hoisted_1$32 = { class: "ai-cite-content" }, _hoisted_2$25 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
|
|
24880
24882
|
__name: "cite-content",
|
|
24881
24883
|
props: {
|
|
24882
24884
|
content: {},
|
|
24883
24885
|
onClose: { type: Function }
|
|
24884
24886
|
},
|
|
24885
24887
|
setup(e) {
|
|
24886
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24888
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$32, [
|
|
24887
24889
|
createVNode(unref(CiteIcon)),
|
|
24888
24890
|
createElementVNode("span", _hoisted_2$25, toDisplayString(e.content), 1),
|
|
24889
24891
|
e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
|
|
@@ -24892,7 +24894,7 @@ var _hoisted_1$34 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], fi
|
|
|
24892
24894
|
})) : createCommentVNode("v-if", !0)
|
|
24893
24895
|
]));
|
|
24894
24896
|
}
|
|
24895
|
-
}), _hoisted_1$
|
|
24897
|
+
}), _hoisted_1$31 = { class: "ai-image-preview-toolbar" }, _hoisted_2$24 = { class: "ai-image-preview-toolbar-inner" }, _hoisted_3$19 = {
|
|
24896
24898
|
key: 0,
|
|
24897
24899
|
class: "ai-image-preview-toolbar-pages"
|
|
24898
24900
|
}, _hoisted_4$18 = {
|
|
@@ -24917,7 +24919,7 @@ var _hoisted_1$34 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], fi
|
|
|
24917
24919
|
],
|
|
24918
24920
|
setup(e, { emit: n }) {
|
|
24919
24921
|
let r = n;
|
|
24920
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
24922
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", _hoisted_2$24, [
|
|
24921
24923
|
e.isMultiple ? (openBlock(), createElementBlock("span", _hoisted_3$19, toDisplayString(e.activeIndex + 1) + " / " + toDisplayString(e.total), 1)) : createCommentVNode("v-if", !0),
|
|
24922
24924
|
e.isMultiple ? (openBlock(), createElementBlock("span", _hoisted_4$18)) : createCommentVNode("v-if", !0),
|
|
24923
24925
|
createElementVNode("div", {
|
|
@@ -25019,7 +25021,7 @@ function usePreviewKeyboard(e) {
|
|
|
25019
25021
|
l();
|
|
25020
25022
|
});
|
|
25021
25023
|
}
|
|
25022
|
-
var _hoisted_1$
|
|
25024
|
+
var _hoisted_1$30 = ["src"], _hoisted_2$23 = {
|
|
25023
25025
|
key: 1,
|
|
25024
25026
|
class: "ai-image-preview-error"
|
|
25025
25027
|
}, _hoisted_3$18 = { class: "ai-image-preview-error-text" }, _hoisted_4$17 = {
|
|
@@ -25055,16 +25057,16 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25055
25057
|
setup(e) {
|
|
25056
25058
|
let n = e, r = useModel(e, "visible"), i = useModel(e, "current"), { imageStyle: a, resetTransform: l, zoomIn: E, zoomOut: k, rotateCW: j, handleWheel: I, handleDragStart: L } = useImageTransform(), z = shallowRef("loading"), B = [], H = () => {
|
|
25057
25059
|
B.forEach((e) => URL.revokeObjectURL(e)), B.length = 0;
|
|
25058
|
-
},
|
|
25060
|
+
}, r_ = (e) => {
|
|
25059
25061
|
let n = URL.createObjectURL(e);
|
|
25060
25062
|
return B.push(n), {
|
|
25061
25063
|
url: n,
|
|
25062
25064
|
name: e.name,
|
|
25063
25065
|
file: e
|
|
25064
25066
|
};
|
|
25065
|
-
}, G = computed(() => (H(), n.images.map((e) => e instanceof File ?
|
|
25067
|
+
}, G = computed(() => (H(), n.images.map((e) => e instanceof File ? r_(e) : typeof e == "string" ? { url: e } : e.file && !e.url ? {
|
|
25066
25068
|
...e,
|
|
25067
|
-
url:
|
|
25069
|
+
url: r_(e.file).url
|
|
25068
25070
|
} : e)));
|
|
25069
25071
|
watch(r, (e) => {
|
|
25070
25072
|
e || H();
|
|
@@ -25075,17 +25077,17 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25075
25077
|
width: e.width,
|
|
25076
25078
|
resolution: e.resolution
|
|
25077
25079
|
};
|
|
25078
|
-
}),
|
|
25080
|
+
}), a_ = () => {
|
|
25079
25081
|
r.value = !1;
|
|
25080
25082
|
}, Q = () => {
|
|
25081
|
-
n.maskClosable &&
|
|
25082
|
-
},
|
|
25083
|
+
n.maskClosable && a_();
|
|
25084
|
+
}, o_ = (e) => {
|
|
25083
25085
|
i.value = e, l(), z.value = "loading";
|
|
25086
|
+
}, s_ = () => {
|
|
25087
|
+
o_(i.value > 0 ? i.value - 1 : G.value.length - 1);
|
|
25088
|
+
}, c_ = () => {
|
|
25089
|
+
o_(i.value < G.value.length - 1 ? i.value + 1 : 0);
|
|
25084
25090
|
}, l_ = () => {
|
|
25085
|
-
c_(i.value > 0 ? i.value - 1 : G.value.length - 1);
|
|
25086
|
-
}, u_ = () => {
|
|
25087
|
-
c_(i.value < G.value.length - 1 ? i.value + 1 : 0);
|
|
25088
|
-
}, d_ = () => {
|
|
25089
25091
|
let e = K.value, r = e.downloadUrl || e.url;
|
|
25090
25092
|
if (n.onDownload) {
|
|
25091
25093
|
n.onDownload(r);
|
|
@@ -25093,16 +25095,16 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25093
25095
|
}
|
|
25094
25096
|
let i = document.createElement("a");
|
|
25095
25097
|
i.href = r, i.download = e.name || r.split("/").pop() || "image", i.target = "_blank", document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
25096
|
-
},
|
|
25098
|
+
}, u_ = () => {
|
|
25097
25099
|
z.value = "loaded";
|
|
25098
|
-
},
|
|
25100
|
+
}, d_ = () => {
|
|
25099
25101
|
z.value = "error";
|
|
25100
25102
|
};
|
|
25101
25103
|
return usePreviewKeyboard({
|
|
25102
25104
|
visible: r,
|
|
25103
|
-
onClose:
|
|
25104
|
-
onPrev: () => q.value &&
|
|
25105
|
-
onNext: () => q.value &&
|
|
25105
|
+
onClose: a_,
|
|
25106
|
+
onPrev: () => q.value && s_(),
|
|
25107
|
+
onNext: () => q.value && c_()
|
|
25106
25108
|
}), (n, d) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-image-preview-fade" }, {
|
|
25107
25109
|
default: withCtx(() => [r.value ? (openBlock(), createElementBlock("div", {
|
|
25108
25110
|
key: 0,
|
|
@@ -25111,14 +25113,14 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25111
25113
|
}, [
|
|
25112
25114
|
createElementVNode("div", {
|
|
25113
25115
|
class: "ai-image-preview-close",
|
|
25114
|
-
onClick:
|
|
25116
|
+
onClick: a_
|
|
25115
25117
|
}, [createVNode(unref(PreviewCloseIcon), { class: "ai-image-preview-close-icon" })]),
|
|
25116
25118
|
q.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", {
|
|
25117
25119
|
class: "ai-image-preview-arrow ai-image-preview-arrow-left",
|
|
25118
|
-
onClick:
|
|
25120
|
+
onClick: s_
|
|
25119
25121
|
}, [createVNode(unref(ArrowLeftIcon), { class: "ai-image-preview-arrow-icon" })]), createElementVNode("div", {
|
|
25120
25122
|
class: "ai-image-preview-arrow ai-image-preview-arrow-right",
|
|
25121
|
-
onClick:
|
|
25123
|
+
onClick: c_
|
|
25122
25124
|
}, [createVNode(unref(ArrowRightPreviewIcon), { class: "ai-image-preview-arrow-icon" })])], 64)) : createCommentVNode("v-if", !0),
|
|
25123
25125
|
createElementVNode("div", {
|
|
25124
25126
|
class: "ai-image-preview-body",
|
|
@@ -25131,9 +25133,9 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25131
25133
|
draggable: "false",
|
|
25132
25134
|
src: K.value.url,
|
|
25133
25135
|
style: normalizeStyle(unref(a)),
|
|
25134
|
-
onError:
|
|
25135
|
-
onLoad:
|
|
25136
|
-
}, null, 44, _hoisted_1$
|
|
25136
|
+
onError: d_,
|
|
25137
|
+
onLoad: u_
|
|
25138
|
+
}, null, 44, _hoisted_1$30)),
|
|
25137
25139
|
z.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_2$23, [createVNode(unref(ImageBrokenIcon), { class: "ai-image-preview-error-icon" }), createElementVNode("p", _hoisted_3$18, toDisplayString(unref(t$1)("抱歉,图片加载失败,可尝试重新加载")), 1)])) : createCommentVNode("v-if", !0),
|
|
25138
25140
|
z.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_4$17, [K.value.thumbnailUrl ? (openBlock(), createElementBlock("img", {
|
|
25139
25141
|
key: 0,
|
|
@@ -25149,7 +25151,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25149
25151
|
"is-multiple": q.value,
|
|
25150
25152
|
"show-info": e.showInfo,
|
|
25151
25153
|
total: G.value.length,
|
|
25152
|
-
onDownload:
|
|
25154
|
+
onDownload: l_,
|
|
25153
25155
|
onReset: unref(l),
|
|
25154
25156
|
onRotate: unref(j),
|
|
25155
25157
|
onZoomIn: unref(E),
|
|
@@ -25173,7 +25175,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25173
25175
|
_: 3
|
|
25174
25176
|
})]));
|
|
25175
25177
|
}
|
|
25176
|
-
}), _hoisted_1$
|
|
25178
|
+
}), _hoisted_1$29 = { class: "ai-files-content" }, _hoisted_2$22 = [
|
|
25177
25179
|
"alt",
|
|
25178
25180
|
"src",
|
|
25179
25181
|
"onClick",
|
|
@@ -25200,7 +25202,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25200
25202
|
let n = j.value.indexOf(e);
|
|
25201
25203
|
n < 0 || (k.value = n, E.value = !0);
|
|
25202
25204
|
};
|
|
25203
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25205
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$29, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.files, (n) => (openBlock(), createElementBlock("div", {
|
|
25204
25206
|
key: n.file?.name,
|
|
25205
25207
|
class: normalizeClass(["file-content", { "is-file-object": !s(n) || a[l(n)] }])
|
|
25206
25208
|
}, [s(n) && !a[l(n)] ? (openBlock(), createElementBlock("img", {
|
|
@@ -25230,7 +25232,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25230
25232
|
"images"
|
|
25231
25233
|
])]));
|
|
25232
25234
|
}
|
|
25233
|
-
}), _hoisted_1$
|
|
25235
|
+
}), _hoisted_1$28 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
|
|
25234
25236
|
__name: "ai-prompt-list",
|
|
25235
25237
|
props: {
|
|
25236
25238
|
onSelect: { type: Function },
|
|
@@ -25250,7 +25252,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25250
25252
|
key: n,
|
|
25251
25253
|
class: normalizeClass(["ai-prompt-list-item", { "is-active": unref(i) === r }]),
|
|
25252
25254
|
onClick: (r) => e.onSelect(n)
|
|
25253
|
-
}, toDisplayString(n), 11, _hoisted_1$
|
|
25255
|
+
}, toDisplayString(n), 11, _hoisted_1$28))), 128))], 512));
|
|
25254
25256
|
}
|
|
25255
25257
|
}), DelayMs = 300;
|
|
25256
25258
|
const OverflowTips = {
|
|
@@ -25290,7 +25292,7 @@ const OverflowTips = {
|
|
|
25290
25292
|
e.removeEventListener("mouseenter", e.mouseEnterFunc), e.removeEventListener("mouseleave", e.mouseLeaveFunc), e.unObserverFunc?.(), e.mouseEnterFunc = void 0, e.mouseLeaveFunc = void 0, e.unObserverFunc = void 0;
|
|
25291
25293
|
}
|
|
25292
25294
|
};
|
|
25293
|
-
var _hoisted_1$
|
|
25295
|
+
var _hoisted_1$27 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$21 = ["onClick"], _hoisted_3$16 = ["onClick"], _hoisted_4$15 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
|
|
25294
25296
|
__name: "ai-slash-menu",
|
|
25295
25297
|
props: {
|
|
25296
25298
|
onSelect: { type: Function },
|
|
@@ -25333,7 +25335,7 @@ var _hoisted_1$28 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
|
|
|
25333
25335
|
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (n, r) => (openBlock(), createElementBlock(Fragment, null, [n.items.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
25334
25336
|
key: r,
|
|
25335
25337
|
class: "ai-slash-group"
|
|
25336
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
25338
|
+
}, [createElementVNode("div", _hoisted_1$27, [
|
|
25337
25339
|
(openBlock(), createElementBlock("svg", {
|
|
25338
25340
|
class: "title-icon",
|
|
25339
25341
|
style: normalizeStyle({ transform: i.value.includes(n.type) ? "rotate(90deg)" : "rotate(0deg)" }),
|
|
@@ -25373,7 +25375,7 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
|
|
|
25373
25375
|
plain: (e) => e.label
|
|
25374
25376
|
}) }
|
|
25375
25377
|
});
|
|
25376
|
-
var _hoisted_1$
|
|
25378
|
+
var _hoisted_1$26 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-placeholder"], _hoisted_3$15 = { key: 0 }, _hoisted_4$14 = ["data-tag-type"], _hoisted_5$8 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
|
|
25377
25379
|
__name: "ai-slash-input",
|
|
25378
25380
|
props: {
|
|
25379
25381
|
modelValue: {},
|
|
@@ -25394,9 +25396,9 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25394
25396
|
set(e) {
|
|
25395
25397
|
s("update:modelValue", e, e?.flat()?.filter((e) => e.type === "tag")?.map((e) => l.resources?.find((n) => (n.id === e.data.value || n.name === e.data.value) && n.type === e.data.type) || null)?.filter((e) => !!e) || []), n();
|
|
25396
25398
|
}
|
|
25397
|
-
})), d = shallowRef("slash"), T = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition:
|
|
25399
|
+
})), d = shallowRef("slash"), T = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition: r_ } = useCommandSelection(), G = () => {
|
|
25398
25400
|
setTimeout(() => {
|
|
25399
|
-
let e =
|
|
25401
|
+
let e = i_();
|
|
25400
25402
|
T.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
25401
25403
|
left: e.coordinates?.left || 0,
|
|
25402
25404
|
top: e.coordinates?.top || 0,
|
|
@@ -25409,7 +25411,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25409
25411
|
e.key === "@" && (d.value = "slash", G()), e.key === "/" && (d.value = "prompt", G());
|
|
25410
25412
|
}, J = () => {
|
|
25411
25413
|
T.value = "";
|
|
25412
|
-
},
|
|
25414
|
+
}, i_ = () => {
|
|
25413
25415
|
let e = {
|
|
25414
25416
|
isActive: !1,
|
|
25415
25417
|
query: "",
|
|
@@ -25440,27 +25442,27 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25440
25442
|
return e;
|
|
25441
25443
|
}
|
|
25442
25444
|
}, Z = (e, n) => e.reduce((e, r, i) => i >= n ? e : (r.type === "text" && (e += r.text?.length || 0), r.type === "tag" && (e += 1), e), 0), Q = (e) => {
|
|
25443
|
-
L.command(
|
|
25445
|
+
L.command(r_);
|
|
25444
25446
|
let { column: n, line: r } = H.value;
|
|
25445
|
-
L.command(DeleteTag, [r, n - T.value.length - 1], [r, n]), L.command(InsertTag, [r, n], e), L.command(InsertText, [r, n + T.value.length + 1 + 1], " "), a.value?.hide(),
|
|
25446
|
-
},
|
|
25447
|
+
L.command(DeleteTag, [r, n - T.value.length - 1], [r, n]), L.command(InsertTag, [r, n], e), L.command(InsertText, [r, n + T.value.length + 1 + 1], " "), a.value?.hide(), s_();
|
|
25448
|
+
}, s_ = () => {
|
|
25447
25449
|
setTimeout(() => {
|
|
25448
25450
|
let e = window.getSelection(), n = document.createRange();
|
|
25449
25451
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25450
25452
|
}, 100);
|
|
25451
|
-
},
|
|
25452
|
-
L.command(ReplaceAll, e),
|
|
25453
|
+
}, c_ = (e) => {
|
|
25454
|
+
L.command(ReplaceAll, e), s_();
|
|
25453
25455
|
};
|
|
25454
25456
|
watchEffect(() => {
|
|
25455
25457
|
let e = l.resources?.filter((e) => !u.value?.some((n) => n.some((n) => n.type === "tag" && n.data.value === e.id && n.data.type === e.type)));
|
|
25456
25458
|
T.value ? (j.value = e.filter((e) => e.name.toLowerCase().includes(T.value.toLowerCase())), I.value = l.prompts.filter((e) => e.toLowerCase().includes(T.value.toLowerCase()))) : (j.value = e, I.value = l.prompts), !j.value.length && !I.value.length && a.value?.hide();
|
|
25457
25459
|
});
|
|
25458
|
-
let
|
|
25460
|
+
let l_ = (e, n, r, i) => {
|
|
25459
25461
|
if (n.type === "tag") {
|
|
25460
25462
|
let n = Z(e, r);
|
|
25461
25463
|
L.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25462
25464
|
}
|
|
25463
|
-
},
|
|
25465
|
+
}, u_ = (e) => {
|
|
25464
25466
|
let n = e.clipboardData?.items;
|
|
25465
25467
|
if (!n) return;
|
|
25466
25468
|
let r = [];
|
|
@@ -25469,7 +25471,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25469
25471
|
n && r.push(n);
|
|
25470
25472
|
}
|
|
25471
25473
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25472
|
-
},
|
|
25474
|
+
}, f_ = () => {
|
|
25473
25475
|
z?.(), L = createEditor({
|
|
25474
25476
|
doc: u.value,
|
|
25475
25477
|
schema: tagSchema,
|
|
@@ -25478,17 +25480,17 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25478
25480
|
},
|
|
25479
25481
|
onKeyDown: (e) => K(e)
|
|
25480
25482
|
}), z = L.input(i.value);
|
|
25481
|
-
},
|
|
25483
|
+
}, p_ = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
|
|
25482
25484
|
return onMounted(() => {
|
|
25483
|
-
|
|
25485
|
+
f_(), i.value?.addEventListener("paste", u_);
|
|
25484
25486
|
}), onUnmounted(() => {
|
|
25485
|
-
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste",
|
|
25487
|
+
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", u_);
|
|
25486
25488
|
}), n({
|
|
25487
25489
|
cleanup: () => {
|
|
25488
25490
|
L.command(ReplaceAll, "");
|
|
25489
25491
|
},
|
|
25490
|
-
focus:
|
|
25491
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25492
|
+
focus: s_
|
|
25493
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$26, [createElementVNode("div", {
|
|
25492
25494
|
ref_key: "editorRef",
|
|
25493
25495
|
ref: i,
|
|
25494
25496
|
"aria-placeholder": e.placeholder,
|
|
@@ -25501,7 +25503,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25501
25503
|
"data-tag-type": r.data.type
|
|
25502
25504
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25503
25505
|
class: "mention-tag-remove-icon",
|
|
25504
|
-
onClick: (a) =>
|
|
25506
|
+
onClick: (a) => l_(e, r, i, n)
|
|
25505
25507
|
}, null, 8, ["onClick"])], 10, _hoisted_4$14)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$20), createVNode(unref(Tippy), {
|
|
25506
25508
|
ref_key: "tippyRef",
|
|
25507
25509
|
ref: a,
|
|
@@ -25516,7 +25518,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25516
25518
|
"trigger-target": i.value,
|
|
25517
25519
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25518
25520
|
onHidden: J,
|
|
25519
|
-
onShow:
|
|
25521
|
+
onShow: p_
|
|
25520
25522
|
}, {
|
|
25521
25523
|
content: withCtx(() => [d.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25522
25524
|
key: 0,
|
|
@@ -25524,7 +25526,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25524
25526
|
"resource-list": j.value
|
|
25525
25527
|
}, null, 8, ["resource-list"])) : d.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25526
25528
|
key: 1,
|
|
25527
|
-
"on-select":
|
|
25529
|
+
"on-select": c_,
|
|
25528
25530
|
prompts: I.value
|
|
25529
25531
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25530
25532
|
_: 1
|
|
@@ -25534,7 +25536,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25534
25536
|
"z-index"
|
|
25535
25537
|
])]));
|
|
25536
25538
|
}
|
|
25537
|
-
}), _hoisted_1$
|
|
25539
|
+
}), _hoisted_1$25 = { class: "ai-input-attachment" }, input_attachment_default = /* @__PURE__ */ defineComponent({
|
|
25538
25540
|
__name: "input-attachment",
|
|
25539
25541
|
props: {
|
|
25540
25542
|
messageState: {},
|
|
@@ -25547,7 +25549,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25547
25549
|
}, o = () => {
|
|
25548
25550
|
r.messageState === MessageStatus.Disabled || r.messageState === MessageStatus.Pending || r.messageState === MessageStatus.Streaming || i("sendMessage");
|
|
25549
25551
|
};
|
|
25550
|
-
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25552
|
+
return (n, i) => (openBlock(), createElementBlock("div", _hoisted_1$25, [renderSlot(n.$slots, "default"), renderSlot(n.$slots, "send-icon", {}, () => [createElementVNode("div", { class: normalizeClass(["send-message-icon", { ["send-message-icon__" + e.messageState]: !0 }]) }, [e.messageState === unref(MessageStatus).Streaming || e.messageState === unref(MessageStatus).Pending ? withDirectives((openBlock(), createBlock(unref(LoadingMessageIcon), {
|
|
25551
25553
|
key: 0,
|
|
25552
25554
|
onClick: a
|
|
25553
25555
|
}, null, 512)), [[unref(directive), {
|
|
@@ -25565,7 +25567,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25565
25567
|
offset: [0, 16]
|
|
25566
25568
|
}]])], 2)])]));
|
|
25567
25569
|
}
|
|
25568
|
-
}), _hoisted_1$
|
|
25570
|
+
}), _hoisted_1$24 = { class: "chat-input-container" }, _hoisted_2$19 = {
|
|
25569
25571
|
key: 1,
|
|
25570
25572
|
class: "ai-divider"
|
|
25571
25573
|
}, chat_input_default = /* @__PURE__ */ defineComponent({
|
|
@@ -25578,7 +25580,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25578
25580
|
onSendMessage: {},
|
|
25579
25581
|
onStopSending: {},
|
|
25580
25582
|
onUpload: {},
|
|
25581
|
-
placeholder: { default: isEn ? "Input \"/\" to trigger prompt\nInput \"@\" to trigger tool\nUse Shift + Enter to enter a new line" : "输入 “/”唤出 Prompt\n
|
|
25583
|
+
placeholder: { default: isEn ? "Input \"/\" to trigger prompt\nInput \"@\" to trigger tool and MCP\nUse Shift + Enter to enter a new line" : "输入 “/”唤出 Prompt\n输入“@”唤出 工具 和 MCP\n通过 Shift + Enter 进行换行输入" },
|
|
25582
25584
|
prompts: { default: () => [] },
|
|
25583
25585
|
resources: { default: () => [] },
|
|
25584
25586
|
shortcutId: {},
|
|
@@ -25601,7 +25603,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25601
25603
|
"update:modelValue"
|
|
25602
25604
|
], ["update:cite"]),
|
|
25603
25605
|
setup(e, { expose: n, emit: r }) {
|
|
25604
|
-
useCssVars((e) => ({
|
|
25606
|
+
useCssVars((e) => ({ v2ada5094: unref(CHAT_Z_INDEX) }));
|
|
25605
25607
|
let i = useTemplateRef("aiSlashInputRef"), a = useTemplateRef("filesRef"), o = useModel(e, "cite"), s = shallowRef(200), l = e, u = r, T = ref(l.defaultUploadFiles || []), E = computed(() => l.shortcuts?.find((e) => e.id === l.shortcutId)), k = computed(() => l.modelValue?.length < 1 || Array.isArray(l.modelValue) && !docToString(l.modelValue).trim() ? MessageStatus.Disabled : l.messageStatus);
|
|
25606
25608
|
watchPostEffect(() => {
|
|
25607
25609
|
let e = l.inputMaxHeight || 200;
|
|
@@ -25642,7 +25644,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25642
25644
|
o.value = "";
|
|
25643
25645
|
}, H = (e) => {
|
|
25644
25646
|
u("selectShortcut", e);
|
|
25645
|
-
},
|
|
25647
|
+
}, r_ = () => {
|
|
25646
25648
|
u("deleteShortcut");
|
|
25647
25649
|
}, G = (e) => `${e.name}_${e.size}_${e.lastModified}`, K = async (e) => {
|
|
25648
25650
|
if (!l.supportUpload) return;
|
|
@@ -25675,7 +25677,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25675
25677
|
i.value?.focus?.();
|
|
25676
25678
|
},
|
|
25677
25679
|
triggerSendMessage: j
|
|
25678
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
25680
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$24, [renderSlot(n.$slots, "top"), createElementVNode("div", {
|
|
25679
25681
|
class: "chat-input",
|
|
25680
25682
|
style: normalizeStyle({ maxHeight: s.value + "px" })
|
|
25681
25683
|
}, [
|
|
@@ -25732,7 +25734,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25732
25734
|
class: "selected-shortcut-btn",
|
|
25733
25735
|
shortcut: E.value
|
|
25734
25736
|
}, {
|
|
25735
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25737
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: r_ })]),
|
|
25736
25738
|
_: 1
|
|
25737
25739
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25738
25740
|
]),
|
|
@@ -25741,14 +25743,30 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25741
25743
|
}, 8, ["message-state", "tippy-options"])
|
|
25742
25744
|
], 4)]));
|
|
25743
25745
|
}
|
|
25744
|
-
}),
|
|
25746
|
+
}), scroll_btn_default = /* @__PURE__ */ defineComponent({
|
|
25745
25747
|
__name: "scroll-btn",
|
|
25746
25748
|
props: {
|
|
25747
25749
|
disabled: { type: Boolean },
|
|
25750
|
+
loading: { type: Boolean },
|
|
25748
25751
|
title: {}
|
|
25749
25752
|
},
|
|
25750
|
-
|
|
25751
|
-
|
|
25753
|
+
emits: ["click"],
|
|
25754
|
+
setup(e, { emit: n }) {
|
|
25755
|
+
let r = e, i = n, a = (e) => {
|
|
25756
|
+
r.loading || r.disabled || i("click", e);
|
|
25757
|
+
};
|
|
25758
|
+
return (n, r) => (openBlock(), createElementBlock("div", {
|
|
25759
|
+
class: normalizeClass(["ai-scroll-btn", {
|
|
25760
|
+
"is-loading": e.loading,
|
|
25761
|
+
"is-disabled": e.disabled
|
|
25762
|
+
}]),
|
|
25763
|
+
onClick: a
|
|
25764
|
+
}, [e.loading ? (openBlock(), createBlock(unref(Loading), {
|
|
25765
|
+
key: 0,
|
|
25766
|
+
mode: "spin",
|
|
25767
|
+
size: "mini",
|
|
25768
|
+
theme: "primary"
|
|
25769
|
+
})) : renderSlot(n.$slots, "icon", { key: 1 }), renderSlot(n.$slots, "title", {}, () => [createTextVNode(toDisplayString(e.title), 1)])], 2));
|
|
25752
25770
|
}
|
|
25753
25771
|
}), _hoisted_1$23 = { class: "ai-delete-confirm" }, _hoisted_2$18 = { class: "ai-delete-confirm__title" }, _hoisted_3$14 = { class: "ai-delete-confirm__desc" }, _hoisted_4$13 = { class: "ai-delete-confirm__actions" }, delete_tool_default = /* @__PURE__ */ defineComponent({
|
|
25754
25772
|
__name: "delete-tool",
|
|
@@ -26401,7 +26419,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26401
26419
|
await n.onAction?.(e);
|
|
26402
26420
|
}, H = async () => {
|
|
26403
26421
|
await s.value?.triggerSendMessage?.(), i.value = !1;
|
|
26404
|
-
},
|
|
26422
|
+
}, r_ = () => {
|
|
26405
26423
|
i.value = !1;
|
|
26406
26424
|
}, K = () => {
|
|
26407
26425
|
i.value = !1;
|
|
@@ -26433,7 +26451,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26433
26451
|
}, {
|
|
26434
26452
|
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_4$4, [createVNode(unref(Button), {
|
|
26435
26453
|
size: "small",
|
|
26436
|
-
onClick:
|
|
26454
|
+
onClick: r_
|
|
26437
26455
|
}, {
|
|
26438
26456
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(t$1)("取消")), 1)]),
|
|
26439
26457
|
_: 1
|
|
@@ -26532,26 +26550,30 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26532
26550
|
onAgentAction: {},
|
|
26533
26551
|
onAgentFeedback: {},
|
|
26534
26552
|
onUserAction: {},
|
|
26553
|
+
stopLoading: {
|
|
26554
|
+
type: Boolean,
|
|
26555
|
+
default: !1
|
|
26556
|
+
},
|
|
26535
26557
|
onUserInputConfirm: {},
|
|
26536
26558
|
onUserShortcutConfirm: {}
|
|
26537
26559
|
}, {
|
|
26538
|
-
|
|
26539
|
-
|
|
26560
|
+
selectedUserMessages: { required: !1 },
|
|
26561
|
+
selectedUserMessagesModifiers: {}
|
|
26540
26562
|
}),
|
|
26541
|
-
emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:
|
|
26542
|
-
setup(e) {
|
|
26543
|
-
let
|
|
26563
|
+
emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedUserMessages"]),
|
|
26564
|
+
setup(e, { expose: n }) {
|
|
26565
|
+
let r = e, i = useModel(e, "selectedUserMessages"), a = useTemplateRef("messageContainerRef"), s = useTemplateRef("messageContainerBottomRef"), l = ref([]), { toScrollBottom: u, debouncedShowScrollBottomBtn: T } = useContainerScrollProvider(a, s), { copy: E } = useClipboard();
|
|
26544
26566
|
watchEffect(() => {
|
|
26545
|
-
let e = [],
|
|
26546
|
-
for (let i of
|
|
26567
|
+
let e = [], n = [];
|
|
26568
|
+
for (let i of r.messages) {
|
|
26547
26569
|
if (i.role === MessageRole$1.User) {
|
|
26548
|
-
e.length > 0 && (
|
|
26570
|
+
e.length > 0 && (n.push({
|
|
26549
26571
|
messages: e,
|
|
26550
26572
|
type: MessageRole$1.Assistant,
|
|
26551
26573
|
isHover: !1,
|
|
26552
26574
|
checked: !1,
|
|
26553
26575
|
pause: e?.some((e) => e.property?.extra?.pause) ?? !1
|
|
26554
|
-
}), e = []),
|
|
26576
|
+
}), e = []), n.push({
|
|
26555
26577
|
messages: [i],
|
|
26556
26578
|
type: MessageRole$1.User,
|
|
26557
26579
|
isHover: !1,
|
|
@@ -26560,7 +26582,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26560
26582
|
continue;
|
|
26561
26583
|
}
|
|
26562
26584
|
if (i.role === MessageRole$1.Tool) {
|
|
26563
|
-
let e =
|
|
26585
|
+
let e = r.messages.find((e) => e.role === MessageRole$1.Assistant && e.toolCalls?.some((e) => e.id === i.toolCallId));
|
|
26564
26586
|
if (e) {
|
|
26565
26587
|
let n = e.toolCalls.find((e) => e.id === i.toolCallId);
|
|
26566
26588
|
n.toolMessage = i, e.status = i.error ? MessageStatus.Error : e.status || MessageStatus.Complete;
|
|
@@ -26569,13 +26591,13 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26569
26591
|
}
|
|
26570
26592
|
e.push(i);
|
|
26571
26593
|
}
|
|
26572
|
-
e.length > 0 &&
|
|
26594
|
+
e.length > 0 && n.push({
|
|
26573
26595
|
messages: e,
|
|
26574
26596
|
type: MessageRole$1.Assistant,
|
|
26575
26597
|
isHover: !1,
|
|
26576
26598
|
checked: !1,
|
|
26577
26599
|
pause: e?.some((e) => e.property?.extra?.pause) ?? !1
|
|
26578
|
-
}),
|
|
26600
|
+
}), r.messages.at(-1)?.role === MessageRole$1.User && n.push({
|
|
26579
26601
|
messages: [{
|
|
26580
26602
|
role: MessageRole$1.Loading,
|
|
26581
26603
|
content: "",
|
|
@@ -26586,65 +26608,90 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26586
26608
|
type: MessageRole$1.Loading,
|
|
26587
26609
|
isHover: !1,
|
|
26588
26610
|
checked: !1
|
|
26589
|
-
}),
|
|
26590
|
-
}), watch(
|
|
26591
|
-
if (
|
|
26611
|
+
}), l.value = n;
|
|
26612
|
+
}), watch(i, (e) => {
|
|
26613
|
+
if (l.value.length) for (let [n, r] of l.value.entries()) {
|
|
26614
|
+
if (r.type === MessageRole$1.Assistant) continue;
|
|
26615
|
+
let i = e?.some((e) => r.messages.some((n) => e.id === n.id)) ?? !1;
|
|
26616
|
+
if (r.checked = i, r.type === MessageRole$1.User) {
|
|
26617
|
+
let e = l.value.at(n + 1);
|
|
26618
|
+
e && (e.checked = i);
|
|
26619
|
+
}
|
|
26620
|
+
}
|
|
26592
26621
|
}, {
|
|
26593
26622
|
immediate: !0,
|
|
26594
26623
|
flush: "post"
|
|
26595
26624
|
});
|
|
26596
|
-
let
|
|
26597
|
-
|
|
26598
|
-
},
|
|
26625
|
+
let k = async (e, n) => (e.id === "copy" && E(n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n")), r.onAgentAction?.(e, n)), j = async (e, n) => {
|
|
26626
|
+
r.onUserAction?.(e, n);
|
|
26627
|
+
}, I = (e) => {
|
|
26599
26628
|
e.isHover = !0;
|
|
26600
|
-
},
|
|
26629
|
+
}, L = (e) => {
|
|
26601
26630
|
e.isHover = !1;
|
|
26602
|
-
},
|
|
26603
|
-
|
|
26604
|
-
|
|
26605
|
-
|
|
26606
|
-
|
|
26607
|
-
|
|
26631
|
+
}, z = () => {
|
|
26632
|
+
i.value = l.value?.filter((e) => e.checked && e.type === MessageRole$1.User).map((e) => e.messages).flat();
|
|
26633
|
+
}, B = (e, n) => {
|
|
26634
|
+
let r = e.type === MessageRole$1.User;
|
|
26635
|
+
l.value?.forEach((i, a) => {
|
|
26636
|
+
if (i === e) {
|
|
26637
|
+
i.checked = n;
|
|
26638
|
+
let e = r ? l.value.at(a + 1) : l.value.at(a - 1);
|
|
26608
26639
|
e && (e.checked = n);
|
|
26609
26640
|
}
|
|
26610
|
-
}),
|
|
26611
|
-
},
|
|
26612
|
-
|
|
26613
|
-
|
|
26614
|
-
|
|
26641
|
+
}), z();
|
|
26642
|
+
}, H = computed(() => l.value.filter((e) => e.type !== MessageRole$1.Loading)), r_ = computed(() => H.value.length > 0 && H.value.every((e) => e.checked)), K = () => {
|
|
26643
|
+
H.value.forEach((e) => {
|
|
26644
|
+
e.checked = !0;
|
|
26645
|
+
}), z();
|
|
26646
|
+
}, J = () => {
|
|
26647
|
+
l.value.forEach((e) => {
|
|
26648
|
+
e.checked = !1;
|
|
26649
|
+
}), i.value = [];
|
|
26615
26650
|
};
|
|
26616
|
-
|
|
26651
|
+
watch(() => r.enableSelection, (e) => {
|
|
26652
|
+
e || J();
|
|
26653
|
+
}), n({
|
|
26654
|
+
selectAll: K,
|
|
26655
|
+
deselectAll: J,
|
|
26656
|
+
isAllSelected: r_
|
|
26657
|
+
});
|
|
26658
|
+
let Z = async (e, n, i) => {
|
|
26659
|
+
r.onUserInputConfirm?.(e, n, i);
|
|
26660
|
+
}, a_ = async (e, n) => {
|
|
26661
|
+
r.onUserShortcutConfirm?.(e, n);
|
|
26662
|
+
};
|
|
26663
|
+
return (n, i) => (openBlock(), createElementBlock("div", {
|
|
26617
26664
|
ref_key: "messageContainerRef",
|
|
26618
|
-
ref:
|
|
26665
|
+
ref: a,
|
|
26619
26666
|
class: "ai-message-container"
|
|
26620
26667
|
}, [
|
|
26621
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
26668
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (i, a) => (openBlock(), createElementBlock("div", {
|
|
26622
26669
|
key: a,
|
|
26623
26670
|
class: "message-group",
|
|
26624
26671
|
style: normalizeStyle({ backgroundColor: i.checked ? "#f5f7fa" : "transparent" }),
|
|
26625
|
-
onMouseenter: (e) =>
|
|
26626
|
-
onMouseleave: (e) =>
|
|
26672
|
+
onMouseenter: (e) => I(i),
|
|
26673
|
+
onMouseleave: (e) => L(i)
|
|
26627
26674
|
}, [e.enableSelection && i.type !== unref(MessageRole$1).Loading ? (openBlock(), createBlock(unref(Checkbox), {
|
|
26628
26675
|
key: 0,
|
|
26629
26676
|
class: "message-group-checkbox",
|
|
26630
26677
|
"model-value": i.checked,
|
|
26631
|
-
"onUpdate:modelValue": (e) =>
|
|
26678
|
+
"onUpdate:modelValue": (e) => B(i, e)
|
|
26632
26679
|
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("v-if", !0), createElementVNode("div", {
|
|
26633
|
-
class: "message-group-messages",
|
|
26680
|
+
class: normalizeClass(["message-group-messages", { "message-group-enabled-selection": e.enableSelection && i.type !== unref(MessageRole$1).Loading }]),
|
|
26634
26681
|
style: normalizeStyle({ width: e.enableSelection && i.type !== unref(MessageRole$1).Loading ? "calc(100% - 16px)" : "100%" })
|
|
26635
|
-
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(i.messages, (
|
|
26682
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(i.messages, (r, i) => renderSlot(n.$slots, "default", mergeProps({
|
|
26636
26683
|
key: i,
|
|
26637
26684
|
ref_for: !0
|
|
26638
26685
|
}, {
|
|
26639
|
-
message:
|
|
26686
|
+
message: r,
|
|
26640
26687
|
messageToolsStatus: e.messageToolsStatus
|
|
26641
26688
|
}), () => [(openBlock(), createBlock(message_render_default, {
|
|
26642
26689
|
key: i,
|
|
26643
|
-
message:
|
|
26690
|
+
message: r,
|
|
26644
26691
|
"message-tools-status": e.messageToolsStatus,
|
|
26645
|
-
"on-action": (e) =>
|
|
26646
|
-
"on-input-confirm": (e,
|
|
26647
|
-
"on-shortcut-confirm": (e) =>
|
|
26692
|
+
"on-action": (e) => j(e, r),
|
|
26693
|
+
"on-input-confirm": (e, n) => Z(r, e, n),
|
|
26694
|
+
"on-shortcut-confirm": (e) => a_(r, e),
|
|
26648
26695
|
"tippy-options": e.messageToolsTippyOptions
|
|
26649
26696
|
}, null, 8, [
|
|
26650
26697
|
"message",
|
|
@@ -26656,34 +26703,35 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26656
26703
|
]))])), 128)), !(e.enableSelection && i.type !== unref(MessageRole$1).Loading) && !i.pause && i.type === unref(MessageRole$1).Assistant && e.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
|
|
26657
26704
|
key: 0,
|
|
26658
26705
|
"message-tools-status": e.messageToolsStatus,
|
|
26659
|
-
"on-action": (e) =>
|
|
26660
|
-
"tippy-options":
|
|
26661
|
-
onFeedback: (e,
|
|
26706
|
+
"on-action": (e) => k(e, i.messages),
|
|
26707
|
+
"tippy-options": r.messageToolsTippyOptions,
|
|
26708
|
+
onFeedback: (e, n, a) => r.onAgentFeedback?.(e, i.messages, n, a)
|
|
26662
26709
|
}, null, 8, [
|
|
26663
26710
|
"message-tools-status",
|
|
26664
26711
|
"on-action",
|
|
26665
26712
|
"tippy-options",
|
|
26666
26713
|
"onFeedback"
|
|
26667
|
-
])) : createCommentVNode("v-if", !0)],
|
|
26714
|
+
])) : createCommentVNode("v-if", !0)], 6)], 44, _hoisted_1$9))), 128)),
|
|
26668
26715
|
createElementVNode("div", {
|
|
26669
26716
|
ref_key: "messageContainerBottomRef",
|
|
26670
|
-
ref:
|
|
26717
|
+
ref: s,
|
|
26671
26718
|
class: "message-container-bottom",
|
|
26672
26719
|
tabindex: "0"
|
|
26673
26720
|
}, null, 512),
|
|
26674
26721
|
createElementVNode("div", _hoisted_2$7, [withDirectives(createVNode(scroll_btn_default, {
|
|
26675
|
-
|
|
26676
|
-
|
|
26722
|
+
loading: e.stopLoading,
|
|
26723
|
+
title: e.stopLoading ? unref(t$1)("正在停止") : unref(t$1)("停止生成"),
|
|
26724
|
+
onClick: i[0] ||= (e) => n.$emit("stopStreaming")
|
|
26677
26725
|
}, {
|
|
26678
26726
|
icon: withCtx(() => [createVNode(unref(CloseCircleIcon))]),
|
|
26679
26727
|
_: 1
|
|
26680
|
-
}, 8, ["title"]), [[vShow, e.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
|
|
26728
|
+
}, 8, ["loading", "title"]), [[vShow, e.messageStatus === unref(MessageStatus).Streaming]]), withDirectives(createVNode(scroll_btn_default, {
|
|
26681
26729
|
title: unref(t$1)("返回底部"),
|
|
26682
|
-
onClick: unref(
|
|
26730
|
+
onClick: unref(u)
|
|
26683
26731
|
}, {
|
|
26684
26732
|
icon: withCtx(() => [createVNode(unref(ArrowDownIcon))]),
|
|
26685
26733
|
_: 1
|
|
26686
|
-
}, 8, ["title", "onClick"]), [[vShow, unref(
|
|
26734
|
+
}, 8, ["title", "onClick"]), [[vShow, unref(T)]])])
|
|
26687
26735
|
], 512));
|
|
26688
26736
|
}
|
|
26689
26737
|
}), avatar_default = "data:image/png;base64,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";
|
|
@@ -27171,7 +27219,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27171
27219
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
27172
27220
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
27173
27221
|
}));
|
|
27174
|
-
}, B = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), H = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"),
|
|
27222
|
+
}, B = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), H = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), r_ = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), G = computed(() => i.hasPermission), K = (e) => G.value ? e : t("暂无使用权限"), J = () => ({ cursor: G.value ? "pointer" : "not-allowed" }), Q = computed(() => {
|
|
27175
27223
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
27176
27224
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
27177
27225
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -27193,7 +27241,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27193
27241
|
${a}
|
|
27194
27242
|
</div>
|
|
27195
27243
|
`;
|
|
27196
|
-
}),
|
|
27244
|
+
}), o_ = async () => {
|
|
27197
27245
|
if (i.sessionBusinessManager) try {
|
|
27198
27246
|
await i.sessionBusinessManager.createNewSession();
|
|
27199
27247
|
} catch (e) {
|
|
@@ -27203,18 +27251,18 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27203
27251
|
});
|
|
27204
27252
|
}
|
|
27205
27253
|
a("new-chat");
|
|
27206
|
-
},
|
|
27254
|
+
}, s_ = (e) => {
|
|
27207
27255
|
e.stopPropagation(), i.sessionBusinessManager ? (L || z(), L && L.handleTriggerClick(e)) : a("history-click", e);
|
|
27208
|
-
},
|
|
27256
|
+
}, c_ = () => {
|
|
27209
27257
|
a("help-click");
|
|
27210
|
-
},
|
|
27258
|
+
}, u_ = (e) => {
|
|
27211
27259
|
e.stopPropagation(), L && L.isVisible() && L.hide(), j && (j.state.isVisible ? j.hide() : j.show());
|
|
27212
|
-
},
|
|
27260
|
+
}, d_ = (e) => {
|
|
27213
27261
|
e.stopPropagation(), e.preventDefault();
|
|
27214
27262
|
let n = e.currentTarget, r = n.dataset.action;
|
|
27215
27263
|
if (!n.classList.contains("disabled")) switch (j && j.hide(), r) {
|
|
27216
27264
|
case "rename":
|
|
27217
|
-
|
|
27265
|
+
f_();
|
|
27218
27266
|
break;
|
|
27219
27267
|
case "auto-generate":
|
|
27220
27268
|
a("auto-generate-name");
|
|
@@ -27223,9 +27271,9 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27223
27271
|
a("share");
|
|
27224
27272
|
break;
|
|
27225
27273
|
}
|
|
27226
|
-
},
|
|
27227
|
-
document.removeEventListener("click",
|
|
27228
|
-
document.addEventListener("click",
|
|
27274
|
+
}, f_ = () => {
|
|
27275
|
+
document.removeEventListener("click", v_), T.value = i.sessionName || "", m.value = !0, setTimeout(() => {
|
|
27276
|
+
document.addEventListener("click", v_);
|
|
27229
27277
|
}, 100), setTimeout(() => {
|
|
27230
27278
|
if (k.value) try {
|
|
27231
27279
|
let e = k.value;
|
|
@@ -27236,22 +27284,22 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27236
27284
|
console.warn("Failed to focus rename input:", e);
|
|
27237
27285
|
}
|
|
27238
27286
|
}, 100);
|
|
27239
|
-
},
|
|
27287
|
+
}, p_ = () => {
|
|
27240
27288
|
let e = T.value.trim();
|
|
27241
27289
|
if (!e) {
|
|
27242
|
-
|
|
27290
|
+
m_();
|
|
27243
27291
|
return;
|
|
27244
27292
|
}
|
|
27245
27293
|
a("rename", e), m.value = !1, T.value = "";
|
|
27246
|
-
},
|
|
27294
|
+
}, m_ = () => {
|
|
27247
27295
|
m.value = !1, T.value = "";
|
|
27248
|
-
},
|
|
27249
|
-
T.value = e, n.key === "Enter" ?
|
|
27250
|
-
},
|
|
27296
|
+
}, g_ = (e, n) => {
|
|
27297
|
+
T.value = e, n.key === "Enter" ? p_() : n.key === "Escape" && m_();
|
|
27298
|
+
}, v_ = (e) => {
|
|
27251
27299
|
if (!m.value) return;
|
|
27252
27300
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
27253
|
-
r && !r.contains(n) &&
|
|
27254
|
-
},
|
|
27301
|
+
r && !r.contains(n) && m_();
|
|
27302
|
+
}, y_ = async () => {
|
|
27255
27303
|
if (!u.value) return;
|
|
27256
27304
|
let e = (await import("tippy.js")).default;
|
|
27257
27305
|
j &&= (j.destroy(), null), j = e(u.value, {
|
|
@@ -27269,7 +27317,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27269
27317
|
let { default: e } = await import("tippy.js");
|
|
27270
27318
|
document.querySelectorAll(".tippy-menu-item").forEach((n) => {
|
|
27271
27319
|
let r = n;
|
|
27272
|
-
r.addEventListener("click",
|
|
27320
|
+
r.addEventListener("click", d_);
|
|
27273
27321
|
let i = r.getAttribute("data-tippy-content");
|
|
27274
27322
|
if (i && !I.has(r)) {
|
|
27275
27323
|
let n = e(r, {
|
|
@@ -27288,7 +27336,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27288
27336
|
onHide: () => {
|
|
27289
27337
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
27290
27338
|
let n = e;
|
|
27291
|
-
n.removeEventListener("click",
|
|
27339
|
+
n.removeEventListener("click", d_);
|
|
27292
27340
|
let r = I.get(n);
|
|
27293
27341
|
r && (r.destroy(), I.delete(n));
|
|
27294
27342
|
});
|
|
@@ -27298,11 +27346,11 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27298
27346
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
27299
27347
|
j && j.setContent(Q.value);
|
|
27300
27348
|
}), onMounted(() => {
|
|
27301
|
-
|
|
27349
|
+
y_(), i.sessionBusinessManager && z(), document.addEventListener("click", v_);
|
|
27302
27350
|
}), onBeforeUnmount(() => {
|
|
27303
27351
|
j &&= (j.destroy(), null), I.forEach((e) => {
|
|
27304
27352
|
e.destroy();
|
|
27305
|
-
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click",
|
|
27353
|
+
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", v_);
|
|
27306
27354
|
}), n({
|
|
27307
27355
|
headerRef: s,
|
|
27308
27356
|
historyIconRef: l
|
|
@@ -27325,13 +27373,13 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27325
27373
|
"onUpdate:modelValue": r[0] ||= (e) => T.value = e,
|
|
27326
27374
|
class: "rename-input",
|
|
27327
27375
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
27328
|
-
onKeyup:
|
|
27376
|
+
onKeyup: g_
|
|
27329
27377
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
27330
27378
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
27331
|
-
onClick:
|
|
27379
|
+
onClick: p_
|
|
27332
27380
|
}), createElementVNode("i", {
|
|
27333
27381
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
27334
|
-
onClick:
|
|
27382
|
+
onClick: m_
|
|
27335
27383
|
})])])])) : createCommentVNode("v-if", !0)
|
|
27336
27384
|
], 2),
|
|
27337
27385
|
i.showMoreIcon && G.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -27339,7 +27387,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27339
27387
|
ref_key: "moreIconRef",
|
|
27340
27388
|
ref: u,
|
|
27341
27389
|
class: "bkai-icon bkai-more",
|
|
27342
|
-
onClick:
|
|
27390
|
+
onClick: u_
|
|
27343
27391
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
27344
27392
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
27345
27393
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -27351,7 +27399,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27351
27399
|
{ disabled: !G.value }
|
|
27352
27400
|
]),
|
|
27353
27401
|
style: normalizeStyle(J()),
|
|
27354
|
-
onClick: r[1] ||= (e) => G.value ?
|
|
27402
|
+
onClick: r[1] ||= (e) => G.value ? o_() : void 0
|
|
27355
27403
|
}, null, 6)), [[unref(o), {
|
|
27356
27404
|
content: K(unref(t)("新增会话")),
|
|
27357
27405
|
boundary: "parent"
|
|
@@ -27367,7 +27415,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27367
27415
|
{ disabled: !G.value }
|
|
27368
27416
|
]),
|
|
27369
27417
|
style: normalizeStyle(J()),
|
|
27370
|
-
onClick: r[2] ||= (e) => G.value ?
|
|
27418
|
+
onClick: r[2] ||= (e) => G.value ? s_(e) : void 0
|
|
27371
27419
|
}, null, 6)), [[unref(o), {
|
|
27372
27420
|
content: K(unref(t)("历史会话")),
|
|
27373
27421
|
boundary: "parent"
|
|
@@ -27375,7 +27423,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27375
27423
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
27376
27424
|
key: 2,
|
|
27377
27425
|
class: "bkai-icon bkai-zhushou",
|
|
27378
|
-
onClick:
|
|
27426
|
+
onClick: c_
|
|
27379
27427
|
}, null, 512)), [[unref(o), {
|
|
27380
27428
|
content: unref(t)("转人工"),
|
|
27381
27429
|
boundary: "parent"
|
|
@@ -27385,7 +27433,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27385
27433
|
class: normalizeClass(["bkai-icon", H.value]),
|
|
27386
27434
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
27387
27435
|
}, null, 2)), [[unref(o), {
|
|
27388
|
-
content:
|
|
27436
|
+
content: r_.value,
|
|
27389
27437
|
boundary: "parent"
|
|
27390
27438
|
}]]) : createCommentVNode("v-if", !0),
|
|
27391
27439
|
withDirectives(createElementVNode("i", {
|
|
@@ -27399,6 +27447,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27399
27447
|
}
|
|
27400
27448
|
}), [["__scopeId", "data-v-3cf2263c"]]), ChatBusinessManager = class {
|
|
27401
27449
|
_isGenerating;
|
|
27450
|
+
_isStopLoading;
|
|
27402
27451
|
agentModule;
|
|
27403
27452
|
config;
|
|
27404
27453
|
eventEmitter;
|
|
@@ -27413,11 +27462,14 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27413
27462
|
this.eventEmitter?.emit(e, n);
|
|
27414
27463
|
}
|
|
27415
27464
|
constructor(e, n, r = null, i = null, a = {}) {
|
|
27416
|
-
this.agentModule = e, this.messageModule = n, this.sessionModule = r, this.eventEmitter = i, this.config = a, this._isGenerating = ref(!1);
|
|
27465
|
+
this.agentModule = e, this.messageModule = n, this.sessionModule = r, this.eventEmitter = i, this.config = a, this._isGenerating = ref(!1), this._isStopLoading = ref(!1);
|
|
27417
27466
|
}
|
|
27418
27467
|
get isGenerating() {
|
|
27419
27468
|
return this._isGenerating;
|
|
27420
27469
|
}
|
|
27470
|
+
get isStopLoading() {
|
|
27471
|
+
return this._isStopLoading;
|
|
27472
|
+
}
|
|
27421
27473
|
get isMessagesLoading() {
|
|
27422
27474
|
return this.messageModule.isListLoading;
|
|
27423
27475
|
}
|
|
@@ -27534,15 +27586,18 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27534
27586
|
}), e;
|
|
27535
27587
|
}
|
|
27536
27588
|
}
|
|
27537
|
-
stopGeneration() {
|
|
27589
|
+
async stopGeneration() {
|
|
27590
|
+
let e = this.sessionModule?.current?.value?.sessionCode ?? "";
|
|
27591
|
+
this._isStopLoading.value = !0;
|
|
27538
27592
|
try {
|
|
27539
|
-
|
|
27540
|
-
this.agentModule.stopChat(e), this._isGenerating.value = !1, this.emit("stop", {});
|
|
27593
|
+
await this.agentModule.stopChat(e), this._isGenerating.value = !1, this.emit("stop", {});
|
|
27541
27594
|
} catch (e) {
|
|
27542
27595
|
console.error("Failed to stop generation:", e), this.emit("chat-error", {
|
|
27543
27596
|
action: "stop",
|
|
27544
27597
|
error: e
|
|
27545
27598
|
});
|
|
27599
|
+
} finally {
|
|
27600
|
+
this._isStopLoading.value = !1;
|
|
27546
27601
|
}
|
|
27547
27602
|
}
|
|
27548
27603
|
}, SessionBusinessManager = class {
|
|
@@ -27688,7 +27743,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27688
27743
|
if (!r) throw Error("Share failed: no result returned");
|
|
27689
27744
|
return {
|
|
27690
27745
|
shareUrl: `${r.share_page}share-page/${r.share_token}`,
|
|
27691
|
-
userMessageIds: e.
|
|
27746
|
+
userMessageIds: e.map((e) => String(e.id))
|
|
27692
27747
|
};
|
|
27693
27748
|
}
|
|
27694
27749
|
}, ShortcutManager = class {
|
|
@@ -28201,15 +28256,15 @@ var UIStateManager = class {
|
|
|
28201
28256
|
"stop"
|
|
28202
28257
|
],
|
|
28203
28258
|
setup(e, { expose: n, emit: r }) {
|
|
28204
|
-
let i = e, a = r, s = ref(), l = ref(), u = ref(
|
|
28259
|
+
let i = e, a = r, s = ref(), l = ref(), u = ref(), T = ref(null), E = shallowRef([]), k = ref(!1), j = ref(!1), I = ref(!1), L = ref(null), z = () => i.chatHelper ? !i.chatHelper.agent || !i.chatHelper.session || !i.chatHelper.message ? {
|
|
28205
28260
|
valid: !1,
|
|
28206
28261
|
error: "[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)"
|
|
28207
28262
|
} : { valid: !0 } : i.url ? { valid: !0 } : {
|
|
28208
28263
|
valid: !1,
|
|
28209
28264
|
error: "[ChatBot] Neither chatHelper nor url provided. Component requires at least one."
|
|
28210
|
-
},
|
|
28211
|
-
let e =
|
|
28212
|
-
if (!e.valid) return console.error(e.error),
|
|
28265
|
+
}, B = (() => {
|
|
28266
|
+
let e = z();
|
|
28267
|
+
if (!e.valid) return console.error(e.error), L.value = Error(e.error), null;
|
|
28213
28268
|
if (i.chatHelper) return i.chatHelper;
|
|
28214
28269
|
let n = new AGUIProtocol$1({
|
|
28215
28270
|
onStart: () => {
|
|
@@ -28219,7 +28274,7 @@ var UIStateManager = class {
|
|
|
28219
28274
|
a("receive-text");
|
|
28220
28275
|
},
|
|
28221
28276
|
onDone: () => {
|
|
28222
|
-
a("receive-end"),
|
|
28277
|
+
a("receive-end"), Z_();
|
|
28223
28278
|
},
|
|
28224
28279
|
onError: (e) => {
|
|
28225
28280
|
a("error", e);
|
|
@@ -28233,38 +28288,38 @@ var UIStateManager = class {
|
|
|
28233
28288
|
protocol: n
|
|
28234
28289
|
});
|
|
28235
28290
|
return n.injectMessageModule(r.message), r;
|
|
28236
|
-
})(),
|
|
28291
|
+
})(), H = computed(() => ((i.chatHelper || B)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), r_ = computed(() => H.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), J = async (e, n) => {
|
|
28237
28292
|
if (e.id === "cite") {
|
|
28238
|
-
|
|
28293
|
+
D_.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), fv();
|
|
28239
28294
|
return;
|
|
28240
28295
|
}
|
|
28241
28296
|
if (e.id === "rebuild") {
|
|
28242
|
-
await
|
|
28297
|
+
await s_(n);
|
|
28243
28298
|
return;
|
|
28244
28299
|
}
|
|
28245
28300
|
if (e.id === "delete") {
|
|
28246
|
-
await
|
|
28301
|
+
await o_(n);
|
|
28247
28302
|
return;
|
|
28248
28303
|
}
|
|
28249
28304
|
if (e.id === "share") {
|
|
28250
|
-
|
|
28305
|
+
y_ && (k.value = !0), a("request-share");
|
|
28251
28306
|
return;
|
|
28252
28307
|
}
|
|
28253
28308
|
if (e.id === "like" || e.id === "unlike") {
|
|
28254
28309
|
let n = e.id === "like" ? 5 : 0;
|
|
28255
28310
|
try {
|
|
28256
|
-
return await
|
|
28311
|
+
return await B?.session.getSessionFeedbackReasons(n) || [];
|
|
28257
28312
|
} catch (e) {
|
|
28258
28313
|
return console.error("[ChatBot] Failed to get feedback reasons:", e), [];
|
|
28259
28314
|
}
|
|
28260
28315
|
}
|
|
28261
28316
|
console.log("handleAgentAction", e, n);
|
|
28262
|
-
},
|
|
28263
|
-
if (!
|
|
28317
|
+
}, Q = async (e, n, r, i) => {
|
|
28318
|
+
if (!B) {
|
|
28264
28319
|
console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
|
|
28265
28320
|
return;
|
|
28266
28321
|
}
|
|
28267
|
-
let o =
|
|
28322
|
+
let o = B.session.current?.value?.sessionCode;
|
|
28268
28323
|
if (!o) {
|
|
28269
28324
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
28270
28325
|
return;
|
|
@@ -28276,7 +28331,7 @@ var UIStateManager = class {
|
|
|
28276
28331
|
}
|
|
28277
28332
|
let l = e.id === "like" ? 5 : 0;
|
|
28278
28333
|
try {
|
|
28279
|
-
await
|
|
28334
|
+
await B.session.postSessionFeedback({
|
|
28280
28335
|
sessionCode: o,
|
|
28281
28336
|
sessionContentIds: [s],
|
|
28282
28337
|
rate: l,
|
|
@@ -28286,8 +28341,8 @@ var UIStateManager = class {
|
|
|
28286
28341
|
} catch (e) {
|
|
28287
28342
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
28288
28343
|
}
|
|
28289
|
-
},
|
|
28290
|
-
if (!w_ || !
|
|
28344
|
+
}, o_ = async (e) => {
|
|
28345
|
+
if (!w_ || !B) {
|
|
28291
28346
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
28292
28347
|
return;
|
|
28293
28348
|
}
|
|
@@ -28298,41 +28353,41 @@ var UIStateManager = class {
|
|
|
28298
28353
|
return;
|
|
28299
28354
|
}
|
|
28300
28355
|
let i = [r, ...e];
|
|
28301
|
-
await
|
|
28356
|
+
await B.message.deleteMessages(i);
|
|
28302
28357
|
} catch (e) {
|
|
28303
28358
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
28304
28359
|
}
|
|
28305
|
-
},
|
|
28306
|
-
if (!w_ || !
|
|
28360
|
+
}, s_ = async (e) => {
|
|
28361
|
+
if (!w_ || !B) {
|
|
28307
28362
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
28308
28363
|
return;
|
|
28309
28364
|
}
|
|
28310
|
-
let n =
|
|
28365
|
+
let n = B.session.current?.value?.sessionCode;
|
|
28311
28366
|
if (!n) {
|
|
28312
28367
|
console.error("[ChatBot] Cannot regenerate: no active session");
|
|
28313
28368
|
return;
|
|
28314
28369
|
}
|
|
28315
28370
|
try {
|
|
28316
|
-
await w_.regenerateFromAIMessages(e, n),
|
|
28371
|
+
await w_.regenerateFromAIMessages(e, n), Z_();
|
|
28317
28372
|
} catch (e) {
|
|
28318
28373
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
28319
28374
|
}
|
|
28320
|
-
},
|
|
28375
|
+
}, c_ = async (e, n) => {
|
|
28321
28376
|
if (e.id === "delete") {
|
|
28322
|
-
await
|
|
28377
|
+
await g_(n);
|
|
28323
28378
|
return;
|
|
28324
28379
|
}
|
|
28325
28380
|
if (e.id === "cite") {
|
|
28326
|
-
|
|
28381
|
+
D_.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), fv();
|
|
28327
28382
|
return;
|
|
28328
28383
|
}
|
|
28329
28384
|
console.log("handleUserAction", e, n);
|
|
28330
28385
|
}, u_ = async (e, n, r) => {
|
|
28331
|
-
if (!
|
|
28386
|
+
if (!B) {
|
|
28332
28387
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
28333
28388
|
return;
|
|
28334
28389
|
}
|
|
28335
|
-
let i =
|
|
28390
|
+
let i = B.session.current?.value?.sessionCode;
|
|
28336
28391
|
if (!i) {
|
|
28337
28392
|
console.error("[ChatBot] Cannot edit message: no active session");
|
|
28338
28393
|
return;
|
|
@@ -28343,16 +28398,16 @@ var UIStateManager = class {
|
|
|
28343
28398
|
return;
|
|
28344
28399
|
}
|
|
28345
28400
|
try {
|
|
28346
|
-
console.log("handleUserInputConfirm", o, i, n), await
|
|
28401
|
+
console.log("handleUserInputConfirm", o, i, n), await B.agent.resendMessage(String(o), i, n), Z_();
|
|
28347
28402
|
} catch (e) {
|
|
28348
28403
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
28349
28404
|
}
|
|
28350
|
-
},
|
|
28351
|
-
if (!w_ || !
|
|
28405
|
+
}, d_ = async (e, n) => {
|
|
28406
|
+
if (!w_ || !B) {
|
|
28352
28407
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
28353
28408
|
return;
|
|
28354
28409
|
}
|
|
28355
|
-
let r =
|
|
28410
|
+
let r = B.session.current?.value?.sessionCode;
|
|
28356
28411
|
if (!r) {
|
|
28357
28412
|
console.error("[ChatBot] Cannot edit shortcut message: no active session");
|
|
28358
28413
|
return;
|
|
@@ -28369,15 +28424,15 @@ var UIStateManager = class {
|
|
|
28369
28424
|
return;
|
|
28370
28425
|
}
|
|
28371
28426
|
let o = sv(a, n), s = String(n.input ?? "");
|
|
28372
|
-
await w_.resendMessageWithProperty(String(i), r, s, o),
|
|
28427
|
+
await w_.resendMessageWithProperty(String(i), r, s, o), Z_();
|
|
28373
28428
|
} catch (e) {
|
|
28374
28429
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
28375
28430
|
}
|
|
28376
28431
|
}, p_ = (e) => {
|
|
28377
28432
|
let n = e.property?.extra;
|
|
28378
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
28379
|
-
},
|
|
28380
|
-
if (!w_ || !
|
|
28433
|
+
return n?.shortcut ? n.shortcut : n?.command ? Y_.value.find((e) => e.id === n.command) ?? null : null;
|
|
28434
|
+
}, g_ = async (e) => {
|
|
28435
|
+
if (!w_ || !B) {
|
|
28381
28436
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
28382
28437
|
return;
|
|
28383
28438
|
}
|
|
@@ -28394,41 +28449,41 @@ var UIStateManager = class {
|
|
|
28394
28449
|
i.push(r);
|
|
28395
28450
|
}
|
|
28396
28451
|
let a = [e, ...i];
|
|
28397
|
-
await
|
|
28452
|
+
await B.message.deleteMessages(a);
|
|
28398
28453
|
} catch (e) {
|
|
28399
28454
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
28400
28455
|
}
|
|
28401
28456
|
}, v_ = async () => {
|
|
28402
|
-
|
|
28403
|
-
},
|
|
28457
|
+
await lv();
|
|
28458
|
+
}, y_ = !i.chatHelper, b_ = computed(() => y_ ? k.value : i.enableSelection), x_ = computed(() => y_ ? j.value : i.shareLoading), S_ = B ? new SessionBusinessManager(B.session, B.agent, null, {
|
|
28404
28459
|
enableChatSession: !0,
|
|
28405
28460
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
28406
28461
|
loadRecentSessionOnMount: i.autoLoad,
|
|
28407
28462
|
initialSessionCode: i.sessionCode
|
|
28408
|
-
}) : null, w_ =
|
|
28463
|
+
}) : null, w_ = B ? new ChatBusinessManager(B.agent, B.message, B.session, null, {
|
|
28409
28464
|
openingRemark: i.helloText,
|
|
28410
28465
|
predefinedQuestions: i.prompts,
|
|
28411
28466
|
placeholder: i.placeholder
|
|
28412
|
-
}) : null,
|
|
28413
|
-
|
|
28414
|
-
},
|
|
28467
|
+
}) : null, T_ = new ShortcutManager(null, i.shortcuts || []), E_ = shallowRef([[]]), D_ = ref(""), O_ = shallowRef([]), k_ = (e, n) => {
|
|
28468
|
+
E_.value = e, O_.value = n;
|
|
28469
|
+
}, A_ = computed(() => w_?.messages.value ?? []), j_ = computed(() => w_?.isMessagesLoading.value ?? !1), M_ = computed(() => w_?.isGenerating.value ?? !1), N_ = computed(() => w_?.isStopLoading.value ?? !1), P_ = computed(() => S_?.currentSession.value ?? null), F_ = computed(() => y_ && !I.value ? !1 : !j_.value && A_.value.length === 0), R_ = computed(() => B?.agent.info.value?.conversationSettings?.openingRemark || ""), z_ = computed(() => i.resources?.length ? i.resources : B?.agent.info.value?.resources ?? []), B_ = computed(() => i.prompts?.length ? i.prompts : B?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), V_ = computed(() => T.value?.supportUpload ? T.value.supportUpload.vision === !0 : B?.agent.info.value?.promptSetting?.supportUpload?.vision === !0), H_ = computed(() => ({
|
|
28415
28470
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
28416
28471
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
28417
|
-
})), U_ = computed(() =>
|
|
28418
|
-
|
|
28472
|
+
})), U_ = computed(() => T_.shortcuts.value), W_ = () => {
|
|
28473
|
+
E.value = [], y_ && (k.value = !1), a("cancel-share");
|
|
28419
28474
|
}, G_ = async () => {
|
|
28420
|
-
let e =
|
|
28421
|
-
|
|
28475
|
+
let e = E.value;
|
|
28476
|
+
y_ && await K_(e), a("confirm-share", e), E.value = [];
|
|
28422
28477
|
}, K_ = async (e) => {
|
|
28423
|
-
if (!
|
|
28424
|
-
let n =
|
|
28478
|
+
if (!B || e.length === 0) return;
|
|
28479
|
+
let n = B.session.current?.value?.sessionCode;
|
|
28425
28480
|
if (!n) {
|
|
28426
28481
|
console.error("[ChatBot] Cannot share: no active session");
|
|
28427
28482
|
return;
|
|
28428
28483
|
}
|
|
28429
|
-
|
|
28484
|
+
j.value = !0;
|
|
28430
28485
|
try {
|
|
28431
|
-
let r = await
|
|
28486
|
+
let r = await B.message.shareMessages(n, e);
|
|
28432
28487
|
r && (await copyToClipboard(`${r.share_page}share-page/${r.share_token}`), Message({
|
|
28433
28488
|
message: "分享链接已复制到剪贴板",
|
|
28434
28489
|
theme: "success"
|
|
@@ -28439,33 +28494,33 @@ var UIStateManager = class {
|
|
|
28439
28494
|
theme: "error"
|
|
28440
28495
|
});
|
|
28441
28496
|
} finally {
|
|
28442
|
-
|
|
28497
|
+
j.value = !1, k.value = !1, E.value = [];
|
|
28443
28498
|
}
|
|
28444
|
-
},
|
|
28445
|
-
e ?
|
|
28446
|
-
},
|
|
28499
|
+
}, J_ = (e) => {
|
|
28500
|
+
e ? l.value?.selectAll() : l.value?.deselectAll();
|
|
28501
|
+
}, Y_ = T_.effectiveShortcuts;
|
|
28447
28502
|
watch(() => i.shortcuts, (e) => {
|
|
28448
|
-
|
|
28449
|
-
}, { immediate: !0 }), watch(() =>
|
|
28450
|
-
e &&
|
|
28503
|
+
T_.setShortcuts(e || []);
|
|
28504
|
+
}, { immediate: !0 }), watch(() => B?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
28505
|
+
e && T_.setAgentShortcuts(e);
|
|
28451
28506
|
}, { immediate: !0 });
|
|
28452
|
-
let
|
|
28507
|
+
let Z_ = async () => {
|
|
28453
28508
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
28454
|
-
},
|
|
28455
|
-
if (!w_ || !
|
|
28456
|
-
let r =
|
|
28509
|
+
}, ev = async (e, n = {}) => {
|
|
28510
|
+
if (!w_ || !B) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
28511
|
+
let r = B.session.current?.value?.sessionCode;
|
|
28457
28512
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
28458
|
-
|
|
28459
|
-
},
|
|
28460
|
-
let n =
|
|
28513
|
+
E_.value = [[]], D_.value = "", O_.value = [], a("send-message", typeof e == "string" ? e : ""), await w_.sendMessage(e, r, n);
|
|
28514
|
+
}, tv = async (e) => {
|
|
28515
|
+
let n = B?.session.current?.value?.sessionCode;
|
|
28461
28516
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
28462
|
-
let r = await
|
|
28517
|
+
let r = await B.session.uploadFile(n, e);
|
|
28463
28518
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
28464
28519
|
return r;
|
|
28465
28520
|
}, nv = async (e, n) => {
|
|
28466
28521
|
try {
|
|
28467
28522
|
let n = {};
|
|
28468
|
-
|
|
28523
|
+
D_.value && (n.cite = D_.value), T.value && (n.command = T.value.id), O_.value.length && (n.resources = O_.value), await ev(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
28469
28524
|
} catch (e) {
|
|
28470
28525
|
console.error("Failed to send message:", e), a("error", e);
|
|
28471
28526
|
}
|
|
@@ -28486,7 +28541,7 @@ var UIStateManager = class {
|
|
|
28486
28541
|
...e,
|
|
28487
28542
|
default: e.default ?? void 0
|
|
28488
28543
|
});
|
|
28489
|
-
|
|
28544
|
+
T.value = {
|
|
28490
28545
|
...r,
|
|
28491
28546
|
components: e,
|
|
28492
28547
|
formModel: {
|
|
@@ -28494,12 +28549,12 @@ var UIStateManager = class {
|
|
|
28494
28549
|
[i]: n
|
|
28495
28550
|
}
|
|
28496
28551
|
};
|
|
28497
|
-
} else
|
|
28552
|
+
} else T.value = {
|
|
28498
28553
|
...r,
|
|
28499
28554
|
formModel: { ...r.formModel }
|
|
28500
28555
|
};
|
|
28501
28556
|
}, ov = () => {
|
|
28502
|
-
|
|
28557
|
+
T.value = null;
|
|
28503
28558
|
}, sv = (e, n) => {
|
|
28504
28559
|
let r = e.components || [];
|
|
28505
28560
|
return { extra: {
|
|
@@ -28521,62 +28576,62 @@ var UIStateManager = class {
|
|
|
28521
28576
|
}))
|
|
28522
28577
|
} };
|
|
28523
28578
|
}, cv = async (e) => {
|
|
28524
|
-
if (!
|
|
28579
|
+
if (!T.value) {
|
|
28525
28580
|
console.error("[ChatBot] No selected shortcut");
|
|
28526
28581
|
return;
|
|
28527
28582
|
}
|
|
28528
|
-
let n = sv(
|
|
28583
|
+
let n = sv(T.value, e), r = T.value.name, i = T.value;
|
|
28529
28584
|
ov();
|
|
28530
28585
|
try {
|
|
28531
|
-
await
|
|
28586
|
+
await ev(r, { property: n });
|
|
28532
28587
|
} catch (e) {
|
|
28533
|
-
|
|
28588
|
+
T.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
28534
28589
|
}
|
|
28535
|
-
}, lv = () => {
|
|
28590
|
+
}, lv = async () => {
|
|
28536
28591
|
if (!w_) {
|
|
28537
28592
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
28538
28593
|
return;
|
|
28539
28594
|
}
|
|
28540
|
-
w_.stopGeneration(), a("stop");
|
|
28595
|
+
await w_.stopGeneration(), a("stop");
|
|
28541
28596
|
}, uv = async (e) => {
|
|
28542
|
-
if (!
|
|
28597
|
+
if (!S_) {
|
|
28543
28598
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
28544
28599
|
return;
|
|
28545
28600
|
}
|
|
28546
28601
|
try {
|
|
28547
|
-
await
|
|
28602
|
+
await S_.switchSession(e), a("session-switched", S_.currentSession.value);
|
|
28548
28603
|
} catch (e) {
|
|
28549
28604
|
console.error("Failed to switch session:", e), a("error", e);
|
|
28550
28605
|
}
|
|
28551
28606
|
}, dv = (e) => {
|
|
28552
|
-
|
|
28607
|
+
D_.value = e;
|
|
28553
28608
|
}, fv = () => {
|
|
28554
|
-
|
|
28609
|
+
u.value?.focus?.();
|
|
28555
28610
|
};
|
|
28556
28611
|
return onMounted(async () => {
|
|
28557
|
-
if (!(!
|
|
28558
|
-
if (
|
|
28559
|
-
if (await
|
|
28560
|
-
else if (
|
|
28561
|
-
let e =
|
|
28562
|
-
await
|
|
28612
|
+
if (!(!B || L.value)) try {
|
|
28613
|
+
if (y_) {
|
|
28614
|
+
if (await B.agent.getAgentInfo(), await B.session.getSessions(), i.sessionCode) await B.session.chooseSession(i.sessionCode);
|
|
28615
|
+
else if (B.session.list.value.length > 0) {
|
|
28616
|
+
let e = B.session.list.value[0];
|
|
28617
|
+
await B.session.chooseSession(e.sessionCode);
|
|
28563
28618
|
}
|
|
28564
|
-
|
|
28565
|
-
} else
|
|
28566
|
-
a("agent-info-loaded",
|
|
28619
|
+
I.value = !0;
|
|
28620
|
+
} else I.value = !0;
|
|
28621
|
+
a("agent-info-loaded", B);
|
|
28567
28622
|
} catch (e) {
|
|
28568
|
-
console.error("Failed to initialize ChatBot:", e),
|
|
28623
|
+
console.error("Failed to initialize ChatBot:", e), L.value = e, a("error", e);
|
|
28569
28624
|
}
|
|
28570
28625
|
}), onBeforeUnmount(() => {
|
|
28571
|
-
|
|
28626
|
+
y_ && B && B.agent.stopChat(B.session.current?.value?.sessionCode ?? "");
|
|
28572
28627
|
}), n({
|
|
28573
28628
|
sendMessage: (e) => nv(e, [[]]),
|
|
28574
28629
|
stopGeneration: lv,
|
|
28575
28630
|
switchSession: uv,
|
|
28576
|
-
messages:
|
|
28631
|
+
messages: A_,
|
|
28577
28632
|
currentSession: P_,
|
|
28578
|
-
isGenerating:
|
|
28579
|
-
getChatHelper: () =>
|
|
28633
|
+
isGenerating: M_,
|
|
28634
|
+
getChatHelper: () => B,
|
|
28580
28635
|
setCiteText: dv,
|
|
28581
28636
|
focusInput: fv,
|
|
28582
28637
|
selectShortcut: (e, n) => {
|
|
@@ -28589,7 +28644,7 @@ var UIStateManager = class {
|
|
|
28589
28644
|
{ "welcome-state": F_.value }
|
|
28590
28645
|
]),
|
|
28591
28646
|
style: normalizeStyle(H_.value)
|
|
28592
|
-
}, [createCommentVNode(" 初始化错误提示 "),
|
|
28647
|
+
}, [createCommentVNode(" 初始化错误提示 "), L.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(L.value.message), 1)])) : y_ && !I.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
28593
28648
|
mode: "spin",
|
|
28594
28649
|
size: "small",
|
|
28595
28650
|
theme: "primary"
|
|
@@ -28602,74 +28657,78 @@ var UIStateManager = class {
|
|
|
28602
28657
|
src: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='309px'%20height='93px'%20viewBox='0%200%20309%2093'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eAI%20小鲸%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='45.02491%25'%20y1='35.5927467%25'%20x2='99.2803929%25'%20y2='81.0358394%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-2'%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.885701426'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.29'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-3'%3e%3cstop%20stop-color='%231562FC'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='95.0902604%25'%20x2='35.112422%25'%20y2='19.6450217%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23DC63FE'%20offset='0.0150240385%25'%3e%3c/stop%3e%3cstop%20stop-color='%23235DFA'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='46.6072083%25'%20y1='95.8855311%25'%20x2='46.6072083%25'%20y2='50%25'%20id='linearGradient-5'%3e%3cstop%20stop-color='%23B962FD'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23565FFB'%20offset='99.984976%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23A826E2'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='-38.6691405%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-7'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%239F7BF1'%20stop-opacity='0.15'%20offset='62.335824%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='AI--小鲸'%20transform='translate(-1710,%20-3457)'%3e%3cg%20id='聊天窗/默认页'%20transform='translate(1644,%203324)'%3e%3cg%20id='AI-小鲸'%20transform='translate(66,%20133.2974)'%3e%3cg%20transform='translate(124.4167,%20-0)'%20id='编组'%3e%3cg%20transform='translate(0,%200)'%3e%3cpath%20d='M28.3965776,12.9425679%20C38.3377031,12.9425679%2046.3965776,21.0014424%2046.3965776,30.9425679%20L46.3969075,48.6505618%20C51.2162571,49.132982%2054.5842089,50.4998157%2054.5842089,53.8408323%20C54.5842089,53.8444226%2054.5842089,53.8477257%2054.5824622,53.8507588%20L54.5702354,53.8590653%20C54.5370482,53.8709895%2054.4250414,53.8772107%2054.0470184,53.8795761%20L53.8473221,53.8804155%20C53.8227592,53.8804783%2053.7973775,53.8805312%2053.7711498,53.8805746%20L53.4140599,53.8806511%20C53.3806271,53.8806219%2053.3462391,53.8805842%2053.3108685,53.8805382%20L52.8375142,53.8796076%20C51.6610285,53.8767057%2049.6921211,53.8685916%2046.3970568,53.8605313%20L46.3965776,53.8807246%20L23.4584209,53.8807246%20C14.9044209,53.8807246%207.74404265,47.9139206%205.91235374,39.9153803%20C2.4976649,38.935189%200,35.8013205%200,32.0869334%20L1.43000256,32.0866983%20C1.58407741,32.0866469%201.73656386,32.0865873%201.88747828,32.0865198%20L3.20370552,32.0857063%20C4.00314289,32.0850715%204.75405903,32.0842107%205.4593989,32.0831725%20L5.45842089,30.9425679%20C5.45842089,21.0014424%2013.5172954,12.9425679%2023.4584209,12.9425679%20L28.3965776,12.9425679%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-2)'%20x='10.9168418'%20y='18.4009888'%20width='30.0213149'%20height='30.0213149'%20rx='12'%3e%3c/rect%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-3)'%20x='49.125788'%20y='21.1301993'%20width='5.45842089'%20height='24.562894'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M51.8123687,2.72921045%20C51.8123687,6.90327561%2054.9358287,10.3478176%2058.9729609,10.8530485%20L60,10.9168418%20C55.8259348,10.9168418%2052.3813929,14.0403018%2051.8761619,18.077434%20L51.8123687,19.1044731%20C51.8123687,14.930408%2048.6889086,11.485866%2044.6517764,10.9806351%20L43.6247373,10.9168418%20C47.7988025,10.9168418%2051.2433445,7.79338174%2051.7485754,3.75624952%20L51.8123687,2.72921045%20Z'%20id='星形'%20fill='url(%23linearGradient-4)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M40.8955269,-1.43884904e-13%20C40.8955269,2.78271011%2042.9778336,5.07907143%2045.6692551,5.41589204%20L46.3539478,5.45842089%20C43.5712377,5.45842089%2041.2748763,7.54072759%2040.9380557,10.2321491%20L40.8955269,10.9168418%20C40.8955269,8.13413168%2038.8132202,5.83777036%2036.1217987,5.50094974%20L35.437106,5.45842089%20C38.2198161,5.45842089%2040.5161774,3.3761142%2040.852998,0.684692719%20L40.8955269,-1.43884904e-13%20Z'%20id='星形'%20fill='url(%23linearGradient-5)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M44.4235306,12.0484656%20C44.4235306,13.4398207%2045.464684,14.5880013%2046.8103947,14.7564116%20L47.1527411,14.7776761%20C45.761386,14.7776761%2044.6132054,15.8188294%2044.4447951,17.1645402%20L44.4235306,17.5068865%20C44.4235306,16.1155315%2043.3823773,14.9673508%2042.0366665,14.7989405%20L41.6943202,14.7776761%20C43.0856752,14.7776761%2044.2338559,13.7365227%2044.4022662,12.390812%20L44.4235306,12.0484656%20Z'%20id='星形'%20fill='%238860FC'%20fill-rule='nonzero'%3e%3c/path%3e%3crect%20id='矩形'%20fill='%2316204D'%20x='17.7398679'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3crect%20id='矩形备份'%20fill='%2316204D'%20x='28.6567097'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M33.2681489,12.9425679%20C32.5347773,9.30362068%2031.08981,7.48414704%2028.9332468,7.48414704%20C25.698402,7.48414704%2025.7333802,11.8081925%2028.9332468,11.4257275%20C30.6212196,11.223972%2031.7656965,11.7295855%2032.3666775,12.9425679%20L33.2681489,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%20transform='translate(29.8942,%2010.2134)%20scale(-1,%201)%20translate(-29.8942,%20-10.2134)'%3e%3c/path%3e%3cpath%20d='M26.5202122,12.9425679%20C25.7868406,9.30362068%2024.3418733,7.48414704%2022.1853101,7.48414704%20C18.9504653,7.48414704%2018.9854435,11.8081925%2022.1853101,11.4257275%20C23.8732829,11.223972%2025.0177598,11.7295855%2025.6187408,12.9425679%20L26.5202122,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cpath%20d='M309,81.279814%20C309,66.0493667%20239.827994,53.7026496%20154.5,53.7026496%20C69.1720062,53.7026496%200,66.0493667%200,81.279814%20C0,96.5102614%20309,96.5102614%20309,81.279814%20Z'%20id='椭圆形'%20fill='url(%23linearGradient-7)'%20opacity='0.22710455'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"
|
|
28603
28658
|
}, null, -1),
|
|
28604
28659
|
r[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
|
|
28605
|
-
|
|
28660
|
+
R_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: R_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
|
|
28606
28661
|
])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28607
28662
|
ref_key: "messagesContainerRef",
|
|
28608
28663
|
ref: s,
|
|
28609
28664
|
class: "chatbot-messages"
|
|
28610
|
-
}, [
|
|
28665
|
+
}, [j_.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28611
28666
|
mode: "spin",
|
|
28612
28667
|
size: "small",
|
|
28613
28668
|
theme: "primary"
|
|
28614
28669
|
})])) : (openBlock(), createBlock(unref(message_container_default), {
|
|
28615
28670
|
key: 1,
|
|
28616
|
-
"
|
|
28617
|
-
|
|
28618
|
-
"
|
|
28619
|
-
"
|
|
28620
|
-
"
|
|
28671
|
+
ref_key: "messageContainerRef",
|
|
28672
|
+
ref: l,
|
|
28673
|
+
"selected-user-messages": E.value,
|
|
28674
|
+
"onUpdate:selectedUserMessages": r[0] ||= (e) => E.value = e,
|
|
28675
|
+
"enable-selection": b_.value,
|
|
28676
|
+
"message-status": H.value,
|
|
28677
|
+
"message-tools-status": r_.value,
|
|
28621
28678
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28622
|
-
messages:
|
|
28623
|
-
"on-agent-action":
|
|
28624
|
-
"on-agent-feedback":
|
|
28625
|
-
"on-user-action":
|
|
28679
|
+
messages: A_.value,
|
|
28680
|
+
"on-agent-action": J,
|
|
28681
|
+
"on-agent-feedback": Q,
|
|
28682
|
+
"on-user-action": c_,
|
|
28626
28683
|
"on-user-input-confirm": u_,
|
|
28627
|
-
"on-user-shortcut-confirm":
|
|
28684
|
+
"on-user-shortcut-confirm": d_,
|
|
28685
|
+
"stop-loading": N_.value,
|
|
28628
28686
|
onStopStreaming: v_
|
|
28629
28687
|
}, null, 8, [
|
|
28630
|
-
"selected-messages",
|
|
28688
|
+
"selected-user-messages",
|
|
28631
28689
|
"enable-selection",
|
|
28632
28690
|
"message-status",
|
|
28633
28691
|
"message-tools-status",
|
|
28634
28692
|
"message-tools-tippy-options",
|
|
28635
|
-
"messages"
|
|
28693
|
+
"messages",
|
|
28694
|
+
"stop-loading"
|
|
28636
28695
|
]))], 512)], 2112)),
|
|
28637
28696
|
createCommentVNode(" 统一底部区域 "),
|
|
28638
|
-
!F_.value &&
|
|
28697
|
+
!F_.value && b_.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28639
28698
|
key: 2,
|
|
28640
|
-
"is-all-selected":
|
|
28641
|
-
loading:
|
|
28642
|
-
"selected-count":
|
|
28699
|
+
"is-all-selected": l.value?.isAllSelected ?? !1,
|
|
28700
|
+
loading: x_.value,
|
|
28701
|
+
"selected-count": E.value.length,
|
|
28643
28702
|
onCancel: W_,
|
|
28644
28703
|
onConfirm: G_,
|
|
28645
|
-
onToggleAll:
|
|
28704
|
+
onToggleAll: J_
|
|
28646
28705
|
}, null, 8, [
|
|
28647
28706
|
"is-all-selected",
|
|
28648
28707
|
"loading",
|
|
28649
28708
|
"selected-count"
|
|
28650
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
28709
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_7, [T.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, T.value, {
|
|
28651
28710
|
onClose: ov,
|
|
28652
28711
|
onSubmit: cv
|
|
28653
28712
|
}), null, 16)) : renderSlot(n.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28654
28713
|
ref_key: "chatInputRef",
|
|
28655
|
-
ref:
|
|
28656
|
-
cite:
|
|
28657
|
-
"onUpdate:cite": r[1] ||= (e) =>
|
|
28658
|
-
"message-status":
|
|
28659
|
-
"model-value":
|
|
28714
|
+
ref: u,
|
|
28715
|
+
cite: D_.value,
|
|
28716
|
+
"onUpdate:cite": r[1] ||= (e) => D_.value = e,
|
|
28717
|
+
"message-status": H.value,
|
|
28718
|
+
"model-value": E_.value,
|
|
28660
28719
|
"on-send-message": nv,
|
|
28661
28720
|
"on-stop-sending": rv,
|
|
28662
|
-
"on-upload":
|
|
28721
|
+
"on-upload": tv,
|
|
28663
28722
|
placeholder: i.placeholder,
|
|
28664
28723
|
prompts: B_.value,
|
|
28665
|
-
resources:
|
|
28666
|
-
"shortcut-id":
|
|
28724
|
+
resources: z_.value,
|
|
28725
|
+
"shortcut-id": T.value?.id,
|
|
28667
28726
|
shortcuts: U_.value,
|
|
28668
28727
|
"support-upload": V_.value,
|
|
28669
28728
|
"tippy-options": e.messageToolsTippyOptions,
|
|
28670
28729
|
onDeleteShortcut: ov,
|
|
28671
28730
|
onSelectShortcut: iv,
|
|
28672
|
-
"onUpdate:modelValue":
|
|
28731
|
+
"onUpdate:modelValue": k_
|
|
28673
28732
|
}, null, 8, [
|
|
28674
28733
|
"cite",
|
|
28675
28734
|
"message-status",
|
|
@@ -29501,7 +29560,7 @@ function useDraggable(e = {}, n) {
|
|
|
29501
29560
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
29502
29561
|
}, H = (e, r, i, a) => {
|
|
29503
29562
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
29504
|
-
},
|
|
29563
|
+
}, r_ = () => {
|
|
29505
29564
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
29506
29565
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
29507
29566
|
else {
|
|
@@ -29522,9 +29581,9 @@ function useDraggable(e = {}, n) {
|
|
|
29522
29581
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
29523
29582
|
};
|
|
29524
29583
|
return onMounted(() => {
|
|
29525
|
-
window.addEventListener("resize",
|
|
29584
|
+
window.addEventListener("resize", r_);
|
|
29526
29585
|
}), onBeforeUnmount(() => {
|
|
29527
|
-
window.removeEventListener("resize",
|
|
29586
|
+
window.removeEventListener("resize", r_);
|
|
29528
29587
|
}), {
|
|
29529
29588
|
minWidth: i,
|
|
29530
29589
|
minHeight: a,
|
|
@@ -29583,7 +29642,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29583
29642
|
"compression-change"
|
|
29584
29643
|
],
|
|
29585
29644
|
setup(e, { expose: n, emit: r }) {
|
|
29586
|
-
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize:
|
|
29645
|
+
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: r_ } = useDraggable({
|
|
29587
29646
|
initWidth: i.defaultWidth,
|
|
29588
29647
|
minWidth: i.minWidth,
|
|
29589
29648
|
minHeight: i.minHeight,
|
|
@@ -29614,13 +29673,13 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29614
29673
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29615
29674
|
e.style.pointerEvents = "";
|
|
29616
29675
|
});
|
|
29617
|
-
},
|
|
29676
|
+
}, a_ = (e, n) => {
|
|
29618
29677
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29619
29678
|
}, Q = (e, n, r, i) => {
|
|
29620
29679
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29621
|
-
},
|
|
29680
|
+
}, o_ = (e, n) => {
|
|
29622
29681
|
I(e, n), o.value = !1, Z();
|
|
29623
|
-
},
|
|
29682
|
+
}, s_ = (e, n, r, i) => {
|
|
29624
29683
|
L(e, n, r, i), o.value = !1, Z();
|
|
29625
29684
|
};
|
|
29626
29685
|
return watch(O, (e) => {
|
|
@@ -29628,7 +29687,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29628
29687
|
}), n({
|
|
29629
29688
|
updatePosition: B,
|
|
29630
29689
|
updateSize: H,
|
|
29631
|
-
updatePositionAndSize:
|
|
29690
|
+
updatePositionAndSize: r_,
|
|
29632
29691
|
toggleCompression: z,
|
|
29633
29692
|
positionAndSize: K,
|
|
29634
29693
|
isCompressed: O
|
|
@@ -29650,9 +29709,9 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29650
29709
|
w: unref(T),
|
|
29651
29710
|
x: unref(_),
|
|
29652
29711
|
y: unref(g),
|
|
29653
|
-
onDragStop:
|
|
29654
|
-
onDragging:
|
|
29655
|
-
onResizeStop:
|
|
29712
|
+
onDragStop: o_,
|
|
29713
|
+
onDragging: a_,
|
|
29714
|
+
onResizeStop: s_,
|
|
29656
29715
|
onResizing: Q
|
|
29657
29716
|
}, {
|
|
29658
29717
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
@@ -29736,7 +29795,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29736
29795
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
29737
29796
|
theme: "ai-blueking",
|
|
29738
29797
|
delay: [0, 0]
|
|
29739
|
-
}),
|
|
29798
|
+
}), r_ = () => {
|
|
29740
29799
|
nextTick(() => {
|
|
29741
29800
|
G();
|
|
29742
29801
|
});
|
|
@@ -29750,9 +29809,9 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29750
29809
|
}), onMounted(() => {
|
|
29751
29810
|
nextTick(() => {
|
|
29752
29811
|
G();
|
|
29753
|
-
}), window.addEventListener("resize",
|
|
29812
|
+
}), window.addEventListener("resize", r_);
|
|
29754
29813
|
}), onBeforeUnmount(() => {
|
|
29755
|
-
window.removeEventListener("resize",
|
|
29814
|
+
window.removeEventListener("resize", r_);
|
|
29756
29815
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
29757
29816
|
active: !e.isPanelShow,
|
|
29758
29817
|
axis: "y",
|
|
@@ -29870,7 +29929,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29870
29929
|
}), T = _.panelVisible, E = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29871
29930
|
componentManager: _,
|
|
29872
29931
|
emit: a
|
|
29873
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: H, currentSession:
|
|
29932
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: H, currentSession: r_ } = useChatBootstrap({
|
|
29874
29933
|
url: u,
|
|
29875
29934
|
requestOptions: i.requestOptions,
|
|
29876
29935
|
autoInit: !0,
|
|
@@ -29896,12 +29955,12 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29896
29955
|
}), G = I, K = new SessionBusinessManager(G.session, G.agent, null, {
|
|
29897
29956
|
enableChatSession: i.enableChatSession,
|
|
29898
29957
|
initialSessionCode: i.initialSessionCode
|
|
29899
|
-
}), J = new ShareBusinessManager(G.message, G.session),
|
|
29958
|
+
}), J = new ShareBusinessManager(G.message, G.session), i_ = new UIStateManager(), Q = computed(() => i_.isSelectionMode.value), o_ = ref(!1), s_ = new ShortcutManager(null, i.shortcuts || []), c_ = ref(!1), u_ = ref(""), d_ = { appendTo: (e) => {
|
|
29900
29959
|
let n = e.closest(".draggable-container-content");
|
|
29901
29960
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29902
|
-
} },
|
|
29903
|
-
let e =
|
|
29904
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29961
|
+
} }, f_ = computed(() => _.isCompressed.value), p_ = computed(() => H.value), m_ = ref(""), h_ = ref(!0), g_ = ref(!1), v_ = computed(() => G.message.list.value.length === 0), y_ = computed(() => i.resources?.length ? i.resources : z.value?.resources ?? []), b_ = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), x_ = computed(() => {
|
|
29962
|
+
let e = s_.effectiveShortcuts.value;
|
|
29963
|
+
return typeof i.shortcutFilter == "function" && u_.value ? e.filter((e) => i.shortcutFilter?.(e, u_.value)) : e;
|
|
29905
29964
|
});
|
|
29906
29965
|
watch(() => L.value, async (e) => {
|
|
29907
29966
|
if (e && z.value) {
|
|
@@ -29912,61 +29971,67 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29912
29971
|
}).catch(() => {}), e.conversationSettings && (k("session-initialized", {
|
|
29913
29972
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29914
29973
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29915
|
-
}), e.conversationSettings.commands &&
|
|
29974
|
+
}), e.conversationSettings.commands && s_.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29916
29975
|
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29917
29976
|
} catch (e) {
|
|
29918
29977
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29919
29978
|
}
|
|
29920
29979
|
}
|
|
29921
29980
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29922
|
-
|
|
29923
|
-
}, { immediate: !0 }), watch(() =>
|
|
29924
|
-
e && (
|
|
29925
|
-
}, { immediate: !0 })
|
|
29926
|
-
|
|
29981
|
+
s_.setShortcuts(e || []);
|
|
29982
|
+
}, { immediate: !0 }), watch(() => r_.value, (e) => {
|
|
29983
|
+
e && (m_.value = e.sessionName || "", g_.value = (e.sessionContentCount ?? 0) > 0);
|
|
29984
|
+
}, { immediate: !0 });
|
|
29985
|
+
let S_ = () => G.message.list.value.some((e) => {
|
|
29986
|
+
if (!("property" in e)) return !0;
|
|
29987
|
+
let { property: n } = e;
|
|
29988
|
+
return !n?.extra?.pause;
|
|
29989
|
+
});
|
|
29990
|
+
watch(() => G.message.list.value.length, () => {
|
|
29991
|
+
g_.value = S_();
|
|
29927
29992
|
});
|
|
29928
29993
|
let w_ = async (e) => {
|
|
29929
29994
|
_.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29930
|
-
},
|
|
29995
|
+
}, T_ = async (e) => {
|
|
29931
29996
|
await w_(e);
|
|
29932
29997
|
}, D_ = () => {
|
|
29933
29998
|
_.hidePanel();
|
|
29934
|
-
},
|
|
29999
|
+
}, O_ = () => {
|
|
29935
30000
|
D_();
|
|
29936
|
-
},
|
|
30001
|
+
}, k_ = () => {
|
|
29937
30002
|
_.handleNimbusClick();
|
|
29938
|
-
},
|
|
29939
|
-
|
|
29940
|
-
},
|
|
29941
|
-
|
|
30003
|
+
}, A_ = (e) => {
|
|
30004
|
+
u_.value = e;
|
|
30005
|
+
}, j_ = async (e, n) => {
|
|
30006
|
+
c_.value = !1, await w_(), l.value && (e.components?.length ? l.value.selectShortcut(e, n) : (l.value.selectShortcut(e), l.value.setCiteText(n), l.value.focusInput())), k("shortcut-click", {
|
|
29942
30007
|
shortcut: e,
|
|
29943
30008
|
source: "popup"
|
|
29944
30009
|
});
|
|
29945
|
-
},
|
|
30010
|
+
}, M_ = (e) => {
|
|
29946
30011
|
k("shortcut-click", e);
|
|
29947
|
-
},
|
|
30012
|
+
}, N_ = (e) => {
|
|
29948
30013
|
_.handleDragging(e);
|
|
29949
|
-
},
|
|
30014
|
+
}, P_ = (e) => {
|
|
29950
30015
|
_.handleResizing(e);
|
|
29951
|
-
},
|
|
30016
|
+
}, F_ = (e) => {
|
|
29952
30017
|
_.handleDragStop(e);
|
|
29953
|
-
},
|
|
30018
|
+
}, I_ = (e) => {
|
|
29954
30019
|
_.handleResizeStop(e);
|
|
29955
30020
|
}, R_ = () => {
|
|
29956
30021
|
_.container.toggleCompression();
|
|
29957
|
-
},
|
|
30022
|
+
}, z_ = (e) => {
|
|
29958
30023
|
_.setCompressed(e);
|
|
29959
|
-
},
|
|
29960
|
-
j.newChat();
|
|
29961
|
-
},
|
|
30024
|
+
}, B_ = async () => {
|
|
30025
|
+
i_.disableSelectionMode(), j.newChat();
|
|
30026
|
+
}, V_ = (e) => {
|
|
29962
30027
|
j.historyClick(e);
|
|
30028
|
+
}, H_ = async (e) => {
|
|
30029
|
+
i_.disableSelectionMode(), await K.switchSession(e);
|
|
29963
30030
|
}, U_ = async (e) => {
|
|
29964
|
-
await K.switchSession(e);
|
|
29965
|
-
}, W_ = async (e) => {
|
|
29966
30031
|
await K.deleteSession(e);
|
|
29967
|
-
},
|
|
30032
|
+
}, W_ = async (e, n) => {
|
|
29968
30033
|
await K.updateSessionName(e, n);
|
|
29969
|
-
},
|
|
30034
|
+
}, G_ = async () => {
|
|
29970
30035
|
let e = G.session.current?.value?.sessionCode;
|
|
29971
30036
|
if (!e) {
|
|
29972
30037
|
console.error("[AIBlueking] Cannot auto-generate name: no active session");
|
|
@@ -29975,14 +30040,14 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29975
30040
|
try {
|
|
29976
30041
|
await G.session.renameSession(e);
|
|
29977
30042
|
let n = G.session.list.value.find((n) => n.sessionCode === e);
|
|
29978
|
-
n && (
|
|
30043
|
+
n && (m_.value = n.sessionName || "");
|
|
29979
30044
|
} catch (e) {
|
|
29980
|
-
console.error("[AIBlueking] Failed to auto-generate session name:", e),
|
|
30045
|
+
console.error("[AIBlueking] Failed to auto-generate session name:", e), cv(e);
|
|
29981
30046
|
}
|
|
29982
30047
|
j.autoGenerateName();
|
|
29983
|
-
},
|
|
30048
|
+
}, K_ = () => {
|
|
29984
30049
|
j.helpClick();
|
|
29985
|
-
},
|
|
30050
|
+
}, q_ = async (e) => {
|
|
29986
30051
|
let n = G.session.current?.value;
|
|
29987
30052
|
if (!n) {
|
|
29988
30053
|
console.error("[AIBlueking] Cannot rename: no active session");
|
|
@@ -29992,93 +30057,93 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29992
30057
|
await G.session.updateSession({
|
|
29993
30058
|
...n,
|
|
29994
30059
|
sessionName: e
|
|
29995
|
-
}),
|
|
30060
|
+
}), m_.value = e;
|
|
29996
30061
|
} catch (e) {
|
|
29997
|
-
console.error("[AIBlueking] Failed to rename session:", e),
|
|
30062
|
+
console.error("[AIBlueking] Failed to rename session:", e), cv(e);
|
|
29998
30063
|
}
|
|
29999
30064
|
j.rename(e);
|
|
30065
|
+
}, J_ = () => {
|
|
30066
|
+
i_.enableSelectionMode(), j.share();
|
|
30000
30067
|
}, Y_ = () => {
|
|
30001
|
-
|
|
30002
|
-
}, X_ = () => {
|
|
30003
|
-
o_.
|
|
30004
|
-
}, Z_ = async (e) => {
|
|
30005
|
-
c_.value = !0;
|
|
30068
|
+
i_.disableSelectionMode();
|
|
30069
|
+
}, X_ = async (e) => {
|
|
30070
|
+
o_.value = !0;
|
|
30006
30071
|
try {
|
|
30007
30072
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
30008
30073
|
await copyToClipboard(n), Message({
|
|
30009
30074
|
message: t("分享链接已复制到剪贴板"),
|
|
30010
30075
|
theme: "success"
|
|
30011
|
-
}),
|
|
30076
|
+
}), i_.disableSelectionMode(), j.shareMessages(r);
|
|
30012
30077
|
} catch (e) {
|
|
30013
|
-
console.error("[AIBlueking] Failed to share messages:", e),
|
|
30078
|
+
console.error("[AIBlueking] Failed to share messages:", e), cv(e);
|
|
30014
30079
|
} finally {
|
|
30015
|
-
|
|
30080
|
+
o_.value = !1;
|
|
30016
30081
|
}
|
|
30017
|
-
},
|
|
30082
|
+
}, Z_ = async (e) => {
|
|
30018
30083
|
l.value && await l.value.sendMessage(e);
|
|
30019
|
-
},
|
|
30020
|
-
|
|
30021
|
-
},
|
|
30084
|
+
}, Q_ = (e) => {
|
|
30085
|
+
g_.value = !0, j.sendMessage(e);
|
|
30086
|
+
}, $_ = () => {
|
|
30022
30087
|
j.receiveStart();
|
|
30023
|
-
},
|
|
30088
|
+
}, ev = () => {
|
|
30024
30089
|
j.receiveText();
|
|
30025
|
-
},
|
|
30090
|
+
}, tv = () => {
|
|
30026
30091
|
j.receiveEnd();
|
|
30027
|
-
},
|
|
30092
|
+
}, nv = () => {
|
|
30028
30093
|
j.stop();
|
|
30029
|
-
},
|
|
30094
|
+
}, rv = () => {
|
|
30030
30095
|
l.value && l.value.stopGeneration();
|
|
30031
|
-
},
|
|
30096
|
+
}, iv = async (e) => {
|
|
30032
30097
|
e ? await K.createSession({ sessionCode: e }) : await K.createNewSession();
|
|
30033
|
-
},
|
|
30098
|
+
}, av = async (e) => {
|
|
30034
30099
|
l.value && await l.value.switchSession(e);
|
|
30035
|
-
},
|
|
30100
|
+
}, ov = async (e, n) => {
|
|
30036
30101
|
try {
|
|
30037
|
-
await K.updateSessionName(e, n),
|
|
30102
|
+
await K.updateSessionName(e, n), m_.value = n;
|
|
30038
30103
|
} catch (e) {
|
|
30039
|
-
console.error("[AIBlueking] Failed to update session name:", e),
|
|
30104
|
+
console.error("[AIBlueking] Failed to update session name:", e), cv(e);
|
|
30040
30105
|
}
|
|
30106
|
+
}, sv = (e) => {
|
|
30107
|
+
e && (m_.value = e.sessionName || "", g_.value = (e.sessionContentCount ?? 0) > 0 || S_());
|
|
30041
30108
|
}, cv = (e) => {
|
|
30042
|
-
e && (g_.value = e.sessionName || "", v_.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
|
|
30043
|
-
}, lv = (e) => {
|
|
30044
30109
|
console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
|
|
30045
30110
|
apiName: "chat",
|
|
30046
30111
|
code: -1,
|
|
30047
30112
|
message: e.message,
|
|
30048
30113
|
data: e
|
|
30049
30114
|
});
|
|
30050
|
-
},
|
|
30115
|
+
}, lv = (e, n) => {
|
|
30051
30116
|
_.container.updatePosition(e, n);
|
|
30052
|
-
},
|
|
30117
|
+
}, uv = (e, n) => {
|
|
30053
30118
|
_.container.updateSize(e, n);
|
|
30054
|
-
},
|
|
30119
|
+
}, dv = (e, n, r, i) => {
|
|
30055
30120
|
_.container.updatePositionAndSize(e, n, r, i);
|
|
30056
|
-
},
|
|
30121
|
+
}, fv = (e) => {
|
|
30057
30122
|
l.value && l.value.setCiteText(e);
|
|
30058
|
-
},
|
|
30123
|
+
}, pv = () => {
|
|
30059
30124
|
l.value && l.value.focusInput();
|
|
30060
|
-
},
|
|
30125
|
+
}, mv = (e) => {
|
|
30061
30126
|
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? D_() : w_());
|
|
30062
30127
|
};
|
|
30063
30128
|
return onMounted(async () => {
|
|
30064
|
-
o.value && _.setContainerRef(o.value), window.addEventListener("keydown",
|
|
30129
|
+
o.value && _.setContainerRef(o.value), window.addEventListener("keydown", mv);
|
|
30065
30130
|
}), onBeforeUnmount(() => {
|
|
30066
|
-
window.removeEventListener("keydown",
|
|
30131
|
+
window.removeEventListener("keydown", mv), _.destroy();
|
|
30067
30132
|
}), n({
|
|
30068
30133
|
show: w_,
|
|
30069
|
-
handleShow:
|
|
30070
|
-
handleClose:
|
|
30134
|
+
handleShow: T_,
|
|
30135
|
+
handleClose: O_,
|
|
30071
30136
|
hide: D_,
|
|
30072
|
-
sendMessage:
|
|
30073
|
-
stopGeneration:
|
|
30074
|
-
addNewSession:
|
|
30075
|
-
switchToSession:
|
|
30076
|
-
updateSessionName:
|
|
30077
|
-
updatePosition:
|
|
30078
|
-
updateSize:
|
|
30079
|
-
updatePositionAndSize:
|
|
30080
|
-
setCiteText:
|
|
30081
|
-
focusInput:
|
|
30137
|
+
sendMessage: Z_,
|
|
30138
|
+
stopGeneration: rv,
|
|
30139
|
+
addNewSession: iv,
|
|
30140
|
+
switchToSession: av,
|
|
30141
|
+
updateSessionName: ov,
|
|
30142
|
+
updatePosition: lv,
|
|
30143
|
+
updateSize: uv,
|
|
30144
|
+
updatePositionAndSize: dv,
|
|
30145
|
+
setCiteText: fv,
|
|
30146
|
+
focusInput: pv
|
|
30082
30147
|
}), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
|
|
30083
30148
|
createCommentVNode(" 可拖拽容器 "),
|
|
30084
30149
|
createVNode(unref(draggable_container_default), {
|
|
@@ -30094,41 +30159,41 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30094
30159
|
"max-width": i.maxWidth,
|
|
30095
30160
|
"max-width-percent": 80,
|
|
30096
30161
|
visible: unref(T),
|
|
30097
|
-
onCompressionChange:
|
|
30098
|
-
onDragStop:
|
|
30099
|
-
onDragging:
|
|
30100
|
-
onResizeStop:
|
|
30101
|
-
onResizing:
|
|
30162
|
+
onCompressionChange: z_,
|
|
30163
|
+
onDragStop: F_,
|
|
30164
|
+
onDragging: N_,
|
|
30165
|
+
onResizeStop: I_,
|
|
30166
|
+
onResizing: P_
|
|
30102
30167
|
}, {
|
|
30103
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": !
|
|
30168
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": !v_.value }]) }, [
|
|
30104
30169
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
30105
30170
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
30106
30171
|
key: 0,
|
|
30107
|
-
"agent-name":
|
|
30172
|
+
"agent-name": p_.value,
|
|
30108
30173
|
"chat-helper": unref(G),
|
|
30109
30174
|
draggable: i.draggable,
|
|
30110
30175
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
30111
30176
|
"enable-chat-session": i.enableChatSession,
|
|
30112
|
-
"has-permission":
|
|
30113
|
-
"has-session-contents":
|
|
30114
|
-
"is-compression-height":
|
|
30177
|
+
"has-permission": h_.value,
|
|
30178
|
+
"has-session-contents": g_.value,
|
|
30179
|
+
"is-compression-height": f_.value,
|
|
30115
30180
|
"session-business-manager": unref(K),
|
|
30116
|
-
"session-name":
|
|
30181
|
+
"session-name": m_.value,
|
|
30117
30182
|
"show-compression-icon": i.showCompressionIcon,
|
|
30118
30183
|
"show-history-icon": i.showHistoryIcon,
|
|
30119
30184
|
"show-more-icon": i.showMoreIcon,
|
|
30120
30185
|
"show-new-chat-icon": i.showNewChatIcon,
|
|
30121
30186
|
title: i.title,
|
|
30122
|
-
onAutoGenerateName:
|
|
30123
|
-
onClose:
|
|
30124
|
-
onHelpClick:
|
|
30125
|
-
onHistoryClick:
|
|
30126
|
-
onHistorySessionDelete:
|
|
30127
|
-
onHistorySessionRename:
|
|
30128
|
-
onHistorySessionSwitch:
|
|
30129
|
-
onNewChat:
|
|
30130
|
-
onRename:
|
|
30131
|
-
onShare:
|
|
30187
|
+
onAutoGenerateName: G_,
|
|
30188
|
+
onClose: O_,
|
|
30189
|
+
onHelpClick: K_,
|
|
30190
|
+
onHistoryClick: V_,
|
|
30191
|
+
onHistorySessionDelete: U_,
|
|
30192
|
+
onHistorySessionRename: W_,
|
|
30193
|
+
onHistorySessionSwitch: H_,
|
|
30194
|
+
onNewChat: B_,
|
|
30195
|
+
onRename: q_,
|
|
30196
|
+
onShare: J_,
|
|
30132
30197
|
onToggleCompression: R_
|
|
30133
30198
|
}, null, 8, [
|
|
30134
30199
|
"agent-name",
|
|
@@ -30155,26 +30220,26 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30155
30220
|
"chat-helper": unref(G),
|
|
30156
30221
|
"enable-selection": Q.value,
|
|
30157
30222
|
"hello-text": i.helloText,
|
|
30158
|
-
"message-tools-tippy-options":
|
|
30223
|
+
"message-tools-tippy-options": d_,
|
|
30159
30224
|
placeholder: i.placeholder,
|
|
30160
|
-
prompts:
|
|
30225
|
+
prompts: b_.value,
|
|
30161
30226
|
"request-options": i.requestOptions,
|
|
30162
|
-
resources:
|
|
30227
|
+
resources: y_.value,
|
|
30163
30228
|
"session-code": i.initialSessionCode,
|
|
30164
|
-
"share-loading":
|
|
30229
|
+
"share-loading": o_.value,
|
|
30165
30230
|
shortcuts: i.shortcuts,
|
|
30166
30231
|
url: u.value,
|
|
30167
|
-
onCancelShare:
|
|
30168
|
-
onConfirmShare: n[0] ||= (e) =>
|
|
30169
|
-
onError: n[1] ||= (e) =>
|
|
30170
|
-
onReceiveEnd:
|
|
30171
|
-
onReceiveStart:
|
|
30172
|
-
onReceiveText:
|
|
30173
|
-
onRequestShare:
|
|
30174
|
-
onSendMessage: n[2] ||= (e) =>
|
|
30175
|
-
onSessionSwitched: n[3] ||= (e) =>
|
|
30176
|
-
onShortcutClick:
|
|
30177
|
-
onStop:
|
|
30232
|
+
onCancelShare: Y_,
|
|
30233
|
+
onConfirmShare: n[0] ||= (e) => X_(e),
|
|
30234
|
+
onError: n[1] ||= (e) => cv(e),
|
|
30235
|
+
onReceiveEnd: tv,
|
|
30236
|
+
onReceiveStart: $_,
|
|
30237
|
+
onReceiveText: ev,
|
|
30238
|
+
onRequestShare: J_,
|
|
30239
|
+
onSendMessage: n[2] ||= (e) => Q_(e),
|
|
30240
|
+
onSessionSwitched: n[3] ||= (e) => sv(e),
|
|
30241
|
+
onShortcutClick: M_,
|
|
30242
|
+
onStop: nv
|
|
30178
30243
|
}, null, 8, [
|
|
30179
30244
|
"auto-load",
|
|
30180
30245
|
"chat-helper",
|
|
@@ -30210,7 +30275,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30210
30275
|
"onUpdate:isPanelShow": n[5] ||= (e) => isRef(T) ? T.value = e : null,
|
|
30211
30276
|
"default-minimize": i.defaultMinimize,
|
|
30212
30277
|
size: i.nimbusSize,
|
|
30213
|
-
onClick:
|
|
30278
|
+
onClick: k_
|
|
30214
30279
|
}, null, 8, [
|
|
30215
30280
|
"is-minimize",
|
|
30216
30281
|
"is-panel-show",
|
|
@@ -30220,13 +30285,13 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30220
30285
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
30221
30286
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
30222
30287
|
key: 1,
|
|
30223
|
-
visible:
|
|
30224
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
30288
|
+
visible: c_.value,
|
|
30289
|
+
"onUpdate:visible": n[6] ||= (e) => c_.value = e,
|
|
30225
30290
|
"exclude-selectors": [".draggable-container-wrapper"],
|
|
30226
30291
|
"max-shortcut-count": i.shortcutLimit,
|
|
30227
|
-
shortcuts:
|
|
30228
|
-
onSelectShortcut:
|
|
30229
|
-
onSelectionChange:
|
|
30292
|
+
shortcuts: x_.value,
|
|
30293
|
+
onSelectShortcut: j_,
|
|
30294
|
+
onSelectionChange: A_
|
|
30230
30295
|
}, null, 8, [
|
|
30231
30296
|
"visible",
|
|
30232
30297
|
"max-shortcut-count",
|
|
@@ -30234,5 +30299,5 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30234
30299
|
])) : createCommentVNode("v-if", !0)
|
|
30235
30300
|
], 2)], 8, ["to"]));
|
|
30236
30301
|
}
|
|
30237
|
-
}), [["__scopeId", "data-v-
|
|
30302
|
+
}), [["__scopeId", "data-v-06c0f2a6"]]);
|
|
30238
30303
|
export { AGUIProtocol, ai_blueking_default as AIBlueking, ai_blueking_default as default, BluekingProtocol, BootstrapPhase, chat_bot_default as ChatBot, ChatBusinessManager, ComponentManager, draggable_container_default as DraggableContainer, MessageContentType, SessionBusinessManager, ShortcutManager, UIStateManager, createBluekingProtocol, createComponentManager, defaultProps, useChatBootstrap, useChatHelper, useDraggable };
|