ysyt-react-agent-lib 1.0.8 → 1.0.9

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,6 +1,6 @@
1
- import { s as Ft, K as Ne, g as re, m as fe, u as N, t as Dt, r as nt, v as kt, x as K, y as At, z as _t, B as Pe, A as ot, E as Vt, h as R, d as O, G as De, p as je, f as Y, c as Ie, H as at, J as ke, n as Wt, L as Ae, N as _e, P as qt, R as Te, O as Gt, C as q, Q as ge, U as Xt, V as Ut, X 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-Dsoe_UAg.mjs";
2
1
  import * as r from "react";
3
- import $, { useContext as se, useRef as Z, useMemo as vn, useEffect as Ve } from "react";
2
+ import $, { useContext as re, useRef as Z, useMemo as Ft, useEffect as De } from "react";
3
+ import { s as Dt, K as Ne, R as Pe, p as je, g as se, t as kt, m as fe, f as N, r as nt, C as q, c as O, v as Ie, x as At, y as ge, k as Ce, z as _t, A as Vt, B as Wt, W as qt, G as Gt, H as Te, J as ot, L as Xt, e as R, N as ke, d as Y, a as Me, O as at, P as Ae, n as Ut, Q as _e, U as Ve, V as Kt, X as Qt, Z as K, $ as Zt, a0 as Yt, a1 as Re, a2 as Jt, a3 as lt, a4 as en, a5 as tn, l as rt, a6 as nn, a7 as on, a8 as an, a9 as ue, aa as ln, ab as st, ac as rn, ad as sn, ae as cn, af as dn, ag as un, ah as mn, ai as fn, aj as gn, ak as Cn, al as it, am as pn, an as vn } from "./index-1QbXooTs.mjs";
4
4
  const bn = new Ne("antFadeIn", {
5
5
  "0%": {
6
6
  opacity: 0
@@ -20,7 +20,7 @@ const bn = new Ne("antFadeIn", {
20
20
  const {
21
21
  antCls: o
22
22
  } = e, n = `${o}-fade`, a = t ? "&" : "";
23
- return [Ft(n, bn, hn, e.motionDurationMid, t), {
23
+ return [Dt(n, bn, hn, e.motionDurationMid, t), {
24
24
  [`
25
25
  ${a}${n}-enter,
26
26
  ${a}${n}-appear
@@ -32,526 +32,319 @@ const bn = new Ne("antFadeIn", {
32
32
  animationTimingFunction: "linear"
33
33
  }
34
34
  }];
35
- }, $n = (e) => {
35
+ };
36
+ function me(e) {
37
+ if (e)
38
+ return {
39
+ closable: e.closable,
40
+ closeIcon: e.closeIcon
41
+ };
42
+ }
43
+ function We(e) {
36
44
  const {
37
- componentCls: t
38
- } = e;
45
+ closable: t,
46
+ closeIcon: o
47
+ } = e || {};
48
+ return $.useMemo(() => {
49
+ if (
50
+ // If `closable`, whatever rest be should be true
51
+ !t && (t === !1 || o === !1 || o === null)
52
+ )
53
+ return !1;
54
+ if (t === void 0 && o === void 0)
55
+ return null;
56
+ let n = {
57
+ closeIcon: typeof o != "boolean" && o !== null ? o : void 0
58
+ };
59
+ return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
60
+ }, [t, o]);
61
+ }
62
+ function qe() {
63
+ const e = {};
64
+ for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
65
+ o[n] = arguments[n];
66
+ return o.forEach((a) => {
67
+ a && Object.keys(a).forEach((l) => {
68
+ a[l] !== void 0 && (e[l] = a[l]);
69
+ });
70
+ }), e;
71
+ }
72
+ const $n = {};
73
+ function ct(e, t) {
74
+ let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : $n;
75
+ const n = We(e), a = We(t), l = typeof n != "boolean" ? !!(n != null && n.disabled) : !1, s = $.useMemo(() => Object.assign({
76
+ closeIcon: /* @__PURE__ */ $.createElement(Pe, null)
77
+ }, 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]);
78
+ return $.useMemo(() => {
79
+ if (d === !1)
80
+ return [!1, null, l];
81
+ const {
82
+ closeIconRender: i
83
+ } = s, {
84
+ closeIcon: f
85
+ } = d;
86
+ let c = f;
87
+ if (c != null) {
88
+ i && (c = i(f));
89
+ const u = je(d, !0);
90
+ Object.keys(u).length && (c = /* @__PURE__ */ $.isValidElement(c) ? /* @__PURE__ */ $.cloneElement(c, u) : /* @__PURE__ */ $.createElement("span", Object.assign({}, u), c));
91
+ }
92
+ return [!0, c, l];
93
+ }, [d, s]);
94
+ }
95
+ const xn = (e) => {
96
+ const {
97
+ paddingXXS: t,
98
+ lineWidth: o,
99
+ tagPaddingHorizontal: n,
100
+ componentCls: a,
101
+ calc: l
102
+ } = e, s = l(n).sub(o).equal(), d = l(t).sub(o).equal();
39
103
  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"
104
+ // Result
105
+ [a]: Object.assign(Object.assign({}, nt(e)), {
106
+ display: "inline-block",
107
+ height: "auto",
108
+ // https://github.com/ant-design/ant-design/pull/47504
109
+ marginInlineEnd: e.marginXS,
110
+ paddingInline: s,
111
+ fontSize: e.tagFontSize,
112
+ lineHeight: e.tagLineHeight,
113
+ whiteSpace: "nowrap",
114
+ background: e.defaultBg,
115
+ border: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,
116
+ borderRadius: e.borderRadiusSM,
117
+ opacity: 1,
118
+ transition: `all ${e.motionDurationMid}`,
119
+ textAlign: "start",
120
+ position: "relative",
121
+ // RTL
122
+ [`&${a}-rtl`]: {
123
+ direction: "rtl"
62
124
  },
63
- "&-space-between": {
64
- justifyContent: "space-between"
125
+ "&, a, a:hover": {
126
+ color: e.defaultColor
65
127
  },
66
- "&-space-around": {
67
- justifyContent: "space-around"
128
+ [`${a}-close-icon`]: {
129
+ marginInlineStart: d,
130
+ fontSize: e.tagIconSize,
131
+ color: e.colorTextDescription,
132
+ cursor: "pointer",
133
+ transition: `all ${e.motionDurationMid}`,
134
+ "&:hover": {
135
+ color: e.colorTextHeading
136
+ }
68
137
  },
69
- "&-space-evenly": {
70
- justifyContent: "space-evenly"
138
+ [`&${a}-has-color`]: {
139
+ borderColor: "transparent",
140
+ [`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]: {
141
+ color: e.colorTextLightSolid
142
+ }
71
143
  },
72
- // Align at the top
73
- "&-top": {
74
- alignItems: "flex-start"
144
+ "&-checkable": {
145
+ backgroundColor: "transparent",
146
+ borderColor: "transparent",
147
+ cursor: "pointer",
148
+ [`&:not(${a}-checkable-checked):hover`]: {
149
+ color: e.colorPrimary,
150
+ backgroundColor: e.colorFillSecondary
151
+ },
152
+ "&:active, &-checked": {
153
+ color: e.colorTextLightSolid
154
+ },
155
+ "&-checked": {
156
+ backgroundColor: e.colorPrimary,
157
+ "&:hover": {
158
+ backgroundColor: e.colorPrimaryHover
159
+ }
160
+ },
161
+ "&:active": {
162
+ backgroundColor: e.colorPrimaryActive
163
+ }
75
164
  },
76
- // Align at the center
77
- "&-middle": {
78
- alignItems: "center"
165
+ "&-hidden": {
166
+ display: "none"
79
167
  },
80
- "&-bottom": {
81
- alignItems: "flex-end"
168
+ // To ensure that a space will be placed between character and `Icon`.
169
+ [`> ${e.iconCls} + span, > span + ${e.iconCls}`]: {
170
+ marginInlineStart: s
82
171
  }
172
+ }),
173
+ [`${a}-borderless`]: {
174
+ borderColor: "transparent",
175
+ background: e.tagBorderlessBg
83
176
  }
84
177
  };
85
- }, xn = (e) => {
178
+ }, Be = (e) => {
86
179
  const {
87
- componentCls: t
88
- } = e;
180
+ lineWidth: t,
181
+ fontSizeIcon: o,
182
+ calc: n
183
+ } = e, a = e.fontSizeSM;
184
+ return fe(e, {
185
+ tagFontSize: a,
186
+ tagLineHeight: N(n(e.lineHeightSM).mul(a).equal()),
187
+ tagIconSize: n(o).sub(n(t).mul(2)).equal(),
188
+ // Tag icon is much smaller
189
+ tagPaddingHorizontal: 8,
190
+ // Fixed padding.
191
+ tagBorderlessBg: e.defaultBg
192
+ });
193
+ }, ze = (e) => ({
194
+ defaultBg: new kt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),
195
+ defaultColor: e.colorText
196
+ }), dt = se("Tag", (e) => {
197
+ const t = Be(e);
198
+ return xn(t);
199
+ }, ze);
200
+ var Sn = function(e, t) {
201
+ var o = {};
202
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
203
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
204
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
205
+ return o;
206
+ };
207
+ const On = /* @__PURE__ */ r.forwardRef((e, t) => {
208
+ const {
209
+ prefixCls: o,
210
+ style: n,
211
+ className: a,
212
+ checked: l,
213
+ onChange: s,
214
+ onClick: d
215
+ } = e, i = Sn(e, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]), {
216
+ getPrefixCls: f,
217
+ tag: c
218
+ } = r.useContext(q), u = (b) => {
219
+ s == null || s(!l), d == null || d(b);
220
+ }, m = f("tag", o), [p, y, g] = dt(m), C = O(m, `${m}-checkable`, {
221
+ [`${m}-checkable-checked`]: l
222
+ }, c == null ? void 0 : c.className, a, y, g);
223
+ return p(/* @__PURE__ */ r.createElement("span", Object.assign({}, i, {
224
+ ref: t,
225
+ style: Object.assign(Object.assign({}, n), c == null ? void 0 : c.style),
226
+ className: C,
227
+ onClick: u
228
+ })));
229
+ }), En = (e) => At(e, (t, o) => {
230
+ let {
231
+ textColor: n,
232
+ lightBorderColor: a,
233
+ lightColor: l,
234
+ darkColor: s
235
+ } = o;
89
236
  return {
90
- // Grid system
91
- [t]: {
92
- position: "relative",
93
- maxWidth: "100%",
94
- // Prevent columns from collapsing when empty
95
- minHeight: 1
237
+ [`${e.componentCls}${e.componentCls}-${t}`]: {
238
+ color: n,
239
+ background: l,
240
+ borderColor: a,
241
+ // Inverse color
242
+ "&-inverse": {
243
+ color: e.colorTextLightSolid,
244
+ background: s,
245
+ borderColor: s
246
+ },
247
+ [`&${e.componentCls}-borderless`]: {
248
+ borderColor: "transparent"
249
+ }
250
+ }
251
+ };
252
+ }), wn = Ie(["Tag", "preset"], (e) => {
253
+ const t = Be(e);
254
+ return En(t);
255
+ }, ze);
256
+ function Nn(e) {
257
+ return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
258
+ }
259
+ const de = (e, t, o) => {
260
+ const n = Nn(o);
261
+ return {
262
+ [`${e.componentCls}${e.componentCls}-${t}`]: {
263
+ color: e[`color${o}`],
264
+ background: e[`color${n}Bg`],
265
+ borderColor: e[`color${n}Border`],
266
+ [`&${e.componentCls}-borderless`]: {
267
+ borderColor: "transparent"
268
+ }
96
269
  }
97
270
  };
98
- }, Sn = (e, t) => {
271
+ }, Pn = Ie(["Tag", "status"], (e) => {
272
+ const t = Be(e);
273
+ return [de(t, "success", "Success"), de(t, "processing", "Info"), de(t, "error", "Error"), de(t, "warning", "Warning")];
274
+ }, ze);
275
+ var jn = function(e, t) {
276
+ var o = {};
277
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
278
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
279
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
280
+ return o;
281
+ };
282
+ const In = /* @__PURE__ */ r.forwardRef((e, t) => {
99
283
  const {
100
284
  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"
127
- },
128
- {
129
- display: "var(--ant-display)",
130
- flex: `0 0 ${s / a * 100}%`,
131
- maxWidth: `${s / a * 100}%`
132
- }
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
156
- });
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"
197
- }
198
- }),
199
- [`${t}-wrap`]: Object.assign(Object.assign({}, We("fixed")), {
200
- zIndex: e.zIndexPopupBase,
201
- overflow: "auto",
202
- outline: 0,
203
- WebkitOverflowScrolling: "touch"
204
- })
205
- }
206
- }, {
207
- [`${t}-root`]: yn(e)
208
- }];
209
- }, Pn = (e) => {
210
- const {
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"
285
+ className: n,
286
+ rootClassName: a,
287
+ style: l,
288
+ children: s,
289
+ icon: d,
290
+ color: i,
291
+ onClose: f,
292
+ bordered: c = !0,
293
+ visible: u
294
+ } = e, m = jn(e, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]), {
295
+ getPrefixCls: p,
296
+ direction: y,
297
+ tag: g
298
+ } = r.useContext(q), [C, b] = r.useState(!0), v = ge(m, ["closeIcon", "closable"]);
299
+ process.env.NODE_ENV !== "production" && Ce("Tag").deprecated(!("visible" in e), "visible", "visible && <Tag />"), r.useEffect(() => {
300
+ u !== void 0 && b(u);
301
+ }, [u]);
302
+ const x = _t(i), E = Vt(i), w = x || E, S = Object.assign(Object.assign({
303
+ backgroundColor: i && !w ? i : void 0
304
+ }, g == null ? void 0 : g.style), l), h = p("tag", o), [I, j, F] = dt(h), H = O(h, g == null ? void 0 : g.className, {
305
+ [`${h}-${i}`]: w,
306
+ [`${h}-has-color`]: i && !w,
307
+ [`${h}-hidden`]: !C,
308
+ [`${h}-rtl`]: y === "rtl",
309
+ [`${h}-borderless`]: !c
310
+ }, n, a, j, F), L = (T) => {
311
+ T.stopPropagation(), f == null || f(T), !T.defaultPrevented && b(!1);
312
+ }, [, X] = ct(me(e), me(g), {
313
+ closable: !1,
314
+ closeIconRender: (T) => {
315
+ const J = /* @__PURE__ */ r.createElement("span", {
316
+ className: `${h}-close-icon`,
317
+ onClick: L
318
+ }, T);
319
+ return Wt(T, J, (B) => ({
320
+ onClick: (U) => {
321
+ var z;
322
+ (z = B == null ? void 0 : B.onClick) === null || z === void 0 || z.call(B, U), L(U);
368
323
  },
369
- [`${t}-confirm-body`]: {
370
- marginBottom: "auto"
371
- }
372
- }
373
- }
374
- ];
375
- }, jn = (e) => {
376
- const {
377
- componentCls: t
378
- } = e;
379
- return {
380
- [`${t}-root`]: {
381
- [`${t}-wrap-rtl`]: {
382
- direction: "rtl",
383
- [`${t}-confirm-body`]: {
384
- direction: "rtl"
385
- }
386
- }
387
- }
388
- };
389
- }, In = (e) => {
390
- const {
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)`
324
+ className: O(B == null ? void 0 : B.className, `${h}-close-icon`)
325
+ }));
397
326
  }
327
+ }), k = typeof m.onClick == "function" || s && s.type === "a", D = d || null, W = D ? /* @__PURE__ */ r.createElement(r.Fragment, null, D, s && /* @__PURE__ */ r.createElement("span", null, s)) : s, A = /* @__PURE__ */ r.createElement("span", Object.assign({}, v, {
328
+ ref: t,
329
+ className: H,
330
+ style: S
331
+ }), W, X, x && /* @__PURE__ */ r.createElement(wn, {
332
+ key: "preset",
333
+ prefixCls: h
334
+ }), E && /* @__PURE__ */ r.createElement(Pn, {
335
+ key: "status",
336
+ prefixCls: h
398
337
  }));
399
- return {
400
- [`${t}-root`]: {
401
- [t]: [{
402
- width: `var(--${t.replace(".", "")}-xs-width)`
403
- }].concat(K(n))
404
- }
405
- };
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) => {
447
- const {
448
- paddingXXS: t,
449
- lineWidth: o,
450
- tagPaddingHorizontal: n,
451
- componentCls: a,
452
- calc: l
453
- } = e, s = l(n).sub(o).equal(), d = l(t).sub(o).equal();
454
- return {
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"
475
- },
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
522
- }
523
- }),
524
- [`${a}-borderless`]: {
525
- borderColor: "transparent",
526
- background: e.tagBorderlessBg
527
- }
528
- };
529
- }, Be = (e) => {
530
- const {
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);
338
+ return I(k ? /* @__PURE__ */ r.createElement(qt, {
339
+ component: "Tag"
340
+ }, A) : A);
341
+ }), ut = In;
342
+ process.env.NODE_ENV !== "production" && (ut.displayName = "Tag");
343
+ ut.CheckableTag = On;
551
344
  function ye(e) {
552
345
  return !!(e != null && e.then);
553
346
  }
554
- const gt = (e) => {
347
+ const mt = (e) => {
555
348
  const {
556
349
  type: t,
557
350
  children: o,
@@ -563,7 +356,7 @@ const gt = (e) => {
563
356
  isSilent: i,
564
357
  quitOnNullishReturnValue: f,
565
358
  actionFn: c
566
- } = e, u = r.useRef(!1), m = r.useRef(null), [p, y] = _t(!1), g = function() {
359
+ } = e, u = r.useRef(!1), m = r.useRef(null), [p, y] = Gt(!1), g = function() {
567
360
  l == null || l.apply(void 0, arguments);
568
361
  };
569
362
  r.useEffect(() => {
@@ -605,7 +398,7 @@ const gt = (e) => {
605
398
  }
606
399
  C(x);
607
400
  };
608
- return /* @__PURE__ */ r.createElement(Pe, Object.assign({}, ot(t), {
401
+ return /* @__PURE__ */ r.createElement(Te, Object.assign({}, ot(t), {
609
402
  onClick: b,
610
403
  loading: p,
611
404
  prefixCls: n
@@ -613,8 +406,8 @@ const gt = (e) => {
613
406
  ref: m
614
407
  }), o);
615
408
  }, ie = /* @__PURE__ */ $.createContext({}), {
616
- Provider: Ct
617
- } = ie, qe = () => {
409
+ Provider: ft
410
+ } = ie, Ge = () => {
618
411
  const {
619
412
  autoFocusButton: e,
620
413
  cancelButtonProps: t,
@@ -625,8 +418,8 @@ const gt = (e) => {
625
418
  close: s,
626
419
  onCancel: d,
627
420
  onConfirm: i
628
- } = se(ie);
629
- return a ? /* @__PURE__ */ $.createElement(gt, {
421
+ } = re(ie);
422
+ return a ? /* @__PURE__ */ $.createElement(mt, {
630
423
  isSilent: n,
631
424
  actionFn: d,
632
425
  close: function() {
@@ -636,7 +429,7 @@ const gt = (e) => {
636
429
  buttonProps: t,
637
430
  prefixCls: `${l}-btn`
638
431
  }, o) : null;
639
- }, Ge = () => {
432
+ }, Xe = () => {
640
433
  const {
641
434
  autoFocusButton: e,
642
435
  close: t,
@@ -647,8 +440,8 @@ const gt = (e) => {
647
440
  okType: s,
648
441
  onConfirm: d,
649
442
  onOk: i
650
- } = se(ie);
651
- return /* @__PURE__ */ $.createElement(gt, {
443
+ } = re(ie);
444
+ return /* @__PURE__ */ $.createElement(mt, {
652
445
  isSilent: o,
653
446
  type: s || "primary",
654
447
  actionFn: i,
@@ -660,12 +453,12 @@ const gt = (e) => {
660
453
  prefixCls: `${a}-btn`
661
454
  }, l);
662
455
  };
663
- var pt = /* @__PURE__ */ r.createContext({});
664
- function Xe(e, t, o) {
456
+ var gt = /* @__PURE__ */ r.createContext({});
457
+ function Ue(e, t, o) {
665
458
  var n = t;
666
459
  return !n && o && (n = "".concat(e, "-").concat(o)), n;
667
460
  }
668
- function Ue(e, t) {
461
+ function Ke(e, t) {
669
462
  var o = e["page".concat(t ? "Y" : "X", "Offset")], n = "scroll".concat(t ? "Top" : "Left");
670
463
  if (typeof o != "number") {
671
464
  var a = e.document;
@@ -673,29 +466,29 @@ function Ue(e, t) {
673
466
  }
674
467
  return o;
675
468
  }
676
- function Mn(e) {
469
+ function Tn(e) {
677
470
  var t = e.getBoundingClientRect(), o = {
678
471
  left: t.left,
679
472
  top: t.top
680
473
  }, n = e.ownerDocument, a = n.defaultView || n.parentWindow;
681
- return o.left += Ue(a), o.top += Ue(a, !0), o;
474
+ return o.left += Ke(a), o.top += Ke(a, !0), o;
682
475
  }
683
- const Rn = /* @__PURE__ */ r.memo(function(e) {
476
+ const Mn = /* @__PURE__ */ r.memo(function(e) {
684
477
  var t = e.children;
685
478
  return t;
686
479
  }, function(e, t) {
687
480
  var o = t.shouldUpdate;
688
481
  return !o;
689
482
  });
690
- var Bn = {
483
+ var Rn = {
691
484
  width: 0,
692
485
  height: 0,
693
486
  overflow: "hidden",
694
487
  outline: "none"
695
- }, zn = {
488
+ }, Bn = {
696
489
  outline: "none"
697
490
  }, 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();
491
+ 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(gt), j = I.panel, F = Xt(b, j), H = Z(), L = Z();
699
492
  $.useImperativeHandle(t, function() {
700
493
  return {
701
494
  focus: function() {
@@ -725,13 +518,13 @@ var Bn = {
725
518
  }, /* @__PURE__ */ $.createElement("div", {
726
519
  className: "".concat(o, "-title"),
727
520
  id: s
728
- }, l)) : null, W = vn(function() {
729
- return De(i) === "object" && i !== null ? i : i ? {
521
+ }, l)) : null, W = Ft(function() {
522
+ return ke(i) === "object" && i !== null ? i : i ? {
730
523
  closeIcon: f ?? /* @__PURE__ */ $.createElement("span", {
731
524
  className: "".concat(o, "-close-x")
732
525
  })
733
526
  } : {};
734
- }, [i, f, o]), A = je(W, !0), T = De(i) === "object" && i.disabled, J = i ? /* @__PURE__ */ $.createElement("button", Y({
527
+ }, [i, f, o]), A = je(W, !0), T = ke(i) === "object" && i.disabled, J = i ? /* @__PURE__ */ $.createElement("button", Y({
735
528
  type: "button",
736
529
  onClick: c,
737
530
  "aria-label": "Close"
@@ -758,21 +551,21 @@ var Bn = {
758
551
  }, /* @__PURE__ */ $.createElement("div", {
759
552
  ref: H,
760
553
  tabIndex: 0,
761
- style: zn
762
- }, /* @__PURE__ */ $.createElement(Rn, {
554
+ style: Bn
555
+ }, /* @__PURE__ */ $.createElement(Mn, {
763
556
  shouldUpdate: v || x
764
557
  }, y ? y(B) : B)), /* @__PURE__ */ $.createElement("div", {
765
558
  tabIndex: 0,
766
559
  ref: L,
767
- style: Bn
560
+ style: Rn
768
561
  }));
769
562
  });
770
563
  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 = {};
564
+ var Ct = /* @__PURE__ */ r.forwardRef(function(e, t) {
565
+ 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 = Me(y, 2), C = g[0], b = g[1], v = {};
773
566
  C && (v.transformOrigin = C);
774
567
  function x() {
775
- var E = Mn(p.current);
568
+ var E = Tn(p.current);
776
569
  b(m && (m.x || m.y) ? "".concat(m.x - E.left, "px ").concat(m.y - E.top, "px") : "");
777
570
  }
778
571
  return /* @__PURE__ */ r.createElement(at, {
@@ -797,8 +590,8 @@ var vt = /* @__PURE__ */ r.forwardRef(function(e, t) {
797
590
  }));
798
591
  });
799
592
  });
800
- vt.displayName = "Content";
801
- var Hn = function(t) {
593
+ Ct.displayName = "Content";
594
+ var zn = function(t) {
802
595
  var o = t.prefixCls, n = t.style, a = t.visible, l = t.maskProps, s = t.motionName, d = t.className;
803
596
  return /* @__PURE__ */ r.createElement(at, {
804
597
  key: "mask",
@@ -813,17 +606,17 @@ var Hn = function(t) {
813
606
  className: O("".concat(o, "-mask"), c, d)
814
607
  }, l));
815
608
  });
816
- }, Ln = function(t) {
609
+ }, Hn = function(t) {
817
610
  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
611
  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();
612
+ Ae(!(P in t), "".concat(P, " is deprecated, please use styles instead."));
613
+ }), "wrapClassName" in t && Ae(!1, "wrapClassName is deprecated, please use classNames instead."));
614
+ var W = Z(), A = Z(), T = Z(), J = r.useState(s), B = Me(J, 2), U = B[0], z = B[1], ae = Ut();
822
615
  function Q() {
823
- Ae(A.current, document.activeElement) || (W.current = document.activeElement);
616
+ _e(A.current, document.activeElement) || (W.current = document.activeElement);
824
617
  }
825
618
  function be() {
826
- if (!Ae(A.current, document.activeElement)) {
619
+ if (!_e(A.current, document.activeElement)) {
827
620
  var P;
828
621
  (P = T.current) === null || P === void 0 || P.focus();
829
622
  }
@@ -859,15 +652,15 @@ var Hn = function(t) {
859
652
  V.current ? V.current = !1 : A.current === he.target && M(he);
860
653
  });
861
654
  function Ht(P) {
862
- if (i && P.keyCode === _e.ESC) {
655
+ if (i && P.keyCode === Ve.ESC) {
863
656
  P.stopPropagation(), M(P);
864
657
  return;
865
658
  }
866
- s && P.keyCode === _e.TAB && T.current.changeActive(!P.shiftKey);
659
+ s && P.keyCode === Ve.TAB && T.current.changeActive(!P.shiftKey);
867
660
  }
868
- Ve(function() {
661
+ De(function() {
869
662
  s && (z(!0), Q());
870
- }, [s]), Ve(function() {
663
+ }, [s]), De(function() {
871
664
  return function() {
872
665
  clearTimeout(le.current);
873
666
  };
@@ -881,10 +674,10 @@ var Hn = function(t) {
881
674
  className: O("".concat(n, "-root"), X)
882
675
  }, je(t, {
883
676
  data: !0
884
- })), /* @__PURE__ */ r.createElement(Hn, {
677
+ })), /* @__PURE__ */ r.createElement(zn, {
885
678
  prefixCls: n,
886
679
  visible: S && s,
887
- motionName: Xe(n, h, I),
680
+ motionName: Ue(n, h, I),
888
681
  style: R(R({
889
682
  zIndex: a
890
683
  }, H), D == null ? void 0 : D.mask),
@@ -897,7 +690,7 @@ var Hn = function(t) {
897
690
  ref: A,
898
691
  onClick: Fe,
899
692
  style: Lt
900
- }, p), /* @__PURE__ */ r.createElement(vt, Y({}, t, {
693
+ }, p), /* @__PURE__ */ r.createElement(Ct, Y({}, t, {
901
694
  onMouseDown: Bt,
902
695
  onMouseUp: zt,
903
696
  ref: T,
@@ -907,91 +700,32 @@ var Hn = function(t) {
907
700
  visible: s && U,
908
701
  onClose: M,
909
702
  onVisibleChanged: _,
910
- motionName: Xe(n, b, v)
703
+ motionName: Ue(n, b, v)
911
704
  }))));
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() {
705
+ }, pt = function(t) {
706
+ 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 = Me(f, 2), u = c[0], m = c[1], p = r.useMemo(function() {
914
707
  return {
915
708
  panel: i
916
709
  };
917
710
  }, [i]);
918
711
  return r.useEffect(function() {
919
712
  o && m(!0);
920
- }, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(pt.Provider, {
713
+ }, [o]), !a && s && !u ? null : /* @__PURE__ */ r.createElement(gt.Provider, {
921
714
  value: p
922
- }, /* @__PURE__ */ r.createElement(qt, {
715
+ }, /* @__PURE__ */ r.createElement(Kt, {
923
716
  open: o || a || u,
924
717
  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
- }))));
933
- };
934
- bt.displayName = "Dialog";
935
- function me(e) {
936
- if (e)
937
- return {
938
- closable: e.closable,
939
- closeIcon: e.closeIcon
940
- };
941
- }
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]);
960
- }
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;
970
- }
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));
718
+ getContainer: n,
719
+ autoLock: o || u
720
+ }, /* @__PURE__ */ r.createElement(Hn, Y({}, t, {
721
+ destroyOnClose: s,
722
+ afterClose: function() {
723
+ d == null || d(), m(!1);
990
724
  }
991
- return [!0, c, l];
992
- }, [d, s]);
993
- }
994
- const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
725
+ }))));
726
+ };
727
+ pt.displayName = "Dialog";
728
+ const Ln = () => Qt() && window.document.documentElement, pe = (e) => {
995
729
  const {
996
730
  prefixCls: t,
997
731
  className: o,
@@ -1014,7 +748,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1014
748
  className: O(t, s, d, o),
1015
749
  style: Object.assign(Object.assign({}, i), n)
1016
750
  });
1017
- }, kn = new Ne("ant-skeleton-loading", {
751
+ }, Fn = new Ne("ant-skeleton-loading", {
1018
752
  "0%": {
1019
753
  backgroundPosition: "100% 50%"
1020
754
  },
@@ -1026,17 +760,17 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1026
760
  lineHeight: N(e)
1027
761
  }), ne = (e) => Object.assign({
1028
762
  width: e
1029
- }, ve(e)), An = (e) => ({
763
+ }, ve(e)), Dn = (e) => ({
1030
764
  background: e.skeletonLoadingBackground,
1031
765
  backgroundSize: "400% 100%",
1032
- animationName: kn,
766
+ animationName: Fn,
1033
767
  animationDuration: e.skeletonLoadingMotionDuration,
1034
768
  animationTimingFunction: "ease",
1035
769
  animationIterationCount: "infinite"
1036
770
  }), $e = (e, t) => Object.assign({
1037
771
  width: t(e).mul(5).equal(),
1038
772
  minWidth: t(e).mul(5).equal()
1039
- }, ve(e)), _n = (e) => {
773
+ }, ve(e)), kn = (e) => {
1040
774
  const {
1041
775
  skeletonAvatarCls: t,
1042
776
  gradientFromColor: o,
@@ -1056,7 +790,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1056
790
  [`${t}${t}-lg`]: Object.assign({}, ne(a)),
1057
791
  [`${t}${t}-sm`]: Object.assign({}, ne(l))
1058
792
  };
1059
- }, Vn = (e) => {
793
+ }, An = (e) => {
1060
794
  const {
1061
795
  controlHeight: t,
1062
796
  borderRadiusSM: o,
@@ -1076,9 +810,9 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1076
810
  [`${n}-lg`]: Object.assign({}, $e(a, d)),
1077
811
  [`${n}-sm`]: Object.assign({}, $e(l, d))
1078
812
  };
1079
- }, Ze = (e) => Object.assign({
813
+ }, Qe = (e) => Object.assign({
1080
814
  width: e
1081
- }, ve(e)), Wn = (e) => {
815
+ }, ve(e)), _n = (e) => {
1082
816
  const {
1083
817
  skeletonImageCls: t,
1084
818
  imageSizeBase: o,
@@ -1094,11 +828,11 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1094
828
  verticalAlign: "middle",
1095
829
  background: n,
1096
830
  borderRadius: a
1097
- }, Ze(l(o).mul(2).equal())), {
831
+ }, Qe(l(o).mul(2).equal())), {
1098
832
  [`${t}-path`]: {
1099
833
  fill: "#bfbfbf"
1100
834
  },
1101
- [`${t}-svg`]: Object.assign(Object.assign({}, Ze(o)), {
835
+ [`${t}-svg`]: Object.assign(Object.assign({}, Qe(o)), {
1102
836
  maxWidth: l(o).mul(4).equal(),
1103
837
  maxHeight: l(o).mul(4).equal()
1104
838
  }),
@@ -1127,7 +861,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1127
861
  }, Se = (e, t) => Object.assign({
1128
862
  width: t(e).mul(2).equal(),
1129
863
  minWidth: t(e).mul(2).equal()
1130
- }, ve(e)), qn = (e) => {
864
+ }, ve(e)), Vn = (e) => {
1131
865
  const {
1132
866
  borderRadiusSM: t,
1133
867
  skeletonButtonCls: o,
@@ -1151,7 +885,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1151
885
  }), xe(e, a, `${o}-lg`)), {
1152
886
  [`${o}-sm`]: Object.assign({}, Se(l, d))
1153
887
  }), xe(e, l, `${o}-sm`));
1154
- }, Gn = (e) => {
888
+ }, Wn = (e) => {
1155
889
  const {
1156
890
  componentCls: t,
1157
891
  skeletonAvatarCls: o,
@@ -1244,7 +978,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1244
978
  [`${t}${t}-element`]: Object.assign(Object.assign(Object.assign(Object.assign({
1245
979
  display: "inline-block",
1246
980
  width: "auto"
1247
- }, qn(e)), _n(e)), Vn(e)), Wn(e)),
981
+ }, Vn(e)), kn(e)), An(e)), _n(e)),
1248
982
  // Skeleton Block Button, Input
1249
983
  [`${t}${t}-block`]: {
1250
984
  width: "100%",
@@ -1264,10 +998,10 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1264
998
  ${l},
1265
999
  ${s},
1266
1000
  ${d}
1267
- `]: Object.assign({}, An(e))
1001
+ `]: Object.assign({}, Dn(e))
1268
1002
  }
1269
1003
  };
1270
- }, Xn = (e) => {
1004
+ }, qn = (e) => {
1271
1005
  const {
1272
1006
  colorFillContent: t,
1273
1007
  colorFill: o
@@ -1282,7 +1016,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1282
1016
  paragraphMarginTop: e.marginLG + e.marginXXS,
1283
1017
  paragraphLiHeight: e.controlHeight / 2
1284
1018
  };
1285
- }, oe = re("Skeleton", (e) => {
1019
+ }, oe = se("Skeleton", (e) => {
1286
1020
  const {
1287
1021
  componentCls: t,
1288
1022
  calc: o
@@ -1299,10 +1033,10 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1299
1033
  skeletonLoadingBackground: `linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,
1300
1034
  skeletonLoadingMotionDuration: "1.4s"
1301
1035
  });
