xto-fronted 0.4.97 → 0.4.98
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/api/index.d.ts +6 -0
- package/dist/api/index.js +26 -0
- package/dist/api.d.ts +2 -0
- package/dist/index-BMQao91y.js +189 -0
- package/dist/index-BYAkZ2gD.js +641 -0
- package/dist/index-C1BnOFy7.js +3145 -0
- package/dist/index-D4LWXVnG.js +515 -0
- package/dist/index-dk0diNwi.js +479 -0
- package/dist/index.js +96 -0
- package/dist/user-Qd_jMBaH.js +1150 -0
- package/package.json +6 -3
- package/src/api/index.ts +7 -0
- package/vite.config.ts +139 -136
|
@@ -0,0 +1,1150 @@
|
|
|
1
|
+
import { ref as Pe } from "vue";
|
|
2
|
+
import Je from "axios";
|
|
3
|
+
import { Message as ue } from "@xto/feedback";
|
|
4
|
+
const Ae = Pe(""), Oe = Pe(""), ye = Pe("");
|
|
5
|
+
function vr(a) {
|
|
6
|
+
a.appId && (Ae.value = a.appId), a.clientId && (Oe.value = a.clientId), a.apiBaseUrl && (ye.value = a.apiBaseUrl);
|
|
7
|
+
}
|
|
8
|
+
function Ve() {
|
|
9
|
+
if (Ae.value)
|
|
10
|
+
return Ae.value;
|
|
11
|
+
try {
|
|
12
|
+
return "";
|
|
13
|
+
} catch {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function Nr() {
|
|
18
|
+
if (Oe.value)
|
|
19
|
+
return Oe.value;
|
|
20
|
+
try {
|
|
21
|
+
return "";
|
|
22
|
+
} catch {
|
|
23
|
+
return "";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function Ar() {
|
|
27
|
+
if (ye.value)
|
|
28
|
+
return ye.value;
|
|
29
|
+
try {
|
|
30
|
+
return "";
|
|
31
|
+
} catch {
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const Or = {
|
|
36
|
+
appId: Ae,
|
|
37
|
+
clientId: Oe,
|
|
38
|
+
apiBaseUrl: ye
|
|
39
|
+
}, we = "xto_", je = (a) => ({
|
|
40
|
+
get(g) {
|
|
41
|
+
const m = a.getItem(we + g);
|
|
42
|
+
if (!m) return null;
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(m);
|
|
45
|
+
} catch {
|
|
46
|
+
return m;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
set(g, m) {
|
|
50
|
+
if (m == null) {
|
|
51
|
+
a.removeItem(we + g);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const w = typeof m == "string" ? m : JSON.stringify(m);
|
|
55
|
+
a.setItem(we + g, w);
|
|
56
|
+
},
|
|
57
|
+
remove(g) {
|
|
58
|
+
a.removeItem(we + g);
|
|
59
|
+
},
|
|
60
|
+
clear() {
|
|
61
|
+
Object.keys(a).forEach((m) => {
|
|
62
|
+
m.startsWith(we) && a.removeItem(m);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}), Ee = je(window.localStorage), ve = je(window.sessionStorage), z = {
|
|
66
|
+
get: Ee.get,
|
|
67
|
+
set: Ee.set,
|
|
68
|
+
remove: Ee.remove,
|
|
69
|
+
clear: Ee.clear
|
|
70
|
+
}, yr = {
|
|
71
|
+
get: ve.get,
|
|
72
|
+
set: ve.set,
|
|
73
|
+
remove: ve.remove,
|
|
74
|
+
clear: ve.clear
|
|
75
|
+
}, Ue = "token", De = "token_type", Me = "refresh_token", Ce = "expires_time", Le = "refresh_time", Fe = "code", $e = () => z.get(Ue), Ye = (a) => {
|
|
76
|
+
z.set(Ue, a);
|
|
77
|
+
}, We = () => z.get(De), Qe = (a) => {
|
|
78
|
+
z.set(De, a);
|
|
79
|
+
}, xr = () => z.get(Me), Ze = (a) => {
|
|
80
|
+
z.set(Me, a);
|
|
81
|
+
}, er = () => z.get(Ce), rr = (a) => {
|
|
82
|
+
z.set(Ce, a);
|
|
83
|
+
}, _r = () => z.get(Le), tr = (a) => {
|
|
84
|
+
z.set(Le, a);
|
|
85
|
+
}, Br = () => z.get(Fe), nr = (a) => {
|
|
86
|
+
z.set(Fe, a);
|
|
87
|
+
}, Sr = (a) => {
|
|
88
|
+
Ye(a.access_token), Qe(a.token_type || "Bearer"), Ze(a.refresh_token), rr(a.expires_time), tr(a.refresh_time), a.code && nr(a.code);
|
|
89
|
+
}, ke = () => {
|
|
90
|
+
z.remove(Ue), z.remove(De), z.remove(Me), z.remove(Ce), z.remove(Le), z.remove(Fe);
|
|
91
|
+
}, ir = () => {
|
|
92
|
+
const a = er();
|
|
93
|
+
return a ? Date.now() > a : !0;
|
|
94
|
+
}, Ir = () => !!$e() && !ir();
|
|
95
|
+
var sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
96
|
+
function or(a) {
|
|
97
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
98
|
+
}
|
|
99
|
+
var xe = { exports: {} }, Ge = { exports: {} }, qe = { exports: {} };
|
|
100
|
+
(function(a) {
|
|
101
|
+
(function(g) {
|
|
102
|
+
var m, w = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, D = Math.ceil, C = Math.floor, U = "[BigNumber Error] ", _ = U + "Number primitive has more than 15 significant digits: ", X = 1e14, A = 14, L = 9007199254740991, J = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], S = 1e7, R = 1e9;
|
|
103
|
+
function re(O) {
|
|
104
|
+
var x, F, q, d = p.prototype = { constructor: p, toString: null, valueOf: null }, H = new p(1), M = 20, j = 4, Z = -7, ee = 21, ae = -1e7, ie = 1e7, he = !1, ge = 1, ce = 0, _e = {
|
|
105
|
+
prefix: "",
|
|
106
|
+
groupSize: 3,
|
|
107
|
+
secondaryGroupSize: 0,
|
|
108
|
+
groupSeparator: ",",
|
|
109
|
+
decimalSeparator: ".",
|
|
110
|
+
fractionGroupSize: 0,
|
|
111
|
+
fractionGroupSeparator: " ",
|
|
112
|
+
// non-breaking space
|
|
113
|
+
suffix: ""
|
|
114
|
+
}, pe = "0123456789abcdefghijklmnopqrstuvwxyz", Be = !0;
|
|
115
|
+
function p(e, r) {
|
|
116
|
+
var t, u, i, o, l, n, s, c, f = this;
|
|
117
|
+
if (!(f instanceof p)) return new p(e, r);
|
|
118
|
+
if (r == null) {
|
|
119
|
+
if (e && e._isBigNumber === !0) {
|
|
120
|
+
f.s = e.s, !e.c || e.e > ie ? f.c = f.e = null : e.e < ae ? f.c = [f.e = 0] : (f.e = e.e, f.c = e.c.slice());
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if ((n = typeof e == "number") && e * 0 == 0) {
|
|
124
|
+
if (f.s = 1 / e < 0 ? (e = -e, -1) : 1, e === ~~e) {
|
|
125
|
+
for (o = 0, l = e; l >= 10; l /= 10, o++) ;
|
|
126
|
+
o > ie ? f.c = f.e = null : (f.e = o, f.c = [e]);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
c = String(e);
|
|
130
|
+
} else {
|
|
131
|
+
if (!w.test(c = String(e))) return q(f, c, n);
|
|
132
|
+
f.s = c.charCodeAt(0) == 45 ? (c = c.slice(1), -1) : 1;
|
|
133
|
+
}
|
|
134
|
+
(o = c.indexOf(".")) > -1 && (c = c.replace(".", "")), (l = c.search(/e/i)) > 0 ? (o < 0 && (o = l), o += +c.slice(l + 1), c = c.substring(0, l)) : o < 0 && (o = c.length);
|
|
135
|
+
} else {
|
|
136
|
+
if (v(r, 2, pe.length, "Base"), r == 10 && Be)
|
|
137
|
+
return f = new p(e), te(f, M + f.e + 1, j);
|
|
138
|
+
if (c = String(e), n = typeof e == "number") {
|
|
139
|
+
if (e * 0 != 0) return q(f, c, n, r);
|
|
140
|
+
if (f.s = 1 / e < 0 ? (c = c.slice(1), -1) : 1, p.DEBUG && c.replace(/^0\.0*|\./, "").length > 15)
|
|
141
|
+
throw Error(_ + e);
|
|
142
|
+
} else
|
|
143
|
+
f.s = c.charCodeAt(0) === 45 ? (c = c.slice(1), -1) : 1;
|
|
144
|
+
for (t = pe.slice(0, r), o = l = 0, s = c.length; l < s; l++)
|
|
145
|
+
if (t.indexOf(u = c.charAt(l)) < 0) {
|
|
146
|
+
if (u == ".") {
|
|
147
|
+
if (l > o) {
|
|
148
|
+
o = s;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
} else if (!i && (c == c.toUpperCase() && (c = c.toLowerCase()) || c == c.toLowerCase() && (c = c.toUpperCase()))) {
|
|
152
|
+
i = !0, l = -1, o = 0;
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
return q(f, String(e), n, r);
|
|
156
|
+
}
|
|
157
|
+
n = !1, c = F(c, r, 10, f.s), (o = c.indexOf(".")) > -1 ? c = c.replace(".", "") : o = c.length;
|
|
158
|
+
}
|
|
159
|
+
for (l = 0; c.charCodeAt(l) === 48; l++) ;
|
|
160
|
+
for (s = c.length; c.charCodeAt(--s) === 48; ) ;
|
|
161
|
+
if (c = c.slice(l, ++s)) {
|
|
162
|
+
if (s -= l, n && p.DEBUG && s > 15 && (e > L || e !== C(e)))
|
|
163
|
+
throw Error(_ + f.s * e);
|
|
164
|
+
if ((o = o - l - 1) > ie)
|
|
165
|
+
f.c = f.e = null;
|
|
166
|
+
else if (o < ae)
|
|
167
|
+
f.c = [f.e = 0];
|
|
168
|
+
else {
|
|
169
|
+
if (f.e = o, f.c = [], l = (o + 1) % A, o < 0 && (l += A), l < s) {
|
|
170
|
+
for (l && f.c.push(+c.slice(0, l)), s -= A; l < s; )
|
|
171
|
+
f.c.push(+c.slice(l, l += A));
|
|
172
|
+
l = A - (c = c.slice(l)).length;
|
|
173
|
+
} else
|
|
174
|
+
l -= s;
|
|
175
|
+
for (; l--; c += "0") ;
|
|
176
|
+
f.c.push(+c);
|
|
177
|
+
}
|
|
178
|
+
} else
|
|
179
|
+
f.c = [f.e = 0];
|
|
180
|
+
}
|
|
181
|
+
p.clone = re, p.ROUND_UP = 0, p.ROUND_DOWN = 1, p.ROUND_CEIL = 2, p.ROUND_FLOOR = 3, p.ROUND_HALF_UP = 4, p.ROUND_HALF_DOWN = 5, p.ROUND_HALF_EVEN = 6, p.ROUND_HALF_CEIL = 7, p.ROUND_HALF_FLOOR = 8, p.EUCLID = 9, p.config = p.set = function(e) {
|
|
182
|
+
var r, t;
|
|
183
|
+
if (e != null)
|
|
184
|
+
if (typeof e == "object") {
|
|
185
|
+
if (e.hasOwnProperty(r = "DECIMAL_PLACES") && (t = e[r], v(t, 0, R, r), M = t), e.hasOwnProperty(r = "ROUNDING_MODE") && (t = e[r], v(t, 0, 8, r), j = t), e.hasOwnProperty(r = "EXPONENTIAL_AT") && (t = e[r], t && t.pop ? (v(t[0], -R, 0, r), v(t[1], 0, R, r), Z = t[0], ee = t[1]) : (v(t, -R, R, r), Z = -(ee = t < 0 ? -t : t))), e.hasOwnProperty(r = "RANGE"))
|
|
186
|
+
if (t = e[r], t && t.pop)
|
|
187
|
+
v(t[0], -R, -1, r), v(t[1], 1, R, r), ae = t[0], ie = t[1];
|
|
188
|
+
else if (v(t, -R, R, r), t)
|
|
189
|
+
ae = -(ie = t < 0 ? -t : t);
|
|
190
|
+
else
|
|
191
|
+
throw Error(U + r + " cannot be zero: " + t);
|
|
192
|
+
if (e.hasOwnProperty(r = "CRYPTO"))
|
|
193
|
+
if (t = e[r], t === !!t)
|
|
194
|
+
if (t)
|
|
195
|
+
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
196
|
+
he = t;
|
|
197
|
+
else
|
|
198
|
+
throw he = !t, Error(U + "crypto unavailable");
|
|
199
|
+
else
|
|
200
|
+
he = t;
|
|
201
|
+
else
|
|
202
|
+
throw Error(U + r + " not true or false: " + t);
|
|
203
|
+
if (e.hasOwnProperty(r = "MODULO_MODE") && (t = e[r], v(t, 0, 9, r), ge = t), e.hasOwnProperty(r = "POW_PRECISION") && (t = e[r], v(t, 0, R, r), ce = t), e.hasOwnProperty(r = "FORMAT"))
|
|
204
|
+
if (t = e[r], typeof t == "object") _e = t;
|
|
205
|
+
else throw Error(U + r + " not an object: " + t);
|
|
206
|
+
if (e.hasOwnProperty(r = "ALPHABET"))
|
|
207
|
+
if (t = e[r], typeof t == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(t))
|
|
208
|
+
Be = t.slice(0, 10) == "0123456789", pe = t;
|
|
209
|
+
else
|
|
210
|
+
throw Error(U + r + " invalid: " + t);
|
|
211
|
+
} else
|
|
212
|
+
throw Error(U + "Object expected: " + e);
|
|
213
|
+
return {
|
|
214
|
+
DECIMAL_PLACES: M,
|
|
215
|
+
ROUNDING_MODE: j,
|
|
216
|
+
EXPONENTIAL_AT: [Z, ee],
|
|
217
|
+
RANGE: [ae, ie],
|
|
218
|
+
CRYPTO: he,
|
|
219
|
+
MODULO_MODE: ge,
|
|
220
|
+
POW_PRECISION: ce,
|
|
221
|
+
FORMAT: _e,
|
|
222
|
+
ALPHABET: pe
|
|
223
|
+
};
|
|
224
|
+
}, p.isBigNumber = function(e) {
|
|
225
|
+
if (!e || e._isBigNumber !== !0) return !1;
|
|
226
|
+
if (!p.DEBUG) return !0;
|
|
227
|
+
var r, t, u = e.c, i = e.e, o = e.s;
|
|
228
|
+
e: if ({}.toString.call(u) == "[object Array]") {
|
|
229
|
+
if ((o === 1 || o === -1) && i >= -R && i <= R && i === C(i)) {
|
|
230
|
+
if (u[0] === 0) {
|
|
231
|
+
if (i === 0 && u.length === 1) return !0;
|
|
232
|
+
break e;
|
|
233
|
+
}
|
|
234
|
+
if (r = (i + 1) % A, r < 1 && (r += A), String(u[0]).length == r) {
|
|
235
|
+
for (r = 0; r < u.length; r++)
|
|
236
|
+
if (t = u[r], t < 0 || t >= X || t !== C(t)) break e;
|
|
237
|
+
if (t !== 0) return !0;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
} else if (u === null && i === null && (o === null || o === 1 || o === -1))
|
|
241
|
+
return !0;
|
|
242
|
+
throw Error(U + "Invalid BigNumber: " + e);
|
|
243
|
+
}, p.maximum = p.max = function() {
|
|
244
|
+
return be(arguments, -1);
|
|
245
|
+
}, p.minimum = p.min = function() {
|
|
246
|
+
return be(arguments, 1);
|
|
247
|
+
}, p.random = function() {
|
|
248
|
+
var e = 9007199254740992, r = Math.random() * e & 2097151 ? function() {
|
|
249
|
+
return C(Math.random() * e);
|
|
250
|
+
} : function() {
|
|
251
|
+
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
252
|
+
};
|
|
253
|
+
return function(t) {
|
|
254
|
+
var u, i, o, l, n, s = 0, c = [], f = new p(H);
|
|
255
|
+
if (t == null ? t = M : v(t, 0, R), l = D(t / A), he)
|
|
256
|
+
if (crypto.getRandomValues) {
|
|
257
|
+
for (u = crypto.getRandomValues(new Uint32Array(l *= 2)); s < l; )
|
|
258
|
+
n = u[s] * 131072 + (u[s + 1] >>> 11), n >= 9e15 ? (i = crypto.getRandomValues(new Uint32Array(2)), u[s] = i[0], u[s + 1] = i[1]) : (c.push(n % 1e14), s += 2);
|
|
259
|
+
s = l / 2;
|
|
260
|
+
} else if (crypto.randomBytes) {
|
|
261
|
+
for (u = crypto.randomBytes(l *= 7); s < l; )
|
|
262
|
+
n = (u[s] & 31) * 281474976710656 + u[s + 1] * 1099511627776 + u[s + 2] * 4294967296 + u[s + 3] * 16777216 + (u[s + 4] << 16) + (u[s + 5] << 8) + u[s + 6], n >= 9e15 ? crypto.randomBytes(7).copy(u, s) : (c.push(n % 1e14), s += 7);
|
|
263
|
+
s = l / 7;
|
|
264
|
+
} else
|
|
265
|
+
throw he = !1, Error(U + "crypto unavailable");
|
|
266
|
+
if (!he)
|
|
267
|
+
for (; s < l; )
|
|
268
|
+
n = r(), n < 9e15 && (c[s++] = n % 1e14);
|
|
269
|
+
for (l = c[--s], t %= A, l && t && (n = J[A - t], c[s] = C(l / n) * n); c[s] === 0; c.pop(), s--) ;
|
|
270
|
+
if (s < 0)
|
|
271
|
+
c = [o = 0];
|
|
272
|
+
else {
|
|
273
|
+
for (o = -1; c[0] === 0; c.splice(0, 1), o -= A) ;
|
|
274
|
+
for (s = 1, n = c[0]; n >= 10; n /= 10, s++) ;
|
|
275
|
+
s < A && (o -= A - s);
|
|
276
|
+
}
|
|
277
|
+
return f.e = o, f.c = c, f;
|
|
278
|
+
};
|
|
279
|
+
}(), p.sum = function() {
|
|
280
|
+
for (var e = 1, r = arguments, t = new p(r[0]); e < r.length; ) t = t.plus(r[e++]);
|
|
281
|
+
return t;
|
|
282
|
+
}, F = /* @__PURE__ */ function() {
|
|
283
|
+
var e = "0123456789";
|
|
284
|
+
function r(t, u, i, o) {
|
|
285
|
+
for (var l, n = [0], s, c = 0, f = t.length; c < f; ) {
|
|
286
|
+
for (s = n.length; s--; n[s] *= u) ;
|
|
287
|
+
for (n[0] += o.indexOf(t.charAt(c++)), l = 0; l < n.length; l++)
|
|
288
|
+
n[l] > i - 1 && (n[l + 1] == null && (n[l + 1] = 0), n[l + 1] += n[l] / i | 0, n[l] %= i);
|
|
289
|
+
}
|
|
290
|
+
return n.reverse();
|
|
291
|
+
}
|
|
292
|
+
return function(t, u, i, o, l) {
|
|
293
|
+
var n, s, c, f, h, E, N, T, $ = t.indexOf("."), K = M, I = j;
|
|
294
|
+
for ($ >= 0 && (f = ce, ce = 0, t = t.replace(".", ""), T = new p(u), E = T.pow(t.length - $), ce = f, T.c = r(
|
|
295
|
+
V(B(E.c), E.e, "0"),
|
|
296
|
+
10,
|
|
297
|
+
i,
|
|
298
|
+
e
|
|
299
|
+
), T.e = T.c.length), N = r(t, u, i, l ? (n = pe, e) : (n = e, pe)), c = f = N.length; N[--f] == 0; N.pop()) ;
|
|
300
|
+
if (!N[0]) return n.charAt(0);
|
|
301
|
+
if ($ < 0 ? --c : (E.c = N, E.e = c, E.s = o, E = x(E, T, K, I, i), N = E.c, h = E.r, c = E.e), s = c + K + 1, $ = N[s], f = i / 2, h = h || s < 0 || N[s + 1] != null, h = I < 4 ? ($ != null || h) && (I == 0 || I == (E.s < 0 ? 3 : 2)) : $ > f || $ == f && (I == 4 || h || I == 6 && N[s - 1] & 1 || I == (E.s < 0 ? 8 : 7)), s < 1 || !N[0])
|
|
302
|
+
t = h ? V(n.charAt(1), -K, n.charAt(0)) : n.charAt(0);
|
|
303
|
+
else {
|
|
304
|
+
if (N.length = s, h)
|
|
305
|
+
for (--i; ++N[--s] > i; )
|
|
306
|
+
N[s] = 0, s || (++c, N = [1].concat(N));
|
|
307
|
+
for (f = N.length; !N[--f]; ) ;
|
|
308
|
+
for ($ = 0, t = ""; $ <= f; t += n.charAt(N[$++])) ;
|
|
309
|
+
t = V(t, c, n.charAt(0));
|
|
310
|
+
}
|
|
311
|
+
return t;
|
|
312
|
+
};
|
|
313
|
+
}(), x = /* @__PURE__ */ function() {
|
|
314
|
+
function e(u, i, o) {
|
|
315
|
+
var l, n, s, c, f = 0, h = u.length, E = i % S, N = i / S | 0;
|
|
316
|
+
for (u = u.slice(); h--; )
|
|
317
|
+
s = u[h] % S, c = u[h] / S | 0, l = N * s + c * E, n = E * s + l % S * S + f, f = (n / o | 0) + (l / S | 0) + N * c, u[h] = n % o;
|
|
318
|
+
return f && (u = [f].concat(u)), u;
|
|
319
|
+
}
|
|
320
|
+
function r(u, i, o, l) {
|
|
321
|
+
var n, s;
|
|
322
|
+
if (o != l)
|
|
323
|
+
s = o > l ? 1 : -1;
|
|
324
|
+
else
|
|
325
|
+
for (n = s = 0; n < o; n++)
|
|
326
|
+
if (u[n] != i[n]) {
|
|
327
|
+
s = u[n] > i[n] ? 1 : -1;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
return s;
|
|
331
|
+
}
|
|
332
|
+
function t(u, i, o, l) {
|
|
333
|
+
for (var n = 0; o--; )
|
|
334
|
+
u[o] -= n, n = u[o] < i[o] ? 1 : 0, u[o] = n * l + u[o] - i[o];
|
|
335
|
+
for (; !u[0] && u.length > 1; u.splice(0, 1)) ;
|
|
336
|
+
}
|
|
337
|
+
return function(u, i, o, l, n) {
|
|
338
|
+
var s, c, f, h, E, N, T, $, K, I, P, Y, me, Te, Re, oe, de, ne = u.s == i.s ? 1 : -1, Q = u.c, G = i.c;
|
|
339
|
+
if (!Q || !Q[0] || !G || !G[0])
|
|
340
|
+
return new p(
|
|
341
|
+
// Return NaN if either NaN, or both Infinity or 0.
|
|
342
|
+
!u.s || !i.s || (Q ? G && Q[0] == G[0] : !G) ? NaN : (
|
|
343
|
+
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
344
|
+
Q && Q[0] == 0 || !G ? ne * 0 : ne / 0
|
|
345
|
+
)
|
|
346
|
+
);
|
|
347
|
+
for ($ = new p(ne), K = $.c = [], c = u.e - i.e, ne = o + c + 1, n || (n = X, c = y(u.e / A) - y(i.e / A), ne = ne / A | 0), f = 0; G[f] == (Q[f] || 0); f++) ;
|
|
348
|
+
if (G[f] > (Q[f] || 0) && c--, ne < 0)
|
|
349
|
+
K.push(1), h = !0;
|
|
350
|
+
else {
|
|
351
|
+
for (Te = Q.length, oe = G.length, f = 0, ne += 2, E = C(n / (G[0] + 1)), E > 1 && (G = e(G, E, n), Q = e(Q, E, n), oe = G.length, Te = Q.length), me = oe, I = Q.slice(0, oe), P = I.length; P < oe; I[P++] = 0) ;
|
|
352
|
+
de = G.slice(), de = [0].concat(de), Re = G[0], G[1] >= n / 2 && Re++;
|
|
353
|
+
do {
|
|
354
|
+
if (E = 0, s = r(G, I, oe, P), s < 0) {
|
|
355
|
+
if (Y = I[0], oe != P && (Y = Y * n + (I[1] || 0)), E = C(Y / Re), E > 1)
|
|
356
|
+
for (E >= n && (E = n - 1), N = e(G, E, n), T = N.length, P = I.length; r(N, I, T, P) == 1; )
|
|
357
|
+
E--, t(N, oe < T ? de : G, T, n), T = N.length, s = 1;
|
|
358
|
+
else
|
|
359
|
+
E == 0 && (s = E = 1), N = G.slice(), T = N.length;
|
|
360
|
+
if (T < P && (N = [0].concat(N)), t(I, N, P, n), P = I.length, s == -1)
|
|
361
|
+
for (; r(G, I, oe, P) < 1; )
|
|
362
|
+
E++, t(I, oe < P ? de : G, P, n), P = I.length;
|
|
363
|
+
} else s === 0 && (E++, I = [0]);
|
|
364
|
+
K[f++] = E, I[0] ? I[P++] = Q[me] || 0 : (I = [Q[me]], P = 1);
|
|
365
|
+
} while ((me++ < Te || I[0] != null) && ne--);
|
|
366
|
+
h = I[0] != null, K[0] || K.splice(0, 1);
|
|
367
|
+
}
|
|
368
|
+
if (n == X) {
|
|
369
|
+
for (f = 1, ne = K[0]; ne >= 10; ne /= 10, f++) ;
|
|
370
|
+
te($, o + ($.e = f + c * A - 1) + 1, l, h);
|
|
371
|
+
} else
|
|
372
|
+
$.e = c, $.r = +h;
|
|
373
|
+
return $;
|
|
374
|
+
};
|
|
375
|
+
}();
|
|
376
|
+
function Se(e, r, t, u) {
|
|
377
|
+
var i, o, l, n, s;
|
|
378
|
+
if (t == null ? t = j : v(t, 0, 8), !e.c) return e.toString();
|
|
379
|
+
if (i = e.c[0], l = e.e, r == null)
|
|
380
|
+
s = B(e.c), s = u == 1 || u == 2 && (l <= Z || l >= ee) ? se(s, l) : V(s, l, "0");
|
|
381
|
+
else if (e = te(new p(e), r, t), o = e.e, s = B(e.c), n = s.length, u == 1 || u == 2 && (r <= o || o <= Z)) {
|
|
382
|
+
for (; n < r; s += "0", n++) ;
|
|
383
|
+
s = se(s, o);
|
|
384
|
+
} else if (r -= l + (u === 2 && o > l), s = V(s, o, "0"), o + 1 > n) {
|
|
385
|
+
if (--r > 0) for (s += "."; r--; s += "0") ;
|
|
386
|
+
} else if (r += o - n, r > 0)
|
|
387
|
+
for (o + 1 == n && (s += "."); r--; s += "0") ;
|
|
388
|
+
return e.s < 0 && i ? "-" + s : s;
|
|
389
|
+
}
|
|
390
|
+
function be(e, r) {
|
|
391
|
+
for (var t, u, i = 1, o = new p(e[0]); i < e.length; i++)
|
|
392
|
+
u = new p(e[i]), (!u.s || (t = k(o, u)) === r || t === 0 && o.s === r) && (o = u);
|
|
393
|
+
return o;
|
|
394
|
+
}
|
|
395
|
+
function Ie(e, r, t) {
|
|
396
|
+
for (var u = 1, i = r.length; !r[--i]; r.pop()) ;
|
|
397
|
+
for (i = r[0]; i >= 10; i /= 10, u++) ;
|
|
398
|
+
return (t = u + t * A - 1) > ie ? e.c = e.e = null : t < ae ? e.c = [e.e = 0] : (e.e = t, e.c = r), e;
|
|
399
|
+
}
|
|
400
|
+
q = /* @__PURE__ */ function() {
|
|
401
|
+
var e = /^(-?)0([xbo])(?=\w[\w.]*$)/i, r = /^([^.]+)\.$/, t = /^\.([^.]+)$/, u = /^-?(Infinity|NaN)$/, i = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
402
|
+
return function(o, l, n, s) {
|
|
403
|
+
var c, f = n ? l : l.replace(i, "");
|
|
404
|
+
if (u.test(f))
|
|
405
|
+
o.s = isNaN(f) ? null : f < 0 ? -1 : 1;
|
|
406
|
+
else {
|
|
407
|
+
if (!n && (f = f.replace(e, function(h, E, N) {
|
|
408
|
+
return c = (N = N.toLowerCase()) == "x" ? 16 : N == "b" ? 2 : 8, !s || s == c ? E : h;
|
|
409
|
+
}), s && (c = s, f = f.replace(r, "$1").replace(t, "0.$1")), l != f))
|
|
410
|
+
return new p(f, c);
|
|
411
|
+
if (p.DEBUG)
|
|
412
|
+
throw Error(U + "Not a" + (s ? " base " + s : "") + " number: " + l);
|
|
413
|
+
o.s = null;
|
|
414
|
+
}
|
|
415
|
+
o.c = o.e = null;
|
|
416
|
+
};
|
|
417
|
+
}();
|
|
418
|
+
function te(e, r, t, u) {
|
|
419
|
+
var i, o, l, n, s, c, f, h = e.c, E = J;
|
|
420
|
+
if (h) {
|
|
421
|
+
e: {
|
|
422
|
+
for (i = 1, n = h[0]; n >= 10; n /= 10, i++) ;
|
|
423
|
+
if (o = r - i, o < 0)
|
|
424
|
+
o += A, l = r, s = h[c = 0], f = C(s / E[i - l - 1] % 10);
|
|
425
|
+
else if (c = D((o + 1) / A), c >= h.length)
|
|
426
|
+
if (u) {
|
|
427
|
+
for (; h.length <= c; h.push(0)) ;
|
|
428
|
+
s = f = 0, i = 1, o %= A, l = o - A + 1;
|
|
429
|
+
} else
|
|
430
|
+
break e;
|
|
431
|
+
else {
|
|
432
|
+
for (s = n = h[c], i = 1; n >= 10; n /= 10, i++) ;
|
|
433
|
+
o %= A, l = o - A + i, f = l < 0 ? 0 : C(s / E[i - l - 1] % 10);
|
|
434
|
+
}
|
|
435
|
+
if (u = u || r < 0 || // Are there any non-zero digits after the rounding digit?
|
|
436
|
+
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
437
|
+
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
438
|
+
h[c + 1] != null || (l < 0 ? s : s % E[i - l - 1]), u = t < 4 ? (f || u) && (t == 0 || t == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (t == 4 || u || t == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
439
|
+
(o > 0 ? l > 0 ? s / E[i - l] : 0 : h[c - 1]) % 10 & 1 || t == (e.s < 0 ? 8 : 7)), r < 1 || !h[0])
|
|
440
|
+
return h.length = 0, u ? (r -= e.e + 1, h[0] = E[(A - r % A) % A], e.e = -r || 0) : h[0] = e.e = 0, e;
|
|
441
|
+
if (o == 0 ? (h.length = c, n = 1, c--) : (h.length = c + 1, n = E[A - o], h[c] = l > 0 ? C(s / E[i - l] % E[l]) * n : 0), u)
|
|
442
|
+
for (; ; )
|
|
443
|
+
if (c == 0) {
|
|
444
|
+
for (o = 1, l = h[0]; l >= 10; l /= 10, o++) ;
|
|
445
|
+
for (l = h[0] += n, n = 1; l >= 10; l /= 10, n++) ;
|
|
446
|
+
o != n && (e.e++, h[0] == X && (h[0] = 1));
|
|
447
|
+
break;
|
|
448
|
+
} else {
|
|
449
|
+
if (h[c] += n, h[c] != X) break;
|
|
450
|
+
h[c--] = 0, n = 1;
|
|
451
|
+
}
|
|
452
|
+
for (o = h.length; h[--o] === 0; h.pop()) ;
|
|
453
|
+
}
|
|
454
|
+
e.e > ie ? e.c = e.e = null : e.e < ae && (e.c = [e.e = 0]);
|
|
455
|
+
}
|
|
456
|
+
return e;
|
|
457
|
+
}
|
|
458
|
+
function fe(e) {
|
|
459
|
+
var r, t = e.e;
|
|
460
|
+
return t === null ? e.toString() : (r = B(e.c), r = t <= Z || t >= ee ? se(r, t) : V(r, t, "0"), e.s < 0 ? "-" + r : r);
|
|
461
|
+
}
|
|
462
|
+
return d.absoluteValue = d.abs = function() {
|
|
463
|
+
var e = new p(this);
|
|
464
|
+
return e.s < 0 && (e.s = 1), e;
|
|
465
|
+
}, d.comparedTo = function(e, r) {
|
|
466
|
+
return k(this, new p(e, r));
|
|
467
|
+
}, d.decimalPlaces = d.dp = function(e, r) {
|
|
468
|
+
var t, u, i, o = this;
|
|
469
|
+
if (e != null)
|
|
470
|
+
return v(e, 0, R), r == null ? r = j : v(r, 0, 8), te(new p(o), e + o.e + 1, r);
|
|
471
|
+
if (!(t = o.c)) return null;
|
|
472
|
+
if (u = ((i = t.length - 1) - y(this.e / A)) * A, i = t[i]) for (; i % 10 == 0; i /= 10, u--) ;
|
|
473
|
+
return u < 0 && (u = 0), u;
|
|
474
|
+
}, d.dividedBy = d.div = function(e, r) {
|
|
475
|
+
return x(this, new p(e, r), M, j);
|
|
476
|
+
}, d.dividedToIntegerBy = d.idiv = function(e, r) {
|
|
477
|
+
return x(this, new p(e, r), 0, 1);
|
|
478
|
+
}, d.exponentiatedBy = d.pow = function(e, r) {
|
|
479
|
+
var t, u, i, o, l, n, s, c, f, h = this;
|
|
480
|
+
if (e = new p(e), e.c && !e.isInteger())
|
|
481
|
+
throw Error(U + "Exponent not an integer: " + fe(e));
|
|
482
|
+
if (r != null && (r = new p(r)), n = e.e > 14, !h.c || !h.c[0] || h.c[0] == 1 && !h.e && h.c.length == 1 || !e.c || !e.c[0])
|
|
483
|
+
return f = new p(Math.pow(+fe(h), n ? e.s * (2 - W(e)) : +fe(e))), r ? f.mod(r) : f;
|
|
484
|
+
if (s = e.s < 0, r) {
|
|
485
|
+
if (r.c ? !r.c[0] : !r.s) return new p(NaN);
|
|
486
|
+
u = !s && h.isInteger() && r.isInteger(), u && (h = h.mod(r));
|
|
487
|
+
} else {
|
|
488
|
+
if (e.e > 9 && (h.e > 0 || h.e < -1 || (h.e == 0 ? h.c[0] > 1 || n && h.c[1] >= 24e7 : h.c[0] < 8e13 || n && h.c[0] <= 9999975e7)))
|
|
489
|
+
return o = h.s < 0 && W(e) ? -0 : 0, h.e > -1 && (o = 1 / o), new p(s ? 1 / o : o);
|
|
490
|
+
ce && (o = D(ce / A + 2));
|
|
491
|
+
}
|
|
492
|
+
for (n ? (t = new p(0.5), s && (e.s = 1), c = W(e)) : (i = Math.abs(+fe(e)), c = i % 2), f = new p(H); ; ) {
|
|
493
|
+
if (c) {
|
|
494
|
+
if (f = f.times(h), !f.c) break;
|
|
495
|
+
o ? f.c.length > o && (f.c.length = o) : u && (f = f.mod(r));
|
|
496
|
+
}
|
|
497
|
+
if (i) {
|
|
498
|
+
if (i = C(i / 2), i === 0) break;
|
|
499
|
+
c = i % 2;
|
|
500
|
+
} else if (e = e.times(t), te(e, e.e + 1, 1), e.e > 14)
|
|
501
|
+
c = W(e);
|
|
502
|
+
else {
|
|
503
|
+
if (i = +fe(e), i === 0) break;
|
|
504
|
+
c = i % 2;
|
|
505
|
+
}
|
|
506
|
+
h = h.times(h), o ? h.c && h.c.length > o && (h.c.length = o) : u && (h = h.mod(r));
|
|
507
|
+
}
|
|
508
|
+
return u ? f : (s && (f = H.div(f)), r ? f.mod(r) : o ? te(f, ce, j, l) : f);
|
|
509
|
+
}, d.integerValue = function(e) {
|
|
510
|
+
var r = new p(this);
|
|
511
|
+
return e == null ? e = j : v(e, 0, 8), te(r, r.e + 1, e);
|
|
512
|
+
}, d.isEqualTo = d.eq = function(e, r) {
|
|
513
|
+
return k(this, new p(e, r)) === 0;
|
|
514
|
+
}, d.isFinite = function() {
|
|
515
|
+
return !!this.c;
|
|
516
|
+
}, d.isGreaterThan = d.gt = function(e, r) {
|
|
517
|
+
return k(this, new p(e, r)) > 0;
|
|
518
|
+
}, d.isGreaterThanOrEqualTo = d.gte = function(e, r) {
|
|
519
|
+
return (r = k(this, new p(e, r))) === 1 || r === 0;
|
|
520
|
+
}, d.isInteger = function() {
|
|
521
|
+
return !!this.c && y(this.e / A) > this.c.length - 2;
|
|
522
|
+
}, d.isLessThan = d.lt = function(e, r) {
|
|
523
|
+
return k(this, new p(e, r)) < 0;
|
|
524
|
+
}, d.isLessThanOrEqualTo = d.lte = function(e, r) {
|
|
525
|
+
return (r = k(this, new p(e, r))) === -1 || r === 0;
|
|
526
|
+
}, d.isNaN = function() {
|
|
527
|
+
return !this.s;
|
|
528
|
+
}, d.isNegative = function() {
|
|
529
|
+
return this.s < 0;
|
|
530
|
+
}, d.isPositive = function() {
|
|
531
|
+
return this.s > 0;
|
|
532
|
+
}, d.isZero = function() {
|
|
533
|
+
return !!this.c && this.c[0] == 0;
|
|
534
|
+
}, d.minus = function(e, r) {
|
|
535
|
+
var t, u, i, o, l = this, n = l.s;
|
|
536
|
+
if (e = new p(e, r), r = e.s, !n || !r) return new p(NaN);
|
|
537
|
+
if (n != r)
|
|
538
|
+
return e.s = -r, l.plus(e);
|
|
539
|
+
var s = l.e / A, c = e.e / A, f = l.c, h = e.c;
|
|
540
|
+
if (!s || !c) {
|
|
541
|
+
if (!f || !h) return f ? (e.s = -r, e) : new p(h ? l : NaN);
|
|
542
|
+
if (!f[0] || !h[0])
|
|
543
|
+
return h[0] ? (e.s = -r, e) : new p(f[0] ? l : (
|
|
544
|
+
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
545
|
+
j == 3 ? -0 : 0
|
|
546
|
+
));
|
|
547
|
+
}
|
|
548
|
+
if (s = y(s), c = y(c), f = f.slice(), n = s - c) {
|
|
549
|
+
for ((o = n < 0) ? (n = -n, i = f) : (c = s, i = h), i.reverse(), r = n; r--; i.push(0)) ;
|
|
550
|
+
i.reverse();
|
|
551
|
+
} else
|
|
552
|
+
for (u = (o = (n = f.length) < (r = h.length)) ? n : r, n = r = 0; r < u; r++)
|
|
553
|
+
if (f[r] != h[r]) {
|
|
554
|
+
o = f[r] < h[r];
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
if (o && (i = f, f = h, h = i, e.s = -e.s), r = (u = h.length) - (t = f.length), r > 0) for (; r--; f[t++] = 0) ;
|
|
558
|
+
for (r = X - 1; u > n; ) {
|
|
559
|
+
if (f[--u] < h[u]) {
|
|
560
|
+
for (t = u; t && !f[--t]; f[t] = r) ;
|
|
561
|
+
--f[t], f[u] += X;
|
|
562
|
+
}
|
|
563
|
+
f[u] -= h[u];
|
|
564
|
+
}
|
|
565
|
+
for (; f[0] == 0; f.splice(0, 1), --c) ;
|
|
566
|
+
return f[0] ? Ie(e, f, c) : (e.s = j == 3 ? -1 : 1, e.c = [e.e = 0], e);
|
|
567
|
+
}, d.modulo = d.mod = function(e, r) {
|
|
568
|
+
var t, u, i = this;
|
|
569
|
+
return e = new p(e, r), !i.c || !e.s || e.c && !e.c[0] ? new p(NaN) : !e.c || i.c && !i.c[0] ? new p(i) : (ge == 9 ? (u = e.s, e.s = 1, t = x(i, e, 0, 3), e.s = u, t.s *= u) : t = x(i, e, 0, ge), e = i.minus(t.times(e)), !e.c[0] && ge == 1 && (e.s = i.s), e);
|
|
570
|
+
}, d.multipliedBy = d.times = function(e, r) {
|
|
571
|
+
var t, u, i, o, l, n, s, c, f, h, E, N, T, $, K, I = this, P = I.c, Y = (e = new p(e, r)).c;
|
|
572
|
+
if (!P || !Y || !P[0] || !Y[0])
|
|
573
|
+
return !I.s || !e.s || P && !P[0] && !Y || Y && !Y[0] && !P ? e.c = e.e = e.s = null : (e.s *= I.s, !P || !Y ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
|
|
574
|
+
for (u = y(I.e / A) + y(e.e / A), e.s *= I.s, s = P.length, h = Y.length, s < h && (T = P, P = Y, Y = T, i = s, s = h, h = i), i = s + h, T = []; i--; T.push(0)) ;
|
|
575
|
+
for ($ = X, K = S, i = h; --i >= 0; ) {
|
|
576
|
+
for (t = 0, E = Y[i] % K, N = Y[i] / K | 0, l = s, o = i + l; o > i; )
|
|
577
|
+
c = P[--l] % K, f = P[l] / K | 0, n = N * c + f * E, c = E * c + n % K * K + T[o] + t, t = (c / $ | 0) + (n / K | 0) + N * f, T[o--] = c % $;
|
|
578
|
+
T[o] = t;
|
|
579
|
+
}
|
|
580
|
+
return t ? ++u : T.splice(0, 1), Ie(e, T, u);
|
|
581
|
+
}, d.negated = function() {
|
|
582
|
+
var e = new p(this);
|
|
583
|
+
return e.s = -e.s || null, e;
|
|
584
|
+
}, d.plus = function(e, r) {
|
|
585
|
+
var t, u = this, i = u.s;
|
|
586
|
+
if (e = new p(e, r), r = e.s, !i || !r) return new p(NaN);
|
|
587
|
+
if (i != r)
|
|
588
|
+
return e.s = -r, u.minus(e);
|
|
589
|
+
var o = u.e / A, l = e.e / A, n = u.c, s = e.c;
|
|
590
|
+
if (!o || !l) {
|
|
591
|
+
if (!n || !s) return new p(i / 0);
|
|
592
|
+
if (!n[0] || !s[0]) return s[0] ? e : new p(n[0] ? u : i * 0);
|
|
593
|
+
}
|
|
594
|
+
if (o = y(o), l = y(l), n = n.slice(), i = o - l) {
|
|
595
|
+
for (i > 0 ? (l = o, t = s) : (i = -i, t = n), t.reverse(); i--; t.push(0)) ;
|
|
596
|
+
t.reverse();
|
|
597
|
+
}
|
|
598
|
+
for (i = n.length, r = s.length, i - r < 0 && (t = s, s = n, n = t, r = i), i = 0; r; )
|
|
599
|
+
i = (n[--r] = n[r] + s[r] + i) / X | 0, n[r] = X === n[r] ? 0 : n[r] % X;
|
|
600
|
+
return i && (n = [i].concat(n), ++l), Ie(e, n, l);
|
|
601
|
+
}, d.precision = d.sd = function(e, r) {
|
|
602
|
+
var t, u, i, o = this;
|
|
603
|
+
if (e != null && e !== !!e)
|
|
604
|
+
return v(e, 1, R), r == null ? r = j : v(r, 0, 8), te(new p(o), e, r);
|
|
605
|
+
if (!(t = o.c)) return null;
|
|
606
|
+
if (i = t.length - 1, u = i * A + 1, i = t[i]) {
|
|
607
|
+
for (; i % 10 == 0; i /= 10, u--) ;
|
|
608
|
+
for (i = t[0]; i >= 10; i /= 10, u++) ;
|
|
609
|
+
}
|
|
610
|
+
return e && o.e + 1 > u && (u = o.e + 1), u;
|
|
611
|
+
}, d.shiftedBy = function(e) {
|
|
612
|
+
return v(e, -L, L), this.times("1e" + e);
|
|
613
|
+
}, d.squareRoot = d.sqrt = function() {
|
|
614
|
+
var e, r, t, u, i, o = this, l = o.c, n = o.s, s = o.e, c = M + 4, f = new p("0.5");
|
|
615
|
+
if (n !== 1 || !l || !l[0])
|
|
616
|
+
return new p(!n || n < 0 && (!l || l[0]) ? NaN : l ? o : 1 / 0);
|
|
617
|
+
if (n = Math.sqrt(+fe(o)), n == 0 || n == 1 / 0 ? (r = B(l), (r.length + s) % 2 == 0 && (r += "0"), n = Math.sqrt(+r), s = y((s + 1) / 2) - (s < 0 || s % 2), n == 1 / 0 ? r = "5e" + s : (r = n.toExponential(), r = r.slice(0, r.indexOf("e") + 1) + s), t = new p(r)) : t = new p(n + ""), t.c[0]) {
|
|
618
|
+
for (s = t.e, n = s + c, n < 3 && (n = 0); ; )
|
|
619
|
+
if (i = t, t = f.times(i.plus(x(o, i, c, 1))), B(i.c).slice(0, n) === (r = B(t.c)).slice(0, n))
|
|
620
|
+
if (t.e < s && --n, r = r.slice(n - 3, n + 1), r == "9999" || !u && r == "4999") {
|
|
621
|
+
if (!u && (te(i, i.e + M + 2, 0), i.times(i).eq(o))) {
|
|
622
|
+
t = i;
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
c += 4, n += 4, u = 1;
|
|
626
|
+
} else {
|
|
627
|
+
(!+r || !+r.slice(1) && r.charAt(0) == "5") && (te(t, t.e + M + 2, 1), e = !t.times(t).eq(o));
|
|
628
|
+
break;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return te(t, t.e + M + 1, j, e);
|
|
632
|
+
}, d.toExponential = function(e, r) {
|
|
633
|
+
return e != null && (v(e, 0, R), e++), Se(this, e, r, 1);
|
|
634
|
+
}, d.toFixed = function(e, r) {
|
|
635
|
+
return e != null && (v(e, 0, R), e = e + this.e + 1), Se(this, e, r);
|
|
636
|
+
}, d.toFormat = function(e, r, t) {
|
|
637
|
+
var u, i = this;
|
|
638
|
+
if (t == null)
|
|
639
|
+
e != null && r && typeof r == "object" ? (t = r, r = null) : e && typeof e == "object" ? (t = e, e = r = null) : t = _e;
|
|
640
|
+
else if (typeof t != "object")
|
|
641
|
+
throw Error(U + "Argument not an object: " + t);
|
|
642
|
+
if (u = i.toFixed(e, r), i.c) {
|
|
643
|
+
var o, l = u.split("."), n = +t.groupSize, s = +t.secondaryGroupSize, c = t.groupSeparator || "", f = l[0], h = l[1], E = i.s < 0, N = E ? f.slice(1) : f, T = N.length;
|
|
644
|
+
if (s && (o = n, n = s, s = o, T -= o), n > 0 && T > 0) {
|
|
645
|
+
for (o = T % n || n, f = N.substr(0, o); o < T; o += n) f += c + N.substr(o, n);
|
|
646
|
+
s > 0 && (f += c + N.slice(o)), E && (f = "-" + f);
|
|
647
|
+
}
|
|
648
|
+
u = h ? f + (t.decimalSeparator || "") + ((s = +t.fractionGroupSize) ? h.replace(
|
|
649
|
+
new RegExp("\\d{" + s + "}\\B", "g"),
|
|
650
|
+
"$&" + (t.fractionGroupSeparator || "")
|
|
651
|
+
) : h) : f;
|
|
652
|
+
}
|
|
653
|
+
return (t.prefix || "") + u + (t.suffix || "");
|
|
654
|
+
}, d.toFraction = function(e) {
|
|
655
|
+
var r, t, u, i, o, l, n, s, c, f, h, E, N = this, T = N.c;
|
|
656
|
+
if (e != null && (n = new p(e), !n.isInteger() && (n.c || n.s !== 1) || n.lt(H)))
|
|
657
|
+
throw Error(U + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + fe(n));
|
|
658
|
+
if (!T) return new p(N);
|
|
659
|
+
for (r = new p(H), c = t = new p(H), u = s = new p(H), E = B(T), o = r.e = E.length - N.e - 1, r.c[0] = J[(l = o % A) < 0 ? A + l : l], e = !e || n.comparedTo(r) > 0 ? o > 0 ? r : c : n, l = ie, ie = 1 / 0, n = new p(E), s.c[0] = 0; f = x(n, r, 0, 1), i = t.plus(f.times(u)), i.comparedTo(e) != 1; )
|
|
660
|
+
t = u, u = i, c = s.plus(f.times(i = c)), s = i, r = n.minus(f.times(i = r)), n = i;
|
|
661
|
+
return i = x(e.minus(t), u, 0, 1), s = s.plus(i.times(c)), t = t.plus(i.times(u)), s.s = c.s = N.s, o = o * 2, h = x(c, u, o, j).minus(N).abs().comparedTo(
|
|
662
|
+
x(s, t, o, j).minus(N).abs()
|
|
663
|
+
) < 1 ? [c, u] : [s, t], ie = l, h;
|
|
664
|
+
}, d.toNumber = function() {
|
|
665
|
+
return +fe(this);
|
|
666
|
+
}, d.toPrecision = function(e, r) {
|
|
667
|
+
return e != null && v(e, 1, R), Se(this, e, r, 2);
|
|
668
|
+
}, d.toString = function(e) {
|
|
669
|
+
var r, t = this, u = t.s, i = t.e;
|
|
670
|
+
return i === null ? u ? (r = "Infinity", u < 0 && (r = "-" + r)) : r = "NaN" : (e == null ? r = i <= Z || i >= ee ? se(B(t.c), i) : V(B(t.c), i, "0") : e === 10 && Be ? (t = te(new p(t), M + i + 1, j), r = V(B(t.c), t.e, "0")) : (v(e, 2, pe.length, "Base"), r = F(V(B(t.c), i, "0"), 10, e, u, !0)), u < 0 && t.c[0] && (r = "-" + r)), r;
|
|
671
|
+
}, d.valueOf = d.toJSON = function() {
|
|
672
|
+
return fe(this);
|
|
673
|
+
}, d._isBigNumber = !0, O != null && p.set(O), p;
|
|
674
|
+
}
|
|
675
|
+
function y(O) {
|
|
676
|
+
var x = O | 0;
|
|
677
|
+
return O > 0 || O === x ? x : x - 1;
|
|
678
|
+
}
|
|
679
|
+
function B(O) {
|
|
680
|
+
for (var x, F, q = 1, d = O.length, H = O[0] + ""; q < d; ) {
|
|
681
|
+
for (x = O[q++] + "", F = A - x.length; F--; x = "0" + x) ;
|
|
682
|
+
H += x;
|
|
683
|
+
}
|
|
684
|
+
for (d = H.length; H.charCodeAt(--d) === 48; ) ;
|
|
685
|
+
return H.slice(0, d + 1 || 1);
|
|
686
|
+
}
|
|
687
|
+
function k(O, x) {
|
|
688
|
+
var F, q, d = O.c, H = x.c, M = O.s, j = x.s, Z = O.e, ee = x.e;
|
|
689
|
+
if (!M || !j) return null;
|
|
690
|
+
if (F = d && !d[0], q = H && !H[0], F || q) return F ? q ? 0 : -j : M;
|
|
691
|
+
if (M != j) return M;
|
|
692
|
+
if (F = M < 0, q = Z == ee, !d || !H) return q ? 0 : !d ^ F ? 1 : -1;
|
|
693
|
+
if (!q) return Z > ee ^ F ? 1 : -1;
|
|
694
|
+
for (j = (Z = d.length) < (ee = H.length) ? Z : ee, M = 0; M < j; M++) if (d[M] != H[M]) return d[M] > H[M] ^ F ? 1 : -1;
|
|
695
|
+
return Z == ee ? 0 : Z > ee ^ F ? 1 : -1;
|
|
696
|
+
}
|
|
697
|
+
function v(O, x, F, q) {
|
|
698
|
+
if (O < x || O > F || O !== C(O))
|
|
699
|
+
throw Error(U + (q || "Argument") + (typeof O == "number" ? O < x || O > F ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(O));
|
|
700
|
+
}
|
|
701
|
+
function W(O) {
|
|
702
|
+
var x = O.c.length - 1;
|
|
703
|
+
return y(O.e / A) == x && O.c[x] % 2 != 0;
|
|
704
|
+
}
|
|
705
|
+
function se(O, x) {
|
|
706
|
+
return (O.length > 1 ? O.charAt(0) + "." + O.slice(1) : O) + (x < 0 ? "e" : "e+") + x;
|
|
707
|
+
}
|
|
708
|
+
function V(O, x, F) {
|
|
709
|
+
var q, d;
|
|
710
|
+
if (x < 0) {
|
|
711
|
+
for (d = F + "."; ++x; d += F) ;
|
|
712
|
+
O = d + O;
|
|
713
|
+
} else if (q = O.length, ++x > q) {
|
|
714
|
+
for (d = F, x -= q; --x; d += F) ;
|
|
715
|
+
O += d;
|
|
716
|
+
} else x < q && (O = O.slice(0, x) + "." + O.slice(x));
|
|
717
|
+
return O;
|
|
718
|
+
}
|
|
719
|
+
m = re(), m.default = m.BigNumber = m, a.exports ? a.exports = m : (g || (g = typeof self < "u" && self ? self : window), g.BigNumber = m);
|
|
720
|
+
})(sr);
|
|
721
|
+
})(qe);
|
|
722
|
+
var He = qe.exports;
|
|
723
|
+
(function(a) {
|
|
724
|
+
var g = He, m = a.exports;
|
|
725
|
+
(function() {
|
|
726
|
+
var w = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, D, C, U = {
|
|
727
|
+
// table of character substitutions
|
|
728
|
+
"\b": "\\b",
|
|
729
|
+
" ": "\\t",
|
|
730
|
+
"\n": "\\n",
|
|
731
|
+
"\f": "\\f",
|
|
732
|
+
"\r": "\\r",
|
|
733
|
+
'"': '\\"',
|
|
734
|
+
"\\": "\\\\"
|
|
735
|
+
}, _;
|
|
736
|
+
function X(L) {
|
|
737
|
+
return w.lastIndex = 0, w.test(L) ? '"' + L.replace(w, function(J) {
|
|
738
|
+
var S = U[J];
|
|
739
|
+
return typeof S == "string" ? S : "\\u" + ("0000" + J.charCodeAt(0).toString(16)).slice(-4);
|
|
740
|
+
}) + '"' : '"' + L + '"';
|
|
741
|
+
}
|
|
742
|
+
function A(L, J) {
|
|
743
|
+
var S, R, re, y, B = D, k, v = J[L], W = v != null && (v instanceof g || g.isBigNumber(v));
|
|
744
|
+
switch (v && typeof v == "object" && typeof v.toJSON == "function" && (v = v.toJSON(L)), typeof _ == "function" && (v = _.call(J, L, v)), typeof v) {
|
|
745
|
+
case "string":
|
|
746
|
+
return W ? v : X(v);
|
|
747
|
+
case "number":
|
|
748
|
+
return isFinite(v) ? String(v) : "null";
|
|
749
|
+
case "boolean":
|
|
750
|
+
case "null":
|
|
751
|
+
case "bigint":
|
|
752
|
+
return String(v);
|
|
753
|
+
case "object":
|
|
754
|
+
if (!v)
|
|
755
|
+
return "null";
|
|
756
|
+
if (D += C, k = [], Object.prototype.toString.apply(v) === "[object Array]") {
|
|
757
|
+
for (y = v.length, S = 0; S < y; S += 1)
|
|
758
|
+
k[S] = A(S, v) || "null";
|
|
759
|
+
return re = k.length === 0 ? "[]" : D ? `[
|
|
760
|
+
` + D + k.join(`,
|
|
761
|
+
` + D) + `
|
|
762
|
+
` + B + "]" : "[" + k.join(",") + "]", D = B, re;
|
|
763
|
+
}
|
|
764
|
+
if (_ && typeof _ == "object")
|
|
765
|
+
for (y = _.length, S = 0; S < y; S += 1)
|
|
766
|
+
typeof _[S] == "string" && (R = _[S], re = A(R, v), re && k.push(X(R) + (D ? ": " : ":") + re));
|
|
767
|
+
else
|
|
768
|
+
Object.keys(v).forEach(function(se) {
|
|
769
|
+
var V = A(se, v);
|
|
770
|
+
V && k.push(X(se) + (D ? ": " : ":") + V);
|
|
771
|
+
});
|
|
772
|
+
return re = k.length === 0 ? "{}" : D ? `{
|
|
773
|
+
` + D + k.join(`,
|
|
774
|
+
` + D) + `
|
|
775
|
+
` + B + "}" : "{" + k.join(",") + "}", D = B, re;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
typeof m.stringify != "function" && (m.stringify = function(L, J, S) {
|
|
779
|
+
var R;
|
|
780
|
+
if (D = "", C = "", typeof S == "number")
|
|
781
|
+
for (R = 0; R < S; R += 1)
|
|
782
|
+
C += " ";
|
|
783
|
+
else typeof S == "string" && (C = S);
|
|
784
|
+
if (_ = J, J && typeof J != "function" && (typeof J != "object" || typeof J.length != "number"))
|
|
785
|
+
throw new Error("JSON.stringify");
|
|
786
|
+
return A("", { "": L });
|
|
787
|
+
});
|
|
788
|
+
})();
|
|
789
|
+
})(Ge);
|
|
790
|
+
var fr = Ge.exports, Ne = null;
|
|
791
|
+
const ur = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, cr = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
|
|
792
|
+
var lr = function(a) {
|
|
793
|
+
var g = {
|
|
794
|
+
strict: !1,
|
|
795
|
+
// not being strict means do not generate syntax errors for "duplicate key"
|
|
796
|
+
storeAsString: !1,
|
|
797
|
+
// toggles whether the values should be stored as BigNumber (default) or a string
|
|
798
|
+
alwaysParseAsBig: !1,
|
|
799
|
+
// toggles whether all numbers should be Big
|
|
800
|
+
useNativeBigInt: !1,
|
|
801
|
+
// toggles whether to use native BigInt instead of bignumber.js
|
|
802
|
+
protoAction: "error",
|
|
803
|
+
constructorAction: "error"
|
|
804
|
+
};
|
|
805
|
+
if (a != null) {
|
|
806
|
+
if (a.strict === !0 && (g.strict = !0), a.storeAsString === !0 && (g.storeAsString = !0), g.alwaysParseAsBig = a.alwaysParseAsBig === !0 ? a.alwaysParseAsBig : !1, g.useNativeBigInt = a.useNativeBigInt === !0 ? a.useNativeBigInt : !1, typeof a.constructorAction < "u")
|
|
807
|
+
if (a.constructorAction === "error" || a.constructorAction === "ignore" || a.constructorAction === "preserve")
|
|
808
|
+
g.constructorAction = a.constructorAction;
|
|
809
|
+
else
|
|
810
|
+
throw new Error(
|
|
811
|
+
`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${a.constructorAction}`
|
|
812
|
+
);
|
|
813
|
+
if (typeof a.protoAction < "u")
|
|
814
|
+
if (a.protoAction === "error" || a.protoAction === "ignore" || a.protoAction === "preserve")
|
|
815
|
+
g.protoAction = a.protoAction;
|
|
816
|
+
else
|
|
817
|
+
throw new Error(
|
|
818
|
+
`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${a.protoAction}`
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
var m, w, D = {
|
|
822
|
+
'"': '"',
|
|
823
|
+
"\\": "\\",
|
|
824
|
+
"/": "/",
|
|
825
|
+
b: "\b",
|
|
826
|
+
f: "\f",
|
|
827
|
+
n: `
|
|
828
|
+
`,
|
|
829
|
+
r: "\r",
|
|
830
|
+
t: " "
|
|
831
|
+
}, C, U = function(y) {
|
|
832
|
+
throw {
|
|
833
|
+
name: "SyntaxError",
|
|
834
|
+
message: y,
|
|
835
|
+
at: m,
|
|
836
|
+
text: C
|
|
837
|
+
};
|
|
838
|
+
}, _ = function(y) {
|
|
839
|
+
return y && y !== w && U("Expected '" + y + "' instead of '" + w + "'"), w = C.charAt(m), m += 1, w;
|
|
840
|
+
}, X = function() {
|
|
841
|
+
var y, B = "";
|
|
842
|
+
for (w === "-" && (B = "-", _("-")); w >= "0" && w <= "9"; )
|
|
843
|
+
B += w, _();
|
|
844
|
+
if (w === ".")
|
|
845
|
+
for (B += "."; _() && w >= "0" && w <= "9"; )
|
|
846
|
+
B += w;
|
|
847
|
+
if (w === "e" || w === "E")
|
|
848
|
+
for (B += w, _(), (w === "-" || w === "+") && (B += w, _()); w >= "0" && w <= "9"; )
|
|
849
|
+
B += w, _();
|
|
850
|
+
if (y = +B, !isFinite(y))
|
|
851
|
+
U("Bad number");
|
|
852
|
+
else
|
|
853
|
+
return Ne == null && (Ne = He), B.length > 15 ? g.storeAsString ? B : g.useNativeBigInt ? BigInt(B) : new Ne(B) : g.alwaysParseAsBig ? g.useNativeBigInt ? BigInt(y) : new Ne(y) : y;
|
|
854
|
+
}, A = function() {
|
|
855
|
+
var y, B, k = "", v;
|
|
856
|
+
if (w === '"')
|
|
857
|
+
for (var W = m; _(); ) {
|
|
858
|
+
if (w === '"')
|
|
859
|
+
return m - 1 > W && (k += C.substring(W, m - 1)), _(), k;
|
|
860
|
+
if (w === "\\") {
|
|
861
|
+
if (m - 1 > W && (k += C.substring(W, m - 1)), _(), w === "u") {
|
|
862
|
+
for (v = 0, B = 0; B < 4 && (y = parseInt(_(), 16), !!isFinite(y)); B += 1)
|
|
863
|
+
v = v * 16 + y;
|
|
864
|
+
k += String.fromCharCode(v);
|
|
865
|
+
} else if (typeof D[w] == "string")
|
|
866
|
+
k += D[w];
|
|
867
|
+
else
|
|
868
|
+
break;
|
|
869
|
+
W = m;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
U("Bad string");
|
|
873
|
+
}, L = function() {
|
|
874
|
+
for (; w && w <= " "; )
|
|
875
|
+
_();
|
|
876
|
+
}, J = function() {
|
|
877
|
+
switch (w) {
|
|
878
|
+
case "t":
|
|
879
|
+
return _("t"), _("r"), _("u"), _("e"), !0;
|
|
880
|
+
case "f":
|
|
881
|
+
return _("f"), _("a"), _("l"), _("s"), _("e"), !1;
|
|
882
|
+
case "n":
|
|
883
|
+
return _("n"), _("u"), _("l"), _("l"), null;
|
|
884
|
+
}
|
|
885
|
+
U("Unexpected '" + w + "'");
|
|
886
|
+
}, S, R = function() {
|
|
887
|
+
var y = [];
|
|
888
|
+
if (w === "[") {
|
|
889
|
+
if (_("["), L(), w === "]")
|
|
890
|
+
return _("]"), y;
|
|
891
|
+
for (; w; ) {
|
|
892
|
+
if (y.push(S()), L(), w === "]")
|
|
893
|
+
return _("]"), y;
|
|
894
|
+
_(","), L();
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
U("Bad array");
|
|
898
|
+
}, re = function() {
|
|
899
|
+
var y, B = /* @__PURE__ */ Object.create(null);
|
|
900
|
+
if (w === "{") {
|
|
901
|
+
if (_("{"), L(), w === "}")
|
|
902
|
+
return _("}"), B;
|
|
903
|
+
for (; w; ) {
|
|
904
|
+
if (y = A(), L(), _(":"), g.strict === !0 && Object.hasOwnProperty.call(B, y) && U('Duplicate key "' + y + '"'), ur.test(y) === !0 ? g.protoAction === "error" ? U("Object contains forbidden prototype property") : g.protoAction === "ignore" ? S() : B[y] = S() : cr.test(y) === !0 ? g.constructorAction === "error" ? U("Object contains forbidden constructor property") : g.constructorAction === "ignore" ? S() : B[y] = S() : B[y] = S(), L(), w === "}")
|
|
905
|
+
return _("}"), B;
|
|
906
|
+
_(","), L();
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
U("Bad object");
|
|
910
|
+
};
|
|
911
|
+
return S = function() {
|
|
912
|
+
switch (L(), w) {
|
|
913
|
+
case "{":
|
|
914
|
+
return re();
|
|
915
|
+
case "[":
|
|
916
|
+
return R();
|
|
917
|
+
case '"':
|
|
918
|
+
return A();
|
|
919
|
+
case "-":
|
|
920
|
+
return X();
|
|
921
|
+
default:
|
|
922
|
+
return w >= "0" && w <= "9" ? X() : J();
|
|
923
|
+
}
|
|
924
|
+
}, function(y, B) {
|
|
925
|
+
var k;
|
|
926
|
+
return C = y + "", m = 0, w = " ", k = S(), L(), w && U("Syntax error"), typeof B == "function" ? function v(W, se) {
|
|
927
|
+
var V, O = W[se];
|
|
928
|
+
return O && typeof O == "object" && Object.keys(O).forEach(function(x) {
|
|
929
|
+
V = v(O, x), V !== void 0 ? O[x] = V : delete O[x];
|
|
930
|
+
}), B.call(W, se, O);
|
|
931
|
+
}({ "": k }, "") : k;
|
|
932
|
+
};
|
|
933
|
+
}, ar = lr, Ke = fr.stringify, Xe = ar;
|
|
934
|
+
xe.exports = function(a) {
|
|
935
|
+
return {
|
|
936
|
+
parse: Xe(a),
|
|
937
|
+
stringify: Ke
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
xe.exports.parse = Xe();
|
|
941
|
+
xe.exports.stringify = Ke;
|
|
942
|
+
var hr = xe.exports;
|
|
943
|
+
const pr = /* @__PURE__ */ or(hr), gr = pr({ storeAsString: !0 });
|
|
944
|
+
let ze;
|
|
945
|
+
function Tr(a) {
|
|
946
|
+
ze = a, le && (le.defaults.baseURL = a);
|
|
947
|
+
}
|
|
948
|
+
const dr = () => {
|
|
949
|
+
const a = Je.create({
|
|
950
|
+
timeout: 3e4,
|
|
951
|
+
headers: {
|
|
952
|
+
"Content-Type": "application/json"
|
|
953
|
+
},
|
|
954
|
+
// 使用 json-bigint 解析响应数据,避免大整数精度丢失
|
|
955
|
+
transformResponse: [
|
|
956
|
+
(g) => {
|
|
957
|
+
if (typeof g == "string")
|
|
958
|
+
try {
|
|
959
|
+
return gr.parse(g);
|
|
960
|
+
} catch {
|
|
961
|
+
return g;
|
|
962
|
+
}
|
|
963
|
+
return g;
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
});
|
|
967
|
+
return a.interceptors.request.use(
|
|
968
|
+
(g) => {
|
|
969
|
+
const m = ze || void 0;
|
|
970
|
+
m && !g.baseURL && (g.baseURL = m);
|
|
971
|
+
const w = $e(), D = We() || "Bearer";
|
|
972
|
+
return w && (g.headers.Authorization = `${D} ${w}`), g;
|
|
973
|
+
},
|
|
974
|
+
(g) => Promise.reject(g)
|
|
975
|
+
), a.interceptors.response.use(
|
|
976
|
+
(g) => {
|
|
977
|
+
const { data: m } = g;
|
|
978
|
+
return m.code === 200 || m.code === 0 ? m.data : m.code === 9121 ? (ue.error("登录已过期,请重新登录"), ke(), window.location.href = "/login", Promise.reject(new Error(m.message || "EXPIRED OR INVALID TOKEN"))) : (ue.error(m.message || "请求失败"), Promise.reject(new Error(m.message || "请求失败")));
|
|
979
|
+
},
|
|
980
|
+
(g) => {
|
|
981
|
+
var w;
|
|
982
|
+
const { response: m } = g;
|
|
983
|
+
if (m) {
|
|
984
|
+
const { data: D } = m;
|
|
985
|
+
if ((D == null ? void 0 : D.code) === 9121)
|
|
986
|
+
return ue.error("登录已过期,请重新登录"), ke(), window.location.href = "/login", Promise.reject(g);
|
|
987
|
+
switch (m.status) {
|
|
988
|
+
case 401:
|
|
989
|
+
ue.error("登录已过期,请重新登录"), ke(), window.location.href = "/login";
|
|
990
|
+
break;
|
|
991
|
+
case 403:
|
|
992
|
+
ue.error("没有权限访问");
|
|
993
|
+
break;
|
|
994
|
+
case 404:
|
|
995
|
+
ue.error("请求资源不存在");
|
|
996
|
+
break;
|
|
997
|
+
case 500:
|
|
998
|
+
ue.error("服务器错误");
|
|
999
|
+
break;
|
|
1000
|
+
default:
|
|
1001
|
+
ue.error(((w = m.data) == null ? void 0 : w.message) || "请求失败");
|
|
1002
|
+
}
|
|
1003
|
+
} else
|
|
1004
|
+
ue.error("网络连接失败");
|
|
1005
|
+
return Promise.reject(g);
|
|
1006
|
+
}
|
|
1007
|
+
), a;
|
|
1008
|
+
}, le = dr(), b = {
|
|
1009
|
+
get(a, g) {
|
|
1010
|
+
return le.get(a, g);
|
|
1011
|
+
},
|
|
1012
|
+
post(a, g, m) {
|
|
1013
|
+
return le.post(a, g, m);
|
|
1014
|
+
},
|
|
1015
|
+
put(a, g, m) {
|
|
1016
|
+
return le.put(a, g, m);
|
|
1017
|
+
},
|
|
1018
|
+
patch(a, g, m) {
|
|
1019
|
+
return le.patch(a, g, m);
|
|
1020
|
+
},
|
|
1021
|
+
delete(a, g) {
|
|
1022
|
+
return le.delete(a, g);
|
|
1023
|
+
},
|
|
1024
|
+
// 文件下载 - 返回 Blob 对象
|
|
1025
|
+
download(a, g) {
|
|
1026
|
+
return le.get(a, { ...g, responseType: "blob" });
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
function Rr(a) {
|
|
1030
|
+
return b.post("/user/v1.0/login/by-domain", a);
|
|
1031
|
+
}
|
|
1032
|
+
function kr() {
|
|
1033
|
+
return b.put("/user/v1.0/user/logout");
|
|
1034
|
+
}
|
|
1035
|
+
function Pr() {
|
|
1036
|
+
return b.get("/user/v1.0/user/get-me");
|
|
1037
|
+
}
|
|
1038
|
+
function Ur(a) {
|
|
1039
|
+
return b.post("/user/v1.0/refresh", { refreshToken: a });
|
|
1040
|
+
}
|
|
1041
|
+
function Dr(a) {
|
|
1042
|
+
return b.get("/role/list", { params: a });
|
|
1043
|
+
}
|
|
1044
|
+
function Mr(a) {
|
|
1045
|
+
return b.get(`/role/${a}`);
|
|
1046
|
+
}
|
|
1047
|
+
function Cr(a) {
|
|
1048
|
+
return b.post("/role", a);
|
|
1049
|
+
}
|
|
1050
|
+
function Lr(a, g) {
|
|
1051
|
+
return b.put(`/role/${a}`, g);
|
|
1052
|
+
}
|
|
1053
|
+
function Fr(a) {
|
|
1054
|
+
return b.delete(`/role/${a}`);
|
|
1055
|
+
}
|
|
1056
|
+
function br(a, g) {
|
|
1057
|
+
return b.patch(`/role/${a}/status`, { status: g });
|
|
1058
|
+
}
|
|
1059
|
+
function jr() {
|
|
1060
|
+
return b.get("/user/v1.0/menu/list");
|
|
1061
|
+
}
|
|
1062
|
+
function $r(a) {
|
|
1063
|
+
const g = a || Ve();
|
|
1064
|
+
return b.get(`/user/v1.0/menu/get-menu?appId=${g}`);
|
|
1065
|
+
}
|
|
1066
|
+
function Gr(a) {
|
|
1067
|
+
return b.post("/menu", a);
|
|
1068
|
+
}
|
|
1069
|
+
function qr(a, g) {
|
|
1070
|
+
return b.put(`/menu/${a}`, g);
|
|
1071
|
+
}
|
|
1072
|
+
function Hr(a) {
|
|
1073
|
+
return b.delete(`/menu/${a}`);
|
|
1074
|
+
}
|
|
1075
|
+
function Kr(a) {
|
|
1076
|
+
return b.get("/user/list", { params: a });
|
|
1077
|
+
}
|
|
1078
|
+
function Xr(a) {
|
|
1079
|
+
return b.get(`/user/${a}`);
|
|
1080
|
+
}
|
|
1081
|
+
function zr(a) {
|
|
1082
|
+
return b.post("/user", a);
|
|
1083
|
+
}
|
|
1084
|
+
function Jr(a, g) {
|
|
1085
|
+
return b.put(`/user/${a}`, g);
|
|
1086
|
+
}
|
|
1087
|
+
function Vr(a) {
|
|
1088
|
+
return b.delete(`/user/${a}`);
|
|
1089
|
+
}
|
|
1090
|
+
function Yr(a) {
|
|
1091
|
+
return b.post("/user/batch-delete", { ids: a });
|
|
1092
|
+
}
|
|
1093
|
+
function Wr(a, g) {
|
|
1094
|
+
return b.patch(`/user/${a}/status`, { status: g });
|
|
1095
|
+
}
|
|
1096
|
+
function Qr(a) {
|
|
1097
|
+
return b.post(`/user/${a}/reset-password`);
|
|
1098
|
+
}
|
|
1099
|
+
export {
|
|
1100
|
+
ke as A,
|
|
1101
|
+
Sr as B,
|
|
1102
|
+
Nr as C,
|
|
1103
|
+
Ve as D,
|
|
1104
|
+
vr as E,
|
|
1105
|
+
Ar as F,
|
|
1106
|
+
Or as G,
|
|
1107
|
+
Br as H,
|
|
1108
|
+
_r as I,
|
|
1109
|
+
xr as J,
|
|
1110
|
+
er as K,
|
|
1111
|
+
We as L,
|
|
1112
|
+
b as M,
|
|
1113
|
+
ir as N,
|
|
1114
|
+
Ee as O,
|
|
1115
|
+
yr as P,
|
|
1116
|
+
ve as Q,
|
|
1117
|
+
Tr as R,
|
|
1118
|
+
nr as S,
|
|
1119
|
+
tr as T,
|
|
1120
|
+
Ze as U,
|
|
1121
|
+
Ye as V,
|
|
1122
|
+
rr as W,
|
|
1123
|
+
Qe as X,
|
|
1124
|
+
Cr as a,
|
|
1125
|
+
Yr as b,
|
|
1126
|
+
Gr as c,
|
|
1127
|
+
zr as d,
|
|
1128
|
+
Hr as e,
|
|
1129
|
+
Fr as f,
|
|
1130
|
+
Vr as g,
|
|
1131
|
+
jr as h,
|
|
1132
|
+
$r as i,
|
|
1133
|
+
Mr as j,
|
|
1134
|
+
Dr as k,
|
|
1135
|
+
Xr as l,
|
|
1136
|
+
Pr as m,
|
|
1137
|
+
Kr as n,
|
|
1138
|
+
Rr as o,
|
|
1139
|
+
kr as p,
|
|
1140
|
+
Qr as q,
|
|
1141
|
+
Ur as r,
|
|
1142
|
+
Lr as s,
|
|
1143
|
+
br as t,
|
|
1144
|
+
qr as u,
|
|
1145
|
+
Jr as v,
|
|
1146
|
+
Wr as w,
|
|
1147
|
+
z as x,
|
|
1148
|
+
$e as y,
|
|
1149
|
+
Ir as z
|
|
1150
|
+
};
|