@blueking/ai-blueking 2.0.0-dev.26 → 2.0.0-dev.27

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.
@@ -746,17 +746,17 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
746
746
  G(200);
747
747
  }, q = () => {
748
748
  G(300);
749
- }, Dg = (e) => {
749
+ }, Tg = (e) => {
750
750
  i.value && l.value?.contains(e.target) || z();
751
751
  }, Z = (e) => {
752
752
  !k.value || !i.value || e.target instanceof HTMLElement && e.target.contains(k.value?.anchorNode) && z();
753
- }, Og = () => {
753
+ }, Eg = () => {
754
754
  d.value?.show();
755
755
  };
756
756
  return onMounted(() => {
757
- document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown", Dg), document.addEventListener("scroll", Z, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
757
+ document.addEventListener("selectionchange", q), document.addEventListener("mouseup", K), document.addEventListener("mousedown", Tg), document.addEventListener("scroll", Z, !0), window.addEventListener("resize", z), window.addEventListener("blur", z);
758
758
  }), onUnmounted(() => {
759
- document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown", Dg), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
759
+ document.removeEventListener("selectionchange", q), document.removeEventListener("mouseup", K), document.removeEventListener("mousedown", Tg), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", z), window.removeEventListener("blur", z);
760
760
  }), (n, r) => (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, { name: "ai-fade" }, {
761
761
  default: withCtx(() => [i.value ? (openBlock(), createElementBlock("div", {
762
762
  key: 0,
@@ -799,7 +799,7 @@ var _hoisted_1$43 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
799
799
  }, null, 8, ["shortcut", "onClick"]))), 128))])) : createCommentVNode("v-if", !0)]),
800
800
  default: withCtx(() => [createVNode(shortcut_btn_default, {
801
801
  style: { width: "28px" },
802
- onClick: Og
802
+ onClick: Eg
803
803
  }, {
804
804
  default: withCtx(() => [createVNode(unref(CollapsedIcon), { class: "shortcut-btn-more-icon" })]),
805
805
  _: 1
@@ -4832,7 +4832,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4832
4832
  return a;
4833
4833
  }).map((e) => `(${e})`).join(n);
4834
4834
  }
4835
- var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?", Dg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Og = (e = {}) => {
4835
+ var G = /\b\B/, K = "[a-zA-Z]\\w*", q = "[a-zA-Z_]\\w*", J = "\\b\\d+(\\.\\d+)?", Tg = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", Z = "\\b(0b[01]+)", Q = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Eg = (e = {}) => {
4836
4836
  let n = /^#![ ]*\//;
4837
4837
  return e.binary && (e.begin = k(n, /.*\b/, e.binary, /\b.*/)), o({
4838
4838
  scope: "meta",
@@ -4843,22 +4843,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4843
4843
  e.index !== 0 && n.ignoreMatch();
4844
4844
  }
4845
4845
  }, e);
4846
- }, kg = {
4846
+ }, Dg = {
4847
4847
  begin: "\\\\[\\s\\S]",
4848
4848
  relevance: 0
4849
- }, Ag = {
4849
+ }, Og = {
4850
4850
  scope: "string",
4851
4851
  begin: "'",
4852
4852
  end: "'",
4853
4853
  illegal: "\\n",
4854
- contains: [kg]
4854
+ contains: [Dg]
4855
4855
  }, $ = {
4856
4856
  scope: "string",
4857
4857
  begin: "\"",
4858
4858
  end: "\"",
4859
4859
  illegal: "\\n",
4860
- contains: [kg]
4861
- }, jg = { 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/ }, Mg = function(e, n, r = {}) {
4860
+ contains: [Dg]
4861
+ }, kg = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, Ag = function(e, n, r = {}) {
4862
4862
  let i = o({
4863
4863
  scope: "comment",
4864
4864
  begin: e,
@@ -4874,50 +4874,50 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4874
4874
  });
4875
4875
  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,}/);
