st-comp 0.0.93 → 0.0.95

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 (84) hide show
  1. package/components.d.ts +13 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +2 -2
  4. package/es/Dialog.cjs +1 -5
  5. package/es/Dialog.js +45 -711
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +463 -1
  8. package/es/Kline.cjs +1 -1
  9. package/es/Kline.js +92 -91
  10. package/es/KlineNew.cjs +1 -1
  11. package/es/KlineNew.js +10 -9
  12. package/es/Pagination.cjs +1 -1
  13. package/es/Pagination.js +106 -104
  14. package/es/Table.cjs +1 -20
  15. package/es/Table.js +361 -4253
  16. package/es/VarietySearch.cjs +1 -1
  17. package/es/VarietySearch.js +2545 -1
  18. package/es/VirtualTable.cjs +3 -3
  19. package/es/VirtualTable.js +249 -254
  20. package/es/base-6e64c2e6.js +762 -0
  21. package/es/base-8776b83e.cjs +9 -0
  22. package/es/castArray-59d5ae43.cjs +1 -0
  23. package/es/castArray-8ec29ca6.js +10 -0
  24. package/es/config-provider-76ef1b35.cjs +1 -0
  25. package/es/config-provider-f4278c8e.js +46 -0
  26. package/es/{el-button-9476b767.js → el-button-4c7ae9df.js} +52 -52
  27. package/es/{el-button-ed961332.cjs → el-button-65e4598f.cjs} +1 -1
  28. package/es/{el-empty-f4c08c01.js → el-empty-05e13b3c.js} +3 -3
  29. package/es/{el-empty-7adcc7f0.cjs → el-empty-dfe11c21.cjs} +1 -1
  30. package/es/el-icon-0ea8fbf8.cjs +1 -0
  31. package/es/el-icon-4ed993c7.js +1 -0
  32. package/es/el-input-11327619.cjs +9 -0
  33. package/es/el-input-f4898cfa.js +544 -0
  34. package/es/el-overlay-9d9c6ba9.cjs +5 -0
  35. package/es/el-overlay-d7af7dda.js +678 -0
  36. package/es/el-popover-4a4a4b02.cjs +1 -0
  37. package/es/el-popover-dc9c7ff7.js +133 -0
  38. package/es/el-radio-group-a31fb7c0.js +1743 -0
  39. package/es/el-radio-group-cc2d6c87.cjs +12 -0
  40. package/es/{el-scrollbar-ffb7b9c1.js → el-scrollbar-a00aca2f.js} +48 -48
  41. package/es/{el-scrollbar-586be9bd.cjs → el-scrollbar-f197b544.cjs} +1 -1
  42. package/es/el-select-5dbb0da3.cjs +1 -0
  43. package/es/el-select-b9cf452e.js +1360 -0
  44. package/es/el-table-column-1e15361e.cjs +20 -0
  45. package/es/el-table-column-675f51e6.js +3795 -0
  46. package/es/el-tag-c9d5baa7.cjs +1 -0
  47. package/es/{el-tag-7549c103.js → el-tag-f878b1f1.js} +126 -119
  48. package/es/{focus-trap-5fc152a0.js → focus-trap-2677bd39.js} +35 -34
  49. package/es/focus-trap-5f42842b.cjs +1 -0
  50. package/es/raf-32ed81f4.js +6 -0
  51. package/es/{raf-c4bba516.cjs → raf-7c366b55.cjs} +1 -1
  52. package/es/{scroll-38e17abc.cjs → scroll-22a00b05.cjs} +1 -1
  53. package/es/{scroll-c6e51ef8.js → scroll-9b9249e9.js} +5 -5
  54. package/es/style.css +1 -1
  55. package/es/use-form-item-67e7ef93.cjs +3 -0
  56. package/es/use-form-item-bfc7dddf.js +669 -0
  57. package/es/use-global-config-89daeba3.js +110 -0
  58. package/es/use-global-config-f9103903.cjs +1 -0
  59. package/es/{vnode-40f9df3c.cjs → vnode-69f3ca85.cjs} +1 -1
  60. package/es/{vnode-f4b846cb.js → vnode-aa3448ec.js} +1 -1
  61. package/es/zh-cn-720e514b.cjs +1 -0
  62. package/es/{zh-cn-e36dfbf4.js → zh-cn-e662dc89.js} +6 -45
  63. package/lib/bundle.js +1 -1
  64. package/lib/bundle.umd.cjs +174 -174
  65. package/lib/{index-4635557b.js → index-5fe750ca.js} +27924 -27395
  66. package/lib/{python-aa056c80.js → python-65fdc0e1.js} +1 -1
  67. package/lib/style.css +1 -1
  68. package/package.json +1 -1
  69. package/packages/VarietySearch/components/CommonIndicator/index.vue +270 -112
  70. package/packages/VarietySearch/components/FactorScreen/index.vue +44 -5
  71. package/packages/VarietySearch/config.js +12 -1
  72. package/packages/VarietySearch/index.vue +8 -0
  73. package/es/base-8aa55db5.js +0 -725
  74. package/es/base-b187e78f.cjs +0 -9
  75. package/es/el-select-a6cf0236.js +0 -1893
  76. package/es/el-select-eaa79c54.cjs +0 -9
  77. package/es/el-tag-5a8b728a.cjs +0 -1
  78. package/es/focus-trap-ea1e7a19.cjs +0 -1
  79. package/es/raf-3a2b250a.js +0 -6
  80. package/es/use-form-item-bd4b9eeb.js +0 -531
  81. package/es/use-form-item-c25c7251.cjs +0 -3
  82. package/es/use-global-config-2d21cd56.js +0 -110
  83. package/es/use-global-config-bce8cdd8.cjs +0 -1
  84. package/es/zh-cn-a61d484e.cjs +0 -1
