@yuku123/z-cognition-component 2.0.0 → 2.0.1

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 (174) 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-mAJW3cEN.js} +46 -46
  29. package/dist-lib/{ai-CQ67aRC4.js → ai-BcYmZiRo.js} +30 -30
  30. package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DO7GXjG4.js} +14 -13
  31. package/dist-lib/{approval-LLVR3fMa.js → approval-RPDUKg9-.js} +26 -25
  32. package/dist-lib/{approvals-D1DSA-Mw.js → approvals-CNjxJUpR.js} +43 -42
  33. package/dist-lib/{assistant-DpabpWKV.js → assistant-FIQQziCn.js} +50 -49
  34. package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-DsEGBJnq.js} +5 -5
  35. package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-B-f3k55y.js} +1 -1
  36. package/dist-lib/{audit-DeU1XEgQ.js → audit-NwnH1hm5.js} +1 -1
  37. package/dist-lib/{bios-Bk36bVhw.js → bios-CRwKtcit.js} +130 -125
  38. package/dist-lib/callSuper-DZEfdkXG.js +7 -0
  39. package/dist-lib/{changelog-CCMDMI4R.js → changelog-Dj_Pv2nc.js} +1 -1
  40. package/dist-lib/{changelog-xEt2qnho.js → changelog-DlL5u9o4.js} +2 -2
  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-Cfb-zdr9.js} +50 -49
  49. package/dist-lib/{detail-BW6dD_YP.js → detail-Dcfg3W8B.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-MkyxiHxi.js} +4 -3
  52. package/dist-lib/{edit-nZ7siGuW.js → edit-DLGAM-Vo.js} +265 -259
  53. package/dist-lib/{editor-BuhZwEsv.js → editor-BtiheUpe.js} +21 -20
  54. package/dist-lib/embed-DwLg9RDW.js +31148 -0
  55. package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-Dz9bUuhS.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-B57Fj7Y0.js +1169 -0
  60. package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
  61. package/dist-lib/{index-BJ2Gpcbi.js → index-BGB6NawZ.js} +2 -2
  62. package/dist-lib/index-Bc-Vin3j.js +256 -0
  63. package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
  64. package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
  65. package/dist-lib/{index-SAPKyv8e.js → index-CJSTTgTM.js} +10 -10
  66. package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
  67. package/dist-lib/index-Cfu1W1H6.js +535 -0
  68. package/dist-lib/index-CrMcNEAZ.js +9656 -0
  69. package/dist-lib/index-Cy9i4Kx7.js +699 -0
  70. package/dist-lib/index-CyKWCYMK.js +218 -0
  71. package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
  72. package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
  73. package/dist-lib/index-DBtGE89a.js +168 -0
  74. package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
  75. package/dist-lib/{index-rtSfQuYs.js → index-D_Qey9G8.js} +12 -12
  76. package/dist-lib/index-DjFPRXl5.js +1484 -0
  77. package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
  78. package/dist-lib/{index-B5jr3A7f.js → index-DuI4K5e1.js} +19 -19
  79. package/dist-lib/index-DvWHYX81.js +450 -0
  80. package/dist-lib/{index-D5V4bZ4e.js → index-HieOUSwH.js} +8 -8
  81. package/dist-lib/index-Vu6sPBci.js +1884 -0
  82. package/dist-lib/index-bOY1cBol.js +4890 -0
  83. package/dist-lib/{index-DzrH4RQ7.js → index-c2HokEFp.js} +11 -10
  84. package/dist-lib/{index-BFRg0cn3.js → index-g16g7A4k.js} +6 -6
  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-BNoIhw6B.js} +71 -71
  92. package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-EgcbWseM.js} +3 -3
  93. package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-C023dnJ-.js} +104 -103
  94. package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-B4fGCn8m.js} +52 -51
  95. package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-EvJ9Fw7X.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-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
  98. package/dist-lib/{member-B5WF3FCj.js → member-BUg2QYlE.js} +1 -1
  99. package/dist-lib/{message-kHyjuooj.js → message-Cwj8dO78.js} +25 -24
  100. package/dist-lib/{message-D2MSaOMq.js → message-GF-w8HuR.js} +1 -1
  101. package/dist-lib/{messages-D_VDuKK7.js → messages-JID13L8-.js} +16 -15
  102. package/dist-lib/{meta-CEf_DYcU.js → meta-DPp5L3Uc.js} +1 -1
  103. package/dist-lib/{metrics-hONGW0KG.js → metrics-CT4eLzrq.js} +2 -2
  104. package/dist-lib/{monitor-DFmEu6rH.js → monitor-Bs9BfJOj.js} +4 -4
  105. package/dist-lib/{monitor-DF3WVsVV.js → monitor-CmS65YSu.js} +8 -8
  106. package/dist-lib/{my-access-j53lA6T6.js → my-access-1Yj7UloI.js} +3 -3
  107. package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-yQDHPLYI.js} +23 -22
  108. package/dist-lib/{new-DfZ61nMQ.js → new-BgkoBnZV.js} +14 -12
  109. package/dist-lib/{ontology-CUH5qslO.js → ontology-BPrbXPor.js} +145 -142
  110. package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-Cbqnm-po.js} +88 -84
  111. package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-6k-m8fzr.js} +2125 -2117
  112. package/dist-lib/ontology-modeling-BT-EuDCs.js +1039 -0
  113. package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-D3xy6IZL.js} +703 -712
  114. package/dist-lib/ontology-scenarios-DWYC2yxd.js +660 -0
  115. package/dist-lib/pages-CsexFuEz.js +73 -0
  116. package/dist-lib/pages.js +3 -3
  117. package/dist-lib/{permission-CklDU2kO.js → permission-fTfxpEhV.js} +31 -31
  118. package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
  119. package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
  120. package/dist-lib/{quota-DLe9so2b.js → quota-BlHnhkAT.js} +4 -4
  121. package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
  122. package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-B-pzX8eT.js} +2 -2
  123. package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DByQXh0y.js} +48 -46
  124. package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-Bw-6n9Kh.js} +425 -423
  125. package/dist-lib/{schedule-B_ujtL3h.js → schedule-H4_9KnRj.js} +8 -8
  126. package/dist-lib/{settings-BIkKTQjc.js → settings-C3PI8KYa.js} +147 -146
  127. package/dist-lib/{shared-Dfz1X4Mq.js → shared-DqeN-Wbb.js} +1 -1
  128. package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-DN3zT9P-.js} +2 -2
  129. package/dist-lib/{skills-BzpcX5fN.js → skills-eGlCExr0.js} +40 -39
  130. package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-BCvClzc-.js} +16 -16
  131. package/dist-lib/{task-config-D0a7TOYt.js → task-config-DEJVJ7zK.js} +4 -4
  132. package/dist-lib/{tech-CH01ekZ5.js → tech-C-4uM9bS.js} +4 -3
  133. package/dist-lib/{tools-YnTN61uE.js → tools-le6miafZ.js} +14 -14
  134. package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-B3pDp3s5.js} +13 -13
  135. package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
  136. package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-Dmp7uMHO.js} +50 -48
  137. package/dist-lib/useClosable-BY7FgWKy.js +59 -0
  138. package/dist-lib/useForm-Byp1LopG.js +145 -0
  139. package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-WT1PobuV.js} +27 -26
  140. package/dist-lib/{version-management-C_v8w1E4.js → version-management-DC0k1DRg.js} +7 -6
  141. package/dist-lib/{welcome-ChEcA4Ej.js → welcome-VyWLrbth.js} +4 -3
  142. package/package.json +2 -3
  143. package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
  144. package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
  145. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
  146. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
  147. package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
  148. package/dist-lib/Skeleton-CxFsInYI.js +0 -671
  149. package/dist-lib/Table-Civ838nE.js +0 -20514
  150. package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
  151. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
  152. package/dist-lib/callSuper-CwIeyYoc.js +0 -7
  153. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
  154. package/dist-lib/context-T27uno74.js +0 -54
  155. package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
  156. package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
  157. package/dist-lib/index-0TvzCTD7.js +0 -2336
  158. package/dist-lib/index-4tbtbcAt.js +0 -550
  159. package/dist-lib/index-B1wh6i1C.js +0 -1308
  160. package/dist-lib/index-BVgdmf6r.js +0 -2487
  161. package/dist-lib/index-CSnvcFg-.js +0 -543
  162. package/dist-lib/index-D35Ry0PG.js +0 -1162
  163. package/dist-lib/index-DC57_dnh.js +0 -604
  164. package/dist-lib/index-DQ16Zb7x.js +0 -546
  165. package/dist-lib/index-DRcTwC17.js +0 -418
  166. package/dist-lib/index-Dd9pPAT3.js +0 -2192
  167. package/dist-lib/index-DxzorPvG.js +0 -13960
  168. package/dist-lib/index-If4xc1-H.js +0 -559
  169. package/dist-lib/index-R71k3nB_.js +0 -710
  170. package/dist-lib/index-mUlorJxp.js +0 -3279
  171. package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
  172. package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
  173. package/dist-lib/pages-CticGC6S.js +0 -512
  174. package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
