@notificationapi/react 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/assets/BellOutlined.js +18 -15
  2. package/dist/assets/Inbox.js +2376 -2270
  3. package/dist/assets/Notification.js +1967 -1342
  4. package/dist/assets/Preferences.js +828 -782
  5. package/dist/assets/PurePanel.js +24 -23
  6. package/dist/assets/button.js +275 -265
  7. package/dist/assets/colors.js +19298 -7652
  8. package/dist/assets/index.js +48 -47
  9. package/dist/assets/index2.js +94 -92
  10. package/dist/assets/index3.js +2990 -2647
  11. package/dist/components/Notifications/Inbox.d.ts +0 -1
  12. package/dist/components/Notifications/InboxHeader.d.ts +2 -3
  13. package/dist/components/Notifications/InboxHeader.js +14 -13
  14. package/dist/components/Notifications/Notification.d.ts +3 -3
  15. package/dist/components/Notifications/NotificationCounter.d.ts +1 -1
  16. package/dist/components/Notifications/NotificationFeed.d.ts +2 -2
  17. package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
  18. package/dist/components/Notifications/NotificationPopup.d.ts +2 -2
  19. package/dist/components/Notifications/UnreadBadge.d.ts +1 -1
  20. package/dist/components/Notifications/UnreadBadge.js +1 -1
  21. package/dist/components/Preferences/NotificationPreferencesInline.d.ts +2 -3
  22. package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +3 -3
  23. package/dist/components/Preferences/NotificationPreferencesPopup.js +684 -647
  24. package/dist/components/Preferences/PreferenceInput.d.ts +10 -0
  25. package/dist/components/Preferences/{PreferenceGroup.js → PreferenceInput.js} +2 -3
  26. package/dist/components/Preferences/Preferences.d.ts +1 -2
  27. package/dist/components/Preferences/Preferences.js +4 -5
  28. package/dist/components/Provider/index.d.ts +4 -22
  29. package/dist/components/Provider/index.js +139 -117
  30. package/dist/interface.d.ts +19 -0
  31. package/dist/interface.js +1 -0
  32. package/package.json +1 -1
  33. package/dist/components/Preferences/PreferenceGroup.d.ts +0 -8
@@ -1,596 +1,607 @@
1
- import { jsx as ve } from "react/jsx-runtime";
2
- import { P as ut } from "../../assets/Preferences.js";
3
- import { _ as M, p as G, q as ft, s as mt, c as w, d as I, t as gt, v as se, f as Be, w as be, x as Ct, y as vt, z as Me, A as bt, K as ze, g as yt, u as S, r as pt, l as ht, m as xt, a as ne, n as $t, B as Ot, C as Fe, h as Et, E as St, F as Pt } from "../../assets/colors.js";
1
+ import { jsx as ye } from "react/jsx-runtime";
2
+ import { P as yn } from "../../assets/Preferences.js";
3
+ import { _ as D, q as U, s as hn, t as xn, c as w, d as I, v as En, w as ce, f as De, x as he, y as xe, z as $n, A as On, B as _e, E as Nn, K as He, g as Sn, u as S, r as wn, n as Pn, m as In, a as oe, j as de, o as Tn, F as Rn, C as Le, h as Mn, G as jn, H as Bn, I as Ae, J as zn } from "../../assets/colors.js";
4
4
  import * as l from "react";
