@blueking/ai-blueking 2.0.0-dev.31 → 2.0.0-dev.32

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