@amateescu/portal-ui-components 0.0.13-beta0 → 0.0.13-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3761 @@
1
+ import { jsx as he, jsxs as Ft } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import gt, { useRef as Ie, forwardRef as De, useImperativeHandle as ft, useContext as Ke, useState as Ze, useEffect as Te, createContext as qt } from "react";
4
+ import Gt from "./utils/cn.js";
5
+ import { a as Ee } from "./objectWithoutPropertiesLoose-CIT-1_kH.js";
6
+ import { I as He, D as Yt, K as re, R as Ae, a1 as Ut, g as le, m as ae, s as ge, u as B, a2 as Kt, C as J, z as Zt, r as fe, y as Pe, c as M, k as Qt, b as Jt, _ as Qe, p as Le, q as vt, h as eo, t as ke, o as ve, a9 as to, j as oo, aa as no, v as ro, A as Je, ab as io, ac as et, i as bt, ad as ao, x as tt } from "./useId-D0OLY2mt.js";
7
+ import { R as lo, T as so, c as co, M as uo, a as ye, u as mo, S as po, E as go, b as ht, d as fo, s as vo, e as bo, f as ho, g as $o, D as Co } from "./EllipsisOutlined-Cm0_b9Em.js";
8
+ import { i as Be, C as $t, d as yo, u as Ve, e as se, z as Ct, g as wo, f as xo, h as So, j as Oo, B as ot } from "./PurePanel-CEtW2cn_.js";
9
+ import './assets/UserInfoDropdown.css';const pe = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
10
+ function Io(e, t) {
11
+ return pe.reduce((o, n) => {
12
+ const r = e[`${n}1`], l = e[`${n}3`], i = e[`${n}6`], c = e[`${n}7`];
13
+ return Object.assign(Object.assign({}, o), t(n, {
14
+ lightColor: r,
15
+ lightBorderColor: l,
16
+ darkColor: i,
17
+ textColor: c
18
+ }));
19
+ }, {});
20
+ }
21
+ var Eo = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" }, Po = function(t, o) {
22
+ return /* @__PURE__ */ a.createElement(He, Ee({}, t, {
23
+ ref: o,
24
+ icon: Eo
25
+ }));
26
+ }, we = /* @__PURE__ */ a.forwardRef(Po);
27
+ process.env.NODE_ENV !== "production" && (we.displayName = "RightOutlined");
28
+ const Bo = (e) => ({
29
+ [e.componentCls]: {
30
+ // For common/openAnimation
31
+ [`${e.antCls}-motion-collapse-legacy`]: {
32
+ overflow: "hidden",
33
+ "&-active": {
34
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
35
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
36
+ }
37
+ },
38
+ [`${e.antCls}-motion-collapse`]: {
39
+ overflow: "hidden",
40
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
41
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
42
+ }
43
+ }
44
+ }), No = new re("antMoveDownIn", {
45
+ "0%": {
46
+ transform: "translate3d(0, 100%, 0)",
47
+ transformOrigin: "0 0",
48
+ opacity: 0
49
+ },
50
+ "100%": {
51
+ transform: "translate3d(0, 0, 0)",
52
+ transformOrigin: "0 0",
53
+ opacity: 1
54
+ }
55
+ }), zo = new re("antMoveDownOut", {
56
+ "0%": {
57
+ transform: "translate3d(0, 0, 0)",
58
+ transformOrigin: "0 0",
59
+ opacity: 1
60
+ },
61
+ "100%": {
62
+ transform: "translate3d(0, 100%, 0)",
63
+ transformOrigin: "0 0",
64
+ opacity: 0
65
+ }
66
+ }), jo = new re("antMoveLeftIn", {
67
+ "0%": {
68
+ transform: "translate3d(-100%, 0, 0)",
69
+ transformOrigin: "0 0",
70
+ opacity: 0
71
+ },
72
+ "100%": {
73
+ transform: "translate3d(0, 0, 0)",
74
+ transformOrigin: "0 0",
75
+ opacity: 1
76
+ }
77
+ }), To = new re("antMoveLeftOut", {
78
+ "0%": {
79
+ transform: "translate3d(0, 0, 0)",
80
+ transformOrigin: "0 0",
81
+ opacity: 1
82
+ },
83
+ "100%": {
84
+ transform: "translate3d(-100%, 0, 0)",
85
+ transformOrigin: "0 0",
86
+ opacity: 0
87
+ }
88
+ }), _o = new re("antMoveRightIn", {
89
+ "0%": {
90
+ transform: "translate3d(100%, 0, 0)",
91
+ transformOrigin: "0 0",
92
+ opacity: 0
93
+ },
94
+ "100%": {
95
+ transform: "translate3d(0, 0, 0)",
96
+ transformOrigin: "0 0",
97
+ opacity: 1
98
+ }
99
+ }), Ro = new re("antMoveRightOut", {
100
+ "0%": {
101
+ transform: "translate3d(0, 0, 0)",
102
+ transformOrigin: "0 0",
103
+ opacity: 1
104
+ },
105
+ "100%": {
106
+ transform: "translate3d(100%, 0, 0)",
107
+ transformOrigin: "0 0",
108
+ opacity: 0
109
+ }
110
+ }), Mo = new re("antMoveUpIn", {
111
+ "0%": {
112
+ transform: "translate3d(0, -100%, 0)",
113
+ transformOrigin: "0 0",
114
+ opacity: 0
115
+ },
116
+ "100%": {
117
+ transform: "translate3d(0, 0, 0)",
118
+ transformOrigin: "0 0",
119
+ opacity: 1
120
+ }
121
+ }), Do = new re("antMoveUpOut", {
122
+ "0%": {
123
+ transform: "translate3d(0, 0, 0)",
124
+ transformOrigin: "0 0",
125
+ opacity: 1
126
+ },
127
+ "100%": {
128
+ transform: "translate3d(0, -100%, 0)",
129
+ transformOrigin: "0 0",
130
+ opacity: 0
131
+ }
132
+ }), Ho = {
133
+ "move-up": {
134
+ inKeyframes: Mo,
135
+ outKeyframes: Do
136
+ },
137
+ "move-down": {
138
+ inKeyframes: No,
139
+ outKeyframes: zo
140
+ },
141
+ "move-left": {
142
+ inKeyframes: jo,
143
+ outKeyframes: To
144
+ },
145
+ "move-right": {
146
+ inKeyframes: _o,
147
+ outKeyframes: Ro
148
+ }
149
+ }, nt = (e, t) => {
150
+ const {
151
+ antCls: o
152
+ } = e, n = `${o}-${t}`, {
153
+ inKeyframes: r,
154
+ outKeyframes: l
155
+ } = Ho[t];
156
+ return [Yt(n, r, l, e.motionDurationMid), {
157
+ [`
158
+ ${n}-enter,
159
+ ${n}-appear
160
+ `]: {
161
+ opacity: 0,
162
+ animationTimingFunction: e.motionEaseOutCirc
163
+ },
164
+ [`${n}-leave`]: {
165
+ animationTimingFunction: e.motionEaseInOutCirc
166
+ }
167
+ }];
168
+ }, yt = ["xxl", "xl", "lg", "md", "sm", "xs"], Ao = (e) => ({
169
+ xs: `(max-width: ${e.screenXSMax}px)`,
170
+ sm: `(min-width: ${e.screenSM}px)`,
171
+ md: `(min-width: ${e.screenMD}px)`,
172
+ lg: `(min-width: ${e.screenLG}px)`,
173
+ xl: `(min-width: ${e.screenXL}px)`,
174
+ xxl: `(min-width: ${e.screenXXL}px)`
175
+ }), Lo = (e) => {
176
+ const t = e, o = [].concat(yt).reverse();
177
+ return o.forEach((n, r) => {
178
+ const l = n.toUpperCase(), i = `screen${l}Min`, c = `screen${l}`;
179
+ if (!(t[i] <= t[c]))
180
+ throw new Error(`${i}<=${c} fails : !(${t[i]}<=${t[c]})`);
181
+ if (r < o.length - 1) {
182
+ const s = `screen${l}Max`;
183
+ if (!(t[c] <= t[s]))
184
+ throw new Error(`${c}<=${s} fails : !(${t[c]}<=${t[s]})`);
185
+ const u = `screen${o[r + 1].toUpperCase()}Min`;
186
+ if (!(t[s] <= t[u]))
187
+ throw new Error(`${s}<=${u} fails : !(${t[s]}<=${t[u]})`);
188
+ }
189
+ }), e;
190
+ };
191
+ function ko() {
192
+ const [, e] = Ae(), t = Ao(Lo(e));
193
+ return gt.useMemo(() => {
194
+ const o = /* @__PURE__ */ new Map();
195
+ let n = -1, r = {};
196
+ return {
197
+ matchHandlers: {},
198
+ dispatch(l) {
199
+ return r = l, o.forEach((i) => i(r)), o.size >= 1;
200
+ },
201
+ subscribe(l) {
202
+ return o.size || this.register(), n += 1, o.set(n, l), l(r), n;
203
+ },
204
+ unsubscribe(l) {
205
+ o.delete(l), o.size || this.unregister();
206
+ },
207
+ unregister() {
208
+ Object.keys(t).forEach((l) => {
209
+ const i = t[l], c = this.matchHandlers[i];
210
+ c == null || c.mql.removeListener(c == null ? void 0 : c.listener);
211
+ }), o.clear();
212
+ },
213
+ register() {
214
+ Object.keys(t).forEach((l) => {
215
+ const i = t[l], c = (d) => {
216
+ let {
217
+ matches: u
218
+ } = d;
219
+ this.dispatch(Object.assign(Object.assign({}, r), {
220
+ [l]: u
221
+ }));
222
+ }, s = window.matchMedia(i);
223
+ s.addListener(c), this.matchHandlers[i] = {
224
+ mql: s,
225
+ listener: c
226
+ }, c(s);
227
+ });
228
+ },
229
+ responsiveMap: t
230
+ };
231
+ }, [e]);
232
+ }
233
+ function Vo() {
234
+ const [, e] = a.useReducer((t) => t + 1, 0);
235
+ return e;
236
+ }
237
+ function Wo() {
238
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
239
+ const t = Ie({}), o = Vo(), n = ko();
240
+ return Ut(() => {
241
+ const r = n.subscribe((l) => {
242
+ t.current = l, e && o();
243
+ });
244
+ return () => n.unsubscribe(r);
245
+ }, []), t.current;
246
+ }
247
+ const Re = /* @__PURE__ */ a.createContext({}), Xo = (e) => {
248
+ const {
249
+ antCls: t,
250
+ componentCls: o,
251
+ iconCls: n,
252
+ avatarBg: r,
253
+ avatarColor: l,
254
+ containerSize: i,
255
+ containerSizeLG: c,
256
+ containerSizeSM: s,
257
+ textFontSize: d,
258
+ textFontSizeLG: u,
259
+ textFontSizeSM: p,
260
+ borderRadius: m,
261
+ borderRadiusLG: f,
262
+ borderRadiusSM: g,
263
+ lineWidth: v,
264
+ lineType: C
265
+ } = e, b = (w, x, y) => ({
266
+ width: w,
267
+ height: w,
268
+ borderRadius: "50%",
269
+ [`&${o}-square`]: {
270
+ borderRadius: y
271
+ },
272
+ [`&${o}-icon`]: {
273
+ fontSize: x,
274
+ [`> ${n}`]: {
275
+ margin: 0
276
+ }
277
+ }
278
+ });
279
+ return {
280
+ [o]: Object.assign(Object.assign(Object.assign(Object.assign({}, ge(e)), {
281
+ position: "relative",
282
+ display: "inline-flex",
283
+ justifyContent: "center",
284
+ alignItems: "center",
285
+ overflow: "hidden",
286
+ color: l,
287
+ whiteSpace: "nowrap",
288
+ textAlign: "center",
289
+ verticalAlign: "middle",
290
+ background: r,
291
+ border: `${B(v)} ${C} transparent`,
292
+ "&-image": {
293
+ background: "transparent"
294
+ },
295
+ [`${t}-image-img`]: {
296
+ display: "block"
297
+ }
298
+ }), b(i, d, m)), {
299
+ "&-lg": Object.assign({}, b(c, u, f)),
300
+ "&-sm": Object.assign({}, b(s, p, g)),
301
+ "> img": {
302
+ display: "block",
303
+ width: "100%",
304
+ height: "100%",
305
+ objectFit: "cover"
306
+ }
307
+ })
308
+ };
309
+ }, Fo = (e) => {
310
+ const {
311
+ componentCls: t,
312
+ groupBorderColor: o,
313
+ groupOverlapping: n,
314
+ groupSpace: r
315
+ } = e;
316
+ return {
317
+ [`${t}-group`]: {
318
+ display: "inline-flex",
319
+ [t]: {
320
+ borderColor: o
321
+ },
322
+ "> *:not(:first-child)": {
323
+ marginInlineStart: n
324
+ }
325
+ },
326
+ [`${t}-group-popover`]: {
327
+ [`${t} + ${t}`]: {
328
+ marginInlineStart: r
329
+ }
330
+ }
331
+ };
332
+ }, qo = (e) => {
333
+ const {
334
+ controlHeight: t,
335
+ controlHeightLG: o,
336
+ controlHeightSM: n,
337
+ fontSize: r,
338
+ fontSizeLG: l,
339
+ fontSizeXL: i,
340
+ fontSizeHeading3: c,
341
+ marginXS: s,
342
+ marginXXS: d,
343
+ colorBorderBg: u
344
+ } = e;
345
+ return {
346
+ containerSize: t,
347
+ containerSizeLG: o,
348
+ containerSizeSM: n,
349
+ textFontSize: Math.round((l + i) / 2),
350
+ textFontSizeLG: c,
351
+ textFontSizeSM: r,
352
+ groupSpace: d,
353
+ groupOverlapping: -s,
354
+ groupBorderColor: u
355
+ };
356
+ }, wt = le("Avatar", (e) => {
357
+ const {
358
+ colorTextLightSolid: t,
359
+ colorTextPlaceholder: o
360
+ } = e, n = ae(e, {
361
+ avatarBg: o,
362
+ avatarColor: t
363
+ });
364
+ return [Xo(n), Fo(n)];
365
+ }, qo);
366
+ var Go = function(e, t) {
367
+ var o = {};
368
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
369
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
370
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
371
+ return o;
372
+ };
373
+ const Yo = (e, t) => {
374
+ const [o, n] = a.useState(1), [r, l] = a.useState(!1), [i, c] = a.useState(!0), s = a.useRef(null), d = a.useRef(null), u = Kt(t, s), {
375
+ getPrefixCls: p,
376
+ avatar: m
377
+ } = a.useContext(J), f = a.useContext(Re), g = () => {
378
+ if (!d.current || !s.current)
379
+ return;
380
+ const A = d.current.offsetWidth, W = s.current.offsetWidth;
381
+ if (A !== 0 && W !== 0) {
382
+ const {
383
+ gap: U = 4
384
+ } = e;
385
+ U * 2 < W && n(W - U * 2 < A ? (W - U * 2) / A : 1);
386
+ }
387
+ };
388
+ a.useEffect(() => {
389
+ l(!0);
390
+ }, []), a.useEffect(() => {
391
+ c(!0), n(1);
392
+ }, [e.src]), a.useEffect(g, [e.gap]);
393
+ const v = () => {
394
+ const {
395
+ onError: A
396
+ } = e;
397
+ (A == null ? void 0 : A()) !== !1 && c(!1);
398
+ }, {
399
+ prefixCls: C,
400
+ shape: b,
401
+ size: w,
402
+ src: x,
403
+ srcSet: y,
404
+ icon: O,
405
+ className: j,
406
+ rootClassName: T,
407
+ alt: _,
408
+ draggable: h,
409
+ children: E,
410
+ crossOrigin: z
411
+ } = e, P = Go(e, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "alt", "draggable", "children", "crossOrigin"]), I = Zt((A) => {
412
+ var W, U;
413
+ return (U = (W = w ?? (f == null ? void 0 : f.size)) !== null && W !== void 0 ? W : A) !== null && U !== void 0 ? U : "default";
414
+ }), $ = Object.keys(typeof I == "object" ? I || {} : {}).some((A) => ["xs", "sm", "md", "lg", "xl", "xxl"].includes(A)), D = Wo($), k = a.useMemo(() => {
415
+ if (typeof I != "object")
416
+ return {};
417
+ const A = yt.find((U) => D[U]), W = I[A];
418
+ return W ? {
419
+ width: W,
420
+ height: W,
421
+ fontSize: W && (O || E) ? W / 2 : 18
422
+ } : {};
423
+ }, [D, I]);
424
+ if (process.env.NODE_ENV !== "production") {
425
+ const A = fe("Avatar");
426
+ process.env.NODE_ENV !== "production" && A(!(typeof O == "string" && O.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${O}\` at https://ant.design/components/icon`);
427
+ }
428
+ const S = p("avatar", C), N = Pe(S), [R, V, Z] = wt(S, N), H = M({
429
+ [`${S}-lg`]: I === "large",
430
+ [`${S}-sm`]: I === "small"
431
+ }), X = /* @__PURE__ */ a.isValidElement(x), q = b || (f == null ? void 0 : f.shape) || "circle", Y = M(S, H, m == null ? void 0 : m.className, `${S}-${q}`, {
432
+ [`${S}-image`]: X || x && i,
433
+ [`${S}-icon`]: !!O
434
+ }, Z, N, j, T, V), F = typeof I == "number" ? {
435
+ width: I,
436
+ height: I,
437
+ fontSize: O ? I / 2 : 18
438
+ } : {};
439
+ let K;
440
+ if (typeof x == "string" && i)
441
+ K = /* @__PURE__ */ a.createElement("img", {
442
+ src: x,
443
+ draggable: h,
444
+ srcSet: y,
445
+ onError: v,
446
+ alt: _,
447
+ crossOrigin: z
448
+ });
449
+ else if (X)
450
+ K = x;
451
+ else if (O)
452
+ K = O;
453
+ else if (r || o !== 1) {
454
+ const A = `scale(${o})`, W = {
455
+ msTransform: A,
456
+ WebkitTransform: A,
457
+ transform: A
458
+ };
459
+ K = /* @__PURE__ */ a.createElement(lo, {
460
+ onResize: g
461
+ }, /* @__PURE__ */ a.createElement("span", {
462
+ className: `${S}-string`,
463
+ ref: d,
464
+ style: Object.assign({}, W)
465
+ }, E));
466
+ } else
467
+ K = /* @__PURE__ */ a.createElement("span", {
468
+ className: `${S}-string`,
469
+ style: {
470
+ opacity: 0
471
+ },
472
+ ref: d
473
+ }, E);
474
+ return delete P.onError, delete P.gap, R(/* @__PURE__ */ a.createElement("span", Object.assign({}, P, {
475
+ style: Object.assign(Object.assign(Object.assign(Object.assign({}, F), k), m == null ? void 0 : m.style), P.style),
476
+ className: Y,
477
+ ref: u
478
+ }), K));
479
+ }, We = /* @__PURE__ */ a.forwardRef(Yo);
480
+ process.env.NODE_ENV !== "production" && (We.displayName = "Avatar");
481
+ const xe = (e) => e ? typeof e == "function" ? e() : e : null;
482
+ function Xe(e) {
483
+ var t = e.children, o = e.prefixCls, n = e.id, r = e.overlayInnerStyle, l = e.className, i = e.style;
484
+ return /* @__PURE__ */ a.createElement("div", {
485
+ className: M("".concat(o, "-content"), l),
486
+ style: i
487
+ }, /* @__PURE__ */ a.createElement("div", {
488
+ className: "".concat(o, "-inner"),
489
+ id: n,
490
+ role: "tooltip",
491
+ style: r
492
+ }, typeof t == "function" ? t() : t));
493
+ }
494
+ var ce = {
495
+ shiftX: 64,
496
+ adjustY: 1
497
+ }, de = {
498
+ adjustX: 1,
499
+ shiftY: !0
500
+ }, Q = [0, 0], Uo = {
501
+ left: {
502
+ points: ["cr", "cl"],
503
+ overflow: de,
504
+ offset: [-4, 0],
505
+ targetOffset: Q
506
+ },
507
+ right: {
508
+ points: ["cl", "cr"],
509
+ overflow: de,
510
+ offset: [4, 0],
511
+ targetOffset: Q
512
+ },
513
+ top: {
514
+ points: ["bc", "tc"],
515
+ overflow: ce,
516
+ offset: [0, -4],
517
+ targetOffset: Q
518
+ },
519
+ bottom: {
520
+ points: ["tc", "bc"],
521
+ overflow: ce,
522
+ offset: [0, 4],
523
+ targetOffset: Q
524
+ },
525
+ topLeft: {
526
+ points: ["bl", "tl"],
527
+ overflow: ce,
528
+ offset: [0, -4],
529
+ targetOffset: Q
530
+ },
531
+ leftTop: {
532
+ points: ["tr", "tl"],
533
+ overflow: de,
534
+ offset: [-4, 0],
535
+ targetOffset: Q
536
+ },
537
+ topRight: {
538
+ points: ["br", "tr"],
539
+ overflow: ce,
540
+ offset: [0, -4],
541
+ targetOffset: Q
542
+ },
543
+ rightTop: {
544
+ points: ["tl", "tr"],
545
+ overflow: de,
546
+ offset: [4, 0],
547
+ targetOffset: Q
548
+ },
549
+ bottomRight: {
550
+ points: ["tr", "br"],
551
+ overflow: ce,
552
+ offset: [0, 4],
553
+ targetOffset: Q
554
+ },
555
+ rightBottom: {
556
+ points: ["bl", "br"],
557
+ overflow: de,
558
+ offset: [4, 0],
559
+ targetOffset: Q
560
+ },
561
+ bottomLeft: {
562
+ points: ["tl", "bl"],
563
+ overflow: ce,
564
+ offset: [0, 4],
565
+ targetOffset: Q
566
+ },
567
+ leftBottom: {
568
+ points: ["br", "bl"],
569
+ overflow: de,
570
+ offset: [-4, 0],
571
+ targetOffset: Q
572
+ }
573
+ }, Ko = ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle", "arrowContent", "overlay", "id", "showArrow"], Zo = function(t, o) {
574
+ var n = t.overlayClassName, r = t.trigger, l = r === void 0 ? ["hover"] : r, i = t.mouseEnterDelay, c = i === void 0 ? 0 : i, s = t.mouseLeaveDelay, d = s === void 0 ? 0.1 : s, u = t.overlayStyle, p = t.prefixCls, m = p === void 0 ? "rc-tooltip" : p, f = t.children, g = t.onVisibleChange, v = t.afterVisibleChange, C = t.transitionName, b = t.animation, w = t.motion, x = t.placement, y = x === void 0 ? "right" : x, O = t.align, j = O === void 0 ? {} : O, T = t.destroyTooltipOnHide, _ = T === void 0 ? !1 : T, h = t.defaultVisible, E = t.getTooltipContainer, z = t.overlayInnerStyle;
575
+ t.arrowContent;
576
+ var P = t.overlay, I = t.id, $ = t.showArrow, D = $ === void 0 ? !0 : $, k = Qt(t, Ko), S = Ie(null);
577
+ ft(o, function() {
578
+ return S.current;
579
+ });
580
+ var N = Jt({}, k);
581
+ "visible" in t && (N.popupVisible = t.visible);
582
+ var R = function() {
583
+ return /* @__PURE__ */ a.createElement(Xe, {
584
+ key: "content",
585
+ prefixCls: m,
586
+ id: I,
587
+ overlayInnerStyle: z
588
+ }, P);
589
+ };
590
+ return /* @__PURE__ */ a.createElement(so, Ee({
591
+ popupClassName: n,
592
+ prefixCls: m,
593
+ popup: R,
594
+ action: l,
595
+ builtinPlacements: Uo,
596
+ popupPlacement: y,
597
+ ref: S,
598
+ popupAlign: j,
599
+ getPopupContainer: E,
600
+ onPopupVisibleChange: g,
601
+ afterPopupVisibleChange: v,
602
+ popupTransitionName: C,
603
+ popupAnimation: b,
604
+ popupMotion: w,
605
+ defaultPopupVisible: h,
606
+ autoDestroy: _,
607
+ mouseLeaveDelay: d,
608
+ popupStyle: u,
609
+ mouseEnterDelay: c,
610
+ arrow: D
611
+ }, N), f);
612
+ };
613
+ const Qo = /* @__PURE__ */ De(Zo);
614
+ function Fe(e) {
615
+ const {
616
+ sizePopupArrow: t,
617
+ borderRadiusXS: o,
618
+ borderRadiusOuter: n
619
+ } = e, r = t / 2, l = 0, i = r, c = n * 1 / Math.sqrt(2), s = r - n * (1 - 1 / Math.sqrt(2)), d = r - o * (1 / Math.sqrt(2)), u = n * (Math.sqrt(2) - 1) + o * (1 / Math.sqrt(2)), p = 2 * r - d, m = u, f = 2 * r - c, g = s, v = 2 * r - l, C = i, b = r * Math.sqrt(2) + n * (Math.sqrt(2) - 2), w = n * (Math.sqrt(2) - 1), x = `polygon(${w}px 100%, 50% ${w}px, ${2 * r - w}px 100%, ${w}px 100%)`, y = `path('M ${l} ${i} A ${n} ${n} 0 0 0 ${c} ${s} L ${d} ${u} A ${o} ${o} 0 0 1 ${p} ${m} L ${f} ${g} A ${n} ${n} 0 0 0 ${v} ${C} Z')`;
620
+ return {
621
+ arrowShadowWidth: b,
622
+ arrowPath: y,
623
+ arrowPolygon: x
624
+ };
625
+ }
626
+ const Jo = (e, t, o) => {
627
+ const {
628
+ sizePopupArrow: n,
629
+ arrowPolygon: r,
630
+ arrowPath: l,
631
+ arrowShadowWidth: i,
632
+ borderRadiusXS: c,
633
+ calc: s
634
+ } = e;
635
+ return {
636
+ pointerEvents: "none",
637
+ width: n,
638
+ height: n,
639
+ overflow: "hidden",
640
+ "&::before": {
641
+ position: "absolute",
642
+ bottom: 0,
643
+ insetInlineStart: 0,
644
+ width: n,
645
+ height: s(n).div(2).equal(),
646
+ background: t,
647
+ clipPath: {
648
+ _multi_value_: !0,
649
+ value: [r, l]
650
+ },
651
+ content: '""'
652
+ },
653
+ "&::after": {
654
+ content: '""',
655
+ position: "absolute",
656
+ width: i,
657
+ height: i,
658
+ bottom: 0,
659
+ insetInline: 0,
660
+ margin: "auto",
661
+ borderRadius: {
662
+ _skip_check_: !0,
663
+ value: `0 0 ${B(c)} 0`
664
+ },
665
+ transform: "translateY(50%) rotate(-135deg)",
666
+ boxShadow: o,
667
+ zIndex: 0,
668
+ background: "transparent"
669
+ }
670
+ };
671
+ }, xt = 8;
672
+ function Ne(e) {
673
+ const {
674
+ contentRadius: t,
675
+ limitVerticalRadius: o
676
+ } = e, n = t > 12 ? t + 2 : 12;
677
+ return {
678
+ arrowOffsetHorizontal: n,
679
+ arrowOffsetVertical: o ? xt : n
680
+ };
681
+ }
682
+ function $e(e, t) {
683
+ return e ? t : {};
684
+ }
685
+ function qe(e, t, o) {
686
+ const {
687
+ componentCls: n,
688
+ boxShadowPopoverArrow: r,
689
+ arrowOffsetVertical: l,
690
+ arrowOffsetHorizontal: i
691
+ } = e, {
692
+ arrowDistance: c = 0,
693
+ arrowPlacement: s = {
694
+ left: !0,
695
+ right: !0,
696
+ top: !0,
697
+ bottom: !0
698
+ }
699
+ } = o || {};
700
+ return {
701
+ [n]: Object.assign(Object.assign(Object.assign(Object.assign({
702
+ // ============================ Basic ============================
703
+ [`${n}-arrow`]: [Object.assign(Object.assign({
704
+ position: "absolute",
705
+ zIndex: 1,
706
+ display: "block"
707
+ }, Jo(e, t, r)), {
708
+ "&:before": {
709
+ background: t
710
+ }
711
+ })]
712
+ }, $e(!!s.top, {
713
+ [[`&-placement-top > ${n}-arrow`, `&-placement-topLeft > ${n}-arrow`, `&-placement-topRight > ${n}-arrow`].join(",")]: {
714
+ bottom: c,
715
+ transform: "translateY(100%) rotate(180deg)"
716
+ },
717
+ [`&-placement-top > ${n}-arrow`]: {
718
+ left: {
719
+ _skip_check_: !0,
720
+ value: "50%"
721
+ },
722
+ transform: "translateX(-50%) translateY(100%) rotate(180deg)"
723
+ },
724
+ "&-placement-topLeft": {
725
+ "--arrow-offset-horizontal": i,
726
+ [`> ${n}-arrow`]: {
727
+ left: {
728
+ _skip_check_: !0,
729
+ value: i
730
+ }
731
+ }
732
+ },
733
+ "&-placement-topRight": {
734
+ "--arrow-offset-horizontal": `calc(100% - ${B(i)})`,
735
+ [`> ${n}-arrow`]: {
736
+ right: {
737
+ _skip_check_: !0,
738
+ value: i
739
+ }
740
+ }
741
+ }
742
+ })), $e(!!s.bottom, {
743
+ [[`&-placement-bottom > ${n}-arrow`, `&-placement-bottomLeft > ${n}-arrow`, `&-placement-bottomRight > ${n}-arrow`].join(",")]: {
744
+ top: c,
745
+ transform: "translateY(-100%)"
746
+ },
747
+ [`&-placement-bottom > ${n}-arrow`]: {
748
+ left: {
749
+ _skip_check_: !0,
750
+ value: "50%"
751
+ },
752
+ transform: "translateX(-50%) translateY(-100%)"
753
+ },
754
+ "&-placement-bottomLeft": {
755
+ "--arrow-offset-horizontal": i,
756
+ [`> ${n}-arrow`]: {
757
+ left: {
758
+ _skip_check_: !0,
759
+ value: i
760
+ }
761
+ }
762
+ },
763
+ "&-placement-bottomRight": {
764
+ "--arrow-offset-horizontal": `calc(100% - ${B(i)})`,
765
+ [`> ${n}-arrow`]: {
766
+ right: {
767
+ _skip_check_: !0,
768
+ value: i
769
+ }
770
+ }
771
+ }
772
+ })), $e(!!s.left, {
773
+ [[`&-placement-left > ${n}-arrow`, `&-placement-leftTop > ${n}-arrow`, `&-placement-leftBottom > ${n}-arrow`].join(",")]: {
774
+ right: {
775
+ _skip_check_: !0,
776
+ value: c
777
+ },
778
+ transform: "translateX(100%) rotate(90deg)"
779
+ },
780
+ [`&-placement-left > ${n}-arrow`]: {
781
+ top: {
782
+ _skip_check_: !0,
783
+ value: "50%"
784
+ },
785
+ transform: "translateY(-50%) translateX(100%) rotate(90deg)"
786
+ },
787
+ [`&-placement-leftTop > ${n}-arrow`]: {
788
+ top: l
789
+ },
790
+ [`&-placement-leftBottom > ${n}-arrow`]: {
791
+ bottom: l
792
+ }
793
+ })), $e(!!s.right, {
794
+ [[`&-placement-right > ${n}-arrow`, `&-placement-rightTop > ${n}-arrow`, `&-placement-rightBottom > ${n}-arrow`].join(",")]: {
795
+ left: {
796
+ _skip_check_: !0,
797
+ value: c
798
+ },
799
+ transform: "translateX(-100%) rotate(-90deg)"
800
+ },
801
+ [`&-placement-right > ${n}-arrow`]: {
802
+ top: {
803
+ _skip_check_: !0,
804
+ value: "50%"
805
+ },
806
+ transform: "translateY(-50%) translateX(-100%) rotate(-90deg)"
807
+ },
808
+ [`&-placement-rightTop > ${n}-arrow`]: {
809
+ top: l
810
+ },
811
+ [`&-placement-rightBottom > ${n}-arrow`]: {
812
+ bottom: l
813
+ }
814
+ }))
815
+ };
816
+ }
817
+ function en(e, t, o, n) {
818
+ if (n === !1)
819
+ return {
820
+ adjustX: !1,
821
+ adjustY: !1
822
+ };
823
+ const r = n && typeof n == "object" ? n : {}, l = {};
824
+ switch (e) {
825
+ case "top":
826
+ case "bottom":
827
+ l.shiftX = t.arrowOffsetHorizontal * 2 + o, l.shiftY = !0, l.adjustY = !0;
828
+ break;
829
+ case "left":
830
+ case "right":
831
+ l.shiftY = t.arrowOffsetVertical * 2 + o, l.shiftX = !0, l.adjustX = !0;
832
+ break;
833
+ }
834
+ const i = Object.assign(Object.assign({}, l), r);
835
+ return i.shiftX || (i.adjustX = !0), i.shiftY || (i.adjustY = !0), i;
836
+ }
837
+ const rt = {
838
+ left: {
839
+ points: ["cr", "cl"]
840
+ },
841
+ right: {
842
+ points: ["cl", "cr"]
843
+ },
844
+ top: {
845
+ points: ["bc", "tc"]
846
+ },
847
+ bottom: {
848
+ points: ["tc", "bc"]
849
+ },
850
+ topLeft: {
851
+ points: ["bl", "tl"]
852
+ },
853
+ leftTop: {
854
+ points: ["tr", "tl"]
855
+ },
856
+ topRight: {
857
+ points: ["br", "tr"]
858
+ },
859
+ rightTop: {
860
+ points: ["tl", "tr"]
861
+ },
862
+ bottomRight: {
863
+ points: ["tr", "br"]
864
+ },
865
+ rightBottom: {
866
+ points: ["bl", "br"]
867
+ },
868
+ bottomLeft: {
869
+ points: ["tl", "bl"]
870
+ },
871
+ leftBottom: {
872
+ points: ["br", "bl"]
873
+ }
874
+ }, tn = {
875
+ topLeft: {
876
+ points: ["bl", "tc"]
877
+ },
878
+ leftTop: {
879
+ points: ["tr", "cl"]
880
+ },
881
+ topRight: {
882
+ points: ["br", "tc"]
883
+ },
884
+ rightTop: {
885
+ points: ["tl", "cr"]
886
+ },
887
+ bottomRight: {
888
+ points: ["tr", "bc"]
889
+ },
890
+ rightBottom: {
891
+ points: ["bl", "cr"]
892
+ },
893
+ bottomLeft: {
894
+ points: ["tl", "bc"]
895
+ },
896
+ leftBottom: {
897
+ points: ["br", "cl"]
898
+ }
899
+ }, on = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]);
900
+ function St(e) {
901
+ const {
902
+ arrowWidth: t,
903
+ autoAdjustOverflow: o,
904
+ arrowPointAtCenter: n,
905
+ offset: r,
906
+ borderRadius: l,
907
+ visibleFirst: i
908
+ } = e, c = t / 2, s = {};
909
+ return Object.keys(rt).forEach((d) => {
910
+ const u = n && tn[d] || rt[d], p = Object.assign(Object.assign({}, u), {
911
+ offset: [0, 0],
912
+ dynamicInset: !0
913
+ });
914
+ switch (s[d] = p, on.has(d) && (p.autoArrow = !1), d) {
915
+ case "top":
916
+ case "topLeft":
917
+ case "topRight":
918
+ p.offset[1] = -c - r;
919
+ break;
920
+ case "bottom":
921
+ case "bottomLeft":
922
+ case "bottomRight":
923
+ p.offset[1] = c + r;
924
+ break;
925
+ case "left":
926
+ case "leftTop":
927
+ case "leftBottom":
928
+ p.offset[0] = -c - r;
929
+ break;
930
+ case "right":
931
+ case "rightTop":
932
+ case "rightBottom":
933
+ p.offset[0] = c + r;
934
+ break;
935
+ }
936
+ const m = Ne({
937
+ contentRadius: l,
938
+ limitVerticalRadius: !0
939
+ });
940
+ if (n)
941
+ switch (d) {
942
+ case "topLeft":
943
+ case "bottomLeft":
944
+ p.offset[0] = -m.arrowOffsetHorizontal - c;
945
+ break;
946
+ case "topRight":
947
+ case "bottomRight":
948
+ p.offset[0] = m.arrowOffsetHorizontal + c;
949
+ break;
950
+ case "leftTop":
951
+ case "rightTop":
952
+ p.offset[1] = -m.arrowOffsetHorizontal * 2 + c;
953
+ break;
954
+ case "leftBottom":
955
+ case "rightBottom":
956
+ p.offset[1] = m.arrowOffsetHorizontal * 2 - c;
957
+ break;
958
+ }
959
+ p.overflow = en(d, m, t, o), i && (p.htmlRegion = "visibleFirst");
960
+ }), s;
961
+ }
962
+ const nn = (e) => {
963
+ const {
964
+ componentCls: t,
965
+ // ant-tooltip
966
+ tooltipMaxWidth: o,
967
+ tooltipColor: n,
968
+ tooltipBg: r,
969
+ tooltipBorderRadius: l,
970
+ zIndexPopup: i,
971
+ controlHeight: c,
972
+ boxShadowSecondary: s,
973
+ paddingSM: d,
974
+ paddingXS: u
975
+ } = e;
976
+ return [
977
+ {
978
+ [t]: Object.assign(Object.assign(Object.assign(Object.assign({}, ge(e)), {
979
+ position: "absolute",
980
+ zIndex: i,
981
+ display: "block",
982
+ width: "max-content",
983
+ maxWidth: o,
984
+ visibility: "visible",
985
+ // When use `autoArrow`, origin will follow the arrow position
986
+ "--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
987
+ transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
988
+ "&-hidden": {
989
+ display: "none"
990
+ },
991
+ "--antd-arrow-background-color": r,
992
+ // Wrapper for the tooltip content
993
+ [`${t}-inner`]: {
994
+ minWidth: "1em",
995
+ minHeight: c,
996
+ padding: `${B(e.calc(d).div(2).equal())} ${B(u)}`,
997
+ color: n,
998
+ textAlign: "start",
999
+ textDecoration: "none",
1000
+ wordWrap: "break-word",
1001
+ backgroundColor: r,
1002
+ borderRadius: l,
1003
+ boxShadow: s,
1004
+ boxSizing: "border-box"
1005
+ },
1006
+ // Limit left and right placement radius
1007
+ [["&-placement-left", "&-placement-leftTop", "&-placement-leftBottom", "&-placement-right", "&-placement-rightTop", "&-placement-rightBottom"].join(",")]: {
1008
+ [`${t}-inner`]: {
1009
+ borderRadius: e.min(l, xt)
1010
+ }
1011
+ },
1012
+ [`${t}-content`]: {
1013
+ position: "relative"
1014
+ }
1015
+ }), Io(e, (p, m) => {
1016
+ let {
1017
+ darkColor: f
1018
+ } = m;
1019
+ return {
1020
+ [`&${t}-${p}`]: {
1021
+ [`${t}-inner`]: {
1022
+ backgroundColor: f
1023
+ },
1024
+ [`${t}-arrow`]: {
1025
+ "--antd-arrow-background-color": f
1026
+ }
1027
+ }
1028
+ };
1029
+ })), {
1030
+ // RTL
1031
+ "&-rtl": {
1032
+ direction: "rtl"
1033
+ }
1034
+ })
1035
+ },
1036
+ // Arrow Style
1037
+ qe(e, "var(--antd-arrow-background-color)"),
1038
+ // Pure Render
1039
+ {
1040
+ [`${t}-pure`]: {
1041
+ position: "relative",
1042
+ maxWidth: "none",
1043
+ margin: e.sizePopupArrow
1044
+ }
1045
+ }
1046
+ ];
1047
+ }, rn = (e) => Object.assign(Object.assign({
1048
+ zIndexPopup: e.zIndexPopupBase + 70
1049
+ }, Ne({
1050
+ contentRadius: e.borderRadius,
1051
+ limitVerticalRadius: !0
1052
+ })), Fe(ae(e, {
1053
+ borderRadiusOuter: Math.min(e.borderRadiusOuter, 4)
1054
+ }))), Ot = function(e) {
1055
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
1056
+ return le("Tooltip", (n) => {
1057
+ const {
1058
+ borderRadius: r,
1059
+ colorTextLightSolid: l,
1060
+ colorBgSpotlight: i
1061
+ } = n, c = ae(n, {
1062
+ // default variables
1063
+ tooltipMaxWidth: 250,
1064
+ tooltipColor: l,
1065
+ tooltipBorderRadius: r,
1066
+ tooltipBg: i
1067
+ });
1068
+ return [nn(c), Be(n, "zoom-big-fast")];
1069
+ }, rn, {
1070
+ resetStyle: !1,
1071
+ // Popover use Tooltip as internal component. We do not need to handle this.
1072
+ injectStyle: t
1073
+ })(e);
1074
+ }, an = pe.map((e) => `${e}-inverse`);
1075
+ function ln(e) {
1076
+ return (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0) ? [].concat(Qe(an), Qe(pe)).includes(e) : pe.includes(e);
1077
+ }
1078
+ function It(e, t) {
1079
+ const o = ln(t), n = M({
1080
+ [`${e}-${t}`]: t && o
1081
+ }), r = {}, l = {};
1082
+ return t && !o && (r.background = t, l["--antd-arrow-background-color"] = t), {
1083
+ className: n,
1084
+ overlayStyle: r,
1085
+ arrowStyle: l
1086
+ };
1087
+ }
1088
+ const sn = (e) => {
1089
+ const {
1090
+ prefixCls: t,
1091
+ className: o,
1092
+ placement: n = "top",
1093
+ title: r,
1094
+ color: l,
1095
+ overlayInnerStyle: i
1096
+ } = e, {
1097
+ getPrefixCls: c
1098
+ } = a.useContext(J), s = c("tooltip", t), [d, u, p] = Ot(s), m = It(s, l), f = m.arrowStyle, g = Object.assign(Object.assign({}, i), m.overlayStyle), v = M(u, p, s, `${s}-pure`, `${s}-placement-${n}`, o, m.className);
1099
+ return d(/* @__PURE__ */ a.createElement("div", {
1100
+ className: v,
1101
+ style: f
1102
+ }, /* @__PURE__ */ a.createElement("div", {
1103
+ className: `${s}-arrow`
1104
+ }), /* @__PURE__ */ a.createElement(Xe, Object.assign({}, e, {
1105
+ className: u,
1106
+ prefixCls: s,
1107
+ overlayInnerStyle: g
1108
+ }), r)));
1109
+ };
1110
+ var cn = function(e, t) {
1111
+ var o = {};
1112
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1113
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1114
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1115
+ return o;
1116
+ };
1117
+ const dn = /* @__PURE__ */ a.forwardRef((e, t) => {
1118
+ var o, n;
1119
+ const {
1120
+ prefixCls: r,
1121
+ openClassName: l,
1122
+ getTooltipContainer: i,
1123
+ overlayClassName: c,
1124
+ color: s,
1125
+ overlayInnerStyle: d,
1126
+ children: u,
1127
+ afterOpenChange: p,
1128
+ afterVisibleChange: m,
1129
+ destroyTooltipOnHide: f,
1130
+ arrow: g = !0,
1131
+ title: v,
1132
+ overlay: C,
1133
+ builtinPlacements: b,
1134
+ arrowPointAtCenter: w = !1,
1135
+ autoAdjustOverflow: x = !0
1136
+ } = e, y = !!g, [, O] = Ae(), {
1137
+ getPopupContainer: j,
1138
+ getPrefixCls: T,
1139
+ direction: _
1140
+ } = a.useContext(J), h = fe("Tooltip"), E = a.useRef(null), z = () => {
1141
+ var G;
1142
+ (G = E.current) === null || G === void 0 || G.forceAlign();
1143
+ };
1144
+ a.useImperativeHandle(t, () => {
1145
+ var G;
1146
+ return {
1147
+ forceAlign: z,
1148
+ forcePopupAlign: () => {
1149
+ h.deprecated(!1, "forcePopupAlign", "forceAlign"), z();
1150
+ },
1151
+ nativeElement: (G = E.current) === null || G === void 0 ? void 0 : G.nativeElement
1152
+ };
1153
+ }), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["arrowPointAtCenter", "arrow={{ pointAtCenter: true }}"]].forEach((G) => {
1154
+ let [te, ne] = G;
1155
+ h.deprecated(!(te in e), te, ne);
1156
+ }), process.env.NODE_ENV !== "production" && h(!f || typeof f == "boolean", "usage", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && h(!g || typeof g == "boolean" || !("arrowPointAtCenter" in g), "deprecated", "`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));
1157
+ const [P, I] = Le(!1, {
1158
+ value: (o = e.open) !== null && o !== void 0 ? o : e.visible,
1159
+ defaultValue: (n = e.defaultOpen) !== null && n !== void 0 ? n : e.defaultVisible
1160
+ }), $ = !v && !C && v !== 0, D = (G) => {
1161
+ var te, ne;
1162
+ I($ ? !1 : G), $ || ((te = e.onOpenChange) === null || te === void 0 || te.call(e, G), (ne = e.onVisibleChange) === null || ne === void 0 || ne.call(e, G));
1163
+ }, k = a.useMemo(() => {
1164
+ var G, te;
1165
+ let ne = w;
1166
+ return typeof g == "object" && (ne = (te = (G = g.pointAtCenter) !== null && G !== void 0 ? G : g.arrowPointAtCenter) !== null && te !== void 0 ? te : w), b || St({
1167
+ arrowPointAtCenter: ne,
1168
+ autoAdjustOverflow: x,
1169
+ arrowWidth: y ? O.sizePopupArrow : 0,
1170
+ borderRadius: O.borderRadius,
1171
+ offset: O.marginXXS,
1172
+ visibleFirst: !0
1173
+ });
1174
+ }, [w, g, b, O]), S = a.useMemo(() => v === 0 ? v : C || v || "", [C, v]), N = /* @__PURE__ */ a.createElement($t, {
1175
+ space: !0
1176
+ }, typeof S == "function" ? S() : S), {
1177
+ getPopupContainer: R,
1178
+ placement: V = "top",
1179
+ mouseEnterDelay: Z = 0.1,
1180
+ mouseLeaveDelay: H = 0.1,
1181
+ overlayStyle: X,
1182
+ rootClassName: q
1183
+ } = e, Y = cn(e, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName"]), F = T("tooltip", r), K = T(), A = e["data-popover-inject"];
1184
+ let W = P;
1185
+ !("open" in e) && !("visible" in e) && $ && (W = !1);
1186
+ const U = /* @__PURE__ */ a.isValidElement(u) && !yo(u) ? u : /* @__PURE__ */ a.createElement("span", null, u), ie = U.props, je = !ie.className || typeof ie.className == "string" ? M(ie.className, l || `${F}-open`) : ie.className, [me, L, oe] = Ot(F, !A), ee = It(F, s), At = ee.arrowStyle, Lt = Object.assign(Object.assign({}, d), ee.overlayStyle), kt = M(c, {
1187
+ [`${F}-rtl`]: _ === "rtl"
1188
+ }, ee.className, q, L, oe), [Vt, Wt] = Ve("Tooltip", Y.zIndex), Xt = /* @__PURE__ */ a.createElement(Qo, Object.assign({}, Y, {
1189
+ zIndex: Vt,
1190
+ showArrow: y,
1191
+ placement: V,
1192
+ mouseEnterDelay: Z,
1193
+ mouseLeaveDelay: H,
1194
+ prefixCls: F,
1195
+ overlayClassName: kt,
1196
+ overlayStyle: Object.assign(Object.assign({}, At), X),
1197
+ getTooltipContainer: R || i || j,
1198
+ ref: E,
1199
+ builtinPlacements: k,
1200
+ overlay: N,
1201
+ visible: W,
1202
+ onVisibleChange: D,
1203
+ afterVisibleChange: p ?? m,
1204
+ overlayInnerStyle: Lt,
1205
+ arrowContent: /* @__PURE__ */ a.createElement("span", {
1206
+ className: `${F}-arrow-content`
1207
+ }),
1208
+ motion: {
1209
+ motionName: vt(K, "zoom-big-fast", e.transitionName),
1210
+ motionDeadline: 1e3
1211
+ },
1212
+ destroyTooltipOnHide: !!f
1213
+ }), W ? se(U, {
1214
+ className: je
1215
+ }) : U);
1216
+ return me(/* @__PURE__ */ a.createElement(Ct.Provider, {
1217
+ value: Wt
1218
+ }, Xt));
1219
+ }), ze = dn;
1220
+ process.env.NODE_ENV !== "production" && (ze.displayName = "Tooltip");
1221
+ ze._InternalPanelDoNotUseOrYouWillBeFired = sn;
1222
+ const un = (e) => {
1223
+ const {
1224
+ componentCls: t,
1225
+ popoverColor: o,
1226
+ titleMinWidth: n,
1227
+ fontWeightStrong: r,
1228
+ innerPadding: l,
1229
+ boxShadowSecondary: i,
1230
+ colorTextHeading: c,
1231
+ borderRadiusLG: s,
1232
+ zIndexPopup: d,
1233
+ titleMarginBottom: u,
1234
+ colorBgElevated: p,
1235
+ popoverBg: m,
1236
+ titleBorderBottom: f,
1237
+ innerContentPadding: g,
1238
+ titlePadding: v
1239
+ } = e;
1240
+ return [
1241
+ {
1242
+ [t]: Object.assign(Object.assign({}, ge(e)), {
1243
+ position: "absolute",
1244
+ top: 0,
1245
+ // use `left` to fix https://github.com/ant-design/ant-design/issues/39195
1246
+ left: {
1247
+ _skip_check_: !0,
1248
+ value: 0
1249
+ },
1250
+ zIndex: d,
1251
+ fontWeight: "normal",
1252
+ whiteSpace: "normal",
1253
+ textAlign: "start",
1254
+ cursor: "auto",
1255
+ userSelect: "text",
1256
+ // When use `autoArrow`, origin will follow the arrow position
1257
+ "--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
1258
+ transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
1259
+ "--antd-arrow-background-color": p,
1260
+ width: "max-content",
1261
+ maxWidth: "100vw",
1262
+ "&-rtl": {
1263
+ direction: "rtl"
1264
+ },
1265
+ "&-hidden": {
1266
+ display: "none"
1267
+ },
1268
+ [`${t}-content`]: {
1269
+ position: "relative"
1270
+ },
1271
+ [`${t}-inner`]: {
1272
+ backgroundColor: m,
1273
+ backgroundClip: "padding-box",
1274
+ borderRadius: s,
1275
+ boxShadow: i,
1276
+ padding: l
1277
+ },
1278
+ [`${t}-title`]: {
1279
+ minWidth: n,
1280
+ marginBottom: u,
1281
+ color: c,
1282
+ fontWeight: r,
1283
+ borderBottom: f,
1284
+ padding: v
1285
+ },
1286
+ [`${t}-inner-content`]: {
1287
+ color: o,
1288
+ padding: g
1289
+ }
1290
+ })
1291
+ },
1292
+ // Arrow Style
1293
+ qe(e, "var(--antd-arrow-background-color)"),
1294
+ // Pure Render
1295
+ {
1296
+ [`${t}-pure`]: {
1297
+ position: "relative",
1298
+ maxWidth: "none",
1299
+ margin: e.sizePopupArrow,
1300
+ display: "inline-block",
1301
+ [`${t}-content`]: {
1302
+ display: "inline-block"
1303
+ }
1304
+ }
1305
+ }
1306
+ ];
1307
+ }, mn = (e) => {
1308
+ const {
1309
+ componentCls: t
1310
+ } = e;
1311
+ return {
1312
+ [t]: pe.map((o) => {
1313
+ const n = e[`${o}6`];
1314
+ return {
1315
+ [`&${t}-${o}`]: {
1316
+ "--antd-arrow-background-color": n,
1317
+ [`${t}-inner`]: {
1318
+ backgroundColor: n
1319
+ },
1320
+ [`${t}-arrow`]: {
1321
+ background: "transparent"
1322
+ }
1323
+ }
1324
+ };
1325
+ })
1326
+ };
1327
+ }, pn = (e) => {
1328
+ const {
1329
+ lineWidth: t,
1330
+ controlHeight: o,
1331
+ fontHeight: n,
1332
+ padding: r,
1333
+ wireframe: l,
1334
+ zIndexPopupBase: i,
1335
+ borderRadiusLG: c,
1336
+ marginXS: s,
1337
+ lineType: d,
1338
+ colorSplit: u,
1339
+ paddingSM: p
1340
+ } = e, m = o - n, f = m / 2, g = m / 2 - t, v = r;
1341
+ return Object.assign(Object.assign(Object.assign({
1342
+ titleMinWidth: 177,
1343
+ zIndexPopup: i + 30
1344
+ }, Fe(e)), Ne({
1345
+ contentRadius: c,
1346
+ limitVerticalRadius: !0
1347
+ })), {
1348
+ // internal
1349
+ innerPadding: l ? 0 : 12,
1350
+ titleMarginBottom: l ? 0 : s,
1351
+ titlePadding: l ? `${f}px ${v}px ${g}px` : 0,
1352
+ titleBorderBottom: l ? `${t}px ${d} ${u}` : "none",
1353
+ innerContentPadding: l ? `${p}px ${v}px` : 0
1354
+ });
1355
+ }, Et = le("Popover", (e) => {
1356
+ const {
1357
+ colorBgElevated: t,
1358
+ colorText: o
1359
+ } = e, n = ae(e, {
1360
+ popoverBg: t,
1361
+ popoverColor: o
1362
+ });
1363
+ return [un(n), mn(n), Be(n, "zoom-big")];
1364
+ }, pn, {
1365
+ resetStyle: !1,
1366
+ deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
1367
+ });
1368
+ var gn = function(e, t) {
1369
+ var o = {};
1370
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1371
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1372
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1373
+ return o;
1374
+ };
1375
+ const Pt = (e) => {
1376
+ let {
1377
+ title: t,
1378
+ content: o,
1379
+ prefixCls: n
1380
+ } = e;
1381
+ return !t && !o ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, t && /* @__PURE__ */ a.createElement("div", {
1382
+ className: `${n}-title`
1383
+ }, t), o && /* @__PURE__ */ a.createElement("div", {
1384
+ className: `${n}-inner-content`
1385
+ }, o));
1386
+ }, fn = (e) => {
1387
+ const {
1388
+ hashId: t,
1389
+ prefixCls: o,
1390
+ className: n,
1391
+ style: r,
1392
+ placement: l = "top",
1393
+ title: i,
1394
+ content: c,
1395
+ children: s
1396
+ } = e, d = xe(i), u = xe(c), p = M(t, o, `${o}-pure`, `${o}-placement-${l}`, n);
1397
+ return /* @__PURE__ */ a.createElement("div", {
1398
+ className: p,
1399
+ style: r
1400
+ }, /* @__PURE__ */ a.createElement("div", {
1401
+ className: `${o}-arrow`
1402
+ }), /* @__PURE__ */ a.createElement(Xe, Object.assign({}, e, {
1403
+ className: t,
1404
+ prefixCls: o
1405
+ }), s || /* @__PURE__ */ a.createElement(Pt, {
1406
+ prefixCls: o,
1407
+ title: d,
1408
+ content: u
1409
+ })));
1410
+ }, vn = (e) => {
1411
+ const {
1412
+ prefixCls: t,
1413
+ className: o
1414
+ } = e, n = gn(e, ["prefixCls", "className"]), {
1415
+ getPrefixCls: r
1416
+ } = a.useContext(J), l = r("popover", t), [i, c, s] = Et(l);
1417
+ return i(/* @__PURE__ */ a.createElement(fn, Object.assign({}, n, {
1418
+ prefixCls: l,
1419
+ hashId: c,
1420
+ className: M(o, s)
1421
+ })));
1422
+ };
1423
+ var bn = function(e, t) {
1424
+ var o = {};
1425
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1426
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1427
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1428
+ return o;
1429
+ };
1430
+ const hn = /* @__PURE__ */ a.forwardRef((e, t) => {
1431
+ var o, n;
1432
+ const {
1433
+ prefixCls: r,
1434
+ title: l,
1435
+ content: i,
1436
+ overlayClassName: c,
1437
+ placement: s = "top",
1438
+ trigger: d = "hover",
1439
+ children: u,
1440
+ mouseEnterDelay: p = 0.1,
1441
+ mouseLeaveDelay: m = 0.1,
1442
+ onOpenChange: f,
1443
+ overlayStyle: g = {}
1444
+ } = e, v = bn(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
1445
+ getPrefixCls: C
1446
+ } = a.useContext(J), b = C("popover", r), [w, x, y] = Et(b), O = C(), j = M(c, x, y), [T, _] = Le(!1, {
1447
+ value: (o = e.open) !== null && o !== void 0 ? o : e.visible,
1448
+ defaultValue: (n = e.defaultOpen) !== null && n !== void 0 ? n : e.defaultVisible
1449
+ }), h = ($, D) => {
1450
+ _($, !0), f == null || f($, D);
1451
+ }, E = ($) => {
1452
+ $.keyCode === eo.ESC && h(!1, $);
1453
+ }, z = ($) => {
1454
+ h($);
1455
+ }, P = xe(l), I = xe(i);
1456
+ return w(/* @__PURE__ */ a.createElement(ze, Object.assign({
1457
+ placement: s,
1458
+ trigger: d,
1459
+ mouseEnterDelay: p,
1460
+ mouseLeaveDelay: m,
1461
+ overlayStyle: g
1462
+ }, v, {
1463
+ prefixCls: b,
1464
+ overlayClassName: j,
1465
+ ref: t,
1466
+ open: T,
1467
+ onOpenChange: z,
1468
+ overlay: P || I ? /* @__PURE__ */ a.createElement(Pt, {
1469
+ prefixCls: b,
1470
+ title: P,
1471
+ content: I
1472
+ }) : null,
1473
+ transitionName: vt(O, "zoom-big", v.transitionName),
1474
+ "data-popover-inject": !0
1475
+ }), se(u, {
1476
+ onKeyDown: ($) => {
1477
+ var D, k;
1478
+ /* @__PURE__ */ a.isValidElement(u) && ((k = u == null ? void 0 : (D = u.props).onKeyDown) === null || k === void 0 || k.call(D, $)), E($);
1479
+ }
1480
+ })));
1481
+ }), Ge = hn;
1482
+ Ge._InternalPanelDoNotUseOrYouWillBeFired = vn;
1483
+ process.env.NODE_ENV !== "production" && (Ge.displayName = "Popover");
1484
+ const it = (e) => {
1485
+ const {
1486
+ size: t,
1487
+ shape: o
1488
+ } = a.useContext(Re), n = a.useMemo(() => ({
1489
+ size: e.size || t,
1490
+ shape: e.shape || o
1491
+ }), [e.size, e.shape, t, o]);
1492
+ return /* @__PURE__ */ a.createElement(Re.Provider, {
1493
+ value: n
1494
+ }, e.children);
1495
+ }, $n = (e) => {
1496
+ var t, o, n;
1497
+ const {
1498
+ getPrefixCls: r,
1499
+ direction: l
1500
+ } = a.useContext(J), {
1501
+ prefixCls: i,
1502
+ className: c,
1503
+ rootClassName: s,
1504
+ style: d,
1505
+ maxCount: u,
1506
+ maxStyle: p,
1507
+ size: m,
1508
+ shape: f,
1509
+ maxPopoverPlacement: g,
1510
+ maxPopoverTrigger: v,
1511
+ children: C,
1512
+ max: b
1513
+ } = e;
1514
+ if (process.env.NODE_ENV !== "production") {
1515
+ const P = fe("Avatar.Group");
1516
+ P.deprecated(!u, "maxCount", "max={{ count: number }}"), P.deprecated(!p, "maxStyle", "max={{ style: CSSProperties }}"), P.deprecated(!g, "maxPopoverPlacement", "max={{ popover: PopoverProps }}"), P.deprecated(!v, "maxPopoverTrigger", "max={{ popover: PopoverProps }}");
1517
+ }
1518
+ const w = r("avatar", i), x = `${w}-group`, y = Pe(w), [O, j, T] = wt(w, y), _ = M(x, {
1519
+ [`${x}-rtl`]: l === "rtl"
1520
+ }, T, y, c, s, j), h = ke(C).map((P, I) => se(P, {
1521
+ key: `avatar-key-${I}`
1522
+ })), E = (b == null ? void 0 : b.count) || u, z = h.length;
1523
+ if (E && E < z) {
1524
+ const P = h.slice(0, E), I = h.slice(E, z), $ = (b == null ? void 0 : b.style) || p, D = ((t = b == null ? void 0 : b.popover) === null || t === void 0 ? void 0 : t.trigger) || v || "hover", k = ((o = b == null ? void 0 : b.popover) === null || o === void 0 ? void 0 : o.placement) || g || "top", S = Object.assign(Object.assign({
1525
+ content: I
1526
+ }, b == null ? void 0 : b.popover), {
1527
+ overlayClassName: M(`${x}-popover`, (n = b == null ? void 0 : b.popover) === null || n === void 0 ? void 0 : n.overlayClassName),
1528
+ placement: k,
1529
+ trigger: D
1530
+ });
1531
+ return P.push(/* @__PURE__ */ a.createElement(Ge, Object.assign({
1532
+ key: "avatar-popover-key",
1533
+ destroyTooltipOnHide: !0
1534
+ }, S), /* @__PURE__ */ a.createElement(We, {
1535
+ style: $
1536
+ }, `+${z - E}`))), O(/* @__PURE__ */ a.createElement(it, {
1537
+ shape: f,
1538
+ size: m
1539
+ }, /* @__PURE__ */ a.createElement("div", {
1540
+ className: _,
1541
+ style: d
1542
+ }, P)));
1543
+ }
1544
+ return O(/* @__PURE__ */ a.createElement(it, {
1545
+ shape: f,
1546
+ size: m
1547
+ }, /* @__PURE__ */ a.createElement("div", {
1548
+ className: _,
1549
+ style: d
1550
+ }, h)));
1551
+ }, Bt = We;
1552
+ Bt.Group = $n;
1553
+ var Cn = { icon: { tag: "svg", attrs: { viewBox: "0 0 1024 1024", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "bars", theme: "outlined" }, yn = function(t, o) {
1554
+ return /* @__PURE__ */ a.createElement(He, Ee({}, t, {
1555
+ ref: o,
1556
+ icon: Cn
1557
+ }));
1558
+ }, Nt = /* @__PURE__ */ a.forwardRef(yn);
1559
+ process.env.NODE_ENV !== "production" && (Nt.displayName = "BarsOutlined");
1560
+ var wn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, name: "left", theme: "outlined" }, xn = function(t, o) {
1561
+ return /* @__PURE__ */ a.createElement(He, Ee({}, t, {
1562
+ ref: o,
1563
+ icon: wn
1564
+ }));
1565
+ }, Me = /* @__PURE__ */ a.forwardRef(xn);
1566
+ process.env.NODE_ENV !== "production" && (Me.displayName = "LeftOutlined");
1567
+ const Sn = (e) => !isNaN(parseFloat(e)) && isFinite(e), On = /* @__PURE__ */ a.createContext({
1568
+ siderHook: {
1569
+ addSider: () => null,
1570
+ removeSider: () => null
1571
+ }
1572
+ }), In = (e) => {
1573
+ const {
1574
+ antCls: t,
1575
+ // .ant
1576
+ componentCls: o,
1577
+ // .ant-layout
1578
+ colorText: n,
1579
+ footerBg: r,
1580
+ headerHeight: l,
1581
+ headerPadding: i,
1582
+ headerColor: c,
1583
+ footerPadding: s,
1584
+ fontSize: d,
1585
+ bodyBg: u,
1586
+ headerBg: p
1587
+ } = e;
1588
+ return {
1589
+ [o]: {
1590
+ display: "flex",
1591
+ flex: "auto",
1592
+ flexDirection: "column",
1593
+ /* fix firefox can't set height smaller than content on flex item */
1594
+ minHeight: 0,
1595
+ background: u,
1596
+ "&, *": {
1597
+ boxSizing: "border-box"
1598
+ },
1599
+ [`&${o}-has-sider`]: {
1600
+ flexDirection: "row",
1601
+ [`> ${o}, > ${o}-content`]: {
1602
+ // https://segmentfault.com/a/1190000019498300
1603
+ width: 0
1604
+ }
1605
+ },
1606
+ [`${o}-header, &${o}-footer`]: {
1607
+ flex: "0 0 auto"
1608
+ },
1609
+ // RTL
1610
+ "&-rtl": {
1611
+ direction: "rtl"
1612
+ }
1613
+ },
1614
+ // ==================== Header ====================
1615
+ [`${o}-header`]: {
1616
+ height: l,
1617
+ padding: i,
1618
+ color: c,
1619
+ lineHeight: B(l),
1620
+ background: p,
1621
+ // Other components/menu/style/index.less line:686
1622
+ // Integration with header element so menu items have the same height
1623
+ [`${t}-menu`]: {
1624
+ lineHeight: "inherit"
1625
+ }
1626
+ },
1627
+ // ==================== Footer ====================
1628
+ [`${o}-footer`]: {
1629
+ padding: s,
1630
+ color: n,
1631
+ fontSize: d,
1632
+ background: r
1633
+ },
1634
+ // =================== Content ====================
1635
+ [`${o}-content`]: {
1636
+ flex: "auto",
1637
+ color: n,
1638
+ // fix firefox can't set height smaller than content on flex item
1639
+ minHeight: 0
1640
+ }
1641
+ };
1642
+ }, zt = (e) => {
1643
+ const {
1644
+ colorBgLayout: t,
1645
+ controlHeight: o,
1646
+ controlHeightLG: n,
1647
+ colorText: r,
1648
+ controlHeightSM: l,
1649
+ marginXXS: i,
1650
+ colorTextLightSolid: c,
1651
+ colorBgContainer: s
1652
+ } = e, d = n * 1.25;
1653
+ return {
1654
+ // Deprecated
1655
+ colorBgHeader: "#001529",
1656
+ colorBgBody: t,
1657
+ colorBgTrigger: "#002140",
1658
+ bodyBg: t,
1659
+ headerBg: "#001529",
1660
+ headerHeight: o * 2,
1661
+ headerPadding: `0 ${d}px`,
1662
+ headerColor: r,
1663
+ footerPadding: `${l}px ${d}px`,
1664
+ footerBg: t,
1665
+ siderBg: "#001529",
1666
+ triggerHeight: n + i * 2,
1667
+ triggerBg: "#002140",
1668
+ triggerColor: c,
1669
+ zeroTriggerWidth: n,
1670
+ zeroTriggerHeight: n,
1671
+ lightSiderBg: s,
1672
+ lightTriggerBg: s,
1673
+ lightTriggerColor: r
1674
+ };
1675
+ }, jt = [["colorBgBody", "bodyBg"], ["colorBgHeader", "headerBg"], ["colorBgTrigger", "triggerBg"]];
1676
+ le("Layout", (e) => [In(e)], zt, {
1677
+ deprecatedTokens: jt
1678
+ });
1679
+ const En = (e) => {
1680
+ const {
1681
+ componentCls: t,
1682
+ siderBg: o,
1683
+ motionDurationMid: n,
1684
+ motionDurationSlow: r,
1685
+ antCls: l,
1686
+ triggerHeight: i,
1687
+ triggerColor: c,
1688
+ triggerBg: s,
1689
+ headerHeight: d,
1690
+ zeroTriggerWidth: u,
1691
+ zeroTriggerHeight: p,
1692
+ borderRadius: m,
1693
+ lightSiderBg: f,
1694
+ lightTriggerColor: g,
1695
+ lightTriggerBg: v,
1696
+ bodyBg: C
1697
+ } = e;
1698
+ return {
1699
+ [t]: {
1700
+ position: "relative",
1701
+ // fix firefox can't set width smaller than content on flex item
1702
+ minWidth: 0,
1703
+ background: o,
1704
+ transition: `all ${n}, background 0s`,
1705
+ "&-has-trigger": {
1706
+ paddingBottom: i
1707
+ },
1708
+ "&-right": {
1709
+ order: 1
1710
+ },
1711
+ [`${t}-children`]: {
1712
+ height: "100%",
1713
+ // Hack for fixing margin collapse bug
1714
+ // https://github.com/ant-design/ant-design/issues/7967
1715
+ // solution from https://stackoverflow.com/a/33132624/3040605
1716
+ marginTop: -0.1,
1717
+ paddingTop: 0.1,
1718
+ [`${l}-menu${l}-menu-inline-collapsed`]: {
1719
+ width: "auto"
1720
+ }
1721
+ },
1722
+ [`${t}-trigger`]: {
1723
+ position: "fixed",
1724
+ bottom: 0,
1725
+ zIndex: 1,
1726
+ height: i,
1727
+ color: c,
1728
+ lineHeight: B(i),
1729
+ textAlign: "center",
1730
+ background: s,
1731
+ cursor: "pointer",
1732
+ transition: `all ${n}`
1733
+ },
1734
+ "&-zero-width": {
1735
+ "> *": {
1736
+ overflow: "hidden"
1737
+ },
1738
+ "&-trigger": {
1739
+ position: "absolute",
1740
+ top: d,
1741
+ insetInlineEnd: e.calc(u).mul(-1).equal(),
1742
+ zIndex: 1,
1743
+ width: u,
1744
+ height: p,
1745
+ color: c,
1746
+ fontSize: e.fontSizeXL,
1747
+ display: "flex",
1748
+ alignItems: "center",
1749
+ justifyContent: "center",
1750
+ background: o,
1751
+ borderStartStartRadius: 0,
1752
+ borderStartEndRadius: m,
1753
+ borderEndEndRadius: m,
1754
+ borderEndStartRadius: 0,
1755
+ cursor: "pointer",
1756
+ transition: `background ${r} ease`,
1757
+ "&::after": {
1758
+ position: "absolute",
1759
+ inset: 0,
1760
+ background: "transparent",
1761
+ transition: `all ${r}`,
1762
+ content: '""'
1763
+ },
1764
+ "&:hover::after": {
1765
+ background: "rgba(255, 255, 255, 0.2)"
1766
+ },
1767
+ "&-right": {
1768
+ insetInlineStart: e.calc(u).mul(-1).equal(),
1769
+ borderStartStartRadius: m,
1770
+ borderStartEndRadius: 0,
1771
+ borderEndEndRadius: 0,
1772
+ borderEndStartRadius: m
1773
+ }
1774
+ }
1775
+ },
1776
+ // Light
1777
+ "&-light": {
1778
+ background: f,
1779
+ [`${t}-trigger`]: {
1780
+ color: g,
1781
+ background: v
1782
+ },
1783
+ [`${t}-zero-width-trigger`]: {
1784
+ color: g,
1785
+ background: v,
1786
+ border: `1px solid ${C}`,
1787
+ // Safe to modify to any other color
1788
+ borderInlineStart: 0
1789
+ }
1790
+ }
1791
+ }
1792
+ };
1793
+ }, Pn = le(["Layout", "Sider"], (e) => [En(e)], zt, {
1794
+ deprecatedTokens: jt
1795
+ });
1796
+ var Bn = function(e, t) {
1797
+ var o = {};
1798
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1799
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1800
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1801
+ return o;
1802
+ };
1803
+ const at = {
1804
+ xs: "479.98px",
1805
+ sm: "575.98px",
1806
+ md: "767.98px",
1807
+ lg: "991.98px",
1808
+ xl: "1199.98px",
1809
+ xxl: "1599.98px"
1810
+ }, Ye = /* @__PURE__ */ a.createContext({}), Nn = /* @__PURE__ */ (() => {
1811
+ let e = 0;
1812
+ return function() {
1813
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
1814
+ return e += 1, `${t}${e}`;
1815
+ };
1816
+ })(), zn = /* @__PURE__ */ a.forwardRef((e, t) => {
1817
+ const {
1818
+ prefixCls: o,
1819
+ className: n,
1820
+ trigger: r,
1821
+ children: l,
1822
+ defaultCollapsed: i = !1,
1823
+ theme: c = "dark",
1824
+ style: s = {},
1825
+ collapsible: d = !1,
1826
+ reverseArrow: u = !1,
1827
+ width: p = 200,
1828
+ collapsedWidth: m = 80,
1829
+ zeroWidthTriggerStyle: f,
1830
+ breakpoint: g,
1831
+ onCollapse: v,
1832
+ onBreakpoint: C
1833
+ } = e, b = Bn(e, ["prefixCls", "className", "trigger", "children", "defaultCollapsed", "theme", "style", "collapsible", "reverseArrow", "width", "collapsedWidth", "zeroWidthTriggerStyle", "breakpoint", "onCollapse", "onBreakpoint"]), {
1834
+ siderHook: w
1835
+ } = Ke(On), [x, y] = Ze("collapsed" in e ? e.collapsed : i), [O, j] = Ze(!1);
1836
+ Te(() => {
1837
+ "collapsed" in e && y(e.collapsed);
1838
+ }, [e.collapsed]);
1839
+ const T = (S, N) => {
1840
+ "collapsed" in e || y(S), v == null || v(S, N);
1841
+ }, {
1842
+ getPrefixCls: _
1843
+ } = Ke(J), h = _("layout-sider", o), [E, z, P] = Pn(h), I = Ie();
1844
+ I.current = (S) => {
1845
+ j(S.matches), C == null || C(S.matches), x !== S.matches && T(S.matches, "responsive");
1846
+ }, Te(() => {
1847
+ function S(R) {
1848
+ return I.current(R);
1849
+ }
1850
+ let N;
1851
+ if (typeof window < "u") {
1852
+ const {
1853
+ matchMedia: R
1854
+ } = window;
1855
+ if (R && g && g in at) {
1856
+ N = R(`screen and (max-width: ${at[g]})`);
1857
+ try {
1858
+ N.addEventListener("change", S);
1859
+ } catch {
1860
+ N.addListener(S);
1861
+ }
1862
+ S(N);
1863
+ }
1864
+ }
1865
+ return () => {
1866
+ try {
1867
+ N == null || N.removeEventListener("change", S);
1868
+ } catch {
1869
+ N == null || N.removeListener(S);
1870
+ }
1871
+ };
1872
+ }, [g]), Te(() => {
1873
+ const S = Nn("ant-sider-");
1874
+ return w.addSider(S), () => w.removeSider(S);
1875
+ }, []);
1876
+ const $ = () => {
1877
+ T(!x, "clickTrigger");
1878
+ }, D = () => {
1879
+ const S = ve(b, ["collapsed"]), N = x ? m : p, R = Sn(N) ? `${N}px` : String(N), V = parseFloat(String(m || 0)) === 0 ? /* @__PURE__ */ a.createElement("span", {
1880
+ onClick: $,
1881
+ className: M(`${h}-zero-width-trigger`, `${h}-zero-width-trigger-${u ? "right" : "left"}`),
1882
+ style: f
1883
+ }, r || /* @__PURE__ */ a.createElement(Nt, null)) : null, X = {
1884
+ expanded: u ? /* @__PURE__ */ a.createElement(we, null) : /* @__PURE__ */ a.createElement(Me, null),
1885
+ collapsed: u ? /* @__PURE__ */ a.createElement(Me, null) : /* @__PURE__ */ a.createElement(we, null)
1886
+ }[x ? "collapsed" : "expanded"], q = r !== null ? V || /* @__PURE__ */ a.createElement("div", {
1887
+ className: `${h}-trigger`,
1888
+ onClick: $,
1889
+ style: {
1890
+ width: R
1891
+ }
1892
+ }, r || X) : null, Y = Object.assign(Object.assign({}, s), {
1893
+ flex: `0 0 ${R}`,
1894
+ maxWidth: R,
1895
+ minWidth: R,
1896
+ width: R
1897
+ }), F = M(h, `${h}-${c}`, {
1898
+ [`${h}-collapsed`]: !!x,
1899
+ [`${h}-has-trigger`]: d && r !== null && !V,
1900
+ [`${h}-below`]: !!O,
1901
+ [`${h}-zero-width`]: parseFloat(R) === 0
1902
+ }, n, z, P);
1903
+ return /* @__PURE__ */ a.createElement("aside", Object.assign({
1904
+ className: F
1905
+ }, S, {
1906
+ style: Y,
1907
+ ref: t
1908
+ }), /* @__PURE__ */ a.createElement("div", {
1909
+ className: `${h}-children`
1910
+ }, l), d || O && V ? q : null);
1911
+ }, k = a.useMemo(() => ({
1912
+ siderCollapsed: x
1913
+ }), [x]);
1914
+ return E(/* @__PURE__ */ a.createElement(Ye.Provider, {
1915
+ value: k
1916
+ }, D()));
1917
+ });
1918
+ process.env.NODE_ENV !== "production" && (zn.displayName = "Sider");
1919
+ const Se = /* @__PURE__ */ qt({
1920
+ prefixCls: "",
1921
+ firstLevel: !0,
1922
+ inlineCollapsed: !1
1923
+ });
1924
+ var jn = function(e, t) {
1925
+ var o = {};
1926
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1927
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1928
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1929
+ return o;
1930
+ };
1931
+ const Tt = (e) => {
1932
+ const {
1933
+ prefixCls: t,
1934
+ className: o,
1935
+ dashed: n
1936
+ } = e, r = jn(e, ["prefixCls", "className", "dashed"]), {
1937
+ getPrefixCls: l
1938
+ } = a.useContext(J), i = l("menu", t), c = M({
1939
+ [`${i}-item-divider-dashed`]: !!n
1940
+ }, o);
1941
+ return /* @__PURE__ */ a.createElement(co, Object.assign({
1942
+ className: c
1943
+ }, r));
1944
+ }, _t = (e) => {
1945
+ var t;
1946
+ const {
1947
+ className: o,
1948
+ children: n,
1949
+ icon: r,
1950
+ title: l,
1951
+ danger: i,
1952
+ extra: c
1953
+ } = e, {
1954
+ prefixCls: s,
1955
+ firstLevel: d,
1956
+ direction: u,
1957
+ disableMenuItemTitleTooltip: p,
1958
+ inlineCollapsed: m
1959
+ } = a.useContext(Se), f = (x) => {
1960
+ const y = n == null ? void 0 : n[0], O = /* @__PURE__ */ a.createElement("span", {
1961
+ className: M(`${s}-title-content`, {
1962
+ [`${s}-title-content-with-extra`]: !!c || c === 0
1963
+ })
1964
+ }, n);
1965
+ return (!r || /* @__PURE__ */ a.isValidElement(n) && n.type === "span") && n && x && d && typeof y == "string" ? /* @__PURE__ */ a.createElement("div", {
1966
+ className: `${s}-inline-collapsed-noicon`
1967
+ }, y.charAt(0)) : O;
1968
+ }, {
1969
+ siderCollapsed: g
1970
+ } = a.useContext(Ye);
1971
+ let v = l;
1972
+ typeof l > "u" ? v = d ? n : "" : l === !1 && (v = "");
1973
+ const C = {
1974
+ title: v
1975
+ };
1976
+ !g && !m && (C.title = null, C.open = !1);
1977
+ const b = ke(n).length;
1978
+ let w = /* @__PURE__ */ a.createElement(uo, Object.assign({}, ve(e, ["title", "icon", "danger"]), {
1979
+ className: M({
1980
+ [`${s}-item-danger`]: i,
1981
+ [`${s}-item-only-child`]: (r ? b + 1 : b) === 1
1982
+ }, o),
1983
+ title: typeof l == "string" ? l : void 0
1984
+ }), se(r, {
1985
+ className: M(/* @__PURE__ */ a.isValidElement(r) ? (t = r.props) === null || t === void 0 ? void 0 : t.className : "", `${s}-item-icon`)
1986
+ }), f(m));
1987
+ return p || (w = /* @__PURE__ */ a.createElement(ze, Object.assign({}, C, {
1988
+ placement: u === "rtl" ? "left" : "right",
1989
+ overlayClassName: `${s}-inline-collapsed-tooltip`
1990
+ }), w)), w;
1991
+ };
1992
+ var Tn = function(e, t) {
1993
+ var o = {};
1994
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1995
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
1996
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
1997
+ return o;
1998
+ };
1999
+ const Oe = /* @__PURE__ */ a.createContext(null), _n = /* @__PURE__ */ a.forwardRef((e, t) => {
2000
+ const {
2001
+ children: o
2002
+ } = e, n = Tn(e, ["children"]), r = a.useContext(Oe), l = a.useMemo(() => Object.assign(Object.assign({}, r), n), [
2003
+ r,
2004
+ n.prefixCls,
2005
+ // restProps.expandIcon, Not mark as deps since this is a ReactNode
2006
+ n.mode,
2007
+ n.selectable,
2008
+ n.rootClassName
2009
+ // restProps.validator, Not mark as deps since this is a function
2010
+ ]), i = to(o), c = oo(t, i ? o.ref : null);
2011
+ return /* @__PURE__ */ a.createElement(Oe.Provider, {
2012
+ value: l
2013
+ }, /* @__PURE__ */ a.createElement($t, {
2014
+ space: !0
2015
+ }, i ? /* @__PURE__ */ a.cloneElement(o, {
2016
+ ref: c
2017
+ }) : o));
2018
+ }), Rn = (e) => {
2019
+ const {
2020
+ componentCls: t,
2021
+ motionDurationSlow: o,
2022
+ horizontalLineHeight: n,
2023
+ colorSplit: r,
2024
+ lineWidth: l,
2025
+ lineType: i,
2026
+ itemPaddingInline: c
2027
+ } = e;
2028
+ return {
2029
+ [`${t}-horizontal`]: {
2030
+ lineHeight: n,
2031
+ border: 0,
2032
+ borderBottom: `${B(l)} ${i} ${r}`,
2033
+ boxShadow: "none",
2034
+ "&::after": {
2035
+ display: "block",
2036
+ clear: "both",
2037
+ height: 0,
2038
+ content: '"\\20"'
2039
+ },
2040
+ // ======================= Item =======================
2041
+ [`${t}-item, ${t}-submenu`]: {
2042
+ position: "relative",
2043
+ display: "inline-block",
2044
+ verticalAlign: "bottom",
2045
+ paddingInline: c
2046
+ },
2047
+ [`> ${t}-item:hover,
2048
+ > ${t}-item-active,
2049
+ > ${t}-submenu ${t}-submenu-title:hover`]: {
2050
+ backgroundColor: "transparent"
2051
+ },
2052
+ [`${t}-item, ${t}-submenu-title`]: {
2053
+ transition: [`border-color ${o}`, `background ${o}`].join(",")
2054
+ },
2055
+ // ===================== Sub Menu =====================
2056
+ [`${t}-submenu-arrow`]: {
2057
+ display: "none"
2058
+ }
2059
+ }
2060
+ };
2061
+ }, Mn = (e) => {
2062
+ let {
2063
+ componentCls: t,
2064
+ menuArrowOffset: o,
2065
+ calc: n
2066
+ } = e;
2067
+ return {
2068
+ [`${t}-rtl`]: {
2069
+ direction: "rtl"
2070
+ },
2071
+ [`${t}-submenu-rtl`]: {
2072
+ transformOrigin: "100% 0"
2073
+ },
2074
+ // Vertical Arrow
2075
+ [`${t}-rtl${t}-vertical,
2076
+ ${t}-submenu-rtl ${t}-vertical`]: {
2077
+ [`${t}-submenu-arrow`]: {
2078
+ "&::before": {
2079
+ transform: `rotate(-45deg) translateY(${B(n(o).mul(-1).equal())})`
2080
+ },
2081
+ "&::after": {
2082
+ transform: `rotate(45deg) translateY(${B(o)})`
2083
+ }
2084
+ }
2085
+ }
2086
+ };
2087
+ }, lt = (e) => Object.assign({}, no(e)), st = (e, t) => {
2088
+ const {
2089
+ componentCls: o,
2090
+ itemColor: n,
2091
+ itemSelectedColor: r,
2092
+ groupTitleColor: l,
2093
+ itemBg: i,
2094
+ subMenuItemBg: c,
2095
+ itemSelectedBg: s,
2096
+ activeBarHeight: d,
2097
+ activeBarWidth: u,
2098
+ activeBarBorderWidth: p,
2099
+ motionDurationSlow: m,
2100
+ motionEaseInOut: f,
2101
+ motionEaseOut: g,
2102
+ itemPaddingInline: v,
2103
+ motionDurationMid: C,
2104
+ itemHoverColor: b,
2105
+ lineType: w,
2106
+ colorSplit: x,
2107
+ // Disabled
2108
+ itemDisabledColor: y,
2109
+ // Danger
2110
+ dangerItemColor: O,
2111
+ dangerItemHoverColor: j,
2112
+ dangerItemSelectedColor: T,
2113
+ dangerItemActiveBg: _,
2114
+ dangerItemSelectedBg: h,
2115
+ // Bg
2116
+ popupBg: E,
2117
+ itemHoverBg: z,
2118
+ itemActiveBg: P,
2119
+ menuSubMenuBg: I,
2120
+ // Horizontal
2121
+ horizontalItemSelectedColor: $,
2122
+ horizontalItemSelectedBg: D,
2123
+ horizontalItemBorderRadius: k,
2124
+ horizontalItemHoverBg: S
2125
+ } = e;
2126
+ return {
2127
+ [`${o}-${t}, ${o}-${t} > ${o}`]: {
2128
+ color: n,
2129
+ background: i,
2130
+ [`&${o}-root:focus-visible`]: Object.assign({}, lt(e)),
2131
+ // ======================== Item ========================
2132
+ [`${o}-item`]: {
2133
+ "&-group-title, &-extra": {
2134
+ color: l
2135
+ }
2136
+ },
2137
+ [`${o}-submenu-selected`]: {
2138
+ [`> ${o}-submenu-title`]: {
2139
+ color: r
2140
+ }
2141
+ },
2142
+ [`${o}-item, ${o}-submenu-title`]: {
2143
+ color: n,
2144
+ [`&:not(${o}-item-disabled):focus-visible`]: Object.assign({}, lt(e))
2145
+ },
2146
+ // Disabled
2147
+ [`${o}-item-disabled, ${o}-submenu-disabled`]: {
2148
+ color: `${y} !important`
2149
+ },
2150
+ // Hover
2151
+ [`${o}-item:not(${o}-item-selected):not(${o}-submenu-selected)`]: {
2152
+ [`&:hover, > ${o}-submenu-title:hover`]: {
2153
+ color: b
2154
+ }
2155
+ },
2156
+ [`&:not(${o}-horizontal)`]: {
2157
+ [`${o}-item:not(${o}-item-selected)`]: {
2158
+ "&:hover": {
2159
+ backgroundColor: z
2160
+ },
2161
+ "&:active": {
2162
+ backgroundColor: P
2163
+ }
2164
+ },
2165
+ [`${o}-submenu-title`]: {
2166
+ "&:hover": {
2167
+ backgroundColor: z
2168
+ },
2169
+ "&:active": {
2170
+ backgroundColor: P
2171
+ }
2172
+ }
2173
+ },
2174
+ // Danger - only Item has
2175
+ [`${o}-item-danger`]: {
2176
+ color: O,
2177
+ [`&${o}-item:hover`]: {
2178
+ [`&:not(${o}-item-selected):not(${o}-submenu-selected)`]: {
2179
+ color: j
2180
+ }
2181
+ },
2182
+ [`&${o}-item:active`]: {
2183
+ background: _
2184
+ }
2185
+ },
2186
+ [`${o}-item a`]: {
2187
+ "&, &:hover": {
2188
+ color: "inherit"
2189
+ }
2190
+ },
2191
+ [`${o}-item-selected`]: {
2192
+ color: r,
2193
+ // Danger
2194
+ [`&${o}-item-danger`]: {
2195
+ color: T
2196
+ },
2197
+ "a, a:hover": {
2198
+ color: "inherit"
2199
+ }
2200
+ },
2201
+ [`& ${o}-item-selected`]: {
2202
+ backgroundColor: s,
2203
+ // Danger
2204
+ [`&${o}-item-danger`]: {
2205
+ backgroundColor: h
2206
+ }
2207
+ },
2208
+ [`&${o}-submenu > ${o}`]: {
2209
+ backgroundColor: I
2210
+ },
2211
+ // ===== 设置浮层的颜色 =======
2212
+ // !dark 模式会被popupBg 会被rest 为 darkPopupBg
2213
+ [`&${o}-popup > ${o}`]: {
2214
+ backgroundColor: E
2215
+ },
2216
+ [`&${o}-submenu-popup > ${o}`]: {
2217
+ backgroundColor: E
2218
+ },
2219
+ // ===== 设置浮层的颜色 end =======
2220
+ // ====================== Horizontal ======================
2221
+ [`&${o}-horizontal`]: Object.assign(Object.assign({}, t === "dark" ? {
2222
+ borderBottom: 0
2223
+ } : {}), {
2224
+ [`> ${o}-item, > ${o}-submenu`]: {
2225
+ top: p,
2226
+ marginTop: e.calc(p).mul(-1).equal(),
2227
+ marginBottom: 0,
2228
+ borderRadius: k,
2229
+ "&::after": {
2230
+ position: "absolute",
2231
+ insetInline: v,
2232
+ bottom: 0,
2233
+ borderBottom: `${B(d)} solid transparent`,
2234
+ transition: `border-color ${m} ${f}`,
2235
+ content: '""'
2236
+ },
2237
+ "&:hover, &-active, &-open": {
2238
+ background: S,
2239
+ "&::after": {
2240
+ borderBottomWidth: d,
2241
+ borderBottomColor: $
2242
+ }
2243
+ },
2244
+ "&-selected": {
2245
+ color: $,
2246
+ backgroundColor: D,
2247
+ "&:hover": {
2248
+ backgroundColor: D
2249
+ },
2250
+ "&::after": {
2251
+ borderBottomWidth: d,
2252
+ borderBottomColor: $
2253
+ }
2254
+ }
2255
+ }
2256
+ }),
2257
+ // ================== Inline & Vertical ===================
2258
+ //
2259
+ [`&${o}-root`]: {
2260
+ [`&${o}-inline, &${o}-vertical`]: {
2261
+ borderInlineEnd: `${B(p)} ${w} ${x}`
2262
+ }
2263
+ },
2264
+ // ======================== Inline ========================
2265
+ [`&${o}-inline`]: {
2266
+ // Sub
2267
+ [`${o}-sub${o}-inline`]: {
2268
+ background: c
2269
+ },
2270
+ [`${o}-item`]: {
2271
+ position: "relative",
2272
+ "&::after": {
2273
+ position: "absolute",
2274
+ insetBlock: 0,
2275
+ insetInlineEnd: 0,
2276
+ borderInlineEnd: `${B(u)} solid ${r}`,
2277
+ transform: "scaleY(0.0001)",
2278
+ opacity: 0,
2279
+ transition: [`transform ${C} ${g}`, `opacity ${C} ${g}`].join(","),
2280
+ content: '""'
2281
+ },
2282
+ // Danger
2283
+ [`&${o}-item-danger`]: {
2284
+ "&::after": {
2285
+ borderInlineEndColor: T
2286
+ }
2287
+ }
2288
+ },
2289
+ [`${o}-selected, ${o}-item-selected`]: {
2290
+ "&::after": {
2291
+ transform: "scaleY(1)",
2292
+ opacity: 1,
2293
+ transition: [`transform ${C} ${f}`, `opacity ${C} ${f}`].join(",")
2294
+ }
2295
+ }
2296
+ }
2297
+ }
2298
+ };
2299
+ }, ct = (e) => {
2300
+ const {
2301
+ componentCls: t,
2302
+ itemHeight: o,
2303
+ itemMarginInline: n,
2304
+ padding: r,
2305
+ menuArrowSize: l,
2306
+ marginXS: i,
2307
+ itemMarginBlock: c,
2308
+ itemWidth: s,
2309
+ itemPaddingInline: d
2310
+ } = e, u = e.calc(l).add(r).add(i).equal();
2311
+ return {
2312
+ [`${t}-item`]: {
2313
+ position: "relative",
2314
+ overflow: "hidden"
2315
+ },
2316
+ [`${t}-item, ${t}-submenu-title`]: {
2317
+ height: o,
2318
+ lineHeight: B(o),
2319
+ paddingInline: d,
2320
+ overflow: "hidden",
2321
+ textOverflow: "ellipsis",
2322
+ marginInline: n,
2323
+ marginBlock: c,
2324
+ width: s
2325
+ },
2326
+ [`> ${t}-item,
2327
+ > ${t}-submenu > ${t}-submenu-title`]: {
2328
+ height: o,
2329
+ lineHeight: B(o)
2330
+ },
2331
+ [`${t}-item-group-list ${t}-submenu-title,
2332
+ ${t}-submenu-title`]: {
2333
+ paddingInlineEnd: u
2334
+ }
2335
+ };
2336
+ }, Dn = (e) => {
2337
+ const {
2338
+ componentCls: t,
2339
+ iconCls: o,
2340
+ itemHeight: n,
2341
+ colorTextLightSolid: r,
2342
+ dropdownWidth: l,
2343
+ controlHeightLG: i,
2344
+ motionEaseOut: c,
2345
+ paddingXL: s,
2346
+ itemMarginInline: d,
2347
+ fontSizeLG: u,
2348
+ motionDurationFast: p,
2349
+ motionDurationSlow: m,
2350
+ paddingXS: f,
2351
+ boxShadowSecondary: g,
2352
+ collapsedWidth: v,
2353
+ collapsedIconSize: C
2354
+ } = e, b = {
2355
+ height: n,
2356
+ lineHeight: B(n),
2357
+ listStylePosition: "inside",
2358
+ listStyleType: "disc"
2359
+ };
2360
+ return [
2361
+ {
2362
+ [t]: {
2363
+ "&-inline, &-vertical": Object.assign({
2364
+ [`&${t}-root`]: {
2365
+ boxShadow: "none"
2366
+ }
2367
+ }, ct(e))
2368
+ },
2369
+ [`${t}-submenu-popup`]: {
2370
+ [`${t}-vertical`]: Object.assign(Object.assign({}, ct(e)), {
2371
+ boxShadow: g
2372
+ })
2373
+ }
2374
+ },
2375
+ // Vertical only
2376
+ {
2377
+ [`${t}-submenu-popup ${t}-vertical${t}-sub`]: {
2378
+ minWidth: l,
2379
+ maxHeight: `calc(100vh - ${B(e.calc(i).mul(2.5).equal())})`,
2380
+ padding: "0",
2381
+ overflow: "hidden",
2382
+ borderInlineEnd: 0,
2383
+ // https://github.com/ant-design/ant-design/issues/22244
2384
+ // https://github.com/ant-design/ant-design/issues/26812
2385
+ "&:not([class*='-active'])": {
2386
+ overflowX: "hidden",
2387
+ overflowY: "auto"
2388
+ }
2389
+ }
2390
+ },
2391
+ // Inline Only
2392
+ {
2393
+ [`${t}-inline`]: {
2394
+ width: "100%",
2395
+ // Motion enhance for first level
2396
+ [`&${t}-root`]: {
2397
+ [`${t}-item, ${t}-submenu-title`]: {
2398
+ display: "flex",
2399
+ alignItems: "center",
2400
+ transition: [`border-color ${m}`, `background ${m}`, `padding ${p} ${c}`].join(","),
2401
+ [`> ${t}-title-content`]: {
2402
+ flex: "auto",
2403
+ minWidth: 0,
2404
+ overflow: "hidden",
2405
+ textOverflow: "ellipsis"
2406
+ },
2407
+ "> *": {
2408
+ flex: "none"
2409
+ }
2410
+ }
2411
+ },
2412
+ // >>>>> Sub
2413
+ [`${t}-sub${t}-inline`]: {
2414
+ padding: 0,
2415
+ border: 0,
2416
+ borderRadius: 0,
2417
+ boxShadow: "none",
2418
+ [`& > ${t}-submenu > ${t}-submenu-title`]: b,
2419
+ [`& ${t}-item-group-title`]: {
2420
+ paddingInlineStart: s
2421
+ }
2422
+ },
2423
+ // >>>>> Item
2424
+ [`${t}-item`]: b
2425
+ }
2426
+ },
2427
+ // Inline Collapse Only
2428
+ {
2429
+ [`${t}-inline-collapsed`]: {
2430
+ width: v,
2431
+ [`&${t}-root`]: {
2432
+ [`${t}-item, ${t}-submenu ${t}-submenu-title`]: {
2433
+ [`> ${t}-inline-collapsed-noicon`]: {
2434
+ fontSize: u,
2435
+ textAlign: "center"
2436
+ }
2437
+ }
2438
+ },
2439
+ [`> ${t}-item,
2440
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
2441
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
2442
+ > ${t}-submenu > ${t}-submenu-title`]: {
2443
+ insetInlineStart: 0,
2444
+ paddingInline: `calc(50% - ${B(e.calc(u).div(2).equal())} - ${B(d)})`,
2445
+ textOverflow: "clip",
2446
+ [`
2447
+ ${t}-submenu-arrow,
2448
+ ${t}-submenu-expand-icon
2449
+ `]: {
2450
+ opacity: 0
2451
+ },
2452
+ [`${t}-item-icon, ${o}`]: {
2453
+ margin: 0,
2454
+ fontSize: C,
2455
+ lineHeight: B(n),
2456
+ "+ span": {
2457
+ display: "inline-block",
2458
+ opacity: 0
2459
+ }
2460
+ }
2461
+ },
2462
+ [`${t}-item-icon, ${o}`]: {
2463
+ display: "inline-block"
2464
+ },
2465
+ "&-tooltip": {
2466
+ pointerEvents: "none",
2467
+ [`${t}-item-icon, ${o}`]: {
2468
+ display: "none"
2469
+ },
2470
+ "a, a:hover": {
2471
+ color: r
2472
+ }
2473
+ },
2474
+ [`${t}-item-group-title`]: Object.assign(Object.assign({}, ro), {
2475
+ paddingInline: f
2476
+ })
2477
+ }
2478
+ }
2479
+ ];
2480
+ }, dt = (e) => {
2481
+ const {
2482
+ componentCls: t,
2483
+ motionDurationSlow: o,
2484
+ motionDurationMid: n,
2485
+ motionEaseInOut: r,
2486
+ motionEaseOut: l,
2487
+ iconCls: i,
2488
+ iconSize: c,
2489
+ iconMarginInlineEnd: s
2490
+ } = e;
2491
+ return {
2492
+ // >>>>> Item
2493
+ [`${t}-item, ${t}-submenu-title`]: {
2494
+ position: "relative",
2495
+ display: "block",
2496
+ margin: 0,
2497
+ whiteSpace: "nowrap",
2498
+ cursor: "pointer",
2499
+ transition: [`border-color ${o}`, `background ${o}`, `padding calc(${o} + 0.1s) ${r}`].join(","),
2500
+ [`${t}-item-icon, ${i}`]: {
2501
+ minWidth: c,
2502
+ fontSize: c,
2503
+ transition: [`font-size ${n} ${l}`, `margin ${o} ${r}`, `color ${o}`].join(","),
2504
+ "+ span": {
2505
+ marginInlineStart: s,
2506
+ opacity: 1,
2507
+ transition: [`opacity ${o} ${r}`, `margin ${o}`, `color ${o}`].join(",")
2508
+ }
2509
+ },
2510
+ [`${t}-item-icon`]: Object.assign({}, io()),
2511
+ [`&${t}-item-only-child`]: {
2512
+ [`> ${i}, > ${t}-item-icon`]: {
2513
+ marginInlineEnd: 0
2514
+ }
2515
+ }
2516
+ },
2517
+ // Disabled state sets text to gray and nukes hover/tab effects
2518
+ [`${t}-item-disabled, ${t}-submenu-disabled`]: {
2519
+ background: "none !important",
2520
+ cursor: "not-allowed",
2521
+ "&::after": {
2522
+ borderColor: "transparent !important"
2523
+ },
2524
+ a: {
2525
+ color: "inherit !important"
2526
+ },
2527
+ [`> ${t}-submenu-title`]: {
2528
+ color: "inherit !important",
2529
+ cursor: "not-allowed"
2530
+ }
2531
+ }
2532
+ };
2533
+ }, ut = (e) => {
2534
+ const {
2535
+ componentCls: t,
2536
+ motionDurationSlow: o,
2537
+ motionEaseInOut: n,
2538
+ borderRadius: r,
2539
+ menuArrowSize: l,
2540
+ menuArrowOffset: i
2541
+ } = e;
2542
+ return {
2543
+ [`${t}-submenu`]: {
2544
+ "&-expand-icon, &-arrow": {
2545
+ position: "absolute",
2546
+ top: "50%",
2547
+ insetInlineEnd: e.margin,
2548
+ width: l,
2549
+ color: "currentcolor",
2550
+ transform: "translateY(-50%)",
2551
+ transition: `transform ${o} ${n}, opacity ${o}`
2552
+ },
2553
+ "&-arrow": {
2554
+ // →
2555
+ "&::before, &::after": {
2556
+ position: "absolute",
2557
+ width: e.calc(l).mul(0.6).equal(),
2558
+ height: e.calc(l).mul(0.15).equal(),
2559
+ backgroundColor: "currentcolor",
2560
+ borderRadius: r,
2561
+ transition: [`background ${o} ${n}`, `transform ${o} ${n}`, `top ${o} ${n}`, `color ${o} ${n}`].join(","),
2562
+ content: '""'
2563
+ },
2564
+ "&::before": {
2565
+ transform: `rotate(45deg) translateY(${B(e.calc(i).mul(-1).equal())})`
2566
+ },
2567
+ "&::after": {
2568
+ transform: `rotate(-45deg) translateY(${B(i)})`
2569
+ }
2570
+ }
2571
+ }
2572
+ };
2573
+ }, Hn = (e) => {
2574
+ const {
2575
+ antCls: t,
2576
+ componentCls: o,
2577
+ fontSize: n,
2578
+ motionDurationSlow: r,
2579
+ motionDurationMid: l,
2580
+ motionEaseInOut: i,
2581
+ paddingXS: c,
2582
+ padding: s,
2583
+ colorSplit: d,
2584
+ lineWidth: u,
2585
+ zIndexPopup: p,
2586
+ borderRadiusLG: m,
2587
+ subMenuItemBorderRadius: f,
2588
+ menuArrowSize: g,
2589
+ menuArrowOffset: v,
2590
+ lineType: C,
2591
+ groupTitleLineHeight: b,
2592
+ groupTitleFontSize: w
2593
+ } = e;
2594
+ return [
2595
+ // Misc
2596
+ {
2597
+ "": {
2598
+ [o]: Object.assign(Object.assign({}, Je()), {
2599
+ // Hidden
2600
+ "&-hidden": {
2601
+ display: "none"
2602
+ }
2603
+ })
2604
+ },
2605
+ [`${o}-submenu-hidden`]: {
2606
+ display: "none"
2607
+ }
2608
+ },
2609
+ {
2610
+ [o]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ge(e)), Je()), {
2611
+ marginBottom: 0,
2612
+ paddingInlineStart: 0,
2613
+ // Override default ul/ol
2614
+ fontSize: n,
2615
+ lineHeight: 0,
2616
+ listStyle: "none",
2617
+ outline: "none",
2618
+ // Magic cubic here but smooth transition
2619
+ transition: `width ${r} cubic-bezier(0.2, 0, 0, 1) 0s`,
2620
+ "ul, ol": {
2621
+ margin: 0,
2622
+ padding: 0,
2623
+ listStyle: "none"
2624
+ },
2625
+ // Overflow ellipsis
2626
+ "&-overflow": {
2627
+ display: "flex",
2628
+ [`${o}-item`]: {
2629
+ flex: "none"
2630
+ }
2631
+ },
2632
+ [`${o}-item, ${o}-submenu, ${o}-submenu-title`]: {
2633
+ borderRadius: e.itemBorderRadius
2634
+ },
2635
+ [`${o}-item-group-title`]: {
2636
+ padding: `${B(c)} ${B(s)}`,
2637
+ fontSize: w,
2638
+ lineHeight: b,
2639
+ transition: `all ${r}`
2640
+ },
2641
+ [`&-horizontal ${o}-submenu`]: {
2642
+ transition: [`border-color ${r} ${i}`, `background ${r} ${i}`].join(",")
2643
+ },
2644
+ [`${o}-submenu, ${o}-submenu-inline`]: {
2645
+ transition: [`border-color ${r} ${i}`, `background ${r} ${i}`, `padding ${l} ${i}`].join(",")
2646
+ },
2647
+ [`${o}-submenu ${o}-sub`]: {
2648
+ cursor: "initial",
2649
+ transition: [`background ${r} ${i}`, `padding ${r} ${i}`].join(",")
2650
+ },
2651
+ [`${o}-title-content`]: {
2652
+ transition: `color ${r}`,
2653
+ "&-with-extra": {
2654
+ display: "inline-flex",
2655
+ alignItems: "center",
2656
+ width: "100%"
2657
+ },
2658
+ // https://github.com/ant-design/ant-design/issues/41143
2659
+ [`> ${t}-typography-ellipsis-single-line`]: {
2660
+ display: "inline",
2661
+ verticalAlign: "unset"
2662
+ },
2663
+ [`${o}-item-extra`]: {
2664
+ marginInlineStart: "auto",
2665
+ paddingInlineStart: e.padding,
2666
+ fontSize: e.fontSizeSM
2667
+ }
2668
+ },
2669
+ [`${o}-item a`]: {
2670
+ "&::before": {
2671
+ position: "absolute",
2672
+ inset: 0,
2673
+ backgroundColor: "transparent",
2674
+ content: '""'
2675
+ }
2676
+ },
2677
+ // Removed a Badge related style seems it's safe
2678
+ // https://github.com/ant-design/ant-design/issues/19809
2679
+ // >>>>> Divider
2680
+ [`${o}-item-divider`]: {
2681
+ overflow: "hidden",
2682
+ lineHeight: 0,
2683
+ borderColor: d,
2684
+ borderStyle: C,
2685
+ borderWidth: 0,
2686
+ borderTopWidth: u,
2687
+ marginBlock: u,
2688
+ padding: 0,
2689
+ "&-dashed": {
2690
+ borderStyle: "dashed"
2691
+ }
2692
+ }
2693
+ }), dt(e)), {
2694
+ [`${o}-item-group`]: {
2695
+ [`${o}-item-group-list`]: {
2696
+ margin: 0,
2697
+ padding: 0,
2698
+ [`${o}-item, ${o}-submenu-title`]: {
2699
+ paddingInline: `${B(e.calc(n).mul(2).equal())} ${B(s)}`
2700
+ }
2701
+ }
2702
+ },
2703
+ // ======================= Sub Menu =======================
2704
+ "&-submenu": {
2705
+ "&-popup": {
2706
+ position: "absolute",
2707
+ zIndex: p,
2708
+ borderRadius: m,
2709
+ boxShadow: "none",
2710
+ transformOrigin: "0 0",
2711
+ [`&${o}-submenu`]: {
2712
+ background: "transparent"
2713
+ },
2714
+ // https://github.com/ant-design/ant-design/issues/13955
2715
+ "&::before": {
2716
+ position: "absolute",
2717
+ inset: 0,
2718
+ zIndex: -1,
2719
+ width: "100%",
2720
+ height: "100%",
2721
+ opacity: 0,
2722
+ content: '""'
2723
+ },
2724
+ [`> ${o}`]: Object.assign(Object.assign(Object.assign({
2725
+ borderRadius: m
2726
+ }, dt(e)), ut(e)), {
2727
+ [`${o}-item, ${o}-submenu > ${o}-submenu-title`]: {
2728
+ borderRadius: f
2729
+ },
2730
+ [`${o}-submenu-title::after`]: {
2731
+ transition: `transform ${r} ${i}`
2732
+ }
2733
+ })
2734
+ },
2735
+ "\n &-placement-leftTop,\n &-placement-bottomRight,\n ": {
2736
+ transformOrigin: "100% 0"
2737
+ },
2738
+ "\n &-placement-leftBottom,\n &-placement-topRight,\n ": {
2739
+ transformOrigin: "100% 100%"
2740
+ },
2741
+ "\n &-placement-rightBottom,\n &-placement-topLeft,\n ": {
2742
+ transformOrigin: "0 100%"
2743
+ },
2744
+ "\n &-placement-bottomLeft,\n &-placement-rightTop,\n ": {
2745
+ transformOrigin: "0 0"
2746
+ },
2747
+ "\n &-placement-leftTop,\n &-placement-leftBottom\n ": {
2748
+ paddingInlineEnd: e.paddingXS
2749
+ },
2750
+ "\n &-placement-rightTop,\n &-placement-rightBottom\n ": {
2751
+ paddingInlineStart: e.paddingXS
2752
+ },
2753
+ "\n &-placement-topRight,\n &-placement-topLeft\n ": {
2754
+ paddingBottom: e.paddingXS
2755
+ },
2756
+ "\n &-placement-bottomRight,\n &-placement-bottomLeft\n ": {
2757
+ paddingTop: e.paddingXS
2758
+ }
2759
+ }
2760
+ }), ut(e)), {
2761
+ [`&-inline-collapsed ${o}-submenu-arrow,
2762
+ &-inline ${o}-submenu-arrow`]: {
2763
+ // ↓
2764
+ "&::before": {
2765
+ transform: `rotate(-45deg) translateX(${B(v)})`
2766
+ },
2767
+ "&::after": {
2768
+ transform: `rotate(45deg) translateX(${B(e.calc(v).mul(-1).equal())})`
2769
+ }
2770
+ },
2771
+ [`${o}-submenu-open${o}-submenu-inline > ${o}-submenu-title > ${o}-submenu-arrow`]: {
2772
+ // ↑
2773
+ transform: `translateY(${B(e.calc(g).mul(0.2).mul(-1).equal())})`,
2774
+ "&::after": {
2775
+ transform: `rotate(-45deg) translateX(${B(e.calc(v).mul(-1).equal())})`
2776
+ },
2777
+ "&::before": {
2778
+ transform: `rotate(45deg) translateX(${B(v)})`
2779
+ }
2780
+ }
2781
+ })
2782
+ },
2783
+ // Integration with header element so menu items have the same height
2784
+ {
2785
+ [`${t}-layout-header`]: {
2786
+ [o]: {
2787
+ lineHeight: "inherit"
2788
+ }
2789
+ }
2790
+ }
2791
+ ];
2792
+ }, An = (e) => {
2793
+ var t, o, n;
2794
+ const {
2795
+ colorPrimary: r,
2796
+ colorError: l,
2797
+ colorTextDisabled: i,
2798
+ colorErrorBg: c,
2799
+ colorText: s,
2800
+ colorTextDescription: d,
2801
+ colorBgContainer: u,
2802
+ colorFillAlter: p,
2803
+ colorFillContent: m,
2804
+ lineWidth: f,
2805
+ lineWidthBold: g,
2806
+ controlItemBgActive: v,
2807
+ colorBgTextHover: C,
2808
+ controlHeightLG: b,
2809
+ lineHeight: w,
2810
+ colorBgElevated: x,
2811
+ marginXXS: y,
2812
+ padding: O,
2813
+ fontSize: j,
2814
+ controlHeightSM: T,
2815
+ fontSizeLG: _,
2816
+ colorTextLightSolid: h,
2817
+ colorErrorHover: E
2818
+ } = e, z = (t = e.activeBarWidth) !== null && t !== void 0 ? t : 0, P = (o = e.activeBarBorderWidth) !== null && o !== void 0 ? o : f, I = (n = e.itemMarginInline) !== null && n !== void 0 ? n : e.marginXXS, $ = new et(h).setAlpha(0.65).toRgbString();
2819
+ return {
2820
+ dropdownWidth: 160,
2821
+ zIndexPopup: e.zIndexPopupBase + 50,
2822
+ radiusItem: e.borderRadiusLG,
2823
+ itemBorderRadius: e.borderRadiusLG,
2824
+ radiusSubMenuItem: e.borderRadiusSM,
2825
+ subMenuItemBorderRadius: e.borderRadiusSM,
2826
+ colorItemText: s,
2827
+ itemColor: s,
2828
+ colorItemTextHover: s,
2829
+ itemHoverColor: s,
2830
+ colorItemTextHoverHorizontal: r,
2831
+ horizontalItemHoverColor: r,
2832
+ colorGroupTitle: d,
2833
+ groupTitleColor: d,
2834
+ colorItemTextSelected: r,
2835
+ itemSelectedColor: r,
2836
+ colorItemTextSelectedHorizontal: r,
2837
+ horizontalItemSelectedColor: r,
2838
+ colorItemBg: u,
2839
+ itemBg: u,
2840
+ colorItemBgHover: C,
2841
+ itemHoverBg: C,
2842
+ colorItemBgActive: m,
2843
+ itemActiveBg: v,
2844
+ colorSubItemBg: p,
2845
+ subMenuItemBg: p,
2846
+ colorItemBgSelected: v,
2847
+ itemSelectedBg: v,
2848
+ colorItemBgSelectedHorizontal: "transparent",
2849
+ horizontalItemSelectedBg: "transparent",
2850
+ colorActiveBarWidth: 0,
2851
+ activeBarWidth: z,
2852
+ colorActiveBarHeight: g,
2853
+ activeBarHeight: g,
2854
+ colorActiveBarBorderSize: f,
2855
+ activeBarBorderWidth: P,
2856
+ // Disabled
2857
+ colorItemTextDisabled: i,
2858
+ itemDisabledColor: i,
2859
+ // Danger
2860
+ colorDangerItemText: l,
2861
+ dangerItemColor: l,
2862
+ colorDangerItemTextHover: l,
2863
+ dangerItemHoverColor: l,
2864
+ colorDangerItemTextSelected: l,
2865
+ dangerItemSelectedColor: l,
2866
+ colorDangerItemBgActive: c,
2867
+ dangerItemActiveBg: c,
2868
+ colorDangerItemBgSelected: c,
2869
+ dangerItemSelectedBg: c,
2870
+ itemMarginInline: I,
2871
+ horizontalItemBorderRadius: 0,
2872
+ horizontalItemHoverBg: "transparent",
2873
+ itemHeight: b,
2874
+ groupTitleLineHeight: w,
2875
+ collapsedWidth: b * 2,
2876
+ popupBg: x,
2877
+ itemMarginBlock: y,
2878
+ itemPaddingInline: O,
2879
+ horizontalLineHeight: `${b * 1.15}px`,
2880
+ iconSize: j,
2881
+ iconMarginInlineEnd: T - j,
2882
+ collapsedIconSize: _,
2883
+ groupTitleFontSize: j,
2884
+ // Disabled
2885
+ darkItemDisabledColor: new et(h).setAlpha(0.25).toRgbString(),
2886
+ // Dark
2887
+ darkItemColor: $,
2888
+ darkDangerItemColor: l,
2889
+ darkItemBg: "#001529",
2890
+ darkPopupBg: "#001529",
2891
+ darkSubMenuItemBg: "#000c17",
2892
+ darkItemSelectedColor: h,
2893
+ darkItemSelectedBg: r,
2894
+ darkDangerItemSelectedBg: l,
2895
+ darkItemHoverBg: "transparent",
2896
+ darkGroupTitleColor: $,
2897
+ darkItemHoverColor: h,
2898
+ darkDangerItemHoverColor: E,
2899
+ darkDangerItemSelectedColor: h,
2900
+ darkDangerItemActiveBg: l,
2901
+ // internal
2902
+ itemWidth: z ? `calc(100% + ${P}px)` : `calc(100% - ${I * 2}px)`
2903
+ };
2904
+ }, Ln = function(e) {
2905
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
2906
+ return le("Menu", (r) => {
2907
+ const {
2908
+ colorBgElevated: l,
2909
+ controlHeightLG: i,
2910
+ fontSize: c,
2911
+ darkItemColor: s,
2912
+ darkDangerItemColor: d,
2913
+ darkItemBg: u,
2914
+ darkSubMenuItemBg: p,
2915
+ darkItemSelectedColor: m,
2916
+ darkItemSelectedBg: f,
2917
+ darkDangerItemSelectedBg: g,
2918
+ darkItemHoverBg: v,
2919
+ darkGroupTitleColor: C,
2920
+ darkItemHoverColor: b,
2921
+ darkItemDisabledColor: w,
2922
+ darkDangerItemHoverColor: x,
2923
+ darkDangerItemSelectedColor: y,
2924
+ darkDangerItemActiveBg: O,
2925
+ popupBg: j,
2926
+ darkPopupBg: T
2927
+ } = r, _ = r.calc(c).div(7).mul(5).equal(), h = ae(r, {
2928
+ menuArrowSize: _,
2929
+ menuHorizontalHeight: r.calc(i).mul(1.15).equal(),
2930
+ menuArrowOffset: r.calc(_).mul(0.25).equal(),
2931
+ menuSubMenuBg: l,
2932
+ calc: r.calc,
2933
+ popupBg: j
2934
+ }), E = ae(h, {
2935
+ itemColor: s,
2936
+ itemHoverColor: b,
2937
+ groupTitleColor: C,
2938
+ itemSelectedColor: m,
2939
+ itemBg: u,
2940
+ popupBg: T,
2941
+ subMenuItemBg: p,
2942
+ itemActiveBg: "transparent",
2943
+ itemSelectedBg: f,
2944
+ activeBarHeight: 0,
2945
+ activeBarBorderWidth: 0,
2946
+ itemHoverBg: v,
2947
+ // Disabled
2948
+ itemDisabledColor: w,
2949
+ // Danger
2950
+ dangerItemColor: d,
2951
+ dangerItemHoverColor: x,
2952
+ dangerItemSelectedColor: y,
2953
+ dangerItemActiveBg: O,
2954
+ dangerItemSelectedBg: g,
2955
+ menuSubMenuBg: p,
2956
+ // Horizontal
2957
+ horizontalItemSelectedColor: m,
2958
+ horizontalItemSelectedBg: f
2959
+ });
2960
+ return [
2961
+ // Basic
2962
+ Hn(h),
2963
+ // Horizontal
2964
+ Rn(h),
2965
+ // Hard code for some light style
2966
+ // Vertical
2967
+ Dn(h),
2968
+ // Hard code for some light style
2969
+ // Theme
2970
+ st(h, "light"),
2971
+ st(E, "dark"),
2972
+ // RTL
2973
+ Mn(h),
2974
+ // Motion
2975
+ Bo(h),
2976
+ ye(h, "slide-up"),
2977
+ ye(h, "slide-down"),
2978
+ Be(h, "zoom-big")
2979
+ ];
2980
+ }, An, {
2981
+ deprecatedTokens: [["colorGroupTitle", "groupTitleColor"], ["radiusItem", "itemBorderRadius"], ["radiusSubMenuItem", "subMenuItemBorderRadius"], ["colorItemText", "itemColor"], ["colorItemTextHover", "itemHoverColor"], ["colorItemTextHoverHorizontal", "horizontalItemHoverColor"], ["colorItemTextSelected", "itemSelectedColor"], ["colorItemTextSelectedHorizontal", "horizontalItemSelectedColor"], ["colorItemTextDisabled", "itemDisabledColor"], ["colorDangerItemText", "dangerItemColor"], ["colorDangerItemTextHover", "dangerItemHoverColor"], ["colorDangerItemTextSelected", "dangerItemSelectedColor"], ["colorDangerItemBgActive", "dangerItemActiveBg"], ["colorDangerItemBgSelected", "dangerItemSelectedBg"], ["colorItemBg", "itemBg"], ["colorItemBgHover", "itemHoverBg"], ["colorSubItemBg", "subMenuItemBg"], ["colorItemBgActive", "itemActiveBg"], ["colorItemBgSelectedHorizontal", "horizontalItemSelectedBg"], ["colorActiveBarWidth", "activeBarWidth"], ["colorActiveBarHeight", "activeBarHeight"], ["colorActiveBarBorderSize", "activeBarBorderWidth"], ["colorItemBgSelected", "itemSelectedBg"]],
2982
+ // Dropdown will handle menu style self. We do not need to handle this.
2983
+ injectStyle: o,
2984
+ unitless: {
2985
+ groupTitleLineHeight: !0
2986
+ }
2987
+ })(e, t);
2988
+ }, Rt = (e) => {
2989
+ var t;
2990
+ const {
2991
+ popupClassName: o,
2992
+ icon: n,
2993
+ title: r,
2994
+ theme: l
2995
+ } = e, i = a.useContext(Se), {
2996
+ prefixCls: c,
2997
+ inlineCollapsed: s,
2998
+ theme: d
2999
+ } = i, u = mo();
3000
+ let p;
3001
+ if (!n)
3002
+ p = s && !u.length && r && typeof r == "string" ? /* @__PURE__ */ a.createElement("div", {
3003
+ className: `${c}-inline-collapsed-noicon`
3004
+ }, r.charAt(0)) : /* @__PURE__ */ a.createElement("span", {
3005
+ className: `${c}-title-content`
3006
+ }, r);
3007
+ else {
3008
+ const g = /* @__PURE__ */ a.isValidElement(r) && r.type === "span";
3009
+ p = /* @__PURE__ */ a.createElement(a.Fragment, null, se(n, {
3010
+ className: M(/* @__PURE__ */ a.isValidElement(n) ? (t = n.props) === null || t === void 0 ? void 0 : t.className : "", `${c}-item-icon`)
3011
+ }), g ? r : /* @__PURE__ */ a.createElement("span", {
3012
+ className: `${c}-title-content`
3013
+ }, r));
3014
+ }
3015
+ const m = a.useMemo(() => Object.assign(Object.assign({}, i), {
3016
+ firstLevel: !1
3017
+ }), [i]), [f] = Ve("Menu");
3018
+ return /* @__PURE__ */ a.createElement(Se.Provider, {
3019
+ value: m
3020
+ }, /* @__PURE__ */ a.createElement(po, Object.assign({}, ve(e, ["icon"]), {
3021
+ title: p,
3022
+ popupClassName: M(c, o, `${c}-${l || d}`),
3023
+ popupStyle: Object.assign({
3024
+ zIndex: f
3025
+ }, e.popupStyle)
3026
+ })));
3027
+ };
3028
+ var kn = function(e, t) {
3029
+ var o = {};
3030
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3031
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3032
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3033
+ return o;
3034
+ };
3035
+ function _e(e) {
3036
+ return e === null || e === !1;
3037
+ }
3038
+ const Vn = {
3039
+ item: _t,
3040
+ submenu: Rt,
3041
+ divider: Tt
3042
+ }, Wn = /* @__PURE__ */ De((e, t) => {
3043
+ var o;
3044
+ const n = a.useContext(Oe), r = n || {}, {
3045
+ getPrefixCls: l,
3046
+ getPopupContainer: i,
3047
+ direction: c,
3048
+ menu: s
3049
+ } = a.useContext(J), d = l(), {
3050
+ prefixCls: u,
3051
+ className: p,
3052
+ style: m,
3053
+ theme: f = "light",
3054
+ expandIcon: g,
3055
+ _internalDisableMenuItemTitleTooltip: v,
3056
+ inlineCollapsed: C,
3057
+ siderCollapsed: b,
3058
+ rootClassName: w,
3059
+ mode: x,
3060
+ selectable: y,
3061
+ onClick: O,
3062
+ overflowedIndicatorPopupClassName: j
3063
+ } = e, T = kn(e, ["prefixCls", "className", "style", "theme", "expandIcon", "_internalDisableMenuItemTitleTooltip", "inlineCollapsed", "siderCollapsed", "rootClassName", "mode", "selectable", "onClick", "overflowedIndicatorPopupClassName"]), _ = ve(T, ["collapsedWidth"]);
3064
+ if (process.env.NODE_ENV !== "production") {
3065
+ const H = fe("Menu");
3066
+ process.env.NODE_ENV !== "production" && H(!("inlineCollapsed" in e && x !== "inline"), "usage", "`inlineCollapsed` should only be used when `mode` is inline."), process.env.NODE_ENV !== "production" && H(!(e.siderCollapsed !== void 0 && "inlineCollapsed" in e), "usage", "`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."), H.deprecated("items" in e && !e.children, "children", "items");
3067
+ }
3068
+ (o = r.validator) === null || o === void 0 || o.call(r, {
3069
+ mode: x
3070
+ });
3071
+ const h = bt(function() {
3072
+ var H;
3073
+ O == null || O.apply(void 0, arguments), (H = r.onClick) === null || H === void 0 || H.call(r);
3074
+ }), E = r.mode || x, z = y ?? r.selectable, P = a.useMemo(() => b !== void 0 ? b : C, [C, b]), I = {
3075
+ horizontal: {
3076
+ motionName: `${d}-slide-up`
3077
+ },
3078
+ inline: ao(d),
3079
+ other: {
3080
+ motionName: `${d}-zoom-big`
3081
+ }
3082
+ }, $ = l("menu", u || r.prefixCls), D = Pe($), [k, S, N] = Ln($, D, !n), R = M(`${$}-${f}`, s == null ? void 0 : s.className, p), V = a.useMemo(() => {
3083
+ var H, X;
3084
+ if (typeof g == "function" || _e(g))
3085
+ return g || null;
3086
+ if (typeof r.expandIcon == "function" || _e(r.expandIcon))
3087
+ return r.expandIcon || null;
3088
+ if (typeof (s == null ? void 0 : s.expandIcon) == "function" || _e(s == null ? void 0 : s.expandIcon))
3089
+ return (s == null ? void 0 : s.expandIcon) || null;
3090
+ const q = (H = g ?? (r == null ? void 0 : r.expandIcon)) !== null && H !== void 0 ? H : s == null ? void 0 : s.expandIcon;
3091
+ return se(q, {
3092
+ className: M(`${$}-submenu-expand-icon`, /* @__PURE__ */ a.isValidElement(q) ? (X = q.props) === null || X === void 0 ? void 0 : X.className : void 0)
3093
+ });
3094
+ }, [g, r == null ? void 0 : r.expandIcon, s == null ? void 0 : s.expandIcon, $]), Z = a.useMemo(() => ({
3095
+ prefixCls: $,
3096
+ inlineCollapsed: P || !1,
3097
+ direction: c,
3098
+ firstLevel: !0,
3099
+ theme: f,
3100
+ mode: E,
3101
+ disableMenuItemTitleTooltip: v
3102
+ }), [$, P, c, v, f]);
3103
+ return k(/* @__PURE__ */ a.createElement(Oe.Provider, {
3104
+ value: null
3105
+ }, /* @__PURE__ */ a.createElement(Se.Provider, {
3106
+ value: Z
3107
+ }, /* @__PURE__ */ a.createElement(go, Object.assign({
3108
+ getPopupContainer: i,
3109
+ overflowedIndicator: /* @__PURE__ */ a.createElement(ht, null),
3110
+ overflowedIndicatorPopupClassName: M($, `${$}-${f}`, j),
3111
+ mode: E,
3112
+ selectable: z,
3113
+ onClick: h
3114
+ }, _, {
3115
+ inlineCollapsed: P,
3116
+ style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), m),
3117
+ className: R,
3118
+ prefixCls: $,
3119
+ direction: c,
3120
+ defaultMotions: I,
3121
+ expandIcon: V,
3122
+ ref: t,
3123
+ rootClassName: M(w, S, r.rootClassName, N, D),
3124
+ _internalComponents: Vn
3125
+ })))));
3126
+ }), ue = /* @__PURE__ */ De((e, t) => {
3127
+ const o = Ie(null), n = a.useContext(Ye);
3128
+ return ft(t, () => ({
3129
+ menu: o.current,
3130
+ focus: (r) => {
3131
+ var l;
3132
+ (l = o.current) === null || l === void 0 || l.focus(r);
3133
+ }
3134
+ })), /* @__PURE__ */ a.createElement(Wn, Object.assign({
3135
+ ref: o
3136
+ }, e, n));
3137
+ });
3138
+ ue.Item = _t;
3139
+ ue.SubMenu = Rt;
3140
+ ue.Divider = Tt;
3141
+ ue.ItemGroup = fo;
3142
+ process.env.NODE_ENV !== "production" && (ue.displayName = "Menu");
3143
+ const Xn = (e) => {
3144
+ const {
3145
+ componentCls: t,
3146
+ menuCls: o,
3147
+ colorError: n,
3148
+ colorTextLightSolid: r
3149
+ } = e, l = `${o}-item`;
3150
+ return {
3151
+ [`${t}, ${t}-menu-submenu`]: {
3152
+ [`${o} ${l}`]: {
3153
+ [`&${l}-danger:not(${l}-disabled)`]: {
3154
+ color: n,
3155
+ "&:hover": {
3156
+ color: r,
3157
+ backgroundColor: n
3158
+ }
3159
+ }
3160
+ }
3161
+ }
3162
+ };
3163
+ }, Fn = (e) => {
3164
+ const {
3165
+ componentCls: t,
3166
+ menuCls: o,
3167
+ zIndexPopup: n,
3168
+ dropdownArrowDistance: r,
3169
+ sizePopupArrow: l,
3170
+ antCls: i,
3171
+ iconCls: c,
3172
+ motionDurationMid: s,
3173
+ paddingBlock: d,
3174
+ fontSize: u,
3175
+ dropdownEdgeChildPadding: p,
3176
+ colorTextDisabled: m,
3177
+ fontSizeIcon: f,
3178
+ controlPaddingHorizontal: g,
3179
+ colorBgElevated: v
3180
+ } = e;
3181
+ return [
3182
+ {
3183
+ [t]: {
3184
+ position: "absolute",
3185
+ top: -9999,
3186
+ left: {
3187
+ _skip_check_: !0,
3188
+ value: -9999
3189
+ },
3190
+ zIndex: n,
3191
+ display: "block",
3192
+ // A placeholder out of dropdown visible range to avoid close when user moving
3193
+ "&::before": {
3194
+ position: "absolute",
3195
+ insetBlock: e.calc(l).div(2).sub(r).equal(),
3196
+ // insetInlineStart: -7, // FIXME: Seems not work for hidden element
3197
+ zIndex: -9999,
3198
+ opacity: 1e-4,
3199
+ content: '""'
3200
+ },
3201
+ // Makes vertical dropdowns have a scrollbar once they become taller than the viewport.
3202
+ "&-menu-vertical": {
3203
+ maxHeight: "100vh",
3204
+ overflowY: "auto"
3205
+ },
3206
+ [`&-trigger${i}-btn`]: {
3207
+ [`& > ${c}-down, & > ${i}-btn-icon > ${c}-down`]: {
3208
+ fontSize: f
3209
+ }
3210
+ },
3211
+ [`${t}-wrap`]: {
3212
+ position: "relative",
3213
+ [`${i}-btn > ${c}-down`]: {
3214
+ fontSize: f
3215
+ },
3216
+ [`${c}-down::before`]: {
3217
+ transition: `transform ${s}`
3218
+ }
3219
+ },
3220
+ [`${t}-wrap-open`]: {
3221
+ [`${c}-down::before`]: {
3222
+ transform: "rotate(180deg)"
3223
+ }
3224
+ },
3225
+ "\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ": {
3226
+ display: "none"
3227
+ },
3228
+ // =============================================================
3229
+ // == Motion ==
3230
+ // =============================================================
3231
+ // When position is not enough for dropdown, the placement will revert.
3232
+ // We will handle this with revert motion name.
3233
+ [`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
3234
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
3235
+ &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
3236
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
3237
+ &${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
3238
+ &${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]: {
3239
+ animationName: $o
3240
+ },
3241
+ [`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
3242
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
3243
+ &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
3244
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
3245
+ &${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
3246
+ &${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]: {
3247
+ animationName: ho
3248
+ },
3249
+ [`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
3250
+ &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
3251
+ &${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]: {
3252
+ animationName: bo
3253
+ },
3254
+ [`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
3255
+ &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
3256
+ &${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]: {
3257
+ animationName: vo
3258
+ }
3259
+ }
3260
+ },
3261
+ // =============================================================
3262
+ // == Arrow style ==
3263
+ // =============================================================
3264
+ qe(e, v, {
3265
+ arrowPlacement: {}
3266
+ }),
3267
+ {
3268
+ // =============================================================
3269
+ // == Menu ==
3270
+ // =============================================================
3271
+ [`${t} ${o}`]: {
3272
+ position: "relative",
3273
+ margin: 0
3274
+ },
3275
+ [`${o}-submenu-popup`]: {
3276
+ position: "absolute",
3277
+ zIndex: n,
3278
+ background: "transparent",
3279
+ boxShadow: "none",
3280
+ transformOrigin: "0 0",
3281
+ "ul, li": {
3282
+ listStyle: "none",
3283
+ margin: 0
3284
+ }
3285
+ },
3286
+ [`${t}, ${t}-menu-submenu`]: Object.assign(Object.assign({}, ge(e)), {
3287
+ [o]: Object.assign(Object.assign({
3288
+ padding: p,
3289
+ listStyleType: "none",
3290
+ backgroundColor: v,
3291
+ backgroundClip: "padding-box",
3292
+ borderRadius: e.borderRadiusLG,
3293
+ outline: "none",
3294
+ boxShadow: e.boxShadowSecondary
3295
+ }, tt(e)), {
3296
+ "&:empty": {
3297
+ padding: 0,
3298
+ boxShadow: "none"
3299
+ },
3300
+ [`${o}-item-group-title`]: {
3301
+ padding: `${B(d)} ${B(g)}`,
3302
+ color: e.colorTextDescription,
3303
+ transition: `all ${s}`
3304
+ },
3305
+ // ======================= Item Content =======================
3306
+ [`${o}-item`]: {
3307
+ position: "relative",
3308
+ display: "flex",
3309
+ alignItems: "center"
3310
+ },
3311
+ [`${o}-item-icon`]: {
3312
+ minWidth: u,
3313
+ marginInlineEnd: e.marginXS,
3314
+ fontSize: e.fontSizeSM
3315
+ },
3316
+ [`${o}-title-content`]: {
3317
+ flex: "auto",
3318
+ "&-with-extra": {
3319
+ display: "inline-flex",
3320
+ alignItems: "center",
3321
+ width: "100%"
3322
+ },
3323
+ "> a": {
3324
+ color: "inherit",
3325
+ transition: `all ${s}`,
3326
+ "&:hover": {
3327
+ color: "inherit"
3328
+ },
3329
+ "&::after": {
3330
+ position: "absolute",
3331
+ inset: 0,
3332
+ content: '""'
3333
+ }
3334
+ },
3335
+ [`${o}-item-extra`]: {
3336
+ paddingInlineStart: e.padding,
3337
+ marginInlineStart: "auto",
3338
+ fontSize: e.fontSizeSM,
3339
+ color: e.colorTextDescription
3340
+ }
3341
+ },
3342
+ // =========================== Item ===========================
3343
+ [`${o}-item, ${o}-submenu-title`]: Object.assign(Object.assign({
3344
+ display: "flex",
3345
+ margin: 0,
3346
+ padding: `${B(d)} ${B(g)}`,
3347
+ color: e.colorText,
3348
+ fontWeight: "normal",
3349
+ fontSize: u,
3350
+ lineHeight: e.lineHeight,
3351
+ cursor: "pointer",
3352
+ transition: `all ${s}`,
3353
+ borderRadius: e.borderRadiusSM,
3354
+ "&:hover, &-active": {
3355
+ backgroundColor: e.controlItemBgHover
3356
+ }
3357
+ }, tt(e)), {
3358
+ "&-selected": {
3359
+ color: e.colorPrimary,
3360
+ backgroundColor: e.controlItemBgActive,
3361
+ "&:hover, &-active": {
3362
+ backgroundColor: e.controlItemBgActiveHover
3363
+ }
3364
+ },
3365
+ "&-disabled": {
3366
+ color: m,
3367
+ cursor: "not-allowed",
3368
+ "&:hover": {
3369
+ color: m,
3370
+ backgroundColor: v,
3371
+ cursor: "not-allowed"
3372
+ },
3373
+ a: {
3374
+ pointerEvents: "none"
3375
+ }
3376
+ },
3377
+ "&-divider": {
3378
+ height: 1,
3379
+ // By design
3380
+ margin: `${B(e.marginXXS)} 0`,
3381
+ overflow: "hidden",
3382
+ lineHeight: 0,
3383
+ backgroundColor: e.colorSplit
3384
+ },
3385
+ [`${t}-menu-submenu-expand-icon`]: {
3386
+ position: "absolute",
3387
+ insetInlineEnd: e.paddingXS,
3388
+ [`${t}-menu-submenu-arrow-icon`]: {
3389
+ marginInlineEnd: "0 !important",
3390
+ color: e.colorTextDescription,
3391
+ fontSize: f,
3392
+ fontStyle: "normal"
3393
+ }
3394
+ }
3395
+ }),
3396
+ [`${o}-item-group-list`]: {
3397
+ margin: `0 ${B(e.marginXS)}`,
3398
+ padding: 0,
3399
+ listStyle: "none"
3400
+ },
3401
+ [`${o}-submenu-title`]: {
3402
+ paddingInlineEnd: e.calc(g).add(e.fontSizeSM).equal()
3403
+ },
3404
+ [`${o}-submenu-vertical`]: {
3405
+ position: "relative"
3406
+ },
3407
+ [`${o}-submenu${o}-submenu-disabled ${t}-menu-submenu-title`]: {
3408
+ [`&, ${t}-menu-submenu-arrow-icon`]: {
3409
+ color: m,
3410
+ backgroundColor: v,
3411
+ cursor: "not-allowed"
3412
+ }
3413
+ },
3414
+ // https://github.com/ant-design/ant-design/issues/19264
3415
+ [`${o}-submenu-selected ${t}-menu-submenu-title`]: {
3416
+ color: e.colorPrimary
3417
+ }
3418
+ })
3419
+ })
3420
+ },
3421
+ // Follow code may reuse in other components
3422
+ [ye(e, "slide-up"), ye(e, "slide-down"), nt(e, "move-up"), nt(e, "move-down"), Be(e, "zoom-big")]
3423
+ ];
3424
+ }, qn = (e) => Object.assign(Object.assign({
3425
+ zIndexPopup: e.zIndexPopupBase + 50,
3426
+ paddingBlock: (e.controlHeight - e.fontSize * e.lineHeight) / 2
3427
+ }, Ne({
3428
+ contentRadius: e.borderRadiusLG,
3429
+ limitVerticalRadius: !0
3430
+ })), Fe(e)), Gn = le("Dropdown", (e) => {
3431
+ const {
3432
+ marginXXS: t,
3433
+ sizePopupArrow: o,
3434
+ paddingXXS: n,
3435
+ componentCls: r
3436
+ } = e, l = ae(e, {
3437
+ menuCls: `${r}-menu`,
3438
+ dropdownArrowDistance: e.calc(o).div(2).add(t).equal(),
3439
+ dropdownEdgeChildPadding: n
3440
+ });
3441
+ return [Fn(l), Xn(l)];
3442
+ }, qn, {
3443
+ resetStyle: !1
3444
+ }), be = (e) => {
3445
+ var t;
3446
+ const {
3447
+ menu: o,
3448
+ arrow: n,
3449
+ prefixCls: r,
3450
+ children: l,
3451
+ trigger: i,
3452
+ disabled: c,
3453
+ dropdownRender: s,
3454
+ getPopupContainer: d,
3455
+ overlayClassName: u,
3456
+ rootClassName: p,
3457
+ overlayStyle: m,
3458
+ open: f,
3459
+ onOpenChange: g,
3460
+ // Deprecated
3461
+ visible: v,
3462
+ onVisibleChange: C,
3463
+ mouseEnterDelay: b = 0.15,
3464
+ mouseLeaveDelay: w = 0.1,
3465
+ autoAdjustOverflow: x = !0,
3466
+ placement: y = "",
3467
+ overlay: O,
3468
+ transitionName: j
3469
+ } = e, {
3470
+ getPopupContainer: T,
3471
+ getPrefixCls: _,
3472
+ direction: h,
3473
+ dropdown: E
3474
+ } = a.useContext(J), z = fe("Dropdown");
3475
+ process.env.NODE_ENV !== "production" && ([["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((L) => {
3476
+ let [oe, ee] = L;
3477
+ z.deprecated(!(oe in e), oe, ee);
3478
+ }), z.deprecated(!("overlay" in e), "overlay", "menu"));
3479
+ const P = a.useMemo(() => {
3480
+ const L = _();
3481
+ return j !== void 0 ? j : y.includes("top") ? `${L}-slide-down` : `${L}-slide-up`;
3482
+ }, [_, y, j]), I = a.useMemo(() => y ? y.includes("Center") ? y.slice(0, y.indexOf("Center")) : y : h === "rtl" ? "bottomRight" : "bottomLeft", [y, h]);
3483
+ if (process.env.NODE_ENV !== "production") {
3484
+ if (y.includes("Center")) {
3485
+ const L = y.slice(0, y.indexOf("Center"));
3486
+ process.env.NODE_ENV !== "production" && z(!y.includes("Center"), "deprecated", `You are using '${y}' placement in Dropdown, which is deprecated. Try to use '${L}' instead.`);
3487
+ }
3488
+ [["visible", "open"], ["onVisibleChange", "onOpenChange"]].forEach((L) => {
3489
+ let [oe, ee] = L;
3490
+ z.deprecated(!(oe in e), oe, ee);
3491
+ });
3492
+ }
3493
+ const $ = _("dropdown", r), D = Pe($), [k, S, N] = Gn($, D), [, R] = Ae(), V = a.Children.only(l), Z = se(V, {
3494
+ className: M(`${$}-trigger`, {
3495
+ [`${$}-rtl`]: h === "rtl"
3496
+ }, V.props.className),
3497
+ disabled: (t = V.props.disabled) !== null && t !== void 0 ? t : c
3498
+ }), H = c ? [] : i, X = !!(H != null && H.includes("contextMenu")), [q, Y] = Le(!1, {
3499
+ value: f ?? v
3500
+ }), F = bt((L) => {
3501
+ g == null || g(L, {
3502
+ source: "trigger"
3503
+ }), C == null || C(L), Y(L);
3504
+ }), K = M(u, p, S, N, D, E == null ? void 0 : E.className, {
3505
+ [`${$}-rtl`]: h === "rtl"
3506
+ }), A = St({
3507
+ arrowPointAtCenter: typeof n == "object" && n.pointAtCenter,
3508
+ autoAdjustOverflow: x,
3509
+ offset: R.marginXXS,
3510
+ arrowWidth: n ? R.sizePopupArrow : 0,
3511
+ borderRadius: R.borderRadius
3512
+ }), W = a.useCallback(() => {
3513
+ o != null && o.selectable && (o != null && o.multiple) || (g == null || g(!1, {
3514
+ source: "menu"
3515
+ }), Y(!1));
3516
+ }, [o == null ? void 0 : o.selectable, o == null ? void 0 : o.multiple]), U = () => {
3517
+ let L;
3518
+ return o != null && o.items ? L = /* @__PURE__ */ a.createElement(ue, Object.assign({}, o)) : typeof O == "function" ? L = O() : L = O, s && (L = s(L)), L = a.Children.only(typeof L == "string" ? /* @__PURE__ */ a.createElement("span", null, L) : L), /* @__PURE__ */ a.createElement(_n, {
3519
+ prefixCls: `${$}-menu`,
3520
+ rootClassName: M(N, D),
3521
+ expandIcon: /* @__PURE__ */ a.createElement("span", {
3522
+ className: `${$}-menu-submenu-arrow`
3523
+ }, /* @__PURE__ */ a.createElement(we, {
3524
+ className: `${$}-menu-submenu-arrow-icon`
3525
+ })),
3526
+ mode: "vertical",
3527
+ selectable: !1,
3528
+ onClick: W,
3529
+ validator: (oe) => {
3530
+ let {
3531
+ mode: ee
3532
+ } = oe;
3533
+ process.env.NODE_ENV !== "production" && z(!ee || ee === "vertical", "usage", `mode="${ee}" is not supported for Dropdown's Menu.`);
3534
+ }
3535
+ }, L);
3536
+ }, [ie, je] = Ve("Dropdown", m == null ? void 0 : m.zIndex);
3537
+ let me = /* @__PURE__ */ a.createElement(Co, Object.assign({
3538
+ alignPoint: X
3539
+ }, ve(e, ["rootClassName"]), {
3540
+ mouseEnterDelay: b,
3541
+ mouseLeaveDelay: w,
3542
+ visible: q,
3543
+ builtinPlacements: A,
3544
+ arrow: !!n,
3545
+ overlayClassName: K,
3546
+ prefixCls: $,
3547
+ getPopupContainer: d || T,
3548
+ transitionName: P,
3549
+ trigger: H,
3550
+ overlay: U,
3551
+ placement: I,
3552
+ onVisibleChange: F,
3553
+ overlayStyle: Object.assign(Object.assign(Object.assign({}, E == null ? void 0 : E.style), m), {
3554
+ zIndex: ie
3555
+ })
3556
+ }), Z);
3557
+ return ie && (me = /* @__PURE__ */ a.createElement(Ct.Provider, {
3558
+ value: je
3559
+ }, me)), k(me);
3560
+ };
3561
+ function Yn(e) {
3562
+ return Object.assign(Object.assign({}, e), {
3563
+ align: {
3564
+ overflow: {
3565
+ adjustX: !1,
3566
+ adjustY: !1
3567
+ }
3568
+ }
3569
+ });
3570
+ }
3571
+ const Un = wo(be, "dropdown", (e) => e, Yn), Kn = (e) => /* @__PURE__ */ a.createElement(Un, Object.assign({}, e), /* @__PURE__ */ a.createElement("span", null));
3572
+ be._InternalPanelDoNotUseOrYouWillBeFired = Kn;
3573
+ process.env.NODE_ENV !== "production" && (be.displayName = "Dropdown");
3574
+ function mt(e) {
3575
+ return ["small", "middle", "large"].includes(e);
3576
+ }
3577
+ function pt(e) {
3578
+ return e ? typeof e == "number" && !Number.isNaN(e) : !1;
3579
+ }
3580
+ const Mt = /* @__PURE__ */ gt.createContext({
3581
+ latestIndex: 0
3582
+ }), Zn = Mt.Provider, Qn = (e) => {
3583
+ let {
3584
+ className: t,
3585
+ index: o,
3586
+ children: n,
3587
+ split: r,
3588
+ style: l
3589
+ } = e;
3590
+ const {
3591
+ latestIndex: i
3592
+ } = a.useContext(Mt);
3593
+ return n == null ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
3594
+ className: t,
3595
+ style: l
3596
+ }, n), o < i && r && /* @__PURE__ */ a.createElement("span", {
3597
+ className: `${t}-split`
3598
+ }, r));
3599
+ };
3600
+ var Jn = function(e, t) {
3601
+ var o = {};
3602
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3603
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3604
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3605
+ return o;
3606
+ };
3607
+ const er = /* @__PURE__ */ a.forwardRef((e, t) => {
3608
+ var o, n, r;
3609
+ const {
3610
+ getPrefixCls: l,
3611
+ space: i,
3612
+ direction: c
3613
+ } = a.useContext(J), {
3614
+ size: s = (o = i == null ? void 0 : i.size) !== null && o !== void 0 ? o : "small",
3615
+ align: d,
3616
+ className: u,
3617
+ rootClassName: p,
3618
+ children: m,
3619
+ direction: f = "horizontal",
3620
+ prefixCls: g,
3621
+ split: v,
3622
+ style: C,
3623
+ wrap: b = !1,
3624
+ classNames: w,
3625
+ styles: x
3626
+ } = e, y = Jn(e, ["size", "align", "className", "rootClassName", "children", "direction", "prefixCls", "split", "style", "wrap", "classNames", "styles"]), [O, j] = Array.isArray(s) ? s : [s, s], T = mt(j), _ = mt(O), h = pt(j), E = pt(O), z = ke(m, {
3627
+ keepEmpty: !0
3628
+ }), P = d === void 0 && f === "horizontal" ? "center" : d, I = l("space", g), [$, D, k] = xo(I), S = M(I, i == null ? void 0 : i.className, D, `${I}-${f}`, {
3629
+ [`${I}-rtl`]: c === "rtl",
3630
+ [`${I}-align-${P}`]: P,
3631
+ [`${I}-gap-row-${j}`]: T,
3632
+ [`${I}-gap-col-${O}`]: _
3633
+ }, u, p, k), N = M(`${I}-item`, (n = w == null ? void 0 : w.item) !== null && n !== void 0 ? n : (r = i == null ? void 0 : i.classNames) === null || r === void 0 ? void 0 : r.item);
3634
+ let R = 0;
3635
+ const V = z.map((X, q) => {
3636
+ var Y, F;
3637
+ X != null && (R = q);
3638
+ const K = (X == null ? void 0 : X.key) || `${N}-${q}`;
3639
+ return /* @__PURE__ */ a.createElement(Qn, {
3640
+ className: N,
3641
+ key: K,
3642
+ index: q,
3643
+ split: v,
3644
+ style: (Y = x == null ? void 0 : x.item) !== null && Y !== void 0 ? Y : (F = i == null ? void 0 : i.styles) === null || F === void 0 ? void 0 : F.item
3645
+ }, X);
3646
+ }), Z = a.useMemo(() => ({
3647
+ latestIndex: R
3648
+ }), [R]);
3649
+ if (z.length === 0)
3650
+ return null;
3651
+ const H = {};
3652
+ return b && (H.flexWrap = "wrap"), !_ && E && (H.columnGap = O), !T && h && (H.rowGap = j), $(/* @__PURE__ */ a.createElement("div", Object.assign({
3653
+ ref: t,
3654
+ className: S,
3655
+ style: Object.assign(Object.assign(Object.assign({}, H), i == null ? void 0 : i.style), C)
3656
+ }, y), /* @__PURE__ */ a.createElement(Zn, {
3657
+ value: Z
3658
+ }, V)));
3659
+ }), Ue = er;
3660
+ Ue.Compact = So;
3661
+ process.env.NODE_ENV !== "production" && (Ue.displayName = "Space");
3662
+ var tr = function(e, t) {
3663
+ var o = {};
3664
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
3665
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
3666
+ t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (o[n[r]] = e[n[r]]);
3667
+ return o;
3668
+ };
3669
+ const Dt = (e) => {
3670
+ const {
3671
+ getPopupContainer: t,
3672
+ getPrefixCls: o,
3673
+ direction: n
3674
+ } = a.useContext(J), {
3675
+ prefixCls: r,
3676
+ type: l = "default",
3677
+ danger: i,
3678
+ disabled: c,
3679
+ loading: s,
3680
+ onClick: d,
3681
+ htmlType: u,
3682
+ children: p,
3683
+ className: m,
3684
+ menu: f,
3685
+ arrow: g,
3686
+ autoFocus: v,
3687
+ overlay: C,
3688
+ trigger: b,
3689
+ align: w,
3690
+ open: x,
3691
+ onOpenChange: y,
3692
+ placement: O,
3693
+ getPopupContainer: j,
3694
+ href: T,
3695
+ icon: _ = /* @__PURE__ */ a.createElement(ht, null),
3696
+ title: h,
3697
+ buttonsRender: E = (A) => A,
3698
+ mouseEnterDelay: z,
3699
+ mouseLeaveDelay: P,
3700
+ overlayClassName: I,
3701
+ overlayStyle: $,
3702
+ destroyPopupOnHide: D,
3703
+ dropdownRender: k
3704
+ } = e, S = tr(e, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "open", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide", "dropdownRender"]), N = o("dropdown", r), R = `${N}-button`, V = {
3705
+ menu: f,
3706
+ arrow: g,
3707
+ autoFocus: v,
3708
+ align: w,
3709
+ disabled: c,
3710
+ trigger: c ? [] : b,
3711
+ onOpenChange: y,
3712
+ getPopupContainer: j || t,
3713
+ mouseEnterDelay: z,
3714
+ mouseLeaveDelay: P,
3715
+ overlayClassName: I,
3716
+ overlayStyle: $,
3717
+ destroyPopupOnHide: D,
3718
+ dropdownRender: k
3719
+ }, {
3720
+ compactSize: Z,
3721
+ compactItemClassnames: H
3722
+ } = Oo(N, n), X = M(R, H, m);
3723
+ "overlay" in e && (V.overlay = C), "open" in e && (V.open = x), "placement" in e ? V.placement = O : V.placement = n === "rtl" ? "bottomLeft" : "bottomRight";
3724
+ const q = /* @__PURE__ */ a.createElement(ot, {
3725
+ type: l,
3726
+ danger: i,
3727
+ disabled: c,
3728
+ loading: s,
3729
+ onClick: d,
3730
+ htmlType: u,
3731
+ href: T,
3732
+ title: h
3733
+ }, p), Y = /* @__PURE__ */ a.createElement(ot, {
3734
+ type: l,
3735
+ danger: i,
3736
+ icon: _
3737
+ }), [F, K] = E([q, Y]);
3738
+ return /* @__PURE__ */ a.createElement(Ue.Compact, Object.assign({
3739
+ className: X,
3740
+ size: Z,
3741
+ block: !0
3742
+ }, S), F, /* @__PURE__ */ a.createElement(be, Object.assign({}, V), K));
3743
+ };
3744
+ Dt.__ANT_BUTTON = !0;
3745
+ const Ht = be;
3746
+ Ht.Button = Dt;
3747
+ const or = (e) => /* @__PURE__ */ a.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ a.createElement("path", { d: "M19 9L12 16L5 9", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), nr = "_avatar_1q3yh_1", rr = "_pointer_1q3yh_7", ir = "_flexRowCenter_1q3yh_11", ar = "_userTitle_1q3yh_18", Ce = {
3748
+ avatar: nr,
3749
+ pointer: rr,
3750
+ flexRowCenter: ir,
3751
+ userTitle: ar
3752
+ }, gr = ({ items: e, user: t, collapsed: o, handleMenuClick: n }) => /* @__PURE__ */ he(Ht, { menu: { items: e, onClick: n }, trigger: ["click"], children: /* @__PURE__ */ Ft("a", { onClick: (r) => r.preventDefault(), className: Ce.flexRowCenter, children: [
3753
+ /* @__PURE__ */ he(Bt, { className: Gt(Ce.avatar, Ce.pointer), size: "large", children: t[0] }),
3754
+ !o && /* @__PURE__ */ he("span", { className: Ce.userTitle, children: t }),
3755
+ !o && /* @__PURE__ */ he(or, {})
3756
+ ] }) });
3757
+ export {
3758
+ ue as M,
3759
+ or as S,
3760
+ gr as U
3761
+ };