5
- import v, { useContext as Z, useRef as D, useMemo as wt, useEffect as ye } from "react";
6
- import { I as de, k as Nt, K as pe, l as It, m as ue, n as Tt, i as Rt, p as He, q as jt, N as Bt, r as Mt, z as zt, d as te, s as Ft, C as Ht, t as Lt, v as At } from "../../assets/index3.js";
7
- import { B as fe, c as Le } from "../../assets/button.js";
8
- import { R as me, w as Dt } from "../../assets/PurePanel.js";
9
- import { p as ge } from "../../assets/BellOutlined.js";
10
- var Wt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, _t = function(t, o) {
11
- return /* @__PURE__ */ l.createElement(de, M({}, t, {
12
- ref: o,
13
- icon: Wt
5
+ import v, { useContext as Y, useRef as V, useMemo as Fn, useEffect as Ee } from "react";
6
+ import { I as ue, k as Dn, K as $e, l as _n, m as fe, n as Hn, i as Ln, p as Ve, q as An, N as Vn, r as Wn, z as qn, d as te, s as Gn, C as Un, t as Xn, v as Kn } from "../../assets/index3.js";
7
+ import { B as me, c as We } from "../../assets/button.js";
8
+ import { R as ge, w as Qn } from "../../assets/PurePanel.js";
9
+ import { p as Ce } from "../../assets/BellOutlined.js";
10
+ var Zn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" }, Yn = function(n, t) {
11
+ return /* @__PURE__ */ l.createElement(ue, D({}, n, {
12
+ ref: t,
13
+ icon: Zn
14
14
  }));
15
- }, Vt = /* @__PURE__ */ l.forwardRef(_t), qt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, Gt = function(t, o) {
16
- return /* @__PURE__ */ l.createElement(de, M({}, t, {
17
- ref: o,
18
- icon: qt
15
+ }, qe = /* @__PURE__ */ l.forwardRef(Yn);
16
+ process.env.NODE_ENV !== "production" && (qe.displayName = "CheckCircleFilled");
17
+ var Jn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "exclamation-circle", theme: "filled" }, kn = function(n, t) {
18
+ return /* @__PURE__ */ l.createElement(ue, D({}, n, {
19
+ ref: t,
20
+ icon: Jn
19
21
  }));
20
- }, Ut = /* @__PURE__ */ l.forwardRef(Gt), Xt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, Kt = function(t, o) {
21
- return /* @__PURE__ */ l.createElement(de, M({}, t, {
22
- ref: o,
23
- icon: Xt
22
+ }, Ge = /* @__PURE__ */ l.forwardRef(kn);
23
+ process.env.NODE_ENV !== "production" && (Ge.displayName = "ExclamationCircleFilled");
24
+ var et = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, name: "info-circle", theme: "filled" }, nt = function(n, t) {
25
+ return /* @__PURE__ */ l.createElement(ue, D({}, n, {
26
+ ref: t,
27
+ icon: et
24
28
  }));
25
- }, Qt = /* @__PURE__ */ l.forwardRef(Kt);
26
- function Zt() {
27
- const [e, t] = l.useState([]), o = l.useCallback((n) => (t((a) => [].concat(G(a), [n])), () => {
28
- t((a) => a.filter((r) => r !== n));
29
+ }, Ue = /* @__PURE__ */ l.forwardRef(nt);
30
+ process.env.NODE_ENV !== "production" && (Ue.displayName = "InfoCircleFilled");
31
+ function tt() {
32
+ const [e, n] = l.useState([]), t = l.useCallback((o) => (n((a) => [].concat(U(a), [o])), () => {
33
+ n((a) => a.filter((r) => r !== o));
29
34
  }), []);
30
- return [e, o];
35
+ return [e, t];
31
36
  }
32
37
  function ie(e) {
33
38
  return !!(e && e.then);
34
39
  }
35
- const Ae = (e) => {
40
+ const Xe = (e) => {
36
41
  const {
37
- type: t,
38
- children: o,
39
- prefixCls: n,
42
+ type: n,
43
+ children: t,
44
+ prefixCls: o,
40
45
  buttonProps: a,
41
46
  close: r,
42
47
  autoFocus: u,
43
48
  emitEvent: d,
44
- isSilent: c,
45
- quitOnNullishReturnValue: s,
49
+ isSilent: s,
50
+ quitOnNullishReturnValue: c,
46
51
  actionFn: i
47
- } = e, f = l.useRef(!1), b = l.useRef(null), [g, x] = ft(!1), C = function() {
52
+ } = e, f = l.useRef(!1), b = l.useRef(null), [g, x] = hn(!1), C = function() {
48
53
  r == null || r.apply(void 0, arguments);
49
54
  };
50
55
  l.useEffect(() => {
51
56
  let m = null;
52
57
  return u && (m = setTimeout(() => {
53
- var p;
54
- (p = b.current) === null || p === void 0 || p.focus();
58
+ var y;
59
+ (y = b.current) === null || y === void 0 || y.focus();
55
60
  })), () => {
56
61
  m && clearTimeout(m);
57
62
  };
58
63
  }, []);
59
- const $ = (m) => {
64
+ const E = (m) => {
60
65
  ie(m) && (x(!0), m.then(function() {
61
66
  x(!1, !0), C.apply(void 0, arguments), f.current = !1;
62
- }, (p) => {
63
- if (x(!1, !0), f.current = !1, !(c != null && c()))
64
- return Promise.reject(p);
67
+ }, (y) => {
68
+ if (x(!1, !0), f.current = !1, !(s != null && s()))
69
+ return Promise.reject(y);
65
70
  }));
66
- }, y = (m) => {
71
+ }, p = (m) => {
67
72
  if (f.current)
68
73
  return;
69
74
  if (f.current = !0, !i) {
70
75
  C();
71
76
  return;
72
77
  }
73
- let p;
78
+ let y;
74
79
  if (d) {
75
- if (p = i(m), s && !ie(p)) {
80
+ if (y = i(m), c && !ie(y)) {
76
81
  f.current = !1, C(m);
77
82
  return;
78
83
  }
79
84
  } else if (i.length)
80
- p = i(r), f.current = !1;
81
- else if (p = i(), !ie(p)) {
85
+ y = i(r), f.current = !1;
86
+ else if (y = i(), !ie(y)) {
82
87
  C();
83
88
  return;
84
89
  }
85
- $(p);
90
+ E(y);
86
91
  };
87
- return /* @__PURE__ */ l.createElement(fe, Object.assign({}, Le(t), {
88
- onClick: y,
92
+ return /* @__PURE__ */ l.createElement(me, Object.assign({}, We(n), {
93
+ onClick: p,
89
94
  loading: g,
90
- prefixCls: n
95
+ prefixCls: o
91
96
  }, a, {
92
97
  ref: b
93
- }), o);
94
- }, Y = /* @__PURE__ */ v.createContext({}), {
95
- Provider: De
96
- } = Y, he = () => {
98
+ }), t);
99
+ }, J = /* @__PURE__ */ v.createContext({}), {
100
+ Provider: Ke
101
+ } = J, Oe = () => {
97
102
  const {
98
103
  autoFocusButton: e,
99
- cancelButtonProps: t,
100
- cancelTextLocale: o,
101
- isSilent: n,
104
+ cancelButtonProps: n,
105
+ cancelTextLocale: t,
106
+ isSilent: o,
102
107
  mergedOkCancel: a,
103
108
  rootPrefixCls: r,
104
109
  close: u,
105
110
  onCancel: d,
106
- onConfirm: c
107
- } = Z(Y);
108
- return a ? /* @__PURE__ */ v.createElement(Ae, {
109
- isSilent: n,
111
+ onConfirm: s
112
+ } = Y(J);
113
+ return a ? /* @__PURE__ */ v.createElement(Xe, {
114
+ isSilent: o,
110
115
  actionFn: d,
111
116
  close: function() {
112
- u == null || u.apply(void 0, arguments), c == null || c(!1);
117
+ u == null || u.apply(void 0, arguments), s == null || s(!1);
113
118
  },
114
119
  autoFocus: e === "cancel",
115
- buttonProps: t,
120
+ buttonProps: n,
116
121
  prefixCls: `${r}-btn`
117
- }, o) : null;
118
- }, xe = () => {
122
+ }, t) : null;
123
+ }, Ne = () => {
119
124
  const {
120
125
  autoFocusButton: e,
121
- close: t,
122
- isSilent: o,
123
- okButtonProps: n,
126
+ close: n,
127
+ isSilent: t,
128
+ okButtonProps: o,
124
129
  rootPrefixCls: a,
125
130
  okTextLocale: r,
126
131
  okType: u,
127
132
  onConfirm: d,
128
- onOk: c
129
- } = Z(Y);
130
- return /* @__PURE__ */ v.createElement(Ae, {
131
- isSilent: o,
133
+ onOk: s
134
+ } = Y(J);
135
+ return /* @__PURE__ */ v.createElement(Xe, {
136
+ isSilent: t,
132
137
  type: u || "primary",
133
- actionFn: c,
138
+ actionFn: s,
134
139
  close: function() {
135
- t == null || t.apply(void 0, arguments), d == null || d(!0);
140
+ n == null || n.apply(void 0, arguments), d == null || d(!0);
136
141
  },
137
142
  autoFocus: e === "ok",
138
- buttonProps: n,
143
+ buttonProps: o,
139
144
  prefixCls: `${a}-btn`
140
145
  }, r);
141
146
  };
142
- var We = /* @__PURE__ */ l.createContext({});
143
- function $e(e, t, o) {
144
- var n = t;
145
- return !n && o && (n = "".concat(e, "-").concat(o)), n;
147
+ var Qe = /* @__PURE__ */ l.createContext({});
148
+ function Se(e, n, t) {
149
+ var o = n;
150
+ return !o && t && (o = "".concat(e, "-").concat(t)), o;
146
151
  }
147
- function Oe(e, t) {
148
- var o = e["page".concat(t ? "Y" : "X", "Offset")], n = "scroll".concat(t ? "Top" : "Left");
149
- if (typeof o != "number") {
152
+ function we(e, n) {
153
+ var t = e["page".concat(n ? "Y" : "X", "Offset")], o = "scroll".concat(n ? "Top" : "Left");
154
+ if (typeof t != "number") {
150
155
  var a = e.document;
151
- o = a.documentElement[n], typeof o != "number" && (o = a.body[n]);
156
+ t = a.documentElement[o], typeof t != "number" && (t = a.body[o]);
152
157
  }
153
- return o;
158
+ return t;
154
159
  }
155
- function Yt(e) {
156
- var t = e.getBoundingClientRect(), o = {
157
- left: t.left,
158
- top: t.top
159
- }, n = e.ownerDocument, a = n.defaultView || n.parentWindow;
160
- return o.left += Oe(a), o.top += Oe(a, !0), o;
160
+ function ot(e) {
161
+ var n = e.getBoundingClientRect(), t = {
162
+ left: n.left,
163
+ top: n.top
164
+ }, o = e.ownerDocument, a = o.defaultView || o.parentWindow;
165
+ return t.left += we(a), t.top += we(a, !0), t;
161
166
  }
162
- const Jt = /* @__PURE__ */ l.memo(function(e) {
163
- var t = e.children;
164
- return t;
165
- }, function(e, t) {
166
- var o = t.shouldUpdate;
167
- return !o;
167
+ const at = /* @__PURE__ */ l.memo(function(e) {
168
+ var n = e.children;
169
+ return n;
170
+ }, function(e, n) {
171
+ var t = n.shouldUpdate;
172
+ return !t;
168
173
  });
169
- var Ee = {
174
+ var Pe = {
170
175
  width: 0,
171
176
  height: 0,
172
177
  overflow: "hidden",
173
178
  outline: "none"
174
- }, kt = {
179
+ }, rt = {
175
180
  outline: "none"
176
- }, _e = /* @__PURE__ */ v.forwardRef(function(e, t) {
177
- var o = e.prefixCls, n = e.className, a = e.style, r = e.title, u = e.ariaId, d = e.footer, c = e.closable, s = e.closeIcon, i = e.onClose, f = e.children, b = e.bodyStyle, g = e.bodyProps, x = e.modalRender, C = e.onMouseDown, $ = e.onMouseUp, y = e.holderRef, m = e.visible, p = e.forceRender, h = e.width, N = e.height, O = e.classNames, E = e.styles, H = v.useContext(We), W = H.panel, _ = mt(y, W), F = D(), U = D(), B = D();
178
- v.useImperativeHandle(t, function() {
181
+ }, ve = /* @__PURE__ */ v.forwardRef(function(e, n) {
182
+ var t = e.prefixCls, o = e.className, a = e.style, r = e.title, u = e.ariaId, d = e.footer, s = e.closable, c = e.closeIcon, i = e.onClose, f = e.children, b = e.bodyStyle, g = e.bodyProps, x = e.modalRender, C = e.onMouseDown, E = e.onMouseUp, p = e.holderRef, m = e.visible, y = e.forceRender, h = e.width, P = e.height, O = e.classNames, $ = e.styles, H = v.useContext(Qe), W = H.panel, q = xn(p, W), _ = V(), L = V(), j = V();
183
+ v.useImperativeHandle(n, function() {
179
184
  return {
180
185
  focus: function() {
181
- var q;
182
- (q = B.current) === null || q === void 0 || q.focus();
186
+ var F;
187
+ (F = j.current) === null || F === void 0 || F.focus();
183
188
  },
184
- changeActive: function(q) {
185
- var oe = document, k = oe.activeElement;
186
- q && k === U.current ? F.current.focus() : !q && k === F.current && U.current.focus();
189
+ changeActive: function(F) {
190
+ var Z = document, ee = Z.activeElement;
191
+ F && ee === L.current ? _.current.focus() : !F && ee === _.current && L.current.focus();
187
192
  }
188
193
  };
189
194
  });
190
195
  var T = {};
191
- h !== void 0 && (T.width = h), N !== void 0 && (T.height = N);
192
- var L;
193
- d && (L = /* @__PURE__ */ v.createElement("div", {
194
- className: w("".concat(o, "-footer"), O == null ? void 0 : O.footer),
195
- style: I({}, E == null ? void 0 : E.footer)
196
+ h !== void 0 && (T.width = h), P !== void 0 && (T.height = P);
197
+ var z;
198
+ d && (z = /* @__PURE__ */ v.createElement("div", {
199
+ className: w("".concat(t, "-footer"), O == null ? void 0 : O.footer),
200
+ style: I({}, $ == null ? void 0 : $.footer)
196
201
  }, d));
197
202
  var A;
198
203
  r && (A = /* @__PURE__ */ v.createElement("div", {
199
- className: w("".concat(o, "-header"), O == null ? void 0 : O.header),
200
- style: I({}, E == null ? void 0 : E.header)
204
+ className: w("".concat(t, "-header"), O == null ? void 0 : O.header),
205
+ style: I({}, $ == null ? void 0 : $.header)
201
206
  }, /* @__PURE__ */ v.createElement("div", {
202
- className: "".concat(o, "-title"),
207
+ className: "".concat(t, "-title"),
203
208
  id: u
204
209
  }, r)));
205
- var V = wt(function() {
206
- return gt(c) === "object" && c !== null ? c : c ? {
207
- closeIcon: s ?? /* @__PURE__ */ v.createElement("span", {
208
- className: "".concat(o, "-close-x")
210
+ var G = Fn(function() {
211
+ return En(s) === "object" && s !== null ? s : s ? {
212
+ closeIcon: c ?? /* @__PURE__ */ v.createElement("span", {
213
+ className: "".concat(t, "-close-x")
209
214
  })
210
215
  } : {};
211
- }, [c, s]), Q = ge(V, !0), X;
212
- c && (X = /* @__PURE__ */ v.createElement("button", M({
216
+ }, [s, c]), Q = Ce(G, !0), X;
217
+ s && (X = /* @__PURE__ */ v.createElement("button", D({
213
218
  type: "button",
214
219
  onClick: i,
215
220
  "aria-label": "Close"
216
221
  }, Q, {
217
- className: "".concat(o, "-close")
218
- }), V.closeIcon));
222
+ className: "".concat(t, "-close")
223
+ }), G.closeIcon));
219
224
  var R = /* @__PURE__ */ v.createElement("div", {
220
- className: w("".concat(o, "-content"), O == null ? void 0 : O.content),
221
- style: E == null ? void 0 : E.content
222
- }, X, A, /* @__PURE__ */ v.createElement("div", M({
223
- className: w("".concat(o, "-body"), O == null ? void 0 : O.body),
224
- style: I(I({}, b), E == null ? void 0 : E.body)
225
- }, g), f), L);
225
+ className: w("".concat(t, "-content"), O == null ? void 0 : O.content),
226
+ style: $ == null ? void 0 : $.content
227
+ }, X, A, /* @__PURE__ */ v.createElement("div", D({
228
+ className: w("".concat(t, "-body"), O == null ? void 0 : O.body),
229
+ style: I(I({}, b), $ == null ? void 0 : $.body)
230
+ }, g), f), z);
226
231
  return /* @__PURE__ */ v.createElement("div", {
227
232
  key: "dialog-element",
228
233
  role: "dialog",
229
234
  "aria-labelledby": r ? u : null,
230
235
  "aria-modal": "true",
231
- ref: _,
236
+ ref: q,
232
237
  style: I(I({}, a), T),
233
- className: w(o, n),
238
+ className: w(t, o),
234
239
  onMouseDown: C,
235
- onMouseUp: $
240
+ onMouseUp: E
236
241
  }, /* @__PURE__ */ v.createElement("div", {
237
242
  tabIndex: 0,
238
- ref: F,
239
- style: Ee,
243
+ ref: _,
244
+ style: Pe,
240
245
  "aria-hidden": "true"
241
246
  }), /* @__PURE__ */ v.createElement("div", {
242
- ref: B,
247
+ ref: j,
243
248
  tabIndex: -1,
244
- style: kt
245
- }, /* @__PURE__ */ v.createElement(Jt, {
246
- shouldUpdate: m || p
249
+ style: rt
250
+ }, /* @__PURE__ */ v.createElement(at, {
251
+ shouldUpdate: m || y
247
252
  }, x ? x(R) : R)), /* @__PURE__ */ v.createElement("div", {
248
253
  tabIndex: 0,
249
- ref: U,
250
- style: Ee,
254
+ ref: L,
255
+ style: Pe,
251
256
  "aria-hidden": "true"
252
257
  }));
253
- }), Ve = /* @__PURE__ */ l.forwardRef(function(e, t) {
254
- var o = e.prefixCls, n = e.title, a = e.style, r = e.className, u = e.visible, d = e.forceRender, c = e.destroyOnClose, s = e.motionName, i = e.ariaId, f = e.onVisibleChanged, b = e.mousePosition, g = D(), x = l.useState(), C = se(x, 2), $ = C[0], y = C[1], m = {};
255
- $ && (m.transformOrigin = $);
256
- function p() {
257
- var h = Yt(g.current);
258
- y(b ? "".concat(b.x - h.left, "px ").concat(b.y - h.top, "px") : "");
258
+ });
259
+ process.env.NODE_ENV !== "production" && (ve.displayName = "Panel");
260
+ var Ze = /* @__PURE__ */ l.forwardRef(function(e, n) {
261
+ var t = e.prefixCls, o = e.title, a = e.style, r = e.className, u = e.visible, d = e.forceRender, s = e.destroyOnClose, c = e.motionName, i = e.ariaId, f = e.onVisibleChanged, b = e.mousePosition, g = V(), x = l.useState(), C = ce(x, 2), E = C[0], p = C[1], m = {};
262
+ E && (m.transformOrigin = E);
263
+ function y() {
264
+ var h = ot(g.current);
265
+ p(b ? "".concat(b.x - h.left, "px ").concat(b.y - h.top, "px") : "");
259
266
  }
260
- return /* @__PURE__ */ l.createElement(Be, {
267
+ return /* @__PURE__ */ l.createElement(De, {
261
268
  visible: u,
262
269
  onVisibleChanged: f,
263
- onAppearPrepare: p,
264
- onEnterPrepare: p,
270
+ onAppearPrepare: y,
271
+ onEnterPrepare: y,
265
272
  forceRender: d,
266
- motionName: s,
267
- removeOnLeave: c,
273
+ motionName: c,
274
+ removeOnLeave: s,
268
275
  ref: g
269
- }, function(h, N) {
270
- var O = h.className, E = h.style;
271
- return /* @__PURE__ */ l.createElement(_e, M({}, e, {
272
- ref: t,
273
- title: n,
276
+ }, function(h, P) {
277
+ var O = h.className, $ = h.style;
278
+ return /* @__PURE__ */ l.createElement(ve, D({}, e, {
279
+ ref: n,
280
+ title: o,
274
281
  ariaId: i,
275
- prefixCls: o,
276
- holderRef: N,
277
- style: I(I(I({}, E), a), m),
282
+ prefixCls: t,
283
+ holderRef: P,
284
+ style: I(I(I({}, $), a), m),
278
285
  className: w(r, O)
279
286
  }));
280
287
  });
281
288
  });
282
- Ve.displayName = "Content";
283
- function en(e) {
284
- var t = e.prefixCls, o = e.style, n = e.visible, a = e.maskProps, r = e.motionName, u = e.className;
285
- return /* @__PURE__ */ l.createElement(Be, {
289
+ Ze.displayName = "Content";
290
+ function lt(e) {
291
+ var n = e.prefixCls, t = e.style, o = e.visible, a = e.maskProps, r = e.motionName, u = e.className;
292
+ return /* @__PURE__ */ l.createElement(De, {
286
293
  key: "mask",
287
- visible: n,
294
+ visible: o,
288
295
  motionName: r,
289
- leavedClassName: "".concat(t, "-mask-hidden")
290
- }, function(d, c) {
291
- var s = d.className, i = d.style;
292
- return /* @__PURE__ */ l.createElement("div", M({
293
- ref: c,
294
- style: I(I({}, i), o),
295
- className: w("".concat(t, "-mask"), s, u)
296
+ leavedClassName: "".concat(n, "-mask-hidden")
297
+ }, function(d, s) {
298
+ var c = d.className, i = d.style;
299
+ return /* @__PURE__ */ l.createElement("div", D({
300
+ ref: s,
301
+ style: I(I({}, i), t),
302
+ className: w("".concat(n, "-mask"), c, u)
296
303
  }, a));
297
304
  });
298
305
  }
299
- function tn(e) {
300
- var t = e.prefixCls, o = t === void 0 ? "rc-dialog" : t, n = e.zIndex, a = e.visible, r = a === void 0 ? !1 : a, u = e.keyboard, d = u === void 0 ? !0 : u, c = e.focusTriggerAfterClose, s = c === void 0 ? !0 : c, i = e.wrapStyle, f = e.wrapClassName, b = e.wrapProps, g = e.onClose, x = e.afterOpenChange, C = e.afterClose, $ = e.transitionName, y = e.animation, m = e.closable, p = m === void 0 ? !0 : m, h = e.mask, N = h === void 0 ? !0 : h, O = e.maskTransitionName, E = e.maskAnimation, H = e.maskClosable, W = H === void 0 ? !0 : H, _ = e.maskStyle, F = e.maskProps, U = e.rootClassName, B = e.classNames, T = e.styles, L = D(), A = D(), V = D(), Q = l.useState(r), X = se(Q, 2), R = X[0], j = X[1], q = Nt();
301
- function oe() {
302
- be(A.current, document.activeElement) || (L.current = document.activeElement);
306
+ function it(e) {
307
+ var n = e.prefixCls, t = n === void 0 ? "rc-dialog" : n, o = e.zIndex, a = e.visible, r = a === void 0 ? !1 : a, u = e.keyboard, d = u === void 0 ? !0 : u, s = e.focusTriggerAfterClose, c = s === void 0 ? !0 : s, i = e.wrapStyle, f = e.wrapClassName, b = e.wrapProps, g = e.onClose, x = e.afterOpenChange, C = e.afterClose, E = e.transitionName, p = e.animation, m = e.closable, y = m === void 0 ? !0 : m, h = e.mask, P = h === void 0 ? !0 : h, O = e.maskTransitionName, $ = e.maskAnimation, H = e.maskClosable, W = H === void 0 ? !0 : H, q = e.maskStyle, _ = e.maskProps, L = e.rootClassName, j = e.classNames, T = e.styles;
308
+ process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(N) {
309
+ he(!(N in e), "".concat(N, " is deprecated, please use styles instead."));
310
+ }), "wrapClassName" in e && he(!1, "wrapClassName is deprecated, please use classNames instead."));
311
+ var z = V(), A = V(), G = V(), Q = l.useState(r), X = ce(Q, 2), R = X[0], M = X[1], F = Dn();
312
+ function Z() {
313
+ xe(A.current, document.activeElement) || (z.current = document.activeElement);
303
314
  }
304
- function k() {
305
- if (!be(A.current, document.activeElement)) {
306
- var P;
307
- (P = V.current) === null || P === void 0 || P.focus();
315
+ function ee() {
316
+ if (!xe(A.current, document.activeElement)) {
317
+ var N;
318
+ (N = G.current) === null || N === void 0 || N.focus();
308
319
  }
309
320
  }
310
- function it(P) {
311
- if (P)
312
- k();
321
+ function Cn(N) {
322
+ if (N)
323
+ ee();
313
324
  else {
314
- if (j(!1), N && L.current && s) {
325
+ if (M(!1), P && z.current && c) {
315
326
  try {
316
- L.current.focus({
327
+ z.current.focus({
317
328
  preventScroll: !0
318
329
  });
319
330
  } catch {
320
331
  }
321
- L.current = null;
332
+ z.current = null;
322
333
  }
323
334
  R && (C == null || C());
324
335
  }
325
- x == null || x(P);
336
+ x == null || x(N);
326
337
  }
327
- function ae(P) {
328
- g == null || g(P);
338
+ function ae(N) {
339
+ g == null || g(N);
329
340
  }
330
- var ee = D(!1), re = D(), ct = function() {
331
- clearTimeout(re.current), ee.current = !0;
332
- }, st = function() {
341
+ var ne = V(!1), re = V(), vn = function() {
342
+ clearTimeout(re.current), ne.current = !0;
343
+ }, bn = function() {
333
344
  re.current = setTimeout(function() {
334
- ee.current = !1;
345
+ ne.current = !1;
335
346
  });
336
- }, Ce = null;
337
- W && (Ce = function(le) {
338
- ee.current ? ee.current = !1 : A.current === le.target && ae(le);
347
+ }, pe = null;
348
+ W && (pe = function(le) {
349
+ ne.current ? ne.current = !1 : A.current === le.target && ae(le);
339
350
  });
340
- function dt(P) {
341
- if (d && P.keyCode === pe.ESC) {
342
- P.stopPropagation(), ae(P);
351
+ function pn(N) {
352
+ if (d && N.keyCode === $e.ESC) {
353
+ N.stopPropagation(), ae(N);
343
354
  return;
344
355
  }
345
- r && P.keyCode === pe.TAB && V.current.changeActive(!P.shiftKey);
356
+ r && N.keyCode === $e.TAB && G.current.changeActive(!N.shiftKey);
346
357
  }
347
- return ye(function() {
348
- r && (j(!0), oe());
349
- }, [r]), ye(function() {
358
+ return Ee(function() {
359
+ r && (M(!0), Z());
360
+ }, [r]), Ee(function() {
350
361
  return function() {
351
362
  clearTimeout(re.current);
352
363
  };
353
- }, []), /* @__PURE__ */ l.createElement("div", M({
354
- className: w("".concat(o, "-root"), U)
355
- }, ge(e, {
364
+ }, []), /* @__PURE__ */ l.createElement("div", D({
365
+ className: w("".concat(t, "-root"), L)
366
+ }, Ce(e, {
356
367
  data: !0
357
- })), /* @__PURE__ */ l.createElement(en, {
358
- prefixCls: o,
359
- visible: N && r,
360
- motionName: $e(o, O, E),
368
+ })), /* @__PURE__ */ l.createElement(lt, {
369
+ prefixCls: t,
370
+ visible: P && r,
371
+ motionName: Se(t, O, $),
361
372
  style: I(I({
362
- zIndex: n
363
- }, _), T == null ? void 0 : T.mask),
364
- maskProps: F,
365
- className: B == null ? void 0 : B.mask
366
- }), /* @__PURE__ */ l.createElement("div", M({
373
+ zIndex: o
374
+ }, q), T == null ? void 0 : T.mask),
375
+ maskProps: _,
376
+ className: j == null ? void 0 : j.mask
377
+ }), /* @__PURE__ */ l.createElement("div", D({
367
378
  tabIndex: -1,
368
- onKeyDown: dt,
369
- className: w("".concat(o, "-wrap"), f, B == null ? void 0 : B.wrapper),
379
+ onKeyDown: pn,
380
+ className: w("".concat(t, "-wrap"), f, j == null ? void 0 : j.wrapper),
370
381
  ref: A,
371
- onClick: Ce,
382
+ onClick: pe,
372
383
  style: I(I(I({
373
- zIndex: n
384
+ zIndex: o
374
385
  }, i), T == null ? void 0 : T.wrapper), {}, {
375
386
  display: R ? null : "none"
376
387
  })
377
- }, b), /* @__PURE__ */ l.createElement(Ve, M({}, e, {
378
- onMouseDown: ct,
379
- onMouseUp: st,
380
- ref: V,
381
- closable: p,
382
- ariaId: q,
383
- prefixCls: o,
388
+ }, b), /* @__PURE__ */ l.createElement(Ze, D({}, e, {
389
+ onMouseDown: vn,
390
+ onMouseUp: bn,
391
+ ref: G,
392
+ closable: y,
393
+ ariaId: F,
394
+ prefixCls: t,
384
395
  visible: r && R,
385
396
  onClose: ae,
386
- onVisibleChanged: it,
387
- motionName: $e(o, $, y)
397
+ onVisibleChanged: Cn,
398
+ motionName: Se(t, E, p)
388
399
  }))));
389
400
  }
390
- var qe = function(t) {
391
- var o = t.visible, n = t.getContainer, a = t.forceRender, r = t.destroyOnClose, u = r === void 0 ? !1 : r, d = t.afterClose, c = t.panelRef, s = l.useState(o), i = se(s, 2), f = i[0], b = i[1], g = l.useMemo(function() {
401
+ var Ye = function(n) {
402
+ var t = n.visible, o = n.getContainer, a = n.forceRender, r = n.destroyOnClose, u = r === void 0 ? !1 : r, d = n.afterClose, s = n.panelRef, c = l.useState(t), i = ce(c, 2), f = i[0], b = i[1], g = l.useMemo(function() {
392
403
  return {
393
- panel: c
404
+ panel: s
394
405
  };
395
- }, [c]);
406
+ }, [s]);
396
407
  return l.useEffect(function() {
397
- o && b(!0);
398
- }, [o]), !a && u && !f ? null : /* @__PURE__ */ l.createElement(We.Provider, {
408
+ t && b(!0);
409
+ }, [t]), !a && u && !f ? null : /* @__PURE__ */ l.createElement(Qe.Provider, {
399
410
  value: g
400
- }, /* @__PURE__ */ l.createElement(It, {
401
- open: o || a || f,
411
+ }, /* @__PURE__ */ l.createElement(_n, {
412
+ open: t || a || f,
402
413
  autoDestroy: !1,
403
- getContainer: n,
404
- autoLock: o || f
405
- }, /* @__PURE__ */ l.createElement(tn, M({}, t, {
414
+ getContainer: o,
415
+ autoLock: t || f
416
+ }, /* @__PURE__ */ l.createElement(it, D({}, n, {
406
417
  destroyOnClose: u,
407
418
  afterClose: function() {
408
419
  d == null || d(), b(!1);
409
420
  }
410
421
  }))));
411
422
  };
412
- qe.displayName = "Dialog";
413
- function Se(e) {
423
+ Ye.displayName = "Dialog";
424
+ function Ie(e) {
414
425
  if (e)
415
426
  return {
416
427
  closable: e.closable,
417
428
  closeIcon: e.closeIcon
418
429
  };
419
430
  }
420
- function Pe(e) {
431
+ function Te(e) {
421
432
  const {
422
- closable: t,
423
- closeIcon: o
433
+ closable: n,
434
+ closeIcon: t
424
435
  } = e || {};
425
436
  return v.useMemo(() => {
426
437
  if (
427
438
  // If `closable`, whatever rest be should be true
428
- !t && (t === !1 || o === !1 || o === null)
439
+ !n && (n === !1 || t === !1 || t === null)
429
440
  )
430
441
  return !1;
431
- if (t === void 0 && o === void 0)
442
+ if (n === void 0 && t === void 0)
432
443
  return null;
433
- let n = {
434
- closeIcon: typeof o != "boolean" && o !== null ? o : void 0
444
+ let o = {
445
+ closeIcon: typeof t != "boolean" && t !== null ? t : void 0
435
446
  };
436
- return t && typeof t == "object" && (n = Object.assign(Object.assign({}, n), t)), n;
437
- }, [t, o]);
447
+ return n && typeof n == "object" && (o = Object.assign(Object.assign({}, o), n)), o;
448
+ }, [n, t]);
438
449
  }
439
- function we() {
450
+ function Re() {
440
451
  const e = {};
441
- for (var t = arguments.length, o = new Array(t), n = 0; n < t; n++)
442
- o[n] = arguments[n];
443
- return o.forEach((a) => {
452
+ for (var n = arguments.length, t = new Array(n), o = 0; o < n; o++)
453
+ t[o] = arguments[o];
454
+ return t.forEach((a) => {
444
455
  a && Object.keys(a).forEach((r) => {
445
456
  a[r] !== void 0 && (e[r] = a[r]);
446
457
  });
447
458
  }), e;
448
459
  }
449
- const nn = {};
450
- function on(e, t) {
451
- let o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : nn;
452
- const n = Pe(e), a = Pe(t), r = v.useMemo(() => Object.assign({
453
- closeIcon: /* @__PURE__ */ v.createElement(me, null)
454
- }, o), [o]), u = v.useMemo(() => n === !1 ? !1 : n ? we(r, a, n) : a === !1 ? !1 : a ? we(r, a) : r.closable ? r : !1, [n, a, r]);
460
+ const st = {};
461
+ function ct(e, n) {
462
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : st;
463
+ const o = Te(e), a = Te(n), r = v.useMemo(() => Object.assign({
464
+ closeIcon: /* @__PURE__ */ v.createElement(ge, null)
465
+ }, t), [t]), u = v.useMemo(() => o === !1 ? !1 : o ? Re(r, a, o) : a === !1 ? !1 : a ? Re(r, a) : r.closable ? r : !1, [o, a, r]);
455
466
  return v.useMemo(() => {
456
467
  if (u === !1)
457
468
  return [!1, null];
458
469
  const {
459
470
  closeIconRender: d
460
471
  } = r, {
461
- closeIcon: c
472
+ closeIcon: s
462
473
  } = u;
463
- let s = c;
464
- if (s != null) {
465
- d && (s = d(c));
466
- const i = ge(u, !0);
467
- Object.keys(i).length && (s = /* @__PURE__ */ v.isValidElement(s) ? /* @__PURE__ */ v.cloneElement(s, i) : /* @__PURE__ */ v.createElement("span", Object.assign({}, i), s));
474
+ let c = s;
475
+ if (c != null) {
476
+ d && (c = d(s));
477
+ const i = Ce(u, !0);
478
+ Object.keys(i).length && (c = /* @__PURE__ */ v.isValidElement(c) ? /* @__PURE__ */ v.cloneElement(c, i) : /* @__PURE__ */ v.createElement("span", Object.assign({}, i), c));
468
479
  }
469
- return [!0, s];
480
+ return [!0, c];
470
481
  }, [u, r]);
471
482
  }
472
- const an = () => Ct() && window.document.documentElement;
473
- function Ne() {
483
+ const dt = () => $n() && window.document.documentElement;
484
+ function Me() {
474
485
  }
475
- const rn = /* @__PURE__ */ l.createContext({
476
- add: Ne,
477
- remove: Ne
486
+ const ut = /* @__PURE__ */ l.createContext({
487
+ add: Me,
488
+ remove: Me
478
489
  });
479
- function ln(e) {
480
- const t = l.useContext(rn), o = l.useRef();
481
- return vt((a) => {
490
+ function ft(e) {
491
+ const n = l.useContext(ut), t = l.useRef();
492
+ return On((a) => {
482
493
  if (a) {
483
494
  const r = e ? a.querySelector(e) : a;
484
- t.add(r), o.current = r;
495
+ n.add(r), t.current = r;
485
496
  } else
486
- t.remove(o.current);
497
+ n.remove(t.current);
487
498
  });
488
499
  }
489
- const Ie = () => {
500
+ const je = () => {
490
501
  const {
491
502
  cancelButtonProps: e,
492
- cancelTextLocale: t,
493
- onCancel: o
494
- } = Z(Y);
495
- return /* @__PURE__ */ v.createElement(fe, Object.assign({
496
- onClick: o
497
- }, e), t);
498
- }, Te = () => {
503
+ cancelTextLocale: n,
504
+ onCancel: t
505
+ } = Y(J);
506
+ return /* @__PURE__ */ v.createElement(me, Object.assign({
507
+ onClick: t
508
+ }, e), n);
509
+ }, Be = () => {
499
510
  const {
500
511
  confirmLoading: e,
501
- okButtonProps: t,
502
- okType: o,
503
- okTextLocale: n,
512
+ okButtonProps: n,
513
+ okType: t,
514
+ okTextLocale: o,
504
515
  onOk: a
505
- } = Z(Y);
506
- return /* @__PURE__ */ v.createElement(fe, Object.assign({}, Le(o), {
516
+ } = Y(J);
517
+ return /* @__PURE__ */ v.createElement(me, Object.assign({}, We(t), {
507
518
  loading: e,
508
519
  onClick: a
509
- }, t), n);
520
+ }, n), o);
510
521
  };
511
- function Ge(e, t) {
522
+ function Je(e, n) {
512
523
  return /* @__PURE__ */ v.createElement("span", {
513
524
  className: `${e}-close-x`
514
- }, t || /* @__PURE__ */ v.createElement(me, {
525
+ }, n || /* @__PURE__ */ v.createElement(ge, {
515
526
  className: `${e}-close-icon`
516
527
  }));
517
528
  }
518
- const Ue = (e) => {
529
+ const ke = (e) => {
519
530
  const {
520
- okText: t,
521
- okType: o = "primary",
522
- cancelText: n,
531
+ okText: n,
532
+ okType: t = "primary",
533
+ cancelText: o,
523
534
  confirmLoading: a,
524
535
  onOk: r,
525
536
  onCancel: u,
526
537
  okButtonProps: d,
527
- cancelButtonProps: c,
528
- footer: s
529
- } = e, [i] = ue("Modal", Me()), f = t || (i == null ? void 0 : i.okText), b = n || (i == null ? void 0 : i.cancelText), g = {
538
+ cancelButtonProps: s,
539
+ footer: c
540
+ } = e, [i] = fe("Modal", _e()), f = n || (i == null ? void 0 : i.okText), b = o || (i == null ? void 0 : i.cancelText), g = {
530
541
  confirmLoading: a,
531
542
  okButtonProps: d,
532
- cancelButtonProps: c,
543
+ cancelButtonProps: s,
533
544
  okTextLocale: f,
534
545
  cancelTextLocale: b,
535
- okType: o,
546
+ okType: t,
536
547
  onOk: r,
537
548
  onCancel: u
538
- }, x = v.useMemo(() => g, G(Object.values(g)));
549
+ }, x = v.useMemo(() => g, U(Object.values(g)));
539
550
  let C;
540
- return typeof s == "function" || typeof s > "u" ? (C = /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(Ie, null), /* @__PURE__ */ v.createElement(Te, null)), typeof s == "function" && (C = s(C, {
541
- OkBtn: Te,
542
- CancelBtn: Ie
543
- })), C = /* @__PURE__ */ v.createElement(De, {
551
+ return typeof c == "function" || typeof c > "u" ? (C = /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement(je, null), /* @__PURE__ */ v.createElement(Be, null)), typeof c == "function" && (C = c(C, {
552
+ OkBtn: Be,
553
+ CancelBtn: je
554
+ })), C = /* @__PURE__ */ v.createElement(Ke, {
544
555
  value: x
545
- }, C)) : C = s, /* @__PURE__ */ v.createElement(bt, {
556
+ }, C)) : C = c, /* @__PURE__ */ v.createElement(Nn, {
546
557
  disabled: !1
547
558
  }, C);
548
- }, cn = new ze("antFadeIn", {
559
+ }, mt = new He("antFadeIn", {
549
560
  "0%": {
550
561
  opacity: 0
551
562
  },
552
563
  "100%": {
553
564
  opacity: 1
554
565
  }
555
- }), sn = new ze("antFadeOut", {
566
+ }), gt = new He("antFadeOut", {
556
567
  "0%": {
557
568
  opacity: 1
558
569
  },
559
570
  "100%": {
560
571
  opacity: 0
561
572
  }
562
- }), dn = function(e) {
563
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
573
+ }), Ct = function(e) {
574
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
564
575
  const {
565
- antCls: o
566
- } = e, n = `${o}-fade`, a = t ? "&" : "";
567
- return [Tt(n, cn, sn, e.motionDurationMid, t), {
576
+ antCls: t
577
+ } = e, o = `${t}-fade`, a = n ? "&" : "";
578
+ return [Hn(o, mt, gt, e.motionDurationMid, n), {
568
579
  [`
569
- ${a}${n}-enter,
570
- ${a}${n}-appear
580
+ ${a}${o}-enter,
581
+ ${a}${o}-appear
571
582
  `]: {
572
583
  opacity: 0,
573
584
  animationTimingFunction: "linear"
574
585
  },
575
- [`${a}${n}-leave`]: {
586
+ [`${a}${o}-leave`]: {
576
587
  animationTimingFunction: "linear"
577
588
  }
578
589
  }];
579
590
  };
580
- function Re(e) {
591
+ function ze(e) {
581
592
  return {
582
593
  position: e,
583
594
  inset: 0
584
595
  };
585
596
  }
586
- const un = (e) => {
597
+ const vt = (e) => {
587
598
  const {
588
- componentCls: t,
589
- antCls: o
599
+ componentCls: n,
600
+ antCls: t
590
601
  } = e;
591
602
  return [{
592
- [`${t}-root`]: {
593
- [`${t}${o}-zoom-enter, ${t}${o}-zoom-appear`]: {
603
+ [`${n}-root`]: {
604
+ [`${n}${t}-zoom-enter, ${n}${t}-zoom-appear`]: {
594
605
  // reset scale avoid mousePosition bug
595
606
  transform: "none",
596
607
  opacity: 0,
@@ -600,19 +611,19 @@ const un = (e) => {
600
611
  },
601
612
  // https://github.com/ant-design/ant-design/issues/37329
602
613
  // https://github.com/ant-design/ant-design/issues/40272
603
- [`${t}${o}-zoom-leave ${t}-content`]: {
614
+ [`${n}${t}-zoom-leave ${n}-content`]: {
604
615
  pointerEvents: "none"
605
616
  },
606
- [`${t}-mask`]: Object.assign(Object.assign({}, Re("fixed")), {
617
+ [`${n}-mask`]: Object.assign(Object.assign({}, ze("fixed")), {
607
618
  zIndex: e.zIndexPopupBase,
608
619
  height: "100%",
609
620
  backgroundColor: e.colorBgMask,
610
621
  pointerEvents: "none",
611
- [`${t}-hidden`]: {
622
+ [`${n}-hidden`]: {
612
623
  display: "none"
613
624
  }
614
625
  }),
615
- [`${t}-wrap`]: Object.assign(Object.assign({}, Re("fixed")), {
626
+ [`${n}-wrap`]: Object.assign(Object.assign({}, ze("fixed")), {
616
627
  zIndex: e.zIndexPopupBase,
617
628
  overflow: "auto",
618
629
  outline: 0,
@@ -620,20 +631,20 @@ const un = (e) => {
620
631
  })
621
632
  }
622
633
  }, {
623
- [`${t}-root`]: dn(e)
634
+ [`${n}-root`]: Ct(e)
624
635
  }];
625
- }, fn = (e) => {
636
+ }, bt = (e) => {
626
637
  const {
627
- componentCls: t
638
+ componentCls: n
628
639
  } = e;
629
640
  return [
630
641
  // ======================== Root =========================
631
642
  {
632
- [`${t}-root`]: {
633
- [`${t}-wrap-rtl`]: {
643
+ [`${n}-root`]: {
644
+ [`${n}-wrap-rtl`]: {
634
645
  direction: "rtl"
635
646
  },
636
- [`${t}-centered`]: {
647
+ [`${n}-centered`]: {
637
648
  textAlign: "center",
638
649
  "&::before": {
639
650
  display: "inline-block",
@@ -642,7 +653,7 @@ const un = (e) => {
642
653
  verticalAlign: "middle",
643
654
  content: '""'
644
655
  },
645
- [t]: {
656
+ [n]: {
646
657
  top: 0,
647
658
  display: "inline-block",
648
659
  paddingBottom: 0,
@@ -651,12 +662,12 @@ const un = (e) => {
651
662
  }
652
663
  },
653
664
  [`@media (max-width: ${e.screenSMMax}px)`]: {
654
- [t]: {
665
+ [n]: {
655
666
  maxWidth: "calc(100vw - 16px)",
656
667
  margin: `${S(e.marginXS)} auto`
657
668
  },
658
- [`${t}-centered`]: {
659
- [t]: {
669
+ [`${n}-centered`]: {
670
+ [n]: {
660
671
  flex: 1
661
672
  }
662
673
  }
@@ -665,7 +676,7 @@ const un = (e) => {
665
676
  },
666
677
  // ======================== Modal ========================
667
678
  {
668
- [t]: Object.assign(Object.assign({}, pt(e)), {
679
+ [n]: Object.assign(Object.assign({}, wn(e)), {
669
680
  pointerEvents: "none",
670
681
  position: "relative",
671
682
  top: 100,
@@ -673,7 +684,7 @@ const un = (e) => {
673
684
  maxWidth: `calc(100vw - ${S(e.calc(e.margin).mul(2).equal())})`,
674
685
  margin: "0 auto",
675
686
  paddingBottom: e.paddingLG,
676
- [`${t}-title`]: {
687
+ [`${n}-title`]: {
677
688
  margin: 0,
678
689
  color: e.titleColor,
679
690
  fontWeight: e.fontWeightStrong,
@@ -681,7 +692,7 @@ const un = (e) => {
681
692
  lineHeight: e.titleLineHeight,
682
693
  wordWrap: "break-word"
683
694
  },
684
- [`${t}-content`]: {
695
+ [`${n}-content`]: {
685
696
  position: "relative",
686
697
  backgroundColor: e.contentBg,
687
698
  backgroundClip: "padding-box",
@@ -691,7 +702,7 @@ const un = (e) => {
691
702
  pointerEvents: "auto",
692
703
  padding: e.contentPadding
693
704
  },
694
- [`${t}-close`]: Object.assign({
705
+ [`${n}-close`]: Object.assign({
695
706
  position: "absolute",
696
707
  top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
697
708
  insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
@@ -726,8 +737,8 @@ const un = (e) => {
726
737
  "&:active": {
727
738
  backgroundColor: e.colorBgTextActive
728
739
  }
729
- }, ht(e)),
730
- [`${t}-header`]: {
740
+ }, Pn(e)),
741
+ [`${n}-header`]: {
731
742
  color: e.colorText,
732
743
  background: e.headerBg,
733
744
  borderRadius: `${S(e.borderRadiusLG)} ${S(e.borderRadiusLG)} 0 0`,
@@ -735,13 +746,13 @@ const un = (e) => {
735
746
  padding: e.headerPadding,
736
747
  borderBottom: e.headerBorderBottom
737
748
  },
738
- [`${t}-body`]: {
749
+ [`${n}-body`]: {
739
750
  fontSize: e.fontSize,
740
751
  lineHeight: e.lineHeight,
741
752
  wordWrap: "break-word",
742
753
  padding: e.bodyPadding
743
754
  },
744
- [`${t}-footer`]: {
755
+ [`${n}-footer`]: {
745
756
  textAlign: "end",
746
757
  background: e.footerBg,
747
758
  marginTop: e.footerMarginTop,
@@ -752,49 +763,49 @@ const un = (e) => {
752
763
  marginInlineStart: e.marginXS
753
764
  }
754
765
  },
755
- [`${t}-open`]: {
766
+ [`${n}-open`]: {
756
767
  overflow: "hidden"
757
768
  }
758
769
  })
759
770
  },
760
771
  // ======================== Pure =========================
761
772
  {
762
- [`${t}-pure-panel`]: {
773
+ [`${n}-pure-panel`]: {
763
774
  top: "auto",
764
775
  padding: 0,
765
776
  display: "flex",
766
777
  flexDirection: "column",
767
- [`${t}-content,
768
- ${t}-body,
769
- ${t}-confirm-body-wrapper`]: {
778
+ [`${n}-content,
779
+ ${n}-body,
780
+ ${n}-confirm-body-wrapper`]: {
770
781
  display: "flex",
771
782
  flexDirection: "column",
772
783
  flex: "auto"
773
784
  },
774
- [`${t}-confirm-body`]: {
785
+ [`${n}-confirm-body`]: {
775
786
  marginBottom: "auto"
776
787
  }
777
788
  }
778
789
  }
779
790
  ];
780
- }, mn = (e) => {
791
+ }, pt = (e) => {
781
792
  const {
782
- componentCls: t
793
+ componentCls: n
783
794
  } = e;
784
795
  return {
785
- [`${t}-root`]: {
786
- [`${t}-wrap-rtl`]: {
796
+ [`${n}-root`]: {
797
+ [`${n}-wrap-rtl`]: {
787
798
  direction: "rtl",
788
- [`${t}-confirm-body`]: {
799
+ [`${n}-confirm-body`]: {
789
800
  direction: "rtl"
790
801
  }
791
802
  }
792
803
  }
793
804
  };
794
- }, Xe = (e) => {
795
- const t = e.padding, o = e.fontSizeHeading5, n = e.lineHeightHeading5;
796
- return xt(e, {
797
- modalHeaderHeight: e.calc(e.calc(n).mul(o).equal()).add(e.calc(t).mul(2).equal()).equal(),
805
+ }, en = (e) => {
806
+ const n = e.padding, t = e.fontSizeHeading5, o = e.lineHeightHeading5;
807
+ return In(e, {
808
+ modalHeaderHeight: e.calc(e.calc(o).mul(t).equal()).add(e.calc(n).mul(2).equal()).equal(),
798
809
  modalFooterBorderColorSplit: e.colorSplit,
799
810
  modalFooterBorderStyle: e.lineType,
800
811
  modalFooterBorderWidth: e.lineWidth,
@@ -804,7 +815,7 @@ const un = (e) => {
804
815
  modalConfirmIconSize: e.fontHeight,
805
816
  modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
806
817
  });
807
- }, Ke = (e) => ({
818
+ }, nn = (e) => ({
808
819
  footerBg: "transparent",
809
820
  headerBg: e.colorBgElevated,
810
821
  titleLineHeight: e.lineHeightHeading5,
@@ -824,120 +835,128 @@ const un = (e) => {
824
835
  confirmBodyPadding: e.wireframe ? `${S(e.padding * 2)} ${S(e.padding * 2)} ${S(e.paddingLG)}` : 0,
825
836
  confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
826
837
  confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
827
- }), Qe = yt("Modal", (e) => {
828
- const t = Xe(e);
829
- return [fn(t), mn(t), un(t), Rt(t, "zoom")];
830
- }, Ke, {
838
+ }), tn = Sn("Modal", (e) => {
839
+ const n = en(e);
840
+ return [bt(n), pt(n), vt(n), Ln(n, "zoom")];
841
+ }, nn, {
831
842
  unitless: {
832
843
  titleLineHeight: !0
833
844
  }
834
845
  });
835
- var gn = function(e, t) {
836
- var o = {};
837
- for (var n in e)
838
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
846
+ var yt = function(e, n) {
847
+ var t = {};
848
+ for (var o in e)
849
+ Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
839
850
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
840
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
841
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
842
- return o;
851
+ for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
852
+ n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
853
+ return t;
843
854
  };
844
- let ce;
845
- const Cn = (e) => {
846
- ce = {
855
+ let se;
856
+ const ht = (e) => {
857
+ se = {
847
858
  x: e.pageX,
848
859
  y: e.pageY
849
860
  }, setTimeout(() => {
850
- ce = null;
861
+ se = null;
851
862
  }, 100);
852
863
  };
853
- an() && document.documentElement.addEventListener("click", Cn, !0);
854
- const Ze = (e) => {
855
- var t;
864
+ dt() && document.documentElement.addEventListener("click", ht, !0);
865
+ const on = (e) => {
866
+ var n;
856
867
  const {
857
- getPopupContainer: o,
858
- getPrefixCls: n,
868
+ getPopupContainer: t,
869
+ getPrefixCls: o,
859
870
  direction: a,
860
871
  modal: r
861
- } = l.useContext(ne), u = (R) => {
872
+ } = l.useContext(oe), u = (R) => {
862
873
  const {
863
- onCancel: j
874
+ onCancel: M
864
875
  } = e;
865
- j == null || j(R);
876
+ M == null || M(R);
866
877
  }, d = (R) => {
867
878
  const {
868
- onOk: j
879
+ onOk: M
869
880
  } = e;
870
- j == null || j(R);
871
- }, {
872
- prefixCls: c,
873
- className: s,
881
+ M == null || M(R);
882
+ };
883
+ if (process.env.NODE_ENV !== "production") {
884
+ const R = de("Modal");
885
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((M) => {
886
+ let [F, Z] = M;
887
+ R.deprecated(!(F in e), F, Z);
888
+ });
889
+ }
890
+ const {
891
+ prefixCls: s,
892
+ className: c,
874
893
  rootClassName: i,
875
894
  open: f,
876
895
  wrapClassName: b,
877
896
  centered: g,
878
897
  getContainer: x,
879
898
  focusTriggerAfterClose: C = !0,
880
- style: $,
899
+ style: E,
881
900
  // Deprecated
882
- visible: y,
901
+ visible: p,
883
902
  width: m = 520,
884
- footer: p,
903
+ footer: y,
885
904
  classNames: h,
886
- styles: N
887
- } = e, O = gn(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles"]), E = n("modal", c), H = n(), W = He(E), [_, F, U] = Qe(E, W), B = w(b, {
888
- [`${E}-centered`]: !!g,
889
- [`${E}-wrap-rtl`]: a === "rtl"
890
- }), T = p !== null && /* @__PURE__ */ l.createElement(Ue, Object.assign({}, e, {
905
+ styles: P
906
+ } = e, O = yt(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles"]), $ = o("modal", s), H = o(), W = Ve($), [q, _, L] = tn($, W), j = w(b, {
907
+ [`${$}-centered`]: !!g,
908
+ [`${$}-wrap-rtl`]: a === "rtl"
909
+ }), T = y !== null && /* @__PURE__ */ l.createElement(ke, Object.assign({}, e, {
891
910
  onOk: d,
892
911
  onCancel: u
893
- })), [L, A] = on(Se(e), Se(r), {
912
+ })), [z, A] = ct(Ie(e), Ie(r), {
894
913
  closable: !0,
895
- closeIcon: /* @__PURE__ */ l.createElement(me, {
896
- className: `${E}-close-icon`
914
+ closeIcon: /* @__PURE__ */ l.createElement(ge, {
915
+ className: `${$}-close-icon`
897
916
  }),
898
- closeIconRender: (R) => Ge(E, R)
899
- }), V = ln(`.${E}-content`), [Q, X] = jt("Modal", O.zIndex);
900
- return _(/* @__PURE__ */ l.createElement(Bt, null, /* @__PURE__ */ l.createElement(Mt, {
917
+ closeIconRender: (R) => Je($, R)
918
+ }), G = ft(`.${$}-content`), [Q, X] = An("Modal", O.zIndex);
919
+ return q(/* @__PURE__ */ l.createElement(Vn, null, /* @__PURE__ */ l.createElement(Wn, {
901
920
  status: !0,
902
921
  override: !0
903
- }, /* @__PURE__ */ l.createElement(zt.Provider, {
922
+ }, /* @__PURE__ */ l.createElement(qn.Provider, {
904
923
  value: X
905
- }, /* @__PURE__ */ l.createElement(qe, Object.assign({
924
+ }, /* @__PURE__ */ l.createElement(Ye, Object.assign({
906
925
  width: m
907
926
  }, O, {
908
927
  zIndex: Q,
909
- getContainer: x === void 0 ? o : x,
910
- prefixCls: E,
911
- rootClassName: w(F, i, U, W),
928
+ getContainer: x === void 0 ? t : x,
929
+ prefixCls: $,
930
+ rootClassName: w(_, i, L, W),
912
931
  footer: T,
913
- visible: f ?? y,
914
- mousePosition: (t = O.mousePosition) !== null && t !== void 0 ? t : ce,
932
+ visible: f ?? p,
933
+ mousePosition: (n = O.mousePosition) !== null && n !== void 0 ? n : se,
915
934
  onClose: u,
916
- closable: L,
935
+ closable: z,
917
936
  closeIcon: A,
918
937
  focusTriggerAfterClose: C,
919
938
  transitionName: te(H, "zoom", e.transitionName),
920
939
  maskTransitionName: te(H, "fade", e.maskTransitionName),
921
- className: w(F, s, r == null ? void 0 : r.className),
922
- style: Object.assign(Object.assign({}, r == null ? void 0 : r.style), $),
940
+ className: w(_, c, r == null ? void 0 : r.className),
941
+ style: Object.assign(Object.assign({}, r == null ? void 0 : r.style), E),
923
942
  classNames: Object.assign(Object.assign(Object.assign({}, r == null ? void 0 : r.classNames), h), {
924
- wrapper: w(B, h == null ? void 0 : h.wrapper)
943
+ wrapper: w(j, h == null ? void 0 : h.wrapper)
925
944
  }),
926
- styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles), N),
927
- panelRef: V
945
+ styles: Object.assign(Object.assign({}, r == null ? void 0 : r.styles), P),
946
+ panelRef: G
928
947
  }))))));
929
- }, vn = (e) => {
948
+ }, xt = (e) => {
930
949
  const {
931
- componentCls: t,
932
- titleFontSize: o,
933
- titleLineHeight: n,
950
+ componentCls: n,
951
+ titleFontSize: t,
952
+ titleLineHeight: o,
934
953
  modalConfirmIconSize: a,
935
954
  fontSize: r,
936
955
  lineHeight: u,
937
956
  modalTitleHeight: d,
938
- fontHeight: c,
939
- confirmBodyPadding: s
940
- } = e, i = `${t}-confirm`;
957
+ fontHeight: s,
958
+ confirmBodyPadding: c
959
+ } = e, i = `${n}-confirm`;
941
960
  return {
942
961
  [i]: {
943
962
  "&-rtl": {
@@ -946,9 +965,9 @@ const Ze = (e) => {
946
965
  [`${e.antCls}-modal-header`]: {
947
966
  display: "none"
948
967
  },
949
- [`${i}-body-wrapper`]: Object.assign({}, Ot()),
950
- [`&${t} ${t}-body`]: {
951
- padding: s
968
+ [`${i}-body-wrapper`]: Object.assign({}, Rn()),
969
+ [`&${n} ${n}-body`]: {
970
+ padding: c
952
971
  },
953
972
  // ====================== Body ======================
954
973
  [`${i}-body`]: {
@@ -959,7 +978,7 @@ const Ze = (e) => {
959
978
  flex: "none",
960
979
  fontSize: a,
961
980
  marginInlineEnd: e.confirmIconMarginInlineEnd,
962
- marginTop: e.calc(e.calc(c).sub(a).equal()).div(2).equal()
981
+ marginTop: e.calc(e.calc(s).sub(a).equal()).div(2).equal()
963
982
  },
964
983
  [`&-has-title > ${e.iconCls}`]: {
965
984
  marginTop: e.calc(e.calc(d).sub(a).equal()).div(2).equal()
@@ -978,8 +997,8 @@ const Ze = (e) => {
978
997
  [`${i}-title`]: {
979
998
  color: e.colorTextHeading,
980
999
  fontWeight: e.fontWeightStrong,
981
- fontSize: o,
982
- lineHeight: n
1000
+ fontSize: t,
1001
+ lineHeight: o
983
1002
  },
984
1003
  [`${i}-content`]: {
985
1004
  color: e.colorText,
@@ -1010,111 +1029,123 @@ const Ze = (e) => {
1010
1029
  color: e.colorSuccess
1011
1030
  }
1012
1031
  };
1013
- }, bn = $t(["Modal", "confirm"], (e) => {
1014
- const t = Xe(e);
1015
- return [vn(t)];
1016
- }, Ke, {
1032
+ }, Et = Tn(["Modal", "confirm"], (e) => {
1033
+ const n = en(e);
1034
+ return [xt(n)];
1035
+ }, nn, {
1017
1036
  // confirm is weak than modal since no conflict here
1018
1037
  order: -1e3
1019
1038
  });
1020
- var yn = function(e, t) {
1021
- var o = {};
1022
- for (var n in e)
1023
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1039
+ var $t = function(e, n) {
1040
+ var t = {};
1041
+ for (var o in e)
1042
+ Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
1024
1043
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
1025
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1026
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1027
- return o;
1044
+ for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
1045
+ n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
1046
+ return t;
1028
1047
  };
1029
- function Ye(e) {
1048
+ function an(e) {
1030
1049
  const {
1031
- prefixCls: t,
1032
- icon: o,
1033
- okText: n,
1050
+ prefixCls: n,
1051
+ icon: t,
1052
+ okText: o,
1034
1053
  cancelText: a,
1035
1054
  confirmPrefixCls: r,
1036
1055
  type: u,
1037
1056
  okCancel: d,
1038
- footer: c,
1057
+ footer: s,
1039
1058
  // Legacy for static function usage
1040
- locale: s
1041
- } = e, i = yn(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1042
- let f = o;
1043
- if (!o && o !== null)
1059
+ locale: c
1060
+ } = e, i = $t(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1061
+ if (process.env.NODE_ENV !== "production") {
1062
+ const $ = de("Modal");
1063
+ process.env.NODE_ENV !== "production" && $(!(typeof t == "string" && t.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${t}\` at https://ant.design/components/icon`);
1064
+ }
1065
+ let f = t;
1066
+ if (!t && t !== null)
1044
1067
  switch (u) {
1045
1068
  case "info":
1046
- f = /* @__PURE__ */ l.createElement(Qt, null);
1069
+ f = /* @__PURE__ */ l.createElement(Ue, null);
1047
1070
  break;
1048
1071
  case "success":
1049
- f = /* @__PURE__ */ l.createElement(Vt, null);
1072
+ f = /* @__PURE__ */ l.createElement(qe, null);
1050
1073
  break;
1051
1074
  case "error":
1052
- f = /* @__PURE__ */ l.createElement(Ft, null);
1075
+ f = /* @__PURE__ */ l.createElement(Gn, null);
1053
1076
  break;
1054
1077
  default:
1055
- f = /* @__PURE__ */ l.createElement(Ut, null);
1078
+ f = /* @__PURE__ */ l.createElement(Ge, null);
1056
1079
  }
1057
- const b = d ?? u === "confirm", g = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [x] = ue("Modal"), C = s || x, $ = n || (b ? C == null ? void 0 : C.okText : C == null ? void 0 : C.justOkText), y = a || (C == null ? void 0 : C.cancelText), m = Object.assign({
1080
+ const b = d ?? u === "confirm", g = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [x] = fe("Modal"), C = c || x, E = o || (b ? C == null ? void 0 : C.okText : C == null ? void 0 : C.justOkText), p = a || (C == null ? void 0 : C.cancelText), m = Object.assign({
1058
1081
  autoFocusButton: g,
1059
- cancelTextLocale: y,
1060
- okTextLocale: $,
1082
+ cancelTextLocale: p,
1083
+ okTextLocale: E,
1061
1084
  mergedOkCancel: b
1062
- }, i), p = l.useMemo(() => m, G(Object.values(m))), h = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(he, null), /* @__PURE__ */ l.createElement(xe, null)), N = e.title !== void 0 && e.title !== null, O = `${r}-body`;
1085
+ }, i), y = l.useMemo(() => m, U(Object.values(m))), h = /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(Oe, null), /* @__PURE__ */ l.createElement(Ne, null)), P = e.title !== void 0 && e.title !== null, O = `${r}-body`;
1063
1086
  return /* @__PURE__ */ l.createElement("div", {
1064
1087
  className: `${r}-body-wrapper`
1065
1088
  }, /* @__PURE__ */ l.createElement("div", {
1066
1089
  className: w(O, {
1067
- [`${O}-has-title`]: N
1090
+ [`${O}-has-title`]: P
1068
1091
  })
1069
1092
  }, f, /* @__PURE__ */ l.createElement("div", {
1070
1093
  className: `${r}-paragraph`
1071
- }, N && /* @__PURE__ */ l.createElement("span", {
1094
+ }, P && /* @__PURE__ */ l.createElement("span", {
1072
1095
  className: `${r}-title`
1073
1096
  }, e.title), /* @__PURE__ */ l.createElement("div", {
1074
1097
  className: `${r}-content`
1075
- }, e.content))), c === void 0 || typeof c == "function" ? /* @__PURE__ */ l.createElement(De, {
1076
- value: p
1098
+ }, e.content))), s === void 0 || typeof s == "function" ? /* @__PURE__ */ l.createElement(Ke, {
1099
+ value: y
1077
1100
  }, /* @__PURE__ */ l.createElement("div", {
1078
1101
  className: `${r}-btns`
1079
- }, typeof c == "function" ? c(h, {
1080
- OkBtn: xe,
1081
- CancelBtn: he
1082
- }) : h)) : c, /* @__PURE__ */ l.createElement(bn, {
1083
- prefixCls: t
1102
+ }, typeof s == "function" ? s(h, {
1103
+ OkBtn: Ne,
1104
+ CancelBtn: Oe
1105
+ }) : h)) : s, /* @__PURE__ */ l.createElement(Et, {
1106
+ prefixCls: n
1084
1107
  }));
1085
1108
  }
1086
- const pn = (e) => {
1109
+ const rn = (e) => {
1087
1110
  const {
1088
- close: t,
1089
- zIndex: o,
1090
- afterClose: n,
1111
+ close: n,
1112
+ zIndex: t,
1113
+ afterClose: o,
1091
1114
  open: a,
1092
1115
  keyboard: r,
1093
1116
  centered: u,
1094
1117
  getContainer: d,
1095
- maskStyle: c,
1096
- direction: s,
1118
+ maskStyle: s,
1119
+ direction: c,
1097
1120
  prefixCls: i,
1098
1121
  wrapClassName: f,
1099
1122
  rootPrefixCls: b,
1100
1123
  bodyStyle: g,
1101
1124
  closable: x = !1,
1102
1125
  closeIcon: C,
1103
- modalRender: $,
1104
- focusTriggerAfterClose: y,
1126
+ modalRender: E,
1127
+ focusTriggerAfterClose: p,
1105
1128
  onConfirm: m,
1106
- styles: p
1107
- } = e, h = `${i}-confirm`, N = e.width || 416, O = e.style || {}, E = e.mask === void 0 ? !0 : e.mask, H = e.maskClosable === void 0 ? !1 : e.maskClosable, W = w(h, `${h}-${e.type}`, {
1108
- [`${h}-rtl`]: s === "rtl"
1109
- }, e.className), [, _] = Et(), F = l.useMemo(() => o !== void 0 ? o : _.zIndexPopupBase + Ht, [o, _]);
1110
- return /* @__PURE__ */ l.createElement(Ze, {
1129
+ styles: y
1130
+ } = e;
1131
+ if (process.env.NODE_ENV !== "production") {
1132
+ const L = de("Modal");
1133
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach((j) => {
1134
+ let [T, z] = j;
1135
+ L.deprecated(!(T in e), T, z);
1136
+ });
1137
+ }
1138
+ const h = `${i}-confirm`, P = e.width || 416, O = e.style || {}, $ = e.mask === void 0 ? !0 : e.mask, H = e.maskClosable === void 0 ? !1 : e.maskClosable, W = w(h, `${h}-${e.type}`, {
1139
+ [`${h}-rtl`]: c === "rtl"
1140
+ }, e.className), [, q] = Mn(), _ = l.useMemo(() => t !== void 0 ? t : q.zIndexPopupBase + Un, [t, q]);
1141
+ return /* @__PURE__ */ l.createElement(on, {
1111
1142
  prefixCls: i,
1112
1143
  className: W,
1113
1144
  wrapClassName: w({
1114
1145
  [`${h}-centered`]: !!e.centered
1115
1146
  }, f),
1116
1147
  onCancel: () => {
1117
- t == null || t({
1148
+ n == null || n({
1118
1149
  triggerCancel: !0
1119
1150
  }), m == null || m(!1);
1120
1151
  },
@@ -1123,343 +1154,349 @@ const pn = (e) => {
1123
1154
  footer: null,
1124
1155
  transitionName: te(b || "", "zoom", e.transitionName),
1125
1156
  maskTransitionName: te(b || "", "fade", e.maskTransitionName),
1126
- mask: E,
1157
+ mask: $,
1127
1158
  maskClosable: H,
1128
1159
  style: O,
1129
1160
  styles: Object.assign({
1130
1161
  body: g,
1131
- mask: c
1132
- }, p),
1133
- width: N,
1134
- zIndex: F,
1135
- afterClose: n,
1162
+ mask: s
1163
+ }, y),
1164
+ width: P,
1165
+ zIndex: _,
1166
+ afterClose: o,
1136
1167
  keyboard: r,
1137
1168
  centered: u,
1138
1169
  getContainer: d,
1139
1170
  closable: x,
1140
1171
  closeIcon: C,
1141
- modalRender: $,
1142
- focusTriggerAfterClose: y
1143
- }, /* @__PURE__ */ l.createElement(Ye, Object.assign({}, e, {
1172
+ modalRender: E,
1173
+ focusTriggerAfterClose: p
1174
+ }, /* @__PURE__ */ l.createElement(an, Object.assign({}, e, {
1144
1175
  confirmPrefixCls: h
1145
1176
  })));
1146
- }, Je = (e) => {
1177
+ }, be = (e) => {
1147
1178
  const {
1148
- rootPrefixCls: t,
1149
- iconPrefixCls: o,
1150
- direction: n,
1179
+ rootPrefixCls: n,
1180
+ iconPrefixCls: t,
1181
+ direction: o,
1151
1182
  theme: a
1152
1183
  } = e;
1153
- return /* @__PURE__ */ l.createElement(Fe, {
1154
- prefixCls: t,
1155
- iconPrefixCls: o,
1156
- direction: n,
1184
+ return /* @__PURE__ */ l.createElement(Le, {
1185
+ prefixCls: n,
1186
+ iconPrefixCls: t,
1187
+ direction: o,
1157
1188
  theme: a
1158
- }, /* @__PURE__ */ l.createElement(pn, Object.assign({}, e)));
1159
- }, K = [];
1160
- let ke = "";
1161
- function et() {
1162
- return ke;
1189
+ }, /* @__PURE__ */ l.createElement(rn, Object.assign({}, e)));
1190
+ };
1191
+ process.env.NODE_ENV !== "production" && (rn.displayName = "ConfirmDialog", be.displayName = "ConfirmDialogWrapper");
1192
+ const K = [];
1193
+ let ln = "";
1194
+ function sn() {
1195
+ return ln;
1163
1196
  }
1164
- const hn = (e) => {
1165
- var t, o;
1197
+ const Ot = (e) => {
1198
+ var n, t;
1166
1199
  const {
1167
- prefixCls: n,
1200
+ prefixCls: o,
1168
1201
  getContainer: a,
1169
1202
  direction: r
1170
- } = e, u = Me(), d = Z(ne), c = et() || d.getPrefixCls(), s = n || `${c}-modal`;
1203
+ } = e, u = _e(), d = Y(oe), s = sn() || d.getPrefixCls(), c = o || `${s}-modal`;
1171
1204
  let i = a;
1172
- return i === !1 && (i = void 0), /* @__PURE__ */ v.createElement(Je, Object.assign({}, e, {
1173
- rootPrefixCls: c,
1174
- prefixCls: s,
1205
+ return i === !1 && (i = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && Ae(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ v.createElement(be, Object.assign({}, e, {
1206
+ rootPrefixCls: s,
1207
+ prefixCls: c,
1175
1208
  iconPrefixCls: d.iconPrefixCls,
1176
1209
  theme: d.theme,
1177
1210
  direction: r ?? d.direction,
1178
- locale: (o = (t = d.locale) === null || t === void 0 ? void 0 : t.Modal) !== null && o !== void 0 ? o : u,
1211
+ locale: (t = (n = d.locale) === null || n === void 0 ? void 0 : n.Modal) !== null && t !== void 0 ? t : u,
1179
1212
  getContainer: i
1180
1213
  }));
1181
1214
  };
1182
- function J(e) {
1183
- const t = St(), o = document.createDocumentFragment();
1184
- let n = Object.assign(Object.assign({}, e), {
1215
+ function k(e) {
1216
+ const n = jn();
1217
+ process.env.NODE_ENV !== "production" && !n.holderRender && Bn("Modal");
1218
+ const t = document.createDocumentFragment();
1219
+ let o = Object.assign(Object.assign({}, e), {
1185
1220
  close: d,
1186
1221
  open: !0
1187
1222
  }), a;
1188
1223
  function r() {
1189
- for (var s = arguments.length, i = new Array(s), f = 0; f < s; f++)
1224
+ for (var c = arguments.length, i = new Array(c), f = 0; f < c; f++)
1190
1225
  i[f] = arguments[f];
1191
1226
  const b = i.some((g) => g && g.triggerCancel);
1192
1227
  e.onCancel && b && e.onCancel.apply(e, [() => {
1193
- }].concat(G(i.slice(1))));
1228
+ }].concat(U(i.slice(1))));
1194
1229
  for (let g = 0; g < K.length; g++)
1195
1230
  if (K[g] === d) {
1196
1231
  K.splice(g, 1);
1197
1232
  break;
1198
1233
  }
1199
- Lt(o);
1234
+ Xn(t);
1200
1235
  }
1201
- function u(s) {
1236
+ function u(c) {
1202
1237
  clearTimeout(a), a = setTimeout(() => {
1203
- const i = t.getPrefixCls(void 0, et()), f = t.getIconPrefixCls(), b = t.getTheme(), g = /* @__PURE__ */ v.createElement(hn, Object.assign({}, s));
1204
- At(/* @__PURE__ */ v.createElement(Fe, {
1238
+ const i = n.getPrefixCls(void 0, sn()), f = n.getIconPrefixCls(), b = n.getTheme(), g = /* @__PURE__ */ v.createElement(Ot, Object.assign({}, c));
1239
+ Kn(/* @__PURE__ */ v.createElement(Le, {
1205
1240
  prefixCls: i,
1206
1241
  iconPrefixCls: f,
1207
1242
  theme: b
1208
- }, t.holderRender ? t.holderRender(g) : g), o);
1243
+ }, n.holderRender ? n.holderRender(g) : g), t);
1209
1244
  });
1210
1245
  }
1211
1246
  function d() {
1212
- for (var s = arguments.length, i = new Array(s), f = 0; f < s; f++)
1247
+ for (var c = arguments.length, i = new Array(c), f = 0; f < c; f++)
1213
1248
  i[f] = arguments[f];
1214
- n = Object.assign(Object.assign({}, n), {
1249
+ o = Object.assign(Object.assign({}, o), {
1215
1250
  open: !1,
1216
1251
  afterClose: () => {
1217
1252
  typeof e.afterClose == "function" && e.afterClose(), r.apply(this, i);
1218
1253
  }
1219
- }), n.visible && delete n.visible, u(n);
1254
+ }), o.visible && delete o.visible, u(o);
1220
1255
  }
1221
- function c(s) {
1222
- typeof s == "function" ? n = s(n) : n = Object.assign(Object.assign({}, n), s), u(n);
1256
+ function s(c) {
1257
+ typeof c == "function" ? o = c(o) : o = Object.assign(Object.assign({}, o), c), u(o);
1223
1258
  }
1224
- return u(n), K.push(d), {
1259
+ return u(o), K.push(d), {
1225
1260
  destroy: d,
1226
- update: c
1261
+ update: s
1227
1262
  };
1228
1263
  }
1229
- function tt(e) {
1264
+ function cn(e) {
1230
1265
  return Object.assign(Object.assign({}, e), {
1231
1266
  type: "warning"
1232
1267
  });
1233
1268
  }
1234
- function nt(e) {
1269
+ function dn(e) {
1235
1270
  return Object.assign(Object.assign({}, e), {
1236
1271
  type: "info"
1237
1272
  });
1238
1273
  }
1239
- function ot(e) {
1274
+ function un(e) {
1240
1275
  return Object.assign(Object.assign({}, e), {
1241
1276
  type: "success"
1242
1277
  });
1243
1278
  }
1244
- function at(e) {
1279
+ function fn(e) {
1245
1280
  return Object.assign(Object.assign({}, e), {
1246
1281
  type: "error"
1247
1282
  });
1248
1283
  }
1249
- function rt(e) {
1284
+ function mn(e) {
1250
1285
  return Object.assign(Object.assign({}, e), {
1251
1286
  type: "confirm"
1252
1287
  });
1253
1288
  }
1254
- function xn(e) {
1289
+ function Nt(e) {
1255
1290
  let {
1256
- rootPrefixCls: t
1291
+ rootPrefixCls: n
1257
1292
  } = e;
1258
- ke = t;
1293
+ process.env.NODE_ENV !== "production" && Ae(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), ln = n;
1259
1294
  }
1260
- var $n = function(e, t) {
1261
- var o = {};
1262
- for (var n in e)
1263
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1295
+ var St = function(e, n) {
1296
+ var t = {};
1297
+ for (var o in e)
1298
+ Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
1264
1299
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
1265
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1266
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1267
- return o;
1300
+ for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
1301
+ n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
1302
+ return t;
1268
1303
  };
1269
- const On = (e, t) => {
1270
- var o, {
1271
- afterClose: n,
1304
+ const wt = (e, n) => {
1305
+ var t, {
1306
+ afterClose: o,
1272
1307
  config: a
1273
- } = e, r = $n(e, ["afterClose", "config"]);
1274
- const [u, d] = l.useState(!0), [c, s] = l.useState(a), {
1308
+ } = e, r = St(e, ["afterClose", "config"]);
1309
+ const [u, d] = l.useState(!0), [s, c] = l.useState(a), {
1275
1310
  direction: i,
1276
1311
  getPrefixCls: f
1277
- } = l.useContext(ne), b = f("modal"), g = f(), x = () => {
1312
+ } = l.useContext(oe), b = f("modal"), g = f(), x = () => {
1278
1313
  var m;
1279
- n(), (m = c.afterClose) === null || m === void 0 || m.call(c);
1314
+ o(), (m = s.afterClose) === null || m === void 0 || m.call(s);
1280
1315
  }, C = function() {
1281
1316
  d(!1);
1282
- for (var m = arguments.length, p = new Array(m), h = 0; h < m; h++)
1283
- p[h] = arguments[h];
1284
- const N = p.some((O) => O && O.triggerCancel);
1285
- c.onCancel && N && c.onCancel.apply(c, [() => {
1286
- }].concat(G(p.slice(1))));
1317
+ for (var m = arguments.length, y = new Array(m), h = 0; h < m; h++)
1318
+ y[h] = arguments[h];
1319
+ const P = y.some((O) => O && O.triggerCancel);
1320
+ s.onCancel && P && s.onCancel.apply(s, [() => {
1321
+ }].concat(U(y.slice(1))));
1287
1322
  };
1288
- l.useImperativeHandle(t, () => ({
1323
+ l.useImperativeHandle(n, () => ({
1289
1324
  destroy: C,
1290
1325
  update: (m) => {
1291
- s((p) => Object.assign(Object.assign({}, p), m));
1326
+ c((y) => Object.assign(Object.assign({}, y), m));
1292
1327
  }
1293
1328
  }));
1294
- const $ = (o = c.okCancel) !== null && o !== void 0 ? o : c.type === "confirm", [y] = ue("Modal", Pt.Modal);
1295
- return /* @__PURE__ */ l.createElement(Je, Object.assign({
1329
+ const E = (t = s.okCancel) !== null && t !== void 0 ? t : s.type === "confirm", [p] = fe("Modal", zn.Modal);
1330
+ return /* @__PURE__ */ l.createElement(be, Object.assign({
1296
1331
  prefixCls: b,
1297
1332
  rootPrefixCls: g
1298
- }, c, {
1333
+ }, s, {
1299
1334
  close: C,
1300
1335
  open: u,
1301
1336
  afterClose: x,
1302
- okText: c.okText || ($ ? y == null ? void 0 : y.okText : y == null ? void 0 : y.justOkText),
1303
- direction: c.direction || i,
1304
- cancelText: c.cancelText || (y == null ? void 0 : y.cancelText)
1337
+ okText: s.okText || (E ? p == null ? void 0 : p.okText : p == null ? void 0 : p.justOkText),
1338
+ direction: s.direction || i,
1339
+ cancelText: s.cancelText || (p == null ? void 0 : p.cancelText)
1305
1340
  }, r));
1306
- }, En = /* @__PURE__ */ l.forwardRef(On);
1307
- let je = 0;
1308
- const Sn = /* @__PURE__ */ l.memo(/* @__PURE__ */ l.forwardRef((e, t) => {
1309
- const [o, n] = Zt();
1310
- return l.useImperativeHandle(t, () => ({
1311
- patchElement: n
1312
- }), []), /* @__PURE__ */ l.createElement(l.Fragment, null, o);
1341
+ }, Pt = /* @__PURE__ */ l.forwardRef(wt);
1342
+ let Fe = 0;
1343
+ const It = /* @__PURE__ */ l.memo(/* @__PURE__ */ l.forwardRef((e, n) => {
1344
+ const [t, o] = tt();
1345
+ return l.useImperativeHandle(n, () => ({
1346
+ patchElement: o
1347
+ }), []), /* @__PURE__ */ l.createElement(l.Fragment, null, t);
1313
1348
  }));
1314
- function Pn() {
1315
- const e = l.useRef(null), [t, o] = l.useState([]);
1349
+ function Tt() {
1350
+ const e = l.useRef(null), [n, t] = l.useState([]);
1316
1351
  l.useEffect(() => {
1317
- t.length && (G(t).forEach((u) => {
1352
+ n.length && (U(n).forEach((u) => {
1318
1353
  u();
1319
- }), o([]));
1320
- }, [t]);
1321
- const n = l.useCallback((r) => function(d) {
1322
- var c;
1323
- je += 1;
1324
- const s = /* @__PURE__ */ l.createRef();
1354
+ }), t([]));
1355
+ }, [n]);
1356
+ const o = l.useCallback((r) => function(d) {
1357
+ var s;
1358
+ Fe += 1;
1359
+ const c = /* @__PURE__ */ l.createRef();
1325
1360
  let i;
1326
- const f = new Promise(($) => {
1327
- i = $;
1361
+ const f = new Promise((E) => {
1362
+ i = E;
1328
1363
  });
1329
1364
  let b = !1, g;
1330
- const x = /* @__PURE__ */ l.createElement(En, {
1331
- key: `modal-${je}`,
1365
+ const x = /* @__PURE__ */ l.createElement(Pt, {
1366
+ key: `modal-${Fe}`,
1332
1367
  config: r(d),
1333
- ref: s,
1368
+ ref: c,
1334
1369
  afterClose: () => {
1335
1370
  g == null || g();
1336
1371
  },
1337
1372
  isSilent: () => b,
1338
- onConfirm: ($) => {
1339
- i($);
1373
+ onConfirm: (E) => {
1374
+ i(E);
1340
1375
  }
1341
1376
  });
1342
- return g = (c = e.current) === null || c === void 0 ? void 0 : c.patchElement(x), g && K.push(g), {
1377
+ return g = (s = e.current) === null || s === void 0 ? void 0 : s.patchElement(x), g && K.push(g), {
1343
1378
  destroy: () => {
1344
- function $() {
1345
- var y;
1346
- (y = s.current) === null || y === void 0 || y.destroy();
1379
+ function E() {
1380
+ var p;
1381
+ (p = c.current) === null || p === void 0 || p.destroy();
1347
1382
  }
1348
- s.current ? $() : o((y) => [].concat(G(y), [$]));
1383
+ c.current ? E() : t((p) => [].concat(U(p), [E]));
1349
1384
  },
1350
- update: ($) => {
1351
- function y() {
1385
+ update: (E) => {
1386
+ function p() {
1352
1387
  var m;
1353
- (m = s.current) === null || m === void 0 || m.update($);
1388
+ (m = c.current) === null || m === void 0 || m.update(E);
1354
1389
  }
1355
- s.current ? y() : o((m) => [].concat(G(m), [y]));
1390
+ c.current ? p() : t((m) => [].concat(U(m), [p]));
1356
1391
  },
1357
- then: ($) => (b = !0, f.then($))
1392
+ then: (E) => (b = !0, f.then(E))
1358
1393
  };
1359
1394
  }, []);
1360
1395
  return [l.useMemo(() => ({
1361
- info: n(nt),
1362
- success: n(ot),
1363
- error: n(at),
1364
- warning: n(tt),
1365
- confirm: n(rt)
1366
- }), []), /* @__PURE__ */ l.createElement(Sn, {
1396
+ info: o(dn),
1397
+ success: o(un),
1398
+ error: o(fn),
1399
+ warning: o(cn),
1400
+ confirm: o(mn)
1401
+ }), []), /* @__PURE__ */ l.createElement(It, {
1367
1402
  key: "modal-holder",
1368
1403
  ref: e
1369
1404
  })];
1370
1405
  }
1371
- var wn = function(e, t) {
1372
- var o = {};
1373
- for (var n in e)
1374
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
1406
+ var Rt = function(e, n) {
1407
+ var t = {};
1408
+ for (var o in e)
1409
+ Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
1375
1410
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
1376
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1377
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (o[n[a]] = e[n[a]]);
1378
- return o;
1411
+ for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
1412
+ n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
1413
+ return t;
1379
1414
  };
1380
- const Nn = (e) => {
1415
+ const Mt = (e) => {
1381
1416
  const {
1382
- prefixCls: t,
1383
- className: o,
1384
- closeIcon: n,
1417
+ prefixCls: n,
1418
+ className: t,
1419
+ closeIcon: o,
1385
1420
  closable: a,
1386
1421
  type: r,
1387
1422
  title: u,
1388
1423
  children: d,
1389
- footer: c
1390
- } = e, s = wn(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
1424
+ footer: s
1425
+ } = e, c = Rt(e, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children", "footer"]), {
1391
1426
  getPrefixCls: i
1392
- } = l.useContext(ne), f = i(), b = t || i("modal"), g = He(f), [x, C, $] = Qe(b, g), y = `${b}-confirm`;
1427
+ } = l.useContext(oe), f = i(), b = n || i("modal"), g = Ve(f), [x, C, E] = tn(b, g), p = `${b}-confirm`;
1393
1428
  let m = {};
1394
1429
  return r ? m = {
1395
1430
  closable: a ?? !1,
1396
1431
  title: "",
1397
1432
  footer: "",
1398
- children: /* @__PURE__ */ l.createElement(Ye, Object.assign({}, e, {
1433
+ children: /* @__PURE__ */ l.createElement(an, Object.assign({}, e, {
1399
1434
  prefixCls: b,
1400
- confirmPrefixCls: y,
1435
+ confirmPrefixCls: p,
1401
1436
  rootPrefixCls: f,
1402
1437
  content: d
1403
1438
  }))
1404
1439
  } : m = {
1405
1440
  closable: a ?? !0,
1406
1441
  title: u,
1407
- footer: c !== null && /* @__PURE__ */ l.createElement(Ue, Object.assign({}, e)),
1442
+ footer: s !== null && /* @__PURE__ */ l.createElement(ke, Object.assign({}, e)),
1408
1443
  children: d
1409
- }, x(/* @__PURE__ */ l.createElement(_e, Object.assign({
1444
+ }, x(/* @__PURE__ */ l.createElement(ve, Object.assign({
1410
1445
  prefixCls: b,
1411
- className: w(C, `${b}-pure-panel`, r && y, r && `${y}-${r}`, o, $, g)
1412
- }, s, {
1413
- closeIcon: Ge(b, n),
1446
+ className: w(C, `${b}-pure-panel`, r && p, r && `${p}-${r}`, t, E, g)
1447
+ }, c, {
1448
+ closeIcon: Je(b, o),
1414
1449
  closable: a
1415
1450
  }, m)));
1416
- }, In = Dt(Nn);
1417
- function lt(e) {
1418
- return J(tt(e));
1451
+ }, jt = Qn(Mt);
1452
+ function gn(e) {
1453
+ return k(cn(e));
1419
1454
  }
1420
- const z = Ze;
1421
- z.useModal = Pn;
1422
- z.info = function(t) {
1423
- return J(nt(t));
1455
+ const B = on;
1456
+ B.useModal = Tt;
1457
+ B.info = function(n) {
1458
+ return k(dn(n));
1424
1459
  };
1425
- z.success = function(t) {
1426
- return J(ot(t));
1460
+ B.success = function(n) {
1461
+ return k(un(n));
1427
1462
  };
1428
- z.error = function(t) {
1429
- return J(at(t));
1463
+ B.error = function(n) {
1464
+ return k(fn(n));
1430
1465
  };
1431
- z.warning = lt;
1432
- z.warn = lt;
1433
- z.confirm = function(t) {
1434
- return J(rt(t));
1466
+ B.warning = gn;
1467
+ B.warn = gn;
1468
+ B.confirm = function(n) {
1469
+ return k(mn(n));
1435
1470
  };
1436
- z.destroyAll = function() {
1471
+ B.destroyAll = function() {
1437
1472
  for (; K.length; ) {
1438
- const t = K.pop();
1439
- t && t();
1473
+ const n = K.pop();
1474
+ n && n();
1440
1475
  }
1441
1476
  };
1442
- z.config = xn;
1443
- z._InternalPanelDoNotUseOrYouWillBeFired = In;
1444
- function Ln(e) {
1445
- const t = {
1477
+ B.config = Nt;
1478
+ B._InternalPanelDoNotUseOrYouWillBeFired = jt;
1479
+ process.env.NODE_ENV !== "production" && (B.displayName = "Modal");
1480
+ function Vt(e) {
1481
+ const n = {
1446
1482
  open: e.open === void 0 ? !0 : e.open,
1447
1483
  onClose: e.onClose || (() => {
1448
- })
1484
+ }),
1485
+ collapse: e.collapse === void 0 ? !1 : e.collapse
1449
1486
  };
1450
- return /* @__PURE__ */ ve(
1451
- z,
1487
+ return /* @__PURE__ */ ye(
1488
+ B,
1452
1489
  {
1453
1490
  title: "Notification Preferences",
1454
- open: t.open,
1491
+ open: n.open,
1455
1492
  onCancel: () => {
1456
- t.onClose();
1493
+ n.onClose();
1457
1494
  },
1458
1495
  footer: null,
1459
- children: /* @__PURE__ */ ve(ut, {})
1496
+ children: /* @__PURE__ */ ye(yn, {})
1460
1497
  }
1461
1498
  );
1462
1499
  }
1463
1500
  export {
1464
- Ln as NotificationPreferencesPopup
1501
+ Vt as NotificationPreferencesPopup
1465
1502
  };