@gobolt/genesis 0.0.7 → 0.0.8

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 (258) hide show
  1. package/README.md +8 -2
  2. package/dist/AntdIcon-c395a1c4.js +204 -0
  3. package/dist/CheckOutlined-52d9ac25.js +29 -0
  4. package/dist/{CloseCircleFilled-ZIY-u-27.js → CloseCircleFilled-ddc51e7e.js} +11 -8
  5. package/dist/CloseOutlined-14b8bba1.js +16 -0
  6. package/dist/Compact-c39ed20d.js +179 -0
  7. package/dist/ContextIsolator-b09b2c52.js +20 -0
  8. package/dist/DownOutlined-64a4732a.js +206 -0
  9. package/dist/EllipsisOutlined-60122660.js +1115 -0
  10. package/dist/{ExclamationCircleFilled-BICVVQIg.js → ExclamationCircleFilled-23ef9812.js} +22 -16
  11. package/dist/InfoCircleFilled-c5f90c20.js +16 -0
  12. package/dist/Overflow-a570fa69.js +361 -0
  13. package/dist/RightOutlined-83515eb4.js +16 -0
  14. package/dist/SearchOutlined-a9014e08.js +16 -0
  15. package/dist/{TextArea-3MOYYuAQ.js → TextArea-20825221.js} +597 -582
  16. package/dist/{button-BNV2qdrP.js → button-fa1c119c.js} +287 -280
  17. package/dist/collapse-345bc884.js +20 -0
  18. package/dist/compact-item-b8f85aa6.js +75 -0
  19. package/dist/components/Badge/Badge.d.ts +6 -0
  20. package/dist/components/Badge/Badge.js +102 -0
  21. package/dist/components/Badge/__stories__/Badge.stories.d.ts +13 -0
  22. package/dist/components/Badge/__tests__/Badge.test.js +72 -0
  23. package/dist/components/Badge/icons/ASN.d.ts +2 -0
  24. package/dist/components/Badge/icons/ASN.js +23 -0
  25. package/dist/components/Badge/icons/Appointment.d.ts +2 -0
  26. package/dist/components/Badge/icons/Appointment.js +23 -0
  27. package/dist/components/Badge/icons/Inventory.d.ts +2 -0
  28. package/dist/components/Badge/icons/Inventory.js +23 -0
  29. package/dist/components/Badge/icons/Parcel.d.ts +2 -0
  30. package/dist/components/Badge/icons/Parcel.js +23 -0
  31. package/dist/components/Badge/icons/Product.d.ts +2 -0
  32. package/dist/components/Badge/icons/Product.js +23 -0
  33. package/dist/components/Badge/icons/Route.d.ts +2 -0
  34. package/dist/components/Badge/icons/Route.js +23 -0
  35. package/dist/components/Badge/icons/Shipment.d.ts +2 -0
  36. package/dist/components/Badge/icons/Shipment.js +23 -0
  37. package/dist/components/Badge/icons/ShoppingCart.d.ts +2 -0
  38. package/dist/components/Badge/icons/ShoppingCart.js +23 -0
  39. package/dist/components/Badge/icons/System.d.ts +2 -0
  40. package/dist/components/Badge/icons/System.js +23 -0
  41. package/dist/components/Badge/index.d.ts +2 -0
  42. package/dist/components/Badge/index.js +23 -0
  43. package/dist/components/Badge/styles.d.ts +3 -0
  44. package/dist/components/Badge/styles.js +35 -0
  45. package/dist/components/Breadcrumb/Breadcrumb.d.ts +8 -0
  46. package/dist/components/Breadcrumb/Breadcrumb.js +27 -0
  47. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +8 -0
  48. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  49. package/dist/components/Breadcrumb/__stories__/Breadcrumb.stories.d.ts +10 -0
  50. package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +70 -0
  51. package/dist/components/Breadcrumb/index.d.ts +3 -0
  52. package/dist/components/Breadcrumb/index.js +27 -0
  53. package/dist/components/Breadcrumb/styles.d.ts +23 -0
  54. package/dist/components/Breadcrumb/styles.js +2457 -0
  55. package/dist/components/Button/Button.js +42 -0
  56. package/dist/components/Button/__tests__/Button.test.js +61 -0
  57. package/dist/components/Button/index.js +22 -0
  58. package/dist/components/{atoms/button → Button}/styles.js +30 -19
  59. package/dist/components/{atoms/checkbox → Checkbox}/Checkbox.d.ts +2 -1
  60. package/dist/components/Checkbox/Checkbox.js +70 -0
  61. package/dist/components/Checkbox/__tests__/Checkbox.test.js +64 -0
  62. package/dist/components/Checkbox/index.js +49 -0
  63. package/dist/components/{atoms/checkbox → Checkbox}/styles.d.ts +1 -3
  64. package/dist/components/{atoms/checkbox → Checkbox}/styles.js +165 -157
  65. package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +72 -0
  66. package/dist/components/ErrorBoundaryFallback/index.js +51 -0
  67. package/dist/components/ErrorBoundaryFallback/styles.d.ts +3 -0
  68. package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/styles.js +38 -34
  69. package/dist/components/{molecules/form → Form}/Form.d.ts +2 -4
  70. package/dist/components/Form/Form.js +49 -0
  71. package/dist/components/Form/__stories__/FormStory.js +130 -0
  72. package/dist/components/Form/index.js +48 -0
  73. package/dist/components/{atoms/input → Input}/Input.d.ts +1 -3
  74. package/dist/components/Input/Input.js +42 -0
  75. package/dist/components/{atoms/input → Input}/__stories__/Input.stories.d.ts +5 -1
  76. package/dist/components/Input/__tests__/Input.test.d.ts +1 -0
  77. package/dist/components/Input/__tests__/Input.test.js +69 -0
  78. package/dist/components/Input/index.js +31 -0
  79. package/dist/components/{atoms/input → Input}/styles.d.ts +2 -3
  80. package/dist/components/Input/styles.js +542 -0
  81. package/dist/components/Message/Message.d.ts +13 -0
  82. package/dist/components/Message/Message.js +105 -0
  83. package/dist/components/Message/__stories__/Message.stories.d.ts +15 -0
  84. package/dist/components/Message/__tests__/Message.test.d.ts +1 -0
  85. package/dist/components/Message/__tests__/Message.test.js +88 -0
  86. package/dist/components/Message/index.d.ts +2 -0
  87. package/dist/components/Message/index.js +50 -0
  88. package/dist/components/Message/styles.d.ts +5 -0
  89. package/dist/components/Message/styles.js +35 -0
  90. package/dist/components/Notification/Notification.d.ts +16 -0
  91. package/dist/components/Notification/Notification.js +1436 -0
  92. package/dist/components/Notification/__stories__/Notification.stories.d.ts +10 -0
  93. package/dist/components/Notification/__tests__/Notification.test.d.ts +1 -0
  94. package/dist/components/Notification/__tests__/Notification.test.js +76 -0
  95. package/dist/components/Notification/index.d.ts +2 -0
  96. package/dist/components/Notification/index.js +61 -0
  97. package/dist/components/Notification/styles.d.ts +6 -0
  98. package/dist/components/Notification/styles.js +49 -0
  99. package/dist/components/Radio/Radio.d.ts +14 -0
  100. package/dist/components/Radio/Radio.js +114 -0
  101. package/dist/components/Radio/RadioGroup.d.ts +12 -0
  102. package/dist/components/Radio/RadioGroup.js +86 -0
  103. package/dist/components/Radio/__stories__/RadioGroup.stories.d.ts +9 -0
  104. package/dist/components/Radio/__tests__/RadioGroup.test.d.ts +1 -0
  105. package/dist/components/Radio/__tests__/RadioGroup.test.js +85 -0
  106. package/dist/components/Radio/index.d.ts +2 -0
  107. package/dist/components/Radio/index.js +58 -0
  108. package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
  109. package/dist/components/Radio/states/RadioChecked.js +18 -0
  110. package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
  111. package/dist/components/Radio/states/RadioCheckedDisabled.js +18 -0
  112. package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
  113. package/dist/components/Radio/states/RadioCheckedFocussed.js +30 -0
  114. package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
  115. package/dist/components/Radio/states/RadioCheckedHover.js +18 -0
  116. package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
  117. package/dist/components/Radio/states/RadioUnchecked.js +15 -0
  118. package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
  119. package/dist/components/Radio/states/RadioUncheckedDisabled.js +15 -0
  120. package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
  121. package/dist/components/Radio/states/RadioUncheckedFocussed.js +29 -0
  122. package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
  123. package/dist/components/Radio/states/RadioUncheckedHover.js +18 -0
  124. package/dist/components/{atoms/select → Select}/Select.d.ts +1 -1
  125. package/dist/components/Select/Select.js +48 -0
  126. package/dist/components/{atoms/select → Select}/__stories__/Select.stories.d.ts +3 -1
  127. package/dist/components/Select/__tests__/Select.test.d.ts +1 -0
  128. package/dist/components/Select/__tests__/Select.test.js +101 -0
  129. package/dist/components/Select/index.js +30 -0
  130. package/dist/components/{atoms/select → Select}/styles.d.ts +4 -1
  131. package/dist/components/Select/styles.js +3723 -0
  132. package/dist/components/Toast/Toast.d.ts +14 -0
  133. package/dist/components/Toast/Toast.js +48 -0
  134. package/dist/components/Toast/__stories__/Toast.stories.d.ts +15 -0
  135. package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
  136. package/dist/components/Toast/__tests__/Toast.test.js +63 -0
  137. package/dist/components/Toast/index.d.ts +2 -0
  138. package/dist/components/Toast/index.js +48 -0
  139. package/dist/components/Toast/styles.d.ts +5 -0
  140. package/dist/components/Toast/styles.js +39 -0
  141. package/dist/components/{atoms/typography → Typography}/Typography.d.ts +2 -1
  142. package/dist/components/Typography/Typography.js +48 -0
  143. package/dist/components/Typography/__tests__/Typography.test.d.ts +1 -0
  144. package/dist/components/Typography/__tests__/Typography.test.js +60 -0
  145. package/dist/components/Typography/index.js +48 -0
  146. package/dist/components/Typography/styles.d.ts +7 -0
  147. package/dist/components/Typography/styles.js +55 -0
  148. package/dist/components/index.d.ts +18 -14
  149. package/dist/components/index.js +70 -14
  150. package/dist/constants/index.d.ts +104 -0
  151. package/dist/constants/index.js +41 -7
  152. package/dist/{context-CZsFJmh6.js → context-3b8a39af.js} +547 -536
  153. package/dist/genesis/GenesisThemeBreakdown.js +69 -22
  154. package/dist/genesis/GenesisThemeDemo.d.ts +0 -2
  155. package/dist/genesis/GenesisThemeDemo.js +53 -4
  156. package/dist/genesis/styles.d.ts +2 -6
  157. package/dist/genesis/styles.js +1144 -2210
  158. package/dist/index-0a886e53.js +100 -0
  159. package/dist/{index-SAAXFt-P.js → index-0b9ee239.js} +347 -338
  160. package/dist/index-1a33c134.js +1389 -0
  161. package/dist/index-4003d75b.js +3748 -0
  162. package/dist/{index-D1v_7IIx.js → index-501fc13d.js} +369 -343
  163. package/dist/index-89035ea5.js +3242 -0
  164. package/dist/{index-BQO27mgE.js → index-8c8d2d0c.js} +123 -122
  165. package/dist/{index-C7kFNqp2.js → index-e2b72ca8.js} +107 -102
  166. package/dist/index.d.ts +1 -0
  167. package/dist/index.js +77 -18
  168. package/dist/{isVisible-CNQjrJPN.js → isVisible-729780f5.js} +110 -82
  169. package/dist/{magic-string.es-BkUFmFT4.js → magic-string.es-b7491176.js} +103 -56
  170. package/dist/{SearchOutlined-DuzJkIiQ.js → pickAttrs-00ba4687.js} +16 -26
  171. package/dist/presets-83ccb923.js +787 -0
  172. package/dist/providers/GenesisProvider.d.ts +5 -0
  173. package/dist/providers/GenesisProvider.js +59 -5
  174. package/dist/providers/ThemeProvider.d.ts +2 -1
  175. package/dist/providers/ThemeProvider.js +16 -11
  176. package/dist/providers/ToastProvider.d.ts +6 -0
  177. package/dist/providers/ToastProvider.js +49 -0
  178. package/dist/providers/ToastWrapper.d.ts +7 -0
  179. package/dist/providers/ToastWrapper.js +56 -0
  180. package/dist/providers/__stories__/GenesisProvider.stories.d.ts +6 -0
  181. package/dist/providers/index.d.ts +3 -2
  182. package/dist/providers/index.js +51 -4
  183. package/dist/setup-aaca7b6f.js +21158 -0
  184. package/dist/{styled-components.browser.esm-CZ1XM4o4.js → styled-components.browser.esm-02f500bc.js} +134 -72
  185. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +54 -18
  186. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +51 -15
  187. package/dist/styles/design-tokens/variables.d.ts +7 -7
  188. package/dist/styles/design-tokens/variables.js +48 -48
  189. package/dist/styles/global-styles.js +4 -3
  190. package/dist/styles/theme/genesis-theme.d.ts +3 -0
  191. package/dist/styles/theme/genesis-theme.js +402 -263
  192. package/dist/styles/theme/global-styles.js +4 -3
  193. package/dist/styles/theme/index.js +5 -4
  194. package/dist/test/setup.js +46 -2
  195. package/dist/useVariants-a0d64298.js +30 -0
  196. package/dist/utils/isAllEnglishString.js +2 -1
  197. package/package.json +34 -28
  198. package/dist/AntdIcon-Bsnbyy6g.js +0 -200
  199. package/dist/CheckOutlined-DAynWe12.js +0 -527
  200. package/dist/Compact-CJBo3f0u.js +0 -185
  201. package/dist/ContextIsolator-CGkdKtc3.js +0 -20
  202. package/dist/Form-Cylpi4M4.js +0 -1815
  203. package/dist/Overflow-CP1M4Z0s.js +0 -369
  204. package/dist/compact-item-DH13cl8A.js +0 -61
  205. package/dist/components/atoms/button/Button.js +0 -27
  206. package/dist/components/atoms/button/index.js +0 -4
  207. package/dist/components/atoms/checkbox/Checkbox.js +0 -13
  208. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +0 -18
  209. package/dist/components/atoms/checkbox/index.js +0 -4
  210. package/dist/components/atoms/index.d.ts +0 -1
  211. package/dist/components/atoms/index.js +0 -3
  212. package/dist/components/atoms/input/Input.js +0 -12
  213. package/dist/components/atoms/input/__tests__/Input.test.js +0 -28
  214. package/dist/components/atoms/input/index.js +0 -4
  215. package/dist/components/atoms/input/styles.js +0 -415
  216. package/dist/components/atoms/select/Select.js +0 -24
  217. package/dist/components/atoms/select/__tests__/Select.test.js +0 -10735
  218. package/dist/components/atoms/select/index.js +0 -4
  219. package/dist/components/atoms/select/styles.js +0 -3868
  220. package/dist/components/atoms/typography/Typography.js +0 -44
  221. package/dist/components/atoms/typography/__tests__/Typography.test.js +0 -16
  222. package/dist/components/atoms/typography/index.js +0 -4
  223. package/dist/components/atoms/typography/styles.d.ts +0 -11
  224. package/dist/components/atoms/typography/styles.js +0 -28
  225. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +0 -35
  226. package/dist/components/molecules/error-boundary-fallback/index.js +0 -4
  227. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +0 -1
  228. package/dist/components/molecules/form/Form.js +0 -7
  229. package/dist/components/molecules/form/__stories__/FormStory.js +0 -90
  230. package/dist/components/molecules/form/index.js +0 -4
  231. package/dist/index-3MWkSVA1.js +0 -96
  232. package/dist/index-BPtFqhcp.js +0 -19110
  233. package/dist/index-BWys7dkb.js +0 -4462
  234. package/dist/index-VDH3iLaC.js +0 -884
  235. package/dist/setup-CMYVZCPF.js +0 -33883
  236. package/dist/useVariants-CEpw6Ww6.js +0 -29
  237. /package/dist/components/{atoms/checkbox/__tests__/Checkbox.test.d.ts → Badge/__tests__/Badge.test.d.ts} +0 -0
  238. /package/dist/components/{atoms/input/__tests__/Input.test.d.ts → Breadcrumb/__tests__/Breadcrumb.test.d.ts} +0 -0
  239. /package/dist/components/{atoms/button → Button}/Button.d.ts +0 -0
  240. /package/dist/components/{atoms/button → Button}/__stories__/Button.stories.d.ts +0 -0
  241. /package/dist/components/{atoms/select/__tests__/Select.test.d.ts → Button/__tests__/Button.test.d.ts} +0 -0
  242. /package/dist/components/{atoms/button → Button}/index.d.ts +0 -0
  243. /package/dist/components/{atoms/button → Button}/styles.d.ts +0 -0
  244. /package/dist/components/{atoms/checkbox → Checkbox}/__stories__/Checkbox.stories.d.ts +0 -0
  245. /package/dist/components/{atoms/typography/__tests__/Typography.test.d.ts → Checkbox/__tests__/Checkbox.test.d.ts} +0 -0
  246. /package/dist/components/{atoms/checkbox → Checkbox}/index.d.ts +0 -0
  247. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/ErrorBoundaryFallback.d.ts +0 -0
  248. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/__stories__/ErrorBoundaryFallback.stories.d.ts +0 -0
  249. /package/dist/components/{molecules/error-boundary-fallback → ErrorBoundaryFallback}/index.d.ts +0 -0
  250. /package/dist/components/{molecules/form → Form}/__stories__/Form.stories.d.ts +0 -0
  251. /package/dist/components/{molecules/form → Form}/__stories__/FormStory.d.ts +0 -0
  252. /package/dist/components/{molecules/form → Form}/index.d.ts +0 -0
  253. /package/dist/components/{atoms/input → Input}/index.d.ts +0 -0
  254. /package/dist/components/{atoms/select → Select}/index.d.ts +0 -0
  255. /package/dist/components/{atoms/typography → Typography}/__stories__/Typography.stories.d.ts +0 -0
  256. /package/dist/components/{atoms/typography → Typography}/index.d.ts +0 -0
  257. /package/dist/{presetColors-Cl8UP3Nw.js → presetColors-ccf8cb4c.js} +0 -0
  258. /package/dist/{reactNode-sKPeiqPL.js → reactNode-f4391605.js} +0 -0