1302
- return [Gn(n)];
1303
- }, Xn, {
1036
+ return [Wn(n)];
1037
+ }, qn, {
1304
1038
  deprecatedTokens: [["color", "gradientFromColor"], ["colorGradientEnd", "gradientToColor"]]
1305
- }), Un = (e) => {
1039
+ }), Gn = (e) => {
1306
1040
  const {
1307
1041
  prefixCls: t,
1308
1042
  className: o,
@@ -1322,7 +1056,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1322
1056
  shape: l,
1323
1057
  size: s
1324
1058
  }, m))));
1325
- }, Kn = (e) => {
1059
+ }, Xn = (e) => {
1326
1060
  const {
1327
1061
  prefixCls: t,
1328
1062
  className: o,
@@ -1342,7 +1076,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1342
1076
  prefixCls: `${i}-button`,
1343
1077
  size: s
1344
1078
  }, 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) => {
1079
+ }, Un = "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", Kn = (e) => {
1346
1080
  const {
1347
1081
  prefixCls: t,
1348
1082
  className: o,
@@ -1364,10 +1098,10 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1364
1098
  xmlns: "http://www.w3.org/2000/svg",
1365
1099
  className: `${d}-image-svg`
1366
1100
  }, /* @__PURE__ */ r.createElement("title", null, "Image placeholder"), /* @__PURE__ */ r.createElement("path", {
1367
- d: Qn,
1101
+ d: Un,
1368
1102
  className: `${d}-image-path`
1369
1103
  })))));
