@blueking/ai-blueking 2.0.0-dev.30 → 2.0.0-dev.31
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/vue2/index.es.min.js +560 -553
- package/dist/vue2/index.iife.min.js +7 -7
- package/dist/vue2/index.umd.min.js +26 -26
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +585 -578
- package/dist/vue3/index.iife.min.js +7 -7
- package/dist/vue3/index.umd.min.js +26 -26
- package/dist/vue3/style.css +1 -1
- package/package.json +2 -2
|
@@ -123,7 +123,8 @@ const isImageFile = (e) => e ? e.startsWith("image/") : !1, getFilePreviewUrl =
|
|
|
123
123
|
重新加载: "Reload",
|
|
124
124
|
宽: "W",
|
|
125
125
|
高: "H",
|
|
126
|
-
上传图片: "Upload Image"
|
|
126
|
+
上传图片: "Upload Image",
|
|
127
|
+
"上传图片, 最多支持上传 3 个, 最大支持 2.4MB": "Upload Image, up to 3 images supported, max 2.4MB each"
|
|
127
128
|
}, t$1 = (e) => isEn ? lang$1[e] : e, CHAT_Z_INDEX = 9999;
|
|
128
129
|
CHAT_Z_INDEX + 1;
|
|
129
130
|
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 = [
|
|
@@ -832,14 +833,14 @@ var _hoisted_1$45 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
832
833
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
833
834
|
}, B = (e) => {
|
|
834
835
|
z(), a("selectShortcut", e, E.value);
|
|
835
|
-
}, H = null,
|
|
836
|
+
}, H = null, i_ = (e) => {
|
|
836
837
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
837
838
|
L();
|
|
838
839
|
}, e);
|
|
839
840
|
}, G = () => {
|
|
840
|
-
|
|
841
|
+
i_(200);
|
|
841
842
|
}, q = () => {
|
|
842
|
-
|
|
843
|
+
i_(300);
|
|
843
844
|
}, J = (e) => {
|
|
844
845
|
i.value && l.value?.contains(e.target) || z();
|
|
845
846
|
}, Z = (e) => {
|
|
@@ -1218,17 +1219,17 @@ var _hoisted_1$43 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1218
1219
|
}
|
|
1219
1220
|
function H() {
|
|
1220
1221
|
var e = i();
|
|
1221
|
-
if (B(e)) return
|
|
1222
|
+
if (B(e)) return i_(e);
|
|
1222
1223
|
v = setTimeout(H, z(e));
|
|
1223
1224
|
}
|
|
1224
|
-
function
|
|
1225
|
+
function i_(e) {
|
|
1225
1226
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1226
1227
|
}
|
|
1227
1228
|
function G() {
|
|
1228
1229
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1229
1230
|
}
|
|
1230
1231
|
function K() {
|
|
1231
|
-
return v === void 0 ? _ :
|
|
1232
|
+
return v === void 0 ? _ : i_(i());
|
|
1232
1233
|
}
|
|
1233
1234
|
function q() {
|
|
1234
1235
|
var e = i(), r = B(e);
|
|
@@ -4926,7 +4927,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4926
4927
|
return a;
|
|
4927
4928
|
}).map((e) => `(${e})`).join(n);
|
|
4928
4929
|
}
|
|
4929
|
-
var
|
|
4930
|
+
var i_ = /\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+)?)", a_ = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", o_ = (e = {}) => {
|
|
4930
4931
|
let n = /^#![ ]*\//;
|
|
4931
4932
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4932
4933
|
scope: "meta",
|
|
@@ -4940,7 +4941,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4940
4941
|
}, Q = {
|
|
4941
4942
|
begin: "\\\\[\\s\\S]",
|
|
4942
4943
|
relevance: 0
|
|
4943
|
-
},
|
|
4944
|
+
}, s_ = {
|
|
4944
4945
|
scope: "string",
|
|
4945
4946
|
begin: "'",
|
|
4946
4947
|
end: "'",
|
|
@@ -4952,7 +4953,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4952
4953
|
end: "\"",
|
|
4953
4954
|
illegal: "\\n",
|
|
4954
4955
|
contains: [Q]
|
|
4955
|
-
},
|
|
4956
|
+
}, c_ = { 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/ }, l_ = function(e, n, r = {}) {
|
|
4956
4957
|
let i = o({
|
|
4957
4958
|
scope: "comment",
|
|
4958
4959
|
begin: e,
|
|
@@ -4968,19 +4969,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4968
4969
|
});
|
|
4969
4970
|
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
4971
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4971
|
-
},
|
|
4972
|
+
}, u_ = l_("//", "$"), d_ = l_("/\\*", "\\*/"), f_ = l_("#", "$"), p_ = {
|
|
4972
4973
|
scope: "number",
|
|
4973
4974
|
begin: q,
|
|
4974
4975
|
relevance: 0
|
|
4975
|
-
},
|
|
4976
|
+
}, m_ = {
|
|
4976
4977
|
scope: "number",
|
|
4977
4978
|
begin: J,
|
|
4978
4979
|
relevance: 0
|
|
4979
|
-
},
|
|
4980
|
+
}, h_ = {
|
|
4980
4981
|
scope: "number",
|
|
4981
|
-
begin:
|
|
4982
|
+
begin: a_,
|
|
4982
4983
|
relevance: 0
|
|
4983
|
-
},
|
|
4984
|
+
}, g_ = {
|
|
4984
4985
|
scope: "regexp",
|
|
4985
4986
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4986
4987
|
end: /\/[gimuy]*/,
|
|
@@ -4990,27 +4991,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4990
4991
|
relevance: 0,
|
|
4991
4992
|
contains: [Q]
|
|
4992
4993
|
}]
|
|
4993
|
-
},
|
|
4994
|
+
}, __ = {
|
|
4994
4995
|
scope: "title",
|
|
4995
4996
|
begin: G,
|
|
4996
4997
|
relevance: 0
|
|
4997
|
-
},
|
|
4998
|
+
}, v_ = {
|
|
4998
4999
|
scope: "title",
|
|
4999
5000
|
begin: K,
|
|
5000
5001
|
relevance: 0
|
|
5001
|
-
},
|
|
5002
|
+
}, y_ = {
|
|
5002
5003
|
begin: "\\.\\s*" + K,
|
|
5003
5004
|
relevance: 0
|
|
5004
|
-
},
|
|
5005
|
+
}, b_ = /* @__PURE__ */ Object.freeze({
|
|
5005
5006
|
__proto__: null,
|
|
5006
|
-
APOS_STRING_MODE:
|
|
5007
|
+
APOS_STRING_MODE: s_,
|
|
5007
5008
|
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:
|
|
5009
|
+
BINARY_NUMBER_MODE: h_,
|
|
5010
|
+
BINARY_NUMBER_RE: a_,
|
|
5011
|
+
COMMENT: l_,
|
|
5012
|
+
C_BLOCK_COMMENT_MODE: d_,
|
|
5013
|
+
C_LINE_COMMENT_MODE: u_,
|
|
5014
|
+
C_NUMBER_MODE: m_,
|
|
5014
5015
|
C_NUMBER_RE: J,
|
|
5015
5016
|
END_SAME_AS_BEGIN: function(e) {
|
|
5016
5017
|
return Object.assign(e, {
|
|
@@ -5022,43 +5023,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5022
5023
|
}
|
|
5023
5024
|
});
|
|
5024
5025
|
},
|
|
5025
|
-
HASH_COMMENT_MODE:
|
|
5026
|
+
HASH_COMMENT_MODE: f_,
|
|
5026
5027
|
IDENT_RE: G,
|
|
5027
|
-
MATCH_NOTHING_RE:
|
|
5028
|
-
METHOD_GUARD:
|
|
5029
|
-
NUMBER_MODE:
|
|
5028
|
+
MATCH_NOTHING_RE: i_,
|
|
5029
|
+
METHOD_GUARD: y_,
|
|
5030
|
+
NUMBER_MODE: p_,
|
|
5030
5031
|
NUMBER_RE: q,
|
|
5031
|
-
PHRASAL_WORDS_MODE:
|
|
5032
|
+
PHRASAL_WORDS_MODE: c_,
|
|
5032
5033
|
QUOTE_STRING_MODE: $,
|
|
5033
|
-
REGEXP_MODE:
|
|
5034
|
+
REGEXP_MODE: g_,
|
|
5034
5035
|
RE_STARTERS_RE: Z,
|
|
5035
|
-
SHEBANG:
|
|
5036
|
-
TITLE_MODE:
|
|
5036
|
+
SHEBANG: o_,
|
|
5037
|
+
TITLE_MODE: __,
|
|
5037
5038
|
UNDERSCORE_IDENT_RE: K,
|
|
5038
|
-
UNDERSCORE_TITLE_MODE:
|
|
5039
|
+
UNDERSCORE_TITLE_MODE: v_
|
|
5039
5040
|
});
|
|
5040
|
-
function
|
|
5041
|
+
function x_(e, n) {
|
|
5041
5042
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
5042
5043
|
}
|
|
5043
|
-
function
|
|
5044
|
+
function S_(e, n) {
|
|
5044
5045
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
5045
5046
|
}
|
|
5046
|
-
function
|
|
5047
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
5047
|
+
function C_(e, n) {
|
|
5048
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = x_, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
5048
5049
|
}
|
|
5049
|
-
function
|
|
5050
|
+
function w_(e, n) {
|
|
5050
5051
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
5051
5052
|
}
|
|
5052
|
-
function
|
|
5053
|
+
function T_(e, n) {
|
|
5053
5054
|
if (e.match) {
|
|
5054
5055
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
5055
5056
|
e.begin = e.match, delete e.match;
|
|
5056
5057
|
}
|
|
5057
5058
|
}
|
|
5058
|
-
function
|
|
5059
|
+
function E_(e, n) {
|
|
5059
5060
|
e.relevance === void 0 && (e.relevance = 1);
|
|
5060
5061
|
}
|
|
5061
|
-
var
|
|
5062
|
+
var D_ = (e, n) => {
|
|
5062
5063
|
if (!e.beforeMatch) return;
|
|
5063
5064
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
5064
5065
|
let r = Object.assign({}, e);
|
|
@@ -5068,7 +5069,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5068
5069
|
relevance: 0,
|
|
5069
5070
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
5070
5071
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
5071
|
-
},
|
|
5072
|
+
}, O_ = [
|
|
5072
5073
|
"of",
|
|
5073
5074
|
"and",
|
|
5074
5075
|
"for",
|
|
@@ -5080,58 +5081,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5080
5081
|
"parent",
|
|
5081
5082
|
"list",
|
|
5082
5083
|
"value"
|
|
5083
|
-
],
|
|
5084
|
-
function
|
|
5084
|
+
], k_ = "keyword";
|
|
5085
|
+
function A_(e, n, r = k_) {
|
|
5085
5086
|
let i = Object.create(null);
|
|
5086
5087
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
5087
|
-
Object.assign(i,
|
|
5088
|
+
Object.assign(i, A_(e[r], n, r));
|
|
5088
5089
|
}), i;
|
|
5089
5090
|
function a(e, r) {
|
|
5090
5091
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
5091
5092
|
let r = n.split("|");
|
|
5092
|
-
i[r[0]] = [e,
|
|
5093
|
+
i[r[0]] = [e, j_(r[0], r[1])];
|
|
5093
5094
|
});
|
|
5094
5095
|
}
|
|
5095
5096
|
}
|
|
5096
|
-
function
|
|
5097
|
-
return n ? Number(n) :
|
|
5097
|
+
function j_(e, n) {
|
|
5098
|
+
return n ? Number(n) : M_(e) ? 0 : 1;
|
|
5098
5099
|
}
|
|
5099
|
-
function
|
|
5100
|
-
return
|
|
5100
|
+
function M_(e) {
|
|
5101
|
+
return O_.includes(e.toLowerCase());
|
|
5101
5102
|
}
|
|
5102
|
-
var
|
|
5103
|
+
var N_ = {}, P_ = (e) => {
|
|
5103
5104
|
console.error(e);
|
|
5104
|
-
},
|
|
5105
|
+
}, F_ = (e, ...n) => {
|
|
5105
5106
|
console.log(`WARN: ${e}`, ...n);
|
|
5106
|
-
},
|
|
5107
|
-
|
|
5108
|
-
},
|
|
5109
|
-
function
|
|
5107
|
+
}, I_ = (e, n) => {
|
|
5108
|
+
N_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), N_[`${e}/${n}`] = !0);
|
|
5109
|
+
}, L_ = /* @__PURE__ */ Error();
|
|
5110
|
+
function R_(e, n, { key: r }) {
|
|
5110
5111
|
let i = 0, a = e[r], o = {}, s = {};
|
|
5111
5112
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
5112
5113
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
5113
5114
|
}
|
|
5114
|
-
function
|
|
5115
|
+
function z_(e) {
|
|
5115
5116
|
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
|
-
|
|
5117
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw P_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), L_;
|
|
5118
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw P_("beginScope must be object"), L_;
|
|
5119
|
+
R_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
5119
5120
|
}
|
|
5120
5121
|
}
|
|
5121
|
-
function
|
|
5122
|
+
function B_(e) {
|
|
5122
5123
|
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
|
-
|
|
5124
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw P_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), L_;
|
|
5125
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw P_("endScope must be object"), L_;
|
|
5126
|
+
R_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
5126
5127
|
}
|
|
5127
5128
|
}
|
|
5128
|
-
function
|
|
5129
|
+
function V_(e) {
|
|
5129
5130
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5130
5131
|
}
|
|
5131
|
-
function
|
|
5132
|
-
|
|
5132
|
+
function H_(e) {
|
|
5133
|
+
V_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), z_(e), B_(e);
|
|
5133
5134
|
}
|
|
5134
|
-
function
|
|
5135
|
+
function U_(e) {
|
|
5135
5136
|
function n(n, r) {
|
|
5136
5137
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5137
5138
|
}
|
|
@@ -5193,18 +5194,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5193
5194
|
let o = r;
|
|
5194
5195
|
if (r.isCompiled) return o;
|
|
5195
5196
|
[
|
|
5196
|
-
|
|
5197
|
-
E_,
|
|
5198
|
-
U_,
|
|
5199
|
-
O_
|
|
5200
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5201
|
-
w_,
|
|
5197
|
+
S_,
|
|
5202
5198
|
T_,
|
|
5199
|
+
H_,
|
|
5203
5200
|
D_
|
|
5201
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5202
|
+
C_,
|
|
5203
|
+
w_,
|
|
5204
|
+
E_
|
|
5204
5205
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5205
5206
|
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
|
|
5207
|
+
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 &&= A_(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) {
|
|
5208
|
+
return G_(e === "self" ? r : e);
|
|
5208
5209
|
})), r.contains.forEach(function(e) {
|
|
5209
5210
|
s(e, o);
|
|
5210
5211
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5212,19 +5213,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5212
5213
|
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
5214
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5214
5215
|
}
|
|
5215
|
-
function
|
|
5216
|
-
return e ? e.endsWithParent ||
|
|
5216
|
+
function W_(e) {
|
|
5217
|
+
return e ? e.endsWithParent || W_(e.starts) : !1;
|
|
5217
5218
|
}
|
|
5218
|
-
function
|
|
5219
|
+
function G_(e) {
|
|
5219
5220
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5220
5221
|
return o(e, { variants: null }, n);
|
|
5221
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5222
|
+
})), e.cachedVariants ? e.cachedVariants : W_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5222
5223
|
}
|
|
5223
|
-
var
|
|
5224
|
+
var K_ = "11.11.1", q_ = class extends Error {
|
|
5224
5225
|
constructor(e, n) {
|
|
5225
5226
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5226
5227
|
}
|
|
5227
|
-
},
|
|
5228
|
+
}, J_ = a, Y_ = o, X_ = Symbol("nomatch"), Z_ = 7, Q_ = function(e) {
|
|
5228
5229
|
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
5230
|
disableAutodetect: !0,
|
|
5230
5231
|
name: "Plain text",
|
|
@@ -5247,21 +5248,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5247
5248
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5248
5249
|
let r = d.languageDetectRe.exec(n);
|
|
5249
5250
|
if (r) {
|
|
5250
|
-
let n =
|
|
5251
|
-
return n || (
|
|
5251
|
+
let n = s_(r[1]);
|
|
5252
|
+
return n || (F_(l.replace("{}", r[1])), F_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5252
5253
|
}
|
|
5253
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5254
|
+
return n.split(/\s+/).find((e) => m(e) || s_(e));
|
|
5254
5255
|
}
|
|
5255
5256
|
function v(e, n, r) {
|
|
5256
5257
|
let i = "", a = "";
|
|
5257
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5258
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (I_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), I_("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
5259
|
let o = {
|
|
5259
5260
|
code: i,
|
|
5260
5261
|
language: a
|
|
5261
5262
|
};
|
|
5262
|
-
|
|
5263
|
+
f_("before:highlight", o);
|
|
5263
5264
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5264
|
-
return s.code = o.code,
|
|
5265
|
+
return s.code = o.code, f_("after:highlight", s), s;
|
|
5265
5266
|
}
|
|
5266
5267
|
function j(e, r, a, o) {
|
|
5267
5268
|
let u = Object.create(null);
|
|
@@ -5281,7 +5282,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5281
5282
|
let i = q.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5282
5283
|
if (a) {
|
|
5283
5284
|
let [e, o] = a;
|
|
5284
|
-
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <=
|
|
5285
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= Z_ && (c_ += o), e.startsWith("_")) r += n[0];
|
|
5285
5286
|
else {
|
|
5286
5287
|
let r = q.classNameAliases[e] || e;
|
|
5287
5288
|
T(n[0], r);
|
|
@@ -5299,9 +5300,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5299
5300
|
Q.addText($);
|
|
5300
5301
|
return;
|
|
5301
5302
|
}
|
|
5302
|
-
e = j(Z.subLanguage, $, !0,
|
|
5303
|
+
e = j(Z.subLanguage, $, !0, o_[Z.subLanguage]), o_[Z.subLanguage] = e._top;
|
|
5303
5304
|
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5304
|
-
Z.relevance > 0 && (
|
|
5305
|
+
Z.relevance > 0 && (c_ += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5305
5306
|
}
|
|
5306
5307
|
function v() {
|
|
5307
5308
|
Z.subLanguage == null ? g() : _(), $ = "";
|
|
@@ -5338,7 +5339,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5338
5339
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5339
5340
|
}
|
|
5340
5341
|
function I(e) {
|
|
5341
|
-
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5342
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (d_ = !0, 0);
|
|
5342
5343
|
}
|
|
5343
5344
|
function L(e) {
|
|
5344
5345
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5347,15 +5348,15 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5347
5348
|
}
|
|
5348
5349
|
function H(e) {
|
|
5349
5350
|
let n = e[0], i = r.substring(e.index), a = k(Z, e, i);
|
|
5350
|
-
if (!a) return
|
|
5351
|
+
if (!a) return X_;
|
|
5351
5352
|
let o = Z;
|
|
5352
5353
|
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
5354
|
do
|
|
5354
|
-
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (
|
|
5355
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (c_ += Z.relevance), Z = Z.parent;
|
|
5355
5356
|
while (Z !== a.parent);
|
|
5356
5357
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5357
5358
|
}
|
|
5358
|
-
function
|
|
5359
|
+
function i_() {
|
|
5359
5360
|
let e = [];
|
|
5360
5361
|
for (let n = Z; n !== q; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5361
5362
|
e.forEach((e) => Q.openNode(e));
|
|
@@ -5377,33 +5378,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5377
5378
|
throw e.mode = Z, e;
|
|
5378
5379
|
} else if (i.type === "end") {
|
|
5379
5380
|
let e = H(i);
|
|
5380
|
-
if (e !==
|
|
5381
|
+
if (e !== X_) return e;
|
|
5381
5382
|
}
|
|
5382
5383
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5383
|
-
if (
|
|
5384
|
+
if (u_ > 1e5 && u_ > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5384
5385
|
return $ += o, o.length;
|
|
5385
5386
|
}
|
|
5386
|
-
let q =
|
|
5387
|
-
if (!q) throw
|
|
5388
|
-
let J =
|
|
5389
|
-
|
|
5390
|
-
let $ = "",
|
|
5387
|
+
let q = s_(e);
|
|
5388
|
+
if (!q) throw P_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5389
|
+
let J = U_(q), a_ = "", Z = o || J, o_ = {}, Q = new d.__emitter(d);
|
|
5390
|
+
i_();
|
|
5391
|
+
let $ = "", c_ = 0, l_ = 0, u_ = 0, d_ = !1;
|
|
5391
5392
|
try {
|
|
5392
5393
|
if (q.__emitTokens) q.__emitTokens(r, Q);
|
|
5393
5394
|
else {
|
|
5394
5395
|
for (Z.matcher.considerAll();;) {
|
|
5395
|
-
|
|
5396
|
+
u_++, d_ ? d_ = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = l_;
|
|
5396
5397
|
let e = Z.matcher.exec(r);
|
|
5397
5398
|
if (!e) break;
|
|
5398
|
-
let n = K(r.substring(
|
|
5399
|
-
|
|
5399
|
+
let n = K(r.substring(l_, e.index), e);
|
|
5400
|
+
l_ = e.index + n;
|
|
5400
5401
|
}
|
|
5401
|
-
K(r.substring(
|
|
5402
|
+
K(r.substring(l_));
|
|
5402
5403
|
}
|
|
5403
|
-
return Q.finalize(),
|
|
5404
|
+
return Q.finalize(), a_ = Q.toHTML(), {
|
|
5404
5405
|
language: e,
|
|
5405
|
-
value:
|
|
5406
|
-
relevance:
|
|
5406
|
+
value: a_,
|
|
5407
|
+
relevance: c_,
|
|
5407
5408
|
illegal: !1,
|
|
5408
5409
|
_emitter: Q,
|
|
5409
5410
|
_top: Z
|
|
@@ -5411,21 +5412,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5411
5412
|
} catch (n) {
|
|
5412
5413
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5413
5414
|
language: e,
|
|
5414
|
-
value:
|
|
5415
|
+
value: J_(r),
|
|
5415
5416
|
illegal: !0,
|
|
5416
5417
|
relevance: 0,
|
|
5417
5418
|
_illegalBy: {
|
|
5418
5419
|
message: n.message,
|
|
5419
|
-
index:
|
|
5420
|
-
context: r.slice(
|
|
5420
|
+
index: l_,
|
|
5421
|
+
context: r.slice(l_ - 100, l_ + 100),
|
|
5421
5422
|
mode: n.mode,
|
|
5422
|
-
resultSoFar:
|
|
5423
|
+
resultSoFar: a_
|
|
5423
5424
|
},
|
|
5424
5425
|
_emitter: Q
|
|
5425
5426
|
};
|
|
5426
5427
|
if (s) return {
|
|
5427
5428
|
language: e,
|
|
5428
|
-
value:
|
|
5429
|
+
value: J_(r),
|
|
5429
5430
|
illegal: !1,
|
|
5430
5431
|
relevance: 0,
|
|
5431
5432
|
errorRaised: n,
|
|
@@ -5437,7 +5438,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5437
5438
|
}
|
|
5438
5439
|
function L(e) {
|
|
5439
5440
|
let n = {
|
|
5440
|
-
value:
|
|
5441
|
+
value: J_(e),
|
|
5441
5442
|
illegal: !1,
|
|
5442
5443
|
relevance: 0,
|
|
5443
5444
|
_top: u,
|
|
@@ -5447,13 +5448,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5447
5448
|
}
|
|
5448
5449
|
function B(e, r) {
|
|
5449
5450
|
r = r || d.languages || Object.keys(n);
|
|
5450
|
-
let i = L(e), a = r.filter(
|
|
5451
|
+
let i = L(e), a = r.filter(s_).filter(c_).map((n) => j(n, e, !1));
|
|
5451
5452
|
a.unshift(i);
|
|
5452
5453
|
let [o, s] = a.sort((e, n) => {
|
|
5453
5454
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5454
5455
|
if (e.language && n.language) {
|
|
5455
|
-
if (
|
|
5456
|
-
if (
|
|
5456
|
+
if (s_(e.language).supersetOf === n.language) return 1;
|
|
5457
|
+
if (s_(n.language).supersetOf === e.language) return -1;
|
|
5457
5458
|
}
|
|
5458
5459
|
return 0;
|
|
5459
5460
|
}), l = o;
|
|
@@ -5463,17 +5464,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5463
5464
|
let i = n && a[n] || r;
|
|
5464
5465
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5465
5466
|
}
|
|
5466
|
-
function
|
|
5467
|
+
function i_(e) {
|
|
5467
5468
|
let n = null, r = g(e);
|
|
5468
5469
|
if (m(r)) return;
|
|
5469
|
-
if (
|
|
5470
|
+
if (f_("before:highlightElement", {
|
|
5470
5471
|
el: e,
|
|
5471
5472
|
language: r
|
|
5472
5473
|
}), e.dataset.highlighted) {
|
|
5473
5474
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5474
5475
|
return;
|
|
5475
5476
|
}
|
|
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
|
|
5477
|
+
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 q_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5477
5478
|
n = e;
|
|
5478
5479
|
let i = n.textContent, a = r ? v(i, {
|
|
5479
5480
|
language: r,
|
|
@@ -5486,51 +5487,51 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5486
5487
|
}, a.secondBest && (e.secondBest = {
|
|
5487
5488
|
language: a.secondBest.language,
|
|
5488
5489
|
relevance: a.secondBest.relevance
|
|
5489
|
-
}),
|
|
5490
|
+
}), f_("after:highlightElement", {
|
|
5490
5491
|
el: e,
|
|
5491
5492
|
result: a,
|
|
5492
5493
|
text: i
|
|
5493
5494
|
});
|
|
5494
5495
|
}
|
|
5495
5496
|
function G(e) {
|
|
5496
|
-
d =
|
|
5497
|
+
d = Y_(d, e);
|
|
5497
5498
|
}
|
|
5498
5499
|
let K = () => {
|
|
5499
|
-
|
|
5500
|
+
a_(), I_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5500
5501
|
};
|
|
5501
5502
|
function q() {
|
|
5502
|
-
|
|
5503
|
+
a_(), I_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5503
5504
|
}
|
|
5504
5505
|
let J = !1;
|
|
5505
|
-
function
|
|
5506
|
+
function a_() {
|
|
5506
5507
|
function e() {
|
|
5507
|
-
|
|
5508
|
+
a_();
|
|
5508
5509
|
}
|
|
5509
5510
|
if (document.readyState === "loading") {
|
|
5510
5511
|
J || window.addEventListener("DOMContentLoaded", e, !1), J = !0;
|
|
5511
5512
|
return;
|
|
5512
5513
|
}
|
|
5513
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5514
|
+
document.querySelectorAll(d.cssSelector).forEach(i_);
|
|
5514
5515
|
}
|
|
5515
5516
|
function Z(r, i) {
|
|
5516
5517
|
let a = null;
|
|
5517
5518
|
try {
|
|
5518
5519
|
a = i(e);
|
|
5519
5520
|
} catch (e) {
|
|
5520
|
-
if (
|
|
5521
|
+
if (P_("Language definition for '{}' could not be registered.".replace("{}", r)), s) P_(e);
|
|
5521
5522
|
else throw e;
|
|
5522
5523
|
a = u;
|
|
5523
5524
|
}
|
|
5524
5525
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5525
5526
|
}
|
|
5526
|
-
function
|
|
5527
|
+
function o_(e) {
|
|
5527
5528
|
delete n[e];
|
|
5528
5529
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5529
5530
|
}
|
|
5530
5531
|
function Q() {
|
|
5531
5532
|
return Object.keys(n);
|
|
5532
5533
|
}
|
|
5533
|
-
function
|
|
5534
|
+
function s_(e) {
|
|
5534
5535
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5535
5536
|
}
|
|
5536
5537
|
function $(e, { languageName: n }) {
|
|
@@ -5538,65 +5539,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5538
5539
|
a[e.toLowerCase()] = n;
|
|
5539
5540
|
});
|
|
5540
5541
|
}
|
|
5541
|
-
function
|
|
5542
|
-
let n =
|
|
5542
|
+
function c_(e) {
|
|
5543
|
+
let n = s_(e);
|
|
5543
5544
|
return n && !n.disableAutodetect;
|
|
5544
5545
|
}
|
|
5545
|
-
function
|
|
5546
|
+
function l_(e) {
|
|
5546
5547
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5547
5548
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5548
5549
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5549
5550
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5550
5551
|
});
|
|
5551
5552
|
}
|
|
5552
|
-
function
|
|
5553
|
-
|
|
5553
|
+
function u_(e) {
|
|
5554
|
+
l_(e), o.push(e);
|
|
5554
5555
|
}
|
|
5555
|
-
function
|
|
5556
|
+
function d_(e) {
|
|
5556
5557
|
let n = o.indexOf(e);
|
|
5557
5558
|
n !== -1 && o.splice(n, 1);
|
|
5558
5559
|
}
|
|
5559
|
-
function
|
|
5560
|
+
function f_(e, n) {
|
|
5560
5561
|
let r = e;
|
|
5561
5562
|
o.forEach(function(e) {
|
|
5562
5563
|
e[r] && e[r](n);
|
|
5563
5564
|
});
|
|
5564
5565
|
}
|
|
5565
|
-
function
|
|
5566
|
-
return
|
|
5566
|
+
function p_(e) {
|
|
5567
|
+
return I_("10.7.0", "highlightBlock will be removed entirely in v12.0"), I_("10.7.0", "Please use highlightElement now."), i_(e);
|
|
5567
5568
|
}
|
|
5568
5569
|
for (let n in Object.assign(e, {
|
|
5569
5570
|
highlight: v,
|
|
5570
5571
|
highlightAuto: B,
|
|
5571
|
-
highlightAll:
|
|
5572
|
-
highlightElement:
|
|
5573
|
-
highlightBlock:
|
|
5572
|
+
highlightAll: a_,
|
|
5573
|
+
highlightElement: i_,
|
|
5574
|
+
highlightBlock: p_,
|
|
5574
5575
|
configure: G,
|
|
5575
5576
|
initHighlighting: K,
|
|
5576
5577
|
initHighlightingOnLoad: q,
|
|
5577
5578
|
registerLanguage: Z,
|
|
5578
|
-
unregisterLanguage:
|
|
5579
|
+
unregisterLanguage: o_,
|
|
5579
5580
|
listLanguages: Q,
|
|
5580
|
-
getLanguage:
|
|
5581
|
+
getLanguage: s_,
|
|
5581
5582
|
registerAliases: $,
|
|
5582
|
-
autoDetection:
|
|
5583
|
-
inherit:
|
|
5584
|
-
addPlugin:
|
|
5585
|
-
removePlugin:
|
|
5583
|
+
autoDetection: c_,
|
|
5584
|
+
inherit: Y_,
|
|
5585
|
+
addPlugin: u_,
|
|
5586
|
+
removePlugin: d_
|
|
5586
5587
|
}), e.debugMode = function() {
|
|
5587
5588
|
s = !1;
|
|
5588
5589
|
}, e.safeMode = function() {
|
|
5589
5590
|
s = !0;
|
|
5590
|
-
}, e.versionString =
|
|
5591
|
+
}, e.versionString = K_, e.regex = {
|
|
5591
5592
|
concat: k,
|
|
5592
5593
|
lookahead: T,
|
|
5593
5594
|
either: I,
|
|
5594
5595
|
optional: O,
|
|
5595
5596
|
anyNumberOfTimes: E
|
|
5596
|
-
},
|
|
5597
|
-
return Object.assign(e,
|
|
5598
|
-
},
|
|
5599
|
-
|
|
5597
|
+
}, b_) typeof b_[n] == "object" && r(b_[n]);
|
|
5598
|
+
return Object.assign(e, b_), e;
|
|
5599
|
+
}, $_ = Q_({});
|
|
5600
|
+
$_.newInstance = () => Q_({}), n.exports = $_, $_.HighlightJS = $_, $_.default = $_;
|
|
5600
5601
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5601
5602
|
function r(e) {
|
|
5602
5603
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11702,7 +11703,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11702
11703
|
},
|
|
11703
11704
|
z
|
|
11704
11705
|
]
|
|
11705
|
-
},
|
|
11706
|
+
}, i_ = {
|
|
11706
11707
|
scope: "computation-expression",
|
|
11707
11708
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11708
11709
|
}, G = {
|
|
@@ -11723,7 +11724,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11723
11724
|
begin: /@"/,
|
|
11724
11725
|
end: /"/,
|
|
11725
11726
|
contains: [{ match: /""/ }, e.BACKSLASH_ESCAPE]
|
|
11726
|
-
},
|
|
11727
|
+
}, a_ = {
|
|
11727
11728
|
scope: "string",
|
|
11728
11729
|
begin: /"""/,
|
|
11729
11730
|
end: /"""/,
|
|
@@ -11733,7 +11734,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11733
11734
|
begin: /\{/,
|
|
11734
11735
|
end: /\}/,
|
|
11735
11736
|
keywords: g
|
|
11736
|
-
},
|
|
11737
|
+
}, o_ = {
|
|
11737
11738
|
scope: "string",
|
|
11738
11739
|
begin: /\$"/,
|
|
11739
11740
|
end: /"/,
|
|
@@ -11754,7 +11755,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11754
11755
|
e.BACKSLASH_ESCAPE,
|
|
11755
11756
|
Z
|
|
11756
11757
|
]
|
|
11757
|
-
},
|
|
11758
|
+
}, s_ = {
|
|
11758
11759
|
scope: "string",
|
|
11759
11760
|
begin: /\$"""/,
|
|
11760
11761
|
end: /"""/,
|
|
@@ -11770,7 +11771,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11770
11771
|
};
|
|
11771
11772
|
Z.contains = [
|
|
11772
11773
|
Q,
|
|
11773
|
-
|
|
11774
|
+
o_,
|
|
11774
11775
|
J,
|
|
11775
11776
|
q,
|
|
11776
11777
|
$,
|
|
@@ -11778,17 +11779,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11778
11779
|
_,
|
|
11779
11780
|
T,
|
|
11780
11781
|
z,
|
|
11781
|
-
|
|
11782
|
+
i_,
|
|
11782
11783
|
G,
|
|
11783
11784
|
K,
|
|
11784
11785
|
O,
|
|
11785
11786
|
j
|
|
11786
11787
|
];
|
|
11787
|
-
let
|
|
11788
|
-
c_,
|
|
11789
|
-
Q,
|
|
11788
|
+
let c_ = { variants: [
|
|
11790
11789
|
s_,
|
|
11790
|
+
Q,
|
|
11791
11791
|
o_,
|
|
11792
|
+
a_,
|
|
11792
11793
|
J,
|
|
11793
11794
|
q,
|
|
11794
11795
|
$
|
|
@@ -11801,7 +11802,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11801
11802
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11802
11803
|
contains: [
|
|
11803
11804
|
i,
|
|
11804
|
-
|
|
11805
|
+
c_,
|
|
11805
11806
|
_,
|
|
11806
11807
|
T,
|
|
11807
11808
|
H,
|
|
@@ -11812,7 +11813,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11812
11813
|
relevance: 2,
|
|
11813
11814
|
contains: [
|
|
11814
11815
|
T,
|
|
11815
|
-
|
|
11816
|
+
a_,
|
|
11816
11817
|
J,
|
|
11817
11818
|
q,
|
|
11818
11819
|
$,
|
|
@@ -11821,7 +11822,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11821
11822
|
},
|
|
11822
11823
|
B,
|
|
11823
11824
|
z,
|
|
11824
|
-
|
|
11825
|
+
i_,
|
|
11825
11826
|
G,
|
|
11826
11827
|
K,
|
|
11827
11828
|
O,
|
|
@@ -13937,7 +13938,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13937
13938
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13938
13939
|
subLanguage: "graphql"
|
|
13939
13940
|
}
|
|
13940
|
-
},
|
|
13941
|
+
}, i_ = {
|
|
13941
13942
|
className: "string",
|
|
13942
13943
|
begin: "`",
|
|
13943
13944
|
end: "`",
|
|
@@ -13985,7 +13986,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13985
13986
|
z,
|
|
13986
13987
|
B,
|
|
13987
13988
|
H,
|
|
13988
|
-
|
|
13989
|
+
i_,
|
|
13989
13990
|
{ match: /\$\d+/ },
|
|
13990
13991
|
I
|
|
13991
13992
|
];
|
|
@@ -14000,7 +14001,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14000
14001
|
end: /\)/,
|
|
14001
14002
|
keywords: E,
|
|
14002
14003
|
contains: ["self"].concat(q)
|
|
14003
|
-
}]),
|
|
14004
|
+
}]), a_ = {
|
|
14004
14005
|
className: "params",
|
|
14005
14006
|
begin: /(\s*)\(/,
|
|
14006
14007
|
end: /\)/,
|
|
@@ -14034,7 +14035,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14034
14035
|
1: "keyword",
|
|
14035
14036
|
3: "title.class"
|
|
14036
14037
|
}
|
|
14037
|
-
}] },
|
|
14038
|
+
}] }, o_ = {
|
|
14038
14039
|
relevance: 0,
|
|
14039
14040
|
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
14041
|
className: "title.class",
|
|
@@ -14044,7 +14045,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14044
14045
|
className: "meta",
|
|
14045
14046
|
relevance: 10,
|
|
14046
14047
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
14047
|
-
},
|
|
14048
|
+
}, s_ = {
|
|
14048
14049
|
variants: [{ match: [
|
|
14049
14050
|
/function/,
|
|
14050
14051
|
/\s+/,
|
|
@@ -14056,32 +14057,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14056
14057
|
3: "title.function"
|
|
14057
14058
|
},
|
|
14058
14059
|
label: "func.def",
|
|
14059
|
-
contains: [
|
|
14060
|
+
contains: [a_],
|
|
14060
14061
|
illegal: /%/
|
|
14061
14062
|
}, $ = {
|
|
14062
14063
|
relevance: 0,
|
|
14063
14064
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
14064
14065
|
className: "variable.constant"
|
|
14065
14066
|
};
|
|
14066
|
-
function
|
|
14067
|
+
function c_(e) {
|
|
14067
14068
|
return n.concat("(?!", e.join("|"), ")");
|
|
14068
14069
|
}
|
|
14069
|
-
let
|
|
14070
|
-
match: n.concat(/\b/,
|
|
14070
|
+
let l_ = {
|
|
14071
|
+
match: n.concat(/\b/, c_([
|
|
14071
14072
|
...l,
|
|
14072
14073
|
"super",
|
|
14073
14074
|
"import"
|
|
14074
14075
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
14075
14076
|
className: "title.function",
|
|
14076
14077
|
relevance: 0
|
|
14077
|
-
},
|
|
14078
|
+
}, u_ = {
|
|
14078
14079
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
14079
14080
|
end: g,
|
|
14080
14081
|
excludeBegin: !0,
|
|
14081
14082
|
keywords: "prototype",
|
|
14082
14083
|
className: "property",
|
|
14083
14084
|
relevance: 0
|
|
14084
|
-
},
|
|
14085
|
+
}, d_ = {
|
|
14085
14086
|
match: [
|
|
14086
14087
|
/get|set/,
|
|
14087
14088
|
/\s+/,
|
|
@@ -14092,8 +14093,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14092
14093
|
1: "keyword",
|
|
14093
14094
|
3: "title.function"
|
|
14094
14095
|
},
|
|
14095
|
-
contains: [{ begin: /\(\)/ },
|
|
14096
|
-
},
|
|
14096
|
+
contains: [{ begin: /\(\)/ }, a_]
|
|
14097
|
+
}, f_ = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", p_ = {
|
|
14097
14098
|
match: [
|
|
14098
14099
|
/const|var|let/,
|
|
14099
14100
|
/\s+/,
|
|
@@ -14101,14 +14102,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14101
14102
|
/\s*/,
|
|
14102
14103
|
/=\s*/,
|
|
14103
14104
|
/(async\s*)?/,
|
|
14104
|
-
n.lookahead(
|
|
14105
|
+
n.lookahead(f_)
|
|
14105
14106
|
],
|
|
14106
14107
|
keywords: "async",
|
|
14107
14108
|
className: {
|
|
14108
14109
|
1: "keyword",
|
|
14109
14110
|
3: "title.function"
|
|
14110
14111
|
},
|
|
14111
|
-
contains: [
|
|
14112
|
+
contains: [a_]
|
|
14112
14113
|
};
|
|
14113
14114
|
return {
|
|
14114
14115
|
name: "JavaScript",
|
|
@@ -14121,7 +14122,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14121
14122
|
keywords: E,
|
|
14122
14123
|
exports: {
|
|
14123
14124
|
PARAMS_CONTAINS: J,
|
|
14124
|
-
CLASS_REFERENCE:
|
|
14125
|
+
CLASS_REFERENCE: o_
|
|
14125
14126
|
},
|
|
14126
14127
|
illegal: /#(?![$_A-z])/,
|
|
14127
14128
|
contains: [
|
|
@@ -14136,17 +14137,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14136
14137
|
z,
|
|
14137
14138
|
B,
|
|
14138
14139
|
H,
|
|
14139
|
-
|
|
14140
|
+
i_,
|
|
14140
14141
|
G,
|
|
14141
14142
|
{ match: /\$\d+/ },
|
|
14142
14143
|
I,
|
|
14143
|
-
|
|
14144
|
+
o_,
|
|
14144
14145
|
{
|
|
14145
14146
|
scope: "attr",
|
|
14146
14147
|
match: g + n.lookahead(":"),
|
|
14147
14148
|
relevance: 0
|
|
14148
14149
|
},
|
|
14149
|
-
|
|
14150
|
+
p_,
|
|
14150
14151
|
{
|
|
14151
14152
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14152
14153
|
keywords: "return throw case",
|
|
@@ -14156,7 +14157,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14156
14157
|
e.REGEXP_MODE,
|
|
14157
14158
|
{
|
|
14158
14159
|
className: "function",
|
|
14159
|
-
begin:
|
|
14160
|
+
begin: f_,
|
|
14160
14161
|
returnBegin: !0,
|
|
14161
14162
|
end: "\\s*=>",
|
|
14162
14163
|
contains: [{
|
|
@@ -14213,13 +14214,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14213
14214
|
}
|
|
14214
14215
|
]
|
|
14215
14216
|
},
|
|
14216
|
-
|
|
14217
|
+
s_,
|
|
14217
14218
|
{ beginKeywords: "while if switch catch for" },
|
|
14218
14219
|
{
|
|
14219
14220
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
14220
14221
|
returnBegin: !0,
|
|
14221
14222
|
label: "func.def",
|
|
14222
|
-
contains: [
|
|
14223
|
+
contains: [a_, e.inherit(e.TITLE_MODE, {
|
|
14223
14224
|
begin: g,
|
|
14224
14225
|
className: "title.function"
|
|
14225
14226
|
})]
|
|
@@ -14228,7 +14229,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14228
14229
|
match: /\.\.\./,
|
|
14229
14230
|
relevance: 0
|
|
14230
14231
|
},
|
|
14231
|
-
|
|
14232
|
+
u_,
|
|
14232
14233
|
{
|
|
14233
14234
|
match: "\\$" + g,
|
|
14234
14235
|
relevance: 0
|
|
@@ -14236,12 +14237,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14236
14237
|
{
|
|
14237
14238
|
match: [/\bconstructor(?=\s*\()/],
|
|
14238
14239
|
className: { 1: "title.function" },
|
|
14239
|
-
contains: [
|
|
14240
|
+
contains: [a_]
|
|
14240
14241
|
},
|
|
14241
|
-
|
|
14242
|
+
l_,
|
|
14242
14243
|
$,
|
|
14243
14244
|
Z,
|
|
14244
|
-
|
|
14245
|
+
d_,
|
|
14245
14246
|
{ match: /\$[(.]/ }
|
|
14246
14247
|
]
|
|
14247
14248
|
};
|
|
@@ -15195,12 +15196,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15195
15196
|
{ begin: "!important" },
|
|
15196
15197
|
n.FUNCTION_DISPATCH
|
|
15197
15198
|
]
|
|
15198
|
-
},
|
|
15199
|
+
}, i_ = {
|
|
15199
15200
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15200
15201
|
returnBegin: !0,
|
|
15201
15202
|
contains: [H]
|
|
15202
15203
|
};
|
|
15203
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15204
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, i_, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15204
15205
|
name: "Less",
|
|
15205
15206
|
case_insensitive: !0,
|
|
15206
15207
|
illegal: "[=>'/<($\"]",
|
|
@@ -17726,7 +17727,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17726
17727
|
3: "variable.language"
|
|
17727
17728
|
}
|
|
17728
17729
|
}
|
|
17729
|
-
] },
|
|
17730
|
+
] }, i_ = {
|
|
17730
17731
|
scope: "attr",
|
|
17731
17732
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17732
17733
|
}, G = {
|
|
@@ -17735,7 +17736,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17735
17736
|
end: /\)/,
|
|
17736
17737
|
keywords: I,
|
|
17737
17738
|
contains: [
|
|
17738
|
-
|
|
17739
|
+
i_,
|
|
17739
17740
|
s,
|
|
17740
17741
|
H,
|
|
17741
17742
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17757,7 +17758,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17757
17758
|
};
|
|
17758
17759
|
G.contains.push(K);
|
|
17759
17760
|
let q = [
|
|
17760
|
-
|
|
17761
|
+
i_,
|
|
17761
17762
|
H,
|
|
17762
17763
|
e.C_BLOCK_COMMENT_MODE,
|
|
17763
17764
|
T,
|
|
@@ -21175,7 +21176,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21176
|
"unknown",
|
|
21176
21177
|
"usableFromInline",
|
|
21177
21178
|
"warn_unqualified_access"
|
|
21178
|
-
],
|
|
21179
|
+
], i_ = [
|
|
21179
21180
|
"iOS",
|
|
21180
21181
|
"iOSApplicationExtension",
|
|
21181
21182
|
"macOS",
|
|
@@ -21209,7 +21210,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21209
21210
|
O,
|
|
21210
21211
|
I,
|
|
21211
21212
|
K
|
|
21212
|
-
],
|
|
21213
|
+
], a_ = [{
|
|
21213
21214
|
match: a(/\./, s(...E)),
|
|
21214
21215
|
relevance: 0
|
|
21215
21216
|
}, {
|
|
@@ -21218,84 +21219,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21218
21219
|
}], Z = {
|
|
21219
21220
|
match: /->/,
|
|
21220
21221
|
relevance: 0
|
|
21221
|
-
},
|
|
21222
|
+
}, o_ = [Z, {
|
|
21222
21223
|
className: "operator",
|
|
21223
21224
|
relevance: 0,
|
|
21224
21225
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21225
|
-
}], Q = "([0-9]_*)+",
|
|
21226
|
+
}], Q = "([0-9]_*)+", s_ = "([0-9a-fA-F]_*)+", $ = {
|
|
21226
21227
|
className: "number",
|
|
21227
21228
|
relevance: 0,
|
|
21228
21229
|
variants: [
|
|
21229
21230
|
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21230
|
-
{ match: `\\b0x(${
|
|
21231
|
+
{ match: `\\b0x(${s_})(\\.(${s_}))?([pP][+-]?(${Q}))?\\b` },
|
|
21231
21232
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21232
21233
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21233
21234
|
]
|
|
21234
|
-
},
|
|
21235
|
+
}, c_ = (e = "") => ({
|
|
21235
21236
|
className: "subst",
|
|
21236
21237
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21237
|
-
}),
|
|
21238
|
+
}), l_ = (e = "") => ({
|
|
21238
21239
|
className: "subst",
|
|
21239
21240
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21240
|
-
}),
|
|
21241
|
+
}), u_ = (e = "") => ({
|
|
21241
21242
|
className: "subst",
|
|
21242
21243
|
label: "interpol",
|
|
21243
21244
|
begin: a(/\\/, e, /\(/),
|
|
21244
21245
|
end: /\)/
|
|
21245
|
-
}),
|
|
21246
|
+
}), d_ = (e = "") => ({
|
|
21246
21247
|
begin: a(e, /"""/),
|
|
21247
21248
|
end: a(/"""/, e),
|
|
21248
21249
|
contains: [
|
|
21250
|
+
c_(e),
|
|
21249
21251
|
l_(e),
|
|
21250
|
-
u_(e)
|
|
21251
|
-
d_(e)
|
|
21252
|
+
u_(e)
|
|
21252
21253
|
]
|
|
21253
|
-
}),
|
|
21254
|
+
}), f_ = (e = "") => ({
|
|
21254
21255
|
begin: a(e, /"/),
|
|
21255
21256
|
end: a(/"/, e),
|
|
21256
|
-
contains: [
|
|
21257
|
-
}),
|
|
21257
|
+
contains: [c_(e), u_(e)]
|
|
21258
|
+
}), p_ = {
|
|
21258
21259
|
className: "string",
|
|
21259
21260
|
variants: [
|
|
21261
|
+
d_(),
|
|
21262
|
+
d_("#"),
|
|
21263
|
+
d_("##"),
|
|
21264
|
+
d_("###"),
|
|
21260
21265
|
f_(),
|
|
21261
21266
|
f_("#"),
|
|
21262
21267
|
f_("##"),
|
|
21263
|
-
f_("###")
|
|
21264
|
-
p_(),
|
|
21265
|
-
p_("#"),
|
|
21266
|
-
p_("##"),
|
|
21267
|
-
p_("###")
|
|
21268
|
+
f_("###")
|
|
21268
21269
|
]
|
|
21269
|
-
},
|
|
21270
|
+
}, m_ = [e.BACKSLASH_ESCAPE, {
|
|
21270
21271
|
begin: /\[/,
|
|
21271
21272
|
end: /\]/,
|
|
21272
21273
|
relevance: 0,
|
|
21273
21274
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21274
|
-
}],
|
|
21275
|
+
}], h_ = {
|
|
21275
21276
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21276
21277
|
end: /\//,
|
|
21277
|
-
contains:
|
|
21278
|
-
},
|
|
21278
|
+
contains: m_
|
|
21279
|
+
}, g_ = (e) => {
|
|
21279
21280
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21280
21281
|
return {
|
|
21281
21282
|
begin: n,
|
|
21282
21283
|
end: r,
|
|
21283
|
-
contains: [...
|
|
21284
|
+
contains: [...m_, {
|
|
21284
21285
|
scope: "comment",
|
|
21285
21286
|
begin: `#(?!.*${r})`,
|
|
21286
21287
|
end: /$/
|
|
21287
21288
|
}]
|
|
21288
21289
|
};
|
|
21289
|
-
},
|
|
21290
|
+
}, __ = {
|
|
21290
21291
|
scope: "regexp",
|
|
21291
21292
|
variants: [
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21293
|
+
g_("###"),
|
|
21294
|
+
g_("##"),
|
|
21295
|
+
g_("#"),
|
|
21296
|
+
h_
|
|
21296
21297
|
]
|
|
21297
|
-
},
|
|
21298
|
-
|
|
21298
|
+
}, v_ = { match: a(/`/, z, /`/) }, y_ = [
|
|
21299
|
+
v_,
|
|
21299
21300
|
{
|
|
21300
21301
|
className: "variable",
|
|
21301
21302
|
match: /\$\d+/
|
|
@@ -21304,18 +21305,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21304
21305
|
className: "variable",
|
|
21305
21306
|
match: `\\$${L}+`
|
|
21306
21307
|
}
|
|
21307
|
-
],
|
|
21308
|
+
], b_ = [
|
|
21308
21309
|
{
|
|
21309
21310
|
match: /(@|#(un)?)available/,
|
|
21310
21311
|
scope: "keyword",
|
|
21311
21312
|
starts: { contains: [{
|
|
21312
21313
|
begin: /\(/,
|
|
21313
21314
|
end: /\)/,
|
|
21314
|
-
keywords:
|
|
21315
|
+
keywords: i_,
|
|
21315
21316
|
contains: [
|
|
21316
|
-
...
|
|
21317
|
+
...o_,
|
|
21317
21318
|
$,
|
|
21318
|
-
|
|
21319
|
+
p_
|
|
21319
21320
|
]
|
|
21320
21321
|
}] }
|
|
21321
21322
|
},
|
|
@@ -21327,7 +21328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21327
21328
|
scope: "meta",
|
|
21328
21329
|
match: a(/@/, z)
|
|
21329
21330
|
}
|
|
21330
|
-
],
|
|
21331
|
+
], x_ = {
|
|
21331
21332
|
match: i(/\b[A-Z]/),
|
|
21332
21333
|
relevance: 0,
|
|
21333
21334
|
contains: [
|
|
@@ -21353,20 +21354,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21353
21354
|
relevance: 0
|
|
21354
21355
|
}
|
|
21355
21356
|
]
|
|
21356
|
-
},
|
|
21357
|
+
}, S_ = {
|
|
21357
21358
|
begin: /</,
|
|
21358
21359
|
end: />/,
|
|
21359
21360
|
keywords: q,
|
|
21360
21361
|
contains: [
|
|
21361
21362
|
...o,
|
|
21362
21363
|
...J,
|
|
21363
|
-
...
|
|
21364
|
+
...b_,
|
|
21364
21365
|
Z,
|
|
21365
|
-
|
|
21366
|
+
x_
|
|
21366
21367
|
]
|
|
21367
21368
|
};
|
|
21368
|
-
|
|
21369
|
-
let
|
|
21369
|
+
x_.contains.push(S_);
|
|
21370
|
+
let C_ = {
|
|
21370
21371
|
begin: /\(/,
|
|
21371
21372
|
end: /\)/,
|
|
21372
21373
|
relevance: 0,
|
|
@@ -21379,22 +21380,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21379
21380
|
relevance: 0
|
|
21380
21381
|
},
|
|
21381
21382
|
...o,
|
|
21382
|
-
|
|
21383
|
+
__,
|
|
21383
21384
|
...J,
|
|
21385
|
+
...a_,
|
|
21384
21386
|
...o_,
|
|
21385
|
-
...s_,
|
|
21386
21387
|
$,
|
|
21387
|
-
|
|
21388
|
+
p_,
|
|
21389
|
+
...y_,
|
|
21388
21390
|
...b_,
|
|
21389
|
-
|
|
21390
|
-
S_
|
|
21391
|
+
x_
|
|
21391
21392
|
]
|
|
21392
|
-
},
|
|
21393
|
+
}, w_ = {
|
|
21393
21394
|
begin: /</,
|
|
21394
21395
|
end: />/,
|
|
21395
21396
|
keywords: "repeat each",
|
|
21396
|
-
contains: [...o,
|
|
21397
|
-
},
|
|
21397
|
+
contains: [...o, x_]
|
|
21398
|
+
}, T_ = {
|
|
21398
21399
|
begin: /\(/,
|
|
21399
21400
|
end: /\)/,
|
|
21400
21401
|
keywords: q,
|
|
@@ -21413,41 +21414,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21414
|
},
|
|
21414
21415
|
...o,
|
|
21415
21416
|
...J,
|
|
21416
|
-
...
|
|
21417
|
+
...o_,
|
|
21417
21418
|
$,
|
|
21418
|
-
|
|
21419
|
-
...
|
|
21420
|
-
|
|
21421
|
-
|
|
21419
|
+
p_,
|
|
21420
|
+
...b_,
|
|
21421
|
+
x_,
|
|
21422
|
+
C_
|
|
21422
21423
|
],
|
|
21423
21424
|
endsParent: !0,
|
|
21424
21425
|
illegal: /["']/
|
|
21425
|
-
},
|
|
21426
|
+
}, E_ = {
|
|
21426
21427
|
match: [
|
|
21427
21428
|
/(func|macro)/,
|
|
21428
21429
|
/\s+/,
|
|
21429
|
-
s(
|
|
21430
|
+
s(v_.match, z, j)
|
|
21430
21431
|
],
|
|
21431
21432
|
className: {
|
|
21432
21433
|
1: "keyword",
|
|
21433
21434
|
3: "title.function"
|
|
21434
21435
|
},
|
|
21435
21436
|
contains: [
|
|
21437
|
+
w_,
|
|
21436
21438
|
T_,
|
|
21437
|
-
E_,
|
|
21438
21439
|
n
|
|
21439
21440
|
],
|
|
21440
21441
|
illegal: [/\[/, /%/]
|
|
21441
|
-
},
|
|
21442
|
+
}, D_ = {
|
|
21442
21443
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21443
21444
|
className: { 1: "keyword" },
|
|
21444
21445
|
contains: [
|
|
21446
|
+
w_,
|
|
21445
21447
|
T_,
|
|
21446
|
-
E_,
|
|
21447
21448
|
n
|
|
21448
21449
|
],
|
|
21449
21450
|
illegal: /\[|%/
|
|
21450
|
-
},
|
|
21451
|
+
}, O_ = {
|
|
21451
21452
|
match: [
|
|
21452
21453
|
/operator/,
|
|
21453
21454
|
/\s+/,
|
|
@@ -21457,7 +21458,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21457
21458
|
1: "keyword",
|
|
21458
21459
|
3: "title"
|
|
21459
21460
|
}
|
|
21460
|
-
},
|
|
21461
|
+
}, k_ = {
|
|
21461
21462
|
begin: [
|
|
21462
21463
|
/precedencegroup/,
|
|
21463
21464
|
/\s+/,
|
|
@@ -21467,10 +21468,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21467
21468
|
1: "keyword",
|
|
21468
21469
|
3: "title"
|
|
21469
21470
|
},
|
|
21470
|
-
contains: [
|
|
21471
|
+
contains: [x_],
|
|
21471
21472
|
keywords: [...v, ..._],
|
|
21472
21473
|
end: /}/
|
|
21473
|
-
},
|
|
21474
|
+
}, A_ = {
|
|
21474
21475
|
match: [
|
|
21475
21476
|
/class\b/,
|
|
21476
21477
|
/\s+/,
|
|
@@ -21483,7 +21484,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21483
21484
|
3: "keyword",
|
|
21484
21485
|
5: "title.function"
|
|
21485
21486
|
}
|
|
21486
|
-
},
|
|
21487
|
+
}, j_ = {
|
|
21487
21488
|
match: [
|
|
21488
21489
|
/class\b/,
|
|
21489
21490
|
/\s+/,
|
|
@@ -21493,7 +21494,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21493
21494
|
1: "keyword",
|
|
21494
21495
|
3: "keyword"
|
|
21495
21496
|
}
|
|
21496
|
-
},
|
|
21497
|
+
}, M_ = {
|
|
21497
21498
|
begin: [
|
|
21498
21499
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21499
21500
|
/\s+/,
|
|
@@ -21506,7 +21507,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21506
21507
|
},
|
|
21507
21508
|
keywords: q,
|
|
21508
21509
|
contains: [
|
|
21509
|
-
|
|
21510
|
+
w_,
|
|
21510
21511
|
...J,
|
|
21511
21512
|
{
|
|
21512
21513
|
begin: /:/,
|
|
@@ -21520,16 +21521,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21520
21521
|
}
|
|
21521
21522
|
]
|
|
21522
21523
|
};
|
|
21523
|
-
for (let e of
|
|
21524
|
+
for (let e of p_.variants) {
|
|
21524
21525
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21525
21526
|
n.keywords = q;
|
|
21526
21527
|
let r = [
|
|
21527
21528
|
...J,
|
|
21529
|
+
...a_,
|
|
21528
21530
|
...o_,
|
|
21529
|
-
...s_,
|
|
21530
21531
|
$,
|
|
21531
|
-
|
|
21532
|
-
...
|
|
21532
|
+
p_,
|
|
21533
|
+
...y_
|
|
21533
21534
|
];
|
|
21534
21535
|
n.contains = [...r, {
|
|
21535
21536
|
begin: /\(/,
|
|
@@ -21542,29 +21543,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21542
21543
|
keywords: q,
|
|
21543
21544
|
contains: [
|
|
21544
21545
|
...o,
|
|
21546
|
+
E_,
|
|
21545
21547
|
D_,
|
|
21546
|
-
|
|
21548
|
+
A_,
|
|
21547
21549
|
j_,
|
|
21548
21550
|
M_,
|
|
21549
|
-
|
|
21551
|
+
O_,
|
|
21550
21552
|
k_,
|
|
21551
|
-
A_,
|
|
21552
21553
|
{
|
|
21553
21554
|
beginKeywords: "import",
|
|
21554
21555
|
end: /$/,
|
|
21555
21556
|
contains: [...o],
|
|
21556
21557
|
relevance: 0
|
|
21557
21558
|
},
|
|
21558
|
-
|
|
21559
|
+
__,
|
|
21559
21560
|
...J,
|
|
21561
|
+
...a_,
|
|
21560
21562
|
...o_,
|
|
21561
|
-
...s_,
|
|
21562
21563
|
$,
|
|
21563
|
-
|
|
21564
|
+
p_,
|
|
21565
|
+
...y_,
|
|
21564
21566
|
...b_,
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
w_
|
|
21567
|
+
x_,
|
|
21568
|
+
C_
|
|
21568
21569
|
]
|
|
21569
21570
|
};
|
|
21570
21571
|
}
|
|
@@ -22174,7 +22175,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22174
22175
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22175
22176
|
subLanguage: "graphql"
|
|
22176
22177
|
}
|
|
22177
|
-
},
|
|
22178
|
+
}, i_ = {
|
|
22178
22179
|
className: "string",
|
|
22179
22180
|
begin: "`",
|
|
22180
22181
|
end: "`",
|
|
@@ -22222,7 +22223,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22222
22223
|
z,
|
|
22223
22224
|
B,
|
|
22224
22225
|
H,
|
|
22225
|
-
|
|
22226
|
+
i_,
|
|
22226
22227
|
{ match: /\$\d+/ },
|
|
22227
22228
|
I
|
|
22228
22229
|
];
|
|
@@ -22237,7 +22238,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22237
22238
|
end: /\)/,
|
|
22238
22239
|
keywords: E,
|
|
22239
22240
|
contains: ["self"].concat(q)
|
|
22240
|
-
}]),
|
|
22241
|
+
}]), a_ = {
|
|
22241
22242
|
className: "params",
|
|
22242
22243
|
begin: /(\s*)\(/,
|
|
22243
22244
|
end: /\)/,
|
|
@@ -22271,7 +22272,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22271
22272
|
1: "keyword",
|
|
22272
22273
|
3: "title.class"
|
|
22273
22274
|
}
|
|
22274
|
-
}] },
|
|
22275
|
+
}] }, o_ = {
|
|
22275
22276
|
relevance: 0,
|
|
22276
22277
|
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
22278
|
className: "title.class",
|
|
@@ -22281,7 +22282,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22281
22282
|
className: "meta",
|
|
22282
22283
|
relevance: 10,
|
|
22283
22284
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22284
|
-
},
|
|
22285
|
+
}, s_ = {
|
|
22285
22286
|
variants: [{ match: [
|
|
22286
22287
|
/function/,
|
|
22287
22288
|
/\s+/,
|
|
@@ -22293,32 +22294,32 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22293
22294
|
3: "title.function"
|
|
22294
22295
|
},
|
|
22295
22296
|
label: "func.def",
|
|
22296
|
-
contains: [
|
|
22297
|
+
contains: [a_],
|
|
22297
22298
|
illegal: /%/
|
|
22298
22299
|
}, $ = {
|
|
22299
22300
|
relevance: 0,
|
|
22300
22301
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22301
22302
|
className: "variable.constant"
|
|
22302
22303
|
};
|
|
22303
|
-
function
|
|
22304
|
+
function c_(e) {
|
|
22304
22305
|
return n.concat("(?!", e.join("|"), ")");
|
|
22305
22306
|
}
|
|
22306
|
-
let
|
|
22307
|
-
match: n.concat(/\b/,
|
|
22307
|
+
let l_ = {
|
|
22308
|
+
match: n.concat(/\b/, c_([
|
|
22308
22309
|
...l,
|
|
22309
22310
|
"super",
|
|
22310
22311
|
"import"
|
|
22311
22312
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22312
22313
|
className: "title.function",
|
|
22313
22314
|
relevance: 0
|
|
22314
|
-
},
|
|
22315
|
+
}, u_ = {
|
|
22315
22316
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22316
22317
|
end: g,
|
|
22317
22318
|
excludeBegin: !0,
|
|
22318
22319
|
keywords: "prototype",
|
|
22319
22320
|
className: "property",
|
|
22320
22321
|
relevance: 0
|
|
22321
|
-
},
|
|
22322
|
+
}, d_ = {
|
|
22322
22323
|
match: [
|
|
22323
22324
|
/get|set/,
|
|
22324
22325
|
/\s+/,
|
|
@@ -22329,8 +22330,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22329
22330
|
1: "keyword",
|
|
22330
22331
|
3: "title.function"
|
|
22331
22332
|
},
|
|
22332
|
-
contains: [{ begin: /\(\)/ },
|
|
22333
|
-
},
|
|
22333
|
+
contains: [{ begin: /\(\)/ }, a_]
|
|
22334
|
+
}, f_ = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", p_ = {
|
|
22334
22335
|
match: [
|
|
22335
22336
|
/const|var|let/,
|
|
22336
22337
|
/\s+/,
|
|
@@ -22338,14 +22339,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22338
22339
|
/\s*/,
|
|
22339
22340
|
/=\s*/,
|
|
22340
22341
|
/(async\s*)?/,
|
|
22341
|
-
n.lookahead(
|
|
22342
|
+
n.lookahead(f_)
|
|
22342
22343
|
],
|
|
22343
22344
|
keywords: "async",
|
|
22344
22345
|
className: {
|
|
22345
22346
|
1: "keyword",
|
|
22346
22347
|
3: "title.function"
|
|
22347
22348
|
},
|
|
22348
|
-
contains: [
|
|
22349
|
+
contains: [a_]
|
|
22349
22350
|
};
|
|
22350
22351
|
return {
|
|
22351
22352
|
name: "JavaScript",
|
|
@@ -22358,7 +22359,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22358
22359
|
keywords: E,
|
|
22359
22360
|
exports: {
|
|
22360
22361
|
PARAMS_CONTAINS: J,
|
|
22361
|
-
CLASS_REFERENCE:
|
|
22362
|
+
CLASS_REFERENCE: o_
|
|
22362
22363
|
},
|
|
22363
22364
|
illegal: /#(?![$_A-z])/,
|
|
22364
22365
|
contains: [
|
|
@@ -22373,17 +22374,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22373
22374
|
z,
|
|
22374
22375
|
B,
|
|
22375
22376
|
H,
|
|
22376
|
-
|
|
22377
|
+
i_,
|
|
22377
22378
|
G,
|
|
22378
22379
|
{ match: /\$\d+/ },
|
|
22379
22380
|
I,
|
|
22380
|
-
|
|
22381
|
+
o_,
|
|
22381
22382
|
{
|
|
22382
22383
|
scope: "attr",
|
|
22383
22384
|
match: g + n.lookahead(":"),
|
|
22384
22385
|
relevance: 0
|
|
22385
22386
|
},
|
|
22386
|
-
|
|
22387
|
+
p_,
|
|
22387
22388
|
{
|
|
22388
22389
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22389
22390
|
keywords: "return throw case",
|
|
@@ -22393,7 +22394,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22393
22394
|
e.REGEXP_MODE,
|
|
22394
22395
|
{
|
|
22395
22396
|
className: "function",
|
|
22396
|
-
begin:
|
|
22397
|
+
begin: f_,
|
|
22397
22398
|
returnBegin: !0,
|
|
22398
22399
|
end: "\\s*=>",
|
|
22399
22400
|
contains: [{
|
|
@@ -22450,13 +22451,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22450
22451
|
}
|
|
22451
22452
|
]
|
|
22452
22453
|
},
|
|
22453
|
-
|
|
22454
|
+
s_,
|
|
22454
22455
|
{ beginKeywords: "while if switch catch for" },
|
|
22455
22456
|
{
|
|
22456
22457
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
22457
22458
|
returnBegin: !0,
|
|
22458
22459
|
label: "func.def",
|
|
22459
|
-
contains: [
|
|
22460
|
+
contains: [a_, e.inherit(e.TITLE_MODE, {
|
|
22460
22461
|
begin: g,
|
|
22461
22462
|
className: "title.function"
|
|
22462
22463
|
})]
|
|
@@ -22465,7 +22466,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22465
22466
|
match: /\.\.\./,
|
|
22466
22467
|
relevance: 0
|
|
22467
22468
|
},
|
|
22468
|
-
|
|
22469
|
+
u_,
|
|
22469
22470
|
{
|
|
22470
22471
|
match: "\\$" + g,
|
|
22471
22472
|
relevance: 0
|
|
@@ -22473,12 +22474,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22473
22474
|
{
|
|
22474
22475
|
match: [/\bconstructor(?=\s*\()/],
|
|
22475
22476
|
className: { 1: "title.function" },
|
|
22476
|
-
contains: [
|
|
22477
|
+
contains: [a_]
|
|
22477
22478
|
},
|
|
22478
|
-
|
|
22479
|
+
l_,
|
|
22479
22480
|
$,
|
|
22480
22481
|
Z,
|
|
22481
|
-
|
|
22482
|
+
d_,
|
|
22482
22483
|
{ match: /\$[(.]/ }
|
|
22483
22484
|
]
|
|
22484
22485
|
};
|
|
@@ -23617,7 +23618,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23617
23618
|
immediate: !0,
|
|
23618
23619
|
deep: !0
|
|
23619
23620
|
});
|
|
23620
|
-
let
|
|
23621
|
+
let i_ = () => {
|
|
23621
23622
|
let e = a.value?.innerText;
|
|
23622
23623
|
e && l(e);
|
|
23623
23624
|
};
|
|
@@ -23625,7 +23626,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23625
23626
|
id: "copy",
|
|
23626
23627
|
description: "复制",
|
|
23627
23628
|
name: "复制",
|
|
23628
|
-
onClick:
|
|
23629
|
+
onClick: i_
|
|
23629
23630
|
})]), createElementVNode("pre", _hoisted_4$20, [createElementVNode("code", {
|
|
23630
23631
|
ref_key: "codeRef",
|
|
23631
23632
|
ref: a,
|
|
@@ -24659,7 +24660,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24659
24660
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24660
24661
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24661
24662
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24662
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24663
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, i_ = !1, G = getCurrentDocument(r), K = {
|
|
24663
24664
|
_document: G,
|
|
24664
24665
|
_isBlock: s
|
|
24665
24666
|
};
|
|
@@ -24670,7 +24671,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24670
24671
|
H && setSelectionToDOM(G, r, d, K);
|
|
24671
24672
|
}), J = () => {
|
|
24672
24673
|
d = takeSelectionSnapshot(r, K);
|
|
24673
|
-
},
|
|
24674
|
+
}, a_ = () => {
|
|
24674
24675
|
let e = q._flush();
|
|
24675
24676
|
if (q._record(!1), e.length) {
|
|
24676
24677
|
let n;
|
|
@@ -24693,8 +24694,8 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24693
24694
|
r && (l(n(r[0])), d = r[1]);
|
|
24694
24695
|
}
|
|
24695
24696
|
}
|
|
24696
|
-
},
|
|
24697
|
-
B ||
|
|
24697
|
+
}, o_ = () => {
|
|
24698
|
+
B || a_();
|
|
24698
24699
|
}, Q = (e) => {
|
|
24699
24700
|
e.preventDefault();
|
|
24700
24701
|
let n = e.inputType;
|
|
@@ -24709,47 +24710,47 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24709
24710
|
}
|
|
24710
24711
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24711
24712
|
}
|
|
24712
|
-
B ||
|
|
24713
|
-
},
|
|
24713
|
+
B || a_();
|
|
24714
|
+
}, s_ = () => {
|
|
24714
24715
|
B || J(), B = !0;
|
|
24715
24716
|
}, $ = () => {
|
|
24716
|
-
|
|
24717
|
-
},
|
|
24717
|
+
a_();
|
|
24718
|
+
}, c_ = () => {
|
|
24718
24719
|
H = !0, J();
|
|
24719
|
-
},
|
|
24720
|
+
}, l_ = () => {
|
|
24720
24721
|
H = !1;
|
|
24721
|
-
},
|
|
24722
|
+
}, u_ = () => {
|
|
24722
24723
|
if (L) {
|
|
24723
24724
|
L = !1;
|
|
24724
24725
|
return;
|
|
24725
24726
|
}
|
|
24726
|
-
H && !B && !
|
|
24727
|
-
},
|
|
24727
|
+
H && !B && !i_ && J();
|
|
24728
|
+
}, d_ = (e) => {
|
|
24728
24729
|
J(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24730
|
+
}, f_ = (e) => {
|
|
24731
|
+
e.preventDefault(), d_(e.clipboardData);
|
|
24729
24732
|
}, p_ = (e) => {
|
|
24730
|
-
e.preventDefault(),
|
|
24733
|
+
e.preventDefault(), m || (d_(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24731
24734
|
}, m_ = (e) => {
|
|
24732
|
-
e.preventDefault(), m || (f_(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24733
|
-
}, h_ = (e) => {
|
|
24734
24735
|
e.preventDefault();
|
|
24735
24736
|
let [n, r] = range(d);
|
|
24736
24737
|
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, K)));
|
|
24737
|
-
},
|
|
24738
|
+
}, h_ = (e) => {
|
|
24738
24739
|
e.preventDefault();
|
|
24739
24740
|
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, K);
|
|
24740
24741
|
if (n && i) {
|
|
24741
24742
|
let e = new Transaction();
|
|
24742
|
-
|
|
24743
|
+
i_ && e.delete(...range(d));
|
|
24743
24744
|
let o = e.transform(i);
|
|
24744
24745
|
e.select(o, o).insert(o, a(n, K)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24745
24746
|
}
|
|
24746
|
-
},
|
|
24747
|
-
|
|
24748
|
-
},
|
|
24749
|
-
|
|
24747
|
+
}, g_ = (e) => {
|
|
24748
|
+
i_ = !0, d_(e.dataTransfer);
|
|
24749
|
+
}, __ = () => {
|
|
24750
|
+
i_ = !1;
|
|
24750
24751
|
};
|
|
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",
|
|
24752
|
+
return G.addEventListener("selectionchange", u_), r.addEventListener("keydown", Z), r.addEventListener("input", o_), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", s_), r.addEventListener("compositionend", $), r.addEventListener("focus", c_), r.addEventListener("blur", l_), r.addEventListener("copy", f_), r.addEventListener("cut", p_), r.addEventListener("paste", m_), r.addEventListener("drop", h_), r.addEventListener("dragstart", g_), r.addEventListener("dragend", __), () => {
|
|
24753
|
+
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", u_), r.removeEventListener("keydown", Z), r.removeEventListener("input", o_), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", s_), r.removeEventListener("compositionend", $), r.removeEventListener("focus", c_), r.removeEventListener("blur", l_), r.removeEventListener("copy", f_), r.removeEventListener("cut", p_), r.removeEventListener("paste", m_), r.removeEventListener("drop", h_), r.removeEventListener("dragstart", g_), r.removeEventListener("dragend", __));
|
|
24753
24754
|
};
|
|
24754
24755
|
},
|
|
24755
24756
|
command: (e, ...n) => {
|
|
@@ -24871,7 +24872,7 @@ var _hoisted_1$34 = { class: "file-upload-btn" }, _hoisted_2$26 = ["accept"], fi
|
|
|
24871
24872
|
onClick: o
|
|
24872
24873
|
}, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
|
|
24873
24874
|
...e.tippyOptions,
|
|
24874
|
-
content: unref(t$1)("
|
|
24875
|
+
content: unref(t$1)("上传图片, 最多支持上传 3 个, 最大支持 2.4MB"),
|
|
24875
24876
|
theme: "ai-chat-box",
|
|
24876
24877
|
offset: [0, 16]
|
|
24877
24878
|
}]])]));
|
|
@@ -25055,16 +25056,16 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25055
25056
|
setup(e) {
|
|
25056
25057
|
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
25058
|
B.forEach((e) => URL.revokeObjectURL(e)), B.length = 0;
|
|
25058
|
-
},
|
|
25059
|
+
}, i_ = (e) => {
|
|
25059
25060
|
let n = URL.createObjectURL(e);
|
|
25060
25061
|
return B.push(n), {
|
|
25061
25062
|
url: n,
|
|
25062
25063
|
name: e.name,
|
|
25063
25064
|
file: e
|
|
25064
25065
|
};
|
|
25065
|
-
}, G = computed(() => (H(), n.images.map((e) => e instanceof File ?
|
|
25066
|
+
}, G = computed(() => (H(), n.images.map((e) => e instanceof File ? i_(e) : typeof e == "string" ? { url: e } : e.file && !e.url ? {
|
|
25066
25067
|
...e,
|
|
25067
|
-
url:
|
|
25068
|
+
url: i_(e.file).url
|
|
25068
25069
|
} : e)));
|
|
25069
25070
|
watch(r, (e) => {
|
|
25070
25071
|
e || H();
|
|
@@ -25075,17 +25076,17 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25075
25076
|
width: e.width,
|
|
25076
25077
|
resolution: e.resolution
|
|
25077
25078
|
};
|
|
25078
|
-
}),
|
|
25079
|
+
}), o_ = () => {
|
|
25079
25080
|
r.value = !1;
|
|
25080
25081
|
}, Q = () => {
|
|
25081
|
-
n.maskClosable &&
|
|
25082
|
-
},
|
|
25082
|
+
n.maskClosable && o_();
|
|
25083
|
+
}, s_ = (e) => {
|
|
25083
25084
|
i.value = e, l(), z.value = "loading";
|
|
25085
|
+
}, c_ = () => {
|
|
25086
|
+
s_(i.value > 0 ? i.value - 1 : G.value.length - 1);
|
|
25084
25087
|
}, l_ = () => {
|
|
25085
|
-
|
|
25088
|
+
s_(i.value < G.value.length - 1 ? i.value + 1 : 0);
|
|
25086
25089
|
}, u_ = () => {
|
|
25087
|
-
c_(i.value < G.value.length - 1 ? i.value + 1 : 0);
|
|
25088
|
-
}, d_ = () => {
|
|
25089
25090
|
let e = K.value, r = e.downloadUrl || e.url;
|
|
25090
25091
|
if (n.onDownload) {
|
|
25091
25092
|
n.onDownload(r);
|
|
@@ -25093,16 +25094,16 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25093
25094
|
}
|
|
25094
25095
|
let i = document.createElement("a");
|
|
25095
25096
|
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
|
-
},
|
|
25097
|
+
}, d_ = () => {
|
|
25097
25098
|
z.value = "loaded";
|
|
25098
|
-
},
|
|
25099
|
+
}, f_ = () => {
|
|
25099
25100
|
z.value = "error";
|
|
25100
25101
|
};
|
|
25101
25102
|
return usePreviewKeyboard({
|
|
25102
25103
|
visible: r,
|
|
25103
|
-
onClose:
|
|
25104
|
-
onPrev: () => q.value &&
|
|
25105
|
-
onNext: () => q.value &&
|
|
25104
|
+
onClose: o_,
|
|
25105
|
+
onPrev: () => q.value && c_(),
|
|
25106
|
+
onNext: () => q.value && l_()
|
|
25106
25107
|
}), (n, d) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-image-preview-fade" }, {
|
|
25107
25108
|
default: withCtx(() => [r.value ? (openBlock(), createElementBlock("div", {
|
|
25108
25109
|
key: 0,
|
|
@@ -25111,14 +25112,14 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25111
25112
|
}, [
|
|
25112
25113
|
createElementVNode("div", {
|
|
25113
25114
|
class: "ai-image-preview-close",
|
|
25114
|
-
onClick:
|
|
25115
|
+
onClick: o_
|
|
25115
25116
|
}, [createVNode(unref(PreviewCloseIcon), { class: "ai-image-preview-close-icon" })]),
|
|
25116
25117
|
q.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", {
|
|
25117
25118
|
class: "ai-image-preview-arrow ai-image-preview-arrow-left",
|
|
25118
|
-
onClick:
|
|
25119
|
+
onClick: c_
|
|
25119
25120
|
}, [createVNode(unref(ArrowLeftIcon), { class: "ai-image-preview-arrow-icon" })]), createElementVNode("div", {
|
|
25120
25121
|
class: "ai-image-preview-arrow ai-image-preview-arrow-right",
|
|
25121
|
-
onClick:
|
|
25122
|
+
onClick: l_
|
|
25122
25123
|
}, [createVNode(unref(ArrowRightPreviewIcon), { class: "ai-image-preview-arrow-icon" })])], 64)) : createCommentVNode("v-if", !0),
|
|
25123
25124
|
createElementVNode("div", {
|
|
25124
25125
|
class: "ai-image-preview-body",
|
|
@@ -25131,8 +25132,8 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25131
25132
|
draggable: "false",
|
|
25132
25133
|
src: K.value.url,
|
|
25133
25134
|
style: normalizeStyle(unref(a)),
|
|
25134
|
-
onError:
|
|
25135
|
-
onLoad:
|
|
25135
|
+
onError: f_,
|
|
25136
|
+
onLoad: d_
|
|
25136
25137
|
}, null, 44, _hoisted_1$31)),
|
|
25137
25138
|
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
25139
|
z.value === "loading" ? (openBlock(), createElementBlock("div", _hoisted_4$17, [K.value.thumbnailUrl ? (openBlock(), createElementBlock("img", {
|
|
@@ -25149,7 +25150,7 @@ var _hoisted_1$31 = ["src"], _hoisted_2$23 = {
|
|
|
25149
25150
|
"is-multiple": q.value,
|
|
25150
25151
|
"show-info": e.showInfo,
|
|
25151
25152
|
total: G.value.length,
|
|
25152
|
-
onDownload:
|
|
25153
|
+
onDownload: u_,
|
|
25153
25154
|
onReset: unref(l),
|
|
25154
25155
|
onRotate: unref(j),
|
|
25155
25156
|
onZoomIn: unref(E),
|
|
@@ -25394,9 +25395,9 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25394
25395
|
set(e) {
|
|
25395
25396
|
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
25397
|
}
|
|
25397
|
-
})), d = shallowRef("slash"), T = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition:
|
|
25398
|
+
})), d = shallowRef("slash"), T = shallowRef(""), j = shallowRef([]), I = shallowRef([]), L, z, B = document.body, { commandSelection: H, GetCursorPosition: i_ } = useCommandSelection(), G = () => {
|
|
25398
25399
|
setTimeout(() => {
|
|
25399
|
-
let e =
|
|
25400
|
+
let e = a_();
|
|
25400
25401
|
T.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
25401
25402
|
left: e.coordinates?.left || 0,
|
|
25402
25403
|
top: e.coordinates?.top || 0,
|
|
@@ -25409,7 +25410,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25409
25410
|
e.key === "@" && (d.value = "slash", G()), e.key === "/" && (d.value = "prompt", G());
|
|
25410
25411
|
}, J = () => {
|
|
25411
25412
|
T.value = "";
|
|
25412
|
-
},
|
|
25413
|
+
}, a_ = () => {
|
|
25413
25414
|
let e = {
|
|
25414
25415
|
isActive: !1,
|
|
25415
25416
|
query: "",
|
|
@@ -25440,27 +25441,27 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25440
25441
|
return e;
|
|
25441
25442
|
}
|
|
25442
25443
|
}, 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(
|
|
25444
|
+
L.command(i_);
|
|
25444
25445
|
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
|
-
},
|
|
25446
|
+
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(), c_();
|
|
25447
|
+
}, c_ = () => {
|
|
25447
25448
|
setTimeout(() => {
|
|
25448
25449
|
let e = window.getSelection(), n = document.createRange();
|
|
25449
25450
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25450
25451
|
}, 100);
|
|
25451
|
-
},
|
|
25452
|
-
L.command(ReplaceAll, e),
|
|
25452
|
+
}, l_ = (e) => {
|
|
25453
|
+
L.command(ReplaceAll, e), c_();
|
|
25453
25454
|
};
|
|
25454
25455
|
watchEffect(() => {
|
|
25455
25456
|
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
25457
|
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
25458
|
});
|
|
25458
|
-
let
|
|
25459
|
+
let u_ = (e, n, r, i) => {
|
|
25459
25460
|
if (n.type === "tag") {
|
|
25460
25461
|
let n = Z(e, r);
|
|
25461
25462
|
L.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25462
25463
|
}
|
|
25463
|
-
},
|
|
25464
|
+
}, d_ = (e) => {
|
|
25464
25465
|
let n = e.clipboardData?.items;
|
|
25465
25466
|
if (!n) return;
|
|
25466
25467
|
let r = [];
|
|
@@ -25469,7 +25470,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25469
25470
|
n && r.push(n);
|
|
25470
25471
|
}
|
|
25471
25472
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25472
|
-
},
|
|
25473
|
+
}, p_ = () => {
|
|
25473
25474
|
z?.(), L = createEditor({
|
|
25474
25475
|
doc: u.value,
|
|
25475
25476
|
schema: tagSchema,
|
|
@@ -25478,16 +25479,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25478
25479
|
},
|
|
25479
25480
|
onKeyDown: (e) => K(e)
|
|
25480
25481
|
}), z = L.input(i.value);
|
|
25481
|
-
},
|
|
25482
|
+
}, m_ = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
|
|
25482
25483
|
return onMounted(() => {
|
|
25483
|
-
|
|
25484
|
+
p_(), i.value?.addEventListener("paste", d_);
|
|
25484
25485
|
}), onUnmounted(() => {
|
|
25485
|
-
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste",
|
|
25486
|
+
L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", d_);
|
|
25486
25487
|
}), n({
|
|
25487
25488
|
cleanup: () => {
|
|
25488
25489
|
L.command(ReplaceAll, "");
|
|
25489
25490
|
},
|
|
25490
|
-
focus:
|
|
25491
|
+
focus: c_
|
|
25491
25492
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25492
25493
|
ref_key: "editorRef",
|
|
25493
25494
|
ref: i,
|
|
@@ -25501,7 +25502,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25501
25502
|
"data-tag-type": r.data.type
|
|
25502
25503
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25503
25504
|
class: "mention-tag-remove-icon",
|
|
25504
|
-
onClick: (a) =>
|
|
25505
|
+
onClick: (a) => u_(e, r, i, n)
|
|
25505
25506
|
}, 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
25507
|
ref_key: "tippyRef",
|
|
25507
25508
|
ref: a,
|
|
@@ -25516,7 +25517,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25516
25517
|
"trigger-target": i.value,
|
|
25517
25518
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25518
25519
|
onHidden: J,
|
|
25519
|
-
onShow:
|
|
25520
|
+
onShow: m_
|
|
25520
25521
|
}, {
|
|
25521
25522
|
content: withCtx(() => [d.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25522
25523
|
key: 0,
|
|
@@ -25524,7 +25525,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25524
25525
|
"resource-list": j.value
|
|
25525
25526
|
}, null, 8, ["resource-list"])) : d.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25526
25527
|
key: 1,
|
|
25527
|
-
"on-select":
|
|
25528
|
+
"on-select": l_,
|
|
25528
25529
|
prompts: I.value
|
|
25529
25530
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25530
25531
|
_: 1
|
|
@@ -25578,7 +25579,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25578
25579
|
onSendMessage: {},
|
|
25579
25580
|
onStopSending: {},
|
|
25580
25581
|
onUpload: {},
|
|
25581
|
-
placeholder: { default: isEn ? "Input \"/\" to trigger prompt\nInput \"@\" to trigger tool\nUse Shift + Enter to enter a new line" : "输入 “/”唤出 Prompt\n
|
|
25582
|
+
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
25583
|
prompts: { default: () => [] },
|
|
25583
25584
|
resources: { default: () => [] },
|
|
25584
25585
|
shortcutId: {},
|
|
@@ -25601,7 +25602,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25601
25602
|
"update:modelValue"
|
|
25602
25603
|
], ["update:cite"]),
|
|
25603
25604
|
setup(e, { expose: n, emit: r }) {
|
|
25604
|
-
useCssVars((e) => ({
|
|
25605
|
+
useCssVars((e) => ({ v2ada5094: unref(CHAT_Z_INDEX) }));
|
|
25605
25606
|
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
25607
|
watchPostEffect(() => {
|
|
25607
25608
|
let e = l.inputMaxHeight || 200;
|
|
@@ -25642,7 +25643,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25642
25643
|
o.value = "";
|
|
25643
25644
|
}, H = (e) => {
|
|
25644
25645
|
u("selectShortcut", e);
|
|
25645
|
-
},
|
|
25646
|
+
}, i_ = () => {
|
|
25646
25647
|
u("deleteShortcut");
|
|
25647
25648
|
}, G = (e) => `${e.name}_${e.size}_${e.lastModified}`, K = async (e) => {
|
|
25648
25649
|
if (!l.supportUpload) return;
|
|
@@ -25732,7 +25733,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
25732
25733
|
class: "selected-shortcut-btn",
|
|
25733
25734
|
shortcut: E.value
|
|
25734
25735
|
}, {
|
|
25735
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25736
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: i_ })]),
|
|
25736
25737
|
_: 1
|
|
25737
25738
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25738
25739
|
]),
|
|
@@ -26401,7 +26402,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26401
26402
|
await n.onAction?.(e);
|
|
26402
26403
|
}, H = async () => {
|
|
26403
26404
|
await s.value?.triggerSendMessage?.(), i.value = !1;
|
|
26404
|
-
},
|
|
26405
|
+
}, i_ = () => {
|
|
26405
26406
|
i.value = !1;
|
|
26406
26407
|
}, K = () => {
|
|
26407
26408
|
i.value = !1;
|
|
@@ -26433,7 +26434,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
|
|
|
26433
26434
|
}, {
|
|
26434
26435
|
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_4$4, [createVNode(unref(Button), {
|
|
26435
26436
|
size: "small",
|
|
26436
|
-
onClick:
|
|
26437
|
+
onClick: i_
|
|
26437
26438
|
}, {
|
|
26438
26439
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(t$1)("取消")), 1)]),
|
|
26439
26440
|
_: 1
|
|
@@ -27171,7 +27172,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27171
27172
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
27172
27173
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
27173
27174
|
}));
|
|
27174
|
-
}, B = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), H = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"),
|
|
27175
|
+
}, B = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), H = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), i_ = 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
27176
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
27176
27177
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
27177
27178
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -27193,7 +27194,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27193
27194
|
${a}
|
|
27194
27195
|
</div>
|
|
27195
27196
|
`;
|
|
27196
|
-
}),
|
|
27197
|
+
}), s_ = async () => {
|
|
27197
27198
|
if (i.sessionBusinessManager) try {
|
|
27198
27199
|
await i.sessionBusinessManager.createNewSession();
|
|
27199
27200
|
} catch (e) {
|
|
@@ -27203,18 +27204,18 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27203
27204
|
});
|
|
27204
27205
|
}
|
|
27205
27206
|
a("new-chat");
|
|
27206
|
-
},
|
|
27207
|
+
}, c_ = (e) => {
|
|
27207
27208
|
e.stopPropagation(), i.sessionBusinessManager ? (L || z(), L && L.handleTriggerClick(e)) : a("history-click", e);
|
|
27208
|
-
},
|
|
27209
|
+
}, l_ = () => {
|
|
27209
27210
|
a("help-click");
|
|
27210
|
-
},
|
|
27211
|
+
}, d_ = (e) => {
|
|
27211
27212
|
e.stopPropagation(), L && L.isVisible() && L.hide(), j && (j.state.isVisible ? j.hide() : j.show());
|
|
27212
|
-
},
|
|
27213
|
+
}, f_ = (e) => {
|
|
27213
27214
|
e.stopPropagation(), e.preventDefault();
|
|
27214
27215
|
let n = e.currentTarget, r = n.dataset.action;
|
|
27215
27216
|
if (!n.classList.contains("disabled")) switch (j && j.hide(), r) {
|
|
27216
27217
|
case "rename":
|
|
27217
|
-
|
|
27218
|
+
p_();
|
|
27218
27219
|
break;
|
|
27219
27220
|
case "auto-generate":
|
|
27220
27221
|
a("auto-generate-name");
|
|
@@ -27223,9 +27224,9 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27223
27224
|
a("share");
|
|
27224
27225
|
break;
|
|
27225
27226
|
}
|
|
27226
|
-
},
|
|
27227
|
-
document.removeEventListener("click",
|
|
27228
|
-
document.addEventListener("click",
|
|
27227
|
+
}, p_ = () => {
|
|
27228
|
+
document.removeEventListener("click", y_), T.value = i.sessionName || "", m.value = !0, setTimeout(() => {
|
|
27229
|
+
document.addEventListener("click", y_);
|
|
27229
27230
|
}, 100), setTimeout(() => {
|
|
27230
27231
|
if (k.value) try {
|
|
27231
27232
|
let e = k.value;
|
|
@@ -27236,22 +27237,22 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27236
27237
|
console.warn("Failed to focus rename input:", e);
|
|
27237
27238
|
}
|
|
27238
27239
|
}, 100);
|
|
27239
|
-
},
|
|
27240
|
+
}, m_ = () => {
|
|
27240
27241
|
let e = T.value.trim();
|
|
27241
27242
|
if (!e) {
|
|
27242
|
-
|
|
27243
|
+
h_();
|
|
27243
27244
|
return;
|
|
27244
27245
|
}
|
|
27245
27246
|
a("rename", e), m.value = !1, T.value = "";
|
|
27246
|
-
},
|
|
27247
|
+
}, h_ = () => {
|
|
27247
27248
|
m.value = !1, T.value = "";
|
|
27248
|
-
},
|
|
27249
|
-
T.value = e, n.key === "Enter" ?
|
|
27250
|
-
},
|
|
27249
|
+
}, __ = (e, n) => {
|
|
27250
|
+
T.value = e, n.key === "Enter" ? m_() : n.key === "Escape" && h_();
|
|
27251
|
+
}, y_ = (e) => {
|
|
27251
27252
|
if (!m.value) return;
|
|
27252
27253
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
27253
|
-
r && !r.contains(n) &&
|
|
27254
|
-
},
|
|
27254
|
+
r && !r.contains(n) && h_();
|
|
27255
|
+
}, b_ = async () => {
|
|
27255
27256
|
if (!u.value) return;
|
|
27256
27257
|
let e = (await import("tippy.js")).default;
|
|
27257
27258
|
j &&= (j.destroy(), null), j = e(u.value, {
|
|
@@ -27269,7 +27270,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27269
27270
|
let { default: e } = await import("tippy.js");
|
|
27270
27271
|
document.querySelectorAll(".tippy-menu-item").forEach((n) => {
|
|
27271
27272
|
let r = n;
|
|
27272
|
-
r.addEventListener("click",
|
|
27273
|
+
r.addEventListener("click", f_);
|
|
27273
27274
|
let i = r.getAttribute("data-tippy-content");
|
|
27274
27275
|
if (i && !I.has(r)) {
|
|
27275
27276
|
let n = e(r, {
|
|
@@ -27288,7 +27289,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27288
27289
|
onHide: () => {
|
|
27289
27290
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
27290
27291
|
let n = e;
|
|
27291
|
-
n.removeEventListener("click",
|
|
27292
|
+
n.removeEventListener("click", f_);
|
|
27292
27293
|
let r = I.get(n);
|
|
27293
27294
|
r && (r.destroy(), I.delete(n));
|
|
27294
27295
|
});
|
|
@@ -27298,11 +27299,11 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27298
27299
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
27299
27300
|
j && j.setContent(Q.value);
|
|
27300
27301
|
}), onMounted(() => {
|
|
27301
|
-
|
|
27302
|
+
b_(), i.sessionBusinessManager && z(), document.addEventListener("click", y_);
|
|
27302
27303
|
}), onBeforeUnmount(() => {
|
|
27303
27304
|
j &&= (j.destroy(), null), I.forEach((e) => {
|
|
27304
27305
|
e.destroy();
|
|
27305
|
-
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click",
|
|
27306
|
+
}), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", y_);
|
|
27306
27307
|
}), n({
|
|
27307
27308
|
headerRef: s,
|
|
27308
27309
|
historyIconRef: l
|
|
@@ -27325,13 +27326,13 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27325
27326
|
"onUpdate:modelValue": r[0] ||= (e) => T.value = e,
|
|
27326
27327
|
class: "rename-input",
|
|
27327
27328
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
27328
|
-
onKeyup:
|
|
27329
|
+
onKeyup: __
|
|
27329
27330
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
27330
27331
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
27331
|
-
onClick:
|
|
27332
|
+
onClick: m_
|
|
27332
27333
|
}), createElementVNode("i", {
|
|
27333
27334
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
27334
|
-
onClick:
|
|
27335
|
+
onClick: h_
|
|
27335
27336
|
})])])])) : createCommentVNode("v-if", !0)
|
|
27336
27337
|
], 2),
|
|
27337
27338
|
i.showMoreIcon && G.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -27339,7 +27340,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27339
27340
|
ref_key: "moreIconRef",
|
|
27340
27341
|
ref: u,
|
|
27341
27342
|
class: "bkai-icon bkai-more",
|
|
27342
|
-
onClick:
|
|
27343
|
+
onClick: d_
|
|
27343
27344
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
27344
27345
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
27345
27346
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -27351,7 +27352,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27351
27352
|
{ disabled: !G.value }
|
|
27352
27353
|
]),
|
|
27353
27354
|
style: normalizeStyle(J()),
|
|
27354
|
-
onClick: r[1] ||= (e) => G.value ?
|
|
27355
|
+
onClick: r[1] ||= (e) => G.value ? s_() : void 0
|
|
27355
27356
|
}, null, 6)), [[unref(o), {
|
|
27356
27357
|
content: K(unref(t)("新增会话")),
|
|
27357
27358
|
boundary: "parent"
|
|
@@ -27367,7 +27368,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27367
27368
|
{ disabled: !G.value }
|
|
27368
27369
|
]),
|
|
27369
27370
|
style: normalizeStyle(J()),
|
|
27370
|
-
onClick: r[2] ||= (e) => G.value ?
|
|
27371
|
+
onClick: r[2] ||= (e) => G.value ? c_(e) : void 0
|
|
27371
27372
|
}, null, 6)), [[unref(o), {
|
|
27372
27373
|
content: K(unref(t)("历史会话")),
|
|
27373
27374
|
boundary: "parent"
|
|
@@ -27375,7 +27376,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27375
27376
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
27376
27377
|
key: 2,
|
|
27377
27378
|
class: "bkai-icon bkai-zhushou",
|
|
27378
|
-
onClick:
|
|
27379
|
+
onClick: l_
|
|
27379
27380
|
}, null, 512)), [[unref(o), {
|
|
27380
27381
|
content: unref(t)("转人工"),
|
|
27381
27382
|
boundary: "parent"
|
|
@@ -27385,7 +27386,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
27385
27386
|
class: normalizeClass(["bkai-icon", H.value]),
|
|
27386
27387
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
27387
27388
|
}, null, 2)), [[unref(o), {
|
|
27388
|
-
content:
|
|
27389
|
+
content: i_.value,
|
|
27389
27390
|
boundary: "parent"
|
|
27390
27391
|
}]]) : createCommentVNode("v-if", !0),
|
|
27391
27392
|
withDirectives(createElementVNode("i", {
|
|
@@ -28219,7 +28220,7 @@ var UIStateManager = class {
|
|
|
28219
28220
|
a("receive-text");
|
|
28220
28221
|
},
|
|
28221
28222
|
onDone: () => {
|
|
28222
|
-
a("receive-end"),
|
|
28223
|
+
a("receive-end"), Y_();
|
|
28223
28224
|
},
|
|
28224
28225
|
onError: (e) => {
|
|
28225
28226
|
a("error", e);
|
|
@@ -28233,13 +28234,13 @@ var UIStateManager = class {
|
|
|
28233
28234
|
protocol: n
|
|
28234
28235
|
});
|
|
28235
28236
|
return n.injectMessageModule(r.message), r;
|
|
28236
|
-
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0),
|
|
28237
|
+
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), i_ = async (e, n) => {
|
|
28237
28238
|
if (e.id === "cite") {
|
|
28238
|
-
|
|
28239
|
+
D_.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), dv();
|
|
28239
28240
|
return;
|
|
28240
28241
|
}
|
|
28241
28242
|
if (e.id === "rebuild") {
|
|
28242
|
-
await
|
|
28243
|
+
await s_(n);
|
|
28243
28244
|
return;
|
|
28244
28245
|
}
|
|
28245
28246
|
if (e.id === "delete") {
|
|
@@ -28247,7 +28248,7 @@ var UIStateManager = class {
|
|
|
28247
28248
|
return;
|
|
28248
28249
|
}
|
|
28249
28250
|
if (e.id === "share") {
|
|
28250
|
-
|
|
28251
|
+
y_ && (E.value = !0), a("request-share");
|
|
28251
28252
|
return;
|
|
28252
28253
|
}
|
|
28253
28254
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -28269,7 +28270,7 @@ var UIStateManager = class {
|
|
|
28269
28270
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
28270
28271
|
return;
|
|
28271
28272
|
}
|
|
28272
|
-
let s = findLastUserMessageIdBefore(
|
|
28273
|
+
let s = findLastUserMessageIdBefore(C_?.messages.value || [], n[0]);
|
|
28273
28274
|
if (s === void 0) {
|
|
28274
28275
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
28275
28276
|
return;
|
|
@@ -28287,12 +28288,12 @@ var UIStateManager = class {
|
|
|
28287
28288
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
28288
28289
|
}
|
|
28289
28290
|
}, Q = async (e) => {
|
|
28290
|
-
if (!
|
|
28291
|
+
if (!C_ || !z) {
|
|
28291
28292
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
28292
28293
|
return;
|
|
28293
28294
|
}
|
|
28294
28295
|
try {
|
|
28295
|
-
let n =
|
|
28296
|
+
let n = C_.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
28296
28297
|
if (!r) {
|
|
28297
28298
|
console.error("[ChatBot] No user message found before AI messages");
|
|
28298
28299
|
return;
|
|
@@ -28302,8 +28303,8 @@ var UIStateManager = class {
|
|
|
28302
28303
|
} catch (e) {
|
|
28303
28304
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
28304
28305
|
}
|
|
28305
|
-
},
|
|
28306
|
-
if (!
|
|
28306
|
+
}, s_ = async (e) => {
|
|
28307
|
+
if (!C_ || !z) {
|
|
28307
28308
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
28308
28309
|
return;
|
|
28309
28310
|
}
|
|
@@ -28313,21 +28314,21 @@ var UIStateManager = class {
|
|
|
28313
28314
|
return;
|
|
28314
28315
|
}
|
|
28315
28316
|
try {
|
|
28316
|
-
await
|
|
28317
|
+
await C_.regenerateFromAIMessages(e, n), Y_();
|
|
28317
28318
|
} catch (e) {
|
|
28318
28319
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
28319
28320
|
}
|
|
28320
|
-
},
|
|
28321
|
+
}, c_ = async (e, n) => {
|
|
28321
28322
|
if (e.id === "delete") {
|
|
28322
|
-
await
|
|
28323
|
+
await m_(n);
|
|
28323
28324
|
return;
|
|
28324
28325
|
}
|
|
28325
28326
|
if (e.id === "cite") {
|
|
28326
|
-
|
|
28327
|
+
D_.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), dv();
|
|
28327
28328
|
return;
|
|
28328
28329
|
}
|
|
28329
28330
|
console.log("handleUserAction", e, n);
|
|
28330
|
-
},
|
|
28331
|
+
}, l_ = async (e, n, r) => {
|
|
28331
28332
|
if (!z) {
|
|
28332
28333
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
28333
28334
|
return;
|
|
@@ -28343,12 +28344,12 @@ var UIStateManager = class {
|
|
|
28343
28344
|
return;
|
|
28344
28345
|
}
|
|
28345
28346
|
try {
|
|
28346
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
28347
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), Y_();
|
|
28347
28348
|
} catch (e) {
|
|
28348
28349
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
28349
28350
|
}
|
|
28350
|
-
},
|
|
28351
|
-
if (!
|
|
28351
|
+
}, d_ = async (e, n) => {
|
|
28352
|
+
if (!C_ || !z) {
|
|
28352
28353
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
28353
28354
|
return;
|
|
28354
28355
|
}
|
|
@@ -28363,26 +28364,26 @@ var UIStateManager = class {
|
|
|
28363
28364
|
return;
|
|
28364
28365
|
}
|
|
28365
28366
|
try {
|
|
28366
|
-
let a =
|
|
28367
|
+
let a = f_(e);
|
|
28367
28368
|
if (!a) {
|
|
28368
28369
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
28369
28370
|
return;
|
|
28370
28371
|
}
|
|
28371
|
-
let o =
|
|
28372
|
-
await
|
|
28372
|
+
let o = ov(a, n), s = String(n.input ?? "");
|
|
28373
|
+
await C_.resendMessageWithProperty(String(i), r, s, o), Y_();
|
|
28373
28374
|
} catch (e) {
|
|
28374
28375
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
28375
28376
|
}
|
|
28376
|
-
},
|
|
28377
|
+
}, f_ = (e) => {
|
|
28377
28378
|
let n = e.property?.extra;
|
|
28378
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
28379
|
-
},
|
|
28380
|
-
if (!
|
|
28379
|
+
return n?.shortcut ? n.shortcut : n?.command ? q_.value.find((e) => e.id === n.command) ?? null : null;
|
|
28380
|
+
}, m_ = async (e) => {
|
|
28381
|
+
if (!C_ || !z) {
|
|
28381
28382
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
28382
28383
|
return;
|
|
28383
28384
|
}
|
|
28384
28385
|
try {
|
|
28385
|
-
let n =
|
|
28386
|
+
let n = C_.messages.value, r = n.findIndex((n) => n === e);
|
|
28386
28387
|
if (r === -1) {
|
|
28387
28388
|
console.error("[ChatBot] User message not found in messages list");
|
|
28388
28389
|
return;
|
|
@@ -28398,28 +28399,28 @@ var UIStateManager = class {
|
|
|
28398
28399
|
} catch (e) {
|
|
28399
28400
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
28400
28401
|
}
|
|
28401
|
-
},
|
|
28402
|
+
}, __ = async () => {
|
|
28402
28403
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
28403
|
-
},
|
|
28404
|
+
}, y_ = !i.chatHelper, b_ = computed(() => y_ ? E.value : i.enableSelection), x_ = computed(() => y_ ? k.value : i.shareLoading), S_ = z ? new SessionBusinessManager(z.session, z.agent, null, {
|
|
28404
28405
|
enableChatSession: !0,
|
|
28405
28406
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
28406
28407
|
loadRecentSessionOnMount: i.autoLoad,
|
|
28407
28408
|
initialSessionCode: i.sessionCode
|
|
28408
|
-
}) : null,
|
|
28409
|
+
}) : null, C_ = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
28409
28410
|
openingRemark: i.helloText,
|
|
28410
28411
|
predefinedQuestions: i.prompts,
|
|
28411
28412
|
placeholder: i.placeholder
|
|
28412
|
-
}) : null,
|
|
28413
|
-
|
|
28414
|
-
},
|
|
28413
|
+
}) : null, T_ = new ShortcutManager(null, i.shortcuts || []), E_ = shallowRef([[]]), D_ = ref(""), O_ = shallowRef([]), k_ = (e, n) => {
|
|
28414
|
+
E_.value = e, O_.value = n;
|
|
28415
|
+
}, A_ = computed(() => C_?.messages.value ?? []), j_ = computed(() => C_?.isMessagesLoading.value ?? !1), M_ = computed(() => C_?.isGenerating.value ?? !1), N_ = computed(() => S_?.currentSession.value ?? null), P_ = computed(() => y_ && !j.value ? !1 : !j_.value && A_.value.length === 0), F_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), I_ = computed(() => i.resources?.length ? i.resources : z?.agent.info.value?.resources ?? []), z_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), B_ = computed(() => u.value?.supportUpload ? u.value.supportUpload.vision === !0 : z?.agent.info.value?.promptSetting?.supportUpload?.vision === !0), V_ = computed(() => ({
|
|
28415
28416
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
28416
28417
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
28417
|
-
})),
|
|
28418
|
-
T.value = [],
|
|
28419
|
-
},
|
|
28418
|
+
})), H_ = computed(() => T_.shortcuts.value), U_ = () => {
|
|
28419
|
+
T.value = [], y_ && (E.value = !1), a("cancel-share");
|
|
28420
|
+
}, W_ = async () => {
|
|
28420
28421
|
let e = T.value;
|
|
28421
|
-
|
|
28422
|
-
},
|
|
28422
|
+
y_ && await G_(e), a("confirm-share", e);
|
|
28423
|
+
}, G_ = async (e) => {
|
|
28423
28424
|
if (!z || e.length === 0) return;
|
|
28424
28425
|
let n = z.session.current?.value?.sessionCode;
|
|
28425
28426
|
if (!n) {
|
|
@@ -28441,42 +28442,42 @@ var UIStateManager = class {
|
|
|
28441
28442
|
} finally {
|
|
28442
28443
|
k.value = !1, E.value = !1, T.value = [];
|
|
28443
28444
|
}
|
|
28444
|
-
},
|
|
28445
|
-
e ? T.value =
|
|
28446
|
-
},
|
|
28445
|
+
}, K_ = (e) => {
|
|
28446
|
+
e ? T.value = A_.value : T.value = [];
|
|
28447
|
+
}, q_ = T_.effectiveShortcuts;
|
|
28447
28448
|
watch(() => i.shortcuts, (e) => {
|
|
28448
|
-
|
|
28449
|
+
T_.setShortcuts(e || []);
|
|
28449
28450
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
28450
|
-
e &&
|
|
28451
|
+
e && T_.setAgentShortcuts(e);
|
|
28451
28452
|
}, { immediate: !0 });
|
|
28452
|
-
let
|
|
28453
|
+
let Y_ = async () => {
|
|
28453
28454
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
28454
|
-
},
|
|
28455
|
-
if (!
|
|
28455
|
+
}, X_ = async (e, n = {}) => {
|
|
28456
|
+
if (!C_ || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
28456
28457
|
let r = z.session.current?.value?.sessionCode;
|
|
28457
28458
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
28458
|
-
|
|
28459
|
-
},
|
|
28459
|
+
E_.value = [[]], D_.value = "", O_.value = [], a("send-message", typeof e == "string" ? e : ""), await C_.sendMessage(e, r, n);
|
|
28460
|
+
}, Q_ = async (e) => {
|
|
28460
28461
|
let n = z?.session.current?.value?.sessionCode;
|
|
28461
28462
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
28462
28463
|
let r = await z.session.uploadFile(n, e);
|
|
28463
28464
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
28464
28465
|
return r;
|
|
28465
|
-
},
|
|
28466
|
+
}, tv = async (e, n) => {
|
|
28466
28467
|
try {
|
|
28467
28468
|
let n = {};
|
|
28468
|
-
|
|
28469
|
+
D_.value && (n.cite = D_.value), u.value && (n.command = u.value.id), O_.value.length && (n.resources = O_.value), await X_(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
28469
28470
|
} catch (e) {
|
|
28470
28471
|
console.error("Failed to send message:", e), a("error", e);
|
|
28471
28472
|
}
|
|
28472
|
-
},
|
|
28473
|
-
|
|
28474
|
-
},
|
|
28475
|
-
|
|
28473
|
+
}, nv = async () => {
|
|
28474
|
+
cv();
|
|
28475
|
+
}, rv = (e, n) => {
|
|
28476
|
+
iv(e, n), a("shortcut-click", {
|
|
28476
28477
|
shortcut: e,
|
|
28477
28478
|
source: "main"
|
|
28478
28479
|
});
|
|
28479
|
-
},
|
|
28480
|
+
}, iv = (e, n) => {
|
|
28480
28481
|
let r = e, i;
|
|
28481
28482
|
if (i = r.enable_fill_back && r.fill_back_component_key ? r.fill_back_component_key : r.components?.find((e) => e.fillBack)?.key, i && n) {
|
|
28482
28483
|
let e = r.components?.map((e) => e.key === i ? {
|
|
@@ -28498,9 +28499,9 @@ var UIStateManager = class {
|
|
|
28498
28499
|
...r,
|
|
28499
28500
|
formModel: { ...r.formModel }
|
|
28500
28501
|
};
|
|
28501
|
-
},
|
|
28502
|
+
}, av = () => {
|
|
28502
28503
|
u.value = null;
|
|
28503
|
-
},
|
|
28504
|
+
}, ov = (e, n) => {
|
|
28504
28505
|
let r = e.components || [];
|
|
28505
28506
|
return { extra: {
|
|
28506
28507
|
cite: {
|
|
@@ -28520,42 +28521,42 @@ var UIStateManager = class {
|
|
|
28520
28521
|
__value: n[e.key]
|
|
28521
28522
|
}))
|
|
28522
28523
|
} };
|
|
28523
|
-
},
|
|
28524
|
+
}, sv = async (e) => {
|
|
28524
28525
|
if (!u.value) {
|
|
28525
28526
|
console.error("[ChatBot] No selected shortcut");
|
|
28526
28527
|
return;
|
|
28527
28528
|
}
|
|
28528
|
-
let n =
|
|
28529
|
-
|
|
28529
|
+
let n = ov(u.value, e), r = u.value.name, i = u.value;
|
|
28530
|
+
av();
|
|
28530
28531
|
try {
|
|
28531
|
-
await
|
|
28532
|
+
await X_(r, { property: n });
|
|
28532
28533
|
} catch (e) {
|
|
28533
28534
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
28534
28535
|
}
|
|
28535
|
-
},
|
|
28536
|
-
if (!
|
|
28536
|
+
}, cv = () => {
|
|
28537
|
+
if (!C_) {
|
|
28537
28538
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
28538
28539
|
return;
|
|
28539
28540
|
}
|
|
28540
|
-
|
|
28541
|
-
},
|
|
28542
|
-
if (!
|
|
28541
|
+
C_.stopGeneration(), a("stop");
|
|
28542
|
+
}, lv = async (e) => {
|
|
28543
|
+
if (!S_) {
|
|
28543
28544
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
28544
28545
|
return;
|
|
28545
28546
|
}
|
|
28546
28547
|
try {
|
|
28547
|
-
await
|
|
28548
|
+
await S_.switchSession(e), a("session-switched", S_.currentSession.value);
|
|
28548
28549
|
} catch (e) {
|
|
28549
28550
|
console.error("Failed to switch session:", e), a("error", e);
|
|
28550
28551
|
}
|
|
28551
|
-
},
|
|
28552
|
-
|
|
28553
|
-
},
|
|
28552
|
+
}, uv = (e) => {
|
|
28553
|
+
D_.value = e;
|
|
28554
|
+
}, dv = () => {
|
|
28554
28555
|
l.value?.focus?.();
|
|
28555
28556
|
};
|
|
28556
28557
|
return onMounted(async () => {
|
|
28557
28558
|
if (!(!z || I.value)) try {
|
|
28558
|
-
if (
|
|
28559
|
+
if (y_) {
|
|
28559
28560
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
28560
28561
|
else if (z.session.list.value.length > 0) {
|
|
28561
28562
|
let e = z.session.list.value[0];
|
|
@@ -28568,46 +28569,46 @@ var UIStateManager = class {
|
|
|
28568
28569
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
28569
28570
|
}
|
|
28570
28571
|
}), onBeforeUnmount(() => {
|
|
28571
|
-
|
|
28572
|
+
y_ && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
28572
28573
|
}), n({
|
|
28573
|
-
sendMessage: (e) =>
|
|
28574
|
-
stopGeneration:
|
|
28575
|
-
switchSession:
|
|
28576
|
-
messages:
|
|
28577
|
-
currentSession:
|
|
28578
|
-
isGenerating:
|
|
28574
|
+
sendMessage: (e) => tv(e, [[]]),
|
|
28575
|
+
stopGeneration: cv,
|
|
28576
|
+
switchSession: lv,
|
|
28577
|
+
messages: A_,
|
|
28578
|
+
currentSession: N_,
|
|
28579
|
+
isGenerating: M_,
|
|
28579
28580
|
getChatHelper: () => z,
|
|
28580
|
-
setCiteText:
|
|
28581
|
-
focusInput:
|
|
28581
|
+
setCiteText: uv,
|
|
28582
|
+
focusInput: dv,
|
|
28582
28583
|
selectShortcut: (e, n) => {
|
|
28583
|
-
|
|
28584
|
+
iv(e, n);
|
|
28584
28585
|
}
|
|
28585
28586
|
}), (n, r) => (openBlock(), createElementBlock("div", {
|
|
28586
28587
|
class: normalizeClass([
|
|
28587
28588
|
"ai-chatbot",
|
|
28588
28589
|
i.extCls,
|
|
28589
|
-
{ "welcome-state":
|
|
28590
|
+
{ "welcome-state": P_.value }
|
|
28590
28591
|
]),
|
|
28591
|
-
style: normalizeStyle(
|
|
28592
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) :
|
|
28592
|
+
style: normalizeStyle(V_.value)
|
|
28593
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : y_ && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
28593
28594
|
mode: "spin",
|
|
28594
28595
|
size: "small",
|
|
28595
28596
|
theme: "primary"
|
|
28596
28597
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
28597
28598
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
28598
|
-
|
|
28599
|
+
P_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [
|
|
28599
28600
|
r[2] ||= createElementVNode("img", {
|
|
28600
28601
|
alt: "ai-blueking",
|
|
28601
28602
|
class: "welcome-banner",
|
|
28602
28603
|
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
28604
|
}, null, -1),
|
|
28604
28605
|
r[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
|
|
28605
|
-
|
|
28606
|
+
F_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: F_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
|
|
28606
28607
|
])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28607
28608
|
ref_key: "messagesContainerRef",
|
|
28608
28609
|
ref: s,
|
|
28609
28610
|
class: "chatbot-messages"
|
|
28610
|
-
}, [
|
|
28611
|
+
}, [j_.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28611
28612
|
mode: "spin",
|
|
28612
28613
|
size: "small",
|
|
28613
28614
|
theme: "primary"
|
|
@@ -28615,17 +28616,17 @@ var UIStateManager = class {
|
|
|
28615
28616
|
key: 1,
|
|
28616
28617
|
"selected-messages": T.value,
|
|
28617
28618
|
"onUpdate:selectedMessages": r[0] ||= (e) => T.value = e,
|
|
28618
|
-
"enable-selection":
|
|
28619
|
+
"enable-selection": b_.value,
|
|
28619
28620
|
"message-status": B.value,
|
|
28620
28621
|
"message-tools-status": H.value,
|
|
28621
28622
|
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28622
|
-
messages:
|
|
28623
|
-
"on-agent-action":
|
|
28623
|
+
messages: A_.value,
|
|
28624
|
+
"on-agent-action": i_,
|
|
28624
28625
|
"on-agent-feedback": J,
|
|
28625
|
-
"on-user-action":
|
|
28626
|
-
"on-user-input-confirm":
|
|
28627
|
-
"on-user-shortcut-confirm":
|
|
28628
|
-
onStopStreaming:
|
|
28626
|
+
"on-user-action": c_,
|
|
28627
|
+
"on-user-input-confirm": l_,
|
|
28628
|
+
"on-user-shortcut-confirm": d_,
|
|
28629
|
+
onStopStreaming: __
|
|
28629
28630
|
}, null, 8, [
|
|
28630
28631
|
"selected-messages",
|
|
28631
28632
|
"enable-selection",
|
|
@@ -28635,41 +28636,41 @@ var UIStateManager = class {
|
|
|
28635
28636
|
"messages"
|
|
28636
28637
|
]))], 512)], 2112)),
|
|
28637
28638
|
createCommentVNode(" 统一底部区域 "),
|
|
28638
|
-
!
|
|
28639
|
+
!P_.value && b_.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28639
28640
|
key: 2,
|
|
28640
|
-
"is-all-selected": T.value.length ===
|
|
28641
|
-
loading:
|
|
28641
|
+
"is-all-selected": T.value.length === A_.value.length,
|
|
28642
|
+
loading: x_.value,
|
|
28642
28643
|
"selected-count": T.value.length,
|
|
28643
|
-
onCancel:
|
|
28644
|
-
onConfirm:
|
|
28645
|
-
onToggleAll:
|
|
28644
|
+
onCancel: U_,
|
|
28645
|
+
onConfirm: W_,
|
|
28646
|
+
onToggleAll: K_
|
|
28646
28647
|
}, null, 8, [
|
|
28647
28648
|
"is-all-selected",
|
|
28648
28649
|
"loading",
|
|
28649
28650
|
"selected-count"
|
|
28650
28651
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28651
|
-
onClose:
|
|
28652
|
-
onSubmit:
|
|
28652
|
+
onClose: av,
|
|
28653
|
+
onSubmit: sv
|
|
28653
28654
|
}), null, 16)) : renderSlot(n.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28654
28655
|
ref_key: "chatInputRef",
|
|
28655
28656
|
ref: l,
|
|
28656
|
-
cite:
|
|
28657
|
-
"onUpdate:cite": r[1] ||= (e) =>
|
|
28657
|
+
cite: D_.value,
|
|
28658
|
+
"onUpdate:cite": r[1] ||= (e) => D_.value = e,
|
|
28658
28659
|
"message-status": B.value,
|
|
28659
|
-
"model-value":
|
|
28660
|
-
"on-send-message":
|
|
28661
|
-
"on-stop-sending":
|
|
28662
|
-
"on-upload":
|
|
28660
|
+
"model-value": E_.value,
|
|
28661
|
+
"on-send-message": tv,
|
|
28662
|
+
"on-stop-sending": nv,
|
|
28663
|
+
"on-upload": Q_,
|
|
28663
28664
|
placeholder: i.placeholder,
|
|
28664
|
-
prompts:
|
|
28665
|
-
resources:
|
|
28665
|
+
prompts: z_.value,
|
|
28666
|
+
resources: I_.value,
|
|
28666
28667
|
"shortcut-id": u.value?.id,
|
|
28667
|
-
shortcuts:
|
|
28668
|
-
"support-upload":
|
|
28668
|
+
shortcuts: H_.value,
|
|
28669
|
+
"support-upload": B_.value,
|
|
28669
28670
|
"tippy-options": e.messageToolsTippyOptions,
|
|
28670
|
-
onDeleteShortcut:
|
|
28671
|
-
onSelectShortcut:
|
|
28672
|
-
"onUpdate:modelValue":
|
|
28671
|
+
onDeleteShortcut: av,
|
|
28672
|
+
onSelectShortcut: rv,
|
|
28673
|
+
"onUpdate:modelValue": k_
|
|
28673
28674
|
}, null, 8, [
|
|
28674
28675
|
"cite",
|
|
28675
28676
|
"message-status",
|
|
@@ -29501,7 +29502,7 @@ function useDraggable(e = {}, n) {
|
|
|
29501
29502
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
29502
29503
|
}, H = (e, r, i, a) => {
|
|
29503
29504
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
29504
|
-
},
|
|
29505
|
+
}, i_ = () => {
|
|
29505
29506
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
29506
29507
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
29507
29508
|
else {
|
|
@@ -29522,9 +29523,9 @@ function useDraggable(e = {}, n) {
|
|
|
29522
29523
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
29523
29524
|
};
|
|
29524
29525
|
return onMounted(() => {
|
|
29525
|
-
window.addEventListener("resize",
|
|
29526
|
+
window.addEventListener("resize", i_);
|
|
29526
29527
|
}), onBeforeUnmount(() => {
|
|
29527
|
-
window.removeEventListener("resize",
|
|
29528
|
+
window.removeEventListener("resize", i_);
|
|
29528
29529
|
}), {
|
|
29529
29530
|
minWidth: i,
|
|
29530
29531
|
minHeight: a,
|
|
@@ -29583,7 +29584,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29583
29584
|
"compression-change"
|
|
29584
29585
|
],
|
|
29585
29586
|
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:
|
|
29587
|
+
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: i_ } = useDraggable({
|
|
29587
29588
|
initWidth: i.defaultWidth,
|
|
29588
29589
|
minWidth: i.minWidth,
|
|
29589
29590
|
minHeight: i.minHeight,
|
|
@@ -29614,13 +29615,13 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29614
29615
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29615
29616
|
e.style.pointerEvents = "";
|
|
29616
29617
|
});
|
|
29617
|
-
},
|
|
29618
|
+
}, o_ = (e, n) => {
|
|
29618
29619
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29619
29620
|
}, Q = (e, n, r, i) => {
|
|
29620
29621
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29621
|
-
},
|
|
29622
|
+
}, s_ = (e, n) => {
|
|
29622
29623
|
I(e, n), o.value = !1, Z();
|
|
29623
|
-
},
|
|
29624
|
+
}, c_ = (e, n, r, i) => {
|
|
29624
29625
|
L(e, n, r, i), o.value = !1, Z();
|
|
29625
29626
|
};
|
|
29626
29627
|
return watch(O, (e) => {
|
|
@@ -29628,7 +29629,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29628
29629
|
}), n({
|
|
29629
29630
|
updatePosition: B,
|
|
29630
29631
|
updateSize: H,
|
|
29631
|
-
updatePositionAndSize:
|
|
29632
|
+
updatePositionAndSize: i_,
|
|
29632
29633
|
toggleCompression: z,
|
|
29633
29634
|
positionAndSize: K,
|
|
29634
29635
|
isCompressed: O
|
|
@@ -29650,9 +29651,9 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29650
29651
|
w: unref(T),
|
|
29651
29652
|
x: unref(_),
|
|
29652
29653
|
y: unref(g),
|
|
29653
|
-
onDragStop:
|
|
29654
|
-
onDragging:
|
|
29655
|
-
onResizeStop:
|
|
29654
|
+
onDragStop: s_,
|
|
29655
|
+
onDragging: o_,
|
|
29656
|
+
onResizeStop: c_,
|
|
29656
29657
|
onResizing: Q
|
|
29657
29658
|
}, {
|
|
29658
29659
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
@@ -29736,7 +29737,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29736
29737
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
29737
29738
|
theme: "ai-blueking",
|
|
29738
29739
|
delay: [0, 0]
|
|
29739
|
-
}),
|
|
29740
|
+
}), i_ = () => {
|
|
29740
29741
|
nextTick(() => {
|
|
29741
29742
|
G();
|
|
29742
29743
|
});
|
|
@@ -29750,9 +29751,9 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29750
29751
|
}), onMounted(() => {
|
|
29751
29752
|
nextTick(() => {
|
|
29752
29753
|
G();
|
|
29753
|
-
}), window.addEventListener("resize",
|
|
29754
|
+
}), window.addEventListener("resize", i_);
|
|
29754
29755
|
}), onBeforeUnmount(() => {
|
|
29755
|
-
window.removeEventListener("resize",
|
|
29756
|
+
window.removeEventListener("resize", i_);
|
|
29756
29757
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
29757
29758
|
active: !e.isPanelShow,
|
|
29758
29759
|
axis: "y",
|
|
@@ -29870,7 +29871,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29870
29871
|
}), T = _.panelVisible, E = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29871
29872
|
componentManager: _,
|
|
29872
29873
|
emit: a
|
|
29873
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: H, currentSession:
|
|
29874
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: z, agentName: H, currentSession: i_ } = useChatBootstrap({
|
|
29874
29875
|
url: u,
|
|
29875
29876
|
requestOptions: i.requestOptions,
|
|
29876
29877
|
autoInit: !0,
|
|
@@ -29896,12 +29897,12 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29896
29897
|
}), G = I, K = new SessionBusinessManager(G.session, G.agent, null, {
|
|
29897
29898
|
enableChatSession: i.enableChatSession,
|
|
29898
29899
|
initialSessionCode: i.initialSessionCode
|
|
29899
|
-
}), J = new ShareBusinessManager(G.message, G.session),
|
|
29900
|
+
}), J = new ShareBusinessManager(G.message, G.session), a_ = new UIStateManager(), Q = computed(() => a_.isSelectionMode.value), s_ = ref(!1), c_ = new ShortcutManager(null, i.shortcuts || []), l_ = ref(!1), d_ = ref(""), f_ = { appendTo: (e) => {
|
|
29900
29901
|
let n = e.closest(".draggable-container-content");
|
|
29901
29902
|
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" &&
|
|
29903
|
+
} }, p_ = computed(() => _.isCompressed.value), m_ = computed(() => H.value), h_ = ref(""), g_ = ref(!0), __ = ref(!1), y_ = computed(() => G.message.list.value.length === 0), b_ = computed(() => i.resources?.length ? i.resources : z.value?.resources ?? []), x_ = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), S_ = computed(() => {
|
|
29904
|
+
let e = c_.effectiveShortcuts.value;
|
|
29905
|
+
return typeof i.shortcutFilter == "function" && d_.value ? e.filter((e) => i.shortcutFilter?.(e, d_.value)) : e;
|
|
29905
29906
|
});
|
|
29906
29907
|
watch(() => L.value, async (e) => {
|
|
29907
29908
|
if (e && z.value) {
|
|
@@ -29912,33 +29913,39 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29912
29913
|
}).catch(() => {}), e.conversationSettings && (k("session-initialized", {
|
|
29913
29914
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29914
29915
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29915
|
-
}), e.conversationSettings.commands &&
|
|
29916
|
+
}), e.conversationSettings.commands && c_.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29916
29917
|
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29917
29918
|
} catch (e) {
|
|
29918
29919
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29919
29920
|
}
|
|
29920
29921
|
}
|
|
29921
29922
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29922
|
-
|
|
29923
|
-
}, { immediate: !0 }), watch(() =>
|
|
29924
|
-
e && (
|
|
29925
|
-
}, { immediate: !0 })
|
|
29926
|
-
|
|
29923
|
+
c_.setShortcuts(e || []);
|
|
29924
|
+
}, { immediate: !0 }), watch(() => i_.value, (e) => {
|
|
29925
|
+
e && (h_.value = e.sessionName || "", __.value = (e.sessionContentCount ?? 0) > 0);
|
|
29926
|
+
}, { immediate: !0 });
|
|
29927
|
+
let C_ = () => G.message.list.value.some((e) => {
|
|
29928
|
+
if (!("property" in e)) return !0;
|
|
29929
|
+
let { property: n } = e;
|
|
29930
|
+
return !n?.extra?.pause;
|
|
29931
|
+
});
|
|
29932
|
+
watch(() => G.message.list.value.length, () => {
|
|
29933
|
+
__.value = C_();
|
|
29927
29934
|
});
|
|
29928
|
-
let
|
|
29935
|
+
let T_ = async (e) => {
|
|
29929
29936
|
_.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29930
29937
|
}, E_ = async (e) => {
|
|
29931
|
-
await
|
|
29932
|
-
},
|
|
29938
|
+
await T_(e);
|
|
29939
|
+
}, O_ = () => {
|
|
29933
29940
|
_.hidePanel();
|
|
29934
29941
|
}, k_ = () => {
|
|
29935
|
-
|
|
29942
|
+
O_();
|
|
29936
29943
|
}, A_ = () => {
|
|
29937
29944
|
_.handleNimbusClick();
|
|
29938
29945
|
}, j_ = (e) => {
|
|
29939
|
-
|
|
29946
|
+
d_.value = e;
|
|
29940
29947
|
}, M_ = async (e, n) => {
|
|
29941
|
-
|
|
29948
|
+
l_.value = !1, await T_(), 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
29949
|
shortcut: e,
|
|
29943
29950
|
source: "popup"
|
|
29944
29951
|
});
|
|
@@ -29952,7 +29959,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29952
29959
|
_.handleDragStop(e);
|
|
29953
29960
|
}, L_ = (e) => {
|
|
29954
29961
|
_.handleResizeStop(e);
|
|
29955
|
-
},
|
|
29962
|
+
}, z_ = () => {
|
|
29956
29963
|
_.container.toggleCompression();
|
|
29957
29964
|
}, B_ = (e) => {
|
|
29958
29965
|
_.setCompressed(e);
|
|
@@ -29975,7 +29982,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29975
29982
|
try {
|
|
29976
29983
|
await G.session.renameSession(e);
|
|
29977
29984
|
let n = G.session.list.value.find((n) => n.sessionCode === e);
|
|
29978
|
-
n && (
|
|
29985
|
+
n && (h_.value = n.sessionName || "");
|
|
29979
29986
|
} catch (e) {
|
|
29980
29987
|
console.error("[AIBlueking] Failed to auto-generate session name:", e), lv(e);
|
|
29981
29988
|
}
|
|
@@ -29992,32 +29999,32 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
29992
29999
|
await G.session.updateSession({
|
|
29993
30000
|
...n,
|
|
29994
30001
|
sessionName: e
|
|
29995
|
-
}),
|
|
30002
|
+
}), h_.value = e;
|
|
29996
30003
|
} catch (e) {
|
|
29997
30004
|
console.error("[AIBlueking] Failed to rename session:", e), lv(e);
|
|
29998
30005
|
}
|
|
29999
30006
|
j.rename(e);
|
|
30000
30007
|
}, Y_ = () => {
|
|
30001
|
-
|
|
30008
|
+
a_.enableSelectionMode(), j.share();
|
|
30002
30009
|
}, X_ = () => {
|
|
30003
|
-
|
|
30010
|
+
a_.disableSelectionMode();
|
|
30004
30011
|
}, Z_ = async (e) => {
|
|
30005
|
-
|
|
30012
|
+
s_.value = !0;
|
|
30006
30013
|
try {
|
|
30007
30014
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
30008
30015
|
await copyToClipboard(n), Message({
|
|
30009
30016
|
message: t("分享链接已复制到剪贴板"),
|
|
30010
30017
|
theme: "success"
|
|
30011
|
-
}),
|
|
30018
|
+
}), a_.disableSelectionMode(), j.shareMessages(r);
|
|
30012
30019
|
} catch (e) {
|
|
30013
30020
|
console.error("[AIBlueking] Failed to share messages:", e), lv(e);
|
|
30014
30021
|
} finally {
|
|
30015
|
-
|
|
30022
|
+
s_.value = !1;
|
|
30016
30023
|
}
|
|
30017
30024
|
}, Q_ = async (e) => {
|
|
30018
30025
|
l.value && await l.value.sendMessage(e);
|
|
30019
30026
|
}, $_ = (e) => {
|
|
30020
|
-
|
|
30027
|
+
__.value = !0, j.sendMessage(e);
|
|
30021
30028
|
}, ev = () => {
|
|
30022
30029
|
j.receiveStart();
|
|
30023
30030
|
}, tv = () => {
|
|
@@ -30034,12 +30041,12 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30034
30041
|
l.value && await l.value.switchSession(e);
|
|
30035
30042
|
}, sv = async (e, n) => {
|
|
30036
30043
|
try {
|
|
30037
|
-
await K.updateSessionName(e, n),
|
|
30044
|
+
await K.updateSessionName(e, n), h_.value = n;
|
|
30038
30045
|
} catch (e) {
|
|
30039
30046
|
console.error("[AIBlueking] Failed to update session name:", e), lv(e);
|
|
30040
30047
|
}
|
|
30041
30048
|
}, cv = (e) => {
|
|
30042
|
-
e && (
|
|
30049
|
+
e && (h_.value = e.sessionName || "", __.value = (e.sessionContentCount ?? 0) > 0 || C_());
|
|
30043
30050
|
}, lv = (e) => {
|
|
30044
30051
|
console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
|
|
30045
30052
|
apiName: "chat",
|
|
@@ -30058,17 +30065,17 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30058
30065
|
}, mv = () => {
|
|
30059
30066
|
l.value && l.value.focusInput();
|
|
30060
30067
|
}, hv = (e) => {
|
|
30061
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ?
|
|
30068
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? O_() : T_());
|
|
30062
30069
|
};
|
|
30063
30070
|
return onMounted(async () => {
|
|
30064
30071
|
o.value && _.setContainerRef(o.value), window.addEventListener("keydown", hv);
|
|
30065
30072
|
}), onBeforeUnmount(() => {
|
|
30066
30073
|
window.removeEventListener("keydown", hv), _.destroy();
|
|
30067
30074
|
}), n({
|
|
30068
|
-
show:
|
|
30075
|
+
show: T_,
|
|
30069
30076
|
handleShow: E_,
|
|
30070
30077
|
handleClose: k_,
|
|
30071
|
-
hide:
|
|
30078
|
+
hide: O_,
|
|
30072
30079
|
sendMessage: Q_,
|
|
30073
30080
|
stopGeneration: iv,
|
|
30074
30081
|
addNewSession: av,
|
|
@@ -30100,20 +30107,20 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30100
30107
|
onResizeStop: L_,
|
|
30101
30108
|
onResizing: F_
|
|
30102
30109
|
}, {
|
|
30103
|
-
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": !
|
|
30110
|
+
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": !y_.value }]) }, [
|
|
30104
30111
|
createCommentVNode(" 独立的 Header 组件 "),
|
|
30105
30112
|
i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
|
|
30106
30113
|
key: 0,
|
|
30107
|
-
"agent-name":
|
|
30114
|
+
"agent-name": m_.value,
|
|
30108
30115
|
"chat-helper": unref(G),
|
|
30109
30116
|
draggable: i.draggable,
|
|
30110
30117
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
30111
30118
|
"enable-chat-session": i.enableChatSession,
|
|
30112
|
-
"has-permission":
|
|
30113
|
-
"has-session-contents":
|
|
30114
|
-
"is-compression-height":
|
|
30119
|
+
"has-permission": g_.value,
|
|
30120
|
+
"has-session-contents": __.value,
|
|
30121
|
+
"is-compression-height": p_.value,
|
|
30115
30122
|
"session-business-manager": unref(K),
|
|
30116
|
-
"session-name":
|
|
30123
|
+
"session-name": h_.value,
|
|
30117
30124
|
"show-compression-icon": i.showCompressionIcon,
|
|
30118
30125
|
"show-history-icon": i.showHistoryIcon,
|
|
30119
30126
|
"show-more-icon": i.showMoreIcon,
|
|
@@ -30129,7 +30136,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30129
30136
|
onNewChat: V_,
|
|
30130
30137
|
onRename: J_,
|
|
30131
30138
|
onShare: Y_,
|
|
30132
|
-
onToggleCompression:
|
|
30139
|
+
onToggleCompression: z_
|
|
30133
30140
|
}, null, 8, [
|
|
30134
30141
|
"agent-name",
|
|
30135
30142
|
"chat-helper",
|
|
@@ -30155,13 +30162,13 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30155
30162
|
"chat-helper": unref(G),
|
|
30156
30163
|
"enable-selection": Q.value,
|
|
30157
30164
|
"hello-text": i.helloText,
|
|
30158
|
-
"message-tools-tippy-options":
|
|
30165
|
+
"message-tools-tippy-options": f_,
|
|
30159
30166
|
placeholder: i.placeholder,
|
|
30160
|
-
prompts:
|
|
30167
|
+
prompts: x_.value,
|
|
30161
30168
|
"request-options": i.requestOptions,
|
|
30162
|
-
resources:
|
|
30169
|
+
resources: b_.value,
|
|
30163
30170
|
"session-code": i.initialSessionCode,
|
|
30164
|
-
"share-loading":
|
|
30171
|
+
"share-loading": s_.value,
|
|
30165
30172
|
shortcuts: i.shortcuts,
|
|
30166
30173
|
url: u.value,
|
|
30167
30174
|
onCancelShare: X_,
|
|
@@ -30220,11 +30227,11 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30220
30227
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
30221
30228
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
30222
30229
|
key: 1,
|
|
30223
|
-
visible:
|
|
30224
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
30230
|
+
visible: l_.value,
|
|
30231
|
+
"onUpdate:visible": n[6] ||= (e) => l_.value = e,
|
|
30225
30232
|
"exclude-selectors": [".draggable-container-wrapper"],
|
|
30226
30233
|
"max-shortcut-count": i.shortcutLimit,
|
|
30227
|
-
shortcuts:
|
|
30234
|
+
shortcuts: S_.value,
|
|
30228
30235
|
onSelectShortcut: M_,
|
|
30229
30236
|
onSelectionChange: j_
|
|
30230
30237
|
}, null, 8, [
|
|
@@ -30234,5 +30241,5 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
|
|
|
30234
30241
|
])) : createCommentVNode("v-if", !0)
|
|
30235
30242
|
], 2)], 8, ["to"]));
|
|
30236
30243
|
}
|
|
30237
|
-
}), [["__scopeId", "data-v-
|
|
30244
|
+
}), [["__scopeId", "data-v-f0ab0ff6"]]);
|
|
30238
30245
|
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 };
|