@gx-design-vue/pro-utils 0.2.0-beta.53 → 0.2.0-beta.54
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 +37 -37
- package/dist/pro-utils.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/pro-utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Comment as J, Fragment as
|
|
1
|
+
import { Comment as J, Fragment as N, isVNode as O } from "vue";
|
|
2
2
|
function X(e, t) {
|
|
3
3
|
return Object.prototype.toString.call(e) === `[object ${t}]`;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function U(e) {
|
|
6
6
|
return typeof e == "boolean";
|
|
7
7
|
}
|
|
8
8
|
function y(e) {
|
|
@@ -81,7 +81,7 @@ const Oe = (e) => e == null, A = typeof window > "u", Ae = (e) => {
|
|
|
81
81
|
return !1;
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
function
|
|
84
|
+
function B(e) {
|
|
85
85
|
if (!e || typeof e != "object")
|
|
86
86
|
return !1;
|
|
87
87
|
const t = Object.getPrototypeOf(e);
|
|
@@ -99,17 +99,17 @@ const ve = (...e) => {
|
|
|
99
99
|
return t;
|
|
100
100
|
};
|
|
101
101
|
function m(e, t, n) {
|
|
102
|
-
const r = (n == null ? void 0 : n.omitUndefined)
|
|
102
|
+
const r = U(n == null ? void 0 : n.omitUndefined) ? n == null ? void 0 : n.omitUndefined : !0, i = Object.keys(t);
|
|
103
103
|
for (let o = 0; o < i.length; o++) {
|
|
104
104
|
const f = i[o], u = t[f], c = e[f];
|
|
105
|
-
Array.isArray(u) ? Array.isArray(c) ? e[f] = m(c, u) : e[f] = m([], u) :
|
|
105
|
+
Array.isArray(u) ? Array.isArray(c) ? e[f] = m(c, u, n) : e[f] = m([], u, n) : B(u) ? B(c) ? Object.keys(u).length === 0 ? e[f] = u : e[f] = m(c, u, n) : e[f] = m({}, u, n) : r ? c === void 0 && u !== void 0 && (e[f] = u) : e[f] = u;
|
|
106
106
|
}
|
|
107
107
|
return e;
|
|
108
108
|
}
|
|
109
|
-
let
|
|
110
|
-
const
|
|
109
|
+
let L = 0;
|
|
110
|
+
const C = (e = 21) => {
|
|
111
111
|
if (typeof window > "u" || !window.crypto)
|
|
112
|
-
return (
|
|
112
|
+
return (L += 1).toFixed(0);
|
|
113
113
|
let t = "";
|
|
114
114
|
const n = crypto.getRandomValues(new Uint8Array(e));
|
|
115
115
|
for (; e--; ) {
|
|
@@ -117,7 +117,7 @@ const L = (e = 21) => {
|
|
|
117
117
|
t += r < 36 ? r.toString(36) : r < 62 ? (r - 26).toString(36).toUpperCase() : r < 63 ? "_" : "-";
|
|
118
118
|
}
|
|
119
119
|
return t;
|
|
120
|
-
}, Se = () => typeof window > "u" ?
|
|
120
|
+
}, Se = () => typeof window > "u" ? C() : window.crypto && window.crypto.randomUUID && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : C();
|
|
121
121
|
/**
|
|
122
122
|
* @vue/shared v3.5.13
|
|
123
123
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
@@ -185,14 +185,14 @@ function te(e, t, n, r) {
|
|
|
185
185
|
}
|
|
186
186
|
let W = (e) => setTimeout(e, 16), H = (e) => clearTimeout(e);
|
|
187
187
|
typeof window < "u" && "requestAnimationFrame" in window && (W = (e) => window.requestAnimationFrame(e), H = (e) => window.cancelAnimationFrame(e));
|
|
188
|
-
let
|
|
189
|
-
const
|
|
188
|
+
let M = 0;
|
|
189
|
+
const D = /* @__PURE__ */ new Map();
|
|
190
190
|
function _(e) {
|
|
191
|
-
|
|
191
|
+
D.delete(e);
|
|
192
192
|
}
|
|
193
193
|
function I(e, t = 1) {
|
|
194
|
-
|
|
195
|
-
const n =
|
|
194
|
+
M += 1;
|
|
195
|
+
const n = M;
|
|
196
196
|
function r(i) {
|
|
197
197
|
if (i === 0)
|
|
198
198
|
_(n), e();
|
|
@@ -200,13 +200,13 @@ function I(e, t = 1) {
|
|
|
200
200
|
const o = W(() => {
|
|
201
201
|
r(i - 1);
|
|
202
202
|
});
|
|
203
|
-
|
|
203
|
+
D.set(n, o);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
return r(t), n;
|
|
207
207
|
}
|
|
208
208
|
I.cancel = (e) => {
|
|
209
|
-
const t =
|
|
209
|
+
const t = D.get(e);
|
|
210
210
|
return _(t), H(t);
|
|
211
211
|
};
|
|
212
212
|
function Ie(e, t = {}) {
|
|
@@ -417,13 +417,13 @@ const De = (e) => {
|
|
|
417
417
|
Array.isArray(e[n]) && ((r = e[n]) == null ? void 0 : r.length) === 0 || e[n] !== void 0 && (t[n] = e[n]);
|
|
418
418
|
}), t;
|
|
419
419
|
};
|
|
420
|
-
function
|
|
420
|
+
function P(e) {
|
|
421
421
|
var t;
|
|
422
422
|
if (!(typeof e != "string" && !Array.isArray(e)))
|
|
423
423
|
return Array.isArray(e) ? e[e.length - 1] : (t = e.split(":")) == null ? void 0 : t.slice(-1)[0];
|
|
424
424
|
}
|
|
425
425
|
function fe(e) {
|
|
426
|
-
return e && (e.type === J || e.type ===
|
|
426
|
+
return e && (e.type === J || e.type === N && e.children.length === 0 || e.type === Text && e.children.trim() === "");
|
|
427
427
|
}
|
|
428
428
|
function Be(e, t) {
|
|
429
429
|
var n;
|
|
@@ -432,14 +432,14 @@ function Be(e, t) {
|
|
|
432
432
|
function q(e = []) {
|
|
433
433
|
const t = [];
|
|
434
434
|
return e.forEach((n) => {
|
|
435
|
-
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) ===
|
|
435
|
+
Array.isArray(n) ? t.push(...n) : (n == null ? void 0 : n.type) === N ? t.push(...q(n.children)) : t.push(n);
|
|
436
436
|
}), t.filter((n) => !fe(n));
|
|
437
437
|
}
|
|
438
438
|
function b(e, ...t) {
|
|
439
439
|
return typeof e == "function" ? e == null ? void 0 : e(...t) : e;
|
|
440
440
|
}
|
|
441
441
|
function ue(e, t, n = "default", r) {
|
|
442
|
-
const i =
|
|
442
|
+
const i = P(n);
|
|
443
443
|
if (i) {
|
|
444
444
|
let o;
|
|
445
445
|
const f = z(t, n);
|
|
@@ -448,7 +448,7 @@ function ue(e, t, n = "default", r) {
|
|
|
448
448
|
}
|
|
449
449
|
function ce(e, t, n = "default", r) {
|
|
450
450
|
var o, f, u;
|
|
451
|
-
const i =
|
|
451
|
+
const i = P(n);
|
|
452
452
|
if (i) {
|
|
453
453
|
let c;
|
|
454
454
|
const s = z(t, n);
|
|
@@ -458,10 +458,10 @@ function ce(e, t, n = "default", r) {
|
|
|
458
458
|
function Le(e, t, n, r) {
|
|
459
459
|
const i = {};
|
|
460
460
|
return e.forEach((o) => {
|
|
461
|
-
const f =
|
|
461
|
+
const f = P(o);
|
|
462
462
|
if (f) {
|
|
463
463
|
const u = r != null && r.render ? ce(t, n, o, r == null ? void 0 : r.params) : ue(t, n, o);
|
|
464
|
-
(
|
|
464
|
+
(U(u) || u) && (i[f] = u);
|
|
465
465
|
}
|
|
466
466
|
}), i;
|
|
467
467
|
}
|
|
@@ -672,7 +672,7 @@ function h(e, t) {
|
|
|
672
672
|
if (!e || e === "data:")
|
|
673
673
|
return "4";
|
|
674
674
|
let n = "4";
|
|
675
|
-
return
|
|
675
|
+
return F(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 = T(e).toLowerCase(), x.imageType.includes(n) ? "1" : x.videoType.includes(n) ? "3" : x.audioType.includes(n) ? "2" : "4";
|
|
676
676
|
}
|
|
677
677
|
function ye(e) {
|
|
678
678
|
const { url: t = "", fileType: n = "1" } = e || {};
|
|
@@ -680,7 +680,7 @@ function ye(e) {
|
|
|
680
680
|
function o() {
|
|
681
681
|
i = { play: !1, height: 0, size: 0, width: 0, duration: 0 };
|
|
682
682
|
}
|
|
683
|
-
return t instanceof File ? r = URL.createObjectURL(t) :
|
|
683
|
+
return t instanceof File ? r = URL.createObjectURL(t) : F(t) ? r = t : t instanceof Blob ? r = URL.createObjectURL(t) : (t.includes("https") || t.includes("http")) && (r = t), new Promise((f) => {
|
|
684
684
|
let u;
|
|
685
685
|
n === "1" ? (u = document.createElement("img"), u.src = r) : n === "2" ? (u = document.createElement("audio"), u.src = r) : n === "3" && (u = document.createElement("video"), u.src = r), n === "1" ? u.onload = function() {
|
|
686
686
|
o(), i.play = !0, i.width = u.width || 0, i.height = u.height || 0, f(i), u = null;
|
|
@@ -694,16 +694,16 @@ function ye(e) {
|
|
|
694
694
|
async function et(e) {
|
|
695
695
|
const { url: t = "", currentTime: n, videoSuffix: r = "", vidoeAllowPlay: i = !1 } = e;
|
|
696
696
|
let o = "", f = r, u = "1", c;
|
|
697
|
-
return t instanceof File ? (o = URL.createObjectURL(t), f = T(t.name), u = h(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), u = h(t)) :
|
|
697
|
+
return t instanceof File ? (o = URL.createObjectURL(t), f = T(t.name), u = h(t.name)) : t instanceof Blob ? (o = URL.createObjectURL(t), u = h(t)) : F(t) ? (o = t, u = h(t)) : (t.includes("https") || t.includes("http")) && (o = t, f = T(t), u = h(t)), (f ? x.videoAllowType.includes(f.toLowerCase()) : !1) ? i ? $(o, n) : (c = await ye({
|
|
698
698
|
url: o,
|
|
699
699
|
fileType: u
|
|
700
|
-
}), c.play ?
|
|
700
|
+
}), c.play ? $(o, n) : new Promise((l) => {
|
|
701
701
|
l("");
|
|
702
702
|
})) : new Promise((l) => {
|
|
703
703
|
l("");
|
|
704
704
|
});
|
|
705
705
|
}
|
|
706
|
-
async function
|
|
706
|
+
async function $(e, t = 0) {
|
|
707
707
|
return new Promise((n) => {
|
|
708
708
|
let r = document.createElement("video");
|
|
709
709
|
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 () => {
|
|
@@ -718,7 +718,7 @@ async function M(e, t = 0) {
|
|
|
718
718
|
}));
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function F(e = "") {
|
|
722
722
|
return !!(e && [
|
|
723
723
|
"data:image/",
|
|
724
724
|
"data:video/",
|
|
@@ -738,9 +738,9 @@ function it() {
|
|
|
738
738
|
return /windows|win32/i.test(navigator.userAgent);
|
|
739
739
|
}
|
|
740
740
|
function ot(e) {
|
|
741
|
-
return
|
|
741
|
+
return U(e) ? e : !!e;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function V(e, t) {
|
|
744
744
|
const n = `^\\d+(?:\\.\\d{0,${e}})?`, r = new RegExp(n), i = t.toString().match(r);
|
|
745
745
|
if (i) {
|
|
746
746
|
const o = i[0];
|
|
@@ -774,11 +774,11 @@ function ft(e, t) {
|
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
776
|
let c;
|
|
777
|
-
return e < 1e8 ? (c =
|
|
777
|
+
return e < 1e8 ? (c = V(f, e / 1e4), {
|
|
778
778
|
str: c + u,
|
|
779
779
|
number: c,
|
|
780
780
|
unit: u
|
|
781
|
-
}) : (c =
|
|
781
|
+
}) : (c = V(f, e / 1e8), {
|
|
782
782
|
str: c + u,
|
|
783
783
|
number: c,
|
|
784
784
|
unit: u
|
|
@@ -814,9 +814,9 @@ export {
|
|
|
814
814
|
m as deepMerge,
|
|
815
815
|
q as filterEmpty,
|
|
816
816
|
Xe as formatDuraton,
|
|
817
|
-
|
|
817
|
+
V as formatNumber,
|
|
818
818
|
Me as genColumnKey,
|
|
819
|
-
|
|
819
|
+
$ as generateVidoePicture,
|
|
820
820
|
Qe as getBase64,
|
|
821
821
|
Ge as getBlobUrl,
|
|
822
822
|
T as getFileSuffix,
|
|
@@ -842,8 +842,8 @@ export {
|
|
|
842
842
|
Je as hanndleEmptyField,
|
|
843
843
|
X as is,
|
|
844
844
|
a as isArray,
|
|
845
|
-
|
|
846
|
-
|
|
845
|
+
F as isBase64,
|
|
846
|
+
U as isBoolean,
|
|
847
847
|
Ue as isBrowser,
|
|
848
848
|
tt as isDataURLBase64,
|
|
849
849
|
E as isDeepEqualReact,
|
package/dist/pro-utils.umd.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(c,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(c=typeof globalThis<"u"?globalThis:c||self,d(c.PorUtils={},c.vue))})(this,function(c,d){"use strict";function b(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function
|
|
1
|
+
(function(c,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(c=typeof globalThis<"u"?globalThis:c||self,d(c.PorUtils={},c.vue))})(this,function(c,d){"use strict";function b(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function R(e){return typeof e=="boolean"}function m(e){return typeof e=="number"}function y(e){return typeof Array.isArray>"u"?Object.prototype.toString.call(e)==="[object Array]":Array.isArray(e)}function g(e){return e!==null&&b(e,"Object")}function x(e){return typeof e=="string"||e instanceof String}function fe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function ue(e){if(typeof e!="string")return!1;try{const t=JSON.parse(e);return typeof t=="object"&&t!==null}catch{return!1}}function ce(){const e=navigator.userAgent||navigator.vendor;return!!(/iPhone/.test(e)||/Android/.test(e)&&/Mobile/.test(e)||/Windows Phone/.test(e)||/Mobile/.test(e)&&!z())}function z(){const e=navigator.userAgent||navigator.vendor;return!!(/iPad/.test(e)||/Macintosh/.test(e)&&"ontouchend"in document||/Android/.test(e)&&!/Mobile/.test(e))}function W(...e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(r){if(x(r))t.push(r);else if(y(r))for(let i=0;i<r.length;i++){const o=W(r[i]);o&&t.push(o)}else if(g(r))for(const i in r)r[i]&&t.push(i)}}return t.filter(n=>n).join(" ")}function F(e,t){if(typeof t!="string"&&!Array.isArray(t))return;const n=Array.isArray(t)?t:t.split(":");let r=e;for(let i=0;i<n.length;i++)if(r&&r.hasOwnProperty(n[i]))r=r[n[i]];else return;return r}function le(e){return/\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(e)}const ae=e=>e==null,w=typeof window>"u",se=e=>{if(!e||!e.startsWith("http"))return!1;try{return!!new URL(e)}catch{return!1}};function q(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 de=(...e)=>{const t={},n=e.length;let r,i=0;for(;i<n;i+=1)for(r in e[i])Object.prototype.hasOwnProperty.call(e[i],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]={...t[r],...e[i][r]}:t[r]=e[i][r]);return t};function S(e,t,n){const r=R(n==null?void 0:n.omitUndefined)?n==null?void 0:n.omitUndefined:!0,i=Object.keys(t);for(let o=0;o<i.length;o++){const f=i[o],u=t[f],l=e[f];Array.isArray(u)?Array.isArray(l)?e[f]=S(l,u,n):e[f]=S([],u,n):q(u)?q(l)?Object.keys(u).length===0?e[f]=u:e[f]=S(l,u,n):e[f]=S({},u,n):r?l===void 0&&u!==void 0&&(e[f]=u):e[f]=u}return e}let H=0;const _=(e=21)=>{if(typeof window>"u"||!window.crypto)return(H+=1).toFixed(0);let t="";const n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){const r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t},ye=()=>typeof window>"u"?_():window.crypto&&window.crypto.randomUUID&&typeof crypto.randomUUID=="function"?crypto.randomUUID():_();/**
|
|
2
2
|
* @vue/shared v3.5.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const ge=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},pe=/-(\w)/g,me=ge(e=>e.replace(pe,(t,n)=>n?n.toUpperCase():"")),I=function(e,t){var n;if(w||!e||!t)return"";t=me(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const i=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},J=(e,t)=>w?void 0:(t==null?I(e,"overflow"):t?I(e,"overflow-y"):I(e,"overflow-x")).match(/(scroll|auto|overlay)/),he=(e,t)=>{if(w)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(J(n,t))return n;n=n.parentNode}return n},we=(e,t)=>{if(w||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function B(e){return e!=null&&e===e.window}function X(e,t){var i;if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return B(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!B(e)&&typeof r!="number"&&(r=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[n]),r}function Se(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}let Z=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(Z=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let G=0;const P=new Map;function Q(e){P.delete(e)}function C(e,t=1){G+=1;const n=G;function r(i){if(i===0)Q(n),e();else{const o=Z(()=>{r(i-1)});P.set(n,o)}}return r(t),n}C.cancel=e=>{const t=P.get(e);return Q(t),Y(t)};function Ae(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),f=X(o,!0),u=Date.now(),l=()=>{const s=Date.now()-u,E=Se(s>i?i:s,f,e,i);B(o)?o.scrollTo(window.pageXOffset,E):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=E:o.scrollTop=E,s<i?C(l):typeof r=="function"&&r()};o&&C(l)}function Oe(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}const A={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function ve(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ee(e){return e==null||typeof e!="object"&&typeof e!="function"}function Re(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function O(e){return m(e)}function m(e,t=new Map){if(Ee(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=m(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,m(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(m(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Re(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=m(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),h(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),h(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),h(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,h(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),h(n,e,t),n}return e}function h(e,t,n){const r=[...Object.keys(t),...ve(t)];for(let i=0;i<r.length;i++){const o=r[i],f=Object.getOwnPropertyDescriptor(e,o);(f==null||f.writable)&&(e[o]=m(t[o],n))}}const Te=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ue=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Te;function R(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,f;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!R(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!R(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])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(f=Object.keys(e),i=f.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=i;o--!==0;){const u=f[o];if(!(n!=null&&n.includes(u))&&!(u==="_owner"&&e.$$typeof)&&!R(e[u],t[u],n,r))return r&&console.log(u),!1}return!0}return e!==e&&t!==t}const De=e=>{if(e&&e!==!0)return e},Fe=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Ie=e=>{const t={};return Object.keys(e||{}).forEach(n=>{var r;Array.isArray(e[n])&&((r=e[n])==null?void 0:r.length)===0||e[n]!==void 0&&(t[n]=e[n])}),t};function L(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.slice(-1)[0]}function j(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Be(e,t){var n;return N((n=e[t])==null?void 0:n.call(e))}function N(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===d.Fragment?t.push(...N(n.children)):t.push(n)}),t.filter(n=>!j(n))}function M(e,...t){return typeof e=="function"?e==null?void 0:e(...t):e}function K(e,t,n="default",r){const i=L(n);if(i){let o;const f=F(t,n);return f===!1?o=!1:f===!0?o=e==null?void 0:e[i]:g(f)&&r?d.isVNode(f)?o=f:o=e==null?void 0:e[i]:o=f||(e==null?void 0:e[i]),r?d.isVNode(o)?o:M(o):o}}function k(e,t,n="default",r){var o,f,u;const i=L(n);if(i){let l;const a=F(t,n);return a===!1?l=!1:a===!0?l=(o=e==null?void 0:e[i])==null?void 0:o.call(e,r):g(a)?d.isVNode(a)?l=a:l=(f=e==null?void 0:e[i])==null?void 0:f.call(e,r):l=a||((u=e==null?void 0:e[i])==null?void 0:u.call(e,r)),d.isVNode(l)?l:M(l,r)}}function Pe(e,t,n,r){const i={};return e.forEach(o=>{const f=L(o);if(f){const u=r!=null&&r.render?k(t,n,o,r==null?void 0:r.params):K(t,n,o);(D(u)||u)&&(i[f]=u)}}),i}const Ce=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Le=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function Ne(e,{align:t,showIndex:n}){const r=O(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ne().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function Me(e,...t){return typeof e=="function"?e(...t):e}function Ve(e){return JSON.parse(JSON.stringify(e))}function $e(e,t){if(g(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function be(e=[],t,n="children"){function r(i,o){return o.map((f,u)=>{const l=`${i}-${u+1}`;return f[n]&&(f[n]=r(l,f[n])),f.sortIndex=l,f})}return O(e).map((i,o)=>{const f=g(t)&&t.current||1,u=g(t)&&t.pageSize||10,l=`${f?(f-1)*u+(o+1):o+1}`;return i[n]&&(i[n]=r(`${l}`,i[n])),i.sortIndex=l,i})}function xe(e,t){return y(e)?e==null?void 0:e.filter((n,r)=>{if(p(t))return r<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function ee(e,t,n,r=0){const i=p(r)&&(r===0||r===1)?r:0,o=e[n],f=t[n];let u=0;return o<f?u=i===0?-1:0:o>f&&(u=i===0?0:-1),u}function te(e,t,n,r=0){const i=p(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),f=new Date(t[n]);let u=0;return o<f?u=i===0?-1:0:o>f&&(u=i===0?0:-1),u}function ze(e,t,n=0){return e.sort((r,i)=>ee(r,i,t,n))}function We(e,t,n=0){return e.sort((r,i)=>te(r,i,t,n))}function qe(e){let t=O(e);const n=new Set(t);return t=Array.from(n),t}function He(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function _e(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ne(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let f,u;if(t)for(f=0;f<t;f+=1)i[f]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",f=0;f<36;f+=1)i[f]||(u=Math.random()*16,i[f]=r[f===19?u&&3||8:u]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)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]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function Je(e=[],t="children"){let n=0;function r(i=[],o){i.forEach(f=>{f.floor=o,o>n&&(n=o),f[t]&&f[t].length>0&&r(f[t],o+1)})}return r(e,1),n}function re(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),y(r[t])&&r[t].length>0&&(n=n.concat(re(r[t],t)))}),n}function Xe(e,t){if(!e||!y(e)||(e==null?void 0:e.length)===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",rootId:o=0,emptyChildren:f=!0}=t||{},u=O(e);return u.map(l=>{var a;return!f&&l[i]&&((a=l[i])==null?void 0:a.length)===0&&delete l[i],l}).filter(l=>{const a=u.filter(s=>l[n]===s[r]);return a.length>0?l[i]=a:f&&(l[i]=[]),l[r]===o})}function Ze(e){return URL.createObjectURL(e)}function Ye(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function Ge(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function Qe(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const f=new Uint8Array(o);for(;o--;)f[o]=i.charCodeAt(o);return new File([f],t,{type:r})}function je(e,t,n){return new window.File([e],t,{type:n})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function T(e){var r,i,o,f,u;if(!e||typeof e!="string")return"";const t=ie(e),n=t.lastIndexOf(".");return n>0&&((u=(f=`${(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:f.split("."))==null?void 0:u[1])||""}function v(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";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=T(e).toLowerCase(),A.imageType.includes(n)?"1":A.videoType.includes(n)?"3":A.audioType.includes(n)?"2":"4"}function oe(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}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(f=>{let u;n==="1"?(u=document.createElement("img"),u.src=r):n==="2"?(u=document.createElement("audio"),u.src=r):n==="3"&&(u=document.createElement("video"),u.src=r),n==="1"?u.onload=function(){o(),i.play=!0,i.width=u.width||0,i.height=u.height||0,f(i),u=null}:u.oncanplay=function(){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},u.onerror=function(){o(),f(i),u=null}})}async function Ke(e){const{url:t="",currentTime:n,videoSuffix:r="",vidoeAllowPlay:i=!1}=e;let o="",f=r,u="1",l;return t instanceof File?(o=URL.createObjectURL(t),f=T(t.name),u=v(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),u=v(t)):U(t)?(o=t,u=v(t)):(t.includes("https")||t.includes("http"))&&(o=t,f=T(t),u=v(t)),(f?A.videoAllowType.includes(f.toLowerCase()):!1)?i?V(o,n):(l=await oe({url:o,fileType:u}),l.play?V(o,n):new Promise(s=>{s("")})):new Promise(s=>{s("")})}async function V(e,t=0){return new Promise(n=>{let r=document.createElement("video");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()=>{let i;for(r==null||r.addEventListener("seeked",async()=>{i&&i()});t<((r==null?void 0:r.duration)||0);){r&&(r.currentTime=t),await new Promise(E=>i=E);const o=document.createElement("canvas"),f=.8,u=o.getContext("2d"),l=(r==null?void 0:r.videoWidth)||0*f,a=(r==null?void 0:r.videoHeight)||0*f,s=0;o.width=(r==null?void 0:r.videoWidth)||0*f,o.height=(r==null?void 0:r.videoHeight)||0*f,r&&u.drawImage(r,0,0,l+s,a+s),r=null,n(l===0||a===0?"":o.toDataURL("image/png",1))}}))})}function U(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function ke(e){return typeof e=="string"&&/^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function et(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function tt(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function nt(){return/windows|win32/i.test(navigator.userAgent)}function rt(e){return D(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[f,u]=o.split(".");if(/^0*$/.test(u))return f}return o}return t.toString()}function it(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=p(i)?i:1e4,f=p(r)?r:2,u=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!p(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(f===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${u}`,number:a,unit:u}}let l;return e<1e8?(l=$(f,e/1e4),{str:l+u,number:l,unit:u}):(l=$(f,e/1e8),{str:l+u,number:l,unit:u})}function ot(e,t){let n=0;const r=document.querySelector(t.root||"hiddenElement");if(!r)return 0;const i=document.createElement(t.createName||"span");return i.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.keys(t.cssObject).forEach(o=>{var f,u;(f=t.cssObject)!=null&&f[o]&&(i.style[o]=(u=t.cssObject)==null?void 0:u[o])}),r.append(i),n=i.getBoundingClientRect()[t.type||"width"],r.removeChild(i),n}c.arrayRepeat=qe,c.arraySlice=xe,c.blobToDataURL=je,c.checkFileType=v,c.classNames=W,c.cloneDeep=O,c.compareArray=ee,c.compareArraySort=ze,c.compareArrayTimeSort=We,c.compareTime=te,c.convertValueBoolean=rt,c.copyProperties=h,c.dataURLtoBlob=Ge,c.dataURLtoFile=Qe,c.deepCopy=Ve,c.deepMerge=S,c.filterEmpty=N,c.formatDuraton=_e,c.formatNumber=$,c.genColumnKey=Le,c.generateVidoePicture=V,c.getBase64=Ye,c.getBlobUrl=Ze,c.getFileSuffix=T,c.getLevelData=re,c.getMaxFloor=Je,c.getMediaInfos=oe,c.getPrefixCls=Ce,c.getRandomNumber=ne,c.getScroll=X,c.getScrollContainer=he,c.getSlot=K,c.getSlotVNode=k,c.getSlotsChildren=Be,c.getSlotsProps=Pe,c.getSortIndex=be,c.getTextWidth=ot,c.getValueFromObjectByKey=F,c.getVideoCoverPicture=Ke,c.getVideoFileUrl=ie,c.globalConfig=A,c.handleCurrentPage=$e,c.handleShowIndex=Ne,c.hanndleEmptyField=He,c.is=b,c.isArray=y,c.isBase64=U,c.isBoolean=D,c.isBrowser=Ue,c.isDataURLBase64=ke,c.isDeepEqualReact=R,c.isEmptyElement=j,c.isFunction=fe,c.isImg=le,c.isInContainer=we,c.isJSONStr=ue,c.isMobile=ce,c.isNil=ae,c.isNumber=p,c.isObject=g,c.isScroll=J,c.isServer=w,c.isString=x,c.isTablet=z,c.isUrl=se,c.isWindowsOs=nt,c.merge=de,c.nanoid=ye,c.off=tt,c.omitBoolean=De,c.omitUndefined=Fe,c.omitUndefinedAndEmptyArr=Ie,c.on=et,c.runFunction=Me,c.scrollTo=Ae,c.slotRender=M,c.throttleByAnimationFrame=Oe,c.toConvertNumberShow=it,c.treeData=Xe,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const ge=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},me=/-(\w)/g,pe=ge(e=>e.replace(me,(t,n)=>n?n.toUpperCase():"")),I=function(e,t){var n;if(w||!e||!t)return"";t=pe(t),t==="float"&&(t="cssFloat");try{const r=e.style[t];if(r)return r;const i=(n=document==null?void 0:document.defaultView)==null?void 0:n.getComputedStyle(e,"");return i?i[t]:""}catch{return e.style[t]}},J=(e,t)=>w?void 0:(t==null?I(e,"overflow"):t?I(e,"overflow-y"):I(e,"overflow-x")).match(/(scroll|auto|overlay)/),he=(e,t)=>{if(w)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(J(n,t))return n;n=n.parentNode}return n},we=(e,t)=>{if(w||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return[window,document,document.documentElement,null,void 0].includes(t)?r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0}:r=t.getBoundingClientRect(),n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right};function B(e){return e!=null&&e===e.window}function X(e,t){var i;if(typeof window>"u")return 0;const n=t?"scrollTop":"scrollLeft";let r=0;return B(e)?r=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),e&&!B(e)&&typeof r!="number"&&(r=(i=(e.ownerDocument||e).documentElement)==null?void 0:i[n]),r}function Se(e,t,n,r){const i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}let Z=e=>setTimeout(e,16),Y=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(Z=e=>window.requestAnimationFrame(e),Y=e=>window.cancelAnimationFrame(e));let G=0;const P=new Map;function Q(e){P.delete(e)}function C(e,t=1){G+=1;const n=G;function r(i){if(i===0)Q(n),e();else{const o=Z(()=>{r(i-1)});P.set(n,o)}}return r(t),n}C.cancel=e=>{const t=P.get(e);return Q(t),Y(t)};function Ae(e,t={}){const{getContainer:n=()=>window,callback:r,duration:i=450}=t,o=n(),f=X(o,!0),u=Date.now(),l=()=>{const s=Date.now()-u,E=Se(s>i?i:s,f,e,i);B(o)?o.scrollTo(window.pageXOffset,E):o instanceof HTMLDocument||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=E:o.scrollTop=E,s<i?C(l):typeof r=="function"&&r()};o&&C(l)}function Oe(e){let t;const n=i=>()=>{t=null,e(...i)},r=(...i)=>{t==null&&(t=requestAnimationFrame(n(i)))};return r.cancel=()=>cancelAnimationFrame(t),r}const A={videoAllowType:["mp4","webm","ogg"],audioAllowType:["mp3"],imageType:["bmp","png","gif","jpg","jpeg","psd","tif"],videoType:["mp4","swf","rmvb","avi","flv","mpg","rm","mov","asf","3gp","mkv","ts","f4v","webm","m4v","3g2","m3u8"],audioType:["mp3","mpeg","aac","wav","wma","mp2","flac","midi","ra","ape","aac","cda"]};function ve(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Ee(e){return e==null||typeof e!="object"&&typeof e!="function"}function Re(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function O(e){return p(e)}function p(e,t=new Map){if(Ee(e))return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=Array.from({length:e.length});t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return Object.prototype.hasOwnProperty.call(e,"index")&&(n.index=e.index),Object.prototype.hasOwnProperty.call(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;t.set(e,n);for(const[r,i]of e)n.set(r,p(i,t));return n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const r of e)n.add(p(r,t));return n}if(typeof Buffer<"u"&&Buffer.isBuffer(e))return e.subarray();if(Re(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);t.set(e,n);for(let r=0;r<e.length;r++)n[r]=p(e[r],t);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return t.set(e,n),h(n,e,t),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return t.set(e,n),h(n,e,t),n}if(e instanceof Blob){const n=new Blob([e],{type:e.type});return t.set(e,n),h(n,e,t),n}if(e instanceof Error){const n=new e.constructor;return t.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,h(n,e,t),n}if(typeof e=="object"&&e!==null){const n={};return t.set(e,n),h(n,e,t),n}return e}function h(e,t,n){const r=[...Object.keys(t),...ve(t)];for(let i=0;i<r.length;i++){const o=r[i],f=Object.getOwnPropertyDescriptor(e,o);(f==null||f.writable)&&(e[o]=p(t[o],n))}}const Te=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ue=()=>process.env.NODE_ENV==="TEST"?!0:typeof window<"u"&&typeof window.document<"u"&&typeof window.matchMedia<"u"&&!Te;function T(e,t,n,r){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;let i,o,f;if(Array.isArray(e)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(!T(e[o],t[o],n,r))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;for(o of e.entries())if(!T(o[1],t.get(o[0]),n,r))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o of e.entries())if(!t.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(i=e.length,i!=t.length)return!1;for(o=i;o--!==0;)if(e[o]!==t[o])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(f=Object.keys(e),i=f.length,i!==Object.keys(t).length)return!1;for(o=i;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[o]))return!1;for(o=i;o--!==0;){const u=f[o];if(!(n!=null&&n.includes(u))&&!(u==="_owner"&&e.$$typeof)&&!T(e[u],t[u],n,r))return r&&console.log(u),!1}return!0}return e!==e&&t!==t}const De=e=>{if(e&&e!==!0)return e},Fe=e=>{const t={};if(Object.keys(e||{}).forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),!(Object.keys(t).length<1))return t},Ie=e=>{const t={};return Object.keys(e||{}).forEach(n=>{var r;Array.isArray(e[n])&&((r=e[n])==null?void 0:r.length)===0||e[n]!==void 0&&(t[n]=e[n])}),t};function L(e){var t;if(!(typeof e!="string"&&!Array.isArray(e)))return Array.isArray(e)?e[e.length-1]:(t=e.split(":"))==null?void 0:t.slice(-1)[0]}function j(e){return e&&(e.type===d.Comment||e.type===d.Fragment&&e.children.length===0||e.type===Text&&e.children.trim()==="")}function Be(e,t){var n;return N((n=e[t])==null?void 0:n.call(e))}function N(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===d.Fragment?t.push(...N(n.children)):t.push(n)}),t.filter(n=>!j(n))}function M(e,...t){return typeof e=="function"?e==null?void 0:e(...t):e}function K(e,t,n="default",r){const i=L(n);if(i){let o;const f=F(t,n);return f===!1?o=!1:f===!0?o=e==null?void 0:e[i]:g(f)&&r?d.isVNode(f)?o=f:o=e==null?void 0:e[i]:o=f||(e==null?void 0:e[i]),r?d.isVNode(o)?o:M(o):o}}function k(e,t,n="default",r){var o,f,u;const i=L(n);if(i){let l;const a=F(t,n);return a===!1?l=!1:a===!0?l=(o=e==null?void 0:e[i])==null?void 0:o.call(e,r):g(a)?d.isVNode(a)?l=a:l=(f=e==null?void 0:e[i])==null?void 0:f.call(e,r):l=a||((u=e==null?void 0:e[i])==null?void 0:u.call(e,r)),d.isVNode(l)?l:M(l,r)}}function Pe(e,t,n,r){const i={};return e.forEach(o=>{const f=L(o);if(f){const u=r!=null&&r.render?k(t,n,o,r==null?void 0:r.params):K(t,n,o);(R(u)||u)&&(i[f]=u)}}),i}const Ce=({suffixCls:e,customizePrefixCls:t,isPor:n,className:r})=>{const i=r||(n?"gx-pro":"gx");return t||(e?`${i}-${e}`:i)},Le=(e,t)=>e?y(e)?e.join("-"):e.toString():`${t||0}`;function Ne(e,{align:t,showIndex:n}){const r=O(e);if(n&&e.length&&e.every(i=>i.dataIndex!=="sortIndex")){const i=e[0];r.unshift({title:"序号",align:t,fixed:i.fixed,width:60,uuid:ne().uuid(15),dataIndex:"sortIndex",key:"sortIndex"})}else r.filter(i=>i.dataIndex!=="sortIndex");return r}function Me(e,...t){return typeof e=="function"?e(...t):e}function Ve(e){return JSON.parse(JSON.stringify(e))}function $e(e,t){if(g(e)){const{pageSize:n=10,total:r=0}=e;let{current:i=1}=e;return r-t<=n*(i-1)&&(i=i-1),i===0?1:i}return 1}function be(e=[],t,n="children"){function r(i,o){return o.map((f,u)=>{const l=`${i}-${u+1}`;return f[n]&&(f[n]=r(l,f[n])),f.sortIndex=l,f})}return O(e).map((i,o)=>{const f=g(t)&&t.current||1,u=g(t)&&t.pageSize||10,l=`${f?(f-1)*u+(o+1):o+1}`;return i[n]&&(i[n]=r(`${l}`,i[n])),i.sortIndex=l,i})}function xe(e,t){return y(e)?e==null?void 0:e.filter((n,r)=>{if(m(t))return r<=t-1;if(y(t)&&t.length===2){const i=t[0]-1,o=t[1]?t[1]-1:e.length-1;return r<=o&&r>=i}else if(y(t)&&t.length===1){const i=t[0]-1,o=e.length-1;return r<=o&&r>=i}return!0}):[]}function ee(e,t,n,r=0){const i=m(r)&&(r===0||r===1)?r:0,o=e[n],f=t[n];let u=0;return o<f?u=i===0?-1:0:o>f&&(u=i===0?0:-1),u}function te(e,t,n,r=0){const i=m(r)&&(r===0||r===1)?r:0,o=new Date(e[n]),f=new Date(t[n]);let u=0;return o<f?u=i===0?-1:0:o>f&&(u=i===0?0:-1),u}function ze(e,t,n=0){return e.sort((r,i)=>ee(r,i,t,n))}function We(e,t,n=0){return e.sort((r,i)=>te(r,i,t,n))}function qe(e){let t=O(e);const n=new Set(t);return t=Array.from(n),t}function He(e,t){const n=["null","undefined"];let r=!0;return e===0?r=!0:n.includes(e)?r=!1:e||(r=!1),r?{value:e,success:r}:{value:t===""?t:t||"-",success:r}}function _e(e){let t="";if(e>-1){const n=Math.floor(e/3600),r=Math.floor(e/60)%60,i=Number.parseInt(String(e%60));n<10?t="0"+n+":":t=n+":",r<10&&(t+="0"),t+=r+":",i<10&&(t+="0"),t+=i}return t.split(":")[0]==="00"?`${t.split(":")[1]}:${t.split(":")[2]}`:t}function ne(){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return{uuid(t,n){const r=e,i=[],o=n||r.length;let f,u;if(t)for(f=0;f<t;f+=1)i[f]=r[Number.parseInt(String(Math.random()*o))];else for(i[8]="-",i[13]="-",i[18]="-",i[23]="-",i[14]="4",f=0;f<36;f+=1)i[f]||(u=Math.random()*16,i[f]=r[f===19?u&&3||8:u]);return i.join("")},uuidFast(){const t=e,n=Array.from({length:36});let r=0,i,o;for(o=0;o<36;o+=1)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]);return n.join("")},uuidString(){return this.uuidFast().replace(new RegExp("-","g"),"")},uuidCompact(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=Math.random()*16||0;return(t==="x"?n:n&&3||8).toString(16)})}}}function Je(e=[],t="children"){let n=0;function r(i=[],o){i.forEach(f=>{f.floor=o,o>n&&(n=o),f[t]&&f[t].length>0&&r(f[t],o+1)})}return r(e,1),n}function re(e,t="children"){let n=[];return e.forEach(r=>{n.push(r),y(r[t])&&r[t].length>0&&(n=n.concat(re(r[t],t)))}),n}function Xe(e,t){if(!e||!y(e)||(e==null?void 0:e.length)===0)return[];const{id:n="id",parentId:r="parentId",children:i="children",rootId:o=0,emptyChildren:f=!0}=t||{},u=O(e);return u.map(l=>{var a;return!f&&l[i]&&((a=l[i])==null?void 0:a.length)===0&&delete l[i],l}).filter(l=>{const a=u.filter(s=>l[n]===s[r]);return a.length>0?l[i]=a:f&&(l[i]=[]),l[r]===o})}function Ze(e){return URL.createObjectURL(e)}function Ye(e){return new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i)})}function Ge(e){const t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]);let i=r.length;const o=new Uint8Array(i);for(;i--;)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})}function Qe(e,t){const n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]);let o=i.length;const f=new Uint8Array(o);for(;o--;)f[o]=i.charCodeAt(o);return new File([f],t,{type:r})}function je(e,t,n){return new window.File([e],t,{type:n})}function ie(e){if(!e||typeof e!="string")return"";const t=e.indexOf("?");return t>0?`${e.substring(0,t)}`:e}function U(e){var r,i,o,f,u;if(!e||typeof e!="string")return"";const t=ie(e),n=t.lastIndexOf(".");return n>0&&((u=(f=`${(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:f.split("."))==null?void 0:u[1])||""}function v(e,t){if(t)return t;if(!e||e==="data:")return"4";let n="4";return D(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=U(e).toLowerCase(),A.imageType.includes(n)?"1":A.videoType.includes(n)?"3":A.audioType.includes(n)?"2":"4"}function oe(e){const{url:t="",fileType:n="1"}=e||{};let r="",i={play:!1,height:0,size:0,width:0,duration:0};function o(){i={play:!1,height:0,size:0,width:0,duration:0}}return t instanceof File?r=URL.createObjectURL(t):D(t)?r=t:t instanceof Blob?r=URL.createObjectURL(t):(t.includes("https")||t.includes("http"))&&(r=t),new Promise(f=>{let u;n==="1"?(u=document.createElement("img"),u.src=r):n==="2"?(u=document.createElement("audio"),u.src=r):n==="3"&&(u=document.createElement("video"),u.src=r),n==="1"?u.onload=function(){o(),i.play=!0,i.width=u.width||0,i.height=u.height||0,f(i),u=null}:u.oncanplay=function(){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},u.onerror=function(){o(),f(i),u=null}})}async function Ke(e){const{url:t="",currentTime:n,videoSuffix:r="",vidoeAllowPlay:i=!1}=e;let o="",f=r,u="1",l;return t instanceof File?(o=URL.createObjectURL(t),f=U(t.name),u=v(t.name)):t instanceof Blob?(o=URL.createObjectURL(t),u=v(t)):D(t)?(o=t,u=v(t)):(t.includes("https")||t.includes("http"))&&(o=t,f=U(t),u=v(t)),(f?A.videoAllowType.includes(f.toLowerCase()):!1)?i?V(o,n):(l=await oe({url:o,fileType:u}),l.play?V(o,n):new Promise(s=>{s("")})):new Promise(s=>{s("")})}async function V(e,t=0){return new Promise(n=>{let r=document.createElement("video");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()=>{let i;for(r==null||r.addEventListener("seeked",async()=>{i&&i()});t<((r==null?void 0:r.duration)||0);){r&&(r.currentTime=t),await new Promise(E=>i=E);const o=document.createElement("canvas"),f=.8,u=o.getContext("2d"),l=(r==null?void 0:r.videoWidth)||0*f,a=(r==null?void 0:r.videoHeight)||0*f,s=0;o.width=(r==null?void 0:r.videoWidth)||0*f,o.height=(r==null?void 0:r.videoHeight)||0*f,r&&u.drawImage(r,0,0,l+s,a+s),r=null,n(l===0||a===0?"":o.toDataURL("image/png",1))}}))})}function D(e=""){return!!(e&&["data:image/","data:video/","data:audio/"].find(n=>e.includes(n)))}function ke(e){return typeof e=="string"&&/^data:(image|video|audio)\/[A-Za-z]+;base64,[A-Za-z0-9+/=]+$/.test(e)}function et(e,t,n,r=!1){e&&t&&n&&e.addEventListener(t,n,r)}function tt(e,t,n,r=!1){e&&t&&n&&e.removeEventListener(t,n,r)}function nt(){return/windows|win32/i.test(navigator.userAgent)}function rt(e){return R(e)?e:!!e}function $(e,t){const n=`^\\d+(?:\\.\\d{0,${e}})?`,r=new RegExp(n),i=t.toString().match(r);if(i){const o=i[0];if(o.includes(".")){const[f,u]=o.split(".");if(/^0*$/.test(u))return f}return o}return t.toString()}function it(e,t){const{toChinese:n=!1,fixed:r=2,min:i=1e4}=t||{},o=m(i)?i:1e4,f=m(r)?r:2,u=n?e<o?"":e<1e8?"万":"亿":e<o?"":e<1e8?"w":"亿";if(!m(e))return{str:`${e}`,number:`${e}`};if(e<o)return{str:`${e}`,number:`${e}`};if(f===0){const a=(e/(e<1e8?1e4:1e8)).toFixed(1).split(".")[0];return{str:`${a}${u}`,number:a,unit:u}}let l;return e<1e8?(l=$(f,e/1e4),{str:l+u,number:l,unit:u}):(l=$(f,e/1e8),{str:l+u,number:l,unit:u})}function ot(e,t){let n=0;const r=document.querySelector(t.root||"hiddenElement");if(!r)return 0;const i=document.createElement(t.createName||"span");return i.innerHTML=e,(t.cssObject||g(t.cssObject))&&Object.keys(t.cssObject).forEach(o=>{var f,u;(f=t.cssObject)!=null&&f[o]&&(i.style[o]=(u=t.cssObject)==null?void 0:u[o])}),r.append(i),n=i.getBoundingClientRect()[t.type||"width"],r.removeChild(i),n}c.arrayRepeat=qe,c.arraySlice=xe,c.blobToDataURL=je,c.checkFileType=v,c.classNames=W,c.cloneDeep=O,c.compareArray=ee,c.compareArraySort=ze,c.compareArrayTimeSort=We,c.compareTime=te,c.convertValueBoolean=rt,c.copyProperties=h,c.dataURLtoBlob=Ge,c.dataURLtoFile=Qe,c.deepCopy=Ve,c.deepMerge=S,c.filterEmpty=N,c.formatDuraton=_e,c.formatNumber=$,c.genColumnKey=Le,c.generateVidoePicture=V,c.getBase64=Ye,c.getBlobUrl=Ze,c.getFileSuffix=U,c.getLevelData=re,c.getMaxFloor=Je,c.getMediaInfos=oe,c.getPrefixCls=Ce,c.getRandomNumber=ne,c.getScroll=X,c.getScrollContainer=he,c.getSlot=K,c.getSlotVNode=k,c.getSlotsChildren=Be,c.getSlotsProps=Pe,c.getSortIndex=be,c.getTextWidth=ot,c.getValueFromObjectByKey=F,c.getVideoCoverPicture=Ke,c.getVideoFileUrl=ie,c.globalConfig=A,c.handleCurrentPage=$e,c.handleShowIndex=Ne,c.hanndleEmptyField=He,c.is=b,c.isArray=y,c.isBase64=D,c.isBoolean=R,c.isBrowser=Ue,c.isDataURLBase64=ke,c.isDeepEqualReact=T,c.isEmptyElement=j,c.isFunction=fe,c.isImg=le,c.isInContainer=we,c.isJSONStr=ue,c.isMobile=ce,c.isNil=ae,c.isNumber=m,c.isObject=g,c.isScroll=J,c.isServer=w,c.isString=x,c.isTablet=z,c.isUrl=se,c.isWindowsOs=nt,c.merge=de,c.nanoid=ye,c.off=tt,c.omitBoolean=De,c.omitUndefined=Fe,c.omitUndefinedAndEmptyArr=Ie,c.on=et,c.runFunction=Me,c.scrollTo=Ae,c.slotRender=M,c.throttleByAnimationFrame=Oe,c.toConvertNumberShow=it,c.treeData=Xe,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|