@unicom-cloud/ui 0.8.65 → 0.8.67

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 (358) hide show
  1. package/Affix.js +79 -79
  2. package/Alert.js +46 -46
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +74 -74
  5. package/Avatar.js +36 -36
  6. package/BackTop.js +35 -35
  7. package/Badge.js +55 -55
  8. package/Breadcrumb.js +42 -42
  9. package/Button.js +24 -24
  10. package/Calendar.js +230 -230
  11. package/Card.js +18 -18
  12. package/Carousel.js +165 -165
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +26 -26
  17. package/Comment.js +18 -18
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +28 -27
  20. package/DatePicker.js +872 -871
  21. package/Descriptions.js +34 -34
  22. package/Divider.js +19 -19
  23. package/Draggable.js +27 -26
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +110 -110
  26. package/Empty.js +3 -3
  27. package/Form.js +984 -945
  28. package/Grid.js +34 -34
  29. package/Icon.js +16 -16
  30. package/IconHover.js +2 -2
  31. package/Image.js +2 -2
  32. package/Input.js +7 -6
  33. package/InputNumber.js +6 -6
  34. package/InputTag.js +1 -1
  35. package/Layout.js +24 -24
  36. package/Link.js +30 -30
  37. package/List.js +95 -95
  38. package/Mentions.js +85 -84
  39. package/Menu.js +2 -2
  40. package/Message.js +7 -6
  41. package/Modal.js +1 -1
  42. package/Notice.js +14 -3
  43. package/Notification.js +9 -7
  44. package/OverflowEllipsis.js +64 -62
  45. package/PageHeader.js +73 -73
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +60 -60
  49. package/Popover.js +31 -31
  50. package/Portal.js +23 -31
  51. package/Progress.js +22 -22
  52. package/Radio.js +2 -2
  53. package/Rate.js +24 -24
  54. package/ResizeBox.js +274 -271
  55. package/Result.js +3 -3
  56. package/Select.js +4 -4
  57. package/SelectView.js +257 -237
  58. package/Skeleton.js +46 -46
  59. package/Slider.js +286 -283
  60. package/Space.js +28 -28
  61. package/SpeechSynthesis.js +62 -55
  62. package/Spin.js +23 -23
  63. package/Statistic.js +80 -80
  64. package/Steps.js +67 -67
  65. package/Switch.js +47 -47
  66. package/Table.js +1463 -1395
  67. package/Tabs.js +5 -5
  68. package/Tag.js +45 -45
  69. package/TimePicker.js +154 -154
  70. package/Timeline.js +2 -2
  71. package/Tooltip.js +80 -79
  72. package/Transfer.js +103 -102
  73. package/Tree.js +3 -2
  74. package/TreeSelect.js +2 -2
  75. package/Trigger.js +699 -772
  76. package/Typography.js +756 -6
  77. package/Upload.js +2 -2
  78. package/VerificationCode.js +1 -1
  79. package/Version.js +1 -1
  80. package/VirtualList.js +1 -1
  81. package/Watermark.js +1 -1
  82. package/chunk/{DIx0qmCq.js → -UuKKT0Z.js} +29 -29
  83. package/chunk/{B8QV6E2b.js → AwZqeapI.js} +5 -5
  84. package/chunk/B5gK1Idp.js +19 -0
  85. package/chunk/B7FlazNB.js +24 -0
  86. package/chunk/{DXZEpA3t.js → BBvWDeuZ.js} +67 -67
  87. package/chunk/BCftTxEy.js +626 -0
  88. package/chunk/{CsbCHnFk.js → BGny4zSb.js} +60 -60
  89. package/chunk/BHF15Dog.js +98 -0
  90. package/chunk/BJQ5UNa-.js +1585 -0
  91. package/chunk/BP9sYyk9.js +8 -0
  92. package/chunk/BUdtVdnv.js +38 -0
  93. package/chunk/BVQlOzTS.js +11 -0
  94. package/chunk/B__a_gb_.js +519 -0
  95. package/chunk/BbEYToV1.js +10 -0
  96. package/chunk/BbdDQAnm.js +15 -0
  97. package/chunk/BdUcgWdu.js +11 -0
  98. package/chunk/BfbXSG70.js +26 -0
  99. package/chunk/BndfNLK4.js +186 -0
  100. package/chunk/BoMCZV6K.js +1098 -0
  101. package/chunk/Br0B6y1T.js +18 -0
  102. package/chunk/BrOW642m.js +130 -0
  103. package/chunk/BxUs8_Cr.js +9 -0
  104. package/chunk/{DK4KcodH.js → C42LIMP9.js} +244 -242
  105. package/chunk/C4YkFMzC.js +778 -0
  106. package/chunk/{CF6p9R93.js → C9Wcraj7.js} +21 -21
  107. package/chunk/{4-gvEY5y.js → CANgSlh3.js} +10 -10
  108. package/chunk/CJ_o9tZM.js +5 -0
  109. package/chunk/{Bqk6yh16.js → CK5m7rLl.js} +36 -36
  110. package/chunk/{CANaGbGR.js → CKNyIitu.js} +57 -56
  111. package/chunk/CLiqJm_T.js +10 -0
  112. package/chunk/{DjtWv6Wn.js → CNmmhbCn.js} +32 -32
  113. package/chunk/{BUCEs557.js → CP0odX99.js} +51 -51
  114. package/chunk/CPT-OZH2.js +14 -0
  115. package/chunk/CVSF8p0O.js +698 -0
  116. package/chunk/C_agcwLN.js +31 -0
  117. package/chunk/{DTjcKyDN.js → C_gJWGGh.js} +201 -201
  118. package/chunk/{CPcm9Cm5.js → CaasmWg_.js} +11 -11
  119. package/chunk/Ce1j9KTi.js +6 -0
  120. package/chunk/{D_-UD4vO.js → Cf5QNhkG.js} +18 -18
  121. package/chunk/CkNSv2U7.js +56 -0
  122. package/chunk/Cp2f70gB.js +9 -0
  123. package/chunk/CpegYjdC.js +16 -0
  124. package/chunk/CucI3KZr.js +20 -0
  125. package/chunk/CwoFBTYz.js +11 -0
  126. package/chunk/D2KPqPhV.js +17 -0
  127. package/chunk/D7NyvE5f.js +17 -0
  128. package/chunk/D8oTPQ2H.js +384 -0
  129. package/chunk/{CLBavO5c.js → DC1iHEiy.js} +87 -87
  130. package/chunk/{Dnycc1qJ.js → DFrfrmfK.js} +120 -119
  131. package/chunk/DGTIZ_0O.js +6 -0
  132. package/chunk/DJfpiZn_.js +25 -0
  133. package/chunk/DKr2_PYd.js +34 -0
  134. package/chunk/DNUz6zgo.js +11 -0
  135. package/chunk/DRtM649q.js +11 -0
  136. package/chunk/DS_mUWn6.js +41 -0
  137. package/chunk/DU6bs_19.js +10 -0
  138. package/chunk/DWdbwz22.js +10 -0
  139. package/chunk/DcveZuqd.js +6 -0
  140. package/chunk/DdVFknul.js +24 -0
  141. package/chunk/DgRfikwe.js +16 -0
  142. package/chunk/{DG-epQqF.js → DkyR2EfG.js} +66 -66
  143. package/chunk/{DUeHQKtx.js → DleQ5HwG.js} +42 -42
  144. package/chunk/DnrZEnQ_.js +27 -0
  145. package/chunk/DsRSHWtX.js +1025 -0
  146. package/chunk/Dz5BdmXo.js +270 -0
  147. package/chunk/EANe01DF.js +1030 -0
  148. package/chunk/{CwhPMMWy.js → Ey4YJCkX.js} +7 -7
  149. package/chunk/GoNx5R4F.js +873 -0
  150. package/chunk/HDUQku8d.js +20 -0
  151. package/chunk/HrAP__Hi.js +25 -0
  152. package/chunk/JPPo5nY_.js +9 -0
  153. package/chunk/{CIlGCedk.js → SLWP34OR.js} +90 -85
  154. package/chunk/VVKtwaGf.js +278 -0
  155. package/chunk/WPNpLxSI.js +16 -0
  156. package/chunk/{DLvMA1OW.js → WpO_DsK4.js} +49 -48
  157. package/chunk/fdU3ang6.js +14 -0
  158. package/chunk/{DqFhzTWC.js → fkclKOAL.js} +298 -292
  159. package/chunk/flvYlqx3.js +22 -0
  160. package/chunk/kTDayEpF.js +288 -0
  161. package/chunk/{DQDkV47j.js → pZoNQ75H.js} +31 -31
  162. package/chunk/qFf1w_Jq.js +8 -0
  163. package/chunk/{CH1UUxsg.js → w-kM1L5W.js} +155 -155
  164. package/hooks/index.js +53 -49
  165. package/hooks/useComputedState.js +2 -10
  166. package/hooks/useCreate.js +2 -7
  167. package/hooks/useForceUpdate.js +2 -7
  168. package/hooks/useId.js +2 -10
  169. package/hooks/useInView.js +2 -30
  170. package/hooks/useIntersectionObserver.js +2 -23
  171. package/hooks/useInterval.js +2 -17
  172. package/hooks/useIsFirstRender.js +2 -9
  173. package/hooks/useIsomorphicLayoutEffect.js +2 -5
  174. package/hooks/useKeyboardEvent.js +2 -16
  175. package/hooks/useMedia.js +2 -15
  176. package/hooks/useMergeProps.js +2 -18
  177. package/hooks/useMergeValue.js +2 -19
  178. package/hooks/useOnlineStatus.js +4 -0
  179. package/hooks/useOverflowHidden.js +2 -25
  180. package/hooks/useOverrideRef.js +2 -13
  181. package/hooks/usePersistCallback.js +2 -13
  182. package/hooks/usePrefersColorSchemeDark.js +4 -0
  183. package/hooks/usePrevious.js +2 -9
  184. package/hooks/useRefs.js +2 -9
  185. package/hooks/useResizeObserver.js +2 -15
  186. package/hooks/useStateCallback.js +2 -15
  187. package/hooks/useStateWithPromise.js +2 -24
  188. package/hooks/useUpdateEffect.js +2 -9
  189. package/hooks/useVerificationCode.js +73 -0
  190. package/hooks/useWatch.js +2 -10
  191. package/hooks/{use-watermark.js → useWatermark.js} +27 -26
  192. package/hooks/useWindowSize.js +2 -20
  193. package/index.js +571 -584
  194. package/locale/en-US.js +4 -2
  195. package/locale/interface.js +1 -4
  196. package/locale/ja-JP.js +3 -1
  197. package/locale/tr-TR.js +1 -1
  198. package/locale/zh-CN.js +3 -1
  199. package/locale/zh-HK.js +3 -1
  200. package/locale/zh-TW.js +3 -1
  201. package/package.json +1 -1
  202. package/style.css +1 -1
  203. package/types/anchor/util.d.ts +1 -1
  204. package/types/button/index.d.ts +2 -2
  205. package/types/color-picker/hooks/useColorPicker.d.ts +2 -2
  206. package/types/form/Control-old.d.ts +56 -0
  207. package/types/form/Control.d.ts +6 -54
  208. package/types/form/FormItem.d.ts +1 -1
  209. package/types/form/store.d.ts +0 -1
  210. package/types/hooks/index.d.ts +2 -0
  211. package/types/hooks/useComputedState.d.ts +1 -4
  212. package/types/hooks/useCreate.d.ts +1 -2
  213. package/types/hooks/useForceUpdate.d.ts +1 -2
  214. package/types/hooks/useId.d.ts +1 -2
  215. package/types/hooks/useInView.d.ts +1 -11
  216. package/types/hooks/useIntersectionObserver.d.ts +1 -7
  217. package/types/hooks/useInterval.d.ts +1 -2
  218. package/types/hooks/useIsFirstRender.d.ts +1 -2
  219. package/types/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  220. package/types/hooks/useKeyboardEvent.d.ts +1 -8
  221. package/types/hooks/useMedia.d.ts +1 -2
  222. package/types/hooks/useMergeProps.d.ts +1 -5
  223. package/types/hooks/useMergeValue.d.ts +1 -6
  224. package/types/hooks/useOnlineStatus.d.ts +1 -0
  225. package/types/hooks/useOverflowHidden.d.ts +1 -5
  226. package/types/hooks/useOverrideRef.d.ts +1 -6
  227. package/types/hooks/usePersistCallback.d.ts +1 -2
  228. package/types/hooks/usePrefersColorSchemeDark.d.ts +1 -0
  229. package/types/hooks/usePrevious.d.ts +1 -3
  230. package/types/hooks/useRefs.d.ts +1 -2
  231. package/types/hooks/useResizeObserver.d.ts +1 -6
  232. package/types/hooks/useStateCallback.d.ts +1 -5
  233. package/types/hooks/useStateWithPromise.d.ts +1 -2
  234. package/types/hooks/useUpdateEffect.d.ts +1 -3
  235. package/types/hooks/useWatch.d.ts +1 -3
  236. package/types/hooks/useWindowSize.d.ts +1 -5
  237. package/types/image/interface.d.ts +1 -0
  238. package/types/index.d.ts +157 -86
  239. package/types/input/Input.d.ts +1 -1
  240. package/types/input/Textarea.d.ts +2 -2
  241. package/types/locale/en-US.d.ts +2 -0
  242. package/types/locale/interface.d.ts +1 -2
  243. package/types/locale/ja-JP.d.ts +2 -0
  244. package/types/locale/zh-CN.d.ts +2 -0
  245. package/types/locale/zh-HK.d.ts +2 -0
  246. package/types/locale/zh-TW.d.ts +2 -0
  247. package/types/menu/context.d.ts +1 -1
  248. package/types/message/index.d.ts +14 -14
  249. package/types/message/interface.d.ts +2 -0
  250. package/types/modal/config.d.ts +0 -1
  251. package/types/modal/interface.d.ts +0 -1
  252. package/types/notice/index.d.ts +2 -27
  253. package/types/notification/index.d.ts +15 -16
  254. package/types/notification/interface.d.ts +2 -0
  255. package/types/notification/withNotification.d.ts +2 -0
  256. package/types/select/util.d.ts +1 -2
  257. package/types/select-view/interface.d.ts +2 -1
  258. package/types/speech-synthesis/index.d.ts +1 -1
  259. package/types/table/constant.d.ts +2 -0
  260. package/types/table/hook/useThResizable.d.ts +7 -0
  261. package/types/table/index.d.ts +10 -1
  262. package/types/table/style/index.d.ts +1 -0
  263. package/types/table/th-resizable/index.d.ts +2 -0
  264. package/types/table/thead/Column.d.ts +1 -2
  265. package/types/tree/Tree.d.ts +12 -67
  266. package/types/tree-select/Select.d.ts +2 -2
  267. package/types/trigger/index.d.ts +2 -120
  268. package/types/trigger/interface.d.ts +2 -1
  269. package/types/utils/CSSTransition.d.ts +2 -3
  270. package/types/utils/caseName.d.ts +1 -1
  271. package/types/utils/className.d.ts +1 -1
  272. package/types/utils/constant.d.ts +2 -2
  273. package/types/utils/copy.d.ts +1 -1
  274. package/types/utils/dayjs.d.ts +1 -21
  275. package/types/utils/dom.d.ts +1 -6
  276. package/types/utils/fileToURL.d.ts +1 -1
  277. package/types/utils/fillNBSP.d.ts +1 -1
  278. package/types/utils/getHighlightText.d.ts +1 -5
  279. package/types/utils/getHotkeyHandler.d.ts +1 -8
  280. package/types/utils/getStringLength.d.ts +1 -1
  281. package/types/utils/include.d.ts +1 -1
  282. package/types/utils/index.d.ts +3 -4
  283. package/types/utils/is.d.ts +1 -16
  284. package/types/utils/keyboardCode.d.ts +3 -0
  285. package/types/utils/lodash.d.ts +1 -17
  286. package/types/utils/mergeProps.d.ts +1 -1
  287. package/types/utils/mergedToString.d.ts +1 -1
  288. package/types/utils/omit.d.ts +1 -1
  289. package/types/utils/pad.d.ts +1 -2
  290. package/types/utils/pick.d.ts +2 -4
  291. package/types/utils/reactDOM.d.ts +1 -7
  292. package/types/utils/resizeObserverEffect.d.ts +2 -0
  293. package/types/utils/saveAs.d.ts +1 -1
  294. package/types/utils/screenfull.d.ts +2 -0
  295. package/types/utils/scrollIntoView.d.ts +1 -2
  296. package/types/utils/style.d.ts +1 -3
  297. package/types/utils/throttleByRaf.d.ts +1 -5
  298. package/types/utils/throttleByRaf2.d.ts +1 -0
  299. package/types/utils/warning.d.ts +1 -2
  300. package/types/version/index.d.ts +1 -1
  301. package/utils/CSSTransition.js +2 -6
  302. package/utils/className.js +2 -2
  303. package/utils/constant.js +8 -9
  304. package/utils/contextHolder.js +1 -1
  305. package/utils/copy.js +1 -1
  306. package/utils/dayjs.js +14 -173
  307. package/utils/dom.js +33 -29
  308. package/utils/fillNBSP.js +2 -4
  309. package/utils/getHighlightText.js +2 -38
  310. package/utils/getHotkeyHandler.js +2 -25
  311. package/utils/getStringLength.js +2 -7
  312. package/utils/include.js +2 -7
  313. package/utils/index.js +237 -240
  314. package/utils/is.js +116 -156
  315. package/utils/keyboardCode.js +27 -0
  316. package/utils/mergeProps.js +2 -9
  317. package/utils/mergedToString.js +2 -13
  318. package/utils/omit.js +2 -9
  319. package/utils/pad.js +12 -12
  320. package/utils/pick.js +4 -15
  321. package/utils/reactDOM.js +3 -54
  322. package/utils/resizeObserverEffect.js +4 -0
  323. package/utils/saveAs.js +1 -1
  324. package/utils/screenfull.js +4 -0
  325. package/utils/scrollIntoView.js +2 -21
  326. package/utils/style.js +12 -11
  327. package/utils/throttleByRaf.js +13 -12
  328. package/utils/throttleByRaf2.js +5 -0
  329. package/utils/warning.js +5 -4
  330. package/NotificationBase.js +0 -53
  331. package/chunk/1GQdnTJp.js +0 -284
  332. package/chunk/BAWsPQBM.js +0 -11
  333. package/chunk/BS09tn7B.js +0 -638
  334. package/chunk/BqGtwxTi.js +0 -777
  335. package/chunk/BqufsN8i.js +0 -376
  336. package/chunk/BtlvlGQN.js +0 -278
  337. package/chunk/C2lIz2F9.js +0 -60
  338. package/chunk/CGZ0In1p.js +0 -776
  339. package/chunk/CWgltRVL.js +0 -698
  340. package/chunk/D3NFxdmG.js +0 -518
  341. package/chunk/DApXtulb.js +0 -1102
  342. package/chunk/DlLL5JQo.js +0 -1501
  343. package/chunk/Dv_xRzvR.js +0 -269
  344. package/chunk/Ek8U5CTN.js +0 -1032
  345. package/chunk/ewRDIDUz.js +0 -995
  346. package/chunk/l0sNRNKZ.js +0 -1
  347. package/chunk/tYXLFPVI.js +0 -871
  348. package/hooks/use-verification-code.js +0 -73
  349. package/types/notification-base/index.d.ts +0 -15
  350. package/types/notification-base/style/index.d.ts +0 -2
  351. package/types/trigger/Portal.d.ts +0 -7
  352. package/types/utils/keyCode.d.ts +0 -45
  353. package/types/utils/raf.d.ts +0 -3
  354. package/types/utils/throttleByRafV2.d.ts +0 -5
  355. package/utils/keyCode.js +0 -12
  356. package/utils/raf.js +0 -19
  357. package/utils/throttleByRafV2.js +0 -16
  358. /package/style/{variable.less → variables.less} +0 -0
