virtual-human-cf 1.5.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 +11 -1
- package/dist/api/request.d.ts +1 -0
- package/dist/components/VirtualHumanEventAdapter.vue.d.ts +13 -1
- package/dist/virtual-human-cf.es.js +175 -164
- 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 +15 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const Ft = ["src", "muted"], vt = /* @__PURE__ */
|
|
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 Ft = ["src", "muted"], vt = /* @__PURE__ */ Ye({
|
|
|
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 Ft = ["src", "muted"], vt = /* @__PURE__ */ Ye({
|
|
|
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) => (
|
|
96
|
+
}), (g, c) => (Be(), Tt(Ct, { name: "fade" }, {
|
|
97
97
|
default: Pt(() => [
|
|
98
|
-
e.visible ? (
|
|
98
|
+
e.visible ? (Be(), xt("div", {
|
|
99
99
|
key: 0,
|
|
100
100
|
class: Nt(["virtual-human-container", { "is-dark": e.isDark }]),
|
|
101
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,
|
|
@@ -131,28 +131,28 @@ const Ft = ["src", "muted"], vt = /* @__PURE__ */ Ye({
|
|
|
131
131
|
n[r] = s;
|
|
132
132
|
return n;
|
|
133
133
|
}, It = /* @__PURE__ */ Bt(vt, [["__scopeId", "data-v-02ec3645"]]);
|
|
134
|
-
function
|
|
134
|
+
function rt(e, t) {
|
|
135
135
|
return function() {
|
|
136
136
|
return e.apply(t, arguments);
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
const { toString: Lt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ye, toStringTag:
|
|
139
|
+
const { toString: Lt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ye, toStringTag: st } = Symbol, be = /* @__PURE__ */ ((e) => (t) => {
|
|
140
140
|
const n = Lt.call(t);
|
|
141
141
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
142
|
-
})(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => be(t) === e), we = (e) => (t) => typeof t === e, { isArray:
|
|
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
|
|
146
|
+
const ot = B("ArrayBuffer");
|
|
147
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 jt = we("string"), N = we("function"),
|
|
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
152
|
if (be(e) !== "object")
|
|
153
153
|
return !1;
|
|
154
154
|
const t = _e(e);
|
|
155
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
155
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(st in e) && !(ye in e);
|
|
156
156
|
}, qt = (e) => {
|
|
157
157
|
if (!se(e) || re(e))
|
|
158
158
|
return !1;
|
|
@@ -165,9 +165,9 @@ const jt = we("string"), N = we("function"), ot = we("number"), se = (e) => e !=
|
|
|
165
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",
|
|
@@ -179,7 +179,7 @@ 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,13 +202,13 @@ function it(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,
|
|
205
|
+
const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, lt = (e) => !Y(e) && e !== W;
|
|
206
206
|
function Te() {
|
|
207
|
-
const { caseless: e, skipUndefined: t } =
|
|
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
|
-
de(n[o]) && de(s) ? n[o] = Te(n[o], s) : de(s) ? n[o] = Te({}, s) :
|
|
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);
|
|
@@ -218,7 +218,7 @@ 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
|
|
@@ -255,9 +255,9 @@ const rn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
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];
|
|
@@ -277,14 +277,14 @@ const rn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
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
286
|
}, yn = (e) => {
|
|
287
|
-
|
|
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];
|
|
@@ -304,11 +304,11 @@ const rn = (e, t, n, { allOwnKeys: r } = {}) => (oe(
|
|
|
304
304
|
n[i] = !0;
|
|
305
305
|
});
|
|
306
306
|
};
|
|
307
|
-
return
|
|
307
|
+
return ee(e) ? r(e) : r(String(e).split(t)), n;
|
|
308
308
|
}, wn = () => {
|
|
309
309
|
}, gn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
310
310
|
function En(e) {
|
|
311
|
-
return !!(e && N(e.append) && e[
|
|
311
|
+
return !!(e && N(e.append) && e[st] === "FormData" && e[ye]);
|
|
312
312
|
}
|
|
313
313
|
const Rn = (e) => {
|
|
314
314
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -319,17 +319,17 @@ const Rn = (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
|
-
}, Sn = B("AsyncFunction"), On = (e) => e && (se(e) || N(e)) && N(e.then) && N(e.catch),
|
|
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,14 +337,14 @@ const Rn = (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)), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(W) : typeof process < "u" && process.nextTick ||
|
|
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
344
|
isFormData: Gt,
|
|
345
345
|
isArrayBufferView: Dt,
|
|
346
346
|
isString: jt,
|
|
347
|
-
isNumber:
|
|
347
|
+
isNumber: it,
|
|
348
348
|
isBoolean: Ht,
|
|
349
349
|
isObject: se,
|
|
350
350
|
isPlainObject: de,
|
|
@@ -353,7 +353,7 @@ const Rn = (e) => {
|
|
|
353
353
|
isRequest: Yt,
|
|
354
354
|
isResponse: en,
|
|
355
355
|
isHeaders: tn,
|
|
356
|
-
isUndefined:
|
|
356
|
+
isUndefined: Y,
|
|
357
357
|
isDate: Mt,
|
|
358
358
|
isFile: $t,
|
|
359
359
|
isReactNativeBlob: Vt,
|
|
@@ -379,29 +379,29 @@ const Rn = (e) => {
|
|
|
379
379
|
forEachEntry: fn,
|
|
380
380
|
matchAll: dn,
|
|
381
381
|
isHTMLForm: pn,
|
|
382
|
-
hasOwnProperty:
|
|
383
|
-
hasOwnProp:
|
|
382
|
+
hasOwnProperty: je,
|
|
383
|
+
hasOwnProp: je,
|
|
384
384
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
385
|
-
reduceDescriptors:
|
|
385
|
+
reduceDescriptors: ct,
|
|
386
386
|
freezeMethods: yn,
|
|
387
387
|
toObjectSet: bn,
|
|
388
388
|
toCamelCase: hn,
|
|
389
389
|
noop: wn,
|
|
390
390
|
toFiniteNumber: gn,
|
|
391
|
-
findKey:
|
|
391
|
+
findKey: at,
|
|
392
392
|
global: W,
|
|
393
|
-
isContextDefined:
|
|
393
|
+
isContextDefined: lt,
|
|
394
394
|
isSpecCompliantForm: En,
|
|
395
395
|
toJSONObject: Rn,
|
|
396
396
|
isAsyncFn: Sn,
|
|
397
397
|
isThenable: On,
|
|
398
|
-
setImmediate:
|
|
398
|
+
setImmediate: ut,
|
|
399
399
|
asap: An,
|
|
400
400
|
isIterable: Tn
|
|
401
401
|
};
|
|
402
|
-
let b = class
|
|
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
|
/**
|
|
@@ -459,12 +459,12 @@ const Cn = null;
|
|
|
459
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
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
470
|
function Pn(e) {
|
|
@@ -509,7 +509,7 @@ function ge(e, t, n) {
|
|
|
509
509
|
if (l.endsWith(p, "{}"))
|
|
510
510
|
p = r ? p : p.slice(0, -2), c = JSON.stringify(c);
|
|
511
511
|
else if (l.isArray(c) && Pn(c) || (l.isFileList(c) || l.endsWith(p, "[]")) && (R = l.toArray(c)))
|
|
512
|
-
return p =
|
|
512
|
+
return p = dt(p), R.forEach(function(A, T) {
|
|
513
513
|
!(l.isUndefined(A) || A === null) && t.append(
|
|
514
514
|
// eslint-disable-next-line no-nested-ternary
|
|
515
515
|
o === !0 ? Re([p], T, i) : o === null ? p : p + "[]",
|
|
@@ -537,7 +537,7 @@ function ge(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",
|
|
@@ -554,14 +554,14 @@ function je(e) {
|
|
|
554
554
|
function Ne(e, t) {
|
|
555
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("&");
|
|
@@ -569,7 +569,7 @@ dt.toString = function(t) {
|
|
|
569
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
575
|
const r = n && n.encode || _n, s = l.isFunction(n) ? {
|
|
@@ -582,7 +582,7 @@ function pt(e, t, n) {
|
|
|
582
582
|
}
|
|
583
583
|
return e;
|
|
584
584
|
}
|
|
585
|
-
class
|
|
585
|
+
class qe {
|
|
586
586
|
constructor() {
|
|
587
587
|
this.handlers = [];
|
|
588
588
|
}
|
|
@@ -682,7 +682,7 @@ function Hn(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;
|
|
@@ -714,7 +714,7 @@ const ie = {
|
|
|
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))
|
|
@@ -805,8 +805,8 @@ const Mn = l.toObjectSet([
|
|
|
805
805
|
`).forEach(function(o) {
|
|
806
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
812
|
function pe(e) {
|
|
@@ -851,7 +851,7 @@ 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);
|
|
@@ -875,7 +875,7 @@ 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];
|
|
@@ -892,7 +892,7 @@ 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
897
|
return !!(r && this[r] !== void 0 && (!n || Se(this, this[r], r, n)));
|
|
898
898
|
}
|
|
@@ -902,7 +902,7 @@ 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
907
|
a && (!n || Se(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
908
908
|
}
|
|
@@ -960,11 +960,11 @@ 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 =
|
|
967
|
+
const a = ne(o);
|
|
968
968
|
r[a] || (Jn(s, o), r[a] = !0);
|
|
969
969
|
}
|
|
970
970
|
return l.isArray(t) ? t.forEach(i) : i(t), this;
|
|
@@ -995,7 +995,7 @@ function Oe(e, t) {
|
|
|
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
1001
|
let ae = class extends b {
|
|
@@ -1012,7 +1012,7 @@ let ae = class extends b {
|
|
|
1012
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
1018
|
new b(
|
|
@@ -1075,7 +1075,7 @@ const me = (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,7 +1085,7 @@ const me = (e, t, n = 3) => {
|
|
|
1085
1085
|
}),
|
|
1086
1086
|
t[1]
|
|
1087
1087
|
];
|
|
1088
|
-
},
|
|
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
1089
|
new URL(P.origin),
|
|
1090
1090
|
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1091
1091
|
) : () => !0, Zn = P.hasStandardBrowserEnv ? (
|
|
@@ -1123,11 +1123,11 @@ function Yn(e) {
|
|
|
1123
1123
|
function er(e, t) {
|
|
1124
1124
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function wt(e, t, n) {
|
|
1127
1127
|
let r = !Yn(t);
|
|
1128
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(
|
|
@@ -1222,7 +1222,7 @@ const wt = (e) => {
|
|
|
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;
|
|
@@ -1244,7 +1244,7 @@ const wt = (e) => {
|
|
|
1244
1244
|
config: e,
|
|
1245
1245
|
request: h
|
|
1246
1246
|
};
|
|
1247
|
-
|
|
1247
|
+
bt(
|
|
1248
1248
|
function(x) {
|
|
1249
1249
|
n(x), p();
|
|
1250
1250
|
},
|
|
@@ -1343,7 +1343,7 @@ const wt = (e) => {
|
|
|
1343
1343
|
} finally {
|
|
1344
1344
|
await t.cancel();
|
|
1345
1345
|
}
|
|
1346
|
-
},
|
|
1346
|
+
}, We = (e, t, n, r) => {
|
|
1347
1347
|
const s = or(e, t);
|
|
1348
1348
|
let i = 0, o, a = (d) => {
|
|
1349
1349
|
o || (o = !0, r && r(d));
|
|
@@ -1375,10 +1375,10 @@ const wt = (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 {
|
|
@@ -1395,9 +1395,9 @@ const wt = (e) => {
|
|
|
1395
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 && ue(
|
|
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,7 +1405,7 @@ const wt = (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) => {
|
|
@@ -1452,7 +1452,7 @@ const wt = (e) => {
|
|
|
1452
1452
|
headers: q,
|
|
1453
1453
|
withCredentials: M = "same-origin",
|
|
1454
1454
|
fetchOptions: le
|
|
1455
|
-
} =
|
|
1455
|
+
} = gt(c), te = t || fetch;
|
|
1456
1456
|
x = x ? (x + "").toLowerCase() : "text";
|
|
1457
1457
|
let X = rr(
|
|
1458
1458
|
[k, A && A.toAbortSignal()],
|
|
@@ -1470,11 +1470,11 @@ const wt = (e) => {
|
|
|
1470
1470
|
duplex: "half"
|
|
1471
1471
|
}), D;
|
|
1472
1472
|
if (l.isFormData(R) && (D = C.headers.get("content-type")) && q.setContentType(D), C.body) {
|
|
1473
|
-
const [z, j] =
|
|
1473
|
+
const [z, j] = $e(
|
|
1474
1474
|
ce,
|
|
1475
|
-
me(
|
|
1475
|
+
me(Ve(I))
|
|
1476
1476
|
);
|
|
1477
|
-
R =
|
|
1477
|
+
R = We(C.body, Je, z, j);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
l.isString(M) || (M = M ? "include" : "omit");
|
|
@@ -1488,19 +1488,19 @@ const wt = (e) => {
|
|
|
1488
1488
|
credentials: y ? M : void 0
|
|
1489
1489
|
};
|
|
1490
1490
|
$ = i && new n(p, S);
|
|
1491
|
-
let E = await (i ?
|
|
1491
|
+
let E = await (i ? te($, le) : te(p, S));
|
|
1492
1492
|
const L = u && (x === "stream" || x === "response");
|
|
1493
1493
|
if (u && (_ || L && v)) {
|
|
1494
1494
|
const C = {};
|
|
1495
1495
|
["status", "statusText", "headers"].forEach((G) => {
|
|
1496
1496
|
C[G] = E[G];
|
|
1497
1497
|
});
|
|
1498
|
-
const D = l.toFiniteNumber(E.headers.get("content-length")), [z, j] = _ &&
|
|
1498
|
+
const D = l.toFiniteNumber(E.headers.get("content-length")), [z, j] = _ && $e(
|
|
1499
1499
|
D,
|
|
1500
|
-
me(
|
|
1500
|
+
me(Ve(_), !0)
|
|
1501
1501
|
) || [];
|
|
1502
1502
|
E = new r(
|
|
1503
|
-
|
|
1503
|
+
We(E.body, Je, z, () => {
|
|
1504
1504
|
j && j(), v && v();
|
|
1505
1505
|
}),
|
|
1506
1506
|
C
|
|
@@ -1512,7 +1512,7 @@ const wt = (e) => {
|
|
|
1512
1512
|
c
|
|
1513
1513
|
);
|
|
1514
1514
|
return !L && v && v(), await new Promise((C, D) => {
|
|
1515
|
-
|
|
1515
|
+
bt(C, D, {
|
|
1516
1516
|
data: V,
|
|
1517
1517
|
headers: U.from(E.headers),
|
|
1518
1518
|
status: E.status,
|
|
@@ -1536,7 +1536,7 @@ const wt = (e) => {
|
|
|
1536
1536
|
) : b.from(y, y && y.code, c, $, y && y.response);
|
|
1537
1537
|
}
|
|
1538
1538
|
};
|
|
1539
|
-
}, cr = /* @__PURE__ */ new Map(),
|
|
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
1542
|
let o = i.length, a = o, d, f, u = cr;
|
|
@@ -1544,12 +1544,12 @@ const wt = (e) => {
|
|
|
1544
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
|
-
|
|
1547
|
+
Et();
|
|
1548
1548
|
const Fe = {
|
|
1549
1549
|
http: Cn,
|
|
1550
1550
|
xhr: nr,
|
|
1551
1551
|
fetch: {
|
|
1552
|
-
get:
|
|
1552
|
+
get: Et
|
|
1553
1553
|
}
|
|
1554
1554
|
};
|
|
1555
1555
|
l.forEach(Fe, (e, t) => {
|
|
@@ -1561,7 +1561,7 @@ l.forEach(Fe, (e, t) => {
|
|
|
1561
1561
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1562
1562
|
}
|
|
1563
1563
|
});
|
|
1564
|
-
const
|
|
1564
|
+
const Qe = (e) => `- ${e}`, ur = (e) => l.isFunction(e) || e === null || e === !1;
|
|
1565
1565
|
function fr(e, t) {
|
|
1566
1566
|
e = l.isArray(e) ? e : [e];
|
|
1567
1567
|
const { length: n } = e;
|
|
@@ -1581,8 +1581,8 @@ function fr(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
|
-
`) : " " +
|
|
1584
|
+
` + o.map(Qe).join(`
|
|
1585
|
+
`) : " " + Qe(o[0]) : "as no adapter specified";
|
|
1586
1586
|
throw new b(
|
|
1587
1587
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1588
1588
|
"ERR_NOT_SUPPORT"
|
|
@@ -1590,7 +1590,7 @@ function fr(e, t) {
|
|
|
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}
|
|
@@ -1606,13 +1606,13 @@ 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 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),
|
|
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
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,16 +1620,16 @@ function Qe(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
|
|
1629
|
+
const Ye = {};
|
|
1630
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)
|
|
@@ -1637,7 +1637,7 @@ Ee.transitional = function(t, n, r) {
|
|
|
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"
|
|
@@ -1675,8 +1675,8 @@ const he = {
|
|
|
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
|
/**
|
|
@@ -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 pr = class
|
|
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,7 +1877,7 @@ let pr = class St {
|
|
|
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
|
|
@@ -1966,18 +1966,18 @@ const xe = {
|
|
|
1966
1966
|
Object.entries(xe).forEach(([e, t]) => {
|
|
1967
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 O =
|
|
1975
|
+
const O = At(ie);
|
|
1976
1976
|
O.Axios = J;
|
|
1977
1977
|
O.CanceledError = ae;
|
|
1978
1978
|
O.CancelToken = pr;
|
|
1979
|
-
O.isCancel =
|
|
1980
|
-
O.VERSION =
|
|
1979
|
+
O.isCancel = yt;
|
|
1980
|
+
O.VERSION = St;
|
|
1981
1981
|
O.toFormData = ge;
|
|
1982
1982
|
O.AxiosError = b;
|
|
1983
1983
|
O.Cancel = O.CanceledError;
|
|
@@ -1988,43 +1988,43 @@ O.spread = hr;
|
|
|
1988
1988
|
O.isAxiosError = mr;
|
|
1989
1989
|
O.mergeConfig = K;
|
|
1990
1990
|
O.AxiosHeaders = U;
|
|
1991
|
-
O.formToJSON = (e) =>
|
|
1992
|
-
O.getAdapter =
|
|
1991
|
+
O.formToJSON = (e) => mt(l.isHTMLForm(e) ? new FormData(e) : e);
|
|
1992
|
+
O.getAdapter = Rt.getAdapter;
|
|
1993
1993
|
O.HttpStatusCode = xe;
|
|
1994
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
|
-
} = O,
|
|
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 fe = (e, t) =>
|
|
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 fe = (e, t) => At.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"],
|
|
@@ -2082,7 +2087,7 @@ const fe = (e, t) => At.post("/api/screen/control", {
|
|
|
2082
2087
|
a || (a = new (window.AudioContext || window.webkitAudioContext)({
|
|
2083
2088
|
sampleRate: 24e3
|
|
2084
2089
|
})), a.state === "suspended" && !m && a.resume();
|
|
2085
|
-
},
|
|
2090
|
+
}, te = () => {
|
|
2086
2091
|
f && u === 0 && (s("playComplete", r.screenClientId), f = !1);
|
|
2087
2092
|
}, X = (y, S) => {
|
|
2088
2093
|
if (le(), !!a)
|
|
@@ -2099,7 +2104,7 @@ const fe = (e, t) => At.post("/api/screen/control", {
|
|
|
2099
2104
|
j.buffer = z, j.connect(a.destination);
|
|
2100
2105
|
const G = d < a.currentTime ? a.currentTime : d;
|
|
2101
2106
|
S !== null && !c.has(S) && (c.set(S, G), q(), M()), j.start(G), d = G + z.duration, u++, j.onended = () => {
|
|
2102
|
-
u--,
|
|
2107
|
+
u--, te();
|
|
2103
2108
|
};
|
|
2104
2109
|
} catch (E) {
|
|
2105
2110
|
console.error("[VirtualHumanEventAdapter] Failed to decode and play audio:", E);
|
|
@@ -2119,7 +2124,7 @@ const fe = (e, t) => At.post("/api/screen/control", {
|
|
|
2119
2124
|
I(), m = !1, a && (a.close(), a = null), d = 0, f = !1, u = 0;
|
|
2120
2125
|
break;
|
|
2121
2126
|
case "tts_complete":
|
|
2122
|
-
f = !0,
|
|
2127
|
+
f = !0, te();
|
|
2123
2128
|
break;
|
|
2124
2129
|
default:
|
|
2125
2130
|
console.warn(`[VirtualHumanEventAdapter] Unknown control action: ${y}`);
|
|
@@ -2179,23 +2184,29 @@ const fe = (e, t) => At.post("/api/screen/control", {
|
|
|
2179
2184
|
console.warn(`[VirtualHumanEventAdapter] Unknown message type: ${S}`);
|
|
2180
2185
|
}
|
|
2181
2186
|
};
|
|
2182
|
-
return
|
|
2187
|
+
return Z(() => r.screenClientId, () => {
|
|
2183
2188
|
r.screenClientId && r.wsUrl && v();
|
|
2184
|
-
}),
|
|
2189
|
+
}), Z(() => r.wsUrl, () => {
|
|
2185
2190
|
r.screenClientId && r.wsUrl && v();
|
|
2186
|
-
}),
|
|
2191
|
+
}), Z(
|
|
2192
|
+
() => r.controlHostUrl,
|
|
2193
|
+
() => {
|
|
2194
|
+
console.log("adapter controlHostUrl:", r.controlHostUrl), yr(r.controlHostUrl);
|
|
2195
|
+
},
|
|
2196
|
+
{ immediate: !0 }
|
|
2197
|
+
), tt(() => {
|
|
2187
2198
|
r.screenClientId && r.wsUrl && v();
|
|
2188
|
-
}),
|
|
2199
|
+
}), nt(() => {
|
|
2189
2200
|
i.value && i.value.close(), a && a.close();
|
|
2190
2201
|
}), (y, S) => kt(y.$slots, "default");
|
|
2191
2202
|
}
|
|
2192
|
-
}),
|
|
2193
|
-
e.component("VirtualHumanPersona", It), e.component("VirtualHumanEventAdapter",
|
|
2194
|
-
},
|
|
2195
|
-
install:
|
|
2203
|
+
}), wr = (e) => {
|
|
2204
|
+
e.component("VirtualHumanPersona", It), e.component("VirtualHumanEventAdapter", br);
|
|
2205
|
+
}, jr = {
|
|
2206
|
+
install: wr
|
|
2196
2207
|
};
|
|
2197
2208
|
export {
|
|
2198
|
-
|
|
2209
|
+
br as VirtualHumanEventAdapter,
|
|
2199
2210
|
It as VirtualHumanPersona,
|
|
2200
|
-
|
|
2211
|
+
jr as default
|
|
2201
2212
|
};
|