@yuku123/z-cognition-component 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist-lib/ApartmentOutlined-M6qSurnE.js +12 -0
  2. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
  3. package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
  4. package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
  5. package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
  6. package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
  7. package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
  8. package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
  9. package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
  10. package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
  11. package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
  12. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
  13. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
  14. package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
  15. package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
  16. package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
  17. package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
  18. package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
  19. package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
  20. package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
  21. package/dist-lib/Skeleton-DXcERb5r.js +557 -0
  22. package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
  23. package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
  24. package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
  25. package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
  26. package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
  27. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
  28. package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
  29. package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
  30. package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
  31. package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
  32. package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
  33. package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
  34. package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
  35. package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
  36. package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
  37. package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
  38. package/dist-lib/callSuper-DZEfdkXG.js +7 -0
  39. package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
  40. package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
  41. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
  42. package/dist-lib/colors-sdAcAcU3.js +24 -0
  43. package/dist-lib/context-Buz0ggsK.js +710 -0
  44. package/dist-lib/context-DpmyNOn3.js +21 -0
  45. package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
  46. package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
  47. package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
  48. package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
  49. package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
  50. package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
  51. package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
  52. package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
  53. package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
  54. package/dist-lib/embed-CR8XVkMy.js +31148 -0
  55. package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
  56. package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
  57. package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
  58. package/dist-lib/index-9aQ4BzIK.js +500 -0
  59. package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
  60. package/dist-lib/index-B57Fj7Y0.js +1169 -0
  61. package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
  62. package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
  63. package/dist-lib/index-Bc-Vin3j.js +256 -0
  64. package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
  65. package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
  66. package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
  67. package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
  68. package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
  69. package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
  70. package/dist-lib/index-Cfu1W1H6.js +535 -0
  71. package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
  72. package/dist-lib/index-CrMcNEAZ.js +9656 -0
  73. package/dist-lib/index-Cy9i4Kx7.js +699 -0
  74. package/dist-lib/index-CyKWCYMK.js +218 -0
  75. package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
  76. package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
  77. package/dist-lib/index-DBtGE89a.js +168 -0
  78. package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
  79. package/dist-lib/index-DjFPRXl5.js +1484 -0
  80. package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
  81. package/dist-lib/index-DvWHYX81.js +450 -0
  82. package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
  83. package/dist-lib/index-Vu6sPBci.js +1884 -0
  84. package/dist-lib/index-bOY1cBol.js +4890 -0
  85. package/dist-lib/index-nQSVLWfW.js +356 -0
  86. package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
  87. package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
  88. package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
  89. package/dist-lib/index.js +3 -1
  90. package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
  91. package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
  92. package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
  93. package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
  94. package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
  95. package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
  96. package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
  97. package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
  98. package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
  99. package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
  100. package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
  101. package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
  102. package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
  103. package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
  104. package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
  105. package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
  106. package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
  107. package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
  108. package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
  109. package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
  110. package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
  111. package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
  112. package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
  113. package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
  114. package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
  115. package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
  116. package/dist-lib/pages-CsexFuEz.js +73 -0
  117. package/dist-lib/pages.js +3 -3
  118. package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
  119. package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
  120. package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
  121. package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
  122. package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
  123. package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
  124. package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
  125. package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
  126. package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
  127. package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
  128. package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
  129. package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
  130. package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
  131. package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
  132. package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
  133. package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
  134. package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
  135. package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
  136. package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
  137. package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
  138. package/dist-lib/useClosable-BY7FgWKy.js +59 -0
  139. package/dist-lib/useForm-Byp1LopG.js +145 -0
  140. package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
  141. package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
  142. package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
  143. package/package.json +2 -3
  144. package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
  145. package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
  146. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
  147. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
  148. package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
  149. package/dist-lib/Skeleton-CxFsInYI.js +0 -671
  150. package/dist-lib/Table-Civ838nE.js +0 -20514
  151. package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
  152. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
  153. package/dist-lib/callSuper-CwIeyYoc.js +0 -7
  154. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
  155. package/dist-lib/context-T27uno74.js +0 -54
  156. package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
  157. package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
  158. package/dist-lib/index-0TvzCTD7.js +0 -2336
  159. package/dist-lib/index-4tbtbcAt.js +0 -550
  160. package/dist-lib/index-B1wh6i1C.js +0 -1308
  161. package/dist-lib/index-BVgdmf6r.js +0 -2487
  162. package/dist-lib/index-CSnvcFg-.js +0 -543
  163. package/dist-lib/index-D35Ry0PG.js +0 -1162
  164. package/dist-lib/index-DC57_dnh.js +0 -604
  165. package/dist-lib/index-DQ16Zb7x.js +0 -546
  166. package/dist-lib/index-DRcTwC17.js +0 -418
  167. package/dist-lib/index-Dd9pPAT3.js +0 -2192
  168. package/dist-lib/index-DxzorPvG.js +0 -13960
  169. package/dist-lib/index-If4xc1-H.js +0 -559
  170. package/dist-lib/index-R71k3nB_.js +0 -710
  171. package/dist-lib/index-mUlorJxp.js +0 -3279
  172. package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
  173. package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
  174. package/dist-lib/pages-CticGC6S.js +0 -512
  175. package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