@@ -1,146 +1,150 @@
1
1
  var Mt = Object.defineProperty;
2
2
  var Nt = (s, t, o) => t in s ? Mt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[t] = o;
3
- var Xe = (s, t, o) => Nt(s, typeof t != "symbol" ? t + "" : t, o);
4
- import { jsx as i, jsxs as V } from "react/jsx-runtime";
3
+ var Fe = (s, t, o) => Nt(s, typeof t != "symbol" ? t + "" : t, o);
4
+ import { jsx as i, jsxs as D } from "react/jsx-runtime";
5
5
  import We from "lodash/isArray";
6
6
  import Lt from "lodash/isPlainObject";
7
7
  import Ze from "lodash/isUndefined";
8
- import ie, { useContext as Pe, forwardRef as Ne, createContext as At, useState as M, useRef as U, useMemo as Se, useImperativeHandle as je, useCallback as $t, useEffect as $ } from "react";
9
- import { useIsFirstRender as Ut } from "../hooks/useIsFirstRender.js";
10
- import { useMergeValue as Me } from "../hooks/useMergeValue.js";
8
+ import ie, { useContext as Pe, forwardRef as Ne, createContext as $t, useState as S, useRef as A, useMemo as Se, useImperativeHandle as je, useCallback as At, useEffect as $ } from "react";
9
+ import { u as zt } from "./CLiqJm_T.js";
10
+ import { R as Me } from "./HDUQku8d.js";
11
11
  import Be from "@unicom-cloud/icons/IconUiClose";
