@gx-design-vue/pro-utils 0.2.0-beta.83 → 0.2.0-beta.85
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/dist/pro-utils.js +58 -54
- package/dist/pro-utils.umd.cjs +3 -3
- package/dist/typings/index.d.ts +6 -2
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -5
package/dist/pro-utils.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.84
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
7
7
|
* Description: Gx Design Pro Utils
|
|
8
|
-
* Date Created: 2025-
|
|
8
|
+
* Date Created: 2025-12-14
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
@@ -188,11 +188,11 @@ function T(t) {
|
|
|
188
188
|
function tt(t) {
|
|
189
189
|
return ArrayBuffer.isView(t) && !(t instanceof DataView);
|
|
190
190
|
}
|
|
191
|
-
const et = "[object RegExp]", rt = "[object String]", nt = "[object Number]", it = "[object Boolean]", ot = "[object Arguments]", st = "[object Symbol]", ct = "[object Date]", ft = "[object Map]", ut = "[object Set]", at = "[object Array]", lt = "[object ArrayBuffer]", dt = "[object Object]", pt = "[object DataView]",
|
|
191
|
+
const et = "[object RegExp]", rt = "[object String]", nt = "[object Number]", it = "[object Boolean]", ot = "[object Arguments]", st = "[object Symbol]", ct = "[object Date]", ft = "[object Map]", ut = "[object Set]", at = "[object Array]", lt = "[object ArrayBuffer]", dt = "[object Object]", pt = "[object DataView]", yt = "[object Uint8Array]", gt = "[object Uint8ClampedArray]", ht = "[object Uint16Array]", mt = "[object Uint32Array]", wt = "[object Int8Array]", At = "[object Int16Array]", bt = "[object Int32Array]", St = "[object Float32Array]", xt = "[object Float64Array]";
|
|
192
192
|
function Gt(t, e) {
|
|
193
|
-
return
|
|
193
|
+
return g(t, void 0, t, /* @__PURE__ */ new Map(), e);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function g(t, e, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
196
196
|
const s = i?.(t, e, n, r);
|
|
197
197
|
if (s !== void 0)
|
|
198
198
|
return s;
|
|
@@ -204,7 +204,7 @@ function y(t, e, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
204
204
|
const o = Array.from({ length: t.length });
|
|
205
205
|
r.set(t, o);
|
|
206
206
|
for (let c = 0; c < t.length; c++)
|
|
207
|
-
o[c] =
|
|
207
|
+
o[c] = g(t[c], c, n, r, i);
|
|
208
208
|
return Object.hasOwn(t, "index") && (o.index = t.index), Object.hasOwn(t, "input") && (o.input = t.input), o;
|
|
209
209
|
}
|
|
210
210
|
if (t instanceof Date)
|
|
@@ -217,14 +217,14 @@ function y(t, e, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
217
217
|
const o = /* @__PURE__ */ new Map();
|
|
218
218
|
r.set(t, o);
|
|
219
219
|
for (const [c, f] of t)
|
|
220
|
-
o.set(c,
|
|
220
|
+
o.set(c, g(f, c, n, r, i));
|
|
221
221
|
return o;
|
|
222
222
|
}
|
|
223
223
|
if (t instanceof Set) {
|
|
224
224
|
const o = /* @__PURE__ */ new Set();
|
|
225
225
|
r.set(t, o);
|
|
226
226
|
for (const c of t)
|
|
227
|
-
o.add(
|
|
227
|
+
o.add(g(c, void 0, n, r, i));
|
|
228
228
|
return o;
|
|
229
229
|
}
|
|
230
230
|
if (typeof Buffer < "u" && Buffer.isBuffer(t))
|
|
@@ -233,7 +233,7 @@ function y(t, e, n, r = /* @__PURE__ */ new Map(), i = void 0) {
|
|
|
233
233
|
const o = new (Object.getPrototypeOf(t)).constructor(t.length);
|
|
234
234
|
r.set(t, o);
|
|
235
235
|
for (let c = 0; c < t.length; c++)
|
|
236
|
-
o[c] =
|
|
236
|
+
o[c] = g(t[c], c, n, r, i);
|
|
237
237
|
return o;
|
|
238
238
|
}
|
|
239
239
|
if (t instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer)
|
|
@@ -278,7 +278,7 @@ function d(t, e, n = t, r, i) {
|
|
|
278
278
|
const s = [...Object.keys(e), ...k(e)];
|
|
279
279
|
for (let o = 0; o < s.length; o++) {
|
|
280
280
|
const c = s[o], f = Object.getOwnPropertyDescriptor(t, c);
|
|
281
|
-
(f == null || f.writable) && (t[c] =
|
|
281
|
+
(f == null || f.writable) && (t[c] = g(e[c], c, n, r, i));
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
function Ot(t) {
|
|
@@ -301,8 +301,8 @@ function Ot(t) {
|
|
|
301
301
|
case ut:
|
|
302
302
|
case rt:
|
|
303
303
|
case st:
|
|
304
|
-
case gt:
|
|
305
304
|
case yt:
|
|
305
|
+
case gt:
|
|
306
306
|
case ht:
|
|
307
307
|
case mt:
|
|
308
308
|
return !0;
|
|
@@ -311,7 +311,7 @@ function Ot(t) {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
function w(t) {
|
|
314
|
-
return
|
|
314
|
+
return g(t, void 0, t, /* @__PURE__ */ new Map(), void 0);
|
|
315
315
|
}
|
|
316
316
|
const S = {
|
|
317
317
|
videoAllowType: [
|
|
@@ -645,7 +645,7 @@ function pe(t) {
|
|
|
645
645
|
r.readAsDataURL(t), r.onload = () => e(r.result), r.onerror = (i) => n(i);
|
|
646
646
|
});
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function ye(t) {
|
|
649
649
|
const e = t.split(","), n = e[0].match(/:(.*?);/)[1], r = atob(e[1]);
|
|
650
650
|
let i = r.length;
|
|
651
651
|
const s = new Uint8Array(i);
|
|
@@ -653,7 +653,7 @@ function ge(t) {
|
|
|
653
653
|
s[i] = r.charCodeAt(i);
|
|
654
654
|
return new Blob([s], { type: n });
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function ge(t, e) {
|
|
657
657
|
const n = t.split(","), r = n[0].match(/:(.*?);/)[1], i = atob(n[1]);
|
|
658
658
|
let s = i.length;
|
|
659
659
|
const o = new Uint8Array(s);
|
|
@@ -836,18 +836,21 @@ function Ue(t, e) {
|
|
|
836
836
|
e(n, t[n]);
|
|
837
837
|
});
|
|
838
838
|
}
|
|
839
|
+
function Re(t) {
|
|
840
|
+
return Object.keys(t);
|
|
841
|
+
}
|
|
839
842
|
function Lt(t, e, n, r) {
|
|
840
843
|
const i = n - e;
|
|
841
844
|
return t /= r / 2, t < 1 ? i / 2 * t * t * t + e : i / 2 * ((t -= 2) * t * t + 2) + e;
|
|
842
845
|
}
|
|
843
|
-
function
|
|
846
|
+
function Ee(t, e = {}) {
|
|
844
847
|
const { getContainer: n = () => window, callback: r, duration: i = 450 } = e, s = n(), o = K(s, !0), c = Date.now(), f = () => {
|
|
845
848
|
const a = Date.now() - c, l = Lt(a > i ? i : a, o, t, i);
|
|
846
849
|
I(s) ? s.scrollTo(window.pageXOffset, l) : s instanceof HTMLDocument || s.constructor.name === "HTMLDocument" ? s.documentElement.scrollTop = l : s.scrollTop = l, a < i ? U(f) : typeof r == "function" && r();
|
|
847
850
|
};
|
|
848
851
|
s && U(f);
|
|
849
852
|
}
|
|
850
|
-
function
|
|
853
|
+
function Be(t) {
|
|
851
854
|
let e;
|
|
852
855
|
const n = (i) => () => {
|
|
853
856
|
e = null, t(...i);
|
|
@@ -856,7 +859,7 @@ function Ee(t) {
|
|
|
856
859
|
};
|
|
857
860
|
return r.cancel = () => cancelAnimationFrame(e), r;
|
|
858
861
|
}
|
|
859
|
-
const Mt = typeof process < "u" && process.versions != null && process.versions.node != null,
|
|
862
|
+
const Mt = typeof process < "u" && process.versions != null && process.versions.node != null, De = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !Mt;
|
|
860
863
|
function j(t, e, n, r) {
|
|
861
864
|
if (t === e)
|
|
862
865
|
return !0;
|
|
@@ -919,10 +922,10 @@ function j(t, e, n, r) {
|
|
|
919
922
|
}
|
|
920
923
|
return t !== t && e !== e;
|
|
921
924
|
}
|
|
922
|
-
function
|
|
925
|
+
function Ne(t) {
|
|
923
926
|
return /\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(t);
|
|
924
927
|
}
|
|
925
|
-
const
|
|
928
|
+
const Fe = (t) => t == null, Pe = (t) => {
|
|
926
929
|
if (!t || !t.startsWith("http"))
|
|
927
930
|
return !1;
|
|
928
931
|
try {
|
|
@@ -934,18 +937,18 @@ const Ne = (t) => t == null, Fe = (t) => {
|
|
|
934
937
|
function _t(t) {
|
|
935
938
|
return t === "__proto__";
|
|
936
939
|
}
|
|
937
|
-
function
|
|
940
|
+
function y(t, e, n) {
|
|
938
941
|
const r = Object.keys(e);
|
|
939
942
|
for (let i = 0; i < r.length; i++) {
|
|
940
943
|
const s = r[i];
|
|
941
944
|
if (_t(s))
|
|
942
945
|
continue;
|
|
943
946
|
const o = e[s], c = t[s], f = n(c, o, s, t, e);
|
|
944
|
-
f !== void 0 ? t[s] = f : A(o) ? A(c) ? t[s] =
|
|
947
|
+
f !== void 0 ? t[s] = f : A(o) ? A(c) ? t[s] = y(c, o, n) : t[s] = y({}, o, n) : t[s] = o;
|
|
945
948
|
}
|
|
946
949
|
return t;
|
|
947
950
|
}
|
|
948
|
-
const
|
|
951
|
+
const Le = (...t) => {
|
|
949
952
|
const e = {}, n = t.length;
|
|
950
953
|
let r, i = 0;
|
|
951
954
|
for (; i < n; i += 1)
|
|
@@ -956,16 +959,16 @@ const Pe = (...t) => {
|
|
|
956
959
|
} : e[r] = t[i][r]);
|
|
957
960
|
return e;
|
|
958
961
|
};
|
|
959
|
-
function
|
|
960
|
-
return
|
|
962
|
+
function Me(t, e) {
|
|
963
|
+
return y(w(t), e, function n(r, i) {
|
|
961
964
|
if (A(i))
|
|
962
|
-
return A(r) ?
|
|
965
|
+
return A(r) ? y(w(r), i, n) : y({}, i, n);
|
|
963
966
|
});
|
|
964
967
|
}
|
|
965
|
-
function
|
|
966
|
-
return
|
|
968
|
+
function _e(t, e) {
|
|
969
|
+
return y(t, e, function n(r, i) {
|
|
967
970
|
if (A(i))
|
|
968
|
-
return A(r) ?
|
|
971
|
+
return A(r) ? y(r, i, n) : y({}, i, n);
|
|
969
972
|
});
|
|
970
973
|
}
|
|
971
974
|
let _ = 0;
|
|
@@ -979,29 +982,29 @@ const $ = (t = 21) => {
|
|
|
979
982
|
e += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
980
983
|
}
|
|
981
984
|
return e;
|
|
982
|
-
},
|
|
985
|
+
}, $e = () => typeof window > "u" ? $() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : $(), ve = (t) => {
|
|
983
986
|
if (t && t !== !0)
|
|
984
987
|
return t;
|
|
985
|
-
},
|
|
988
|
+
}, We = (t) => {
|
|
986
989
|
const e = {};
|
|
987
990
|
if (Object.keys(t || {}).forEach((n) => {
|
|
988
991
|
t[n] !== void 0 && (e[n] = t[n]);
|
|
989
992
|
}), !(Object.keys(e).length < 1))
|
|
990
993
|
return e;
|
|
991
|
-
},
|
|
994
|
+
}, ze = (t) => {
|
|
992
995
|
const e = {};
|
|
993
996
|
return Object.keys(t || {}).forEach((n) => {
|
|
994
997
|
Array.isArray(t[n]) && t[n]?.length === 0 || t[n] !== void 0 && (e[n] = t[n]);
|
|
995
998
|
}), e;
|
|
996
999
|
};
|
|
997
|
-
function
|
|
1000
|
+
function Ve(t) {
|
|
998
1001
|
if (!(typeof t != "string" && !Array.isArray(t)))
|
|
999
1002
|
return Array.isArray(t) ? t[t.length - 1] : t.split(":")?.slice(-1)[0];
|
|
1000
1003
|
}
|
|
1001
1004
|
function $t(t) {
|
|
1002
1005
|
return t && (t.type === q || t.type === v && t.children.length === 0 || t.type === Text && t.children.trim() === "");
|
|
1003
1006
|
}
|
|
1004
|
-
function
|
|
1007
|
+
function He(t, e) {
|
|
1005
1008
|
return E(typeof t[e] == "function" ? t[e]?.() : []);
|
|
1006
1009
|
}
|
|
1007
1010
|
function E(t = [], e = !0) {
|
|
@@ -1025,7 +1028,7 @@ function Wt(t, ...e) {
|
|
|
1025
1028
|
const c = i[r], f = n?.[r]?.(...e), u = typeof s == "function" ? s?.() : s;
|
|
1026
1029
|
return c === !1 ? o = !1 : c === !0 ? o = f ?? u : m(c) ? B(c) ? o = c : o = f : o = c || f, o === !1 ? !1 : H({ vnode: o, defaultVNode: u }, ...e);
|
|
1027
1030
|
}
|
|
1028
|
-
function
|
|
1031
|
+
function qe(t, ...e) {
|
|
1029
1032
|
const { slots: n, props: r, keys: i, render: s, defaultVNodes: o } = t, c = {};
|
|
1030
1033
|
return i.forEach((f, u) => {
|
|
1031
1034
|
const a = o ? o[u] : null, l = s ? Wt({ slots: n, props: r, key: f, defaultChildren: a }, ...e) : vt({ slots: n, props: r, key: f, render: !1, defaultChildren: a }, ...e);
|
|
@@ -1041,17 +1044,17 @@ export {
|
|
|
1041
1044
|
Y as classNames,
|
|
1042
1045
|
w as cloneDeep,
|
|
1043
1046
|
Gt as cloneDeepWith,
|
|
1044
|
-
|
|
1047
|
+
g as cloneDeepWithImpl,
|
|
1045
1048
|
It as compareArray,
|
|
1046
1049
|
ie as compareArraySort,
|
|
1047
1050
|
oe as compareArrayTimeSort,
|
|
1048
1051
|
Ut as compareTime,
|
|
1049
1052
|
xe as convertValueBoolean,
|
|
1050
1053
|
d as copyProperties,
|
|
1051
|
-
|
|
1052
|
-
|
|
1054
|
+
ye as dataURLtoBlob,
|
|
1055
|
+
ge as dataURLtoFile,
|
|
1053
1056
|
te as deepCopy,
|
|
1054
|
-
|
|
1057
|
+
Me as deepMerge,
|
|
1055
1058
|
S as fileTypes,
|
|
1056
1059
|
E as filterEmpty,
|
|
1057
1060
|
Dt as filterTree,
|
|
@@ -1066,7 +1069,7 @@ export {
|
|
|
1066
1069
|
pe as getBase64,
|
|
1067
1070
|
de as getBlobUrl,
|
|
1068
1071
|
R as getFileSuffix,
|
|
1069
|
-
|
|
1072
|
+
Ve as getKeys,
|
|
1070
1073
|
Bt as getLevelData,
|
|
1071
1074
|
Et as getMaxFloor,
|
|
1072
1075
|
Pt as getMediaInfos,
|
|
@@ -1076,8 +1079,8 @@ export {
|
|
|
1076
1079
|
Xt as getScrollContainer,
|
|
1077
1080
|
vt as getSlot,
|
|
1078
1081
|
Wt as getSlotVNode,
|
|
1079
|
-
|
|
1080
|
-
|
|
1082
|
+
He as getSlotsChildren,
|
|
1083
|
+
qe as getSlotsProps,
|
|
1081
1084
|
re as getSortIndex,
|
|
1082
1085
|
k as getSymbols,
|
|
1083
1086
|
je as getTextWidth,
|
|
@@ -1091,16 +1094,16 @@ export {
|
|
|
1091
1094
|
p as isArray,
|
|
1092
1095
|
F as isBase64,
|
|
1093
1096
|
D as isBoolean,
|
|
1094
|
-
|
|
1097
|
+
De as isBrowser,
|
|
1095
1098
|
we as isDataURLBase64,
|
|
1096
1099
|
j as isDeepEqualReact,
|
|
1097
1100
|
$t as isEmptyElement,
|
|
1098
1101
|
Ht as isFunction,
|
|
1099
|
-
|
|
1102
|
+
Ne as isImg,
|
|
1100
1103
|
Yt as isInContainer,
|
|
1101
1104
|
qt as isJSONStr,
|
|
1102
1105
|
Jt as isMobile,
|
|
1103
|
-
|
|
1106
|
+
Fe as isNil,
|
|
1104
1107
|
Qt as isNotNil,
|
|
1105
1108
|
h as isNumber,
|
|
1106
1109
|
m as isObject,
|
|
@@ -1111,24 +1114,25 @@ export {
|
|
|
1111
1114
|
Z as isString,
|
|
1112
1115
|
X as isTablet,
|
|
1113
1116
|
tt as isTypedArray,
|
|
1114
|
-
|
|
1117
|
+
Pe as isUrl,
|
|
1115
1118
|
jt as isValid,
|
|
1116
1119
|
Se as isWindowsOs,
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
+
Re as keysOf,
|
|
1121
|
+
Le as merge,
|
|
1122
|
+
y as mergeWith,
|
|
1123
|
+
$e as nanoid,
|
|
1120
1124
|
be as off,
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1125
|
+
ve as omitBoolean,
|
|
1126
|
+
We as omitUndefined,
|
|
1127
|
+
ze as omitUndefinedAndEmptyArr,
|
|
1124
1128
|
Ae as on,
|
|
1125
1129
|
U as raf,
|
|
1126
1130
|
Tt as runFunction,
|
|
1127
|
-
|
|
1131
|
+
Ee as scrollTo,
|
|
1128
1132
|
H as slotRender,
|
|
1129
|
-
|
|
1133
|
+
Be as throttleByAnimationFrame,
|
|
1130
1134
|
Ie as toChinesNum,
|
|
1131
1135
|
Oe as toConvertNumberShow,
|
|
1132
1136
|
ue as treeData,
|
|
1133
|
-
|
|
1137
|
+
_e as useDeepMerge
|
|
1134
1138
|
};
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.84
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
7
7
|
* Description: Gx Design Pro Utils
|
|
8
|
-
* Date Created: 2025-
|
|
8
|
+
* Date Created: 2025-12-14
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
12
|
(function(s,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(s=typeof globalThis<"u"?globalThis:s||self,d(s.GPorUtils={},s.vue))})(this,(function(s,d){"use strict";class le{constructor(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}_utf8_encode(t){t=t.replace(/\r\n/g,`
|
|
13
|
-
`);let r="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);i<128?r+=String.fromCharCode(i):i>127&&i<2048?(r+=String.fromCharCode(i>>6|192),r+=String.fromCharCode(i&63|128)):(r+=String.fromCharCode(i>>12|224),r+=String.fromCharCode(i>>6&63|128),r+=String.fromCharCode(i&63|128))}return r}_utf8_decode(t){let r="",n=0,i=0,c=0,o=0;for(;n<t.length;)i=t.charCodeAt(n),i<128?(r+=String.fromCharCode(i),n++):i>191&&i<224?(c=t.charCodeAt(n+1),r+=String.fromCharCode((i&31)<<6|c&63),n+=2):(c=t.charCodeAt(n+1),o=t.charCodeAt(n+2),r+=String.fromCharCode((i&15)<<12|(c&63)<<6|o&63),n+=3);return r}encode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=this._utf8_encode(t);l<t.length;)n=t.charCodeAt(l++),i=t.charCodeAt(l++),c=t.charCodeAt(l++),o=n>>2,f=(n&3)<<4|i>>4,u=(i&15)<<2|c>>6,a=c&63,Number.isNaN(i)?u=a=64:Number.isNaN(c)&&(a=64),r=r+this._keyStr.charAt(o)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return r}decode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");l<t.length;)o=this._keyStr.indexOf(t.charAt(l++)),f=this._keyStr.indexOf(t.charAt(l++)),u=this._keyStr.indexOf(t.charAt(l++)),a=this._keyStr.indexOf(t.charAt(l++)),n=o<<2|f>>4,i=(f&15)<<4|u>>2,c=(u&3)<<6|a,r=r+String.fromCharCode(n),u!==64&&(r=r+String.fromCharCode(i)),a!==64&&(r=r+String.fromCharCode(c));return r=this._utf8_decode(r),r}}function v(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function I(e){return typeof e=="boolean"}function p(e){return typeof e=="number"}function g(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&v(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function de(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function ye(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!V())}function V(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if(W(n))t.push(n);else if(g(n))for(let i=0;i<n.length;i++){const c=z(n[i]);c&&t.push(c)}else if(w(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}function he(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&Object.prototype.hasOwnProperty.call(n,r[i]))n=n[r[i]];else return;return n}const O=typeof window>"u";function me(e){return e.replace(/[-_](.)/g,(t,r)=>r.toUpperCase())}const F=function(e,t){if(O||!e||!t)return"";t=me(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const n=document?.defaultView?.getComputedStyle(e,"");return n?n[t]:""}catch{return e.style[t]}},q=(e,t)=>O?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),pe=(e,t)=>{if(O)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(q(r,t))return r;r=r.parentNode}return r},we=(e,t)=>{if(O||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return P(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!P(e)&&typeof n!="number"&&(n=(e.ownerDocument||e).documentElement?.[r]),n}function x(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ae(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function J(e){return e==null||typeof e!="object"&&typeof e!="function"}function Z(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}const Se="[object RegExp]",be="[object String]",Oe="[object Number]",je="[object Boolean]",Ue="[object Arguments]",Ie="[object Symbol]",Re="[object Date]",Be="[object Map]",Ne="[object Set]",De="[object Array]",Ee="[object ArrayBuffer]",Fe="[object Object]",Pe="[object DataView]",Le="[object Uint8Array]",Me="[object Uint8ClampedArray]",_e="[object Uint16Array]",$e="[object Uint32Array]",ve="[object Int8Array]",We="[object Int16Array]",Ve="[object Int32Array]",ze="[object Float32Array]",qe="[object Float64Array]";function He(e,t){return A(e,void 0,e,new Map,t)}function A(e,t,r,n=new Map,i=void 0){const c=i?.(e,t,r,n);if(c!==void 0)return c;if(J(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=Array.from({length:e.length});n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[f,u]of e)o.set(f,A(u,f,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const f of e)o.add(A(f,void 0,r,n,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Z(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),y(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(e instanceof Error){const o=new e.constructor;return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,y(o,e,r,n,i),o}if(typeof e=="boolean"){const o=!!e.valueOf();return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="number"){const o=Number(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="string"){const o=String(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="object"&&xe(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),y(o,e,r,n,i),o}return e}function y(e,t,r=e,n,i){const c=[...Object.keys(t),...x(t)];for(let o=0;o<c.length;o++){const f=c[o],u=Object.getOwnPropertyDescriptor(e,f);(u==null||u.writable)&&(e[f]=A(t[f],f,r,n,i))}}function xe(e){switch(Ae(e)){case Ue:case De:case Ee:case Pe:case je:case Re:case ze:case qe:case ve:case We:case Ve:case Be:case Oe:case Fe:case Se:case Ne:case be:case Ie:case Le:case Me:case _e:case $e:return!0;default:return!1}}function S(e){return A(e,void 0,e,new Map,void 0)}const j={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]},X=e=>e!=null&&e!=="";let G=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(G=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let K=0;const L=new Map;function Q(e){L.delete(e)}function R(e,t=1){K+=1;const r=K;function n(i){if(i===0)Q(r),e();else{const c=G(()=>{n(i-1)});L.set(r,c)}}return n(t),r}R.cancel=e=>{const t=L.get(e);return Q(t),Y(t)};function Je(e){return e!=null}function b(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Ze=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Xe=(e,t)=>e?g(e)?e.join("-"):e.toString():`${t||0}`;function Ge(e,{align:t,showIndex:r}){const n=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:C().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function Ye(e,...t){return typeof e=="function"?e(...t):e}function Ke(e){return JSON.parse(JSON.stringify(e))}function Qe(e,t){if(w(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function ke(e=[],t,r="children"){function n(i,c){return c.map((o,f)=>{const u=`${i}-${f+1}`;return o[r]&&(o[r]=n(u,o[r])),o.sortIndex=u,o})}return S(e).map((i,c)=>{const o=w(t)&&t.current||1,f=w(t)&&t.pageSize||10,u=`${(o-1)*f+(c+1)}`;return i[r]&&(i[r]=n(`${u}`,i[r])),i.sortIndex=u,i})}function Te(e,t){return g(e)?e?.filter((r,n)=>{if(p(t))return n<=t-1;if(g(t)&&t.length===2){const i=t[0]-1,c=t[1]?t[1]-1:e.length-1;return n<=c&&n>=i}else if(g(t)&&t.length===1){const i=t[0]-1,c=e.length-1;return n<=c&&n>=i}return!0}):[]}function k(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=e[r],o=t[r];let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function T(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=new Date(e[r]),o=new Date(t[r]);let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function Ce(e,t,r=0){return e.sort((n,i)=>k(n,i,t,r))}function et(e,t,r=0){return e.sort((n,i)=>T(n,i,t,r))}function tt(e){let t=S(e);const r=new Set(t);return t=Array.from(r),t}function nt(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function rt(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function C(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],c=r||n.length;let o,f;if(t)for(o=0;o<t;o+=1)i[o]=n[Number.parseInt(String(Math.random()*c))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",o=0;o<36;o+=1)i[o]||(f=Math.random()*16,i[o]=n[o===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,c;for(c=0;c<36;c+=1)c===8||c===13||c===18||c===23?r[c]="-":c===14?r[c]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[c]=t[c===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function ee(e,t){if(!Array.isArray(e)||e.length===0)return 0;const r=t||"children";return Math.max(...e.map(n=>{const i=n[r];return 1+(i?ee(i,r):0)}))}function te(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),g(n[t])&&n[t].length>0&&(r=r.concat(te(n[t],t)))}),r}function it(e,t){if(!e||!g(e)||e?.length===0)return[];const{id:r="id",parentId:n="parentId",children:i="children",emptyChildren:c=!0}=t||{},o=t?.rootId??0,f=S(e);return f.map(u=>(!c&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const a=f.filter(l=>u[r]===l[n]);return a.length>0?u[i]=a:c&&(u[i]=[]),o===!1?!0:u[n]===o})}function ne(e,t){return e.map(r=>{const n={...r};return n.children&&(n.children=ne(n.children,t)),t(n)||n.children&&n.children.length>0?n:null}).filter(Boolean)}function ot(e,t,r){const{value:n,children:i}=r||{value:"value",children:"children"};let c=[];function o(f,u){if(f[n]===t)return c=[...u,f[n]],!0;if(f[i]){for(const a of f[i])if(o(a,[...u,f[n]]))return!0}return!1}for(const f of e)if(o(f,[]))break;return c}function ct(e){return e&&g(e)?e[e.length-1]:null}function re(e,t,r){const n=r?.value||"id",i=r?.children||"children";for(const c of e){if(c[n]===t)return c;const o=c[i];if(o){const f=re(o,t,r);if(f)return f}}}function ft(e){return URL.createObjectURL(e)}function st(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function ut(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const c=new Uint8Array(i);for(;i--;)c[i]=n.charCodeAt(i);return new Blob([c],{type:r})}function at(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let c=i.length;const o=new Uint8Array(c);for(;c--;)o[c]=i.charCodeAt(c);return new File([o],t,{type:n})}function lt(e,t,r){return new window.File([e],t,{type:r})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function B(e){if(!e||typeof e!="string")return"";const t=ie(e),r=t.lastIndexOf(".");return r>0&&`${t?.substring?.(r)?.split("?")?.[0]}`?.split(".")?.[1]||""}function U(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return N(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=B(e).toLowerCase(),j.imageType.includes(r)?"1":j.videoType.includes(r)?"3":j.audioType.includes(r)?"2":"4"}function oe(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function c(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):N(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(o=>{let f;if(r==="4"){o(i);return}r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){c(),i.play=!0,i.width=f.width||0,i.height=f.height||0,o(i),f=null}:f.oncanplay=function(){c(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,o(i),f=null},f.onerror=function(){c(),o(i),f=null}})}async function dt(e){const{url:t="",currentTime:r,videoSuffix:n="",videoAllowPlay:i=!1}=e;let c="",o=n,f="1",u;return t instanceof File?(c=URL.createObjectURL(t),o=B(t.name),f=U(t.name)):t instanceof Blob?(c=URL.createObjectURL(t),f=U(t)):N(t)?(c=t,f=U(t)):(t.includes("https")||t.includes("http"))&&(c=t,o=B(t),f=U(t)),(o?j.videoAllowType.includes(o.toLowerCase()):!1)?i?M(c,r):(u=await oe({url:c,fileType:f}),u.play?M(c,r):new Promise(l=>{l("")})):new Promise(l=>{l("")})}async function M(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async()=>{let i;for(n?.addEventListener("seeked",async()=>{i&&i()});t<(n?.duration||0);){n&&(n.currentTime=t),await new Promise(m=>i=m);const c=document.createElement("canvas"),o=.8,f=c.getContext("2d"),u=n?.videoWidth||0*o,a=n?.videoHeight||0*o,l=0;c.width=n?.videoWidth||0*o,c.height=n?.videoHeight||0*o,n&&f.drawImage(n,0,0,u+l,a+l),n=null,r(u===0||a===0?"":c.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function gt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function yt(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function ht(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function mt(){return/windows|win32/i.test(navigator.userAgent)}function pt(e){return I(e)?e:!!e}function _(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const c=i[0];if(c.includes(".")){const[o,f]=c.split(".");if(/^0*$/.test(f))return o}return c}return t.toString()}function wt(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},c=p(i)?i:1e4,o=p(n)?n:2,f=r?e<c?"":e<1e8?"万":"亿":e<c?"":e<1e8?"w":"亿";if(!p(e))return{str:`${e}`,number:`${e}`};if(e<c)return{str:`${e}`,number:`${e}`};if(o===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${f}`,number:a,unit:f}}let u;return e<1e8?(u=_(o,e/1e4),{str:u+f,number:u,unit:f}):(u=_(o,e/1e8),{str:u+f,number:u,unit:f})}function At(e,t){let r=0;const n=I(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",c={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let o=document.querySelector(`#${i}`);if(!o){const u=document.createElement("div");u.id=i,document.body.appendChild(u),o=document.querySelector(`#${i}`)}Object.assign(o.style,c);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||w(t.cssObject))&&Object.assign(f.style,t.cssObject),o.append(f),r=f.getBoundingClientRect()[t.type||"width"],n&&o.removeChild(f),r}function St(e){e=p(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],r=["","十","百","千","万"];e=Number.parseInt(`${e}`);const n=o=>{const f=o.toString().split("").reverse();let u="";for(let a=0;a<f.length;a++)u=(a===0&&f[a]==="0"||a>0&&f[a]==="0"&&f[a-1]==="0"?"":(e<20&&a>0?"":t[f[a]])+(f[a]==="0"?r[0]:r[a]))+u;return u},i=Math.floor(e/1e4);let c=e%1e4;return c.toString().length<4&&(c="0"+c),i?n(i)+"万"+n(c):n(e)}function bt(e,t){Object.keys(e).forEach(r=>{t(r,e[r])})}function Ot(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function jt(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,c=r(),o=H(c,!0),f=Date.now(),u=()=>{const l=Date.now()-f,m=Ot(l>i?i:l,o,e,i);P(c)?c.scrollTo(window.pageXOffset,m):c instanceof HTMLDocument||c.constructor.name==="HTMLDocument"?c.documentElement.scrollTop=m:c.scrollTop=m,l<i?R(u):typeof n=="function"&&n()};c&&R(u)}function Ut(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const It=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Rt=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!It;function D(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,c,o;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(!D(e[c],t[c],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;for(c of e.entries())if(!D(c[1],t.get(c[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(c=i;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[c]))return!1;for(c=i;c--!==0;){const f=o[c];if(!r?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!D(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}function Bt(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const Nt=e=>e==null,Dt=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function Et(e){return e==="__proto__"}function h(e,t,r){const n=Object.keys(t);for(let i=0;i<n.length;i++){const c=n[i];if(Et(c))continue;const o=t[c],f=e[c],u=r(f,o,c,e,t);u!==void 0?e[c]=u:b(o)?b(f)?e[c]=h(f,o,r):e[c]=h({},o,r):e[c]=o}return e}const Ft=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])Object.prototype.hasOwnProperty.call(e[i],n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};function Pt(e,t){return h(S(e),t,function r(n,i){if(b(i))return b(n)?h(S(n),i,r):h({},i,r)})}function Lt(e,t){return h(e,t,function r(n,i){if(b(i))return b(n)?h(n,i,r):h({},i,r)})}let ce=0;const fe=(e=21)=>{if(typeof window>"u"||!window.crypto)return(ce+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},Mt=()=>typeof window>"u"?fe():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():fe(),_t=e=>{if(e&&e!==!0)return e},$t=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},vt=e=>{const t={};return Object.keys(e||{}).forEach(r=>{Array.isArray(e[r])&&e[r]?.length===0||e[r]!==void 0&&(t[r]=e[r])}),t};function Wt(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function se(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Vt(e,t){return E(typeof e[t]=="function"?e[t]?.():[])}function E(e=[],t=!0){const r=Array.isArray(e)?e:[e],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...E(i,t)):i?.type===d.Fragment||i?.type==="template"?n.push(...E(i.children,t)):i&&d.isVNode(i)?t&&!se(i)?n.push(i):t||n.push(i):X(i)&&n.push(i)}),n}function $({vnode:e,defaultVNode:t},...r){return e===!1?null:typeof e=="function"?e?.(...r):e||t}function ue(e,...t){const{slots:r,key:n="default",render:i,props:c,defaultChildren:o}=e;let f;const u=c[n],a=r?.[n],l=typeof o=="function"?o?.():o;return u===!1?f=!1:u===!0?f=a??l:w(u)&&i?d.isVNode(u)?f=u:f=a:f=u||a,f===!1?!1:i?$({vnode:f,defaultVNode:l},...t):f}function ae(e,...t){const{slots:r,key:n="default",props:i,defaultChildren:c}=e;let o;const f=i[n],u=r?.[n]?.(...t),a=typeof c=="function"?c?.():c;return f===!1?o=!1:f===!0?o=u??a:w(f)?d.isVNode(f)?o=f:o=u:o=f||u,o===!1?!1:$({vnode:o,defaultVNode:a},...t)}function zt(e,...t){const{slots:r,props:n,keys:i,render:c,defaultVNodes:o}=e,f={};return i.forEach((u,a)=>{const l=o?o[a]:null,m=c?ae({slots:r,props:n,key:u,defaultChildren:l},...t):ue({slots:r,props:n,key:u,render:!1,defaultChildren:l},...t);(I(m)||m)&&(f[u]=m)}),f}s.Base64=le,s.arrayRepeat=tt,s.arraySlice=Te,s.blobToDataURL=lt,s.checkFileType=U,s.classNames=z,s.cloneDeep=S,s.cloneDeepWith=He,s.cloneDeepWithImpl=A,s.compareArray=k,s.compareArraySort=Ce,s.compareArrayTimeSort=et,s.compareTime=T,s.convertValueBoolean=pt,s.copyProperties=y,s.dataURLtoBlob=ut,s.dataURLtoFile=at,s.deepCopy=Ke,s.deepMerge=Pt,s.fileTypes=j,s.filterEmpty=E,s.filterTree=ne,s.findSourceByTree=re,s.findValueAndAncestors=ot,s.forInObject=bt,s.formatDuration=rt,s.formatNumber=_,s.genColumnKey=Xe,s.generateVideoPicture=M,s.getArrayLast=ct,s.getBase64=st,s.getBlobUrl=ft,s.getFileSuffix=B,s.getKeys=Wt,s.getLevelData=te,s.getMaxFloor=ee,s.getMediaInfos=oe,s.getPrefixCls=Ze,s.getRandomNumber=C,s.getScroll=H,s.getScrollContainer=pe,s.getSlot=ue,s.getSlotVNode=ae,s.getSlotsChildren=Vt,s.getSlotsProps=zt,s.getSortIndex=ke,s.getSymbols=x,s.getTextWidth=At,s.getValueFromObjectByKey=he,s.getVideoCoverPicture=dt,s.getVideoFileUrl=ie,s.handleCurrentPage=Qe,s.handleEmptyField=nt,s.handleShowIndex=Ge,s.is=v,s.isArray=g,s.isBase64=N,s.isBoolean=I,s.isBrowser=Rt,s.isDataURLBase64=gt,s.isDeepEqualReact=D,s.isEmptyElement=se,s.isFunction=de,s.isImg=Bt,s.isInContainer=we,s.isJSONStr=ge,s.isMobile=ye,s.isNil=Nt,s.isNotNil=Je,s.isNumber=p,s.isObject=w,s.isPlainObject=b,s.isPrimitive=J,s.isScroll=q,s.isServer=O,s.isString=W,s.isTablet=V,s.isTypedArray=Z,s.isUrl=Dt,s.isValid=X,s.isWindowsOs=mt,s.merge=Ft,s.mergeWith=h,s.nanoid=Mt,s.off=ht,s.omitBoolean=_t,s.omitUndefined=$t,s.omitUndefinedAndEmptyArr=vt,s.on=yt,s.raf=R,s.runFunction=Ye,s.scrollTo=jt,s.slotRender=$,s.throttleByAnimationFrame=Ut,s.toChinesNum=St,s.toConvertNumberShow=wt,s.treeData=it,s.useDeepMerge=Lt,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
13
|
+
`);let r="";for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);i<128?r+=String.fromCharCode(i):i>127&&i<2048?(r+=String.fromCharCode(i>>6|192),r+=String.fromCharCode(i&63|128)):(r+=String.fromCharCode(i>>12|224),r+=String.fromCharCode(i>>6&63|128),r+=String.fromCharCode(i&63|128))}return r}_utf8_decode(t){let r="",n=0,i=0,c=0,o=0;for(;n<t.length;)i=t.charCodeAt(n),i<128?(r+=String.fromCharCode(i),n++):i>191&&i<224?(c=t.charCodeAt(n+1),r+=String.fromCharCode((i&31)<<6|c&63),n+=2):(c=t.charCodeAt(n+1),o=t.charCodeAt(n+2),r+=String.fromCharCode((i&15)<<12|(c&63)<<6|o&63),n+=3);return r}encode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=this._utf8_encode(t);l<t.length;)n=t.charCodeAt(l++),i=t.charCodeAt(l++),c=t.charCodeAt(l++),o=n>>2,f=(n&3)<<4|i>>4,u=(i&15)<<2|c>>6,a=c&63,Number.isNaN(i)?u=a=64:Number.isNaN(c)&&(a=64),r=r+this._keyStr.charAt(o)+this._keyStr.charAt(f)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return r}decode(t){let r="",n,i,c,o,f,u,a,l=0;for(t=t.replace(/[^A-Z0-9+/=]/gi,"");l<t.length;)o=this._keyStr.indexOf(t.charAt(l++)),f=this._keyStr.indexOf(t.charAt(l++)),u=this._keyStr.indexOf(t.charAt(l++)),a=this._keyStr.indexOf(t.charAt(l++)),n=o<<2|f>>4,i=(f&15)<<4|u>>2,c=(u&3)<<6|a,r=r+String.fromCharCode(n),u!==64&&(r=r+String.fromCharCode(i)),a!==64&&(r=r+String.fromCharCode(c));return r=this._utf8_decode(r),r}}function v(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function I(e){return typeof e=="boolean"}function p(e){return typeof e=="number"}function g(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function w(e){return e!==null&&v(e,"Object")}function W(e){return typeof e=="string"||e instanceof String}function de(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ge(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function ye(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!V())}function V(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function z(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(n){if(W(n))t.push(n);else if(g(n))for(let i=0;i<n.length;i++){const c=z(n[i]);c&&t.push(c)}else if(w(n))for(const i in n)n[i]&&t.push(i)}}return t.filter(r=>r).join(" ")}function he(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const r=Array.isArray(t)?t:t.split(":");let n=e;for(let i=0;i<r.length;i++)if(n&&Object.prototype.hasOwnProperty.call(n,r[i]))n=n[r[i]];else return;return n}const O=typeof window>"u";function me(e){return e.replace(/[-_](.)/g,(t,r)=>r.toUpperCase())}const F=function(e,t){if(O||!e||!t)return"";t=me(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const n=document?.defaultView?.getComputedStyle(e,"");return n?n[t]:""}catch{return e.style[t]}},q=(e,t)=>O?void 0:(t==null?F(e,"overflow"):t?F(e,"overflow-y"):F(e,"overflow-x")).match(/(scroll|auto|overlay)/),pe=(e,t)=>{if(O)return;let r=e;for(;r;){if([window,document,document.documentElement].includes(r))return window;if(q(r,t))return r;r=r.parentNode}return r},we=(e,t)=>{if(O||!e||!t)return!1;const r=e.getBoundingClientRect();let n;return[window,document,document.documentElement,null,void 0].includes(t)?n={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:n=t.getBoundingClientRect(),r.top<n.bottom&&r.bottom>n.top&&r.right>n.left&&r.left<n.right};function P(e){return e!=null&&e===e.window}function H(e,t){if(typeof window>"u")return 0;const r=t?"scrollTop":"scrollLeft";let n=0;return P(e)?n=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?n=e.documentElement[r]:e&&(n=e[r]),e&&!P(e)&&typeof n!="number"&&(n=(e.ownerDocument||e).documentElement?.[r]),n}function J(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ae(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function x(e){return e==null||typeof e!="object"&&typeof e!="function"}function Z(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}const Se="[object RegExp]",be="[object String]",Oe="[object Number]",je="[object Boolean]",Ue="[object Arguments]",Ie="[object Symbol]",Re="[object Date]",Be="[object Map]",Ne="[object Set]",De="[object Array]",Ee="[object ArrayBuffer]",Fe="[object Object]",Pe="[object DataView]",Le="[object Uint8Array]",Me="[object Uint8ClampedArray]",_e="[object Uint16Array]",$e="[object Uint32Array]",ve="[object Int8Array]",We="[object Int16Array]",Ve="[object Int32Array]",ze="[object Float32Array]",qe="[object Float64Array]";function He(e,t){return A(e,void 0,e,new Map,t)}function A(e,t,r,n=new Map,i=void 0){const c=i?.(e,t,r,n);if(c!==void 0)return c;if(x(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){const o=Array.from({length:e.length});n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;n.set(e,o);for(const[f,u]of e)o.set(f,A(u,f,r,n,i));return o}if(e instanceof Set){const o=new Set;n.set(e,o);for(const f of e)o.add(A(f,void 0,r,n,i));return o}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Z(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,o);for(let f=0;f<e.length;f++)o[f]=A(e[f],f,r,n,i);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,o),y(o,e,r,n,i),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return n.set(e,o),y(o,e,r,n,i),o}if(e instanceof Error){const o=new e.constructor;return n.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,y(o,e,r,n,i),o}if(typeof e=="boolean"){const o=!!e.valueOf();return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="number"){const o=Number(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="string"){const o=String(e.valueOf());return n.set(e,o),y(o,e,r,n,i),o}if(typeof e=="object"&&Je(e)){const o=Object.create(Object.getPrototypeOf(e));return n.set(e,o),y(o,e,r,n,i),o}return e}function y(e,t,r=e,n,i){const c=[...Object.keys(t),...J(t)];for(let o=0;o<c.length;o++){const f=c[o],u=Object.getOwnPropertyDescriptor(e,f);(u==null||u.writable)&&(e[f]=A(t[f],f,r,n,i))}}function Je(e){switch(Ae(e)){case Ue:case De:case Ee:case Pe:case je:case Re:case ze:case qe:case ve:case We:case Ve:case Be:case Oe:case Fe:case Se:case Ne:case be:case Ie:case Le:case Me:case _e:case $e:return!0;default:return!1}}function S(e){return A(e,void 0,e,new Map,void 0)}const j={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3","ogg","wav","aac","m4a","webm"],imageType:["jpeg","jpg","png","gif","bmp","tiff","tif","webp","heic","heif","svg","ico","raw","cr2","nef","arw","dng","psd","eps"],videoType:["mp4","avi","mov","wmv","mkv","flv","webm","mpeg","mpg","3gp","ogv","mxf","vob","rm","rmvb","ts","mts","m2ts","divx","xvid"],audioType:["mp3","wav","aac","flac","ogg","wma","m4a","alac","opus","amr","aiff","au","pcm","ape"]},X=e=>e!=null&&e!=="";let G=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(G=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let K=0;const L=new Map;function Q(e){L.delete(e)}function R(e,t=1){K+=1;const r=K;function n(i){if(i===0)Q(r),e();else{const c=G(()=>{n(i-1)});L.set(r,c)}}return n(t),r}R.cancel=e=>{const t=L.get(e);return Q(t),Y(t)};function xe(e){return e!=null}function b(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}const Ze=({suffixCls:e,customizePrefixCls:t,isPor:r,className:n})=>{const i=n||(r?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Xe=(e,t)=>e?g(e)?e.join("-"):e.toString():`${t||0}`;function Ge(e,{align:t,showIndex:r}){const n=S(e);if(r&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];n.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:C().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else n.filter(i=>i.dataIndex!=="sortIndex");return n}function Ye(e,...t){return typeof e=="function"?e(...t):e}function Ke(e){return JSON.parse(JSON.stringify(e))}function Qe(e,t){if(w(e)){const{pageSize:r=10,total:n=0}=e;let{current:i=1}=e;return n-t<=r*(i-1)&&(i=i-1),i===0?1:i}return 1}function ke(e=[],t,r="children"){function n(i,c){return c.map((o,f)=>{const u=`${i}-${f+1}`;return o[r]&&(o[r]=n(u,o[r])),o.sortIndex=u,o})}return S(e).map((i,c)=>{const o=w(t)&&t.current||1,f=w(t)&&t.pageSize||10,u=`${(o-1)*f+(c+1)}`;return i[r]&&(i[r]=n(`${u}`,i[r])),i.sortIndex=u,i})}function Te(e,t){return g(e)?e?.filter((r,n)=>{if(p(t))return n<=t-1;if(g(t)&&t.length===2){const i=t[0]-1,c=t[1]?t[1]-1:e.length-1;return n<=c&&n>=i}else if(g(t)&&t.length===1){const i=t[0]-1,c=e.length-1;return n<=c&&n>=i}return!0}):[]}function k(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=e[r],o=t[r];let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function T(e,t,r,n=0){const i=p(n)&&(n===0||n===1)?n:0,c=new Date(e[r]),o=new Date(t[r]);let f=0;return c<o?f=i===0?-1:0:c>o&&(f=i===0?0:-1),f}function Ce(e,t,r=0){return e.sort((n,i)=>k(n,i,t,r))}function et(e,t,r=0){return e.sort((n,i)=>T(n,i,t,r))}function tt(e){let t=S(e);const r=new Set(t);return t=Array.from(r),t}function nt(e,t){const r=["null","undefined"];let n=!0;return e===0?n=!0:r.includes(e)?n=!1:e||(n=!1),n?{value:e,success:n}:{value:t===""?t:t||"-",success:n}}function rt(e){let t="";if(e>-1){const r=Math.floor(e/3600),n=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));r<10?t="0"+r+":":t=r+":",n<10&&(t+="0"),t+=n+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function C(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,r){const n=e,i=[],c=r||n.length;let o,f;if(t)for(o=0;o<t;o+=1)i[o]=n[Number.parseInt(String(Math.random()*c))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",o=0;o<36;o+=1)i[o]||(f=Math.random()*16,i[o]=n[o===19?f&&3||8:f]);return i.join("")},uuidFast(){const t=e,r=Array.from({length:36});let n=0,i,c;for(c=0;c<36;c+=1)c===8||c===13||c===18||c===23?r[c]="-":c===14?r[c]="4":(n<=2&&(n=33554432+Math.random()*16777216||0),i=n&&15,n=n>4,r[c]=t[c===19?i&&3||8:i]);return r.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16||0;return(t==="x"?r:r&&3||8).toString(16)})}}}function ee(e,t){if(!Array.isArray(e)||e.length===0)return 0;const r=t||"children";return Math.max(...e.map(n=>{const i=n[r];return 1+(i?ee(i,r):0)}))}function te(e,t="children"){let r=[];return e.forEach(n=>{r.push(n),g(n[t])&&n[t].length>0&&(r=r.concat(te(n[t],t)))}),r}function it(e,t){if(!e||!g(e)||e?.length===0)return[];const{id:r="id",parentId:n="parentId",children:i="children",emptyChildren:c=!0}=t||{},o=t?.rootId??0,f=S(e);return f.map(u=>(!c&&u[i]&&u[i]?.length===0&&delete u[i],u)).filter(u=>{const a=f.filter(l=>u[r]===l[n]);return a.length>0?u[i]=a:c&&(u[i]=[]),o===!1?!0:u[n]===o})}function ne(e,t){return e.map(r=>{const n={...r};return n.children&&(n.children=ne(n.children,t)),t(n)||n.children&&n.children.length>0?n:null}).filter(Boolean)}function ot(e,t,r){const{value:n,children:i}=r||{value:"value",children:"children"};let c=[];function o(f,u){if(f[n]===t)return c=[...u,f[n]],!0;if(f[i]){for(const a of f[i])if(o(a,[...u,f[n]]))return!0}return!1}for(const f of e)if(o(f,[]))break;return c}function ct(e){return e&&g(e)?e[e.length-1]:null}function re(e,t,r){const n=r?.value||"id",i=r?.children||"children";for(const c of e){if(c[n]===t)return c;const o=c[i];if(o){const f=re(o,t,r);if(f)return f}}}function ft(e){return URL.createObjectURL(e)}function st(e){return new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=i=>r(i)})}function ut(e){const t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=atob(t[1]);let i=n.length;const c=new Uint8Array(i);for(;i--;)c[i]=n.charCodeAt(i);return new Blob([c],{type:r})}function at(e,t){const r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]);let c=i.length;const o=new Uint8Array(c);for(;c--;)o[c]=i.charCodeAt(c);return new File([o],t,{type:n})}function lt(e,t,r){return new window.File([e],t,{type:r})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function B(e){if(!e||typeof e!="string")return"";const t=ie(e),r=t.lastIndexOf(".");return r>0&&`${t?.substring?.(r)?.split("?")?.[0]}`?.split(".")?.[1]||""}function U(e,t){if(t)return t;if(!e||e==="data:")return"4";let r="4";return N(e)?e.includes("data:image/")?r="png":e.includes("data:video/")?r="mp4":e.includes("data:audio/")&&(r="mp3"):e instanceof Blob?(e=String(e),e.includes("image")?r="png":e.includes("video")?r="mp4":e.includes("audio")&&(r="mp3")):r=B(e).toLowerCase(),j.imageType.includes(r)?"1":j.videoType.includes(r)?"3":j.audioType.includes(r)?"2":"4"}function oe(e){const{url:t="",fileType:r="1"}=e||{};let n="",i={play:!1,height:0,size:0,width:0,duration:0};function c(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?n=URL.createObjectURL(t):N(t)?n=t:t instanceof Blob?n=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(n=t),new Promise(o=>{let f;if(r==="4"){o(i);return}r==="1"?(f=document.createElement("img"),f.src=n):r==="2"?(f=document.createElement("audio"),f.src=n):r==="3"&&(f=document.createElement("video"),f.src=n),r==="1"?f.onload=function(){c(),i.play=!0,i.width=f.width||0,i.height=f.height||0,o(i),f=null}:f.oncanplay=function(){c(),i.play=!0,i.width=f?.videoWidth||0,i.height=f?.videoHeight||0,i.duration=f?.duration||0,o(i),f=null},f.onerror=function(){c(),o(i),f=null}})}async function dt(e){const{url:t="",currentTime:r,videoSuffix:n="",videoAllowPlay:i=!1}=e;let c="",o=n,f="1",u;return t instanceof File?(c=URL.createObjectURL(t),o=B(t.name),f=U(t.name)):t instanceof Blob?(c=URL.createObjectURL(t),f=U(t)):N(t)?(c=t,f=U(t)):(t.includes("https")||t.includes("http"))&&(c=t,o=B(t),f=U(t)),(o?j.videoAllowType.includes(o.toLowerCase()):!1)?i?M(c,r):(u=await oe({url:c,fileType:f}),u.play?M(c,r):new Promise(l=>{l("")})):new Promise(l=>{l("")})}async function M(e,t=0){return new Promise(r=>{let n=document.createElement("video");n&&(n.controls=!0,n.muted=!0,n.setAttribute("src",e),n.setAttribute("muted",String(!0)),n.setAttribute("crossorigin","anonymous"),n.setAttribute("autoplay",String(!0)),n.addEventListener("loadeddata",async()=>{let i;for(n?.addEventListener("seeked",async()=>{i&&i()});t<(n?.duration||0);){n&&(n.currentTime=t),await new Promise(m=>i=m);const c=document.createElement("canvas"),o=.8,f=c.getContext("2d"),u=n?.videoWidth||0*o,a=n?.videoHeight||0*o,l=0;c.width=n?.videoWidth||0*o,c.height=n?.videoHeight||0*o,n&&f.drawImage(n,0,0,u+l,a+l),n=null,r(u===0||a===0?"":c.toDataURL("image/png",1))}}))})}function N(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(r=>e.includes(r)))}function gt(e){return typeof e=="string"&&/^data:(?:image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function yt(e,t,r,n=!1){e&&t&&r&&e.addEventListener(t,r,n)}function ht(e,t,r,n=!1){e&&t&&r&&e.removeEventListener(t,r,n)}function mt(){return/windows|win32/i.test(navigator.userAgent)}function pt(e){return I(e)?e:!!e}function _(e,t){const r=`^\\d+(?:\\.\\d{0,${e}})?`,n=new RegExp(r),i=t.toString().match(n);if(i){const c=i[0];if(c.includes(".")){const[o,f]=c.split(".");if(/^0*$/.test(f))return o}return c}return t.toString()}function wt(e,t){const{toChinese:r=!1,fixed:n=2,min:i=1e4}=t||{},c=p(i)?i:1e4,o=p(n)?n:2,f=r?e<c?"":e<1e8?"万":"亿":e<c?"":e<1e8?"w":"亿";if(!p(e))return{str:`${e}`,number:`${e}`};if(e<c)return{str:`${e}`,number:`${e}`};if(o===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${f}`,number:a,unit:f}}let u;return e<1e8?(u=_(o,e/1e4),{str:u+f,number:u,unit:f}):(u=_(o,e/1e8),{str:u+f,number:u,unit:f})}function At(e,t){let r=0;const n=I(t.removeAfter)?t.removeAfter:!0,i=t.id||"hiddenElement",c={opacity:0,visibility:"hidden",position:"fixed",zIndex:-1,top:0,left:0};let o=document.querySelector(`#${i}`);if(!o){const u=document.createElement("div");u.id=i,document.body.appendChild(u),o=document.querySelector(`#${i}`)}Object.assign(o.style,c);const f=document.createElement(t.createName||"span");return f.innerHTML=e,(t.cssObject||w(t.cssObject))&&Object.assign(f.style,t.cssObject),o.append(f),r=f.getBoundingClientRect()[t.type||"width"],n&&o.removeChild(f),r}function St(e){e=p(e)&&!Number.isNaN(e)?e:0;const t=["零","一","二","三","四","五","六","七","八","九"],r=["","十","百","千","万"];e=Number.parseInt(`${e}`);const n=o=>{const f=o.toString().split("").reverse();let u="";for(let a=0;a<f.length;a++)u=(a===0&&f[a]==="0"||a>0&&f[a]==="0"&&f[a-1]==="0"?"":(e<20&&a>0?"":t[f[a]])+(f[a]==="0"?r[0]:r[a]))+u;return u},i=Math.floor(e/1e4);let c=e%1e4;return c.toString().length<4&&(c="0"+c),i?n(i)+"万"+n(c):n(e)}function bt(e,t){Object.keys(e).forEach(r=>{t(r,e[r])})}function Ot(e){return Object.keys(e)}function jt(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Ut(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,c=r(),o=H(c,!0),f=Date.now(),u=()=>{const l=Date.now()-f,m=jt(l>i?i:l,o,e,i);P(c)?c.scrollTo(window.pageXOffset,m):c instanceof HTMLDocument||c.constructor.name==="HTMLDocument"?c.documentElement.scrollTop=m:c.scrollTop=m,l<i?R(u):typeof n=="function"&&n()};c&&R(u)}function It(e){let t;const r=i=>()=>{t=null,e(...i)},n=(...i)=>{t==null&&(t=requestAnimationFrame(r(i)))};return n.cancel=()=>cancelAnimationFrame(t),n}const Rt=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Bt=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Rt;function D(e,t,r,n){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,c,o;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(!D(e[c],t[c],r,n))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;for(c of e.entries())if(!D(c[1],t.get(c[0]),r,n))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c of e.entries())if(!t.has(c[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(c=i;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString)return e.toString()===t.toString();if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(c=i;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[c]))return!1;for(c=i;c--!==0;){const f=o[c];if(!r?.includes(f)&&!(f==="_owner"&&e.$$typeof)&&!D(e[f],t[f],r,n))return n&&console.log(f),!1}return!0}return e!==e&&t!==t}function Nt(e){return/\w.(?:png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const Dt=e=>e==null,Et=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch(t){return console.error("isUrl error",t),!1}};function Ft(e){return e==="__proto__"}function h(e,t,r){const n=Object.keys(t);for(let i=0;i<n.length;i++){const c=n[i];if(Ft(c))continue;const o=t[c],f=e[c],u=r(f,o,c,e,t);u!==void 0?e[c]=u:b(o)?b(f)?e[c]=h(f,o,r):e[c]=h({},o,r):e[c]=o}return e}const Pt=(...e)=>{const t={},r=e.length;let n,i=0;for(;i<r;i+=1)for(n in e[i])Object.prototype.hasOwnProperty.call(e[i],n)&&(typeof t[n]=="object"&&typeof e[i][n]=="object"&&t[n]!==void 0&&t[n]!==null&&!Array.isArray(t[n])&&!Array.isArray(e[i][n])?t[n]={...t[n],...e[i][n]}:t[n]=e[i][n]);return t};function Lt(e,t){return h(S(e),t,function r(n,i){if(b(i))return b(n)?h(S(n),i,r):h({},i,r)})}function Mt(e,t){return h(e,t,function r(n,i){if(b(i))return b(n)?h(n,i,r):h({},i,r)})}let ce=0;const fe=(e=21)=>{if(typeof window>"u"||!window.crypto)return(ce+=1).toFixed(0);let t="";const r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t},_t=()=>typeof window>"u"?fe():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():fe(),$t=e=>{if(e&&e!==!0)return e},vt=e=>{const t={};if(Object.keys(e||{}).forEach(r=>{e[r]!==void 0&&(t[r]=e[r])}),!(Object.keys(t).length<1))return t},Wt=e=>{const t={};return Object.keys(e||{}).forEach(r=>{Array.isArray(e[r])&&e[r]?.length===0||e[r]!==void 0&&(t[r]=e[r])}),t};function Vt(e){if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:e.split(":")?.slice(-1)[0]}function se(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function zt(e,t){return E(typeof e[t]=="function"?e[t]?.():[])}function E(e=[],t=!0){const r=Array.isArray(e)?e:[e],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(...E(i,t)):i?.type===d.Fragment||i?.type==="template"?n.push(...E(i.children,t)):i&&d.isVNode(i)?t&&!se(i)?n.push(i):t||n.push(i):X(i)&&n.push(i)}),n}function $({vnode:e,defaultVNode:t},...r){return e===!1?null:typeof e=="function"?e?.(...r):e||t}function ue(e,...t){const{slots:r,key:n="default",render:i,props:c,defaultChildren:o}=e;let f;const u=c[n],a=r?.[n],l=typeof o=="function"?o?.():o;return u===!1?f=!1:u===!0?f=a??l:w(u)&&i?d.isVNode(u)?f=u:f=a:f=u||a,f===!1?!1:i?$({vnode:f,defaultVNode:l},...t):f}function ae(e,...t){const{slots:r,key:n="default",props:i,defaultChildren:c}=e;let o;const f=i[n],u=r?.[n]?.(...t),a=typeof c=="function"?c?.():c;return f===!1?o=!1:f===!0?o=u??a:w(f)?d.isVNode(f)?o=f:o=u:o=f||u,o===!1?!1:$({vnode:o,defaultVNode:a},...t)}function qt(e,...t){const{slots:r,props:n,keys:i,render:c,defaultVNodes:o}=e,f={};return i.forEach((u,a)=>{const l=o?o[a]:null,m=c?ae({slots:r,props:n,key:u,defaultChildren:l},...t):ue({slots:r,props:n,key:u,render:!1,defaultChildren:l},...t);(I(m)||m)&&(f[u]=m)}),f}s.Base64=le,s.arrayRepeat=tt,s.arraySlice=Te,s.blobToDataURL=lt,s.checkFileType=U,s.classNames=z,s.cloneDeep=S,s.cloneDeepWith=He,s.cloneDeepWithImpl=A,s.compareArray=k,s.compareArraySort=Ce,s.compareArrayTimeSort=et,s.compareTime=T,s.convertValueBoolean=pt,s.copyProperties=y,s.dataURLtoBlob=ut,s.dataURLtoFile=at,s.deepCopy=Ke,s.deepMerge=Lt,s.fileTypes=j,s.filterEmpty=E,s.filterTree=ne,s.findSourceByTree=re,s.findValueAndAncestors=ot,s.forInObject=bt,s.formatDuration=rt,s.formatNumber=_,s.genColumnKey=Xe,s.generateVideoPicture=M,s.getArrayLast=ct,s.getBase64=st,s.getBlobUrl=ft,s.getFileSuffix=B,s.getKeys=Vt,s.getLevelData=te,s.getMaxFloor=ee,s.getMediaInfos=oe,s.getPrefixCls=Ze,s.getRandomNumber=C,s.getScroll=H,s.getScrollContainer=pe,s.getSlot=ue,s.getSlotVNode=ae,s.getSlotsChildren=zt,s.getSlotsProps=qt,s.getSortIndex=ke,s.getSymbols=J,s.getTextWidth=At,s.getValueFromObjectByKey=he,s.getVideoCoverPicture=dt,s.getVideoFileUrl=ie,s.handleCurrentPage=Qe,s.handleEmptyField=nt,s.handleShowIndex=Ge,s.is=v,s.isArray=g,s.isBase64=N,s.isBoolean=I,s.isBrowser=Bt,s.isDataURLBase64=gt,s.isDeepEqualReact=D,s.isEmptyElement=se,s.isFunction=de,s.isImg=Nt,s.isInContainer=we,s.isJSONStr=ge,s.isMobile=ye,s.isNil=Dt,s.isNotNil=xe,s.isNumber=p,s.isObject=w,s.isPlainObject=b,s.isPrimitive=x,s.isScroll=q,s.isServer=O,s.isString=W,s.isTablet=V,s.isTypedArray=Z,s.isUrl=Et,s.isValid=X,s.isWindowsOs=mt,s.keysOf=Ot,s.merge=Pt,s.mergeWith=h,s.nanoid=_t,s.off=ht,s.omitBoolean=$t,s.omitUndefined=vt,s.omitUndefinedAndEmptyArr=Wt,s.on=yt,s.raf=R,s.runFunction=Ye,s.scrollTo=Ut,s.slotRender=$,s.throttleByAnimationFrame=It,s.toChinesNum=St,s.toConvertNumberShow=wt,s.treeData=it,s.useDeepMerge=Mt,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Slot, VNode, VNodeChild } from 'vue';
|
|
1
|
+
import type { CSSProperties, Slot, VNode, VNodeChild } from 'vue';
|
|
2
2
|
export type DeepPartial<T> = T extends object ? {
|
|
3
3
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
4
4
|
} : T;
|
|
@@ -12,7 +12,9 @@ export interface Fn<T = any, R = T> {
|
|
|
12
12
|
export type Nullable<T> = T | null;
|
|
13
13
|
export type WithFalse<T> = T | false;
|
|
14
14
|
export type RecordType = Record<string, any>;
|
|
15
|
-
export type
|
|
15
|
+
export type WithIfDefault<T, R> = R extends undefined ? T : R;
|
|
16
|
+
export type ExtendIfDefined<T, R> = R extends undefined ? T : R;
|
|
17
|
+
export type WithRequired<T, Keys extends keyof T> = Required<Pick<T, Keys>> & Partial<Omit<T, Keys>>;
|
|
16
18
|
export type VueNode = VNodeChild | JSX.Element;
|
|
17
19
|
export type CustomRender = Slot | VNodeChild | VNode | ((...props: any[]) => VNode) | ((...props: any[]) => VNode[]) | VNode[] | JSX.Element | string | null | undefined;
|
|
18
20
|
export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
@@ -33,4 +35,6 @@ export interface MaterialOptions {
|
|
|
33
35
|
export type OmitUndefined<T> = {
|
|
34
36
|
[P in keyof T]: NonNullable<T[P]>;
|
|
35
37
|
};
|
|
38
|
+
export type SemanticClassNames<Name extends string> = Partial<Record<Name, string>>;
|
|
39
|
+
export type SemanticStyles<Name extends string> = Partial<Record<Name, CSSProperties>>;
|
|
36
40
|
export {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -329,3 +329,4 @@ export declare function getTextWidth(str: string, options: {
|
|
|
329
329
|
*/
|
|
330
330
|
export declare function toChinesNum(num: number): string;
|
|
331
331
|
export declare function forInObject<T extends object>(obj: T, callback: (key: keyof T, value: T[keyof T]) => void): void;
|
|
332
|
+
export declare function keysOf<T extends object>(obj: T): (keyof T)[];
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gx-design-vue/pro-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.0-beta.
|
|
4
|
+
"version": "0.2.0-beta.85",
|
|
5
5
|
"description": "Gx Design Pro Utils",
|
|
6
|
-
"publishConfig": {
|
|
7
|
-
"access": "public",
|
|
8
|
-
"tag": "beta"
|
|
9
|
-
},
|
|
10
6
|
"exports": {
|
|
11
7
|
".": {
|
|
12
8
|
"types": "./dist/index.d.ts",
|