@@ -1,2487 +0,0 @@
1
- var Qt = Object.defineProperty;
2
- var Yt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var we = (e, t, n) => Yt(e, typeof t != "symbol" ? t + "" : t, n);
4
- import * as i from "react";
5
- import ce, { useContext as Re, useMemo as Jt, useState as Zt, useRef as en } from "react";
6
- import { I as Ne, c as O, R as tn } from "./pages-CticGC6S.js";
7
- import { C as nn, aA as on, aB as pe, al as je, p as et, H as Ce, l as tt, a as sn, G as ve, o as G, q as vt, r as rn, n as Le, t as an, M as bt, m as De, U as xt, v as be, E as Pe, L as nt, aq as cn, O as ln, y as ot, aC as ft, x as ke, ad as he, j as St, aD as un, ak as Me, S as fn, aE as Et, aF as $t, aG as Fe, aH as ze, ab as Nt, aI as dn, aJ as pn, _ as Pt, g as mn, aa as It, aK as gn, z as wt, aL as hn, h as yn, ax as dt, B as Cn, F as Ae, aM as vn, aN as bn, X as xn, Q as Sn, V as En, W as Ot } from "./index-DxzorPvG.js";
8
- import "react-dom/client";
9
- import { createPortal as $n } from "react-dom";
10
- var Nn = { 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" };
11
- function Be() {
12
- return Be = Object.assign ? Object.assign.bind() : function(e) {
13
- for (var t = 1; t < arguments.length; t++) {
14
- var n = arguments[t];
15
- for (var o in n)
16
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
17
- }
18
- return e;
19
- }, Be.apply(this, arguments);
20
- }
21
- const Pn = (e, t) => /* @__PURE__ */ i.createElement(Ne, Be({}, e, {
22
- ref: t,
23
- icon: Nn
24
- })), Rt = /* @__PURE__ */ i.forwardRef(Pn);
25
- process.env.NODE_ENV !== "production" && (Rt.displayName = "CheckCircleFilled");
26
- var In = { 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" };
27
- function Ke() {
28
- return Ke = Object.assign ? Object.assign.bind() : function(e) {
29
- for (var t = 1; t < arguments.length; t++) {
30
- var n = arguments[t];
31
- for (var o in n)
32
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
33
- }
34
- return e;
35
- }, Ke.apply(this, arguments);
36
- }
37
- const wn = (e, t) => /* @__PURE__ */ i.createElement(Ne, Ke({}, e, {
38
- ref: t,
39
- icon: In
40
- })), Mt = /* @__PURE__ */ i.forwardRef(wn);
41
- process.env.NODE_ENV !== "production" && (Mt.displayName = "ExclamationCircleFilled");
42
- var On = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { tag: "path", attrs: { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, name: "eye-invisible", theme: "outlined" };
43
- function We() {
44
- return We = Object.assign ? Object.assign.bind() : function(e) {
45
- for (var t = 1; t < arguments.length; t++) {
46
- var n = arguments[t];
47
- for (var o in n)
48
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
49
- }
50
- return e;
51
- }, We.apply(this, arguments);
52
- }
53
- const Rn = (e, t) => /* @__PURE__ */ i.createElement(Ne, We({}, e, {
54
- ref: t,
55
- icon: On
56
- })), zt = /* @__PURE__ */ i.forwardRef(Rn);
57
- process.env.NODE_ENV !== "production" && (zt.displayName = "EyeInvisibleOutlined");
58
- var Mn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, name: "eye", theme: "outlined" };
59
- function Ge() {
60
- return Ge = Object.assign ? Object.assign.bind() : function(e) {
61
- for (var t = 1; t < arguments.length; t++) {
62
- var n = arguments[t];
63
- for (var o in n)
64
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
65
- }
66
- return e;
67
- }, Ge.apply(this, arguments);
68
- }
69
- const zn = (e, t) => /* @__PURE__ */ i.createElement(Ne, Ge({}, e, {
70
- ref: t,
71
- icon: Mn
72
- })), Tt = /* @__PURE__ */ i.forwardRef(zn);
73
- process.env.NODE_ENV !== "production" && (Tt.displayName = "EyeOutlined");
74
- var Tn = { 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" };
75
- function Ue() {
76
- return Ue = Object.assign ? Object.assign.bind() : function(e) {
77
- for (var t = 1; t < arguments.length; t++) {
78
- var n = arguments[t];
79
- for (var o in n)
80
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
81
- }
82
- return e;
83
- }, Ue.apply(this, arguments);
84
- }
85
- const Hn = (e, t) => /* @__PURE__ */ i.createElement(Ne, Ue({}, e, {
86
- ref: t,
87
- icon: Tn
88
- })), Ht = /* @__PURE__ */ i.forwardRef(Hn);
89
- process.env.NODE_ENV !== "production" && (Ht.displayName = "InfoCircleFilled");
90
- const Xe = "add", qe = "keep", Qe = "remove", Ve = "removed";
91
- function Ln(e) {
92
- let t;
93
- return e && typeof e == "object" && "key" in e ? t = e : t = {
94
- key: e
95
- }, {
96
- ...t,
97
- key: String(t.key)
98
- };
99
- }
100
- function Ye(e = []) {
101
- return e.map(Ln);
102
- }
103
- function Dn(e = [], t = []) {
104
- let n = [], o = 0;
105
- const r = t.length, s = Ye(e), a = Ye(t);
106
- s.forEach((l) => {
107
- let u = !1;
108
- for (let d = o; d < r; d += 1) {
109
- const g = a[d];
110
- if (g.key === l.key) {
111
- o < d && (n = n.concat(a.slice(o, d).map((y) => ({
112
- ...y,
113
- status: Xe
114
- }))), o = d), n.push({
115
- ...g,
116
- status: qe
117
- }), o += 1, u = !0;
118
- break;
119
- }
120
- }
121
- u || n.push({
122
- ...l,
123
- status: Qe
124
- });
125
- }), o < r && (n = n.concat(a.slice(o).map((l) => ({
126
- ...l,
127
- status: Xe
128
- }))));
129
- const c = {};
130
- return n.forEach(({
131
- key: l
132
- }) => {
133
- c[l] = (c[l] || 0) + 1;
134
- }), Object.keys(c).filter((l) => c[l] > 1).forEach((l) => {
135
- n = n.filter(({
136
- key: u,
137
- status: d
138
- }) => u !== l || d !== Qe), n.forEach((u) => {
139
- u.key === l && (u.status = qe);
140
- });
141
- }), n;
142
- }
143
- function Je() {
144
- return Je = Object.assign ? Object.assign.bind() : function(e) {
145
- for (var t = 1; t < arguments.length; t++) {
146
- var n = arguments[t];
147
- for (var o in n)
148
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
149
- }
150
- return e;
151
- }, Je.apply(this, arguments);
152
- }
153
- const kn = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
154
- function Fn(e, t = nn) {
155
- class n extends i.Component {
156
- constructor() {
157
- super(...arguments);
158
- we(this, "state", {
159
- keyEntities: []
160
- });
161
- // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.
162
- we(this, "removeKey", (s) => {
163
- this.setState((a) => ({
164
- keyEntities: a.keyEntities.map((p) => p.key !== s ? p : {
165
- ...p,
166
- status: Ve
167
- })
168
- }), () => {
169
- const {
170
- keyEntities: a
171
- } = this.state;
172
- a.filter(({
173
- status: p
174
- }) => p !== Ve).length === 0 && this.props.onAllRemoved && this.props.onAllRemoved();
175
- });
176
- });
177
- }
178
- static getDerivedStateFromProps({
179
- keys: s
180
- }, {
181
- keyEntities: a
182
- }) {
183
- const c = Ye(s);
184
- return {
185
- keyEntities: Dn(a, c).filter((l) => {
186
- const u = a.find(({
187
- key: d
188
- }) => l.key === d);
189
- return !(u && u.status === Ve && l.status === Qe);
190
- })
191
- };
192
- }
193
- render() {
194
- const {
195
- keyEntities: s
196
- } = this.state, {
197
- component: a,
198
- children: c,
199
- onVisibleChanged: p,
200
- onAllRemoved: l,
201
- ...u
202
- } = this.props, d = a || i.Fragment, g = {};
203
- return kn.forEach((y) => {
204
- g[y] = u[y], delete u[y];
205
- }), delete u.keys, /* @__PURE__ */ i.createElement(d, u, s.map(({
206
- status: y,
207
- ...m
208
- }, h) => {
209
- const S = y === Xe || y === qe;
210
- return /* @__PURE__ */ i.createElement(t, Je({}, g, {
211
- key: m.key,
212
- visible: S,
213
- eventProps: m,
214
- onVisibleChanged: (f) => {
215
- p == null || p(f, {
216
- key: m.key
217
- }), f || this.removeKey(m.key);
218
- }
219
- }), on(c) ? (f) => c({
220
- ...f,
221
- index: h
222
- }) : (f, E) => c({
223
- ...f,
224
- index: h
225
- }, E));
226
- }));
227
- }
228
- }
229
- return we(n, "defaultProps", {
230
- component: "div"
231
- }), n;
232
- }
233
- const _n = Fn();
234
- function An() {
235
- const [e, t] = i.useState({}), n = i.useCallback((o, r) => {
236
- if (!r) {
237
- t((a) => {
238
- if (!(o in a))
239
- return a;
240
- const c = {
241
- ...a
242
- };
243
- return delete c[o], c;
244
- });
245
- return;
246
- }
247
- const s = {
248
- width: r.offsetWidth,
249
- height: r.offsetHeight
250
- };
251
- t((a) => {
252
- const c = a[o];
253
- return c && c.width === s.width && c.height === s.height ? a : {
254
- ...a,
255
- [o]: s
256
- };
257
- });
258
- }, []);
259
- return [e, n];
260
- }
261
- function Vn(e, t, n = 0) {
262
- const [o, r] = An(), [s, a, c, p] = i.useMemo(() => {
263
- let l = 0, u = 0;
264
- const d = (t == null ? void 0 : t.threshold) ?? 0, g = /* @__PURE__ */ new Map();
265
- let y, m;
266
- return e.slice().reverse().forEach((h, S) => {
267
- var $, C;
268
- const f = String(h.key), E = (($ = o[f]) == null ? void 0 : $.height) ?? 0, v = t && S > 0 ? l + (t.offset ?? 0) - E : l;
269
- g.set(f, v), S === 0 && (y = E, m = ((C = o[f]) == null ? void 0 : C.width) ?? 0), (!t || S < d) && (u = Math.max(u, v + E)), t ? l = v + E : l += E + n;
270
- }), [g, u, y, m];
271
- }, [e, n, o, t]);
272
- return [s, r, a, c, p];
273
- }
274
- const pt = 8, mt = 3, jn = (e) => {
275
- const t = {
276
- offset: pt,
277
- threshold: mt
278
- };
279
- return e && typeof e == "object" && (t.offset = e.offset ?? pt, t.threshold = e.threshold ?? mt), [!!e, t];
280
- };
281
- function Bn(e, t, n) {
282
- const r = Math.max(typeof e == "number" ? e : 0, 0) * 1e3, s = pe(t), a = pe(n), [c, p] = i.useState(r > 0), l = i.useRef(0), u = i.useRef(null);
283
- function d() {
284
- const m = Date.now(), h = u.current;
285
- h !== null && (l.current += m - h), u.current = m;
286
- }
287
- const g = i.useCallback(() => {
288
- d(), u.current = null, p(!1);
289
- }, []), y = i.useCallback(() => {
290
- r > 0 ? (u.current = Date.now(), p(!0)) : a(0);
291
- }, [r]);
292
- return i.useEffect(() => {
293
- l.current = 0, p(r > 0);
294
- }, [r]), i.useEffect(() => {
295
- if (!c)
296
- return;
297
- let m = null;
298
- function h() {
299
- d(), l.current >= r ? (a(1), s()) : (a(Math.min(l.current / r, 1)), m = je(h));
300
- }
301
- return h(), () => {
302
- je.cancel(m);
303
- };
304
- }, [r, c]), [y, g];
305
- }
306
- function Kn(e) {
307
- const t = i.useMemo(() => e === !1 ? {
308
- closeIcon: null,
309
- disabled: !0
310
- } : typeof e == "object" && e !== null ? e : {}, [e]), n = i.useMemo(() => ({
311
- ...t,
312
- closeIcon: "closeIcon" in t ? t.closeIcon : "×",
313
- disabled: t.disabled ?? !1
314
- }), [t]), o = i.useMemo(() => et(n, !0), [n]);
315
- return [!!e, n, o];
316
- }
317
- const Wn = ({
318
- className: e,
319
- style: t,
320
- percent: n
321
- }) => /* @__PURE__ */ i.createElement("progress", {
322
- className: e,
323
- max: "100",
324
- value: n,
325
- style: t
326
- });
327
- function Te() {
328
- return Te = Object.assign ? Object.assign.bind() : function(e) {
329
- for (var t = 1; t < arguments.length; t++) {
330
- var n = arguments[t];
331
- for (var o in n)
332
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
333
- }
334
- return e;
335
- }, Te.apply(this, arguments);
336
- }
337
- const st = /* @__PURE__ */ i.forwardRef((e, t) => {
338
- const {
339
- // Style
340
- prefixCls: n,
341
- className: o,
342
- style: r,
343
- classNames: s,
344
- styles: a,
345
- components: c,
346
- // UI
347
- title: p,
348
- description: l,
349
- icon: u,
350
- actions: d,
351
- role: g,
352
- closable: y,
353
- offset: m,
354
- notificationIndex: h,
355
- stackInThreshold: S,
356
- props: f,
357
- // Behavior
358
- duration: E = 4.5,
359
- showProgress: v,
360
- hovering: $,
361
- pauseOnHover: C = !0,
362
- // Function
363
- onClick: b,
364
- onMouseEnter: x,
365
- onMouseLeave: N,
366
- onClose: M
367
- } = e, [H, P] = i.useState(0), I = `${n}-notice`, [A, k, V] = Kn(y), j = pe(() => {
368
- var K;
369
- (K = k.onClose) == null || K.call(k), M == null || M();
370
- }), [F, B] = i.useState(!1), [X, Y] = Bn(E, j, P), q = 100 - Math.min(Math.max(H * 100, 0), 100), _ = (c == null ? void 0 : c.progress) || Wn;
371
- i.useEffect(() => {
372
- C && ($ ? Y() : F || X());
373
- }, [$, F, Y, X, C]);
374
- function ne(K) {
375
- B(!0), C && Y(), x == null || x(K);
376
- }
377
- function Q(K) {
378
- B(!1), C && !$ && X(), N == null || N(K);
379
- }
380
- function U(K) {
381
- K.preventDefault(), K.stopPropagation(), j();
382
- }
383
- const J = pe(() => {
384
- F && Q();
385
- });
386
- i.useEffect(() => J, [J]);
387
- const Z = i.useRef(m);
388
- m !== void 0 && (Z.current = m);
389
- const ae = i.useRef(h);
390
- h !== void 0 && (ae.current = h);
391
- const le = m ?? Z.current, ee = h ?? ae.current ?? 0, L = Ce(p) ? /* @__PURE__ */ i.createElement("div", {
392
- className: O(`${I}-title`, s == null ? void 0 : s.title),
393
- style: a == null ? void 0 : a.title
394
- }, p) : null, ue = Ce(l) ? /* @__PURE__ */ i.createElement("div", {
395
- className: O(`${I}-description`, s == null ? void 0 : s.description),
396
- style: a == null ? void 0 : a.description
397
- }, l) : null, fe = L !== null, de = ue !== null;
398
- let se;
399
- fe && de ? se = /* @__PURE__ */ i.createElement("div", {
400
- className: O(`${I}-section`, s == null ? void 0 : s.section),
401
- style: a == null ? void 0 : a.section
402
- }, L, ue) : se = L || ue, Ce(u) && (se = /* @__PURE__ */ i.createElement("div", {
403
- className: O(`${I}-wrapper`, s == null ? void 0 : s.wrapper),
404
- style: a == null ? void 0 : a.wrapper
405
- }, /* @__PURE__ */ i.createElement("div", {
406
- className: O(`${I}-icon`, s == null ? void 0 : s.icon),
407
- style: a == null ? void 0 : a.icon
408
- }, u), se));
409
- const xe = tt(d) ? /* @__PURE__ */ i.createElement("div", {
410
- className: O(`${I}-actions`, s == null ? void 0 : s.actions),
411
- style: a == null ? void 0 : a.actions
412
- }, d) : null, me = {
413
- "--notification-index": ee,
414
- ...a == null ? void 0 : a.root,
415
- ...r
416
- };
417
- le !== void 0 && (me["--notification-y"] = `${le}px`);
418
- const ye = g ?? (f == null ? void 0 : f.role) ?? "alert";
419
- return /* @__PURE__ */ i.createElement("div", Te({}, f, {
420
- ref: t,
421
- role: ye,
422
- "data-notification-index": ee,
423
- className: O(I, o, s == null ? void 0 : s.root, {
424
- [`${I}-closable`]: A,
425
- [`${I}-stack-in-threshold`]: S
426
- }),
427
- style: me,
428
- onClick: b,
429
- onMouseEnter: ne,
430
- onMouseLeave: Q
431
- }), se, xe, A && /* @__PURE__ */ i.createElement("button", Te({
432
- type: "button",
433
- className: O(`${I}-close`, s == null ? void 0 : s.close),
434
- "aria-label": "Close"
435
- }, V, {
436
- style: a == null ? void 0 : a.close,
437
- onClick: U
438
- }), k.closeIcon), v && typeof E == "number" && E > 0 && /* @__PURE__ */ i.createElement(_, {
439
- className: O(`${I}-progress`, s == null ? void 0 : s.progress),
440
- percent: q,
441
- style: a == null ? void 0 : a.progress
442
- }));
443
- });
444
- process.env.NODE_ENV !== "production" && (st.displayName = "Notification");
445
- const Lt = /* @__PURE__ */ i.createContext({}), Gn = ({
446
- children: e,
447
- classNames: t
448
- }) => {
449
- const n = i.useMemo(() => ({
450
- classNames: t
451
- }), [t]);
452
- return /* @__PURE__ */ i.createElement(Lt.Provider, {
453
- value: n
454
- }, e);
455
- };
456
- function Ze() {
457
- return Ze = Object.assign ? Object.assign.bind() : function(e) {
458
- for (var t = 1; t < arguments.length; t++) {
459
- var n = arguments[t];
460
- for (var o in n)
461
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
462
- }
463
- return e;
464
- }, Ze.apply(this, arguments);
465
- }
466
- const Dt = /* @__PURE__ */ i.forwardRef((e, t) => {
467
- const {
468
- listPrefixCls: n,
469
- height: o,
470
- topNoticeHeight: r = 0,
471
- topNoticeWidth: s = 0,
472
- className: a,
473
- style: c,
474
- ...p
475
- } = e, l = `${n}-content`, u = i.useRef(o), d = u.current, g = o < d ? "decrease" : "increase";
476
- u.current = o;
477
- const y = {
478
- ...c,
479
- height: o,
480
- "--top-notificiation-height": `${r}px`,
481
- "--top-notificiation-width": `${s}px`
482
- };
483
- return /* @__PURE__ */ i.createElement("div", Ze({}, p, {
484
- className: O(l, `${l}-${g}`, a),
485
- style: y,
486
- ref: t
487
- }));
488
- });
489
- process.env.NODE_ENV !== "production" && (Dt.displayName = "NotificationListContent");
490
- function He() {
491
- return He = Object.assign ? Object.assign.bind() : function(e) {
492
- for (var t = 1; t < arguments.length; t++) {
493
- var n = arguments[t];
494
- for (var o in n)
495
- Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
496
- }
497
- return e;
498
- }, He.apply(this, arguments);
499
- }
500
- const kt = ["wrapper", "root", "icon", "section", "title", "description", "actions", "close", "progress"];
501
- function Un(e) {
502
- return kt.reduce((t, n) => (t[n] = O(...e.map((o) => o == null ? void 0 : o[n])), t), {});
503
- }
504
- function Xn(e) {
505
- return kt.reduce((t, n) => (t[n] = Object.assign({}, ...e.map((o) => o == null ? void 0 : o[n])), t), {});
506
- }
507
- function qn(e, t) {
508
- const n = String(t), o = e.findIndex((r) => r.key === n);
509
- if (o !== -1)
510
- return e.length - o - 1;
511
- }
512
- const Qn = (e) => {
513
- const {
514
- config: t,
515
- components: n,
516
- contextClassNames: o,
517
- classNames: r,
518
- styles: s,
519
- className: a,
520
- style: c,
521
- nodeRef: p,
522
- listHovering: l,
523
- stackEnabled: u,
524
- pauseOnHover: d,
525
- setNodeSize: g,
526
- onNoticeClose: y,
527
- ...m
528
- } = e, {
529
- key: h,
530
- placement: S,
531
- ...f
532
- } = t, E = String(h), v = i.useCallback((C) => {
533
- g(E, C);
534
- }, [g, E]), $ = sn(p, v);
535
- return /* @__PURE__ */ i.createElement(st, He({}, f, m, {
536
- ref: $,
537
- className: O(o == null ? void 0 : o.notice, t.className, a),
538
- style: {
539
- ...c,
540
- ...t.style
541
- },
542
- classNames: Un([r, t.classNames]),
543
- styles: Xn([s, t.styles]),
544
- components: {
545
- ...n,
546
- ...t.components
547
- },
548
- hovering: u && l,
549
- pauseOnHover: t.pauseOnHover ?? d,
550
- onClose: () => {
551
- var C;
552
- (C = t.onClose) == null || C.call(t), y == null || y(h);
553
- }
554
- }));
555
- }, Ft = (e) => {
556
- const {
557
- configList: t = [],
558
- prefixCls: n = "rc-notification",
559
- pauseOnHover: o,
560
- classNames: r,
561
- styles: s,
562
- components: a,
563
- stack: c,
564
- motion: p,
565
- placement: l,
566
- className: u,
567
- style: d,
568
- onNoticeClose: g,
569
- onAllRemoved: y
570
- } = e, {
571
- classNames: m
572
- } = i.useContext(Lt), h = i.useMemo(() => t.map((B) => ({
573
- config: B,
574
- key: String(B.key)
575
- })), [t]), S = typeof p == "function" ? p(l) : p, [f, {
576
- offset: E,
577
- threshold: v
578
- }] = jn(c), [$, C] = i.useState(!1), b = f && ($ || h.length <= v), x = i.useMemo(() => {
579
- if (!(!f || b))
580
- return {
581
- offset: E,
582
- threshold: v
583
- };
584
- }, [b, E, f, v]), [N, M] = i.useState(0), H = i.useRef(null), [P, I, A, k, V] = Vn(t, x, N), j = !!t.length;
585
- i.useEffect(() => {
586
- const B = H.current;
587
- if (!B)
588
- return;
589
- const {
590
- gap: X,
591
- rowGap: Y
592
- } = window.getComputedStyle(B), q = parseFloat(Y || X) || 0;
593
- M((_) => _ === q ? _ : q);
594
- }, [j]);
595
- const F = `${n}-list`;
596
- return /* @__PURE__ */ i.createElement("div", {
597
- className: O(n, F, `${n}-${l}`, m == null ? void 0 : m.list, u, r == null ? void 0 : r.list, {
598
- [`${n}-stack`]: f,
599
- [`${n}-stack-expanded`]: b,
600
- [`${F}-hovered`]: $
601
- }),
602
- style: {
603
- ...s == null ? void 0 : s.list,
604
- ...d
605
- }
606
- }, /* @__PURE__ */ i.createElement(Dt, {
607
- listPrefixCls: F,
608
- height: A,
609
- topNoticeHeight: k,
610
- topNoticeWidth: V,
611
- className: r == null ? void 0 : r.listContent,
612
- style: s == null ? void 0 : s.listContent,
613
- ref: H,
614
- onMouseEnter: () => {
615
- C(!0);
616
- },
617
- onMouseLeave: () => {
618
- C(!1);
619
- }
620
- }, /* @__PURE__ */ i.createElement(_n, He({
621
- component: !1,
622
- keys: h,
623
- motionAppear: !0
624
- }, S, {
625
- onAllRemoved: () => {
626
- l && (y == null || y(l));
627
- }
628
- }), ({
629
- config: B,
630
- className: X,
631
- style: Y
632
- }, q) => {
633
- const {
634
- key: _
635
- } = B, ne = String(_), Q = qn(h, _), U = f && Q !== void 0 && Q < v;
636
- return /* @__PURE__ */ i.createElement(Qn, {
637
- key: _,
638
- config: B,
639
- components: a,
640
- contextClassNames: m,
641
- classNames: r,
642
- styles: s,
643
- className: X,
644
- style: Y,
645
- nodeRef: q,
646
- prefixCls: n,
647
- offset: P.get(ne),
648
- notificationIndex: Q,
649
- stackInThreshold: U,
650
- listHovering: $,
651
- stackEnabled: f,
652
- pauseOnHover: o,
653
- setNodeSize: I,
654
- onNoticeClose: g
655
- });
656
- })));
657
- }, _t = /* @__PURE__ */ i.forwardRef((e, t) => {
658
- const {
659
- prefixCls: n = "rc-notification",
660
- container: o,
661
- motion: r,
662
- maxCount: s,
663
- pauseOnHover: a,
664
- classNames: c,
665
- styles: p,
666
- components: l,
667
- className: u,
668
- style: d,
669
- onAllRemoved: g,
670
- stack: y,
671
- renderNotifications: m
672
- } = e, [h, S] = i.useState([]), [f, E] = i.useState({}), v = i.useRef(!1);
673
- i.useImperativeHandle(t, () => ({
674
- open: (b) => {
675
- S((x) => {
676
- var P;
677
- let N = [...x];
678
- const M = N.findIndex((I) => I.key === b.key), H = {
679
- ...b
680
- };
681
- return M >= 0 ? (H.times = (((P = x[M]) == null ? void 0 : P.times) ?? 0) + 1, N[M] = H) : (H.times = 0, N.push(H)), s && s > 0 && N.length > s && (N = N.slice(-s)), N;
682
- });
683
- },
684
- close: (b) => {
685
- S((x) => x.filter((N) => N.key !== b));
686
- },
687
- destroy: () => {
688
- S([]);
689
- }
690
- })), i.useEffect(() => {
691
- const b = {};
692
- h.forEach((x) => {
693
- const N = x.placement ?? "topRight";
694
- b[N] = b[N] || [], b[N].push(x);
695
- }), Object.keys(f).forEach((x) => {
696
- b[x] = b[x] || [];
697
- }), E(b);
698
- }, [h]);
699
- const $ = pe((b) => {
700
- E((x) => {
701
- const N = {
702
- ...x
703
- };
704
- return (N[b] || []).length || delete N[b], N;
705
- });
706
- });
707
- if (i.useEffect(() => {
708
- Object.keys(f).length > 0 ? v.current = !0 : v.current && (g == null || g(), v.current = !1);
709
- }, [f, g]), !o)
710
- return null;
711
- const C = Object.keys(f);
712
- return /* @__PURE__ */ $n(/* @__PURE__ */ i.createElement(i.Fragment, null, C.map((b) => {
713
- const x = /* @__PURE__ */ i.createElement(Ft, {
714
- key: b,
715
- configList: f[b],
716
- placement: b,
717
- prefixCls: n,
718
- pauseOnHover: a,
719
- classNames: c,
720
- styles: p,
721
- components: l,
722
- className: u == null ? void 0 : u(b),
723
- style: d == null ? void 0 : d(b),
724
- motion: r,
725
- stack: y,
726
- onNoticeClose: (N) => {
727
- S((M) => M.filter((H) => H.key !== N));
728
- },
729
- onAllRemoved: $
730
- });
731
- return m ? /* @__PURE__ */ i.cloneElement(m(x, {
732
- prefixCls: n,
733
- key: b
734
- }), {
735
- key: b
736
- }) : x;
737
- })), o);
738
- });
739
- process.env.NODE_ENV !== "production" && (_t.displayName = "Notifications");
740
- const Yn = () => document.body;
741
- let gt = 0;
742
- function Jn(...e) {
743
- const t = {};
744
- return e.forEach((n) => {
745
- n && Object.keys(n).forEach((o) => {
746
- const r = n[o];
747
- r !== void 0 && (t[o] = r);
748
- });
749
- }), t;
750
- }
751
- function Zn(e = {}) {
752
- const {
753
- getContainer: t = Yn,
754
- motion: n,
755
- prefixCls: o,
756
- placement: r,
757
- closable: s,
758
- duration: a,
759
- showProgress: c,
760
- pauseOnHover: p,
761
- classNames: l,
762
- styles: u,
763
- components: d,
764
- maxCount: g,
765
- className: y,
766
- style: m,
767
- onAllRemoved: h,
768
- stack: S,
769
- renderNotifications: f
770
- } = e, E = {
771
- placement: r,
772
- closable: s,
773
- duration: a,
774
- showProgress: c
775
- }, [v, $] = i.useState(), C = i.useRef(null), [b, x] = i.useState([]), N = /* @__PURE__ */ i.createElement(_t, {
776
- container: v,
777
- ref: C,
778
- prefixCls: o,
779
- motion: n,
780
- maxCount: g,
781
- pauseOnHover: p,
782
- classNames: l,
783
- styles: u,
784
- components: d,
785
- className: y,
786
- style: m,
787
- onAllRemoved: h,
788
- stack: S,
789
- renderNotifications: f
790
- }), M = pe((P) => {
791
- const I = Jn(E, P);
792
- (I.key === null || I.key === void 0) && (I.key = `rc-notification-${gt}`, gt += 1), x((A) => [...A, {
793
- type: "open",
794
- config: I
795
- }]);
796
- }), H = i.useMemo(() => ({
797
- open: M,
798
- close: (P) => {
799
- x((I) => [...I, {
800
- type: "close",
801
- key: P
802
- }]);
803
- },
804
- destroy: () => {
805
- x((P) => [...P, {
806
- type: "destroy"
807
- }]);
808
- }
809
- }), []);
810
- return i.useEffect(() => {
811
- $(t());
812
- }), i.useEffect(() => {
813
- C.current && b.length && (b.forEach((P) => {
814
- var I, A, k;
815
- switch (P.type) {
816
- case "open":
817
- (I = C.current) == null || I.open(P.config);
818
- break;
819
- case "close":
820
- (A = C.current) == null || A.close(P.key);
821
- break;
822
- case "destroy":
823
- (k = C.current) == null || k.destroy();
824
- break;
825
- }
826
- }), x((P) => {
827
- const I = P.filter((A) => !b.includes(A));
828
- return I.length === P.length ? P : I;
829
- }));
830
- }, [b]), [H, N];
831
- }
832
- const eo = (e, t) => i.useMemo(() => {
833
- const n = e ?? t;
834
- return n ? {
835
- ...ve(t) ? t : {},
836
- ...ve(n) ? n : {}
837
- } : !1;
838
- }, [e, t]);
839
- function to(e, t) {
840
- return {
841
- ...Ce(e) && {
842
- "--notification-top": G(e)
843
- },
844
- ...Ce(t) && {
845
- "--notification-bottom": G(t)
846
- }
847
- };
848
- }
849
- const no = (e) => {
850
- const {
851
- motionDurationMid: t,
852
- motionEaseInOut: n
853
- } = e, o = `${t} ${n}`;
854
- return {
855
- transform: "scale(var(--notification-scale, 1))",
856
- transition: ["transform", "inset", "clip-path", "opacity"].map((r) => `${r} ${o}`).join(", ")
857
- };
858
- }, At = (e, t) => {
859
- const {
860
- componentCls: n,
861
- antCls: o,
862
- colorSuccess: r,
863
- colorInfo: s,
864
- colorWarning: a,
865
- colorError: c,
866
- colorTextHeading: p,
867
- colorText: l,
868
- boxShadow: u,
869
- borderRadiusLG: d,
870
- fontSize: g,
871
- lineHeight: y,
872
- notificationBg: m,
873
- notificationPadding: h,
874
- notificationMarginEdge: S,
875
- margin: f,
876
- calc: E
877
- } = e, v = `${n}-notice`, [$, C] = vt(o, "notification");
878
- return {
879
- [v]: {
880
- // ============================== Base ==============================
881
- position: "absolute",
882
- width: t.width,
883
- maxWidth: `calc(100vw - ${G(E(S).mul(2).equal())})`,
884
- padding: h,
885
- pointerEvents: "auto",
886
- [$("icon-font-size")]: t.iconFontSize,
887
- [$("title-font-size")]: t.titleFontSize,
888
- [$("title-line-height")]: t.titleLineHeight,
889
- boxSizing: "border-box",
890
- color: l,
891
- background: m,
892
- borderRadius: d,
893
- boxShadow: u,
894
- fontSize: g,
895
- lineHeight: y,
896
- wordWrap: "break-word",
897
- overflow: "visible",
898
- ...no(e),
899
- ...t.noticeStyle,
900
- "&::after": {
901
- position: "absolute",
902
- insetInline: 0,
903
- top: E(f).mul(-1).equal(),
904
- height: f,
905
- content: '""'
906
- },
907
- // ============================== Type ==============================
908
- ...t.typeStyle && {
909
- "&-success": {
910
- background: C("color-success-bg", m)
911
- },
912
- "&-error": {
913
- background: C("color-error-bg", m)
914
- },
915
- "&-info": {
916
- background: C("color-info-bg", m)
917
- },
918
- "&-warning": {
919
- background: C("color-warning-bg", m)
920
- }
921
- }
922
- },
923
- // ============================ Wrapper ============================
924
- [`${v}-wrapper`]: {
925
- display: "flex",
926
- ...t.contentStyle
927
- },
928
- [`${v}-title`]: {
929
- color: p,
930
- fontSize: C("title-font-size"),
931
- lineHeight: C("title-line-height")
932
- },
933
- // ============================= Icon =============================
934
- // Icon & color style in different selector level
935
- // https://github.com/ant-design/ant-design/issues/16503
936
- // https://github.com/ant-design/ant-design/issues/15512
937
- [`${v}-icon`]: {
938
- flex: "none",
939
- fontSize: C("icon-font-size"),
940
- lineHeight: 1,
941
- [`&${v}-icon-success`]: {
942
- color: r
943
- },
944
- [`&${v}-icon-info, &${v}-icon-loading`]: {
945
- color: s
946
- },
947
- [`&${v}-icon-warning`]: {
948
- color: a
949
- },
950
- [`&${v}-icon-error`]: {
951
- color: c
952
- }
953
- }
954
- };
955
- }, Vt = (e) => {
956
- const {
957
- componentCls: t,
958
- progressBg: n,
959
- notificationProgressHeight: o,
960
- fontSize: r,
961
- borderRadiusLG: s,
962
- width: a,
963
- notificationIconSize: c,
964
- colorText: p,
965
- motionDurationMid: l,
966
- fontSizeLG: u,
967
- lineHeightLG: d,
968
- marginSM: g,
969
- marginXS: y,
970
- paddingLG: m,
971
- notificationPaddingVertical: h,
972
- notificationPaddingHorizontal: S,
973
- notificationCloseButtonSize: f,
974
- colorIcon: E,
975
- borderRadiusSM: v,
976
- colorIconHover: $,
977
- colorBgTextHover: C,
978
- colorBgTextActive: b
979
- } = e, x = `${t}-notice`;
980
- return {
981
- ...At(e, {
982
- width: a,
983
- iconFontSize: c,
984
- titleFontSize: u,
985
- titleLineHeight: d,
986
- contentStyle: {
987
- alignItems: "flex-start",
988
- gap: g
989
- },
990
- typeStyle: !0
991
- }),
992
- [`${x}-section`]: {
993
- display: "flex",
994
- flexDirection: "column",
995
- flex: "auto",
996
- gap: y,
997
- minWidth: 0
998
- },
999
- [`${x}-description`]: {
1000
- color: p,
1001
- fontSize: r
1002
- },
1003
- [`${x}-closable`]: {
1004
- [`${x}-title, ${x}-description`]: {
1005
- paddingInlineEnd: m
1006
- },
1007
- [`${x}-title + ${x}-description`]: {
1008
- paddingInlineEnd: 0
1009
- }
1010
- },
1011
- // ============================ Close =============================
1012
- [`${x}-close`]: {
1013
- position: "absolute",
1014
- top: h,
1015
- insetInlineEnd: S,
1016
- display: "flex",
1017
- alignItems: "center",
1018
- justifyContent: "center",
1019
- width: f,
1020
- height: f,
1021
- color: E,
1022
- background: "none",
1023
- border: "none",
1024
- borderRadius: v,
1025
- outline: "none",
1026
- transition: ["color", "background-color"].map((N) => `${N} ${l}`).join(", "),
1027
- "&:hover": {
1028
- color: $,
1029
- backgroundColor: C
1030
- },
1031
- "&:active": {
1032
- backgroundColor: b
1033
- },
1034
- ...rn(e)
1035
- },
1036
- // =========================== Progress ===========================
1037
- [`${x}-progress`]: {
1038
- position: "absolute",
1039
- bottom: 0,
1040
- display: "block",
1041
- appearance: "none",
1042
- inlineSize: `calc(100% - ${G(s)} * 2)`,
1043
- blockSize: o,
1044
- border: 0,
1045
- left: {
1046
- _skip_check_: !0,
1047
- value: s
1048
- },
1049
- right: {
1050
- _skip_check_: !0,
1051
- value: s
1052
- },
1053
- "&, &::-webkit-progress-bar": {
1054
- borderRadius: s,
1055
- backgroundColor: "rgba(0, 0, 0, 0.04)"
1056
- },
1057
- "&::-moz-progress-bar": {
1058
- background: n
1059
- },
1060
- "&::-webkit-progress-value": {
1061
- borderRadius: s,
1062
- background: n
1063
- }
1064
- },
1065
- // ============================ Action ============================
1066
- [`${x}-actions`]: {
1067
- float: "right",
1068
- marginTop: g
1069
- }
1070
- };
1071
- }, oo = (e) => {
1072
- const {
1073
- componentCls: t,
1074
- width: n
1075
- } = e, o = `${t}-notice`, r = `${o}-actions`, s = Vt(e);
1076
- return {
1077
- [`${o}-pure-panel`]: {
1078
- width: n,
1079
- maxWidth: "100%",
1080
- ...s,
1081
- [o]: {
1082
- ...s[o],
1083
- position: "relative",
1084
- width: "100%",
1085
- maxWidth: "100%"
1086
- },
1087
- [r]: {
1088
- ...s[r],
1089
- float: "none",
1090
- textAlign: "end"
1091
- }
1092
- }
1093
- };
1094
- }, so = (e) => {
1095
- const {
1096
- componentCls: t
1097
- } = e;
1098
- return {
1099
- [t]: Vt(e)
1100
- };
1101
- }, io = ["top", "topLeft", "topRight", "bottom", "bottomLeft", "bottomRight"], ro = "--notification-margin-edge", ao = (e, t) => ({
1102
- blockEnd: e === "top" ? "bottom" : "top",
1103
- inlineEnd: t === "left" ? "right" : "left"
1104
- }), ht = (e) => {
1105
- const t = (e == null ? void 0 : e.x) ?? "0", n = (e == null ? void 0 : e.y) ?? "0";
1106
- return `translate3d(${t}, ${n}, 0) scale(var(--notification-scale, 1))`;
1107
- }, co = (e, t) => {
1108
- const n = e.startsWith("bottom") ? "bottom" : "top", o = e.endsWith("Right") ? "right" : "left", {
1109
- blockEnd: r,
1110
- inlineEnd: s
1111
- } = ao(n, o), a = e === "top" || e === "bottom", c = e === "top" || e.endsWith("Left") ? `-${t}` : t;
1112
- return {
1113
- placement: e,
1114
- vertical: n,
1115
- blockEnd: r,
1116
- horizontal: o,
1117
- inlineEnd: s,
1118
- motionOffset: a ? {
1119
- x: "-50%",
1120
- y: c
1121
- } : {
1122
- x: c
1123
- },
1124
- baseMotionOffset: a ? {
1125
- x: "-50%"
1126
- } : void 0,
1127
- isCenterPlacement: a
1128
- };
1129
- }, lo = (e) => e === "bottom" ? "column-reverse" : "column", uo = (e) => {
1130
- const t = `var(${ro}, 0px)`;
1131
- return `calc(var(--notification-${e}, ${t}) - ${t})`;
1132
- }, fo = (e) => e === "bottom" ? "center top" : "center bottom", jt = (e) => G(e.calc(e.marginXXL).mul(-1).equal()), po = (e) => {
1133
- const t = jt(e);
1134
- return `inset(${t} ${t} ${t} ${t})`;
1135
- }, mo = (e, t) => {
1136
- const n = jt(e);
1137
- return t === "bottom" ? `inset(${n} ${n} 50% ${n})` : `inset(50% ${n} ${n} ${n})`;
1138
- }, go = (e, t) => {
1139
- const {
1140
- componentCls: n
1141
- } = e, {
1142
- placement: o,
1143
- vertical: r,
1144
- blockEnd: s,
1145
- horizontal: a,
1146
- inlineEnd: c,
1147
- // Horizontal centered
1148
- isCenterPlacement: p
1149
- } = t, l = `${n}-notice`, u = `${l}${n}-fade`, d = ht(t.motionOffset), g = ht(t.baseMotionOffset), y = fo(r);
1150
- return {
1151
- [`&${n}-${o}`]: {
1152
- [r]: uo(r),
1153
- [s]: "auto",
1154
- display: "flex",
1155
- flexDirection: lo(r),
1156
- ...p ? {
1157
- marginInline: 0,
1158
- left: "50%",
1159
- right: "auto",
1160
- transform: "translateX(-50%)"
1161
- } : {
1162
- [a]: 0,
1163
- [c]: "auto"
1164
- },
1165
- [l]: {
1166
- [r]: "var(--notification-y, 0)",
1167
- ...p ? {
1168
- left: "50%",
1169
- transform: g
1170
- } : {
1171
- [a]: "var(--notification-x, 0)"
1172
- },
1173
- transformOrigin: y
1174
- },
1175
- [`${u}-appear-prepare, ${u}-enter-prepare`]: {
1176
- opacity: 0,
1177
- transform: d,
1178
- transition: "none"
1179
- },
1180
- [`${u}-appear-start, ${u}-enter-start`]: {
1181
- opacity: 0,
1182
- transform: d
1183
- },
1184
- [`${u}-appear-active, ${u}-enter-active`]: {
1185
- opacity: 1,
1186
- transform: g
1187
- },
1188
- [`${u}-leave`]: {
1189
- pointerEvents: "none",
1190
- "&-start": {
1191
- opacity: 1,
1192
- transform: g
1193
- },
1194
- "&-active": {
1195
- opacity: 0,
1196
- transform: d
1197
- }
1198
- },
1199
- [`&${n}-stack:not(${n}-stack-expanded)`]: {
1200
- [l]: {
1201
- clipPath: mo(e, r)
1202
- },
1203
- [`${l}[data-notification-index='0']`]: {
1204
- clipPath: po(e)
1205
- }
1206
- }
1207
- }
1208
- };
1209
- }, ho = (e, t = io) => {
1210
- const {
1211
- notificationMotionOffset: n
1212
- } = e, o = G(n);
1213
- return {
1214
- ...t.reduce((r, s) => ({
1215
- ...r,
1216
- ...go(e, co(s, o))
1217
- }), {})
1218
- };
1219
- }, yo = (e) => {
1220
- const {
1221
- componentCls: t
1222
- } = e;
1223
- return {
1224
- [t]: ho(e)
1225
- };
1226
- }, Co = 3, Bt = (e) => ({
1227
- zIndexPopup: e.zIndexPopupBase + xt + 50,
1228
- width: 384,
1229
- progressBg: `linear-gradient(90deg, ${e.colorPrimaryBorderHover}, ${e.colorPrimary})`,
1230
- // Fix notification background color issue
1231
- // https://github.com/ant-design/ant-design/issues/55649
1232
- // https://github.com/ant-design/ant-design/issues/56055
1233
- colorSuccessBg: void 0,
1234
- colorErrorBg: void 0,
1235
- colorInfoBg: void 0,
1236
- colorWarningBg: void 0
1237
- }), it = (e) => {
1238
- const t = e.paddingMD, n = e.paddingLG;
1239
- return Le(e, {
1240
- notificationBg: e.colorBgElevated,
1241
- notificationPaddingVertical: t,
1242
- notificationPaddingHorizontal: n,
1243
- notificationIconSize: e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),
1244
- notificationCloseButtonSize: e.calc(e.controlHeightLG).mul(0.55).equal(),
1245
- notificationMarginBottom: e.margin,
1246
- notificationPadding: `${G(e.paddingMD)} ${G(e.paddingContentHorizontalLG)}`,
1247
- notificationMarginEdge: e.marginLG,
1248
- notificationProgressHeight: 2,
1249
- notificationMotionOffset: 64
1250
- });
1251
- }, vo = (e) => `inset(${e} ${e} ${e} ${e})`, bo = (e, t) => {
1252
- const {
1253
- componentCls: n,
1254
- motionDurationMid: o,
1255
- motionDurationSlow: r,
1256
- motionEaseInOut: s
1257
- } = e, c = `${`${n}-list`}-content`;
1258
- return {
1259
- [c]: {
1260
- position: "relative",
1261
- display: "flex",
1262
- flexShrink: 0,
1263
- flexDirection: "column",
1264
- gap: e.notificationMarginBottom,
1265
- width: "100%",
1266
- willChange: "height, transform",
1267
- transition: "none",
1268
- pointerEvents: t,
1269
- [`&${c}-decrease`]: {
1270
- transition: `height calc(${r} * 2) ${s} ${o}`
1271
- }
1272
- },
1273
- // ============================ Motion ============================
1274
- [`${n}-fade`]: {
1275
- backfaceVisibility: "hidden",
1276
- willChange: "transform, opacity"
1277
- }
1278
- };
1279
- }, xo = (e, t) => {
1280
- const {
1281
- componentCls: n,
1282
- notificationMarginEdge: o
1283
- } = e, r = "--notification-margin-edge", s = `${n}-notice`, a = `${n}-list`, c = t.listWidthKey ? e.calc(e[t.listWidthKey]).add(e.calc(o).mul(2)).equal() : "100%", p = t.stackVisibleCount ?? Co, l = `${s}:nth-last-child(n + ${p + 1})`, u = G(e.calc(e.marginXXL).mul(-1).equal()), d = vo(u);
1284
- return {
1285
- [n]: {
1286
- ...an(e),
1287
- [r]: G(o),
1288
- // ============================ Holder ============================
1289
- position: "fixed",
1290
- zIndex: e.zIndexPopup,
1291
- width: c,
1292
- maxWidth: "100vw",
1293
- height: "100vh",
1294
- overflow: "hidden",
1295
- overscrollBehavior: "contain",
1296
- // ============================= List =============================
1297
- [`&${a}`]: {
1298
- maxHeight: "100vh",
1299
- padding: `var(${r})`,
1300
- overflowX: "hidden",
1301
- overflowY: "auto",
1302
- overscrollBehavior: "contain",
1303
- scrollbarWidth: "none",
1304
- pointerEvents: "none",
1305
- "&::-webkit-scrollbar": {
1306
- display: "none",
1307
- width: 0,
1308
- height: 0
1309
- }
1310
- },
1311
- ...bo(e, t.listContentPointerEvents ?? "auto"),
1312
- // ============================ Stack ============================
1313
- [`&${n}-stack`]: {
1314
- [s]: {
1315
- clipPath: d
1316
- },
1317
- [`&:not(${n}-stack-expanded)`]: {
1318
- [s]: {
1319
- "--notification-scale": "calc(1 - min(var(--notification-index, 0), 2) * 0.06)"
1320
- },
1321
- [`${s}:not(${s}-stack-in-threshold)`]: {
1322
- opacity: 0,
1323
- pointerEvents: "none"
1324
- },
1325
- [l]: {
1326
- opacity: 0,
1327
- pointerEvents: "none"
1328
- }
1329
- }
1330
- },
1331
- // ============================== RTL =============================
1332
- "&-rtl": {
1333
- direction: "rtl",
1334
- [`${s}-actions`]: {
1335
- float: "left"
1336
- }
1337
- }
1338
- }
1339
- };
1340
- };
1341
- bt(["Notification", "PurePanel"], (e) => oo(it(e)), Bt);
1342
- const Kt = (e, t) => {
1343
- const n = t.itemStyle ?? so;
1344
- return [xo(e, t), n(e), yo(e)];
1345
- };
1346
- De("Notification", (e) => {
1347
- const t = it(e);
1348
- return Kt(t, {
1349
- listWidthKey: "width"
1350
- });
1351
- }, Bt);
1352
- const Wt = (e) => {
1353
- const t = e.calc(e.controlHeightLG).sub(e.calc(e.fontSize).mul(e.lineHeight)).div(2).equal(), n = e.paddingSM;
1354
- return Le(it(e), {
1355
- notificationBg: e.contentBg,
1356
- notificationPadding: e.contentPadding,
1357
- notificationPaddingVertical: t,
1358
- notificationPaddingHorizontal: n
1359
- });
1360
- }, Gt = (e) => ({
1361
- zIndexPopup: e.zIndexPopupBase + xt + 10,
1362
- contentBg: e.colorBgElevated,
1363
- contentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
1364
- }), rt = (e) => {
1365
- const {
1366
- fontSize: t,
1367
- fontSizeLG: n,
1368
- lineHeight: o
1369
- } = e;
1370
- return At(e, {
1371
- // Adjust card style since Message is not same as Notification.
1372
- // Message needs horizontal center and not fix width.
1373
- width: "max-content",
1374
- iconFontSize: n,
1375
- titleFontSize: t,
1376
- titleLineHeight: o,
1377
- contentStyle: {
1378
- alignItems: "center",
1379
- gap: e.marginXS
1380
- },
1381
- noticeStyle: {
1382
- zIndex: 1
1383
- }
1384
- });
1385
- }, So = (e) => {
1386
- const {
1387
- componentCls: t
1388
- } = e, n = `${t}-notice`, o = `${t}-list-content`, r = rt(e), {
1389
- "&::after": s,
1390
- ...a
1391
- } = r[n], c = {
1392
- ...a,
1393
- position: "absolute",
1394
- zIndex: -1,
1395
- left: "50%",
1396
- height: e.calc(e.marginXS).mul(2).equal(),
1397
- padding: 0,
1398
- boxShadow: e.boxShadowTertiary,
1399
- opacity: 0,
1400
- pointerEvents: "none",
1401
- transform: "translateX(-50%) translateY(100%)",
1402
- transition: [`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`, `transform ${e.motionDurationFast} ${e.motionEaseInOut}`, `width ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(", "),
1403
- content: '""'
1404
- };
1405
- return {
1406
- [t]: {
1407
- [`&${t}-stack`]: {
1408
- [o]: {
1409
- isolation: "isolate",
1410
- "&::before": {
1411
- ...c,
1412
- top: `calc(var(--top-notificiation-height) - ${G(e.marginXS)})`,
1413
- width: `calc(var(--top-notificiation-width) - ${G(e.margin)})`
1414
- },
1415
- "&::after": {
1416
- ...c,
1417
- zIndex: -2,
1418
- top: "var(--top-notificiation-height)",
1419
- width: `calc(var(--top-notificiation-width) - ${G(e.calc(e.margin).mul(2).equal())})`
1420
- }
1421
- },
1422
- [`&:not(${t}-stack-expanded)`]: {
1423
- [o]: {
1424
- "&::before, &::after": {
1425
- opacity: 1,
1426
- transform: "translateX(-50%) translateY(0)"
1427
- }
1428
- }
1429
- }
1430
- }
1431
- }
1432
- };
1433
- }, Eo = (e) => {
1434
- const {
1435
- componentCls: t
1436
- } = e, n = `${t}-notice`, o = rt(e);
1437
- return {
1438
- [`${n}-pure-panel`]: {
1439
- width: "max-content",
1440
- maxWidth: "100%",
1441
- ...o,
1442
- [n]: {
1443
- ...o[n],
1444
- position: "relative",
1445
- width: "max-content",
1446
- maxWidth: "100%"
1447
- }
1448
- }
1449
- };
1450
- }, $o = bt(["Message", "PurePanel"], (e) => Eo(Wt(e)), Gt), No = (e) => ({
1451
- [e.componentCls]: rt(e)
1452
- }), at = De("Message", (e) => {
1453
- const t = Wt(e);
1454
- return [Kt(t, {
1455
- stackVisibleCount: 1,
1456
- itemStyle: No,
1457
- // Message is centered per item and has no stack hover interaction, so the list
1458
- // content should stay transparent to pointer events like v5.
1459
- listContentPointerEvents: "none"
1460
- }), So(t)];
1461
- }, Gt), Po = {
1462
- info: /* @__PURE__ */ i.createElement(Ht, null),
1463
- success: /* @__PURE__ */ i.createElement(Rt, null),
1464
- error: /* @__PURE__ */ i.createElement(ln, null),
1465
- warning: /* @__PURE__ */ i.createElement(Mt, null),
1466
- loading: /* @__PURE__ */ i.createElement(cn, null)
1467
- }, ct = (e, t) => tt(t) ? t : e && Po[e] || null, Io = (e) => {
1468
- const {
1469
- prefixCls: t,
1470
- className: n,
1471
- style: o,
1472
- type: r,
1473
- icon: s,
1474
- content: a,
1475
- classNames: c,
1476
- styles: p,
1477
- ...l
1478
- } = e, {
1479
- getPrefixCls: u,
1480
- className: d,
1481
- style: g,
1482
- classNames: y,
1483
- styles: m
1484
- } = be("message"), h = t || u("message"), S = `${h}-notice`, f = nt(h), [E, v] = at(h, f), [$, C] = Pe([y, c], [m, p], {
1485
- props: e
1486
- }), b = ct(r, s), x = r ? `${S}-icon-${r}` : void 0, N = {
1487
- wrapper: O(r && `${h}-${r}`, $.wrapper),
1488
- icon: O(x, $.icon),
1489
- title: $.title
1490
- }, M = {
1491
- wrapper: C.wrapper,
1492
- icon: C.icon,
1493
- title: C.title
1494
- };
1495
- return /* @__PURE__ */ i.createElement("div", {
1496
- className: O(`${S}-pure-panel`, E, n, v, f, $.root),
1497
- style: C.root
1498
- }, /* @__PURE__ */ i.createElement($o, {
1499
- prefixCls: h
1500
- }), /* @__PURE__ */ i.createElement(st, {
1501
- ...l,
1502
- prefixCls: h,
1503
- className: d,
1504
- style: {
1505
- ...g,
1506
- ...o
1507
- },
1508
- duration: null,
1509
- icon: b,
1510
- title: a,
1511
- classNames: N,
1512
- styles: M
1513
- }));
1514
- };
1515
- function wo(e, t) {
1516
- return {
1517
- motionName: t ?? `${e}-fade`
1518
- };
1519
- }
1520
- function lt(e) {
1521
- let t;
1522
- const n = new Promise((r) => {
1523
- t = e(() => {
1524
- r(!0);
1525
- });
1526
- }), o = () => {
1527
- t == null || t();
1528
- };
1529
- return o.then = (r, s) => n.then(r, s), o.promise = n, o;
1530
- }
1531
- const Oo = 8, Ro = 3, Mo = !1, zo = ({
1532
- children: e,
1533
- prefixCls: t
1534
- }) => {
1535
- const n = nt(t), [o, r] = at(t, n);
1536
- return /* @__PURE__ */ i.createElement(Gn, {
1537
- classNames: {
1538
- list: O(o, r, n)
1539
- }
1540
- }, e);
1541
- }, To = (e, {
1542
- prefixCls: t,
1543
- key: n
1544
- }) => /* @__PURE__ */ i.createElement(zo, {
1545
- prefixCls: t,
1546
- key: n
1547
- }, e), Ho = /* @__PURE__ */ i.forwardRef((e, t) => {
1548
- const {
1549
- // Placement
1550
- top: n,
1551
- // Config
1552
- prefixCls: o,
1553
- getContainer: r,
1554
- maxCount: s,
1555
- duration: a = Ro,
1556
- // Style
1557
- rtl: c,
1558
- classNames: p,
1559
- styles: l,
1560
- // Motion
1561
- transitionName: u,
1562
- // UI
1563
- pauseOnHover: d = !0,
1564
- stack: g,
1565
- // Life Cycle
1566
- onAllRemoved: y
1567
- } = e, {
1568
- getPrefixCls: m,
1569
- direction: h,
1570
- getPopupContainer: S
1571
- } = be("message"), {
1572
- message: f
1573
- } = i.useContext(ke), E = o || m("message"), v = he(f == null ? void 0 : f.style), [$, C] = Pe([f == null ? void 0 : f.classNames, p], [f == null ? void 0 : f.styles, v, l], {
1574
- props: e
1575
- }), b = () => to(n ?? Oo), x = () => O({
1576
- [`${E}-rtl`]: c ?? h === "rtl"
1577
- }), N = () => wo(E, u), M = eo(g, Mo), [H, P] = Zn({
1578
- prefixCls: E,
1579
- style: b,
1580
- className: x,
1581
- motion: N,
1582
- // closable=false requires-no closeIcon
1583
- closable: !1,
1584
- duration: a,
1585
- getContainer: () => (r == null ? void 0 : r()) || (S == null ? void 0 : S()) || document.body,
1586
- maxCount: s,
1587
- onAllRemoved: y,
1588
- classNames: $,
1589
- styles: C,
1590
- renderNotifications: To,
1591
- pauseOnHover: d,
1592
- stack: M
1593
- });
1594
- return i.useImperativeHandle(t, () => ({
1595
- ...H,
1596
- prefixCls: E,
1597
- message: f
1598
- })), P;
1599
- });
1600
- let yt = 0;
1601
- function Ut(e) {
1602
- const t = i.useRef(null), n = ot("Message");
1603
- return [i.useMemo(() => {
1604
- const r = (l) => {
1605
- var u;
1606
- (u = t.current) == null || u.close(l);
1607
- }, s = (l) => {
1608
- if (!t.current) {
1609
- process.env.NODE_ENV !== "production" && n(!1, "usage", "You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");
1610
- const V = () => {
1611
- };
1612
- return V.then = () => {
1613
- }, V;
1614
- }
1615
- const {
1616
- open: u,
1617
- prefixCls: d,
1618
- message: g
1619
- } = t.current, y = (g == null ? void 0 : g.className) || {}, m = `${d}-notice`, {
1620
- content: h,
1621
- icon: S,
1622
- type: f,
1623
- key: E,
1624
- className: v,
1625
- style: $,
1626
- onClose: C,
1627
- classNames: b = {},
1628
- styles: x = {},
1629
- ...N
1630
- } = l;
1631
- let M = E;
1632
- Ce(M) || (yt += 1, M = `antd-message-${yt}`);
1633
- const H = {
1634
- ...e,
1635
- ...l
1636
- }, P = ft(b, {
1637
- props: H
1638
- }), I = ft(x, {
1639
- props: H
1640
- }), A = ct(f, S), k = f ? `${m}-icon-${f}` : void 0;
1641
- return lt((V) => (u({
1642
- ...N,
1643
- key: M,
1644
- icon: A,
1645
- title: h,
1646
- classNames: {
1647
- ...P,
1648
- wrapper: O(f && `${d}-${f}`, P == null ? void 0 : P.wrapper),
1649
- icon: O(k, P == null ? void 0 : P.icon)
1650
- },
1651
- styles: I,
1652
- placement: "top",
1653
- className: O({
1654
- [`${m}-${f}`]: f
1655
- }, v, y),
1656
- style: $,
1657
- onClose: () => {
1658
- C == null || C(), V();
1659
- }
1660
- }), () => {
1661
- r(M);
1662
- }));
1663
- }, c = {
1664
- open: s,
1665
- destroy: (l) => {
1666
- var u;
1667
- l !== void 0 ? r(l) : (u = t.current) == null || u.destroy();
1668
- }
1669
- };
1670
- return ["info", "success", "warning", "error", "loading"].forEach((l) => {
1671
- const u = (d, g, y) => {
1672
- let m;
1673
- ve(d) && "content" in d ? m = d : m = {
1674
- content: d
1675
- };
1676
- let h, S;
1677
- St(g) ? S = g : (h = g, S = y);
1678
- const f = {
1679
- onClose: S,
1680
- duration: h,
1681
- ...m,
1682
- type: l
1683
- };
1684
- return s(f);
1685
- };
1686
- c[l] = u;
1687
- }), c;
1688
- }, []), /* @__PURE__ */ i.createElement(Ho, {
1689
- key: "message-holder",
1690
- ...e,
1691
- ref: t
1692
- })];
1693
- }
1694
- function Lo(e) {
1695
- return Ut(e);
1696
- }
1697
- const Do = /* @__PURE__ */ ce.createContext({}), ko = (e) => {
1698
- const {
1699
- getPrefixCls: t,
1700
- direction: n
1701
- } = Re(ke), {
1702
- prefixCls: o,
1703
- className: r
1704
- } = e, s = t("input-group", o), a = t("input"), [c, p] = un(a), l = O(s, p, {
1705
- [`${s}-lg`]: e.size === "large",
1706
- [`${s}-sm`]: e.size === "small",
1707
- [`${s}-compact`]: e.compact,
1708
- [`${s}-rtl`]: n === "rtl"
1709
- }, c, r), u = Re(Me), d = Jt(() => ({
1710
- ...u,
1711
- isFormItemInput: !1
1712
- }), [u]);
1713
- return process.env.NODE_ENV !== "production" && ot("Input.Group").deprecated(!1, "Input.Group", "Space.Compact"), /* @__PURE__ */ i.createElement(Me.Provider, {
1714
- value: d
1715
- }, /* @__PURE__ */ i.createElement(fn.Compact, {
1716
- className: l,
1717
- style: e.style,
1718
- onMouseEnter: e.onMouseEnter,
1719
- onMouseLeave: e.onMouseLeave,
1720
- onFocus: e.onFocus,
1721
- onBlur: e.onBlur
1722
- }, e.children));
1723
- }, Fo = (e) => {
1724
- const {
1725
- componentCls: t,
1726
- paddingXS: n
1727
- } = e;
1728
- return {
1729
- [t]: {
1730
- display: "inline-flex",
1731
- alignItems: "center",
1732
- flexWrap: "nowrap",
1733
- columnGap: n,
1734
- [`${t}-input-wrapper`]: {
1735
- position: "relative",
1736
- [`${t}-mask-icon`]: {
1737
- position: "absolute",
1738
- zIndex: "1",
1739
- top: "50%",
1740
- right: "50%",
1741
- transform: "translate(50%, -50%)",
1742
- pointerEvents: "none"
1743
- },
1744
- [`${t}-mask-input`]: {
1745
- color: "transparent",
1746
- caretColor: e.colorText,
1747
- "&::selection": {
1748
- color: "transparent"
1749
- }
1750
- },
1751
- [`${t}-mask-input[type=number]::-webkit-inner-spin-button`]: {
1752
- "-webkit-appearance": "none",
1753
- margin: 0
1754
- },
1755
- [`${t}-mask-input[type=number]`]: {
1756
- "-moz-appearance": "textfield"
1757
- }
1758
- },
1759
- "&-rtl": {
1760
- direction: "rtl"
1761
- },
1762
- [`${t}-input`]: {
1763
- textAlign: "center",
1764
- paddingInline: e.paddingXXS
1765
- },
1766
- // ================= Size =================
1767
- [`&${t}-sm ${t}-input`]: {
1768
- paddingInline: e.calc(e.paddingXXS).div(2).equal()
1769
- },
1770
- [`&${t}-lg ${t}-input`]: {
1771
- paddingInline: e.paddingXS
1772
- }
1773
- }
1774
- };
1775
- }, _o = De(["Input", "OTP"], (e) => {
1776
- const t = Le(e, $t(e));
1777
- return Fo(t);
1778
- }, Et), Ao = "•", Vo = /* @__PURE__ */ i.forwardRef((e, t) => {
1779
- const {
1780
- className: n,
1781
- value: o,
1782
- onChange: r,
1783
- onActiveChange: s,
1784
- index: a,
1785
- mask: c,
1786
- onFocus: p,
1787
- type: l,
1788
- ...u
1789
- } = e, {
1790
- getPrefixCls: d
1791
- } = i.useContext(ke), g = d("otp"), y = typeof c == "string" ? c : Ao, m = i.useRef(null);
1792
- i.useImperativeHandle(t, () => m.current);
1793
- const h = (v) => {
1794
- r(a, v.target.value);
1795
- }, S = () => {
1796
- je(() => {
1797
- var $;
1798
- const v = ($ = m.current) == null ? void 0 : $.input;
1799
- document.activeElement === v && v && v.select();
1800
- });
1801
- }, f = (v) => {
1802
- p == null || p(v), S();
1803
- }, E = (v) => {
1804
- const {
1805
- key: $,
1806
- ctrlKey: C,
1807
- metaKey: b
1808
- } = v;
1809
- $ === "ArrowLeft" ? s(a - 1) : $ === "ArrowRight" ? s(a + 1) : $ === "z" && (C || b) ? v.preventDefault() : $ === "Backspace" && !o && s(a - 1), S();
1810
- };
1811
- return /* @__PURE__ */ i.createElement("span", {
1812
- className: `${g}-input-wrapper`,
1813
- role: "presentation"
1814
- }, c && o !== "" && o !== void 0 && /* @__PURE__ */ i.createElement("span", {
1815
- className: `${g}-mask-icon`,
1816
- "aria-hidden": "true"
1817
- }, y), /* @__PURE__ */ i.createElement(Fe, {
1818
- "aria-label": `OTP Input ${a + 1}`,
1819
- ...u,
1820
- type: l ?? (c ? "password" : "text"),
1821
- ref: m,
1822
- value: o,
1823
- onInput: h,
1824
- onFocus: f,
1825
- onKeyDown: E,
1826
- onMouseDown: S,
1827
- onMouseUp: S,
1828
- className: O(n, {
1829
- [`${g}-mask-input`]: c
1830
- })
1831
- }));
1832
- });
1833
- function Oe(e) {
1834
- return (e || "").split("");
1835
- }
1836
- const jo = (e) => {
1837
- const {
1838
- index: t,
1839
- prefixCls: n,
1840
- separator: o,
1841
- className: r,
1842
- style: s
1843
- } = e, a = St(o) ? o(t) : o;
1844
- return tt(a) ? /* @__PURE__ */ i.createElement("span", {
1845
- className: O(`${n}-separator`, r),
1846
- style: s
1847
- }, a) : null;
1848
- }, Bo = /* @__PURE__ */ i.forwardRef((e, t) => {
1849
- const {
1850
- prefixCls: n,
1851
- length: o = 6,
1852
- size: r,
1853
- defaultValue: s,
1854
- value: a,
1855
- onChange: c,
1856
- formatter: p,
1857
- separator: l,
1858
- variant: u,
1859
- disabled: d,
1860
- status: g,
1861
- autoFocus: y,
1862
- mask: m,
1863
- type: h,
1864
- autoComplete: S,
1865
- onInput: f,
1866
- onFocus: E,
1867
- inputMode: v,
1868
- classNames: $,
1869
- styles: C,
1870
- rootClassName: b,
1871
- className: x,
1872
- style: N,
1873
- ...M
1874
- } = e;
1875
- if (process.env.NODE_ENV !== "production") {
1876
- const w = ot("Input.OTP");
1877
- process.env.NODE_ENV !== "production" && w(!(typeof m == "string" && m.length > 1), "usage", "`mask` prop should be a single character.");
1878
- }
1879
- const {
1880
- classNames: H,
1881
- styles: P,
1882
- getPrefixCls: I,
1883
- direction: A,
1884
- style: k,
1885
- className: V
1886
- } = be("otp"), j = I("otp", n), [F] = ze("otp", u, void 0, "input"), B = {
1887
- ...e,
1888
- length: o,
1889
- variant: F
1890
- }, X = he(k), Y = he(N), [q, _] = Pe([H, $], [P, X, C, Y], {
1891
- props: B
1892
- }), ne = et(M, {
1893
- aria: !0,
1894
- data: !0,
1895
- attr: !0
1896
- }), [Q, U] = _o(j), J = Nt((w) => r ?? w), Z = i.useContext(Me), ae = dn(Z.status, g), le = i.useMemo(() => ({
1897
- ...Z,
1898
- status: ae,
1899
- hasFeedback: !1,
1900
- feedbackIcon: null
1901
- }), [Z, ae]), ee = i.useRef(null), L = i.useRef({});
1902
- i.useImperativeHandle(t, () => ({
1903
- focus: () => {
1904
- var w;
1905
- (w = L.current[0]) == null || w.focus();
1906
- },
1907
- blur: () => {
1908
- var w;
1909
- for (let z = 0; z < o; z += 1)
1910
- (w = L.current[z]) == null || w.blur();
1911
- },
1912
- nativeElement: ee.current
1913
- }));
1914
- const ue = (w) => p ? p(w) : w, [fe, de] = pn(Oe(ue(s || ""))), se = fe();
1915
- i.useEffect(() => {
1916
- a !== void 0 && de(Oe(a));
1917
- }, [a]);
1918
- const xe = pe((w) => {
1919
- const z = fe();
1920
- de(w), f && f(w), c && w.length === o && w.every((T) => T) && w.some((T, W) => z[W] !== T) && c(w.join(""));
1921
- }), me = pe((w, z) => {
1922
- let T = Pt(se);
1923
- for (let D = 0; D < w; D += 1)
1924
- T[D] || (T[D] = "");
1925
- z.length <= 1 ? T[w] = z : T = T.slice(0, w).concat(Oe(z));
1926
- for (let D = T.length - 1; D >= 0 && !T[D]; D -= 1)
1927
- T.pop();
1928
- const W = ue(T.map((D) => D || " ").join(""));
1929
- return T = Oe(W).map((D, R) => D === " " && !T[R] ? T[R] : D), T.slice(0, o);
1930
- }), ye = (w, z) => {
1931
- var D;
1932
- const T = me(w, z), W = Math.min(w + z.length, o - 1);
1933
- xe(T), W !== w && T[w] !== void 0 && ((D = L.current[W]) == null || D.focus());
1934
- }, K = (w) => {
1935
- var z;
1936
- (z = L.current[w]) == null || z.focus();
1937
- }, ie = (w, z) => {
1938
- var T;
1939
- for (let W = 0; W < z; W += 1)
1940
- if (!fe()[W]) {
1941
- (T = L.current[W]) == null || T.focus();
1942
- break;
1943
- }
1944
- E == null || E(w);
1945
- }, Se = {
1946
- variant: F,
1947
- disabled: d,
1948
- status: ae,
1949
- mask: m,
1950
- type: h,
1951
- inputMode: v,
1952
- autoComplete: S
1953
- };
1954
- return /* @__PURE__ */ i.createElement("div", {
1955
- ...ne,
1956
- ref: ee,
1957
- className: O(x, b, j, {
1958
- [`${j}-sm`]: J === "small",
1959
- [`${j}-lg`]: J === "large",
1960
- [`${j}-rtl`]: A === "rtl"
1961
- }, U, Q, V, q.root),
1962
- style: _.root,
1963
- role: "group"
1964
- }, /* @__PURE__ */ i.createElement(Me.Provider, {
1965
- value: le
1966
- }, Array.from({
1967
- length: o
1968
- }).map((w, z) => {
1969
- const T = `otp-${z}`, W = se[z] || "";
1970
- return /* @__PURE__ */ i.createElement(i.Fragment, {
1971
- key: T
1972
- }, /* @__PURE__ */ i.createElement(Vo, {
1973
- ref: (D) => {
1974
- L.current[z] = D;
1975
- },
1976
- index: z,
1977
- size: J,
1978
- htmlSize: 1,
1979
- className: O(q.input, `${j}-input`),
1980
- style: _.input,
1981
- onChange: ye,
1982
- value: W,
1983
- onActiveChange: K,
1984
- autoFocus: z === 0 && y,
1985
- onFocus: (D) => ie(D, z),
1986
- ...Se
1987
- }), z < o - 1 && /* @__PURE__ */ i.createElement(jo, {
1988
- separator: l,
1989
- index: z,
1990
- prefixCls: j,
1991
- className: O(q.separator),
1992
- style: _.separator
1993
- }));
1994
- })));
1995
- }), Ko = (e) => e ? /* @__PURE__ */ i.createElement(Tt, null) : /* @__PURE__ */ i.createElement(zt, null), Wo = {
1996
- click: "onClick",
1997
- hover: "onMouseOver"
1998
- }, Xt = /* @__PURE__ */ i.forwardRef((e, t) => {
1999
- const {
2000
- disabled: n,
2001
- action: o = "click",
2002
- visibilityToggle: r = !0,
2003
- iconRender: s,
2004
- prefixCls: a,
2005
- inputPrefixCls: c,
2006
- suffix: p,
2007
- className: l,
2008
- style: u,
2009
- classNames: d,
2010
- styles: g,
2011
- variant: y,
2012
- ...m
2013
- } = e, {
2014
- getPrefixCls: h,
2015
- className: S,
2016
- style: f,
2017
- classNames: E,
2018
- styles: v,
2019
- iconRender: $
2020
- } = be("inputPassword"), [C] = ze("inputPassword", y, e.bordered, "input"), [b] = mn("global"), x = i.useContext(It), N = n ?? x, M = {
2021
- ...e,
2022
- disabled: N,
2023
- variant: C
2024
- }, H = he(f), P = he(u), [I, A] = Pe([E, d], [v, H, g, P], {
2025
- props: M
2026
- }), k = ve(r) && r.visible !== void 0, [V, j] = Zt(() => k ? r.visible : !1), F = en(null);
2027
- i.useEffect(() => {
2028
- k && j(r.visible);
2029
- }, [k, r]);
2030
- const B = gn(F), X = () => {
2031
- var Z;
2032
- if (N)
2033
- return;
2034
- V && B();
2035
- const J = !V;
2036
- k || j(J), ve(r) && ((Z = r.onVisibleChange) == null || Z.call(r, J));
2037
- }, Y = (J) => {
2038
- const Z = Wo[o] || "", le = (s || $ || Ko)(V), ee = ve(r) ? r.tabIndex : void 0;
2039
- return /* @__PURE__ */ i.createElement("span", {
2040
- key: "passwordIcon",
2041
- role: "button",
2042
- tabIndex: N ? -1 : ee ?? 0,
2043
- className: `${J}-icon`,
2044
- "aria-disabled": N,
2045
- "aria-pressed": V,
2046
- "aria-label": V ? b.hide : b.show,
2047
- onMouseDown: (L) => {
2048
- L.preventDefault();
2049
- },
2050
- onMouseUp: (L) => {
2051
- L.preventDefault();
2052
- },
2053
- onKeyDown: (L) => {
2054
- (L.key === "Enter" || L.key === " ") && (L.preventDefault(), L.repeat || X());
2055
- },
2056
- [Z]: X
2057
- }, le);
2058
- }, q = h("input", c), _ = h("input-password", a), ne = r && Y(_), Q = O(_, S, l, {
2059
- [`${_}-${e.size}`]: !!e.size
2060
- }), U = {
2061
- ...m,
2062
- type: V ? "text" : "password",
2063
- prefixCls: q,
2064
- suffix: /* @__PURE__ */ i.createElement(i.Fragment, null, ne, p),
2065
- disabled: N,
2066
- className: Q,
2067
- classNames: I,
2068
- styles: A,
2069
- variant: C
2070
- };
2071
- return /* @__PURE__ */ i.createElement(Fe, {
2072
- ref: wt(t, F),
2073
- ...U
2074
- });
2075
- });
2076
- process.env.NODE_ENV !== "production" && (Xt.displayName = "Input.Password");
2077
- const Go = (e) => {
2078
- const {
2079
- componentCls: t,
2080
- antCls: n,
2081
- calc: o,
2082
- max: r
2083
- } = e, s = `${t}-btn`, [a, c] = vt(n, "input-search"), p = e.inputFontSizeSM ?? e.fontSize, l = r(e.controlHeightSM, o(p).mul(e.lineHeight).add(o(e.paddingBlockSM).mul(2)).add(o(e.lineWidth).mul(2)).equal());
2084
- return {
2085
- [t]: {
2086
- [a("btn-height")]: G(e.controlHeight),
2087
- width: "100%",
2088
- // =========================== Button ===========================
2089
- [s]: {
2090
- height: c("btn-height"),
2091
- "&:focus-visible": {
2092
- zIndex: 5
2093
- },
2094
- [`&${n}-btn-icon-only`]: {
2095
- width: c("btn-height")
2096
- },
2097
- "&-filled": {
2098
- background: e.colorFillTertiary,
2099
- "&:not(:disabled)": {
2100
- "&:hover": {
2101
- background: e.colorFillSecondary
2102
- },
2103
- "&:active": {
2104
- background: e.colorFill
2105
- }
2106
- }
2107
- }
2108
- },
2109
- [`&${t}-large`]: {
2110
- [a("btn-height")]: G(e.controlHeightLG)
2111
- },
2112
- [`&${t}-small`]: {
2113
- [a("btn-height")]: G(e.controlHeightSM)
2114
- },
2115
- [`&${t}-small ${s}`]: {
2116
- minHeight: l,
2117
- [`&${e.antCls}-btn-icon-only`]: {
2118
- minWidth: l
2119
- }
2120
- }
2121
- }
2122
- };
2123
- }, Uo = De(["Input", "Search"], (e) => {
2124
- const t = Le(e, $t(e));
2125
- return Go(t);
2126
- }, Et), qt = /* @__PURE__ */ i.forwardRef((e, t) => {
2127
- const {
2128
- prefixCls: n,
2129
- inputPrefixCls: o,
2130
- className: r,
2131
- size: s,
2132
- style: a,
2133
- enterButton: c = !1,
2134
- searchIcon: p,
2135
- addonAfter: l,
2136
- loading: u,
2137
- disabled: d,
2138
- onSearch: g,
2139
- onChange: y,
2140
- onCompositionStart: m,
2141
- onCompositionEnd: h,
2142
- variant: S,
2143
- onPressEnter: f,
2144
- classNames: E,
2145
- styles: v,
2146
- hidden: $,
2147
- ...C
2148
- } = e, {
2149
- direction: b,
2150
- getPrefixCls: x,
2151
- className: N,
2152
- style: M,
2153
- classNames: H,
2154
- styles: P,
2155
- searchIcon: I
2156
- } = be("inputSearch"), A = i.useContext(It), k = d ?? A, [V, , j] = ze("inputSearch", S, e.bordered), F = j ? V : void 0, [B] = ze("inputSearch", S, e.bordered, "input"), X = {
2157
- ...e,
2158
- enterButton: c,
2159
- variant: F
2160
- }, Y = he(M), q = he(a), [_, ne] = Pe([H, E], [P, Y, v, q], {
2161
- props: X
2162
- }, {
2163
- button: {
2164
- _default: "root"
2165
- }
2166
- }), Q = i.useRef(!1), U = x("input-search", n), J = x("input", o), [Z, ae] = Uo(U), {
2167
- compactSize: le
2168
- } = hn(U, b), ee = Nt((R) => s ?? le ?? R), L = i.useRef(null), ue = (R) => {
2169
- R != null && R.target && R.type === "click" && g && g(R.target.value, R, {
2170
- source: "clear"
2171
- }), y == null || y(R);
2172
- }, fe = (R) => {
2173
- var oe;
2174
- document.activeElement === ((oe = L.current) == null ? void 0 : oe.input) && R.preventDefault();
2175
- }, de = (R) => {
2176
- var oe, re;
2177
- g && g((re = (oe = L.current) == null ? void 0 : oe.input) == null ? void 0 : re.value, R, {
2178
- source: "input"
2179
- });
2180
- }, se = (R) => {
2181
- Q.current || u || (f == null || f(R), de(R));
2182
- }, xe = typeof c == "boolean" ? yn(p, I, /* @__PURE__ */ i.createElement(tn, null)) : null, me = `${U}-btn`, ye = O(me, {
2183
- [`${me}-${F}`]: F
2184
- });
2185
- let K;
2186
- const ie = c || {}, Se = ie.type && ie.type.__ANT_BUTTON === !0;
2187
- if (Se || ie.type === "button") {
2188
- const R = ie.props;
2189
- K = dt(ie, {
2190
- disabled: k || R.disabled || !Se && u,
2191
- onMouseDown: (oe) => {
2192
- var re;
2193
- (re = R.onMouseDown) == null || re.call(R, oe), fe(oe);
2194
- },
2195
- onClick: (oe) => {
2196
- var re, ut;
2197
- (ut = (re = ie == null ? void 0 : ie.props) == null ? void 0 : re.onClick) == null || ut.call(re, oe), de(oe);
2198
- },
2199
- key: "enterButton",
2200
- ...Se ? {
2201
- className: O(ye, R.className),
2202
- loading: u || R.loading,
2203
- size: ee
2204
- } : {}
2205
- });
2206
- } else
2207
- K = /* @__PURE__ */ i.createElement(Cn, {
2208
- classNames: _.button,
2209
- styles: ne.button,
2210
- className: ye,
2211
- color: c ? "primary" : "default",
2212
- size: ee,
2213
- disabled: d,
2214
- key: "enterButton",
2215
- onMouseDown: fe,
2216
- onClick: de,
2217
- loading: u,
2218
- icon: xe,
2219
- variant: F === "borderless" || F === "filled" || F === "underlined" ? "text" : c ? "solid" : void 0
2220
- }, c);
2221
- l && (K = [K, dt(l, {
2222
- key: "addonAfter"
2223
- })]);
2224
- const w = O(U, ae, {
2225
- [`${U}-rtl`]: b === "rtl",
2226
- [`${U}-${ee}`]: !!ee,
2227
- [`${U}-with-button`]: !!c
2228
- }, r, N, Z, _.root), z = (R) => {
2229
- Q.current = !0, m == null || m(R);
2230
- }, T = (R) => {
2231
- Q.current = !1, h == null || h(R);
2232
- }, W = et(C, {
2233
- data: !0
2234
- }), D = Ae({
2235
- ...C,
2236
- classNames: Ae(_, ["button", "root"]),
2237
- styles: Ae(ne, ["button", "root"]),
2238
- prefixCls: J,
2239
- type: "search",
2240
- size: ee,
2241
- variant: B,
2242
- onPressEnter: se,
2243
- onCompositionStart: z,
2244
- onCompositionEnd: T,
2245
- onChange: ue,
2246
- disabled: d
2247
- }, Object.keys(W));
2248
- return /* @__PURE__ */ i.createElement(vn, {
2249
- className: w,
2250
- style: ne.root,
2251
- ...W,
2252
- hidden: $
2253
- }, /* @__PURE__ */ i.createElement(Fe, {
2254
- ref: wt(L, t),
2255
- ...D
2256
- }), K);
2257
- });
2258
- process.env.NODE_ENV !== "production" && (qt.displayName = "Search");
2259
- const Ie = Fe;
2260
- Ie.Group = ko;
2261
- Ie.Search = qt;
2262
- Ie.TextArea = bn;
2263
- Ie.Password = Xt;
2264
- Ie.OTP = Bo;
2265
- const Xo = (e) => {
2266
- const {
2267
- items: t,
2268
- classNames: n,
2269
- style: o
2270
- } = e, {
2271
- getPrefixCls: r
2272
- } = be("message"), s = r("message"), a = nt(s), [c, p] = at(s, a), l = `${s}-notice`, u = t.map((d) => {
2273
- const {
2274
- content: g,
2275
- duration: y,
2276
- key: m,
2277
- type: h
2278
- } = d, S = h ? `${l}-icon-${h}` : void 0;
2279
- return {
2280
- key: m,
2281
- duration: y,
2282
- icon: ct(h),
2283
- title: g,
2284
- className: `${l}-${h}`,
2285
- classNames: {
2286
- wrapper: `${s}-${h}`,
2287
- icon: S
2288
- }
2289
- };
2290
- });
2291
- return /* @__PURE__ */ i.createElement(Ft, {
2292
- prefixCls: s,
2293
- placement: "top",
2294
- configList: u,
2295
- className: O(c, p, a),
2296
- classNames: {
2297
- ...n,
2298
- wrapper: n == null ? void 0 : n.wrapper,
2299
- title: n == null ? void 0 : n.title
2300
- },
2301
- style: o,
2302
- stack: !1
2303
- });
2304
- };
2305
- let te = null, ge = (e) => e(), Ee = [], $e = {};
2306
- function Ct() {
2307
- const {
2308
- getContainer: e,
2309
- duration: t,
2310
- rtl: n,
2311
- maxCount: o,
2312
- top: r,
2313
- stack: s
2314
- } = $e, a = (e == null ? void 0 : e()) || document.body;
2315
- return {
2316
- getContainer: () => a,
2317
- duration: t,
2318
- rtl: n,
2319
- maxCount: o,
2320
- top: r,
2321
- stack: s
2322
- };
2323
- }
2324
- const qo = /* @__PURE__ */ ce.forwardRef((e, t) => {
2325
- const {
2326
- messageConfig: n,
2327
- sync: o
2328
- } = e, {
2329
- getPrefixCls: r
2330
- } = Re(ke), s = $e.prefixCls || r("message"), a = Re(Do), [c, p] = Ut({
2331
- ...n,
2332
- prefixCls: s,
2333
- ...a.message
2334
- });
2335
- return ce.useImperativeHandle(t, () => {
2336
- const l = {
2337
- ...c
2338
- };
2339
- return Object.keys(l).forEach((u) => {
2340
- l[u] = (...d) => (o(), c[u].apply(c, d));
2341
- }), {
2342
- instance: l,
2343
- sync: o
2344
- };
2345
- }), p;
2346
- }), Qo = /* @__PURE__ */ ce.forwardRef((e, t) => {
2347
- const [n, o] = ce.useState(Ct), r = () => {
2348
- o(Ct);
2349
- };
2350
- ce.useEffect(r, []);
2351
- const s = Ot(), a = s.getRootPrefixCls(), c = s.getIconPrefixCls(), p = s.getTheme(), l = /* @__PURE__ */ ce.createElement(qo, {
2352
- ref: t,
2353
- sync: r,
2354
- messageConfig: n
2355
- });
2356
- return /* @__PURE__ */ ce.createElement(Sn, {
2357
- prefixCls: a,
2358
- iconPrefixCls: c,
2359
- theme: p
2360
- }, s.holderRender ? s.holderRender(l) : l);
2361
- }), _e = () => {
2362
- if (!te) {
2363
- const e = document.createDocumentFragment(), t = {
2364
- fragment: e
2365
- };
2366
- te = t, ge(() => {
2367
- xn(/* @__PURE__ */ ce.createElement(Qo, {
2368
- ref: (n) => {
2369
- const {
2370
- instance: o,
2371
- sync: r
2372
- } = n || {};
2373
- Promise.resolve().then(() => {
2374
- !t.instance && o && (t.instance = o, t.sync = r, _e());
2375
- });
2376
- }
2377
- }), e);
2378
- });
2379
- return;
2380
- }
2381
- te.instance && (Ee.forEach((e) => {
2382
- const {
2383
- type: t,
2384
- skipped: n
2385
- } = e;
2386
- if (!n)
2387
- switch (t) {
2388
- case "open": {
2389
- ge(() => {
2390
- const o = te.instance.open({
2391
- ...$e,
2392
- ...e.config
2393
- });
2394
- o == null || o.then(e.resolve), e.setCloseFn(o);
2395
- });
2396
- break;
2397
- }
2398
- case "destroy":
2399
- ge(() => {
2400
- te == null || te.instance.destroy(e.key);
2401
- });
2402
- break;
2403
- // Other type open
2404
- default:
2405
- ge(() => {
2406
- var o;
2407
- const r = (o = te.instance)[t].apply(o, Pt(e.args));
2408
- r == null || r.then(e.resolve), e.setCloseFn(r);
2409
- });
2410
- }
2411
- }), Ee = []);
2412
- };
2413
- function Yo(e) {
2414
- $e = {
2415
- ...$e,
2416
- ...e
2417
- }, ge(() => {
2418
- var t;
2419
- (t = te == null ? void 0 : te.sync) == null || t.call(te);
2420
- });
2421
- }
2422
- function Jo(e) {
2423
- const t = lt((n) => {
2424
- let o;
2425
- const r = {
2426
- type: "open",
2427
- config: e,
2428
- resolve: n,
2429
- setCloseFn: (s) => {
2430
- o = s;
2431
- }
2432
- };
2433
- return Ee.push(r), () => {
2434
- o ? ge(() => {
2435
- o();
2436
- }) : r.skipped = !0;
2437
- };
2438
- });
2439
- return _e(), t;
2440
- }
2441
- function Zo(e, t) {
2442
- const n = Ot();
2443
- process.env.NODE_ENV !== "production" && !n.holderRender && En("message");
2444
- const o = lt((r) => {
2445
- let s;
2446
- const a = {
2447
- type: e,
2448
- args: t,
2449
- resolve: r,
2450
- setCloseFn: (c) => {
2451
- s = c;
2452
- }
2453
- };
2454
- return Ee.push(a), () => {
2455
- s ? ge(() => {
2456
- s();
2457
- }) : a.skipped = !0;
2458
- };
2459
- });
2460
- return _e(), o;
2461
- }
2462
- const es = (e) => {
2463
- Ee.push({
2464
- type: "destroy",
2465
- key: e
2466
- }), _e();
2467
- }, ts = ["success", "info", "warning", "error", "loading"], ns = {
2468
- open: Jo,
2469
- destroy: es,
2470
- config: Yo,
2471
- useMessage: Lo,
2472
- _InternalPanelDoNotUseOrYouWillBeFired: Io,
2473
- _InternalListDoNotUseOrYouWillBeFired: Xo
2474
- }, os = ns;
2475
- ts.forEach((e) => {
2476
- os[e] = (...t) => Zo(e, t);
2477
- });
2478
- process.env.NODE_ENV;
2479
- process.env.NODE_ENV;
2480
- export {
2481
- _n as C,
2482
- Ie as I,
2483
- Mt as R,
2484
- Rt as a,
2485
- Ht as b,
2486
- os as s
2487
- };