12
12
  import Tt from "@unicom-cloud/icons/IconUiCopy";
13
- import Rt from "@unicom-cloud/icons/IconUiFullscreen";
14
- import He from "@unicom-cloud/icons/IconUiLeft";
15
- import zt from "@unicom-cloud/icons/IconUiLoading";
16
- import Et from "@unicom-cloud/icons/IconUiOriginalSize";
17
- import _e from "@unicom-cloud/icons/IconUiRight";
18
- import Dt from "@unicom-cloud/icons/IconUiRotateLeft";
19
- import Ot from "@unicom-cloud/icons/IconUiRotateRight";
13
+ import Ut from "@unicom-cloud/icons/IconUiFullscreen";
14
+ import _e from "@unicom-cloud/icons/IconUiLeft";
15
+ import Rt from "@unicom-cloud/icons/IconUiLoading";
16
+ import Ot from "@unicom-cloud/icons/IconUiOriginalSize";
17
+ import He from "@unicom-cloud/icons/IconUiRight";
18
+ import Et from "@unicom-cloud/icons/IconUiRotateLeft";
19
+ import Dt from "@unicom-cloud/icons/IconUiRotateRight";
20
20
  import Vt from "@unicom-cloud/icons/IconUiZoomIn";
21
21
  import Yt from "@unicom-cloud/icons/IconUiZoomOut";
22
- import { d as qe, a as Ft } from "./DlLL5JQo.js";
22
+ import { a as Ke, b as Xt } from "./BJQ5UNa-.js";
23
23
  import "lodash/isEqualWith";
24
- import "../utils/is.js";
25
- import { A as Xt, c as Bt, a as Gt, b as Wt, d as Zt } from "./C2lIz2F9.js";
24
+ import "./CkNSv2U7.js";
25
+ import { r as Ft, d as Bt, y as Gt, n as Wt, o as Zt } from "./BrOW642m.js";
26
26
  import "lodash/isNumber";
27
27
  import "lodash/merge";
28
28
  import { isServerRendering as jt, on as Ce, off as ke } from "../utils/dom.js";
29
- import "../hooks/useIntersectionObserver.js";
30
- import { useMergeProps as Ht } from "../hooks/useMergeProps.js";
31
- import { useOverflowHidden as _t } from "../hooks/useOverflowHidden.js";
32
- import { findDOMNode as qt } from "../utils/reactDOM.js";
33
- import { useUpdateEffect as Kt } from "../hooks/useUpdateEffect.js";
29
+ import "./HrAP__Hi.js";
30
+ import { c as _t } from "./B5gK1Idp.js";
31
+ import { y as Ht } from "./BfbXSG70.js";
32
+ import { g as Kt } from "./BUdtVdnv.js";
33
+ import "./Ce1j9KTi.js";
34
+ import { c as qt } from "./BbEYToV1.js";
35
+ import "lodash/debounce";
34
36
  import Jt from "../Portal.js";
