@yuku123/z-cognition-component 2.0.2 → 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 (243) 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-CvgRLQw2.js → agents-eZDKzePP.js} +41 -41
  31. package/dist-lib/{ai-DYDhijtn.js → ai-CNSn3-sd.js} +32 -32
  32. package/dist-lib/{ai-chat-share-DJnybJtS.js → ai-chat-share-Yrqt_J6a.js} +13 -14
  33. package/dist-lib/ak-manage-DklVFT5I.js +805 -0
  34. package/dist-lib/{approval-3IbhY8Lp.js → approval-B-bCSmfi.js} +25 -26
  35. package/dist-lib/{approvals-Cd6CVzz4.js → approvals-B0ggYiyD.js} +42 -43
  36. package/dist-lib/{assistant-cIXgilaE.js → assistant-Of0mgMsM.js} +33 -34
  37. package/dist-lib/{assistant-history-BQzH4ChB.js → assistant-history-DcyDhUzJ.js} +5 -5
  38. package/dist-lib/{assistant-summary-LKTj_HKM.js → assistant-summary-CjLaTyFz.js} +1 -1
  39. package/dist-lib/{audit-CxuJ5unU.js → audit-wDNCfmOy.js} +1 -1
  40. package/dist-lib/{bios-BplnCOF4.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-BoGqt_81.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-BaX7WiWV.js → detail-DioaWKWj.js} +5847 -7224
  60. package/dist-lib/{detail-Cx5c4KJH.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-C3Oz04OW.js → downloads-DtV5hOQv.js} +3 -4
  64. package/dist-lib/{edit-Cbn2eJaJ.js → edit-NtXUNj5N.js} +262 -266
  65. package/dist-lib/{editor-mtaJBQXz.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-BoHiY8yT.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-Bm1sK-VN.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-B22_2Dzh.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-BSlCGnzo.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-Cj4DDWyj.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-CHBNrCMy.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-CLTfICbf.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-B0rM1ZvV.js → kb-form-modal-D9gnvXbE.js} +67 -67
  128. package/dist-lib/{kbTeam-Bh_FQH28.js → kbTeam-CorrPJFr.js} +3 -3
  129. package/dist-lib/{knowledge-base-Cl1Ka1e6.js → knowledge-base-DJkjMFHW.js} +103 -104
  130. package/dist-lib/{knowledge-hub-CPuzdRiq.js → knowledge-hub-DKiDlaZz.js} +54 -55
  131. package/dist-lib/login-56zv4aLO.js +36 -0
  132. package/dist-lib/{markdown-lite-Cu62Fl7J.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-pptx-D8XGDF-u.js → material-preview-pptx-6Byitp0J.js} +1 -1
  138. package/dist-lib/material-workspace-model-QLsU5qUO.js +328 -0
  139. package/dist-lib/{member-DKDx77PD.js → member-Cz-OIdj9.js} +1 -1
  140. package/dist-lib/memory-reorganization-DgJnWIrW.js +8 -0
  141. package/dist-lib/memory-spaces-D-orVNR7.js +2340 -0
  142. package/dist-lib/{message-Dievi8Jw.js → message-C9gfvpGg.js} +1 -1
  143. package/dist-lib/{message-BrooQ3Q7.js → message-D6FhzB7J.js} +24 -25
  144. package/dist-lib/{messages-xTNmTS9g.js → messages-cctmEVcG.js} +15 -16
  145. package/dist-lib/meta-DT_O4zM9.js +708 -0
  146. package/dist-lib/{metrics-DiHYqBKB.js → metrics-BNeVcI8-.js} +2 -2
  147. package/dist-lib/mobile-D8kZjfQU.js +2413 -0
  148. package/dist-lib/{monitor-BXsdMJSV.js → monitor-DTUyqumg.js} +4 -4
  149. package/dist-lib/{monitor-BBCu3zRe.js → monitor-DexMYjzF.js} +8 -8
  150. package/dist-lib/{my-access-CEGErUgv.js → my-access-DWBV6ohp.js} +120 -132
  151. package/dist-lib/{my-permissions-wSr5zv7g.js → my-permissions-B-gJZQYM.js} +22 -23
  152. package/dist-lib/navigation-DVlyWnpD.js +102 -0
  153. package/dist-lib/{new-BevAuTe5.js → new-JmARyD88.js} +14 -15
  154. package/dist-lib/{ontology-DXGSJC-y.js → ontology-B4rkO33J.js} +50 -52
  155. package/dist-lib/ontology-dataprep-BwD5TKs2.js +322 -0
  156. package/dist-lib/{ontology-domains-jTG7CZm8.js → ontology-domains-zxFrjn0v.js} +89 -92
  157. package/dist-lib/ontology-extract-BHOxruRO.js +3199 -0
  158. package/dist-lib/ontology-extract-iR_rXxFe.js +295 -0
  159. package/dist-lib/ontology-flow-CW0SzeK7.js +456 -0
  160. package/dist-lib/ontology-flow-Dv5iQ20f.js +154 -0
  161. package/dist-lib/ontology-modeling-B9wswveh.js +510 -0
  162. package/dist-lib/ontology-modeling-hakCluBi.js +15136 -0
  163. package/dist-lib/{ontology-scenarios-J5kw6xgi.js → ontology-scenarios-C2kp7Rs-.js} +1466 -1482
  164. package/dist-lib/ontology-scenarios-DKnfydG6.js +675 -0
  165. package/dist-lib/ontology-task-config-DmnWyCCB.js +122 -0
  166. package/dist-lib/ontology-terms-BoNB-5ar.js +66 -0
  167. package/dist-lib/ontology-terms-C-NhpcIZ.js +1195 -0
  168. package/dist-lib/pages-CticGC6S.js +512 -0
  169. package/dist-lib/pages.js +3 -3
  170. package/dist-lib/{permission-BUXo69Ne.js → permission-Dq1-AOQw.js} +41 -41
  171. package/dist-lib/pipeline-layout-CJlOMXJF.js +70 -0
  172. package/dist-lib/{pptx-preview.es-AUrdYKu3.js → pptx-preview.es-D4ODiBv2.js} +2 -2
  173. package/dist-lib/preset-Bp_mvsJm.js +56827 -0
  174. package/dist-lib/{preset-gh5SGoYT.js → preset-DCNSE--Y.js} +8 -8
  175. package/dist-lib/progress-CZxOOnIs.js +778 -0
  176. package/dist-lib/{quota-D31cXjul.js → quota-oICQRHFU.js} +4 -4
  177. package/dist-lib/row-By17TCiW.js +154 -0
  178. package/dist-lib/runs-DQTDpPaN.js +565 -0
  179. package/dist-lib/{save-blob-CiWNK-cX.js → save-blob-CwCZE1Dn.js} +2 -2
  180. package/dist-lib/{scenario-mapping-preview-DQ_OBV4Z.js → scenario-mapping-preview-sJtjgmry.js} +46 -48
  181. package/dist-lib/scenario-simple-form-BvKSPFzw.js +989 -0
  182. package/dist-lib/{schedule-BktxwX3S.js → schedule-CwkPPSuT.js} +8 -8
  183. package/dist-lib/script-gYJAFobb.js +2709 -0
  184. package/dist-lib/{settings-dsB3H65I.js → settings-CJd5Jj4y.js} +133 -134
  185. package/dist-lib/{shared-CTCzvhyE.js → shared-DG5-VCDM.js} +1 -1
  186. package/dist-lib/{shared-utils-BstybhBG.js → shared-utils-CFHws1DA.js} +2 -2
  187. package/dist-lib/{skills-CHPlMsgO.js → skills-lxpJ5Lzx.js} +39 -40
  188. package/dist-lib/{source-selection-tXqc855k.js → source-selection-DJnQQckl.js} +16 -16
  189. package/dist-lib/sources-C83LpCcV.js +279 -0
  190. package/dist-lib/style-B5THvtDY.js +191 -0
  191. package/dist-lib/{task-config-BiTOiZj0.js → task-config-BNYoOb79.js} +4 -4
  192. package/dist-lib/{tech-BKlGPkV0.js → tech-LuZvKDo6.js} +3 -4
  193. package/dist-lib/templates-a-kbCamr.js +58 -0
  194. package/dist-lib/tenant-login-COB-5h_2.js +338 -0
  195. package/dist-lib/{tools-CouQ4FWk.js → tools-CrA6GrY6.js} +14 -14
  196. package/dist-lib/{use-domain-access-BPlNfoiP.js → use-domain-access-ehGJBGvU.js} +15 -15
  197. package/dist-lib/{use-g6-graph-WLX0PweO.js → use-g6-graph-DfRnsBS6.js} +1 -1
  198. package/dist-lib/{use-graph-layers-ja-ZIC_R.js → use-graph-layers-CrhEeHfD.js} +48 -50
  199. package/dist-lib/use-resizable-columns-BpMCRKif.js +59 -0
  200. package/dist-lib/useBreakpoint-Cul9y9Cu.js +87 -0
  201. package/dist-lib/{useForm-Byp1LopG.js → useForm-B-dwOwJ8.js} +11 -11
  202. package/dist-lib/{version-control-panel-CkBm36Yk.js → version-control-panel-mWXkC-uB.js} +26 -27
  203. package/dist-lib/{version-management-B4kIbdVc.js → version-management-nPlG7wQO.js} +6 -7
  204. package/dist-lib/{welcome-F5iZoFB1.js → welcome-Cqv1-rXT.js} +3 -4
  205. package/package.json +1 -1
  206. package/dist-lib/ApartmentOutlined-M6qSurnE.js +0 -12
  207. package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +0 -12
  208. package/dist-lib/EvidenceFormList-DXqqSpPV.js +0 -91
  209. package/dist-lib/ImpactPage-DyhUR6fT.js +0 -71
  210. package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +0 -136
  211. package/dist-lib/OntologyNodesPage-D4MWlm6q.js +0 -1268
  212. package/dist-lib/Pagination-Dxslodkq.js +0 -1344
  213. package/dist-lib/PlusOutlined-B_dXo_97.js +0 -12
  214. package/dist-lib/SearchOutlined-puH6bCY6.js +0 -979
  215. package/dist-lib/Skeleton-DXcERb5r.js +0 -557
  216. package/dist-lib/TagsOutlined-B4_qkn6-.js +0 -20
  217. package/dist-lib/TermDetailPage-CP0D6OvA.js +0 -242
  218. package/dist-lib/TextArea-DTpTS5HL.js +0 -1897
  219. package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +0 -20
  220. package/dist-lib/callSuper-DZEfdkXG.js +0 -7
  221. package/dist-lib/changelog-Cn81Dvgk.js +0 -69
  222. package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +0 -2004
  223. package/dist-lib/context-Buz0ggsK.js +0 -710
  224. package/dist-lib/context-DpmyNOn3.js +0 -21
  225. package/dist-lib/embed-CR8XVkMy.js +0 -31148
  226. package/dist-lib/focus-set-h0YtOUB2.js +0 -427
  227. package/dist-lib/index-CaXylbQR.js +0 -3419
  228. package/dist-lib/index-Cfu1W1H6.js +0 -535
  229. package/dist-lib/index-CrMcNEAZ.js +0 -9656
  230. package/dist-lib/index-CyKWCYMK.js +0 -218
  231. package/dist-lib/index-DBtGE89a.js +0 -168
  232. package/dist-lib/index-DjFPRXl5.js +0 -1484
  233. package/dist-lib/index-DvWHYX81.js +0 -450
  234. package/dist-lib/index-PBT9GksC.js +0 -340
  235. package/dist-lib/index-bOY1cBol.js +0 -4890
  236. package/dist-lib/meta-BD_qYTZu.js +0 -540
  237. package/dist-lib/ontology-modeling-CjRsa-DR.js +0 -1039
  238. package/dist-lib/ontology-modeling-DOj68TuI.js +0 -38946
  239. package/dist-lib/ontology-scenarios-CcAagMiP.js +0 -660
  240. package/dist-lib/pages-CsexFuEz.js +0 -73
  241. package/dist-lib/row-B5MnGm9M.js +0 -156
  242. package/dist-lib/scenario-simple-form-DESMvU7A.js +0 -2396
  243. package/dist-lib/useClosable-BY7FgWKy.js +0 -59
