@blueking/ai-blueking 2.0.0-dev.19 → 2.0.0-dev.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/components/types.d.ts +4 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/vue2/index.es.min.js +536 -525
- package/dist/vue2/index.iife.min.js +6 -6
- package/dist/vue2/index.umd.min.js +26 -26
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +570 -559
- package/dist/vue3/index.iife.min.js +6 -6
- package/dist/vue3/index.umd.min.js +26 -26
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -729,17 +729,17 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
729
729
|
G(200);
|
|
730
730
|
}, q = () => {
|
|
731
731
|
G(300);
|
|
732
|
-
},
|
|
732
|
+
}, Tg = (e) => {
|
|
733
733
|
i.value && l.value?.contains(e.target) || z();
|
|
734
734
|
}, Z = (e) => {
|
|
735
735
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
736
|
-
},
|
|
736
|
+
}, Eg = () => {
|
|
737
737
|
d.value?.show();
|
|
738
738
|
};
|
|
739
739
|
return onMounted(() => {
|
|
740
|
-
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown",
|
|
740
|
+
document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown", Tg), document.addEventListener("scroll", Z, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
741
741
|
}), onUnmounted(() => {
|
|
742
|
-
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown",
|
|
742
|
+
document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown", Tg), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
|
|
743
743
|
}), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
|
|
744
744
|
default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
|
|
745
745
|
key: 0,
|
|
@@ -782,7 +782,7 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
782
782
|
}, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("v-if", !0)]),
|
|
783
783
|
default: withCtx(() => [createVNode(shortcut_btn_default, {
|
|
784
784
|
style: { width: "28px" },
|
|
785
|
-
onClick:
|
|
785
|
+
onClick: Eg
|
|
786
786
|
}, {
|
|
787
787
|
default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
|
|
788
788
|
_: 1
|
|
@@ -4797,7 +4797,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4797
4797
|
return a;
|
|
4798
4798
|
}).map((e) => `(${e})`).join(n);
|
|
4799
4799
|
}
|
|
4800
|
-
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?",
|
|
4800
|
+
var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?", Tg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Eg = (e = {}) => {
|
|
4801
4801
|
let n = /^#![ ]*\//;
|
|
4802
4802
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4803
4803
|
scope: "meta",
|
|
@@ -4808,22 +4808,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4808
4808
|
e.index !== 0 && n.ignoreMatch();
|
|
4809
4809
|
}
|
|
4810
4810
|
}, e);
|
|
4811
|
-
},
|
|
4811
|
+
}, Dg = {
|
|
4812
4812
|
begin: "\\\\[\\s\\S]",
|
|
4813
4813
|
relevance: 0
|
|
4814
|
-
},
|
|
4814
|
+
}, Og = {
|
|
4815
4815
|
scope: "string",
|
|
4816
4816
|
begin: "'",
|
|
4817
4817
|
end: "'",
|
|
4818
4818
|
illegal: "\\n",
|
|
4819
|
-
contains: [
|
|
4819
|
+
contains: [Dg]
|
|
4820
4820
|
}, $ = {
|
|
4821
4821
|
scope: "string",
|
|
4822
4822
|
begin: "\"",
|
|
4823
4823
|
end: "\"",
|
|
4824
4824
|
illegal: "\\n",
|
|
4825
|
-
contains: [
|
|
4826
|
-
},
|
|
4825
|
+
contains: [Dg]
|
|
4826
|
+
}, kg = { 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/ }, Ag = function(e, n, r = {}) {
|
|
4827
4827
|
let i = o({
|
|
4828
4828
|
scope: "comment",
|
|
4829
4829
|
begin: e,
|
|
@@ -4839,50 +4839,50 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4839
4839
|
});
|
|
4840
4840
|
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,}/);
|
|
4841
4841
|
return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
|
|
4842
|
-
},
|
|
4842
|
+
}, jg = Ag("//", "$"), Mg = Ag("/\\*", "\\*/"), Ng = Ag("#", "$"), Pg = {
|
|
4843
4843
|
scope: "number",
|
|
4844
4844
|
begin: J,
|
|
4845
4845
|
relevance: 0
|
|
4846
|
-
},
|
|
4846
|
+
}, Fg = {
|
|
4847
4847
|
scope: "number",
|
|
4848
|
-
begin:
|
|
4848
|
+
begin: Tg,
|
|
4849
4849
|
relevance: 0
|
|
4850
|
-
},
|
|
4850
|
+
}, Ig = {
|
|
4851
4851
|
scope: "number",
|
|
4852
4852
|
begin: Z,
|
|
4853
4853
|
relevance: 0
|
|
4854
|
-
},
|
|
4854
|
+
}, Lg = {
|
|
4855
4855
|
scope: "regexp",
|
|
4856
4856
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4857
4857
|
end: /\/[gimuy]*/,
|
|
4858
|
-
contains: [
|
|
4858
|
+
contains: [Dg, {
|
|
4859
4859
|
begin: /\[/,
|
|
4860
4860
|
end: /\]/,
|
|
4861
4861
|
relevance: 0,
|
|
4862
|
-
contains: [
|
|
4862
|
+
contains: [Dg]
|
|
4863
4863
|
}]
|
|
4864
|
-
},
|
|
4864
|
+
}, Rg = {
|
|
4865
4865
|
scope: "title",
|
|
4866
4866
|
begin: K,
|
|
4867
4867
|
relevance: 0
|
|
4868
|
-
},
|
|
4868
|
+
}, zg = {
|
|
4869
4869
|
scope: "title",
|
|
4870
4870
|
begin: q,
|
|
4871
4871
|
relevance: 0
|
|
4872
|
-
},
|
|
4872
|
+
}, Bg = {
|
|
4873
4873
|
begin: "\\.\\s*" + q,
|
|
4874
4874
|
relevance: 0
|
|
4875
|
-
},
|
|
4875
|
+
}, Vg = /* @__PURE__ */ Object.freeze({
|
|
4876
4876
|
__proto__: null,
|
|
4877
|
-
APOS_STRING_MODE:
|
|
4878
|
-
BACKSLASH_ESCAPE:
|
|
4879
|
-
BINARY_NUMBER_MODE:
|
|
4877
|
+
APOS_STRING_MODE: Og,
|
|
4878
|
+
BACKSLASH_ESCAPE: Dg,
|
|
4879
|
+
BINARY_NUMBER_MODE: Ig,
|
|
4880
4880
|
BINARY_NUMBER_RE: Z,
|
|
4881
|
-
COMMENT:
|
|
4882
|
-
C_BLOCK_COMMENT_MODE:
|
|
4883
|
-
C_LINE_COMMENT_MODE:
|
|
4884
|
-
C_NUMBER_MODE:
|
|
4885
|
-
C_NUMBER_RE:
|
|
4881
|
+
COMMENT: Ag,
|
|
4882
|
+
C_BLOCK_COMMENT_MODE: Mg,
|
|
4883
|
+
C_LINE_COMMENT_MODE: jg,
|
|
4884
|
+
C_NUMBER_MODE: Fg,
|
|
4885
|
+
C_NUMBER_RE: Tg,
|
|
4886
4886
|
END_SAME_AS_BEGIN: function(e) {
|
|
4887
4887
|
return Object.assign(e, {
|
|
4888
4888
|
"on:begin": (e, n) => {
|
|
@@ -4893,43 +4893,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4893
4893
|
}
|
|
4894
4894
|
});
|
|
4895
4895
|
},
|
|
4896
|
-
HASH_COMMENT_MODE:
|
|
4896
|
+
HASH_COMMENT_MODE: Ng,
|
|
4897
4897
|
IDENT_RE: K,
|
|
4898
4898
|
MATCH_NOTHING_RE: G,
|
|
4899
|
-
METHOD_GUARD:
|
|
4900
|
-
NUMBER_MODE:
|
|
4899
|
+
METHOD_GUARD: Bg,
|
|
4900
|
+
NUMBER_MODE: Pg,
|
|
4901
4901
|
NUMBER_RE: J,
|
|
4902
|
-
PHRASAL_WORDS_MODE:
|
|
4902
|
+
PHRASAL_WORDS_MODE: kg,
|
|
4903
4903
|
QUOTE_STRING_MODE: $,
|
|
4904
|
-
REGEXP_MODE:
|
|
4904
|
+
REGEXP_MODE: Lg,
|
|
4905
4905
|
RE_STARTERS_RE: Q,
|
|
4906
|
-
SHEBANG:
|
|
4907
|
-
TITLE_MODE:
|
|
4906
|
+
SHEBANG: Eg,
|
|
4907
|
+
TITLE_MODE: Rg,
|
|
4908
4908
|
UNDERSCORE_IDENT_RE: q,
|
|
4909
|
-
UNDERSCORE_TITLE_MODE:
|
|
4909
|
+
UNDERSCORE_TITLE_MODE: zg
|
|
4910
4910
|
});
|
|
4911
|
-
function
|
|
4911
|
+
function Hg(e, n) {
|
|
4912
4912
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function Ug(e, n) {
|
|
4915
4915
|
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4918
|
-
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin =
|
|
4917
|
+
function Wg(e, n) {
|
|
4918
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Hg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function Gg(e, n) {
|
|
4921
4921
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4922
4922
|
}
|
|
4923
|
-
function
|
|
4923
|
+
function Kg(e, n) {
|
|
4924
4924
|
if (e.match) {
|
|
4925
4925
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
4926
4926
|
e.begin = e.match, delete e.match;
|
|
4927
4927
|
}
|
|
4928
4928
|
}
|
|
4929
|
-
function
|
|
4929
|
+
function qg(e, n) {
|
|
4930
4930
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4931
4931
|
}
|
|
4932
|
-
var
|
|
4932
|
+
var Jg = (e, n) => {
|
|
4933
4933
|
if (!e.beforeMatch) return;
|
|
4934
4934
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
4935
4935
|
let r = Object.assign({}, e);
|
|
@@ -4939,7 +4939,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4939
4939
|
relevance: 0,
|
|
4940
4940
|
contains: [Object.assign(r, { endsParent: !0 })]
|
|
4941
4941
|
}, e.relevance = 0, delete r.beforeMatch;
|
|
4942
|
-
},
|
|
4942
|
+
}, Yg = [
|
|
4943
4943
|
"of",
|
|
4944
4944
|
"and",
|
|
4945
4945
|
"for",
|
|
@@ -4951,58 +4951,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4951
4951
|
"parent",
|
|
4952
4952
|
"list",
|
|
4953
4953
|
"value"
|
|
4954
|
-
],
|
|
4955
|
-
function
|
|
4954
|
+
], Xg = "keyword";
|
|
4955
|
+
function Zg(e, n, r = Xg) {
|
|
4956
4956
|
let i = Object.create(null);
|
|
4957
4957
|
return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
|
|
4958
|
-
Object.assign(i,
|
|
4958
|
+
Object.assign(i, Zg(e[r], n, r));
|
|
4959
4959
|
}), i;
|
|
4960
4960
|
function a(e, r) {
|
|
4961
4961
|
n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
|
|
4962
4962
|
let r = n.split("|");
|
|
4963
|
-
i[r[0]] = [e,
|
|
4963
|
+
i[r[0]] = [e, Qg(r[0], r[1])];
|
|
4964
4964
|
});
|
|
4965
4965
|
}
|
|
4966
4966
|
}
|
|
4967
|
-
function
|
|
4968
|
-
return n ? Number(n) :
|
|
4967
|
+
function Qg(e, n) {
|
|
4968
|
+
return n ? Number(n) : $g(e) ? 0 : 1;
|
|
4969
4969
|
}
|
|
4970
|
-
function
|
|
4971
|
-
return
|
|
4970
|
+
function $g(e) {
|
|
4971
|
+
return Yg.includes(e.toLowerCase());
|
|
4972
4972
|
}
|
|
4973
|
-
var
|
|
4973
|
+
var e_ = {}, t_ = (e) => {
|
|
4974
4974
|
console.error(e);
|
|
4975
|
-
},
|
|
4975
|
+
}, n_ = (e, ...n) => {
|
|
4976
4976
|
console.log(`WARN: ${e}`, ...n);
|
|
4977
|
-
},
|
|
4978
|
-
|
|
4979
|
-
},
|
|
4980
|
-
function
|
|
4977
|
+
}, r_ = (e, n) => {
|
|
4978
|
+
e_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), e_[`${e}/${n}`] = !0);
|
|
4979
|
+
}, i_ = /* @__PURE__ */ Error();
|
|
4980
|
+
function a_(e, n, { key: r }) {
|
|
4981
4981
|
let i = 0, a = e[r], o = {}, s = {};
|
|
4982
4982
|
for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
|
|
4983
4983
|
e[r] = s, e[r]._emit = o, e[r]._multi = !0;
|
|
4984
4984
|
}
|
|
4985
|
-
function
|
|
4985
|
+
function o_(e) {
|
|
4986
4986
|
if (Array.isArray(e.begin)) {
|
|
4987
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw
|
|
4988
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw
|
|
4989
|
-
|
|
4987
|
+
if (e.skip || e.excludeBegin || e.returnBegin) throw t_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), i_;
|
|
4988
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw t_("beginScope must be object"), i_;
|
|
4989
|
+
a_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
function
|
|
4992
|
+
function s_(e) {
|
|
4993
4993
|
if (Array.isArray(e.end)) {
|
|
4994
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw
|
|
4995
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw
|
|
4996
|
-
|
|
4994
|
+
if (e.skip || e.excludeEnd || e.returnEnd) throw t_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), i_;
|
|
4995
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw t_("endScope must be object"), i_;
|
|
4996
|
+
a_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
|
-
function
|
|
4999
|
+
function c_(e) {
|
|
5000
5000
|
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
5001
5001
|
}
|
|
5002
|
-
function
|
|
5003
|
-
|
|
5002
|
+
function l_(e) {
|
|
5003
|
+
c_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), o_(e), s_(e);
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function u_(e) {
|
|
5006
5006
|
function n(n, r) {
|
|
5007
5007
|
return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
|
|
5008
5008
|
}
|
|
@@ -5064,18 +5064,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5064
5064
|
let o = r;
|
|
5065
5065
|
if (r.isCompiled) return o;
|
|
5066
5066
|
[
|
|
5067
|
-
|
|
5068
|
-
qg,
|
|
5069
|
-
u_,
|
|
5070
|
-
Yg
|
|
5071
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
-
Gg,
|
|
5067
|
+
Ug,
|
|
5073
5068
|
Kg,
|
|
5069
|
+
l_,
|
|
5074
5070
|
Jg
|
|
5071
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
+
Wg,
|
|
5073
|
+
Gg,
|
|
5074
|
+
qg
|
|
5075
5075
|
].forEach((e) => e(r, i)), r.isCompiled = !0;
|
|
5076
5076
|
let l = null;
|
|
5077
|
-
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 &&=
|
|
5078
|
-
return
|
|
5077
|
+
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 &&= Zg(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) {
|
|
5078
|
+
return f_(e === "self" ? r : e);
|
|
5079
5079
|
})), r.contains.forEach(function(e) {
|
|
5080
5080
|
s(e, o);
|
|
5081
5081
|
}), r.starts && s(r.starts, i), o.matcher = a(o), o;
|
|
@@ -5083,19 +5083,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5083
5083
|
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.");
|
|
5084
5084
|
return e.classNameAliases = o(e.classNameAliases || {}), s(e);
|
|
5085
5085
|
}
|
|
5086
|
-
function
|
|
5087
|
-
return e ? e.endsWithParent ||
|
|
5086
|
+
function d_(e) {
|
|
5087
|
+
return e ? e.endsWithParent || d_(e.starts) : !1;
|
|
5088
5088
|
}
|
|
5089
|
-
function
|
|
5089
|
+
function f_(e) {
|
|
5090
5090
|
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
|
|
5091
5091
|
return o(e, { variants: null }, n);
|
|
5092
|
-
})), e.cachedVariants ? e.cachedVariants :
|
|
5092
|
+
})), e.cachedVariants ? e.cachedVariants : d_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5093
5093
|
}
|
|
5094
|
-
var
|
|
5094
|
+
var p_ = "11.11.1", m_ = class extends Error {
|
|
5095
5095
|
constructor(e, n) {
|
|
5096
5096
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5097
5097
|
}
|
|
5098
|
-
},
|
|
5098
|
+
}, h_ = a, g_ = o, __ = Symbol("nomatch"), v_ = 7, y_ = function(e) {
|
|
5099
5099
|
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 = {
|
|
5100
5100
|
disableAutodetect: !0,
|
|
5101
5101
|
name: "Plain text",
|
|
@@ -5118,21 +5118,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5118
5118
|
n += e.parentNode ? e.parentNode.className : "";
|
|
5119
5119
|
let r = d.languageDetectRe.exec(n);
|
|
5120
5120
|
if (r) {
|
|
5121
|
-
let n =
|
|
5122
|
-
return n || (
|
|
5121
|
+
let n = Og(r[1]);
|
|
5122
|
+
return n || (n_(l.replace("{}", r[1])), n_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
|
|
5123
5123
|
}
|
|
5124
|
-
return n.split(/\s+/).find((e) => m(e) ||
|
|
5124
|
+
return n.split(/\s+/).find((e) => m(e) || Og(e));
|
|
5125
5125
|
}
|
|
5126
5126
|
function v(e, n, r) {
|
|
5127
5127
|
let i = "", a = "";
|
|
5128
|
-
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (
|
|
5128
|
+
typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (r_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), r_("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);
|
|
5129
5129
|
let o = {
|
|
5130
5130
|
code: i,
|
|
5131
5131
|
language: a
|
|
5132
5132
|
};
|
|
5133
|
-
|
|
5133
|
+
Ng("before:highlight", o);
|
|
5134
5134
|
let s = o.result ? o.result : j(o.language, o.code, r);
|
|
5135
|
-
return s.code = o.code,
|
|
5135
|
+
return s.code = o.code, Ng("after:highlight", s), s;
|
|
5136
5136
|
}
|
|
5137
5137
|
function j(e, r, a, o) {
|
|
5138
5138
|
let u = Object.create(null);
|
|
@@ -5141,7 +5141,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5141
5141
|
}
|
|
5142
5142
|
function g() {
|
|
5143
5143
|
if (!Q.keywords) {
|
|
5144
|
-
|
|
5144
|
+
Dg.addText($);
|
|
5145
5145
|
return;
|
|
5146
5146
|
}
|
|
5147
5147
|
let e = 0;
|
|
@@ -5152,7 +5152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5152
5152
|
let i = J.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Q, i);
|
|
5153
5153
|
if (a) {
|
|
5154
5154
|
let [e, o] = a;
|
|
5155
|
-
if (
|
|
5155
|
+
if (Dg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= v_ && (kg += o), e.startsWith("_")) r += n[0];
|
|
5156
5156
|
else {
|
|
5157
5157
|
let r = J.classNameAliases[e] || e;
|
|
5158
5158
|
T(n[0], r);
|
|
@@ -5160,25 +5160,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5160
5160
|
} else r += n[0];
|
|
5161
5161
|
e = Q.keywordPatternRe.lastIndex, n = Q.keywordPatternRe.exec($);
|
|
5162
5162
|
}
|
|
5163
|
-
r += $.substring(e),
|
|
5163
|
+
r += $.substring(e), Dg.addText(r);
|
|
5164
5164
|
}
|
|
5165
5165
|
function _() {
|
|
5166
5166
|
if ($ === "") return;
|
|
5167
5167
|
let e = null;
|
|
5168
5168
|
if (typeof Q.subLanguage == "string") {
|
|
5169
5169
|
if (!n[Q.subLanguage]) {
|
|
5170
|
-
|
|
5170
|
+
Dg.addText($);
|
|
5171
5171
|
return;
|
|
5172
5172
|
}
|
|
5173
|
-
e = j(Q.subLanguage, $, !0,
|
|
5173
|
+
e = j(Q.subLanguage, $, !0, Eg[Q.subLanguage]), Eg[Q.subLanguage] = e._top;
|
|
5174
5174
|
} else e = B($, Q.subLanguage.length ? Q.subLanguage : null);
|
|
5175
|
-
Q.relevance > 0 && (
|
|
5175
|
+
Q.relevance > 0 && (kg += e.relevance), Dg.__addSublanguage(e._emitter, e.language);
|
|
5176
5176
|
}
|
|
5177
5177
|
function v() {
|
|
5178
5178
|
Q.subLanguage == null ? g() : _(), $ = "";
|
|
5179
5179
|
}
|
|
5180
5180
|
function T(e, n) {
|
|
5181
|
-
e !== "" && (
|
|
5181
|
+
e !== "" && (Dg.startScope(n), Dg.addText(e), Dg.endScope());
|
|
5182
5182
|
}
|
|
5183
5183
|
function E(e, n) {
|
|
5184
5184
|
let r = 1, i = n.length - 1;
|
|
@@ -5192,7 +5192,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5192
5192
|
}
|
|
5193
5193
|
}
|
|
5194
5194
|
function O(e, n) {
|
|
5195
|
-
return e.scope && typeof e.scope == "string" &&
|
|
5195
|
+
return e.scope && typeof e.scope == "string" && Dg.openNode(J.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, J.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Q = Object.create(e, { parent: { value: Q } }), Q;
|
|
5196
5196
|
}
|
|
5197
5197
|
function k(e, n, r) {
|
|
5198
5198
|
let a = z(e.endRe, r);
|
|
@@ -5209,7 +5209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5209
5209
|
if (e.endsWithParent) return k(e.parent, n, r);
|
|
5210
5210
|
}
|
|
5211
5211
|
function I(e) {
|
|
5212
|
-
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5212
|
+
return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Mg = !0, 0);
|
|
5213
5213
|
}
|
|
5214
5214
|
function L(e) {
|
|
5215
5215
|
let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
|
|
@@ -5218,18 +5218,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5218
5218
|
}
|
|
5219
5219
|
function H(e) {
|
|
5220
5220
|
let n = e[0], i = r.substring(e.index), a = k(Q, e, i);
|
|
5221
|
-
if (!a) return
|
|
5221
|
+
if (!a) return __;
|
|
5222
5222
|
let o = Q;
|
|
5223
5223
|
Q.endScope && Q.endScope._wrap ? (v(), T(n, Q.endScope._wrap)) : Q.endScope && Q.endScope._multi ? (v(), E(Q.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5224
5224
|
do
|
|
5225
|
-
Q.scope &&
|
|
5225
|
+
Q.scope && Dg.closeNode(), !Q.skip && !Q.subLanguage && (kg += Q.relevance), Q = Q.parent;
|
|
5226
5226
|
while (Q !== a.parent);
|
|
5227
5227
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5228
5228
|
}
|
|
5229
5229
|
function G() {
|
|
5230
5230
|
let e = [];
|
|
5231
5231
|
for (let n = Q; n !== J; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5232
|
-
e.forEach((e) =>
|
|
5232
|
+
e.forEach((e) => Dg.openNode(e));
|
|
5233
5233
|
}
|
|
5234
5234
|
let K = {};
|
|
5235
5235
|
function q(n, i) {
|
|
@@ -5248,59 +5248,59 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5248
5248
|
throw e.mode = Q, e;
|
|
5249
5249
|
} else if (i.type === "end") {
|
|
5250
5250
|
let e = H(i);
|
|
5251
|
-
if (e !==
|
|
5251
|
+
if (e !== __) return e;
|
|
5252
5252
|
}
|
|
5253
5253
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5254
|
-
if (
|
|
5254
|
+
if (jg > 1e5 && jg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5255
5255
|
return $ += o, o.length;
|
|
5256
5256
|
}
|
|
5257
|
-
let J =
|
|
5258
|
-
if (!J) throw
|
|
5259
|
-
let
|
|
5257
|
+
let J = Og(e);
|
|
5258
|
+
if (!J) throw t_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5259
|
+
let Tg = u_(J), Z = "", Q = o || Tg, Eg = {}, Dg = new d.__emitter(d);
|
|
5260
5260
|
G();
|
|
5261
|
-
let $ = "",
|
|
5261
|
+
let $ = "", kg = 0, Ag = 0, jg = 0, Mg = !1;
|
|
5262
5262
|
try {
|
|
5263
|
-
if (J.__emitTokens) J.__emitTokens(r,
|
|
5263
|
+
if (J.__emitTokens) J.__emitTokens(r, Dg);
|
|
5264
5264
|
else {
|
|
5265
5265
|
for (Q.matcher.considerAll();;) {
|
|
5266
|
-
|
|
5266
|
+
jg++, Mg ? Mg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = Ag;
|
|
5267
5267
|
let e = Q.matcher.exec(r);
|
|
5268
5268
|
if (!e) break;
|
|
5269
|
-
let n = q(r.substring(
|
|
5270
|
-
|
|
5269
|
+
let n = q(r.substring(Ag, e.index), e);
|
|
5270
|
+
Ag = e.index + n;
|
|
5271
5271
|
}
|
|
5272
|
-
q(r.substring(
|
|
5272
|
+
q(r.substring(Ag));
|
|
5273
5273
|
}
|
|
5274
|
-
return
|
|
5274
|
+
return Dg.finalize(), Z = Dg.toHTML(), {
|
|
5275
5275
|
language: e,
|
|
5276
5276
|
value: Z,
|
|
5277
|
-
relevance:
|
|
5277
|
+
relevance: kg,
|
|
5278
5278
|
illegal: !1,
|
|
5279
|
-
_emitter:
|
|
5279
|
+
_emitter: Dg,
|
|
5280
5280
|
_top: Q
|
|
5281
5281
|
};
|
|
5282
5282
|
} catch (n) {
|
|
5283
5283
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5284
5284
|
language: e,
|
|
5285
|
-
value:
|
|
5285
|
+
value: h_(r),
|
|
5286
5286
|
illegal: !0,
|
|
5287
5287
|
relevance: 0,
|
|
5288
5288
|
_illegalBy: {
|
|
5289
5289
|
message: n.message,
|
|
5290
|
-
index:
|
|
5291
|
-
context: r.slice(
|
|
5290
|
+
index: Ag,
|
|
5291
|
+
context: r.slice(Ag - 100, Ag + 100),
|
|
5292
5292
|
mode: n.mode,
|
|
5293
5293
|
resultSoFar: Z
|
|
5294
5294
|
},
|
|
5295
|
-
_emitter:
|
|
5295
|
+
_emitter: Dg
|
|
5296
5296
|
};
|
|
5297
5297
|
if (s) return {
|
|
5298
5298
|
language: e,
|
|
5299
|
-
value:
|
|
5299
|
+
value: h_(r),
|
|
5300
5300
|
illegal: !1,
|
|
5301
5301
|
relevance: 0,
|
|
5302
5302
|
errorRaised: n,
|
|
5303
|
-
_emitter:
|
|
5303
|
+
_emitter: Dg,
|
|
5304
5304
|
_top: Q
|
|
5305
5305
|
};
|
|
5306
5306
|
throw n;
|
|
@@ -5308,7 +5308,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5308
5308
|
}
|
|
5309
5309
|
function L(e) {
|
|
5310
5310
|
let n = {
|
|
5311
|
-
value:
|
|
5311
|
+
value: h_(e),
|
|
5312
5312
|
illegal: !1,
|
|
5313
5313
|
relevance: 0,
|
|
5314
5314
|
_top: u,
|
|
@@ -5318,13 +5318,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5318
5318
|
}
|
|
5319
5319
|
function B(e, r) {
|
|
5320
5320
|
r = r || d.languages || Object.keys(n);
|
|
5321
|
-
let i = L(e), a = r.filter(
|
|
5321
|
+
let i = L(e), a = r.filter(Og).filter(kg).map((n) => j(n, e, !1));
|
|
5322
5322
|
a.unshift(i);
|
|
5323
5323
|
let [o, s] = a.sort((e, n) => {
|
|
5324
5324
|
if (e.relevance !== n.relevance) return n.relevance - e.relevance;
|
|
5325
5325
|
if (e.language && n.language) {
|
|
5326
|
-
if (
|
|
5327
|
-
if (
|
|
5326
|
+
if (Og(e.language).supersetOf === n.language) return 1;
|
|
5327
|
+
if (Og(n.language).supersetOf === e.language) return -1;
|
|
5328
5328
|
}
|
|
5329
5329
|
return 0;
|
|
5330
5330
|
}), l = o;
|
|
@@ -5337,14 +5337,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5337
5337
|
function G(e) {
|
|
5338
5338
|
let n = null, r = g(e);
|
|
5339
5339
|
if (m(r)) return;
|
|
5340
|
-
if (
|
|
5340
|
+
if (Ng("before:highlightElement", {
|
|
5341
5341
|
el: e,
|
|
5342
5342
|
language: r
|
|
5343
5343
|
}), e.dataset.highlighted) {
|
|
5344
5344
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
5345
5345
|
return;
|
|
5346
5346
|
}
|
|
5347
|
-
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
|
|
5347
|
+
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 m_("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
5348
5348
|
n = e;
|
|
5349
5349
|
let i = n.textContent, a = r ? v(i, {
|
|
5350
5350
|
language: r,
|
|
@@ -5357,28 +5357,28 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5357
5357
|
}, a.secondBest && (e.secondBest = {
|
|
5358
5358
|
language: a.secondBest.language,
|
|
5359
5359
|
relevance: a.secondBest.relevance
|
|
5360
|
-
}),
|
|
5360
|
+
}), Ng("after:highlightElement", {
|
|
5361
5361
|
el: e,
|
|
5362
5362
|
result: a,
|
|
5363
5363
|
text: i
|
|
5364
5364
|
});
|
|
5365
5365
|
}
|
|
5366
5366
|
function K(e) {
|
|
5367
|
-
d =
|
|
5367
|
+
d = g_(d, e);
|
|
5368
5368
|
}
|
|
5369
5369
|
let q = () => {
|
|
5370
|
-
Z(),
|
|
5370
|
+
Z(), r_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5371
5371
|
};
|
|
5372
5372
|
function J() {
|
|
5373
|
-
Z(),
|
|
5373
|
+
Z(), r_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5374
5374
|
}
|
|
5375
|
-
let
|
|
5375
|
+
let Tg = !1;
|
|
5376
5376
|
function Z() {
|
|
5377
5377
|
function e() {
|
|
5378
5378
|
Z();
|
|
5379
5379
|
}
|
|
5380
5380
|
if (document.readyState === "loading") {
|
|
5381
|
-
|
|
5381
|
+
Tg || window.addEventListener("DOMContentLoaded", e, !1), Tg = !0;
|
|
5382
5382
|
return;
|
|
5383
5383
|
}
|
|
5384
5384
|
document.querySelectorAll(d.cssSelector).forEach(G);
|
|
@@ -5388,20 +5388,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5388
5388
|
try {
|
|
5389
5389
|
a = i(e);
|
|
5390
5390
|
} catch (e) {
|
|
5391
|
-
if (
|
|
5391
|
+
if (t_("Language definition for '{}' could not be registered.".replace("{}", r)), s) t_(e);
|
|
5392
5392
|
else throw e;
|
|
5393
5393
|
a = u;
|
|
5394
5394
|
}
|
|
5395
5395
|
a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
|
|
5396
5396
|
}
|
|
5397
|
-
function
|
|
5397
|
+
function Eg(e) {
|
|
5398
5398
|
delete n[e];
|
|
5399
5399
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5400
5400
|
}
|
|
5401
|
-
function
|
|
5401
|
+
function Dg() {
|
|
5402
5402
|
return Object.keys(n);
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function Og(e) {
|
|
5405
5405
|
return e = (e || "").toLowerCase(), n[e] || n[a[e]];
|
|
5406
5406
|
}
|
|
5407
5407
|
function $(e, { languageName: n }) {
|
|
@@ -5409,65 +5409,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5409
5409
|
a[e.toLowerCase()] = n;
|
|
5410
5410
|
});
|
|
5411
5411
|
}
|
|
5412
|
-
function
|
|
5413
|
-
let n =
|
|
5412
|
+
function kg(e) {
|
|
5413
|
+
let n = Og(e);
|
|
5414
5414
|
return n && !n.disableAutodetect;
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function Ag(e) {
|
|
5417
5417
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
|
|
5418
5418
|
e["before:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5419
5419
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
|
|
5420
5420
|
e["after:highlightBlock"](Object.assign({ block: n.el }, n));
|
|
5421
5421
|
});
|
|
5422
5422
|
}
|
|
5423
|
-
function
|
|
5424
|
-
|
|
5423
|
+
function jg(e) {
|
|
5424
|
+
Ag(e), o.push(e);
|
|
5425
5425
|
}
|
|
5426
|
-
function
|
|
5426
|
+
function Mg(e) {
|
|
5427
5427
|
let n = o.indexOf(e);
|
|
5428
5428
|
n !== -1 && o.splice(n, 1);
|
|
5429
5429
|
}
|
|
5430
|
-
function
|
|
5430
|
+
function Ng(e, n) {
|
|
5431
5431
|
let r = e;
|
|
5432
5432
|
o.forEach(function(e) {
|
|
5433
5433
|
e[r] && e[r](n);
|
|
5434
5434
|
});
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5437
|
-
return
|
|
5436
|
+
function Pg(e) {
|
|
5437
|
+
return r_("10.7.0", "highlightBlock will be removed entirely in v12.0"), r_("10.7.0", "Please use highlightElement now."), G(e);
|
|
5438
5438
|
}
|
|
5439
5439
|
for (let n in Object.assign(e, {
|
|
5440
5440
|
highlight: v,
|
|
5441
5441
|
highlightAuto: B,
|
|
5442
5442
|
highlightAll: Z,
|
|
5443
5443
|
highlightElement: G,
|
|
5444
|
-
highlightBlock:
|
|
5444
|
+
highlightBlock: Pg,
|
|
5445
5445
|
configure: K,
|
|
5446
5446
|
initHighlighting: q,
|
|
5447
5447
|
initHighlightingOnLoad: J,
|
|
5448
5448
|
registerLanguage: Q,
|
|
5449
|
-
unregisterLanguage:
|
|
5450
|
-
listLanguages:
|
|
5451
|
-
getLanguage:
|
|
5449
|
+
unregisterLanguage: Eg,
|
|
5450
|
+
listLanguages: Dg,
|
|
5451
|
+
getLanguage: Og,
|
|
5452
5452
|
registerAliases: $,
|
|
5453
|
-
autoDetection:
|
|
5454
|
-
inherit:
|
|
5455
|
-
addPlugin:
|
|
5456
|
-
removePlugin:
|
|
5453
|
+
autoDetection: kg,
|
|
5454
|
+
inherit: g_,
|
|
5455
|
+
addPlugin: jg,
|
|
5456
|
+
removePlugin: Mg
|
|
5457
5457
|
}), e.debugMode = function() {
|
|
5458
5458
|
s = !1;
|
|
5459
5459
|
}, e.safeMode = function() {
|
|
5460
5460
|
s = !0;
|
|
5461
|
-
}, e.versionString =
|
|
5461
|
+
}, e.versionString = p_, e.regex = {
|
|
5462
5462
|
concat: k,
|
|
5463
5463
|
lookahead: T,
|
|
5464
5464
|
either: I,
|
|
5465
5465
|
optional: O,
|
|
5466
5466
|
anyNumberOfTimes: E
|
|
5467
|
-
},
|
|
5468
|
-
return Object.assign(e,
|
|
5469
|
-
},
|
|
5470
|
-
|
|
5467
|
+
}, Vg) typeof Vg[n] == "object" && r(Vg[n]);
|
|
5468
|
+
return Object.assign(e, Vg), e;
|
|
5469
|
+
}, b_ = y_({});
|
|
5470
|
+
b_.newInstance = () => y_({}), n.exports = b_, b_.HighlightJS = b_, b_.default = b_;
|
|
5471
5471
|
})), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
5472
5472
|
function r(e) {
|
|
5473
5473
|
let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
|
|
@@ -11589,7 +11589,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11589
11589
|
begin: /"/,
|
|
11590
11590
|
end: /"/,
|
|
11591
11591
|
contains: [e.BACKSLASH_ESCAPE]
|
|
11592
|
-
},
|
|
11592
|
+
}, Tg = {
|
|
11593
11593
|
scope: "string",
|
|
11594
11594
|
begin: /@"/,
|
|
11595
11595
|
end: /"/,
|
|
@@ -11604,7 +11604,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11604
11604
|
begin: /\{/,
|
|
11605
11605
|
end: /\}/,
|
|
11606
11606
|
keywords: g
|
|
11607
|
-
},
|
|
11607
|
+
}, Eg = {
|
|
11608
11608
|
scope: "string",
|
|
11609
11609
|
begin: /\$"/,
|
|
11610
11610
|
end: /"/,
|
|
@@ -11614,7 +11614,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11614
11614
|
e.BACKSLASH_ESCAPE,
|
|
11615
11615
|
Q
|
|
11616
11616
|
]
|
|
11617
|
-
},
|
|
11617
|
+
}, Dg = {
|
|
11618
11618
|
scope: "string",
|
|
11619
11619
|
begin: /(\$@|@\$)"/,
|
|
11620
11620
|
end: /"/,
|
|
@@ -11625,7 +11625,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11625
11625
|
e.BACKSLASH_ESCAPE,
|
|
11626
11626
|
Q
|
|
11627
11627
|
]
|
|
11628
|
-
},
|
|
11628
|
+
}, Og = {
|
|
11629
11629
|
scope: "string",
|
|
11630
11630
|
begin: /\$"""/,
|
|
11631
11631
|
end: /"""/,
|
|
@@ -11640,9 +11640,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11640
11640
|
match: o(/'/, l(/[^\\']/, /\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/), /'/)
|
|
11641
11641
|
};
|
|
11642
11642
|
Q.contains = [
|
|
11643
|
-
Og,
|
|
11644
11643
|
Dg,
|
|
11645
11644
|
Eg,
|
|
11645
|
+
Tg,
|
|
11646
11646
|
J,
|
|
11647
11647
|
$,
|
|
11648
11648
|
i,
|
|
@@ -11655,12 +11655,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11655
11655
|
O,
|
|
11656
11656
|
j
|
|
11657
11657
|
];
|
|
11658
|
-
let
|
|
11659
|
-
kg,
|
|
11658
|
+
let kg = { variants: [
|
|
11660
11659
|
Og,
|
|
11661
11660
|
Dg,
|
|
11662
|
-
Z,
|
|
11663
11661
|
Eg,
|
|
11662
|
+
Z,
|
|
11663
|
+
Tg,
|
|
11664
11664
|
J,
|
|
11665
11665
|
$
|
|
11666
11666
|
] };
|
|
@@ -11672,7 +11672,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11672
11672
|
classNameAliases: { "computation-expression": "keyword" },
|
|
11673
11673
|
contains: [
|
|
11674
11674
|
i,
|
|
11675
|
-
|
|
11675
|
+
kg,
|
|
11676
11676
|
_,
|
|
11677
11677
|
T,
|
|
11678
11678
|
H,
|
|
@@ -11684,7 +11684,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11684
11684
|
contains: [
|
|
11685
11685
|
T,
|
|
11686
11686
|
Z,
|
|
11687
|
-
|
|
11687
|
+
Tg,
|
|
11688
11688
|
J,
|
|
11689
11689
|
$,
|
|
11690
11690
|
q
|
|
@@ -13866,7 +13866,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13866
13866
|
keywords: E,
|
|
13867
13867
|
contains: ["self"].concat(q)
|
|
13868
13868
|
});
|
|
13869
|
-
let J = [].concat(K, L.contains),
|
|
13869
|
+
let J = [].concat(K, L.contains), Tg = J.concat([{
|
|
13870
13870
|
begin: /(\s*)\(/,
|
|
13871
13871
|
end: /\)/,
|
|
13872
13872
|
keywords: E,
|
|
@@ -13878,7 +13878,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13878
13878
|
excludeBegin: !0,
|
|
13879
13879
|
excludeEnd: !0,
|
|
13880
13880
|
keywords: E,
|
|
13881
|
-
contains:
|
|
13881
|
+
contains: Tg
|
|
13882
13882
|
}, Q = { variants: [{
|
|
13883
13883
|
match: [
|
|
13884
13884
|
/class/,
|
|
@@ -13905,17 +13905,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13905
13905
|
1: "keyword",
|
|
13906
13906
|
3: "title.class"
|
|
13907
13907
|
}
|
|
13908
|
-
}] },
|
|
13908
|
+
}] }, Eg = {
|
|
13909
13909
|
relevance: 0,
|
|
13910
13910
|
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]*)*/),
|
|
13911
13911
|
className: "title.class",
|
|
13912
13912
|
keywords: { _: [...o, ...s] }
|
|
13913
|
-
},
|
|
13913
|
+
}, Dg = {
|
|
13914
13914
|
label: "use_strict",
|
|
13915
13915
|
className: "meta",
|
|
13916
13916
|
relevance: 10,
|
|
13917
13917
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13918
|
-
},
|
|
13918
|
+
}, Og = {
|
|
13919
13919
|
variants: [{ match: [
|
|
13920
13920
|
/function/,
|
|
13921
13921
|
/\s+/,
|
|
@@ -13934,25 +13934,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13934
13934
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13935
13935
|
className: "variable.constant"
|
|
13936
13936
|
};
|
|
13937
|
-
function
|
|
13937
|
+
function kg(e) {
|
|
13938
13938
|
return n.concat("(?!", e.join("|"), ")");
|
|
13939
13939
|
}
|
|
13940
|
-
let
|
|
13941
|
-
match: n.concat(/\b/,
|
|
13940
|
+
let Ag = {
|
|
13941
|
+
match: n.concat(/\b/, kg([
|
|
13942
13942
|
...l,
|
|
13943
13943
|
"super",
|
|
13944
13944
|
"import"
|
|
13945
13945
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
13946
13946
|
className: "title.function",
|
|
13947
13947
|
relevance: 0
|
|
13948
|
-
},
|
|
13948
|
+
}, jg = {
|
|
13949
13949
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
13950
13950
|
end: g,
|
|
13951
13951
|
excludeBegin: !0,
|
|
13952
13952
|
keywords: "prototype",
|
|
13953
13953
|
className: "property",
|
|
13954
13954
|
relevance: 0
|
|
13955
|
-
},
|
|
13955
|
+
}, Mg = {
|
|
13956
13956
|
match: [
|
|
13957
13957
|
/get|set/,
|
|
13958
13958
|
/\s+/,
|
|
@@ -13964,7 +13964,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13964
13964
|
3: "title.function"
|
|
13965
13965
|
},
|
|
13966
13966
|
contains: [{ begin: /\(\)/ }, Z]
|
|
13967
|
-
},
|
|
13967
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
13968
13968
|
match: [
|
|
13969
13969
|
/const|var|let/,
|
|
13970
13970
|
/\s+/,
|
|
@@ -13972,7 +13972,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13972
13972
|
/\s*/,
|
|
13973
13973
|
/=\s*/,
|
|
13974
13974
|
/(async\s*)?/,
|
|
13975
|
-
n.lookahead(
|
|
13975
|
+
n.lookahead(Ng)
|
|
13976
13976
|
],
|
|
13977
13977
|
keywords: "async",
|
|
13978
13978
|
className: {
|
|
@@ -13991,8 +13991,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13991
13991
|
],
|
|
13992
13992
|
keywords: E,
|
|
13993
13993
|
exports: {
|
|
13994
|
-
PARAMS_CONTAINS:
|
|
13995
|
-
CLASS_REFERENCE:
|
|
13994
|
+
PARAMS_CONTAINS: Tg,
|
|
13995
|
+
CLASS_REFERENCE: Eg
|
|
13996
13996
|
},
|
|
13997
13997
|
illegal: /#(?![$_A-z])/,
|
|
13998
13998
|
contains: [
|
|
@@ -14001,7 +14001,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14001
14001
|
binary: "node",
|
|
14002
14002
|
relevance: 5
|
|
14003
14003
|
}),
|
|
14004
|
-
|
|
14004
|
+
Dg,
|
|
14005
14005
|
e.APOS_STRING_MODE,
|
|
14006
14006
|
e.QUOTE_STRING_MODE,
|
|
14007
14007
|
z,
|
|
@@ -14011,13 +14011,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14011
14011
|
K,
|
|
14012
14012
|
{ match: /\$\d+/ },
|
|
14013
14013
|
I,
|
|
14014
|
-
|
|
14014
|
+
Eg,
|
|
14015
14015
|
{
|
|
14016
14016
|
scope: "attr",
|
|
14017
14017
|
match: g + n.lookahead(":"),
|
|
14018
14018
|
relevance: 0
|
|
14019
14019
|
},
|
|
14020
|
-
|
|
14020
|
+
Pg,
|
|
14021
14021
|
{
|
|
14022
14022
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
14023
14023
|
keywords: "return throw case",
|
|
@@ -14027,7 +14027,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14027
14027
|
e.REGEXP_MODE,
|
|
14028
14028
|
{
|
|
14029
14029
|
className: "function",
|
|
14030
|
-
begin:
|
|
14030
|
+
begin: Ng,
|
|
14031
14031
|
returnBegin: !0,
|
|
14032
14032
|
end: "\\s*=>",
|
|
14033
14033
|
contains: [{
|
|
@@ -14048,7 +14048,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14048
14048
|
excludeBegin: !0,
|
|
14049
14049
|
excludeEnd: !0,
|
|
14050
14050
|
keywords: E,
|
|
14051
|
-
contains:
|
|
14051
|
+
contains: Tg
|
|
14052
14052
|
}
|
|
14053
14053
|
]
|
|
14054
14054
|
}]
|
|
@@ -14084,7 +14084,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14084
14084
|
}
|
|
14085
14085
|
]
|
|
14086
14086
|
},
|
|
14087
|
-
|
|
14087
|
+
Og,
|
|
14088
14088
|
{ beginKeywords: "while if switch catch for" },
|
|
14089
14089
|
{
|
|
14090
14090
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -14099,7 +14099,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14099
14099
|
match: /\.\.\./,
|
|
14100
14100
|
relevance: 0
|
|
14101
14101
|
},
|
|
14102
|
-
|
|
14102
|
+
jg,
|
|
14103
14103
|
{
|
|
14104
14104
|
match: "\\$" + g,
|
|
14105
14105
|
relevance: 0
|
|
@@ -14109,10 +14109,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14109
14109
|
className: { 1: "title.function" },
|
|
14110
14110
|
contains: [Z]
|
|
14111
14111
|
},
|
|
14112
|
-
|
|
14112
|
+
Ag,
|
|
14113
14113
|
$,
|
|
14114
14114
|
Q,
|
|
14115
|
-
|
|
14115
|
+
Mg,
|
|
14116
14116
|
{ match: /\$[(.]/ }
|
|
14117
14117
|
]
|
|
14118
14118
|
};
|
|
@@ -17634,7 +17634,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17634
17634
|
T,
|
|
17635
17635
|
E,
|
|
17636
17636
|
z
|
|
17637
|
-
],
|
|
17637
|
+
], Tg = {
|
|
17638
17638
|
begin: n.concat(/#\[\s*\\?/, n.either(a, o)),
|
|
17639
17639
|
beginScope: "meta",
|
|
17640
17640
|
end: /]/,
|
|
@@ -17664,7 +17664,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17664
17664
|
case_insensitive: !1,
|
|
17665
17665
|
keywords: I,
|
|
17666
17666
|
contains: [
|
|
17667
|
-
|
|
17667
|
+
Tg,
|
|
17668
17668
|
e.HASH_COMMENT_MODE,
|
|
17669
17669
|
e.COMMENT("//", "$"),
|
|
17670
17670
|
e.COMMENT("/\\*", "\\*/", { contains: [{
|
|
@@ -17727,7 +17727,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17727
17727
|
keywords: I,
|
|
17728
17728
|
contains: [
|
|
17729
17729
|
"self",
|
|
17730
|
-
|
|
17730
|
+
Tg,
|
|
17731
17731
|
s,
|
|
17732
17732
|
H,
|
|
17733
17733
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -21076,7 +21076,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21076
21076
|
$pattern: s(/\b\w+/, /#\w+/),
|
|
21077
21077
|
keyword: K.concat(T),
|
|
21078
21078
|
literal: _
|
|
21079
|
-
},
|
|
21079
|
+
}, Tg = [
|
|
21080
21080
|
O,
|
|
21081
21081
|
I,
|
|
21082
21082
|
q
|
|
@@ -21089,84 +21089,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21089
21089
|
}], Q = {
|
|
21090
21090
|
match: /->/,
|
|
21091
21091
|
relevance: 0
|
|
21092
|
-
},
|
|
21092
|
+
}, Eg = [Q, {
|
|
21093
21093
|
className: "operator",
|
|
21094
21094
|
relevance: 0,
|
|
21095
21095
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21096
|
-
}],
|
|
21096
|
+
}], Dg = "([0-9]_*)+", Og = "([0-9a-fA-F]_*)+", $ = {
|
|
21097
21097
|
className: "number",
|
|
21098
21098
|
relevance: 0,
|
|
21099
21099
|
variants: [
|
|
21100
|
-
{ match: `\\b(${
|
|
21101
|
-
{ match: `\\b0x(${
|
|
21100
|
+
{ match: `\\b(${Dg})(\\.(${Dg}))?([eE][+-]?(${Dg}))?\\b` },
|
|
21101
|
+
{ match: `\\b0x(${Og})(\\.(${Og}))?([pP][+-]?(${Dg}))?\\b` },
|
|
21102
21102
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21103
21103
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21104
21104
|
]
|
|
21105
|
-
},
|
|
21105
|
+
}, kg = (e = "") => ({
|
|
21106
21106
|
className: "subst",
|
|
21107
21107
|
variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
21108
|
-
}),
|
|
21108
|
+
}), Ag = (e = "") => ({
|
|
21109
21109
|
className: "subst",
|
|
21110
21110
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21111
|
-
}),
|
|
21111
|
+
}), jg = (e = "") => ({
|
|
21112
21112
|
className: "subst",
|
|
21113
21113
|
label: "interpol",
|
|
21114
21114
|
begin: a(/\\/, e, /\(/),
|
|
21115
21115
|
end: /\)/
|
|
21116
|
-
}),
|
|
21116
|
+
}), Mg = (e = "") => ({
|
|
21117
21117
|
begin: a(e, /"""/),
|
|
21118
21118
|
end: a(/"""/, e),
|
|
21119
21119
|
contains: [
|
|
21120
|
+
kg(e),
|
|
21120
21121
|
Ag(e),
|
|
21121
|
-
jg(e)
|
|
21122
|
-
Mg(e)
|
|
21122
|
+
jg(e)
|
|
21123
21123
|
]
|
|
21124
|
-
}),
|
|
21124
|
+
}), Ng = (e = "") => ({
|
|
21125
21125
|
begin: a(e, /"/),
|
|
21126
21126
|
end: a(/"/, e),
|
|
21127
|
-
contains: [
|
|
21128
|
-
}),
|
|
21127
|
+
contains: [kg(e), jg(e)]
|
|
21128
|
+
}), Pg = {
|
|
21129
21129
|
className: "string",
|
|
21130
21130
|
variants: [
|
|
21131
|
+
Mg(),
|
|
21132
|
+
Mg("#"),
|
|
21133
|
+
Mg("##"),
|
|
21134
|
+
Mg("###"),
|
|
21131
21135
|
Ng(),
|
|
21132
21136
|
Ng("#"),
|
|
21133
21137
|
Ng("##"),
|
|
21134
|
-
Ng("###")
|
|
21135
|
-
Pg(),
|
|
21136
|
-
Pg("#"),
|
|
21137
|
-
Pg("##"),
|
|
21138
|
-
Pg("###")
|
|
21138
|
+
Ng("###")
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, Fg = [e.BACKSLASH_ESCAPE, {
|
|
21141
21141
|
begin: /\[/,
|
|
21142
21142
|
end: /\]/,
|
|
21143
21143
|
relevance: 0,
|
|
21144
21144
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21145
|
-
}],
|
|
21145
|
+
}], Ig = {
|
|
21146
21146
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21147
21147
|
end: /\//,
|
|
21148
|
-
contains:
|
|
21149
|
-
},
|
|
21148
|
+
contains: Fg
|
|
21149
|
+
}, Lg = (e) => {
|
|
21150
21150
|
let n = a(e, /\//), r = a(/\//, e);
|
|
21151
21151
|
return {
|
|
21152
21152
|
begin: n,
|
|
21153
21153
|
end: r,
|
|
21154
|
-
contains: [...
|
|
21154
|
+
contains: [...Fg, {
|
|
21155
21155
|
scope: "comment",
|
|
21156
21156
|
begin: `#(?!.*${r})`,
|
|
21157
21157
|
end: /$/
|
|
21158
21158
|
}]
|
|
21159
21159
|
};
|
|
21160
|
-
},
|
|
21160
|
+
}, Rg = {
|
|
21161
21161
|
scope: "regexp",
|
|
21162
21162
|
variants: [
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21163
|
+
Lg("###"),
|
|
21164
|
+
Lg("##"),
|
|
21165
|
+
Lg("#"),
|
|
21166
|
+
Ig
|
|
21167
21167
|
]
|
|
21168
|
-
},
|
|
21169
|
-
|
|
21168
|
+
}, zg = { match: a(/`/, z, /`/) }, Bg = [
|
|
21169
|
+
zg,
|
|
21170
21170
|
{
|
|
21171
21171
|
className: "variable",
|
|
21172
21172
|
match: /\$\d+/
|
|
@@ -21175,7 +21175,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21175
|
className: "variable",
|
|
21176
21176
|
match: `\\$${L}+`
|
|
21177
21177
|
}
|
|
21178
|
-
],
|
|
21178
|
+
], Vg = [
|
|
21179
21179
|
{
|
|
21180
21180
|
match: /(@|#(un)?)available/,
|
|
21181
21181
|
scope: "keyword",
|
|
@@ -21184,9 +21184,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21184
21184
|
end: /\)/,
|
|
21185
21185
|
keywords: G,
|
|
21186
21186
|
contains: [
|
|
21187
|
-
...
|
|
21187
|
+
...Eg,
|
|
21188
21188
|
$,
|
|
21189
|
-
|
|
21189
|
+
Pg
|
|
21190
21190
|
]
|
|
21191
21191
|
}] }
|
|
21192
21192
|
},
|
|
@@ -21198,7 +21198,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21198
21198
|
scope: "meta",
|
|
21199
21199
|
match: a(/@/, z)
|
|
21200
21200
|
}
|
|
21201
|
-
],
|
|
21201
|
+
], Hg = {
|
|
21202
21202
|
match: i(/\b[A-Z]/),
|
|
21203
21203
|
relevance: 0,
|
|
21204
21204
|
contains: [
|
|
@@ -21224,20 +21224,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21224
21224
|
relevance: 0
|
|
21225
21225
|
}
|
|
21226
21226
|
]
|
|
21227
|
-
},
|
|
21227
|
+
}, Ug = {
|
|
21228
21228
|
begin: /</,
|
|
21229
21229
|
end: />/,
|
|
21230
21230
|
keywords: J,
|
|
21231
21231
|
contains: [
|
|
21232
21232
|
...o,
|
|
21233
|
-
...
|
|
21234
|
-
...
|
|
21233
|
+
...Tg,
|
|
21234
|
+
...Vg,
|
|
21235
21235
|
Q,
|
|
21236
|
-
|
|
21236
|
+
Hg
|
|
21237
21237
|
]
|
|
21238
21238
|
};
|
|
21239
|
-
|
|
21240
|
-
let
|
|
21239
|
+
Hg.contains.push(Ug);
|
|
21240
|
+
let Wg = {
|
|
21241
21241
|
begin: /\(/,
|
|
21242
21242
|
end: /\)/,
|
|
21243
21243
|
relevance: 0,
|
|
@@ -21250,22 +21250,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21250
21250
|
relevance: 0
|
|
21251
21251
|
},
|
|
21252
21252
|
...o,
|
|
21253
|
-
|
|
21254
|
-
...
|
|
21253
|
+
Rg,
|
|
21254
|
+
...Tg,
|
|
21255
21255
|
...Z,
|
|
21256
|
-
...
|
|
21256
|
+
...Eg,
|
|
21257
21257
|
$,
|
|
21258
|
-
|
|
21258
|
+
Pg,
|
|
21259
|
+
...Bg,
|
|
21259
21260
|
...Vg,
|
|
21260
|
-
|
|
21261
|
-
Ug
|
|
21261
|
+
Hg
|
|
21262
21262
|
]
|
|
21263
|
-
},
|
|
21263
|
+
}, Gg = {
|
|
21264
21264
|
begin: /</,
|
|
21265
21265
|
end: />/,
|
|
21266
21266
|
keywords: "repeat each",
|
|
21267
|
-
contains: [...o,
|
|
21268
|
-
},
|
|
21267
|
+
contains: [...o, Hg]
|
|
21268
|
+
}, Kg = {
|
|
21269
21269
|
begin: /\(/,
|
|
21270
21270
|
end: /\)/,
|
|
21271
21271
|
keywords: J,
|
|
@@ -21283,42 +21283,42 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21283
21283
|
}]
|
|
21284
21284
|
},
|
|
21285
21285
|
...o,
|
|
21286
|
+
...Tg,
|
|
21286
21287
|
...Eg,
|
|
21287
|
-
...Dg,
|
|
21288
21288
|
$,
|
|
21289
|
-
|
|
21290
|
-
...
|
|
21291
|
-
|
|
21292
|
-
|
|
21289
|
+
Pg,
|
|
21290
|
+
...Vg,
|
|
21291
|
+
Hg,
|
|
21292
|
+
Wg
|
|
21293
21293
|
],
|
|
21294
21294
|
endsParent: !0,
|
|
21295
21295
|
illegal: /["']/
|
|
21296
|
-
},
|
|
21296
|
+
}, qg = {
|
|
21297
21297
|
match: [
|
|
21298
21298
|
/(func|macro)/,
|
|
21299
21299
|
/\s+/,
|
|
21300
|
-
s(
|
|
21300
|
+
s(zg.match, z, j)
|
|
21301
21301
|
],
|
|
21302
21302
|
className: {
|
|
21303
21303
|
1: "keyword",
|
|
21304
21304
|
3: "title.function"
|
|
21305
21305
|
},
|
|
21306
21306
|
contains: [
|
|
21307
|
+
Gg,
|
|
21307
21308
|
Kg,
|
|
21308
|
-
qg,
|
|
21309
21309
|
n
|
|
21310
21310
|
],
|
|
21311
21311
|
illegal: [/\[/, /%/]
|
|
21312
|
-
},
|
|
21312
|
+
}, Jg = {
|
|
21313
21313
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21314
21314
|
className: { 1: "keyword" },
|
|
21315
21315
|
contains: [
|
|
21316
|
+
Gg,
|
|
21316
21317
|
Kg,
|
|
21317
|
-
qg,
|
|
21318
21318
|
n
|
|
21319
21319
|
],
|
|
21320
21320
|
illegal: /\[|%/
|
|
21321
|
-
},
|
|
21321
|
+
}, Yg = {
|
|
21322
21322
|
match: [
|
|
21323
21323
|
/operator/,
|
|
21324
21324
|
/\s+/,
|
|
@@ -21328,7 +21328,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21328
21328
|
1: "keyword",
|
|
21329
21329
|
3: "title"
|
|
21330
21330
|
}
|
|
21331
|
-
},
|
|
21331
|
+
}, Xg = {
|
|
21332
21332
|
begin: [
|
|
21333
21333
|
/precedencegroup/,
|
|
21334
21334
|
/\s+/,
|
|
@@ -21338,10 +21338,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21338
21338
|
1: "keyword",
|
|
21339
21339
|
3: "title"
|
|
21340
21340
|
},
|
|
21341
|
-
contains: [
|
|
21341
|
+
contains: [Hg],
|
|
21342
21342
|
keywords: [...v, ..._],
|
|
21343
21343
|
end: /}/
|
|
21344
|
-
},
|
|
21344
|
+
}, Zg = {
|
|
21345
21345
|
match: [
|
|
21346
21346
|
/class\b/,
|
|
21347
21347
|
/\s+/,
|
|
@@ -21354,7 +21354,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21354
21354
|
3: "keyword",
|
|
21355
21355
|
5: "title.function"
|
|
21356
21356
|
}
|
|
21357
|
-
},
|
|
21357
|
+
}, Qg = {
|
|
21358
21358
|
match: [
|
|
21359
21359
|
/class\b/,
|
|
21360
21360
|
/\s+/,
|
|
@@ -21364,7 +21364,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21364
21364
|
1: "keyword",
|
|
21365
21365
|
3: "keyword"
|
|
21366
21366
|
}
|
|
21367
|
-
},
|
|
21367
|
+
}, $g = {
|
|
21368
21368
|
begin: [
|
|
21369
21369
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21370
21370
|
/\s+/,
|
|
@@ -21377,8 +21377,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21377
21377
|
},
|
|
21378
21378
|
keywords: J,
|
|
21379
21379
|
contains: [
|
|
21380
|
-
|
|
21381
|
-
...
|
|
21380
|
+
Gg,
|
|
21381
|
+
...Tg,
|
|
21382
21382
|
{
|
|
21383
21383
|
begin: /:/,
|
|
21384
21384
|
end: /\{/,
|
|
@@ -21386,21 +21386,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21386
21386
|
contains: [{
|
|
21387
21387
|
scope: "title.class.inherited",
|
|
21388
21388
|
match: B
|
|
21389
|
-
}, ...
|
|
21389
|
+
}, ...Tg],
|
|
21390
21390
|
relevance: 0
|
|
21391
21391
|
}
|
|
21392
21392
|
]
|
|
21393
21393
|
};
|
|
21394
|
-
for (let e of
|
|
21394
|
+
for (let e of Pg.variants) {
|
|
21395
21395
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21396
21396
|
n.keywords = J;
|
|
21397
21397
|
let r = [
|
|
21398
|
-
...
|
|
21398
|
+
...Tg,
|
|
21399
21399
|
...Z,
|
|
21400
|
-
...
|
|
21400
|
+
...Eg,
|
|
21401
21401
|
$,
|
|
21402
|
-
|
|
21403
|
-
...
|
|
21402
|
+
Pg,
|
|
21403
|
+
...Bg
|
|
21404
21404
|
];
|
|
21405
21405
|
n.contains = [...r, {
|
|
21406
21406
|
begin: /\(/,
|
|
@@ -21413,29 +21413,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21413
|
keywords: J,
|
|
21414
21414
|
contains: [
|
|
21415
21415
|
...o,
|
|
21416
|
+
qg,
|
|
21416
21417
|
Jg,
|
|
21417
|
-
|
|
21418
|
+
Zg,
|
|
21418
21419
|
Qg,
|
|
21419
21420
|
$g,
|
|
21420
|
-
|
|
21421
|
+
Yg,
|
|
21421
21422
|
Xg,
|
|
21422
|
-
Zg,
|
|
21423
21423
|
{
|
|
21424
21424
|
beginKeywords: "import",
|
|
21425
21425
|
end: /$/,
|
|
21426
21426
|
contains: [...o],
|
|
21427
21427
|
relevance: 0
|
|
21428
21428
|
},
|
|
21429
|
-
|
|
21430
|
-
...
|
|
21429
|
+
Rg,
|
|
21430
|
+
...Tg,
|
|
21431
21431
|
...Z,
|
|
21432
|
-
...
|
|
21432
|
+
...Eg,
|
|
21433
21433
|
$,
|
|
21434
|
-
|
|
21434
|
+
Pg,
|
|
21435
|
+
...Bg,
|
|
21435
21436
|
...Vg,
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
Gg
|
|
21437
|
+
Hg,
|
|
21438
|
+
Wg
|
|
21439
21439
|
]
|
|
21440
21440
|
};
|
|
21441
21441
|
}
|
|
@@ -22103,7 +22103,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22103
22103
|
keywords: E,
|
|
22104
22104
|
contains: ["self"].concat(q)
|
|
22105
22105
|
});
|
|
22106
|
-
let J = [].concat(K, L.contains),
|
|
22106
|
+
let J = [].concat(K, L.contains), Tg = J.concat([{
|
|
22107
22107
|
begin: /(\s*)\(/,
|
|
22108
22108
|
end: /\)/,
|
|
22109
22109
|
keywords: E,
|
|
@@ -22115,7 +22115,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22115
22115
|
excludeBegin: !0,
|
|
22116
22116
|
excludeEnd: !0,
|
|
22117
22117
|
keywords: E,
|
|
22118
|
-
contains:
|
|
22118
|
+
contains: Tg
|
|
22119
22119
|
}, Q = { variants: [{
|
|
22120
22120
|
match: [
|
|
22121
22121
|
/class/,
|
|
@@ -22142,17 +22142,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22142
22142
|
1: "keyword",
|
|
22143
22143
|
3: "title.class"
|
|
22144
22144
|
}
|
|
22145
|
-
}] },
|
|
22145
|
+
}] }, Eg = {
|
|
22146
22146
|
relevance: 0,
|
|
22147
22147
|
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]*)*/),
|
|
22148
22148
|
className: "title.class",
|
|
22149
22149
|
keywords: { _: [...o, ...s] }
|
|
22150
|
-
},
|
|
22150
|
+
}, Dg = {
|
|
22151
22151
|
label: "use_strict",
|
|
22152
22152
|
className: "meta",
|
|
22153
22153
|
relevance: 10,
|
|
22154
22154
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22155
|
-
},
|
|
22155
|
+
}, Og = {
|
|
22156
22156
|
variants: [{ match: [
|
|
22157
22157
|
/function/,
|
|
22158
22158
|
/\s+/,
|
|
@@ -22171,25 +22171,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22171
22171
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
22172
22172
|
className: "variable.constant"
|
|
22173
22173
|
};
|
|
22174
|
-
function
|
|
22174
|
+
function kg(e) {
|
|
22175
22175
|
return n.concat("(?!", e.join("|"), ")");
|
|
22176
22176
|
}
|
|
22177
|
-
let
|
|
22178
|
-
match: n.concat(/\b/,
|
|
22177
|
+
let Ag = {
|
|
22178
|
+
match: n.concat(/\b/, kg([
|
|
22179
22179
|
...l,
|
|
22180
22180
|
"super",
|
|
22181
22181
|
"import"
|
|
22182
22182
|
].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
|
|
22183
22183
|
className: "title.function",
|
|
22184
22184
|
relevance: 0
|
|
22185
|
-
},
|
|
22185
|
+
}, jg = {
|
|
22186
22186
|
begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
|
|
22187
22187
|
end: g,
|
|
22188
22188
|
excludeBegin: !0,
|
|
22189
22189
|
keywords: "prototype",
|
|
22190
22190
|
className: "property",
|
|
22191
22191
|
relevance: 0
|
|
22192
|
-
},
|
|
22192
|
+
}, Mg = {
|
|
22193
22193
|
match: [
|
|
22194
22194
|
/get|set/,
|
|
22195
22195
|
/\s+/,
|
|
@@ -22201,7 +22201,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22201
22201
|
3: "title.function"
|
|
22202
22202
|
},
|
|
22203
22203
|
contains: [{ begin: /\(\)/ }, Z]
|
|
22204
|
-
},
|
|
22204
|
+
}, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
|
|
22205
22205
|
match: [
|
|
22206
22206
|
/const|var|let/,
|
|
22207
22207
|
/\s+/,
|
|
@@ -22209,7 +22209,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22209
22209
|
/\s*/,
|
|
22210
22210
|
/=\s*/,
|
|
22211
22211
|
/(async\s*)?/,
|
|
22212
|
-
n.lookahead(
|
|
22212
|
+
n.lookahead(Ng)
|
|
22213
22213
|
],
|
|
22214
22214
|
keywords: "async",
|
|
22215
22215
|
className: {
|
|
@@ -22228,8 +22228,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22228
22228
|
],
|
|
22229
22229
|
keywords: E,
|
|
22230
22230
|
exports: {
|
|
22231
|
-
PARAMS_CONTAINS:
|
|
22232
|
-
CLASS_REFERENCE:
|
|
22231
|
+
PARAMS_CONTAINS: Tg,
|
|
22232
|
+
CLASS_REFERENCE: Eg
|
|
22233
22233
|
},
|
|
22234
22234
|
illegal: /#(?![$_A-z])/,
|
|
22235
22235
|
contains: [
|
|
@@ -22238,7 +22238,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22238
22238
|
binary: "node",
|
|
22239
22239
|
relevance: 5
|
|
22240
22240
|
}),
|
|
22241
|
-
|
|
22241
|
+
Dg,
|
|
22242
22242
|
e.APOS_STRING_MODE,
|
|
22243
22243
|
e.QUOTE_STRING_MODE,
|
|
22244
22244
|
z,
|
|
@@ -22248,13 +22248,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22248
22248
|
K,
|
|
22249
22249
|
{ match: /\$\d+/ },
|
|
22250
22250
|
I,
|
|
22251
|
-
|
|
22251
|
+
Eg,
|
|
22252
22252
|
{
|
|
22253
22253
|
scope: "attr",
|
|
22254
22254
|
match: g + n.lookahead(":"),
|
|
22255
22255
|
relevance: 0
|
|
22256
22256
|
},
|
|
22257
|
-
|
|
22257
|
+
Pg,
|
|
22258
22258
|
{
|
|
22259
22259
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
22260
22260
|
keywords: "return throw case",
|
|
@@ -22264,7 +22264,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22264
22264
|
e.REGEXP_MODE,
|
|
22265
22265
|
{
|
|
22266
22266
|
className: "function",
|
|
22267
|
-
begin:
|
|
22267
|
+
begin: Ng,
|
|
22268
22268
|
returnBegin: !0,
|
|
22269
22269
|
end: "\\s*=>",
|
|
22270
22270
|
contains: [{
|
|
@@ -22285,7 +22285,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22285
22285
|
excludeBegin: !0,
|
|
22286
22286
|
excludeEnd: !0,
|
|
22287
22287
|
keywords: E,
|
|
22288
|
-
contains:
|
|
22288
|
+
contains: Tg
|
|
22289
22289
|
}
|
|
22290
22290
|
]
|
|
22291
22291
|
}]
|
|
@@ -22321,7 +22321,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22321
22321
|
}
|
|
22322
22322
|
]
|
|
22323
22323
|
},
|
|
22324
|
-
|
|
22324
|
+
Og,
|
|
22325
22325
|
{ beginKeywords: "while if switch catch for" },
|
|
22326
22326
|
{
|
|
22327
22327
|
begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
|
|
@@ -22336,7 +22336,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22336
22336
|
match: /\.\.\./,
|
|
22337
22337
|
relevance: 0
|
|
22338
22338
|
},
|
|
22339
|
-
|
|
22339
|
+
jg,
|
|
22340
22340
|
{
|
|
22341
22341
|
match: "\\$" + g,
|
|
22342
22342
|
relevance: 0
|
|
@@ -22346,10 +22346,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22346
22346
|
className: { 1: "title.function" },
|
|
22347
22347
|
contains: [Z]
|
|
22348
22348
|
},
|
|
22349
|
-
|
|
22349
|
+
Ag,
|
|
22350
22350
|
$,
|
|
22351
22351
|
Q,
|
|
22352
|
-
|
|
22352
|
+
Mg,
|
|
22353
22353
|
{ match: /\$[(.]/ }
|
|
22354
22354
|
]
|
|
22355
22355
|
};
|
|
@@ -24536,7 +24536,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24536
24536
|
}, g();
|
|
24537
24537
|
let J = createMutationObserver(r, () => {
|
|
24538
24538
|
H && setSelectionToDOM(K, r, d, q);
|
|
24539
|
-
}),
|
|
24539
|
+
}), Tg = () => {
|
|
24540
24540
|
d = takeSelectionSnapshot(r, q);
|
|
24541
24541
|
}, Z = () => {
|
|
24542
24542
|
let e = J._flush();
|
|
@@ -24561,13 +24561,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24561
24561
|
r && (l(n(r[0])), d = r[1]);
|
|
24562
24562
|
}
|
|
24563
24563
|
}
|
|
24564
|
-
},
|
|
24564
|
+
}, Eg = () => {
|
|
24565
24565
|
B || Z();
|
|
24566
|
-
},
|
|
24566
|
+
}, Dg = (e) => {
|
|
24567
24567
|
e.preventDefault();
|
|
24568
24568
|
let n = e.inputType;
|
|
24569
24569
|
if (n.startsWith("format") || n === "historyUndo" || n === "historyRedo") return;
|
|
24570
|
-
B ? J._record(!0) :
|
|
24570
|
+
B ? J._record(!0) : Tg();
|
|
24571
24571
|
let i = e.getTargetRanges()[0];
|
|
24572
24572
|
if (i) {
|
|
24573
24573
|
let a = serializeRange(r, q, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
@@ -24578,31 +24578,31 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24578
24578
|
z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
|
|
24579
24579
|
}
|
|
24580
24580
|
B || Z();
|
|
24581
|
-
},
|
|
24582
|
-
B ||
|
|
24581
|
+
}, Og = () => {
|
|
24582
|
+
B || Tg(), B = !0;
|
|
24583
24583
|
}, $ = () => {
|
|
24584
24584
|
Z();
|
|
24585
|
+
}, kg = () => {
|
|
24586
|
+
H = !0, Tg();
|
|
24585
24587
|
}, Ag = () => {
|
|
24586
|
-
H = !0, Eg();
|
|
24587
|
-
}, jg = () => {
|
|
24588
24588
|
H = !1;
|
|
24589
|
-
},
|
|
24589
|
+
}, jg = () => {
|
|
24590
24590
|
if (L) {
|
|
24591
24591
|
L = !1;
|
|
24592
24592
|
return;
|
|
24593
24593
|
}
|
|
24594
|
-
H && !B && !G &&
|
|
24594
|
+
H && !B && !G && Tg();
|
|
24595
|
+
}, Mg = (e) => {
|
|
24596
|
+
Tg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24595
24597
|
}, Ng = (e) => {
|
|
24596
|
-
|
|
24598
|
+
e.preventDefault(), Mg(e.clipboardData);
|
|
24597
24599
|
}, Pg = (e) => {
|
|
24598
|
-
e.preventDefault(),
|
|
24600
|
+
e.preventDefault(), m || (Mg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24599
24601
|
}, Fg = (e) => {
|
|
24600
|
-
e.preventDefault(), m || (Ng(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24601
|
-
}, Ig = (e) => {
|
|
24602
24602
|
e.preventDefault();
|
|
24603
24603
|
let [n, r] = range(d);
|
|
24604
24604
|
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, q)));
|
|
24605
|
-
},
|
|
24605
|
+
}, Ig = (e) => {
|
|
24606
24606
|
e.preventDefault();
|
|
24607
24607
|
let n = e.dataTransfer, i = getPointedCaretPosition(K, r, e, q);
|
|
24608
24608
|
if (n && i) {
|
|
@@ -24611,13 +24611,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24611
24611
|
let o = e.transform(i);
|
|
24612
24612
|
e.select(o, o).insert(o, a(n, q)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24613
24613
|
}
|
|
24614
|
-
},
|
|
24615
|
-
G = !0,
|
|
24616
|
-
},
|
|
24614
|
+
}, Lg = (e) => {
|
|
24615
|
+
G = !0, Mg(e.dataTransfer);
|
|
24616
|
+
}, Rg = () => {
|
|
24617
24617
|
G = !1;
|
|
24618
24618
|
};
|
|
24619
|
-
return K.addEventListener("selectionchange",
|
|
24620
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange",
|
|
24619
|
+
return K.addEventListener("selectionchange", jg), r.addEventListener("keydown", Q), r.addEventListener("input", Eg), r.addEventListener("beforeinput", Dg), r.addEventListener("compositionstart", Og), r.addEventListener("compositionend", $), r.addEventListener("focus", kg), r.addEventListener("blur", Ag), r.addEventListener("copy", Ng), r.addEventListener("cut", Pg), r.addEventListener("paste", Fg), r.addEventListener("drop", Ig), r.addEventListener("dragstart", Lg), r.addEventListener("dragend", Rg), () => {
|
|
24620
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange", jg), r.removeEventListener("keydown", Q), r.removeEventListener("input", Eg), r.removeEventListener("beforeinput", Dg), r.removeEventListener("compositionstart", Og), r.removeEventListener("compositionend", $), r.removeEventListener("focus", kg), r.removeEventListener("blur", Ag), r.removeEventListener("copy", Ng), r.removeEventListener("cut", Pg), r.removeEventListener("paste", Fg), r.removeEventListener("drop", Ig), r.removeEventListener("dragstart", Lg), r.removeEventListener("dragend", Rg));
|
|
24621
24621
|
};
|
|
24622
24622
|
},
|
|
24623
24623
|
command: (e, ...n) => {
|
|
@@ -24962,7 +24962,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24962
24962
|
}
|
|
24963
24963
|
})), m = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, G = document.body, { commandSelection: K, GetCursorPosition: q } = useCommandSelection(), J = () => {
|
|
24964
24964
|
setTimeout(() => {
|
|
24965
|
-
let e =
|
|
24965
|
+
let e = Eg();
|
|
24966
24966
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
24967
24967
|
left: e.coordinates?.left || 0,
|
|
24968
24968
|
top: e.coordinates?.top || 0,
|
|
@@ -24975,7 +24975,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24975
24975
|
e.key === "@" && (m.value = "slash", J()), e.key === "/" && (m.value = "prompt", J());
|
|
24976
24976
|
}, Q = () => {
|
|
24977
24977
|
j.value = "";
|
|
24978
|
-
},
|
|
24978
|
+
}, Eg = () => {
|
|
24979
24979
|
let e = {
|
|
24980
24980
|
isActive: !1,
|
|
24981
24981
|
query: "",
|
|
@@ -25005,27 +25005,27 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25005
25005
|
} catch {
|
|
25006
25006
|
return e;
|
|
25007
25007
|
}
|
|
25008
|
-
},
|
|
25008
|
+
}, Og = (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), Ag = (e) => {
|
|
25009
25009
|
z.value.push(e), B.command(q);
|
|
25010
25010
|
let { column: n, line: r } = K.value;
|
|
25011
|
-
B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(),
|
|
25012
|
-
},
|
|
25011
|
+
B.command(DeleteTag, [r, n - j.value.length - 1], [r, n]), B.command(InsertTag, [r, n], e), B.command(InsertText, [r, n + j.value.length + 1 + 1], " "), a.value?.hide(), jg();
|
|
25012
|
+
}, jg = () => {
|
|
25013
25013
|
setTimeout(() => {
|
|
25014
25014
|
let e = window.getSelection(), n = document.createRange();
|
|
25015
25015
|
i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
|
|
25016
25016
|
}, 100);
|
|
25017
|
-
},
|
|
25018
|
-
B.command(ReplaceAll, e),
|
|
25017
|
+
}, Mg = (e) => {
|
|
25018
|
+
B.command(ReplaceAll, e), jg();
|
|
25019
25019
|
};
|
|
25020
25020
|
watchEffect(() => {
|
|
25021
25021
|
j.value ? (I.value = u.resources.filter((e) => e.name.toLowerCase().includes(j.value.toLowerCase())), L.value = u.prompts.filter((e) => e.toLowerCase().includes(j.value.toLowerCase()))) : (I.value = u.resources, L.value = u.prompts), !I.value.length && !L.value.length && a.value?.hide();
|
|
25022
25022
|
});
|
|
25023
|
-
let
|
|
25023
|
+
let Ng = (e, n, r, i) => {
|
|
25024
25024
|
if (n.type === "tag") {
|
|
25025
|
-
let n =
|
|
25025
|
+
let n = Og(e, r);
|
|
25026
25026
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25027
25027
|
}
|
|
25028
|
-
},
|
|
25028
|
+
}, Fg = (e) => {
|
|
25029
25029
|
let n = e.clipboardData?.items;
|
|
25030
25030
|
if (!n) return;
|
|
25031
25031
|
let r = [];
|
|
@@ -25034,7 +25034,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25034
25034
|
n && r.push(n);
|
|
25035
25035
|
}
|
|
25036
25036
|
r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
|
|
25037
|
-
},
|
|
25037
|
+
}, Ig = () => {
|
|
25038
25038
|
H?.(), B = createEditor({
|
|
25039
25039
|
doc: d.value,
|
|
25040
25040
|
schema: tagSchema,
|
|
@@ -25043,16 +25043,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25043
25043
|
},
|
|
25044
25044
|
onKeyDown: (e) => Z(e)
|
|
25045
25045
|
}), H = B.input(i.value);
|
|
25046
|
-
},
|
|
25046
|
+
}, zg = () => m.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
25047
25047
|
return onMounted(() => {
|
|
25048
|
-
|
|
25048
|
+
Ig(), i.value?.addEventListener("paste", Fg);
|
|
25049
25049
|
}), onUnmounted(() => {
|
|
25050
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
25050
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Fg);
|
|
25051
25051
|
}), n({
|
|
25052
25052
|
cleanup: () => {
|
|
25053
25053
|
B.command(ReplaceAll, "");
|
|
25054
25054
|
},
|
|
25055
|
-
focus:
|
|
25055
|
+
focus: jg
|
|
25056
25056
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25057
25057
|
ref_key: "editorRef",
|
|
25058
25058
|
ref: i,
|
|
@@ -25066,7 +25066,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25066
25066
|
"data-tag-type": r.data.type
|
|
25067
25067
|
}, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
25068
25068
|
class: "mention-tag-remove-icon",
|
|
25069
|
-
onClick: (a) =>
|
|
25069
|
+
onClick: (a) => Ng(e, r, i, n)
|
|
25070
25070
|
}, null, 8, ["onClick"])], 10, _hoisted_4$12)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$19), createVNode(unref(Tippy), {
|
|
25071
25071
|
ref_key: "tippyRef",
|
|
25072
25072
|
ref: a,
|
|
@@ -25081,15 +25081,15 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25081
25081
|
"trigger-target": i.value,
|
|
25082
25082
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25083
25083
|
onHidden: Q,
|
|
25084
|
-
onShow:
|
|
25084
|
+
onShow: zg
|
|
25085
25085
|
}, {
|
|
25086
25086
|
content: withCtx(() => [m.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25087
25087
|
key: 0,
|
|
25088
|
-
"on-select":
|
|
25088
|
+
"on-select": Ag,
|
|
25089
25089
|
"resource-list": I.value
|
|
25090
25090
|
}, null, 8, ["resource-list"])) : m.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25091
25091
|
key: 1,
|
|
25092
|
-
"on-select":
|
|
25092
|
+
"on-select": Mg,
|
|
25093
25093
|
prompts: L.value
|
|
25094
25094
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25095
25095
|
_: 1
|
|
@@ -25213,7 +25213,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25213
25213
|
e.status = UploadStatus.Error;
|
|
25214
25214
|
});
|
|
25215
25215
|
}
|
|
25216
|
-
},
|
|
25216
|
+
}, Tg = (e) => {
|
|
25217
25217
|
E.value = E.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
|
|
25218
25218
|
};
|
|
25219
25219
|
return n({
|
|
@@ -25238,7 +25238,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25238
25238
|
class: "chat-input-files"
|
|
25239
25239
|
}, [createVNode(file_content_default, {
|
|
25240
25240
|
files: E.value,
|
|
25241
|
-
onDeleteFile:
|
|
25241
|
+
onDeleteFile: Tg
|
|
25242
25242
|
}, null, 8, ["files"])], 512)) : createCommentVNode("v-if", !0)]),
|
|
25243
25243
|
createVNode(ai_slash_input_default, {
|
|
25244
25244
|
ref_key: "aiSlashInputRef",
|
|
@@ -25954,6 +25954,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25954
25954
|
messages: {},
|
|
25955
25955
|
messageStatus: {},
|
|
25956
25956
|
messageToolsStatus: {},
|
|
25957
|
+
messageToolsTippyOptions: {},
|
|
25957
25958
|
onAgentAction: {},
|
|
25958
25959
|
onAgentFeedback: {},
|
|
25959
25960
|
onUserAction: {},
|
|
@@ -25965,8 +25966,8 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25965
25966
|
}),
|
|
25966
25967
|
emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
|
|
25967
25968
|
setup(e) {
|
|
25968
|
-
let n = e, r = useModel(e, "selectedMessages"), i = useTemplateRef("messageContainerRef"), a = useTemplateRef("messageContainerBottomRef"), s = ref([]), { isScrollBottom: l, toScrollBottom: u, scrollBottomHeight: d } = useContainerScrollProvider(i, a), { copy: m } = useClipboard()
|
|
25969
|
-
watchEffect(() => {
|
|
25969
|
+
let n = e, r = useModel(e, "selectedMessages"), i = useTemplateRef("messageContainerRef"), a = useTemplateRef("messageContainerBottomRef"), s = ref([]), { isScrollBottom: l, toScrollBottom: u, scrollBottomHeight: d } = useContainerScrollProvider(i, a), { copy: m } = useClipboard();
|
|
25970
|
+
console.log("[MessageContainer] messageToolsTippyOptions:", n.messageToolsTippyOptions), watchEffect(() => {
|
|
25970
25971
|
let e = [], r = [];
|
|
25971
25972
|
for (let i of n.messages) {
|
|
25972
25973
|
if (i.role === MessageRole$1.User) {
|
|
@@ -26016,13 +26017,13 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
26016
26017
|
immediate: !0,
|
|
26017
26018
|
flush: "post"
|
|
26018
26019
|
});
|
|
26019
|
-
let
|
|
26020
|
+
let E = async (e, r) => (e.id === "copy" && (console.log("messages", r), m(r.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"))), n.onAgentAction?.(e, r)), k = async (e, r) => {
|
|
26020
26021
|
n.onUserAction?.(e, r);
|
|
26021
|
-
},
|
|
26022
|
+
}, j = (e) => {
|
|
26022
26023
|
e.isHover = !0;
|
|
26023
|
-
},
|
|
26024
|
+
}, I = (e) => {
|
|
26024
26025
|
e.isHover = !1;
|
|
26025
|
-
},
|
|
26026
|
+
}, L = (e, n) => {
|
|
26026
26027
|
let i = e.type === MessageRole$1.User;
|
|
26027
26028
|
s.value?.forEach((r, a) => {
|
|
26028
26029
|
if (r === e) {
|
|
@@ -26031,9 +26032,9 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
26031
26032
|
e && (e.checked = n);
|
|
26032
26033
|
}
|
|
26033
26034
|
}), r.value = s.value?.filter((e) => e.checked).map((e) => e.messages).flat();
|
|
26034
|
-
},
|
|
26035
|
+
}, z = async (e, r, i) => {
|
|
26035
26036
|
n.onUserInputConfirm?.(e, r, i);
|
|
26036
|
-
},
|
|
26037
|
+
}, B = async (e, r) => {
|
|
26037
26038
|
n.onUserShortcutConfirm?.(e, r);
|
|
26038
26039
|
};
|
|
26039
26040
|
return (r, m) => (openBlock(), createElementBlock("div", {
|
|
@@ -26045,13 +26046,13 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
26045
26046
|
key: a,
|
|
26046
26047
|
class: "message-group",
|
|
26047
26048
|
style: normalizeStyle({ backgroundColor: i.checked ? "#f5f7fa" : "transparent" }),
|
|
26048
|
-
onMouseenter: (e) =>
|
|
26049
|
-
onMouseleave: (e) =>
|
|
26049
|
+
onMouseenter: (e) => j(i),
|
|
26050
|
+
onMouseleave: (e) => I(i)
|
|
26050
26051
|
}, [e.enableSelection && i.type !== unref(MessageRole$1).Loading ? (openBlock(), createBlock(unref(Checkbox), {
|
|
26051
26052
|
key: a,
|
|
26052
26053
|
class: "message-group-checkbox",
|
|
26053
26054
|
"model-value": i.checked,
|
|
26054
|
-
"onUpdate:modelValue": (e) =>
|
|
26055
|
+
"onUpdate:modelValue": (e) => L(i, e)
|
|
26055
26056
|
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("v-if", !0), createElementVNode("div", _hoisted_2$7, [(openBlock(!0), createElementBlock(Fragment, null, renderList(i.messages, (n, i) => renderSlot(r.$slots, "default", mergeProps({
|
|
26056
26057
|
key: i,
|
|
26057
26058
|
ref_for: !0
|
|
@@ -26062,9 +26063,9 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
26062
26063
|
key: i,
|
|
26063
26064
|
message: n,
|
|
26064
26065
|
"message-tools-status": e.messageToolsStatus,
|
|
26065
|
-
"on-action": (e) =>
|
|
26066
|
-
"on-input-confirm": (e, r) =>
|
|
26067
|
-
"on-shortcut-confirm": (e) =>
|
|
26066
|
+
"on-action": (e) => k(e, n),
|
|
26067
|
+
"on-input-confirm": (e, r) => z(n, e, r),
|
|
26068
|
+
"on-shortcut-confirm": (e) => B(n, e)
|
|
26068
26069
|
}, null, 8, [
|
|
26069
26070
|
"message",
|
|
26070
26071
|
"message-tools-status",
|
|
@@ -26074,12 +26075,13 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
26074
26075
|
]))])), 128)), i.type === unref(MessageRole$1).Assistant && e.messageToolsStatus !== unref(MessageToolsStatus).Hidden ? (openBlock(), createBlock(message_tools_default, {
|
|
26075
26076
|
key: 0,
|
|
26076
26077
|
"message-tools-status": e.messageToolsStatus,
|
|
26077
|
-
"on-action": (e) =>
|
|
26078
|
-
"tippy-options":
|
|
26078
|
+
"on-action": (e) => E(e, i.messages),
|
|
26079
|
+
"tippy-options": n.messageToolsTippyOptions,
|
|
26079
26080
|
onFeedback: (e, r, a) => n.onAgentFeedback?.(e, i.messages, r, a)
|
|
26080
26081
|
}, null, 8, [
|
|
26081
26082
|
"message-tools-status",
|
|
26082
26083
|
"on-action",
|
|
26084
|
+
"tippy-options",
|
|
26083
26085
|
"onFeedback"
|
|
26084
26086
|
])) : createCommentVNode("v-if", !0)])], 44, _hoisted_1$10))), 128)),
|
|
26085
26087
|
createElementVNode("div", {
|
|
@@ -26602,7 +26604,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26602
26604
|
onSessionDelete: (e) => a("history-session-delete", e),
|
|
26603
26605
|
onSessionRename: (e, n) => a("history-session-rename", e, n)
|
|
26604
26606
|
}));
|
|
26605
|
-
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), G = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), K = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), q = computed(() => i.hasPermission), J = (e) => q.value ? e : t("暂无使用权限"), Z = () => ({ cursor: q.value ? "pointer" : "not-allowed" }),
|
|
26607
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), G = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), K = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), q = computed(() => i.hasPermission), J = (e) => q.value ? e : t("暂无使用权限"), Z = () => ({ cursor: q.value ? "pointer" : "not-allowed" }), Og = computed(() => {
|
|
26606
26608
|
let e = !i.hasSessionContents, n = e ? "disabled" : "", r = e ? `data-tippy-content="${t("请先发起会话")}"` : "", a = "";
|
|
26607
26609
|
return i.dropdownMenuConfig?.showRename && (a += `
|
|
26608
26610
|
<div class="tippy-menu-item" data-action="rename">
|
|
@@ -26634,18 +26636,18 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26634
26636
|
});
|
|
26635
26637
|
}
|
|
26636
26638
|
a("new-chat");
|
|
26637
|
-
},
|
|
26639
|
+
}, Ag = (e) => {
|
|
26638
26640
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26639
|
-
},
|
|
26641
|
+
}, jg = () => {
|
|
26640
26642
|
a("help-click");
|
|
26641
|
-
},
|
|
26643
|
+
}, Ng = (e) => {
|
|
26642
26644
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26643
|
-
},
|
|
26645
|
+
}, Pg = (e) => {
|
|
26644
26646
|
e.stopPropagation(), e.preventDefault();
|
|
26645
26647
|
let n = e.currentTarget, r = n.dataset.action;
|
|
26646
26648
|
if (!n.classList.contains("disabled")) switch (L && L.hide(), r) {
|
|
26647
26649
|
case "rename":
|
|
26648
|
-
|
|
26650
|
+
Fg();
|
|
26649
26651
|
break;
|
|
26650
26652
|
case "auto-generate":
|
|
26651
26653
|
a("auto-generate-name");
|
|
@@ -26654,9 +26656,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26654
26656
|
a("share");
|
|
26655
26657
|
break;
|
|
26656
26658
|
}
|
|
26657
|
-
},
|
|
26658
|
-
document.removeEventListener("click",
|
|
26659
|
-
document.addEventListener("click",
|
|
26659
|
+
}, Fg = () => {
|
|
26660
|
+
document.removeEventListener("click", Vg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26661
|
+
document.addEventListener("click", Vg);
|
|
26660
26662
|
}, 100), setTimeout(() => {
|
|
26661
26663
|
if (I.value) try {
|
|
26662
26664
|
let e = I.value;
|
|
@@ -26667,26 +26669,26 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26667
26669
|
console.warn("Failed to focus rename input:", e);
|
|
26668
26670
|
}
|
|
26669
26671
|
}, 100);
|
|
26670
|
-
},
|
|
26672
|
+
}, Ig = () => {
|
|
26671
26673
|
let e = j.value.trim();
|
|
26672
26674
|
if (!e) {
|
|
26673
|
-
|
|
26675
|
+
Lg();
|
|
26674
26676
|
return;
|
|
26675
26677
|
}
|
|
26676
26678
|
a("rename", e), k.value = !1, j.value = "";
|
|
26677
|
-
},
|
|
26679
|
+
}, Lg = () => {
|
|
26678
26680
|
k.value = !1, j.value = "";
|
|
26679
|
-
},
|
|
26680
|
-
j.value = e, n.key === "Enter" ?
|
|
26681
|
-
},
|
|
26681
|
+
}, zg = (e, n) => {
|
|
26682
|
+
j.value = e, n.key === "Enter" ? Ig() : n.key === "Escape" && Lg();
|
|
26683
|
+
}, Vg = (e) => {
|
|
26682
26684
|
if (!k.value) return;
|
|
26683
26685
|
let n = e.target, r = document.querySelector(".rename-tooltip");
|
|
26684
|
-
r && !r.contains(n) &&
|
|
26685
|
-
},
|
|
26686
|
+
r && !r.contains(n) && Lg();
|
|
26687
|
+
}, Hg = async () => {
|
|
26686
26688
|
if (!u.value) return;
|
|
26687
26689
|
let e = (await import("tippy.js")).default;
|
|
26688
26690
|
L &&= (L.destroy(), null), L = e(u.value, {
|
|
26689
|
-
content:
|
|
26691
|
+
content: Og.value,
|
|
26690
26692
|
theme: "ai-blueking-light more-menu-light light",
|
|
26691
26693
|
placement: "bottom-start",
|
|
26692
26694
|
trigger: "manual",
|
|
@@ -26698,23 +26700,23 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26698
26700
|
onShow: () => {
|
|
26699
26701
|
setTimeout(() => {
|
|
26700
26702
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26701
|
-
e.addEventListener("click",
|
|
26703
|
+
e.addEventListener("click", Pg);
|
|
26702
26704
|
});
|
|
26703
26705
|
}, 0);
|
|
26704
26706
|
},
|
|
26705
26707
|
onHide: () => {
|
|
26706
26708
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
26707
|
-
e.removeEventListener("click",
|
|
26709
|
+
e.removeEventListener("click", Pg);
|
|
26708
26710
|
});
|
|
26709
26711
|
}
|
|
26710
26712
|
});
|
|
26711
26713
|
};
|
|
26712
26714
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26713
|
-
L && L.setContent(
|
|
26715
|
+
L && L.setContent(Og.value);
|
|
26714
26716
|
}), onMounted(() => {
|
|
26715
|
-
|
|
26717
|
+
Hg(), i.sessionBusinessManager && B(), document.addEventListener("click", Vg);
|
|
26716
26718
|
}), onBeforeUnmount(() => {
|
|
26717
|
-
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click",
|
|
26719
|
+
L &&= (L.destroy(), null), z &&= (z.destroy(), null), document.removeEventListener("click", Vg);
|
|
26718
26720
|
}), n({
|
|
26719
26721
|
headerRef: s,
|
|
26720
26722
|
historyIconRef: l
|
|
@@ -26737,13 +26739,13 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26737
26739
|
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
26738
26740
|
class: "rename-input",
|
|
26739
26741
|
placeholder: unref(t)("请输入新的会话名称"),
|
|
26740
|
-
onKeyup:
|
|
26742
|
+
onKeyup: zg
|
|
26741
26743
|
}, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
|
|
26742
26744
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
26743
|
-
onClick:
|
|
26745
|
+
onClick: Ig
|
|
26744
26746
|
}), createElementVNode("i", {
|
|
26745
26747
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26746
|
-
onClick:
|
|
26748
|
+
onClick: Lg
|
|
26747
26749
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26748
26750
|
], 2),
|
|
26749
26751
|
i.showMoreIcon && q.value ? (openBlock(), createElementBlock("span", {
|
|
@@ -26751,7 +26753,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26751
26753
|
ref_key: "moreIconRef",
|
|
26752
26754
|
ref: u,
|
|
26753
26755
|
class: "bkai-icon bkai-more",
|
|
26754
|
-
onClick:
|
|
26756
|
+
onClick: Ng
|
|
26755
26757
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26756
26758
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26757
26759
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26779,7 +26781,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26779
26781
|
{ disabled: !q.value }
|
|
26780
26782
|
]),
|
|
26781
26783
|
style: normalizeStyle(Z()),
|
|
26782
|
-
onClick: r[2] ||= (e) => q.value ?
|
|
26784
|
+
onClick: r[2] ||= (e) => q.value ? Ag(e) : void 0
|
|
26783
26785
|
}, null, 6)), [[unref(o), {
|
|
26784
26786
|
content: J(unref(t)("历史会话")),
|
|
26785
26787
|
boundary: "parent"
|
|
@@ -26787,7 +26789,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26787
26789
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26788
26790
|
key: 2,
|
|
26789
26791
|
class: "bkai-icon bkai-zhushou",
|
|
26790
|
-
onClick:
|
|
26792
|
+
onClick: jg
|
|
26791
26793
|
}, null, 512)), [[unref(o), {
|
|
26792
26794
|
content: unref(t)("转人工"),
|
|
26793
26795
|
boundary: "parent"
|
|
@@ -27586,6 +27588,7 @@ var UIStateManager = class {
|
|
|
27586
27588
|
height: {},
|
|
27587
27589
|
helloText: {},
|
|
27588
27590
|
maxWidth: {},
|
|
27591
|
+
messageToolsTippyOptions: {},
|
|
27589
27592
|
placeholder: {},
|
|
27590
27593
|
prompts: {},
|
|
27591
27594
|
requestOptions: {},
|
|
@@ -27633,7 +27636,7 @@ var UIStateManager = class {
|
|
|
27633
27636
|
a("receive-text");
|
|
27634
27637
|
},
|
|
27635
27638
|
onDone: () => {
|
|
27636
|
-
a("receive-end"),
|
|
27639
|
+
a("receive-end"), f_();
|
|
27637
27640
|
},
|
|
27638
27641
|
onError: (e) => {
|
|
27639
27642
|
a("error", e);
|
|
@@ -27649,11 +27652,11 @@ var UIStateManager = class {
|
|
|
27649
27652
|
return n.injectMessageModule(r.message), r;
|
|
27650
27653
|
})(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), G = async (e, n) => {
|
|
27651
27654
|
if (e.id === "cite") {
|
|
27652
|
-
|
|
27655
|
+
Jg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), k_();
|
|
27653
27656
|
return;
|
|
27654
27657
|
}
|
|
27655
27658
|
if (e.id === "rebuild") {
|
|
27656
|
-
await
|
|
27659
|
+
await Og(n);
|
|
27657
27660
|
return;
|
|
27658
27661
|
}
|
|
27659
27662
|
if (e.id === "delete") {
|
|
@@ -27661,7 +27664,7 @@ var UIStateManager = class {
|
|
|
27661
27664
|
return;
|
|
27662
27665
|
}
|
|
27663
27666
|
if (e.id === "share") {
|
|
27664
|
-
|
|
27667
|
+
zg && (E.value = !0), a("request-share");
|
|
27665
27668
|
return;
|
|
27666
27669
|
}
|
|
27667
27670
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27683,7 +27686,7 @@ var UIStateManager = class {
|
|
|
27683
27686
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
27684
27687
|
return;
|
|
27685
27688
|
}
|
|
27686
|
-
let s = findLastUserMessageIdBefore(
|
|
27689
|
+
let s = findLastUserMessageIdBefore(Wg?.messages.value || [], n[0]);
|
|
27687
27690
|
if (s === void 0) {
|
|
27688
27691
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
27689
27692
|
return;
|
|
@@ -27701,12 +27704,12 @@ var UIStateManager = class {
|
|
|
27701
27704
|
console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
|
|
27702
27705
|
}
|
|
27703
27706
|
}, Z = async (e) => {
|
|
27704
|
-
if (!
|
|
27707
|
+
if (!Wg || !z) {
|
|
27705
27708
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
27706
27709
|
return;
|
|
27707
27710
|
}
|
|
27708
27711
|
try {
|
|
27709
|
-
let n =
|
|
27712
|
+
let n = Wg.messages.value, r = findLastUserMessageBefore(n, e[0]);
|
|
27710
27713
|
if (!r) {
|
|
27711
27714
|
console.error("[ChatBot] No user message found before AI messages");
|
|
27712
27715
|
return;
|
|
@@ -27716,8 +27719,8 @@ var UIStateManager = class {
|
|
|
27716
27719
|
} catch (e) {
|
|
27717
27720
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27718
27721
|
}
|
|
27719
|
-
},
|
|
27720
|
-
if (!
|
|
27722
|
+
}, Og = async (e) => {
|
|
27723
|
+
if (!Wg || !z) {
|
|
27721
27724
|
console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
|
|
27722
27725
|
return;
|
|
27723
27726
|
}
|
|
@@ -27727,21 +27730,21 @@ var UIStateManager = class {
|
|
|
27727
27730
|
return;
|
|
27728
27731
|
}
|
|
27729
27732
|
try {
|
|
27730
|
-
await
|
|
27733
|
+
await Wg.regenerateFromAIMessages(e, n), f_();
|
|
27731
27734
|
} catch (e) {
|
|
27732
27735
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27733
27736
|
}
|
|
27734
27737
|
}, $ = async (e, n) => {
|
|
27735
27738
|
if (e.id === "delete") {
|
|
27736
|
-
await
|
|
27739
|
+
await Pg(n);
|
|
27737
27740
|
return;
|
|
27738
27741
|
}
|
|
27739
27742
|
if (e.id === "cite") {
|
|
27740
|
-
|
|
27743
|
+
Jg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), k_();
|
|
27741
27744
|
return;
|
|
27742
27745
|
}
|
|
27743
27746
|
console.log("handleUserAction", e, n);
|
|
27744
|
-
},
|
|
27747
|
+
}, Ag = async (e, n, r) => {
|
|
27745
27748
|
if (!z) {
|
|
27746
27749
|
console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
|
|
27747
27750
|
return;
|
|
@@ -27757,12 +27760,12 @@ var UIStateManager = class {
|
|
|
27757
27760
|
return;
|
|
27758
27761
|
}
|
|
27759
27762
|
try {
|
|
27760
|
-
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n),
|
|
27763
|
+
console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), f_();
|
|
27761
27764
|
} catch (e) {
|
|
27762
27765
|
console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
|
|
27763
27766
|
}
|
|
27764
|
-
},
|
|
27765
|
-
if (!
|
|
27767
|
+
}, jg = async (e, n) => {
|
|
27768
|
+
if (!Wg || !z) {
|
|
27766
27769
|
console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
|
|
27767
27770
|
return;
|
|
27768
27771
|
}
|
|
@@ -27777,26 +27780,26 @@ var UIStateManager = class {
|
|
|
27777
27780
|
return;
|
|
27778
27781
|
}
|
|
27779
27782
|
try {
|
|
27780
|
-
let a =
|
|
27783
|
+
let a = Ng(e);
|
|
27781
27784
|
if (!a) {
|
|
27782
27785
|
console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
|
|
27783
27786
|
return;
|
|
27784
27787
|
}
|
|
27785
|
-
let o =
|
|
27786
|
-
await
|
|
27788
|
+
let o = w_(a, n), s = String(n.input ?? "");
|
|
27789
|
+
await Wg.resendMessageWithProperty(String(i), r, s, o), f_();
|
|
27787
27790
|
} catch (e) {
|
|
27788
27791
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27789
27792
|
}
|
|
27790
|
-
},
|
|
27793
|
+
}, Ng = (e) => {
|
|
27791
27794
|
let n = e.property?.extra;
|
|
27792
|
-
return n?.shortcut ? n.shortcut : n?.command ?
|
|
27793
|
-
},
|
|
27794
|
-
if (!
|
|
27795
|
+
return n?.shortcut ? n.shortcut : n?.command ? d_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27796
|
+
}, Pg = async (e) => {
|
|
27797
|
+
if (!Wg || !z) {
|
|
27795
27798
|
console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
|
|
27796
27799
|
return;
|
|
27797
27800
|
}
|
|
27798
27801
|
try {
|
|
27799
|
-
let n =
|
|
27802
|
+
let n = Wg.messages.value, r = n.findIndex((n) => n === e);
|
|
27800
27803
|
if (r === -1) {
|
|
27801
27804
|
console.error("[ChatBot] User message not found in messages list");
|
|
27802
27805
|
return;
|
|
@@ -27812,29 +27815,29 @@ var UIStateManager = class {
|
|
|
27812
27815
|
} catch (e) {
|
|
27813
27816
|
console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
|
|
27814
27817
|
}
|
|
27815
|
-
},
|
|
27818
|
+
}, Ig = async () => {
|
|
27816
27819
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27817
|
-
},
|
|
27820
|
+
}, zg = !i.chatHelper, Vg = computed(() => zg ? E.value : i.enableSelection), Hg = computed(() => zg ? k.value : i.shareLoading), Ug = z ? new SessionBusinessManager(z.session, z.message, null, {
|
|
27818
27821
|
enableChatSession: !0,
|
|
27819
27822
|
autoSwitchToInitialSession: !!i.sessionCode,
|
|
27820
27823
|
loadRecentSessionOnMount: i.autoLoad,
|
|
27821
27824
|
initialSessionCode: i.sessionCode
|
|
27822
|
-
}) : null,
|
|
27825
|
+
}) : null, Wg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
|
|
27823
27826
|
openingRemark: i.helloText,
|
|
27824
27827
|
predefinedQuestions: i.prompts,
|
|
27825
27828
|
placeholder: i.placeholder
|
|
27826
|
-
}) : null,
|
|
27829
|
+
}) : null, Gg = new ShortcutManager(null, i.shortcuts || []), qg = shallowRef([[]]), Jg = ref(""), Yg = computed(() => Wg?.messages.value ?? []), Xg = computed(() => Wg?.isMessagesLoading.value ?? !1), Zg = computed(() => Wg?.isGenerating.value ?? !1), Qg = computed(() => Ug?.currentSession.value ?? null), $g = computed(() => zg && !j.value ? !1 : !Xg.value && Yg.value.length === 0), e_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), t_ = computed(() => i.resources?.length ? i.resources : flattenResources(z?.agent.info.value?.resources)), n_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), r_ = computed(() => ({
|
|
27827
27830
|
height: typeof i.height == "number" ? `${i.height}px` : i.height,
|
|
27828
27831
|
maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
|
|
27829
|
-
})),
|
|
27830
|
-
let e =
|
|
27832
|
+
})), i_ = computed(() => {
|
|
27833
|
+
let e = Gg.shortcuts.value;
|
|
27831
27834
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27832
|
-
}),
|
|
27833
|
-
m.value = [],
|
|
27834
|
-
},
|
|
27835
|
+
}), a_ = () => {
|
|
27836
|
+
m.value = [], zg && (E.value = !1), a("cancel-share");
|
|
27837
|
+
}, c_ = async () => {
|
|
27835
27838
|
let e = m.value;
|
|
27836
|
-
|
|
27837
|
-
},
|
|
27839
|
+
zg && await l_(e), a("confirm-share", e);
|
|
27840
|
+
}, l_ = async (e) => {
|
|
27838
27841
|
if (!z || e.length === 0) return;
|
|
27839
27842
|
let n = z.session.current?.value?.sessionCode;
|
|
27840
27843
|
if (!n) {
|
|
@@ -27856,41 +27859,42 @@ var UIStateManager = class {
|
|
|
27856
27859
|
} finally {
|
|
27857
27860
|
k.value = !1, E.value = !1, m.value = [];
|
|
27858
27861
|
}
|
|
27859
|
-
},
|
|
27860
|
-
e ? m.value =
|
|
27861
|
-
},
|
|
27862
|
+
}, u_ = (e) => {
|
|
27863
|
+
e ? m.value = Yg.value : m.value = [];
|
|
27864
|
+
}, d_ = Gg.effectiveShortcuts;
|
|
27862
27865
|
watch(() => i.shortcuts, (e) => {
|
|
27863
|
-
|
|
27866
|
+
Gg.setShortcuts(e || []);
|
|
27864
27867
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27865
|
-
e &&
|
|
27868
|
+
e && Gg.setAgentShortcuts(e);
|
|
27866
27869
|
}, { immediate: !0 });
|
|
27867
|
-
let
|
|
27870
|
+
let f_ = async () => {
|
|
27868
27871
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27869
|
-
},
|
|
27870
|
-
if (!
|
|
27872
|
+
}, p_ = async (e, n = {}) => {
|
|
27873
|
+
if (!Wg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
27871
27874
|
let r = z.session.current?.value?.sessionCode;
|
|
27872
27875
|
if (!r) throw Error("[ChatBot] Cannot send message: no active session");
|
|
27873
|
-
|
|
27874
|
-
},
|
|
27876
|
+
qg.value = [[]], Jg.value = "", a("send-message", typeof e == "string" ? e : ""), await Wg.sendMessage(e, r, n);
|
|
27877
|
+
}, m_ = async (e) => {
|
|
27875
27878
|
let n = z?.session.current?.value?.sessionCode;
|
|
27876
27879
|
if (!n) throw Error("[ChatBot] Cannot upload: no active session");
|
|
27877
27880
|
let r = await z.session.uploadFile(n, e);
|
|
27878
27881
|
if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
|
|
27879
27882
|
return r;
|
|
27880
|
-
},
|
|
27883
|
+
}, h_ = async (e, n) => {
|
|
27881
27884
|
try {
|
|
27882
|
-
|
|
27885
|
+
let n = {};
|
|
27886
|
+
Jg.value && (n.cite = Jg.value), u.value && (n.command = u.value.id), await p_(e, Object.keys(n).length ? { property: { extra: n } } : {});
|
|
27883
27887
|
} catch (e) {
|
|
27884
27888
|
console.error("Failed to send message:", e), a("error", e);
|
|
27885
27889
|
}
|
|
27886
|
-
},
|
|
27887
|
-
|
|
27888
|
-
},
|
|
27889
|
-
|
|
27890
|
+
}, __ = async () => {
|
|
27891
|
+
E_();
|
|
27892
|
+
}, y_ = (e, n) => {
|
|
27893
|
+
S_(e, n), a("shortcut-click", {
|
|
27890
27894
|
shortcut: e,
|
|
27891
27895
|
source: "main"
|
|
27892
27896
|
});
|
|
27893
|
-
},
|
|
27897
|
+
}, S_ = (e, n) => {
|
|
27894
27898
|
let r = e, i = r.components?.find((e) => e.fillBack)?.key || "input";
|
|
27895
27899
|
u.value = {
|
|
27896
27900
|
...r,
|
|
@@ -27899,9 +27903,9 @@ var UIStateManager = class {
|
|
|
27899
27903
|
[i]: n || ""
|
|
27900
27904
|
}
|
|
27901
27905
|
};
|
|
27902
|
-
},
|
|
27906
|
+
}, C_ = () => {
|
|
27903
27907
|
u.value = null;
|
|
27904
|
-
},
|
|
27908
|
+
}, w_ = (e, n) => {
|
|
27905
27909
|
let r = e.components || [];
|
|
27906
27910
|
return { extra: {
|
|
27907
27911
|
cite: {
|
|
@@ -27921,42 +27925,42 @@ var UIStateManager = class {
|
|
|
27921
27925
|
__value: n[e.key]
|
|
27922
27926
|
}))
|
|
27923
27927
|
} };
|
|
27924
|
-
},
|
|
27928
|
+
}, T_ = async (e) => {
|
|
27925
27929
|
if (!u.value) {
|
|
27926
27930
|
console.error("[ChatBot] No selected shortcut");
|
|
27927
27931
|
return;
|
|
27928
27932
|
}
|
|
27929
|
-
let n =
|
|
27930
|
-
|
|
27933
|
+
let n = w_(u.value, e), r = u.value.name, i = u.value;
|
|
27934
|
+
C_();
|
|
27931
27935
|
try {
|
|
27932
|
-
await
|
|
27936
|
+
await p_(r, { property: n });
|
|
27933
27937
|
} catch (e) {
|
|
27934
27938
|
u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
|
|
27935
27939
|
}
|
|
27936
|
-
},
|
|
27937
|
-
if (!
|
|
27940
|
+
}, E_ = () => {
|
|
27941
|
+
if (!Wg) {
|
|
27938
27942
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27939
27943
|
return;
|
|
27940
27944
|
}
|
|
27941
|
-
|
|
27942
|
-
},
|
|
27943
|
-
if (!
|
|
27945
|
+
Wg.stopGeneration(), a("stop");
|
|
27946
|
+
}, D_ = async (e) => {
|
|
27947
|
+
if (!Ug) {
|
|
27944
27948
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27945
27949
|
return;
|
|
27946
27950
|
}
|
|
27947
27951
|
try {
|
|
27948
|
-
await
|
|
27952
|
+
await Ug.switchSession(e), a("session-switched", Ug.currentSession.value);
|
|
27949
27953
|
} catch (e) {
|
|
27950
27954
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27951
27955
|
}
|
|
27952
|
-
},
|
|
27953
|
-
|
|
27954
|
-
},
|
|
27956
|
+
}, O_ = (e) => {
|
|
27957
|
+
Jg.value = e;
|
|
27958
|
+
}, k_ = () => {
|
|
27955
27959
|
l.value?.focus?.();
|
|
27956
27960
|
};
|
|
27957
27961
|
return onMounted(async () => {
|
|
27958
27962
|
if (!(!z || I.value)) try {
|
|
27959
|
-
if (
|
|
27963
|
+
if (zg) {
|
|
27960
27964
|
if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
|
|
27961
27965
|
else if (z.session.list.value.length > 0) {
|
|
27962
27966
|
let e = z.session.list.value[0];
|
|
@@ -27969,38 +27973,38 @@ var UIStateManager = class {
|
|
|
27969
27973
|
console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
|
|
27970
27974
|
}
|
|
27971
27975
|
}), onBeforeUnmount(() => {
|
|
27972
|
-
|
|
27976
|
+
zg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
|
|
27973
27977
|
}), n({
|
|
27974
|
-
sendMessage: (e) =>
|
|
27975
|
-
stopGeneration:
|
|
27976
|
-
switchSession:
|
|
27977
|
-
messages:
|
|
27978
|
-
currentSession:
|
|
27979
|
-
isGenerating:
|
|
27978
|
+
sendMessage: (e) => h_(e, [[]]),
|
|
27979
|
+
stopGeneration: E_,
|
|
27980
|
+
switchSession: D_,
|
|
27981
|
+
messages: Yg,
|
|
27982
|
+
currentSession: Qg,
|
|
27983
|
+
isGenerating: Zg,
|
|
27980
27984
|
getChatHelper: () => z,
|
|
27981
|
-
setCiteText:
|
|
27982
|
-
focusInput:
|
|
27985
|
+
setCiteText: O_,
|
|
27986
|
+
focusInput: k_,
|
|
27983
27987
|
selectShortcut: (e, n) => {
|
|
27984
|
-
|
|
27988
|
+
S_(e, n);
|
|
27985
27989
|
}
|
|
27986
27990
|
}), (e, n) => (openBlock(), createElementBlock("div", {
|
|
27987
27991
|
class: normalizeClass([
|
|
27988
27992
|
"ai-chatbot",
|
|
27989
27993
|
i.extCls,
|
|
27990
|
-
{ "welcome-state":
|
|
27994
|
+
{ "welcome-state": $g.value }
|
|
27991
27995
|
]),
|
|
27992
|
-
style: normalizeStyle(
|
|
27993
|
-
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) :
|
|
27996
|
+
style: normalizeStyle(r_.value)
|
|
27997
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : zg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
|
|
27994
27998
|
mode: "spin",
|
|
27995
27999
|
size: "small",
|
|
27996
28000
|
theme: "primary"
|
|
27997
28001
|
})])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
27998
28002
|
createCommentVNode(" 内容区:欢迎状态 "),
|
|
27999
|
-
|
|
28003
|
+
$g.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), e_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: e_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
|
|
28000
28004
|
ref_key: "messagesContainerRef",
|
|
28001
28005
|
ref: s,
|
|
28002
28006
|
class: "chatbot-messages"
|
|
28003
|
-
}, [
|
|
28007
|
+
}, [Xg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
|
|
28004
28008
|
mode: "spin",
|
|
28005
28009
|
size: "small",
|
|
28006
28010
|
theme: "primary"
|
|
@@ -28008,56 +28012,59 @@ var UIStateManager = class {
|
|
|
28008
28012
|
key: 1,
|
|
28009
28013
|
"selected-messages": m.value,
|
|
28010
28014
|
"onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
|
|
28011
|
-
"enable-selection":
|
|
28015
|
+
"enable-selection": Vg.value,
|
|
28012
28016
|
"message-status": B.value,
|
|
28013
28017
|
"message-tools-status": H.value,
|
|
28014
|
-
|
|
28018
|
+
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28019
|
+
messages: Yg.value,
|
|
28015
28020
|
"on-agent-action": G,
|
|
28016
28021
|
"on-agent-feedback": K,
|
|
28017
28022
|
"on-user-action": $,
|
|
28018
|
-
"on-user-input-confirm":
|
|
28019
|
-
"on-user-shortcut-confirm":
|
|
28020
|
-
onStopStreaming:
|
|
28023
|
+
"on-user-input-confirm": Ag,
|
|
28024
|
+
"on-user-shortcut-confirm": jg,
|
|
28025
|
+
onStopStreaming: Ig
|
|
28021
28026
|
}, null, 8, [
|
|
28022
28027
|
"selected-messages",
|
|
28023
28028
|
"enable-selection",
|
|
28024
28029
|
"message-status",
|
|
28025
28030
|
"message-tools-status",
|
|
28031
|
+
"message-tools-tippy-options",
|
|
28026
28032
|
"messages"
|
|
28027
28033
|
]))], 512)], 2112)),
|
|
28028
28034
|
createCommentVNode(" 统一底部区域 "),
|
|
28029
|
-
|
|
28035
|
+
!$g.value && Vg.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28030
28036
|
key: 2,
|
|
28031
|
-
"is-all-selected": m.value.length ===
|
|
28032
|
-
loading:
|
|
28037
|
+
"is-all-selected": m.value.length === Yg.value.length,
|
|
28038
|
+
loading: Hg.value,
|
|
28033
28039
|
"selected-count": m.value.length,
|
|
28034
|
-
onCancel:
|
|
28035
|
-
onConfirm:
|
|
28036
|
-
onToggleAll:
|
|
28040
|
+
onCancel: a_,
|
|
28041
|
+
onConfirm: c_,
|
|
28042
|
+
onToggleAll: u_
|
|
28037
28043
|
}, null, 8, [
|
|
28038
28044
|
"is-all-selected",
|
|
28039
28045
|
"loading",
|
|
28040
28046
|
"selected-count"
|
|
28041
28047
|
])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
|
|
28042
|
-
onClose:
|
|
28043
|
-
onSubmit:
|
|
28048
|
+
onClose: C_,
|
|
28049
|
+
onSubmit: T_
|
|
28044
28050
|
}), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
|
|
28045
28051
|
ref_key: "chatInputRef",
|
|
28046
28052
|
ref: l,
|
|
28047
|
-
modelValue:
|
|
28048
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
28049
|
-
cite:
|
|
28050
|
-
"onUpdate:cite": n[2] ||= (e) =>
|
|
28053
|
+
modelValue: qg.value,
|
|
28054
|
+
"onUpdate:modelValue": n[1] ||= (e) => qg.value = e,
|
|
28055
|
+
cite: Jg.value,
|
|
28056
|
+
"onUpdate:cite": n[2] ||= (e) => Jg.value = e,
|
|
28051
28057
|
"message-status": B.value,
|
|
28052
|
-
"on-send-message":
|
|
28053
|
-
"on-stop-sending":
|
|
28054
|
-
"on-upload":
|
|
28058
|
+
"on-send-message": h_,
|
|
28059
|
+
"on-stop-sending": __,
|
|
28060
|
+
"on-upload": m_,
|
|
28055
28061
|
placeholder: i.placeholder,
|
|
28056
|
-
prompts:
|
|
28057
|
-
resources:
|
|
28062
|
+
prompts: n_.value,
|
|
28063
|
+
resources: t_.value,
|
|
28058
28064
|
"shortcut-id": u.value?.id,
|
|
28059
|
-
shortcuts:
|
|
28060
|
-
|
|
28065
|
+
shortcuts: i_.value,
|
|
28066
|
+
onDeleteShortcut: C_,
|
|
28067
|
+
onSelectShortcut: y_
|
|
28061
28068
|
}, null, 8, [
|
|
28062
28069
|
"modelValue",
|
|
28063
28070
|
"cite",
|
|
@@ -28858,7 +28865,7 @@ function useDraggable(e = {}, n) {
|
|
|
28858
28865
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
28859
28866
|
}, q = (e, n) => {
|
|
28860
28867
|
v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
|
|
28861
|
-
},
|
|
28868
|
+
}, Tg = (e, n) => {
|
|
28862
28869
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28863
28870
|
};
|
|
28864
28871
|
return onMounted(() => {
|
|
@@ -28880,9 +28887,9 @@ function useDraggable(e = {}, n) {
|
|
|
28880
28887
|
handleResizeStop: H,
|
|
28881
28888
|
toggleCompression: K,
|
|
28882
28889
|
updatePosition: q,
|
|
28883
|
-
updateSize:
|
|
28890
|
+
updateSize: Tg,
|
|
28884
28891
|
updatePositionAndSize: (e, n, r, i) => {
|
|
28885
|
-
q(e, n),
|
|
28892
|
+
q(e, n), Tg(r, i);
|
|
28886
28893
|
}
|
|
28887
28894
|
};
|
|
28888
28895
|
}
|
|
@@ -28954,11 +28961,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28954
28961
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
28955
28962
|
e.style.pointerEvents = "";
|
|
28956
28963
|
});
|
|
28957
|
-
},
|
|
28964
|
+
}, Eg = (e, n) => {
|
|
28958
28965
|
o.value || (o.value = !0, J()), k(e, n);
|
|
28959
|
-
},
|
|
28966
|
+
}, Dg = (e, n, r, i) => {
|
|
28960
28967
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
28961
|
-
},
|
|
28968
|
+
}, Og = (e, n) => {
|
|
28962
28969
|
I(e, n), o.value = !1, Z();
|
|
28963
28970
|
}, $ = (e, n, r, i) => {
|
|
28964
28971
|
L(e, n, r, i), o.value = !1, Z();
|
|
@@ -28990,9 +28997,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28990
28997
|
"prevent-deactivation": !0,
|
|
28991
28998
|
"drag-handle": i.dragHandle,
|
|
28992
28999
|
"class-name": "draggable-container-inner",
|
|
28993
|
-
onDragging:
|
|
28994
|
-
onResizing:
|
|
28995
|
-
onDragStop:
|
|
29000
|
+
onDragging: Eg,
|
|
29001
|
+
onResizing: Dg,
|
|
29002
|
+
onDragStop: Og,
|
|
28996
29003
|
onResizeStop: $
|
|
28997
29004
|
}, {
|
|
28998
29005
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
@@ -29236,9 +29243,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29236
29243
|
}), K = I, q = new SessionBusinessManager(K.session, K.message, null, {
|
|
29237
29244
|
enableChatSession: i.enableChatSession,
|
|
29238
29245
|
initialSessionCode: i.initialSessionCode
|
|
29239
|
-
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value),
|
|
29246
|
+
}), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Og = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), Ag = ref(!1), jg = ref(""), Ng = { appendTo: (e) => {
|
|
29247
|
+
let n = e.closest(".draggable-container-content");
|
|
29248
|
+
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29249
|
+
} }, Pg = computed(() => m.isCompressed.value), Fg = computed(() => B.value), Ig = ref(""), Lg = ref(!0), Rg = ref(!1), zg = computed(() => i.resources?.length ? i.resources : flattenResources(z.value?.resources)), Vg = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Hg = computed(() => {
|
|
29240
29250
|
let e = $.effectiveShortcuts.value;
|
|
29241
|
-
return typeof i.shortcutFilter == "function" &&
|
|
29251
|
+
return typeof i.shortcutFilter == "function" && jg.value ? e.filter((e) => i.shortcutFilter?.(e, jg.value)) : e;
|
|
29242
29252
|
});
|
|
29243
29253
|
watch(() => L.value, async (e) => {
|
|
29244
29254
|
if (e && z.value) {
|
|
@@ -29268,12 +29278,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29268
29278
|
m.hidePanel();
|
|
29269
29279
|
}, Gg = () => {
|
|
29270
29280
|
Wg();
|
|
29271
|
-
},
|
|
29281
|
+
}, qg = () => {
|
|
29272
29282
|
m.handleNimbusClick();
|
|
29273
29283
|
}, Jg = (e) => {
|
|
29274
|
-
|
|
29275
|
-
},
|
|
29276
|
-
|
|
29284
|
+
jg.value = e;
|
|
29285
|
+
}, Xg = async (e, n) => {
|
|
29286
|
+
Ag.value = !1, await Ug(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29277
29287
|
shortcut: e,
|
|
29278
29288
|
source: "popup"
|
|
29279
29289
|
});
|
|
@@ -29297,7 +29307,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29297
29307
|
j.historyClick(e);
|
|
29298
29308
|
}, o_ = async (e) => {
|
|
29299
29309
|
await q.switchSession(e);
|
|
29300
|
-
},
|
|
29310
|
+
}, c_ = async (e) => {
|
|
29301
29311
|
await q.deleteSession(e);
|
|
29302
29312
|
}, l_ = async (e, n) => {
|
|
29303
29313
|
await q.updateSessionName(e, n);
|
|
@@ -29337,7 +29347,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29337
29347
|
}, m_ = () => {
|
|
29338
29348
|
Z.disableSelectionMode();
|
|
29339
29349
|
}, h_ = async (e) => {
|
|
29340
|
-
|
|
29350
|
+
Og.value = !0;
|
|
29341
29351
|
try {
|
|
29342
29352
|
let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
|
|
29343
29353
|
await copyToClipboard(n), Message({
|
|
@@ -29347,7 +29357,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29347
29357
|
} catch (e) {
|
|
29348
29358
|
console.error("[AIBlueking] Failed to share messages:", e), D_(e);
|
|
29349
29359
|
} finally {
|
|
29350
|
-
|
|
29360
|
+
Og.value = !1;
|
|
29351
29361
|
}
|
|
29352
29362
|
}, g_ = async (e) => {
|
|
29353
29363
|
l.value && await l.value.sendMessage(e);
|
|
@@ -29456,7 +29466,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29456
29466
|
onClose: Gg,
|
|
29457
29467
|
onHelpClick: d_,
|
|
29458
29468
|
onHistoryClick: a_,
|
|
29459
|
-
onHistorySessionDelete:
|
|
29469
|
+
onHistorySessionDelete: c_,
|
|
29460
29470
|
onHistorySessionRename: l_,
|
|
29461
29471
|
onHistorySessionSwitch: o_,
|
|
29462
29472
|
onNewChat: i_,
|
|
@@ -29488,12 +29498,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29488
29498
|
"chat-helper": unref(K),
|
|
29489
29499
|
"enable-selection": Q.value,
|
|
29490
29500
|
"hello-text": i.helloText,
|
|
29501
|
+
"message-tools-tippy-options": Ng,
|
|
29491
29502
|
placeholder: i.placeholder,
|
|
29492
|
-
prompts:
|
|
29503
|
+
prompts: Vg.value,
|
|
29493
29504
|
"request-options": i.requestOptions,
|
|
29494
29505
|
resources: zg.value,
|
|
29495
29506
|
"session-code": i.initialSessionCode,
|
|
29496
|
-
"share-loading":
|
|
29507
|
+
"share-loading": Og.value,
|
|
29497
29508
|
"shortcut-limit": i.shortcutLimit,
|
|
29498
29509
|
shortcuts: i.shortcuts,
|
|
29499
29510
|
url: u.value,
|
|
@@ -29544,7 +29555,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29544
29555
|
"onUpdate:isPanelShow": n[5] ||= (e) => isRef(v) ? v.value = e : null,
|
|
29545
29556
|
"default-minimize": i.defaultMinimize,
|
|
29546
29557
|
size: i.nimbusSize,
|
|
29547
|
-
onClick:
|
|
29558
|
+
onClick: qg
|
|
29548
29559
|
}, null, 8, [
|
|
29549
29560
|
"is-minimize",
|
|
29550
29561
|
"is-panel-show",
|
|
@@ -29554,11 +29565,11 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29554
29565
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29555
29566
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29556
29567
|
key: 1,
|
|
29557
|
-
visible:
|
|
29558
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29568
|
+
visible: Ag.value,
|
|
29569
|
+
"onUpdate:visible": n[6] ||= (e) => Ag.value = e,
|
|
29559
29570
|
"max-shortcut-count": i.shortcutLimit,
|
|
29560
29571
|
shortcuts: Hg.value,
|
|
29561
|
-
onSelectShortcut:
|
|
29572
|
+
onSelectShortcut: Xg,
|
|
29562
29573
|
onSelectionChange: Jg
|
|
29563
29574
|
}, null, 8, [
|
|
29564
29575
|
"visible",
|
|
@@ -29567,7 +29578,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29567
29578
|
])) : createCommentVNode("v-if", !0)
|
|
29568
29579
|
], 2)], 8, ["to"]));
|
|
29569
29580
|
}
|
|
29570
|
-
}), [["__scopeId", "data-v-
|
|
29581
|
+
}), [["__scopeId", "data-v-ea4d9dfb"]]), vue2_default = {
|
|
29571
29582
|
name: "AIBluekingV2",
|
|
29572
29583
|
render(e) {
|
|
29573
29584
|
return e("div", { style: {
|