35
- import { P as Ge } from "./CLBavO5c.js";
36
- import { y as Y } from "./BAWsPQBM.js";
37
- import { s as Qt } from "./CwhPMMWy.js";
38
- import en from "@unicom-cloud/icons/IconUiMore";
39
- import tn from "../Tooltip.js";
40
- import nn from "../Trigger.js";
41
- const on = (s) => {
42
- const { style: t, className: o, prefixCls: n, popup: r, children: u } = s, c = Y(`${n}-trigger`, o);
43
- return /* @__PURE__ */ i(nn, { style: t, className: c, popup: r, showArrow: !0, children: u });
37
+ import { N as Ge } from "./DC1iHEiy.js";
38
+ import { m as V } from "./JPPo5nY_.js";
39
+ import { s as Qt } from "./Ey4YJCkX.js";
40
+ import { l as en } from "./flvYlqx3.js";
41
+ import tn from "@unicom-cloud/icons/IconUiMore";
42
+ import nn from "../Tooltip.js";
43
+ import on from "../Trigger.js";
44
+ const rn = (s) => {
45
+ const { style: t, className: o, prefixCls: n, popup: r, children: u } = s, a = V(`${n}-trigger`, o);
46
+ return /* @__PURE__ */ i(on, { style: t, className: a, popup: r, showArrow: !0, children: u });
44
47
  };
45
- function rn(s) {
48
+ function sn(s) {
46
49
  const {
47
50
  current: t,
48
51
  previewCount: o,
49
52
  infinite: n = !1,
50
53
  disableLeft: r,
51
54
  disableRight: u,
52
- onPrev: c,
53
- onNext: y
54
- } = s, { getPrefixCls: N } = Pe(qe), v = N("image-preview"), F = Y(`${v}-arrow`);
55
- return /* @__PURE__ */ V("div", { className: F, children: [
55
+ onPrev: a,
56
+ onNext: w
57
+ } = s, { getPrefixCls: M } = Pe(Ke), v = M("image-preview"), Y = V(`${v}-arrow`);
58
+ return /* @__PURE__ */ D("div", { className: Y, children: [
56
59
  /* @__PURE__ */ i(
57
60
  "div",
58
61
  {
59
- className: Y(`${v}-arrow-left`, {
62
+ className: V(`${v}-arrow-left`, {
60
63
  [`${v}-arrow-disabled`]: r
61
64
  }),
62
65
  onClick: (b) => {
63
- b.preventDefault(), !r && (c == null || c());
66
+ b.preventDefault(), !r && (a == null || a());
64
67
  },
65
- children: /* @__PURE__ */ i(He, {})
68
+ children: /* @__PURE__ */ i(_e, {})
66
69
  }
67
70
  ),
68
71
  /* @__PURE__ */ i(
69
72
  "div",
70
73
  {
71
- className: Y(`${v}-arrow-right`, {
74
+ className: V(`${v}-arrow-right`, {
72
75
  [`${v}-arrow-disabled`]: u
73
76
  }),
74
77
  onClick: (b) => {
75
- b.preventDefault(), !u && (y == null || y());
78
+ b.preventDefault(), !u && (w == null || w());
76
79
  },
77
- children: /* @__PURE__ */ i(_e, {})
80
+ children: /* @__PURE__ */ i(He, {})
78
81
  }
79
82
  )
80
83
  ] });
81
84
  }
82
- const sn = (s, t) => {
85
+ const an = (s, t) => {
83
86
  const {
84
87
  prefixCls: o,
85
88
  previewPrefixCls: n,
86
89
  simple: r = !1,
87
90
  actions: u = [],
88
- actionsLayout: c = [],
89
- defaultActions: y = []
90
- } = s, N = new Set(c), v = (f) => N.has(f.key), F = [
91
- ...y.filter(v),
91
+ actionsLayout: a = [],
92
+ defaultActions: w = []
93
+ } = s, M = new Set(a), v = (m) => M.has(m.key), Y = [
94
+ ...w.filter(v),
92
95
  ...u.filter(v)
93
96
  ], b = u.filter(
94
- (f) => !N.has(f.key)
95
- ), X = F.sort((f, I) => {
96
- const L = c.indexOf(f.key), R = c.indexOf(I.key);
97
- return L > R ? 1 : -1;
97
+ (m) => !M.has(m.key)
98
+ ), X = Y.sort((m, I) => {
99
+ const N = a.indexOf(m.key), T = a.indexOf(I.key);
100
+ return N > T ? 1 : -1;
98
101
  });
99
- if (N.has("extra")) {
100
- const f = c.indexOf("extra");
101
- X.splice(f, 0, ...b);
102
+ if (M.has("extra")) {
103
+ const m = a.indexOf("extra");
104
+ X.splice(m, 0, ...b);
102
105
  }
103
- const T = (f, I = !1) => {
104
- const { content: L, disabled: R, key: C, name: P, getContainer: z, onClick: E, ...j } = f, D = /* @__PURE__ */ V(
106
+ const z = (m, I = !1) => {
107
+ const { content: N, disabled: T, key: x, name: P, getContainer: U, onClick: R, ...j } = m, O = /* @__PURE__ */ D(
105
108
  "div",
106
109
  {
107
- className: Y(`${n}-toolbar-action`, {
108
- [`${n}-toolbar-action-disabled`]: R
110
+ className: V(`${n}-toolbar-action`, {
111
+ [`${n}-toolbar-action-disabled`]: T
109
112
  }),
110
- onClick: (B) => {
111
- !R && E && E(B);
113
+ onClick: (F) => {
114
+ !T && R && R(F);
112
115
  },
113
- onMouseDown: (B) => {
114
- B.preventDefault();
116
+ onMouseDown: (F) => {
117
+ F.preventDefault();
115
118
  },
116
119
  ...j,
117
120
  children: [
118
- L && /* @__PURE__ */ i("span", { className: `${n}-toolbar-action-content`, children: L }),
121
+ N && /* @__PURE__ */ i("span", { className: `${n}-toolbar-action-content`, children: N }),
119
122
  I && P && /* @__PURE__ */ i("span", { className: `${n}-toolbar-action-name`, children: P })
120
123
  ]
121
124
  },
122
- C
125
+ x
123
126
  );
124
- return z ? z(D) : D;
127
+ return U ? U(O) : O;
125
128
  };
126
- if (!X.length) return null;
127
- const Z = X.map((f) => {
128
- const I = T(f, r);
129
- return !r && f.name && !f.getContainer ? /* @__PURE__ */ i(
130
- tn,
129
+ if (!X.length)
130
+ return null;
131
+ const Z = X.map((m) => {
132
+ const I = z(m, r);
133
+ return !r && m.name && !m.getContainer ? /* @__PURE__ */ i(
134
+ nn,
131
135
  {
132
- content: f.name,
136
+ content: m.name,
133
137
  className: `${n}-toolbar-tooltip`,
134
138
  children: I
135
139
  },
136
- f.key
140
+ m.key
137
141
  ) : I;
138
142
  });
139
- return /* @__PURE__ */ V(
143
+ return /* @__PURE__ */ D(
140
144
  "div",
141
145
  {
142
146
  ref: t,
143
- className: Y(
147
+ className: V(
144
148
  `${n}-toolbar`,
145
149
  {
146
150
  [`${n}-toolbar-simple`]: r
@@ -150,14 +154,14 @@ const sn = (s, t) => {
150
154
  style: s.style,
151
155
  children: [
152
156
  r && /* @__PURE__ */ i(
153
- on,
157
+ rn,
154
158
  {
155
159
  prefixCls: o,
156
160
  className: `${n}-trigger`,
157
161
  popup: () => /* @__PURE__ */ i("div", { children: Z }),
158
- children: T({
162
+ children: z({
159
163
  key: "trigger",
160
- content: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(en, {}) })
164
+ content: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(tn, {}) })
161
165
  })
162
166
  }
163
167
  ),
@@ -165,9 +169,9 @@ const sn = (s, t) => {
165
169
  ]
166
170
  }
167
171
  );
168
- }, an = Ne(
169
- sn
170
- ), Ke = At({
172
+ }, cn = Ne(
173
+ an
174
+ ), qe = $t({
171
175
  previewGroup: !1,
172
176
  previewUrlMap: /* @__PURE__ */ new Map(),
173
177
  previewPropsMap: /* @__PURE__ */ new Map(),
@@ -180,9 +184,9 @@ const sn = (s, t) => {
180
184
  visible: !1,
181
185
  handleVisibleChange: () => null
182
186
  });
183
- function cn(s, t, o, n, r) {
184
- let u = o, c = n;
185
- return o && (s.width > t.width ? u = 0 : (t.left > s.left && (u -= Math.abs(s.left - t.left) / r), t.right < s.right && (u += Math.abs(s.right - t.right) / r))), n && (s.height > t.height ? c = 0 : (t.top > s.top && (c -= Math.abs(s.top - t.top) / r), t.bottom < s.bottom && (c += Math.abs(s.bottom - t.bottom) / r))), [u, c];
187
+ function ln(s, t, o, n, r) {
188
+ let u = o, a = n;
189
+ return o && (s.width > t.width ? u = 0 : (t.left > s.left && (u -= Math.abs(s.left - t.left) / r), t.right < s.right && (u += Math.abs(s.right - t.right) / r))), n && (s.height > t.height ? a = 0 : (t.top > s.top && (a -= Math.abs(s.top - t.top) / r), t.bottom < s.bottom && (a += Math.abs(s.bottom - t.bottom) / r))), [u, a];
186
190
  }
187
191
  const Je = [
188
192
  25,
@@ -203,9 +207,9 @@ const Je = [
203
207
  400,
204
208
  500
205
209
  ];
206
- class ln {
210
+ class un {
207
211
  constructor(t) {
208
- Xe(this, "scaleAttr");
212
+ Fe(this, "scaleAttr");
209
213
  this.updateScale(t);
210
214
  }
211
215
  get scales() {
@@ -226,8 +230,10 @@ class ln {
226
230
  this.scaleAttr = o;
227
231
  }
228
232
  findClosestIndex(t, o = this.scaleAttr) {
229
- if (!o.length) return;
230
- if (o.length === 1) return 0;
233
+ if (!o.length)
234
+ return;
235
+ if (o.length === 1)
236
+ return 0;
231
237
  let n = o.length - 1;
232
238
  for (let r = 0; r < o.length; r++) {
233
239
  const u = o[r];
@@ -236,8 +242,8 @@ class ln {
236
242
  break;
237
243
  }
238
244
  if (t < u) {
239
- const c = o[r - 1];
240
- n = c === void 0 || Math.abs(c - t) <= Math.abs(u - t) ? r - 1 : r;
245
+ const a = o[r - 1];
246
+ n = a === void 0 || Math.abs(a - t) <= Math.abs(u - t) ? r - 1 : r;
241
247
  break;
242
248
  }
243
249
  }
@@ -248,8 +254,8 @@ class ln {
248
254
  return n === -1 && (n = this.findClosestIndex(t)), o === "zoomIn" ? n === this.scaleAttr.length - 1 ? t : this.scaleAttr[n + 1] : n === 0 ? t : this.scaleAttr[n - 1];
249
255
  }
250
256
  }
251
- function un(s) {
252
- const [t, o] = M(s);
257
+ function mn(s) {
258
+ const [t, o] = S(s);
253
259
  return {
254
260
  status: t,
255
261
  isBeforeLoad: t === "beforeLoad",
@@ -284,123 +290,123 @@ const Ie = 90, fn = {
284
290
  scales: Je,
285
291
  resetTranslate: !0
286
292
  };
287
- function mn(s, t) {
293
+ function pn(s, t) {
288
294
  const {
289
295
  previewGroup: o,
290
296
  previewUrlMap: n,
291
297
  currentIndex: r,
292
298
  setCurrentIndex: u,
293
- infinite: c,
294
- previewPropsMap: y
295
- } = Pe(Ke), N = o ? y.get(r) : {}, v = Ht(
299
+ infinite: a,
300
+ previewPropsMap: w
301
+ } = Pe(qe), M = o ? w.get(r) : {}, v = _t(
296
302
  s,
297
303
  fn,
298
- N
304
+ M
299
305
  ), {
300
- className: F,
306
+ className: Y,
301
307
  style: b,
302
308
  src: X,
303
- defaultVisible: T,
309
+ defaultVisible: z,
304
310
  maskClosable: Z,
305
- closable: f,
311
+ closable: m,
306
312
  breakPoint: I,
307
- actions: L,
308
- actionsLayout: R,
309
- getPopupContainer: C,
313
+ actions: N,
314
+ actionsLayout: T,
315
+ getPopupContainer: x,
310
316
  onVisibleChange: P,
311
- scales: z,
312
- escToExit: E,
317
+ scales: U,
318
+ escToExit: R,
313
319
  imgAttributes: j = {},
314
- imageRender: D,
315
- extra: B = null,
320
+ imageRender: O,
321
+ extra: F = null,
316
322
  resetTranslate: J
317
- } = v, H = o ? n.get(r) : X, [G, Q] = M(H), [h, se] = Me(!1, {
318
- defaultValue: T,
323
+ } = v, _ = o ? n.get(r) : X, [B, Q] = S(_), [h, se] = Me(!1, {
324
+ defaultValue: z,
319
325
  value: v.visible
320
- }), ee = Pe(qe), { getPrefixCls: l, locale: m, rtl: k } = ee, x = l("image"), p = `${x}-preview`, d = Y(
326
+ }), ee = Pe(Ke), { getPrefixCls: c, locale: f, rtl: C } = ee, y = c("image"), p = `${y}-preview`, d = V(
321
327
  p,
322
328
  {
323
329
  [`${p}-hide`]: !h,
324
- [`${p}-rtl`]: k
330
+ [`${p}-rtl`]: C
325
331
  },
326
- F
327
- ), _ = U(), et = U(), S = U(), Le = U(), ae = U(!1), K = U({
332
+ Y
333
+ ), H = A(), et = A(), G = A(), Le = A(), ae = A(!1), q = A({
328
334
  pageX: 0,
329
335
  pageY: 0,
330
336
  originX: 0,
331
337
  originY: 0
332
- }), { isLoading: tt, isLoaded: nt, setStatus: ce } = un("loading"), [ot, rt] = M(!1), [A, le] = M({ x: 0, y: 0 }), [g, ue] = M(1), [Ae, $e] = M(!1), [te, fe] = M(0), [O, Ue] = M(!1), W = Se(() => new ln(z), []), {
333
- onLoad: me,
338
+ }), { isLoading: tt, isLoaded: nt, setStatus: ce } = mn("loading"), [ot, rt] = S(!1), [L, le] = S({ x: 0, y: 0 }), [g, ue] = S(1), [$e, Ae] = S(!1), [te, me] = S(0), [E, ze] = S(!1), W = Se(() => new un(U), []), {
339
+ onLoad: fe,
334
340
  onError: pe,
335
341
  onMouseDown: de,
336
342
  style: it,
337
343
  className: st,
338
344
  ...at
339
- } = j, Te = !c && r <= 0, Re = !c && r >= n.size - 1;
345
+ } = j, Te = !a && r <= 0, Ue = !a && r >= n.size - 1;
340
346
  function ge() {
341
- le({ x: 0, y: 0 }), ue(1), fe(0);
347
+ le({ x: 0, y: 0 }), ue(1), me(0);
342
348
  }
343
349
  je(t, () => ({
344
350
  reset: ge,
345
351
  getRootDOMNode: () => Le.current
346
352
  }));
347
- const [ne, ct] = M(), ze = $t(() => ne, [ne]);
353
+ const [ne, ct] = S(), Re = At(() => ne, [ne]);
348
354
  $(() => {
349
- const e = C == null ? void 0 : C(), a = qt(e) || document.body;
350
- ct(a);
351
- }, [C]), _t(ze, { hidden: h });
355
+ const e = x == null ? void 0 : x(), l = Kt(e) || document.body;
356
+ ct(l);
357
+ }, [x]), Ht(Re, { hidden: h });
352
358
  const lt = Se(
353
359
  () => !jt && ne === document.body,
354
360
  [ne]
355
361
  );
356
- function Ee(e) {
357
- const a = n.size;
358
- c && (e %= a, e < 0 && (e = a - Math.abs(e))), e !== r && e >= 0 && e <= a - 1 && u(e);
362
+ function Oe(e) {
363
+ const l = n.size;
364
+ a && (e %= l, e < 0 && (e = l - Math.abs(e))), e !== r && e >= 0 && e <= l - 1 && u(e);
359
365
  }
360
366
  function he() {
361
- Ee(r - 1);
367
+ Oe(r - 1);
362
368
  }
363
369
  function ve() {
364
- Ee(r + 1);
370
+ Oe(r + 1);
365
371
  }
366
372
  function ut() {
367
- fe(te === 0 ? 360 - Ie : te - Ie);
373
+ me(te === 0 ? 360 - Ie : te - Ie);
368
374
  }
369
- function ft() {
370
- fe((te + Ie) % 360);
375
+ function mt() {
376
+ me((te + Ie) % 360);
371
377
  }
372
- const we = U(null), mt = () => {
373
- !Ae && $e(!0), we.current && clearTimeout(we.current), we.current = setTimeout(() => {
374
- $e(!1);
378
+ const we = A(null), ft = () => {
379
+ !$e && Ae(!0), we.current && clearTimeout(we.current), we.current = setTimeout(() => {
380
+ Ae(!1);
375
381
  }, 1e3);
376
382
  }, oe = (e) => {
377
- g !== e && (ue(e), mt());
383
+ g !== e && (ue(e), ft());
378
384
  };
379
385
  function ye() {
380
386
  const e = W.getNextScale(g, "zoomIn");
381
387
  oe(e);
382
388
  }
383
- function xe() {
389
+ function be() {
384
390
  const e = W.getNextScale(g, "zoomOut");
385
391
  oe(e);
386
392
  }
387
393
  function pt(e) {
388
- e.deltaY > 0 ? g >= W.minScale && xe() : g <= W.maxScale && ye();
394
+ e.deltaY > 0 ? g >= W.minScale && be() : g <= W.maxScale && ye();
389
395
  }
390
396
  function dt() {
391
397
  oe(1);
392
398
  }
393
399
  function gt() {
394
- const e = S.current.getBoundingClientRect(), a = _.current.getBoundingClientRect(), w = e.height / (a.height / g), q = e.width / (a.width / g), be = Math.max(w, q);
395
- oe(be);
400
+ const e = G.current.getBoundingClientRect(), l = H.current.getBoundingClientRect(), k = e.height / (l.height / g), K = e.width / (l.width / g), xe = Math.max(k, K);
401
+ oe(xe);
396
402
  }
397
- function De(e) {
403
+ function Ee(e) {
398
404
  e.target === e.currentTarget && Z && re();
399
405
  }
400
406
  function ht() {
401
- Qt(G);
407
+ Qt(B);
402
408
  }
403
- function Oe() {
409
+ function De() {
404
410
  re();
405
411
  }
406
412
  function vt(e) {
@@ -411,67 +417,68 @@ function mn(s, t) {
411
417
  }
412
418
  function wt(e) {
413
419
  if (e && e.length) {
414
- const w = e[0].contentRect.width < I;
415
- rt(w);
420
+ const k = e[0].contentRect.width < I;
421
+ rt(k);
416
422
  }
417
423
  }
418
424
  const Ve = () => {
419
- if (!S.current || !_.current) return;
420
- const e = S.current.getBoundingClientRect(), a = _.current.getBoundingClientRect(), [w, q] = cn(
425
+ if (!G.current || !H.current)
426
+ return;
427
+ const e = G.current.getBoundingClientRect(), l = H.current.getBoundingClientRect(), [k, K] = ln(
421
428
  e,
422
- a,
423
- A.x,
424
- A.y,
429
+ l,
430
+ L.x,
431
+ L.y,
425
432
  g
426
433
  );
427
- (w !== A.x || q !== A.y) && le({
428
- x: w,
429
- y: q
434
+ (k !== L.x || K !== L.y) && le({
435
+ x: k,
436
+ y: K
430
437
  });
431
438
  }, Ye = (e) => {
432
- var a;
433
- if (h && O) {
434
- (a = e.preventDefault) == null || a.call(e);
435
- const { originX: w, originY: q, pageX: be, pageY: It } = K.current, Pt = w + (e.pageX - be) / g, St = q + (e.pageY - It) / g;
439
+ var l;
440
+ if (h && E) {
441
+ (l = e.preventDefault) == null || l.call(e);
442
+ const { originX: k, originY: K, pageX: xe, pageY: It } = q.current, Pt = k + (e.pageX - xe) / g, St = K + (e.pageY - It) / g;
436
443
  le({
437
444
  x: Pt,
438
445
  y: St
439
446
  });
440
447
  }
441
- }, Fe = (e) => {
442
- var a;
443
- (a = e.preventDefault) == null || a.call(e), Ue(!1);
448
+ }, Xe = (e) => {
449
+ var l;
450
+ (l = e.preventDefault) == null || l.call(e), ze(!1);
444
451
  };
445
452
  function yt(e) {
446
- ce("loaded"), me == null || me(e);
453
+ ce("loaded"), fe == null || fe(e);
447
454
  }
448
- function xt(e) {
455
+ function bt(e) {
449
456
  ce("error"), pe == null || pe(e);
450
457
  }
451
- const bt = (e) => {
452
- var w;
453
- (w = e.preventDefault) == null || w.call(e), Ue(!0);
454
- const a = e.type === "touchstart" ? e.touches[0] : e;
455
- K.current.pageX = a.pageX, K.current.pageY = a.pageY, K.current.originX = A.x, K.current.originY = A.y, de == null || de(e);
458
+ const xt = (e) => {
459
+ var k;
460
+ (k = e.preventDefault) == null || k.call(e), ze(!0);
461
+ const l = e.type === "touchstart" ? e.touches[0] : e;
462
+ q.current.pageX = l.pageX, q.current.pageY = l.pageY, q.current.originX = L.x, q.current.originY = L.y, de == null || de(e);
456
463
  };
457
- $(() => (h && O && (Ce(document, "mousemove", Ye, !1), Ce(document, "mouseup", Fe, !1)), () => {
458
- ke(document, "mousemove", Ye, !1), ke(document, "mouseup", Fe, !1);
459
- }), [h, O]), $(() => {
460
- J && !O && Ve();
461
- }, [O, A]), $(() => {
464
+ $(() => (h && E && (Ce(document, "mousemove", Ye, !1), Ce(document, "mouseup", Xe, !1)), () => {
465
+ ke(document, "mousemove", Ye, !1), ke(document, "mouseup", Xe, !1);
466
+ }), [h, E]), $(() => {
467
+ J && !E && Ve();
468
+ }, [E, L]), $(() => {
462
469
  J && Ve();
463
470
  }, [g]), $(() => {
464
471
  h && ge();
465
472
  }, [h]), $(() => {
466
- Q(H), ce(H ? "loading" : "loaded"), ge();
467
- }, [H]), Kt(() => {
468
- W.updateScale(z), ue(1);
469
- }, [z]), $(() => {
470
- const e = (a) => {
471
- if (a)
472
- switch (a.key) {
473
+ Q(_), ce(_ ? "loading" : "loaded"), ge();
474
+ }, [_]), qt(() => {
475
+ W.updateScale(U), ue(1);
476
+ }, [U]), $(() => {
477
+ const e = (l) => {
478
+ if (l)
479
+ switch (l.key) {
473
480
  case Zt.key:
474
- E && re();
481
+ R && re();
475
482
  break;
476
483
  case Wt.key:
477
484
  ve();
@@ -482,66 +489,66 @@ function mn(s, t) {
482
489
  case Bt.key:
483
490
  ye();
484
491
  break;
485
- case Xt.key:
486
- xe();
492
+ case Ft.key:
493
+ be();
487
494
  break;
488
495
  }
489
496
  };
490
- return h && !O && !ae.current && (ae.current = !0, Ce(document, "keydown", e)), () => {
497
+ return h && !E && !ae.current && (ae.current = !0, Ce(document, "keydown", e)), () => {
491
498
  ae.current = !1, ke(document, "keydown", e);
492
499
  };
493
- }, [h, E, O, r, g]);
500
+ }, [h, R, E, r, g]);
494
501
  const Ct = [
495
502
  !1,
496
503
  {
497
504
  key: "rotateRight",
498
- name: m.ImagePreview.rotateRight,
499
- content: /* @__PURE__ */ i(Ot, {}),
500
- onClick: ft
505
+ name: f.ImagePreview.rotateRight,
506
+ content: /* @__PURE__ */ i(Dt, {}),
507
+ onClick: mt
501
508
  },
502
509
  {
503
510
  key: "rotateLeft",
504
- name: m.ImagePreview.rotateLeft,
505
- content: /* @__PURE__ */ i(Dt, {}),
511
+ name: f.ImagePreview.rotateLeft,
512
+ content: /* @__PURE__ */ i(Et, {}),
506
513
  onClick: ut
507
514
  },
508
515
  {
509
516
  key: "zoomIn",
510
- name: m.ImagePreview.zoomIn,
517
+ name: f.ImagePreview.zoomIn,
511
518
  content: /* @__PURE__ */ i(Vt, {}),
512
519
  onClick: ye,
513
520
  disabled: g === W.maxScale
514
521
  },
515
522
  {
516
523
  key: "zoomOut",
517
- name: m.ImagePreview.zoomOut,
524
+ name: f.ImagePreview.zoomOut,
518
525
  content: /* @__PURE__ */ i(Yt, {}),
519
- onClick: xe,
526
+ onClick: be,
520
527
  disabled: g === W.minScale
521
528
  },
522
529
  {
523
530
  key: "originalSize",
524
- name: m.ImagePreview.originalSize,
525
- content: /* @__PURE__ */ i(Et, {}),
531
+ name: f.ImagePreview.originalSize,
532
+ content: /* @__PURE__ */ i(Ot, {}),
526
533
  onClick: dt
527
534
  },
528
535
  {
529
536
  key: "maximize",
530
537
  name: "最大化",
531
- content: /* @__PURE__ */ i(Rt, {}),
538
+ content: /* @__PURE__ */ i(Ut, {}),
532
539
  onClick: gt
533
540
  },
534
541
  !!o && {
535
542
  key: "next",
536
543
  name: "下一张",
537
- content: /* @__PURE__ */ i(_e, {}),
538
- disabled: Re,
544
+ content: /* @__PURE__ */ i(He, {}),
545
+ disabled: Ue,
539
546
  onClick: ve
540
547
  },
541
548
  !!o && {
542
549
  key: "prev",
543
550
  name: "上一张",
544
- content: /* @__PURE__ */ i(He, {}),
551
+ content: /* @__PURE__ */ i(_e, {}),
545
552
  disabled: Te,
546
553
  onClick: he
547
554
  },
@@ -555,47 +562,46 @@ function mn(s, t) {
555
562
  key: "close",
556
563
  name: "关闭",
557
564
  content: /* @__PURE__ */ i(Be, {}),
558
- onClick: Oe
565
+ onClick: De
559
566
  }
560
567
  ].filter(Boolean);
561
568
  $(() => {
562
- let e;
563
- return S.current && (e = new ResizeObserver(wt), e.observe(S.current)), () => {
564
- var a, w;
565
- S.current && ((a = e == null ? void 0 : e.unobserve) == null || a.call(e, S.current)), (w = e == null ? void 0 : e.disconnect) == null || w.call(e), e = null;
569
+ const e = en([G.current], wt);
570
+ return () => {
571
+ e();
566
572
  };
567
- }, [S.current]);
573
+ }, [G.current]);
568
574
  const kt = () => {
569
575
  const e = /* @__PURE__ */ i(
570
576
  "img",
571
577
  {
572
578
  onWheel: pt,
573
- ref: _,
574
- className: Y(st, `${p}-img`, {
575
- [`${p}-img-moving`]: O
579
+ ref: H,
580
+ className: V(st, `${p}-img`, {
581
+ [`${p}-img-moving`]: E
576
582
  }),
577
583
  style: {
578
584
  ...it,
579
- transform: `translate(${A.x}px, ${A.y}px) rotate(${te}deg)`
585
+ transform: `translate(${L.x}px, ${L.y}px) rotate(${te}deg)`
580
586
  },
581
- src: G,
587
+ src: B,
582
588
  ...at,
583
589
  onLoad: yt,
584
- onError: xt,
585
- onMouseDown: (a) => {
586
- a.button === 0 && bt(a);
590
+ onError: bt,
591
+ onMouseDown: (l) => {
592
+ l.button === 0 && xt(l);
587
593
  }
588
594
  },
589
- G
595
+ B
590
596
  );
591
- return (D == null ? void 0 : D(e)) ?? e;
597
+ return (O == null ? void 0 : O(e)) ?? e;
592
598
  };
593
- return /* @__PURE__ */ i(Jt, { visible: h, forceRender: !1, getContainer: ze, children: /* @__PURE__ */ i(
594
- Ft,
599
+ return /* @__PURE__ */ i(Jt, { visible: h, forceRender: !1, getContainer: Re, children: /* @__PURE__ */ i(
600
+ Xt,
595
601
  {
596
602
  ...ee,
597
- getPopupContainer: () => S.current,
598
- children: /* @__PURE__ */ V(
603
+ getPopupContainer: () => G.current,
604
+ children: /* @__PURE__ */ D(
599
605
  "div",
600
606
  {
601
607
  className: d,
@@ -623,72 +629,72 @@ function mn(s, t) {
623
629
  children: /* @__PURE__ */ i("div", { className: `${p}-mask`, onClick: vt })
624
630
  }
625
631
  ),
626
- h && /* @__PURE__ */ V(
632
+ h && /* @__PURE__ */ D(
627
633
  "div",
628
634
  {
629
- ref: S,
635
+ ref: G,
630
636
  className: `${p}-wrapper`,
631
- onClick: De,
637
+ onClick: Ee,
632
638
  children: [
633
- /* @__PURE__ */ V(
639
+ /* @__PURE__ */ D(
634
640
  "div",
635
641
  {
636
642
  ref: et,
637
643
  className: `${p}-img-container`,
638
644
  style: { transform: `scale(${g}, ${g})` },
639
- onClick: De,
645
+ onClick: Ee,
640
646
  children: [
641
647
  kt(),
642
- tt && /* @__PURE__ */ i("div", { className: `${p}-loading`, children: /* @__PURE__ */ i(zt, {}) })
648
+ tt && /* @__PURE__ */ i("div", { className: `${p}-loading`, children: /* @__PURE__ */ i(Rt, {}) })
643
649
  ]
644
650
  }
645
651
  ),
646
652
  /* @__PURE__ */ i(
647
653
  Ge,
648
654
  {
649
- in: Ae,
655
+ in: $e,
650
656
  timeout: 400,
651
657
  appear: !0,
652
658
  classNames: "fadeImage",
653
659
  unmountOnExit: !0,
654
- children: /* @__PURE__ */ V("div", { className: `${p}-scale-value`, children: [
660
+ children: /* @__PURE__ */ D("div", { className: `${p}-scale-value`, children: [
655
661
  (g * 100).toFixed(0),
656
662
  "%"
657
663
  ] })
658
664
  }
659
665
  ),
660
666
  nt && /* @__PURE__ */ i(
661
- an,
667
+ cn,
662
668
  {
663
- prefixCls: x,
669
+ prefixCls: y,
664
670
  previewPrefixCls: p,
665
- actions: L,
666
- actionsLayout: R,
671
+ actions: N,
672
+ actionsLayout: T,
667
673
  defaultActions: Ct,
668
674
  simple: ot
669
675
  }
670
676
  ),
671
- f && /* @__PURE__ */ i(
677
+ m && /* @__PURE__ */ i(
672
678
  "div",
673
679
  {
674
680
  className: `${p}-close-btn`,
675
- onClick: Oe,
681
+ onClick: De,
676
682
  children: /* @__PURE__ */ i(Be, {})
677
683
  }
678
684
  ),
679
685
  o && /* @__PURE__ */ i(
680
- rn,
686
+ sn,
681
687
  {
682
688
  previewCount: n.size,
683
689
  current: r,
684
- infinite: c,
690
+ infinite: a,
685
691
  disableLeft: Te,
686
- disableRight: Re,
692
+ disableRight: Ue,
687
693
  onPrev: he,
688
694
  onNext: ve
689
695
  }
690
696
  ),
691
- B
697
+ F
692
698
  ]
693
699
  }
694
700
  )
@@ -699,101 +705,101 @@ function mn(s, t) {
699
705
  ) });
700
706
  }
701
707
  const Qe = Ne(
702
- mn
708
+ pn
703
709
  );
704
710
  Qe.displayName = "ImagePreview";
705
- function pn(s, t) {
711
+ function dn(s, t) {
706
712
  const {
707
713
  children: o,
708
714
  srcList: n,
709
715
  infinite: r,
710
716
  current: u,
711
- defaultCurrent: c,
712
- onChange: y,
713
- visible: N,
717
+ defaultCurrent: a,
718
+ onChange: w,
719
+ visible: M,
714
720
  defaultVisible: v,
715
- forceRender: F,
721
+ forceRender: Y,
716
722
  onVisibleChange: b,
717
723
  ...X
718
- } = s, [T, Z] = Me(!1, {
719
- value: N,
724
+ } = s, [z, Z] = Me(!1, {
725
+ value: M,
720
726
  defaultValue: v
721
- }), f = Se(
722
- () => n ? new Map(n.map((l, m) => [m, { url: l, preview: !0 }])) : null,
727
+ }), m = Se(
728
+ () => n ? new Map(n.map((c, f) => [f, { url: c, preview: !0 }])) : null,
723
729
  [n]
724
- ), I = Ut(), L = () => f ? new Map(f) : /* @__PURE__ */ new Map(), [R, C] = M(L()), P = U(), z = P.current || /* @__PURE__ */ new Map(), E = (l) => {
725
- P.current = l(P.current);
730
+ ), I = zt(), N = () => m ? new Map(m) : /* @__PURE__ */ new Map(), [T, x] = S(N()), P = A(), U = P.current || /* @__PURE__ */ new Map(), R = (c) => {
731
+ P.current = c(P.current);
726
732
  };
727
733
  $(() => {
728
- I || C(L());
729
- }, [f]);
734
+ I || x(N());
735
+ }, [m]);
730
736
  const j = new Map(
731
- Array.from(R).filter(([, { preview: l }]) => l).map(([l, { url: m }]) => [l, m])
732
- ), [D, B] = Me(0, {
737
+ Array.from(T).filter(([, { preview: c }]) => c).map(([c, { url: f }]) => [c, f])
738
+ ), [O, F] = Me(0, {
733
739
  value: u,
734
- defaultValue: c
740
+ defaultValue: a
735
741
  });
736
- function J(l, m, k) {
737
- return f || C(
738
- (x) => new Map(x).set(l, {
739
- url: m,
740
- preview: k
742
+ function J(c, f, C) {
743
+ return m || x(
744
+ (y) => new Map(y).set(c, {
745
+ url: f,
746
+ preview: C
741
747
  })
742
748
  ), function() {
743
- f || C((p) => {
749
+ m || x((p) => {
744
750
  const d = new Map(p);
745
- return d.delete(l) ? d : p;
751
+ return d.delete(c) ? d : p;
746
752
  });
747
753
  };
748
754
  }
749
- function H(l, m) {
750
- return E(
751
- (k) => new Map(k).set(l, Lt(m) ? m : {})
755
+ function _(c, f) {
756
+ return R(
757
+ (C) => new Map(C).set(c, Lt(f) ? f : {})
752
758
  ), function() {
753
- E((x) => {
754
- const p = new Map(x);
755
- return p.delete(l) ? p : x;
759
+ R((y) => {
760
+ const p = new Map(y);
761
+ return p.delete(c) ? p : y;
756
762
  });
757
763
  };
758
764
  }
759
- const G = U();
765
+ const B = A();
760
766
  je(t, () => ({
761
767
  reset: () => {
762
- G.current && G.current.reset();
768
+ B.current && B.current.reset();
763
769
  }
764
770
  }));
765
- const Q = (l, m) => {
766
- const k = Ze(m) ? T : m;
767
- b == null || b(l, k), Z(l);
768
- }, h = (l) => {
769
- y == null || y(l), B(l);
770
- }, se = (l) => {
771
- let m = 0;
772
- const k = (x) => {
773
- const p = ie.Children.map(x, (d) => d && d.props && d.type && d.type.displayName === "Image" ? ie.cloneElement(d, { _index: m++ }) : d && d.props && d.props.children ? ie.cloneElement(d, {
774
- children: k(d.props.children)
771
+ const Q = (c, f) => {
772
+ const C = Ze(f) ? z : f;
773
+ b == null || b(c, C), Z(c);
774
+ }, h = (c) => {
775
+ w == null || w(c), F(c);
776
+ }, se = (c) => {
777
+ let f = 0;
778
+ const C = (y) => {
779
+ const p = ie.Children.map(y, (d) => d && d.props && d.type && d.type.displayName === "Image" ? ie.cloneElement(d, { _index: f++ }) : d && d.props && d.props.children ? ie.cloneElement(d, {
780
+ children: C(d.props.children)
775
781
  }) : d);
776
- return !We(x) && ie.Children.count(x) === 1 ? p[0] : p;
782
+ return !We(y) && ie.Children.count(y) === 1 ? p[0] : p;
777
783
  };
778
- return k(l);
784
+ return C(c);
779
785
  }, ee = () => {
780
- const l = Array.from(j.values());
781
- return l.length > 0 ? /* @__PURE__ */ i("div", { style: { display: "none" }, children: l.map((m) => /* @__PURE__ */ i("img", { src: m }, m)) }) : null;
786
+ const c = Array.from(j.values());
787
+ return c.length > 0 ? /* @__PURE__ */ i("div", { style: { display: "none" }, children: c.map((f) => /* @__PURE__ */ i("img", { src: f }, f)) }) : null;
782
788
  };
783
- return /* @__PURE__ */ V(
784
- Ke.Provider,
789
+ return /* @__PURE__ */ D(
790
+ qe.Provider,
785
791
  {
786
792
  value: {
787
793
  previewGroup: !0,
788
794
  previewUrlMap: j,
789
- previewPropsMap: z,
795
+ previewPropsMap: U,
790
796
  infinite: r,
791
- currentIndex: D,
797
+ currentIndex: O,
792
798
  setCurrentIndex: h,
793
- setPreviewUrlMap: C,
799
+ setPreviewUrlMap: x,
794
800
  registerPreviewUrl: J,
795
- registerPreviewProps: H,
796
- visible: T,
801
+ registerPreviewProps: _,
802
+ visible: z,
797
803
  handleVisibleChange: Q
798
804
  },
799
805
  children: [
@@ -801,24 +807,24 @@ function pn(s, t) {
801
807
  /* @__PURE__ */ i(
802
808
  Qe,
803
809
  {
804
- ref: G,
810
+ ref: B,
805
811
  src: "",
806
- visible: T,
812
+ visible: z,
807
813
  onVisibleChange: Q,
808
814
  ...X
809
815
  }
810
816
  ),
811
- F && ee()
817
+ Y && ee()
812
818
  ]
813
819
  }
814
820
  );
815
821
  }
816
- const dn = Ne(pn);
817
- dn.displayName = "ImagePreviewGroup";
822
+ const gn = Ne(dn);
823
+ gn.displayName = "ImagePreviewGroup";
818
824
  export {
819
825
  Qe as P,
820
- on as T,
821
- dn as a,
822
- Ke as b,
823
- un as u
826
+ rn as T,
827
+ gn as a,
828
+ qe as b,
829
+ mn as u
824
830
  };