@unicom-cloud/ui 0.8.109 → 0.8.111

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 (447) hide show
  1. package/Affix.js +2 -2
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +2 -2
  5. package/Badge.js +1 -1
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/ColorPicker.js +1 -1
  14. package/Comment.js +1 -1
  15. package/ConfigProvider.js +1 -1
  16. package/Copy.js +6 -4
  17. package/Countdown.js +42 -8
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Details.js +42 -6
  21. package/Development.js +1 -1
  22. package/Divider.js +1 -1
  23. package/Draggable.js +1 -1
  24. package/Dropdown.js +1 -1
  25. package/Empty.js +1 -1
  26. package/Flex.js +43 -7
  27. package/Form.js +21 -16
  28. package/Icon.js +1 -1
  29. package/IconHover.js +1 -1
  30. package/Image.js +1 -1
  31. package/InputNumber.js +1 -1
  32. package/Layout.js +1 -1
  33. package/Link.js +2 -2
  34. package/LiquidFill.js +12 -10
  35. package/List.js +1 -1
  36. package/Loading.js +42 -6
  37. package/Marquee.js +12 -10
  38. package/Mentions.js +1 -1
  39. package/Menu.js +1 -1
  40. package/Message.js +3 -3
  41. package/Modal.js +1 -1
  42. package/Notice.js +41 -5
  43. package/Notification.js +1 -1
  44. package/OverflowEllipsis.js +1 -1
  45. package/PageHeader.js +2 -2
  46. package/Popconfirm.js +1 -1
  47. package/Popover.js +1 -1
  48. package/Progress.js +1 -1
  49. package/QrCode.js +12 -10
  50. package/Radio.js +1 -1
  51. package/Rate.js +1 -1
  52. package/ResizeBox.js +1 -1
  53. package/Result.js +1 -1
  54. package/RichText.js +19 -0
  55. package/Segmented.js +42 -7
  56. package/Skeleton.js +1 -1
  57. package/Slider.js +1 -1
  58. package/Space.js +43 -7
  59. package/Spin.js +1 -1
  60. package/Statistic.js +1 -1
  61. package/Steps.js +1 -1
  62. package/Switch.js +1 -1
  63. package/Table.js +1 -1
  64. package/Tabs.js +1 -1
  65. package/Tag.js +2 -2
  66. package/Tooltip.js +1 -1
  67. package/Tour.js +13 -11
  68. package/Transfer.js +1 -1
  69. package/Tree.js +1 -1
  70. package/TreeSelect.js +1 -1
  71. package/Trigger.js +1 -1
  72. package/affix/index.js +2 -2
  73. package/alert/index.js +1 -1
  74. package/anchor/Anchor.js +2 -2
  75. package/anchor/Link.js +1 -1
  76. package/app/App.js +2 -2
  77. package/auto-complete/index.js +1 -1
  78. package/avatar/Avatar.js +1 -1
  79. package/avatar/Group.js +1 -1
  80. package/back-top/index.js +2 -2
  81. package/badge/index.js +1 -1
  82. package/breadcrumb/index.js +2 -2
  83. package/button/Group.js +1 -1
  84. package/button/index.js +1 -1
  85. package/calendar/index.js +3 -3
  86. package/card/Grid.js +1 -1
  87. package/card/Meta.js +1 -1
  88. package/card/index.js +1 -1
  89. package/carousel/Arrow.js +2 -2
  90. package/carousel/Indicator.js +1 -1
  91. package/carousel/index.js +1 -1
  92. package/cascader/Cascader.js +3 -3
  93. package/cascader/index.js +1 -1
  94. package/cascader/util.js +1 -1
  95. package/checkbox/Checkbox.js +2 -2
  96. package/checkbox/Group.js +2 -2
  97. package/checkbox/GroupBlock.js +2 -2
  98. package/checkbox/index.js +2 -2
  99. package/chunk/BDMqvmVH.js +4239 -0
  100. package/chunk/BDgzrqDN.js +154 -0
  101. package/chunk/BG6j6Ct7.js +30 -0
  102. package/chunk/BGJspFG9.js +56 -0
  103. package/chunk/BO_5qdS_.js +13 -0
  104. package/chunk/{DblEjsQ8.js → BUNoUPLs.js} +1 -1
  105. package/chunk/B_c0gPsX.js +83 -0
  106. package/chunk/BcEZk8pT.js +837 -0
  107. package/chunk/{DGSfSsAY.js → BeHcDey_.js} +1 -1
  108. package/chunk/{B9YvSTvI.js → BlflTd2i.js} +695 -856
  109. package/chunk/{Bm3gJPkz.js → BnUWOu3_.js} +5 -5
  110. package/chunk/Bvxzb1wd.js +16 -0
  111. package/chunk/{DryCfcSV.js → CFyN9Eio.js} +4 -4
  112. package/chunk/CN7NKv_2.js +11 -0
  113. package/chunk/{BDKb_-wj.js → COsRZOz1.js} +4 -4
  114. package/chunk/CT7ury1Z.js +13 -0
  115. package/chunk/Ca6eMq_Y.js +8 -0
  116. package/chunk/{p9jiLDTk.js → CgN4U7Ou.js} +2 -2
  117. package/chunk/{Bg3uJGPu.js → CsqGBZv1.js} +1 -1
  118. package/chunk/CylJZkp8.js +6 -0
  119. package/chunk/{9WWq1a0I.js → DSqW_efI.js} +1 -1
  120. package/chunk/{Bz3KT4sO.js → Dbw0YUY1.js} +81 -47
  121. package/chunk/Dh-zFF65.js +15 -0
  122. package/chunk/Di5KBCVQ.js +4 -0
  123. package/chunk/{DjPTURUf.js → Lyh0cz3R.js} +3 -3
  124. package/chunk/{DgWzb7M5.js → Y_GQsZUt.js} +1 -1
  125. package/chunk/{BfBHo0RR.js → n1tirBXA.js} +7 -7
  126. package/chunk/{DYc9a7tm.js → qsVvkBLU.js} +1 -1
  127. package/collapse/Collapse.js +2 -2
  128. package/collapse/Item.js +2 -2
  129. package/color-picker/ControlBar.js +1 -1
  130. package/color-picker/InputAlpha.js +1 -1
  131. package/color-picker/InputHex.js +1 -1
  132. package/color-picker/InputRgb.js +1 -1
  133. package/color-picker/Palette.js +1 -1
  134. package/color-picker/Panel.js +2 -2
  135. package/color-picker/index.js +1 -1
  136. package/comment/index.js +1 -1
  137. package/config-provider/ConfigProvider.js +1 -1
  138. package/config-provider/context.js +1 -1
  139. package/config-provider/index.js +2 -2
  140. package/copy/index.js +10 -8
  141. package/countdown/index.js +67 -33
  142. package/date-picker/Picker.js +1 -1
  143. package/date-picker/RangePicker.js +2 -2
  144. package/date-picker/index.js +1 -1
  145. package/descriptions/index.js +1 -1
  146. package/details/index.js +74 -38
  147. package/development/index.js +1 -1
  148. package/divider/index.js +1 -1
  149. package/draggable/index.js +1 -1
  150. package/drawer/Drawer.js +1 -1
  151. package/dropdown/Button.js +1 -1
  152. package/dropdown/index.js +1 -1
  153. package/empty/index.js +1 -1
  154. package/flex/index.js +63 -29
  155. package/form/Form.js +3 -3
  156. package/form/FormItem.js +1 -1
  157. package/form/index.js +85 -77
  158. package/grid/Grid.js +1 -1
  159. package/grid/Item.js +1 -1
  160. package/hooks/index.js +123 -129
  161. package/hooks/useCreation.js +4 -0
  162. package/hooks/useId.js +1 -1
  163. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  164. package/hooks/useKeyboardEvent.js +1 -1
  165. package/hooks/useMedia.js +1 -1
  166. package/hooks/usePersistCallback.js +1 -1
  167. package/hooks/useRefs.js +1 -1
  168. package/hooks/useStateWithPromise.js +1 -1
  169. package/hooks/useWatch.js +1 -1
  170. package/hooks/useWindowSize.js +1 -1
  171. package/icon/index.js +1 -1
  172. package/icon-hover/index.js +1 -1
  173. package/icons/file.js +1 -1
  174. package/image/Image.js +3 -3
  175. package/image/ImagePreview.js +44 -9
  176. package/image/ImagePreviewArrow.js +1 -1
  177. package/image/ImagePreviewGroup.js +1 -1
  178. package/image/index.js +1 -1
  179. package/index.js +470 -470
  180. package/input/Button.js +1 -1
  181. package/input/Group.js +1 -1
  182. package/input/Input.js +3 -3
  183. package/input/InputElement.js +2 -2
  184. package/input/Password.js +2 -2
  185. package/input/Search.js +1 -1
  186. package/input/Textarea.js +2 -2
  187. package/input-number/index.js +1 -1
  188. package/input-number/useSelectionRange.js +1 -1
  189. package/input-tag/InputTag.js +1 -1
  190. package/layout/Content.js +1 -1
  191. package/layout/Footer.js +1 -1
  192. package/layout/Header.js +1 -1
  193. package/layout/Sider.js +1 -1
  194. package/layout/index.js +1 -1
  195. package/link/index.js +2 -2
  196. package/liquid-fill/index.js +17 -15
  197. package/list/Item.js +1 -1
  198. package/list/Meta.js +1 -1
  199. package/list/index.js +1 -1
  200. package/loading/index.js +54 -18
  201. package/marquee/index.js +19 -17
  202. package/marquee-/index.js +17 -15
  203. package/mentions/index.js +1 -1
  204. package/menu/Menu.js +4 -4
  205. package/menu/OverflowWrap.js +1 -1
  206. package/menu/index.js +2 -2
  207. package/message/index.js +3 -3
  208. package/message/useMessage.js +4 -3
  209. package/modal/Confirm.js +2 -2
  210. package/modal/Modal.js +2 -2
  211. package/modal/index.js +2 -2
  212. package/notice/index.js +41 -5
  213. package/notification/index.js +1 -1
  214. package/notification/useNotification.js +1 -1
  215. package/overflow-ellipsis/OverflowItem.js +1 -1
  216. package/overflow-ellipsis/index.js +1 -1
  217. package/package.json +1 -1
  218. package/page-header/index.js +120 -81
  219. package/pagination/PageItem.js +2 -2
  220. package/pagination/PageJumper.js +1 -1
  221. package/pagination/PageOption.js +1 -1
  222. package/pagination/Pagination.js +1 -1
  223. package/picker/Input.js +1 -1
  224. package/picker/InputRange.js +1 -1
  225. package/popconfirm/index.js +1 -1
  226. package/popover/index.js +1 -1
  227. package/progress/CircleProgress.js +2 -2
  228. package/progress/index.js +1 -1
  229. package/qr-code/index.js +15 -13
  230. package/radio/Group.js +2 -2
  231. package/radio/GroupBlock.js +2 -2
  232. package/radio/Radio.js +2 -2
  233. package/radio/index.js +2 -2
  234. package/rate/index.js +1 -1
  235. package/resize-box/ResizeTrigger.js +1 -1
  236. package/resize-box/Split.js +2 -2
  237. package/resize-box/SplitGroup.js +1 -1
  238. package/resize-box/index.js +1 -1
  239. package/result/index.js +1 -1
  240. package/rich-text/constant.js +5 -0
  241. package/rich-text/core.js +11 -0
  242. package/rich-text/index.js +119 -0
  243. package/rich-text/interface.js +1 -0
  244. package/rich-text/rich.js +1877 -0
  245. package/row-col/Col-.js +1 -1
  246. package/row-col/Col.js +1 -1
  247. package/row-col/Row.js +1 -1
  248. package/segmented/index.js +145 -110
  249. package/select/Option.js +1 -1
  250. package/select/Select.js +235 -227
  251. package/select-view/Core.js +2 -2
  252. package/skeleton/index.js +1 -1
  253. package/slider/Button.js +2 -2
  254. package/slider/index.js +1 -1
  255. package/space/index.js +51 -15
  256. package/spin/DotLoading.js +1 -1
  257. package/spin/index.js +1 -1
  258. package/splitter/Panel.js +1 -1
  259. package/splitter/SplitBar.js +2 -2
  260. package/splitter/Splitter.js +2 -2
  261. package/statistic/index.js +1 -1
  262. package/steps/index.js +1 -1
  263. package/style.css +1 -1
  264. package/switch/index.js +1 -1
  265. package/table/Table.js +3 -3
  266. package/table/index.js +41 -39
  267. package/tabs/Tab.js +3 -3
  268. package/tabs/TabContent.js +2 -2
  269. package/tabs/TabPane.js +1 -1
  270. package/tabs/index.js +2 -2
  271. package/tag/index.js +2 -2
  272. package/time-picker/Picker.js +1 -1
  273. package/time-picker/TimePicker.js +1 -1
  274. package/timeline/Item.js +1 -1
  275. package/timeline/Timeline.js +1 -1
  276. package/tooltip/index.js +1 -1
  277. package/tour/index.js +20 -18
  278. package/transfer/Item.js +3 -3
  279. package/transfer/List.js +3 -3
  280. package/transfer/index.js +1 -1
  281. package/tree/Animation.js +2 -2
  282. package/tree/Node.js +3 -3
  283. package/tree/NodeList.js +1 -1
  284. package/tree/Tree.js +2 -2
  285. package/tree/index.js +1 -1
  286. package/tree-select/Select.js +4 -4
  287. package/tree-select/index.js +1 -1
  288. package/trigger/index.js +1 -1
  289. package/types/common/hooks/src/index.d.ts +1 -5
  290. package/types/common/hooks/src/use-url-state/index.d.ts +1 -1
  291. package/types/common/hooks/useId.d.ts +1 -1
  292. package/types/common/hooks/useIsomorphicLayoutEffect.d.ts +1 -3
  293. package/types/common/hooks/useKeyboardEvent.d.ts +1 -1
  294. package/types/common/hooks/{useListenResize.d.ts → useListenWindowResize.d.ts} +4 -6
  295. package/types/common/hooks/useWatch.d.ts +1 -1
  296. package/types/common/hooks/useWindowSize.d.ts +2 -2
  297. package/types/common/utils/index.d.ts +47 -0
  298. package/types/common/utils/keyboardCode.d.ts +4 -0
  299. package/types/common/utils/math.d.ts +1 -0
  300. package/types/common/utils/mitt.d.ts +1 -0
  301. package/types/common/utils/pinyin.d.ts +1 -0
  302. package/types/common/utils/reactTransitionGroup.d.ts +1 -0
  303. package/types/common/utils/uuid.d.ts +1 -0
  304. package/types/common/utils/validate.d.ts +1 -0
  305. package/types/pc/config-provider/interface.d.ts +2 -0
  306. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  307. package/types/pc/form/index.d.ts +6 -1
  308. package/types/pc/hooks/index.d.ts +2 -2
  309. package/types/pc/hooks/useCreation.d.ts +1 -0
  310. package/types/pc/hooks/useListenWindowResize.d.ts +1 -0
  311. package/types/pc/index.d.ts +2 -0
  312. package/types/pc/message/index.d.ts +1 -0
  313. package/types/pc/message/interface.d.ts +2 -2
  314. package/types/pc/page-header/interface.d.ts +3 -0
  315. package/types/pc/rich-text/blots/block.d.ts +34 -0
  316. package/types/pc/rich-text/blots/break.d.ts +8 -0
  317. package/types/pc/rich-text/blots/container.d.ts +4 -0
  318. package/types/pc/rich-text/blots/cursor.d.ts +26 -0
  319. package/types/pc/rich-text/blots/embed.d.ts +18 -0
  320. package/types/pc/rich-text/blots/inline.d.ts +12 -0
  321. package/types/pc/rich-text/blots/scroll.d.ts +49 -0
  322. package/types/pc/rich-text/blots/text.d.ts +5 -0
  323. package/types/pc/rich-text/constant.d.ts +1 -0
  324. package/types/pc/rich-text/core/composition.d.ts +12 -0
  325. package/types/pc/rich-text/core/editor.d.ts +28 -0
  326. package/types/pc/rich-text/core/emitter.d.ts +37 -0
  327. package/types/pc/rich-text/core/instances.d.ts +3 -0
  328. package/types/pc/rich-text/core/logger.d.ts +7 -0
  329. package/types/pc/rich-text/core/module.d.ts +8 -0
  330. package/types/pc/rich-text/core/rich.d.ts +217 -0
  331. package/types/pc/rich-text/core/selection.d.ts +74 -0
  332. package/types/pc/rich-text/core/theme.d.ts +32 -0
  333. package/types/pc/rich-text/core/utils/createRegistryWithFormats.d.ts +5 -0
  334. package/types/pc/rich-text/core/utils/scrollRectIntoView.d.ts +11 -0
  335. package/types/pc/rich-text/core.d.ts +7 -0
  336. package/types/pc/rich-text/delta/AttributeMap.d.ts +10 -0
  337. package/types/pc/rich-text/delta/Op.d.ts +11 -0
  338. package/types/pc/rich-text/delta/OpIterator.d.ts +13 -0
  339. package/types/pc/rich-text/delta/index.d.ts +45 -0
  340. package/types/pc/rich-text/formats/align.d.ts +5 -0
  341. package/types/pc/rich-text/formats/background.d.ts +5 -0
  342. package/types/pc/rich-text/formats/blockquote.d.ts +6 -0
  343. package/types/pc/rich-text/formats/bold.d.ts +11 -0
  344. package/types/pc/rich-text/formats/code.d.ts +15 -0
  345. package/types/pc/rich-text/formats/color.d.ts +7 -0
  346. package/types/pc/rich-text/formats/direction.d.ts +5 -0
  347. package/types/pc/rich-text/formats/font.d.ts +7 -0
  348. package/types/pc/rich-text/formats/formula.d.ts +10 -0
  349. package/types/pc/rich-text/formats/header.d.ts +7 -0
  350. package/types/pc/rich-text/formats/image.d.ts +13 -0
  351. package/types/pc/rich-text/formats/indent.d.ts +8 -0
  352. package/types/pc/rich-text/formats/italic.d.ts +6 -0
  353. package/types/pc/rich-text/formats/link.d.ts +13 -0
  354. package/types/pc/rich-text/formats/list.d.ts +13 -0
  355. package/types/pc/rich-text/formats/script.d.ts +8 -0
  356. package/types/pc/rich-text/formats/size.d.ts +4 -0
  357. package/types/pc/rich-text/formats/strike.d.ts +6 -0
  358. package/types/pc/rich-text/formats/table.d.ts +45 -0
  359. package/types/pc/rich-text/formats/underline.d.ts +6 -0
  360. package/types/pc/rich-text/formats/video.d.ts +14 -0
  361. package/types/pc/rich-text/index.d.ts +6 -0
  362. package/types/pc/rich-text/interface.d.ts +17 -0
  363. package/types/pc/rich-text/modules/clipboard.d.ts +43 -0
  364. package/types/pc/rich-text/modules/history.d.ts +36 -0
  365. package/types/pc/rich-text/modules/input.d.ts +10 -0
  366. package/types/pc/rich-text/modules/keyboard.d.ts +58 -0
  367. package/types/pc/rich-text/modules/normalizeExternalHTML/index.d.ts +2 -0
  368. package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/googleDocs.d.ts +1 -0
  369. package/types/pc/rich-text/modules/normalizeExternalHTML/normalizers/msWord.d.ts +1 -0
  370. package/types/pc/rich-text/modules/syntax.d.ts +50 -0
  371. package/types/pc/rich-text/modules/table.d.ts +20 -0
  372. package/types/pc/rich-text/modules/tableEmbed.d.ts +27 -0
  373. package/types/pc/rich-text/modules/toolbar.d.ts +24 -0
  374. package/types/pc/rich-text/modules/uiNode.d.ts +19 -0
  375. package/types/pc/rich-text/modules/uploader.d.ts +15 -0
  376. package/types/pc/rich-text/parchment/attributor/attributor.d.ts +17 -0
  377. package/types/pc/rich-text/parchment/attributor/class.d.ts +8 -0
  378. package/types/pc/rich-text/parchment/attributor/store.d.ts +15 -0
  379. package/types/pc/rich-text/parchment/attributor/style.d.ts +8 -0
  380. package/types/pc/rich-text/parchment/blot/abstract/blot.d.ts +115 -0
  381. package/types/pc/rich-text/parchment/blot/abstract/container.d.ts +18 -0
  382. package/types/pc/rich-text/parchment/blot/abstract/leaf.d.ts +29 -0
  383. package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +50 -0
  384. package/types/pc/rich-text/parchment/blot/abstract/shadow.d.ts +37 -0
  385. package/types/pc/rich-text/parchment/blot/block.d.ts +25 -0
  386. package/types/pc/rich-text/parchment/blot/embed.d.ts +11 -0
  387. package/types/pc/rich-text/parchment/blot/inline.d.ts +28 -0
  388. package/types/pc/rich-text/parchment/blot/scroll.d.ts +34 -0
  389. package/types/pc/rich-text/parchment/blot/text.d.ts +26 -0
  390. package/types/pc/rich-text/parchment/collection/linked-list.d.ts +21 -0
  391. package/types/pc/rich-text/parchment/collection/linked-node.d.ts +6 -0
  392. package/types/pc/rich-text/parchment/error.d.ts +6 -0
  393. package/types/pc/rich-text/parchment/index.d.ts +21 -0
  394. package/types/pc/rich-text/parchment/registry.d.ts +21 -0
  395. package/types/pc/rich-text/parchment/scope.d.ts +14 -0
  396. package/types/pc/rich-text/rich.d.ts +5 -0
  397. package/types/pc/rich-text/themes/base.d.ts +35 -0
  398. package/types/pc/rich-text/themes/bubble.d.ts +18 -0
  399. package/types/pc/rich-text/themes/snow.d.ts +9 -0
  400. package/types/pc/rich-text/ui/color-picker.d.ts +7 -0
  401. package/types/pc/rich-text/ui/icon-picker.d.ts +7 -0
  402. package/types/pc/rich-text/ui/icons.d.ts +51 -0
  403. package/types/pc/rich-text/ui/picker.d.ts +16 -0
  404. package/types/pc/rich-text/ui/tooltip.d.ts +12 -0
  405. package/types/pc/select/interface.d.ts +4 -0
  406. package/types/pc/utils/index.d.ts +2 -0
  407. package/types/pc/utils/mitt.d.ts +1 -0
  408. package/types/pc/utils/names.d.ts +107 -91
  409. package/types/pc/utils/pinyin.d.ts +1 -0
  410. package/types/pc/version/index.d.ts +1 -1
  411. package/typography/Base.js +1 -1
  412. package/typography/Ellipsis.js +5 -3
  413. package/typography/Operations.js +6 -4
  414. package/typography/Paragraph.js +1 -1
  415. package/typography/Typography.js +1 -1
  416. package/typography/useEllipsis.js +1 -1
  417. package/upload/TriggerNode.js +2 -2
  418. package/upload/Upload.js +2 -2
  419. package/utils/contextHolder.js +1 -1
  420. package/utils/index.js +167 -163
  421. package/utils/mitt.js +5 -0
  422. package/utils/names.js +12 -2
  423. package/utils/pinyin.js +5 -0
  424. package/verification-code/VerificationCode.js +1 -1
  425. package/version/index.js +1 -1
  426. package/virtual-list/VirtualList.js +2 -2
  427. package/watermark/Watermark.js +1 -1
  428. package/chunk/5_U1CBIu.js +0 -8
  429. package/chunk/BLOlsa0k.js +0 -11
  430. package/chunk/BTLlOOe9.js +0 -189
  431. package/chunk/C6Aw3qIJ.js +0 -16
  432. package/chunk/CMl7m9nA.js +0 -6
  433. package/chunk/COqvRD0G.js +0 -11
  434. package/chunk/DXlwLh0Y.js +0 -806
  435. package/chunk/DlSv5Vu0.js +0 -16
  436. package/chunk/DmDh7NRL.js +0 -14
  437. package/chunk/Duezix3m.js +0 -25
  438. package/chunk/siEVY1s5.js +0 -33
  439. package/hooks/useCreate.js +0 -4
  440. package/types/common/hooks/src/use-dynamic-list/index.d.ts +0 -18
  441. package/types/common/hooks/src/use-event-emitter/index.d.ts +0 -11
  442. package/types/common/hooks/src/use-map/index.d.ts +0 -8
  443. package/types/common/hooks/src/use-set/index.d.ts +0 -6
  444. package/types/common/hooks/useCreate.d.ts +0 -2
  445. package/types/pc/hooks/useCreate.d.ts +0 -1
  446. package/types/pc/hooks/useListenResize.d.ts +0 -1
  447. /package/hooks/{useListenResize.js → useListenWindowResize.js} +0 -0
