@yqg/permission 1.1.3-beta.0 → 1.2.0

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