@yuku123/z-cognition-component 2.0.1 → 2.0.3

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 (244) hide show
  1. package/dist-lib/BaseInput-DHrGPDB9.js +1096 -0
  2. package/dist-lib/ClockCircleOutlined-DP6fSLgk.js +12 -0
  3. package/dist-lib/Collapse-B77SsmFh.js +523 -0
  4. package/dist-lib/{ConceptsPage-BOeKdDKI.js → ConceptsPage-DOf_CJlz.js} +13 -16
  5. package/dist-lib/DeleteOutlined-BAZSAooQ.js +12 -0
  6. package/dist-lib/{DocsPage-BZOBFp3c.js → DocsPage-CiC7TU96.js} +4 -4
  7. package/dist-lib/EllipsisOutlined-Dr4orLLw.js +1109 -0
  8. package/dist-lib/EvidenceFormList-CrE2FzHk.js +90 -0
  9. package/dist-lib/{EyeOutlined-DGSrX-0M.js → EyeOutlined-CudyDdjH.js} +1 -1
  10. package/dist-lib/ImpactPage-CYiuqy0S.js +68 -0
  11. package/dist-lib/{LeftOutlined-Cgo6Izj-.js → LeftOutlined-CJasZIyX.js} +1 -1
  12. package/dist-lib/{OntologyDetailPage-B8DyU8WW.js → OntologyDetailPage-mgK_NQxP.js} +99 -93
  13. package/dist-lib/{OntologyInferPage-CvcjxpBB.js → OntologyInferPage-NUaoaQpN.js} +38 -40
  14. package/dist-lib/{OntologyListPage-Cb0XfpWE.js → OntologyListPage-C9wH01y0.js} +47 -49
  15. package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +134 -0
  16. package/dist-lib/OntologyNodesPage-5kH7RHwE.js +2844 -0
  17. package/dist-lib/{OntologyValidatePage-abQVJwzV.js → OntologyValidatePage-DtkYK_l4.js} +49 -52
  18. package/dist-lib/Pagination-BJ8wnqAa.js +1112 -0
  19. package/dist-lib/PlusOutlined-BSTPGLOH.js +21 -0
  20. package/dist-lib/{ReloadOutlined-CS-e-TmN.js → ReloadOutlined-B26pDoyV.js} +19 -10
  21. package/dist-lib/{ResolvePage-rbQ-8nNZ.js → ResolvePage-Cz9HORZ3.js} +31 -33
  22. package/dist-lib/{RotateRightOutlined-q7zp2e47.js → RotateRightOutlined-DqyspFCO.js} +1 -1
  23. package/dist-lib/Skeleton-CxFsInYI.js +671 -0
  24. package/dist-lib/Table-Civ838nE.js +20514 -0
  25. package/dist-lib/{Table-CDagah-g.js → Table-J_7eBbi7.js} +414 -414
  26. package/dist-lib/TermDetailPage-BtkOpbPT.js +263 -0
  27. package/dist-lib/{TermsPage-CuufAyuL.js → TermsPage-BuzCMYov.js} +28 -31
  28. package/dist-lib/_commonjsHelpers-DaMA6jEr.js +8 -0
  29. package/dist-lib/accessAk-CA30m5eX.js +64 -0
  30. package/dist-lib/{agents-mAJW3cEN.js → agents-eZDKzePP.js} +41 -41
  31. package/dist-lib/{ai-BcYmZiRo.js → ai-CNSn3-sd.js} +32 -32
  32. package/dist-lib/{ai-chat-share-DO7GXjG4.js → ai-chat-share-Yrqt_J6a.js} +13 -14
  33. package/dist-lib/ak-manage-DklVFT5I.js +805 -0
  34. package/dist-lib/{approval-RPDUKg9-.js → approval-B-bCSmfi.js} +25 -26
  35. package/dist-lib/{approvals-CNjxJUpR.js → approvals-B0ggYiyD.js} +42 -43
  36. package/dist-lib/{assistant-FIQQziCn.js → assistant-Of0mgMsM.js} +33 -34
  37. package/dist-lib/{assistant-history-DsEGBJnq.js → assistant-history-DcyDhUzJ.js} +5 -5
  38. package/dist-lib/{assistant-summary-B-f3k55y.js → assistant-summary-CjLaTyFz.js} +1 -1
  39. package/dist-lib/{audit-NwnH1hm5.js → audit-wDNCfmOy.js} +1 -1
  40. package/dist-lib/{bios-CRwKtcit.js → bios-CIwO1AUK.js} +128 -130
  41. package/dist-lib/callSuper-CpMOVGin.js +7 -0
  42. package/dist-lib/callSuper-CwIeyYoc.js +7 -0
  43. package/dist-lib/category-9gqNseEa.js +76 -0
  44. package/dist-lib/causal-CzAYukj9.js +789 -0
  45. package/dist-lib/{changelog-DlL5u9o4.js → changelog-CQfIMS51.js} +2 -2
  46. package/dist-lib/changelog-sKJMQrlV.js +103 -0
  47. package/dist-lib/chat-panel-BPbqKckR.js +1543 -0
  48. package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +1627 -0
  49. package/dist-lib/code-space-D_ZE966E.js +1070 -0
  50. package/dist-lib/{colors-sdAcAcU3.js → colors-DpKdb8L-.js} +3 -3
  51. package/dist-lib/community-9_7ExHcm.js +70 -0
  52. package/dist-lib/community-CfWXxujB.js +217 -0
  53. package/dist-lib/community-material-page-Z_EZuBPl.js +747 -0
  54. package/dist-lib/connections-Bcqsp11M.js +1065 -0
  55. package/dist-lib/context-T27uno74.js +54 -0
  56. package/dist-lib/{createForOfIteratorHelper-DEx_aTey.js → createForOfIteratorHelper-CasBzL_Q.js} +1 -1
  57. package/dist-lib/{dayjs.min-BauDENhn.js → dayjs.min-DoEf5yCX.js} +1 -1
  58. package/dist-lib/detail-CV6xp_Jp.js +84 -0
  59. package/dist-lib/{detail-Cfb-zdr9.js → detail-DioaWKWj.js} +5847 -7224
  60. package/dist-lib/{detail-Dcfg3W8B.js → detail-EyLdjGpX.js} +71 -72
  61. package/dist-lib/development-CFcOIUKc.js +167 -0
  62. package/dist-lib/{docx-preview-B5nQuTwk.js → docx-preview-D4v2g8Yg.js} +1 -1
  63. package/dist-lib/{downloads-MkyxiHxi.js → downloads-DtV5hOQv.js} +3 -4
  64. package/dist-lib/{edit-DLGAM-Vo.js → edit-NtXUNj5N.js} +262 -266
  65. package/dist-lib/{editor-BtiheUpe.js → editor-KZhj-rwT.js} +25 -26
  66. package/dist-lib/editor-page-BaxK_OYm.js +1169 -0
  67. package/dist-lib/embed-mf8t3QXh.js +51841 -0
  68. package/dist-lib/embed.css +2 -2
  69. package/dist-lib/{evaluation-Dz9bUuhS.js → evaluation-CZTpC9v3.js} +14 -15
  70. package/dist-lib/execution-B6HmOA2_.js +159 -0
  71. package/dist-lib/focus-set-lt52maBX.js +38 -0
  72. package/dist-lib/{format-UGmYKemG.js → format-CWI99NCN.js} +1 -1
  73. package/dist-lib/graph-BllA9bmL.js +44 -0
  74. package/dist-lib/graph-DHV-rdiK.js +640 -0
  75. package/dist-lib/{index-o65vKUwa.js → index--AI-htgA.js} +44 -45
  76. package/dist-lib/index-2SysmGHo.js +1166 -0
  77. package/dist-lib/{index-CJSTTgTM.js → index-3J47mTL1.js} +10 -10
  78. package/dist-lib/index-4tbtbcAt.js +550 -0
  79. package/dist-lib/index-B12ZggsE.js +77 -0
  80. package/dist-lib/{index-D3GHtSlM.js → index-B5Roo82U.js} +49 -50
  81. package/dist-lib/{index-nQSVLWfW.js → index-B7SfTpox.js} +79 -81
  82. package/dist-lib/index-BEO8itgt.js +566 -0
  83. package/dist-lib/index-BPbOPT2j.js +413 -0
  84. package/dist-lib/index-BVgdmf6r.js +2487 -0
  85. package/dist-lib/index-Bd7AGv4a.js +34 -0
  86. package/dist-lib/index-BkJjYgKD.js +5012 -0
  87. package/dist-lib/{index-DBlG9uXV.js → index-BkTegt8T.js} +513 -590
  88. package/dist-lib/{index-BGB6NawZ.js → index-Bln3mJfp.js} +2 -2
  89. package/dist-lib/index-BoCtPJD4.js +915 -0
  90. package/dist-lib/{index-DMTPsTna.js → index-BqTsLClH.js} +3 -4
  91. package/dist-lib/index-Bs4MevzC.js +16075 -0
  92. package/dist-lib/index-BsoHetYT.js +236 -0
  93. package/dist-lib/{index-9aQ4BzIK.js → index-BvJ35WL3.js} +13 -14
  94. package/dist-lib/{index-BEjXaDfk.js → index-Bw4M9KLv.js} +84 -85
  95. package/dist-lib/index-C2CV4bte.js +242 -0
  96. package/dist-lib/{index-D_Qey9G8.js → index-CF0ucN_K.js} +12 -12
  97. package/dist-lib/{index-B57Fj7Y0.js → index-CLhLA2ig.js} +92 -94
  98. package/dist-lib/{index-Vu6sPBci.js → index-CSJA8wvL.js} +301 -296
  99. package/dist-lib/index-CSnvcFg-.js +543 -0
  100. package/dist-lib/{index-C3AMwzIi.js → index-CZipVp1G.js} +1 -1
  101. package/dist-lib/{index-ounfql2z.js → index-CdJ5ggvp.js} +26 -28
  102. package/dist-lib/index-CgwK2maq.js +1987 -0
  103. package/dist-lib/{index-Bc-Vin3j.js → index-CtqUgNxs.js} +53 -55
  104. package/dist-lib/index-CvxfA0ZK.js +215 -0
  105. package/dist-lib/{index-y7jVGGI0.js → index-CwyFMPcr.js} +16 -18
  106. package/dist-lib/index-D35Ry0PG.js +1162 -0
  107. package/dist-lib/{index-c2HokEFp.js → index-D6ns_Xmf.js} +10 -11
  108. package/dist-lib/{index-DsuUGhTA.js → index-DGbjbjBY.js} +46 -48
  109. package/dist-lib/index-DKAGVWMX.js +390 -0
  110. package/dist-lib/index-DQ16Zb7x.js +546 -0
  111. package/dist-lib/index-DRcTwC17.js +418 -0
  112. package/dist-lib/index-DU6bO95v.js +2075 -0
  113. package/dist-lib/index-DaMLYomP.js +853 -0
  114. package/dist-lib/index-Dd9pPAT3.js +2192 -0
  115. package/dist-lib/{index-DuI4K5e1.js → index-DgfIEgir.js} +29 -29
  116. package/dist-lib/{index-Cy9i4Kx7.js → index-DhSCFLtV.js} +113 -117
  117. package/dist-lib/index-DxzorPvG.js +13960 -0
  118. package/dist-lib/index-If4xc1-H.js +559 -0
  119. package/dist-lib/index-QZ9JPfVR.js +251 -0
  120. package/dist-lib/index-VeAMz0iC.js +1719 -0
  121. package/dist-lib/index-mUlorJxp.js +3279 -0
  122. package/dist-lib/{index-g16g7A4k.js → index-xQmDaKK3.js} +6 -6
  123. package/dist-lib/{index-BwVZgt5s.js → index-zXwXfn-X.js} +48 -50
  124. package/dist-lib/index.js +3 -4
  125. package/dist-lib/json-field-COcz5F2R.js +196 -0
  126. package/dist-lib/{jszip.min-DcEHhn-b.js → jszip.min-dcaDnWUw.js} +1 -1
  127. package/dist-lib/{kb-form-modal-BNoIhw6B.js → kb-form-modal-D9gnvXbE.js} +67 -67
  128. package/dist-lib/{kbTeam-EgcbWseM.js → kbTeam-CorrPJFr.js} +3 -3
  129. package/dist-lib/{knowledge-base-C023dnJ-.js → knowledge-base-DJkjMFHW.js} +103 -104
  130. package/dist-lib/{knowledge-hub-B4fGCn8m.js → knowledge-hub-DKiDlaZz.js} +54 -55
  131. package/dist-lib/login-56zv4aLO.js +36 -0
  132. package/dist-lib/{markdown-lite-EvJ9Fw7X.js → markdown-lite-p1tiuSZM.js} +198 -202
  133. package/dist-lib/material-DtPASeqq.js +204 -0
  134. package/dist-lib/material-draft-markdown-281d5_GN.js +443 -0
  135. package/dist-lib/material-original-preview-CPGjdmbe.js +214 -0
  136. package/dist-lib/{material-preview-docx-CH-09KeC.js → material-preview-docx-lp_xPipj.js} +1 -1
  137. package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
  138. package/dist-lib/{material-preview-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
  139. package/dist-lib/material-workspace-model-QLsU5qUO.js +328 -0
  140. package/dist-lib/{member-BUg2QYlE.js → member-Cz-OIdj9.js} +1 -1
  141. package/dist-lib/memory-reorganization-DgJnWIrW.js +8 -0
  142. package/dist-lib/memory-spaces-D-orVNR7.js +2340 -0
  143. package/dist-lib/{message-GF-w8HuR.js → message-C9gfvpGg.js} +1 -1
  144. package/dist-lib/{message-Cwj8dO78.js → message-D6FhzB7J.js} +24 -25
  145. package/dist-lib/{messages-JID13L8-.js → messages-cctmEVcG.js} +15 -16
  146. package/dist-lib/meta-DT_O4zM9.js +708 -0
  147. package/dist-lib/{metrics-CT4eLzrq.js → metrics-BNeVcI8-.js} +2 -2
  148. package/dist-lib/mobile-D8kZjfQU.js +2413 -0
  149. package/dist-lib/{monitor-Bs9BfJOj.js → monitor-DTUyqumg.js} +4 -4
  150. package/dist-lib/{monitor-CmS65YSu.js → monitor-DexMYjzF.js} +8 -8
  151. package/dist-lib/{my-access-1Yj7UloI.js → my-access-DWBV6ohp.js} +120 -132
  152. package/dist-lib/{my-permissions-yQDHPLYI.js → my-permissions-B-gJZQYM.js} +22 -23
  153. package/dist-lib/navigation-DVlyWnpD.js +102 -0
  154. package/dist-lib/{new-BgkoBnZV.js → new-JmARyD88.js} +14 -15
  155. package/dist-lib/{ontology-BPrbXPor.js → ontology-B4rkO33J.js} +50 -52
  156. package/dist-lib/ontology-dataprep-BwD5TKs2.js +322 -0
  157. package/dist-lib/{ontology-domains-Cbqnm-po.js → ontology-domains-zxFrjn0v.js} +89 -92
  158. package/dist-lib/ontology-extract-BHOxruRO.js +3199 -0
  159. package/dist-lib/ontology-extract-iR_rXxFe.js +295 -0
  160. package/dist-lib/ontology-flow-CW0SzeK7.js +456 -0
  161. package/dist-lib/ontology-flow-Dv5iQ20f.js +154 -0
  162. package/dist-lib/ontology-modeling-B9wswveh.js +510 -0
  163. package/dist-lib/ontology-modeling-hakCluBi.js +15136 -0
  164. package/dist-lib/{ontology-scenarios-D3xy6IZL.js → ontology-scenarios-C2kp7Rs-.js} +1466 -1482
  165. package/dist-lib/ontology-scenarios-DKnfydG6.js +675 -0
  166. package/dist-lib/ontology-task-config-DmnWyCCB.js +122 -0
  167. package/dist-lib/ontology-terms-BoNB-5ar.js +66 -0
  168. package/dist-lib/ontology-terms-C-NhpcIZ.js +1195 -0
  169. package/dist-lib/pages-CticGC6S.js +512 -0
  170. package/dist-lib/pages.js +3 -3
  171. package/dist-lib/{permission-fTfxpEhV.js → permission-Dq1-AOQw.js} +41 -41
  172. package/dist-lib/pipeline-layout-CJlOMXJF.js +70 -0
  173. package/dist-lib/{pptx-preview.es-AUrdYKu3.js → pptx-preview.es-D4ODiBv2.js} +2 -2
  174. package/dist-lib/preset-Bp_mvsJm.js +56827 -0
  175. package/dist-lib/{preset-gh5SGoYT.js → preset-DCNSE--Y.js} +8 -8
  176. package/dist-lib/progress-CZxOOnIs.js +778 -0
  177. package/dist-lib/{quota-BlHnhkAT.js → quota-oICQRHFU.js} +4 -4
  178. package/dist-lib/row-By17TCiW.js +154 -0
  179. package/dist-lib/runs-DQTDpPaN.js +565 -0
  180. package/dist-lib/{save-blob-B-pzX8eT.js → save-blob-CwCZE1Dn.js} +2 -2
  181. package/dist-lib/{scenario-mapping-preview-DByQXh0y.js → scenario-mapping-preview-sJtjgmry.js} +46 -48
  182. package/dist-lib/scenario-simple-form-BvKSPFzw.js +989 -0
  183. package/dist-lib/{schedule-H4_9KnRj.js → schedule-CwkPPSuT.js} +8 -8
  184. package/dist-lib/script-gYJAFobb.js +2709 -0
  185. package/dist-lib/{settings-C3PI8KYa.js → settings-CJd5Jj4y.js} +133 -134
  186. package/dist-lib/{shared-DqeN-Wbb.js → shared-DG5-VCDM.js} +1 -1
  187. package/dist-lib/{shared-utils-DN3zT9P-.js → shared-utils-CFHws1DA.js} +2 -2
  188. package/dist-lib/{skills-eGlCExr0.js → skills-lxpJ5Lzx.js} +39 -40
  189. package/dist-lib/{source-selection-BCvClzc-.js → source-selection-DJnQQckl.js} +16 -16
  190. package/dist-lib/sources-C83LpCcV.js +279 -0
  191. package/dist-lib/style-B5THvtDY.js +191 -0
  192. package/dist-lib/{task-config-DEJVJ7zK.js → task-config-BNYoOb79.js} +4 -4
  193. package/dist-lib/{tech-C-4uM9bS.js → tech-LuZvKDo6.js} +3 -4
  194. package/dist-lib/templates-a-kbCamr.js +58 -0
  195. package/dist-lib/tenant-login-COB-5h_2.js +338 -0
  196. package/dist-lib/{tools-le6miafZ.js → tools-CrA6GrY6.js} +14 -14
  197. package/dist-lib/{use-domain-access-B3pDp3s5.js → use-domain-access-ehGJBGvU.js} +15 -15
  198. package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-DfRnsBS6.js} +1 -1
  199. package/dist-lib/{use-graph-layers-Dmp7uMHO.js → use-graph-layers-CrhEeHfD.js} +48 -50
  200. package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
  201. package/dist-lib/useBreakpoint-Cul9y9Cu.js +87 -0
  202. package/dist-lib/{useForm-Byp1LopG.js → useForm-B-dwOwJ8.js} +11 -11
  203. package/dist-lib/{version-control-panel-WT1PobuV.js → version-control-panel-mWXkC-uB.js} +26 -27
  204. package/dist-lib/{version-management-DC0k1DRg.js → version-management-nPlG7wQO.js} +6 -7
  205. package/dist-lib/{welcome-VyWLrbth.js → welcome-Cqv1-rXT.js} +3 -4
  206. package/package.json +1 -1
  207. package/dist-lib/ApartmentOutlined-M6qSurnE.js +0 -12
  208. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +0 -12
  209. package/dist-lib/EvidenceFormList-DXqqSpPV.js +0 -91
  210. package/dist-lib/ImpactPage-DyhUR6fT.js +0 -71
  211. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +0 -136
  212. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +0 -1268
  213. package/dist-lib/Pagination-Dxslodkq.js +0 -1344
  214. package/dist-lib/PlusOutlined-B_dXo_97.js +0 -12
  215. package/dist-lib/SearchOutlined-puH6bCY6.js +0 -979
  216. package/dist-lib/Skeleton-DXcERb5r.js +0 -557
  217. package/dist-lib/TagsOutlined-B4_qkn6-.js +0 -20
  218. package/dist-lib/TermDetailPage-CP0D6OvA.js +0 -242
  219. package/dist-lib/TextArea-DTpTS5HL.js +0 -1897
  220. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +0 -20
  221. package/dist-lib/callSuper-DZEfdkXG.js +0 -7
  222. package/dist-lib/changelog-Dj_Pv2nc.js +0 -69
  223. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +0 -2004
  224. package/dist-lib/context-Buz0ggsK.js +0 -710
  225. package/dist-lib/context-DpmyNOn3.js +0 -21
  226. package/dist-lib/embed-DwLg9RDW.js +0 -31148
  227. package/dist-lib/focus-set-h0YtOUB2.js +0 -427
  228. package/dist-lib/index-CaXylbQR.js +0 -3419
  229. package/dist-lib/index-Cfu1W1H6.js +0 -535
  230. package/dist-lib/index-CrMcNEAZ.js +0 -9656
  231. package/dist-lib/index-CyKWCYMK.js +0 -218
  232. package/dist-lib/index-DBtGE89a.js +0 -168
  233. package/dist-lib/index-DjFPRXl5.js +0 -1484
  234. package/dist-lib/index-DvWHYX81.js +0 -450
  235. package/dist-lib/index-HieOUSwH.js +0 -340
  236. package/dist-lib/index-bOY1cBol.js +0 -4890
  237. package/dist-lib/meta-DPp5L3Uc.js +0 -540
  238. package/dist-lib/ontology-modeling-6k-m8fzr.js +0 -38946
  239. package/dist-lib/ontology-modeling-BT-EuDCs.js +0 -1039
  240. package/dist-lib/ontology-scenarios-DWYC2yxd.js +0 -660
  241. package/dist-lib/pages-CsexFuEz.js +0 -73
  242. package/dist-lib/row-B5MnGm9M.js +0 -156
  243. package/dist-lib/scenario-simple-form-Bw-6n9Kh.js +0 -2396
  244. package/dist-lib/useClosable-BY7FgWKy.js +0 -59
@@ -1,1484 +0,0 @@
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
- };