1370
- }, Yn = (e) => {
1104
+ }, Qn = (e) => {
1371
1105
  const {
1372
1106
  prefixCls: t,
1373
1107
  className: o,
@@ -1387,7 +1121,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1387
1121
  prefixCls: `${i}-input`,
1388
1122
  size: s
1389
1123
  }, m))));
1390
- }, Jn = (e) => {
1124
+ }, Zn = (e) => {
1391
1125
  const {
1392
1126
  prefixCls: t,
1393
1127
  className: o,
@@ -1406,7 +1140,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1406
1140
  className: O(`${i}-image`, o),
1407
1141
  style: a
1408
1142
  }, s)));
1409
- }, eo = (e, t) => {
1143
+ }, Yn = (e, t) => {
1410
1144
  const {
1411
1145
  width: o,
1412
1146
  rows: n = 2
@@ -1415,7 +1149,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1415
1149
  return o[e];
1416
1150
  if (n - 1 === e)
1417
1151
  return o;
1418
- }, to = (e) => {
1152
+ }, Jn = (e) => {
1419
1153
  const {
1420
1154
  prefixCls: t,
1421
1155
  className: o,
@@ -1426,7 +1160,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1426
1160
  /* @__PURE__ */ r.createElement("li", {
1427
1161
  key: d,
1428
1162
  style: {
1429
- width: eo(d, e)
1163
+ width: Yn(d, e)
1430
1164
  }
1431
1165
  })
1432
1166
  ));
@@ -1434,7 +1168,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1434
1168
  className: O(t, o),
1435
1169
  style: n
1436
1170
  }, l);
