sy-form-designer 1.0.0
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/_commonjsHelpers-C6fGbg64.js +6 -0
- package/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/designer-DsmFhyc-.js +198 -0
- package/index-BFhlK9cb.js +39 -0
- package/index-CKi_slLG.js +1220 -0
- package/index-CPJTgrJ5.js +228 -0
- package/index-CiII3mIY.js +350 -0
- package/index-CsmEJRUU.js +2433 -0
- package/index.css +1 -0
- package/index.js +5 -0
- package/index.umd.cjs +1011 -0
- package/package.json +15 -0
- package/render-CfYxuuCz.js +958 -0
- package/settings-Cc6phwii.js +14907 -0
- package/vite.svg +1 -0
- package/vue-i18n-CiM3E4ph.js +3113 -0
- package/widgets-BHbptXKj.js +90 -0
|
@@ -0,0 +1,2433 @@
|
|
|
1
|
+
import { reactive as Lt, useAttrs as Pt, ref as K, computed as Mt, inject as Dt, watch as $e, resolveComponent as te, createElementBlock as I, openBlock as D, createElementVNode as q, createCommentVNode as $, createVNode as W, createBlock as Ve, mergeProps as qt, unref as ne, withCtx as xe, normalizeStyle as Je, normalizeClass as jt, Fragment as Te, renderList as It, toDisplayString as ae, withDirectives as le, withModifiers as ue, vShow as ce, createTextVNode as fe } from "vue";
|
|
2
|
+
import { g as kt } from "./_commonjsHelpers-C6fGbg64.js";
|
|
3
|
+
import { E as ve } from "./index-CKi_slLG.js";
|
|
4
|
+
import { p as zt } from "./index-CPJTgrJ5.js";
|
|
5
|
+
import { _ as Ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
function at(e, t) {
|
|
7
|
+
return function() {
|
|
8
|
+
return e.apply(t, arguments);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
const { toString: $t } = Object.prototype, { getPrototypeOf: qe } = Object, ge = /* @__PURE__ */ ((e) => (t) => {
|
|
12
|
+
const n = $t.call(t);
|
|
13
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
14
|
+
})(/* @__PURE__ */ Object.create(null)), z = (e) => (e = e.toLowerCase(), (t) => ge(t) === e), we = (e) => (t) => typeof t === e, { isArray: Y } = Array, se = we("undefined");
|
|
15
|
+
function Vt(e) {
|
|
16
|
+
return e !== null && !se(e) && e.constructor !== null && !se(e.constructor) && k(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
17
|
+
}
|
|
18
|
+
const lt = z("ArrayBuffer");
|
|
19
|
+
function Jt(e) {
|
|
20
|
+
let t;
|
|
21
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lt(e.buffer), t;
|
|
22
|
+
}
|
|
23
|
+
const Wt = we("string"), k = we("function"), ut = we("number"), be = (e) => e !== null && typeof e == "object", Kt = (e) => e === !0 || e === !1, de = (e) => {
|
|
24
|
+
if (ge(e) !== "object")
|
|
25
|
+
return !1;
|
|
26
|
+
const t = qe(e);
|
|
27
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
28
|
+
}, Xt = z("Date"), Gt = z("File"), Zt = z("Blob"), Yt = z("FileList"), Qt = (e) => be(e) && k(e.pipe), en = (e) => {
|
|
29
|
+
let t;
|
|
30
|
+
return e && (typeof FormData == "function" && e instanceof FormData || k(e.append) && ((t = ge(e)) === "formdata" || // detect form-data instance
|
|
31
|
+
t === "object" && k(e.toString) && e.toString() === "[object FormData]"));
|
|
32
|
+
}, tn = z("URLSearchParams"), [nn, rn, sn, on] = ["ReadableStream", "Request", "Response", "Headers"].map(z), an = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
33
|
+
function oe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
34
|
+
if (e === null || typeof e > "u")
|
|
35
|
+
return;
|
|
36
|
+
let r, i;
|
|
37
|
+
if (typeof e != "object" && (e = [e]), Y(e))
|
|
38
|
+
for (r = 0, i = e.length; r < i; r++)
|
|
39
|
+
t.call(null, e[r], r, e);
|
|
40
|
+
else {
|
|
41
|
+
const l = n ? Object.getOwnPropertyNames(e) : Object.keys(e), c = l.length;
|
|
42
|
+
let y;
|
|
43
|
+
for (r = 0; r < c; r++)
|
|
44
|
+
y = l[r], t.call(null, e[y], y, e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function ct(e, t) {
|
|
48
|
+
t = t.toLowerCase();
|
|
49
|
+
const n = Object.keys(e);
|
|
50
|
+
let r = n.length, i;
|
|
51
|
+
for (; r-- > 0; )
|
|
52
|
+
if (i = n[r], t === i.toLowerCase())
|
|
53
|
+
return i;
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ft = (e) => !se(e) && e !== X;
|
|
57
|
+
function Be() {
|
|
58
|
+
const { caseless: e } = ft(this) && this || {}, t = {}, n = (r, i) => {
|
|
59
|
+
const l = e && ct(t, i) || i;
|
|
60
|
+
de(t[l]) && de(r) ? t[l] = Be(t[l], r) : de(r) ? t[l] = Be({}, r) : Y(r) ? t[l] = r.slice() : t[l] = r;
|
|
61
|
+
};
|
|
62
|
+
for (let r = 0, i = arguments.length; r < i; r++)
|
|
63
|
+
arguments[r] && oe(arguments[r], n);
|
|
64
|
+
return t;
|
|
65
|
+
}
|
|
66
|
+
const ln = (e, t, n, { allOwnKeys: r } = {}) => (oe(t, (i, l) => {
|
|
67
|
+
n && k(i) ? e[l] = at(i, n) : e[l] = i;
|
|
68
|
+
}, { allOwnKeys: r }), e), un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), cn = (e, t, n, r) => {
|
|
69
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
70
|
+
value: t.prototype
|
|
71
|
+
}), n && Object.assign(e.prototype, n);
|
|
72
|
+
}, fn = (e, t, n, r) => {
|
|
73
|
+
let i, l, c;
|
|
74
|
+
const y = {};
|
|
75
|
+
if (t = t || {}, e == null) return t;
|
|
76
|
+
do {
|
|
77
|
+
for (i = Object.getOwnPropertyNames(e), l = i.length; l-- > 0; )
|
|
78
|
+
c = i[l], (!r || r(c, e, t)) && !y[c] && (t[c] = e[c], y[c] = !0);
|
|
79
|
+
e = n !== !1 && qe(e);
|
|
80
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
81
|
+
return t;
|
|
82
|
+
}, dn = (e, t, n) => {
|
|
83
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
84
|
+
const r = e.indexOf(t, n);
|
|
85
|
+
return r !== -1 && r === n;
|
|
86
|
+
}, hn = (e) => {
|
|
87
|
+
if (!e) return null;
|
|
88
|
+
if (Y(e)) return e;
|
|
89
|
+
let t = e.length;
|
|
90
|
+
if (!ut(t)) return null;
|
|
91
|
+
const n = new Array(t);
|
|
92
|
+
for (; t-- > 0; )
|
|
93
|
+
n[t] = e[t];
|
|
94
|
+
return n;
|
|
95
|
+
}, pn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && qe(Uint8Array)), mn = (e, t) => {
|
|
96
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
97
|
+
let i;
|
|
98
|
+
for (; (i = r.next()) && !i.done; ) {
|
|
99
|
+
const l = i.value;
|
|
100
|
+
t.call(e, l[0], l[1]);
|
|
101
|
+
}
|
|
102
|
+
}, yn = (e, t) => {
|
|
103
|
+
let n;
|
|
104
|
+
const r = [];
|
|
105
|
+
for (; (n = e.exec(t)) !== null; )
|
|
106
|
+
r.push(n);
|
|
107
|
+
return r;
|
|
108
|
+
}, gn = z("HTMLFormElement"), wn = (e) => e.toLowerCase().replace(
|
|
109
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
110
|
+
function(n, r, i) {
|
|
111
|
+
return r.toUpperCase() + i;
|
|
112
|
+
}
|
|
113
|
+
), We = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), bn = z("RegExp"), dt = (e, t) => {
|
|
114
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
115
|
+
oe(n, (i, l) => {
|
|
116
|
+
let c;
|
|
117
|
+
(c = t(i, l, e)) !== !1 && (r[l] = c || i);
|
|
118
|
+
}), Object.defineProperties(e, r);
|
|
119
|
+
}, Sn = (e) => {
|
|
120
|
+
dt(e, (t, n) => {
|
|
121
|
+
if (k(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
|
+
return !1;
|
|
123
|
+
const r = e[n];
|
|
124
|
+
if (k(r)) {
|
|
125
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
126
|
+
t.writable = !1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
t.set || (t.set = () => {
|
|
130
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}, En = (e, t) => {
|
|
135
|
+
const n = {}, r = (i) => {
|
|
136
|
+
i.forEach((l) => {
|
|
137
|
+
n[l] = !0;
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
return Y(e) ? r(e) : r(String(e).split(t)), n;
|
|
141
|
+
}, Rn = () => {
|
|
142
|
+
}, An = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
143
|
+
function xn(e) {
|
|
144
|
+
return !!(e && k(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
145
|
+
}
|
|
146
|
+
const Tn = (e) => {
|
|
147
|
+
const t = new Array(10), n = (r, i) => {
|
|
148
|
+
if (be(r)) {
|
|
149
|
+
if (t.indexOf(r) >= 0)
|
|
150
|
+
return;
|
|
151
|
+
if (!("toJSON" in r)) {
|
|
152
|
+
t[i] = r;
|
|
153
|
+
const l = Y(r) ? [] : {};
|
|
154
|
+
return oe(r, (c, y) => {
|
|
155
|
+
const w = n(c, i + 1);
|
|
156
|
+
!se(w) && (l[y] = w);
|
|
157
|
+
}), t[i] = void 0, l;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return r;
|
|
161
|
+
};
|
|
162
|
+
return n(e, 0);
|
|
163
|
+
}, On = z("AsyncFunction"), Cn = (e) => e && (be(e) || k(e)) && k(e.then) && k(e.catch), ht = ((e, t) => e ? setImmediate : t ? ((n, r) => (X.addEventListener("message", ({ source: i, data: l }) => {
|
|
164
|
+
i === X && l === n && r.length && r.shift()();
|
|
165
|
+
}, !1), (i) => {
|
|
166
|
+
r.push(i), X.postMessage(n, "*");
|
|
167
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
168
|
+
typeof setImmediate == "function",
|
|
169
|
+
k(X.postMessage)
|
|
170
|
+
), _n = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || ht, p = {
|
|
171
|
+
isArray: Y,
|
|
172
|
+
isArrayBuffer: lt,
|
|
173
|
+
isBuffer: Vt,
|
|
174
|
+
isFormData: en,
|
|
175
|
+
isArrayBufferView: Jt,
|
|
176
|
+
isString: Wt,
|
|
177
|
+
isNumber: ut,
|
|
178
|
+
isBoolean: Kt,
|
|
179
|
+
isObject: be,
|
|
180
|
+
isPlainObject: de,
|
|
181
|
+
isReadableStream: nn,
|
|
182
|
+
isRequest: rn,
|
|
183
|
+
isResponse: sn,
|
|
184
|
+
isHeaders: on,
|
|
185
|
+
isUndefined: se,
|
|
186
|
+
isDate: Xt,
|
|
187
|
+
isFile: Gt,
|
|
188
|
+
isBlob: Zt,
|
|
189
|
+
isRegExp: bn,
|
|
190
|
+
isFunction: k,
|
|
191
|
+
isStream: Qt,
|
|
192
|
+
isURLSearchParams: tn,
|
|
193
|
+
isTypedArray: pn,
|
|
194
|
+
isFileList: Yt,
|
|
195
|
+
forEach: oe,
|
|
196
|
+
merge: Be,
|
|
197
|
+
extend: ln,
|
|
198
|
+
trim: an,
|
|
199
|
+
stripBOM: un,
|
|
200
|
+
inherits: cn,
|
|
201
|
+
toFlatObject: fn,
|
|
202
|
+
kindOf: ge,
|
|
203
|
+
kindOfTest: z,
|
|
204
|
+
endsWith: dn,
|
|
205
|
+
toArray: hn,
|
|
206
|
+
forEachEntry: mn,
|
|
207
|
+
matchAll: yn,
|
|
208
|
+
isHTMLForm: gn,
|
|
209
|
+
hasOwnProperty: We,
|
|
210
|
+
hasOwnProp: We,
|
|
211
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
212
|
+
reduceDescriptors: dt,
|
|
213
|
+
freezeMethods: Sn,
|
|
214
|
+
toObjectSet: En,
|
|
215
|
+
toCamelCase: wn,
|
|
216
|
+
noop: Rn,
|
|
217
|
+
toFiniteNumber: An,
|
|
218
|
+
findKey: ct,
|
|
219
|
+
global: X,
|
|
220
|
+
isContextDefined: ft,
|
|
221
|
+
isSpecCompliantForm: xn,
|
|
222
|
+
toJSONObject: Tn,
|
|
223
|
+
isAsyncFn: On,
|
|
224
|
+
isThenable: Cn,
|
|
225
|
+
setImmediate: ht,
|
|
226
|
+
asap: _n
|
|
227
|
+
};
|
|
228
|
+
function x(e, t, n, r, i) {
|
|
229
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status ? i.status : null);
|
|
230
|
+
}
|
|
231
|
+
p.inherits(x, Error, {
|
|
232
|
+
toJSON: function() {
|
|
233
|
+
return {
|
|
234
|
+
// Standard
|
|
235
|
+
message: this.message,
|
|
236
|
+
name: this.name,
|
|
237
|
+
// Microsoft
|
|
238
|
+
description: this.description,
|
|
239
|
+
number: this.number,
|
|
240
|
+
// Mozilla
|
|
241
|
+
fileName: this.fileName,
|
|
242
|
+
lineNumber: this.lineNumber,
|
|
243
|
+
columnNumber: this.columnNumber,
|
|
244
|
+
stack: this.stack,
|
|
245
|
+
// Axios
|
|
246
|
+
config: p.toJSONObject(this.config),
|
|
247
|
+
code: this.code,
|
|
248
|
+
status: this.status
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
const pt = x.prototype, mt = {};
|
|
253
|
+
[
|
|
254
|
+
"ERR_BAD_OPTION_VALUE",
|
|
255
|
+
"ERR_BAD_OPTION",
|
|
256
|
+
"ECONNABORTED",
|
|
257
|
+
"ETIMEDOUT",
|
|
258
|
+
"ERR_NETWORK",
|
|
259
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
260
|
+
"ERR_DEPRECATED",
|
|
261
|
+
"ERR_BAD_RESPONSE",
|
|
262
|
+
"ERR_BAD_REQUEST",
|
|
263
|
+
"ERR_CANCELED",
|
|
264
|
+
"ERR_NOT_SUPPORT",
|
|
265
|
+
"ERR_INVALID_URL"
|
|
266
|
+
// eslint-disable-next-line func-names
|
|
267
|
+
].forEach((e) => {
|
|
268
|
+
mt[e] = { value: e };
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperties(x, mt);
|
|
271
|
+
Object.defineProperty(pt, "isAxiosError", { value: !0 });
|
|
272
|
+
x.from = (e, t, n, r, i, l) => {
|
|
273
|
+
const c = Object.create(pt);
|
|
274
|
+
return p.toFlatObject(e, c, function(w) {
|
|
275
|
+
return w !== Error.prototype;
|
|
276
|
+
}, (y) => y !== "isAxiosError"), x.call(c, e.message, t, n, r, i), c.cause = e, c.name = e.name, l && Object.assign(c, l), c;
|
|
277
|
+
};
|
|
278
|
+
const Un = null;
|
|
279
|
+
function Fe(e) {
|
|
280
|
+
return p.isPlainObject(e) || p.isArray(e);
|
|
281
|
+
}
|
|
282
|
+
function yt(e) {
|
|
283
|
+
return p.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
284
|
+
}
|
|
285
|
+
function Ke(e, t, n) {
|
|
286
|
+
return e ? e.concat(t).map(function(i, l) {
|
|
287
|
+
return i = yt(i), !n && l ? "[" + i + "]" : i;
|
|
288
|
+
}).join(n ? "." : "") : t;
|
|
289
|
+
}
|
|
290
|
+
function vn(e) {
|
|
291
|
+
return p.isArray(e) && !e.some(Fe);
|
|
292
|
+
}
|
|
293
|
+
const Bn = p.toFlatObject(p, {}, null, function(t) {
|
|
294
|
+
return /^is[A-Z]/.test(t);
|
|
295
|
+
});
|
|
296
|
+
function Se(e, t, n) {
|
|
297
|
+
if (!p.isObject(e))
|
|
298
|
+
throw new TypeError("target must be an object");
|
|
299
|
+
t = t || new FormData(), n = p.toFlatObject(n, {
|
|
300
|
+
metaTokens: !0,
|
|
301
|
+
dots: !1,
|
|
302
|
+
indexes: !1
|
|
303
|
+
}, !1, function(E, g) {
|
|
304
|
+
return !p.isUndefined(g[E]);
|
|
305
|
+
});
|
|
306
|
+
const r = n.metaTokens, i = n.visitor || m, l = n.dots, c = n.indexes, w = (n.Blob || typeof Blob < "u" && Blob) && p.isSpecCompliantForm(t);
|
|
307
|
+
if (!p.isFunction(i))
|
|
308
|
+
throw new TypeError("visitor must be a function");
|
|
309
|
+
function d(b) {
|
|
310
|
+
if (b === null) return "";
|
|
311
|
+
if (p.isDate(b))
|
|
312
|
+
return b.toISOString();
|
|
313
|
+
if (!w && p.isBlob(b))
|
|
314
|
+
throw new x("Blob is not supported. Use a Buffer instead.");
|
|
315
|
+
return p.isArrayBuffer(b) || p.isTypedArray(b) ? w && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
|
|
316
|
+
}
|
|
317
|
+
function m(b, E, g) {
|
|
318
|
+
let h = b;
|
|
319
|
+
if (b && !g && typeof b == "object") {
|
|
320
|
+
if (p.endsWith(E, "{}"))
|
|
321
|
+
E = r ? E : E.slice(0, -2), b = JSON.stringify(b);
|
|
322
|
+
else if (p.isArray(b) && vn(b) || (p.isFileList(b) || p.endsWith(E, "[]")) && (h = p.toArray(b)))
|
|
323
|
+
return E = yt(E), h.forEach(function(s, o) {
|
|
324
|
+
!(p.isUndefined(s) || s === null) && t.append(
|
|
325
|
+
// eslint-disable-next-line no-nested-ternary
|
|
326
|
+
c === !0 ? Ke([E], o, l) : c === null ? E : E + "[]",
|
|
327
|
+
d(s)
|
|
328
|
+
);
|
|
329
|
+
}), !1;
|
|
330
|
+
}
|
|
331
|
+
return Fe(b) ? !0 : (t.append(Ke(g, E, l), d(b)), !1);
|
|
332
|
+
}
|
|
333
|
+
const S = [], R = Object.assign(Bn, {
|
|
334
|
+
defaultVisitor: m,
|
|
335
|
+
convertValue: d,
|
|
336
|
+
isVisitable: Fe
|
|
337
|
+
});
|
|
338
|
+
function T(b, E) {
|
|
339
|
+
if (!p.isUndefined(b)) {
|
|
340
|
+
if (S.indexOf(b) !== -1)
|
|
341
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
342
|
+
S.push(b), p.forEach(b, function(h, f) {
|
|
343
|
+
(!(p.isUndefined(h) || h === null) && i.call(
|
|
344
|
+
t,
|
|
345
|
+
h,
|
|
346
|
+
p.isString(f) ? f.trim() : f,
|
|
347
|
+
E,
|
|
348
|
+
R
|
|
349
|
+
)) === !0 && T(h, E ? E.concat(f) : [f]);
|
|
350
|
+
}), S.pop();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (!p.isObject(e))
|
|
354
|
+
throw new TypeError("data must be an object");
|
|
355
|
+
return T(e), t;
|
|
356
|
+
}
|
|
357
|
+
function Xe(e) {
|
|
358
|
+
const t = {
|
|
359
|
+
"!": "%21",
|
|
360
|
+
"'": "%27",
|
|
361
|
+
"(": "%28",
|
|
362
|
+
")": "%29",
|
|
363
|
+
"~": "%7E",
|
|
364
|
+
"%20": "+",
|
|
365
|
+
"%00": "\0"
|
|
366
|
+
};
|
|
367
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
368
|
+
return t[r];
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
function je(e, t) {
|
|
372
|
+
this._pairs = [], e && Se(e, this, t);
|
|
373
|
+
}
|
|
374
|
+
const gt = je.prototype;
|
|
375
|
+
gt.append = function(t, n) {
|
|
376
|
+
this._pairs.push([t, n]);
|
|
377
|
+
};
|
|
378
|
+
gt.toString = function(t) {
|
|
379
|
+
const n = t ? function(r) {
|
|
380
|
+
return t.call(this, r, Xe);
|
|
381
|
+
} : Xe;
|
|
382
|
+
return this._pairs.map(function(i) {
|
|
383
|
+
return n(i[0]) + "=" + n(i[1]);
|
|
384
|
+
}, "").join("&");
|
|
385
|
+
};
|
|
386
|
+
function Fn(e) {
|
|
387
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
388
|
+
}
|
|
389
|
+
function wt(e, t, n) {
|
|
390
|
+
if (!t)
|
|
391
|
+
return e;
|
|
392
|
+
const r = n && n.encode || Fn;
|
|
393
|
+
p.isFunction(n) && (n = {
|
|
394
|
+
serialize: n
|
|
395
|
+
});
|
|
396
|
+
const i = n && n.serialize;
|
|
397
|
+
let l;
|
|
398
|
+
if (i ? l = i(t, n) : l = p.isURLSearchParams(t) ? t.toString() : new je(t, n).toString(r), l) {
|
|
399
|
+
const c = e.indexOf("#");
|
|
400
|
+
c !== -1 && (e = e.slice(0, c)), e += (e.indexOf("?") === -1 ? "?" : "&") + l;
|
|
401
|
+
}
|
|
402
|
+
return e;
|
|
403
|
+
}
|
|
404
|
+
class Ge {
|
|
405
|
+
constructor() {
|
|
406
|
+
this.handlers = [];
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Add a new interceptor to the stack
|
|
410
|
+
*
|
|
411
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
412
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
413
|
+
*
|
|
414
|
+
* @return {Number} An ID used to remove interceptor later
|
|
415
|
+
*/
|
|
416
|
+
use(t, n, r) {
|
|
417
|
+
return this.handlers.push({
|
|
418
|
+
fulfilled: t,
|
|
419
|
+
rejected: n,
|
|
420
|
+
synchronous: r ? r.synchronous : !1,
|
|
421
|
+
runWhen: r ? r.runWhen : null
|
|
422
|
+
}), this.handlers.length - 1;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Remove an interceptor from the stack
|
|
426
|
+
*
|
|
427
|
+
* @param {Number} id The ID that was returned by `use`
|
|
428
|
+
*
|
|
429
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
430
|
+
*/
|
|
431
|
+
eject(t) {
|
|
432
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Clear all interceptors from the stack
|
|
436
|
+
*
|
|
437
|
+
* @returns {void}
|
|
438
|
+
*/
|
|
439
|
+
clear() {
|
|
440
|
+
this.handlers && (this.handlers = []);
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Iterate over all the registered interceptors
|
|
444
|
+
*
|
|
445
|
+
* This method is particularly useful for skipping over any
|
|
446
|
+
* interceptors that may have become `null` calling `eject`.
|
|
447
|
+
*
|
|
448
|
+
* @param {Function} fn The function to call for each interceptor
|
|
449
|
+
*
|
|
450
|
+
* @returns {void}
|
|
451
|
+
*/
|
|
452
|
+
forEach(t) {
|
|
453
|
+
p.forEach(this.handlers, function(r) {
|
|
454
|
+
r !== null && t(r);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
const bt = {
|
|
459
|
+
silentJSONParsing: !0,
|
|
460
|
+
forcedJSONParsing: !0,
|
|
461
|
+
clarifyTimeoutError: !1
|
|
462
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : je, Ln = typeof FormData < "u" ? FormData : null, Pn = typeof Blob < "u" ? Blob : null, Mn = {
|
|
463
|
+
isBrowser: !0,
|
|
464
|
+
classes: {
|
|
465
|
+
URLSearchParams: Nn,
|
|
466
|
+
FormData: Ln,
|
|
467
|
+
Blob: Pn
|
|
468
|
+
},
|
|
469
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
470
|
+
}, Ie = typeof window < "u" && typeof document < "u", Ne = typeof navigator == "object" && navigator || void 0, Dn = Ie && (!Ne || ["ReactNative", "NativeScript", "NS"].indexOf(Ne.product) < 0), qn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
471
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jn = Ie && window.location.href || "http://localhost", In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
472
|
+
__proto__: null,
|
|
473
|
+
hasBrowserEnv: Ie,
|
|
474
|
+
hasStandardBrowserEnv: Dn,
|
|
475
|
+
hasStandardBrowserWebWorkerEnv: qn,
|
|
476
|
+
navigator: Ne,
|
|
477
|
+
origin: jn
|
|
478
|
+
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
479
|
+
...In,
|
|
480
|
+
...Mn
|
|
481
|
+
};
|
|
482
|
+
function kn(e, t) {
|
|
483
|
+
return Se(e, new P.classes.URLSearchParams(), Object.assign({
|
|
484
|
+
visitor: function(n, r, i, l) {
|
|
485
|
+
return P.isNode && p.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : l.defaultVisitor.apply(this, arguments);
|
|
486
|
+
}
|
|
487
|
+
}, t));
|
|
488
|
+
}
|
|
489
|
+
function zn(e) {
|
|
490
|
+
return p.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
491
|
+
}
|
|
492
|
+
function Hn(e) {
|
|
493
|
+
const t = {}, n = Object.keys(e);
|
|
494
|
+
let r;
|
|
495
|
+
const i = n.length;
|
|
496
|
+
let l;
|
|
497
|
+
for (r = 0; r < i; r++)
|
|
498
|
+
l = n[r], t[l] = e[l];
|
|
499
|
+
return t;
|
|
500
|
+
}
|
|
501
|
+
function St(e) {
|
|
502
|
+
function t(n, r, i, l) {
|
|
503
|
+
let c = n[l++];
|
|
504
|
+
if (c === "__proto__") return !0;
|
|
505
|
+
const y = Number.isFinite(+c), w = l >= n.length;
|
|
506
|
+
return c = !c && p.isArray(i) ? i.length : c, w ? (p.hasOwnProp(i, c) ? i[c] = [i[c], r] : i[c] = r, !y) : ((!i[c] || !p.isObject(i[c])) && (i[c] = []), t(n, r, i[c], l) && p.isArray(i[c]) && (i[c] = Hn(i[c])), !y);
|
|
507
|
+
}
|
|
508
|
+
if (p.isFormData(e) && p.isFunction(e.entries)) {
|
|
509
|
+
const n = {};
|
|
510
|
+
return p.forEachEntry(e, (r, i) => {
|
|
511
|
+
t(zn(r), i, n, 0);
|
|
512
|
+
}), n;
|
|
513
|
+
}
|
|
514
|
+
return null;
|
|
515
|
+
}
|
|
516
|
+
function $n(e, t, n) {
|
|
517
|
+
if (p.isString(e))
|
|
518
|
+
try {
|
|
519
|
+
return (t || JSON.parse)(e), p.trim(e);
|
|
520
|
+
} catch (r) {
|
|
521
|
+
if (r.name !== "SyntaxError")
|
|
522
|
+
throw r;
|
|
523
|
+
}
|
|
524
|
+
return (n || JSON.stringify)(e);
|
|
525
|
+
}
|
|
526
|
+
const ie = {
|
|
527
|
+
transitional: bt,
|
|
528
|
+
adapter: ["xhr", "http", "fetch"],
|
|
529
|
+
transformRequest: [function(t, n) {
|
|
530
|
+
const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, l = p.isObject(t);
|
|
531
|
+
if (l && p.isHTMLForm(t) && (t = new FormData(t)), p.isFormData(t))
|
|
532
|
+
return i ? JSON.stringify(St(t)) : t;
|
|
533
|
+
if (p.isArrayBuffer(t) || p.isBuffer(t) || p.isStream(t) || p.isFile(t) || p.isBlob(t) || p.isReadableStream(t))
|
|
534
|
+
return t;
|
|
535
|
+
if (p.isArrayBufferView(t))
|
|
536
|
+
return t.buffer;
|
|
537
|
+
if (p.isURLSearchParams(t))
|
|
538
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
539
|
+
let y;
|
|
540
|
+
if (l) {
|
|
541
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
542
|
+
return kn(t, this.formSerializer).toString();
|
|
543
|
+
if ((y = p.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
544
|
+
const w = this.env && this.env.FormData;
|
|
545
|
+
return Se(
|
|
546
|
+
y ? { "files[]": t } : t,
|
|
547
|
+
w && new w(),
|
|
548
|
+
this.formSerializer
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return l || i ? (n.setContentType("application/json", !1), $n(t)) : t;
|
|
553
|
+
}],
|
|
554
|
+
transformResponse: [function(t) {
|
|
555
|
+
const n = this.transitional || ie.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json";
|
|
556
|
+
if (p.isResponse(t) || p.isReadableStream(t))
|
|
557
|
+
return t;
|
|
558
|
+
if (t && p.isString(t) && (r && !this.responseType || i)) {
|
|
559
|
+
const c = !(n && n.silentJSONParsing) && i;
|
|
560
|
+
try {
|
|
561
|
+
return JSON.parse(t);
|
|
562
|
+
} catch (y) {
|
|
563
|
+
if (c)
|
|
564
|
+
throw y.name === "SyntaxError" ? x.from(y, x.ERR_BAD_RESPONSE, this, null, this.response) : y;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return t;
|
|
568
|
+
}],
|
|
569
|
+
/**
|
|
570
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
571
|
+
* timeout is not created.
|
|
572
|
+
*/
|
|
573
|
+
timeout: 0,
|
|
574
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
575
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
576
|
+
maxContentLength: -1,
|
|
577
|
+
maxBodyLength: -1,
|
|
578
|
+
env: {
|
|
579
|
+
FormData: P.classes.FormData,
|
|
580
|
+
Blob: P.classes.Blob
|
|
581
|
+
},
|
|
582
|
+
validateStatus: function(t) {
|
|
583
|
+
return t >= 200 && t < 300;
|
|
584
|
+
},
|
|
585
|
+
headers: {
|
|
586
|
+
common: {
|
|
587
|
+
Accept: "application/json, text/plain, */*",
|
|
588
|
+
"Content-Type": void 0
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
p.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
593
|
+
ie.headers[e] = {};
|
|
594
|
+
});
|
|
595
|
+
const Vn = p.toObjectSet([
|
|
596
|
+
"age",
|
|
597
|
+
"authorization",
|
|
598
|
+
"content-length",
|
|
599
|
+
"content-type",
|
|
600
|
+
"etag",
|
|
601
|
+
"expires",
|
|
602
|
+
"from",
|
|
603
|
+
"host",
|
|
604
|
+
"if-modified-since",
|
|
605
|
+
"if-unmodified-since",
|
|
606
|
+
"last-modified",
|
|
607
|
+
"location",
|
|
608
|
+
"max-forwards",
|
|
609
|
+
"proxy-authorization",
|
|
610
|
+
"referer",
|
|
611
|
+
"retry-after",
|
|
612
|
+
"user-agent"
|
|
613
|
+
]), Jn = (e) => {
|
|
614
|
+
const t = {};
|
|
615
|
+
let n, r, i;
|
|
616
|
+
return e && e.split(`
|
|
617
|
+
`).forEach(function(c) {
|
|
618
|
+
i = c.indexOf(":"), n = c.substring(0, i).trim().toLowerCase(), r = c.substring(i + 1).trim(), !(!n || t[n] && Vn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
619
|
+
}), t;
|
|
620
|
+
}, Ze = Symbol("internals");
|
|
621
|
+
function re(e) {
|
|
622
|
+
return e && String(e).trim().toLowerCase();
|
|
623
|
+
}
|
|
624
|
+
function he(e) {
|
|
625
|
+
return e === !1 || e == null ? e : p.isArray(e) ? e.map(he) : String(e);
|
|
626
|
+
}
|
|
627
|
+
function Wn(e) {
|
|
628
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
629
|
+
let r;
|
|
630
|
+
for (; r = n.exec(e); )
|
|
631
|
+
t[r[1]] = r[2];
|
|
632
|
+
return t;
|
|
633
|
+
}
|
|
634
|
+
const Kn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
635
|
+
function Oe(e, t, n, r, i) {
|
|
636
|
+
if (p.isFunction(r))
|
|
637
|
+
return r.call(this, t, n);
|
|
638
|
+
if (i && (t = n), !!p.isString(t)) {
|
|
639
|
+
if (p.isString(r))
|
|
640
|
+
return t.indexOf(r) !== -1;
|
|
641
|
+
if (p.isRegExp(r))
|
|
642
|
+
return r.test(t);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
function Xn(e) {
|
|
646
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
647
|
+
}
|
|
648
|
+
function Gn(e, t) {
|
|
649
|
+
const n = p.toCamelCase(" " + t);
|
|
650
|
+
["get", "set", "has"].forEach((r) => {
|
|
651
|
+
Object.defineProperty(e, r + n, {
|
|
652
|
+
value: function(i, l, c) {
|
|
653
|
+
return this[r].call(this, t, i, l, c);
|
|
654
|
+
},
|
|
655
|
+
configurable: !0
|
|
656
|
+
});
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
let j = class {
|
|
660
|
+
constructor(t) {
|
|
661
|
+
t && this.set(t);
|
|
662
|
+
}
|
|
663
|
+
set(t, n, r) {
|
|
664
|
+
const i = this;
|
|
665
|
+
function l(y, w, d) {
|
|
666
|
+
const m = re(w);
|
|
667
|
+
if (!m)
|
|
668
|
+
throw new Error("header name must be a non-empty string");
|
|
669
|
+
const S = p.findKey(i, m);
|
|
670
|
+
(!S || i[S] === void 0 || d === !0 || d === void 0 && i[S] !== !1) && (i[S || w] = he(y));
|
|
671
|
+
}
|
|
672
|
+
const c = (y, w) => p.forEach(y, (d, m) => l(d, m, w));
|
|
673
|
+
if (p.isPlainObject(t) || t instanceof this.constructor)
|
|
674
|
+
c(t, n);
|
|
675
|
+
else if (p.isString(t) && (t = t.trim()) && !Kn(t))
|
|
676
|
+
c(Jn(t), n);
|
|
677
|
+
else if (p.isHeaders(t))
|
|
678
|
+
for (const [y, w] of t.entries())
|
|
679
|
+
l(w, y, r);
|
|
680
|
+
else
|
|
681
|
+
t != null && l(n, t, r);
|
|
682
|
+
return this;
|
|
683
|
+
}
|
|
684
|
+
get(t, n) {
|
|
685
|
+
if (t = re(t), t) {
|
|
686
|
+
const r = p.findKey(this, t);
|
|
687
|
+
if (r) {
|
|
688
|
+
const i = this[r];
|
|
689
|
+
if (!n)
|
|
690
|
+
return i;
|
|
691
|
+
if (n === !0)
|
|
692
|
+
return Wn(i);
|
|
693
|
+
if (p.isFunction(n))
|
|
694
|
+
return n.call(this, i, r);
|
|
695
|
+
if (p.isRegExp(n))
|
|
696
|
+
return n.exec(i);
|
|
697
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
has(t, n) {
|
|
702
|
+
if (t = re(t), t) {
|
|
703
|
+
const r = p.findKey(this, t);
|
|
704
|
+
return !!(r && this[r] !== void 0 && (!n || Oe(this, this[r], r, n)));
|
|
705
|
+
}
|
|
706
|
+
return !1;
|
|
707
|
+
}
|
|
708
|
+
delete(t, n) {
|
|
709
|
+
const r = this;
|
|
710
|
+
let i = !1;
|
|
711
|
+
function l(c) {
|
|
712
|
+
if (c = re(c), c) {
|
|
713
|
+
const y = p.findKey(r, c);
|
|
714
|
+
y && (!n || Oe(r, r[y], y, n)) && (delete r[y], i = !0);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
return p.isArray(t) ? t.forEach(l) : l(t), i;
|
|
718
|
+
}
|
|
719
|
+
clear(t) {
|
|
720
|
+
const n = Object.keys(this);
|
|
721
|
+
let r = n.length, i = !1;
|
|
722
|
+
for (; r--; ) {
|
|
723
|
+
const l = n[r];
|
|
724
|
+
(!t || Oe(this, this[l], l, t, !0)) && (delete this[l], i = !0);
|
|
725
|
+
}
|
|
726
|
+
return i;
|
|
727
|
+
}
|
|
728
|
+
normalize(t) {
|
|
729
|
+
const n = this, r = {};
|
|
730
|
+
return p.forEach(this, (i, l) => {
|
|
731
|
+
const c = p.findKey(r, l);
|
|
732
|
+
if (c) {
|
|
733
|
+
n[c] = he(i), delete n[l];
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
const y = t ? Xn(l) : String(l).trim();
|
|
737
|
+
y !== l && delete n[l], n[y] = he(i), r[y] = !0;
|
|
738
|
+
}), this;
|
|
739
|
+
}
|
|
740
|
+
concat(...t) {
|
|
741
|
+
return this.constructor.concat(this, ...t);
|
|
742
|
+
}
|
|
743
|
+
toJSON(t) {
|
|
744
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
745
|
+
return p.forEach(this, (r, i) => {
|
|
746
|
+
r != null && r !== !1 && (n[i] = t && p.isArray(r) ? r.join(", ") : r);
|
|
747
|
+
}), n;
|
|
748
|
+
}
|
|
749
|
+
[Symbol.iterator]() {
|
|
750
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
751
|
+
}
|
|
752
|
+
toString() {
|
|
753
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
754
|
+
`);
|
|
755
|
+
}
|
|
756
|
+
get [Symbol.toStringTag]() {
|
|
757
|
+
return "AxiosHeaders";
|
|
758
|
+
}
|
|
759
|
+
static from(t) {
|
|
760
|
+
return t instanceof this ? t : new this(t);
|
|
761
|
+
}
|
|
762
|
+
static concat(t, ...n) {
|
|
763
|
+
const r = new this(t);
|
|
764
|
+
return n.forEach((i) => r.set(i)), r;
|
|
765
|
+
}
|
|
766
|
+
static accessor(t) {
|
|
767
|
+
const r = (this[Ze] = this[Ze] = {
|
|
768
|
+
accessors: {}
|
|
769
|
+
}).accessors, i = this.prototype;
|
|
770
|
+
function l(c) {
|
|
771
|
+
const y = re(c);
|
|
772
|
+
r[y] || (Gn(i, c), r[y] = !0);
|
|
773
|
+
}
|
|
774
|
+
return p.isArray(t) ? t.forEach(l) : l(t), this;
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
j.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
778
|
+
p.reduceDescriptors(j.prototype, ({ value: e }, t) => {
|
|
779
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
780
|
+
return {
|
|
781
|
+
get: () => e,
|
|
782
|
+
set(r) {
|
|
783
|
+
this[n] = r;
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
});
|
|
787
|
+
p.freezeMethods(j);
|
|
788
|
+
function Ce(e, t) {
|
|
789
|
+
const n = this || ie, r = t || n, i = j.from(r.headers);
|
|
790
|
+
let l = r.data;
|
|
791
|
+
return p.forEach(e, function(y) {
|
|
792
|
+
l = y.call(n, l, i.normalize(), t ? t.status : void 0);
|
|
793
|
+
}), i.normalize(), l;
|
|
794
|
+
}
|
|
795
|
+
function Et(e) {
|
|
796
|
+
return !!(e && e.__CANCEL__);
|
|
797
|
+
}
|
|
798
|
+
function Q(e, t, n) {
|
|
799
|
+
x.call(this, e ?? "canceled", x.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
800
|
+
}
|
|
801
|
+
p.inherits(Q, x, {
|
|
802
|
+
__CANCEL__: !0
|
|
803
|
+
});
|
|
804
|
+
function Rt(e, t, n) {
|
|
805
|
+
const r = n.config.validateStatus;
|
|
806
|
+
!n.status || !r || r(n.status) ? e(n) : t(new x(
|
|
807
|
+
"Request failed with status code " + n.status,
|
|
808
|
+
[x.ERR_BAD_REQUEST, x.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
809
|
+
n.config,
|
|
810
|
+
n.request,
|
|
811
|
+
n
|
|
812
|
+
));
|
|
813
|
+
}
|
|
814
|
+
function Zn(e) {
|
|
815
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
816
|
+
return t && t[1] || "";
|
|
817
|
+
}
|
|
818
|
+
function Yn(e, t) {
|
|
819
|
+
e = e || 10;
|
|
820
|
+
const n = new Array(e), r = new Array(e);
|
|
821
|
+
let i = 0, l = 0, c;
|
|
822
|
+
return t = t !== void 0 ? t : 1e3, function(w) {
|
|
823
|
+
const d = Date.now(), m = r[l];
|
|
824
|
+
c || (c = d), n[i] = w, r[i] = d;
|
|
825
|
+
let S = l, R = 0;
|
|
826
|
+
for (; S !== i; )
|
|
827
|
+
R += n[S++], S = S % e;
|
|
828
|
+
if (i = (i + 1) % e, i === l && (l = (l + 1) % e), d - c < t)
|
|
829
|
+
return;
|
|
830
|
+
const T = m && d - m;
|
|
831
|
+
return T ? Math.round(R * 1e3 / T) : void 0;
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function Qn(e, t) {
|
|
835
|
+
let n = 0, r = 1e3 / t, i, l;
|
|
836
|
+
const c = (d, m = Date.now()) => {
|
|
837
|
+
n = m, i = null, l && (clearTimeout(l), l = null), e.apply(null, d);
|
|
838
|
+
};
|
|
839
|
+
return [(...d) => {
|
|
840
|
+
const m = Date.now(), S = m - n;
|
|
841
|
+
S >= r ? c(d, m) : (i = d, l || (l = setTimeout(() => {
|
|
842
|
+
l = null, c(i);
|
|
843
|
+
}, r - S)));
|
|
844
|
+
}, () => i && c(i)];
|
|
845
|
+
}
|
|
846
|
+
const me = (e, t, n = 3) => {
|
|
847
|
+
let r = 0;
|
|
848
|
+
const i = Yn(50, 250);
|
|
849
|
+
return Qn((l) => {
|
|
850
|
+
const c = l.loaded, y = l.lengthComputable ? l.total : void 0, w = c - r, d = i(w), m = c <= y;
|
|
851
|
+
r = c;
|
|
852
|
+
const S = {
|
|
853
|
+
loaded: c,
|
|
854
|
+
total: y,
|
|
855
|
+
progress: y ? c / y : void 0,
|
|
856
|
+
bytes: w,
|
|
857
|
+
rate: d || void 0,
|
|
858
|
+
estimated: d && y && m ? (y - c) / d : void 0,
|
|
859
|
+
event: l,
|
|
860
|
+
lengthComputable: y != null,
|
|
861
|
+
[t ? "download" : "upload"]: !0
|
|
862
|
+
};
|
|
863
|
+
e(S);
|
|
864
|
+
}, n);
|
|
865
|
+
}, Ye = (e, t) => {
|
|
866
|
+
const n = e != null;
|
|
867
|
+
return [(r) => t[0]({
|
|
868
|
+
lengthComputable: n,
|
|
869
|
+
total: e,
|
|
870
|
+
loaded: r
|
|
871
|
+
}), t[1]];
|
|
872
|
+
}, Qe = (e) => (...t) => p.asap(() => e(...t)), er = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, P.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
873
|
+
new URL(P.origin),
|
|
874
|
+
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
875
|
+
) : () => !0, tr = P.hasStandardBrowserEnv ? (
|
|
876
|
+
// Standard browser envs support document.cookie
|
|
877
|
+
{
|
|
878
|
+
write(e, t, n, r, i, l) {
|
|
879
|
+
const c = [e + "=" + encodeURIComponent(t)];
|
|
880
|
+
p.isNumber(n) && c.push("expires=" + new Date(n).toGMTString()), p.isString(r) && c.push("path=" + r), p.isString(i) && c.push("domain=" + i), l === !0 && c.push("secure"), document.cookie = c.join("; ");
|
|
881
|
+
},
|
|
882
|
+
read(e) {
|
|
883
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
884
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
885
|
+
},
|
|
886
|
+
remove(e) {
|
|
887
|
+
this.write(e, "", Date.now() - 864e5);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
) : (
|
|
891
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
892
|
+
{
|
|
893
|
+
write() {
|
|
894
|
+
},
|
|
895
|
+
read() {
|
|
896
|
+
return null;
|
|
897
|
+
},
|
|
898
|
+
remove() {
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
);
|
|
902
|
+
function nr(e) {
|
|
903
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
904
|
+
}
|
|
905
|
+
function rr(e, t) {
|
|
906
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
907
|
+
}
|
|
908
|
+
function At(e, t, n) {
|
|
909
|
+
let r = !nr(t);
|
|
910
|
+
return e && (r || n == !1) ? rr(e, t) : t;
|
|
911
|
+
}
|
|
912
|
+
const et = (e) => e instanceof j ? { ...e } : e;
|
|
913
|
+
function Z(e, t) {
|
|
914
|
+
t = t || {};
|
|
915
|
+
const n = {};
|
|
916
|
+
function r(d, m, S, R) {
|
|
917
|
+
return p.isPlainObject(d) && p.isPlainObject(m) ? p.merge.call({ caseless: R }, d, m) : p.isPlainObject(m) ? p.merge({}, m) : p.isArray(m) ? m.slice() : m;
|
|
918
|
+
}
|
|
919
|
+
function i(d, m, S, R) {
|
|
920
|
+
if (p.isUndefined(m)) {
|
|
921
|
+
if (!p.isUndefined(d))
|
|
922
|
+
return r(void 0, d, S, R);
|
|
923
|
+
} else return r(d, m, S, R);
|
|
924
|
+
}
|
|
925
|
+
function l(d, m) {
|
|
926
|
+
if (!p.isUndefined(m))
|
|
927
|
+
return r(void 0, m);
|
|
928
|
+
}
|
|
929
|
+
function c(d, m) {
|
|
930
|
+
if (p.isUndefined(m)) {
|
|
931
|
+
if (!p.isUndefined(d))
|
|
932
|
+
return r(void 0, d);
|
|
933
|
+
} else return r(void 0, m);
|
|
934
|
+
}
|
|
935
|
+
function y(d, m, S) {
|
|
936
|
+
if (S in t)
|
|
937
|
+
return r(d, m);
|
|
938
|
+
if (S in e)
|
|
939
|
+
return r(void 0, d);
|
|
940
|
+
}
|
|
941
|
+
const w = {
|
|
942
|
+
url: l,
|
|
943
|
+
method: l,
|
|
944
|
+
data: l,
|
|
945
|
+
baseURL: c,
|
|
946
|
+
transformRequest: c,
|
|
947
|
+
transformResponse: c,
|
|
948
|
+
paramsSerializer: c,
|
|
949
|
+
timeout: c,
|
|
950
|
+
timeoutMessage: c,
|
|
951
|
+
withCredentials: c,
|
|
952
|
+
withXSRFToken: c,
|
|
953
|
+
adapter: c,
|
|
954
|
+
responseType: c,
|
|
955
|
+
xsrfCookieName: c,
|
|
956
|
+
xsrfHeaderName: c,
|
|
957
|
+
onUploadProgress: c,
|
|
958
|
+
onDownloadProgress: c,
|
|
959
|
+
decompress: c,
|
|
960
|
+
maxContentLength: c,
|
|
961
|
+
maxBodyLength: c,
|
|
962
|
+
beforeRedirect: c,
|
|
963
|
+
transport: c,
|
|
964
|
+
httpAgent: c,
|
|
965
|
+
httpsAgent: c,
|
|
966
|
+
cancelToken: c,
|
|
967
|
+
socketPath: c,
|
|
968
|
+
responseEncoding: c,
|
|
969
|
+
validateStatus: y,
|
|
970
|
+
headers: (d, m, S) => i(et(d), et(m), S, !0)
|
|
971
|
+
};
|
|
972
|
+
return p.forEach(Object.keys(Object.assign({}, e, t)), function(m) {
|
|
973
|
+
const S = w[m] || i, R = S(e[m], t[m], m);
|
|
974
|
+
p.isUndefined(R) && S !== y || (n[m] = R);
|
|
975
|
+
}), n;
|
|
976
|
+
}
|
|
977
|
+
const xt = (e) => {
|
|
978
|
+
const t = Z({}, e);
|
|
979
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: l, headers: c, auth: y } = t;
|
|
980
|
+
t.headers = c = j.from(c), t.url = wt(At(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), y && c.set(
|
|
981
|
+
"Authorization",
|
|
982
|
+
"Basic " + btoa((y.username || "") + ":" + (y.password ? unescape(encodeURIComponent(y.password)) : ""))
|
|
983
|
+
);
|
|
984
|
+
let w;
|
|
985
|
+
if (p.isFormData(n)) {
|
|
986
|
+
if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
|
|
987
|
+
c.setContentType(void 0);
|
|
988
|
+
else if ((w = c.getContentType()) !== !1) {
|
|
989
|
+
const [d, ...m] = w ? w.split(";").map((S) => S.trim()).filter(Boolean) : [];
|
|
990
|
+
c.setContentType([d || "multipart/form-data", ...m].join("; "));
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if (P.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(t)), r || r !== !1 && er(t.url))) {
|
|
994
|
+
const d = i && l && tr.read(l);
|
|
995
|
+
d && c.set(i, d);
|
|
996
|
+
}
|
|
997
|
+
return t;
|
|
998
|
+
}, sr = typeof XMLHttpRequest < "u", or = sr && function(e) {
|
|
999
|
+
return new Promise(function(n, r) {
|
|
1000
|
+
const i = xt(e);
|
|
1001
|
+
let l = i.data;
|
|
1002
|
+
const c = j.from(i.headers).normalize();
|
|
1003
|
+
let { responseType: y, onUploadProgress: w, onDownloadProgress: d } = i, m, S, R, T, b;
|
|
1004
|
+
function E() {
|
|
1005
|
+
T && T(), b && b(), i.cancelToken && i.cancelToken.unsubscribe(m), i.signal && i.signal.removeEventListener("abort", m);
|
|
1006
|
+
}
|
|
1007
|
+
let g = new XMLHttpRequest();
|
|
1008
|
+
g.open(i.method.toUpperCase(), i.url, !0), g.timeout = i.timeout;
|
|
1009
|
+
function h() {
|
|
1010
|
+
if (!g)
|
|
1011
|
+
return;
|
|
1012
|
+
const s = j.from(
|
|
1013
|
+
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1014
|
+
), u = {
|
|
1015
|
+
data: !y || y === "text" || y === "json" ? g.responseText : g.response,
|
|
1016
|
+
status: g.status,
|
|
1017
|
+
statusText: g.statusText,
|
|
1018
|
+
headers: s,
|
|
1019
|
+
config: e,
|
|
1020
|
+
request: g
|
|
1021
|
+
};
|
|
1022
|
+
Rt(function(U) {
|
|
1023
|
+
n(U), E();
|
|
1024
|
+
}, function(U) {
|
|
1025
|
+
r(U), E();
|
|
1026
|
+
}, u), g = null;
|
|
1027
|
+
}
|
|
1028
|
+
"onloadend" in g ? g.onloadend = h : g.onreadystatechange = function() {
|
|
1029
|
+
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(h);
|
|
1030
|
+
}, g.onabort = function() {
|
|
1031
|
+
g && (r(new x("Request aborted", x.ECONNABORTED, e, g)), g = null);
|
|
1032
|
+
}, g.onerror = function() {
|
|
1033
|
+
r(new x("Network Error", x.ERR_NETWORK, e, g)), g = null;
|
|
1034
|
+
}, g.ontimeout = function() {
|
|
1035
|
+
let o = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
|
|
1036
|
+
const u = i.transitional || bt;
|
|
1037
|
+
i.timeoutErrorMessage && (o = i.timeoutErrorMessage), r(new x(
|
|
1038
|
+
o,
|
|
1039
|
+
u.clarifyTimeoutError ? x.ETIMEDOUT : x.ECONNABORTED,
|
|
1040
|
+
e,
|
|
1041
|
+
g
|
|
1042
|
+
)), g = null;
|
|
1043
|
+
}, l === void 0 && c.setContentType(null), "setRequestHeader" in g && p.forEach(c.toJSON(), function(o, u) {
|
|
1044
|
+
g.setRequestHeader(u, o);
|
|
1045
|
+
}), p.isUndefined(i.withCredentials) || (g.withCredentials = !!i.withCredentials), y && y !== "json" && (g.responseType = i.responseType), d && ([R, b] = me(d, !0), g.addEventListener("progress", R)), w && g.upload && ([S, T] = me(w), g.upload.addEventListener("progress", S), g.upload.addEventListener("loadend", T)), (i.cancelToken || i.signal) && (m = (s) => {
|
|
1046
|
+
g && (r(!s || s.type ? new Q(null, e, g) : s), g.abort(), g = null);
|
|
1047
|
+
}, i.cancelToken && i.cancelToken.subscribe(m), i.signal && (i.signal.aborted ? m() : i.signal.addEventListener("abort", m)));
|
|
1048
|
+
const f = Zn(i.url);
|
|
1049
|
+
if (f && P.protocols.indexOf(f) === -1) {
|
|
1050
|
+
r(new x("Unsupported protocol " + f + ":", x.ERR_BAD_REQUEST, e));
|
|
1051
|
+
return;
|
|
1052
|
+
}
|
|
1053
|
+
g.send(l || null);
|
|
1054
|
+
});
|
|
1055
|
+
}, ir = (e, t) => {
|
|
1056
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1057
|
+
if (t || n) {
|
|
1058
|
+
let r = new AbortController(), i;
|
|
1059
|
+
const l = function(d) {
|
|
1060
|
+
if (!i) {
|
|
1061
|
+
i = !0, y();
|
|
1062
|
+
const m = d instanceof Error ? d : this.reason;
|
|
1063
|
+
r.abort(m instanceof x ? m : new Q(m instanceof Error ? m.message : m));
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
let c = t && setTimeout(() => {
|
|
1067
|
+
c = null, l(new x(`timeout ${t} of ms exceeded`, x.ETIMEDOUT));
|
|
1068
|
+
}, t);
|
|
1069
|
+
const y = () => {
|
|
1070
|
+
e && (c && clearTimeout(c), c = null, e.forEach((d) => {
|
|
1071
|
+
d.unsubscribe ? d.unsubscribe(l) : d.removeEventListener("abort", l);
|
|
1072
|
+
}), e = null);
|
|
1073
|
+
};
|
|
1074
|
+
e.forEach((d) => d.addEventListener("abort", l));
|
|
1075
|
+
const { signal: w } = r;
|
|
1076
|
+
return w.unsubscribe = () => p.asap(y), w;
|
|
1077
|
+
}
|
|
1078
|
+
}, ar = function* (e, t) {
|
|
1079
|
+
let n = e.byteLength;
|
|
1080
|
+
if (n < t) {
|
|
1081
|
+
yield e;
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
let r = 0, i;
|
|
1085
|
+
for (; r < n; )
|
|
1086
|
+
i = r + t, yield e.slice(r, i), r = i;
|
|
1087
|
+
}, lr = async function* (e, t) {
|
|
1088
|
+
for await (const n of ur(e))
|
|
1089
|
+
yield* ar(n, t);
|
|
1090
|
+
}, ur = async function* (e) {
|
|
1091
|
+
if (e[Symbol.asyncIterator]) {
|
|
1092
|
+
yield* e;
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
const t = e.getReader();
|
|
1096
|
+
try {
|
|
1097
|
+
for (; ; ) {
|
|
1098
|
+
const { done: n, value: r } = await t.read();
|
|
1099
|
+
if (n)
|
|
1100
|
+
break;
|
|
1101
|
+
yield r;
|
|
1102
|
+
}
|
|
1103
|
+
} finally {
|
|
1104
|
+
await t.cancel();
|
|
1105
|
+
}
|
|
1106
|
+
}, tt = (e, t, n, r) => {
|
|
1107
|
+
const i = lr(e, t);
|
|
1108
|
+
let l = 0, c, y = (w) => {
|
|
1109
|
+
c || (c = !0, r && r(w));
|
|
1110
|
+
};
|
|
1111
|
+
return new ReadableStream({
|
|
1112
|
+
async pull(w) {
|
|
1113
|
+
try {
|
|
1114
|
+
const { done: d, value: m } = await i.next();
|
|
1115
|
+
if (d) {
|
|
1116
|
+
y(), w.close();
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
let S = m.byteLength;
|
|
1120
|
+
if (n) {
|
|
1121
|
+
let R = l += S;
|
|
1122
|
+
n(R);
|
|
1123
|
+
}
|
|
1124
|
+
w.enqueue(new Uint8Array(m));
|
|
1125
|
+
} catch (d) {
|
|
1126
|
+
throw y(d), d;
|
|
1127
|
+
}
|
|
1128
|
+
},
|
|
1129
|
+
cancel(w) {
|
|
1130
|
+
return y(w), i.return();
|
|
1131
|
+
}
|
|
1132
|
+
}, {
|
|
1133
|
+
highWaterMark: 2
|
|
1134
|
+
});
|
|
1135
|
+
}, Ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Tt = Ee && typeof ReadableStream == "function", cr = Ee && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ot = (e, ...t) => {
|
|
1136
|
+
try {
|
|
1137
|
+
return !!e(...t);
|
|
1138
|
+
} catch {
|
|
1139
|
+
return !1;
|
|
1140
|
+
}
|
|
1141
|
+
}, fr = Tt && Ot(() => {
|
|
1142
|
+
let e = !1;
|
|
1143
|
+
const t = new Request(P.origin, {
|
|
1144
|
+
body: new ReadableStream(),
|
|
1145
|
+
method: "POST",
|
|
1146
|
+
get duplex() {
|
|
1147
|
+
return e = !0, "half";
|
|
1148
|
+
}
|
|
1149
|
+
}).headers.has("Content-Type");
|
|
1150
|
+
return e && !t;
|
|
1151
|
+
}), nt = 64 * 1024, Le = Tt && Ot(() => p.isReadableStream(new Response("").body)), ye = {
|
|
1152
|
+
stream: Le && ((e) => e.body)
|
|
1153
|
+
};
|
|
1154
|
+
Ee && ((e) => {
|
|
1155
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1156
|
+
!ye[t] && (ye[t] = p.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1157
|
+
throw new x(`Response type '${t}' is not supported`, x.ERR_NOT_SUPPORT, r);
|
|
1158
|
+
});
|
|
1159
|
+
});
|
|
1160
|
+
})(new Response());
|
|
1161
|
+
const dr = async (e) => {
|
|
1162
|
+
if (e == null)
|
|
1163
|
+
return 0;
|
|
1164
|
+
if (p.isBlob(e))
|
|
1165
|
+
return e.size;
|
|
1166
|
+
if (p.isSpecCompliantForm(e))
|
|
1167
|
+
return (await new Request(P.origin, {
|
|
1168
|
+
method: "POST",
|
|
1169
|
+
body: e
|
|
1170
|
+
}).arrayBuffer()).byteLength;
|
|
1171
|
+
if (p.isArrayBufferView(e) || p.isArrayBuffer(e))
|
|
1172
|
+
return e.byteLength;
|
|
1173
|
+
if (p.isURLSearchParams(e) && (e = e + ""), p.isString(e))
|
|
1174
|
+
return (await cr(e)).byteLength;
|
|
1175
|
+
}, hr = async (e, t) => {
|
|
1176
|
+
const n = p.toFiniteNumber(e.getContentLength());
|
|
1177
|
+
return n ?? dr(t);
|
|
1178
|
+
}, pr = Ee && (async (e) => {
|
|
1179
|
+
let {
|
|
1180
|
+
url: t,
|
|
1181
|
+
method: n,
|
|
1182
|
+
data: r,
|
|
1183
|
+
signal: i,
|
|
1184
|
+
cancelToken: l,
|
|
1185
|
+
timeout: c,
|
|
1186
|
+
onDownloadProgress: y,
|
|
1187
|
+
onUploadProgress: w,
|
|
1188
|
+
responseType: d,
|
|
1189
|
+
headers: m,
|
|
1190
|
+
withCredentials: S = "same-origin",
|
|
1191
|
+
fetchOptions: R
|
|
1192
|
+
} = xt(e);
|
|
1193
|
+
d = d ? (d + "").toLowerCase() : "text";
|
|
1194
|
+
let T = ir([i, l && l.toAbortSignal()], c), b;
|
|
1195
|
+
const E = T && T.unsubscribe && (() => {
|
|
1196
|
+
T.unsubscribe();
|
|
1197
|
+
});
|
|
1198
|
+
let g;
|
|
1199
|
+
try {
|
|
1200
|
+
if (w && fr && n !== "get" && n !== "head" && (g = await hr(m, r)) !== 0) {
|
|
1201
|
+
let u = new Request(t, {
|
|
1202
|
+
method: "POST",
|
|
1203
|
+
body: r,
|
|
1204
|
+
duplex: "half"
|
|
1205
|
+
}), a;
|
|
1206
|
+
if (p.isFormData(r) && (a = u.headers.get("content-type")) && m.setContentType(a), u.body) {
|
|
1207
|
+
const [U, v] = Ye(
|
|
1208
|
+
g,
|
|
1209
|
+
me(Qe(w))
|
|
1210
|
+
);
|
|
1211
|
+
r = tt(u.body, nt, U, v);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
p.isString(S) || (S = S ? "include" : "omit");
|
|
1215
|
+
const h = "credentials" in Request.prototype;
|
|
1216
|
+
b = new Request(t, {
|
|
1217
|
+
...R,
|
|
1218
|
+
signal: T,
|
|
1219
|
+
method: n.toUpperCase(),
|
|
1220
|
+
headers: m.normalize().toJSON(),
|
|
1221
|
+
body: r,
|
|
1222
|
+
duplex: "half",
|
|
1223
|
+
credentials: h ? S : void 0
|
|
1224
|
+
});
|
|
1225
|
+
let f = await fetch(b);
|
|
1226
|
+
const s = Le && (d === "stream" || d === "response");
|
|
1227
|
+
if (Le && (y || s && E)) {
|
|
1228
|
+
const u = {};
|
|
1229
|
+
["status", "statusText", "headers"].forEach((M) => {
|
|
1230
|
+
u[M] = f[M];
|
|
1231
|
+
});
|
|
1232
|
+
const a = p.toFiniteNumber(f.headers.get("content-length")), [U, v] = y && Ye(
|
|
1233
|
+
a,
|
|
1234
|
+
me(Qe(y), !0)
|
|
1235
|
+
) || [];
|
|
1236
|
+
f = new Response(
|
|
1237
|
+
tt(f.body, nt, U, () => {
|
|
1238
|
+
v && v(), E && E();
|
|
1239
|
+
}),
|
|
1240
|
+
u
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
d = d || "text";
|
|
1244
|
+
let o = await ye[p.findKey(ye, d) || "text"](f, e);
|
|
1245
|
+
return !s && E && E(), await new Promise((u, a) => {
|
|
1246
|
+
Rt(u, a, {
|
|
1247
|
+
data: o,
|
|
1248
|
+
headers: j.from(f.headers),
|
|
1249
|
+
status: f.status,
|
|
1250
|
+
statusText: f.statusText,
|
|
1251
|
+
config: e,
|
|
1252
|
+
request: b
|
|
1253
|
+
});
|
|
1254
|
+
});
|
|
1255
|
+
} catch (h) {
|
|
1256
|
+
throw E && E(), h && h.name === "TypeError" && /fetch/i.test(h.message) ? Object.assign(
|
|
1257
|
+
new x("Network Error", x.ERR_NETWORK, e, b),
|
|
1258
|
+
{
|
|
1259
|
+
cause: h.cause || h
|
|
1260
|
+
}
|
|
1261
|
+
) : x.from(h, h && h.code, e, b);
|
|
1262
|
+
}
|
|
1263
|
+
}), Pe = {
|
|
1264
|
+
http: Un,
|
|
1265
|
+
xhr: or,
|
|
1266
|
+
fetch: pr
|
|
1267
|
+
};
|
|
1268
|
+
p.forEach(Pe, (e, t) => {
|
|
1269
|
+
if (e) {
|
|
1270
|
+
try {
|
|
1271
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1272
|
+
} catch {
|
|
1273
|
+
}
|
|
1274
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
const rt = (e) => `- ${e}`, mr = (e) => p.isFunction(e) || e === null || e === !1, Ct = {
|
|
1278
|
+
getAdapter: (e) => {
|
|
1279
|
+
e = p.isArray(e) ? e : [e];
|
|
1280
|
+
const { length: t } = e;
|
|
1281
|
+
let n, r;
|
|
1282
|
+
const i = {};
|
|
1283
|
+
for (let l = 0; l < t; l++) {
|
|
1284
|
+
n = e[l];
|
|
1285
|
+
let c;
|
|
1286
|
+
if (r = n, !mr(n) && (r = Pe[(c = String(n)).toLowerCase()], r === void 0))
|
|
1287
|
+
throw new x(`Unknown adapter '${c}'`);
|
|
1288
|
+
if (r)
|
|
1289
|
+
break;
|
|
1290
|
+
i[c || "#" + l] = r;
|
|
1291
|
+
}
|
|
1292
|
+
if (!r) {
|
|
1293
|
+
const l = Object.entries(i).map(
|
|
1294
|
+
([y, w]) => `adapter ${y} ` + (w === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1295
|
+
);
|
|
1296
|
+
let c = t ? l.length > 1 ? `since :
|
|
1297
|
+
` + l.map(rt).join(`
|
|
1298
|
+
`) : " " + rt(l[0]) : "as no adapter specified";
|
|
1299
|
+
throw new x(
|
|
1300
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1301
|
+
"ERR_NOT_SUPPORT"
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
return r;
|
|
1305
|
+
},
|
|
1306
|
+
adapters: Pe
|
|
1307
|
+
};
|
|
1308
|
+
function _e(e) {
|
|
1309
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1310
|
+
throw new Q(null, e);
|
|
1311
|
+
}
|
|
1312
|
+
function st(e) {
|
|
1313
|
+
return _e(e), e.headers = j.from(e.headers), e.data = Ce.call(
|
|
1314
|
+
e,
|
|
1315
|
+
e.transformRequest
|
|
1316
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ct.getAdapter(e.adapter || ie.adapter)(e).then(function(r) {
|
|
1317
|
+
return _e(e), r.data = Ce.call(
|
|
1318
|
+
e,
|
|
1319
|
+
e.transformResponse,
|
|
1320
|
+
r
|
|
1321
|
+
), r.headers = j.from(r.headers), r;
|
|
1322
|
+
}, function(r) {
|
|
1323
|
+
return Et(r) || (_e(e), r && r.response && (r.response.data = Ce.call(
|
|
1324
|
+
e,
|
|
1325
|
+
e.transformResponse,
|
|
1326
|
+
r.response
|
|
1327
|
+
), r.response.headers = j.from(r.response.headers))), Promise.reject(r);
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
const _t = "1.8.4", Re = {};
|
|
1331
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1332
|
+
Re[e] = function(r) {
|
|
1333
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1334
|
+
};
|
|
1335
|
+
});
|
|
1336
|
+
const ot = {};
|
|
1337
|
+
Re.transitional = function(t, n, r) {
|
|
1338
|
+
function i(l, c) {
|
|
1339
|
+
return "[Axios v" + _t + "] Transitional option '" + l + "'" + c + (r ? ". " + r : "");
|
|
1340
|
+
}
|
|
1341
|
+
return (l, c, y) => {
|
|
1342
|
+
if (t === !1)
|
|
1343
|
+
throw new x(
|
|
1344
|
+
i(c, " has been removed" + (n ? " in " + n : "")),
|
|
1345
|
+
x.ERR_DEPRECATED
|
|
1346
|
+
);
|
|
1347
|
+
return n && !ot[c] && (ot[c] = !0, console.warn(
|
|
1348
|
+
i(
|
|
1349
|
+
c,
|
|
1350
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1351
|
+
)
|
|
1352
|
+
)), t ? t(l, c, y) : !0;
|
|
1353
|
+
};
|
|
1354
|
+
};
|
|
1355
|
+
Re.spelling = function(t) {
|
|
1356
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1357
|
+
};
|
|
1358
|
+
function yr(e, t, n) {
|
|
1359
|
+
if (typeof e != "object")
|
|
1360
|
+
throw new x("options must be an object", x.ERR_BAD_OPTION_VALUE);
|
|
1361
|
+
const r = Object.keys(e);
|
|
1362
|
+
let i = r.length;
|
|
1363
|
+
for (; i-- > 0; ) {
|
|
1364
|
+
const l = r[i], c = t[l];
|
|
1365
|
+
if (c) {
|
|
1366
|
+
const y = e[l], w = y === void 0 || c(y, l, e);
|
|
1367
|
+
if (w !== !0)
|
|
1368
|
+
throw new x("option " + l + " must be " + w, x.ERR_BAD_OPTION_VALUE);
|
|
1369
|
+
continue;
|
|
1370
|
+
}
|
|
1371
|
+
if (n !== !0)
|
|
1372
|
+
throw new x("Unknown option " + l, x.ERR_BAD_OPTION);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
const pe = {
|
|
1376
|
+
assertOptions: yr,
|
|
1377
|
+
validators: Re
|
|
1378
|
+
}, V = pe.validators;
|
|
1379
|
+
let G = class {
|
|
1380
|
+
constructor(t) {
|
|
1381
|
+
this.defaults = t, this.interceptors = {
|
|
1382
|
+
request: new Ge(),
|
|
1383
|
+
response: new Ge()
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Dispatch a request
|
|
1388
|
+
*
|
|
1389
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1390
|
+
* @param {?Object} config
|
|
1391
|
+
*
|
|
1392
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1393
|
+
*/
|
|
1394
|
+
async request(t, n) {
|
|
1395
|
+
try {
|
|
1396
|
+
return await this._request(t, n);
|
|
1397
|
+
} catch (r) {
|
|
1398
|
+
if (r instanceof Error) {
|
|
1399
|
+
let i = {};
|
|
1400
|
+
Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error();
|
|
1401
|
+
const l = i.stack ? i.stack.replace(/^.+\n/, "") : "";
|
|
1402
|
+
try {
|
|
1403
|
+
r.stack ? l && !String(r.stack).endsWith(l.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1404
|
+
` + l) : r.stack = l;
|
|
1405
|
+
} catch {
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
throw r;
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
_request(t, n) {
|
|
1412
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Z(this.defaults, n);
|
|
1413
|
+
const { transitional: r, paramsSerializer: i, headers: l } = n;
|
|
1414
|
+
r !== void 0 && pe.assertOptions(r, {
|
|
1415
|
+
silentJSONParsing: V.transitional(V.boolean),
|
|
1416
|
+
forcedJSONParsing: V.transitional(V.boolean),
|
|
1417
|
+
clarifyTimeoutError: V.transitional(V.boolean)
|
|
1418
|
+
}, !1), i != null && (p.isFunction(i) ? n.paramsSerializer = {
|
|
1419
|
+
serialize: i
|
|
1420
|
+
} : pe.assertOptions(i, {
|
|
1421
|
+
encode: V.function,
|
|
1422
|
+
serialize: V.function
|
|
1423
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), pe.assertOptions(n, {
|
|
1424
|
+
baseUrl: V.spelling("baseURL"),
|
|
1425
|
+
withXsrfToken: V.spelling("withXSRFToken")
|
|
1426
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1427
|
+
let c = l && p.merge(
|
|
1428
|
+
l.common,
|
|
1429
|
+
l[n.method]
|
|
1430
|
+
);
|
|
1431
|
+
l && p.forEach(
|
|
1432
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1433
|
+
(b) => {
|
|
1434
|
+
delete l[b];
|
|
1435
|
+
}
|
|
1436
|
+
), n.headers = j.concat(c, l);
|
|
1437
|
+
const y = [];
|
|
1438
|
+
let w = !0;
|
|
1439
|
+
this.interceptors.request.forEach(function(E) {
|
|
1440
|
+
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (w = w && E.synchronous, y.unshift(E.fulfilled, E.rejected));
|
|
1441
|
+
});
|
|
1442
|
+
const d = [];
|
|
1443
|
+
this.interceptors.response.forEach(function(E) {
|
|
1444
|
+
d.push(E.fulfilled, E.rejected);
|
|
1445
|
+
});
|
|
1446
|
+
let m, S = 0, R;
|
|
1447
|
+
if (!w) {
|
|
1448
|
+
const b = [st.bind(this), void 0];
|
|
1449
|
+
for (b.unshift.apply(b, y), b.push.apply(b, d), R = b.length, m = Promise.resolve(n); S < R; )
|
|
1450
|
+
m = m.then(b[S++], b[S++]);
|
|
1451
|
+
return m;
|
|
1452
|
+
}
|
|
1453
|
+
R = y.length;
|
|
1454
|
+
let T = n;
|
|
1455
|
+
for (S = 0; S < R; ) {
|
|
1456
|
+
const b = y[S++], E = y[S++];
|
|
1457
|
+
try {
|
|
1458
|
+
T = b(T);
|
|
1459
|
+
} catch (g) {
|
|
1460
|
+
E.call(this, g);
|
|
1461
|
+
break;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
try {
|
|
1465
|
+
m = st.call(this, T);
|
|
1466
|
+
} catch (b) {
|
|
1467
|
+
return Promise.reject(b);
|
|
1468
|
+
}
|
|
1469
|
+
for (S = 0, R = d.length; S < R; )
|
|
1470
|
+
m = m.then(d[S++], d[S++]);
|
|
1471
|
+
return m;
|
|
1472
|
+
}
|
|
1473
|
+
getUri(t) {
|
|
1474
|
+
t = Z(this.defaults, t);
|
|
1475
|
+
const n = At(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1476
|
+
return wt(n, t.params, t.paramsSerializer);
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
p.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1480
|
+
G.prototype[t] = function(n, r) {
|
|
1481
|
+
return this.request(Z(r || {}, {
|
|
1482
|
+
method: t,
|
|
1483
|
+
url: n,
|
|
1484
|
+
data: (r || {}).data
|
|
1485
|
+
}));
|
|
1486
|
+
};
|
|
1487
|
+
});
|
|
1488
|
+
p.forEach(["post", "put", "patch"], function(t) {
|
|
1489
|
+
function n(r) {
|
|
1490
|
+
return function(l, c, y) {
|
|
1491
|
+
return this.request(Z(y || {}, {
|
|
1492
|
+
method: t,
|
|
1493
|
+
headers: r ? {
|
|
1494
|
+
"Content-Type": "multipart/form-data"
|
|
1495
|
+
} : {},
|
|
1496
|
+
url: l,
|
|
1497
|
+
data: c
|
|
1498
|
+
}));
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
G.prototype[t] = n(), G.prototype[t + "Form"] = n(!0);
|
|
1502
|
+
});
|
|
1503
|
+
let gr = class Ut {
|
|
1504
|
+
constructor(t) {
|
|
1505
|
+
if (typeof t != "function")
|
|
1506
|
+
throw new TypeError("executor must be a function.");
|
|
1507
|
+
let n;
|
|
1508
|
+
this.promise = new Promise(function(l) {
|
|
1509
|
+
n = l;
|
|
1510
|
+
});
|
|
1511
|
+
const r = this;
|
|
1512
|
+
this.promise.then((i) => {
|
|
1513
|
+
if (!r._listeners) return;
|
|
1514
|
+
let l = r._listeners.length;
|
|
1515
|
+
for (; l-- > 0; )
|
|
1516
|
+
r._listeners[l](i);
|
|
1517
|
+
r._listeners = null;
|
|
1518
|
+
}), this.promise.then = (i) => {
|
|
1519
|
+
let l;
|
|
1520
|
+
const c = new Promise((y) => {
|
|
1521
|
+
r.subscribe(y), l = y;
|
|
1522
|
+
}).then(i);
|
|
1523
|
+
return c.cancel = function() {
|
|
1524
|
+
r.unsubscribe(l);
|
|
1525
|
+
}, c;
|
|
1526
|
+
}, t(function(l, c, y) {
|
|
1527
|
+
r.reason || (r.reason = new Q(l, c, y), n(r.reason));
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1532
|
+
*/
|
|
1533
|
+
throwIfRequested() {
|
|
1534
|
+
if (this.reason)
|
|
1535
|
+
throw this.reason;
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* Subscribe to the cancel signal
|
|
1539
|
+
*/
|
|
1540
|
+
subscribe(t) {
|
|
1541
|
+
if (this.reason) {
|
|
1542
|
+
t(this.reason);
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Unsubscribe from the cancel signal
|
|
1549
|
+
*/
|
|
1550
|
+
unsubscribe(t) {
|
|
1551
|
+
if (!this._listeners)
|
|
1552
|
+
return;
|
|
1553
|
+
const n = this._listeners.indexOf(t);
|
|
1554
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1555
|
+
}
|
|
1556
|
+
toAbortSignal() {
|
|
1557
|
+
const t = new AbortController(), n = (r) => {
|
|
1558
|
+
t.abort(r);
|
|
1559
|
+
};
|
|
1560
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1561
|
+
}
|
|
1562
|
+
/**
|
|
1563
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1564
|
+
* cancels the `CancelToken`.
|
|
1565
|
+
*/
|
|
1566
|
+
static source() {
|
|
1567
|
+
let t;
|
|
1568
|
+
return {
|
|
1569
|
+
token: new Ut(function(i) {
|
|
1570
|
+
t = i;
|
|
1571
|
+
}),
|
|
1572
|
+
cancel: t
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
function wr(e) {
|
|
1577
|
+
return function(n) {
|
|
1578
|
+
return e.apply(null, n);
|
|
1579
|
+
};
|
|
1580
|
+
}
|
|
1581
|
+
function br(e) {
|
|
1582
|
+
return p.isObject(e) && e.isAxiosError === !0;
|
|
1583
|
+
}
|
|
1584
|
+
const Me = {
|
|
1585
|
+
Continue: 100,
|
|
1586
|
+
SwitchingProtocols: 101,
|
|
1587
|
+
Processing: 102,
|
|
1588
|
+
EarlyHints: 103,
|
|
1589
|
+
Ok: 200,
|
|
1590
|
+
Created: 201,
|
|
1591
|
+
Accepted: 202,
|
|
1592
|
+
NonAuthoritativeInformation: 203,
|
|
1593
|
+
NoContent: 204,
|
|
1594
|
+
ResetContent: 205,
|
|
1595
|
+
PartialContent: 206,
|
|
1596
|
+
MultiStatus: 207,
|
|
1597
|
+
AlreadyReported: 208,
|
|
1598
|
+
ImUsed: 226,
|
|
1599
|
+
MultipleChoices: 300,
|
|
1600
|
+
MovedPermanently: 301,
|
|
1601
|
+
Found: 302,
|
|
1602
|
+
SeeOther: 303,
|
|
1603
|
+
NotModified: 304,
|
|
1604
|
+
UseProxy: 305,
|
|
1605
|
+
Unused: 306,
|
|
1606
|
+
TemporaryRedirect: 307,
|
|
1607
|
+
PermanentRedirect: 308,
|
|
1608
|
+
BadRequest: 400,
|
|
1609
|
+
Unauthorized: 401,
|
|
1610
|
+
PaymentRequired: 402,
|
|
1611
|
+
Forbidden: 403,
|
|
1612
|
+
NotFound: 404,
|
|
1613
|
+
MethodNotAllowed: 405,
|
|
1614
|
+
NotAcceptable: 406,
|
|
1615
|
+
ProxyAuthenticationRequired: 407,
|
|
1616
|
+
RequestTimeout: 408,
|
|
1617
|
+
Conflict: 409,
|
|
1618
|
+
Gone: 410,
|
|
1619
|
+
LengthRequired: 411,
|
|
1620
|
+
PreconditionFailed: 412,
|
|
1621
|
+
PayloadTooLarge: 413,
|
|
1622
|
+
UriTooLong: 414,
|
|
1623
|
+
UnsupportedMediaType: 415,
|
|
1624
|
+
RangeNotSatisfiable: 416,
|
|
1625
|
+
ExpectationFailed: 417,
|
|
1626
|
+
ImATeapot: 418,
|
|
1627
|
+
MisdirectedRequest: 421,
|
|
1628
|
+
UnprocessableEntity: 422,
|
|
1629
|
+
Locked: 423,
|
|
1630
|
+
FailedDependency: 424,
|
|
1631
|
+
TooEarly: 425,
|
|
1632
|
+
UpgradeRequired: 426,
|
|
1633
|
+
PreconditionRequired: 428,
|
|
1634
|
+
TooManyRequests: 429,
|
|
1635
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1636
|
+
UnavailableForLegalReasons: 451,
|
|
1637
|
+
InternalServerError: 500,
|
|
1638
|
+
NotImplemented: 501,
|
|
1639
|
+
BadGateway: 502,
|
|
1640
|
+
ServiceUnavailable: 503,
|
|
1641
|
+
GatewayTimeout: 504,
|
|
1642
|
+
HttpVersionNotSupported: 505,
|
|
1643
|
+
VariantAlsoNegotiates: 506,
|
|
1644
|
+
InsufficientStorage: 507,
|
|
1645
|
+
LoopDetected: 508,
|
|
1646
|
+
NotExtended: 510,
|
|
1647
|
+
NetworkAuthenticationRequired: 511
|
|
1648
|
+
};
|
|
1649
|
+
Object.entries(Me).forEach(([e, t]) => {
|
|
1650
|
+
Me[t] = e;
|
|
1651
|
+
});
|
|
1652
|
+
function vt(e) {
|
|
1653
|
+
const t = new G(e), n = at(G.prototype.request, t);
|
|
1654
|
+
return p.extend(n, G.prototype, t, { allOwnKeys: !0 }), p.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(i) {
|
|
1655
|
+
return vt(Z(e, i));
|
|
1656
|
+
}, n;
|
|
1657
|
+
}
|
|
1658
|
+
const B = vt(ie);
|
|
1659
|
+
B.Axios = G;
|
|
1660
|
+
B.CanceledError = Q;
|
|
1661
|
+
B.CancelToken = gr;
|
|
1662
|
+
B.isCancel = Et;
|
|
1663
|
+
B.VERSION = _t;
|
|
1664
|
+
B.toFormData = Se;
|
|
1665
|
+
B.AxiosError = x;
|
|
1666
|
+
B.Cancel = B.CanceledError;
|
|
1667
|
+
B.all = function(t) {
|
|
1668
|
+
return Promise.all(t);
|
|
1669
|
+
};
|
|
1670
|
+
B.spread = wr;
|
|
1671
|
+
B.isAxiosError = br;
|
|
1672
|
+
B.mergeConfig = Z;
|
|
1673
|
+
B.AxiosHeaders = j;
|
|
1674
|
+
B.formToJSON = (e) => St(p.isHTMLForm(e) ? new FormData(e) : e);
|
|
1675
|
+
B.getAdapter = Ct.getAdapter;
|
|
1676
|
+
B.HttpStatusCode = Me;
|
|
1677
|
+
B.default = B;
|
|
1678
|
+
const {
|
|
1679
|
+
Axios: ns,
|
|
1680
|
+
AxiosError: rs,
|
|
1681
|
+
CanceledError: ss,
|
|
1682
|
+
isCancel: os,
|
|
1683
|
+
CancelToken: is,
|
|
1684
|
+
VERSION: as,
|
|
1685
|
+
all: ls,
|
|
1686
|
+
Cancel: us,
|
|
1687
|
+
isAxiosError: cs,
|
|
1688
|
+
spread: fs,
|
|
1689
|
+
toFormData: ds,
|
|
1690
|
+
AxiosHeaders: hs,
|
|
1691
|
+
HttpStatusCode: ps,
|
|
1692
|
+
formToJSON: ms,
|
|
1693
|
+
getAdapter: ys,
|
|
1694
|
+
mergeConfig: gs
|
|
1695
|
+
} = B;
|
|
1696
|
+
var Ue = { exports: {} }, it;
|
|
1697
|
+
function Sr() {
|
|
1698
|
+
return it || (it = 1, function(e, t) {
|
|
1699
|
+
(function(n) {
|
|
1700
|
+
e.exports = n();
|
|
1701
|
+
})(function(n) {
|
|
1702
|
+
var r = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
|
|
1703
|
+
function i(h, f) {
|
|
1704
|
+
var s = h[0], o = h[1], u = h[2], a = h[3];
|
|
1705
|
+
s += (o & u | ~o & a) + f[0] - 680876936 | 0, s = (s << 7 | s >>> 25) + o | 0, a += (s & o | ~s & u) + f[1] - 389564586 | 0, a = (a << 12 | a >>> 20) + s | 0, u += (a & s | ~a & o) + f[2] + 606105819 | 0, u = (u << 17 | u >>> 15) + a | 0, o += (u & a | ~u & s) + f[3] - 1044525330 | 0, o = (o << 22 | o >>> 10) + u | 0, s += (o & u | ~o & a) + f[4] - 176418897 | 0, s = (s << 7 | s >>> 25) + o | 0, a += (s & o | ~s & u) + f[5] + 1200080426 | 0, a = (a << 12 | a >>> 20) + s | 0, u += (a & s | ~a & o) + f[6] - 1473231341 | 0, u = (u << 17 | u >>> 15) + a | 0, o += (u & a | ~u & s) + f[7] - 45705983 | 0, o = (o << 22 | o >>> 10) + u | 0, s += (o & u | ~o & a) + f[8] + 1770035416 | 0, s = (s << 7 | s >>> 25) + o | 0, a += (s & o | ~s & u) + f[9] - 1958414417 | 0, a = (a << 12 | a >>> 20) + s | 0, u += (a & s | ~a & o) + f[10] - 42063 | 0, u = (u << 17 | u >>> 15) + a | 0, o += (u & a | ~u & s) + f[11] - 1990404162 | 0, o = (o << 22 | o >>> 10) + u | 0, s += (o & u | ~o & a) + f[12] + 1804603682 | 0, s = (s << 7 | s >>> 25) + o | 0, a += (s & o | ~s & u) + f[13] - 40341101 | 0, a = (a << 12 | a >>> 20) + s | 0, u += (a & s | ~a & o) + f[14] - 1502002290 | 0, u = (u << 17 | u >>> 15) + a | 0, o += (u & a | ~u & s) + f[15] + 1236535329 | 0, o = (o << 22 | o >>> 10) + u | 0, s += (o & a | u & ~a) + f[1] - 165796510 | 0, s = (s << 5 | s >>> 27) + o | 0, a += (s & u | o & ~u) + f[6] - 1069501632 | 0, a = (a << 9 | a >>> 23) + s | 0, u += (a & o | s & ~o) + f[11] + 643717713 | 0, u = (u << 14 | u >>> 18) + a | 0, o += (u & s | a & ~s) + f[0] - 373897302 | 0, o = (o << 20 | o >>> 12) + u | 0, s += (o & a | u & ~a) + f[5] - 701558691 | 0, s = (s << 5 | s >>> 27) + o | 0, a += (s & u | o & ~u) + f[10] + 38016083 | 0, a = (a << 9 | a >>> 23) + s | 0, u += (a & o | s & ~o) + f[15] - 660478335 | 0, u = (u << 14 | u >>> 18) + a | 0, o += (u & s | a & ~s) + f[4] - 405537848 | 0, o = (o << 20 | o >>> 12) + u | 0, s += (o & a | u & ~a) + f[9] + 568446438 | 0, s = (s << 5 | s >>> 27) + o | 0, a += (s & u | o & ~u) + f[14] - 1019803690 | 0, a = (a << 9 | a >>> 23) + s | 0, u += (a & o | s & ~o) + f[3] - 187363961 | 0, u = (u << 14 | u >>> 18) + a | 0, o += (u & s | a & ~s) + f[8] + 1163531501 | 0, o = (o << 20 | o >>> 12) + u | 0, s += (o & a | u & ~a) + f[13] - 1444681467 | 0, s = (s << 5 | s >>> 27) + o | 0, a += (s & u | o & ~u) + f[2] - 51403784 | 0, a = (a << 9 | a >>> 23) + s | 0, u += (a & o | s & ~o) + f[7] + 1735328473 | 0, u = (u << 14 | u >>> 18) + a | 0, o += (u & s | a & ~s) + f[12] - 1926607734 | 0, o = (o << 20 | o >>> 12) + u | 0, s += (o ^ u ^ a) + f[5] - 378558 | 0, s = (s << 4 | s >>> 28) + o | 0, a += (s ^ o ^ u) + f[8] - 2022574463 | 0, a = (a << 11 | a >>> 21) + s | 0, u += (a ^ s ^ o) + f[11] + 1839030562 | 0, u = (u << 16 | u >>> 16) + a | 0, o += (u ^ a ^ s) + f[14] - 35309556 | 0, o = (o << 23 | o >>> 9) + u | 0, s += (o ^ u ^ a) + f[1] - 1530992060 | 0, s = (s << 4 | s >>> 28) + o | 0, a += (s ^ o ^ u) + f[4] + 1272893353 | 0, a = (a << 11 | a >>> 21) + s | 0, u += (a ^ s ^ o) + f[7] - 155497632 | 0, u = (u << 16 | u >>> 16) + a | 0, o += (u ^ a ^ s) + f[10] - 1094730640 | 0, o = (o << 23 | o >>> 9) + u | 0, s += (o ^ u ^ a) + f[13] + 681279174 | 0, s = (s << 4 | s >>> 28) + o | 0, a += (s ^ o ^ u) + f[0] - 358537222 | 0, a = (a << 11 | a >>> 21) + s | 0, u += (a ^ s ^ o) + f[3] - 722521979 | 0, u = (u << 16 | u >>> 16) + a | 0, o += (u ^ a ^ s) + f[6] + 76029189 | 0, o = (o << 23 | o >>> 9) + u | 0, s += (o ^ u ^ a) + f[9] - 640364487 | 0, s = (s << 4 | s >>> 28) + o | 0, a += (s ^ o ^ u) + f[12] - 421815835 | 0, a = (a << 11 | a >>> 21) + s | 0, u += (a ^ s ^ o) + f[15] + 530742520 | 0, u = (u << 16 | u >>> 16) + a | 0, o += (u ^ a ^ s) + f[2] - 995338651 | 0, o = (o << 23 | o >>> 9) + u | 0, s += (u ^ (o | ~a)) + f[0] - 198630844 | 0, s = (s << 6 | s >>> 26) + o | 0, a += (o ^ (s | ~u)) + f[7] + 1126891415 | 0, a = (a << 10 | a >>> 22) + s | 0, u += (s ^ (a | ~o)) + f[14] - 1416354905 | 0, u = (u << 15 | u >>> 17) + a | 0, o += (a ^ (u | ~s)) + f[5] - 57434055 | 0, o = (o << 21 | o >>> 11) + u | 0, s += (u ^ (o | ~a)) + f[12] + 1700485571 | 0, s = (s << 6 | s >>> 26) + o | 0, a += (o ^ (s | ~u)) + f[3] - 1894986606 | 0, a = (a << 10 | a >>> 22) + s | 0, u += (s ^ (a | ~o)) + f[10] - 1051523 | 0, u = (u << 15 | u >>> 17) + a | 0, o += (a ^ (u | ~s)) + f[1] - 2054922799 | 0, o = (o << 21 | o >>> 11) + u | 0, s += (u ^ (o | ~a)) + f[8] + 1873313359 | 0, s = (s << 6 | s >>> 26) + o | 0, a += (o ^ (s | ~u)) + f[15] - 30611744 | 0, a = (a << 10 | a >>> 22) + s | 0, u += (s ^ (a | ~o)) + f[6] - 1560198380 | 0, u = (u << 15 | u >>> 17) + a | 0, o += (a ^ (u | ~s)) + f[13] + 1309151649 | 0, o = (o << 21 | o >>> 11) + u | 0, s += (u ^ (o | ~a)) + f[4] - 145523070 | 0, s = (s << 6 | s >>> 26) + o | 0, a += (o ^ (s | ~u)) + f[11] - 1120210379 | 0, a = (a << 10 | a >>> 22) + s | 0, u += (s ^ (a | ~o)) + f[2] + 718787259 | 0, u = (u << 15 | u >>> 17) + a | 0, o += (a ^ (u | ~s)) + f[9] - 343485551 | 0, o = (o << 21 | o >>> 11) + u | 0, h[0] = s + h[0] | 0, h[1] = o + h[1] | 0, h[2] = u + h[2] | 0, h[3] = a + h[3] | 0;
|
|
1706
|
+
}
|
|
1707
|
+
function l(h) {
|
|
1708
|
+
var f = [], s;
|
|
1709
|
+
for (s = 0; s < 64; s += 4)
|
|
1710
|
+
f[s >> 2] = h.charCodeAt(s) + (h.charCodeAt(s + 1) << 8) + (h.charCodeAt(s + 2) << 16) + (h.charCodeAt(s + 3) << 24);
|
|
1711
|
+
return f;
|
|
1712
|
+
}
|
|
1713
|
+
function c(h) {
|
|
1714
|
+
var f = [], s;
|
|
1715
|
+
for (s = 0; s < 64; s += 4)
|
|
1716
|
+
f[s >> 2] = h[s] + (h[s + 1] << 8) + (h[s + 2] << 16) + (h[s + 3] << 24);
|
|
1717
|
+
return f;
|
|
1718
|
+
}
|
|
1719
|
+
function y(h) {
|
|
1720
|
+
var f = h.length, s = [1732584193, -271733879, -1732584194, 271733878], o, u, a, U, v, M;
|
|
1721
|
+
for (o = 64; o <= f; o += 64)
|
|
1722
|
+
i(s, l(h.substring(o - 64, o)));
|
|
1723
|
+
for (h = h.substring(o - 64), u = h.length, a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < u; o += 1)
|
|
1724
|
+
a[o >> 2] |= h.charCodeAt(o) << (o % 4 << 3);
|
|
1725
|
+
if (a[o >> 2] |= 128 << (o % 4 << 3), o > 55)
|
|
1726
|
+
for (i(s, a), o = 0; o < 16; o += 1)
|
|
1727
|
+
a[o] = 0;
|
|
1728
|
+
return U = f * 8, U = U.toString(16).match(/(.*?)(.{0,8})$/), v = parseInt(U[2], 16), M = parseInt(U[1], 16) || 0, a[14] = v, a[15] = M, i(s, a), s;
|
|
1729
|
+
}
|
|
1730
|
+
function w(h) {
|
|
1731
|
+
var f = h.length, s = [1732584193, -271733879, -1732584194, 271733878], o, u, a, U, v, M;
|
|
1732
|
+
for (o = 64; o <= f; o += 64)
|
|
1733
|
+
i(s, c(h.subarray(o - 64, o)));
|
|
1734
|
+
for (h = o - 64 < f ? h.subarray(o - 64) : new Uint8Array(0), u = h.length, a = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < u; o += 1)
|
|
1735
|
+
a[o >> 2] |= h[o] << (o % 4 << 3);
|
|
1736
|
+
if (a[o >> 2] |= 128 << (o % 4 << 3), o > 55)
|
|
1737
|
+
for (i(s, a), o = 0; o < 16; o += 1)
|
|
1738
|
+
a[o] = 0;
|
|
1739
|
+
return U = f * 8, U = U.toString(16).match(/(.*?)(.{0,8})$/), v = parseInt(U[2], 16), M = parseInt(U[1], 16) || 0, a[14] = v, a[15] = M, i(s, a), s;
|
|
1740
|
+
}
|
|
1741
|
+
function d(h) {
|
|
1742
|
+
var f = "", s;
|
|
1743
|
+
for (s = 0; s < 4; s += 1)
|
|
1744
|
+
f += r[h >> s * 8 + 4 & 15] + r[h >> s * 8 & 15];
|
|
1745
|
+
return f;
|
|
1746
|
+
}
|
|
1747
|
+
function m(h) {
|
|
1748
|
+
var f;
|
|
1749
|
+
for (f = 0; f < h.length; f += 1)
|
|
1750
|
+
h[f] = d(h[f]);
|
|
1751
|
+
return h.join("");
|
|
1752
|
+
}
|
|
1753
|
+
m(y("hello")), typeof ArrayBuffer < "u" && !ArrayBuffer.prototype.slice && function() {
|
|
1754
|
+
function h(f, s) {
|
|
1755
|
+
return f = f | 0 || 0, f < 0 ? Math.max(f + s, 0) : Math.min(f, s);
|
|
1756
|
+
}
|
|
1757
|
+
ArrayBuffer.prototype.slice = function(f, s) {
|
|
1758
|
+
var o = this.byteLength, u = h(f, o), a = o, U, v, M, ee;
|
|
1759
|
+
return s !== n && (a = h(s, o)), u > a ? new ArrayBuffer(0) : (U = a - u, v = new ArrayBuffer(U), M = new Uint8Array(v), ee = new Uint8Array(this, u, U), M.set(ee), v);
|
|
1760
|
+
};
|
|
1761
|
+
}();
|
|
1762
|
+
function S(h) {
|
|
1763
|
+
return /[\u0080-\uFFFF]/.test(h) && (h = unescape(encodeURIComponent(h))), h;
|
|
1764
|
+
}
|
|
1765
|
+
function R(h, f) {
|
|
1766
|
+
var s = h.length, o = new ArrayBuffer(s), u = new Uint8Array(o), a;
|
|
1767
|
+
for (a = 0; a < s; a += 1)
|
|
1768
|
+
u[a] = h.charCodeAt(a);
|
|
1769
|
+
return f ? u : o;
|
|
1770
|
+
}
|
|
1771
|
+
function T(h) {
|
|
1772
|
+
return String.fromCharCode.apply(null, new Uint8Array(h));
|
|
1773
|
+
}
|
|
1774
|
+
function b(h, f, s) {
|
|
1775
|
+
var o = new Uint8Array(h.byteLength + f.byteLength);
|
|
1776
|
+
return o.set(new Uint8Array(h)), o.set(new Uint8Array(f), h.byteLength), o;
|
|
1777
|
+
}
|
|
1778
|
+
function E(h) {
|
|
1779
|
+
var f = [], s = h.length, o;
|
|
1780
|
+
for (o = 0; o < s - 1; o += 2)
|
|
1781
|
+
f.push(parseInt(h.substr(o, 2), 16));
|
|
1782
|
+
return String.fromCharCode.apply(String, f);
|
|
1783
|
+
}
|
|
1784
|
+
function g() {
|
|
1785
|
+
this.reset();
|
|
1786
|
+
}
|
|
1787
|
+
return g.prototype.append = function(h) {
|
|
1788
|
+
return this.appendBinary(S(h)), this;
|
|
1789
|
+
}, g.prototype.appendBinary = function(h) {
|
|
1790
|
+
this._buff += h, this._length += h.length;
|
|
1791
|
+
var f = this._buff.length, s;
|
|
1792
|
+
for (s = 64; s <= f; s += 64)
|
|
1793
|
+
i(this._hash, l(this._buff.substring(s - 64, s)));
|
|
1794
|
+
return this._buff = this._buff.substring(s - 64), this;
|
|
1795
|
+
}, g.prototype.end = function(h) {
|
|
1796
|
+
var f = this._buff, s = f.length, o, u = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], a;
|
|
1797
|
+
for (o = 0; o < s; o += 1)
|
|
1798
|
+
u[o >> 2] |= f.charCodeAt(o) << (o % 4 << 3);
|
|
1799
|
+
return this._finish(u, s), a = m(this._hash), h && (a = E(a)), this.reset(), a;
|
|
1800
|
+
}, g.prototype.reset = function() {
|
|
1801
|
+
return this._buff = "", this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
|
|
1802
|
+
}, g.prototype.getState = function() {
|
|
1803
|
+
return {
|
|
1804
|
+
buff: this._buff,
|
|
1805
|
+
length: this._length,
|
|
1806
|
+
hash: this._hash.slice()
|
|
1807
|
+
};
|
|
1808
|
+
}, g.prototype.setState = function(h) {
|
|
1809
|
+
return this._buff = h.buff, this._length = h.length, this._hash = h.hash, this;
|
|
1810
|
+
}, g.prototype.destroy = function() {
|
|
1811
|
+
delete this._hash, delete this._buff, delete this._length;
|
|
1812
|
+
}, g.prototype._finish = function(h, f) {
|
|
1813
|
+
var s = f, o, u, a;
|
|
1814
|
+
if (h[s >> 2] |= 128 << (s % 4 << 3), s > 55)
|
|
1815
|
+
for (i(this._hash, h), s = 0; s < 16; s += 1)
|
|
1816
|
+
h[s] = 0;
|
|
1817
|
+
o = this._length * 8, o = o.toString(16).match(/(.*?)(.{0,8})$/), u = parseInt(o[2], 16), a = parseInt(o[1], 16) || 0, h[14] = u, h[15] = a, i(this._hash, h);
|
|
1818
|
+
}, g.hash = function(h, f) {
|
|
1819
|
+
return g.hashBinary(S(h), f);
|
|
1820
|
+
}, g.hashBinary = function(h, f) {
|
|
1821
|
+
var s = y(h), o = m(s);
|
|
1822
|
+
return f ? E(o) : o;
|
|
1823
|
+
}, g.ArrayBuffer = function() {
|
|
1824
|
+
this.reset();
|
|
1825
|
+
}, g.ArrayBuffer.prototype.append = function(h) {
|
|
1826
|
+
var f = b(this._buff.buffer, h), s = f.length, o;
|
|
1827
|
+
for (this._length += h.byteLength, o = 64; o <= s; o += 64)
|
|
1828
|
+
i(this._hash, c(f.subarray(o - 64, o)));
|
|
1829
|
+
return this._buff = o - 64 < s ? new Uint8Array(f.buffer.slice(o - 64)) : new Uint8Array(0), this;
|
|
1830
|
+
}, g.ArrayBuffer.prototype.end = function(h) {
|
|
1831
|
+
var f = this._buff, s = f.length, o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], u, a;
|
|
1832
|
+
for (u = 0; u < s; u += 1)
|
|
1833
|
+
o[u >> 2] |= f[u] << (u % 4 << 3);
|
|
1834
|
+
return this._finish(o, s), a = m(this._hash), h && (a = E(a)), this.reset(), a;
|
|
1835
|
+
}, g.ArrayBuffer.prototype.reset = function() {
|
|
1836
|
+
return this._buff = new Uint8Array(0), this._length = 0, this._hash = [1732584193, -271733879, -1732584194, 271733878], this;
|
|
1837
|
+
}, g.ArrayBuffer.prototype.getState = function() {
|
|
1838
|
+
var h = g.prototype.getState.call(this);
|
|
1839
|
+
return h.buff = T(h.buff), h;
|
|
1840
|
+
}, g.ArrayBuffer.prototype.setState = function(h) {
|
|
1841
|
+
return h.buff = R(h.buff, !0), g.prototype.setState.call(this, h);
|
|
1842
|
+
}, g.ArrayBuffer.prototype.destroy = g.prototype.destroy, g.ArrayBuffer.prototype._finish = g.prototype._finish, g.ArrayBuffer.hash = function(h, f) {
|
|
1843
|
+
var s = w(new Uint8Array(h)), o = m(s);
|
|
1844
|
+
return f ? E(o) : o;
|
|
1845
|
+
}, g;
|
|
1846
|
+
});
|
|
1847
|
+
}(Ue)), Ue.exports;
|
|
1848
|
+
}
|
|
1849
|
+
var Er = Sr();
|
|
1850
|
+
const Rr = /* @__PURE__ */ kt(Er);
|
|
1851
|
+
function Ar(e) {
|
|
1852
|
+
const t = e.indexOf("base64,");
|
|
1853
|
+
return t < 0 ? -1 : (e.substr(t + 6).length * 0.75).toFixed(2);
|
|
1854
|
+
}
|
|
1855
|
+
function xr(e, t, n) {
|
|
1856
|
+
let r = atob(e), i = r.length, l = new Uint8Array(i);
|
|
1857
|
+
for (; i--; )
|
|
1858
|
+
l[i] = r.charCodeAt(i);
|
|
1859
|
+
return new File([l], t, {
|
|
1860
|
+
type: n
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
function De(e, t, n, r, i = 0, l = null, c = null) {
|
|
1864
|
+
let y = new Image();
|
|
1865
|
+
y.src = e, y.onload = function() {
|
|
1866
|
+
const w = this;
|
|
1867
|
+
let d = w.width * ((t == null ? void 0 : t.ratio) || 1), m = w.height * ((t == null ? void 0 : t.ratio) || 1), S = d / m;
|
|
1868
|
+
d = t.width || d, m = t.height && t.height * (d / S) || m;
|
|
1869
|
+
let R = document.createElement("canvas"), T = R.getContext("2d");
|
|
1870
|
+
R.width = d, R.height = m, T.drawImage(w, 0, 0, d, m);
|
|
1871
|
+
let b = 0.9;
|
|
1872
|
+
t.quality && t.quality > 0 && t.quality <= 1 && (b = t.quality);
|
|
1873
|
+
let E = R.toDataURL("image/jpeg", b), g = Ar(E);
|
|
1874
|
+
if (console.log(g), i <= l) {
|
|
1875
|
+
c === null && (c = b);
|
|
1876
|
+
const h = [], f = 0.01;
|
|
1877
|
+
for (let o = f; o <= c; o += f)
|
|
1878
|
+
h.push(parseFloat(o));
|
|
1879
|
+
l === null && (l = h.length);
|
|
1880
|
+
const s = Math.floor((i + l) / 2);
|
|
1881
|
+
g > n ? De(
|
|
1882
|
+
e,
|
|
1883
|
+
{
|
|
1884
|
+
quality: h[s],
|
|
1885
|
+
// 设置宽高压缩率对图像进行宽高压缩,降低图像被压缩后出现彩虹斑的情况
|
|
1886
|
+
ratio: 0.5
|
|
1887
|
+
},
|
|
1888
|
+
n,
|
|
1889
|
+
r,
|
|
1890
|
+
i,
|
|
1891
|
+
s - 1,
|
|
1892
|
+
c
|
|
1893
|
+
) : De(
|
|
1894
|
+
e,
|
|
1895
|
+
{
|
|
1896
|
+
quality: h[s],
|
|
1897
|
+
// 设置宽高压缩率对图像进行宽高压缩,降低图像被压缩后出现彩虹斑的情况
|
|
1898
|
+
ratio: 1
|
|
1899
|
+
},
|
|
1900
|
+
n,
|
|
1901
|
+
r,
|
|
1902
|
+
s + 1,
|
|
1903
|
+
l,
|
|
1904
|
+
c
|
|
1905
|
+
);
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
r && r(xr(E.split(",")[1], "compress.jpg", "image/jpeg"));
|
|
1909
|
+
};
|
|
1910
|
+
}
|
|
1911
|
+
function Tr(e, t, n = { fileType: [], requireMd5: !1, request: null, signatureUrl: "", addFileMd5Url: "", queryFileMd5Url: "" }) {
|
|
1912
|
+
let r = 1;
|
|
1913
|
+
const i = async function(d) {
|
|
1914
|
+
let m = d.url;
|
|
1915
|
+
if (d.objUrl)
|
|
1916
|
+
return d.objUrl;
|
|
1917
|
+
if (!d.loading)
|
|
1918
|
+
return d.loading = !0, await B({
|
|
1919
|
+
method: "GET",
|
|
1920
|
+
url: m,
|
|
1921
|
+
responseType: "blob",
|
|
1922
|
+
onDownloadProgress: (S) => {
|
|
1923
|
+
let R = S.total > 0 ? S.loaded / S.total * 100 : 0;
|
|
1924
|
+
d.loadingPercent = isNaN(R) ? 0 : R;
|
|
1925
|
+
}
|
|
1926
|
+
}).then((S) => {
|
|
1927
|
+
const { data: R, headers: T } = S;
|
|
1928
|
+
d.objUrl = URL.createObjectURL(R);
|
|
1929
|
+
let b = new Image();
|
|
1930
|
+
b.src = d.objUrl, b.onload = () => {
|
|
1931
|
+
d.width = b.width, d.height = b.height, d.viewBox = [0, 0, d.width, d.height], d.matrix = [[1, 0], [0, 1], [0, 0]], d.loading = !1;
|
|
1932
|
+
};
|
|
1933
|
+
}).catch(() => {
|
|
1934
|
+
d.loading = !1;
|
|
1935
|
+
});
|
|
1936
|
+
}, l = async function(d) {
|
|
1937
|
+
return await n.request({
|
|
1938
|
+
method: "GET",
|
|
1939
|
+
url: `${n.signatureUrl}${d}`
|
|
1940
|
+
});
|
|
1941
|
+
}, c = async function(d) {
|
|
1942
|
+
return await n.request({
|
|
1943
|
+
method: "POST",
|
|
1944
|
+
url: `${n.addFileMd5Url}`,
|
|
1945
|
+
data: d
|
|
1946
|
+
});
|
|
1947
|
+
}, y = async function(d) {
|
|
1948
|
+
return await n.request({
|
|
1949
|
+
method: "GET",
|
|
1950
|
+
url: `${n.queryFileMd5Url}`,
|
|
1951
|
+
params: d
|
|
1952
|
+
});
|
|
1953
|
+
};
|
|
1954
|
+
let w = Lt({
|
|
1955
|
+
fileList: t || [],
|
|
1956
|
+
// 采用v-model绑定
|
|
1957
|
+
onHttpRequest: async (d) => {
|
|
1958
|
+
const { action: m, file: S, onProgress: R, onSuccess: T, onError: b } = d;
|
|
1959
|
+
let E = await l(S.name);
|
|
1960
|
+
if (E.code !== 200)
|
|
1961
|
+
throw new Error("Get signature error");
|
|
1962
|
+
const g = E.data, { accessid: h, policy: f, signature: s, dir: o, host: u } = g;
|
|
1963
|
+
let a = new FormData();
|
|
1964
|
+
return a.append("key", o), a.append("policy", f), a.append("OSSAccessKeyId", h), a.append("success_action_status", "200"), a.append("signature", s), a.append("file", S), await B.create({
|
|
1965
|
+
onUploadProgress: (v) => {
|
|
1966
|
+
v.percent = v.total > 0 ? v.loaded / v.total * 100 : 0, R(v);
|
|
1967
|
+
}
|
|
1968
|
+
}).post(u, a, {
|
|
1969
|
+
headers: {
|
|
1970
|
+
"Content-Type": "multipart/form-data"
|
|
1971
|
+
}
|
|
1972
|
+
}).then((v) => ({ code: 200, fileName: u + o }));
|
|
1973
|
+
},
|
|
1974
|
+
/* 上传文件之前的钩子,参数为上传的文件, 若返回false或者返回 Promise 且被 reject,则停止上传。 */
|
|
1975
|
+
onBeforeUpload: (d) => new Promise((m, S) => {
|
|
1976
|
+
let R = new Promise((T) => {
|
|
1977
|
+
T(!0);
|
|
1978
|
+
});
|
|
1979
|
+
R = R.then((T) => new Promise((b) => {
|
|
1980
|
+
w.md5({ raw: d }).then((E) => {
|
|
1981
|
+
b(E);
|
|
1982
|
+
});
|
|
1983
|
+
})), n.requireMd5 && (R = R.then((T) => y({ mdaValue: T }).then((b) => {
|
|
1984
|
+
if (b.rows.length) {
|
|
1985
|
+
let E = { name: b.rows[0].filePath, url: b.rows[0].filePath };
|
|
1986
|
+
throw E.uid = E.uid || r++, E.status = "success", w.fileList.push(E), w.fileList.map((g) => {
|
|
1987
|
+
i(g);
|
|
1988
|
+
}), new Error("文件已存在");
|
|
1989
|
+
} else
|
|
1990
|
+
return d.md5 = T, !0;
|
|
1991
|
+
}))), R = R.then((T) => /^image\/\w+/.test(d.type) ? new Promise((b, E) => {
|
|
1992
|
+
De(URL.createObjectURL(d), {}, 1 * 1024 * 1024, (g) => {
|
|
1993
|
+
let h = w.fileList.filter((f) => f.raw && f.raw == d)[0];
|
|
1994
|
+
h ? (g.md5 = h.raw.md5 || null, h.raw = g, b(h.raw)) : E();
|
|
1995
|
+
});
|
|
1996
|
+
}) : !0), R.then((T) => {
|
|
1997
|
+
m(T);
|
|
1998
|
+
}).catch((T) => {
|
|
1999
|
+
S(!1);
|
|
2000
|
+
});
|
|
2001
|
+
}),
|
|
2002
|
+
/* 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用 */
|
|
2003
|
+
onChange: (d, m) => {
|
|
2004
|
+
if (console.log("onChange:" + d.status), d.status == "ready") {
|
|
2005
|
+
if (n.fileType && n.fileType.length > 0 && n.fileType.indexOf(d.name.split(".").pop().toLocaleLowerCase()) == -1)
|
|
2006
|
+
throw m.splice(m.indexOf(d), 1), ve.error(`文件格式不正确, 请上传${n.fileType.join("/")}格式文件!`), new Error("文件格式不正确");
|
|
2007
|
+
d.uid = d.uid || r++;
|
|
2008
|
+
} else d.status == "success" && (d.url = d.response.fileName, i(d), n.requireMd5 && c({ filePath: d.url, mdaValue: d.raw.md5 }));
|
|
2009
|
+
},
|
|
2010
|
+
init: function(d) {
|
|
2011
|
+
d = d || "", w.fileList = (Array.isArray(d) ? d : d.length ? d.split(",") : []).map((m) => (typeof m == "string" && (m = { name: m, url: m }), m.uid = m.uid || (/* @__PURE__ */ new Date()).getTime() + r++, m.status = "success", m)), w.fileList.map((m) => {
|
|
2012
|
+
i(m);
|
|
2013
|
+
});
|
|
2014
|
+
},
|
|
2015
|
+
md5(d) {
|
|
2016
|
+
return new Promise((m, S) => {
|
|
2017
|
+
const R = d.raw, b = Math.ceil(R.size / 10), E = new FileReader(), g = new Rr();
|
|
2018
|
+
let h = 0;
|
|
2019
|
+
const f = () => {
|
|
2020
|
+
const s = R.slice(h, h + b);
|
|
2021
|
+
E.readAsBinaryString(s);
|
|
2022
|
+
};
|
|
2023
|
+
E.onload = (s) => {
|
|
2024
|
+
g.appendBinary(s.target.result), h < R.size ? (h += b, f()) : m(g.end());
|
|
2025
|
+
}, f();
|
|
2026
|
+
});
|
|
2027
|
+
},
|
|
2028
|
+
previewDownload: (d) => {
|
|
2029
|
+
let m = document.createElement("a");
|
|
2030
|
+
m.download = d.name, m.href = d.url, m.click(), window.URL.revokeObjectURL(m.href);
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
return w.init(e), [
|
|
2034
|
+
w
|
|
2035
|
+
];
|
|
2036
|
+
}
|
|
2037
|
+
const Or = { class: "component-upload-image" }, Cr = { style: { display: "flex", width: "100%" } }, _r = {
|
|
2038
|
+
key: 0,
|
|
2039
|
+
class: "relative rounded overflow-hidden flex justify-center items-center",
|
|
2040
|
+
style: { width: "120px", height: "96px", "margin-top": "8px" }
|
|
2041
|
+
}, Ur = {
|
|
2042
|
+
key: 0,
|
|
2043
|
+
class: "absolute"
|
|
2044
|
+
}, vr = {
|
|
2045
|
+
key: 1,
|
|
2046
|
+
class: "absolute"
|
|
2047
|
+
}, Br = ["onClick"], Fr = { class: "relative overflow-hidden flex flex-col justify-center items-center w-full h-full select-none outline-none" }, Nr = ["src"], Lr = ["viewBox"], Pr = ["transform"], Mr = ["xlink:href", "width", "height"], Dr = { class: "photo-operations" }, qr = { class: "absolute top-0 right-0 w-full flex justify-end gap-1" }, jr = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Ir = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, kr = { class: "absolute bottom-0 w-full flex justify-center gap-1" }, zr = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, Hr = { class: "opacity-[0.7] hover:opacity-[1] rounded-1/2" }, $r = {
|
|
2048
|
+
key: 0,
|
|
2049
|
+
class: "el-upload__tip"
|
|
2050
|
+
}, Vr = { style: { color: "#f56c6c" } }, Jr = { style: { color: "#f56c6c" } }, Wr = ["src"], Kr = {
|
|
2051
|
+
__name: "index",
|
|
2052
|
+
props: {
|
|
2053
|
+
modelValue: [String, Object, Array],
|
|
2054
|
+
multipleSelect: {
|
|
2055
|
+
type: Boolean,
|
|
2056
|
+
default: !0
|
|
2057
|
+
},
|
|
2058
|
+
// 图片数量限制
|
|
2059
|
+
limit: {
|
|
2060
|
+
type: Number,
|
|
2061
|
+
default: 5
|
|
2062
|
+
},
|
|
2063
|
+
// 大小限制(MB)
|
|
2064
|
+
fileMaxSize: {
|
|
2065
|
+
type: Number,
|
|
2066
|
+
default: 5
|
|
2067
|
+
},
|
|
2068
|
+
// 文件类型, 例如['png', 'jpg', 'jpeg', "raw", "tiff", "jfif"]
|
|
2069
|
+
fileType: {
|
|
2070
|
+
type: Array,
|
|
2071
|
+
default: () => ["png", "jpg", "jpeg", "raw", "tiff", "jfif"]
|
|
2072
|
+
},
|
|
2073
|
+
// 是否显示提示
|
|
2074
|
+
isShowTip: {
|
|
2075
|
+
type: Boolean,
|
|
2076
|
+
default: !0
|
|
2077
|
+
},
|
|
2078
|
+
// 拖入回调
|
|
2079
|
+
onDrop: {
|
|
2080
|
+
default: (e) => {
|
|
2081
|
+
}
|
|
2082
|
+
},
|
|
2083
|
+
// 拖入回调
|
|
2084
|
+
onBackPool: {
|
|
2085
|
+
default: (e) => {
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
// 默认背景图
|
|
2089
|
+
defaultBg: String,
|
|
2090
|
+
// 是否禁用
|
|
2091
|
+
disabled: {
|
|
2092
|
+
default: !1
|
|
2093
|
+
},
|
|
2094
|
+
// 图片列表项尺寸
|
|
2095
|
+
size: {
|
|
2096
|
+
default: () => ({
|
|
2097
|
+
width: "148px",
|
|
2098
|
+
height: "148px"
|
|
2099
|
+
})
|
|
2100
|
+
},
|
|
2101
|
+
view: {
|
|
2102
|
+
type: String,
|
|
2103
|
+
default: null
|
|
2104
|
+
},
|
|
2105
|
+
operations: {
|
|
2106
|
+
default: () => ({
|
|
2107
|
+
back: !1,
|
|
2108
|
+
close: !1,
|
|
2109
|
+
rotateLeft: !1,
|
|
2110
|
+
rotateRight: !1
|
|
2111
|
+
})
|
|
2112
|
+
},
|
|
2113
|
+
md5: {
|
|
2114
|
+
type: Object,
|
|
2115
|
+
default: () => ({
|
|
2116
|
+
requireMd5: !1,
|
|
2117
|
+
addFileMd5Url: "",
|
|
2118
|
+
queryFileMd5Url: ""
|
|
2119
|
+
})
|
|
2120
|
+
},
|
|
2121
|
+
oss: {
|
|
2122
|
+
type: Object,
|
|
2123
|
+
default: () => ({
|
|
2124
|
+
signatureUrl: ""
|
|
2125
|
+
})
|
|
2126
|
+
}
|
|
2127
|
+
},
|
|
2128
|
+
setup(e, { expose: t, emit: n }) {
|
|
2129
|
+
const r = e, i = Pt(), l = n;
|
|
2130
|
+
K(0), K([]);
|
|
2131
|
+
const c = K(""), y = K(!1), w = K([]), d = Mt(
|
|
2132
|
+
() => r.isShowTip && (r.fileType || r.fileMaxSize)
|
|
2133
|
+
), m = Dt("request"), [S] = Tr("", w, {
|
|
2134
|
+
request: m,
|
|
2135
|
+
fileType: r.fileType,
|
|
2136
|
+
signatureUrl: r.oss.signatureUrl,
|
|
2137
|
+
requireMd5: r.md5.requireMd5,
|
|
2138
|
+
addFileMd5Url: r.md5.addFileMd5Url,
|
|
2139
|
+
queryFileMd5Url: r.md5.queryFileMd5Url
|
|
2140
|
+
}), R = K(!1), T = K([]), b = () => {
|
|
2141
|
+
R.value = !1;
|
|
2142
|
+
};
|
|
2143
|
+
function E() {
|
|
2144
|
+
ve.error(`上传文件数量不能超过 ${r.limit} 个!`);
|
|
2145
|
+
}
|
|
2146
|
+
function g() {
|
|
2147
|
+
ve.error("上传图片失败");
|
|
2148
|
+
}
|
|
2149
|
+
function h(A, _) {
|
|
2150
|
+
let F = "";
|
|
2151
|
+
_ = _ || ",";
|
|
2152
|
+
for (let N in A)
|
|
2153
|
+
A[N].url !== void 0 && A[N].url.indexOf("blob:") !== 0 && (F += A[N].url + _);
|
|
2154
|
+
return F != "" ? F.substr(0, F.length - 1) : "";
|
|
2155
|
+
}
|
|
2156
|
+
function f(A) {
|
|
2157
|
+
console.log("enter"), A.preventDefault();
|
|
2158
|
+
}
|
|
2159
|
+
function s(A) {
|
|
2160
|
+
console.log("over"), A.preventDefault(), setTimeout(() => {
|
|
2161
|
+
A.target.classList.add("over");
|
|
2162
|
+
}, 0);
|
|
2163
|
+
}
|
|
2164
|
+
function o(A) {
|
|
2165
|
+
console.log("drop"), A.preventDefault(), r.onDrop && r.onDrop(A);
|
|
2166
|
+
}
|
|
2167
|
+
function u(A) {
|
|
2168
|
+
r.onBackPool && r.onBackPool(A);
|
|
2169
|
+
}
|
|
2170
|
+
function a(A) {
|
|
2171
|
+
ke(A);
|
|
2172
|
+
}
|
|
2173
|
+
function U(A) {
|
|
2174
|
+
T.value = [], T.value.push({ src: A.url, desc: "" }), R.value = !0;
|
|
2175
|
+
}
|
|
2176
|
+
function v(A, _) {
|
|
2177
|
+
let F = [];
|
|
2178
|
+
for (let N = 0; N < A.length; N++) {
|
|
2179
|
+
F[N] = [];
|
|
2180
|
+
for (let C = 0; C < _[0].length; C++) {
|
|
2181
|
+
let J = 0;
|
|
2182
|
+
for (let L = 0; L < A[0].length; L++)
|
|
2183
|
+
J += A[N][L] * _[L][C];
|
|
2184
|
+
F[N][C] = J;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
return F;
|
|
2188
|
+
}
|
|
2189
|
+
function M(A, _) {
|
|
2190
|
+
let F = A.hd = A.hd || 0, N = A.vd = A.vd || 0, C = A.deg = A.deg || 0, J = A.viewBox, L = A.matrix;
|
|
2191
|
+
if (_ == "rotateleft") {
|
|
2192
|
+
C += 90;
|
|
2193
|
+
let O = [
|
|
2194
|
+
[Math.cos(90 * (Math.PI / 180)), -Math.sin(90 * (Math.PI / 180))],
|
|
2195
|
+
[Math.sin(90 * (Math.PI / 180)), Math.cos(90 * (Math.PI / 180))],
|
|
2196
|
+
[0, 0]
|
|
2197
|
+
];
|
|
2198
|
+
L = v(L, O), A.viewBox = ee(A.hd != F, A.vd != N, 90, J);
|
|
2199
|
+
} else if (_ == "rotateright") {
|
|
2200
|
+
C -= 90;
|
|
2201
|
+
let O = [
|
|
2202
|
+
[Math.cos(-90 * (Math.PI / 180)), -Math.sin(-90 * (Math.PI / 180))],
|
|
2203
|
+
[Math.sin(-90 * (Math.PI / 180)), Math.cos(-90 * (Math.PI / 180))],
|
|
2204
|
+
[0, 0]
|
|
2205
|
+
];
|
|
2206
|
+
L = v(L, O), A.viewBox = ee(A.hd != F, A.vd != N, -90, J);
|
|
2207
|
+
} else _ == "fliphorizontal" ? (F = F ? 0 : 1, L = v(L, [
|
|
2208
|
+
[-1, 0],
|
|
2209
|
+
[0, 1],
|
|
2210
|
+
[0, 0]
|
|
2211
|
+
])) : _ == "flipvertical" && (N = N ? 0 : 1, L = v(L, [
|
|
2212
|
+
[1, 0],
|
|
2213
|
+
[0, -1],
|
|
2214
|
+
[0, 0]
|
|
2215
|
+
]));
|
|
2216
|
+
A.matrix = L, A.deg = C, A.hd = F, A.vd = N;
|
|
2217
|
+
}
|
|
2218
|
+
function ee(A, _, F, N) {
|
|
2219
|
+
let C = JSON.parse(JSON.stringify(N));
|
|
2220
|
+
const [J, L, O, H] = N;
|
|
2221
|
+
if (A == !0 && (C[0] = C[0] == 0 - O ? 0 : 0 - O), _ == !0 && (C[1] = C[1] == 0 - H ? 0 : 0 - H), F) {
|
|
2222
|
+
let Nt = F / 90 % 4;
|
|
2223
|
+
for (let He = 0; He < Math.abs(Nt); He++)
|
|
2224
|
+
if (C[2] = H, C[3] = O, F > 0) {
|
|
2225
|
+
let Ae = C[1];
|
|
2226
|
+
C[1] = C[0] == 0 - O ? 0 : 0 - O, C[0] = Ae;
|
|
2227
|
+
} else {
|
|
2228
|
+
let Ae = C[1];
|
|
2229
|
+
C[1] = C[0], C[0] = Ae == 0 - H ? 0 : 0 - H;
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
return C;
|
|
2233
|
+
}
|
|
2234
|
+
const Bt = (A) => {
|
|
2235
|
+
w.value.push(A);
|
|
2236
|
+
}, ke = (A) => {
|
|
2237
|
+
w.value.indexOf(A) != -1 && w.value.splice(w.value.indexOf(A), 1);
|
|
2238
|
+
}, ze = () => {
|
|
2239
|
+
(w.value.length == 0 || w.value.every((A) => A.status == "success")) && l("update:modelValue", Array.isArray(r.modelValue) ? w.value : h(w.value));
|
|
2240
|
+
};
|
|
2241
|
+
function Ft(A, _, F) {
|
|
2242
|
+
ze();
|
|
2243
|
+
}
|
|
2244
|
+
return $e(() => r.modelValue, (A) => {
|
|
2245
|
+
if (A)
|
|
2246
|
+
S.init(A);
|
|
2247
|
+
else
|
|
2248
|
+
return w.value = [];
|
|
2249
|
+
}, { deep: !0, immediate: !0 }), $e(() => w.value.length, () => {
|
|
2250
|
+
console.log("imageupload filelist changed....."), ze();
|
|
2251
|
+
}), t({
|
|
2252
|
+
pushFile: Bt,
|
|
2253
|
+
removeFile: ke
|
|
2254
|
+
}), (A, _) => {
|
|
2255
|
+
const F = te("el-icon"), N = te("el-upload"), C = te("sy-svg-icon"), J = te("el-dialog"), L = te("sy-image-view");
|
|
2256
|
+
return D(), I("div", Or, [
|
|
2257
|
+
q("div", Cr, [
|
|
2258
|
+
W(N, qt({
|
|
2259
|
+
multiple: e.multipleSelect,
|
|
2260
|
+
ref: "imageUpload",
|
|
2261
|
+
"show-file-list": !1,
|
|
2262
|
+
"file-list": w.value,
|
|
2263
|
+
"onUpdate:fileList": _[0] || (_[0] = (O) => w.value = O),
|
|
2264
|
+
"http-request": ne(S).onHttpRequest,
|
|
2265
|
+
"list-type": "picture-card",
|
|
2266
|
+
limit: e.limit,
|
|
2267
|
+
"on-success": Ft,
|
|
2268
|
+
"on-change": ne(S).onChange,
|
|
2269
|
+
"before-upload": ne(S).onBeforeUpload,
|
|
2270
|
+
"on-error": g,
|
|
2271
|
+
"on-exceed": E,
|
|
2272
|
+
class: { hide: w.value.length >= e.limit, disabled: e.disabled },
|
|
2273
|
+
style: "width:" + (w.value.length >= e.limit ? "auto" : e.size.width) + ";height:" + (w.value.length >= e.limit ? "auto" : e.size.height) + ";"
|
|
2274
|
+
}, ne(i), {
|
|
2275
|
+
onDragenter: f,
|
|
2276
|
+
onDragover: s,
|
|
2277
|
+
onDrop: o,
|
|
2278
|
+
"auto-upload": !0,
|
|
2279
|
+
disabled: e.disabled
|
|
2280
|
+
}), {
|
|
2281
|
+
default: xe(() => [
|
|
2282
|
+
q("div", {
|
|
2283
|
+
style: Je([{ "background-position": "center", "background-repeat": "no-repeat", width: "100%", height: "100%", display: "flex", "justify-content": "center", "align-items": "center" }, e.defaultBg && e.defaultBg != "" ? "background-image:url(" + e.defaultBg + ");" : ""])
|
|
2284
|
+
}, [
|
|
2285
|
+
!e.defaultBg || e.defaultBg == "" ? (D(), Ve(F, {
|
|
2286
|
+
key: 0,
|
|
2287
|
+
class: "avatar-uploader-icon"
|
|
2288
|
+
}, {
|
|
2289
|
+
default: xe(() => [
|
|
2290
|
+
W(ne(zt))
|
|
2291
|
+
]),
|
|
2292
|
+
_: 1
|
|
2293
|
+
})) : $("", !0)
|
|
2294
|
+
], 4)
|
|
2295
|
+
]),
|
|
2296
|
+
_: 1
|
|
2297
|
+
}, 16, ["multiple", "file-list", "http-request", "limit", "on-change", "before-upload", "class", "style", "disabled"]),
|
|
2298
|
+
w.value.length > 0 ? (D(), I("div", {
|
|
2299
|
+
key: 0,
|
|
2300
|
+
class: jt(["flex gap-2", { disabled: e.disabled, "ml-2": w.value.length < e.limit }])
|
|
2301
|
+
}, [
|
|
2302
|
+
(D(!0), I(Te, null, It(w.value, (O) => (D(), I("div", {
|
|
2303
|
+
key: O.uid,
|
|
2304
|
+
class: "el-upload--picture-card",
|
|
2305
|
+
style: Je("width:" + e.size.width + ";height:" + e.size.height + ";")
|
|
2306
|
+
}, [
|
|
2307
|
+
O.status == "ready" || O.status == "uploading" || O.loading ? (D(), I("div", _r, [
|
|
2308
|
+
W(C, {
|
|
2309
|
+
"class-name": "icon-down",
|
|
2310
|
+
"icon-class": "down"
|
|
2311
|
+
}),
|
|
2312
|
+
O.loading ? (D(), I("div", Ur, ae(parseInt(O.loadingPercent || 0)) + "%", 1)) : $("", !0),
|
|
2313
|
+
O.status == "uploading" ? (D(), I("div", vr, ae(parseInt(O.percentage || 0)) + "%", 1)) : $("", !0)
|
|
2314
|
+
])) : $("", !0),
|
|
2315
|
+
O.status == "success" && !O.loading ? (D(), I("div", {
|
|
2316
|
+
key: 1,
|
|
2317
|
+
onClick: (H) => U(O),
|
|
2318
|
+
class: "w-full h-full relative rounded overflow-hidden file-item"
|
|
2319
|
+
}, [
|
|
2320
|
+
q("div", Fr, [
|
|
2321
|
+
e.view == "img" ? (D(), I("img", {
|
|
2322
|
+
key: 0,
|
|
2323
|
+
style: { width: "100%" },
|
|
2324
|
+
src: O.objUrl,
|
|
2325
|
+
fit: "contain"
|
|
2326
|
+
}, null, 8, Nr)) : (D(), I("svg", {
|
|
2327
|
+
key: 1,
|
|
2328
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
2329
|
+
width: "100%",
|
|
2330
|
+
height: "100%",
|
|
2331
|
+
viewBox: O.viewBox.join(" "),
|
|
2332
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2333
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
2334
|
+
}, [
|
|
2335
|
+
q("g", {
|
|
2336
|
+
class: "origin-top-left preserve-3d",
|
|
2337
|
+
transform: "matrix(" + O.matrix.join(",") + ")"
|
|
2338
|
+
}, [
|
|
2339
|
+
q("image", {
|
|
2340
|
+
"xlink:href": O.objUrl,
|
|
2341
|
+
x: "0",
|
|
2342
|
+
y: "0",
|
|
2343
|
+
width: O.width,
|
|
2344
|
+
height: O.height
|
|
2345
|
+
}, null, 8, Mr)
|
|
2346
|
+
], 8, Pr)
|
|
2347
|
+
], 8, Lr))
|
|
2348
|
+
]),
|
|
2349
|
+
q("div", Dr, [
|
|
2350
|
+
q("div", qr, [
|
|
2351
|
+
le(q("div", jr, [
|
|
2352
|
+
W(C, {
|
|
2353
|
+
"class-name": "icon-photo",
|
|
2354
|
+
"icon-class": "right-arrow",
|
|
2355
|
+
onClick: ue((H) => u(O), ["stop"])
|
|
2356
|
+
}, null, 8, ["onClick"])
|
|
2357
|
+
], 512), [
|
|
2358
|
+
[ce, e.operations.back]
|
|
2359
|
+
]),
|
|
2360
|
+
le(q("div", Ir, [
|
|
2361
|
+
W(C, {
|
|
2362
|
+
"class-name": "icon-photo ",
|
|
2363
|
+
"icon-class": "close",
|
|
2364
|
+
onClick: ue((H) => a(O), ["stop"])
|
|
2365
|
+
}, null, 8, ["onClick"])
|
|
2366
|
+
], 512), [
|
|
2367
|
+
[ce, e.operations.close]
|
|
2368
|
+
])
|
|
2369
|
+
]),
|
|
2370
|
+
q("div", kr, [
|
|
2371
|
+
le(q("div", zr, [
|
|
2372
|
+
W(C, {
|
|
2373
|
+
"class-name": "icon-photo",
|
|
2374
|
+
"icon-class": "right-arrow",
|
|
2375
|
+
onClick: ue((H) => M(O, "rotateleft"), ["stop"])
|
|
2376
|
+
}, null, 8, ["onClick"])
|
|
2377
|
+
], 512), [
|
|
2378
|
+
[ce, e.operations.rotateLeft]
|
|
2379
|
+
]),
|
|
2380
|
+
le(q("div", Hr, [
|
|
2381
|
+
W(C, {
|
|
2382
|
+
"class-name": "icon-photo",
|
|
2383
|
+
"icon-class": "right-arrow",
|
|
2384
|
+
onClick: ue((H) => M(O, "rotateright"), ["stop"])
|
|
2385
|
+
}, null, 8, ["onClick"])
|
|
2386
|
+
], 512), [
|
|
2387
|
+
[ce, e.operations.rotateRight]
|
|
2388
|
+
])
|
|
2389
|
+
])
|
|
2390
|
+
])
|
|
2391
|
+
], 8, Br)) : $("", !0)
|
|
2392
|
+
], 4))), 128))
|
|
2393
|
+
], 2)) : $("", !0)
|
|
2394
|
+
]),
|
|
2395
|
+
d.value ? (D(), I("div", $r, [
|
|
2396
|
+
_[4] || (_[4] = fe(" 请上传 ")),
|
|
2397
|
+
e.fileMaxSize ? (D(), I(Te, { key: 0 }, [
|
|
2398
|
+
_[2] || (_[2] = fe(" 大小不超过 ")),
|
|
2399
|
+
q("b", Vr, ae(e.fileMaxSize) + "MB", 1)
|
|
2400
|
+
], 64)) : $("", !0),
|
|
2401
|
+
e.fileType ? (D(), I(Te, { key: 1 }, [
|
|
2402
|
+
_[3] || (_[3] = fe(" 格式为 ")),
|
|
2403
|
+
q("b", Jr, ae(e.fileType.join("/")), 1)
|
|
2404
|
+
], 64)) : $("", !0),
|
|
2405
|
+
_[5] || (_[5] = fe(" 的文件 "))
|
|
2406
|
+
])) : $("", !0),
|
|
2407
|
+
W(J, {
|
|
2408
|
+
modelValue: y.value,
|
|
2409
|
+
"onUpdate:modelValue": _[1] || (_[1] = (O) => y.value = O),
|
|
2410
|
+
title: "预览",
|
|
2411
|
+
width: "800px",
|
|
2412
|
+
"append-to-body": ""
|
|
2413
|
+
}, {
|
|
2414
|
+
default: xe(() => [
|
|
2415
|
+
q("img", {
|
|
2416
|
+
src: c.value,
|
|
2417
|
+
style: { display: "block", "max-width": "100%", margin: "0 auto" }
|
|
2418
|
+
}, null, 8, Wr)
|
|
2419
|
+
]),
|
|
2420
|
+
_: 1
|
|
2421
|
+
}, 8, ["modelValue"]),
|
|
2422
|
+
R.value ? (D(), Ve(L, {
|
|
2423
|
+
key: 1,
|
|
2424
|
+
urls: T.value,
|
|
2425
|
+
onClose: b
|
|
2426
|
+
}, null, 8, ["urls"])) : $("", !0)
|
|
2427
|
+
]);
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
}, ws = /* @__PURE__ */ Ht(Kr, [["__scopeId", "data-v-b4384b7f"]]);
|
|
2431
|
+
export {
|
|
2432
|
+
ws as default
|
|
2433
|
+
};
|