4876
4876
  return i.contains.push({ begin: k(/[ ]+/, "(", a, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), i;
4877
- }, Ng = Mg("//", "$"), Pg = Mg("/\\*", "\\*/"), Fg = Mg("#", "$"), Ig = {
4877
+ }, jg = Ag("//", "$"), Mg = Ag("/\\*", "\\*/"), Ng = Ag("#", "$"), Pg = {
4878
4878
  scope: "number",
4879
4879
  begin: J,
4880
4880
  relevance: 0
4881
- }, Lg = {
4881
+ }, Fg = {
4882
4882
  scope: "number",
4883
- begin: Dg,
4883
+ begin: Tg,
4884
4884
  relevance: 0
4885
- }, Rg = {
4885
+ }, Ig = {
4886
4886
  scope: "number",
4887
4887
  begin: Z,
4888
4888
  relevance: 0
4889
- }, zg = {
4889
+ }, Lg = {
4890
4890
  scope: "regexp",
4891
4891
  begin: /\/(?=[^/\n]*\/)/,
4892
4892
  end: /\/[gimuy]*/,
4893
- contains: [kg, {
4893
+ contains: [Dg, {
4894
4894
  begin: /\[/,
4895
4895
  end: /\]/,
4896
4896
  relevance: 0,
4897
- contains: [kg]
4897
+ contains: [Dg]
4898
4898
  }]
4899
- }, Bg = {
4899
+ }, Rg = {
4900
4900
  scope: "title",
4901
4901
  begin: K,
4902
4902
  relevance: 0
4903
- }, Vg = {
4903
+ }, zg = {
4904
4904
  scope: "title",
4905
4905
  begin: q,
4906
4906
  relevance: 0
4907
- }, Hg = {
4907
+ }, Bg = {
4908
4908
  begin: "\\.\\s*" + q,
4909
4909
  relevance: 0
4910
- }, Ug = /* @__PURE__ */ Object.freeze({
4910
+ }, Vg = /* @__PURE__ */ Object.freeze({
4911
4911
  __proto__: null,
4912
- APOS_STRING_MODE: Ag,
4913
- BACKSLASH_ESCAPE: kg,
4914
- BINARY_NUMBER_MODE: Rg,
4912
+ APOS_STRING_MODE: Og,
4913
+ BACKSLASH_ESCAPE: Dg,
4914
+ BINARY_NUMBER_MODE: Ig,
4915
4915
  BINARY_NUMBER_RE: Z,
4916
- COMMENT: Mg,
4917
- C_BLOCK_COMMENT_MODE: Pg,
4918
- C_LINE_COMMENT_MODE: Ng,
4919
- C_NUMBER_MODE: Lg,
4920
- C_NUMBER_RE: Dg,
4916
+ COMMENT: Ag,
4917
+ C_BLOCK_COMMENT_MODE: Mg,
4918
+ C_LINE_COMMENT_MODE: jg,
4919
+ C_NUMBER_MODE: Fg,
4920
+ C_NUMBER_RE: Tg,
4921
4921
  END_SAME_AS_BEGIN: function(e) {
4922
4922
  return Object.assign(e, {
4923
4923
  "on:begin": (e, n) => {
@@ -4928,43 +4928,43 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4928
4928
  }
4929
4929
  });
4930
4930
  },
4931
- HASH_COMMENT_MODE: Fg,
4931
+ HASH_COMMENT_MODE: Ng,
4932
4932
  IDENT_RE: K,
4933
4933
  MATCH_NOTHING_RE: G,
4934
- METHOD_GUARD: Hg,
4935
- NUMBER_MODE: Ig,
4934
+ METHOD_GUARD: Bg,
4935
+ NUMBER_MODE: Pg,
4936
4936
  NUMBER_RE: J,
4937
- PHRASAL_WORDS_MODE: jg,
4937
+ PHRASAL_WORDS_MODE: kg,
4938
4938
  QUOTE_STRING_MODE: $,
4939
- REGEXP_MODE: zg,
4939
+ REGEXP_MODE: Lg,
4940
4940
  RE_STARTERS_RE: Q,
4941
- SHEBANG: Og,
4942
- TITLE_MODE: Bg,
4941
+ SHEBANG: Eg,
4942
+ TITLE_MODE: Rg,
4943
4943
  UNDERSCORE_IDENT_RE: q,
4944
- UNDERSCORE_TITLE_MODE: Vg
4944
+ UNDERSCORE_TITLE_MODE: zg
4945
4945
  });
4946
- function Wg(e, n) {
4946
+ function Hg(e, n) {
4947
4947
  e.input[e.index - 1] === "." && n.ignoreMatch();
4948
4948
  }
4949
- function Gg(e, n) {
4949
+ function Ug(e, n) {
4950
4950
  e.className !== void 0 && (e.scope = e.className, delete e.className);
4951
4951
  }
4952
- function Kg(e, n) {
4953
- n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Wg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
4952
+ function Wg(e, n) {
4953
+ n && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Hg, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
4954
4954
  }
4955
- function qg(e, n) {
4955
+ function Gg(e, n) {
4956
4956
  Array.isArray(e.illegal) && (e.illegal = I(...e.illegal));
4957
4957
  }
4958
- function Jg(e, n) {
4958
+ function Kg(e, n) {
4959
4959
  if (e.match) {
4960
4960
  if (e.begin || e.end) throw Error("begin & end are not supported with match");
4961
4961
  e.begin = e.match, delete e.match;
4962
4962
  }
4963
4963
  }
4964
- function Yg(e, n) {
4964
+ function qg(e, n) {
4965
4965
  e.relevance === void 0 && (e.relevance = 1);
4966
4966
  }
4967
- var Xg = (e, n) => {
4967
+ var Jg = (e, n) => {
4968
4968
  if (!e.beforeMatch) return;
4969
4969
  if (e.starts) throw Error("beforeMatch cannot be used with starts");
4970
4970
  let r = Object.assign({}, e);
@@ -4974,7 +4974,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4974
4974
  relevance: 0,
4975
4975
  contains: [Object.assign(r, { endsParent: !0 })]
4976
4976
  }, e.relevance = 0, delete r.beforeMatch;
4977
- }, Zg = [
4977
+ }, Yg = [
4978
4978
  "of",
4979
4979
  "and",
4980
4980
  "for",
@@ -4986,58 +4986,58 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
4986
4986
  "parent",
4987
4987
  "list",
4988
4988
  "value"
4989
- ], Qg = "keyword";
4990
- function $g(e, n, r = Qg) {
4989
+ ], Xg = "keyword";
4990
+ function Zg(e, n, r = Xg) {
4991
4991
  let i = Object.create(null);
4992
4992
  return typeof e == "string" ? a(r, e.split(" ")) : Array.isArray(e) ? a(r, e) : Object.keys(e).forEach(function(r) {
4993
- Object.assign(i, $g(e[r], n, r));
4993
+ Object.assign(i, Zg(e[r], n, r));
4994
4994
  }), i;
4995
4995
  function a(e, r) {
4996
4996
  n && (r = r.map((e) => e.toLowerCase())), r.forEach(function(n) {
4997
4997
  let r = n.split("|");
4998
- i[r[0]] = [e, e_(r[0], r[1])];
4998
+ i[r[0]] = [e, Qg(r[0], r[1])];
4999
4999
  });
5000
5000
  }
5001
5001
  }
5002
- function e_(e, n) {
5003
- return n ? Number(n) : t_(e) ? 0 : 1;
5002
+ function Qg(e, n) {
5003
+ return n ? Number(n) : $g(e) ? 0 : 1;
5004
5004
  }
5005
- function t_(e) {
5006
- return Zg.includes(e.toLowerCase());
5005
+ function $g(e) {
5006
+ return Yg.includes(e.toLowerCase());
5007
5007
  }
5008
- var n_ = {}, r_ = (e) => {
5008
+ var e_ = {}, t_ = (e) => {
5009
5009
  console.error(e);
5010
- }, i_ = (e, ...n) => {
5010
+ }, n_ = (e, ...n) => {
5011
5011
  console.log(`WARN: ${e}`, ...n);
5012
- }, a_ = (e, n) => {
5013
- n_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), n_[`${e}/${n}`] = !0);
5014
- }, o_ = /* @__PURE__ */ Error();
5015
- function s_(e, n, { key: r }) {
5012
+ }, r_ = (e, n) => {
5013
+ e_[`${e}/${n}`] || (console.log(`Deprecated as of ${e}. ${n}`), e_[`${e}/${n}`] = !0);
5014
+ }, i_ = /* @__PURE__ */ Error();
5015
+ function a_(e, n, { key: r }) {
5016
5016
  let i = 0, a = e[r], o = {}, s = {};
5017
5017
  for (let e = 1; e <= n.length; e++) s[e + i] = a[e], o[e + i] = !0, i += L(n[e - 1]);
5018
5018
  e[r] = s, e[r]._emit = o, e[r]._multi = !0;
5019
5019
  }
5020
- function c_(e) {
5020
+ function o_(e) {
5021
5021
  if (Array.isArray(e.begin)) {
5022
- if (e.skip || e.excludeBegin || e.returnBegin) throw r_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), o_;
5023
- if (typeof e.beginScope != "object" || e.beginScope === null) throw r_("beginScope must be object"), o_;
5024
- s_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
5022
+ if (e.skip || e.excludeBegin || e.returnBegin) throw t_("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), i_;
5023
+ if (typeof e.beginScope != "object" || e.beginScope === null) throw t_("beginScope must be object"), i_;
5024
+ a_(e, e.begin, { key: "beginScope" }), e.begin = H(e.begin, { joinWith: "" });
5025
5025
  }
5026
5026
  }
5027
- function l_(e) {
5027
+ function s_(e) {
5028
5028
  if (Array.isArray(e.end)) {
5029
- if (e.skip || e.excludeEnd || e.returnEnd) throw r_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), o_;
5030
- if (typeof e.endScope != "object" || e.endScope === null) throw r_("endScope must be object"), o_;
5031
- s_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
5029
+ if (e.skip || e.excludeEnd || e.returnEnd) throw t_("skip, excludeEnd, returnEnd not compatible with endScope: {}"), i_;
5030
+ if (typeof e.endScope != "object" || e.endScope === null) throw t_("endScope must be object"), i_;
5031
+ a_(e, e.end, { key: "endScope" }), e.end = H(e.end, { joinWith: "" });
5032
5032
  }
5033
5033
  }
5034
- function u_(e) {
5034
+ function c_(e) {
5035
5035
  e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
5036
5036
  }
5037
- function d_(e) {
5038
- u_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), c_(e), l_(e);
5037
+ function l_(e) {
5038
+ c_(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), o_(e), s_(e);
5039
5039
  }
5040
- function f_(e) {
5040
+ function u_(e) {
5041
5041
  function n(n, r) {
5042
5042
  return new RegExp(v(n), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (r ? "g" : ""));
5043
5043
  }
@@ -5099,18 +5099,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5099
5099
  let o = r;
5100
5100
  if (r.isCompiled) return o;
5101
5101
  [
5102
- Gg,
5103
- Jg,
5104
- d_,
5105
- Xg
5106
- ].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
5102
+ Ug,
5107
5103
  Kg,
5108
- qg,
5109
- Yg
5104
+ l_,
5105
+ Jg
5106
+ ].forEach((e) => e(r, i)), e.compilerExtensions.forEach((e) => e(r, i)), r.__beforeBegin = null, [
5107
+ Wg,
5108
+ Gg,
5109
+ qg
5110
5110
  ].forEach((e) => e(r, i)), r.isCompiled = !0;
5111
5111
  let l = null;
5112
- 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 &&= $g(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) {
5113
- return m_(e === "self" ? r : e);
5112
+ return typeof r.keywords == "object" && r.keywords.$pattern && (r.keywords = Object.assign({}, r.keywords), l = r.keywords.$pattern, delete r.keywords.$pattern), l ||= /\w+/, r.keywords &&= Zg(r.keywords, e.case_insensitive), o.keywordPatternRe = n(l, !0), i && (r.begin ||= /\B|\b/, o.beginRe = n(o.begin), !r.end && !r.endsWithParent && (r.end = /\B|\b/), r.end && (o.endRe = n(o.end)), o.terminatorEnd = v(o.end) || "", r.endsWithParent && i.terminatorEnd && (o.terminatorEnd += (r.end ? "|" : "") + i.terminatorEnd)), r.illegal && (o.illegalRe = n(r.illegal)), r.contains ||= [], r.contains = [].concat(...r.contains.map(function(e) {
5113
+ return f_(e === "self" ? r : e);
5114
5114
  })), r.contains.forEach(function(e) {
5115
5115
  s(e, o);
5116
5116
  }), r.starts && s(r.starts, i), o.matcher = a(o), o;
@@ -5118,19 +5118,19 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5118
5118
  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.");
5119
5119
  return e.classNameAliases = o(e.classNameAliases || {}), s(e);
5120
5120
  }
5121
- function p_(e) {
5122
- return e ? e.endsWithParent || p_(e.starts) : !1;
5121
+ function d_(e) {
5122
+ return e ? e.endsWithParent || d_(e.starts) : !1;
5123
5123
  }
5124
- function m_(e) {
5124
+ function f_(e) {
5125
5125
  return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(n) {
5126
5126
  return o(e, { variants: null }, n);
5127
- })), e.cachedVariants ? e.cachedVariants : p_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
5127
+ })), e.cachedVariants ? e.cachedVariants : d_(e) ? o(e, { starts: e.starts ? o(e.starts) : null }) : Object.isFrozen(e) ? o(e) : e;
5128
5128
  }
5129
- var h_ = "11.11.1", g_ = class extends Error {
5129
+ var p_ = "11.11.1", m_ = class extends Error {
5130
5130
  constructor(e, n) {
5131
5131
  super(e), this.name = "HTMLInjectionError", this.html = n;
5132
5132
  }
5133
- }, __ = a, v_ = o, y_ = Symbol("nomatch"), b_ = 7, x_ = function(e) {
5133
+ }, h_ = a, g_ = o, __ = Symbol("nomatch"), v_ = 7, y_ = function(e) {
5134
5134
  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 = {
5135
5135
  disableAutodetect: !0,
5136
5136
  name: "Plain text",
@@ -5153,21 +5153,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5153
5153
  n += e.parentNode ? e.parentNode.className : "";
5154
5154
  let r = d.languageDetectRe.exec(n);
5155
5155
  if (r) {
5156
- let n = Ag(r[1]);
5157
- return n || (i_(l.replace("{}", r[1])), i_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
5156
+ let n = Og(r[1]);
5157
+ return n || (n_(l.replace("{}", r[1])), n_("Falling back to no-highlight mode for this block.", e)), n ? r[1] : "no-highlight";
5158
5158
  }
5159
- return n.split(/\s+/).find((e) => m(e) || Ag(e));
5159
+ return n.split(/\s+/).find((e) => m(e) || Og(e));
5160
5160
  }
5161
5161
  function v(e, n, r) {
5162
5162
  let i = "", a = "";
5163
- typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (a_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), a_("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);
5163
+ typeof n == "object" ? (i = e, r = n.ignoreIllegals, a = n.language) : (r_("10.7.0", "highlight(lang, code, ...args) has been deprecated."), r_("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, i = n), r === void 0 && (r = !0);
5164
5164
  let o = {
5165
5165
  code: i,
5166
5166
  language: a
5167
5167
  };
5168
- Fg("before:highlight", o);
5168
+ Ng("before:highlight", o);
5169
5169
  let s = o.result ? o.result : j(o.language, o.code, r);
5170
- return s.code = o.code, Fg("after:highlight", s), s;
5170
+ return s.code = o.code, Ng("after:highlight", s), s;
5171
5171
  }
5172
5172
  function j(e, r, a, o) {
5173
5173
  let u = Object.create(null);
@@ -5176,7 +5176,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5176
5176
  }
5177
5177
  function g() {
5178
5178
  if (!Q.keywords) {
5179
- kg.addText($);
5179
+ Dg.addText($);
5180
5180
  return;
5181
5181
  }
5182
5182
  let e = 0;
@@ -5187,7 +5187,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5187
5187
  let i = J.case_insensitive ? n[0].toLowerCase() : n[0], a = m(Q, i);
5188
5188
  if (a) {
5189
5189
  let [e, o] = a;
5190
- if (kg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= b_ && (jg += o), e.startsWith("_")) r += n[0];
5190
+ if (Dg.addText(r), r = "", u[i] = (u[i] || 0) + 1, u[i] <= v_ && (kg += o), e.startsWith("_")) r += n[0];
5191
5191
  else {
5192
5192
  let r = J.classNameAliases[e] || e;
5193
5193
  T(n[0], r);
@@ -5195,25 +5195,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5195
5195
  } else r += n[0];
5196
5196
  e = Q.keywordPatternRe.lastIndex, n = Q.keywordPatternRe.exec($);
5197
5197
  }
5198
- r += $.substring(e), kg.addText(r);
5198
+ r += $.substring(e), Dg.addText(r);
5199
5199
  }
5200
5200
  function _() {
5201
5201
  if ($ === "") return;
5202
5202
  let e = null;
5203
5203
  if (typeof Q.subLanguage == "string") {
5204
5204
  if (!n[Q.subLanguage]) {
5205
- kg.addText($);
5205
+ Dg.addText($);
5206
5206
  return;
5207
5207
  }
5208
- e = j(Q.subLanguage, $, !0, Og[Q.subLanguage]), Og[Q.subLanguage] = e._top;
5208
+ e = j(Q.subLanguage, $, !0, Eg[Q.subLanguage]), Eg[Q.subLanguage] = e._top;
5209
5209
  } else e = B($, Q.subLanguage.length ? Q.subLanguage : null);
5210
- Q.relevance > 0 && (jg += e.relevance), kg.__addSublanguage(e._emitter, e.language);
5210
+ Q.relevance > 0 && (kg += e.relevance), Dg.__addSublanguage(e._emitter, e.language);
5211
5211
  }
5212
5212
  function v() {
5213
5213
  Q.subLanguage == null ? g() : _(), $ = "";
5214
5214
  }
5215
5215
  function T(e, n) {
5216
- e !== "" && (kg.startScope(n), kg.addText(e), kg.endScope());
5216
+ e !== "" && (Dg.startScope(n), Dg.addText(e), Dg.endScope());
5217
5217
  }
5218
5218
  function E(e, n) {
5219
5219
  let r = 1, i = n.length - 1;
@@ -5227,7 +5227,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5227
5227
  }
5228
5228
  }
5229
5229
  function O(e, n) {
5230
- return e.scope && typeof e.scope == "string" && kg.openNode(J.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, J.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Q = Object.create(e, { parent: { value: Q } }), Q;
5230
+ return e.scope && typeof e.scope == "string" && Dg.openNode(J.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (T($, J.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), $ = "") : e.beginScope._multi && (E(e.beginScope, n), $ = "")), Q = Object.create(e, { parent: { value: Q } }), Q;
5231
5231
  }
5232
5232
  function k(e, n, r) {
5233
5233
  let a = z(e.endRe, r);
@@ -5244,7 +5244,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5244
5244
  if (e.endsWithParent) return k(e.parent, n, r);
5245
5245
  }
5246
5246
  function I(e) {
5247
- return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Pg = !0, 0);
5247
+ return Q.matcher.regexIndex === 0 ? ($ += e[0], 1) : (Mg = !0, 0);
5248
5248
  }
5249
5249
  function L(e) {
5250
5250
  let n = e[0], r = e.rule, a = new i(r), o = [r.__beforeBegin, r["on:begin"]];
@@ -5253,18 +5253,18 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5253
5253
  }
5254
5254
  function H(e) {
5255
5255
  let n = e[0], i = r.substring(e.index), a = k(Q, e, i);
5256
- if (!a) return y_;
5256
+ if (!a) return __;
5257
5257
  let o = Q;
5258
5258
  Q.endScope && Q.endScope._wrap ? (v(), T(n, Q.endScope._wrap)) : Q.endScope && Q.endScope._multi ? (v(), E(Q.endScope, e)) : o.skip ? $ += n : (o.returnEnd || o.excludeEnd || ($ += n), v(), o.excludeEnd && ($ = n));
5259
5259
  do
5260
- Q.scope && kg.closeNode(), !Q.skip && !Q.subLanguage && (jg += Q.relevance), Q = Q.parent;
5260
+ Q.scope && Dg.closeNode(), !Q.skip && !Q.subLanguage && (kg += Q.relevance), Q = Q.parent;
5261
5261
  while (Q !== a.parent);
5262
5262
  return a.starts && O(a.starts, e), o.returnEnd ? 0 : n.length;
5263
5263
  }
5264
5264
  function G() {
5265
5265
  let e = [];
5266
5266
  for (let n = Q; n !== J; n = n.parent) n.scope && e.unshift(n.scope);
5267
- e.forEach((e) => kg.openNode(e));
5267
+ e.forEach((e) => Dg.openNode(e));
5268
5268
  }
5269
5269
  let K = {};
5270
5270
  function q(n, i) {
@@ -5283,59 +5283,59 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5283
5283
  throw e.mode = Q, e;
5284
5284
  } else if (i.type === "end") {
5285
5285
  let e = H(i);
5286
- if (e !== y_) return e;
5286
+ if (e !== __) return e;
5287
5287
  }
5288
5288
  if (i.type === "illegal" && o === "") return $ += "\n", 1;
5289
- if (Ng > 1e5 && Ng > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
5289
+ if (jg > 1e5 && jg > i.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
5290
5290
  return $ += o, o.length;
5291
5291
  }
5292
- let J = Ag(e);
5293
- if (!J) throw r_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
5294
- let Dg = f_(J), Z = "", Q = o || Dg, Og = {}, kg = new d.__emitter(d);
5292
+ let J = Og(e);
5293
+ if (!J) throw t_(l.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
5294
+ let Tg = u_(J), Z = "", Q = o || Tg, Eg = {}, Dg = new d.__emitter(d);
5295
5295
  G();
5296
- let $ = "", jg = 0, Mg = 0, Ng = 0, Pg = !1;
5296
+ let $ = "", kg = 0, Ag = 0, jg = 0, Mg = !1;
5297
5297
  try {
5298
- if (J.__emitTokens) J.__emitTokens(r, kg);
5298
+ if (J.__emitTokens) J.__emitTokens(r, Dg);
5299
5299
  else {
5300
5300
  for (Q.matcher.considerAll();;) {
5301
- Ng++, Pg ? Pg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = Mg;
5301
+ jg++, Mg ? Mg = !1 : Q.matcher.considerAll(), Q.matcher.lastIndex = Ag;
5302
5302
  let e = Q.matcher.exec(r);
5303
5303
  if (!e) break;
5304
- let n = q(r.substring(Mg, e.index), e);
5305
- Mg = e.index + n;
5304
+ let n = q(r.substring(Ag, e.index), e);
5305
+ Ag = e.index + n;
5306
5306
  }
5307
- q(r.substring(Mg));
5307
+ q(r.substring(Ag));
5308
5308
  }
5309
- return kg.finalize(), Z = kg.toHTML(), {
5309
+ return Dg.finalize(), Z = Dg.toHTML(), {
5310
5310
  language: e,
5311
5311
  value: Z,
5312
- relevance: jg,
5312
+ relevance: kg,
5313
5313
  illegal: !1,
5314
- _emitter: kg,
5314
+ _emitter: Dg,
5315
5315
  _top: Q
5316
5316
  };
5317
5317
  } catch (n) {
5318
5318
  if (n.message && n.message.includes("Illegal")) return {
5319
5319
  language: e,
5320
- value: __(r),
5320
+ value: h_(r),
5321
5321
  illegal: !0,
5322
5322
  relevance: 0,
5323
5323
  _illegalBy: {
5324
5324
  message: n.message,
5325
- index: Mg,
5326
- context: r.slice(Mg - 100, Mg + 100),
5325
+ index: Ag,
5326
+ context: r.slice(Ag - 100, Ag + 100),
5327
5327
  mode: n.mode,
5328
5328
  resultSoFar: Z
5329
5329
  },
5330
- _emitter: kg
5330
+ _emitter: Dg
5331
5331
  };
5332
5332
  if (s) return {
5333
5333
  language: e,
5334
- value: __(r),
5334
+ value: h_(r),
5335
5335
  illegal: !1,
5336
5336
  relevance: 0,
5337
5337
  errorRaised: n,
5338
- _emitter: kg,
5338
+ _emitter: Dg,
5339
5339
  _top: Q
5340
5340
  };
5341
5341
  throw n;
@@ -5343,7 +5343,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5343
5343
  }
5344
5344
  function L(e) {
5345
5345
  let n = {
5346
- value: __(e),
5346
+ value: h_(e),
5347
5347
  illegal: !1,
5348
5348
  relevance: 0,
5349
5349
  _top: u,
@@ -5353,13 +5353,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5353
5353
  }
5354
5354
  function B(e, r) {
5355
5355
  r = r || d.languages || Object.keys(n);
5356
- let i = L(e), a = r.filter(Ag).filter(jg).map((n) => j(n, e, !1));
5356
+ let i = L(e), a = r.filter(Og).filter(kg).map((n) => j(n, e, !1));
5357
5357
  a.unshift(i);
5358
5358
  let [o, s] = a.sort((e, n) => {
5359
5359
  if (e.relevance !== n.relevance) return n.relevance - e.relevance;
5360
5360
  if (e.language && n.language) {
5361
- if (Ag(e.language).supersetOf === n.language) return 1;
5362
- if (Ag(n.language).supersetOf === e.language) return -1;
5361
+ if (Og(e.language).supersetOf === n.language) return 1;
5362
+ if (Og(n.language).supersetOf === e.language) return -1;
5363
5363
  }
5364
5364
  return 0;
5365
5365
  }), l = o;
@@ -5372,14 +5372,14 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5372
5372
  function G(e) {
5373
5373
  let n = null, r = g(e);
5374
5374
  if (m(r)) return;
5375
- if (Fg("before:highlightElement", {
5375
+ if (Ng("before:highlightElement", {
5376
5376
  el: e,
5377
5377
  language: r
5378
5378
  }), e.dataset.highlighted) {
5379
5379
  console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
5380
5380
  return;
5381
5381
  }
5382
- 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 g_("One of your code blocks includes unescaped HTML.", e.innerHTML);
5382
+ if (e.children.length > 0 && (d.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), d.throwUnescapedHTML)) throw new m_("One of your code blocks includes unescaped HTML.", e.innerHTML);
5383
5383
  n = e;
5384
5384
  let i = n.textContent, a = r ? v(i, {
5385
5385
  language: r,
@@ -5392,28 +5392,28 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5392
5392
  }, a.secondBest && (e.secondBest = {
5393
5393
  language: a.secondBest.language,
5394
5394
  relevance: a.secondBest.relevance
5395
- }), Fg("after:highlightElement", {
5395
+ }), Ng("after:highlightElement", {
5396
5396
  el: e,
5397
5397
  result: a,
5398
5398
  text: i
5399
5399
  });
5400
5400
  }
5401
5401
  function K(e) {
5402
- d = v_(d, e);
5402
+ d = g_(d, e);
5403
5403
  }
5404
5404
  let q = () => {
5405
- Z(), a_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
5405
+ Z(), r_("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
5406
5406
  };
5407
5407
  function J() {
5408
- Z(), a_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
5408
+ Z(), r_("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
5409
5409
  }
5410
- let Dg = !1;
5410
+ let Tg = !1;
5411
5411
  function Z() {
5412
5412
  function e() {
5413
5413
  Z();
5414
5414
  }
5415
5415
  if (document.readyState === "loading") {
5416
- Dg || window.addEventListener("DOMContentLoaded", e, !1), Dg = !0;
5416
+ Tg || window.addEventListener("DOMContentLoaded", e, !1), Tg = !0;
5417
5417
  return;
5418
5418
  }
5419
5419
  document.querySelectorAll(d.cssSelector).forEach(G);
@@ -5423,20 +5423,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5423
5423
  try {
5424
5424
  a = i(e);
5425
5425
  } catch (e) {
5426
- if (r_("Language definition for '{}' could not be registered.".replace("{}", r)), s) r_(e);
5426
+ if (t_("Language definition for '{}' could not be registered.".replace("{}", r)), s) t_(e);
5427
5427
  else throw e;
5428
5428
  a = u;
5429
5429
  }
5430
5430
  a.name ||= r, n[r] = a, a.rawDefinition = i.bind(null, e), a.aliases && $(a.aliases, { languageName: r });
5431
5431
  }
5432
- function Og(e) {
5432
+ function Eg(e) {
5433
5433
  delete n[e];
5434
5434
  for (let n of Object.keys(a)) a[n] === e && delete a[n];
5435
5435
  }
5436
- function kg() {
5436
+ function Dg() {
5437
5437
  return Object.keys(n);
5438
5438
  }
5439
- function Ag(e) {
5439
+ function Og(e) {
5440
5440
  return e = (e || "").toLowerCase(), n[e] || n[a[e]];
5441
5441
  }
5442
5442
  function $(e, { languageName: n }) {
@@ -5444,65 +5444,65 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
5444
5444
  a[e.toLowerCase()] = n;
5445
5445
  });
5446
5446
  }
5447
- function jg(e) {
5448
- let n = Ag(e);
5447
+ function kg(e) {
5448
+ let n = Og(e);
5449
5449
  return n && !n.disableAutodetect;
5450
5450
  }
5451
- function Mg(e) {
5451
+ function Ag(e) {
5452
5452
  e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (n) => {
5453
5453
  e["before:highlightBlock"](Object.assign({ block: n.el }, n));
5454
5454
  }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (n) => {
5455
5455
  e["after:highlightBlock"](Object.assign({ block: n.el }, n));
5456
5456
  });
5457
5457
  }
5458
- function Ng(e) {
5459
- Mg(e), o.push(e);
5458
+ function jg(e) {
5459
+ Ag(e), o.push(e);
5460
5460
  }
5461
- function Pg(e) {
5461
+ function Mg(e) {
5462
5462
  let n = o.indexOf(e);
5463
5463
  n !== -1 && o.splice(n, 1);
5464
5464
  }
5465
- function Fg(e, n) {
5465
+ function Ng(e, n) {
5466
5466
  let r = e;
5467
5467
  o.forEach(function(e) {
5468
5468
  e[r] && e[r](n);
5469
5469
  });
5470
5470
  }
5471
- function Ig(e) {
5472
- return a_("10.7.0", "highlightBlock will be removed entirely in v12.0"), a_("10.7.0", "Please use highlightElement now."), G(e);
5471
+ function Pg(e) {
5472
+ return r_("10.7.0", "highlightBlock will be removed entirely in v12.0"), r_("10.7.0", "Please use highlightElement now."), G(e);
5473
5473
  }
5474
5474
  for (let n in Object.assign(e, {
5475
5475
  highlight: v,
5476
5476
  highlightAuto: B,
5477
5477
  highlightAll: Z,
5478
5478
  highlightElement: G,
5479
- highlightBlock: Ig,
5479
+ highlightBlock: Pg,
5480
5480
  configure: K,
5481
5481
  initHighlighting: q,
5482
5482
  initHighlightingOnLoad: J,
5483
5483
  registerLanguage: Q,
5484
- unregisterLanguage: Og,
5485
- listLanguages: kg,
5486
- getLanguage: Ag,
5484
+ unregisterLanguage: Eg,
5485
+ listLanguages: Dg,
5486
+ getLanguage: Og,
5487
5487
  registerAliases: $,
5488
- autoDetection: jg,
5489
- inherit: v_,
5490
- addPlugin: Ng,
5491
- removePlugin: Pg
5488
+ autoDetection: kg,
5489
+ inherit: g_,
5490
+ addPlugin: jg,
5491
+ removePlugin: Mg
5492
5492
  }), e.debugMode = function() {
5493
5493
  s = !1;
5494
5494
  }, e.safeMode = function() {
5495
5495
  s = !0;
5496
- }, e.versionString = h_, e.regex = {
5496
+ }, e.versionString = p_, e.regex = {
5497
5497
  concat: k,
5498
5498
  lookahead: T,
5499
5499
  either: I,
5500
5500
  optional: O,
5501
5501
  anyNumberOfTimes: E
5502
- }, Ug) typeof Ug[n] == "object" && r(Ug[n]);
5503
- return Object.assign(e, Ug), e;
5504
- }, S_ = x_({});
5505
- S_.newInstance = () => x_({}), n.exports = S_, S_.HighlightJS = S_, S_.default = S_;
5502
+ }, Vg) typeof Vg[n] == "object" && r(Vg[n]);
5503
+ return Object.assign(e, Vg), e;
5504
+ }, b_ = y_({});
5505
+ b_.newInstance = () => y_({}), n.exports = b_, b_.HighlightJS = b_, b_.default = b_;
5506
5506
  })), require__1c = /* @__PURE__ */ __commonJSMin(((e, n) => {
5507
5507
  function r(e) {
5508
5508
  let n = "[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+", r = "далее возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ", i = "null истина ложь неопределено", a = e.inherit(e.NUMBER_MODE), o = {
@@ -11624,7 +11624,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11624
11624
  begin: /"/,
11625
11625
  end: /"/,
11626
11626
  contains: [e.BACKSLASH_ESCAPE]
11627
- }, Dg = {
11627
+ }, Tg = {
11628
11628
  scope: "string",
11629
11629
  begin: /@"/,
11630
11630
  end: /"/,
@@ -11639,7 +11639,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11639
11639
  begin: /\{/,
11640
11640
  end: /\}/,
11641
11641
  keywords: g
11642
- }, Og = {
11642
+ }, Eg = {
11643
11643
  scope: "string",
11644
11644
  begin: /\$"/,
11645
11645
  end: /"/,
@@ -11649,7 +11649,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11649
11649
  e.BACKSLASH_ESCAPE,
11650
11650
  Q
11651
11651
  ]
11652
- }, kg = {
11652
+ }, Dg = {
11653
11653
  scope: "string",
11654
11654
  begin: /(\$@|@\$)"/,
11655
11655
  end: /"/,
@@ -11660,7 +11660,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11660
11660
  e.BACKSLASH_ESCAPE,
11661
11661
  Q
11662
11662
  ]
11663
- }, Ag = {
11663
+ }, Og = {
11664
11664
  scope: "string",
11665
11665
  begin: /\$"""/,
11666
11666
  end: /"""/,
@@ -11675,9 +11675,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11675
11675
  match: o(/'/, l(/[^\\']/, /\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/), /'/)
11676
11676
  };
11677
11677
  Q.contains = [
11678
- kg,
11679
- Og,
11680
11678
  Dg,
11679
+ Eg,
11680
+ Tg,
11681
11681
  J,
11682
11682
  $,
11683
11683
  i,
@@ -11690,12 +11690,12 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11690
11690
  O,
11691
11691
  j
11692
11692
  ];
11693
- let jg = { variants: [
11694
- Ag,
11695
- kg,
11693
+ let kg = { variants: [
11696
11694
  Og,
11697
- Z,
11698
11695
  Dg,
11696
+ Eg,
11697
+ Z,
11698
+ Tg,
11699
11699
  J,
11700
11700
  $
11701
11701
  ] };
@@ -11707,7 +11707,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11707
11707
  classNameAliases: { "computation-expression": "keyword" },
11708
11708
  contains: [
11709
11709
  i,
11710
- jg,
11710
+ kg,
11711
11711
  _,
11712
11712
  T,
11713
11713
  H,
@@ -11719,7 +11719,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
11719
11719
  contains: [
11720
11720
  T,
11721
11721
  Z,
11722
- Dg,
11722
+ Tg,
11723
11723
  J,
11724
11724
  $,
11725
11725
  q
@@ -13901,7 +13901,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13901
13901
  keywords: E,
13902
13902
  contains: ["self"].concat(q)
13903
13903
  });
13904
- let J = [].concat(K, L.contains), Dg = J.concat([{
13904
+ let J = [].concat(K, L.contains), Tg = J.concat([{
13905
13905
  begin: /(\s*)\(/,
13906
13906
  end: /\)/,
13907
13907
  keywords: E,
@@ -13913,7 +13913,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13913
13913
  excludeBegin: !0,
13914
13914
  excludeEnd: !0,
13915
13915
  keywords: E,
13916
- contains: Dg
13916
+ contains: Tg
13917
13917
  }, Q = { variants: [{
13918
13918
  match: [
13919
13919
  /class/,
@@ -13940,17 +13940,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13940
13940
  1: "keyword",
13941
13941
  3: "title.class"
13942
13942
  }
13943
- }] }, Og = {
13943
+ }] }, Eg = {
13944
13944
  relevance: 0,
13945
13945
  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]*)*/),
13946
13946
  className: "title.class",
13947
13947
  keywords: { _: [...o, ...s] }
13948
- }, kg = {
13948
+ }, Dg = {
13949
13949
  label: "use_strict",
13950
13950
  className: "meta",
13951
13951
  relevance: 10,
13952
13952
  begin: /^\s*['"]use (strict|asm)['"]/
13953
- }, Ag = {
13953
+ }, Og = {
13954
13954
  variants: [{ match: [
13955
13955
  /function/,
13956
13956
  /\s+/,
@@ -13969,25 +13969,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13969
13969
  match: /\b[A-Z][A-Z_0-9]+\b/,
13970
13970
  className: "variable.constant"
13971
13971
  };
13972
- function jg(e) {
13972
+ function kg(e) {
13973
13973
  return n.concat("(?!", e.join("|"), ")");
13974
13974
  }
13975
- let Mg = {
13976
- match: n.concat(/\b/, jg([
13975
+ let Ag = {
13976
+ match: n.concat(/\b/, kg([
13977
13977
  ...l,
13978
13978
  "super",
13979
13979
  "import"
13980
13980
  ].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
13981
13981
  className: "title.function",
13982
13982
  relevance: 0
13983
- }, Ng = {
13983
+ }, jg = {
13984
13984
  begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
13985
13985
  end: g,
13986
13986
  excludeBegin: !0,
13987
13987
  keywords: "prototype",
13988
13988
  className: "property",
13989
13989
  relevance: 0
13990
- }, Pg = {
13990
+ }, Mg = {
13991
13991
  match: [
13992
13992
  /get|set/,
13993
13993
  /\s+/,
@@ -13999,7 +13999,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
13999
13999
  3: "title.function"
14000
14000
  },
14001
14001
  contains: [{ begin: /\(\)/ }, Z]
14002
- }, Fg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ig = {
14002
+ }, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
14003
14003
  match: [
14004
14004
  /const|var|let/,
14005
14005
  /\s+/,
@@ -14007,7 +14007,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14007
14007
  /\s*/,
14008
14008
  /=\s*/,
14009
14009
  /(async\s*)?/,
14010
- n.lookahead(Fg)
14010
+ n.lookahead(Ng)
14011
14011
  ],
14012
14012
  keywords: "async",
14013
14013
  className: {
@@ -14026,8 +14026,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14026
14026
  ],
14027
14027
  keywords: E,
14028
14028
  exports: {
14029
- PARAMS_CONTAINS: Dg,
14030
- CLASS_REFERENCE: Og
14029
+ PARAMS_CONTAINS: Tg,
14030
+ CLASS_REFERENCE: Eg
14031
14031
  },
14032
14032
  illegal: /#(?![$_A-z])/,
14033
14033
  contains: [
@@ -14036,7 +14036,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14036
14036
  binary: "node",
14037
14037
  relevance: 5
14038
14038
  }),
14039
- kg,
14039
+ Dg,
14040
14040
  e.APOS_STRING_MODE,
14041
14041
  e.QUOTE_STRING_MODE,
14042
14042
  z,
@@ -14046,13 +14046,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14046
14046
  K,
14047
14047
  { match: /\$\d+/ },
14048
14048
  I,
14049
- Og,
14049
+ Eg,
14050
14050
  {
14051
14051
  scope: "attr",
14052
14052
  match: g + n.lookahead(":"),
14053
14053
  relevance: 0
14054
14054
  },
14055
- Ig,
14055
+ Pg,
14056
14056
  {
14057
14057
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
14058
14058
  keywords: "return throw case",
@@ -14062,7 +14062,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14062
14062
  e.REGEXP_MODE,
14063
14063
  {
14064
14064
  className: "function",
14065
- begin: Fg,
14065
+ begin: Ng,
14066
14066
  returnBegin: !0,
14067
14067
  end: "\\s*=>",
14068
14068
  contains: [{
@@ -14083,7 +14083,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14083
14083
  excludeBegin: !0,
14084
14084
  excludeEnd: !0,
14085
14085
  keywords: E,
14086
- contains: Dg
14086
+ contains: Tg
14087
14087
  }
14088
14088
  ]
14089
14089
  }]
@@ -14119,7 +14119,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14119
14119
  }
14120
14120
  ]
14121
14121
  },
14122
- Ag,
14122
+ Og,
14123
14123
  { beginKeywords: "while if switch catch for" },
14124
14124
  {
14125
14125
  begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
@@ -14134,7 +14134,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14134
14134
  match: /\.\.\./,
14135
14135
  relevance: 0
14136
14136
  },
14137
- Ng,
14137
+ jg,
14138
14138
  {
14139
14139
  match: "\\$" + g,
14140
14140
  relevance: 0
@@ -14144,10 +14144,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
14144
14144
  className: { 1: "title.function" },
14145
14145
  contains: [Z]
14146
14146
  },
14147
- Mg,
14147
+ Ag,
14148
14148
  $,
14149
14149
  Q,
14150
- Pg,
14150
+ Mg,
14151
14151
  { match: /\$[(.]/ }
14152
14152
  ]
14153
14153
  };
@@ -17669,7 +17669,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17669
17669
  T,
17670
17670
  E,
17671
17671
  z
17672
- ], Dg = {
17672
+ ], Tg = {
17673
17673
  begin: n.concat(/#\[\s*\\?/, n.either(a, o)),
17674
17674
  beginScope: "meta",
17675
17675
  end: /]/,
@@ -17699,7 +17699,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17699
17699
  case_insensitive: !1,
17700
17700
  keywords: I,
17701
17701
  contains: [
17702
- Dg,
17702
+ Tg,
17703
17703
  e.HASH_COMMENT_MODE,
17704
17704
  e.COMMENT("//", "$"),
17705
17705
  e.COMMENT("/\\*", "\\*/", { contains: [{
@@ -17762,7 +17762,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
17762
17762
  keywords: I,
17763
17763
  contains: [
17764
17764
  "self",
17765
- Dg,
17765
+ Tg,
17766
17766
  s,
17767
17767
  H,
17768
17768
  e.C_BLOCK_COMMENT_MODE,
@@ -21111,7 +21111,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21111
21111
  $pattern: s(/\b\w+/, /#\w+/),
21112
21112
  keyword: K.concat(T),
21113
21113
  literal: _
21114
- }, Dg = [
21114
+ }, Tg = [
21115
21115
  O,
21116
21116
  I,
21117
21117
  q
@@ -21124,84 +21124,84 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21124
21124
  }], Q = {
21125
21125
  match: /->/,
21126
21126
  relevance: 0
21127
- }, Og = [Q, {
21127
+ }, Eg = [Q, {
21128
21128
  className: "operator",
21129
21129
  relevance: 0,
21130
21130
  variants: [{ match: j }, { match: `\\.(\\.|${k})+` }]
21131
- }], kg = "([0-9]_*)+", Ag = "([0-9a-fA-F]_*)+", $ = {
21131
+ }], Dg = "([0-9]_*)+", Og = "([0-9a-fA-F]_*)+", $ = {
21132
21132
  className: "number",
21133
21133
  relevance: 0,
21134
21134
  variants: [
21135
- { match: `\\b(${kg})(\\.(${kg}))?([eE][+-]?(${kg}))?\\b` },
21136
- { match: `\\b0x(${Ag})(\\.(${Ag}))?([pP][+-]?(${kg}))?\\b` },
21135
+ { match: `\\b(${Dg})(\\.(${Dg}))?([eE][+-]?(${Dg}))?\\b` },
21136
+ { match: `\\b0x(${Og})(\\.(${Og}))?([pP][+-]?(${Dg}))?\\b` },
21137
21137
  { match: /\b0o([0-7]_*)+\b/ },
21138
21138
  { match: /\b0b([01]_*)+\b/ }
21139
21139
  ]
21140
- }, jg = (e = "") => ({
21140
+ }, kg = (e = "") => ({
21141
21141
  className: "subst",
21142
21142
  variants: [{ match: a(/\\/, e, /[0\\tnr"']/) }, { match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
21143
- }), Mg = (e = "") => ({
21143
+ }), Ag = (e = "") => ({
21144
21144
  className: "subst",
21145
21145
  match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
21146
- }), Ng = (e = "") => ({
21146
+ }), jg = (e = "") => ({
21147
21147
  className: "subst",
21148
21148
  label: "interpol",
21149
21149
  begin: a(/\\/, e, /\(/),
21150
21150
  end: /\)/
21151
- }), Pg = (e = "") => ({
21151
+ }), Mg = (e = "") => ({
21152
21152
  begin: a(e, /"""/),
21153
21153
  end: a(/"""/, e),
21154
21154
  contains: [
21155
- jg(e),
21156
- Mg(e),
21157
- Ng(e)
21155
+ kg(e),
21156
+ Ag(e),
21157
+ jg(e)
21158
21158
  ]
21159
- }), Fg = (e = "") => ({
21159
+ }), Ng = (e = "") => ({
21160
21160
  begin: a(e, /"/),
21161
21161
  end: a(/"/, e),
21162
- contains: [jg(e), Ng(e)]
21163
- }), Ig = {
21162
+ contains: [kg(e), jg(e)]
21163
+ }), Pg = {
21164
21164
  className: "string",
21165
21165
  variants: [
21166
- Pg(),
21167
- Pg("#"),
21168
- Pg("##"),
21169
- Pg("###"),
21170
- Fg(),
21171
- Fg("#"),
21172
- Fg("##"),
21173
- Fg("###")
21166
+ Mg(),
21167
+ Mg("#"),
21168
+ Mg("##"),
21169
+ Mg("###"),
21170
+ Ng(),
21171
+ Ng("#"),
21172
+ Ng("##"),
21173
+ Ng("###")
21174
21174
  ]
21175
- }, Lg = [e.BACKSLASH_ESCAPE, {
21175
+ }, Fg = [e.BACKSLASH_ESCAPE, {
21176
21176
  begin: /\[/,
21177
21177
  end: /\]/,
21178
21178
  relevance: 0,
21179
21179
  contains: [e.BACKSLASH_ESCAPE]
21180
- }], Rg = {
21180
+ }], Ig = {
21181
21181
  begin: /\/[^\s](?=[^/\n]*\/)/,
21182
21182
  end: /\//,
21183
- contains: Lg
21184
- }, zg = (e) => {
21183
+ contains: Fg
21184
+ }, Lg = (e) => {
21185
21185
  let n = a(e, /\//), r = a(/\//, e);
21186
21186
  return {
21187
21187
  begin: n,
21188
21188
  end: r,
21189
- contains: [...Lg, {
21189
+ contains: [...Fg, {
21190
21190
  scope: "comment",
21191
21191
  begin: `#(?!.*${r})`,
21192
21192
  end: /$/
21193
21193
  }]
21194
21194
  };
21195
- }, Bg = {
21195
+ }, Rg = {
21196
21196
  scope: "regexp",
21197
21197
  variants: [
21198
- zg("###"),
21199
- zg("##"),
21200
- zg("#"),
21201
- Rg
21198
+ Lg("###"),
21199
+ Lg("##"),
21200
+ Lg("#"),
21201
+ Ig
21202
21202
  ]
21203
- }, Vg = { match: a(/`/, z, /`/) }, Hg = [
21204
- Vg,
21203
+ }, zg = { match: a(/`/, z, /`/) }, Bg = [
21204
+ zg,
21205
21205
  {
21206
21206
  className: "variable",
21207
21207
  match: /\$\d+/
@@ -21210,7 +21210,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21210
21210
  className: "variable",
21211
21211
  match: `\\$${L}+`
21212
21212
  }
21213
- ], Ug = [
21213
+ ], Vg = [
21214
21214
  {
21215
21215
  match: /(@|#(un)?)available/,
21216
21216
  scope: "keyword",
@@ -21219,9 +21219,9 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21219
21219
  end: /\)/,
21220
21220
  keywords: G,
21221
21221
  contains: [
21222
- ...Og,
21222
+ ...Eg,
21223
21223
  $,
21224
- Ig
21224
+ Pg
21225
21225
  ]
21226
21226
  }] }
21227
21227
  },
@@ -21233,7 +21233,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21233
21233
  scope: "meta",
21234
21234
  match: a(/@/, z)
21235
21235
  }
21236
- ], Wg = {
21236
+ ], Hg = {
21237
21237
  match: i(/\b[A-Z]/),
21238
21238
  relevance: 0,
21239
21239
  contains: [
@@ -21259,20 +21259,20 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21259
21259
  relevance: 0
21260
21260
  }
21261
21261
  ]
21262
- }, Gg = {
21262
+ }, Ug = {
21263
21263
  begin: /</,
21264
21264
  end: />/,
21265
21265
  keywords: J,
21266
21266
  contains: [
21267
21267
  ...o,
21268
- ...Dg,
21269
- ...Ug,
21268
+ ...Tg,
21269
+ ...Vg,
21270
21270
  Q,
21271
- Wg
21271
+ Hg
21272
21272
  ]
21273
21273
  };
21274
- Wg.contains.push(Gg);
21275
- let Kg = {
21274
+ Hg.contains.push(Ug);
21275
+ let Wg = {
21276
21276
  begin: /\(/,
21277
21277
  end: /\)/,
21278
21278
  relevance: 0,
@@ -21285,22 +21285,22 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21285
21285
  relevance: 0
21286
21286
  },
21287
21287
  ...o,
21288
- Bg,
21289
- ...Dg,
21288
+ Rg,
21289
+ ...Tg,
21290
21290
  ...Z,
21291
- ...Og,
21291
+ ...Eg,
21292
21292
  $,
21293
- Ig,
21294
- ...Hg,
21295
- ...Ug,
21296
- Wg
21293
+ Pg,
21294
+ ...Bg,
21295
+ ...Vg,
21296
+ Hg
21297
21297
  ]
21298
- }, qg = {
21298
+ }, Gg = {
21299
21299
  begin: /</,
21300
21300
  end: />/,
21301
21301
  keywords: "repeat each",
21302
- contains: [...o, Wg]
21303
- }, Jg = {
21302
+ contains: [...o, Hg]
21303
+ }, Kg = {
21304
21304
  begin: /\(/,
21305
21305
  end: /\)/,
21306
21306
  keywords: J,
@@ -21318,42 +21318,42 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21318
21318
  }]
21319
21319
  },
21320
21320
  ...o,
21321
- ...Dg,
21322
- ...Og,
21321
+ ...Tg,
21322
+ ...Eg,
21323
21323
  $,
21324
- Ig,
21325
- ...Ug,
21326
- Wg,
21327
- Kg
21324
+ Pg,
21325
+ ...Vg,
21326
+ Hg,
21327
+ Wg
21328
21328
  ],
21329
21329
  endsParent: !0,
21330
21330
  illegal: /["']/
21331
- }, Yg = {
21331
+ }, qg = {
21332
21332
  match: [
21333
21333
  /(func|macro)/,
21334
21334
  /\s+/,
21335
- s(Vg.match, z, j)
21335
+ s(zg.match, z, j)
21336
21336
  ],
21337
21337
  className: {
21338
21338
  1: "keyword",
21339
21339
  3: "title.function"
21340
21340
  },
21341
21341
  contains: [
21342
- qg,
21343
- Jg,
21342
+ Gg,
21343
+ Kg,
21344
21344
  n
21345
21345
  ],
21346
21346
  illegal: [/\[/, /%/]
21347
- }, Xg = {
21347
+ }, Jg = {
21348
21348
  match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
21349
21349
  className: { 1: "keyword" },
21350
21350
  contains: [
21351
- qg,
21352
- Jg,
21351
+ Gg,
21352
+ Kg,
21353
21353
  n
21354
21354
  ],
21355
21355
  illegal: /\[|%/
21356
- }, Zg = {
21356
+ }, Yg = {
21357
21357
  match: [
21358
21358
  /operator/,
21359
21359
  /\s+/,
@@ -21363,7 +21363,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21363
21363
  1: "keyword",
21364
21364
  3: "title"
21365
21365
  }
21366
- }, Qg = {
21366
+ }, Xg = {
21367
21367
  begin: [
21368
21368
  /precedencegroup/,
21369
21369
  /\s+/,
@@ -21373,10 +21373,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21373
21373
  1: "keyword",
21374
21374
  3: "title"
21375
21375
  },
21376
- contains: [Wg],
21376
+ contains: [Hg],
21377
21377
  keywords: [...v, ..._],
21378
21378
  end: /}/
21379
- }, $g = {
21379
+ }, Zg = {
21380
21380
  match: [
21381
21381
  /class\b/,
21382
21382
  /\s+/,
@@ -21389,7 +21389,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21389
21389
  3: "keyword",
21390
21390
  5: "title.function"
21391
21391
  }
21392
- }, e_ = {
21392
+ }, Qg = {
21393
21393
  match: [
21394
21394
  /class\b/,
21395
21395
  /\s+/,
@@ -21399,7 +21399,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21399
21399
  1: "keyword",
21400
21400
  3: "keyword"
21401
21401
  }
21402
- }, t_ = {
21402
+ }, $g = {
21403
21403
  begin: [
21404
21404
  /(struct|protocol|class|extension|enum|actor)/,
21405
21405
  /\s+/,
@@ -21412,8 +21412,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21412
21412
  },
21413
21413
  keywords: J,
21414
21414
  contains: [
21415
- qg,
21416
- ...Dg,
21415
+ Gg,
21416
+ ...Tg,
21417
21417
  {
21418
21418
  begin: /:/,
21419
21419
  end: /\{/,
@@ -21421,21 +21421,21 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21421
21421
  contains: [{
21422
21422
  scope: "title.class.inherited",
21423
21423
  match: B
21424
- }, ...Dg],
21424
+ }, ...Tg],
21425
21425
  relevance: 0
21426
21426
  }
21427
21427
  ]
21428
21428
  };
21429
- for (let e of Ig.variants) {
21429
+ for (let e of Pg.variants) {
21430
21430
  let n = e.contains.find((e) => e.label === "interpol");
21431
21431
  n.keywords = J;
21432
21432
  let r = [
21433
- ...Dg,
21433
+ ...Tg,
21434
21434
  ...Z,
21435
- ...Og,
21435
+ ...Eg,
21436
21436
  $,
21437
- Ig,
21438
- ...Hg
21437
+ Pg,
21438
+ ...Bg
21439
21439
  ];
21440
21440
  n.contains = [...r, {
21441
21441
  begin: /\(/,
@@ -21448,29 +21448,29 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
21448
21448
  keywords: J,
21449
21449
  contains: [
21450
21450
  ...o,
21451
- Yg,
21452
- Xg,
21453
- $g,
21454
- e_,
21455
- t_,
21451
+ qg,
21452
+ Jg,
21456
21453
  Zg,
21457
21454
  Qg,
21455
+ $g,
21456
+ Yg,
21457
+ Xg,
21458
21458
  {
21459
21459
  beginKeywords: "import",
21460
21460
  end: /$/,
21461
21461
  contains: [...o],
21462
21462
  relevance: 0
21463
21463
  },
21464
- Bg,
21465
- ...Dg,
21464
+ Rg,
21465
+ ...Tg,
21466
21466
  ...Z,
21467
- ...Og,
21467
+ ...Eg,
21468
21468
  $,
21469
- Ig,
21470
- ...Hg,
21471
- ...Ug,
21472
- Wg,
21473
- Kg
21469
+ Pg,
21470
+ ...Bg,
21471
+ ...Vg,
21472
+ Hg,
21473
+ Wg
21474
21474
  ]
21475
21475
  };
21476
21476
  }
@@ -22138,7 +22138,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22138
22138
  keywords: E,
22139
22139
  contains: ["self"].concat(q)
22140
22140
  });
22141
- let J = [].concat(K, L.contains), Dg = J.concat([{
22141
+ let J = [].concat(K, L.contains), Tg = J.concat([{
22142
22142
  begin: /(\s*)\(/,
22143
22143
  end: /\)/,
22144
22144
  keywords: E,
@@ -22150,7 +22150,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22150
22150
  excludeBegin: !0,
22151
22151
  excludeEnd: !0,
22152
22152
  keywords: E,
22153
- contains: Dg
22153
+ contains: Tg
22154
22154
  }, Q = { variants: [{
22155
22155
  match: [
22156
22156
  /class/,
@@ -22177,17 +22177,17 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22177
22177
  1: "keyword",
22178
22178
  3: "title.class"
22179
22179
  }
22180
- }] }, Og = {
22180
+ }] }, Eg = {
22181
22181
  relevance: 0,
22182
22182
  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]*)*/),
22183
22183
  className: "title.class",
22184
22184
  keywords: { _: [...o, ...s] }
22185
- }, kg = {
22185
+ }, Dg = {
22186
22186
  label: "use_strict",
22187
22187
  className: "meta",
22188
22188
  relevance: 10,
22189
22189
  begin: /^\s*['"]use (strict|asm)['"]/
22190
- }, Ag = {
22190
+ }, Og = {
22191
22191
  variants: [{ match: [
22192
22192
  /function/,
22193
22193
  /\s+/,
@@ -22206,25 +22206,25 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22206
22206
  match: /\b[A-Z][A-Z_0-9]+\b/,
22207
22207
  className: "variable.constant"
22208
22208
  };
22209
- function jg(e) {
22209
+ function kg(e) {
22210
22210
  return n.concat("(?!", e.join("|"), ")");
22211
22211
  }
22212
- let Mg = {
22213
- match: n.concat(/\b/, jg([
22212
+ let Ag = {
22213
+ match: n.concat(/\b/, kg([
22214
22214
  ...l,
22215
22215
  "super",
22216
22216
  "import"
22217
22217
  ].map((e) => `${e}\\s*\\(`)), g, n.lookahead(/\s*\(/)),
22218
22218
  className: "title.function",
22219
22219
  relevance: 0
22220
- }, Ng = {
22220
+ }, jg = {
22221
22221
  begin: n.concat(/\./, n.lookahead(n.concat(g, /(?![0-9A-Za-z$_(])/))),
22222
22222
  end: g,
22223
22223
  excludeBegin: !0,
22224
22224
  keywords: "prototype",
22225
22225
  className: "property",
22226
22226
  relevance: 0
22227
- }, Pg = {
22227
+ }, Mg = {
22228
22228
  match: [
22229
22229
  /get|set/,
22230
22230
  /\s+/,
@@ -22236,7 +22236,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22236
22236
  3: "title.function"
22237
22237
  },
22238
22238
  contains: [{ begin: /\(\)/ }, Z]
22239
- }, Fg = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Ig = {
22239
+ }, Ng = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Pg = {
22240
22240
  match: [
22241
22241
  /const|var|let/,
22242
22242
  /\s+/,
@@ -22244,7 +22244,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22244
22244
  /\s*/,
22245
22245
  /=\s*/,
22246
22246
  /(async\s*)?/,
22247
- n.lookahead(Fg)
22247
+ n.lookahead(Ng)
22248
22248
  ],
22249
22249
  keywords: "async",
22250
22250
  className: {
@@ -22263,8 +22263,8 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22263
22263
  ],
22264
22264
  keywords: E,
22265
22265
  exports: {
22266
- PARAMS_CONTAINS: Dg,
22267
- CLASS_REFERENCE: Og
22266
+ PARAMS_CONTAINS: Tg,
22267
+ CLASS_REFERENCE: Eg
22268
22268
  },
22269
22269
  illegal: /#(?![$_A-z])/,
22270
22270
  contains: [
@@ -22273,7 +22273,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22273
22273
  binary: "node",
22274
22274
  relevance: 5
22275
22275
  }),
22276
- kg,
22276
+ Dg,
22277
22277
  e.APOS_STRING_MODE,
22278
22278
  e.QUOTE_STRING_MODE,
22279
22279
  z,
@@ -22283,13 +22283,13 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22283
22283
  K,
22284
22284
  { match: /\$\d+/ },
22285
22285
  I,
22286
- Og,
22286
+ Eg,
22287
22287
  {
22288
22288
  scope: "attr",
22289
22289
  match: g + n.lookahead(":"),
22290
22290
  relevance: 0
22291
22291
  },
22292
- Ig,
22292
+ Pg,
22293
22293
  {
22294
22294
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
22295
22295
  keywords: "return throw case",
@@ -22299,7 +22299,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22299
22299
  e.REGEXP_MODE,
22300
22300
  {
22301
22301
  className: "function",
22302
- begin: Fg,
22302
+ begin: Ng,
22303
22303
  returnBegin: !0,
22304
22304
  end: "\\s*=>",
22305
22305
  contains: [{
@@ -22320,7 +22320,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22320
22320
  excludeBegin: !0,
22321
22321
  excludeEnd: !0,
22322
22322
  keywords: E,
22323
- contains: Dg
22323
+ contains: Tg
22324
22324
  }
22325
22325
  ]
22326
22326
  }]
@@ -22356,7 +22356,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22356
22356
  }
22357
22357
  ]
22358
22358
  },
22359
- Ag,
22359
+ Og,
22360
22360
  { beginKeywords: "while if switch catch for" },
22361
22361
  {
22362
22362
  begin: "\\b(?!function)" + e.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
@@ -22371,7 +22371,7 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22371
22371
  match: /\.\.\./,
22372
22372
  relevance: 0
22373
22373
  },
22374
- Ng,
22374
+ jg,
22375
22375
  {
22376
22376
  match: "\\$" + g,
22377
22377
  relevance: 0
@@ -22381,10 +22381,10 @@ var require_core = /* @__PURE__ */ __commonJSMin(((e, n) => {
22381
22381
  className: { 1: "title.function" },
22382
22382
  contains: [Z]
22383
22383
  },
22384
- Mg,
22384
+ Ag,
22385
22385
  $,
22386
22386
  Q,
22387
- Pg,
22387
+ Mg,
22388
22388
  { match: /\$[(.]/ }
22389
22389
  ]
22390
22390
  };
@@ -24574,7 +24574,7 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24574
24574
  }, g();
24575
24575
  let J = createMutationObserver(r, () => {
24576
24576
  H && setSelectionToDOM(K, r, d, q);
24577
- }), Dg = () => {
24577
+ }), Tg = () => {
24578
24578
  d = takeSelectionSnapshot(r, q);
24579
24579
  }, Z = () => {
24580
24580
  let e = J._flush();
@@ -24599,13 +24599,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24599
24599
  r && (l(n(r[0])), d = r[1]);
24600
24600
  }
24601
24601
  }
24602
- }, Og = () => {
24602
+ }, Eg = () => {
24603
24603
  B || Z();
24604
- }, kg = (e) => {
24604
+ }, Dg = (e) => {
24605
24605
  e.preventDefault();
24606
24606
  let n = e.inputType;
24607
24607
  if (n.startsWith("format") || n === "historyUndo" || n === "historyRedo") return;
24608
- B ? J._record(!0) : Dg();
24608
+ B ? J._record(!0) : Tg();
24609
24609
  let i = e.getTargetRanges()[0];
24610
24610
  if (i) {
24611
24611
  let a = serializeRange(r, q, i), o = n === "insertParagraph" || n === "insertLineBreak" ? "\n" : e.data;
@@ -24616,31 +24616,31 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24616
24616
  z ||= new Transaction().select(...d), comparePosition(...a) !== 0 && z.delete(...a), o && z.insert(a[0], stringToDoc(o));
24617
24617
  }
24618
24618
  B || Z();
24619
- }, Ag = () => {
24620
- B || Dg(), B = !0;
24619
+ }, Og = () => {
24620
+ B || Tg(), B = !0;
24621
24621
  }, $ = () => {
24622
24622
  Z();
24623
- }, jg = () => {
24624
- H = !0, Dg();
24625
- }, Mg = () => {
24623
+ }, kg = () => {
24624
+ H = !0, Tg();
24625
+ }, Ag = () => {
24626
24626
  H = !1;
24627
- }, Ng = () => {
24627
+ }, jg = () => {
24628
24628
  if (L) {
24629
24629
  L = !1;
24630
24630
  return;
24631
24631
  }
24632
- H && !B && !G && Dg();
24632
+ H && !B && !G && Tg();
24633
+ }, Mg = (e) => {
24634
+ Tg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
24635
+ }, Ng = (e) => {
24636
+ e.preventDefault(), Mg(e.clipboardData);
24633
24637
  }, Pg = (e) => {
24634
- Dg(), comparePosition(...d) !== 0 && i(e, sliceDoc(_(), ...range(d)), r);
24638
+ e.preventDefault(), m || (Mg(e.clipboardData), E(new Transaction().delete(...range(d))));
24635
24639
  }, Fg = (e) => {
24636
- e.preventDefault(), Pg(e.clipboardData);
24637
- }, Ig = (e) => {
24638
- e.preventDefault(), m || (Pg(e.clipboardData), E(new Transaction().delete(...range(d))));
24639
- }, Lg = (e) => {
24640
24640
  e.preventDefault();
24641
24641
  let [n, r] = range(d);
24642
24642
  E(new Transaction().delete(n, r).insert(n, a(e.clipboardData, q)));
24643
- }, Rg = (e) => {
24643
+ }, Ig = (e) => {
24644
24644
  e.preventDefault();
24645
24645
  let n = e.dataTransfer, i = getPointedCaretPosition(K, r, e, q);
24646
24646
  if (n && i) {
@@ -24649,13 +24649,13 @@ const createEditor = ({ schema: { single: e, js: n, doc: r, copy: i, paste: a },
24649
24649
  let o = e.transform(i);
24650
24650
  e.select(o, o).insert(o, a(n, q)).select(o), E(e), r.focus({ preventScroll: !0 });
24651
24651
  }
24652
- }, zg = (e) => {
24653
- G = !0, Pg(e.dataTransfer);
24654
- }, Bg = () => {
24652
+ }, Lg = (e) => {
24653
+ G = !0, Mg(e.dataTransfer);
24654
+ }, Rg = () => {
24655
24655
  G = !1;
24656
24656
  };
24657
- return K.addEventListener("selectionchange", Ng), r.addEventListener("keydown", Q), r.addEventListener("input", Og), r.addEventListener("beforeinput", kg), r.addEventListener("compositionstart", Ag), r.addEventListener("compositionend", $), r.addEventListener("focus", jg), r.addEventListener("blur", Mg), r.addEventListener("copy", Fg), r.addEventListener("cut", Ig), r.addEventListener("paste", Lg), r.addEventListener("drop", Rg), r.addEventListener("dragstart", zg), r.addEventListener("dragend", Bg), () => {
24658
- I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange", Ng), r.removeEventListener("keydown", Q), r.removeEventListener("input", Og), r.removeEventListener("beforeinput", kg), r.removeEventListener("compositionstart", Ag), r.removeEventListener("compositionend", $), r.removeEventListener("focus", jg), r.removeEventListener("blur", Mg), r.removeEventListener("copy", Fg), r.removeEventListener("cut", Ig), r.removeEventListener("paste", Lg), r.removeEventListener("drop", Rg), r.removeEventListener("dragstart", zg), r.removeEventListener("dragend", Bg));
24657
+ return K.addEventListener("selectionchange", jg), r.addEventListener("keydown", Q), r.addEventListener("input", Eg), r.addEventListener("beforeinput", Dg), r.addEventListener("compositionstart", Og), r.addEventListener("compositionend", $), r.addEventListener("focus", kg), r.addEventListener("blur", Ag), r.addEventListener("copy", Ng), r.addEventListener("cut", Pg), r.addEventListener("paste", Fg), r.addEventListener("drop", Ig), r.addEventListener("dragstart", Lg), r.addEventListener("dragend", Rg), () => {
24658
+ I || (I = !0, g = noop, r.contentEditable = o, r.role = T, r.ariaMultiLine = O, r.ariaReadOnly = k, r.style.whiteSpace = j, J._dispose(), K.removeEventListener("selectionchange", jg), r.removeEventListener("keydown", Q), r.removeEventListener("input", Eg), r.removeEventListener("beforeinput", Dg), r.removeEventListener("compositionstart", Og), r.removeEventListener("compositionend", $), r.removeEventListener("focus", kg), r.removeEventListener("blur", Ag), r.removeEventListener("copy", Ng), r.removeEventListener("cut", Pg), r.removeEventListener("paste", Fg), r.removeEventListener("drop", Ig), r.removeEventListener("dragstart", Lg), r.removeEventListener("dragend", Rg));
24659
24659
  };
24660
24660
  },
24661
24661
  command: (e, ...n) => {
@@ -24727,6 +24727,7 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
24727
24727
  tool: "工具",
24728
24728
  mcp: "MCP",
24729
24729
  doc: "知识库",
24730
+ knowledgebase: "知识库",
24730
24731
  shortcut: "快捷指令"
24731
24732
  };
24732
24733
  let UploadStatus = /* @__PURE__ */ function(e) {
@@ -24908,6 +24909,7 @@ var _hoisted_1$28 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$
24908
24909
  "tool",
24909
24910
  "shortcut",
24910
24911
  "doc",
24912
+ "knowledgebase",
24911
24913
  "mcp"
24912
24914
  ]), a = shallowRef([]), s = shallowRef([]), { activeIndex: l } = useMenuKeydown({
24913
24915
  items: a,
@@ -25045,28 +25047,28 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25045
25047
  } catch {
25046
25048
  return e;
25047
25049
  }
25048
- }, Q = (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), Og = (e) => {
25050
+ }, Q = (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), Eg = (e) => {
25049
25051
  L.command(G);
25050
25052
  let { column: n, line: r } = H.value;
25051
- L.command(DeleteTag, [r, n - m.value.length - 1], [r, n]), L.command(InsertTag, [r, n], e), L.command(InsertText, [r, n + m.value.length + 1 + 1], " "), a.value?.hide(), Ag();
25052
- }, Ag = () => {
25053
+ L.command(DeleteTag, [r, n - m.value.length - 1], [r, n]), L.command(InsertTag, [r, n], e), L.command(InsertText, [r, n + m.value.length + 1 + 1], " "), a.value?.hide(), Og();
25054
+ }, Og = () => {
25053
25055
  setTimeout(() => {
25054
25056
  let e = window.getSelection(), n = document.createRange();
25055
25057
  i.value && e && (n.selectNodeContents(i.value), n.collapse(!1), e.removeAllRanges(), e.addRange(n));
25056
25058
  }, 100);
25057
- }, Mg = (e) => {
25058
- L.command(ReplaceAll, e), Ag();
25059
+ }, Ag = (e) => {
25060
+ L.command(ReplaceAll, e), Og();
25059
25061
  };
25060
25062
  watchEffect(() => {
25061
25063
  let e = l.resources?.filter((e) => !u.value?.some((n) => n.some((n) => n.type === "tag" && n.data.value === e.id && n.data.type === e.type)));
25062
25064
  m.value ? (j.value = e.filter((e) => e.name.toLowerCase().includes(m.value.toLowerCase())), I.value = l.prompts.filter((e) => e.toLowerCase().includes(m.value.toLowerCase()))) : (j.value = e, I.value = l.prompts), !j.value.length && !I.value.length && a.value?.hide();
25063
25065
  });
25064
- let Ng = (e, n, r, i) => {
25066
+ let jg = (e, n, r, i) => {
25065
25067
  if (n.type === "tag") {
25066
25068
  let n = Q(e, r);
25067
25069
  L.command(DeleteTag, [i, n], [i, n + 1]);
25068
25070
  }
25069
- }, Pg = (e) => {
25071
+ }, Mg = (e) => {
25070
25072
  let n = e.clipboardData?.items;
25071
25073
  if (!n) return;
25072
25074
  let r = [];
@@ -25075,7 +25077,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25075
25077
  n && r.push(n);
25076
25078
  }
25077
25079
  r.length > 0 && (e.preventDefault(), console.log("handlePaste files", r), s("upload", r));
25078
- }, Fg = () => {
25080
+ }, Ng = () => {
25079
25081
  z?.(), L = createEditor({
25080
25082
  doc: u.value,
25081
25083
  schema: tagSchema,
@@ -25084,16 +25086,16 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25084
25086
  },
25085
25087
  onKeyDown: (e) => q(e)
25086
25088
  }), z = L.input(i.value);
25087
- }, Lg = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
25089
+ }, Fg = () => d.value === "slash" ? j.value.length < 1 ? !1 : void 0 : I.value.length < 1 ? !1 : void 0;
25088
25090
  return onMounted(() => {
25089
- Fg(), i.value?.addEventListener("paste", Pg);
25091
+ Ng(), i.value?.addEventListener("paste", Mg);
25090
25092
  }), onUnmounted(() => {
25091
- L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", Pg);
25093
+ L.command(ReplaceAll, ""), z?.(), i.value?.removeEventListener("paste", Mg);
25092
25094
  }), n({
25093
25095
  cleanup: () => {
25094
25096
  L.command(ReplaceAll, "");
25095
25097
  },
25096
- focus: Ag
25098
+ focus: Og
25097
25099
  }), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("div", {
25098
25100
  ref_key: "editorRef",
25099
25101
  ref: i,
@@ -25107,7 +25109,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25107
25109
  "data-tag-type": r.data.type
25108
25110
  }, [createTextVNode(toDisplayString(r.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
25109
25111
  class: "mention-tag-remove-icon",
25110
- onClick: (a) => Ng(e, r, i, n)
25112
+ onClick: (a) => jg(e, r, i, n)
25111
25113
  }, null, 8, ["onClick"])], 10, _hoisted_4$13)) : createCommentVNode("v-if", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$8))]))), 128)) : createCommentVNode("v-if", !0)], 8, _hoisted_2$20), createVNode(unref(Tippy), {
25112
25114
  ref_key: "tippyRef",
25113
25115
  ref: a,
@@ -25122,15 +25124,15 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25122
25124
  "trigger-target": i.value,
25123
25125
  "z-index": unref(EDITOR_MENU_Z_INDEX),
25124
25126
  onHidden: J,
25125
- onShow: Lg
25127
+ onShow: Fg
25126
25128
  }, {
25127
25129
  content: withCtx(() => [d.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
25128
25130
  key: 0,
25129
- "on-select": Og,
25131
+ "on-select": Eg,
25130
25132
  "resource-list": j.value
25131
25133
  }, null, 8, ["resource-list"])) : d.value === "prompt" ? (openBlock(), createBlock(ai_prompt_list_default, {
25132
25134
  key: 1,
25133
- "on-select": Mg,
25135
+ "on-select": Ag,
25134
25136
  prompts: I.value
25135
25137
  }, null, 8, ["prompts"])) : createCommentVNode("v-if", !0)]),
25136
25138
  _: 1
@@ -25259,7 +25261,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25259
25261
  }
25260
25262
  }, J = (e) => {
25261
25263
  m.value = m.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
25262
- }, Dg = (e, n) => {
25264
+ }, Tg = (e, n) => {
25263
25265
  u("update:modelValue", e, n);
25264
25266
  };
25265
25267
  return n({
@@ -25294,7 +25296,7 @@ var _hoisted_1$27 = { class: "ai-slash-input-wrapper" }, _hoisted_2$20 = ["aria-
25294
25296
  prompts: e.prompts,
25295
25297
  resources: e.resources,
25296
25298
  onKeydown: z,
25297
- "onUpdate:modelValue": Dg,
25299
+ "onUpdate:modelValue": Tg,
25298
25300
  onUpload: q
25299
25301
  }, null, 8, [
25300
25302
  "model-value",
@@ -26278,19 +26280,6 @@ function findLastUserMessageIdBefore(e, n) {
26278
26280
  let r = findLastUserMessageBefore(e, n);
26279
26281
  if (r?.id !== void 0) return typeof r.id == "number" ? r.id : Number(r.id);
26280
26282
  }
26281
- var RESOURCE_TYPE_MAP = {
26282
- tool: "tool",
26283
- mcp: "mcp",
26284
- knowledgebase: "doc"
26285
- };
26286
- function mapResourcesToSlashItems(e) {
26287
- return e?.length ? e.map((e) => ({
26288
- id: e.code,
26289
- name: e.name,
26290
- icon: e.icon ?? "",
26291
- type: RESOURCE_TYPE_MAP[e.type] ?? e.type
26292
- })) : [];
26293
- }
26294
26283
  const getCookieByName = (e) => {
26295
26284
  let n = document.cookie.match(/* @__PURE__ */ RegExp(`(^| )${e}=([^;]*)(;|$)`));
26296
26285
  return n ? n[2] : "";
@@ -26785,7 +26774,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26785
26774
  ${a}
26786
26775
  </div>
26787
26776
  `;
26788
- }), Ag = async () => {
26777
+ }), Og = async () => {
26789
26778
  if (i.sessionBusinessManager) try {
26790
26779
  await i.sessionBusinessManager.createNewSession();
26791
26780
  } catch (e) {
@@ -26797,16 +26786,16 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26797
26786
  a("new-chat");
26798
26787
  }, $ = (e) => {
26799
26788
  e.stopPropagation(), i.sessionBusinessManager ? (L || z(), L && L.handleTriggerClick(e)) : a("history-click", e);
26800
- }, Mg = () => {
26789
+ }, Ag = () => {
26801
26790
  a("help-click");
26802
- }, Ng = (e) => {
26791
+ }, jg = (e) => {
26803
26792
  e.stopPropagation(), L && L.isVisible() && L.hide(), j && (j.state.isVisible ? j.hide() : j.show());
26804
- }, Fg = (e) => {
26793
+ }, Ng = (e) => {
26805
26794
  e.stopPropagation(), e.preventDefault();
26806
26795
  let n = e.currentTarget, r = n.dataset.action;
26807
26796
  if (!n.classList.contains("disabled")) switch (j && j.hide(), r) {
26808
26797
  case "rename":
26809
- Ig();
26798
+ Pg();
26810
26799
  break;
26811
26800
  case "auto-generate":
26812
26801
  a("auto-generate-name");
@@ -26815,9 +26804,9 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26815
26804
  a("share");
26816
26805
  break;
26817
26806
  }
26818
- }, Ig = () => {
26819
- document.removeEventListener("click", Vg), g.value = i.sessionName || "", m.value = !0, setTimeout(() => {
26820
- document.addEventListener("click", Vg);
26807
+ }, Pg = () => {
26808
+ document.removeEventListener("click", zg), g.value = i.sessionName || "", m.value = !0, setTimeout(() => {
26809
+ document.addEventListener("click", zg);
26821
26810
  }, 100), setTimeout(() => {
26822
26811
  if (k.value) try {
26823
26812
  let e = k.value;
@@ -26828,22 +26817,22 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26828
26817
  console.warn("Failed to focus rename input:", e);
26829
26818
  }
26830
26819
  }, 100);
26831
- }, Lg = () => {
26820
+ }, Fg = () => {
26832
26821
  let e = g.value.trim();
26833
26822
  if (!e) {
26834
- Rg();
26823
+ Ig();
26835
26824
  return;
26836
26825
  }
26837
26826
  a("rename", e), m.value = !1, g.value = "";
26838
- }, Rg = () => {
26827
+ }, Ig = () => {
26839
26828
  m.value = !1, g.value = "";
26840
- }, zg = (e, n) => {
26841
- g.value = e, n.key === "Enter" ? Lg() : n.key === "Escape" && Rg();
26842
- }, Vg = (e) => {
26829
+ }, Lg = (e, n) => {
26830
+ g.value = e, n.key === "Enter" ? Fg() : n.key === "Escape" && Ig();
26831
+ }, zg = (e) => {
26843
26832
  if (!m.value) return;
26844
26833
  let n = e.target, r = document.querySelector(".rename-tooltip");
26845
- r && !r.contains(n) && Rg();
26846
- }, Ug = async () => {
26834
+ r && !r.contains(n) && Ig();
26835
+ }, Vg = async () => {
26847
26836
  if (!u.value) return;
26848
26837
  let e = (await import("tippy.js")).default;
26849
26838
  j &&= (j.destroy(), null), j = e(u.value, {
@@ -26861,7 +26850,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26861
26850
  let { default: e } = await import("tippy.js");
26862
26851
  document.querySelectorAll(".tippy-menu-item").forEach((n) => {
26863
26852
  let r = n;
26864
- r.addEventListener("click", Fg);
26853
+ r.addEventListener("click", Ng);
26865
26854
  let i = r.getAttribute("data-tippy-content");
26866
26855
  if (i && !I.has(r)) {
26867
26856
  let n = e(r, {
@@ -26880,7 +26869,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26880
26869
  onHide: () => {
26881
26870
  document.querySelectorAll(".tippy-menu-item").forEach((e) => {
26882
26871
  let n = e;
26883
- n.removeEventListener("click", Fg);
26872
+ n.removeEventListener("click", Ng);
26884
26873
  let r = I.get(n);
26885
26874
  r && (r.destroy(), I.delete(n));
26886
26875
  });
@@ -26890,11 +26879,11 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26890
26879
  return watch(() => [i.isCompressionHeight, i.hasSessionContents], () => {
26891
26880
  j && j.setContent(Z.value);
26892
26881
  }), onMounted(() => {
26893
- Ug(), i.sessionBusinessManager && z(), document.addEventListener("click", Vg);
26882
+ Vg(), i.sessionBusinessManager && z(), document.addEventListener("click", zg);
26894
26883
  }), onBeforeUnmount(() => {
26895
26884
  j &&= (j.destroy(), null), I.forEach((e) => {
26896
26885
  e.destroy();
26897
- }), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", Vg);
26886
+ }), I.clear(), L &&= (L.destroy(), null), document.removeEventListener("click", zg);
26898
26887
  }), n({
26899
26888
  headerRef: s,
26900
26889
  historyIconRef: l
@@ -26917,13 +26906,13 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26917
26906
  "onUpdate:modelValue": r[0] ||= (e) => g.value = e,
26918
26907
  class: "rename-input",
26919
26908
  placeholder: unref(t)("请输入新的会话名称"),
26920
- onKeyup: zg
26909
+ onKeyup: Lg
26921
26910
  }, null, 8, ["modelValue", "placeholder"]), createElementVNode("div", { class: "rename-buttons" }, [createElementVNode("i", {
26922
26911
  class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
26923
- onClick: Lg
26912
+ onClick: Fg
26924
26913
  }), createElementVNode("i", {
26925
26914
  class: "bkai-icon bkai-close rename-btn cancel-btn",
26926
- onClick: Rg
26915
+ onClick: Ig
26927
26916
  })])])])) : createCommentVNode("v-if", !0)
26928
26917
  ], 2),
26929
26918
  i.showMoreIcon && K.value ? (openBlock(), createElementBlock("span", {
@@ -26931,7 +26920,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26931
26920
  ref_key: "moreIconRef",
26932
26921
  ref: u,
26933
26922
  class: "bkai-icon bkai-more",
26934
- onClick: Ng
26923
+ onClick: jg
26935
26924
  }, null, 512)) : createCommentVNode("v-if", !0)
26936
26925
  ]), createElementVNode("div", _hoisted_6$1, [
26937
26926
  createCommentVNode(" 新增会话按钮 "),
@@ -26943,7 +26932,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26943
26932
  { disabled: !K.value }
26944
26933
  ]),
26945
26934
  style: normalizeStyle(J()),
26946
- onClick: r[1] ||= (e) => K.value ? Ag() : void 0
26935
+ onClick: r[1] ||= (e) => K.value ? Og() : void 0
26947
26936
  }, null, 6)), [[unref(o), {
26948
26937
  content: q(unref(t)("新增会话")),
26949
26938
  boundary: "parent"
@@ -26967,7 +26956,7 @@ var _hoisted_1$4 = { class: "left-section" }, _hoisted_2$3 = { class: "logo" },
26967
26956
  e.chatGroup?.enabled ? withDirectives((openBlock(), createElementBlock("i", {
26968
26957
  key: 2,
26969
26958
  class: "bkai-icon bkai-zhushou",
26970
- onClick: Mg
26959
+ onClick: Ag
26971
26960
  }, null, 512)), [[unref(o), {
26972
26961
  content: unref(t)("转人工"),
26973
26962
  boundary: "parent"
@@ -27812,7 +27801,7 @@ var UIStateManager = class {
27812
27801
  a("receive-text");
27813
27802
  },
27814
27803
  onDone: () => {
27815
- a("receive-end"), g_();
27804
+ a("receive-end"), m_();
27816
27805
  },
27817
27806
  onError: (e) => {
27818
27807
  a("error", e);
@@ -27828,11 +27817,11 @@ var UIStateManager = class {
27828
27817
  return n.injectMessageModule(r.message), r;
27829
27818
  })(), B = computed(() => ((i.chatHelper || z)?.agent)?.isChatting?.value ? MessageStatus.Streaming : MessageStatus.Complete), H = computed(() => B.value === MessageStatus.Streaming ? MessageToolsStatus.Disabled : void 0), G = async (e, n) => {
27830
27819
  if (e.id === "cite") {
27831
- Xg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), N_();
27820
+ Jg.value = n.filter((e) => e.role !== MessageRole$1.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), j_();
27832
27821
  return;
27833
27822
  }
27834
27823
  if (e.id === "rebuild") {
27835
- await Ag(n);
27824
+ await Og(n);
27836
27825
  return;
27837
27826
  }
27838
27827
  if (e.id === "delete") {
@@ -27840,7 +27829,7 @@ var UIStateManager = class {
27840
27829
  return;
27841
27830
  }
27842
27831
  if (e.id === "share") {
27843
- Vg && (E.value = !0), a("request-share");
27832
+ zg && (E.value = !0), a("request-share");
27844
27833
  return;
27845
27834
  }
27846
27835
  if (e.id === "like" || e.id === "unlike") {
@@ -27862,7 +27851,7 @@ var UIStateManager = class {
27862
27851
  console.error("[ChatBot] Cannot submit feedback: no active session");
27863
27852
  return;
27864
27853
  }
27865
- let s = findLastUserMessageIdBefore(Kg?.messages.value || [], n[0]);
27854
+ let s = findLastUserMessageIdBefore(Wg?.messages.value || [], n[0]);
27866
27855
  if (s === void 0) {
27867
27856
  console.error("[ChatBot] Cannot submit feedback: no user message found");
27868
27857
  return;
@@ -27880,12 +27869,12 @@ var UIStateManager = class {
27880
27869
  console.error("[ChatBot] Failed to submit feedback:", e), a("error", e);
27881
27870
  }
27882
27871
  }, Z = async (e) => {
27883
- if (!Kg || !z) {
27872
+ if (!Wg || !z) {
27884
27873
  console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
27885
27874
  return;
27886
27875
  }
27887
27876
  try {
27888
- let n = Kg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27877
+ let n = Wg.messages.value, r = findLastUserMessageBefore(n, e[0]);
27889
27878
  if (!r) {
27890
27879
  console.error("[ChatBot] No user message found before AI messages");
27891
27880
  return;
@@ -27895,8 +27884,8 @@ var UIStateManager = class {
27895
27884
  } catch (e) {
27896
27885
  console.error("[ChatBot] Failed to delete messages:", e), a("error", e);
27897
27886
  }
27898
- }, Ag = async (e) => {
27899
- if (!Kg || !z) {
27887
+ }, Og = async (e) => {
27888
+ if (!Wg || !z) {
27900
27889
  console.error("[ChatBot] Cannot regenerate: chatBusinessManager not initialized");
27901
27890
  return;
27902
27891
  }
@@ -27906,21 +27895,21 @@ var UIStateManager = class {
27906
27895
  return;
27907
27896
  }
27908
27897
  try {
27909
- await Kg.regenerateFromAIMessages(e, n), g_();
27898
+ await Wg.regenerateFromAIMessages(e, n), m_();
27910
27899
  } catch (e) {
27911
27900
  console.error("[ChatBot] Failed to regenerate:", e), a("error", e);
27912
27901
  }
27913
27902
  }, $ = async (e, n) => {
27914
27903
  if (e.id === "delete") {
27915
- await Ig(n);
27904
+ await Pg(n);
27916
27905
  return;
27917
27906
  }
27918
27907
  if (e.id === "cite") {
27919
- Xg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), N_();
27908
+ Jg.value = typeof n.content == "string" ? n.content : JSON.stringify(n.content || ""), j_();
27920
27909
  return;
27921
27910
  }
27922
27911
  console.log("handleUserAction", e, n);
27923
- }, Mg = async (e, n, r) => {
27912
+ }, Ag = async (e, n, r) => {
27924
27913
  if (!z) {
27925
27914
  console.error("[ChatBot] Cannot edit message: chatHelper not initialized");
27926
27915
  return;
@@ -27936,12 +27925,12 @@ var UIStateManager = class {
27936
27925
  return;
27937
27926
  }
27938
27927
  try {
27939
- console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), g_();
27928
+ console.log("handleUserInputConfirm", o, i, n), await z.agent.resendMessage(String(o), i, n), m_();
27940
27929
  } catch (e) {
27941
27930
  console.error("[ChatBot] Failed to edit and resend message:", e), a("error", e);
27942
27931
  }
27943
- }, Ng = async (e, n) => {
27944
- if (!Kg || !z) {
27932
+ }, jg = async (e, n) => {
27933
+ if (!Wg || !z) {
27945
27934
  console.error("[ChatBot] Cannot edit shortcut message: chatHelper not initialized");
27946
27935
  return;
27947
27936
  }
@@ -27956,26 +27945,26 @@ var UIStateManager = class {
27956
27945
  return;
27957
27946
  }
27958
27947
  try {
27959
- let a = Fg(e);
27948
+ let a = Ng(e);
27960
27949
  if (!a) {
27961
27950
  console.error("[ChatBot] Cannot edit shortcut message: shortcut not found");
27962
27951
  return;
27963
27952
  }
27964
- let o = O_(a, n), s = String(n.input ?? "");
27965
- await Kg.resendMessageWithProperty(String(i), r, s, o), g_();
27953
+ let o = E_(a, n), s = String(n.input ?? "");
27954
+ await Wg.resendMessageWithProperty(String(i), r, s, o), m_();
27966
27955
  } catch (e) {
27967
27956
  console.error("[ChatBot] Failed to edit shortcut message:", e), a("error", e);
27968
27957
  }
27969
- }, Fg = (e) => {
27958
+ }, Ng = (e) => {
27970
27959
  let n = e.property?.extra;
27971
- return n?.shortcut ? n.shortcut : n?.command ? h_.value.find((e) => e.id === n.command) ?? null : null;
27972
- }, Ig = async (e) => {
27973
- if (!Kg || !z) {
27960
+ return n?.shortcut ? n.shortcut : n?.command ? p_.value.find((e) => e.id === n.command) ?? null : null;
27961
+ }, Pg = async (e) => {
27962
+ if (!Wg || !z) {
27974
27963
  console.error("[ChatBot] Cannot delete message: chatHelper not initialized");
27975
27964
  return;
27976
27965
  }
27977
27966
  try {
27978
- let n = Kg.messages.value, r = n.findIndex((n) => n === e);
27967
+ let n = Wg.messages.value, r = n.findIndex((n) => n === e);
27979
27968
  if (r === -1) {
27980
27969
  console.error("[ChatBot] User message not found in messages list");
27981
27970
  return;
@@ -27991,31 +27980,31 @@ var UIStateManager = class {
27991
27980
  } catch (e) {
27992
27981
  console.error("[ChatBot] Failed to delete user message:", e), a("error", e);
27993
27982
  }
27994
- }, Rg = async () => {
27983
+ }, Ig = async () => {
27995
27984
  ((i.chatHelper || z)?.agent)?.stopChat?.(z?.session.current?.value?.sessionCode ?? "");
27996
- }, Vg = !i.chatHelper, Ug = computed(() => Vg ? E.value : i.enableSelection), Wg = computed(() => Vg ? k.value : i.shareLoading), Gg = z ? new SessionBusinessManager(z.session, z.agent, null, {
27985
+ }, zg = !i.chatHelper, Vg = computed(() => zg ? E.value : i.enableSelection), Hg = computed(() => zg ? k.value : i.shareLoading), Ug = z ? new SessionBusinessManager(z.session, z.agent, null, {
27997
27986
  enableChatSession: !0,
27998
27987
  autoSwitchToInitialSession: !!i.sessionCode,
27999
27988
  loadRecentSessionOnMount: i.autoLoad,
28000
27989
  initialSessionCode: i.sessionCode
28001
- }) : null, Kg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
27990
+ }) : null, Wg = z ? new ChatBusinessManager(z.agent, z.message, z.session, null, {
28002
27991
  openingRemark: i.helloText,
28003
27992
  predefinedQuestions: i.prompts,
28004
27993
  placeholder: i.placeholder
28005
- }) : null, qg = new ShortcutManager(null, i.shortcuts || []), Yg = shallowRef([[]]), Xg = ref(""), Zg = shallowRef([]), Qg = (e, n) => {
28006
- Yg.value = e, Zg.value = n;
28007
- }, $g = computed(() => Kg?.messages.value ?? []), e_ = computed(() => Kg?.isMessagesLoading.value ?? !1), t_ = computed(() => Kg?.isGenerating.value ?? !1), n_ = computed(() => Gg?.currentSession.value ?? null), r_ = computed(() => Vg && !j.value ? !1 : !e_.value && $g.value.length === 0), i_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), a_ = computed(() => i.resources?.length ? i.resources : mapResourcesToSlashItems(z?.agent.info.value?.resources)), o_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), s_ = computed(() => ({
27994
+ }) : null, Gg = new ShortcutManager(null, i.shortcuts || []), qg = shallowRef([[]]), Jg = ref(""), Yg = shallowRef([]), Xg = (e, n) => {
27995
+ qg.value = e, Yg.value = n;
27996
+ }, Zg = computed(() => Wg?.messages.value ?? []), Qg = computed(() => Wg?.isMessagesLoading.value ?? !1), $g = computed(() => Wg?.isGenerating.value ?? !1), e_ = computed(() => Ug?.currentSession.value ?? null), t_ = computed(() => zg && !j.value ? !1 : !Qg.value && Zg.value.length === 0), n_ = computed(() => z?.agent.info.value?.conversationSettings?.openingRemark || ""), r_ = computed(() => i.resources?.length ? i.resources : z?.agent.info.value?.resources ?? []), i_ = computed(() => i.prompts?.length ? i.prompts : z?.agent.info.value?.conversationSettings?.predefinedQuestions ?? []), a_ = computed(() => ({
28008
27997
  height: typeof i.height == "number" ? `${i.height}px` : i.height,
28009
27998
  maxWidth: typeof i.maxWidth == "number" ? `${i.maxWidth}px` : i.maxWidth
28010
- })), u_ = computed(() => {
28011
- let e = qg.shortcuts.value;
27999
+ })), c_ = computed(() => {
28000
+ let e = Gg.shortcuts.value;
28012
28001
  return i.shortcutLimit && e.length > i.shortcutLimit ? e.slice(0, i.shortcutLimit) : e;
28013
- }), d_ = () => {
28014
- m.value = [], Vg && (E.value = !1), a("cancel-share");
28015
- }, f_ = async () => {
28002
+ }), l_ = () => {
28003
+ m.value = [], zg && (E.value = !1), a("cancel-share");
28004
+ }, u_ = async () => {
28016
28005
  let e = m.value;
28017
- Vg && await p_(e), a("confirm-share", e);
28018
- }, p_ = async (e) => {
28006
+ zg && await d_(e), a("confirm-share", e);
28007
+ }, d_ = async (e) => {
28019
28008
  if (!z || e.length === 0) return;
28020
28009
  let n = z.session.current?.value?.sessionCode;
28021
28010
  if (!n) {
@@ -28037,42 +28026,42 @@ var UIStateManager = class {
28037
28026
  } finally {
28038
28027
  k.value = !1, E.value = !1, m.value = [];
28039
28028
  }
28040
- }, m_ = (e) => {
28041
- e ? m.value = $g.value : m.value = [];
28042
- }, h_ = qg.effectiveShortcuts;
28029
+ }, f_ = (e) => {
28030
+ e ? m.value = Zg.value : m.value = [];
28031
+ }, p_ = Gg.effectiveShortcuts;
28043
28032
  watch(() => i.shortcuts, (e) => {
28044
- qg.setShortcuts(e || []);
28033
+ Gg.setShortcuts(e || []);
28045
28034
  }, { immediate: !0 }), watch(() => z?.agent.info.value?.conversationSettings?.commands, (e) => {
28046
- e && qg.setAgentShortcuts(e);
28035
+ e && Gg.setAgentShortcuts(e);
28047
28036
  }, { immediate: !0 });
28048
- let g_ = async () => {
28037
+ let m_ = async () => {
28049
28038
  await nextTick(), s.value && (s.value.scrollTop = s.value.scrollHeight);
28050
- }, __ = async (e, n = {}) => {
28051
- if (!Kg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
28039
+ }, h_ = async (e, n = {}) => {
28040
+ if (!Wg || !z) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
28052
28041
  let r = z.session.current?.value?.sessionCode;
28053
28042
  if (!r) throw Error("[ChatBot] Cannot send message: no active session");
28054
- Yg.value = [[]], Xg.value = "", Zg.value = [], a("send-message", typeof e == "string" ? e : ""), await Kg.sendMessage(e, r, n);
28055
- }, y_ = async (e) => {
28043
+ qg.value = [[]], Jg.value = "", Yg.value = [], a("send-message", typeof e == "string" ? e : ""), await Wg.sendMessage(e, r, n);
28044
+ }, __ = async (e) => {
28056
28045
  let n = z?.session.current?.value?.sessionCode;
28057
28046
  if (!n) throw Error("[ChatBot] Cannot upload: no active session");
28058
28047
  let r = await z.session.uploadFile(n, e);
28059
28048
  if (!r?.download_url) throw Error("[ChatBot] Upload failed: no download URL returned");
28060
28049
  return r;
28061
- }, x_ = async (e, n) => {
28050
+ }, y_ = async (e, n) => {
28062
28051
  try {
28063
28052
  let n = {};
28064
- Xg.value && (n.cite = Xg.value), u.value && (n.command = u.value.id), Zg.value.length && (n.resources = Zg.value), await __(e, Object.keys(n).length ? { property: { extra: n } } : {});
28053
+ Jg.value && (n.cite = Jg.value), u.value && (n.command = u.value.id), Yg.value.length && (n.resources = Yg.value), await h_(e, Object.keys(n).length ? { property: { extra: n } } : {});
28065
28054
  } catch (e) {
28066
28055
  console.error("Failed to send message:", e), a("error", e);
28067
28056
  }
28068
- }, w_ = async () => {
28069
- A_();
28070
- }, T_ = (e, n) => {
28071
- E_(e, n), a("shortcut-click", {
28057
+ }, S_ = async () => {
28058
+ O_();
28059
+ }, C_ = (e, n) => {
28060
+ w_(e, n), a("shortcut-click", {
28072
28061
  shortcut: e,
28073
28062
  source: "main"
28074
28063
  });
28075
- }, E_ = (e, n) => {
28064
+ }, w_ = (e, n) => {
28076
28065
  let r = e, i;
28077
28066
  if (i = r.enable_fill_back && r.fill_back_component_key ? r.fill_back_component_key : r.components?.find((e) => e.fillBack)?.key, i && n) {
28078
28067
  let e = r.components?.map((e) => e.key === i ? {
@@ -28094,9 +28083,9 @@ var UIStateManager = class {
28094
28083
  ...r,
28095
28084
  formModel: { ...r.formModel }
28096
28085
  };
28097
- }, D_ = () => {
28086
+ }, T_ = () => {
28098
28087
  u.value = null;
28099
- }, O_ = (e, n) => {
28088
+ }, E_ = (e, n) => {
28100
28089
  let r = e.components || [];
28101
28090
  return { extra: {
28102
28091
  cite: {
@@ -28116,42 +28105,42 @@ var UIStateManager = class {
28116
28105
  __value: n[e.key]
28117
28106
  }))
28118
28107
  } };
28119
- }, k_ = async (e) => {
28108
+ }, D_ = async (e) => {
28120
28109
  if (!u.value) {
28121
28110
  console.error("[ChatBot] No selected shortcut");
28122
28111
  return;
28123
28112
  }
28124
- let n = O_(u.value, e), r = u.value.name, i = u.value;
28125
- D_();
28113
+ let n = E_(u.value, e), r = u.value.name, i = u.value;
28114
+ T_();
28126
28115
  try {
28127
- await __(r, { property: n });
28116
+ await h_(r, { property: n });
28128
28117
  } catch (e) {
28129
28118
  u.value = i, console.error("[ChatBot] Failed to submit shortcut:", e), a("error", e);
28130
28119
  }
28131
- }, A_ = () => {
28132
- if (!Kg) {
28120
+ }, O_ = () => {
28121
+ if (!Wg) {
28133
28122
  console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
28134
28123
  return;
28135
28124
  }
28136
- Kg.stopGeneration(), a("stop");
28137
- }, j_ = async (e) => {
28138
- if (!Gg) {
28125
+ Wg.stopGeneration(), a("stop");
28126
+ }, k_ = async (e) => {
28127
+ if (!Ug) {
28139
28128
  console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
28140
28129
  return;
28141
28130
  }
28142
28131
  try {
28143
- await Gg.switchSession(e), a("session-switched", Gg.currentSession.value);
28132
+ await Ug.switchSession(e), a("session-switched", Ug.currentSession.value);
28144
28133
  } catch (e) {
28145
28134
  console.error("Failed to switch session:", e), a("error", e);
28146
28135
  }
28147
- }, M_ = (e) => {
28148
- Xg.value = e;
28149
- }, N_ = () => {
28136
+ }, A_ = (e) => {
28137
+ Jg.value = e;
28138
+ }, j_ = () => {
28150
28139
  l.value?.focus?.();
28151
28140
  };
28152
28141
  return onMounted(async () => {
28153
28142
  if (!(!z || I.value)) try {
28154
- if (Vg) {
28143
+ if (zg) {
28155
28144
  if (await z.agent.getAgentInfo(), await z.session.getSessions(), i.sessionCode) await z.session.chooseSession(i.sessionCode);
28156
28145
  else if (z.session.list.value.length > 0) {
28157
28146
  let e = z.session.list.value[0];
@@ -28164,46 +28153,46 @@ var UIStateManager = class {
28164
28153
  console.error("Failed to initialize ChatBot:", e), I.value = e, a("error", e);
28165
28154
  }
28166
28155
  }), onBeforeUnmount(() => {
28167
- Vg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
28156
+ zg && z && z.agent.stopChat(z.session.current?.value?.sessionCode ?? "");
28168
28157
  }), n({
28169
- sendMessage: (e) => x_(e, [[]]),
28170
- stopGeneration: A_,
28171
- switchSession: j_,
28172
- messages: $g,
28173
- currentSession: n_,
28174
- isGenerating: t_,
28158
+ sendMessage: (e) => y_(e, [[]]),
28159
+ stopGeneration: O_,
28160
+ switchSession: k_,
28161
+ messages: Zg,
28162
+ currentSession: e_,
28163
+ isGenerating: $g,
28175
28164
  getChatHelper: () => z,
28176
- setCiteText: M_,
28177
- focusInput: N_,
28165
+ setCiteText: A_,
28166
+ focusInput: j_,
28178
28167
  selectShortcut: (e, n) => {
28179
- E_(e, n);
28168
+ w_(e, n);
28180
28169
  }
28181
28170
  }), (e, n) => (openBlock(), createElementBlock("div", {
28182
28171
  class: normalizeClass([
28183
28172
  "ai-chatbot",
28184
28173
  i.extCls,
28185
- { "welcome-state": r_.value }
28174
+ { "welcome-state": t_.value }
28186
28175
  ]),
28187
- style: normalizeStyle(s_.value)
28188
- }, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [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), {
28176
+ style: normalizeStyle(a_.value)
28177
+ }, [createCommentVNode(" 初始化错误提示 "), I.value ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("span", null, toDisplayString(I.value.message), 1)])) : zg && !j.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 独立模式:初始化中(getAgentInfo → getSessions → chooseSession)统一展示 Loading "), createElementVNode("div", _hoisted_2$1, [createVNode(unref(Loading), {
28189
28178
  mode: "spin",
28190
28179
  size: "small",
28191
28180
  theme: "primary"
28192
28181
  })])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
28193
28182
  createCommentVNode(" 内容区:欢迎状态 "),
28194
- r_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [
28183
+ t_.value ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [
28195
28184
  n[2] ||= createElementVNode("img", {
28196
28185
  alt: "ai-blueking",
28197
28186
  class: "welcome-banner",
28198
28187
  src: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='309px'%20height='93px'%20viewBox='0%200%20309%2093'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eAI%20小鲸%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='45.02491%25'%20y1='35.5927467%25'%20x2='99.2803929%25'%20y2='81.0358394%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-2'%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.885701426'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0.29'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-3'%3e%3cstop%20stop-color='%231562FC'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='95.0902604%25'%20x2='35.112422%25'%20y2='19.6450217%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23DC63FE'%20offset='0.0150240385%25'%3e%3c/stop%3e%3cstop%20stop-color='%23235DFA'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='46.6072083%25'%20y1='95.8855311%25'%20x2='46.6072083%25'%20y2='50%25'%20id='linearGradient-5'%3e%3cstop%20stop-color='%23B962FD'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23565FFB'%20offset='99.984976%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23A826E2'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='-38.6691405%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-7'%3e%3cstop%20stop-color='%23235DFA'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%239F7BF1'%20stop-opacity='0.15'%20offset='62.335824%25'%3e%3c/stop%3e%3cstop%20stop-color='%23EB8CEC'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='AI--小鲸'%20transform='translate(-1710,%20-3457)'%3e%3cg%20id='聊天窗/默认页'%20transform='translate(1644,%203324)'%3e%3cg%20id='AI-小鲸'%20transform='translate(66,%20133.2974)'%3e%3cg%20transform='translate(124.4167,%20-0)'%20id='编组'%3e%3cg%20transform='translate(0,%200)'%3e%3cpath%20d='M28.3965776,12.9425679%20C38.3377031,12.9425679%2046.3965776,21.0014424%2046.3965776,30.9425679%20L46.3969075,48.6505618%20C51.2162571,49.132982%2054.5842089,50.4998157%2054.5842089,53.8408323%20C54.5842089,53.8444226%2054.5842089,53.8477257%2054.5824622,53.8507588%20L54.5702354,53.8590653%20C54.5370482,53.8709895%2054.4250414,53.8772107%2054.0470184,53.8795761%20L53.8473221,53.8804155%20C53.8227592,53.8804783%2053.7973775,53.8805312%2053.7711498,53.8805746%20L53.4140599,53.8806511%20C53.3806271,53.8806219%2053.3462391,53.8805842%2053.3108685,53.8805382%20L52.8375142,53.8796076%20C51.6610285,53.8767057%2049.6921211,53.8685916%2046.3970568,53.8605313%20L46.3965776,53.8807246%20L23.4584209,53.8807246%20C14.9044209,53.8807246%207.74404265,47.9139206%205.91235374,39.9153803%20C2.4976649,38.935189%200,35.8013205%200,32.0869334%20L1.43000256,32.0866983%20C1.58407741,32.0866469%201.73656386,32.0865873%201.88747828,32.0865198%20L3.20370552,32.0857063%20C4.00314289,32.0850715%204.75405903,32.0842107%205.4593989,32.0831725%20L5.45842089,30.9425679%20C5.45842089,21.0014424%2013.5172954,12.9425679%2023.4584209,12.9425679%20L28.3965776,12.9425679%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-2)'%20x='10.9168418'%20y='18.4009888'%20width='30.0213149'%20height='30.0213149'%20rx='12'%3e%3c/rect%3e%3crect%20id='矩形'%20fill='url(%23linearGradient-3)'%20x='49.125788'%20y='21.1301993'%20width='5.45842089'%20height='24.562894'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M51.8123687,2.72921045%20C51.8123687,6.90327561%2054.9358287,10.3478176%2058.9729609,10.8530485%20L60,10.9168418%20C55.8259348,10.9168418%2052.3813929,14.0403018%2051.8761619,18.077434%20L51.8123687,19.1044731%20C51.8123687,14.930408%2048.6889086,11.485866%2044.6517764,10.9806351%20L43.6247373,10.9168418%20C47.7988025,10.9168418%2051.2433445,7.79338174%2051.7485754,3.75624952%20L51.8123687,2.72921045%20Z'%20id='星形'%20fill='url(%23linearGradient-4)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M40.8955269,-1.43884904e-13%20C40.8955269,2.78271011%2042.9778336,5.07907143%2045.6692551,5.41589204%20L46.3539478,5.45842089%20C43.5712377,5.45842089%2041.2748763,7.54072759%2040.9380557,10.2321491%20L40.8955269,10.9168418%20C40.8955269,8.13413168%2038.8132202,5.83777036%2036.1217987,5.50094974%20L35.437106,5.45842089%20C38.2198161,5.45842089%2040.5161774,3.3761142%2040.852998,0.684692719%20L40.8955269,-1.43884904e-13%20Z'%20id='星形'%20fill='url(%23linearGradient-5)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpath%20d='M44.4235306,12.0484656%20C44.4235306,13.4398207%2045.464684,14.5880013%2046.8103947,14.7564116%20L47.1527411,14.7776761%20C45.761386,14.7776761%2044.6132054,15.8188294%2044.4447951,17.1645402%20L44.4235306,17.5068865%20C44.4235306,16.1155315%2043.3823773,14.9673508%2042.0366665,14.7989405%20L41.6943202,14.7776761%20C43.0856752,14.7776761%2044.2338559,13.7365227%2044.4022662,12.390812%20L44.4235306,12.0484656%20Z'%20id='星形'%20fill='%238860FC'%20fill-rule='nonzero'%3e%3c/path%3e%3crect%20id='矩形'%20fill='%2316204D'%20x='17.7398679'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3crect%20id='矩形备份'%20fill='%2316204D'%20x='28.6567097'%20y='29.3178306'%20width='5.45842089'%20height='8.18763134'%20rx='2'%3e%3c/rect%3e%3cpath%20d='M33.2681489,12.9425679%20C32.5347773,9.30362068%2031.08981,7.48414704%2028.9332468,7.48414704%20C25.698402,7.48414704%2025.7333802,11.8081925%2028.9332468,11.4257275%20C30.6212196,11.223972%2031.7656965,11.7295855%2032.3666775,12.9425679%20L33.2681489,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%20transform='translate(29.8942,%2010.2134)%20scale(-1,%201)%20translate(-29.8942,%20-10.2134)'%3e%3c/path%3e%3cpath%20d='M26.5202122,12.9425679%20C25.7868406,9.30362068%2024.3418733,7.48414704%2022.1853101,7.48414704%20C18.9504653,7.48414704%2018.9854435,11.8081925%2022.1853101,11.4257275%20C23.8732829,11.223972%2025.0177598,11.7295855%2025.6187408,12.9425679%20L26.5202122,12.9425679%20Z'%20id='路径-7'%20fill='url(%23linearGradient-6)'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3cpath%20d='M309,81.279814%20C309,66.0493667%20239.827994,53.7026496%20154.5,53.7026496%20C69.1720062,53.7026496%200,66.0493667%200,81.279814%20C0,96.5102614%20309,96.5102614%20309,81.279814%20Z'%20id='椭圆形'%20fill='url(%23linearGradient-7)'%20opacity='0.22710455'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"
28199
28188
  }, null, -1),
28200
28189
  n[3] ||= createElementVNode("h2", { class: "welcome-title" }, "你好,我是小鲸", -1),
28201
- i_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: i_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
28190
+ n_.value ? (openBlock(), createElementBlock("div", _hoisted_5, [createVNode(unref(content_render_default), { content: n_.value }, null, 8, ["content"])])) : createCommentVNode("v-if", !0)
28202
28191
  ])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" 内容区:消息列表 "), createElementVNode("div", {
28203
28192
  ref_key: "messagesContainerRef",
28204
28193
  ref: s,
28205
28194
  class: "chatbot-messages"
28206
- }, [e_.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
28195
+ }, [Qg.value ? (openBlock(), createElementBlock("div", _hoisted_6, [createVNode(unref(Loading), {
28207
28196
  mode: "spin",
28208
28197
  size: "small",
28209
28198
  theme: "primary"
@@ -28211,17 +28200,17 @@ var UIStateManager = class {
28211
28200
  key: 1,
28212
28201
  "selected-messages": m.value,
28213
28202
  "onUpdate:selectedMessages": n[0] ||= (e) => m.value = e,
28214
- "enable-selection": Ug.value,
28203
+ "enable-selection": Vg.value,
28215
28204
  "message-status": B.value,
28216
28205
  "message-tools-status": H.value,
28217
28206
  "message-tools-tippy-options": i.messageToolsTippyOptions,
28218
- messages: $g.value,
28207
+ messages: Zg.value,
28219
28208
  "on-agent-action": G,
28220
28209
  "on-agent-feedback": K,
28221
28210
  "on-user-action": $,
28222
- "on-user-input-confirm": Mg,
28223
- "on-user-shortcut-confirm": Ng,
28224
- onStopStreaming: Rg
28211
+ "on-user-input-confirm": Ag,
28212
+ "on-user-shortcut-confirm": jg,
28213
+ onStopStreaming: Ig
28225
28214
  }, null, 8, [
28226
28215
  "selected-messages",
28227
28216
  "enable-selection",
@@ -28231,39 +28220,39 @@ var UIStateManager = class {
28231
28220
  "messages"
28232
28221
  ]))], 512)], 2112)),
28233
28222
  createCommentVNode(" 统一底部区域 "),
28234
- !r_.value && Ug.value ? (openBlock(), createBlock(selection_footer_default, {
28223
+ !t_.value && Vg.value ? (openBlock(), createBlock(selection_footer_default, {
28235
28224
  key: 2,
28236
- "is-all-selected": m.value.length === $g.value.length,
28237
- loading: Wg.value,
28225
+ "is-all-selected": m.value.length === Zg.value.length,
28226
+ loading: Hg.value,
28238
28227
  "selected-count": m.value.length,
28239
- onCancel: d_,
28240
- onConfirm: f_,
28241
- onToggleAll: m_
28228
+ onCancel: l_,
28229
+ onConfirm: u_,
28230
+ onToggleAll: f_
28242
28231
  }, null, 8, [
28243
28232
  "is-all-selected",
28244
28233
  "loading",
28245
28234
  "selected-count"
28246
28235
  ])) : (openBlock(), createElementBlock("div", _hoisted_7, [u.value?.components?.length ? (openBlock(), createBlock(unref(shortcut_render_default), mergeProps({ key: 0 }, u.value, {
28247
- onClose: D_,
28248
- onSubmit: k_
28236
+ onClose: T_,
28237
+ onSubmit: D_
28249
28238
  }), null, 16)) : renderSlot(e.$slots, "input", { key: 1 }, () => [createVNode(unref(chat_input_default), {
28250
28239
  ref_key: "chatInputRef",
28251
28240
  ref: l,
28252
- cite: Xg.value,
28253
- "onUpdate:cite": n[1] ||= (e) => Xg.value = e,
28241
+ cite: Jg.value,
28242
+ "onUpdate:cite": n[1] ||= (e) => Jg.value = e,
28254
28243
  "message-status": B.value,
28255
- "model-value": Yg.value,
28256
- "on-send-message": x_,
28257
- "on-stop-sending": w_,
28258
- "on-upload": y_,
28244
+ "model-value": qg.value,
28245
+ "on-send-message": y_,
28246
+ "on-stop-sending": S_,
28247
+ "on-upload": __,
28259
28248
  placeholder: i.placeholder,
28260
- prompts: o_.value,
28261
- resources: a_.value,
28249
+ prompts: i_.value,
28250
+ resources: r_.value,
28262
28251
  "shortcut-id": u.value?.id,
28263
- shortcuts: u_.value,
28264
- onDeleteShortcut: D_,
28265
- onSelectShortcut: T_,
28266
- "onUpdate:modelValue": Qg
28252
+ shortcuts: c_.value,
28253
+ onDeleteShortcut: T_,
28254
+ onSelectShortcut: C_,
28255
+ "onUpdate:modelValue": Xg
28267
28256
  }, null, 8, [
28268
28257
  "cite",
28269
28258
  "message-status",
@@ -29064,7 +29053,7 @@ function useDraggable(e = {}, n) {
29064
29053
  })) : (_.value = window.innerHeight - s - l, v.value = u.value - l, T.value = r, E.value = s), k.value = !k.value;
29065
29054
  }, q = (e, n) => {
29066
29055
  v.value = e, _.value = n, j.value = e - (window.innerWidth - T.value);
29067
- }, Dg = (e, n) => {
29056
+ }, Tg = (e, n) => {
29068
29057
  T.value = Math.max(i, Math.min(e, O.value)), E.value = Math.max(a, n);
29069
29058
  };
29070
29059
  return onMounted(() => {
@@ -29086,9 +29075,9 @@ function useDraggable(e = {}, n) {
29086
29075
  handleResizeStop: H,
29087
29076
  toggleCompression: K,
29088
29077
  updatePosition: q,
29089
- updateSize: Dg,
29078
+ updateSize: Tg,
29090
29079
  updatePositionAndSize: (e, n, r, i) => {
29091
- q(e, n), Dg(r, i);
29080
+ q(e, n), Tg(r, i);
29092
29081
  }
29093
29082
  };
29094
29083
  }
@@ -29160,11 +29149,11 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29160
29149
  document.querySelectorAll("iframe").forEach((e) => {
29161
29150
  e.style.pointerEvents = "";
29162
29151
  });
29163
- }, Og = (e, n) => {
29152
+ }, Eg = (e, n) => {
29164
29153
  o.value || (o.value = !0, J()), k(e, n);
29165
- }, kg = (e, n, r, i) => {
29154
+ }, Dg = (e, n, r, i) => {
29166
29155
  o.value || (o.value = !0, J()), j(e, n, r, i);
29167
- }, Ag = (e, n) => {
29156
+ }, Og = (e, n) => {
29168
29157
  I(e, n), o.value = !1, Z();
29169
29158
  }, $ = (e, n, r, i) => {
29170
29159
  L(e, n, r, i), o.value = !1, Z();
@@ -29196,10 +29185,10 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29196
29185
  w: unref(v),
29197
29186
  x: unref(_),
29198
29187
  y: unref(m),
29199
- onDragStop: Ag,
29200
- onDragging: Og,
29188
+ onDragStop: Og,
29189
+ onDragging: Eg,
29201
29190
  onResizeStop: $,
29202
- onResizing: kg
29191
+ onResizing: Dg
29203
29192
  }, {
29204
29193
  default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [renderSlot(e.$slots, "default", {}, void 0, !0)])]),
29205
29194
  _: 3
@@ -29442,12 +29431,12 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29442
29431
  }), K = I, q = new SessionBusinessManager(K.session, K.agent, null, {
29443
29432
  enableChatSession: i.enableChatSession,
29444
29433
  initialSessionCode: i.initialSessionCode
29445
- }), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Ag = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), Mg = ref(!1), Ng = ref(""), Fg = { appendTo: (e) => {
29434
+ }), J = new ShareBusinessManager(K.message, K.session), Z = new UIStateManager(), Q = computed(() => Z.isSelectionMode.value), Og = ref(!1), $ = new ShortcutManager(null, i.shortcuts || []), Ag = ref(!1), jg = ref(""), Ng = { appendTo: (e) => {
29446
29435
  let n = e.closest(".draggable-container-content");
29447
29436
  return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", n), n ?? document.body;
29448
- } }, Ig = computed(() => m.isCompressed.value), Lg = computed(() => B.value), Rg = ref(""), zg = ref(!0), Bg = ref(!1), Vg = computed(() => i.resources?.length ? i.resources : mapResourcesToSlashItems(z.value?.resources)), Ug = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Wg = computed(() => {
29437
+ } }, Pg = computed(() => m.isCompressed.value), Fg = computed(() => B.value), Ig = ref(""), Lg = ref(!0), Rg = ref(!1), zg = computed(() => i.resources?.length ? i.resources : z.value?.resources ?? []), Vg = computed(() => i.prompts?.length ? i.prompts : z.value?.conversationSettings?.predefinedQuestions ?? []), Hg = computed(() => {
29449
29438
  let e = $.effectiveShortcuts.value;
29450
- return typeof i.shortcutFilter == "function" && Ng.value ? e.filter((e) => i.shortcutFilter?.(e, Ng.value)) : e;
29439
+ return typeof i.shortcutFilter == "function" && jg.value ? e.filter((e) => i.shortcutFilter?.(e, jg.value)) : e;
29451
29440
  });
29452
29441
  watch(() => L.value, async (e) => {
29453
29442
  if (e && z.value) {
@@ -29467,52 +29456,52 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29467
29456
  }, { immediate: !0 }), watch(() => i.shortcuts, (e) => {
29468
29457
  $.setShortcuts(e || []);
29469
29458
  }, { immediate: !0 }), watch(() => G.value, (e) => {
29470
- e && (Rg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0);
29459
+ e && (Ig.value = e.sessionName || "", Rg.value = (e.sessionContentCount ?? 0) > 0);
29471
29460
  }, { immediate: !0 }), watch(() => K.message.list.value.length, (e) => {
29472
- e > 0 && (Bg.value = !0);
29461
+ e > 0 && (Rg.value = !0);
29473
29462
  });
29474
- let Gg = async (e) => {
29463
+ let Ug = async (e) => {
29475
29464
  m.showPanel(e), e && l.value && await l.value.switchSession(e);
29476
- }, Kg = async (e) => {
29477
- await Gg(e);
29478
- }, qg = () => {
29465
+ }, Wg = async (e) => {
29466
+ await Ug(e);
29467
+ }, Gg = () => {
29479
29468
  m.hidePanel();
29480
- }, Yg = () => {
29481
- qg();
29482
- }, Xg = () => {
29469
+ }, qg = () => {
29470
+ Gg();
29471
+ }, Jg = () => {
29483
29472
  m.handleNimbusClick();
29484
- }, Qg = (e) => {
29485
- Ng.value = e;
29486
- }, $g = async (e, n) => {
29487
- Mg.value = !1, await Gg(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
29473
+ }, Xg = (e) => {
29474
+ jg.value = e;
29475
+ }, Zg = async (e, n) => {
29476
+ Ag.value = !1, await Ug(), e.components?.length && l.value ? l.value.selectShortcut(e, n) : l.value && (l.value.setCiteText(n), l.value.focusInput()), k("shortcut-click", {
29488
29477
  shortcut: e,
29489
29478
  source: "popup"
29490
29479
  });
29491
- }, e_ = (e) => {
29480
+ }, Qg = (e) => {
29492
29481
  k("shortcut-click", e);
29493
- }, t_ = (e) => {
29482
+ }, $g = (e) => {
29494
29483
  m.handleDragging(e);
29495
- }, n_ = (e) => {
29484
+ }, e_ = (e) => {
29496
29485
  m.handleResizing(e);
29497
- }, r_ = (e) => {
29486
+ }, t_ = (e) => {
29498
29487
  m.handleDragStop(e);
29499
- }, i_ = (e) => {
29488
+ }, n_ = (e) => {
29500
29489
  m.handleResizeStop(e);
29501
- }, a_ = () => {
29490
+ }, r_ = () => {
29502
29491
  m.container.toggleCompression();
29503
- }, o_ = (e) => {
29492
+ }, i_ = (e) => {
29504
29493
  m.setCompressed(e);
29505
- }, s_ = async () => {
29494
+ }, a_ = async () => {
29506
29495
  j.newChat();
29507
- }, c_ = (e) => {
29496
+ }, o_ = (e) => {
29508
29497
  j.historyClick(e);
29509
- }, u_ = async (e) => {
29498
+ }, c_ = async (e) => {
29510
29499
  await q.switchSession(e);
29511
- }, d_ = async (e) => {
29500
+ }, l_ = async (e) => {
29512
29501
  await q.deleteSession(e);
29513
- }, f_ = async (e, n) => {
29502
+ }, u_ = async (e, n) => {
29514
29503
  await q.updateSessionName(e, n);
29515
- }, p_ = async () => {
29504
+ }, d_ = async () => {
29516
29505
  let e = K.session.current?.value?.sessionCode;
29517
29506
  if (!e) {
29518
29507
  console.error("[AIBlueking] Cannot auto-generate name: no active session");
@@ -29521,14 +29510,14 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29521
29510
  try {
29522
29511
  await K.session.renameSession(e);
29523
29512
  let n = K.session.list.value.find((n) => n.sessionCode === e);
29524
- n && (Rg.value = n.sessionName || "");
29513
+ n && (Ig.value = n.sessionName || "");
29525
29514
  } catch (e) {
29526
- console.error("[AIBlueking] Failed to auto-generate session name:", e), A_(e);
29515
+ console.error("[AIBlueking] Failed to auto-generate session name:", e), O_(e);
29527
29516
  }
29528
29517
  j.autoGenerateName();
29529
- }, m_ = () => {
29518
+ }, f_ = () => {
29530
29519
  j.helpClick();
29531
- }, h_ = async (e) => {
29520
+ }, p_ = async (e) => {
29532
29521
  let n = K.session.current?.value;
29533
29522
  if (!n) {
29534
29523
  console.error("[AIBlueking] Cannot rename: no active session");
@@ -29538,17 +29527,17 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29538
29527
  await K.session.updateSession({
29539
29528
  ...n,
29540
29529
  sessionName: e
29541
- }), Rg.value = e;
29530
+ }), Ig.value = e;
29542
29531
  } catch (e) {
29543
- console.error("[AIBlueking] Failed to rename session:", e), A_(e);
29532
+ console.error("[AIBlueking] Failed to rename session:", e), O_(e);
29544
29533
  }
29545
29534
  j.rename(e);
29546
- }, g_ = () => {
29535
+ }, m_ = () => {
29547
29536
  Z.enableSelectionMode(), j.share();
29548
- }, __ = () => {
29537
+ }, h_ = () => {
29549
29538
  Z.disableSelectionMode();
29550
- }, v_ = async (e) => {
29551
- Ag.value = !0;
29539
+ }, g_ = async (e) => {
29540
+ Og.value = !0;
29552
29541
  try {
29553
29542
  let { shareUrl: n, userMessageIds: r } = await J.shareMessages(e);
29554
29543
  await copyToClipboard(n), Message({
@@ -29556,75 +29545,75 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29556
29545
  theme: "success"
29557
29546
  }), Z.disableSelectionMode(), j.shareMessages(r);
29558
29547
  } catch (e) {
29559
- console.error("[AIBlueking] Failed to share messages:", e), A_(e);
29548
+ console.error("[AIBlueking] Failed to share messages:", e), O_(e);
29560
29549
  } finally {
29561
- Ag.value = !1;
29550
+ Og.value = !1;
29562
29551
  }
29563
- }, y_ = async (e) => {
29552
+ }, __ = async (e) => {
29564
29553
  l.value && await l.value.sendMessage(e);
29565
- }, b_ = (e) => {
29566
- Bg.value = !0, j.sendMessage(e);
29567
- }, x_ = () => {
29554
+ }, v_ = (e) => {
29555
+ Rg.value = !0, j.sendMessage(e);
29556
+ }, y_ = () => {
29568
29557
  j.receiveStart();
29569
- }, S_ = () => {
29558
+ }, b_ = () => {
29570
29559
  j.receiveText();
29571
- }, C_ = () => {
29560
+ }, x_ = () => {
29572
29561
  j.receiveEnd();
29573
- }, w_ = () => {
29562
+ }, S_ = () => {
29574
29563
  j.stop();
29575
- }, T_ = () => {
29564
+ }, C_ = () => {
29576
29565
  l.value && l.value.stopGeneration();
29577
- }, E_ = async (e) => {
29566
+ }, w_ = async (e) => {
29578
29567
  e ? await q.createSession({ sessionCode: e }) : await q.createNewSession();
29579
- }, D_ = async (e) => {
29568
+ }, T_ = async (e) => {
29580
29569
  l.value && await l.value.switchSession(e);
29581
- }, O_ = async (e, n) => {
29570
+ }, E_ = async (e, n) => {
29582
29571
  try {
29583
- await q.updateSessionName(e, n), Rg.value = n;
29572
+ await q.updateSessionName(e, n), Ig.value = n;
29584
29573
  } catch (e) {
29585
- console.error("[AIBlueking] Failed to update session name:", e), A_(e);
29574
+ console.error("[AIBlueking] Failed to update session name:", e), O_(e);
29586
29575
  }
29587
- }, k_ = (e) => {
29588
- e && (Rg.value = e.sessionName || "", Bg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
29589
- }, A_ = (e) => {
29576
+ }, D_ = (e) => {
29577
+ e && (Ig.value = e.sessionName || "", Rg.value = (e.sessionContentCount ?? 0) > 0 || K.message.list.value.length > 0);
29578
+ }, O_ = (e) => {
29590
29579
  console.error("ChatBot error:", e), m.emitInternal("sdk-error", {
29591
29580
  apiName: "chat",
29592
29581
  code: -1,
29593
29582
  message: e.message,
29594
29583
  data: e
29595
29584
  });
29596
- }, j_ = (e, n) => {
29585
+ }, k_ = (e, n) => {
29597
29586
  m.container.updatePosition(e, n);
29598
- }, M_ = (e, n) => {
29587
+ }, A_ = (e, n) => {
29599
29588
  m.container.updateSize(e, n);
29600
- }, N_ = (e, n, r, i) => {
29589
+ }, j_ = (e, n, r, i) => {
29601
29590
  m.container.updatePositionAndSize(e, n, r, i);
29602
- }, P_ = (e) => {
29591
+ }, M_ = (e) => {
29603
29592
  l.value && l.value.setCiteText(e);
29604
- }, F_ = () => {
29593
+ }, N_ = () => {
29605
29594
  l.value && l.value.focusInput();
29606
- }, I_ = (e) => {
29607
- isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? qg() : Gg());
29595
+ }, P_ = (e) => {
29596
+ isTogglePanelShortcut(e) && (e.preventDefault(), v.value ? Gg() : Ug());
29608
29597
  };
29609
29598
  return onMounted(async () => {
29610
- o.value && m.setContainerRef(o.value), window.addEventListener("keydown", I_);
29599
+ o.value && m.setContainerRef(o.value), window.addEventListener("keydown", P_);
29611
29600
  }), onBeforeUnmount(() => {
29612
- window.removeEventListener("keydown", I_), m.destroy();
29601
+ window.removeEventListener("keydown", P_), m.destroy();
29613
29602
  }), n({
29614
- show: Gg,
29615
- handleShow: Kg,
29616
- handleClose: Yg,
29617
- hide: qg,
29618
- sendMessage: y_,
29619
- stopGeneration: T_,
29620
- addNewSession: E_,
29621
- switchToSession: D_,
29622
- updateSessionName: O_,
29623
- updatePosition: j_,
29624
- updateSize: M_,
29625
- updatePositionAndSize: N_,
29626
- setCiteText: P_,
29627
- focusInput: F_
29603
+ show: Ug,
29604
+ handleShow: Wg,
29605
+ handleClose: qg,
29606
+ hide: Gg,
29607
+ sendMessage: __,
29608
+ stopGeneration: C_,
29609
+ addNewSession: w_,
29610
+ switchToSession: T_,
29611
+ updateSessionName: E_,
29612
+ updatePosition: k_,
29613
+ updateSize: A_,
29614
+ updatePositionAndSize: j_,
29615
+ setCiteText: M_,
29616
+ focusInput: N_
29628
29617
  }), (e, n) => (openBlock(), createBlock(Teleport, { to: i.teleportTo }, [createElementVNode("div", { class: normalizeClass(["ai-blueking-v2", i.extCls]) }, [
29629
29618
  createCommentVNode(" 可拖拽容器 "),
29630
29619
  createVNode(unref(draggable_container_default), {
@@ -29640,42 +29629,42 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29640
29629
  "max-width": i.maxWidth,
29641
29630
  "max-width-percent": 80,
29642
29631
  visible: unref(v),
29643
- onCompressionChange: o_,
29644
- onDragStop: r_,
29645
- onDragging: t_,
29646
- onResizeStop: i_,
29647
- onResizing: n_
29632
+ onCompressionChange: i_,
29633
+ onDragStop: t_,
29634
+ onDragging: $g,
29635
+ onResizeStop: n_,
29636
+ onResizing: e_
29648
29637
  }, {
29649
- default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": Bg.value }]) }, [
29638
+ default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["ai-blueking-panel", { "has-messages": Rg.value }]) }, [
29650
29639
  createCommentVNode(" 独立的 Header 组件 "),
29651
29640
  i.hideHeader ? createCommentVNode("v-if", !0) : (openBlock(), createBlock(ai_header_default, {
29652
29641
  key: 0,
29653
- "agent-name": Lg.value,
29642
+ "agent-name": Fg.value,
29654
29643
  "chat-helper": unref(K),
29655
29644
  draggable: i.draggable,
29656
29645
  "dropdown-menu-config": i.dropdownMenuConfig,
29657
29646
  "enable-chat-session": i.enableChatSession,
29658
- "has-permission": zg.value,
29659
- "has-session-contents": Bg.value,
29660
- "is-compression-height": Ig.value,
29647
+ "has-permission": Lg.value,
29648
+ "has-session-contents": Rg.value,
29649
+ "is-compression-height": Pg.value,
29661
29650
  "session-business-manager": unref(q),
29662
- "session-name": Rg.value,
29651
+ "session-name": Ig.value,
29663
29652
  "show-compression-icon": i.showCompressionIcon,
29664
29653
  "show-history-icon": i.showHistoryIcon,
29665
29654
  "show-more-icon": i.showMoreIcon,
29666
29655
  "show-new-chat-icon": i.showNewChatIcon,
29667
29656
  title: i.title,
29668
- onAutoGenerateName: p_,
29669
- onClose: Yg,
29670
- onHelpClick: m_,
29671
- onHistoryClick: c_,
29672
- onHistorySessionDelete: d_,
29673
- onHistorySessionRename: f_,
29674
- onHistorySessionSwitch: u_,
29675
- onNewChat: s_,
29676
- onRename: h_,
29677
- onShare: g_,
29678
- onToggleCompression: a_
29657
+ onAutoGenerateName: d_,
29658
+ onClose: qg,
29659
+ onHelpClick: f_,
29660
+ onHistoryClick: o_,
29661
+ onHistorySessionDelete: l_,
29662
+ onHistorySessionRename: u_,
29663
+ onHistorySessionSwitch: c_,
29664
+ onNewChat: a_,
29665
+ onRename: p_,
29666
+ onShare: m_,
29667
+ onToggleCompression: r_
29679
29668
  }, null, 8, [
29680
29669
  "agent-name",
29681
29670
  "chat-helper",
@@ -29701,27 +29690,27 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29701
29690
  "chat-helper": unref(K),
29702
29691
  "enable-selection": Q.value,
29703
29692
  "hello-text": i.helloText,
29704
- "message-tools-tippy-options": Fg,
29693
+ "message-tools-tippy-options": Ng,
29705
29694
  placeholder: i.placeholder,
29706
- prompts: Ug.value,
29695
+ prompts: Vg.value,
29707
29696
  "request-options": i.requestOptions,
29708
- resources: Vg.value,
29697
+ resources: zg.value,
29709
29698
  "session-code": i.initialSessionCode,
29710
- "share-loading": Ag.value,
29699
+ "share-loading": Og.value,
29711
29700
  "shortcut-limit": i.shortcutLimit,
29712
29701
  shortcuts: i.shortcuts,
29713
29702
  url: u.value,
29714
- onCancelShare: __,
29715
- onConfirmShare: n[0] ||= (e) => v_(e),
29716
- onError: n[1] ||= (e) => A_(e),
29717
- onReceiveEnd: C_,
29718
- onReceiveStart: x_,
29719
- onReceiveText: S_,
29720
- onRequestShare: g_,
29721
- onSendMessage: n[2] ||= (e) => b_(e),
29722
- onSessionSwitched: n[3] ||= (e) => k_(e),
29723
- onShortcutClick: e_,
29724
- onStop: w_
29703
+ onCancelShare: h_,
29704
+ onConfirmShare: n[0] ||= (e) => g_(e),
29705
+ onError: n[1] ||= (e) => O_(e),
29706
+ onReceiveEnd: x_,
29707
+ onReceiveStart: y_,
29708
+ onReceiveText: b_,
29709
+ onRequestShare: m_,
29710
+ onSendMessage: n[2] ||= (e) => v_(e),
29711
+ onSessionSwitched: n[3] ||= (e) => D_(e),
29712
+ onShortcutClick: Qg,
29713
+ onStop: S_
29725
29714
  }, null, 8, [
29726
29715
  "auto-load",
29727
29716
  "chat-helper",
@@ -29758,7 +29747,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29758
29747
  "onUpdate:isPanelShow": n[5] ||= (e) => isRef(v) ? v.value = e : null,
29759
29748
  "default-minimize": i.defaultMinimize,
29760
29749
  size: i.nimbusSize,
29761
- onClick: Xg
29750
+ onClick: Jg
29762
29751
  }, null, 8, [
29763
29752
  "is-minimize",
29764
29753
  "is-panel-show",
@@ -29768,13 +29757,13 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29768
29757
  createCommentVNode(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
29769
29758
  i.enablePopup ? (openBlock(), createBlock(unref(ai_selection_default), {
29770
29759
  key: 1,
29771
- visible: Mg.value,
29772
- "onUpdate:visible": n[6] ||= (e) => Mg.value = e,
29760
+ visible: Ag.value,
29761
+ "onUpdate:visible": n[6] ||= (e) => Ag.value = e,
29773
29762
  "exclude-selectors": [".draggable-container-wrapper"],
29774
29763
  "max-shortcut-count": i.shortcutLimit,
29775
- shortcuts: Wg.value,
29776
- onSelectShortcut: $g,
29777
- onSelectionChange: Qg
29764
+ shortcuts: Hg.value,
29765
+ onSelectShortcut: Zg,
29766
+ onSelectionChange: Xg
29778
29767
  }, null, 8, [
29779
29768
  "visible",
29780
29769
  "max-shortcut-count",
@@ -29782,7 +29771,7 @@ var _hoisted_1$1 = { class: "draggable-container-content" }, draggable_container
29782
29771
  ])) : createCommentVNode("v-if", !0)
29783
29772
  ], 2)], 8, ["to"]));
29784
29773
  }
29785
- }), [["__scopeId", "data-v-438e798c"]]), vue2_default = {
29774
+ }), [["__scopeId", "data-v-c4ad013c"]]), vue2_default = {
29786
29775
  name: "AIBluekingV2",
29787
29776
  render(e) {
29788
29777
  return e("div", { style: {