@unicom-cloud/ui 0.8.111 → 0.8.112
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.
- package/Affix.js +3 -3
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +2 -2
- package/Countdown.js +17 -17
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +19 -19
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +18 -18
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +19 -19
- package/List.js +1 -1
- package/Loading.js +18 -18
- package/Marquee.js +19 -19
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +18 -18
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +18 -18
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +2 -2
- package/Segmented.js +20 -20
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +18 -18
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +19 -19
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +2 -2
- package/affix/index.js +3 -3
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{Y_GQsZUt.js → 0BhDjhcd.js} +1 -1
- package/chunk/{BDMqvmVH.js → BCmfDFV4.js} +28 -30
- package/chunk/{n1tirBXA.js → BfVlSL8A.js} +3 -3
- package/chunk/BiZSULcr.js +1872 -0
- package/chunk/{BcEZk8pT.js → C1vY8016.js} +14 -14
- package/chunk/{qsVvkBLU.js → C3kH2ES3.js} +1 -1
- package/chunk/{BGJspFG9.js → C5CbL5ku.js} +1 -1
- package/chunk/CAA93JLq.js +6 -0
- package/chunk/{B8W1N4er.js → CHQ8c547.js} +11 -10
- package/chunk/{Dbw0YUY1.js → CYssV-zz.js} +36 -36
- package/chunk/CrOzsnI0.js +51 -0
- package/chunk/{CFyN9Eio.js → CtCFA4ht.js} +4 -4
- package/chunk/{BnUWOu3_.js → Cx92e1S8.js} +3 -3
- package/chunk/{BeHcDey_.js → CylbdYce.js} +1 -1
- package/chunk/{BUNoUPLs.js → DMv8Hn4u.js} +1 -1
- package/chunk/{BlflTd2i.js → DfUcAhyT.js} +433 -470
- package/chunk/{DSqW_efI.js → DfbO4QTS.js} +152 -156
- package/chunk/{CgN4U7Ou.js → DhAvt6tJ.js} +2 -2
- package/chunk/DsuIQH0F.js +200 -0
- package/chunk/{Lyh0cz3R.js → KPBMJlOB.js} +1 -1
- package/chunk/{B_c0gPsX.js → vP3qfmKM.js} +24 -23
- package/collapse/Collapse.js +1 -1
- package/collapse/Item.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +2 -2
- package/countdown/index.js +17 -17
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +19 -19
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +18 -18
- package/form/Form.js +2 -2
- package/form/FormItem.js +1 -1
- package/form/index.js +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +80 -80
- package/hooks/useId.js +1 -1
- package/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/hooks/useResizeObserver.js +58 -2
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +22 -22
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +347 -348
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +2 -2
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +2 -2
- package/input-number/index.js +1 -1
- package/input-number/useSelectionRange.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +24 -24
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +18 -18
- package/marquee/index.js +22 -22
- package/marquee-/index.js +22 -22
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +18 -18
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +2 -2
- package/overflow-ellipsis/index.js +2 -2
- package/package.json +1 -1
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +18 -18
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +2 -2
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/core.js +1 -1
- package/rich-text/index.js +14 -14
- package/rich-text/rich.js +406 -936
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +71 -74
- package/row-col/Row.js +1 -1
- package/segmented/index.js +23 -23
- package/select/Option.js +1 -1
- package/select/Select.js +4 -4
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +1 -1
- package/space/index.js +18 -18
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +3 -3
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +61 -11
- package/table/index.js +4 -4
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +27 -27
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/index.js +2 -2
- package/types/common/hooks/src/use-size/index.d.ts +1 -1
- package/types/common/hooks/src/use-theme/index.d.ts +2 -2
- package/types/common/hooks/src/utils/isBrowser.d.ts +1 -1
- package/types/common/hooks/useResizeObserver.d.ts +1 -5
- package/types/common/hooks/useWindowSize.d.ts +1 -1
- package/types/common/utils/emitter.d.ts +1 -0
- package/types/common/utils/index.d.ts +1 -1
- package/types/pc/index.d.ts +1 -1
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/rich-text/blots/scroll.d.ts +2 -8
- package/types/pc/rich-text/core/emitter.d.ts +2 -3
- package/types/pc/rich-text/core/rich.d.ts +11 -44
- package/types/pc/rich-text/core/selection.d.ts +1 -8
- package/types/pc/rich-text/core/theme.d.ts +3 -0
- package/types/pc/rich-text/parchment/blot/abstract/parent.d.ts +2 -4
- package/types/pc/rich-text/themes/base.d.ts +3 -0
- package/types/pc/rich-text/themes/{snow.d.ts → pqb.d.ts} +2 -2
- package/types/pc/rich-text/ui/tooltip.d.ts +2 -0
- package/types/pc/utils/emitter.d.ts +1 -0
- package/types/pc/utils/index.d.ts +1 -1
- package/typography/Base.js +2 -2
- package/typography/Ellipsis.js +3 -3
- package/typography/Operations.js +2 -2
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/emitter.js +5 -0
- package/utils/index.js +3 -3
- package/utils/resizeObserver.js +1 -1
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +2 -2
- package/watermark/Watermark.js +1 -1
- package/chunk/BDgzrqDN.js +0 -154
- package/chunk/COsRZOz1.js +0 -1813
- package/chunk/CylJZkp8.js +0 -6
- package/chunk/Di5KBCVQ.js +0 -4
- package/chunk/cW_5U6dL.js +0 -28
- package/types/common/utils/mitt.d.ts +0 -1
- package/types/pc/rich-text/themes/bubble.d.ts +0 -18
- package/types/pc/utils/mitt.d.ts +0 -1
- package/utils/mitt.js +0 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useEffect as C, useState as b, useMemo as x, useRef as
|
|
1
|
+
import { useEffect as C, useState as b, useMemo as x, useRef as E, useLayoutEffect as Pe, useCallback as q } from "react";
|
|
2
2
|
import "./DsaQZE4X.js";
|
|
3
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,
|
|
5
|
-
import { a as
|
|
4
|
+
import { g as D, u as L, d as U, b as W, i as We, s as Ge, e as Ke, f as Je } from "./DsuIQH0F.js";
|
|
5
|
+
import { a as y } from "./D1iEYgh3.js";
|
|
6
6
|
import { u as ne } from "./BJeTDXdz.js";
|
|
7
7
|
import ce from "@unicom-cloud/utils/js-cookie";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import Qe from "dayjs";
|
|
9
|
+
import Ce from "lodash/debounce";
|
|
10
10
|
import { i as re } from "./CdXR6dj7.js";
|
|
11
|
-
import { u as K, c as
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
11
|
+
import { u as K, c as Ze } from "./DfChiMIE.js";
|
|
12
|
+
import { isBrowser as V, isAppleDevice as et } from "@unicom-cloud/utils/constant/platform";
|
|
13
|
+
import X from "@unicom-cloud/utils/screenfull";
|
|
14
|
+
import { a as De, u as tt } from "./CrOzsnI0.js";
|
|
15
15
|
import { u as se } from "./BO_5qdS_.js";
|
|
16
16
|
import Me from "lodash/throttle";
|
|
17
17
|
import de from "lodash/isPlainObject";
|
|
@@ -20,7 +20,7 @@ import * as nt from "react-router";
|
|
|
20
20
|
function rt(e) {
|
|
21
21
|
return k(e[Symbol.asyncIterator]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function dn(e, t) {
|
|
24
24
|
C(() => {
|
|
25
25
|
const n = e();
|
|
26
26
|
let r = !1;
|
|
@@ -66,9 +66,9 @@ const ct = (e) => e.every((t) => {
|
|
|
66
66
|
const t = Array.isArray(e) ? e : [e];
|
|
67
67
|
return ct(t) ? at(D(t[0])) : document;
|
|
68
68
|
};
|
|
69
|
-
function
|
|
69
|
+
function mn(e, t, n = "click") {
|
|
70
70
|
const r = L(e);
|
|
71
|
-
|
|
71
|
+
U(
|
|
72
72
|
() => {
|
|
73
73
|
const s = (c) => {
|
|
74
74
|
(Array.isArray(t) ? t : [t]).some((i) => {
|
|
@@ -88,32 +88,32 @@ function pn(e, t, n = "click") {
|
|
|
88
88
|
t
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function gn(e, t = {}) {
|
|
92
92
|
const n = e ?? {}, {
|
|
93
93
|
defaultValue: r,
|
|
94
94
|
defaultValuePropName: s = "defaultValue",
|
|
95
95
|
valuePropName: o = "value",
|
|
96
96
|
trigger: a = "onChange"
|
|
97
|
-
} = t, c = n[o],
|
|
97
|
+
} = t, c = n[o], d = Object.prototype.hasOwnProperty.call(
|
|
98
98
|
n,
|
|
99
99
|
o
|
|
100
|
-
), i = x(() =>
|
|
101
|
-
|
|
100
|
+
), i = x(() => d ? c : Object.prototype.hasOwnProperty.call(n, s) ? n[s] : r, []), l = E(i);
|
|
101
|
+
d && (l.current = c);
|
|
102
102
|
const u = ne();
|
|
103
103
|
function m(h, ...p) {
|
|
104
|
-
const
|
|
105
|
-
|
|
104
|
+
const f = k(h) ? h(l.current) : h;
|
|
105
|
+
d || (l.current = f, u()), n[a] && n[a](f, ...p);
|
|
106
106
|
}
|
|
107
|
-
return [l.current,
|
|
107
|
+
return [l.current, y(m)];
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function hn(e, t = {}) {
|
|
110
110
|
const [n, r] = b(() => {
|
|
111
111
|
const o = ce.get(e);
|
|
112
112
|
return te(o) ? o : k(t.defaultValue) ? t.defaultValue() : t.defaultValue;
|
|
113
|
-
}), s =
|
|
113
|
+
}), s = y(
|
|
114
114
|
(o, a = {}) => {
|
|
115
|
-
const { defaultValue: c, ...
|
|
116
|
-
r(i), i === void 0 ? ce.remove(e) : ce.set(e, i,
|
|
115
|
+
const { defaultValue: c, ...d } = { ...t, ...a }, i = k(o) ? o(n) : o;
|
|
116
|
+
r(i), i === void 0 ? ce.remove(e) : ce.set(e, i, d);
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
return [n, s];
|
|
@@ -121,7 +121,7 @@ function yn(e, t = {}) {
|
|
|
121
121
|
const ue = (e) => {
|
|
122
122
|
if (!e)
|
|
123
123
|
return 0;
|
|
124
|
-
const t =
|
|
124
|
+
const t = Qe(e).valueOf() - Date.now();
|
|
125
125
|
return t < 0 ? 0 : t;
|
|
126
126
|
}, it = (e) => ({
|
|
127
127
|
days: Math.floor(e / 864e5),
|
|
@@ -129,43 +129,43 @@ const ue = (e) => {
|
|
|
129
129
|
minutes: Math.floor(e / 6e4) % 60,
|
|
130
130
|
seconds: Math.floor(e / 1e3) % 60,
|
|
131
131
|
milliseconds: Math.floor(e) % 1e3
|
|
132
|
-
}),
|
|
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,
|
|
132
|
+
}), pn = (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, d] = b(() => ue(a)), i = L(s);
|
|
134
134
|
C(() => {
|
|
135
135
|
if (!a) {
|
|
136
|
-
|
|
136
|
+
d(0);
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
d(ue(a));
|
|
140
140
|
const u = setInterval(() => {
|
|
141
141
|
const m = ue(a);
|
|
142
|
-
|
|
142
|
+
d(m), m === 0 && (clearInterval(u), i.current?.());
|
|
143
143
|
}, r);
|
|
144
144
|
return () => clearInterval(u);
|
|
145
145
|
}, [a, r]);
|
|
146
146
|
const l = x(() => it(c), [c]);
|
|
147
147
|
return [c, l];
|
|
148
148
|
};
|
|
149
|
-
function
|
|
149
|
+
function ye(e, t = {}) {
|
|
150
150
|
const { min: n, max: r } = t;
|
|
151
151
|
let s = e;
|
|
152
152
|
return F(r) && (s = Math.min(r, s)), F(n) && (s = Math.max(n, s)), s;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
const { min: n, max: r } = t, [s, o] = b(() =>
|
|
154
|
+
function vn(e = 0, t = {}) {
|
|
155
|
+
const { min: n, max: r } = t, [s, o] = b(() => ye(e, {
|
|
156
156
|
min: n,
|
|
157
157
|
max: r
|
|
158
158
|
})), a = (u) => {
|
|
159
159
|
o((m) => {
|
|
160
160
|
const h = F(u) ? u : u(m);
|
|
161
|
-
return
|
|
161
|
+
return ye(h, {
|
|
162
162
|
max: r,
|
|
163
163
|
min: n
|
|
164
164
|
});
|
|
165
165
|
});
|
|
166
166
|
}, c = (u = 1) => {
|
|
167
167
|
a((m) => m + u);
|
|
168
|
-
},
|
|
168
|
+
}, d = (u = 1) => {
|
|
169
169
|
a((m) => m - u);
|
|
170
170
|
}, i = (u) => {
|
|
171
171
|
a(u);
|
|
@@ -175,10 +175,10 @@ function Sn(e = 0, t = {}) {
|
|
|
175
175
|
return [
|
|
176
176
|
s,
|
|
177
177
|
{
|
|
178
|
-
inc:
|
|
179
|
-
dec:
|
|
180
|
-
set:
|
|
181
|
-
reset:
|
|
178
|
+
inc: y(c),
|
|
179
|
+
dec: y(d),
|
|
180
|
+
set: y(i),
|
|
181
|
+
reset: y(l)
|
|
182
182
|
}
|
|
183
183
|
];
|
|
184
184
|
}
|
|
@@ -187,14 +187,14 @@ function Ne(e, t) {
|
|
|
187
187
|
`useDebounceFn expected parameter is a function, got ${typeof e}`
|
|
188
188
|
));
|
|
189
189
|
const n = L(e), r = t?.wait ?? 1e3, s = x(
|
|
190
|
-
() =>
|
|
190
|
+
() => Ce(
|
|
191
191
|
(...o) => n.current(...o),
|
|
192
192
|
r,
|
|
193
193
|
t
|
|
194
194
|
),
|
|
195
195
|
[]
|
|
196
196
|
);
|
|
197
|
-
return
|
|
197
|
+
return W(() => {
|
|
198
198
|
s.cancel();
|
|
199
199
|
}), {
|
|
200
200
|
run: s,
|
|
@@ -202,7 +202,7 @@ function Ne(e, t) {
|
|
|
202
202
|
flush: s.flush
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function yn(e, t) {
|
|
206
206
|
const [n, r] = b(e), { run: s } = Ne(() => {
|
|
207
207
|
r(e);
|
|
208
208
|
}, t);
|
|
@@ -210,35 +210,35 @@ function wn(e, t) {
|
|
|
210
210
|
s();
|
|
211
211
|
}, [e]), n;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function En(e, t, n) {
|
|
214
214
|
const [r, s] = b({}), { run: o } = Ne(() => {
|
|
215
215
|
s({});
|
|
216
216
|
}, n);
|
|
217
217
|
C(() => o(), t), K(e, [r]);
|
|
218
218
|
}
|
|
219
219
|
const Oe = (e = [], t = []) => qe(e, t), xe = (e) => (t, n) => {
|
|
220
|
-
const r =
|
|
220
|
+
const r = E(void 0), s = E(0);
|
|
221
221
|
(n === void 0 || !Oe(n, r.current)) && (s.current += 1), r.current = n, e(t, [s.current]);
|
|
222
|
-
},
|
|
223
|
-
function
|
|
222
|
+
}, Sn = xe(C), wn = xe(Pe);
|
|
223
|
+
function j(e, t, n = {}) {
|
|
224
224
|
const { enable: r = !0 } = n, s = L(t);
|
|
225
|
-
|
|
225
|
+
U(
|
|
226
226
|
() => {
|
|
227
227
|
if (!r)
|
|
228
228
|
return;
|
|
229
229
|
const o = D(n.target, window);
|
|
230
230
|
if (!o?.addEventListener)
|
|
231
231
|
return;
|
|
232
|
-
const a = (
|
|
233
|
-
return c.forEach((
|
|
234
|
-
o.addEventListener(
|
|
232
|
+
const a = (d) => s.current(d), c = Array.isArray(e) ? e : [e];
|
|
233
|
+
return c.forEach((d) => {
|
|
234
|
+
o.addEventListener(d, a, {
|
|
235
235
|
capture: n.capture,
|
|
236
236
|
once: n.once,
|
|
237
237
|
passive: n.passive
|
|
238
238
|
});
|
|
239
239
|
}), () => {
|
|
240
|
-
c.forEach((
|
|
241
|
-
o.removeEventListener(
|
|
240
|
+
c.forEach((d) => {
|
|
241
|
+
o.removeEventListener(d, a, {
|
|
242
242
|
capture: n.capture
|
|
243
243
|
});
|
|
244
244
|
});
|
|
@@ -248,13 +248,13 @@ function X(e, t, n = {}) {
|
|
|
248
248
|
n.target
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
|
-
const
|
|
252
|
-
function
|
|
253
|
-
const [e, t] = b(
|
|
254
|
-
return
|
|
251
|
+
const Ee = () => V ? document.visibilityState : "visible";
|
|
252
|
+
function bn() {
|
|
253
|
+
const [e, t] = b(Ee);
|
|
254
|
+
return j(
|
|
255
255
|
"visibilitychange",
|
|
256
256
|
() => {
|
|
257
|
-
t(
|
|
257
|
+
t(Ee());
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
target: () => document
|
|
@@ -265,23 +265,23 @@ const Fe = (e) => {
|
|
|
265
265
|
re && (k(e) || console.error(
|
|
266
266
|
`useMount: parameter \`fn\` expected to be a function, but got "${typeof e}".`
|
|
267
267
|
)), C(() => e?.(), []);
|
|
268
|
-
},
|
|
269
|
-
const r = L(n), s = L(e), o =
|
|
268
|
+
}, Rn = (e, t, n = {}) => {
|
|
269
|
+
const r = L(n), s = L(e), o = E(void 0), { dragImage: a } = r.current;
|
|
270
270
|
Fe(() => {
|
|
271
271
|
if (a?.image) {
|
|
272
272
|
const { image: c } = a;
|
|
273
273
|
if (te(c)) {
|
|
274
|
-
const
|
|
275
|
-
|
|
274
|
+
const d = new Image();
|
|
275
|
+
d.src = c, o.current = d;
|
|
276
276
|
} else
|
|
277
277
|
o.current = c;
|
|
278
278
|
}
|
|
279
|
-
}),
|
|
279
|
+
}), U(
|
|
280
280
|
() => {
|
|
281
281
|
const c = D(t);
|
|
282
282
|
if (!c?.addEventListener)
|
|
283
283
|
return;
|
|
284
|
-
const
|
|
284
|
+
const d = (l) => {
|
|
285
285
|
if (r.current.onDragStart?.(l), l.dataTransfer.setData("custom", JSON.stringify(s.current)), a?.image && o.current) {
|
|
286
286
|
const { offsetX: u = 0, offsetY: m = 0 } = a;
|
|
287
287
|
l.dataTransfer.setDragImage(
|
|
@@ -293,16 +293,16 @@ const Fe = (e) => {
|
|
|
293
293
|
}, i = (l) => {
|
|
294
294
|
r.current.onDragEnd?.(l);
|
|
295
295
|
};
|
|
296
|
-
return c.setAttribute("draggable", "true"), c.addEventListener("dragstart",
|
|
297
|
-
c.removeEventListener("dragstart",
|
|
296
|
+
return c.setAttribute("draggable", "true"), c.addEventListener("dragstart", d), c.addEventListener("dragend", i), () => {
|
|
297
|
+
c.removeEventListener("dragstart", d), c.removeEventListener("dragend", i);
|
|
298
298
|
};
|
|
299
299
|
},
|
|
300
300
|
[],
|
|
301
301
|
t
|
|
302
302
|
);
|
|
303
|
-
},
|
|
304
|
-
const n = L(t), r =
|
|
305
|
-
|
|
303
|
+
}, Tn = (e, t = {}) => {
|
|
304
|
+
const n = L(t), r = E(void 0);
|
|
305
|
+
U(
|
|
306
306
|
() => {
|
|
307
307
|
const s = D(e);
|
|
308
308
|
if (!s?.addEventListener)
|
|
@@ -310,13 +310,13 @@ const Fe = (e) => {
|
|
|
310
310
|
const o = (u, m) => {
|
|
311
311
|
const h = u.getData("text/uri-list"), p = u.getData("custom");
|
|
312
312
|
if (p && n.current.onDom) {
|
|
313
|
-
let
|
|
313
|
+
let f = p;
|
|
314
314
|
try {
|
|
315
|
-
|
|
315
|
+
f = JSON.parse(p);
|
|
316
316
|
} catch {
|
|
317
|
-
|
|
317
|
+
f = p;
|
|
318
318
|
}
|
|
319
|
-
n.current.onDom(
|
|
319
|
+
n.current.onDom(f, m);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
if (h && n.current.onUri) {
|
|
@@ -330,31 +330,31 @@ const Fe = (e) => {
|
|
|
330
330
|
);
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
|
-
u.items && u.items.length && n.current.onText && u.items[0].getAsString((
|
|
334
|
-
n.current.onText(
|
|
333
|
+
u.items && u.items.length && n.current.onText && u.items[0].getAsString((f) => {
|
|
334
|
+
n.current.onText(f, m);
|
|
335
335
|
});
|
|
336
336
|
}, a = (u) => {
|
|
337
337
|
u.preventDefault(), u.stopPropagation(), r.current = u.target, n.current.onDragEnter?.(u);
|
|
338
338
|
}, c = (u) => {
|
|
339
339
|
u.preventDefault(), n.current.onDragOver?.(u);
|
|
340
|
-
},
|
|
340
|
+
}, d = (u) => {
|
|
341
341
|
u.target === r.current && n.current.onDragLeave?.(u);
|
|
342
342
|
}, i = (u) => {
|
|
343
343
|
u.preventDefault(), o(u.dataTransfer, u), n.current.onDrop?.(u);
|
|
344
344
|
}, l = (u) => {
|
|
345
345
|
o(u.clipboardData, u), n.current.onPaste?.(u);
|
|
346
346
|
};
|
|
347
|
-
return s.addEventListener("dragenter", a), s.addEventListener("dragover", c), s.addEventListener("dragleave",
|
|
348
|
-
s.removeEventListener("dragenter", a), s.removeEventListener("dragover", c), s.removeEventListener("dragleave",
|
|
347
|
+
return s.addEventListener("dragenter", a), s.addEventListener("dragover", c), s.addEventListener("dragleave", d), s.addEventListener("drop", i), s.addEventListener("paste", l), () => {
|
|
348
|
+
s.removeEventListener("dragenter", a), s.removeEventListener("dragover", c), s.removeEventListener("dragleave", d), s.removeEventListener("drop", i), s.removeEventListener("paste", l);
|
|
349
349
|
};
|
|
350
350
|
},
|
|
351
351
|
[],
|
|
352
352
|
e
|
|
353
353
|
);
|
|
354
354
|
};
|
|
355
|
-
function
|
|
356
|
-
const { initialValue: t, transformer: n } = e || {}, [r, s] = b(t), o = L(n), a =
|
|
357
|
-
const i =
|
|
355
|
+
function Ln(e) {
|
|
356
|
+
const { initialValue: t, transformer: n } = e || {}, [r, s] = b(t), o = L(n), a = q(() => s(t), []), c = q((d) => {
|
|
357
|
+
const i = d.target.value;
|
|
358
358
|
return k(o.current) ? s(o.current(i)) : s(i);
|
|
359
359
|
}, []);
|
|
360
360
|
return [
|
|
@@ -395,8 +395,8 @@ const J = {}, lt = (e, t = {}) => {
|
|
|
395
395
|
ref: n,
|
|
396
396
|
status: n.getAttribute("data-status") || "ready"
|
|
397
397
|
};
|
|
398
|
-
},
|
|
399
|
-
const [n, r] = b(e ? "loading" : "unset"), s =
|
|
398
|
+
}, An = (e, t) => {
|
|
399
|
+
const [n, r] = b(e ? "loading" : "unset"), s = E(void 0);
|
|
400
400
|
return C(() => {
|
|
401
401
|
if (!e) {
|
|
402
402
|
r("unset");
|
|
@@ -417,8 +417,8 @@ const J = {}, lt = (e, t = {}) => {
|
|
|
417
417
|
return;
|
|
418
418
|
J[e] === void 0 ? J[e] = 1 : J[e] += 1;
|
|
419
419
|
const a = (c) => {
|
|
420
|
-
const
|
|
421
|
-
s.current?.setAttribute("data-status",
|
|
420
|
+
const d = c.type === "load" ? "ready" : "error";
|
|
421
|
+
s.current?.setAttribute("data-status", d), r(d);
|
|
422
422
|
};
|
|
423
423
|
return s.current.addEventListener("load", a), s.current.addEventListener("error", a), () => {
|
|
424
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;
|
|
@@ -429,7 +429,7 @@ const J = {}, lt = (e, t = {}) => {
|
|
|
429
429
|
ICO: "image/x-icon",
|
|
430
430
|
GIF: "image/gif",
|
|
431
431
|
PNG: "image/png"
|
|
432
|
-
},
|
|
432
|
+
}, Pn = (e) => {
|
|
433
433
|
C(() => {
|
|
434
434
|
if (!e)
|
|
435
435
|
return;
|
|
@@ -437,9 +437,9 @@ const J = {}, lt = (e, t = {}) => {
|
|
|
437
437
|
r.type = dt[n], r.href = e, r.rel = "shortcut icon", document.getElementsByTagName("head")[0].appendChild(r);
|
|
438
438
|
}, [e]);
|
|
439
439
|
};
|
|
440
|
-
function
|
|
440
|
+
function Cn(e, t) {
|
|
441
441
|
const [n, r] = b(!1), { onFocus: s, onBlur: o, onChange: a } = t || {};
|
|
442
|
-
return
|
|
442
|
+
return j(
|
|
443
443
|
"focusin",
|
|
444
444
|
(c) => {
|
|
445
445
|
n || (s?.(c), a?.(!0), r(!0));
|
|
@@ -447,7 +447,7 @@ function Nn(e, t) {
|
|
|
447
447
|
{
|
|
448
448
|
target: e
|
|
449
449
|
}
|
|
450
|
-
),
|
|
450
|
+
), j(
|
|
451
451
|
"focusout",
|
|
452
452
|
(c) => {
|
|
453
453
|
n && !c.currentTarget?.contains?.(c.relatedTarget) && (o?.(c), a?.(!1), r(!1));
|
|
@@ -457,16 +457,16 @@ function Nn(e, t) {
|
|
|
457
457
|
}
|
|
458
458
|
), n;
|
|
459
459
|
}
|
|
460
|
-
const
|
|
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),
|
|
460
|
+
const Dn = (e, t) => {
|
|
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), d = L(r), [i, l] = b(m), u = E(m());
|
|
462
462
|
function m() {
|
|
463
|
-
return
|
|
463
|
+
return X.isEnabled && !!X.element && X.element === D(e);
|
|
464
464
|
}
|
|
465
465
|
const h = (v) => {
|
|
466
|
-
v ?
|
|
466
|
+
v ? d.current?.() : c.current?.();
|
|
467
467
|
}, p = (v) => {
|
|
468
468
|
u.current !== v && (h(v), l(v), u.current = v);
|
|
469
|
-
},
|
|
469
|
+
}, f = () => {
|
|
470
470
|
const v = m();
|
|
471
471
|
p(v);
|
|
472
472
|
}, T = (v) => {
|
|
@@ -487,9 +487,9 @@ const On = (e, t) => {
|
|
|
487
487
|
T(!0);
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
|
-
if (
|
|
490
|
+
if (X.isEnabled)
|
|
491
491
|
try {
|
|
492
|
-
|
|
492
|
+
X.request(v);
|
|
493
493
|
} catch (S) {
|
|
494
494
|
console.error(S);
|
|
495
495
|
}
|
|
@@ -501,34 +501,34 @@ const On = (e, t) => {
|
|
|
501
501
|
T(!1);
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
|
-
|
|
504
|
+
X.isEnabled && X.element === v && X.exit();
|
|
505
505
|
}
|
|
506
506
|
}, g = () => {
|
|
507
507
|
i ? O() : A();
|
|
508
508
|
};
|
|
509
509
|
return C(() => {
|
|
510
|
-
if (!(!
|
|
511
|
-
return
|
|
512
|
-
|
|
510
|
+
if (!(!X.isEnabled || s))
|
|
511
|
+
return X.on("change", f), () => {
|
|
512
|
+
X.off("change", f);
|
|
513
513
|
};
|
|
514
514
|
}, []), [
|
|
515
515
|
i,
|
|
516
516
|
{
|
|
517
|
-
enterFullscreen:
|
|
518
|
-
exitFullscreen:
|
|
519
|
-
toggleFullscreen:
|
|
520
|
-
isEnabled:
|
|
517
|
+
enterFullscreen: y(A),
|
|
518
|
+
exitFullscreen: y(O),
|
|
519
|
+
toggleFullscreen: y(g),
|
|
520
|
+
isEnabled: X.isEnabled
|
|
521
521
|
}
|
|
522
522
|
];
|
|
523
523
|
};
|
|
524
|
-
function
|
|
525
|
-
const [t, n] = b(e), r = L(t), s =
|
|
524
|
+
function Mn(e) {
|
|
525
|
+
const [t, n] = b(e), r = L(t), s = q(() => r.current, []);
|
|
526
526
|
return [t, n, s];
|
|
527
527
|
}
|
|
528
528
|
const mt = (e, t) => {
|
|
529
529
|
let n = e > 0 ? e - 1 : t.length + e;
|
|
530
530
|
return n >= t.length - 1 && (n = t.length - 1), n < 0 && (n = 0), n;
|
|
531
|
-
},
|
|
531
|
+
}, Se = (e, t) => {
|
|
532
532
|
const n = mt(e, t);
|
|
533
533
|
return {
|
|
534
534
|
_current: t[n],
|
|
@@ -536,12 +536,12 @@ const mt = (e, t) => {
|
|
|
536
536
|
_after: t.slice(n + 1)
|
|
537
537
|
};
|
|
538
538
|
};
|
|
539
|
-
function
|
|
539
|
+
function Nn(e, t = 0) {
|
|
540
540
|
const [n, r] = b({
|
|
541
541
|
present: e,
|
|
542
542
|
past: [],
|
|
543
543
|
future: []
|
|
544
|
-
}), { present: s, past: o, future: a } = n, c =
|
|
544
|
+
}), { present: s, past: o, future: a } = n, c = E(e), d = (...h) => {
|
|
545
545
|
const p = h.length > 0 ? h[0] : c.current;
|
|
546
546
|
c.current = p, r({
|
|
547
547
|
present: p,
|
|
@@ -549,8 +549,8 @@ function Fn(e, t = 0) {
|
|
|
549
549
|
past: []
|
|
550
550
|
});
|
|
551
551
|
}, i = (h) => {
|
|
552
|
-
const p = [...o, s],
|
|
553
|
-
|
|
552
|
+
const p = [...o, s], f = F(t) ? t : Number(t);
|
|
553
|
+
f > 0 && p.length > f && p.splice(0, 1), r({
|
|
554
554
|
present: h,
|
|
555
555
|
future: [],
|
|
556
556
|
past: p
|
|
@@ -558,19 +558,19 @@ function Fn(e, t = 0) {
|
|
|
558
558
|
}, l = (h = 1) => {
|
|
559
559
|
if (a.length === 0)
|
|
560
560
|
return;
|
|
561
|
-
const { _before: p, _current:
|
|
561
|
+
const { _before: p, _current: f, _after: T } = Se(h, a);
|
|
562
562
|
r({
|
|
563
563
|
past: [...o, s, ...p],
|
|
564
|
-
present:
|
|
564
|
+
present: f,
|
|
565
565
|
future: T
|
|
566
566
|
});
|
|
567
567
|
}, u = (h = -1) => {
|
|
568
568
|
if (o.length === 0)
|
|
569
569
|
return;
|
|
570
|
-
const { _before: p, _current:
|
|
570
|
+
const { _before: p, _current: f, _after: T } = Se(h, o);
|
|
571
571
|
r({
|
|
572
572
|
past: p,
|
|
573
|
-
present:
|
|
573
|
+
present: f,
|
|
574
574
|
future: [...T, s, ...a]
|
|
575
575
|
});
|
|
576
576
|
}, m = (h) => {
|
|
@@ -585,20 +585,20 @@ function Fn(e, t = 0) {
|
|
|
585
585
|
value: s,
|
|
586
586
|
backLength: o.length,
|
|
587
587
|
forwardLength: a.length,
|
|
588
|
-
setValue:
|
|
589
|
-
go:
|
|
590
|
-
back:
|
|
588
|
+
setValue: y(i),
|
|
589
|
+
go: y(m),
|
|
590
|
+
back: y(() => {
|
|
591
591
|
m(-1);
|
|
592
592
|
}),
|
|
593
|
-
forward:
|
|
593
|
+
forward: y(() => {
|
|
594
594
|
m(1);
|
|
595
595
|
}),
|
|
596
|
-
reset:
|
|
596
|
+
reset: y(d)
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const On = (e, t) => {
|
|
600
600
|
const { onEnter: n, onLeave: r, onChange: s } = t || {}, [o, { setTrue: a, setFalse: c }] = ot(!1);
|
|
601
|
-
return
|
|
601
|
+
return j(
|
|
602
602
|
"mouseenter",
|
|
603
603
|
() => {
|
|
604
604
|
n?.(), a(), s?.(!0);
|
|
@@ -606,7 +606,7 @@ const kn = (e, t) => {
|
|
|
606
606
|
{
|
|
607
607
|
target: e
|
|
608
608
|
}
|
|
609
|
-
),
|
|
609
|
+
), j(
|
|
610
610
|
"mouseleave",
|
|
611
611
|
() => {
|
|
612
612
|
r?.(), c(), s?.(!1);
|
|
@@ -616,9 +616,9 @@ const kn = (e, t) => {
|
|
|
616
616
|
}
|
|
617
617
|
), o;
|
|
618
618
|
};
|
|
619
|
-
function
|
|
619
|
+
function xn(e, t) {
|
|
620
620
|
const { callback: n, ...r } = t || {}, [s, o] = b(), [a, c] = b();
|
|
621
|
-
return
|
|
621
|
+
return U(
|
|
622
622
|
() => {
|
|
623
623
|
const i = (Array.isArray(e) ? e : [e]).map((u) => D(u)).filter(Boolean);
|
|
624
624
|
if (!i.length)
|
|
@@ -651,17 +651,17 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
651
651
|
...n,
|
|
652
652
|
timer: s
|
|
653
653
|
});
|
|
654
|
-
}, ht = (e) => G.get(e),
|
|
654
|
+
}, ht = (e) => G.get(e), Fn = (e) => {
|
|
655
655
|
e ? (Array.isArray(e) ? e : [e]).forEach((n) => G.delete(n)) : G.clear();
|
|
656
656
|
}, Z = /* @__PURE__ */ new Map(), pt = (e) => Z.get(e), vt = (e, t) => {
|
|
657
657
|
Z.set(e, t), t.then((n) => (Z.delete(e), n)).catch(() => {
|
|
658
658
|
Z.delete(e);
|
|
659
659
|
});
|
|
660
|
-
},
|
|
661
|
-
|
|
662
|
-
}, ie = (e, t) => (
|
|
663
|
-
const r =
|
|
664
|
-
|
|
660
|
+
}, $ = {}, yt = (e, t) => {
|
|
661
|
+
$[e] && $[e].forEach((n) => n(t));
|
|
662
|
+
}, ie = (e, t) => ($[e] || ($[e] = []), $[e].push(t), function() {
|
|
663
|
+
const r = $[e].indexOf(t);
|
|
664
|
+
$[e].splice(r, 1);
|
|
665
665
|
}), Et = (e, {
|
|
666
666
|
cacheKey: t,
|
|
667
667
|
cacheTime: n = 300 * 1e3,
|
|
@@ -669,7 +669,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
669
669
|
setCache: s,
|
|
670
670
|
getCache: o
|
|
671
671
|
}) => {
|
|
672
|
-
const a =
|
|
672
|
+
const a = E(void 0), c = E(void 0), d = (l, u) => {
|
|
673
673
|
s ? s(u) : gt(l, n, u), yt(l, u.data);
|
|
674
674
|
}, i = (l, u = []) => o ? o(u) : ht(l);
|
|
675
675
|
return se(() => {
|
|
@@ -679,7 +679,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
679
679
|
l && Object.hasOwnProperty.call(l, "data") && (e.state.data = l.data, e.state.params = l.params, (r === -1 || Date.now() - l.time <= r) && (e.state.loading = !1)), a.current = ie(t, (u) => {
|
|
680
680
|
e.setState({ data: u });
|
|
681
681
|
});
|
|
682
|
-
}, []),
|
|
682
|
+
}, []), W(() => {
|
|
683
683
|
a.current?.();
|
|
684
684
|
}), t ? {
|
|
685
685
|
onBefore: (l) => {
|
|
@@ -699,7 +699,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
699
699
|
return m && m !== c.current ? { servicePromise: m } : (m = l(...u), c.current = m, vt(t, m), { servicePromise: m });
|
|
700
700
|
},
|
|
701
701
|
onSuccess: (l, u) => {
|
|
702
|
-
t && (a.current?.(),
|
|
702
|
+
t && (a.current?.(), d(t, {
|
|
703
703
|
data: l,
|
|
704
704
|
params: u,
|
|
705
705
|
time: Date.now()
|
|
@@ -708,7 +708,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
708
708
|
}));
|
|
709
709
|
},
|
|
710
710
|
onMutate: (l) => {
|
|
711
|
-
t && (a.current?.(),
|
|
711
|
+
t && (a.current?.(), d(t, {
|
|
712
712
|
data: l,
|
|
713
713
|
params: e.state.params,
|
|
714
714
|
time: Date.now()
|
|
@@ -718,22 +718,22 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
718
718
|
}
|
|
719
719
|
} : {};
|
|
720
720
|
}, St = (e, { debounceWait: t, debounceLeading: n, debounceTrailing: r, debounceMaxWait: s }) => {
|
|
721
|
-
const o =
|
|
721
|
+
const o = E(void 0), a = x(() => {
|
|
722
722
|
const c = {};
|
|
723
723
|
return n !== void 0 && (c.leading = n), r !== void 0 && (c.trailing = r), s !== void 0 && (c.maxWait = s), c;
|
|
724
724
|
}, [n, r, s]);
|
|
725
725
|
return C(() => {
|
|
726
726
|
if (t) {
|
|
727
727
|
const c = e.runAsync.bind(e);
|
|
728
|
-
return o.current =
|
|
729
|
-
(
|
|
730
|
-
|
|
728
|
+
return o.current = Ce(
|
|
729
|
+
(d) => {
|
|
730
|
+
d();
|
|
731
731
|
},
|
|
732
732
|
t,
|
|
733
733
|
a
|
|
734
|
-
), e.runAsync = (...
|
|
734
|
+
), e.runAsync = (...d) => new Promise((i, l) => {
|
|
735
735
|
o.current?.(() => {
|
|
736
|
-
c(...
|
|
736
|
+
c(...d).then(i).catch(l);
|
|
737
737
|
});
|
|
738
738
|
}), () => {
|
|
739
739
|
o.current?.cancel(), e.runAsync = c;
|
|
@@ -745,7 +745,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
745
745
|
}
|
|
746
746
|
} : {};
|
|
747
747
|
}, wt = (e, { loadingDelay: t, ready: n }) => {
|
|
748
|
-
const r =
|
|
748
|
+
const r = E(void 0);
|
|
749
749
|
if (!t)
|
|
750
750
|
return {};
|
|
751
751
|
const s = () => {
|
|
@@ -767,7 +767,7 @@ const G = /* @__PURE__ */ new Map(), gt = (e, t, n) => {
|
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
769
|
}, bt = (e, { pollingInterval: t, pollingWhenHidden: n = !0, pollingErrorRetryCount: r = -1 }) => {
|
|
770
|
-
const s =
|
|
770
|
+
const s = E(void 0), o = E(void 0), a = E(0), c = () => {
|
|
771
771
|
s.current && clearTimeout(s.current), o.current?.();
|
|
772
772
|
};
|
|
773
773
|
return K(() => {
|
|
@@ -804,7 +804,7 @@ function Rt(e, t) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
const Tt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
|
|
807
|
-
const r =
|
|
807
|
+
const r = E(void 0), s = () => {
|
|
808
808
|
r.current?.();
|
|
809
809
|
};
|
|
810
810
|
return C(() => {
|
|
@@ -820,11 +820,11 @@ const Tt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
|
|
|
820
820
|
return () => {
|
|
821
821
|
s();
|
|
822
822
|
};
|
|
823
|
-
}, [t, n]),
|
|
823
|
+
}, [t, n]), W(() => {
|
|
824
824
|
s();
|
|
825
825
|
}), {};
|
|
826
826
|
}, Lt = (e, { retryInterval: t, retryCount: n }) => {
|
|
827
|
-
const r =
|
|
827
|
+
const r = E(void 0), s = E(0), o = E(!1);
|
|
828
828
|
return n ? {
|
|
829
829
|
onBefore: () => {
|
|
830
830
|
o.current || (s.current = 0), o.current = !1, r.current && clearTimeout(r.current);
|
|
@@ -846,7 +846,7 @@ const Tt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
|
|
|
846
846
|
}
|
|
847
847
|
} : {};
|
|
848
848
|
}, At = (e, { throttleWait: t, throttleLeading: n, throttleTrailing: r }) => {
|
|
849
|
-
const s =
|
|
849
|
+
const s = E(void 0), o = {};
|
|
850
850
|
return n !== void 0 && (o.leading = n), r !== void 0 && (o.trailing = r), C(() => {
|
|
851
851
|
if (t) {
|
|
852
852
|
const a = e.runAsync.bind(e);
|
|
@@ -856,9 +856,9 @@ const Tt = (e, { refreshOnWindowFocus: t, focusTimespan: n = 5e3 }) => {
|
|
|
856
856
|
},
|
|
857
857
|
t,
|
|
858
858
|
o
|
|
859
|
-
), e.runAsync = (...c) => new Promise((
|
|
859
|
+
), e.runAsync = (...c) => new Promise((d, i) => {
|
|
860
860
|
s.current?.(() => {
|
|
861
|
-
a(...c).then(
|
|
861
|
+
a(...c).then(d).catch(i);
|
|
862
862
|
});
|
|
863
863
|
}), () => {
|
|
864
864
|
e.runAsync = a, s.current?.cancel();
|
|
@@ -966,12 +966,12 @@ function Ct(e, t = {}, n = []) {
|
|
|
966
966
|
manual: r,
|
|
967
967
|
ready: s,
|
|
968
968
|
...o
|
|
969
|
-
}, c = L(e),
|
|
969
|
+
}, c = L(e), d = ne(), i = se(() => {
|
|
970
970
|
const l = n.map((u) => u?.onInit?.(a)).filter(Boolean);
|
|
971
971
|
return new Pt(
|
|
972
972
|
c,
|
|
973
973
|
a,
|
|
974
|
-
|
|
974
|
+
d,
|
|
975
975
|
Object.assign({}, ...l)
|
|
976
976
|
);
|
|
977
977
|
}, []);
|
|
@@ -982,19 +982,19 @@ function Ct(e, t = {}, n = []) {
|
|
|
982
982
|
const l = i.state.params || t.defaultParams || [];
|
|
983
983
|
i.run(...l);
|
|
984
984
|
}
|
|
985
|
-
}),
|
|
985
|
+
}), W(() => {
|
|
986
986
|
i.cancel();
|
|
987
987
|
}), {
|
|
988
988
|
loading: i.state.loading,
|
|
989
989
|
data: i.state.data,
|
|
990
990
|
error: i.state.error,
|
|
991
991
|
params: i.state.params || [],
|
|
992
|
-
cancel:
|
|
993
|
-
refresh:
|
|
994
|
-
refreshAsync:
|
|
995
|
-
run:
|
|
996
|
-
runAsync:
|
|
997
|
-
mutate:
|
|
992
|
+
cancel: y(i.cancel.bind(i)),
|
|
993
|
+
refresh: y(i.refresh.bind(i)),
|
|
994
|
+
refreshAsync: y(i.refreshAsync.bind(i)),
|
|
995
|
+
run: y(i.run.bind(i)),
|
|
996
|
+
runAsync: y(i.runAsync.bind(i)),
|
|
997
|
+
mutate: y(i.mutate.bind(i))
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
1000
|
function ke(e, t, n) {
|
|
@@ -1014,7 +1014,7 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1014
1014
|
window.pageYOffset,
|
|
1015
1015
|
document.documentElement.scrollTop,
|
|
1016
1016
|
document.body.scrollTop
|
|
1017
|
-
) : e.scrollTop,
|
|
1017
|
+
) : e.scrollTop, we = (e) => e.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), Mt = (e) => e.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight), kn = (e, t = {}) => {
|
|
1018
1018
|
const {
|
|
1019
1019
|
target: n,
|
|
1020
1020
|
isNoMore: r,
|
|
@@ -1022,18 +1022,18 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1022
1022
|
direction: o = "bottom",
|
|
1023
1023
|
reloadDeps: a = [],
|
|
1024
1024
|
manual: c,
|
|
1025
|
-
onBefore:
|
|
1025
|
+
onBefore: d,
|
|
1026
1026
|
onSuccess: i,
|
|
1027
1027
|
onError: l,
|
|
1028
1028
|
onFinally: u
|
|
1029
|
-
} = t, [m, h] = b(), [p,
|
|
1029
|
+
} = t, [m, h] = b(), [p, f] = b(!1), T = o === "top", A = E(void 0), O = E(0), g = x(() => r ? r(m) : !1, [m]), { loading: v, error: S, run: R, runAsync: N, cancel: I } = ke(
|
|
1030
1030
|
async (M) => ({ currentData: await e(M), lastData: M }),
|
|
1031
1031
|
{
|
|
1032
1032
|
manual: c,
|
|
1033
|
-
onFinally: (M,
|
|
1034
|
-
|
|
1033
|
+
onFinally: (M, H, z) => {
|
|
1034
|
+
f(!1), u?.(H?.currentData, z);
|
|
1035
1035
|
},
|
|
1036
|
-
onBefore: () =>
|
|
1036
|
+
onBefore: () => d?.(),
|
|
1037
1037
|
onSuccess: (M) => {
|
|
1038
1038
|
M.lastData ? h({
|
|
1039
1039
|
...M.currentData,
|
|
@@ -1043,30 +1043,30 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1043
1043
|
list: [...M.currentData.list ?? []]
|
|
1044
1044
|
}), setTimeout(() => {
|
|
1045
1045
|
if (T) {
|
|
1046
|
-
let
|
|
1047
|
-
if (
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1046
|
+
let H = D(n);
|
|
1047
|
+
if (H = H === document ? document.documentElement : H, H) {
|
|
1048
|
+
const z = we(H);
|
|
1049
|
+
H.scrollTo(0, z - O.current);
|
|
1050
1050
|
}
|
|
1051
1051
|
} else
|
|
1052
|
-
|
|
1052
|
+
pe();
|
|
1053
1053
|
}), i?.(M.currentData);
|
|
1054
1054
|
},
|
|
1055
1055
|
onError: (M) => l?.(M)
|
|
1056
1056
|
}
|
|
1057
|
-
), w =
|
|
1058
|
-
g || (
|
|
1059
|
-
}), Y = async (M) => (await N(M)).currentData, P =
|
|
1057
|
+
), w = y(() => {
|
|
1058
|
+
g || (f(!0), R(m));
|
|
1059
|
+
}), Y = async (M) => (await N(M)).currentData, P = y(() => g ? Promise.reject() : (f(!0), Y(m))), _ = () => (f(!1), R()), oe = () => (f(!1), Y()), pe = () => {
|
|
1060
1060
|
const M = D(n);
|
|
1061
1061
|
if (!M)
|
|
1062
1062
|
return;
|
|
1063
|
-
const
|
|
1064
|
-
T ? (A.current !== void 0 && A.current >
|
|
1063
|
+
const H = M === document ? document.documentElement : M, z = Dt(H), ve = we(H), Be = Mt(H);
|
|
1064
|
+
T ? (A.current !== void 0 && A.current > z && z <= s && w(), A.current = z, O.current = ve - z) : ve - z <= Be + s && w();
|
|
1065
1065
|
};
|
|
1066
|
-
return
|
|
1066
|
+
return j(
|
|
1067
1067
|
"scroll",
|
|
1068
1068
|
() => {
|
|
1069
|
-
v || p ||
|
|
1069
|
+
v || p || pe();
|
|
1070
1070
|
},
|
|
1071
1071
|
{ target: n }
|
|
1072
1072
|
), K(() => {
|
|
@@ -1079,15 +1079,15 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1079
1079
|
noMore: g,
|
|
1080
1080
|
loadMore: w,
|
|
1081
1081
|
loadMoreAsync: P,
|
|
1082
|
-
reload:
|
|
1083
|
-
reloadAsync:
|
|
1082
|
+
reload: y(_),
|
|
1083
|
+
reloadAsync: y(oe),
|
|
1084
1084
|
mutate: h,
|
|
1085
1085
|
cancel: I
|
|
1086
1086
|
};
|
|
1087
|
-
},
|
|
1088
|
-
const r =
|
|
1089
|
-
Oe(t, r.current) || (s.current += 1), r.current = t,
|
|
1090
|
-
},
|
|
1087
|
+
}, _e = (e, t, n) => {
|
|
1088
|
+
const r = E(void 0), s = E(0);
|
|
1089
|
+
Oe(t, r.current) || (s.current += 1), r.current = t, U(e, [s.current], n);
|
|
1090
|
+
}, He = {
|
|
1091
1091
|
0: 48,
|
|
1092
1092
|
1: 49,
|
|
1093
1093
|
2: 50,
|
|
@@ -1146,7 +1146,7 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1146
1146
|
z: 90,
|
|
1147
1147
|
leftwindowkey: 91,
|
|
1148
1148
|
rightwindowkey: 92,
|
|
1149
|
-
meta:
|
|
1149
|
+
meta: et ? [91, 93] : [91, 92],
|
|
1150
1150
|
selectkey: 93,
|
|
1151
1151
|
numpad0: 96,
|
|
1152
1152
|
numpad1: 97,
|
|
@@ -1192,7 +1192,7 @@ const Dt = (e) => e === document || e === document.documentElement || e === docu
|
|
|
1192
1192
|
ctrl: (e) => e.ctrlKey,
|
|
1193
1193
|
shift: (e) => e.shiftKey,
|
|
1194
1194
|
alt: (e) => e.altKey,
|
|
1195
|
-
meta: (e) => e.type === "keyup" ?
|
|
1195
|
+
meta: (e) => e.type === "keyup" ? He.meta.includes(e.keyCode) : e.metaKey
|
|
1196
1196
|
};
|
|
1197
1197
|
function Ie(e) {
|
|
1198
1198
|
return te(e) || F(e);
|
|
@@ -1201,7 +1201,7 @@ function Nt(e) {
|
|
|
1201
1201
|
const t = Object.keys(me).reduce((n, r) => me[r](e) ? n + 1 : n, 0);
|
|
1202
1202
|
return [16, 17, 18, 91, 92].includes(e.keyCode) ? t : t + 1;
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function be(e, t, n) {
|
|
1205
1205
|
if (!e.key)
|
|
1206
1206
|
return !1;
|
|
1207
1207
|
if (F(t))
|
|
@@ -1209,29 +1209,29 @@ function Te(e, t, n) {
|
|
|
1209
1209
|
const r = t.split(".");
|
|
1210
1210
|
let s = 0;
|
|
1211
1211
|
for (const o of r) {
|
|
1212
|
-
const a = me[o], c =
|
|
1212
|
+
const a = me[o], c = He[o.toLowerCase()];
|
|
1213
1213
|
(a && a(e) || c && c === e.keyCode) && s++;
|
|
1214
1214
|
}
|
|
1215
1215
|
return n ? s === r.length && Nt(e) === r.length ? t : !1 : s === r.length ? t : !1;
|
|
1216
1216
|
}
|
|
1217
1217
|
function Ot(e, t) {
|
|
1218
|
-
return k(e) ? e : Ie(e) ? (n) =>
|
|
1218
|
+
return k(e) ? e : Ie(e) ? (n) => be(n, e, t) : Array.isArray(e) ? (n) => e.find((r) => be(n, r, t)) : () => !!e;
|
|
1219
1219
|
}
|
|
1220
1220
|
const xt = ["keydown"];
|
|
1221
|
-
function
|
|
1221
|
+
function _n(e, t, n) {
|
|
1222
1222
|
const {
|
|
1223
1223
|
events: r = xt,
|
|
1224
1224
|
target: s,
|
|
1225
1225
|
exactMatch: o = !1,
|
|
1226
1226
|
useCapture: a = !1
|
|
1227
|
-
} = n || {}, c = L(t),
|
|
1228
|
-
|
|
1227
|
+
} = n || {}, c = L(t), d = L(e);
|
|
1228
|
+
_e(
|
|
1229
1229
|
() => {
|
|
1230
1230
|
const i = D(s, window);
|
|
1231
1231
|
if (!i)
|
|
1232
1232
|
return;
|
|
1233
1233
|
const l = (u) => {
|
|
1234
|
-
const h = Ot(
|
|
1234
|
+
const h = Ot(d.current, o)(u), p = Ie(h) ? h : u.key;
|
|
1235
1235
|
if (h)
|
|
1236
1236
|
return c.current?.(u, p);
|
|
1237
1237
|
};
|
|
@@ -1246,29 +1246,29 @@ function Yn(e, t, n) {
|
|
|
1246
1246
|
s
|
|
1247
1247
|
);
|
|
1248
1248
|
}
|
|
1249
|
-
const
|
|
1249
|
+
const Re = "HOOKS_SYNC_STORAGE_EVENT_NAME";
|
|
1250
1250
|
function Ye(e) {
|
|
1251
1251
|
function t(n, r = {}) {
|
|
1252
1252
|
let s;
|
|
1253
1253
|
const {
|
|
1254
1254
|
listenStorageChange: o = !1,
|
|
1255
|
-
onError: a = (
|
|
1256
|
-
console.error(
|
|
1255
|
+
onError: a = (f) => {
|
|
1256
|
+
console.error(f);
|
|
1257
1257
|
}
|
|
1258
1258
|
} = r;
|
|
1259
1259
|
try {
|
|
1260
1260
|
s = e();
|
|
1261
|
-
} catch (
|
|
1262
|
-
a(
|
|
1261
|
+
} catch (f) {
|
|
1262
|
+
a(f);
|
|
1263
1263
|
}
|
|
1264
|
-
const c = (
|
|
1264
|
+
const c = (f) => r.serializer ? r.serializer(f) : JSON.stringify(f), d = (f) => r.deserializer ? r.deserializer(f) : JSON.parse(f);
|
|
1265
1265
|
function i() {
|
|
1266
1266
|
try {
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1269
|
-
return f
|
|
1270
|
-
} catch (
|
|
1271
|
-
a(
|
|
1267
|
+
const f = s?.getItem(n);
|
|
1268
|
+
if (f)
|
|
1269
|
+
return d(f);
|
|
1270
|
+
} catch (f) {
|
|
1271
|
+
a(f);
|
|
1272
1272
|
}
|
|
1273
1273
|
return k(r.defaultValue) ? r.defaultValue() : r.defaultValue;
|
|
1274
1274
|
}
|
|
@@ -1276,8 +1276,8 @@ function Ye(e) {
|
|
|
1276
1276
|
K(() => {
|
|
1277
1277
|
u(i());
|
|
1278
1278
|
}, [n]);
|
|
1279
|
-
const m = (
|
|
1280
|
-
const T = k(
|
|
1279
|
+
const m = (f) => {
|
|
1280
|
+
const T = k(f) ? f(l) : f;
|
|
1281
1281
|
o || u(T);
|
|
1282
1282
|
try {
|
|
1283
1283
|
let A;
|
|
@@ -1286,7 +1286,7 @@ function Ye(e) {
|
|
|
1286
1286
|
// send custom event to communicate within same page
|
|
1287
1287
|
// importantly this should not be a StorageEvent since those cannot
|
|
1288
1288
|
// be constructed with a non-built-in storage area
|
|
1289
|
-
new CustomEvent(
|
|
1289
|
+
new CustomEvent(Re, {
|
|
1290
1290
|
detail: {
|
|
1291
1291
|
key: n,
|
|
1292
1292
|
newValue: A,
|
|
@@ -1298,28 +1298,28 @@ function Ye(e) {
|
|
|
1298
1298
|
} catch (A) {
|
|
1299
1299
|
a(A);
|
|
1300
1300
|
}
|
|
1301
|
-
}, h = (
|
|
1302
|
-
|
|
1303
|
-
}, p = (
|
|
1304
|
-
h(
|
|
1301
|
+
}, h = (f) => {
|
|
1302
|
+
f.key !== n || f.storageArea !== s || u(i());
|
|
1303
|
+
}, p = (f) => {
|
|
1304
|
+
h(f.detail);
|
|
1305
1305
|
};
|
|
1306
|
-
return
|
|
1306
|
+
return j("storage", h, {
|
|
1307
1307
|
enable: o
|
|
1308
|
-
}),
|
|
1308
|
+
}), j(Re, p, {
|
|
1309
1309
|
enable: o
|
|
1310
1310
|
}), [
|
|
1311
1311
|
l,
|
|
1312
|
-
|
|
1312
|
+
y(m)
|
|
1313
1313
|
];
|
|
1314
1314
|
}
|
|
1315
1315
|
return t;
|
|
1316
1316
|
}
|
|
1317
|
-
const
|
|
1318
|
-
() =>
|
|
1317
|
+
const Hn = Ye(
|
|
1318
|
+
() => V ? localStorage : void 0
|
|
1319
1319
|
);
|
|
1320
|
-
function
|
|
1321
|
-
const t =
|
|
1322
|
-
return
|
|
1320
|
+
function In(e) {
|
|
1321
|
+
const t = E(!1);
|
|
1322
|
+
return q(
|
|
1323
1323
|
async (...n) => {
|
|
1324
1324
|
if (!t.current) {
|
|
1325
1325
|
t.current = !0;
|
|
@@ -1335,16 +1335,16 @@ function Xn(e) {
|
|
|
1335
1335
|
[e]
|
|
1336
1336
|
);
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const a = L(e), c = L(s),
|
|
1340
|
-
|
|
1338
|
+
function Yn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd: o } = {}) {
|
|
1339
|
+
const a = L(e), c = L(s), d = L(o), i = E(void 0), l = E(!1), u = E({ x: 0, y: 0 }), m = E(!1), h = E(!1), p = !!(r?.x && r.x > 0 || r?.y && r.y > 0);
|
|
1340
|
+
U(
|
|
1341
1341
|
() => {
|
|
1342
|
-
const
|
|
1343
|
-
if (!
|
|
1342
|
+
const f = D(t);
|
|
1343
|
+
if (!f?.addEventListener)
|
|
1344
1344
|
return;
|
|
1345
1345
|
const T = (w) => {
|
|
1346
|
-
const { clientX: Y, clientY: P } = A(w),
|
|
1347
|
-
return !!(r?.x &&
|
|
1346
|
+
const { clientX: Y, clientY: P } = A(w), _ = Math.abs(Y - u.current.x), oe = Math.abs(P - u.current.y);
|
|
1347
|
+
return !!(r?.x && _ > r.x || r?.y && oe > r.y);
|
|
1348
1348
|
};
|
|
1349
1349
|
function A(w) {
|
|
1350
1350
|
return "TouchEvent" in window && w instanceof TouchEvent ? {
|
|
@@ -1372,30 +1372,20 @@ function jn(e, t, { delay: n = 300, moveThreshold: r, onClick: s, onLongPressEnd
|
|
|
1372
1372
|
}, S = (w) => {
|
|
1373
1373
|
i.current && T(w) && (clearTimeout(i.current), i.current = void 0);
|
|
1374
1374
|
}, R = (w) => {
|
|
1375
|
-
h.current && (h.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ?
|
|
1375
|
+
h.current && (h.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
|
|
1376
1376
|
}, N = (w) => {
|
|
1377
|
-
w?.sourceCapabilities?.firesTouchEvents || m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ?
|
|
1377
|
+
w?.sourceCapabilities?.firesTouchEvents || m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current ? d.current?.(w) : c.current && c.current(w), l.current = !1);
|
|
1378
1378
|
}, I = (w) => {
|
|
1379
|
-
m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current && (
|
|
1379
|
+
m.current && (m.current = !1, i.current && (clearTimeout(i.current), i.current = void 0), l.current && (d.current?.(w), l.current = !1));
|
|
1380
1380
|
};
|
|
1381
|
-
return
|
|
1382
|
-
i.current && (clearTimeout(i.current), l.current = !1),
|
|
1381
|
+
return f.addEventListener("mousedown", v), f.addEventListener("mouseup", N), f.addEventListener("mouseleave", I), f.addEventListener("touchstart", g), f.addEventListener("touchend", R), p && (f.addEventListener("mousemove", S), f.addEventListener("touchmove", S)), () => {
|
|
1382
|
+
i.current && (clearTimeout(i.current), l.current = !1), f.removeEventListener("mousedown", v), f.removeEventListener("mouseup", N), f.removeEventListener("mouseleave", I), f.removeEventListener("touchstart", g), f.removeEventListener("touchend", R), p && (f.removeEventListener("mousemove", S), f.removeEventListener("touchmove", S));
|
|
1383
1383
|
};
|
|
1384
1384
|
},
|
|
1385
1385
|
[],
|
|
1386
1386
|
t
|
|
1387
1387
|
);
|
|
1388
1388
|
}
|
|
1389
|
-
function pe(e) {
|
|
1390
|
-
const t = y(0), [n, r] = b(e), s = B((o) => {
|
|
1391
|
-
cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
1392
|
-
r(o);
|
|
1393
|
-
});
|
|
1394
|
-
}, []);
|
|
1395
|
-
return $(() => {
|
|
1396
|
-
cancelAnimationFrame(t.current);
|
|
1397
|
-
}), [n, s];
|
|
1398
|
-
}
|
|
1399
1389
|
const Ft = {
|
|
1400
1390
|
screenX: NaN,
|
|
1401
1391
|
screenY: NaN,
|
|
@@ -1409,17 +1399,17 @@ const Ft = {
|
|
|
1409
1399
|
elementW: NaN,
|
|
1410
1400
|
elementPosX: NaN,
|
|
1411
1401
|
elementPosY: NaN
|
|
1412
|
-
},
|
|
1413
|
-
const [t, n] =
|
|
1414
|
-
return
|
|
1402
|
+
}, Xn = (e) => {
|
|
1403
|
+
const [t, n] = De(Ft);
|
|
1404
|
+
return j(
|
|
1415
1405
|
"mousemove",
|
|
1416
1406
|
(r) => {
|
|
1417
|
-
const { screenX: s, screenY: o, clientX: a, clientY: c, pageX:
|
|
1407
|
+
const { screenX: s, screenY: o, clientX: a, clientY: c, pageX: d, pageY: i } = r, l = {
|
|
1418
1408
|
screenX: s,
|
|
1419
1409
|
screenY: o,
|
|
1420
1410
|
clientX: a,
|
|
1421
1411
|
clientY: c,
|
|
1422
|
-
pageX:
|
|
1412
|
+
pageX: d,
|
|
1423
1413
|
pageY: i,
|
|
1424
1414
|
elementX: NaN,
|
|
1425
1415
|
elementY: NaN,
|
|
@@ -1429,8 +1419,8 @@ const Ft = {
|
|
|
1429
1419
|
elementPosY: NaN
|
|
1430
1420
|
}, u = D(e);
|
|
1431
1421
|
if (u) {
|
|
1432
|
-
const { left: m, top: h, width: p, height:
|
|
1433
|
-
l.elementPosX = m + window.pageXOffset, l.elementPosY = h + window.pageYOffset, l.elementX =
|
|
1422
|
+
const { left: m, top: h, width: p, height: f } = u.getBoundingClientRect();
|
|
1423
|
+
l.elementPosX = m + window.pageXOffset, l.elementPosY = h + window.pageYOffset, l.elementX = d - l.elementPosX, l.elementY = i - l.elementPosY, l.elementW = p, l.elementH = f;
|
|
1434
1424
|
}
|
|
1435
1425
|
n(l);
|
|
1436
1426
|
},
|
|
@@ -1438,9 +1428,9 @@ const Ft = {
|
|
|
1438
1428
|
target: () => document
|
|
1439
1429
|
}
|
|
1440
1430
|
), t;
|
|
1441
|
-
},
|
|
1431
|
+
}, jn = (e, t, n = {}) => {
|
|
1442
1432
|
const r = L(e);
|
|
1443
|
-
|
|
1433
|
+
_e(
|
|
1444
1434
|
() => {
|
|
1445
1435
|
const s = D(t);
|
|
1446
1436
|
if (!s)
|
|
@@ -1454,12 +1444,12 @@ const Ft = {
|
|
|
1454
1444
|
t
|
|
1455
1445
|
);
|
|
1456
1446
|
};
|
|
1457
|
-
function
|
|
1447
|
+
function Xe() {
|
|
1458
1448
|
const e = navigator;
|
|
1459
1449
|
return $e(e) ? e.connection || e.mozConnection || e.webkitConnection : null;
|
|
1460
1450
|
}
|
|
1461
|
-
function
|
|
1462
|
-
const e =
|
|
1451
|
+
function Te() {
|
|
1452
|
+
const e = Xe();
|
|
1463
1453
|
return e ? {
|
|
1464
1454
|
rtt: e.rtt,
|
|
1465
1455
|
type: e.type,
|
|
@@ -1469,11 +1459,11 @@ function Ae() {
|
|
|
1469
1459
|
effectiveType: e.effectiveType
|
|
1470
1460
|
} : {};
|
|
1471
1461
|
}
|
|
1472
|
-
function
|
|
1462
|
+
function zn() {
|
|
1473
1463
|
const [e, t] = b(() => ({
|
|
1474
1464
|
since: void 0,
|
|
1475
1465
|
online: navigator?.onLine,
|
|
1476
|
-
...
|
|
1466
|
+
...Te()
|
|
1477
1467
|
}));
|
|
1478
1468
|
return C(() => {
|
|
1479
1469
|
const n = () => {
|
|
@@ -1491,11 +1481,11 @@ function Vn() {
|
|
|
1491
1481
|
}, s = () => {
|
|
1492
1482
|
t((a) => ({
|
|
1493
1483
|
...a,
|
|
1494
|
-
...
|
|
1484
|
+
...Te()
|
|
1495
1485
|
}));
|
|
1496
1486
|
};
|
|
1497
1487
|
window.addEventListener("online", n), window.addEventListener("offline", r);
|
|
1498
|
-
const o =
|
|
1488
|
+
const o = Xe();
|
|
1499
1489
|
return o?.addEventListener("change", s), () => {
|
|
1500
1490
|
window.removeEventListener("online", n), window.removeEventListener("offline", r), o?.removeEventListener(
|
|
1501
1491
|
"change",
|
|
@@ -1504,25 +1494,25 @@ function Vn() {
|
|
|
1504
1494
|
};
|
|
1505
1495
|
}, []), e;
|
|
1506
1496
|
}
|
|
1507
|
-
const
|
|
1497
|
+
const Bn = (e, t = {}) => {
|
|
1508
1498
|
const { defaultPageSize: n = 10, defaultCurrent: r = 1, ...s } = t, o = ke(e, {
|
|
1509
1499
|
defaultParams: [{ current: r, pageSize: n }],
|
|
1510
1500
|
refreshDepsAction: () => {
|
|
1511
1501
|
u(1);
|
|
1512
1502
|
},
|
|
1513
1503
|
...s
|
|
1514
|
-
}), { current: a = 1, pageSize: c = n } = o.params[0] || {},
|
|
1515
|
-
() => Math.ceil(
|
|
1516
|
-
[c,
|
|
1504
|
+
}), { current: a = 1, pageSize: c = n } = o.params[0] || {}, d = o.data?.total || 0, i = x(
|
|
1505
|
+
() => Math.ceil(d / c),
|
|
1506
|
+
[c, d]
|
|
1517
1507
|
), l = (h, p) => {
|
|
1518
|
-
let
|
|
1519
|
-
const T = p <= 0 ? 1 : p, A = Math.ceil(
|
|
1520
|
-
|
|
1508
|
+
let f = h <= 0 ? 1 : h;
|
|
1509
|
+
const T = p <= 0 ? 1 : p, A = Math.ceil(d / T);
|
|
1510
|
+
f > A && (f = Math.max(1, A));
|
|
1521
1511
|
const [O = {}, ...g] = o.params || [];
|
|
1522
1512
|
o.run(
|
|
1523
1513
|
{
|
|
1524
1514
|
...O,
|
|
1525
|
-
current:
|
|
1515
|
+
current: f,
|
|
1526
1516
|
pageSize: T
|
|
1527
1517
|
},
|
|
1528
1518
|
...g
|
|
@@ -1537,11 +1527,11 @@ const Un = (e, t = {}) => {
|
|
|
1537
1527
|
pagination: {
|
|
1538
1528
|
current: a,
|
|
1539
1529
|
pageSize: c,
|
|
1540
|
-
total:
|
|
1530
|
+
total: d,
|
|
1541
1531
|
totalPage: i,
|
|
1542
|
-
onChange:
|
|
1543
|
-
changeCurrent:
|
|
1544
|
-
changePageSize:
|
|
1532
|
+
onChange: y(l),
|
|
1533
|
+
changeCurrent: y(u),
|
|
1534
|
+
changePageSize: y(m)
|
|
1545
1535
|
}
|
|
1546
1536
|
};
|
|
1547
1537
|
}, kt = (e, t = 0) => {
|
|
@@ -1556,14 +1546,14 @@ const Un = (e, t = {}) => {
|
|
|
1556
1546
|
Date.now() - n >= t && (e(), n = Date.now()), r.id = requestAnimationFrame(s);
|
|
1557
1547
|
};
|
|
1558
1548
|
return r.id = requestAnimationFrame(s), r;
|
|
1559
|
-
},
|
|
1560
|
-
if (
|
|
1549
|
+
}, _t = (e) => typeof cancelAnimationFrame > "u", Ht = (e) => {
|
|
1550
|
+
if (_t(e.id))
|
|
1561
1551
|
return clearInterval(e.id);
|
|
1562
1552
|
cancelAnimationFrame(e.id);
|
|
1563
1553
|
};
|
|
1564
|
-
function
|
|
1565
|
-
const r = n?.immediate, s = L(e), o =
|
|
1566
|
-
o.current &&
|
|
1554
|
+
function qn(e, t, n) {
|
|
1555
|
+
const r = n?.immediate, s = L(e), o = E(void 0), a = q(() => {
|
|
1556
|
+
o.current && Ht(o.current);
|
|
1567
1557
|
}, []);
|
|
1568
1558
|
return C(() => {
|
|
1569
1559
|
if (!(!F(t) || t < 0))
|
|
@@ -1583,14 +1573,14 @@ const It = (e, t = 0) => {
|
|
|
1583
1573
|
Date.now() - r >= t ? e() : n.id = requestAnimationFrame(s);
|
|
1584
1574
|
};
|
|
1585
1575
|
return n.id = requestAnimationFrame(s), n;
|
|
1586
|
-
}, Yt = (e) => typeof cancelAnimationFrame > "u",
|
|
1576
|
+
}, Yt = (e) => typeof cancelAnimationFrame > "u", Xt = (e) => {
|
|
1587
1577
|
if (Yt(e.id))
|
|
1588
1578
|
return clearTimeout(e.id);
|
|
1589
1579
|
cancelAnimationFrame(e.id);
|
|
1590
1580
|
};
|
|
1591
|
-
function
|
|
1592
|
-
const n = L(e), r =
|
|
1593
|
-
r.current &&
|
|
1581
|
+
function Vn(e, t) {
|
|
1582
|
+
const n = L(e), r = E(void 0), s = q(() => {
|
|
1583
|
+
r.current && Xt(r.current);
|
|
1594
1584
|
}, []);
|
|
1595
1585
|
return C(() => {
|
|
1596
1586
|
if (!(!F(t) || t < 0))
|
|
@@ -1599,17 +1589,17 @@ function Wn(e, t) {
|
|
|
1599
1589
|
}, t), s;
|
|
1600
1590
|
}, [t]), s;
|
|
1601
1591
|
}
|
|
1602
|
-
const
|
|
1603
|
-
function
|
|
1604
|
-
const n =
|
|
1592
|
+
const Le = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap();
|
|
1593
|
+
function je(e, t) {
|
|
1594
|
+
const n = Le.get(e);
|
|
1605
1595
|
if (n)
|
|
1606
1596
|
return n;
|
|
1607
|
-
if (
|
|
1597
|
+
if (Ae.has(e))
|
|
1608
1598
|
return e;
|
|
1609
1599
|
const r = new Proxy(e, {
|
|
1610
1600
|
get(s, o, a) {
|
|
1611
|
-
const c = Reflect.get(s, o, a),
|
|
1612
|
-
return !
|
|
1601
|
+
const c = Reflect.get(s, o, a), d = Reflect.getOwnPropertyDescriptor(s, o);
|
|
1602
|
+
return !d?.configurable && !d?.writable ? c : de(c) || Array.isArray(c) ? je(c, t) : c;
|
|
1613
1603
|
},
|
|
1614
1604
|
set(s, o, a) {
|
|
1615
1605
|
const c = Reflect.set(s, o, a);
|
|
@@ -1620,24 +1610,24 @@ function Xe(e, t) {
|
|
|
1620
1610
|
return t(), a;
|
|
1621
1611
|
}
|
|
1622
1612
|
});
|
|
1623
|
-
return
|
|
1613
|
+
return Le.set(e, r), Ae.set(r, e), r;
|
|
1624
1614
|
}
|
|
1625
|
-
function
|
|
1626
|
-
const t = ne(), n =
|
|
1627
|
-
return se(() =>
|
|
1615
|
+
function Un(e) {
|
|
1616
|
+
const t = ne(), n = E(e);
|
|
1617
|
+
return se(() => je(n.current, () => {
|
|
1628
1618
|
t();
|
|
1629
1619
|
}), []);
|
|
1630
1620
|
}
|
|
1631
|
-
const
|
|
1632
|
-
const t =
|
|
1621
|
+
const $n = (e) => {
|
|
1622
|
+
const t = E(e), n = se(
|
|
1633
1623
|
() => k(t.current) ? t.current() : t.current,
|
|
1634
1624
|
[]
|
|
1635
|
-
), [r, s] = b(n), o =
|
|
1625
|
+
), [r, s] = b(n), o = y(() => {
|
|
1636
1626
|
s(n);
|
|
1637
1627
|
});
|
|
1638
1628
|
return [r, s, o];
|
|
1639
1629
|
}, ee = /* @__PURE__ */ new Set();
|
|
1640
|
-
let
|
|
1630
|
+
let B, ge = {
|
|
1641
1631
|
xs: 0,
|
|
1642
1632
|
sm: 576,
|
|
1643
1633
|
md: 768,
|
|
@@ -1645,52 +1635,52 @@ let U, ge = {
|
|
|
1645
1635
|
xl: 1200
|
|
1646
1636
|
};
|
|
1647
1637
|
function le() {
|
|
1648
|
-
const e =
|
|
1649
|
-
if (
|
|
1638
|
+
const e = B;
|
|
1639
|
+
if (he(), e !== B)
|
|
1650
1640
|
for (const t of ee)
|
|
1651
1641
|
t();
|
|
1652
1642
|
}
|
|
1653
1643
|
let Q = !1;
|
|
1654
|
-
function
|
|
1644
|
+
function he() {
|
|
1655
1645
|
const e = window.innerWidth, t = {};
|
|
1656
1646
|
let n = !1;
|
|
1657
1647
|
for (const r of Object.keys(ge))
|
|
1658
|
-
t[r] = e >= ge[r], t[r] !==
|
|
1659
|
-
n && (
|
|
1648
|
+
t[r] = e >= ge[r], t[r] !== B[r] && (n = !0);
|
|
1649
|
+
n && (B = t);
|
|
1660
1650
|
}
|
|
1661
|
-
function
|
|
1662
|
-
ge = e,
|
|
1651
|
+
function Wn(e) {
|
|
1652
|
+
ge = e, B && he();
|
|
1663
1653
|
}
|
|
1664
|
-
function
|
|
1665
|
-
|
|
1666
|
-
const [e, t] = b(
|
|
1654
|
+
function Gn() {
|
|
1655
|
+
V && !Q && (B = {}, he(), window.addEventListener("resize", le), Q = !0);
|
|
1656
|
+
const [e, t] = b(B);
|
|
1667
1657
|
return C(() => {
|
|
1668
|
-
if (!
|
|
1658
|
+
if (!V)
|
|
1669
1659
|
return;
|
|
1670
1660
|
Q || window.addEventListener("resize", le);
|
|
1671
1661
|
const n = () => {
|
|
1672
|
-
t(
|
|
1662
|
+
t(B);
|
|
1673
1663
|
};
|
|
1674
1664
|
return ee.add(n), () => {
|
|
1675
1665
|
ee.delete(n), ee.size === 0 && (window.removeEventListener("resize", le), Q = !1);
|
|
1676
1666
|
};
|
|
1677
1667
|
}, []), e;
|
|
1678
1668
|
}
|
|
1679
|
-
const
|
|
1680
|
-
const e =
|
|
1669
|
+
const jt = () => {
|
|
1670
|
+
const e = E(!1);
|
|
1681
1671
|
return C(() => (e.current = !1, () => {
|
|
1682
1672
|
e.current = !0;
|
|
1683
1673
|
}), []), e;
|
|
1684
1674
|
};
|
|
1685
|
-
function
|
|
1686
|
-
const t =
|
|
1675
|
+
function Kn(e) {
|
|
1676
|
+
const t = jt(), [n, r] = b(e), s = q((o) => {
|
|
1687
1677
|
t.current || r(o);
|
|
1688
1678
|
}, []);
|
|
1689
1679
|
return [n, s];
|
|
1690
1680
|
}
|
|
1691
|
-
function
|
|
1692
|
-
const [n, r] =
|
|
1693
|
-
return
|
|
1681
|
+
function Jn(e, t = () => !0) {
|
|
1682
|
+
const [n, r] = De(), s = L(t);
|
|
1683
|
+
return U(
|
|
1694
1684
|
() => {
|
|
1695
1685
|
const o = D(e, document);
|
|
1696
1686
|
if (!o)
|
|
@@ -1724,7 +1714,7 @@ function er(e, t = () => !0) {
|
|
|
1724
1714
|
e
|
|
1725
1715
|
), n;
|
|
1726
1716
|
}
|
|
1727
|
-
function
|
|
1717
|
+
function Qn(e, t) {
|
|
1728
1718
|
let n = [], r;
|
|
1729
1719
|
Array.isArray(t) ? n = t : de(t) && (n = t?.defaultSelected ?? n, r = t?.itemKey ?? r);
|
|
1730
1720
|
const s = (g) => k(r) ? r(g) : te(r) && de(g) ? g[r] : g, [o, a] = b(n), c = x(() => {
|
|
@@ -1732,12 +1722,12 @@ function tr(e, t) {
|
|
|
1732
1722
|
return Array.isArray(o) && o.forEach((v) => {
|
|
1733
1723
|
g.set(s(v), v);
|
|
1734
1724
|
}), g;
|
|
1735
|
-
}, [o]),
|
|
1725
|
+
}, [o]), d = (g) => c.has(s(g)), i = (g) => {
|
|
1736
1726
|
c.set(s(g), g), a(Array.from(c.values()));
|
|
1737
1727
|
}, l = (g) => {
|
|
1738
1728
|
c.delete(s(g)), a(Array.from(c.values()));
|
|
1739
1729
|
}, u = (g) => {
|
|
1740
|
-
|
|
1730
|
+
d(g) ? l(g) : i(g);
|
|
1741
1731
|
}, m = () => {
|
|
1742
1732
|
e.forEach((g) => {
|
|
1743
1733
|
c.set(s(g), g);
|
|
@@ -1749,68 +1739,43 @@ function tr(e, t) {
|
|
|
1749
1739
|
}, p = x(
|
|
1750
1740
|
() => e.every((g) => !c.has(s(g))),
|
|
1751
1741
|
[e, c]
|
|
1752
|
-
),
|
|
1742
|
+
), f = x(
|
|
1753
1743
|
() => e.every((g) => c.has(s(g))) && !p,
|
|
1754
1744
|
[e, c, p]
|
|
1755
1745
|
), T = x(
|
|
1756
|
-
() => !p && !
|
|
1757
|
-
[p,
|
|
1758
|
-
), A = () =>
|
|
1746
|
+
() => !p && !f,
|
|
1747
|
+
[p, f]
|
|
1748
|
+
), A = () => f ? h() : m(), O = () => {
|
|
1759
1749
|
c.clear(), a([]);
|
|
1760
1750
|
};
|
|
1761
1751
|
return {
|
|
1762
1752
|
selected: o,
|
|
1763
1753
|
noneSelected: p,
|
|
1764
|
-
allSelected:
|
|
1754
|
+
allSelected: f,
|
|
1765
1755
|
partiallySelected: T,
|
|
1766
1756
|
setSelected: a,
|
|
1767
|
-
isSelected:
|
|
1768
|
-
select:
|
|
1769
|
-
unSelect:
|
|
1770
|
-
toggle:
|
|
1771
|
-
selectAll:
|
|
1772
|
-
unSelectAll:
|
|
1773
|
-
clearAll:
|
|
1774
|
-
toggleAll:
|
|
1757
|
+
isSelected: d,
|
|
1758
|
+
select: y(i),
|
|
1759
|
+
unSelect: y(l),
|
|
1760
|
+
toggle: y(u),
|
|
1761
|
+
selectAll: y(m),
|
|
1762
|
+
unSelectAll: y(h),
|
|
1763
|
+
clearAll: y(O),
|
|
1764
|
+
toggleAll: y(A)
|
|
1775
1765
|
};
|
|
1776
1766
|
}
|
|
1777
|
-
const
|
|
1778
|
-
() =>
|
|
1779
|
-
),
|
|
1780
|
-
const [t, n] = b(e), r =
|
|
1767
|
+
const Zn = Ye(
|
|
1768
|
+
() => V ? sessionStorage : void 0
|
|
1769
|
+
), er = (e) => {
|
|
1770
|
+
const [t, n] = b(e), r = y((s) => {
|
|
1781
1771
|
n((o) => {
|
|
1782
1772
|
const a = k(s) ? s(o) : s;
|
|
1783
1773
|
return a ? { ...o, ...a } : o;
|
|
1784
1774
|
});
|
|
1785
1775
|
});
|
|
1786
1776
|
return [t, r];
|
|
1787
|
-
},
|
|
1788
|
-
|
|
1789
|
-
const [t, n] = pe(() => {
|
|
1790
|
-
const r = D(e);
|
|
1791
|
-
return r ? { width: r.clientWidth, height: r.clientHeight } : void 0;
|
|
1792
|
-
});
|
|
1793
|
-
return Bt(
|
|
1794
|
-
() => {
|
|
1795
|
-
const r = D(e);
|
|
1796
|
-
if (!r)
|
|
1797
|
-
return;
|
|
1798
|
-
const s = new ResizeObserver((o) => {
|
|
1799
|
-
o.forEach((a) => {
|
|
1800
|
-
const { clientWidth: c, clientHeight: f } = a.target;
|
|
1801
|
-
n({ width: c, height: f });
|
|
1802
|
-
});
|
|
1803
|
-
});
|
|
1804
|
-
return s.observe(r), () => {
|
|
1805
|
-
s.disconnect();
|
|
1806
|
-
};
|
|
1807
|
-
},
|
|
1808
|
-
[],
|
|
1809
|
-
e
|
|
1810
|
-
), t;
|
|
1811
|
-
}
|
|
1812
|
-
const Vt = () => {
|
|
1813
|
-
const e = q ? window.matchMedia("(prefers-color-scheme: dark)") : void 0, [t, n] = b(() => q && e?.matches ? "dark" : "light");
|
|
1777
|
+
}, zt = () => {
|
|
1778
|
+
const e = V ? window.matchMedia("(prefers-color-scheme: dark)") : void 0, [t, n] = b(() => V && e?.matches ? "dark" : "light");
|
|
1814
1779
|
return C(() => {
|
|
1815
1780
|
const r = (s) => {
|
|
1816
1781
|
s.matches ? n(
|
|
@@ -1826,17 +1791,17 @@ const Vt = () => {
|
|
|
1826
1791
|
};
|
|
1827
1792
|
}, []), t;
|
|
1828
1793
|
};
|
|
1829
|
-
function
|
|
1794
|
+
function tr(e = {}) {
|
|
1830
1795
|
const { localStorageKey: t } = e, [n, r] = b(() => t?.length && localStorage.getItem(t) || "system"), s = (c) => {
|
|
1831
1796
|
r(c), t?.length && localStorage.setItem(t, c);
|
|
1832
|
-
}, o =
|
|
1797
|
+
}, o = zt();
|
|
1833
1798
|
return {
|
|
1834
1799
|
theme: n === "system" ? o : n,
|
|
1835
1800
|
themeMode: n,
|
|
1836
|
-
setThemeMode:
|
|
1801
|
+
setThemeMode: y(s)
|
|
1837
1802
|
};
|
|
1838
1803
|
}
|
|
1839
|
-
function
|
|
1804
|
+
function ze(e, t) {
|
|
1840
1805
|
re && (k(e) || console.error(
|
|
1841
1806
|
`useThrottleFn expected parameter is a function, got ${typeof e}`
|
|
1842
1807
|
));
|
|
@@ -1848,7 +1813,7 @@ function je(e, t) {
|
|
|
1848
1813
|
),
|
|
1849
1814
|
[]
|
|
1850
1815
|
);
|
|
1851
|
-
return
|
|
1816
|
+
return W(() => {
|
|
1852
1817
|
s.cancel();
|
|
1853
1818
|
}), {
|
|
1854
1819
|
run: s,
|
|
@@ -1856,60 +1821,60 @@ function je(e, t) {
|
|
|
1856
1821
|
flush: s.flush
|
|
1857
1822
|
};
|
|
1858
1823
|
}
|
|
1859
|
-
function
|
|
1860
|
-
const [n, r] = b(e), { run: s } =
|
|
1824
|
+
function nr(e, t) {
|
|
1825
|
+
const [n, r] = b(e), { run: s } = ze(() => {
|
|
1861
1826
|
r(e);
|
|
1862
1827
|
}, t);
|
|
1863
1828
|
return C(() => {
|
|
1864
1829
|
s();
|
|
1865
1830
|
}, [e]), n;
|
|
1866
1831
|
}
|
|
1867
|
-
function
|
|
1868
|
-
const [r, s] = b({}), { run: o } =
|
|
1832
|
+
function rr(e, t, n) {
|
|
1833
|
+
const [r, s] = b({}), { run: o } = ze(() => {
|
|
1869
1834
|
s({});
|
|
1870
1835
|
}, n);
|
|
1871
1836
|
C(() => o(), t), K(e, [r]);
|
|
1872
1837
|
}
|
|
1873
|
-
const
|
|
1874
|
-
const n =
|
|
1838
|
+
const sr = (e, t) => {
|
|
1839
|
+
const n = y(e), r = E(null), s = q(() => {
|
|
1875
1840
|
r.current && clearTimeout(r.current);
|
|
1876
1841
|
}, []);
|
|
1877
1842
|
return C(() => {
|
|
1878
1843
|
if (!(!F(t) || t < 0))
|
|
1879
1844
|
return r.current = setTimeout(n, t), s;
|
|
1880
1845
|
}, [t]), s;
|
|
1881
|
-
},
|
|
1846
|
+
}, Bt = {
|
|
1882
1847
|
restoreOnUnmount: !1
|
|
1883
1848
|
};
|
|
1884
|
-
function
|
|
1885
|
-
const n =
|
|
1849
|
+
function or(e, t = Bt) {
|
|
1850
|
+
const n = E(V ? document.title : "");
|
|
1886
1851
|
C(() => {
|
|
1887
1852
|
document.title = e;
|
|
1888
|
-
}, [e]),
|
|
1853
|
+
}, [e]), W(() => {
|
|
1889
1854
|
t.restoreOnUnmount && (document.title = n.current);
|
|
1890
1855
|
});
|
|
1891
1856
|
}
|
|
1892
|
-
const
|
|
1893
|
-
const n =
|
|
1857
|
+
const qt = (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) : [], cr = (e, t) => {
|
|
1858
|
+
const n = E(void 0);
|
|
1894
1859
|
C(() => {
|
|
1895
|
-
const r =
|
|
1860
|
+
const r = qt(n.current, t), s = n.current;
|
|
1896
1861
|
return n.current = t, e(r, s, t);
|
|
1897
1862
|
}, t);
|
|
1898
|
-
},
|
|
1863
|
+
}, ar = Ze(Pe), fe = nt, Vt = {
|
|
1899
1864
|
parseNumbers: !1,
|
|
1900
1865
|
parseBooleans: !1
|
|
1901
|
-
},
|
|
1866
|
+
}, Ut = {
|
|
1902
1867
|
skipNull: !1,
|
|
1903
1868
|
skipEmptyString: !1
|
|
1904
|
-
},
|
|
1869
|
+
}, ur = (e, t) => {
|
|
1905
1870
|
const {
|
|
1906
1871
|
navigateMode: n = "push",
|
|
1907
1872
|
parseOptions: r,
|
|
1908
1873
|
stringifyOptions: s
|
|
1909
|
-
} = t || {}, o = { ...
|
|
1910
|
-
...
|
|
1874
|
+
} = t || {}, o = { ...Vt, ...r }, a = {
|
|
1875
|
+
...Ut,
|
|
1911
1876
|
...s
|
|
1912
|
-
}, c = fe.useLocation(),
|
|
1877
|
+
}, c = fe.useLocation(), d = fe.useHistory?.(), i = fe.useNavigate?.(), l = ne(), u = E(
|
|
1913
1878
|
typeof e == "function" ? e() : e || {}
|
|
1914
1879
|
), m = x(() => ae.parse(c.search, o), [c.search]), h = x(
|
|
1915
1880
|
() => ({
|
|
@@ -1918,9 +1883,9 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
1918
1883
|
}),
|
|
1919
1884
|
[m]
|
|
1920
1885
|
);
|
|
1921
|
-
return [h,
|
|
1922
|
-
const T = typeof
|
|
1923
|
-
l(),
|
|
1886
|
+
return [h, y((f) => {
|
|
1887
|
+
const T = typeof f == "function" ? f(h) : f;
|
|
1888
|
+
l(), d && d[n](
|
|
1924
1889
|
{
|
|
1925
1890
|
hash: c.hash,
|
|
1926
1891
|
search: ae.stringify(
|
|
@@ -1943,8 +1908,8 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
1943
1908
|
}
|
|
1944
1909
|
);
|
|
1945
1910
|
})];
|
|
1946
|
-
},
|
|
1947
|
-
const { containerTarget: n, wrapperTarget: r, itemHeight: s, overscan: o = 5 } = t, a = L(s), c =
|
|
1911
|
+
}, ir = (e, t) => {
|
|
1912
|
+
const { containerTarget: n, wrapperTarget: r, itemHeight: s, overscan: o = 5 } = t, a = L(s), c = tt(n), d = E(!1), [i, l] = b(
|
|
1948
1913
|
[]
|
|
1949
1914
|
), [u, m] = b({}), h = (g, v) => {
|
|
1950
1915
|
if (F(a.current))
|
|
@@ -1968,7 +1933,7 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
1968
1933
|
}
|
|
1969
1934
|
}
|
|
1970
1935
|
return S + 1;
|
|
1971
|
-
},
|
|
1936
|
+
}, f = (g) => F(a.current) ? g * a.current : e.slice(0, g).reduce(
|
|
1972
1937
|
(S, R, N) => S + a.current(N, e[N]),
|
|
1973
1938
|
0
|
|
1974
1939
|
), T = x(() => F(a.current) ? e.length * a.current : e.reduce(
|
|
@@ -1977,14 +1942,14 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
1977
1942
|
), [e]), A = () => {
|
|
1978
1943
|
const g = D(n);
|
|
1979
1944
|
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 =
|
|
1945
|
+
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 = f(I);
|
|
1981
1946
|
m({
|
|
1982
1947
|
height: T - Y + "px",
|
|
1983
1948
|
marginTop: Y + "px"
|
|
1984
1949
|
}), l(
|
|
1985
|
-
e.slice(I, w).map((P,
|
|
1950
|
+
e.slice(I, w).map((P, _) => ({
|
|
1986
1951
|
data: P,
|
|
1987
|
-
index:
|
|
1952
|
+
index: _ + I
|
|
1988
1953
|
}))
|
|
1989
1954
|
);
|
|
1990
1955
|
}
|
|
@@ -1996,11 +1961,11 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
1996
1961
|
);
|
|
1997
1962
|
}, [u]), C(() => {
|
|
1998
1963
|
!c?.width || !c?.height || A();
|
|
1999
|
-
}, [c?.width, c?.height, e]),
|
|
1964
|
+
}, [c?.width, c?.height, e]), j(
|
|
2000
1965
|
"scroll",
|
|
2001
1966
|
(g) => {
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
1967
|
+
if (d.current) {
|
|
1968
|
+
d.current = !1;
|
|
2004
1969
|
return;
|
|
2005
1970
|
}
|
|
2006
1971
|
g.preventDefault(), A();
|
|
@@ -2008,12 +1973,12 @@ const $t = (e, t) => e ? e.map((n, r) => Object.is(e[r], t?.[r]) ? -1 : r).filte
|
|
|
2008
1973
|
{
|
|
2009
1974
|
target: n
|
|
2010
1975
|
}
|
|
2011
|
-
), [i,
|
|
1976
|
+
), [i, y((g) => {
|
|
2012
1977
|
const v = D(n);
|
|
2013
|
-
v && (
|
|
1978
|
+
v && (d.current = !0, v.scrollTop = f(g), A());
|
|
2014
1979
|
})];
|
|
2015
1980
|
};
|
|
2016
|
-
function
|
|
1981
|
+
function lr(e, t = {}) {
|
|
2017
1982
|
const {
|
|
2018
1983
|
reconnectLimit: n = 3,
|
|
2019
1984
|
reconnectInterval: r = 3 * 1e3,
|
|
@@ -2021,12 +1986,12 @@ function mr(e, t = {}) {
|
|
|
2021
1986
|
onOpen: o,
|
|
2022
1987
|
onClose: a,
|
|
2023
1988
|
onMessage: c,
|
|
2024
|
-
onError:
|
|
1989
|
+
onError: d,
|
|
2025
1990
|
protocols: i
|
|
2026
1991
|
} = t, [l, u] = b(), [m, h] = b(
|
|
2027
1992
|
3
|
|
2028
1993
|
/* Closed */
|
|
2029
|
-
), p = L(o),
|
|
1994
|
+
), p = L(o), f = L(a), T = L(c), A = L(d), O = L(m), g = E(0), v = E(void 0), S = E(void 0), R = () => {
|
|
2030
1995
|
g.current < n && S.current?.readyState !== 1 && (v.current && clearTimeout(v.current), v.current = setTimeout(() => {
|
|
2031
1996
|
N(), g.current++;
|
|
2032
1997
|
}, r));
|
|
@@ -2036,20 +2001,20 @@ function mr(e, t = {}) {
|
|
|
2036
2001
|
h(
|
|
2037
2002
|
0
|
|
2038
2003
|
/* Connecting */
|
|
2039
|
-
), P.onerror = (
|
|
2040
|
-
S.current === P && (R(), A.current?.(
|
|
2004
|
+
), P.onerror = (_) => {
|
|
2005
|
+
S.current === P && (R(), A.current?.(_, P), h(
|
|
2041
2006
|
P.readyState || 3
|
|
2042
2007
|
/* Closed */
|
|
2043
2008
|
));
|
|
2044
|
-
}, P.onopen = (
|
|
2045
|
-
S.current === P && (p.current?.(
|
|
2009
|
+
}, P.onopen = (_) => {
|
|
2010
|
+
S.current === P && (p.current?.(_, P), g.current = 0, h(
|
|
2046
2011
|
P.readyState || 1
|
|
2047
2012
|
/* Open */
|
|
2048
2013
|
));
|
|
2049
|
-
}, P.onmessage = (
|
|
2050
|
-
S.current === P && (T.current?.(
|
|
2051
|
-
}, P.onclose = (
|
|
2052
|
-
|
|
2014
|
+
}, P.onmessage = (_) => {
|
|
2015
|
+
S.current === P && (T.current?.(_, P), u(_));
|
|
2016
|
+
}, P.onclose = (_) => {
|
|
2017
|
+
f.current?.(_, P), S.current === P && R(), (!S.current || S.current === P) && h(
|
|
2053
2018
|
P.readyState || 3
|
|
2054
2019
|
/* Closed */
|
|
2055
2020
|
);
|
|
@@ -2066,19 +2031,19 @@ function mr(e, t = {}) {
|
|
|
2066
2031
|
};
|
|
2067
2032
|
return C(() => {
|
|
2068
2033
|
!s && e && w();
|
|
2069
|
-
}, [e, s]),
|
|
2034
|
+
}, [e, s]), W(() => {
|
|
2070
2035
|
Y();
|
|
2071
2036
|
}), {
|
|
2072
2037
|
latestMessage: l,
|
|
2073
|
-
sendMessage:
|
|
2074
|
-
connect:
|
|
2075
|
-
disconnect:
|
|
2038
|
+
sendMessage: y(I),
|
|
2039
|
+
connect: y(w),
|
|
2040
|
+
disconnect: y(Y),
|
|
2076
2041
|
readyState: m,
|
|
2077
2042
|
webSocketIns: S.current
|
|
2078
2043
|
};
|
|
2079
2044
|
}
|
|
2080
|
-
function
|
|
2081
|
-
const n =
|
|
2045
|
+
function fr(e, t) {
|
|
2046
|
+
const n = E({});
|
|
2082
2047
|
C(() => {
|
|
2083
2048
|
if (n.current) {
|
|
2084
2049
|
const r = Object.keys({ ...n.current, ...t }), s = {};
|
|
@@ -2093,68 +2058,66 @@ function gr(e, t) {
|
|
|
2093
2058
|
});
|
|
2094
2059
|
}
|
|
2095
2060
|
export {
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2061
|
+
or as $,
|
|
2062
|
+
kn as A,
|
|
2063
|
+
xn as B,
|
|
2064
|
+
_n as C,
|
|
2065
|
+
Hn as D,
|
|
2066
|
+
In as E,
|
|
2067
|
+
Yn as F,
|
|
2103
2068
|
Fe as G,
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
mr as a8,
|
|
2134
|
-
gr as a9,
|
|
2069
|
+
Xn as H,
|
|
2070
|
+
jn as I,
|
|
2071
|
+
zn as J,
|
|
2072
|
+
Bn as K,
|
|
2073
|
+
qn as L,
|
|
2074
|
+
Vn as M,
|
|
2075
|
+
Un as N,
|
|
2076
|
+
ke as O,
|
|
2077
|
+
$n as P,
|
|
2078
|
+
Gn as Q,
|
|
2079
|
+
Kn as R,
|
|
2080
|
+
Jn as S,
|
|
2081
|
+
Qn as T,
|
|
2082
|
+
Zn as U,
|
|
2083
|
+
er as V,
|
|
2084
|
+
tr as W,
|
|
2085
|
+
nr as X,
|
|
2086
|
+
rr as Y,
|
|
2087
|
+
ze as Z,
|
|
2088
|
+
sr as _,
|
|
2089
|
+
Wn as a,
|
|
2090
|
+
st as a0,
|
|
2091
|
+
cr as a1,
|
|
2092
|
+
jt as a2,
|
|
2093
|
+
ar as a3,
|
|
2094
|
+
ur as a4,
|
|
2095
|
+
ir as a5,
|
|
2096
|
+
lr as a6,
|
|
2097
|
+
fr as a7,
|
|
2135
2098
|
ot as b,
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2099
|
+
Fn as c,
|
|
2100
|
+
mn as d,
|
|
2101
|
+
gn as e,
|
|
2102
|
+
hn as f,
|
|
2103
|
+
pn as g,
|
|
2104
|
+
vn as h,
|
|
2105
|
+
yn as i,
|
|
2106
|
+
En as j,
|
|
2144
2107
|
Ne as k,
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2108
|
+
Sn as l,
|
|
2109
|
+
wn as m,
|
|
2110
|
+
bn as n,
|
|
2111
|
+
Rn as o,
|
|
2112
|
+
Tn as p,
|
|
2113
|
+
j as q,
|
|
2114
|
+
Ln as r,
|
|
2115
|
+
An as s,
|
|
2116
|
+
Pn as t,
|
|
2117
|
+
dn as u,
|
|
2118
|
+
Cn as v,
|
|
2119
|
+
Dn as w,
|
|
2120
|
+
Mn as x,
|
|
2121
|
+
Nn as y,
|
|
2122
|
+
On as z
|
|
2160
2123
|
};
|