@@ -1,4890 +0,0 @@
1
- import { K as Ae, h as wo, N as En, c as qn, i as me, O as cn, Q as Bt, k as Kt, T as ht, x as _r, p as Rn, s as Lr, U as Co, V as Io, q as Br, W as Eo, X as Bn, Y as Ro, _ as wt, t as xo, P as Vr, Z as Mo, $ as Oo, a0 as $o, a1 as Do, a2 as Hr, a3 as Vn, a4 as gn, r as Xn, a5 as Hn, a6 as Wr, u as rt, m as pn, g as Po, a7 as No, d as Ar, b as To, R as zo, l as _o, z as Lo, a8 as Bo, e as Vo, a9 as Ho, aa as Wo, f as Ao, ab as Fo, ac as jo, ad as Ko, ae as Uo, y as Go, E as qo, af as Xo } from "./index-CrMcNEAZ.js";
2
- import * as o from "react";
3
- import qt, { useState as en, useMemo as or, useCallback as ar, useRef as We, useEffect as Wn, useContext as Zo } from "react";
4
- import { c as ke, a as tn, i as H, q as xt, _ as Je, b as F, w as Fr, h as Ce, x as An, f as Rt, j as Yo, y as ir, I as jr, R as Qo } from "./SearchOutlined-puH6bCY6.js";
5
- import { unstable_batchedUpdates as Jo, flushSync as lr } from "react-dom";
6
- const ko = (e) => ({
7
- animationDuration: e,
8
- animationFillMode: "both"
9
- }), ea = (e) => ({
10
- animationDuration: e,
11
- animationFillMode: "both"
12
- }), Zn = (e, t, n, r, a = !1) => {
13
- const i = a ? "&" : "";
14
- return {
15
- [`
16
- ${i}${e}-enter,
17
- ${i}${e}-appear
18
- `]: Object.assign(Object.assign({}, ko(r)), {
19
- animationPlayState: "paused"
20
- }),
21
- [`${i}${e}-leave`]: Object.assign(Object.assign({}, ea(r)), {
22
- animationPlayState: "paused"
23
- }),
24
- [`
25
- ${i}${e}-enter${e}-enter-active,
26
- ${i}${e}-appear${e}-appear-active
27
- `]: {
28
- animationName: t,
29
- animationPlayState: "running"
30
- },
31
- [`${i}${e}-leave${e}-leave-active`]: {
32
- animationName: n,
33
- animationPlayState: "running",
34
- pointerEvents: "none"
35
- }
36
- };
37
- }, ta = new Ae("antMoveDownIn", {
38
- "0%": {
39
- transform: "translate3d(0, 100%, 0)",
40
- transformOrigin: "0 0",
41
- opacity: 0
42
- },
43
- "100%": {
44
- transform: "translate3d(0, 0, 0)",
45
- transformOrigin: "0 0",
46
- opacity: 1
47
- }
48
- }), na = new Ae("antMoveDownOut", {
49
- "0%": {
50
- transform: "translate3d(0, 0, 0)",
51
- transformOrigin: "0 0",
52
- opacity: 1
53
- },
54
- "100%": {
55
- transform: "translate3d(0, 100%, 0)",
56
- transformOrigin: "0 0",
57
- opacity: 0
58
- }
59
- }), ra = new Ae("antMoveLeftIn", {
60
- "0%": {
61
- transform: "translate3d(-100%, 0, 0)",
62
- transformOrigin: "0 0",
63
- opacity: 0
64
- },
65
- "100%": {
66
- transform: "translate3d(0, 0, 0)",
67
- transformOrigin: "0 0",
68
- opacity: 1
69
- }
70
- }), oa = new Ae("antMoveLeftOut", {
71
- "0%": {
72
- transform: "translate3d(0, 0, 0)",
73
- transformOrigin: "0 0",
74
- opacity: 1
75
- },
76
- "100%": {
77
- transform: "translate3d(-100%, 0, 0)",
78
- transformOrigin: "0 0",
79
- opacity: 0
80
- }
81
- }), aa = new Ae("antMoveRightIn", {
82
- "0%": {
83
- transform: "translate3d(100%, 0, 0)",
84
- transformOrigin: "0 0",
85
- opacity: 0
86
- },
87
- "100%": {
88
- transform: "translate3d(0, 0, 0)",
89
- transformOrigin: "0 0",
90
- opacity: 1
91
- }
92
- }), ia = new Ae("antMoveRightOut", {
93
- "0%": {
94
- transform: "translate3d(0, 0, 0)",
95
- transformOrigin: "0 0",
96
- opacity: 1
97
- },
98
- "100%": {
99
- transform: "translate3d(100%, 0, 0)",
100
- transformOrigin: "0 0",
101
- opacity: 0
102
- }
103
- }), la = new Ae("antMoveUpIn", {
104
- "0%": {
105
- transform: "translate3d(0, -100%, 0)",
106
- transformOrigin: "0 0",
107
- opacity: 0
108
- },
109
- "100%": {
110
- transform: "translate3d(0, 0, 0)",
111
- transformOrigin: "0 0",
112
- opacity: 1
113
- }
114
- }), sa = new Ae("antMoveUpOut", {
115
- "0%": {
116
- transform: "translate3d(0, 0, 0)",
117
- transformOrigin: "0 0",
118
- opacity: 1
119
- },
120
- "100%": {
121
- transform: "translate3d(0, -100%, 0)",
122
- transformOrigin: "0 0",
123
- opacity: 0
124
- }
125
- }), ua = {
126
- "move-up": {
127
- inKeyframes: la,
128
- outKeyframes: sa
129
- },
130
- "move-down": {
131
- inKeyframes: ta,
132
- outKeyframes: na
133
- },
134
- "move-left": {
135
- inKeyframes: ra,
136
- outKeyframes: oa
137
- },
138
- "move-right": {
139
- inKeyframes: aa,
140
- outKeyframes: ia
141
- }
142
- }, sr = (e, t) => {
143
- const {
144
- antCls: n
145
- } = e, r = `${n}-${t}`, {
146
- inKeyframes: a,
147
- outKeyframes: i
148
- } = ua[t];
149
- return [Zn(r, a, i, e.motionDurationMid), {
150
- [`
151
- ${r}-enter,
152
- ${r}-appear
153
- `]: {
154
- opacity: 0,
155
- animationTimingFunction: e.motionEaseOutCirc
156
- },
157
- [`${r}-leave`]: {
158
- animationTimingFunction: e.motionEaseInOutCirc
159
- }
160
- }];
161
- }, Kr = new Ae("antSlideUpIn", {
162
- "0%": {
163
- transform: "scaleY(0.8)",
164
- transformOrigin: "0% 0%",
165
- opacity: 0
166
- },
167
- "100%": {
168
- transform: "scaleY(1)",
169
- transformOrigin: "0% 0%",
170
- opacity: 1
171
- }
172
- }), Ur = new Ae("antSlideUpOut", {
173
- "0%": {
174
- transform: "scaleY(1)",
175
- transformOrigin: "0% 0%",
176
- opacity: 1
177
- },
178
- "100%": {
179
- transform: "scaleY(0.8)",
180
- transformOrigin: "0% 0%",
181
- opacity: 0
182
- }
183
- }), Gr = new Ae("antSlideDownIn", {
184
- "0%": {
185
- transform: "scaleY(0.8)",
186
- transformOrigin: "100% 100%",
187
- opacity: 0
188
- },
189
- "100%": {
190
- transform: "scaleY(1)",
191
- transformOrigin: "100% 100%",
192
- opacity: 1
193
- }
194
- }), qr = new Ae("antSlideDownOut", {
195
- "0%": {
196
- transform: "scaleY(1)",
197
- transformOrigin: "100% 100%",
198
- opacity: 1
199
- },
200
- "100%": {
201
- transform: "scaleY(0.8)",
202
- transformOrigin: "100% 100%",
203
- opacity: 0
204
- }
205
- }), ca = new Ae("antSlideLeftIn", {
206
- "0%": {
207
- transform: "scaleX(0.8)",
208
- transformOrigin: "0% 0%",
209
- opacity: 0
210
- },
211
- "100%": {
212
- transform: "scaleX(1)",
213
- transformOrigin: "0% 0%",
214
- opacity: 1
215
- }
216
- }), da = new Ae("antSlideLeftOut", {
217
- "0%": {
218
- transform: "scaleX(1)",
219
- transformOrigin: "0% 0%",
220
- opacity: 1
221
- },
222
- "100%": {
223
- transform: "scaleX(0.8)",
224
- transformOrigin: "0% 0%",
225
- opacity: 0
226
- }
227
- }), fa = new Ae("antSlideRightIn", {
228
- "0%": {
229
- transform: "scaleX(0.8)",
230
- transformOrigin: "100% 0%",
231
- opacity: 0
232
- },
233
- "100%": {
234
- transform: "scaleX(1)",
235
- transformOrigin: "100% 0%",
236
- opacity: 1
237
- }
238
- }), va = new Ae("antSlideRightOut", {
239
- "0%": {
240
- transform: "scaleX(1)",
241
- transformOrigin: "100% 0%",
242
- opacity: 1
243
- },
244
- "100%": {
245
- transform: "scaleX(0.8)",
246
- transformOrigin: "100% 0%",
247
- opacity: 0
248
- }
249
- }), ma = {
250
- "slide-up": {
251
- inKeyframes: Kr,
252
- outKeyframes: Ur
253
- },
254
- "slide-down": {
255
- inKeyframes: Gr,
256
- outKeyframes: qr
257
- },
258
- "slide-left": {
259
- inKeyframes: ca,
260
- outKeyframes: da
261
- },
262
- "slide-right": {
263
- inKeyframes: fa,
264
- outKeyframes: va
265
- }
266
- }, ur = (e, t) => {
267
- const {
268
- antCls: n
269
- } = e, r = `${n}-${t}`, {
270
- inKeyframes: a,
271
- outKeyframes: i
272
- } = ma[t];
273
- return [Zn(r, a, i, e.motionDurationMid), {
274
- [`
275
- ${r}-enter,
276
- ${r}-appear
277
- `]: {
278
- transform: "scale(0)",
279
- transformOrigin: "0% 0%",
280
- opacity: 0,
281
- animationTimingFunction: e.motionEaseOutQuint,
282
- "&-prepare": {
283
- transform: "scale(1)"
284
- }
285
- },
286
- [`${r}-leave`]: {
287
- animationTimingFunction: e.motionEaseInQuint
288
- }
289
- }];
290
- }, ga = new Ae("antZoomIn", {
291
- "0%": {
292
- transform: "scale(0.2)",
293
- opacity: 0
294
- },
295
- "100%": {
296
- transform: "scale(1)",
297
- opacity: 1
298
- }
299
- }), ha = new Ae("antZoomOut", {
300
- "0%": {
301
- transform: "scale(1)"
302
- },
303
- "100%": {
304
- transform: "scale(0.2)",
305
- opacity: 0
306
- }
307
- }), cr = new Ae("antZoomBigIn", {
308
- "0%": {
309
- transform: "scale(0.8)",
310
- opacity: 0
311
- },
312
- "100%": {
313
- transform: "scale(1)",
314
- opacity: 1
315
- }
316
- }), dr = new Ae("antZoomBigOut", {
317
- "0%": {
318
- transform: "scale(1)"
319
- },
320
- "100%": {
321
- transform: "scale(0.8)",
322
- opacity: 0
323
- }
324
- }), pa = new Ae("antZoomUpIn", {
325
- "0%": {
326
- transform: "scale(0.8)",
327
- transformOrigin: "50% 0%",
328
- opacity: 0
329
- },
330
- "100%": {
331
- transform: "scale(1)",
332
- transformOrigin: "50% 0%"
333
- }
334
- }), ba = new Ae("antZoomUpOut", {
335
- "0%": {
336
- transform: "scale(1)",
337
- transformOrigin: "50% 0%"
338
- },
339
- "100%": {
340
- transform: "scale(0.8)",
341
- transformOrigin: "50% 0%",
342
- opacity: 0
343
- }
344
- }), Sa = new Ae("antZoomLeftIn", {
345
- "0%": {
346
- transform: "scale(0.8)",
347
- transformOrigin: "0% 50%",
348
- opacity: 0
349
- },
350
- "100%": {
351
- transform: "scale(1)",
352
- transformOrigin: "0% 50%"
353
- }
354
- }), ya = new Ae("antZoomLeftOut", {
355
- "0%": {
356
- transform: "scale(1)",
357
- transformOrigin: "0% 50%"
358
- },
359
- "100%": {
360
- transform: "scale(0.8)",
361
- transformOrigin: "0% 50%",
362
- opacity: 0
363
- }
364
- }), wa = new Ae("antZoomRightIn", {
365
- "0%": {
366
- transform: "scale(0.8)",
367
- transformOrigin: "100% 50%",
368
- opacity: 0
369
- },
370
- "100%": {
371
- transform: "scale(1)",
372
- transformOrigin: "100% 50%"
373
- }
374
- }), Ca = new Ae("antZoomRightOut", {
375
- "0%": {
376
- transform: "scale(1)",
377
- transformOrigin: "100% 50%"
378
- },
379
- "100%": {
380
- transform: "scale(0.8)",
381
- transformOrigin: "100% 50%",
382
- opacity: 0
383
- }
384
- }), Ia = new Ae("antZoomDownIn", {
385
- "0%": {
386
- transform: "scale(0.8)",
387
- transformOrigin: "50% 100%",
388
- opacity: 0
389
- },
390
- "100%": {
391
- transform: "scale(1)",
392
- transformOrigin: "50% 100%"
393
- }
394
- }), Ea = new Ae("antZoomDownOut", {
395
- "0%": {
396
- transform: "scale(1)",
397
- transformOrigin: "50% 100%"
398
- },
399
- "100%": {
400
- transform: "scale(0.8)",
401
- transformOrigin: "50% 100%",
402
- opacity: 0
403
- }
404
- }), Ra = {
405
- zoom: {
406
- inKeyframes: ga,
407
- outKeyframes: ha
408
- },
409
- "zoom-big": {
410
- inKeyframes: cr,
411
- outKeyframes: dr
412
- },
413
- "zoom-big-fast": {
414
- inKeyframes: cr,
415
- outKeyframes: dr
416
- },
417
- "zoom-left": {
418
- inKeyframes: Sa,
419
- outKeyframes: ya
420
- },
421
- "zoom-right": {
422
- inKeyframes: wa,
423
- outKeyframes: Ca
424
- },
425
- "zoom-up": {
426
- inKeyframes: pa,
427
- outKeyframes: ba
428
- },
429
- "zoom-down": {
430
- inKeyframes: Ia,
431
- outKeyframes: Ea
432
- }
433
- }, zl = (e, t) => {
434
- const {
435
- antCls: n
436
- } = e, r = `${n}-${t}`, {
437
- inKeyframes: a,
438
- outKeyframes: i
439
- } = Ra[t];
440
- return [Zn(r, a, i, t === "zoom-big-fast" ? e.motionDurationFast : e.motionDurationMid), {
441
- [`
442
- ${r}-enter,
443
- ${r}-appear
444
- `]: {
445
- transform: "scale(0)",
446
- opacity: 0,
447
- animationTimingFunction: e.motionEaseOutCirc,
448
- "&-prepare": {
449
- transform: "none"
450
- }
451
- },
452
- [`${r}-leave`]: {
453
- animationTimingFunction: e.motionEaseInOutCirc
454
- }
455
- }];
456
- };
457
- function xa(e) {
458
- return (t) => /* @__PURE__ */ o.createElement(wo, {
459
- theme: {
460
- token: {
461
- motion: !1,
462
- zIndexPopupBase: 0
463
- }
464
- }
465
- }, /* @__PURE__ */ o.createElement(e, Object.assign({}, t)));
466
- }
467
- const Ma = (e, t, n, r, a) => xa((l) => {
468
- const {
469
- prefixCls: s,
470
- style: c
471
- } = l, d = o.useRef(null), [g, f] = o.useState(0), [h, u] = o.useState(0), [v, m] = En(!1, {
472
- value: l.open
473
- }), {
474
- getPrefixCls: p
475
- } = o.useContext(qn), y = p(r || "select", s);
476
- o.useEffect(() => {
477
- if (m(!0), typeof ResizeObserver < "u") {
478
- const I = new ResizeObserver((S) => {
479
- const $ = S[0].target;
480
- f($.offsetHeight + 8), u($.offsetWidth);
481
- }), O = setInterval(() => {
482
- var S;
483
- const $ = a ? `.${a(y)}` : `.${y}-dropdown`, W = (S = d.current) === null || S === void 0 ? void 0 : S.querySelector($);
484
- W && (clearInterval(O), I.observe(W));
485
- }, 10);
486
- return () => {
487
- clearInterval(O), I.disconnect();
488
- };
489
- }
490
- }, [y]);
491
- let b = Object.assign(Object.assign({}, l), {
492
- style: Object.assign(Object.assign({}, c), {
493
- margin: 0
494
- }),
495
- open: v,
496
- visible: v,
497
- getPopupContainer: () => d.current
498
- });
499
- n && (b = n(b)), t && Object.assign(b, {
500
- [t]: {
501
- overflow: {
502
- adjustX: !1,
503
- adjustY: !1
504
- }
505
- }
506
- });
507
- const C = {
508
- paddingBottom: g,
509
- position: "relative",
510
- minWidth: h
511
- };
512
- return /* @__PURE__ */ o.createElement("div", {
513
- ref: d,
514
- style: C
515
- }, /* @__PURE__ */ o.createElement(e, Object.assign({}, b)));
516
- }), Xr = (function() {
517
- if (typeof navigator > "u" || typeof window > "u")
518
- return !1;
519
- var e = navigator.userAgent || navigator.vendor || window.opera;
520
- return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
521
- });
522
- var On = function(t) {
523
- var n = t.className, r = t.customizeIcon, a = t.customizeIconProps, i = t.children, l = t.onMouseDown, s = t.onClick, c = typeof r == "function" ? r(a) : r;
524
- return /* @__PURE__ */ o.createElement("span", {
525
- className: n,
526
- onMouseDown: function(g) {
527
- g.preventDefault(), l == null || l(g);
528
- },
529
- style: {
530
- userSelect: "none",
531
- WebkitUserSelect: "none"
532
- },
533
- unselectable: "on",
534
- onClick: s,
535
- "aria-hidden": !0
536
- }, c !== void 0 ? c : /* @__PURE__ */ o.createElement("span", {
537
- className: ke(n.split(/\s+/).map(function(d) {
538
- return "".concat(d, "-icon");
539
- }))
540
- }, i));
541
- }, Oa = function(t, n, r, a, i) {
542
- var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, s = arguments.length > 6 ? arguments[6] : void 0, c = arguments.length > 7 ? arguments[7] : void 0, d = qt.useMemo(function() {
543
- if (tn(a) === "object")
544
- return a.clearIcon;
545
- if (i)
546
- return i;
547
- }, [a, i]), g = qt.useMemo(function() {
548
- return !!(!l && a && (r.length || s) && !(c === "combobox" && s === ""));
549
- }, [a, l, r.length, s, c]);
550
- return {
551
- allowClear: g,
552
- clearIcon: /* @__PURE__ */ qt.createElement(On, {
553
- className: "".concat(t, "-clear"),
554
- onMouseDown: n,
555
- customizeIcon: d
556
- }, "×")
557
- };
558
- }, Zr = /* @__PURE__ */ o.createContext(null);
559
- function $a() {
560
- return o.useContext(Zr);
561
- }
562
- function Da() {
563
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, t = o.useState(!1), n = H(t, 2), r = n[0], a = n[1], i = o.useRef(null), l = function() {
564
- window.clearTimeout(i.current);
565
- };
566
- o.useEffect(function() {
567
- return l;
568
- }, []);
569
- var s = function(d, g) {
570
- l(), i.current = window.setTimeout(function() {
571
- a(d), g && g();
572
- }, e);
573
- };
574
- return [r, s, l];
575
- }
576
- function Yr() {
577
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = o.useRef(null), n = o.useRef(null);
578
- o.useEffect(function() {
579
- return function() {
580
- window.clearTimeout(n.current);
581
- };
582
- }, []);
583
- function r(a) {
584
- (a || t.current === null) && (t.current = a), window.clearTimeout(n.current), n.current = window.setTimeout(function() {
585
- t.current = null;
586
- }, e);
587
- }
588
- return [function() {
589
- return t.current;
590
- }, r];
591
- }
592
- function Pa(e, t, n, r) {
593
- var a = o.useRef(null);
594
- a.current = {
595
- open: t,
596
- triggerOpen: n,
597
- customizedTrigger: r
598
- }, o.useEffect(function() {
599
- function i(l) {
600
- var s;
601
- if (!((s = a.current) !== null && s !== void 0 && s.customizedTrigger)) {
602
- var c = l.target;
603
- c.shadowRoot && l.composed && (c = l.composedPath()[0] || c), a.current.open && e().filter(function(d) {
604
- return d;
605
- }).every(function(d) {
606
- return !d.contains(c) && d !== c;
607
- }) && a.current.triggerOpen(!1);
608
- }
609
- }
610
- return window.addEventListener("mousedown", i), function() {
611
- return window.removeEventListener("mousedown", i);
612
- };
613
- }, []);
614
- }
615
- function Na(e) {
616
- return (
617
- // Undefined for Edge bug:
618
- // https://github.com/ant-design/ant-design/issues/51292
619
- e && // Other keys
620
- ![
621
- // System function button
622
- me.ESC,
623
- me.SHIFT,
624
- me.BACKSPACE,
625
- me.TAB,
626
- me.WIN_KEY,
627
- me.ALT,
628
- me.META,
629
- me.WIN_KEY_RIGHT,
630
- me.CTRL,
631
- me.SEMICOLON,
632
- me.EQUALS,
633
- me.CAPS_LOCK,
634
- me.CONTEXT_MENU,
635
- // F1-F12
636
- me.F1,
637
- me.F2,
638
- me.F3,
639
- me.F4,
640
- me.F5,
641
- me.F6,
642
- me.F7,
643
- me.F8,
644
- me.F9,
645
- me.F10,
646
- me.F11,
647
- me.F12
648
- ].includes(e)
649
- );
650
- }
651
- var Ta = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], an = void 0;
652
- function za(e, t) {
653
- var n = e.prefixCls, r = e.invalidate, a = e.item, i = e.renderItem, l = e.responsive, s = e.responsiveDisabled, c = e.registerSize, d = e.itemKey, g = e.className, f = e.style, h = e.children, u = e.display, v = e.order, m = e.component, p = m === void 0 ? "div" : m, y = xt(e, Ta), b = l && !u;
654
- function C(W) {
655
- c(d, W);
656
- }
657
- o.useEffect(function() {
658
- return function() {
659
- C(null);
660
- };
661
- }, []);
662
- var I = i && a !== an ? i(a, {
663
- index: v
664
- }) : h, O;
665
- r || (O = {
666
- opacity: b ? 0 : 1,
667
- height: b ? 0 : an,
668
- overflowY: b ? "hidden" : an,
669
- order: l ? v : an,
670
- pointerEvents: b ? "none" : an,
671
- position: b ? "absolute" : an
672
- });
673
- var S = {};
674
- b && (S["aria-hidden"] = !0);
675
- var $ = /* @__PURE__ */ o.createElement(p, Je({
676
- className: ke(!r && n, g),
677
- style: F(F({}, O), f)
678
- }, S, y, {
679
- ref: t
680
- }), I);
681
- return l && ($ = /* @__PURE__ */ o.createElement(cn, {
682
- onResize: function(U) {
683
- var te = U.offsetWidth;
684
- C(te);
685
- },
686
- disabled: s
687
- }, $)), $;
688
- }
689
- var un = /* @__PURE__ */ o.forwardRef(za);
690
- un.displayName = "Item";
691
- function _a(e) {
692
- if (typeof MessageChannel > "u")
693
- Bt(e);
694
- else {
695
- var t = new MessageChannel();
696
- t.port1.onmessage = function() {
697
- return e();
698
- }, t.port2.postMessage(void 0);
699
- }
700
- }
701
- function La() {
702
- var e = o.useRef(null), t = function(r) {
703
- e.current || (e.current = [], _a(function() {
704
- Jo(function() {
705
- e.current.forEach(function(a) {
706
- a();
707
- }), e.current = null;
708
- });
709
- })), e.current.push(r);
710
- };
711
- return t;
712
- }
713
- function ln(e, t) {
714
- var n = o.useState(t), r = H(n, 2), a = r[0], i = r[1], l = Kt(function(s) {
715
- e(function() {
716
- i(s);
717
- });
718
- });
719
- return [a, l];
720
- }
721
- var xn = /* @__PURE__ */ qt.createContext(null), Ba = ["component"], Va = ["className"], Ha = ["className"], Wa = function(t, n) {
722
- var r = o.useContext(xn);
723
- if (!r) {
724
- var a = t.component, i = a === void 0 ? "div" : a, l = xt(t, Ba);
725
- return /* @__PURE__ */ o.createElement(i, Je({}, l, {
726
- ref: n
727
- }));
728
- }
729
- var s = r.className, c = xt(r, Va), d = t.className, g = xt(t, Ha);
730
- return /* @__PURE__ */ o.createElement(xn.Provider, {
731
- value: null
732
- }, /* @__PURE__ */ o.createElement(un, Je({
733
- ref: n,
734
- className: ke(s, d)
735
- }, c, g)));
736
- }, Qr = /* @__PURE__ */ o.forwardRef(Wa);
737
- Qr.displayName = "RawItem";
738
- var Aa = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "prefix", "suffix", "component", "itemComponent", "onVisibleChange"], Jr = "responsive", kr = "invalidate";
739
- function Fa(e) {
740
- return "+ ".concat(e.length, " ...");
741
- }
742
- function ja(e, t) {
743
- var n = e.prefixCls, r = n === void 0 ? "rc-overflow" : n, a = e.data, i = a === void 0 ? [] : a, l = e.renderItem, s = e.renderRawItem, c = e.itemKey, d = e.itemWidth, g = d === void 0 ? 10 : d, f = e.ssr, h = e.style, u = e.className, v = e.maxCount, m = e.renderRest, p = e.renderRawRest, y = e.prefix, b = e.suffix, C = e.component, I = C === void 0 ? "div" : C, O = e.itemComponent, S = e.onVisibleChange, $ = xt(e, Aa), W = f === "full", U = La(), te = ln(U, null), ne = H(te, 2), Q = ne[0], ce = ne[1], k = Q || 0, ie = ln(U, /* @__PURE__ */ new Map()), G = H(ie, 2), ee = G[0], L = G[1], oe = ln(U, 0), A = H(oe, 2), P = A[0], z = A[1], le = ln(U, 0), Ie = H(le, 2), se = Ie[0], xe = Ie[1], ye = ln(U, 0), Me = H(ye, 2), fe = Me[0], De = Me[1], B = ln(U, 0), x = H(B, 2), D = x[0], X = x[1], M = en(null), j = H(M, 2), ae = j[0], Z = j[1], J = en(null), ge = H(J, 2), Ee = ge[0], _e = ge[1], Be = o.useMemo(function() {
744
- return Ee === null && W ? Number.MAX_SAFE_INTEGER : Ee || 0;
745
- }, [Ee, Q]), q = en(!1), Ue = H(q, 2), ze = Ue[0], Pe = Ue[1], we = "".concat(r, "-item"), he = Math.max(P, se), Ne = v === Jr, Oe = i.length && Ne, Ge = v === kr, qe = Oe || typeof v == "number" && i.length > v, Re = or(function() {
746
- var w = i;
747
- return Oe ? Q === null && W ? w = i : w = i.slice(0, Math.min(i.length, k / g)) : typeof v == "number" && (w = i.slice(0, v)), w;
748
- }, [i, g, Q, v, Oe]), pe = or(function() {
749
- return Oe ? i.slice(Be + 1) : i.slice(Re.length);
750
- }, [i, Re, Oe, Be]), lt = ar(function(w, E) {
751
- var R;
752
- return typeof c == "function" ? c(w) : (R = c && (w == null ? void 0 : w[c])) !== null && R !== void 0 ? R : E;
753
- }, [c]), Le = ar(l || function(w) {
754
- return w;
755
- }, [l]);
756
- function Ye(w, E, R) {
757
- Ee === w && (E === void 0 || E === ae) || (_e(w), R || (Pe(w < i.length - 1), S == null || S(w)), E !== void 0 && Z(E));
758
- }
759
- function Xe(w, E) {
760
- ce(E.clientWidth);
761
- }
762
- function Ct(w, E) {
763
- L(function(R) {
764
- var K = new Map(R);
765
- return E === null ? K.delete(w) : K.set(w, E), K;
766
- });
767
- }
768
- function dt(w, E) {
769
- xe(E), z(se);
770
- }
771
- function pt(w, E) {
772
- De(E);
773
- }
774
- function bt(w, E) {
775
- X(E);
776
- }
777
- function et(w) {
778
- return ee.get(lt(Re[w], w));
779
- }
780
- ht(function() {
781
- if (k && typeof he == "number" && Re) {
782
- var w = fe + D, E = Re.length, R = E - 1;
783
- if (!E) {
784
- Ye(0, null);
785
- return;
786
- }
787
- for (var K = 0; K < E; K += 1) {
788
- var de = et(K);
789
- if (W && (de = de || 0), de === void 0) {
790
- Ye(K - 1, void 0, !0);
791
- break;
792
- }
793
- if (w += de, // Only one means `totalWidth` is the final width
794
- R === 0 && w <= k || // Last two width will be the final width
795
- K === R - 1 && w + et(R) <= k) {
796
- Ye(R, null);
797
- break;
798
- } else if (w + he > k) {
799
- Ye(K - 1, w - de - D + se);
800
- break;
801
- }
802
- }
803
- b && et(0) + D > k && Z(null);
804
- }
805
- }, [k, ee, se, fe, D, lt, Re]);
806
- var Ve = ze && !!pe.length, Te = {};
807
- ae !== null && Oe && (Te = {
808
- position: "absolute",
809
- left: ae,
810
- top: 0
811
- });
812
- var tt = {
813
- prefixCls: we,
814
- responsive: Oe,
815
- component: O,
816
- invalidate: Ge
817
- }, Ke = s ? function(w, E) {
818
- var R = lt(w, E);
819
- return /* @__PURE__ */ o.createElement(xn.Provider, {
820
- key: R,
821
- value: F(F({}, tt), {}, {
822
- order: E,
823
- item: w,
824
- itemKey: R,
825
- registerSize: Ct,
826
- display: E <= Be
827
- })
828
- }, s(w, E));
829
- } : function(w, E) {
830
- var R = lt(w, E);
831
- return /* @__PURE__ */ o.createElement(un, Je({}, tt, {
832
- order: E,
833
- key: R,
834
- item: w,
835
- renderItem: Le,
836
- itemKey: R,
837
- registerSize: Ct,
838
- display: E <= Be
839
- }));
840
- }, Y = {
841
- order: Ve ? Be : Number.MAX_SAFE_INTEGER,
842
- className: "".concat(we, "-rest"),
843
- registerSize: dt,
844
- display: Ve
845
- }, Se = m || Fa, je = p ? /* @__PURE__ */ o.createElement(xn.Provider, {
846
- value: F(F({}, tt), Y)
847
- }, p(pe)) : /* @__PURE__ */ o.createElement(un, Je({}, tt, Y), typeof Se == "function" ? Se(pe) : Se), N = /* @__PURE__ */ o.createElement(I, Je({
848
- className: ke(!Ge && r, u),
849
- style: h,
850
- ref: t
851
- }, $), y && /* @__PURE__ */ o.createElement(un, Je({}, tt, {
852
- responsive: Ne,
853
- responsiveDisabled: !Oe,
854
- order: -1,
855
- className: "".concat(we, "-prefix"),
856
- registerSize: pt,
857
- display: !0
858
- }), y), Re.map(Ke), qe ? je : null, b && /* @__PURE__ */ o.createElement(un, Je({}, tt, {
859
- responsive: Ne,
860
- responsiveDisabled: !Oe,
861
- order: Be,
862
- className: "".concat(we, "-suffix"),
863
- registerSize: bt,
864
- display: !0,
865
- style: Te
866
- }), b));
867
- return Ne ? /* @__PURE__ */ o.createElement(cn, {
868
- onResize: Xe,
869
- disabled: !Oe
870
- }, N) : N;
871
- }
872
- var Sn = /* @__PURE__ */ o.forwardRef(ja);
873
- Sn.displayName = "Overflow";
874
- Sn.Item = Qr;
875
- Sn.RESPONSIVE = Jr;
876
- Sn.INVALIDATE = kr;
877
- function Ka(e, t, n) {
878
- var r = F(F({}, e), t);
879
- return Object.keys(t).forEach(function(a) {
880
- var i = t[a];
881
- typeof i == "function" && (r[a] = function() {
882
- for (var l, s = arguments.length, c = new Array(s), d = 0; d < s; d++)
883
- c[d] = arguments[d];
884
- return i.apply(void 0, c), (l = e[a]) === null || l === void 0 ? void 0 : l.call.apply(l, [e].concat(c));
885
- });
886
- }), r;
887
- }
888
- var Ua = ["prefixCls", "id", "inputElement", "autoFocus", "autoComplete", "editable", "activeDescendantId", "value", "open", "attrs"], Ga = function(t, n) {
889
- var r = t.prefixCls, a = t.id, i = t.inputElement, l = t.autoFocus, s = t.autoComplete, c = t.editable, d = t.activeDescendantId, g = t.value, f = t.open, h = t.attrs, u = xt(t, Ua), v = i || /* @__PURE__ */ o.createElement("input", null), m = v, p = m.ref, y = m.props;
890
- return Fr(!("maxLength" in v.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), v = /* @__PURE__ */ o.cloneElement(v, F(F(F({
891
- type: "search"
892
- }, Ka(u, y)), {}, {
893
- // Override over origin props
894
- id: a,
895
- ref: _r(n, p),
896
- autoComplete: s || "off",
897
- autoFocus: l,
898
- className: ke("".concat(r, "-selection-search-input"), y == null ? void 0 : y.className),
899
- role: "combobox",
900
- "aria-expanded": f || !1,
901
- "aria-haspopup": "listbox",
902
- "aria-owns": "".concat(a, "_list"),
903
- "aria-autocomplete": "list",
904
- "aria-controls": "".concat(a, "_list"),
905
- "aria-activedescendant": f ? d : void 0
906
- }, h), {}, {
907
- value: c ? g : "",
908
- readOnly: !c,
909
- unselectable: c ? null : "on",
910
- style: F(F({}, y.style), {}, {
911
- opacity: c ? null : 0
912
- })
913
- })), v;
914
- }, Yn = /* @__PURE__ */ o.forwardRef(Ga);
915
- process.env.NODE_ENV !== "production" && (Yn.displayName = "Input");
916
- function Qn(e) {
917
- return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
918
- }
919
- var qa = typeof window < "u" && window.document && window.document.documentElement, Xa = process.env.NODE_ENV !== "test" && qa;
920
- function Za(e) {
921
- return e != null;
922
- }
923
- function Ya(e) {
924
- return !e && e !== 0;
925
- }
926
- function fr(e) {
927
- return ["string", "number"].includes(tn(e));
928
- }
929
- function eo(e) {
930
- var t = void 0;
931
- return e && (fr(e.title) ? t = e.title.toString() : fr(e.label) && (t = e.label.toString())), t;
932
- }
933
- function Qa(e, t) {
934
- Xa ? o.useLayoutEffect(e, t) : o.useEffect(e, t);
935
- }
936
- function Ja(e) {
937
- var t;
938
- return (t = e.key) !== null && t !== void 0 ? t : e.value;
939
- }
940
- var vr = function(t) {
941
- t.preventDefault(), t.stopPropagation();
942
- }, ka = function(t) {
943
- var n = t.id, r = t.prefixCls, a = t.values, i = t.open, l = t.searchValue, s = t.autoClearSearchValue, c = t.inputRef, d = t.placeholder, g = t.disabled, f = t.mode, h = t.showSearch, u = t.autoFocus, v = t.autoComplete, m = t.activeDescendantId, p = t.tabIndex, y = t.removeIcon, b = t.maxTagCount, C = t.maxTagTextLength, I = t.maxTagPlaceholder, O = I === void 0 ? function(X) {
944
- return "+ ".concat(X.length, " ...");
945
- } : I, S = t.tagRender, $ = t.onToggleOpen, W = t.onRemove, U = t.onInputChange, te = t.onInputPaste, ne = t.onInputKeyDown, Q = t.onInputMouseDown, ce = t.onInputCompositionStart, k = t.onInputCompositionEnd, ie = t.onInputBlur, G = o.useRef(null), ee = en(0), L = H(ee, 2), oe = L[0], A = L[1], P = en(!1), z = H(P, 2), le = z[0], Ie = z[1], se = "".concat(r, "-selection"), xe = i || f === "multiple" && s === !1 || f === "tags" ? l : "", ye = f === "tags" || f === "multiple" && s === !1 || h && (i || le);
946
- Qa(function() {
947
- A(G.current.scrollWidth);
948
- }, [xe]);
949
- var Me = function(M, j, ae, Z, J) {
950
- return /* @__PURE__ */ o.createElement("span", {
951
- title: eo(M),
952
- className: ke("".concat(se, "-item"), Ce({}, "".concat(se, "-item-disabled"), ae))
953
- }, /* @__PURE__ */ o.createElement("span", {
954
- className: "".concat(se, "-item-content")
955
- }, j), Z && /* @__PURE__ */ o.createElement(On, {
956
- className: "".concat(se, "-item-remove"),
957
- onMouseDown: vr,
958
- onClick: J,
959
- customizeIcon: y
960
- }, "×"));
961
- }, fe = function(M, j, ae, Z, J, ge) {
962
- var Ee = function(Be) {
963
- vr(Be), $(!i);
964
- };
965
- return /* @__PURE__ */ o.createElement("span", {
966
- onMouseDown: Ee
967
- }, S({
968
- label: j,
969
- value: M,
970
- disabled: ae,
971
- closable: Z,
972
- onClose: J,
973
- isMaxTag: !!ge
974
- }));
975
- }, De = function(M) {
976
- var j = M.disabled, ae = M.label, Z = M.value, J = !g && !j, ge = ae;
977
- if (typeof C == "number" && (typeof ae == "string" || typeof ae == "number")) {
978
- var Ee = String(ge);
979
- Ee.length > C && (ge = "".concat(Ee.slice(0, C), "..."));
980
- }
981
- var _e = function(q) {
982
- q && q.stopPropagation(), W(M);
983
- };
984
- return typeof S == "function" ? fe(Z, ge, j, J, _e) : Me(M, ge, j, J, _e);
985
- }, B = function(M) {
986
- if (!a.length)
987
- return null;
988
- var j = typeof O == "function" ? O(M) : O;
989
- return typeof S == "function" ? fe(void 0, j, !1, !1, void 0, !0) : Me({
990
- title: j
991
- }, j, !1);
992
- }, x = /* @__PURE__ */ o.createElement("div", {
993
- className: "".concat(se, "-search"),
994
- style: {
995
- width: oe
996
- },
997
- onFocus: function() {
998
- Ie(!0);
999
- },
1000
- onBlur: function() {
1001
- Ie(!1);
1002
- }
1003
- }, /* @__PURE__ */ o.createElement(Yn, {
1004
- ref: c,
1005
- open: i,
1006
- prefixCls: r,
1007
- id: n,
1008
- inputElement: null,
1009
- disabled: g,
1010
- autoFocus: u,
1011
- autoComplete: v,
1012
- editable: ye,
1013
- activeDescendantId: m,
1014
- value: xe,
1015
- onKeyDown: ne,
1016
- onMouseDown: Q,
1017
- onChange: U,
1018
- onPaste: te,
1019
- onCompositionStart: ce,
1020
- onCompositionEnd: k,
1021
- onBlur: ie,
1022
- tabIndex: p,
1023
- attrs: Rn(t, !0)
1024
- }), /* @__PURE__ */ o.createElement("span", {
1025
- ref: G,
1026
- className: "".concat(se, "-search-mirror"),
1027
- "aria-hidden": !0
1028
- }, xe, " ")), D = /* @__PURE__ */ o.createElement(Sn, {
1029
- prefixCls: "".concat(se, "-overflow"),
1030
- data: a,
1031
- renderItem: De,
1032
- renderRest: B,
1033
- suffix: x,
1034
- itemKey: Ja,
1035
- maxCount: b
1036
- });
1037
- return /* @__PURE__ */ o.createElement("span", {
1038
- className: "".concat(se, "-wrap")
1039
- }, D, !a.length && !xe && /* @__PURE__ */ o.createElement("span", {
1040
- className: "".concat(se, "-placeholder")
1041
- }, d));
1042
- }, ei = function(t) {
1043
- var n = t.inputElement, r = t.prefixCls, a = t.id, i = t.inputRef, l = t.disabled, s = t.autoFocus, c = t.autoComplete, d = t.activeDescendantId, g = t.mode, f = t.open, h = t.values, u = t.placeholder, v = t.tabIndex, m = t.showSearch, p = t.searchValue, y = t.activeValue, b = t.maxLength, C = t.onInputKeyDown, I = t.onInputMouseDown, O = t.onInputChange, S = t.onInputPaste, $ = t.onInputCompositionStart, W = t.onInputCompositionEnd, U = t.onInputBlur, te = t.title, ne = o.useState(!1), Q = H(ne, 2), ce = Q[0], k = Q[1], ie = g === "combobox", G = ie || m, ee = h[0], L = p || "";
1044
- ie && y && !ce && (L = y), o.useEffect(function() {
1045
- ie && k(!1);
1046
- }, [ie, y]);
1047
- var oe = g !== "combobox" && !f && !m ? !1 : !!L, A = te === void 0 ? eo(ee) : te, P = o.useMemo(function() {
1048
- return ee ? null : /* @__PURE__ */ o.createElement("span", {
1049
- className: "".concat(r, "-selection-placeholder"),
1050
- style: oe ? {
1051
- visibility: "hidden"
1052
- } : void 0
1053
- }, u);
1054
- }, [ee, oe, u, r]);
1055
- return /* @__PURE__ */ o.createElement("span", {
1056
- className: "".concat(r, "-selection-wrap")
1057
- }, /* @__PURE__ */ o.createElement("span", {
1058
- className: "".concat(r, "-selection-search")
1059
- }, /* @__PURE__ */ o.createElement(Yn, {
1060
- ref: i,
1061
- prefixCls: r,
1062
- id: a,
1063
- open: f,
1064
- inputElement: n,
1065
- disabled: l,
1066
- autoFocus: s,
1067
- autoComplete: c,
1068
- editable: G,
1069
- activeDescendantId: d,
1070
- value: L,
1071
- onKeyDown: C,
1072
- onMouseDown: I,
1073
- onChange: function(le) {
1074
- k(!0), O(le);
1075
- },
1076
- onPaste: S,
1077
- onCompositionStart: $,
1078
- onCompositionEnd: W,
1079
- onBlur: U,
1080
- tabIndex: v,
1081
- attrs: Rn(t, !0),
1082
- maxLength: ie ? b : void 0
1083
- })), !ie && ee ? /* @__PURE__ */ o.createElement("span", {
1084
- className: "".concat(r, "-selection-item"),
1085
- title: A,
1086
- style: oe ? {
1087
- visibility: "hidden"
1088
- } : void 0
1089
- }, ee.label) : null, P);
1090
- }, ti = function(t, n) {
1091
- var r = We(null), a = We(!1), i = t.prefixCls, l = t.open, s = t.mode, c = t.showSearch, d = t.tokenWithEnter, g = t.disabled, f = t.prefix, h = t.autoClearSearchValue, u = t.onSearch, v = t.onSearchSubmit, m = t.onToggleOpen, p = t.onInputKeyDown, y = t.onInputBlur, b = t.domRef;
1092
- o.useImperativeHandle(n, function() {
1093
- return {
1094
- focus: function(A) {
1095
- r.current.focus(A);
1096
- },
1097
- blur: function() {
1098
- r.current.blur();
1099
- }
1100
- };
1101
- });
1102
- var C = Yr(0), I = H(C, 2), O = I[0], S = I[1], $ = function(A) {
1103
- var P = A.which, z = r.current instanceof HTMLTextAreaElement;
1104
- !z && l && (P === me.UP || P === me.DOWN) && A.preventDefault(), p && p(A), P === me.ENTER && s === "tags" && !a.current && !l && (v == null || v(A.target.value)), !(z && !l && ~[me.UP, me.DOWN, me.LEFT, me.RIGHT].indexOf(P)) && Na(P) && m(!0);
1105
- }, W = function() {
1106
- S(!0);
1107
- }, U = We(null), te = function(A) {
1108
- u(A, !0, a.current) !== !1 && m(!0);
1109
- }, ne = function() {
1110
- a.current = !0;
1111
- }, Q = function(A) {
1112
- a.current = !1, s !== "combobox" && te(A.target.value);
1113
- }, ce = function(A) {
1114
- var P = A.target.value;
1115
- if (d && U.current && /[\r\n]/.test(U.current)) {
1116
- var z = U.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
1117
- P = P.replace(z, U.current);
1118
- }
1119
- U.current = null, te(P);
1120
- }, k = function(A) {
1121
- var P = A.clipboardData, z = P == null ? void 0 : P.getData("text");
1122
- U.current = z || "";
1123
- }, ie = function(A) {
1124
- var P = A.target;
1125
- if (P !== r.current) {
1126
- var z = document.body.style.msTouchAction !== void 0;
1127
- z ? setTimeout(function() {
1128
- r.current.focus();
1129
- }) : r.current.focus();
1130
- }
1131
- }, G = function(A) {
1132
- var P = O();
1133
- A.target !== r.current && !P && !(s === "combobox" && g) && A.preventDefault(), (s !== "combobox" && (!c || !P) || !l) && (l && h !== !1 && u("", !0, !1), m());
1134
- }, ee = {
1135
- inputRef: r,
1136
- onInputKeyDown: $,
1137
- onInputMouseDown: W,
1138
- onInputChange: ce,
1139
- onInputPaste: k,
1140
- onInputCompositionStart: ne,
1141
- onInputCompositionEnd: Q,
1142
- onInputBlur: y
1143
- }, L = s === "multiple" || s === "tags" ? /* @__PURE__ */ o.createElement(ka, Je({}, t, ee)) : /* @__PURE__ */ o.createElement(ei, Je({}, t, ee));
1144
- return /* @__PURE__ */ o.createElement("div", {
1145
- ref: b,
1146
- className: "".concat(i, "-selector"),
1147
- onClick: ie,
1148
- onMouseDown: G
1149
- }, f && /* @__PURE__ */ o.createElement("div", {
1150
- className: "".concat(i, "-prefix")
1151
- }, f), L);
1152
- }, to = /* @__PURE__ */ o.forwardRef(ti);
1153
- process.env.NODE_ENV !== "production" && (to.displayName = "Selector");
1154
- function ni(e) {
1155
- var t = e.prefixCls, n = e.align, r = e.arrow, a = e.arrowPos, i = r || {}, l = i.className, s = i.content, c = a.x, d = c === void 0 ? 0 : c, g = a.y, f = g === void 0 ? 0 : g, h = o.useRef();
1156
- if (!n || !n.points)
1157
- return null;
1158
- var u = {
1159
- position: "absolute"
1160
- };
1161
- if (n.autoArrow !== !1) {
1162
- var v = n.points[0], m = n.points[1], p = v[0], y = v[1], b = m[0], C = m[1];
1163
- p === b || !["t", "b"].includes(p) ? u.top = f : p === "t" ? u.top = 0 : u.bottom = 0, y === C || !["l", "r"].includes(y) ? u.left = d : y === "l" ? u.left = 0 : u.right = 0;
1164
- }
1165
- return /* @__PURE__ */ o.createElement("div", {
1166
- ref: h,
1167
- className: ke("".concat(t, "-arrow"), l),
1168
- style: u
1169
- }, s);
1170
- }
1171
- function ri(e) {
1172
- var t = e.prefixCls, n = e.open, r = e.zIndex, a = e.mask, i = e.motion;
1173
- return a ? /* @__PURE__ */ o.createElement(Lr, Je({}, i, {
1174
- motionAppear: !0,
1175
- visible: n,
1176
- removeOnLeave: !0
1177
- }), function(l) {
1178
- var s = l.className;
1179
- return /* @__PURE__ */ o.createElement("div", {
1180
- style: {
1181
- zIndex: r
1182
- },
1183
- className: ke("".concat(t, "-mask"), s)
1184
- });
1185
- }) : null;
1186
- }
1187
- var no = /* @__PURE__ */ o.memo(function(e) {
1188
- var t = e.children;
1189
- return t;
1190
- }, function(e, t) {
1191
- return t.cache;
1192
- });
1193
- process.env.NODE_ENV !== "production" && (no.displayName = "PopupContent");
1194
- var ro = /* @__PURE__ */ o.forwardRef(function(e, t) {
1195
- var n = e.popup, r = e.className, a = e.prefixCls, i = e.style, l = e.target, s = e.onVisibleChanged, c = e.open, d = e.keepDom, g = e.fresh, f = e.onClick, h = e.mask, u = e.arrow, v = e.arrowPos, m = e.align, p = e.motion, y = e.maskMotion, b = e.forceRender, C = e.getPopupContainer, I = e.autoDestroy, O = e.portal, S = e.zIndex, $ = e.onMouseEnter, W = e.onMouseLeave, U = e.onPointerEnter, te = e.onPointerDownCapture, ne = e.ready, Q = e.offsetX, ce = e.offsetY, k = e.offsetR, ie = e.offsetB, G = e.onAlign, ee = e.onPrepare, L = e.stretch, oe = e.targetWidth, A = e.targetHeight, P = typeof n == "function" ? n() : n, z = c || d, le = (C == null ? void 0 : C.length) > 0, Ie = o.useState(!C || !le), se = H(Ie, 2), xe = se[0], ye = se[1];
1196
- if (ht(function() {
1197
- !xe && le && l && ye(!0);
1198
- }, [xe, le, l]), !xe)
1199
- return null;
1200
- var Me = "auto", fe = {
1201
- left: "-1000vw",
1202
- top: "-1000vh",
1203
- right: Me,
1204
- bottom: Me
1205
- };
1206
- if (ne || !c) {
1207
- var De, B = m.points, x = m.dynamicInset || ((De = m._experimental) === null || De === void 0 ? void 0 : De.dynamicInset), D = x && B[0][1] === "r", X = x && B[0][0] === "b";
1208
- D ? (fe.right = k, fe.left = Me) : (fe.left = Q, fe.right = Me), X ? (fe.bottom = ie, fe.top = Me) : (fe.top = ce, fe.bottom = Me);
1209
- }
1210
- var M = {};
1211
- return L && (L.includes("height") && A ? M.height = A : L.includes("minHeight") && A && (M.minHeight = A), L.includes("width") && oe ? M.width = oe : L.includes("minWidth") && oe && (M.minWidth = oe)), c || (M.pointerEvents = "none"), /* @__PURE__ */ o.createElement(O, {
1212
- open: b || z,
1213
- getContainer: C && function() {
1214
- return C(l);
1215
- },
1216
- autoDestroy: I
1217
- }, /* @__PURE__ */ o.createElement(ri, {
1218
- prefixCls: a,
1219
- open: c,
1220
- zIndex: S,
1221
- mask: h,
1222
- motion: y
1223
- }), /* @__PURE__ */ o.createElement(cn, {
1224
- onResize: G,
1225
- disabled: !c
1226
- }, function(j) {
1227
- return /* @__PURE__ */ o.createElement(Lr, Je({
1228
- motionAppear: !0,
1229
- motionEnter: !0,
1230
- motionLeave: !0,
1231
- removeOnLeave: !1,
1232
- forceRender: b,
1233
- leavedClassName: "".concat(a, "-hidden")
1234
- }, p, {
1235
- onAppearPrepare: ee,
1236
- onEnterPrepare: ee,
1237
- visible: c,
1238
- onVisibleChanged: function(Z) {
1239
- var J;
1240
- p == null || (J = p.onVisibleChanged) === null || J === void 0 || J.call(p, Z), s(Z);
1241
- }
1242
- }), function(ae, Z) {
1243
- var J = ae.className, ge = ae.style, Ee = ke(a, J, r);
1244
- return /* @__PURE__ */ o.createElement("div", {
1245
- ref: _r(j, t, Z),
1246
- className: Ee,
1247
- style: F(F(F(F({
1248
- "--arrow-x": "".concat(v.x || 0, "px"),
1249
- "--arrow-y": "".concat(v.y || 0, "px")
1250
- }, fe), M), ge), {}, {
1251
- boxSizing: "border-box",
1252
- zIndex: S
1253
- }, i),
1254
- onMouseEnter: $,
1255
- onMouseLeave: W,
1256
- onPointerEnter: U,
1257
- onClick: f,
1258
- onPointerDownCapture: te
1259
- }, u && /* @__PURE__ */ o.createElement(ni, {
1260
- prefixCls: a,
1261
- arrow: u,
1262
- arrowPos: v,
1263
- align: m
1264
- }), /* @__PURE__ */ o.createElement(no, {
1265
- cache: !c && !g
1266
- }, P));
1267
- });
1268
- }));
1269
- });
1270
- process.env.NODE_ENV !== "production" && (ro.displayName = "Popup");
1271
- var oo = /* @__PURE__ */ o.forwardRef(function(e, t) {
1272
- var n = e.children, r = e.getTriggerDOMNode, a = Co(n), i = o.useCallback(function(s) {
1273
- Io(t, r ? r(s) : s);
1274
- }, [r]), l = Br(i, Eo(n));
1275
- return a ? /* @__PURE__ */ o.cloneElement(n, {
1276
- ref: l
1277
- }) : n;
1278
- });
1279
- process.env.NODE_ENV !== "production" && (oo.displayName = "TriggerWrapper");
1280
- var mr = /* @__PURE__ */ o.createContext(null);
1281
- function gr(e) {
1282
- return e ? Array.isArray(e) ? e : [e] : [];
1283
- }
1284
- function oi(e, t, n, r) {
1285
- return o.useMemo(function() {
1286
- var a = gr(n ?? t), i = gr(r ?? t), l = new Set(a), s = new Set(i);
1287
- return e && (l.has("hover") && (l.delete("hover"), l.add("click")), s.has("hover") && (s.delete("hover"), s.add("click"))), [l, s];
1288
- }, [e, t, n, r]);
1289
- }
1290
- function ai() {
1291
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], n = arguments.length > 2 ? arguments[2] : void 0;
1292
- return n ? e[0] === t[0] : e[0] === t[0] && e[1] === t[1];
1293
- }
1294
- function ii(e, t, n, r) {
1295
- for (var a = n.points, i = Object.keys(e), l = 0; l < i.length; l += 1) {
1296
- var s, c = i[l];
1297
- if (ai((s = e[c]) === null || s === void 0 ? void 0 : s.points, a, r))
1298
- return "".concat(t, "-placement-").concat(c);
1299
- }
1300
- return "";
1301
- }
1302
- function hr(e, t, n, r) {
1303
- return t || (n ? {
1304
- motionName: "".concat(e, "-").concat(n)
1305
- } : r ? {
1306
- motionName: r
1307
- } : null);
1308
- }
1309
- function yn(e) {
1310
- return e.ownerDocument.defaultView;
1311
- }
1312
- function Fn(e) {
1313
- for (var t = [], n = e == null ? void 0 : e.parentElement, r = ["hidden", "scroll", "clip", "auto"]; n; ) {
1314
- var a = yn(n).getComputedStyle(n), i = a.overflowX, l = a.overflowY, s = a.overflow;
1315
- [i, l, s].some(function(c) {
1316
- return r.includes(c);
1317
- }) && t.push(n), n = n.parentElement;
1318
- }
1319
- return t;
1320
- }
1321
- function bn(e) {
1322
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
1323
- return Number.isNaN(e) ? t : e;
1324
- }
1325
- function hn(e) {
1326
- return bn(parseFloat(e), 0);
1327
- }
1328
- function pr(e, t) {
1329
- var n = F({}, e);
1330
- return (t || []).forEach(function(r) {
1331
- if (!(r instanceof HTMLBodyElement || r instanceof HTMLHtmlElement)) {
1332
- var a = yn(r).getComputedStyle(r), i = a.overflow, l = a.overflowClipMargin, s = a.borderTopWidth, c = a.borderBottomWidth, d = a.borderLeftWidth, g = a.borderRightWidth, f = r.getBoundingClientRect(), h = r.offsetHeight, u = r.clientHeight, v = r.offsetWidth, m = r.clientWidth, p = hn(s), y = hn(c), b = hn(d), C = hn(g), I = bn(Math.round(f.width / v * 1e3) / 1e3), O = bn(Math.round(f.height / h * 1e3) / 1e3), S = (v - m - b - C) * I, $ = (h - u - p - y) * O, W = p * O, U = y * O, te = b * I, ne = C * I, Q = 0, ce = 0;
1333
- if (i === "clip") {
1334
- var k = hn(l);
1335
- Q = k * I, ce = k * O;
1336
- }
1337
- var ie = f.x + te - Q, G = f.y + W - ce, ee = ie + f.width + 2 * Q - te - ne - S, L = G + f.height + 2 * ce - W - U - $;
1338
- n.left = Math.max(n.left, ie), n.top = Math.max(n.top, G), n.right = Math.min(n.right, ee), n.bottom = Math.min(n.bottom, L);
1339
- }
1340
- }), n;
1341
- }
1342
- function br(e) {
1343
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = "".concat(t), r = n.match(/^(.*)\%$/);
1344
- return r ? e * (parseFloat(r[1]) / 100) : parseFloat(n);
1345
- }
1346
- function Sr(e, t) {
1347
- var n = t || [], r = H(n, 2), a = r[0], i = r[1];
1348
- return [br(e.width, a), br(e.height, i)];
1349
- }
1350
- function yr() {
1351
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
1352
- return [e[0], e[1]];
1353
- }
1354
- function sn(e, t) {
1355
- var n = t[0], r = t[1], a, i;
1356
- return n === "t" ? i = e.y : n === "b" ? i = e.y + e.height : i = e.y + e.height / 2, r === "l" ? a = e.x : r === "r" ? a = e.x + e.width : a = e.x + e.width / 2, {
1357
- x: a,
1358
- y: i
1359
- };
1360
- }
1361
- function kt(e, t) {
1362
- var n = {
1363
- t: "b",
1364
- b: "t",
1365
- l: "r",
1366
- r: "l"
1367
- };
1368
- return e.map(function(r, a) {
1369
- return a === t ? n[r] || "c" : r;
1370
- }).join("");
1371
- }
1372
- function li(e, t, n, r, a, i, l) {
1373
- var s = o.useState({
1374
- ready: !1,
1375
- offsetX: 0,
1376
- offsetY: 0,
1377
- offsetR: 0,
1378
- offsetB: 0,
1379
- arrowX: 0,
1380
- arrowY: 0,
1381
- scaleX: 1,
1382
- scaleY: 1,
1383
- align: a[r] || {}
1384
- }), c = H(s, 2), d = c[0], g = c[1], f = o.useRef(0), h = o.useMemo(function() {
1385
- return t ? Fn(t) : [];
1386
- }, [t]), u = o.useRef({}), v = function() {
1387
- u.current = {};
1388
- };
1389
- e || v();
1390
- var m = Kt(function() {
1391
- if (t && n && e) {
1392
- let zt = function(vn, Gt) {
1393
- var Jt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ue, mn = z.x + vn, wn = z.y + Gt, Dn = mn + X, Pn = wn + D, Nn = Math.max(mn, Jt.left), V = Math.max(wn, Jt.top), re = Math.min(Dn, Jt.right), Ze = Math.min(Pn, Jt.bottom);
1394
- return Math.max(0, (re - Nn) * (Ze - V));
1395
- }, on = function() {
1396
- ot = z.y + Se, It = ot + D, Nt = z.x + Y, at = Nt + X;
1397
- };
1398
- var b, C, I, O, S = t, $ = S.ownerDocument, W = yn(S), U = W.getComputedStyle(S), te = U.position, ne = S.style.left, Q = S.style.top, ce = S.style.right, k = S.style.bottom, ie = S.style.overflow, G = F(F({}, a[r]), i), ee = $.createElement("div");
1399
- (b = S.parentElement) === null || b === void 0 || b.appendChild(ee), ee.style.left = "".concat(S.offsetLeft, "px"), ee.style.top = "".concat(S.offsetTop, "px"), ee.style.position = te, ee.style.height = "".concat(S.offsetHeight, "px"), ee.style.width = "".concat(S.offsetWidth, "px"), S.style.left = "0", S.style.top = "0", S.style.right = "auto", S.style.bottom = "auto", S.style.overflow = "hidden";
1400
- var L;
1401
- if (Array.isArray(n))
1402
- L = {
1403
- x: n[0],
1404
- y: n[1],
1405
- width: 0,
1406
- height: 0
1407
- };
1408
- else {
1409
- var oe, A, P = n.getBoundingClientRect();
1410
- P.x = (oe = P.x) !== null && oe !== void 0 ? oe : P.left, P.y = (A = P.y) !== null && A !== void 0 ? A : P.top, L = {
1411
- x: P.x,
1412
- y: P.y,
1413
- width: P.width,
1414
- height: P.height
1415
- };
1416
- }
1417
- var z = S.getBoundingClientRect(), le = W.getComputedStyle(S), Ie = le.height, se = le.width;
1418
- z.x = (C = z.x) !== null && C !== void 0 ? C : z.left, z.y = (I = z.y) !== null && I !== void 0 ? I : z.top;
1419
- var xe = $.documentElement, ye = xe.clientWidth, Me = xe.clientHeight, fe = xe.scrollWidth, De = xe.scrollHeight, B = xe.scrollTop, x = xe.scrollLeft, D = z.height, X = z.width, M = L.height, j = L.width, ae = {
1420
- left: 0,
1421
- top: 0,
1422
- right: ye,
1423
- bottom: Me
1424
- }, Z = {
1425
- left: -x,
1426
- top: -B,
1427
- right: fe - x,
1428
- bottom: De - B
1429
- }, J = G.htmlRegion, ge = "visible", Ee = "visibleFirst";
1430
- J !== "scroll" && J !== Ee && (J = ge);
1431
- var _e = J === Ee, Be = pr(Z, h), q = pr(ae, h), Ue = J === ge ? q : Be, ze = _e ? q : Ue;
1432
- S.style.left = "auto", S.style.top = "auto", S.style.right = "0", S.style.bottom = "0";
1433
- var Pe = S.getBoundingClientRect();
1434
- S.style.left = ne, S.style.top = Q, S.style.right = ce, S.style.bottom = k, S.style.overflow = ie, (O = S.parentElement) === null || O === void 0 || O.removeChild(ee);
1435
- var we = bn(Math.round(X / parseFloat(se) * 1e3) / 1e3), he = bn(Math.round(D / parseFloat(Ie) * 1e3) / 1e3);
1436
- if (we === 0 || he === 0 || Bn(n) && !Ro(n))
1437
- return;
1438
- var Ne = G.offset, Oe = G.targetOffset, Ge = Sr(z, Ne), qe = H(Ge, 2), Re = qe[0], pe = qe[1], lt = Sr(L, Oe), Le = H(lt, 2), Ye = Le[0], Xe = Le[1];
1439
- L.x -= Ye, L.y -= Xe;
1440
- var Ct = G.points || [], dt = H(Ct, 2), pt = dt[0], bt = dt[1], et = yr(bt), Ve = yr(pt), Te = sn(L, et), tt = sn(z, Ve), Ke = F({}, G), Y = Te.x - tt.x + Re, Se = Te.y - tt.y + pe, je = zt(Y, Se), N = zt(Y, Se, q), w = sn(L, ["t", "l"]), E = sn(z, ["t", "l"]), R = sn(L, ["b", "r"]), K = sn(z, ["b", "r"]), de = G.overflow || {}, ft = de.adjustX, st = de.adjustY, vt = de.shiftX, He = de.shiftY, St = function(Gt) {
1441
- return typeof Gt == "boolean" ? Gt : Gt >= 0;
1442
- }, ot, It, Nt, at;
1443
- on();
1444
- var gt = St(st), T = Ve[0] === et[0];
1445
- if (gt && Ve[0] === "t" && (It > ze.bottom || u.current.bt)) {
1446
- var _ = Se;
1447
- T ? _ -= D - M : _ = w.y - K.y - pe;
1448
- var ve = zt(Y, _), $e = zt(Y, _, q);
1449
- // Of course use larger one
1450
- ve > je || ve === je && (!_e || // Choose recommend one
1451
- $e >= N) ? (u.current.bt = !0, Se = _, pe = -pe, Ke.points = [kt(Ve, 0), kt(et, 0)]) : u.current.bt = !1;
1452
- }
1453
- if (gt && Ve[0] === "b" && (ot < ze.top || u.current.tb)) {
1454
- var Fe = Se;
1455
- T ? Fe += D - M : Fe = R.y - E.y - pe;
1456
- var _t = zt(Y, Fe), Mt = zt(Y, Fe, q);
1457
- // Of course use larger one
1458
- _t > je || _t === je && (!_e || // Choose recommend one
1459
- Mt >= N) ? (u.current.tb = !0, Se = Fe, pe = -pe, Ke.points = [kt(Ve, 0), kt(et, 0)]) : u.current.tb = !1;
1460
- }
1461
- var Vt = St(ft), Xt = Ve[1] === et[1];
1462
- if (Vt && Ve[1] === "l" && (at > ze.right || u.current.rl)) {
1463
- var Ot = Y;
1464
- Xt ? Ot -= X - j : Ot = w.x - K.x - Re;
1465
- var $t = zt(Ot, Se), Zt = zt(Ot, Se, q);
1466
- // Of course use larger one
1467
- $t > je || $t === je && (!_e || // Choose recommend one
1468
- Zt >= N) ? (u.current.rl = !0, Y = Ot, Re = -Re, Ke.points = [kt(Ve, 1), kt(et, 1)]) : u.current.rl = !1;
1469
- }
1470
- if (Vt && Ve[1] === "r" && (Nt < ze.left || u.current.lr)) {
1471
- var Ht = Y;
1472
- Xt ? Ht += X - j : Ht = R.x - E.x - Re;
1473
- var nn = zt(Ht, Se), Ut = zt(Ht, Se, q);
1474
- // Of course use larger one
1475
- nn > je || nn === je && (!_e || // Choose recommend one
1476
- Ut >= N) ? (u.current.lr = !0, Y = Ht, Re = -Re, Ke.points = [kt(Ve, 1), kt(et, 1)]) : u.current.lr = !1;
1477
- }
1478
- on();
1479
- var Dt = vt === !0 ? 0 : vt;
1480
- typeof Dt == "number" && (Nt < q.left && (Y -= Nt - q.left - Re, L.x + j < q.left + Dt && (Y += L.x - q.left + j - Dt)), at > q.right && (Y -= at - q.right - Re, L.x > q.right - Dt && (Y += L.x - q.right + Dt)));
1481
- var Wt = He === !0 ? 0 : He;
1482
- typeof Wt == "number" && (ot < q.top && (Se -= ot - q.top - pe, L.y + M < q.top + Wt && (Se += L.y - q.top + M - Wt)), It > q.bottom && (Se -= It - q.bottom - pe, L.y > q.bottom - Wt && (Se += L.y - q.bottom + Wt)));
1483
- var At = z.x + Y, Ft = At + X, Yt = z.y + Se, rn = Yt + D, be = L.x, ue = be + j, ut = L.y, mt = ut + M, Qe = Math.max(At, be), it = Math.min(Ft, ue), Pt = (Qe + it) / 2, Et = Pt - At, Tt = Math.max(Yt, ut), jt = Math.min(rn, mt), Lt = (Tt + jt) / 2, Qt = Lt - Yt;
1484
- l == null || l(t, Ke);
1485
- var yt = Pe.right - z.x - (Y + z.width), fn = Pe.bottom - z.y - (Se + z.height);
1486
- we === 1 && (Y = Math.floor(Y), yt = Math.floor(yt)), he === 1 && (Se = Math.floor(Se), fn = Math.floor(fn));
1487
- var $n = {
1488
- ready: !0,
1489
- offsetX: Y / we,
1490
- offsetY: Se / he,
1491
- offsetR: yt / we,
1492
- offsetB: fn / he,
1493
- arrowX: Et / we,
1494
- arrowY: Qt / he,
1495
- scaleX: we,
1496
- scaleY: he,
1497
- align: Ke
1498
- };
1499
- g($n);
1500
- }
1501
- }), p = function() {
1502
- f.current += 1;
1503
- var C = f.current;
1504
- Promise.resolve().then(function() {
1505
- f.current === C && m();
1506
- });
1507
- }, y = function() {
1508
- g(function(C) {
1509
- return F(F({}, C), {}, {
1510
- ready: !1
1511
- });
1512
- });
1513
- };
1514
- return ht(y, [r]), ht(function() {
1515
- e || y();
1516
- }, [e]), [d.ready, d.offsetX, d.offsetY, d.offsetR, d.offsetB, d.arrowX, d.arrowY, d.scaleX, d.scaleY, d.align, p];
1517
- }
1518
- function si(e, t, n, r, a) {
1519
- ht(function() {
1520
- if (e && t && n) {
1521
- let f = function() {
1522
- r(), a();
1523
- };
1524
- var i = t, l = n, s = Fn(i), c = Fn(l), d = yn(l), g = new Set([d].concat(wt(s), wt(c)));
1525
- return g.forEach(function(h) {
1526
- h.addEventListener("scroll", f, {
1527
- passive: !0
1528
- });
1529
- }), d.addEventListener("resize", f, {
1530
- passive: !0
1531
- }), r(), function() {
1532
- g.forEach(function(h) {
1533
- h.removeEventListener("scroll", f), d.removeEventListener("resize", f);
1534
- });
1535
- };
1536
- }
1537
- }, [e, t, n]);
1538
- }
1539
- function ui(e, t, n, r, a, i, l, s) {
1540
- var c = o.useRef(e);
1541
- c.current = e;
1542
- var d = o.useRef(!1);
1543
- o.useEffect(function() {
1544
- if (t && r && (!a || i)) {
1545
- var f = function() {
1546
- d.current = !1;
1547
- }, h = function(I) {
1548
- var O;
1549
- c.current && !l(((O = I.composedPath) === null || O === void 0 || (O = O.call(I)) === null || O === void 0 ? void 0 : O[0]) || I.target) && !d.current && s(!1);
1550
- }, u = yn(r);
1551
- u.addEventListener("pointerdown", f, !0), u.addEventListener("mousedown", h, !0), u.addEventListener("contextmenu", h, !0);
1552
- var v = An(n);
1553
- if (v && (v.addEventListener("mousedown", h, !0), v.addEventListener("contextmenu", h, !0)), process.env.NODE_ENV !== "production") {
1554
- var m, p, y = n == null || (m = n.getRootNode) === null || m === void 0 ? void 0 : m.call(n), b = (p = r.getRootNode) === null || p === void 0 ? void 0 : p.call(r);
1555
- Fr(y === b, "trigger element and popup element should in same shadow root.");
1556
- }
1557
- return function() {
1558
- u.removeEventListener("pointerdown", f, !0), u.removeEventListener("mousedown", h, !0), u.removeEventListener("contextmenu", h, !0), v && (v.removeEventListener("mousedown", h, !0), v.removeEventListener("contextmenu", h, !0));
1559
- };
1560
- }
1561
- }, [t, n, r, a, i]);
1562
- function g() {
1563
- d.current = !0;
1564
- }
1565
- return g;
1566
- }
1567
- var ci = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
1568
- function di() {
1569
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Vr, t = /* @__PURE__ */ o.forwardRef(function(n, r) {
1570
- var a = n.prefixCls, i = a === void 0 ? "rc-trigger-popup" : a, l = n.children, s = n.action, c = s === void 0 ? "hover" : s, d = n.showAction, g = n.hideAction, f = n.popupVisible, h = n.defaultPopupVisible, u = n.onPopupVisibleChange, v = n.afterPopupVisibleChange, m = n.mouseEnterDelay, p = n.mouseLeaveDelay, y = p === void 0 ? 0.1 : p, b = n.focusDelay, C = n.blurDelay, I = n.mask, O = n.maskClosable, S = O === void 0 ? !0 : O, $ = n.getPopupContainer, W = n.forceRender, U = n.autoDestroy, te = n.destroyPopupOnHide, ne = n.popup, Q = n.popupClassName, ce = n.popupStyle, k = n.popupPlacement, ie = n.builtinPlacements, G = ie === void 0 ? {} : ie, ee = n.popupAlign, L = n.zIndex, oe = n.stretch, A = n.getPopupClassNameFromAlign, P = n.fresh, z = n.alignPoint, le = n.onPopupClick, Ie = n.onPopupAlign, se = n.arrow, xe = n.popupMotion, ye = n.maskMotion, Me = n.popupTransitionName, fe = n.popupAnimation, De = n.maskTransitionName, B = n.maskAnimation, x = n.className, D = n.getTriggerDOMNode, X = xt(n, ci), M = U || te || !1, j = o.useState(!1), ae = H(j, 2), Z = ae[0], J = ae[1];
1571
- ht(function() {
1572
- J(Xr());
1573
- }, []);
1574
- var ge = o.useRef({}), Ee = o.useContext(mr), _e = o.useMemo(function() {
1575
- return {
1576
- registerSubPopup: function(re, Ze) {
1577
- ge.current[re] = Ze, Ee == null || Ee.registerSubPopup(re, Ze);
1578
- }
1579
- };
1580
- }, [Ee]), Be = xo(), q = o.useState(null), Ue = H(q, 2), ze = Ue[0], Pe = Ue[1], we = o.useRef(null), he = Kt(function(V) {
1581
- we.current = V, Bn(V) && ze !== V && Pe(V), Ee == null || Ee.registerSubPopup(Be, V);
1582
- }), Ne = o.useState(null), Oe = H(Ne, 2), Ge = Oe[0], qe = Oe[1], Re = o.useRef(null), pe = Kt(function(V) {
1583
- Bn(V) && Ge !== V && (qe(V), Re.current = V);
1584
- }), lt = o.Children.only(l), Le = (lt == null ? void 0 : lt.props) || {}, Ye = {}, Xe = Kt(function(V) {
1585
- var re, Ze, ct = Ge;
1586
- return (ct == null ? void 0 : ct.contains(V)) || ((re = An(ct)) === null || re === void 0 ? void 0 : re.host) === V || V === ct || (ze == null ? void 0 : ze.contains(V)) || ((Ze = An(ze)) === null || Ze === void 0 ? void 0 : Ze.host) === V || V === ze || Object.values(ge.current).some(function(nt) {
1587
- return (nt == null ? void 0 : nt.contains(V)) || V === nt;
1588
- });
1589
- }), Ct = hr(i, xe, fe, Me), dt = hr(i, ye, B, De), pt = o.useState(h || !1), bt = H(pt, 2), et = bt[0], Ve = bt[1], Te = f ?? et, tt = Kt(function(V) {
1590
- f === void 0 && Ve(V);
1591
- });
1592
- ht(function() {
1593
- Ve(f || !1);
1594
- }, [f]);
1595
- var Ke = o.useRef(Te);
1596
- Ke.current = Te;
1597
- var Y = o.useRef([]);
1598
- Y.current = [];
1599
- var Se = Kt(function(V) {
1600
- var re;
1601
- tt(V), ((re = Y.current[Y.current.length - 1]) !== null && re !== void 0 ? re : Te) !== V && (Y.current.push(V), u == null || u(V));
1602
- }), je = o.useRef(), N = function() {
1603
- clearTimeout(je.current);
1604
- }, w = function(re) {
1605
- var Ze = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1606
- N(), Ze === 0 ? Se(re) : je.current = setTimeout(function() {
1607
- Se(re);
1608
- }, Ze * 1e3);
1609
- };
1610
- o.useEffect(function() {
1611
- return N;
1612
- }, []);
1613
- var E = o.useState(!1), R = H(E, 2), K = R[0], de = R[1];
1614
- ht(function(V) {
1615
- (!V || Te) && de(!0);
1616
- }, [Te]);
1617
- var ft = o.useState(null), st = H(ft, 2), vt = st[0], He = st[1], St = o.useState(null), ot = H(St, 2), It = ot[0], Nt = ot[1], at = function(re) {
1618
- Nt([re.clientX, re.clientY]);
1619
- }, gt = li(Te, ze, z && It !== null ? It : Ge, k, G, ee, Ie), T = H(gt, 11), _ = T[0], ve = T[1], $e = T[2], Fe = T[3], _t = T[4], Mt = T[5], Vt = T[6], Xt = T[7], Ot = T[8], $t = T[9], Zt = T[10], Ht = oi(Z, c, d, g), nn = H(Ht, 2), Ut = nn[0], Dt = nn[1], Wt = Ut.has("click"), At = Dt.has("click") || Dt.has("contextMenu"), Ft = Kt(function() {
1620
- K || Zt();
1621
- }), Yt = function() {
1622
- Ke.current && z && At && w(!1);
1623
- };
1624
- si(Te, Ge, ze, Ft, Yt), ht(function() {
1625
- Ft();
1626
- }, [It, k]), ht(function() {
1627
- Te && !(G != null && G[k]) && Ft();
1628
- }, [JSON.stringify(ee)]);
1629
- var rn = o.useMemo(function() {
1630
- var V = ii(G, i, $t, z);
1631
- return ke(V, A == null ? void 0 : A($t));
1632
- }, [$t, A, G, i, z]);
1633
- o.useImperativeHandle(r, function() {
1634
- return {
1635
- nativeElement: Re.current,
1636
- popupElement: we.current,
1637
- forceAlign: Ft
1638
- };
1639
- });
1640
- var be = o.useState(0), ue = H(be, 2), ut = ue[0], mt = ue[1], Qe = o.useState(0), it = H(Qe, 2), Pt = it[0], Et = it[1], Tt = function() {
1641
- if (oe && Ge) {
1642
- var re = Ge.getBoundingClientRect();
1643
- mt(re.width), Et(re.height);
1644
- }
1645
- }, jt = function() {
1646
- Tt(), Ft();
1647
- }, Lt = function(re) {
1648
- de(!1), Zt(), v == null || v(re);
1649
- }, Qt = function() {
1650
- return new Promise(function(re) {
1651
- Tt(), He(function() {
1652
- return re;
1653
- });
1654
- });
1655
- };
1656
- ht(function() {
1657
- vt && (Zt(), vt(), He(null));
1658
- }, [vt]);
1659
- function yt(V, re, Ze, ct) {
1660
- Ye[V] = function(nt) {
1661
- var Cn;
1662
- ct == null || ct(nt), w(re, Ze);
1663
- for (var Tn = arguments.length, rr = new Array(Tn > 1 ? Tn - 1 : 0), In = 1; In < Tn; In++)
1664
- rr[In - 1] = arguments[In];
1665
- (Cn = Le[V]) === null || Cn === void 0 || Cn.call.apply(Cn, [Le, nt].concat(rr));
1666
- };
1667
- }
1668
- (Wt || At) && (Ye.onClick = function(V) {
1669
- var re;
1670
- Ke.current && At ? w(!1) : !Ke.current && Wt && (at(V), w(!0));
1671
- for (var Ze = arguments.length, ct = new Array(Ze > 1 ? Ze - 1 : 0), nt = 1; nt < Ze; nt++)
1672
- ct[nt - 1] = arguments[nt];
1673
- (re = Le.onClick) === null || re === void 0 || re.call.apply(re, [Le, V].concat(ct));
1674
- });
1675
- var fn = ui(Te, At, Ge, ze, I, S, Xe, w), $n = Ut.has("hover"), zt = Dt.has("hover"), on, vn;
1676
- $n && (yt("onMouseEnter", !0, m, function(V) {
1677
- at(V);
1678
- }), yt("onPointerEnter", !0, m, function(V) {
1679
- at(V);
1680
- }), on = function(re) {
1681
- (Te || K) && ze !== null && ze !== void 0 && ze.contains(re.target) && w(!0, m);
1682
- }, z && (Ye.onMouseMove = function(V) {
1683
- var re;
1684
- (re = Le.onMouseMove) === null || re === void 0 || re.call(Le, V);
1685
- })), zt && (yt("onMouseLeave", !1, y), yt("onPointerLeave", !1, y), vn = function() {
1686
- w(!1, y);
1687
- }), Ut.has("focus") && yt("onFocus", !0, b), Dt.has("focus") && yt("onBlur", !1, C), Ut.has("contextMenu") && (Ye.onContextMenu = function(V) {
1688
- var re;
1689
- Ke.current && Dt.has("contextMenu") ? w(!1) : (at(V), w(!0)), V.preventDefault();
1690
- for (var Ze = arguments.length, ct = new Array(Ze > 1 ? Ze - 1 : 0), nt = 1; nt < Ze; nt++)
1691
- ct[nt - 1] = arguments[nt];
1692
- (re = Le.onContextMenu) === null || re === void 0 || re.call.apply(re, [Le, V].concat(ct));
1693
- }), x && (Ye.className = ke(Le.className, x));
1694
- var Gt = o.useRef(!1);
1695
- Gt.current || (Gt.current = W || Te || K);
1696
- var Jt = F(F({}, Le), Ye), mn = {}, wn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
1697
- wn.forEach(function(V) {
1698
- X[V] && (mn[V] = function() {
1699
- for (var re, Ze = arguments.length, ct = new Array(Ze), nt = 0; nt < Ze; nt++)
1700
- ct[nt] = arguments[nt];
1701
- (re = Jt[V]) === null || re === void 0 || re.call.apply(re, [Jt].concat(ct)), X[V].apply(X, ct);
1702
- });
1703
- });
1704
- var Dn = /* @__PURE__ */ o.cloneElement(lt, F(F({}, Jt), mn)), Pn = {
1705
- x: Mt,
1706
- y: Vt
1707
- }, Nn = se ? F({}, se !== !0 ? se : {}) : null;
1708
- return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(cn, {
1709
- disabled: !Te,
1710
- ref: pe,
1711
- onResize: jt
1712
- }, /* @__PURE__ */ o.createElement(oo, {
1713
- getTriggerDOMNode: D
1714
- }, Dn)), Gt.current && /* @__PURE__ */ o.createElement(mr.Provider, {
1715
- value: _e
1716
- }, /* @__PURE__ */ o.createElement(ro, {
1717
- portal: e,
1718
- ref: he,
1719
- prefixCls: i,
1720
- popup: ne,
1721
- className: ke(Q, rn),
1722
- style: ce,
1723
- target: Ge,
1724
- onMouseEnter: on,
1725
- onMouseLeave: vn,
1726
- onPointerEnter: on,
1727
- zIndex: L,
1728
- open: Te,
1729
- keepDom: K,
1730
- fresh: P,
1731
- onClick: le,
1732
- onPointerDownCapture: fn,
1733
- mask: I,
1734
- motion: Ct,
1735
- maskMotion: dt,
1736
- onVisibleChanged: Lt,
1737
- onPrepare: Qt,
1738
- forceRender: W,
1739
- autoDestroy: M,
1740
- getPopupContainer: $,
1741
- align: $t,
1742
- arrow: Nn,
1743
- arrowPos: Pn,
1744
- ready: _,
1745
- offsetX: ve,
1746
- offsetY: $e,
1747
- offsetR: Fe,
1748
- offsetB: _t,
1749
- onAlign: Ft,
1750
- stretch: oe,
1751
- targetWidth: ut / Xt,
1752
- targetHeight: Pt / Ot
1753
- })));
1754
- });
1755
- return process.env.NODE_ENV !== "production" && (t.displayName = "Trigger"), t;
1756
- }
1757
- const fi = di(Vr);
1758
- var vi = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], mi = function(t) {
1759
- var n = t === !0 ? 0 : 1;
1760
- return {
1761
- bottomLeft: {
1762
- points: ["tl", "bl"],
1763
- offset: [0, 4],
1764
- overflow: {
1765
- adjustX: n,
1766
- adjustY: 1
1767
- },
1768
- htmlRegion: "scroll"
1769
- },
1770
- bottomRight: {
1771
- points: ["tr", "br"],
1772
- offset: [0, 4],
1773
- overflow: {
1774
- adjustX: n,
1775
- adjustY: 1
1776
- },
1777
- htmlRegion: "scroll"
1778
- },
1779
- topLeft: {
1780
- points: ["bl", "tl"],
1781
- offset: [0, -4],
1782
- overflow: {
1783
- adjustX: n,
1784
- adjustY: 1
1785
- },
1786
- htmlRegion: "scroll"
1787
- },
1788
- topRight: {
1789
- points: ["br", "tr"],
1790
- offset: [0, -4],
1791
- overflow: {
1792
- adjustX: n,
1793
- adjustY: 1
1794
- },
1795
- htmlRegion: "scroll"
1796
- }
1797
- };
1798
- }, gi = function(t, n) {
1799
- var r = t.prefixCls;
1800
- t.disabled;
1801
- var a = t.visible, i = t.children, l = t.popupElement, s = t.animation, c = t.transitionName, d = t.dropdownStyle, g = t.dropdownClassName, f = t.direction, h = f === void 0 ? "ltr" : f, u = t.placement, v = t.builtinPlacements, m = t.dropdownMatchSelectWidth, p = t.dropdownRender, y = t.dropdownAlign, b = t.getPopupContainer, C = t.empty, I = t.getTriggerDOMNode, O = t.onPopupVisibleChange, S = t.onPopupMouseEnter, $ = xt(t, vi), W = "".concat(r, "-dropdown"), U = l;
1802
- p && (U = p(l));
1803
- var te = o.useMemo(function() {
1804
- return v || mi(m);
1805
- }, [v, m]), ne = s ? "".concat(W, "-").concat(s) : c, Q = typeof m == "number", ce = o.useMemo(function() {
1806
- return Q ? null : m === !1 ? "minWidth" : "width";
1807
- }, [m, Q]), k = d;
1808
- Q && (k = F(F({}, k), {}, {
1809
- width: m
1810
- }));
1811
- var ie = o.useRef(null);
1812
- return o.useImperativeHandle(n, function() {
1813
- return {
1814
- getPopupElement: function() {
1815
- var ee;
1816
- return (ee = ie.current) === null || ee === void 0 ? void 0 : ee.popupElement;
1817
- }
1818
- };
1819
- }), /* @__PURE__ */ o.createElement(fi, Je({}, $, {
1820
- showAction: O ? ["click"] : [],
1821
- hideAction: O ? ["click"] : [],
1822
- popupPlacement: u || (h === "rtl" ? "bottomRight" : "bottomLeft"),
1823
- builtinPlacements: te,
1824
- prefixCls: W,
1825
- popupTransitionName: ne,
1826
- popup: /* @__PURE__ */ o.createElement("div", {
1827
- onMouseEnter: S
1828
- }, U),
1829
- ref: ie,
1830
- stretch: ce,
1831
- popupAlign: y,
1832
- popupVisible: a,
1833
- getPopupContainer: b,
1834
- popupClassName: ke(g, Ce({}, "".concat(W, "-empty"), C)),
1835
- popupStyle: k,
1836
- getTriggerDOMNode: I,
1837
- onPopupVisibleChange: O
1838
- }), i);
1839
- }, ao = /* @__PURE__ */ o.forwardRef(gi);
1840
- process.env.NODE_ENV !== "production" && (ao.displayName = "SelectTrigger");
1841
- function wr(e, t) {
1842
- var n = e.key, r;
1843
- return "value" in e && (r = e.value), n ?? (r !== void 0 ? r : "rc-index-key-".concat(t));
1844
- }
1845
- function jn(e) {
1846
- return typeof e < "u" && !Number.isNaN(e);
1847
- }
1848
- function io(e, t) {
1849
- var n = e || {}, r = n.label, a = n.value, i = n.options, l = n.groupLabel, s = r || (t ? "children" : "label");
1850
- return {
1851
- label: s,
1852
- value: a || "value",
1853
- options: i || "options",
1854
- groupLabel: l || s
1855
- };
1856
- }
1857
- function hi(e) {
1858
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.fieldNames, r = t.childrenAsData, a = [], i = io(n, !1), l = i.label, s = i.value, c = i.options, d = i.groupLabel;
1859
- function g(f, h) {
1860
- Array.isArray(f) && f.forEach(function(u) {
1861
- if (h || !(c in u)) {
1862
- var v = u[s];
1863
- a.push({
1864
- key: wr(u, a.length),
1865
- groupOption: h,
1866
- data: u,
1867
- label: u[l],
1868
- value: v
1869
- });
1870
- } else {
1871
- var m = u[d];
1872
- m === void 0 && r && (m = u.label), a.push({
1873
- key: wr(u, a.length),
1874
- group: !0,
1875
- data: u,
1876
- label: m
1877
- }), g(u[c], !0);
1878
- }
1879
- });
1880
- }
1881
- return g(e, !1), a;
1882
- }
1883
- function Kn(e) {
1884
- var t = F({}, e);
1885
- return "props" in t || Object.defineProperty(t, "props", {
1886
- get: function() {
1887
- return Rt(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
1888
- }
1889
- }), t;
1890
- }
1891
- var pi = function(t, n, r) {
1892
- if (!n || !n.length)
1893
- return null;
1894
- var a = !1, i = function s(c, d) {
1895
- var g = Mo(d), f = g[0], h = g.slice(1);
1896
- if (!f)
1897
- return [c];
1898
- var u = c.split(f);
1899
- return a = a || u.length > 1, u.reduce(function(v, m) {
1900
- return [].concat(wt(v), wt(s(m, h)));
1901
- }, []).filter(Boolean);
1902
- }, l = i(t, n);
1903
- return a ? typeof r < "u" ? l.slice(0, r) : l : null;
1904
- }, Jn = /* @__PURE__ */ o.createContext(null);
1905
- function bi(e) {
1906
- var t = e.visible, n = e.values;
1907
- if (!t)
1908
- return null;
1909
- var r = 50;
1910
- return /* @__PURE__ */ o.createElement("span", {
1911
- "aria-live": "polite",
1912
- style: {
1913
- width: 0,
1914
- height: 0,
1915
- position: "absolute",
1916
- overflow: "hidden",
1917
- opacity: 0
1918
- }
1919
- }, "".concat(n.slice(0, r).map(function(a) {
1920
- var i = a.label, l = a.value;
1921
- return ["number", "string"].includes(tn(i)) ? i : l;
1922
- }).join(", ")), n.length > r ? ", ..." : null);
1923
- }
1924
- var Si = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "prefix", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], yi = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], Mn = function(t) {
1925
- return t === "tags" || t === "multiple";
1926
- }, lo = /* @__PURE__ */ o.forwardRef(function(e, t) {
1927
- var n, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, s = e.tagRender, c = e.direction, d = e.omitDomProps, g = e.displayValues, f = e.onDisplayValuesChange, h = e.emptyOptions, u = e.notFoundContent, v = u === void 0 ? "Not Found" : u, m = e.onClear, p = e.mode, y = e.disabled, b = e.loading, C = e.getInputElement, I = e.getRawInputElement, O = e.open, S = e.defaultOpen, $ = e.onDropdownVisibleChange, W = e.activeValue, U = e.onActiveValueChange, te = e.activeDescendantId, ne = e.searchValue, Q = e.autoClearSearchValue, ce = e.onSearch, k = e.onSearchSplit, ie = e.tokenSeparators, G = e.allowClear, ee = e.prefix, L = e.suffixIcon, oe = e.clearIcon, A = e.OptionList, P = e.animation, z = e.transitionName, le = e.dropdownStyle, Ie = e.dropdownClassName, se = e.dropdownMatchSelectWidth, xe = e.dropdownRender, ye = e.dropdownAlign, Me = e.placement, fe = e.builtinPlacements, De = e.getPopupContainer, B = e.showAction, x = B === void 0 ? [] : B, D = e.onFocus, X = e.onBlur, M = e.onKeyUp, j = e.onKeyDown, ae = e.onMouseDown, Z = xt(e, Si), J = Mn(p), ge = (l !== void 0 ? l : J) || p === "combobox", Ee = F({}, Z);
1928
- yi.forEach(function(be) {
1929
- delete Ee[be];
1930
- }), d == null || d.forEach(function(be) {
1931
- delete Ee[be];
1932
- });
1933
- var _e = o.useState(!1), Be = H(_e, 2), q = Be[0], Ue = Be[1];
1934
- o.useEffect(function() {
1935
- Ue(Xr());
1936
- }, []);
1937
- var ze = o.useRef(null), Pe = o.useRef(null), we = o.useRef(null), he = o.useRef(null), Ne = o.useRef(null), Oe = o.useRef(!1), Ge = Da(), qe = H(Ge, 3), Re = qe[0], pe = qe[1], lt = qe[2];
1938
- o.useImperativeHandle(t, function() {
1939
- var be, ue;
1940
- return {
1941
- focus: (be = he.current) === null || be === void 0 ? void 0 : be.focus,
1942
- blur: (ue = he.current) === null || ue === void 0 ? void 0 : ue.blur,
1943
- scrollTo: function(mt) {
1944
- var Qe;
1945
- return (Qe = Ne.current) === null || Qe === void 0 ? void 0 : Qe.scrollTo(mt);
1946
- },
1947
- nativeElement: ze.current || Pe.current
1948
- };
1949
- });
1950
- var Le = o.useMemo(function() {
1951
- var be;
1952
- if (p !== "combobox")
1953
- return ne;
1954
- var ue = (be = g[0]) === null || be === void 0 ? void 0 : be.value;
1955
- return typeof ue == "string" || typeof ue == "number" ? String(ue) : "";
1956
- }, [ne, p, g]), Ye = p === "combobox" && typeof C == "function" && C() || null, Xe = typeof I == "function" && I(), Ct = Br(Pe, Xe == null || (n = Xe.props) === null || n === void 0 ? void 0 : n.ref), dt = o.useState(!1), pt = H(dt, 2), bt = pt[0], et = pt[1];
1957
- ht(function() {
1958
- et(!0);
1959
- }, []);
1960
- var Ve = En(!1, {
1961
- defaultValue: S,
1962
- value: O
1963
- }), Te = H(Ve, 2), tt = Te[0], Ke = Te[1], Y = bt ? tt : !1, Se = !v && h;
1964
- (y || Se && Y && p === "combobox") && (Y = !1);
1965
- var je = Se ? !1 : Y, N = o.useCallback(function(be) {
1966
- var ue = be !== void 0 ? be : !Y;
1967
- y || (Ke(ue), Y !== ue && ($ == null || $(ue)));
1968
- }, [y, Y, Ke, $]), w = o.useMemo(function() {
1969
- return (ie || []).some(function(be) {
1970
- return [`
1971
- `, `\r
1972
- `].includes(be);
1973
- });
1974
- }, [ie]), E = o.useContext(Jn) || {}, R = E.maxCount, K = E.rawValues, de = function(ue, ut, mt) {
1975
- if (!(J && jn(R) && (K == null ? void 0 : K.size) >= R)) {
1976
- var Qe = !0, it = ue;
1977
- U == null || U(null);
1978
- var Pt = pi(ue, ie, jn(R) ? R - K.size : void 0), Et = mt ? null : Pt;
1979
- return p !== "combobox" && Et && (it = "", k == null || k(Et), N(!1), Qe = !1), ce && Le !== it && ce(it, {
1980
- source: ut ? "typing" : "effect"
1981
- }), Qe;
1982
- }
1983
- }, ft = function(ue) {
1984
- !ue || !ue.trim() || ce(ue, {
1985
- source: "submit"
1986
- });
1987
- };
1988
- o.useEffect(function() {
1989
- !Y && !J && p !== "combobox" && de("", !1, !1);
1990
- }, [Y]), o.useEffect(function() {
1991
- tt && y && Ke(!1), y && !Oe.current && pe(!1);
1992
- }, [y]);
1993
- var st = Yr(), vt = H(st, 2), He = vt[0], St = vt[1], ot = o.useRef(!1), It = function(ue) {
1994
- var ut = He(), mt = ue.key, Qe = mt === "Enter";
1995
- if (Qe && (p !== "combobox" && ue.preventDefault(), Y || N(!0)), St(!!Le), mt === "Backspace" && !ut && J && !Le && g.length) {
1996
- for (var it = wt(g), Pt = null, Et = it.length - 1; Et >= 0; Et -= 1) {
1997
- var Tt = it[Et];
1998
- if (!Tt.disabled) {
1999
- it.splice(Et, 1), Pt = Tt;
2000
- break;
2001
- }
2002
- }
2003
- Pt && f(it, {
2004
- type: "remove",
2005
- values: [Pt]
2006
- });
2007
- }
2008
- for (var jt = arguments.length, Lt = new Array(jt > 1 ? jt - 1 : 0), Qt = 1; Qt < jt; Qt++)
2009
- Lt[Qt - 1] = arguments[Qt];
2010
- if (Y && (!Qe || !ot.current)) {
2011
- var yt;
2012
- Qe && (ot.current = !0), (yt = Ne.current) === null || yt === void 0 || yt.onKeyDown.apply(yt, [ue].concat(Lt));
2013
- }
2014
- j == null || j.apply(void 0, [ue].concat(Lt));
2015
- }, Nt = function(ue) {
2016
- for (var ut = arguments.length, mt = new Array(ut > 1 ? ut - 1 : 0), Qe = 1; Qe < ut; Qe++)
2017
- mt[Qe - 1] = arguments[Qe];
2018
- if (Y) {
2019
- var it;
2020
- (it = Ne.current) === null || it === void 0 || it.onKeyUp.apply(it, [ue].concat(mt));
2021
- }
2022
- ue.key === "Enter" && (ot.current = !1), M == null || M.apply(void 0, [ue].concat(mt));
2023
- }, at = function(ue) {
2024
- var ut = g.filter(function(mt) {
2025
- return mt !== ue;
2026
- });
2027
- f(ut, {
2028
- type: "remove",
2029
- values: [ue]
2030
- });
2031
- }, gt = function() {
2032
- ot.current = !1;
2033
- }, T = o.useRef(!1), _ = function() {
2034
- pe(!0), y || (D && !T.current && D.apply(void 0, arguments), x.includes("focus") && N(!0)), T.current = !0;
2035
- }, ve = function() {
2036
- Oe.current = !0, pe(!1, function() {
2037
- T.current = !1, Oe.current = !1, N(!1);
2038
- }), !y && (Le && (p === "tags" ? ce(Le, {
2039
- source: "submit"
2040
- }) : p === "multiple" && ce("", {
2041
- source: "blur"
2042
- })), X && X.apply(void 0, arguments));
2043
- }, $e = [];
2044
- o.useEffect(function() {
2045
- return function() {
2046
- $e.forEach(function(be) {
2047
- return clearTimeout(be);
2048
- }), $e.splice(0, $e.length);
2049
- };
2050
- }, []);
2051
- var Fe = function(ue) {
2052
- var ut, mt = ue.target, Qe = (ut = we.current) === null || ut === void 0 ? void 0 : ut.getPopupElement();
2053
- if (Qe && Qe.contains(mt)) {
2054
- var it = setTimeout(function() {
2055
- var jt = $e.indexOf(it);
2056
- if (jt !== -1 && $e.splice(jt, 1), lt(), !q && !Qe.contains(document.activeElement)) {
2057
- var Lt;
2058
- (Lt = he.current) === null || Lt === void 0 || Lt.focus();
2059
- }
2060
- });
2061
- $e.push(it);
2062
- }
2063
- for (var Pt = arguments.length, Et = new Array(Pt > 1 ? Pt - 1 : 0), Tt = 1; Tt < Pt; Tt++)
2064
- Et[Tt - 1] = arguments[Tt];
2065
- ae == null || ae.apply(void 0, [ue].concat(Et));
2066
- }, _t = o.useState({}), Mt = H(_t, 2), Vt = Mt[1];
2067
- function Xt() {
2068
- Vt({});
2069
- }
2070
- var Ot;
2071
- Xe && (Ot = function(ue) {
2072
- N(ue);
2073
- }), Pa(function() {
2074
- var be;
2075
- return [ze.current, (be = we.current) === null || be === void 0 ? void 0 : be.getPopupElement()];
2076
- }, je, N, !!Xe);
2077
- var $t = o.useMemo(function() {
2078
- return F(F({}, e), {}, {
2079
- notFoundContent: v,
2080
- open: Y,
2081
- triggerOpen: je,
2082
- id: r,
2083
- showSearch: ge,
2084
- multiple: J,
2085
- toggleOpen: N
2086
- });
2087
- }, [e, v, je, Y, r, ge, J, N]), Zt = !!L || b, Ht;
2088
- Zt && (Ht = /* @__PURE__ */ o.createElement(On, {
2089
- className: ke("".concat(a, "-arrow"), Ce({}, "".concat(a, "-arrow-loading"), b)),
2090
- customizeIcon: L,
2091
- customizeIconProps: {
2092
- loading: b,
2093
- searchValue: Le,
2094
- open: Y,
2095
- focused: Re,
2096
- showSearch: ge
2097
- }
2098
- }));
2099
- var nn = function() {
2100
- var ue;
2101
- m == null || m(), (ue = he.current) === null || ue === void 0 || ue.focus(), f([], {
2102
- type: "clear",
2103
- values: g
2104
- }), de("", !1, !1);
2105
- }, Ut = Oa(a, nn, g, G, oe, y, Le, p), Dt = Ut.allowClear, Wt = Ut.clearIcon, At = /* @__PURE__ */ o.createElement(A, {
2106
- ref: Ne
2107
- }), Ft = ke(a, i, Ce(Ce(Ce(Ce(Ce(Ce(Ce(Ce(Ce(Ce({}, "".concat(a, "-focused"), Re), "".concat(a, "-multiple"), J), "".concat(a, "-single"), !J), "".concat(a, "-allow-clear"), G), "".concat(a, "-show-arrow"), Zt), "".concat(a, "-disabled"), y), "".concat(a, "-loading"), b), "".concat(a, "-open"), Y), "".concat(a, "-customize-input"), Ye), "".concat(a, "-show-search"), ge)), Yt = /* @__PURE__ */ o.createElement(ao, {
2108
- ref: we,
2109
- disabled: y,
2110
- prefixCls: a,
2111
- visible: je,
2112
- popupElement: At,
2113
- animation: P,
2114
- transitionName: z,
2115
- dropdownStyle: le,
2116
- dropdownClassName: Ie,
2117
- direction: c,
2118
- dropdownMatchSelectWidth: se,
2119
- dropdownRender: xe,
2120
- dropdownAlign: ye,
2121
- placement: Me,
2122
- builtinPlacements: fe,
2123
- getPopupContainer: De,
2124
- empty: h,
2125
- getTriggerDOMNode: function(ue) {
2126
- return (
2127
- // TODO: This is workaround and should be removed in `rc-select`
2128
- // And use new standard `nativeElement` for ref.
2129
- // But we should update `rc-resize-observer` first.
2130
- Pe.current || ue
2131
- );
2132
- },
2133
- onPopupVisibleChange: Ot,
2134
- onPopupMouseEnter: Xt
2135
- }, Xe ? /* @__PURE__ */ o.cloneElement(Xe, {
2136
- ref: Ct
2137
- }) : /* @__PURE__ */ o.createElement(to, Je({}, e, {
2138
- domRef: Pe,
2139
- prefixCls: a,
2140
- inputElement: Ye,
2141
- ref: he,
2142
- id: r,
2143
- prefix: ee,
2144
- showSearch: ge,
2145
- autoClearSearchValue: Q,
2146
- mode: p,
2147
- activeDescendantId: te,
2148
- tagRender: s,
2149
- values: g,
2150
- open: Y,
2151
- onToggleOpen: N,
2152
- activeValue: W,
2153
- searchValue: Le,
2154
- onSearch: de,
2155
- onSearchSubmit: ft,
2156
- onRemove: at,
2157
- tokenWithEnter: w,
2158
- onInputBlur: gt
2159
- }))), rn;
2160
- return Xe ? rn = Yt : rn = /* @__PURE__ */ o.createElement("div", Je({
2161
- className: Ft
2162
- }, Ee, {
2163
- ref: ze,
2164
- onMouseDown: Fe,
2165
- onKeyDown: It,
2166
- onKeyUp: Nt,
2167
- onFocus: _,
2168
- onBlur: ve
2169
- }), /* @__PURE__ */ o.createElement(bi, {
2170
- visible: Re && !Y,
2171
- values: g
2172
- }), Yt, Ht, Dt && Wt), /* @__PURE__ */ o.createElement(Zr.Provider, {
2173
- value: $t
2174
- }, rn);
2175
- });
2176
- process.env.NODE_ENV !== "production" && (lo.displayName = "BaseSelect");
2177
- var kn = function() {
2178
- return null;
2179
- };
2180
- kn.isSelectOptGroup = !0;
2181
- var er = function() {
2182
- return null;
2183
- };
2184
- er.isSelectOption = !0;
2185
- var so = /* @__PURE__ */ o.forwardRef(function(e, t) {
2186
- var n = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, s = e.onInnerResize, c = e.innerProps, d = e.rtl, g = e.extra, f = {}, h = {
2187
- display: "flex",
2188
- flexDirection: "column"
2189
- };
2190
- return r !== void 0 && (f = {
2191
- height: n,
2192
- position: "relative",
2193
- overflow: "hidden"
2194
- }, h = F(F({}, h), {}, Ce(Ce(Ce(Ce(Ce({
2195
- transform: "translateY(".concat(r, "px)")
2196
- }, d ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
2197
- style: f
2198
- }, /* @__PURE__ */ o.createElement(cn, {
2199
- onResize: function(v) {
2200
- var m = v.offsetHeight;
2201
- m && s && s();
2202
- }
2203
- }, /* @__PURE__ */ o.createElement("div", Je({
2204
- style: h,
2205
- className: ke(Ce({}, "".concat(l, "-holder-inner"), l)),
2206
- ref: t
2207
- }, c), i, g)));
2208
- });
2209
- so.displayName = "Filler";
2210
- function wi(e) {
2211
- var t = e.children, n = e.setRef, r = o.useCallback(function(a) {
2212
- n(a);
2213
- }, []);
2214
- return /* @__PURE__ */ o.cloneElement(t, {
2215
- ref: r
2216
- });
2217
- }
2218
- function Ci(e, t, n, r, a, i, l, s) {
2219
- var c = s.getKey;
2220
- return e.slice(t, n + 1).map(function(d, g) {
2221
- var f = t + g, h = l(d, f, {
2222
- style: {
2223
- width: r
2224
- },
2225
- offsetX: a
2226
- }), u = c(d);
2227
- return /* @__PURE__ */ o.createElement(wi, {
2228
- key: u,
2229
- setRef: function(m) {
2230
- return i(d, m);
2231
- }
2232
- }, h);
2233
- });
2234
- }
2235
- function Ii(e, t, n) {
2236
- var r = e.length, a = t.length, i, l;
2237
- if (r === 0 && a === 0)
2238
- return null;
2239
- r < a ? (i = e, l = t) : (i = t, l = e);
2240
- var s = {
2241
- __EMPTY_ITEM__: !0
2242
- };
2243
- function c(v) {
2244
- return v !== void 0 ? n(v) : s;
2245
- }
2246
- for (var d = null, g = Math.abs(r - a) !== 1, f = 0; f < l.length; f += 1) {
2247
- var h = c(i[f]), u = c(l[f]);
2248
- if (h !== u) {
2249
- d = f, g = g || h !== c(l[f + 1]);
2250
- break;
2251
- }
2252
- }
2253
- return d === null ? null : {
2254
- index: d,
2255
- multiple: g
2256
- };
2257
- }
2258
- function Ei(e, t, n) {
2259
- var r = o.useState(e), a = H(r, 2), i = a[0], l = a[1], s = o.useState(null), c = H(s, 2), d = c[0], g = c[1];
2260
- return o.useEffect(function() {
2261
- var f = Ii(i || [], e || [], t);
2262
- (f == null ? void 0 : f.index) !== void 0 && g(e[f.index]), l(e);
2263
- }, [e]), [d];
2264
- }
2265
- var Cr = (typeof navigator > "u" ? "undefined" : tn(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
2266
- const uo = (function(e, t, n, r) {
2267
- var a = We(!1), i = We(null);
2268
- function l() {
2269
- clearTimeout(i.current), a.current = !0, i.current = setTimeout(function() {
2270
- a.current = !1;
2271
- }, 50);
2272
- }
2273
- var s = We({
2274
- top: e,
2275
- bottom: t,
2276
- left: n,
2277
- right: r
2278
- });
2279
- return s.current.top = e, s.current.bottom = t, s.current.left = n, s.current.right = r, function(c, d) {
2280
- var g = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, f = c ? (
2281
- // Pass origin wheel when on the left
2282
- d < 0 && s.current.left || // Pass origin wheel when on the right
2283
- d > 0 && s.current.right
2284
- ) : d < 0 && s.current.top || // Pass origin wheel when on the bottom
2285
- d > 0 && s.current.bottom;
2286
- return g && f ? (clearTimeout(i.current), a.current = !1) : (!f || a.current) && l(), !a.current && f;
2287
- };
2288
- });
2289
- function Ri(e, t, n, r, a, i, l) {
2290
- var s = We(0), c = We(null), d = We(null), g = We(!1), f = uo(t, n, r, a);
2291
- function h(b, C) {
2292
- if (Bt.cancel(c.current), !f(!1, C)) {
2293
- var I = b;
2294
- if (!I._virtualHandled)
2295
- I._virtualHandled = !0;
2296
- else
2297
- return;
2298
- s.current += C, d.current = C, Cr || I.preventDefault(), c.current = Bt(function() {
2299
- var O = g.current ? 10 : 1;
2300
- l(s.current * O, !1), s.current = 0;
2301
- });
2302
- }
2303
- }
2304
- function u(b, C) {
2305
- l(C, !0), Cr || b.preventDefault();
2306
- }
2307
- var v = We(null), m = We(null);
2308
- function p(b) {
2309
- if (e) {
2310
- Bt.cancel(m.current), m.current = Bt(function() {
2311
- v.current = null;
2312
- }, 2);
2313
- var C = b.deltaX, I = b.deltaY, O = b.shiftKey, S = C, $ = I;
2314
- (v.current === "sx" || !v.current && O && I && !C) && (S = I, $ = 0, v.current = "sx");
2315
- var W = Math.abs(S), U = Math.abs($);
2316
- v.current === null && (v.current = i && W > U ? "x" : "y"), v.current === "y" ? h(b, $) : u(b, S);
2317
- }
2318
- }
2319
- function y(b) {
2320
- e && (g.current = b.detail === d.current);
2321
- }
2322
- return [p, y];
2323
- }
2324
- function xi(e, t, n, r) {
2325
- var a = o.useMemo(function() {
2326
- return [/* @__PURE__ */ new Map(), []];
2327
- }, [e, n.id, r]), i = H(a, 2), l = i[0], s = i[1], c = function(g) {
2328
- var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : g, h = l.get(g), u = l.get(f);
2329
- if (h === void 0 || u === void 0)
2330
- for (var v = e.length, m = s.length; m < v; m += 1) {
2331
- var p, y = e[m], b = t(y);
2332
- l.set(b, m);
2333
- var C = (p = n.get(b)) !== null && p !== void 0 ? p : r;
2334
- if (s[m] = (s[m - 1] || 0) + C, b === g && (h = m), b === f && (u = m), h !== void 0 && u !== void 0)
2335
- break;
2336
- }
2337
- return {
2338
- top: s[h - 1] || 0,
2339
- bottom: s[u]
2340
- };
2341
- };
2342
- return c;
2343
- }
2344
- var Mi = /* @__PURE__ */ (function() {
2345
- function e() {
2346
- $o(this, e), Ce(this, "maps", void 0), Ce(this, "id", 0), Ce(this, "diffRecords", /* @__PURE__ */ new Map()), this.maps = /* @__PURE__ */ Object.create(null);
2347
- }
2348
- return Oo(e, [{
2349
- key: "set",
2350
- value: function(n, r) {
2351
- this.diffRecords.set(n, this.maps[n]), this.maps[n] = r, this.id += 1;
2352
- }
2353
- }, {
2354
- key: "get",
2355
- value: function(n) {
2356
- return this.maps[n];
2357
- }
2358
- /**
2359
- * CacheMap will record the key changed.
2360
- * To help to know what's update in the next render.
2361
- */
2362
- }, {
2363
- key: "resetRecord",
2364
- value: function() {
2365
- this.diffRecords.clear();
2366
- }
2367
- }, {
2368
- key: "getRecord",
2369
- value: function() {
2370
- return this.diffRecords;
2371
- }
2372
- }]), e;
2373
- })();
2374
- function Ir(e) {
2375
- var t = parseFloat(e);
2376
- return isNaN(t) ? 0 : t;
2377
- }
2378
- function Oi(e, t, n) {
2379
- var r = o.useState(0), a = H(r, 2), i = a[0], l = a[1], s = We(/* @__PURE__ */ new Map()), c = We(new Mi()), d = We(0);
2380
- function g() {
2381
- d.current += 1;
2382
- }
2383
- function f() {
2384
- var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
2385
- g();
2386
- var v = function() {
2387
- var y = !1;
2388
- s.current.forEach(function(b, C) {
2389
- if (b && b.offsetParent) {
2390
- var I = b.offsetHeight, O = getComputedStyle(b), S = O.marginTop, $ = O.marginBottom, W = Ir(S), U = Ir($), te = I + W + U;
2391
- c.current.get(C) !== te && (c.current.set(C, te), y = !0);
2392
- }
2393
- }), y && l(function(b) {
2394
- return b + 1;
2395
- });
2396
- };
2397
- if (u)
2398
- v();
2399
- else {
2400
- d.current += 1;
2401
- var m = d.current;
2402
- Promise.resolve().then(function() {
2403
- m === d.current && v();
2404
- });
2405
- }
2406
- }
2407
- function h(u, v) {
2408
- var m = e(u);
2409
- s.current.get(m), v ? (s.current.set(m, v), f()) : s.current.delete(m);
2410
- }
2411
- return Wn(function() {
2412
- return g;
2413
- }, []), [h, f, c.current, i];
2414
- }
2415
- var Er = 14 / 15;
2416
- function $i(e, t, n) {
2417
- var r = We(!1), a = We(0), i = We(0), l = We(null), s = We(null), c, d = function(u) {
2418
- if (r.current) {
2419
- var v = Math.ceil(u.touches[0].pageX), m = Math.ceil(u.touches[0].pageY), p = a.current - v, y = i.current - m, b = Math.abs(p) > Math.abs(y);
2420
- b ? a.current = v : i.current = m;
2421
- var C = n(b, b ? p : y, !1, u);
2422
- C && u.preventDefault(), clearInterval(s.current), C && (s.current = setInterval(function() {
2423
- b ? p *= Er : y *= Er;
2424
- var I = Math.floor(b ? p : y);
2425
- (!n(b, I, !0) || Math.abs(I) <= 0.1) && clearInterval(s.current);
2426
- }, 16));
2427
- }
2428
- }, g = function() {
2429
- r.current = !1, c();
2430
- }, f = function(u) {
2431
- c(), u.touches.length === 1 && !r.current && (r.current = !0, a.current = Math.ceil(u.touches[0].pageX), i.current = Math.ceil(u.touches[0].pageY), l.current = u.target, l.current.addEventListener("touchmove", d, {
2432
- passive: !1
2433
- }), l.current.addEventListener("touchend", g, {
2434
- passive: !0
2435
- }));
2436
- };
2437
- c = function() {
2438
- l.current && (l.current.removeEventListener("touchmove", d), l.current.removeEventListener("touchend", g));
2439
- }, ht(function() {
2440
- return e && t.current.addEventListener("touchstart", f, {
2441
- passive: !0
2442
- }), function() {
2443
- var h;
2444
- (h = t.current) === null || h === void 0 || h.removeEventListener("touchstart", f), c(), clearInterval(s.current);
2445
- };
2446
- }, [e]);
2447
- }
2448
- function Rr(e) {
2449
- return Math.floor(Math.pow(e, 0.5));
2450
- }
2451
- function Un(e, t) {
2452
- var n = "touches" in e ? e.touches[0] : e;
2453
- return n[t ? "pageX" : "pageY"] - window[t ? "scrollX" : "scrollY"];
2454
- }
2455
- function Di(e, t, n) {
2456
- o.useEffect(function() {
2457
- var r = t.current;
2458
- if (e && r) {
2459
- var a = !1, i, l, s = function() {
2460
- Bt.cancel(i);
2461
- }, c = function h() {
2462
- s(), i = Bt(function() {
2463
- n(l), h();
2464
- });
2465
- }, d = function() {
2466
- a = !1, s();
2467
- }, g = function(u) {
2468
- if (!(u.target.draggable || u.button !== 0)) {
2469
- var v = u;
2470
- v._virtualHandled || (v._virtualHandled = !0, a = !0);
2471
- }
2472
- }, f = function(u) {
2473
- if (a) {
2474
- var v = Un(u, !1), m = r.getBoundingClientRect(), p = m.top, y = m.bottom;
2475
- if (v <= p) {
2476
- var b = p - v;
2477
- l = -Rr(b), c();
2478
- } else if (v >= y) {
2479
- var C = v - y;
2480
- l = Rr(C), c();
2481
- } else
2482
- s();
2483
- }
2484
- };
2485
- return r.addEventListener("mousedown", g), r.ownerDocument.addEventListener("mouseup", d), r.ownerDocument.addEventListener("mousemove", f), r.ownerDocument.addEventListener("dragend", d), function() {
2486
- r.removeEventListener("mousedown", g), r.ownerDocument.removeEventListener("mouseup", d), r.ownerDocument.removeEventListener("mousemove", f), r.ownerDocument.removeEventListener("dragend", d), s();
2487
- };
2488
- }
2489
- }, [e]);
2490
- }
2491
- var xr = 10;
2492
- function Pi(e, t, n, r, a, i, l, s) {
2493
- var c = o.useRef(), d = o.useState(null), g = H(d, 2), f = g[0], h = g[1];
2494
- return ht(function() {
2495
- if (f && f.times < xr) {
2496
- if (!e.current) {
2497
- h(function(oe) {
2498
- return F({}, oe);
2499
- });
2500
- return;
2501
- }
2502
- i();
2503
- var u = f.targetAlign, v = f.originAlign, m = f.index, p = f.offset, y = e.current.clientHeight, b = !1, C = u, I = null;
2504
- if (y) {
2505
- for (var O = u || v, S = 0, $ = 0, W = 0, U = Math.min(t.length - 1, m), te = 0; te <= U; te += 1) {
2506
- var ne = a(t[te]);
2507
- $ = S;
2508
- var Q = n.get(ne);
2509
- W = $ + (Q === void 0 ? r : Q), S = W;
2510
- }
2511
- for (var ce = O === "top" ? p : y - p, k = U; k >= 0; k -= 1) {
2512
- var ie = a(t[k]), G = n.get(ie);
2513
- if (G === void 0) {
2514
- b = !0;
2515
- break;
2516
- }
2517
- if (ce -= G, ce <= 0)
2518
- break;
2519
- }
2520
- switch (O) {
2521
- case "top":
2522
- I = $ - p;
2523
- break;
2524
- case "bottom":
2525
- I = W - y + p;
2526
- break;
2527
- default: {
2528
- var ee = e.current.scrollTop, L = ee + y;
2529
- $ < ee ? C = "top" : W > L && (C = "bottom");
2530
- }
2531
- }
2532
- I !== null && l(I), I !== f.lastTop && (b = !0);
2533
- }
2534
- b && h(F(F({}, f), {}, {
2535
- times: f.times + 1,
2536
- targetAlign: C,
2537
- lastTop: I
2538
- }));
2539
- } else process.env.NODE_ENV !== "production" && (f == null ? void 0 : f.times) === xr && Rt(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
2540
- }, [f, e.current]), function(u) {
2541
- if (u == null) {
2542
- s();
2543
- return;
2544
- }
2545
- if (Bt.cancel(c.current), typeof u == "number")
2546
- l(u);
2547
- else if (u && tn(u) === "object") {
2548
- var v, m = u.align;
2549
- "index" in u ? v = u.index : v = t.findIndex(function(b) {
2550
- return a(b) === u.key;
2551
- });
2552
- var p = u.offset, y = p === void 0 ? 0 : p;
2553
- h({
2554
- times: 0,
2555
- index: v,
2556
- offset: y,
2557
- originAlign: m
2558
- });
2559
- }
2560
- };
2561
- }
2562
- var Gn = /* @__PURE__ */ o.forwardRef(function(e, t) {
2563
- var n = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, s = e.onStopMove, c = e.onScroll, d = e.horizontal, g = e.spinSize, f = e.containerSize, h = e.style, u = e.thumbStyle, v = e.showScrollBar, m = o.useState(!1), p = H(m, 2), y = p[0], b = p[1], C = o.useState(null), I = H(C, 2), O = I[0], S = I[1], $ = o.useState(null), W = H($, 2), U = W[0], te = W[1], ne = !r, Q = o.useRef(), ce = o.useRef(), k = o.useState(v), ie = H(k, 2), G = ie[0], ee = ie[1], L = o.useRef(), oe = function() {
2564
- v === !0 || v === !1 || (clearTimeout(L.current), ee(!0), L.current = setTimeout(function() {
2565
- ee(!1);
2566
- }, 3e3));
2567
- }, A = i - f || 0, P = f - g || 0, z = o.useMemo(function() {
2568
- if (a === 0 || A === 0)
2569
- return 0;
2570
- var B = a / A;
2571
- return B * P;
2572
- }, [a, A, P]), le = function(x) {
2573
- x.stopPropagation(), x.preventDefault();
2574
- }, Ie = o.useRef({
2575
- top: z,
2576
- dragging: y,
2577
- pageY: O,
2578
- startTop: U
2579
- });
2580
- Ie.current = {
2581
- top: z,
2582
- dragging: y,
2583
- pageY: O,
2584
- startTop: U
2585
- };
2586
- var se = function(x) {
2587
- b(!0), S(Un(x, d)), te(Ie.current.top), l(), x.stopPropagation(), x.preventDefault();
2588
- };
2589
- o.useEffect(function() {
2590
- var B = function(M) {
2591
- M.preventDefault();
2592
- }, x = Q.current, D = ce.current;
2593
- return x.addEventListener("touchstart", B, {
2594
- passive: !1
2595
- }), D.addEventListener("touchstart", se, {
2596
- passive: !1
2597
- }), function() {
2598
- x.removeEventListener("touchstart", B), D.removeEventListener("touchstart", se);
2599
- };
2600
- }, []);
2601
- var xe = o.useRef();
2602
- xe.current = A;
2603
- var ye = o.useRef();
2604
- ye.current = P, o.useEffect(function() {
2605
- if (y) {
2606
- var B, x = function(M) {
2607
- var j = Ie.current, ae = j.dragging, Z = j.pageY, J = j.startTop;
2608
- Bt.cancel(B);
2609
- var ge = Q.current.getBoundingClientRect(), Ee = f / (d ? ge.width : ge.height);
2610
- if (ae) {
2611
- var _e = (Un(M, d) - Z) * Ee, Be = J;
2612
- !ne && d ? Be -= _e : Be += _e;
2613
- var q = xe.current, Ue = ye.current, ze = Ue ? Be / Ue : 0, Pe = Math.ceil(ze * q);
2614
- Pe = Math.max(Pe, 0), Pe = Math.min(Pe, q), B = Bt(function() {
2615
- c(Pe, d);
2616
- });
2617
- }
2618
- }, D = function() {
2619
- b(!1), s();
2620
- };
2621
- return window.addEventListener("mousemove", x, {
2622
- passive: !0
2623
- }), window.addEventListener("touchmove", x, {
2624
- passive: !0
2625
- }), window.addEventListener("mouseup", D, {
2626
- passive: !0
2627
- }), window.addEventListener("touchend", D, {
2628
- passive: !0
2629
- }), function() {
2630
- window.removeEventListener("mousemove", x), window.removeEventListener("touchmove", x), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), Bt.cancel(B);
2631
- };
2632
- }
2633
- }, [y]), o.useEffect(function() {
2634
- return oe(), function() {
2635
- clearTimeout(L.current);
2636
- };
2637
- }, [a]), o.useImperativeHandle(t, function() {
2638
- return {
2639
- delayHidden: oe
2640
- };
2641
- });
2642
- var Me = "".concat(n, "-scrollbar"), fe = {
2643
- position: "absolute",
2644
- visibility: G ? null : "hidden"
2645
- }, De = {
2646
- position: "absolute",
2647
- borderRadius: 99,
2648
- background: "var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",
2649
- cursor: "pointer",
2650
- userSelect: "none"
2651
- };
2652
- return d ? (Object.assign(fe, {
2653
- height: 8,
2654
- left: 0,
2655
- right: 0,
2656
- bottom: 0
2657
- }), Object.assign(De, Ce({
2658
- height: "100%",
2659
- width: g
2660
- }, ne ? "left" : "right", z))) : (Object.assign(fe, Ce({
2661
- width: 8,
2662
- top: 0,
2663
- bottom: 0
2664
- }, ne ? "right" : "left", 0)), Object.assign(De, {
2665
- width: "100%",
2666
- height: g,
2667
- top: z
2668
- })), /* @__PURE__ */ o.createElement("div", {
2669
- ref: Q,
2670
- className: ke(Me, Ce(Ce(Ce({}, "".concat(Me, "-horizontal"), d), "".concat(Me, "-vertical"), !d), "".concat(Me, "-visible"), G)),
2671
- style: F(F({}, fe), h),
2672
- onMouseDown: le,
2673
- onMouseMove: oe
2674
- }, /* @__PURE__ */ o.createElement("div", {
2675
- ref: ce,
2676
- className: ke("".concat(Me, "-thumb"), Ce({}, "".concat(Me, "-thumb-moving"), y)),
2677
- style: F(F({}, De), u),
2678
- onMouseDown: se
2679
- }));
2680
- });
2681
- process.env.NODE_ENV !== "production" && (Gn.displayName = "ScrollBar");
2682
- var Ni = 20;
2683
- function Mr() {
2684
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = e / t * e;
2685
- return isNaN(n) && (n = 0), n = Math.max(n, Ni), Math.floor(n);
2686
- }
2687
- var Ti = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], zi = [], _i = {
2688
- overflowY: "auto",
2689
- overflowAnchor: "none"
2690
- };
2691
- function Li(e, t) {
2692
- var n = e.prefixCls, r = n === void 0 ? "rc-virtual-list" : n, a = e.className, i = e.height, l = e.itemHeight, s = e.fullHeight, c = s === void 0 ? !0 : s, d = e.style, g = e.data, f = e.children, h = e.itemKey, u = e.virtual, v = e.direction, m = e.scrollWidth, p = e.component, y = p === void 0 ? "div" : p, b = e.onScroll, C = e.onVirtualScroll, I = e.onVisibleChange, O = e.innerProps, S = e.extraRender, $ = e.styles, W = e.showScrollBar, U = W === void 0 ? "optional" : W, te = xt(e, Ti), ne = o.useCallback(function(T) {
2693
- return typeof h == "function" ? h(T) : T == null ? void 0 : T[h];
2694
- }, [h]), Q = Oi(ne), ce = H(Q, 4), k = ce[0], ie = ce[1], G = ce[2], ee = ce[3], L = !!(u !== !1 && i && l), oe = o.useMemo(function() {
2695
- return Object.values(G.maps).reduce(function(T, _) {
2696
- return T + _;
2697
- }, 0);
2698
- }, [G.id, G.maps]), A = L && g && (Math.max(l * g.length, oe) > i || !!m), P = v === "rtl", z = ke(r, Ce({}, "".concat(r, "-rtl"), P), a), le = g || zi, Ie = We(), se = We(), xe = We(), ye = en(0), Me = H(ye, 2), fe = Me[0], De = Me[1], B = en(0), x = H(B, 2), D = x[0], X = x[1], M = en(!1), j = H(M, 2), ae = j[0], Z = j[1], J = function() {
2699
- Z(!0);
2700
- }, ge = function() {
2701
- Z(!1);
2702
- }, Ee = {
2703
- getKey: ne
2704
- };
2705
- function _e(T) {
2706
- De(function(_) {
2707
- var ve;
2708
- typeof T == "function" ? ve = T(_) : ve = T;
2709
- var $e = et(ve);
2710
- return Ie.current.scrollTop = $e, $e;
2711
- });
2712
- }
2713
- var Be = We({
2714
- start: 0,
2715
- end: le.length
2716
- }), q = We(), Ue = Ei(le, ne), ze = H(Ue, 1), Pe = ze[0];
2717
- q.current = Pe;
2718
- var we = o.useMemo(function() {
2719
- if (!L)
2720
- return {
2721
- scrollHeight: void 0,
2722
- start: 0,
2723
- end: le.length - 1,
2724
- offset: void 0
2725
- };
2726
- if (!A) {
2727
- var T;
2728
- return {
2729
- scrollHeight: ((T = se.current) === null || T === void 0 ? void 0 : T.offsetHeight) || 0,
2730
- start: 0,
2731
- end: le.length - 1,
2732
- offset: void 0
2733
- };
2734
- }
2735
- for (var _ = 0, ve, $e, Fe, _t = le.length, Mt = 0; Mt < _t; Mt += 1) {
2736
- var Vt = le[Mt], Xt = ne(Vt), Ot = G.get(Xt), $t = _ + (Ot === void 0 ? l : Ot);
2737
- $t >= fe && ve === void 0 && (ve = Mt, $e = _), $t > fe + i && Fe === void 0 && (Fe = Mt), _ = $t;
2738
- }
2739
- return ve === void 0 && (ve = 0, $e = 0, Fe = Math.ceil(i / l)), Fe === void 0 && (Fe = le.length - 1), Fe = Math.min(Fe + 1, le.length - 1), {
2740
- scrollHeight: _,
2741
- start: ve,
2742
- end: Fe,
2743
- offset: $e
2744
- };
2745
- }, [A, L, fe, le, ee, i]), he = we.scrollHeight, Ne = we.start, Oe = we.end, Ge = we.offset;
2746
- Be.current.start = Ne, Be.current.end = Oe, o.useLayoutEffect(function() {
2747
- var T = G.getRecord();
2748
- if (T.size === 1) {
2749
- var _ = Array.from(T.keys())[0], ve = T.get(_), $e = le[Ne];
2750
- if ($e && ve === void 0) {
2751
- var Fe = ne($e);
2752
- if (Fe === _) {
2753
- var _t = G.get(_), Mt = _t - l;
2754
- _e(function(Vt) {
2755
- return Vt + Mt;
2756
- });
2757
- }
2758
- }
2759
- }
2760
- G.resetRecord();
2761
- }, [he]);
2762
- var qe = o.useState({
2763
- width: 0,
2764
- height: i
2765
- }), Re = H(qe, 2), pe = Re[0], lt = Re[1], Le = function(_) {
2766
- lt({
2767
- width: _.offsetWidth,
2768
- height: _.offsetHeight
2769
- });
2770
- }, Ye = We(), Xe = We(), Ct = o.useMemo(function() {
2771
- return Mr(pe.width, m);
2772
- }, [pe.width, m]), dt = o.useMemo(function() {
2773
- return Mr(pe.height, he);
2774
- }, [pe.height, he]), pt = he - i, bt = We(pt);
2775
- bt.current = pt;
2776
- function et(T) {
2777
- var _ = T;
2778
- return Number.isNaN(bt.current) || (_ = Math.min(_, bt.current)), _ = Math.max(_, 0), _;
2779
- }
2780
- var Ve = fe <= 0, Te = fe >= pt, tt = D <= 0, Ke = D >= m, Y = uo(Ve, Te, tt, Ke), Se = function() {
2781
- return {
2782
- x: P ? -D : D,
2783
- y: fe
2784
- };
2785
- }, je = We(Se()), N = Kt(function(T) {
2786
- if (C) {
2787
- var _ = F(F({}, Se()), T);
2788
- (je.current.x !== _.x || je.current.y !== _.y) && (C(_), je.current = _);
2789
- }
2790
- });
2791
- function w(T, _) {
2792
- var ve = T;
2793
- _ ? (lr(function() {
2794
- X(ve);
2795
- }), N()) : _e(ve);
2796
- }
2797
- function E(T) {
2798
- var _ = T.currentTarget.scrollTop;
2799
- _ !== fe && _e(_), b == null || b(T), N();
2800
- }
2801
- var R = function(_) {
2802
- var ve = _, $e = m ? m - pe.width : 0;
2803
- return ve = Math.max(ve, 0), ve = Math.min(ve, $e), ve;
2804
- }, K = Kt(function(T, _) {
2805
- _ ? (lr(function() {
2806
- X(function(ve) {
2807
- var $e = ve + (P ? -T : T);
2808
- return R($e);
2809
- });
2810
- }), N()) : _e(function(ve) {
2811
- var $e = ve + T;
2812
- return $e;
2813
- });
2814
- }), de = Ri(L, Ve, Te, tt, Ke, !!m, K), ft = H(de, 2), st = ft[0], vt = ft[1];
2815
- $i(L, Ie, function(T, _, ve, $e) {
2816
- var Fe = $e;
2817
- return Y(T, _, ve) ? !1 : !Fe || !Fe._virtualHandled ? (Fe && (Fe._virtualHandled = !0), st({
2818
- preventDefault: function() {
2819
- },
2820
- deltaX: T ? _ : 0,
2821
- deltaY: T ? 0 : _
2822
- }), !0) : !1;
2823
- }), Di(A, Ie, function(T) {
2824
- _e(function(_) {
2825
- return _ + T;
2826
- });
2827
- }), ht(function() {
2828
- function T(ve) {
2829
- var $e = Ve && ve.detail < 0, Fe = Te && ve.detail > 0;
2830
- L && !$e && !Fe && ve.preventDefault();
2831
- }
2832
- var _ = Ie.current;
2833
- return _.addEventListener("wheel", st, {
2834
- passive: !1
2835
- }), _.addEventListener("DOMMouseScroll", vt, {
2836
- passive: !0
2837
- }), _.addEventListener("MozMousePixelScroll", T, {
2838
- passive: !1
2839
- }), function() {
2840
- _.removeEventListener("wheel", st), _.removeEventListener("DOMMouseScroll", vt), _.removeEventListener("MozMousePixelScroll", T);
2841
- };
2842
- }, [L, Ve, Te]), ht(function() {
2843
- if (m) {
2844
- var T = R(D);
2845
- X(T), N({
2846
- x: T
2847
- });
2848
- }
2849
- }, [pe.width, m]);
2850
- var He = function() {
2851
- var _, ve;
2852
- (_ = Ye.current) === null || _ === void 0 || _.delayHidden(), (ve = Xe.current) === null || ve === void 0 || ve.delayHidden();
2853
- }, St = Pi(Ie, le, G, l, ne, function() {
2854
- return ie(!0);
2855
- }, _e, He);
2856
- o.useImperativeHandle(t, function() {
2857
- return {
2858
- nativeElement: xe.current,
2859
- getScrollInfo: Se,
2860
- scrollTo: function(_) {
2861
- function ve($e) {
2862
- return $e && tn($e) === "object" && ("left" in $e || "top" in $e);
2863
- }
2864
- ve(_) ? (_.left !== void 0 && X(R(_.left)), St(_.top)) : St(_);
2865
- }
2866
- };
2867
- }), ht(function() {
2868
- if (I) {
2869
- var T = le.slice(Ne, Oe + 1);
2870
- I(T, le);
2871
- }
2872
- }, [Ne, Oe, le]);
2873
- var ot = xi(le, ne, G, l), It = S == null ? void 0 : S({
2874
- start: Ne,
2875
- end: Oe,
2876
- virtual: A,
2877
- offsetX: D,
2878
- offsetY: Ge,
2879
- rtl: P,
2880
- getSize: ot
2881
- }), Nt = Ci(le, Ne, Oe, m, D, k, f, Ee), at = null;
2882
- i && (at = F(Ce({}, c ? "height" : "maxHeight", i), _i), L && (at.overflowY = "hidden", m && (at.overflowX = "hidden"), ae && (at.pointerEvents = "none")));
2883
- var gt = {};
2884
- return P && (gt.dir = "rtl"), /* @__PURE__ */ o.createElement("div", Je({
2885
- ref: xe,
2886
- style: F(F({}, d), {}, {
2887
- position: "relative"
2888
- }),
2889
- className: z
2890
- }, gt, te), /* @__PURE__ */ o.createElement(cn, {
2891
- onResize: Le
2892
- }, /* @__PURE__ */ o.createElement(y, {
2893
- className: "".concat(r, "-holder"),
2894
- style: at,
2895
- ref: Ie,
2896
- onScroll: E,
2897
- onMouseEnter: He
2898
- }, /* @__PURE__ */ o.createElement(so, {
2899
- prefixCls: r,
2900
- height: he,
2901
- offsetX: D,
2902
- offsetY: Ge,
2903
- scrollWidth: m,
2904
- onInnerResize: ie,
2905
- ref: se,
2906
- innerProps: O,
2907
- rtl: P,
2908
- extra: It
2909
- }, Nt))), A && he > i && /* @__PURE__ */ o.createElement(Gn, {
2910
- ref: Ye,
2911
- prefixCls: r,
2912
- scrollOffset: fe,
2913
- scrollRange: he,
2914
- rtl: P,
2915
- onScroll: w,
2916
- onStartMove: J,
2917
- onStopMove: ge,
2918
- spinSize: dt,
2919
- containerSize: pe.height,
2920
- style: $ == null ? void 0 : $.verticalScrollBar,
2921
- thumbStyle: $ == null ? void 0 : $.verticalScrollBarThumb,
2922
- showScrollBar: U
2923
- }), A && m > pe.width && /* @__PURE__ */ o.createElement(Gn, {
2924
- ref: Xe,
2925
- prefixCls: r,
2926
- scrollOffset: D,
2927
- scrollRange: m,
2928
- rtl: P,
2929
- onScroll: w,
2930
- onStartMove: J,
2931
- onStopMove: ge,
2932
- spinSize: Ct,
2933
- containerSize: pe.width,
2934
- horizontal: !0,
2935
- style: $ == null ? void 0 : $.horizontalScrollBar,
2936
- thumbStyle: $ == null ? void 0 : $.horizontalScrollBarThumb,
2937
- showScrollBar: U
2938
- }));
2939
- }
2940
- var co = /* @__PURE__ */ o.forwardRef(Li);
2941
- co.displayName = "List";
2942
- function Bi() {
2943
- return /(mac\sos|macintosh)/i.test(navigator.appVersion);
2944
- }
2945
- var Vi = ["disabled", "title", "children", "style", "className"];
2946
- function Or(e) {
2947
- return typeof e == "string" || typeof e == "number";
2948
- }
2949
- var Hi = function(t, n) {
2950
- var r = $a(), a = r.prefixCls, i = r.id, l = r.open, s = r.multiple, c = r.mode, d = r.searchValue, g = r.toggleOpen, f = r.notFoundContent, h = r.onPopupScroll, u = o.useContext(Jn), v = u.maxCount, m = u.flattenOptions, p = u.onActiveValue, y = u.defaultActiveFirstOption, b = u.onSelect, C = u.menuItemSelectedIcon, I = u.rawValues, O = u.fieldNames, S = u.virtual, $ = u.direction, W = u.listHeight, U = u.listItemHeight, te = u.optionRender, ne = "".concat(a, "-item"), Q = Do(function() {
2951
- return m;
2952
- }, [l, m], function(B, x) {
2953
- return x[0] && B[1] !== x[1];
2954
- }), ce = o.useRef(null), k = o.useMemo(function() {
2955
- return s && jn(v) && (I == null ? void 0 : I.size) >= v;
2956
- }, [s, v, I == null ? void 0 : I.size]), ie = function(x) {
2957
- x.preventDefault();
2958
- }, G = function(x) {
2959
- var D;
2960
- (D = ce.current) === null || D === void 0 || D.scrollTo(typeof x == "number" ? {
2961
- index: x
2962
- } : x);
2963
- }, ee = o.useCallback(function(B) {
2964
- return c === "combobox" ? !1 : I.has(B);
2965
- }, [c, wt(I).toString(), I.size]), L = function(x) {
2966
- for (var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, X = Q.length, M = 0; M < X; M += 1) {
2967
- var j = (x + M * D + X) % X, ae = Q[j] || {}, Z = ae.group, J = ae.data;
2968
- if (!Z && !(J != null && J.disabled) && (ee(J.value) || !k))
2969
- return j;
2970
- }
2971
- return -1;
2972
- }, oe = o.useState(function() {
2973
- return L(0);
2974
- }), A = H(oe, 2), P = A[0], z = A[1], le = function(x) {
2975
- var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2976
- z(x);
2977
- var X = {
2978
- source: D ? "keyboard" : "mouse"
2979
- }, M = Q[x];
2980
- if (!M) {
2981
- p(null, -1, X);
2982
- return;
2983
- }
2984
- p(M.value, x, X);
2985
- };
2986
- Wn(function() {
2987
- le(y !== !1 ? L(0) : -1);
2988
- }, [Q.length, d]);
2989
- var Ie = o.useCallback(function(B) {
2990
- return c === "combobox" ? String(B).toLowerCase() === d.toLowerCase() : I.has(B);
2991
- }, [c, d, wt(I).toString(), I.size]);
2992
- Wn(function() {
2993
- var B = setTimeout(function() {
2994
- if (!s && l && I.size === 1) {
2995
- var D = Array.from(I)[0], X = Q.findIndex(function(M) {
2996
- var j = M.data;
2997
- return d ? String(j.value).startsWith(d) : j.value === D;
2998
- });
2999
- X !== -1 && (le(X), G(X));
3000
- }
3001
- });
3002
- if (l) {
3003
- var x;
3004
- (x = ce.current) === null || x === void 0 || x.scrollTo(void 0);
3005
- }
3006
- return function() {
3007
- return clearTimeout(B);
3008
- };
3009
- }, [l, d]);
3010
- var se = function(x) {
3011
- x !== void 0 && b(x, {
3012
- selected: !I.has(x)
3013
- }), s || g(!1);
3014
- };
3015
- if (o.useImperativeHandle(n, function() {
3016
- return {
3017
- onKeyDown: function(x) {
3018
- var D = x.which, X = x.ctrlKey;
3019
- switch (D) {
3020
- // >>> Arrow keys & ctrl + n/p on Mac
3021
- case me.N:
3022
- case me.P:
3023
- case me.UP:
3024
- case me.DOWN: {
3025
- var M = 0;
3026
- if (D === me.UP ? M = -1 : D === me.DOWN ? M = 1 : Bi() && X && (D === me.N ? M = 1 : D === me.P && (M = -1)), M !== 0) {
3027
- var j = L(P + M, M);
3028
- G(j), le(j, !0);
3029
- }
3030
- break;
3031
- }
3032
- // >>> Select (Tab / Enter)
3033
- case me.TAB:
3034
- case me.ENTER: {
3035
- var ae, Z = Q[P];
3036
- Z && !(Z != null && (ae = Z.data) !== null && ae !== void 0 && ae.disabled) && !k ? se(Z.value) : se(void 0), l && x.preventDefault();
3037
- break;
3038
- }
3039
- // >>> Close
3040
- case me.ESC:
3041
- g(!1), l && x.stopPropagation();
3042
- }
3043
- },
3044
- onKeyUp: function() {
3045
- },
3046
- scrollTo: function(x) {
3047
- G(x);
3048
- }
3049
- };
3050
- }), Q.length === 0)
3051
- return /* @__PURE__ */ o.createElement("div", {
3052
- role: "listbox",
3053
- id: "".concat(i, "_list"),
3054
- className: "".concat(ne, "-empty"),
3055
- onMouseDown: ie
3056
- }, f);
3057
- var xe = Object.keys(O).map(function(B) {
3058
- return O[B];
3059
- }), ye = function(x) {
3060
- return x.label;
3061
- };
3062
- function Me(B, x) {
3063
- var D = B.group;
3064
- return {
3065
- role: D ? "presentation" : "option",
3066
- id: "".concat(i, "_list_").concat(x)
3067
- };
3068
- }
3069
- var fe = function(x) {
3070
- var D = Q[x];
3071
- if (!D)
3072
- return null;
3073
- var X = D.data || {}, M = X.value, j = D.group, ae = Rn(X, !0), Z = ye(D);
3074
- return D ? /* @__PURE__ */ o.createElement("div", Je({
3075
- "aria-label": typeof Z == "string" && !j ? Z : null
3076
- }, ae, {
3077
- key: x
3078
- }, Me(D, x), {
3079
- "aria-selected": Ie(M)
3080
- }), M) : null;
3081
- }, De = {
3082
- role: "listbox",
3083
- id: "".concat(i, "_list")
3084
- };
3085
- return /* @__PURE__ */ o.createElement(o.Fragment, null, S && /* @__PURE__ */ o.createElement("div", Je({}, De, {
3086
- style: {
3087
- height: 0,
3088
- width: 0,
3089
- overflow: "hidden"
3090
- }
3091
- }), fe(P - 1), fe(P), fe(P + 1)), /* @__PURE__ */ o.createElement(co, {
3092
- itemKey: "key",
3093
- ref: ce,
3094
- data: Q,
3095
- height: W,
3096
- itemHeight: U,
3097
- fullHeight: !1,
3098
- onMouseDown: ie,
3099
- onScroll: h,
3100
- virtual: S,
3101
- direction: $,
3102
- innerProps: S ? null : De
3103
- }, function(B, x) {
3104
- var D = B.group, X = B.groupOption, M = B.data, j = B.label, ae = B.value, Z = M.key;
3105
- if (D) {
3106
- var J, ge = (J = M.title) !== null && J !== void 0 ? J : Or(j) ? j.toString() : void 0;
3107
- return /* @__PURE__ */ o.createElement("div", {
3108
- className: ke(ne, "".concat(ne, "-group"), M.className),
3109
- title: ge
3110
- }, j !== void 0 ? j : Z);
3111
- }
3112
- var Ee = M.disabled, _e = M.title;
3113
- M.children;
3114
- var Be = M.style, q = M.className, Ue = xt(M, Vi), ze = Hr(Ue, xe), Pe = ee(ae), we = Ee || !Pe && k, he = "".concat(ne, "-option"), Ne = ke(ne, he, q, Ce(Ce(Ce(Ce({}, "".concat(he, "-grouped"), X), "".concat(he, "-active"), P === x && !we), "".concat(he, "-disabled"), we), "".concat(he, "-selected"), Pe)), Oe = ye(B), Ge = !C || typeof C == "function" || Pe, qe = typeof Oe == "number" ? Oe : Oe || ae, Re = Or(qe) ? qe.toString() : void 0;
3115
- return _e !== void 0 && (Re = _e), /* @__PURE__ */ o.createElement("div", Je({}, Rn(ze), S ? {} : Me(B, x), {
3116
- "aria-selected": Ie(ae),
3117
- className: Ne,
3118
- title: Re,
3119
- onMouseMove: function() {
3120
- P === x || we || le(x);
3121
- },
3122
- onClick: function() {
3123
- we || se(ae);
3124
- },
3125
- style: Be
3126
- }), /* @__PURE__ */ o.createElement("div", {
3127
- className: "".concat(he, "-content")
3128
- }, typeof te == "function" ? te(B, {
3129
- index: x
3130
- }) : qe), /* @__PURE__ */ o.isValidElement(C) || Pe, Ge && /* @__PURE__ */ o.createElement(On, {
3131
- className: "".concat(ne, "-option-state"),
3132
- customizeIcon: C,
3133
- customizeIconProps: {
3134
- value: ae,
3135
- disabled: we,
3136
- isSelected: Pe
3137
- }
3138
- }, Pe ? "✓" : null));
3139
- }));
3140
- }, fo = /* @__PURE__ */ o.forwardRef(Hi);
3141
- process.env.NODE_ENV !== "production" && (fo.displayName = "OptionList");
3142
- const Wi = (function(e, t) {
3143
- var n = o.useRef({
3144
- values: /* @__PURE__ */ new Map(),
3145
- options: /* @__PURE__ */ new Map()
3146
- }), r = o.useMemo(function() {
3147
- var i = n.current, l = i.values, s = i.options, c = e.map(function(f) {
3148
- if (f.label === void 0) {
3149
- var h;
3150
- return F(F({}, f), {}, {
3151
- label: (h = l.get(f.value)) === null || h === void 0 ? void 0 : h.label
3152
- });
3153
- }
3154
- return f;
3155
- }), d = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
3156
- return c.forEach(function(f) {
3157
- d.set(f.value, f), g.set(f.value, t.get(f.value) || s.get(f.value));
3158
- }), n.current.values = d, n.current.options = g, c;
3159
- }, [e, t]), a = o.useCallback(function(i) {
3160
- return t.get(i) || n.current.options.get(i);
3161
- }, [t]);
3162
- return [r, a];
3163
- });
3164
- function zn(e, t) {
3165
- return Qn(e).join("").toUpperCase().includes(t);
3166
- }
3167
- const Ai = (function(e, t, n, r, a) {
3168
- return o.useMemo(function() {
3169
- if (!n || r === !1)
3170
- return e;
3171
- var i = t.options, l = t.label, s = t.value, c = [], d = typeof r == "function", g = n.toUpperCase(), f = d ? r : function(u, v) {
3172
- return a ? zn(v[a], g) : v[i] ? zn(v[l !== "children" ? l : "label"], g) : zn(v[s], g);
3173
- }, h = d ? function(u) {
3174
- return Kn(u);
3175
- } : function(u) {
3176
- return u;
3177
- };
3178
- return e.forEach(function(u) {
3179
- if (u[i]) {
3180
- var v = f(n, h(u));
3181
- if (v)
3182
- c.push(u);
3183
- else {
3184
- var m = u[i].filter(function(p) {
3185
- return f(n, h(p));
3186
- });
3187
- m.length && c.push(F(F({}, u), {}, Ce({}, i, m)));
3188
- }
3189
- return;
3190
- }
3191
- f(n, h(u)) && c.push(u);
3192
- }), c;
3193
- }, [e, r, a, n, t]);
3194
- });
3195
- var $r = 0, Fi = process.env.NODE_ENV !== "test" && Yo();
3196
- function ji() {
3197
- var e;
3198
- return Fi ? (e = $r, $r += 1) : e = "TEST_OR_SSR", e;
3199
- }
3200
- function Ki(e) {
3201
- var t = o.useState(), n = H(t, 2), r = n[0], a = n[1];
3202
- return o.useEffect(function() {
3203
- a("rc_select_".concat(ji()));
3204
- }, []), e || r;
3205
- }
3206
- var Ui = ["children", "value"], Gi = ["children"];
3207
- function qi(e) {
3208
- var t = e, n = t.key, r = t.props, a = r.children, i = r.value, l = xt(r, Ui);
3209
- return F({
3210
- key: n,
3211
- value: i !== void 0 ? i : n,
3212
- children: a
3213
- }, l);
3214
- }
3215
- function tr(e) {
3216
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
3217
- return Vn(e).map(function(n, r) {
3218
- if (!/* @__PURE__ */ o.isValidElement(n) || !n.type)
3219
- return null;
3220
- var a = n, i = a.type.isSelectOptGroup, l = a.key, s = a.props, c = s.children, d = xt(s, Gi);
3221
- return t || !i ? qi(n) : F(F({
3222
- key: "__RC_SELECT_GRP__".concat(l === null ? r : l, "__"),
3223
- label: l
3224
- }, d), {}, {
3225
- options: tr(c)
3226
- });
3227
- }).filter(function(n) {
3228
- return n;
3229
- });
3230
- }
3231
- var Xi = function(t, n, r, a, i) {
3232
- return o.useMemo(function() {
3233
- var l = t, s = !t;
3234
- s && (l = tr(n));
3235
- var c = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), g = function(u, v, m) {
3236
- m && typeof m == "string" && u.set(v[m], v);
3237
- }, f = function h(u) {
3238
- for (var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, m = 0; m < u.length; m += 1) {
3239
- var p = u[m];
3240
- !p[r.options] || v ? (c.set(p[r.value], p), g(d, p, r.label), g(d, p, a), g(d, p, i)) : h(p[r.options], !0);
3241
- }
3242
- };
3243
- return f(l), {
3244
- options: l,
3245
- valueOptions: c,
3246
- labelOptions: d
3247
- };
3248
- }, [t, n, r, a, i]);
3249
- };
3250
- function Dr(e) {
3251
- var t = o.useRef();
3252
- t.current = e;
3253
- var n = o.useCallback(function() {
3254
- return t.current.apply(t, arguments);
3255
- }, []);
3256
- return n;
3257
- }
3258
- function Zi(e) {
3259
- var t = e.mode, n = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, s = e.getInputElement, c = e.showSearch, d = e.onSearch, g = e.defaultOpen, f = e.autoFocus, h = e.labelInValue, u = e.value, v = e.inputValue, m = e.optionLabelProp, p = Mn(t), y = c !== void 0 ? c : p || t === "combobox", b = n || tr(r);
3260
- if (Rt(t !== "tags" || b.every(function(S) {
3261
- return !S.disabled;
3262
- }), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), t === "tags" || t === "combobox") {
3263
- var C = b.some(function(S) {
3264
- return S.options ? S.options.some(function($) {
3265
- return typeof ("value" in $ ? $.value : $.key) == "number";
3266
- }) : typeof ("value" in S ? S.value : S.key) == "number";
3267
- });
3268
- Rt(!C, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
3269
- }
3270
- if (Rt(t !== "combobox" || !m, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Rt(t === "combobox" || !a, "`backfill` only works with `combobox` mode."), Rt(t === "combobox" || !s, "`getInputElement` only work with `combobox` mode."), ir(t !== "combobox" || !s || !i || !l, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), d && !y && t !== "combobox" && t !== "tags" && Rt(!1, "`onSearch` should work with `showSearch` instead of use alone."), ir(!g || f, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), u != null) {
3271
- var I = Qn(u);
3272
- Rt(!h || I.every(function(S) {
3273
- return tn(S) === "object" && ("key" in S || "value" in S);
3274
- }), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Rt(!p || Array.isArray(u), "`value` should be array when `mode` is `multiple` or `tags`");
3275
- }
3276
- if (r) {
3277
- var O = null;
3278
- Vn(r).some(function(S) {
3279
- if (!/* @__PURE__ */ o.isValidElement(S) || !S.type)
3280
- return !1;
3281
- var $ = S, W = $.type;
3282
- if (W.isSelectOption)
3283
- return !1;
3284
- if (W.isSelectOptGroup) {
3285
- var U = Vn(S.props.children).every(function(te) {
3286
- return !/* @__PURE__ */ o.isValidElement(te) || !S.type || te.type.isSelectOption ? !0 : (O = te.type, !1);
3287
- });
3288
- return !U;
3289
- }
3290
- return O = W, !0;
3291
- }), O && Rt(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(O.displayName || O.name || O, "`.")), Rt(v === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
3292
- }
3293
- }
3294
- function Yi(e, t) {
3295
- if (e) {
3296
- var n = function r(a) {
3297
- for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = 0; l < a.length; l++) {
3298
- var s = a[l];
3299
- if (s[t == null ? void 0 : t.value] === null)
3300
- return Rt(!1, "`value` in Select options should not be `null`."), !0;
3301
- if (!i && Array.isArray(s[t == null ? void 0 : t.options]) && r(s[t == null ? void 0 : t.options], !0))
3302
- break;
3303
- }
3304
- };
3305
- n(e);
3306
- }
3307
- }
3308
- var Qi = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], Ji = ["inputValue"];
3309
- function ki(e) {
3310
- return !e || tn(e) !== "object";
3311
- }
3312
- var vo = /* @__PURE__ */ o.forwardRef(function(e, t) {
3313
- var n = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, s = e.fieldNames, c = e.inputValue, d = e.searchValue, g = e.onSearch, f = e.autoClearSearchValue, h = f === void 0 ? !0 : f, u = e.onSelect, v = e.onDeselect, m = e.dropdownMatchSelectWidth, p = m === void 0 ? !0 : m, y = e.filterOption, b = e.filterSort, C = e.optionFilterProp, I = e.optionLabelProp, O = e.options, S = e.optionRender, $ = e.children, W = e.defaultActiveFirstOption, U = e.menuItemSelectedIcon, te = e.virtual, ne = e.direction, Q = e.listHeight, ce = Q === void 0 ? 200 : Q, k = e.listItemHeight, ie = k === void 0 ? 20 : k, G = e.labelRender, ee = e.value, L = e.defaultValue, oe = e.labelInValue, A = e.onChange, P = e.maxCount, z = xt(e, Qi), le = Ki(n), Ie = Mn(r), se = !!(!O && $), xe = o.useMemo(function() {
3314
- return y === void 0 && r === "combobox" ? !1 : y;
3315
- }, [y, r]), ye = o.useMemo(
3316
- function() {
3317
- return io(s, se);
3318
- },
3319
- /* eslint-disable react-hooks/exhaustive-deps */
3320
- [
3321
- // We stringify fieldNames to avoid unnecessary re-renders.
3322
- JSON.stringify(s),
3323
- se
3324
- ]
3325
- /* eslint-enable react-hooks/exhaustive-deps */
3326
- ), Me = En("", {
3327
- value: d !== void 0 ? d : c,
3328
- postState: function(w) {
3329
- return w || "";
3330
- }
3331
- }), fe = H(Me, 2), De = fe[0], B = fe[1], x = Xi(O, $, ye, C, I), D = x.valueOptions, X = x.labelOptions, M = x.options, j = o.useCallback(function(N) {
3332
- var w = Qn(N);
3333
- return w.map(function(E) {
3334
- var R, K, de, ft, st;
3335
- if (ki(E))
3336
- R = E;
3337
- else {
3338
- var vt;
3339
- de = E.key, K = E.label, R = (vt = E.value) !== null && vt !== void 0 ? vt : de;
3340
- }
3341
- var He = D.get(R);
3342
- if (He) {
3343
- var St;
3344
- if (K === void 0 && (K = He == null ? void 0 : He[I || ye.label]), de === void 0 && (de = (St = He == null ? void 0 : He.key) !== null && St !== void 0 ? St : R), ft = He == null ? void 0 : He.disabled, st = He == null ? void 0 : He.title, process.env.NODE_ENV !== "production" && !I) {
3345
- var ot = He == null ? void 0 : He[ye.label];
3346
- ot !== void 0 && !/* @__PURE__ */ o.isValidElement(ot) && !/* @__PURE__ */ o.isValidElement(K) && ot !== K && Rt(!1, "`label` of `value` is not same as `label` in Select options.");
3347
- }
3348
- }
3349
- return {
3350
- label: K,
3351
- value: R,
3352
- key: de,
3353
- disabled: ft,
3354
- title: st
3355
- };
3356
- });
3357
- }, [ye, I, D]), ae = En(L, {
3358
- value: ee
3359
- }), Z = H(ae, 2), J = Z[0], ge = Z[1], Ee = o.useMemo(function() {
3360
- var N, w = Ie && J === null ? [] : J, E = j(w);
3361
- return r === "combobox" && Ya((N = E[0]) === null || N === void 0 ? void 0 : N.value) ? [] : E;
3362
- }, [J, j, r, Ie]), _e = Wi(Ee, D), Be = H(_e, 2), q = Be[0], Ue = Be[1], ze = o.useMemo(function() {
3363
- if (!r && q.length === 1) {
3364
- var N = q[0];
3365
- if (N.value === null && (N.label === null || N.label === void 0))
3366
- return [];
3367
- }
3368
- return q.map(function(w) {
3369
- var E;
3370
- return F(F({}, w), {}, {
3371
- label: (E = typeof G == "function" ? G(w) : w.label) !== null && E !== void 0 ? E : w.value
3372
- });
3373
- });
3374
- }, [r, q, G]), Pe = o.useMemo(function() {
3375
- return new Set(q.map(function(N) {
3376
- return N.value;
3377
- }));
3378
- }, [q]);
3379
- o.useEffect(function() {
3380
- if (r === "combobox") {
3381
- var N, w = (N = q[0]) === null || N === void 0 ? void 0 : N.value;
3382
- B(Za(w) ? String(w) : "");
3383
- }
3384
- }, [q]);
3385
- var we = Dr(function(N, w) {
3386
- var E = w ?? N;
3387
- return Ce(Ce({}, ye.value, N), ye.label, E);
3388
- }), he = o.useMemo(function() {
3389
- if (r !== "tags")
3390
- return M;
3391
- var N = wt(M), w = function(R) {
3392
- return D.has(R);
3393
- };
3394
- return wt(q).sort(function(E, R) {
3395
- return E.value < R.value ? -1 : 1;
3396
- }).forEach(function(E) {
3397
- var R = E.value;
3398
- w(R) || N.push(we(R, E.label));
3399
- }), N;
3400
- }, [we, M, D, q, r]), Ne = Ai(he, ye, De, xe, C), Oe = o.useMemo(function() {
3401
- return r !== "tags" || !De || Ne.some(function(N) {
3402
- return N[C || "value"] === De;
3403
- }) || Ne.some(function(N) {
3404
- return N[ye.value] === De;
3405
- }) ? Ne : [we(De)].concat(wt(Ne));
3406
- }, [we, C, r, Ne, De, ye]), Ge = function N(w) {
3407
- var E = wt(w).sort(function(R, K) {
3408
- return b(R, K, {
3409
- searchValue: De
3410
- });
3411
- });
3412
- return E.map(function(R) {
3413
- return Array.isArray(R.options) ? F(F({}, R), {}, {
3414
- options: R.options.length > 0 ? N(R.options) : R.options
3415
- }) : R;
3416
- });
3417
- }, qe = o.useMemo(function() {
3418
- return b ? Ge(Oe) : Oe;
3419
- }, [Oe, b, De]), Re = o.useMemo(function() {
3420
- return hi(qe, {
3421
- fieldNames: ye,
3422
- childrenAsData: se
3423
- });
3424
- }, [qe, ye, se]), pe = function(w) {
3425
- var E = j(w);
3426
- if (ge(E), A && // Trigger event only when value changed
3427
- (E.length !== q.length || E.some(function(de, ft) {
3428
- var st;
3429
- return ((st = q[ft]) === null || st === void 0 ? void 0 : st.value) !== (de == null ? void 0 : de.value);
3430
- }))) {
3431
- var R = oe ? E : E.map(function(de) {
3432
- return de.value;
3433
- }), K = E.map(function(de) {
3434
- return Kn(Ue(de.value));
3435
- });
3436
- A(
3437
- // Value
3438
- Ie ? R : R[0],
3439
- // Option
3440
- Ie ? K : K[0]
3441
- );
3442
- }
3443
- }, lt = o.useState(null), Le = H(lt, 2), Ye = Le[0], Xe = Le[1], Ct = o.useState(0), dt = H(Ct, 2), pt = dt[0], bt = dt[1], et = W !== void 0 ? W : r !== "combobox", Ve = o.useCallback(function(N, w) {
3444
- var E = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, R = E.source, K = R === void 0 ? "keyboard" : R;
3445
- bt(w), l && r === "combobox" && N !== null && K === "keyboard" && Xe(String(N));
3446
- }, [l, r]), Te = function(w, E, R) {
3447
- var K = function() {
3448
- var at, gt = Ue(w);
3449
- return [oe ? {
3450
- label: gt == null ? void 0 : gt[ye.label],
3451
- value: w,
3452
- key: (at = gt == null ? void 0 : gt.key) !== null && at !== void 0 ? at : w
3453
- } : w, Kn(gt)];
3454
- };
3455
- if (E && u) {
3456
- var de = K(), ft = H(de, 2), st = ft[0], vt = ft[1];
3457
- u(st, vt);
3458
- } else if (!E && v && R !== "clear") {
3459
- var He = K(), St = H(He, 2), ot = St[0], It = St[1];
3460
- v(ot, It);
3461
- }
3462
- }, tt = Dr(function(N, w) {
3463
- var E, R = Ie ? w.selected : !0;
3464
- R ? E = Ie ? [].concat(wt(q), [N]) : [N] : E = q.filter(function(K) {
3465
- return K.value !== N;
3466
- }), pe(E), Te(N, R), r === "combobox" ? Xe("") : (!Mn || h) && (B(""), Xe(""));
3467
- }), Ke = function(w, E) {
3468
- pe(w);
3469
- var R = E.type, K = E.values;
3470
- (R === "remove" || R === "clear") && K.forEach(function(de) {
3471
- Te(de.value, !1, R);
3472
- });
3473
- }, Y = function(w, E) {
3474
- if (B(w), Xe(null), E.source === "submit") {
3475
- var R = (w || "").trim();
3476
- if (R) {
3477
- var K = Array.from(new Set([].concat(wt(Pe), [R])));
3478
- pe(K), Te(R, !0), B("");
3479
- }
3480
- return;
3481
- }
3482
- E.source !== "blur" && (r === "combobox" && pe(w), g == null || g(w));
3483
- }, Se = function(w) {
3484
- var E = w;
3485
- r !== "tags" && (E = w.map(function(K) {
3486
- var de = X.get(K);
3487
- return de == null ? void 0 : de.value;
3488
- }).filter(function(K) {
3489
- return K !== void 0;
3490
- }));
3491
- var R = Array.from(new Set([].concat(wt(Pe), wt(E))));
3492
- pe(R), R.forEach(function(K) {
3493
- Te(K, !0);
3494
- });
3495
- }, je = o.useMemo(function() {
3496
- var N = te !== !1 && p !== !1;
3497
- return F(F({}, x), {}, {
3498
- flattenOptions: Re,
3499
- onActiveValue: Ve,
3500
- defaultActiveFirstOption: et,
3501
- onSelect: tt,
3502
- menuItemSelectedIcon: U,
3503
- rawValues: Pe,
3504
- fieldNames: ye,
3505
- virtual: N,
3506
- direction: ne,
3507
- listHeight: ce,
3508
- listItemHeight: ie,
3509
- childrenAsData: se,
3510
- maxCount: P,
3511
- optionRender: S
3512
- });
3513
- }, [P, x, Re, Ve, et, tt, U, Pe, ye, te, p, ne, ce, ie, se, S]);
3514
- return process.env.NODE_ENV !== "production" && (Zi(e), Yi(M, ye)), /* @__PURE__ */ o.createElement(Jn.Provider, {
3515
- value: je
3516
- }, /* @__PURE__ */ o.createElement(lo, Je({}, z, {
3517
- // >>> MISC
3518
- id: le,
3519
- prefixCls: i,
3520
- ref: t,
3521
- omitDomProps: Ji,
3522
- mode: r,
3523
- displayValues: ze,
3524
- onDisplayValuesChange: Ke,
3525
- direction: ne,
3526
- searchValue: De,
3527
- onSearch: Y,
3528
- autoClearSearchValue: h,
3529
- onSearchSplit: Se,
3530
- dropdownMatchSelectWidth: p,
3531
- OptionList: fo,
3532
- emptyOptions: !Re.length,
3533
- activeValue: Ye,
3534
- activeDescendantId: "".concat(le, "_list_").concat(pt)
3535
- })));
3536
- });
3537
- process.env.NODE_ENV !== "production" && (vo.displayName = "Select");
3538
- var nr = vo;
3539
- nr.Option = er;
3540
- nr.OptGroup = kn;
3541
- const el = (e) => {
3542
- const {
3543
- componentName: t
3544
- } = e, {
3545
- getPrefixCls: n
3546
- } = Zo(qn), r = n("empty");
3547
- switch (t) {
3548
- case "Table":
3549
- case "List":
3550
- return /* @__PURE__ */ qt.createElement(gn, {
3551
- image: gn.PRESENTED_IMAGE_SIMPLE
3552
- });
3553
- case "Select":
3554
- case "TreeSelect":
3555
- case "Cascader":
3556
- case "Transfer":
3557
- case "Mentions":
3558
- return /* @__PURE__ */ qt.createElement(gn, {
3559
- image: gn.PRESENTED_IMAGE_SIMPLE,
3560
- className: `${r}-small`
3561
- });
3562
- /**
3563
- * This type of component should satisfy the nullish coalescing operator(??) on the left-hand side.
3564
- * to let the component itself implement the logic.
3565
- * For example `Table.filter`.
3566
- */
3567
- case "Table.filter":
3568
- return null;
3569
- default:
3570
- return /* @__PURE__ */ qt.createElement(gn, null);
3571
- }
3572
- }, tl = (e) => {
3573
- const n = {
3574
- overflow: {
3575
- adjustX: !0,
3576
- adjustY: !0,
3577
- shiftY: !0
3578
- },
3579
- htmlRegion: e === "scroll" ? "scroll" : "visible",
3580
- dynamicInset: !0
3581
- };
3582
- return {
3583
- bottomLeft: Object.assign(Object.assign({}, n), {
3584
- points: ["tl", "bl"],
3585
- offset: [0, 4]
3586
- }),
3587
- bottomRight: Object.assign(Object.assign({}, n), {
3588
- points: ["tr", "br"],
3589
- offset: [0, 4]
3590
- }),
3591
- topLeft: Object.assign(Object.assign({}, n), {
3592
- points: ["bl", "tl"],
3593
- offset: [0, -4]
3594
- }),
3595
- topRight: Object.assign(Object.assign({}, n), {
3596
- points: ["br", "tr"],
3597
- offset: [0, -4]
3598
- })
3599
- };
3600
- };
3601
- function nl(e, t) {
3602
- return e || tl(t);
3603
- }
3604
- const Pr = (e) => {
3605
- const {
3606
- optionHeight: t,
3607
- optionFontSize: n,
3608
- optionLineHeight: r,
3609
- optionPadding: a
3610
- } = e;
3611
- return {
3612
- position: "relative",
3613
- display: "block",
3614
- minHeight: t,
3615
- padding: a,
3616
- color: e.colorText,
3617
- fontWeight: "normal",
3618
- fontSize: n,
3619
- lineHeight: r,
3620
- boxSizing: "border-box"
3621
- };
3622
- }, rl = (e) => {
3623
- const {
3624
- antCls: t,
3625
- componentCls: n
3626
- } = e, r = `${n}-item`, a = `&${t}-slide-up-enter${t}-slide-up-enter-active`, i = `&${t}-slide-up-appear${t}-slide-up-appear-active`, l = `&${t}-slide-up-leave${t}-slide-up-leave-active`, s = `${n}-dropdown-placement-`, c = `${r}-option-selected`;
3627
- return [
3628
- {
3629
- [`${n}-dropdown`]: Object.assign(Object.assign({}, Xn(e)), {
3630
- position: "absolute",
3631
- top: -9999,
3632
- zIndex: e.zIndexPopup,
3633
- boxSizing: "border-box",
3634
- padding: e.paddingXXS,
3635
- overflow: "hidden",
3636
- fontSize: e.fontSize,
3637
- // Fix select render lag of long text in chrome
3638
- // https://github.com/ant-design/ant-design/issues/11456
3639
- // https://github.com/ant-design/ant-design/issues/11843
3640
- fontVariant: "initial",
3641
- backgroundColor: e.colorBgElevated,
3642
- borderRadius: e.borderRadiusLG,
3643
- outline: "none",
3644
- boxShadow: e.boxShadowSecondary,
3645
- [`
3646
- ${a}${s}bottomLeft,
3647
- ${i}${s}bottomLeft
3648
- `]: {
3649
- animationName: Kr
3650
- },
3651
- [`
3652
- ${a}${s}topLeft,
3653
- ${i}${s}topLeft,
3654
- ${a}${s}topRight,
3655
- ${i}${s}topRight
3656
- `]: {
3657
- animationName: Gr
3658
- },
3659
- [`${l}${s}bottomLeft`]: {
3660
- animationName: Ur
3661
- },
3662
- [`
3663
- ${l}${s}topLeft,
3664
- ${l}${s}topRight
3665
- `]: {
3666
- animationName: qr
3667
- },
3668
- "&-hidden": {
3669
- display: "none"
3670
- },
3671
- [r]: Object.assign(Object.assign({}, Pr(e)), {
3672
- cursor: "pointer",
3673
- transition: `background ${e.motionDurationSlow} ease`,
3674
- borderRadius: e.borderRadiusSM,
3675
- // =========== Group ============
3676
- "&-group": {
3677
- color: e.colorTextDescription,
3678
- fontSize: e.fontSizeSM,
3679
- cursor: "default"
3680
- },
3681
- // =========== Option ===========
3682
- "&-option": {
3683
- display: "flex",
3684
- "&-content": Object.assign({
3685
- flex: "auto"
3686
- }, Hn),
3687
- "&-state": {
3688
- flex: "none",
3689
- display: "flex",
3690
- alignItems: "center"
3691
- },
3692
- [`&-active:not(${r}-option-disabled)`]: {
3693
- backgroundColor: e.optionActiveBg
3694
- },
3695
- [`&-selected:not(${r}-option-disabled)`]: {
3696
- color: e.optionSelectedColor,
3697
- fontWeight: e.optionSelectedFontWeight,
3698
- backgroundColor: e.optionSelectedBg,
3699
- [`${r}-option-state`]: {
3700
- color: e.colorPrimary
3701
- }
3702
- },
3703
- "&-disabled": {
3704
- [`&${r}-option-selected`]: {
3705
- backgroundColor: e.colorBgContainerDisabled
3706
- },
3707
- color: e.colorTextDisabled,
3708
- cursor: "not-allowed"
3709
- },
3710
- "&-grouped": {
3711
- paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
3712
- }
3713
- },
3714
- "&-empty": Object.assign(Object.assign({}, Pr(e)), {
3715
- color: e.colorTextDisabled
3716
- })
3717
- }),
3718
- // https://github.com/ant-design/ant-design/pull/46646
3719
- [`${c}:has(+ ${c})`]: {
3720
- borderEndStartRadius: 0,
3721
- borderEndEndRadius: 0,
3722
- [`& + ${c}`]: {
3723
- borderStartStartRadius: 0,
3724
- borderStartEndRadius: 0
3725
- }
3726
- },
3727
- // =========================== RTL ===========================
3728
- "&-rtl": {
3729
- direction: "rtl"
3730
- }
3731
- })
3732
- },
3733
- // Follow code may reuse in other components
3734
- ur(e, "slide-up"),
3735
- ur(e, "slide-down"),
3736
- sr(e, "move-up"),
3737
- sr(e, "move-down")
3738
- ];
3739
- }, ol = (e) => {
3740
- const {
3741
- multipleSelectItemHeight: t,
3742
- paddingXXS: n,
3743
- lineWidth: r,
3744
- INTERNAL_FIXED_ITEM_MARGIN: a
3745
- } = e, i = e.max(e.calc(n).sub(r).equal(), 0), l = e.max(e.calc(i).sub(a).equal(), 0);
3746
- return {
3747
- basePadding: i,
3748
- containerPadding: l,
3749
- itemHeight: rt(t),
3750
- itemLineHeight: rt(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())
3751
- };
3752
- }, al = (e) => {
3753
- const {
3754
- multipleSelectItemHeight: t,
3755
- selectHeight: n,
3756
- lineWidth: r
3757
- } = e;
3758
- return e.calc(n).sub(t).div(2).sub(r).equal();
3759
- }, il = (e) => {
3760
- const {
3761
- componentCls: t,
3762
- iconCls: n,
3763
- borderRadiusSM: r,
3764
- motionDurationSlow: a,
3765
- paddingXS: i,
3766
- multipleItemColorDisabled: l,
3767
- multipleItemBorderColorDisabled: s,
3768
- colorIcon: c,
3769
- colorIconHover: d,
3770
- INTERNAL_FIXED_ITEM_MARGIN: g
3771
- } = e;
3772
- return {
3773
- /**
3774
- * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
3775
- * may update to redesign with its align logic.
3776
- */
3777
- // =========================== Overflow ===========================
3778
- [`${t}-selection-overflow`]: {
3779
- position: "relative",
3780
- display: "flex",
3781
- flex: "auto",
3782
- flexWrap: "wrap",
3783
- maxWidth: "100%",
3784
- "&-item": {
3785
- flex: "none",
3786
- alignSelf: "center",
3787
- // https://github.com/ant-design/ant-design/issues/54179
3788
- maxWidth: "calc(100% - 4px)",
3789
- display: "inline-flex"
3790
- },
3791
- // ======================== Selections ==========================
3792
- [`${t}-selection-item`]: {
3793
- display: "flex",
3794
- alignSelf: "center",
3795
- flex: "none",
3796
- boxSizing: "border-box",
3797
- maxWidth: "100%",
3798
- marginBlock: g,
3799
- borderRadius: r,
3800
- cursor: "default",
3801
- transition: `font-size ${a}, line-height ${a}, height ${a}`,
3802
- marginInlineEnd: e.calc(g).mul(2).equal(),
3803
- paddingInlineStart: i,
3804
- paddingInlineEnd: e.calc(i).div(2).equal(),
3805
- [`${t}-disabled&`]: {
3806
- color: l,
3807
- borderColor: s,
3808
- cursor: "not-allowed"
3809
- },
3810
- // It's ok not to do this, but 24px makes bottom narrow in view should adjust
3811
- "&-content": {
3812
- display: "inline-block",
3813
- marginInlineEnd: e.calc(i).div(2).equal(),
3814
- overflow: "hidden",
3815
- whiteSpace: "pre",
3816
- // fix whitespace wrapping. custom tags display all whitespace within.
3817
- textOverflow: "ellipsis"
3818
- },
3819
- "&-remove": Object.assign(Object.assign({}, Wr()), {
3820
- display: "inline-flex",
3821
- alignItems: "center",
3822
- color: c,
3823
- fontWeight: "bold",
3824
- fontSize: 10,
3825
- lineHeight: "inherit",
3826
- cursor: "pointer",
3827
- [`> ${n}`]: {
3828
- verticalAlign: "-0.2em"
3829
- },
3830
- "&:hover": {
3831
- color: d
3832
- }
3833
- })
3834
- }
3835
- }
3836
- };
3837
- }, ll = (e, t) => {
3838
- const {
3839
- componentCls: n,
3840
- INTERNAL_FIXED_ITEM_MARGIN: r
3841
- } = e, a = `${n}-selection-overflow`, i = e.multipleSelectItemHeight, l = al(e), s = t ? `${n}-${t}` : "", c = ol(e);
3842
- return {
3843
- [`${n}-multiple${s}`]: Object.assign(Object.assign({}, il(e)), {
3844
- // ========================= Selector =========================
3845
- [`${n}-selector`]: {
3846
- display: "flex",
3847
- alignItems: "center",
3848
- width: "100%",
3849
- height: "100%",
3850
- // Multiple is little different that horizontal is follow the vertical
3851
- paddingInline: c.basePadding,
3852
- paddingBlock: c.containerPadding,
3853
- borderRadius: e.borderRadius,
3854
- [`${n}-disabled&`]: {
3855
- background: e.multipleSelectorBgDisabled,
3856
- cursor: "not-allowed"
3857
- },
3858
- "&:after": {
3859
- display: "inline-block",
3860
- width: 0,
3861
- margin: `${rt(r)} 0`,
3862
- lineHeight: rt(i),
3863
- visibility: "hidden",
3864
- content: '"\\a0"'
3865
- }
3866
- },
3867
- // ======================== Selections ========================
3868
- [`${n}-selection-item`]: {
3869
- height: c.itemHeight,
3870
- lineHeight: rt(c.itemLineHeight)
3871
- },
3872
- // ========================== Wrap ===========================
3873
- [`${n}-selection-wrap`]: {
3874
- alignSelf: "flex-start",
3875
- "&:after": {
3876
- lineHeight: rt(i),
3877
- marginBlock: r
3878
- }
3879
- },
3880
- // ========================== Input ==========================
3881
- [`${n}-prefix`]: {
3882
- marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal()
3883
- },
3884
- [`${a}-item + ${a}-item,
3885
- ${n}-prefix + ${n}-selection-wrap
3886
- `]: {
3887
- [`${n}-selection-search`]: {
3888
- marginInlineStart: 0
3889
- },
3890
- [`${n}-selection-placeholder`]: {
3891
- insetInlineStart: 0
3892
- }
3893
- },
3894
- // https://github.com/ant-design/ant-design/issues/44754
3895
- // Same as `wrap:after`
3896
- [`${a}-item-suffix`]: {
3897
- minHeight: c.itemHeight,
3898
- marginBlock: r
3899
- },
3900
- [`${n}-selection-search`]: {
3901
- display: "inline-flex",
3902
- position: "relative",
3903
- maxWidth: "100%",
3904
- marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),
3905
- "\n &-input,\n &-mirror\n ": {
3906
- height: i,
3907
- fontFamily: e.fontFamily,
3908
- lineHeight: rt(i),
3909
- transition: `all ${e.motionDurationSlow}`
3910
- },
3911
- "&-input": {
3912
- width: "100%",
3913
- minWidth: 4.1
3914
- // fix search cursor missing
3915
- },
3916
- "&-mirror": {
3917
- position: "absolute",
3918
- top: 0,
3919
- insetInlineStart: 0,
3920
- insetInlineEnd: "auto",
3921
- zIndex: 999,
3922
- whiteSpace: "pre",
3923
- // fix whitespace wrapping caused width calculation bug
3924
- visibility: "hidden"
3925
- }
3926
- },
3927
- // ======================= Placeholder =======================
3928
- [`${n}-selection-placeholder`]: {
3929
- position: "absolute",
3930
- top: "50%",
3931
- insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(c.basePadding).equal(),
3932
- insetInlineEnd: e.inputPaddingHorizontalBase,
3933
- transform: "translateY(-50%)",
3934
- transition: `all ${e.motionDurationSlow}`
3935
- }
3936
- })
3937
- };
3938
- };
3939
- function _n(e, t) {
3940
- const {
3941
- componentCls: n
3942
- } = e, r = t ? `${n}-${t}` : "", a = {
3943
- [`${n}-multiple${r}`]: {
3944
- fontSize: e.fontSize,
3945
- // ========================= Selector =========================
3946
- [`${n}-selector`]: {
3947
- [`${n}-show-search&`]: {
3948
- cursor: "text"
3949
- }
3950
- },
3951
- [`
3952
- &${n}-show-arrow ${n}-selector,
3953
- &${n}-allow-clear ${n}-selector
3954
- `]: {
3955
- paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
3956
- }
3957
- }
3958
- };
3959
- return [ll(e, t), a];
3960
- }
3961
- const sl = (e) => {
3962
- const {
3963
- componentCls: t
3964
- } = e, n = pn(e, {
3965
- selectHeight: e.controlHeightSM,
3966
- multipleSelectItemHeight: e.multipleItemHeightSM,
3967
- borderRadius: e.borderRadiusSM,
3968
- borderRadiusSM: e.borderRadiusXS
3969
- }), r = pn(e, {
3970
- fontSize: e.fontSizeLG,
3971
- selectHeight: e.controlHeightLG,
3972
- multipleSelectItemHeight: e.multipleItemHeightLG,
3973
- borderRadius: e.borderRadiusLG,
3974
- borderRadiusSM: e.borderRadius
3975
- });
3976
- return [
3977
- _n(e),
3978
- // ======================== Small ========================
3979
- _n(n, "sm"),
3980
- // Padding
3981
- {
3982
- [`${t}-multiple${t}-sm`]: {
3983
- [`${t}-selection-placeholder`]: {
3984
- insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
3985
- },
3986
- // https://github.com/ant-design/ant-design/issues/29559
3987
- [`${t}-selection-search`]: {
3988
- marginInlineStart: 2
3989
- // Magic Number
3990
- }
3991
- }
3992
- },
3993
- // ======================== Large ========================
3994
- _n(r, "lg")
3995
- ];
3996
- };
3997
- function Ln(e, t) {
3998
- const {
3999
- componentCls: n,
4000
- inputPaddingHorizontalBase: r,
4001
- borderRadius: a
4002
- } = e, i = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), l = t ? `${n}-${t}` : "";
4003
- return {
4004
- [`${n}-single${l}`]: {
4005
- fontSize: e.fontSize,
4006
- height: e.controlHeight,
4007
- // ========================= Selector =========================
4008
- [`${n}-selector`]: Object.assign(Object.assign({}, Xn(e, !0)), {
4009
- display: "flex",
4010
- borderRadius: a,
4011
- flex: "1 1 auto",
4012
- [`${n}-selection-wrap:after`]: {
4013
- lineHeight: rt(i)
4014
- },
4015
- [`${n}-selection-search`]: {
4016
- position: "absolute",
4017
- inset: 0,
4018
- width: "100%",
4019
- "&-input": {
4020
- width: "100%",
4021
- WebkitAppearance: "textfield"
4022
- }
4023
- },
4024
- [`
4025
- ${n}-selection-item,
4026
- ${n}-selection-placeholder
4027
- `]: {
4028
- display: "block",
4029
- padding: 0,
4030
- lineHeight: rt(i),
4031
- transition: `all ${e.motionDurationSlow}, visibility 0s`,
4032
- alignSelf: "center"
4033
- },
4034
- [`${n}-selection-placeholder`]: {
4035
- transition: "none",
4036
- pointerEvents: "none"
4037
- },
4038
- // For common baseline align
4039
- [[
4040
- "&:after",
4041
- /* For '' value baseline align */
4042
- `${n}-selection-item:empty:after`,
4043
- /* For undefined value baseline align */
4044
- `${n}-selection-placeholder:empty:after`
4045
- ].join(",")]: {
4046
- display: "inline-block",
4047
- width: 0,
4048
- visibility: "hidden",
4049
- content: '"\\a0"'
4050
- }
4051
- }),
4052
- [`
4053
- &${n}-show-arrow ${n}-selection-item,
4054
- &${n}-show-arrow ${n}-selection-search,
4055
- &${n}-show-arrow ${n}-selection-placeholder
4056
- `]: {
4057
- paddingInlineEnd: e.showArrowPaddingInlineEnd
4058
- },
4059
- // Opacity selection if open
4060
- [`&${n}-open ${n}-selection-item`]: {
4061
- color: e.colorTextPlaceholder
4062
- },
4063
- // ========================== Input ==========================
4064
- // We only change the style of non-customize input which is only support by `combobox` mode.
4065
- // Not customize
4066
- [`&:not(${n}-customize-input)`]: {
4067
- [`${n}-selector`]: {
4068
- width: "100%",
4069
- height: "100%",
4070
- alignItems: "center",
4071
- padding: `0 ${rt(r)}`,
4072
- [`${n}-selection-search-input`]: {
4073
- height: i,
4074
- fontSize: e.fontSize
4075
- },
4076
- "&:after": {
4077
- lineHeight: rt(i)
4078
- }
4079
- }
4080
- },
4081
- [`&${n}-customize-input`]: {
4082
- [`${n}-selector`]: {
4083
- "&:after": {
4084
- display: "none"
4085
- },
4086
- [`${n}-selection-search`]: {
4087
- position: "static",
4088
- width: "100%"
4089
- },
4090
- [`${n}-selection-placeholder`]: {
4091
- position: "absolute",
4092
- insetInlineStart: 0,
4093
- insetInlineEnd: 0,
4094
- padding: `0 ${rt(r)}`,
4095
- "&:after": {
4096
- display: "none"
4097
- }
4098
- }
4099
- }
4100
- }
4101
- }
4102
- };
4103
- }
4104
- function ul(e) {
4105
- const {
4106
- componentCls: t
4107
- } = e, n = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
4108
- return [
4109
- Ln(e),
4110
- // ======================== Small ========================
4111
- // Shared
4112
- Ln(pn(e, {
4113
- controlHeight: e.controlHeightSM,
4114
- borderRadius: e.borderRadiusSM
4115
- }), "sm"),
4116
- // padding
4117
- {
4118
- [`${t}-single${t}-sm`]: {
4119
- [`&:not(${t}-customize-input)`]: {
4120
- [`${t}-selector`]: {
4121
- padding: `0 ${rt(n)}`
4122
- },
4123
- // With arrow should provides `padding-right` to show the arrow
4124
- [`&${t}-show-arrow ${t}-selection-search`]: {
4125
- insetInlineEnd: e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()
4126
- },
4127
- [`
4128
- &${t}-show-arrow ${t}-selection-item,
4129
- &${t}-show-arrow ${t}-selection-placeholder
4130
- `]: {
4131
- paddingInlineEnd: e.calc(e.fontSize).mul(1.5).equal()
4132
- }
4133
- }
4134
- }
4135
- },
4136
- // ======================== Large ========================
4137
- // Shared
4138
- Ln(pn(e, {
4139
- controlHeight: e.singleItemHeightLG,
4140
- fontSize: e.fontSizeLG,
4141
- borderRadius: e.borderRadiusLG
4142
- }), "lg")
4143
- ];
4144
- }
4145
- const cl = (e) => {
4146
- const {
4147
- fontSize: t,
4148
- lineHeight: n,
4149
- lineWidth: r,
4150
- controlHeight: a,
4151
- controlHeightSM: i,
4152
- controlHeightLG: l,
4153
- paddingXXS: s,
4154
- controlPaddingHorizontal: c,
4155
- zIndexPopupBase: d,
4156
- colorText: g,
4157
- fontWeightStrong: f,
4158
- controlItemBgActive: h,
4159
- controlItemBgHover: u,
4160
- colorBgContainer: v,
4161
- colorFillSecondary: m,
4162
- colorBgContainerDisabled: p,
4163
- colorTextDisabled: y,
4164
- colorPrimaryHover: b,
4165
- colorPrimary: C,
4166
- controlOutline: I
4167
- } = e, O = s * 2, S = r * 2, $ = Math.min(a - O, a - S), W = Math.min(i - O, i - S), U = Math.min(l - O, l - S);
4168
- return {
4169
- INTERNAL_FIXED_ITEM_MARGIN: Math.floor(s / 2),
4170
- zIndexPopup: d + 50,
4171
- optionSelectedColor: g,
4172
- optionSelectedFontWeight: f,
4173
- optionSelectedBg: h,
4174
- optionActiveBg: u,
4175
- optionPadding: `${(a - t * n) / 2}px ${c}px`,
4176
- optionFontSize: t,
4177
- optionLineHeight: n,
4178
- optionHeight: a,
4179
- selectorBg: v,
4180
- clearBg: v,
4181
- singleItemHeightLG: l,
4182
- multipleItemBg: m,
4183
- multipleItemBorderColor: "transparent",
4184
- multipleItemHeight: $,
4185
- multipleItemHeightSM: W,
4186
- multipleItemHeightLG: U,
4187
- multipleSelectorBgDisabled: p,
4188
- multipleItemColorDisabled: y,
4189
- multipleItemBorderColorDisabled: "transparent",
4190
- showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
4191
- hoverBorderColor: b,
4192
- activeBorderColor: C,
4193
- activeOutlineColor: I,
4194
- selectAffixPadding: s
4195
- };
4196
- }, mo = (e, t) => {
4197
- const {
4198
- componentCls: n,
4199
- antCls: r,
4200
- controlOutlineWidth: a
4201
- } = e;
4202
- return {
4203
- [`&:not(${n}-customize-input) ${n}-selector`]: {
4204
- border: `${rt(e.lineWidth)} ${e.lineType} ${t.borderColor}`,
4205
- background: e.selectorBg
4206
- },
4207
- [`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]: {
4208
- [`&:hover ${n}-selector`]: {
4209
- borderColor: t.hoverBorderHover
4210
- },
4211
- [`${n}-focused& ${n}-selector`]: {
4212
- borderColor: t.activeBorderColor,
4213
- boxShadow: `0 0 0 ${rt(a)} ${t.activeOutlineColor}`,
4214
- outline: 0
4215
- },
4216
- [`${n}-prefix`]: {
4217
- color: t.color
4218
- }
4219
- }
4220
- };
4221
- }, Nr = (e, t) => ({
4222
- [`&${e.componentCls}-status-${t.status}`]: Object.assign({}, mo(e, t))
4223
- }), dl = (e) => ({
4224
- "&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, mo(e, {
4225
- borderColor: e.colorBorder,
4226
- hoverBorderHover: e.hoverBorderColor,
4227
- activeBorderColor: e.activeBorderColor,
4228
- activeOutlineColor: e.activeOutlineColor,
4229
- color: e.colorText
4230
- })), Nr(e, {
4231
- status: "error",
4232
- borderColor: e.colorError,
4233
- hoverBorderHover: e.colorErrorHover,
4234
- activeBorderColor: e.colorError,
4235
- activeOutlineColor: e.colorErrorOutline,
4236
- color: e.colorError
4237
- })), Nr(e, {
4238
- status: "warning",
4239
- borderColor: e.colorWarning,
4240
- hoverBorderHover: e.colorWarningHover,
4241
- activeBorderColor: e.colorWarning,
4242
- activeOutlineColor: e.colorWarningOutline,
4243
- color: e.colorWarning
4244
- })), {
4245
- [`&${e.componentCls}-disabled`]: {
4246
- [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
4247
- background: e.colorBgContainerDisabled,
4248
- color: e.colorTextDisabled
4249
- }
4250
- },
4251
- [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
4252
- background: e.multipleItemBg,
4253
- border: `${rt(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
4254
- }
4255
- })
4256
- }), go = (e, t) => {
4257
- const {
4258
- componentCls: n,
4259
- antCls: r
4260
- } = e;
4261
- return {
4262
- [`&:not(${n}-customize-input) ${n}-selector`]: {
4263
- background: t.bg,
4264
- border: `${rt(e.lineWidth)} ${e.lineType} transparent`,
4265
- color: t.color
4266
- },
4267
- [`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]: {
4268
- [`&:hover ${n}-selector`]: {
4269
- background: t.hoverBg
4270
- },
4271
- [`${n}-focused& ${n}-selector`]: {
4272
- background: e.selectorBg,
4273
- borderColor: t.activeBorderColor,
4274
- outline: 0
4275
- }
4276
- }
4277
- };
4278
- }, Tr = (e, t) => ({
4279
- [`&${e.componentCls}-status-${t.status}`]: Object.assign({}, go(e, t))
4280
- }), fl = (e) => ({
4281
- "&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, go(e, {
4282
- bg: e.colorFillTertiary,
4283
- hoverBg: e.colorFillSecondary,
4284
- activeBorderColor: e.activeBorderColor,
4285
- color: e.colorText
4286
- })), Tr(e, {
4287
- status: "error",
4288
- bg: e.colorErrorBg,
4289
- hoverBg: e.colorErrorBgHover,
4290
- activeBorderColor: e.colorError,
4291
- color: e.colorError
4292
- })), Tr(e, {
4293
- status: "warning",
4294
- bg: e.colorWarningBg,
4295
- hoverBg: e.colorWarningBgHover,
4296
- activeBorderColor: e.colorWarning,
4297
- color: e.colorWarning
4298
- })), {
4299
- [`&${e.componentCls}-disabled`]: {
4300
- [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
4301
- borderColor: e.colorBorder,
4302
- background: e.colorBgContainerDisabled,
4303
- color: e.colorTextDisabled
4304
- }
4305
- },
4306
- [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
4307
- background: e.colorBgContainer,
4308
- border: `${rt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
4309
- }
4310
- })
4311
- }), vl = (e) => ({
4312
- "&-borderless": {
4313
- [`${e.componentCls}-selector`]: {
4314
- background: "transparent",
4315
- border: `${rt(e.lineWidth)} ${e.lineType} transparent`
4316
- },
4317
- [`&${e.componentCls}-disabled`]: {
4318
- [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
4319
- color: e.colorTextDisabled
4320
- }
4321
- },
4322
- [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
4323
- background: e.multipleItemBg,
4324
- border: `${rt(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
4325
- },
4326
- // Status
4327
- [`&${e.componentCls}-status-error`]: {
4328
- [`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
4329
- color: e.colorError
4330
- }
4331
- },
4332
- [`&${e.componentCls}-status-warning`]: {
4333
- [`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
4334
- color: e.colorWarning
4335
- }
4336
- }
4337
- }
4338
- }), ho = (e, t) => {
4339
- const {
4340
- componentCls: n,
4341
- antCls: r
4342
- } = e;
4343
- return {
4344
- [`&:not(${n}-customize-input) ${n}-selector`]: {
4345
- borderWidth: `${rt(e.lineWidth)} 0`,
4346
- borderStyle: `${e.lineType} none`,
4347
- borderColor: `transparent transparent ${t.borderColor} transparent`,
4348
- background: e.selectorBg,
4349
- borderRadius: 0
4350
- },
4351
- [`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]: {
4352
- [`&:hover ${n}-selector`]: {
4353
- borderColor: `transparent transparent ${t.hoverBorderHover} transparent`
4354
- },
4355
- [`${n}-focused& ${n}-selector`]: {
4356
- borderColor: `transparent transparent ${t.activeBorderColor} transparent`,
4357
- outline: 0
4358
- },
4359
- [`${n}-prefix`]: {
4360
- color: t.color
4361
- }
4362
- }
4363
- };
4364
- }, zr = (e, t) => ({
4365
- [`&${e.componentCls}-status-${t.status}`]: Object.assign({}, ho(e, t))
4366
- }), ml = (e) => ({
4367
- "&-underlined": Object.assign(Object.assign(Object.assign(Object.assign({}, ho(e, {
4368
- borderColor: e.colorBorder,
4369
- hoverBorderHover: e.hoverBorderColor,
4370
- activeBorderColor: e.activeBorderColor,
4371
- activeOutlineColor: e.activeOutlineColor,
4372
- color: e.colorText
4373
- })), zr(e, {
4374
- status: "error",
4375
- borderColor: e.colorError,
4376
- hoverBorderHover: e.colorErrorHover,
4377
- activeBorderColor: e.colorError,
4378
- activeOutlineColor: e.colorErrorOutline,
4379
- color: e.colorError
4380
- })), zr(e, {
4381
- status: "warning",
4382
- borderColor: e.colorWarning,
4383
- hoverBorderHover: e.colorWarningHover,
4384
- activeBorderColor: e.colorWarning,
4385
- activeOutlineColor: e.colorWarningOutline,
4386
- color: e.colorWarning
4387
- })), {
4388
- [`&${e.componentCls}-disabled`]: {
4389
- [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
4390
- color: e.colorTextDisabled
4391
- }
4392
- },
4393
- [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
4394
- background: e.multipleItemBg,
4395
- border: `${rt(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
4396
- }
4397
- })
4398
- }), gl = (e) => ({
4399
- [e.componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, dl(e)), fl(e)), vl(e)), ml(e))
4400
- }), hl = (e) => {
4401
- const {
4402
- componentCls: t
4403
- } = e;
4404
- return {
4405
- position: "relative",
4406
- transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
4407
- input: {
4408
- cursor: "pointer"
4409
- },
4410
- [`${t}-show-search&`]: {
4411
- cursor: "text",
4412
- input: {
4413
- cursor: "auto",
4414
- color: "inherit",
4415
- height: "100%"
4416
- }
4417
- },
4418
- [`${t}-disabled&`]: {
4419
- cursor: "not-allowed",
4420
- input: {
4421
- cursor: "not-allowed"
4422
- }
4423
- }
4424
- };
4425
- }, pl = (e) => {
4426
- const {
4427
- componentCls: t
4428
- } = e;
4429
- return {
4430
- [`${t}-selection-search-input`]: {
4431
- margin: 0,
4432
- padding: 0,
4433
- background: "transparent",
4434
- border: "none",
4435
- outline: "none",
4436
- appearance: "none",
4437
- fontFamily: "inherit",
4438
- "&::-webkit-search-cancel-button": {
4439
- display: "none",
4440
- appearance: "none"
4441
- }
4442
- }
4443
- };
4444
- }, bl = (e) => {
4445
- const {
4446
- antCls: t,
4447
- componentCls: n,
4448
- inputPaddingHorizontalBase: r,
4449
- iconCls: a
4450
- } = e, i = {
4451
- [`${n}-clear`]: {
4452
- opacity: 1,
4453
- background: e.colorBgBase,
4454
- borderRadius: "50%"
4455
- }
4456
- };
4457
- return {
4458
- [n]: Object.assign(Object.assign({}, Xn(e)), {
4459
- position: "relative",
4460
- display: "inline-flex",
4461
- cursor: "pointer",
4462
- [`&:not(${n}-customize-input) ${n}-selector`]: Object.assign(Object.assign({}, hl(e)), pl(e)),
4463
- // ======================== Selection ========================
4464
- [`${n}-selection-item`]: Object.assign(Object.assign({
4465
- flex: 1,
4466
- fontWeight: "normal",
4467
- position: "relative",
4468
- userSelect: "none"
4469
- }, Hn), {
4470
- // https://github.com/ant-design/ant-design/issues/40421
4471
- [`> ${t}-typography`]: {
4472
- display: "inline"
4473
- }
4474
- }),
4475
- // ======================= Placeholder =======================
4476
- [`${n}-selection-placeholder`]: Object.assign(Object.assign({}, Hn), {
4477
- flex: 1,
4478
- color: e.colorTextPlaceholder,
4479
- pointerEvents: "none"
4480
- }),
4481
- // ========================== Arrow ==========================
4482
- [`${n}-arrow`]: Object.assign(Object.assign({}, Wr()), {
4483
- position: "absolute",
4484
- top: "50%",
4485
- insetInlineStart: "auto",
4486
- insetInlineEnd: r,
4487
- height: e.fontSizeIcon,
4488
- marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
4489
- color: e.colorTextQuaternary,
4490
- fontSize: e.fontSizeIcon,
4491
- lineHeight: 1,
4492
- textAlign: "center",
4493
- pointerEvents: "none",
4494
- display: "flex",
4495
- alignItems: "center",
4496
- transition: `opacity ${e.motionDurationSlow} ease`,
4497
- [a]: {
4498
- verticalAlign: "top",
4499
- transition: `transform ${e.motionDurationSlow}`,
4500
- "> svg": {
4501
- verticalAlign: "top"
4502
- },
4503
- [`&:not(${n}-suffix)`]: {
4504
- pointerEvents: "auto"
4505
- }
4506
- },
4507
- [`${n}-disabled &`]: {
4508
- cursor: "not-allowed"
4509
- },
4510
- "> *:not(:last-child)": {
4511
- marginInlineEnd: 8
4512
- // FIXME: magic
4513
- }
4514
- }),
4515
- // ========================== Wrap ===========================
4516
- [`${n}-selection-wrap`]: {
4517
- display: "flex",
4518
- width: "100%",
4519
- position: "relative",
4520
- minWidth: 0,
4521
- // https://github.com/ant-design/ant-design/issues/51669
4522
- "&:after": {
4523
- content: '"\\a0"',
4524
- width: 0,
4525
- overflow: "hidden"
4526
- }
4527
- },
4528
- // ========================= Prefix ==========================
4529
- [`${n}-prefix`]: {
4530
- flex: "none",
4531
- marginInlineEnd: e.selectAffixPadding
4532
- },
4533
- // ========================== Clear ==========================
4534
- [`${n}-clear`]: {
4535
- position: "absolute",
4536
- top: "50%",
4537
- insetInlineStart: "auto",
4538
- insetInlineEnd: r,
4539
- zIndex: 1,
4540
- display: "inline-block",
4541
- width: e.fontSizeIcon,
4542
- height: e.fontSizeIcon,
4543
- marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
4544
- color: e.colorTextQuaternary,
4545
- fontSize: e.fontSizeIcon,
4546
- fontStyle: "normal",
4547
- lineHeight: 1,
4548
- textAlign: "center",
4549
- textTransform: "none",
4550
- cursor: "pointer",
4551
- opacity: 0,
4552
- transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
4553
- textRendering: "auto",
4554
- // https://github.com/ant-design/ant-design/issues/54205
4555
- // Force GPU compositing on Safari to prevent flickering on opacity/transform transitions
4556
- transform: "translateZ(0)",
4557
- "&:before": {
4558
- display: "block"
4559
- },
4560
- "&:hover": {
4561
- color: e.colorIcon
4562
- }
4563
- },
4564
- "@media(hover:none)": i,
4565
- "&:hover": i
4566
- }),
4567
- // ========================= Feedback ==========================
4568
- [`${n}-status`]: {
4569
- "&-error, &-warning, &-success, &-validating": {
4570
- [`&${n}-has-feedback`]: {
4571
- [`${n}-clear`]: {
4572
- insetInlineEnd: e.calc(r).add(e.fontSize).add(e.paddingXS).equal()
4573
- }
4574
- }
4575
- }
4576
- }
4577
- };
4578
- }, Sl = (e) => {
4579
- const {
4580
- componentCls: t
4581
- } = e;
4582
- return [
4583
- {
4584
- [t]: {
4585
- // ==================== In Form ====================
4586
- [`&${t}-in-form-item`]: {
4587
- width: "100%"
4588
- }
4589
- }
4590
- },
4591
- // =====================================================
4592
- // == LTR ==
4593
- // =====================================================
4594
- // Base
4595
- bl(e),
4596
- // Single
4597
- ul(e),
4598
- // Multiple
4599
- sl(e),
4600
- // Dropdown
4601
- rl(e),
4602
- // =====================================================
4603
- // == RTL ==
4604
- // =====================================================
4605
- {
4606
- [`${t}-rtl`]: {
4607
- direction: "rtl"
4608
- }
4609
- },
4610
- // =====================================================
4611
- // == Space Compact ==
4612
- // =====================================================
4613
- No(e, {
4614
- borderElCls: `${t}-selector`,
4615
- focusElCls: `${t}-focused`
4616
- })
4617
- ];
4618
- }, yl = Po("Select", (e, {
4619
- rootPrefixCls: t
4620
- }) => {
4621
- const n = pn(e, {
4622
- rootPrefixCls: t,
4623
- inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
4624
- multipleSelectItemHeight: e.multipleItemHeight,
4625
- selectHeight: e.controlHeight
4626
- });
4627
- return [Sl(n), gl(n)];
4628
- }, cl, {
4629
- unitless: {
4630
- optionLineHeight: !0,
4631
- optionSelectedFontWeight: !0
4632
- }
4633
- });
4634
- var wl = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, name: "check", theme: "outlined" }, Cl = function(t, n) {
4635
- return /* @__PURE__ */ o.createElement(jr, Je({}, t, {
4636
- ref: n,
4637
- icon: wl
4638
- }));
4639
- }, po = /* @__PURE__ */ o.forwardRef(Cl);
4640
- process.env.NODE_ENV !== "production" && (po.displayName = "CheckOutlined");
4641
- var Il = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, name: "down", theme: "outlined" }, El = function(t, n) {
4642
- return /* @__PURE__ */ o.createElement(jr, Je({}, t, {
4643
- ref: n,
4644
- icon: Il
4645
- }));
4646
- }, bo = /* @__PURE__ */ o.forwardRef(El);
4647
- process.env.NODE_ENV !== "production" && (bo.displayName = "DownOutlined");
4648
- function Rl({
4649
- suffixIcon: e,
4650
- clearIcon: t,
4651
- menuItemSelectedIcon: n,
4652
- removeIcon: r,
4653
- loading: a,
4654
- multiple: i,
4655
- hasFeedback: l,
4656
- prefixCls: s,
4657
- showSuffixIcon: c,
4658
- feedbackIcon: d,
4659
- showArrow: g,
4660
- componentName: f
4661
- }) {
4662
- process.env.NODE_ENV !== "production" && Ar(f).deprecated(!t, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
4663
- const h = t ?? /* @__PURE__ */ o.createElement(To, null), u = (y) => e === null && !l && !g ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, c !== !1 && y, l && d);
4664
- let v = null;
4665
- if (e !== void 0)
4666
- v = u(e);
4667
- else if (a)
4668
- v = u(/* @__PURE__ */ o.createElement(_o, {
4669
- spin: !0
4670
- }));
4671
- else {
4672
- const y = `${s}-suffix`;
4673
- v = ({
4674
- open: b,
4675
- showSearch: C
4676
- }) => u(b && C ? /* @__PURE__ */ o.createElement(Qo, {
4677
- className: y
4678
- }) : /* @__PURE__ */ o.createElement(bo, {
4679
- className: y
4680
- }));
4681
- }
4682
- let m = null;
4683
- n !== void 0 ? m = n : i ? m = /* @__PURE__ */ o.createElement(po, null) : m = null;
4684
- let p = null;
4685
- return r !== void 0 ? p = r : p = /* @__PURE__ */ o.createElement(zo, null), {
4686
- clearIcon: h,
4687
- suffixIcon: v,
4688
- itemIcon: m,
4689
- removeIcon: p
4690
- };
4691
- }
4692
- function xl(e) {
4693
- return qt.useMemo(() => {
4694
- if (e)
4695
- return (...t) => /* @__PURE__ */ qt.createElement(Lo, {
4696
- space: !0
4697
- }, e.apply(void 0, t));
4698
- }, [e]);
4699
- }
4700
- function Ml(e, t) {
4701
- return t !== void 0 ? t : e !== null;
4702
- }
4703
- var Ol = function(e, t) {
4704
- var n = {};
4705
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
4706
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
4707
- t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
4708
- return n;
4709
- };
4710
- const So = "SECRET_COMBOBOX_MODE_DO_NOT_USE", yo = (e, t) => {
4711
- var n, r, a, i, l;
4712
- const {
4713
- prefixCls: s,
4714
- bordered: c,
4715
- className: d,
4716
- rootClassName: g,
4717
- getPopupContainer: f,
4718
- popupClassName: h,
4719
- dropdownClassName: u,
4720
- listHeight: v = 256,
4721
- placement: m,
4722
- listItemHeight: p,
4723
- size: y,
4724
- disabled: b,
4725
- notFoundContent: C,
4726
- status: I,
4727
- builtinPlacements: O,
4728
- dropdownMatchSelectWidth: S,
4729
- popupMatchSelectWidth: $,
4730
- direction: W,
4731
- style: U,
4732
- allowClear: te,
4733
- variant: ne,
4734
- dropdownStyle: Q,
4735
- transitionName: ce,
4736
- tagRender: k,
4737
- maxCount: ie,
4738
- prefix: G,
4739
- dropdownRender: ee,
4740
- popupRender: L,
4741
- onDropdownVisibleChange: oe,
4742
- onOpenChange: A,
4743
- styles: P,
4744
- classNames: z
4745
- } = e, le = Ol(e, ["prefixCls", "bordered", "className", "rootClassName", "getPopupContainer", "popupClassName", "dropdownClassName", "listHeight", "placement", "listItemHeight", "size", "disabled", "notFoundContent", "status", "builtinPlacements", "dropdownMatchSelectWidth", "popupMatchSelectWidth", "direction", "style", "allowClear", "variant", "dropdownStyle", "transitionName", "tagRender", "maxCount", "prefix", "dropdownRender", "popupRender", "onDropdownVisibleChange", "onOpenChange", "styles", "classNames"]), {
4746
- getPopupContainer: Ie,
4747
- getPrefixCls: se,
4748
- renderEmpty: xe,
4749
- direction: ye,
4750
- virtual: Me,
4751
- popupMatchSelectWidth: fe,
4752
- popupOverflow: De
4753
- } = o.useContext(qn), {
4754
- showSearch: B,
4755
- style: x,
4756
- styles: D,
4757
- className: X,
4758
- classNames: M
4759
- } = Bo("select"), [, j] = Vo(), ae = p ?? (j == null ? void 0 : j.controlHeight), Z = se("select", s), J = se(), ge = W ?? ye, {
4760
- compactSize: Ee,
4761
- compactItemClassnames: _e
4762
- } = Ho(Z, ge), [Be, q] = Wo("select", ne, c), Ue = Ao(Z), [ze, Pe, we] = yl(Z, Ue), he = o.useMemo(() => {
4763
- const {
4764
- mode: R
4765
- } = e;
4766
- if (R !== "combobox")
4767
- return R === So ? "combobox" : R;
4768
- }, [e.mode]), Ne = he === "multiple" || he === "tags", Oe = Ml(e.suffixIcon, e.showArrow), Ge = (n = $ ?? S) !== null && n !== void 0 ? n : fe, qe = ((r = P == null ? void 0 : P.popup) === null || r === void 0 ? void 0 : r.root) || ((a = D.popup) === null || a === void 0 ? void 0 : a.root) || Q, Re = xl(L || ee), pe = A || oe, {
4769
- status: lt,
4770
- hasFeedback: Le,
4771
- isFormItemInput: Ye,
4772
- feedbackIcon: Xe
4773
- } = o.useContext(Fo), Ct = Xo(lt, I);
4774
- let dt;
4775
- C !== void 0 ? dt = C : he === "combobox" ? dt = null : dt = (xe == null ? void 0 : xe("Select")) || /* @__PURE__ */ o.createElement(el, {
4776
- componentName: "Select"
4777
- });
4778
- const {
4779
- suffixIcon: pt,
4780
- itemIcon: bt,
4781
- removeIcon: et,
4782
- clearIcon: Ve
4783
- } = Rl(Object.assign(Object.assign({}, le), {
4784
- multiple: Ne,
4785
- hasFeedback: Le,
4786
- feedbackIcon: Xe,
4787
- showSuffixIcon: Oe,
4788
- prefixCls: Z,
4789
- componentName: "Select"
4790
- })), Te = te === !0 ? {
4791
- clearIcon: Ve
4792
- } : te, tt = Hr(le, ["suffixIcon", "itemIcon"]), Ke = ke(((i = z == null ? void 0 : z.popup) === null || i === void 0 ? void 0 : i.root) || ((l = M == null ? void 0 : M.popup) === null || l === void 0 ? void 0 : l.root) || h || u, {
4793
- [`${Z}-dropdown-${ge}`]: ge === "rtl"
4794
- }, g, M.root, z == null ? void 0 : z.root, we, Ue, Pe), Y = jo((R) => {
4795
- var K;
4796
- return (K = y ?? Ee) !== null && K !== void 0 ? K : R;
4797
- }), Se = o.useContext(Ko), je = b ?? Se, N = ke({
4798
- [`${Z}-lg`]: Y === "large",
4799
- [`${Z}-sm`]: Y === "small",
4800
- [`${Z}-rtl`]: ge === "rtl",
4801
- [`${Z}-${Be}`]: q,
4802
- [`${Z}-in-form-item`]: Ye
4803
- }, Uo(Z, Ct, Le), _e, X, d, M.root, z == null ? void 0 : z.root, g, we, Ue, Pe), w = o.useMemo(() => m !== void 0 ? m : ge === "rtl" ? "bottomRight" : "bottomLeft", [m, ge]);
4804
- if (process.env.NODE_ENV !== "production") {
4805
- const R = Ar("Select");
4806
- Object.entries({
4807
- dropdownMatchSelectWidth: "popupMatchSelectWidth",
4808
- dropdownStyle: "styles.popup.root",
4809
- dropdownClassName: "classNames.popup.root",
4810
- popupClassName: "classNames.popup.root",
4811
- dropdownRender: "popupRender",
4812
- onDropdownVisibleChange: "onOpenChange",
4813
- bordered: "variant"
4814
- }).forEach(([de, ft]) => {
4815
- R.deprecated(!(de in e), de, ft);
4816
- }), process.env.NODE_ENV !== "production" && R(!("showArrow" in e), "deprecated", "`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."), process.env.NODE_ENV !== "production" && R(!(typeof ie < "u" && !Ne), "usage", "`maxCount` only works with mode `multiple` or `tags`");
4817
- }
4818
- const [E] = Go("SelectLike", qe == null ? void 0 : qe.zIndex);
4819
- return ze(/* @__PURE__ */ o.createElement(nr, Object.assign({
4820
- ref: t,
4821
- virtual: Me,
4822
- showSearch: B
4823
- }, tt, {
4824
- style: Object.assign(Object.assign(Object.assign(Object.assign({}, D.root), P == null ? void 0 : P.root), x), U),
4825
- dropdownMatchSelectWidth: Ge,
4826
- transitionName: qo(J, "slide-up", ce),
4827
- builtinPlacements: nl(O, De),
4828
- listHeight: v,
4829
- listItemHeight: ae,
4830
- mode: he,
4831
- prefixCls: Z,
4832
- placement: w,
4833
- direction: ge,
4834
- prefix: G,
4835
- suffixIcon: pt,
4836
- menuItemSelectedIcon: bt,
4837
- removeIcon: et,
4838
- allowClear: Te,
4839
- notFoundContent: dt,
4840
- className: N,
4841
- getPopupContainer: f || Ie,
4842
- dropdownClassName: Ke,
4843
- disabled: je,
4844
- dropdownStyle: Object.assign(Object.assign({}, qe), {
4845
- zIndex: E
4846
- }),
4847
- maxCount: Ne ? ie : void 0,
4848
- tagRender: Ne ? k : void 0,
4849
- dropdownRender: Re,
4850
- onDropdownVisibleChange: pe
4851
- })));
4852
- };
4853
- process.env.NODE_ENV !== "production" && (yo.displayName = "Select");
4854
- const dn = /* @__PURE__ */ o.forwardRef(yo), $l = Ma(dn, "dropdownAlign");
4855
- dn.SECRET_COMBOBOX_MODE_DO_NOT_USE = So;
4856
- dn.Option = er;
4857
- dn.OptGroup = kn;
4858
- dn._InternalPanelDoNotUseOrYouWillBeFired = $l;
4859
- process.env.NODE_ENV !== "production" && (dn.displayName = "Select");
4860
- export {
4861
- lo as B,
4862
- el as D,
4863
- Sn as F,
4864
- co as L,
4865
- po as R,
4866
- dn as S,
4867
- fi as T,
4868
- zl as a,
4869
- bo as b,
4870
- Xr as c,
4871
- ur as d,
4872
- Ur as e,
4873
- Gr as f,
4874
- Kr as g,
4875
- sr as h,
4876
- Zn as i,
4877
- Ma as j,
4878
- il as k,
4879
- ol as l,
4880
- $a as m,
4881
- Ki as n,
4882
- yl as o,
4883
- xl as p,
4884
- Ml as q,
4885
- nl as r,
4886
- qr as s,
4887
- Rl as u,
4888
- xa as w,
4889
- ga as z
4890
- };