@@ -0,0 +1,3723 @@
1
+ import { d as At } from "../../styled-components.browser.esm-02f500bc.js";
2
+ import * as o from "react";
3
+ import $t, { useState as Tt, useRef as he, useEffect as Qt, useMemo as pr, useContext as hr } from "react";
4
+ import { c as He, d as mt, f as ne, j as br, _ as ee, h as ae, a as ot, e as wt, w as Ue, k as Sr, n as Cn, F as Ht } from "../../presets-83ccb923.js";
5
+ import { q as wr, $ as Cr, v as qe, k as yr, n as Rt, w as lt, h as Er, f as Ir, l as xr, b as yn, P as $r, B as on, g as An, m as Ot, C as an, t as ln, r as cn, O as Zt, p as ze, G as jn, D as Rr } from "../../index-4003d75b.js";
6
+ import { u as Jt, o as Wn, t as kt } from "../../isVisible-729780f5.js";
7
+ import { a as W, T as Or, c as Mr, u as Dr, g as Nr } from "../../index-1a33c134.js";
8
+ import { p as Vt } from "../../pickAttrs-00ba4687.js";
9
+ import { F as Pr, s as _r, a as Tr, b as Lr, c as zr, i as En } from "../../Overflow-a570fa69.js";
10
+ import { R as Kn } from "../../index-8c8d2d0c.js";
11
+ import { flushSync as In } from "react-dom";
12
+ import { i as xn, D as Br, g as Hr } from "../../DownOutlined-64a4732a.js";
13
+ import { u as Vr, a as Fr, g as Ar } from "../../useVariants-a0d64298.js";
14
+ import { u as un, C as jr } from "../../CheckOutlined-52d9ac25.js";
15
+ import { u as Wr, F as Kr } from "../../context-3b8a39af.js";
16
+ import { b as Xr, a as Ur } from "../../Compact-c39ed20d.js";
17
+ import { g as Gr, L as Yr } from "../../compact-item-b8f85aa6.js";
18
+ import { C as qr } from "../../CloseCircleFilled-ddc51e7e.js";
19
+ import { C as Qr } from "../../CloseOutlined-14b8bba1.js";
20
+ import { S as Zr } from "../../SearchOutlined-a9014e08.js";
21
+ import "../../AntdIcon-c395a1c4.js";
22
+ var jt = function(t) {
23
+ var n = t.className, r = t.customizeIcon, a = t.customizeIconProps, i = t.children, l = t.onMouseDown, c = t.onClick, d = typeof r == "function" ? r(a) : r;
24
+ return /* @__PURE__ */ o.createElement("span", {
25
+ className: n,
26
+ onMouseDown: function(m) {
27
+ m.preventDefault(), l == null || l(m);
28
+ },
29
+ style: {
30
+ userSelect: "none",
31
+ WebkitUserSelect: "none"
32
+ },
33
+ unselectable: "on",
34
+ onClick: c,
35
+ "aria-hidden": !0
36
+ }, d !== void 0 ? d : /* @__PURE__ */ o.createElement("span", {
37
+ className: He(n.split(/\s+/).map(function(f) {
38
+ return "".concat(f, "-icon");
39
+ }))
40
+ }, i));
41
+ }, Jr = function(t, n, r, a, i) {
42
+ var l = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, c = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0, f = $t.useMemo(function() {
43
+ if (mt(a) === "object")
44
+ return a.clearIcon;
45
+ if (i)
46
+ return i;
47
+ }, [a, i]), m = $t.useMemo(function() {
48
+ return !!(!l && a && (r.length || c) && !(d === "combobox" && c === ""));
49
+ }, [a, l, r.length, c, d]);
50
+ return {
51
+ allowClear: m,
52
+ clearIcon: /* @__PURE__ */ $t.createElement(jt, {
53
+ className: "".concat(t, "-clear"),
54
+ onMouseDown: n,
55
+ customizeIcon: f
56
+ }, "×")
57
+ };
58
+ }, Xn = /* @__PURE__ */ o.createContext(null);
59
+ function kr() {
60
+ return o.useContext(Xn);
61
+ }
62
+ function eo() {
63
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, t = o.useState(!1), n = ne(t, 2), r = n[0], a = n[1], i = o.useRef(null), l = function() {
64
+ window.clearTimeout(i.current);
65
+ };
66
+ o.useEffect(function() {
67
+ return l;
68
+ }, []);
69
+ var c = function(f, m) {
70
+ l(), i.current = window.setTimeout(function() {
71
+ a(f), m && m();
72
+ }, e);
73
+ };
74
+ return [r, c, l];
75
+ }
76
+ function Un() {
77
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 250, t = o.useRef(null), n = o.useRef(null);
78
+ o.useEffect(function() {
79
+ return function() {
80
+ window.clearTimeout(n.current);
81
+ };
82
+ }, []);
83
+ function r(a) {
84
+ (a || t.current === null) && (t.current = a), window.clearTimeout(n.current), n.current = window.setTimeout(function() {
85
+ t.current = null;
86
+ }, e);
87
+ }
88
+ return [function() {
89
+ return t.current;
90
+ }, r];
91
+ }
92
+ function to(e, t, n, r) {
93
+ var a = o.useRef(null);
94
+ a.current = {
95
+ open: t,
96
+ triggerOpen: n,
97
+ customizedTrigger: r
98
+ }, o.useEffect(function() {
99
+ function i(l) {
100
+ var c;
101
+ if (!((c = a.current) !== null && c !== void 0 && c.customizedTrigger)) {
102
+ var d = l.target;
103
+ d.shadowRoot && l.composed && (d = l.composedPath()[0] || d), a.current.open && e().filter(function(f) {
104
+ return f;
105
+ }).every(function(f) {
106
+ return !f.contains(d) && f !== d;
107
+ }) && a.current.triggerOpen(!1);
108
+ }
109
+ }
110
+ return window.addEventListener("mousedown", i), function() {
111
+ return window.removeEventListener("mousedown", i);
112
+ };
113
+ }, []);
114
+ }
115
+ function no(e) {
116
+ return (
117
+ // Undefined for Edge bug:
118
+ // https://github.com/ant-design/ant-design/issues/51292
119
+ e && // Other keys
120
+ ![
121
+ // System function button
122
+ W.ESC,
123
+ W.SHIFT,
124
+ W.BACKSPACE,
125
+ W.TAB,
126
+ W.WIN_KEY,
127
+ W.ALT,
128
+ W.META,
129
+ W.WIN_KEY_RIGHT,
130
+ W.CTRL,
131
+ W.SEMICOLON,
132
+ W.EQUALS,
133
+ W.CAPS_LOCK,
134
+ W.CONTEXT_MENU,
135
+ // F1-F12
136
+ W.F1,
137
+ W.F2,
138
+ W.F3,
139
+ W.F4,
140
+ W.F5,
141
+ W.F6,
142
+ W.F7,
143
+ W.F8,
144
+ W.F9,
145
+ W.F10,
146
+ W.F11,
147
+ W.F12
148
+ ].includes(e)
149
+ );
150
+ }
151
+ var ro = function(t, n) {
152
+ var r, a = t.prefixCls, i = t.id, l = t.inputElement, c = t.disabled, d = t.tabIndex, f = t.autoFocus, m = t.autoComplete, s = t.editable, b = t.activeDescendantId, u = t.value, g = t.maxLength, v = t.onKeyDown, S = t.onMouseDown, w = t.onChange, h = t.onPaste, E = t.onCompositionStart, C = t.onCompositionEnd, T = t.onBlur, p = t.open, I = t.attrs, B = l || /* @__PURE__ */ o.createElement("input", null), V = B, q = V.ref, _ = V.props, A = _.onKeyDown, U = _.onChange, Q = _.onMouseDown, G = _.onCompositionStart, j = _.onCompositionEnd, te = _.onBlur, Z = _.style;
153
+ return br(!("maxLength" in B.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), B = /* @__PURE__ */ o.cloneElement(B, ee(ee(ee({
154
+ type: "search"
155
+ }, _), {}, {
156
+ // Override over origin props
157
+ id: i,
158
+ ref: wr(n, q),
159
+ disabled: c,
160
+ tabIndex: d,
161
+ autoComplete: m || "off",
162
+ autoFocus: f,
163
+ className: He("".concat(a, "-selection-search-input"), (r = B) === null || r === void 0 || (r = r.props) === null || r === void 0 ? void 0 : r.className),
164
+ role: "combobox",
165
+ "aria-expanded": p || !1,
166
+ "aria-haspopup": "listbox",
167
+ "aria-owns": "".concat(i, "_list"),
168
+ "aria-autocomplete": "list",
169
+ "aria-controls": "".concat(i, "_list"),
170
+ "aria-activedescendant": p ? b : void 0
171
+ }, I), {}, {
172
+ value: s ? u : "",
173
+ maxLength: g,
174
+ readOnly: !s,
175
+ unselectable: s ? null : "on",
176
+ style: ee(ee({}, Z), {}, {
177
+ opacity: s ? null : 0
178
+ }),
179
+ onKeyDown: function(x) {
180
+ v(x), A && A(x);
181
+ },
182
+ onMouseDown: function(x) {
183
+ S(x), Q && Q(x);
184
+ },
185
+ onChange: function(x) {
186
+ w(x), U && U(x);
187
+ },
188
+ onCompositionStart: function(x) {
189
+ E(x), G && G(x);
190
+ },
191
+ onCompositionEnd: function(x) {
192
+ C(x), j && j(x);
193
+ },
194
+ onPaste: h,
195
+ onBlur: function(x) {
196
+ T(x), te && te(x);
197
+ }
198
+ })), B;
199
+ }, sn = /* @__PURE__ */ o.forwardRef(ro);
200
+ process.env.NODE_ENV !== "production" && (sn.displayName = "Input");
201
+ function dn(e) {
202
+ return Array.isArray(e) ? e : e !== void 0 ? [e] : [];
203
+ }
204
+ var oo = typeof window < "u" && window.document && window.document.documentElement, ao = process.env.NODE_ENV !== "test" && oo;
205
+ function io(e) {
206
+ return e != null;
207
+ }
208
+ function lo(e) {
209
+ return !e && e !== 0;
210
+ }
211
+ function $n(e) {
212
+ return ["string", "number"].includes(mt(e));
213
+ }
214
+ function Gn(e) {
215
+ var t = void 0;
216
+ return e && ($n(e.title) ? t = e.title.toString() : $n(e.label) && (t = e.label.toString())), t;
217
+ }
218
+ function co(e, t) {
219
+ ao ? o.useLayoutEffect(e, t) : o.useEffect(e, t);
220
+ }
221
+ function uo(e) {
222
+ var t;
223
+ return (t = e.key) !== null && t !== void 0 ? t : e.value;
224
+ }
225
+ var Rn = function(t) {
226
+ t.preventDefault(), t.stopPropagation();
227
+ }, so = function(t) {
228
+ var n = t.id, r = t.prefixCls, a = t.values, i = t.open, l = t.searchValue, c = t.autoClearSearchValue, d = t.inputRef, f = t.placeholder, m = t.disabled, s = t.mode, b = t.showSearch, u = t.autoFocus, g = t.autoComplete, v = t.activeDescendantId, S = t.tabIndex, w = t.removeIcon, h = t.maxTagCount, E = t.maxTagTextLength, C = t.maxTagPlaceholder, T = C === void 0 ? function(K) {
229
+ return "+ ".concat(K.length, " ...");
230
+ } : C, p = t.tagRender, I = t.onToggleOpen, B = t.onRemove, V = t.onInputChange, q = t.onInputPaste, _ = t.onInputKeyDown, A = t.onInputMouseDown, U = t.onInputCompositionStart, Q = t.onInputCompositionEnd, G = t.onInputBlur, j = o.useRef(null), te = Tt(0), Z = ne(te, 2), Y = Z[0], x = Z[1], M = Tt(!1), fe = ne(M, 2), ie = fe[0], J = fe[1], se = "".concat(r, "-selection"), Ce = i || s === "multiple" && c === !1 || s === "tags" ? l : "", ge = s === "tags" || s === "multiple" && c === !1 || b && (i || ie);
231
+ co(function() {
232
+ x(j.current.scrollWidth);
233
+ }, [Ce]);
234
+ var Re = function($, F, le, ve, re) {
235
+ return /* @__PURE__ */ o.createElement("span", {
236
+ title: Gn($),
237
+ className: He("".concat(se, "-item"), ae({}, "".concat(se, "-item-disabled"), le))
238
+ }, /* @__PURE__ */ o.createElement("span", {
239
+ className: "".concat(se, "-item-content")
240
+ }, F), ve && /* @__PURE__ */ o.createElement(jt, {
241
+ className: "".concat(se, "-item-remove"),
242
+ onMouseDown: Rn,
243
+ onClick: re,
244
+ customizeIcon: w
245
+ }, "×"));
246
+ }, ue = function($, F, le, ve, re, we) {
247
+ var Be = function(Ne) {
248
+ Rn(Ne), I(!i);
249
+ };
250
+ return /* @__PURE__ */ o.createElement("span", {
251
+ onMouseDown: Be
252
+ }, p({
253
+ label: F,
254
+ value: $,
255
+ disabled: le,
256
+ closable: ve,
257
+ onClose: re,
258
+ isMaxTag: !!we
259
+ }));
260
+ }, pe = function($) {
261
+ var F = $.disabled, le = $.label, ve = $.value, re = !m && !F, we = le;
262
+ if (typeof E == "number" && (typeof le == "string" || typeof le == "number")) {
263
+ var Be = String(we);
264
+ Be.length > E && (we = "".concat(Be.slice(0, E), "..."));
265
+ }
266
+ var xe = function(de) {
267
+ de && de.stopPropagation(), B($);
268
+ };
269
+ return typeof p == "function" ? ue(ve, we, F, re, xe) : Re($, we, F, re, xe);
270
+ }, R = function($) {
271
+ if (!a.length)
272
+ return null;
273
+ var F = typeof T == "function" ? T($) : T;
274
+ return typeof p == "function" ? ue(void 0, F, !1, !1, void 0, !0) : Re({
275
+ title: F
276
+ }, F, !1);
277
+ }, y = /* @__PURE__ */ o.createElement("div", {
278
+ className: "".concat(se, "-search"),
279
+ style: {
280
+ width: Y
281
+ },
282
+ onFocus: function() {
283
+ J(!0);
284
+ },
285
+ onBlur: function() {
286
+ J(!1);
287
+ }
288
+ }, /* @__PURE__ */ o.createElement(sn, {
289
+ ref: d,
290
+ open: i,
291
+ prefixCls: r,
292
+ id: n,
293
+ inputElement: null,
294
+ disabled: m,
295
+ autoFocus: u,
296
+ autoComplete: g,
297
+ editable: ge,
298
+ activeDescendantId: v,
299
+ value: Ce,
300
+ onKeyDown: _,
301
+ onMouseDown: A,
302
+ onChange: V,
303
+ onPaste: q,
304
+ onCompositionStart: U,
305
+ onCompositionEnd: Q,
306
+ onBlur: G,
307
+ tabIndex: S,
308
+ attrs: Vt(t, !0)
309
+ }), /* @__PURE__ */ o.createElement("span", {
310
+ ref: j,
311
+ className: "".concat(se, "-search-mirror"),
312
+ "aria-hidden": !0
313
+ }, Ce, " ")), D = /* @__PURE__ */ o.createElement(Pr, {
314
+ prefixCls: "".concat(se, "-overflow"),
315
+ data: a,
316
+ renderItem: pe,
317
+ renderRest: R,
318
+ suffix: y,
319
+ itemKey: uo,
320
+ maxCount: h
321
+ });
322
+ return /* @__PURE__ */ o.createElement("span", {
323
+ className: "".concat(se, "-wrap")
324
+ }, D, !a.length && !Ce && /* @__PURE__ */ o.createElement("span", {
325
+ className: "".concat(se, "-placeholder")
326
+ }, f));
327
+ }, fo = function(t) {
328
+ var n = t.inputElement, r = t.prefixCls, a = t.id, i = t.inputRef, l = t.disabled, c = t.autoFocus, d = t.autoComplete, f = t.activeDescendantId, m = t.mode, s = t.open, b = t.values, u = t.placeholder, g = t.tabIndex, v = t.showSearch, S = t.searchValue, w = t.activeValue, h = t.maxLength, E = t.onInputKeyDown, C = t.onInputMouseDown, T = t.onInputChange, p = t.onInputPaste, I = t.onInputCompositionStart, B = t.onInputCompositionEnd, V = t.onInputBlur, q = t.title, _ = o.useState(!1), A = ne(_, 2), U = A[0], Q = A[1], G = m === "combobox", j = G || v, te = b[0], Z = S || "";
329
+ G && w && !U && (Z = w), o.useEffect(function() {
330
+ G && Q(!1);
331
+ }, [G, w]);
332
+ var Y = m !== "combobox" && !s && !v ? !1 : !!Z, x = q === void 0 ? Gn(te) : q, M = o.useMemo(function() {
333
+ return te ? null : /* @__PURE__ */ o.createElement("span", {
334
+ className: "".concat(r, "-selection-placeholder"),
335
+ style: Y ? {
336
+ visibility: "hidden"
337
+ } : void 0
338
+ }, u);
339
+ }, [te, Y, u, r]);
340
+ return /* @__PURE__ */ o.createElement("span", {
341
+ className: "".concat(r, "-selection-wrap")
342
+ }, /* @__PURE__ */ o.createElement("span", {
343
+ className: "".concat(r, "-selection-search")
344
+ }, /* @__PURE__ */ o.createElement(sn, {
345
+ ref: i,
346
+ prefixCls: r,
347
+ id: a,
348
+ open: s,
349
+ inputElement: n,
350
+ disabled: l,
351
+ autoFocus: c,
352
+ autoComplete: d,
353
+ editable: j,
354
+ activeDescendantId: f,
355
+ value: Z,
356
+ onKeyDown: E,
357
+ onMouseDown: C,
358
+ onChange: function(ie) {
359
+ Q(!0), T(ie);
360
+ },
361
+ onPaste: p,
362
+ onCompositionStart: I,
363
+ onCompositionEnd: B,
364
+ onBlur: V,
365
+ tabIndex: g,
366
+ attrs: Vt(t, !0),
367
+ maxLength: G ? h : void 0
368
+ })), !G && te ? /* @__PURE__ */ o.createElement("span", {
369
+ className: "".concat(r, "-selection-item"),
370
+ title: x,
371
+ style: Y ? {
372
+ visibility: "hidden"
373
+ } : void 0
374
+ }, te.label) : null, M);
375
+ }, vo = function(t, n) {
376
+ var r = he(null), a = he(!1), i = t.prefixCls, l = t.open, c = t.mode, d = t.showSearch, f = t.tokenWithEnter, m = t.disabled, s = t.prefix, b = t.autoClearSearchValue, u = t.onSearch, g = t.onSearchSubmit, v = t.onToggleOpen, S = t.onInputKeyDown, w = t.onInputBlur, h = t.domRef;
377
+ o.useImperativeHandle(n, function() {
378
+ return {
379
+ focus: function(x) {
380
+ r.current.focus(x);
381
+ },
382
+ blur: function() {
383
+ r.current.blur();
384
+ }
385
+ };
386
+ });
387
+ var E = Un(0), C = ne(E, 2), T = C[0], p = C[1], I = function(x) {
388
+ var M = x.which, fe = r.current instanceof HTMLTextAreaElement;
389
+ !fe && l && (M === W.UP || M === W.DOWN) && x.preventDefault(), S && S(x), M === W.ENTER && c === "tags" && !a.current && !l && (g == null || g(x.target.value)), !(fe && !l && ~[W.UP, W.DOWN, W.LEFT, W.RIGHT].indexOf(M)) && no(M) && v(!0);
390
+ }, B = function() {
391
+ p(!0);
392
+ }, V = he(null), q = function(x) {
393
+ u(x, !0, a.current) !== !1 && v(!0);
394
+ }, _ = function() {
395
+ a.current = !0;
396
+ }, A = function(x) {
397
+ a.current = !1, c !== "combobox" && q(x.target.value);
398
+ }, U = function(x) {
399
+ var M = x.target.value;
400
+ if (f && V.current && /[\r\n]/.test(V.current)) {
401
+ var fe = V.current.replace(/[\r\n]+$/, "").replace(/\r\n/g, " ").replace(/[\r\n]/g, " ");
402
+ M = M.replace(fe, V.current);
403
+ }
404
+ V.current = null, q(M);
405
+ }, Q = function(x) {
406
+ var M = x.clipboardData, fe = M == null ? void 0 : M.getData("text");
407
+ V.current = fe || "";
408
+ }, G = function(x) {
409
+ var M = x.target;
410
+ if (M !== r.current) {
411
+ var fe = document.body.style.msTouchAction !== void 0;
412
+ fe ? setTimeout(function() {
413
+ r.current.focus();
414
+ }) : r.current.focus();
415
+ }
416
+ }, j = function(x) {
417
+ var M = T();
418
+ x.target !== r.current && !M && !(c === "combobox" && m) && x.preventDefault(), (c !== "combobox" && (!d || !M) || !l) && (l && b !== !1 && u("", !0, !1), v());
419
+ }, te = {
420
+ inputRef: r,
421
+ onInputKeyDown: I,
422
+ onInputMouseDown: B,
423
+ onInputChange: U,
424
+ onInputPaste: Q,
425
+ onInputCompositionStart: _,
426
+ onInputCompositionEnd: A,
427
+ onInputBlur: w
428
+ }, Z = c === "multiple" || c === "tags" ? /* @__PURE__ */ o.createElement(so, ot({}, t, te)) : /* @__PURE__ */ o.createElement(fo, ot({}, t, te));
429
+ return /* @__PURE__ */ o.createElement("div", {
430
+ ref: h,
431
+ className: "".concat(i, "-selector"),
432
+ onClick: G,
433
+ onMouseDown: j
434
+ }, s && /* @__PURE__ */ o.createElement("div", {
435
+ className: "".concat(i, "-prefix")
436
+ }, s), Z);
437
+ }, Yn = /* @__PURE__ */ o.forwardRef(vo);
438
+ process.env.NODE_ENV !== "production" && (Yn.displayName = "Selector");
439
+ var mo = ["prefixCls", "disabled", "visible", "children", "popupElement", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "direction", "placement", "builtinPlacements", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "getPopupContainer", "empty", "getTriggerDOMNode", "onPopupVisibleChange", "onPopupMouseEnter"], go = function(t) {
440
+ var n = t === !0 ? 0 : 1;
441
+ return {
442
+ bottomLeft: {
443
+ points: ["tl", "bl"],
444
+ offset: [0, 4],
445
+ overflow: {
446
+ adjustX: n,
447
+ adjustY: 1
448
+ },
449
+ htmlRegion: "scroll"
450
+ },
451
+ bottomRight: {
452
+ points: ["tr", "br"],
453
+ offset: [0, 4],
454
+ overflow: {
455
+ adjustX: n,
456
+ adjustY: 1
457
+ },
458
+ htmlRegion: "scroll"
459
+ },
460
+ topLeft: {
461
+ points: ["bl", "tl"],
462
+ offset: [0, -4],
463
+ overflow: {
464
+ adjustX: n,
465
+ adjustY: 1
466
+ },
467
+ htmlRegion: "scroll"
468
+ },
469
+ topRight: {
470
+ points: ["br", "tr"],
471
+ offset: [0, -4],
472
+ overflow: {
473
+ adjustX: n,
474
+ adjustY: 1
475
+ },
476
+ htmlRegion: "scroll"
477
+ }
478
+ };
479
+ }, po = function(t, n) {
480
+ var r = t.prefixCls;
481
+ t.disabled;
482
+ var a = t.visible, i = t.children, l = t.popupElement, c = t.animation, d = t.transitionName, f = t.dropdownStyle, m = t.dropdownClassName, s = t.direction, b = s === void 0 ? "ltr" : s, u = t.placement, g = t.builtinPlacements, v = t.dropdownMatchSelectWidth, S = t.dropdownRender, w = t.dropdownAlign, h = t.getPopupContainer, E = t.empty, C = t.getTriggerDOMNode, T = t.onPopupVisibleChange, p = t.onPopupMouseEnter, I = wt(t, mo), B = "".concat(r, "-dropdown"), V = l;
483
+ S && (V = S(l));
484
+ var q = o.useMemo(function() {
485
+ return g || go(v);
486
+ }, [g, v]), _ = c ? "".concat(B, "-").concat(c) : d, A = typeof v == "number", U = o.useMemo(function() {
487
+ return A ? null : v === !1 ? "minWidth" : "width";
488
+ }, [v, A]), Q = f;
489
+ A && (Q = ee(ee({}, Q), {}, {
490
+ width: v
491
+ }));
492
+ var G = o.useRef(null);
493
+ return o.useImperativeHandle(n, function() {
494
+ return {
495
+ getPopupElement: function() {
496
+ var te;
497
+ return (te = G.current) === null || te === void 0 ? void 0 : te.popupElement;
498
+ }
499
+ };
500
+ }), /* @__PURE__ */ o.createElement(Or, ot({}, I, {
501
+ showAction: T ? ["click"] : [],
502
+ hideAction: T ? ["click"] : [],
503
+ popupPlacement: u || (b === "rtl" ? "bottomRight" : "bottomLeft"),
504
+ builtinPlacements: q,
505
+ prefixCls: B,
506
+ popupTransitionName: _,
507
+ popup: /* @__PURE__ */ o.createElement("div", {
508
+ onMouseEnter: p
509
+ }, V),
510
+ ref: G,
511
+ stretch: U,
512
+ popupAlign: w,
513
+ popupVisible: a,
514
+ getPopupContainer: h,
515
+ popupClassName: He(m, ae({}, "".concat(B, "-empty"), E)),
516
+ popupStyle: Q,
517
+ getTriggerDOMNode: C,
518
+ onPopupVisibleChange: T
519
+ }), i);
520
+ }, qn = /* @__PURE__ */ o.forwardRef(po);
521
+ process.env.NODE_ENV !== "production" && (qn.displayName = "SelectTrigger");
522
+ function On(e, t) {
523
+ var n = e.key, r;
524
+ return "value" in e && (r = e.value), n ?? (r !== void 0 ? r : "rc-index-key-".concat(t));
525
+ }
526
+ function en(e) {
527
+ return typeof e < "u" && !Number.isNaN(e);
528
+ }
529
+ function Qn(e, t) {
530
+ var n = e || {}, r = n.label, a = n.value, i = n.options, l = n.groupLabel, c = r || (t ? "children" : "label");
531
+ return {
532
+ label: c,
533
+ value: a || "value",
534
+ options: i || "options",
535
+ groupLabel: l || c
536
+ };
537
+ }
538
+ function ho(e) {
539
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.fieldNames, r = t.childrenAsData, a = [], i = Qn(n, !1), l = i.label, c = i.value, d = i.options, f = i.groupLabel;
540
+ function m(s, b) {
541
+ Array.isArray(s) && s.forEach(function(u) {
542
+ if (b || !(d in u)) {
543
+ var g = u[c];
544
+ a.push({
545
+ key: On(u, a.length),
546
+ groupOption: b,
547
+ data: u,
548
+ label: u[l],
549
+ value: g
550
+ });
551
+ } else {
552
+ var v = u[f];
553
+ v === void 0 && r && (v = u.label), a.push({
554
+ key: On(u, a.length),
555
+ group: !0,
556
+ data: u,
557
+ label: v
558
+ }), m(u[d], !0);
559
+ }
560
+ });
561
+ }
562
+ return m(e, !1), a;
563
+ }
564
+ function tn(e) {
565
+ var t = ee({}, e);
566
+ return "props" in t || Object.defineProperty(t, "props", {
567
+ get: function() {
568
+ return Ue(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), t;
569
+ }
570
+ }), t;
571
+ }
572
+ var bo = function(t, n, r) {
573
+ if (!n || !n.length)
574
+ return null;
575
+ var a = !1, i = function c(d, f) {
576
+ var m = Cr(f), s = m[0], b = m.slice(1);
577
+ if (!s)
578
+ return [d];
579
+ var u = d.split(s);
580
+ return a = a || u.length > 1, u.reduce(function(g, v) {
581
+ return [].concat(qe(g), qe(c(v, b)));
582
+ }, []).filter(Boolean);
583
+ }, l = i(t, n);
584
+ return a ? typeof r < "u" ? l.slice(0, r) : l : null;
585
+ }, fn = /* @__PURE__ */ o.createContext(null);
586
+ function So(e) {
587
+ var t = e.visible, n = e.values;
588
+ if (!t)
589
+ return null;
590
+ var r = 50;
591
+ return /* @__PURE__ */ o.createElement("span", {
592
+ "aria-live": "polite",
593
+ style: {
594
+ width: 0,
595
+ height: 0,
596
+ position: "absolute",
597
+ overflow: "hidden",
598
+ opacity: 0
599
+ }
600
+ }, "".concat(n.slice(0, r).map(function(a) {
601
+ var i = a.label, l = a.value;
602
+ return ["number", "string"].includes(mt(i)) ? i : l;
603
+ }).join(", ")), n.length > r ? ", ..." : null);
604
+ }
605
+ var wo = ["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"], Co = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], Ft = function(t) {
606
+ return t === "tags" || t === "multiple";
607
+ }, Zn = /* @__PURE__ */ o.forwardRef(function(e, t) {
608
+ var n, r = e.id, a = e.prefixCls, i = e.className, l = e.showSearch, c = e.tagRender, d = e.direction, f = e.omitDomProps, m = e.displayValues, s = e.onDisplayValuesChange, b = e.emptyOptions, u = e.notFoundContent, g = u === void 0 ? "Not Found" : u, v = e.onClear, S = e.mode, w = e.disabled, h = e.loading, E = e.getInputElement, C = e.getRawInputElement, T = e.open, p = e.defaultOpen, I = e.onDropdownVisibleChange, B = e.activeValue, V = e.onActiveValueChange, q = e.activeDescendantId, _ = e.searchValue, A = e.autoClearSearchValue, U = e.onSearch, Q = e.onSearchSplit, G = e.tokenSeparators, j = e.allowClear, te = e.prefix, Z = e.suffixIcon, Y = e.clearIcon, x = e.OptionList, M = e.animation, fe = e.transitionName, ie = e.dropdownStyle, J = e.dropdownClassName, se = e.dropdownMatchSelectWidth, Ce = e.dropdownRender, ge = e.dropdownAlign, Re = e.placement, ue = e.builtinPlacements, pe = e.getPopupContainer, R = e.showAction, y = R === void 0 ? [] : R, D = e.onFocus, K = e.onBlur, $ = e.onKeyUp, F = e.onKeyDown, le = e.onMouseDown, ve = wt(e, wo), re = Ft(S), we = (l !== void 0 ? l : re) || S === "combobox", Be = ee({}, ve);
609
+ Co.forEach(function(ce) {
610
+ delete Be[ce];
611
+ }), f == null || f.forEach(function(ce) {
612
+ delete Be[ce];
613
+ });
614
+ var xe = o.useState(!1), Ne = ne(xe, 2), de = Ne[0], Ge = Ne[1];
615
+ o.useEffect(function() {
616
+ Ge(Mr());
617
+ }, []);
618
+ var Ye = o.useRef(null), Se = o.useRef(null), Oe = o.useRef(null), ye = o.useRef(null), $e = o.useRef(null), Pe = o.useRef(!1), et = eo(), je = ne(et, 3), Fe = je[0], Ee = je[1], gt = je[2];
619
+ o.useImperativeHandle(t, function() {
620
+ var ce, X;
621
+ return {
622
+ focus: (ce = ye.current) === null || ce === void 0 ? void 0 : ce.focus,
623
+ blur: (X = ye.current) === null || X === void 0 ? void 0 : X.blur,
624
+ scrollTo: function(Xe) {
625
+ var Le;
626
+ return (Le = $e.current) === null || Le === void 0 ? void 0 : Le.scrollTo(Xe);
627
+ },
628
+ nativeElement: Ye.current || Se.current
629
+ };
630
+ });
631
+ var Ae = o.useMemo(function() {
632
+ var ce;
633
+ if (S !== "combobox")
634
+ return _;
635
+ var X = (ce = m[0]) === null || ce === void 0 ? void 0 : ce.value;
636
+ return typeof X == "string" || typeof X == "number" ? String(X) : "";
637
+ }, [_, S, m]), _e = S === "combobox" && typeof E == "function" && E() || null, De = typeof C == "function" && C(), Mt = yr(Se, De == null || (n = De.props) === null || n === void 0 ? void 0 : n.ref), yt = o.useState(!1), st = ne(yt, 2), pt = st[0], Et = st[1];
638
+ Rt(function() {
639
+ Et(!0);
640
+ }, []);
641
+ var ct = Jt(!1, {
642
+ defaultValue: p,
643
+ value: T
644
+ }), Qe = ne(ct, 2), dt = Qe[0], ft = Qe[1], Me = pt ? dt : !1, vt = !g && b;
645
+ (w || vt && Me && S === "combobox") && (Me = !1);
646
+ var at = vt ? !1 : Me, N = o.useCallback(function(ce) {
647
+ var X = ce !== void 0 ? ce : !Me;
648
+ w || (ft(X), Me !== X && (I == null || I(X)));
649
+ }, [w, Me, ft, I]), H = o.useMemo(function() {
650
+ return (G || []).some(function(ce) {
651
+ return [`
652
+ `, `\r
653
+ `].includes(ce);
654
+ });
655
+ }, [G]), L = o.useContext(fn) || {}, z = L.maxCount, oe = L.rawValues, be = function(X, Ke, Xe) {
656
+ if (!(re && en(z) && (oe == null ? void 0 : oe.size) >= z)) {
657
+ var Le = !0, Ve = X;
658
+ V == null || V(null);
659
+ var ut = bo(X, G, en(z) ? z - oe.size : void 0), it = Xe ? null : ut;
660
+ return S !== "combobox" && it && (Ve = "", Q == null || Q(it), N(!1), Le = !1), U && Ae !== Ve && U(Ve, {
661
+ source: Ke ? "typing" : "effect"
662
+ }), Le;
663
+ }
664
+ }, Ze = function(X) {
665
+ !X || !X.trim() || U(X, {
666
+ source: "submit"
667
+ });
668
+ };
669
+ o.useEffect(function() {
670
+ !Me && !re && S !== "combobox" && be("", !1, !1);
671
+ }, [Me]), o.useEffect(function() {
672
+ dt && w && ft(!1), w && !Pe.current && Ee(!1);
673
+ }, [w]);
674
+ var We = Un(), tt = ne(We, 2), Ie = tt[0], nt = tt[1], Je = o.useRef(!1), Dt = function(X) {
675
+ var Ke = Ie(), Xe = X.key, Le = Xe === "Enter";
676
+ if (Le && (S !== "combobox" && X.preventDefault(), Me || N(!0)), nt(!!Ae), Xe === "Backspace" && !Ke && re && !Ae && m.length) {
677
+ for (var Ve = qe(m), ut = null, it = Ve.length - 1; it >= 0; it -= 1) {
678
+ var bt = Ve[it];
679
+ if (!bt.disabled) {
680
+ Ve.splice(it, 1), ut = bt;
681
+ break;
682
+ }
683
+ }
684
+ ut && s(Ve, {
685
+ type: "remove",
686
+ values: [ut]
687
+ });
688
+ }
689
+ for (var xt = arguments.length, St = new Array(xt > 1 ? xt - 1 : 0), zt = 1; zt < xt; zt++)
690
+ St[zt - 1] = arguments[zt];
691
+ if (Me && (!Le || !Je.current)) {
692
+ var Bt;
693
+ Le && (Je.current = !0), (Bt = $e.current) === null || Bt === void 0 || Bt.onKeyDown.apply(Bt, [X].concat(St));
694
+ }
695
+ F == null || F.apply(void 0, [X].concat(St));
696
+ }, Lt = function(X) {
697
+ for (var Ke = arguments.length, Xe = new Array(Ke > 1 ? Ke - 1 : 0), Le = 1; Le < Ke; Le++)
698
+ Xe[Le - 1] = arguments[Le];
699
+ if (Me) {
700
+ var Ve;
701
+ (Ve = $e.current) === null || Ve === void 0 || Ve.onKeyUp.apply(Ve, [X].concat(Xe));
702
+ }
703
+ X.key === "Enter" && (Je.current = !1), $ == null || $.apply(void 0, [X].concat(Xe));
704
+ }, rt = function(X) {
705
+ var Ke = m.filter(function(Xe) {
706
+ return Xe !== X;
707
+ });
708
+ s(Ke, {
709
+ type: "remove",
710
+ values: [X]
711
+ });
712
+ }, ke = function() {
713
+ Je.current = !1;
714
+ }, P = o.useRef(!1), O = function() {
715
+ Ee(!0), w || (D && !P.current && D.apply(void 0, arguments), y.includes("focus") && N(!0)), P.current = !0;
716
+ }, k = function() {
717
+ Pe.current = !0, Ee(!1, function() {
718
+ P.current = !1, Pe.current = !1, N(!1);
719
+ }), !w && (Ae && (S === "tags" ? U(Ae, {
720
+ source: "submit"
721
+ }) : S === "multiple" && U("", {
722
+ source: "blur"
723
+ })), K && K.apply(void 0, arguments));
724
+ }, me = [];
725
+ o.useEffect(function() {
726
+ return function() {
727
+ me.forEach(function(ce) {
728
+ return clearTimeout(ce);
729
+ }), me.splice(0, me.length);
730
+ };
731
+ }, []);
732
+ var Te = function(X) {
733
+ var Ke, Xe = X.target, Le = (Ke = Oe.current) === null || Ke === void 0 ? void 0 : Ke.getPopupElement();
734
+ if (Le && Le.contains(Xe)) {
735
+ var Ve = setTimeout(function() {
736
+ var xt = me.indexOf(Ve);
737
+ if (xt !== -1 && me.splice(xt, 1), gt(), !de && !Le.contains(document.activeElement)) {
738
+ var St;
739
+ (St = ye.current) === null || St === void 0 || St.focus();
740
+ }
741
+ });
742
+ me.push(Ve);
743
+ }
744
+ for (var ut = arguments.length, it = new Array(ut > 1 ? ut - 1 : 0), bt = 1; bt < ut; bt++)
745
+ it[bt - 1] = arguments[bt];
746
+ le == null || le.apply(void 0, [X].concat(it));
747
+ }, It = o.useState({}), ht = ne(It, 2), Kt = ht[1];
748
+ function Xt() {
749
+ Kt({});
750
+ }
751
+ var Nt;
752
+ De && (Nt = function(X) {
753
+ N(X);
754
+ }), to(function() {
755
+ var ce;
756
+ return [Ye.current, (ce = Oe.current) === null || ce === void 0 ? void 0 : ce.getPopupElement()];
757
+ }, at, N, !!De);
758
+ var Pt = o.useMemo(function() {
759
+ return ee(ee({}, e), {}, {
760
+ notFoundContent: g,
761
+ open: Me,
762
+ triggerOpen: at,
763
+ id: r,
764
+ showSearch: we,
765
+ multiple: re,
766
+ toggleOpen: N
767
+ });
768
+ }, [e, g, at, Me, r, we, re, N]), hn = !!Z || h, bn;
769
+ hn && (bn = /* @__PURE__ */ o.createElement(jt, {
770
+ className: He("".concat(a, "-arrow"), ae({}, "".concat(a, "-arrow-loading"), h)),
771
+ customizeIcon: Z,
772
+ customizeIconProps: {
773
+ loading: h,
774
+ searchValue: Ae,
775
+ open: Me,
776
+ focused: Fe,
777
+ showSearch: we
778
+ }
779
+ }));
780
+ var dr = function() {
781
+ var X;
782
+ v == null || v(), (X = ye.current) === null || X === void 0 || X.focus(), s([], {
783
+ type: "clear",
784
+ values: m
785
+ }), be("", !1, !1);
786
+ }, Sn = Jr(a, dr, m, j, Y, w, Ae, S), fr = Sn.allowClear, vr = Sn.clearIcon, mr = /* @__PURE__ */ o.createElement(x, {
787
+ ref: $e
788
+ }), gr = He(a, i, ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({}, "".concat(a, "-focused"), Fe), "".concat(a, "-multiple"), re), "".concat(a, "-single"), !re), "".concat(a, "-allow-clear"), j), "".concat(a, "-show-arrow"), hn), "".concat(a, "-disabled"), w), "".concat(a, "-loading"), h), "".concat(a, "-open"), Me), "".concat(a, "-customize-input"), _e), "".concat(a, "-show-search"), we)), wn = /* @__PURE__ */ o.createElement(qn, {
789
+ ref: Oe,
790
+ disabled: w,
791
+ prefixCls: a,
792
+ visible: at,
793
+ popupElement: mr,
794
+ animation: M,
795
+ transitionName: fe,
796
+ dropdownStyle: ie,
797
+ dropdownClassName: J,
798
+ direction: d,
799
+ dropdownMatchSelectWidth: se,
800
+ dropdownRender: Ce,
801
+ dropdownAlign: ge,
802
+ placement: Re,
803
+ builtinPlacements: ue,
804
+ getPopupContainer: pe,
805
+ empty: b,
806
+ getTriggerDOMNode: function(X) {
807
+ return (
808
+ // TODO: This is workaround and should be removed in `rc-select`
809
+ // And use new standard `nativeElement` for ref.
810
+ // But we should update `rc-resize-observer` first.
811
+ Se.current || X
812
+ );
813
+ },
814
+ onPopupVisibleChange: Nt,
815
+ onPopupMouseEnter: Xt
816
+ }, De ? /* @__PURE__ */ o.cloneElement(De, {
817
+ ref: Mt
818
+ }) : /* @__PURE__ */ o.createElement(Yn, ot({}, e, {
819
+ domRef: Se,
820
+ prefixCls: a,
821
+ inputElement: _e,
822
+ ref: ye,
823
+ id: r,
824
+ prefix: te,
825
+ showSearch: we,
826
+ autoClearSearchValue: A,
827
+ mode: S,
828
+ activeDescendantId: q,
829
+ tagRender: c,
830
+ values: m,
831
+ open: Me,
832
+ onToggleOpen: N,
833
+ activeValue: B,
834
+ searchValue: Ae,
835
+ onSearch: be,
836
+ onSearchSubmit: Ze,
837
+ onRemove: rt,
838
+ tokenWithEnter: H,
839
+ onInputBlur: ke
840
+ }))), Ut;
841
+ return De ? Ut = wn : Ut = /* @__PURE__ */ o.createElement("div", ot({
842
+ className: gr
843
+ }, Be, {
844
+ ref: Ye,
845
+ onMouseDown: Te,
846
+ onKeyDown: Dt,
847
+ onKeyUp: Lt,
848
+ onFocus: O,
849
+ onBlur: k
850
+ }), /* @__PURE__ */ o.createElement(So, {
851
+ visible: Fe && !Me,
852
+ values: m
853
+ }), wn, bn, fr && vr), /* @__PURE__ */ o.createElement(Xn.Provider, {
854
+ value: Pt
855
+ }, Ut);
856
+ });
857
+ process.env.NODE_ENV !== "production" && (Zn.displayName = "BaseSelect");
858
+ var vn = function() {
859
+ return null;
860
+ };
861
+ vn.isSelectOptGroup = !0;
862
+ var mn = function() {
863
+ return null;
864
+ };
865
+ mn.isSelectOption = !0;
866
+ var Jn = /* @__PURE__ */ o.forwardRef(function(e, t) {
867
+ var n = e.height, r = e.offsetY, a = e.offsetX, i = e.children, l = e.prefixCls, c = e.onInnerResize, d = e.innerProps, f = e.rtl, m = e.extra, s = {}, b = {
868
+ display: "flex",
869
+ flexDirection: "column"
870
+ };
871
+ return r !== void 0 && (s = {
872
+ height: n,
873
+ position: "relative",
874
+ overflow: "hidden"
875
+ }, b = ee(ee({}, b), {}, ae(ae(ae(ae(ae({
876
+ transform: "translateY(".concat(r, "px)")
877
+ }, f ? "marginRight" : "marginLeft", -a), "position", "absolute"), "left", 0), "right", 0), "top", 0))), /* @__PURE__ */ o.createElement("div", {
878
+ style: s
879
+ }, /* @__PURE__ */ o.createElement(Kn, {
880
+ onResize: function(g) {
881
+ var v = g.offsetHeight;
882
+ v && c && c();
883
+ }
884
+ }, /* @__PURE__ */ o.createElement("div", ot({
885
+ style: b,
886
+ className: He(ae({}, "".concat(l, "-holder-inner"), l)),
887
+ ref: t
888
+ }, d), i, m)));
889
+ });
890
+ Jn.displayName = "Filler";
891
+ function yo(e) {
892
+ var t = e.children, n = e.setRef, r = o.useCallback(function(a) {
893
+ n(a);
894
+ }, []);
895
+ return /* @__PURE__ */ o.cloneElement(t, {
896
+ ref: r
897
+ });
898
+ }
899
+ function Eo(e, t, n, r, a, i, l, c) {
900
+ var d = c.getKey;
901
+ return e.slice(t, n + 1).map(function(f, m) {
902
+ var s = t + m, b = l(f, s, {
903
+ style: {
904
+ width: r
905
+ },
906
+ offsetX: a
907
+ }), u = d(f);
908
+ return /* @__PURE__ */ o.createElement(yo, {
909
+ key: u,
910
+ setRef: function(v) {
911
+ return i(f, v);
912
+ }
913
+ }, b);
914
+ });
915
+ }
916
+ function Io(e, t, n) {
917
+ var r = e.length, a = t.length, i, l;
918
+ if (r === 0 && a === 0)
919
+ return null;
920
+ r < a ? (i = e, l = t) : (i = t, l = e);
921
+ var c = {
922
+ __EMPTY_ITEM__: !0
923
+ };
924
+ function d(g) {
925
+ return g !== void 0 ? n(g) : c;
926
+ }
927
+ for (var f = null, m = Math.abs(r - a) !== 1, s = 0; s < l.length; s += 1) {
928
+ var b = d(i[s]), u = d(l[s]);
929
+ if (b !== u) {
930
+ f = s, m = m || b !== d(l[s + 1]);
931
+ break;
932
+ }
933
+ }
934
+ return f === null ? null : {
935
+ index: f,
936
+ multiple: m
937
+ };
938
+ }
939
+ function xo(e, t, n) {
940
+ var r = o.useState(e), a = ne(r, 2), i = a[0], l = a[1], c = o.useState(null), d = ne(c, 2), f = d[0], m = d[1];
941
+ return o.useEffect(function() {
942
+ var s = Io(i || [], e || [], t);
943
+ (s == null ? void 0 : s.index) !== void 0 && (n == null || n(s.index), m(e[s.index])), l(e);
944
+ }, [e]), [f];
945
+ }
946
+ var Mn = (typeof navigator > "u" ? "undefined" : mt(navigator)) === "object" && /Firefox/i.test(navigator.userAgent);
947
+ const kn = function(e, t, n, r) {
948
+ var a = he(!1), i = he(null);
949
+ function l() {
950
+ clearTimeout(i.current), a.current = !0, i.current = setTimeout(function() {
951
+ a.current = !1;
952
+ }, 50);
953
+ }
954
+ var c = he({
955
+ top: e,
956
+ bottom: t,
957
+ left: n,
958
+ right: r
959
+ });
960
+ return c.current.top = e, c.current.bottom = t, c.current.left = n, c.current.right = r, function(d, f) {
961
+ var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, s = d ? (
962
+ // Pass origin wheel when on the left
963
+ f < 0 && c.current.left || // Pass origin wheel when on the right
964
+ f > 0 && c.current.right
965
+ ) : f < 0 && c.current.top || // Pass origin wheel when on the bottom
966
+ f > 0 && c.current.bottom;
967
+ return m && s ? (clearTimeout(i.current), a.current = !1) : (!s || a.current) && l(), !a.current && s;
968
+ };
969
+ };
970
+ function $o(e, t, n, r, a, i, l) {
971
+ var c = he(0), d = he(null), f = he(null), m = he(!1), s = kn(t, n, r, a);
972
+ function b(h, E) {
973
+ if (lt.cancel(d.current), !s(!1, E)) {
974
+ var C = h;
975
+ if (!C._virtualHandled)
976
+ C._virtualHandled = !0;
977
+ else
978
+ return;
979
+ c.current += E, f.current = E, Mn || C.preventDefault(), d.current = lt(function() {
980
+ var T = m.current ? 10 : 1;
981
+ l(c.current * T, !1), c.current = 0;
982
+ });
983
+ }
984
+ }
985
+ function u(h, E) {
986
+ l(E, !0), Mn || h.preventDefault();
987
+ }
988
+ var g = he(null), v = he(null);
989
+ function S(h) {
990
+ if (e) {
991
+ lt.cancel(v.current), v.current = lt(function() {
992
+ g.current = null;
993
+ }, 2);
994
+ var E = h.deltaX, C = h.deltaY, T = h.shiftKey, p = E, I = C;
995
+ (g.current === "sx" || !g.current && T && C && !E) && (p = C, I = 0, g.current = "sx");
996
+ var B = Math.abs(p), V = Math.abs(I);
997
+ g.current === null && (g.current = i && B > V ? "x" : "y"), g.current === "y" ? b(h, I) : u(h, p);
998
+ }
999
+ }
1000
+ function w(h) {
1001
+ e && (m.current = h.detail === f.current);
1002
+ }
1003
+ return [S, w];
1004
+ }
1005
+ function Ro(e, t, n, r) {
1006
+ var a = o.useMemo(function() {
1007
+ return [/* @__PURE__ */ new Map(), []];
1008
+ }, [e, n.id, r]), i = ne(a, 2), l = i[0], c = i[1], d = function(m) {
1009
+ var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : m, b = l.get(m), u = l.get(s);
1010
+ if (b === void 0 || u === void 0)
1011
+ for (var g = e.length, v = c.length; v < g; v += 1) {
1012
+ var S, w = e[v], h = t(w);
1013
+ l.set(h, v);
1014
+ var E = (S = n.get(h)) !== null && S !== void 0 ? S : r;
1015
+ if (c[v] = (c[v - 1] || 0) + E, h === m && (b = v), h === s && (u = v), b !== void 0 && u !== void 0)
1016
+ break;
1017
+ }
1018
+ return {
1019
+ top: c[b - 1] || 0,
1020
+ bottom: c[u]
1021
+ };
1022
+ };
1023
+ return d;
1024
+ }
1025
+ var Oo = /* @__PURE__ */ function() {
1026
+ function e() {
1027
+ Ir(this, e), ae(this, "maps", void 0), ae(this, "id", 0), ae(this, "diffKeys", /* @__PURE__ */ new Set()), this.maps = /* @__PURE__ */ Object.create(null);
1028
+ }
1029
+ return Er(e, [{
1030
+ key: "set",
1031
+ value: function(n, r) {
1032
+ this.maps[n] = r, this.id += 1, this.diffKeys.add(n);
1033
+ }
1034
+ }, {
1035
+ key: "get",
1036
+ value: function(n) {
1037
+ return this.maps[n];
1038
+ }
1039
+ /**
1040
+ * CacheMap will record the key changed.
1041
+ * To help to know what's update in the next render.
1042
+ */
1043
+ }, {
1044
+ key: "resetRecord",
1045
+ value: function() {
1046
+ this.diffKeys.clear();
1047
+ }
1048
+ }, {
1049
+ key: "getRecord",
1050
+ value: function() {
1051
+ return this.diffKeys;
1052
+ }
1053
+ }]), e;
1054
+ }();
1055
+ function Dn(e) {
1056
+ var t = parseFloat(e);
1057
+ return isNaN(t) ? 0 : t;
1058
+ }
1059
+ function Mo(e, t, n) {
1060
+ var r = o.useState(0), a = ne(r, 2), i = a[0], l = a[1], c = he(/* @__PURE__ */ new Map()), d = he(new Oo()), f = he(0);
1061
+ function m() {
1062
+ f.current += 1;
1063
+ }
1064
+ function s() {
1065
+ var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1066
+ m();
1067
+ var g = function() {
1068
+ var w = !1;
1069
+ c.current.forEach(function(h, E) {
1070
+ if (h && h.offsetParent) {
1071
+ var C = xr(h), T = C.offsetHeight, p = getComputedStyle(C), I = p.marginTop, B = p.marginBottom, V = Dn(I), q = Dn(B), _ = T + V + q;
1072
+ d.current.get(E) !== _ && (d.current.set(E, _), w = !0);
1073
+ }
1074
+ }), w && l(function(h) {
1075
+ return h + 1;
1076
+ });
1077
+ };
1078
+ if (u)
1079
+ g();
1080
+ else {
1081
+ f.current += 1;
1082
+ var v = f.current;
1083
+ Promise.resolve().then(function() {
1084
+ v === f.current && g();
1085
+ });
1086
+ }
1087
+ }
1088
+ function b(u, g) {
1089
+ var v = e(u), S = c.current.get(v);
1090
+ g ? (c.current.set(v, g), s()) : c.current.delete(v), !S != !g && (g ? t == null || t(u) : n == null || n(u));
1091
+ }
1092
+ return Qt(function() {
1093
+ return m;
1094
+ }, []), [b, s, d.current, i];
1095
+ }
1096
+ var Nn = 14 / 15;
1097
+ function Do(e, t, n) {
1098
+ var r = he(!1), a = he(0), i = he(0), l = he(null), c = he(null), d, f = function(u) {
1099
+ if (r.current) {
1100
+ var g = Math.ceil(u.touches[0].pageX), v = Math.ceil(u.touches[0].pageY), S = a.current - g, w = i.current - v, h = Math.abs(S) > Math.abs(w);
1101
+ h ? a.current = g : i.current = v;
1102
+ var E = n(h, h ? S : w, !1, u);
1103
+ E && u.preventDefault(), clearInterval(c.current), E && (c.current = setInterval(function() {
1104
+ h ? S *= Nn : w *= Nn;
1105
+ var C = Math.floor(h ? S : w);
1106
+ (!n(h, C, !0) || Math.abs(C) <= 0.1) && clearInterval(c.current);
1107
+ }, 16));
1108
+ }
1109
+ }, m = function() {
1110
+ r.current = !1, d();
1111
+ }, s = function(u) {
1112
+ d(), 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", f, {
1113
+ passive: !1
1114
+ }), l.current.addEventListener("touchend", m, {
1115
+ passive: !0
1116
+ }));
1117
+ };
1118
+ d = function() {
1119
+ l.current && (l.current.removeEventListener("touchmove", f), l.current.removeEventListener("touchend", m));
1120
+ }, Rt(function() {
1121
+ return e && t.current.addEventListener("touchstart", s, {
1122
+ passive: !0
1123
+ }), function() {
1124
+ var b;
1125
+ (b = t.current) === null || b === void 0 || b.removeEventListener("touchstart", s), d(), clearInterval(c.current);
1126
+ };
1127
+ }, [e]);
1128
+ }
1129
+ function Pn(e) {
1130
+ return Math.floor(Math.pow(e, 0.5));
1131
+ }
1132
+ function nn(e, t) {
1133
+ var n = "touches" in e ? e.touches[0] : e;
1134
+ return n[t ? "pageX" : "pageY"] - window[t ? "scrollX" : "scrollY"];
1135
+ }
1136
+ function No(e, t, n) {
1137
+ o.useEffect(function() {
1138
+ var r = t.current;
1139
+ if (e && r) {
1140
+ var a = !1, i, l, c = function() {
1141
+ lt.cancel(i);
1142
+ }, d = function b() {
1143
+ c(), i = lt(function() {
1144
+ n(l), b();
1145
+ });
1146
+ }, f = function(u) {
1147
+ var g = u;
1148
+ g._virtualHandled || (g._virtualHandled = !0, a = !0);
1149
+ }, m = function() {
1150
+ a = !1, c();
1151
+ }, s = function(u) {
1152
+ if (a) {
1153
+ var g = nn(u, !1), v = r.getBoundingClientRect(), S = v.top, w = v.bottom;
1154
+ if (g <= S) {
1155
+ var h = S - g;
1156
+ l = -Pn(h), d();
1157
+ } else if (g >= w) {
1158
+ var E = g - w;
1159
+ l = Pn(E), d();
1160
+ } else
1161
+ c();
1162
+ }
1163
+ };
1164
+ return r.addEventListener("mousedown", f), r.ownerDocument.addEventListener("mouseup", m), r.ownerDocument.addEventListener("mousemove", s), function() {
1165
+ r.removeEventListener("mousedown", f), r.ownerDocument.removeEventListener("mouseup", m), r.ownerDocument.removeEventListener("mousemove", s), c();
1166
+ };
1167
+ }
1168
+ }, [e]);
1169
+ }
1170
+ var _n = 10;
1171
+ function Po(e, t, n, r, a, i, l, c) {
1172
+ var d = o.useRef(), f = o.useState(null), m = ne(f, 2), s = m[0], b = m[1];
1173
+ return Rt(function() {
1174
+ if (s && s.times < _n) {
1175
+ if (!e.current) {
1176
+ b(function(Y) {
1177
+ return ee({}, Y);
1178
+ });
1179
+ return;
1180
+ }
1181
+ i();
1182
+ var u = s.targetAlign, g = s.originAlign, v = s.index, S = s.offset, w = e.current.clientHeight, h = !1, E = u, C = null;
1183
+ if (w) {
1184
+ for (var T = u || g, p = 0, I = 0, B = 0, V = Math.min(t.length - 1, v), q = 0; q <= V; q += 1) {
1185
+ var _ = a(t[q]);
1186
+ I = p;
1187
+ var A = n.get(_);
1188
+ B = I + (A === void 0 ? r : A), p = B;
1189
+ }
1190
+ for (var U = T === "top" ? S : w - S, Q = V; Q >= 0; Q -= 1) {
1191
+ var G = a(t[Q]), j = n.get(G);
1192
+ if (j === void 0) {
1193
+ h = !0;
1194
+ break;
1195
+ }
1196
+ if (U -= j, U <= 0)
1197
+ break;
1198
+ }
1199
+ switch (T) {
1200
+ case "top":
1201
+ C = I - S;
1202
+ break;
1203
+ case "bottom":
1204
+ C = B - w + S;
1205
+ break;
1206
+ default: {
1207
+ var te = e.current.scrollTop, Z = te + w;
1208
+ I < te ? E = "top" : B > Z && (E = "bottom");
1209
+ }
1210
+ }
1211
+ C !== null && l(C), C !== s.lastTop && (h = !0);
1212
+ }
1213
+ h && b(ee(ee({}, s), {}, {
1214
+ times: s.times + 1,
1215
+ targetAlign: E,
1216
+ lastTop: C
1217
+ }));
1218
+ } else
1219
+ process.env.NODE_ENV !== "production" && (s == null ? void 0 : s.times) === _n && Ue(!1, "Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.");
1220
+ }, [s, e.current]), function(u) {
1221
+ if (u == null) {
1222
+ c();
1223
+ return;
1224
+ }
1225
+ if (lt.cancel(d.current), typeof u == "number")
1226
+ l(u);
1227
+ else if (u && mt(u) === "object") {
1228
+ var g, v = u.align;
1229
+ "index" in u ? g = u.index : g = t.findIndex(function(h) {
1230
+ return a(h) === u.key;
1231
+ });
1232
+ var S = u.offset, w = S === void 0 ? 0 : S;
1233
+ b({
1234
+ times: 0,
1235
+ index: g,
1236
+ offset: w,
1237
+ originAlign: v
1238
+ });
1239
+ }
1240
+ };
1241
+ }
1242
+ var rn = /* @__PURE__ */ o.forwardRef(function(e, t) {
1243
+ var n = e.prefixCls, r = e.rtl, a = e.scrollOffset, i = e.scrollRange, l = e.onStartMove, c = e.onStopMove, d = e.onScroll, f = e.horizontal, m = e.spinSize, s = e.containerSize, b = e.style, u = e.thumbStyle, g = e.showScrollBar, v = o.useState(!1), S = ne(v, 2), w = S[0], h = S[1], E = o.useState(null), C = ne(E, 2), T = C[0], p = C[1], I = o.useState(null), B = ne(I, 2), V = B[0], q = B[1], _ = !r, A = o.useRef(), U = o.useRef(), Q = o.useState(g), G = ne(Q, 2), j = G[0], te = G[1], Z = o.useRef(), Y = function() {
1244
+ g === !0 || g === !1 || (clearTimeout(Z.current), te(!0), Z.current = setTimeout(function() {
1245
+ te(!1);
1246
+ }, 3e3));
1247
+ }, x = i - s || 0, M = s - m || 0, fe = o.useMemo(function() {
1248
+ if (a === 0 || x === 0)
1249
+ return 0;
1250
+ var R = a / x;
1251
+ return R * M;
1252
+ }, [a, x, M]), ie = function(y) {
1253
+ y.stopPropagation(), y.preventDefault();
1254
+ }, J = o.useRef({
1255
+ top: fe,
1256
+ dragging: w,
1257
+ pageY: T,
1258
+ startTop: V
1259
+ });
1260
+ J.current = {
1261
+ top: fe,
1262
+ dragging: w,
1263
+ pageY: T,
1264
+ startTop: V
1265
+ };
1266
+ var se = function(y) {
1267
+ h(!0), p(nn(y, f)), q(J.current.top), l(), y.stopPropagation(), y.preventDefault();
1268
+ };
1269
+ o.useEffect(function() {
1270
+ var R = function($) {
1271
+ $.preventDefault();
1272
+ }, y = A.current, D = U.current;
1273
+ return y.addEventListener("touchstart", R, {
1274
+ passive: !1
1275
+ }), D.addEventListener("touchstart", se, {
1276
+ passive: !1
1277
+ }), function() {
1278
+ y.removeEventListener("touchstart", R), D.removeEventListener("touchstart", se);
1279
+ };
1280
+ }, []);
1281
+ var Ce = o.useRef();
1282
+ Ce.current = x;
1283
+ var ge = o.useRef();
1284
+ ge.current = M, o.useEffect(function() {
1285
+ if (w) {
1286
+ var R, y = function($) {
1287
+ var F = J.current, le = F.dragging, ve = F.pageY, re = F.startTop;
1288
+ lt.cancel(R);
1289
+ var we = A.current.getBoundingClientRect(), Be = s / (f ? we.width : we.height);
1290
+ if (le) {
1291
+ var xe = (nn($, f) - ve) * Be, Ne = re;
1292
+ !_ && f ? Ne -= xe : Ne += xe;
1293
+ var de = Ce.current, Ge = ge.current, Ye = Ge ? Ne / Ge : 0, Se = Math.ceil(Ye * de);
1294
+ Se = Math.max(Se, 0), Se = Math.min(Se, de), R = lt(function() {
1295
+ d(Se, f);
1296
+ });
1297
+ }
1298
+ }, D = function() {
1299
+ h(!1), c();
1300
+ };
1301
+ return window.addEventListener("mousemove", y, {
1302
+ passive: !0
1303
+ }), window.addEventListener("touchmove", y, {
1304
+ passive: !0
1305
+ }), window.addEventListener("mouseup", D, {
1306
+ passive: !0
1307
+ }), window.addEventListener("touchend", D, {
1308
+ passive: !0
1309
+ }), function() {
1310
+ window.removeEventListener("mousemove", y), window.removeEventListener("touchmove", y), window.removeEventListener("mouseup", D), window.removeEventListener("touchend", D), lt.cancel(R);
1311
+ };
1312
+ }
1313
+ }, [w]), o.useEffect(function() {
1314
+ return Y(), function() {
1315
+ clearTimeout(Z.current);
1316
+ };
1317
+ }, [a]), o.useImperativeHandle(t, function() {
1318
+ return {
1319
+ delayHidden: Y
1320
+ };
1321
+ });
1322
+ var Re = "".concat(n, "-scrollbar"), ue = {
1323
+ position: "absolute",
1324
+ visibility: j ? null : "hidden"
1325
+ }, pe = {
1326
+ position: "absolute",
1327
+ background: "rgba(0, 0, 0, 0.5)",
1328
+ borderRadius: 99,
1329
+ cursor: "pointer",
1330
+ userSelect: "none"
1331
+ };
1332
+ return f ? (ue.height = 8, ue.left = 0, ue.right = 0, ue.bottom = 0, pe.height = "100%", pe.width = m, _ ? pe.left = fe : pe.right = fe) : (ue.width = 8, ue.top = 0, ue.bottom = 0, _ ? ue.right = 0 : ue.left = 0, pe.width = "100%", pe.height = m, pe.top = fe), /* @__PURE__ */ o.createElement("div", {
1333
+ ref: A,
1334
+ className: He(Re, ae(ae(ae({}, "".concat(Re, "-horizontal"), f), "".concat(Re, "-vertical"), !f), "".concat(Re, "-visible"), j)),
1335
+ style: ee(ee({}, ue), b),
1336
+ onMouseDown: ie,
1337
+ onMouseMove: Y
1338
+ }, /* @__PURE__ */ o.createElement("div", {
1339
+ ref: U,
1340
+ className: He("".concat(Re, "-thumb"), ae({}, "".concat(Re, "-thumb-moving"), w)),
1341
+ style: ee(ee({}, pe), u),
1342
+ onMouseDown: se
1343
+ }));
1344
+ });
1345
+ process.env.NODE_ENV !== "production" && (rn.displayName = "ScrollBar");
1346
+ var _o = 20;
1347
+ function Tn() {
1348
+ 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;
1349
+ return isNaN(n) && (n = 0), n = Math.max(n, _o), Math.floor(n);
1350
+ }
1351
+ var To = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"], Lo = [], zo = {
1352
+ overflowY: "auto",
1353
+ overflowAnchor: "none"
1354
+ };
1355
+ function Bo(e, t) {
1356
+ var n = e.prefixCls, r = n === void 0 ? "rc-virtual-list" : n, a = e.className, i = e.height, l = e.itemHeight, c = e.fullHeight, d = c === void 0 ? !0 : c, f = e.style, m = e.data, s = e.children, b = e.itemKey, u = e.virtual, g = e.direction, v = e.scrollWidth, S = e.component, w = S === void 0 ? "div" : S, h = e.onScroll, E = e.onVirtualScroll, C = e.onVisibleChange, T = e.innerProps, p = e.extraRender, I = e.styles, B = e.showScrollBar, V = B === void 0 ? "optional" : B, q = wt(e, To), _ = o.useCallback(function(P) {
1357
+ return typeof b == "function" ? b(P) : P == null ? void 0 : P[b];
1358
+ }, [b]), A = Mo(_, null, null), U = ne(A, 4), Q = U[0], G = U[1], j = U[2], te = U[3], Z = !!(u !== !1 && i && l), Y = o.useMemo(function() {
1359
+ return Object.values(j.maps).reduce(function(P, O) {
1360
+ return P + O;
1361
+ }, 0);
1362
+ }, [j.id, j.maps]), x = Z && m && (Math.max(l * m.length, Y) > i || !!v), M = g === "rtl", fe = He(r, ae({}, "".concat(r, "-rtl"), M), a), ie = m || Lo, J = he(), se = he(), Ce = he(), ge = Tt(0), Re = ne(ge, 2), ue = Re[0], pe = Re[1], R = Tt(0), y = ne(R, 2), D = y[0], K = y[1], $ = Tt(!1), F = ne($, 2), le = F[0], ve = F[1], re = function() {
1363
+ ve(!0);
1364
+ }, we = function() {
1365
+ ve(!1);
1366
+ }, Be = {
1367
+ getKey: _
1368
+ };
1369
+ function xe(P) {
1370
+ pe(function(O) {
1371
+ var k;
1372
+ typeof P == "function" ? k = P(O) : k = P;
1373
+ var me = Et(k);
1374
+ return J.current.scrollTop = me, me;
1375
+ });
1376
+ }
1377
+ var Ne = he({
1378
+ start: 0,
1379
+ end: ie.length
1380
+ }), de = he(), Ge = xo(ie, _), Ye = ne(Ge, 1), Se = Ye[0];
1381
+ de.current = Se;
1382
+ var Oe = o.useMemo(function() {
1383
+ if (!Z)
1384
+ return {
1385
+ scrollHeight: void 0,
1386
+ start: 0,
1387
+ end: ie.length - 1,
1388
+ offset: void 0
1389
+ };
1390
+ if (!x) {
1391
+ var P;
1392
+ return {
1393
+ scrollHeight: ((P = se.current) === null || P === void 0 ? void 0 : P.offsetHeight) || 0,
1394
+ start: 0,
1395
+ end: ie.length - 1,
1396
+ offset: void 0
1397
+ };
1398
+ }
1399
+ for (var O = 0, k, me, Te, It = ie.length, ht = 0; ht < It; ht += 1) {
1400
+ var Kt = ie[ht], Xt = _(Kt), Nt = j.get(Xt), Pt = O + (Nt === void 0 ? l : Nt);
1401
+ Pt >= ue && k === void 0 && (k = ht, me = O), Pt > ue + i && Te === void 0 && (Te = ht), O = Pt;
1402
+ }
1403
+ return k === void 0 && (k = 0, me = 0, Te = Math.ceil(i / l)), Te === void 0 && (Te = ie.length - 1), Te = Math.min(Te + 1, ie.length - 1), {
1404
+ scrollHeight: O,
1405
+ start: k,
1406
+ end: Te,
1407
+ offset: me
1408
+ };
1409
+ }, [x, Z, ue, ie, te, i]), ye = Oe.scrollHeight, $e = Oe.start, Pe = Oe.end, et = Oe.offset;
1410
+ Ne.current.start = $e, Ne.current.end = Pe, o.useLayoutEffect(function() {
1411
+ var P = j.getRecord();
1412
+ if (P.size === 1) {
1413
+ var O = Array.from(P)[0], k = _(ie[$e]);
1414
+ if (k === O) {
1415
+ var me = j.get(O), Te = me - l;
1416
+ xe(function(It) {
1417
+ return It + Te;
1418
+ });
1419
+ }
1420
+ }
1421
+ j.resetRecord();
1422
+ }, [ye]);
1423
+ var je = o.useState({
1424
+ width: 0,
1425
+ height: i
1426
+ }), Fe = ne(je, 2), Ee = Fe[0], gt = Fe[1], Ae = function(O) {
1427
+ gt({
1428
+ width: O.offsetWidth,
1429
+ height: O.offsetHeight
1430
+ });
1431
+ }, _e = he(), De = he(), Mt = o.useMemo(function() {
1432
+ return Tn(Ee.width, v);
1433
+ }, [Ee.width, v]), yt = o.useMemo(function() {
1434
+ return Tn(Ee.height, ye);
1435
+ }, [Ee.height, ye]), st = ye - i, pt = he(st);
1436
+ pt.current = st;
1437
+ function Et(P) {
1438
+ var O = P;
1439
+ return Number.isNaN(pt.current) || (O = Math.min(O, pt.current)), O = Math.max(O, 0), O;
1440
+ }
1441
+ var ct = ue <= 0, Qe = ue >= st, dt = D <= 0, ft = D >= v, Me = kn(ct, Qe, dt, ft), vt = function() {
1442
+ return {
1443
+ x: M ? -D : D,
1444
+ y: ue
1445
+ };
1446
+ }, at = he(vt()), N = yn(function(P) {
1447
+ if (E) {
1448
+ var O = ee(ee({}, vt()), P);
1449
+ (at.current.x !== O.x || at.current.y !== O.y) && (E(O), at.current = O);
1450
+ }
1451
+ });
1452
+ function H(P, O) {
1453
+ var k = P;
1454
+ O ? (In(function() {
1455
+ K(k);
1456
+ }), N()) : xe(k);
1457
+ }
1458
+ function L(P) {
1459
+ var O = P.currentTarget.scrollTop;
1460
+ O !== ue && xe(O), h == null || h(P), N();
1461
+ }
1462
+ var z = function(O) {
1463
+ var k = O, me = v ? v - Ee.width : 0;
1464
+ return k = Math.max(k, 0), k = Math.min(k, me), k;
1465
+ }, oe = yn(function(P, O) {
1466
+ O ? (In(function() {
1467
+ K(function(k) {
1468
+ var me = k + (M ? -P : P);
1469
+ return z(me);
1470
+ });
1471
+ }), N()) : xe(function(k) {
1472
+ var me = k + P;
1473
+ return me;
1474
+ });
1475
+ }), be = $o(Z, ct, Qe, dt, ft, !!v, oe), Ze = ne(be, 2), We = Ze[0], tt = Ze[1];
1476
+ Do(Z, J, function(P, O, k, me) {
1477
+ var Te = me;
1478
+ return Me(P, O, k) ? !1 : !Te || !Te._virtualHandled ? (Te && (Te._virtualHandled = !0), We({
1479
+ preventDefault: function() {
1480
+ },
1481
+ deltaX: P ? O : 0,
1482
+ deltaY: P ? 0 : O
1483
+ }), !0) : !1;
1484
+ }), No(x, J, function(P) {
1485
+ xe(function(O) {
1486
+ return O + P;
1487
+ });
1488
+ }), Rt(function() {
1489
+ function P(k) {
1490
+ var me = ct && k.detail < 0, Te = Qe && k.detail > 0;
1491
+ Z && !me && !Te && k.preventDefault();
1492
+ }
1493
+ var O = J.current;
1494
+ return O.addEventListener("wheel", We, {
1495
+ passive: !1
1496
+ }), O.addEventListener("DOMMouseScroll", tt, {
1497
+ passive: !0
1498
+ }), O.addEventListener("MozMousePixelScroll", P, {
1499
+ passive: !1
1500
+ }), function() {
1501
+ O.removeEventListener("wheel", We), O.removeEventListener("DOMMouseScroll", tt), O.removeEventListener("MozMousePixelScroll", P);
1502
+ };
1503
+ }, [Z, ct, Qe]), Rt(function() {
1504
+ if (v) {
1505
+ var P = z(D);
1506
+ K(P), N({
1507
+ x: P
1508
+ });
1509
+ }
1510
+ }, [Ee.width, v]);
1511
+ var Ie = function() {
1512
+ var O, k;
1513
+ (O = _e.current) === null || O === void 0 || O.delayHidden(), (k = De.current) === null || k === void 0 || k.delayHidden();
1514
+ }, nt = Po(J, ie, j, l, _, function() {
1515
+ return G(!0);
1516
+ }, xe, Ie);
1517
+ o.useImperativeHandle(t, function() {
1518
+ return {
1519
+ nativeElement: Ce.current,
1520
+ getScrollInfo: vt,
1521
+ scrollTo: function(O) {
1522
+ function k(me) {
1523
+ return me && mt(me) === "object" && ("left" in me || "top" in me);
1524
+ }
1525
+ k(O) ? (O.left !== void 0 && K(z(O.left)), nt(O.top)) : nt(O);
1526
+ }
1527
+ };
1528
+ }), Rt(function() {
1529
+ if (C) {
1530
+ var P = ie.slice($e, Pe + 1);
1531
+ C(P, ie);
1532
+ }
1533
+ }, [$e, Pe, ie]);
1534
+ var Je = Ro(ie, _, j, l), Dt = p == null ? void 0 : p({
1535
+ start: $e,
1536
+ end: Pe,
1537
+ virtual: x,
1538
+ offsetX: D,
1539
+ offsetY: et,
1540
+ rtl: M,
1541
+ getSize: Je
1542
+ }), Lt = Eo(ie, $e, Pe, v, D, Q, s, Be), rt = null;
1543
+ i && (rt = ee(ae({}, d ? "height" : "maxHeight", i), zo), Z && (rt.overflowY = "hidden", v && (rt.overflowX = "hidden"), le && (rt.pointerEvents = "none")));
1544
+ var ke = {};
1545
+ return M && (ke.dir = "rtl"), /* @__PURE__ */ o.createElement("div", ot({
1546
+ ref: Ce,
1547
+ style: ee(ee({}, f), {}, {
1548
+ position: "relative"
1549
+ }),
1550
+ className: fe
1551
+ }, ke, q), /* @__PURE__ */ o.createElement(Kn, {
1552
+ onResize: Ae
1553
+ }, /* @__PURE__ */ o.createElement(w, {
1554
+ className: "".concat(r, "-holder"),
1555
+ style: rt,
1556
+ ref: J,
1557
+ onScroll: L,
1558
+ onMouseEnter: Ie
1559
+ }, /* @__PURE__ */ o.createElement(Jn, {
1560
+ prefixCls: r,
1561
+ height: ye,
1562
+ offsetX: D,
1563
+ offsetY: et,
1564
+ scrollWidth: v,
1565
+ onInnerResize: G,
1566
+ ref: se,
1567
+ innerProps: T,
1568
+ rtl: M,
1569
+ extra: Dt
1570
+ }, Lt))), x && ye > i && /* @__PURE__ */ o.createElement(rn, {
1571
+ ref: _e,
1572
+ prefixCls: r,
1573
+ scrollOffset: ue,
1574
+ scrollRange: ye,
1575
+ rtl: M,
1576
+ onScroll: H,
1577
+ onStartMove: re,
1578
+ onStopMove: we,
1579
+ spinSize: yt,
1580
+ containerSize: Ee.height,
1581
+ style: I == null ? void 0 : I.verticalScrollBar,
1582
+ thumbStyle: I == null ? void 0 : I.verticalScrollBarThumb,
1583
+ showScrollBar: V
1584
+ }), x && v > Ee.width && /* @__PURE__ */ o.createElement(rn, {
1585
+ ref: De,
1586
+ prefixCls: r,
1587
+ scrollOffset: D,
1588
+ scrollRange: v,
1589
+ rtl: M,
1590
+ onScroll: H,
1591
+ onStartMove: re,
1592
+ onStopMove: we,
1593
+ spinSize: Mt,
1594
+ containerSize: Ee.width,
1595
+ horizontal: !0,
1596
+ style: I == null ? void 0 : I.horizontalScrollBar,
1597
+ thumbStyle: I == null ? void 0 : I.horizontalScrollBarThumb,
1598
+ showScrollBar: V
1599
+ }));
1600
+ }
1601
+ var er = /* @__PURE__ */ o.forwardRef(Bo);
1602
+ er.displayName = "List";
1603
+ function Ho() {
1604
+ return /(mac\sos|macintosh)/i.test(navigator.appVersion);
1605
+ }
1606
+ var Vo = ["disabled", "title", "children", "style", "className"];
1607
+ function Ln(e) {
1608
+ return typeof e == "string" || typeof e == "number";
1609
+ }
1610
+ var Fo = function(t, n) {
1611
+ var r = kr(), a = r.prefixCls, i = r.id, l = r.open, c = r.multiple, d = r.mode, f = r.searchValue, m = r.toggleOpen, s = r.notFoundContent, b = r.onPopupScroll, u = o.useContext(fn), g = u.maxCount, v = u.flattenOptions, S = u.onActiveValue, w = u.defaultActiveFirstOption, h = u.onSelect, E = u.menuItemSelectedIcon, C = u.rawValues, T = u.fieldNames, p = u.virtual, I = u.direction, B = u.listHeight, V = u.listItemHeight, q = u.optionRender, _ = "".concat(a, "-item"), A = $r(function() {
1612
+ return v;
1613
+ }, [l, v], function(R, y) {
1614
+ return y[0] && R[1] !== y[1];
1615
+ }), U = o.useRef(null), Q = o.useMemo(function() {
1616
+ return c && en(g) && (C == null ? void 0 : C.size) >= g;
1617
+ }, [c, g, C == null ? void 0 : C.size]), G = function(y) {
1618
+ y.preventDefault();
1619
+ }, j = function(y) {
1620
+ var D;
1621
+ (D = U.current) === null || D === void 0 || D.scrollTo(typeof y == "number" ? {
1622
+ index: y
1623
+ } : y);
1624
+ }, te = o.useCallback(function(R) {
1625
+ return d === "combobox" ? !1 : C.has(R);
1626
+ }, [d, qe(C).toString(), C.size]), Z = function(y) {
1627
+ for (var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, K = A.length, $ = 0; $ < K; $ += 1) {
1628
+ var F = (y + $ * D + K) % K, le = A[F] || {}, ve = le.group, re = le.data;
1629
+ if (!ve && !(re != null && re.disabled) && (te(re.value) || !Q))
1630
+ return F;
1631
+ }
1632
+ return -1;
1633
+ }, Y = o.useState(function() {
1634
+ return Z(0);
1635
+ }), x = ne(Y, 2), M = x[0], fe = x[1], ie = function(y) {
1636
+ var D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1637
+ fe(y);
1638
+ var K = {
1639
+ source: D ? "keyboard" : "mouse"
1640
+ }, $ = A[y];
1641
+ if (!$) {
1642
+ S(null, -1, K);
1643
+ return;
1644
+ }
1645
+ S($.value, y, K);
1646
+ };
1647
+ Qt(function() {
1648
+ ie(w !== !1 ? Z(0) : -1);
1649
+ }, [A.length, f]);
1650
+ var J = o.useCallback(function(R) {
1651
+ return d === "combobox" ? String(R).toLowerCase() === f.toLowerCase() : C.has(R);
1652
+ }, [d, f, qe(C).toString(), C.size]);
1653
+ Qt(function() {
1654
+ var R = setTimeout(function() {
1655
+ if (!c && l && C.size === 1) {
1656
+ var D = Array.from(C)[0], K = A.findIndex(function($) {
1657
+ var F = $.data;
1658
+ return F.value === D;
1659
+ });
1660
+ K !== -1 && (ie(K), j(K));
1661
+ }
1662
+ });
1663
+ if (l) {
1664
+ var y;
1665
+ (y = U.current) === null || y === void 0 || y.scrollTo(void 0);
1666
+ }
1667
+ return function() {
1668
+ return clearTimeout(R);
1669
+ };
1670
+ }, [l, f]);
1671
+ var se = function(y) {
1672
+ y !== void 0 && h(y, {
1673
+ selected: !C.has(y)
1674
+ }), c || m(!1);
1675
+ };
1676
+ if (o.useImperativeHandle(n, function() {
1677
+ return {
1678
+ onKeyDown: function(y) {
1679
+ var D = y.which, K = y.ctrlKey;
1680
+ switch (D) {
1681
+ case W.N:
1682
+ case W.P:
1683
+ case W.UP:
1684
+ case W.DOWN: {
1685
+ var $ = 0;
1686
+ if (D === W.UP ? $ = -1 : D === W.DOWN ? $ = 1 : Ho() && K && (D === W.N ? $ = 1 : D === W.P && ($ = -1)), $ !== 0) {
1687
+ var F = Z(M + $, $);
1688
+ j(F), ie(F, !0);
1689
+ }
1690
+ break;
1691
+ }
1692
+ case W.TAB:
1693
+ case W.ENTER: {
1694
+ var le, ve = A[M];
1695
+ ve && !(ve != null && (le = ve.data) !== null && le !== void 0 && le.disabled) && !Q ? se(ve.value) : se(void 0), l && y.preventDefault();
1696
+ break;
1697
+ }
1698
+ case W.ESC:
1699
+ m(!1), l && y.stopPropagation();
1700
+ }
1701
+ },
1702
+ onKeyUp: function() {
1703
+ },
1704
+ scrollTo: function(y) {
1705
+ j(y);
1706
+ }
1707
+ };
1708
+ }), A.length === 0)
1709
+ return /* @__PURE__ */ o.createElement("div", {
1710
+ role: "listbox",
1711
+ id: "".concat(i, "_list"),
1712
+ className: "".concat(_, "-empty"),
1713
+ onMouseDown: G
1714
+ }, s);
1715
+ var Ce = Object.keys(T).map(function(R) {
1716
+ return T[R];
1717
+ }), ge = function(y) {
1718
+ return y.label;
1719
+ };
1720
+ function Re(R, y) {
1721
+ var D = R.group;
1722
+ return {
1723
+ role: D ? "presentation" : "option",
1724
+ id: "".concat(i, "_list_").concat(y)
1725
+ };
1726
+ }
1727
+ var ue = function(y) {
1728
+ var D = A[y];
1729
+ if (!D)
1730
+ return null;
1731
+ var K = D.data || {}, $ = K.value, F = D.group, le = Vt(K, !0), ve = ge(D);
1732
+ return D ? /* @__PURE__ */ o.createElement("div", ot({
1733
+ "aria-label": typeof ve == "string" && !F ? ve : null
1734
+ }, le, {
1735
+ key: y
1736
+ }, Re(D, y), {
1737
+ "aria-selected": J($)
1738
+ }), $) : null;
1739
+ }, pe = {
1740
+ role: "listbox",
1741
+ id: "".concat(i, "_list")
1742
+ };
1743
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, p && /* @__PURE__ */ o.createElement("div", ot({}, pe, {
1744
+ style: {
1745
+ height: 0,
1746
+ width: 0,
1747
+ overflow: "hidden"
1748
+ }
1749
+ }), ue(M - 1), ue(M), ue(M + 1)), /* @__PURE__ */ o.createElement(er, {
1750
+ itemKey: "key",
1751
+ ref: U,
1752
+ data: A,
1753
+ height: B,
1754
+ itemHeight: V,
1755
+ fullHeight: !1,
1756
+ onMouseDown: G,
1757
+ onScroll: b,
1758
+ virtual: p,
1759
+ direction: I,
1760
+ innerProps: p ? null : pe
1761
+ }, function(R, y) {
1762
+ var D = R.group, K = R.groupOption, $ = R.data, F = R.label, le = R.value, ve = $.key;
1763
+ if (D) {
1764
+ var re, we = (re = $.title) !== null && re !== void 0 ? re : Ln(F) ? F.toString() : void 0;
1765
+ return /* @__PURE__ */ o.createElement("div", {
1766
+ className: He(_, "".concat(_, "-group"), $.className),
1767
+ title: we
1768
+ }, F !== void 0 ? F : ve);
1769
+ }
1770
+ var Be = $.disabled, xe = $.title;
1771
+ $.children;
1772
+ var Ne = $.style, de = $.className, Ge = wt($, Vo), Ye = Wn(Ge, Ce), Se = te(le), Oe = Be || !Se && Q, ye = "".concat(_, "-option"), $e = He(_, ye, de, ae(ae(ae(ae({}, "".concat(ye, "-grouped"), K), "".concat(ye, "-active"), M === y && !Oe), "".concat(ye, "-disabled"), Oe), "".concat(ye, "-selected"), Se)), Pe = ge(R), et = !E || typeof E == "function" || Se, je = typeof Pe == "number" ? Pe : Pe || le, Fe = Ln(je) ? je.toString() : void 0;
1773
+ return xe !== void 0 && (Fe = xe), /* @__PURE__ */ o.createElement("div", ot({}, Vt(Ye), p ? {} : Re(R, y), {
1774
+ "aria-selected": J(le),
1775
+ className: $e,
1776
+ title: Fe,
1777
+ onMouseMove: function() {
1778
+ M === y || Oe || ie(y);
1779
+ },
1780
+ onClick: function() {
1781
+ Oe || se(le);
1782
+ },
1783
+ style: Ne
1784
+ }), /* @__PURE__ */ o.createElement("div", {
1785
+ className: "".concat(ye, "-content")
1786
+ }, typeof q == "function" ? q(R, {
1787
+ index: y
1788
+ }) : je), /* @__PURE__ */ o.isValidElement(E) || Se, et && /* @__PURE__ */ o.createElement(jt, {
1789
+ className: "".concat(_, "-option-state"),
1790
+ customizeIcon: E,
1791
+ customizeIconProps: {
1792
+ value: le,
1793
+ disabled: Oe,
1794
+ isSelected: Se
1795
+ }
1796
+ }, Se ? "✓" : null));
1797
+ }));
1798
+ }, tr = /* @__PURE__ */ o.forwardRef(Fo);
1799
+ process.env.NODE_ENV !== "production" && (tr.displayName = "OptionList");
1800
+ const Ao = function(e, t) {
1801
+ var n = o.useRef({
1802
+ values: /* @__PURE__ */ new Map(),
1803
+ options: /* @__PURE__ */ new Map()
1804
+ }), r = o.useMemo(function() {
1805
+ var i = n.current, l = i.values, c = i.options, d = e.map(function(s) {
1806
+ if (s.label === void 0) {
1807
+ var b;
1808
+ return ee(ee({}, s), {}, {
1809
+ label: (b = l.get(s.value)) === null || b === void 0 ? void 0 : b.label
1810
+ });
1811
+ }
1812
+ return s;
1813
+ }), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
1814
+ return d.forEach(function(s) {
1815
+ f.set(s.value, s), m.set(s.value, t.get(s.value) || c.get(s.value));
1816
+ }), n.current.values = f, n.current.options = m, d;
1817
+ }, [e, t]), a = o.useCallback(function(i) {
1818
+ return t.get(i) || n.current.options.get(i);
1819
+ }, [t]);
1820
+ return [r, a];
1821
+ };
1822
+ function Gt(e, t) {
1823
+ return dn(e).join("").toUpperCase().includes(t);
1824
+ }
1825
+ const jo = function(e, t, n, r, a) {
1826
+ return o.useMemo(function() {
1827
+ if (!n || r === !1)
1828
+ return e;
1829
+ var i = t.options, l = t.label, c = t.value, d = [], f = typeof r == "function", m = n.toUpperCase(), s = f ? r : function(u, g) {
1830
+ return a ? Gt(g[a], m) : g[i] ? Gt(g[l !== "children" ? l : "label"], m) : Gt(g[c], m);
1831
+ }, b = f ? function(u) {
1832
+ return tn(u);
1833
+ } : function(u) {
1834
+ return u;
1835
+ };
1836
+ return e.forEach(function(u) {
1837
+ if (u[i]) {
1838
+ var g = s(n, b(u));
1839
+ if (g)
1840
+ d.push(u);
1841
+ else {
1842
+ var v = u[i].filter(function(S) {
1843
+ return s(n, b(S));
1844
+ });
1845
+ v.length && d.push(ee(ee({}, u), {}, ae({}, i, v)));
1846
+ }
1847
+ return;
1848
+ }
1849
+ s(n, b(u)) && d.push(u);
1850
+ }), d;
1851
+ }, [e, r, a, n, t]);
1852
+ };
1853
+ var zn = 0, Wo = process.env.NODE_ENV !== "test" && Sr();
1854
+ function Ko() {
1855
+ var e;
1856
+ return Wo ? (e = zn, zn += 1) : e = "TEST_OR_SSR", e;
1857
+ }
1858
+ function Xo(e) {
1859
+ var t = o.useState(), n = ne(t, 2), r = n[0], a = n[1];
1860
+ return o.useEffect(function() {
1861
+ a("rc_select_".concat(Ko()));
1862
+ }, []), e || r;
1863
+ }
1864
+ var Uo = ["children", "value"], Go = ["children"];
1865
+ function Yo(e) {
1866
+ var t = e, n = t.key, r = t.props, a = r.children, i = r.value, l = wt(r, Uo);
1867
+ return ee({
1868
+ key: n,
1869
+ value: i !== void 0 ? i : n,
1870
+ children: a
1871
+ }, l);
1872
+ }
1873
+ function gn(e) {
1874
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
1875
+ return kt(e).map(function(n, r) {
1876
+ if (!/* @__PURE__ */ o.isValidElement(n) || !n.type)
1877
+ return null;
1878
+ var a = n, i = a.type.isSelectOptGroup, l = a.key, c = a.props, d = c.children, f = wt(c, Go);
1879
+ return t || !i ? Yo(n) : ee(ee({
1880
+ key: "__RC_SELECT_GRP__".concat(l === null ? r : l, "__"),
1881
+ label: l
1882
+ }, f), {}, {
1883
+ options: gn(d)
1884
+ });
1885
+ }).filter(function(n) {
1886
+ return n;
1887
+ });
1888
+ }
1889
+ var qo = function(t, n, r, a, i) {
1890
+ return o.useMemo(function() {
1891
+ var l = t, c = !t;
1892
+ c && (l = gn(n));
1893
+ var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), m = function(u, g, v) {
1894
+ v && typeof v == "string" && u.set(g[v], g);
1895
+ }, s = function b(u) {
1896
+ for (var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, v = 0; v < u.length; v += 1) {
1897
+ var S = u[v];
1898
+ !S[r.options] || g ? (d.set(S[r.value], S), m(f, S, r.label), m(f, S, a), m(f, S, i)) : b(S[r.options], !0);
1899
+ }
1900
+ };
1901
+ return s(l), {
1902
+ options: l,
1903
+ valueOptions: d,
1904
+ labelOptions: f
1905
+ };
1906
+ }, [t, n, r, a, i]);
1907
+ };
1908
+ function Bn(e) {
1909
+ var t = o.useRef();
1910
+ t.current = e;
1911
+ var n = o.useCallback(function() {
1912
+ return t.current.apply(t, arguments);
1913
+ }, []);
1914
+ return n;
1915
+ }
1916
+ function Qo(e) {
1917
+ var t = e.mode, n = e.options, r = e.children, a = e.backfill, i = e.allowClear, l = e.placeholder, c = e.getInputElement, d = e.showSearch, f = e.onSearch, m = e.defaultOpen, s = e.autoFocus, b = e.labelInValue, u = e.value, g = e.inputValue, v = e.optionLabelProp, S = Ft(t), w = d !== void 0 ? d : S || t === "combobox", h = n || gn(r);
1918
+ if (Ue(t !== "tags" || h.every(function(p) {
1919
+ return !p.disabled;
1920
+ }), "Please avoid setting option to disabled in tags mode since user can always type text as tag."), t === "tags" || t === "combobox") {
1921
+ var E = h.some(function(p) {
1922
+ return p.options ? p.options.some(function(I) {
1923
+ return typeof ("value" in I ? I.value : I.key) == "number";
1924
+ }) : typeof ("value" in p ? p.value : p.key) == "number";
1925
+ });
1926
+ Ue(!E, "`value` of Option should not use number type when `mode` is `tags` or `combobox`.");
1927
+ }
1928
+ if (Ue(t !== "combobox" || !v, "`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."), Ue(t === "combobox" || !a, "`backfill` only works with `combobox` mode."), Ue(t === "combobox" || !c, "`getInputElement` only work with `combobox` mode."), Cn(t !== "combobox" || !c || !i || !l, "Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."), f && !w && t !== "combobox" && t !== "tags" && Ue(!1, "`onSearch` should work with `showSearch` instead of use alone."), Cn(!m || s, "`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."), u != null) {
1929
+ var C = dn(u);
1930
+ Ue(!b || C.every(function(p) {
1931
+ return mt(p) === "object" && ("key" in p || "value" in p);
1932
+ }), "`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"), Ue(!S || Array.isArray(u), "`value` should be array when `mode` is `multiple` or `tags`");
1933
+ }
1934
+ if (r) {
1935
+ var T = null;
1936
+ kt(r).some(function(p) {
1937
+ if (!/* @__PURE__ */ o.isValidElement(p) || !p.type)
1938
+ return !1;
1939
+ var I = p, B = I.type;
1940
+ if (B.isSelectOption)
1941
+ return !1;
1942
+ if (B.isSelectOptGroup) {
1943
+ var V = kt(p.props.children).every(function(q) {
1944
+ return !/* @__PURE__ */ o.isValidElement(q) || !p.type || q.type.isSelectOption ? !0 : (T = q.type, !1);
1945
+ });
1946
+ return !V;
1947
+ }
1948
+ return T = B, !0;
1949
+ }), T && Ue(!1, "`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(T.displayName || T.name || T, "`.")), Ue(g === void 0, "`inputValue` is deprecated, please use `searchValue` instead.");
1950
+ }
1951
+ }
1952
+ function Zo(e, t) {
1953
+ if (e) {
1954
+ var n = function r(a) {
1955
+ for (var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l = 0; l < a.length; l++) {
1956
+ var c = a[l];
1957
+ if (c[t == null ? void 0 : t.value] === null)
1958
+ return Ue(!1, "`value` in Select options should not be `null`."), !0;
1959
+ if (!i && Array.isArray(c[t == null ? void 0 : t.options]) && r(c[t == null ? void 0 : t.options], !0))
1960
+ break;
1961
+ }
1962
+ };
1963
+ n(e);
1964
+ }
1965
+ }
1966
+ var Jo = ["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"], ko = ["inputValue"];
1967
+ function ea(e) {
1968
+ return !e || mt(e) !== "object";
1969
+ }
1970
+ var nr = /* @__PURE__ */ o.forwardRef(function(e, t) {
1971
+ var n = e.id, r = e.mode, a = e.prefixCls, i = a === void 0 ? "rc-select" : a, l = e.backfill, c = e.fieldNames, d = e.inputValue, f = e.searchValue, m = e.onSearch, s = e.autoClearSearchValue, b = s === void 0 ? !0 : s, u = e.onSelect, g = e.onDeselect, v = e.dropdownMatchSelectWidth, S = v === void 0 ? !0 : v, w = e.filterOption, h = e.filterSort, E = e.optionFilterProp, C = e.optionLabelProp, T = e.options, p = e.optionRender, I = e.children, B = e.defaultActiveFirstOption, V = e.menuItemSelectedIcon, q = e.virtual, _ = e.direction, A = e.listHeight, U = A === void 0 ? 200 : A, Q = e.listItemHeight, G = Q === void 0 ? 20 : Q, j = e.labelRender, te = e.value, Z = e.defaultValue, Y = e.labelInValue, x = e.onChange, M = e.maxCount, fe = wt(e, Jo), ie = Xo(n), J = Ft(r), se = !!(!T && I), Ce = o.useMemo(function() {
1972
+ return w === void 0 && r === "combobox" ? !1 : w;
1973
+ }, [w, r]), ge = o.useMemo(
1974
+ function() {
1975
+ return Qn(c, se);
1976
+ },
1977
+ /* eslint-disable react-hooks/exhaustive-deps */
1978
+ [
1979
+ // We stringify fieldNames to avoid unnecessary re-renders.
1980
+ JSON.stringify(c),
1981
+ se
1982
+ ]
1983
+ /* eslint-enable react-hooks/exhaustive-deps */
1984
+ ), Re = Jt("", {
1985
+ value: f !== void 0 ? f : d,
1986
+ postState: function(H) {
1987
+ return H || "";
1988
+ }
1989
+ }), ue = ne(Re, 2), pe = ue[0], R = ue[1], y = qo(T, I, ge, E, C), D = y.valueOptions, K = y.labelOptions, $ = y.options, F = o.useCallback(function(N) {
1990
+ var H = dn(N);
1991
+ return H.map(function(L) {
1992
+ var z, oe, be, Ze, We;
1993
+ if (ea(L))
1994
+ z = L;
1995
+ else {
1996
+ var tt;
1997
+ be = L.key, oe = L.label, z = (tt = L.value) !== null && tt !== void 0 ? tt : be;
1998
+ }
1999
+ var Ie = D.get(z);
2000
+ if (Ie) {
2001
+ var nt;
2002
+ if (oe === void 0 && (oe = Ie == null ? void 0 : Ie[C || ge.label]), be === void 0 && (be = (nt = Ie == null ? void 0 : Ie.key) !== null && nt !== void 0 ? nt : z), Ze = Ie == null ? void 0 : Ie.disabled, We = Ie == null ? void 0 : Ie.title, process.env.NODE_ENV !== "production" && !C) {
2003
+ var Je = Ie == null ? void 0 : Ie[ge.label];
2004
+ Je !== void 0 && !/* @__PURE__ */ o.isValidElement(Je) && !/* @__PURE__ */ o.isValidElement(oe) && Je !== oe && Ue(!1, "`label` of `value` is not same as `label` in Select options.");
2005
+ }
2006
+ }
2007
+ return {
2008
+ label: oe,
2009
+ value: z,
2010
+ key: be,
2011
+ disabled: Ze,
2012
+ title: We
2013
+ };
2014
+ });
2015
+ }, [ge, C, D]), le = Jt(Z, {
2016
+ value: te
2017
+ }), ve = ne(le, 2), re = ve[0], we = ve[1], Be = o.useMemo(function() {
2018
+ var N, H = J && re === null ? [] : re, L = F(H);
2019
+ return r === "combobox" && lo((N = L[0]) === null || N === void 0 ? void 0 : N.value) ? [] : L;
2020
+ }, [re, F, r, J]), xe = Ao(Be, D), Ne = ne(xe, 2), de = Ne[0], Ge = Ne[1], Ye = o.useMemo(function() {
2021
+ if (!r && de.length === 1) {
2022
+ var N = de[0];
2023
+ if (N.value === null && (N.label === null || N.label === void 0))
2024
+ return [];
2025
+ }
2026
+ return de.map(function(H) {
2027
+ var L;
2028
+ return ee(ee({}, H), {}, {
2029
+ label: (L = typeof j == "function" ? j(H) : H.label) !== null && L !== void 0 ? L : H.value
2030
+ });
2031
+ });
2032
+ }, [r, de, j]), Se = o.useMemo(function() {
2033
+ return new Set(de.map(function(N) {
2034
+ return N.value;
2035
+ }));
2036
+ }, [de]);
2037
+ o.useEffect(function() {
2038
+ if (r === "combobox") {
2039
+ var N, H = (N = de[0]) === null || N === void 0 ? void 0 : N.value;
2040
+ R(io(H) ? String(H) : "");
2041
+ }
2042
+ }, [de]);
2043
+ var Oe = Bn(function(N, H) {
2044
+ var L = H ?? N;
2045
+ return ae(ae({}, ge.value, N), ge.label, L);
2046
+ }), ye = o.useMemo(function() {
2047
+ if (r !== "tags")
2048
+ return $;
2049
+ var N = qe($), H = function(z) {
2050
+ return D.has(z);
2051
+ };
2052
+ return qe(de).sort(function(L, z) {
2053
+ return L.value < z.value ? -1 : 1;
2054
+ }).forEach(function(L) {
2055
+ var z = L.value;
2056
+ H(z) || N.push(Oe(z, L.label));
2057
+ }), N;
2058
+ }, [Oe, $, D, de, r]), $e = jo(ye, ge, pe, Ce, E), Pe = o.useMemo(function() {
2059
+ return r !== "tags" || !pe || $e.some(function(N) {
2060
+ return N[E || "value"] === pe;
2061
+ }) || $e.some(function(N) {
2062
+ return N[ge.value] === pe;
2063
+ }) ? $e : [Oe(pe)].concat(qe($e));
2064
+ }, [Oe, E, r, $e, pe, ge]), et = function N(H) {
2065
+ var L = qe(H).sort(function(z, oe) {
2066
+ return h(z, oe, {
2067
+ searchValue: pe
2068
+ });
2069
+ });
2070
+ return L.map(function(z) {
2071
+ return Array.isArray(z.options) ? ee(ee({}, z), {}, {
2072
+ options: z.options.length > 0 ? N(z.options) : z.options
2073
+ }) : z;
2074
+ });
2075
+ }, je = o.useMemo(function() {
2076
+ return h ? et(Pe) : Pe;
2077
+ }, [Pe, h, pe]), Fe = o.useMemo(function() {
2078
+ return ho(je, {
2079
+ fieldNames: ge,
2080
+ childrenAsData: se
2081
+ });
2082
+ }, [je, ge, se]), Ee = function(H) {
2083
+ var L = F(H);
2084
+ if (we(L), x && // Trigger event only when value changed
2085
+ (L.length !== de.length || L.some(function(be, Ze) {
2086
+ var We;
2087
+ return ((We = de[Ze]) === null || We === void 0 ? void 0 : We.value) !== (be == null ? void 0 : be.value);
2088
+ }))) {
2089
+ var z = Y ? L : L.map(function(be) {
2090
+ return be.value;
2091
+ }), oe = L.map(function(be) {
2092
+ return tn(Ge(be.value));
2093
+ });
2094
+ x(
2095
+ // Value
2096
+ J ? z : z[0],
2097
+ // Option
2098
+ J ? oe : oe[0]
2099
+ );
2100
+ }
2101
+ }, gt = o.useState(null), Ae = ne(gt, 2), _e = Ae[0], De = Ae[1], Mt = o.useState(0), yt = ne(Mt, 2), st = yt[0], pt = yt[1], Et = B !== void 0 ? B : r !== "combobox", ct = o.useCallback(function(N, H) {
2102
+ var L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, z = L.source, oe = z === void 0 ? "keyboard" : z;
2103
+ pt(H), l && r === "combobox" && N !== null && oe === "keyboard" && De(String(N));
2104
+ }, [l, r]), Qe = function(H, L, z) {
2105
+ var oe = function() {
2106
+ var rt, ke = Ge(H);
2107
+ return [Y ? {
2108
+ label: ke == null ? void 0 : ke[ge.label],
2109
+ value: H,
2110
+ key: (rt = ke == null ? void 0 : ke.key) !== null && rt !== void 0 ? rt : H
2111
+ } : H, tn(ke)];
2112
+ };
2113
+ if (L && u) {
2114
+ var be = oe(), Ze = ne(be, 2), We = Ze[0], tt = Ze[1];
2115
+ u(We, tt);
2116
+ } else if (!L && g && z !== "clear") {
2117
+ var Ie = oe(), nt = ne(Ie, 2), Je = nt[0], Dt = nt[1];
2118
+ g(Je, Dt);
2119
+ }
2120
+ }, dt = Bn(function(N, H) {
2121
+ var L, z = J ? H.selected : !0;
2122
+ z ? L = J ? [].concat(qe(de), [N]) : [N] : L = de.filter(function(oe) {
2123
+ return oe.value !== N;
2124
+ }), Ee(L), Qe(N, z), r === "combobox" ? De("") : (!Ft || b) && (R(""), De(""));
2125
+ }), ft = function(H, L) {
2126
+ Ee(H);
2127
+ var z = L.type, oe = L.values;
2128
+ (z === "remove" || z === "clear") && oe.forEach(function(be) {
2129
+ Qe(be.value, !1, z);
2130
+ });
2131
+ }, Me = function(H, L) {
2132
+ if (R(H), De(null), L.source === "submit") {
2133
+ var z = (H || "").trim();
2134
+ if (z) {
2135
+ var oe = Array.from(new Set([].concat(qe(Se), [z])));
2136
+ Ee(oe), Qe(z, !0), R("");
2137
+ }
2138
+ return;
2139
+ }
2140
+ L.source !== "blur" && (r === "combobox" && Ee(H), m == null || m(H));
2141
+ }, vt = function(H) {
2142
+ var L = H;
2143
+ r !== "tags" && (L = H.map(function(oe) {
2144
+ var be = K.get(oe);
2145
+ return be == null ? void 0 : be.value;
2146
+ }).filter(function(oe) {
2147
+ return oe !== void 0;
2148
+ }));
2149
+ var z = Array.from(new Set([].concat(qe(Se), qe(L))));
2150
+ Ee(z), z.forEach(function(oe) {
2151
+ Qe(oe, !0);
2152
+ });
2153
+ }, at = o.useMemo(function() {
2154
+ var N = q !== !1 && S !== !1;
2155
+ return ee(ee({}, y), {}, {
2156
+ flattenOptions: Fe,
2157
+ onActiveValue: ct,
2158
+ defaultActiveFirstOption: Et,
2159
+ onSelect: dt,
2160
+ menuItemSelectedIcon: V,
2161
+ rawValues: Se,
2162
+ fieldNames: ge,
2163
+ virtual: N,
2164
+ direction: _,
2165
+ listHeight: U,
2166
+ listItemHeight: G,
2167
+ childrenAsData: se,
2168
+ maxCount: M,
2169
+ optionRender: p
2170
+ });
2171
+ }, [M, y, Fe, ct, Et, dt, V, Se, ge, q, S, _, U, G, se, p]);
2172
+ return process.env.NODE_ENV !== "production" && (Qo(e), Zo($, ge)), /* @__PURE__ */ o.createElement(fn.Provider, {
2173
+ value: at
2174
+ }, /* @__PURE__ */ o.createElement(Zn, ot({}, fe, {
2175
+ // >>> MISC
2176
+ id: ie,
2177
+ prefixCls: i,
2178
+ ref: t,
2179
+ omitDomProps: ko,
2180
+ mode: r,
2181
+ displayValues: Ye,
2182
+ onDisplayValuesChange: ft,
2183
+ direction: _,
2184
+ searchValue: pe,
2185
+ onSearch: Me,
2186
+ autoClearSearchValue: b,
2187
+ onSearchSplit: vt,
2188
+ dropdownMatchSelectWidth: S,
2189
+ OptionList: tr,
2190
+ emptyOptions: !Fe.length,
2191
+ activeValue: _e,
2192
+ activeDescendantId: "".concat(ie, "_list_").concat(st)
2193
+ })));
2194
+ });
2195
+ process.env.NODE_ENV !== "production" && (nr.displayName = "Select");
2196
+ var pn = nr;
2197
+ pn.Option = mn;
2198
+ pn.OptGroup = vn;
2199
+ const rr = () => {
2200
+ const [, e] = on(), [t] = un("Empty"), r = new Ht(e.colorBgBase).toHsl().l < 0.5 ? {
2201
+ opacity: 0.65
2202
+ } : {};
2203
+ return /* @__PURE__ */ o.createElement("svg", {
2204
+ style: r,
2205
+ width: "184",
2206
+ height: "152",
2207
+ viewBox: "0 0 184 152",
2208
+ xmlns: "http://www.w3.org/2000/svg"
2209
+ }, /* @__PURE__ */ o.createElement("title", null, (t == null ? void 0 : t.description) || "Empty"), /* @__PURE__ */ o.createElement("g", {
2210
+ fill: "none",
2211
+ fillRule: "evenodd"
2212
+ }, /* @__PURE__ */ o.createElement("g", {
2213
+ transform: "translate(24 31.67)"
2214
+ }, /* @__PURE__ */ o.createElement("ellipse", {
2215
+ fillOpacity: ".8",
2216
+ fill: "#F5F5F7",
2217
+ cx: "67.797",
2218
+ cy: "106.89",
2219
+ rx: "67.797",
2220
+ ry: "12.668"
2221
+ }), /* @__PURE__ */ o.createElement("path", {
2222
+ d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",
2223
+ fill: "#AEB8C2"
2224
+ }), /* @__PURE__ */ o.createElement("path", {
2225
+ d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
2226
+ fill: "url(#linearGradient-1)",
2227
+ transform: "translate(13.56)"
2228
+ }), /* @__PURE__ */ o.createElement("path", {
2229
+ d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",
2230
+ fill: "#F5F5F7"
2231
+ }), /* @__PURE__ */ o.createElement("path", {
2232
+ d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",
2233
+ fill: "#DCE0E6"
2234
+ })), /* @__PURE__ */ o.createElement("path", {
2235
+ d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",
2236
+ fill: "#DCE0E6"
2237
+ }), /* @__PURE__ */ o.createElement("g", {
2238
+ transform: "translate(149.65 15.383)",
2239
+ fill: "#FFF"
2240
+ }, /* @__PURE__ */ o.createElement("ellipse", {
2241
+ cx: "20.654",
2242
+ cy: "3.167",
2243
+ rx: "2.849",
2244
+ ry: "2.815"
2245
+ }), /* @__PURE__ */ o.createElement("path", {
2246
+ d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
2247
+ }))));
2248
+ };
2249
+ process.env.NODE_ENV !== "production" && (rr.displayName = "EmptyImage");
2250
+ const ta = rr, or = () => {
2251
+ const [, e] = on(), [t] = un("Empty"), {
2252
+ colorFill: n,
2253
+ colorFillTertiary: r,
2254
+ colorFillQuaternary: a,
2255
+ colorBgContainer: i
2256
+ } = e, {
2257
+ borderColor: l,
2258
+ shadowColor: c,
2259
+ contentColor: d
2260
+ } = pr(() => ({
2261
+ borderColor: new Ht(n).onBackground(i).toHexString(),
2262
+ shadowColor: new Ht(r).onBackground(i).toHexString(),
2263
+ contentColor: new Ht(a).onBackground(i).toHexString()
2264
+ }), [n, r, a, i]);
2265
+ return /* @__PURE__ */ o.createElement("svg", {
2266
+ width: "64",
2267
+ height: "41",
2268
+ viewBox: "0 0 64 41",
2269
+ xmlns: "http://www.w3.org/2000/svg"
2270
+ }, /* @__PURE__ */ o.createElement("title", null, (t == null ? void 0 : t.description) || "Empty"), /* @__PURE__ */ o.createElement("g", {
2271
+ transform: "translate(0 1)",
2272
+ fill: "none",
2273
+ fillRule: "evenodd"
2274
+ }, /* @__PURE__ */ o.createElement("ellipse", {
2275
+ fill: c,
2276
+ cx: "32",
2277
+ cy: "33",
2278
+ rx: "32",
2279
+ ry: "7"
2280
+ }), /* @__PURE__ */ o.createElement("g", {
2281
+ fillRule: "nonzero",
2282
+ stroke: l
2283
+ }, /* @__PURE__ */ o.createElement("path", {
2284
+ d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
2285
+ }), /* @__PURE__ */ o.createElement("path", {
2286
+ d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
2287
+ fill: d
2288
+ }))));
2289
+ };
2290
+ process.env.NODE_ENV !== "production" && (or.displayName = "SimpleImage");
2291
+ const na = or, ra = (e) => {
2292
+ const {
2293
+ componentCls: t,
2294
+ margin: n,
2295
+ marginXS: r,
2296
+ marginXL: a,
2297
+ fontSize: i,
2298
+ lineHeight: l
2299
+ } = e;
2300
+ return {
2301
+ [t]: {
2302
+ marginInline: r,
2303
+ fontSize: i,
2304
+ lineHeight: l,
2305
+ textAlign: "center",
2306
+ // 原来 &-image 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
2307
+ [`${t}-image`]: {
2308
+ height: e.emptyImgHeight,
2309
+ marginBottom: r,
2310
+ opacity: e.opacityImage,
2311
+ img: {
2312
+ height: "100%"
2313
+ },
2314
+ svg: {
2315
+ maxWidth: "100%",
2316
+ height: "100%",
2317
+ margin: "auto"
2318
+ }
2319
+ },
2320
+ [`${t}-description`]: {
2321
+ color: e.colorTextDescription
2322
+ },
2323
+ // 原来 &-footer 没有父子结构,现在为了外层承担我们的 hashId,改成父子结构
2324
+ [`${t}-footer`]: {
2325
+ marginTop: n
2326
+ },
2327
+ "&-normal": {
2328
+ marginBlock: a,
2329
+ color: e.colorTextDescription,
2330
+ [`${t}-description`]: {
2331
+ color: e.colorTextDescription
2332
+ },
2333
+ [`${t}-image`]: {
2334
+ height: e.emptyImgHeightMD
2335
+ }
2336
+ },
2337
+ "&-small": {
2338
+ marginBlock: r,
2339
+ color: e.colorTextDescription,
2340
+ [`${t}-image`]: {
2341
+ height: e.emptyImgHeightSM
2342
+ }
2343
+ }
2344
+ }
2345
+ };
2346
+ }, oa = An("Empty", (e) => {
2347
+ const {
2348
+ componentCls: t,
2349
+ controlHeightLG: n,
2350
+ calc: r
2351
+ } = e, a = Ot(e, {
2352
+ emptyImgCls: `${t}-img`,
2353
+ emptyImgHeight: r(n).mul(2.5).equal(),
2354
+ emptyImgHeightMD: n,
2355
+ emptyImgHeightSM: r(n).mul(0.875).equal()
2356
+ });
2357
+ return [ra(a)];
2358
+ });
2359
+ var aa = globalThis && globalThis.__rest || function(e, t) {
2360
+ var n = {};
2361
+ for (var r in e)
2362
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2363
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
2364
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
2365
+ t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
2366
+ return n;
2367
+ };
2368
+ const ar = /* @__PURE__ */ o.createElement(ta, null), ir = /* @__PURE__ */ o.createElement(na, null), Wt = (e) => {
2369
+ var t, n, r, a, i, l, c, d;
2370
+ const {
2371
+ className: f,
2372
+ rootClassName: m,
2373
+ prefixCls: s,
2374
+ image: b = ar,
2375
+ description: u,
2376
+ children: g,
2377
+ imageStyle: v,
2378
+ style: S,
2379
+ classNames: w,
2380
+ styles: h
2381
+ } = e, E = aa(e, ["className", "rootClassName", "prefixCls", "image", "description", "children", "imageStyle", "style", "classNames", "styles"]), {
2382
+ getPrefixCls: C,
2383
+ direction: T,
2384
+ empty: p
2385
+ } = o.useContext(an), I = C("empty", s), [B, V, q] = oa(I), [_] = un("Empty"), A = typeof u < "u" ? u : _ == null ? void 0 : _.description, U = typeof A == "string" ? A : "empty";
2386
+ let Q = null;
2387
+ if (typeof b == "string" ? Q = /* @__PURE__ */ o.createElement("img", {
2388
+ alt: U,
2389
+ src: b
2390
+ }) : Q = b, process.env.NODE_ENV !== "production") {
2391
+ const G = ln("Empty");
2392
+ [["imageStyle", "styles: { image: {} }"]].forEach((j) => {
2393
+ let [te, Z] = j;
2394
+ G.deprecated(!(te in e), te, Z);
2395
+ });
2396
+ }
2397
+ return B(/* @__PURE__ */ o.createElement("div", Object.assign({
2398
+ className: He(V, q, I, p == null ? void 0 : p.className, {
2399
+ [`${I}-normal`]: b === ir,
2400
+ [`${I}-rtl`]: T === "rtl"
2401
+ }, f, m, (t = p == null ? void 0 : p.classNames) === null || t === void 0 ? void 0 : t.root, w == null ? void 0 : w.root),
2402
+ style: Object.assign(Object.assign(Object.assign(Object.assign({}, (n = p == null ? void 0 : p.styles) === null || n === void 0 ? void 0 : n.root), p == null ? void 0 : p.style), h == null ? void 0 : h.root), S)
2403
+ }, E), /* @__PURE__ */ o.createElement("div", {
2404
+ className: He(`${I}-image`, (r = p == null ? void 0 : p.classNames) === null || r === void 0 ? void 0 : r.image, w == null ? void 0 : w.image),
2405
+ style: Object.assign(Object.assign(Object.assign({}, v), (a = p == null ? void 0 : p.styles) === null || a === void 0 ? void 0 : a.image), h == null ? void 0 : h.image)
2406
+ }, Q), A && /* @__PURE__ */ o.createElement("div", {
2407
+ className: He(`${I}-description`, (i = p == null ? void 0 : p.classNames) === null || i === void 0 ? void 0 : i.description, w == null ? void 0 : w.description),
2408
+ style: Object.assign(Object.assign({}, (l = p == null ? void 0 : p.styles) === null || l === void 0 ? void 0 : l.description), h == null ? void 0 : h.description)
2409
+ }, A), g && /* @__PURE__ */ o.createElement("div", {
2410
+ className: He(`${I}-footer`, (c = p == null ? void 0 : p.classNames) === null || c === void 0 ? void 0 : c.footer, w == null ? void 0 : w.footer),
2411
+ style: Object.assign(Object.assign({}, (d = p == null ? void 0 : p.styles) === null || d === void 0 ? void 0 : d.footer), h == null ? void 0 : h.footer)
2412
+ }, g)));
2413
+ };
2414
+ Wt.PRESENTED_IMAGE_DEFAULT = ar;
2415
+ Wt.PRESENTED_IMAGE_SIMPLE = ir;
2416
+ process.env.NODE_ENV !== "production" && (Wt.displayName = "Empty");
2417
+ const _t = Wt, ia = (e) => {
2418
+ const {
2419
+ componentName: t
2420
+ } = e, {
2421
+ getPrefixCls: n
2422
+ } = hr(an), r = n("empty");
2423
+ switch (t) {
2424
+ case "Table":
2425
+ case "List":
2426
+ return /* @__PURE__ */ $t.createElement(_t, {
2427
+ image: _t.PRESENTED_IMAGE_SIMPLE
2428
+ });
2429
+ case "Select":
2430
+ case "TreeSelect":
2431
+ case "Cascader":
2432
+ case "Transfer":
2433
+ case "Mentions":
2434
+ return /* @__PURE__ */ $t.createElement(_t, {
2435
+ image: _t.PRESENTED_IMAGE_SIMPLE,
2436
+ className: `${r}-small`
2437
+ });
2438
+ case "Table.filter":
2439
+ return null;
2440
+ default:
2441
+ return /* @__PURE__ */ $t.createElement(_t, null);
2442
+ }
2443
+ }, la = ia, ca = (e) => {
2444
+ const n = {
2445
+ overflow: {
2446
+ adjustX: !0,
2447
+ adjustY: !0,
2448
+ shiftY: !0
2449
+ },
2450
+ htmlRegion: e === "scroll" ? "scroll" : "visible",
2451
+ dynamicInset: !0
2452
+ };
2453
+ return {
2454
+ bottomLeft: Object.assign(Object.assign({}, n), {
2455
+ points: ["tl", "bl"],
2456
+ offset: [0, 4]
2457
+ }),
2458
+ bottomRight: Object.assign(Object.assign({}, n), {
2459
+ points: ["tr", "br"],
2460
+ offset: [0, 4]
2461
+ }),
2462
+ topLeft: Object.assign(Object.assign({}, n), {
2463
+ points: ["bl", "tl"],
2464
+ offset: [0, -4]
2465
+ }),
2466
+ topRight: Object.assign(Object.assign({}, n), {
2467
+ points: ["br", "tr"],
2468
+ offset: [0, -4]
2469
+ })
2470
+ };
2471
+ };
2472
+ function ua(e, t) {
2473
+ return e || ca(t);
2474
+ }
2475
+ const Hn = (e) => {
2476
+ const {
2477
+ optionHeight: t,
2478
+ optionFontSize: n,
2479
+ optionLineHeight: r,
2480
+ optionPadding: a
2481
+ } = e;
2482
+ return {
2483
+ position: "relative",
2484
+ display: "block",
2485
+ minHeight: t,
2486
+ padding: a,
2487
+ color: e.colorText,
2488
+ fontWeight: "normal",
2489
+ fontSize: n,
2490
+ lineHeight: r,
2491
+ boxSizing: "border-box"
2492
+ };
2493
+ }, sa = (e) => {
2494
+ const {
2495
+ antCls: t,
2496
+ componentCls: n
2497
+ } = 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`, c = `${n}-dropdown-placement-`, d = `${r}-option-selected`;
2498
+ return [
2499
+ {
2500
+ [`${n}-dropdown`]: Object.assign(Object.assign({}, cn(e)), {
2501
+ position: "absolute",
2502
+ top: -9999,
2503
+ zIndex: e.zIndexPopup,
2504
+ boxSizing: "border-box",
2505
+ padding: e.paddingXXS,
2506
+ overflow: "hidden",
2507
+ fontSize: e.fontSize,
2508
+ // Fix select render lag of long text in chrome
2509
+ // https://github.com/ant-design/ant-design/issues/11456
2510
+ // https://github.com/ant-design/ant-design/issues/11843
2511
+ fontVariant: "initial",
2512
+ backgroundColor: e.colorBgElevated,
2513
+ borderRadius: e.borderRadiusLG,
2514
+ outline: "none",
2515
+ boxShadow: e.boxShadowSecondary,
2516
+ [`
2517
+ ${a}${c}bottomLeft,
2518
+ ${i}${c}bottomLeft
2519
+ `]: {
2520
+ animationName: _r
2521
+ },
2522
+ [`
2523
+ ${a}${c}topLeft,
2524
+ ${i}${c}topLeft,
2525
+ ${a}${c}topRight,
2526
+ ${i}${c}topRight
2527
+ `]: {
2528
+ animationName: Tr
2529
+ },
2530
+ [`${l}${c}bottomLeft`]: {
2531
+ animationName: Lr
2532
+ },
2533
+ [`
2534
+ ${l}${c}topLeft,
2535
+ ${l}${c}topRight
2536
+ `]: {
2537
+ animationName: zr
2538
+ },
2539
+ "&-hidden": {
2540
+ display: "none"
2541
+ },
2542
+ [r]: Object.assign(Object.assign({}, Hn(e)), {
2543
+ cursor: "pointer",
2544
+ transition: `background ${e.motionDurationSlow} ease`,
2545
+ borderRadius: e.borderRadiusSM,
2546
+ // =========== Group ============
2547
+ "&-group": {
2548
+ color: e.colorTextDescription,
2549
+ fontSize: e.fontSizeSM,
2550
+ cursor: "default"
2551
+ },
2552
+ // =========== Option ===========
2553
+ "&-option": {
2554
+ display: "flex",
2555
+ "&-content": Object.assign({
2556
+ flex: "auto"
2557
+ }, Zt),
2558
+ "&-state": {
2559
+ flex: "none",
2560
+ display: "flex",
2561
+ alignItems: "center"
2562
+ },
2563
+ [`&-active:not(${r}-option-disabled)`]: {
2564
+ backgroundColor: e.optionActiveBg
2565
+ },
2566
+ [`&-selected:not(${r}-option-disabled)`]: {
2567
+ color: e.optionSelectedColor,
2568
+ fontWeight: e.optionSelectedFontWeight,
2569
+ backgroundColor: e.optionSelectedBg,
2570
+ [`${r}-option-state`]: {
2571
+ color: e.colorPrimary
2572
+ }
2573
+ },
2574
+ "&-disabled": {
2575
+ [`&${r}-option-selected`]: {
2576
+ backgroundColor: e.colorBgContainerDisabled
2577
+ },
2578
+ color: e.colorTextDisabled,
2579
+ cursor: "not-allowed"
2580
+ },
2581
+ "&-grouped": {
2582
+ paddingInlineStart: e.calc(e.controlPaddingHorizontal).mul(2).equal()
2583
+ }
2584
+ },
2585
+ "&-empty": Object.assign(Object.assign({}, Hn(e)), {
2586
+ color: e.colorTextDisabled
2587
+ })
2588
+ }),
2589
+ // https://github.com/ant-design/ant-design/pull/46646
2590
+ [`${d}:has(+ ${d})`]: {
2591
+ borderEndStartRadius: 0,
2592
+ borderEndEndRadius: 0,
2593
+ [`& + ${d}`]: {
2594
+ borderStartStartRadius: 0,
2595
+ borderStartEndRadius: 0
2596
+ }
2597
+ },
2598
+ // =========================== RTL ===========================
2599
+ "&-rtl": {
2600
+ direction: "rtl"
2601
+ }
2602
+ })
2603
+ },
2604
+ // Follow code may reuse in other components
2605
+ En(e, "slide-up"),
2606
+ En(e, "slide-down"),
2607
+ xn(e, "move-up"),
2608
+ xn(e, "move-down")
2609
+ ];
2610
+ }, da = sa, fa = (e) => {
2611
+ const {
2612
+ multipleSelectItemHeight: t,
2613
+ paddingXXS: n,
2614
+ lineWidth: r,
2615
+ INTERNAL_FIXED_ITEM_MARGIN: a
2616
+ } = e, i = e.max(e.calc(n).sub(r).equal(), 0), l = e.max(e.calc(i).sub(a).equal(), 0);
2617
+ return {
2618
+ basePadding: i,
2619
+ containerPadding: l,
2620
+ itemHeight: ze(t),
2621
+ itemLineHeight: ze(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())
2622
+ };
2623
+ }, va = (e) => {
2624
+ const {
2625
+ multipleSelectItemHeight: t,
2626
+ selectHeight: n,
2627
+ lineWidth: r
2628
+ } = e;
2629
+ return e.calc(n).sub(t).div(2).sub(r).equal();
2630
+ }, ma = (e) => {
2631
+ const {
2632
+ componentCls: t,
2633
+ iconCls: n,
2634
+ borderRadiusSM: r,
2635
+ motionDurationSlow: a,
2636
+ paddingXS: i,
2637
+ multipleItemColorDisabled: l,
2638
+ multipleItemBorderColorDisabled: c,
2639
+ colorIcon: d,
2640
+ colorIconHover: f,
2641
+ INTERNAL_FIXED_ITEM_MARGIN: m
2642
+ } = e;
2643
+ return {
2644
+ /**
2645
+ * Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
2646
+ * may update to redesign with its align logic.
2647
+ */
2648
+ // =========================== Overflow ===========================
2649
+ [`${t}-selection-overflow`]: {
2650
+ position: "relative",
2651
+ display: "flex",
2652
+ flex: "auto",
2653
+ flexWrap: "wrap",
2654
+ maxWidth: "100%",
2655
+ "&-item": {
2656
+ flex: "none",
2657
+ alignSelf: "center",
2658
+ maxWidth: "100%",
2659
+ display: "inline-flex"
2660
+ },
2661
+ // ======================== Selections ==========================
2662
+ [`${t}-selection-item`]: {
2663
+ display: "flex",
2664
+ alignSelf: "center",
2665
+ flex: "none",
2666
+ boxSizing: "border-box",
2667
+ maxWidth: "100%",
2668
+ marginBlock: m,
2669
+ borderRadius: r,
2670
+ cursor: "default",
2671
+ transition: `font-size ${a}, line-height ${a}, height ${a}`,
2672
+ marginInlineEnd: e.calc(m).mul(2).equal(),
2673
+ paddingInlineStart: i,
2674
+ paddingInlineEnd: e.calc(i).div(2).equal(),
2675
+ [`${t}-disabled&`]: {
2676
+ color: l,
2677
+ borderColor: c,
2678
+ cursor: "not-allowed"
2679
+ },
2680
+ // It's ok not to do this, but 24px makes bottom narrow in view should adjust
2681
+ "&-content": {
2682
+ display: "inline-block",
2683
+ marginInlineEnd: e.calc(i).div(2).equal(),
2684
+ overflow: "hidden",
2685
+ whiteSpace: "pre",
2686
+ // fix whitespace wrapping. custom tags display all whitespace within.
2687
+ textOverflow: "ellipsis"
2688
+ },
2689
+ "&-remove": Object.assign(Object.assign({}, jn()), {
2690
+ display: "inline-flex",
2691
+ alignItems: "center",
2692
+ color: d,
2693
+ fontWeight: "bold",
2694
+ fontSize: 10,
2695
+ lineHeight: "inherit",
2696
+ cursor: "pointer",
2697
+ [`> ${n}`]: {
2698
+ verticalAlign: "-0.2em"
2699
+ },
2700
+ "&:hover": {
2701
+ color: f
2702
+ }
2703
+ })
2704
+ }
2705
+ }
2706
+ };
2707
+ }, ga = (e, t) => {
2708
+ const {
2709
+ componentCls: n,
2710
+ INTERNAL_FIXED_ITEM_MARGIN: r
2711
+ } = e, a = `${n}-selection-overflow`, i = e.multipleSelectItemHeight, l = va(e), c = t ? `${n}-${t}` : "", d = fa(e);
2712
+ return {
2713
+ [`${n}-multiple${c}`]: Object.assign(Object.assign({}, ma(e)), {
2714
+ // ========================= Selector =========================
2715
+ [`${n}-selector`]: {
2716
+ display: "flex",
2717
+ alignItems: "center",
2718
+ width: "100%",
2719
+ height: "100%",
2720
+ // Multiple is little different that horizontal is follow the vertical
2721
+ paddingInline: d.basePadding,
2722
+ paddingBlock: d.containerPadding,
2723
+ borderRadius: e.borderRadius,
2724
+ [`${n}-disabled&`]: {
2725
+ background: e.multipleSelectorBgDisabled,
2726
+ cursor: "not-allowed"
2727
+ },
2728
+ "&:after": {
2729
+ display: "inline-block",
2730
+ width: 0,
2731
+ margin: `${ze(r)} 0`,
2732
+ lineHeight: ze(i),
2733
+ visibility: "hidden",
2734
+ content: '"\\a0"'
2735
+ }
2736
+ },
2737
+ // ======================== Selections ========================
2738
+ [`${n}-selection-item`]: {
2739
+ height: d.itemHeight,
2740
+ lineHeight: ze(d.itemLineHeight)
2741
+ },
2742
+ // ========================== Wrap ===========================
2743
+ [`${n}-selection-wrap`]: {
2744
+ alignSelf: "flex-start",
2745
+ "&:after": {
2746
+ lineHeight: ze(i),
2747
+ marginBlock: r
2748
+ }
2749
+ },
2750
+ // ========================== Input ==========================
2751
+ [`${n}-prefix`]: {
2752
+ marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal()
2753
+ },
2754
+ [`${a}-item + ${a}-item,
2755
+ ${n}-prefix + ${n}-selection-wrap
2756
+ `]: {
2757
+ [`${n}-selection-search`]: {
2758
+ marginInlineStart: 0
2759
+ },
2760
+ [`${n}-selection-placeholder`]: {
2761
+ insetInlineStart: 0
2762
+ }
2763
+ },
2764
+ // https://github.com/ant-design/ant-design/issues/44754
2765
+ // Same as `wrap:after`
2766
+ [`${a}-item-suffix`]: {
2767
+ minHeight: d.itemHeight,
2768
+ marginBlock: r
2769
+ },
2770
+ [`${n}-selection-search`]: {
2771
+ display: "inline-flex",
2772
+ position: "relative",
2773
+ maxWidth: "100%",
2774
+ marginInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),
2775
+ "\n &-input,\n &-mirror\n ": {
2776
+ height: i,
2777
+ fontFamily: e.fontFamily,
2778
+ lineHeight: ze(i),
2779
+ transition: `all ${e.motionDurationSlow}`
2780
+ },
2781
+ "&-input": {
2782
+ width: "100%",
2783
+ minWidth: 4.1
2784
+ // fix search cursor missing
2785
+ },
2786
+ "&-mirror": {
2787
+ position: "absolute",
2788
+ top: 0,
2789
+ insetInlineStart: 0,
2790
+ insetInlineEnd: "auto",
2791
+ zIndex: 999,
2792
+ whiteSpace: "pre",
2793
+ // fix whitespace wrapping caused width calculation bug
2794
+ visibility: "hidden"
2795
+ }
2796
+ },
2797
+ // ======================= Placeholder =======================
2798
+ [`${n}-selection-placeholder`]: {
2799
+ position: "absolute",
2800
+ top: "50%",
2801
+ insetInlineStart: e.calc(e.inputPaddingHorizontalBase).sub(d.basePadding).equal(),
2802
+ insetInlineEnd: e.inputPaddingHorizontalBase,
2803
+ transform: "translateY(-50%)",
2804
+ transition: `all ${e.motionDurationSlow}`
2805
+ }
2806
+ })
2807
+ };
2808
+ };
2809
+ function Yt(e, t) {
2810
+ const {
2811
+ componentCls: n
2812
+ } = e, r = t ? `${n}-${t}` : "", a = {
2813
+ [`${n}-multiple${r}`]: {
2814
+ fontSize: e.fontSize,
2815
+ // ========================= Selector =========================
2816
+ [`${n}-selector`]: {
2817
+ [`${n}-show-search&`]: {
2818
+ cursor: "text"
2819
+ }
2820
+ },
2821
+ [`
2822
+ &${n}-show-arrow ${n}-selector,
2823
+ &${n}-allow-clear ${n}-selector
2824
+ `]: {
2825
+ paddingInlineEnd: e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()
2826
+ }
2827
+ }
2828
+ };
2829
+ return [ga(e, t), a];
2830
+ }
2831
+ const pa = (e) => {
2832
+ const {
2833
+ componentCls: t
2834
+ } = e, n = Ot(e, {
2835
+ selectHeight: e.controlHeightSM,
2836
+ multipleSelectItemHeight: e.multipleItemHeightSM,
2837
+ borderRadius: e.borderRadiusSM,
2838
+ borderRadiusSM: e.borderRadiusXS
2839
+ }), r = Ot(e, {
2840
+ fontSize: e.fontSizeLG,
2841
+ selectHeight: e.controlHeightLG,
2842
+ multipleSelectItemHeight: e.multipleItemHeightLG,
2843
+ borderRadius: e.borderRadiusLG,
2844
+ borderRadiusSM: e.borderRadius
2845
+ });
2846
+ return [
2847
+ Yt(e),
2848
+ // ======================== Small ========================
2849
+ Yt(n, "sm"),
2850
+ // Padding
2851
+ {
2852
+ [`${t}-multiple${t}-sm`]: {
2853
+ [`${t}-selection-placeholder`]: {
2854
+ insetInline: e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()
2855
+ },
2856
+ // https://github.com/ant-design/ant-design/issues/29559
2857
+ [`${t}-selection-search`]: {
2858
+ marginInlineStart: 2
2859
+ // Magic Number
2860
+ }
2861
+ }
2862
+ },
2863
+ // ======================== Large ========================
2864
+ Yt(r, "lg")
2865
+ ];
2866
+ }, ha = pa;
2867
+ function qt(e, t) {
2868
+ const {
2869
+ componentCls: n,
2870
+ inputPaddingHorizontalBase: r,
2871
+ borderRadius: a
2872
+ } = e, i = e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(), l = t ? `${n}-${t}` : "";
2873
+ return {
2874
+ [`${n}-single${l}`]: {
2875
+ fontSize: e.fontSize,
2876
+ height: e.controlHeight,
2877
+ // ========================= Selector =========================
2878
+ [`${n}-selector`]: Object.assign(Object.assign({}, cn(e, !0)), {
2879
+ display: "flex",
2880
+ borderRadius: a,
2881
+ flex: "1 1 auto",
2882
+ [`${n}-selection-search`]: {
2883
+ position: "absolute",
2884
+ inset: 0,
2885
+ width: "100%",
2886
+ "&-input": {
2887
+ width: "100%",
2888
+ WebkitAppearance: "textfield"
2889
+ }
2890
+ },
2891
+ [`
2892
+ ${n}-selection-item,
2893
+ ${n}-selection-placeholder
2894
+ `]: {
2895
+ display: "block",
2896
+ padding: 0,
2897
+ lineHeight: ze(i),
2898
+ transition: `all ${e.motionDurationSlow}, visibility 0s`,
2899
+ alignSelf: "center"
2900
+ },
2901
+ [`${n}-selection-placeholder`]: {
2902
+ transition: "none",
2903
+ pointerEvents: "none"
2904
+ },
2905
+ // For common baseline align
2906
+ [[
2907
+ "&:after",
2908
+ /* For '' value baseline align */
2909
+ `${n}-selection-item:empty:after`,
2910
+ /* For undefined value baseline align */
2911
+ `${n}-selection-placeholder:empty:after`
2912
+ ].join(",")]: {
2913
+ display: "inline-block",
2914
+ width: 0,
2915
+ visibility: "hidden",
2916
+ content: '"\\a0"'
2917
+ }
2918
+ }),
2919
+ [`
2920
+ &${n}-show-arrow ${n}-selection-item,
2921
+ &${n}-show-arrow ${n}-selection-search,
2922
+ &${n}-show-arrow ${n}-selection-placeholder
2923
+ `]: {
2924
+ paddingInlineEnd: e.showArrowPaddingInlineEnd
2925
+ },
2926
+ // Opacity selection if open
2927
+ [`&${n}-open ${n}-selection-item`]: {
2928
+ color: e.colorTextPlaceholder
2929
+ },
2930
+ // ========================== Input ==========================
2931
+ // We only change the style of non-customize input which is only support by `combobox` mode.
2932
+ // Not customize
2933
+ [`&:not(${n}-customize-input)`]: {
2934
+ [`${n}-selector`]: {
2935
+ width: "100%",
2936
+ height: "100%",
2937
+ alignItems: "center",
2938
+ padding: `0 ${ze(r)}`,
2939
+ [`${n}-selection-search-input`]: {
2940
+ height: i
2941
+ },
2942
+ "&:after": {
2943
+ lineHeight: ze(i)
2944
+ }
2945
+ }
2946
+ },
2947
+ [`&${n}-customize-input`]: {
2948
+ [`${n}-selector`]: {
2949
+ "&:after": {
2950
+ display: "none"
2951
+ },
2952
+ [`${n}-selection-search`]: {
2953
+ position: "static",
2954
+ width: "100%"
2955
+ },
2956
+ [`${n}-selection-placeholder`]: {
2957
+ position: "absolute",
2958
+ insetInlineStart: 0,
2959
+ insetInlineEnd: 0,
2960
+ padding: `0 ${ze(r)}`,
2961
+ "&:after": {
2962
+ display: "none"
2963
+ }
2964
+ }
2965
+ }
2966
+ }
2967
+ }
2968
+ };
2969
+ }
2970
+ function ba(e) {
2971
+ const {
2972
+ componentCls: t
2973
+ } = e, n = e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();
2974
+ return [
2975
+ qt(e),
2976
+ // ======================== Small ========================
2977
+ // Shared
2978
+ qt(Ot(e, {
2979
+ controlHeight: e.controlHeightSM,
2980
+ borderRadius: e.borderRadiusSM
2981
+ }), "sm"),
2982
+ // padding
2983
+ {
2984
+ [`${t}-single${t}-sm`]: {
2985
+ [`&:not(${t}-customize-input)`]: {
2986
+ [`${t}-selector`]: {
2987
+ padding: `0 ${ze(n)}`
2988
+ },
2989
+ // With arrow should provides `padding-right` to show the arrow
2990
+ [`&${t}-show-arrow ${t}-selection-search`]: {
2991
+ insetInlineEnd: e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()
2992
+ },
2993
+ [`
2994
+ &${t}-show-arrow ${t}-selection-item,
2995
+ &${t}-show-arrow ${t}-selection-placeholder
2996
+ `]: {
2997
+ paddingInlineEnd: e.calc(e.fontSize).mul(1.5).equal()
2998
+ }
2999
+ }
3000
+ }
3001
+ },
3002
+ // ======================== Large ========================
3003
+ // Shared
3004
+ qt(Ot(e, {
3005
+ controlHeight: e.singleItemHeightLG,
3006
+ fontSize: e.fontSizeLG,
3007
+ borderRadius: e.borderRadiusLG
3008
+ }), "lg")
3009
+ ];
3010
+ }
3011
+ const Sa = (e) => {
3012
+ const {
3013
+ fontSize: t,
3014
+ lineHeight: n,
3015
+ lineWidth: r,
3016
+ controlHeight: a,
3017
+ controlHeightSM: i,
3018
+ controlHeightLG: l,
3019
+ paddingXXS: c,
3020
+ controlPaddingHorizontal: d,
3021
+ zIndexPopupBase: f,
3022
+ colorText: m,
3023
+ fontWeightStrong: s,
3024
+ controlItemBgActive: b,
3025
+ controlItemBgHover: u,
3026
+ colorBgContainer: g,
3027
+ colorFillSecondary: v,
3028
+ colorBgContainerDisabled: S,
3029
+ colorTextDisabled: w,
3030
+ colorPrimaryHover: h,
3031
+ colorPrimary: E,
3032
+ controlOutline: C
3033
+ } = e, T = c * 2, p = r * 2, I = Math.min(a - T, a - p), B = Math.min(i - T, i - p), V = Math.min(l - T, l - p);
3034
+ return {
3035
+ INTERNAL_FIXED_ITEM_MARGIN: Math.floor(c / 2),
3036
+ zIndexPopup: f + 50,
3037
+ optionSelectedColor: m,
3038
+ optionSelectedFontWeight: s,
3039
+ optionSelectedBg: b,
3040
+ optionActiveBg: u,
3041
+ optionPadding: `${(a - t * n) / 2}px ${d}px`,
3042
+ optionFontSize: t,
3043
+ optionLineHeight: n,
3044
+ optionHeight: a,
3045
+ selectorBg: g,
3046
+ clearBg: g,
3047
+ singleItemHeightLG: l,
3048
+ multipleItemBg: v,
3049
+ multipleItemBorderColor: "transparent",
3050
+ multipleItemHeight: I,
3051
+ multipleItemHeightSM: B,
3052
+ multipleItemHeightLG: V,
3053
+ multipleSelectorBgDisabled: S,
3054
+ multipleItemColorDisabled: w,
3055
+ multipleItemBorderColorDisabled: "transparent",
3056
+ showArrowPaddingInlineEnd: Math.ceil(e.fontSize * 1.25),
3057
+ hoverBorderColor: h,
3058
+ activeBorderColor: E,
3059
+ activeOutlineColor: C,
3060
+ selectAffixPadding: c
3061
+ };
3062
+ }, lr = (e, t) => {
3063
+ const {
3064
+ componentCls: n,
3065
+ antCls: r,
3066
+ controlOutlineWidth: a
3067
+ } = e;
3068
+ return {
3069
+ [`&:not(${n}-customize-input) ${n}-selector`]: {
3070
+ border: `${ze(e.lineWidth)} ${e.lineType} ${t.borderColor}`,
3071
+ background: e.selectorBg
3072
+ },
3073
+ [`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]: {
3074
+ [`&:hover ${n}-selector`]: {
3075
+ borderColor: t.hoverBorderHover
3076
+ },
3077
+ [`${n}-focused& ${n}-selector`]: {
3078
+ borderColor: t.activeBorderColor,
3079
+ boxShadow: `0 0 0 ${ze(a)} ${t.activeOutlineColor}`,
3080
+ outline: 0
3081
+ },
3082
+ [`${n}-prefix`]: {
3083
+ color: t.color
3084
+ }
3085
+ }
3086
+ };
3087
+ }, Vn = (e, t) => ({
3088
+ [`&${e.componentCls}-status-${t.status}`]: Object.assign({}, lr(e, t))
3089
+ }), wa = (e) => ({
3090
+ "&-outlined": Object.assign(Object.assign(Object.assign(Object.assign({}, lr(e, {
3091
+ borderColor: e.colorBorder,
3092
+ hoverBorderHover: e.hoverBorderColor,
3093
+ activeBorderColor: e.activeBorderColor,
3094
+ activeOutlineColor: e.activeOutlineColor,
3095
+ color: e.colorText
3096
+ })), Vn(e, {
3097
+ status: "error",
3098
+ borderColor: e.colorError,
3099
+ hoverBorderHover: e.colorErrorHover,
3100
+ activeBorderColor: e.colorError,
3101
+ activeOutlineColor: e.colorErrorOutline,
3102
+ color: e.colorError
3103
+ })), Vn(e, {
3104
+ status: "warning",
3105
+ borderColor: e.colorWarning,
3106
+ hoverBorderHover: e.colorWarningHover,
3107
+ activeBorderColor: e.colorWarning,
3108
+ activeOutlineColor: e.colorWarningOutline,
3109
+ color: e.colorWarning
3110
+ })), {
3111
+ [`&${e.componentCls}-disabled`]: {
3112
+ [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
3113
+ background: e.colorBgContainerDisabled,
3114
+ color: e.colorTextDisabled
3115
+ }
3116
+ },
3117
+ [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3118
+ background: e.multipleItemBg,
3119
+ border: `${ze(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
3120
+ }
3121
+ })
3122
+ }), cr = (e, t) => {
3123
+ const {
3124
+ componentCls: n,
3125
+ antCls: r
3126
+ } = e;
3127
+ return {
3128
+ [`&:not(${n}-customize-input) ${n}-selector`]: {
3129
+ background: t.bg,
3130
+ border: `${ze(e.lineWidth)} ${e.lineType} transparent`,
3131
+ color: t.color
3132
+ },
3133
+ [`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]: {
3134
+ [`&:hover ${n}-selector`]: {
3135
+ background: t.hoverBg
3136
+ },
3137
+ [`${n}-focused& ${n}-selector`]: {
3138
+ background: e.selectorBg,
3139
+ borderColor: t.activeBorderColor,
3140
+ outline: 0
3141
+ }
3142
+ }
3143
+ };
3144
+ }, Fn = (e, t) => ({
3145
+ [`&${e.componentCls}-status-${t.status}`]: Object.assign({}, cr(e, t))
3146
+ }), Ca = (e) => ({
3147
+ "&-filled": Object.assign(Object.assign(Object.assign(Object.assign({}, cr(e, {
3148
+ bg: e.colorFillTertiary,
3149
+ hoverBg: e.colorFillSecondary,
3150
+ activeBorderColor: e.activeBorderColor,
3151
+ color: e.colorText
3152
+ })), Fn(e, {
3153
+ status: "error",
3154
+ bg: e.colorErrorBg,
3155
+ hoverBg: e.colorErrorBgHover,
3156
+ activeBorderColor: e.colorError,
3157
+ color: e.colorError
3158
+ })), Fn(e, {
3159
+ status: "warning",
3160
+ bg: e.colorWarningBg,
3161
+ hoverBg: e.colorWarningBgHover,
3162
+ activeBorderColor: e.colorWarning,
3163
+ color: e.colorWarning
3164
+ })), {
3165
+ [`&${e.componentCls}-disabled`]: {
3166
+ [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
3167
+ borderColor: e.colorBorder,
3168
+ background: e.colorBgContainerDisabled,
3169
+ color: e.colorTextDisabled
3170
+ }
3171
+ },
3172
+ [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3173
+ background: e.colorBgContainer,
3174
+ border: `${ze(e.lineWidth)} ${e.lineType} ${e.colorSplit}`
3175
+ }
3176
+ })
3177
+ }), ya = (e) => ({
3178
+ "&-borderless": {
3179
+ [`${e.componentCls}-selector`]: {
3180
+ background: "transparent",
3181
+ border: `${ze(e.lineWidth)} ${e.lineType} transparent`
3182
+ },
3183
+ [`&${e.componentCls}-disabled`]: {
3184
+ [`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]: {
3185
+ color: e.colorTextDisabled
3186
+ }
3187
+ },
3188
+ [`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]: {
3189
+ background: e.multipleItemBg,
3190
+ border: `${ze(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`
3191
+ },
3192
+ // Status
3193
+ [`&${e.componentCls}-status-error`]: {
3194
+ [`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
3195
+ color: e.colorError
3196
+ }
3197
+ },
3198
+ [`&${e.componentCls}-status-warning`]: {
3199
+ [`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]: {
3200
+ color: e.colorWarning
3201
+ }
3202
+ }
3203
+ }
3204
+ }), Ea = (e) => ({
3205
+ [e.componentCls]: Object.assign(Object.assign(Object.assign({}, wa(e)), Ca(e)), ya(e))
3206
+ }), Ia = Ea, xa = (e) => {
3207
+ const {
3208
+ componentCls: t
3209
+ } = e;
3210
+ return {
3211
+ position: "relative",
3212
+ transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
3213
+ input: {
3214
+ cursor: "pointer"
3215
+ },
3216
+ [`${t}-show-search&`]: {
3217
+ cursor: "text",
3218
+ input: {
3219
+ cursor: "auto",
3220
+ color: "inherit",
3221
+ height: "100%"
3222
+ }
3223
+ },
3224
+ [`${t}-disabled&`]: {
3225
+ cursor: "not-allowed",
3226
+ input: {
3227
+ cursor: "not-allowed"
3228
+ }
3229
+ }
3230
+ };
3231
+ }, $a = (e) => {
3232
+ const {
3233
+ componentCls: t
3234
+ } = e;
3235
+ return {
3236
+ [`${t}-selection-search-input`]: {
3237
+ margin: 0,
3238
+ padding: 0,
3239
+ background: "transparent",
3240
+ border: "none",
3241
+ outline: "none",
3242
+ appearance: "none",
3243
+ fontFamily: "inherit",
3244
+ "&::-webkit-search-cancel-button": {
3245
+ display: "none",
3246
+ "-webkit-appearance": "none"
3247
+ }
3248
+ }
3249
+ };
3250
+ }, Ra = (e) => {
3251
+ const {
3252
+ antCls: t,
3253
+ componentCls: n,
3254
+ inputPaddingHorizontalBase: r,
3255
+ iconCls: a
3256
+ } = e;
3257
+ return {
3258
+ [n]: Object.assign(Object.assign({}, cn(e)), {
3259
+ position: "relative",
3260
+ display: "inline-flex",
3261
+ cursor: "pointer",
3262
+ [`&:not(${n}-customize-input) ${n}-selector`]: Object.assign(Object.assign({}, xa(e)), $a(e)),
3263
+ // ======================== Selection ========================
3264
+ [`${n}-selection-item`]: Object.assign(Object.assign({
3265
+ flex: 1,
3266
+ fontWeight: "normal",
3267
+ position: "relative",
3268
+ userSelect: "none"
3269
+ }, Zt), {
3270
+ // https://github.com/ant-design/ant-design/issues/40421
3271
+ [`> ${t}-typography`]: {
3272
+ display: "inline"
3273
+ }
3274
+ }),
3275
+ // ======================= Placeholder =======================
3276
+ [`${n}-selection-placeholder`]: Object.assign(Object.assign({}, Zt), {
3277
+ flex: 1,
3278
+ color: e.colorTextPlaceholder,
3279
+ pointerEvents: "none"
3280
+ }),
3281
+ // ========================== Arrow ==========================
3282
+ [`${n}-arrow`]: Object.assign(Object.assign({}, jn()), {
3283
+ position: "absolute",
3284
+ top: "50%",
3285
+ insetInlineStart: "auto",
3286
+ insetInlineEnd: r,
3287
+ height: e.fontSizeIcon,
3288
+ marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
3289
+ color: e.colorTextQuaternary,
3290
+ fontSize: e.fontSizeIcon,
3291
+ lineHeight: 1,
3292
+ textAlign: "center",
3293
+ pointerEvents: "none",
3294
+ display: "flex",
3295
+ alignItems: "center",
3296
+ transition: `opacity ${e.motionDurationSlow} ease`,
3297
+ [a]: {
3298
+ verticalAlign: "top",
3299
+ transition: `transform ${e.motionDurationSlow}`,
3300
+ "> svg": {
3301
+ verticalAlign: "top"
3302
+ },
3303
+ [`&:not(${n}-suffix)`]: {
3304
+ pointerEvents: "auto"
3305
+ }
3306
+ },
3307
+ [`${n}-disabled &`]: {
3308
+ cursor: "not-allowed"
3309
+ },
3310
+ "> *:not(:last-child)": {
3311
+ marginInlineEnd: 8
3312
+ // FIXME: magic
3313
+ }
3314
+ }),
3315
+ // ========================== Wrap ===========================
3316
+ [`${n}-selection-wrap`]: {
3317
+ display: "flex",
3318
+ width: "100%",
3319
+ position: "relative",
3320
+ minWidth: 0,
3321
+ // https://github.com/ant-design/ant-design/issues/51669
3322
+ "&:after": {
3323
+ content: '"\\a0"',
3324
+ width: 0,
3325
+ overflow: "hidden"
3326
+ }
3327
+ },
3328
+ // ========================= Prefix ==========================
3329
+ [`${n}-prefix`]: {
3330
+ flex: "none",
3331
+ marginInlineEnd: e.selectAffixPadding
3332
+ },
3333
+ // ========================== Clear ==========================
3334
+ [`${n}-clear`]: {
3335
+ position: "absolute",
3336
+ top: "50%",
3337
+ insetInlineStart: "auto",
3338
+ insetInlineEnd: r,
3339
+ zIndex: 1,
3340
+ display: "inline-block",
3341
+ width: e.fontSizeIcon,
3342
+ height: e.fontSizeIcon,
3343
+ marginTop: e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),
3344
+ color: e.colorTextQuaternary,
3345
+ fontSize: e.fontSizeIcon,
3346
+ fontStyle: "normal",
3347
+ lineHeight: 1,
3348
+ textAlign: "center",
3349
+ textTransform: "none",
3350
+ cursor: "pointer",
3351
+ opacity: 0,
3352
+ transition: `color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,
3353
+ textRendering: "auto",
3354
+ "&:before": {
3355
+ display: "block"
3356
+ },
3357
+ "&:hover": {
3358
+ color: e.colorTextTertiary
3359
+ }
3360
+ },
3361
+ [`&:hover ${n}-clear`]: {
3362
+ opacity: 1,
3363
+ background: e.colorBgBase,
3364
+ borderRadius: "50%"
3365
+ }
3366
+ }),
3367
+ // ========================= Feedback ==========================
3368
+ [`${n}-status`]: {
3369
+ "&-error, &-warning, &-success, &-validating": {
3370
+ [`&${n}-has-feedback`]: {
3371
+ [`${n}-clear`]: {
3372
+ insetInlineEnd: e.calc(r).add(e.fontSize).add(e.paddingXS).equal()
3373
+ }
3374
+ }
3375
+ }
3376
+ }
3377
+ };
3378
+ }, Oa = (e) => {
3379
+ const {
3380
+ componentCls: t
3381
+ } = e;
3382
+ return [
3383
+ {
3384
+ [t]: {
3385
+ // ==================== In Form ====================
3386
+ [`&${t}-in-form-item`]: {
3387
+ width: "100%"
3388
+ }
3389
+ }
3390
+ },
3391
+ // =====================================================
3392
+ // == LTR ==
3393
+ // =====================================================
3394
+ // Base
3395
+ Ra(e),
3396
+ // Single
3397
+ ba(e),
3398
+ // Multiple
3399
+ ha(e),
3400
+ // Dropdown
3401
+ da(e),
3402
+ // =====================================================
3403
+ // == RTL ==
3404
+ // =====================================================
3405
+ {
3406
+ [`${t}-rtl`]: {
3407
+ direction: "rtl"
3408
+ }
3409
+ },
3410
+ // =====================================================
3411
+ // == Space Compact ==
3412
+ // =====================================================
3413
+ Gr(e, {
3414
+ borderElCls: `${t}-selector`,
3415
+ focusElCls: `${t}-focused`
3416
+ })
3417
+ ];
3418
+ }, Ma = An("Select", (e, t) => {
3419
+ let {
3420
+ rootPrefixCls: n
3421
+ } = t;
3422
+ const r = Ot(e, {
3423
+ rootPrefixCls: n,
3424
+ inputPaddingHorizontalBase: e.calc(e.paddingSM).sub(1).equal(),
3425
+ multipleSelectItemHeight: e.multipleItemHeight,
3426
+ selectHeight: e.controlHeight
3427
+ });
3428
+ return [Oa(r), Ia(r)];
3429
+ }, Sa, {
3430
+ unitless: {
3431
+ optionLineHeight: !0,
3432
+ optionSelectedFontWeight: !0
3433
+ }
3434
+ });
3435
+ function Da(e) {
3436
+ let {
3437
+ suffixIcon: t,
3438
+ clearIcon: n,
3439
+ menuItemSelectedIcon: r,
3440
+ removeIcon: a,
3441
+ loading: i,
3442
+ multiple: l,
3443
+ hasFeedback: c,
3444
+ prefixCls: d,
3445
+ showSuffixIcon: f,
3446
+ feedbackIcon: m,
3447
+ showArrow: s,
3448
+ componentName: b
3449
+ } = e;
3450
+ process.env.NODE_ENV !== "production" && ln(b).deprecated(!n, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
3451
+ const u = n ?? /* @__PURE__ */ o.createElement(qr, null), g = (h) => t === null && !c && !s ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, f !== !1 && h, c && m);
3452
+ let v = null;
3453
+ if (t !== void 0)
3454
+ v = g(t);
3455
+ else if (i)
3456
+ v = g(/* @__PURE__ */ o.createElement(Yr, {
3457
+ spin: !0
3458
+ }));
3459
+ else {
3460
+ const h = `${d}-suffix`;
3461
+ v = (E) => {
3462
+ let {
3463
+ open: C,
3464
+ showSearch: T
3465
+ } = E;
3466
+ return g(C && T ? /* @__PURE__ */ o.createElement(Zr, {
3467
+ className: h
3468
+ }) : /* @__PURE__ */ o.createElement(Br, {
3469
+ className: h
3470
+ }));
3471
+ };
3472
+ }
3473
+ let S = null;
3474
+ r !== void 0 ? S = r : l ? S = /* @__PURE__ */ o.createElement(jr, null) : S = null;
3475
+ let w = null;
3476
+ return a !== void 0 ? w = a : w = /* @__PURE__ */ o.createElement(Qr, null), {
3477
+ clearIcon: u,
3478
+ suffixIcon: v,
3479
+ itemIcon: S,
3480
+ removeIcon: w
3481
+ };
3482
+ }
3483
+ function Na(e, t) {
3484
+ return t !== void 0 ? t : e !== null;
3485
+ }
3486
+ var Pa = globalThis && globalThis.__rest || function(e, t) {
3487
+ var n = {};
3488
+ for (var r in e)
3489
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
3490
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
3491
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
3492
+ t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
3493
+ return n;
3494
+ };
3495
+ const ur = "SECRET_COMBOBOX_MODE_DO_NOT_USE", sr = (e, t) => {
3496
+ var n;
3497
+ const {
3498
+ prefixCls: r,
3499
+ bordered: a,
3500
+ className: i,
3501
+ rootClassName: l,
3502
+ getPopupContainer: c,
3503
+ popupClassName: d,
3504
+ dropdownClassName: f,
3505
+ listHeight: m = 256,
3506
+ placement: s,
3507
+ listItemHeight: b,
3508
+ size: u,
3509
+ disabled: g,
3510
+ notFoundContent: v,
3511
+ status: S,
3512
+ builtinPlacements: w,
3513
+ dropdownMatchSelectWidth: h,
3514
+ popupMatchSelectWidth: E,
3515
+ direction: C,
3516
+ style: T,
3517
+ allowClear: p,
3518
+ variant: I,
3519
+ dropdownStyle: B,
3520
+ transitionName: V,
3521
+ tagRender: q,
3522
+ maxCount: _,
3523
+ prefix: A
3524
+ } = e, U = Pa(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"]), {
3525
+ getPopupContainer: Q,
3526
+ getPrefixCls: G,
3527
+ renderEmpty: j,
3528
+ direction: te,
3529
+ virtual: Z,
3530
+ popupMatchSelectWidth: Y,
3531
+ popupOverflow: x,
3532
+ select: M
3533
+ } = o.useContext(an), [, fe] = on(), ie = b ?? (fe == null ? void 0 : fe.controlHeight), J = G("select", r), se = G(), Ce = C ?? te, {
3534
+ compactSize: ge,
3535
+ compactItemClassnames: Re
3536
+ } = Xr(J, Ce), [ue, pe] = Vr("select", I, a), R = Wr(J), [y, D, K] = Ma(J, R), $ = o.useMemo(() => {
3537
+ const {
3538
+ mode: _e
3539
+ } = e;
3540
+ if (_e !== "combobox")
3541
+ return _e === ur ? "combobox" : _e;
3542
+ }, [e.mode]), F = $ === "multiple" || $ === "tags", le = Na(e.suffixIcon, e.showArrow), ve = (n = E ?? h) !== null && n !== void 0 ? n : Y, {
3543
+ status: re,
3544
+ hasFeedback: we,
3545
+ isFormItemInput: Be,
3546
+ feedbackIcon: xe
3547
+ } = o.useContext(Kr), Ne = Ar(re, S);
3548
+ let de;
3549
+ v !== void 0 ? de = v : $ === "combobox" ? de = null : de = (j == null ? void 0 : j("Select")) || /* @__PURE__ */ o.createElement(la, {
3550
+ componentName: "Select"
3551
+ });
3552
+ const {
3553
+ suffixIcon: Ge,
3554
+ itemIcon: Ye,
3555
+ removeIcon: Se,
3556
+ clearIcon: Oe
3557
+ } = Da(Object.assign(Object.assign({}, U), {
3558
+ multiple: F,
3559
+ hasFeedback: we,
3560
+ feedbackIcon: xe,
3561
+ showSuffixIcon: le,
3562
+ prefixCls: J,
3563
+ componentName: "Select"
3564
+ })), ye = p === !0 ? {
3565
+ clearIcon: Oe
3566
+ } : p, $e = Wn(U, ["suffixIcon", "itemIcon"]), Pe = He(d || f, {
3567
+ [`${J}-dropdown-${Ce}`]: Ce === "rtl"
3568
+ }, l, K, R, D), et = Ur((_e) => {
3569
+ var De;
3570
+ return (De = u ?? ge) !== null && De !== void 0 ? De : _e;
3571
+ }), je = o.useContext(Rr), Fe = g ?? je, Ee = He({
3572
+ [`${J}-lg`]: et === "large",
3573
+ [`${J}-sm`]: et === "small",
3574
+ [`${J}-rtl`]: Ce === "rtl",
3575
+ [`${J}-${ue}`]: pe,
3576
+ [`${J}-in-form-item`]: Be
3577
+ }, Fr(J, Ne, we), Re, M == null ? void 0 : M.className, i, l, K, R, D), gt = o.useMemo(() => s !== void 0 ? s : Ce === "rtl" ? "bottomRight" : "bottomLeft", [s, Ce]);
3578
+ if (process.env.NODE_ENV !== "production") {
3579
+ const _e = ln("Select");
3580
+ _e.deprecated(!f, "dropdownClassName", "popupClassName"), _e.deprecated(h === void 0, "dropdownMatchSelectWidth", "popupMatchSelectWidth"), process.env.NODE_ENV !== "production" && _e(!("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."), _e.deprecated(!("bordered" in e), "bordered", "variant"), process.env.NODE_ENV !== "production" && _e(!(typeof _ < "u" && !F), "usage", "`maxCount` only works with mode `multiple` or `tags`");
3581
+ }
3582
+ const [Ae] = Dr("SelectLike", B == null ? void 0 : B.zIndex);
3583
+ return y(/* @__PURE__ */ o.createElement(pn, Object.assign({
3584
+ ref: t,
3585
+ virtual: Z,
3586
+ showSearch: M == null ? void 0 : M.showSearch
3587
+ }, $e, {
3588
+ style: Object.assign(Object.assign({}, M == null ? void 0 : M.style), T),
3589
+ dropdownMatchSelectWidth: ve,
3590
+ transitionName: Nr(se, "slide-up", V),
3591
+ builtinPlacements: ua(w, x),
3592
+ listHeight: m,
3593
+ listItemHeight: ie,
3594
+ mode: $,
3595
+ prefixCls: J,
3596
+ placement: gt,
3597
+ direction: Ce,
3598
+ prefix: A,
3599
+ suffixIcon: Ge,
3600
+ menuItemSelectedIcon: Ye,
3601
+ removeIcon: Se,
3602
+ allowClear: ye,
3603
+ notFoundContent: de,
3604
+ className: Ee,
3605
+ getPopupContainer: c || Q,
3606
+ dropdownClassName: Pe,
3607
+ disabled: Fe,
3608
+ dropdownStyle: Object.assign(Object.assign({}, B), {
3609
+ zIndex: Ae
3610
+ }),
3611
+ maxCount: F ? _ : void 0,
3612
+ tagRender: F ? q : void 0
3613
+ })));
3614
+ };
3615
+ process.env.NODE_ENV !== "production" && (sr.displayName = "Select");
3616
+ const Ct = /* @__PURE__ */ o.forwardRef(sr), _a = Hr(Ct, "dropdownAlign");
3617
+ Ct.SECRET_COMBOBOX_MODE_DO_NOT_USE = ur;
3618
+ Ct.Option = mn;
3619
+ Ct.OptGroup = vn;
3620
+ Ct._InternalPanelDoNotUseOrYouWillBeFired = _a;
3621
+ process.env.NODE_ENV !== "production" && (Ct.displayName = "Select");
3622
+ const Ta = Ct, ri = At.div.attrs(() => ({}))`
3623
+ position: relative;
3624
+ border: 2px solid transparent;
3625
+ background-color: transparent;
3626
+ border-radius: 8px;
3627
+ padding: 1px;
3628
+
3629
+ ${({ $isFocused: e, theme: t, type: n = "primary" }) => e && `
3630
+ border: 2px solid ${t.colors[n].focussed.ringColor};
3631
+ background-color: transparent;
3632
+ border-radius: 8px;
3633
+ padding: 1px;
3634
+ `}
3635
+ `, La = ({ colors: e, sizing: t, typography: n, borderRadius: r }, a, i) => `
3636
+ color: ${e.input};
3637
+ font-size: ${t.Size4}px;
3638
+ line-height: ${t.Size6}px;
3639
+ letter-spacing: 0;
3640
+ font-weight: 400;
3641
+ border-width: 1px;
3642
+
3643
+ width: 100%;
3644
+ max-width: 330px;
3645
+ min-width: 100px;
3646
+ height: 32px;
3647
+
3648
+ background-color: ${e[a][i].backgroundColor};
3649
+ border-radius: ${r.BorderRadiusMd}px;
3650
+ gap: ${t.Size2}px;
3651
+
3652
+ &:active {
3653
+ background-color: ${e[a].pressed.backgroundColor};
3654
+ border-color: ${e[a].pressed.borderColor};
3655
+ }
3656
+
3657
+ // Remove focus styles
3658
+ &:focus, &:focus-visible {
3659
+ background-color: transparent;
3660
+ border-color: transparent;
3661
+ outline: none;
3662
+ box-shadow: none;
3663
+ }
3664
+
3665
+ .ant-select-arrow {
3666
+ color: #000000;
3667
+ -webkit-font-smoothing: antialiased;
3668
+ -moz-osx-font-smoothing: grayscale;
3669
+ text-rendering: optimizeLegibility;
3670
+ }
3671
+
3672
+ &:disabled,
3673
+ &.ant-select-disabled {
3674
+ color: ${e.inputs.onsurface.disabled};
3675
+ background-color: ${e.inputs.surface.disabled};
3676
+ border-color: ${e.inputs.surface.border};
3677
+
3678
+ .ant-select-selector {
3679
+ background-color: ${e.inputs.surface.disabled};
3680
+ }
3681
+
3682
+ .ant-select-arrow {
3683
+ color: ${e.inputs.onsurface["icon-disabled"]};
3684
+ }
3685
+ }
3686
+ `, za = At.div`
3687
+ .ant-select-item-option {
3688
+ transition: all 0.2s ease-in-out;
3689
+
3690
+ &:hover {
3691
+ background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
3692
+ color: ${({ theme: e, type: t }) => e.colors[t].hover.color};
3693
+ }
3694
+
3695
+ &.ant-select-item-option-selected {
3696
+ background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
3697
+ color: ${({ theme: e, type: t }) => e.colors[t].active.color};
3698
+
3699
+ &:hover {
3700
+ background-color: ${({ theme: e, type: t }) => e.colors[t].hover.backgroundColor};
3701
+ color: ${({ theme: e, type: t }) => e.colors[t].hover.color};
3702
+ }
3703
+ }
3704
+ }
3705
+ `, oi = At.div`
3706
+ .ant-select-dropdown {
3707
+ border-radius: ${({ theme: e }) => e.borderRadius.BorderRadiusMd}px;
3708
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
3709
+
3710
+ ${za} {
3711
+ padding: ${({ theme: e }) => e.sizing.Size2}px
3712
+ ${({ theme: e }) => e.sizing.Size3}px;
3713
+ }
3714
+ }
3715
+ `, ai = At(Ta)`
3716
+ ${({ theme: e, type: t = "primary", state: n = "active" }) => La(e, t, n)}
3717
+ `;
3718
+ export {
3719
+ ai as Select,
3720
+ oi as SelectDropdown,
3721
+ ri as SelectWrapper,
3722
+ za as StyledMenuItem
3723
+ };