@das-fed/ui 6.4.0-dev.9 → 6.4.0-hot.1

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 (241) hide show
  1. package/package.json +8 -6
  2. package/packages/business-components/app-container/index.js +46 -252
  3. package/packages/business-components/app-container/index.js.gz +0 -0
  4. package/packages/business-components/app-container/style.css +1 -1
  5. package/packages/business-components/app-container/style.css.gz +0 -0
  6. package/packages/business-components/change-enterprises/index.js +89 -295
  7. package/packages/business-components/change-enterprises/index.js.gz +0 -0
  8. package/packages/business-components/change-enterprises/style.css +1 -1
  9. package/packages/business-components/change-enterprises/style.css.gz +0 -0
  10. package/packages/business-components/device-panel/index.js +24047 -29070
  11. package/packages/business-components/device-panel/index.js.gz +0 -0
  12. package/packages/business-components/device-panel/style.css +1 -1
  13. package/packages/business-components/device-panel/style.css.gz +0 -0
  14. package/packages/business-components/export-button/index.js +152 -432
  15. package/packages/business-components/export-button/index.js.gz +0 -0
  16. package/packages/business-components/import-button/index.js +323 -603
  17. package/packages/business-components/import-button/index.js.gz +0 -0
  18. package/packages/business-components/process-form/index.js +788 -1276
  19. package/packages/business-components/process-form/index.js.gz +0 -0
  20. package/packages/business-components/process-form/style.css +1 -1
  21. package/packages/business-components/process-log/ProcessLogItem.vue.d.ts +1 -1
  22. package/packages/business-components/process-log/index.d.ts +21 -21
  23. package/packages/business-components/process-log/index.js +329 -3948
  24. package/packages/business-components/process-log/index.js.gz +0 -0
  25. package/packages/business-components/process-search-form/index.js +439 -719
  26. package/packages/business-components/process-search-form/index.js.gz +0 -0
  27. package/packages/business-components/process-table/index.js +538 -819
  28. package/packages/business-components/process-table/index.js.gz +0 -0
  29. package/packages/business-components/urgent-panel/index.js +1587 -2700
  30. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  31. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/apis.d.ts +1 -0
  32. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/Track.vue.d.ts +2 -2
  33. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/components/use-schedule-track/track.d.ts +1 -1
  34. package/packages/business-components/urgent-panel/style.css +1 -1
  35. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  36. package/packages/business-components/video-dialog/index.js +338 -619
  37. package/packages/business-components/video-dialog/index.js.gz +0 -0
  38. package/packages/components/alert/index.js +52 -3418
  39. package/packages/components/alert/index.js.gz +0 -0
  40. package/packages/components/alert/style.css +1 -1
  41. package/packages/components/alert/style.css.gz +0 -0
  42. package/packages/components/autocomplete/index.js +456 -2872
  43. package/packages/components/autocomplete/index.js.gz +0 -0
  44. package/packages/components/autocomplete/style.css +1 -1
  45. package/packages/components/autocomplete/style.css.gz +0 -0
  46. package/packages/components/breadcrumb/index.js +47 -269
  47. package/packages/components/breadcrumb/index.js.gz +0 -0
  48. package/packages/components/breadcrumb/style.css +1 -1
  49. package/packages/components/breadcrumb/style.css.gz +0 -0
  50. package/packages/components/button/index.js +215 -9801
  51. package/packages/components/button/index.js.gz +0 -0
  52. package/packages/components/button/style.css +1 -1
  53. package/packages/components/button/style.css.gz +0 -0
  54. package/packages/components/calendar/index.js +257 -614
  55. package/packages/components/calendar/index.js.gz +0 -0
  56. package/packages/components/cascader/index.js +139 -6397
  57. package/packages/components/cascader/index.js.gz +0 -0
  58. package/packages/components/cascader/style.css +1 -1
  59. package/packages/components/cascader/style.css.gz +0 -0
  60. package/packages/components/checkbox/index.js +180 -3837
  61. package/packages/components/checkbox/index.js.gz +0 -0
  62. package/packages/components/checkbox/style.css +1 -1
  63. package/packages/components/checkbox/style.css.gz +0 -0
  64. package/packages/components/collapse-panel/index.js +31 -3624
  65. package/packages/components/collapse-panel/index.js.gz +0 -0
  66. package/packages/components/collapse-panel/style.css +1 -1
  67. package/packages/components/collapse-panel/style.css.gz +0 -0
  68. package/packages/components/collaspe/index.js +31 -3624
  69. package/packages/components/collaspe/index.js.gz +0 -0
  70. package/packages/components/collaspe/style.css +1 -1
  71. package/packages/components/color-picker/index.js +106 -5342
  72. package/packages/components/color-picker/index.js.gz +0 -0
  73. package/packages/components/color-picker/style.css +1 -1
  74. package/packages/components/color-picker/style.css.gz +0 -0
  75. package/packages/components/date-picker/index.js +539 -14894
  76. package/packages/components/date-picker/index.js.gz +0 -0
  77. package/packages/components/date-picker/style.css +1 -1
  78. package/packages/components/date-picker/style.css.gz +0 -0
  79. package/packages/components/dialog/index.js +186 -1832
  80. package/packages/components/dialog/index.js.gz +0 -0
  81. package/packages/components/dialog/style.css +1 -1
  82. package/packages/components/dialog/style.css.gz +0 -0
  83. package/packages/components/drawer/index.js +38 -1611
  84. package/packages/components/drawer/index.js.gz +0 -0
  85. package/packages/components/drawer/style.css +1 -1
  86. package/packages/components/dropdown/index.js +54 -4607
  87. package/packages/components/dropdown/index.js.gz +0 -0
  88. package/packages/components/dropdown/style.css +1 -1
  89. package/packages/components/dropdown/style.css.gz +0 -0
  90. package/packages/components/empty/index.js +39 -800
  91. package/packages/components/empty/index.js.gz +0 -0
  92. package/packages/components/image-preview/index.js +34 -1282
  93. package/packages/components/image-preview/index.js.gz +0 -0
  94. package/packages/components/image-upload/index.js +112 -11722
  95. package/packages/components/image-upload/index.js.gz +0 -0
  96. package/packages/components/image-upload/style.css +1 -1
  97. package/packages/components/image-upload/style.css.gz +0 -0
  98. package/packages/components/image-viewer/index.d.ts +9 -0
  99. package/packages/components/image-viewer/index.js +389 -13162
  100. package/packages/components/image-viewer/index.js.gz +0 -0
  101. package/packages/components/image-viewer/src/Index.vue.d.ts +3 -0
  102. package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +2 -1
  103. package/packages/components/image-viewer/src/type.d.ts +3 -0
  104. package/packages/components/image-viewer/style.css +1 -1
  105. package/packages/components/image-viewer/style.css.gz +0 -0
  106. package/packages/components/input/index.js +157 -1084
  107. package/packages/components/input/index.js.gz +0 -0
  108. package/packages/components/input/style.css +1 -1
  109. package/packages/components/input/style.css.gz +0 -0
  110. package/packages/components/input-dialog-select/index.js +2 -2
  111. package/packages/components/input-dialog-select/index.js.gz +0 -0
  112. package/packages/components/input-dialog-select/style.css +1 -1
  113. package/packages/components/input-dialog-select/style.css.gz +0 -0
  114. package/packages/components/input-number/index.js +145 -1828
  115. package/packages/components/input-number/index.js.gz +0 -0
  116. package/packages/components/input-number/style.css +1 -1
  117. package/packages/components/input-number/style.css.gz +0 -0
  118. package/packages/components/live-player/index.js +2883 -3667
  119. package/packages/components/live-player/index.js.gz +0 -0
  120. package/packages/components/live-player/style.css +1 -1
  121. package/packages/components/map/index.js +1189 -5207
  122. package/packages/components/map/index.js.gz +0 -0
  123. package/packages/components/map/style.css +1 -1
  124. package/packages/components/menu-aside/index.js +610 -8303
  125. package/packages/components/menu-aside/index.js.gz +0 -0
  126. package/packages/components/menu-aside/style.css +1 -1
  127. package/packages/components/menu-aside/style.css.gz +0 -0
  128. package/packages/components/menu-header/index.js +39 -10077
  129. package/packages/components/menu-header/index.js.gz +0 -0
  130. package/packages/components/menu-header/style.css +1 -1
  131. package/packages/components/menu-header/style.css.gz +0 -0
  132. package/packages/components/message/index.js +53 -1286
  133. package/packages/components/message/index.js.gz +0 -0
  134. package/packages/components/message/style.css +1 -1
  135. package/packages/components/message/style.css.gz +0 -0
  136. package/packages/components/notification/index.js +48 -3269
  137. package/packages/components/notification/index.js.gz +0 -0
  138. package/packages/components/notification/style.css +1 -1
  139. package/packages/components/notification/style.css.gz +0 -0
  140. package/packages/components/pagination/index.js +153 -8015
  141. package/packages/components/pagination/index.js.gz +0 -0
  142. package/packages/components/pagination/style.css +1 -1
  143. package/packages/components/pagination/style.css.gz +0 -0
  144. package/packages/components/popover/index.js +44 -2492
  145. package/packages/components/popover/index.js.gz +0 -0
  146. package/packages/components/popover/style.css +1 -1
  147. package/packages/components/popover/style.css.gz +0 -0
  148. package/packages/components/progress/index.js +107 -514
  149. package/packages/components/progress/index.js.gz +0 -0
  150. package/packages/components/progress/style.css +1 -1
  151. package/packages/components/progress/style.css.gz +0 -0
  152. package/packages/components/radio/index.js +160 -3724
  153. package/packages/components/radio/index.js.gz +0 -0
  154. package/packages/components/radio/style.css +1 -1
  155. package/packages/components/radio/style.css.gz +0 -0
  156. package/packages/components/scrollbar/index.js +915 -1440
  157. package/packages/components/scrollbar/index.js.gz +0 -0
  158. package/packages/components/scrollbar/style.css +9 -9
  159. package/packages/components/scrollbar/style.css.gz +0 -0
  160. package/packages/components/search/index.js +90 -5261
  161. package/packages/components/search/index.js.gz +0 -0
  162. package/packages/components/search/style.css +1 -1
  163. package/packages/components/search/style.css.gz +0 -0
  164. package/packages/components/search-form/index.js +920 -1008
  165. package/packages/components/search-form/index.js.gz +0 -0
  166. package/packages/components/select/index.js +380 -10505
  167. package/packages/components/select/index.js.gz +0 -0
  168. package/packages/components/select/style.css +1 -1
  169. package/packages/components/select/style.css.gz +0 -0
  170. package/packages/components/select-list/index.js +1173 -1431
  171. package/packages/components/select-list/index.js.gz +0 -0
  172. package/packages/components/select-list/style.css +1 -1
  173. package/packages/components/select-list/style.css.gz +0 -0
  174. package/packages/components/special-range-picker-month/index.js +196 -2645
  175. package/packages/components/special-range-picker-month/index.js.gz +0 -0
  176. package/packages/components/special-range-picker-year/index.js +259 -2707
  177. package/packages/components/special-range-picker-year/index.js.gz +0 -0
  178. package/packages/components/special-range-picker-year/style.css +1 -1
  179. package/packages/components/special-range-picker-year/style.css.gz +0 -0
  180. package/packages/components/spin/index.js +49 -3534
  181. package/packages/components/spin/index.js.gz +0 -0
  182. package/packages/components/spin/style.css +1 -1
  183. package/packages/components/spin/style.css.gz +0 -0
  184. package/packages/components/step/index.js +29 -4085
  185. package/packages/components/step/index.js.gz +0 -0
  186. package/packages/components/step/style.css +1 -1
  187. package/packages/components/steps/index.js +15 -4070
  188. package/packages/components/steps/style.css +1 -1
  189. package/packages/components/steps/style.css.gz +0 -0
  190. package/packages/components/switch/index.js +31 -545
  191. package/packages/components/switch/index.js.gz +0 -0
  192. package/packages/components/switch/style.css +1 -1
  193. package/packages/components/switch/style.css.gz +0 -0
  194. package/packages/components/table/index.js +6287 -18573
  195. package/packages/components/table/index.js.gz +0 -0
  196. package/packages/components/table/src/Table.vue.d.ts +2 -2
  197. package/packages/components/table/style.css +1 -1
  198. package/packages/components/table/style.css.gz +0 -0
  199. package/packages/components/tabs/index.js +173 -12627
  200. package/packages/components/tabs/index.js.gz +0 -0
  201. package/packages/components/tabs/style.css +1 -1
  202. package/packages/components/tabs/style.css.gz +0 -0
  203. package/packages/components/tag/index.js +55 -323
  204. package/packages/components/tag/index.js.gz +0 -0
  205. package/packages/components/tag/style.css +1 -1
  206. package/packages/components/tag/style.css.gz +0 -0
  207. package/packages/components/time-line/index.js +61 -3397
  208. package/packages/components/time-line/index.js.gz +0 -0
  209. package/packages/components/time-line/style.css +1 -1
  210. package/packages/components/time-line/style.css.gz +0 -0
  211. package/packages/components/tooltip/index.js +65 -2171
  212. package/packages/components/tooltip/index.js.gz +0 -0
  213. package/packages/components/tooltip/style.css +1 -1
  214. package/packages/components/tooltip/style.css.gz +0 -0
  215. package/packages/components/tree/index.js +1887 -6747
  216. package/packages/components/tree/index.js.gz +0 -0
  217. package/packages/components/tree/style.css +1 -1
  218. package/packages/components/tree/style.css.gz +0 -0
  219. package/packages/components/tree-select/index.js +358 -2776
  220. package/packages/components/tree-select/index.js.gz +0 -0
  221. package/packages/components/tree-select/style.css +1 -1
  222. package/packages/components/tree-select/style.css.gz +0 -0
  223. package/packages/components/upload/index.js +116 -11726
  224. package/packages/components/upload/index.js.gz +0 -0
  225. package/packages/components/upload/style.css +1 -1
  226. package/packages/components/upload/style.css.gz +0 -0
  227. package/packages/components/virtual-tree/index.js +86 -2923
  228. package/packages/components/virtual-tree/index.js.gz +0 -0
  229. package/packages/components/virtual-tree/style.css +1 -1
  230. package/packages/components/virtual-tree/style.css.gz +0 -0
  231. package/packages/components/watermark/index.js +17 -368
  232. package/packages/business-components/process-form/style.css.gz +0 -0
  233. package/packages/components/collaspe/style.css.gz +0 -0
  234. package/packages/components/drawer/style.css.gz +0 -0
  235. package/packages/components/image-preview/style.css +0 -1
  236. package/packages/components/image-preview/style.css.gz +0 -0
  237. package/packages/components/live-player/style.css.gz +0 -0
  238. package/packages/components/map/style.css.gz +0 -0
  239. package/packages/components/step/style.css.gz +0 -0
  240. package/packages/components/steps/index.js.gz +0 -0
  241. package/packages/components/watermark/index.js.gz +0 -0
