@gx-design-vue/pro-utils 0.2.0-beta.42 → 0.2.0-beta.44
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 +482 -378
- package/dist/pro-utils.umd.cjs +2 -2
- package/dist/typings/index.d.ts +5 -5
- package/dist/utils/index.d.ts +75 -15
- package/dist/utils/validate.d.ts +8 -5
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Comment as z, Fragment as
|
|
2
|
-
const
|
|
1
|
+
import { Comment as z, Fragment as I, isVNode as h } from "vue";
|
|
2
|
+
const y = typeof window > "u";
|
|
3
3
|
/**
|
|
4
4
|
* @vue/shared v3.5.11
|
|
5
5
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -7,53 +7,53 @@ const w = typeof window > "u";
|
|
|
7
7
|
**/
|
|
8
8
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
9
9
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
return (r) =>
|
|
13
|
-
},
|
|
14
|
-
(e) => e.replace(
|
|
15
|
-
),
|
|
10
|
+
const W = (e) => {
|
|
11
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
12
|
+
return (r) => t[r] || (t[r] = e(r));
|
|
13
|
+
}, H = /-(\w)/g, _ = W(
|
|
14
|
+
(e) => e.replace(H, (t, r) => r ? r.toUpperCase() : "")
|
|
15
|
+
), v = function(e, t) {
|
|
16
16
|
var r;
|
|
17
|
-
if (
|
|
17
|
+
if (y || !e || !t)
|
|
18
18
|
return "";
|
|
19
|
-
|
|
19
|
+
t = _(t), t === "float" && (t = "cssFloat");
|
|
20
20
|
try {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
21
|
+
const n = e.style[t];
|
|
22
|
+
if (n)
|
|
23
|
+
return n;
|
|
24
24
|
const i = (r = document == null ? void 0 : document.defaultView) == null ? void 0 : r.getComputedStyle(e, "");
|
|
25
|
-
return i ? i[
|
|
25
|
+
return i ? i[t] : "";
|
|
26
26
|
} catch {
|
|
27
|
-
return e.style[
|
|
27
|
+
return e.style[t];
|
|
28
28
|
}
|
|
29
|
-
}, q = (e,
|
|
30
|
-
if (
|
|
29
|
+
}, q = (e, t) => y ? void 0 : (t == null ? v(e, "overflow") : t ? v(e, "overflow-y") : v(e, "overflow-x")).match(/(scroll|auto|overlay)/), se = (e, t) => {
|
|
30
|
+
if (y)
|
|
31
31
|
return;
|
|
32
32
|
let r = e;
|
|
33
33
|
for (; r; ) {
|
|
34
34
|
if ([window, document, document.documentElement].includes(r))
|
|
35
35
|
return window;
|
|
36
|
-
if (q(r,
|
|
36
|
+
if (q(r, t))
|
|
37
37
|
return r;
|
|
38
38
|
r = r.parentNode;
|
|
39
39
|
}
|
|
40
40
|
return r;
|
|
41
|
-
},
|
|
42
|
-
if (
|
|
41
|
+
}, ae = (e, t) => {
|
|
42
|
+
if (y || !e || !t)
|
|
43
43
|
return !1;
|
|
44
44
|
const r = e.getBoundingClientRect();
|
|
45
|
-
let
|
|
46
|
-
return [window, document, document.documentElement, null, void 0].includes(
|
|
45
|
+
let n;
|
|
46
|
+
return [window, document, document.documentElement, null, void 0].includes(t) ? n = {
|
|
47
47
|
top: 0,
|
|
48
48
|
right: window.innerWidth,
|
|
49
49
|
bottom: window.innerHeight,
|
|
50
50
|
left: 0
|
|
51
|
-
} :
|
|
51
|
+
} : n = t.getBoundingClientRect(), r.top < n.bottom && r.bottom > n.top && r.right > n.left && r.left < n.right;
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function le(e) {
|
|
54
54
|
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e);
|
|
55
55
|
}
|
|
56
|
-
const
|
|
56
|
+
const de = (e) => e == null, pe = (e) => {
|
|
57
57
|
if (!e || !e.startsWith("http"))
|
|
58
58
|
return !1;
|
|
59
59
|
try {
|
|
@@ -61,140 +61,157 @@ const ae = (e) => e == null, le = (e) => {
|
|
|
61
61
|
} catch {
|
|
62
62
|
return !1;
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
const
|
|
66
|
-
let
|
|
64
|
+
}, ge = (...e) => {
|
|
65
|
+
const t = {}, r = e.length;
|
|
66
|
+
let n, i = 0;
|
|
67
67
|
for (; i < r; i += 1)
|
|
68
|
-
for (
|
|
69
|
-
e[i].hasOwnProperty(
|
|
70
|
-
...n
|
|
71
|
-
...e[i][
|
|
72
|
-
} : n
|
|
73
|
-
return
|
|
68
|
+
for (n in e[i])
|
|
69
|
+
e[i].hasOwnProperty(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] = {
|
|
70
|
+
...t[n],
|
|
71
|
+
...e[i][n]
|
|
72
|
+
} : t[n] = e[i][n]);
|
|
73
|
+
return t;
|
|
74
74
|
};
|
|
75
|
-
let
|
|
76
|
-
const
|
|
75
|
+
let j = 0;
|
|
76
|
+
const U = (e = 21) => {
|
|
77
77
|
if (typeof window > "u" || !window.crypto)
|
|
78
|
-
return (
|
|
79
|
-
let
|
|
78
|
+
return (j += 1).toFixed(0);
|
|
79
|
+
let t = "";
|
|
80
80
|
const r = crypto.getRandomValues(new Uint8Array(e));
|
|
81
81
|
for (; e--; ) {
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
const n = 63 & r[e];
|
|
83
|
+
t += n < 36 ? n.toString(36) : n < 62 ? (n - 26).toString(36).toUpperCase() : n < 63 ? "_" : "-";
|
|
84
84
|
}
|
|
85
|
-
return
|
|
86
|
-
},
|
|
87
|
-
function
|
|
88
|
-
if (typeof
|
|
85
|
+
return t;
|
|
86
|
+
}, me = () => typeof window > "u" ? U() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : U();
|
|
87
|
+
function C(e, t) {
|
|
88
|
+
if (typeof t != "string" && !Array.isArray(t))
|
|
89
89
|
return;
|
|
90
|
-
const r = Array.isArray(
|
|
91
|
-
let
|
|
90
|
+
const r = Array.isArray(t) ? t : t.split(":");
|
|
91
|
+
let n = e;
|
|
92
92
|
for (let i = 0; i < r.length; i++)
|
|
93
|
-
if (
|
|
94
|
-
|
|
93
|
+
if (n && n.hasOwnProperty(r[i]))
|
|
94
|
+
n = n[r[i]];
|
|
95
95
|
else
|
|
96
96
|
return;
|
|
97
|
-
return
|
|
97
|
+
return n;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return J.call(e) === `[object ${n}]`;
|
|
99
|
+
function J(e, t) {
|
|
100
|
+
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
102
101
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
102
|
+
function $(e) {
|
|
103
|
+
return typeof e == "boolean";
|
|
105
104
|
}
|
|
106
|
-
function
|
|
105
|
+
function d(e) {
|
|
107
106
|
return typeof e == "number";
|
|
108
107
|
}
|
|
109
|
-
function
|
|
108
|
+
function p(e) {
|
|
110
109
|
return typeof Array.isArray > "u" ? Object.prototype.toString.call(e) === "[object Array]" : Array.isArray(e);
|
|
111
110
|
}
|
|
112
|
-
function
|
|
113
|
-
return e !== null &&
|
|
111
|
+
function l(e) {
|
|
112
|
+
return e !== null && J(e, "Object");
|
|
114
113
|
}
|
|
115
114
|
function X(e) {
|
|
116
115
|
return typeof e == "string" || e instanceof String;
|
|
117
116
|
}
|
|
118
|
-
function
|
|
117
|
+
function we(e) {
|
|
119
118
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
120
119
|
}
|
|
120
|
+
function he(e) {
|
|
121
|
+
if (typeof e != "string")
|
|
122
|
+
return !1;
|
|
123
|
+
try {
|
|
124
|
+
const t = JSON.parse(e);
|
|
125
|
+
return typeof t == "object" && t !== null;
|
|
126
|
+
} catch {
|
|
127
|
+
return !1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function ye() {
|
|
131
|
+
const e = navigator.userAgent || navigator.vendor;
|
|
132
|
+
return !!(/iPhone/.test(e) || /Android/.test(e) && /Mobile/.test(e) || /Windows Phone/.test(e) || /Mobile/.test(e) && !Z());
|
|
133
|
+
}
|
|
134
|
+
function Z() {
|
|
135
|
+
const e = navigator.userAgent || navigator.vendor;
|
|
136
|
+
return !!(/iPad/.test(e) || /Macintosh/.test(e) && "ontouchend" in document || /Android/.test(e) && !/Mobile/.test(e));
|
|
137
|
+
}
|
|
121
138
|
function Y(...e) {
|
|
122
|
-
const
|
|
139
|
+
const t = [];
|
|
123
140
|
for (let r = 0; r < e.length; r++) {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
if (X(
|
|
127
|
-
|
|
128
|
-
else if (
|
|
129
|
-
for (let i = 0; i <
|
|
130
|
-
const o = Y(
|
|
131
|
-
o &&
|
|
141
|
+
const n = e[r];
|
|
142
|
+
if (n) {
|
|
143
|
+
if (X(n))
|
|
144
|
+
t.push(n);
|
|
145
|
+
else if (p(n))
|
|
146
|
+
for (let i = 0; i < n.length; i++) {
|
|
147
|
+
const o = Y(n[i]);
|
|
148
|
+
o && t.push(o);
|
|
132
149
|
}
|
|
133
|
-
else if (
|
|
134
|
-
for (const i in
|
|
135
|
-
|
|
150
|
+
else if (l(n))
|
|
151
|
+
for (const i in n)
|
|
152
|
+
n[i] && t.push(i);
|
|
136
153
|
}
|
|
137
154
|
}
|
|
138
|
-
return
|
|
139
|
-
}
|
|
140
|
-
let
|
|
141
|
-
typeof window < "u" && "requestAnimationFrame" in window && (
|
|
142
|
-
let
|
|
143
|
-
const
|
|
144
|
-
function
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
const r =
|
|
150
|
-
function
|
|
155
|
+
return t.filter((r) => r).join(" ");
|
|
156
|
+
}
|
|
157
|
+
let B = (e) => setTimeout(e, 16), P = (e) => clearTimeout(e);
|
|
158
|
+
typeof window < "u" && "requestAnimationFrame" in window && (B = (e) => window.requestAnimationFrame(e), P = (e) => window.cancelAnimationFrame(e));
|
|
159
|
+
let F = 0;
|
|
160
|
+
const R = /* @__PURE__ */ new Map();
|
|
161
|
+
function M(e) {
|
|
162
|
+
R.delete(e);
|
|
163
|
+
}
|
|
164
|
+
function S(e, t = 1) {
|
|
165
|
+
F += 1;
|
|
166
|
+
const r = F;
|
|
167
|
+
function n(i) {
|
|
151
168
|
if (i === 0)
|
|
152
|
-
|
|
169
|
+
M(r), e();
|
|
153
170
|
else {
|
|
154
|
-
const o =
|
|
155
|
-
|
|
171
|
+
const o = B(() => {
|
|
172
|
+
n(i - 1);
|
|
156
173
|
});
|
|
157
|
-
|
|
174
|
+
R.set(r, o);
|
|
158
175
|
}
|
|
159
176
|
}
|
|
160
|
-
return t
|
|
177
|
+
return n(t), r;
|
|
161
178
|
}
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
return
|
|
179
|
+
S.cancel = (e) => {
|
|
180
|
+
const t = R.get(e);
|
|
181
|
+
return M(t), P(t);
|
|
165
182
|
};
|
|
166
|
-
function
|
|
183
|
+
function O(e) {
|
|
167
184
|
return e != null && e === e.window;
|
|
168
185
|
}
|
|
169
|
-
function G(e,
|
|
186
|
+
function G(e, t) {
|
|
170
187
|
var i;
|
|
171
188
|
if (typeof window > "u")
|
|
172
189
|
return 0;
|
|
173
|
-
const r =
|
|
174
|
-
let
|
|
175
|
-
return
|
|
176
|
-
}
|
|
177
|
-
function Q(e,
|
|
178
|
-
const i = r -
|
|
179
|
-
return e /=
|
|
180
|
-
}
|
|
181
|
-
function
|
|
182
|
-
const { getContainer: r = () => window, callback:
|
|
183
|
-
const
|
|
184
|
-
|
|
190
|
+
const r = t ? "scrollTop" : "scrollLeft";
|
|
191
|
+
let n = 0;
|
|
192
|
+
return O(e) ? n = e[t ? "pageYOffset" : "pageXOffset"] : e instanceof Document ? n = e.documentElement[r] : e && (n = e[r]), e && !O(e) && typeof n != "number" && (n = (i = (e.ownerDocument || e).documentElement) == null ? void 0 : i[r]), n;
|
|
193
|
+
}
|
|
194
|
+
function Q(e, t, r, n) {
|
|
195
|
+
const i = r - t;
|
|
196
|
+
return e /= n / 2, e < 1 ? i / 2 * e * e * e + t : i / 2 * ((e -= 2) * e * e + 2) + t;
|
|
197
|
+
}
|
|
198
|
+
function xe(e, t = {}) {
|
|
199
|
+
const { getContainer: r = () => window, callback: n, duration: i = 450 } = t, o = r(), u = G(o, !0), c = Date.now(), f = () => {
|
|
200
|
+
const a = Date.now() - c, g = Q(a > i ? i : a, u, e, i);
|
|
201
|
+
O(o) ? o.scrollTo(window.pageXOffset, g) : o instanceof HTMLDocument || o.constructor.name === "HTMLDocument" ? o.documentElement.scrollTop = g : o.scrollTop = g, a < i ? S(f) : typeof n == "function" && n();
|
|
185
202
|
};
|
|
186
|
-
|
|
203
|
+
o && S(f);
|
|
187
204
|
}
|
|
188
|
-
function
|
|
189
|
-
let
|
|
205
|
+
function ve(e) {
|
|
206
|
+
let t;
|
|
190
207
|
const r = (i) => () => {
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
|
|
208
|
+
t = null, e(...i);
|
|
209
|
+
}, n = (...i) => {
|
|
210
|
+
t == null && (t = requestAnimationFrame(r(i)));
|
|
194
211
|
};
|
|
195
|
-
return
|
|
212
|
+
return n.cancel = () => cancelAnimationFrame(t), n;
|
|
196
213
|
}
|
|
197
|
-
const
|
|
214
|
+
const w = {
|
|
198
215
|
videoAllowType: [
|
|
199
216
|
"mp4",
|
|
200
217
|
"webm",
|
|
@@ -223,446 +240,533 @@ const g = {
|
|
|
223
240
|
],
|
|
224
241
|
audioType: ["mp3", "mpeg", "aac", "wav", "wma", "mp2", "flac", "midi", "ra", "ape", "aac", "cda"]
|
|
225
242
|
};
|
|
226
|
-
function
|
|
227
|
-
if (e ===
|
|
243
|
+
function A(e, t, r, n) {
|
|
244
|
+
if (e === t)
|
|
228
245
|
return !0;
|
|
229
|
-
if (e &&
|
|
230
|
-
if (e.constructor !==
|
|
246
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
247
|
+
if (e.constructor !== t.constructor)
|
|
231
248
|
return !1;
|
|
232
249
|
let i, o, u;
|
|
233
250
|
if (Array.isArray(e)) {
|
|
234
|
-
if (i = e.length, i !=
|
|
251
|
+
if (i = e.length, i != t.length)
|
|
235
252
|
return !1;
|
|
236
253
|
for (o = i; o-- !== 0; )
|
|
237
|
-
if (!
|
|
254
|
+
if (!A(e[o], t[o], r, n))
|
|
238
255
|
return !1;
|
|
239
256
|
return !0;
|
|
240
257
|
}
|
|
241
|
-
if (e instanceof Map &&
|
|
242
|
-
if (e.size !==
|
|
258
|
+
if (e instanceof Map && t instanceof Map) {
|
|
259
|
+
if (e.size !== t.size)
|
|
243
260
|
return !1;
|
|
244
261
|
for (o of e.entries())
|
|
245
|
-
if (!
|
|
262
|
+
if (!t.has(o[0]))
|
|
246
263
|
return !1;
|
|
247
264
|
for (o of e.entries())
|
|
248
|
-
if (!
|
|
265
|
+
if (!A(o[1], t.get(o[0]), r, n))
|
|
249
266
|
return !1;
|
|
250
267
|
return !0;
|
|
251
268
|
}
|
|
252
|
-
if (e instanceof Set &&
|
|
253
|
-
if (e.size !==
|
|
269
|
+
if (e instanceof Set && t instanceof Set) {
|
|
270
|
+
if (e.size !== t.size)
|
|
254
271
|
return !1;
|
|
255
272
|
for (o of e.entries())
|
|
256
|
-
if (!
|
|
273
|
+
if (!t.has(o[0]))
|
|
257
274
|
return !1;
|
|
258
275
|
return !0;
|
|
259
276
|
}
|
|
260
|
-
if (ArrayBuffer.isView(e) && ArrayBuffer.isView(
|
|
261
|
-
if (i = e.length, i !=
|
|
277
|
+
if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
278
|
+
if (i = e.length, i != t.length)
|
|
262
279
|
return !1;
|
|
263
280
|
for (o = i; o-- !== 0; )
|
|
264
|
-
if (e[o] !==
|
|
281
|
+
if (e[o] !== t[o])
|
|
265
282
|
return !1;
|
|
266
283
|
return !0;
|
|
267
284
|
}
|
|
268
285
|
if (e.constructor === RegExp)
|
|
269
|
-
return e.source ===
|
|
286
|
+
return e.source === t.source && e.flags === t.flags;
|
|
270
287
|
if (e.valueOf !== Object.prototype.valueOf && e.valueOf)
|
|
271
|
-
return e.valueOf() ===
|
|
288
|
+
return e.valueOf() === t.valueOf();
|
|
272
289
|
if (e.toString !== Object.prototype.toString && e.toString)
|
|
273
|
-
return e.toString() ===
|
|
274
|
-
if (u = Object.keys(e), i = u.length, i !== Object.keys(
|
|
290
|
+
return e.toString() === t.toString();
|
|
291
|
+
if (u = Object.keys(e), i = u.length, i !== Object.keys(t).length)
|
|
275
292
|
return !1;
|
|
276
293
|
for (o = i; o-- !== 0; )
|
|
277
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
294
|
+
if (!Object.prototype.hasOwnProperty.call(t, u[o]))
|
|
278
295
|
return !1;
|
|
279
296
|
for (o = i; o-- !== 0; ) {
|
|
280
297
|
const c = u[o];
|
|
281
|
-
if (!(r != null && r.includes(c)) && !(c === "_owner" && e.$$typeof) && !
|
|
282
|
-
return
|
|
298
|
+
if (!(r != null && r.includes(c)) && !(c === "_owner" && e.$$typeof) && !A(e[c], t[c], r, n))
|
|
299
|
+
return n && console.log(c), !1;
|
|
283
300
|
}
|
|
284
301
|
return !0;
|
|
285
302
|
}
|
|
286
|
-
return e !== e &&
|
|
303
|
+
return e !== e && t !== t;
|
|
287
304
|
}
|
|
288
|
-
const
|
|
305
|
+
const k = typeof process < "u" && process.versions != null && process.versions.node != null, Ae = () => process.env.NODE_ENV === "TEST" ? !0 : typeof window < "u" && typeof window.document < "u" && typeof window.matchMedia < "u" && !k, Se = (e) => {
|
|
289
306
|
if (e && e !== !0)
|
|
290
307
|
return e;
|
|
291
|
-
},
|
|
292
|
-
const
|
|
308
|
+
}, Oe = (e) => {
|
|
309
|
+
const t = {};
|
|
293
310
|
if (Object.keys(e || {}).forEach((r) => {
|
|
294
|
-
e[r] !== void 0 && (
|
|
295
|
-
}), !(Object.keys(
|
|
296
|
-
return
|
|
297
|
-
},
|
|
298
|
-
const
|
|
311
|
+
e[r] !== void 0 && (t[r] = e[r]);
|
|
312
|
+
}), !(Object.keys(t).length < 1))
|
|
313
|
+
return t;
|
|
314
|
+
}, Ee = (e) => {
|
|
315
|
+
const t = {};
|
|
299
316
|
return Object.keys(e || {}).forEach((r) => {
|
|
300
|
-
var
|
|
301
|
-
Array.isArray(e[r]) && ((
|
|
302
|
-
}),
|
|
317
|
+
var n;
|
|
318
|
+
Array.isArray(e[r]) && ((n = e[r]) == null ? void 0 : n.length) === 0 || e[r] !== void 0 && (t[r] = e[r]);
|
|
319
|
+
}), t;
|
|
303
320
|
};
|
|
304
|
-
function
|
|
305
|
-
var
|
|
321
|
+
function b(e) {
|
|
322
|
+
var t;
|
|
306
323
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
307
|
-
return Array.isArray(e) ? e[e.length - 1] : (
|
|
324
|
+
return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
|
|
308
325
|
}
|
|
309
|
-
function
|
|
310
|
-
return e && (e.type === z || e.type ===
|
|
326
|
+
function K(e) {
|
|
327
|
+
return e && (e.type === z || e.type === I && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
311
328
|
}
|
|
312
|
-
function
|
|
329
|
+
function Re(e, t) {
|
|
313
330
|
var r;
|
|
314
|
-
return
|
|
331
|
+
return N((r = e[t]) == null ? void 0 : r.call(e));
|
|
315
332
|
}
|
|
316
|
-
function
|
|
317
|
-
const
|
|
333
|
+
function N(e = []) {
|
|
334
|
+
const t = [];
|
|
318
335
|
return e.forEach((r) => {
|
|
319
|
-
Array.isArray(r) ?
|
|
320
|
-
}),
|
|
336
|
+
Array.isArray(r) ? t.push(...r) : (r == null ? void 0 : r.type) === I ? t.push(...N(r.children)) : t.push(r);
|
|
337
|
+
}), t.filter((r) => !K(r));
|
|
321
338
|
}
|
|
322
|
-
function V(e, ...
|
|
323
|
-
return typeof e == "function" ? e == null ? void 0 : e(...
|
|
339
|
+
function V(e, ...t) {
|
|
340
|
+
return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
|
|
324
341
|
}
|
|
325
|
-
function
|
|
326
|
-
const i =
|
|
342
|
+
function ee(e, t, r = "default", n) {
|
|
343
|
+
const i = b(r);
|
|
327
344
|
if (i) {
|
|
328
345
|
let o;
|
|
329
|
-
const u =
|
|
330
|
-
return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] :
|
|
346
|
+
const u = C(t, r);
|
|
347
|
+
return u === !1 ? o = !1 : u === !0 ? o = e == null ? void 0 : e[i] : l(u) && n ? h(u) ? o = u : o = e == null ? void 0 : e[i] : o = u || (e == null ? void 0 : e[i]), n ? h(o) ? o : V(o) : o;
|
|
331
348
|
}
|
|
332
349
|
}
|
|
333
|
-
function
|
|
350
|
+
function te(e, t, r = "default", n) {
|
|
334
351
|
var o, u, c;
|
|
335
|
-
const i =
|
|
352
|
+
const i = b(r);
|
|
336
353
|
if (i) {
|
|
337
354
|
let f;
|
|
338
|
-
const
|
|
339
|
-
return
|
|
355
|
+
const s = C(t, r);
|
|
356
|
+
return s === !1 ? f = !1 : s === !0 ? f = (o = e == null ? void 0 : e[i]) == null ? void 0 : o.call(e, n) : l(s) ? h(s) ? f = s : f = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.call(e, n) : f = s || ((c = e == null ? void 0 : e[i]) == null ? void 0 : c.call(e, n)), h(f) ? f : V(f, n);
|
|
340
357
|
}
|
|
341
358
|
}
|
|
342
|
-
function
|
|
359
|
+
function be(e, t, r, n) {
|
|
343
360
|
const i = {};
|
|
344
361
|
return e.forEach((o) => {
|
|
345
|
-
const u =
|
|
362
|
+
const u = b(o);
|
|
346
363
|
if (u) {
|
|
347
|
-
const c =
|
|
348
|
-
(
|
|
364
|
+
const c = n != null && n.render ? te(t, r, o, n == null ? void 0 : n.params) : ee(t, r, o);
|
|
365
|
+
($(c) || c) && (i[u] = c);
|
|
349
366
|
}
|
|
350
367
|
}), i;
|
|
351
368
|
}
|
|
352
|
-
const
|
|
353
|
-
const i =
|
|
354
|
-
return
|
|
355
|
-
},
|
|
356
|
-
function
|
|
357
|
-
const
|
|
369
|
+
const Te = ({ suffixCls: e, customizePrefixCls: t, isPor: r, className: n }) => {
|
|
370
|
+
const i = n || (r ? "gx-pro" : "gx");
|
|
371
|
+
return t || (e ? `${i}-${e}` : i);
|
|
372
|
+
}, je = (e, t) => e ? p(e) ? e.join("-") : e.toString() : `${t || 0}`;
|
|
373
|
+
function Ue(e, { align: t, showIndex: r }) {
|
|
374
|
+
const n = x(e);
|
|
358
375
|
if (r && e.length && e.every((i) => i.dataIndex !== "sortIndex")) {
|
|
359
376
|
const i = e[0];
|
|
360
|
-
|
|
377
|
+
n.unshift({
|
|
361
378
|
title: "序号",
|
|
362
|
-
align:
|
|
379
|
+
align: t,
|
|
363
380
|
fixed: i.fixed,
|
|
364
381
|
width: 60,
|
|
365
|
-
uuid:
|
|
382
|
+
uuid: ie().uuid(15),
|
|
366
383
|
dataIndex: "sortIndex",
|
|
367
384
|
key: "sortIndex"
|
|
368
385
|
});
|
|
369
386
|
} else
|
|
370
|
-
|
|
371
|
-
return
|
|
387
|
+
n.filter((i) => i.dataIndex !== "sortIndex");
|
|
388
|
+
return n;
|
|
372
389
|
}
|
|
373
|
-
function
|
|
374
|
-
return typeof e == "function" ? e(...
|
|
390
|
+
function Fe(e, ...t) {
|
|
391
|
+
return typeof e == "function" ? e(...t) : e;
|
|
375
392
|
}
|
|
376
|
-
function
|
|
393
|
+
function x(e) {
|
|
377
394
|
return JSON.parse(JSON.stringify(e));
|
|
378
395
|
}
|
|
379
|
-
function
|
|
380
|
-
if (
|
|
381
|
-
const { pageSize: r = 10, total:
|
|
396
|
+
function De(e, t) {
|
|
397
|
+
if (l(e)) {
|
|
398
|
+
const { pageSize: r = 10, total: n = 0 } = e;
|
|
382
399
|
let { current: i = 1 } = e;
|
|
383
|
-
return
|
|
400
|
+
return n - t <= r * (i - 1) && (i = i - 1), i === 0 ? 1 : i;
|
|
384
401
|
}
|
|
385
402
|
return 1;
|
|
386
403
|
}
|
|
387
|
-
function
|
|
388
|
-
function
|
|
404
|
+
function Le(e = [], t, r = "children") {
|
|
405
|
+
function n(i, o) {
|
|
389
406
|
return o.map((u, c) => {
|
|
390
407
|
const f = `${i}-${c + 1}`;
|
|
391
|
-
return u[r] && (u[r] =
|
|
408
|
+
return u[r] && (u[r] = n(f, u[r])), u.sortIndex = f, u;
|
|
392
409
|
});
|
|
393
410
|
}
|
|
394
|
-
return
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
return u = c ? (c - 1) * f + (o + 1) : o + 1, i[r] && (i[r] = t(`${u}`, i[r])), i.sortIndex = u, i;
|
|
411
|
+
return x(e).map((i, o) => {
|
|
412
|
+
const u = l(t) && t.current || 1, c = l(t) && t.pageSize || 10, f = `${u ? (u - 1) * c + (o + 1) : o + 1}`;
|
|
413
|
+
return i[r] && (i[r] = n(`${f}`, i[r])), i.sortIndex = f, i;
|
|
398
414
|
});
|
|
399
415
|
}
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
416
|
+
function Ie(e, t) {
|
|
417
|
+
return p(e) ? e == null ? void 0 : e.filter((r, n) => {
|
|
418
|
+
if (d(t))
|
|
419
|
+
return n <= t - 1;
|
|
420
|
+
if (p(t) && t.length === 2) {
|
|
421
|
+
const i = t[0] - 1, o = t[1] ? t[1] - 1 : e.length - 1;
|
|
422
|
+
return n <= o && n >= i;
|
|
423
|
+
} else if (p(t) && t.length === 1) {
|
|
424
|
+
const i = t[0] - 1, o = e.length - 1;
|
|
425
|
+
return n <= o && n >= i;
|
|
426
|
+
}
|
|
427
|
+
return !0;
|
|
428
|
+
}) : [];
|
|
429
|
+
}
|
|
430
|
+
function ne(e, t, r, n = 0) {
|
|
431
|
+
const i = d(n) && (n === 0 || n === 1) ? n : 0, o = e[r], u = t[r];
|
|
432
|
+
let c = 0;
|
|
433
|
+
return o < u ? c = i === 0 ? -1 : 0 : o > u && (c = i === 0 ? 0 : -1), c;
|
|
434
|
+
}
|
|
435
|
+
function re(e, t, r, n = 0) {
|
|
436
|
+
const i = d(n) && (n === 0 || n === 1) ? n : 0, o = new Date(e[r]), u = new Date(t[r]);
|
|
437
|
+
let c = 0;
|
|
438
|
+
return o < u ? c = i === 0 ? -1 : 0 : o > u && (c = i === 0 ? 0 : -1), c;
|
|
439
|
+
}
|
|
440
|
+
function Ce(e, t, r = 0) {
|
|
441
|
+
return e.sort((n, i) => ne(n, i, t, r));
|
|
442
|
+
}
|
|
443
|
+
function $e(e, t, r = 0) {
|
|
444
|
+
return e.sort((n, i) => re(n, i, t, r));
|
|
404
445
|
}
|
|
405
|
-
function
|
|
406
|
-
let
|
|
407
|
-
const r = new Set(
|
|
408
|
-
return
|
|
446
|
+
function Be(e) {
|
|
447
|
+
let t = x(e);
|
|
448
|
+
const r = new Set(t);
|
|
449
|
+
return t = Array.from(r), t;
|
|
409
450
|
}
|
|
410
|
-
function
|
|
451
|
+
function Pe(e, t) {
|
|
411
452
|
const r = ["null", "undefined"];
|
|
412
|
-
let
|
|
413
|
-
return e === 0 ?
|
|
453
|
+
let n = !0;
|
|
454
|
+
return e === 0 ? n = !0 : r.includes(e) ? n = !1 : e || (n = !1), n ? {
|
|
414
455
|
value: e,
|
|
415
|
-
success:
|
|
456
|
+
success: n
|
|
416
457
|
} : {
|
|
417
|
-
value:
|
|
418
|
-
success:
|
|
458
|
+
value: t === "" ? t : t || "-",
|
|
459
|
+
success: n
|
|
419
460
|
};
|
|
420
461
|
}
|
|
421
|
-
function
|
|
422
|
-
let
|
|
462
|
+
function Me(e) {
|
|
463
|
+
let t = "";
|
|
423
464
|
if (e > -1) {
|
|
424
|
-
const r = Math.floor(e / 3600),
|
|
425
|
-
r < 10 ?
|
|
465
|
+
const r = Math.floor(e / 3600), n = Math.floor(e / 60) % 60, i = Number.parseInt(String(e % 60));
|
|
466
|
+
r < 10 ? t = "0" + r + ":" : t = r + ":", n < 10 && (t += "0"), t += n + ":", i < 10 && (t += "0"), t += i;
|
|
426
467
|
}
|
|
427
|
-
return
|
|
468
|
+
return t.split(":")[0] === "00" ? `${t.split(":")[1]}:${t.split(":")[2]}` : t;
|
|
428
469
|
}
|
|
429
|
-
function
|
|
470
|
+
function ie() {
|
|
430
471
|
const e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
|
|
431
472
|
return {
|
|
432
|
-
uuid(
|
|
433
|
-
const
|
|
473
|
+
uuid(t, r) {
|
|
474
|
+
const n = e, i = [], o = r || n.length;
|
|
434
475
|
let u, c;
|
|
435
|
-
if (
|
|
436
|
-
for (u = 0; u <
|
|
437
|
-
i[u] =
|
|
476
|
+
if (t)
|
|
477
|
+
for (u = 0; u < t; u += 1)
|
|
478
|
+
i[u] = n[Number.parseInt(String(Math.random() * o))];
|
|
438
479
|
else
|
|
439
480
|
for (i[8] = "-", i[13] = "-", i[18] = "-", i[23] = "-", i[14] = "4", u = 0; u < 36; u += 1)
|
|
440
|
-
i[u] || (c = Math.random() * 16, i[u] =
|
|
481
|
+
i[u] || (c = Math.random() * 16, i[u] = n[u === 19 ? c && 3 || 8 : c]);
|
|
441
482
|
return i.join("");
|
|
442
483
|
},
|
|
443
484
|
uuidFast() {
|
|
444
|
-
const
|
|
445
|
-
let
|
|
485
|
+
const t = e, r = Array.from({ length: 36 });
|
|
486
|
+
let n = 0, i, o;
|
|
446
487
|
for (o = 0; o < 36; o += 1)
|
|
447
|
-
o === 8 || o === 13 || o === 18 || o === 23 ? r[o] = "-" : o === 14 ? r[o] = "4" : (
|
|
488
|
+
o === 8 || o === 13 || o === 18 || o === 23 ? r[o] = "-" : o === 14 ? r[o] = "4" : (n <= 2 && (n = 33554432 + Math.random() * 16777216 || 0), i = n && 15, n = n > 4, r[o] = t[o === 19 ? i && 3 || 8 : i]);
|
|
448
489
|
return r.join("");
|
|
449
490
|
},
|
|
450
491
|
uuidString() {
|
|
451
492
|
return this.uuidFast().replace(new RegExp("-", "g"), "");
|
|
452
493
|
},
|
|
453
494
|
uuidCompact() {
|
|
454
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (
|
|
495
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
455
496
|
const r = Math.random() * 16 || 0;
|
|
456
|
-
return (
|
|
497
|
+
return (t === "x" ? r : r && 3 || 8).toString(16);
|
|
457
498
|
});
|
|
458
499
|
}
|
|
459
500
|
};
|
|
460
501
|
}
|
|
461
|
-
function
|
|
462
|
-
let
|
|
463
|
-
function
|
|
464
|
-
|
|
465
|
-
|
|
502
|
+
function Ne(e = [], t = "children") {
|
|
503
|
+
let r = 0;
|
|
504
|
+
function n(i = [], o) {
|
|
505
|
+
i.forEach((u) => {
|
|
506
|
+
u.floor = o, o > r && (r = o), u[t] && u[t].length > 0 && n(u[t], o + 1);
|
|
466
507
|
});
|
|
467
508
|
}
|
|
468
|
-
return
|
|
509
|
+
return n(e, 1), r;
|
|
469
510
|
}
|
|
470
|
-
function
|
|
511
|
+
function oe(e, t = "children") {
|
|
471
512
|
let r = [];
|
|
472
|
-
return e.forEach((
|
|
473
|
-
r.push(
|
|
513
|
+
return e.forEach((n) => {
|
|
514
|
+
r.push(n), p(n[t]) && n[t].length > 0 && (r = r.concat(oe(n[t])));
|
|
474
515
|
}), r;
|
|
475
516
|
}
|
|
476
|
-
function
|
|
477
|
-
|
|
478
|
-
const o =
|
|
517
|
+
function Ve(e, t, r, n, i) {
|
|
518
|
+
t = t || "id", r = r || "parentId", n = n || "children", i = i || 0;
|
|
519
|
+
const o = x(e);
|
|
479
520
|
return o.filter((u) => {
|
|
480
|
-
const c = o.filter((f) => u[
|
|
481
|
-
return c.length > 0 ? u[
|
|
521
|
+
const c = o.filter((f) => u[t] === f[r]);
|
|
522
|
+
return c.length > 0 ? u[n] = c : u[n] = [], u[r] === i;
|
|
482
523
|
});
|
|
483
524
|
}
|
|
484
|
-
function
|
|
525
|
+
function ze(e) {
|
|
485
526
|
return URL.createObjectURL(e);
|
|
486
527
|
}
|
|
487
|
-
function
|
|
488
|
-
return new Promise((
|
|
489
|
-
const
|
|
490
|
-
|
|
528
|
+
function We(e) {
|
|
529
|
+
return new Promise((t, r) => {
|
|
530
|
+
const n = new FileReader();
|
|
531
|
+
n.readAsDataURL(e), n.onload = () => t(n.result), n.onerror = (i) => r(i);
|
|
491
532
|
});
|
|
492
533
|
}
|
|
493
|
-
function
|
|
494
|
-
const
|
|
495
|
-
let i =
|
|
534
|
+
function He(e) {
|
|
535
|
+
const t = e.split(","), r = t[0].match(/:(.*?);/)[1], n = atob(t[1]);
|
|
536
|
+
let i = n.length;
|
|
496
537
|
const o = new Uint8Array(i);
|
|
497
538
|
for (; i--; )
|
|
498
|
-
o[i] =
|
|
539
|
+
o[i] = n.charCodeAt(i);
|
|
499
540
|
return new Blob([o], { type: r });
|
|
500
541
|
}
|
|
501
|
-
function
|
|
502
|
-
const r = e.split(","),
|
|
542
|
+
function _e(e, t) {
|
|
543
|
+
const r = e.split(","), n = r[0].match(/:(.*?);/)[1], i = atob(r[1]);
|
|
503
544
|
let o = i.length;
|
|
504
545
|
const u = new Uint8Array(o);
|
|
505
546
|
for (; o--; )
|
|
506
547
|
u[o] = i.charCodeAt(o);
|
|
507
|
-
return new File([u],
|
|
548
|
+
return new File([u], t, { type: n });
|
|
508
549
|
}
|
|
509
|
-
function
|
|
510
|
-
return new window.File([e],
|
|
550
|
+
function qe(e, t, r) {
|
|
551
|
+
return new window.File([e], t, { type: r });
|
|
511
552
|
}
|
|
512
|
-
function
|
|
513
|
-
|
|
514
|
-
|
|
553
|
+
function ue(e) {
|
|
554
|
+
if (!e || typeof e != "string")
|
|
555
|
+
return "";
|
|
556
|
+
const t = e.indexOf("?");
|
|
557
|
+
return t > 0 ? `${e.substring(0, t)}` : e;
|
|
515
558
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
559
|
+
function E(e) {
|
|
560
|
+
var n, i, o, u, c;
|
|
561
|
+
if (!e || typeof e != "string")
|
|
562
|
+
return "";
|
|
563
|
+
const t = ue(e), r = t.lastIndexOf(".");
|
|
564
|
+
return r > 0 && ((c = (u = `${(o = (i = (n = t == null ? void 0 : t.substring) == null ? void 0 : n.call(t, r)) == null ? void 0 : i.split("?")) == null ? void 0 : o[0]}`) == null ? void 0 : u.split(".")) == null ? void 0 : c[1]) || "";
|
|
520
565
|
}
|
|
521
|
-
function
|
|
522
|
-
if (
|
|
523
|
-
return
|
|
566
|
+
function m(e, t) {
|
|
567
|
+
if (t)
|
|
568
|
+
return t;
|
|
524
569
|
if (!e || e === "data:")
|
|
525
570
|
return "4";
|
|
526
571
|
let r = "4";
|
|
527
|
-
return
|
|
572
|
+
return T(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 = E(e).toLowerCase(), w.imageType.includes(r) ? "1" : w.videoType.includes(r) ? "3" : w.audioType.includes(r) ? "2" : "4";
|
|
528
573
|
}
|
|
529
|
-
function
|
|
530
|
-
const { url:
|
|
531
|
-
let
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
duration: o.duration,
|
|
544
|
-
width: (o == null ? void 0 : o.videoWidth) || 0,
|
|
545
|
-
height: (o == null ? void 0 : o.videoHeight) || 0
|
|
546
|
-
}), o = null;
|
|
547
|
-
}, o.onerror = function() {
|
|
548
|
-
i({
|
|
549
|
-
play: !1
|
|
550
|
-
}), o = null;
|
|
574
|
+
function ce(e) {
|
|
575
|
+
const { url: t = "", fileType: r = "1" } = e || {};
|
|
576
|
+
let n = "", i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
577
|
+
function o() {
|
|
578
|
+
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
579
|
+
}
|
|
580
|
+
return t instanceof File ? n = URL.createObjectURL(t) : T(t) ? n = t : t instanceof Blob ? n = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (n = t), new Promise((u) => {
|
|
581
|
+
let c;
|
|
582
|
+
r === "1" ? (c = document.createElement("img"), c.src = n) : r === "2" ? (c = document.createElement("audio"), c.src = n) : r === "3" && (c = document.createElement("video"), c.src = n), r === "1" ? c.onload = function() {
|
|
583
|
+
o(), i.play = !0, i.width = c.width || 0, i.height = c.height || 0, u(i), c = null;
|
|
584
|
+
} : c.oncanplay = function() {
|
|
585
|
+
o(), i.play = !0, i.width = (c == null ? void 0 : c.videoWidth) || 0, i.height = (c == null ? void 0 : c.videoHeight) || 0, i.duration = (c == null ? void 0 : c.duration) || 0, u(i), c = null;
|
|
586
|
+
}, c.onerror = function() {
|
|
587
|
+
o(), u(i), c = null;
|
|
551
588
|
};
|
|
552
589
|
});
|
|
553
590
|
}
|
|
554
|
-
async function
|
|
555
|
-
const { url:
|
|
556
|
-
let o = "", u =
|
|
557
|
-
return
|
|
591
|
+
async function Je(e) {
|
|
592
|
+
const { url: t = "", currentTime: r, videoSuffix: n = "", vidoeAllowPlay: i = !1 } = e;
|
|
593
|
+
let o = "", u = n, c = "1", f;
|
|
594
|
+
return t instanceof File ? (o = URL.createObjectURL(t), u = E(t.name), c = m(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), c = m(t)) : T(t) ? (o = t, c = m(t)) : (t.includes("https") || t.includes("http")) && (o = t, u = E(t), c = m(t)), (u ? w.videoAllowType.includes(u.toLowerCase()) : !1) ? i ? D(o, r) : (f = await ce({
|
|
558
595
|
url: o,
|
|
559
596
|
fileType: c
|
|
560
|
-
}), f.play ?
|
|
561
|
-
|
|
562
|
-
})) : new Promise((
|
|
563
|
-
|
|
597
|
+
}), f.play ? D(o, r) : new Promise((a) => {
|
|
598
|
+
a("");
|
|
599
|
+
})) : new Promise((a) => {
|
|
600
|
+
a("");
|
|
564
601
|
});
|
|
565
602
|
}
|
|
566
|
-
async function
|
|
603
|
+
async function D(e, t = 0) {
|
|
567
604
|
return new Promise((r) => {
|
|
568
|
-
let
|
|
569
|
-
|
|
605
|
+
let n = document.createElement("video");
|
|
606
|
+
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 function() {
|
|
570
607
|
let i;
|
|
571
|
-
|
|
608
|
+
for (n == null || n.addEventListener("seeked", async function() {
|
|
572
609
|
i && i();
|
|
573
|
-
});
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
const u = document.createElement("canvas"), c = 0.8, f = u.getContext("2d"), a = (t == null ? void 0 : t.videoWidth) || 0 * c, l = (t == null ? void 0 : t.videoHeight) || 0 * c, s = 0;
|
|
578
|
-
u.width = (t == null ? void 0 : t.videoWidth) || 0 * c, u.height = (t == null ? void 0 : t.videoHeight) || 0 * c, f.drawImage(t, 0, 0, a + s, l + s), t = null, r(a === 0 || l === 0 ? "" : u.toDataURL("image/png", 1));
|
|
610
|
+
}); t < ((n == null ? void 0 : n.duration) || 0); ) {
|
|
611
|
+
n && (n.currentTime = t), await new Promise((g) => i = g);
|
|
612
|
+
const o = document.createElement("canvas"), u = 0.8, c = o.getContext("2d"), f = (n == null ? void 0 : n.videoWidth) || 0 * u, s = (n == null ? void 0 : n.videoHeight) || 0 * u, a = 0;
|
|
613
|
+
o.width = (n == null ? void 0 : n.videoWidth) || 0 * u, o.height = (n == null ? void 0 : n.videoHeight) || 0 * u, n && c.drawImage(n, 0, 0, f + a, s + a), n = null, r(f === 0 || s === 0 ? "" : o.toDataURL("image/png", 1));
|
|
579
614
|
}
|
|
580
|
-
});
|
|
615
|
+
}));
|
|
581
616
|
});
|
|
582
617
|
}
|
|
583
|
-
function
|
|
618
|
+
function T(e = "") {
|
|
584
619
|
return !!(e && [
|
|
585
620
|
"data:image/",
|
|
586
621
|
"data:video/",
|
|
587
622
|
"data:audio/"
|
|
588
623
|
].find((r) => e.includes(r)));
|
|
589
624
|
}
|
|
590
|
-
function
|
|
591
|
-
|
|
625
|
+
function Xe(e) {
|
|
626
|
+
return typeof e == "string" && /^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e);
|
|
592
627
|
}
|
|
593
|
-
function
|
|
594
|
-
e &&
|
|
628
|
+
function Ze(e, t, r, n = !1) {
|
|
629
|
+
e && t && r && e.addEventListener(t, r, n);
|
|
595
630
|
}
|
|
596
|
-
function
|
|
631
|
+
function Ye(e, t, r, n = !1) {
|
|
632
|
+
e && t && r && e.removeEventListener(t, r, n);
|
|
633
|
+
}
|
|
634
|
+
function Ge() {
|
|
597
635
|
return /windows|win32/i.test(navigator.userAgent);
|
|
598
636
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
637
|
+
function Qe(e) {
|
|
638
|
+
return $(e) ? e : !!e;
|
|
639
|
+
}
|
|
640
|
+
function L(e, t) {
|
|
641
|
+
const r = `^\\d+(?:\\.\\d{0,${e}})?`, n = new RegExp(r), i = t.toString().match(n);
|
|
642
|
+
if (i) {
|
|
643
|
+
const o = i[0];
|
|
644
|
+
if (o.includes(".")) {
|
|
645
|
+
const [u, c] = o.split(".");
|
|
646
|
+
if (/^0*$/.test(c))
|
|
647
|
+
return u;
|
|
648
|
+
}
|
|
649
|
+
return o;
|
|
650
|
+
}
|
|
651
|
+
return t.toString();
|
|
652
|
+
}
|
|
653
|
+
function ke(e, t) {
|
|
654
|
+
const { toChinese: r = !1, fixed: n = 2, min: i = 1e4 } = t || {}, o = d(i) ? i : 1e4, u = d(n) ? n : 2, c = r ? e < o ? "" : e < 1e8 ? "万" : "亿" : e < o ? "" : e < 1e8 ? "w" : "亿";
|
|
655
|
+
if (!d(e))
|
|
656
|
+
return {
|
|
657
|
+
str: `${e}`,
|
|
658
|
+
number: `${e}`
|
|
659
|
+
};
|
|
660
|
+
if (e < o)
|
|
661
|
+
return {
|
|
662
|
+
str: `${e}`,
|
|
663
|
+
number: `${e}`
|
|
664
|
+
};
|
|
665
|
+
if (u === 0) {
|
|
666
|
+
const s = (e / (e < 1e8 ? 1e4 : 1e8)).toFixed(1).split(".")[0];
|
|
667
|
+
return {
|
|
668
|
+
str: `${s}${c}`,
|
|
669
|
+
number: s,
|
|
670
|
+
unit: c
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
let f;
|
|
674
|
+
return e < 1e8 ? (f = L(u, e / 1e4), {
|
|
675
|
+
str: f + c,
|
|
676
|
+
number: f,
|
|
677
|
+
unit: c
|
|
678
|
+
}) : (f = L(u, e / 1e8), {
|
|
679
|
+
str: f + c,
|
|
680
|
+
number: f,
|
|
681
|
+
unit: c
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
function Ke(e, t) {
|
|
685
|
+
let r = 0;
|
|
686
|
+
const n = document.querySelector(t.root || "hiddenElement");
|
|
687
|
+
if (!n)
|
|
688
|
+
return 0;
|
|
689
|
+
const i = document.createElement(t.createName || "span");
|
|
690
|
+
return i.innerHTML = e, (t.cssObject || l(t.cssObject)) && Object.keys(t.cssObject).forEach((o) => {
|
|
691
|
+
var u, c;
|
|
692
|
+
(u = t.cssObject) != null && u[o] && (i.style[o] = (c = t.cssObject) == null ? void 0 : c[o]);
|
|
693
|
+
}), n.append(i), r = i.getBoundingClientRect()[t.type || "width"], n.removeChild(i), r;
|
|
601
694
|
}
|
|
602
695
|
export {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
696
|
+
Be as arrayRepeat,
|
|
697
|
+
Ie as arraySlice,
|
|
698
|
+
qe as blobToDataURL,
|
|
699
|
+
m as checkFileType,
|
|
606
700
|
Y as classNames,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
701
|
+
ne as compareArray,
|
|
702
|
+
Ce as compareArraySort,
|
|
703
|
+
$e as compareArrayTimeSort,
|
|
704
|
+
re as compareToMaxTime,
|
|
705
|
+
Qe as convertValueBoolean,
|
|
706
|
+
He as dataURLtoBlob,
|
|
707
|
+
_e as dataURLtoFile,
|
|
708
|
+
x as deepCopy,
|
|
709
|
+
N as filterEmpty,
|
|
710
|
+
Me as formatDuraton,
|
|
711
|
+
L as formatNumber,
|
|
712
|
+
je as genColumnKey,
|
|
713
|
+
D as generateVidoePicture,
|
|
714
|
+
We as getBase64,
|
|
715
|
+
ze as getBlobUrl,
|
|
716
|
+
E as getFileSuffix,
|
|
717
|
+
oe as getLevelData,
|
|
718
|
+
Ne as getMaxFloor,
|
|
719
|
+
ce as getMediaInfos,
|
|
720
|
+
Te as getPrefixCls,
|
|
721
|
+
ie as getRandomNumber,
|
|
624
722
|
G as getScroll,
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
723
|
+
se as getScrollContainer,
|
|
724
|
+
ee as getSlot,
|
|
725
|
+
te as getSlotVNode,
|
|
726
|
+
Re as getSlotsChildren,
|
|
727
|
+
be as getSlotsProps,
|
|
728
|
+
Le as getSortIndex,
|
|
729
|
+
Ke as getTextWidth,
|
|
730
|
+
C as getValueFromObjectByKey,
|
|
731
|
+
Je as getVideoCoverPicture,
|
|
732
|
+
ue as getVideoFileUrl,
|
|
733
|
+
w as globalConfig,
|
|
734
|
+
De as handleCurrentPage,
|
|
735
|
+
Ue as handleShowIndex,
|
|
736
|
+
Pe as hanndleEmptyField,
|
|
737
|
+
J as is,
|
|
738
|
+
p as isArray,
|
|
739
|
+
T as isBase64,
|
|
740
|
+
$ as isBoolean,
|
|
741
|
+
Ae as isBrowser,
|
|
742
|
+
Xe as isDataURLBase64,
|
|
743
|
+
A as isDeepEqualReact,
|
|
744
|
+
K as isEmptyElement,
|
|
745
|
+
we as isFunction,
|
|
746
|
+
le as isImg,
|
|
747
|
+
ae as isInContainer,
|
|
748
|
+
he as isJSONStr,
|
|
749
|
+
ye as isMobile,
|
|
750
|
+
de as isNil,
|
|
751
|
+
d as isNumber,
|
|
752
|
+
l as isObject,
|
|
651
753
|
q as isScroll,
|
|
652
|
-
|
|
754
|
+
y as isServer,
|
|
653
755
|
X as isString,
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
756
|
+
Z as isTablet,
|
|
757
|
+
pe as isUrl,
|
|
758
|
+
Ge as isWindowsOs,
|
|
759
|
+
ge as merge,
|
|
760
|
+
me as nanoid,
|
|
761
|
+
Ye as off,
|
|
762
|
+
Se as omitBoolean,
|
|
763
|
+
Oe as omitUndefined,
|
|
764
|
+
Ee as omitUndefinedAndEmptyArr,
|
|
765
|
+
Ze as on,
|
|
766
|
+
Fe as runFunction,
|
|
767
|
+
xe as scrollTo,
|
|
665
768
|
V as slotRender,
|
|
666
|
-
|
|
667
|
-
|
|
769
|
+
ve as throttleByAnimationFrame,
|
|
770
|
+
ke as toConvertNumberShow,
|
|
771
|
+
Ve as treeData
|
|
668
772
|
};
|