@@ -0,0 +1,1484 @@
1
+ import { _ as V, K as He, n as ln, B as pe, o as Le, q as sn, p as Fe, s as We, t as cn, i as Oe, P as dn, v as ye, D as un, w as Ae, R as Ve, g as be, m as Ge, u as O, r as fn, a as mn, c as xe, d as he, f as gn, x as vn, y as Cn, z as pn, A as yn, E as ce, F as bn, G as xn, h as qe, e as hn, C as $n, b as Sn, H as On, I as En, J as wn, L as Xe, M as Nn } from "./index-CrMcNEAZ.js";
2
+ import * as r from "react";
3
+ import h, { useContext as ae, useRef as A, useMemo as Pn, useEffect as Ee } from "react";
4
+ import { R as In, b as Rn, a as Mn } from "./context-Buz0ggsK.js";
5
+ import { b as R, c as M, a as we, _ as G, i as $e, w as Ne, v as Pe, j as Tn } from "./SearchOutlined-puH6bCY6.js";
6
+ import { S as jn } from "./Skeleton-DXcERb5r.js";
7
+ import { u as Bn } from "./context-DpmyNOn3.js";
8
+ import { i as _n, a as Dn } from "./index-bOY1cBol.js";
9
+ import { u as zn, p as Ie } from "./useClosable-BY7FgWKy.js";
10
+ const Hn = () => {
11
+ const [e, n] = r.useState([]), o = r.useCallback((t) => (n((a) => [].concat(V(a), [t])), () => {
12
+ n((a) => a.filter((s) => s !== t));
13
+ }), []);
14
+ return [e, o];
15
+ }, Ln = new He("antFadeIn", {
16
+ "0%": {
17
+ opacity: 0
18
+ },
19
+ "100%": {
20
+ opacity: 1
21
+ }
22
+ }), Fn = new He("antFadeOut", {
23
+ "0%": {
24
+ opacity: 1
25
+ },
26
+ "100%": {
27
+ opacity: 0
28
+ }
29
+ }), Wn = (e, n = !1) => {
30
+ const {
31
+ antCls: o
32
+ } = e, t = `${o}-fade`, a = n ? "&" : "";
33
+ return [_n(t, Ln, Fn, e.motionDurationMid, n), {
34
+ [`
35
+ ${a}${t}-enter,
36
+ ${a}${t}-appear
37
+ `]: {
38
+ opacity: 0,
39
+ animationTimingFunction: "linear"
40
+ },
41
+ [`${a}${t}-leave`]: {
42
+ animationTimingFunction: "linear"
43
+ }
44
+ }];
45
+ }, ge = (e) => typeof (e == null ? void 0 : e.then) == "function", Ue = (e) => {
46
+ const {
47
+ type: n,
48
+ children: o,
49
+ prefixCls: t,
50
+ buttonProps: a,
51
+ close: s,
52
+ autoFocus: i,
53
+ emitEvent: d,
54
+ isSilent: c,
55
+ quitOnNullishReturnValue: f,
56
+ actionFn: l
57
+ } = e, u = r.useRef(!1), p = r.useRef(null), [v, m] = ln(!1), y = (...g) => {
58
+ s == null || s.apply(void 0, g);
59
+ };
60
+ r.useEffect(() => {
61
+ let g = null;
62
+ return i && (g = setTimeout(() => {
63
+ var C;
64
+ (C = p.current) === null || C === void 0 || C.focus({
65
+ preventScroll: !0
66
+ });
67
+ })), () => {
68
+ g && clearTimeout(g);
69
+ };
70
+ }, [i]);
71
+ const x = (g) => {
72
+ ge(g) && (m(!0), g.then((...C) => {
73
+ m(!1, !0), y.apply(void 0, C), u.current = !1;
74
+ }, (C) => {
75
+ if (m(!1, !0), u.current = !1, !(c != null && c()))
76
+ return Promise.reject(C);
77
+ }));
78
+ }, b = (g) => {
79
+ if (u.current)
80
+ return;
81
+ if (u.current = !0, !l) {
82
+ y();
83
+ return;
84
+ }
85
+ let C;
86
+ if (d) {
87
+ if (C = l(g), f && !ge(C)) {
88
+ u.current = !1, y(g);
89
+ return;
90
+ }
91
+ } else if (l.length)
92
+ C = l(s), u.current = !1;
93
+ else if (C = l(), !ge(C)) {
94
+ y();
95
+ return;
96
+ }
97
+ x(C);
98
+ };
99
+ return /* @__PURE__ */ r.createElement(pe, Object.assign({}, Le(n), {
100
+ onClick: b,
101
+ loading: v,
102
+ prefixCls: t
103
+ }, a, {
104
+ ref: p
105
+ }), o);
106
+ }, re = /* @__PURE__ */ h.createContext({}), {
107
+ Provider: Ke
108
+ } = re, Re = () => {
109
+ const {
110
+ autoFocusButton: e,
111
+ cancelButtonProps: n,
112
+ cancelTextLocale: o,
113
+ isSilent: t,
114
+ mergedOkCancel: a,
115
+ rootPrefixCls: s,
116
+ close: i,
117
+ onCancel: d,
118
+ onConfirm: c
119
+ } = ae(re);
120
+ return a ? /* @__PURE__ */ h.createElement(Ue, {
121
+ isSilent: t,
122
+ actionFn: d,
123
+ close: (...f) => {
124
+ i == null || i.apply(void 0, f), c == null || c(!1);
125
+ },
126
+ autoFocus: e === "cancel",
127
+ buttonProps: n,
128
+ prefixCls: `${s}-btn`
129
+ }, o) : null;
130
+ }, Me = () => {
131
+ const {
132
+ autoFocusButton: e,
133
+ close: n,
134
+ isSilent: o,
135
+ okButtonProps: t,
136
+ rootPrefixCls: a,
137
+ okTextLocale: s,
138
+ okType: i,
139
+ onConfirm: d,
140
+ onOk: c
141
+ } = ae(re);
142
+ return /* @__PURE__ */ h.createElement(Ue, {
143
+ isSilent: o,
144
+ type: i || "primary",
145
+ actionFn: c,
146
+ close: (...f) => {
147
+ n == null || n.apply(void 0, f), d == null || d(!0);
148
+ },
149
+ autoFocus: e === "ok",
150
+ buttonProps: t,
151
+ prefixCls: `${a}-btn`
152
+ }, s);
153
+ };
154
+ var ke = /* @__PURE__ */ r.createContext({});
155
+ function Te(e, n, o) {
156
+ var t = n;
157
+ return !t && o && (t = "".concat(e, "-").concat(o)), t;
158
+ }
159
+ function je(e, n) {
160
+ var o = e["page".concat(n ? "Y" : "X", "Offset")], t = "scroll".concat(n ? "Top" : "Left");
161
+ if (typeof o != "number") {
162
+ var a = e.document;
163
+ o = a.documentElement[t], typeof o != "number" && (o = a.body[t]);
164
+ }
165
+ return o;
166
+ }
167
+ function An(e) {
168
+ var n = e.getBoundingClientRect(), o = {
169
+ left: n.left,
170
+ top: n.top
171
+ }, t = e.ownerDocument, a = t.defaultView || t.parentWindow;
172
+ return o.left += je(a), o.top += je(a, !0), o;
173
+ }
174
+ const Vn = /* @__PURE__ */ r.memo(function(e) {
175
+ var n = e.children;
176
+ return n;
177
+ }, function(e, n) {
178
+ var o = n.shouldUpdate;
179
+ return !o;
180
+ });
181
+ var Gn = {
182
+ width: 0,
183
+ height: 0,
184
+ overflow: "hidden",
185
+ outline: "none"
186
+ }, qn = {
187
+ outline: "none"
188
+ }, Ze = /* @__PURE__ */ h.forwardRef(function(e, n) {
189
+ var o = e.prefixCls, t = e.className, a = e.style, s = e.title, i = e.ariaId, d = e.footer, c = e.closable, f = e.closeIcon, l = e.onClose, u = e.children, p = e.bodyStyle, v = e.bodyProps, m = e.modalRender, y = e.onMouseDown, x = e.onMouseUp, b = e.holderRef, g = e.visible, C = e.forceRender, E = e.width, P = e.height, $ = e.classNames, N = e.styles, Q = h.useContext(ke), D = Q.panel, Y = sn(b, D), z = A(), H = A();
190
+ h.useImperativeHandle(n, function() {
191
+ return {
192
+ focus: function() {
193
+ var B;
194
+ (B = z.current) === null || B === void 0 || B.focus({
195
+ preventScroll: !0
196
+ });
197
+ },
198
+ changeActive: function(B) {
199
+ var J = document, K = J.activeElement;
200
+ B && K === H.current ? z.current.focus({
201
+ preventScroll: !0
202
+ }) : !B && K === z.current && H.current.focus({
203
+ preventScroll: !0
204
+ });
205
+ }
206
+ };
207
+ });
208
+ var q = {};
209
+ E !== void 0 && (q.width = E), P !== void 0 && (q.height = P);
210
+ var S = d ? /* @__PURE__ */ h.createElement("div", {
211
+ className: M("".concat(o, "-footer"), $ == null ? void 0 : $.footer),
212
+ style: R({}, N == null ? void 0 : N.footer)
213
+ }, d) : null, j = s ? /* @__PURE__ */ h.createElement("div", {
214
+ className: M("".concat(o, "-header"), $ == null ? void 0 : $.header),
215
+ style: R({}, N == null ? void 0 : N.header)
216
+ }, /* @__PURE__ */ h.createElement("div", {
217
+ className: "".concat(o, "-title"),
218
+ id: i
219
+ }, s)) : null, _ = Pn(function() {
220
+ return we(c) === "object" && c !== null ? c : c ? {
221
+ closeIcon: f ?? /* @__PURE__ */ h.createElement("span", {
222
+ className: "".concat(o, "-close-x")
223
+ })
224
+ } : {};
225
+ }, [c, f, o]), I = Fe(_, !0), L = we(c) === "object" && c.disabled, U = c ? /* @__PURE__ */ h.createElement("button", G({
226
+ type: "button",
227
+ onClick: l,
228
+ "aria-label": "Close"
229
+ }, I, {
230
+ className: "".concat(o, "-close"),
231
+ disabled: L
232
+ }), _.closeIcon) : null, X = /* @__PURE__ */ h.createElement("div", {
233
+ className: M("".concat(o, "-content"), $ == null ? void 0 : $.content),
234
+ style: N == null ? void 0 : N.content
235
+ }, U, j, /* @__PURE__ */ h.createElement("div", G({
236
+ className: M("".concat(o, "-body"), $ == null ? void 0 : $.body),
237
+ style: R(R({}, p), N == null ? void 0 : N.body)
238
+ }, v), u), S);
239
+ return /* @__PURE__ */ h.createElement("div", {
240
+ key: "dialog-element",
241
+ role: "dialog",
242
+ "aria-labelledby": s ? i : null,
243
+ "aria-modal": "true",
244
+ ref: Y,
245
+ style: R(R({}, a), q),
246
+ className: M(o, t),
247
+ onMouseDown: y,
248
+ onMouseUp: x
249
+ }, /* @__PURE__ */ h.createElement("div", {
250
+ ref: z,
251
+ tabIndex: 0,
252
+ style: qn
253
+ }, /* @__PURE__ */ h.createElement(Vn, {
254
+ shouldUpdate: g || C
255
+ }, m ? m(X) : X)), /* @__PURE__ */ h.createElement("div", {
256
+ tabIndex: 0,
257
+ ref: H,
258
+ style: Gn
259
+ }));
260
+ });
261
+ process.env.NODE_ENV !== "production" && (Ze.displayName = "Panel");
262
+ var Qe = /* @__PURE__ */ r.forwardRef(function(e, n) {
263
+ var o = e.prefixCls, t = e.title, a = e.style, s = e.className, i = e.visible, d = e.forceRender, c = e.destroyOnClose, f = e.motionName, l = e.ariaId, u = e.onVisibleChanged, p = e.mousePosition, v = A(), m = r.useState(), y = $e(m, 2), x = y[0], b = y[1], g = {};
264
+ x && (g.transformOrigin = x);
265
+ function C() {
266
+ var E = An(v.current);
267
+ b(p && (p.x || p.y) ? "".concat(p.x - E.left, "px ").concat(p.y - E.top, "px") : "");
268
+ }
269
+ return /* @__PURE__ */ r.createElement(We, {
270
+ visible: i,
271
+ onVisibleChanged: u,
272
+ onAppearPrepare: C,
273
+ onEnterPrepare: C,
274
+ forceRender: d,
275
+ motionName: f,
276
+ removeOnLeave: c,
277
+ ref: v
278
+ }, function(E, P) {
279
+ var $ = E.className, N = E.style;
280
+ return /* @__PURE__ */ r.createElement(Ze, G({}, e, {
281
+ ref: n,
282
+ title: t,
283
+ ariaId: l,
284
+ prefixCls: o,
285
+ holderRef: P,
286
+ style: R(R(R({}, N), a), g),
287
+ className: M(s, $)
288
+ }));
289
+ });
290
+ });
291
+ Qe.displayName = "Content";
292
+ var Xn = function(n) {
293
+ var o = n.prefixCls, t = n.style, a = n.visible, s = n.maskProps, i = n.motionName, d = n.className;
294
+ return /* @__PURE__ */ r.createElement(We, {
295
+ key: "mask",
296
+ visible: a,
297
+ motionName: i,
298
+ leavedClassName: "".concat(o, "-mask-hidden")
299
+ }, function(c, f) {
300
+ var l = c.className, u = c.style;
301
+ return /* @__PURE__ */ r.createElement("div", G({
302
+ ref: f,
303
+ style: R(R({}, u), t),
304
+ className: M("".concat(o, "-mask"), l, d)
305
+ }, s));
306
+ });
307
+ }, Un = function(n) {
308
+ var o = n.prefixCls, t = o === void 0 ? "rc-dialog" : o, a = n.zIndex, s = n.visible, i = s === void 0 ? !1 : s, d = n.keyboard, c = d === void 0 ? !0 : d, f = n.focusTriggerAfterClose, l = f === void 0 ? !0 : f, u = n.wrapStyle, p = n.wrapClassName, v = n.wrapProps, m = n.onClose, y = n.afterOpenChange, x = n.afterClose, b = n.transitionName, g = n.animation, C = n.closable, E = C === void 0 ? !0 : C, P = n.mask, $ = P === void 0 ? !0 : P, N = n.maskTransitionName, Q = n.maskAnimation, D = n.maskClosable, Y = D === void 0 ? !0 : D, z = n.maskStyle, H = n.maskProps, q = n.rootClassName, S = n.classNames, j = n.styles;
309
+ process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(w) {
310
+ Ne(!(w in n), "".concat(w, " is deprecated, please use styles instead."));
311
+ }), "wrapClassName" in n && Ne(!1, "wrapClassName is deprecated, please use classNames instead."));
312
+ var _ = A(), I = A(), L = A(), U = r.useState(i), X = $e(U, 2), F = X[0], B = X[1], J = cn();
313
+ function K() {
314
+ Pe(I.current, document.activeElement) || (_.current = document.activeElement);
315
+ }
316
+ function ie() {
317
+ if (!Pe(I.current, document.activeElement)) {
318
+ var w;
319
+ (w = L.current) === null || w === void 0 || w.focus();
320
+ }
321
+ }
322
+ function le(w) {
323
+ if (w)
324
+ ie();
325
+ else {
326
+ if (B(!1), $ && _.current && l) {
327
+ try {
328
+ _.current.focus({
329
+ preventScroll: !0
330
+ });
331
+ } catch {
332
+ }
333
+ _.current = null;
334
+ }
335
+ F && (x == null || x());
336
+ }
337
+ y == null || y(w);
338
+ }
339
+ function ee(w) {
340
+ m == null || m(w);
341
+ }
342
+ var k = A(!1), ne = A(), de = function() {
343
+ clearTimeout(ne.current), k.current = !0;
344
+ }, ue = function() {
345
+ ne.current = setTimeout(function() {
346
+ k.current = !1;
347
+ });
348
+ }, se = null;
349
+ Y && (se = function(W) {
350
+ k.current ? k.current = !1 : I.current === W.target && ee(W);
351
+ });
352
+ function fe(w) {
353
+ if (c && w.keyCode === Oe.ESC) {
354
+ w.stopPropagation(), ee(w);
355
+ return;
356
+ }
357
+ i && w.keyCode === Oe.TAB && L.current.changeActive(!w.shiftKey);
358
+ }
359
+ Ee(function() {
360
+ i && (B(!0), K());
361
+ }, [i]), Ee(function() {
362
+ return function() {
363
+ clearTimeout(ne.current);
364
+ };
365
+ }, []);
366
+ var me = R(R(R({
367
+ zIndex: a
368
+ }, u), j == null ? void 0 : j.wrapper), {}, {
369
+ display: F ? null : "none"
370
+ });
371
+ return /* @__PURE__ */ r.createElement("div", G({
372
+ className: M("".concat(t, "-root"), q)
373
+ }, Fe(n, {
374
+ data: !0
375
+ })), /* @__PURE__ */ r.createElement(Xn, {
376
+ prefixCls: t,
377
+ visible: $ && i,
378
+ motionName: Te(t, N, Q),
379
+ style: R(R({
380
+ zIndex: a
381
+ }, z), j == null ? void 0 : j.mask),
382
+ maskProps: H,
383
+ className: S == null ? void 0 : S.mask
384
+ }), /* @__PURE__ */ r.createElement("div", G({
385
+ tabIndex: -1,
386
+ onKeyDown: fe,
387
+ className: M("".concat(t, "-wrap"), p, S == null ? void 0 : S.wrapper),
388
+ ref: I,
389
+ onClick: se,
390
+ style: me
391
+ }, v), /* @__PURE__ */ r.createElement(Qe, G({}, n, {
392
+ onMouseDown: de,
393
+ onMouseUp: ue,
394
+ ref: L,
395
+ closable: E,
396
+ ariaId: J,
397
+ prefixCls: t,
398
+ visible: i && F,
399
+ onClose: ee,
400
+ onVisibleChanged: le,
401
+ motionName: Te(t, b, g)
402
+ }))));
403
+ }, Ye = function(n) {
404
+ var o = n.visible, t = n.getContainer, a = n.forceRender, s = n.destroyOnClose, i = s === void 0 ? !1 : s, d = n.afterClose, c = n.panelRef, f = r.useState(o), l = $e(f, 2), u = l[0], p = l[1], v = r.useMemo(function() {
405
+ return {
406
+ panel: c
407
+ };
408
+ }, [c]);
409
+ return r.useEffect(function() {
410
+ o && p(!0);
411
+ }, [o]), !a && i && !u ? null : /* @__PURE__ */ r.createElement(ke.Provider, {
412
+ value: v
413
+ }, /* @__PURE__ */ r.createElement(dn, {
414
+ open: o || a || u,
415
+ autoDestroy: !1,
416
+ getContainer: t,
417
+ autoLock: o || u
418
+ }, /* @__PURE__ */ r.createElement(Un, G({}, n, {
419
+ destroyOnClose: i,
420
+ afterClose: function() {
421
+ d == null || d(), p(!1);
422
+ }
423
+ }))));
424
+ };
425
+ Ye.displayName = "Dialog";
426
+ const Kn = () => Tn() && window.document.documentElement, Be = () => {
427
+ const {
428
+ cancelButtonProps: e,
429
+ cancelTextLocale: n,
430
+ onCancel: o
431
+ } = ae(re);
432
+ return /* @__PURE__ */ h.createElement(pe, Object.assign({
433
+ onClick: o
434
+ }, e), n);
435
+ }, _e = () => {
436
+ const {
437
+ confirmLoading: e,
438
+ okButtonProps: n,
439
+ okType: o,
440
+ okTextLocale: t,
441
+ onOk: a
442
+ } = ae(re);
443
+ return /* @__PURE__ */ h.createElement(pe, Object.assign({}, Le(o), {
444
+ loading: e,
445
+ onClick: a
446
+ }, n), t);
447
+ };
448
+ function kn(e, n) {
449
+ return /* @__PURE__ */ h.createElement("span", {
450
+ className: `${e}-close-x`
451
+ }, n || /* @__PURE__ */ h.createElement(Ve, {
452
+ className: `${e}-close-icon`
453
+ }));
454
+ }
455
+ const Zn = (e) => {
456
+ const {
457
+ okText: n,
458
+ okType: o = "primary",
459
+ cancelText: t,
460
+ confirmLoading: a,
461
+ onOk: s,
462
+ onCancel: i,
463
+ okButtonProps: d,
464
+ cancelButtonProps: c,
465
+ footer: f
466
+ } = e, [l] = ye("Modal", Ae()), u = n || (l == null ? void 0 : l.okText), p = t || (l == null ? void 0 : l.cancelText), v = h.useMemo(() => ({
467
+ confirmLoading: a,
468
+ okButtonProps: d,
469
+ cancelButtonProps: c,
470
+ okTextLocale: u,
471
+ cancelTextLocale: p,
472
+ okType: o,
473
+ onOk: s,
474
+ onCancel: i
475
+ }), [a, d, c, u, p, o, s, i]);
476
+ let m;
477
+ return typeof f == "function" || typeof f > "u" ? (m = /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(Be, null), /* @__PURE__ */ h.createElement(_e, null)), typeof f == "function" && (m = f(m, {
478
+ OkBtn: _e,
479
+ CancelBtn: Be
480
+ })), m = /* @__PURE__ */ h.createElement(Ke, {
481
+ value: v
482
+ }, m)) : m = f, /* @__PURE__ */ h.createElement(un, {
483
+ disabled: !1
484
+ }, m);
485
+ }, Qn = (e) => {
486
+ const {
487
+ componentCls: n
488
+ } = e;
489
+ return {
490
+ // Grid system
491
+ [n]: {
492
+ display: "flex",
493
+ flexFlow: "row wrap",
494
+ minWidth: 0,
495
+ "&::before, &::after": {
496
+ display: "flex"
497
+ },
498
+ "&-no-wrap": {
499
+ flexWrap: "nowrap"
500
+ },
501
+ // The origin of the X-axis
502
+ "&-start": {
503
+ justifyContent: "flex-start"
504
+ },
505
+ // The center of the X-axis
506
+ "&-center": {
507
+ justifyContent: "center"
508
+ },
509
+ // The opposite of the X-axis
510
+ "&-end": {
511
+ justifyContent: "flex-end"
512
+ },
513
+ "&-space-between": {
514
+ justifyContent: "space-between"
515
+ },
516
+ "&-space-around": {
517
+ justifyContent: "space-around"
518
+ },
519
+ "&-space-evenly": {
520
+ justifyContent: "space-evenly"
521
+ },
522
+ // Align at the top
523
+ "&-top": {
524
+ alignItems: "flex-start"
525
+ },
526
+ // Align at the center
527
+ "&-middle": {
528
+ alignItems: "center"
529
+ },
530
+ "&-bottom": {
531
+ alignItems: "flex-end"
532
+ }
533
+ }
534
+ };
535
+ }, Yn = (e) => {
536
+ const {
537
+ componentCls: n
538
+ } = e;
539
+ return {
540
+ // Grid system
541
+ [n]: {
542
+ position: "relative",
543
+ maxWidth: "100%",
544
+ // Prevent columns from collapsing when empty
545
+ minHeight: 1
546
+ }
547
+ };
548
+ }, Jn = (e, n) => {
549
+ const {
550
+ prefixCls: o,
551
+ componentCls: t,
552
+ gridColumns: a
553
+ } = e, s = {};
554
+ for (let i = a; i >= 0; i--)
555
+ i === 0 ? (s[`${t}${n}-${i}`] = {
556
+ display: "none"
557
+ }, s[`${t}-push-${i}`] = {
558
+ insetInlineStart: "auto"
559
+ }, s[`${t}-pull-${i}`] = {
560
+ insetInlineEnd: "auto"
561
+ }, s[`${t}${n}-push-${i}`] = {
562
+ insetInlineStart: "auto"
563
+ }, s[`${t}${n}-pull-${i}`] = {
564
+ insetInlineEnd: "auto"
565
+ }, s[`${t}${n}-offset-${i}`] = {
566
+ marginInlineStart: 0
567
+ }, s[`${t}${n}-order-${i}`] = {
568
+ order: 0
569
+ }) : (s[`${t}${n}-${i}`] = [
570
+ // https://github.com/ant-design/ant-design/issues/44456
571
+ // Form set `display: flex` on Col which will override `display: block`.
572
+ // Let's get it from css variable to support override.
573
+ {
574
+ "--ant-display": "block",
575
+ // Fallback to display if variable not support
576
+ display: "block"
577
+ },
578
+ {
579
+ display: "var(--ant-display)",
580
+ flex: `0 0 ${i / a * 100}%`,
581
+ maxWidth: `${i / a * 100}%`
582
+ }
583
+ ], s[`${t}${n}-push-${i}`] = {
584
+ insetInlineStart: `${i / a * 100}%`
585
+ }, s[`${t}${n}-pull-${i}`] = {
586
+ insetInlineEnd: `${i / a * 100}%`
587
+ }, s[`${t}${n}-offset-${i}`] = {
588
+ marginInlineStart: `${i / a * 100}%`
589
+ }, s[`${t}${n}-order-${i}`] = {
590
+ order: i
591
+ });
592
+ return s[`${t}${n}-flex`] = {
593
+ flex: `var(--${o}${n}-flex)`
594
+ }, s;
595
+ }, ve = (e, n) => Jn(e, n), et = (e, n, o) => ({
596
+ [`@media (min-width: ${O(n)})`]: Object.assign({}, ve(e, o))
597
+ }), nt = () => ({}), tt = () => ({}), jt = be("Grid", Qn, nt), Je = (e) => ({
598
+ xs: e.screenXSMin,
599
+ sm: e.screenSMMin,
600
+ md: e.screenMDMin,
601
+ lg: e.screenLGMin,
602
+ xl: e.screenXLMin,
603
+ xxl: e.screenXXLMin
604
+ }), Bt = be("Grid", (e) => {
605
+ const n = Ge(e, {
606
+ gridColumns: 24
607
+ // Row is divided into 24 parts in Grid
608
+ }), o = Je(n);
609
+ return delete o.xs, [Yn(n), ve(n, ""), ve(n, "-xs"), Object.keys(o).map((t) => et(n, o[t], `-${t}`)).reduce((t, a) => Object.assign(Object.assign({}, t), a), {})];
610
+ }, tt);
611
+ function De(e) {
612
+ return {
613
+ position: e,
614
+ inset: 0
615
+ };
616
+ }
617
+ const ot = (e) => {
618
+ const {
619
+ componentCls: n,
620
+ antCls: o
621
+ } = e;
622
+ return [{
623
+ [`${n}-root`]: {
624
+ [`${n}${o}-zoom-enter, ${n}${o}-zoom-appear`]: {
625
+ // reset scale avoid mousePosition bug
626
+ transform: "none",
627
+ opacity: 0,
628
+ animationDuration: e.motionDurationSlow,
629
+ // https://github.com/ant-design/ant-design/issues/11777
630
+ userSelect: "none"
631
+ },
632
+ // https://github.com/ant-design/ant-design/issues/37329
633
+ // https://github.com/ant-design/ant-design/issues/40272
634
+ [`${n}${o}-zoom-leave ${n}-content`]: {
635
+ pointerEvents: "none"
636
+ },
637
+ [`${n}-mask`]: Object.assign(Object.assign({}, De("fixed")), {
638
+ zIndex: e.zIndexPopupBase,
639
+ height: "100%",
640
+ backgroundColor: e.colorBgMask,
641
+ pointerEvents: "none",
642
+ [`${n}-hidden`]: {
643
+ display: "none"
644
+ }
645
+ }),
646
+ [`${n}-wrap`]: Object.assign(Object.assign({}, De("fixed")), {
647
+ zIndex: e.zIndexPopupBase,
648
+ overflow: "auto",
649
+ outline: 0,
650
+ WebkitOverflowScrolling: "touch"
651
+ })
652
+ }
653
+ }, {
654
+ [`${n}-root`]: Wn(e)
655
+ }];
656
+ }, at = (e) => {
657
+ const {
658
+ componentCls: n
659
+ } = e;
660
+ return [
661
+ // ======================== Root =========================
662
+ {
663
+ [`${n}-root`]: {
664
+ [`${n}-wrap-rtl`]: {
665
+ direction: "rtl"
666
+ },
667
+ [`${n}-centered`]: {
668
+ textAlign: "center",
669
+ "&::before": {
670
+ display: "inline-block",
671
+ width: 0,
672
+ height: "100%",
673
+ verticalAlign: "middle",
674
+ content: '""'
675
+ },
676
+ [n]: {
677
+ top: 0,
678
+ display: "inline-block",
679
+ paddingBottom: 0,
680
+ textAlign: "start",
681
+ verticalAlign: "middle"
682
+ }
683
+ },
684
+ [`@media (max-width: ${e.screenSMMax}px)`]: {
685
+ [n]: {
686
+ maxWidth: "calc(100vw - 16px)",
687
+ margin: `${O(e.marginXS)} auto`
688
+ },
689
+ [`${n}-centered`]: {
690
+ [n]: {
691
+ flex: 1
692
+ }
693
+ }
694
+ }
695
+ }
696
+ },
697
+ // ======================== Modal ========================
698
+ {
699
+ [n]: Object.assign(Object.assign({}, fn(e)), {
700
+ pointerEvents: "none",
701
+ position: "relative",
702
+ top: 100,
703
+ width: "auto",
704
+ maxWidth: `calc(100vw - ${O(e.calc(e.margin).mul(2).equal())})`,
705
+ margin: "0 auto",
706
+ paddingBottom: e.paddingLG,
707
+ [`${n}-title`]: {
708
+ margin: 0,
709
+ color: e.titleColor,
710
+ fontWeight: e.fontWeightStrong,
711
+ fontSize: e.titleFontSize,
712
+ lineHeight: e.titleLineHeight,
713
+ wordWrap: "break-word"
714
+ },
715
+ [`${n}-content`]: {
716
+ position: "relative",
717
+ backgroundColor: e.contentBg,
718
+ backgroundClip: "padding-box",
719
+ border: 0,
720
+ borderRadius: e.borderRadiusLG,
721
+ boxShadow: e.boxShadow,
722
+ pointerEvents: "auto",
723
+ padding: e.contentPadding
724
+ },
725
+ [`${n}-close`]: Object.assign({
726
+ position: "absolute",
727
+ top: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
728
+ insetInlineEnd: e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),
729
+ zIndex: e.calc(e.zIndexPopupBase).add(10).equal(),
730
+ padding: 0,
731
+ color: e.modalCloseIconColor,
732
+ fontWeight: e.fontWeightStrong,
733
+ lineHeight: 1,
734
+ textDecoration: "none",
735
+ background: "transparent",
736
+ borderRadius: e.borderRadiusSM,
737
+ width: e.modalCloseBtnSize,
738
+ height: e.modalCloseBtnSize,
739
+ border: 0,
740
+ outline: 0,
741
+ cursor: "pointer",
742
+ transition: `color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,
743
+ "&-x": {
744
+ display: "flex",
745
+ fontSize: e.fontSizeLG,
746
+ fontStyle: "normal",
747
+ lineHeight: O(e.modalCloseBtnSize),
748
+ justifyContent: "center",
749
+ textTransform: "none",
750
+ textRendering: "auto"
751
+ },
752
+ "&:disabled": {
753
+ pointerEvents: "none"
754
+ },
755
+ "&:hover": {
756
+ color: e.modalCloseIconHoverColor,
757
+ backgroundColor: e.colorBgTextHover,
758
+ textDecoration: "none"
759
+ },
760
+ "&:active": {
761
+ backgroundColor: e.colorBgTextActive
762
+ }
763
+ }, mn(e)),
764
+ [`${n}-header`]: {
765
+ color: e.colorText,
766
+ background: e.headerBg,
767
+ borderRadius: `${O(e.borderRadiusLG)} ${O(e.borderRadiusLG)} 0 0`,
768
+ marginBottom: e.headerMarginBottom,
769
+ padding: e.headerPadding,
770
+ borderBottom: e.headerBorderBottom
771
+ },
772
+ [`${n}-body`]: {
773
+ fontSize: e.fontSize,
774
+ lineHeight: e.lineHeight,
775
+ wordWrap: "break-word",
776
+ padding: e.bodyPadding,
777
+ [`${n}-body-skeleton`]: {
778
+ width: "100%",
779
+ height: "100%",
780
+ display: "flex",
781
+ justifyContent: "center",
782
+ alignItems: "center",
783
+ margin: `${O(e.margin)} auto`
784
+ }
785
+ },
786
+ [`${n}-footer`]: {
787
+ textAlign: "end",
788
+ background: e.footerBg,
789
+ marginTop: e.footerMarginTop,
790
+ padding: e.footerPadding,
791
+ borderTop: e.footerBorderTop,
792
+ borderRadius: e.footerBorderRadius,
793
+ [`> ${e.antCls}-btn + ${e.antCls}-btn`]: {
794
+ marginInlineStart: e.marginXS
795
+ }
796
+ },
797
+ [`${n}-open`]: {
798
+ overflow: "hidden"
799
+ }
800
+ })
801
+ },
802
+ // ======================== Pure =========================
803
+ {
804
+ [`${n}-pure-panel`]: {
805
+ top: "auto",
806
+ padding: 0,
807
+ display: "flex",
808
+ flexDirection: "column",
809
+ [`${n}-content,
810
+ ${n}-body,
811
+ ${n}-confirm-body-wrapper`]: {
812
+ display: "flex",
813
+ flexDirection: "column",
814
+ flex: "auto"
815
+ },
816
+ [`${n}-confirm-body`]: {
817
+ marginBottom: "auto"
818
+ }
819
+ }
820
+ }
821
+ ];
822
+ }, rt = (e) => {
823
+ const {
824
+ componentCls: n
825
+ } = e;
826
+ return {
827
+ [`${n}-root`]: {
828
+ [`${n}-wrap-rtl`]: {
829
+ direction: "rtl",
830
+ [`${n}-confirm-body`]: {
831
+ direction: "rtl"
832
+ }
833
+ }
834
+ }
835
+ };
836
+ }, it = (e) => {
837
+ const {
838
+ componentCls: n
839
+ } = e, o = Je(e), t = Object.assign({}, o);
840
+ delete t.xs;
841
+ const a = `--${n.replace(".", "")}-`, s = Object.keys(t).map((i) => ({
842
+ [`@media (min-width: ${O(t[i])})`]: {
843
+ width: `var(${a}${i}-width)`
844
+ }
845
+ }));
846
+ return {
847
+ [`${n}-root`]: {
848
+ [n]: [].concat(V(Object.keys(o).map((i, d) => {
849
+ const c = Object.keys(o)[d - 1];
850
+ return c ? {
851
+ [`${a}${i}-width`]: `var(${a}${c}-width)`
852
+ } : null;
853
+ })), [{
854
+ width: `var(${a}xs-width)`
855
+ }], V(s))
856
+ }
857
+ };
858
+ }, en = (e) => {
859
+ const n = e.padding, o = e.fontSizeHeading5, t = e.lineHeightHeading5;
860
+ return Ge(e, {
861
+ modalHeaderHeight: e.calc(e.calc(t).mul(o).equal()).add(e.calc(n).mul(2).equal()).equal(),
862
+ modalFooterBorderColorSplit: e.colorSplit,
863
+ modalFooterBorderStyle: e.lineType,
864
+ modalFooterBorderWidth: e.lineWidth,
865
+ modalCloseIconColor: e.colorIcon,
866
+ modalCloseIconHoverColor: e.colorIconHover,
867
+ modalCloseBtnSize: e.controlHeight,
868
+ modalConfirmIconSize: e.fontHeight,
869
+ modalTitleHeight: e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()
870
+ });
871
+ }, nn = (e) => ({
872
+ footerBg: "transparent",
873
+ headerBg: e.colorBgElevated,
874
+ titleLineHeight: e.lineHeightHeading5,
875
+ titleFontSize: e.fontSizeHeading5,
876
+ contentBg: e.colorBgElevated,
877
+ titleColor: e.colorTextHeading,
878
+ // internal
879
+ contentPadding: e.wireframe ? 0 : `${O(e.paddingMD)} ${O(e.paddingContentHorizontalLG)}`,
880
+ headerPadding: e.wireframe ? `${O(e.padding)} ${O(e.paddingLG)}` : 0,
881
+ headerBorderBottom: e.wireframe ? `${O(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
882
+ headerMarginBottom: e.wireframe ? 0 : e.marginXS,
883
+ bodyPadding: e.wireframe ? e.paddingLG : 0,
884
+ footerPadding: e.wireframe ? `${O(e.paddingXS)} ${O(e.padding)}` : 0,
885
+ footerBorderTop: e.wireframe ? `${O(e.lineWidth)} ${e.lineType} ${e.colorSplit}` : "none",
886
+ footerBorderRadius: e.wireframe ? `0 0 ${O(e.borderRadiusLG)} ${O(e.borderRadiusLG)}` : 0,
887
+ footerMarginTop: e.wireframe ? 0 : e.marginSM,
888
+ confirmBodyPadding: e.wireframe ? `${O(e.padding * 2)} ${O(e.padding * 2)} ${O(e.paddingLG)}` : 0,
889
+ confirmIconMarginInlineEnd: e.wireframe ? e.margin : e.marginSM,
890
+ confirmBtnsMarginTop: e.wireframe ? e.marginLG : e.marginSM
891
+ }), lt = be("Modal", (e) => {
892
+ const n = en(e);
893
+ return [at(n), rt(n), ot(n), Dn(n, "zoom"), it(n)];
894
+ }, nn, {
895
+ unitless: {
896
+ titleLineHeight: !0
897
+ }
898
+ });
899
+ var st = function(e, n) {
900
+ var o = {};
901
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
902
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, t = Object.getOwnPropertySymbols(e); a < t.length; a++)
903
+ n.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (o[t[a]] = e[t[a]]);
904
+ return o;
905
+ };
906
+ let Ce;
907
+ const ct = (e) => {
908
+ Ce = {
909
+ x: e.pageX,
910
+ y: e.pageY
911
+ }, setTimeout(() => {
912
+ Ce = null;
913
+ }, 100);
914
+ };
915
+ Kn() && document.documentElement.addEventListener("click", ct, !0);
916
+ const dt = (e) => {
917
+ const {
918
+ prefixCls: n,
919
+ className: o,
920
+ rootClassName: t,
921
+ open: a,
922
+ wrapClassName: s,
923
+ centered: i,
924
+ getContainer: d,
925
+ focusTriggerAfterClose: c = !0,
926
+ style: f,
927
+ // Deprecated
928
+ visible: l,
929
+ width: u = 520,
930
+ footer: p,
931
+ classNames: v,
932
+ styles: m,
933
+ children: y,
934
+ loading: x,
935
+ confirmLoading: b,
936
+ zIndex: g,
937
+ mousePosition: C,
938
+ onOk: E,
939
+ onCancel: P,
940
+ destroyOnHidden: $,
941
+ destroyOnClose: N,
942
+ panelRef: Q = null,
943
+ modalRender: D
944
+ } = e, Y = st(e, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "focusTriggerAfterClose", "style", "visible", "width", "footer", "classNames", "styles", "children", "loading", "confirmLoading", "zIndex", "mousePosition", "onOk", "onCancel", "destroyOnHidden", "destroyOnClose", "panelRef", "modalRender"]), {
945
+ getPopupContainer: z,
946
+ getPrefixCls: H,
947
+ direction: q,
948
+ modal: S
949
+ } = r.useContext(xe), j = (T) => {
950
+ b || P == null || P(T);
951
+ }, _ = (T) => {
952
+ E == null || E(T);
953
+ };
954
+ if (process.env.NODE_ENV !== "production") {
955
+ const T = he("Modal");
956
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"], ["destroyOnClose", "destroyOnHidden"]].forEach(([te, Z]) => {
957
+ T.deprecated(!(te in e), te, Z);
958
+ });
959
+ }
960
+ const I = H("modal", n), L = H(), U = gn(I), [X, F, B] = lt(I, U), J = M(s, {
961
+ [`${I}-centered`]: i ?? (S == null ? void 0 : S.centered),
962
+ [`${I}-wrap-rtl`]: q === "rtl"
963
+ }), K = p !== null && !x ? /* @__PURE__ */ r.createElement(Zn, Object.assign({}, e, {
964
+ onOk: _,
965
+ onCancel: j
966
+ })) : null, [ie, le, ee, k] = zn(Ie(e), Ie(S), {
967
+ closable: !0,
968
+ closeIcon: /* @__PURE__ */ r.createElement(Ve, {
969
+ className: `${I}-close-icon`
970
+ }),
971
+ closeIconRender: (T) => kn(I, T)
972
+ }), ne = D ? (T) => /* @__PURE__ */ r.createElement("div", {
973
+ className: `${I}-render`
974
+ }, D(T)) : void 0, de = `.${I}-${D ? "render" : "content"}`, ue = Bn(de), se = vn(Q, ue), [fe, me] = Cn("Modal", g), [w, W] = r.useMemo(() => u && typeof u == "object" ? [void 0, u] : [u, void 0], [u]), rn = r.useMemo(() => {
975
+ const T = {};
976
+ return W && Object.keys(W).forEach((te) => {
977
+ const Z = W[te];
978
+ Z !== void 0 && (T[`--${I}-${te}-width`] = typeof Z == "number" ? `${Z}px` : Z);
979
+ }), T;
980
+ }, [I, W]);
981
+ return X(/* @__PURE__ */ r.createElement(pn, {
982
+ form: !0,
983
+ space: !0
984
+ }, /* @__PURE__ */ r.createElement(yn.Provider, {
985
+ value: me
986
+ }, /* @__PURE__ */ r.createElement(Ye, Object.assign({
987
+ width: w
988
+ }, Y, {
989
+ zIndex: fe,
990
+ getContainer: d === void 0 ? z : d,
991
+ prefixCls: I,
992
+ rootClassName: M(F, t, B, U),
993
+ footer: K,
994
+ visible: a ?? l,
995
+ mousePosition: C ?? Ce,
996
+ onClose: j,
997
+ closable: ie && Object.assign({
998
+ disabled: ee,
999
+ closeIcon: le
1000
+ }, k),
1001
+ closeIcon: le,
1002
+ focusTriggerAfterClose: c,
1003
+ transitionName: ce(L, "zoom", e.transitionName),
1004
+ maskTransitionName: ce(L, "fade", e.maskTransitionName),
1005
+ className: M(F, o, S == null ? void 0 : S.className),
1006
+ style: Object.assign(Object.assign(Object.assign({}, S == null ? void 0 : S.style), f), rn),
1007
+ classNames: Object.assign(Object.assign(Object.assign({}, S == null ? void 0 : S.classNames), v), {
1008
+ wrapper: M(J, v == null ? void 0 : v.wrapper)
1009
+ }),
1010
+ styles: Object.assign(Object.assign({}, S == null ? void 0 : S.styles), m),
1011
+ panelRef: se,
1012
+ // TODO: In the future, destroyOnClose in rc-dialog needs to be upgrade to destroyOnHidden
1013
+ destroyOnClose: $ ?? N,
1014
+ modalRender: ne
1015
+ }), x ? /* @__PURE__ */ r.createElement(jn, {
1016
+ active: !0,
1017
+ title: !1,
1018
+ paragraph: {
1019
+ rows: 4
1020
+ },
1021
+ className: `${I}-body-skeleton`
1022
+ }) : y))));
1023
+ }, ut = (e) => {
1024
+ const {
1025
+ componentCls: n,
1026
+ titleFontSize: o,
1027
+ titleLineHeight: t,
1028
+ modalConfirmIconSize: a,
1029
+ fontSize: s,
1030
+ lineHeight: i,
1031
+ modalTitleHeight: d,
1032
+ fontHeight: c,
1033
+ confirmBodyPadding: f
1034
+ } = e, l = `${n}-confirm`;
1035
+ return {
1036
+ [l]: {
1037
+ "&-rtl": {
1038
+ direction: "rtl"
1039
+ },
1040
+ [`${e.antCls}-modal-header`]: {
1041
+ display: "none"
1042
+ },
1043
+ [`${l}-body-wrapper`]: Object.assign({}, xn()),
1044
+ [`&${n} ${n}-body`]: {
1045
+ padding: f
1046
+ },
1047
+ // ====================== Body ======================
1048
+ [`${l}-body`]: {
1049
+ display: "flex",
1050
+ flexWrap: "nowrap",
1051
+ alignItems: "start",
1052
+ [`> ${e.iconCls}`]: {
1053
+ flex: "none",
1054
+ fontSize: a,
1055
+ marginInlineEnd: e.confirmIconMarginInlineEnd,
1056
+ marginTop: e.calc(e.calc(c).sub(a).equal()).div(2).equal()
1057
+ },
1058
+ [`&-has-title > ${e.iconCls}`]: {
1059
+ marginTop: e.calc(e.calc(d).sub(a).equal()).div(2).equal()
1060
+ }
1061
+ },
1062
+ [`${l}-paragraph`]: {
1063
+ display: "flex",
1064
+ flexDirection: "column",
1065
+ flex: "auto",
1066
+ rowGap: e.marginXS,
1067
+ // https://github.com/ant-design/ant-design/issues/51912
1068
+ maxWidth: `calc(100% - ${O(e.marginSM)})`
1069
+ },
1070
+ // https://github.com/ant-design/ant-design/issues/48159
1071
+ [`${e.iconCls} + ${l}-paragraph`]: {
1072
+ maxWidth: `calc(100% - ${O(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`
1073
+ },
1074
+ [`${l}-title`]: {
1075
+ color: e.colorTextHeading,
1076
+ fontWeight: e.fontWeightStrong,
1077
+ fontSize: o,
1078
+ lineHeight: t
1079
+ },
1080
+ [`${l}-content`]: {
1081
+ color: e.colorText,
1082
+ fontSize: s,
1083
+ lineHeight: i
1084
+ },
1085
+ // ===================== Footer =====================
1086
+ [`${l}-btns`]: {
1087
+ textAlign: "end",
1088
+ marginTop: e.confirmBtnsMarginTop,
1089
+ [`${e.antCls}-btn + ${e.antCls}-btn`]: {
1090
+ marginBottom: 0,
1091
+ marginInlineStart: e.marginXS
1092
+ }
1093
+ }
1094
+ },
1095
+ [`${l}-error ${l}-body > ${e.iconCls}`]: {
1096
+ color: e.colorError
1097
+ },
1098
+ [`${l}-warning ${l}-body > ${e.iconCls},
1099
+ ${l}-confirm ${l}-body > ${e.iconCls}`]: {
1100
+ color: e.colorWarning
1101
+ },
1102
+ [`${l}-info ${l}-body > ${e.iconCls}`]: {
1103
+ color: e.colorInfo
1104
+ },
1105
+ [`${l}-success ${l}-body > ${e.iconCls}`]: {
1106
+ color: e.colorSuccess
1107
+ }
1108
+ };
1109
+ }, ft = bn(["Modal", "confirm"], (e) => {
1110
+ const n = en(e);
1111
+ return ut(n);
1112
+ }, nn, {
1113
+ // confirm is weak than modal since no conflict here
1114
+ order: -1e3
1115
+ });
1116
+ var mt = function(e, n) {
1117
+ var o = {};
1118
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
1119
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, t = Object.getOwnPropertySymbols(e); a < t.length; a++)
1120
+ n.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (o[t[a]] = e[t[a]]);
1121
+ return o;
1122
+ };
1123
+ const gt = (e) => {
1124
+ const {
1125
+ prefixCls: n,
1126
+ icon: o,
1127
+ okText: t,
1128
+ cancelText: a,
1129
+ confirmPrefixCls: s,
1130
+ type: i,
1131
+ okCancel: d,
1132
+ footer: c,
1133
+ // Legacy for static function usage
1134
+ locale: f
1135
+ } = e, l = mt(e, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
1136
+ if (process.env.NODE_ENV !== "production") {
1137
+ const $ = he("Modal");
1138
+ process.env.NODE_ENV !== "production" && $(!(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`);
1139
+ }
1140
+ let u = o;
1141
+ if (!o && o !== null)
1142
+ switch (i) {
1143
+ case "info":
1144
+ u = /* @__PURE__ */ r.createElement(Mn, null);
1145
+ break;
1146
+ case "success":
1147
+ u = /* @__PURE__ */ r.createElement(Rn, null);
1148
+ break;
1149
+ case "error":
1150
+ u = /* @__PURE__ */ r.createElement(Sn, null);
1151
+ break;
1152
+ default:
1153
+ u = /* @__PURE__ */ r.createElement(In, null);
1154
+ }
1155
+ const p = d ?? i === "confirm", v = e.autoFocusButton === null ? !1 : e.autoFocusButton || "ok", [m] = ye("Modal"), y = f || m, x = t || (p ? y == null ? void 0 : y.okText : y == null ? void 0 : y.justOkText), b = a || (y == null ? void 0 : y.cancelText), g = r.useMemo(() => Object.assign({
1156
+ autoFocusButton: v,
1157
+ cancelTextLocale: b,
1158
+ okTextLocale: x,
1159
+ mergedOkCancel: p
1160
+ }, l), [v, b, x, p, l]), C = /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(Re, null), /* @__PURE__ */ r.createElement(Me, null)), E = e.title !== void 0 && e.title !== null, P = `${s}-body`;
1161
+ return /* @__PURE__ */ r.createElement("div", {
1162
+ className: `${s}-body-wrapper`
1163
+ }, /* @__PURE__ */ r.createElement("div", {
1164
+ className: M(P, {
1165
+ [`${P}-has-title`]: E
1166
+ })
1167
+ }, u, /* @__PURE__ */ r.createElement("div", {
1168
+ className: `${s}-paragraph`
1169
+ }, E && /* @__PURE__ */ r.createElement("span", {
1170
+ className: `${s}-title`
1171
+ }, e.title), /* @__PURE__ */ r.createElement("div", {
1172
+ className: `${s}-content`
1173
+ }, e.content))), c === void 0 || typeof c == "function" ? /* @__PURE__ */ r.createElement(Ke, {
1174
+ value: g
1175
+ }, /* @__PURE__ */ r.createElement("div", {
1176
+ className: `${s}-btns`
1177
+ }, typeof c == "function" ? c(C, {
1178
+ OkBtn: Me,
1179
+ CancelBtn: Re
1180
+ }) : C)) : c, /* @__PURE__ */ r.createElement(ft, {
1181
+ prefixCls: n
1182
+ }));
1183
+ }, tn = (e) => {
1184
+ const {
1185
+ close: n,
1186
+ zIndex: o,
1187
+ maskStyle: t,
1188
+ direction: a,
1189
+ prefixCls: s,
1190
+ wrapClassName: i,
1191
+ rootPrefixCls: d,
1192
+ bodyStyle: c,
1193
+ closable: f = !1,
1194
+ onConfirm: l,
1195
+ styles: u,
1196
+ title: p
1197
+ } = e;
1198
+ if (process.env.NODE_ENV !== "production") {
1199
+ const P = he("Modal");
1200
+ [["visible", "open"], ["bodyStyle", "styles.body"], ["maskStyle", "styles.mask"]].forEach(([$, N]) => {
1201
+ P.deprecated(!($ in e), $, N);
1202
+ });
1203
+ }
1204
+ const v = `${s}-confirm`, m = e.width || 416, y = e.style || {}, x = e.mask === void 0 ? !0 : e.mask, b = e.maskClosable === void 0 ? !1 : e.maskClosable, g = M(v, `${v}-${e.type}`, {
1205
+ [`${v}-rtl`]: a === "rtl"
1206
+ }, e.className), [, C] = hn(), E = r.useMemo(() => o !== void 0 ? o : C.zIndexPopupBase + $n, [o, C]);
1207
+ return /* @__PURE__ */ r.createElement(dt, Object.assign({}, e, {
1208
+ className: g,
1209
+ wrapClassName: M({
1210
+ [`${v}-centered`]: !!e.centered
1211
+ }, i),
1212
+ onCancel: () => {
1213
+ n == null || n({
1214
+ triggerCancel: !0
1215
+ }), l == null || l(!1);
1216
+ },
1217
+ title: p,
1218
+ footer: null,
1219
+ transitionName: ce(d || "", "zoom", e.transitionName),
1220
+ maskTransitionName: ce(d || "", "fade", e.maskTransitionName),
1221
+ mask: x,
1222
+ maskClosable: b,
1223
+ style: y,
1224
+ styles: Object.assign({
1225
+ body: c,
1226
+ mask: t
1227
+ }, u),
1228
+ width: m,
1229
+ zIndex: E,
1230
+ closable: f
1231
+ }), /* @__PURE__ */ r.createElement(gt, Object.assign({}, e, {
1232
+ confirmPrefixCls: v
1233
+ })));
1234
+ }, Se = (e) => {
1235
+ const {
1236
+ rootPrefixCls: n,
1237
+ iconPrefixCls: o,
1238
+ direction: t,
1239
+ theme: a
1240
+ } = e;
1241
+ return /* @__PURE__ */ r.createElement(qe, {
1242
+ prefixCls: n,
1243
+ iconPrefixCls: o,
1244
+ direction: t,
1245
+ theme: a
1246
+ }, /* @__PURE__ */ r.createElement(tn, Object.assign({}, e)));
1247
+ };
1248
+ process.env.NODE_ENV !== "production" && (tn.displayName = "ConfirmDialog", Se.displayName = "ConfirmDialogWrapper");
1249
+ const oe = [];
1250
+ let on = "";
1251
+ function an() {
1252
+ return on;
1253
+ }
1254
+ const vt = (e) => {
1255
+ var n, o;
1256
+ const {
1257
+ prefixCls: t,
1258
+ getContainer: a,
1259
+ direction: s
1260
+ } = e, i = Ae(), d = ae(xe), c = an() || d.getPrefixCls(), f = t || `${c}-modal`;
1261
+ let l = a;
1262
+ return l === !1 && (l = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && Xe(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ h.createElement(Se, Object.assign({}, e, {
1263
+ rootPrefixCls: c,
1264
+ prefixCls: f,
1265
+ iconPrefixCls: d.iconPrefixCls,
1266
+ theme: d.theme,
1267
+ direction: s ?? d.direction,
1268
+ locale: (o = (n = d.locale) === null || n === void 0 ? void 0 : n.Modal) !== null && o !== void 0 ? o : i,
1269
+ getContainer: l
1270
+ }));
1271
+ };
1272
+ function _t(e) {
1273
+ const n = En();
1274
+ process.env.NODE_ENV !== "production" && !n.holderRender && On("Modal");
1275
+ const o = document.createDocumentFragment();
1276
+ let t = Object.assign(Object.assign({}, e), {
1277
+ close: c,
1278
+ open: !0
1279
+ }), a, s;
1280
+ function i(...l) {
1281
+ var u;
1282
+ if (l.some((m) => m == null ? void 0 : m.triggerCancel)) {
1283
+ var v;
1284
+ (u = e.onCancel) === null || u === void 0 || (v = u).call.apply(v, [e, () => {
1285
+ }].concat(V(l.slice(1))));
1286
+ }
1287
+ for (let m = 0; m < oe.length; m++)
1288
+ if (oe[m] === c) {
1289
+ oe.splice(m, 1);
1290
+ break;
1291
+ }
1292
+ s();
1293
+ }
1294
+ const d = (l) => {
1295
+ clearTimeout(a), a = setTimeout(() => {
1296
+ const u = n.getPrefixCls(void 0, an()), p = n.getIconPrefixCls(), v = n.getTheme(), m = /* @__PURE__ */ h.createElement(vt, Object.assign({}, l));
1297
+ s = wn()(/* @__PURE__ */ h.createElement(qe, {
1298
+ prefixCls: u,
1299
+ iconPrefixCls: p,
1300
+ theme: v
1301
+ }, typeof n.holderRender == "function" ? n.holderRender(m) : m), o);
1302
+ });
1303
+ };
1304
+ function c(...l) {
1305
+ t = Object.assign(Object.assign({}, t), {
1306
+ open: !1,
1307
+ afterClose: () => {
1308
+ typeof e.afterClose == "function" && e.afterClose(), i.apply(this, l);
1309
+ }
1310
+ }), t.visible && delete t.visible, d(t);
1311
+ }
1312
+ function f(l) {
1313
+ typeof l == "function" ? t = l(t) : t = Object.assign(Object.assign({}, t), l), d(t);
1314
+ }
1315
+ return d(t), oe.push(c), {
1316
+ destroy: c,
1317
+ update: f
1318
+ };
1319
+ }
1320
+ function Ct(e) {
1321
+ return Object.assign(Object.assign({}, e), {
1322
+ type: "warning"
1323
+ });
1324
+ }
1325
+ function pt(e) {
1326
+ return Object.assign(Object.assign({}, e), {
1327
+ type: "info"
1328
+ });
1329
+ }
1330
+ function yt(e) {
1331
+ return Object.assign(Object.assign({}, e), {
1332
+ type: "success"
1333
+ });
1334
+ }
1335
+ function bt(e) {
1336
+ return Object.assign(Object.assign({}, e), {
1337
+ type: "error"
1338
+ });
1339
+ }
1340
+ function xt(e) {
1341
+ return Object.assign(Object.assign({}, e), {
1342
+ type: "confirm"
1343
+ });
1344
+ }
1345
+ function Dt({
1346
+ rootPrefixCls: e
1347
+ }) {
1348
+ process.env.NODE_ENV !== "production" && Xe(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), on = e;
1349
+ }
1350
+ var ht = function(e, n) {
1351
+ var o = {};
1352
+ for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
1353
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, t = Object.getOwnPropertySymbols(e); a < t.length; a++)
1354
+ n.indexOf(t[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[a]) && (o[t[a]] = e[t[a]]);
1355
+ return o;
1356
+ };
1357
+ const $t = (e, n) => {
1358
+ var o, {
1359
+ afterClose: t,
1360
+ config: a
1361
+ } = e, s = ht(e, ["afterClose", "config"]);
1362
+ const [i, d] = r.useState(!0), [c, f] = r.useState(a), {
1363
+ direction: l,
1364
+ getPrefixCls: u
1365
+ } = r.useContext(xe), p = u("modal"), v = u(), m = () => {
1366
+ var g;
1367
+ t(), (g = c.afterClose) === null || g === void 0 || g.call(c);
1368
+ }, y = (...g) => {
1369
+ var C;
1370
+ if (d(!1), g.some(($) => $ == null ? void 0 : $.triggerCancel)) {
1371
+ var P;
1372
+ (C = c.onCancel) === null || C === void 0 || (P = C).call.apply(P, [c, () => {
1373
+ }].concat(V(g.slice(1))));
1374
+ }
1375
+ };
1376
+ r.useImperativeHandle(n, () => ({
1377
+ destroy: y,
1378
+ update: (g) => {
1379
+ f((C) => {
1380
+ const E = typeof g == "function" ? g(C) : g;
1381
+ return Object.assign(Object.assign({}, C), E);
1382
+ });
1383
+ }
1384
+ }));
1385
+ const x = (o = c.okCancel) !== null && o !== void 0 ? o : c.type === "confirm", [b] = ye("Modal", Nn.Modal);
1386
+ return /* @__PURE__ */ r.createElement(Se, Object.assign({
1387
+ prefixCls: p,
1388
+ rootPrefixCls: v
1389
+ }, c, {
1390
+ close: y,
1391
+ open: i,
1392
+ afterClose: m,
1393
+ okText: c.okText || (x ? b == null ? void 0 : b.okText : b == null ? void 0 : b.justOkText),
1394
+ direction: c.direction || l,
1395
+ cancelText: c.cancelText || (b == null ? void 0 : b.cancelText)
1396
+ }, s));
1397
+ }, St = /* @__PURE__ */ r.forwardRef($t);
1398
+ let ze = 0;
1399
+ const Ot = /* @__PURE__ */ r.memo(/* @__PURE__ */ r.forwardRef((e, n) => {
1400
+ const [o, t] = Hn();
1401
+ return r.useImperativeHandle(n, () => ({
1402
+ patchElement: t
1403
+ }), [t]), /* @__PURE__ */ r.createElement(r.Fragment, null, o);
1404
+ }));
1405
+ function zt() {
1406
+ const e = r.useRef(null), [n, o] = r.useState([]);
1407
+ r.useEffect(() => {
1408
+ n.length && (V(n).forEach((i) => {
1409
+ i();
1410
+ }), o([]));
1411
+ }, [n]);
1412
+ const t = r.useCallback((s) => function(d) {
1413
+ var c;
1414
+ ze += 1;
1415
+ const f = /* @__PURE__ */ r.createRef();
1416
+ let l;
1417
+ const u = new Promise((x) => {
1418
+ l = x;
1419
+ });
1420
+ let p = !1, v;
1421
+ const m = /* @__PURE__ */ r.createElement(St, {
1422
+ key: `modal-${ze}`,
1423
+ config: s(d),
1424
+ ref: f,
1425
+ afterClose: () => {
1426
+ v == null || v();
1427
+ },
1428
+ isSilent: () => p,
1429
+ onConfirm: (x) => {
1430
+ l(x);
1431
+ }
1432
+ });
1433
+ return v = (c = e.current) === null || c === void 0 ? void 0 : c.patchElement(m), v && oe.push(v), {
1434
+ destroy: () => {
1435
+ function x() {
1436
+ var b;
1437
+ (b = f.current) === null || b === void 0 || b.destroy();
1438
+ }
1439
+ f.current ? x() : o((b) => [].concat(V(b), [x]));
1440
+ },
1441
+ update: (x) => {
1442
+ function b() {
1443
+ var g;
1444
+ (g = f.current) === null || g === void 0 || g.update(x);
1445
+ }
1446
+ f.current ? b() : o((g) => [].concat(V(g), [b]));
1447
+ },
1448
+ then: (x) => (p = !0, u.then(x))
1449
+ };
1450
+ }, []);
1451
+ return [r.useMemo(() => ({
1452
+ info: t(pt),
1453
+ success: t(yt),
1454
+ error: t(bt),
1455
+ warning: t(Ct),
1456
+ confirm: t(xt)
1457
+ }), [t]), /* @__PURE__ */ r.createElement(Ot, {
1458
+ key: "modal-holder",
1459
+ ref: e
1460
+ })];
1461
+ }
1462
+ export {
1463
+ Ue as A,
1464
+ gt as C,
1465
+ Ye as D,
1466
+ Zn as F,
1467
+ dt as M,
1468
+ Ze as P,
1469
+ lt as a,
1470
+ yt as b,
1471
+ _t as c,
1472
+ bt as d,
1473
+ xt as e,
1474
+ oe as f,
1475
+ Ct as g,
1476
+ Bt as h,
1477
+ jt as i,
1478
+ ot as j,
1479
+ Wn as k,
1480
+ Dt as m,
1481
+ kn as r,
1482
+ zt as u,
1483
+ pt as w
1484
+ };