@@ -1,2118 +1,12 @@
1
1
  import '@das-fed/ui/packages/components/tooltip/style.css';
2
- import { getCurrentScope as fo, onScopeDispose as po, unref as v, watch as L, warn as vo, getCurrentInstance as et, inject as ee, ref as R, computed as P, onMounted as ie, shallowRef as mo, onBeforeUnmount as le, onBeforeMount as Tn, provide as Ee, defineComponent as B, renderSlot as G, openBlock as D, createElementBlock as oe, normalizeClass as Je, normalizeStyle as Cn, withDirectives as yt, cloneVNode as go, Fragment as Pn, Text as ho, Comment as yo, createVNode as ke, createBlock as ge, mergeProps as tt, withCtx as J, createCommentVNode as he, nextTick as Ut, toRef as Ae, Teleport as bo, Transition as wo, vShow as Eo, readonly as Oo, onDeactivated as To, toDisplayString as pt, useCssVars as Co, createTextVNode as Po } from "vue";
3
- import { setThemeRule as Io } from "@das-fed/web/packages/theme/index";
4
- import { withInstall as _o } from "@das-fed/utils/with-install/index";
5
- import { vScrollbar as xo } from "@das-fed/ui/packages/components/scrollbar/index";
2
+ import { defineComponent as D, useCssVars as E, ref as u, computed as f, onMounted as L, onBeforeMount as _, openBlock as s, createBlock as N, unref as C, mergeProps as P, withCtx as x, withDirectives as V, createElementBlock as n, normalizeClass as b, renderSlot as k, Fragment as W, createTextVNode as q, toDisplayString as M, createCommentVNode as $, normalizeStyle as z } from "vue";
3
+ import { setThemeRule as F } from "@das-fed/web/packages/theme/index";
4
+ import { withInstall as I } from "@das-fed/utils/with-install/index";
5
+ import { vScrollbar as X } from "@das-fed/ui/packages/components/scrollbar/index";
6
+ import { ElTooltip as Y } from "element-plus";
7
+ import "element-plus/es/components/tooltip/style/css";
6
8
  import "@das-fed/ui/packages/global/theme";