1437
- }, no = (e) => {
1171
+ }, eo = (e) => {
1438
1172
  let {
1439
1173
  prefixCls: t,
1440
1174
  className: o,
@@ -1454,7 +1188,7 @@ const Dn = () => Gt() && window.document.documentElement, pe = (e) => {
1454
1188
  function Oe(e) {
1455
1189
  return e && typeof e == "object" ? e : {};
1456
1190
  }
1457
- function oo(e, t) {
1191
+ function to(e, t) {
1458
1192
  return e && !t ? {
1459
1193
  size: "large",
1460
1194
  shape: "square"
@@ -1463,163 +1197,574 @@ function oo(e, t) {
1463
1197
  shape: "circle"
1464
1198
  };
1465
1199
  }
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) => {
1200
+ function no(e, t) {
1201
+ return !e && t ? {
1202
+ width: "38%"
1203
+ } : e && t ? {
1204
+ width: "50%"
1205
+ } : {};
1206
+ }
1207
+ function oo(e, t) {
1208
+ const o = {};
1209
+ return (!e || !t) && (o.width = "61%"), !e && t ? o.rows = 3 : o.rows = 2, o;
1210
+ }
1211
+ const te = (e) => {
1212
+ const {
1213
+ prefixCls: t,
1214
+ loading: o,
1215
+ className: n,
1216
+ rootClassName: a,
1217
+ style: l,
1218
+ children: s,
1219
+ avatar: d = !1,
1220
+ title: i = !0,
1221
+ paragraph: f = !0,
1222
+ active: c,
1223
+ round: u
1224
+ } = e, {
1225
+ getPrefixCls: m,
1226
+ direction: p,
1227
+ className: y,
1228
+ style: g
1229
+ } = Zt("skeleton"), C = m("skeleton", t), [b, v, x] = oe(C);
1230
+ if (o || !("loading" in e)) {
1231
+ const E = !!d, w = !!i, S = !!f;
1232
+ let h;
1233
+ if (E) {
1234
+ const F = Object.assign(Object.assign({
1235
+ prefixCls: `${C}-avatar`
1236
+ }, to(w, S)), Oe(d));
1237
+ h = /* @__PURE__ */ r.createElement("div", {
1238
+ className: `${C}-header`
1239
+ }, /* @__PURE__ */ r.createElement(pe, Object.assign({}, F)));
1240
+ }
1241
+ let I;
1242
+ if (w || S) {
1243
+ let F;
1244
+ if (w) {
1245
+ const L = Object.assign(Object.assign({
1246
+ prefixCls: `${C}-title`
1247
+ }, no(E, S)), Oe(i));
1248
+ F = /* @__PURE__ */ r.createElement(eo, Object.assign({}, L));
1249
+ }
1250
+ let H;
1251
+ if (S) {
1252
+ const L = Object.assign(Object.assign({
1253
+ prefixCls: `${C}-paragraph`
1254
+ }, oo(E, w)), Oe(f));
1255
+ H = /* @__PURE__ */ r.createElement(Jn, Object.assign({}, L));
1256
+ }
1257
+ I = /* @__PURE__ */ r.createElement("div", {
1258
+ className: `${C}-content`
1259
+ }, F, H);
1260
+ }
1261
+ const j = O(C, {
1262
+ [`${C}-with-avatar`]: E,
1263
+ [`${C}-active`]: c,
1264
+ [`${C}-rtl`]: p === "rtl",
1265
+ [`${C}-round`]: u
1266
+ }, y, n, a, v, x);
1267
+ return b(/* @__PURE__ */ r.createElement("div", {
1268
+ className: j,
1269
+ style: Object.assign(Object.assign({}, g), l)
1270
+ }, h, I));
1271
+ }
1272
+ return s ?? null;
1273
+ };
1274
+ te.Button = Xn;
1275
+ te.Avatar = Gn;
1276
+ te.Input = Qn;
1277
+ te.Image = Kn;
1278
+ te.Node = Zn;
1279
+ process.env.NODE_ENV !== "production" && (te.displayName = "Skeleton");
1280
+ function Ze() {
1281
+ }
1282
+ const ao = /* @__PURE__ */ r.createContext({
1283
+ add: Ze,
1284
+ remove: Ze
1285
+ });
1286
+ function lo(e) {
1287
+ const t = r.useContext(ao), o = r.useRef(null);
1288
+ return Yt((a) => {
1289
+ if (a) {
1290
+ const l = e ? a.querySelector(e) : a;
1291
+ t.add(l), o.current = l;
1292
+ } else
1293
+ t.remove(o.current);
1294
+ });
1295
+ }
1296
+ const Ye = () => {
1297
+ const {
1298
+ cancelButtonProps: e,
1299
+ cancelTextLocale: t,
1300
+ onCancel: o
1301
+ } = re(ie);
1302
+ return /* @__PURE__ */ $.createElement(Te, Object.assign({
1303
+ onClick: o
1304
+ }, e), t);
1305
+ }, Je = () => {
1306
+ const {
1307
+ confirmLoading: e,
1308
+ okButtonProps: t,
1309
+ okType: o,
1310
+ okTextLocale: n,
1311
+ onOk: a
1312
+ } = re(ie);
1313
+ return /* @__PURE__ */ $.createElement(Te, Object.assign({}, ot(o), {
1314
+ loading: e,
1315
+ onClick: a
1316
+ }, t), n);
1317
+ };
1318
+ function vt(e, t) {
1319
+ return /* @__PURE__ */ $.createElement("span", {
1320
+ className: `${e}-close-x`
1321
+ }, t || /* @__PURE__ */ $.createElement(Pe, {
1322
+ className: `${e}-close-icon`
1323
+ }));
1324
+ }
1325
+ const bt = (e) => {
1326
+ const {
1327
+ okText: t,
1328
+ okType: o = "primary",
1329
+ cancelText: n,
1330
+ confirmLoading: a,
1331
+ onOk: l,
1332
+ onCancel: s,
1333
+ okButtonProps: d,
1334
+ cancelButtonProps: i,
1335
+ footer: f
1336
+ } = e, [c] = Re("Modal", lt()), u = t || (c == null ? void 0 : c.okText), m = n || (c == null ? void 0 : c.cancelText), p = {
1337
+ confirmLoading: a,
1338
+ okButtonProps: d,
1339
+ cancelButtonProps: i,
1340
+ okTextLocale: u,
1341
+ cancelTextLocale: m,
1342
+ okType: o,
1343
+ onOk: l,
1344
+ onCancel: s
1345
+ }, y = $.useMemo(() => p, K(Object.values(p)));
1346
+ let g;
1347
+ 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, {
1348
+ OkBtn: Je,
1349
+ CancelBtn: Ye
1350
+ })), g = /* @__PURE__ */ $.createElement(ft, {
1351
+ value: y
1352
+ }, g)) : g = f, /* @__PURE__ */ $.createElement(Jt, {
1353
+ disabled: !1
1354
+ }, g);
1355
+ }, ro = (e) => {
1356
+ const {
1357
+ componentCls: t
1358
+ } = e;
1359
+ return {
1360
+ // Grid system
1361
+ [t]: {
1362
+ display: "flex",
1363
+ flexFlow: "row wrap",
1364
+ minWidth: 0,
1365
+ "&::before, &::after": {
1366
+ display: "flex"
1367
+ },
1368
+ "&-no-wrap": {
1369
+ flexWrap: "nowrap"
1370
+ },
1371
+ // The origin of the X-axis
1372
+ "&-start": {
1373
+ justifyContent: "flex-start"
1374
+ },
1375
+ // The center of the X-axis
1376
+ "&-center": {
1377
+ justifyContent: "center"
1378
+ },
1379
+ // The opposite of the X-axis
1380
+ "&-end": {
1381
+ justifyContent: "flex-end"
1382
+ },
1383
+ "&-space-between": {
1384
+ justifyContent: "space-between"
1385
+ },
1386
+ "&-space-around": {
1387
+ justifyContent: "space-around"
1388
+ },
1389
+ "&-space-evenly": {
1390
+ justifyContent: "space-evenly"
1391
+ },
1392
+ // Align at the top
1393
+ "&-top": {
1394
+ alignItems: "flex-start"
1395
+ },
1396
+ // Align at the center
1397
+ "&-middle": {
1398
+ alignItems: "center"
1399
+ },
1400
+ "&-bottom": {
1401
+ alignItems: "flex-end"
1402
+ }
1403
+ }
1404
+ };
1405
+ }, so = (e) => {
1406
+ const {
1407
+ componentCls: t
1408
+ } = e;
1409
+ return {
1410
+ // Grid system
1411
+ [t]: {
1412
+ position: "relative",
1413
+ maxWidth: "100%",
1414
+ // Prevent columns from collapsing when empty
1415
+ minHeight: 1
1416
+ }
1417
+ };
1418
+ }, io = (e, t) => {
1419
+ const {
1420
+ prefixCls: o,
1421
+ componentCls: n,
1422
+ gridColumns: a
1423
+ } = e, l = {};
1424
+ for (let s = a; s >= 0; s--)
1425
+ s === 0 ? (l[`${n}${t}-${s}`] = {
1426
+ display: "none"
1427
+ }, l[`${n}-push-${s}`] = {
1428
+ insetInlineStart: "auto"
1429
+ }, l[`${n}-pull-${s}`] = {
1430
+ insetInlineEnd: "auto"
1431
+ }, l[`${n}${t}-push-${s}`] = {
1432
+ insetInlineStart: "auto"
1433
+ }, l[`${n}${t}-pull-${s}`] = {
1434
+ insetInlineEnd: "auto"
1435
+ }, l[`${n}${t}-offset-${s}`] = {
1436
+ marginInlineStart: 0
1437
+ }, l[`${n}${t}-order-${s}`] = {
1438
+ order: 0
1439
+ }) : (l[`${n}${t}-${s}`] = [
1440
+ // https://github.com/ant-design/ant-design/issues/44456
1441
+ // Form set `display: flex` on Col which will override `display: block`.
1442
+ // Let's get it from css variable to support override.
1443
+ {
1444
+ "--ant-display": "block",
1445
+ // Fallback to display if variable not support
1446
+ display: "block"
1447
+ },
1448
+ {
1449
+ display: "var(--ant-display)",
1450
+ flex: `0 0 ${s / a * 100}%`,
1451
+ maxWidth: `${s / a * 100}%`
1452
+ }
1453
+ ], l[`${n}${t}-push-${s}`] = {
1454
+ insetInlineStart: `${s / a * 100}%`
1455
+ }, l[`${n}${t}-pull-${s}`] = {
1456
+ insetInlineEnd: `${s / a * 100}%`
1457
+ }, l[`${n}${t}-offset-${s}`] = {
1458
+ marginInlineStart: `${s / a * 100}%`
1459
+ }, l[`${n}${t}-order-${s}`] = {
1460
+ order: s
1461
+ });
1462
+ return l[`${n}${t}-flex`] = {
1463
+ flex: `var(--${o}${t}-flex)`
1464
+ }, l;
1465
+ }, Ee = (e, t) => io(e, t), co = (e, t, o) => ({
1466
+ [`@media (min-width: ${N(t)})`]: Object.assign({}, Ee(e, o))
1467
+ }), uo = () => ({}), mo = () => ({});
1468
+ se("Grid", ro, uo);
1469
+ const ht = (e) => ({
1470
+ xs: e.screenXSMin,
1471
+ sm: e.screenSMMin,
1472
+ md: e.screenMDMin,
1473
+ lg: e.screenLGMin,
1474
+ xl: e.screenXLMin,
1475
+ xxl: e.screenXXLMin
1476
+ });
1477
+ se("Grid", (e) => {
1478
+ const t = fe(e, {
1479
+ gridColumns: 24
1480
+ // Row is divided into 24 parts in Grid
1481
+ }), o = ht(t);
1482
+ return delete o.xs, [so(t), Ee(t, ""), Ee(t, "-xs"), Object.keys(o).map((n) => co(t, o[n], `-${n}`)).reduce((n, a) => Object.assign(Object.assign({}, n), a), {})];
1483
+ }, mo);
1484
+ function et(e) {
1485
+ return {
1486
+ position: e,
1487
+ inset: 0
1488
+ };
1489
+ }
1490
+ const fo = (e) => {
1478
1491
  const {
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)));
1492
+ componentCls: t,
1493
+ antCls: o
1494
+ } = e;
1495
+ return [{
1496
+ [`${t}-root`]: {
1497
+ [`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]: {
1498
+ // reset scale avoid mousePosition bug
1499
+ transform: "none",
1500
+ opacity: 0,
1501
+ animationDuration: e.motionDurationSlow,
1502
+ // https://github.com/ant-design/ant-design/issues/11777
1503
+ userSelect: "none"
1504
+ },
1505
+ // https://github.com/ant-design/ant-design/issues/37329
1506
+ // https://github.com/ant-design/ant-design/issues/40272
1507
+ [`${t}${o}-zoom-leave ${t}-content`]: {
1508
+ pointerEvents: "none"
1509
+ },
1510
+ [`${t}-mask`]: Object.assign(Object.assign({}, et("fixed")), {
1511
+ zIndex: e.zIndexPopupBase,
1512
+ height: "100%",
1513
+ backgroundColor: e.colorBgMask,
1514
+ pointerEvents: "none",
1515
+ [`${t}-hidden`]: {
1516
+ display: "none"
1517
+ }
1518
+ }),
1519
+ [`${t}-wrap`]: Object.assign(Object.assign({}, et("fixed")), {
1520
+ zIndex: e.zIndexPopupBase,
1521
+ overflow: "auto",
1522
+ outline: 0,
1523
+ WebkitOverflowScrolling: "touch"
1524
+ })
1506
1525
  }
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));
1526
+ }, {
1527
+ [`${t}-root`]: yn(e)
1528
+ }];
1529
+ }, go = (e) => {
1530
+ const {
1531
+ componentCls: t
1532
+ } = e;
1533
+ return [
1534
+ // ======================== Root =========================
1535
+ {
1536
+ [`${t}-root`]: {
1537
+ [`${t}-wrap-rtl`]: {
1538
+ direction: "rtl"
1539
+ },
1540
+ [`${t}-centered`]: {
1541
+ textAlign: "center",
1542
+ "&::before": {
1543
+ display: "inline-block",
1544
+ width: 0,
1545
+ height: "100%",
1546
+ verticalAlign: "middle",
1547
+ content: '""'
1548
+ },
1549
+ [t]: {
1550
+ top: 0,
1551
+ display: "inline-block",
1552
+ paddingBottom: 0,
1553
+ textAlign: "start",
1554
+ verticalAlign: "middle"
1555
+ }
1556
+ },
1557
+ [`@media (max-width: ${e.screenSMMax}px)`]: {
1558
+ [t]: {
1559
+ maxWidth: "calc(100vw - 16px)",
1560
+ margin: `${N(e.marginXS)} auto`
1561
+ },
1562
+ [`${t}-centered`]: {
1563
+ [t]: {
1564
+ flex: 1
1565
+ }
1566
+ }
1567
+ }
1515
1568
  }
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));
1569
+ },
1570
+ // ======================== Modal ========================
1571
+ {
1572
+ [t]: Object.assign(Object.assign({}, nt(e)), {
1573
+ pointerEvents: "none",
1574
+ position: "relative",
1575
+ top: 100,
1576
+ width: "auto",
1577
+ maxWidth: `calc(100vw - ${N(e.calc(e.margin).mul(2).equal())})`,
1578
+ margin: "0 auto",
1579
+ paddingBottom: e.paddingLG,
1580
+ [`${t}-title`]: {
1581
+ margin: 0,
1582
+ color: e.titleColor,
1583
+ fontWeight: e.fontWeightStrong,
1584
+ fontSize: e.titleFontSize,
1585
+ lineHeight: e.titleLineHeight,
1586
+ wordWrap: "break-word"
1587
+ },
1588
+ [`${t}-content`]: {
1589
+ position: "relative",
1590
+ backgroundColor: e.contentBg,
1591
+ backgroundClip: "padding-box",
1592
+ border: 0,
1593
+ borderRadius: e.borderRadiusLG,
1594
+ boxShadow: e.boxShadow,
1595
+ pointerEvents: "auto",
1596
+ padding: e.contentPadding
1597
+ },
1598
+ [`${t}-close`]: Object.assign({
1599
+ position: "absolute",
1600
+ top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1601
+ insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
1602
+ zIndex: e.calc(e.zIndexPopupBase).add(10).equal(),
1603
+ padding: 0,
1604
+ color: e.modalCloseIconColor,
1605
+ fontWeight: e.fontWeightStrong,
1606
+ lineHeight: 1,
1607
+ textDecoration: "none",
1608
+ background: "transparent",
1609
+ borderRadius: e.borderRadiusSM,
1610
+ width: e.modalCloseBtnSize,
1611
+ height: e.modalCloseBtnSize,
1612
+ border: 0,
1613
+ outline: 0,
1614
+ cursor: "pointer",
1615
+ transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
1616
+ "&-x": {
1617
+ display: "flex",
1618
+ fontSize: e.fontSizeLG,
1619
+ fontStyle: "normal",
1620
+ lineHeight: N(e.modalCloseBtnSize),
1621
+ justifyContent: "center",
1622
+ textTransform: "none",
1623
+ textRendering: "auto"
1624
+ },
1625
+ "&:disabled": {
1626
+ pointerEvents: "none"
1627
+ },
1628
+ "&:hover": {
1629
+ color: e.modalCloseIconHoverColor,
1630
+ backgroundColor: e.colorBgTextHover,
1631
+ textDecoration: "none"
1632
+ },
1633
+ "&:active": {
1634
+ backgroundColor: e.colorBgTextActive
1635
+ }
1636
+ }, tn(e)),
1637
+ [`${t}-header`]: {
1638
+ color: e.colorText,
1639
+ background: e.headerBg,
1640
+ borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`,
1641
+ marginBottom: e.headerMarginBottom,
1642
+ padding: e.headerPadding,
1643
+ borderBottom: e.headerBorderBottom
1644
+ },
1645
+ [`${t}-body`]: {
1646
+ fontSize: e.fontSize,
1647
+ lineHeight: e.lineHeight,
1648
+ wordWrap: "break-word",
1649
+ padding: e.bodyPadding,
1650
+ [`${t}-body-skeleton`]: {
1651
+ width: "100%",
1652
+ height: "100%",
1653
+ display: "flex",
1654
+ justifyContent: "center",
1655
+ alignItems: "center",
1656
+ margin: `${N(e.margin)} auto`
1657
+ }
1658
+ },
1659
+ [`${t}-footer`]: {
1660
+ textAlign: "end",
1661
+ background: e.footerBg,
1662
+ marginTop: e.footerMarginTop,
1663
+ padding: e.footerPadding,
1664
+ borderTop: e.footerBorderTop,
1665
+ borderRadius: e.footerBorderRadius,
1666
+ [`> ${e.antCls}-btn + ${e.antCls}-btn`]: {
1667
+ marginInlineStart: e.marginXS
1668
+ }
1669
+ },
1670
+ [`${t}-open`]: {
1671
+ overflow: "hidden"
1672
+ }
1673
+ })
1674
+ },
1675
+ // ======================== Pure =========================
1676
+ {
1677
+ [`${t}-pure-panel`]: {
1678
+ top: "auto",
1679
+ padding: 0,
1680
+ display: "flex",
1681
+ flexDirection: "column",
1682
+ [`${t}-content,
1683
+ ${t}-body,
1684
+ ${t}-confirm-body-wrapper`]: {
1685
+ display: "flex",
1686
+ flexDirection: "column",
1687
+ flex: "auto"
1688
+ },
1689
+ [`${t}-confirm-body`]: {
1690
+ marginBottom: "auto"
1691
+ }
1692
+ }
1693
+ }
1694
+ ];
1695
+ }, Co = (e) => {
1696
+ const {
1697
+ componentCls: t
1698
+ } = e;
1699
+ return {
1700
+ [`${t}-root`]: {
1701
+ [`${t}-wrap-rtl`]: {
1702
+ direction: "rtl",
1703
+ [`${t}-confirm-body`]: {
1704
+ direction: "rtl"
1705
+ }
1522
1706
  }
1523
- I = /* @__PURE__ */ r.createElement("div", {
1524
- className: `${C}-content`
1525
- }, F, H);
1526
1707
  }
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));
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
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 = () => {
1708
+ };
1709
+ }, po = (e) => {
1572
1710
  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`
1711
+ componentCls: t
1712
+ } = e, o = ht(e);
1713
+ delete o.xs;
1714
+ const n = Object.keys(o).map((a) => ({
1715
+ [`@media (min-width: ${N(o[a])})`]: {
1716
+ width: `var(--${t.replace(".", "")}-${a}-width)`
1717
+ }
1589
1718
  }));
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
- };
1622
- var io = function(e, t) {
1719
+ return {
1720
+ [`${t}-root`]: {
1721
+ [t]: [{
1722
+ width: `var(--${t.replace(".", "")}-xs-width)`
1723
+ }].concat(K(n))
1724
+ }
1725
+ };
1726
+ }, yt = (e) => {
1727
+ const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5;
1728
+ return fe(e, {
1729
+ modalHeaderHeight: e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),
1730
+ modalFooterBorderColorSplit: e.colorSplit,
1731
+ modalFooterBorderStyle: e.lineType,
1732
+ modalFooterBorderWidth: e.lineWidth,
1733
+ modalCloseIconColor: e.colorIcon,
1734
+ modalCloseIconHoverColor: e.colorIconHover,
1735
+ modalCloseBtnSize: e.controlHeight,
1736
+ modalConfirmIconSize: e.fontHeight,
1737
+ modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
1738
+ });
1739
+ }, $t = (e) => ({
1740
+ footerBg: "transparent",
1741
+ headerBg: e.colorBgElevated,
1742
+ titleLineHeight: e.lineHeightHeading5,
1743
+ titleFontSize: e.fontSizeHeading5,
1744
+ contentBg: e.colorBgElevated,
1745
+ titleColor: e.colorTextHeading,
1746
+ // internal
1747
+ contentPadding: e.wireframe ? 0 : `${N(e.paddingMD)} ${N(e.paddingContentHorizontalLG)}`,
1748
+ headerPadding: e.wireframe ? `${N(e.padding)} ${N(e.paddingLG)}` : 0,
1749
+ headerBorderBottom: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1750
+ headerMarginBottom: e.wireframe ? 0 : e.marginXS,
1751
+ bodyPadding: e.wireframe ? e.paddingLG : 0,
1752
+ footerPadding: e.wireframe ? `${N(e.paddingXS)} ${N(e.padding)}` : 0,
1753
+ footerBorderTop: e.wireframe ? `${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
1754
+ footerBorderRadius: e.wireframe ? `0 0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)}` : 0,
1755
+ footerMarginTop: e.wireframe ? 0 : e.marginSM,
1756
+ confirmBodyPadding: e.wireframe ? `${N(e.padding * 2)} ${N(e.padding * 2)} ${N(e.paddingLG)}` : 0,
1757
+ confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
1758
+ confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
1759
+ }), xt = se("Modal", (e) => {
1760
+ const t = yt(e);
1761
+ return [go(t), Co(t), fo(t), en(t, "zoom"), po(t)];
1762
+ }, $t, {
1763
+ unitless: {
1764
+ titleLineHeight: !0
1765
+ }
1766
+ });
1767
+ var vo = function(e, t) {
1623
1768
  var o = {};
1624
1769
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1625
1770
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
@@ -1627,7 +1772,7 @@ var io = function(e, t) {
1627
1772
  return o;
1628
1773
  };
1629
1774
  let we;
1630
- const co = (e) => {
1775
+ const bo = (e) => {
1631
1776
  we = {
1632
1777
  x: e.pageX,
1633
1778
  y: e.pageY
@@ -1635,8 +1780,8 @@ const co = (e) => {
1635
1780
  we = null;
1636
1781
  }, 100);
1637
1782
  };
1638
- Dn() && document.documentElement.addEventListener("click", co, !0);
1639
- const xt = (e) => {
1783
+ Ln() && document.documentElement.addEventListener("click", bo, !0);
1784
+ const St = (e) => {
1640
1785
  var t;
1641
1786
  const {
1642
1787
  getPopupContainer: o,
@@ -1679,31 +1824,31 @@ const xt = (e) => {
1679
1824
  styles: w,
1680
1825
  children: S,
1681
1826
  loading: h
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, {
1827
+ } = e, I = vo(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] = xt(j, H), D = O(m, {
1683
1828
  [`${j}-centered`]: p ?? (l == null ? void 0 : l.centered),
1684
1829
  [`${j}-wrap-rtl`]: a === "rtl"
1685
- }), W = x !== null && !h ? /* @__PURE__ */ r.createElement($t, Object.assign({}, e, {
1830
+ }), W = x !== null && !h ? /* @__PURE__ */ r.createElement(bt, Object.assign({}, e, {
1686
1831
  onOk: d,
1687
1832
  onCancel: s
1688
- })) : null, [A, T, J] = ht(me(e), me(l), {
1833
+ })) : null, [A, T, J] = ct(me(e), me(l), {
1689
1834
  closable: !0,
1690
- closeIcon: /* @__PURE__ */ r.createElement(Te, {
1835
+ closeIcon: /* @__PURE__ */ r.createElement(Pe, {
1691
1836
  className: `${j}-close-icon`
1692
1837
  }),
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(() => {
1838
+ closeIconRender: (_) => vt(j, _)
1839
+ }), B = lo(`.${j}-content`), [U, z] = nn("Modal", I.zIndex), [ae, Q] = r.useMemo(() => v && typeof v == "object" ? [void 0, v] : [v, void 0], [v]), be = r.useMemo(() => {
1695
1840
  const _ = {};
1696
1841
  return Q && Object.keys(Q).forEach((M) => {
1697
1842
  const V = Q[M];
1698
1843
  V !== void 0 && (_[`--${j}-${M}-width`] = typeof V == "number" ? `${V}px` : V);
1699
1844
  }), _;
1700
1845
  }, [Q]);
1701
- return L(/* @__PURE__ */ r.createElement(Zt, {
1846
+ return L(/* @__PURE__ */ r.createElement(on, {
1702
1847
  form: !0,
1703
1848
  space: !0
1704
- }, /* @__PURE__ */ r.createElement(Yt.Provider, {
1849
+ }, /* @__PURE__ */ r.createElement(an.Provider, {
1705
1850
  value: z
1706
- }, /* @__PURE__ */ r.createElement(bt, Object.assign({
1851
+ }, /* @__PURE__ */ r.createElement(pt, Object.assign({
1707
1852
  width: ae
1708
1853
  }, I, {
1709
1854
  zIndex: U,
@@ -1737,7 +1882,7 @@ const xt = (e) => {
1737
1882
  },
1738
1883
  className: `${j}-body-skeleton`
1739
1884
  }) : S))));
1740
- }, uo = (e) => {
1885
+ }, ho = (e) => {
1741
1886
  const {
1742
1887
  componentCls: t,
1743
1888
  titleFontSize: o,
@@ -1757,7 +1902,7 @@ const xt = (e) => {
1757
1902
  [`${e.antCls}-modal-header`]: {
1758
1903
  display: "none"
1759
1904
  },
1760
- [`${c}-body-wrapper`]: Object.assign({}, Jt()),
1905
+ [`${c}-body-wrapper`]: Object.assign({}, ln()),
1761
1906
  [`&${t} ${t}-body`]: {
1762
1907
  padding: f
1763
1908
  },
@@ -1823,21 +1968,21 @@ const xt = (e) => {
1823
1968
  color: e.colorSuccess
1824
1969
  }
1825
1970
  };
1826
- }, mo = Re(["Modal", "confirm"], (e) => {
1827
- const t = dt(e);
1828
- return [uo(t)];
1829
- }, ut, {
1971
+ }, yo = Ie(["Modal", "confirm"], (e) => {
1972
+ const t = yt(e);
1973
+ return [ho(t)];
1974
+ }, $t, {
1830
1975
  // confirm is weak than modal since no conflict here
1831
1976
  order: -1e3
1832
1977
  });
1833
- var fo = function(e, t) {
1978
+ var $o = function(e, t) {
1834
1979
  var o = {};
1835
1980
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1836
1981
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1837
1982
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1838
1983
  return o;
1839
1984
  };
1840
- function St(e) {
1985
+ function Ot(e) {
1841
1986
  const {
1842
1987
  prefixCls: t,
1843
1988
  icon: o,
@@ -1849,7 +1994,7 @@ function St(e) {
1849
1994
  footer: i,
1850
1995
  // Legacy for static function usage
1851
1996
  locale: f
1852
- } = e, c = fo(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1997
+ } = e, c = $o(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1853
1998
  if (process.env.NODE_ENV !== "production") {
1854
1999
  const h = Ce("Modal");
1855
2000
  process.env.NODE_ENV !== "production" && h(!(typeof o == "string" && o.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${o}\` at https://ant.design/components/icon`);
@@ -1858,23 +2003,23 @@ function St(e) {
1858
2003
  if (!o && o !== null)
1859
2004
  switch (s) {
1860
2005
  case "info":
1861
- u = /* @__PURE__ */ r.createElement(ln, null);
2006
+ u = /* @__PURE__ */ r.createElement(mn, null);
1862
2007
  break;
1863
2008
  case "success":
1864
- u = /* @__PURE__ */ r.createElement(an, null);
2009
+ u = /* @__PURE__ */ r.createElement(un, null);
1865
2010
  break;
1866
2011
  case "error":
1867
- u = /* @__PURE__ */ r.createElement(on, null);
2012
+ u = /* @__PURE__ */ r.createElement(dn, null);
1868
2013
  break;
1869
2014
  default:
1870
- u = /* @__PURE__ */ r.createElement(nn, null);
2015
+ u = /* @__PURE__ */ r.createElement(cn, null);
1871
2016
  }
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({
2017
+ const m = d ?? s === "confirm", p = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [y] = Re("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({
1873
2018
  autoFocusButton: p,
1874
2019
  cancelTextLocale: b,
1875
2020
  okTextLocale: C,
1876
2021
  mergedOkCancel: m
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`;
2022
+ }, c), x = r.useMemo(() => v, K(Object.values(v))), E = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Ge, null), /* @__PURE__ */ r.createElement(Xe, null)), w = e.title !== void 0 && e.title !== null, S = `${l}-body`;
1878
2023
  return /* @__PURE__ */ r.createElement("div", {
1879
2024
  className: `${l}-body-wrapper`
1880
2025
  }, /* @__PURE__ */ r.createElement("div", {
@@ -1887,18 +2032,18 @@ function St(e) {
1887
2032
  className: `${l}-title`
1888
2033
  }, e.title), /* @__PURE__ */ r.createElement("div", {
1889
2034
  className: `${l}-content`
1890
- }, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ r.createElement(Ct, {
2035
+ }, e.content))), i === void 0 || typeof i == "function" ? /* @__PURE__ */ r.createElement(ft, {
1891
2036
  value: x
1892
2037
  }, /* @__PURE__ */ r.createElement("div", {
1893
2038
  className: `${l}-btns`
1894
2039
  }, typeof i == "function" ? i(E, {
1895
- OkBtn: Ge,
1896
- CancelBtn: qe
1897
- }) : E)) : i, /* @__PURE__ */ r.createElement(mo, {
2040
+ OkBtn: Xe,
2041
+ CancelBtn: Ge
2042
+ }) : E)) : i, /* @__PURE__ */ r.createElement(yo, {
1898
2043
  prefixCls: t
1899
2044
  }));
1900
2045
  }
1901
- const Ot = (e) => {
2046
+ const Et = (e) => {
1902
2047
  const {
1903
2048
  close: t,
1904
2049
  zIndex: o,
@@ -1921,8 +2066,8 @@ const Ot = (e) => {
1921
2066
  }
1922
2067
  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}`, {
1923
2068
  [`${m}-rtl`]: a === "rtl"
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, {
2069
+ }, e.className), [, v] = rn(), x = r.useMemo(() => o !== void 0 ? o : v.zIndexPopupBase + sn, [o, v]);
2070
+ return /* @__PURE__ */ r.createElement(St, Object.assign({}, e, {
1926
2071
  className: b,
1927
2072
  wrapClassName: O({
1928
2073
  [`${m}-centered`]: !!e.centered
@@ -1946,7 +2091,7 @@ const Ot = (e) => {
1946
2091
  width: p,
1947
2092
  zIndex: x,
1948
2093
  closable: f
1949
- }), /* @__PURE__ */ r.createElement(St, Object.assign({}, e, {
2094
+ }), /* @__PURE__ */ r.createElement(Ot, Object.assign({}, e, {
1950
2095
  confirmPrefixCls: m
1951
2096
  })));
1952
2097
  }, Le = (e) => {
@@ -1961,21 +2106,21 @@ const Ot = (e) => {
1961
2106
  iconPrefixCls: o,
1962
2107
  direction: n,
1963
2108
  theme: a
1964
- }, /* @__PURE__ */ r.createElement(Ot, Object.assign({}, e)));
2109
+ }, /* @__PURE__ */ r.createElement(Et, Object.assign({}, e)));
1965
2110
  };
1966
- process.env.NODE_ENV !== "production" && (Ot.displayName = "ConfirmDialog", Le.displayName = "ConfirmDialogWrapper");
2111
+ process.env.NODE_ENV !== "production" && (Et.displayName = "ConfirmDialog", Le.displayName = "ConfirmDialogWrapper");
1967
2112
  const ee = [];
1968
- let Et = "";
1969
- function wt() {
1970
- return Et;
2113
+ let wt = "";
2114
+ function Nt() {
2115
+ return wt;
1971
2116
  }
1972
- const go = (e) => {
2117
+ const xo = (e) => {
1973
2118
  var t, o;
1974
2119
  const {
1975
2120
  prefixCls: n,
1976
2121
  getContainer: a,
1977
2122
  direction: l
1978
- } = e, s = lt(), d = se(q), i = wt() || d.getPrefixCls(), f = n || `${i}-modal`;
2123
+ } = e, s = lt(), d = re(q), i = Nt() || d.getPrefixCls(), f = n || `${i}-modal`;
1979
2124
  let c = a;
1980
2125
  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, {
1981
2126
  rootPrefixCls: i,
@@ -1988,8 +2133,8 @@ const go = (e) => {
1988
2133
  }));
1989
2134
  };
1990
2135
  function ce(e) {
1991
- const t = cn();
1992
- process.env.NODE_ENV !== "production" && !t.holderRender && rn("Modal");
2136
+ const t = Cn();
2137
+ process.env.NODE_ENV !== "production" && !t.holderRender && fn("Modal");
1993
2138
  const o = document.createDocumentFragment();
1994
2139
  let n = Object.assign(Object.assign({}, e), {
1995
2140
  close: i,
@@ -2012,8 +2157,8 @@ function ce(e) {
2012
2157
  }
2013
2158
  function d(c) {
2014
2159
  clearTimeout(a), a = setTimeout(() => {
2015
- const u = t.getPrefixCls(void 0, wt()), m = t.getIconPrefixCls(), p = t.getTheme(), y = /* @__PURE__ */ $.createElement(go, Object.assign({}, c));
2016
- l = sn()(/* @__PURE__ */ $.createElement(st, {
2160
+ const u = t.getPrefixCls(void 0, Nt()), m = t.getIconPrefixCls(), p = t.getTheme(), y = /* @__PURE__ */ $.createElement(xo, Object.assign({}, c));
2161
+ l = gn()(/* @__PURE__ */ $.createElement(st, {
2017
2162
  prefixCls: u,
2018
2163
  iconPrefixCls: m,
2019
2164
  theme: p
@@ -2038,45 +2183,45 @@ function ce(e) {
2038
2183
  update: f
2039
2184
  };
2040
2185
  }
2041
- function Nt(e) {
2186
+ function Pt(e) {
2042
2187
  return Object.assign(Object.assign({}, e), {
2043
2188
  type: "warning"
2044
2189
  });
2045
2190
  }
2046
- function Pt(e) {
2191
+ function jt(e) {
2047
2192
  return Object.assign(Object.assign({}, e), {
2048
2193
  type: "info"
2049
2194
  });
2050
2195
  }
2051
- function jt(e) {
2196
+ function It(e) {
2052
2197
  return Object.assign(Object.assign({}, e), {
2053
2198
  type: "success"
2054
2199
  });
2055
2200
  }
2056
- function It(e) {
2201
+ function Tt(e) {
2057
2202
  return Object.assign(Object.assign({}, e), {
2058
2203
  type: "error"
2059
2204
  });
2060
2205
  }
2061
- function Tt(e) {
2206
+ function Mt(e) {
2062
2207
  return Object.assign(Object.assign({}, e), {
2063
2208
  type: "confirm"
2064
2209
  });
2065
2210
  }
2066
- function Co(e) {
2211
+ function So(e) {
2067
2212
  let {
2068
2213
  rootPrefixCls: t
2069
2214
  } = e;
2070
- process.env.NODE_ENV !== "production" && it(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), Et = t;
2215
+ process.env.NODE_ENV !== "production" && it(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), wt = t;
2071
2216
  }
2072
- var po = function(e, t) {
2217
+ var Oo = function(e, t) {
2073
2218
  var o = {};
2074
2219
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2075
2220
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2076
2221
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2077
2222
  return o;
2078
2223
  };
2079
- const vo = (e) => {
2224
+ const Eo = (e) => {
2080
2225
  const {
2081
2226
  prefixCls: t,
2082
2227
  className: o,
@@ -2086,15 +2231,15 @@ const vo = (e) => {
2086
2231
  title: s,
2087
2232
  children: d,
2088
2233
  footer: i
2089
- } = e, f = po(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
2234
+ } = e, f = Oo(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
2090
2235
  getPrefixCls: c
2091
- } = r.useContext(q), u = c(), m = t || c("modal"), p = rt(u), [y, g, C] = mt(m, p), b = `${m}-confirm`;
2236
+ } = r.useContext(q), u = c(), m = t || c("modal"), p = rt(u), [y, g, C] = xt(m, p), b = `${m}-confirm`;
2092
2237
  let v = {};
2093
2238
  return l ? v = {
2094
2239
  closable: a ?? !1,
2095
2240
  title: "",
2096
2241
  footer: "",
2097
- children: /* @__PURE__ */ r.createElement(St, Object.assign({}, e, {
2242
+ children: /* @__PURE__ */ r.createElement(Ot, Object.assign({}, e, {
2098
2243
  prefixCls: m,
2099
2244
  confirmPrefixCls: b,
2100
2245
  rootPrefixCls: u,
@@ -2103,34 +2248,34 @@ const vo = (e) => {
2103
2248
  } : v = {
2104
2249
  closable: a ?? !0,
2105
2250
  title: s,
2106
- footer: i !== null && /* @__PURE__ */ r.createElement($t, Object.assign({}, e)),
2251
+ footer: i !== null && /* @__PURE__ */ r.createElement(bt, Object.assign({}, e)),
2107
2252
  children: d
2108
2253
  }, y(/* @__PURE__ */ r.createElement(He, Object.assign({
2109
2254
  prefixCls: m,
2110
2255
  className: O(g, `${m}-pure-panel`, l && b, l && `${b}-${l}`, o, C, p)
2111
2256
  }, f, {
2112
- closeIcon: yt(m, n),
2257
+ closeIcon: vt(m, n),
2113
2258
  closable: a
2114
2259
  }, v)));
2115
- }, bo = dn(vo);
2116
- function ho() {
2260
+ }, wo = pn(Eo);
2261
+ function No() {
2117
2262
  const [e, t] = r.useState([]), o = r.useCallback((n) => (t((a) => [].concat(K(a), [n])), () => {
2118
2263
  t((a) => a.filter((l) => l !== n));
2119
2264
  }), []);
2120
2265
  return [e, o];
2121
2266
  }
2122
- var yo = function(e, t) {
2267
+ var Po = function(e, t) {
2123
2268
  var o = {};
2124
2269
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2125
2270
  if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2126
2271
  t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2127
2272
  return o;
2128
2273
  };
2129
- const $o = (e, t) => {
2274
+ const jo = (e, t) => {
2130
2275
  var o, {
2131
2276
  afterClose: n,
2132
2277
  config: a
2133
- } = e, l = yo(e, ["afterClose", "config"]);
2278
+ } = e, l = Po(e, ["afterClose", "config"]);
2134
2279
  const [s, d] = r.useState(!0), [i, f] = r.useState(a), {
2135
2280
  direction: c,
2136
2281
  getPrefixCls: u
@@ -2154,7 +2299,7 @@ const $o = (e, t) => {
2154
2299
  f((x) => Object.assign(Object.assign({}, x), v));
2155
2300
  }
2156
2301
  }));
2157
- const C = (o = i.okCancel) !== null && o !== void 0 ? o : i.type === "confirm", [b] = Me("Modal", un.Modal);
2302
+ const C = (o = i.okCancel) !== null && o !== void 0 ? o : i.type === "confirm", [b] = Re("Modal", vn.Modal);
2158
2303
  return /* @__PURE__ */ r.createElement(Le, Object.assign({
2159
2304
  prefixCls: m,
2160
2305
  rootPrefixCls: p
@@ -2166,15 +2311,15 @@ const $o = (e, t) => {
2166
2311
  direction: i.direction || c,
2167
2312
  cancelText: i.cancelText || (b == null ? void 0 : b.cancelText)
2168
2313
  }, l));
2169
- }, xo = /* @__PURE__ */ r.forwardRef($o);
2314
+ }, Io = /* @__PURE__ */ r.forwardRef(jo);
2170
2315
  let tt = 0;
2171
- const So = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, t) => {
2172
- const [o, n] = ho();
2316
+ const To = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, t) => {
2317
+ const [o, n] = No();
2173
2318
  return r.useImperativeHandle(t, () => ({
2174
2319
  patchElement: n
2175
2320
  }), []), /* @__PURE__ */ r.createElement(r.Fragment, null, o);
2176
2321
  }));
2177
- function Oo() {
2322
+ function Mo() {
2178
2323
  const e = r.useRef(null), [t, o] = r.useState([]);
2179
2324
  r.useEffect(() => {
2180
2325
  t.length && (K(t).forEach((s) => {
@@ -2190,7 +2335,7 @@ function Oo() {
2190
2335
  c = C;
2191
2336
  });
2192
2337
  let m = !1, p;
2193
- const y = /* @__PURE__ */ r.createElement(xo, {
2338
+ const y = /* @__PURE__ */ r.createElement(Io, {
2194
2339
  key: `modal-${tt}`,
2195
2340
  config: l(d),
2196
2341
  ref: f,
@@ -2221,34 +2366,34 @@ function Oo() {
2221
2366
  };
2222
2367
  }, []);
2223
2368
  return [r.useMemo(() => ({
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, {
2369
+ info: n(jt),
2370
+ success: n(It),
2371
+ error: n(Tt),
2372
+ warning: n(Pt),
2373
+ confirm: n(Mt)
2374
+ }), []), /* @__PURE__ */ r.createElement(To, {
2230
2375
  key: "modal-holder",
2231
2376
  ref: e
2232
2377
  })];
2233
2378
  }
2234
- function Mt(e) {
2235
- return ce(Nt(e));
2379
+ function Rt(e) {
2380
+ return ce(Pt(e));
2236
2381
  }
2237
- const G = xt;
2238
- G.useModal = Oo;
2382
+ const G = St;
2383
+ G.useModal = Mo;
2239
2384
  G.info = function(t) {
2240
- return ce(Pt(t));
2385
+ return ce(jt(t));
2241
2386
  };
2242
2387
  G.success = function(t) {
2243
- return ce(jt(t));
2388
+ return ce(It(t));
2244
2389
  };
2245
2390
  G.error = function(t) {
2246
- return ce(It(t));
2391
+ return ce(Tt(t));
2247
2392
  };
2248
- G.warning = Mt;
2249
- G.warn = Mt;
2393
+ G.warning = Rt;
2394
+ G.warn = Rt;
2250
2395
  G.confirm = function(t) {
2251
- return ce(Tt(t));
2396
+ return ce(Mt(t));
2252
2397
  };
2253
2398
  G.destroyAll = function() {
2254
2399
  for (; ee.length; ) {
@@ -2256,154 +2401,10 @@ G.destroyAll = function() {
2256
2401
  t && t();
2257
2402
  }
2258
2403
  };
2259
- G.config = Co;
2260
- G._InternalPanelDoNotUseOrYouWillBeFired = bo;
2404
+ G.config = So;
2405
+ G._InternalPanelDoNotUseOrYouWillBeFired = wo;
2261
2406
  process.env.NODE_ENV !== "production" && (G.displayName = "Modal");
2262
- var Eo = function(e, t) {
2263
- var o = {};
2264
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2265
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2266
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2267
- return o;
2268
- };
2269
- const wo = /* @__PURE__ */ r.forwardRef((e, t) => {
2270
- const {
2271
- prefixCls: o,
2272
- style: n,
2273
- className: a,
2274
- checked: l,
2275
- onChange: s,
2276
- onClick: d
2277
- } = e, i = Eo(e, ["prefixCls", "style", "className", "checked", "onChange", "onClick"]), {
2278
- getPrefixCls: f,
2279
- tag: c
2280
- } = r.useContext(q), u = (b) => {
2281
- s == null || s(!l), d == null || d(b);
2282
- }, m = f("tag", o), [p, y, g] = ft(m), C = O(m, `${m}-checkable`, {
2283
- [`${m}-checkable-checked`]: l
2284
- }, c == null ? void 0 : c.className, a, y, g);
2285
- return p(/* @__PURE__ */ r.createElement("span", Object.assign({}, i, {
2286
- ref: t,
2287
- style: Object.assign(Object.assign({}, n), c == null ? void 0 : c.style),
2288
- className: C,
2289
- onClick: u
2290
- })));
2291
- }), No = (e) => mn(e, (t, o) => {
2292
- let {
2293
- textColor: n,
2294
- lightBorderColor: a,
2295
- lightColor: l,
2296
- darkColor: s
2297
- } = o;
2298
- return {
2299
- [`${e.componentCls}${e.componentCls}-${t}`]: {
2300
- color: n,
2301
- background: l,
2302
- borderColor: a,
2303
- // Inverse color
2304
- "&-inverse": {
2305
- color: e.colorTextLightSolid,
2306
- background: s,
2307
- borderColor: s
2308
- },
2309
- [`&${e.componentCls}-borderless`]: {
2310
- borderColor: "transparent"
2311
- }
2312
- }
2313
- };
2314
- }), Po = Re(["Tag", "preset"], (e) => {
2315
- const t = Be(e);
2316
- return No(t);
2317
- }, ze);
2318
- function jo(e) {
2319
- return typeof e != "string" ? e : e.charAt(0).toUpperCase() + e.slice(1);
2320
- }
2321
- const de = (e, t, o) => {
2322
- const n = jo(o);
2323
- return {
2324
- [`${e.componentCls}${e.componentCls}-${t}`]: {
2325
- color: e[`color${o}`],
2326
- background: e[`color${n}Bg`],
2327
- borderColor: e[`color${n}Border`],
2328
- [`&${e.componentCls}-borderless`]: {
2329
- borderColor: "transparent"
2330
- }
2331
- }
2332
- };
2333
- }, Io = Re(["Tag", "status"], (e) => {
2334
- const t = Be(e);
2335
- return [de(t, "success", "Success"), de(t, "processing", "Info"), de(t, "error", "Error"), de(t, "warning", "Warning")];
2336
- }, ze);
2337
- var To = function(e, t) {
2338
- var o = {};
2339
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
2340
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
2341
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
2342
- return o;
2343
- };
2344
- const Mo = /* @__PURE__ */ r.forwardRef((e, t) => {
2345
- const {
2346
- prefixCls: o,
2347
- className: n,
2348
- rootClassName: a,
2349
- style: l,
2350
- children: s,
2351
- icon: d,
2352
- color: i,
2353
- onClose: f,
2354
- bordered: c = !0,
2355
- visible: u
2356
- } = e, m = To(e, ["prefixCls", "className", "rootClassName", "style", "children", "icon", "color", "onClose", "bordered", "visible"]), {
2357
- getPrefixCls: p,
2358
- direction: y,
2359
- tag: g
2360
- } = r.useContext(q), [C, b] = r.useState(!0), v = ge(m, ["closeIcon", "closable"]);
2361
- process.env.NODE_ENV !== "production" && Ce("Tag").deprecated(!("visible" in e), "visible", "visible && <Tag />"), r.useEffect(() => {
2362
- u !== void 0 && b(u);
2363
- }, [u]);
2364
- const x = fn(i), E = gn(i), w = x || E, S = Object.assign(Object.assign({
2365
- backgroundColor: i && !w ? i : void 0
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, {
2367
- [`${h}-${i}`]: w,
2368
- [`${h}-has-color`]: i && !w,
2369
- [`${h}-hidden`]: !C,
2370
- [`${h}-rtl`]: y === "rtl",
2371
- [`${h}-borderless`]: !c
2372
- }, n, a, j, F), L = (T) => {
2373
- T.stopPropagation(), f == null || f(T), !T.defaultPrevented && b(!1);
2374
- }, [, X] = ht(me(e), me(g), {
2375
- closable: !1,
2376
- closeIconRender: (T) => {
2377
- const J = /* @__PURE__ */ r.createElement("span", {
2378
- className: `${h}-close-icon`,
2379
- onClick: L
2380
- }, T);
2381
- return Cn(T, J, (B) => ({
2382
- onClick: (U) => {
2383
- var z;
2384
- (z = B == null ? void 0 : B.onClick) === null || z === void 0 || z.call(B, U), L(U);
2385
- },
2386
- className: O(B == null ? void 0 : B.className, `${h}-close-icon`)
2387
- }));
2388
- }
2389
- }), k = typeof m.onClick == "function" || s && s.type === "a", D = d || null, W = D ? /* @__PURE__ */ r.createElement(r.Fragment, null, D, s && /* @__PURE__ */ r.createElement("span", null, s)) : s, A = /* @__PURE__ */ r.createElement("span", Object.assign({}, v, {
2390
- ref: t,
2391
- className: H,
2392
- style: S
2393
- }), W, X, x && /* @__PURE__ */ r.createElement(Po, {
2394
- key: "preset",
2395
- prefixCls: h
2396
- }), E && /* @__PURE__ */ r.createElement(Io, {
2397
- key: "status",
2398
- prefixCls: h
2399
- }));
2400
- return I(k ? /* @__PURE__ */ r.createElement(pn, {
2401
- component: "Tag"
2402
- }, A) : A);
2403
- }), Rt = Mo;
2404
- process.env.NODE_ENV !== "production" && (Rt.displayName = "Tag");
2405
- Rt.CheckableTag = wo;
2406
2407
  export {
2407
2408
  G as M,
2408
- Rt as T
2409
+ ut as T
2409
2410
  };