virtual-human-cf 1.4.0 → 1.6.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/README.md +34 -1
- package/dist/api/request.d.ts +1 -0
- package/dist/components/VirtualHumanEventAdapter.vue.d.ts +14 -1
- package/dist/virtual-human-cf.es.js +593 -581
- package/dist/virtual-human-cf.umd.js +6 -6
- package/package.json +1 -1
- package/src/api/request.ts +4 -1
- package/src/components/VirtualHumanEventAdapter.vue +20 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as et, ref as Q, watch as Z, onMounted as tt, onUnmounted as nt, openBlock as Be, createBlock as Tt, Transition as Ct, withCtx as Pt, createElementBlock as xt, normalizeStyle as _t, normalizeClass as Nt, createElementVNode as Ie, createCommentVNode as Ut, renderSlot as kt } from "vue";
|
|
2
|
+
const Ft = ["src", "muted"], vt = /* @__PURE__ */ et({
|
|
3
3
|
__name: "VirtualHumanPersona",
|
|
4
4
|
props: {
|
|
5
5
|
// 视频源URL
|
|
@@ -75,11 +75,11 @@ const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
|
|
|
75
75
|
const { type: c, action: p } = g;
|
|
76
76
|
c === "control" && (p === "play" || p === "resume" ? (r("update:isPlaying", !0), r("update:visible", !0)) : p === "pause" ? (s.value && s.value.pause(), r("update:isPlaying", !1), r("update:visible", !0)) : p === "stop" && (r("update:isPlaying", !1), r("update:visible", !1), s.value && (s.value.currentTime = 0)));
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
Z(() => n.screenClientId, () => {
|
|
79
79
|
n.screenClientId && n.wsUrl && d();
|
|
80
|
-
}),
|
|
80
|
+
}), Z(() => n.wsUrl, () => {
|
|
81
81
|
n.screenClientId && n.wsUrl && d();
|
|
82
|
-
}),
|
|
82
|
+
}), Z(() => n.isPlaying, (g) => {
|
|
83
83
|
s.value && (g ? s.value.play().catch((c) => console.error("Video play failed:", c)) : s.value.pause());
|
|
84
84
|
});
|
|
85
85
|
const u = () => {
|
|
@@ -89,23 +89,23 @@ const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
|
|
|
89
89
|
}, w = () => {
|
|
90
90
|
r("update:isPlaying", !1), r("ended");
|
|
91
91
|
};
|
|
92
|
-
return
|
|
92
|
+
return tt(() => {
|
|
93
93
|
n.isPlaying && s.value && s.value.play().catch((g) => console.error("Video play failed:", g)), n.screenClientId && n.wsUrl && d();
|
|
94
|
-
}),
|
|
94
|
+
}), nt(() => {
|
|
95
95
|
o.value && o.value.close();
|
|
96
|
-
}), (g, c) => (
|
|
97
|
-
default:
|
|
98
|
-
e.visible ? (
|
|
96
|
+
}), (g, c) => (Be(), Tt(Ct, { name: "fade" }, {
|
|
97
|
+
default: Pt(() => [
|
|
98
|
+
e.visible ? (Be(), xt("div", {
|
|
99
99
|
key: 0,
|
|
100
|
-
class:
|
|
101
|
-
style:
|
|
100
|
+
class: Nt(["virtual-human-container", { "is-dark": e.isDark }]),
|
|
101
|
+
style: _t(e.styles)
|
|
102
102
|
}, [
|
|
103
|
-
|
|
103
|
+
Ie("div", {
|
|
104
104
|
class: "video-wrapper",
|
|
105
105
|
ref_key: "wrapperRef",
|
|
106
106
|
ref: i
|
|
107
107
|
}, [
|
|
108
|
-
|
|
108
|
+
Ie("video", {
|
|
109
109
|
ref_key: "videoRef",
|
|
110
110
|
ref: s,
|
|
111
111
|
src: e.videoSrc,
|
|
@@ -118,42 +118,42 @@ const kt = ["src", "muted"], Ft = /* @__PURE__ */ Ze({
|
|
|
118
118
|
onPlay: u,
|
|
119
119
|
onPause: m,
|
|
120
120
|
onEnded: w
|
|
121
|
-
}, null, 40,
|
|
121
|
+
}, null, 40, Ft)
|
|
122
122
|
], 512)
|
|
123
|
-
], 6)) :
|
|
123
|
+
], 6)) : Ut("", !0)
|
|
124
124
|
]),
|
|
125
125
|
_: 1
|
|
126
126
|
}));
|
|
127
127
|
}
|
|
128
|
-
}),
|
|
128
|
+
}), Bt = (e, t) => {
|
|
129
129
|
const n = e.__vccOpts || e;
|
|
130
130
|
for (const [r, s] of t)
|
|
131
131
|
n[r] = s;
|
|
132
132
|
return n;
|
|
133
|
-
},
|
|
134
|
-
function
|
|
133
|
+
}, It = /* @__PURE__ */ Bt(vt, [["__scopeId", "data-v-02ec3645"]]);
|
|
134
|
+
function rt(e, t) {
|
|
135
135
|
return function() {
|
|
136
136
|
return e.apply(t, arguments);
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
const { toString:
|
|
140
|
-
const n =
|
|
139
|
+
const { toString: Lt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ye, toStringTag: st } = Symbol, be = /* @__PURE__ */ ((e) => (t) => {
|
|
140
|
+
const n = Lt.call(t);
|
|
141
141
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
142
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
142
|
+
})(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => be(t) === e), we = (e) => (t) => typeof t === e, { isArray: ee } = Array, Y = we("undefined");
|
|
143
143
|
function re(e) {
|
|
144
|
-
return e !== null && !
|
|
144
|
+
return e !== null && !Y(e) && e.constructor !== null && !Y(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
145
145
|
}
|
|
146
|
-
const
|
|
147
|
-
function
|
|
146
|
+
const ot = B("ArrayBuffer");
|
|
147
|
+
function Dt(e) {
|
|
148
148
|
let t;
|
|
149
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
149
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
151
|
+
const jt = we("string"), N = we("function"), it = we("number"), se = (e) => e !== null && typeof e == "object", Ht = (e) => e === !0 || e === !1, de = (e) => {
|
|
152
|
+
if (be(e) !== "object")
|
|
153
153
|
return !1;
|
|
154
|
-
const t =
|
|
155
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
156
|
-
},
|
|
154
|
+
const t = _e(e);
|
|
155
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(ye in e);
|
|
156
|
+
}, qt = (e) => {
|
|
157
157
|
if (!se(e) || re(e))
|
|
158
158
|
return !1;
|
|
159
159
|
try {
|
|
@@ -161,25 +161,25 @@ const Dt = ye("string"), N = ye("function"), st = ye("number"), se = (e) => e !=
|
|
|
161
161
|
} catch {
|
|
162
162
|
return !1;
|
|
163
163
|
}
|
|
164
|
-
},
|
|
165
|
-
function
|
|
164
|
+
}, Mt = B("Date"), $t = B("File"), Vt = (e) => !!(e && typeof e.uri < "u"), zt = (e) => e && typeof e.getParts < "u", Wt = B("Blob"), Jt = B("FileList"), Kt = (e) => se(e) && N(e.pipe);
|
|
165
|
+
function Xt() {
|
|
166
166
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const Le = Xt(), De = typeof Le.FormData < "u" ? Le.FormData : void 0, Gt = (e) => {
|
|
169
169
|
let t;
|
|
170
|
-
return e && (
|
|
170
|
+
return e && (De && e instanceof De || N(e.append) && ((t = be(e)) === "formdata" || // detect form-data instance
|
|
171
171
|
t === "object" && N(e.toString) && e.toString() === "[object FormData]"));
|
|
172
|
-
},
|
|
172
|
+
}, Qt = B("URLSearchParams"), [Zt, Yt, en, tn] = [
|
|
173
173
|
"ReadableStream",
|
|
174
174
|
"Request",
|
|
175
175
|
"Response",
|
|
176
176
|
"Headers"
|
|
177
|
-
].map(
|
|
177
|
+
].map(B), nn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
178
178
|
function oe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
179
179
|
if (e === null || typeof e > "u")
|
|
180
180
|
return;
|
|
181
181
|
let r, s;
|
|
182
|
-
if (typeof e != "object" && (e = [e]),
|
|
182
|
+
if (typeof e != "object" && (e = [e]), ee(e))
|
|
183
183
|
for (r = 0, s = e.length; r < s; r++)
|
|
184
184
|
t.call(null, e[r], r, e);
|
|
185
185
|
else {
|
|
@@ -191,7 +191,7 @@ function oe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
191
191
|
a = i[r], t.call(null, e[a], a, e);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function at(e, t) {
|
|
195
195
|
if (re(e))
|
|
196
196
|
return null;
|
|
197
197
|
t = t.toLowerCase();
|
|
@@ -202,23 +202,23 @@ function ot(e, t) {
|
|
|
202
202
|
return s;
|
|
203
203
|
return null;
|
|
204
204
|
}
|
|
205
|
-
const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
206
|
-
function
|
|
207
|
-
const { caseless: e, skipUndefined: t } =
|
|
205
|
+
const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, lt = (e) => !Y(e) && e !== W;
|
|
206
|
+
function Te() {
|
|
207
|
+
const { caseless: e, skipUndefined: t } = lt(this) && this || {}, n = {}, r = (s, i) => {
|
|
208
208
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
209
209
|
return;
|
|
210
|
-
const o = e &&
|
|
211
|
-
|
|
210
|
+
const o = e && at(n, i) || i;
|
|
211
|
+
de(n[o]) && de(s) ? n[o] = Te(n[o], s) : de(s) ? n[o] = Te({}, s) : ee(s) ? n[o] = s.slice() : (!t || !Y(s)) && (n[o] = s);
|
|
212
212
|
};
|
|
213
213
|
for (let s = 0, i = arguments.length; s < i; s++)
|
|
214
214
|
arguments[s] && oe(arguments[s], r);
|
|
215
215
|
return n;
|
|
216
216
|
}
|
|
217
|
-
const
|
|
217
|
+
const rn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
218
218
|
t,
|
|
219
219
|
(s, i) => {
|
|
220
220
|
n && N(s) ? Object.defineProperty(e, i, {
|
|
221
|
-
value:
|
|
221
|
+
value: rt(s, n),
|
|
222
222
|
writable: !0,
|
|
223
223
|
enumerable: !0,
|
|
224
224
|
configurable: !0
|
|
@@ -230,7 +230,7 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
230
230
|
});
|
|
231
231
|
},
|
|
232
232
|
{ allOwnKeys: r }
|
|
233
|
-
), e),
|
|
233
|
+
), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), on = (e, t, n, r) => {
|
|
234
234
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
235
235
|
value: e,
|
|
236
236
|
writable: !0,
|
|
@@ -239,52 +239,52 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
239
239
|
}), Object.defineProperty(e, "super", {
|
|
240
240
|
value: t.prototype
|
|
241
241
|
}), n && Object.assign(e.prototype, n);
|
|
242
|
-
},
|
|
242
|
+
}, an = (e, t, n, r) => {
|
|
243
243
|
let s, i, o;
|
|
244
244
|
const a = {};
|
|
245
245
|
if (t = t || {}, e == null) return t;
|
|
246
246
|
do {
|
|
247
247
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
248
248
|
o = s[i], (!r || r(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0);
|
|
249
|
-
e = n !== !1 &&
|
|
249
|
+
e = n !== !1 && _e(e);
|
|
250
250
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
251
251
|
return t;
|
|
252
|
-
},
|
|
252
|
+
}, ln = (e, t, n) => {
|
|
253
253
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
254
254
|
const r = e.indexOf(t, n);
|
|
255
255
|
return r !== -1 && r === n;
|
|
256
|
-
},
|
|
256
|
+
}, cn = (e) => {
|
|
257
257
|
if (!e) return null;
|
|
258
|
-
if (
|
|
258
|
+
if (ee(e)) return e;
|
|
259
259
|
let t = e.length;
|
|
260
|
-
if (!
|
|
260
|
+
if (!it(t)) return null;
|
|
261
261
|
const n = new Array(t);
|
|
262
262
|
for (; t-- > 0; )
|
|
263
263
|
n[t] = e[t];
|
|
264
264
|
return n;
|
|
265
|
-
},
|
|
266
|
-
const r = (e && e[
|
|
265
|
+
}, un = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), fn = (e, t) => {
|
|
266
|
+
const r = (e && e[ye]).call(e);
|
|
267
267
|
let s;
|
|
268
268
|
for (; (s = r.next()) && !s.done; ) {
|
|
269
269
|
const i = s.value;
|
|
270
270
|
t.call(e, i[0], i[1]);
|
|
271
271
|
}
|
|
272
|
-
},
|
|
272
|
+
}, dn = (e, t) => {
|
|
273
273
|
let n;
|
|
274
274
|
const r = [];
|
|
275
275
|
for (; (n = e.exec(t)) !== null; )
|
|
276
276
|
r.push(n);
|
|
277
277
|
return r;
|
|
278
|
-
},
|
|
278
|
+
}, pn = B("HTMLFormElement"), hn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
279
279
|
return r.toUpperCase() + s;
|
|
280
|
-
}),
|
|
280
|
+
}), je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mn = B("RegExp"), ct = (e, t) => {
|
|
281
281
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
282
282
|
oe(n, (s, i) => {
|
|
283
283
|
let o;
|
|
284
284
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
285
285
|
}), Object.defineProperties(e, r);
|
|
286
|
-
},
|
|
287
|
-
|
|
286
|
+
}, yn = (e) => {
|
|
287
|
+
ct(e, (t, n) => {
|
|
288
288
|
if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
289
289
|
return !1;
|
|
290
290
|
const r = e[n];
|
|
@@ -298,19 +298,19 @@ const nn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
|
-
},
|
|
301
|
+
}, bn = (e, t) => {
|
|
302
302
|
const n = {}, r = (s) => {
|
|
303
303
|
s.forEach((i) => {
|
|
304
304
|
n[i] = !0;
|
|
305
305
|
});
|
|
306
306
|
};
|
|
307
|
-
return
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
function
|
|
311
|
-
return !!(e && N(e.append) && e[
|
|
307
|
+
return ee(e) ? r(e) : r(String(e).split(t)), n;
|
|
308
|
+
}, wn = () => {
|
|
309
|
+
}, gn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
310
|
+
function En(e) {
|
|
311
|
+
return !!(e && N(e.append) && e[st] === "FormData" && e[ye]);
|
|
312
312
|
}
|
|
313
|
-
const
|
|
313
|
+
const Rn = (e) => {
|
|
314
314
|
const t = new Array(10), n = (r, s) => {
|
|
315
315
|
if (se(r)) {
|
|
316
316
|
if (t.indexOf(r) >= 0)
|
|
@@ -319,17 +319,17 @@ const En = (e) => {
|
|
|
319
319
|
return r;
|
|
320
320
|
if (!("toJSON" in r)) {
|
|
321
321
|
t[s] = r;
|
|
322
|
-
const i =
|
|
322
|
+
const i = ee(r) ? [] : {};
|
|
323
323
|
return oe(r, (o, a) => {
|
|
324
324
|
const d = n(o, s + 1);
|
|
325
|
-
!
|
|
325
|
+
!Y(d) && (i[a] = d);
|
|
326
326
|
}), t[s] = void 0, i;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
return r;
|
|
330
330
|
};
|
|
331
331
|
return n(e, 0);
|
|
332
|
-
},
|
|
332
|
+
}, Sn = B("AsyncFunction"), On = (e) => e && (se(e) || N(e)) && N(e.then) && N(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((n, r) => (W.addEventListener(
|
|
333
333
|
"message",
|
|
334
334
|
({ source: s, data: i }) => {
|
|
335
335
|
s === W && i === n && r.length && r.shift()();
|
|
@@ -337,71 +337,71 @@ const En = (e) => {
|
|
|
337
337
|
!1
|
|
338
338
|
), (s) => {
|
|
339
339
|
r.push(s), W.postMessage(n, "*");
|
|
340
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", N(W.postMessage)),
|
|
341
|
-
isArray:
|
|
342
|
-
isArrayBuffer:
|
|
340
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", N(W.postMessage)), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(W) : typeof process < "u" && process.nextTick || ut, Tn = (e) => e != null && N(e[ye]), l = {
|
|
341
|
+
isArray: ee,
|
|
342
|
+
isArrayBuffer: ot,
|
|
343
343
|
isBuffer: re,
|
|
344
|
-
isFormData:
|
|
345
|
-
isArrayBufferView:
|
|
346
|
-
isString:
|
|
347
|
-
isNumber:
|
|
348
|
-
isBoolean:
|
|
344
|
+
isFormData: Gt,
|
|
345
|
+
isArrayBufferView: Dt,
|
|
346
|
+
isString: jt,
|
|
347
|
+
isNumber: it,
|
|
348
|
+
isBoolean: Ht,
|
|
349
349
|
isObject: se,
|
|
350
|
-
isPlainObject:
|
|
351
|
-
isEmptyObject:
|
|
352
|
-
isReadableStream:
|
|
353
|
-
isRequest:
|
|
354
|
-
isResponse:
|
|
355
|
-
isHeaders:
|
|
356
|
-
isUndefined:
|
|
357
|
-
isDate:
|
|
358
|
-
isFile:
|
|
359
|
-
isReactNativeBlob:
|
|
360
|
-
isReactNative:
|
|
361
|
-
isBlob:
|
|
362
|
-
isRegExp:
|
|
350
|
+
isPlainObject: de,
|
|
351
|
+
isEmptyObject: qt,
|
|
352
|
+
isReadableStream: Zt,
|
|
353
|
+
isRequest: Yt,
|
|
354
|
+
isResponse: en,
|
|
355
|
+
isHeaders: tn,
|
|
356
|
+
isUndefined: Y,
|
|
357
|
+
isDate: Mt,
|
|
358
|
+
isFile: $t,
|
|
359
|
+
isReactNativeBlob: Vt,
|
|
360
|
+
isReactNative: zt,
|
|
361
|
+
isBlob: Wt,
|
|
362
|
+
isRegExp: mn,
|
|
363
363
|
isFunction: N,
|
|
364
|
-
isStream:
|
|
365
|
-
isURLSearchParams:
|
|
366
|
-
isTypedArray:
|
|
367
|
-
isFileList:
|
|
364
|
+
isStream: Kt,
|
|
365
|
+
isURLSearchParams: Qt,
|
|
366
|
+
isTypedArray: un,
|
|
367
|
+
isFileList: Jt,
|
|
368
368
|
forEach: oe,
|
|
369
|
-
merge:
|
|
370
|
-
extend:
|
|
371
|
-
trim:
|
|
372
|
-
stripBOM:
|
|
373
|
-
inherits:
|
|
374
|
-
toFlatObject:
|
|
375
|
-
kindOf:
|
|
376
|
-
kindOfTest:
|
|
377
|
-
endsWith:
|
|
378
|
-
toArray:
|
|
379
|
-
forEachEntry:
|
|
380
|
-
matchAll:
|
|
381
|
-
isHTMLForm:
|
|
382
|
-
hasOwnProperty:
|
|
383
|
-
hasOwnProp:
|
|
369
|
+
merge: Te,
|
|
370
|
+
extend: rn,
|
|
371
|
+
trim: nn,
|
|
372
|
+
stripBOM: sn,
|
|
373
|
+
inherits: on,
|
|
374
|
+
toFlatObject: an,
|
|
375
|
+
kindOf: be,
|
|
376
|
+
kindOfTest: B,
|
|
377
|
+
endsWith: ln,
|
|
378
|
+
toArray: cn,
|
|
379
|
+
forEachEntry: fn,
|
|
380
|
+
matchAll: dn,
|
|
381
|
+
isHTMLForm: pn,
|
|
382
|
+
hasOwnProperty: je,
|
|
383
|
+
hasOwnProp: je,
|
|
384
384
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
385
|
-
reduceDescriptors:
|
|
386
|
-
freezeMethods:
|
|
387
|
-
toObjectSet:
|
|
388
|
-
toCamelCase:
|
|
389
|
-
noop:
|
|
390
|
-
toFiniteNumber:
|
|
391
|
-
findKey:
|
|
385
|
+
reduceDescriptors: ct,
|
|
386
|
+
freezeMethods: yn,
|
|
387
|
+
toObjectSet: bn,
|
|
388
|
+
toCamelCase: hn,
|
|
389
|
+
noop: wn,
|
|
390
|
+
toFiniteNumber: gn,
|
|
391
|
+
findKey: at,
|
|
392
392
|
global: W,
|
|
393
|
-
isContextDefined:
|
|
394
|
-
isSpecCompliantForm:
|
|
395
|
-
toJSONObject:
|
|
396
|
-
isAsyncFn:
|
|
397
|
-
isThenable:
|
|
398
|
-
setImmediate:
|
|
399
|
-
asap:
|
|
400
|
-
isIterable:
|
|
393
|
+
isContextDefined: lt,
|
|
394
|
+
isSpecCompliantForm: En,
|
|
395
|
+
toJSONObject: Rn,
|
|
396
|
+
isAsyncFn: Sn,
|
|
397
|
+
isThenable: On,
|
|
398
|
+
setImmediate: ut,
|
|
399
|
+
asap: An,
|
|
400
|
+
isIterable: Tn
|
|
401
401
|
};
|
|
402
|
-
let
|
|
402
|
+
let b = class ft extends Error {
|
|
403
403
|
static from(t, n, r, s, i, o) {
|
|
404
|
-
const a = new
|
|
404
|
+
const a = new ft(t.message, n || t.code, r, s, i);
|
|
405
405
|
return a.cause = t, a.name = t.name, t.status != null && a.status == null && (a.status = t.status), o && Object.assign(a, o), a;
|
|
406
406
|
}
|
|
407
407
|
/**
|
|
@@ -443,37 +443,37 @@ let y = class ct extends Error {
|
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
};
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
const
|
|
459
|
-
function
|
|
446
|
+
b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
447
|
+
b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
448
|
+
b.ECONNABORTED = "ECONNABORTED";
|
|
449
|
+
b.ETIMEDOUT = "ETIMEDOUT";
|
|
450
|
+
b.ERR_NETWORK = "ERR_NETWORK";
|
|
451
|
+
b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
452
|
+
b.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
453
|
+
b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
454
|
+
b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
455
|
+
b.ERR_CANCELED = "ERR_CANCELED";
|
|
456
|
+
b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
457
|
+
b.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
458
|
+
const Cn = null;
|
|
459
|
+
function Ce(e) {
|
|
460
460
|
return l.isPlainObject(e) || l.isArray(e);
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function dt(e) {
|
|
463
463
|
return l.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function Re(e, t, n) {
|
|
466
466
|
return e ? e.concat(t).map(function(s, i) {
|
|
467
|
-
return s =
|
|
467
|
+
return s = dt(s), !n && i ? "[" + s + "]" : s;
|
|
468
468
|
}).join(n ? "." : "") : t;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
return l.isArray(e) && !e.some(
|
|
470
|
+
function Pn(e) {
|
|
471
|
+
return l.isArray(e) && !e.some(Ce);
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const xn = l.toFlatObject(l, {}, null, function(t) {
|
|
474
474
|
return /^is[A-Z]/.test(t);
|
|
475
475
|
});
|
|
476
|
-
function
|
|
476
|
+
function ge(e, t, n) {
|
|
477
477
|
if (!l.isObject(e))
|
|
478
478
|
throw new TypeError("target must be an object");
|
|
479
479
|
t = t || new FormData(), n = l.toFlatObject(
|
|
@@ -498,38 +498,38 @@ function be(e, t, n) {
|
|
|
498
498
|
if (l.isBoolean(c))
|
|
499
499
|
return c.toString();
|
|
500
500
|
if (!d && l.isBlob(c))
|
|
501
|
-
throw new
|
|
501
|
+
throw new b("Blob is not supported. Use a Buffer instead.");
|
|
502
502
|
return l.isArrayBuffer(c) || l.isTypedArray(c) ? d && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
|
|
503
503
|
}
|
|
504
504
|
function u(c, p, h) {
|
|
505
|
-
let
|
|
505
|
+
let R = c;
|
|
506
506
|
if (l.isReactNative(t) && l.isReactNativeBlob(c))
|
|
507
|
-
return t.append(
|
|
507
|
+
return t.append(Re(h, p, i), f(c)), !1;
|
|
508
508
|
if (c && !h && typeof c == "object") {
|
|
509
509
|
if (l.endsWith(p, "{}"))
|
|
510
510
|
p = r ? p : p.slice(0, -2), c = JSON.stringify(c);
|
|
511
|
-
else if (l.isArray(c) &&
|
|
512
|
-
return p =
|
|
513
|
-
!(l.isUndefined(
|
|
511
|
+
else if (l.isArray(c) && Pn(c) || (l.isFileList(c) || l.endsWith(p, "[]")) && (R = l.toArray(c)))
|
|
512
|
+
return p = dt(p), R.forEach(function(A, T) {
|
|
513
|
+
!(l.isUndefined(A) || A === null) && t.append(
|
|
514
514
|
// eslint-disable-next-line no-nested-ternary
|
|
515
|
-
o === !0 ?
|
|
516
|
-
f(
|
|
515
|
+
o === !0 ? Re([p], T, i) : o === null ? p : p + "[]",
|
|
516
|
+
f(A)
|
|
517
517
|
);
|
|
518
518
|
}), !1;
|
|
519
519
|
}
|
|
520
|
-
return
|
|
520
|
+
return Ce(c) ? !0 : (t.append(Re(h, p, i), f(c)), !1);
|
|
521
521
|
}
|
|
522
|
-
const m = [], w = Object.assign(
|
|
522
|
+
const m = [], w = Object.assign(xn, {
|
|
523
523
|
defaultVisitor: u,
|
|
524
524
|
convertValue: f,
|
|
525
|
-
isVisitable:
|
|
525
|
+
isVisitable: Ce
|
|
526
526
|
});
|
|
527
527
|
function g(c, p) {
|
|
528
528
|
if (!l.isUndefined(c)) {
|
|
529
529
|
if (m.indexOf(c) !== -1)
|
|
530
530
|
throw Error("Circular reference detected in " + p.join("."));
|
|
531
|
-
m.push(c), l.forEach(c, function(
|
|
532
|
-
(!(l.isUndefined(
|
|
531
|
+
m.push(c), l.forEach(c, function(R, k) {
|
|
532
|
+
(!(l.isUndefined(R) || R === null) && s.call(t, R, l.isString(k) ? k.trim() : k, p, w)) === !0 && g(R, p ? p.concat(k) : [k]);
|
|
533
533
|
}), m.pop();
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -537,7 +537,7 @@ function be(e, t, n) {
|
|
|
537
537
|
throw new TypeError("data must be an object");
|
|
538
538
|
return g(e), t;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function He(e) {
|
|
541
541
|
const t = {
|
|
542
542
|
"!": "%21",
|
|
543
543
|
"'": "%27",
|
|
@@ -551,38 +551,38 @@ function De(e) {
|
|
|
551
551
|
return t[r];
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
this._pairs = [], e &&
|
|
554
|
+
function Ne(e, t) {
|
|
555
|
+
this._pairs = [], e && ge(e, this, t);
|
|
556
556
|
}
|
|
557
|
-
const
|
|
558
|
-
|
|
557
|
+
const pt = Ne.prototype;
|
|
558
|
+
pt.append = function(t, n) {
|
|
559
559
|
this._pairs.push([t, n]);
|
|
560
560
|
};
|
|
561
|
-
|
|
561
|
+
pt.toString = function(t) {
|
|
562
562
|
const n = t ? function(r) {
|
|
563
|
-
return t.call(this, r,
|
|
564
|
-
} :
|
|
563
|
+
return t.call(this, r, He);
|
|
564
|
+
} : He;
|
|
565
565
|
return this._pairs.map(function(s) {
|
|
566
566
|
return n(s[0]) + "=" + n(s[1]);
|
|
567
567
|
}, "").join("&");
|
|
568
568
|
};
|
|
569
|
-
function
|
|
569
|
+
function _n(e) {
|
|
570
570
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function ht(e, t, n) {
|
|
573
573
|
if (!t)
|
|
574
574
|
return e;
|
|
575
|
-
const r = n && n.encode ||
|
|
575
|
+
const r = n && n.encode || _n, s = l.isFunction(n) ? {
|
|
576
576
|
serialize: n
|
|
577
577
|
} : n, i = s && s.serialize;
|
|
578
578
|
let o;
|
|
579
|
-
if (i ? o = i(t, s) : o = l.isURLSearchParams(t) ? t.toString() : new
|
|
579
|
+
if (i ? o = i(t, s) : o = l.isURLSearchParams(t) ? t.toString() : new Ne(t, s).toString(r), o) {
|
|
580
580
|
const a = e.indexOf("#");
|
|
581
581
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
582
582
|
}
|
|
583
583
|
return e;
|
|
584
584
|
}
|
|
585
|
-
class
|
|
585
|
+
class qe {
|
|
586
586
|
constructor() {
|
|
587
587
|
this.handlers = [];
|
|
588
588
|
}
|
|
@@ -637,43 +637,43 @@ class je {
|
|
|
637
637
|
});
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
const
|
|
640
|
+
const Ue = {
|
|
641
641
|
silentJSONParsing: !0,
|
|
642
642
|
forcedJSONParsing: !0,
|
|
643
643
|
clarifyTimeoutError: !1,
|
|
644
644
|
legacyInterceptorReqResOrdering: !0
|
|
645
|
-
},
|
|
645
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : Ne, Un = typeof FormData < "u" ? FormData : null, kn = typeof Blob < "u" ? Blob : null, Fn = {
|
|
646
646
|
isBrowser: !0,
|
|
647
647
|
classes: {
|
|
648
|
-
URLSearchParams:
|
|
649
|
-
FormData:
|
|
650
|
-
Blob:
|
|
648
|
+
URLSearchParams: Nn,
|
|
649
|
+
FormData: Un,
|
|
650
|
+
Blob: kn
|
|
651
651
|
},
|
|
652
652
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
653
|
-
},
|
|
654
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
653
|
+
}, ke = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, vn = ke && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), Bn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
654
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In = ke && window.location.href || "http://localhost", Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
655
655
|
__proto__: null,
|
|
656
|
-
hasBrowserEnv:
|
|
657
|
-
hasStandardBrowserEnv:
|
|
658
|
-
hasStandardBrowserWebWorkerEnv:
|
|
659
|
-
navigator:
|
|
660
|
-
origin:
|
|
661
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
662
|
-
...
|
|
663
|
-
...
|
|
656
|
+
hasBrowserEnv: ke,
|
|
657
|
+
hasStandardBrowserEnv: vn,
|
|
658
|
+
hasStandardBrowserWebWorkerEnv: Bn,
|
|
659
|
+
navigator: Pe,
|
|
660
|
+
origin: In
|
|
661
|
+
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
662
|
+
...Ln,
|
|
663
|
+
...Fn
|
|
664
664
|
};
|
|
665
|
-
function
|
|
666
|
-
return
|
|
665
|
+
function Dn(e, t) {
|
|
666
|
+
return ge(e, new P.classes.URLSearchParams(), {
|
|
667
667
|
visitor: function(n, r, s, i) {
|
|
668
|
-
return
|
|
668
|
+
return P.isNode && l.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
669
669
|
},
|
|
670
670
|
...t
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function jn(e) {
|
|
674
674
|
return l.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Hn(e) {
|
|
677
677
|
const t = {}, n = Object.keys(e);
|
|
678
678
|
let r;
|
|
679
679
|
const s = n.length;
|
|
@@ -682,22 +682,22 @@ function jn(e) {
|
|
|
682
682
|
i = n[r], t[i] = e[i];
|
|
683
683
|
return t;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function mt(e) {
|
|
686
686
|
function t(n, r, s, i) {
|
|
687
687
|
let o = n[i++];
|
|
688
688
|
if (o === "__proto__") return !0;
|
|
689
689
|
const a = Number.isFinite(+o), d = i >= n.length;
|
|
690
|
-
return o = !o && l.isArray(s) ? s.length : o, d ? (l.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !l.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && l.isArray(s[o]) && (s[o] =
|
|
690
|
+
return o = !o && l.isArray(s) ? s.length : o, d ? (l.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !l.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && l.isArray(s[o]) && (s[o] = Hn(s[o])), !a);
|
|
691
691
|
}
|
|
692
692
|
if (l.isFormData(e) && l.isFunction(e.entries)) {
|
|
693
693
|
const n = {};
|
|
694
694
|
return l.forEachEntry(e, (r, s) => {
|
|
695
|
-
t(
|
|
695
|
+
t(jn(r), s, n, 0);
|
|
696
696
|
}), n;
|
|
697
697
|
}
|
|
698
698
|
return null;
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function qn(e, t, n) {
|
|
701
701
|
if (l.isString(e))
|
|
702
702
|
try {
|
|
703
703
|
return (t || JSON.parse)(e), l.trim(e);
|
|
@@ -708,13 +708,13 @@ function Hn(e, t, n) {
|
|
|
708
708
|
return (n || JSON.stringify)(e);
|
|
709
709
|
}
|
|
710
710
|
const ie = {
|
|
711
|
-
transitional:
|
|
711
|
+
transitional: Ue,
|
|
712
712
|
adapter: ["xhr", "http", "fetch"],
|
|
713
713
|
transformRequest: [
|
|
714
714
|
function(t, n) {
|
|
715
715
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = l.isObject(t);
|
|
716
716
|
if (i && l.isHTMLForm(t) && (t = new FormData(t)), l.isFormData(t))
|
|
717
|
-
return s ? JSON.stringify(
|
|
717
|
+
return s ? JSON.stringify(mt(t)) : t;
|
|
718
718
|
if (l.isArrayBuffer(t) || l.isBuffer(t) || l.isStream(t) || l.isFile(t) || l.isBlob(t) || l.isReadableStream(t))
|
|
719
719
|
return t;
|
|
720
720
|
if (l.isArrayBufferView(t))
|
|
@@ -724,17 +724,17 @@ const ie = {
|
|
|
724
724
|
let a;
|
|
725
725
|
if (i) {
|
|
726
726
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
727
|
-
return
|
|
727
|
+
return Dn(t, this.formSerializer).toString();
|
|
728
728
|
if ((a = l.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
729
729
|
const d = this.env && this.env.FormData;
|
|
730
|
-
return
|
|
730
|
+
return ge(
|
|
731
731
|
a ? { "files[]": t } : t,
|
|
732
732
|
d && new d(),
|
|
733
733
|
this.formSerializer
|
|
734
734
|
);
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
737
|
+
return i || s ? (n.setContentType("application/json", !1), qn(t)) : t;
|
|
738
738
|
}
|
|
739
739
|
],
|
|
740
740
|
transformResponse: [
|
|
@@ -748,7 +748,7 @@ const ie = {
|
|
|
748
748
|
return JSON.parse(t, this.parseReviver);
|
|
749
749
|
} catch (a) {
|
|
750
750
|
if (o)
|
|
751
|
-
throw a.name === "SyntaxError" ?
|
|
751
|
+
throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
return t;
|
|
@@ -764,8 +764,8 @@ const ie = {
|
|
|
764
764
|
maxContentLength: -1,
|
|
765
765
|
maxBodyLength: -1,
|
|
766
766
|
env: {
|
|
767
|
-
FormData:
|
|
768
|
-
Blob:
|
|
767
|
+
FormData: P.classes.FormData,
|
|
768
|
+
Blob: P.classes.Blob
|
|
769
769
|
},
|
|
770
770
|
validateStatus: function(t) {
|
|
771
771
|
return t >= 200 && t < 300;
|
|
@@ -780,7 +780,7 @@ const ie = {
|
|
|
780
780
|
l.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
781
781
|
ie.headers[e] = {};
|
|
782
782
|
});
|
|
783
|
-
const
|
|
783
|
+
const Mn = l.toObjectSet([
|
|
784
784
|
"age",
|
|
785
785
|
"authorization",
|
|
786
786
|
"content-length",
|
|
@@ -798,29 +798,29 @@ const qn = l.toObjectSet([
|
|
|
798
798
|
"referer",
|
|
799
799
|
"retry-after",
|
|
800
800
|
"user-agent"
|
|
801
|
-
]),
|
|
801
|
+
]), $n = (e) => {
|
|
802
802
|
const t = {};
|
|
803
803
|
let n, r, s;
|
|
804
804
|
return e && e.split(`
|
|
805
805
|
`).forEach(function(o) {
|
|
806
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
806
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Mn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
807
807
|
}), t;
|
|
808
|
-
},
|
|
809
|
-
function
|
|
808
|
+
}, Me = Symbol("internals");
|
|
809
|
+
function ne(e) {
|
|
810
810
|
return e && String(e).trim().toLowerCase();
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
return e === !1 || e == null ? e : l.isArray(e) ? e.map(
|
|
812
|
+
function pe(e) {
|
|
813
|
+
return e === !1 || e == null ? e : l.isArray(e) ? e.map(pe) : String(e).replace(/[\r\n]+$/, "");
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function Vn(e) {
|
|
816
816
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
817
817
|
let r;
|
|
818
818
|
for (; r = n.exec(e); )
|
|
819
819
|
t[r[1]] = r[2];
|
|
820
820
|
return t;
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
function
|
|
822
|
+
const zn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
823
|
+
function Se(e, t, n, r, s) {
|
|
824
824
|
if (l.isFunction(r))
|
|
825
825
|
return r.call(this, t, n);
|
|
826
826
|
if (s && (t = n), !!l.isString(t)) {
|
|
@@ -830,10 +830,10 @@ function Ee(e, t, n, r, s) {
|
|
|
830
830
|
return r.test(t);
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Wn(e) {
|
|
834
834
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function Jn(e, t) {
|
|
837
837
|
const n = l.toCamelCase(" " + t);
|
|
838
838
|
["get", "set", "has"].forEach((r) => {
|
|
839
839
|
Object.defineProperty(e, r + n, {
|
|
@@ -851,17 +851,17 @@ let U = class {
|
|
|
851
851
|
set(t, n, r) {
|
|
852
852
|
const s = this;
|
|
853
853
|
function i(a, d, f) {
|
|
854
|
-
const u =
|
|
854
|
+
const u = ne(d);
|
|
855
855
|
if (!u)
|
|
856
856
|
throw new Error("header name must be a non-empty string");
|
|
857
857
|
const m = l.findKey(s, u);
|
|
858
|
-
(!m || s[m] === void 0 || f === !0 || f === void 0 && s[m] !== !1) && (s[m || d] =
|
|
858
|
+
(!m || s[m] === void 0 || f === !0 || f === void 0 && s[m] !== !1) && (s[m || d] = pe(a));
|
|
859
859
|
}
|
|
860
860
|
const o = (a, d) => l.forEach(a, (f, u) => i(f, u, d));
|
|
861
861
|
if (l.isPlainObject(t) || t instanceof this.constructor)
|
|
862
862
|
o(t, n);
|
|
863
|
-
else if (l.isString(t) && (t = t.trim()) && !
|
|
864
|
-
o(
|
|
863
|
+
else if (l.isString(t) && (t = t.trim()) && !zn(t))
|
|
864
|
+
o($n(t), n);
|
|
865
865
|
else if (l.isObject(t) && l.isIterable(t)) {
|
|
866
866
|
let a = {}, d, f;
|
|
867
867
|
for (const u of t) {
|
|
@@ -875,14 +875,14 @@ let U = class {
|
|
|
875
875
|
return this;
|
|
876
876
|
}
|
|
877
877
|
get(t, n) {
|
|
878
|
-
if (t =
|
|
878
|
+
if (t = ne(t), t) {
|
|
879
879
|
const r = l.findKey(this, t);
|
|
880
880
|
if (r) {
|
|
881
881
|
const s = this[r];
|
|
882
882
|
if (!n)
|
|
883
883
|
return s;
|
|
884
884
|
if (n === !0)
|
|
885
|
-
return
|
|
885
|
+
return Vn(s);
|
|
886
886
|
if (l.isFunction(n))
|
|
887
887
|
return n.call(this, s, r);
|
|
888
888
|
if (l.isRegExp(n))
|
|
@@ -892,9 +892,9 @@ let U = class {
|
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
894
|
has(t, n) {
|
|
895
|
-
if (t =
|
|
895
|
+
if (t = ne(t), t) {
|
|
896
896
|
const r = l.findKey(this, t);
|
|
897
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
897
|
+
return !!(r && this[r] !== void 0 && (!n || Se(this, this[r], r, n)));
|
|
898
898
|
}
|
|
899
899
|
return !1;
|
|
900
900
|
}
|
|
@@ -902,9 +902,9 @@ let U = class {
|
|
|
902
902
|
const r = this;
|
|
903
903
|
let s = !1;
|
|
904
904
|
function i(o) {
|
|
905
|
-
if (o =
|
|
905
|
+
if (o = ne(o), o) {
|
|
906
906
|
const a = l.findKey(r, o);
|
|
907
|
-
a && (!n ||
|
|
907
|
+
a && (!n || Se(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
return l.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -914,7 +914,7 @@ let U = class {
|
|
|
914
914
|
let r = n.length, s = !1;
|
|
915
915
|
for (; r--; ) {
|
|
916
916
|
const i = n[r];
|
|
917
|
-
(!t ||
|
|
917
|
+
(!t || Se(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
918
918
|
}
|
|
919
919
|
return s;
|
|
920
920
|
}
|
|
@@ -923,11 +923,11 @@ let U = class {
|
|
|
923
923
|
return l.forEach(this, (s, i) => {
|
|
924
924
|
const o = l.findKey(r, i);
|
|
925
925
|
if (o) {
|
|
926
|
-
n[o] =
|
|
926
|
+
n[o] = pe(s), delete n[i];
|
|
927
927
|
return;
|
|
928
928
|
}
|
|
929
|
-
const a = t ?
|
|
930
|
-
a !== i && delete n[i], n[a] =
|
|
929
|
+
const a = t ? Wn(i) : String(i).trim();
|
|
930
|
+
a !== i && delete n[i], n[a] = pe(s), r[a] = !0;
|
|
931
931
|
}), this;
|
|
932
932
|
}
|
|
933
933
|
concat(...t) {
|
|
@@ -960,12 +960,12 @@ let U = class {
|
|
|
960
960
|
return n.forEach((s) => r.set(s)), r;
|
|
961
961
|
}
|
|
962
962
|
static accessor(t) {
|
|
963
|
-
const r = (this[
|
|
963
|
+
const r = (this[Me] = this[Me] = {
|
|
964
964
|
accessors: {}
|
|
965
965
|
}).accessors, s = this.prototype;
|
|
966
966
|
function i(o) {
|
|
967
|
-
const a =
|
|
968
|
-
r[a] || (
|
|
967
|
+
const a = ne(o);
|
|
968
|
+
r[a] || (Jn(s, o), r[a] = !0);
|
|
969
969
|
}
|
|
970
970
|
return l.isArray(t) ? t.forEach(i) : i(t), this;
|
|
971
971
|
}
|
|
@@ -988,17 +988,17 @@ l.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
988
988
|
};
|
|
989
989
|
});
|
|
990
990
|
l.freezeMethods(U);
|
|
991
|
-
function
|
|
991
|
+
function Oe(e, t) {
|
|
992
992
|
const n = this || ie, r = t || n, s = U.from(r.headers);
|
|
993
993
|
let i = r.data;
|
|
994
994
|
return l.forEach(e, function(a) {
|
|
995
995
|
i = a.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
996
996
|
}), s.normalize(), i;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function yt(e) {
|
|
999
999
|
return !!(e && e.__CANCEL__);
|
|
1000
1000
|
}
|
|
1001
|
-
let ae = class extends
|
|
1001
|
+
let ae = class extends b {
|
|
1002
1002
|
/**
|
|
1003
1003
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1004
1004
|
*
|
|
@@ -1009,26 +1009,26 @@ let ae = class extends y {
|
|
|
1009
1009
|
* @returns {CanceledError} The created error.
|
|
1010
1010
|
*/
|
|
1011
1011
|
constructor(t, n, r) {
|
|
1012
|
-
super(t ?? "canceled",
|
|
1012
|
+
super(t ?? "canceled", b.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
|
-
function
|
|
1015
|
+
function bt(e, t, n) {
|
|
1016
1016
|
const r = n.config.validateStatus;
|
|
1017
1017
|
!n.status || !r || r(n.status) ? e(n) : t(
|
|
1018
|
-
new
|
|
1018
|
+
new b(
|
|
1019
1019
|
"Request failed with status code " + n.status,
|
|
1020
|
-
[
|
|
1020
|
+
[b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1021
1021
|
n.config,
|
|
1022
1022
|
n.request,
|
|
1023
1023
|
n
|
|
1024
1024
|
)
|
|
1025
1025
|
);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Kn(e) {
|
|
1028
1028
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1029
1029
|
return t && t[1] || "";
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function Xn(e, t) {
|
|
1032
1032
|
e = e || 10;
|
|
1033
1033
|
const n = new Array(e), r = new Array(e);
|
|
1034
1034
|
let s = 0, i = 0, o;
|
|
@@ -1044,7 +1044,7 @@ function Kn(e, t) {
|
|
|
1044
1044
|
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Gn(e, t) {
|
|
1048
1048
|
let n = 0, r = 1e3 / t, s, i;
|
|
1049
1049
|
const o = (f, u = Date.now()) => {
|
|
1050
1050
|
n = u, s = null, i && (clearTimeout(i), i = null), e(...f);
|
|
@@ -1056,10 +1056,10 @@ function Xn(e, t) {
|
|
|
1056
1056
|
}, r - m)));
|
|
1057
1057
|
}, () => s && o(s)];
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1059
|
+
const me = (e, t, n = 3) => {
|
|
1060
1060
|
let r = 0;
|
|
1061
|
-
const s =
|
|
1062
|
-
return
|
|
1061
|
+
const s = Xn(50, 250);
|
|
1062
|
+
return Gn((i) => {
|
|
1063
1063
|
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, d = o - r, f = s(d), u = o <= a;
|
|
1064
1064
|
r = o;
|
|
1065
1065
|
const m = {
|
|
@@ -1075,7 +1075,7 @@ const pe = (e, t, n = 3) => {
|
|
|
1075
1075
|
};
|
|
1076
1076
|
e(m);
|
|
1077
1077
|
}, n);
|
|
1078
|
-
},
|
|
1078
|
+
}, $e = (e, t) => {
|
|
1079
1079
|
const n = e != null;
|
|
1080
1080
|
return [
|
|
1081
1081
|
(r) => t[0]({
|
|
@@ -1085,10 +1085,10 @@ const pe = (e, t, n = 3) => {
|
|
|
1085
1085
|
}),
|
|
1086
1086
|
t[1]
|
|
1087
1087
|
];
|
|
1088
|
-
},
|
|
1089
|
-
new URL(
|
|
1090
|
-
|
|
1091
|
-
) : () => !0,
|
|
1088
|
+
}, Ve = (e) => (...t) => l.asap(() => e(...t)), Qn = 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)))(
|
|
1089
|
+
new URL(P.origin),
|
|
1090
|
+
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1091
|
+
) : () => !0, Zn = P.hasStandardBrowserEnv ? (
|
|
1092
1092
|
// Standard browser envs support document.cookie
|
|
1093
1093
|
{
|
|
1094
1094
|
write(e, t, n, r, s, i, o) {
|
|
@@ -1117,17 +1117,17 @@ const pe = (e, t, n = 3) => {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
1119
|
);
|
|
1120
|
-
function
|
|
1120
|
+
function Yn(e) {
|
|
1121
1121
|
return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function er(e, t) {
|
|
1124
1124
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1127
|
-
let r = !
|
|
1128
|
-
return e && (r || n == !1) ?
|
|
1126
|
+
function wt(e, t, n) {
|
|
1127
|
+
let r = !Yn(t);
|
|
1128
|
+
return e && (r || n == !1) ? er(e, t) : t;
|
|
1129
1129
|
}
|
|
1130
|
-
const
|
|
1130
|
+
const ze = (e) => e instanceof U ? { ...e } : e;
|
|
1131
1131
|
function K(e, t) {
|
|
1132
1132
|
t = t || {};
|
|
1133
1133
|
const n = {};
|
|
@@ -1185,7 +1185,7 @@ function K(e, t) {
|
|
|
1185
1185
|
socketPath: o,
|
|
1186
1186
|
responseEncoding: o,
|
|
1187
1187
|
validateStatus: a,
|
|
1188
|
-
headers: (f, u, m) => s(
|
|
1188
|
+
headers: (f, u, m) => s(ze(f), ze(u), m, !0)
|
|
1189
1189
|
};
|
|
1190
1190
|
return l.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1191
1191
|
if (u === "__proto__" || u === "constructor" || u === "prototype") return;
|
|
@@ -1193,11 +1193,11 @@ function K(e, t) {
|
|
|
1193
1193
|
l.isUndefined(w) && m !== a || (n[u] = w);
|
|
1194
1194
|
}), n;
|
|
1195
1195
|
}
|
|
1196
|
-
const
|
|
1196
|
+
const gt = (e) => {
|
|
1197
1197
|
const t = K({}, e);
|
|
1198
1198
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = t;
|
|
1199
|
-
if (t.headers = o = U.from(o), t.url =
|
|
1200
|
-
|
|
1199
|
+
if (t.headers = o = U.from(o), t.url = ht(
|
|
1200
|
+
wt(t.baseURL, t.url, t.allowAbsoluteUrls),
|
|
1201
1201
|
e.params,
|
|
1202
1202
|
e.paramsSerializer
|
|
1203
1203
|
), a && o.set(
|
|
@@ -1206,7 +1206,7 @@ const bt = (e) => {
|
|
|
1206
1206
|
(a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")
|
|
1207
1207
|
)
|
|
1208
1208
|
), l.isFormData(n)) {
|
|
1209
|
-
if (
|
|
1209
|
+
if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
|
|
1210
1210
|
o.setContentType(void 0);
|
|
1211
1211
|
else if (l.isFunction(n.getHeaders)) {
|
|
1212
1212
|
const d = n.getHeaders(), f = ["content-type", "content-length"];
|
|
@@ -1215,14 +1215,14 @@ const bt = (e) => {
|
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
if (
|
|
1219
|
-
const d = s && i &&
|
|
1218
|
+
if (P.hasStandardBrowserEnv && (r && l.isFunction(r) && (r = r(t)), r || r !== !1 && Qn(t.url))) {
|
|
1219
|
+
const d = s && i && Zn.read(i);
|
|
1220
1220
|
d && o.set(s, d);
|
|
1221
1221
|
}
|
|
1222
1222
|
return t;
|
|
1223
|
-
},
|
|
1223
|
+
}, tr = typeof XMLHttpRequest < "u", nr = tr && function(e) {
|
|
1224
1224
|
return new Promise(function(n, r) {
|
|
1225
|
-
const s =
|
|
1225
|
+
const s = gt(e);
|
|
1226
1226
|
let i = s.data;
|
|
1227
1227
|
const o = U.from(s.headers).normalize();
|
|
1228
1228
|
let { responseType: a, onUploadProgress: d, onDownloadProgress: f } = s, u, m, w, g, c;
|
|
@@ -1231,58 +1231,58 @@ const bt = (e) => {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
let h = new XMLHttpRequest();
|
|
1233
1233
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1234
|
-
function
|
|
1234
|
+
function R() {
|
|
1235
1235
|
if (!h)
|
|
1236
1236
|
return;
|
|
1237
|
-
const
|
|
1237
|
+
const A = U.from(
|
|
1238
1238
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1239
1239
|
), _ = {
|
|
1240
1240
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1241
1241
|
status: h.status,
|
|
1242
1242
|
statusText: h.statusText,
|
|
1243
|
-
headers:
|
|
1243
|
+
headers: A,
|
|
1244
1244
|
config: e,
|
|
1245
1245
|
request: h
|
|
1246
1246
|
};
|
|
1247
|
-
|
|
1248
|
-
function(
|
|
1249
|
-
n(
|
|
1247
|
+
bt(
|
|
1248
|
+
function(x) {
|
|
1249
|
+
n(x), p();
|
|
1250
1250
|
},
|
|
1251
|
-
function(
|
|
1252
|
-
r(
|
|
1251
|
+
function(x) {
|
|
1252
|
+
r(x), p();
|
|
1253
1253
|
},
|
|
1254
1254
|
_
|
|
1255
1255
|
), h = null;
|
|
1256
1256
|
}
|
|
1257
|
-
"onloadend" in h ? h.onloadend =
|
|
1258
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1257
|
+
"onloadend" in h ? h.onloadend = R : h.onreadystatechange = function() {
|
|
1258
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(R);
|
|
1259
1259
|
}, h.onabort = function() {
|
|
1260
|
-
h && (r(new
|
|
1260
|
+
h && (r(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
|
|
1261
1261
|
}, h.onerror = function(T) {
|
|
1262
|
-
const _ = T && T.message ? T.message : "Network Error",
|
|
1263
|
-
|
|
1262
|
+
const _ = T && T.message ? T.message : "Network Error", I = new b(_, b.ERR_NETWORK, e, h);
|
|
1263
|
+
I.event = T || null, r(I), h = null;
|
|
1264
1264
|
}, h.ontimeout = function() {
|
|
1265
1265
|
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1266
|
-
const _ = s.transitional ||
|
|
1266
|
+
const _ = s.transitional || Ue;
|
|
1267
1267
|
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
|
|
1268
|
-
new
|
|
1268
|
+
new b(
|
|
1269
1269
|
T,
|
|
1270
|
-
_.clarifyTimeoutError ?
|
|
1270
|
+
_.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
1271
1271
|
e,
|
|
1272
1272
|
h
|
|
1273
1273
|
)
|
|
1274
1274
|
), h = null;
|
|
1275
1275
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && l.forEach(o.toJSON(), function(T, _) {
|
|
1276
1276
|
h.setRequestHeader(_, T);
|
|
1277
|
-
}), l.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), f && ([w, c] =
|
|
1278
|
-
h && (r(!
|
|
1277
|
+
}), l.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), f && ([w, c] = me(f, !0), h.addEventListener("progress", w)), d && h.upload && ([m, g] = me(d), h.upload.addEventListener("progress", m), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (A) => {
|
|
1278
|
+
h && (r(!A || A.type ? new ae(null, e, h) : A), h.abort(), h = null);
|
|
1279
1279
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1280
|
-
const k =
|
|
1281
|
-
if (k &&
|
|
1280
|
+
const k = Kn(s.url);
|
|
1281
|
+
if (k && P.protocols.indexOf(k) === -1) {
|
|
1282
1282
|
r(
|
|
1283
|
-
new
|
|
1283
|
+
new b(
|
|
1284
1284
|
"Unsupported protocol " + k + ":",
|
|
1285
|
-
|
|
1285
|
+
b.ERR_BAD_REQUEST,
|
|
1286
1286
|
e
|
|
1287
1287
|
)
|
|
1288
1288
|
);
|
|
@@ -1290,7 +1290,7 @@ const bt = (e) => {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
h.send(i || null);
|
|
1292
1292
|
});
|
|
1293
|
-
},
|
|
1293
|
+
}, rr = (e, t) => {
|
|
1294
1294
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1295
1295
|
if (t || n) {
|
|
1296
1296
|
let r = new AbortController(), s;
|
|
@@ -1299,12 +1299,12 @@ const bt = (e) => {
|
|
|
1299
1299
|
s = !0, a();
|
|
1300
1300
|
const u = f instanceof Error ? f : this.reason;
|
|
1301
1301
|
r.abort(
|
|
1302
|
-
u instanceof
|
|
1302
|
+
u instanceof b ? u : new ae(u instanceof Error ? u.message : u)
|
|
1303
1303
|
);
|
|
1304
1304
|
}
|
|
1305
1305
|
};
|
|
1306
1306
|
let o = t && setTimeout(() => {
|
|
1307
|
-
o = null, i(new
|
|
1307
|
+
o = null, i(new b(`timeout of ${t}ms exceeded`, b.ETIMEDOUT));
|
|
1308
1308
|
}, t);
|
|
1309
1309
|
const a = () => {
|
|
1310
1310
|
e && (o && clearTimeout(o), o = null, e.forEach((f) => {
|
|
@@ -1315,7 +1315,7 @@ const bt = (e) => {
|
|
|
1315
1315
|
const { signal: d } = r;
|
|
1316
1316
|
return d.unsubscribe = () => l.asap(a), d;
|
|
1317
1317
|
}
|
|
1318
|
-
},
|
|
1318
|
+
}, sr = function* (e, t) {
|
|
1319
1319
|
let n = e.byteLength;
|
|
1320
1320
|
if (n < t) {
|
|
1321
1321
|
yield e;
|
|
@@ -1324,10 +1324,10 @@ const bt = (e) => {
|
|
|
1324
1324
|
let r = 0, s;
|
|
1325
1325
|
for (; r < n; )
|
|
1326
1326
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1327
|
-
},
|
|
1328
|
-
for await (const n of
|
|
1329
|
-
yield*
|
|
1330
|
-
},
|
|
1327
|
+
}, or = async function* (e, t) {
|
|
1328
|
+
for await (const n of ir(e))
|
|
1329
|
+
yield* sr(n, t);
|
|
1330
|
+
}, ir = async function* (e) {
|
|
1331
1331
|
if (e[Symbol.asyncIterator]) {
|
|
1332
1332
|
yield* e;
|
|
1333
1333
|
return;
|
|
@@ -1343,8 +1343,8 @@ const bt = (e) => {
|
|
|
1343
1343
|
} finally {
|
|
1344
1344
|
await t.cancel();
|
|
1345
1345
|
}
|
|
1346
|
-
},
|
|
1347
|
-
const s =
|
|
1346
|
+
}, We = (e, t, n, r) => {
|
|
1347
|
+
const s = or(e, t);
|
|
1348
1348
|
let i = 0, o, a = (d) => {
|
|
1349
1349
|
o || (o = !0, r && r(d));
|
|
1350
1350
|
};
|
|
@@ -1375,29 +1375,29 @@ const bt = (e) => {
|
|
|
1375
1375
|
highWaterMark: 2
|
|
1376
1376
|
}
|
|
1377
1377
|
);
|
|
1378
|
-
},
|
|
1378
|
+
}, Je = 64 * 1024, { isFunction: ue } = l, ar = (({ Request: e, Response: t }) => ({
|
|
1379
1379
|
Request: e,
|
|
1380
1380
|
Response: t
|
|
1381
|
-
}))(l.global), { ReadableStream:
|
|
1381
|
+
}))(l.global), { ReadableStream: Ke, TextEncoder: Xe } = l.global, Ge = (e, ...t) => {
|
|
1382
1382
|
try {
|
|
1383
1383
|
return !!e(...t);
|
|
1384
1384
|
} catch {
|
|
1385
1385
|
return !1;
|
|
1386
1386
|
}
|
|
1387
|
-
},
|
|
1387
|
+
}, lr = (e) => {
|
|
1388
1388
|
e = l.merge.call(
|
|
1389
1389
|
{
|
|
1390
1390
|
skipUndefined: !0
|
|
1391
1391
|
},
|
|
1392
|
-
|
|
1392
|
+
ar,
|
|
1393
1393
|
e
|
|
1394
1394
|
);
|
|
1395
|
-
const { fetch: t, Request: n, Response: r } = e, s = t ?
|
|
1395
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? ue(t) : typeof fetch == "function", i = ue(n), o = ue(r);
|
|
1396
1396
|
if (!s)
|
|
1397
1397
|
return !1;
|
|
1398
|
-
const a = s &&
|
|
1398
|
+
const a = s && ue(Ke), d = s && (typeof Xe == "function" ? /* @__PURE__ */ ((c) => (p) => c.encode(p))(new Xe()) : async (c) => new Uint8Array(await new n(c).arrayBuffer())), f = i && a && Ge(() => {
|
|
1399
1399
|
let c = !1;
|
|
1400
|
-
const p = new
|
|
1400
|
+
const p = new Ke(), h = new n(P.origin, {
|
|
1401
1401
|
body: p,
|
|
1402
1402
|
method: "POST",
|
|
1403
1403
|
get duplex() {
|
|
@@ -1405,17 +1405,17 @@ const bt = (e) => {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
}).headers.has("Content-Type");
|
|
1407
1407
|
return p.cancel(), c && !h;
|
|
1408
|
-
}), u = o && a &&
|
|
1408
|
+
}), u = o && a && Ge(() => l.isReadableStream(new r("").body)), m = {
|
|
1409
1409
|
stream: u && ((c) => c.body)
|
|
1410
1410
|
};
|
|
1411
1411
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
|
|
1412
1412
|
!m[c] && (m[c] = (p, h) => {
|
|
1413
|
-
let
|
|
1414
|
-
if (
|
|
1415
|
-
return
|
|
1416
|
-
throw new
|
|
1413
|
+
let R = p && p[c];
|
|
1414
|
+
if (R)
|
|
1415
|
+
return R.call(p);
|
|
1416
|
+
throw new b(
|
|
1417
1417
|
`Response type '${c}' is not supported`,
|
|
1418
|
-
|
|
1418
|
+
b.ERR_NOT_SUPPORT,
|
|
1419
1419
|
h
|
|
1420
1420
|
);
|
|
1421
1421
|
});
|
|
@@ -1426,7 +1426,7 @@ const bt = (e) => {
|
|
|
1426
1426
|
if (l.isBlob(c))
|
|
1427
1427
|
return c.size;
|
|
1428
1428
|
if (l.isSpecCompliantForm(c))
|
|
1429
|
-
return (await new n(
|
|
1429
|
+
return (await new n(P.origin, {
|
|
1430
1430
|
method: "POST",
|
|
1431
1431
|
body: c
|
|
1432
1432
|
}).arrayBuffer()).byteLength;
|
|
@@ -1442,117 +1442,117 @@ const bt = (e) => {
|
|
|
1442
1442
|
let {
|
|
1443
1443
|
url: p,
|
|
1444
1444
|
method: h,
|
|
1445
|
-
data:
|
|
1445
|
+
data: R,
|
|
1446
1446
|
signal: k,
|
|
1447
|
-
cancelToken:
|
|
1447
|
+
cancelToken: A,
|
|
1448
1448
|
timeout: T,
|
|
1449
1449
|
onDownloadProgress: _,
|
|
1450
|
-
onUploadProgress:
|
|
1451
|
-
responseType:
|
|
1452
|
-
headers:
|
|
1453
|
-
withCredentials:
|
|
1454
|
-
fetchOptions:
|
|
1455
|
-
} =
|
|
1456
|
-
|
|
1457
|
-
let
|
|
1458
|
-
[k,
|
|
1450
|
+
onUploadProgress: I,
|
|
1451
|
+
responseType: x,
|
|
1452
|
+
headers: q,
|
|
1453
|
+
withCredentials: M = "same-origin",
|
|
1454
|
+
fetchOptions: le
|
|
1455
|
+
} = gt(c), te = t || fetch;
|
|
1456
|
+
x = x ? (x + "").toLowerCase() : "text";
|
|
1457
|
+
let X = rr(
|
|
1458
|
+
[k, A && A.toAbortSignal()],
|
|
1459
1459
|
T
|
|
1460
|
-
),
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1460
|
+
), $ = null;
|
|
1461
|
+
const v = X && X.unsubscribe && (() => {
|
|
1462
|
+
X.unsubscribe();
|
|
1463
1463
|
});
|
|
1464
|
-
let
|
|
1464
|
+
let ce;
|
|
1465
1465
|
try {
|
|
1466
|
-
if (
|
|
1467
|
-
let
|
|
1466
|
+
if (I && f && h !== "get" && h !== "head" && (ce = await g(q, R)) !== 0) {
|
|
1467
|
+
let C = new n(p, {
|
|
1468
1468
|
method: "POST",
|
|
1469
|
-
body:
|
|
1469
|
+
body: R,
|
|
1470
1470
|
duplex: "half"
|
|
1471
|
-
}),
|
|
1472
|
-
if (l.isFormData(
|
|
1473
|
-
const [
|
|
1474
|
-
|
|
1475
|
-
|
|
1471
|
+
}), D;
|
|
1472
|
+
if (l.isFormData(R) && (D = C.headers.get("content-type")) && q.setContentType(D), C.body) {
|
|
1473
|
+
const [z, j] = $e(
|
|
1474
|
+
ce,
|
|
1475
|
+
me(Ve(I))
|
|
1476
1476
|
);
|
|
1477
|
-
|
|
1477
|
+
R = We(C.body, Je, z, j);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
l.isString(
|
|
1481
|
-
const
|
|
1482
|
-
...
|
|
1483
|
-
signal:
|
|
1480
|
+
l.isString(M) || (M = M ? "include" : "omit");
|
|
1481
|
+
const y = i && "credentials" in n.prototype, S = {
|
|
1482
|
+
...le,
|
|
1483
|
+
signal: X,
|
|
1484
1484
|
method: h.toUpperCase(),
|
|
1485
|
-
headers:
|
|
1486
|
-
body:
|
|
1485
|
+
headers: q.normalize().toJSON(),
|
|
1486
|
+
body: R,
|
|
1487
1487
|
duplex: "half",
|
|
1488
|
-
credentials:
|
|
1488
|
+
credentials: y ? M : void 0
|
|
1489
1489
|
};
|
|
1490
|
-
|
|
1491
|
-
let
|
|
1492
|
-
const
|
|
1493
|
-
if (u && (_ ||
|
|
1494
|
-
const
|
|
1495
|
-
["status", "statusText", "headers"].forEach((
|
|
1496
|
-
|
|
1490
|
+
$ = i && new n(p, S);
|
|
1491
|
+
let E = await (i ? te($, le) : te(p, S));
|
|
1492
|
+
const L = u && (x === "stream" || x === "response");
|
|
1493
|
+
if (u && (_ || L && v)) {
|
|
1494
|
+
const C = {};
|
|
1495
|
+
["status", "statusText", "headers"].forEach((G) => {
|
|
1496
|
+
C[G] = E[G];
|
|
1497
1497
|
});
|
|
1498
|
-
const
|
|
1499
|
-
|
|
1500
|
-
|
|
1498
|
+
const D = l.toFiniteNumber(E.headers.get("content-length")), [z, j] = _ && $e(
|
|
1499
|
+
D,
|
|
1500
|
+
me(Ve(_), !0)
|
|
1501
1501
|
) || [];
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1502
|
+
E = new r(
|
|
1503
|
+
We(E.body, Je, z, () => {
|
|
1504
|
+
j && j(), v && v();
|
|
1505
1505
|
}),
|
|
1506
|
-
|
|
1506
|
+
C
|
|
1507
1507
|
);
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1510
|
-
let
|
|
1511
|
-
|
|
1509
|
+
x = x || "text";
|
|
1510
|
+
let V = await m[l.findKey(m, x) || "text"](
|
|
1511
|
+
E,
|
|
1512
1512
|
c
|
|
1513
1513
|
);
|
|
1514
|
-
return !
|
|
1515
|
-
|
|
1516
|
-
data:
|
|
1517
|
-
headers: U.from(
|
|
1518
|
-
status:
|
|
1519
|
-
statusText:
|
|
1514
|
+
return !L && v && v(), await new Promise((C, D) => {
|
|
1515
|
+
bt(C, D, {
|
|
1516
|
+
data: V,
|
|
1517
|
+
headers: U.from(E.headers),
|
|
1518
|
+
status: E.status,
|
|
1519
|
+
statusText: E.statusText,
|
|
1520
1520
|
config: c,
|
|
1521
|
-
request:
|
|
1521
|
+
request: $
|
|
1522
1522
|
});
|
|
1523
1523
|
});
|
|
1524
|
-
} catch (
|
|
1525
|
-
throw
|
|
1526
|
-
new
|
|
1524
|
+
} catch (y) {
|
|
1525
|
+
throw v && v(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
|
|
1526
|
+
new b(
|
|
1527
1527
|
"Network Error",
|
|
1528
|
-
|
|
1528
|
+
b.ERR_NETWORK,
|
|
1529
1529
|
c,
|
|
1530
|
-
|
|
1531
|
-
|
|
1530
|
+
$,
|
|
1531
|
+
y && y.response
|
|
1532
1532
|
),
|
|
1533
1533
|
{
|
|
1534
|
-
cause:
|
|
1534
|
+
cause: y.cause || y
|
|
1535
1535
|
}
|
|
1536
|
-
) :
|
|
1536
|
+
) : b.from(y, y && y.code, c, $, y && y.response);
|
|
1537
1537
|
}
|
|
1538
1538
|
};
|
|
1539
|
-
},
|
|
1539
|
+
}, cr = /* @__PURE__ */ new Map(), Et = (e) => {
|
|
1540
1540
|
let t = e && e.env || {};
|
|
1541
1541
|
const { fetch: n, Request: r, Response: s } = t, i = [r, s, n];
|
|
1542
|
-
let o = i.length, a = o, d, f, u =
|
|
1542
|
+
let o = i.length, a = o, d, f, u = cr;
|
|
1543
1543
|
for (; a--; )
|
|
1544
|
-
d = i[a], f = u.get(d), f === void 0 && u.set(d, f = a ? /* @__PURE__ */ new Map() :
|
|
1544
|
+
d = i[a], f = u.get(d), f === void 0 && u.set(d, f = a ? /* @__PURE__ */ new Map() : lr(t)), u = f;
|
|
1545
1545
|
return f;
|
|
1546
1546
|
};
|
|
1547
|
-
|
|
1548
|
-
const
|
|
1549
|
-
http:
|
|
1550
|
-
xhr:
|
|
1547
|
+
Et();
|
|
1548
|
+
const Fe = {
|
|
1549
|
+
http: Cn,
|
|
1550
|
+
xhr: nr,
|
|
1551
1551
|
fetch: {
|
|
1552
|
-
get:
|
|
1552
|
+
get: Et
|
|
1553
1553
|
}
|
|
1554
1554
|
};
|
|
1555
|
-
l.forEach(
|
|
1555
|
+
l.forEach(Fe, (e, t) => {
|
|
1556
1556
|
if (e) {
|
|
1557
1557
|
try {
|
|
1558
1558
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1561,8 +1561,8 @@ l.forEach(ke, (e, t) => {
|
|
|
1561
1561
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1562
1562
|
}
|
|
1563
1563
|
});
|
|
1564
|
-
const
|
|
1565
|
-
function
|
|
1564
|
+
const Qe = (e) => `- ${e}`, ur = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1565
|
+
function fr(e, t) {
|
|
1566
1566
|
e = l.isArray(e) ? e : [e];
|
|
1567
1567
|
const { length: n } = e;
|
|
1568
1568
|
let r, s;
|
|
@@ -1570,8 +1570,8 @@ function ur(e, t) {
|
|
|
1570
1570
|
for (let o = 0; o < n; o++) {
|
|
1571
1571
|
r = e[o];
|
|
1572
1572
|
let a;
|
|
1573
|
-
if (s = r, !
|
|
1574
|
-
throw new
|
|
1573
|
+
if (s = r, !ur(r) && (s = Fe[(a = String(r)).toLowerCase()], s === void 0))
|
|
1574
|
+
throw new b(`Unknown adapter '${a}'`);
|
|
1575
1575
|
if (s && (l.isFunction(s) || (s = s.get(t))))
|
|
1576
1576
|
break;
|
|
1577
1577
|
i[a || "#" + o] = s;
|
|
@@ -1581,38 +1581,38 @@ function ur(e, t) {
|
|
|
1581
1581
|
([d, f]) => `adapter ${d} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1582
1582
|
);
|
|
1583
1583
|
let a = n ? o.length > 1 ? `since :
|
|
1584
|
-
` + o.map(
|
|
1585
|
-
`) : " " +
|
|
1586
|
-
throw new
|
|
1584
|
+
` + o.map(Qe).join(`
|
|
1585
|
+
`) : " " + Qe(o[0]) : "as no adapter specified";
|
|
1586
|
+
throw new b(
|
|
1587
1587
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1588
1588
|
"ERR_NOT_SUPPORT"
|
|
1589
1589
|
);
|
|
1590
1590
|
}
|
|
1591
1591
|
return s;
|
|
1592
1592
|
}
|
|
1593
|
-
const
|
|
1593
|
+
const Rt = {
|
|
1594
1594
|
/**
|
|
1595
1595
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1596
1596
|
* @type {Function}
|
|
1597
1597
|
*/
|
|
1598
|
-
getAdapter:
|
|
1598
|
+
getAdapter: fr,
|
|
1599
1599
|
/**
|
|
1600
1600
|
* Exposes all known adapters
|
|
1601
1601
|
* @type {Object<string, Function|Object>}
|
|
1602
1602
|
*/
|
|
1603
|
-
adapters:
|
|
1603
|
+
adapters: Fe
|
|
1604
1604
|
};
|
|
1605
|
-
function
|
|
1605
|
+
function Ae(e) {
|
|
1606
1606
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1607
1607
|
throw new ae(null, e);
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1610
|
-
return
|
|
1609
|
+
function Ze(e) {
|
|
1610
|
+
return Ae(e), e.headers = U.from(e.headers), e.data = Oe.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rt.getAdapter(e.adapter || ie.adapter, e)(e).then(
|
|
1611
1611
|
function(r) {
|
|
1612
|
-
return
|
|
1612
|
+
return Ae(e), r.data = Oe.call(e, e.transformResponse, r), r.headers = U.from(r.headers), r;
|
|
1613
1613
|
},
|
|
1614
1614
|
function(r) {
|
|
1615
|
-
return
|
|
1615
|
+
return yt(r) || (Ae(e), r && r.response && (r.response.data = Oe.call(
|
|
1616
1616
|
e,
|
|
1617
1617
|
e.transformResponse,
|
|
1618
1618
|
r.response
|
|
@@ -1620,24 +1620,24 @@ function Ge(e) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
);
|
|
1622
1622
|
}
|
|
1623
|
-
const
|
|
1623
|
+
const St = "1.14.0", Ee = {};
|
|
1624
1624
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1625
|
-
|
|
1625
|
+
Ee[e] = function(r) {
|
|
1626
1626
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1627
1627
|
};
|
|
1628
1628
|
});
|
|
1629
|
-
const
|
|
1630
|
-
|
|
1629
|
+
const Ye = {};
|
|
1630
|
+
Ee.transitional = function(t, n, r) {
|
|
1631
1631
|
function s(i, o) {
|
|
1632
|
-
return "[Axios v" +
|
|
1632
|
+
return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1633
1633
|
}
|
|
1634
1634
|
return (i, o, a) => {
|
|
1635
1635
|
if (t === !1)
|
|
1636
|
-
throw new
|
|
1636
|
+
throw new b(
|
|
1637
1637
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1638
|
-
|
|
1638
|
+
b.ERR_DEPRECATED
|
|
1639
1639
|
);
|
|
1640
|
-
return n && !
|
|
1640
|
+
return n && !Ye[o] && (Ye[o] = !0, console.warn(
|
|
1641
1641
|
s(
|
|
1642
1642
|
o,
|
|
1643
1643
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1645,12 +1645,12 @@ we.transitional = function(t, n, r) {
|
|
|
1645
1645
|
)), t ? t(i, o, a) : !0;
|
|
1646
1646
|
};
|
|
1647
1647
|
};
|
|
1648
|
-
|
|
1648
|
+
Ee.spelling = function(t) {
|
|
1649
1649
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1650
1650
|
};
|
|
1651
|
-
function
|
|
1651
|
+
function dr(e, t, n) {
|
|
1652
1652
|
if (typeof e != "object")
|
|
1653
|
-
throw new
|
|
1653
|
+
throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
|
|
1654
1654
|
const r = Object.keys(e);
|
|
1655
1655
|
let s = r.length;
|
|
1656
1656
|
for (; s-- > 0; ) {
|
|
@@ -1658,25 +1658,25 @@ function fr(e, t, n) {
|
|
|
1658
1658
|
if (o) {
|
|
1659
1659
|
const a = e[i], d = a === void 0 || o(a, i, e);
|
|
1660
1660
|
if (d !== !0)
|
|
1661
|
-
throw new
|
|
1661
|
+
throw new b(
|
|
1662
1662
|
"option " + i + " must be " + d,
|
|
1663
|
-
|
|
1663
|
+
b.ERR_BAD_OPTION_VALUE
|
|
1664
1664
|
);
|
|
1665
1665
|
continue;
|
|
1666
1666
|
}
|
|
1667
1667
|
if (n !== !0)
|
|
1668
|
-
throw new
|
|
1668
|
+
throw new b("Unknown option " + i, b.ERR_BAD_OPTION);
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
1671
|
-
const
|
|
1672
|
-
assertOptions:
|
|
1673
|
-
validators:
|
|
1674
|
-
},
|
|
1671
|
+
const he = {
|
|
1672
|
+
assertOptions: dr,
|
|
1673
|
+
validators: Ee
|
|
1674
|
+
}, F = he.validators;
|
|
1675
1675
|
let J = class {
|
|
1676
1676
|
constructor(t) {
|
|
1677
1677
|
this.defaults = t || {}, this.interceptors = {
|
|
1678
|
-
request: new
|
|
1679
|
-
response: new
|
|
1678
|
+
request: new qe(),
|
|
1679
|
+
response: new qe()
|
|
1680
1680
|
};
|
|
1681
1681
|
}
|
|
1682
1682
|
/**
|
|
@@ -1707,29 +1707,29 @@ let J = class {
|
|
|
1707
1707
|
_request(t, n) {
|
|
1708
1708
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = K(this.defaults, n);
|
|
1709
1709
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1710
|
-
r !== void 0 &&
|
|
1710
|
+
r !== void 0 && he.assertOptions(
|
|
1711
1711
|
r,
|
|
1712
1712
|
{
|
|
1713
|
-
silentJSONParsing:
|
|
1714
|
-
forcedJSONParsing:
|
|
1715
|
-
clarifyTimeoutError:
|
|
1716
|
-
legacyInterceptorReqResOrdering:
|
|
1713
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1714
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1715
|
+
clarifyTimeoutError: F.transitional(F.boolean),
|
|
1716
|
+
legacyInterceptorReqResOrdering: F.transitional(F.boolean)
|
|
1717
1717
|
},
|
|
1718
1718
|
!1
|
|
1719
1719
|
), s != null && (l.isFunction(s) ? n.paramsSerializer = {
|
|
1720
1720
|
serialize: s
|
|
1721
|
-
} :
|
|
1721
|
+
} : he.assertOptions(
|
|
1722
1722
|
s,
|
|
1723
1723
|
{
|
|
1724
|
-
encode:
|
|
1725
|
-
serialize:
|
|
1724
|
+
encode: F.function,
|
|
1725
|
+
serialize: F.function
|
|
1726
1726
|
},
|
|
1727
1727
|
!0
|
|
1728
|
-
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1728
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), he.assertOptions(
|
|
1729
1729
|
n,
|
|
1730
1730
|
{
|
|
1731
|
-
baseUrl:
|
|
1732
|
-
withXsrfToken:
|
|
1731
|
+
baseUrl: F.spelling("baseURL"),
|
|
1732
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1733
1733
|
},
|
|
1734
1734
|
!0
|
|
1735
1735
|
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1743,7 +1743,7 @@ let J = class {
|
|
|
1743
1743
|
if (typeof p.runWhen == "function" && p.runWhen(n) === !1)
|
|
1744
1744
|
return;
|
|
1745
1745
|
d = d && p.synchronous;
|
|
1746
|
-
const h = n.transitional ||
|
|
1746
|
+
const h = n.transitional || Ue;
|
|
1747
1747
|
h && h.legacyInterceptorReqResOrdering ? a.unshift(p.fulfilled, p.rejected) : a.push(p.fulfilled, p.rejected);
|
|
1748
1748
|
});
|
|
1749
1749
|
const f = [];
|
|
@@ -1752,7 +1752,7 @@ let J = class {
|
|
|
1752
1752
|
});
|
|
1753
1753
|
let u, m = 0, w;
|
|
1754
1754
|
if (!d) {
|
|
1755
|
-
const c = [
|
|
1755
|
+
const c = [Ze.bind(this), void 0];
|
|
1756
1756
|
for (c.unshift(...a), c.push(...f), w = c.length, u = Promise.resolve(n); m < w; )
|
|
1757
1757
|
u = u.then(c[m++], c[m++]);
|
|
1758
1758
|
return u;
|
|
@@ -1769,7 +1769,7 @@ let J = class {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
try {
|
|
1772
|
-
u =
|
|
1772
|
+
u = Ze.call(this, g);
|
|
1773
1773
|
} catch (c) {
|
|
1774
1774
|
return Promise.reject(c);
|
|
1775
1775
|
}
|
|
@@ -1779,8 +1779,8 @@ let J = class {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
getUri(t) {
|
|
1781
1781
|
t = K(this.defaults, t);
|
|
1782
|
-
const n =
|
|
1783
|
-
return
|
|
1782
|
+
const n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1783
|
+
return ht(n, t.params, t.paramsSerializer);
|
|
1784
1784
|
}
|
|
1785
1785
|
};
|
|
1786
1786
|
l.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1811,7 +1811,7 @@ l.forEach(["post", "put", "patch"], function(t) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
1813
1813
|
});
|
|
1814
|
-
let
|
|
1814
|
+
let pr = class Ot {
|
|
1815
1815
|
constructor(t) {
|
|
1816
1816
|
if (typeof t != "function")
|
|
1817
1817
|
throw new TypeError("executor must be a function.");
|
|
@@ -1877,22 +1877,22 @@ let dr = class Rt {
|
|
|
1877
1877
|
static source() {
|
|
1878
1878
|
let t;
|
|
1879
1879
|
return {
|
|
1880
|
-
token: new
|
|
1880
|
+
token: new Ot(function(s) {
|
|
1881
1881
|
t = s;
|
|
1882
1882
|
}),
|
|
1883
1883
|
cancel: t
|
|
1884
1884
|
};
|
|
1885
1885
|
}
|
|
1886
1886
|
};
|
|
1887
|
-
function
|
|
1887
|
+
function hr(e) {
|
|
1888
1888
|
return function(n) {
|
|
1889
1889
|
return e.apply(null, n);
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function mr(e) {
|
|
1893
1893
|
return l.isObject(e) && e.isAxiosError === !0;
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1895
|
+
const xe = {
|
|
1896
1896
|
Continue: 100,
|
|
1897
1897
|
SwitchingProtocols: 101,
|
|
1898
1898
|
Processing: 102,
|
|
@@ -1963,68 +1963,68 @@ const Pe = {
|
|
|
1963
1963
|
SslHandshakeFailed: 525,
|
|
1964
1964
|
InvalidSslCertificate: 526
|
|
1965
1965
|
};
|
|
1966
|
-
Object.entries(
|
|
1967
|
-
|
|
1966
|
+
Object.entries(xe).forEach(([e, t]) => {
|
|
1967
|
+
xe[t] = e;
|
|
1968
1968
|
});
|
|
1969
|
-
function
|
|
1970
|
-
const t = new J(e), n =
|
|
1969
|
+
function At(e) {
|
|
1970
|
+
const t = new J(e), n = rt(J.prototype.request, t);
|
|
1971
1971
|
return l.extend(n, J.prototype, t, { allOwnKeys: !0 }), l.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1972
|
-
return
|
|
1972
|
+
return At(K(e, s));
|
|
1973
1973
|
}, n;
|
|
1974
1974
|
}
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1975
|
+
const O = At(ie);
|
|
1976
|
+
O.Axios = J;
|
|
1977
|
+
O.CanceledError = ae;
|
|
1978
|
+
O.CancelToken = pr;
|
|
1979
|
+
O.isCancel = yt;
|
|
1980
|
+
O.VERSION = St;
|
|
1981
|
+
O.toFormData = ge;
|
|
1982
|
+
O.AxiosError = b;
|
|
1983
|
+
O.Cancel = O.CanceledError;
|
|
1984
|
+
O.all = function(t) {
|
|
1985
1985
|
return Promise.all(t);
|
|
1986
1986
|
};
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1987
|
+
O.spread = hr;
|
|
1988
|
+
O.isAxiosError = mr;
|
|
1989
|
+
O.mergeConfig = K;
|
|
1990
|
+
O.AxiosHeaders = U;
|
|
1991
|
+
O.formToJSON = (e) => mt(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
1992
|
+
O.getAdapter = Rt.getAdapter;
|
|
1993
|
+
O.HttpStatusCode = xe;
|
|
1994
|
+
O.default = O;
|
|
1995
1995
|
const {
|
|
1996
|
-
Axios:
|
|
1997
|
-
AxiosError:
|
|
1998
|
-
CanceledError:
|
|
1999
|
-
isCancel:
|
|
2000
|
-
CancelToken:
|
|
2001
|
-
VERSION:
|
|
2002
|
-
all:
|
|
2003
|
-
Cancel:
|
|
2004
|
-
isAxiosError:
|
|
2005
|
-
spread:
|
|
2006
|
-
toFormData:
|
|
2007
|
-
AxiosHeaders:
|
|
2008
|
-
HttpStatusCode:
|
|
2009
|
-
formToJSON:
|
|
2010
|
-
getAdapter:
|
|
2011
|
-
mergeConfig:
|
|
2012
|
-
} =
|
|
2013
|
-
baseURL: "http://t1.lingganai.cyou:90",
|
|
2014
|
-
// Assuming backend runs on 8080
|
|
1996
|
+
Axios: Or,
|
|
1997
|
+
AxiosError: Ar,
|
|
1998
|
+
CanceledError: Tr,
|
|
1999
|
+
isCancel: Cr,
|
|
2000
|
+
CancelToken: Pr,
|
|
2001
|
+
VERSION: xr,
|
|
2002
|
+
all: _r,
|
|
2003
|
+
Cancel: Nr,
|
|
2004
|
+
isAxiosError: Ur,
|
|
2005
|
+
spread: kr,
|
|
2006
|
+
toFormData: Fr,
|
|
2007
|
+
AxiosHeaders: vr,
|
|
2008
|
+
HttpStatusCode: Br,
|
|
2009
|
+
formToJSON: Ir,
|
|
2010
|
+
getAdapter: Lr,
|
|
2011
|
+
mergeConfig: Dr
|
|
2012
|
+
} = O, ve = O.create({
|
|
2015
2013
|
timeout: 1e4
|
|
2016
|
-
})
|
|
2017
|
-
|
|
2014
|
+
}), yr = (e) => {
|
|
2015
|
+
ve.defaults.baseURL = e ?? void 0;
|
|
2016
|
+
};
|
|
2017
|
+
ve.interceptors.response.use(
|
|
2018
2018
|
(e) => {
|
|
2019
2019
|
const t = e.data;
|
|
2020
2020
|
return t.code === 200 ? t.data : Promise.reject(new Error(t.message || "Error"));
|
|
2021
2021
|
},
|
|
2022
2022
|
(e) => Promise.reject(e)
|
|
2023
2023
|
);
|
|
2024
|
-
const
|
|
2024
|
+
const fe = (e, t) => ve.post("/api/screen/control", {
|
|
2025
2025
|
screenClientId: e,
|
|
2026
2026
|
action: t
|
|
2027
|
-
}),
|
|
2027
|
+
}), br = /* @__PURE__ */ et({
|
|
2028
2028
|
__name: "VirtualHumanEventAdapter",
|
|
2029
2029
|
props: {
|
|
2030
2030
|
// 屏幕客户端ID
|
|
@@ -2036,6 +2036,11 @@ const Oe = (e, t) => Ot.post("/api/screen/control", {
|
|
|
2036
2036
|
wsUrl: {
|
|
2037
2037
|
type: String,
|
|
2038
2038
|
required: !0
|
|
2039
|
+
},
|
|
2040
|
+
// 控制平台 Host 地址,为 null 时走相对路径
|
|
2041
|
+
controlHostUrl: {
|
|
2042
|
+
type: String,
|
|
2043
|
+
default: null
|
|
2039
2044
|
}
|
|
2040
2045
|
},
|
|
2041
2046
|
emits: ["eventNotifaction", "controlEvent", "end", "pause", "connected", "error", "playComplete"],
|
|
@@ -2045,156 +2050,163 @@ const Oe = (e, t) => Ot.post("/api/screen/control", {
|
|
|
2045
2050
|
const w = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
|
|
2046
2051
|
let p = null;
|
|
2047
2052
|
t({
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2053
|
+
play: () => o.value ? fe(r.screenClientId, "play").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
|
|
2054
|
+
pause: () => o.value ? fe(r.screenClientId, "pause").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
|
|
2055
|
+
resume: () => o.value ? fe(r.screenClientId, "resume").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1),
|
|
2056
|
+
stop: () => o.value ? fe(r.screenClientId, "stop").then(() => Promise.resolve(!0)).catch(() => Promise.reject(!1)) : Promise.reject(!1)
|
|
2051
2057
|
});
|
|
2052
|
-
const
|
|
2053
|
-
if (typeof
|
|
2054
|
-
if (typeof
|
|
2055
|
-
const
|
|
2056
|
-
if (Number.isFinite(
|
|
2058
|
+
const T = (y) => {
|
|
2059
|
+
if (typeof y == "number" && Number.isFinite(y)) return y;
|
|
2060
|
+
if (typeof y == "string" && y.trim() !== "") {
|
|
2061
|
+
const S = Number(y);
|
|
2062
|
+
if (Number.isFinite(S)) return S;
|
|
2057
2063
|
}
|
|
2058
2064
|
return null;
|
|
2059
|
-
}, T = () => {
|
|
2060
|
-
p !== null && (window.clearInterval(p), p = null);
|
|
2061
2065
|
}, _ = () => {
|
|
2062
|
-
|
|
2063
|
-
},
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
+
p !== null && (window.clearInterval(p), p = null);
|
|
2067
|
+
}, I = () => {
|
|
2068
|
+
_(), w.clear(), g.clear(), c.clear();
|
|
2069
|
+
}, x = () => {
|
|
2070
|
+
for (const [y] of w)
|
|
2071
|
+
if (!g.has(y) && c.has(y)) return !0;
|
|
2066
2072
|
return !1;
|
|
2067
|
-
},
|
|
2073
|
+
}, q = () => {
|
|
2068
2074
|
if (!(!a || a.state !== "running")) {
|
|
2069
|
-
for (const [
|
|
2070
|
-
if (g.has(
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2075
|
+
for (const [y, S] of c) {
|
|
2076
|
+
if (g.has(y)) continue;
|
|
2077
|
+
const E = w.get(y);
|
|
2078
|
+
E && a.currentTime + 5e-3 >= S && (g.add(y), w.delete(y), s("eventNotifaction", E));
|
|
2073
2079
|
}
|
|
2074
|
-
|
|
2080
|
+
x() || _();
|
|
2075
2081
|
}
|
|
2076
|
-
},
|
|
2077
|
-
p === null &&
|
|
2078
|
-
|
|
2082
|
+
}, M = () => {
|
|
2083
|
+
p === null && x() && (p = window.setInterval(() => {
|
|
2084
|
+
q();
|
|
2079
2085
|
}, 30));
|
|
2080
|
-
},
|
|
2086
|
+
}, le = () => {
|
|
2081
2087
|
a || (a = new (window.AudioContext || window.webkitAudioContext)({
|
|
2082
2088
|
sampleRate: 24e3
|
|
2083
2089
|
})), a.state === "suspended" && !m && a.resume();
|
|
2084
|
-
},
|
|
2090
|
+
}, te = () => {
|
|
2085
2091
|
f && u === 0 && (s("playComplete", r.screenClientId), f = !1);
|
|
2086
|
-
},
|
|
2087
|
-
if (
|
|
2092
|
+
}, X = (y, S) => {
|
|
2093
|
+
if (le(), !!a)
|
|
2088
2094
|
try {
|
|
2089
|
-
const
|
|
2090
|
-
for (let
|
|
2091
|
-
|
|
2092
|
-
const
|
|
2093
|
-
for (let
|
|
2094
|
-
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
const
|
|
2098
|
-
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2101
|
-
u--,
|
|
2095
|
+
const E = window.atob(y), L = E.length, V = new Uint8Array(L);
|
|
2096
|
+
for (let H = 0; H < L; H++)
|
|
2097
|
+
V[H] = E.charCodeAt(H);
|
|
2098
|
+
const C = new Int16Array(V.buffer), D = new Float32Array(C.length);
|
|
2099
|
+
for (let H = 0; H < C.length; H++)
|
|
2100
|
+
D[H] = C[H] / 32768;
|
|
2101
|
+
const z = a.createBuffer(1, D.length, 24e3);
|
|
2102
|
+
z.getChannelData(0).set(D);
|
|
2103
|
+
const j = a.createBufferSource();
|
|
2104
|
+
j.buffer = z, j.connect(a.destination);
|
|
2105
|
+
const G = d < a.currentTime ? a.currentTime : d;
|
|
2106
|
+
S !== null && !c.has(S) && (c.set(S, G), q(), M()), j.start(G), d = G + z.duration, u++, j.onended = () => {
|
|
2107
|
+
u--, te();
|
|
2102
2108
|
};
|
|
2103
|
-
} catch (
|
|
2104
|
-
console.error("[VirtualHumanEventAdapter] Failed to decode and play audio:",
|
|
2109
|
+
} catch (E) {
|
|
2110
|
+
console.error("[VirtualHumanEventAdapter] Failed to decode and play audio:", E);
|
|
2105
2111
|
}
|
|
2106
|
-
},
|
|
2107
|
-
switch (
|
|
2112
|
+
}, $ = (y) => {
|
|
2113
|
+
switch (y) {
|
|
2108
2114
|
case "play":
|
|
2109
|
-
|
|
2115
|
+
I(), f = !1, u = 0, d = 0, m = !1, a && a.state === "suspended" && a.resume();
|
|
2110
2116
|
break;
|
|
2111
2117
|
case "resume":
|
|
2112
|
-
m = !1, a && a.state === "suspended" && a.resume(),
|
|
2118
|
+
m = !1, a && a.state === "suspended" && a.resume(), q(), M();
|
|
2113
2119
|
break;
|
|
2114
2120
|
case "pause":
|
|
2115
2121
|
m = !0, a && a.state === "running" && a.suspend();
|
|
2116
2122
|
break;
|
|
2117
2123
|
case "stop":
|
|
2118
|
-
|
|
2124
|
+
I(), m = !1, a && (a.close(), a = null), d = 0, f = !1, u = 0;
|
|
2119
2125
|
break;
|
|
2120
2126
|
case "tts_complete":
|
|
2121
|
-
f = !0,
|
|
2127
|
+
f = !0, te();
|
|
2122
2128
|
break;
|
|
2123
2129
|
default:
|
|
2124
|
-
console.warn(`[VirtualHumanEventAdapter] Unknown control action: ${
|
|
2130
|
+
console.warn(`[VirtualHumanEventAdapter] Unknown control action: ${y}`);
|
|
2125
2131
|
}
|
|
2126
|
-
},
|
|
2132
|
+
}, v = () => {
|
|
2127
2133
|
i.value && i.value.close();
|
|
2128
2134
|
try {
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2135
|
+
const y = new URL(r.wsUrl);
|
|
2136
|
+
y.searchParams.append("sessionId", r.screenClientId + "-event"), i.value = new WebSocket(y.toString()), i.value.onopen = () => {
|
|
2131
2137
|
o.value = !0, s("connected"), console.log(`[VirtualHumanEventAdapter] Connected to ${r.wsUrl} for session ${r.screenClientId}-event`);
|
|
2132
|
-
}, i.value.onmessage = (
|
|
2138
|
+
}, i.value.onmessage = (S) => {
|
|
2133
2139
|
try {
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2136
|
-
} catch (
|
|
2137
|
-
console.error("[VirtualHumanEventAdapter] Failed to parse message:",
|
|
2140
|
+
const E = JSON.parse(S.data);
|
|
2141
|
+
ce(E);
|
|
2142
|
+
} catch (E) {
|
|
2143
|
+
console.error("[VirtualHumanEventAdapter] Failed to parse message:", S.data, E);
|
|
2138
2144
|
}
|
|
2139
|
-
}, i.value.onerror = (
|
|
2140
|
-
console.error("[VirtualHumanEventAdapter] WebSocket error:",
|
|
2145
|
+
}, i.value.onerror = (S) => {
|
|
2146
|
+
console.error("[VirtualHumanEventAdapter] WebSocket error:", S), s("error", S);
|
|
2141
2147
|
}, i.value.onclose = () => {
|
|
2142
2148
|
o.value = !1, console.log("[VirtualHumanEventAdapter] WebSocket disconnected");
|
|
2143
2149
|
};
|
|
2144
|
-
} catch (
|
|
2145
|
-
console.error("[VirtualHumanEventAdapter] Failed to initialize WebSocket:",
|
|
2150
|
+
} catch (y) {
|
|
2151
|
+
console.error("[VirtualHumanEventAdapter] Failed to initialize WebSocket:", y), s("error", y);
|
|
2146
2152
|
}
|
|
2147
|
-
},
|
|
2148
|
-
const { type:
|
|
2149
|
-
switch (
|
|
2153
|
+
}, ce = (y) => {
|
|
2154
|
+
const { type: S, payload: E, action: L } = y;
|
|
2155
|
+
switch (S) {
|
|
2150
2156
|
case "audio":
|
|
2151
|
-
const
|
|
2152
|
-
if (
|
|
2153
|
-
const
|
|
2154
|
-
|
|
2157
|
+
const V = (E == null ? void 0 : E.data) || y.data;
|
|
2158
|
+
if (V) {
|
|
2159
|
+
const C = T((E == null ? void 0 : E.index) ?? y.index);
|
|
2160
|
+
X(V, C);
|
|
2155
2161
|
}
|
|
2156
2162
|
break;
|
|
2157
2163
|
case "send_event":
|
|
2158
|
-
if (
|
|
2159
|
-
console.log("adapter send_event:",
|
|
2160
|
-
const
|
|
2161
|
-
if (
|
|
2162
|
-
s("eventNotifaction",
|
|
2164
|
+
if (y.event) {
|
|
2165
|
+
console.log("adapter send_event:", y);
|
|
2166
|
+
const C = T(y.index);
|
|
2167
|
+
if (C === null) {
|
|
2168
|
+
s("eventNotifaction", y);
|
|
2163
2169
|
break;
|
|
2164
2170
|
}
|
|
2165
|
-
w.set(
|
|
2171
|
+
w.set(C, y), q(), M();
|
|
2166
2172
|
}
|
|
2167
2173
|
break;
|
|
2168
2174
|
case "control":
|
|
2169
|
-
|
|
2175
|
+
L && (console.log("adapter control:", L), s("controlEvent", L), $(L));
|
|
2170
2176
|
break;
|
|
2171
2177
|
case "end":
|
|
2172
|
-
console.log("adapter end:",
|
|
2178
|
+
console.log("adapter end:", E), s("end", E);
|
|
2173
2179
|
break;
|
|
2174
2180
|
case "pause":
|
|
2175
|
-
console.log("adapter pause:",
|
|
2181
|
+
console.log("adapter pause:", E), s("pause", E);
|
|
2176
2182
|
break;
|
|
2177
2183
|
default:
|
|
2178
|
-
console.warn(`[VirtualHumanEventAdapter] Unknown message type: ${
|
|
2184
|
+
console.warn(`[VirtualHumanEventAdapter] Unknown message type: ${S}`);
|
|
2179
2185
|
}
|
|
2180
2186
|
};
|
|
2181
|
-
return
|
|
2182
|
-
r.screenClientId && r.wsUrl &&
|
|
2183
|
-
}),
|
|
2184
|
-
r.screenClientId && r.wsUrl &&
|
|
2185
|
-
}),
|
|
2186
|
-
|
|
2187
|
-
|
|
2187
|
+
return Z(() => r.screenClientId, () => {
|
|
2188
|
+
r.screenClientId && r.wsUrl && v();
|
|
2189
|
+
}), Z(() => r.wsUrl, () => {
|
|
2190
|
+
r.screenClientId && r.wsUrl && v();
|
|
2191
|
+
}), Z(
|
|
2192
|
+
() => r.controlHostUrl,
|
|
2193
|
+
() => {
|
|
2194
|
+
console.log("adapter controlHostUrl:", r.controlHostUrl), yr(r.controlHostUrl);
|
|
2195
|
+
},
|
|
2196
|
+
{ immediate: !0 }
|
|
2197
|
+
), tt(() => {
|
|
2198
|
+
r.screenClientId && r.wsUrl && v();
|
|
2199
|
+
}), nt(() => {
|
|
2188
2200
|
i.value && i.value.close(), a && a.close();
|
|
2189
|
-
}), (
|
|
2201
|
+
}), (y, S) => kt(y.$slots, "default");
|
|
2190
2202
|
}
|
|
2191
|
-
}),
|
|
2192
|
-
e.component("VirtualHumanPersona",
|
|
2193
|
-
},
|
|
2194
|
-
install:
|
|
2203
|
+
}), wr = (e) => {
|
|
2204
|
+
e.component("VirtualHumanPersona", It), e.component("VirtualHumanEventAdapter", br);
|
|
2205
|
+
}, jr = {
|
|
2206
|
+
install: wr
|
|
2195
2207
|
};
|
|
2196
2208
|
export {
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2209
|
+
br as VirtualHumanEventAdapter,
|
|
2210
|
+
It as VirtualHumanPersona,
|
|
2211
|
+
jr as default
|
|
2200
2212
|
};
|