@@ -1,1893 +0,0 @@
1
- import { computed as v, getCurrentInstance as sl, ref as K, shallowRef as Re, watch as W, defineComponent as ge, useAttrs as nt, useSlots as ot, nextTick as D, onMounted as ml, toRef as it, withDirectives as He, openBlock as y, createElementBlock as k, mergeProps as El, unref as a, createCommentVNode as I, Fragment as Ae, normalizeClass as C, renderSlot as X, createElementVNode as z, createBlock as M, withCtx as L, resolveDynamicComponent as Ne, withModifiers as ee, createVNode as he, toDisplayString as Y, normalizeStyle as se, vShow as hl, Transition as $l, inject as cl, toRaw as pl, reactive as bl, toRefs as Ml, onBeforeUnmount as at, triggerRef as ol, provide as Ql, resolveComponent as Ee, resolveDirective as st, renderList as Tl, withKeys as x, vModelText as rt, createSlots as ut } from "vue";
2
- import { t as dt, u as ct, a as zl, d as Bl } from "./el-scrollbar-ffb7b9c1.js";
3
- import { b as pt, i as Nl, E as ft, a as vt, C as mt, u as ht, c as bt } from "./el-tag-7549c103.js";
4
- import { p as gt, h as Ul, u as yt, g as fl, c as Gl, q as St, e as Pl, f as Ct, V as Yl, v as wt, r as Ot, E as Te, s as Xl, t as Rl, b as It, w as Et } from "./use-form-item-bd4b9eeb.js";
5
- import { a as Al, n as il, T as Tt, E as Vl, b as Zl, d as Ll, g as al, u as be, N as Lt, _ as We, U as vl, w as Dl, m as le, e as Kl, H as Pe, G as kt, V as kl, A as $t, D as Jl } from "./base-8aa55db5.js";
6
- import { m as Vt } from "./typescript-7ae59c4c.js";
7
- import { U as te, i as Mt, a as Hl, C as xl } from "./focus-trap-5fc152a0.js";
8
- import { s as zt } from "./scroll-c6e51ef8.js";
9
- const Pt = () => Al && /firefox/i.test(window.navigator.userAgent);
10
- var Wl = 1 / 0, At = 17976931348623157e292;
11
- function Dt(e) {
12
- if (!e)
13
- return e === 0 ? e : 0;
14
- if (e = dt(e), e === Wl || e === -Wl) {
15
- var l = e < 0 ? -1 : 1;
16
- return l * At;
17
- }
18
- return e === e ? e : 0;
19
- }
20
- function Kt(e) {
21
- var l = Dt(e), o = l % 1;
22
- return l === l ? o ? l - o : l : 0;
23
- }
24
- function Ft(e, l, o, s) {
25
- for (var c = e.length, u = o + (s ? 1 : -1); s ? u-- : ++u < c; )
26
- if (l(e[u], u, e))
27
- return u;
28
- return -1;
29
- }
30
- var Bt = Math.max, Nt = Math.min;
31
- function Rt(e, l, o) {
32
- var s = e == null ? 0 : e.length;
33
- if (!s)
34
- return -1;
35
- var c = s - 1;
36
- return o !== void 0 && (c = Kt(o), c = o < 0 ? Bt(s + c, 0) : Nt(c, s - 1)), Ft(e, pt(l), c, !0);
37
- }
38
- const Ht = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"), Wt = (e) => gt[e || "default"], qt = (e) => ["", ...Ul].includes(e), _l = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), jt = ["class", "style"], Qt = /^on[A-Z]/, Ut = (e = {}) => {
39
- const { excludeListeners: l = !1, excludeKeys: o } = e, s = v(() => ((o == null ? void 0 : o.value) || []).concat(jt)), c = sl();
40
- return c ? v(() => {
41
- var u;
42
- return Tt(Object.entries((u = c.proxy) == null ? void 0 : u.$attrs).filter(([p]) => !s.value.includes(p) && !(l && Qt.test(p))));
43
- }) : (il("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), v(() => ({})));
44
- };
45
- function Gt(e) {
46
- const l = K();
47
- function o() {
48
- if (e.value == null)
49
- return;
50
- const { selectionStart: c, selectionEnd: u, value: p } = e.value;
51
- if (c == null || u == null)
52
- return;
53
- const b = p.slice(0, Math.max(0, c)), f = p.slice(Math.max(0, u));
54
- l.value = {
55
- selectionStart: c,
56
- selectionEnd: u,
57
- value: p,
58
- beforeTxt: b,
59
- afterTxt: f
60
- };
61
- }
62
- function s() {
63
- if (e.value == null || l.value == null)
64
- return;
65
- const { value: c } = e.value, { beforeTxt: u, afterTxt: p, selectionStart: b } = l.value;
66
- if (u == null || p == null || b == null)
67
- return;
68
- let f = c.length;
69
- if (c.endsWith(p))
70
- f = c.length - p.length;
71
- else if (c.startsWith(u))
72
- f = u.length;
73
- else {
74
- const w = u[b - 1], g = c.indexOf(w, b - 1);
75
- g !== -1 && (f = g + 1);
76
- }
77
- e.value.setSelectionRange(f, f);
78
- }
79
- return [o, s];
80
- }
81
- function Yt(e, { afterFocus: l, afterBlur: o } = {}) {
82
- const s = sl(), { emit: c } = s, u = Re(), p = K(!1), b = (g) => {
83
- p.value || (p.value = !0, c("focus", g), l == null || l());
84
- }, f = (g) => {
85
- var m;
86
- g.relatedTarget && ((m = u.value) != null && m.contains(g.relatedTarget)) || (p.value = !1, c("blur", g), o == null || o());
87
- }, w = () => {
88
- var g;
89
- (g = e.value) == null || g.focus();
90
- };
91
- return W(u, (g) => {
92
- g && g.setAttribute("tabindex", "-1");
93
- }), ct(u, "click", w), {
94
- wrapperRef: u,
95
- isFocused: p,
96
- handleFocus: b,
97
- handleBlur: f
98
- };
99
- }
100
- let _;
101
- const Xt = `
102
- height:0 !important;
103
- visibility:hidden !important;
104
- ${Pt() ? "" : "overflow:hidden !important;"}
105
- position:absolute !important;
106
- z-index:-1000 !important;
107
- top:0 !important;
108
- right:0 !important;
109
- `, Zt = [
110
- "letter-spacing",
111
- "line-height",
112
- "padding-top",
113
- "padding-bottom",
114
- "font-family",
115
- "font-weight",
116
- "font-size",
117
- "text-rendering",
118
- "text-transform",
119
- "width",
120
- "text-indent",
121
- "padding-left",
122
- "padding-right",
123
- "border-width",
124
- "box-sizing"
125
- ];
126
- function Jt(e) {
127
- const l = window.getComputedStyle(e), o = l.getPropertyValue("box-sizing"), s = Number.parseFloat(l.getPropertyValue("padding-bottom")) + Number.parseFloat(l.getPropertyValue("padding-top")), c = Number.parseFloat(l.getPropertyValue("border-bottom-width")) + Number.parseFloat(l.getPropertyValue("border-top-width"));
128
- return { contextStyle: Zt.map((p) => `${p}:${l.getPropertyValue(p)}`).join(";"), paddingSize: s, borderSize: c, boxSizing: o };
129
- }
130
- function ql(e, l = 1, o) {
131
- var s;
132
- _ || (_ = document.createElement("textarea"), document.body.appendChild(_));
133
- const { paddingSize: c, borderSize: u, boxSizing: p, contextStyle: b } = Jt(e);
134
- _.setAttribute("style", `${b};${Xt}`), _.value = e.value || e.placeholder || "";
135
- let f = _.scrollHeight;
136
- const w = {};
137
- p === "border-box" ? f = f + u : p === "content-box" && (f = f - c), _.value = "";
138
- const g = _.scrollHeight - c;
139
- if (Vl(l)) {
140
- let m = g * l;
141
- p === "border-box" && (m = m + c + u), f = Math.max(m, f), w.minHeight = `${m}px`;
142
- }
143
- if (Vl(o)) {
144
- let m = g * o;
145
- p === "border-box" && (m = m + c + u), f = Math.min(m, f);
146
- }
147
- return w.height = `${f}px`, (s = _.parentNode) == null || s.removeChild(_), _ = void 0, w;
148
- }
149
- const xt = Zl({
150
- id: {
151
- type: String,
152
- default: void 0
153
- },
154
- size: yt,
155
- disabled: Boolean,
156
- modelValue: {
157
- type: Ll([
158
- String,
159
- Number,
160
- Object
161
- ]),
162
- default: ""
163
- },
164
- type: {
165
- type: String,
166
- default: "text"
167
- },
168
- resize: {
169
- type: String,
170
- values: ["none", "both", "horizontal", "vertical"]
171
- },
172
- autosize: {
173
- type: Ll([Boolean, Object]),
174
- default: !1
175
- },
176
- autocomplete: {
177
- type: String,
178
- default: "off"
179
- },
180
- formatter: {
181
- type: Function
182
- },
183
- parser: {
184
- type: Function
185
- },
186
- placeholder: {
187
- type: String
188
- },
189
- form: {
190
- type: String
191
- },
192
- readonly: {
193
- type: Boolean,
194
- default: !1
195
- },
196
- clearable: {
197
- type: Boolean,
198
- default: !1
199
- },
200
- showPassword: {
201
- type: Boolean,
202
- default: !1
203
- },
204
- showWordLimit: {
205
- type: Boolean,
206
- default: !1
207
- },
208
- suffixIcon: {
209
- type: fl
210
- },
211
- prefixIcon: {
212
- type: fl
213
- },
214
- containerRole: {
215
- type: String,
216
- default: void 0
217
- },
218
- label: {
219
- type: String,
220
- default: void 0
221
- },
222
- tabindex: {
223
- type: [String, Number],
224
- default: 0
225
- },
226
- validateEvent: {
227
- type: Boolean,
228
- default: !0
229
- },
230
- inputStyle: {
231
- type: Ll([Object, Array, String]),
232
- default: () => Vt({})
233
- },
234
- autofocus: {
235
- type: Boolean,
236
- default: !1
237
- }
238
- }), _t = {
239
- [te]: (e) => al(e),
240
- input: (e) => al(e),
241
- change: (e) => al(e),
242
- focus: (e) => e instanceof FocusEvent,
243
- blur: (e) => e instanceof FocusEvent,
244
- clear: () => !0,
245
- mouseleave: (e) => e instanceof MouseEvent,
246
- mouseenter: (e) => e instanceof MouseEvent,
247
- keydown: (e) => e instanceof Event,
248
- compositionstart: (e) => e instanceof CompositionEvent,
249
- compositionupdate: (e) => e instanceof CompositionEvent,
250
- compositionend: (e) => e instanceof CompositionEvent
251
- }, en = ["role"], ln = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"], tn = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"], nn = ge({
252
- name: "ElInput",
253
- inheritAttrs: !1
254
- }), on = /* @__PURE__ */ ge({
255
- ...nn,
256
- props: xt,
257
- emits: _t,
258
- setup(e, { expose: l, emit: o }) {
259
- const s = e, c = nt(), u = ot(), p = v(() => {
260
- const r = {};
261
- return s.containerRole === "combobox" && (r["aria-haspopup"] = c["aria-haspopup"], r["aria-owns"] = c["aria-owns"], r["aria-expanded"] = c["aria-expanded"]), r;
262
- }), b = v(() => [
263
- s.type === "textarea" ? O.b() : n.b(),
264
- n.m(A.value),
265
- n.is("disabled", $.value),
266
- n.is("exceed", Ue.value),
267
- {
268
- [n.b("group")]: u.prepend || u.append,
269
- [n.bm("group", "append")]: u.append,
270
- [n.bm("group", "prepend")]: u.prepend,
271
- [n.m("prefix")]: u.prefix || s.prefixIcon,
272
- [n.m("suffix")]: u.suffix || s.suffixIcon || s.clearable || s.showPassword,
273
- [n.bm("suffix", "password-clear")]: ue.value && Se.value
274
- },
275
- c.class
276
- ]), f = v(() => [
277
- n.e("wrapper"),
278
- n.is("focus", ye.value)
279
- ]), w = Ut({
280
- excludeKeys: v(() => Object.keys(p.value))
281
- }), { form: g, formItem: m } = Gl(), { inputId: F } = St(s, {
282
- formItemContext: m
283
- }), A = Pl(), $ = Ct(), n = be("input"), O = be("textarea"), T = Re(), E = Re(), q = K(!1), ne = K(!1), j = K(!1), De = K(), Z = Re(s.inputStyle), oe = v(() => T.value || E.value), { wrapperRef: qe, isFocused: ye, handleFocus: ie, handleBlur: P } = Yt(oe, {
284
- afterBlur() {
285
- var r;
286
- s.validateEvent && ((r = m == null ? void 0 : m.validate) == null || r.call(m, "blur").catch((h) => il(h)));
287
- }
288
- }), Ke = v(() => {
289
- var r;
290
- return (r = g == null ? void 0 : g.statusIcon) != null ? r : !1;
291
- }), re = v(() => (m == null ? void 0 : m.validateState) || ""), ae = v(() => re.value && Yl[re.value]), je = v(() => j.value ? wt : Ot), Qe = v(() => [
292
- c.style,
293
- s.inputStyle
294
- ]), Q = v(() => [
295
- s.inputStyle,
296
- Z.value,
297
- { resize: s.resize }
298
- ]), B = v(() => Mt(s.modelValue) ? "" : String(s.modelValue)), ue = v(() => s.clearable && !$.value && !s.readonly && !!B.value && (ye.value || q.value)), Se = v(() => s.showPassword && !$.value && !s.readonly && !!B.value && (!!B.value || ye.value)), U = v(() => s.showWordLimit && !!w.value.maxlength && (s.type === "text" || s.type === "textarea") && !$.value && !s.readonly && !s.showPassword), Ce = v(() => B.value.length), Ue = v(() => !!U.value && Ce.value > Number(w.value.maxlength)), Ge = v(() => !!u.suffix || !!s.suffixIcon || ue.value || s.showPassword || U.value || !!re.value && Ke.value), [Ye, Xe] = Gt(T);
299
- zl(E, (r) => {
300
- if (ce(), !U.value || s.resize !== "both")
301
- return;
302
- const h = r[0], { width: V } = h.contentRect;
303
- De.value = {
304
- right: `calc(100% - ${V + 15 + 6}px)`
305
- };
306
- });
307
- const de = () => {
308
- const { type: r, autosize: h } = s;
309
- if (!(!Al || r !== "textarea" || !E.value))
310
- if (h) {
311
- const V = vl(h) ? h.minRows : void 0, fe = vl(h) ? h.maxRows : void 0, Ie = ql(E.value, V, fe);
312
- Z.value = {
313
- overflowY: "hidden",
314
- ...Ie
315
- }, D(() => {
316
- E.value.offsetHeight, Z.value = Ie;
317
- });
318
- } else
319
- Z.value = {
320
- minHeight: ql(E.value).minHeight
321
- };
322
- }, ce = ((r) => {
323
- let h = !1;
324
- return () => {
325
- var V;
326
- if (h || !s.autosize)
327
- return;
328
- ((V = E.value) == null ? void 0 : V.offsetParent) === null || (r(), h = !0);
329
- };
330
- })(de), G = () => {
331
- const r = oe.value, h = s.formatter ? s.formatter(B.value) : B.value;
332
- !r || r.value === h || (r.value = h);
333
- }, Le = async (r) => {
334
- Ye();
335
- let { value: h } = r.target;
336
- if (s.formatter && (h = s.parser ? s.parser(h) : h), !ne.value) {
337
- if (h === B.value) {
338
- G();
339
- return;
340
- }
341
- o(te, h), o("input", h), await D(), G(), Xe();
342
- }
343
- }, ke = (r) => {
344
- o("change", r.target.value);
345
- }, we = (r) => {
346
- o("compositionstart", r), ne.value = !0;
347
- }, $e = (r) => {
348
- var h;
349
- o("compositionupdate", r);
350
- const V = (h = r.target) == null ? void 0 : h.value, fe = V[V.length - 1] || "";
351
- ne.value = !_l(fe);
352
- }, Ve = (r) => {
353
- o("compositionend", r), ne.value && (ne.value = !1, Le(r));
354
- }, Me = () => {
355
- j.value = !j.value, pe();
356
- }, pe = async () => {
357
- var r;
358
- await D(), (r = oe.value) == null || r.focus();
359
- }, Ze = () => {
360
- var r;
361
- return (r = oe.value) == null ? void 0 : r.blur();
362
- }, Je = (r) => {
363
- q.value = !1, o("mouseleave", r);
364
- }, xe = (r) => {
365
- q.value = !0, o("mouseenter", r);
366
- }, Oe = (r) => {
367
- o("keydown", r);
368
- }, _e = () => {
369
- var r;
370
- (r = oe.value) == null || r.select();
371
- }, Fe = () => {
372
- o(te, ""), o("change", ""), o("clear"), o("input", "");
373
- };
374
- return W(() => s.modelValue, () => {
375
- var r;
376
- D(() => de()), s.validateEvent && ((r = m == null ? void 0 : m.validate) == null || r.call(m, "change").catch((h) => il(h)));
377
- }), W(B, () => G()), W(() => s.type, async () => {
378
- await D(), G(), de();
379
- }), ml(() => {
380
- !s.formatter && s.parser && il("ElInput", "If you set the parser, you also need to set the formatter."), G(), D(de);
381
- }), l({
382
- input: T,
383
- textarea: E,
384
- ref: oe,
385
- textareaStyle: Q,
386
- autosize: it(s, "autosize"),
387
- focus: pe,
388
- blur: Ze,
389
- select: _e,
390
- clear: Fe,
391
- resizeTextarea: de
392
- }), (r, h) => He((y(), k("div", El(a(p), {
393
- class: a(b),
394
- style: a(Qe),
395
- role: r.containerRole,
396
- onMouseenter: xe,
397
- onMouseleave: Je
398
- }), [
399
- I(" input "),
400
- r.type !== "textarea" ? (y(), k(Ae, { key: 0 }, [
401
- I(" prepend slot "),
402
- r.$slots.prepend ? (y(), k("div", {
403
- key: 0,
404
- class: C(a(n).be("group", "prepend"))
405
- }, [
406
- X(r.$slots, "prepend")
407
- ], 2)) : I("v-if", !0),
408
- z("div", {
409
- ref_key: "wrapperRef",
410
- ref: qe,
411
- class: C(a(f))
412
- }, [
413
- I(" prefix slot "),
414
- r.$slots.prefix || r.prefixIcon ? (y(), k("span", {
415
- key: 0,
416
- class: C(a(n).e("prefix"))
417
- }, [
418
- z("span", {
419
- class: C(a(n).e("prefix-inner"))
420
- }, [
421
- X(r.$slots, "prefix"),
422
- r.prefixIcon ? (y(), M(a(Te), {
423
- key: 0,
424
- class: C(a(n).e("icon"))
425
- }, {
426
- default: L(() => [
427
- (y(), M(Ne(r.prefixIcon)))
428
- ]),
429
- _: 1
430
- }, 8, ["class"])) : I("v-if", !0)
431
- ], 2)
432
- ], 2)) : I("v-if", !0),
433
- z("input", El({
434
- id: a(F),
435
- ref_key: "input",
436
- ref: T,
437
- class: a(n).e("inner")
438
- }, a(w), {
439
- type: r.showPassword ? j.value ? "text" : "password" : r.type,
440
- disabled: a($),
441
- formatter: r.formatter,
442
- parser: r.parser,
443
- readonly: r.readonly,
444
- autocomplete: r.autocomplete,
445
- tabindex: r.tabindex,
446
- "aria-label": r.label,
447
- placeholder: r.placeholder,
448
- style: r.inputStyle,
449
- form: s.form,
450
- autofocus: s.autofocus,
451
- onCompositionstart: we,
452
- onCompositionupdate: $e,
453
- onCompositionend: Ve,
454
- onInput: Le,
455
- onFocus: h[0] || (h[0] = (...V) => a(ie) && a(ie)(...V)),
456
- onBlur: h[1] || (h[1] = (...V) => a(P) && a(P)(...V)),
457
- onChange: ke,
458
- onKeydown: Oe
459
- }), null, 16, ln),
460
- I(" suffix slot "),
461
- a(Ge) ? (y(), k("span", {
462
- key: 1,
463
- class: C(a(n).e("suffix"))
464
- }, [
465
- z("span", {
466
- class: C(a(n).e("suffix-inner"))
467
- }, [
468
- !a(ue) || !a(Se) || !a(U) ? (y(), k(Ae, { key: 0 }, [
469
- X(r.$slots, "suffix"),
470
- r.suffixIcon ? (y(), M(a(Te), {
471
- key: 0,
472
- class: C(a(n).e("icon"))
473
- }, {
474
- default: L(() => [
475
- (y(), M(Ne(r.suffixIcon)))
476
- ]),
477
- _: 1
478
- }, 8, ["class"])) : I("v-if", !0)
479
- ], 64)) : I("v-if", !0),
480
- a(ue) ? (y(), M(a(Te), {
481
- key: 1,
482
- class: C([a(n).e("icon"), a(n).e("clear")]),
483
- onMousedown: ee(a(Lt), ["prevent"]),
484
- onClick: Fe
485
- }, {
486
- default: L(() => [
487
- he(a(Xl))
488
- ]),
489
- _: 1
490
- }, 8, ["class", "onMousedown"])) : I("v-if", !0),
491
- a(Se) ? (y(), M(a(Te), {
492
- key: 2,
493
- class: C([a(n).e("icon"), a(n).e("password")]),
494
- onClick: Me
495
- }, {
496
- default: L(() => [
497
- (y(), M(Ne(a(je))))
498
- ]),
499
- _: 1
500
- }, 8, ["class"])) : I("v-if", !0),
501
- a(U) ? (y(), k("span", {
502
- key: 3,
503
- class: C(a(n).e("count"))
504
- }, [
505
- z("span", {
506
- class: C(a(n).e("count-inner"))
507
- }, Y(a(Ce)) + " / " + Y(a(w).maxlength), 3)
508
- ], 2)) : I("v-if", !0),
509
- a(re) && a(ae) && a(Ke) ? (y(), M(a(Te), {
510
- key: 4,
511
- class: C([
512
- a(n).e("icon"),
513
- a(n).e("validateIcon"),
514
- a(n).is("loading", a(re) === "validating")
515
- ])
516
- }, {
517
- default: L(() => [
518
- (y(), M(Ne(a(ae))))
519
- ]),
520
- _: 1
521
- }, 8, ["class"])) : I("v-if", !0)
522
- ], 2)
523
- ], 2)) : I("v-if", !0)
524
- ], 2),
525
- I(" append slot "),
526
- r.$slots.append ? (y(), k("div", {
527
- key: 1,
528
- class: C(a(n).be("group", "append"))
529
- }, [
530
- X(r.$slots, "append")
531
- ], 2)) : I("v-if", !0)
532
- ], 64)) : (y(), k(Ae, { key: 1 }, [
533
- I(" textarea "),
534
- z("textarea", El({
535
- id: a(F),
536
- ref_key: "textarea",
537
- ref: E,
538
- class: a(O).e("inner")
539
- }, a(w), {
540
- tabindex: r.tabindex,
541
- disabled: a($),
542
- readonly: r.readonly,
543
- autocomplete: r.autocomplete,
544
- style: a(Q),
545
- "aria-label": r.label,
546
- placeholder: r.placeholder,
547
- form: s.form,
548
- autofocus: s.autofocus,
549
- onCompositionstart: we,
550
- onCompositionupdate: $e,
551
- onCompositionend: Ve,
552
- onInput: Le,
553
- onFocus: h[2] || (h[2] = (...V) => a(ie) && a(ie)(...V)),
554
- onBlur: h[3] || (h[3] = (...V) => a(P) && a(P)(...V)),
555
- onChange: ke,
556
- onKeydown: Oe
557
- }), null, 16, tn),
558
- a(U) ? (y(), k("span", {
559
- key: 0,
560
- style: se(De.value),
561
- class: C(a(n).e("count"))
562
- }, Y(a(Ce)) + " / " + Y(a(w).maxlength), 7)) : I("v-if", !0)
563
- ], 64))
564
- ], 16, en)), [
565
- [hl, r.type !== "hidden"]
566
- ]);
567
- }
568
- });
569
- var an = /* @__PURE__ */ We(on, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
570
- const sn = Dl(an), et = Zl({
571
- type: {
572
- type: String,
573
- values: ["success", "info", "warning", "danger", ""],
574
- default: ""
575
- },
576
- closable: Boolean,
577
- disableTransitions: Boolean,
578
- hit: Boolean,
579
- color: {
580
- type: String,
581
- default: ""
582
- },
583
- size: {
584
- type: String,
585
- values: Ul,
586
- default: ""
587
- },
588
- effect: {
589
- type: String,
590
- values: ["dark", "light", "plain"],
591
- default: "light"
592
- },
593
- round: Boolean
594
- }), rn = {
595
- close: (e) => e instanceof MouseEvent,
596
- click: (e) => e instanceof MouseEvent
597
- }, un = ge({
598
- name: "ElTag"
599
- }), dn = /* @__PURE__ */ ge({
600
- ...un,
601
- props: et,
602
- emits: rn,
603
- setup(e, { emit: l }) {
604
- const o = e, s = Pl(), c = be("tag"), u = v(() => {
605
- const { type: f, hit: w, effect: g, closable: m, round: F } = o;
606
- return [
607
- c.b(),
608
- c.is("closable", m),
609
- c.m(f),
610
- c.m(s.value),
611
- c.m(g),
612
- c.is("hit", w),
613
- c.is("round", F)
614
- ];
615
- }), p = (f) => {
616
- l("close", f);
617
- }, b = (f) => {
618
- l("click", f);
619
- };
620
- return (f, w) => f.disableTransitions ? (y(), k("span", {
621
- key: 0,
622
- class: C(a(u)),
623
- style: se({ backgroundColor: f.color }),
624
- onClick: b
625
- }, [
626
- z("span", {
627
- class: C(a(c).e("content"))
628
- }, [
629
- X(f.$slots, "default")
630
- ], 2),
631
- f.closable ? (y(), M(a(Te), {
632
- key: 0,
633
- class: C(a(c).e("close")),
634
- onClick: ee(p, ["stop"])
635
- }, {
636
- default: L(() => [
637
- he(a(Rl))
638
- ]),
639
- _: 1
640
- }, 8, ["class", "onClick"])) : I("v-if", !0)
641
- ], 6)) : (y(), M($l, {
642
- key: 1,
643
- name: `${a(c).namespace.value}-zoom-in-center`,
644
- appear: ""
645
- }, {
646
- default: L(() => [
647
- z("span", {
648
- class: C(a(u)),
649
- style: se({ backgroundColor: f.color }),
650
- onClick: b
651
- }, [
652
- z("span", {
653
- class: C(a(c).e("content"))
654
- }, [
655
- X(f.$slots, "default")
656
- ], 2),
657
- f.closable ? (y(), M(a(Te), {
658
- key: 0,
659
- class: C(a(c).e("close")),
660
- onClick: ee(p, ["stop"])
661
- }, {
662
- default: L(() => [
663
- he(a(Rl))
664
- ]),
665
- _: 1
666
- }, 8, ["class", "onClick"])) : I("v-if", !0)
667
- ], 6)
668
- ]),
669
- _: 3
670
- }, 8, ["name"]));
671
- }
672
- });
673
- var cn = /* @__PURE__ */ We(dn, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
674
- const pn = Dl(cn), lt = Symbol("ElSelectGroup"), gl = Symbol("ElSelect");
675
- function fn(e, l) {
676
- const o = cl(gl), s = cl(lt, { disabled: !1 }), c = v(() => Object.prototype.toString.call(e.value).toLowerCase() === "[object object]"), u = v(() => o.props.multiple ? m(o.props.modelValue, e.value) : F(e.value, o.props.modelValue)), p = v(() => {
677
- if (o.props.multiple) {
678
- const n = o.props.modelValue || [];
679
- return !u.value && n.length >= o.props.multipleLimit && o.props.multipleLimit > 0;
680
- } else
681
- return !1;
682
- }), b = v(() => e.label || (c.value ? "" : e.value)), f = v(() => e.value || e.label || ""), w = v(() => e.disabled || l.groupDisabled || p.value), g = sl(), m = (n = [], O) => {
683
- if (c.value) {
684
- const T = o.props.valueKey;
685
- return n && n.some((E) => pl(le(E, T)) === le(O, T));
686
- } else
687
- return n && n.includes(O);
688
- }, F = (n, O) => {
689
- if (c.value) {
690
- const { valueKey: T } = o.props;
691
- return le(n, T) === le(O, T);
692
- } else
693
- return n === O;
694
- }, A = () => {
695
- !e.disabled && !s.disabled && (o.hoverIndex = o.optionsArray.indexOf(g.proxy));
696
- };
697
- W(() => b.value, () => {
698
- !e.created && !o.props.remote && o.setSelected();
699
- }), W(() => e.value, (n, O) => {
700
- const { remote: T, valueKey: E } = o.props;
701
- if (Object.is(n, O) || (o.onOptionDestroy(O, g.proxy), o.onOptionCreate(g.proxy)), !e.created && !T) {
702
- if (E && typeof n == "object" && typeof O == "object" && n[E] === O[E])
703
- return;
704
- o.setSelected();
705
- }
706
- }), W(() => s.disabled, () => {
707
- l.groupDisabled = s.disabled;
708
- }, { immediate: !0 });
709
- const { queryChange: $ } = pl(o);
710
- return W($, (n) => {
711
- const { query: O } = a(n), T = new RegExp(Ht(O), "i");
712
- l.visible = T.test(b.value) || e.created, l.visible || o.filteredOptionsCount--;
713
- }, { immediate: !0 }), {
714
- select: o,
715
- currentLabel: b,
716
- currentValue: f,
717
- itemSelected: u,
718
- isDisabled: w,
719
- hoverItem: A
720
- };
721
- }
722
- const vn = ge({
723
- name: "ElOption",
724
- componentName: "ElOption",
725
- props: {
726
- value: {
727
- required: !0,
728
- type: [String, Number, Boolean, Object]
729
- },
730
- label: [String, Number],
731
- created: Boolean,
732
- disabled: Boolean
733
- },
734
- setup(e) {
735
- const l = be("select"), o = v(() => [
736
- l.be("dropdown", "item"),
737
- l.is("disabled", a(p)),
738
- {
739
- selected: a(u),
740
- hover: a(g)
741
- }
742
- ]), s = bl({
743
- index: -1,
744
- groupDisabled: !1,
745
- visible: !0,
746
- hitState: !1,
747
- hover: !1
748
- }), { currentLabel: c, itemSelected: u, isDisabled: p, select: b, hoverItem: f } = fn(e, s), { visible: w, hover: g } = Ml(s), m = sl().proxy;
749
- b.onOptionCreate(m), at(() => {
750
- const A = m.value, { selected: $ } = b, O = (b.props.multiple ? $ : [$]).some((T) => T.value === m.value);
751
- D(() => {
752
- b.cachedOptions.get(A) === m && !O && b.cachedOptions.delete(A);
753
- }), b.onOptionDestroy(A, m);
754
- });
755
- function F() {
756
- e.disabled !== !0 && s.groupDisabled !== !0 && b.handleOptionSelect(m);
757
- }
758
- return {
759
- ns: l,
760
- containerKls: o,
761
- currentLabel: c,
762
- itemSelected: u,
763
- isDisabled: p,
764
- select: b,
765
- hoverItem: f,
766
- visible: w,
767
- hover: g,
768
- selectOptionClick: F,
769
- states: s
770
- };
771
- }
772
- });
773
- function mn(e, l, o, s, c, u) {
774
- return He((y(), k("li", {
775
- class: C(e.containerKls),
776
- onMouseenter: l[0] || (l[0] = (...p) => e.hoverItem && e.hoverItem(...p)),
777
- onClick: l[1] || (l[1] = ee((...p) => e.selectOptionClick && e.selectOptionClick(...p), ["stop"]))
778
- }, [
779
- X(e.$slots, "default", {}, () => [
780
- z("span", null, Y(e.currentLabel), 1)
781
- ])
782
- ], 34)), [
783
- [hl, e.visible]
784
- ]);
785
- }
786
- var Fl = /* @__PURE__ */ We(vn, [["render", mn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);
787
- const hn = ge({
788
- name: "ElSelectDropdown",
789
- componentName: "ElSelectDropdown",
790
- setup() {
791
- const e = cl(gl), l = be("select"), o = v(() => e.props.popperClass), s = v(() => e.props.multiple), c = v(() => e.props.fitInputWidth), u = K("");
792
- function p() {
793
- var b;
794
- u.value = `${(b = e.selectWrapper) == null ? void 0 : b.offsetWidth}px`;
795
- }
796
- return ml(() => {
797
- p(), zl(e.selectWrapper, p);
798
- }), {
799
- ns: l,
800
- minWidth: u,
801
- popperClass: o,
802
- isMultiple: s,
803
- isFitInputWidth: c
804
- };
805
- }
806
- });
807
- function bn(e, l, o, s, c, u) {
808
- return y(), k("div", {
809
- class: C([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
810
- style: se({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
811
- }, [
812
- X(e.$slots, "default")
813
- ], 6);
814
- }
815
- var gn = /* @__PURE__ */ We(hn, [["render", bn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);
816
- function yn(e) {
817
- const { t: l } = Kl();
818
- return bl({
819
- options: /* @__PURE__ */ new Map(),
820
- cachedOptions: /* @__PURE__ */ new Map(),
821
- disabledOptions: /* @__PURE__ */ new Map(),
822
- createdLabel: null,
823
- createdSelected: !1,
824
- selected: e.multiple ? [] : {},
825
- inputLength: 20,
826
- inputWidth: 0,
827
- optionsCount: 0,
828
- filteredOptionsCount: 0,
829
- visible: !1,
830
- selectedLabel: "",
831
- hoverIndex: -1,
832
- query: "",
833
- previousQuery: null,
834
- inputHovering: !1,
835
- cachedPlaceHolder: "",
836
- currentPlaceholder: l("el.select.placeholder"),
837
- menuVisibleOnFocus: !1,
838
- isOnComposition: !1,
839
- prefixWidth: 11,
840
- mouseEnter: !1,
841
- focused: !1
842
- });
843
- }
844
- const Sn = (e, l, o) => {
845
- const { t: s } = Kl(), c = be("select");
846
- It({
847
- from: "suffixTransition",
848
- replacement: "override style scheme",
849
- version: "2.3.0",
850
- scope: "props",
851
- ref: "https://element-plus.org/en-US/component/select.html#select-attributes"
852
- }, v(() => e.suffixTransition === !1));
853
- const u = K(null), p = K(null), b = K(null), f = K(null), w = K(null), g = K(null), m = K(null), F = K(null), A = K(-1), $ = Re({ query: "" }), n = Re(""), O = K([]);
854
- let T = 0;
855
- const { form: E, formItem: q } = Gl(), ne = v(() => !e.filterable || e.multiple || !l.visible), j = v(() => e.disabled || (E == null ? void 0 : E.disabled)), De = v(() => {
856
- const t = e.multiple ? Array.isArray(e.modelValue) && e.modelValue.length > 0 : e.modelValue !== void 0 && e.modelValue !== null && e.modelValue !== "";
857
- return e.clearable && !j.value && l.inputHovering && t;
858
- }), Z = v(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), oe = v(() => c.is("reverse", Z.value && l.visible && e.suffixTransition)), qe = v(() => (E == null ? void 0 : E.statusIcon) && (q == null ? void 0 : q.validateState) && Yl[q == null ? void 0 : q.validateState]), ye = v(() => e.remote ? 300 : 0), ie = v(() => e.loading ? e.loadingText || s("el.select.loading") : e.remote && l.query === "" && l.options.size === 0 ? !1 : e.filterable && l.query && l.options.size > 0 && l.filteredOptionsCount === 0 ? e.noMatchText || s("el.select.noMatch") : l.options.size === 0 ? e.noDataText || s("el.select.noData") : null), P = v(() => {
859
- const t = Array.from(l.options.values()), i = [];
860
- return O.value.forEach((d) => {
861
- const S = t.findIndex((N) => N.currentLabel === d);
862
- S > -1 && i.push(t[S]);
863
- }), i.length >= t.length ? i : t;
864
- }), Ke = v(() => Array.from(l.cachedOptions.values())), re = v(() => {
865
- const t = P.value.filter((i) => !i.created).some((i) => i.currentLabel === l.query);
866
- return e.filterable && e.allowCreate && l.query !== "" && !t;
867
- }), ae = Pl(), je = v(() => ["small"].includes(ae.value) ? "small" : "default"), Qe = v({
868
- get() {
869
- return l.visible && ie.value !== !1;
870
- },
871
- set(t) {
872
- l.visible = t;
873
- }
874
- });
875
- W([() => j.value, () => ae.value, () => E == null ? void 0 : E.size], () => {
876
- D(() => {
877
- Q();
878
- });
879
- }), W(() => e.placeholder, (t) => {
880
- l.cachedPlaceHolder = l.currentPlaceholder = t, e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (l.currentPlaceholder = "");
881
- }), W(() => e.modelValue, (t, i) => {
882
- e.multiple && (Q(), t && t.length > 0 || p.value && l.query !== "" ? l.currentPlaceholder = "" : l.currentPlaceholder = l.cachedPlaceHolder, e.filterable && !e.reserveKeyword && (l.query = "", B(l.query))), U(), e.filterable && !e.multiple && (l.inputLength = 20), !Nl(t, i) && e.validateEvent && (q == null || q.validate("change").catch((d) => il(d)));
883
- }, {
884
- flush: "post",
885
- deep: !0
886
- }), W(() => l.visible, (t) => {
887
- var i, d, S, N, H;
888
- t ? ((d = (i = f.value) == null ? void 0 : i.updatePopper) == null || d.call(i), e.filterable && (l.filteredOptionsCount = l.optionsCount, l.query = e.remote ? "" : l.selectedLabel, (N = (S = b.value) == null ? void 0 : S.focus) == null || N.call(S), e.multiple ? (H = p.value) == null || H.focus() : l.selectedLabel && (l.currentPlaceholder = `${l.selectedLabel}`, l.selectedLabel = ""), B(l.query), !e.multiple && !e.remote && ($.value.query = "", ol($), ol(n)))) : (e.filterable && (Pe(e.filterMethod) && e.filterMethod(""), Pe(e.remoteMethod) && e.remoteMethod("")), l.query = "", l.previousQuery = null, l.selectedLabel = "", l.inputLength = 20, l.menuVisibleOnFocus = !1, Ue(), D(() => {
889
- p.value && p.value.value === "" && l.selected.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
890
- }), e.multiple || (l.selected && (e.filterable && e.allowCreate && l.createdSelected && l.createdLabel ? l.selectedLabel = l.createdLabel : l.selectedLabel = l.selected.currentLabel, e.filterable && (l.query = l.selectedLabel)), e.filterable && (l.currentPlaceholder = l.cachedPlaceHolder))), o.emit("visible-change", t);
891
- }), W(() => l.options.entries(), () => {
892
- var t, i, d;
893
- if (!Al)
894
- return;
895
- (i = (t = f.value) == null ? void 0 : t.updatePopper) == null || i.call(t), e.multiple && Q();
896
- const S = ((d = m.value) == null ? void 0 : d.querySelectorAll("input")) || [];
897
- (!e.filterable && !e.defaultFirstOption && !kt(e.modelValue) || !Array.from(S).includes(document.activeElement)) && U(), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && Se();
898
- }, {
899
- flush: "post"
900
- }), W(() => l.hoverIndex, (t) => {
901
- Vl(t) && t > -1 ? A.value = P.value[t] || {} : A.value = {}, P.value.forEach((i) => {
902
- i.hover = A.value === i;
903
- });
904
- });
905
- const Q = () => {
906
- D(() => {
907
- var t, i;
908
- if (!u.value)
909
- return;
910
- const d = u.value.$el.querySelector("input");
911
- T = T || (d.clientHeight > 0 ? d.clientHeight + 2 : 0);
912
- const S = g.value, N = Wt(ae.value || (E == null ? void 0 : E.size)), H = ae.value || N === T || T <= 0 ? N : T;
913
- !(d.offsetParent === null) && (d.style.height = `${(l.selected.length === 0 ? H : Math.max(S ? S.clientHeight + (S.clientHeight > H ? 6 : 0) : 0, H)) - 2}px`), l.visible && ie.value !== !1 && ((i = (t = f.value) == null ? void 0 : t.updatePopper) == null || i.call(t));
914
- });
915
- }, B = async (t) => {
916
- if (!(l.previousQuery === t || l.isOnComposition)) {
917
- if (l.previousQuery === null && (Pe(e.filterMethod) || Pe(e.remoteMethod))) {
918
- l.previousQuery = t;
919
- return;
920
- }
921
- l.previousQuery = t, D(() => {
922
- var i, d;
923
- l.visible && ((d = (i = f.value) == null ? void 0 : i.updatePopper) == null || d.call(i));
924
- }), l.hoverIndex = -1, e.multiple && e.filterable && D(() => {
925
- if (!j.value) {
926
- const i = p.value.value.length * 15 + 20;
927
- l.inputLength = e.collapseTags ? Math.min(50, i) : i, ue();
928
- }
929
- Q();
930
- }), e.remote && Pe(e.remoteMethod) ? (l.hoverIndex = -1, e.remoteMethod(t)) : Pe(e.filterMethod) ? (e.filterMethod(t), ol(n)) : (l.filteredOptionsCount = l.optionsCount, $.value.query = t, ol($), ol(n)), e.defaultFirstOption && (e.filterable || e.remote) && l.filteredOptionsCount && (await D(), Se());
931
- }
932
- }, ue = () => {
933
- l.currentPlaceholder !== "" && (l.currentPlaceholder = p.value.value ? "" : l.cachedPlaceHolder);
934
- }, Se = () => {
935
- const t = P.value.filter((S) => S.visible && !S.disabled && !S.states.groupDisabled), i = t.find((S) => S.created), d = t[0];
936
- l.hoverIndex = Ve(P.value, i || d);
937
- }, U = () => {
938
- var t;
939
- if (e.multiple)
940
- l.selectedLabel = "";
941
- else {
942
- const d = Ce(e.modelValue);
943
- (t = d.props) != null && t.created ? (l.createdLabel = d.props.value, l.createdSelected = !0) : l.createdSelected = !1, l.selectedLabel = d.currentLabel, l.selected = d, e.filterable && (l.query = l.selectedLabel);
944
- return;
945
- }
946
- const i = [];
947
- Array.isArray(e.modelValue) && e.modelValue.forEach((d) => {
948
- i.push(Ce(d));
949
- }), l.selected = i, D(() => {
950
- Q();
951
- });
952
- }, Ce = (t) => {
953
- let i;
954
- const d = kl(t).toLowerCase() === "object", S = kl(t).toLowerCase() === "null", N = kl(t).toLowerCase() === "undefined";
955
- for (let me = l.cachedOptions.size - 1; me >= 0; me--) {
956
- const J = Ke.value[me];
957
- if (d ? le(J.value, e.valueKey) === le(t, e.valueKey) : J.value === t) {
958
- i = {
959
- value: t,
960
- currentLabel: J.currentLabel,
961
- isDisabled: J.isDisabled
962
- };
963
- break;
964
- }
965
- }
966
- if (i)
967
- return i;
968
- const H = d ? t.label : !S && !N ? t : "", ve = {
969
- value: t,
970
- currentLabel: H
971
- };
972
- return e.multiple && (ve.hitState = !1), ve;
973
- }, Ue = () => {
974
- setTimeout(() => {
975
- const t = e.valueKey;
976
- e.multiple ? l.selected.length > 0 ? l.hoverIndex = Math.min.apply(null, l.selected.map((i) => P.value.findIndex((d) => le(d, t) === le(i, t)))) : l.hoverIndex = -1 : l.hoverIndex = P.value.findIndex((i) => ll(i) === ll(l.selected));
977
- }, 300);
978
- }, Ge = () => {
979
- var t, i;
980
- Ye(), (i = (t = f.value) == null ? void 0 : t.updatePopper) == null || i.call(t), e.multiple && Q();
981
- }, Ye = () => {
982
- var t;
983
- l.inputWidth = (t = u.value) == null ? void 0 : t.$el.offsetWidth;
984
- }, Xe = () => {
985
- e.filterable && l.query !== l.selectedLabel && (l.query = l.selectedLabel, B(l.query));
986
- }, de = Bl(() => {
987
- Xe();
988
- }, ye.value), rl = Bl((t) => {
989
- B(t.target.value);
990
- }, ye.value), ce = (t) => {
991
- Nl(e.modelValue, t) || o.emit(xl, t);
992
- }, G = (t) => Rt(t, (i) => !l.disabledOptions.has(i)), Le = (t) => {
993
- if (t.code !== Hl.delete) {
994
- if (t.target.value.length <= 0 && !Oe()) {
995
- const i = e.modelValue.slice(), d = G(i);
996
- if (d < 0)
997
- return;
998
- i.splice(d, 1), o.emit(te, i), ce(i);
999
- }
1000
- t.target.value.length === 1 && e.modelValue.length === 0 && (l.currentPlaceholder = l.cachedPlaceHolder);
1001
- }
1002
- }, ke = (t, i) => {
1003
- const d = l.selected.indexOf(i);
1004
- if (d > -1 && !j.value) {
1005
- const S = e.modelValue.slice();
1006
- S.splice(d, 1), o.emit(te, S), ce(S), o.emit("remove-tag", i.value);
1007
- }
1008
- t.stopPropagation(), h();
1009
- }, we = (t) => {
1010
- t.stopPropagation();
1011
- const i = e.multiple ? [] : "";
1012
- if (!al(i))
1013
- for (const d of l.selected)
1014
- d.isDisabled && i.push(d.value);
1015
- o.emit(te, i), ce(i), l.hoverIndex = -1, l.visible = !1, o.emit("clear"), h();
1016
- }, $e = (t) => {
1017
- var i;
1018
- if (e.multiple) {
1019
- const d = (e.modelValue || []).slice(), S = Ve(d, t.value);
1020
- S > -1 ? d.splice(S, 1) : (e.multipleLimit <= 0 || d.length < e.multipleLimit) && d.push(t.value), o.emit(te, d), ce(d), t.created && (l.query = "", B(""), l.inputLength = 20), e.filterable && ((i = p.value) == null || i.focus());
1021
- } else
1022
- o.emit(te, t.value), ce(t.value), l.visible = !1;
1023
- Me(), !l.visible && D(() => {
1024
- pe(t);
1025
- });
1026
- }, Ve = (t = [], i) => {
1027
- if (!vl(i))
1028
- return t.indexOf(i);
1029
- const d = e.valueKey;
1030
- let S = -1;
1031
- return t.some((N, H) => pl(le(N, d)) === le(i, d) ? (S = H, !0) : !1), S;
1032
- }, Me = () => {
1033
- const t = p.value || u.value;
1034
- t && (t == null || t.focus());
1035
- }, pe = (t) => {
1036
- var i, d, S, N, H;
1037
- const ve = Array.isArray(t) ? t[0] : t;
1038
- let me = null;
1039
- if (ve != null && ve.value) {
1040
- const J = P.value.filter((R) => R.value === ve.value);
1041
- J.length > 0 && (me = J[0].$el);
1042
- }
1043
- if (f.value && me) {
1044
- const J = (N = (S = (d = (i = f.value) == null ? void 0 : i.popperRef) == null ? void 0 : d.contentRef) == null ? void 0 : S.querySelector) == null ? void 0 : N.call(S, `.${c.be("dropdown", "wrap")}`);
1045
- J && zt(J, me);
1046
- }
1047
- (H = F.value) == null || H.handleScroll();
1048
- }, Ze = (t) => {
1049
- l.optionsCount++, l.filteredOptionsCount++, l.options.set(t.value, t), l.cachedOptions.set(t.value, t), t.disabled && l.disabledOptions.set(t.value, t);
1050
- }, Je = (t, i) => {
1051
- l.options.get(t) === i && (l.optionsCount--, l.filteredOptionsCount--, l.options.delete(t));
1052
- }, xe = (t) => {
1053
- t.code !== Hl.backspace && Oe(!1), l.inputLength = p.value.value.length * 15 + 20, Q();
1054
- }, Oe = (t) => {
1055
- if (!Array.isArray(l.selected))
1056
- return;
1057
- const i = G(l.selected.map((S) => S.value)), d = l.selected[i];
1058
- if (d)
1059
- return t === !0 || t === !1 ? (d.hitState = t, t) : (d.hitState = !d.hitState, d.hitState);
1060
- }, _e = (t) => {
1061
- const i = t.target.value;
1062
- if (t.type === "compositionend")
1063
- l.isOnComposition = !1, D(() => B(i));
1064
- else {
1065
- const d = i[i.length - 1] || "";
1066
- l.isOnComposition = !_l(d);
1067
- }
1068
- }, Fe = () => {
1069
- D(() => pe(l.selected));
1070
- }, r = (t) => {
1071
- l.focused || ((e.automaticDropdown || e.filterable) && (e.filterable && !l.visible && (l.menuVisibleOnFocus = !0), l.visible = !0), l.focused = !0, o.emit("focus", t));
1072
- }, h = () => {
1073
- var t, i;
1074
- l.visible ? (t = p.value || u.value) == null || t.focus() : (i = u.value) == null || i.focus();
1075
- }, V = () => {
1076
- var t, i, d;
1077
- l.visible = !1, (t = u.value) == null || t.blur(), (d = (i = b.value) == null ? void 0 : i.blur) == null || d.call(i);
1078
- }, fe = (t) => {
1079
- var i, d, S;
1080
- (i = f.value) != null && i.isFocusInsideContent(t) || (d = w.value) != null && d.isFocusInsideContent(t) || (S = m.value) != null && S.contains(t.relatedTarget) || (l.visible && ul(), l.focused = !1, o.emit("blur", t));
1081
- }, Ie = (t) => {
1082
- we(t);
1083
- }, ul = () => {
1084
- l.visible = !1;
1085
- }, yl = (t) => {
1086
- l.visible && (t.preventDefault(), t.stopPropagation(), l.visible = !1);
1087
- }, el = (t) => {
1088
- t && !l.mouseEnter || j.value || (l.menuVisibleOnFocus ? l.menuVisibleOnFocus = !1 : (!f.value || !f.value.isFocusInsideContent()) && (l.visible = !l.visible), h());
1089
- }, dl = () => {
1090
- l.visible ? P.value[l.hoverIndex] && $e(P.value[l.hoverIndex]) : el();
1091
- }, ll = (t) => vl(t.value) ? le(t.value, e.valueKey) : t.value, tl = v(() => P.value.filter((t) => t.visible).every((t) => t.disabled)), Sl = v(() => e.multiple ? l.selected.slice(0, e.maxCollapseTags) : []), Cl = v(() => e.multiple ? l.selected.slice(e.maxCollapseTags) : []), nl = (t) => {
1092
- if (!l.visible) {
1093
- l.visible = !0;
1094
- return;
1095
- }
1096
- if (!(l.options.size === 0 || l.filteredOptionsCount === 0) && !l.isOnComposition && !tl.value) {
1097
- t === "next" ? (l.hoverIndex++, l.hoverIndex === l.options.size && (l.hoverIndex = 0)) : t === "prev" && (l.hoverIndex--, l.hoverIndex < 0 && (l.hoverIndex = l.options.size - 1));
1098
- const i = P.value[l.hoverIndex];
1099
- (i.disabled === !0 || i.states.groupDisabled === !0 || !i.visible) && nl(t), D(() => pe(A.value));
1100
- }
1101
- }, wl = () => {
1102
- l.mouseEnter = !0;
1103
- }, Ol = () => {
1104
- l.mouseEnter = !1;
1105
- }, Be = (t, i) => {
1106
- var d, S;
1107
- ke(t, i), (S = (d = w.value) == null ? void 0 : d.updatePopper) == null || S.call(d);
1108
- }, Il = v(() => ({
1109
- maxWidth: `${a(l.inputWidth) - 32 - (qe.value ? 22 : 0)}px`,
1110
- width: "100%"
1111
- }));
1112
- return {
1113
- optionList: O,
1114
- optionsArray: P,
1115
- selectSize: ae,
1116
- handleResize: Ge,
1117
- debouncedOnInputChange: de,
1118
- debouncedQueryChange: rl,
1119
- deletePrevTag: Le,
1120
- deleteTag: ke,
1121
- deleteSelected: we,
1122
- handleOptionSelect: $e,
1123
- scrollToOption: pe,
1124
- readonly: ne,
1125
- resetInputHeight: Q,
1126
- showClose: De,
1127
- iconComponent: Z,
1128
- iconReverse: oe,
1129
- showNewOption: re,
1130
- collapseTagSize: je,
1131
- setSelected: U,
1132
- managePlaceholder: ue,
1133
- selectDisabled: j,
1134
- emptyText: ie,
1135
- toggleLastOptionHitState: Oe,
1136
- resetInputState: xe,
1137
- handleComposition: _e,
1138
- onOptionCreate: Ze,
1139
- onOptionDestroy: Je,
1140
- handleMenuEnter: Fe,
1141
- handleFocus: r,
1142
- focus: h,
1143
- blur: V,
1144
- handleBlur: fe,
1145
- handleClearClick: Ie,
1146
- handleClose: ul,
1147
- handleKeydownEscape: yl,
1148
- toggleMenu: el,
1149
- selectOption: dl,
1150
- getValueKey: ll,
1151
- navigateOptions: nl,
1152
- handleDeleteTooltipTag: Be,
1153
- dropMenuVisible: Qe,
1154
- queryChange: $,
1155
- groupQueryChange: n,
1156
- showTagList: Sl,
1157
- collapseTagList: Cl,
1158
- selectTagsStyle: Il,
1159
- reference: u,
1160
- input: p,
1161
- iOSInput: b,
1162
- tooltipRef: f,
1163
- tagTooltipRef: w,
1164
- tags: g,
1165
- selectWrapper: m,
1166
- scrollbar: F,
1167
- handleMouseEnter: wl,
1168
- handleMouseLeave: Ol
1169
- };
1170
- };
1171
- var Cn = ge({
1172
- name: "ElOptions",
1173
- emits: ["update-options"],
1174
- setup(e, { slots: l, emit: o }) {
1175
- let s = [];
1176
- function c(u, p) {
1177
- if (u.length !== p.length)
1178
- return !1;
1179
- for (const [b] of u.entries())
1180
- if (u[b] != p[b])
1181
- return !1;
1182
- return !0;
1183
- }
1184
- return () => {
1185
- var u, p;
1186
- const b = (u = l.default) == null ? void 0 : u.call(l), f = [];
1187
- function w(g) {
1188
- Array.isArray(g) && g.forEach((m) => {
1189
- var F, A, $, n;
1190
- const O = (F = (m == null ? void 0 : m.type) || {}) == null ? void 0 : F.name;
1191
- O === "ElOptionGroup" ? w(!al(m.children) && !Array.isArray(m.children) && Pe((A = m.children) == null ? void 0 : A.default) ? ($ = m.children) == null ? void 0 : $.default() : m.children) : O === "ElOption" ? f.push((n = m.props) == null ? void 0 : n.label) : Array.isArray(m.children) && w(m.children);
1192
- });
1193
- }
1194
- return b.length && w((p = b[0]) == null ? void 0 : p.children), c(f, s) || (s = f, o("update-options", f)), b;
1195
- };
1196
- }
1197
- });
1198
- const jl = "ElSelect", wn = ge({
1199
- name: jl,
1200
- componentName: jl,
1201
- components: {
1202
- ElInput: sn,
1203
- ElSelectMenu: gn,
1204
- ElOption: Fl,
1205
- ElOptions: Cn,
1206
- ElTag: pn,
1207
- ElScrollbar: ft,
1208
- ElTooltip: vt,
1209
- ElIcon: Te
1210
- },
1211
- directives: { ClickOutside: mt },
1212
- props: {
1213
- name: String,
1214
- id: String,
1215
- modelValue: {
1216
- type: [Array, String, Number, Boolean, Object],
1217
- default: void 0
1218
- },
1219
- autocomplete: {
1220
- type: String,
1221
- default: "off"
1222
- },
1223
- automaticDropdown: Boolean,
1224
- size: {
1225
- type: String,
1226
- validator: qt
1227
- },
1228
- effect: {
1229
- type: String,
1230
- default: "light"
1231
- },
1232
- disabled: Boolean,
1233
- clearable: Boolean,
1234
- filterable: Boolean,
1235
- allowCreate: Boolean,
1236
- loading: Boolean,
1237
- popperClass: {
1238
- type: String,
1239
- default: ""
1240
- },
1241
- popperOptions: {
1242
- type: Object,
1243
- default: () => ({})
1244
- },
1245
- remote: Boolean,
1246
- loadingText: String,
1247
- noMatchText: String,
1248
- noDataText: String,
1249
- remoteMethod: Function,
1250
- filterMethod: Function,
1251
- multiple: Boolean,
1252
- multipleLimit: {
1253
- type: Number,
1254
- default: 0
1255
- },
1256
- placeholder: {
1257
- type: String
1258
- },
1259
- defaultFirstOption: Boolean,
1260
- reserveKeyword: {
1261
- type: Boolean,
1262
- default: !0
1263
- },
1264
- valueKey: {
1265
- type: String,
1266
- default: "value"
1267
- },
1268
- collapseTags: Boolean,
1269
- collapseTagsTooltip: Boolean,
1270
- maxCollapseTags: {
1271
- type: Number,
1272
- default: 1
1273
- },
1274
- teleported: ht.teleported,
1275
- persistent: {
1276
- type: Boolean,
1277
- default: !0
1278
- },
1279
- clearIcon: {
1280
- type: fl,
1281
- default: Xl
1282
- },
1283
- fitInputWidth: Boolean,
1284
- suffixIcon: {
1285
- type: fl,
1286
- default: Et
1287
- },
1288
- tagType: { ...et.type, default: "info" },
1289
- validateEvent: {
1290
- type: Boolean,
1291
- default: !0
1292
- },
1293
- remoteShowSuffix: Boolean,
1294
- suffixTransition: {
1295
- type: Boolean,
1296
- default: !0
1297
- },
1298
- placement: {
1299
- type: String,
1300
- values: bt,
1301
- default: "bottom-start"
1302
- },
1303
- ariaLabel: {
1304
- type: String,
1305
- default: void 0
1306
- }
1307
- },
1308
- emits: [
1309
- te,
1310
- xl,
1311
- "remove-tag",
1312
- "clear",
1313
- "visible-change",
1314
- "focus",
1315
- "blur"
1316
- ],
1317
- setup(e, l) {
1318
- const o = be("select"), s = be("input"), { t: c } = Kl(), u = yn(e), {
1319
- optionList: p,
1320
- optionsArray: b,
1321
- selectSize: f,
1322
- readonly: w,
1323
- handleResize: g,
1324
- collapseTagSize: m,
1325
- debouncedOnInputChange: F,
1326
- debouncedQueryChange: A,
1327
- deletePrevTag: $,
1328
- deleteTag: n,
1329
- deleteSelected: O,
1330
- handleOptionSelect: T,
1331
- scrollToOption: E,
1332
- setSelected: q,
1333
- resetInputHeight: ne,
1334
- managePlaceholder: j,
1335
- showClose: De,
1336
- selectDisabled: Z,
1337
- iconComponent: oe,
1338
- iconReverse: qe,
1339
- showNewOption: ye,
1340
- emptyText: ie,
1341
- toggleLastOptionHitState: P,
1342
- resetInputState: Ke,
1343
- handleComposition: re,
1344
- onOptionCreate: ae,
1345
- onOptionDestroy: je,
1346
- handleMenuEnter: Qe,
1347
- handleFocus: Q,
1348
- focus: B,
1349
- blur: ue,
1350
- handleBlur: Se,
1351
- handleClearClick: U,
1352
- handleClose: Ce,
1353
- handleKeydownEscape: Ue,
1354
- toggleMenu: Ge,
1355
- selectOption: Ye,
1356
- getValueKey: Xe,
1357
- navigateOptions: de,
1358
- handleDeleteTooltipTag: rl,
1359
- dropMenuVisible: ce,
1360
- reference: G,
1361
- input: Le,
1362
- iOSInput: ke,
1363
- tooltipRef: we,
1364
- tagTooltipRef: $e,
1365
- tags: Ve,
1366
- selectWrapper: Me,
1367
- scrollbar: pe,
1368
- queryChange: Ze,
1369
- groupQueryChange: Je,
1370
- handleMouseEnter: xe,
1371
- handleMouseLeave: Oe,
1372
- showTagList: _e,
1373
- collapseTagList: Fe,
1374
- selectTagsStyle: r
1375
- } = Sn(e, u, l), {
1376
- inputWidth: h,
1377
- selected: V,
1378
- inputLength: fe,
1379
- filteredOptionsCount: Ie,
1380
- visible: ul,
1381
- selectedLabel: yl,
1382
- hoverIndex: el,
1383
- query: dl,
1384
- inputHovering: ll,
1385
- currentPlaceholder: tl,
1386
- menuVisibleOnFocus: Sl,
1387
- isOnComposition: Cl,
1388
- options: nl,
1389
- cachedOptions: wl,
1390
- optionsCount: Ol,
1391
- prefixWidth: Be
1392
- } = Ml(u), Il = v(() => {
1393
- const R = [o.b()], ze = a(f);
1394
- return ze && R.push(o.m(ze)), e.disabled && R.push(o.m("disabled")), R;
1395
- }), t = v(() => [
1396
- o.e("tags"),
1397
- o.is("disabled", a(Z))
1398
- ]), i = v(() => [
1399
- o.b("tags-wrapper"),
1400
- { "has-prefix": a(Be) && a(V).length }
1401
- ]), d = v(() => [
1402
- o.e("input"),
1403
- o.is(a(f)),
1404
- o.is("disabled", a(Z))
1405
- ]), S = v(() => [
1406
- o.e("input"),
1407
- o.is(a(f)),
1408
- o.em("input", "iOS")
1409
- ]), N = v(() => [
1410
- o.is("empty", !e.allowCreate && !!a(dl) && a(Ie) === 0)
1411
- ]), H = v(() => ({ maxWidth: `${a(h) > 123 ? a(h) - 123 : a(h) - 75}px` })), ve = v(() => ({
1412
- marginLeft: `${a(Be)}px`,
1413
- flexGrow: 1,
1414
- width: `${a(fe) / (a(h) - 32)}%`,
1415
- maxWidth: `${a(h) - 42}px`
1416
- }));
1417
- Ql(gl, bl({
1418
- props: e,
1419
- options: nl,
1420
- optionsArray: b,
1421
- cachedOptions: wl,
1422
- optionsCount: Ol,
1423
- filteredOptionsCount: Ie,
1424
- hoverIndex: el,
1425
- handleOptionSelect: T,
1426
- onOptionCreate: ae,
1427
- onOptionDestroy: je,
1428
- selectWrapper: Me,
1429
- selected: V,
1430
- setSelected: q,
1431
- queryChange: Ze,
1432
- groupQueryChange: Je
1433
- })), ml(() => {
1434
- u.cachedPlaceHolder = tl.value = e.placeholder || (() => c("el.select.placeholder")), e.multiple && Array.isArray(e.modelValue) && e.modelValue.length > 0 && (tl.value = ""), zl(Me, g), e.remote && e.multiple && ne(), D(() => {
1435
- const R = G.value && G.value.$el;
1436
- if (R && (h.value = R.getBoundingClientRect().width, l.slots.prefix)) {
1437
- const ze = R.querySelector(`.${s.e("prefix")}`);
1438
- Be.value = Math.max(ze.getBoundingClientRect().width + 11, 30);
1439
- }
1440
- }), q();
1441
- }), e.multiple && !Array.isArray(e.modelValue) && l.emit(te, []), !e.multiple && Array.isArray(e.modelValue) && l.emit(te, "");
1442
- const me = v(() => {
1443
- var R, ze;
1444
- return (ze = (R = we.value) == null ? void 0 : R.popperRef) == null ? void 0 : ze.contentRef;
1445
- });
1446
- return {
1447
- isIOS: $t,
1448
- onOptionsRendered: (R) => {
1449
- p.value = R;
1450
- },
1451
- prefixWidth: Be,
1452
- selectSize: f,
1453
- readonly: w,
1454
- handleResize: g,
1455
- collapseTagSize: m,
1456
- debouncedOnInputChange: F,
1457
- debouncedQueryChange: A,
1458
- deletePrevTag: $,
1459
- deleteTag: n,
1460
- handleDeleteTooltipTag: rl,
1461
- deleteSelected: O,
1462
- handleOptionSelect: T,
1463
- scrollToOption: E,
1464
- inputWidth: h,
1465
- selected: V,
1466
- inputLength: fe,
1467
- filteredOptionsCount: Ie,
1468
- visible: ul,
1469
- selectedLabel: yl,
1470
- hoverIndex: el,
1471
- query: dl,
1472
- inputHovering: ll,
1473
- currentPlaceholder: tl,
1474
- menuVisibleOnFocus: Sl,
1475
- isOnComposition: Cl,
1476
- options: nl,
1477
- resetInputHeight: ne,
1478
- managePlaceholder: j,
1479
- showClose: De,
1480
- selectDisabled: Z,
1481
- iconComponent: oe,
1482
- iconReverse: qe,
1483
- showNewOption: ye,
1484
- emptyText: ie,
1485
- toggleLastOptionHitState: P,
1486
- resetInputState: Ke,
1487
- handleComposition: re,
1488
- handleMenuEnter: Qe,
1489
- handleFocus: Q,
1490
- focus: B,
1491
- blur: ue,
1492
- handleBlur: Se,
1493
- handleClearClick: U,
1494
- handleClose: Ce,
1495
- handleKeydownEscape: Ue,
1496
- toggleMenu: Ge,
1497
- selectOption: Ye,
1498
- getValueKey: Xe,
1499
- navigateOptions: de,
1500
- dropMenuVisible: ce,
1501
- reference: G,
1502
- input: Le,
1503
- iOSInput: ke,
1504
- tooltipRef: we,
1505
- popperPaneRef: me,
1506
- tags: Ve,
1507
- selectWrapper: Me,
1508
- scrollbar: pe,
1509
- wrapperKls: Il,
1510
- tagsKls: t,
1511
- tagWrapperKls: i,
1512
- inputKls: d,
1513
- iOSInputKls: S,
1514
- scrollbarKls: N,
1515
- selectTagsStyle: r,
1516
- nsSelect: o,
1517
- tagTextStyle: H,
1518
- inputStyle: ve,
1519
- handleMouseEnter: xe,
1520
- handleMouseLeave: Oe,
1521
- showTagList: _e,
1522
- collapseTagList: Fe,
1523
- tagTooltipRef: $e
1524
- };
1525
- }
1526
- }), On = ["disabled", "autocomplete", "aria-label"], In = ["disabled"], En = { style: { height: "100%", display: "flex", "justify-content": "center", "align-items": "center" } };
1527
- function Tn(e, l, o, s, c, u) {
1528
- const p = Ee("el-tag"), b = Ee("el-tooltip"), f = Ee("el-icon"), w = Ee("el-input"), g = Ee("el-option"), m = Ee("el-options"), F = Ee("el-scrollbar"), A = Ee("el-select-menu"), $ = st("click-outside");
1529
- return He((y(), k("div", {
1530
- ref: "selectWrapper",
1531
- class: C(e.wrapperKls),
1532
- onMouseenter: l[22] || (l[22] = (...n) => e.handleMouseEnter && e.handleMouseEnter(...n)),
1533
- onMouseleave: l[23] || (l[23] = (...n) => e.handleMouseLeave && e.handleMouseLeave(...n)),
1534
- onClick: l[24] || (l[24] = ee((...n) => e.toggleMenu && e.toggleMenu(...n), ["stop"]))
1535
- }, [
1536
- he(b, {
1537
- ref: "tooltipRef",
1538
- visible: e.dropMenuVisible,
1539
- placement: e.placement,
1540
- teleported: e.teleported,
1541
- "popper-class": [e.nsSelect.e("popper"), e.popperClass],
1542
- "popper-options": e.popperOptions,
1543
- "fallback-placements": ["bottom-start", "top-start", "right", "left"],
1544
- effect: e.effect,
1545
- pure: "",
1546
- trigger: "click",
1547
- transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
1548
- "stop-popper-mouse-event": !1,
1549
- "gpu-acceleration": !1,
1550
- persistent: e.persistent,
1551
- onShow: e.handleMenuEnter
1552
- }, {
1553
- default: L(() => [
1554
- z("div", {
1555
- class: "select-trigger",
1556
- onMouseenter: l[20] || (l[20] = (n) => e.inputHovering = !0),
1557
- onMouseleave: l[21] || (l[21] = (n) => e.inputHovering = !1)
1558
- }, [
1559
- e.multiple ? (y(), k("div", {
1560
- key: 0,
1561
- ref: "tags",
1562
- tabindex: "-1",
1563
- class: C(e.tagsKls),
1564
- style: se(e.selectTagsStyle),
1565
- onClick: l[15] || (l[15] = (...n) => e.focus && e.focus(...n))
1566
- }, [
1567
- e.collapseTags && e.selected.length ? (y(), M($l, {
1568
- key: 0,
1569
- onAfterLeave: e.resetInputHeight
1570
- }, {
1571
- default: L(() => [
1572
- z("span", {
1573
- class: C(e.tagWrapperKls)
1574
- }, [
1575
- (y(!0), k(Ae, null, Tl(e.showTagList, (n) => (y(), M(p, {
1576
- key: e.getValueKey(n),
1577
- closable: !e.selectDisabled && !n.isDisabled,
1578
- size: e.collapseTagSize,
1579
- hit: n.hitState,
1580
- type: e.tagType,
1581
- "disable-transitions": "",
1582
- onClose: (O) => e.deleteTag(O, n)
1583
- }, {
1584
- default: L(() => [
1585
- z("span", {
1586
- class: C(e.nsSelect.e("tags-text")),
1587
- style: se(e.tagTextStyle)
1588
- }, Y(n.currentLabel), 7)
1589
- ]),
1590
- _: 2
1591
- }, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128)),
1592
- e.selected.length > e.maxCollapseTags ? (y(), M(p, {
1593
- key: 0,
1594
- closable: !1,
1595
- size: e.collapseTagSize,
1596
- type: e.tagType,
1597
- "disable-transitions": ""
1598
- }, {
1599
- default: L(() => [
1600
- e.collapseTagsTooltip ? (y(), M(b, {
1601
- key: 0,
1602
- ref: "tagTooltipRef",
1603
- disabled: e.dropMenuVisible,
1604
- "fallback-placements": ["bottom", "top", "right", "left"],
1605
- effect: e.effect,
1606
- placement: "bottom",
1607
- teleported: e.teleported
1608
- }, {
1609
- default: L(() => [
1610
- z("span", {
1611
- class: C(e.nsSelect.e("tags-text"))
1612
- }, "+ " + Y(e.selected.length - e.maxCollapseTags), 3)
1613
- ]),
1614
- content: L(() => [
1615
- z("div", {
1616
- class: C(e.nsSelect.e("collapse-tags"))
1617
- }, [
1618
- (y(!0), k(Ae, null, Tl(e.collapseTagList, (n) => (y(), k("div", {
1619
- key: e.getValueKey(n),
1620
- class: C(e.nsSelect.e("collapse-tag"))
1621
- }, [
1622
- he(p, {
1623
- class: "in-tooltip",
1624
- closable: !e.selectDisabled && !n.isDisabled,
1625
- size: e.collapseTagSize,
1626
- hit: n.hitState,
1627
- type: e.tagType,
1628
- "disable-transitions": "",
1629
- style: { margin: "2px" },
1630
- onClose: (O) => e.handleDeleteTooltipTag(O, n)
1631
- }, {
1632
- default: L(() => [
1633
- z("span", {
1634
- class: C(e.nsSelect.e("tags-text")),
1635
- style: se({
1636
- maxWidth: e.inputWidth - 75 + "px"
1637
- })
1638
- }, Y(n.currentLabel), 7)
1639
- ]),
1640
- _: 2
1641
- }, 1032, ["closable", "size", "hit", "type", "onClose"])
1642
- ], 2))), 128))
1643
- ], 2)
1644
- ]),
1645
- _: 1
1646
- }, 8, ["disabled", "effect", "teleported"])) : (y(), k("span", {
1647
- key: 1,
1648
- class: C(e.nsSelect.e("tags-text"))
1649
- }, "+ " + Y(e.selected.length - e.maxCollapseTags), 3))
1650
- ]),
1651
- _: 1
1652
- }, 8, ["size", "type"])) : I("v-if", !0)
1653
- ], 2)
1654
- ]),
1655
- _: 1
1656
- }, 8, ["onAfterLeave"])) : I("v-if", !0),
1657
- e.collapseTags ? I("v-if", !0) : (y(), M($l, {
1658
- key: 1,
1659
- onAfterLeave: e.resetInputHeight
1660
- }, {
1661
- default: L(() => [
1662
- z("span", {
1663
- class: C(e.tagWrapperKls),
1664
- style: se(e.prefixWidth && e.selected.length ? { marginLeft: `${e.prefixWidth}px` } : "")
1665
- }, [
1666
- (y(!0), k(Ae, null, Tl(e.selected, (n) => (y(), M(p, {
1667
- key: e.getValueKey(n),
1668
- closable: !e.selectDisabled && !n.isDisabled,
1669
- size: e.collapseTagSize,
1670
- hit: n.hitState,
1671
- type: e.tagType,
1672
- "disable-transitions": "",
1673
- onClose: (O) => e.deleteTag(O, n)
1674
- }, {
1675
- default: L(() => [
1676
- z("span", {
1677
- class: C(e.nsSelect.e("tags-text")),
1678
- style: se({ maxWidth: e.inputWidth - 75 + "px" })
1679
- }, Y(n.currentLabel), 7)
1680
- ]),
1681
- _: 2
1682
- }, 1032, ["closable", "size", "hit", "type", "onClose"]))), 128))
1683
- ], 6)
1684
- ]),
1685
- _: 1
1686
- }, 8, ["onAfterLeave"])),
1687
- e.filterable && !e.selectDisabled ? He((y(), k("input", {
1688
- key: 2,
1689
- ref: "input",
1690
- "onUpdate:modelValue": l[0] || (l[0] = (n) => e.query = n),
1691
- type: "text",
1692
- class: C(e.inputKls),
1693
- disabled: e.selectDisabled,
1694
- autocomplete: e.autocomplete,
1695
- style: se(e.inputStyle),
1696
- "aria-label": e.ariaLabel,
1697
- onFocus: l[1] || (l[1] = (...n) => e.handleFocus && e.handleFocus(...n)),
1698
- onBlur: l[2] || (l[2] = (...n) => e.handleBlur && e.handleBlur(...n)),
1699
- onKeyup: l[3] || (l[3] = (...n) => e.managePlaceholder && e.managePlaceholder(...n)),
1700
- onKeydown: [
1701
- l[4] || (l[4] = (...n) => e.resetInputState && e.resetInputState(...n)),
1702
- l[5] || (l[5] = x(ee((n) => e.navigateOptions("next"), ["prevent"]), ["down"])),
1703
- l[6] || (l[6] = x(ee((n) => e.navigateOptions("prev"), ["prevent"]), ["up"])),
1704
- l[7] || (l[7] = x((...n) => e.handleKeydownEscape && e.handleKeydownEscape(...n), ["esc"])),
1705
- l[8] || (l[8] = x(ee((...n) => e.selectOption && e.selectOption(...n), ["stop", "prevent"]), ["enter"])),
1706
- l[9] || (l[9] = x((...n) => e.deletePrevTag && e.deletePrevTag(...n), ["delete"])),
1707
- l[10] || (l[10] = x((n) => e.visible = !1, ["tab"]))
1708
- ],
1709
- onCompositionstart: l[11] || (l[11] = (...n) => e.handleComposition && e.handleComposition(...n)),
1710
- onCompositionupdate: l[12] || (l[12] = (...n) => e.handleComposition && e.handleComposition(...n)),
1711
- onCompositionend: l[13] || (l[13] = (...n) => e.handleComposition && e.handleComposition(...n)),
1712
- onInput: l[14] || (l[14] = (...n) => e.debouncedQueryChange && e.debouncedQueryChange(...n))
1713
- }, null, 46, On)), [
1714
- [rt, e.query]
1715
- ]) : I("v-if", !0)
1716
- ], 6)) : I("v-if", !0),
1717
- I(" fix: https://github.com/element-plus/element-plus/issues/11415 "),
1718
- e.isIOS && !e.multiple && e.filterable && e.readonly ? (y(), k("input", {
1719
- key: 1,
1720
- ref: "iOSInput",
1721
- class: C(e.iOSInputKls),
1722
- disabled: e.selectDisabled,
1723
- type: "text"
1724
- }, null, 10, In)) : I("v-if", !0),
1725
- he(w, {
1726
- id: e.id,
1727
- ref: "reference",
1728
- modelValue: e.selectedLabel,
1729
- "onUpdate:modelValue": l[16] || (l[16] = (n) => e.selectedLabel = n),
1730
- type: "text",
1731
- placeholder: typeof e.currentPlaceholder == "function" ? e.currentPlaceholder() : e.currentPlaceholder,
1732
- name: e.name,
1733
- autocomplete: e.autocomplete,
1734
- size: e.selectSize,
1735
- disabled: e.selectDisabled,
1736
- readonly: e.readonly,
1737
- "validate-event": !1,
1738
- class: C([e.nsSelect.is("focus", e.visible)]),
1739
- tabindex: e.multiple && e.filterable ? -1 : void 0,
1740
- label: e.ariaLabel,
1741
- onFocus: e.handleFocus,
1742
- onBlur: e.handleBlur,
1743
- onInput: e.debouncedOnInputChange,
1744
- onPaste: e.debouncedOnInputChange,
1745
- onCompositionstart: e.handleComposition,
1746
- onCompositionupdate: e.handleComposition,
1747
- onCompositionend: e.handleComposition,
1748
- onKeydown: [
1749
- l[17] || (l[17] = x(ee((n) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"])),
1750
- l[18] || (l[18] = x(ee((n) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"])),
1751
- x(ee(e.selectOption, ["stop", "prevent"]), ["enter"]),
1752
- x(e.handleKeydownEscape, ["esc"]),
1753
- l[19] || (l[19] = x((n) => e.visible = !1, ["tab"]))
1754
- ]
1755
- }, ut({
1756
- suffix: L(() => [
1757
- e.iconComponent && !e.showClose ? (y(), M(f, {
1758
- key: 0,
1759
- class: C([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
1760
- }, {
1761
- default: L(() => [
1762
- (y(), M(Ne(e.iconComponent)))
1763
- ]),
1764
- _: 1
1765
- }, 8, ["class"])) : I("v-if", !0),
1766
- e.showClose && e.clearIcon ? (y(), M(f, {
1767
- key: 1,
1768
- class: C([e.nsSelect.e("caret"), e.nsSelect.e("icon")]),
1769
- onClick: e.handleClearClick
1770
- }, {
1771
- default: L(() => [
1772
- (y(), M(Ne(e.clearIcon)))
1773
- ]),
1774
- _: 1
1775
- }, 8, ["class", "onClick"])) : I("v-if", !0)
1776
- ]),
1777
- _: 2
1778
- }, [
1779
- e.$slots.prefix ? {
1780
- name: "prefix",
1781
- fn: L(() => [
1782
- z("div", En, [
1783
- X(e.$slots, "prefix")
1784
- ])
1785
- ])
1786
- } : void 0
1787
- ]), 1032, ["id", "modelValue", "placeholder", "name", "autocomplete", "size", "disabled", "readonly", "class", "tabindex", "label", "onFocus", "onBlur", "onInput", "onPaste", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onKeydown"])
1788
- ], 32)
1789
- ]),
1790
- content: L(() => [
1791
- he(A, null, {
1792
- default: L(() => [
1793
- He(he(F, {
1794
- ref: "scrollbar",
1795
- tag: "ul",
1796
- "wrap-class": e.nsSelect.be("dropdown", "wrap"),
1797
- "view-class": e.nsSelect.be("dropdown", "list"),
1798
- class: C(e.scrollbarKls)
1799
- }, {
1800
- default: L(() => [
1801
- e.showNewOption ? (y(), M(g, {
1802
- key: 0,
1803
- value: e.query,
1804
- created: !0
1805
- }, null, 8, ["value"])) : I("v-if", !0),
1806
- he(m, { onUpdateOptions: e.onOptionsRendered }, {
1807
- default: L(() => [
1808
- X(e.$slots, "default")
1809
- ]),
1810
- _: 3
1811
- }, 8, ["onUpdateOptions"])
1812
- ]),
1813
- _: 3
1814
- }, 8, ["wrap-class", "view-class", "class"]), [
1815
- [hl, e.options.size > 0 && !e.loading]
1816
- ]),
1817
- e.emptyText && (!e.allowCreate || e.loading || e.allowCreate && e.options.size === 0) ? (y(), k(Ae, { key: 0 }, [
1818
- e.$slots.empty ? X(e.$slots, "empty", { key: 0 }) : (y(), k("p", {
1819
- key: 1,
1820
- class: C(e.nsSelect.be("dropdown", "empty"))
1821
- }, Y(e.emptyText), 3))
1822
- ], 64)) : I("v-if", !0)
1823
- ]),
1824
- _: 3
1825
- })
1826
- ]),
1827
- _: 3
1828
- }, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "effect", "transition", "persistent", "onShow"])
1829
- ], 34)), [
1830
- [$, e.handleClose, e.popperPaneRef]
1831
- ]);
1832
- }
1833
- var Ln = /* @__PURE__ */ We(wn, [["render", Tn], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);
1834
- const kn = ge({
1835
- name: "ElOptionGroup",
1836
- componentName: "ElOptionGroup",
1837
- props: {
1838
- label: String,
1839
- disabled: Boolean
1840
- },
1841
- setup(e) {
1842
- const l = be("select"), o = K(!0), s = sl(), c = K([]);
1843
- Ql(lt, bl({
1844
- ...Ml(e)
1845
- }));
1846
- const u = cl(gl);
1847
- ml(() => {
1848
- c.value = p(s.subTree);
1849
- });
1850
- const p = (f) => {
1851
- const w = [];
1852
- return Array.isArray(f.children) && f.children.forEach((g) => {
1853
- var m;
1854
- g.type && g.type.name === "ElOption" && g.component && g.component.proxy ? w.push(g.component.proxy) : (m = g.children) != null && m.length && w.push(...p(g));
1855
- }), w;
1856
- }, { groupQueryChange: b } = pl(u);
1857
- return W(b, () => {
1858
- o.value = c.value.some((f) => f.visible === !0);
1859
- }, { flush: "post" }), {
1860
- visible: o,
1861
- ns: l
1862
- };
1863
- }
1864
- });
1865
- function $n(e, l, o, s, c, u) {
1866
- return He((y(), k("ul", {
1867
- class: C(e.ns.be("group", "wrap"))
1868
- }, [
1869
- z("li", {
1870
- class: C(e.ns.be("group", "title"))
1871
- }, Y(e.label), 3),
1872
- z("li", null, [
1873
- z("ul", {
1874
- class: C(e.ns.b("group"))
1875
- }, [
1876
- X(e.$slots, "default")
1877
- ], 2)
1878
- ])
1879
- ], 2)), [
1880
- [hl, e.visible]
1881
- ]);
1882
- }
1883
- var tt = /* @__PURE__ */ We(kn, [["render", $n], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);
1884
- const Bn = Dl(Ln, {
1885
- Option: Fl,
1886
- OptionGroup: tt
1887
- }), Nn = Jl(Fl);
1888
- Jl(tt);
1889
- export {
1890
- Nn as E,
1891
- Bn as a,
1892
- sn as b
1893
- };