z-vue-design 0.0.34 → 0.0.35

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.
@@ -0,0 +1,4370 @@
1
+ import { defineComponent as ce, computed as D, ref as me, createVNode as w, cloneVNode as Yt, isVNode as Nn, inject as Ne, provide as We, onUnmounted as Gt, shallowRef as G, watch as le, watchEffect as Ce, onMounted as ye, createTextVNode as ze, Fragment as $e, onBeforeUnmount as Ve, isRef as Vn, reactive as Me, toRefs as _n, toRaw as it, nextTick as Re, onUpdated as Hn, toRef as he, mergeModels as Ln, useModel as An, resolveComponent as Mt, createBlock as Et, openBlock as Qe, mergeProps as Bn, withCtx as Tt, createElementBlock as zn, renderList as Wn, toDisplayString as Kn } from "vue";
2
+ import { _ as y, o as jn, P as _, H as Un, b as U, a as se, c as Xt, J as at, m as Fe, K as qt, w as ge, M as be, O as Yn, Q as ve, R as Pt, S as Rt, I as Gn, C as Xn, L as qn, x as rt, U as nt, A as Se, y as Qt, r as Qn, v as Zn, u as Jn, F as kn, V as eo, d as to, g as no, h as oo, X as lo, Y as io, Z as ao, n as ro, s as Pe, p as so, q as Ft, z as uo } from "./index-DmUtMFW6.mjs";
3
+ import { K as W, o as Ke } from "./KeyCode-Burv3cJJ.mjs";
4
+ import { B as co, R as st, i as fo, S as po, D as mo } from "./SearchOutlined-Dr8Evzi1.mjs";
5
+ import { u as vo, a as Dt, C as go, i as Nt, b as Vt, s as ho, c as bo, d as yo, e as So } from "./slide-BAlF56YG.mjs";
6
+ import { g as wo, a as Co } from "./statusUtils-MEeiZs8C.mjs";
7
+ function _t(e, n) {
8
+ const {
9
+ key: o
10
+ } = e;
11
+ let t;
12
+ return "value" in e && ({
13
+ value: t
14
+ } = e), o ?? (t !== void 0 ? t : `rc-index-key-${n}`);
15
+ }
16
+ function Zt(e, n) {
17
+ const {
18
+ label: o,
19
+ value: t,
20
+ options: l
21
+ } = e || {};
22
+ return {
23
+ label: o || (n ? "children" : "label"),
24
+ value: t || "value",
25
+ options: l || "options"
26
+ };
27
+ }
28
+ function Io(e) {
29
+ let {
30
+ fieldNames: n,
31
+ childrenAsData: o
32
+ } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
33
+ const t = [], {
34
+ label: l,
35
+ value: i,
36
+ options: u
37
+ } = Zt(n, !1);
38
+ function a(f, s) {
39
+ f.forEach((r) => {
40
+ const p = r[l];
41
+ if (s || !(u in r)) {
42
+ const g = r[i];
43
+ t.push({
44
+ key: _t(r, t.length),
45
+ groupOption: s,
46
+ data: r,
47
+ label: p,
48
+ value: g
49
+ });
50
+ } else {
51
+ let g = p;
52
+ g === void 0 && o && (g = r.label), t.push({
53
+ key: _t(r, t.length),
54
+ group: !0,
55
+ data: r,
56
+ label: g
57
+ }), a(r[u], !0);
58
+ }
59
+ });
60
+ }
61
+ return a(e, !1), t;
62
+ }
63
+ function ot(e) {
64
+ const n = y({}, e);
65
+ return "props" in n || Object.defineProperty(n, "props", {
66
+ get() {
67
+ return jn(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), n;
68
+ }
69
+ }), n;
70
+ }
71
+ function xo(e, n) {
72
+ if (!n || !n.length)
73
+ return null;
74
+ let o = !1;
75
+ function t(i, u) {
76
+ let [a, ...f] = u;
77
+ if (!a)
78
+ return [i];
79
+ const s = i.split(a);
80
+ return o = o || s.length > 1, s.reduce((r, p) => [...r, ...t(p, f)], []).filter((r) => r);
81
+ }
82
+ const l = t(e, n);
83
+ return o ? l : null;
84
+ }
85
+ var Oo = function(e, n) {
86
+ var o = {};
87
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
88
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
89
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
90
+ return o;
91
+ };
92
+ const $o = (e) => {
93
+ const n = e === !0 ? 0 : 1;
94
+ return {
95
+ bottomLeft: {
96
+ points: ["tl", "bl"],
97
+ offset: [0, 4],
98
+ overflow: {
99
+ adjustX: n,
100
+ adjustY: 1
101
+ }
102
+ },
103
+ bottomRight: {
104
+ points: ["tr", "br"],
105
+ offset: [0, 4],
106
+ overflow: {
107
+ adjustX: n,
108
+ adjustY: 1
109
+ }
110
+ },
111
+ topLeft: {
112
+ points: ["bl", "tl"],
113
+ offset: [0, -4],
114
+ overflow: {
115
+ adjustX: n,
116
+ adjustY: 1
117
+ }
118
+ },
119
+ topRight: {
120
+ points: ["br", "tr"],
121
+ offset: [0, -4],
122
+ overflow: {
123
+ adjustX: n,
124
+ adjustY: 1
125
+ }
126
+ }
127
+ };
128
+ }, Mo = ce({
129
+ name: "SelectTrigger",
130
+ inheritAttrs: !1,
131
+ props: {
132
+ dropdownAlign: Object,
133
+ visible: {
134
+ type: Boolean,
135
+ default: void 0
136
+ },
137
+ disabled: {
138
+ type: Boolean,
139
+ default: void 0
140
+ },
141
+ dropdownClassName: String,
142
+ dropdownStyle: _.object,
143
+ placement: String,
144
+ empty: {
145
+ type: Boolean,
146
+ default: void 0
147
+ },
148
+ prefixCls: String,
149
+ popupClassName: String,
150
+ animation: String,
151
+ transitionName: String,
152
+ getPopupContainer: Function,
153
+ dropdownRender: Function,
154
+ containerWidth: Number,
155
+ dropdownMatchSelectWidth: _.oneOfType([Number, Boolean]).def(!0),
156
+ popupElement: _.any,
157
+ direction: String,
158
+ getTriggerDOMNode: Function,
159
+ onPopupVisibleChange: Function,
160
+ onPopupMouseEnter: Function,
161
+ onPopupFocusin: Function,
162
+ onPopupFocusout: Function
163
+ },
164
+ setup(e, n) {
165
+ let {
166
+ slots: o,
167
+ attrs: t,
168
+ expose: l
169
+ } = n;
170
+ const i = D(() => {
171
+ const {
172
+ dropdownMatchSelectWidth: a
173
+ } = e;
174
+ return $o(a);
175
+ }), u = me();
176
+ return l({
177
+ getPopupElement: () => u.value
178
+ }), () => {
179
+ const a = y(y({}, e), t), {
180
+ empty: f = !1
181
+ } = a, s = Oo(a, ["empty"]), {
182
+ visible: r,
183
+ dropdownAlign: p,
184
+ prefixCls: g,
185
+ popupElement: I,
186
+ dropdownClassName: b,
187
+ dropdownStyle: C,
188
+ direction: S = "ltr",
189
+ placement: x,
190
+ dropdownMatchSelectWidth: R,
191
+ containerWidth: F,
192
+ dropdownRender: O,
193
+ animation: m,
194
+ transitionName: E,
195
+ getPopupContainer: $,
196
+ getTriggerDOMNode: N,
197
+ onPopupVisibleChange: H,
198
+ onPopupMouseEnter: K,
199
+ onPopupFocusin: z,
200
+ onPopupFocusout: q
201
+ } = s, Z = `${g}-dropdown`;
202
+ let j = I;
203
+ O && (j = O({
204
+ menuNode: I,
205
+ props: e
206
+ }));
207
+ const T = m ? `${Z}-${m}` : E, L = y({
208
+ minWidth: `${F}px`
209
+ }, C);
210
+ return typeof R == "number" ? L.width = `${R}px` : R && (L.width = `${F}px`), w(Un, U(U({}, e), {}, {
211
+ showAction: H ? ["click"] : [],
212
+ hideAction: H ? ["click"] : [],
213
+ popupPlacement: x || (S === "rtl" ? "bottomRight" : "bottomLeft"),
214
+ builtinPlacements: i.value,
215
+ prefixCls: Z,
216
+ popupTransitionName: T,
217
+ popupAlign: p,
218
+ popupVisible: r,
219
+ getPopupContainer: $,
220
+ popupClassName: se(b, {
221
+ [`${Z}-empty`]: f
222
+ }),
223
+ popupStyle: L,
224
+ getTriggerDOMNode: N,
225
+ onPopupVisibleChange: H
226
+ }), {
227
+ default: o.default,
228
+ popup: () => w("div", {
229
+ ref: u,
230
+ onMouseenter: K,
231
+ onFocusin: z,
232
+ onFocusout: q
233
+ }, [j])
234
+ });
235
+ };
236
+ }
237
+ }), Ie = (e, n) => {
238
+ let {
239
+ slots: o
240
+ } = n;
241
+ var t;
242
+ const {
243
+ class: l,
244
+ customizeIcon: i,
245
+ customizeIconProps: u,
246
+ onMousedown: a,
247
+ onClick: f
248
+ } = e;
249
+ let s;
250
+ return typeof i == "function" ? s = i(u) : s = Nn(i) ? Yt(i) : i, w("span", {
251
+ class: l,
252
+ onMousedown: (r) => {
253
+ r.preventDefault(), a && a(r);
254
+ },
255
+ style: {
256
+ userSelect: "none",
257
+ WebkitUserSelect: "none"
258
+ },
259
+ unselectable: "on",
260
+ onClick: f,
261
+ "aria-hidden": !0
262
+ }, [s !== void 0 ? s : w("span", {
263
+ class: l.split(/\s+/).map((r) => `${r}-icon`)
264
+ }, [(t = o.default) === null || t === void 0 ? void 0 : t.call(o)])]);
265
+ };
266
+ Ie.inheritAttrs = !1;
267
+ Ie.displayName = "TransBtn";
268
+ Ie.props = {
269
+ class: String,
270
+ customizeIcon: _.any,
271
+ customizeIconProps: _.any,
272
+ onMousedown: Function,
273
+ onClick: Function
274
+ };
275
+ const Eo = {
276
+ inputRef: _.any,
277
+ prefixCls: String,
278
+ id: String,
279
+ inputElement: _.VueNode,
280
+ disabled: {
281
+ type: Boolean,
282
+ default: void 0
283
+ },
284
+ autofocus: {
285
+ type: Boolean,
286
+ default: void 0
287
+ },
288
+ autocomplete: String,
289
+ editable: {
290
+ type: Boolean,
291
+ default: void 0
292
+ },
293
+ activeDescendantId: String,
294
+ value: String,
295
+ open: {
296
+ type: Boolean,
297
+ default: void 0
298
+ },
299
+ tabindex: _.oneOfType([_.number, _.string]),
300
+ /** Pass accessibility props to input */
301
+ attrs: _.object,
302
+ onKeydown: {
303
+ type: Function
304
+ },
305
+ onMousedown: {
306
+ type: Function
307
+ },
308
+ onChange: {
309
+ type: Function
310
+ },
311
+ onPaste: {
312
+ type: Function
313
+ },
314
+ onCompositionstart: {
315
+ type: Function
316
+ },
317
+ onCompositionend: {
318
+ type: Function
319
+ },
320
+ onFocus: {
321
+ type: Function
322
+ },
323
+ onBlur: {
324
+ type: Function
325
+ }
326
+ }, Jt = ce({
327
+ compatConfig: {
328
+ MODE: 3
329
+ },
330
+ name: "SelectInput",
331
+ inheritAttrs: !1,
332
+ props: Eo,
333
+ setup(e) {
334
+ let n = null;
335
+ const o = Ne("VCSelectContainerEvent");
336
+ return () => {
337
+ var t;
338
+ const {
339
+ prefixCls: l,
340
+ id: i,
341
+ inputElement: u,
342
+ disabled: a,
343
+ tabindex: f,
344
+ autofocus: s,
345
+ autocomplete: r,
346
+ editable: p,
347
+ activeDescendantId: g,
348
+ value: I,
349
+ onKeydown: b,
350
+ onMousedown: C,
351
+ onChange: S,
352
+ onPaste: x,
353
+ onCompositionstart: R,
354
+ onCompositionend: F,
355
+ onFocus: O,
356
+ onBlur: m,
357
+ open: E,
358
+ inputRef: $,
359
+ attrs: N
360
+ } = e;
361
+ let H = u || w(co, null, null);
362
+ const K = H.props || {}, {
363
+ onKeydown: z,
364
+ onInput: q,
365
+ onFocus: Z,
366
+ onBlur: j,
367
+ onMousedown: T,
368
+ onCompositionstart: L,
369
+ onCompositionend: Q,
370
+ style: k
371
+ } = K;
372
+ return H = Xt(H, y(y(y(y(y({
373
+ type: "search"
374
+ }, K), {
375
+ id: i,
376
+ ref: $,
377
+ disabled: a,
378
+ tabindex: f,
379
+ lazy: !1,
380
+ autocomplete: r || "off",
381
+ autofocus: s,
382
+ class: se(`${l}-selection-search-input`, (t = H == null ? void 0 : H.props) === null || t === void 0 ? void 0 : t.class),
383
+ role: "combobox",
384
+ "aria-expanded": E,
385
+ "aria-haspopup": "listbox",
386
+ "aria-owns": `${i}_list`,
387
+ "aria-autocomplete": "list",
388
+ "aria-controls": `${i}_list`,
389
+ "aria-activedescendant": g
390
+ }), N), {
391
+ value: p ? I : "",
392
+ readonly: !p,
393
+ unselectable: p ? null : "on",
394
+ style: y(y({}, k), {
395
+ opacity: p ? null : 0
396
+ }),
397
+ onKeydown: (v) => {
398
+ b(v), z && z(v);
399
+ },
400
+ onMousedown: (v) => {
401
+ C(v), T && T(v);
402
+ },
403
+ onInput: (v) => {
404
+ S(v), q && q(v);
405
+ },
406
+ onCompositionstart(v) {
407
+ R(v), L && L(v);
408
+ },
409
+ onCompositionend(v) {
410
+ F(v), Q && Q(v);
411
+ },
412
+ onPaste: x,
413
+ onFocus: function() {
414
+ clearTimeout(n), Z && Z(arguments.length <= 0 ? void 0 : arguments[0]), O && O(arguments.length <= 0 ? void 0 : arguments[0]), o == null || o.focus(arguments.length <= 0 ? void 0 : arguments[0]);
415
+ },
416
+ onBlur: function() {
417
+ for (var v = arguments.length, A = new Array(v), P = 0; P < v; P++)
418
+ A[P] = arguments[P];
419
+ n = setTimeout(() => {
420
+ j && j(A[0]), m && m(A[0]), o == null || o.blur(A[0]);
421
+ }, 100);
422
+ }
423
+ }), H.type === "textarea" ? {} : {
424
+ type: "search"
425
+ }), !0, !0), H;
426
+ };
427
+ }
428
+ }), To = `accept acceptcharset accesskey action allowfullscreen allowtransparency
429
+ alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge
430
+ charset checked classid classname colspan cols content contenteditable contextmenu
431
+ controls coords crossorigin data datetime default defer dir disabled download draggable
432
+ enctype form formaction formenctype formmethod formnovalidate formtarget frameborder
433
+ headers height hidden high href hreflang htmlfor for httpequiv icon id inputmode integrity
434
+ is keyparams keytype kind label lang list loop low manifest marginheight marginwidth max maxlength media
435
+ mediagroup method min minlength multiple muted name novalidate nonce open
436
+ optimum pattern placeholder poster preload radiogroup readonly rel required
437
+ reversed role rowspan rows sandbox scope scoped scrolling seamless selected
438
+ shape size sizes span spellcheck src srcdoc srclang srcset start step style
439
+ summary tabindex target title type usemap value width wmode wrap`, Po = `onCopy onCut onPaste onCompositionend onCompositionstart onCompositionupdate onKeydown
440
+ onKeypress onKeyup onFocus onBlur onChange onInput onSubmit onClick onContextmenu onDoubleclick onDblclick
441
+ onDrag onDragend onDragenter onDragexit onDragleave onDragover onDragstart onDrop onMousedown
442
+ onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel
443
+ onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough
444
+ onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata
445
+ onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`, Ht = `${To} ${Po}`.split(/[\s\n]+/), Ro = "aria-", Fo = "data-";
446
+ function Lt(e, n) {
447
+ return e.indexOf(n) === 0;
448
+ }
449
+ function ut(e) {
450
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, o;
451
+ n === !1 ? o = {
452
+ aria: !0,
453
+ data: !0,
454
+ attr: !0
455
+ } : n === !0 ? o = {
456
+ aria: !0
457
+ } : o = y({}, n);
458
+ const t = {};
459
+ return Object.keys(e).forEach((l) => {
460
+ // Aria
461
+ (o.aria && (l === "role" || Lt(l, Ro)) || // Data
462
+ o.data && Lt(l, Fo) || // Attr
463
+ o.attr && (Ht.includes(l) || Ht.includes(l.toLowerCase()))) && (t[l] = e[l]);
464
+ }), t;
465
+ }
466
+ const kt = Symbol("OverflowContextProviderKey"), lt = ce({
467
+ compatConfig: {
468
+ MODE: 3
469
+ },
470
+ name: "OverflowContextProvider",
471
+ inheritAttrs: !1,
472
+ props: {
473
+ value: {
474
+ type: Object
475
+ }
476
+ },
477
+ setup(e, n) {
478
+ let {
479
+ slots: o
480
+ } = n;
481
+ return We(kt, D(() => e.value)), () => {
482
+ var t;
483
+ return (t = o.default) === null || t === void 0 ? void 0 : t.call(o);
484
+ };
485
+ }
486
+ }), Do = () => Ne(kt, D(() => null));
487
+ var No = function(e, n) {
488
+ var o = {};
489
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
490
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
491
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
492
+ return o;
493
+ };
494
+ const xe = void 0, Be = ce({
495
+ compatConfig: {
496
+ MODE: 3
497
+ },
498
+ name: "Item",
499
+ props: {
500
+ prefixCls: String,
501
+ item: _.any,
502
+ renderItem: Function,
503
+ responsive: Boolean,
504
+ itemKey: {
505
+ type: [String, Number]
506
+ },
507
+ registerSize: Function,
508
+ display: Boolean,
509
+ order: Number,
510
+ component: _.any,
511
+ invalidate: Boolean
512
+ },
513
+ setup(e, n) {
514
+ let {
515
+ slots: o,
516
+ expose: t
517
+ } = n;
518
+ const l = D(() => e.responsive && !e.display), i = me();
519
+ t({
520
+ itemNodeRef: i
521
+ });
522
+ function u(a) {
523
+ e.registerSize(e.itemKey, a);
524
+ }
525
+ return Gt(() => {
526
+ u(null);
527
+ }), () => {
528
+ var a;
529
+ const {
530
+ prefixCls: f,
531
+ invalidate: s,
532
+ item: r,
533
+ renderItem: p,
534
+ responsive: g,
535
+ registerSize: I,
536
+ itemKey: b,
537
+ display: C,
538
+ order: S,
539
+ component: x = "div"
540
+ } = e, R = No(e, ["prefixCls", "invalidate", "item", "renderItem", "responsive", "registerSize", "itemKey", "display", "order", "component"]), F = (a = o.default) === null || a === void 0 ? void 0 : a.call(o), O = p && r !== xe ? p(r) : F;
541
+ let m;
542
+ s || (m = {
543
+ opacity: l.value ? 0 : 1,
544
+ height: l.value ? 0 : xe,
545
+ overflowY: l.value ? "hidden" : xe,
546
+ order: g ? S : xe,
547
+ pointerEvents: l.value ? "none" : xe,
548
+ position: l.value ? "absolute" : xe
549
+ });
550
+ const E = {};
551
+ return l.value && (E["aria-hidden"] = !0), w(st, {
552
+ disabled: !g,
553
+ onResize: ($) => {
554
+ let {
555
+ offsetWidth: N
556
+ } = $;
557
+ u(N);
558
+ }
559
+ }, {
560
+ default: () => w(x, U(U(U({
561
+ class: se(!s && f),
562
+ style: m
563
+ }, E), R), {}, {
564
+ ref: i
565
+ }), {
566
+ default: () => [O]
567
+ })
568
+ });
569
+ };
570
+ }
571
+ });
572
+ var Ze = function(e, n) {
573
+ var o = {};
574
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
575
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
576
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
577
+ return o;
578
+ };
579
+ const Vo = ce({
580
+ compatConfig: {
581
+ MODE: 3
582
+ },
583
+ name: "RawItem",
584
+ inheritAttrs: !1,
585
+ props: {
586
+ component: _.any,
587
+ title: _.any,
588
+ id: String,
589
+ onMouseenter: {
590
+ type: Function
591
+ },
592
+ onMouseleave: {
593
+ type: Function
594
+ },
595
+ onClick: {
596
+ type: Function
597
+ },
598
+ onKeydown: {
599
+ type: Function
600
+ },
601
+ onFocus: {
602
+ type: Function
603
+ },
604
+ role: String,
605
+ tabindex: Number
606
+ },
607
+ setup(e, n) {
608
+ let {
609
+ slots: o,
610
+ attrs: t
611
+ } = n;
612
+ const l = Do();
613
+ return () => {
614
+ var i;
615
+ if (!l.value) {
616
+ const {
617
+ component: p = "div"
618
+ } = e, g = Ze(e, ["component"]);
619
+ return w(p, U(U({}, g), t), {
620
+ default: () => [(i = o.default) === null || i === void 0 ? void 0 : i.call(o)]
621
+ });
622
+ }
623
+ const u = l.value, {
624
+ className: a
625
+ } = u, f = Ze(u, ["className"]), {
626
+ class: s
627
+ } = t, r = Ze(t, ["class"]);
628
+ return w(lt, {
629
+ value: null
630
+ }, {
631
+ default: () => [w(Be, U(U(U({
632
+ class: se(a, s)
633
+ }, f), r), e), o)]
634
+ });
635
+ };
636
+ }
637
+ });
638
+ var _o = function(e, n) {
639
+ var o = {};
640
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
641
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
642
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
643
+ return o;
644
+ };
645
+ const en = "responsive", tn = "invalidate";
646
+ function Ho(e) {
647
+ return `+ ${e.length} ...`;
648
+ }
649
+ const Lo = () => ({
650
+ id: String,
651
+ prefixCls: String,
652
+ data: Array,
653
+ itemKey: [String, Number, Function],
654
+ /** Used for `responsive`. It will limit render node to avoid perf issue */
655
+ itemWidth: {
656
+ type: Number,
657
+ default: 10
658
+ },
659
+ renderItem: Function,
660
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
661
+ renderRawItem: Function,
662
+ maxCount: [Number, String],
663
+ renderRest: Function,
664
+ /** @private Do not use in your production. Render raw node that need wrap Item by developer self */
665
+ renderRawRest: Function,
666
+ suffix: _.any,
667
+ component: String,
668
+ itemComponent: _.any,
669
+ /** @private This API may be refactor since not well design */
670
+ onVisibleChange: Function,
671
+ /** When set to `full`, ssr will render full items by default and remove at client side */
672
+ ssr: String,
673
+ onMousedown: Function,
674
+ role: String
675
+ }), je = ce({
676
+ name: "Overflow",
677
+ inheritAttrs: !1,
678
+ props: Lo(),
679
+ emits: ["visibleChange"],
680
+ setup(e, n) {
681
+ let {
682
+ attrs: o,
683
+ emit: t,
684
+ slots: l
685
+ } = n;
686
+ const i = D(() => e.ssr === "full"), u = G(null), a = D(() => u.value || 0), f = G(/* @__PURE__ */ new Map()), s = G(0), r = G(0), p = G(0), g = G(null), I = G(null), b = D(() => I.value === null && i.value ? Number.MAX_SAFE_INTEGER : I.value || 0), C = G(!1), S = D(() => `${e.prefixCls}-item`), x = D(() => Math.max(s.value, r.value)), R = D(() => !!(e.data.length && e.maxCount === en)), F = D(() => e.maxCount === tn), O = D(() => R.value || typeof e.maxCount == "number" && e.data.length > e.maxCount), m = D(() => {
687
+ let T = e.data;
688
+ return R.value ? u.value === null && i.value ? T = e.data : T = e.data.slice(0, Math.min(e.data.length, a.value / e.itemWidth)) : typeof e.maxCount == "number" && (T = e.data.slice(0, e.maxCount)), T;
689
+ }), E = D(() => R.value ? e.data.slice(b.value + 1) : e.data.slice(m.value.length)), $ = (T, L) => {
690
+ var Q;
691
+ return typeof e.itemKey == "function" ? e.itemKey(T) : (Q = e.itemKey && (T == null ? void 0 : T[e.itemKey])) !== null && Q !== void 0 ? Q : L;
692
+ }, N = D(() => e.renderItem || ((T) => T)), H = (T, L) => {
693
+ I.value = T, L || (C.value = T < e.data.length - 1, t("visibleChange", T));
694
+ }, K = (T, L) => {
695
+ u.value = L.clientWidth;
696
+ }, z = (T, L) => {
697
+ const Q = new Map(f.value);
698
+ L === null ? Q.delete(T) : Q.set(T, L), f.value = Q;
699
+ }, q = (T, L) => {
700
+ s.value = r.value, r.value = L;
701
+ }, Z = (T, L) => {
702
+ p.value = L;
703
+ }, j = (T) => f.value.get($(m.value[T], T));
704
+ return le([a, f, r, p, () => e.itemKey, m], () => {
705
+ if (a.value && x.value && m.value) {
706
+ let T = p.value;
707
+ const L = m.value.length, Q = L - 1;
708
+ if (!L) {
709
+ H(0), g.value = null;
710
+ return;
711
+ }
712
+ for (let k = 0; k < L; k += 1) {
713
+ const v = j(k);
714
+ if (v === void 0) {
715
+ H(k - 1, !0);
716
+ break;
717
+ }
718
+ if (T += v, // Only one means `totalWidth` is the final width
719
+ Q === 0 && T <= a.value || // Last two width will be the final width
720
+ k === Q - 1 && T + j(Q) <= a.value) {
721
+ H(Q), g.value = null;
722
+ break;
723
+ } else if (T + x.value > a.value) {
724
+ H(k - 1), g.value = T - v - p.value + r.value;
725
+ break;
726
+ }
727
+ }
728
+ e.suffix && j(0) + p.value > a.value && (g.value = null);
729
+ }
730
+ }), () => {
731
+ const T = C.value && !!E.value.length, {
732
+ itemComponent: L,
733
+ renderRawItem: Q,
734
+ renderRawRest: k,
735
+ renderRest: v,
736
+ prefixCls: A = "rc-overflow",
737
+ suffix: P,
738
+ component: Y = "div",
739
+ id: oe,
740
+ onMousedown: ie
741
+ } = e, {
742
+ class: ae,
743
+ style: ne
744
+ } = o, de = _o(o, ["class", "style"]);
745
+ let fe = {};
746
+ g.value !== null && R.value && (fe = {
747
+ position: "absolute",
748
+ left: `${g.value}px`,
749
+ top: 0
750
+ });
751
+ const h = {
752
+ prefixCls: S.value,
753
+ responsive: R.value,
754
+ component: L,
755
+ invalidate: F.value
756
+ }, c = Q ? (B, X) => {
757
+ const J = $(B, X);
758
+ return w(lt, {
759
+ key: J,
760
+ value: y(y({}, h), {
761
+ order: X,
762
+ item: B,
763
+ itemKey: J,
764
+ registerSize: z,
765
+ display: X <= b.value
766
+ })
767
+ }, {
768
+ default: () => [Q(B, X)]
769
+ });
770
+ } : (B, X) => {
771
+ const J = $(B, X);
772
+ return w(Be, U(U({}, h), {}, {
773
+ order: X,
774
+ key: J,
775
+ item: B,
776
+ renderItem: N.value,
777
+ itemKey: J,
778
+ registerSize: z,
779
+ display: X <= b.value
780
+ }), null);
781
+ };
782
+ let d = () => null;
783
+ const V = {
784
+ order: T ? b.value : Number.MAX_SAFE_INTEGER,
785
+ className: `${S.value} ${S.value}-rest`,
786
+ registerSize: q,
787
+ display: T
788
+ };
789
+ if (k)
790
+ k && (d = () => w(lt, {
791
+ value: y(y({}, h), V)
792
+ }, {
793
+ default: () => [k(E.value)]
794
+ }));
795
+ else {
796
+ const B = v || Ho;
797
+ d = () => w(Be, U(U({}, h), V), {
798
+ default: () => typeof B == "function" ? B(E.value) : B
799
+ });
800
+ }
801
+ const M = () => {
802
+ var B;
803
+ return w(Y, U({
804
+ id: oe,
805
+ class: se(!F.value && A, ae),
806
+ style: ne,
807
+ onMousedown: ie,
808
+ role: e.role
809
+ }, de), {
810
+ default: () => [m.value.map(c), O.value ? d() : null, P && w(Be, U(U({}, h), {}, {
811
+ order: b.value,
812
+ class: `${S.value}-suffix`,
813
+ registerSize: Z,
814
+ display: !0,
815
+ style: fe
816
+ }), {
817
+ default: () => P
818
+ }), (B = l.default) === null || B === void 0 ? void 0 : B.call(l)]
819
+ });
820
+ };
821
+ return w(st, {
822
+ disabled: !R.value,
823
+ onResize: K
824
+ }, {
825
+ default: M
826
+ });
827
+ };
828
+ }
829
+ });
830
+ je.Item = Vo;
831
+ je.RESPONSIVE = en;
832
+ je.INVALIDATE = tn;
833
+ const Ao = Symbol("TreeSelectLegacyContextPropsKey");
834
+ function ct() {
835
+ return Ne(Ao, {});
836
+ }
837
+ const Bo = {
838
+ id: String,
839
+ prefixCls: String,
840
+ values: _.array,
841
+ open: {
842
+ type: Boolean,
843
+ default: void 0
844
+ },
845
+ searchValue: String,
846
+ inputRef: _.any,
847
+ placeholder: _.any,
848
+ disabled: {
849
+ type: Boolean,
850
+ default: void 0
851
+ },
852
+ mode: String,
853
+ showSearch: {
854
+ type: Boolean,
855
+ default: void 0
856
+ },
857
+ autofocus: {
858
+ type: Boolean,
859
+ default: void 0
860
+ },
861
+ autocomplete: String,
862
+ activeDescendantId: String,
863
+ tabindex: _.oneOfType([_.number, _.string]),
864
+ compositionStatus: Boolean,
865
+ removeIcon: _.any,
866
+ choiceTransitionName: String,
867
+ maxTagCount: _.oneOfType([_.number, _.string]),
868
+ maxTagTextLength: Number,
869
+ maxTagPlaceholder: _.any.def(() => (e) => `+ ${e.length} ...`),
870
+ tagRender: Function,
871
+ onToggleOpen: {
872
+ type: Function
873
+ },
874
+ onRemove: Function,
875
+ onInputChange: Function,
876
+ onInputPaste: Function,
877
+ onInputKeyDown: Function,
878
+ onInputMouseDown: Function,
879
+ onInputCompositionStart: Function,
880
+ onInputCompositionEnd: Function
881
+ }, At = (e) => {
882
+ e.preventDefault(), e.stopPropagation();
883
+ }, zo = ce({
884
+ name: "MultipleSelectSelector",
885
+ inheritAttrs: !1,
886
+ props: Bo,
887
+ setup(e) {
888
+ const n = G(), o = G(0), t = G(!1), l = ct(), i = D(() => `${e.prefixCls}-selection`), u = D(() => e.open || e.mode === "tags" ? e.searchValue : ""), a = D(() => e.mode === "tags" || e.showSearch && (e.open || t.value)), f = me("");
889
+ Ce(() => {
890
+ f.value = u.value;
891
+ }), ye(() => {
892
+ le(f, () => {
893
+ o.value = n.value.scrollWidth;
894
+ }, {
895
+ flush: "post",
896
+ immediate: !0
897
+ });
898
+ });
899
+ function s(b, C, S, x, R) {
900
+ return w("span", {
901
+ class: se(`${i.value}-item`, {
902
+ [`${i.value}-item-disabled`]: S
903
+ }),
904
+ title: typeof b == "string" || typeof b == "number" ? b.toString() : void 0
905
+ }, [w("span", {
906
+ class: `${i.value}-item-content`
907
+ }, [C]), x && w(Ie, {
908
+ class: `${i.value}-item-remove`,
909
+ onMousedown: At,
910
+ onClick: R,
911
+ customizeIcon: e.removeIcon
912
+ }, {
913
+ default: () => [ze("×")]
914
+ })]);
915
+ }
916
+ function r(b, C, S, x, R, F) {
917
+ var O;
918
+ const m = ($) => {
919
+ At($), e.onToggleOpen(!open);
920
+ };
921
+ let E = F;
922
+ return l.keyEntities && (E = ((O = l.keyEntities[b]) === null || O === void 0 ? void 0 : O.node) || {}), w("span", {
923
+ key: b,
924
+ onMousedown: m
925
+ }, [e.tagRender({
926
+ label: C,
927
+ value: b,
928
+ disabled: S,
929
+ closable: x,
930
+ onClose: R,
931
+ option: E
932
+ })]);
933
+ }
934
+ function p(b) {
935
+ const {
936
+ disabled: C,
937
+ label: S,
938
+ value: x,
939
+ option: R
940
+ } = b, F = !e.disabled && !C;
941
+ let O = S;
942
+ if (typeof e.maxTagTextLength == "number" && (typeof S == "string" || typeof S == "number")) {
943
+ const E = String(O);
944
+ E.length > e.maxTagTextLength && (O = `${E.slice(0, e.maxTagTextLength)}...`);
945
+ }
946
+ const m = (E) => {
947
+ var $;
948
+ E && E.stopPropagation(), ($ = e.onRemove) === null || $ === void 0 || $.call(e, b);
949
+ };
950
+ return typeof e.tagRender == "function" ? r(x, O, C, F, m, R) : s(S, O, C, F, m);
951
+ }
952
+ function g(b) {
953
+ const {
954
+ maxTagPlaceholder: C = (x) => `+ ${x.length} ...`
955
+ } = e, S = typeof C == "function" ? C(b) : C;
956
+ return s(S, S, !1);
957
+ }
958
+ const I = (b) => {
959
+ const C = b.target.composing;
960
+ f.value = b.target.value, C || e.onInputChange(b);
961
+ };
962
+ return () => {
963
+ const {
964
+ id: b,
965
+ prefixCls: C,
966
+ values: S,
967
+ open: x,
968
+ inputRef: R,
969
+ placeholder: F,
970
+ disabled: O,
971
+ autofocus: m,
972
+ autocomplete: E,
973
+ activeDescendantId: $,
974
+ tabindex: N,
975
+ compositionStatus: H,
976
+ onInputPaste: K,
977
+ onInputKeyDown: z,
978
+ onInputMouseDown: q,
979
+ onInputCompositionStart: Z,
980
+ onInputCompositionEnd: j
981
+ } = e, T = w("div", {
982
+ class: `${i.value}-search`,
983
+ style: {
984
+ width: o.value + "px"
985
+ },
986
+ key: "input"
987
+ }, [w(Jt, {
988
+ inputRef: R,
989
+ open: x,
990
+ prefixCls: C,
991
+ id: b,
992
+ inputElement: null,
993
+ disabled: O,
994
+ autofocus: m,
995
+ autocomplete: E,
996
+ editable: a.value,
997
+ activeDescendantId: $,
998
+ value: f.value,
999
+ onKeydown: z,
1000
+ onMousedown: q,
1001
+ onChange: I,
1002
+ onPaste: K,
1003
+ onCompositionstart: Z,
1004
+ onCompositionend: j,
1005
+ tabindex: N,
1006
+ attrs: ut(e, !0),
1007
+ onFocus: () => t.value = !0,
1008
+ onBlur: () => t.value = !1
1009
+ }, null), w("span", {
1010
+ ref: n,
1011
+ class: `${i.value}-search-mirror`,
1012
+ "aria-hidden": !0
1013
+ }, [f.value, ze(" ")])]), L = w(je, {
1014
+ prefixCls: `${i.value}-overflow`,
1015
+ data: S,
1016
+ renderItem: p,
1017
+ renderRest: g,
1018
+ suffix: T,
1019
+ itemKey: "key",
1020
+ maxCount: e.maxTagCount,
1021
+ key: "overflow"
1022
+ }, null);
1023
+ return w($e, null, [L, !S.length && !u.value && !H && w("span", {
1024
+ class: `${i.value}-placeholder`
1025
+ }, [F])]);
1026
+ };
1027
+ }
1028
+ }), Wo = {
1029
+ inputElement: _.any,
1030
+ id: String,
1031
+ prefixCls: String,
1032
+ values: _.array,
1033
+ open: {
1034
+ type: Boolean,
1035
+ default: void 0
1036
+ },
1037
+ searchValue: String,
1038
+ inputRef: _.any,
1039
+ placeholder: _.any,
1040
+ compositionStatus: {
1041
+ type: Boolean,
1042
+ default: void 0
1043
+ },
1044
+ disabled: {
1045
+ type: Boolean,
1046
+ default: void 0
1047
+ },
1048
+ mode: String,
1049
+ showSearch: {
1050
+ type: Boolean,
1051
+ default: void 0
1052
+ },
1053
+ autofocus: {
1054
+ type: Boolean,
1055
+ default: void 0
1056
+ },
1057
+ autocomplete: String,
1058
+ activeDescendantId: String,
1059
+ tabindex: _.oneOfType([_.number, _.string]),
1060
+ activeValue: String,
1061
+ backfill: {
1062
+ type: Boolean,
1063
+ default: void 0
1064
+ },
1065
+ optionLabelRender: Function,
1066
+ onInputChange: Function,
1067
+ onInputPaste: Function,
1068
+ onInputKeyDown: Function,
1069
+ onInputMouseDown: Function,
1070
+ onInputCompositionStart: Function,
1071
+ onInputCompositionEnd: Function
1072
+ }, dt = ce({
1073
+ name: "SingleSelector",
1074
+ setup(e) {
1075
+ const n = G(!1), o = D(() => e.mode === "combobox"), t = D(() => o.value || e.showSearch), l = D(() => {
1076
+ let r = e.searchValue || "";
1077
+ return o.value && e.activeValue && !n.value && (r = e.activeValue), r;
1078
+ }), i = ct();
1079
+ le([o, () => e.activeValue], () => {
1080
+ o.value && (n.value = !1);
1081
+ }, {
1082
+ immediate: !0
1083
+ });
1084
+ const u = D(() => e.mode !== "combobox" && !e.open && !e.showSearch ? !1 : !!l.value || e.compositionStatus), a = D(() => {
1085
+ const r = e.values[0];
1086
+ return r && (typeof r.label == "string" || typeof r.label == "number") ? r.label.toString() : void 0;
1087
+ }), f = () => {
1088
+ if (e.values[0])
1089
+ return null;
1090
+ const r = u.value ? {
1091
+ visibility: "hidden"
1092
+ } : void 0;
1093
+ return w("span", {
1094
+ class: `${e.prefixCls}-selection-placeholder`,
1095
+ style: r
1096
+ }, [e.placeholder]);
1097
+ }, s = (r) => {
1098
+ r.target.composing || (n.value = !0, e.onInputChange(r));
1099
+ };
1100
+ return () => {
1101
+ var r, p, g, I;
1102
+ const {
1103
+ inputElement: b,
1104
+ prefixCls: C,
1105
+ id: S,
1106
+ values: x,
1107
+ inputRef: R,
1108
+ disabled: F,
1109
+ autofocus: O,
1110
+ autocomplete: m,
1111
+ activeDescendantId: E,
1112
+ open: $,
1113
+ tabindex: N,
1114
+ optionLabelRender: H,
1115
+ onInputKeyDown: K,
1116
+ onInputMouseDown: z,
1117
+ onInputPaste: q,
1118
+ onInputCompositionStart: Z,
1119
+ onInputCompositionEnd: j
1120
+ } = e, T = x[0];
1121
+ let L = null;
1122
+ if (T && i.customSlots) {
1123
+ const Q = (r = T.key) !== null && r !== void 0 ? r : T.value, k = ((p = i.keyEntities[Q]) === null || p === void 0 ? void 0 : p.node) || {};
1124
+ L = i.customSlots[(g = k.slots) === null || g === void 0 ? void 0 : g.title] || i.customSlots.title || T.label, typeof L == "function" && (L = L(k));
1125
+ } else
1126
+ L = H && T ? H(T.option) : T == null ? void 0 : T.label;
1127
+ return w($e, null, [w("span", {
1128
+ class: `${C}-selection-search`
1129
+ }, [w(Jt, {
1130
+ inputRef: R,
1131
+ prefixCls: C,
1132
+ id: S,
1133
+ open: $,
1134
+ inputElement: b,
1135
+ disabled: F,
1136
+ autofocus: O,
1137
+ autocomplete: m,
1138
+ editable: t.value,
1139
+ activeDescendantId: E,
1140
+ value: l.value,
1141
+ onKeydown: K,
1142
+ onMousedown: z,
1143
+ onChange: s,
1144
+ onPaste: q,
1145
+ onCompositionstart: Z,
1146
+ onCompositionend: j,
1147
+ tabindex: N,
1148
+ attrs: ut(e, !0)
1149
+ }, null)]), !o.value && T && !u.value && w("span", {
1150
+ class: `${C}-selection-item`,
1151
+ title: a.value
1152
+ }, [w($e, {
1153
+ key: (I = T.key) !== null && I !== void 0 ? I : T.value
1154
+ }, [L])]), f()]);
1155
+ };
1156
+ }
1157
+ });
1158
+ dt.props = Wo;
1159
+ dt.inheritAttrs = !1;
1160
+ function Ko(e) {
1161
+ return ![
1162
+ // System function button
1163
+ W.ESC,
1164
+ W.SHIFT,
1165
+ W.BACKSPACE,
1166
+ W.TAB,
1167
+ W.WIN_KEY,
1168
+ W.ALT,
1169
+ W.META,
1170
+ W.WIN_KEY_RIGHT,
1171
+ W.CTRL,
1172
+ W.SEMICOLON,
1173
+ W.EQUALS,
1174
+ W.CAPS_LOCK,
1175
+ W.CONTEXT_MENU,
1176
+ // F1-F12
1177
+ W.F1,
1178
+ W.F2,
1179
+ W.F3,
1180
+ W.F4,
1181
+ W.F5,
1182
+ W.F6,
1183
+ W.F7,
1184
+ W.F8,
1185
+ W.F9,
1186
+ W.F10,
1187
+ W.F11,
1188
+ W.F12
1189
+ ].includes(e);
1190
+ }
1191
+ function nn() {
1192
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, n = null, o;
1193
+ Ve(() => {
1194
+ clearTimeout(o);
1195
+ });
1196
+ function t(l) {
1197
+ (l || n === null) && (n = l), clearTimeout(o), o = setTimeout(() => {
1198
+ n = null;
1199
+ }, e);
1200
+ }
1201
+ return [() => n, t];
1202
+ }
1203
+ function De() {
1204
+ const e = (n) => {
1205
+ e.current = n;
1206
+ };
1207
+ return e;
1208
+ }
1209
+ const jo = ce({
1210
+ name: "Selector",
1211
+ inheritAttrs: !1,
1212
+ props: {
1213
+ id: String,
1214
+ prefixCls: String,
1215
+ showSearch: {
1216
+ type: Boolean,
1217
+ default: void 0
1218
+ },
1219
+ open: {
1220
+ type: Boolean,
1221
+ default: void 0
1222
+ },
1223
+ /** Display in the Selector value, it's not same as `value` prop */
1224
+ values: _.array,
1225
+ multiple: {
1226
+ type: Boolean,
1227
+ default: void 0
1228
+ },
1229
+ mode: String,
1230
+ searchValue: String,
1231
+ activeValue: String,
1232
+ inputElement: _.any,
1233
+ autofocus: {
1234
+ type: Boolean,
1235
+ default: void 0
1236
+ },
1237
+ activeDescendantId: String,
1238
+ tabindex: _.oneOfType([_.number, _.string]),
1239
+ disabled: {
1240
+ type: Boolean,
1241
+ default: void 0
1242
+ },
1243
+ placeholder: _.any,
1244
+ removeIcon: _.any,
1245
+ // Tags
1246
+ maxTagCount: _.oneOfType([_.number, _.string]),
1247
+ maxTagTextLength: Number,
1248
+ maxTagPlaceholder: _.any,
1249
+ tagRender: Function,
1250
+ optionLabelRender: Function,
1251
+ /** Check if `tokenSeparators` contains `\n` or `\r\n` */
1252
+ tokenWithEnter: {
1253
+ type: Boolean,
1254
+ default: void 0
1255
+ },
1256
+ // Motion
1257
+ choiceTransitionName: String,
1258
+ onToggleOpen: {
1259
+ type: Function
1260
+ },
1261
+ /** `onSearch` returns go next step boolean to check if need do toggle open */
1262
+ onSearch: Function,
1263
+ onSearchSubmit: Function,
1264
+ onRemove: Function,
1265
+ onInputKeyDown: {
1266
+ type: Function
1267
+ },
1268
+ /**
1269
+ * @private get real dom for trigger align.
1270
+ * This may be removed after React provides replacement of `findDOMNode`
1271
+ */
1272
+ domRef: Function
1273
+ },
1274
+ setup(e, n) {
1275
+ let {
1276
+ expose: o
1277
+ } = n;
1278
+ const t = De(), l = me(!1), [i, u] = nn(0), a = (x) => {
1279
+ const {
1280
+ which: R
1281
+ } = x;
1282
+ (R === W.UP || R === W.DOWN) && x.preventDefault(), e.onInputKeyDown && e.onInputKeyDown(x), R === W.ENTER && e.mode === "tags" && !l.value && !e.open && e.onSearchSubmit(x.target.value), Ko(R) && e.onToggleOpen(!0);
1283
+ }, f = () => {
1284
+ u(!0);
1285
+ };
1286
+ let s = null;
1287
+ const r = (x) => {
1288
+ e.onSearch(x, !0, l.value) !== !1 && e.onToggleOpen(!0);
1289
+ }, p = () => {
1290
+ l.value = !0;
1291
+ }, g = (x) => {
1292
+ l.value = !1, e.mode !== "combobox" && r(x.target.value);
1293
+ }, I = (x) => {
1294
+ let {
1295
+ target: {
1296
+ value: R
1297
+ }
1298
+ } = x;
1299
+ if (e.tokenWithEnter && s && /[\r\n]/.test(s)) {
1300
+ const F = s.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
1301
+ R = R.replace(F, s);
1302
+ }
1303
+ s = null, r(R);
1304
+ }, b = (x) => {
1305
+ const {
1306
+ clipboardData: R
1307
+ } = x;
1308
+ s = R.getData("text");
1309
+ }, C = (x) => {
1310
+ let {
1311
+ target: R
1312
+ } = x;
1313
+ R !== t.current && (document.body.style.msTouchAction !== void 0 ? setTimeout(() => {
1314
+ t.current.focus();
1315
+ }) : t.current.focus());
1316
+ }, S = (x) => {
1317
+ const R = i();
1318
+ x.target !== t.current && !R && x.preventDefault(), (e.mode !== "combobox" && (!e.showSearch || !R) || !e.open) && (e.open && e.onSearch("", !0, !1), e.onToggleOpen());
1319
+ };
1320
+ return o({
1321
+ focus: () => {
1322
+ t.current.focus();
1323
+ },
1324
+ blur: () => {
1325
+ t.current.blur();
1326
+ }
1327
+ }), () => {
1328
+ const {
1329
+ prefixCls: x,
1330
+ domRef: R,
1331
+ mode: F
1332
+ } = e, O = {
1333
+ inputRef: t,
1334
+ onInputKeyDown: a,
1335
+ onInputMouseDown: f,
1336
+ onInputChange: I,
1337
+ onInputPaste: b,
1338
+ compositionStatus: l.value,
1339
+ onInputCompositionStart: p,
1340
+ onInputCompositionEnd: g
1341
+ }, m = F === "multiple" || F === "tags" ? w(zo, U(U({}, e), O), null) : w(dt, U(U({}, e), O), null);
1342
+ return w("div", {
1343
+ ref: R,
1344
+ class: `${x}-selector`,
1345
+ onClick: C,
1346
+ onMousedown: S
1347
+ }, [m]);
1348
+ };
1349
+ }
1350
+ });
1351
+ function Uo(e, n, o) {
1352
+ function t(l) {
1353
+ var i, u, a;
1354
+ let f = l.target;
1355
+ f.shadowRoot && l.composed && (f = l.composedPath()[0] || f);
1356
+ const s = [(i = e[0]) === null || i === void 0 ? void 0 : i.value, (a = (u = e[1]) === null || u === void 0 ? void 0 : u.value) === null || a === void 0 ? void 0 : a.getPopupElement()];
1357
+ n.value && s.every((r) => r && !r.contains(f) && r !== f) && o(!1);
1358
+ }
1359
+ ye(() => {
1360
+ window.addEventListener("mousedown", t);
1361
+ }), Ve(() => {
1362
+ window.removeEventListener("mousedown", t);
1363
+ });
1364
+ }
1365
+ function Yo() {
1366
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10;
1367
+ const n = G(!1);
1368
+ let o;
1369
+ const t = () => {
1370
+ clearTimeout(o);
1371
+ };
1372
+ return ye(() => {
1373
+ t();
1374
+ }), [n, (i, u) => {
1375
+ t(), o = setTimeout(() => {
1376
+ n.value = i, u && u();
1377
+ }, e);
1378
+ }, t];
1379
+ }
1380
+ const on = Symbol("BaseSelectContextKey");
1381
+ function Go(e) {
1382
+ return We(on, e);
1383
+ }
1384
+ function Xo() {
1385
+ return Ne(on, {});
1386
+ }
1387
+ function ln(e) {
1388
+ if (!Vn(e)) return Me(e);
1389
+ const n = new Proxy({}, {
1390
+ get(o, t, l) {
1391
+ return Reflect.get(e.value, t, l);
1392
+ },
1393
+ set(o, t, l) {
1394
+ return e.value[t] = l, !0;
1395
+ },
1396
+ deleteProperty(o, t) {
1397
+ return Reflect.deleteProperty(e.value, t);
1398
+ },
1399
+ has(o, t) {
1400
+ return Reflect.has(e.value, t);
1401
+ },
1402
+ ownKeys() {
1403
+ return Object.keys(e.value);
1404
+ },
1405
+ getOwnPropertyDescriptor() {
1406
+ return {
1407
+ enumerable: !0,
1408
+ configurable: !0
1409
+ };
1410
+ }
1411
+ });
1412
+ return Me(n);
1413
+ }
1414
+ var qo = function(e, n) {
1415
+ var o = {};
1416
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
1417
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
1418
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
1419
+ return o;
1420
+ };
1421
+ const Qo = ["value", "onChange", "removeIcon", "placeholder", "autofocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabindex", "OptionList", "notFoundContent"], Zo = () => ({
1422
+ prefixCls: String,
1423
+ id: String,
1424
+ omitDomProps: Array,
1425
+ // >>> Value
1426
+ displayValues: Array,
1427
+ onDisplayValuesChange: Function,
1428
+ // >>> Active
1429
+ /** Current dropdown list active item string value */
1430
+ activeValue: String,
1431
+ /** Link search input with target element */
1432
+ activeDescendantId: String,
1433
+ onActiveValueChange: Function,
1434
+ // >>> Search
1435
+ searchValue: String,
1436
+ /** Trigger onSearch, return false to prevent trigger open event */
1437
+ onSearch: Function,
1438
+ /** Trigger when search text match the `tokenSeparators`. Will provide split content */
1439
+ onSearchSplit: Function,
1440
+ maxLength: Number,
1441
+ OptionList: _.any,
1442
+ /** Tell if provided `options` is empty */
1443
+ emptyOptions: Boolean
1444
+ }), an = () => ({
1445
+ showSearch: {
1446
+ type: Boolean,
1447
+ default: void 0
1448
+ },
1449
+ tagRender: {
1450
+ type: Function
1451
+ },
1452
+ optionLabelRender: {
1453
+ type: Function
1454
+ },
1455
+ direction: {
1456
+ type: String
1457
+ },
1458
+ // MISC
1459
+ tabindex: Number,
1460
+ autofocus: Boolean,
1461
+ notFoundContent: _.any,
1462
+ placeholder: _.any,
1463
+ onClear: Function,
1464
+ choiceTransitionName: String,
1465
+ // >>> Mode
1466
+ mode: String,
1467
+ // >>> Status
1468
+ disabled: {
1469
+ type: Boolean,
1470
+ default: void 0
1471
+ },
1472
+ loading: {
1473
+ type: Boolean,
1474
+ default: void 0
1475
+ },
1476
+ // >>> Open
1477
+ open: {
1478
+ type: Boolean,
1479
+ default: void 0
1480
+ },
1481
+ defaultOpen: {
1482
+ type: Boolean,
1483
+ default: void 0
1484
+ },
1485
+ onDropdownVisibleChange: {
1486
+ type: Function
1487
+ },
1488
+ // >>> Customize Input
1489
+ /** @private Internal usage. Do not use in your production. */
1490
+ getInputElement: {
1491
+ type: Function
1492
+ },
1493
+ /** @private Internal usage. Do not use in your production. */
1494
+ getRawInputElement: {
1495
+ type: Function
1496
+ },
1497
+ // >>> Selector
1498
+ maxTagTextLength: Number,
1499
+ maxTagCount: {
1500
+ type: [String, Number]
1501
+ },
1502
+ maxTagPlaceholder: _.any,
1503
+ // >>> Search
1504
+ tokenSeparators: {
1505
+ type: Array
1506
+ },
1507
+ // >>> Icons
1508
+ allowClear: {
1509
+ type: Boolean,
1510
+ default: void 0
1511
+ },
1512
+ showArrow: {
1513
+ type: Boolean,
1514
+ default: void 0
1515
+ },
1516
+ inputIcon: _.any,
1517
+ /** Clear all icon */
1518
+ clearIcon: _.any,
1519
+ /** Selector remove icon */
1520
+ removeIcon: _.any,
1521
+ // >>> Dropdown
1522
+ animation: String,
1523
+ transitionName: String,
1524
+ dropdownStyle: {
1525
+ type: Object
1526
+ },
1527
+ dropdownClassName: String,
1528
+ dropdownMatchSelectWidth: {
1529
+ type: [Boolean, Number],
1530
+ default: void 0
1531
+ },
1532
+ dropdownRender: {
1533
+ type: Function
1534
+ },
1535
+ dropdownAlign: Object,
1536
+ placement: {
1537
+ type: String
1538
+ },
1539
+ getPopupContainer: {
1540
+ type: Function
1541
+ },
1542
+ // >>> Focus
1543
+ showAction: {
1544
+ type: Array
1545
+ },
1546
+ onBlur: {
1547
+ type: Function
1548
+ },
1549
+ onFocus: {
1550
+ type: Function
1551
+ },
1552
+ // >>> Rest Events
1553
+ onKeyup: Function,
1554
+ onKeydown: Function,
1555
+ onMousedown: Function,
1556
+ onPopupScroll: Function,
1557
+ onInputKeyDown: Function,
1558
+ onMouseenter: Function,
1559
+ onMouseleave: Function,
1560
+ onClick: Function
1561
+ }), Jo = () => y(y({}, Zo()), an());
1562
+ function ft(e) {
1563
+ return e === "tags" || e === "multiple";
1564
+ }
1565
+ const ko = ce({
1566
+ compatConfig: {
1567
+ MODE: 3
1568
+ },
1569
+ name: "BaseSelect",
1570
+ inheritAttrs: !1,
1571
+ props: at(Jo(), {
1572
+ showAction: [],
1573
+ notFoundContent: "Not Found"
1574
+ }),
1575
+ setup(e, n) {
1576
+ let {
1577
+ attrs: o,
1578
+ expose: t,
1579
+ slots: l
1580
+ } = n;
1581
+ const i = D(() => ft(e.mode)), u = D(() => e.showSearch !== void 0 ? e.showSearch : i.value || e.mode === "combobox"), a = G(!1);
1582
+ ye(() => {
1583
+ a.value = fo();
1584
+ });
1585
+ const f = ct(), s = G(null), r = De(), p = G(null), g = G(null), I = G(null), b = me(!1), [C, S, x] = Yo();
1586
+ t({
1587
+ focus: () => {
1588
+ var c;
1589
+ (c = g.value) === null || c === void 0 || c.focus();
1590
+ },
1591
+ blur: () => {
1592
+ var c;
1593
+ (c = g.value) === null || c === void 0 || c.blur();
1594
+ },
1595
+ scrollTo: (c) => {
1596
+ var d;
1597
+ return (d = I.value) === null || d === void 0 ? void 0 : d.scrollTo(c);
1598
+ }
1599
+ });
1600
+ const O = D(() => {
1601
+ var c;
1602
+ if (e.mode !== "combobox")
1603
+ return e.searchValue;
1604
+ const d = (c = e.displayValues[0]) === null || c === void 0 ? void 0 : c.value;
1605
+ return typeof d == "string" || typeof d == "number" ? String(d) : "";
1606
+ }), m = e.open !== void 0 ? e.open : e.defaultOpen, E = G(m), $ = G(m), N = (c) => {
1607
+ E.value = e.open !== void 0 ? e.open : c, $.value = E.value;
1608
+ };
1609
+ le(() => e.open, () => {
1610
+ N(e.open);
1611
+ });
1612
+ const H = D(() => !e.notFoundContent && e.emptyOptions);
1613
+ Ce(() => {
1614
+ $.value = E.value, (e.disabled || H.value && $.value && e.mode === "combobox") && ($.value = !1);
1615
+ });
1616
+ const K = D(() => H.value ? !1 : $.value), z = (c) => {
1617
+ const d = c !== void 0 ? c : !$.value;
1618
+ $.value !== d && !e.disabled && (N(d), e.onDropdownVisibleChange && e.onDropdownVisibleChange(d), !d && Y.value && (Y.value = !1, S(!1, () => {
1619
+ A.value = !1, b.value = !1;
1620
+ })));
1621
+ }, q = D(() => (e.tokenSeparators || []).some((c) => [`
1622
+ `, `\r
1623
+ `].includes(c))), Z = (c, d, V) => {
1624
+ var M, B;
1625
+ let X = !0, J = c;
1626
+ (M = e.onActiveValueChange) === null || M === void 0 || M.call(e, null);
1627
+ const te = V ? null : xo(c, e.tokenSeparators);
1628
+ return e.mode !== "combobox" && te && (J = "", (B = e.onSearchSplit) === null || B === void 0 || B.call(e, te), z(!1), X = !1), e.onSearch && O.value !== J && e.onSearch(J, {
1629
+ source: d ? "typing" : "effect"
1630
+ }), X;
1631
+ }, j = (c) => {
1632
+ var d;
1633
+ !c || !c.trim() || (d = e.onSearch) === null || d === void 0 || d.call(e, c, {
1634
+ source: "submit"
1635
+ });
1636
+ };
1637
+ le($, () => {
1638
+ !$.value && !i.value && e.mode !== "combobox" && Z("", !1, !1);
1639
+ }, {
1640
+ immediate: !0,
1641
+ flush: "post"
1642
+ }), le(() => e.disabled, () => {
1643
+ E.value && e.disabled && N(!1), e.disabled && !b.value && S(!1);
1644
+ }, {
1645
+ immediate: !0
1646
+ });
1647
+ const [T, L] = nn(), Q = function(c) {
1648
+ var d;
1649
+ const V = T(), {
1650
+ which: M
1651
+ } = c;
1652
+ if (M === W.ENTER && (e.mode !== "combobox" && c.preventDefault(), $.value || z(!0)), L(!!O.value), M === W.BACKSPACE && !V && i.value && !O.value && e.displayValues.length) {
1653
+ const te = [...e.displayValues];
1654
+ let ee = null;
1655
+ for (let re = te.length - 1; re >= 0; re -= 1) {
1656
+ const ue = te[re];
1657
+ if (!ue.disabled) {
1658
+ te.splice(re, 1), ee = ue;
1659
+ break;
1660
+ }
1661
+ }
1662
+ ee && e.onDisplayValuesChange(te, {
1663
+ type: "remove",
1664
+ values: [ee]
1665
+ });
1666
+ }
1667
+ for (var B = arguments.length, X = new Array(B > 1 ? B - 1 : 0), J = 1; J < B; J++)
1668
+ X[J - 1] = arguments[J];
1669
+ $.value && I.value && I.value.onKeydown(c, ...X), (d = e.onKeydown) === null || d === void 0 || d.call(e, c, ...X);
1670
+ }, k = function(c) {
1671
+ for (var d = arguments.length, V = new Array(d > 1 ? d - 1 : 0), M = 1; M < d; M++)
1672
+ V[M - 1] = arguments[M];
1673
+ $.value && I.value && I.value.onKeyup(c, ...V), e.onKeyup && e.onKeyup(c, ...V);
1674
+ }, v = (c) => {
1675
+ const d = e.displayValues.filter((V) => V !== c);
1676
+ e.onDisplayValuesChange(d, {
1677
+ type: "remove",
1678
+ values: [c]
1679
+ });
1680
+ }, A = G(!1), P = function() {
1681
+ S(!0), e.disabled || (e.onFocus && !A.value && e.onFocus(...arguments), e.showAction && e.showAction.includes("focus") && z(!0)), A.value = !0;
1682
+ }, Y = me(!1), oe = function() {
1683
+ if (Y.value || (b.value = !0, S(!1, () => {
1684
+ A.value = !1, b.value = !1, z(!1);
1685
+ }), e.disabled))
1686
+ return;
1687
+ const c = O.value;
1688
+ c && (e.mode === "tags" ? e.onSearch(c, {
1689
+ source: "submit"
1690
+ }) : e.mode === "multiple" && e.onSearch("", {
1691
+ source: "blur"
1692
+ })), e.onBlur && e.onBlur(...arguments);
1693
+ }, ie = () => {
1694
+ Y.value = !0;
1695
+ }, ae = () => {
1696
+ Y.value = !1;
1697
+ };
1698
+ We("VCSelectContainerEvent", {
1699
+ focus: P,
1700
+ blur: oe
1701
+ });
1702
+ const ne = [];
1703
+ ye(() => {
1704
+ ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
1705
+ }), Ve(() => {
1706
+ ne.forEach((c) => clearTimeout(c)), ne.splice(0, ne.length);
1707
+ });
1708
+ const de = function(c) {
1709
+ var d, V;
1710
+ const {
1711
+ target: M
1712
+ } = c, B = (d = p.value) === null || d === void 0 ? void 0 : d.getPopupElement();
1713
+ if (B && B.contains(M)) {
1714
+ const ee = setTimeout(() => {
1715
+ var re;
1716
+ const ue = ne.indexOf(ee);
1717
+ ue !== -1 && ne.splice(ue, 1), x(), !a.value && !B.contains(document.activeElement) && ((re = g.value) === null || re === void 0 || re.focus());
1718
+ });
1719
+ ne.push(ee);
1720
+ }
1721
+ for (var X = arguments.length, J = new Array(X > 1 ? X - 1 : 0), te = 1; te < X; te++)
1722
+ J[te - 1] = arguments[te];
1723
+ (V = e.onMousedown) === null || V === void 0 || V.call(e, c, ...J);
1724
+ }, fe = G(null), h = () => {
1725
+ };
1726
+ return ye(() => {
1727
+ le(K, () => {
1728
+ var c;
1729
+ if (K.value) {
1730
+ const d = Math.ceil((c = s.value) === null || c === void 0 ? void 0 : c.offsetWidth);
1731
+ fe.value !== d && !Number.isNaN(d) && (fe.value = d);
1732
+ }
1733
+ }, {
1734
+ immediate: !0,
1735
+ flush: "post"
1736
+ });
1737
+ }), Uo([s, p], K, z), Go(ln(y(y({}, _n(e)), {
1738
+ open: $,
1739
+ triggerOpen: K,
1740
+ showSearch: u,
1741
+ multiple: i,
1742
+ toggleOpen: z
1743
+ }))), () => {
1744
+ const c = y(y({}, e), o), {
1745
+ prefixCls: d,
1746
+ id: V,
1747
+ open: M,
1748
+ defaultOpen: B,
1749
+ mode: X,
1750
+ // Search related
1751
+ showSearch: J,
1752
+ searchValue: te,
1753
+ onSearch: ee,
1754
+ // Icons
1755
+ allowClear: re,
1756
+ clearIcon: ue,
1757
+ showArrow: _e,
1758
+ inputIcon: He,
1759
+ // Others
1760
+ disabled: Ee,
1761
+ loading: Le,
1762
+ getInputElement: bt,
1763
+ getPopupContainer: fn,
1764
+ placement: pn,
1765
+ // Dropdown
1766
+ animation: mn,
1767
+ transitionName: vn,
1768
+ dropdownStyle: gn,
1769
+ dropdownClassName: hn,
1770
+ dropdownMatchSelectWidth: bn,
1771
+ dropdownRender: yn,
1772
+ dropdownAlign: Sn,
1773
+ showAction: Yl,
1774
+ direction: wn,
1775
+ // Tags
1776
+ tokenSeparators: Gl,
1777
+ tagRender: Cn,
1778
+ optionLabelRender: In,
1779
+ // Events
1780
+ onPopupScroll: Xl,
1781
+ onDropdownVisibleChange: ql,
1782
+ onFocus: Ql,
1783
+ onBlur: Zl,
1784
+ onKeyup: Jl,
1785
+ onKeydown: kl,
1786
+ onMousedown: ei,
1787
+ onClear: Ye,
1788
+ omitDomProps: Ge,
1789
+ getRawInputElement: yt,
1790
+ displayValues: Ae,
1791
+ onDisplayValuesChange: xn,
1792
+ emptyOptions: On,
1793
+ activeDescendantId: $n,
1794
+ activeValue: Mn,
1795
+ OptionList: En
1796
+ } = c, Tn = qo(c, ["prefixCls", "id", "open", "defaultOpen", "mode", "showSearch", "searchValue", "onSearch", "allowClear", "clearIcon", "showArrow", "inputIcon", "disabled", "loading", "getInputElement", "getPopupContainer", "placement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "tagRender", "optionLabelRender", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyup", "onKeydown", "onMousedown", "onClear", "omitDomProps", "getRawInputElement", "displayValues", "onDisplayValuesChange", "emptyOptions", "activeDescendantId", "activeValue", "OptionList"]), St = X === "combobox" && bt && bt() || null, Te = typeof yt == "function" && yt(), Xe = y({}, Tn);
1797
+ let wt;
1798
+ Te && (wt = (we) => {
1799
+ z(we);
1800
+ }), Qo.forEach((we) => {
1801
+ delete Xe[we];
1802
+ }), Ge == null || Ge.forEach((we) => {
1803
+ delete Xe[we];
1804
+ });
1805
+ const Ct = _e !== void 0 ? _e : Le || !i.value && X !== "combobox";
1806
+ let It;
1807
+ Ct && (It = w(Ie, {
1808
+ class: se(`${d}-arrow`, {
1809
+ [`${d}-arrow-loading`]: Le
1810
+ }),
1811
+ customizeIcon: He,
1812
+ customizeIconProps: {
1813
+ loading: Le,
1814
+ searchValue: O.value,
1815
+ open: $.value,
1816
+ focused: C.value,
1817
+ showSearch: u.value
1818
+ }
1819
+ }, null));
1820
+ let xt;
1821
+ const Pn = () => {
1822
+ Ye == null || Ye(), xn([], {
1823
+ type: "clear",
1824
+ values: Ae
1825
+ }), Z("", !1, !1);
1826
+ };
1827
+ !Ee && re && (Ae.length || O.value) && (xt = w(Ie, {
1828
+ class: `${d}-clear`,
1829
+ onMousedown: Pn,
1830
+ customizeIcon: ue
1831
+ }, {
1832
+ default: () => [ze("×")]
1833
+ }));
1834
+ const Rn = w(En, {
1835
+ ref: I
1836
+ }, y(y({}, f.customSlots), {
1837
+ option: l.option
1838
+ })), Fn = se(d, o.class, {
1839
+ [`${d}-focused`]: C.value,
1840
+ [`${d}-multiple`]: i.value,
1841
+ [`${d}-single`]: !i.value,
1842
+ [`${d}-allow-clear`]: re,
1843
+ [`${d}-show-arrow`]: Ct,
1844
+ [`${d}-disabled`]: Ee,
1845
+ [`${d}-loading`]: Le,
1846
+ [`${d}-open`]: $.value,
1847
+ [`${d}-customize-input`]: St,
1848
+ [`${d}-show-search`]: u.value
1849
+ }), Ot = w(Mo, {
1850
+ ref: p,
1851
+ disabled: Ee,
1852
+ prefixCls: d,
1853
+ visible: K.value,
1854
+ popupElement: Rn,
1855
+ containerWidth: fe.value,
1856
+ animation: mn,
1857
+ transitionName: vn,
1858
+ dropdownStyle: gn,
1859
+ dropdownClassName: hn,
1860
+ direction: wn,
1861
+ dropdownMatchSelectWidth: bn,
1862
+ dropdownRender: yn,
1863
+ dropdownAlign: Sn,
1864
+ placement: pn,
1865
+ getPopupContainer: fn,
1866
+ empty: On,
1867
+ getTriggerDOMNode: () => r.current,
1868
+ onPopupVisibleChange: wt,
1869
+ onPopupMouseEnter: h,
1870
+ onPopupFocusin: ie,
1871
+ onPopupFocusout: ae
1872
+ }, {
1873
+ default: () => Te ? Fe(Te) && Xt(Te, {
1874
+ ref: r
1875
+ }, !1, !0) : w(jo, U(U({}, e), {}, {
1876
+ domRef: r,
1877
+ prefixCls: d,
1878
+ inputElement: St,
1879
+ ref: g,
1880
+ id: V,
1881
+ showSearch: u.value,
1882
+ mode: X,
1883
+ activeDescendantId: $n,
1884
+ tagRender: Cn,
1885
+ optionLabelRender: In,
1886
+ values: Ae,
1887
+ open: $.value,
1888
+ onToggleOpen: z,
1889
+ activeValue: Mn,
1890
+ searchValue: O.value,
1891
+ onSearch: Z,
1892
+ onSearchSubmit: j,
1893
+ onRemove: v,
1894
+ tokenWithEnter: q.value
1895
+ }), null)
1896
+ });
1897
+ let qe;
1898
+ return Te ? qe = Ot : qe = w("div", U(U({}, Xe), {}, {
1899
+ class: Fn,
1900
+ ref: s,
1901
+ onMousedown: de,
1902
+ onKeydown: Q,
1903
+ onKeyup: k
1904
+ }), [C.value && !$.value && w("span", {
1905
+ style: {
1906
+ width: 0,
1907
+ height: 0,
1908
+ position: "absolute",
1909
+ overflow: "hidden",
1910
+ opacity: 0
1911
+ },
1912
+ "aria-live": "polite"
1913
+ }, [`${Ae.map((we) => {
1914
+ let {
1915
+ label: $t,
1916
+ value: Dn
1917
+ } = we;
1918
+ return ["number", "string"].includes(typeof $t) ? $t : Dn;
1919
+ }).join(", ")}`]), Ot, It, xt]), qe;
1920
+ };
1921
+ }
1922
+ }), Ue = (e, n) => {
1923
+ let {
1924
+ height: o,
1925
+ offset: t,
1926
+ prefixCls: l,
1927
+ onInnerResize: i
1928
+ } = e, {
1929
+ slots: u
1930
+ } = n;
1931
+ var a;
1932
+ let f = {}, s = {
1933
+ display: "flex",
1934
+ flexDirection: "column"
1935
+ };
1936
+ return t !== void 0 && (f = {
1937
+ height: `${o}px`,
1938
+ position: "relative",
1939
+ overflow: "hidden"
1940
+ }, s = y(y({}, s), {
1941
+ transform: `translateY(${t}px)`,
1942
+ position: "absolute",
1943
+ left: 0,
1944
+ right: 0,
1945
+ top: 0
1946
+ })), w("div", {
1947
+ style: f
1948
+ }, [w(st, {
1949
+ onResize: (r) => {
1950
+ let {
1951
+ offsetHeight: p
1952
+ } = r;
1953
+ p && i && i();
1954
+ }
1955
+ }, {
1956
+ default: () => [w("div", {
1957
+ style: s,
1958
+ class: se({
1959
+ [`${l}-holder-inner`]: l
1960
+ })
1961
+ }, [(a = u.default) === null || a === void 0 ? void 0 : a.call(u)])]
1962
+ })]);
1963
+ };
1964
+ Ue.displayName = "Filter";
1965
+ Ue.inheritAttrs = !1;
1966
+ Ue.props = {
1967
+ prefixCls: String,
1968
+ /** Virtual filler height. Should be `count * itemMinHeight` */
1969
+ height: Number,
1970
+ /** Set offset of visible items. Should be the top of start item position */
1971
+ offset: Number,
1972
+ onInnerResize: Function
1973
+ };
1974
+ const rn = (e, n) => {
1975
+ let {
1976
+ setRef: o
1977
+ } = e, {
1978
+ slots: t
1979
+ } = n;
1980
+ var l;
1981
+ const i = qt((l = t.default) === null || l === void 0 ? void 0 : l.call(t));
1982
+ return i && i.length ? Yt(i[0], {
1983
+ ref: o
1984
+ }) : i;
1985
+ };
1986
+ rn.props = {
1987
+ setRef: {
1988
+ type: Function,
1989
+ default: () => {
1990
+ }
1991
+ }
1992
+ };
1993
+ const el = 20;
1994
+ function Bt(e) {
1995
+ return "touches" in e ? e.touches[0].pageY : e.pageY;
1996
+ }
1997
+ const tl = ce({
1998
+ compatConfig: {
1999
+ MODE: 3
2000
+ },
2001
+ name: "ScrollBar",
2002
+ inheritAttrs: !1,
2003
+ props: {
2004
+ prefixCls: String,
2005
+ scrollTop: Number,
2006
+ scrollHeight: Number,
2007
+ height: Number,
2008
+ count: Number,
2009
+ onScroll: {
2010
+ type: Function
2011
+ },
2012
+ onStartMove: {
2013
+ type: Function
2014
+ },
2015
+ onStopMove: {
2016
+ type: Function
2017
+ }
2018
+ },
2019
+ setup() {
2020
+ return {
2021
+ moveRaf: null,
2022
+ scrollbarRef: De(),
2023
+ thumbRef: De(),
2024
+ visibleTimeout: null,
2025
+ state: Me({
2026
+ dragging: !1,
2027
+ pageY: null,
2028
+ startTop: null,
2029
+ visible: !1
2030
+ })
2031
+ };
2032
+ },
2033
+ watch: {
2034
+ scrollTop: {
2035
+ handler() {
2036
+ this.delayHidden();
2037
+ },
2038
+ flush: "post"
2039
+ }
2040
+ },
2041
+ mounted() {
2042
+ var e, n;
2043
+ (e = this.scrollbarRef.current) === null || e === void 0 || e.addEventListener("touchstart", this.onScrollbarTouchStart, be ? {
2044
+ passive: !1
2045
+ } : !1), (n = this.thumbRef.current) === null || n === void 0 || n.addEventListener("touchstart", this.onMouseDown, be ? {
2046
+ passive: !1
2047
+ } : !1);
2048
+ },
2049
+ beforeUnmount() {
2050
+ this.removeEvents(), clearTimeout(this.visibleTimeout);
2051
+ },
2052
+ methods: {
2053
+ delayHidden() {
2054
+ clearTimeout(this.visibleTimeout), this.state.visible = !0, this.visibleTimeout = setTimeout(() => {
2055
+ this.state.visible = !1;
2056
+ }, 2e3);
2057
+ },
2058
+ onScrollbarTouchStart(e) {
2059
+ e.preventDefault();
2060
+ },
2061
+ onContainerMouseDown(e) {
2062
+ e.stopPropagation(), e.preventDefault();
2063
+ },
2064
+ // ======================= Clean =======================
2065
+ patchEvents() {
2066
+ window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onMouseUp), this.thumbRef.current.addEventListener("touchmove", this.onMouseMove, be ? {
2067
+ passive: !1
2068
+ } : !1), this.thumbRef.current.addEventListener("touchend", this.onMouseUp);
2069
+ },
2070
+ removeEvents() {
2071
+ window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onMouseUp), this.scrollbarRef.current.removeEventListener("touchstart", this.onScrollbarTouchStart, be ? {
2072
+ passive: !1
2073
+ } : !1), this.thumbRef.current && (this.thumbRef.current.removeEventListener("touchstart", this.onMouseDown, be ? {
2074
+ passive: !1
2075
+ } : !1), this.thumbRef.current.removeEventListener("touchmove", this.onMouseMove, be ? {
2076
+ passive: !1
2077
+ } : !1), this.thumbRef.current.removeEventListener("touchend", this.onMouseUp)), ge.cancel(this.moveRaf);
2078
+ },
2079
+ // ======================= Thumb =======================
2080
+ onMouseDown(e) {
2081
+ const {
2082
+ onStartMove: n
2083
+ } = this.$props;
2084
+ y(this.state, {
2085
+ dragging: !0,
2086
+ pageY: Bt(e),
2087
+ startTop: this.getTop()
2088
+ }), n(), this.patchEvents(), e.stopPropagation(), e.preventDefault();
2089
+ },
2090
+ onMouseMove(e) {
2091
+ const {
2092
+ dragging: n,
2093
+ pageY: o,
2094
+ startTop: t
2095
+ } = this.state, {
2096
+ onScroll: l
2097
+ } = this.$props;
2098
+ if (ge.cancel(this.moveRaf), n) {
2099
+ const i = Bt(e) - o, u = t + i, a = this.getEnableScrollRange(), f = this.getEnableHeightRange(), s = f ? u / f : 0, r = Math.ceil(s * a);
2100
+ this.moveRaf = ge(() => {
2101
+ l(r);
2102
+ });
2103
+ }
2104
+ },
2105
+ onMouseUp() {
2106
+ const {
2107
+ onStopMove: e
2108
+ } = this.$props;
2109
+ this.state.dragging = !1, e(), this.removeEvents();
2110
+ },
2111
+ // ===================== Calculate =====================
2112
+ getSpinHeight() {
2113
+ const {
2114
+ height: e,
2115
+ scrollHeight: n
2116
+ } = this.$props;
2117
+ let o = e / n * 100;
2118
+ return o = Math.max(o, el), o = Math.min(o, e / 2), Math.floor(o);
2119
+ },
2120
+ getEnableScrollRange() {
2121
+ const {
2122
+ scrollHeight: e,
2123
+ height: n
2124
+ } = this.$props;
2125
+ return e - n || 0;
2126
+ },
2127
+ getEnableHeightRange() {
2128
+ const {
2129
+ height: e
2130
+ } = this.$props, n = this.getSpinHeight();
2131
+ return e - n || 0;
2132
+ },
2133
+ getTop() {
2134
+ const {
2135
+ scrollTop: e
2136
+ } = this.$props, n = this.getEnableScrollRange(), o = this.getEnableHeightRange();
2137
+ return e === 0 || n === 0 ? 0 : e / n * o;
2138
+ },
2139
+ // Not show scrollbar when height is large than scrollHeight
2140
+ showScroll() {
2141
+ const {
2142
+ height: e,
2143
+ scrollHeight: n
2144
+ } = this.$props;
2145
+ return n > e;
2146
+ }
2147
+ },
2148
+ render() {
2149
+ const {
2150
+ dragging: e,
2151
+ visible: n
2152
+ } = this.state, {
2153
+ prefixCls: o
2154
+ } = this.$props, t = this.getSpinHeight() + "px", l = this.getTop() + "px", i = this.showScroll(), u = i && n;
2155
+ return w("div", {
2156
+ ref: this.scrollbarRef,
2157
+ class: se(`${o}-scrollbar`, {
2158
+ [`${o}-scrollbar-show`]: i
2159
+ }),
2160
+ style: {
2161
+ width: "8px",
2162
+ top: 0,
2163
+ bottom: 0,
2164
+ right: 0,
2165
+ position: "absolute",
2166
+ display: u ? void 0 : "none"
2167
+ },
2168
+ onMousedown: this.onContainerMouseDown,
2169
+ onMousemove: this.delayHidden
2170
+ }, [w("div", {
2171
+ ref: this.thumbRef,
2172
+ class: se(`${o}-scrollbar-thumb`, {
2173
+ [`${o}-scrollbar-thumb-moving`]: e
2174
+ }),
2175
+ style: {
2176
+ width: "100%",
2177
+ height: t,
2178
+ top: l,
2179
+ left: 0,
2180
+ position: "absolute",
2181
+ background: "rgba(0, 0, 0, 0.5)",
2182
+ borderRadius: "99px",
2183
+ cursor: "pointer",
2184
+ userSelect: "none"
2185
+ },
2186
+ onMousedown: this.onMouseDown
2187
+ }, null)]);
2188
+ }
2189
+ });
2190
+ function nl(e, n, o, t) {
2191
+ const l = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), u = me(Symbol("update"));
2192
+ le(e, () => {
2193
+ u.value = Symbol("update");
2194
+ });
2195
+ let a;
2196
+ function f() {
2197
+ ge.cancel(a);
2198
+ }
2199
+ function s() {
2200
+ f(), a = ge(() => {
2201
+ l.forEach((p, g) => {
2202
+ if (p && p.offsetParent) {
2203
+ const {
2204
+ offsetHeight: I
2205
+ } = p;
2206
+ i.get(g) !== I && (u.value = Symbol("update"), i.set(g, p.offsetHeight));
2207
+ }
2208
+ });
2209
+ });
2210
+ }
2211
+ function r(p, g) {
2212
+ const I = n(p);
2213
+ l.get(I), g ? (l.set(I, g.$el || g), s()) : l.delete(I);
2214
+ }
2215
+ return Gt(() => {
2216
+ f();
2217
+ }), [r, s, i, u];
2218
+ }
2219
+ function ol(e, n, o, t, l, i, u, a) {
2220
+ let f;
2221
+ return (s) => {
2222
+ if (s == null) {
2223
+ a();
2224
+ return;
2225
+ }
2226
+ ge.cancel(f);
2227
+ const r = n.value, p = t.itemHeight;
2228
+ if (typeof s == "number")
2229
+ u(s);
2230
+ else if (s && typeof s == "object") {
2231
+ let g;
2232
+ const {
2233
+ align: I
2234
+ } = s;
2235
+ "index" in s ? {
2236
+ index: g
2237
+ } = s : g = r.findIndex((S) => l(S) === s.key);
2238
+ const {
2239
+ offset: b = 0
2240
+ } = s, C = (S, x) => {
2241
+ if (S < 0 || !e.value) return;
2242
+ const R = e.value.clientHeight;
2243
+ let F = !1, O = x;
2244
+ if (R) {
2245
+ const m = x || I;
2246
+ let E = 0, $ = 0, N = 0;
2247
+ const H = Math.min(r.length, g);
2248
+ for (let q = 0; q <= H; q += 1) {
2249
+ const Z = l(r[q]);
2250
+ $ = E;
2251
+ const j = o.get(Z);
2252
+ N = $ + (j === void 0 ? p : j), E = N, q === g && j === void 0 && (F = !0);
2253
+ }
2254
+ const K = e.value.scrollTop;
2255
+ let z = null;
2256
+ switch (m) {
2257
+ case "top":
2258
+ z = $ - b;
2259
+ break;
2260
+ case "bottom":
2261
+ z = N - R + b;
2262
+ break;
2263
+ default: {
2264
+ const q = K + R;
2265
+ $ < K ? O = "top" : N > q && (O = "bottom");
2266
+ }
2267
+ }
2268
+ z !== null && z !== K && u(z);
2269
+ }
2270
+ f = ge(() => {
2271
+ F && i(), C(S - 1, O);
2272
+ }, 2);
2273
+ };
2274
+ C(5);
2275
+ }
2276
+ };
2277
+ }
2278
+ const ll = typeof navigator == "object" && /Firefox/i.test(navigator.userAgent), sn = (e, n) => {
2279
+ let o = !1, t = null;
2280
+ function l() {
2281
+ clearTimeout(t), o = !0, t = setTimeout(() => {
2282
+ o = !1;
2283
+ }, 50);
2284
+ }
2285
+ return function(i) {
2286
+ let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2287
+ const a = (
2288
+ // Pass origin wheel when on the top
2289
+ i < 0 && e.value || // Pass origin wheel when on the bottom
2290
+ i > 0 && n.value
2291
+ );
2292
+ return u && a ? (clearTimeout(t), o = !1) : (!a || o) && l(), !o && a;
2293
+ };
2294
+ };
2295
+ function il(e, n, o, t) {
2296
+ let l = 0, i = null, u = null, a = !1;
2297
+ const f = sn(n, o);
2298
+ function s(p) {
2299
+ if (!e.value) return;
2300
+ ge.cancel(i);
2301
+ const {
2302
+ deltaY: g
2303
+ } = p;
2304
+ l += g, u = g, !f(g) && (ll || p.preventDefault(), i = ge(() => {
2305
+ t(l * (a ? 10 : 1)), l = 0;
2306
+ }));
2307
+ }
2308
+ function r(p) {
2309
+ e.value && (a = p.detail === u);
2310
+ }
2311
+ return [s, r];
2312
+ }
2313
+ const al = 14 / 15;
2314
+ function rl(e, n, o) {
2315
+ let t = !1, l = 0, i = null, u = null;
2316
+ const a = () => {
2317
+ i && (i.removeEventListener("touchmove", f), i.removeEventListener("touchend", s));
2318
+ }, f = (g) => {
2319
+ if (t) {
2320
+ const I = Math.ceil(g.touches[0].pageY);
2321
+ let b = l - I;
2322
+ l = I, o(b) && g.preventDefault(), clearInterval(u), u = setInterval(() => {
2323
+ b *= al, (!o(b, !0) || Math.abs(b) <= 0.1) && clearInterval(u);
2324
+ }, 16);
2325
+ }
2326
+ }, s = () => {
2327
+ t = !1, a();
2328
+ }, r = (g) => {
2329
+ a(), g.touches.length === 1 && !t && (t = !0, l = Math.ceil(g.touches[0].pageY), i = g.target, i.addEventListener("touchmove", f, {
2330
+ passive: !1
2331
+ }), i.addEventListener("touchend", s));
2332
+ }, p = () => {
2333
+ };
2334
+ ye(() => {
2335
+ document.addEventListener("touchmove", p, {
2336
+ passive: !1
2337
+ }), le(e, (g) => {
2338
+ n.value.removeEventListener("touchstart", r), a(), clearInterval(u), g && n.value.addEventListener("touchstart", r, {
2339
+ passive: !1
2340
+ });
2341
+ }, {
2342
+ immediate: !0
2343
+ });
2344
+ }), Ve(() => {
2345
+ document.removeEventListener("touchmove", p);
2346
+ });
2347
+ }
2348
+ var sl = function(e, n) {
2349
+ var o = {};
2350
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2351
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2352
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2353
+ return o;
2354
+ };
2355
+ const ul = [], cl = {
2356
+ overflowY: "auto",
2357
+ overflowAnchor: "none"
2358
+ };
2359
+ function dl(e, n, o, t, l, i) {
2360
+ let {
2361
+ getKey: u
2362
+ } = i;
2363
+ return e.slice(n, o + 1).map((a, f) => {
2364
+ const s = n + f, r = l(a, s, {
2365
+ // style: status === 'MEASURE_START' ? { visibility: 'hidden' } : {},
2366
+ }), p = u(a);
2367
+ return w(rn, {
2368
+ key: p,
2369
+ setRef: (g) => t(a, g)
2370
+ }, {
2371
+ default: () => [r]
2372
+ });
2373
+ });
2374
+ }
2375
+ const fl = ce({
2376
+ compatConfig: {
2377
+ MODE: 3
2378
+ },
2379
+ name: "List",
2380
+ inheritAttrs: !1,
2381
+ props: {
2382
+ prefixCls: String,
2383
+ data: _.array,
2384
+ height: Number,
2385
+ itemHeight: Number,
2386
+ /** If not match virtual scroll condition, Set List still use height of container. */
2387
+ fullHeight: {
2388
+ type: Boolean,
2389
+ default: void 0
2390
+ },
2391
+ itemKey: {
2392
+ type: [String, Number, Function],
2393
+ required: !0
2394
+ },
2395
+ component: {
2396
+ type: [String, Object]
2397
+ },
2398
+ /** Set `false` will always use real scroll instead of virtual one */
2399
+ virtual: {
2400
+ type: Boolean,
2401
+ default: void 0
2402
+ },
2403
+ children: Function,
2404
+ onScroll: Function,
2405
+ onMousedown: Function,
2406
+ onMouseenter: Function,
2407
+ onVisibleChange: Function
2408
+ },
2409
+ setup(e, n) {
2410
+ let {
2411
+ expose: o
2412
+ } = n;
2413
+ const t = D(() => {
2414
+ const {
2415
+ height: v,
2416
+ itemHeight: A,
2417
+ virtual: P
2418
+ } = e;
2419
+ return !!(P !== !1 && v && A);
2420
+ }), l = D(() => {
2421
+ const {
2422
+ height: v,
2423
+ itemHeight: A,
2424
+ data: P
2425
+ } = e;
2426
+ return t.value && P && A * P.length > v;
2427
+ }), i = Me({
2428
+ scrollTop: 0,
2429
+ scrollMoving: !1
2430
+ }), u = D(() => e.data || ul), a = G([]);
2431
+ le(u, () => {
2432
+ a.value = it(u.value).slice();
2433
+ }, {
2434
+ immediate: !0
2435
+ });
2436
+ const f = G((v) => {
2437
+ });
2438
+ le(() => e.itemKey, (v) => {
2439
+ typeof v == "function" ? f.value = v : f.value = (A) => A == null ? void 0 : A[v];
2440
+ }, {
2441
+ immediate: !0
2442
+ });
2443
+ const s = G(), r = G(), p = G(), g = (v) => f.value(v), I = {
2444
+ getKey: g
2445
+ };
2446
+ function b(v) {
2447
+ let A;
2448
+ typeof v == "function" ? A = v(i.scrollTop) : A = v;
2449
+ const P = E(A);
2450
+ s.value && (s.value.scrollTop = P), i.scrollTop = P;
2451
+ }
2452
+ const [C, S, x, R] = nl(a, g), F = Me({
2453
+ scrollHeight: void 0,
2454
+ start: 0,
2455
+ end: 0,
2456
+ offset: void 0
2457
+ }), O = G(0);
2458
+ ye(() => {
2459
+ Re(() => {
2460
+ var v;
2461
+ O.value = ((v = r.value) === null || v === void 0 ? void 0 : v.offsetHeight) || 0;
2462
+ });
2463
+ }), Hn(() => {
2464
+ Re(() => {
2465
+ var v;
2466
+ O.value = ((v = r.value) === null || v === void 0 ? void 0 : v.offsetHeight) || 0;
2467
+ });
2468
+ }), le([t, a], () => {
2469
+ t.value || y(F, {
2470
+ scrollHeight: void 0,
2471
+ start: 0,
2472
+ end: a.value.length - 1,
2473
+ offset: void 0
2474
+ });
2475
+ }, {
2476
+ immediate: !0
2477
+ }), le([t, a, O, l], () => {
2478
+ t.value && !l.value && y(F, {
2479
+ scrollHeight: O.value,
2480
+ start: 0,
2481
+ end: a.value.length - 1,
2482
+ offset: void 0
2483
+ }), s.value && (i.scrollTop = s.value.scrollTop);
2484
+ }, {
2485
+ immediate: !0
2486
+ }), le([l, t, () => i.scrollTop, a, R, () => e.height, O], () => {
2487
+ if (!t.value || !l.value)
2488
+ return;
2489
+ let v = 0, A, P, Y;
2490
+ const oe = a.value.length, ie = a.value, ae = i.scrollTop, {
2491
+ itemHeight: ne,
2492
+ height: de
2493
+ } = e, fe = ae + de;
2494
+ for (let h = 0; h < oe; h += 1) {
2495
+ const c = ie[h], d = g(c);
2496
+ let V = x.get(d);
2497
+ V === void 0 && (V = ne);
2498
+ const M = v + V;
2499
+ A === void 0 && M >= ae && (A = h, P = v), Y === void 0 && M > fe && (Y = h), v = M;
2500
+ }
2501
+ A === void 0 && (A = 0, P = 0, Y = Math.ceil(de / ne)), Y === void 0 && (Y = oe - 1), Y = Math.min(Y + 1, oe), y(F, {
2502
+ scrollHeight: v,
2503
+ start: A,
2504
+ end: Y,
2505
+ offset: P
2506
+ });
2507
+ }, {
2508
+ immediate: !0
2509
+ });
2510
+ const m = D(() => F.scrollHeight - e.height);
2511
+ function E(v) {
2512
+ let A = v;
2513
+ return Number.isNaN(m.value) || (A = Math.min(A, m.value)), A = Math.max(A, 0), A;
2514
+ }
2515
+ const $ = D(() => i.scrollTop <= 0), N = D(() => i.scrollTop >= m.value), H = sn($, N);
2516
+ function K(v) {
2517
+ b(v);
2518
+ }
2519
+ function z(v) {
2520
+ var A;
2521
+ const {
2522
+ scrollTop: P
2523
+ } = v.currentTarget;
2524
+ P !== i.scrollTop && b(P), (A = e.onScroll) === null || A === void 0 || A.call(e, v);
2525
+ }
2526
+ const [q, Z] = il(t, $, N, (v) => {
2527
+ b((A) => A + v);
2528
+ });
2529
+ rl(t, s, (v, A) => H(v, A) ? !1 : (q({
2530
+ preventDefault() {
2531
+ },
2532
+ deltaY: v
2533
+ }), !0));
2534
+ function j(v) {
2535
+ t.value && v.preventDefault();
2536
+ }
2537
+ const T = () => {
2538
+ s.value && (s.value.removeEventListener("wheel", q, be ? {
2539
+ passive: !1
2540
+ } : !1), s.value.removeEventListener("DOMMouseScroll", Z), s.value.removeEventListener("MozMousePixelScroll", j));
2541
+ };
2542
+ Ce(() => {
2543
+ Re(() => {
2544
+ s.value && (T(), s.value.addEventListener("wheel", q, be ? {
2545
+ passive: !1
2546
+ } : !1), s.value.addEventListener("DOMMouseScroll", Z), s.value.addEventListener("MozMousePixelScroll", j));
2547
+ });
2548
+ }), Ve(() => {
2549
+ T();
2550
+ });
2551
+ const L = ol(s, a, x, e, g, S, b, () => {
2552
+ var v;
2553
+ (v = p.value) === null || v === void 0 || v.delayHidden();
2554
+ });
2555
+ o({
2556
+ scrollTo: L
2557
+ });
2558
+ const Q = D(() => {
2559
+ let v = null;
2560
+ return e.height && (v = y({
2561
+ [e.fullHeight ? "height" : "maxHeight"]: e.height + "px"
2562
+ }, cl), t.value && (v.overflowY = "hidden", i.scrollMoving && (v.pointerEvents = "none"))), v;
2563
+ });
2564
+ return le([() => F.start, () => F.end, a], () => {
2565
+ if (e.onVisibleChange) {
2566
+ const v = a.value.slice(F.start, F.end + 1);
2567
+ e.onVisibleChange(v, a.value);
2568
+ }
2569
+ }, {
2570
+ flush: "post"
2571
+ }), {
2572
+ state: i,
2573
+ mergedData: a,
2574
+ componentStyle: Q,
2575
+ onFallbackScroll: z,
2576
+ onScrollBar: K,
2577
+ componentRef: s,
2578
+ useVirtual: t,
2579
+ calRes: F,
2580
+ collectHeight: S,
2581
+ setInstance: C,
2582
+ sharedConfig: I,
2583
+ scrollBarRef: p,
2584
+ fillerInnerRef: r,
2585
+ delayHideScrollBar: () => {
2586
+ var v;
2587
+ (v = p.value) === null || v === void 0 || v.delayHidden();
2588
+ }
2589
+ };
2590
+ },
2591
+ render() {
2592
+ const e = y(y({}, this.$props), this.$attrs), {
2593
+ prefixCls: n = "rc-virtual-list",
2594
+ height: o,
2595
+ itemHeight: t,
2596
+ // eslint-disable-next-line no-unused-vars
2597
+ fullHeight: l,
2598
+ data: i,
2599
+ itemKey: u,
2600
+ virtual: a,
2601
+ component: f = "div",
2602
+ onScroll: s,
2603
+ children: r = this.$slots.default,
2604
+ style: p,
2605
+ class: g
2606
+ } = e, I = sl(e, ["prefixCls", "height", "itemHeight", "fullHeight", "data", "itemKey", "virtual", "component", "onScroll", "children", "style", "class"]), b = se(n, g), {
2607
+ scrollTop: C
2608
+ } = this.state, {
2609
+ scrollHeight: S,
2610
+ offset: x,
2611
+ start: R,
2612
+ end: F
2613
+ } = this.calRes, {
2614
+ componentStyle: O,
2615
+ onFallbackScroll: m,
2616
+ onScrollBar: E,
2617
+ useVirtual: $,
2618
+ collectHeight: N,
2619
+ sharedConfig: H,
2620
+ setInstance: K,
2621
+ mergedData: z,
2622
+ delayHideScrollBar: q
2623
+ } = this;
2624
+ return w("div", U({
2625
+ style: y(y({}, p), {
2626
+ position: "relative"
2627
+ }),
2628
+ class: b
2629
+ }, I), [w(f, {
2630
+ class: `${n}-holder`,
2631
+ style: O,
2632
+ ref: "componentRef",
2633
+ onScroll: m,
2634
+ onMouseenter: q
2635
+ }, {
2636
+ default: () => [w(Ue, {
2637
+ prefixCls: n,
2638
+ height: S,
2639
+ offset: x,
2640
+ onInnerResize: N,
2641
+ ref: "fillerInnerRef"
2642
+ }, {
2643
+ default: () => dl(z, R, F, K, r, H)
2644
+ })]
2645
+ }), $ && w(tl, {
2646
+ ref: "scrollBarRef",
2647
+ prefixCls: n,
2648
+ scrollTop: C,
2649
+ height: o,
2650
+ scrollHeight: S,
2651
+ count: z.length,
2652
+ onScroll: E,
2653
+ onStartMove: () => {
2654
+ this.state.scrollMoving = !0;
2655
+ },
2656
+ onStopMove: () => {
2657
+ this.state.scrollMoving = !1;
2658
+ }
2659
+ }, null)]);
2660
+ }
2661
+ });
2662
+ function pl() {
2663
+ return /(mac\sos|macintosh)/i.test(navigator.appVersion);
2664
+ }
2665
+ const un = Symbol("SelectContextKey");
2666
+ function ml(e) {
2667
+ return We(un, e);
2668
+ }
2669
+ function vl() {
2670
+ return Ne(un, {});
2671
+ }
2672
+ var gl = function(e, n) {
2673
+ var o = {};
2674
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2675
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2676
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2677
+ return o;
2678
+ };
2679
+ function zt(e) {
2680
+ return typeof e == "string" || typeof e == "number";
2681
+ }
2682
+ const hl = ce({
2683
+ compatConfig: {
2684
+ MODE: 3
2685
+ },
2686
+ name: "OptionList",
2687
+ inheritAttrs: !1,
2688
+ setup(e, n) {
2689
+ let {
2690
+ expose: o,
2691
+ slots: t
2692
+ } = n;
2693
+ const l = Xo(), i = vl(), u = D(() => `${l.prefixCls}-item`), a = vo(() => i.flattenOptions, [() => l.open, () => i.flattenOptions], (m) => m[0]), f = De(), s = (m) => {
2694
+ m.preventDefault();
2695
+ }, r = (m) => {
2696
+ f.current && f.current.scrollTo(typeof m == "number" ? {
2697
+ index: m
2698
+ } : m);
2699
+ }, p = function(m) {
2700
+ let E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
2701
+ const $ = a.value.length;
2702
+ for (let N = 0; N < $; N += 1) {
2703
+ const H = (m + N * E + $) % $, {
2704
+ group: K,
2705
+ data: z
2706
+ } = a.value[H];
2707
+ if (!K && !z.disabled)
2708
+ return H;
2709
+ }
2710
+ return -1;
2711
+ }, g = Me({
2712
+ activeIndex: p(0)
2713
+ }), I = function(m) {
2714
+ let E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2715
+ g.activeIndex = m;
2716
+ const $ = {
2717
+ source: E ? "keyboard" : "mouse"
2718
+ }, N = a.value[m];
2719
+ if (!N) {
2720
+ i.onActiveValue(null, -1, $);
2721
+ return;
2722
+ }
2723
+ i.onActiveValue(N.value, m, $);
2724
+ };
2725
+ le([() => a.value.length, () => l.searchValue], () => {
2726
+ I(i.defaultActiveFirstOption !== !1 ? p(0) : -1);
2727
+ }, {
2728
+ immediate: !0
2729
+ });
2730
+ const b = (m) => i.rawValues.has(m) && l.mode !== "combobox";
2731
+ le([() => l.open, () => l.searchValue], () => {
2732
+ if (!l.multiple && l.open && i.rawValues.size === 1) {
2733
+ const m = Array.from(i.rawValues)[0], E = it(a.value).findIndex(($) => {
2734
+ let {
2735
+ data: N
2736
+ } = $;
2737
+ return N[i.fieldNames.value] === m;
2738
+ });
2739
+ E !== -1 && (I(E), Re(() => {
2740
+ r(E);
2741
+ }));
2742
+ }
2743
+ l.open && Re(() => {
2744
+ var m;
2745
+ (m = f.current) === null || m === void 0 || m.scrollTo(void 0);
2746
+ });
2747
+ }, {
2748
+ immediate: !0,
2749
+ flush: "post"
2750
+ });
2751
+ const C = (m) => {
2752
+ m !== void 0 && i.onSelect(m, {
2753
+ selected: !i.rawValues.has(m)
2754
+ }), l.multiple || l.toggleOpen(!1);
2755
+ }, S = (m) => typeof m.label == "function" ? m.label() : m.label;
2756
+ function x(m) {
2757
+ const E = a.value[m];
2758
+ if (!E) return null;
2759
+ const $ = E.data || {}, {
2760
+ value: N
2761
+ } = $, {
2762
+ group: H
2763
+ } = E, K = ut($, !0), z = S(E);
2764
+ return E ? w("div", U(U({
2765
+ "aria-label": typeof z == "string" && !H ? z : null
2766
+ }, K), {}, {
2767
+ key: m,
2768
+ role: H ? "presentation" : "option",
2769
+ id: `${l.id}_list_${m}`,
2770
+ "aria-selected": b(N)
2771
+ }), [N]) : null;
2772
+ }
2773
+ return o({
2774
+ onKeydown: (m) => {
2775
+ const {
2776
+ which: E,
2777
+ ctrlKey: $
2778
+ } = m;
2779
+ switch (E) {
2780
+ // >>> Arrow keys & ctrl + n/p on Mac
2781
+ case W.N:
2782
+ case W.P:
2783
+ case W.UP:
2784
+ case W.DOWN: {
2785
+ let N = 0;
2786
+ if (E === W.UP ? N = -1 : E === W.DOWN ? N = 1 : pl() && $ && (E === W.N ? N = 1 : E === W.P && (N = -1)), N !== 0) {
2787
+ const H = p(g.activeIndex + N, N);
2788
+ r(H), I(H, !0);
2789
+ }
2790
+ break;
2791
+ }
2792
+ // >>> Select
2793
+ case W.ENTER: {
2794
+ const N = a.value[g.activeIndex];
2795
+ N && !N.data.disabled ? C(N.value) : C(void 0), l.open && m.preventDefault();
2796
+ break;
2797
+ }
2798
+ // >>> Close
2799
+ case W.ESC:
2800
+ l.toggleOpen(!1), l.open && m.stopPropagation();
2801
+ }
2802
+ },
2803
+ onKeyup: () => {
2804
+ },
2805
+ scrollTo: (m) => {
2806
+ r(m);
2807
+ }
2808
+ }), () => {
2809
+ const {
2810
+ id: m,
2811
+ notFoundContent: E,
2812
+ onPopupScroll: $
2813
+ } = l, {
2814
+ menuItemSelectedIcon: N,
2815
+ fieldNames: H,
2816
+ virtual: K,
2817
+ listHeight: z,
2818
+ listItemHeight: q
2819
+ } = i, Z = t.option, {
2820
+ activeIndex: j
2821
+ } = g, T = Object.keys(H).map((L) => H[L]);
2822
+ return a.value.length === 0 ? w("div", {
2823
+ role: "listbox",
2824
+ id: `${m}_list`,
2825
+ class: `${u.value}-empty`,
2826
+ onMousedown: s
2827
+ }, [E]) : w($e, null, [w("div", {
2828
+ role: "listbox",
2829
+ id: `${m}_list`,
2830
+ style: {
2831
+ height: 0,
2832
+ width: 0,
2833
+ overflow: "hidden"
2834
+ }
2835
+ }, [x(j - 1), x(j), x(j + 1)]), w(fl, {
2836
+ itemKey: "key",
2837
+ ref: f,
2838
+ data: a.value,
2839
+ height: z,
2840
+ itemHeight: q,
2841
+ fullHeight: !1,
2842
+ onMousedown: s,
2843
+ onScroll: $,
2844
+ virtual: K
2845
+ }, {
2846
+ default: (L, Q) => {
2847
+ var k;
2848
+ const {
2849
+ group: v,
2850
+ groupOption: A,
2851
+ data: P,
2852
+ value: Y
2853
+ } = L, {
2854
+ key: oe
2855
+ } = P, ie = typeof L.label == "function" ? L.label() : L.label;
2856
+ if (v) {
2857
+ const ue = (k = P.title) !== null && k !== void 0 ? k : zt(ie) && ie;
2858
+ return w("div", {
2859
+ class: se(u.value, `${u.value}-group`),
2860
+ title: ue
2861
+ }, [Z ? Z(P) : ie !== void 0 ? ie : oe]);
2862
+ }
2863
+ const {
2864
+ disabled: ae,
2865
+ title: ne,
2866
+ children: de,
2867
+ style: fe,
2868
+ class: h,
2869
+ className: c
2870
+ } = P, d = gl(P, ["disabled", "title", "children", "style", "class", "className"]), V = Ke(d, T), M = b(Y), B = `${u.value}-option`, X = se(u.value, B, h, c, {
2871
+ [`${B}-grouped`]: A,
2872
+ [`${B}-active`]: j === Q && !ae,
2873
+ [`${B}-disabled`]: ae,
2874
+ [`${B}-selected`]: M
2875
+ }), J = S(L), te = !N || typeof N == "function" || M, ee = typeof J == "number" ? J : J || Y;
2876
+ let re = zt(ee) ? ee.toString() : void 0;
2877
+ return ne !== void 0 && (re = ne), w("div", U(U({}, V), {}, {
2878
+ "aria-selected": M,
2879
+ class: X,
2880
+ title: re,
2881
+ onMousemove: (ue) => {
2882
+ d.onMousemove && d.onMousemove(ue), !(j === Q || ae) && I(Q);
2883
+ },
2884
+ onClick: (ue) => {
2885
+ ae || C(Y), d.onClick && d.onClick(ue);
2886
+ },
2887
+ style: fe
2888
+ }), [w("div", {
2889
+ class: `${B}-content`
2890
+ }, [Z ? Z(P) : ee]), Fe(N) || M, te && w(Ie, {
2891
+ class: `${u.value}-option-state`,
2892
+ customizeIcon: N,
2893
+ customizeIconProps: {
2894
+ isSelected: M
2895
+ }
2896
+ }, {
2897
+ default: () => [M ? "✓" : null]
2898
+ })]);
2899
+ }
2900
+ })]);
2901
+ };
2902
+ }
2903
+ });
2904
+ var bl = function(e, n) {
2905
+ var o = {};
2906
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
2907
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var l = 0, t = Object.getOwnPropertySymbols(e); l < t.length; l++)
2908
+ n.indexOf(t[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[l]) && (o[t[l]] = e[t[l]]);
2909
+ return o;
2910
+ };
2911
+ function yl(e) {
2912
+ const n = e, {
2913
+ key: o,
2914
+ children: t
2915
+ } = n, l = n.props, {
2916
+ value: i,
2917
+ disabled: u
2918
+ } = l, a = bl(l, ["value", "disabled"]), f = t == null ? void 0 : t.default;
2919
+ return y({
2920
+ key: o,
2921
+ value: i !== void 0 ? i : o,
2922
+ children: f,
2923
+ disabled: u || u === ""
2924
+ }, a);
2925
+ }
2926
+ function pt(e) {
2927
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2928
+ return qt(e).map((t, l) => {
2929
+ var i;
2930
+ if (!Fe(t) || !t.type)
2931
+ return null;
2932
+ const {
2933
+ type: {
2934
+ isSelectOptGroup: u
2935
+ },
2936
+ key: a,
2937
+ children: f,
2938
+ props: s
2939
+ } = t;
2940
+ if (n || !u)
2941
+ return yl(t);
2942
+ const r = f && f.default ? f.default() : void 0, p = (s == null ? void 0 : s.label) || ((i = f.label) === null || i === void 0 ? void 0 : i.call(f)) || a;
2943
+ return y(y({
2944
+ key: `__RC_SELECT_GRP__${a === null ? l : String(a)}__`
2945
+ }, s), {
2946
+ label: p,
2947
+ options: pt(r || [])
2948
+ });
2949
+ }).filter((t) => t);
2950
+ }
2951
+ function Sl(e, n, o) {
2952
+ const t = G(), l = G(), i = G(), u = G([]);
2953
+ return le([e, n], () => {
2954
+ e.value ? u.value = it(e.value).slice() : u.value = pt(n.value);
2955
+ }, {
2956
+ immediate: !0,
2957
+ deep: !0
2958
+ }), Ce(() => {
2959
+ const a = u.value, f = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), r = o.value;
2960
+ function p(g) {
2961
+ let I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2962
+ for (let b = 0; b < g.length; b += 1) {
2963
+ const C = g[b];
2964
+ !C[r.options] || I ? (f.set(C[r.value], C), s.set(C[r.label], C)) : p(C[r.options], !0);
2965
+ }
2966
+ }
2967
+ p(a), t.value = a, l.value = f, i.value = s;
2968
+ }), {
2969
+ options: t,
2970
+ valueOptions: l,
2971
+ labelOptions: i
2972
+ };
2973
+ }
2974
+ let Wt = 0;
2975
+ const wl = process.env.NODE_ENV !== "test" && Yn();
2976
+ function Cl() {
2977
+ let e;
2978
+ return wl ? (e = Wt, Wt += 1) : e = "TEST_OR_SSR", e;
2979
+ }
2980
+ function Il() {
2981
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : me("");
2982
+ const n = `rc_select_${Cl()}`;
2983
+ return e.value || n;
2984
+ }
2985
+ function mt(e) {
2986
+ return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
2987
+ }
2988
+ const xl = typeof window < "u" && window.document && window.document.documentElement;
2989
+ process.env.NODE_ENV;
2990
+ function Ol(e) {
2991
+ const {
2992
+ mode: n,
2993
+ options: o,
2994
+ children: t,
2995
+ backfill: l,
2996
+ allowClear: i,
2997
+ placeholder: u,
2998
+ getInputElement: a,
2999
+ showSearch: f,
3000
+ onSearch: s,
3001
+ defaultOpen: r,
3002
+ autofocus: p,
3003
+ labelInValue: g,
3004
+ value: I,
3005
+ inputValue: b,
3006
+ optionLabelProp: C
3007
+ } = e, S = ft(n), x = f !== void 0 ? f : S || n === "combobox", R = o || pt(t);
3008
+ if (ve(n !== "tags" || R.every((F) => !F.disabled), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), ve(n !== "combobox" || !C, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), ve(n === "combobox" || !l, "`backfill` only works with `combobox` mode."), ve(n === "combobox" || !a, "`getInputElement` only work with `combobox` mode."), Pt(n !== "combobox" || !a || !i || !u, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), s && !x && n !== "combobox" && n !== "tags" && ve(!1, "`onSearch` should work with `showSearch` instead of use alone."), Pt(!r || p, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."), I != null) {
3009
+ const F = mt(I);
3010
+ ve(!g || F.every((O) => typeof O == "object" && ("key" in O || "value" in O)), "`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"), ve(!S || Array.isArray(I), "`value` should be array when `mode` is `multiple` or `tags`");
3011
+ }
3012
+ if (t) {
3013
+ let F = null;
3014
+ t.some((O) => {
3015
+ var m;
3016
+ if (!Fe(O) || !O.type)
3017
+ return !1;
3018
+ const {
3019
+ type: E
3020
+ } = O;
3021
+ return E.isSelectOption ? !1 : E.isSelectOptGroup ? !(((m = O.children) === null || m === void 0 ? void 0 : m.default()) || []).every((H) => !Fe(H) || !O.type || H.type.isSelectOption ? !0 : (F = H.type, !1)) : (F = E, !0);
3022
+ }), F && ve(!1, `\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${F.displayName || F.name || F}\`.`), ve(b === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
3023
+ }
3024
+ }
3025
+ function Je(e, n) {
3026
+ return mt(e).join("").toUpperCase().includes(n);
3027
+ }
3028
+ const $l = (e, n, o, t, l) => D(() => {
3029
+ const i = o.value, u = l == null ? void 0 : l.value, a = t == null ? void 0 : t.value;
3030
+ if (!i || a === !1)
3031
+ return e.value;
3032
+ const {
3033
+ options: f,
3034
+ label: s,
3035
+ value: r
3036
+ } = n.value, p = [], g = typeof a == "function", I = i.toUpperCase(), b = g ? a : (S, x) => u ? Je(x[u], I) : x[f] ? Je(x[s !== "children" ? s : "label"], I) : Je(x[r], I), C = g ? (S) => ot(S) : (S) => S;
3037
+ return e.value.forEach((S) => {
3038
+ if (S[f]) {
3039
+ if (b(i, C(S)))
3040
+ p.push(S);
3041
+ else {
3042
+ const R = S[f].filter((F) => b(i, C(F)));
3043
+ R.length && p.push(y(y({}, S), {
3044
+ [f]: R
3045
+ }));
3046
+ }
3047
+ return;
3048
+ }
3049
+ b(i, C(S)) && p.push(S);
3050
+ }), p;
3051
+ }), Ml = (e, n) => {
3052
+ const o = G({
3053
+ values: /* @__PURE__ */ new Map(),
3054
+ options: /* @__PURE__ */ new Map()
3055
+ });
3056
+ return [D(() => {
3057
+ const {
3058
+ values: i,
3059
+ options: u
3060
+ } = o.value, a = e.value.map((r) => {
3061
+ var p;
3062
+ return r.label === void 0 ? y(y({}, r), {
3063
+ label: (p = i.get(r.value)) === null || p === void 0 ? void 0 : p.label
3064
+ }) : r;
3065
+ }), f = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
3066
+ return a.forEach((r) => {
3067
+ f.set(r.value, r), s.set(r.value, n.value.get(r.value) || u.get(r.value));
3068
+ }), o.value.values = f, o.value.options = s, a;
3069
+ }), (i) => n.value.get(i) || o.value.options.get(i)];
3070
+ }, El = ["inputValue"];
3071
+ function cn() {
3072
+ return y(y({}, an()), {
3073
+ prefixCls: String,
3074
+ id: String,
3075
+ backfill: {
3076
+ type: Boolean,
3077
+ default: void 0
3078
+ },
3079
+ // >>> Field Names
3080
+ fieldNames: Object,
3081
+ // >>> Search
3082
+ /** @deprecated Use `searchValue` instead */
3083
+ inputValue: String,
3084
+ searchValue: String,
3085
+ onSearch: Function,
3086
+ autoClearSearchValue: {
3087
+ type: Boolean,
3088
+ default: void 0
3089
+ },
3090
+ // >>> Select
3091
+ onSelect: Function,
3092
+ onDeselect: Function,
3093
+ // >>> Options
3094
+ /**
3095
+ * In Select, `false` means do nothing.
3096
+ * In TreeSelect, `false` will highlight match item.
3097
+ * It's by design.
3098
+ */
3099
+ filterOption: {
3100
+ type: [Boolean, Function],
3101
+ default: void 0
3102
+ },
3103
+ filterSort: Function,
3104
+ optionFilterProp: String,
3105
+ optionLabelProp: String,
3106
+ options: Array,
3107
+ defaultActiveFirstOption: {
3108
+ type: Boolean,
3109
+ default: void 0
3110
+ },
3111
+ virtual: {
3112
+ type: Boolean,
3113
+ default: void 0
3114
+ },
3115
+ listHeight: Number,
3116
+ listItemHeight: Number,
3117
+ // >>> Icon
3118
+ menuItemSelectedIcon: _.any,
3119
+ mode: String,
3120
+ labelInValue: {
3121
+ type: Boolean,
3122
+ default: void 0
3123
+ },
3124
+ value: _.any,
3125
+ defaultValue: _.any,
3126
+ onChange: Function,
3127
+ children: Array
3128
+ });
3129
+ }
3130
+ function Tl(e) {
3131
+ return !e || typeof e != "object";
3132
+ }
3133
+ const Pl = ce({
3134
+ compatConfig: {
3135
+ MODE: 3
3136
+ },
3137
+ name: "VcSelect",
3138
+ inheritAttrs: !1,
3139
+ props: at(cn(), {
3140
+ prefixCls: "vc-select",
3141
+ autoClearSearchValue: !0,
3142
+ listHeight: 200,
3143
+ listItemHeight: 20,
3144
+ dropdownMatchSelectWidth: !0
3145
+ }),
3146
+ setup(e, n) {
3147
+ let {
3148
+ expose: o,
3149
+ attrs: t,
3150
+ slots: l
3151
+ } = n;
3152
+ const i = Il(he(e, "id")), u = D(() => ft(e.mode)), a = D(() => !!(!e.options && e.children)), f = D(() => e.filterOption === void 0 && e.mode === "combobox" ? !1 : e.filterOption), s = D(() => Zt(e.fieldNames, a.value)), [r, p] = Dt("", {
3153
+ value: D(() => e.searchValue !== void 0 ? e.searchValue : e.inputValue),
3154
+ postState: (h) => h || ""
3155
+ }), g = Sl(he(e, "options"), he(e, "children"), s), {
3156
+ valueOptions: I,
3157
+ labelOptions: b,
3158
+ options: C
3159
+ } = g, S = (h) => mt(h).map((d) => {
3160
+ var V, M;
3161
+ let B, X, J, te;
3162
+ Tl(d) ? B = d : (J = d.key, X = d.label, B = (V = d.value) !== null && V !== void 0 ? V : J);
3163
+ const ee = I.value.get(B);
3164
+ return ee && (X === void 0 && (X = ee == null ? void 0 : ee[e.optionLabelProp || s.value.label]), J === void 0 && (J = (M = ee == null ? void 0 : ee.key) !== null && M !== void 0 ? M : B), te = ee == null ? void 0 : ee.disabled), {
3165
+ label: X,
3166
+ value: B,
3167
+ key: J,
3168
+ disabled: te,
3169
+ option: ee
3170
+ };
3171
+ }), [x, R] = Dt(e.defaultValue, {
3172
+ value: he(e, "value")
3173
+ }), F = D(() => {
3174
+ var h;
3175
+ const c = S(x.value);
3176
+ return e.mode === "combobox" && !(!((h = c[0]) === null || h === void 0) && h.value) ? [] : c;
3177
+ }), [O, m] = Ml(F, I), E = D(() => {
3178
+ if (!e.mode && O.value.length === 1) {
3179
+ const h = O.value[0];
3180
+ if (h.value === null && (h.label === null || h.label === void 0))
3181
+ return [];
3182
+ }
3183
+ return O.value.map((h) => {
3184
+ var c;
3185
+ return y(y({}, h), {
3186
+ label: (c = typeof h.label == "function" ? h.label() : h.label) !== null && c !== void 0 ? c : h.value
3187
+ });
3188
+ });
3189
+ }), $ = D(() => new Set(O.value.map((h) => h.value)));
3190
+ Ce(() => {
3191
+ var h;
3192
+ if (e.mode === "combobox") {
3193
+ const c = (h = O.value[0]) === null || h === void 0 ? void 0 : h.value;
3194
+ c != null && p(String(c));
3195
+ }
3196
+ }, {
3197
+ flush: "post"
3198
+ });
3199
+ const N = (h, c) => {
3200
+ const d = c ?? h;
3201
+ return {
3202
+ [s.value.value]: h,
3203
+ [s.value.label]: d
3204
+ };
3205
+ }, H = G();
3206
+ Ce(() => {
3207
+ if (e.mode !== "tags") {
3208
+ H.value = C.value;
3209
+ return;
3210
+ }
3211
+ const h = C.value.slice(), c = (d) => I.value.has(d);
3212
+ [...O.value].sort((d, V) => d.value < V.value ? -1 : 1).forEach((d) => {
3213
+ const V = d.value;
3214
+ c(V) || h.push(N(V, d.label));
3215
+ }), H.value = h;
3216
+ });
3217
+ const K = $l(H, s, r, f, he(e, "optionFilterProp")), z = D(() => e.mode !== "tags" || !r.value || K.value.some((h) => h[e.optionFilterProp || "value"] === r.value) ? K.value : [N(r.value), ...K.value]), q = D(() => e.filterSort ? [...z.value].sort((h, c) => e.filterSort(h, c)) : z.value), Z = D(() => Io(q.value, {
3218
+ fieldNames: s.value,
3219
+ childrenAsData: a.value
3220
+ })), j = (h) => {
3221
+ const c = S(h);
3222
+ if (R(c), e.onChange && // Trigger event only when value changed
3223
+ (c.length !== O.value.length || c.some((d, V) => {
3224
+ var M;
3225
+ return ((M = O.value[V]) === null || M === void 0 ? void 0 : M.value) !== (d == null ? void 0 : d.value);
3226
+ }))) {
3227
+ const d = e.labelInValue ? c.map((M) => y(y({}, M), {
3228
+ originLabel: M.label,
3229
+ label: typeof M.label == "function" ? M.label() : M.label
3230
+ })) : c.map((M) => M.value), V = c.map((M) => ot(m(M.value)));
3231
+ e.onChange(
3232
+ // Value
3233
+ u.value ? d : d[0],
3234
+ // Option
3235
+ u.value ? V : V[0]
3236
+ );
3237
+ }
3238
+ }, [T, L] = Rt(null), [Q, k] = Rt(0), v = D(() => e.defaultActiveFirstOption !== void 0 ? e.defaultActiveFirstOption : e.mode !== "combobox"), A = function(h, c) {
3239
+ let {
3240
+ source: d = "keyboard"
3241
+ } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3242
+ k(c), e.backfill && e.mode === "combobox" && h !== null && d === "keyboard" && L(String(h));
3243
+ }, P = (h, c) => {
3244
+ const d = () => {
3245
+ var V;
3246
+ const M = m(h), B = M == null ? void 0 : M[s.value.label];
3247
+ return [e.labelInValue ? {
3248
+ label: typeof B == "function" ? B() : B,
3249
+ originLabel: B,
3250
+ value: h,
3251
+ key: (V = M == null ? void 0 : M.key) !== null && V !== void 0 ? V : h
3252
+ } : h, ot(M)];
3253
+ };
3254
+ if (c && e.onSelect) {
3255
+ const [V, M] = d();
3256
+ e.onSelect(V, M);
3257
+ } else if (!c && e.onDeselect) {
3258
+ const [V, M] = d();
3259
+ e.onDeselect(V, M);
3260
+ }
3261
+ }, Y = (h, c) => {
3262
+ let d;
3263
+ const V = u.value ? c.selected : !0;
3264
+ V ? d = u.value ? [...O.value, h] : [h] : d = O.value.filter((M) => M.value !== h), j(d), P(h, V), e.mode === "combobox" ? L("") : (!u.value || e.autoClearSearchValue) && (p(""), L(""));
3265
+ }, oe = (h, c) => {
3266
+ j(h), (c.type === "remove" || c.type === "clear") && c.values.forEach((d) => {
3267
+ P(d.value, !1);
3268
+ });
3269
+ }, ie = (h, c) => {
3270
+ var d;
3271
+ if (p(h), L(null), c.source === "submit") {
3272
+ const V = (h || "").trim();
3273
+ if (V) {
3274
+ const M = Array.from(/* @__PURE__ */ new Set([...$.value, V]));
3275
+ j(M), P(V, !0), p("");
3276
+ }
3277
+ return;
3278
+ }
3279
+ c.source !== "blur" && (e.mode === "combobox" && j(h), (d = e.onSearch) === null || d === void 0 || d.call(e, h));
3280
+ }, ae = (h) => {
3281
+ let c = h;
3282
+ e.mode !== "tags" && (c = h.map((V) => {
3283
+ const M = b.value.get(V);
3284
+ return M == null ? void 0 : M.value;
3285
+ }).filter((V) => V !== void 0));
3286
+ const d = Array.from(/* @__PURE__ */ new Set([...$.value, ...c]));
3287
+ j(d), d.forEach((V) => {
3288
+ P(V, !0);
3289
+ });
3290
+ }, ne = D(() => e.virtual !== !1 && e.dropdownMatchSelectWidth !== !1);
3291
+ ml(ln(y(y({}, g), {
3292
+ flattenOptions: Z,
3293
+ onActiveValue: A,
3294
+ defaultActiveFirstOption: v,
3295
+ onSelect: Y,
3296
+ menuItemSelectedIcon: he(e, "menuItemSelectedIcon"),
3297
+ rawValues: $,
3298
+ fieldNames: s,
3299
+ virtual: ne,
3300
+ listHeight: he(e, "listHeight"),
3301
+ listItemHeight: he(e, "listItemHeight"),
3302
+ childrenAsData: a
3303
+ }))), process.env.NODE_ENV !== "production" && Ce(() => {
3304
+ Ol(e);
3305
+ }, {
3306
+ flush: "post"
3307
+ });
3308
+ const de = me();
3309
+ o({
3310
+ focus() {
3311
+ var h;
3312
+ (h = de.value) === null || h === void 0 || h.focus();
3313
+ },
3314
+ blur() {
3315
+ var h;
3316
+ (h = de.value) === null || h === void 0 || h.blur();
3317
+ },
3318
+ scrollTo(h) {
3319
+ var c;
3320
+ (c = de.value) === null || c === void 0 || c.scrollTo(h);
3321
+ }
3322
+ });
3323
+ const fe = D(() => Ke(e, [
3324
+ "id",
3325
+ "mode",
3326
+ "prefixCls",
3327
+ "backfill",
3328
+ "fieldNames",
3329
+ // Search
3330
+ "inputValue",
3331
+ "searchValue",
3332
+ "onSearch",
3333
+ "autoClearSearchValue",
3334
+ // Select
3335
+ "onSelect",
3336
+ "onDeselect",
3337
+ "dropdownMatchSelectWidth",
3338
+ // Options
3339
+ "filterOption",
3340
+ "filterSort",
3341
+ "optionFilterProp",
3342
+ "optionLabelProp",
3343
+ "options",
3344
+ "children",
3345
+ "defaultActiveFirstOption",
3346
+ "menuItemSelectedIcon",
3347
+ "virtual",
3348
+ "listHeight",
3349
+ "listItemHeight",
3350
+ // Value
3351
+ "value",
3352
+ "defaultValue",
3353
+ "labelInValue",
3354
+ "onChange"
3355
+ ]));
3356
+ return () => w(ko, U(U(U({}, fe.value), t), {}, {
3357
+ id: i,
3358
+ prefixCls: e.prefixCls,
3359
+ ref: de,
3360
+ omitDomProps: El,
3361
+ mode: e.mode,
3362
+ displayValues: E.value,
3363
+ onDisplayValuesChange: oe,
3364
+ searchValue: r.value,
3365
+ onSearch: ie,
3366
+ onSearchSplit: ae,
3367
+ dropdownMatchSelectWidth: e.dropdownMatchSelectWidth,
3368
+ OptionList: hl,
3369
+ emptyOptions: !Z.value.length,
3370
+ activeValue: T.value,
3371
+ activeDescendantId: `${i}_list_${Q.value}`
3372
+ }), l);
3373
+ }
3374
+ }), vt = () => null;
3375
+ vt.isSelectOption = !0;
3376
+ vt.displayName = "ASelectOption";
3377
+ const gt = () => null;
3378
+ gt.isSelectOptGroup = !0;
3379
+ gt.displayName = "ASelectOptGroup";
3380
+ var Rl = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" };
3381
+ function Kt(e) {
3382
+ for (var n = 1; n < arguments.length; n++) {
3383
+ var o = arguments[n] != null ? Object(arguments[n]) : {}, t = Object.keys(o);
3384
+ typeof Object.getOwnPropertySymbols == "function" && (t = t.concat(Object.getOwnPropertySymbols(o).filter(function(l) {
3385
+ return Object.getOwnPropertyDescriptor(o, l).enumerable;
3386
+ }))), t.forEach(function(l) {
3387
+ Fl(e, l, o[l]);
3388
+ });
3389
+ }
3390
+ return e;
3391
+ }
3392
+ function Fl(e, n, o) {
3393
+ return n in e ? Object.defineProperty(e, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = o, e;
3394
+ }
3395
+ var ht = function(n, o) {
3396
+ var t = Kt({}, n, o.attrs);
3397
+ return w(Gn, Kt({}, t, {
3398
+ icon: Rl
3399
+ }), null);
3400
+ };
3401
+ ht.displayName = "CheckOutlined";
3402
+ ht.inheritAttrs = !1;
3403
+ function Dl(e) {
3404
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3405
+ const {
3406
+ loading: o,
3407
+ multiple: t,
3408
+ prefixCls: l,
3409
+ hasFeedback: i,
3410
+ feedbackIcon: u,
3411
+ showArrow: a
3412
+ } = e, f = e.suffixIcon || n.suffixIcon && n.suffixIcon(), s = e.clearIcon || n.clearIcon && n.clearIcon(), r = e.menuItemSelectedIcon || n.menuItemSelectedIcon && n.menuItemSelectedIcon(), p = e.removeIcon || n.removeIcon && n.removeIcon(), g = s ?? w(Xn, null, null), I = (x) => w($e, null, [a !== !1 && x, i && u]);
3413
+ let b = null;
3414
+ if (f !== void 0)
3415
+ b = I(f);
3416
+ else if (o)
3417
+ b = I(w(qn, {
3418
+ spin: !0
3419
+ }, null));
3420
+ else {
3421
+ const x = `${l}-suffix`;
3422
+ b = (R) => {
3423
+ let {
3424
+ open: F,
3425
+ showSearch: O
3426
+ } = R;
3427
+ return I(F && O ? w(po, {
3428
+ class: x
3429
+ }, null) : w(mo, {
3430
+ class: x
3431
+ }, null));
3432
+ };
3433
+ }
3434
+ let C = null;
3435
+ r !== void 0 ? C = r : t ? C = w(ht, null, null) : C = null;
3436
+ let S = null;
3437
+ return p !== void 0 ? S = p : S = w(go, null, null), {
3438
+ clearIcon: g,
3439
+ suffixIcon: b,
3440
+ itemIcon: C,
3441
+ removeIcon: S
3442
+ };
3443
+ }
3444
+ const jt = (e) => {
3445
+ const {
3446
+ controlPaddingHorizontal: n
3447
+ } = e;
3448
+ return {
3449
+ position: "relative",
3450
+ display: "block",
3451
+ minHeight: e.controlHeight,
3452
+ padding: `${(e.controlHeight - e.fontSize * e.lineHeight) / 2}px ${n}px`,
3453
+ color: e.colorText,
3454
+ fontWeight: "normal",
3455
+ fontSize: e.fontSize,
3456
+ lineHeight: e.lineHeight,
3457
+ boxSizing: "border-box"
3458
+ };
3459
+ }, Nl = (e) => {
3460
+ const {
3461
+ antCls: n,
3462
+ componentCls: o
3463
+ } = e, t = `${o}-item`;
3464
+ return [
3465
+ {
3466
+ [`${o}-dropdown`]: y(y({}, rt(e)), {
3467
+ position: "absolute",
3468
+ top: -9999,
3469
+ zIndex: e.zIndexPopup,
3470
+ boxSizing: "border-box",
3471
+ padding: e.paddingXXS,
3472
+ overflow: "hidden",
3473
+ fontSize: e.fontSize,
3474
+ // Fix select render lag of long text in chrome
3475
+ // https://github.com/ant-design/ant-design/issues/11456
3476
+ // https://github.com/ant-design/ant-design/issues/11843
3477
+ fontVariant: "initial",
3478
+ backgroundColor: e.colorBgElevated,
3479
+ borderRadius: e.borderRadiusLG,
3480
+ outline: "none",
3481
+ boxShadow: e.boxShadowSecondary,
3482
+ [`
3483
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
3484
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-bottomLeft
3485
+ `]: {
3486
+ animationName: So
3487
+ },
3488
+ [`
3489
+ &${n}-slide-up-enter${n}-slide-up-enter-active${o}-dropdown-placement-topLeft,
3490
+ &${n}-slide-up-appear${n}-slide-up-appear-active${o}-dropdown-placement-topLeft
3491
+ `]: {
3492
+ animationName: yo
3493
+ },
3494
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-bottomLeft`]: {
3495
+ animationName: bo
3496
+ },
3497
+ [`&${n}-slide-up-leave${n}-slide-up-leave-active${o}-dropdown-placement-topLeft`]: {
3498
+ animationName: ho
3499
+ },
3500
+ "&-hidden": {
3501
+ display: "none"
3502
+ },
3503
+ "&-empty": {
3504
+ color: e.colorTextDisabled
3505
+ },
3506
+ // ========================= Options =========================
3507
+ [`${t}-empty`]: y(y({}, jt(e)), {
3508
+ color: e.colorTextDisabled
3509
+ }),
3510
+ [`${t}`]: y(y({}, jt(e)), {
3511
+ cursor: "pointer",
3512
+ transition: `background ${e.motionDurationSlow} ease`,
3513
+ borderRadius: e.borderRadiusSM,
3514
+ // =========== Group ============
3515
+ "&-group": {
3516
+ color: e.colorTextDescription,
3517
+ fontSize: e.fontSizeSM,
3518
+ cursor: "default"
3519
+ },
3520
+ // =========== Option ===========
3521
+ "&-option": {
3522
+ display: "flex",
3523
+ "&-content": y({
3524
+ flex: "auto"
3525
+ }, nt),
3526
+ "&-state": {
3527
+ flex: "none"
3528
+ },
3529
+ [`&-active:not(${t}-option-disabled)`]: {
3530
+ backgroundColor: e.controlItemBgHover
3531
+ },
3532
+ [`&-selected:not(${t}-option-disabled)`]: {
3533
+ color: e.colorText,
3534
+ fontWeight: e.fontWeightStrong,
3535
+ backgroundColor: e.controlItemBgActive,
3536
+ [`${t}-option-state`]: {
3537
+ color: e.colorPrimary
3538
+ }
3539
+ },
3540
+ "&-disabled": {
3541
+ [`&${t}-option-selected`]: {
3542
+ backgroundColor: e.colorBgContainerDisabled
3543
+ },
3544
+ color: e.colorTextDisabled,
3545
+ cursor: "not-allowed"
3546
+ },
3547
+ "&-grouped": {
3548
+ paddingInlineStart: e.controlPaddingHorizontal * 2
3549
+ }
3550
+ }
3551
+ }),
3552
+ // =========================== RTL ===========================
3553
+ "&-rtl": {
3554
+ direction: "rtl"
3555
+ }
3556
+ })
3557
+ },
3558
+ // Follow code may reuse in other components
3559
+ Nt(e, "slide-up"),
3560
+ Nt(e, "slide-down"),
3561
+ Vt(e, "move-up"),
3562
+ Vt(e, "move-down")
3563
+ ];
3564
+ }, Oe = 2;
3565
+ function dn(e) {
3566
+ let {
3567
+ controlHeightSM: n,
3568
+ controlHeight: o,
3569
+ lineWidth: t
3570
+ } = e;
3571
+ const l = (o - n) / 2 - t, i = Math.ceil(l / 2);
3572
+ return [l, i];
3573
+ }
3574
+ function ke(e, n) {
3575
+ const {
3576
+ componentCls: o,
3577
+ iconCls: t
3578
+ } = e, l = `${o}-selection-overflow`, i = e.controlHeightSM, [u] = dn(e), a = n ? `${o}-${n}` : "";
3579
+ return {
3580
+ [`${o}-multiple${a}`]: {
3581
+ fontSize: e.fontSize,
3582
+ /**
3583
+ * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
3584
+ * may update to redesign with its align logic.
3585
+ */
3586
+ // =========================== Overflow ===========================
3587
+ [l]: {
3588
+ position: "relative",
3589
+ display: "flex",
3590
+ flex: "auto",
3591
+ flexWrap: "wrap",
3592
+ maxWidth: "100%",
3593
+ "&-item": {
3594
+ flex: "none",
3595
+ alignSelf: "center",
3596
+ maxWidth: "100%",
3597
+ display: "inline-flex"
3598
+ }
3599
+ },
3600
+ // ========================= Selector =========================
3601
+ [`${o}-selector`]: {
3602
+ display: "flex",
3603
+ flexWrap: "wrap",
3604
+ alignItems: "center",
3605
+ // Multiple is little different that horizontal is follow the vertical
3606
+ padding: `${u - Oe}px ${Oe * 2}px`,
3607
+ borderRadius: e.borderRadius,
3608
+ [`${o}-show-search&`]: {
3609
+ cursor: "text"
3610
+ },
3611
+ [`${o}-disabled&`]: {
3612
+ background: e.colorBgContainerDisabled,
3613
+ cursor: "not-allowed"
3614
+ },
3615
+ "&:after": {
3616
+ display: "inline-block",
3617
+ width: 0,
3618
+ margin: `${Oe}px 0`,
3619
+ lineHeight: `${i}px`,
3620
+ content: '"\\a0"'
3621
+ }
3622
+ },
3623
+ [`
3624
+ &${o}-show-arrow ${o}-selector,
3625
+ &${o}-allow-clear ${o}-selector
3626
+ `]: {
3627
+ paddingInlineEnd: e.fontSizeIcon + e.controlPaddingHorizontal
3628
+ },
3629
+ // ======================== Selections ========================
3630
+ [`${o}-selection-item`]: {
3631
+ position: "relative",
3632
+ display: "flex",
3633
+ flex: "none",
3634
+ boxSizing: "border-box",
3635
+ maxWidth: "100%",
3636
+ height: i,
3637
+ marginTop: Oe,
3638
+ marginBottom: Oe,
3639
+ lineHeight: `${i - e.lineWidth * 2}px`,
3640
+ background: e.colorFillSecondary,
3641
+ border: `${e.lineWidth}px solid ${e.colorSplit}`,
3642
+ borderRadius: e.borderRadiusSM,
3643
+ cursor: "default",
3644
+ transition: `font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,
3645
+ userSelect: "none",
3646
+ marginInlineEnd: Oe * 2,
3647
+ paddingInlineStart: e.paddingXS,
3648
+ paddingInlineEnd: e.paddingXS / 2,
3649
+ [`${o}-disabled&`]: {
3650
+ color: e.colorTextDisabled,
3651
+ borderColor: e.colorBorder,
3652
+ cursor: "not-allowed"
3653
+ },
3654
+ // It's ok not to do this, but 24px makes bottom narrow in view should adjust
3655
+ "&-content": {
3656
+ display: "inline-block",
3657
+ marginInlineEnd: e.paddingXS / 2,
3658
+ overflow: "hidden",
3659
+ whiteSpace: "pre",
3660
+ textOverflow: "ellipsis"
3661
+ },
3662
+ "&-remove": y(y({}, Qt()), {
3663
+ display: "inline-block",
3664
+ color: e.colorIcon,
3665
+ fontWeight: "bold",
3666
+ fontSize: 10,
3667
+ lineHeight: "inherit",
3668
+ cursor: "pointer",
3669
+ [`> ${t}`]: {
3670
+ verticalAlign: "-0.2em"
3671
+ },
3672
+ "&:hover": {
3673
+ color: e.colorIconHover
3674
+ }
3675
+ })
3676
+ },
3677
+ // ========================== Input ==========================
3678
+ [`${l}-item + ${l}-item`]: {
3679
+ [`${o}-selection-search`]: {
3680
+ marginInlineStart: 0
3681
+ }
3682
+ },
3683
+ [`${o}-selection-search`]: {
3684
+ display: "inline-flex",
3685
+ position: "relative",
3686
+ maxWidth: "100%",
3687
+ marginInlineStart: e.inputPaddingHorizontalBase - u,
3688
+ "\n &-input,\n &-mirror\n ": {
3689
+ height: i,
3690
+ fontFamily: e.fontFamily,
3691
+ lineHeight: `${i}px`,
3692
+ transition: `all ${e.motionDurationSlow}`
3693
+ },
3694
+ "&-input": {
3695
+ width: "100%",
3696
+ minWidth: 4.1
3697
+ // fix search cursor missing
3698
+ },
3699
+ "&-mirror": {
3700
+ position: "absolute",
3701
+ top: 0,
3702
+ insetInlineStart: 0,
3703
+ insetInlineEnd: "auto",
3704
+ zIndex: 999,
3705
+ whiteSpace: "pre",
3706
+ visibility: "hidden"
3707
+ }
3708
+ },
3709
+ // ======================= Placeholder =======================
3710
+ [`${o}-selection-placeholder `]: {
3711
+ position: "absolute",
3712
+ top: "50%",
3713
+ insetInlineStart: e.inputPaddingHorizontalBase,
3714
+ insetInlineEnd: e.inputPaddingHorizontalBase,
3715
+ transform: "translateY(-50%)",
3716
+ transition: `all ${e.motionDurationSlow}`
3717
+ }
3718
+ }
3719
+ };
3720
+ }
3721
+ function Vl(e) {
3722
+ const {
3723
+ componentCls: n
3724
+ } = e, o = Se(e, {
3725
+ controlHeight: e.controlHeightSM,
3726
+ controlHeightSM: e.controlHeightXS,
3727
+ borderRadius: e.borderRadiusSM,
3728
+ borderRadiusSM: e.borderRadiusXS
3729
+ }), [, t] = dn(e);
3730
+ return [
3731
+ ke(e),
3732
+ // ======================== Small ========================
3733
+ // Shared
3734
+ ke(o, "sm"),
3735
+ // Padding
3736
+ {
3737
+ [`${n}-multiple${n}-sm`]: {
3738
+ [`${n}-selection-placeholder`]: {
3739
+ insetInlineStart: e.controlPaddingHorizontalSM - e.lineWidth,
3740
+ insetInlineEnd: "auto"
3741
+ },
3742
+ // https://github.com/ant-design/ant-design/issues/29559
3743
+ [`${n}-selection-search`]: {
3744
+ marginInlineStart: t
3745
+ }
3746
+ }
3747
+ },
3748
+ // ======================== Large ========================
3749
+ // Shared
3750
+ ke(Se(e, {
3751
+ fontSize: e.fontSizeLG,
3752
+ controlHeight: e.controlHeightLG,
3753
+ controlHeightSM: e.controlHeight,
3754
+ borderRadius: e.borderRadiusLG,
3755
+ borderRadiusSM: e.borderRadius
3756
+ }), "lg")
3757
+ ];
3758
+ }
3759
+ function et(e, n) {
3760
+ const {
3761
+ componentCls: o,
3762
+ inputPaddingHorizontalBase: t,
3763
+ borderRadius: l
3764
+ } = e, i = e.controlHeight - e.lineWidth * 2, u = Math.ceil(e.fontSize * 1.25), a = n ? `${o}-${n}` : "";
3765
+ return {
3766
+ [`${o}-single${a}`]: {
3767
+ fontSize: e.fontSize,
3768
+ // ========================= Selector =========================
3769
+ [`${o}-selector`]: y(y({}, rt(e)), {
3770
+ display: "flex",
3771
+ borderRadius: l,
3772
+ [`${o}-selection-search`]: {
3773
+ position: "absolute",
3774
+ top: 0,
3775
+ insetInlineStart: t,
3776
+ insetInlineEnd: t,
3777
+ bottom: 0,
3778
+ "&-input": {
3779
+ width: "100%"
3780
+ }
3781
+ },
3782
+ [`
3783
+ ${o}-selection-item,
3784
+ ${o}-selection-placeholder
3785
+ `]: {
3786
+ padding: 0,
3787
+ lineHeight: `${i}px`,
3788
+ transition: `all ${e.motionDurationSlow}`,
3789
+ // Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
3790
+ "@supports (-moz-appearance: meterbar)": {
3791
+ lineHeight: `${i}px`
3792
+ }
3793
+ },
3794
+ [`${o}-selection-item`]: {
3795
+ position: "relative",
3796
+ userSelect: "none"
3797
+ },
3798
+ [`${o}-selection-placeholder`]: {
3799
+ transition: "none",
3800
+ pointerEvents: "none"
3801
+ },
3802
+ // For common baseline align
3803
+ [[
3804
+ "&:after",
3805
+ /* For '' value baseline align */
3806
+ `${o}-selection-item:after`,
3807
+ /* For undefined value baseline align */
3808
+ `${o}-selection-placeholder:after`
3809
+ ].join(",")]: {
3810
+ display: "inline-block",
3811
+ width: 0,
3812
+ visibility: "hidden",
3813
+ content: '"\\a0"'
3814
+ }
3815
+ }),
3816
+ [`
3817
+ &${o}-show-arrow ${o}-selection-item,
3818
+ &${o}-show-arrow ${o}-selection-placeholder
3819
+ `]: {
3820
+ paddingInlineEnd: u
3821
+ },
3822
+ // Opacity selection if open
3823
+ [`&${o}-open ${o}-selection-item`]: {
3824
+ color: e.colorTextPlaceholder
3825
+ },
3826
+ // ========================== Input ==========================
3827
+ // We only change the style of non-customize input which is only support by `combobox` mode.
3828
+ // Not customize
3829
+ [`&:not(${o}-customize-input)`]: {
3830
+ [`${o}-selector`]: {
3831
+ width: "100%",
3832
+ height: e.controlHeight,
3833
+ padding: `0 ${t}px`,
3834
+ [`${o}-selection-search-input`]: {
3835
+ height: i
3836
+ },
3837
+ "&:after": {
3838
+ lineHeight: `${i}px`
3839
+ }
3840
+ }
3841
+ },
3842
+ [`&${o}-customize-input`]: {
3843
+ [`${o}-selector`]: {
3844
+ "&:after": {
3845
+ display: "none"
3846
+ },
3847
+ [`${o}-selection-search`]: {
3848
+ position: "static",
3849
+ width: "100%"
3850
+ },
3851
+ [`${o}-selection-placeholder`]: {
3852
+ position: "absolute",
3853
+ insetInlineStart: 0,
3854
+ insetInlineEnd: 0,
3855
+ padding: `0 ${t}px`,
3856
+ "&:after": {
3857
+ display: "none"
3858
+ }
3859
+ }
3860
+ }
3861
+ }
3862
+ }
3863
+ };
3864
+ }
3865
+ function _l(e) {
3866
+ const {
3867
+ componentCls: n
3868
+ } = e, o = e.controlPaddingHorizontalSM - e.lineWidth;
3869
+ return [
3870
+ et(e),
3871
+ // ======================== Small ========================
3872
+ // Shared
3873
+ et(Se(e, {
3874
+ controlHeight: e.controlHeightSM,
3875
+ borderRadius: e.borderRadiusSM
3876
+ }), "sm"),
3877
+ // padding
3878
+ {
3879
+ [`${n}-single${n}-sm`]: {
3880
+ [`&:not(${n}-customize-input)`]: {
3881
+ [`${n}-selection-search`]: {
3882
+ insetInlineStart: o,
3883
+ insetInlineEnd: o
3884
+ },
3885
+ [`${n}-selector`]: {
3886
+ padding: `0 ${o}px`
3887
+ },
3888
+ // With arrow should provides `padding-right` to show the arrow
3889
+ [`&${n}-show-arrow ${n}-selection-search`]: {
3890
+ insetInlineEnd: o + e.fontSize * 1.5
3891
+ },
3892
+ [`
3893
+ &${n}-show-arrow ${n}-selection-item,
3894
+ &${n}-show-arrow ${n}-selection-placeholder
3895
+ `]: {
3896
+ paddingInlineEnd: e.fontSize * 1.5
3897
+ }
3898
+ }
3899
+ }
3900
+ },
3901
+ // ======================== Large ========================
3902
+ // Shared
3903
+ et(Se(e, {
3904
+ controlHeight: e.controlHeightLG,
3905
+ fontSize: e.fontSizeLG,
3906
+ borderRadius: e.borderRadiusLG
3907
+ }), "lg")
3908
+ ];
3909
+ }
3910
+ const Hl = (e) => {
3911
+ const {
3912
+ componentCls: n
3913
+ } = e;
3914
+ return {
3915
+ position: "relative",
3916
+ backgroundColor: e.colorBgContainer,
3917
+ border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
3918
+ transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
3919
+ input: {
3920
+ cursor: "pointer"
3921
+ },
3922
+ [`${n}-show-search&`]: {
3923
+ cursor: "text",
3924
+ input: {
3925
+ cursor: "auto",
3926
+ color: "inherit"
3927
+ }
3928
+ },
3929
+ [`${n}-disabled&`]: {
3930
+ color: e.colorTextDisabled,
3931
+ background: e.colorBgContainerDisabled,
3932
+ cursor: "not-allowed",
3933
+ [`${n}-multiple&`]: {
3934
+ background: e.colorBgContainerDisabled
3935
+ },
3936
+ input: {
3937
+ cursor: "not-allowed"
3938
+ }
3939
+ }
3940
+ };
3941
+ }, tt = function(e, n) {
3942
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
3943
+ const {
3944
+ componentCls: t,
3945
+ borderHoverColor: l,
3946
+ outlineColor: i,
3947
+ antCls: u
3948
+ } = n, a = o ? {
3949
+ [`${t}-selector`]: {
3950
+ borderColor: l
3951
+ }
3952
+ } : {};
3953
+ return {
3954
+ [e]: {
3955
+ [`&:not(${t}-disabled):not(${t}-customize-input):not(${u}-pagination-size-changer)`]: y(y({}, a), {
3956
+ [`${t}-focused& ${t}-selector`]: {
3957
+ borderColor: l,
3958
+ boxShadow: `0 0 0 ${n.controlOutlineWidth}px ${i}`,
3959
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`,
3960
+ outline: 0
3961
+ },
3962
+ [`&:hover ${t}-selector`]: {
3963
+ borderColor: l,
3964
+ borderInlineEndWidth: `${n.controlLineWidth}px !important`
3965
+ }
3966
+ })
3967
+ }
3968
+ };
3969
+ }, Ll = (e) => {
3970
+ const {
3971
+ componentCls: n
3972
+ } = e;
3973
+ return {
3974
+ [`${n}-selection-search-input`]: {
3975
+ margin: 0,
3976
+ padding: 0,
3977
+ background: "transparent",
3978
+ border: "none",
3979
+ outline: "none",
3980
+ appearance: "none",
3981
+ "&::-webkit-search-cancel-button": {
3982
+ display: "none",
3983
+ "-webkit-appearance": "none"
3984
+ }
3985
+ }
3986
+ };
3987
+ }, Al = (e) => {
3988
+ const {
3989
+ componentCls: n,
3990
+ inputPaddingHorizontalBase: o,
3991
+ iconCls: t
3992
+ } = e;
3993
+ return {
3994
+ [n]: y(y({}, rt(e)), {
3995
+ position: "relative",
3996
+ display: "inline-block",
3997
+ cursor: "pointer",
3998
+ [`&:not(${n}-customize-input) ${n}-selector`]: y(y({}, Hl(e)), Ll(e)),
3999
+ // [`&:not(&-disabled):hover ${selectCls}-selector`]: {
4000
+ // ...genHoverStyle(token),
4001
+ // },
4002
+ // ======================== Selection ========================
4003
+ [`${n}-selection-item`]: y({
4004
+ flex: 1,
4005
+ fontWeight: "normal"
4006
+ }, nt),
4007
+ // ======================= Placeholder =======================
4008
+ [`${n}-selection-placeholder`]: y(y({}, nt), {
4009
+ flex: 1,
4010
+ color: e.colorTextPlaceholder,
4011
+ pointerEvents: "none"
4012
+ }),
4013
+ // ========================== Arrow ==========================
4014
+ [`${n}-arrow`]: y(y({}, Qt()), {
4015
+ position: "absolute",
4016
+ top: "50%",
4017
+ insetInlineStart: "auto",
4018
+ insetInlineEnd: o,
4019
+ height: e.fontSizeIcon,
4020
+ marginTop: -e.fontSizeIcon / 2,
4021
+ color: e.colorTextQuaternary,
4022
+ fontSize: e.fontSizeIcon,
4023
+ lineHeight: 1,
4024
+ textAlign: "center",
4025
+ pointerEvents: "none",
4026
+ display: "flex",
4027
+ alignItems: "center",
4028
+ [t]: {
4029
+ verticalAlign: "top",
4030
+ transition: `transform ${e.motionDurationSlow}`,
4031
+ "> svg": {
4032
+ verticalAlign: "top"
4033
+ },
4034
+ [`&:not(${n}-suffix)`]: {
4035
+ pointerEvents: "auto"
4036
+ }
4037
+ },
4038
+ [`${n}-disabled &`]: {
4039
+ cursor: "not-allowed"
4040
+ },
4041
+ "> *:not(:last-child)": {
4042
+ marginInlineEnd: 8
4043
+ // FIXME: magic
4044
+ }
4045
+ }),
4046
+ // ========================== Clear ==========================
4047
+ [`${n}-clear`]: {
4048
+ position: "absolute",
4049
+ top: "50%",
4050
+ insetInlineStart: "auto",
4051
+ insetInlineEnd: o,
4052
+ zIndex: 1,
4053
+ display: "inline-block",
4054
+ width: e.fontSizeIcon,
4055
+ height: e.fontSizeIcon,
4056
+ marginTop: -e.fontSizeIcon / 2,
4057
+ color: e.colorTextQuaternary,
4058
+ fontSize: e.fontSizeIcon,
4059
+ fontStyle: "normal",
4060
+ lineHeight: 1,
4061
+ textAlign: "center",
4062
+ textTransform: "none",
4063
+ background: e.colorBgContainer,
4064
+ cursor: "pointer",
4065
+ opacity: 0,
4066
+ transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
4067
+ textRendering: "auto",
4068
+ "&:before": {
4069
+ display: "block"
4070
+ },
4071
+ "&:hover": {
4072
+ color: e.colorTextTertiary
4073
+ }
4074
+ },
4075
+ "&:hover": {
4076
+ [`${n}-clear`]: {
4077
+ opacity: 1
4078
+ }
4079
+ }
4080
+ }),
4081
+ // ========================= Feedback ==========================
4082
+ [`${n}-has-feedback`]: {
4083
+ [`${n}-clear`]: {
4084
+ insetInlineEnd: o + e.fontSize + e.paddingXXS
4085
+ }
4086
+ }
4087
+ };
4088
+ }, Bl = (e) => {
4089
+ const {
4090
+ componentCls: n
4091
+ } = e;
4092
+ return [
4093
+ {
4094
+ [n]: {
4095
+ // ==================== BorderLess ====================
4096
+ [`&-borderless ${n}-selector`]: {
4097
+ backgroundColor: "transparent !important",
4098
+ borderColor: "transparent !important",
4099
+ boxShadow: "none !important"
4100
+ },
4101
+ // ==================== In Form ====================
4102
+ [`&${n}-in-form-item`]: {
4103
+ width: "100%"
4104
+ }
4105
+ }
4106
+ },
4107
+ // =====================================================
4108
+ // == LTR ==
4109
+ // =====================================================
4110
+ // Base
4111
+ Al(e),
4112
+ // Single
4113
+ _l(e),
4114
+ // Multiple
4115
+ Vl(e),
4116
+ // Dropdown
4117
+ Nl(e),
4118
+ // =====================================================
4119
+ // == RTL ==
4120
+ // =====================================================
4121
+ {
4122
+ [`${n}-rtl`]: {
4123
+ direction: "rtl"
4124
+ }
4125
+ },
4126
+ // =====================================================
4127
+ // == Status ==
4128
+ // =====================================================
4129
+ tt(n, Se(e, {
4130
+ borderHoverColor: e.colorPrimaryHover,
4131
+ outlineColor: e.controlOutline
4132
+ })),
4133
+ tt(`${n}-status-error`, Se(e, {
4134
+ borderHoverColor: e.colorErrorHover,
4135
+ outlineColor: e.colorErrorOutline
4136
+ }), !0),
4137
+ tt(`${n}-status-warning`, Se(e, {
4138
+ borderHoverColor: e.colorWarningHover,
4139
+ outlineColor: e.colorWarningOutline
4140
+ }), !0),
4141
+ // =====================================================
4142
+ // == Space Compact ==
4143
+ // =====================================================
4144
+ Zn(e, {
4145
+ borderElCls: `${n}-selector`,
4146
+ focusElCls: `${n}-focused`
4147
+ })
4148
+ ];
4149
+ }, zl = Qn("Select", (e, n) => {
4150
+ let {
4151
+ rootPrefixCls: o
4152
+ } = n;
4153
+ const t = Se(e, {
4154
+ rootPrefixCls: o,
4155
+ inputPaddingHorizontalBase: e.paddingSM - 1
4156
+ });
4157
+ return [Bl(t)];
4158
+ }, (e) => ({
4159
+ zIndexPopup: e.zIndexPopupBase + 50
4160
+ })), Wl = () => y(y({}, Ke(cn(), ["inputIcon", "mode", "getInputElement", "getRawInputElement", "backfill"])), {
4161
+ value: Ft([Array, Object, String, Number]),
4162
+ defaultValue: Ft([Array, Object, String, Number]),
4163
+ notFoundContent: _.any,
4164
+ suffixIcon: _.any,
4165
+ itemIcon: _.any,
4166
+ size: Pe(),
4167
+ mode: Pe(),
4168
+ bordered: so(!0),
4169
+ transitionName: String,
4170
+ choiceTransitionName: Pe(""),
4171
+ popupClassName: String,
4172
+ /** @deprecated Please use `popupClassName` instead */
4173
+ dropdownClassName: String,
4174
+ placement: Pe(),
4175
+ status: Pe(),
4176
+ "onUpdate:value": ro()
4177
+ }), Ut = "SECRET_COMBOBOX_MODE_DO_NOT_USE", pe = ce({
4178
+ compatConfig: {
4179
+ MODE: 3
4180
+ },
4181
+ name: "ASelect",
4182
+ Option: vt,
4183
+ OptGroup: gt,
4184
+ inheritAttrs: !1,
4185
+ props: at(Wl(), {
4186
+ listHeight: 256,
4187
+ listItemHeight: 24
4188
+ }),
4189
+ SECRET_COMBOBOX_MODE_DO_NOT_USE: Ut,
4190
+ slots: Object,
4191
+ setup(e, n) {
4192
+ let {
4193
+ attrs: o,
4194
+ emit: t,
4195
+ slots: l,
4196
+ expose: i
4197
+ } = n;
4198
+ const u = me(), a = Jn(), f = kn.useInject(), s = D(() => wo(f.status, e.status)), r = () => {
4199
+ var P;
4200
+ (P = u.value) === null || P === void 0 || P.focus();
4201
+ }, p = () => {
4202
+ var P;
4203
+ (P = u.value) === null || P === void 0 || P.blur();
4204
+ }, g = (P) => {
4205
+ var Y;
4206
+ (Y = u.value) === null || Y === void 0 || Y.scrollTo(P);
4207
+ }, I = D(() => {
4208
+ const {
4209
+ mode: P
4210
+ } = e;
4211
+ if (P !== "combobox")
4212
+ return P === Ut ? "combobox" : P;
4213
+ });
4214
+ process.env.NODE_ENV !== "production" && eo(!e.dropdownClassName, "Select", "`dropdownClassName` is deprecated. Please use `popupClassName` instead.");
4215
+ const {
4216
+ prefixCls: b,
4217
+ direction: C,
4218
+ renderEmpty: S,
4219
+ size: x,
4220
+ getPrefixCls: R,
4221
+ getPopupContainer: F,
4222
+ disabled: O,
4223
+ select: m
4224
+ } = to("select", e), {
4225
+ compactSize: E,
4226
+ compactItemClassnames: $
4227
+ } = no(b, C), N = D(() => E.value || x.value), H = oo(), K = D(() => {
4228
+ var P;
4229
+ return (P = O.value) !== null && P !== void 0 ? P : H.value;
4230
+ }), [z, q] = zl(b), Z = D(() => R()), j = D(() => e.placement !== void 0 ? e.placement : C.value === "rtl" ? "bottomRight" : "bottomLeft"), T = D(() => lo(Z.value, io(j.value), e.transitionName)), L = D(() => se({
4231
+ [`${b.value}-lg`]: N.value === "large",
4232
+ [`${b.value}-sm`]: N.value === "small",
4233
+ [`${b.value}-rtl`]: C.value === "rtl",
4234
+ [`${b.value}-borderless`]: !e.bordered,
4235
+ [`${b.value}-in-form-item`]: f.isFormItemInput
4236
+ }, Co(b.value, s.value, f.hasFeedback), $.value, q.value)), Q = function() {
4237
+ for (var P = arguments.length, Y = new Array(P), oe = 0; oe < P; oe++)
4238
+ Y[oe] = arguments[oe];
4239
+ t("update:value", Y[0]), t("change", ...Y), a.onFieldChange();
4240
+ }, k = (P) => {
4241
+ t("blur", P), a.onFieldBlur();
4242
+ };
4243
+ i({
4244
+ blur: p,
4245
+ focus: r,
4246
+ scrollTo: g
4247
+ });
4248
+ const v = D(() => I.value === "multiple" || I.value === "tags"), A = D(() => e.showArrow !== void 0 ? e.showArrow : e.loading || !(v.value || I.value === "combobox"));
4249
+ return () => {
4250
+ var P, Y, oe, ie;
4251
+ const {
4252
+ notFoundContent: ae,
4253
+ listHeight: ne = 256,
4254
+ listItemHeight: de = 24,
4255
+ popupClassName: fe,
4256
+ dropdownClassName: h,
4257
+ virtual: c,
4258
+ dropdownMatchSelectWidth: d,
4259
+ id: V = a.id.value,
4260
+ placeholder: M = (P = l.placeholder) === null || P === void 0 ? void 0 : P.call(l),
4261
+ showArrow: B
4262
+ } = e, {
4263
+ hasFeedback: X,
4264
+ feedbackIcon: J
4265
+ } = f;
4266
+ let te;
4267
+ ae !== void 0 ? te = ae : l.notFoundContent ? te = l.notFoundContent() : I.value === "combobox" ? te = null : te = (S == null ? void 0 : S("Select")) || w(ao, {
4268
+ componentName: "Select"
4269
+ }, null);
4270
+ const {
4271
+ suffixIcon: ee,
4272
+ itemIcon: re,
4273
+ removeIcon: ue,
4274
+ clearIcon: _e
4275
+ } = Dl(y(y({}, e), {
4276
+ multiple: v.value,
4277
+ prefixCls: b.value,
4278
+ hasFeedback: X,
4279
+ feedbackIcon: J,
4280
+ showArrow: A.value
4281
+ }), l), He = Ke(e, ["prefixCls", "suffixIcon", "itemIcon", "removeIcon", "clearIcon", "size", "bordered", "status"]), Ee = se(fe || h, {
4282
+ [`${b.value}-dropdown-${C.value}`]: C.value === "rtl"
4283
+ }, q.value);
4284
+ return z(w(Pl, U(U(U({
4285
+ ref: u,
4286
+ virtual: c,
4287
+ dropdownMatchSelectWidth: d
4288
+ }, He), o), {}, {
4289
+ showSearch: (Y = e.showSearch) !== null && Y !== void 0 ? Y : (oe = m == null ? void 0 : m.value) === null || oe === void 0 ? void 0 : oe.showSearch,
4290
+ placeholder: M,
4291
+ listHeight: ne,
4292
+ listItemHeight: de,
4293
+ mode: I.value,
4294
+ prefixCls: b.value,
4295
+ direction: C.value,
4296
+ inputIcon: ee,
4297
+ menuItemSelectedIcon: re,
4298
+ removeIcon: ue,
4299
+ clearIcon: _e,
4300
+ notFoundContent: te,
4301
+ class: [L.value, o.class],
4302
+ getPopupContainer: F == null ? void 0 : F.value,
4303
+ dropdownClassName: Ee,
4304
+ onChange: Q,
4305
+ onBlur: k,
4306
+ id: V,
4307
+ dropdownRender: He.dropdownRender || l.dropdownRender,
4308
+ transitionName: T.value,
4309
+ children: (ie = l.default) === null || ie === void 0 ? void 0 : ie.call(l),
4310
+ tagRender: e.tagRender || l.tagRender,
4311
+ optionLabelRender: l.optionLabel,
4312
+ maxTagPlaceholder: e.maxTagPlaceholder || l.maxTagPlaceholder,
4313
+ showArrow: X || B,
4314
+ disabled: K.value
4315
+ }), {
4316
+ option: l.option
4317
+ }));
4318
+ };
4319
+ }
4320
+ });
4321
+ pe.install = function(e) {
4322
+ return e.component(pe.name, pe), e.component(pe.Option.displayName, pe.Option), e.component(pe.OptGroup.displayName, pe.OptGroup), e;
4323
+ };
4324
+ const Kl = pe.Option;
4325
+ pe.OptGroup;
4326
+ const jl = {
4327
+ name: "ZSelect",
4328
+ components: {
4329
+ ASelect: pe,
4330
+ ASelectOption: Kl
4331
+ }
4332
+ }, Ul = /* @__PURE__ */ Object.assign(jl, {
4333
+ props: /* @__PURE__ */ Ln({
4334
+ data: {
4335
+ type: Array,
4336
+ default: () => []
4337
+ }
4338
+ }, {
4339
+ modelValue: {},
4340
+ modelModifiers: {}
4341
+ }),
4342
+ emits: ["update:modelValue"],
4343
+ setup(e) {
4344
+ const n = An(e, "modelValue"), o = e;
4345
+ return (t, l) => {
4346
+ const i = Mt("a-select-option"), u = Mt("a-select");
4347
+ return Qe(), Et(u, Bn({
4348
+ value: n.value,
4349
+ "onUpdate:value": l[0] || (l[0] = (a) => n.value = a),
4350
+ class: "z-select"
4351
+ }, t.$attrs), {
4352
+ default: Tt(() => [
4353
+ (Qe(!0), zn($e, null, Wn(o == null ? void 0 : o.data, (a) => (Qe(), Et(i, {
4354
+ key: a == null ? void 0 : a.value,
4355
+ value: a.value
4356
+ }, {
4357
+ default: Tt(() => [
4358
+ ze(Kn(a.label), 1)
4359
+ ]),
4360
+ _: 2
4361
+ }, 1032, ["value"]))), 128))
4362
+ ]),
4363
+ _: 1
4364
+ }, 16, ["value"]);
4365
+ };
4366
+ }
4367
+ }), ri = /* @__PURE__ */ uo(Ul, [["__scopeId", "data-v-562fa124"]]);
4368
+ export {
4369
+ ri as default
4370
+ };