@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
|
@@ -721,25 +721,25 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
721
721
|
i.value &&= (k.value?.removeAllRanges(), !1);
|
|
722
722
|
}, B = (e) => {
|
|
723
723
|
z(), a("selectShortcut", e, O.value);
|
|
724
|
-
}, H = null,
|
|
724
|
+
}, H = null, Eg = (e) => {
|
|
725
725
|
H && clearTimeout(H), H = window.setTimeout(() => {
|
|
726
726
|
L();
|
|
727
727
|
}, e);
|
|
728
|
-
},
|
|
729
|
-
|
|
728
|
+
}, Dg = () => {
|
|
729
|
+
Eg(200);
|
|
730
730
|
}, K = () => {
|
|
731
|
-
|
|
731
|
+
Eg(300);
|
|
732
732
|
}, J = (e) => {
|
|
733
733
|
i.value && l.value?.contains(e.target) || z();
|
|
734
|
-
},
|
|
734
|
+
}, Og = (e) => {
|
|
735
735
|
!k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
|
|
736
736
|
}, $ = () => {
|
|
737
737
|
d.value?.show();
|
|
738
738
|
};
|
|
739
739
|
return onMounted(() => {
|
|
740
|
-
document.addEventListener("selectionchange", K), document.addEventListener("mouseup",
|
|
740
|
+
document.addEventListener("selectionchange", K), document.addEventListener("mouseup", Dg), document.addEventListener("mousedown", J), document.addEventListener("scroll", Og, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
|
|
741
741
|
}), onUnmounted(() => {
|
|
742
|
-
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup",
|
|
742
|
+
document.removeEventListener("selectionchange", K), document.removeEventListener("mouseup", Dg), document.removeEventListener("mousedown", J), document.removeEventListener("scroll", Og, !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,
|
|
@@ -1107,17 +1107,17 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1107
1107
|
}
|
|
1108
1108
|
function H() {
|
|
1109
1109
|
var e = i();
|
|
1110
|
-
if (B(e)) return
|
|
1110
|
+
if (B(e)) return Eg(e);
|
|
1111
1111
|
v = setTimeout(H, z(e));
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Eg(e) {
|
|
1114
1114
|
return v = void 0, j && d ? I(e) : (d = m = void 0, _);
|
|
1115
1115
|
}
|
|
1116
1116
|
function G() {
|
|
1117
1117
|
v !== void 0 && clearTimeout(v), E = 0, d = T = m = v = void 0;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
return v === void 0 ? _ :
|
|
1119
|
+
function Dg() {
|
|
1120
|
+
return v === void 0 ? _ : Eg(i());
|
|
1121
1121
|
}
|
|
1122
1122
|
function K() {
|
|
1123
1123
|
var e = i(), r = B(e);
|
|
@@ -1127,7 +1127,7 @@ var _hoisted_1$41 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
1127
1127
|
}
|
|
1128
1128
|
return v === void 0 && (v = setTimeout(H, n)), _;
|
|
1129
1129
|
}
|
|
1130
|
-
return K.cancel = G, K.flush =
|
|
1130
|
+
return K.cancel = G, K.flush = Dg, K;
|
|
1131
1131
|
}
|
|
1132
1132
|
n.exports = u;
|
|
1133
1133
|
})), require_throttle = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
@@ -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
|
|
4800
|
+
var Eg = /\b\B/, G = "[a-zA-Z]\\w*", Dg = "[a-zA-Z_]\\w*", K = "\\b\\d+(\\.\\d+)?", q = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", J = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Og = (e = {}) => {
|
|
4801
4801
|
let n = /^#![ ]*\//;
|
|
4802
4802
|
return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
|
|
4803
4803
|
scope: "meta",
|
|
@@ -4811,7 +4811,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4811
4811
|
}, Q = {
|
|
4812
4812
|
begin: "\\\\[\\s\\S]",
|
|
4813
4813
|
relevance: 0
|
|
4814
|
-
},
|
|
4814
|
+
}, kg = {
|
|
4815
4815
|
scope: "string",
|
|
4816
4816
|
begin: "'",
|
|
4817
4817
|
end: "'",
|
|
@@ -4823,7 +4823,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4823
4823
|
end: "\"",
|
|
4824
4824
|
illegal: "\\n",
|
|
4825
4825
|
contains: [Q]
|
|
4826
|
-
},
|
|
4826
|
+
}, Ag = { 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/ }, jg = function(e, n, r = {}) {
|
|
4827
4827
|
let i = o({
|
|
4828
4828
|
scope: "comment",
|
|
4829
4829
|
begin: e,
|
|
@@ -4839,19 +4839,19 @@ 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
|
+
}, Mg = jg("//", "$"), Ng = jg("/\\*", "\\*/"), Pg = jg("#", "$"), Fg = {
|
|
4843
4843
|
scope: "number",
|
|
4844
4844
|
begin: K,
|
|
4845
4845
|
relevance: 0
|
|
4846
|
-
},
|
|
4846
|
+
}, Ig = {
|
|
4847
4847
|
scope: "number",
|
|
4848
4848
|
begin: q,
|
|
4849
4849
|
relevance: 0
|
|
4850
|
-
},
|
|
4850
|
+
}, Lg = {
|
|
4851
4851
|
scope: "number",
|
|
4852
4852
|
begin: J,
|
|
4853
4853
|
relevance: 0
|
|
4854
|
-
},
|
|
4854
|
+
}, Rg = {
|
|
4855
4855
|
scope: "regexp",
|
|
4856
4856
|
begin: /\/(?=[^/\n]*\/)/,
|
|
4857
4857
|
end: /\/[gimuy]*/,
|
|
@@ -4861,27 +4861,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
4861
4861
|
relevance: 0,
|
|
4862
4862
|
contains: [Q]
|
|
4863
4863
|
}]
|
|
4864
|
-
},
|
|
4864
|
+
}, zg = {
|
|
4865
4865
|
scope: "title",
|
|
4866
4866
|
begin: G,
|
|
4867
4867
|
relevance: 0
|
|
4868
|
-
},
|
|
4868
|
+
}, Bg = {
|
|
4869
4869
|
scope: "title",
|
|
4870
|
-
begin:
|
|
4870
|
+
begin: Dg,
|
|
4871
4871
|
relevance: 0
|
|
4872
|
-
},
|
|
4873
|
-
begin: "\\.\\s*" +
|
|
4872
|
+
}, Vg = {
|
|
4873
|
+
begin: "\\.\\s*" + Dg,
|
|
4874
4874
|
relevance: 0
|
|
4875
|
-
},
|
|
4875
|
+
}, Hg = /* @__PURE__ */ Object.freeze({
|
|
4876
4876
|
__proto__: null,
|
|
4877
|
-
APOS_STRING_MODE:
|
|
4877
|
+
APOS_STRING_MODE: kg,
|
|
4878
4878
|
BACKSLASH_ESCAPE: Q,
|
|
4879
|
-
BINARY_NUMBER_MODE:
|
|
4879
|
+
BINARY_NUMBER_MODE: Lg,
|
|
4880
4880
|
BINARY_NUMBER_RE: J,
|
|
4881
|
-
COMMENT:
|
|
4882
|
-
C_BLOCK_COMMENT_MODE:
|
|
4883
|
-
C_LINE_COMMENT_MODE:
|
|
4884
|
-
C_NUMBER_MODE:
|
|
4881
|
+
COMMENT: jg,
|
|
4882
|
+
C_BLOCK_COMMENT_MODE: Ng,
|
|
4883
|
+
C_LINE_COMMENT_MODE: Mg,
|
|
4884
|
+
C_NUMBER_MODE: Ig,
|
|
4885
4885
|
C_NUMBER_RE: q,
|
|
4886
4886
|
END_SAME_AS_BEGIN: function(e) {
|
|
4887
4887
|
return Object.assign(e, {
|
|
@@ -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: Pg,
|
|
4897
4897
|
IDENT_RE: G,
|
|
4898
|
-
MATCH_NOTHING_RE:
|
|
4899
|
-
METHOD_GUARD:
|
|
4900
|
-
NUMBER_MODE:
|
|
4898
|
+
MATCH_NOTHING_RE: Eg,
|
|
4899
|
+
METHOD_GUARD: Vg,
|
|
4900
|
+
NUMBER_MODE: Fg,
|
|
4901
4901
|
NUMBER_RE: K,
|
|
4902
|
-
PHRASAL_WORDS_MODE:
|
|
4902
|
+
PHRASAL_WORDS_MODE: Ag,
|
|
4903
4903
|
QUOTE_STRING_MODE: $,
|
|
4904
|
-
REGEXP_MODE:
|
|
4904
|
+
REGEXP_MODE: Rg,
|
|
4905
4905
|
RE_STARTERS_RE: Z,
|
|
4906
|
-
SHEBANG:
|
|
4907
|
-
TITLE_MODE:
|
|
4908
|
-
UNDERSCORE_IDENT_RE:
|
|
4909
|
-
UNDERSCORE_TITLE_MODE:
|
|
4906
|
+
SHEBANG: Og,
|
|
4907
|
+
TITLE_MODE: zg,
|
|
4908
|
+
UNDERSCORE_IDENT_RE: Dg,
|
|
4909
|
+
UNDERSCORE_TITLE_MODE: Bg
|
|
4910
4910
|
});
|
|
4911
|
-
function
|
|
4911
|
+
function Ug(e, n) {
|
|
4912
4912
|
e.input[e.index - 1] === "." && n.ignoreMatch();
|
|
4913
4913
|
}
|
|
4914
|
-
function
|
|
4914
|
+
function Wg(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 Gg(e, n) {
|
|
4918
|
+
n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Ug, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
4919
4919
|
}
|
|
4920
|
-
function
|
|
4920
|
+
function Kg(e, n) {
|
|
4921
4921
|
Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
|
|
4922
4922
|
}
|
|
4923
|
-
function
|
|
4923
|
+
function qg(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 Jg(e, n) {
|
|
4930
4930
|
e.relevance === void 0 && (e.relevance = 1);
|
|
4931
4931
|
}
|
|
4932
|
-
var
|
|
4932
|
+
var Yg = (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
|
+
}, Xg = [
|
|
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
|
+
], Zg = "keyword";
|
|
4955
|
+
function Qg(e, n, r = Zg) {
|
|
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, Qg(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, $g(r[0], r[1])];
|
|
4964
4964
|
});
|
|
4965
4965
|
}
|
|
4966
4966
|
}
|
|
4967
|
-
function
|
|
4968
|
-
return n ? Number(n) :
|
|
4967
|
+
function $g(e, n) {
|
|
4968
|
+
return n ? Number(n) : e_(e) ? 0 : 1;
|
|
4969
4969
|
}
|
|
4970
|
-
function
|
|
4971
|
-
return
|
|
4970
|
+
function e_(e) {
|
|
4971
|
+
return Xg.includes(e.toLowerCase());
|
|
4972
4972
|
}
|
|
4973
|
-
var
|
|
4973
|
+
var t_ = {}, n_ = (e) => {
|
|
4974
4974
|
console.error(e);
|
|
4975
|
-
},
|
|
4975
|
+
}, r_ = (e, ...n) => {
|
|
4976
4976
|
console.log(`WARN: ${e}`, ...n);
|
|
4977
|
-
},
|
|
4978
|
-
|
|
4979
|
-
},
|
|
4980
|
-
function
|
|
4977
|
+
}, i_ = (e, n) => {
|
|
4978
|
+
t_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), t_[`${e}/${n}`] = !0);
|
|
4979
|
+
}, a_ = /* @__PURE__ */ Error();
|
|
4980
|
+
function o_(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 s_(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 n_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), a_;
|
|
4988
|
+
if (typeof e.beginScope != "object" || e.beginScope === null) throw n_("beginScope must be object"), a_;
|
|
4989
|
+
o_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
function
|
|
4992
|
+
function c_(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 n_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), a_;
|
|
4995
|
+
if (typeof e.endScope != "object" || e.endScope === null) throw n_("endScope must be object"), a_;
|
|
4996
|
+
o_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
|
|
4997
4997
|
}
|
|
4998
4998
|
}
|
|
4999
|
-
function
|
|
4999
|
+
function l_(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 u_(e) {
|
|
5003
|
+
l_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), s_(e), c_(e);
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function d_(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
|
-
Jg,
|
|
5069
|
-
d_,
|
|
5070
|
-
Xg
|
|
5071
|
-
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
-
Kg,
|
|
5067
|
+
Wg,
|
|
5073
5068
|
qg,
|
|
5069
|
+
u_,
|
|
5074
5070
|
Yg
|
|
5071
|
+
].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
|
|
5072
|
+
Gg,
|
|
5073
|
+
Kg,
|
|
5074
|
+
Jg
|
|
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 &&= Qg(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 p_(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 f_(e) {
|
|
5087
|
+
return e ? e.endsWithParent || f_(e.starts) : !1;
|
|
5088
5088
|
}
|
|
5089
|
-
function
|
|
5089
|
+
function p_(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 : f_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
|
|
5093
5093
|
}
|
|
5094
|
-
var
|
|
5094
|
+
var m_ = "11.11.1", h_ = class extends Error {
|
|
5095
5095
|
constructor(e, n) {
|
|
5096
5096
|
super(e), this.name = "HTMLInjectionError", this.html = n;
|
|
5097
5097
|
}
|
|
5098
|
-
},
|
|
5098
|
+
}, g_ = a, __ = o, v_ = Symbol("nomatch"), y_ = 7, b_ = 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 = kg(r[1]);
|
|
5122
|
+
return n || (r_(l.replace("{}", r[1])), r_("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) || kg(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) : (i_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), i_("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
|
|
5129
5129
|
let o = {
|
|
5130
5130
|
code: i,
|
|
5131
5131
|
language: a
|
|
5132
5132
|
};
|
|
5133
|
-
|
|
5133
|
+
Pg("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, Pg("after:highlight", s), s;
|
|
5136
5136
|
}
|
|
5137
5137
|
function j(e, r, a, o) {
|
|
5138
5138
|
let u = Object.create(null);
|
|
@@ -5152,7 +5152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5152
5152
|
let i = K.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Z, i);
|
|
5153
5153
|
if (a) {
|
|
5154
5154
|
let [e, o] = a;
|
|
5155
|
-
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <=
|
|
5155
|
+
if (Q.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= y_ && (Ag += o), e.startsWith("_")) r += n[0];
|
|
5156
5156
|
else {
|
|
5157
5157
|
let r = K.classNameAliases[e] || e;
|
|
5158
5158
|
T(n[0], r);
|
|
@@ -5170,9 +5170,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5170
5170
|
Q.addText($);
|
|
5171
5171
|
return;
|
|
5172
5172
|
}
|
|
5173
|
-
e = j(Z.subLanguage, $, !0,
|
|
5173
|
+
e = j(Z.subLanguage, $, !0, Og[Z.subLanguage]), Og[Z.subLanguage] = e._top;
|
|
5174
5174
|
} else e = B($, Z.subLanguage.length ? Z.subLanguage : null);
|
|
5175
|
-
Z.relevance > 0 && (
|
|
5175
|
+
Z.relevance > 0 && (Ag += e.relevance), Q.__addSublanguage(e._emitter, e.language);
|
|
5176
5176
|
}
|
|
5177
5177
|
function v() {
|
|
5178
5178
|
Z.subLanguage == null ? g() : _(), $ = "";
|
|
@@ -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 Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (
|
|
5212
|
+
return Z.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Ng = !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,21 +5218,21 @@ 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(Z, e, i);
|
|
5221
|
-
if (!a) return
|
|
5221
|
+
if (!a) return v_;
|
|
5222
5222
|
let o = Z;
|
|
5223
5223
|
Z.endScope && Z.endScope._wrap ? (v(), T(n, Z.endScope._wrap)) : Z.endScope && Z.endScope._multi ? (v(), E(Z.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
|
|
5224
5224
|
do
|
|
5225
|
-
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (
|
|
5225
|
+
Z.scope && Q.closeNode(), !Z.skip && !Z.subLanguage && (Ag += Z.relevance), Z = Z.parent;
|
|
5226
5226
|
while (Z !== a.parent);
|
|
5227
5227
|
return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
|
|
5228
5228
|
}
|
|
5229
|
-
function
|
|
5229
|
+
function Eg() {
|
|
5230
5230
|
let e = [];
|
|
5231
5231
|
for (let n = Z; n !== K; n = n.parent) n.scope && e.unshift(n.scope);
|
|
5232
5232
|
e.forEach((e) => Q.openNode(e));
|
|
5233
5233
|
}
|
|
5234
5234
|
let G = {};
|
|
5235
|
-
function
|
|
5235
|
+
function Dg(n, i) {
|
|
5236
5236
|
let o = i && i[0];
|
|
5237
5237
|
if ($ += n, o == null) return v(), 0;
|
|
5238
5238
|
if (G.type === "begin" && i.type === "end" && G.index === i.index && o === "") {
|
|
@@ -5248,33 +5248,33 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5248
5248
|
throw e.mode = Z, e;
|
|
5249
5249
|
} else if (i.type === "end") {
|
|
5250
5250
|
let e = H(i);
|
|
5251
|
-
if (e !==
|
|
5251
|
+
if (e !== v_) return e;
|
|
5252
5252
|
}
|
|
5253
5253
|
if (i.type === "illegal" && o === "") return $ += "\n", 1;
|
|
5254
|
-
if (
|
|
5254
|
+
if (Mg > 1e5 && Mg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
5255
5255
|
return $ += o, o.length;
|
|
5256
5256
|
}
|
|
5257
|
-
let K =
|
|
5258
|
-
if (!K) throw
|
|
5259
|
-
let q =
|
|
5260
|
-
|
|
5261
|
-
let $ = "",
|
|
5257
|
+
let K = kg(e);
|
|
5258
|
+
if (!K) throw n_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
5259
|
+
let q = d_(K), J = "", Z = o || q, Og = {}, Q = new d.__emitter(d);
|
|
5260
|
+
Eg();
|
|
5261
|
+
let $ = "", Ag = 0, jg = 0, Mg = 0, Ng = !1;
|
|
5262
5262
|
try {
|
|
5263
5263
|
if (K.__emitTokens) K.__emitTokens(r, Q);
|
|
5264
5264
|
else {
|
|
5265
5265
|
for (Z.matcher.considerAll();;) {
|
|
5266
|
-
|
|
5266
|
+
Mg++, Ng ? Ng = !1 : Z.matcher.considerAll(), Z.matcher.lastIndex = jg;
|
|
5267
5267
|
let e = Z.matcher.exec(r);
|
|
5268
5268
|
if (!e) break;
|
|
5269
|
-
let n =
|
|
5270
|
-
|
|
5269
|
+
let n = Dg(r.substring(jg, e.index), e);
|
|
5270
|
+
jg = e.index + n;
|
|
5271
5271
|
}
|
|
5272
|
-
|
|
5272
|
+
Dg(r.substring(jg));
|
|
5273
5273
|
}
|
|
5274
5274
|
return Q.finalize(), J = Q.toHTML(), {
|
|
5275
5275
|
language: e,
|
|
5276
5276
|
value: J,
|
|
5277
|
-
relevance:
|
|
5277
|
+
relevance: Ag,
|
|
5278
5278
|
illegal: !1,
|
|
5279
5279
|
_emitter: Q,
|
|
5280
5280
|
_top: Z
|
|
@@ -5282,13 +5282,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5282
5282
|
} catch (n) {
|
|
5283
5283
|
if (n.message && n.message.includes("Illegal")) return {
|
|
5284
5284
|
language: e,
|
|
5285
|
-
value:
|
|
5285
|
+
value: g_(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: jg,
|
|
5291
|
+
context: r.slice(jg - 100, jg + 100),
|
|
5292
5292
|
mode: n.mode,
|
|
5293
5293
|
resultSoFar: J
|
|
5294
5294
|
},
|
|
@@ -5296,7 +5296,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5296
5296
|
};
|
|
5297
5297
|
if (s) return {
|
|
5298
5298
|
language: e,
|
|
5299
|
-
value:
|
|
5299
|
+
value: g_(r),
|
|
5300
5300
|
illegal: !1,
|
|
5301
5301
|
relevance: 0,
|
|
5302
5302
|
errorRaised: 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: g_(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(kg).filter(Ag).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 (kg(e.language).supersetOf === n.language) return 1;
|
|
5327
|
+
if (kg(n.language).supersetOf === e.language) return -1;
|
|
5328
5328
|
}
|
|
5329
5329
|
return 0;
|
|
5330
5330
|
}), l = o;
|
|
@@ -5334,17 +5334,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5334
5334
|
let i = n && a[n] || r;
|
|
5335
5335
|
e.classList.add("hljs"), e.classList.add(`language-${i}`);
|
|
5336
5336
|
}
|
|
5337
|
-
function
|
|
5337
|
+
function Eg(e) {
|
|
5338
5338
|
let n = null, r = g(e);
|
|
5339
5339
|
if (m(r)) return;
|
|
5340
|
-
if (
|
|
5340
|
+
if (Pg("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 h_("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,20 +5357,20 @@ 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
|
+
}), Pg("after:highlightElement", {
|
|
5361
5361
|
el: e,
|
|
5362
5362
|
result: a,
|
|
5363
5363
|
text: i
|
|
5364
5364
|
});
|
|
5365
5365
|
}
|
|
5366
5366
|
function G(e) {
|
|
5367
|
-
d =
|
|
5367
|
+
d = __(d, e);
|
|
5368
5368
|
}
|
|
5369
|
-
let
|
|
5370
|
-
J(),
|
|
5369
|
+
let Dg = () => {
|
|
5370
|
+
J(), i_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
5371
5371
|
};
|
|
5372
5372
|
function K() {
|
|
5373
|
-
J(),
|
|
5373
|
+
J(), i_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
5374
5374
|
}
|
|
5375
5375
|
let q = !1;
|
|
5376
5376
|
function J() {
|
|
@@ -5381,27 +5381,27 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
5381
5381
|
q || window.addEventListener("DOMContentLoaded", e, !1), q = !0;
|
|
5382
5382
|
return;
|
|
5383
5383
|
}
|
|
5384
|
-
document.querySelectorAll(d.cssSelector).forEach(
|
|
5384
|
+
document.querySelectorAll(d.cssSelector).forEach(Eg);
|
|
5385
5385
|
}
|
|
5386
5386
|
function Z(r, i) {
|
|
5387
5387
|
let a = null;
|
|
5388
5388
|
try {
|
|
5389
5389
|
a = i(e);
|
|
5390
5390
|
} catch (e) {
|
|
5391
|
-
if (
|
|
5391
|
+
if (n_("Language definition for '{}' could not be registered.".replace("{}", r)), s) n_(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 Og(e) {
|
|
5398
5398
|
delete n[e];
|
|
5399
5399
|
for (let n of Object.keys(a)) a[n] === e && delete a[n];
|
|
5400
5400
|
}
|
|
5401
5401
|
function Q() {
|
|
5402
5402
|
return Object.keys(n);
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function kg(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 Ag(e) {
|
|
5413
|
+
let n = kg(e);
|
|
5414
5414
|
return n && !n.disableAutodetect;
|
|
5415
5415
|
}
|
|
5416
|
-
function
|
|
5416
|
+
function jg(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 Mg(e) {
|
|
5424
|
+
jg(e), o.push(e);
|
|
5425
5425
|
}
|
|
5426
|
-
function
|
|
5426
|
+
function Ng(e) {
|
|
5427
5427
|
let n = o.indexOf(e);
|
|
5428
5428
|
n !== -1 && o.splice(n, 1);
|
|
5429
5429
|
}
|
|
5430
|
-
function
|
|
5430
|
+
function Pg(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 Fg(e) {
|
|
5437
|
+
return i_("10.7.0", "highlightBlock will be removed entirely in v12.0"), i_("10.7.0", "Please use highlightElement now."), Eg(e);
|
|
5438
5438
|
}
|
|
5439
5439
|
for (let n in Object.assign(e, {
|
|
5440
5440
|
highlight: v,
|
|
5441
5441
|
highlightAuto: B,
|
|
5442
5442
|
highlightAll: J,
|
|
5443
|
-
highlightElement:
|
|
5444
|
-
highlightBlock:
|
|
5443
|
+
highlightElement: Eg,
|
|
5444
|
+
highlightBlock: Fg,
|
|
5445
5445
|
configure: G,
|
|
5446
|
-
initHighlighting:
|
|
5446
|
+
initHighlighting: Dg,
|
|
5447
5447
|
initHighlightingOnLoad: K,
|
|
5448
5448
|
registerLanguage: Z,
|
|
5449
|
-
unregisterLanguage:
|
|
5449
|
+
unregisterLanguage: Og,
|
|
5450
5450
|
listLanguages: Q,
|
|
5451
|
-
getLanguage:
|
|
5451
|
+
getLanguage: kg,
|
|
5452
5452
|
registerAliases: $,
|
|
5453
|
-
autoDetection:
|
|
5454
|
-
inherit:
|
|
5455
|
-
addPlugin:
|
|
5456
|
-
removePlugin:
|
|
5453
|
+
autoDetection: Ag,
|
|
5454
|
+
inherit: __,
|
|
5455
|
+
addPlugin: Mg,
|
|
5456
|
+
removePlugin: Ng
|
|
5457
5457
|
}), e.debugMode = function() {
|
|
5458
5458
|
s = !1;
|
|
5459
5459
|
}, e.safeMode = function() {
|
|
5460
5460
|
s = !0;
|
|
5461
|
-
}, e.versionString =
|
|
5461
|
+
}, e.versionString = m_, 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
|
+
}, Hg) typeof Hg[n] == "object" && r(Hg[n]);
|
|
5468
|
+
return Object.assign(e, Hg), e;
|
|
5469
|
+
}, x_ = b_({});
|
|
5470
|
+
x_.newInstance = () => b_({}), n.exports = x_, x_.HighlightJS = x_, x_.default = x_;
|
|
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 = {
|
|
@@ -11573,7 +11573,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11573
11573
|
},
|
|
11574
11574
|
z
|
|
11575
11575
|
]
|
|
11576
|
-
},
|
|
11576
|
+
}, Eg = {
|
|
11577
11577
|
scope: "computation-expression",
|
|
11578
11578
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
11579
11579
|
}, G = {
|
|
@@ -11584,7 +11584,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11584
11584
|
],
|
|
11585
11585
|
beginScope: { 2: "meta" },
|
|
11586
11586
|
end: a(/\s|$/)
|
|
11587
|
-
},
|
|
11587
|
+
}, Dg = { variants: [e.BINARY_NUMBER_MODE, e.C_NUMBER_MODE] }, K = {
|
|
11588
11588
|
scope: "string",
|
|
11589
11589
|
begin: /"/,
|
|
11590
11590
|
end: /"/,
|
|
@@ -11604,7 +11604,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11604
11604
|
begin: /\{/,
|
|
11605
11605
|
end: /\}/,
|
|
11606
11606
|
keywords: g
|
|
11607
|
-
},
|
|
11607
|
+
}, Og = {
|
|
11608
11608
|
scope: "string",
|
|
11609
11609
|
begin: /\$"/,
|
|
11610
11610
|
end: /"/,
|
|
@@ -11625,7 +11625,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11625
11625
|
e.BACKSLASH_ESCAPE,
|
|
11626
11626
|
Z
|
|
11627
11627
|
]
|
|
11628
|
-
},
|
|
11628
|
+
}, kg = {
|
|
11629
11629
|
scope: "string",
|
|
11630
11630
|
begin: /\$"""/,
|
|
11631
11631
|
end: /"""/,
|
|
@@ -11641,7 +11641,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11641
11641
|
};
|
|
11642
11642
|
Z.contains = [
|
|
11643
11643
|
Q,
|
|
11644
|
-
|
|
11644
|
+
Og,
|
|
11645
11645
|
q,
|
|
11646
11646
|
K,
|
|
11647
11647
|
$,
|
|
@@ -11649,16 +11649,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11649
11649
|
_,
|
|
11650
11650
|
T,
|
|
11651
11651
|
z,
|
|
11652
|
-
|
|
11652
|
+
Eg,
|
|
11653
11653
|
G,
|
|
11654
|
-
|
|
11654
|
+
Dg,
|
|
11655
11655
|
O,
|
|
11656
11656
|
j
|
|
11657
11657
|
];
|
|
11658
|
-
let
|
|
11659
|
-
Ag,
|
|
11660
|
-
Q,
|
|
11658
|
+
let Ag = { variants: [
|
|
11661
11659
|
kg,
|
|
11660
|
+
Q,
|
|
11661
|
+
Og,
|
|
11662
11662
|
J,
|
|
11663
11663
|
q,
|
|
11664
11664
|
K,
|
|
@@ -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
|
+
Ag,
|
|
11676
11676
|
_,
|
|
11677
11677
|
T,
|
|
11678
11678
|
H,
|
|
@@ -11687,14 +11687,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
11687
11687
|
q,
|
|
11688
11688
|
K,
|
|
11689
11689
|
$,
|
|
11690
|
-
|
|
11690
|
+
Dg
|
|
11691
11691
|
]
|
|
11692
11692
|
},
|
|
11693
11693
|
B,
|
|
11694
11694
|
z,
|
|
11695
|
-
|
|
11695
|
+
Eg,
|
|
11696
11696
|
G,
|
|
11697
|
-
|
|
11697
|
+
Dg,
|
|
11698
11698
|
O,
|
|
11699
11699
|
j
|
|
11700
11700
|
]
|
|
@@ -13808,7 +13808,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13808
13808
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
13809
13809
|
subLanguage: "graphql"
|
|
13810
13810
|
}
|
|
13811
|
-
},
|
|
13811
|
+
}, Eg = {
|
|
13812
13812
|
className: "string",
|
|
13813
13813
|
begin: "`",
|
|
13814
13814
|
end: "`",
|
|
@@ -13850,21 +13850,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13850
13850
|
e.C_BLOCK_COMMENT_MODE,
|
|
13851
13851
|
e.C_LINE_COMMENT_MODE
|
|
13852
13852
|
]
|
|
13853
|
-
},
|
|
13853
|
+
}, Dg = [
|
|
13854
13854
|
e.APOS_STRING_MODE,
|
|
13855
13855
|
e.QUOTE_STRING_MODE,
|
|
13856
13856
|
z,
|
|
13857
13857
|
B,
|
|
13858
13858
|
H,
|
|
13859
|
-
|
|
13859
|
+
Eg,
|
|
13860
13860
|
{ match: /\$\d+/ },
|
|
13861
13861
|
I
|
|
13862
13862
|
];
|
|
13863
|
-
L.contains =
|
|
13863
|
+
L.contains = Dg.concat({
|
|
13864
13864
|
begin: /\{/,
|
|
13865
13865
|
end: /\}/,
|
|
13866
13866
|
keywords: E,
|
|
13867
|
-
contains: ["self"].concat(
|
|
13867
|
+
contains: ["self"].concat(Dg)
|
|
13868
13868
|
});
|
|
13869
13869
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
13870
13870
|
begin: /(\s*)\(/,
|
|
@@ -13905,7 +13905,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13905
13905
|
1: "keyword",
|
|
13906
13906
|
3: "title.class"
|
|
13907
13907
|
}
|
|
13908
|
-
}] },
|
|
13908
|
+
}] }, Og = {
|
|
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",
|
|
@@ -13915,7 +13915,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13915
13915
|
className: "meta",
|
|
13916
13916
|
relevance: 10,
|
|
13917
13917
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
13918
|
-
},
|
|
13918
|
+
}, kg = {
|
|
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 Ag(e) {
|
|
13938
13938
|
return n.concat("(?!", e.join("|"), ")");
|
|
13939
13939
|
}
|
|
13940
|
-
let
|
|
13941
|
-
match: n.concat(/\b/,
|
|
13940
|
+
let jg = {
|
|
13941
|
+
match: n.concat(/\b/, Ag([
|
|
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
|
+
}, Mg = {
|
|
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
|
+
}, Ng = {
|
|
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: /\(\)/ }, J]
|
|
13967
|
-
},
|
|
13967
|
+
}, Pg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Fg = {
|
|
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(Pg)
|
|
13976
13976
|
],
|
|
13977
13977
|
keywords: "async",
|
|
13978
13978
|
className: {
|
|
@@ -13992,7 +13992,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
13992
13992
|
keywords: E,
|
|
13993
13993
|
exports: {
|
|
13994
13994
|
PARAMS_CONTAINS: q,
|
|
13995
|
-
CLASS_REFERENCE:
|
|
13995
|
+
CLASS_REFERENCE: Og
|
|
13996
13996
|
},
|
|
13997
13997
|
illegal: /#(?![$_A-z])/,
|
|
13998
13998
|
contains: [
|
|
@@ -14007,17 +14007,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14007
14007
|
z,
|
|
14008
14008
|
B,
|
|
14009
14009
|
H,
|
|
14010
|
-
|
|
14010
|
+
Eg,
|
|
14011
14011
|
G,
|
|
14012
14012
|
{ match: /\$\d+/ },
|
|
14013
14013
|
I,
|
|
14014
|
-
|
|
14014
|
+
Og,
|
|
14015
14015
|
{
|
|
14016
14016
|
scope: "attr",
|
|
14017
14017
|
match: g + n.lookahead(":"),
|
|
14018
14018
|
relevance: 0
|
|
14019
14019
|
},
|
|
14020
|
-
|
|
14020
|
+
Fg,
|
|
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: Pg,
|
|
14031
14031
|
returnBegin: !0,
|
|
14032
14032
|
end: "\\s*=>",
|
|
14033
14033
|
contains: [{
|
|
@@ -14084,7 +14084,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
14084
14084
|
}
|
|
14085
14085
|
]
|
|
14086
14086
|
},
|
|
14087
|
-
|
|
14087
|
+
kg,
|
|
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
|
+
Mg,
|
|
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: [J]
|
|
14111
14111
|
},
|
|
14112
|
-
|
|
14112
|
+
jg,
|
|
14113
14113
|
$,
|
|
14114
14114
|
Z,
|
|
14115
|
-
|
|
14115
|
+
Ng,
|
|
14116
14116
|
{ match: /\$[(.]/ }
|
|
14117
14117
|
]
|
|
14118
14118
|
};
|
|
@@ -15066,12 +15066,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
15066
15066
|
{ begin: "!important" },
|
|
15067
15067
|
n.FUNCTION_DISPATCH
|
|
15068
15068
|
]
|
|
15069
|
-
},
|
|
15069
|
+
}, Eg = {
|
|
15070
15070
|
begin: `[\\w-]+:(:)?(${i.join("|")})`,
|
|
15071
15071
|
returnBegin: !0,
|
|
15072
15072
|
contains: [H]
|
|
15073
15073
|
};
|
|
15074
|
-
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B,
|
|
15074
|
+
return _.push(e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, z, B, Eg, L, H, I, n.FUNCTION_DISPATCH), {
|
|
15075
15075
|
name: "Less",
|
|
15076
15076
|
case_insensitive: !0,
|
|
15077
15077
|
illegal: "[=>'/<($\"]",
|
|
@@ -17597,7 +17597,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17597
17597
|
3: "variable.language"
|
|
17598
17598
|
}
|
|
17599
17599
|
}
|
|
17600
|
-
] },
|
|
17600
|
+
] }, Eg = {
|
|
17601
17601
|
scope: "attr",
|
|
17602
17602
|
match: n.concat(i, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
17603
17603
|
}, G = {
|
|
@@ -17606,7 +17606,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17606
17606
|
end: /\)/,
|
|
17607
17607
|
keywords: I,
|
|
17608
17608
|
contains: [
|
|
17609
|
-
|
|
17609
|
+
Eg,
|
|
17610
17610
|
s,
|
|
17611
17611
|
H,
|
|
17612
17612
|
e.C_BLOCK_COMMENT_MODE,
|
|
@@ -17614,7 +17614,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17614
17614
|
E,
|
|
17615
17615
|
z
|
|
17616
17616
|
]
|
|
17617
|
-
},
|
|
17617
|
+
}, Dg = {
|
|
17618
17618
|
relevance: 0,
|
|
17619
17619
|
match: [
|
|
17620
17620
|
/\b/,
|
|
@@ -17626,9 +17626,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17626
17626
|
scope: { 3: "title.function.invoke" },
|
|
17627
17627
|
contains: [G]
|
|
17628
17628
|
};
|
|
17629
|
-
G.contains.push(
|
|
17629
|
+
G.contains.push(Dg);
|
|
17630
17630
|
let K = [
|
|
17631
|
-
|
|
17631
|
+
Eg,
|
|
17632
17632
|
H,
|
|
17633
17633
|
e.C_BLOCK_COMMENT_MODE,
|
|
17634
17634
|
T,
|
|
@@ -17690,7 +17690,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
17690
17690
|
match: /\$this\b/
|
|
17691
17691
|
},
|
|
17692
17692
|
s,
|
|
17693
|
-
|
|
17693
|
+
Dg,
|
|
17694
17694
|
H,
|
|
17695
17695
|
{
|
|
17696
17696
|
match: [
|
|
@@ -21046,7 +21046,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21046
21046
|
"unknown",
|
|
21047
21047
|
"usableFromInline",
|
|
21048
21048
|
"warn_unqualified_access"
|
|
21049
|
-
],
|
|
21049
|
+
], Eg = [
|
|
21050
21050
|
"iOS",
|
|
21051
21051
|
"iOSApplicationExtension",
|
|
21052
21052
|
"macOS",
|
|
@@ -21069,7 +21069,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21069
21069
|
}, I = {
|
|
21070
21070
|
match: a(/\./, s(...g)),
|
|
21071
21071
|
relevance: 0
|
|
21072
|
-
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]),
|
|
21072
|
+
}, G = g.filter((e) => typeof e == "string").concat(["_|0"]), Dg = { variants: [{
|
|
21073
21073
|
className: "keyword",
|
|
21074
21074
|
match: s(...g.filter((e) => typeof e != "string").concat(m).map(l), ...d)
|
|
21075
21075
|
}] }, K = {
|
|
@@ -21079,7 +21079,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21079
21079
|
}, q = [
|
|
21080
21080
|
O,
|
|
21081
21081
|
I,
|
|
21082
|
-
|
|
21082
|
+
Dg
|
|
21083
21083
|
], J = [{
|
|
21084
21084
|
match: a(/\./, s(...E)),
|
|
21085
21085
|
relevance: 0
|
|
@@ -21089,84 +21089,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21089
21089
|
}], Z = {
|
|
21090
21090
|
match: /->/,
|
|
21091
21091
|
relevance: 0
|
|
21092
|
-
},
|
|
21092
|
+
}, Og = [Z, {
|
|
21093
21093
|
className: "operator",
|
|
21094
21094
|
relevance: 0,
|
|
21095
21095
|
variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
|
|
21096
|
-
}], Q = "([0-9]_*)+",
|
|
21096
|
+
}], Q = "([0-9]_*)+", kg = "([0-9a-fA-F]_*)+", $ = {
|
|
21097
21097
|
className: "number",
|
|
21098
21098
|
relevance: 0,
|
|
21099
21099
|
variants: [
|
|
21100
21100
|
{ match: `\\b(${Q})(\\.(${Q}))?([eE][+-]?(${Q}))?\\b` },
|
|
21101
|
-
{ match: `\\b0x(${
|
|
21101
|
+
{ match: `\\b0x(${kg})(\\.(${kg}))?([pP][+-]?(${Q}))?\\b` },
|
|
21102
21102
|
{ match: /\b0o([0-7]_*)+\b/ },
|
|
21103
21103
|
{ match: /\b0b([01]_*)+\b/ }
|
|
21104
21104
|
]
|
|
21105
|
-
},
|
|
21105
|
+
}, Ag = (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
|
+
}), jg = (e = "") => ({
|
|
21109
21109
|
className: "subst",
|
|
21110
21110
|
match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
21111
|
-
}),
|
|
21111
|
+
}), Mg = (e = "") => ({
|
|
21112
21112
|
className: "subst",
|
|
21113
21113
|
label: "interpol",
|
|
21114
21114
|
begin: a(/\\/, e, /\(/),
|
|
21115
21115
|
end: /\)/
|
|
21116
|
-
}),
|
|
21116
|
+
}), Ng = (e = "") => ({
|
|
21117
21117
|
begin: a(e, /"""/),
|
|
21118
21118
|
end: a(/"""/, e),
|
|
21119
21119
|
contains: [
|
|
21120
|
+
Ag(e),
|
|
21120
21121
|
jg(e),
|
|
21121
|
-
Mg(e)
|
|
21122
|
-
Ng(e)
|
|
21122
|
+
Mg(e)
|
|
21123
21123
|
]
|
|
21124
|
-
}),
|
|
21124
|
+
}), Pg = (e = "") => ({
|
|
21125
21125
|
begin: a(e, /"/),
|
|
21126
21126
|
end: a(/"/, e),
|
|
21127
|
-
contains: [
|
|
21128
|
-
}),
|
|
21127
|
+
contains: [Ag(e), Mg(e)]
|
|
21128
|
+
}), Fg = {
|
|
21129
21129
|
className: "string",
|
|
21130
21130
|
variants: [
|
|
21131
|
+
Ng(),
|
|
21132
|
+
Ng("#"),
|
|
21133
|
+
Ng("##"),
|
|
21134
|
+
Ng("###"),
|
|
21131
21135
|
Pg(),
|
|
21132
21136
|
Pg("#"),
|
|
21133
21137
|
Pg("##"),
|
|
21134
|
-
Pg("###")
|
|
21135
|
-
Fg(),
|
|
21136
|
-
Fg("#"),
|
|
21137
|
-
Fg("##"),
|
|
21138
|
-
Fg("###")
|
|
21138
|
+
Pg("###")
|
|
21139
21139
|
]
|
|
21140
|
-
},
|
|
21140
|
+
}, Ig = [e.BACKSLASH_ESCAPE, {
|
|
21141
21141
|
begin: /\[/,
|
|
21142
21142
|
end: /\]/,
|
|
21143
21143
|
relevance: 0,
|
|
21144
21144
|
contains: [e.BACKSLASH_ESCAPE]
|
|
21145
|
-
}],
|
|
21145
|
+
}], Lg = {
|
|
21146
21146
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
21147
21147
|
end: /\//,
|
|
21148
|
-
contains:
|
|
21149
|
-
},
|
|
21148
|
+
contains: Ig
|
|
21149
|
+
}, Rg = (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: [...Ig, {
|
|
21155
21155
|
scope: "comment",
|
|
21156
21156
|
begin: `#(?!.*${r})`,
|
|
21157
21157
|
end: /$/
|
|
21158
21158
|
}]
|
|
21159
21159
|
};
|
|
21160
|
-
},
|
|
21160
|
+
}, zg = {
|
|
21161
21161
|
scope: "regexp",
|
|
21162
21162
|
variants: [
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21163
|
+
Rg("###"),
|
|
21164
|
+
Rg("##"),
|
|
21165
|
+
Rg("#"),
|
|
21166
|
+
Lg
|
|
21167
21167
|
]
|
|
21168
|
-
},
|
|
21169
|
-
|
|
21168
|
+
}, Bg = { match: a(/`/, z, /`/) }, Vg = [
|
|
21169
|
+
Bg,
|
|
21170
21170
|
{
|
|
21171
21171
|
className: "variable",
|
|
21172
21172
|
match: /\$\d+/
|
|
@@ -21175,18 +21175,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21175
21175
|
className: "variable",
|
|
21176
21176
|
match: `\\$${L}+`
|
|
21177
21177
|
}
|
|
21178
|
-
],
|
|
21178
|
+
], Hg = [
|
|
21179
21179
|
{
|
|
21180
21180
|
match: /(@|#(un)?)available/,
|
|
21181
21181
|
scope: "keyword",
|
|
21182
21182
|
starts: { contains: [{
|
|
21183
21183
|
begin: /\(/,
|
|
21184
21184
|
end: /\)/,
|
|
21185
|
-
keywords:
|
|
21185
|
+
keywords: Eg,
|
|
21186
21186
|
contains: [
|
|
21187
|
-
...
|
|
21187
|
+
...Og,
|
|
21188
21188
|
$,
|
|
21189
|
-
|
|
21189
|
+
Fg
|
|
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
|
+
], Ug = {
|
|
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
|
+
}, Wg = {
|
|
21228
21228
|
begin: /</,
|
|
21229
21229
|
end: />/,
|
|
21230
21230
|
keywords: K,
|
|
21231
21231
|
contains: [
|
|
21232
21232
|
...o,
|
|
21233
21233
|
...q,
|
|
21234
|
-
...
|
|
21234
|
+
...Hg,
|
|
21235
21235
|
Z,
|
|
21236
|
-
|
|
21236
|
+
Ug
|
|
21237
21237
|
]
|
|
21238
21238
|
};
|
|
21239
|
-
|
|
21240
|
-
let
|
|
21239
|
+
Ug.contains.push(Wg);
|
|
21240
|
+
let Gg = {
|
|
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
|
-
|
|
21253
|
+
zg,
|
|
21254
21254
|
...q,
|
|
21255
21255
|
...J,
|
|
21256
|
-
...
|
|
21256
|
+
...Og,
|
|
21257
21257
|
$,
|
|
21258
|
-
|
|
21258
|
+
Fg,
|
|
21259
|
+
...Vg,
|
|
21259
21260
|
...Hg,
|
|
21260
|
-
|
|
21261
|
-
Wg
|
|
21261
|
+
Ug
|
|
21262
21262
|
]
|
|
21263
|
-
},
|
|
21263
|
+
}, Kg = {
|
|
21264
21264
|
begin: /</,
|
|
21265
21265
|
end: />/,
|
|
21266
21266
|
keywords: "repeat each",
|
|
21267
|
-
contains: [...o,
|
|
21268
|
-
},
|
|
21267
|
+
contains: [...o, Ug]
|
|
21268
|
+
}, qg = {
|
|
21269
21269
|
begin: /\(/,
|
|
21270
21270
|
end: /\)/,
|
|
21271
21271
|
keywords: K,
|
|
@@ -21284,41 +21284,41 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21284
21284
|
},
|
|
21285
21285
|
...o,
|
|
21286
21286
|
...q,
|
|
21287
|
-
...
|
|
21287
|
+
...Og,
|
|
21288
21288
|
$,
|
|
21289
|
-
|
|
21290
|
-
...
|
|
21291
|
-
|
|
21292
|
-
|
|
21289
|
+
Fg,
|
|
21290
|
+
...Hg,
|
|
21291
|
+
Ug,
|
|
21292
|
+
Gg
|
|
21293
21293
|
],
|
|
21294
21294
|
endsParent: !0,
|
|
21295
21295
|
illegal: /["']/
|
|
21296
|
-
},
|
|
21296
|
+
}, Jg = {
|
|
21297
21297
|
match: [
|
|
21298
21298
|
/(func|macro)/,
|
|
21299
21299
|
/\s+/,
|
|
21300
|
-
s(
|
|
21300
|
+
s(Bg.match, z, j)
|
|
21301
21301
|
],
|
|
21302
21302
|
className: {
|
|
21303
21303
|
1: "keyword",
|
|
21304
21304
|
3: "title.function"
|
|
21305
21305
|
},
|
|
21306
21306
|
contains: [
|
|
21307
|
+
Kg,
|
|
21307
21308
|
qg,
|
|
21308
|
-
Jg,
|
|
21309
21309
|
n
|
|
21310
21310
|
],
|
|
21311
21311
|
illegal: [/\[/, /%/]
|
|
21312
|
-
},
|
|
21312
|
+
}, Yg = {
|
|
21313
21313
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
21314
21314
|
className: { 1: "keyword" },
|
|
21315
21315
|
contains: [
|
|
21316
|
+
Kg,
|
|
21316
21317
|
qg,
|
|
21317
|
-
Jg,
|
|
21318
21318
|
n
|
|
21319
21319
|
],
|
|
21320
21320
|
illegal: /\[|%/
|
|
21321
|
-
},
|
|
21321
|
+
}, Xg = {
|
|
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
|
+
}, Zg = {
|
|
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: [Ug],
|
|
21342
21342
|
keywords: [...v, ..._],
|
|
21343
21343
|
end: /}/
|
|
21344
|
-
},
|
|
21344
|
+
}, Qg = {
|
|
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
|
+
}, $g = {
|
|
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
|
+
}, e_ = {
|
|
21368
21368
|
begin: [
|
|
21369
21369
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
21370
21370
|
/\s+/,
|
|
@@ -21377,7 +21377,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21377
21377
|
},
|
|
21378
21378
|
keywords: K,
|
|
21379
21379
|
contains: [
|
|
21380
|
-
|
|
21380
|
+
Kg,
|
|
21381
21381
|
...q,
|
|
21382
21382
|
{
|
|
21383
21383
|
begin: /:/,
|
|
@@ -21391,16 +21391,16 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21391
21391
|
}
|
|
21392
21392
|
]
|
|
21393
21393
|
};
|
|
21394
|
-
for (let e of
|
|
21394
|
+
for (let e of Fg.variants) {
|
|
21395
21395
|
let n = e.contains.find((e) => e.label === "interpol");
|
|
21396
21396
|
n.keywords = K;
|
|
21397
21397
|
let r = [
|
|
21398
21398
|
...q,
|
|
21399
21399
|
...J,
|
|
21400
|
-
...
|
|
21400
|
+
...Og,
|
|
21401
21401
|
$,
|
|
21402
|
-
|
|
21403
|
-
...
|
|
21402
|
+
Fg,
|
|
21403
|
+
...Vg
|
|
21404
21404
|
];
|
|
21405
21405
|
n.contains = [...r, {
|
|
21406
21406
|
begin: /\(/,
|
|
@@ -21413,29 +21413,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
21413
21413
|
keywords: K,
|
|
21414
21414
|
contains: [
|
|
21415
21415
|
...o,
|
|
21416
|
+
Jg,
|
|
21416
21417
|
Yg,
|
|
21417
|
-
|
|
21418
|
+
Qg,
|
|
21418
21419
|
$g,
|
|
21419
21420
|
e_,
|
|
21420
|
-
|
|
21421
|
+
Xg,
|
|
21421
21422
|
Zg,
|
|
21422
|
-
Qg,
|
|
21423
21423
|
{
|
|
21424
21424
|
beginKeywords: "import",
|
|
21425
21425
|
end: /$/,
|
|
21426
21426
|
contains: [...o],
|
|
21427
21427
|
relevance: 0
|
|
21428
21428
|
},
|
|
21429
|
-
|
|
21429
|
+
zg,
|
|
21430
21430
|
...q,
|
|
21431
21431
|
...J,
|
|
21432
|
-
...
|
|
21432
|
+
...Og,
|
|
21433
21433
|
$,
|
|
21434
|
-
|
|
21434
|
+
Fg,
|
|
21435
|
+
...Vg,
|
|
21435
21436
|
...Hg,
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
Kg
|
|
21437
|
+
Ug,
|
|
21438
|
+
Gg
|
|
21439
21439
|
]
|
|
21440
21440
|
};
|
|
21441
21441
|
}
|
|
@@ -22045,7 +22045,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22045
22045
|
contains: [e.BACKSLASH_ESCAPE, L],
|
|
22046
22046
|
subLanguage: "graphql"
|
|
22047
22047
|
}
|
|
22048
|
-
},
|
|
22048
|
+
}, Eg = {
|
|
22049
22049
|
className: "string",
|
|
22050
22050
|
begin: "`",
|
|
22051
22051
|
end: "`",
|
|
@@ -22087,21 +22087,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22087
22087
|
e.C_BLOCK_COMMENT_MODE,
|
|
22088
22088
|
e.C_LINE_COMMENT_MODE
|
|
22089
22089
|
]
|
|
22090
|
-
},
|
|
22090
|
+
}, Dg = [
|
|
22091
22091
|
e.APOS_STRING_MODE,
|
|
22092
22092
|
e.QUOTE_STRING_MODE,
|
|
22093
22093
|
z,
|
|
22094
22094
|
B,
|
|
22095
22095
|
H,
|
|
22096
|
-
|
|
22096
|
+
Eg,
|
|
22097
22097
|
{ match: /\$\d+/ },
|
|
22098
22098
|
I
|
|
22099
22099
|
];
|
|
22100
|
-
L.contains =
|
|
22100
|
+
L.contains = Dg.concat({
|
|
22101
22101
|
begin: /\{/,
|
|
22102
22102
|
end: /\}/,
|
|
22103
22103
|
keywords: E,
|
|
22104
|
-
contains: ["self"].concat(
|
|
22104
|
+
contains: ["self"].concat(Dg)
|
|
22105
22105
|
});
|
|
22106
22106
|
let K = [].concat(G, L.contains), q = K.concat([{
|
|
22107
22107
|
begin: /(\s*)\(/,
|
|
@@ -22142,7 +22142,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22142
22142
|
1: "keyword",
|
|
22143
22143
|
3: "title.class"
|
|
22144
22144
|
}
|
|
22145
|
-
}] },
|
|
22145
|
+
}] }, Og = {
|
|
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",
|
|
@@ -22152,7 +22152,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22152
22152
|
className: "meta",
|
|
22153
22153
|
relevance: 10,
|
|
22154
22154
|
begin: /^\s*['"]use (strict|asm)['"]/
|
|
22155
|
-
},
|
|
22155
|
+
}, kg = {
|
|
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 Ag(e) {
|
|
22175
22175
|
return n.concat("(?!", e.join("|"), ")");
|
|
22176
22176
|
}
|
|
22177
|
-
let
|
|
22178
|
-
match: n.concat(/\b/,
|
|
22177
|
+
let jg = {
|
|
22178
|
+
match: n.concat(/\b/, Ag([
|
|
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
|
+
}, Mg = {
|
|
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
|
+
}, Ng = {
|
|
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: /\(\)/ }, J]
|
|
22204
|
-
},
|
|
22204
|
+
}, Pg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Fg = {
|
|
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(Pg)
|
|
22213
22213
|
],
|
|
22214
22214
|
keywords: "async",
|
|
22215
22215
|
className: {
|
|
@@ -22229,7 +22229,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22229
22229
|
keywords: E,
|
|
22230
22230
|
exports: {
|
|
22231
22231
|
PARAMS_CONTAINS: q,
|
|
22232
|
-
CLASS_REFERENCE:
|
|
22232
|
+
CLASS_REFERENCE: Og
|
|
22233
22233
|
},
|
|
22234
22234
|
illegal: /#(?![$_A-z])/,
|
|
22235
22235
|
contains: [
|
|
@@ -22244,17 +22244,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22244
22244
|
z,
|
|
22245
22245
|
B,
|
|
22246
22246
|
H,
|
|
22247
|
-
|
|
22247
|
+
Eg,
|
|
22248
22248
|
G,
|
|
22249
22249
|
{ match: /\$\d+/ },
|
|
22250
22250
|
I,
|
|
22251
|
-
|
|
22251
|
+
Og,
|
|
22252
22252
|
{
|
|
22253
22253
|
scope: "attr",
|
|
22254
22254
|
match: g + n.lookahead(":"),
|
|
22255
22255
|
relevance: 0
|
|
22256
22256
|
},
|
|
22257
|
-
|
|
22257
|
+
Fg,
|
|
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: Pg,
|
|
22268
22268
|
returnBegin: !0,
|
|
22269
22269
|
end: "\\s*=>",
|
|
22270
22270
|
contains: [{
|
|
@@ -22321,7 +22321,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
22321
22321
|
}
|
|
22322
22322
|
]
|
|
22323
22323
|
},
|
|
22324
|
-
|
|
22324
|
+
kg,
|
|
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
|
+
Mg,
|
|
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: [J]
|
|
22348
22348
|
},
|
|
22349
|
-
|
|
22349
|
+
jg,
|
|
22350
22350
|
$,
|
|
22351
22351
|
Z,
|
|
22352
|
-
|
|
22352
|
+
Ng,
|
|
22353
22353
|
{ match: /\$[(.]/ }
|
|
22354
22354
|
]
|
|
22355
22355
|
};
|
|
@@ -23485,7 +23485,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23485
23485
|
immediate: !0,
|
|
23486
23486
|
deep: !0
|
|
23487
23487
|
});
|
|
23488
|
-
let
|
|
23488
|
+
let Eg = () => {
|
|
23489
23489
|
let e = a.value?.innerText;
|
|
23490
23490
|
e && l(e);
|
|
23491
23491
|
};
|
|
@@ -23493,7 +23493,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
|
|
|
23493
23493
|
id: "copy",
|
|
23494
23494
|
description: "复制",
|
|
23495
23495
|
name: "复制",
|
|
23496
|
-
onClick:
|
|
23496
|
+
onClick: Eg
|
|
23497
23497
|
})]), createElementVNode("pre", _hoisted_4$16, [createElementVNode("code", {
|
|
23498
23498
|
ref_key: "codeRef",
|
|
23499
23499
|
ref: a,
|
|
@@ -24527,7 +24527,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24527
24527
|
if (!(window.InputEvent && typeof InputEvent.prototype.getTargetRanges == "function")) return console.error("beforeinput event is not supported."), noop;
|
|
24528
24528
|
let { contentEditable: o, role: T, ariaMultiLine: O, ariaReadOnly: k } = r, j = r.style.whiteSpace;
|
|
24529
24529
|
r.role = "textbox", r.style.whiteSpace = "pre-wrap", e || (r.ariaMultiLine = "true");
|
|
24530
|
-
let I = !1, L = !1, z = null, B = !1, H = !1,
|
|
24530
|
+
let I = !1, L = !1, z = null, B = !1, H = !1, Eg = !1, G = getCurrentDocument(r), Dg = {
|
|
24531
24531
|
_document: G,
|
|
24532
24532
|
_isBlock: s
|
|
24533
24533
|
};
|
|
@@ -24535,9 +24535,9 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24535
24535
|
r.contentEditable = m ? "false" : "true", r.ariaReadOnly = m ? "true" : null;
|
|
24536
24536
|
}, g();
|
|
24537
24537
|
let K = createMutationObserver(r, () => {
|
|
24538
|
-
H && setSelectionToDOM(G, r, d,
|
|
24538
|
+
H && setSelectionToDOM(G, r, d, Dg);
|
|
24539
24539
|
}), q = () => {
|
|
24540
|
-
d = takeSelectionSnapshot(r,
|
|
24540
|
+
d = takeSelectionSnapshot(r, Dg);
|
|
24541
24541
|
}, J = () => {
|
|
24542
24542
|
let e = K._flush();
|
|
24543
24543
|
if (K._record(!1), e.length) {
|
|
@@ -24547,7 +24547,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24547
24547
|
for (let n = r.length - 1; n >= 0; n--) e.insertBefore(r[n], a);
|
|
24548
24548
|
for (let n = i.length - 1; n >= 0; n--) e.removeChild(i[n]);
|
|
24549
24549
|
} else n.target.nodeValue = n.oldValue;
|
|
24550
|
-
K._flush(), L = setSelectionToDOM(G, r, d,
|
|
24550
|
+
K._flush(), L = setSelectionToDOM(G, r, d, Dg);
|
|
24551
24551
|
}
|
|
24552
24552
|
E(z), B = !1, z = null;
|
|
24553
24553
|
}, Z = (e) => {
|
|
@@ -24561,7 +24561,7 @@ 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
|
+
}, Og = () => {
|
|
24565
24565
|
B || J();
|
|
24566
24566
|
}, Q = (e) => {
|
|
24567
24567
|
e.preventDefault();
|
|
@@ -24570,7 +24570,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
|
|
|
24570
24570
|
B ? K._record(!0) : q();
|
|
24571
24571
|
let i = e.getTargetRanges()[0];
|
|
24572
24572
|
if (i) {
|
|
24573
|
-
let a = serializeRange(r,
|
|
24573
|
+
let a = serializeRange(r, Dg, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
|
|
24574
24574
|
if (o == null) {
|
|
24575
24575
|
let n = e.dataTransfer;
|
|
24576
24576
|
n && (o = n.getData("text/plain"));
|
|
@@ -24578,46 +24578,46 @@ 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 || J();
|
|
24581
|
-
},
|
|
24581
|
+
}, kg = () => {
|
|
24582
24582
|
B || q(), B = !0;
|
|
24583
24583
|
}, $ = () => {
|
|
24584
24584
|
J();
|
|
24585
|
-
},
|
|
24585
|
+
}, Ag = () => {
|
|
24586
24586
|
H = !0, q();
|
|
24587
|
-
},
|
|
24587
|
+
}, jg = () => {
|
|
24588
24588
|
H = !1;
|
|
24589
|
-
},
|
|
24589
|
+
}, Mg = () => {
|
|
24590
24590
|
if (L) {
|
|
24591
24591
|
L = !1;
|
|
24592
24592
|
return;
|
|
24593
24593
|
}
|
|
24594
|
-
H && !B && !
|
|
24595
|
-
},
|
|
24594
|
+
H && !B && !Eg && q();
|
|
24595
|
+
}, Ng = (e) => {
|
|
24596
24596
|
q(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
|
|
24597
|
+
}, Pg = (e) => {
|
|
24598
|
+
e.preventDefault(), Ng(e.clipboardData);
|
|
24597
24599
|
}, Fg = (e) => {
|
|
24598
|
-
e.preventDefault(),
|
|
24600
|
+
e.preventDefault(), m || (Ng(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24599
24601
|
}, Ig = (e) => {
|
|
24600
|
-
e.preventDefault(), m || (Pg(e.clipboardData), E(new Transaction().delete(...range(d))));
|
|
24601
|
-
}, Lg = (e) => {
|
|
24602
24602
|
e.preventDefault();
|
|
24603
24603
|
let [n, r] = range(d);
|
|
24604
|
-
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData,
|
|
24605
|
-
},
|
|
24604
|
+
E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, Dg)));
|
|
24605
|
+
}, Lg = (e) => {
|
|
24606
24606
|
e.preventDefault();
|
|
24607
|
-
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e,
|
|
24607
|
+
let n = e.dataTransfer, i = getPointedCaretPosition(G, r, e, Dg);
|
|
24608
24608
|
if (n && i) {
|
|
24609
24609
|
let e = new Transaction();
|
|
24610
|
-
|
|
24610
|
+
Eg && e.delete(...range(d));
|
|
24611
24611
|
let o = e.transform(i);
|
|
24612
|
-
e.select(o, o).insert(o, a(n,
|
|
24612
|
+
e.select(o, o).insert(o, a(n, Dg)).select(o), E(e), r.focus({ preventScroll: !0 });
|
|
24613
24613
|
}
|
|
24614
|
-
},
|
|
24615
|
-
|
|
24616
|
-
},
|
|
24617
|
-
|
|
24614
|
+
}, Rg = (e) => {
|
|
24615
|
+
Eg = !0, Ng(e.dataTransfer);
|
|
24616
|
+
}, zg = () => {
|
|
24617
|
+
Eg = !1;
|
|
24618
24618
|
};
|
|
24619
|
-
return G.addEventListener("selectionchange",
|
|
24620
|
-
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange",
|
|
24619
|
+
return G.addEventListener("selectionchange", Mg), r.addEventListener("keydown", Z), r.addEventListener("input", Og), r.addEventListener("beforeinput", Q), r.addEventListener("compositionstart", kg), r.addEventListener("compositionend", $), r.addEventListener("focus", Ag), r.addEventListener("blur", jg), r.addEventListener("copy", Pg), r.addEventListener("cut", Fg), r.addEventListener("paste", Ig), r.addEventListener("drop", Lg), r.addEventListener("dragstart", Rg), r.addEventListener("dragend", zg), () => {
|
|
24620
|
+
I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, K._dispose(), G.removeEventListener("selectionchange", Mg), r.removeEventListener("keydown", Z), r.removeEventListener("input", Og), r.removeEventListener("beforeinput", Q), r.removeEventListener("compositionstart", kg), r.removeEventListener("compositionend", $), r.removeEventListener("focus", Ag), r.removeEventListener("blur", jg), r.removeEventListener("copy", Pg), r.removeEventListener("cut", Fg), r.removeEventListener("paste", Ig), r.removeEventListener("drop", Lg), r.removeEventListener("dragstart", Rg), r.removeEventListener("dragend", zg));
|
|
24621
24621
|
};
|
|
24622
24622
|
},
|
|
24623
24623
|
command: (e, ...n) => {
|
|
@@ -24960,7 +24960,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24960
24960
|
set(e) {
|
|
24961
24961
|
l.value = e, n();
|
|
24962
24962
|
}
|
|
24963
|
-
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H,
|
|
24963
|
+
})), k = shallowRef("slash"), j = shallowRef(""), I = shallowRef([]), L = shallowRef([]), z = shallowRef([]), B, H, Eg = document.body, { commandSelection: G, GetCursorPosition: K } = useCommandSelection(), q = () => {
|
|
24964
24964
|
setTimeout(() => {
|
|
24965
24965
|
let e = $();
|
|
24966
24966
|
j.value = e.query || "", e.isActive ? (a.value?.setProps({ getReferenceClientRect: () => ({
|
|
@@ -24973,7 +24973,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
24973
24973
|
}, J = (e) => {
|
|
24974
24974
|
if (s("keydown", e), e.key === "Enter" || e.key === "NumpadEnter") return e.shiftKey ? void 0 : (e.preventDefault?.(), !1);
|
|
24975
24975
|
e.key === "@" && (k.value = "slash", q()), e.key === "/" && (k.value = "prompt", q());
|
|
24976
|
-
},
|
|
24976
|
+
}, Og = () => {
|
|
24977
24977
|
j.value = "";
|
|
24978
24978
|
}, $ = () => {
|
|
24979
24979
|
let e = {
|
|
@@ -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
|
+
}, Ag = (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), jg = (e) => {
|
|
25009
25009
|
z.value.push(e), B.command(K);
|
|
25010
25010
|
let { column: n, line: r } = G.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(), Mg();
|
|
25012
|
+
}, Mg = () => {
|
|
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
|
+
}, Pg = (e) => {
|
|
25018
|
+
B.command(ReplaceAll, e), Mg();
|
|
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 Fg = (e, n, r, i) => {
|
|
25024
25024
|
if (n.type === "tag") {
|
|
25025
|
-
let n =
|
|
25025
|
+
let n = Ag(e, r);
|
|
25026
25026
|
B.command(DeleteTag, [i, n], [i, n + 1]);
|
|
25027
25027
|
}
|
|
25028
|
-
},
|
|
25028
|
+
}, Rg = (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
|
+
}, Bg = () => {
|
|
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) => J(e)
|
|
25045
25045
|
}), H = B.input(i.value);
|
|
25046
|
-
},
|
|
25046
|
+
}, Hg = () => k.value === "slash" ? I.value.length < 1 ? !1 : void 0 : L.value.length < 1 ? !1 : void 0;
|
|
25047
25047
|
return onMounted(() => {
|
|
25048
|
-
|
|
25048
|
+
Bg(), i.value?.addEventListener("paste", Rg);
|
|
25049
25049
|
}), onUnmounted(() => {
|
|
25050
|
-
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste",
|
|
25050
|
+
B.command(ReplaceAll, ""), H?.(), i.value?.removeEventListener("paste", Rg);
|
|
25051
25051
|
}), n({
|
|
25052
25052
|
cleanup: () => {
|
|
25053
25053
|
B.command(ReplaceAll, "");
|
|
25054
25054
|
},
|
|
25055
|
-
focus:
|
|
25055
|
+
focus: Mg
|
|
25056
25056
|
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
|
|
25057
25057
|
ref_key: "editorRef",
|
|
25058
25058
|
ref: i,
|
|
@@ -25066,11 +25066,11 @@ 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) => Fg(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,
|
|
25073
|
-
"append-to": unref(
|
|
25073
|
+
"append-to": unref(Eg),
|
|
25074
25074
|
arrow: !1,
|
|
25075
25075
|
"hide-on-click": !0,
|
|
25076
25076
|
interactive: !0,
|
|
@@ -25080,16 +25080,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25080
25080
|
trigger: "manual",
|
|
25081
25081
|
"trigger-target": i.value,
|
|
25082
25082
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
25083
|
-
onHidden:
|
|
25084
|
-
onShow:
|
|
25083
|
+
onHidden: Og,
|
|
25084
|
+
onShow: Hg
|
|
25085
25085
|
}, {
|
|
25086
25086
|
content: withCtx(() => [k.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
25087
25087
|
key: 0,
|
|
25088
|
-
"on-select":
|
|
25088
|
+
"on-select": jg,
|
|
25089
25089
|
"resource-list": I.value
|
|
25090
25090
|
}, null, 8, ["resource-list"])) : k.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
|
|
25091
25091
|
key: 1,
|
|
25092
|
-
"on-select":
|
|
25092
|
+
"on-select": Pg,
|
|
25093
25093
|
prompts: L.value
|
|
25094
25094
|
}, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
|
|
25095
25095
|
_: 1
|
|
@@ -25190,11 +25190,11 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25190
25190
|
} catch (e) {
|
|
25191
25191
|
console.error(e);
|
|
25192
25192
|
}
|
|
25193
|
-
},
|
|
25193
|
+
}, Eg = () => {
|
|
25194
25194
|
s.value = "";
|
|
25195
25195
|
}, G = (e) => {
|
|
25196
25196
|
T("selectShortcut", e);
|
|
25197
|
-
},
|
|
25197
|
+
}, Dg = () => {
|
|
25198
25198
|
T("deleteShortcut");
|
|
25199
25199
|
}, J = async (e) => {
|
|
25200
25200
|
if (L.value) for (let n of e) {
|
|
@@ -25229,7 +25229,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25229
25229
|
key: 0,
|
|
25230
25230
|
class: "chat-input-cite",
|
|
25231
25231
|
content: s.value,
|
|
25232
|
-
onClose:
|
|
25232
|
+
onClose: Eg
|
|
25233
25233
|
}, null, 8, ["content"])) : createCommentVNode("v-if", !0)]),
|
|
25234
25234
|
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: O.value })), () => [O.value.length ? (openBlock(), createElementBlock("div", {
|
|
25235
25235
|
key: 0,
|
|
@@ -25276,7 +25276,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$19 = ["aria-
|
|
|
25276
25276
|
class: "selected-shortcut-btn",
|
|
25277
25277
|
shortcut: k.value
|
|
25278
25278
|
}, {
|
|
25279
|
-
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick:
|
|
25279
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: Dg })]),
|
|
25280
25280
|
_: 1
|
|
25281
25281
|
}, 8, ["shortcut"])) : createCommentVNode("v-if", !0)])
|
|
25282
25282
|
]),
|
|
@@ -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: T } = 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: T } = 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 O = async (e, r) => (e.id === "copy" && (console.log("messages", r), T(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, T) => (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) => O(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("无智能体使用权限")),
|
|
26607
|
+
}, H = computed(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : t("无智能体使用权限")), Eg = computed(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), G = computed(() => i.isCompressionHeight ? t("恢复默认尺寸") : t("缩小高度")), K = computed(() => i.hasPermission), Og = (e) => K.value ? e : t("暂无使用权限"), Q = () => ({ cursor: K.value ? "pointer" : "not-allowed" }), $ = 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">
|
|
@@ -26624,7 +26626,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26624
26626
|
${a}
|
|
26625
26627
|
</div>
|
|
26626
26628
|
`;
|
|
26627
|
-
}),
|
|
26629
|
+
}), Ag = async () => {
|
|
26628
26630
|
if (i.sessionBusinessManager) try {
|
|
26629
26631
|
await i.sessionBusinessManager.createNewSession();
|
|
26630
26632
|
} catch (e) {
|
|
@@ -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
|
+
}, Mg = (e) => {
|
|
26638
26640
|
e.stopPropagation(), i.sessionBusinessManager ? (z || B(), z && z.handleTriggerClick(e)) : a("history-click", e);
|
|
26639
|
-
},
|
|
26641
|
+
}, Ng = () => {
|
|
26640
26642
|
a("help-click");
|
|
26641
|
-
},
|
|
26643
|
+
}, Pg = (e) => {
|
|
26642
26644
|
e.stopPropagation(), L && (L.state.isVisible ? L.hide() : L.show());
|
|
26643
|
-
},
|
|
26645
|
+
}, Fg = (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
|
+
Ig();
|
|
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
|
+
}, Ig = () => {
|
|
26660
|
+
document.removeEventListener("click", Hg), j.value = i.sessionName || "", k.value = !0, setTimeout(() => {
|
|
26661
|
+
document.addEventListener("click", Hg);
|
|
26660
26662
|
}, 100), setTimeout(() => {
|
|
26661
26663
|
if (I.value) try {
|
|
26662
26664
|
let e = I.value;
|
|
@@ -26667,22 +26669,22 @@ 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
|
+
}, Rg = () => {
|
|
26671
26673
|
let e = j.value.trim();
|
|
26672
26674
|
if (!e) {
|
|
26673
|
-
|
|
26675
|
+
Bg();
|
|
26674
26676
|
return;
|
|
26675
26677
|
}
|
|
26676
26678
|
a("rename", e), k.value = !1, j.value = "";
|
|
26677
|
-
},
|
|
26679
|
+
}, Bg = () => {
|
|
26678
26680
|
k.value = !1, j.value = "";
|
|
26679
|
-
},
|
|
26680
|
-
j.value = e, n.key === "Enter" ?
|
|
26681
|
-
},
|
|
26681
|
+
}, Vg = (e, n) => {
|
|
26682
|
+
j.value = e, n.key === "Enter" ? Rg() : n.key === "Escape" && Bg();
|
|
26683
|
+
}, Hg = (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) && Bg();
|
|
26687
|
+
}, Ug = 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, {
|
|
@@ -26698,13 +26700,13 @@ 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", Fg);
|
|
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", Fg);
|
|
26708
26710
|
});
|
|
26709
26711
|
}
|
|
26710
26712
|
});
|
|
@@ -26712,9 +26714,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26712
26714
|
return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
26713
26715
|
L && L.setContent($.value);
|
|
26714
26716
|
}), onMounted(() => {
|
|
26715
|
-
|
|
26717
|
+
Ug(), i.sessionBusinessManager && B(), document.addEventListener("click", Hg);
|
|
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", Hg);
|
|
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: Vg
|
|
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: Rg
|
|
26744
26746
|
}), createElementVNode("i", {
|
|
26745
26747
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
26746
|
-
onClick:
|
|
26748
|
+
onClick: Bg
|
|
26747
26749
|
})])])])) : createCommentVNode("v-if", !0)
|
|
26748
26750
|
], 2),
|
|
26749
26751
|
i.showMoreIcon && K.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: Pg
|
|
26755
26757
|
}, null, 512)) : createCommentVNode("v-if", !0)
|
|
26756
26758
|
]), createElementVNode("div", _hoisted_6$1, [
|
|
26757
26759
|
createCommentVNode(" 新增会话按钮 "),
|
|
@@ -26763,9 +26765,9 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26763
26765
|
{ disabled: !K.value }
|
|
26764
26766
|
]),
|
|
26765
26767
|
style: normalizeStyle(Q()),
|
|
26766
|
-
onClick: r[1] ||= (e) => K.value ?
|
|
26768
|
+
onClick: r[1] ||= (e) => K.value ? Ag() : void 0
|
|
26767
26769
|
}, null, 6)), [[unref(o), {
|
|
26768
|
-
content:
|
|
26770
|
+
content: Og(unref(t)("新增会话")),
|
|
26769
26771
|
boundary: "parent"
|
|
26770
26772
|
}]]) : createCommentVNode("v-if", !0),
|
|
26771
26773
|
createCommentVNode(" 历史会话按钮 "),
|
|
@@ -26779,15 +26781,15 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26779
26781
|
{ disabled: !K.value }
|
|
26780
26782
|
]),
|
|
26781
26783
|
style: normalizeStyle(Q()),
|
|
26782
|
-
onClick: r[2] ||= (e) => K.value ?
|
|
26784
|
+
onClick: r[2] ||= (e) => K.value ? Mg(e) : void 0
|
|
26783
26785
|
}, null, 6)), [[unref(o), {
|
|
26784
|
-
content:
|
|
26786
|
+
content: Og(unref(t)("历史会话")),
|
|
26785
26787
|
boundary: "parent"
|
|
26786
26788
|
}]]) : createCommentVNode("v-if", !0),
|
|
26787
26789
|
e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
|
|
26788
26790
|
key: 2,
|
|
26789
26791
|
class: "bkai-icon bkai-zhushou",
|
|
26790
|
-
onClick:
|
|
26792
|
+
onClick: Ng
|
|
26791
26793
|
}, null, 512)), [[unref(o), {
|
|
26792
26794
|
content: unref(t)("转人工"),
|
|
26793
26795
|
boundary: "parent"
|
|
@@ -26796,7 +26798,7 @@ var _hoisted_1$5 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
|
|
|
26796
26798
|
key: 3,
|
|
26797
26799
|
ref_key: "compressionRef",
|
|
26798
26800
|
ref: m,
|
|
26799
|
-
class: normalizeClass(["bkai-icon",
|
|
26801
|
+
class: normalizeClass(["bkai-icon", Eg.value]),
|
|
26800
26802
|
onClick: r[3] ||= (e) => a("toggle-compression")
|
|
26801
26803
|
}, null, 2)), [[unref(o), {
|
|
26802
26804
|
content: G.value,
|
|
@@ -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"), p_();
|
|
27637
27640
|
},
|
|
27638
27641
|
onError: (e) => {
|
|
27639
27642
|
a("error", e);
|
|
@@ -27649,7 +27652,7 @@ 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), K = async (e, n) => {
|
|
27651
27654
|
if (e.id === "cite") {
|
|
27652
|
-
|
|
27655
|
+
Yg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), A_();
|
|
27653
27656
|
return;
|
|
27654
27657
|
}
|
|
27655
27658
|
if (e.id === "rebuild") {
|
|
@@ -27661,7 +27664,7 @@ var UIStateManager = class {
|
|
|
27661
27664
|
return;
|
|
27662
27665
|
}
|
|
27663
27666
|
if (e.id === "share") {
|
|
27664
|
-
|
|
27667
|
+
Vg && (O.value = !0), a("request-share");
|
|
27665
27668
|
return;
|
|
27666
27669
|
}
|
|
27667
27670
|
if (e.id === "like" || e.id === "unlike") {
|
|
@@ -27673,7 +27676,7 @@ var UIStateManager = class {
|
|
|
27673
27676
|
}
|
|
27674
27677
|
}
|
|
27675
27678
|
console.log("handleAgentAction", e, n);
|
|
27676
|
-
},
|
|
27679
|
+
}, Og = async (e, n, r, i) => {
|
|
27677
27680
|
if (!z) {
|
|
27678
27681
|
console.error("[ChatBot] Cannot submit feedback: chatHelper not initialized");
|
|
27679
27682
|
return;
|
|
@@ -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(Kg?.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
|
}, Q = async (e) => {
|
|
27704
|
-
if (!
|
|
27707
|
+
if (!Kg || !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 = Kg.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;
|
|
@@ -27717,7 +27720,7 @@ var UIStateManager = class {
|
|
|
27717
27720
|
console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
|
|
27718
27721
|
}
|
|
27719
27722
|
}, $ = async (e) => {
|
|
27720
|
-
if (!
|
|
27723
|
+
if (!Kg || !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 Kg.regenerateFromAIMessages(e, n), p_();
|
|
27731
27734
|
} catch (e) {
|
|
27732
27735
|
console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
|
|
27733
27736
|
}
|
|
27734
|
-
},
|
|
27737
|
+
}, Ag = async (e, n) => {
|
|
27735
27738
|
if (e.id === "delete") {
|
|
27736
|
-
await
|
|
27739
|
+
await Rg(n);
|
|
27737
27740
|
return;
|
|
27738
27741
|
}
|
|
27739
27742
|
if (e.id === "cite") {
|
|
27740
|
-
|
|
27743
|
+
Yg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), A_();
|
|
27741
27744
|
return;
|
|
27742
27745
|
}
|
|
27743
27746
|
console.log("handleUserAction", e, n);
|
|
27744
|
-
},
|
|
27747
|
+
}, Mg = 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), p_();
|
|
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
|
+
}, Ng = async (e, n) => {
|
|
27768
|
+
if (!Kg || !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 = Fg(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 = T_(a, n), s = String(n.input ?? "");
|
|
27789
|
+
await Kg.resendMessageWithProperty(String(i), r, s, o), p_();
|
|
27787
27790
|
} catch (e) {
|
|
27788
27791
|
console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
|
|
27789
27792
|
}
|
|
27790
|
-
},
|
|
27793
|
+
}, Fg = (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 ? f_.value.find((e) => e.id === n.command) ?? null : null;
|
|
27796
|
+
}, Rg = async (e) => {
|
|
27797
|
+
if (!Kg || !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 = Kg.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
|
+
}, Bg = async () => {
|
|
27816
27819
|
((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
|
|
27817
|
-
},
|
|
27820
|
+
}, Vg = !i.chatHelper, Hg = computed(() => Vg ? O.value : i.enableSelection), Ug = computed(() => Vg ? k.value : i.shareLoading), Wg = 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, Kg = 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, qg = new ShortcutManager(null, i.shortcuts || []), Jg = shallowRef([[]]), Yg = ref(""), Xg = computed(() => Kg?.messages.value ?? []), Zg = computed(() => Kg?.isMessagesLoading.value ?? !1), Qg = computed(() => Kg?.isGenerating.value ?? !1), $g = computed(() => Wg?.currentSession.value ?? null), e_ = computed(() => Vg && !j.value ? !1 : !Zg.value && Xg.value.length === 0), t_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), n_ = computed(() => i.resources?.length ? i.resources : flattenResources(z?.agent.info.value?.resources)), r_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), i_ = 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
|
+
})), s_ = computed(() => {
|
|
27833
|
+
let e = qg.shortcuts.value;
|
|
27831
27834
|
return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
|
|
27832
|
-
}),
|
|
27833
|
-
T.value = [],
|
|
27834
|
-
},
|
|
27835
|
+
}), c_ = () => {
|
|
27836
|
+
T.value = [], Vg && (O.value = !1), a("cancel-share");
|
|
27837
|
+
}, l_ = async () => {
|
|
27835
27838
|
let e = T.value;
|
|
27836
|
-
|
|
27837
|
-
},
|
|
27839
|
+
Vg && await u_(e), a("confirm-share", e);
|
|
27840
|
+
}, u_ = 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, O.value = !1, T.value = [];
|
|
27858
27861
|
}
|
|
27859
|
-
},
|
|
27860
|
-
e ? T.value =
|
|
27861
|
-
},
|
|
27862
|
+
}, d_ = (e) => {
|
|
27863
|
+
e ? T.value = Xg.value : T.value = [];
|
|
27864
|
+
}, f_ = qg.effectiveShortcuts;
|
|
27862
27865
|
watch(() => i.shortcuts, (e) => {
|
|
27863
|
-
|
|
27866
|
+
qg.setShortcuts(e || []);
|
|
27864
27867
|
}, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
27865
|
-
e &&
|
|
27868
|
+
e && qg.setAgentShortcuts(e);
|
|
27866
27869
|
}, { immediate: !0 });
|
|
27867
|
-
let
|
|
27870
|
+
let p_ = async () => {
|
|
27868
27871
|
await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
27869
|
-
},
|
|
27870
|
-
if (!
|
|
27872
|
+
}, m_ = async (e, n = {}) => {
|
|
27873
|
+
if (!Kg || !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
|
+
Jg.value = [[]], Yg.value = "", a("send-message", typeof e == "string" ? e : ""), await Kg.sendMessage(e, r, n);
|
|
27877
|
+
}, h_ = 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
|
+
}, __ = async (e, n) => {
|
|
27881
27884
|
try {
|
|
27882
|
-
|
|
27885
|
+
let n = {};
|
|
27886
|
+
Yg.value && (n.cite = Yg.value), u.value && (n.command = u.value.id), await m_(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
|
+
}, v_ = async () => {
|
|
27891
|
+
D_();
|
|
27892
|
+
}, b_ = (e, n) => {
|
|
27893
|
+
C_(e, n), a("shortcut-click", {
|
|
27890
27894
|
shortcut: e,
|
|
27891
27895
|
source: "main"
|
|
27892
27896
|
});
|
|
27893
|
-
},
|
|
27897
|
+
}, C_ = (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
|
+
}, w_ = () => {
|
|
27903
27907
|
u.value = null;
|
|
27904
|
-
},
|
|
27908
|
+
}, T_ = (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
|
+
}, E_ = 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 = T_(u.value, e), r = u.value.name, i = u.value;
|
|
27934
|
+
w_();
|
|
27931
27935
|
try {
|
|
27932
|
-
await
|
|
27936
|
+
await m_(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
|
+
}, D_ = () => {
|
|
27941
|
+
if (!Kg) {
|
|
27938
27942
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
27939
27943
|
return;
|
|
27940
27944
|
}
|
|
27941
|
-
|
|
27942
|
-
},
|
|
27943
|
-
if (!
|
|
27945
|
+
Kg.stopGeneration(), a("stop");
|
|
27946
|
+
}, O_ = async (e) => {
|
|
27947
|
+
if (!Wg) {
|
|
27944
27948
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
27945
27949
|
return;
|
|
27946
27950
|
}
|
|
27947
27951
|
try {
|
|
27948
|
-
await
|
|
27952
|
+
await Wg.switchSession(e), a("session-switched", Wg.currentSession.value);
|
|
27949
27953
|
} catch (e) {
|
|
27950
27954
|
console.error("Failed to switch session:", e), a("error", e);
|
|
27951
27955
|
}
|
|
27952
|
-
},
|
|
27953
|
-
|
|
27954
|
-
},
|
|
27956
|
+
}, k_ = (e) => {
|
|
27957
|
+
Yg.value = e;
|
|
27958
|
+
}, A_ = () => {
|
|
27955
27959
|
l.value?.focus?.();
|
|
27956
27960
|
};
|
|
27957
27961
|
return onMounted(async () => {
|
|
27958
27962
|
if (!(!z || I.value)) try {
|
|
27959
|
-
if (
|
|
27963
|
+
if (Vg) {
|
|
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
|
+
Vg && 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) => __(e, [[]]),
|
|
27979
|
+
stopGeneration: D_,
|
|
27980
|
+
switchSession: O_,
|
|
27981
|
+
messages: Xg,
|
|
27982
|
+
currentSession: $g,
|
|
27983
|
+
isGenerating: Qg,
|
|
27980
27984
|
getChatHelper: () => z,
|
|
27981
|
-
setCiteText:
|
|
27982
|
-
focusInput:
|
|
27985
|
+
setCiteText: k_,
|
|
27986
|
+
focusInput: A_,
|
|
27983
27987
|
selectShortcut: (e, n) => {
|
|
27984
|
-
|
|
27988
|
+
C_(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": e_.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(i_.value)
|
|
27997
|
+
}, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : Vg && !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
|
+
e_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1), t_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: t_.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
|
+
}, [Zg.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": T.value,
|
|
28010
28014
|
"onUpdate:selectedMessages": n[0] ||= (e) => T.value = e,
|
|
28011
|
-
"enable-selection":
|
|
28015
|
+
"enable-selection": Hg.value,
|
|
28012
28016
|
"message-status": B.value,
|
|
28013
28017
|
"message-tools-status": H.value,
|
|
28014
|
-
|
|
28018
|
+
"message-tools-tippy-options": i.messageToolsTippyOptions,
|
|
28019
|
+
messages: Xg.value,
|
|
28015
28020
|
"on-agent-action": K,
|
|
28016
|
-
"on-agent-feedback":
|
|
28017
|
-
"on-user-action":
|
|
28018
|
-
"on-user-input-confirm":
|
|
28019
|
-
"on-user-shortcut-confirm":
|
|
28020
|
-
onStopStreaming:
|
|
28021
|
+
"on-agent-feedback": Og,
|
|
28022
|
+
"on-user-action": Ag,
|
|
28023
|
+
"on-user-input-confirm": Mg,
|
|
28024
|
+
"on-user-shortcut-confirm": Ng,
|
|
28025
|
+
onStopStreaming: Bg
|
|
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
|
+
!e_.value && Hg.value ? (openBlock(), createBlock(selection_footer_default, {
|
|
28030
28036
|
key: 2,
|
|
28031
|
-
"is-all-selected": T.value.length ===
|
|
28032
|
-
loading:
|
|
28037
|
+
"is-all-selected": T.value.length === Xg.value.length,
|
|
28038
|
+
loading: Ug.value,
|
|
28033
28039
|
"selected-count": T.value.length,
|
|
28034
|
-
onCancel:
|
|
28035
|
-
onConfirm:
|
|
28036
|
-
onToggleAll:
|
|
28040
|
+
onCancel: c_,
|
|
28041
|
+
onConfirm: l_,
|
|
28042
|
+
onToggleAll: d_
|
|
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: w_,
|
|
28049
|
+
onSubmit: E_
|
|
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: Jg.value,
|
|
28054
|
+
"onUpdate:modelValue": n[1] ||= (e) => Jg.value = e,
|
|
28055
|
+
cite: Yg.value,
|
|
28056
|
+
"onUpdate:cite": n[2] ||= (e) => Yg.value = e,
|
|
28051
28057
|
"message-status": B.value,
|
|
28052
|
-
"on-send-message":
|
|
28053
|
-
"on-stop-sending":
|
|
28054
|
-
"on-upload":
|
|
28058
|
+
"on-send-message": __,
|
|
28059
|
+
"on-stop-sending": v_,
|
|
28060
|
+
"on-upload": h_,
|
|
28055
28061
|
placeholder: i.placeholder,
|
|
28056
|
-
prompts:
|
|
28057
|
-
resources:
|
|
28062
|
+
prompts: r_.value,
|
|
28063
|
+
resources: n_.value,
|
|
28058
28064
|
"shortcut-id": u.value?.id,
|
|
28059
|
-
shortcuts:
|
|
28060
|
-
|
|
28065
|
+
shortcuts: s_.value,
|
|
28066
|
+
onDeleteShortcut: w_,
|
|
28067
|
+
onSelectShortcut: b_
|
|
28061
28068
|
}, null, 8, [
|
|
28062
28069
|
"modelValue",
|
|
28063
28070
|
"cite",
|
|
@@ -28887,7 +28894,7 @@ function useDraggable(e = {}, n) {
|
|
|
28887
28894
|
v.value = e, _.value = r, j.value = e - (window.innerWidth - T.value), n?.onDragStop?.(I());
|
|
28888
28895
|
}, H = (e, r, i, a) => {
|
|
28889
28896
|
v.value = e, _.value = r, T.value = Math.min(i, O.value), E.value = a, n?.onResizeStop?.(I());
|
|
28890
|
-
},
|
|
28897
|
+
}, Eg = () => {
|
|
28891
28898
|
O.value = Math.max(window.innerWidth * (o / 100), T.value), nextTick(() => {
|
|
28892
28899
|
if (k.value) v.value = window.innerWidth - T.value - l, _.value = window.innerHeight - s - l;
|
|
28893
28900
|
else {
|
|
@@ -28898,7 +28905,7 @@ function useDraggable(e = {}, n) {
|
|
|
28898
28905
|
}
|
|
28899
28906
|
T.value > O.value && (T.value = O.value);
|
|
28900
28907
|
});
|
|
28901
|
-
},
|
|
28908
|
+
}, Dg = () => {
|
|
28902
28909
|
k.value ? (_.value = d.value, nextTick(() => {
|
|
28903
28910
|
E.value = m.value, v.value = u.value, T.value = g.value;
|
|
28904
28911
|
})) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
|
|
@@ -28908,9 +28915,9 @@ function useDraggable(e = {}, n) {
|
|
|
28908
28915
|
T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
|
|
28909
28916
|
};
|
|
28910
28917
|
return onMounted(() => {
|
|
28911
|
-
window.addEventListener("resize",
|
|
28918
|
+
window.addEventListener("resize", Eg);
|
|
28912
28919
|
}), onBeforeUnmount(() => {
|
|
28913
|
-
window.removeEventListener("resize",
|
|
28920
|
+
window.removeEventListener("resize", Eg);
|
|
28914
28921
|
}), {
|
|
28915
28922
|
minWidth: i,
|
|
28916
28923
|
minHeight: a,
|
|
@@ -28924,7 +28931,7 @@ function useDraggable(e = {}, n) {
|
|
|
28924
28931
|
handleResizing: z,
|
|
28925
28932
|
handleDragStop: B,
|
|
28926
28933
|
handleResizeStop: H,
|
|
28927
|
-
toggleCompression:
|
|
28934
|
+
toggleCompression: Dg,
|
|
28928
28935
|
updatePosition: K,
|
|
28929
28936
|
updateSize: q,
|
|
28930
28937
|
updatePositionAndSize: (e, n, r, i) => {
|
|
@@ -28969,7 +28976,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
28969
28976
|
"compression-change"
|
|
28970
28977
|
],
|
|
28971
28978
|
setup(e, { expose: n, emit: r }) {
|
|
28972
|
-
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize:
|
|
28979
|
+
let i = e, a = r, o = ref(!1), { minWidth: s, minHeight: l, maxWidth: u, top: g, left: _, width: T, height: E, isCompressed: O, handleDragging: k, handleResizing: j, handleDragStop: I, handleResizeStop: L, toggleCompression: z, updatePosition: B, updateSize: H, updatePositionAndSize: Eg } = useDraggable({
|
|
28973
28980
|
initWidth: i.defaultWidth,
|
|
28974
28981
|
minWidth: i.minWidth,
|
|
28975
28982
|
minHeight: i.minHeight,
|
|
@@ -29000,13 +29007,13 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29000
29007
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
29001
29008
|
e.style.pointerEvents = "";
|
|
29002
29009
|
});
|
|
29003
|
-
},
|
|
29010
|
+
}, Og = (e, n) => {
|
|
29004
29011
|
o.value || (o.value = !0, J()), k(e, n);
|
|
29005
29012
|
}, Q = (e, n, r, i) => {
|
|
29006
29013
|
o.value || (o.value = !0, J()), j(e, n, r, i);
|
|
29007
29014
|
}, $ = (e, n) => {
|
|
29008
29015
|
I(e, n), o.value = !1, Z();
|
|
29009
|
-
},
|
|
29016
|
+
}, Ag = (e, n, r, i) => {
|
|
29010
29017
|
L(e, n, r, i), o.value = !1, Z();
|
|
29011
29018
|
};
|
|
29012
29019
|
return watch(O, (e) => {
|
|
@@ -29014,7 +29021,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29014
29021
|
}), n({
|
|
29015
29022
|
updatePosition: B,
|
|
29016
29023
|
updateSize: H,
|
|
29017
|
-
updatePositionAndSize:
|
|
29024
|
+
updatePositionAndSize: Eg,
|
|
29018
29025
|
toggleCompression: z,
|
|
29019
29026
|
positionAndSize: K,
|
|
29020
29027
|
isCompressed: O
|
|
@@ -29036,10 +29043,10 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29036
29043
|
"prevent-deactivation": !0,
|
|
29037
29044
|
"drag-handle": i.dragHandle,
|
|
29038
29045
|
"class-name": "draggable-container-inner",
|
|
29039
|
-
onDragging:
|
|
29046
|
+
onDragging: Og,
|
|
29040
29047
|
onResizing: Q,
|
|
29041
29048
|
onDragStop: $,
|
|
29042
|
-
onResizeStop:
|
|
29049
|
+
onResizeStop: Ag
|
|
29043
29050
|
}, {
|
|
29044
29051
|
default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
|
|
29045
29052
|
_: 3
|
|
@@ -29122,7 +29129,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29122
29129
|
let z = computed(() => _.value ? t("恢复默认大小") : t("最小化,将缩成锚点")), { createTooltip: B, destroyAll: H } = useTooltip({
|
|
29123
29130
|
theme: "ai-blueking",
|
|
29124
29131
|
delay: [0, 0]
|
|
29125
|
-
}),
|
|
29132
|
+
}), Eg = () => {
|
|
29126
29133
|
nextTick(() => {
|
|
29127
29134
|
K();
|
|
29128
29135
|
});
|
|
@@ -29136,9 +29143,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29136
29143
|
}), onMounted(() => {
|
|
29137
29144
|
nextTick(() => {
|
|
29138
29145
|
K();
|
|
29139
|
-
}), window.addEventListener("resize",
|
|
29146
|
+
}), window.addEventListener("resize", Eg);
|
|
29140
29147
|
}), onBeforeUnmount(() => {
|
|
29141
|
-
window.removeEventListener("resize",
|
|
29148
|
+
window.removeEventListener("resize", Eg);
|
|
29142
29149
|
}), (n, r) => (openBlock(), createBlock(unref(U), {
|
|
29143
29150
|
active: !e.isPanelShow,
|
|
29144
29151
|
axis: "y",
|
|
@@ -29256,7 +29263,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29256
29263
|
}), T = _.panelVisible, O = _.nimbusMinimized, { forwardToManager: k } = useEventBridge({
|
|
29257
29264
|
componentManager: _,
|
|
29258
29265
|
emit: a
|
|
29259
|
-
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession:
|
|
29266
|
+
}), j = createEventForwarders(k), { chatHelper: I, isReady: L, agentInfo: B, agentName: H, currentSession: Eg } = useChatBootstrap({
|
|
29260
29267
|
url: u,
|
|
29261
29268
|
requestOptions: i.requestOptions,
|
|
29262
29269
|
autoInit: !0,
|
|
@@ -29282,9 +29289,12 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29282
29289
|
}), G = I, K = new SessionBusinessManager(G.session, G.message, null, {
|
|
29283
29290
|
enableChatSession: i.enableChatSession,
|
|
29284
29291
|
initialSessionCode: i.initialSessionCode
|
|
29285
|
-
}), q = new ShareBusinessManager(G.message, G.session),
|
|
29286
|
-
let
|
|
29287
|
-
return
|
|
29292
|
+
}), q = new ShareBusinessManager(G.message, G.session), Og = new UIStateManager(), Q = computed(() => Og.isSelectionMode.value), $ = ref(!1), Ag = new ShortcutManager(null, i.shortcuts || []), Mg = ref(!1), Ng = ref(""), Pg = { appendTo: (e) => {
|
|
29293
|
+
let n = e.closest(".draggable-container-content");
|
|
29294
|
+
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
|
|
29295
|
+
} }, Fg = computed(() => _.isCompressed.value), Ig = computed(() => H.value), Lg = ref(""), Rg = ref(!0), Bg = ref(!1), Vg = computed(() => i.resources?.length ? i.resources : flattenResources(B.value?.resources)), Hg = computed(() => i.prompts?.length ? i.prompts : B.value?.conversationSettings?.predefinedQuestions ?? []), Ug = computed(() => {
|
|
29296
|
+
let e = Ag.effectiveShortcuts.value;
|
|
29297
|
+
return typeof i.shortcutFilter == "function" && Ng.value ? e.filter((e) => i.shortcutFilter?.(e, Ng.value)) : e;
|
|
29288
29298
|
});
|
|
29289
29299
|
watch(() => L.value, async (e) => {
|
|
29290
29300
|
if (e && B.value) {
|
|
@@ -29295,31 +29305,31 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29295
29305
|
}).catch(() => {}), e.conversationSettings && (k("session-initialized", {
|
|
29296
29306
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
29297
29307
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
29298
|
-
}), e.conversationSettings.commands &&
|
|
29308
|
+
}), e.conversationSettings.commands && Ag.setAgentShortcuts(e.conversationSettings.commands)), i.loadRecentSessionOnMount) try {
|
|
29299
29309
|
await K.loadRecentSession({ skipLoadSessions: !0 });
|
|
29300
29310
|
} catch (e) {
|
|
29301
29311
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
29302
29312
|
}
|
|
29303
29313
|
}
|
|
29304
29314
|
}, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
|
|
29305
|
-
|
|
29306
|
-
}, { immediate: !0 }), watch(() =>
|
|
29307
|
-
e && (Lg.value = e.sessionName || "",
|
|
29315
|
+
Ag.setShortcuts(e || []);
|
|
29316
|
+
}, { immediate: !0 }), watch(() => Eg.value, (e) => {
|
|
29317
|
+
e && (Lg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0);
|
|
29308
29318
|
}, { immediate: !0 }), watch(() => G.message.list.value.length, (e) => {
|
|
29309
|
-
e > 0 && (
|
|
29319
|
+
e > 0 && (Bg.value = !0);
|
|
29310
29320
|
});
|
|
29311
29321
|
let Wg = async (e) => {
|
|
29312
29322
|
_.showPanel(e), e && l.value && await l.value.switchSession(e);
|
|
29313
|
-
},
|
|
29323
|
+
}, Kg = () => {
|
|
29314
29324
|
_.hidePanel();
|
|
29315
29325
|
}, qg = () => {
|
|
29316
|
-
|
|
29317
|
-
},
|
|
29326
|
+
Kg();
|
|
29327
|
+
}, Yg = () => {
|
|
29318
29328
|
_.handleNimbusClick();
|
|
29319
29329
|
}, Xg = (e) => {
|
|
29320
|
-
|
|
29330
|
+
Ng.value = e;
|
|
29321
29331
|
}, Zg = async (e, n) => {
|
|
29322
|
-
|
|
29332
|
+
Mg.value = !1, await Wg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
|
|
29323
29333
|
shortcut: e,
|
|
29324
29334
|
source: "popup"
|
|
29325
29335
|
});
|
|
@@ -29339,7 +29349,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29339
29349
|
_.setCompressed(e);
|
|
29340
29350
|
}, a_ = async () => {
|
|
29341
29351
|
j.newChat();
|
|
29342
|
-
},
|
|
29352
|
+
}, s_ = (e) => {
|
|
29343
29353
|
j.historyClick(e);
|
|
29344
29354
|
}, c_ = async (e) => {
|
|
29345
29355
|
await K.switchSession(e);
|
|
@@ -29379,9 +29389,9 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29379
29389
|
}
|
|
29380
29390
|
j.rename(e);
|
|
29381
29391
|
}, m_ = () => {
|
|
29382
|
-
|
|
29392
|
+
Og.enableSelectionMode(), j.share();
|
|
29383
29393
|
}, h_ = () => {
|
|
29384
|
-
|
|
29394
|
+
Og.disableSelectionMode();
|
|
29385
29395
|
}, g_ = async (e) => {
|
|
29386
29396
|
$.value = !0;
|
|
29387
29397
|
try {
|
|
@@ -29389,7 +29399,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29389
29399
|
await copyToClipboard(n), Message({
|
|
29390
29400
|
message: t("分享链接已复制到剪贴板"),
|
|
29391
29401
|
theme: "success"
|
|
29392
|
-
}),
|
|
29402
|
+
}), Og.disableSelectionMode(), j.shareMessages(r);
|
|
29393
29403
|
} catch (e) {
|
|
29394
29404
|
console.error("[AIBlueking] Failed to share messages:", e), O_(e);
|
|
29395
29405
|
} finally {
|
|
@@ -29398,7 +29408,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29398
29408
|
}, __ = async (e) => {
|
|
29399
29409
|
l.value && await l.value.sendMessage(e);
|
|
29400
29410
|
}, v_ = (e) => {
|
|
29401
|
-
|
|
29411
|
+
Bg.value = !0, j.sendMessage(e);
|
|
29402
29412
|
}, y_ = () => {
|
|
29403
29413
|
j.receiveStart();
|
|
29404
29414
|
}, b_ = () => {
|
|
@@ -29420,7 +29430,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29420
29430
|
console.error("[AIBlueking] Failed to update session name:", e), O_(e);
|
|
29421
29431
|
}
|
|
29422
29432
|
}, D_ = (e) => {
|
|
29423
|
-
e && (Lg.value = e.sessionName || "",
|
|
29433
|
+
e && (Lg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0 || G.message.list.value.length > 0);
|
|
29424
29434
|
}, O_ = (e) => {
|
|
29425
29435
|
console.error("ChatBot error:", e), _.emitInternal("sdk-error", {
|
|
29426
29436
|
apiName: "chat",
|
|
@@ -29439,7 +29449,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29439
29449
|
}, N_ = () => {
|
|
29440
29450
|
l.value && l.value.focusInput();
|
|
29441
29451
|
}, P_ = (e) => {
|
|
29442
|
-
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ?
|
|
29452
|
+
isTogglePanelShortcut(e) && (e.preventDefault(), T.value ? Kg() : Wg());
|
|
29443
29453
|
};
|
|
29444
29454
|
return onMounted(async () => {
|
|
29445
29455
|
o.value && _.setContainerRef(o.value), window.addEventListener("keydown", P_);
|
|
@@ -29447,7 +29457,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29447
29457
|
window.removeEventListener("keydown", P_), _.destroy();
|
|
29448
29458
|
}), n({
|
|
29449
29459
|
show: Wg,
|
|
29450
|
-
hide:
|
|
29460
|
+
hide: Kg,
|
|
29451
29461
|
sendMessage: __,
|
|
29452
29462
|
stopGeneration: C_,
|
|
29453
29463
|
addNewSession: w_,
|
|
@@ -29489,7 +29499,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29489
29499
|
"dropdown-menu-config": i.dropdownMenuConfig,
|
|
29490
29500
|
"enable-chat-session": i.enableChatSession,
|
|
29491
29501
|
"has-permission": Rg.value,
|
|
29492
|
-
"has-session-contents":
|
|
29502
|
+
"has-session-contents": Bg.value,
|
|
29493
29503
|
"is-compression-height": Fg.value,
|
|
29494
29504
|
"session-business-manager": unref(K),
|
|
29495
29505
|
"session-name": Lg.value,
|
|
@@ -29501,7 +29511,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29501
29511
|
onAutoGenerateName: d_,
|
|
29502
29512
|
onClose: qg,
|
|
29503
29513
|
onHelpClick: f_,
|
|
29504
|
-
onHistoryClick:
|
|
29514
|
+
onHistoryClick: s_,
|
|
29505
29515
|
onHistorySessionDelete: l_,
|
|
29506
29516
|
onHistorySessionRename: u_,
|
|
29507
29517
|
onHistorySessionSwitch: c_,
|
|
@@ -29534,6 +29544,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29534
29544
|
"chat-helper": unref(G),
|
|
29535
29545
|
"enable-selection": Q.value,
|
|
29536
29546
|
"hello-text": i.helloText,
|
|
29547
|
+
"message-tools-tippy-options": Pg,
|
|
29537
29548
|
placeholder: i.placeholder,
|
|
29538
29549
|
prompts: Hg.value,
|
|
29539
29550
|
"request-options": i.requestOptions,
|
|
@@ -29590,7 +29601,7 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29590
29601
|
"onUpdate:isPanelShow": n[5] ||= (e) => isRef(T) ? T.value = e : null,
|
|
29591
29602
|
"default-minimize": i.defaultMinimize,
|
|
29592
29603
|
size: i.nimbusSize,
|
|
29593
|
-
onClick:
|
|
29604
|
+
onClick: Yg
|
|
29594
29605
|
}, null, 8, [
|
|
29595
29606
|
"is-minimize",
|
|
29596
29607
|
"is-panel-show",
|
|
@@ -29600,8 +29611,8 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29600
29611
|
createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
29601
29612
|
i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
|
|
29602
29613
|
key: 1,
|
|
29603
|
-
visible:
|
|
29604
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
29614
|
+
visible: Mg.value,
|
|
29615
|
+
"onUpdate:visible": n[6] ||= (e) => Mg.value = e,
|
|
29605
29616
|
"max-shortcut-count": i.shortcutLimit,
|
|
29606
29617
|
shortcuts: Ug.value,
|
|
29607
29618
|
onSelectShortcut: Zg,
|
|
@@ -29613,5 +29624,5 @@ var _hoisted_1$2 = { class: "draggable-container-content" }, draggable_container
|
|
|
29613
29624
|
])) : createCommentVNode("v-if", !0)
|
|
29614
29625
|
], 2)], 8, ["to"]));
|
|
29615
29626
|
}
|
|
29616
|
-
}), [["__scopeId", "data-v-
|
|
29627
|
+
}), [["__scopeId", "data-v-ea4d9dfb"]]);
|
|
29617
29628
|
export { AGUIProtocol, ai_blueking_default as AIBlueking, ai_blueking_default as default, BluekingProtocol, BootstrapPhase, chat_bot_default as ChatBot, ChatBusinessManager, ComponentManager, draggable_container_default as DraggableContainer, MessageContentType, SessionBusinessManager, ShortcutManager, UIStateManager, createBluekingProtocol, createComponentManager, defaultProps, useChatBootstrap, useChatHelper, useDraggable };
|