@@ -1,29 +1,31 @@
1
- import { useEffect as D, useState as T, useMemo as _, useRef as b, useLayoutEffect as he, useCallback as M } from "react";
1
+ import { useEffect as C, useState as b, useMemo as x, useRef as y, useLayoutEffect as he, useCallback as B } from "react";
2
2
  import "./DsaQZE4X.js";
3
- import { isFunction as z, isString as ne, isNumber as H, isEqual as Ve, isBoolean as qe, isUndefined as Ue, isObject as $e } from "@unicom-cloud/utils/is";
4
- import { g as N, a as C, d as q, e as We, c as $, i as V, f as Ge, s as Ke, h as Je, j as Qe, k as Ze } from "./BTLlOOe9.js";
3
+ import { isFunction as k, isString as te, isNumber as F, isEqual as qe, isBoolean as Ve, isUndefined as Ue, isObject as $e } from "@unicom-cloud/utils/is";
4
+ import { g as D, u as L, c as V, b as $, i as We, s as Ge, d as Ke, e as Je, f as Qe } from "./BDgzrqDN.js";
5
5
  import { a as E } from "./D1iEYgh3.js";
6
- import { u as re } from "./BJeTDXdz.js";
6
+ import { u as ne } from "./BJeTDXdz.js";
7
7
  import ce from "@unicom-cloud/utils/js-cookie";
8
- import et from "dayjs";
8
+ import Ze from "dayjs";
9
9
  import De from "lodash/debounce";
10
- import { i as Q } from "./CdXR6dj7.js";
11
- import { u as K, c as tt } from "./DfChiMIE.js";
12
- import Y from "@unicom-cloud/utils/screenfull";
13
- import { isAppleDevice as nt } from "@unicom-cloud/utils/constant/platform";
10
+ import { i as re } from "./CdXR6dj7.js";
11
+ import { u as K, c as et } from "./DfChiMIE.js";
12
+ import { i as q } from "./Di5KBCVQ.js";
13
+ import z from "@unicom-cloud/utils/screenfull";
14
+ import { isAppleDevice as tt } from "@unicom-cloud/utils/constant/platform";
15
+ import { u as se } from "./BO_5qdS_.js";
14
16
  import Me from "lodash/throttle";
15
17
  import de from "lodash/isPlainObject";
16
18
  import ae from "@unicom-cloud/utils/query-string";
