@nano-lib/util 1.1.8 → 1.1.9
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/lib/index.d.ts +1 -1
- package/lib/index.js +5 -5
- package/lib/index.mjs +185 -175
- package/lib/types/index.d.ts +6 -0
- package/lib/utils/common.d.ts +2 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ws = Object.defineProperty;
|
|
2
2
|
var vs = (t, e, n) => e in t ? ws(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
3
|
+
var z = (t, e, n) => vs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
const Ts = (t, e, n, r) => (t /= r / 2, t < 1 ? n / 2 * t * t + e : (t--, -n / 2 * (t * (t - 2) - 1) + e)), Es = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || ((t) => window.setTimeout(t, 16.666666666666668));
|
|
5
5
|
function Ss(t, e) {
|
|
6
6
|
if (e) {
|
|
@@ -41,7 +41,7 @@ function As() {
|
|
|
41
41
|
n === 9 || n === 14 || n === 19 || n === 24 ? t += "-" : n === 15 ? t += 4 : n === 20 ? t += e[Math.random() * 4 | 8] : t += e[Math.random() * 16 | 0];
|
|
42
42
|
return t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Vt(t, e) {
|
|
45
45
|
if (!t) return "-";
|
|
46
46
|
t.toString().length === 10 && (t = +t * 1e3), e ?? (e = "YYYY-MM-DD HH:mm:ss");
|
|
47
47
|
const n = new Date(t), r = (c, f, d = " ") => {
|
|
@@ -68,12 +68,12 @@ function Yt(t, e) {
|
|
|
68
68
|
function _s(t, e) {
|
|
69
69
|
`${t}`.length === 10 ? t = parseInt(t + "") * 1e3 : t = +t;
|
|
70
70
|
const n = new Date(t), s = (Date.now() - Number(n)) / 1e3;
|
|
71
|
-
return s < 30 ? "刚刚" : s < 3600 ? `${Math.ceil(s / 60)}分钟前` : s < 3600 * 24 ? `${Math.ceil(s / 3600)}小时前` : s < 3600 * 24 * 2 ? "1天前" : e ?
|
|
71
|
+
return s < 30 ? "刚刚" : s < 3600 ? `${Math.ceil(s / 60)}分钟前` : s < 3600 * 24 ? `${Math.ceil(s / 3600)}小时前` : s < 3600 * 24 * 2 ? "1天前" : e ? Vt(t, e) : `${n.getMonth() + 1}月${n.getDate()}日${n.getHours()}时${n.getMinutes()}分`;
|
|
72
72
|
}
|
|
73
73
|
function Is(t) {
|
|
74
74
|
const e = t || /* @__PURE__ */ new Date(), n = new Date(e), r = new Date(e);
|
|
75
75
|
return n.setHours(0, 0, 0), r.setHours(23, 59, 59), {
|
|
76
|
-
dateRange: [
|
|
76
|
+
dateRange: [Vt(n), Vt(r)],
|
|
77
77
|
timestampRange: [n.getTime(), r.getTime()]
|
|
78
78
|
};
|
|
79
79
|
}
|
|
@@ -166,10 +166,10 @@ function Hs(t) {
|
|
|
166
166
|
function Us(t) {
|
|
167
167
|
return /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(t);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function js(t, e = 8) {
|
|
170
170
|
return new RegExp(`^S*(?=S{${e}},})(?=S*d)(?=S*[A-Z])(?=S*[a-z])(?=S*[!@#$%^&*?])S*$`).test(t);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function zs(t) {
|
|
173
173
|
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t);
|
|
174
174
|
}
|
|
175
175
|
function Re(t) {
|
|
@@ -178,7 +178,7 @@ function Re(t) {
|
|
|
178
178
|
function $s(t) {
|
|
179
179
|
return /^0\d{2,3}-?\d{7,8}$/.test(t);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Vs(t) {
|
|
182
182
|
return /^1[3-9]\d{9}$/.test(t);
|
|
183
183
|
}
|
|
184
184
|
const Me = () => {
|
|
@@ -236,13 +236,13 @@ function Ma(t) {
|
|
|
236
236
|
if (r !== null && typeof r == "object")
|
|
237
237
|
Object.assign(c, r);
|
|
238
238
|
else {
|
|
239
|
-
const { protocol: f, hostname: d, port: h, pathname: l } =
|
|
239
|
+
const { protocol: f, hostname: d, port: h, pathname: l } = Ys();
|
|
240
240
|
Object.assign(c, { frontendProtocol: f, frontendDomain: d, frontendPort: h, frontendContextPath: l });
|
|
241
241
|
}
|
|
242
242
|
s(n, c).then((f) => o(f)).catch(() => o(!1));
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const Ys = (t = "443", e = "80") => {
|
|
246
246
|
const { protocol: n, hostname: r, port: s, pathname: o } = window.location, c = n.replace(":", ""), f = s || (c === "https" ? t : e), d = Ks(o);
|
|
247
247
|
return {
|
|
248
248
|
hostname: r,
|
|
@@ -303,11 +303,11 @@ function Ua(t, e, n = !1) {
|
|
|
303
303
|
let r = Math.round(t / e * 1e4) / 100;
|
|
304
304
|
return Number.isNaN(r) && (r = 0), n ? Math.floor(r) : r;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function ja(t) {
|
|
307
307
|
const e = document.createElement("link");
|
|
308
308
|
e.rel = "stylesheet", e.href = t, e.crossOrigin = "anonymous", document.getElementsByTagName("head")[0].appendChild(e);
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function za(t) {
|
|
311
311
|
return new Promise((e, n) => {
|
|
312
312
|
const r = document.createElement("script");
|
|
313
313
|
r.type = "text/javascript", r.src = t, r.onload = () => e(), r.onerror = (s) => n(s), document.getElementsByTagName("head")[0].appendChild(r);
|
|
@@ -317,6 +317,15 @@ function $a(t, e = 48, n = 48) {
|
|
|
317
317
|
const r = t.replace("#", "");
|
|
318
318
|
return `data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="${e}" height="${n}"><path d="M787.510356 387.850445c0-152.160515-123.350352-275.511891-275.510868-275.511891S236.487597 235.68993 236.487597 387.850445c0 44.665269 10.640338 86.841857 29.507034 124.151601l-0.010233-0.001023 0.059352 0.100284c5.548366 10.962679 11.812023 21.500687 18.723434 31.56081L511.999488 926.678464l227.234351-383.021463c6.909363-10.057053 13.170974-20.593014 18.71934-31.552623l0.062422-0.104377-0.011256 0.002047C776.870018 474.692303 787.510356 432.515714 787.510356 387.850445zM511.999488 506.802628c-74.596975 0-135.070278-60.47228-135.070278-135.070278 0-74.595952 60.47228-135.069255 135.070278-135.069255 74.595952 0 135.069255 60.473303 135.069255 135.069255C647.068743 446.330348 586.59544 506.802628 511.999488 506.802628z" fill="%23${r}"></path></svg>`;
|
|
319
319
|
}
|
|
320
|
+
function Va(t, e) {
|
|
321
|
+
const n = {};
|
|
322
|
+
n.MODE = e, n.DEV = e === "development", n.PRO = e === "production";
|
|
323
|
+
for (const [r, s] of Object.entries(t)) {
|
|
324
|
+
let o = s;
|
|
325
|
+
typeof s == "string" && (["true", "false"].includes(s) && (o = s === "true"), !Number.isNaN(Number(s)) && s !== "" && (o = +s)), n[r] = o;
|
|
326
|
+
}
|
|
327
|
+
return n;
|
|
328
|
+
}
|
|
320
329
|
const Zs = [
|
|
321
330
|
["date", "YYYY-MM-DD"],
|
|
322
331
|
["daterange", "YYYY-MM-DD"],
|
|
@@ -606,7 +615,7 @@ const Ii = (t, e, n, { allOwnKeys: r } = {}) => (Dt(e, (s, o) => {
|
|
|
606
615
|
let c;
|
|
607
616
|
(c = e(s, o, t)) !== !1 && (r[o] = c || s);
|
|
608
617
|
}), Object.defineProperties(t, r);
|
|
609
|
-
},
|
|
618
|
+
}, ji = (t) => {
|
|
610
619
|
On(t, (e, n) => {
|
|
611
620
|
if (Q(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
612
621
|
return !1;
|
|
@@ -621,7 +630,7 @@ const Ii = (t, e, n, { allOwnKeys: r } = {}) => (Dt(e, (s, o) => {
|
|
|
621
630
|
});
|
|
622
631
|
}
|
|
623
632
|
});
|
|
624
|
-
},
|
|
633
|
+
}, zi = (t, e) => {
|
|
625
634
|
const n = {}, r = (s) => {
|
|
626
635
|
s.forEach((o) => {
|
|
627
636
|
n[o] = !0;
|
|
@@ -629,8 +638,8 @@ const Ii = (t, e, n, { allOwnKeys: r } = {}) => (Dt(e, (s, o) => {
|
|
|
629
638
|
};
|
|
630
639
|
return Rt(t) ? r(t) : r(String(t).split(e)), n;
|
|
631
640
|
}, $i = () => {
|
|
632
|
-
},
|
|
633
|
-
function
|
|
641
|
+
}, Vi = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
642
|
+
function Yi(t) {
|
|
634
643
|
return !!(t && Q(t.append) && t[vn] === "FormData" && t[Wt]);
|
|
635
644
|
}
|
|
636
645
|
const Ki = (t) => {
|
|
@@ -703,15 +712,15 @@ const Ki = (t) => {
|
|
|
703
712
|
hasOwnProp: Ne,
|
|
704
713
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
705
714
|
reduceDescriptors: On,
|
|
706
|
-
freezeMethods:
|
|
707
|
-
toObjectSet:
|
|
715
|
+
freezeMethods: ji,
|
|
716
|
+
toObjectSet: zi,
|
|
708
717
|
toCamelCase: Hi,
|
|
709
718
|
noop: $i,
|
|
710
|
-
toFiniteNumber:
|
|
719
|
+
toFiniteNumber: Vi,
|
|
711
720
|
findKey: Sn,
|
|
712
721
|
global: xt,
|
|
713
722
|
isContextDefined: Rn,
|
|
714
|
-
isSpecCompliantForm:
|
|
723
|
+
isSpecCompliantForm: Yi,
|
|
715
724
|
toJSONObject: Ki,
|
|
716
725
|
isAsyncFn: Ji,
|
|
717
726
|
isThenable: Wi,
|
|
@@ -1120,8 +1129,8 @@ const mo = y.toObjectSet([
|
|
|
1120
1129
|
function _t(t) {
|
|
1121
1130
|
return t && String(t).trim().toLowerCase();
|
|
1122
1131
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return t === !1 || t == null ? t : y.isArray(t) ? t.map(
|
|
1132
|
+
function jt(t) {
|
|
1133
|
+
return t === !1 || t == null ? t : y.isArray(t) ? t.map(jt) : String(t);
|
|
1125
1134
|
}
|
|
1126
1135
|
function yo(t) {
|
|
1127
1136
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -1166,7 +1175,7 @@ let tt = class {
|
|
|
1166
1175
|
if (!l)
|
|
1167
1176
|
throw new Error("header name must be a non-empty string");
|
|
1168
1177
|
const v = y.findKey(s, l);
|
|
1169
|
-
(!v || s[v] === void 0 || h === !0 || h === void 0 && s[v] !== !1) && (s[v || d] =
|
|
1178
|
+
(!v || s[v] === void 0 || h === !0 || h === void 0 && s[v] !== !1) && (s[v || d] = jt(f));
|
|
1170
1179
|
}
|
|
1171
1180
|
const c = (f, d) => y.forEach(f, (h, l) => o(h, l, d));
|
|
1172
1181
|
if (y.isPlainObject(e) || e instanceof this.constructor)
|
|
@@ -1234,11 +1243,11 @@ let tt = class {
|
|
|
1234
1243
|
return y.forEach(this, (s, o) => {
|
|
1235
1244
|
const c = y.findKey(r, o);
|
|
1236
1245
|
if (c) {
|
|
1237
|
-
n[c] =
|
|
1246
|
+
n[c] = jt(s), delete n[o];
|
|
1238
1247
|
return;
|
|
1239
1248
|
}
|
|
1240
1249
|
const f = e ? bo(o) : String(o).trim();
|
|
1241
|
-
f !== o && delete n[o], n[f] =
|
|
1250
|
+
f !== o && delete n[o], n[f] = jt(s), r[f] = !0;
|
|
1242
1251
|
}), this;
|
|
1243
1252
|
}
|
|
1244
1253
|
concat(...e) {
|
|
@@ -1350,7 +1359,7 @@ function Eo(t, e) {
|
|
|
1350
1359
|
}, r - v)));
|
|
1351
1360
|
}, () => s && c(s)];
|
|
1352
1361
|
}
|
|
1353
|
-
const
|
|
1362
|
+
const Yt = (t, e, n = 3) => {
|
|
1354
1363
|
let r = 0;
|
|
1355
1364
|
const s = To(50, 250);
|
|
1356
1365
|
return Eo((o) => {
|
|
@@ -1369,14 +1378,14 @@ const Vt = (t, e, n = 3) => {
|
|
|
1369
1378
|
};
|
|
1370
1379
|
t(v);
|
|
1371
1380
|
}, n);
|
|
1372
|
-
},
|
|
1381
|
+
}, je = (t, e) => {
|
|
1373
1382
|
const n = t != null;
|
|
1374
1383
|
return [(r) => e[0]({
|
|
1375
1384
|
lengthComputable: n,
|
|
1376
1385
|
total: t,
|
|
1377
1386
|
loaded: r
|
|
1378
1387
|
}), e[1]];
|
|
1379
|
-
},
|
|
1388
|
+
}, ze = (t) => (...e) => y.asap(() => t(...e)), So = W.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, W.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
1380
1389
|
new URL(W.origin),
|
|
1381
1390
|
W.navigator && /(msie|trident)/i.test(W.navigator.userAgent)
|
|
1382
1391
|
) : () => !0, Ro = W.hasStandardBrowserEnv ? (
|
|
@@ -1550,7 +1559,7 @@ const kn = (t) => {
|
|
|
1550
1559
|
)), m = null;
|
|
1551
1560
|
}, o === void 0 && c.setContentType(null), "setRequestHeader" in m && y.forEach(c.toJSON(), function(S, x) {
|
|
1552
1561
|
m.setRequestHeader(x, S);
|
|
1553
|
-
}), y.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), f && f !== "json" && (m.responseType = s.responseType), h && ([O, w] =
|
|
1562
|
+
}), y.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), f && f !== "json" && (m.responseType = s.responseType), h && ([O, w] = Yt(h, !0), m.addEventListener("progress", O)), d && m.upload && ([v, I] = Yt(d), m.upload.addEventListener("progress", v), m.upload.addEventListener("loadend", I)), (s.cancelToken || s.signal) && (l = (g) => {
|
|
1554
1563
|
m && (r(!g || g.type ? new Ot(null, t, m) : g), m.abort(), m = null);
|
|
1555
1564
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1556
1565
|
const b = vo(s.url);
|
|
@@ -1611,7 +1620,7 @@ const kn = (t) => {
|
|
|
1611
1620
|
} finally {
|
|
1612
1621
|
await e.cancel();
|
|
1613
1622
|
}
|
|
1614
|
-
},
|
|
1623
|
+
}, Ve = (t, e, n, r) => {
|
|
1615
1624
|
const s = Co(t, e);
|
|
1616
1625
|
let o = 0, c, f = (d) => {
|
|
1617
1626
|
c || (c = !0, r && r(d));
|
|
@@ -1640,7 +1649,7 @@ const kn = (t) => {
|
|
|
1640
1649
|
}, {
|
|
1641
1650
|
highWaterMark: 2
|
|
1642
1651
|
});
|
|
1643
|
-
},
|
|
1652
|
+
}, Ye = 64 * 1024, { isFunction: Lt } = y, Po = (({ Request: t, Response: e }) => ({
|
|
1644
1653
|
Request: t,
|
|
1645
1654
|
Response: e
|
|
1646
1655
|
}))(y.global), {
|
|
@@ -1727,22 +1736,22 @@ const kn = (t) => {
|
|
|
1727
1736
|
duplex: "half"
|
|
1728
1737
|
}), D;
|
|
1729
1738
|
if (y.isFormData(T) && (D = et.headers.get("content-type")) && q.setContentType(D), et.body) {
|
|
1730
|
-
const [Ft, Tt] =
|
|
1739
|
+
const [Ft, Tt] = je(
|
|
1731
1740
|
J,
|
|
1732
|
-
|
|
1741
|
+
Yt(ze(A))
|
|
1733
1742
|
);
|
|
1734
|
-
T =
|
|
1743
|
+
T = Ve(et.body, Ye, Ft, Tt);
|
|
1735
1744
|
}
|
|
1736
1745
|
}
|
|
1737
1746
|
y.isString(N) || (N = N ? "include" : "omit");
|
|
1738
|
-
const
|
|
1747
|
+
const V = o && "credentials" in n.prototype, X = {
|
|
1739
1748
|
...U,
|
|
1740
1749
|
signal: k,
|
|
1741
1750
|
method: m.toUpperCase(),
|
|
1742
1751
|
headers: q.normalize().toJSON(),
|
|
1743
1752
|
body: T,
|
|
1744
1753
|
duplex: "half",
|
|
1745
|
-
credentials:
|
|
1754
|
+
credentials: V ? N : void 0
|
|
1746
1755
|
};
|
|
1747
1756
|
L = o && new n(F, X);
|
|
1748
1757
|
let Z = await (o ? P(L, U) : P(F, X));
|
|
@@ -1752,12 +1761,12 @@ const kn = (t) => {
|
|
|
1752
1761
|
["status", "statusText", "headers"].forEach((qt) => {
|
|
1753
1762
|
et[qt] = Z[qt];
|
|
1754
1763
|
});
|
|
1755
|
-
const D = y.toFiniteNumber(Z.headers.get("content-length")), [Ft, Tt] = x &&
|
|
1764
|
+
const D = y.toFiniteNumber(Z.headers.get("content-length")), [Ft, Tt] = x && je(
|
|
1756
1765
|
D,
|
|
1757
|
-
|
|
1766
|
+
Yt(ze(x), !0)
|
|
1758
1767
|
) || [];
|
|
1759
1768
|
Z = new r(
|
|
1760
|
-
|
|
1769
|
+
Ve(Z.body, Ye, Ft, () => {
|
|
1761
1770
|
Tt && Tt(), H && H();
|
|
1762
1771
|
}),
|
|
1763
1772
|
et
|
|
@@ -1775,13 +1784,13 @@ const kn = (t) => {
|
|
|
1775
1784
|
request: L
|
|
1776
1785
|
});
|
|
1777
1786
|
});
|
|
1778
|
-
} catch (
|
|
1779
|
-
throw H && H(),
|
|
1787
|
+
} catch (V) {
|
|
1788
|
+
throw H && H(), V && V.name === "TypeError" && /Load failed|fetch/i.test(V.message) ? Object.assign(
|
|
1780
1789
|
new M("Network Error", M.ERR_NETWORK, w, L),
|
|
1781
1790
|
{
|
|
1782
|
-
cause:
|
|
1791
|
+
cause: V.cause || V
|
|
1783
1792
|
}
|
|
1784
|
-
) : M.from(
|
|
1793
|
+
) : M.from(V, V && V.code, w, L);
|
|
1785
1794
|
}
|
|
1786
1795
|
};
|
|
1787
1796
|
}, Mo = /* @__PURE__ */ new Map(), Ln = (t) => {
|
|
@@ -1911,10 +1920,10 @@ function ko(t, e, n) {
|
|
|
1911
1920
|
throw new M("Unknown option " + o, M.ERR_BAD_OPTION);
|
|
1912
1921
|
}
|
|
1913
1922
|
}
|
|
1914
|
-
const
|
|
1923
|
+
const zt = {
|
|
1915
1924
|
assertOptions: ko,
|
|
1916
1925
|
validators: Qt
|
|
1917
|
-
}, ft =
|
|
1926
|
+
}, ft = zt.validators;
|
|
1918
1927
|
let bt = class {
|
|
1919
1928
|
constructor(e) {
|
|
1920
1929
|
this.defaults = e || {}, this.interceptors = {
|
|
@@ -1950,16 +1959,16 @@ let bt = class {
|
|
|
1950
1959
|
_request(e, n) {
|
|
1951
1960
|
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = wt(this.defaults, n);
|
|
1952
1961
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1953
|
-
r !== void 0 &&
|
|
1962
|
+
r !== void 0 && zt.assertOptions(r, {
|
|
1954
1963
|
silentJSONParsing: ft.transitional(ft.boolean),
|
|
1955
1964
|
forcedJSONParsing: ft.transitional(ft.boolean),
|
|
1956
1965
|
clarifyTimeoutError: ft.transitional(ft.boolean)
|
|
1957
1966
|
}, !1), s != null && (y.isFunction(s) ? n.paramsSerializer = {
|
|
1958
1967
|
serialize: s
|
|
1959
|
-
} :
|
|
1968
|
+
} : zt.assertOptions(s, {
|
|
1960
1969
|
encode: ft.function,
|
|
1961
1970
|
serialize: ft.function
|
|
1962
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1971
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), zt.assertOptions(n, {
|
|
1963
1972
|
baseUrl: ft.spelling("baseURL"),
|
|
1964
1973
|
withXsrfToken: ft.spelling("withXSRFToken")
|
|
1965
1974
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -2039,7 +2048,7 @@ y.forEach(["post", "put", "patch"], function(e) {
|
|
|
2039
2048
|
}
|
|
2040
2049
|
bt.prototype[e] = n(), bt.prototype[e + "Form"] = n(!0);
|
|
2041
2050
|
});
|
|
2042
|
-
let Lo = class
|
|
2051
|
+
let Lo = class jn {
|
|
2043
2052
|
constructor(e) {
|
|
2044
2053
|
if (typeof e != "function")
|
|
2045
2054
|
throw new TypeError("executor must be a function.");
|
|
@@ -2105,7 +2114,7 @@ let Lo = class zn {
|
|
|
2105
2114
|
static source() {
|
|
2106
2115
|
let e;
|
|
2107
2116
|
return {
|
|
2108
|
-
token: new
|
|
2117
|
+
token: new jn(function(s) {
|
|
2109
2118
|
e = s;
|
|
2110
2119
|
}),
|
|
2111
2120
|
cancel: e
|
|
@@ -2188,13 +2197,13 @@ const Te = {
|
|
|
2188
2197
|
Object.entries(Te).forEach(([t, e]) => {
|
|
2189
2198
|
Te[e] = t;
|
|
2190
2199
|
});
|
|
2191
|
-
function
|
|
2200
|
+
function zn(t) {
|
|
2192
2201
|
const e = new bt(t), n = wn(bt.prototype.request, e);
|
|
2193
2202
|
return y.extend(n, bt.prototype, e, { allOwnKeys: !0 }), y.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2194
|
-
return
|
|
2203
|
+
return zn(wt(t, s));
|
|
2195
2204
|
}, n;
|
|
2196
2205
|
}
|
|
2197
|
-
const $ =
|
|
2206
|
+
const $ = zn(Pt);
|
|
2198
2207
|
$.Axios = bt;
|
|
2199
2208
|
$.CanceledError = Ot;
|
|
2200
2209
|
$.CancelToken = Lo;
|
|
@@ -2215,26 +2224,26 @@ $.getAdapter = Hn.getAdapter;
|
|
|
2215
2224
|
$.HttpStatusCode = Te;
|
|
2216
2225
|
$.default = $;
|
|
2217
2226
|
const {
|
|
2218
|
-
Axios:
|
|
2219
|
-
AxiosError:
|
|
2220
|
-
CanceledError:
|
|
2221
|
-
isCancel:
|
|
2222
|
-
CancelToken:
|
|
2223
|
-
VERSION:
|
|
2224
|
-
all:
|
|
2225
|
-
Cancel:
|
|
2226
|
-
isAxiosError:
|
|
2227
|
-
spread:
|
|
2228
|
-
toFormData:
|
|
2229
|
-
AxiosHeaders:
|
|
2230
|
-
HttpStatusCode:
|
|
2231
|
-
formToJSON:
|
|
2232
|
-
getAdapter:
|
|
2233
|
-
mergeConfig:
|
|
2227
|
+
Axios: Ja,
|
|
2228
|
+
AxiosError: Wa,
|
|
2229
|
+
CanceledError: Za,
|
|
2230
|
+
isCancel: Ga,
|
|
2231
|
+
CancelToken: Xa,
|
|
2232
|
+
VERSION: Qa,
|
|
2233
|
+
all: tc,
|
|
2234
|
+
Cancel: ec,
|
|
2235
|
+
isAxiosError: nc,
|
|
2236
|
+
spread: rc,
|
|
2237
|
+
toFormData: sc,
|
|
2238
|
+
AxiosHeaders: ic,
|
|
2239
|
+
HttpStatusCode: oc,
|
|
2240
|
+
formToJSON: ac,
|
|
2241
|
+
getAdapter: cc,
|
|
2242
|
+
mergeConfig: uc
|
|
2234
2243
|
} = $;
|
|
2235
|
-
class
|
|
2244
|
+
class jo {
|
|
2236
2245
|
constructor() {
|
|
2237
|
-
|
|
2246
|
+
z(this, "pendingMap", /* @__PURE__ */ new Map());
|
|
2238
2247
|
}
|
|
2239
2248
|
generateRequestKey(e) {
|
|
2240
2249
|
const { method: n, url: r, params: s, data: o } = e;
|
|
@@ -2261,13 +2270,13 @@ class zo {
|
|
|
2261
2270
|
return this.pendingMap.size;
|
|
2262
2271
|
}
|
|
2263
2272
|
}
|
|
2264
|
-
class
|
|
2273
|
+
class zo {
|
|
2265
2274
|
constructor() {
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2275
|
+
z(this, "TOKEN_KEY", "__AUTH_TOKEN");
|
|
2276
|
+
z(this, "REFRESH_TOKEN_KEY", "__REFRESH_TOKEN");
|
|
2277
|
+
z(this, "TOKEN_EXPIRES_KEY", "__TOKEN_EXPIRES_AT");
|
|
2278
|
+
z(this, "isRefreshing", !1);
|
|
2279
|
+
z(this, "refreshSubscribers", []);
|
|
2271
2280
|
}
|
|
2272
2281
|
setToken({ accessToken: e, refreshToken: n, expiresIn: r }) {
|
|
2273
2282
|
if (ct.set(this.TOKEN_KEY, e), n && ct.set(this.REFRESH_TOKEN_KEY, n), r) {
|
|
@@ -2319,7 +2328,7 @@ class jo {
|
|
|
2319
2328
|
}
|
|
2320
2329
|
class $o {
|
|
2321
2330
|
constructor(e) {
|
|
2322
|
-
|
|
2331
|
+
z(this, "toastInstance");
|
|
2323
2332
|
this.toastInstance = e;
|
|
2324
2333
|
}
|
|
2325
2334
|
handleStatusError(e, n, r = !0) {
|
|
@@ -2350,13 +2359,13 @@ class $o {
|
|
|
2350
2359
|
$.isAxiosError(e) ? e.response ? this.handleStatusError(e.response.status, ((r = e.response.data) == null ? void 0 : r.message) || e.message, n) : this.handleNetworkError(e, n) : (n && this.toastInstance.error((e == null ? void 0 : e.message) || "发生未知错误"), console.error("[Error]:", e));
|
|
2351
2360
|
}
|
|
2352
2361
|
}
|
|
2353
|
-
class
|
|
2362
|
+
class Vo {
|
|
2354
2363
|
constructor(e) {
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2364
|
+
z(this, "toastInstance");
|
|
2365
|
+
z(this, "status", navigator.onLine ? "online" : "offline");
|
|
2366
|
+
z(this, "offlineQueue", []);
|
|
2367
|
+
z(this, "listeners", /* @__PURE__ */ new Set());
|
|
2368
|
+
z(this, "initialized", !1);
|
|
2360
2369
|
this.toastInstance = e, this.init();
|
|
2361
2370
|
}
|
|
2362
2371
|
init() {
|
|
@@ -2414,17 +2423,17 @@ class Yo {
|
|
|
2414
2423
|
return this.offlineQueue.length;
|
|
2415
2424
|
}
|
|
2416
2425
|
}
|
|
2417
|
-
class
|
|
2426
|
+
class fc {
|
|
2418
2427
|
constructor(e) {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
+
z(this, "axiosInstance");
|
|
2429
|
+
z(this, "errorInstance");
|
|
2430
|
+
z(this, "networkInstance");
|
|
2431
|
+
z(this, "cancelInstance");
|
|
2432
|
+
z(this, "tokenInstance");
|
|
2433
|
+
z(this, "loadingInstance");
|
|
2434
|
+
z(this, "requestOptions", {});
|
|
2435
|
+
z(this, "requestInstanceRequestOptions", {});
|
|
2436
|
+
z(this, "defaultRequestOptions", {
|
|
2428
2437
|
showLoading: !1,
|
|
2429
2438
|
cancelRepeatRequest: !0,
|
|
2430
2439
|
needToken: !0,
|
|
@@ -2435,14 +2444,14 @@ class uc {
|
|
|
2435
2444
|
maxRetries: 0,
|
|
2436
2445
|
retryDelay: 1e3
|
|
2437
2446
|
});
|
|
2438
|
-
|
|
2447
|
+
z(this, "defaultConfig", {
|
|
2439
2448
|
timeout: 10 * 1e3,
|
|
2440
2449
|
headers: {
|
|
2441
2450
|
"Content-Type": "application/json;charset=utf-8"
|
|
2442
2451
|
}
|
|
2443
2452
|
});
|
|
2444
2453
|
const { config: n = {}, requestOptions: r = {}, toastInstance: s, loadingInstance: o } = e;
|
|
2445
|
-
this.errorInstance = new $o(s), this.networkInstance = new
|
|
2454
|
+
this.errorInstance = new $o(s), this.networkInstance = new Vo(s), this.cancelInstance = new jo(), this.tokenInstance = new zo(), o && (this.loadingInstance = o), this.requestOptions = { ...this.defaultRequestOptions, ...r }, this.axiosInstance = $.create({
|
|
2446
2455
|
...this.defaultConfig,
|
|
2447
2456
|
...n
|
|
2448
2457
|
}), this.setupInterceptors(), this.setupNetworkListener();
|
|
@@ -2671,7 +2680,7 @@ class uc {
|
|
|
2671
2680
|
}
|
|
2672
2681
|
}
|
|
2673
2682
|
let yt = null;
|
|
2674
|
-
function
|
|
2683
|
+
function lc(t) {
|
|
2675
2684
|
const { cacheKey: e, cacheMode: n = "session", saveState: r = !0, handler: s } = t;
|
|
2676
2685
|
return r && yt || (yt = n === "local" ? dn.get(e) : ct.get(e), yt && typeof s == "function" && (yt = s(yt))), yt;
|
|
2677
2686
|
}
|
|
@@ -2723,7 +2732,7 @@ var $n = function() {
|
|
|
2723
2732
|
);
|
|
2724
2733
|
}(), Ee = typeof window < "u" && typeof document < "u" && window.document === document, Kt = function() {
|
|
2725
2734
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
2726
|
-
}(),
|
|
2735
|
+
}(), Yo = function() {
|
|
2727
2736
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Kt) : function(t) {
|
|
2728
2737
|
return setTimeout(function() {
|
|
2729
2738
|
return t(Date.now());
|
|
@@ -2736,7 +2745,7 @@ function Jo(t, e) {
|
|
|
2736
2745
|
n && (n = !1, t()), r && f();
|
|
2737
2746
|
}
|
|
2738
2747
|
function c() {
|
|
2739
|
-
|
|
2748
|
+
Yo(o);
|
|
2740
2749
|
}
|
|
2741
2750
|
function f() {
|
|
2742
2751
|
var d = Date.now();
|
|
@@ -2789,7 +2798,7 @@ var Wo = 20, Zo = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
2789
2798
|
return this.instance_ || (this.instance_ = new t()), this.instance_;
|
|
2790
2799
|
}, t.instance_ = null, t;
|
|
2791
2800
|
}()
|
|
2792
|
-
),
|
|
2801
|
+
), Vn = function(t, e) {
|
|
2793
2802
|
for (var n = 0, r = Object.keys(e); n < r.length; n++) {
|
|
2794
2803
|
var s = r[n];
|
|
2795
2804
|
Object.defineProperty(t, s, {
|
|
@@ -2803,7 +2812,7 @@ var Wo = 20, Zo = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
2803
2812
|
}, St = function(t) {
|
|
2804
2813
|
var e = t && t.ownerDocument && t.ownerDocument.defaultView;
|
|
2805
2814
|
return e || Kt;
|
|
2806
|
-
},
|
|
2815
|
+
}, Yn = te(0, 0, 0, 0);
|
|
2807
2816
|
function Jt(t) {
|
|
2808
2817
|
return parseFloat(t) || 0;
|
|
2809
2818
|
}
|
|
@@ -2829,7 +2838,7 @@ function ta(t) {
|
|
|
2829
2838
|
function ea(t) {
|
|
2830
2839
|
var e = t.clientWidth, n = t.clientHeight;
|
|
2831
2840
|
if (!e && !n)
|
|
2832
|
-
return
|
|
2841
|
+
return Yn;
|
|
2833
2842
|
var r = St(t).getComputedStyle(t), s = Qo(r), o = s.left + s.right, c = s.top + s.bottom, f = Jt(r.width), d = Jt(r.height);
|
|
2834
2843
|
if (r.boxSizing === "border-box" && (Math.round(f + o) !== e && (f -= Qe(r, "left", "right") + o), Math.round(d + c) !== n && (d -= Qe(r, "top", "bottom") + c)), !ra(t)) {
|
|
2835
2844
|
var h = Math.round(f + o) - e, l = Math.round(d + c) - n;
|
|
@@ -2848,11 +2857,11 @@ function ra(t) {
|
|
|
2848
2857
|
return t === St(t).document.documentElement;
|
|
2849
2858
|
}
|
|
2850
2859
|
function sa(t) {
|
|
2851
|
-
return Ee ? na(t) ? ta(t) : ea(t) :
|
|
2860
|
+
return Ee ? na(t) ? ta(t) : ea(t) : Yn;
|
|
2852
2861
|
}
|
|
2853
2862
|
function ia(t) {
|
|
2854
2863
|
var e = t.x, n = t.y, r = t.width, s = t.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, c = Object.create(o.prototype);
|
|
2855
|
-
return
|
|
2864
|
+
return Vn(c, {
|
|
2856
2865
|
x: e,
|
|
2857
2866
|
y: n,
|
|
2858
2867
|
width: r,
|
|
@@ -2885,7 +2894,7 @@ var oa = (
|
|
|
2885
2894
|
/* @__PURE__ */ function() {
|
|
2886
2895
|
function t(e, n) {
|
|
2887
2896
|
var r = ia(n);
|
|
2888
|
-
|
|
2897
|
+
Vn(this, { target: e, contentRect: r });
|
|
2889
2898
|
}
|
|
2890
2899
|
return t;
|
|
2891
2900
|
}()
|
|
@@ -2968,10 +2977,10 @@ function fa(t) {
|
|
|
2968
2977
|
n.length && n.forEach((r) => r());
|
|
2969
2978
|
}
|
|
2970
2979
|
}
|
|
2971
|
-
function
|
|
2980
|
+
function hc(t, e) {
|
|
2972
2981
|
typeof window > "u" || (t.__resizeListeners__ || (t.__resizeListeners__ = [], t.__ro__ = new ua(fa), t.__ro__.observe(t)), t.__resizeListeners__.push(e));
|
|
2973
2982
|
}
|
|
2974
|
-
function
|
|
2983
|
+
function dc(t, e) {
|
|
2975
2984
|
!t || !t.__resizeListeners__ || (t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e), 1), t.__resizeListeners__.length || t.__ro__.disconnect());
|
|
2976
2985
|
}
|
|
2977
2986
|
var $t = { exports: {} }, la = $t.exports, tn;
|
|
@@ -2994,15 +3003,15 @@ function ee() {
|
|
|
2994
3003
|
}
|
|
2995
3004
|
function d(i, a, u, p, E, R) {
|
|
2996
3005
|
for (var _ = a & 32767, B = a >> 15; --R >= 0; ) {
|
|
2997
|
-
var
|
|
2998
|
-
|
|
3006
|
+
var j = this[i] & 32767, K = this[i++] >> 15, st = B * j + K * _;
|
|
3007
|
+
j = _ * j + ((st & 32767) << 15) + u[p] + (E & 1073741823), E = (j >>> 30) + (st >>> 15) + B * K + (E >>> 30), u[p++] = j & 1073741823;
|
|
2999
3008
|
}
|
|
3000
3009
|
return E;
|
|
3001
3010
|
}
|
|
3002
3011
|
function h(i, a, u, p, E, R) {
|
|
3003
3012
|
for (var _ = a & 16383, B = a >> 14; --R >= 0; ) {
|
|
3004
|
-
var
|
|
3005
|
-
|
|
3013
|
+
var j = this[i] & 16383, K = this[i++] >> 14, st = B * j + K * _;
|
|
3014
|
+
j = _ * j + ((st & 16383) << 14) + u[p] + E, E = (j >> 28) + (st >> 14) + B * K, u[p++] = j & 268435455;
|
|
3006
3015
|
}
|
|
3007
3016
|
return E;
|
|
3008
3017
|
}
|
|
@@ -3112,7 +3121,7 @@ function ee() {
|
|
|
3112
3121
|
for (B = R - 1; B >= 0; --B) a[B] = 0;
|
|
3113
3122
|
a[R] = _, a.t = this.t + R + 1, a.s = this.s, a.clamp();
|
|
3114
3123
|
}
|
|
3115
|
-
function
|
|
3124
|
+
function V(i, a) {
|
|
3116
3125
|
a.s = this.s;
|
|
3117
3126
|
var u = Math.floor(i / this.DB);
|
|
3118
3127
|
if (u >= this.t) {
|
|
@@ -3162,8 +3171,8 @@ function ee() {
|
|
|
3162
3171
|
return;
|
|
3163
3172
|
}
|
|
3164
3173
|
u == null && (u = c());
|
|
3165
|
-
var R = c(), _ = this.s, B = i.s,
|
|
3166
|
-
|
|
3174
|
+
var R = c(), _ = this.s, B = i.s, j = this.DB - P(p[p.t - 1]);
|
|
3175
|
+
j > 0 ? (p.lShiftTo(j, R), E.lShiftTo(j, u)) : (p.copyTo(R), E.copyTo(u));
|
|
3167
3176
|
var K = R.t, st = R[K - 1];
|
|
3168
3177
|
if (st != 0) {
|
|
3169
3178
|
var rt = st * (1 << this.F1) + (K > 1 ? R[K - 2] >> this.F2 : 0), lt = this.FV / rt, Nt = (1 << this.F1) / rt, ot = 1 << this.F2, at = u.t, kt = at - K, ht = a ?? c();
|
|
@@ -3173,7 +3182,7 @@ function ee() {
|
|
|
3173
3182
|
if ((u[at] += R.am(0, ie, u, kt, 0, K)) < ie)
|
|
3174
3183
|
for (R.dlShiftTo(kt, ht), u.subTo(ht, u); u[at] < --ie; ) u.subTo(ht, u);
|
|
3175
3184
|
}
|
|
3176
|
-
a != null && (u.drShiftTo(K, a), _ != B && o.ZERO.subTo(a, a)), u.t = K, u.clamp(),
|
|
3185
|
+
a != null && (u.drShiftTo(K, a), _ != B && o.ZERO.subTo(a, a)), u.t = K, u.clamp(), j > 0 && u.rShiftTo(j, u), _ < 0 && o.ZERO.subTo(u, u);
|
|
3177
3186
|
}
|
|
3178
3187
|
}
|
|
3179
3188
|
}
|
|
@@ -3253,7 +3262,7 @@ function ee() {
|
|
|
3253
3262
|
var u;
|
|
3254
3263
|
return i < 256 || a.isEven() ? u = new D(a) : u = new mt(a), this.exp(i, u);
|
|
3255
3264
|
}
|
|
3256
|
-
o.prototype.copyTo = b, o.prototype.fromInt = g, o.prototype.fromString = x, o.prototype.clamp = A, o.prototype.dlShiftTo = L, o.prototype.drShiftTo = H, o.prototype.lShiftTo = J, o.prototype.rShiftTo =
|
|
3265
|
+
o.prototype.copyTo = b, o.prototype.fromInt = g, o.prototype.fromString = x, o.prototype.clamp = A, o.prototype.dlShiftTo = L, o.prototype.drShiftTo = H, o.prototype.lShiftTo = J, o.prototype.rShiftTo = V, o.prototype.subTo = X, o.prototype.multiplyTo = Z, o.prototype.squareTo = pt, o.prototype.divRemTo = vt, o.prototype.invDigit = er, o.prototype.isEven = ar, o.prototype.exp = cr, o.prototype.toString = C, o.prototype.negate = q, o.prototype.abs = N, o.prototype.compareTo = U, o.prototype.bitLength = k, o.prototype.mod = et, o.prototype.modPowInt = ur, o.ZERO = S(0), o.ONE = S(1);
|
|
3257
3266
|
function fr() {
|
|
3258
3267
|
var i = c();
|
|
3259
3268
|
return this.copyTo(i), i;
|
|
@@ -3290,12 +3299,12 @@ function ee() {
|
|
|
3290
3299
|
function yr(i, a) {
|
|
3291
3300
|
this.fromInt(0), a == null && (a = 10);
|
|
3292
3301
|
for (var u = this.chunkSize(a), p = Math.pow(a, u), E = !1, R = 0, _ = 0, B = 0; B < i.length; ++B) {
|
|
3293
|
-
var
|
|
3294
|
-
if (
|
|
3302
|
+
var j = T(i, B);
|
|
3303
|
+
if (j < 0) {
|
|
3295
3304
|
i.charAt(B) == "-" && this.signum() == 0 && (E = !0);
|
|
3296
3305
|
continue;
|
|
3297
3306
|
}
|
|
3298
|
-
_ = a * _ +
|
|
3307
|
+
_ = a * _ + j, ++R >= u && (this.dMultiply(p), this.dAddOffset(_, 0), R = 0, _ = 0);
|
|
3299
3308
|
}
|
|
3300
3309
|
R > 0 && (this.dMultiply(Math.pow(a, R)), this.dAddOffset(_, 0)), E && o.ZERO.subTo(this, this);
|
|
3301
3310
|
}
|
|
@@ -3430,11 +3439,11 @@ function ee() {
|
|
|
3430
3439
|
}
|
|
3431
3440
|
a.s = p < 0 ? -1 : 0, p > 0 ? a[u++] = p : p < -1 && (a[u++] = this.DV + p), a.t = u, a.clamp();
|
|
3432
3441
|
}
|
|
3433
|
-
function
|
|
3442
|
+
function jr(i) {
|
|
3434
3443
|
var a = c();
|
|
3435
3444
|
return this.addTo(i, a), a;
|
|
3436
3445
|
}
|
|
3437
|
-
function
|
|
3446
|
+
function zr(i) {
|
|
3438
3447
|
var a = c();
|
|
3439
3448
|
return this.subTo(i, a), a;
|
|
3440
3449
|
}
|
|
@@ -3442,11 +3451,11 @@ function ee() {
|
|
|
3442
3451
|
var a = c();
|
|
3443
3452
|
return this.multiplyTo(i, a), a;
|
|
3444
3453
|
}
|
|
3445
|
-
function
|
|
3454
|
+
function Vr() {
|
|
3446
3455
|
var i = c();
|
|
3447
3456
|
return this.squareTo(i), i;
|
|
3448
3457
|
}
|
|
3449
|
-
function
|
|
3458
|
+
function Yr(i) {
|
|
3450
3459
|
var a = c();
|
|
3451
3460
|
return this.divRemTo(i, a, null), a;
|
|
3452
3461
|
}
|
|
@@ -3526,7 +3535,7 @@ function ee() {
|
|
|
3526
3535
|
var u = i.bitLength(), p, E = S(1), R;
|
|
3527
3536
|
if (u <= 0) return E;
|
|
3528
3537
|
u < 18 ? p = 1 : u < 48 ? p = 3 : u < 144 ? p = 4 : u < 768 ? p = 5 : p = 6, u < 8 ? R = new D(a) : a.isEven() ? R = new gt(a) : R = new mt(a);
|
|
3529
|
-
var _ = new Array(), B = 3,
|
|
3538
|
+
var _ = new Array(), B = 3, j = p - 1, K = (1 << p) - 1;
|
|
3530
3539
|
if (_[1] = R.convert(this), p > 1) {
|
|
3531
3540
|
var st = c();
|
|
3532
3541
|
for (R.sqrTo(_[1], st); B <= K; )
|
|
@@ -3534,7 +3543,7 @@ function ee() {
|
|
|
3534
3543
|
}
|
|
3535
3544
|
var rt = i.t - 1, lt, Nt = !0, ot = c(), at;
|
|
3536
3545
|
for (u = P(i[rt]) - 1; rt >= 0; ) {
|
|
3537
|
-
for (u >=
|
|
3546
|
+
for (u >= j ? lt = i[rt] >> u - j & K : (lt = (i[rt] & (1 << u + 1) - 1) << j - u, rt > 0 && (lt |= i[rt - 1] >> this.DB + u - j)), B = p; (lt & 1) == 0; )
|
|
3538
3547
|
lt >>= 1, --B;
|
|
3539
3548
|
if ((u -= B) < 0 && (u += this.DB, --rt), Nt)
|
|
3540
3549
|
_[lt].copyTo(E), Nt = !1;
|
|
@@ -3615,37 +3624,37 @@ function ee() {
|
|
|
3615
3624
|
}
|
|
3616
3625
|
return !0;
|
|
3617
3626
|
}
|
|
3618
|
-
o.prototype.chunkSize = pr, o.prototype.toRadix = gr, o.prototype.fromRadix = yr, o.prototype.fromNumber = xr, o.prototype.bitwiseTo = Er, o.prototype.changeBit = Nr, o.prototype.addTo = Ur, o.prototype.dMultiply = Wr, o.prototype.dAddOffset = Zr, o.prototype.multiplyLowerTo = ts, o.prototype.multiplyUpperTo = es, o.prototype.modInt = us, o.prototype.millerRabin = ds, o.prototype.clone = fr, o.prototype.intValue = lr, o.prototype.byteValue = hr, o.prototype.shortValue = dr, o.prototype.signum = mr, o.prototype.toByteArray = br, o.prototype.equals = wr, o.prototype.min = vr, o.prototype.max = Tr, o.prototype.and = Rr, o.prototype.or = Or, o.prototype.xor = Fr, o.prototype.andNot = Ar, o.prototype.not = _r, o.prototype.shiftLeft = Ir, o.prototype.shiftRight = Br, o.prototype.getLowestSetBit = Dr, o.prototype.bitCount = qr, o.prototype.testBit = Mr, o.prototype.setBit = kr, o.prototype.clearBit = Lr, o.prototype.flipBit = Hr, o.prototype.add =
|
|
3619
|
-
var Mt, nt,
|
|
3627
|
+
o.prototype.chunkSize = pr, o.prototype.toRadix = gr, o.prototype.fromRadix = yr, o.prototype.fromNumber = xr, o.prototype.bitwiseTo = Er, o.prototype.changeBit = Nr, o.prototype.addTo = Ur, o.prototype.dMultiply = Wr, o.prototype.dAddOffset = Zr, o.prototype.multiplyLowerTo = ts, o.prototype.multiplyUpperTo = es, o.prototype.modInt = us, o.prototype.millerRabin = ds, o.prototype.clone = fr, o.prototype.intValue = lr, o.prototype.byteValue = hr, o.prototype.shortValue = dr, o.prototype.signum = mr, o.prototype.toByteArray = br, o.prototype.equals = wr, o.prototype.min = vr, o.prototype.max = Tr, o.prototype.and = Rr, o.prototype.or = Or, o.prototype.xor = Fr, o.prototype.andNot = Ar, o.prototype.not = _r, o.prototype.shiftLeft = Ir, o.prototype.shiftRight = Br, o.prototype.getLowestSetBit = Dr, o.prototype.bitCount = qr, o.prototype.testBit = Mr, o.prototype.setBit = kr, o.prototype.clearBit = Lr, o.prototype.flipBit = Hr, o.prototype.add = jr, o.prototype.subtract = zr, o.prototype.multiply = $r, o.prototype.divide = Yr, o.prototype.remainder = Kr, o.prototype.divideAndRemainder = Jr, o.prototype.modPow = as, o.prototype.modInverse = fs, o.prototype.pow = Qr, o.prototype.gcd = cs, o.prototype.isProbablePrime = hs, o.prototype.square = Vr, o.prototype.Barrett = gt;
|
|
3628
|
+
var Mt, nt, Y;
|
|
3620
3629
|
function ps(i) {
|
|
3621
|
-
nt[
|
|
3630
|
+
nt[Y++] ^= i & 255, nt[Y++] ^= i >> 8 & 255, nt[Y++] ^= i >> 16 & 255, nt[Y++] ^= i >> 24 & 255, Y >= se && (Y -= se);
|
|
3622
3631
|
}
|
|
3623
3632
|
function Ce() {
|
|
3624
3633
|
ps((/* @__PURE__ */ new Date()).getTime());
|
|
3625
3634
|
}
|
|
3626
3635
|
if (nt == null) {
|
|
3627
|
-
nt = new Array(),
|
|
3636
|
+
nt = new Array(), Y = 0;
|
|
3628
3637
|
var it;
|
|
3629
3638
|
if (typeof window < "u" && window.crypto) {
|
|
3630
3639
|
if (window.crypto.getRandomValues) {
|
|
3631
3640
|
var De = new Uint8Array(32);
|
|
3632
3641
|
for (window.crypto.getRandomValues(De), it = 0; it < 32; ++it)
|
|
3633
|
-
nt[
|
|
3642
|
+
nt[Y++] = De[it];
|
|
3634
3643
|
} else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
|
|
3635
3644
|
var Pe = window.crypto.random(32);
|
|
3636
3645
|
for (it = 0; it < Pe.length; ++it)
|
|
3637
|
-
nt[
|
|
3646
|
+
nt[Y++] = Pe.charCodeAt(it) & 255;
|
|
3638
3647
|
}
|
|
3639
3648
|
}
|
|
3640
|
-
for (;
|
|
3641
|
-
it = Math.floor(65536 * Math.random()), nt[
|
|
3642
|
-
|
|
3649
|
+
for (; Y < se; )
|
|
3650
|
+
it = Math.floor(65536 * Math.random()), nt[Y++] = it >>> 8, nt[Y++] = it & 255;
|
|
3651
|
+
Y = 0, Ce();
|
|
3643
3652
|
}
|
|
3644
3653
|
function ms() {
|
|
3645
3654
|
if (Mt == null) {
|
|
3646
|
-
for (Ce(), Mt = bs(), Mt.init(nt),
|
|
3647
|
-
nt[
|
|
3648
|
-
|
|
3655
|
+
for (Ce(), Mt = bs(), Mt.init(nt), Y = 0; Y < nt.length; ++Y)
|
|
3656
|
+
nt[Y] = 0;
|
|
3657
|
+
Y = 0;
|
|
3649
3658
|
}
|
|
3650
3659
|
return Mt.next();
|
|
3651
3660
|
}
|
|
@@ -4100,10 +4109,10 @@ function Wn() {
|
|
|
4100
4109
|
for (let D = 0; D < 64; D++)
|
|
4101
4110
|
e[D] = t[D] ^ t[D + 4];
|
|
4102
4111
|
const C = 2043430169, q = 2055708042;
|
|
4103
|
-
let N = g[0], U = g[1], P = g[2], k = g[3], L = g[4], H = g[5], J = g[6],
|
|
4112
|
+
let N = g[0], U = g[1], P = g[2], k = g[3], L = g[4], H = g[5], J = g[6], V = g[7], X, Z, pt, vt, et;
|
|
4104
4113
|
for (let D = 0; D < 64; D++)
|
|
4105
|
-
et = D >= 0 && D <= 15 ? C : q, X = n(n(N, 12) + L + n(et, D), 7), Z = X ^ n(N, 12), pt = (D >= 0 && D <= 15 ? N ^ U ^ P : N & U | N & P | U & P) + k + Z + e[D], vt = (D >= 0 && D <= 15 ? L ^ H ^ J : L & H | ~L & J) +
|
|
4106
|
-
g[0] ^= N, g[1] ^= U, g[2] ^= P, g[3] ^= k, g[4] ^= L, g[5] ^= H, g[6] ^= J, g[7] ^=
|
|
4114
|
+
et = D >= 0 && D <= 15 ? C : q, X = n(n(N, 12) + L + n(et, D), 7), Z = X ^ n(N, 12), pt = (D >= 0 && D <= 15 ? N ^ U ^ P : N & U | N & P | U & P) + k + Z + e[D], vt = (D >= 0 && D <= 15 ? L ^ H ^ J : L & H | ~L & J) + V + X + t[D], k = P, P = n(U, 9), U = N, N = pt, V = J, J = n(H, 19), H = L, L = s(vt);
|
|
4115
|
+
g[0] ^= N, g[1] ^= U, g[2] ^= P, g[3] ^= k, g[4] ^= L, g[5] ^= H, g[6] ^= J, g[7] ^= V;
|
|
4107
4116
|
}
|
|
4108
4117
|
const S = [];
|
|
4109
4118
|
for (let x = 0, A = g.length; x < A; x++) {
|
|
@@ -4141,8 +4150,8 @@ function ma() {
|
|
|
4141
4150
|
k = s([...L, U >> 24 & 255, U >> 16 & 255, U >> 8 & 255, U & 255]), U++, P = 0;
|
|
4142
4151
|
};
|
|
4143
4152
|
H();
|
|
4144
|
-
for (let
|
|
4145
|
-
P === k.length && H(), m[
|
|
4153
|
+
for (let V = 0, X = m.length; V < X; V++)
|
|
4154
|
+
P === k.length && H(), m[V] ^= k[P++] & 255;
|
|
4146
4155
|
const J = r.arrayToHex(m);
|
|
4147
4156
|
return b === d ? x + J + N : x + N + J;
|
|
4148
4157
|
}
|
|
@@ -4692,14 +4701,14 @@ function xa() {
|
|
|
4692
4701
|
}), ge;
|
|
4693
4702
|
}
|
|
4694
4703
|
var Zn = xa();
|
|
4695
|
-
const Gn = Zn.sm2, Xn = Zn.sm4,
|
|
4704
|
+
const Gn = Zn.sm2, Xn = Zn.sm4, pc = (t, e, n = "04") => n + Gn.doEncrypt(t, e), mc = (t, e, n = "04") => Gn.doDecrypt(t.startsWith(n) ? t.slice(2) : t, e), gc = (t, e) => Xn.encrypt(t, e), yc = (t, e) => Xn.decrypt(t, e);
|
|
4696
4705
|
let It = [], ba = { consecutiveFrames: 0, lastBlinkTime: 0 }, wa = { consecutiveFrames: 0, lastBlinkTime: 0 };
|
|
4697
4706
|
const va = /* @__PURE__ */ new Map([
|
|
4698
4707
|
["nod", [Aa, 30]],
|
|
4699
4708
|
["shake", [Fa, 7]],
|
|
4700
4709
|
["mouth", [Oa, 0.35]],
|
|
4701
4710
|
["eye", [Ra, 0.3]]
|
|
4702
|
-
]),
|
|
4711
|
+
]), xc = ["nod", "shake", "mouth", "eye"], bc = {
|
|
4703
4712
|
nod: "请点点头",
|
|
4704
4713
|
shake: "请摇摇头",
|
|
4705
4714
|
mouth: "请张张嘴",
|
|
@@ -4765,7 +4774,7 @@ function Aa(t, e) {
|
|
|
4765
4774
|
}
|
|
4766
4775
|
return !1;
|
|
4767
4776
|
}
|
|
4768
|
-
function
|
|
4777
|
+
function wc(t, e = "blob", n = 1) {
|
|
4769
4778
|
return new Promise((r) => {
|
|
4770
4779
|
const s = document.createElement("canvas"), o = s.getContext("2d");
|
|
4771
4780
|
s.width = t.videoWidth, s.height = t.videoHeight, o == null || o.drawImage(t, 0, 0, s.width, s.height), e === "blob" ? s.toBlob(
|
|
@@ -4778,7 +4787,7 @@ function bc(t, e = "blob", n = 1) {
|
|
|
4778
4787
|
) : r(s.toDataURL("image/png", n));
|
|
4779
4788
|
});
|
|
4780
4789
|
}
|
|
4781
|
-
async function
|
|
4790
|
+
async function vc(t) {
|
|
4782
4791
|
const { landmarksFn: e, videoEl: n, gesture: r, gestureThreshold: s, generatedNumber: o = 5, waitTime: c = 100, detectionScore: f = 0.5 } = t, [d, h] = va.get(r);
|
|
4783
4792
|
if (!d) return !1;
|
|
4784
4793
|
const l = [], v = Ta(e, n, o, c, f);
|
|
@@ -4790,7 +4799,7 @@ async function wc(t) {
|
|
|
4790
4799
|
}
|
|
4791
4800
|
return l.includes(!0);
|
|
4792
4801
|
}
|
|
4793
|
-
const
|
|
4802
|
+
const Tc = { DATE_VALUE_FORMAT: Qs, COMMON_TEXT: dt, IMAGE_TYPE: pn, MEDIA_TYPE: mn, DOC_TYPE: gn, FILE_TYPE: ei }, Ec = {
|
|
4794
4803
|
encodeURIToParams: bn,
|
|
4795
4804
|
paramsToQueryString: li,
|
|
4796
4805
|
queryStringToParams: hi,
|
|
@@ -4805,61 +4814,62 @@ const vc = { DATE_VALUE_FORMAT: Qs, COMMON_TEXT: dt, IMAGE_TYPE: pn, MEDIA_TYPE:
|
|
|
4805
4814
|
idNumberToAsterisk: ii,
|
|
4806
4815
|
firstLetterToUpperCase: oi,
|
|
4807
4816
|
firstLetterToLowerCase: ai
|
|
4808
|
-
},
|
|
4817
|
+
}, Sc = {
|
|
4809
4818
|
validHttp: Ms,
|
|
4810
4819
|
validExternal: Ns,
|
|
4811
4820
|
validString: ks,
|
|
4812
4821
|
validNumberStr: Ls,
|
|
4813
4822
|
validEmptyObject: Hs,
|
|
4814
4823
|
validURL: Us,
|
|
4815
|
-
validPassword:
|
|
4816
|
-
validEmail:
|
|
4824
|
+
validPassword: js,
|
|
4825
|
+
validEmail: zs,
|
|
4817
4826
|
validIdNumber: Re,
|
|
4818
|
-
validPhone:
|
|
4827
|
+
validPhone: Vs,
|
|
4819
4828
|
validTel: $s
|
|
4820
|
-
},
|
|
4829
|
+
}, Rc = { scrollTo: Os, addClass: Cs, removeClass: Ds, hasClass: Se, toggleClass: Bs, noContextmenu: qs, useRafThrottle: Ps }, Oc = { parseTime: Vt, getTimeDistance: _s, getDayRange: Is }, Fc = { local: dn, session: ct }, Ac = { uuid: As, randomNum: Fs };
|
|
4821
4830
|
export {
|
|
4822
|
-
|
|
4831
|
+
Tc as CONSTANTS,
|
|
4823
4832
|
Me as NOOP,
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4833
|
+
Vo as NetworkManager,
|
|
4834
|
+
fc as Request,
|
|
4835
|
+
zo as TokenManager,
|
|
4836
|
+
hc as addResizeListener,
|
|
4837
|
+
Fc as cacheUtil,
|
|
4829
4838
|
Ba as countdownTimer,
|
|
4830
4839
|
La as creatCancelTask,
|
|
4831
|
-
|
|
4840
|
+
Oc as dateUtil,
|
|
4832
4841
|
Da as debounce,
|
|
4833
4842
|
Ha as downloadFile,
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4843
|
+
Rc as elementUtil,
|
|
4844
|
+
xc as faceLivingEvent,
|
|
4845
|
+
bc as faceLivingEventHint,
|
|
4837
4846
|
Na as getArrayFullUrl,
|
|
4838
4847
|
qa as getBirthdayByIdNumber,
|
|
4839
|
-
|
|
4840
|
-
|
|
4848
|
+
vc as getFaceGestureResult,
|
|
4849
|
+
wc as getFaceVideoFrame,
|
|
4841
4850
|
Js as getFullUrl,
|
|
4842
4851
|
Pa as getGenderByIdNumber,
|
|
4843
|
-
|
|
4852
|
+
Ys as getLocationConfig,
|
|
4844
4853
|
$a as getMapLocationIcon,
|
|
4845
4854
|
Ua as getPercentage,
|
|
4846
4855
|
Ca as getRandomItemInArray,
|
|
4847
|
-
|
|
4856
|
+
lc as getRequestBaseUrl,
|
|
4848
4857
|
Ma as getSystemConfig,
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4858
|
+
ja as loadCss,
|
|
4859
|
+
za as loadJs,
|
|
4860
|
+
Ac as randomUtil,
|
|
4861
|
+
dc as removeResizeListener,
|
|
4853
4862
|
ka as ricTask,
|
|
4854
4863
|
Ia as sleep,
|
|
4855
4864
|
Gn as sm2Crypto,
|
|
4856
|
-
|
|
4857
|
-
|
|
4865
|
+
mc as sm2Decrypt,
|
|
4866
|
+
pc as sm2Encrypt,
|
|
4858
4867
|
Xn as sm4Crypto,
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4868
|
+
yc as sm4Decrypt,
|
|
4869
|
+
gc as sm4Encrypt,
|
|
4870
|
+
Ec as toUtil,
|
|
4862
4871
|
Ks as transformPathName,
|
|
4863
4872
|
Ws as trimArray,
|
|
4864
|
-
|
|
4873
|
+
Sc as validUtil,
|
|
4874
|
+
Va as warpperEnv
|
|
4865
4875
|
};
|