st-comp 0.0.279 → 0.0.281

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.
Files changed (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +377 -376
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +260 -260
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +43 -43
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +615 -464
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-41daac7b.js → VarietySelect-3fc0f0ce.js} +5 -5
  36. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-d2d25a3d.cjs} +1 -1
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1927 -2259
  41. package/es/_baseClone-f8e5d3ba.cjs +1 -0
  42. package/es/_baseClone-fb6a3947.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-06d8207f.js +86 -0
  50. package/es/config-provider-bb61bd3e.cjs +1 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-8fa21bfd.cjs +1 -0
  54. package/es/dropdown-bcf8d198.js +178 -0
  55. package/es/el-autocomplete-13b9e372.cjs +1 -0
  56. package/es/el-autocomplete-419bfbcf.js +434 -0
  57. package/es/el-button-ee9fe159.js +343 -0
  58. package/es/el-button-fac5e058.cjs +1 -0
  59. package/es/el-checkbox-6cf1a71c.cjs +1 -0
  60. package/es/el-checkbox-b5ac7f04.js +566 -0
  61. package/es/el-dialog-060b3735.js +252 -0
  62. package/es/el-dialog-54aebacd.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-2be6b683.js +1265 -0
  68. package/es/el-form-item-758dfefa.cjs +12 -0
  69. package/es/el-input-7fe53030.cjs +1 -0
  70. package/es/el-input-d23f5442.js +761 -0
  71. package/es/el-input-number-484fb184.js +390 -0
  72. package/es/el-input-number-f0f4eedb.cjs +1 -0
  73. package/es/el-loading-9d3e405c.js +190 -0
  74. package/es/el-loading-fafaaa7b.cjs +1 -0
  75. package/es/el-menu-item-0ac22681.js +824 -0
  76. package/es/el-menu-item-c91ae430.cjs +1 -0
  77. package/es/el-message-box-568a0aa6.js +481 -0
  78. package/es/el-message-box-ceacb54e.cjs +1 -0
  79. package/es/el-overlay-9f36e73c.cjs +1 -0
  80. package/es/el-overlay-cb5c85aa.js +444 -0
  81. package/es/el-popconfirm-4a8cd35c.cjs +1 -0
  82. package/es/el-popconfirm-6f8e65c8.js +190 -0
  83. package/es/el-popper-0454c8e8.js +2235 -0
  84. package/es/el-popper-acd0ff35.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-64dc7258.js +168 -0
  88. package/es/el-segmented-eb3c8e65.cjs +1 -0
  89. package/es/el-select-a573c78b.js +1535 -0
  90. package/es/el-select-c317294a.cjs +1 -0
  91. package/es/el-table-column-1c443963.js +3651 -0
  92. package/es/el-table-column-f555115d.cjs +14 -0
  93. package/es/el-tag-2d8a3fe7.js +77 -0
  94. package/es/el-tag-dca1292c.cjs +1 -0
  95. package/es/el-text-649c986a.cjs +1 -0
  96. package/es/el-text-761e6717.js +84 -0
  97. package/es/index-11181b5f.cjs +1 -0
  98. package/es/index-21a3dc89.cjs +1 -0
  99. package/es/index-33e039e3.cjs +1 -0
  100. package/es/index-3806160e.js +710 -0
  101. package/es/{index-a9246d17.cjs → index-4614e8e9.cjs} +109 -109
  102. package/es/{index-44a382a5.js → index-53beef02.js} +12 -12
  103. package/es/index-5cada1ed.cjs +1 -0
  104. package/es/index-6a36e1fc.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-6a52dc7c.js} +235 -236
  106. package/es/index-71ba4c28.cjs +1 -0
  107. package/es/index-78dab605.js +141 -0
  108. package/es/index-798fec2d.cjs +1 -0
  109. package/es/index-9573f74b.js +372 -0
  110. package/es/index-a181f161.js +429 -0
  111. package/es/{index-a33b2fb8.js → index-ab0ad219.js} +5090 -5090
  112. package/es/index-beb5cb7d.cjs +1 -0
  113. package/es/index-c09fc6f5.js +131 -0
  114. package/es/index-ceae4c47.cjs +1 -0
  115. package/es/index-d372e68f.cjs +5 -0
  116. package/es/index-d9379af4.js +413 -0
  117. package/es/index-dddacf80.js +47 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/index-e2e58ea9.js +468 -0
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-a3db9620.cjs → python-60e79979.cjs} +1 -1
  122. package/es/{python-8a1664e6.js → python-673bf8b8.js} +32 -31
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-76516e50.cjs +2 -0
  131. package/es/use-form-item-784142b4.js +422 -0
  132. package/es/use-global-config-7ff9a1c2.cjs +1 -0
  133. package/es/use-global-config-9a4ccf33.js +71 -0
  134. package/es/validator-1926345b.cjs +1 -0
  135. package/es/{validator-c60a8956.js → validator-a66ec4f8.js} +1 -1
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-51c2e528.js} +36 -33
  139. package/es/zh-cn-ad12d9f5.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +265 -246
  142. package/lib/{index-62fa175a.js → index-7282d3be.js} +52335 -50156
  143. package/lib/{python-4a48fa39.js → python-418be57d.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -1,313 +1,473 @@
1
- import { b as de, p as fe, e as ee, u as pe, c as ae, n as ke, _ as me, w as ve, x as we } from "./base-a5af3db3.js";
2
- import { E as be } from "./el-dialog-5e30161f.js";
3
- import "./el-overlay-3e17604b.js";
4
- import { E as Te } from "./el-input-342b2def.js";
5
- import { E as _e } from "./el-button-94d3de38.js";
1
+ import { E as ie, w as Ne, s as Ue, t as Ie, v as Fe, c as ze, u as Qe, x as Ye, y as Pe, z as Je, A as Le } from "./index-6a52dc7c.js";
2
+ import { e as Oe, b as me, E as ye } from "./el-popper-0454c8e8.js";
3
+ import { E as He } from "./el-input-d23f5442.js";
4
+ import { b as ke, s as ue, c as I, u as ce, a as ne, p as Ke, w as be, n as Re, B as $e, d as q } from "./base-dd156b8e.js";
5
+ import { k as we, i as je } from "./use-form-item-784142b4.js";
6
+ import { defineComponent as de, inject as Se, ref as D, computed as f, watch as oe, openBlock as r, createElementBlock as v, normalizeClass as E, normalizeStyle as L, createBlock as R, unref as c, withCtx as C, resolveDynamicComponent as Te, renderSlot as re, provide as Ge, reactive as De, toRef as ge, createVNode as k, createTextVNode as Z, isVNode as qe, cloneVNode as Xe, createElementVNode as d, toDisplayString as O, createCommentVNode as Q, nextTick as le, Fragment as ee, renderList as Ae } from "vue";
7
+ import { f as Ze } from "./vnode-8ee9bf4e.js";
8
+ import { E as We } from "./el-button-ee9fe159.js";
9
+ import { E as et } from "./el-dialog-060b3735.js";
10
+ import { E as X } from "./index-e2e58ea9.js";
11
+ import "./el-overlay-cb5c85aa.js";
6
12
  import "./el-tooltip-4ed993c7.js";
7
- import { E as Se } from "./el-popper-fbd0dcea.js";
8
- import { defineComponent as te, ref as y, computed as v, watch as oe, openBlock as l, createElementBlock as f, normalizeClass as w, unref as a, normalizeStyle as J, createBlock as K, withCtx as k, resolveDynamicComponent as ge, renderSlot as re, createElementVNode as d, toDisplayString as L, createCommentVNode as Q, inject as De, reactive as Ce, nextTick as se, Fragment as X, createVNode as A, renderList as ce, createTextVNode as Z, pushScopeId as Me, popScopeId as Ee } from "vue";
9
- import { d as q } from "./dayjs.min-8313b006.js";
10
- import { U as Ve, R as Be } from "./index-53cc4e43.js";
11
- import { s as Ie } from "./aiTools-ce2f9281.js";
12
- import { E as ne, w as Ne, s as Ue, t as Qe, v as Fe, c as Pe, u as Ye, x as ze, y as Je, z as Le, A as Oe } from "./index-eb96e074.js";
13
- import { _ as He } from "./_plugin-vue_export-helper-dad06003.js";
14
- import { E as W } from "./index-5216d5f5.js";
15
- import { k as Ke, i as Re } from "./use-form-common-props-ed72e914.js";
16
- import "./index-d77a7336.js";
17
- import "./index-960806da.js";
18
- import "./index-2e331d74.js";
19
- import "./vnode-5ddb7ed1.js";
20
- import "./scroll-679bd6bf.js";
21
- import "./use-global-config-ee406d58.js";
22
- import "./index-8c2d7e05.js";
13
+ import { U as tt, R as st } from "./index-53cc4e43.js";
14
+ import { s as at } from "./aiTools-ce2f9281.js";
15
+ import { _ as lt } from "./_plugin-vue_export-helper-dad06003.js";
16
+ import "./index-a181f161.js";
17
+ import "./raf-b4fd1e12.js";
18
+ import "./index-dddacf80.js";
23
19
  import "./typescript-7ae59c4c.js";
24
- import "./index-f034b910.js";
25
- import "./index-657047bb.js";
26
- import "./config-provider-88b637a8.js";
27
- const xe = de({
20
+ import "./index-de9ad85c.js";
21
+ import "./use-global-config-9a4ccf33.js";
22
+ import "./index-9573f74b.js";
23
+ import "./index-3806160e.js";
24
+ import "./clamp-c7512966.js";
25
+ import "./toNumber-f077c66a.js";
26
+ import "./config-provider-06d8207f.js";
27
+ import "./scroll-70271cb1.js";
28
+ const nt = ke({
29
+ /**
30
+ * @description avatar size.
31
+ */
28
32
  size: {
29
33
  type: [Number, String],
30
- values: Ke,
31
- default: "",
32
- validator: (p) => fe(p)
34
+ values: we,
35
+ validator: (t) => ue(t)
33
36
  },
37
+ /**
38
+ * @description avatar shape.
39
+ */
34
40
  shape: {
35
41
  type: String,
36
- values: ["circle", "square"],
37
- default: "circle"
38
- },
39
- icon: {
40
- type: Re
42
+ values: ["circle", "square"]
41
43
  },
44
+ /**
45
+ * @description representation type to icon, more info on icon component.
46
+ */
47
+ icon: { type: je },
48
+ /**
49
+ * @description the source of the image for an image avatar.
50
+ */
42
51
  src: {
43
52
  type: String,
44
53
  default: ""
45
54
  },
55
+ /**
56
+ * @description native attribute `alt` of image avatar.
57
+ */
46
58
  alt: String,
59
+ /**
60
+ * @description native attribute srcset of image avatar.
61
+ */
47
62
  srcSet: String,
63
+ /**
64
+ * @description set how the image fit its container for an image avatar.
65
+ */
48
66
  fit: {
49
- type: ee(String),
67
+ type: I(String),
50
68
  default: "cover"
51
69
  }
52
- }), $e = {
53
- error: (p) => p instanceof Event
54
- }, je = te({
55
- name: "ElAvatar"
56
- }), qe = /* @__PURE__ */ te({
57
- ...je,
58
- props: xe,
59
- emits: $e,
60
- setup(p, { emit: i }) {
61
- const M = p, n = pe("avatar"), _ = y(!1), E = v(() => {
62
- const { size: u, icon: S, shape: V } = M, o = [n.b()];
63
- return ae(u) && o.push(n.m(u)), S && o.push(n.m("icon")), V && o.push(n.m(V)), o;
64
- }), R = v(() => {
65
- const { size: u } = M;
66
- return fe(u) ? n.cssVarBlock({
67
- size: ke(u) || ""
68
- }) : void 0;
69
- }), x = v(() => ({
70
- objectFit: M.fit
71
- }));
72
- oe(() => M.src, () => _.value = !1);
73
- function h(u) {
74
- _.value = !0, i("error", u);
70
+ }), ot = { error: (t) => t instanceof Event }, Ce = Symbol("avatarGroupContextKey"), rt = {
71
+ /**
72
+ * @description control the size of avatars in this avatar-group
73
+ */
74
+ size: {
75
+ type: I([Number, String]),
76
+ values: we,
77
+ validator: (t) => ue(t)
78
+ },
79
+ /**
80
+ * @description control the shape of avatars in this avatar-group
81
+ */
82
+ shape: {
83
+ type: I(String),
84
+ values: ["circle", "square"]
85
+ },
86
+ /**
87
+ * @description whether to collapse avatars
88
+ */
89
+ collapseAvatars: Boolean,
90
+ /**
91
+ * @description whether show all collapsed avatars when mouse hover text of the collapse-avatar. To use this, `collapse-avatars` must be true
92
+ */
93
+ collapseAvatarsTooltip: Boolean,
94
+ /**
95
+ * @description the max avatars number to be shown. To use this, `collapse-avatars` must be true
96
+ */
97
+ maxCollapseAvatars: {
98
+ type: Number,
99
+ default: 1
100
+ },
101
+ /**
102
+ * @description tooltip theme, built-in theme: `dark` / `light`
103
+ */
104
+ effect: {
105
+ type: I(String),
106
+ default: "light"
107
+ },
108
+ /**
109
+ * @description placement of tooltip
110
+ */
111
+ placement: {
112
+ type: I(String),
113
+ values: Oe,
114
+ default: "top"
115
+ },
116
+ /**
117
+ * @description custom class name for tooltip
118
+ */
119
+ popperClass: me.popperClass,
120
+ /**
121
+ * @description custom style for tooltip
122
+ */
123
+ popperStyle: me.popperStyle,
124
+ /**
125
+ * @description custom class name for the collapse-avatar
126
+ */
127
+ collapseClass: {
128
+ type: I([
129
+ String,
130
+ Array,
131
+ Object,
132
+ Boolean
133
+ ]),
134
+ default: void 0
135
+ },
136
+ /**
137
+ * @description custom style for the collapse-avatar
138
+ */
139
+ collapseStyle: {
140
+ type: I([
141
+ String,
142
+ Array,
143
+ Object,
144
+ Boolean
145
+ ]),
146
+ default: void 0
147
+ }
148
+ }, it = [
149
+ "src",
150
+ "alt",
151
+ "srcset"
152
+ ];
153
+ var ut = /* @__PURE__ */ de({
154
+ name: "ElAvatar",
155
+ __name: "avatar",
156
+ props: nt,
157
+ emits: ot,
158
+ setup(t, { emit: V }) {
159
+ const l = t, i = V, w = Se(Ce, void 0), b = ce("avatar"), M = D(!1), T = f(() => l.size ?? (w == null ? void 0 : w.size)), y = f(() => l.shape ?? (w == null ? void 0 : w.shape) ?? "circle"), _ = f(() => {
160
+ const { icon: x } = l, S = [b.b()];
161
+ return ne(T.value) && S.push(b.m(T.value)), x && S.push(b.m("icon")), y.value && S.push(b.m(y.value)), S;
162
+ }), N = f(() => ue(T.value) ? b.cssVarBlock({ size: Ke(T.value) }) : void 0), Y = f(() => ({ objectFit: l.fit }));
163
+ oe(() => [l.src, l.srcSet], () => M.value = !1);
164
+ function n(x) {
165
+ M.value = !0, i("error", x);
75
166
  }
76
- return (u, S) => (l(), f("span", {
77
- class: w(a(E)),
78
- style: J(a(R))
79
- }, [
80
- (u.src || u.srcSet) && !_.value ? (l(), f("img", {
81
- key: 0,
82
- src: u.src,
83
- alt: u.alt,
84
- srcset: u.srcSet,
85
- style: J(a(x)),
86
- onError: h
87
- }, null, 44, ["src", "alt", "srcset"])) : u.icon ? (l(), K(a(ne), { key: 1 }, {
88
- default: k(() => [
89
- (l(), K(ge(u.icon)))
90
- ]),
91
- _: 1
92
- })) : re(u.$slots, "default", { key: 2 })
93
- ], 6));
167
+ return (x, S) => (r(), v("span", {
168
+ class: E(_.value),
169
+ style: L(N.value)
170
+ }, [(t.src || t.srcSet) && !M.value ? (r(), v("img", {
171
+ key: 0,
172
+ src: t.src,
173
+ alt: t.alt,
174
+ srcset: t.srcSet,
175
+ style: L(Y.value),
176
+ onError: n
177
+ }, null, 44, it)) : t.icon ? (r(), R(c(ie), { key: 1 }, {
178
+ default: C(() => [(r(), R(Te(t.icon)))]),
179
+ _: 1
180
+ })) : re(x.$slots, "default", { key: 2 })], 6));
181
+ }
182
+ }), Ee = ut, Be = /* @__PURE__ */ de({
183
+ name: "ElAvatarGroup",
184
+ props: rt,
185
+ setup(t, { slots: V }) {
186
+ const l = ce("avatar-group");
187
+ return Ge(Ce, De({
188
+ size: ge(t, "size"),
189
+ shape: ge(t, "shape")
190
+ })), () => {
191
+ var b;
192
+ const i = Ze(((b = V.default) == null ? void 0 : b.call(V)) ?? []);
193
+ let w = i;
194
+ if (t.collapseAvatars && i.length > t.maxCollapseAvatars) {
195
+ w = i.slice(0, t.maxCollapseAvatars);
196
+ const M = i.slice(t.maxCollapseAvatars);
197
+ w.push(k(ye, {
198
+ popperClass: t.popperClass,
199
+ popperStyle: t.popperStyle,
200
+ placement: t.placement,
201
+ effect: t.effect,
202
+ disabled: !t.collapseAvatarsTooltip
203
+ }, {
204
+ default: () => k(Ee, {
205
+ size: t.size,
206
+ shape: t.shape,
207
+ class: t.collapseClass,
208
+ style: t.collapseStyle
209
+ }, { default: () => [Z("+ "), M.length] }),
210
+ content: () => k("div", { class: l.e("collapse-avatars") }, [M.map((T, y) => qe(T) ? Xe(T, { key: T.key ?? y }) : T)])
211
+ }));
212
+ }
213
+ return k("div", { class: l.b() }, [w]);
214
+ };
94
215
  }
95
216
  });
96
- var Ge = /* @__PURE__ */ me(qe, [["__file", "avatar.vue"]]);
97
- const Xe = ve(Ge), Ze = de({
217
+ const ct = be(Ee, { AvatarGroup: Be });
218
+ Re(Be);
219
+ const dt = ke({
220
+ /**
221
+ * @description type of progress bar
222
+ */
98
223
  type: {
99
224
  type: String,
100
225
  default: "line",
101
- values: ["line", "circle", "dashboard"]
226
+ values: [
227
+ "line",
228
+ "circle",
229
+ "dashboard"
230
+ ]
102
231
  },
232
+ /**
233
+ * @description percentage, required
234
+ */
103
235
  percentage: {
104
236
  type: Number,
105
237
  default: 0,
106
- validator: (p) => p >= 0 && p <= 100
238
+ validator: (t) => t >= 0 && t <= 100
107
239
  },
240
+ /**
241
+ * @description the current status of progress bar
242
+ */
108
243
  status: {
109
244
  type: String,
110
245
  default: "",
111
- values: ["", "success", "exception", "warning"]
246
+ values: [
247
+ "",
248
+ "success",
249
+ "exception",
250
+ "warning"
251
+ ]
112
252
  },
253
+ /**
254
+ * @description set indeterminate progress
255
+ */
113
256
  indeterminate: Boolean,
257
+ /**
258
+ * @description control the animation duration of indeterminate progress or striped flow progress
259
+ */
114
260
  duration: {
115
261
  type: Number,
116
262
  default: 3
117
263
  },
264
+ /**
265
+ * @description the width of progress bar
266
+ */
118
267
  strokeWidth: {
119
268
  type: Number,
120
269
  default: 6
121
270
  },
271
+ /**
272
+ * @description butt/circle/dashboard type shape at the end path
273
+ */
122
274
  strokeLinecap: {
123
- type: ee(String),
275
+ type: I(String),
124
276
  default: "round"
125
277
  },
278
+ /**
279
+ * @description whether to place the percentage inside progress bar, only works when `type` is 'line'
280
+ */
126
281
  textInside: Boolean,
282
+ /**
283
+ * @description the canvas width of circle progress bar
284
+ */
127
285
  width: {
128
286
  type: Number,
129
287
  default: 126
130
288
  },
289
+ /**
290
+ * @description whether to show percentage
291
+ */
131
292
  showText: {
132
293
  type: Boolean,
133
294
  default: !0
134
295
  },
296
+ /**
297
+ * @description background color of progress bar. Overrides `status` prop
298
+ */
135
299
  color: {
136
- type: ee([
300
+ type: I([
137
301
  String,
138
302
  Array,
139
303
  Function
140
304
  ]),
141
305
  default: ""
142
306
  },
307
+ /**
308
+ * @description stripe over the progress bar's color
309
+ */
143
310
  striped: Boolean,
311
+ /**
312
+ * @description get the stripes to flow
313
+ */
144
314
  stripedFlow: Boolean,
315
+ /**
316
+ * @description custom text format
317
+ */
145
318
  format: {
146
- type: ee(Function),
147
- default: (p) => `${p}%`
319
+ type: I(Function),
320
+ default: (t) => `${t}%`
148
321
  }
149
- }), We = te({
150
- name: "ElProgress"
151
- }), et = /* @__PURE__ */ te({
152
- ...We,
153
- props: Ze,
154
- setup(p) {
155
- const i = p, M = {
322
+ }), ft = ["aria-valuenow"], vt = { viewBox: "0 0 100 100" }, pt = [
323
+ "d",
324
+ "stroke",
325
+ "stroke-linecap",
326
+ "stroke-width"
327
+ ], mt = [
328
+ "d",
329
+ "stroke",
330
+ "opacity",
331
+ "stroke-linecap",
332
+ "stroke-width"
333
+ ], gt = { key: 0 };
334
+ var At = /* @__PURE__ */ de({
335
+ name: "ElProgress",
336
+ __name: "progress",
337
+ props: dt,
338
+ setup(t) {
339
+ const V = {
156
340
  success: "#13ce66",
157
341
  exception: "#ff4949",
158
342
  warning: "#e6a23c",
159
343
  default: "#20a0ff"
160
- }, n = pe("progress"), _ = v(() => {
161
- const e = {
162
- width: `${i.percentage}%`,
163
- animationDuration: `${i.duration}s`
164
- }, g = b(i.percentage);
165
- return g.includes("gradient") ? e.background = g : e.backgroundColor = g, e;
166
- }), E = v(() => (i.strokeWidth / i.width * 100).toFixed(1)), R = v(() => ["circle", "dashboard"].includes(i.type) ? Number.parseInt(`${50 - Number.parseFloat(E.value) / 2}`, 10) : 0), x = v(() => {
167
- const e = R.value, g = i.type === "dashboard";
344
+ }, l = t, i = ce("progress"), w = f(() => {
345
+ const o = {
346
+ width: `${l.percentage}%`,
347
+ animationDuration: `${l.duration}s`
348
+ }, g = B(l.percentage);
349
+ return g.includes("gradient") ? o.background = g : o.backgroundColor = g, o;
350
+ }), b = f(() => (l.strokeWidth / l.width * 100).toFixed(1)), M = f(() => ["circle", "dashboard"].includes(l.type) ? Number.parseInt(`${50 - Number.parseFloat(b.value) / 2}`, 10) : 0), T = f(() => {
351
+ const o = M.value, g = l.type === "dashboard";
168
352
  return `
169
353
  M 50 50
170
- m 0 ${g ? "" : "-"}${e}
171
- a ${e} ${e} 0 1 1 0 ${g ? "-" : ""}${e * 2}
172
- a ${e} ${e} 0 1 1 0 ${g ? "" : "-"}${e * 2}
354
+ m 0 ${g ? "" : "-"}${o}
355
+ a ${o} ${o} 0 1 1 0 ${g ? "-" : ""}${o * 2}
356
+ a ${o} ${o} 0 1 1 0 ${g ? "" : "-"}${o * 2}
173
357
  `;
174
- }), h = v(() => 2 * Math.PI * R.value), u = v(() => i.type === "dashboard" ? 0.75 : 1), S = v(() => `${-1 * h.value * (1 - u.value) / 2}px`), V = v(() => ({
175
- strokeDasharray: `${h.value * u.value}px, ${h.value}px`,
176
- strokeDashoffset: S.value
177
- })), o = v(() => ({
178
- strokeDasharray: `${h.value * u.value * (i.percentage / 100)}px, ${h.value}px`,
179
- strokeDashoffset: S.value,
358
+ }), y = f(() => 2 * Math.PI * M.value), _ = f(() => l.type === "dashboard" ? 0.75 : 1), N = f(() => `${-1 * y.value * (1 - _.value) / 2}px`), Y = f(() => ({
359
+ strokeDasharray: `${y.value * _.value}px, ${y.value}px`,
360
+ strokeDashoffset: N.value
361
+ })), n = f(() => ({
362
+ strokeDasharray: `${y.value * _.value * (l.percentage / 100)}px, ${y.value}px`,
363
+ strokeDashoffset: N.value,
180
364
  transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
181
- })), F = v(() => {
182
- let e;
183
- return i.color ? e = b(i.percentage) : e = M[i.status] || M.default, e;
184
- }), B = v(() => i.status === "warning" ? Ne : i.type === "line" ? i.status === "success" ? Ue : Qe : i.status === "success" ? Fe : Pe), P = v(() => i.type === "line" ? 12 + i.strokeWidth * 0.4 : i.width * 0.111111 + 2), O = v(() => i.format(i.percentage));
185
- function G(e) {
186
- const g = 100 / e.length;
187
- return e.map((D, I) => ae(D) ? {
188
- color: D,
189
- percentage: (I + 1) * g
190
- } : D).sort((D, I) => D.percentage - I.percentage);
365
+ })), x = f(() => {
366
+ let o;
367
+ return l.color ? o = B(l.percentage) : o = V[l.status] || V.default, o;
368
+ }), S = f(() => l.status === "warning" ? Ne : l.type === "line" ? l.status === "success" ? Ue : Ie : l.status === "success" ? Fe : ze), P = f(() => l.type === "line" ? 12 + l.strokeWidth * 0.4 : l.width * 0.111111 + 2), H = f(() => l.format(l.percentage));
369
+ function W(o) {
370
+ const g = 100 / o.length;
371
+ return o.map((U, F) => ne(U) ? {
372
+ color: U,
373
+ percentage: (F + 1) * g
374
+ } : U).sort((U, F) => U.percentage - F.percentage);
191
375
  }
192
- const b = (e) => {
193
- var g;
194
- const { color: Y } = i;
195
- if (we(Y))
196
- return Y(e);
197
- if (ae(Y))
198
- return Y;
376
+ const B = (o) => {
377
+ var U;
378
+ const { color: g } = l;
379
+ if ($e(g))
380
+ return g(o);
381
+ if (ne(g))
382
+ return g;
199
383
  {
200
- const D = G(Y);
201
- for (const I of D)
202
- if (I.percentage > e)
203
- return I.color;
204
- return (g = D[D.length - 1]) == null ? void 0 : g.color;
384
+ const F = W(g);
385
+ for (const G of F)
386
+ if (G.percentage > o)
387
+ return G.color;
388
+ return (U = F[F.length - 1]) == null ? void 0 : U.color;
205
389
  }
206
390
  };
207
- return (e, g) => (l(), f("div", {
208
- class: w([
209
- a(n).b(),
210
- a(n).m(e.type),
211
- a(n).is(e.status),
391
+ return (o, g) => (r(), v("div", {
392
+ class: E([
393
+ c(i).b(),
394
+ c(i).m(t.type),
395
+ c(i).is(t.status),
212
396
  {
213
- [a(n).m("without-text")]: !e.showText,
214
- [a(n).m("text-inside")]: e.textInside
397
+ [c(i).m("without-text")]: !t.showText,
398
+ [c(i).m("text-inside")]: t.textInside
215
399
  }
216
400
  ]),
217
401
  role: "progressbar",
218
- "aria-valuenow": e.percentage,
402
+ "aria-valuenow": t.percentage,
219
403
  "aria-valuemin": "0",
220
404
  "aria-valuemax": "100"
221
- }, [
222
- e.type === "line" ? (l(), f("div", {
223
- key: 0,
224
- class: w(a(n).b("bar"))
225
- }, [
226
- d("div", {
227
- class: w(a(n).be("bar", "outer")),
228
- style: J({ height: `${e.strokeWidth}px` })
229
- }, [
230
- d("div", {
231
- class: w([
232
- a(n).be("bar", "inner"),
233
- { [a(n).bem("bar", "inner", "indeterminate")]: e.indeterminate },
234
- { [a(n).bem("bar", "inner", "striped")]: e.striped },
235
- { [a(n).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
236
- ]),
237
- style: J(a(_))
238
- }, [
239
- (e.showText || e.$slots.default) && e.textInside ? (l(), f("div", {
240
- key: 0,
241
- class: w(a(n).be("bar", "innerText"))
242
- }, [
243
- re(e.$slots, "default", { percentage: e.percentage }, () => [
244
- d("span", null, L(a(O)), 1)
245
- ])
246
- ], 2)) : Q("v-if", !0)
247
- ], 6)
248
- ], 6)
249
- ], 2)) : (l(), f("div", {
250
- key: 1,
251
- class: w(a(n).b("circle")),
252
- style: J({ height: `${e.width}px`, width: `${e.width}px` })
253
- }, [
254
- (l(), f("svg", { viewBox: "0 0 100 100" }, [
255
- d("path", {
256
- class: w(a(n).be("circle", "track")),
257
- d: a(x),
258
- stroke: `var(${a(n).cssVarName("fill-color-light")}, #e5e9f2)`,
259
- "stroke-linecap": e.strokeLinecap,
260
- "stroke-width": a(E),
261
- fill: "none",
262
- style: J(a(V))
263
- }, null, 14, ["d", "stroke", "stroke-linecap", "stroke-width"]),
264
- d("path", {
265
- class: w(a(n).be("circle", "path")),
266
- d: a(x),
267
- stroke: a(F),
268
- fill: "none",
269
- opacity: e.percentage ? 1 : 0,
270
- "stroke-linecap": e.strokeLinecap,
271
- "stroke-width": a(E),
272
- style: J(a(o))
273
- }, null, 14, ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"])
274
- ]))
275
- ], 6)),
276
- (e.showText || e.$slots.default) && !e.textInside ? (l(), f("div", {
277
- key: 2,
278
- class: w(a(n).e("text")),
279
- style: J({ fontSize: `${a(P)}px` })
280
- }, [
281
- re(e.$slots, "default", { percentage: e.percentage }, () => [
282
- e.status ? (l(), K(a(ne), { key: 1 }, {
283
- default: k(() => [
284
- (l(), K(ge(a(B))))
285
- ]),
286
- _: 1
287
- })) : (l(), f("span", { key: 0 }, L(a(O)), 1))
288
- ])
289
- ], 6)) : Q("v-if", !0)
290
- ], 10, ["aria-valuenow"]));
405
+ }, [t.type === "line" ? (r(), v("div", {
406
+ key: 0,
407
+ class: E(c(i).b("bar"))
408
+ }, [d("div", {
409
+ class: E(c(i).be("bar", "outer")),
410
+ style: L({ height: `${t.strokeWidth}px` })
411
+ }, [d("div", {
412
+ class: E([
413
+ c(i).be("bar", "inner"),
414
+ { [c(i).bem("bar", "inner", "indeterminate")]: t.indeterminate },
415
+ { [c(i).bem("bar", "inner", "striped")]: t.striped },
416
+ { [c(i).bem("bar", "inner", "striped-flow")]: t.stripedFlow }
417
+ ]),
418
+ style: L(w.value)
419
+ }, [(t.showText || o.$slots.default) && t.textInside ? (r(), v("div", {
420
+ key: 0,
421
+ class: E(c(i).be("bar", "innerText"))
422
+ }, [re(o.$slots, "default", { percentage: t.percentage }, () => [d("span", null, O(H.value), 1)])], 2)) : Q("v-if", !0)], 6)], 6)], 2)) : (r(), v("div", {
423
+ key: 1,
424
+ class: E(c(i).b("circle")),
425
+ style: L({
426
+ height: `${t.width}px`,
427
+ width: `${t.width}px`
428
+ })
429
+ }, [(r(), v("svg", vt, [d("path", {
430
+ class: E(c(i).be("circle", "track")),
431
+ d: T.value,
432
+ stroke: `var(${c(i).cssVarName("fill-color-light")}, #e5e9f2)`,
433
+ "stroke-linecap": t.strokeLinecap,
434
+ "stroke-width": b.value,
435
+ fill: "none",
436
+ style: L(Y.value)
437
+ }, null, 14, pt), d("path", {
438
+ class: E(c(i).be("circle", "path")),
439
+ d: T.value,
440
+ stroke: x.value,
441
+ fill: "none",
442
+ opacity: t.percentage ? 1 : 0,
443
+ "stroke-linecap": t.strokeLinecap,
444
+ "stroke-width": b.value,
445
+ style: L(n.value)
446
+ }, null, 14, mt)]))], 6)), (t.showText || o.$slots.default) && !t.textInside ? (r(), v("div", {
447
+ key: 2,
448
+ class: E(c(i).e("text")),
449
+ style: L({ fontSize: `${P.value}px` })
450
+ }, [re(o.$slots, "default", { percentage: t.percentage }, () => [t.status ? (r(), R(c(ie), { key: 1 }, {
451
+ default: C(() => [(r(), R(Te(S.value)))]),
452
+ _: 1
453
+ })) : (r(), v("span", gt, O(H.value), 1))])], 6)) : Q("v-if", !0)], 10, ft));
291
454
  }
292
- });
293
- var tt = /* @__PURE__ */ me(et, [["__file", "progress.vue"]]);
294
- const st = ve(tt);
295
- const at = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMaSURBVHgB7ZhdbhMxEMf/9lLRN3oDlhMQTkB6AnqDlqdSVYgaDkD6zIdTKGqLkJreoD1BywnIDdiegPBWKYmH8e4mdZbAeqlTrcT+pJX8MV57dsee8QANDQ0NDf8zAgtA608tRJEGIeYZEjOmk1dqq4cFEFwBrQ9iSHzjV68UuhIYWlVqK0FAJAJDEDtzFm9hxcS51scrCEhwBYQUj6cVQ7tk6MTpjg2udhCQoAqk5gNqOU29l2prw7Ai0wmlfIGABFXAAG2n2p/Yu8RV97qZVvb3v9xHIIIqIKV4PSnzVz+blJVSAyyIYAroj0d28bHz4h5ugSAKvNVHa7xhO9MGtnn3uNRaz5w8w2H0E4G4sQJ28ZE0x05TwovvuDIjLDsbWwyUehrMpO74CqYmQtTmg74920O49oc04J28Whwr05Pp2mfqD4fH82cRAzMeX0qIU1+H5+WJecLz3xdexC7esKfd7v/b+AJSdNTzzd1SsTKBd/pgw2NyDhPwaN7iLRwLfUVVeE+lc5dQakKZ46GsQjhlM1Lp+0Fr3Kfz9uRvv5wDuQ47ucQ4p9Q8BIcgQuIJcjkZiXWUnGYee8DxrDTm02U7sUX+OpU2ovKMRlnRLpvP92w+0SqTr3QKLS3d/YFbhUoDv+DB3E0ZzZpZv0y+dgpEEGuTMkeyl2XytVMg38RZGXxolFArBbT+bDdt7DRdlI2plQIGo7ZT7ft441opIGW0PikbI068xqAmFG9zEqMLn3G1UaBwm0v+FJYUqY0CediQQgZn3uNQA1LzcQJGgXHPd6yHAjSNeYbD4QMsADafDafa9zUfS3kwJ0R/+nU4+nyjD9JoVEbyIUemuQxulKziZMDUfDiM3kMFyhXgvCZHh+2sQq07nF3LiuRKtfTeIWV/SwxsPjRvT7JblrF34IQgBwSTPmMuW4HliDMZVM15uXjdyN7rwy67+KAJqblkyYBOlSHeyV1tb0ci/dVx4Q0xQkC4UDvPVqsOC5KdzhK2V3YfxHlTbGN5Y29Y9hG4N9MnbJyfJ4B54XxxOVNqs4uGhoaGhoaK/AINQhvhDFaFYAAAAABJRU5ErkJggg==", ot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7ZhdbtNAEMdn1wmlTzUnIJyA9ASkNwgnaCMh0aKK1uIATV4R1bbQUlVCSrhBewLCCSg3CCfAPBFoM8PsxnHcVGHX7UZYwj/JytrecXb2a+a/ACUlJSUl/zMCPKBUNxzCMAwAQwEylAA1AAr586EM5Mq4zM9IhOPy+F3ShAtEPHwVbfXgFjg78Ea9bwaBXAeC+syrGvhAwFn0cvMp5MTJAfX2VAHRLiwYROrwSLTz2Fgd2FcnG1KKLjhBMU+TmD/LFw34QUwEP4if87QaJJX4F/m95AtDCII9HtVm0pwY8N6jKGrF4EjFVkEGQk+bBHEBOOroP0KABju2N2439KPdzTW4BUqpFsj7jfGaoBBhqEe67WovrTUIGmkZr1pR9OIsirb6MO3ROxFFUYwIh2mDAvEkh7mDAxmq1aXvsAC4Eb30hjtMqZNGDtt/D4/ogFdjf3Kvp6erbSEc0OAIzydlXlvrrnaFcUDCr17mtqbUcd3NriDoxXx9Gsmmi11hHNDgiD5Pyq67UaEcuLkbdUMHm+JgdqNMfEH4vWGzKZQDGkJIdyMB2LDVL5wDCNiflIUUj231C+dAoPOtKTVb/cI5wC5YF24WazZqMlAgE1Qu8ergtTrujDgVFhWxomO+KzotB0uPGvVG1Egf0DQuzMPqAMu9cw7t9eSDzaoMmlXzIlNJiDonYLVkF7nBvjrdlZIU2CCavf9oM7FOIaOQhK0nWONK+WVe+JcB5EqRDazOIged7KyJlZ4CQu6AoL/kKFpR4ersSPD0aafiR9chOpv7CcKvetommsPKnU8lFIt9MJJzcsrAgQiXVrOy0OT3UnxK/jKOdp4/AE/ceRfSCo2Hu5V5VEtkYYZhZmuk8Ojow0PwhJdtVDtBWVko5U42jzGZ5oLwFgcE/GybUwlDKs4XjjcHbojzjKrik4dcwSkPXiPxtXSY18JkrlNlOSsRB9vbz76BJ7w6MJsOX9JoQ7073RMIB2klh+iaB++5EB8PTqMnUttcUwYcAzrgEe8OSBgeTBfzNTg+0Nq8dOO2eDlen8WkFKLSTY7Vudf1kclyL8+ZZ0lJSUlJiQt/AOgzKhZAFyVoAAAAAElFTkSuQmCC";
296
- const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-dialog-body" }, nt = { class: "avatar" }, lt = { class: "message-content" }, it = {
455
+ }), ht = At;
456
+ const yt = be(ht);
457
+ const kt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMaSURBVHgB7ZhdbhMxEMf/9lLRN3oDlhMQTkB6AnqDlqdSVYgaDkD6zIdTKGqLkJreoD1BywnIDdiegPBWKYmH8e4mdZbAeqlTrcT+pJX8MV57dsee8QANDQ0NDf8zAgtA608tRJEGIeYZEjOmk1dqq4cFEFwBrQ9iSHzjV68UuhIYWlVqK0FAJAJDEDtzFm9hxcS51scrCEhwBYQUj6cVQ7tk6MTpjg2udhCQoAqk5gNqOU29l2prw7Ai0wmlfIGABFXAAG2n2p/Yu8RV97qZVvb3v9xHIIIqIKV4PSnzVz+blJVSAyyIYAroj0d28bHz4h5ugSAKvNVHa7xhO9MGtnn3uNRaz5w8w2H0E4G4sQJ28ZE0x05TwovvuDIjLDsbWwyUehrMpO74CqYmQtTmg74920O49oc04J28Whwr05Pp2mfqD4fH82cRAzMeX0qIU1+H5+WJecLz3xdexC7esKfd7v/b+AJSdNTzzd1SsTKBd/pgw2NyDhPwaN7iLRwLfUVVeE+lc5dQakKZ46GsQjhlM1Lp+0Fr3Kfz9uRvv5wDuQ47ucQ4p9Q8BIcgQuIJcjkZiXWUnGYee8DxrDTm02U7sUX+OpU2ovKMRlnRLpvP92w+0SqTr3QKLS3d/YFbhUoDv+DB3E0ZzZpZv0y+dgpEEGuTMkeyl2XytVMg38RZGXxolFArBbT+bDdt7DRdlI2plQIGo7ZT7ft441opIGW0PikbI068xqAmFG9zEqMLn3G1UaBwm0v+FJYUqY0CediQQgZn3uNQA1LzcQJGgXHPd6yHAjSNeYbD4QMsADafDafa9zUfS3kwJ0R/+nU4+nyjD9JoVEbyIUemuQxulKziZMDUfDiM3kMFyhXgvCZHh+2sQq07nF3LiuRKtfTeIWV/SwxsPjRvT7JblrF34IQgBwSTPmMuW4HliDMZVM15uXjdyN7rwy67+KAJqblkyYBOlSHeyV1tb0ci/dVx4Q0xQkC4UDvPVqsOC5KdzhK2V3YfxHlTbGN5Y29Y9hG4N9MnbJyfJ4B54XxxOVNqs4uGhoaGhoaK/AINQhvhDFaFYAAAAABJRU5ErkJggg==", bt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7ZhdbtNAEMdn1wmlTzUnIJyA9ASkNwgnaCMh0aKK1uIATV4R1bbQUlVCSrhBewLCCSg3CCfAPBFoM8PsxnHcVGHX7UZYwj/JytrecXb2a+a/ACUlJSUl/zMCPKBUNxzCMAwAQwEylAA1AAr586EM5Mq4zM9IhOPy+F3ShAtEPHwVbfXgFjg78Ea9bwaBXAeC+syrGvhAwFn0cvMp5MTJAfX2VAHRLiwYROrwSLTz2Fgd2FcnG1KKLjhBMU+TmD/LFw34QUwEP4if87QaJJX4F/m95AtDCII9HtVm0pwY8N6jKGrF4EjFVkEGQk+bBHEBOOroP0KABju2N2439KPdzTW4BUqpFsj7jfGaoBBhqEe67WovrTUIGmkZr1pR9OIsirb6MO3ROxFFUYwIh2mDAvEkh7mDAxmq1aXvsAC4Eb30hjtMqZNGDtt/D4/ogFdjf3Kvp6erbSEc0OAIzydlXlvrrnaFcUDCr17mtqbUcd3NriDoxXx9Gsmmi11hHNDgiD5Pyq67UaEcuLkbdUMHm+JgdqNMfEH4vWGzKZQDGkJIdyMB2LDVL5wDCNiflIUUj231C+dAoPOtKTVb/cI5wC5YF24WazZqMlAgE1Qu8ergtTrujDgVFhWxomO+KzotB0uPGvVG1Egf0DQuzMPqAMu9cw7t9eSDzaoMmlXzIlNJiDonYLVkF7nBvjrdlZIU2CCavf9oM7FOIaOQhK0nWONK+WVe+JcB5EqRDazOIged7KyJlZ4CQu6AoL/kKFpR4ersSPD0aafiR9chOpv7CcKvetommsPKnU8lFIt9MJJzcsrAgQiXVrOy0OT3UnxK/jKOdp4/AE/ceRfSCo2Hu5V5VEtkYYZhZmuk8Ojow0PwhJdtVDtBWVko5U42jzGZ5oLwFgcE/GybUwlDKs4XjjcHbojzjKrik4dcwSkPXiPxtXSY18JkrlNlOSsRB9vbz76BJ7w6MJsOX9JoQ7073RMIB2klh+iaB++5EB8PTqMnUttcUwYcAzrgEe8OSBgeTBfzNTg+0Nq8dOO2eDlen8WkFKLSTY7Vudf1kclyL8+ZZ0lJSUlJiQt/AOgzKhZAFyVoAAAAAElFTkSuQmCC";
458
+ const wt = { class: "ai-dialog-body" }, St = { class: "avatar" }, Tt = { class: "message-content" }, Dt = {
297
459
  key: 0,
298
460
  style: { "font-weight": "bold", "margin-bottom": "10px" }
299
- }, ut = {
461
+ }, Ct = {
300
462
  key: 1,
301
463
  class: "node-progress"
302
- }, ct = { class: "node-status-icon" }, dt = { class: "node-name" }, ft = { class: "progress-footer" }, pt = { class: "progress-text" }, mt = ["innerHTML"], vt = {
464
+ }, Et = { class: "node-status-icon" }, Bt = { class: "node-name" }, Mt = { class: "progress-footer" }, xt = { class: "progress-text" }, Vt = ["innerHTML"], _t = {
303
465
  key: 4,
304
466
  class: "message-content-footer"
305
- }, gt = {
467
+ }, Nt = {
306
468
  key: 0,
307
469
  class: "feedback-box"
308
- }, ht = ["onClick"], At = ["onClick"], yt = { class: "input-area" }, kt = { class: "input-actions" }, wt = /* @__PURE__ */ le(() => /* @__PURE__ */ d("div", { class: "input-hint" }, [
309
- /* @__PURE__ */ d("span", null, "Enter 发送 | Ctrl + Enter 换行")
310
- ], -1)), bt = { class: "feedback-dialog-content" }, Tt = /* @__PURE__ */ le(() => /* @__PURE__ */ d("div", { class: "feedback-emoji" }, "😟", -1)), _t = /* @__PURE__ */ le(() => /* @__PURE__ */ d("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)), St = { class: "dialog-footer" }, Dt = {
470
+ }, Ut = ["onClick"], It = ["onClick"], Ft = { class: "input-area" }, zt = { class: "input-actions" }, Qt = { class: "feedback-dialog-content" }, Yt = { class: "dialog-footer" }, he = 6e4, Pt = 4e4, Jt = {
311
471
  __name: "index",
312
472
  props: {
313
473
  defaultMessage: {
@@ -319,12 +479,12 @@ const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-d
319
479
  }
320
480
  },
321
481
  emits: ["callBack"],
322
- setup(p, { expose: i, emit: M }) {
323
- const n = De("stConfig"), _ = Ce(Ve()), E = y(!1), R = M, x = p, h = y(!1), u = y(!1), S = y(!1), V = y(null), o = y([
482
+ setup(t, { expose: V, emit: l }) {
483
+ const i = Se("stConfig"), w = De(tt()), b = D(!1), M = l, T = t, y = D(!1), _ = D(!1), N = D(!1), Y = D(null), n = D([
324
484
  {
325
485
  role: "defaultMessage",
326
486
  // defaultMessage-组件内置, assistant-智能体, user-用户
327
- content: x.defaultMessage,
487
+ content: T.defaultMessage,
328
488
  fullQuery: "",
329
489
  historyList: [],
330
490
  userContent: null,
@@ -333,222 +493,211 @@ const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-d
333
493
  resTime: 0,
334
494
  firstPackageTime: 0
335
495
  }
336
- ]), F = y(null), B = y(""), P = y(!1), O = y(""), G = y({}), b = y([]), e = v(() => b.value.length), g = v(() => b.value.filter((r) => r.status === "success").length), Y = v(() => e.value ? g.value / e.value * 100 : 0), D = v(() => {
337
- const r = b.value.find((s) => s.status === "executing");
338
- return r ? r.name : "处理中";
339
- }), I = async () => {
340
- const r = B.value.trim();
341
- if (!r)
342
- return W.warning("请输入消息内容");
343
- if (h.value)
496
+ ]), x = D(null), S = D(""), P = D(!1), H = D(""), W = D({}), B = D([]), o = f(() => B.value.length), g = f(() => B.value.filter((s) => s.status === "success").length), U = f(() => o.value ? g.value / o.value * 100 : 0), F = f(() => {
497
+ const s = B.value.find((e) => e.status === "executing");
498
+ return s ? s.name : "处理中";
499
+ }), G = async () => {
500
+ const s = S.value.trim();
501
+ if (!s)
502
+ return X.warning("请输入消息内容");
503
+ if (y.value)
344
504
  return;
345
- b.value = [], S.value = !1, o.value.push({
505
+ B.value = [], N.value = !1, n.value.push({
346
506
  role: "user",
347
- content: r,
507
+ content: s,
348
508
  createTime: q().format("YYYY-MM-DD HH:mm:ss")
349
- }), B.value = "", await z(), o.value.push({
509
+ }), S.value = "", await J(), n.value.push({
350
510
  role: "assistant",
351
511
  content: "",
352
512
  fullQuery: "",
353
513
  historyList: [],
354
- userContent: r,
514
+ userContent: s,
355
515
  showFeedback: !1,
356
516
  createTime: q().format("YYYY-MM-DD HH:mm:ss"),
357
517
  resTime: 0,
358
518
  firstPackageTime: 0
359
- }), await z(), h.value = !0, u.value = !0;
360
- let s = "", t = (/* @__PURE__ */ new Date()).getTime(), N = !1;
519
+ }), await J(), y.value = !0, _.value = !0;
520
+ let e = "", a = (/* @__PURE__ */ new Date()).getTime(), A = !1;
361
521
  try {
362
- await Ie({
363
- baseUrl: n.env.VITE_BASE_URL,
364
- token: Be(),
365
- value: r,
366
- sessionId: F.value,
367
- userId: _.id,
368
- callback: (C, T) => {
369
- if (C === "session" && (F.value = T), C === "historyList") {
370
- const m = o.value[o.value.length - 1];
371
- m.historyList = T;
522
+ await at({
523
+ baseUrl: i.env.VITE_BASE_URL,
524
+ token: st(),
525
+ value: s,
526
+ sessionId: x.value,
527
+ userId: w.id,
528
+ callback: (p, h) => {
529
+ if (p === "session" && (x.value = h), p === "historyList") {
530
+ const m = n.value[n.value.length - 1];
531
+ m.historyList = h;
372
532
  }
373
- if (C === "fullQuery") {
374
- const m = o.value[o.value.length - 1];
375
- m.fullQuery = T;
533
+ if (p === "fullQuery") {
534
+ const m = n.value[n.value.length - 1];
535
+ m.fullQuery = h;
376
536
  }
377
- if (C === "node") {
378
- if (!N) {
379
- N = !0, u.value = !1;
380
- const U = o.value[o.value.length - 1];
381
- U && U.role === "assistant" && U.firstPackageTime === 0 && (U.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - t);
537
+ if (p === "node") {
538
+ if (!A) {
539
+ A = !0, _.value = !1;
540
+ const z = n.value[n.value.length - 1];
541
+ z && z.role === "assistant" && z.firstPackageTime === 0 && (z.firstPackageTime = (/* @__PURE__ */ new Date()).getTime() - a);
382
542
  }
383
- const m = b.value.find((U) => U.name === T.name);
384
- m ? m.status = T.status : b.value.push({ name: T.name, status: T.status }), z();
543
+ const m = B.value.find((z) => z.name === h.name);
544
+ m ? m.status = h.status : B.value.push({ name: h.name, status: h.status }), J();
385
545
  return;
386
546
  }
387
- if (C === "message") {
388
- s = T;
389
- const m = o.value[o.value.length - 1];
390
- m && m.role === "assistant" && (m.content = s, z());
547
+ if (p === "message") {
548
+ e = h;
549
+ const m = n.value[n.value.length - 1];
550
+ m && m.role === "assistant" && (m.content = e, J());
391
551
  }
392
- if (C === "finish") {
393
- h.value = !1, S.value = !0;
394
- const m = o.value[o.value.length - 1];
395
- m && m.role === "assistant" && (m.showFeedback = !0, m.resTime = (/* @__PURE__ */ new Date()).getTime() - t, $("default", o.value.length - 1));
552
+ if (p === "finish") {
553
+ y.value = !1, N.value = !0;
554
+ const m = n.value[n.value.length - 1];
555
+ m && m.role === "assistant" && (m.showFeedback = !0, m.resTime = (/* @__PURE__ */ new Date()).getTime() - a, $("default", n.value.length - 1));
396
556
  }
397
- if (C === "error") {
398
- u.value = !1, h.value = !1, o.value.pop(), o.value.push({
557
+ if (p === "error") {
558
+ _.value = !1, y.value = !1, n.value.pop(), n.value.push({
399
559
  role: "assistant",
400
- userContent: r,
401
- content: `❌ ${T}`,
560
+ userContent: s,
561
+ content: `❌ ${h}`,
402
562
  showFeedback: !1,
403
563
  createTime: q().format("YYYY-MM-DD HH:mm:ss"),
404
- resTime: (/* @__PURE__ */ new Date()).getTime() - t,
564
+ resTime: (/* @__PURE__ */ new Date()).getTime() - a,
405
565
  firstPackageTime: 0
406
- }), $("default", o.value.length - 1), z();
566
+ }), $("default", n.value.length - 1), J();
407
567
  return;
408
568
  }
409
569
  }
410
570
  });
411
- } catch (C) {
412
- W.error(`AI响应异常: ${C}`), o.value.pop(), o.value.push({
571
+ } catch (p) {
572
+ X.error(`AI响应异常: ${p}`), n.value.pop(), n.value.push({
413
573
  role: "assistant",
414
- userContent: r,
574
+ userContent: s,
415
575
  content: "❌ 抱歉,AI服务响应异常,请稍后重试。",
416
576
  showFeedback: !0,
417
577
  createTime: q().format("YYYY-MM-DD HH:mm:ss"),
418
- resTime: (/* @__PURE__ */ new Date()).getTime() - t,
578
+ resTime: (/* @__PURE__ */ new Date()).getTime() - a,
419
579
  firstPackageTime: 0
420
- }), $("default", o.value.length - 1), await z(), h.value = !1, u.value = !1;
580
+ }), $("default", n.value.length - 1), await J(), y.value = !1, _.value = !1;
421
581
  }
422
- }, he = (r) => {
423
- const { parsedConditions: s, ...t } = JSON.parse(r);
424
- console.log({ parsedConditions: s, webParams: t }), R("callBack", t);
425
- }, $ = async (r, s) => {
426
- switch (r) {
582
+ }, Me = (s) => {
583
+ const { parsedConditions: e, ...a } = JSON.parse(s);
584
+ console.log({ parsedConditions: e, webParams: a }), M("callBack", a);
585
+ }, te = (s) => new TextEncoder().encode(s).length, fe = (s, e) => {
586
+ const a = String(s ?? "");
587
+ if (te(a) <= e)
588
+ return a;
589
+ let A = 0, p = a.length;
590
+ for (; A < p; ) {
591
+ const h = A + p + 1 >> 1;
592
+ te(a.slice(0, h)) <= e - 20 ? A = h : p = h - 1;
593
+ }
594
+ return `${a.slice(0, A)}…[超出长度已截断]`;
595
+ }, xe = (s) => {
596
+ const e = Array.isArray(s) ? s : [], a = [];
597
+ for (let p = e.length - 1; p >= 0; p -= 1) {
598
+ const h = [e[p], ...a];
599
+ if (te(JSON.stringify(h)) > Pt)
600
+ break;
601
+ a.unshift(e[p]);
602
+ }
603
+ const A = e.length - a.length;
604
+ return JSON.stringify(A > 0 ? [{ role: "system", content: `[已省略较早的 ${A} 条会话记录]` }, ...a] : a);
605
+ }, se = (s, e = {}) => ({
606
+ userName: w.username,
607
+ userContent: s.userContent,
608
+ sessionId: x.value,
609
+ fullQuery: fe(s.fullQuery, he),
610
+ historyList: xe(s.historyList),
611
+ aiContent: fe(s.content, he),
612
+ createTime: s.createTime,
613
+ resTime: s.resTime,
614
+ firstPackageTime: s.firstPackageTime,
615
+ logOrigin: 1,
616
+ ...e
617
+ }), ae = async (s) => {
618
+ try {
619
+ return await i.request.post("/alarm/deliversign/addVarietyAiHelperLog", s), !0;
620
+ } catch (e) {
621
+ return X.error(`反馈提交失败: ${(e == null ? void 0 : e.message) || e}`), !1;
622
+ }
623
+ }, $ = async (s, e) => {
624
+ switch (s) {
427
625
  case "satisfied": {
428
- const t = o.value[s];
429
- await n.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
430
- userName: _.username,
431
- userContent: t.userContent,
432
- sessionId: F.value,
433
- fullQuery: t.fullQuery,
434
- historyList: JSON.stringify(t.historyList ?? []),
435
- aiContent: t.content,
436
- type: 1,
437
- createTime: t.createTime,
438
- resTime: t.resTime,
439
- firstPackageTime: t.firstPackageTime,
440
- isSolved: 1,
441
- logOrigin: 1
442
- }), W.success("感谢您的评价!"), o.value[s].showFeedback = !1;
626
+ const a = n.value[e];
627
+ if (!await ae(se(a, { type: 1, isSolved: 1 })))
628
+ break;
629
+ X.success("感谢您的评价!"), n.value[e].showFeedback = !1;
443
630
  break;
444
631
  }
445
632
  case "open": {
446
- G.value = s, P.value = !0;
633
+ W.value = e, P.value = !0;
447
634
  break;
448
635
  }
449
636
  case "unsatisfied": {
450
- const t = o.value[s];
451
- await n.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
452
- userName: _.username,
453
- userContent: t.userContent,
454
- sessionId: F.value,
455
- fullQuery: t.fullQuery,
456
- historyList: JSON.stringify(t.historyList ?? []),
457
- userSuggestion: O.value,
458
- aiContent: t.content,
459
- type: 2,
460
- resTime: t.resTime,
461
- createTime: t.createTime,
462
- firstPackageTime: t.firstPackageTime,
463
- isSolved: 0,
464
- logOrigin: 1
465
- }), W.success("感谢您的反馈!我们将持续跟踪并进行优化"), P.value = !1, o.value[s].showFeedback = !1;
637
+ const a = n.value[e];
638
+ if (!await ae(se(a, { type: 2, userSuggestion: H.value, isSolved: 0 })))
639
+ break;
640
+ X.success("感谢您的反馈!我们将持续跟踪并进行优化"), P.value = !1, n.value[e].showFeedback = !1;
466
641
  break;
467
642
  }
468
643
  case "default": {
469
- const t = o.value[s];
470
- console.log({
471
- userName: _.username,
472
- userContent: t.userContent,
473
- sessionId: F.value,
474
- fullQuery: t.fullQuery,
475
- historyList: JSON.stringify(t.historyList ?? []),
476
- aiContent: t.content,
477
- type: null,
478
- resTime: t.resTime,
479
- createTime: t.createTime,
480
- firstPackageTime: t.firstPackageTime,
481
- isSolved: 1,
482
- logOrigin: 1
483
- }), await n.request.post("/alarm/deliversign/addVarietyAiHelperLog", {
484
- userName: _.username,
485
- userContent: t.userContent,
486
- sessionId: F.value,
487
- fullQuery: t.fullQuery,
488
- historyList: JSON.stringify(t.historyList ?? []),
489
- aiContent: t.content,
490
- type: null,
491
- resTime: t.resTime,
492
- createTime: t.createTime,
493
- firstPackageTime: t.firstPackageTime,
494
- isSolved: 1,
495
- logOrigin: 1
496
- });
644
+ const a = n.value[e];
645
+ await ae(se(a, { type: null, isSolved: 1 }));
497
646
  }
498
647
  }
499
- }, Ae = (r) => {
500
- if (r.key === "Enter")
501
- if (r.ctrlKey) {
502
- r.preventDefault();
503
- const s = r.target, t = s.selectionStart, N = s.selectionEnd;
504
- B.value = B.value.substring(0, t) + `
505
- ` + B.value.substring(N), se(() => {
506
- s.selectionStart = s.selectionEnd = t + 1;
648
+ }, Ve = (s) => {
649
+ if (s.key === "Enter")
650
+ if (s.ctrlKey) {
651
+ s.preventDefault();
652
+ const e = s.target, a = e.selectionStart, A = e.selectionEnd;
653
+ S.value = S.value.substring(0, a) + `
654
+ ` + S.value.substring(A), le(() => {
655
+ e.selectionStart = e.selectionEnd = a + 1;
507
656
  });
508
657
  } else
509
- r.preventDefault(), I();
510
- }, z = async () => {
511
- await se(), V.value && (V.value.scrollTop = V.value.scrollHeight);
512
- }, ie = (r) => {
513
- if (typeof r != "string")
658
+ s.preventDefault(), G();
659
+ }, J = async () => {
660
+ await le(), Y.value && (Y.value.scrollTop = Y.value.scrollHeight);
661
+ }, ve = (s) => {
662
+ if (typeof s != "string")
514
663
  return !1;
515
664
  try {
516
- const s = JSON.parse(r);
517
- return s !== null && typeof s == "object";
665
+ const e = JSON.parse(s);
666
+ return e !== null && typeof e == "object";
518
667
  } catch {
519
668
  return !1;
520
669
  }
521
- }, ye = (r) => {
522
- const { parsedConditions: s } = JSON.parse(r);
523
- let t = "";
524
- return s != null && s.length && (t += '<div class="parsed-conditions">', s.forEach((N) => {
525
- t += `<div class="parsed-conditions-item">${N}</div>`;
526
- }), t += "</div>"), t;
670
+ }, _e = (s) => {
671
+ const { parsedConditions: e } = JSON.parse(s);
672
+ let a = "";
673
+ return e != null && e.length && (a += '<div class="parsed-conditions">', e.forEach((A) => {
674
+ a += `<div class="parsed-conditions-item">${A}</div>`;
675
+ }), a += "</div>"), a;
527
676
  };
528
677
  return oe(
529
- () => o.value,
678
+ () => n.value,
530
679
  () => {
531
- z();
680
+ J();
532
681
  },
533
682
  { deep: !0 }
534
683
  ), oe(
535
684
  () => P.value,
536
- (r) => {
537
- r || (O.value = "");
685
+ (s) => {
686
+ s || (H.value = "");
538
687
  }
539
- ), i({
688
+ ), V({
540
689
  open: () => {
541
- E.value = !0, se(() => {
542
- z();
690
+ b.value = !0, le(() => {
691
+ J();
543
692
  });
544
693
  }
545
- }), (r, s) => {
546
- const t = Xe, N = ne, C = st, T = Se, m = _e, U = Te, ue = be;
547
- return l(), f(X, null, [
548
- A(ue, {
694
+ }), (s, e) => {
695
+ const a = ct, A = ie, p = yt, h = ye, m = We, z = He, pe = et;
696
+ return r(), v(ee, null, [
697
+ k(pe, {
549
698
  class: "ai-dialog",
550
- modelValue: E.value,
551
- "onUpdate:modelValue": s[1] || (s[1] = (c) => E.value = c),
699
+ modelValue: b.value,
700
+ "onUpdate:modelValue": e[1] || (e[1] = (u) => b.value = u),
552
701
  title: "✨ 品种池参数解析AI助手",
553
702
  width: "500px",
554
703
  center: "",
@@ -557,138 +706,140 @@ const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-d
557
706
  modal: !1,
558
707
  "modal-penetrable": !0
559
708
  }, {
560
- default: k(() => [
561
- d("div", rt, [
709
+ default: C(() => [
710
+ d("div", wt, [
562
711
  d("div", {
563
712
  ref_key: "messageListRef",
564
- ref: V,
713
+ ref: Y,
565
714
  class: "message-list"
566
715
  }, [
567
- (l(!0), f(X, null, ce(o.value, (c, H) => (l(), f("div", {
568
- key: H,
569
- class: w([c.role, "message-item"])
716
+ (r(!0), v(ee, null, Ae(n.value, (u, K) => (r(), v("div", {
717
+ key: K,
718
+ class: E([u.role, "message-item"])
570
719
  }, [
571
- c.content || H === o.value.length - 1 && c.role === "assistant" && b.value.length > 0 ? (l(), f(X, { key: 0 }, [
572
- d("div", nt, [
573
- A(t, {
720
+ u.content || K === n.value.length - 1 && u.role === "assistant" && B.value.length > 0 ? (r(), v(ee, { key: 0 }, [
721
+ d("div", St, [
722
+ k(a, {
574
723
  size: 32,
575
- icon: c.role === "user" ? a(Ye) : a(ze)
724
+ icon: u.role === "user" ? c(Qe) : c(Ye)
576
725
  }, null, 8, ["icon"])
577
726
  ]),
578
- d("div", lt, [
579
- c.fullQuery ? (l(), f("div", it, " 筛选结果: " + L(c.fullQuery), 1)) : Q("", !0),
580
- H === o.value.length - 1 && c.role === "assistant" && b.value.length > 0 && !S.value ? (l(), f("div", ut, [
581
- (l(!0), f(X, null, ce(b.value, (j) => (l(), f("div", {
727
+ d("div", Tt, [
728
+ u.fullQuery ? (r(), v("div", Dt, " 筛选结果: " + O(u.fullQuery), 1)) : Q("", !0),
729
+ K === n.value.length - 1 && u.role === "assistant" && B.value.length > 0 && !N.value ? (r(), v("div", Ct, [
730
+ (r(!0), v(ee, null, Ae(B.value, (j) => (r(), v("div", {
582
731
  key: j.name,
583
732
  class: "node-progress-item"
584
733
  }, [
585
- d("span", ct, [
586
- j.status === "success" ? (l(), K(N, {
734
+ d("span", Et, [
735
+ j.status === "success" ? (r(), R(A, {
587
736
  key: 0,
588
737
  class: "node-icon done"
589
738
  }, {
590
- default: k(() => [
591
- A(a(Je))
739
+ default: C(() => [
740
+ k(c(Pe))
592
741
  ]),
593
742
  _: 1
594
- })) : (l(), K(N, {
743
+ })) : (r(), R(A, {
595
744
  key: 1,
596
745
  class: "node-icon running"
597
746
  }, {
598
- default: k(() => [
599
- A(a(Le))
747
+ default: C(() => [
748
+ k(c(Je))
600
749
  ]),
601
750
  _: 1
602
751
  }))
603
752
  ]),
604
- d("span", dt, L(j.name), 1)
753
+ d("span", Bt, O(j.name), 1)
605
754
  ]))), 128)),
606
- d("div", ft, [
607
- A(C, {
608
- percentage: Y.value,
755
+ d("div", Mt, [
756
+ k(p, {
757
+ percentage: U.value,
609
758
  "show-text": !1,
610
759
  "stroke-width": 4,
611
760
  color: "#667eea"
612
761
  }, null, 8, ["percentage"]),
613
- d("span", pt, "第 " + L(g.value) + "/" + L(e.value) + " 步 · " + L(D.value), 1)
762
+ d("span", xt, "第 " + O(g.value) + "/" + O(o.value) + " 步 · " + O(F.value), 1)
614
763
  ])
615
764
  ])) : Q("", !0),
616
- ie(c.content) ? (l(), f("div", {
765
+ ve(u.content) ? (r(), v("div", {
617
766
  key: 2,
618
- class: w(["message-content-json", { "result-animation": H === o.value.length - 1 && S.value }]),
619
- innerHTML: ye(c.content)
620
- }, null, 10, mt)) : c.content ? (l(), f("div", {
767
+ class: E(["message-content-json", { "result-animation": K === n.value.length - 1 && N.value }]),
768
+ innerHTML: _e(u.content)
769
+ }, null, 10, Vt)) : u.content ? (r(), v("div", {
621
770
  key: 3,
622
- class: w(["message-content-text", { "result-animation": H === o.value.length - 1 && S.value }])
623
- }, L(c.content), 3)) : Q("", !0),
624
- c.role === "assistant" ? (l(), f("div", vt, [
625
- c.showFeedback ? (l(), f("div", gt, [
626
- A(T, {
771
+ class: E(["message-content-text", { "result-animation": K === n.value.length - 1 && N.value }])
772
+ }, O(u.content), 3)) : Q("", !0),
773
+ u.role === "assistant" ? (r(), v("div", _t, [
774
+ u.showFeedback ? (r(), v("div", Nt, [
775
+ k(h, {
627
776
  content: "满意",
628
777
  placement: "bottom"
629
778
  }, {
630
- default: k(() => [
779
+ default: C(() => [
631
780
  d("img", {
632
- src: at,
781
+ src: kt,
633
782
  alt: "满意",
634
- onClick: (j) => $("satisfied", H)
635
- }, null, 8, ht)
783
+ onClick: (j) => $("satisfied", K)
784
+ }, null, 8, Ut)
636
785
  ]),
637
786
  _: 2
638
787
  }, 1024),
639
- A(T, {
788
+ k(h, {
640
789
  content: "满意",
641
790
  placement: "bottom"
642
791
  }, {
643
- default: k(() => [
792
+ default: C(() => [
644
793
  d("img", {
645
- src: ot,
794
+ src: bt,
646
795
  alt: "不满意",
647
- onClick: (j) => $("open", H)
648
- }, null, 8, At)
796
+ onClick: (j) => $("open", K)
797
+ }, null, 8, It)
649
798
  ]),
650
799
  _: 2
651
800
  }, 1024)
652
801
  ])) : Q("", !0),
653
- ie(c.content) ? (l(), K(m, {
802
+ ve(u.content) ? (r(), R(m, {
654
803
  key: 1,
655
804
  class: "confirm-btn",
656
- onClick: (j) => he(c.content)
805
+ onClick: (j) => Me(u.content)
657
806
  }, {
658
- default: k(() => [
659
- Z(" 确认查询 ")
660
- ]),
661
- _: 2
662
- }, 1032, ["onClick"])) : Q("", !0)
807
+ default: C(() => [...e[6] || (e[6] = [
808
+ Z(" 确认查询 ", -1)
809
+ ])]),
810
+ _: 1
811
+ }, 8, ["onClick"])) : Q("", !0)
663
812
  ])) : Q("", !0)
664
813
  ])
665
814
  ], 64)) : Q("", !0)
666
815
  ], 2))), 128))
667
816
  ], 512),
668
- d("div", yt, [
669
- A(U, {
817
+ d("div", Ft, [
818
+ k(z, {
670
819
  class: "message-input",
671
- modelValue: B.value,
672
- "onUpdate:modelValue": s[0] || (s[0] = (c) => B.value = c),
820
+ modelValue: S.value,
821
+ "onUpdate:modelValue": e[0] || (e[0] = (u) => S.value = u),
673
822
  type: "textarea",
674
823
  rows: 4,
675
824
  autosize: { minRows: 2, maxRows: 4 },
676
825
  placeholder: "输入您想查询的品种条件...",
677
- onKeydown: Ae
826
+ onKeydown: Ve
678
827
  }, null, 8, ["modelValue"]),
679
- d("div", kt, [
680
- wt,
681
- A(m, {
828
+ d("div", zt, [
829
+ e[8] || (e[8] = d("div", { class: "input-hint" }, [
830
+ d("span", null, "Enter 发送 | Ctrl + Enter 换行")
831
+ ], -1)),
832
+ k(m, {
682
833
  class: "send-btn",
683
834
  type: "primary",
684
- icon: a(Oe),
685
- loading: h.value,
686
- onClick: I,
835
+ icon: c(Le),
836
+ loading: y.value,
837
+ onClick: G,
687
838
  round: ""
688
839
  }, {
689
- default: k(() => [
690
- Z(" 发送 ")
691
- ]),
840
+ default: C(() => [...e[7] || (e[7] = [
841
+ Z(" 发送 ", -1)
842
+ ])]),
692
843
  _: 1
693
844
  }, 8, ["icon", "loading"])
694
845
  ])
@@ -697,40 +848,40 @@ const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-d
697
848
  ]),
698
849
  _: 1
699
850
  }, 8, ["modelValue"]),
700
- A(ue, {
851
+ k(pe, {
701
852
  modelValue: P.value,
702
- "onUpdate:modelValue": s[5] || (s[5] = (c) => P.value = c),
853
+ "onUpdate:modelValue": e[5] || (e[5] = (u) => P.value = u),
703
854
  title: "📝 反馈意见",
704
855
  width: "400px"
705
856
  }, {
706
- footer: k(() => [
707
- d("span", St, [
708
- A(m, {
709
- onClick: s[3] || (s[3] = (c) => P.value = !1)
857
+ footer: C(() => [
858
+ d("span", Yt, [
859
+ k(m, {
860
+ onClick: e[3] || (e[3] = (u) => P.value = !1)
710
861
  }, {
711
- default: k(() => [
712
- Z("取消")
713
- ]),
862
+ default: C(() => [...e[11] || (e[11] = [
863
+ Z("取消", -1)
864
+ ])]),
714
865
  _: 1
715
866
  }),
716
- A(m, {
867
+ k(m, {
717
868
  type: "primary",
718
- onClick: s[4] || (s[4] = (c) => $("unsatisfied", G.value))
869
+ onClick: e[4] || (e[4] = (u) => $("unsatisfied", W.value))
719
870
  }, {
720
- default: k(() => [
721
- Z("提交反馈")
722
- ]),
871
+ default: C(() => [...e[12] || (e[12] = [
872
+ Z("提交反馈", -1)
873
+ ])]),
723
874
  _: 1
724
875
  })
725
876
  ])
726
877
  ]),
727
- default: k(() => [
728
- d("div", bt, [
729
- Tt,
730
- _t,
731
- A(U, {
732
- modelValue: O.value,
733
- "onUpdate:modelValue": s[2] || (s[2] = (c) => O.value = c),
878
+ default: C(() => [
879
+ d("div", Qt, [
880
+ e[9] || (e[9] = d("div", { class: "feedback-emoji" }, "😟", -1)),
881
+ e[10] || (e[10] = d("p", { class: "feedback-tip" }, "很抱歉没能帮到您,请告诉我们哪里需要改进:", -1)),
882
+ k(z, {
883
+ modelValue: H.value,
884
+ "onUpdate:modelValue": e[2] || (e[2] = (u) => H.value = u),
734
885
  type: "textarea",
735
886
  rows: 4,
736
887
  placeholder: "[非必填]例如:回答不够准确、查询结果有误、界面体验不佳..."
@@ -742,11 +893,11 @@ const le = (p) => (Me("data-v-7e3d6eda"), p = p(), Ee(), p), rt = { class: "ai-d
742
893
  ], 64);
743
894
  };
744
895
  }
745
- }, Ct = /* @__PURE__ */ He(Dt, [["__scopeId", "data-v-7e3d6eda"]]), es = {
746
- install(p) {
747
- p.component("st-varietyAiHelper", Ct);
896
+ }, Lt = /* @__PURE__ */ lt(Jt, [["__scopeId", "data-v-4edbe8e8"]]), gs = {
897
+ install(t) {
898
+ t.component("st-varietyAiHelper", Lt);
748
899
  }
749
900
  };
750
901
  export {
751
- es as default
902
+ gs as default
752
903
  };