17
- import * as rt from "react-router";
18
- function st(e) {
19
- return z(e[Symbol.asyncIterator]);
19
+ import * as nt from "react-router";
20
+ function rt(e) {
21
+ return k(e[Symbol.asyncIterator]);
20
22
  }
21
- function gn(e, t) {
22
- D(() => {
23
+ function hn(e, t) {
24
+ C(() => {
23
25
  const n = e();
24
26
  let r = !1;
25
27
  async function s() {
26
- if (st(n))
28
+ if (rt(n))
27
29
  for (; !((await n.next()).done || r); )
28
30
  ;
29
31
  else
@@ -34,8 +36,8 @@ function gn(e, t) {
34
36
  };
35
37
  }, t);
36
38
  }
37
- function ot(e = !1, t) {
38
- const [n, r] = T(e), s = _(() => {
39
+ function st(e = !1, t) {
40
+ const [n, r] = b(e), s = x(() => {
39
41
  const o = t === void 0 ? !e : t;
40
42
  return {
41
43
  toggle: () => r((l) => l === e ? o : e),
@@ -46,8 +48,8 @@ function ot(e = !1, t) {
46
48
  }, []);
47
49
  return [n, s];
48
50
  }
49
- function ct(e = !1) {
50
- const [t, { toggle: n, set: r }] = ot(!!e), s = _(() => ({
51
+ function ot(e = !1) {
52
+ const [t, { toggle: n, set: r }] = st(!!e), s = x(() => ({
51
53
  toggle: n,
52
54
  set: (c) => r(!!c),
53
55
  setTrue: () => r(!0),
@@ -55,25 +57,25 @@ function ct(e = !1) {
55
57
  }), []);
56
58
  return [t, s];
57
59
  }
58
- const at = (e) => e.every((t) => {
59
- const n = N(t);
60
+ const ct = (e) => e.every((t) => {
61
+ const n = D(t);
60
62
  return n ? n.getRootNode() instanceof ShadowRoot : !1;
61
- }), ut = (e) => e ? e.getRootNode() : document, it = (e) => {
63
+ }), at = (e) => e ? e.getRootNode() : document, ut = (e) => {
62
64
  if (!e || !document.getRootNode)
63
65
  return document;
64
66
  const t = Array.isArray(e) ? e : [e];
65
- return at(t) ? ut(N(t[0])) : document;
67
+ return ct(t) ? at(D(t[0])) : document;
66
68
  };
67
- function hn(e, t, n = "click") {
68
- const r = C(e);
69
- q(
69
+ function pn(e, t, n = "click") {
70
+ const r = L(e);
71
+ V(
70
72
  () => {
71
73
  const s = (c) => {
72
74
  (Array.isArray(t) ? t : [t]).some((i) => {
73
- const l = N(i);
75
+ const l = D(i);
74
76
  return !l || l.contains(c.target);
75
77
  }) || r.current(c);
76
- }, o = it(t), a = Array.isArray(n) ? n : [n];
78
+ }, o = ut(t), a = Array.isArray(n) ? n : [n];
77
79
  return a.forEach(
78
80
  (c) => o.addEventListener(c, s)
79
81
  ), () => {
@@ -86,32 +88,32 @@ function hn(e, t, n = "click") {
86
88
  t
87
89
  );
88
90
  }
89
- function pn(e, t = {}) {
91
+ function vn(e, t = {}) {
90
92
  const n = e ?? {}, {
91
93
  defaultValue: r,
92
94
  defaultValuePropName: s = "defaultValue",
93
95
  valuePropName: o = "value",
94
96
  trigger: a = "onChange"
95
- } = t, c = n[o], d = Object.prototype.hasOwnProperty.call(
97
+ } = t, c = n[o], f = Object.prototype.hasOwnProperty.call(
96
98
  n,
97
99
  o
98
- ), i = _(() => d ? c : Object.prototype.hasOwnProperty.call(n, s) ? n[s] : r, []), l = b(i);
99
- d && (l.current = c);
100
- const u = re();
101
- function g(v, ...y) {
102
- const m = z(v) ? v(l.current) : v;
103
- d || (l.current = m, u()), n[a] && n[a](m, ...y);
100
+ ), i = x(() => f ? c : Object.prototype.hasOwnProperty.call(n, s) ? n[s] : r, []), l = y(i);
101
+ f && (l.current = c);
102
+ const u = ne();
103
+ function m(h, ...p) {
104
+ const d = k(h) ? h(l.current) : h;
105
+ f || (l.current = d, u()), n[a] && n[a](d, ...p);
104
106
  }
105
- return [l.current, E(g)];
107
+ return [l.current, E(m)];
106
108
  }
107
- function vn(e, t = {}) {
108
- const [n, r] = T(() => {
109
+ function yn(e, t = {}) {
110
+ const [n, r] = b(() => {
109
111
  const o = ce.get(e);
110
- return ne(o) ? o : z(t.defaultValue) ? t.defaultValue() : t.defaultValue;
112
+ return te(o) ? o : k(t.defaultValue) ? t.defaultValue() : t.defaultValue;
111
113
  }), s = E(
112
114
  (o, a = {}) => {
113
- const { defaultValue: c, ...d } = { ...t, ...a }, i = z(o) ? o(n) : o;
114
- r(i), i === void 0 ? ce.remove(e) : ce.set(e, i, d);
115
+ const { defaultValue: c, ...f } = { ...t, ...a }, i = k(o) ? o(n) : o;
116
+ r(i), i === void 0 ? ce.remove(e) : ce.set(e, i, f);
115
117
  }
116
118
  );
117
119
  return [n, s];
@@ -119,52 +121,52 @@ function vn(e, t = {}) {
119
121
  const ue = (e) => {
120
122
  if (!e)
121
123
  return 0;
122
- const t = et(e).valueOf() - Date.now();
124
+ const t = Ze(e).valueOf() - Date.now();
123
125
  return t < 0 ? 0 : t;
124
- }, lt = (e) => ({
126
+ }, it = (e) => ({
125
127
  days: Math.floor(e / 864e5),
126
128
  hours: Math.floor(e / 36e5) % 24,
127
129
  minutes: Math.floor(e / 6e4) % 60,
128
130
  seconds: Math.floor(e / 1e3) % 60,
129
131
  milliseconds: Math.floor(e) % 1e3
130
- }), yn = (e = {}) => {
131
- const { leftTime: t, targetDate: n, interval: r = 1e3, onEnd: s } = e || {}, o = _(() => H(t) && t > 0 ? Date.now() + t : void 0, [t]), a = "leftTime" in e ? o : n, [c, d] = T(() => ue(a)), i = C(s);
132
- D(() => {
132
+ }), En = (e = {}) => {
133
+ const { leftTime: t, targetDate: n, interval: r = 1e3, onEnd: s } = e || {}, o = x(() => F(t) && t > 0 ? Date.now() + t : void 0, [t]), a = "leftTime" in e ? o : n, [c, f] = b(() => ue(a)), i = L(s);
134
+ C(() => {
133
135
  if (!a) {
134
- d(0);
136
+ f(0);
135
137
  return;
136
138
  }
137
- d(ue(a));
139
+ f(ue(a));
138
140
  const u = setInterval(() => {
139
- const g = ue(a);
140
- d(g), g === 0 && (clearInterval(u), i.current?.());
141
+ const m = ue(a);
142
+ f(m), m === 0 && (clearInterval(u), i.current?.());
141
143
  }, r);
142
144
  return () => clearInterval(u);
143
145
  }, [a, r]);
144
- const l = _(() => lt(c), [c]);
146
+ const l = x(() => it(c), [c]);
145
147
  return [c, l];
146
148
  };
147
149
  function Se(e, t = {}) {
148
150
  const { min: n, max: r } = t;
149
151
  let s = e;
150
- return H(r) && (s = Math.min(r, s)), H(n) && (s = Math.max(n, s)), s;
152
+ return F(r) && (s = Math.min(r, s)), F(n) && (s = Math.max(n, s)), s;
151
153
  }
152
- function En(e = 0, t = {}) {
153
- const { min: n, max: r } = t, [s, o] = T(() => Se(e, {
154
+ function Sn(e = 0, t = {}) {
155
+ const { min: n, max: r } = t, [s, o] = b(() => Se(e, {
154
156
  min: n,
155
157
  max: r
156
158
  })), a = (u) => {
157
- o((g) => {
158
- const v = H(u) ? u : u(g);
159
- return Se(v, {
159
+ o((m) => {
160
+ const h = F(u) ? u : u(m);
161
+ return Se(h, {
160
162
  max: r,
161
163
  min: n
162
164
  });
163
165
  });
164
166
  }, c = (u = 1) => {
165
- a((g) => g + u);
166
- }, d = (u = 1) => {
167
- a((g) => g - u);
167
+ a((m) => m + u);
168
+ }, f = (u = 1) => {
169
+ a((m) => m - u);
168
170
  }, i = (u) => {
169
171
  a(u);
170
172
  }, l = () => {
@@ -174,25 +176,17 @@ function En(e = 0, t = {}) {
174
176
  s,
175
177
  {
176
178
  inc: E(c),
177
- dec: E(d),
179
+ dec: E(f),
178
180
  set: E(i),
179
181
  reset: E(l)
180
182
  }
181
183
  ];
182
184
  }
183
- const se = (e, t) => {
184
- const { current: n } = b({
185
- deps: t,
186
- obj: void 0,
187
- initialized: !1
188
- });
189
- return (n.initialized === !1 || !We(n.deps, t)) && (n.deps = t, n.obj = e(), n.initialized = !0), n.obj;
190
- };
191
185
  function Ne(e, t) {
192
- Q && (z(e) || console.error(
186
+ re && (k(e) || console.error(
193
187
  `useDebounceFn expected parameter is a function, got ${typeof e}`
194
188
  ));
195
- const n = C(e), r = t?.wait ?? 1e3, s = _(
189
+ const n = L(e), r = t?.wait ?? 1e3, s = x(
196
190
  () => De(
197
191
  (...o) => n.current(...o),
198
192
  r,
@@ -208,43 +202,43 @@ function Ne(e, t) {
208
202
  flush: s.flush
209
203
  };
210
204
  }
211
- function Sn(e, t) {
212
- const [n, r] = T(e), { run: s } = Ne(() => {
205
+ function wn(e, t) {
206
+ const [n, r] = b(e), { run: s } = Ne(() => {
213
207
  r(e);
214
208
  }, t);
215
- return D(() => {
209
+ return C(() => {
216
210
  s();
217
211
  }, [e]), n;
218
212
  }
219
- function wn(e, t, n) {
220
- const [r, s] = T({}), { run: o } = Ne(() => {
213
+ function bn(e, t, n) {
214
+ const [r, s] = b({}), { run: o } = Ne(() => {
221
215
  s({});
222
216
  }, n);
223
- D(() => o(), t), K(e, [r]);
217
+ C(() => o(), t), K(e, [r]);
224
218
  }
225
- const Oe = (e = [], t = []) => Ve(e, t), Fe = (e) => (t, n) => {
226
- const r = b(void 0), s = b(0);
219
+ const Oe = (e = [], t = []) => qe(e, t), xe = (e) => (t, n) => {
220
+ const r = y(void 0), s = y(0);
227
221
  (n === void 0 || !Oe(n, r.current)) && (s.current += 1), r.current = n, e(t, [s.current]);
228
- }, bn = Fe(D), Rn = Fe(he);
222
+ }, Rn = xe(C), Tn = xe(he);
229
223
  function X(e, t, n = {}) {
230
- const { enable: r = !0 } = n, s = C(t);
231
- q(
224
+ const { enable: r = !0 } = n, s = L(t);
225
+ V(
232
226
  () => {
233
227
  if (!r)
234
228
  return;
235
- const o = N(n.target, window);
229
+ const o = D(n.target, window);
236
230
  if (!o?.addEventListener)
237
231
  return;
238
- const a = (d) => s.current(d), c = Array.isArray(e) ? e : [e];
239
- return c.forEach((d) => {
240
- o.addEventListener(d, a, {
232
+ const a = (f) => s.current(f), c = Array.isArray(e) ? e : [e];
233
+ return c.forEach((f) => {
234
+ o.addEventListener(f, a, {
241
235
  capture: n.capture,
242
236
  once: n.once,
243
237
  passive: n.passive
244
238
  });
245
239
  }), () => {
246
- c.forEach((d) => {
247
- o.removeEventListener(d, a, {
240
+ c.forEach((f) => {
241
+ o.removeEventListener(f, a, {
248
242
  capture: n.capture
249
243
  });
250
244
  });
@@ -254,9 +248,9 @@ function X(e, t, n = {}) {
254
248
  n.target
255
249
  );
256
250
  }
257
- const we = () => V ? document.visibilityState : "visible";
258
- function Tn() {
259
- const [e, t] = T(we);
251
+ const we = () => q ? document.visibilityState : "visible";
252
+ function Ln() {
253
+ const [e, t] = b(we);
260
254
  return X(
261
255
  "visibilitychange",
262
256
  () => {
@@ -267,209 +261,101 @@ function Tn() {
267
261
  }
268
262
  ), e;
269
263
  }
270
- const xe = (e) => {
271
- Q && (z(e) || console.error(
264
+ const Fe = (e) => {
265
+ re && (k(e) || console.error(
272
266
  `useMount: parameter \`fn\` expected to be a function, but got "${typeof e}".`
273
- )), D(() => e?.(), []);
274
- }, Ln = (e, t, n = {}) => {
275
- const r = C(n), s = C(e), o = b(void 0), { dragImage: a } = r.current;
276
- xe(() => {
267
+ )), C(() => e?.(), []);
268
+ }, An = (e, t, n = {}) => {
269
+ const r = L(n), s = L(e), o = y(void 0), { dragImage: a } = r.current;
270
+ Fe(() => {
277
271
  if (a?.image) {
278
272
  const { image: c } = a;
279
- if (ne(c)) {
280
- const d = new Image();
281
- d.src = c, o.current = d;
273
+ if (te(c)) {
274
+ const f = new Image();
275
+ f.src = c, o.current = f;
282
276
  } else
283
277
  o.current = c;
284
278
  }
285
- }), q(
279
+ }), V(
286
280
  () => {
287
- const c = N(t);
281
+ const c = D(t);
288
282
  if (!c?.addEventListener)
289
283
  return;
290
- const d = (l) => {
284
+ const f = (l) => {
291
285
  if (r.current.onDragStart?.(l), l.dataTransfer.setData("custom", JSON.stringify(s.current)), a?.image && o.current) {
292
- const { offsetX: u = 0, offsetY: g = 0 } = a;
286
+ const { offsetX: u = 0, offsetY: m = 0 } = a;
293
287
  l.dataTransfer.setDragImage(
294
288
  o.current,
295
289
  u,
296
- g
290
+ m
297
291
  );
298
292
  }
299
293
  }, i = (l) => {
300
294
  r.current.onDragEnd?.(l);
301
295
  };
302
- return c.setAttribute("draggable", "true"), c.addEventListener("dragstart", d), c.addEventListener("dragend", i), () => {
303
- c.removeEventListener("dragstart", d), c.removeEventListener("dragend", i);
296
+ return c.setAttribute("draggable", "true"), c.addEventListener("dragstart", f), c.addEventListener("dragend", i), () => {
297
+ c.removeEventListener("dragstart", f), c.removeEventListener("dragend", i);
304
298
  };
305
299
  },
306
300
  [],
307
301
  t
308
302
  );
309
- }, An = (e, t = {}) => {
310
- const n = C(t), r = b(void 0);
311
- q(
303
+ }, Pn = (e, t = {}) => {
304
+ const n = L(t), r = y(void 0);
305
+ V(
312
306
  () => {
313
- const s = N(e);
307
+ const s = D(e);
314
308
  if (!s?.addEventListener)
315
309
  return;
316
- const o = (u, g) => {
317
- const v = u.getData("text/uri-list"), y = u.getData("custom");
318
- if (y && n.current.onDom) {
319
- let m = y;
310
+ const o = (u, m) => {
311
+ const h = u.getData("text/uri-list"), p = u.getData("custom");
312
+ if (p && n.current.onDom) {
313
+ let d = p;
320
314
  try {
321
- m = JSON.parse(y);
315
+ d = JSON.parse(p);
322
316
  } catch {
323
- m = y;
317
+ d = p;
324
318
  }
325
- n.current.onDom(m, g);
319
+ n.current.onDom(d, m);
326
320
  return;
327
321
  }
328
- if (v && n.current.onUri) {
329
- n.current.onUri(v, g);
322
+ if (h && n.current.onUri) {
323
+ n.current.onUri(h, m);
330
324
  return;
331
325
  }
332
326
  if (u.files && u.files.length && n.current.onFiles) {
333
327
  n.current.onFiles(
334
328
  Array.from(u.files),
335
- g
329
+ m
336
330
  );
337
331
  return;
338
332
  }
339
- u.items && u.items.length && n.current.onText && u.items[0].getAsString((m) => {
340
- n.current.onText(m, g);
333
+ u.items && u.items.length && n.current.onText && u.items[0].getAsString((d) => {
334
+ n.current.onText(d, m);
341
335
  });
342
336
  }, a = (u) => {
343
337
  u.preventDefault(), u.stopPropagation(), r.current = u.target, n.current.onDragEnter?.(u);
344
338
  }, c = (u) => {
345
339
  u.preventDefault(), n.current.onDragOver?.(u);
346
- }, d = (u) => {
340
+ }, f = (u) => {
347
341
  u.target === r.current && n.current.onDragLeave?.(u);
348
342
  }, i = (u) => {
349
343
  u.preventDefault(), o(u.dataTransfer, u), n.current.onDrop?.(u);
350
344
  }, l = (u) => {
351
345
  o(u.clipboardData, u), n.current.onPaste?.(u);
352
346
  };
353
- return s.addEventListener("dragenter", a), s.addEventListener("dragover", c), s.addEventListener("dragleave", d), s.addEventListener("drop", i), s.addEventListener("paste", l), () => {
354
- s.removeEventListener("dragenter", a), s.removeEventListener("dragover", c), s.removeEventListener("dragleave", d), s.removeEventListener("drop", i), s.removeEventListener("paste", l);
347
+ return s.addEventListener("dragenter", a), s.addEventListener("dragover", c), s.addEventListener("dragleave", f), s.addEventListener("drop", i), s.addEventListener("paste", l), () => {
348
+ s.removeEventListener("dragenter", a), s.removeEventListener("dragover", c), s.removeEventListener("dragleave", f), s.removeEventListener("drop", i), s.removeEventListener("paste", l);
355
349
  };
356
350
  },
357
351
  [],
358
352
  e
359
353
  );
360
- }, Pn = (e = []) => {
361
- const t = b(-1), n = b([]), r = M((f) => {
362
- t.current += 1, n.current.splice(f, 0, t.current);
363
- }, []), [s, o] = T(() => (e.forEach((f, h) => {
364
- r(h);
365
- }), e)), a = M((f) => {
366
- n.current = [], o(() => (f.forEach((h, S) => {
367
- r(S);
368
- }), f));
369
- }, []), c = M((f, h) => {
370
- o((S) => {
371
- const R = [...S];
372
- return R.splice(f, 0, h), r(f), R;
373
- });
374
- }, []), d = M((f) => n.current[f], []), i = M(
375
- (f) => n.current.findIndex((h) => h === f),
376
- []
377
- ), l = M((f, h) => {
378
- o((S) => {
379
- const R = [...S];
380
- return h.forEach((k, w) => {
381
- r(f + w);
382
- }), R.splice(f, 0, ...h), R;
383
- });
384
- }, []), u = M((f, h) => {
385
- o((S) => {
386
- const R = [...S];
387
- return R[f] = h, R;
388
- });
389
- }, []), g = M((f) => {
390
- o((h) => {
391
- const S = [...h];
392
- S.splice(f, 1);
393
- try {
394
- n.current.splice(f, 1);
395
- } catch (R) {
396
- console.error(R);
397
- }
398
- return S;
399
- });
400
- }, []), v = M((f) => {
401
- if (!Array.isArray(f)) {
402
- Q && console.error(
403
- `\`indexes\` parameter of \`batchRemove\` function expected to be an array, but got "${typeof f}".`
404
- );
405
- return;
406
- }
407
- f.length && o((h) => {
408
- const S = [], R = h.filter((k, w) => {
409
- const x = !f.includes(w);
410
- return x && S.push(d(w)), x;
411
- });
412
- return n.current = S, R;
413
- });
414
- }, []), y = M((f, h) => {
415
- f !== h && o((S) => {
416
- const R = [...S], k = R.filter((w, x) => x !== f);
417
- k.splice(h, 0, R[f]);
418
- try {
419
- const w = n.current.filter(
420
- (x, P) => P !== f
421
- );
422
- w.splice(h, 0, n.current[f]), n.current = w;
423
- } catch (w) {
424
- console.error(w);
425
- }
426
- return k;
427
- });
428
- }, []), m = M((f) => {
429
- o((h) => (r(h.length), h.concat([f])));
430
- }, []), L = M(() => {
431
- try {
432
- n.current = n.current.slice(0, n.current.length - 1);
433
- } catch (f) {
434
- console.error(f);
435
- }
436
- o((f) => f.slice(0, f.length - 1));
437
- }, []), A = M((f) => {
438
- o((h) => (r(0), [f].concat(h)));
439
- }, []), F = M(() => {
440
- try {
441
- n.current = n.current.slice(1, n.current.length);
442
- } catch (f) {
443
- console.error(f);
444
- }
445
- o((f) => f.slice(1, f.length));
446
- }, []), p = M(
447
- (f) => f.map((h, S) => ({ key: S, item: h })).sort((h, S) => i(h.key) - i(S.key)).filter((h) => !!h.item).map((h) => h.item),
448
- // retrive the data
449
- []
450
- );
451
- return {
452
- list: s,
453
- insert: c,
454
- merge: l,
455
- replace: u,
456
- remove: g,
457
- batchRemove: v,
458
- getKey: d,
459
- getIndex: i,
460
- move: y,
461
- push: m,
462
- pop: L,
463
- unshift: A,
464
- shift: F,
465
- sortList: p,
466
- resetList: a
467
- };
468
354
  };
469
355
  function Cn(e) {
470
- const { initialValue: t, transformer: n } = e || {}, [r, s] = T(t), o = C(n), a = M(() => s(t), []), c = M((d) => {
471
- const i = d.target.value;
472
- return z(o.current) ? s(o.current(i)) : s(i);
356
+ const { initialValue: t, transformer: n } = e || {}, [r, s] = b(t), o = L(n), a = B(() => s(t), []), c = B((f) => {
357
+ const i = f.target.value;
358
+ return k(o.current) ? s(o.current(i)) : s(i);
473
359
  }, []);
474
360
  return [
475
361
  r,
@@ -479,7 +365,7 @@ function Cn(e) {
479
365
  }
480
366
  ];
481
367
  }
482
- const J = {}, ft = (e, t = {}) => {
368
+ const J = {}, lt = (e, t = {}) => {
483
369
  const n = document.querySelector(`script[src="${e}"]`);
484
370
  if (!n) {
485
371
  const r = document.createElement("script");
@@ -494,7 +380,7 @@ const J = {}, ft = (e, t = {}) => {
494
380
  ref: n,
495
381
  status: n.getAttribute("data-status") || "ready"
496
382
  };
497
- }, dt = (e, t = {}) => {
383
+ }, ft = (e, t = {}) => {
498
384
  const n = document.querySelector(`link[href="${e}"]`);
499
385
  if (!n) {
500
386
  const r = document.createElement("link");
@@ -510,18 +396,18 @@ const J = {}, ft = (e, t = {}) => {
510
396
  status: n.getAttribute("data-status") || "ready"
511
397
  };
512
398
  }, Dn = (e, t) => {
513
- const [n, r] = T(e ? "loading" : "unset"), s = b(void 0);
514
- return D(() => {
399
+ const [n, r] = b(e ? "loading" : "unset"), s = y(void 0);
400
+ return C(() => {
515
401
  if (!e) {
516
402
  r("unset");
517
403
  return;
518
404
  }
519
405
  const o = e.replace(/[|#].*$/, "");
520
406
  if (t?.type === "css" || !t?.type && /(^css!|\.css$)/.test(o)) {
521
- const c = dt(e, t?.css);
407
+ const c = ft(e, t?.css);
522
408
  s.current = c.ref, r(c.status);
523
409
  } else if (t?.type === "js" || !t?.type && /(^js!|\.js$)/.test(o)) {
524
- const c = ft(e, t?.js);
410
+ const c = lt(e, t?.js);
525
411
  s.current = c.ref, r(c.status);
526
412
  } else
527
413
  console.error(
@@ -531,28 +417,28 @@ const J = {}, ft = (e, t = {}) => {
531
417
  return;
532
418
  J[e] === void 0 ? J[e] = 1 : J[e] += 1;
533
419
  const a = (c) => {
534
- const d = c.type === "load" ? "ready" : "error";
535
- s.current?.setAttribute("data-status", d), r(d);
420
+ const f = c.type === "load" ? "ready" : "error";
421
+ s.current?.setAttribute("data-status", f), r(f);
536
422
  };
537
423
  return s.current.addEventListener("load", a), s.current.addEventListener("error", a), () => {
538
424
  s.current?.removeEventListener("load", a), s.current?.removeEventListener("error", a), J[e] -= 1, J[e] === 0 && !t?.keepWhenUnused && s.current?.remove(), s.current = void 0;
539
425
  };
540
426
  }, [e]), n;
541
- }, mt = {
427
+ }, dt = {
542
428
  SVG: "image/svg+xml",
543
429
  ICO: "image/x-icon",
544
430
  GIF: "image/gif",
545
431
  PNG: "image/png"
546
432
  }, Mn = (e) => {
547
- D(() => {
433
+ C(() => {
548
434
  if (!e)
549
435
  return;
550
436
  const t = e.split("."), n = t[t.length - 1].toLocaleUpperCase(), r = document.querySelector("link[rel*='icon']") || document.createElement("link");
551
- r.type = mt[n], r.href = e, r.rel = "shortcut icon", document.getElementsByTagName("head")[0].appendChild(r);
437
+ r.type = dt[n], r.href = e, r.rel = "shortcut icon", document.getElementsByTagName("head")[0].appendChild(r);
552
438
  }, [e]);
553
439
  };
554
440
  function Nn(e, t) {
555
- const [n, r] = T(!1), { onFocus: s, onBlur: o, onChange: a } = t || {};
441
+ const [n, r] = b(!1), { onFocus: s, onBlur: o, onChange: a } = t || {};
556
442
  return X(
557
443
  "focusin",
558
444
  (c) => {
@@ -572,127 +458,127 @@ function Nn(e, t) {
572
458
  ), n;
573
459
  }
574
460
  const On = (e, t) => {
575
- const { onExit: n, onEnter: r, pageFullscreen: s = !1 } = t || {}, { className: o = "@unicom-cloud-ui-hooks-page-fullscreen", zIndex: a = 999999 } = qe(s) || !s ? {} : s, c = C(n), d = C(r), [i, l] = T(g), u = b(g());
576
- function g() {
577
- return Y.isEnabled && !!Y.element && Y.element === N(e);
461
+ const { onExit: n, onEnter: r, pageFullscreen: s = !1 } = t || {}, { className: o = "@unicom-cloud-ui-hooks-page-fullscreen", zIndex: a = 999999 } = Ve(s) || !s ? {} : s, c = L(n), f = L(r), [i, l] = b(m), u = y(m());
462
+ function m() {
463
+ return z.isEnabled && !!z.element && z.element === D(e);
578
464
  }
579
- const v = (f) => {
580
- f ? d.current?.() : c.current?.();
581
- }, y = (f) => {
582
- u.current !== f && (v(f), l(f), u.current = f);
583
- }, m = () => {
584
- const f = g();
585
- y(f);
586
- }, L = (f) => {
587
- const h = N(e);
588
- if (!h)
465
+ const h = (v) => {
466
+ v ? f.current?.() : c.current?.();
467
+ }, p = (v) => {
468
+ u.current !== v && (h(v), l(v), u.current = v);
469
+ }, d = () => {
470
+ const v = m();
471
+ p(v);
472
+ }, T = (v) => {
473
+ const S = D(e);
474
+ if (!S)
589
475
  return;
590
- let S = document.getElementById(o);
591
- f ? (h.classList.add(o), S || (S = document.createElement("style"), S.setAttribute("id", o), S.textContent = `
476
+ let R = document.getElementById(o);
477
+ v ? (S.classList.add(o), R || (R = document.createElement("style"), R.setAttribute("id", o), R.textContent = `
592
478
  .${o} {
593
479
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
594
480
  width: 100% !important; height: 100% !important;
595
481
  z-index: ${a};
596
- }`, h.appendChild(S))) : (h.classList.remove(o), S && S.remove()), y(f);
482
+ }`, S.appendChild(R))) : (S.classList.remove(o), R && R.remove()), p(v);
597
483
  }, A = () => {
598
- const f = N(e);
599
- if (f) {
484
+ const v = D(e);
485
+ if (v) {
600
486
  if (s) {
601
- L(!0);
487
+ T(!0);
602
488
  return;
603
489
  }
604
- if (Y.isEnabled)
490
+ if (z.isEnabled)
605
491
  try {
606
- Y.request(f);
607
- } catch (h) {
608
- console.error(h);
492
+ z.request(v);
493
+ } catch (S) {
494
+ console.error(S);
609
495
  }
610
496
  }
611
- }, F = () => {
612
- const f = N(e);
613
- if (f) {
497
+ }, O = () => {
498
+ const v = D(e);
499
+ if (v) {
614
500
  if (s) {
615
- L(!1);
501
+ T(!1);
616
502
  return;
617
503
  }
618
- Y.isEnabled && Y.element === f && Y.exit();
504
+ z.isEnabled && z.element === v && z.exit();
619
505
  }
620
- }, p = () => {
621
- i ? F() : A();
506
+ }, g = () => {
507
+ i ? O() : A();
622
508
  };
623
- return D(() => {
624
- if (!(!Y.isEnabled || s))
625
- return Y.on("change", m), () => {
626
- Y.off("change", m);
509
+ return C(() => {
510
+ if (!(!z.isEnabled || s))
511
+ return z.on("change", d), () => {
512
+ z.off("change", d);
627
513
  };
628
514
  }, []), [
629
515
  i,
630
516
  {
631
517
  enterFullscreen: E(A),
632
- exitFullscreen: E(F),
633
- toggleFullscreen: E(p),
634
- isEnabled: Y.isEnabled
518
+ exitFullscreen: E(O),
519
+ toggleFullscreen: E(g),
520
+ isEnabled: z.isEnabled
635
521
  }
636
522
  ];
637
523
  };
638
- function Fn(e) {
639
- const [t, n] = T(e), r = C(t), s = M(() => r.current, []);
524
+ function xn(e) {
525
+ const [t, n] = b(e), r = L(t), s = B(() => r.current, []);
640
526
  return [t, n, s];
641
527
  }
642
- const gt = (e, t) => {
528
+ const mt = (e, t) => {
643
529
  let n = e > 0 ? e - 1 : t.length + e;
644
530
  return n >= t.length - 1 && (n = t.length - 1), n < 0 && (n = 0), n;
645
531
  }, be = (e, t) => {
646
- const n = gt(e, t);
532
+ const n = mt(e, t);
647
533
  return {
648
534
  _current: t[n],
649
535
  _before: t.slice(0, n),
650
536
  _after: t.slice(n + 1)
651
537
  };
652
538
  };
653
- function xn(e, t = 0) {
654
- const [n, r] = T({
539
+ function Fn(e, t = 0) {
540
+ const [n, r] = b({
655
541
  present: e,
656
542
  past: [],
657
543
  future: []
658
- }), { present: s, past: o, future: a } = n, c = b(e), d = (...v) => {
659
- const y = v.length > 0 ? v[0] : c.current;
660
- c.current = y, r({
661
- present: y,
544
+ }), { present: s, past: o, future: a } = n, c = y(e), f = (...h) => {
545
+ const p = h.length > 0 ? h[0] : c.current;
546
+ c.current = p, r({
547
+ present: p,
662
548
  future: [],
663
549
  past: []
664
550
  });
665
- }, i = (v) => {
666
- const y = [...o, s], m = H(t) ? t : Number(t);
667
- m > 0 && y.length > m && y.splice(0, 1), r({
668
- present: v,
551
+ }, i = (h) => {
552
+ const p = [...o, s], d = F(t) ? t : Number(t);
553
+ d > 0 && p.length > d && p.splice(0, 1), r({
554
+ present: h,
669
555
  future: [],
670
- past: y
556
+ past: p
671
557
  });
672
- }, l = (v = 1) => {
558
+ }, l = (h = 1) => {
673
559
  if (a.length === 0)
674
560
  return;
675
- const { _before: y, _current: m, _after: L } = be(v, a);
561
+ const { _before: p, _current: d, _after: T } = be(h, a);
676
562
  r({
677
- past: [...o, s, ...y],
678
- present: m,
679
- future: L
563
+ past: [...o, s, ...p],
564
+ present: d,
565
+ future: T
680
566
  });
681
- }, u = (v = -1) => {
567
+ }, u = (h = -1) => {
682
568
  if (o.length === 0)
683
569
  return;
684
- const { _before: y, _current: m, _after: L } = be(v, o);
570
+ const { _before: p, _current: d, _after: T } = be(h, o);
685
571
  r({
686
- past: y,
687
- present: m,
688
- future: [...L, s, ...a]
572
+ past: p,
573
+ present: d,
574
+ future: [...T, s, ...a]
689
575
  });
690
- }, g = (v) => {
691
- const y = H(v) ? v : Number(v);
692
- if (y !== 0) {
693
- if (y > 0)
694
- return l(y);
695
- u(y);
576
+ }, m = (h) => {
577
+ const p = F(h) ? h : Number(h);
578
+ if (p !== 0) {
579
+ if (p > 0)
580
+ return l(p);
581
+ u(p);
696
582
  }
697
583
  };
698
584
  return {
@@ -700,18 +586,18 @@ function xn(e, t = 0) {
700
586
  backLength: o.length,
701
587
  forwardLength: a.length,
702
588
  setValue: E(i),
703
- go: E(g),
589
+ go: E(m),
704
590
  back: E(() => {
705
- g(-1);
591
+ m(-1);
706
592
  }),
707
593
  forward: E(() => {
708
- g(1);
594
+ m(1);
709
595
  }),
710
- reset: E(d)
596
+ reset: E(f)
711
597
  };
712
598
  }
713
599
  const kn = (e, t) => {
714
- const { onEnter: n, onLeave: r, onChange: s } = t || {}, [o, { setTrue: a, setFalse: c }] = ct(!1);
600
+ const { onEnter: n, onLeave: r, onChange: s } = t || {}, [o, { setTrue: a, setFalse: c }] = ot(!1);
715
601
  return X(
716
602
  "mouseenter",
717
603
  () => {
@@ -730,21 +616,21 @@ const kn = (e, t) => {
730
616
  }
731
617
  ), o;
732
618
  };
733
- function _n(e, t) {
734
- const { callback: n, ...r } = t || {}, [s, o] = T(), [a, c] = T();
735
- return q(
619
+ function Hn(e, t) {
620
+ const { callback: n, ...r } = t || {}, [s, o] = b(), [a, c] = b();
621
+ return V(
736
622
  () => {
737
- const i = (Array.isArray(e) ? e : [e]).map((u) => N(u)).filter(Boolean);
623
+ const i = (Array.isArray(e) ? e : [e]).map((u) => D(u)).filter(Boolean);
738
624
  if (!i.length)
739
625
  return;
740
626
  const l = new IntersectionObserver(
741
627
  (u) => {
742
- for (const g of u)
743
- c(g.intersectionRatio), o(g.isIntersecting), n?.(g);
628
+ for (const m of u)
629
+ c(m.intersectionRatio), o(m.isIntersecting), n?.(m);
744
630
  },
745
631
  {
746
632
  ...r,
747
- root: N(t?.root)
633
+ root: D(t?.root)
748
634
  }
749
635
  );
750
636
  return i.forEach((u) => l.observe(u)), () => {
@@ -755,7 +641,7 @@ function _n(e, t) {
755
641
  e
756
642
  ), [s, a];
757
643
  }
758
- const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
644
+ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
759
645
  const r = G.get(e);
760
646
  r?.timer && clearTimeout(r.timer);
761
647
  let s;
@@ -765,27 +651,27 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
765
651
  ...n,
766
652
  timer: s
767
653
  });
768
- }, pt = (e) => G.get(e), Hn = (e) => {
654
+ }, ht = (e) => G.get(e), _n = (e) => {
769
655
  e ? (Array.isArray(e) ? e : [e]).forEach((n) => G.delete(n)) : G.clear();
770
- }, ee = /* @__PURE__ */ new Map(), vt = (e) => ee.get(e), yt = (e, t) => {
771
- ee.set(e, t), t.then((n) => (ee.delete(e), n)).catch(() => {
772
- ee.delete(e);
656
+ }, Z = /* @__PURE__ */ new Map(), pt = (e) => Z.get(e), vt = (e, t) => {
657
+ Z.set(e, t), t.then((n) => (Z.delete(e), n)).catch(() => {
658
+ Z.delete(e);
773
659
  });
774
- }, W = {}, Et = (e, t) => {
660
+ }, W = {}, yt = (e, t) => {
775
661
  W[e] && W[e].forEach((n) => n(t));
776
662
  }, ie = (e, t) => (W[e] || (W[e] = []), W[e].push(t), function() {
777
663
  const r = W[e].indexOf(t);
778
664
  W[e].splice(r, 1);
779
- }), St = (e, {
665
+ }), Et = (e, {
780
666
  cacheKey: t,
781
667
  cacheTime: n = 300 * 1e3,
782
668
  staleTime: r = 0,
783
669
  setCache: s,
784
670
  getCache: o
785
671
  }) => {
786
- const a = b(void 0), c = b(void 0), d = (l, u) => {
787
- s ? s(u) : ht(l, n, u), Et(l, u.data);
788
- }, i = (l, u = []) => o ? o(u) : pt(l);
672
+ const a = y(void 0), c = y(void 0), f = (l, u) => {
673
+ s ? s(u) : gt(l, n, u), yt(l, u.data);
674
+ }, i = (l, u = []) => o ? o(u) : ht(l);
789
675
  return se(() => {
790
676
  if (!t)
791
677
  return;
@@ -809,20 +695,20 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
809
695
  };
810
696
  },
811
697
  onRequest: (l, u) => {
812
- let g = vt(t);
813
- return g && g !== c.current ? { servicePromise: g } : (g = l(...u), c.current = g, yt(t, g), { servicePromise: g });
698
+ let m = pt(t);
699
+ return m && m !== c.current ? { servicePromise: m } : (m = l(...u), c.current = m, vt(t, m), { servicePromise: m });
814
700
  },
815
701
  onSuccess: (l, u) => {
816
- t && (a.current?.(), d(t, {
702
+ t && (a.current?.(), f(t, {
817
703
  data: l,
818
704
  params: u,
819
705
  time: Date.now()
820
- }), a.current = ie(t, (g) => {
821
- e.setState({ data: g });
706
+ }), a.current = ie(t, (m) => {
707
+ e.setState({ data: m });
822
708
  }));
823
709
  },
824
710
  onMutate: (l) => {
825
- t && (a.current?.(), d(t, {
711
+ t && (a.current?.(), f(t, {
826
712
  data: l,
827
713
  params: e.state.params,
828
714
  time: Date.now()
@@ -831,23 +717,23 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
831
717
  }));
832
718
  }
833
719
  } : {};
834
- }, wt = (e, { debounceWait: t, debounceLeading: n, debounceTrailing: r, debounceMaxWait: s }) => {
835
- const o = b(void 0), a = _(() => {
720
+ }, St = (e, { debounceWait: t, debounceLeading: n, debounceTrailing: r, debounceMaxWait: s }) => {
721
+ const o = y(void 0), a = x(() => {
836
722
  const c = {};
837
723
  return n !== void 0 && (c.leading = n), r !== void 0 && (c.trailing = r), s !== void 0 && (c.maxWait = s), c;
838
724
  }, [n, r, s]);
839
- return D(() => {
725
+ return C(() => {
840
726
  if (t) {
841
727
  const c = e.runAsync.bind(e);
842
728
  return o.current = De(
843
- (d) => {
844
- d();
729
+ (f) => {
730
+ f();
845
731
  },
846
732
  t,
847
733
  a
848
- ), e.runAsync = (...d) => new Promise((i, l) => {
734
+ ), e.runAsync = (...f) => new Promise((i, l) => {
849
735
  o.current?.(() => {
850
- c(...d).then(i).catch(l);
736
+ c(...f).then(i).catch(l);
851
737
  });
852
738
  }), () => {
853
739
  o.current?.cancel(), e.runAsync = c;
@@ -858,8 +744,8 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
858
744
  o.current?.cancel();
859
745
  }
860
746
  } : {};
861
- }, bt = (e, { loadingDelay: t, ready: n }) => {
862
- const r = b(void 0);
747
+ }, wt = (e, { loadingDelay: t, ready: n }) => {
748
+ const r = y(void 0);
863
749
  if (!t)
864
750
  return {};
865
751
  const s = () => {
@@ -880,8 +766,8 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
880
766
  s();
881
767
  }
882
768
  };
883
- }, Rt = (e, { pollingInterval: t, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
884
- const s = b(void 0), o = b(void 0), a = b(0), c = () => {
769
+ }, bt = (e, { pollingInterval: t, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
770
+ const s = y(void 0), o = y(void 0), a = y(0), c = () => {
885
771
  s.current && clearTimeout(s.current), o.current?.();
886
772
  };
887
773
  return K(() => {
@@ -899,7 +785,7 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
899
785
  onFinally: () => {
900
786
  r === -1 || // When an error occurs, the request is not repeated after pollingErrorRetryCount retries
901
787
  r !== -1 && a.current <= r ? s.current = setTimeout(() => {
902
- !n && !Ge() ? o.current = Ke(() => {
788
+ !n && !We() ? o.current = Ge(() => {
903
789
  e.refresh();
904
790
  }) : e.refresh();
905
791
  }, t) : a.current = 0;
@@ -909,7 +795,7 @@ const G = /* @__PURE__ */ new Map(), ht = (e, t, n) => {
909
795
  }
910
796
  } : {};
911
797
  };
912
- function Tt(e, t) {
798
+ function Rt(e, t) {
913
799
  let n = !1;
914
800
  return (...r) => {
915
801
  n || (n = !0, e(...r), setTimeout(() => {
@@ -917,17 +803,17 @@ function Tt(e, t) {
917
803
  }, t));
918
804
  };
919
805
  }
920
- const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
921
- const r = b(void 0), s = () => {
806
+ const Tt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
807
+ const r = y(void 0), s = () => {
922
808
  r.current?.();
923
809
  };
924
- return D(() => {
810
+ return C(() => {
925
811
  if (t) {
926
- const o = Tt(
812
+ const o = Rt(
927
813
  e.refresh.bind(e),
928
814
  n
929
815
  );
930
- r.current = Je(() => {
816
+ r.current = Ke(() => {
931
817
  o();
932
818
  });
933
819
  }
@@ -937,8 +823,8 @@ const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
937
823
  }, [t, n]), $(() => {
938
824
  s();
939
825
  }), {};
940
- }, At = (e, { retryInterval: t, retryCount: n }) => {
941
- const r = b(void 0), s = b(0), o = b(!1);
826
+ }, Lt = (e, { retryInterval: t, retryCount: n }) => {
827
+ const r = y(void 0), s = y(0), o = y(!1);
942
828
  return n ? {
943
829
  onBefore: () => {
944
830
  o.current || (s.current = 0), o.current = !1, r.current && clearTimeout(r.current);
@@ -959,9 +845,9 @@ const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
959
845
  s.current = 0, r.current && clearTimeout(r.current);
960
846
  }
961
847
  } : {};
962
- }, Pt = (e, { throttleWait: t, throttleLeading: n, throttleTrailing: r }) => {
963
- const s = b(void 0), o = {};
964
- return n !== void 0 && (o.leading = n), r !== void 0 && (o.trailing = r), D(() => {
848
+ }, At = (e, { throttleWait: t, throttleLeading: n, throttleTrailing: r }) => {
849
+ const s = y(void 0), o = {};
850
+ return n !== void 0 && (o.leading = n), r !== void 0 && (o.trailing = r), C(() => {
965
851
  if (t) {
966
852
  const a = e.runAsync.bind(e);
967
853
  return s.current = Me(
@@ -970,9 +856,9 @@ const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
970
856
  },
971
857
  t,
972
858
  o
973
- ), e.runAsync = (...c) => new Promise((d, i) => {
859
+ ), e.runAsync = (...c) => new Promise((f, i) => {
974
860
  s.current?.(() => {
975
- a(...c).then(d).catch(i);
861
+ a(...c).then(f).catch(i);
976
862
  });
977
863
  }), () => {
978
864
  e.runAsync = a, s.current?.cancel();
@@ -984,7 +870,7 @@ const Lt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
984
870
  }
985
871
  } : {};
986
872
  };
987
- class Ct {
873
+ class Pt {
988
874
  constructor(t, n, r, s = {}) {
989
875
  this.serviceRef = t, this.options = n, this.subscribe = r, this.initState = s, this.count = 0, this.state = {
990
876
  loading: !1,
@@ -1065,33 +951,33 @@ class Ct {
1065
951
  return this.runAsync(...this.state.params || []);
1066
952
  }
1067
953
  mutate(t) {
1068
- const n = z(t) ? t(this.state.data) : t;
954
+ const n = k(t) ? t(this.state.data) : t;
1069
955
  this.runPluginHandler("onMutate", n), this.setState({
1070
956
  data: n
1071
957
  });
1072
958
  }
1073
959
  }
1074
- function Dt(e, t = {}, n = []) {
960
+ function Ct(e, t = {}, n = []) {
1075
961
  const { manual: r = !1, ready: s = !0, ...o } = t;
1076
- Q && t.defaultParams && !Array.isArray(t.defaultParams) && console.warn(
962
+ re && t.defaultParams && !Array.isArray(t.defaultParams) && console.warn(
1077
963
  `expected defaultParams is array, got ${typeof t.defaultParams}`
1078
964
  );
1079
965
  const a = {
1080
966
  manual: r,
1081
967
  ready: s,
1082
968
  ...o
1083
- }, c = C(e), d = re(), i = se(() => {
969
+ }, c = L(e), f = ne(), i = se(() => {
1084
970
  const l = n.map((u) => u?.onInit?.(a)).filter(Boolean);
1085
- return new Ct(
971
+ return new Pt(
1086
972
  c,
1087
973
  a,
1088
- d,
974
+ f,
1089
975
  Object.assign({}, ...l)
1090
976
  );
1091
977
  }, []);
1092
978
  return i.options = a, i.pluginImpls = n.map(
1093
979
  (l) => l(i, a)
1094
- ), xe(() => {
980
+ ), Fe(() => {
1095
981
  if (!r && s) {
1096
982
  const l = i.state.params || t.defaultParams || [];
1097
983
  i.run(...l);
@@ -1112,23 +998,23 @@ function Dt(e, t = {}, n = []) {
1112
998
  };
1113
999
  }
1114
1000
  function ke(e, t, n) {
1115
- return Dt(e, t, [
1001
+ return Ct(e, t, [
1116
1002
  ...n || [],
1003
+ St,
1117
1004
  wt,
1118
1005
  bt,
1119
- Rt,
1120
- Lt,
1121
- Pt,
1122
- Qe,
1123
- St,
1124
- At
1006
+ Tt,
1007
+ At,
1008
+ Je,
1009
+ Et,
1010
+ Lt
1125
1011
  ]);
1126
1012
  }
1127
- const Mt = (e) => e === document || e === document.documentElement || e === document.body ? Math.max(
1013
+ const Dt = (e) => e === document || e === document.documentElement || e === document.body ? Math.max(
1128
1014
  window.pageYOffset,
1129
1015
  document.documentElement.scrollTop,
1130
1016
  document.body.scrollTop
1131
- ) : e.scrollTop, Re = (e) => e.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), Nt = (e) => e.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight), zn = (e, t = {}) => {
1017
+ ) : e.scrollTop, Re = (e) => e.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), Mt = (e) => e.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight), In = (e, t = {}) => {
1132
1018
  const {
1133
1019
  target: n,
1134
1020
  isNoMore: r,
@@ -1136,72 +1022,72 @@ const Mt = (e) => e === document || e === document.documentElement || e === docu
1136
1022
  direction: o = "bottom",
1137
1023
  reloadDeps: a = [],
1138
1024
  manual: c,
1139
- onBefore: d,
1025
+ onBefore: f,
1140
1026
  onSuccess: i,
1141
1027
  onError: l,
1142
1028
  onFinally: u
1143
- } = t, [g, v] = T(), [y, m] = T(!1), L = o === "top", A = b(void 0), F = b(0), p = _(() => r ? r(g) : !1, [g]), { loading: f, error: h, run: S, runAsync: R, cancel: k } = ke(
1144
- async (O) => ({ currentData: await e(O), lastData: O }),
1029
+ } = t, [m, h] = b(), [p, d] = b(!1), T = o === "top", A = y(void 0), O = y(0), g = x(() => r ? r(m) : !1, [m]), { loading: v, error: S, run: R, runAsync: N, cancel: I } = ke(
1030
+ async (M) => ({ currentData: await e(M), lastData: M }),
1145
1031
  {
1146
1032
  manual: c,
1147
- onFinally: (O, I, B) => {
1148
- m(!1), u?.(I?.currentData, B);
1033
+ onFinally: (M, _, j) => {
1034
+ d(!1), u?.(_?.currentData, j);
1149
1035
  },
1150
- onBefore: () => d?.(),
1151
- onSuccess: (O) => {
1152
- O.lastData ? v({
1153
- ...O.currentData,
1154
- list: L ? [...O.currentData.list, ...O.lastData.list ?? []] : [...O.lastData.list ?? [], ...O.currentData.list]
1155
- }) : v({
1156
- ...O.currentData,
1157
- list: [...O.currentData.list ?? []]
1036
+ onBefore: () => f?.(),
1037
+ onSuccess: (M) => {
1038
+ M.lastData ? h({
1039
+ ...M.currentData,
1040
+ list: T ? [...M.currentData.list, ...M.lastData.list ?? []] : [...M.lastData.list ?? [], ...M.currentData.list]
1041
+ }) : h({
1042
+ ...M.currentData,
1043
+ list: [...M.currentData.list ?? []]
1158
1044
  }), setTimeout(() => {
1159
- if (L) {
1160
- let I = N(n);
1161
- if (I = I === document ? document.documentElement : I, I) {
1162
- const B = Re(I);
1163
- I.scrollTo(0, B - F.current);
1045
+ if (T) {
1046
+ let _ = D(n);
1047
+ if (_ = _ === document ? document.documentElement : _, _) {
1048
+ const j = Re(_);
1049
+ _.scrollTo(0, j - O.current);
1164
1050
  }
1165
1051
  } else
1166
1052
  ye();
1167
- }), i?.(O.currentData);
1053
+ }), i?.(M.currentData);
1168
1054
  },
1169
- onError: (O) => l?.(O)
1055
+ onError: (M) => l?.(M)
1170
1056
  }
1171
1057
  ), w = E(() => {
1172
- p || (m(!0), S(g));
1173
- }), x = async () => (await R(g)).currentData, P = E(() => p ? Promise.reject() : (m(!0), x())), j = () => (m(!1), S()), oe = () => (m(!1), x()), ye = () => {
1174
- const O = N(n);
1175
- if (!O)
1058
+ g || (d(!0), R(m));
1059
+ }), Y = async (M) => (await N(M)).currentData, P = E(() => g ? Promise.reject() : (d(!0), Y(m))), H = () => (d(!1), R()), oe = () => (d(!1), Y()), ye = () => {
1060
+ const M = D(n);
1061
+ if (!M)
1176
1062
  return;
1177
- const I = O === document ? document.documentElement : O, B = Mt(I), Ee = Re(I), Be = Nt(I);
1178
- L ? (A.current !== void 0 && A.current > B && B <= s && w(), A.current = B, F.current = Ee - B) : Ee - B <= Be + s && w();
1063
+ const _ = M === document ? document.documentElement : M, j = Dt(_), Ee = Re(_), Be = Mt(_);
1064
+ T ? (A.current !== void 0 && A.current > j && j <= s && w(), A.current = j, O.current = Ee - j) : Ee - j <= Be + s && w();
1179
1065
  };
1180
1066
  return X(
1181
1067
  "scroll",
1182
1068
  () => {
1183
- f || y || ye();
1069
+ v || p || ye();
1184
1070
  },
1185
1071
  { target: n }
1186
1072
  ), K(() => {
1187
- S();
1073
+ R();
1188
1074
  }, [...a]), {
1189
- data: g,
1190
- loading: !y && f,
1191
- error: h,
1192
- loadingMore: y,
1193
- noMore: p,
1075
+ data: m,
1076
+ loading: !p && v,
1077
+ error: S,
1078
+ loadingMore: p,
1079
+ noMore: g,
1194
1080
  loadMore: w,
1195
1081
  loadMoreAsync: P,
1196
- reload: E(j),
1082
+ reload: E(H),
1197
1083
  reloadAsync: E(oe),
1198
- mutate: v,
1199
- cancel: k
1084
+ mutate: h,
1085
+ cancel: I
1200
1086
  };
1201
- }, _e = (e, t, n) => {
1202
- const r = b(void 0), s = b(0);
1203
- Oe(t, r.current) || (s.current += 1), r.current = t, q(e, [s.current], n);
1204
- }, He = {
1087
+ }, He = (e, t, n) => {
1088
+ const r = y(void 0), s = y(0);
1089
+ Oe(t, r.current) || (s.current += 1), r.current = t, V(e, [s.current], n);
1090
+ }, _e = {
1205
1091
  0: 48,
1206
1092
  1: 49,
1207
1093
  2: 50,
@@ -1260,7 +1146,7 @@ const Mt = (e) => e === document || e === document.documentElement || e === docu
1260
1146
  z: 90,
1261
1147
  leftwindowkey: 91,
1262
1148
  rightwindowkey: 92,
1263
- meta: nt ? [91, 93] : [91, 92],
1149
+ meta: tt ? [91, 93] : [91, 92],
1264
1150
  selectkey: 93,
1265
1151
  numpad0: 96,
1266
1152
  numpad1: 97,
@@ -1306,48 +1192,48 @@ const Mt = (e) => e === document || e === document.documentElement || e === docu
1306
1192
  ctrl: (e) => e.ctrlKey,
1307
1193
  shift: (e) => e.shiftKey,
1308
1194
  alt: (e) => e.altKey,
1309
- meta: (e) => e.type === "keyup" ? He.meta.includes(e.keyCode) : e.metaKey
1195
+ meta: (e) => e.type === "keyup" ? _e.meta.includes(e.keyCode) : e.metaKey
1310
1196
  };
1311
- function ze(e) {
1312
- return ne(e) || H(e);
1197
+ function Ie(e) {
1198
+ return te(e) || F(e);
1313
1199
  }
1314
- function Ot(e) {
1200
+ function Nt(e) {
1315
1201
  const t = Object.keys(me).reduce((n, r) => me[r](e) ? n + 1 : n, 0);
1316
1202
  return [16, 17, 18, 91, 92].includes(e.keyCode) ? t : t + 1;
1317
1203
  }
1318
1204
  function Te(e, t, n) {
1319
1205
  if (!e.key)
1320
1206
  return !1;
1321
- if (H(t))
1207
+ if (F(t))
1322
1208
  return e.keyCode === t ? t : !1;
1323
1209
  const r = t.split(".");
1324
1210
  let s = 0;
1325
1211
  for (const o of r) {
1326
- const a = me[o], c = He[o.toLowerCase()];
1212
+ const a = me[o], c = _e[o.toLowerCase()];
1327
1213
  (a && a(e) || c && c === e.keyCode) && s++;
1328
1214
  }
1329
- return n ? s === r.length && Ot(e) === r.length ? t : !1 : s === r.length ? t : !1;
1215
+ return n ? s === r.length && Nt(e) === r.length ? t : !1 : s === r.length ? t : !1;
1330
1216
  }
1331
- function Ft(e, t) {
1332
- return z(e) ? e : ze(e) ? (n) => Te(n, e, t) : Array.isArray(e) ? (n) => e.find((r) => Te(n, r, t)) : () => !!e;
1217
+ function Ot(e, t) {
1218
+ return k(e) ? e : Ie(e) ? (n) => Te(n, e, t) : Array.isArray(e) ? (n) => e.find((r) => Te(n, r, t)) : () => !!e;
1333
1219
  }
1334
1220
  const xt = ["keydown"];
1335
- function jn(e, t, n) {
1221
+ function Yn(e, t, n) {
1336
1222
  const {
1337
1223
  events: r = xt,
1338
1224
  target: s,
1339
1225
  exactMatch: o = !1,
1340
1226
  useCapture: a = !1
1341
- } = n || {}, c = C(t), d = C(e);
1342
- _e(
1227
+ } = n || {}, c = L(t), f = L(e);
1228
+ He(
1343
1229
  () => {
1344
- const i = N(s, window);
1230
+ const i = D(s, window);
1345
1231
  if (!i)
1346
1232
  return;
1347
1233
  const l = (u) => {
1348
- const v = Ft(d.current, o)(u), y = ze(v) ? v : u.key;
1349
- if (v)
1350
- return c.current?.(u, y);
1234
+ const h = Ot(f.current, o)(u), p = Ie(h) ? h : u.key;
1235
+ if (h)
1236
+ return c.current?.(u, p);
1351
1237
  };
1352
1238
  for (const u of r)
1353
1239
  i?.addEventListener?.(u, l, a);
@@ -1361,42 +1247,42 @@ function jn(e, t, n) {
1361
1247
  );
1362
1248
  }
1363
1249
  const Le = "HOOKS_SYNC_STORAGE_EVENT_NAME";
1364
- function je(e) {
1250
+ function Ye(e) {
1365
1251
  function t(n, r = {}) {
1366
1252
  let s;
1367
1253
  const {
1368
1254
  listenStorageChange: o = !1,
1369
- onError: a = (m) => {
1370
- console.error(m);
1255
+ onError: a = (d) => {
1256
+ console.error(d);
1371
1257
  }
1372
1258
  } = r;
1373
1259
  try {
1374
1260
  s = e();
1375
- } catch (m) {
1376
- a(m);
1261
+ } catch (d) {
1262
+ a(d);
1377
1263
  }
1378
- const c = (m) => r.serializer ? r.serializer(m) : JSON.stringify(m), d = (m) => r.deserializer ? r.deserializer(m) : JSON.parse(m);
1264
+ const c = (d) => r.serializer ? r.serializer(d) : JSON.stringify(d), f = (d) => r.deserializer ? r.deserializer(d) : JSON.parse(d);
1379
1265
  function i() {
1380
1266
  try {
1381
- const m = s?.getItem(n);
1382
- if (m)
1383
- return d(m);
1384
- } catch (m) {
1385
- a(m);
1267
+ const d = s?.getItem(n);
1268
+ if (d)
1269
+ return f(d);
1270
+ } catch (d) {
1271
+ a(d);
1386
1272
  }
1387
- return z(r.defaultValue) ? r.defaultValue() : r.defaultValue;
1273
+ return k(r.defaultValue) ? r.defaultValue() : r.defaultValue;
1388
1274
  }
1389
- const [l, u] = T(i);
1275
+ const [l, u] = b(i);
1390
1276
  K(() => {
1391
1277
  u(i());
1392
1278
  }, [n]);
1393
- const g = (m) => {
1394
- const L = z(m) ? m(l) : m;
1395
- o || u(L);
1279
+ const m = (d) => {
1280
+ const T = k(d) ? d(l) : d;
1281
+ o || u(T);
1396
1282
  try {
1397
1283
  let A;
1398
- const F = s?.getItem(n);
1399
- Ue(L) ? (A = null, s?.removeItem(n)) : (A = c(L), s?.setItem(n, A)), dispatchEvent(
1284
+ const O = s?.getItem(n);
1285
+ Ue(T) ? (A = null, s?.removeItem(n)) : (A = c(T), s?.setItem(n, A)), dispatchEvent(
1400
1286
  // send custom event to communicate within same page
1401
1287
  // importantly this should not be a StorageEvent since those cannot
1402
1288
  // be constructed with a non-built-in storage area
@@ -1404,7 +1290,7 @@ function je(e) {
1404
1290
  detail: {
1405
1291
  key: n,
1406
1292
  newValue: A,
1407
- oldValue: F,
1293
+ oldValue: O,
1408
1294
  storageArea: s
1409
1295
  }
1410
1296
  })
@@ -1412,28 +1298,28 @@ function je(e) {
1412
1298
  } catch (A) {
1413
1299
  a(A);
1414
1300
  }
1415
- }, v = (m) => {
1416
- m.key !== n || m.storageArea !== s || u(i());
1417
- }, y = (m) => {
1418
- v(m.detail);
1301
+ }, h = (d) => {
1302
+ d.key !== n || d.storageArea !== s || u(i());
1303
+ }, p = (d) => {
1304
+ h(d.detail);
1419
1305
  };
1420
- return X("storage", v, {
1306
+ return X("storage", h, {
1421
1307
  enable: o
1422
- }), X(Le, y, {
1308
+ }), X(Le, p, {
1423
1309
  enable: o
1424
1310
  }), [
1425
1311
  l,
1426
- E(g)
1312
+ E(m)
1427
1313
  ];
1428
1314
  }
1429
1315
  return t;
1430
1316
  }
1431
- const In = je(
1432
- () => V ? localStorage : void 0
1317
+ const zn = Ye(
1318
+ () => q ? localStorage : void 0
1433
1319
  );
1434
- function Yn(e) {
1435
- const t = b(!1);
1436
- return M(
1320
+ function Xn(e) {
1321
+ const t = y(!1);
1322
+ return B(
1437
1323
  async (...n) => {
1438
1324
  if (!t.current) {
1439
1325
  t.current = !0;
@@ -1449,16 +1335,16 @@ function Yn(e) {
1449
1335
  [e]
1450
1336
  );
1451
1337
  }
1452
- function Xn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd: o } = {}) {
1453
- const a = C(e), c = C(s), d = C(o), i = b(void 0), l = b(!1), u = b({ x: 0, y: 0 }), g = b(!1), v = b(!1), y = !!(r?.x && r.x > 0 || r?.y && r.y > 0);
1454
- q(
1338
+ function jn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd: o } = {}) {
1339
+ const a = L(e), c = L(s), f = L(o), i = y(void 0), l = y(!1), u = y({ x: 0, y: 0 }), m = y(!1), h = y(!1), p = !!(r?.x && r.x > 0 || r?.y && r.y > 0);
1340
+ V(
1455
1341
  () => {
1456
- const m = N(t);
1457
- if (!m?.addEventListener)
1342
+ const d = D(t);
1343
+ if (!d?.addEventListener)
1458
1344
  return;
1459
- const L = (w) => {
1460
- const { clientX: x, clientY: P } = A(w), j = Math.abs(x - u.current.x), oe = Math.abs(P - u.current.y);
1461
- return !!(r?.x && j > r.x || r?.y && oe > r.y);
1345
+ const T = (w) => {
1346
+ const { clientX: Y, clientY: P } = A(w), H = Math.abs(Y - u.current.x), oe = Math.abs(P - u.current.y);
1347
+ return !!(r?.x && H > r.x || r?.y && oe > r.y);
1462
1348
  };
1463
1349
  function A(w) {
1464
1350
  return "TouchEvent" in window && w instanceof TouchEvent ? {
@@ -1469,64 +1355,39 @@ function Xn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd
1469
1355
  clientY: w.clientY
1470
1356
  } : { clientX: 0, clientY: 0 };
1471
1357
  }
1472
- const F = (w) => {
1358
+ const O = (w) => {
1473
1359
  i.current = setTimeout(() => {
1474
1360
  a.current(w), l.current = !0;
1475
1361
  }, n);
1476
- }, p = (w) => {
1477
- if (!v.current) {
1478
- if (v.current = !0, y) {
1479
- const { clientX: x, clientY: P } = A(w);
1480
- u.current.x = x, u.current.y = P;
1362
+ }, g = (w) => {
1363
+ if (!h.current) {
1364
+ if (h.current = !0, p) {
1365
+ const { clientX: Y, clientY: P } = A(w);
1366
+ u.current.x = Y, u.current.y = P;
1481
1367
  }
1482
- F(w);
1368
+ O(w);
1483
1369
  }
1484
- }, f = (w) => {
1485
- w?.sourceCapabilities?.firesTouchEvents || (g.current = !0, y && (u.current.x = w.clientX, u.current.y = w.clientY), F(w));
1486
- }, h = (w) => {
1487
- i.current && L(w) && (clearTimeout(i.current), i.current = void 0);
1370
+ }, v = (w) => {
1371
+ w?.sourceCapabilities?.firesTouchEvents || (m.current = !0, p && (u.current.x = w.clientX, u.current.y = w.clientY), O(w));
1488
1372
  }, S = (w) => {
1489
- v.current && (v.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
1373
+ i.current && T(w) && (clearTimeout(i.current), i.current = void 0);
1490
1374
  }, R = (w) => {
1491
- w?.sourceCapabilities?.firesTouchEvents || g.current && (g.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
1492
- }, k = (w) => {
1493
- g.current && (g.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current && (d.current?.(w), l.current = !1));
1375
+ h.current && (h.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? f.current?.(w) : c.current && c.current(w), l.current = !1);
1376
+ }, N = (w) => {
1377
+ w?.sourceCapabilities?.firesTouchEvents || m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? f.current?.(w) : c.current && c.current(w), l.current = !1);
1378
+ }, I = (w) => {
1379
+ m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current && (f.current?.(w), l.current = !1));
1494
1380
  };
1495
- return m.addEventListener("mousedown", f), m.addEventListener("mouseup", R), m.addEventListener("mouseleave", k), m.addEventListener("touchstart", p), m.addEventListener("touchend", S), y && (m.addEventListener("mousemove", h), m.addEventListener("touchmove", h)), () => {
1496
- i.current && (clearTimeout(i.current), l.current = !1), m.removeEventListener("mousedown", f), m.removeEventListener("mouseup", R), m.removeEventListener("mouseleave", k), m.removeEventListener("touchstart", p), m.removeEventListener("touchend", S), y && (m.removeEventListener("mousemove", h), m.removeEventListener("touchmove", h));
1381
+ return d.addEventListener("mousedown", v), d.addEventListener("mouseup", N), d.addEventListener("mouseleave", I), d.addEventListener("touchstart", g), d.addEventListener("touchend", R), p && (d.addEventListener("mousemove", S), d.addEventListener("touchmove", S)), () => {
1382
+ i.current && (clearTimeout(i.current), l.current = !1), d.removeEventListener("mousedown", v), d.removeEventListener("mouseup", N), d.removeEventListener("mouseleave", I), d.removeEventListener("touchstart", g), d.removeEventListener("touchend", R), p && (d.removeEventListener("mousemove", S), d.removeEventListener("touchmove", S));
1497
1383
  };
1498
1384
  },
1499
1385
  [],
1500
1386
  t
1501
1387
  );
1502
1388
  }
1503
- function Bn(e) {
1504
- const t = () => new Map(e), [n, r] = T(t), s = (i, l) => {
1505
- r((u) => {
1506
- const g = new Map(u);
1507
- return g.set(i, l), g;
1508
- });
1509
- }, o = (i) => {
1510
- r(new Map(i));
1511
- }, a = (i) => {
1512
- r((l) => {
1513
- const u = new Map(l);
1514
- return u.delete(i), u;
1515
- });
1516
- }, c = () => r(t()), d = (i) => n.get(i);
1517
- return [
1518
- n,
1519
- {
1520
- set: E(s),
1521
- setAll: E(o),
1522
- remove: E(a),
1523
- reset: E(c),
1524
- get: E(d)
1525
- }
1526
- ];
1527
- }
1528
1389
  function pe(e) {
1529
- const t = b(0), [n, r] = T(e), s = M((o) => {
1390
+ const t = y(0), [n, r] = b(e), s = B((o) => {
1530
1391
  cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
1531
1392
  r(o);
1532
1393
  });
@@ -1535,7 +1396,7 @@ function pe(e) {
1535
1396
  cancelAnimationFrame(t.current);
1536
1397
  }), [n, s];
1537
1398
  }
1538
- const kt = {
1399
+ const Ft = {
1539
1400
  screenX: NaN,
1540
1401
  screenY: NaN,
1541
1402
  clientX: NaN,
@@ -1548,17 +1409,17 @@ const kt = {
1548
1409
  elementW: NaN,
1549
1410
  elementPosX: NaN,
1550
1411
  elementPosY: NaN
1551
- }, Vn = (e) => {
1552
- const [t, n] = pe(kt);
1412
+ }, Bn = (e) => {
1413
+ const [t, n] = pe(Ft);
1553
1414
  return X(
1554
1415
  "mousemove",
1555
1416
  (r) => {
1556
- const { screenX: s, screenY: o, clientX: a, clientY: c, pageX: d, pageY: i } = r, l = {
1417
+ const { screenX: s, screenY: o, clientX: a, clientY: c, pageX: f, pageY: i } = r, l = {
1557
1418
  screenX: s,
1558
1419
  screenY: o,
1559
1420
  clientX: a,
1560
1421
  clientY: c,
1561
- pageX: d,
1422
+ pageX: f,
1562
1423
  pageY: i,
1563
1424
  elementX: NaN,
1564
1425
  elementY: NaN,
@@ -1566,10 +1427,10 @@ const kt = {
1566
1427
  elementW: NaN,
1567
1428
  elementPosX: NaN,
1568
1429
  elementPosY: NaN
1569
- }, u = N(e);
1430
+ }, u = D(e);
1570
1431
  if (u) {
1571
- const { left: g, top: v, width: y, height: m } = u.getBoundingClientRect();
1572
- l.elementPosX = g + window.pageXOffset, l.elementPosY = v + window.pageYOffset, l.elementX = d - l.elementPosX, l.elementY = i - l.elementPosY, l.elementW = y, l.elementH = m;
1432
+ const { left: m, top: h, width: p, height: d } = u.getBoundingClientRect();
1433
+ l.elementPosX = m + window.pageXOffset, l.elementPosY = h + window.pageYOffset, l.elementX = f - l.elementPosX, l.elementY = i - l.elementPosY, l.elementW = p, l.elementH = d;
1573
1434
  }
1574
1435
  n(l);
1575
1436
  },
@@ -1578,10 +1439,10 @@ const kt = {
1578
1439
  }
1579
1440
  ), t;
1580
1441
  }, qn = (e, t, n = {}) => {
1581
- const r = C(e);
1582
- _e(
1442
+ const r = L(e);
1443
+ He(
1583
1444
  () => {
1584
- const s = N(t);
1445
+ const s = D(t);
1585
1446
  if (!s)
1586
1447
  return;
1587
1448
  const o = new MutationObserver(r.current);
@@ -1593,12 +1454,12 @@ const kt = {
1593
1454
  t
1594
1455
  );
1595
1456
  };
1596
- function Ie() {
1457
+ function ze() {
1597
1458
  const e = navigator;
1598
1459
  return $e(e) ? e.connection || e.mozConnection || e.webkitConnection : null;
1599
1460
  }
1600
1461
  function Ae() {
1601
- const e = Ie();
1462
+ const e = ze();
1602
1463
  return e ? {
1603
1464
  rtt: e.rtt,
1604
1465
  type: e.type,
@@ -1608,13 +1469,13 @@ function Ae() {
1608
1469
  effectiveType: e.effectiveType
1609
1470
  } : {};
1610
1471
  }
1611
- function Un() {
1612
- const [e, t] = T(() => ({
1472
+ function Vn() {
1473
+ const [e, t] = b(() => ({
1613
1474
  since: void 0,
1614
1475
  online: navigator?.onLine,
1615
1476
  ...Ae()
1616
1477
  }));
1617
- return D(() => {
1478
+ return C(() => {
1618
1479
  const n = () => {
1619
1480
  t((a) => ({
1620
1481
  ...a,
@@ -1634,7 +1495,7 @@ function Un() {
1634
1495
  }));
1635
1496
  };
1636
1497
  window.addEventListener("online", n), window.addEventListener("offline", r);
1637
- const o = Ie();
1498
+ const o = ze();
1638
1499
  return o?.addEventListener("change", s), () => {
1639
1500
  window.removeEventListener("online", n), window.removeEventListener("offline", r), o?.removeEventListener(
1640
1501
  "change",
@@ -1643,47 +1504,47 @@ function Un() {
1643
1504
  };
1644
1505
  }, []), e;
1645
1506
  }
1646
- const $n = (e, t = {}) => {
1507
+ const Un = (e, t = {}) => {
1647
1508
  const { defaultPageSize: n = 10, defaultCurrent: r = 1, ...s } = t, o = ke(e, {
1648
1509
  defaultParams: [{ current: r, pageSize: n }],
1649
1510
  refreshDepsAction: () => {
1650
1511
  u(1);
1651
1512
  },
1652
1513
  ...s
1653
- }), { current: a = 1, pageSize: c = n } = o.params[0] || {}, d = o.data?.total || 0, i = _(
1654
- () => Math.ceil(d / c),
1655
- [c, d]
1656
- ), l = (v, y) => {
1657
- let m = v <= 0 ? 1 : v;
1658
- const L = y <= 0 ? 1 : y, A = Math.ceil(d / L);
1659
- m > A && (m = Math.max(1, A));
1660
- const [F = {}, ...p] = o.params || [];
1514
+ }), { current: a = 1, pageSize: c = n } = o.params[0] || {}, f = o.data?.total || 0, i = x(
1515
+ () => Math.ceil(f / c),
1516
+ [c, f]
1517
+ ), l = (h, p) => {
1518
+ let d = h <= 0 ? 1 : h;
1519
+ const T = p <= 0 ? 1 : p, A = Math.ceil(f / T);
1520
+ d > A && (d = Math.max(1, A));
1521
+ const [O = {}, ...g] = o.params || [];
1661
1522
  o.run(
1662
1523
  {
1663
- ...F,
1664
- current: m,
1665
- pageSize: L
1524
+ ...O,
1525
+ current: d,
1526
+ pageSize: T
1666
1527
  },
1667
- ...p
1528
+ ...g
1668
1529
  );
1669
- }, u = (v) => {
1670
- l(v, c);
1671
- }, g = (v) => {
1672
- l(a, v);
1530
+ }, u = (h) => {
1531
+ l(h, c);
1532
+ }, m = (h) => {
1533
+ l(a, h);
1673
1534
  };
1674
1535
  return {
1675
1536
  ...o,
1676
1537
  pagination: {
1677
1538
  current: a,
1678
1539
  pageSize: c,
1679
- total: d,
1540
+ total: f,
1680
1541
  totalPage: i,
1681
1542
  onChange: E(l),
1682
1543
  changeCurrent: E(u),
1683
- changePageSize: E(g)
1544
+ changePageSize: E(m)
1684
1545
  }
1685
1546
  };
1686
- }, _t = (e, t = 0) => {
1547
+ }, kt = (e, t = 0) => {
1687
1548
  if (typeof requestAnimationFrame > "u")
1688
1549
  return {
1689
1550
  id: setInterval(e, t)
@@ -1695,23 +1556,23 @@ const $n = (e, t = {}) => {
1695
1556
  Date.now() - n >= t && (e(), n = Date.now()), r.id = requestAnimationFrame(s);
1696
1557
  };
1697
1558
  return r.id = requestAnimationFrame(s), r;
1698
- }, Ht = (e) => typeof cancelAnimationFrame > "u", zt = (e) => {
1559
+ }, Ht = (e) => typeof cancelAnimationFrame > "u", _t = (e) => {
1699
1560
  if (Ht(e.id))
1700
1561
  return clearInterval(e.id);
1701
1562
  cancelAnimationFrame(e.id);
1702
1563
  };
1703
- function Wn(e, t, n) {
1704
- const r = n?.immediate, s = C(e), o = b(void 0), a = M(() => {
1705
- o.current && zt(o.current);
1564
+ function $n(e, t, n) {
1565
+ const r = n?.immediate, s = L(e), o = y(void 0), a = B(() => {
1566
+ o.current && _t(o.current);
1706
1567
  }, []);
1707
- return D(() => {
1708
- if (!(!H(t) || t < 0))
1709
- return r && s.current(), o.current = _t(() => {
1568
+ return C(() => {
1569
+ if (!(!F(t) || t < 0))
1570
+ return r && s.current(), o.current = kt(() => {
1710
1571
  s.current();
1711
1572
  }, t), a;
1712
1573
  }, [t]), a;
1713
1574
  }
1714
- const jt = (e, t = 0) => {
1575
+ const It = (e, t = 0) => {
1715
1576
  if (typeof requestAnimationFrame > "u")
1716
1577
  return {
1717
1578
  id: setTimeout(e, t)
@@ -1722,24 +1583,24 @@ const jt = (e, t = 0) => {
1722
1583
  Date.now() - r >= t ? e() : n.id = requestAnimationFrame(s);
1723
1584
  };
1724
1585
  return n.id = requestAnimationFrame(s), n;
1725
- }, It = (e) => typeof cancelAnimationFrame > "u", Yt = (e) => {
1726
- if (It(e.id))
1586
+ }, Yt = (e) => typeof cancelAnimationFrame > "u", zt = (e) => {
1587
+ if (Yt(e.id))
1727
1588
  return clearTimeout(e.id);
1728
1589
  cancelAnimationFrame(e.id);
1729
1590
  };
1730
- function Gn(e, t) {
1731
- const n = C(e), r = b(void 0), s = M(() => {
1732
- r.current && Yt(r.current);
1591
+ function Wn(e, t) {
1592
+ const n = L(e), r = y(void 0), s = B(() => {
1593
+ r.current && zt(r.current);
1733
1594
  }, []);
1734
- return D(() => {
1735
- if (!(!H(t) || t < 0))
1736
- return r.current = jt(() => {
1595
+ return C(() => {
1596
+ if (!(!F(t) || t < 0))
1597
+ return r.current = It(() => {
1737
1598
  n.current();
1738
1599
  }, t), s;
1739
1600
  }, [t]), s;
1740
1601
  }
1741
1602
  const Pe = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap();
1742
- function Ye(e, t) {
1603
+ function Xe(e, t) {
1743
1604
  const n = Pe.get(e);
1744
1605
  if (n)
1745
1606
  return n;
@@ -1747,8 +1608,8 @@ function Ye(e, t) {
1747
1608
  return e;
1748
1609
  const r = new Proxy(e, {
1749
1610
  get(s, o, a) {
1750
- const c = Reflect.get(s, o, a), d = Reflect.getOwnPropertyDescriptor(s, o);
1751
- return !d?.configurable && !d?.writable ? c : de(c) || Array.isArray(c) ? Ye(c, t) : c;
1611
+ const c = Reflect.get(s, o, a), f = Reflect.getOwnPropertyDescriptor(s, o);
1612
+ return !f?.configurable && !f?.writable ? c : de(c) || Array.isArray(c) ? Xe(c, t) : c;
1752
1613
  },
1753
1614
  set(s, o, a) {
1754
1615
  const c = Reflect.set(s, o, a);
@@ -1761,21 +1622,21 @@ function Ye(e, t) {
1761
1622
  });
1762
1623
  return Pe.set(e, r), Ce.set(r, e), r;
1763
1624
  }
1764
- function Kn(e) {
1765
- const t = re(), n = b(e);
1766
- return se(() => Ye(n.current, () => {
1625
+ function Gn(e) {
1626
+ const t = ne(), n = y(e);
1627
+ return se(() => Xe(n.current, () => {
1767
1628
  t();
1768
1629
  }), []);
1769
1630
  }
1770
- const Jn = (e) => {
1771
- const t = b(e), n = se(
1772
- () => z(t.current) ? t.current() : t.current,
1631
+ const Kn = (e) => {
1632
+ const t = y(e), n = se(
1633
+ () => k(t.current) ? t.current() : t.current,
1773
1634
  []
1774
- ), [r, s] = T(n), o = E(() => {
1635
+ ), [r, s] = b(n), o = E(() => {
1775
1636
  s(n);
1776
1637
  });
1777
1638
  return [r, s, o];
1778
- }, te = /* @__PURE__ */ new Set();
1639
+ }, ee = /* @__PURE__ */ new Set();
1779
1640
  let U, ge = {
1780
1641
  xs: 0,
1781
1642
  sm: 576,
@@ -1786,10 +1647,10 @@ let U, ge = {
1786
1647
  function le() {
1787
1648
  const e = U;
1788
1649
  if (ve(), e !== U)
1789
- for (const t of te)
1650
+ for (const t of ee)
1790
1651
  t();
1791
1652
  }
1792
- let Z = !1;
1653
+ let Q = !1;
1793
1654
  function ve() {
1794
1655
  const e = window.innerWidth, t = {};
1795
1656
  let n = !1;
@@ -1797,41 +1658,41 @@ function ve() {
1797
1658
  t[r] = e >= ge[r], t[r] !== U[r] && (n = !0);
1798
1659
  n && (U = t);
1799
1660
  }
1800
- function Qn(e) {
1661
+ function Jn(e) {
1801
1662
  ge = e, U && ve();
1802
1663
  }
1803
- function Zn() {
1804
- V && !Z && (U = {}, ve(), window.addEventListener("resize", le), Z = !0);
1805
- const [e, t] = T(U);
1806
- return D(() => {
1807
- if (!V)
1664
+ function Qn() {
1665
+ q && !Q && (U = {}, ve(), window.addEventListener("resize", le), Q = !0);
1666
+ const [e, t] = b(U);
1667
+ return C(() => {
1668
+ if (!q)
1808
1669
  return;
1809
- Z || window.addEventListener("resize", le);
1670
+ Q || window.addEventListener("resize", le);
1810
1671
  const n = () => {
1811
1672
  t(U);
1812
1673
  };
1813
- return te.add(n), () => {
1814
- te.delete(n), te.size === 0 && (window.removeEventListener("resize", le), Z = !1);
1674
+ return ee.add(n), () => {
1675
+ ee.delete(n), ee.size === 0 && (window.removeEventListener("resize", le), Q = !1);
1815
1676
  };
1816
1677
  }, []), e;
1817
1678
  }
1818
1679
  const Xt = () => {
1819
- const e = b(!1);
1820
- return D(() => (e.current = !1, () => {
1680
+ const e = y(!1);
1681
+ return C(() => (e.current = !1, () => {
1821
1682
  e.current = !0;
1822
1683
  }), []), e;
1823
1684
  };
1824
- function er(e) {
1825
- const t = Xt(), [n, r] = T(e), s = M((o) => {
1685
+ function Zn(e) {
1686
+ const t = Xt(), [n, r] = b(e), s = B((o) => {
1826
1687
  t.current || r(o);
1827
1688
  }, []);
1828
1689
  return [n, s];
1829
1690
  }
1830
- function tr(e, t = () => !0) {
1831
- const [n, r] = pe(), s = C(t);
1832
- return q(
1691
+ function er(e, t = () => !0) {
1692
+ const [n, r] = pe(), s = L(t);
1693
+ return V(
1833
1694
  () => {
1834
- const o = N(e, document);
1695
+ const o = D(e, document);
1835
1696
  if (!o)
1836
1697
  return;
1837
1698
  const a = () => {
@@ -1863,99 +1724,81 @@ function tr(e, t = () => !0) {
1863
1724
  e
1864
1725
  ), n;
1865
1726
  }
1866
- function nr(e, t) {
1727
+ function tr(e, t) {
1867
1728
  let n = [], r;
1868
1729
  Array.isArray(t) ? n = t : de(t) && (n = t?.defaultSelected ?? n, r = t?.itemKey ?? r);
1869
- const s = (p) => z(r) ? r(p) : ne(r) && de(p) ? p[r] : p, [o, a] = T(n), c = _(() => {
1870
- const p = /* @__PURE__ */ new Map();
1871
- return Array.isArray(o) && o.forEach((f) => {
1872
- p.set(s(f), f);
1873
- }), p;
1874
- }, [o]), d = (p) => c.has(s(p)), i = (p) => {
1875
- c.set(s(p), p), a(Array.from(c.values()));
1876
- }, l = (p) => {
1877
- c.delete(s(p)), a(Array.from(c.values()));
1878
- }, u = (p) => {
1879
- d(p) ? l(p) : i(p);
1880
- }, g = () => {
1881
- e.forEach((p) => {
1882
- c.set(s(p), p);
1730
+ const s = (g) => k(r) ? r(g) : te(r) && de(g) ? g[r] : g, [o, a] = b(n), c = x(() => {
1731
+ const g = /* @__PURE__ */ new Map();
1732
+ return Array.isArray(o) && o.forEach((v) => {
1733
+ g.set(s(v), v);
1734
+ }), g;
1735
+ }, [o]), f = (g) => c.has(s(g)), i = (g) => {
1736
+ c.set(s(g), g), a(Array.from(c.values()));
1737
+ }, l = (g) => {
1738
+ c.delete(s(g)), a(Array.from(c.values()));
1739
+ }, u = (g) => {
1740
+ f(g) ? l(g) : i(g);
1741
+ }, m = () => {
1742
+ e.forEach((g) => {
1743
+ c.set(s(g), g);
1883
1744
  }), a(Array.from(c.values()));
1884
- }, v = () => {
1885
- e.forEach((p) => {
1886
- c.delete(s(p));
1745
+ }, h = () => {
1746
+ e.forEach((g) => {
1747
+ c.delete(s(g));
1887
1748
  }), a(Array.from(c.values()));
1888
- }, y = _(
1889
- () => e.every((p) => !c.has(s(p))),
1749
+ }, p = x(
1750
+ () => e.every((g) => !c.has(s(g))),
1890
1751
  [e, c]
1891
- ), m = _(
1892
- () => e.every((p) => c.has(s(p))) && !y,
1893
- [e, c, y]
1894
- ), L = _(
1895
- () => !y && !m,
1896
- [y, m]
1897
- ), A = () => m ? v() : g(), F = () => {
1752
+ ), d = x(
1753
+ () => e.every((g) => c.has(s(g))) && !p,
1754
+ [e, c, p]
1755
+ ), T = x(
1756
+ () => !p && !d,
1757
+ [p, d]
1758
+ ), A = () => d ? h() : m(), O = () => {
1898
1759
  c.clear(), a([]);
1899
1760
  };
1900
1761
  return {
1901
1762
  selected: o,
1902
- noneSelected: y,
1903
- allSelected: m,
1904
- partiallySelected: L,
1763
+ noneSelected: p,
1764
+ allSelected: d,
1765
+ partiallySelected: T,
1905
1766
  setSelected: a,
1906
- isSelected: d,
1767
+ isSelected: f,
1907
1768
  select: E(i),
1908
1769
  unSelect: E(l),
1909
1770
  toggle: E(u),
1910
- selectAll: E(g),
1911
- unSelectAll: E(v),
1912
- clearAll: E(F),
1771
+ selectAll: E(m),
1772
+ unSelectAll: E(h),
1773
+ clearAll: E(O),
1913
1774
  toggleAll: E(A)
1914
1775
  };
1915
1776
  }
1916
- const rr = je(
1917
- () => V ? sessionStorage : void 0
1918
- );
1919
- function sr(e) {
1920
- const t = () => new Set(e), [n, r] = T(t), s = (d) => {
1921
- r((i) => d(new Set(i)));
1922
- }, o = (d) => {
1923
- n.has(d) || s((i) => (i.add(d), i));
1924
- }, a = (d) => {
1925
- n.has(d) && s((i) => (i.delete(d), i));
1926
- }, c = () => r(t());
1927
- return [
1928
- n,
1929
- {
1930
- add: E(o),
1931
- remove: E(a),
1932
- reset: E(c)
1933
- }
1934
- ];
1935
- }
1936
- const or = (e) => {
1937
- const [t, n] = T(e), r = E((s) => {
1777
+ const nr = Ye(
1778
+ () => q ? sessionStorage : void 0
1779
+ ), rr = (e) => {
1780
+ const [t, n] = b(e), r = E((s) => {
1938
1781
  n((o) => {
1939
- const a = z(s) ? s(o) : s;
1782
+ const a = k(s) ? s(o) : s;
1940
1783
  return a ? { ...o, ...a } : o;
1941
1784
  });
1942
1785
  });
1943
1786
  return [t, r];
1944
- }, Bt = Ze(he), Vt = V ? Bt : q;
1787
+ }, jt = Qe(he), Bt = q ? jt : V;
1945
1788
  function qt(e) {
1946
1789
  const [t, n] = pe(() => {
1947
- const r = N(e);
1790
+ const r = D(e);
1948
1791
  return r ? { width: r.clientWidth, height: r.clientHeight } : void 0;
1949
1792
  });
1950
- return Vt(
1793
+ return Bt(
1951
1794
  () => {
1952
- const r = N(e);
1795
+ const r = D(e);
1953
1796
  if (!r)
1954
1797
  return;
1955
1798
  const s = new ResizeObserver((o) => {
1956
1799
  o.forEach((a) => {
1957
- const { clientWidth: c, clientHeight: d } = a.target;
1958
- n({ width: c, height: d });
1800
+ const { clientWidth: c, clientHeight: f } = a.target;
1801
+ n({ width: c, height: f });
1959
1802
  });
1960
1803
  });
1961
1804
  return s.observe(r), () => {
@@ -1966,9 +1809,9 @@ function qt(e) {
1966
1809
  e
1967
1810
  ), t;
1968
1811
  }
1969
- const Ut = () => {
1970
- const e = V ? window.matchMedia("(prefers-color-scheme: dark)") : void 0, [t, n] = T(() => V && e?.matches ? "dark" : "light");
1971
- return D(() => {
1812
+ const Vt = () => {
1813
+ const e = q ? window.matchMedia("(prefers-color-scheme: dark)") : void 0, [t, n] = b(() => q && e?.matches ? "dark" : "light");
1814
+ return C(() => {
1972
1815
  const r = (s) => {
1973
1816
  s.matches ? n(
1974
1817
  "dark"
@@ -1983,21 +1826,21 @@ const Ut = () => {
1983
1826
  };
1984
1827
  }, []), t;
1985
1828
  };
1986
- function cr(e = {}) {
1987
- const { localStorageKey: t } = e, [n, r] = T(() => t?.length && localStorage.getItem(t) || "system"), s = (c) => {
1829
+ function sr(e = {}) {
1830
+ const { localStorageKey: t } = e, [n, r] = b(() => t?.length && localStorage.getItem(t) || "system"), s = (c) => {
1988
1831
  r(c), t?.length && localStorage.setItem(t, c);
1989
- }, o = Ut();
1832
+ }, o = Vt();
1990
1833
  return {
1991
1834
  theme: n === "system" ? o : n,
1992
1835
  themeMode: n,
1993
1836
  setThemeMode: E(s)
1994
1837
  };
1995
1838
  }
1996
- function Xe(e, t) {
1997
- Q && (z(e) || console.error(
1839
+ function je(e, t) {
1840
+ re && (k(e) || console.error(
1998
1841
  `useThrottleFn expected parameter is a function, got ${typeof e}`
1999
1842
  ));
2000
- const n = C(e), r = t?.wait ?? 1e3, s = _(
1843
+ const n = L(e), r = t?.wait ?? 1e3, s = x(
2001
1844
  () => Me(
2002
1845
  (...o) => n.current(...o),
2003
1846
  r,
@@ -2013,75 +1856,75 @@ function Xe(e, t) {
2013
1856
  flush: s.flush
2014
1857
  };
2015
1858
  }
2016
- function ar(e, t) {
2017
- const [n, r] = T(e), { run: s } = Xe(() => {
1859
+ function or(e, t) {
1860
+ const [n, r] = b(e), { run: s } = je(() => {
2018
1861
  r(e);
2019
1862
  }, t);
2020
- return D(() => {
1863
+ return C(() => {
2021
1864
  s();
2022
1865
  }, [e]), n;
2023
1866
  }
2024
- function ur(e, t, n) {
2025
- const [r, s] = T({}), { run: o } = Xe(() => {
1867
+ function cr(e, t, n) {
1868
+ const [r, s] = b({}), { run: o } = je(() => {
2026
1869
  s({});
2027
1870
  }, n);
2028
- D(() => o(), t), K(e, [r]);
1871
+ C(() => o(), t), K(e, [r]);
2029
1872
  }
2030
- const ir = (e, t) => {
2031
- const n = E(e), r = b(null), s = M(() => {
1873
+ const ar = (e, t) => {
1874
+ const n = E(e), r = y(null), s = B(() => {
2032
1875
  r.current && clearTimeout(r.current);
2033
1876
  }, []);
2034
- return D(() => {
2035
- if (!(!H(t) || t < 0))
1877
+ return C(() => {
1878
+ if (!(!F(t) || t < 0))
2036
1879
  return r.current = setTimeout(n, t), s;
2037
1880
  }, [t]), s;
2038
- }, $t = {
1881
+ }, Ut = {
2039
1882
  restoreOnUnmount: !1
2040
1883
  };
2041
- function lr(e, t = $t) {
2042
- const n = b(V ? document.title : "");
2043
- D(() => {
1884
+ function ur(e, t = Ut) {
1885
+ const n = y(q ? document.title : "");
1886
+ C(() => {
2044
1887
  document.title = e;
2045
1888
  }, [e]), $(() => {
2046
1889
  t.restoreOnUnmount && (document.title = n.current);
2047
1890
  });
2048
1891
  }
2049
- const Wt = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filter((n) => n >= 0) : t ? t.map((n, r) => r) : [], fr = (e, t) => {
2050
- const n = b(void 0);
2051
- D(() => {
2052
- const r = Wt(n.current, t), s = n.current;
1892
+ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filter((n) => n >= 0) : t ? t.map((n, r) => r) : [], ir = (e, t) => {
1893
+ const n = y(void 0);
1894
+ C(() => {
1895
+ const r = $t(n.current, t), s = n.current;
2053
1896
  return n.current = t, e(r, s, t);
2054
1897
  }, t);
2055
- }, dr = tt(he), fe = rt, Gt = {
1898
+ }, lr = et(he), fe = nt, Wt = {
2056
1899
  parseNumbers: !1,
2057
1900
  parseBooleans: !1
2058
- }, Kt = {
1901
+ }, Gt = {
2059
1902
  skipNull: !1,
2060
1903
  skipEmptyString: !1
2061
- }, mr = (e, t) => {
1904
+ }, fr = (e, t) => {
2062
1905
  const {
2063
1906
  navigateMode: n = "push",
2064
1907
  parseOptions: r,
2065
1908
  stringifyOptions: s
2066
- } = t || {}, o = { ...Gt, ...r }, a = {
2067
- ...Kt,
1909
+ } = t || {}, o = { ...Wt, ...r }, a = {
1910
+ ...Gt,
2068
1911
  ...s
2069
- }, c = fe.useLocation(), d = fe.useHistory?.(), i = fe.useNavigate?.(), l = re(), u = b(
1912
+ }, c = fe.useLocation(), f = fe.useHistory?.(), i = fe.useNavigate?.(), l = ne(), u = y(
2070
1913
  typeof e == "function" ? e() : e || {}
2071
- ), g = _(() => ae.parse(c.search, o), [c.search]), v = _(
1914
+ ), m = x(() => ae.parse(c.search, o), [c.search]), h = x(
2072
1915
  () => ({
2073
1916
  ...u.current,
2074
- ...g
1917
+ ...m
2075
1918
  }),
2076
- [g]
1919
+ [m]
2077
1920
  );
2078
- return [v, E((m) => {
2079
- const L = typeof m == "function" ? m(v) : m;
2080
- l(), d && d[n](
1921
+ return [h, E((d) => {
1922
+ const T = typeof d == "function" ? d(h) : d;
1923
+ l(), f && f[n](
2081
1924
  {
2082
1925
  hash: c.hash,
2083
1926
  search: ae.stringify(
2084
- { ...g, ...L },
1927
+ { ...m, ...T },
2085
1928
  a
2086
1929
  ) || "?"
2087
1930
  },
@@ -2090,7 +1933,7 @@ const Wt = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
2090
1933
  {
2091
1934
  hash: c.hash,
2092
1935
  search: ae.stringify(
2093
- { ...g, ...L },
1936
+ { ...m, ...T },
2094
1937
  a
2095
1938
  ) || "?"
2096
1939
  },
@@ -2100,77 +1943,77 @@ const Wt = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
2100
1943
  }
2101
1944
  );
2102
1945
  })];
2103
- }, gr = (e, t) => {
2104
- const { containerTarget: n, wrapperTarget: r, itemHeight: s, overscan: o = 5 } = t, a = C(s), c = qt(n), d = b(!1), [i, l] = T(
1946
+ }, dr = (e, t) => {
1947
+ const { containerTarget: n, wrapperTarget: r, itemHeight: s, overscan: o = 5 } = t, a = L(s), c = qt(n), f = y(!1), [i, l] = b(
2105
1948
  []
2106
- ), [u, g] = T({}), v = (p, f) => {
2107
- if (H(a.current))
2108
- return Math.ceil(p / a.current);
2109
- let h = 0, S = 0;
2110
- for (let R = f; R < e.length; R++) {
2111
- const k = a.current(R, e[R]);
2112
- if (h += k, S = R, h >= p)
1949
+ ), [u, m] = b({}), h = (g, v) => {
1950
+ if (F(a.current))
1951
+ return Math.ceil(g / a.current);
1952
+ let S = 0, R = 0;
1953
+ for (let N = v; N < e.length; N++) {
1954
+ const I = a.current(N, e[N]);
1955
+ if (S += I, R = N, S >= g)
2113
1956
  break;
2114
1957
  }
2115
- return S - f;
2116
- }, y = (p) => {
2117
- if (H(a.current))
2118
- return Math.floor(p / a.current);
2119
- let f = 0, h = 0;
2120
- for (let S = 0; S < e.length; S++) {
2121
- const R = a.current(S, e[S]);
2122
- if (f += R, f >= p) {
2123
- h = S;
1958
+ return R - v;
1959
+ }, p = (g) => {
1960
+ if (F(a.current))
1961
+ return Math.floor(g / a.current);
1962
+ let v = 0, S = 0;
1963
+ for (let R = 0; R < e.length; R++) {
1964
+ const N = a.current(R, e[R]);
1965
+ if (v += N, v >= g) {
1966
+ S = R;
2124
1967
  break;
2125
1968
  }
2126
1969
  }
2127
- return h + 1;
2128
- }, m = (p) => H(a.current) ? p * a.current : e.slice(0, p).reduce(
2129
- (h, S, R) => h + a.current(R, e[R]),
1970
+ return S + 1;
1971
+ }, d = (g) => F(a.current) ? g * a.current : e.slice(0, g).reduce(
1972
+ (S, R, N) => S + a.current(N, e[N]),
2130
1973
  0
2131
- ), L = _(() => H(a.current) ? e.length * a.current : e.reduce(
2132
- (p, f, h) => p + a.current(h, e[h]),
1974
+ ), T = x(() => F(a.current) ? e.length * a.current : e.reduce(
1975
+ (g, v, S) => g + a.current(S, e[S]),
2133
1976
  0
2134
1977
  ), [e]), A = () => {
2135
- const p = N(n);
2136
- if (p) {
2137
- const { scrollTop: f, clientHeight: h } = p, S = y(f), R = v(h, S), k = Math.max(0, S - o), w = Math.min(e.length, S + R + o), x = m(k);
2138
- g({
2139
- height: L - x + "px",
2140
- marginTop: x + "px"
1978
+ const g = D(n);
1979
+ if (g) {
1980
+ const { scrollTop: v, clientHeight: S } = g, R = p(v), N = h(S, R), I = Math.max(0, R - o), w = Math.min(e.length, R + N + o), Y = d(I);
1981
+ m({
1982
+ height: T - Y + "px",
1983
+ marginTop: Y + "px"
2141
1984
  }), l(
2142
- e.slice(k, w).map((P, j) => ({
1985
+ e.slice(I, w).map((P, H) => ({
2143
1986
  data: P,
2144
- index: j + k
1987
+ index: H + I
2145
1988
  }))
2146
1989
  );
2147
1990
  }
2148
1991
  };
2149
1992
  return K(() => {
2150
- const p = N(r);
2151
- p && Object.keys(u).forEach(
2152
- (f) => p.style[f] = u[f]
1993
+ const g = D(r);
1994
+ g && Object.keys(u).forEach(
1995
+ (v) => g.style[v] = u[v]
2153
1996
  );
2154
- }, [u]), D(() => {
1997
+ }, [u]), C(() => {
2155
1998
  !c?.width || !c?.height || A();
2156
1999
  }, [c?.width, c?.height, e]), X(
2157
2000
  "scroll",
2158
- (p) => {
2159
- if (d.current) {
2160
- d.current = !1;
2001
+ (g) => {
2002
+ if (f.current) {
2003
+ f.current = !1;
2161
2004
  return;
2162
2005
  }
2163
- p.preventDefault(), A();
2006
+ g.preventDefault(), A();
2164
2007
  },
2165
2008
  {
2166
2009
  target: n
2167
2010
  }
2168
- ), [i, E((p) => {
2169
- const f = N(n);
2170
- f && (d.current = !0, f.scrollTop = m(p), A());
2011
+ ), [i, E((g) => {
2012
+ const v = D(n);
2013
+ v && (f.current = !0, v.scrollTop = d(g), A());
2171
2014
  })];
2172
2015
  };
2173
- function hr(e, t = {}) {
2016
+ function mr(e, t = {}) {
2174
2017
  const {
2175
2018
  reconnectLimit: n = 3,
2176
2019
  reconnectInterval: r = 3 * 1e3,
@@ -2178,65 +2021,65 @@ function hr(e, t = {}) {
2178
2021
  onOpen: o,
2179
2022
  onClose: a,
2180
2023
  onMessage: c,
2181
- onError: d,
2024
+ onError: f,
2182
2025
  protocols: i
2183
- } = t, [l, u] = T(), [g, v] = T(
2026
+ } = t, [l, u] = b(), [m, h] = b(
2184
2027
  3
2185
2028
  /* Closed */
2186
- ), y = C(o), m = C(a), L = C(c), A = C(d), F = C(g), p = b(0), f = b(void 0), h = b(void 0), S = () => {
2187
- p.current < n && h.current?.readyState !== 1 && (f.current && clearTimeout(f.current), f.current = setTimeout(() => {
2188
- R(), p.current++;
2029
+ ), p = L(o), d = L(a), T = L(c), A = L(f), O = L(m), g = y(0), v = y(void 0), S = y(void 0), R = () => {
2030
+ g.current < n && S.current?.readyState !== 1 && (v.current && clearTimeout(v.current), v.current = setTimeout(() => {
2031
+ N(), g.current++;
2189
2032
  }, r));
2190
- }, R = () => {
2191
- f.current && clearTimeout(f.current), h.current && h.current.close();
2033
+ }, N = () => {
2034
+ v.current && clearTimeout(v.current), S.current && S.current.close();
2192
2035
  const P = new WebSocket(e, i);
2193
- v(
2036
+ h(
2194
2037
  0
2195
2038
  /* Connecting */
2196
- ), P.onerror = (j) => {
2197
- h.current === P && (S(), A.current?.(j, P), v(
2039
+ ), P.onerror = (H) => {
2040
+ S.current === P && (R(), A.current?.(H, P), h(
2198
2041
  P.readyState || 3
2199
2042
  /* Closed */
2200
2043
  ));
2201
- }, P.onopen = (j) => {
2202
- h.current === P && (y.current?.(j, P), p.current = 0, v(
2044
+ }, P.onopen = (H) => {
2045
+ S.current === P && (p.current?.(H, P), g.current = 0, h(
2203
2046
  P.readyState || 1
2204
2047
  /* Open */
2205
2048
  ));
2206
- }, P.onmessage = (j) => {
2207
- h.current === P && (L.current?.(j, P), u(j));
2208
- }, P.onclose = (j) => {
2209
- m.current?.(j, P), h.current === P && S(), (!h.current || h.current === P) && v(
2049
+ }, P.onmessage = (H) => {
2050
+ S.current === P && (T.current?.(H, P), u(H));
2051
+ }, P.onclose = (H) => {
2052
+ d.current?.(H, P), S.current === P && R(), (!S.current || S.current === P) && h(
2210
2053
  P.readyState || 3
2211
2054
  /* Closed */
2212
2055
  );
2213
- }, h.current = P;
2214
- }, k = (P) => {
2215
- if (F.current === 1)
2216
- h.current?.send(P);
2056
+ }, S.current = P;
2057
+ }, I = (P) => {
2058
+ if (O.current === 1)
2059
+ S.current?.send(P);
2217
2060
  else
2218
2061
  throw new Error("WebSocket disconnected");
2219
2062
  }, w = () => {
2220
- p.current = 0, R();
2221
- }, x = () => {
2222
- f.current && clearTimeout(f.current), p.current = n, h.current?.close(), h.current = void 0;
2063
+ g.current = 0, N();
2064
+ }, Y = () => {
2065
+ v.current && clearTimeout(v.current), g.current = n, S.current?.close(), S.current = void 0;
2223
2066
  };
2224
- return D(() => {
2067
+ return C(() => {
2225
2068
  !s && e && w();
2226
2069
  }, [e, s]), $(() => {
2227
- x();
2070
+ Y();
2228
2071
  }), {
2229
2072
  latestMessage: l,
2230
- sendMessage: E(k),
2073
+ sendMessage: E(I),
2231
2074
  connect: E(w),
2232
- disconnect: E(x),
2233
- readyState: g,
2234
- webSocketIns: h.current
2075
+ disconnect: E(Y),
2076
+ readyState: m,
2077
+ webSocketIns: S.current
2235
2078
  };
2236
2079
  }
2237
- function pr(e, t) {
2238
- const n = b({});
2239
- D(() => {
2080
+ function gr(e, t) {
2081
+ const n = y({});
2082
+ C(() => {
2240
2083
  if (n.current) {
2241
2084
  const r = Object.keys({ ...n.current, ...t }), s = {};
2242
2085
  r.forEach((o) => {
@@ -2250,72 +2093,68 @@ function pr(e, t) {
2250
2093
  });
2251
2094
  }
2252
2095
  export {
2253
- qt as $,
2254
- xn as A,
2255
- kn as B,
2256
- zn as C,
2257
- _n as D,
2258
- jn as E,
2259
- In as F,
2260
- Yn as G,
2261
- Xn as H,
2262
- Bn as I,
2263
- xe as J,
2264
- Vn as K,
2265
- qn as L,
2266
- Un as M,
2267
- $n as N,
2268
- Wn as O,
2269
- pe as P,
2270
- Gn as Q,
2271
- Kn as R,
2272
- ke as S,
2273
- Jn as T,
2274
- Zn as U,
2275
- er as V,
2276
- tr as W,
2277
- nr as X,
2278
- rr as Y,
2279
- sr as Z,
2280
- or as _,
2281
- Qn as a,
2282
- cr as a0,
2283
- ar as a1,
2284
- ur as a2,
2285
- Xe as a3,
2286
- ir as a4,
2096
+ je as $,
2097
+ In as A,
2098
+ Hn as B,
2099
+ Yn as C,
2100
+ zn as D,
2101
+ Xn as E,
2102
+ jn as F,
2103
+ Fe as G,
2104
+ Bn as H,
2105
+ qn as I,
2106
+ Vn as J,
2107
+ Un as K,
2108
+ $n as L,
2109
+ pe as M,
2110
+ Wn as N,
2111
+ Gn as O,
2112
+ ke as P,
2113
+ Kn as Q,
2114
+ Qn as R,
2115
+ Zn as S,
2116
+ er as T,
2117
+ tr as U,
2118
+ nr as V,
2119
+ rr as W,
2120
+ qt as X,
2121
+ sr as Y,
2122
+ or as Z,
2123
+ cr as _,
2124
+ Jn as a,
2125
+ ar as a0,
2126
+ ur as a1,
2127
+ st as a2,
2128
+ ir as a3,
2129
+ Xt as a4,
2287
2130
  lr as a5,
2288
- ot as a6,
2289
- fr as a7,
2290
- Xt as a8,
2291
- dr as a9,
2292
- mr as aa,
2293
- gr as ab,
2294
- hr as ac,
2295
- pr as ad,
2296
- ct as b,
2297
- Hn as c,
2298
- hn as d,
2299
- pn as e,
2300
- vn as f,
2301
- yn as g,
2302
- En as h,
2303
- se as i,
2304
- Sn as j,
2305
- wn as k,
2306
- Ne as l,
2307
- bn as m,
2308
- Rn as n,
2309
- Tn as o,
2310
- Ln as p,
2311
- An as q,
2312
- Pn as r,
2313
- X as s,
2314
- Cn as t,
2315
- gn as u,
2316
- Dn as v,
2317
- Mn as w,
2318
- Nn as x,
2319
- On as y,
2320
- Fn as z
2131
+ fr as a6,
2132
+ dr as a7,
2133
+ mr as a8,
2134
+ gr as a9,
2135
+ ot as b,
2136
+ _n as c,
2137
+ pn as d,
2138
+ vn as e,
2139
+ yn as f,
2140
+ En as g,
2141
+ Sn as h,
2142
+ wn as i,
2143
+ bn as j,
2144
+ Ne as k,
2145
+ Rn as l,
2146
+ Tn as m,
2147
+ Ln as n,
2148
+ An as o,
2149
+ Pn as p,
2150
+ X as q,
2151
+ Cn as r,
2152
+ Dn as s,
2153
+ Mn as t,
2154
+ hn as u,
2155
+ Nn as v,
2156
+ On as w,
2157
+ xn as x,
2158
+ Fn as y,
2159
+ kn as z
2321
2160
  };