@gx-design-vue/pro-utils 0.2.0-beta.50 → 0.2.0-beta.51

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