ysyt-react-agent-lib 1.0.0 → 1.0.2

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.
@@ -1,32 +1,26 @@
1
- import { t as K, v as Ft, K as Ne, x as Dt, B as Pe, y as nt, z as kt, e as R, c as O, A as De, p as je, d as Y, a as Ie, E as ot, G as ke, n as At, H as Ae, J as _e, P as _t, R as Te, L as Vt, g as re, m as fe, f as N, C as q, N as ge, O as Wt, Q as qt, U as Me, V as Gt, X as at, Y as Xt, r as lt, Z as Ut, k as Ce, l as rt, $ as Kt, a0 as Qt, a1 as Zt, a2 as ue, a3 as Re, a4 as Yt, a5 as st, a6 as Jt, a7 as en, a8 as tn, a9 as nn, aa as on, ab as an, ac as ln, ad as rn, ae as sn, af as it, ag as cn, ah as dn, ai as un, aj as mn, ak as fn, al as gn, am as Cn, W as pn } from "./index-DTX4tP2H.mjs";
1
+ import { t as Ft, K as Ne, g as re, m as fe, u as N, v as Dt, r as nt, x as kt, y as K, z as At, A as _t, B as Pe, E as ot, G as Vt, h as R, d as O, H as De, p as je, f as Y, c as Ie, J as at, L as ke, n as Wt, N as Ae, O as _e, P as qt, R as Te, Q as Gt, C as q, U as ge, V as Xt, X as Ut, Y as Me, Z as Kt, $ as lt, k as Ce, l as rt, a0 as Qt, a1 as Zt, a2 as Yt, a3 as ue, a4 as Re, a5 as Jt, a6 as st, a7 as en, a8 as tn, a9 as nn, aa as on, ab as an, ac as ln, ad as rn, ae as sn, af as cn, ag as it, ah as dn, ai as un, aj as mn, ak as fn, al as gn, am as Cn, W as pn } from "./index-qKFcDUB0.mjs";
2
2
  import * as r from "react";
3
3
  import $, { useContext as se, useRef as Z, useMemo as vn, useEffect as Ve } from "react";