7
- const ne = (e, t, { checkForDefaultPrevented: n = !0 } = {}) => (r) => {
8
- const s = e == null ? void 0 : e(r);
9
- if (n === !1 || !s)
10
- return t == null ? void 0 : t(r);
11
- };
12
- var qt;
13
- const Q = typeof window < "u", Ro = (e) => typeof e == "string", In = () => {
14
- }, Ao = Q && ((qt = window == null ? void 0 : window.navigator) == null ? void 0 : qt.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
15
- function _n(e) {
16
- return typeof e == "function" ? e() : v(e);
17
- }
18
- function So(e) {
19
- return e;
20
- }
21
- function xn(e) {
22
- return fo() ? (po(e), !0) : !1;
23
- }
24
- function ve(e) {
25
- var t;
26
- const n = _n(e);
27
- return (t = n == null ? void 0 : n.$el) != null ? t : n;
28
- }
29
- const Rn = Q ? window : void 0;
30
- function it(...e) {
31
- let t, n, o, r;
32
- if (Ro(e[0]) || Array.isArray(e[0]) ? ([n, o, r] = e, t = Rn) : [t, n, o, r] = e, !t)
33
- return In;
34
- Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
35
- const s = [], a = () => {
36
- s.forEach((d) => d()), s.length = 0;
37
- }, c = (d, h, m, g) => (d.addEventListener(h, m, g), () => d.removeEventListener(h, m, g)), l = L(() => [ve(t), _n(r)], ([d, h]) => {
38
- a(), d && s.push(...n.flatMap((m) => o.map((g) => c(d, m, g, h))));
39
- }, { immediate: !0, flush: "post" }), u = () => {
40
- l(), a();
41
- };
42
- return xn(u), u;
43
- }
44
- let zt = !1;
45
- function Fo(e, t, n = {}) {
46
- const { window: o = Rn, ignore: r = [], capture: s = !0, detectIframe: a = !1 } = n;
47
- if (!o)
48
- return;
49
- Ao && !zt && (zt = !0, Array.from(o.document.body.children).forEach((m) => m.addEventListener("click", In)));
50
- let c = !0;
51
- const l = (m) => r.some((g) => {
52
- if (typeof g == "string")
53
- return Array.from(o.document.querySelectorAll(g)).some((i) => i === m.target || m.composedPath().includes(i));
54
- {
55
- const i = ve(g);
56
- return i && (m.target === i || m.composedPath().includes(i));
57
- }
58
- }), d = [
59
- it(o, "click", (m) => {
60
- const g = ve(e);
61
- if (!(!g || g === m.target || m.composedPath().includes(g))) {
62
- if (m.detail === 0 && (c = !l(m)), !c) {
63
- c = !0;
64
- return;
65
- }
66
- t(m);
67
- }
68
- }, { passive: !0, capture: s }),
69
- it(o, "pointerdown", (m) => {
70
- const g = ve(e);
71
- g && (c = !m.composedPath().includes(g) && !l(m));
72
- }, { passive: !0 }),
73
- a && it(o, "blur", (m) => {
74
- var g;
75
- const i = ve(e);
76
- ((g = o.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(i != null && i.contains(o.document.activeElement)) && t(m);
77
- })
78
- ].filter(Boolean);
79
- return () => d.forEach((m) => m());
80
- }
81
- const Zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Jt = "__vueuse_ssr_handlers__";
82
- Zt[Jt] = Zt[Jt] || {};
83
- var Qt;
84
- (function(e) {
85
- e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
86
- })(Qt || (Qt = {}));
87
- var ko = Object.defineProperty, Yt = Object.getOwnPropertySymbols, No = Object.prototype.hasOwnProperty, $o = Object.prototype.propertyIsEnumerable, Gt = (e, t, n) => t in e ? ko(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Lo = (e, t) => {
88
- for (var n in t || (t = {}))
89
- No.call(t, n) && Gt(e, n, t[n]);
90
- if (Yt)
91
- for (var n of Yt(t))
92
- $o.call(t, n) && Gt(e, n, t[n]);
93
- return e;
94
- };
95
- const Bo = {
96
- easeInSine: [0.12, 0, 0.39, 0],
97
- easeOutSine: [0.61, 1, 0.88, 1],
98
- easeInOutSine: [0.37, 0, 0.63, 1],
99
- easeInQuad: [0.11, 0, 0.5, 0],
100
- easeOutQuad: [0.5, 1, 0.89, 1],
101
- easeInOutQuad: [0.45, 0, 0.55, 1],
102
- easeInCubic: [0.32, 0, 0.67, 0],
103
- easeOutCubic: [0.33, 1, 0.68, 1],
104
- easeInOutCubic: [0.65, 0, 0.35, 1],
105
- easeInQuart: [0.5, 0, 0.75, 0],
106
- easeOutQuart: [0.25, 1, 0.5, 1],
107
- easeInOutQuart: [0.76, 0, 0.24, 1],
108
- easeInQuint: [0.64, 0, 0.78, 0],
109
- easeOutQuint: [0.22, 1, 0.36, 1],
110
- easeInOutQuint: [0.83, 0, 0.17, 1],
111
- easeInExpo: [0.7, 0, 0.84, 0],
112
- easeOutExpo: [0.16, 1, 0.3, 1],
113
- easeInOutExpo: [0.87, 0, 0.13, 1],
114
- easeInCirc: [0.55, 0, 1, 0.45],
115
- easeOutCirc: [0, 0.55, 0.45, 1],
116
- easeInOutCirc: [0.85, 0, 0.15, 1],
117
- easeInBack: [0.36, 0, 0.66, -0.56],
118
- easeOutBack: [0.34, 1.56, 0.64, 1],
119
- easeInOutBack: [0.68, -0.6, 0.32, 1.6]
120
- };
121
- Lo({
122
- linear: So
123
- }, Bo);
124
- /**
125
- * @vue/shared v3.4.35
126
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
127
- * @license MIT
128
- **/
129
- process.env.NODE_ENV !== "production" && Object.freeze({});
130
- process.env.NODE_ENV !== "production" && Object.freeze([]);
131
- const dt = () => {
132
- }, Mo = Object.prototype.hasOwnProperty, Xt = (e, t) => Mo.call(e, t), Do = Array.isArray, Ve = (e) => typeof e == "function", An = (e) => typeof e == "string", bt = (e) => e !== null && typeof e == "object";
133
- function vt(e) {
134
- for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
135
- var r = e[t];
136
- o[r[0]] = r[1];
137
- }
138
- return o;
139
- }
140
- function wt(e) {
141
- return e == null;
142
- }
143
- function jo(e) {
144
- return e === void 0;
145
- }
146
- const Sn = (e) => typeof e == "boolean", Qe = (e) => typeof e == "number", Ye = (e) => typeof Element > "u" ? !1 : e instanceof Element;
147
- class Ho extends Error {
148
- constructor(t) {
149
- super(t), this.name = "ElementPlusError";
150
- }
151
- }
152
- function mt(e, t) {
153
- if (process.env.NODE_ENV !== "production") {
154
- const n = An(e) ? new Ho(`[${e}] ${t}`) : e;
155
- }
156
- }
157
- const Fn = "__epPropKey", N = (e) => e, Ko = (e) => bt(e) && !!e[Fn], Et = (e, t) => {
158
- if (!bt(e) || Ko(e))
159
- return e;
160
- const { values: n, required: o, default: r, type: s, validator: a } = e, l = {
161
- type: s,
162
- required: !!o,
163
- validator: n || a ? (u) => {
164
- let d = !1, h = [];
165
- if (n && (h = Array.from(n), Xt(e, "default") && h.push(r), d || (d = h.includes(u))), a && (d || (d = a(u))), !d && h.length > 0) {
166
- const m = [...new Set(h)].map((g) => JSON.stringify(g)).join(", ");
167
- vo(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${m}], got value ${JSON.stringify(u)}.`);
168
- }
169
- return d;
170
- } : void 0,
171
- [Fn]: !0
172
- };
173
- return Xt(e, "default") && (l.default = r), l;
174
- }, se = (e) => vt(Object.entries(e).map(([t, n]) => [
175
- t,
176
- Et(n, t)
177
- ])), kn = (e, t) => (e.install = (n) => {
178
- for (const o of [e, ...Object.values({})])
179
- n.component(o.name, o);
180
- }, e), Ge = {
181
- tab: "Tab",
182
- enter: "Enter",
183
- space: "Space",
184
- left: "ArrowLeft",
185
- up: "ArrowUp",
186
- right: "ArrowRight",
187
- down: "ArrowDown",
188
- esc: "Escape",
189
- delete: "Delete",
190
- backspace: "Backspace",
191
- numpadEnter: "NumpadEnter",
192
- pageUp: "PageUp",
193
- pageDown: "PageDown",
194
- home: "Home",
195
- end: "End"
196
- }, lt = "el", Vo = "is-", de = (e, t, n, o, r) => {
197
- let s = `${e}-${t}`;
198
- return n && (s += `-${n}`), o && (s += `__${o}`), r && (s += `--${r}`), s;
199
- }, Wo = Symbol("namespaceContextKey"), Ot = (e) => {
200
- const t = et() ? ee(Wo, R(lt)) : R(lt);
201
- return P(() => v(t) || lt);
202
- }, Le = (e, t) => {
203
- const n = Ot();
204
- return {
205
- namespace: n,
206
- b: (f = "") => de(n.value, e, f, "", ""),
207
- e: (f) => f ? de(n.value, e, "", f, "") : "",
208
- m: (f) => f ? de(n.value, e, "", "", f) : "",
209
- be: (f, y) => f && y ? de(n.value, e, f, y, "") : "",
210
- em: (f, y) => f && y ? de(n.value, e, "", f, y) : "",
211
- bm: (f, y) => f && y ? de(n.value, e, f, "", y) : "",
212
- bem: (f, y, p) => f && y && p ? de(n.value, e, f, y, p) : "",
213
- is: (f, ...y) => {
214
- const p = y.length >= 1 ? y[0] : !0;
215
- return f && p ? `${Vo}${f}` : "";
216
- },
217
- cssVar: (f) => {
218
- const y = {};
219
- for (const p in f)
220
- f[p] && (y[`--${n.value}-${p}`] = f[p]);
221
- return y;
222
- },
223
- cssVarName: (f) => `--${n.value}-${f}`,
224
- cssVarBlock: (f) => {
225
- const y = {};
226
- for (const p in f)
227
- f[p] && (y[`--${n.value}-${e}-${p}`] = f[p]);
228
- return y;
229
- },
230
- cssVarBlockName: (f) => `--${n.value}-${e}-${f}`
231
- };
232
- }, Uo = Et({
233
- type: N(Boolean),
234
- default: null
235
- }), qo = Et({
236
- type: N(Function)
237
- }), Nn = (e) => {
238
- const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], r = {
239
- [e]: Uo,
240
- [n]: qo
241
- };
242
- return {
243
- useModelToggle: ({
244
- indicator: a,
245
- toggleReason: c,
246
- shouldHideWhenRouteChanges: l,
247
- shouldProceed: u,
248
- onShow: d,
249
- onHide: h
250
- }) => {
251
- const m = et(), { emit: g } = m, i = m.props, f = P(() => Ve(i[n])), y = P(() => i[e] === null), p = (O) => {
252
- a.value !== !0 && (a.value = !0, c && (c.value = O), Ve(d) && d(O));
253
- }, w = (O) => {
254
- a.value !== !1 && (a.value = !1, c && (c.value = O), Ve(h) && h(O));
255
- }, T = (O) => {
256
- if (i.disabled === !0 || Ve(u) && !u())
257
- return;
258
- const I = f.value && Q;
259
- I && g(t, !0), (y.value || !I) && p(O);
260
- }, b = (O) => {
261
- if (i.disabled === !0 || !Q)
262
- return;
263
- const I = f.value && Q;
264
- I && g(t, !1), (y.value || !I) && w(O);
265
- }, C = (O) => {
266
- Sn(O) && (i.disabled && O ? f.value && g(t, !1) : a.value !== O && (O ? p() : w()));
267
- }, _ = () => {
268
- a.value ? b() : T();
269
- };
270
- return L(() => i[e], C), l && m.appContext.config.globalProperties.$route !== void 0 && L(() => ({
271
- ...m.proxy.$route
272
- }), () => {
273
- l.value && a.value && b();
274
- }), ie(() => {
275
- C(i[e]);
276
- }), {
277
- hide: b,
278
- show: T,
279
- toggle: _,
280
- hasUpdateHandler: f
281
- };
282
- },
283
- useModelToggleProps: r,
284
- useModelToggleEmits: o
285
- };
286
- };
287
- Nn("modelValue");
288
- var K = "top", U = "bottom", q = "right", V = "left", Tt = "auto", Be = [K, U, q, V], Oe = "start", Ne = "end", zo = "clippingParents", $n = "viewport", Re = "popper", Zo = "reference", en = Be.reduce(function(e, t) {
289
- return e.concat([t + "-" + Oe, t + "-" + Ne]);
290
- }, []), Ct = [].concat(Be, [Tt]).reduce(function(e, t) {
291
- return e.concat([t, t + "-" + Oe, t + "-" + Ne]);
292
- }, []), Jo = "beforeRead", Qo = "read", Yo = "afterRead", Go = "beforeMain", Xo = "main", er = "afterMain", tr = "beforeWrite", nr = "write", or = "afterWrite", rr = [Jo, Qo, Yo, Go, Xo, er, tr, nr, or];
293
- function X(e) {
294
- return e ? (e.nodeName || "").toLowerCase() : null;
295
- }
296
- function z(e) {
297
- if (e == null) return window;
298
- if (e.toString() !== "[object Window]") {
299
- var t = e.ownerDocument;
300
- return t && t.defaultView || window;
301
- }
302
- return e;
303
- }
304
- function Te(e) {
305
- var t = z(e).Element;
306
- return e instanceof t || e instanceof Element;
307
- }
308
- function W(e) {
309
- var t = z(e).HTMLElement;
310
- return e instanceof t || e instanceof HTMLElement;
311
- }
312
- function Pt(e) {
313
- if (typeof ShadowRoot > "u") return !1;
314
- var t = z(e).ShadowRoot;
315
- return e instanceof t || e instanceof ShadowRoot;
316
- }
317
- function sr(e) {
318
- var t = e.state;
319
- Object.keys(t.elements).forEach(function(n) {
320
- var o = t.styles[n] || {}, r = t.attributes[n] || {}, s = t.elements[n];
321
- !W(s) || !X(s) || (Object.assign(s.style, o), Object.keys(r).forEach(function(a) {
322
- var c = r[a];
323
- c === !1 ? s.removeAttribute(a) : s.setAttribute(a, c === !0 ? "" : c);
324
- }));
325
- });
326
- }
327
- function ar(e) {
328
- var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
329
- return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
330
- Object.keys(t.elements).forEach(function(o) {
331
- var r = t.elements[o], s = t.attributes[o] || {}, a = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), c = a.reduce(function(l, u) {
332
- return l[u] = "", l;
333
- }, {});
334
- !W(r) || !X(r) || (Object.assign(r.style, c), Object.keys(s).forEach(function(l) {
335
- r.removeAttribute(l);
336
- }));
337
- });
338
- };
339
- }
340
- var Ln = { name: "applyStyles", enabled: !0, phase: "write", fn: sr, effect: ar, requires: ["computeStyles"] };
341
- function Y(e) {
342
- return e.split("-")[0];
343
- }
344
- var me = Math.max, Xe = Math.min, Ce = Math.round;
345
- function Pe(e, t) {
346
- t === void 0 && (t = !1);
347
- var n = e.getBoundingClientRect(), o = 1, r = 1;
348
- if (W(e) && t) {
349
- var s = e.offsetHeight, a = e.offsetWidth;
350
- a > 0 && (o = Ce(n.width) / a || 1), s > 0 && (r = Ce(n.height) / s || 1);
351
- }
352
- return { width: n.width / o, height: n.height / r, top: n.top / r, right: n.right / o, bottom: n.bottom / r, left: n.left / o, x: n.left / o, y: n.top / r };
353
- }
354
- function It(e) {
355
- var t = Pe(e), n = e.offsetWidth, o = e.offsetHeight;
356
- return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
357
- }
358
- function Bn(e, t) {
359
- var n = t.getRootNode && t.getRootNode();
360
- if (e.contains(t)) return !0;
361
- if (n && Pt(n)) {
362
- var o = t;
363
- do {
364
- if (o && e.isSameNode(o)) return !0;
365
- o = o.parentNode || o.host;
366
- } while (o);
367
- }
368
- return !1;
369
- }
370
- function re(e) {
371
- return z(e).getComputedStyle(e);
372
- }
373
- function ir(e) {
374
- return ["table", "td", "th"].indexOf(X(e)) >= 0;
375
- }
376
- function ue(e) {
377
- return ((Te(e) ? e.ownerDocument : e.document) || window.document).documentElement;
378
- }
379
- function nt(e) {
380
- return X(e) === "html" ? e : e.assignedSlot || e.parentNode || (Pt(e) ? e.host : null) || ue(e);
381
- }
382
- function tn(e) {
383
- return !W(e) || re(e).position === "fixed" ? null : e.offsetParent;
384
- }
385
- function lr(e) {
386
- var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
387
- if (n && W(e)) {
388
- var o = re(e);
389
- if (o.position === "fixed") return null;
390
- }
391
- var r = nt(e);
392
- for (Pt(r) && (r = r.host); W(r) && ["html", "body"].indexOf(X(r)) < 0; ) {
393
- var s = re(r);
394
- if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none") return r;
395
- r = r.parentNode;
396
- }
397
- return null;
398
- }
399
- function Me(e) {
400
- for (var t = z(e), n = tn(e); n && ir(n) && re(n).position === "static"; ) n = tn(n);
401
- return n && (X(n) === "html" || X(n) === "body" && re(n).position === "static") ? t : n || lr(e) || t;
402
- }
403
- function _t(e) {
404
- return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
405
- }
406
- function Se(e, t, n) {
407
- return me(e, Xe(t, n));
408
- }
409
- function ur(e, t, n) {
410
- var o = Se(e, t, n);
411
- return o > n ? n : o;
412
- }
413
- function Mn() {
414
- return { top: 0, right: 0, bottom: 0, left: 0 };
415
- }
416
- function Dn(e) {
417
- return Object.assign({}, Mn(), e);
418
- }
419
- function jn(e, t) {
420
- return t.reduce(function(n, o) {
421
- return n[o] = e, n;
422
- }, {});
423
- }
424
- var cr = function(e, t) {
425
- return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, Dn(typeof e != "number" ? e : jn(e, Be));
426
- };
427
- function fr(e) {
428
- var t, n = e.state, o = e.name, r = e.options, s = n.elements.arrow, a = n.modifiersData.popperOffsets, c = Y(n.placement), l = _t(c), u = [V, q].indexOf(c) >= 0, d = u ? "height" : "width";
429
- if (!(!s || !a)) {
430
- var h = cr(r.padding, n), m = It(s), g = l === "y" ? K : V, i = l === "y" ? U : q, f = n.rects.reference[d] + n.rects.reference[l] - a[l] - n.rects.popper[d], y = a[l] - n.rects.reference[l], p = Me(s), w = p ? l === "y" ? p.clientHeight || 0 : p.clientWidth || 0 : 0, T = f / 2 - y / 2, b = h[g], C = w - m[d] - h[i], _ = w / 2 - m[d] / 2 + T, O = Se(b, _, C), I = l;
431
- n.modifiersData[o] = (t = {}, t[I] = O, t.centerOffset = O - _, t);
432
- }
433
- }
434
- function pr(e) {
435
- var t = e.state, n = e.options, o = n.element, r = o === void 0 ? "[data-popper-arrow]" : o;
436
- r != null && (typeof r == "string" && (r = t.elements.popper.querySelector(r), !r) || !Bn(t.elements.popper, r) || (t.elements.arrow = r));
437
- }
438
- var dr = { name: "arrow", enabled: !0, phase: "main", fn: fr, effect: pr, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
439
- function Ie(e) {
440
- return e.split("-")[1];
441
- }
442
- var vr = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
443
- function mr(e) {
444
- var t = e.x, n = e.y, o = window, r = o.devicePixelRatio || 1;
445
- return { x: Ce(t * r) / r || 0, y: Ce(n * r) / r || 0 };
446
- }
447
- function nn(e) {
448
- var t, n = e.popper, o = e.popperRect, r = e.placement, s = e.variation, a = e.offsets, c = e.position, l = e.gpuAcceleration, u = e.adaptive, d = e.roundOffsets, h = e.isFixed, m = a.x, g = m === void 0 ? 0 : m, i = a.y, f = i === void 0 ? 0 : i, y = typeof d == "function" ? d({ x: g, y: f }) : { x: g, y: f };
449
- g = y.x, f = y.y;
450
- var p = a.hasOwnProperty("x"), w = a.hasOwnProperty("y"), T = V, b = K, C = window;
451
- if (u) {
452
- var _ = Me(n), O = "clientHeight", I = "clientWidth";
453
- if (_ === z(n) && (_ = ue(n), re(_).position !== "static" && c === "absolute" && (O = "scrollHeight", I = "scrollWidth")), _ = _, r === K || (r === V || r === q) && s === Ne) {
454
- b = U;
455
- var S = h && _ === C && C.visualViewport ? C.visualViewport.height : _[O];
456
- f -= S - o.height, f *= l ? 1 : -1;
457
- }
458
- if (r === V || (r === K || r === U) && s === Ne) {
459
- T = q;
460
- var x = h && _ === C && C.visualViewport ? C.visualViewport.width : _[I];
461
- g -= x - o.width, g *= l ? 1 : -1;
462
- }
463
- }
464
- var F = Object.assign({ position: c }, u && vr), A = d === !0 ? mr({ x: g, y: f }) : { x: g, y: f };
465
- if (g = A.x, f = A.y, l) {
466
- var k;
467
- return Object.assign({}, F, (k = {}, k[b] = w ? "0" : "", k[T] = p ? "0" : "", k.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + g + "px, " + f + "px)" : "translate3d(" + g + "px, " + f + "px, 0)", k));
468
- }
469
- return Object.assign({}, F, (t = {}, t[b] = w ? f + "px" : "", t[T] = p ? g + "px" : "", t.transform = "", t));
470
- }
471
- function gr(e) {
472
- var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, s = n.adaptive, a = s === void 0 ? !0 : s, c = n.roundOffsets, l = c === void 0 ? !0 : c, u = { placement: Y(t.placement), variation: Ie(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: r, isFixed: t.options.strategy === "fixed" };
473
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, nn(Object.assign({}, u, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: a, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, nn(Object.assign({}, u, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
474
- }
475
- var Hn = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: gr, data: {} }, We = { passive: !0 };
476
- function hr(e) {
477
- var t = e.state, n = e.instance, o = e.options, r = o.scroll, s = r === void 0 ? !0 : r, a = o.resize, c = a === void 0 ? !0 : a, l = z(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
478
- return s && u.forEach(function(d) {
479
- d.addEventListener("scroll", n.update, We);
480
- }), c && l.addEventListener("resize", n.update, We), function() {
481
- s && u.forEach(function(d) {
482
- d.removeEventListener("scroll", n.update, We);
483
- }), c && l.removeEventListener("resize", n.update, We);
484
- };
485
- }
486
- var Kn = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
487
- }, effect: hr, data: {} }, yr = { left: "right", right: "left", bottom: "top", top: "bottom" };
488
- function Ze(e) {
489
- return e.replace(/left|right|bottom|top/g, function(t) {
490
- return yr[t];
491
- });
492
- }
493
- var br = { start: "end", end: "start" };
494
- function on(e) {
495
- return e.replace(/start|end/g, function(t) {
496
- return br[t];
497
- });
498
- }
499
- function xt(e) {
500
- var t = z(e), n = t.pageXOffset, o = t.pageYOffset;
501
- return { scrollLeft: n, scrollTop: o };
502
- }
503
- function Rt(e) {
504
- return Pe(ue(e)).left + xt(e).scrollLeft;
505
- }
506
- function wr(e) {
507
- var t = z(e), n = ue(e), o = t.visualViewport, r = n.clientWidth, s = n.clientHeight, a = 0, c = 0;
508
- return o && (r = o.width, s = o.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a = o.offsetLeft, c = o.offsetTop)), { width: r, height: s, x: a + Rt(e), y: c };
509
- }
510
- function Er(e) {
511
- var t, n = ue(e), o = xt(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, s = me(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), a = me(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), c = -o.scrollLeft + Rt(e), l = -o.scrollTop;
512
- return re(r || n).direction === "rtl" && (c += me(n.clientWidth, r ? r.clientWidth : 0) - s), { width: s, height: a, x: c, y: l };
513
- }
514
- function At(e) {
515
- var t = re(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
516
- return /auto|scroll|overlay|hidden/.test(n + r + o);
517
- }
518
- function Vn(e) {
519
- return ["html", "body", "#document"].indexOf(X(e)) >= 0 ? e.ownerDocument.body : W(e) && At(e) ? e : Vn(nt(e));
520
- }
521
- function Fe(e, t) {
522
- var n;
523
- t === void 0 && (t = []);
524
- var o = Vn(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), s = z(o), a = r ? [s].concat(s.visualViewport || [], At(o) ? o : []) : o, c = t.concat(a);
525
- return r ? c : c.concat(Fe(nt(a)));
526
- }
527
- function gt(e) {
528
- return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
529
- }
530
- function Or(e) {
531
- var t = Pe(e);
532
- return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
533
- }
534
- function rn(e, t) {
535
- return t === $n ? gt(wr(e)) : Te(t) ? Or(t) : gt(Er(ue(e)));
536
- }
537
- function Tr(e) {
538
- var t = Fe(nt(e)), n = ["absolute", "fixed"].indexOf(re(e).position) >= 0, o = n && W(e) ? Me(e) : e;
539
- return Te(o) ? t.filter(function(r) {
540
- return Te(r) && Bn(r, o) && X(r) !== "body";
541
- }) : [];
542
- }
543
- function Cr(e, t, n) {
544
- var o = t === "clippingParents" ? Tr(e) : [].concat(t), r = [].concat(o, [n]), s = r[0], a = r.reduce(function(c, l) {
545
- var u = rn(e, l);
546
- return c.top = me(u.top, c.top), c.right = Xe(u.right, c.right), c.bottom = Xe(u.bottom, c.bottom), c.left = me(u.left, c.left), c;
547
- }, rn(e, s));
548
- return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
549
- }
550
- function Wn(e) {
551
- var t = e.reference, n = e.element, o = e.placement, r = o ? Y(o) : null, s = o ? Ie(o) : null, a = t.x + t.width / 2 - n.width / 2, c = t.y + t.height / 2 - n.height / 2, l;
552
- switch (r) {
553
- case K:
554
- l = { x: a, y: t.y - n.height };
555
- break;
556
- case U:
557
- l = { x: a, y: t.y + t.height };
558
- break;
559
- case q:
560
- l = { x: t.x + t.width, y: c };
561
- break;
562
- case V:
563
- l = { x: t.x - n.width, y: c };
564
- break;
565
- default:
566
- l = { x: t.x, y: t.y };
567
- }
568
- var u = r ? _t(r) : null;
569
- if (u != null) {
570
- var d = u === "y" ? "height" : "width";
571
- switch (s) {
572
- case Oe:
573
- l[u] = l[u] - (t[d] / 2 - n[d] / 2);
574
- break;
575
- case Ne:
576
- l[u] = l[u] + (t[d] / 2 - n[d] / 2);
577
- break;
578
- }
579
- }
580
- return l;
581
- }
582
- function $e(e, t) {
583
- t === void 0 && (t = {});
584
- var n = t, o = n.placement, r = o === void 0 ? e.placement : o, s = n.boundary, a = s === void 0 ? zo : s, c = n.rootBoundary, l = c === void 0 ? $n : c, u = n.elementContext, d = u === void 0 ? Re : u, h = n.altBoundary, m = h === void 0 ? !1 : h, g = n.padding, i = g === void 0 ? 0 : g, f = Dn(typeof i != "number" ? i : jn(i, Be)), y = d === Re ? Zo : Re, p = e.rects.popper, w = e.elements[m ? y : d], T = Cr(Te(w) ? w : w.contextElement || ue(e.elements.popper), a, l), b = Pe(e.elements.reference), C = Wn({ reference: b, element: p, strategy: "absolute", placement: r }), _ = gt(Object.assign({}, p, C)), O = d === Re ? _ : b, I = { top: T.top - O.top + f.top, bottom: O.bottom - T.bottom + f.bottom, left: T.left - O.left + f.left, right: O.right - T.right + f.right }, S = e.modifiersData.offset;
585
- if (d === Re && S) {
586
- var x = S[r];
587
- Object.keys(I).forEach(function(F) {
588
- var A = [q, U].indexOf(F) >= 0 ? 1 : -1, k = [K, U].indexOf(F) >= 0 ? "y" : "x";
589
- I[F] += x[k] * A;
590
- });
591
- }
592
- return I;
593
- }
594
- function Pr(e, t) {
595
- t === void 0 && (t = {});
596
- var n = t, o = n.placement, r = n.boundary, s = n.rootBoundary, a = n.padding, c = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Ct : l, d = Ie(o), h = d ? c ? en : en.filter(function(i) {
597
- return Ie(i) === d;
598
- }) : Be, m = h.filter(function(i) {
599
- return u.indexOf(i) >= 0;
600
- });
601
- m.length === 0 && (m = h);
602
- var g = m.reduce(function(i, f) {
603
- return i[f] = $e(e, { placement: f, boundary: r, rootBoundary: s, padding: a })[Y(f)], i;
604
- }, {});
605
- return Object.keys(g).sort(function(i, f) {
606
- return g[i] - g[f];
607
- });
608
- }
609
- function Ir(e) {
610
- if (Y(e) === Tt) return [];
611
- var t = Ze(e);
612
- return [on(e), t, on(t)];
613
- }
614
- function _r(e) {
615
- var t = e.state, n = e.options, o = e.name;
616
- if (!t.modifiersData[o]._skip) {
617
- for (var r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !0 : a, l = n.fallbackPlacements, u = n.padding, d = n.boundary, h = n.rootBoundary, m = n.altBoundary, g = n.flipVariations, i = g === void 0 ? !0 : g, f = n.allowedAutoPlacements, y = t.options.placement, p = Y(y), w = p === y, T = l || (w || !i ? [Ze(y)] : Ir(y)), b = [y].concat(T).reduce(function(fe, te) {
618
- return fe.concat(Y(te) === Tt ? Pr(t, { placement: te, boundary: d, rootBoundary: h, padding: u, flipVariations: i, allowedAutoPlacements: f }) : te);
619
- }, []), C = t.rects.reference, _ = t.rects.popper, O = /* @__PURE__ */ new Map(), I = !0, S = b[0], x = 0; x < b.length; x++) {
620
- var F = b[x], A = Y(F), k = Ie(F) === Oe, j = [K, U].indexOf(A) >= 0, M = j ? "width" : "height", $ = $e(t, { placement: F, boundary: d, rootBoundary: h, altBoundary: m, padding: u }), E = j ? k ? q : V : k ? U : K;
621
- C[M] > _[M] && (E = Ze(E));
622
- var H = Ze(E), Z = [];
623
- if (s && Z.push($[A] <= 0), c && Z.push($[E] <= 0, $[H] <= 0), Z.every(function(fe) {
624
- return fe;
625
- })) {
626
- S = F, I = !1;
627
- break;
628
- }
629
- O.set(F, Z);
630
- }
631
- if (I) for (var De = i ? 3 : 1, rt = function(fe) {
632
- var te = b.find(function(He) {
633
- var xe = O.get(He);
634
- if (xe) return xe.slice(0, fe).every(function(ye) {
635
- return ye;
636
- });
637
- });
638
- if (te) return S = te, "break";
639
- }, _e = De; _e > 0; _e--) {
640
- var je = rt(_e);
641
- if (je === "break") break;
642
- }
643
- t.placement !== S && (t.modifiersData[o]._skip = !0, t.placement = S, t.reset = !0);
644
- }
645
- }
646
- var xr = { name: "flip", enabled: !0, phase: "main", fn: _r, requiresIfExists: ["offset"], data: { _skip: !1 } };
647
- function sn(e, t, n) {
648
- return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x };
649
- }
650
- function an(e) {
651
- return [K, q, U, V].some(function(t) {
652
- return e[t] >= 0;
653
- });
654
- }
655
- function Rr(e) {
656
- var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, s = t.modifiersData.preventOverflow, a = $e(t, { elementContext: "reference" }), c = $e(t, { altBoundary: !0 }), l = sn(a, o), u = sn(c, r, s), d = an(l), h = an(u);
657
- t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u, isReferenceHidden: d, hasPopperEscaped: h }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": d, "data-popper-escaped": h });
658
- }
659
- var Ar = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: Rr };
660
- function Sr(e, t, n) {
661
- var o = Y(e), r = [V, K].indexOf(o) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, a = s[0], c = s[1];
662
- return a = a || 0, c = (c || 0) * r, [V, q].indexOf(o) >= 0 ? { x: c, y: a } : { x: a, y: c };
663
- }
664
- function Fr(e) {
665
- var t = e.state, n = e.options, o = e.name, r = n.offset, s = r === void 0 ? [0, 0] : r, a = Ct.reduce(function(d, h) {
666
- return d[h] = Sr(h, t.rects, s), d;
667
- }, {}), c = a[t.placement], l = c.x, u = c.y;
668
- t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[o] = a;
669
- }
670
- var kr = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: Fr };
671
- function Nr(e) {
672
- var t = e.state, n = e.name;
673
- t.modifiersData[n] = Wn({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
674
- }
675
- var Un = { name: "popperOffsets", enabled: !0, phase: "read", fn: Nr, data: {} };
676
- function $r(e) {
677
- return e === "x" ? "y" : "x";
678
- }
679
- function Lr(e) {
680
- var t = e.state, n = e.options, o = e.name, r = n.mainAxis, s = r === void 0 ? !0 : r, a = n.altAxis, c = a === void 0 ? !1 : a, l = n.boundary, u = n.rootBoundary, d = n.altBoundary, h = n.padding, m = n.tether, g = m === void 0 ? !0 : m, i = n.tetherOffset, f = i === void 0 ? 0 : i, y = $e(t, { boundary: l, rootBoundary: u, padding: h, altBoundary: d }), p = Y(t.placement), w = Ie(t.placement), T = !w, b = _t(p), C = $r(b), _ = t.modifiersData.popperOffsets, O = t.rects.reference, I = t.rects.popper, S = typeof f == "function" ? f(Object.assign({}, t.rects, { placement: t.placement })) : f, x = typeof S == "number" ? { mainAxis: S, altAxis: S } : Object.assign({ mainAxis: 0, altAxis: 0 }, S), F = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, A = { x: 0, y: 0 };
681
- if (_) {
682
- if (s) {
683
- var k, j = b === "y" ? K : V, M = b === "y" ? U : q, $ = b === "y" ? "height" : "width", E = _[b], H = E + y[j], Z = E - y[M], De = g ? -I[$] / 2 : 0, rt = w === Oe ? O[$] : I[$], _e = w === Oe ? -I[$] : -O[$], je = t.elements.arrow, fe = g && je ? It(je) : { width: 0, height: 0 }, te = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Mn(), He = te[j], xe = te[M], ye = Se(0, O[$], fe[$]), ro = T ? O[$] / 2 - De - ye - He - x.mainAxis : rt - ye - He - x.mainAxis, so = T ? -O[$] / 2 + De + ye + xe + x.mainAxis : _e + ye + xe + x.mainAxis, st = t.elements.arrow && Me(t.elements.arrow), ao = st ? b === "y" ? st.clientTop || 0 : st.clientLeft || 0 : 0, Lt = (k = F == null ? void 0 : F[b]) != null ? k : 0, io = E + ro - Lt - ao, lo = E + so - Lt, Bt = Se(g ? Xe(H, io) : H, E, g ? me(Z, lo) : Z);
684
- _[b] = Bt, A[b] = Bt - E;
685
- }
686
- if (c) {
687
- var Mt, uo = b === "x" ? K : V, co = b === "x" ? U : q, pe = _[C], Ke = C === "y" ? "height" : "width", Dt = pe + y[uo], jt = pe - y[co], at = [K, V].indexOf(p) !== -1, Ht = (Mt = F == null ? void 0 : F[C]) != null ? Mt : 0, Kt = at ? Dt : pe - O[Ke] - I[Ke] - Ht + x.altAxis, Vt = at ? pe + O[Ke] + I[Ke] - Ht - x.altAxis : jt, Wt = g && at ? ur(Kt, pe, Vt) : Se(g ? Kt : Dt, pe, g ? Vt : jt);
688
- _[C] = Wt, A[C] = Wt - pe;
689
- }
690
- t.modifiersData[o] = A;
691
- }
692
- }
693
- var Br = { name: "preventOverflow", enabled: !0, phase: "main", fn: Lr, requiresIfExists: ["offset"] };
694
- function Mr(e) {
695
- return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
696
- }
697
- function Dr(e) {
698
- return e === z(e) || !W(e) ? xt(e) : Mr(e);
699
- }
700
- function jr(e) {
701
- var t = e.getBoundingClientRect(), n = Ce(t.width) / e.offsetWidth || 1, o = Ce(t.height) / e.offsetHeight || 1;
702
- return n !== 1 || o !== 1;
703
- }
704
- function Hr(e, t, n) {
705
- n === void 0 && (n = !1);
706
- var o = W(t), r = W(t) && jr(t), s = ue(t), a = Pe(e, r), c = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
707
- return (o || !o && !n) && ((X(t) !== "body" || At(s)) && (c = Dr(t)), W(t) ? (l = Pe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : s && (l.x = Rt(s))), { x: a.left + c.scrollLeft - l.x, y: a.top + c.scrollTop - l.y, width: a.width, height: a.height };
708
- }
709
- function Kr(e) {
710
- var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
711
- e.forEach(function(s) {
712
- t.set(s.name, s);
713
- });
714
- function r(s) {
715
- n.add(s.name);
716
- var a = [].concat(s.requires || [], s.requiresIfExists || []);
717
- a.forEach(function(c) {
718
- if (!n.has(c)) {
719
- var l = t.get(c);
720
- l && r(l);
721
- }
722
- }), o.push(s);
723
- }
724
- return e.forEach(function(s) {
725
- n.has(s.name) || r(s);
726
- }), o;
727
- }
728
- function Vr(e) {
729
- var t = Kr(e);
730
- return rr.reduce(function(n, o) {
731
- return n.concat(t.filter(function(r) {
732
- return r.phase === o;
733
- }));
734
- }, []);
735
- }
736
- function Wr(e) {
737
- var t;
738
- return function() {
739
- return t || (t = new Promise(function(n) {
740
- Promise.resolve().then(function() {
741
- t = void 0, n(e());
742
- });
743
- })), t;
744
- };
745
- }
746
- function Ur(e) {
747
- var t = e.reduce(function(n, o) {
748
- var r = n[o.name];
749
- return n[o.name] = r ? Object.assign({}, r, o, { options: Object.assign({}, r.options, o.options), data: Object.assign({}, r.data, o.data) }) : o, n;
750
- }, {});
751
- return Object.keys(t).map(function(n) {
752
- return t[n];
753
- });
754
- }
755
- var ln = { placement: "bottom", modifiers: [], strategy: "absolute" };
756
- function un() {
757
- for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
758
- return !t.some(function(o) {
759
- return !(o && typeof o.getBoundingClientRect == "function");
760
- });
761
- }
762
- function St(e) {
763
- e === void 0 && (e = {});
764
- var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, r = t.defaultOptions, s = r === void 0 ? ln : r;
765
- return function(a, c, l) {
766
- l === void 0 && (l = s);
767
- var u = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, ln, s), modifiersData: {}, elements: { reference: a, popper: c }, attributes: {}, styles: {} }, d = [], h = !1, m = { state: u, setOptions: function(f) {
768
- var y = typeof f == "function" ? f(u.options) : f;
769
- i(), u.options = Object.assign({}, s, u.options, y), u.scrollParents = { reference: Te(a) ? Fe(a) : a.contextElement ? Fe(a.contextElement) : [], popper: Fe(c) };
770
- var p = Vr(Ur([].concat(o, u.options.modifiers)));
771
- return u.orderedModifiers = p.filter(function(w) {
772
- return w.enabled;
773
- }), g(), m.update();
774
- }, forceUpdate: function() {
775
- if (!h) {
776
- var f = u.elements, y = f.reference, p = f.popper;
777
- if (un(y, p)) {
778
- u.rects = { reference: Hr(y, Me(p), u.options.strategy === "fixed"), popper: It(p) }, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(I) {
779
- return u.modifiersData[I.name] = Object.assign({}, I.data);
780
- });
781
- for (var w = 0; w < u.orderedModifiers.length; w++) {
782
- if (u.reset === !0) {
783
- u.reset = !1, w = -1;
784
- continue;
785
- }
786
- var T = u.orderedModifiers[w], b = T.fn, C = T.options, _ = C === void 0 ? {} : C, O = T.name;
787
- typeof b == "function" && (u = b({ state: u, options: _, name: O, instance: m }) || u);
788
- }
789
- }
790
- }
791
- }, update: Wr(function() {
792
- return new Promise(function(f) {
793
- m.forceUpdate(), f(u);
794
- });
795
- }), destroy: function() {
796
- i(), h = !0;
797
- } };
798
- if (!un(a, c)) return m;
799
- m.setOptions(l).then(function(f) {
800
- !h && l.onFirstUpdate && l.onFirstUpdate(f);
801
- });
802
- function g() {
803
- u.orderedModifiers.forEach(function(f) {
804
- var y = f.name, p = f.options, w = p === void 0 ? {} : p, T = f.effect;
805
- if (typeof T == "function") {
806
- var b = T({ state: u, name: y, instance: m, options: w }), C = function() {
807
- };
808
- d.push(b || C);
809
- }
810
- });
811
- }
812
- function i() {
813
- d.forEach(function(f) {
814
- return f();
815
- }), d = [];
816
- }
817
- return m;
818
- };
819
- }
820
- St();
821
- var qr = [Kn, Un, Hn, Ln];
822
- St({ defaultModifiers: qr });
823
- var zr = [Kn, Un, Hn, Ln, kr, xr, Br, dr, Ar], Zr = St({ defaultModifiers: zr });
824
- const Jr = (e, t, n = {}) => {
825
- const o = {
826
- name: "updateState",
827
- enabled: !0,
828
- phase: "write",
829
- fn: ({ state: l }) => {
830
- const u = Qr(l);
831
- Object.assign(a.value, u);
832
- },
833
- requires: ["computeStyles"]
834
- }, r = P(() => {
835
- const { onFirstUpdate: l, placement: u, strategy: d, modifiers: h } = v(n);
836
- return {
837
- onFirstUpdate: l,
838
- placement: u || "bottom",
839
- strategy: d || "absolute",
840
- modifiers: [
841
- ...h || [],
842
- o,
843
- { name: "applyStyles", enabled: !1 }
844
- ]
845
- };
846
- }), s = mo(), a = R({
847
- styles: {
848
- popper: {
849
- position: v(r).strategy,
850
- left: "0",
851
- top: "0"
852
- },
853
- arrow: {
854
- position: "absolute"
855
- }
856
- },
857
- attributes: {}
858
- }), c = () => {
859
- s.value && (s.value.destroy(), s.value = void 0);
860
- };
861
- return L(r, (l) => {
862
- const u = v(s);
863
- u && u.setOptions(l);
864
- }, {
865
- deep: !0
866
- }), L([e, t], ([l, u]) => {
867
- c(), !(!l || !u) && (s.value = Zr(l, u, v(r)));
868
- }), le(() => {
869
- c();
870
- }), {
871
- state: P(() => {
872
- var l;
873
- return { ...((l = v(s)) == null ? void 0 : l.state) || {} };
874
- }),
875
- styles: P(() => v(a).styles),
876
- attributes: P(() => v(a).attributes),
877
- update: () => {
878
- var l;
879
- return (l = v(s)) == null ? void 0 : l.update();
880
- },
881
- forceUpdate: () => {
882
- var l;
883
- return (l = v(s)) == null ? void 0 : l.forceUpdate();
884
- },
885
- instanceRef: P(() => v(s))
886
- };
887
- };
888
- function Qr(e) {
889
- const t = Object.keys(e.elements), n = vt(t.map((r) => [r, e.styles[r] || {}])), o = vt(t.map((r) => [r, e.attributes[r]]));
890
- return {
891
- styles: n,
892
- attributes: o
893
- };
894
- }
895
- function cn() {
896
- let e;
897
- const t = (o, r) => {
898
- n(), e = window.setTimeout(o, r);
899
- }, n = () => window.clearTimeout(e);
900
- return xn(() => n()), {
901
- registerTimeout: t,
902
- cancelTimeout: n
903
- };
904
- }
905
- const ht = {
906
- prefix: Math.floor(Math.random() * 1e4),
907
- current: 0
908
- }, Yr = Symbol("elIdInjection"), qn = () => et() ? ee(Yr, ht) : ht, Gr = (e) => {
909
- const t = qn();
910
- !Q && t === ht && mt("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
911
- usage: app.provide(ID_INJECTION_KEY, {
912
- prefix: number,
913
- current: number,
914
- })`);
915
- const n = Ot();
916
- return P(() => v(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
917
- };
918
- let we = [];
919
- const fn = (e) => {
920
- const t = e;
921
- t.key === Ge.esc && we.forEach((n) => n(t));
922
- }, Xr = (e) => {
923
- ie(() => {
924
- we.length === 0 && document.addEventListener("keydown", fn), Q && we.push(e);
925
- }), le(() => {
926
- we = we.filter((t) => t !== e), we.length === 0 && Q && document.removeEventListener("keydown", fn);
927
- });
928
- };
929
- let pn;
930
- const zn = () => {
931
- const e = Ot(), t = qn(), n = P(() => `${e.value}-popper-container-${t.prefix}`), o = P(() => `#${n.value}`);
932
- return {
933
- id: n,
934
- selector: o
935
- };
936
- }, es = (e) => {
937
- const t = document.createElement("div");
938
- return t.id = e, document.body.appendChild(t), t;
939
- }, ts = () => {
940
- const { id: e, selector: t } = zn();
941
- return Tn(() => {
942
- Q && (process.env.NODE_ENV === "test" || !pn && !document.body.querySelector(t.value)) && (pn = es(e.value));
943
- }), {
944
- id: e,
945
- selector: t
946
- };
947
- }, ns = se({
948
- showAfter: {
949
- type: Number,
950
- default: 0
951
- },
952
- hideAfter: {
953
- type: Number,
954
- default: 200
955
- },
956
- autoClose: {
957
- type: Number,
958
- default: 0
959
- }
960
- }), os = ({
961
- showAfter: e,
962
- hideAfter: t,
963
- autoClose: n,
964
- open: o,
965
- close: r
966
- }) => {
967
- const { registerTimeout: s } = cn(), {
968
- registerTimeout: a,
969
- cancelTimeout: c
970
- } = cn();
971
- return {
972
- onOpen: (d) => {
973
- s(() => {
974
- o(d);
975
- const h = v(n);
976
- Qe(h) && h > 0 && a(() => {
977
- r(d);
978
- }, h);
979
- }, v(e));
980
- },
981
- onClose: (d) => {
982
- c(), s(() => {
983
- r(d);
984
- }, v(t));
985
- }
986
- };
987
- }, Zn = Symbol("elForwardRef"), rs = (e) => {
988
- Ee(Zn, {
989
- setForwardRef: (n) => {
990
- e.value = n;
991
- }
992
- });
993
- }, ss = (e) => ({
994
- mounted(t) {
995
- e(t);
996
- },
997
- updated(t) {
998
- e(t);
999
- },
1000
- unmounted() {
1001
- e(null);
1002
- }
1003
- }), dn = R(0), as = 2e3, is = Symbol("zIndexContextKey"), ls = (e) => {
1004
- const t = et() ? ee(is, void 0) : void 0, n = P(() => {
1005
- const s = v(t);
1006
- return Qe(s) ? s : as;
1007
- }), o = P(() => n.value + dn.value);
1008
- return {
1009
- initialZIndex: n,
1010
- currentZIndex: o,
1011
- nextZIndex: () => (dn.value++, o.value)
1012
- };
1013
- };
1014
- var ce = (e, t) => {
1015
- const n = e.__vccOpts || e;
1016
- for (const [o, r] of t)
1017
- n[o] = r;
1018
- return n;
1019
- };
1020
- const vn = Symbol("formItemContextKey"), Ft = Symbol("popper"), Jn = Symbol("popperContent"), us = [
1021
- "dialog",
1022
- "grid",
1023
- "group",
1024
- "listbox",
1025
- "menu",
1026
- "navigation",
1027
- "tooltip",
1028
- "tree"
1029
- ], Qn = se({
1030
- role: {
1031
- type: String,
1032
- values: us,
1033
- default: "tooltip"
1034
- }
1035
- }), cs = B({
1036
- name: "ElPopper",
1037
- inheritAttrs: !1
1038
- }), fs = /* @__PURE__ */ B({
1039
- ...cs,
1040
- props: Qn,
1041
- setup(e, { expose: t }) {
1042
- const n = e, o = R(), r = R(), s = R(), a = R(), c = P(() => n.role), l = {
1043
- triggerRef: o,
1044
- popperInstanceRef: r,
1045
- contentRef: s,
1046
- referenceRef: a,
1047
- role: c
1048
- };
1049
- return t(l), Ee(Ft, l), (u, d) => G(u.$slots, "default");
1050
- }
1051
- });
1052
- var ps = /* @__PURE__ */ ce(fs, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);
1053
- const Yn = se({
1054
- arrowOffset: {
1055
- type: Number,
1056
- default: 5
1057
- }
1058
- }), ds = B({
1059
- name: "ElPopperArrow",
1060
- inheritAttrs: !1
1061
- }), vs = /* @__PURE__ */ B({
1062
- ...ds,
1063
- props: Yn,
1064
- setup(e, { expose: t }) {
1065
- const n = e, o = Le("popper"), { arrowOffset: r, arrowRef: s, arrowStyle: a } = ee(Jn, void 0);
1066
- return L(() => n.arrowOffset, (c) => {
1067
- r.value = c;
1068
- }), le(() => {
1069
- s.value = void 0;
1070
- }), t({
1071
- arrowRef: s
1072
- }), (c, l) => (D(), oe("span", {
1073
- ref_key: "arrowRef",
1074
- ref: s,
1075
- class: Je(v(o).e("arrow")),
1076
- style: Cn(v(a)),
1077
- "data-popper-arrow": ""
1078
- }, null, 6));
1079
- }
1080
- });
1081
- var ms = /* @__PURE__ */ ce(vs, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);
1082
- const ut = "ElOnlyChild", gs = B({
1083
- name: ut,
1084
- setup(e, {
1085
- slots: t,
1086
- attrs: n
1087
- }) {
1088
- var o;
1089
- const r = ee(Zn), s = ss((o = r == null ? void 0 : r.setForwardRef) != null ? o : dt);
1090
- return () => {
1091
- var a;
1092
- const c = (a = t.default) == null ? void 0 : a.call(t, n);
1093
- if (!c)
1094
- return null;
1095
- if (c.length > 1)
1096
- return mt(ut, "requires exact only one valid child."), null;
1097
- const l = Gn(c);
1098
- return l ? yt(go(l, n), [[s]]) : (mt(ut, "no valid child node found"), null);
1099
- };
1100
- }
1101
- });
1102
- function Gn(e) {
1103
- if (!e)
1104
- return null;
1105
- const t = e;
1106
- for (const n of t) {
1107
- if (bt(n))
1108
- switch (n.type) {
1109
- case yo:
1110
- continue;
1111
- case ho:
1112
- case "svg":
1113
- return mn(n);
1114
- case Pn:
1115
- return Gn(n.children);
1116
- default:
1117
- return n;
1118
- }
1119
- return mn(n);
1120
- }
1121
- return null;
1122
- }
1123
- function mn(e) {
1124
- const t = Le("only-child");
1125
- return ke("span", {
1126
- class: t.e("content")
1127
- }, [e]);
1128
- }
1129
- const Xn = se({
1130
- virtualRef: {
1131
- type: N(Object)
1132
- },
1133
- virtualTriggering: Boolean,
1134
- onMouseenter: {
1135
- type: N(Function)
1136
- },
1137
- onMouseleave: {
1138
- type: N(Function)
1139
- },
1140
- onClick: {
1141
- type: N(Function)
1142
- },
1143
- onKeydown: {
1144
- type: N(Function)
1145
- },
1146
- onFocus: {
1147
- type: N(Function)
1148
- },
1149
- onBlur: {
1150
- type: N(Function)
1151
- },
1152
- onContextmenu: {
1153
- type: N(Function)
1154
- },
1155
- id: String,
1156
- open: Boolean
1157
- }), hs = B({
1158
- name: "ElPopperTrigger",
1159
- inheritAttrs: !1
1160
- }), ys = /* @__PURE__ */ B({
1161
- ...hs,
1162
- props: Xn,
1163
- setup(e, { expose: t }) {
1164
- const n = e, { role: o, triggerRef: r } = ee(Ft, void 0);
1165
- rs(r);
1166
- const s = P(() => c.value ? n.id : void 0), a = P(() => {
1167
- if (o && o.value === "tooltip")
1168
- return n.open && n.id ? n.id : void 0;
1169
- }), c = P(() => {
1170
- if (o && o.value !== "tooltip")
1171
- return o.value;
1172
- }), l = P(() => c.value ? `${n.open}` : void 0);
1173
- let u;
1174
- return ie(() => {
1175
- L(() => n.virtualRef, (d) => {
1176
- d && (r.value = ve(d));
1177
- }, {
1178
- immediate: !0
1179
- }), L(r, (d, h) => {
1180
- u == null || u(), u = void 0, Ye(d) && ([
1181
- "onMouseenter",
1182
- "onMouseleave",
1183
- "onClick",
1184
- "onKeydown",
1185
- "onFocus",
1186
- "onBlur",
1187
- "onContextmenu"
1188
- ].forEach((m) => {
1189
- var g;
1190
- const i = n[m];
1191
- i && (d.addEventListener(m.slice(2).toLowerCase(), i), (g = h == null ? void 0 : h.removeEventListener) == null || g.call(h, m.slice(2).toLowerCase(), i));
1192
- }), u = L([s, a, c, l], (m) => {
1193
- [
1194
- "aria-controls",
1195
- "aria-describedby",
1196
- "aria-haspopup",
1197
- "aria-expanded"
1198
- ].forEach((g, i) => {
1199
- wt(m[i]) ? d.removeAttribute(g) : d.setAttribute(g, m[i]);
1200
- });
1201
- }, { immediate: !0 })), Ye(h) && [
1202
- "aria-controls",
1203
- "aria-describedby",
1204
- "aria-haspopup",
1205
- "aria-expanded"
1206
- ].forEach((m) => h.removeAttribute(m));
1207
- }, {
1208
- immediate: !0
1209
- });
1210
- }), le(() => {
1211
- u == null || u(), u = void 0;
1212
- }), t({
1213
- triggerRef: r
1214
- }), (d, h) => d.virtualTriggering ? he("v-if", !0) : (D(), ge(v(gs), tt({ key: 0 }, d.$attrs, {
1215
- "aria-controls": v(s),
1216
- "aria-describedby": v(a),
1217
- "aria-expanded": v(l),
1218
- "aria-haspopup": v(c)
1219
- }), {
1220
- default: J(() => [
1221
- G(d.$slots, "default")
1222
- ]),
1223
- _: 3
1224
- }, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
1225
- }
1226
- });
1227
- var bs = /* @__PURE__ */ ce(ys, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);
1228
- const ct = "focus-trap.focus-after-trapped", ft = "focus-trap.focus-after-released", ws = "focus-trap.focusout-prevented", gn = {
1229
- cancelable: !0,
1230
- bubbles: !1
1231
- }, Es = {
1232
- cancelable: !0,
1233
- bubbles: !1
1234
- }, hn = "focusAfterTrapped", yn = "focusAfterReleased", Os = Symbol("elFocusTrap"), kt = R(), ot = R(0), Nt = R(0);
1235
- let Ue = 0;
1236
- const eo = (e) => {
1237
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1238
- acceptNode: (o) => {
1239
- const r = o.tagName === "INPUT" && o.type === "hidden";
1240
- return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1241
- }
1242
- });
1243
- for (; n.nextNode(); )
1244
- t.push(n.currentNode);
1245
- return t;
1246
- }, bn = (e, t) => {
1247
- for (const n of e)
1248
- if (!Ts(n, t))
1249
- return n;
1250
- }, Ts = (e, t) => {
1251
- if (process.env.NODE_ENV === "test")
1252
- return !1;
1253
- if (getComputedStyle(e).visibility === "hidden")
1254
- return !0;
1255
- for (; e; ) {
1256
- if (t && e === t)
1257
- return !1;
1258
- if (getComputedStyle(e).display === "none")
1259
- return !0;
1260
- e = e.parentElement;
1261
- }
1262
- return !1;
1263
- }, Cs = (e) => {
1264
- const t = eo(e), n = bn(t, e), o = bn(t.reverse(), e);
1265
- return [n, o];
1266
- }, Ps = (e) => e instanceof HTMLInputElement && "select" in e, ae = (e, t) => {
1267
- if (e && e.focus) {
1268
- const n = document.activeElement;
1269
- e.focus({ preventScroll: !0 }), Nt.value = window.performance.now(), e !== n && Ps(e) && t && e.select();
1270
- }
1271
- };
1272
- function wn(e, t) {
1273
- const n = [...e], o = e.indexOf(t);
1274
- return o !== -1 && n.splice(o, 1), n;
1275
- }
1276
- const Is = () => {
1277
- let e = [];
1278
- return {
1279
- push: (o) => {
1280
- const r = e[0];
1281
- r && o !== r && r.pause(), e = wn(e, o), e.unshift(o);
1282
- },
1283
- remove: (o) => {
1284
- var r, s;
1285
- e = wn(e, o), (s = (r = e[0]) == null ? void 0 : r.resume) == null || s.call(r);
1286
- }
1287
- };
1288
- }, _s = (e, t = !1) => {
1289
- const n = document.activeElement;
1290
- for (const o of e)
1291
- if (ae(o, t), document.activeElement !== n)
1292
- return;
1293
- }, En = Is(), xs = () => ot.value > Nt.value, qe = () => {
1294
- kt.value = "pointer", ot.value = window.performance.now();
1295
- }, On = () => {
1296
- kt.value = "keyboard", ot.value = window.performance.now();
1297
- }, Rs = () => (ie(() => {
1298
- Ue === 0 && (document.addEventListener("mousedown", qe), document.addEventListener("touchstart", qe), document.addEventListener("keydown", On)), Ue++;
1299
- }), le(() => {
1300
- Ue--, Ue <= 0 && (document.removeEventListener("mousedown", qe), document.removeEventListener("touchstart", qe), document.removeEventListener("keydown", On));
1301
- }), {
1302
- focusReason: kt,
1303
- lastUserFocusTimestamp: ot,
1304
- lastAutomatedFocusTimestamp: Nt
1305
- }), ze = (e) => new CustomEvent(ws, {
1306
- ...Es,
1307
- detail: e
1308
- }), As = B({
1309
- name: "ElFocusTrap",
1310
- inheritAttrs: !1,
1311
- props: {
1312
- loop: Boolean,
1313
- trapped: Boolean,
1314
- focusTrapEl: Object,
1315
- focusStartEl: {
1316
- type: [Object, String],
1317
- default: "first"
1318
- }
1319
- },
1320
- emits: [
1321
- hn,
1322
- yn,
1323
- "focusin",
1324
- "focusout",
1325
- "focusout-prevented",
1326
- "release-requested"
1327
- ],
1328
- setup(e, { emit: t }) {
1329
- const n = R();
1330
- let o, r;
1331
- const { focusReason: s } = Rs();
1332
- Xr((i) => {
1333
- e.trapped && !a.paused && t("release-requested", i);
1334
- });
1335
- const a = {
1336
- paused: !1,
1337
- pause() {
1338
- this.paused = !0;
1339
- },
1340
- resume() {
1341
- this.paused = !1;
1342
- }
1343
- }, c = (i) => {
1344
- if (!e.loop && !e.trapped || a.paused)
1345
- return;
1346
- const { key: f, altKey: y, ctrlKey: p, metaKey: w, currentTarget: T, shiftKey: b } = i, { loop: C } = e, _ = f === Ge.tab && !y && !p && !w, O = document.activeElement;
1347
- if (_ && O) {
1348
- const I = T, [S, x] = Cs(I);
1349
- if (S && x) {
1350
- if (!b && O === x) {
1351
- const A = ze({
1352
- focusReason: s.value
1353
- });
1354
- t("focusout-prevented", A), A.defaultPrevented || (i.preventDefault(), C && ae(S, !0));
1355
- } else if (b && [S, I].includes(O)) {
1356
- const A = ze({
1357
- focusReason: s.value
1358
- });
1359
- t("focusout-prevented", A), A.defaultPrevented || (i.preventDefault(), C && ae(x, !0));
1360
- }
1361
- } else if (O === I) {
1362
- const A = ze({
1363
- focusReason: s.value
1364
- });
1365
- t("focusout-prevented", A), A.defaultPrevented || i.preventDefault();
1366
- }
1367
- }
1368
- };
1369
- Ee(Os, {
1370
- focusTrapRef: n,
1371
- onKeydown: c
1372
- }), L(() => e.focusTrapEl, (i) => {
1373
- i && (n.value = i);
1374
- }, { immediate: !0 }), L([n], ([i], [f]) => {
1375
- i && (i.addEventListener("keydown", c), i.addEventListener("focusin", d), i.addEventListener("focusout", h)), f && (f.removeEventListener("keydown", c), f.removeEventListener("focusin", d), f.removeEventListener("focusout", h));
1376
- });
1377
- const l = (i) => {
1378
- t(hn, i);
1379
- }, u = (i) => t(yn, i), d = (i) => {
1380
- const f = v(n);
1381
- if (!f)
1382
- return;
1383
- const y = i.target, p = i.relatedTarget, w = y && f.contains(y);
1384
- e.trapped || p && f.contains(p) || (o = p), w && t("focusin", i), !a.paused && e.trapped && (w ? r = y : ae(r, !0));
1385
- }, h = (i) => {
1386
- const f = v(n);
1387
- if (!(a.paused || !f))
1388
- if (e.trapped) {
1389
- const y = i.relatedTarget;
1390
- !wt(y) && !f.contains(y) && setTimeout(() => {
1391
- if (!a.paused && e.trapped) {
1392
- const p = ze({
1393
- focusReason: s.value
1394
- });
1395
- t("focusout-prevented", p), p.defaultPrevented || ae(r, !0);
1396
- }
1397
- }, 0);
1398
- } else {
1399
- const y = i.target;
1400
- y && f.contains(y) || t("focusout", i);
1401
- }
1402
- };
1403
- async function m() {
1404
- await Ut();
1405
- const i = v(n);
1406
- if (i) {
1407
- En.push(a);
1408
- const f = i.contains(document.activeElement) ? o : document.activeElement;
1409
- if (o = f, !i.contains(f)) {
1410
- const p = new Event(ct, gn);
1411
- i.addEventListener(ct, l), i.dispatchEvent(p), p.defaultPrevented || Ut(() => {
1412
- let w = e.focusStartEl;
1413
- An(w) || (ae(w), document.activeElement !== w && (w = "first")), w === "first" && _s(eo(i), !0), (document.activeElement === f || w === "container") && ae(i);
1414
- });
1415
- }
1416
- }
1417
- }
1418
- function g() {
1419
- const i = v(n);
1420
- if (i) {
1421
- i.removeEventListener(ct, l);
1422
- const f = new CustomEvent(ft, {
1423
- ...gn,
1424
- detail: {
1425
- focusReason: s.value
1426
- }
1427
- });
1428
- i.addEventListener(ft, u), i.dispatchEvent(f), !f.defaultPrevented && (s.value == "keyboard" || !xs() || i.contains(document.activeElement)) && ae(o ?? document.body), i.removeEventListener(ft, u), En.remove(a);
1429
- }
1430
- }
1431
- return ie(() => {
1432
- e.trapped && m(), L(() => e.trapped, (i) => {
1433
- i ? m() : g();
1434
- });
1435
- }), le(() => {
1436
- e.trapped && g();
1437
- }), {
1438
- onKeydown: c
1439
- };
1440
- }
1441
- });
1442
- function Ss(e, t, n, o, r, s) {
1443
- return G(e.$slots, "default", { handleKeydown: e.onKeydown });
1444
- }
1445
- var Fs = /* @__PURE__ */ ce(As, [["render", Ss], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
1446
- const ks = ["fixed", "absolute"], Ns = se({
1447
- boundariesPadding: {
1448
- type: Number,
1449
- default: 0
1450
- },
1451
- fallbackPlacements: {
1452
- type: N(Array),
1453
- default: void 0
1454
- },
1455
- gpuAcceleration: {
1456
- type: Boolean,
1457
- default: !0
1458
- },
1459
- offset: {
1460
- type: Number,
1461
- default: 12
1462
- },
1463
- placement: {
1464
- type: String,
1465
- values: Ct,
1466
- default: "bottom"
1467
- },
1468
- popperOptions: {
1469
- type: N(Object),
1470
- default: () => ({})
1471
- },
1472
- strategy: {
1473
- type: String,
1474
- values: ks,
1475
- default: "absolute"
1476
- }
1477
- }), to = se({
1478
- ...Ns,
1479
- id: String,
1480
- style: {
1481
- type: N([String, Array, Object])
1482
- },
1483
- className: {
1484
- type: N([String, Array, Object])
1485
- },
1486
- effect: {
1487
- type: String,
1488
- default: "dark"
1489
- },
1490
- visible: Boolean,
1491
- enterable: {
1492
- type: Boolean,
1493
- default: !0
1494
- },
1495
- pure: Boolean,
1496
- focusOnShow: {
1497
- type: Boolean,
1498
- default: !1
1499
- },
1500
- trapping: {
1501
- type: Boolean,
1502
- default: !1
1503
- },
1504
- popperClass: {
1505
- type: N([String, Array, Object])
1506
- },
1507
- popperStyle: {
1508
- type: N([String, Array, Object])
1509
- },
1510
- referenceEl: {
1511
- type: N(Object)
1512
- },
1513
- triggerTargetEl: {
1514
- type: N(Object)
1515
- },
1516
- stopPopperMouseEvent: {
1517
- type: Boolean,
1518
- default: !0
1519
- },
1520
- ariaLabel: {
1521
- type: String,
1522
- default: void 0
1523
- },
1524
- virtualTriggering: Boolean,
1525
- zIndex: Number
1526
- }), $s = {
1527
- mouseenter: (e) => e instanceof MouseEvent,
1528
- mouseleave: (e) => e instanceof MouseEvent,
1529
- focus: () => !0,
1530
- blur: () => !0,
1531
- close: () => !0
1532
- }, Ls = (e, t = []) => {
1533
- const { placement: n, strategy: o, popperOptions: r } = e, s = {
1534
- placement: n,
1535
- strategy: o,
1536
- ...r,
1537
- modifiers: [...Ms(e), ...t]
1538
- };
1539
- return Ds(s, r == null ? void 0 : r.modifiers), s;
1540
- }, Bs = (e) => {
1541
- if (Q)
1542
- return ve(e);
1543
- };
1544
- function Ms(e) {
1545
- const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
1546
- return [
1547
- {
1548
- name: "offset",
1549
- options: {
1550
- offset: [0, t ?? 12]
1551
- }
1552
- },
1553
- {
1554
- name: "preventOverflow",
1555
- options: {
1556
- padding: {
1557
- top: 2,
1558
- bottom: 2,
1559
- left: 5,
1560
- right: 5
1561
- }
1562
- }
1563
- },
1564
- {
1565
- name: "flip",
1566
- options: {
1567
- padding: 5,
1568
- fallbackPlacements: o
1569
- }
1570
- },
1571
- {
1572
- name: "computeStyles",
1573
- options: {
1574
- gpuAcceleration: n
1575
- }
1576
- }
1577
- ];
1578
- }
1579
- function Ds(e, t) {
1580
- t && (e.modifiers = [...e.modifiers, ...t ?? []]);
1581
- }
1582
- const js = 0, Hs = (e) => {
1583
- const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: r } = ee(Ft, void 0), s = R(), a = R(), c = P(() => ({
1584
- name: "eventListeners",
1585
- enabled: !!e.visible
1586
- })), l = P(() => {
1587
- var p;
1588
- const w = v(s), T = (p = v(a)) != null ? p : js;
1589
- return {
1590
- name: "arrow",
1591
- enabled: !jo(w),
1592
- options: {
1593
- element: w,
1594
- padding: T
1595
- }
1596
- };
1597
- }), u = P(() => ({
1598
- onFirstUpdate: () => {
1599
- i();
1600
- },
1601
- ...Ls(e, [
1602
- v(l),
1603
- v(c)
1604
- ])
1605
- })), d = P(() => Bs(e.referenceEl) || v(o)), { attributes: h, state: m, styles: g, update: i, forceUpdate: f, instanceRef: y } = Jr(d, n, u);
1606
- return L(y, (p) => t.value = p), ie(() => {
1607
- L(() => {
1608
- var p;
1609
- return (p = v(d)) == null ? void 0 : p.getBoundingClientRect();
1610
- }, () => {
1611
- i();
1612
- });
1613
- }), {
1614
- attributes: h,
1615
- arrowRef: s,
1616
- contentRef: n,
1617
- instanceRef: y,
1618
- state: m,
1619
- styles: g,
1620
- role: r,
1621
- forceUpdate: f,
1622
- update: i
1623
- };
1624
- }, Ks = (e, {
1625
- attributes: t,
1626
- styles: n,
1627
- role: o
1628
- }) => {
1629
- const { nextZIndex: r } = ls(), s = Le("popper"), a = P(() => v(t).popper), c = R(Qe(e.zIndex) ? e.zIndex : r()), l = P(() => [
1630
- s.b(),
1631
- s.is("pure", e.pure),
1632
- s.is(e.effect),
1633
- e.popperClass
1634
- ]), u = P(() => [
1635
- { zIndex: v(c) },
1636
- v(n).popper,
1637
- e.popperStyle || {}
1638
- ]), d = P(() => o.value === "dialog" ? "false" : void 0), h = P(() => v(n).arrow || {});
1639
- return {
1640
- ariaModal: d,
1641
- arrowStyle: h,
1642
- contentAttrs: a,
1643
- contentClass: l,
1644
- contentStyle: u,
1645
- contentZIndex: c,
1646
- updateZIndex: () => {
1647
- c.value = Qe(e.zIndex) ? e.zIndex : r();
1648
- }
1649
- };
1650
- }, Vs = (e, t) => {
1651
- const n = R(!1), o = R();
1652
- return {
1653
- focusStartRef: o,
1654
- trapped: n,
1655
- onFocusAfterReleased: (u) => {
1656
- var d;
1657
- ((d = u.detail) == null ? void 0 : d.focusReason) !== "pointer" && (o.value = "first", t("blur"));
1658
- },
1659
- onFocusAfterTrapped: () => {
1660
- t("focus");
1661
- },
1662
- onFocusInTrap: (u) => {
1663
- e.visible && !n.value && (u.target && (o.value = u.target), n.value = !0);
1664
- },
1665
- onFocusoutPrevented: (u) => {
1666
- e.trapping || (u.detail.focusReason === "pointer" && u.preventDefault(), n.value = !1);
1667
- },
1668
- onReleaseRequested: () => {
1669
- n.value = !1, t("close");
1670
- }
1671
- };
1672
- }, Ws = B({
1673
- name: "ElPopperContent"
1674
- }), Us = /* @__PURE__ */ B({
1675
- ...Ws,
1676
- props: to,
1677
- emits: $s,
1678
- setup(e, { expose: t, emit: n }) {
1679
- const o = e, {
1680
- focusStartRef: r,
1681
- trapped: s,
1682
- onFocusAfterReleased: a,
1683
- onFocusAfterTrapped: c,
1684
- onFocusInTrap: l,
1685
- onFocusoutPrevented: u,
1686
- onReleaseRequested: d
1687
- } = Vs(o, n), { attributes: h, arrowRef: m, contentRef: g, styles: i, instanceRef: f, role: y, update: p } = Hs(o), {
1688
- ariaModal: w,
1689
- arrowStyle: T,
1690
- contentAttrs: b,
1691
- contentClass: C,
1692
- contentStyle: _,
1693
- updateZIndex: O
1694
- } = Ks(o, {
1695
- styles: i,
1696
- attributes: h,
1697
- role: y
1698
- }), I = ee(vn, void 0), S = R();
1699
- Ee(Jn, {
1700
- arrowStyle: T,
1701
- arrowRef: m,
1702
- arrowOffset: S
1703
- }), I && (I.addInputId || I.removeInputId) && Ee(vn, {
1704
- ...I,
1705
- addInputId: dt,
1706
- removeInputId: dt
1707
- });
1708
- let x;
1709
- const F = (k = !0) => {
1710
- p(), k && O();
1711
- }, A = () => {
1712
- F(!1), o.visible && o.focusOnShow ? s.value = !0 : o.visible === !1 && (s.value = !1);
1713
- };
1714
- return ie(() => {
1715
- L(() => o.triggerTargetEl, (k, j) => {
1716
- x == null || x(), x = void 0;
1717
- const M = v(k || g.value), $ = v(j || g.value);
1718
- Ye(M) && (x = L([y, () => o.ariaLabel, w, () => o.id], (E) => {
1719
- ["role", "aria-label", "aria-modal", "id"].forEach((H, Z) => {
1720
- wt(E[Z]) ? M.removeAttribute(H) : M.setAttribute(H, E[Z]);
1721
- });
1722
- }, { immediate: !0 })), $ !== M && Ye($) && ["role", "aria-label", "aria-modal", "id"].forEach((E) => {
1723
- $.removeAttribute(E);
1724
- });
1725
- }, { immediate: !0 }), L(() => o.visible, A, { immediate: !0 });
1726
- }), le(() => {
1727
- x == null || x(), x = void 0;
1728
- }), t({
1729
- popperContentRef: g,
1730
- popperInstanceRef: f,
1731
- updatePopper: F,
1732
- contentStyle: _
1733
- }), (k, j) => (D(), oe("div", tt({
1734
- ref_key: "contentRef",
1735
- ref: g
1736
- }, v(b), {
1737
- style: v(_),
1738
- class: v(C),
1739
- tabindex: "-1",
1740
- onMouseenter: j[0] || (j[0] = (M) => k.$emit("mouseenter", M)),
1741
- onMouseleave: j[1] || (j[1] = (M) => k.$emit("mouseleave", M))
1742
- }), [
1743
- ke(v(Fs), {
1744
- trapped: v(s),
1745
- "trap-on-focus-in": !0,
1746
- "focus-trap-el": v(g),
1747
- "focus-start-el": v(r),
1748
- onFocusAfterTrapped: v(c),
1749
- onFocusAfterReleased: v(a),
1750
- onFocusin: v(l),
1751
- onFocusoutPrevented: v(u),
1752
- onReleaseRequested: v(d)
1753
- }, {
1754
- default: J(() => [
1755
- G(k.$slots, "default")
1756
- ]),
1757
- _: 3
1758
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
1759
- ], 16));
1760
- }
1761
- });
1762
- var qs = /* @__PURE__ */ ce(Us, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);
1763
- const zs = kn(ps), $t = Symbol("elTooltip"), no = se({
1764
- ...ns,
1765
- ...to,
1766
- appendTo: {
1767
- type: N([String, Object])
1768
- },
1769
- content: {
1770
- type: String,
1771
- default: ""
1772
- },
1773
- rawContent: {
1774
- type: Boolean,
1775
- default: !1
1776
- },
1777
- persistent: Boolean,
1778
- ariaLabel: String,
1779
- visible: {
1780
- type: N(Boolean),
1781
- default: null
1782
- },
1783
- transition: String,
1784
- teleported: {
1785
- type: Boolean,
1786
- default: !0
1787
- },
1788
- disabled: Boolean
1789
- }), oo = se({
1790
- ...Xn,
1791
- disabled: Boolean,
1792
- trigger: {
1793
- type: N([String, Array]),
1794
- default: "hover"
1795
- },
1796
- triggerKeys: {
1797
- type: N(Array),
1798
- default: () => [Ge.enter, Ge.space]
1799
- }
1800
- }), {
1801
- useModelToggleProps: Zs,
1802
- useModelToggleEmits: Js,
1803
- useModelToggle: Qs
1804
- } = Nn("visible"), Ys = se({
1805
- ...Qn,
1806
- ...Zs,
1807
- ...no,
1808
- ...oo,
1809
- ...Yn,
1810
- showArrow: {
1811
- type: Boolean,
1812
- default: !0
1813
- }
1814
- }), Gs = [
1815
- ...Js,
1816
- "before-show",
1817
- "before-hide",
1818
- "show",
1819
- "hide",
1820
- "open",
1821
- "close"
1822
- ], Xs = (e, t) => Do(e) ? e.includes(t) : e === t, be = (e, t, n) => (o) => {
1823
- Xs(v(e), t) && n(o);
1824
- }, ea = B({
1825
- name: "ElTooltipTrigger"
1826
- }), ta = /* @__PURE__ */ B({
1827
- ...ea,
1828
- props: oo,
1829
- setup(e, { expose: t }) {
1830
- const n = e, o = Le("tooltip"), { controlled: r, id: s, open: a, onOpen: c, onClose: l, onToggle: u } = ee($t, void 0), d = R(null), h = () => {
1831
- if (v(r) || n.disabled)
1832
- return !0;
1833
- }, m = Ae(n, "trigger"), g = ne(h, be(m, "hover", c)), i = ne(h, be(m, "hover", l)), f = ne(h, be(m, "click", (b) => {
1834
- b.button === 0 && u(b);
1835
- })), y = ne(h, be(m, "focus", c)), p = ne(h, be(m, "focus", l)), w = ne(h, be(m, "contextmenu", (b) => {
1836
- b.preventDefault(), u(b);
1837
- })), T = ne(h, (b) => {
1838
- const { code: C } = b;
1839
- n.triggerKeys.includes(C) && (b.preventDefault(), u(b));
1840
- });
1841
- return t({
1842
- triggerRef: d
1843
- }), (b, C) => (D(), ge(v(bs), {
1844
- id: v(s),
1845
- "virtual-ref": b.virtualRef,
1846
- open: v(a),
1847
- "virtual-triggering": b.virtualTriggering,
1848
- class: Je(v(o).e("trigger")),
1849
- onBlur: v(p),
1850
- onClick: v(f),
1851
- onContextmenu: v(w),
1852
- onFocus: v(y),
1853
- onMouseenter: v(g),
1854
- onMouseleave: v(i),
1855
- onKeydown: v(T)
1856
- }, {
1857
- default: J(() => [
1858
- G(b.$slots, "default")
1859
- ]),
1860
- _: 3
1861
- }, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
1862
- }
1863
- });
1864
- var na = /* @__PURE__ */ ce(ta, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);
1865
- const oa = B({
1866
- name: "ElTooltipContent",
1867
- inheritAttrs: !1
1868
- }), ra = /* @__PURE__ */ B({
1869
- ...oa,
1870
- props: no,
1871
- setup(e, { expose: t }) {
1872
- const n = e, { selector: o } = zn(), r = Le("tooltip"), s = R(null), a = R(!1), {
1873
- controlled: c,
1874
- id: l,
1875
- open: u,
1876
- trigger: d,
1877
- onClose: h,
1878
- onOpen: m,
1879
- onShow: g,
1880
- onHide: i,
1881
- onBeforeShow: f,
1882
- onBeforeHide: y
1883
- } = ee($t, void 0), p = P(() => n.transition || `${r.namespace.value}-fade-in-linear`), w = P(() => process.env.NODE_ENV === "test" ? !0 : n.persistent);
1884
- le(() => {
1885
- a.value = !0;
1886
- });
1887
- const T = P(() => v(w) ? !0 : v(u)), b = P(() => n.disabled ? !1 : v(u)), C = P(() => n.appendTo || o.value), _ = P(() => {
1888
- var E;
1889
- return (E = n.style) != null ? E : {};
1890
- }), O = P(() => !v(u)), I = () => {
1891
- i();
1892
- }, S = () => {
1893
- if (v(c))
1894
- return !0;
1895
- }, x = ne(S, () => {
1896
- n.enterable && v(d) === "hover" && m();
1897
- }), F = ne(S, () => {
1898
- v(d) === "hover" && h();
1899
- }), A = () => {
1900
- var E, H;
1901
- (H = (E = s.value) == null ? void 0 : E.updatePopper) == null || H.call(E), f == null || f();
1902
- }, k = () => {
1903
- y == null || y();
1904
- }, j = () => {
1905
- g(), $ = Fo(P(() => {
1906
- var E;
1907
- return (E = s.value) == null ? void 0 : E.popperContentRef;
1908
- }), () => {
1909
- if (v(c))
1910
- return;
1911
- v(d) !== "hover" && h();
1912
- });
1913
- }, M = () => {
1914
- n.virtualTriggering || h();
1915
- };
1916
- let $;
1917
- return L(() => v(u), (E) => {
1918
- E || $ == null || $();
1919
- }, {
1920
- flush: "post"
1921
- }), L(() => n.content, () => {
1922
- var E, H;
1923
- (H = (E = s.value) == null ? void 0 : E.updatePopper) == null || H.call(E);
1924
- }), t({
1925
- contentRef: s
1926
- }), (E, H) => (D(), ge(bo, {
1927
- disabled: !E.teleported,
1928
- to: v(C)
1929
- }, [
1930
- ke(wo, {
1931
- name: v(p),
1932
- onAfterLeave: I,
1933
- onBeforeEnter: A,
1934
- onAfterEnter: j,
1935
- onBeforeLeave: k
1936
- }, {
1937
- default: J(() => [
1938
- v(T) ? yt((D(), ge(v(qs), tt({
1939
- key: 0,
1940
- id: v(l),
1941
- ref_key: "contentRef",
1942
- ref: s
1943
- }, E.$attrs, {
1944
- "aria-label": E.ariaLabel,
1945
- "aria-hidden": v(O),
1946
- "boundaries-padding": E.boundariesPadding,
1947
- "fallback-placements": E.fallbackPlacements,
1948
- "gpu-acceleration": E.gpuAcceleration,
1949
- offset: E.offset,
1950
- placement: E.placement,
1951
- "popper-options": E.popperOptions,
1952
- strategy: E.strategy,
1953
- effect: E.effect,
1954
- enterable: E.enterable,
1955
- pure: E.pure,
1956
- "popper-class": E.popperClass,
1957
- "popper-style": [E.popperStyle, v(_)],
1958
- "reference-el": E.referenceEl,
1959
- "trigger-target-el": E.triggerTargetEl,
1960
- visible: v(b),
1961
- "z-index": E.zIndex,
1962
- onMouseenter: v(x),
1963
- onMouseleave: v(F),
1964
- onBlur: M,
1965
- onClose: v(h)
1966
- }), {
1967
- default: J(() => [
1968
- a.value ? he("v-if", !0) : G(E.$slots, "default", { key: 0 })
1969
- ]),
1970
- _: 3
1971
- }, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
1972
- [Eo, v(b)]
1973
- ]) : he("v-if", !0)
1974
- ]),
1975
- _: 3
1976
- }, 8, ["name"])
1977
- ], 8, ["disabled", "to"]));
1978
- }
1979
- });
1980
- var sa = /* @__PURE__ */ ce(ra, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);
1981
- const aa = ["innerHTML"], ia = { key: 1 }, la = B({
1982
- name: "ElTooltip"
1983
- }), ua = /* @__PURE__ */ B({
1984
- ...la,
1985
- props: Ys,
1986
- emits: Gs,
1987
- setup(e, { expose: t, emit: n }) {
1988
- const o = e;
1989
- ts();
1990
- const r = Gr(), s = R(), a = R(), c = () => {
1991
- var p;
1992
- const w = v(s);
1993
- w && ((p = w.popperInstanceRef) == null || p.update());
1994
- }, l = R(!1), u = R(), { show: d, hide: h, hasUpdateHandler: m } = Qs({
1995
- indicator: l,
1996
- toggleReason: u
1997
- }), { onOpen: g, onClose: i } = os({
1998
- showAfter: Ae(o, "showAfter"),
1999
- hideAfter: Ae(o, "hideAfter"),
2000
- autoClose: Ae(o, "autoClose"),
2001
- open: d,
2002
- close: h
2003
- }), f = P(() => Sn(o.visible) && !m.value);
2004
- Ee($t, {
2005
- controlled: f,
2006
- id: r,
2007
- open: Oo(l),
2008
- trigger: Ae(o, "trigger"),
2009
- onOpen: (p) => {
2010
- g(p);
2011
- },
2012
- onClose: (p) => {
2013
- i(p);
2014
- },
2015
- onToggle: (p) => {
2016
- v(l) ? i(p) : g(p);
2017
- },
2018
- onShow: () => {
2019
- n("show", u.value);
2020
- },
2021
- onHide: () => {
2022
- n("hide", u.value);
2023
- },
2024
- onBeforeShow: () => {
2025
- n("before-show", u.value);
2026
- },
2027
- onBeforeHide: () => {
2028
- n("before-hide", u.value);
2029
- },
2030
- updatePopper: c
2031
- }), L(() => o.disabled, (p) => {
2032
- p && l.value && (l.value = !1);
2033
- });
2034
- const y = (p) => {
2035
- var w, T;
2036
- const b = (T = (w = a.value) == null ? void 0 : w.contentRef) == null ? void 0 : T.popperContentRef, C = (p == null ? void 0 : p.relatedTarget) || document.activeElement;
2037
- return b && b.contains(C);
2038
- };
2039
- return To(() => l.value && h()), t({
2040
- popperRef: s,
2041
- contentRef: a,
2042
- isFocusInsideContent: y,
2043
- updatePopper: c,
2044
- onOpen: g,
2045
- onClose: i,
2046
- hide: h
2047
- }), (p, w) => (D(), ge(v(zs), {
2048
- ref_key: "popperRef",
2049
- ref: s,
2050
- role: p.role
2051
- }, {
2052
- default: J(() => [
2053
- ke(na, {
2054
- disabled: p.disabled,
2055
- trigger: p.trigger,
2056
- "trigger-keys": p.triggerKeys,
2057
- "virtual-ref": p.virtualRef,
2058
- "virtual-triggering": p.virtualTriggering
2059
- }, {
2060
- default: J(() => [
2061
- p.$slots.default ? G(p.$slots, "default", { key: 0 }) : he("v-if", !0)
2062
- ]),
2063
- _: 3
2064
- }, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
2065
- ke(sa, {
2066
- ref_key: "contentRef",
2067
- ref: a,
2068
- "aria-label": p.ariaLabel,
2069
- "boundaries-padding": p.boundariesPadding,
2070
- content: p.content,
2071
- disabled: p.disabled,
2072
- effect: p.effect,
2073
- enterable: p.enterable,
2074
- "fallback-placements": p.fallbackPlacements,
2075
- "hide-after": p.hideAfter,
2076
- "gpu-acceleration": p.gpuAcceleration,
2077
- offset: p.offset,
2078
- persistent: p.persistent,
2079
- "popper-class": p.popperClass,
2080
- "popper-style": p.popperStyle,
2081
- placement: p.placement,
2082
- "popper-options": p.popperOptions,
2083
- pure: p.pure,
2084
- "raw-content": p.rawContent,
2085
- "reference-el": p.referenceEl,
2086
- "trigger-target-el": p.triggerTargetEl,
2087
- "show-after": p.showAfter,
2088
- strategy: p.strategy,
2089
- teleported: p.teleported,
2090
- transition: p.transition,
2091
- "virtual-triggering": p.virtualTriggering,
2092
- "z-index": p.zIndex,
2093
- "append-to": p.appendTo
2094
- }, {
2095
- default: J(() => [
2096
- G(p.$slots, "content", {}, () => [
2097
- p.rawContent ? (D(), oe("span", {
2098
- key: 0,
2099
- innerHTML: p.content
2100
- }, null, 8, aa)) : (D(), oe("span", ia, pt(p.content), 1))
2101
- ]),
2102
- p.showArrow ? (D(), ge(v(ms), {
2103
- key: 0,
2104
- "arrow-offset": p.arrowOffset
2105
- }, null, 8, ["arrow-offset"])) : he("v-if", !0)
2106
- ]),
2107
- _: 3
2108
- }, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
2109
- ]),
2110
- _: 3
2111
- }, 8, ["role"]));
2112
- }
2113
- });
2114
- var ca = /* @__PURE__ */ ce(ua, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);
2115
- const fa = kn(ca), pa = ["innerHTML"], da = { key: 1 }, va = /* @__PURE__ */ B({
9
+ const O = ["innerHTML"], j = { key: 1 }, A = /* @__PURE__ */ D({
2116
10
  __name: "index",
2117
11
  props: {
2118
12
  selfPopperClass: { default: "" },
@@ -2127,86 +21,86 @@ const fa = kn(ca), pa = ["innerHTML"], da = { key: 1 }, va = /* @__PURE__ */ B({
2127
21
  isMaxheight: { type: Boolean, default: !0 }
2128
22
  },
2129
23
  emits: ["show", "hide"],
2130
- setup(e, { expose: t, emit: n }) {
2131
- Co((i) => ({
2132
- "474cc7be": c.value
24
+ setup(i, { expose: d, emit: r }) {
25
+ E((e) => ({
26
+ "474cc7be": B.value
2133
27
  }));
2134
- const o = e, r = n, s = R(), a = R(!1), c = P(() => Number(o.row)), l = P(() => o.disabled ?? (o.text ? !a.value : !1)), u = P(() => o.content || o.text), d = (i) => {
2135
- a.value = i.target.scrollHeight > i.target.clientHeight;
2136
- }, h = (i) => {
2137
- r("show", i);
2138
- }, m = (i) => {
2139
- r("hide", i), window.removeEventListener("wheel", g);
2140
- }, g = (i) => {
2141
- var b;
2142
- const f = document.querySelector('[id^="el-popper-container"]');
2143
- if (!f) return;
2144
- const y = f.querySelector(".das-ui-tooltip-popper");
2145
- if (!y) return;
2146
- const p = i.clientX, w = i.clientY, T = y == null ? void 0 : y.getBoundingClientRect();
2147
- y && p >= T.left && p <= T.right && w >= T.top && w <= T.bottom || (b = s.value) == null || b.hide();
28
+ const t = i, a = r, c = u(), m = u(!1), B = f(() => Number(t.row)), T = f(() => t.disabled ?? (t.text ? !m.value : !1)), h = f(() => t.content || t.text), H = (e) => {
29
+ m.value = e.target.scrollHeight > e.target.clientHeight;
30
+ }, S = (e) => {
31
+ a("show", e);
32
+ }, R = (e) => {
33
+ a("hide", e), window.removeEventListener("wheel", g);
34
+ }, g = (e) => {
35
+ var y;
36
+ const l = document.querySelector('[id^="el-popper-container"]');
37
+ if (!l) return;
38
+ const o = l.querySelector(".das-ui-tooltip-popper");
39
+ if (!o) return;
40
+ const v = e.clientX, w = e.clientY, p = o == null ? void 0 : o.getBoundingClientRect();
41
+ o && v >= p.left && v <= p.right && w >= p.top && w <= p.bottom || (y = c.value) == null || y.hide();
2148
42
  };
2149
- return ie(() => {
2150
- }), Tn(() => {
43
+ return L(() => {
44
+ }), _(() => {
2151
45
  window.removeEventListener("wheel", g);
2152
- }), t({
2153
- $tooltipRef: s
2154
- }), (i, f) => (D(), ge(v(fa), tt({
46
+ }), d({
47
+ $tooltipRef: c
48
+ }), (e, l) => (s(), N(C(Y), P({
2155
49
  ref_key: "$tooltipRef",
2156
- ref: s,
50
+ ref: c,
2157
51
  class: "das-ui-tooltip",
2158
- disabled: l.value,
2159
- effect: i.effect,
2160
- "popper-class": `das-ui-tooltip-popper ${i.isMaxheight ? "max-height" : ""} ${i.selfPopperClass}`,
52
+ disabled: T.value,
53
+ effect: e.effect,
54
+ "popper-class": `das-ui-tooltip-popper ${e.isMaxheight ? "max-height" : ""} ${e.selfPopperClass}`,
2161
55
  "hide-after": 100,
2162
56
  "show-after": 100,
2163
- onShow: h,
2164
- onHide: m
2165
- }, i.$attrs), {
2166
- content: J(() => [
2167
- yt((D(), oe("div", {
2168
- class: Je({ "max-height": i.isMaxheight, "das-popper-content": !0 })
57
+ onShow: S,
58
+ onHide: R
59
+ }, e.$attrs), {
60
+ content: x(() => [
61
+ V((s(), n("div", {
62
+ class: b({ "max-height": e.isMaxheight, "das-popper-content": !0 })
2169
63
  }, [
2170
- G(i.$slots, "content", {}, void 0, !0),
2171
- u.value && !i.$slots.content ? (D(), oe(Pn, { key: 0 }, [
2172
- Po(pt(u.value), 1)
2173
- ], 64)) : he("", !0)
64
+ k(e.$slots, "content", {}, void 0, !0),
65
+ h.value && !e.$slots.content ? (s(), n(W, { key: 0 }, [
66
+ q(M(h.value), 1)
67
+ ], 64)) : $("", !0)
2174
68
  ], 2)), [
2175
- [v(xo)]
69
+ [C(X)]
2176
70
  ])
2177
71
  ]),
2178
- default: J(() => [
2179
- G(i.$slots, "default", {}, () => [
2180
- i.text ? (D(), oe("div", {
72
+ default: x(() => [
73
+ k(e.$slots, "default", {}, () => [
74
+ e.text ? (s(), n("div", {
2181
75
  key: 0,
2182
- onMouseenter: f[0] || (f[0] = (y) => d(y)),
2183
- class: Je(`das-tooltip-text-wrap ${i.customClass}`),
2184
- style: Cn({ width: o.textWidth })
76
+ onMouseenter: l[0] || (l[0] = (o) => H(o)),
77
+ class: b(`das-tooltip-text-wrap ${e.customClass}`),
78
+ style: z({ width: t.textWidth })
2185
79
  }, [
2186
- i.textHtml ? (D(), oe("div", {
80
+ e.textHtml ? (s(), n("div", {
2187
81
  key: 0,
2188
- innerHTML: i.text
2189
- }, null, 8, pa)) : (D(), oe("div", da, pt(i.text), 1))
2190
- ], 38)) : he("", !0)
82
+ innerHTML: e.text
83
+ }, null, 8, O)) : (s(), n("div", j, M(e.text), 1))
84
+ ], 38)) : $("", !0)
2191
85
  ], !0)
2192
86
  ]),
2193
87
  _: 3
2194
88
  }, 16, ["disabled", "effect", "popper-class"]));
2195
89
  }
2196
- }), ma = (e, t) => {
2197
- const n = e.__vccOpts || e;
2198
- for (const [o, r] of t)
2199
- n[o] = r;
2200
- return n;
2201
- }, ga = /* @__PURE__ */ ma(va, [["__scopeId", "data-v-05d76eec"]]), ha = {
90
+ }), G = (i, d) => {
91
+ const r = i.__vccOpts || i;
92
+ for (const [t, a] of d)
93
+ r[t] = a;
94
+ return r;
95
+ }, J = /* @__PURE__ */ G(A, [["__scopeId", "data-v-05d76eec"]]), K = {
2202
96
  "--das-ui-tooltip-font-normal": "#212121",
2203
97
  "--das-ui-tooltip-font-light": "#fff",
2204
98
  "--das-ui-tooltip-bgff-color": "#fff"
2205
99
  };
2206
- Io(ha);
2207
- const Ta = () => R(null), Ca = _o(ga), Pa = { name: "Tooltip 文字提示" };
100
+ F(K);
101
+ const le = () => u(null), ne = I(J), ie = { name: "Tooltip 文字提示" };
2208
102
  export {
2209
- Ca as DasTooltip,
2210
- Ta as DasTooltipRef,
2211
- Pa as default
103
+ ne as DasTooltip,
104
+ le as DasTooltipRef,
105
+ ie as default
2212
106
  };