4
- function bn() {
5
- const [e, t] = r.useState([]), o = r.useCallback((n) => (t((a) => [].concat(K(a), [n])), () => {
6
- t((a) => a.filter((l) => l !== n));
7
- }), []);
8
- return [e, o];
9
- }
10
- const hn = new Ne("antFadeIn", {
4
+ const bn = new Ne("antFadeIn", {
11
5
  "0%": {
12
6
  opacity: 0
13
7
  },
14
8
  "100%": {
15
9
  opacity: 1
16
10
  }
17
- }), yn = new Ne("antFadeOut", {
11
+ }), hn = new Ne("antFadeOut", {
18
12
  "0%": {
19
13
  opacity: 1
20
14
  },
21
15
  "100%": {
22
16
  opacity: 0
23
17
  }
24
- }), $n = function(e) {
18
+ }), yn = function(e) {
25
19
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
26
20
  const {
27
21
  antCls: o
28
22
  } = e, n = `${o}-fade`, a = t ? "&" : "";
29
- return [Ft(n, hn, yn, e.motionDurationMid, t), {
23
+ return [Ft(n, bn, hn, e.motionDurationMid, t), {
30
24
  [`
31
25
  ${a}${n}-enter,
32
26
  ${a}${n}-appear
@@ -38,1489 +32,1593 @@ const hn = new Ne("antFadeIn", {
38
32
  animationTimingFunction: "linear"
39
33
  }
40
34
  }];
41
- };
42
- function ye(e) {
43
- return !!(e != null && e.then);
44
- }
45
- const ct = (e) => {
35
+ }, $n = (e) => {
46
36
  const {
47
- type: t,
48
- children: o,
49
- prefixCls: n,
50
- buttonProps: a,
51
- close: l,
52
- autoFocus: s,
53
- emitEvent: d,
54
- isSilent: i,
55
- quitOnNullishReturnValue: f,
56
- actionFn: c
57
- } = e, u = r.useRef(!1), m = r.useRef(null), [p, y] = Dt(!1), g = function() {
58
- l == null || l.apply(void 0, arguments);
59
- };
60
- r.useEffect(() => {
61
- let v = null;
62
- return s && (v = setTimeout(() => {
63
- var x;
64
- (x = m.current) === null || x === void 0 || x.focus({
65
- preventScroll: !0
66
- });
67
- })), () => {
68
- v && clearTimeout(v);
69
- };
70
- }, []);
71
- const C = (v) => {
72
- ye(v) && (y(!0), v.then(function() {
73
- y(!1, !0), g.apply(void 0, arguments), u.current = !1;
74
- }, (x) => {
75
- if (y(!1, !0), u.current = !1, !(i != null && i()))
76
- return Promise.reject(x);
77
- }));
78
- }, b = (v) => {
79
- if (u.current)
80
- return;
81
- if (u.current = !0, !c) {
82
- g();
83
- return;
84
- }
85
- let x;
86
- if (d) {
87
- if (x = c(v), f && !ye(x)) {
88
- u.current = !1, g(v);
89
- return;
37
+ componentCls: t
38
+ } = e;
39
+ return {
40
+ // Grid system
41
+ [t]: {
42
+ display: "flex",
43
+ flexFlow: "row wrap",
44
+ minWidth: 0,
45
+ "&::before, &::after": {
46
+ display: "flex"
47
+ },
48
+ "&-no-wrap": {
49
+ flexWrap: "nowrap"
50
+ },
51
+ // The origin of the X-axis
52
+ "&-start": {
53
+ justifyContent: "flex-start"
54
+ },
55
+ // The center of the X-axis
56
+ "&-center": {
57
+ justifyContent: "center"
58
+ },
59
+ // The opposite of the X-axis
60
+ "&-end": {
61
+ justifyContent: "flex-end"
62
+ },
63
+ "&-space-between": {
64
+ justifyContent: "space-between"
65
+ },
66
+ "&-space-around": {
67
+ justifyContent: "space-around"
68
+ },
69
+ "&-space-evenly": {
70
+ justifyContent: "space-evenly"
71
+ },
72
+ // Align at the top
73
+ "&-top": {
74
+ alignItems: "flex-start"
75
+ },
76
+ // Align at the center
77
+ "&-middle": {
78
+ alignItems: "center"
79
+ },
80
+ "&-bottom": {
81
+ alignItems: "flex-end"
90
82
  }
91
- } else if (c.length)
92
- x = c(l), u.current = !1;
93
- else if (x = c(), !ye(x)) {
94
- g();
95
- return;
96
83
  }
97
- C(x);
98
84
  };
99
- return /* @__PURE__ */ r.createElement(Pe, Object.assign({}, nt(t), {
100
- onClick: b,
101
- loading: p,
102
- prefixCls: n
103
- }, a, {
104
- ref: m
105
- }), o);
106
- }, ie = /* @__PURE__ */ $.createContext({}), {
107
- Provider: dt
108
- } = ie, We = () => {
85
+ }, xn = (e) => {
109
86
  const {
110
- autoFocusButton: e,
111
- cancelButtonProps: t,
112
- cancelTextLocale: o,
113
- isSilent: n,
114
- mergedOkCancel: a,
115
- rootPrefixCls: l,
116
- close: s,
117
- onCancel: d,
118
- onConfirm: i
119
- } = se(ie);
120
- return a ? /* @__PURE__ */ $.createElement(ct, {
121
- isSilent: n,
122
- actionFn: d,
123
- close: function() {
124
- s == null || s.apply(void 0, arguments), i == null || i(!1);
125
- },
126
- autoFocus: e === "cancel",
127
- buttonProps: t,
128
- prefixCls: `${l}-btn`
129
- }, o) : null;
130
- }, qe = () => {
87
+ componentCls: t
88
+ } = e;
89
+ return {
90
+ // Grid system
91
+ [t]: {
92
+ position: "relative",
93
+ maxWidth: "100%",
94
+ // Prevent columns from collapsing when empty
95
+ minHeight: 1
96
+ }
97
+ };
98
+ }, Sn = (e, t) => {
131
99
  const {
132
- autoFocusButton: e,
133
- close: t,
134
- isSilent: o,
135
- okButtonProps: n,
136
- rootPrefixCls: a,
137
- okTextLocale: l,
138
- okType: s,
139
- onConfirm: d,
140
- onOk: i
141
- } = se(ie);
142
- return /* @__PURE__ */ $.createElement(ct, {
143
- isSilent: o,
144
- type: s || "primary",
145
- actionFn: i,
146
- close: function() {
147
- t == null || t.apply(void 0, arguments), d == null || d(!0);
148
- },
149
- autoFocus: e === "ok",
150
- buttonProps: n,
151
- prefixCls: `${a}-btn`
152
- }, l);
153
- };
154
- var ut = /* @__PURE__ */ r.createContext({});
155
- function Ge(e, t, o) {
156
- var n = t;
157
- return !n && o && (n = "".concat(e, "-").concat(o)), n;
158
- }
159
- function Xe(e, t) {
160
- var o = e["page".concat(t ? "Y" : "X", "Offset")], n = "scroll".concat(t ? "Top" : "Left");
161
- if (typeof o != "number") {
162
- var a = e.document;
163
- o = a.documentElement[n], typeof o != "number" && (o = a.body[n]);
164
- }
165
- return o;
166
- }
167
- function xn(e) {
168
- var t = e.getBoundingClientRect(), o = {
169
- left: t.left,
170
- top: t.top
171
- }, n = e.ownerDocument, a = n.defaultView || n.parentWindow;
172
- return o.left += Xe(a), o.top += Xe(a, !0), o;
173
- }
174
- const Sn = /* @__PURE__ */ r.memo(function(e) {
175
- var t = e.children;
176
- return t;
177
- }, function(e, t) {
178
- var o = t.shouldUpdate;
179
- return !o;
180
- });
181
- var On = {
182
- width: 0,
183
- height: 0,
184
- overflow: "hidden",
185
- outline: "none"
186
- }, En = {
187
- outline: "none"
188
- }, Be = /* @__PURE__ */ $.forwardRef(function(e, t) {
189
- var o = e.prefixCls, n = e.className, a = e.style, l = e.title, s = e.ariaId, d = e.footer, i = e.closable, f = e.closeIcon, c = e.onClose, u = e.children, m = e.bodyStyle, p = e.bodyProps, y = e.modalRender, g = e.onMouseDown, C = e.onMouseUp, b = e.holderRef, v = e.visible, x = e.forceRender, E = e.width, w = e.height, S = e.classNames, h = e.styles, I = $.useContext(ut), j = I.panel, F = kt(b, j), H = Z(), L = Z();
190
- $.useImperativeHandle(t, function() {
191
- return {
192
- focus: function() {
193
- var z;
194
- (z = H.current) === null || z === void 0 || z.focus({
195
- preventScroll: !0
196
- });
100
+ prefixCls: o,
101
+ componentCls: n,
102
+ gridColumns: a
103
+ } = e, l = {};
104
+ for (let s = a; s >= 0; s--)
105
+ s === 0 ? (l[`${n}${t}-${s}`] = {
106
+ display: "none"
107
+ }, l[`${n}-push-${s}`] = {
108
+ insetInlineStart: "auto"
109
+ }, l[`${n}-pull-${s}`] = {
110
+ insetInlineEnd: "auto"
111
+ }, l[`${n}${t}-push-${s}`] = {
112
+ insetInlineStart: "auto"
113
+ }, l[`${n}${t}-pull-${s}`] = {
114
+ insetInlineEnd: "auto"
115
+ }, l[`${n}${t}-offset-${s}`] = {
116
+ marginInlineStart: 0
117
+ }, l[`${n}${t}-order-${s}`] = {
118
+ order: 0
119
+ }) : (l[`${n}${t}-${s}`] = [
120
+ // https://github.com/ant-design/ant-design/issues/44456
121
+ // Form set `display: flex` on Col which will override `display: block`.
122
+ // Let's get it from css variable to support override.
123
+ {
124
+ "--ant-display": "block",
125
+ // Fallback to display if variable not support
126
+ display: "block"
197
127
  },
198
- changeActive: function(z) {
199
- var ae = document, Q = ae.activeElement;
200
- z && Q === L.current ? H.current.focus({
201
- preventScroll: !0
202
- }) : !z && Q === H.current && L.current.focus({
203
- preventScroll: !0
204
- });
128
+ {
129
+ display: "var(--ant-display)",
130
+ flex: `0 0 ${s / a * 100}%`,
131
+ maxWidth: `${s / a * 100}%`
205
132
  }
206
- };
207
- });
208
- var X = {};
209
- E !== void 0 && (X.width = E), w !== void 0 && (X.height = w);
210
- var k = d ? /* @__PURE__ */ $.createElement("div", {
211
- className: O("".concat(o, "-footer"), S == null ? void 0 : S.footer),
212
- style: R({}, h == null ? void 0 : h.footer)
213
- }, d) : null, D = l ? /* @__PURE__ */ $.createElement("div", {
214
- className: O("".concat(o, "-header"), S == null ? void 0 : S.header),
215
- style: R({}, h == null ? void 0 : h.header)
216
- }, /* @__PURE__ */ $.createElement("div", {
217
- className: "".concat(o, "-title"),
218
- id: s
219
- }, l)) : null, W = vn(function() {
220
- return De(i) === "object" && i !== null ? i : i ? {
221
- closeIcon: f ?? /* @__PURE__ */ $.createElement("span", {
222
- className: "".concat(o, "-close-x")
223
- })
224
- } : {};
225
- }, [i, f, o]), A = je(W, !0), T = De(i) === "object" && i.disabled, J = i ? /* @__PURE__ */ $.createElement("button", Y({
226
- type: "button",
227
- onClick: c,
228
- "aria-label": "Close"
229
- }, A, {
230
- className: "".concat(o, "-close"),
231
- disabled: T
232
- }), W.closeIcon) : null, B = /* @__PURE__ */ $.createElement("div", {
233
- className: O("".concat(o, "-content"), S == null ? void 0 : S.content),
234
- style: h == null ? void 0 : h.content
235
- }, J, D, /* @__PURE__ */ $.createElement("div", Y({
236
- className: O("".concat(o, "-body"), S == null ? void 0 : S.body),
237
- style: R(R({}, m), h == null ? void 0 : h.body)
238
- }, p), u), k);
239
- return /* @__PURE__ */ $.createElement("div", {
240
- key: "dialog-element",
241
- role: "dialog",
242
- "aria-labelledby": l ? s : null,
243
- "aria-modal": "true",
244
- ref: F,
245
- style: R(R({}, a), X),
246
- className: O(o, n),
247
- onMouseDown: g,
248
- onMouseUp: C
249
- }, /* @__PURE__ */ $.createElement("div", {
250
- ref: H,
251
- tabIndex: 0,
252
- style: En
253
- }, /* @__PURE__ */ $.createElement(Sn, {
254
- shouldUpdate: v || x
255
- }, y ? y(B) : B)), /* @__PURE__ */ $.createElement("div", {
256
- tabIndex: 0,
257
- ref: L,
258
- style: On
259
- }));
260
- });
261
- process.env.NODE_ENV !== "production" && (Be.displayName = "Panel");
262
- var mt = /* @__PURE__ */ r.forwardRef(function(e, t) {
263
- var o = e.prefixCls, n = e.title, a = e.style, l = e.className, s = e.visible, d = e.forceRender, i = e.destroyOnClose, f = e.motionName, c = e.ariaId, u = e.onVisibleChanged, m = e.mousePosition, p = Z(), y = r.useState(), g = Ie(y, 2), C = g[0], b = g[1], v = {};
264
- C && (v.transformOrigin = C);
265
- function x() {
266
- var E = xn(p.current);
267
- b(m && (m.x || m.y) ? "".concat(m.x - E.left, "px ").concat(m.y - E.top, "px") : "");
268
- }
269
- return /* @__PURE__ */ r.createElement(ot, {
270
- visible: s,
271
- onVisibleChanged: u,
272
- onAppearPrepare: x,
273
- onEnterPrepare: x,
274
- forceRender: d,
275
- motionName: f,
276
- removeOnLeave: i,
277
- ref: p
278
- }, function(E, w) {
279
- var S = E.className, h = E.style;
280
- return /* @__PURE__ */ r.createElement(Be, Y({}, e, {
281
- ref: t,
282
- title: n,
283
- ariaId: c,
284
- prefixCls: o,
285
- holderRef: w,
286
- style: R(R(R({}, h), a), v),
287
- className: O(l, S)
288
- }));
289
- });
133
+ ], l[`${n}${t}-push-${s}`] = {
134
+ insetInlineStart: `${s / a * 100}%`
135
+ }, l[`${n}${t}-pull-${s}`] = {
136
+ insetInlineEnd: `${s / a * 100}%`
137
+ }, l[`${n}${t}-offset-${s}`] = {
138
+ marginInlineStart: `${s / a * 100}%`
139
+ }, l[`${n}${t}-order-${s}`] = {
140
+ order: s
141
+ });
142
+ return l[`${n}${t}-flex`] = {
143
+ flex: `var(--${o}${t}-flex)`
144
+ }, l;
145
+ }, Ee = (e, t) => Sn(e, t), On = (e, t, o) => ({
146
+ [`@media (min-width: ${N(t)})`]: Object.assign({}, Ee(e, o))
147
+ }), En = () => ({}), wn = () => ({});
148
+ re("Grid", $n, En);
149
+ const ct = (e) => ({
150
+ xs: e.screenXSMin,
151
+ sm: e.screenSMMin,
152
+ md: e.screenMDMin,
153
+ lg: e.screenLGMin,
154
+ xl: e.screenXLMin,
155
+ xxl: e.screenXXLMin
290
156
  });
291
- mt.displayName = "Content";
292
- var wn = function(t) {
293
- var o = t.prefixCls, n = t.style, a = t.visible, l = t.maskProps, s = t.motionName, d = t.className;
294
- return /* @__PURE__ */ r.createElement(ot, {
295
- key: "mask",
296
- visible: a,
297
- motionName: s,
298
- leavedClassName: "".concat(o, "-mask-hidden")
299
- }, function(i, f) {
300
- var c = i.className, u = i.style;
301
- return /* @__PURE__ */ r.createElement("div", Y({
302
- ref: f,
303
- style: R(R({}, u), n),
304
- className: O("".concat(o, "-mask"), c, d)
305
- }, l));
306
- });
307
- }, Nn = function(t) {
308
- var o = t.prefixCls, n = o === void 0 ? "rc-dialog" : o, a = t.zIndex, l = t.visible, s = l === void 0 ? !1 : l, d = t.keyboard, i = d === void 0 ? !0 : d, f = t.focusTriggerAfterClose, c = f === void 0 ? !0 : f, u = t.wrapStyle, m = t.wrapClassName, p = t.wrapProps, y = t.onClose, g = t.afterOpenChange, C = t.afterClose, b = t.transitionName, v = t.animation, x = t.closable, E = x === void 0 ? !0 : x, w = t.mask, S = w === void 0 ? !0 : w, h = t.maskTransitionName, I = t.maskAnimation, j = t.maskClosable, F = j === void 0 ? !0 : j, H = t.maskStyle, L = t.maskProps, X = t.rootClassName, k = t.classNames, D = t.styles;
309
- process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(P) {
310
- ke(!(P in t), "".concat(P, " is deprecated, please use styles instead."));
311
- }), "wrapClassName" in t && ke(!1, "wrapClassName is deprecated, please use classNames instead."));
312
- var W = Z(), A = Z(), T = Z(), J = r.useState(s), B = Ie(J, 2), U = B[0], z = B[1], ae = At();
313
- function Q() {
314
- Ae(A.current, document.activeElement) || (W.current = document.activeElement);
315
- }
316
- function be() {
317
- if (!Ae(A.current, document.activeElement)) {
318
- var P;
319
- (P = T.current) === null || P === void 0 || P.focus();
320
- }
321
- }
322
- function _(P) {
323
- if (P)
324
- be();
325
- else {
326
- if (z(!1), S && W.current && c) {
327
- try {
328
- W.current.focus({
329
- preventScroll: !0
330
- });
331
- } catch {
157
+ re("Grid", (e) => {
158
+ const t = fe(e, {
159
+ gridColumns: 24
160
+ // Row is divided into 24 parts in Grid
161
+ }), o = ct(t);
162
+ return delete o.xs, [xn(t), Ee(t, ""), Ee(t, "-xs"), Object.keys(o).map((n) => On(t, o[n], `-${n}`)).reduce((n, a) => Object.assign(Object.assign({}, n), a), {})];
163
+ }, wn);
164
+ function We(e) {
165
+ return {
166
+ position: e,
167
+ inset: 0
168
+ };
169
+ }
170
+ const Nn = (e) => {
171
+ const {
172
+ componentCls: t,
173
+ antCls: o
174
+ } = e;
175
+ return [{
176
+ [`${t}-root`]: {
177
+ [`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]: {
178
+ // reset scale avoid mousePosition bug
179
+ transform: "none",
180
+ opacity: 0,
181
+ animationDuration: e.motionDurationSlow,
182
+ // https://github.com/ant-design/ant-design/issues/11777
183
+ userSelect: "none"
184
+ },
185
+ // https://github.com/ant-design/ant-design/issues/37329
186
+ // https://github.com/ant-design/ant-design/issues/40272
187
+ [`${t}${o}-zoom-leave ${t}-content`]: {
188
+ pointerEvents: "none"
189
+ },
190
+ [`${t}-mask`]: Object.assign(Object.assign({}, We("fixed")), {
191
+ zIndex: e.zIndexPopupBase,
192
+ height: "100%",
193
+ backgroundColor: e.colorBgMask,
194
+ pointerEvents: "none",
195
+ [`${t}-hidden`]: {
196
+ display: "none"
332
197
  }
333
- W.current = null;
334
- }
335
- U && (C == null || C());
336
- }
337
- g == null || g(P);
338
- }
339
- function M(P) {
340
- y == null || y(P);
341
- }
342
- var V = Z(!1), le = Z(), Bt = function() {
343
- clearTimeout(le.current), V.current = !0;
344
- }, zt = function() {
345
- le.current = setTimeout(function() {
346
- V.current = !1;
347
- });
348
- }, Fe = null;
349
- F && (Fe = function(he) {
350
- V.current ? V.current = !1 : A.current === he.target && M(he);
351
- });
352
- function Ht(P) {
353
- if (i && P.keyCode === _e.ESC) {
354
- P.stopPropagation(), M(P);
355
- return;
356
- }
357
- s && P.keyCode === _e.TAB && T.current.changeActive(!P.shiftKey);
358
- }
359
- Ve(function() {
360
- s && (z(!0), Q());
361
- }, [s]), Ve(function() {
362
- return function() {
363
- clearTimeout(le.current);
364
- };
365
- }, []);
366
- var Lt = R(R(R({
367
- zIndex: a
368
- }, u), D == null ? void 0 : D.wrapper), {}, {
369
- display: U ? null : "none"
370
- });
371
- return /* @__PURE__ */ r.createElement("div", Y({
372
- className: O("".concat(n, "-root"), X)
373
- }, je(t, {
374
- data: !0
375
- })), /* @__PURE__ */ r.createElement(wn, {
376
- prefixCls: n,
377
- visible: S && s,
378
- motionName: Ge(n, h, I),
379
- style: R(R({
380
- zIndex: a
381
- }, H), D == null ? void 0 : D.mask),
382
- maskProps: L,
383
- className: k == null ? void 0 : k.mask
384
- }), /* @__PURE__ */ r.createElement("div", Y({
385
- tabIndex: -1,
386
- onKeyDown: Ht,
387
- className: O("".concat(n, "-wrap"), m, k == null ? void 0 : k.wrapper),
388
- ref: A,
389
- onClick: Fe,
390
- style: Lt
391
- }, p), /* @__PURE__ */ r.createElement(mt, Y({}, t, {
392
- onMouseDown: Bt,
393
- onMouseUp: zt,
394
- ref: T,
395
- closable: E,
396
- ariaId: ae,
397
- prefixCls: n,
398
- visible: s && U,
399
- onClose: M,
400
- onVisibleChanged: _,
401
- motionName: Ge(n, b, v)
402
- }))));
403
- }, ft = function(t) {
404
- var o = t.visible, n = t.getContainer, a = t.forceRender, l = t.destroyOnClose, s = l === void 0 ? !1 : l, d = t.afterClose, i = t.panelRef, f = r.useState(o), c = Ie(f, 2), u = c[0], m = c[1], p = r.useMemo(function() {
405
- return {
406
- panel: i
407
- };
408
- }, [i]);
409
- return r.useEffect(function() {
410
- o && m(!0);
411
- }, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(ut.Provider, {
412
- value: p
413
- }, /* @__PURE__ */ r.createElement(_t, {
414
- open: o || a || u,
415
- autoDestroy: !1,
416
- getContainer: n,
417
- autoLock: o || u
418
- }, /* @__PURE__ */ r.createElement(Nn, Y({}, t, {
419
- destroyOnClose: s,
420
- afterClose: function() {
421
- d == null || d(), m(!1);
198
+ }),
199
+ [`${t}-wrap`]: Object.assign(Object.assign({}, We("fixed")), {
200
+ zIndex: e.zIndexPopupBase,
201
+ overflow: "auto",
202
+ outline: 0,
203
+ WebkitOverflowScrolling: "touch"
204
+ })
422
205
  }
423
- }))));
424
- };
425
- ft.displayName = "Dialog";
426
- function me(e) {
427
- if (e)
428
- return {
429
- closable: e.closable,
430
- closeIcon: e.closeIcon
431
- };
432
- }
433
- function Ue(e) {
206
+ }, {
207
+ [`${t}-root`]: yn(e)
208
+ }];
209
+ }, Pn = (e) => {
434
210
  const {
435
- closable: t,
436
- closeIcon: o
437
- } = e || {};
438
- return $.useMemo(() => {
439
- if (
440
- // If `closable`, whatever rest be should be true
441
- !t && (t === !1 || o === !1 || o === null)
442
- )
443
- return !1;
444
- if (t === void 0 && o === void 0)
445
- return null;
446
- let n = {
447
- closeIcon: typeof o != "boolean" && o !== null ? o : void 0
448
- };
449
- return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
450
- }, [t, o]);
451
- }
452
- function Ke() {
453
- const e = {};
454
- for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
455
- o[n] = arguments[n];
456
- return o.forEach((a) => {
457
- a && Object.keys(a).forEach((l) => {
458
- a[l] !== void 0 && (e[l] = a[l]);
459
- });
460
- }), e;
461
- }
462
- const Pn = {};
463
- function gt(e, t) {
464
- let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Pn;
465
- const n = Ue(e), a = Ue(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
466
- closeIcon: /* @__PURE__ */ $.createElement(Te, null)
467
- }, o), [o]), d = $.useMemo(() => n === !1 ? !1 : n ? Ke(s, a, n) : a === !1 ? !1 : a ? Ke(s, a) : s.closable ? s : !1, [n, a, s]);
468
- return $.useMemo(() => {
469
- if (d === !1)
470
- return [!1, null, l];
471
- const {
472
- closeIconRender: i
473
- } = s, {
474
- closeIcon: f
475
- } = d;
476
- let c = f;
477
- if (c != null) {
478
- i && (c = i(f));
479
- const u = je(d, !0);
480
- Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
211
+ componentCls: t
212
+ } = e;
213
+ return [
214
+ // ======================== Root =========================
215
+ {
216
+ [`${t}-root`]: {
217
+ [`${t}-wrap-rtl`]: {
218
+ direction: "rtl"
219
+ },
220
+ [`${t}-centered`]: {
221
+ textAlign: "center",
222
+ "&::before": {
223
+ display: "inline-block",
224
+ width: 0,
225
+ height: "100%",
226
+ verticalAlign: "middle",
227
+ content: '""'
228
+ },
229
+ [t]: {
230
+ top: 0,
231
+ display: "inline-block",
232
+ paddingBottom: 0,
233
+ textAlign: "start",
234
+ verticalAlign: "middle"
235
+ }
236
+ },
237
+ [`@media (max-width: ${e.screenSMMax}px)`]: {
238
+ [t]: {
239
+ maxWidth: "calc(100vw - 16px)",
240
+ margin: `${N(e.marginXS)} auto`
241
+ },
242
+ [`${t}-centered`]: {
243
+ [t]: {
244
+ flex: 1
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ // ======================== Modal ========================
251
+ {
252
+ [t]: Object.assign(Object.assign({}, nt(e)), {
253
+ pointerEvents: "none",
254
+ position: "relative",
255
+ top: 100,
256
+ width: "auto",
257
+ maxWidth: `calc(100vw - ${N(e.calc(e.margin).mul(2).equal())})`,
258
+ margin: "0 auto",
259
+ paddingBottom: e.paddingLG,
260
+ [`${t}-title`]: {
261
+ margin: 0,
262
+ color: e.titleColor,
263
+ fontWeight: e.fontWeightStrong,
264
+ fontSize: e.titleFontSize,
265
+ lineHeight: e.titleLineHeight,
266
+ wordWrap: "break-word"
267
+ },
268
+ [`${t}-content`]: {
269
+ position: "relative",
270
+ backgroundColor: e.contentBg,
271
+ backgroundClip: "padding-box",
272
+ border: 0,
273
+ borderRadius: e.borderRadiusLG,
274
+ boxShadow: e.boxShadow,
275
+ pointerEvents: "auto",
276
+ padding: e.contentPadding
277
+ },
278
+ [`${t}-close`]: Object.assign({
279
+ position: "absolute",
280
+ top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
281
+ insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
282
+ zIndex: e.calc(e.zIndexPopupBase).add(10).equal(),
283
+ padding: 0,
284
+ color: e.modalCloseIconColor,
285
+ fontWeight: e.fontWeightStrong,
286
+ lineHeight: 1,
287
+ textDecoration: "none",
288
+ background: "transparent",
289
+ borderRadius: e.borderRadiusSM,
290
+ width: e.modalCloseBtnSize,
291
+ height: e.modalCloseBtnSize,
292
+ border: 0,
293
+ outline: 0,
294
+ cursor: "pointer",
295
+ transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
296
+ "&-x": {
297
+ display: "flex",
298
+ fontSize: e.fontSizeLG,
299
+ fontStyle: "normal",
300
+ lineHeight: N(e.modalCloseBtnSize),
301
+ justifyContent: "center",
302
+ textTransform: "none",
303
+ textRendering: "auto"
304
+ },
305
+ "&:disabled": {
306
+ pointerEvents: "none"
307
+ },
308
+ "&:hover": {
309
+ color: e.modalCloseIconHoverColor,
310
+ backgroundColor: e.colorBgTextHover,
311
+ textDecoration: "none"
312
+ },
313
+ "&:active": {
314
+ backgroundColor: e.colorBgTextActive
315
+ }
316
+ }, kt(e)),
317
+ [`${t}-header`]: {
318
+ color: e.colorText,
319
+ background: e.headerBg,
320
+ borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`,
321
+ marginBottom: e.headerMarginBottom,
322
+ padding: e.headerPadding,
323
+ borderBottom: e.headerBorderBottom
324
+ },
325
+ [`${t}-body`]: {
326
+ fontSize: e.fontSize,
327
+ lineHeight: e.lineHeight,
328
+ wordWrap: "break-word",
329
+ padding: e.bodyPadding,
330
+ [`${t}-body-skeleton`]: {
331
+ width: "100%",
332
+ height: "100%",
333
+ display: "flex",
334
+ justifyContent: "center",
335
+ alignItems: "center",
336
+ margin: `${N(e.margin)} auto`
337
+ }
338
+ },
339
+ [`${t}-footer`]: {
340
+ textAlign: "end",
341
+ background: e.footerBg,
342
+ marginTop: e.footerMarginTop,
343
+ padding: e.footerPadding,
344
+ borderTop: e.footerBorderTop,
345
+ borderRadius: e.footerBorderRadius,
346
+ [`> ${e.antCls}-btn + ${e.antCls}-btn`]: {
347
+ marginInlineStart: e.marginXS
348
+ }
349
+ },
350
+ [`${t}-open`]: {
351
+ overflow: "hidden"
352
+ }
353
+ })
354
+ },
355
+ // ======================== Pure =========================
356
+ {
357
+ [`${t}-pure-panel`]: {
358
+ top: "auto",
359
+ padding: 0,
360
+ display: "flex",
361
+ flexDirection: "column",
362
+ [`${t}-content,
363
+ ${t}-body,
364
+ ${t}-confirm-body-wrapper`]: {
365
+ display: "flex",
366
+ flexDirection: "column",
367
+ flex: "auto"
368
+ },
369
+ [`${t}-confirm-body`]: {
370
+ marginBottom: "auto"
371
+ }
372
+ }
481
373
  }
482
- return [!0, c, l];
483
- }, [d, s]);
484
- }
485
- const jn = () => Vt() && window.document.documentElement, pe = (e) => {
486
- const {
487
- prefixCls: t,
488
- className: o,
489
- style: n,
490
- size: a,
491
- shape: l
492
- } = e, s = O({
493
- [`${t}-lg`]: a === "large",
494
- [`${t}-sm`]: a === "small"
495
- }), d = O({
496
- [`${t}-circle`]: l === "circle",
497
- [`${t}-square`]: l === "square",
498
- [`${t}-round`]: l === "round"
499
- }), i = r.useMemo(() => typeof a == "number" ? {
500
- width: a,
501
- height: a,
502
- lineHeight: `${a}px`
503
- } : {}, [a]);
504
- return /* @__PURE__ */ r.createElement("span", {
505
- className: O(t, s, d, o),
506
- style: Object.assign(Object.assign({}, i), n)
507
- });
508
- }, In = new Ne("ant-skeleton-loading", {
509
- "0%": {
510
- backgroundPosition: "100% 50%"
511
- },
512
- "100%": {
513
- backgroundPosition: "0 50%"
514
- }
515
- }), ve = (e) => ({
516
- height: e,
517
- lineHeight: N(e)
518
- }), ne = (e) => Object.assign({
519
- width: e
520
- }, ve(e)), Tn = (e) => ({
521
- background: e.skeletonLoadingBackground,
522
- backgroundSize: "400% 100%",
523
- animationName: In,
524
- animationDuration: e.skeletonLoadingMotionDuration,
525
- animationTimingFunction: "ease",
526
- animationIterationCount: "infinite"
527
- }), $e = (e, t) => Object.assign({
528
- width: t(e).mul(5).equal(),
529
- minWidth: t(e).mul(5).equal()
530
- }, ve(e)), Mn = (e) => {
374
+ ];
375
+ }, jn = (e) => {
531
376
  const {
532
- skeletonAvatarCls: t,
533
- gradientFromColor: o,
534
- controlHeight: n,
535
- controlHeightLG: a,
536
- controlHeightSM: l
377
+ componentCls: t
537
378
  } = e;
538
379
  return {
539
- [t]: Object.assign({
540
- display: "inline-block",
541
- verticalAlign: "top",
542
- background: o
543
- }, ne(n)),
544
- [`${t}${t}-circle`]: {
545
- borderRadius: "50%"
546
- },
547
- [`${t}${t}-lg`]: Object.assign({}, ne(a)),
548
- [`${t}${t}-sm`]: Object.assign({}, ne(l))
380
+ [`${t}-root`]: {
381
+ [`${t}-wrap-rtl`]: {
382
+ direction: "rtl",
383
+ [`${t}-confirm-body`]: {
384
+ direction: "rtl"
385
+ }
386
+ }
387
+ }
549
388
  };
550
- }, Rn = (e) => {
389
+ }, In = (e) => {
551
390
  const {
552
- controlHeight: t,
553
- borderRadiusSM: o,
554
- skeletonInputCls: n,
555
- controlHeightLG: a,
556
- controlHeightSM: l,
557
- gradientFromColor: s,
558
- calc: d
559
- } = e;
391
+ componentCls: t
392
+ } = e, o = ct(e);
393
+ delete o.xs;
394
+ const n = Object.keys(o).map((a) => ({
395
+ [`@media (min-width: ${N(o[a])})`]: {
396
+ width: `var(--${t.replace(".", "")}-${a}-width)`
397
+ }
398
+ }));
560
399
  return {
561
- [n]: Object.assign({
562
- display: "inline-block",
563
- verticalAlign: "top",
564
- background: s,
565
- borderRadius: o
566
- }, $e(t, d)),
567
- [`${n}-lg`]: Object.assign({}, $e(a, d)),
568
- [`${n}-sm`]: Object.assign({}, $e(l, d))
400
+ [`${t}-root`]: {
401
+ [t]: [{
402
+ width: `var(--${t.replace(".", "")}-xs-width)`
403
+ }].concat(K(n))
404
+ }
569
405
  };
570
- }, Qe = (e) => Object.assign({
571
- width: e
572
- }, ve(e)), Bn = (e) => {
406
+ }, dt = (e) => {
407
+ const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5;
408
+ return fe(e, {
409
+ modalHeaderHeight: e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),
410
+ modalFooterBorderColorSplit: e.colorSplit,
411
+ modalFooterBorderStyle: e.lineType,
412
+ modalFooterBorderWidth: e.lineWidth,
413
+ modalCloseIconColor: e.colorIcon,
414
+ modalCloseIconHoverColor: e.colorIconHover,
415
+ modalCloseBtnSize: e.controlHeight,
416
+ modalConfirmIconSize: e.fontHeight,
417
+ modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
418
+ });
419
+ }, ut = (e) => ({
420
+ footerBg: "transparent",
421
+ headerBg: e.colorBgElevated,
422
+ titleLineHeight: e.lineHeightHeading5,
423
+ titleFontSize: e.fontSizeHeading5,
424
+ contentBg: e.colorBgElevated,
425
+ titleColor: e.colorTextHeading,
426
+ // internal
427
+ contentPadding: e.wireframe ? 0 : `${N(e.paddingMD)} ${N(e.paddingContentHorizontalLG)}`,
428
+ headerPadding: e.wireframe ? `${N(e.padding)} ${N(e.paddingLG)}` : 0,
429
+ headerBorderBottom: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
430
+ headerMarginBottom: e.wireframe ? 0 : e.marginXS,
431
+ bodyPadding: e.wireframe ? e.paddingLG : 0,
432
+ footerPadding: e.wireframe ? `${N(e.paddingXS)} ${N(e.padding)}` : 0,
433
+ footerBorderTop: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
434
+ footerBorderRadius: e.wireframe ? `0 0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)}` : 0,
435
+ footerMarginTop: e.wireframe ? 0 : e.marginSM,
436
+ confirmBodyPadding: e.wireframe ? `${N(e.padding * 2)} ${N(e.padding * 2)} ${N(e.paddingLG)}` : 0,
437
+ confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
438
+ confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
439
+ }), mt = re("Modal", (e) => {
440
+ const t = dt(e);
441
+ return [Pn(t), jn(t), Nn(t), Dt(t, "zoom"), In(t)];
442
+ }, ut, {
443
+ unitless: {
444
+ titleLineHeight: !0
445
+ }
446
+ }), Tn = (e) => {
573
447
  const {
574
- skeletonImageCls: t,
575
- imageSizeBase: o,
576
- gradientFromColor: n,
577
- borderRadiusSM: a,
448
+ paddingXXS: t,
449
+ lineWidth: o,
450
+ tagPaddingHorizontal: n,
451
+ componentCls: a,
578
452
  calc: l
579
- } = e;
453
+ } = e, s = l(n).sub(o).equal(), d = l(t).sub(o).equal();
580
454
  return {
581
- [t]: Object.assign(Object.assign({
582
- display: "inline-flex",
583
- alignItems: "center",
584
- justifyContent: "center",
585
- verticalAlign: "middle",
586
- background: n,
587
- borderRadius: a
588
- }, Qe(l(o).mul(2).equal())), {
589
- [`${t}-path`]: {
590
- fill: "#bfbfbf"
455
+ // Result
456
+ [a]: Object.assign(Object.assign({}, nt(e)), {
457
+ display: "inline-block",
458
+ height: "auto",
459
+ // https://github.com/ant-design/ant-design/pull/47504
460
+ marginInlineEnd: e.marginXS,
461
+ paddingInline: s,
462
+ fontSize: e.tagFontSize,
463
+ lineHeight: e.tagLineHeight,
464
+ whiteSpace: "nowrap",
465
+ background: e.defaultBg,
466
+ border: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
467
+ borderRadius: e.borderRadiusSM,
468
+ opacity: 1,
469
+ transition: `all ${e.motionDurationMid}`,
470
+ textAlign: "start",
471
+ position: "relative",
472
+ // RTL
473
+ [`&${a}-rtl`]: {
474
+ direction: "rtl"
591
475
  },
592
- [`${t}-svg`]: Object.assign(Object.assign({}, Qe(o)), {
593
- maxWidth: l(o).mul(4).equal(),
594
- maxHeight: l(o).mul(4).equal()
595
- }),
596
- [`${t}-svg${t}-svg-circle`]: {
597
- borderRadius: "50%"
476
+ "&, a, a:hover": {
477
+ color: e.defaultColor
478
+ },
479
+ [`${a}-close-icon`]: {
480
+ marginInlineStart: d,
481
+ fontSize: e.tagIconSize,
482
+ color: e.colorTextDescription,
483
+ cursor: "pointer",
484
+ transition: `all ${e.motionDurationMid}`,
485
+ "&:hover": {
486
+ color: e.colorTextHeading
487
+ }
488
+ },
489
+ [`&${a}-has-color`]: {
490
+ borderColor: "transparent",
491
+ [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
492
+ color: e.colorTextLightSolid
493
+ }
494
+ },
495
+ "&-checkable": {
496
+ backgroundColor: "transparent",
497
+ borderColor: "transparent",
498
+ cursor: "pointer",
499
+ [`&:not(${a}-checkable-checked):hover`]: {
500
+ color: e.colorPrimary,
501
+ backgroundColor: e.colorFillSecondary
502
+ },
503
+ "&:active, &-checked": {
504
+ color: e.colorTextLightSolid
505
+ },
506
+ "&-checked": {
507
+ backgroundColor: e.colorPrimary,
508
+ "&:hover": {
509
+ backgroundColor: e.colorPrimaryHover
510
+ }
511
+ },
512
+ "&:active": {
513
+ backgroundColor: e.colorPrimaryActive
514
+ }
515
+ },
516
+ "&-hidden": {
517
+ display: "none"
518
+ },
519
+ // To ensure that a space will be placed between character and `Icon`.
520
+ [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
521
+ marginInlineStart: s
598
522
  }
599
523
  }),
600
- [`${t}${t}-circle`]: {
601
- borderRadius: "50%"
524
+ [`${a}-borderless`]: {
525
+ borderColor: "transparent",
526
+ background: e.tagBorderlessBg
602
527
  }
603
528
  };
604
- }, xe = (e, t, o) => {
529
+ }, Be = (e) => {
605
530
  const {
606
- skeletonButtonCls: n
607
- } = e;
608
- return {
609
- [`${o}${n}-circle`]: {
610
- width: t,
611
- minWidth: t,
612
- borderRadius: "50%"
613
- },
614
- [`${o}${n}-round`]: {
615
- borderRadius: t
531
+ lineWidth: t,
532
+ fontSizeIcon: o,
533
+ calc: n
534
+ } = e, a = e.fontSizeSM;
535
+ return fe(e, {
536
+ tagFontSize: a,
537
+ tagLineHeight: N(n(e.lineHeightSM).mul(a).equal()),
538
+ tagIconSize: n(o).sub(n(t).mul(2)).equal(),
539
+ // Tag icon is much smaller
540
+ tagPaddingHorizontal: 8,
541
+ // Fixed padding.
542
+ tagBorderlessBg: e.defaultBg
543
+ });
544
+ }, ze = (e) => ({
545
+ defaultBg: new At(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
546
+ defaultColor: e.colorText
547
+ }), ft = re("Tag", (e) => {
548
+ const t = Be(e);
549
+ return Tn(t);
550
+ }, ze);
551
+ function ye(e) {
552
+ return !!(e != null && e.then);
553
+ }
554
+ const gt = (e) => {
555
+ const {
556
+ type: t,
557
+ children: o,
558
+ prefixCls: n,
559
+ buttonProps: a,
560
+ close: l,
561
+ autoFocus: s,
562
+ emitEvent: d,
563
+ isSilent: i,
564
+ quitOnNullishReturnValue: f,
565
+ actionFn: c
566
+ } = e, u = r.useRef(!1), m = r.useRef(null), [p, y] = _t(!1), g = function() {
567
+ l == null || l.apply(void 0, arguments);
568
+ };
569
+ r.useEffect(() => {
570
+ let v = null;
571
+ return s && (v = setTimeout(() => {
572
+ var x;
573
+ (x = m.current) === null || x === void 0 || x.focus({
574
+ preventScroll: !0
575
+ });
576
+ })), () => {
577
+ v && clearTimeout(v);
578
+ };
579
+ }, []);
580
+ const C = (v) => {
581
+ ye(v) && (y(!0), v.then(function() {
582
+ y(!1, !0), g.apply(void 0, arguments), u.current = !1;
583
+ }, (x) => {
584
+ if (y(!1, !0), u.current = !1, !(i != null && i()))
585
+ return Promise.reject(x);
586
+ }));
587
+ }, b = (v) => {
588
+ if (u.current)
589
+ return;
590
+ if (u.current = !0, !c) {
591
+ g();
592
+ return;
593
+ }
594
+ let x;
595
+ if (d) {
596
+ if (x = c(v), f && !ye(x)) {
597
+ u.current = !1, g(v);
598
+ return;
599
+ }
600
+ } else if (c.length)
601
+ x = c(l), u.current = !1;
602
+ else if (x = c(), !ye(x)) {
603
+ g();
604
+ return;
616
605
  }
606
+ C(x);
617
607
  };
618
- }, Se = (e, t) => Object.assign({
619
- width: t(e).mul(2).equal(),
620
- minWidth: t(e).mul(2).equal()
621
- }, ve(e)), zn = (e) => {
608
+ return /* @__PURE__ */ r.createElement(Pe, Object.assign({}, ot(t), {
609
+ onClick: b,
610
+ loading: p,
611
+ prefixCls: n
612
+ }, a, {
613
+ ref: m
614
+ }), o);
615
+ }, ie = /* @__PURE__ */ $.createContext({}), {
616
+ Provider: Ct
617
+ } = ie, qe = () => {
622
618
  const {
623
- borderRadiusSM: t,
624
- skeletonButtonCls: o,
625
- controlHeight: n,
626
- controlHeightLG: a,
627
- controlHeightSM: l,
628
- gradientFromColor: s,
629
- calc: d
630
- } = e;
631
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
632
- [o]: Object.assign({
633
- display: "inline-block",
634
- verticalAlign: "top",
635
- background: s,
636
- borderRadius: t,
637
- width: d(n).mul(2).equal(),
638
- minWidth: d(n).mul(2).equal()
639
- }, Se(n, d))
640
- }, xe(e, n, o)), {
641
- [`${o}-lg`]: Object.assign({}, Se(a, d))
642
- }), xe(e, a, `${o}-lg`)), {
643
- [`${o}-sm`]: Object.assign({}, Se(l, d))
644
- }), xe(e, l, `${o}-sm`));
645
- }, Hn = (e) => {
619
+ autoFocusButton: e,
620
+ cancelButtonProps: t,
621
+ cancelTextLocale: o,
622
+ isSilent: n,
623
+ mergedOkCancel: a,
624
+ rootPrefixCls: l,
625
+ close: s,
626
+ onCancel: d,
627
+ onConfirm: i
628
+ } = se(ie);
629
+ return a ? /* @__PURE__ */ $.createElement(gt, {
630
+ isSilent: n,
631
+ actionFn: d,
632
+ close: function() {
633
+ s == null || s.apply(void 0, arguments), i == null || i(!1);
634
+ },
635
+ autoFocus: e === "cancel",
636
+ buttonProps: t,
637
+ prefixCls: `${l}-btn`
638
+ }, o) : null;
639
+ }, Ge = () => {
646
640
  const {
647
- componentCls: t,
648
- skeletonAvatarCls: o,
649
- skeletonTitleCls: n,
650
- skeletonParagraphCls: a,
651
- skeletonButtonCls: l,
652
- skeletonInputCls: s,
653
- skeletonImageCls: d,
654
- controlHeight: i,
655
- controlHeightLG: f,
656
- controlHeightSM: c,
657
- gradientFromColor: u,
658
- padding: m,
659
- marginSM: p,
660
- borderRadius: y,
661
- titleHeight: g,
662
- blockRadius: C,
663
- paragraphLiHeight: b,
664
- controlHeightXS: v,
665
- paragraphMarginTop: x
666
- } = e;
667
- return {
668
- [t]: {
669
- display: "table",
670
- width: "100%",
671
- [`${t}-header`]: {
672
- display: "table-cell",
673
- paddingInlineEnd: m,
674
- verticalAlign: "top",
675
- // Avatar
676
- [o]: Object.assign({
677
- display: "inline-block",
678
- verticalAlign: "top",
679
- background: u
680
- }, ne(i)),
681
- [`${o}-circle`]: {
682
- borderRadius: "50%"
683
- },
684
- [`${o}-lg`]: Object.assign({}, ne(f)),
685
- [`${o}-sm`]: Object.assign({}, ne(c))
686
- },
687
- [`${t}-content`]: {
688
- display: "table-cell",
689
- width: "100%",
690
- verticalAlign: "top",
691
- // Title
692
- [n]: {
693
- width: "100%",
694
- height: g,
695
- background: u,
696
- borderRadius: C,
697
- [`+ ${a}`]: {
698
- marginBlockStart: c
699
- }
700
- },
701
- // paragraph
702
- [a]: {
703
- padding: 0,
704
- "> li": {
705
- width: "100%",
706
- height: b,
707
- listStyle: "none",
708
- background: u,
709
- borderRadius: C,
710
- "+ li": {
711
- marginBlockStart: v
712
- }
713
- }
714
- },
715
- [`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
716
- width: "61%"
717
- }
641
+ autoFocusButton: e,
642
+ close: t,
643
+ isSilent: o,
644
+ okButtonProps: n,
645
+ rootPrefixCls: a,
646
+ okTextLocale: l,
647
+ okType: s,
648
+ onConfirm: d,
649
+ onOk: i
650
+ } = se(ie);
651
+ return /* @__PURE__ */ $.createElement(gt, {
652
+ isSilent: o,
653
+ type: s || "primary",
654
+ actionFn: i,
655
+ close: function() {
656
+ t == null || t.apply(void 0, arguments), d == null || d(!0);
657
+ },
658
+ autoFocus: e === "ok",
659
+ buttonProps: n,
660
+ prefixCls: `${a}-btn`
661
+ }, l);
662
+ };
663
+ var pt = /* @__PURE__ */ r.createContext({});
664
+ function Xe(e, t, o) {
665
+ var n = t;
666
+ return !n && o && (n = "".concat(e, "-").concat(o)), n;
667
+ }
668
+ function Ue(e, t) {
669
+ var o = e["page".concat(t ? "Y" : "X", "Offset")], n = "scroll".concat(t ? "Top" : "Left");
670
+ if (typeof o != "number") {
671
+ var a = e.document;
672
+ o = a.documentElement[n], typeof o != "number" && (o = a.body[n]);
673
+ }
674
+ return o;
675
+ }
676
+ function Mn(e) {
677
+ var t = e.getBoundingClientRect(), o = {
678
+ left: t.left,
679
+ top: t.top
680
+ }, n = e.ownerDocument, a = n.defaultView || n.parentWindow;
681
+ return o.left += Ue(a), o.top += Ue(a, !0), o;
682
+ }
683
+ const Rn = /* @__PURE__ */ r.memo(function(e) {
684
+ var t = e.children;
685
+ return t;
686
+ }, function(e, t) {
687
+ var o = t.shouldUpdate;
688
+ return !o;
689
+ });
690
+ var Bn = {
691
+ width: 0,
692
+ height: 0,
693
+ overflow: "hidden",
694
+ outline: "none"
695
+ }, zn = {
696
+ outline: "none"
697
+ }, He = /* @__PURE__ */ $.forwardRef(function(e, t) {
698
+ var o = e.prefixCls, n = e.className, a = e.style, l = e.title, s = e.ariaId, d = e.footer, i = e.closable, f = e.closeIcon, c = e.onClose, u = e.children, m = e.bodyStyle, p = e.bodyProps, y = e.modalRender, g = e.onMouseDown, C = e.onMouseUp, b = e.holderRef, v = e.visible, x = e.forceRender, E = e.width, w = e.height, S = e.classNames, h = e.styles, I = $.useContext(pt), j = I.panel, F = Vt(b, j), H = Z(), L = Z();
699
+ $.useImperativeHandle(t, function() {
700
+ return {
701
+ focus: function() {
702
+ var z;
703
+ (z = H.current) === null || z === void 0 || z.focus({
704
+ preventScroll: !0
705
+ });
718
706
  },
719
- [`&-round ${t}-content`]: {
720
- [`${n}, ${a} > li`]: {
721
- borderRadius: y
722
- }
707
+ changeActive: function(z) {
708
+ var ae = document, Q = ae.activeElement;
709
+ z && Q === L.current ? H.current.focus({
710
+ preventScroll: !0
711
+ }) : !z && Q === H.current && L.current.focus({
712
+ preventScroll: !0
713
+ });
723
714
  }
724
- },
725
- [`${t}-with-avatar ${t}-content`]: {
726
- // Title
727
- [n]: {
728
- marginBlockStart: p,
729
- [`+ ${a}`]: {
730
- marginBlockStart: x
715
+ };
716
+ });
717
+ var X = {};
718
+ E !== void 0 && (X.width = E), w !== void 0 && (X.height = w);
719
+ var k = d ? /* @__PURE__ */ $.createElement("div", {
720
+ className: O("".concat(o, "-footer"), S == null ? void 0 : S.footer),
721
+ style: R({}, h == null ? void 0 : h.footer)
722
+ }, d) : null, D = l ? /* @__PURE__ */ $.createElement("div", {
723
+ className: O("".concat(o, "-header"), S == null ? void 0 : S.header),
724
+ style: R({}, h == null ? void 0 : h.header)
725
+ }, /* @__PURE__ */ $.createElement("div", {
726
+ className: "".concat(o, "-title"),
727
+ id: s
728
+ }, l)) : null, W = vn(function() {
729
+ return De(i) === "object" && i !== null ? i : i ? {
730
+ closeIcon: f ?? /* @__PURE__ */ $.createElement("span", {
731
+ className: "".concat(o, "-close-x")
732
+ })
733
+ } : {};
734
+ }, [i, f, o]), A = je(W, !0), T = De(i) === "object" && i.disabled, J = i ? /* @__PURE__ */ $.createElement("button", Y({
735
+ type: "button",
736
+ onClick: c,
737
+ "aria-label": "Close"
738
+ }, A, {
739
+ className: "".concat(o, "-close"),
740
+ disabled: T
741
+ }), W.closeIcon) : null, B = /* @__PURE__ */ $.createElement("div", {
742
+ className: O("".concat(o, "-content"), S == null ? void 0 : S.content),
743
+ style: h == null ? void 0 : h.content
744
+ }, J, D, /* @__PURE__ */ $.createElement("div", Y({
745
+ className: O("".concat(o, "-body"), S == null ? void 0 : S.body),
746
+ style: R(R({}, m), h == null ? void 0 : h.body)
747
+ }, p), u), k);
748
+ return /* @__PURE__ */ $.createElement("div", {
749
+ key: "dialog-element",
750
+ role: "dialog",
751
+ "aria-labelledby": l ? s : null,
752
+ "aria-modal": "true",
753
+ ref: F,
754
+ style: R(R({}, a), X),
755
+ className: O(o, n),
756
+ onMouseDown: g,
757
+ onMouseUp: C
758
+ }, /* @__PURE__ */ $.createElement("div", {
759
+ ref: H,
760
+ tabIndex: 0,
761
+ style: zn
762
+ }, /* @__PURE__ */ $.createElement(Rn, {
763
+ shouldUpdate: v || x
764
+ }, y ? y(B) : B)), /* @__PURE__ */ $.createElement("div", {
765
+ tabIndex: 0,
766
+ ref: L,
767
+ style: Bn
768
+ }));
769
+ });
770
+ process.env.NODE_ENV !== "production" && (He.displayName = "Panel");
771
+ var vt = /* @__PURE__ */ r.forwardRef(function(e, t) {
772
+ var o = e.prefixCls, n = e.title, a = e.style, l = e.className, s = e.visible, d = e.forceRender, i = e.destroyOnClose, f = e.motionName, c = e.ariaId, u = e.onVisibleChanged, m = e.mousePosition, p = Z(), y = r.useState(), g = Ie(y, 2), C = g[0], b = g[1], v = {};
773
+ C && (v.transformOrigin = C);
774
+ function x() {
775
+ var E = Mn(p.current);
776
+ b(m && (m.x || m.y) ? "".concat(m.x - E.left, "px ").concat(m.y - E.top, "px") : "");
777
+ }
778
+ return /* @__PURE__ */ r.createElement(at, {
779
+ visible: s,
780
+ onVisibleChanged: u,
781
+ onAppearPrepare: x,
782
+ onEnterPrepare: x,
783
+ forceRender: d,
784
+ motionName: f,
785
+ removeOnLeave: i,
786
+ ref: p
787
+ }, function(E, w) {
788
+ var S = E.className, h = E.style;
789
+ return /* @__PURE__ */ r.createElement(He, Y({}, e, {
790
+ ref: t,
791
+ title: n,
792
+ ariaId: c,
793
+ prefixCls: o,
794
+ holderRef: w,
795
+ style: R(R(R({}, h), a), v),
796
+ className: O(l, S)
797
+ }));
798
+ });
799
+ });
800
+ vt.displayName = "Content";
801
+ var Hn = function(t) {
802
+ var o = t.prefixCls, n = t.style, a = t.visible, l = t.maskProps, s = t.motionName, d = t.className;
803
+ return /* @__PURE__ */ r.createElement(at, {
804
+ key: "mask",
805
+ visible: a,
806
+ motionName: s,
807
+ leavedClassName: "".concat(o, "-mask-hidden")
808
+ }, function(i, f) {
809
+ var c = i.className, u = i.style;
810
+ return /* @__PURE__ */ r.createElement("div", Y({
811
+ ref: f,
812
+ style: R(R({}, u), n),
813
+ className: O("".concat(o, "-mask"), c, d)
814
+ }, l));
815
+ });
816
+ }, Ln = function(t) {
817
+ var o = t.prefixCls, n = o === void 0 ? "rc-dialog" : o, a = t.zIndex, l = t.visible, s = l === void 0 ? !1 : l, d = t.keyboard, i = d === void 0 ? !0 : d, f = t.focusTriggerAfterClose, c = f === void 0 ? !0 : f, u = t.wrapStyle, m = t.wrapClassName, p = t.wrapProps, y = t.onClose, g = t.afterOpenChange, C = t.afterClose, b = t.transitionName, v = t.animation, x = t.closable, E = x === void 0 ? !0 : x, w = t.mask, S = w === void 0 ? !0 : w, h = t.maskTransitionName, I = t.maskAnimation, j = t.maskClosable, F = j === void 0 ? !0 : j, H = t.maskStyle, L = t.maskProps, X = t.rootClassName, k = t.classNames, D = t.styles;
818
+ process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(P) {
819
+ ke(!(P in t), "".concat(P, " is deprecated, please use styles instead."));
820
+ }), "wrapClassName" in t && ke(!1, "wrapClassName is deprecated, please use classNames instead."));
821
+ var W = Z(), A = Z(), T = Z(), J = r.useState(s), B = Ie(J, 2), U = B[0], z = B[1], ae = Wt();
822
+ function Q() {
823
+ Ae(A.current, document.activeElement) || (W.current = document.activeElement);
824
+ }
825
+ function be() {
826
+ if (!Ae(A.current, document.activeElement)) {
827
+ var P;
828
+ (P = T.current) === null || P === void 0 || P.focus();
829
+ }
830
+ }
831
+ function _(P) {
832
+ if (P)
833
+ be();
834
+ else {
835
+ if (z(!1), S && W.current && c) {
836
+ try {
837
+ W.current.focus({
838
+ preventScroll: !0
839
+ });
840
+ } catch {
731
841
  }
842
+ W.current = null;
732
843
  }
733
- },
734
- // Skeleton element
735
- [`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
736
- display: "inline-block",
737
- width: "auto"
738
- }, zn(e)), Mn(e)), Rn(e)), Bn(e)),
739
- // Skeleton Block Button, Input
740
- [`${t}${t}-block`]: {
741
- width: "100%",
742
- [l]: {
743
- width: "100%"
744
- },
745
- [s]: {
746
- width: "100%"
747
- }
748
- },
749
- // With active animation
750
- [`${t}${t}-active`]: {
751
- [`
752
- ${n},
753
- ${a} > li,
754
- ${o},
755
- ${l},
756
- ${s},
757
- ${d}
758
- `]: Object.assign({}, Tn(e))
844
+ U && (C == null || C());
759
845
  }
760
- };
761
- }, Ln = (e) => {
762
- const {
763
- colorFillContent: t,
764
- colorFill: o
765
- } = e, n = t, a = o;
766
- return {
767
- color: n,
768
- colorGradientEnd: a,
769
- gradientFromColor: n,
770
- gradientToColor: a,
771
- titleHeight: e.controlHeight / 2,
772
- blockRadius: e.borderRadiusSM,
773
- paragraphMarginTop: e.marginLG + e.marginXXS,
774
- paragraphLiHeight: e.controlHeight / 2
775
- };
776
- }, oe = re("Skeleton", (e) => {
777
- const {
778
- componentCls: t,
779
- calc: o
780
- } = e, n = fe(e, {
781
- skeletonAvatarCls: `${t}-avatar`,
782
- skeletonTitleCls: `${t}-title`,
783
- skeletonParagraphCls: `${t}-paragraph`,
784
- skeletonButtonCls: `${t}-button`,
785
- skeletonInputCls: `${t}-input`,
786
- skeletonImageCls: `${t}-image`,
787
- imageSizeBase: o(e.controlHeight).mul(1.5).equal(),
788
- borderRadius: 100,
789
- // Large number to make capsule shape
790
- skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
791
- skeletonLoadingMotionDuration: "1.4s"
846
+ g == null || g(P);
847
+ }
848
+ function M(P) {
849
+ y == null || y(P);
850
+ }
851
+ var V = Z(!1), le = Z(), Bt = function() {
852
+ clearTimeout(le.current), V.current = !0;
853
+ }, zt = function() {
854
+ le.current = setTimeout(function() {
855
+ V.current = !1;
856
+ });
857
+ }, Fe = null;
858
+ F && (Fe = function(he) {
859
+ V.current ? V.current = !1 : A.current === he.target && M(he);
792
860
  });
793
- return [Hn(n)];
794
- }, Ln, {
795
- deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
796
- }), Fn = (e) => {
797
- const {
798
- prefixCls: t,
799
- className: o,
800
- rootClassName: n,
801
- active: a,
802
- shape: l = "circle",
803
- size: s = "default"
804
- } = e, {
805
- getPrefixCls: d
806
- } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls", "className"]), p = O(i, `${i}-element`, {
807
- [`${i}-active`]: a
808
- }, o, n, c, u);
809
- return f(/* @__PURE__ */ r.createElement("div", {
810
- className: p
811
- }, /* @__PURE__ */ r.createElement(pe, Object.assign({
812
- prefixCls: `${i}-avatar`,
813
- shape: l,
814
- size: s
815
- }, m))));
816
- }, Dn = (e) => {
817
- const {
818
- prefixCls: t,
819
- className: o,
820
- rootClassName: n,
821
- active: a,
822
- block: l = !1,
823
- size: s = "default"
824
- } = e, {
825
- getPrefixCls: d
826
- } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
827
- [`${i}-active`]: a,
828
- [`${i}-block`]: l
829
- }, o, n, c, u);
830
- return f(/* @__PURE__ */ r.createElement("div", {
831
- className: p
832
- }, /* @__PURE__ */ r.createElement(pe, Object.assign({
833
- prefixCls: `${i}-button`,
834
- size: s
835
- }, m))));
836
- }, kn = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", An = (e) => {
837
- const {
838
- prefixCls: t,
839
- className: o,
840
- rootClassName: n,
841
- style: a,
842
- active: l
843
- } = e, {
844
- getPrefixCls: s
845
- } = r.useContext(q), d = s("skeleton", t), [i, f, c] = oe(d), u = O(d, `${d}-element`, {
846
- [`${d}-active`]: l
847
- }, o, n, f, c);
848
- return i(/* @__PURE__ */ r.createElement("div", {
849
- className: u
850
- }, /* @__PURE__ */ r.createElement("div", {
851
- className: O(`${d}-image`, o),
852
- style: a
853
- }, /* @__PURE__ */ r.createElement("svg", {
854
- viewBox: "0 0 1098 1024",
855
- xmlns: "http://www.w3.org/2000/svg",
856
- className: `${d}-image-svg`
857
- }, /* @__PURE__ */ r.createElement("title", null, "Image placeholder"), /* @__PURE__ */ r.createElement("path", {
858
- d: kn,
859
- className: `${d}-image-path`
860
- })))));
861
- }, _n = (e) => {
862
- const {
863
- prefixCls: t,
864
- className: o,
865
- rootClassName: n,
866
- active: a,
867
- block: l,
868
- size: s = "default"
869
- } = e, {
870
- getPrefixCls: d
871
- } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
872
- [`${i}-active`]: a,
873
- [`${i}-block`]: l
874
- }, o, n, c, u);
875
- return f(/* @__PURE__ */ r.createElement("div", {
876
- className: p
877
- }, /* @__PURE__ */ r.createElement(pe, Object.assign({
878
- prefixCls: `${i}-input`,
879
- size: s
880
- }, m))));
881
- }, Vn = (e) => {
882
- const {
883
- prefixCls: t,
884
- className: o,
885
- rootClassName: n,
886
- style: a,
887
- active: l,
888
- children: s
889
- } = e, {
890
- getPrefixCls: d
891
- } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = O(i, `${i}-element`, {
892
- [`${i}-active`]: l
893
- }, c, o, n, u);
894
- return f(/* @__PURE__ */ r.createElement("div", {
895
- className: m
896
- }, /* @__PURE__ */ r.createElement("div", {
897
- className: O(`${i}-image`, o),
898
- style: a
899
- }, s)));
900
- }, Wn = (e, t) => {
901
- const {
902
- width: o,
903
- rows: n = 2
904
- } = t;
905
- if (Array.isArray(o))
906
- return o[e];
907
- if (n - 1 === e)
908
- return o;
909
- }, qn = (e) => {
910
- const {
911
- prefixCls: t,
912
- className: o,
913
- style: n,
914
- rows: a
915
- } = e, l = K(new Array(a)).map((s, d) => (
916
- // eslint-disable-next-line react/no-array-index-key
917
- /* @__PURE__ */ r.createElement("li", {
918
- key: d,
919
- style: {
920
- width: Wn(d, e)
921
- }
922
- })
923
- ));
924
- return /* @__PURE__ */ r.createElement("ul", {
925
- className: O(t, o),
926
- style: n
927
- }, l);
928
- }, Gn = (e) => {
929
- let {
930
- prefixCls: t,
931
- className: o,
932
- width: n,
933
- style: a
934
- } = e;
935
- return (
936
- // biome-ignore lint/a11y/useHeadingContent: HOC here
937
- /* @__PURE__ */ r.createElement("h3", {
938
- className: O(t, o),
939
- style: Object.assign({
940
- width: n
941
- }, a)
942
- })
943
- );
861
+ function Ht(P) {
862
+ if (i && P.keyCode === _e.ESC) {
863
+ P.stopPropagation(), M(P);
864
+ return;
865
+ }
866
+ s && P.keyCode === _e.TAB && T.current.changeActive(!P.shiftKey);
867
+ }
868
+ Ve(function() {
869
+ s && (z(!0), Q());
870
+ }, [s]), Ve(function() {
871
+ return function() {
872
+ clearTimeout(le.current);
873
+ };
874
+ }, []);
875
+ var Lt = R(R(R({
876
+ zIndex: a
877
+ }, u), D == null ? void 0 : D.wrapper), {}, {
878
+ display: U ? null : "none"
879
+ });
880
+ return /* @__PURE__ */ r.createElement("div", Y({
881
+ className: O("".concat(n, "-root"), X)
882
+ }, je(t, {
883
+ data: !0
884
+ })), /* @__PURE__ */ r.createElement(Hn, {
885
+ prefixCls: n,
886
+ visible: S && s,
887
+ motionName: Xe(n, h, I),
888
+ style: R(R({
889
+ zIndex: a
890
+ }, H), D == null ? void 0 : D.mask),
891
+ maskProps: L,
892
+ className: k == null ? void 0 : k.mask
893
+ }), /* @__PURE__ */ r.createElement("div", Y({
894
+ tabIndex: -1,
895
+ onKeyDown: Ht,
896
+ className: O("".concat(n, "-wrap"), m, k == null ? void 0 : k.wrapper),
897
+ ref: A,
898
+ onClick: Fe,
899
+ style: Lt
900
+ }, p), /* @__PURE__ */ r.createElement(vt, Y({}, t, {
901
+ onMouseDown: Bt,
902
+ onMouseUp: zt,
903
+ ref: T,
904
+ closable: E,
905
+ ariaId: ae,
906
+ prefixCls: n,
907
+ visible: s && U,
908
+ onClose: M,
909
+ onVisibleChanged: _,
910
+ motionName: Xe(n, b, v)
911
+ }))));
912
+ }, bt = function(t) {
913
+ var o = t.visible, n = t.getContainer, a = t.forceRender, l = t.destroyOnClose, s = l === void 0 ? !1 : l, d = t.afterClose, i = t.panelRef, f = r.useState(o), c = Ie(f, 2), u = c[0], m = c[1], p = r.useMemo(function() {
914
+ return {
915
+ panel: i
916
+ };
917
+ }, [i]);
918
+ return r.useEffect(function() {
919
+ o && m(!0);
920
+ }, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(pt.Provider, {
921
+ value: p
922
+ }, /* @__PURE__ */ r.createElement(qt, {
923
+ open: o || a || u,
924
+ autoDestroy: !1,
925
+ getContainer: n,
926
+ autoLock: o || u
927
+ }, /* @__PURE__ */ r.createElement(Ln, Y({}, t, {
928
+ destroyOnClose: s,
929
+ afterClose: function() {
930
+ d == null || d(), m(!1);
931
+ }
932
+ }))));
944
933
  };
945
- function Oe(e) {
946
- return e && typeof e == "object" ? e : {};
934
+ bt.displayName = "Dialog";
935
+ function me(e) {
936
+ if (e)
937
+ return {
938
+ closable: e.closable,
939
+ closeIcon: e.closeIcon
940
+ };
947
941
  }
948
- function Xn(e, t) {
949
- return e && !t ? {
950
- size: "large",
951
- shape: "square"
952
- } : {
953
- size: "large",
954
- shape: "circle"
955
- };
942
+ function Ke(e) {
943
+ const {
944
+ closable: t,
945
+ closeIcon: o
946
+ } = e || {};
947
+ return $.useMemo(() => {
948
+ if (
949
+ // If `closable`, whatever rest be should be true
950
+ !t && (t === !1 || o === !1 || o === null)
951
+ )
952
+ return !1;
953
+ if (t === void 0 && o === void 0)
954
+ return null;
955
+ let n = {
956
+ closeIcon: typeof o != "boolean" && o !== null ? o : void 0
957
+ };
958
+ return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
959
+ }, [t, o]);
956
960
  }
957
- function Un(e, t) {
958
- return !e && t ? {
959
- width: "38%"
960
- } : e && t ? {
961
- width: "50%"
962
- } : {};
961
+ function Qe() {
962
+ const e = {};
963
+ for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
964
+ o[n] = arguments[n];
965
+ return o.forEach((a) => {
966
+ a && Object.keys(a).forEach((l) => {
967
+ a[l] !== void 0 && (e[l] = a[l]);
968
+ });
969
+ }), e;
963
970
  }
964
- function Kn(e, t) {
965
- const o = {};
966
- return (!e || !t) && (o.width = "61%"), !e && t ? o.rows = 3 : o.rows = 2, o;
971
+ const Fn = {};
972
+ function ht(e, t) {
973
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Fn;
974
+ const n = Ke(e), a = Ke(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
975
+ closeIcon: /* @__PURE__ */ $.createElement(Te, null)
976
+ }, o), [o]), d = $.useMemo(() => n === !1 ? !1 : n ? Qe(s, a, n) : a === !1 ? !1 : a ? Qe(s, a) : s.closable ? s : !1, [n, a, s]);
977
+ return $.useMemo(() => {
978
+ if (d === !1)
979
+ return [!1, null, l];
980
+ const {
981
+ closeIconRender: i
982
+ } = s, {
983
+ closeIcon: f
984
+ } = d;
985
+ let c = f;
986
+ if (c != null) {
987
+ i && (c = i(f));
988
+ const u = je(d, !0);
989
+ Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
990
+ }
991
+ return [!0, c, l];
992
+ }, [d, s]);
967
993
  }
968
- const te = (e) => {
994
+ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
969
995
  const {
970
996
  prefixCls: t,
971
- loading: o,
972
- className: n,
973
- rootClassName: a,
974
- style: l,
975
- children: s,
976
- avatar: d = !1,
977
- title: i = !0,
978
- paragraph: f = !0,
979
- active: c,
980
- round: u
981
- } = e, {
982
- getPrefixCls: m,
983
- direction: p,
984
- className: y,
985
- style: g
986
- } = Wt("skeleton"), C = m("skeleton", t), [b, v, x] = oe(C);
987
- if (o || !("loading" in e)) {
988
- const E = !!d, w = !!i, S = !!f;
989
- let h;
990
- if (E) {
991
- const F = Object.assign(Object.assign({
992
- prefixCls: `${C}-avatar`
993
- }, Xn(w, S)), Oe(d));
994
- h = /* @__PURE__ */ r.createElement("div", {
995
- className: `${C}-header`
996
- }, /* @__PURE__ */ r.createElement(pe, Object.assign({}, F)));
997
- }
998
- let I;
999
- if (w || S) {
1000
- let F;
1001
- if (w) {
1002
- const L = Object.assign(Object.assign({
1003
- prefixCls: `${C}-title`
1004
- }, Un(E, S)), Oe(i));
1005
- F = /* @__PURE__ */ r.createElement(Gn, Object.assign({}, L));
1006
- }
1007
- let H;
1008
- if (S) {
1009
- const L = Object.assign(Object.assign({
1010
- prefixCls: `${C}-paragraph`
1011
- }, Kn(E, w)), Oe(f));
1012
- H = /* @__PURE__ */ r.createElement(qn, Object.assign({}, L));
1013
- }
1014
- I = /* @__PURE__ */ r.createElement("div", {
1015
- className: `${C}-content`
1016
- }, F, H);
1017
- }
1018
- const j = O(C, {
1019
- [`${C}-with-avatar`]: E,
1020
- [`${C}-active`]: c,
1021
- [`${C}-rtl`]: p === "rtl",
1022
- [`${C}-round`]: u
1023
- }, y, n, a, v, x);
1024
- return b(/* @__PURE__ */ r.createElement("div", {
1025
- className: j,
1026
- style: Object.assign(Object.assign({}, g), l)
1027
- }, h, I));
1028
- }
1029
- return s ?? null;
1030
- };
1031
- te.Button = Dn;
1032
- te.Avatar = Fn;
1033
- te.Input = _n;
1034
- te.Image = An;
1035
- te.Node = Vn;
1036
- process.env.NODE_ENV !== "production" && (te.displayName = "Skeleton");
1037
- function Ze() {
1038
- }
1039
- const Qn = /* @__PURE__ */ r.createContext({
1040
- add: Ze,
1041
- remove: Ze
1042
- });
1043
- function Zn(e) {
1044
- const t = r.useContext(Qn), o = r.useRef(null);
1045
- return qt((a) => {
1046
- if (a) {
1047
- const l = e ? a.querySelector(e) : a;
1048
- t.add(l), o.current = l;
1049
- } else
1050
- t.remove(o.current);
997
+ className: o,
998
+ style: n,
999
+ size: a,
1000
+ shape: l
1001
+ } = e, s = O({
1002
+ [`${t}-lg`]: a === "large",
1003
+ [`${t}-sm`]: a === "small"
1004
+ }), d = O({
1005
+ [`${t}-circle`]: l === "circle",
1006
+ [`${t}-square`]: l === "square",
1007
+ [`${t}-round`]: l === "round"
1008
+ }), i = r.useMemo(() => typeof a == "number" ? {
1009
+ width: a,
1010
+ height: a,
1011
+ lineHeight: `${a}px`
1012
+ } : {}, [a]);
1013
+ return /* @__PURE__ */ r.createElement("span", {
1014
+ className: O(t, s, d, o),
1015
+ style: Object.assign(Object.assign({}, i), n)
1051
1016
  });
1052
- }
1053
- const Ye = () => {
1054
- const {
1055
- cancelButtonProps: e,
1056
- cancelTextLocale: t,
1057
- onCancel: o
1058
- } = se(ie);
1059
- return /* @__PURE__ */ $.createElement(Pe, Object.assign({
1060
- onClick: o
1061
- }, e), t);
1062
- }, Je = () => {
1017
+ }, kn = new Ne("ant-skeleton-loading", {
1018
+ "0%": {
1019
+ backgroundPosition: "100% 50%"
1020
+ },
1021
+ "100%": {
1022
+ backgroundPosition: "0 50%"
1023
+ }
1024
+ }), ve = (e) => ({
1025
+ height: e,
1026
+ lineHeight: N(e)
1027
+ }), ne = (e) => Object.assign({
1028
+ width: e
1029
+ }, ve(e)), An = (e) => ({
1030
+ background: e.skeletonLoadingBackground,
1031
+ backgroundSize: "400% 100%",
1032
+ animationName: kn,
1033
+ animationDuration: e.skeletonLoadingMotionDuration,
1034
+ animationTimingFunction: "ease",
1035
+ animationIterationCount: "infinite"
1036
+ }), $e = (e, t) => Object.assign({
1037
+ width: t(e).mul(5).equal(),
1038
+ minWidth: t(e).mul(5).equal()
1039
+ }, ve(e)), _n = (e) => {
1063
1040
  const {
1064
- confirmLoading: e,
1065
- okButtonProps: t,
1066
- okType: o,
1067
- okTextLocale: n,
1068
- onOk: a
1069
- } = se(ie);
1070
- return /* @__PURE__ */ $.createElement(Pe, Object.assign({}, nt(o), {
1071
- loading: e,
1072
- onClick: a
1073
- }, t), n);
1074
- };
1075
- function Ct(e, t) {
1076
- return /* @__PURE__ */ $.createElement("span", {
1077
- className: `${e}-close-x`
1078
- }, t || /* @__PURE__ */ $.createElement(Te, {
1079
- className: `${e}-close-icon`
1080
- }));
1081
- }
1082
- const pt = (e) => {
1041
+ skeletonAvatarCls: t,
1042
+ gradientFromColor: o,
1043
+ controlHeight: n,
1044
+ controlHeightLG: a,
1045
+ controlHeightSM: l
1046
+ } = e;
1047
+ return {
1048
+ [t]: Object.assign({
1049
+ display: "inline-block",
1050
+ verticalAlign: "top",
1051
+ background: o
1052
+ }, ne(n)),
1053
+ [`${t}${t}-circle`]: {
1054
+ borderRadius: "50%"
1055
+ },
1056
+ [`${t}${t}-lg`]: Object.assign({}, ne(a)),
1057
+ [`${t}${t}-sm`]: Object.assign({}, ne(l))
1058
+ };
1059
+ }, Vn = (e) => {
1083
1060
  const {
1084
- okText: t,
1085
- okType: o = "primary",
1086
- cancelText: n,
1087
- confirmLoading: a,
1088
- onOk: l,
1089
- onCancel: s,
1090
- okButtonProps: d,
1091
- cancelButtonProps: i,
1092
- footer: f
1093
- } = e, [c] = Me("Modal", at()), u = t || (c == null ? void 0 : c.okText), m = n || (c == null ? void 0 : c.cancelText), p = {
1094
- confirmLoading: a,
1095
- okButtonProps: d,
1096
- cancelButtonProps: i,
1097
- okTextLocale: u,
1098
- cancelTextLocale: m,
1099
- okType: o,
1100
- onOk: l,
1101
- onCancel: s
1102
- }, y = $.useMemo(() => p, K(Object.values(p)));
1103
- let g;
1104
- return typeof f == "function" || typeof f > "u" ? (g = /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement(Ye, null), /* @__PURE__ */ $.createElement(Je, null)), typeof f == "function" && (g = f(g, {
1105
- OkBtn: Je,
1106
- CancelBtn: Ye
1107
- })), g = /* @__PURE__ */ $.createElement(dt, {
1108
- value: y
1109
- }, g)) : g = f, /* @__PURE__ */ $.createElement(Gt, {
1110
- disabled: !1
1111
- }, g);
1112
- }, Yn = (e) => {
1061
+ controlHeight: t,
1062
+ borderRadiusSM: o,
1063
+ skeletonInputCls: n,
1064
+ controlHeightLG: a,
1065
+ controlHeightSM: l,
1066
+ gradientFromColor: s,
1067
+ calc: d
1068
+ } = e;
1069
+ return {
1070
+ [n]: Object.assign({
1071
+ display: "inline-block",
1072
+ verticalAlign: "top",
1073
+ background: s,
1074
+ borderRadius: o
1075
+ }, $e(t, d)),
1076
+ [`${n}-lg`]: Object.assign({}, $e(a, d)),
1077
+ [`${n}-sm`]: Object.assign({}, $e(l, d))
1078
+ };
1079
+ }, Ze = (e) => Object.assign({
1080
+ width: e
1081
+ }, ve(e)), Wn = (e) => {
1113
1082
  const {
1114
- componentCls: t
1083
+ skeletonImageCls: t,
1084
+ imageSizeBase: o,
1085
+ gradientFromColor: n,
1086
+ borderRadiusSM: a,
1087
+ calc: l
1115
1088
  } = e;
1116
1089
  return {
1117
- // Grid system
1118
- [t]: {
1119
- display: "flex",
1120
- flexFlow: "row wrap",
1121
- minWidth: 0,
1122
- "&::before, &::after": {
1123
- display: "flex"
1124
- },
1125
- "&-no-wrap": {
1126
- flexWrap: "nowrap"
1127
- },
1128
- // The origin of the X-axis
1129
- "&-start": {
1130
- justifyContent: "flex-start"
1131
- },
1132
- // The center of the X-axis
1133
- "&-center": {
1134
- justifyContent: "center"
1135
- },
1136
- // The opposite of the X-axis
1137
- "&-end": {
1138
- justifyContent: "flex-end"
1139
- },
1140
- "&-space-between": {
1141
- justifyContent: "space-between"
1142
- },
1143
- "&-space-around": {
1144
- justifyContent: "space-around"
1145
- },
1146
- "&-space-evenly": {
1147
- justifyContent: "space-evenly"
1148
- },
1149
- // Align at the top
1150
- "&-top": {
1151
- alignItems: "flex-start"
1152
- },
1153
- // Align at the center
1154
- "&-middle": {
1155
- alignItems: "center"
1090
+ [t]: Object.assign(Object.assign({
1091
+ display: "inline-flex",
1092
+ alignItems: "center",
1093
+ justifyContent: "center",
1094
+ verticalAlign: "middle",
1095
+ background: n,
1096
+ borderRadius: a
1097
+ }, Ze(l(o).mul(2).equal())), {
1098
+ [`${t}-path`]: {
1099
+ fill: "#bfbfbf"
1156
1100
  },
1157
- "&-bottom": {
1158
- alignItems: "flex-end"
1101
+ [`${t}-svg`]: Object.assign(Object.assign({}, Ze(o)), {
1102
+ maxWidth: l(o).mul(4).equal(),
1103
+ maxHeight: l(o).mul(4).equal()
1104
+ }),
1105
+ [`${t}-svg${t}-svg-circle`]: {
1106
+ borderRadius: "50%"
1159
1107
  }
1108
+ }),
1109
+ [`${t}${t}-circle`]: {
1110
+ borderRadius: "50%"
1160
1111
  }
1161
1112
  };
1162
- }, Jn = (e) => {
1113
+ }, xe = (e, t, o) => {
1163
1114
  const {
1164
- componentCls: t
1115
+ skeletonButtonCls: n
1165
1116
  } = e;
1166
1117
  return {
1167
- // Grid system
1168
- [t]: {
1169
- position: "relative",
1170
- maxWidth: "100%",
1171
- // Prevent columns from collapsing when empty
1172
- minHeight: 1
1118
+ [`${o}${n}-circle`]: {
1119
+ width: t,
1120
+ minWidth: t,
1121
+ borderRadius: "50%"
1122
+ },
1123
+ [`${o}${n}-round`]: {
1124
+ borderRadius: t
1173
1125
  }
1174
1126
  };
1175
- }, eo = (e, t) => {
1176
- const {
1177
- prefixCls: o,
1178
- componentCls: n,
1179
- gridColumns: a
1180
- } = e, l = {};
1181
- for (let s = a; s >= 0; s--)
1182
- s === 0 ? (l[`${n}${t}-${s}`] = {
1183
- display: "none"
1184
- }, l[`${n}-push-${s}`] = {
1185
- insetInlineStart: "auto"
1186
- }, l[`${n}-pull-${s}`] = {
1187
- insetInlineEnd: "auto"
1188
- }, l[`${n}${t}-push-${s}`] = {
1189
- insetInlineStart: "auto"
1190
- }, l[`${n}${t}-pull-${s}`] = {
1191
- insetInlineEnd: "auto"
1192
- }, l[`${n}${t}-offset-${s}`] = {
1193
- marginInlineStart: 0
1194
- }, l[`${n}${t}-order-${s}`] = {
1195
- order: 0
1196
- }) : (l[`${n}${t}-${s}`] = [
1197
- // https://github.com/ant-design/ant-design/issues/44456
1198
- // Form set `display: flex` on Col which will override `display: block`.
1199
- // Let's get it from css variable to support override.
1200
- {
1201
- "--ant-display": "block",
1202
- // Fallback to display if variable not support
1203
- display: "block"
1204
- },
1205
- {
1206
- display: "var(--ant-display)",
1207
- flex: `0 0 ${s / a * 100}%`,
1208
- maxWidth: `${s / a * 100}%`
1209
- }
1210
- ], l[`${n}${t}-push-${s}`] = {
1211
- insetInlineStart: `${s / a * 100}%`
1212
- }, l[`${n}${t}-pull-${s}`] = {
1213
- insetInlineEnd: `${s / a * 100}%`
1214
- }, l[`${n}${t}-offset-${s}`] = {
1215
- marginInlineStart: `${s / a * 100}%`
1216
- }, l[`${n}${t}-order-${s}`] = {
1217
- order: s
1218
- });
1219
- return l[`${n}${t}-flex`] = {
1220
- flex: `var(--${o}${t}-flex)`
1221
- }, l;
1222
- }, Ee = (e, t) => eo(e, t), to = (e, t, o) => ({
1223
- [`@media (min-width: ${N(t)})`]: Object.assign({}, Ee(e, o))
1224
- }), no = () => ({}), oo = () => ({});
1225
- re("Grid", Yn, no);
1226
- const vt = (e) => ({
1227
- xs: e.screenXSMin,
1228
- sm: e.screenSMMin,
1229
- md: e.screenMDMin,
1230
- lg: e.screenLGMin,
1231
- xl: e.screenXLMin,
1232
- xxl: e.screenXXLMin
1233
- });
1234
- re("Grid", (e) => {
1235
- const t = fe(e, {
1236
- gridColumns: 24
1237
- // Row is divided into 24 parts in Grid
1238
- }), o = vt(t);
1239
- return delete o.xs, [Jn(t), Ee(t, ""), Ee(t, "-xs"), Object.keys(o).map((n) => to(t, o[n], `-${n}`)).reduce((n, a) => Object.assign(Object.assign({}, n), a), {})];
1240
- }, oo);
1241
- function et(e) {
1242
- return {
1243
- position: e,
1244
- inset: 0
1245
- };
1246
- }
1247
- const ao = (e) => {
1127
+ }, Se = (e, t) => Object.assign({
1128
+ width: t(e).mul(2).equal(),
1129
+ minWidth: t(e).mul(2).equal()
1130
+ }, ve(e)), qn = (e) => {
1248
1131
  const {
1249
- componentCls: t,
1250
- antCls: o
1132
+ borderRadiusSM: t,
1133
+ skeletonButtonCls: o,
1134
+ controlHeight: n,
1135
+ controlHeightLG: a,
1136
+ controlHeightSM: l,
1137
+ gradientFromColor: s,
1138
+ calc: d
1251
1139
  } = e;
1252
- return [{
1253
- [`${t}-root`]: {
1254
- [`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]: {
1255
- // reset scale avoid mousePosition bug
1256
- transform: "none",
1257
- opacity: 0,
1258
- animationDuration: e.motionDurationSlow,
1259
- // https://github.com/ant-design/ant-design/issues/11777
1260
- userSelect: "none"
1261
- },
1262
- // https://github.com/ant-design/ant-design/issues/37329
1263
- // https://github.com/ant-design/ant-design/issues/40272
1264
- [`${t}${o}-zoom-leave ${t}-content`]: {
1265
- pointerEvents: "none"
1266
- },
1267
- [`${t}-mask`]: Object.assign(Object.assign({}, et("fixed")), {
1268
- zIndex: e.zIndexPopupBase,
1269
- height: "100%",
1270
- backgroundColor: e.colorBgMask,
1271
- pointerEvents: "none",
1272
- [`${t}-hidden`]: {
1273
- display: "none"
1274
- }
1275
- }),
1276
- [`${t}-wrap`]: Object.assign(Object.assign({}, et("fixed")), {
1277
- zIndex: e.zIndexPopupBase,
1278
- overflow: "auto",
1279
- outline: 0,
1280
- WebkitOverflowScrolling: "touch"
1281
- })
1282
- }
1283
- }, {
1284
- [`${t}-root`]: $n(e)
1285
- }];
1286
- }, lo = (e) => {
1140
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
1141
+ [o]: Object.assign({
1142
+ display: "inline-block",
1143
+ verticalAlign: "top",
1144
+ background: s,
1145
+ borderRadius: t,
1146
+ width: d(n).mul(2).equal(),
1147
+ minWidth: d(n).mul(2).equal()
1148
+ }, Se(n, d))
1149
+ }, xe(e, n, o)), {
1150
+ [`${o}-lg`]: Object.assign({}, Se(a, d))
1151
+ }), xe(e, a, `${o}-lg`)), {
1152
+ [`${o}-sm`]: Object.assign({}, Se(l, d))
1153
+ }), xe(e, l, `${o}-sm`));
1154
+ }, Gn = (e) => {
1287
1155
  const {
1288
- componentCls: t
1289
- } = e;
1290
- return [
1291
- // ======================== Root =========================
1292
- {
1293
- [`${t}-root`]: {
1294
- [`${t}-wrap-rtl`]: {
1295
- direction: "rtl"
1296
- },
1297
- [`${t}-centered`]: {
1298
- textAlign: "center",
1299
- "&::before": {
1300
- display: "inline-block",
1301
- width: 0,
1302
- height: "100%",
1303
- verticalAlign: "middle",
1304
- content: '""'
1305
- },
1306
- [t]: {
1307
- top: 0,
1308
- display: "inline-block",
1309
- paddingBottom: 0,
1310
- textAlign: "start",
1311
- verticalAlign: "middle"
1312
- }
1156
+ componentCls: t,
1157
+ skeletonAvatarCls: o,
1158
+ skeletonTitleCls: n,
1159
+ skeletonParagraphCls: a,
1160
+ skeletonButtonCls: l,
1161
+ skeletonInputCls: s,
1162
+ skeletonImageCls: d,
1163
+ controlHeight: i,
1164
+ controlHeightLG: f,
1165
+ controlHeightSM: c,
1166
+ gradientFromColor: u,
1167
+ padding: m,
1168
+ marginSM: p,
1169
+ borderRadius: y,
1170
+ titleHeight: g,
1171
+ blockRadius: C,
1172
+ paragraphLiHeight: b,
1173
+ controlHeightXS: v,
1174
+ paragraphMarginTop: x
1175
+ } = e;
1176
+ return {
1177
+ [t]: {
1178
+ display: "table",
1179
+ width: "100%",
1180
+ [`${t}-header`]: {
1181
+ display: "table-cell",
1182
+ paddingInlineEnd: m,
1183
+ verticalAlign: "top",
1184
+ // Avatar
1185
+ [o]: Object.assign({
1186
+ display: "inline-block",
1187
+ verticalAlign: "top",
1188
+ background: u
1189
+ }, ne(i)),
1190
+ [`${o}-circle`]: {
1191
+ borderRadius: "50%"
1313
1192
  },
1314
- [`@media (max-width: ${e.screenSMMax}px)`]: {
1315
- [t]: {
1316
- maxWidth: "calc(100vw - 16px)",
1317
- margin: `${N(e.marginXS)} auto`
1318
- },
1319
- [`${t}-centered`]: {
1320
- [t]: {
1321
- flex: 1
1322
- }
1193
+ [`${o}-lg`]: Object.assign({}, ne(f)),
1194
+ [`${o}-sm`]: Object.assign({}, ne(c))
1195
+ },
1196
+ [`${t}-content`]: {
1197
+ display: "table-cell",
1198
+ width: "100%",
1199
+ verticalAlign: "top",
1200
+ // Title
1201
+ [n]: {
1202
+ width: "100%",
1203
+ height: g,
1204
+ background: u,
1205
+ borderRadius: C,
1206
+ [`+ ${a}`]: {
1207
+ marginBlockStart: c
1323
1208
  }
1324
- }
1325
- }
1326
- },
1327
- // ======================== Modal ========================
1328
- {
1329
- [t]: Object.assign(Object.assign({}, lt(e)), {
1330
- pointerEvents: "none",
1331
- position: "relative",
1332
- top: 100,
1333
- width: "auto",
1334
- maxWidth: `calc(100vw - ${N(e.calc(e.margin).mul(2).equal())})`,
1335
- margin: "0 auto",
1336
- paddingBottom: e.paddingLG,
1337
- [`${t}-title`]: {
1338
- margin: 0,
1339
- color: e.titleColor,
1340
- fontWeight: e.fontWeightStrong,
1341
- fontSize: e.titleFontSize,
1342
- lineHeight: e.titleLineHeight,
1343
- wordWrap: "break-word"
1344
- },
1345
- [`${t}-content`]: {
1346
- position: "relative",
1347
- backgroundColor: e.contentBg,
1348
- backgroundClip: "padding-box",
1349
- border: 0,
1350
- borderRadius: e.borderRadiusLG,
1351
- boxShadow: e.boxShadow,
1352
- pointerEvents: "auto",
1353
- padding: e.contentPadding
1354
1209
  },
1355
- [`${t}-close`]: Object.assign({
1356
- position: "absolute",
1357
- top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1358
- insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1359
- zIndex: e.calc(e.zIndexPopupBase).add(10).equal(),
1210
+ // paragraph
1211
+ [a]: {
1360
1212
  padding: 0,
1361
- color: e.modalCloseIconColor,
1362
- fontWeight: e.fontWeightStrong,
1363
- lineHeight: 1,
1364
- textDecoration: "none",
1365
- background: "transparent",
1366
- borderRadius: e.borderRadiusSM,
1367
- width: e.modalCloseBtnSize,
1368
- height: e.modalCloseBtnSize,
1369
- border: 0,
1370
- outline: 0,
1371
- cursor: "pointer",
1372
- transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
1373
- "&-x": {
1374
- display: "flex",
1375
- fontSize: e.fontSizeLG,
1376
- fontStyle: "normal",
1377
- lineHeight: N(e.modalCloseBtnSize),
1378
- justifyContent: "center",
1379
- textTransform: "none",
1380
- textRendering: "auto"
1381
- },
1382
- "&:disabled": {
1383
- pointerEvents: "none"
1384
- },
1385
- "&:hover": {
1386
- color: e.modalCloseIconHoverColor,
1387
- backgroundColor: e.colorBgTextHover,
1388
- textDecoration: "none"
1389
- },
1390
- "&:active": {
1391
- backgroundColor: e.colorBgTextActive
1392
- }
1393
- }, Ut(e)),
1394
- [`${t}-header`]: {
1395
- color: e.colorText,
1396
- background: e.headerBg,
1397
- borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`,
1398
- marginBottom: e.headerMarginBottom,
1399
- padding: e.headerPadding,
1400
- borderBottom: e.headerBorderBottom
1401
- },
1402
- [`${t}-body`]: {
1403
- fontSize: e.fontSize,
1404
- lineHeight: e.lineHeight,
1405
- wordWrap: "break-word",
1406
- padding: e.bodyPadding,
1407
- [`${t}-body-skeleton`]: {
1213
+ "> li": {
1408
1214
  width: "100%",
1409
- height: "100%",
1410
- display: "flex",
1411
- justifyContent: "center",
1412
- alignItems: "center",
1413
- margin: `${N(e.margin)} auto`
1414
- }
1415
- },
1416
- [`${t}-footer`]: {
1417
- textAlign: "end",
1418
- background: e.footerBg,
1419
- marginTop: e.footerMarginTop,
1420
- padding: e.footerPadding,
1421
- borderTop: e.footerBorderTop,
1422
- borderRadius: e.footerBorderRadius,
1423
- [`> ${e.antCls}-btn + ${e.antCls}-btn`]: {
1424
- marginInlineStart: e.marginXS
1215
+ height: b,
1216
+ listStyle: "none",
1217
+ background: u,
1218
+ borderRadius: C,
1219
+ "+ li": {
1220
+ marginBlockStart: v
1221
+ }
1425
1222
  }
1426
1223
  },
1427
- [`${t}-open`]: {
1428
- overflow: "hidden"
1224
+ [`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]: {
1225
+ width: "61%"
1429
1226
  }
1430
- })
1227
+ },
1228
+ [`&-round ${t}-content`]: {
1229
+ [`${n}, ${a} > li`]: {
1230
+ borderRadius: y
1231
+ }
1232
+ }
1431
1233
  },
1432
- // ======================== Pure =========================
1433
- {
1434
- [`${t}-pure-panel`]: {
1435
- top: "auto",
1436
- padding: 0,
1437
- display: "flex",
1438
- flexDirection: "column",
1439
- [`${t}-content,
1440
- ${t}-body,
1441
- ${t}-confirm-body-wrapper`]: {
1442
- display: "flex",
1443
- flexDirection: "column",
1444
- flex: "auto"
1445
- },
1446
- [`${t}-confirm-body`]: {
1447
- marginBottom: "auto"
1234
+ [`${t}-with-avatar ${t}-content`]: {
1235
+ // Title
1236
+ [n]: {
1237
+ marginBlockStart: p,
1238
+ [`+ ${a}`]: {
1239
+ marginBlockStart: x
1448
1240
  }
1449
1241
  }
1242
+ },
1243
+ // Skeleton element
1244
+ [`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
1245
+ display: "inline-block",
1246
+ width: "auto"
1247
+ }, qn(e)), _n(e)), Vn(e)), Wn(e)),
1248
+ // Skeleton Block Button, Input
1249
+ [`${t}${t}-block`]: {
1250
+ width: "100%",
1251
+ [l]: {
1252
+ width: "100%"
1253
+ },
1254
+ [s]: {
1255
+ width: "100%"
1256
+ }
1257
+ },
1258
+ // With active animation
1259
+ [`${t}${t}-active`]: {
1260
+ [`
1261
+ ${n},
1262
+ ${a} > li,
1263
+ ${o},
1264
+ ${l},
1265
+ ${s},
1266
+ ${d}
1267
+ `]: Object.assign({}, An(e))
1450
1268
  }
1451
- ];
1452
- }, ro = (e) => {
1269
+ };
1270
+ }, Xn = (e) => {
1271
+ const {
1272
+ colorFillContent: t,
1273
+ colorFill: o
1274
+ } = e, n = t, a = o;
1275
+ return {
1276
+ color: n,
1277
+ colorGradientEnd: a,
1278
+ gradientFromColor: n,
1279
+ gradientToColor: a,
1280
+ titleHeight: e.controlHeight / 2,
1281
+ blockRadius: e.borderRadiusSM,
1282
+ paragraphMarginTop: e.marginLG + e.marginXXS,
1283
+ paragraphLiHeight: e.controlHeight / 2
1284
+ };
1285
+ }, oe = re("Skeleton", (e) => {
1286
+ const {
1287
+ componentCls: t,
1288
+ calc: o
1289
+ } = e, n = fe(e, {
1290
+ skeletonAvatarCls: `${t}-avatar`,
1291
+ skeletonTitleCls: `${t}-title`,
1292
+ skeletonParagraphCls: `${t}-paragraph`,
1293
+ skeletonButtonCls: `${t}-button`,
1294
+ skeletonInputCls: `${t}-input`,
1295
+ skeletonImageCls: `${t}-image`,
1296
+ imageSizeBase: o(e.controlHeight).mul(1.5).equal(),
1297
+ borderRadius: 100,
1298
+ // Large number to make capsule shape
1299
+ skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
1300
+ skeletonLoadingMotionDuration: "1.4s"
1301
+ });
1302
+ return [Gn(n)];
1303
+ }, Xn, {
1304
+ deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
1305
+ }), Un = (e) => {
1306
+ const {
1307
+ prefixCls: t,
1308
+ className: o,
1309
+ rootClassName: n,
1310
+ active: a,
1311
+ shape: l = "circle",
1312
+ size: s = "default"
1313
+ } = e, {
1314
+ getPrefixCls: d
1315
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls", "className"]), p = O(i, `${i}-element`, {
1316
+ [`${i}-active`]: a
1317
+ }, o, n, c, u);
1318
+ return f(/* @__PURE__ */ r.createElement("div", {
1319
+ className: p
1320
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
1321
+ prefixCls: `${i}-avatar`,
1322
+ shape: l,
1323
+ size: s
1324
+ }, m))));
1325
+ }, Kn = (e) => {
1453
1326
  const {
1454
- componentCls: t
1455
- } = e;
1456
- return {
1457
- [`${t}-root`]: {
1458
- [`${t}-wrap-rtl`]: {
1459
- direction: "rtl",
1460
- [`${t}-confirm-body`]: {
1461
- direction: "rtl"
1462
- }
1327
+ prefixCls: t,
1328
+ className: o,
1329
+ rootClassName: n,
1330
+ active: a,
1331
+ block: l = !1,
1332
+ size: s = "default"
1333
+ } = e, {
1334
+ getPrefixCls: d
1335
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
1336
+ [`${i}-active`]: a,
1337
+ [`${i}-block`]: l
1338
+ }, o, n, c, u);
1339
+ return f(/* @__PURE__ */ r.createElement("div", {
1340
+ className: p
1341
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
1342
+ prefixCls: `${i}-button`,
1343
+ size: s
1344
+ }, m))));
1345
+ }, Qn = "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z", Zn = (e) => {
1346
+ const {
1347
+ prefixCls: t,
1348
+ className: o,
1349
+ rootClassName: n,
1350
+ style: a,
1351
+ active: l
1352
+ } = e, {
1353
+ getPrefixCls: s
1354
+ } = r.useContext(q), d = s("skeleton", t), [i, f, c] = oe(d), u = O(d, `${d}-element`, {
1355
+ [`${d}-active`]: l
1356
+ }, o, n, f, c);
1357
+ return i(/* @__PURE__ */ r.createElement("div", {
1358
+ className: u
1359
+ }, /* @__PURE__ */ r.createElement("div", {
1360
+ className: O(`${d}-image`, o),
1361
+ style: a
1362
+ }, /* @__PURE__ */ r.createElement("svg", {
1363
+ viewBox: "0 0 1098 1024",
1364
+ xmlns: "http://www.w3.org/2000/svg",
1365
+ className: `${d}-image-svg`
1366
+ }, /* @__PURE__ */ r.createElement("title", null, "Image placeholder"), /* @__PURE__ */ r.createElement("path", {
1367
+ d: Qn,
1368
+ className: `${d}-image-path`
1369
+ })))));
1370
+ }, Yn = (e) => {
1371
+ const {
1372
+ prefixCls: t,
1373
+ className: o,
1374
+ rootClassName: n,
1375
+ active: a,
1376
+ block: l,
1377
+ size: s = "default"
1378
+ } = e, {
1379
+ getPrefixCls: d
1380
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = ge(e, ["prefixCls"]), p = O(i, `${i}-element`, {
1381
+ [`${i}-active`]: a,
1382
+ [`${i}-block`]: l
1383
+ }, o, n, c, u);
1384
+ return f(/* @__PURE__ */ r.createElement("div", {
1385
+ className: p
1386
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({
1387
+ prefixCls: `${i}-input`,
1388
+ size: s
1389
+ }, m))));
1390
+ }, Jn = (e) => {
1391
+ const {
1392
+ prefixCls: t,
1393
+ className: o,
1394
+ rootClassName: n,
1395
+ style: a,
1396
+ active: l,
1397
+ children: s
1398
+ } = e, {
1399
+ getPrefixCls: d
1400
+ } = r.useContext(q), i = d("skeleton", t), [f, c, u] = oe(i), m = O(i, `${i}-element`, {
1401
+ [`${i}-active`]: l
1402
+ }, c, o, n, u);
1403
+ return f(/* @__PURE__ */ r.createElement("div", {
1404
+ className: m
1405
+ }, /* @__PURE__ */ r.createElement("div", {
1406
+ className: O(`${i}-image`, o),
1407
+ style: a
1408
+ }, s)));
1409
+ }, eo = (e, t) => {
1410
+ const {
1411
+ width: o,
1412
+ rows: n = 2
1413
+ } = t;
1414
+ if (Array.isArray(o))
1415
+ return o[e];
1416
+ if (n - 1 === e)
1417
+ return o;
1418
+ }, to = (e) => {
1419
+ const {
1420
+ prefixCls: t,
1421
+ className: o,
1422
+ style: n,
1423
+ rows: a
1424
+ } = e, l = K(new Array(a)).map((s, d) => (
1425
+ // eslint-disable-next-line react/no-array-index-key
1426
+ /* @__PURE__ */ r.createElement("li", {
1427
+ key: d,
1428
+ style: {
1429
+ width: eo(d, e)
1463
1430
  }
1464
- }
1431
+ })
1432
+ ));
1433
+ return /* @__PURE__ */ r.createElement("ul", {
1434
+ className: O(t, o),
1435
+ style: n
1436
+ }, l);
1437
+ }, no = (e) => {
1438
+ let {
1439
+ prefixCls: t,
1440
+ className: o,
1441
+ width: n,
1442
+ style: a
1443
+ } = e;
1444
+ return (
1445
+ // biome-ignore lint/a11y/useHeadingContent: HOC here
1446
+ /* @__PURE__ */ r.createElement("h3", {
1447
+ className: O(t, o),
1448
+ style: Object.assign({
1449
+ width: n
1450
+ }, a)
1451
+ })
1452
+ );
1453
+ };
1454
+ function Oe(e) {
1455
+ return e && typeof e == "object" ? e : {};
1456
+ }
1457
+ function oo(e, t) {
1458
+ return e && !t ? {
1459
+ size: "large",
1460
+ shape: "square"
1461
+ } : {
1462
+ size: "large",
1463
+ shape: "circle"
1465
1464
  };
1466
- }, so = (e) => {
1465
+ }
1466
+ function ao(e, t) {
1467
+ return !e && t ? {
1468
+ width: "38%"
1469
+ } : e && t ? {
1470
+ width: "50%"
1471
+ } : {};
1472
+ }
1473
+ function lo(e, t) {
1474
+ const o = {};
1475
+ return (!e || !t) && (o.width = "61%"), !e && t ? o.rows = 3 : o.rows = 2, o;
1476
+ }
1477
+ const te = (e) => {
1467
1478
  const {
1468
- componentCls: t
1469
- } = e, o = vt(e);
1470
- delete o.xs;
1471
- const n = Object.keys(o).map((a) => ({
1472
- [`@media (min-width: ${N(o[a])})`]: {
1473
- width: `var(--${t.replace(".", "")}-${a}-width)`
1479
+ prefixCls: t,
1480
+ loading: o,
1481
+ className: n,
1482
+ rootClassName: a,
1483
+ style: l,
1484
+ children: s,
1485
+ avatar: d = !1,
1486
+ title: i = !0,
1487
+ paragraph: f = !0,
1488
+ active: c,
1489
+ round: u
1490
+ } = e, {
1491
+ getPrefixCls: m,
1492
+ direction: p,
1493
+ className: y,
1494
+ style: g
1495
+ } = Xt("skeleton"), C = m("skeleton", t), [b, v, x] = oe(C);
1496
+ if (o || !("loading" in e)) {
1497
+ const E = !!d, w = !!i, S = !!f;
1498
+ let h;
1499
+ if (E) {
1500
+ const F = Object.assign(Object.assign({
1501
+ prefixCls: `${C}-avatar`
1502
+ }, oo(w, S)), Oe(d));
1503
+ h = /* @__PURE__ */ r.createElement("div", {
1504
+ className: `${C}-header`
1505
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({}, F)));
1474
1506
  }
1475
- }));
1476
- return {
1477
- [`${t}-root`]: {
1478
- [t]: [{
1479
- width: `var(--${t.replace(".", "")}-xs-width)`
1480
- }].concat(K(n))
1507
+ let I;
1508
+ if (w || S) {
1509
+ let F;
1510
+ if (w) {
1511
+ const L = Object.assign(Object.assign({
1512
+ prefixCls: `${C}-title`
1513
+ }, ao(E, S)), Oe(i));
1514
+ F = /* @__PURE__ */ r.createElement(no, Object.assign({}, L));
1515
+ }
1516
+ let H;
1517
+ if (S) {
1518
+ const L = Object.assign(Object.assign({
1519
+ prefixCls: `${C}-paragraph`
1520
+ }, lo(E, w)), Oe(f));
1521
+ H = /* @__PURE__ */ r.createElement(to, Object.assign({}, L));
1522
+ }
1523
+ I = /* @__PURE__ */ r.createElement("div", {
1524
+ className: `${C}-content`
1525
+ }, F, H);
1481
1526
  }
1482
- };
1483
- }, bt = (e) => {
1484
- const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5;
1485
- return fe(e, {
1486
- modalHeaderHeight: e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),
1487
- modalFooterBorderColorSplit: e.colorSplit,
1488
- modalFooterBorderStyle: e.lineType,
1489
- modalFooterBorderWidth: e.lineWidth,
1490
- modalCloseIconColor: e.colorIcon,
1491
- modalCloseIconHoverColor: e.colorIconHover,
1492
- modalCloseBtnSize: e.controlHeight,
1493
- modalConfirmIconSize: e.fontHeight,
1494
- modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
1495
- });
1496
- }, ht = (e) => ({
1497
- footerBg: "transparent",
1498
- headerBg: e.colorBgElevated,
1499
- titleLineHeight: e.lineHeightHeading5,
1500
- titleFontSize: e.fontSizeHeading5,
1501
- contentBg: e.colorBgElevated,
1502
- titleColor: e.colorTextHeading,
1503
- // internal
1504
- contentPadding: e.wireframe ? 0 : `${N(e.paddingMD)} ${N(e.paddingContentHorizontalLG)}`,
1505
- headerPadding: e.wireframe ? `${N(e.padding)} ${N(e.paddingLG)}` : 0,
1506
- headerBorderBottom: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1507
- headerMarginBottom: e.wireframe ? 0 : e.marginXS,
1508
- bodyPadding: e.wireframe ? e.paddingLG : 0,
1509
- footerPadding: e.wireframe ? `${N(e.paddingXS)} ${N(e.padding)}` : 0,
1510
- footerBorderTop: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1511
- footerBorderRadius: e.wireframe ? `0 0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)}` : 0,
1512
- footerMarginTop: e.wireframe ? 0 : e.marginSM,
1513
- confirmBodyPadding: e.wireframe ? `${N(e.padding * 2)} ${N(e.padding * 2)} ${N(e.paddingLG)}` : 0,
1514
- confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
1515
- confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
1516
- }), yt = re("Modal", (e) => {
1517
- const t = bt(e);
1518
- return [lo(t), ro(t), ao(t), Xt(t, "zoom"), so(t)];
1519
- }, ht, {
1520
- unitless: {
1521
- titleLineHeight: !0
1527
+ const j = O(C, {
1528
+ [`${C}-with-avatar`]: E,
1529
+ [`${C}-active`]: c,
1530
+ [`${C}-rtl`]: p === "rtl",
1531
+ [`${C}-round`]: u
1532
+ }, y, n, a, v, x);
1533
+ return b(/* @__PURE__ */ r.createElement("div", {
1534
+ className: j,
1535
+ style: Object.assign(Object.assign({}, g), l)
1536
+ }, h, I));
1522
1537
  }
1538
+ return s ?? null;
1539
+ };
1540
+ te.Button = Kn;
1541
+ te.Avatar = Un;
1542
+ te.Input = Yn;
1543
+ te.Image = Zn;
1544
+ te.Node = Jn;
1545
+ process.env.NODE_ENV !== "production" && (te.displayName = "Skeleton");
1546
+ function Ye() {
1547
+ }
1548
+ const ro = /* @__PURE__ */ r.createContext({
1549
+ add: Ye,
1550
+ remove: Ye
1523
1551
  });
1552
+ function so(e) {
1553
+ const t = r.useContext(ro), o = r.useRef(null);
1554
+ return Ut((a) => {
1555
+ if (a) {
1556
+ const l = e ? a.querySelector(e) : a;
1557
+ t.add(l), o.current = l;
1558
+ } else
1559
+ t.remove(o.current);
1560
+ });
1561
+ }
1562
+ const Je = () => {
1563
+ const {
1564
+ cancelButtonProps: e,
1565
+ cancelTextLocale: t,
1566
+ onCancel: o
1567
+ } = se(ie);
1568
+ return /* @__PURE__ */ $.createElement(Pe, Object.assign({
1569
+ onClick: o
1570
+ }, e), t);
1571
+ }, et = () => {
1572
+ const {
1573
+ confirmLoading: e,
1574
+ okButtonProps: t,
1575
+ okType: o,
1576
+ okTextLocale: n,
1577
+ onOk: a
1578
+ } = se(ie);
1579
+ return /* @__PURE__ */ $.createElement(Pe, Object.assign({}, ot(o), {
1580
+ loading: e,
1581
+ onClick: a
1582
+ }, t), n);
1583
+ };
1584
+ function yt(e, t) {
1585
+ return /* @__PURE__ */ $.createElement("span", {
1586
+ className: `${e}-close-x`
1587
+ }, t || /* @__PURE__ */ $.createElement(Te, {
1588
+ className: `${e}-close-icon`
1589
+ }));
1590
+ }
1591
+ const $t = (e) => {
1592
+ const {
1593
+ okText: t,
1594
+ okType: o = "primary",
1595
+ cancelText: n,
1596
+ confirmLoading: a,
1597
+ onOk: l,
1598
+ onCancel: s,
1599
+ okButtonProps: d,
1600
+ cancelButtonProps: i,
1601
+ footer: f
1602
+ } = e, [c] = Me("Modal", lt()), u = t || (c == null ? void 0 : c.okText), m = n || (c == null ? void 0 : c.cancelText), p = {
1603
+ confirmLoading: a,
1604
+ okButtonProps: d,
1605
+ cancelButtonProps: i,
1606
+ okTextLocale: u,
1607
+ cancelTextLocale: m,
1608
+ okType: o,
1609
+ onOk: l,
1610
+ onCancel: s
1611
+ }, y = $.useMemo(() => p, K(Object.values(p)));
1612
+ let g;
1613
+ return typeof f == "function" || typeof f > "u" ? (g = /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement(Je, null), /* @__PURE__ */ $.createElement(et, null)), typeof f == "function" && (g = f(g, {
1614
+ OkBtn: et,
1615
+ CancelBtn: Je
1616
+ })), g = /* @__PURE__ */ $.createElement(Ct, {
1617
+ value: y
1618
+ }, g)) : g = f, /* @__PURE__ */ $.createElement(Kt, {
1619
+ disabled: !1
1620
+ }, g);
1621
+ };
1524
1622
  var io = function(e, t) {
1525
1623
  var o = {};
1526
1624
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
@@ -1537,8 +1635,8 @@ const co = (e) => {
1537
1635
  we = null;
1538
1636
  }, 100);
1539
1637
  };
1540
- jn() && document.documentElement.addEventListener("click", co, !0);
1541
- const $t = (e) => {
1638
+ Dn() && document.documentElement.addEventListener("click", co, !0);
1639
+ const xt = (e) => {
1542
1640
  var t;
1543
1641
  const {
1544
1642
  getPopupContainer: o,
@@ -1581,31 +1679,31 @@ const $t = (e) => {
1581
1679
  styles: w,
1582
1680
  children: S,
1583
1681
  loading: h
1584
- } = e, I = io(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]), j = n("modal", i), F = n(), H = rt(j), [L, X, k] = yt(j, H), D = O(m, {
1682
+ } = e, I = io(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading"]), j = n("modal", i), F = n(), H = rt(j), [L, X, k] = mt(j, H), D = O(m, {
1585
1683
  [`${j}-centered`]: p ?? (l == null ? void 0 : l.centered),
1586
1684
  [`${j}-wrap-rtl`]: a === "rtl"
1587
- }), W = x !== null && !h ? /* @__PURE__ */ r.createElement(pt, Object.assign({}, e, {
1685
+ }), W = x !== null && !h ? /* @__PURE__ */ r.createElement($t, Object.assign({}, e, {
1588
1686
  onOk: d,
1589
1687
  onCancel: s
1590
- })) : null, [A, T, J] = gt(me(e), me(l), {
1688
+ })) : null, [A, T, J] = ht(me(e), me(l), {
1591
1689
  closable: !0,
1592
1690
  closeIcon: /* @__PURE__ */ r.createElement(Te, {
1593
1691
  className: `${j}-close-icon`
1594
1692
  }),
1595
- closeIconRender: (_) => Ct(j, _)
1596
- }), B = Zn(`.${j}-content`), [U, z] = Kt("Modal", I.zIndex), [ae, Q] = r.useMemo(() => v && typeof v == "object" ? [void 0, v] : [v, void 0], [v]), be = r.useMemo(() => {
1693
+ closeIconRender: (_) => yt(j, _)
1694
+ }), B = so(`.${j}-content`), [U, z] = Qt("Modal", I.zIndex), [ae, Q] = r.useMemo(() => v && typeof v == "object" ? [void 0, v] : [v, void 0], [v]), be = r.useMemo(() => {
1597
1695
  const _ = {};
1598
1696
  return Q && Object.keys(Q).forEach((M) => {
1599
1697
  const V = Q[M];
1600
1698
  V !== void 0 && (_[`--${j}-${M}-width`] = typeof V == "number" ? `${V}px` : V);
1601
1699
  }), _;
1602
1700
  }, [Q]);
1603
- return L(/* @__PURE__ */ r.createElement(Qt, {
1701
+ return L(/* @__PURE__ */ r.createElement(Zt, {
1604
1702
  form: !0,
1605
1703
  space: !0
1606
- }, /* @__PURE__ */ r.createElement(Zt.Provider, {
1704
+ }, /* @__PURE__ */ r.createElement(Yt.Provider, {
1607
1705
  value: z
1608
- }, /* @__PURE__ */ r.createElement(ft, Object.assign({
1706
+ }, /* @__PURE__ */ r.createElement(bt, Object.assign({
1609
1707
  width: ae
1610
1708
  }, I, {
1611
1709
  zIndex: U,
@@ -1659,7 +1757,7 @@ const $t = (e) => {
1659
1757
  [`${e.antCls}-modal-header`]: {
1660
1758
  display: "none"
1661
1759
  },
1662
- [`${c}-body-wrapper`]: Object.assign({}, Yt()),
1760
+ [`${c}-body-wrapper`]: Object.assign({}, Jt()),
1663
1761
  [`&${t} ${t}-body`]: {
1664
1762
  padding: f
1665
1763
  },
@@ -1726,9 +1824,9 @@ const $t = (e) => {
1726
1824
  }
1727
1825
  };
1728
1826
  }, mo = Re(["Modal", "confirm"], (e) => {
1729
- const t = bt(e);
1827
+ const t = dt(e);
1730
1828
  return [uo(t)];
1731
- }, ht, {
1829
+ }, ut, {
1732
1830
  // confirm is weak than modal since no conflict here
1733
1831
  order: -1e3
1734
1832
  });
@@ -1739,7 +1837,7 @@ var fo = function(e, t) {
1739
1837
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1740
1838
  return o;
1741
1839
  };
1742
- function xt(e) {
1840
+ function St(e) {
1743
1841
  const {
1744
1842
  prefixCls: t,
1745
1843
  icon: o,
@@ -1760,23 +1858,23 @@ function xt(e) {
1760
1858
  if (!o && o !== null)
1761
1859
  switch (s) {
1762
1860
  case "info":
1763
- u = /* @__PURE__ */ r.createElement(an, null);
1861
+ u = /* @__PURE__ */ r.createElement(ln, null);
1764
1862
  break;
1765
1863
  case "success":
1766
- u = /* @__PURE__ */ r.createElement(on, null);
1864
+ u = /* @__PURE__ */ r.createElement(an, null);
1767
1865
  break;
1768
1866
  case "error":
1769
- u = /* @__PURE__ */ r.createElement(nn, null);
1867
+ u = /* @__PURE__ */ r.createElement(on, null);
1770
1868
  break;
1771
1869
  default:
1772
- u = /* @__PURE__ */ r.createElement(tn, null);
1870
+ u = /* @__PURE__ */ r.createElement(nn, null);
1773
1871
  }
1774
1872
  const m = d ?? s === "confirm", p = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [y] = Me("Modal"), g = f || y, C = n || (m ? g == null ? void 0 : g.okText : g == null ? void 0 : g.justOkText), b = a || (g == null ? void 0 : g.cancelText), v = Object.assign({
1775
1873
  autoFocusButton: p,
1776
1874
  cancelTextLocale: b,
1777
1875
  okTextLocale: C,
1778
1876
  mergedOkCancel: m
1779
- }, c), x = r.useMemo(() => v, K(Object.values(v))), E = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(We, null), /* @__PURE__ */ r.createElement(qe, null)), w = e.title !== void 0 && e.title !== null, S = `${l}-body`;
1877
+ }, c), x = r.useMemo(() => v, K(Object.values(v))), E = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(qe, null), /* @__PURE__ */ r.createElement(Ge, null)), w = e.title !== void 0 && e.title !== null, S = `${l}-body`;
1780
1878
  return /* @__PURE__ */ r.createElement("div", {
1781
1879
  className: `${l}-body-wrapper`
1782
1880
  }, /* @__PURE__ */ r.createElement("div", {
@@ -1789,18 +1887,18 @@ function xt(e) {
1789
1887
  className: `${l}-title`
1790
1888
  }, e.title), /* @__PURE__ */ r.createElement("div", {
1791
1889
  className: `${l}-content`
1792
- }, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ r.createElement(dt, {
1890
+ }, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ r.createElement(Ct, {
1793
1891
  value: x
1794
1892
  }, /* @__PURE__ */ r.createElement("div", {
1795
1893
  className: `${l}-btns`
1796
1894
  }, typeof i == "function" ? i(E, {
1797
- OkBtn: qe,
1798
- CancelBtn: We
1895
+ OkBtn: Ge,
1896
+ CancelBtn: qe
1799
1897
  }) : E)) : i, /* @__PURE__ */ r.createElement(mo, {
1800
1898
  prefixCls: t
1801
1899
  }));
1802
1900
  }
1803
- const St = (e) => {
1901
+ const Ot = (e) => {
1804
1902
  const {
1805
1903
  close: t,
1806
1904
  zIndex: o,
@@ -1823,8 +1921,8 @@ const St = (e) => {
1823
1921
  }
1824
1922
  const m = `${l}-confirm`, p = e.width || 416, y = e.style || {}, g = e.mask === void 0 ? !0 : e.mask, C = e.maskClosable === void 0 ? !1 : e.maskClosable, b = O(m, `${m}-${e.type}`, {
1825
1923
  [`${m}-rtl`]: a === "rtl"
1826
- }, e.className), [, v] = Jt(), x = r.useMemo(() => o !== void 0 ? o : v.zIndexPopupBase + en, [o, v]);
1827
- return /* @__PURE__ */ r.createElement($t, Object.assign({}, e, {
1924
+ }, e.className), [, v] = en(), x = r.useMemo(() => o !== void 0 ? o : v.zIndexPopupBase + tn, [o, v]);
1925
+ return /* @__PURE__ */ r.createElement(xt, Object.assign({}, e, {
1828
1926
  className: b,
1829
1927
  wrapClassName: O({
1830
1928
  [`${m}-centered`]: !!e.centered
@@ -1848,10 +1946,10 @@ const St = (e) => {
1848
1946
  width: p,
1849
1947
  zIndex: x,
1850
1948
  closable: f
1851
- }), /* @__PURE__ */ r.createElement(xt, Object.assign({}, e, {
1949
+ }), /* @__PURE__ */ r.createElement(St, Object.assign({}, e, {
1852
1950
  confirmPrefixCls: m
1853
1951
  })));
1854
- }, ze = (e) => {
1952
+ }, Le = (e) => {
1855
1953
  const {
1856
1954
  rootPrefixCls: t,
1857
1955
  iconPrefixCls: o,
@@ -1863,13 +1961,13 @@ const St = (e) => {
1863
1961
  iconPrefixCls: o,
1864
1962
  direction: n,
1865
1963
  theme: a
1866
- }, /* @__PURE__ */ r.createElement(St, Object.assign({}, e)));
1964
+ }, /* @__PURE__ */ r.createElement(Ot, Object.assign({}, e)));
1867
1965
  };
1868
- process.env.NODE_ENV !== "production" && (St.displayName = "ConfirmDialog", ze.displayName = "ConfirmDialogWrapper");
1966
+ process.env.NODE_ENV !== "production" && (Ot.displayName = "ConfirmDialog", Le.displayName = "ConfirmDialogWrapper");
1869
1967
  const ee = [];
1870
- let Ot = "";
1871
- function Et() {
1872
- return Ot;
1968
+ let Et = "";
1969
+ function wt() {
1970
+ return Et;
1873
1971
  }
1874
1972
  const go = (e) => {
1875
1973
  var t, o;
@@ -1877,9 +1975,9 @@ const go = (e) => {
1877
1975
  prefixCls: n,
1878
1976
  getContainer: a,
1879
1977
  direction: l
1880
- } = e, s = at(), d = se(q), i = Et() || d.getPrefixCls(), f = n || `${i}-modal`;
1978
+ } = e, s = lt(), d = se(q), i = wt() || d.getPrefixCls(), f = n || `${i}-modal`;
1881
1979
  let c = a;
1882
- return c === !1 && (c = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && it(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ $.createElement(ze, Object.assign({}, e, {
1980
+ return c === !1 && (c = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && it(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ $.createElement(Le, Object.assign({}, e, {
1883
1981
  rootPrefixCls: i,
1884
1982
  prefixCls: f,
1885
1983
  iconPrefixCls: d.iconPrefixCls,
@@ -1890,7 +1988,7 @@ const go = (e) => {
1890
1988
  }));
1891
1989
  };
1892
1990
  function ce(e) {
1893
- const t = ln();
1991
+ const t = cn();
1894
1992
  process.env.NODE_ENV !== "production" && !t.holderRender && rn("Modal");
1895
1993
  const o = document.createDocumentFragment();
1896
1994
  let n = Object.assign(Object.assign({}, e), {
@@ -1914,7 +2012,7 @@ function ce(e) {
1914
2012
  }
1915
2013
  function d(c) {
1916
2014
  clearTimeout(a), a = setTimeout(() => {
1917
- const u = t.getPrefixCls(void 0, Et()), m = t.getIconPrefixCls(), p = t.getTheme(), y = /* @__PURE__ */ $.createElement(go, Object.assign({}, c));
2015
+ const u = t.getPrefixCls(void 0, wt()), m = t.getIconPrefixCls(), p = t.getTheme(), y = /* @__PURE__ */ $.createElement(go, Object.assign({}, c));
1918
2016
  l = sn()(/* @__PURE__ */ $.createElement(st, {
1919
2017
  prefixCls: u,
1920
2018
  iconPrefixCls: m,
@@ -1940,27 +2038,27 @@ function ce(e) {
1940
2038
  update: f
1941
2039
  };
1942
2040
  }
1943
- function wt(e) {
2041
+ function Nt(e) {
1944
2042
  return Object.assign(Object.assign({}, e), {
1945
2043
  type: "warning"
1946
2044
  });
1947
2045
  }
1948
- function Nt(e) {
2046
+ function Pt(e) {
1949
2047
  return Object.assign(Object.assign({}, e), {
1950
2048
  type: "info"
1951
2049
  });
1952
2050
  }
1953
- function Pt(e) {
2051
+ function jt(e) {
1954
2052
  return Object.assign(Object.assign({}, e), {
1955
2053
  type: "success"
1956
2054
  });
1957
2055
  }
1958
- function jt(e) {
2056
+ function It(e) {
1959
2057
  return Object.assign(Object.assign({}, e), {
1960
2058
  type: "error"
1961
2059
  });
1962
2060
  }
1963
- function It(e) {
2061
+ function Tt(e) {
1964
2062
  return Object.assign(Object.assign({}, e), {
1965
2063
  type: "confirm"
1966
2064
  });
@@ -1969,7 +2067,7 @@ function Co(e) {
1969
2067
  let {
1970
2068
  rootPrefixCls: t
1971
2069
  } = e;
1972
- process.env.NODE_ENV !== "production" && it(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), Ot = t;
2070
+ process.env.NODE_ENV !== "production" && it(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), Et = t;
1973
2071
  }
1974
2072
  var po = function(e, t) {
1975
2073
  var o = {};
@@ -1978,11 +2076,61 @@ var po = function(e, t) {
1978
2076
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1979
2077
  return o;
1980
2078
  };
1981
- const vo = (e, t) => {
2079
+ const vo = (e) => {
2080
+ const {
2081
+ prefixCls: t,
2082
+ className: o,
2083
+ closeIcon: n,
2084
+ closable: a,
2085
+ type: l,
2086
+ title: s,
2087
+ children: d,
2088
+ footer: i
2089
+ } = e, f = po(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
2090
+ getPrefixCls: c
2091
+ } = r.useContext(q), u = c(), m = t || c("modal"), p = rt(u), [y, g, C] = mt(m, p), b = `${m}-confirm`;
2092
+ let v = {};
2093
+ return l ? v = {
2094
+ closable: a ?? !1,
2095
+ title: "",
2096
+ footer: "",
2097
+ children: /* @__PURE__ */ r.createElement(St, Object.assign({}, e, {
2098
+ prefixCls: m,
2099
+ confirmPrefixCls: b,
2100
+ rootPrefixCls: u,
2101
+ content: d
2102
+ }))
2103
+ } : v = {
2104
+ closable: a ?? !0,
2105
+ title: s,
2106
+ footer: i !== null && /* @__PURE__ */ r.createElement($t, Object.assign({}, e)),
2107
+ children: d
2108
+ }, y(/* @__PURE__ */ r.createElement(He, Object.assign({
2109
+ prefixCls: m,
2110
+ className: O(g, `${m}-pure-panel`, l && b, l && `${b}-${l}`, o, C, p)
2111
+ }, f, {
2112
+ closeIcon: yt(m, n),
2113
+ closable: a
2114
+ }, v)));
2115
+ }, bo = dn(vo);
2116
+ function ho() {
2117
+ const [e, t] = r.useState([]), o = r.useCallback((n) => (t((a) => [].concat(K(a), [n])), () => {
2118
+ t((a) => a.filter((l) => l !== n));
2119
+ }), []);
2120
+ return [e, o];
2121
+ }
2122
+ var yo = function(e, t) {
2123
+ var o = {};
2124
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2125
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2126
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2127
+ return o;
2128
+ };
2129
+ const $o = (e, t) => {
1982
2130
  var o, {
1983
2131
  afterClose: n,
1984
2132
  config: a
1985
- } = e, l = po(e, ["afterClose", "config"]);
2133
+ } = e, l = yo(e, ["afterClose", "config"]);
1986
2134
  const [s, d] = r.useState(!0), [i, f] = r.useState(a), {
1987
2135
  direction: c,
1988
2136
  getPrefixCls: u
@@ -2006,8 +2154,8 @@ const vo = (e, t) => {
2006
2154
  f((x) => Object.assign(Object.assign({}, x), v));
2007
2155
  }
2008
2156
  }));
2009
- const C = (o = i.okCancel) !== null && o !== void 0 ? o : i.type === "confirm", [b] = Me("Modal", cn.Modal);
2010
- return /* @__PURE__ */ r.createElement(ze, Object.assign({
2157
+ const C = (o = i.okCancel) !== null && o !== void 0 ? o : i.type === "confirm", [b] = Me("Modal", un.Modal);
2158
+ return /* @__PURE__ */ r.createElement(Le, Object.assign({
2011
2159
  prefixCls: m,
2012
2160
  rootPrefixCls: p
2013
2161
  }, i, {
@@ -2018,15 +2166,15 @@ const vo = (e, t) => {
2018
2166
  direction: i.direction || c,
2019
2167
  cancelText: i.cancelText || (b == null ? void 0 : b.cancelText)
2020
2168
  }, l));
2021
- }, bo = /* @__PURE__ */ r.forwardRef(vo);
2169
+ }, xo = /* @__PURE__ */ r.forwardRef($o);
2022
2170
  let tt = 0;
2023
- const ho = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, t) => {
2024
- const [o, n] = bn();
2171
+ const So = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, t) => {
2172
+ const [o, n] = ho();
2025
2173
  return r.useImperativeHandle(t, () => ({
2026
2174
  patchElement: n
2027
2175
  }), []), /* @__PURE__ */ r.createElement(r.Fragment, null, o);
2028
2176
  }));
2029
- function yo() {
2177
+ function Oo() {
2030
2178
  const e = r.useRef(null), [t, o] = r.useState([]);
2031
2179
  r.useEffect(() => {
2032
2180
  t.length && (K(t).forEach((s) => {
@@ -2042,7 +2190,7 @@ function yo() {
2042
2190
  c = C;
2043
2191
  });
2044
2192
  let m = !1, p;
2045
- const y = /* @__PURE__ */ r.createElement(bo, {
2193
+ const y = /* @__PURE__ */ r.createElement(xo, {
2046
2194
  key: `modal-${tt}`,
2047
2195
  config: l(d),
2048
2196
  ref: f,
@@ -2073,78 +2221,34 @@ function yo() {
2073
2221
  };
2074
2222
  }, []);
2075
2223
  return [r.useMemo(() => ({
2076
- info: n(Nt),
2077
- success: n(Pt),
2078
- error: n(jt),
2079
- warning: n(wt),
2080
- confirm: n(It)
2081
- }), []), /* @__PURE__ */ r.createElement(ho, {
2224
+ info: n(Pt),
2225
+ success: n(jt),
2226
+ error: n(It),
2227
+ warning: n(Nt),
2228
+ confirm: n(Tt)
2229
+ }), []), /* @__PURE__ */ r.createElement(So, {
2082
2230
  key: "modal-holder",
2083
2231
  ref: e
2084
2232
  })];
2085
2233
  }
2086
- var $o = function(e, t) {
2087
- var o = {};
2088
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2089
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2090
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2091
- return o;
2092
- };
2093
- const xo = (e) => {
2094
- const {
2095
- prefixCls: t,
2096
- className: o,
2097
- closeIcon: n,
2098
- closable: a,
2099
- type: l,
2100
- title: s,
2101
- children: d,
2102
- footer: i
2103
- } = e, f = $o(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
2104
- getPrefixCls: c
2105
- } = r.useContext(q), u = c(), m = t || c("modal"), p = rt(u), [y, g, C] = yt(m, p), b = `${m}-confirm`;
2106
- let v = {};
2107
- return l ? v = {
2108
- closable: a ?? !1,
2109
- title: "",
2110
- footer: "",
2111
- children: /* @__PURE__ */ r.createElement(xt, Object.assign({}, e, {
2112
- prefixCls: m,
2113
- confirmPrefixCls: b,
2114
- rootPrefixCls: u,
2115
- content: d
2116
- }))
2117
- } : v = {
2118
- closable: a ?? !0,
2119
- title: s,
2120
- footer: i !== null && /* @__PURE__ */ r.createElement(pt, Object.assign({}, e)),
2121
- children: d
2122
- }, y(/* @__PURE__ */ r.createElement(Be, Object.assign({
2123
- prefixCls: m,
2124
- className: O(g, `${m}-pure-panel`, l && b, l && `${b}-${l}`, o, C, p)
2125
- }, f, {
2126
- closeIcon: Ct(m, n),
2127
- closable: a
2128
- }, v)));
2129
- }, So = dn(xo);
2130
- function Tt(e) {
2131
- return ce(wt(e));
2234
+ function Mt(e) {
2235
+ return ce(Nt(e));
2132
2236
  }
2133
- const G = $t;
2134
- G.useModal = yo;
2237
+ const G = xt;
2238
+ G.useModal = Oo;
2135
2239
  G.info = function(t) {
2136
- return ce(Nt(t));
2240
+ return ce(Pt(t));
2137
2241
  };
2138
2242
  G.success = function(t) {
2139
- return ce(Pt(t));
2243
+ return ce(jt(t));
2140
2244
  };
2141
2245
  G.error = function(t) {
2142
- return ce(jt(t));
2246
+ return ce(It(t));
2143
2247
  };
2144
- G.warning = Tt;
2145
- G.warn = Tt;
2248
+ G.warning = Mt;
2249
+ G.warn = Mt;
2146
2250
  G.confirm = function(t) {
2147
- return ce(It(t));
2251
+ return ce(Tt(t));
2148
2252
  };
2149
2253
  G.destroyAll = function() {
2150
2254
  for (; ee.length; ) {
@@ -2153,113 +2257,8 @@ G.destroyAll = function() {
2153
2257
  }
2154
2258
  };
2155
2259
  G.config = Co;
2156
- G._InternalPanelDoNotUseOrYouWillBeFired = So;
2260
+ G._InternalPanelDoNotUseOrYouWillBeFired = bo;
2157
2261
  process.env.NODE_ENV !== "production" && (G.displayName = "Modal");
2158
- const Oo = (e) => {
2159
- const {
2160
- paddingXXS: t,
2161
- lineWidth: o,
2162
- tagPaddingHorizontal: n,
2163
- componentCls: a,
2164
- calc: l
2165
- } = e, s = l(n).sub(o).equal(), d = l(t).sub(o).equal();
2166
- return {
2167
- // Result
2168
- [a]: Object.assign(Object.assign({}, lt(e)), {
2169
- display: "inline-block",
2170
- height: "auto",
2171
- // https://github.com/ant-design/ant-design/pull/47504
2172
- marginInlineEnd: e.marginXS,
2173
- paddingInline: s,
2174
- fontSize: e.tagFontSize,
2175
- lineHeight: e.tagLineHeight,
2176
- whiteSpace: "nowrap",
2177
- background: e.defaultBg,
2178
- border: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
2179
- borderRadius: e.borderRadiusSM,
2180
- opacity: 1,
2181
- transition: `all ${e.motionDurationMid}`,
2182
- textAlign: "start",
2183
- position: "relative",
2184
- // RTL
2185
- [`&${a}-rtl`]: {
2186
- direction: "rtl"
2187
- },
2188
- "&, a, a:hover": {
2189
- color: e.defaultColor
2190
- },
2191
- [`${a}-close-icon`]: {
2192
- marginInlineStart: d,
2193
- fontSize: e.tagIconSize,
2194
- color: e.colorTextDescription,
2195
- cursor: "pointer",
2196
- transition: `all ${e.motionDurationMid}`,
2197
- "&:hover": {
2198
- color: e.colorTextHeading
2199
- }
2200
- },
2201
- [`&${a}-has-color`]: {
2202
- borderColor: "transparent",
2203
- [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
2204
- color: e.colorTextLightSolid
2205
- }
2206
- },
2207
- "&-checkable": {
2208
- backgroundColor: "transparent",
2209
- borderColor: "transparent",
2210
- cursor: "pointer",
2211
- [`&:not(${a}-checkable-checked):hover`]: {
2212
- color: e.colorPrimary,
2213
- backgroundColor: e.colorFillSecondary
2214
- },
2215
- "&:active, &-checked": {
2216
- color: e.colorTextLightSolid
2217
- },
2218
- "&-checked": {
2219
- backgroundColor: e.colorPrimary,
2220
- "&:hover": {
2221
- backgroundColor: e.colorPrimaryHover
2222
- }
2223
- },
2224
- "&:active": {
2225
- backgroundColor: e.colorPrimaryActive
2226
- }
2227
- },
2228
- "&-hidden": {
2229
- display: "none"
2230
- },
2231
- // To ensure that a space will be placed between character and `Icon`.
2232
- [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
2233
- marginInlineStart: s
2234
- }
2235
- }),
2236
- [`${a}-borderless`]: {
2237
- borderColor: "transparent",
2238
- background: e.tagBorderlessBg
2239
- }
2240
- };
2241
- }, He = (e) => {
2242
- const {
2243
- lineWidth: t,
2244
- fontSizeIcon: o,
2245
- calc: n
2246
- } = e, a = e.fontSizeSM;
2247
- return fe(e, {
2248
- tagFontSize: a,
2249
- tagLineHeight: N(n(e.lineHeightSM).mul(a).equal()),
2250
- tagIconSize: n(o).sub(n(t).mul(2)).equal(),
2251
- // Tag icon is much smaller
2252
- tagPaddingHorizontal: 8,
2253
- // Fixed padding.
2254
- tagBorderlessBg: e.defaultBg
2255
- });
2256
- }, Le = (e) => ({
2257
- defaultBg: new un(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
2258
- defaultColor: e.colorText
2259
- }), Mt = re("Tag", (e) => {
2260
- const t = He(e);
2261
- return Oo(t);
2262
- }, Le);
2263
2262
  var Eo = function(e, t) {
2264
2263
  var o = {};
2265
2264
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
@@ -2280,7 +2279,7 @@ const wo = /* @__PURE__ */ r.forwardRef((e, t) => {
2280
2279
  tag: c
2281
2280
  } = r.useContext(q), u = (b) => {
2282
2281
  s == null || s(!l), d == null || d(b);
2283
- }, m = f("tag", o), [p, y, g] = Mt(m), C = O(m, `${m}-checkable`, {
2282
+ }, m = f("tag", o), [p, y, g] = ft(m), C = O(m, `${m}-checkable`, {
2284
2283
  [`${m}-checkable-checked`]: l
2285
2284
  }, c == null ? void 0 : c.className, a, y, g);
2286
2285
  return p(/* @__PURE__ */ r.createElement("span", Object.assign({}, i, {
@@ -2313,9 +2312,9 @@ const wo = /* @__PURE__ */ r.forwardRef((e, t) => {
2313
2312
  }
2314
2313
  };
2315
2314
  }), Po = Re(["Tag", "preset"], (e) => {
2316
- const t = He(e);
2315
+ const t = Be(e);
2317
2316
  return No(t);
2318
- }, Le);
2317
+ }, ze);
2319
2318
  function jo(e) {
2320
2319
  return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
2321
2320
  }
@@ -2332,9 +2331,9 @@ const de = (e, t, o) => {
2332
2331
  }
2333
2332
  };
2334
2333
  }, Io = Re(["Tag", "status"], (e) => {
2335
- const t = He(e);
2334
+ const t = Be(e);
2336
2335
  return [de(t, "success", "Success"), de(t, "processing", "Info"), de(t, "error", "Error"), de(t, "warning", "Warning")];
2337
- }, Le);
2336
+ }, ze);
2338
2337
  var To = function(e, t) {
2339
2338
  var o = {};
2340
2339
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
@@ -2364,7 +2363,7 @@ const Mo = /* @__PURE__ */ r.forwardRef((e, t) => {
2364
2363
  }, [u]);
2365
2364
  const x = fn(i), E = gn(i), w = x || E, S = Object.assign(Object.assign({
2366
2365
  backgroundColor: i && !w ? i : void 0
2367
- }, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, F] = Mt(h), H = O(h, g == null ? void 0 : g.className, {
2366
+ }, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, F] = ft(h), H = O(h, g == null ? void 0 : g.className, {
2368
2367
  [`${h}-${i}`]: w,
2369
2368
  [`${h}-has-color`]: i && !w,
2370
2369
  [`${h}-hidden`]: !C,
@@ -2372,7 +2371,7 @@ const Mo = /* @__PURE__ */ r.forwardRef((e, t) => {
2372
2371
  [`${h}-borderless`]: !c
2373
2372
  }, n, a, j, F), L = (T) => {
2374
2373
  T.stopPropagation(), f == null || f(T), !T.defaultPrevented && b(!1);
2375
- }, [, X] = gt(me(e), me(g), {
2374
+ }, [, X] = ht(me(e), me(g), {
2376
2375
  closable: !1,
2377
2376
  closeIconRender: (T) => {
2378
2377
  const J = /* @__PURE__ */ r.createElement("span", {