@scienjoy/sj-ai-plus 1.0.4 → 1.0.6
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/package.json +1 -1
- package/ui/es/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/cancel/CanceledError.ts +18 -0
- package/ui/es/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/core/AxiosError.ts +55 -0
- package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/InterceptorManager.ts +1 -0
- package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/env/data.ts +1 -1
- package/ui/es/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/helpers/buildURL.ts +21 -0
- package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/composeSignals.ts +1 -1
- package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/utils.ts +46 -31
- package/ui/es/packages/components/src/sjDigitalHumanAssistant/src/index.vue.ts +1 -1
- package/ui/es/packages/components/src/sjDigitalHumanAssistant/src/index.vue2.ts +226 -243
- package/ui/es/packages/components/src/utils/axios.ts +2 -2
- package/ui/es/sj-ai-plus.css +1 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/cancel/CanceledError.ts +1 -0
- package/ui/lib/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/core/AxiosError.ts +1 -0
- package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/env/data.ts +1 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/helpers/buildURL.ts +1 -0
- package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/composeSignals.ts +1 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.4/node_modules/axios/lib/utils.ts +1 -0
- package/ui/lib/packages/components/src/sjDigitalHumanAssistant/src/index.vue.ts +1 -1
- package/ui/lib/packages/components/src/sjDigitalHumanAssistant/src/index.vue2.ts +1 -1
- package/ui/lib/packages/components/src/utils/axios.ts +1 -1
- package/ui/lib/sj-ai-plus.css +1 -1
- package/ui/es/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CanceledError.ts +0 -11
- package/ui/es/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/AxiosError.ts +0 -56
- package/ui/es/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/buildURL.ts +0 -23
- package/ui/lib/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/cancel/CanceledError.ts +0 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/core/AxiosError.ts +0 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/helpers/buildURL.ts +0 -1
- package/ui/lib/node_modules/.pnpm/axios@1.13.2/node_modules/axios/lib/utils.ts +0 -1
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/index.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/adapters.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/fetch.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/xhr.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/axios.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/cancel/CancelToken.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/cancel/isCancel.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/Axios.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/AxiosHeaders.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/buildFullPath.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/dispatchRequest.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/mergeConfig.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/settle.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/transformData.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/defaults/index.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/defaults/transitional.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/AxiosURLSearchParams.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/HttpStatusCode.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/bind.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/combineURLs.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/cookies.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/formDataToJSON.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isAbsoluteURL.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isAxiosError.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isURLSameOrigin.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/null.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/parseHeaders.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/parseProtocol.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/progressEventReducer.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/resolveConfig.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/speedometer.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/spread.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/throttle.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/toFormData.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/toURLEncodedForm.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/trackStream.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/validator.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/Blob.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/FormData.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/URLSearchParams.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/index.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/common/utils.ts +0 -0
- /package/ui/es/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/index.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/index.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/adapters.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/fetch.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/adapters/xhr.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/axios.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/cancel/CancelToken.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/cancel/isCancel.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/Axios.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/AxiosHeaders.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/InterceptorManager.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/buildFullPath.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/dispatchRequest.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/mergeConfig.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/settle.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/core/transformData.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/defaults/index.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/defaults/transitional.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/AxiosURLSearchParams.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/HttpStatusCode.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/bind.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/combineURLs.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/cookies.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/formDataToJSON.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isAbsoluteURL.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isAxiosError.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/isURLSameOrigin.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/null.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/parseHeaders.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/parseProtocol.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/progressEventReducer.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/resolveConfig.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/speedometer.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/spread.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/throttle.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/toFormData.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/toURLEncodedForm.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/trackStream.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/helpers/validator.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/Blob.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/FormData.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/classes/URLSearchParams.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/browser/index.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/common/utils.ts +0 -0
- /package/ui/lib/node_modules/.pnpm/{axios@1.13.2 → axios@1.13.4}/node_modules/axios/lib/platform/index.ts +0 -0
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { ElIcon as Ne } from "../../../../../node_modules/.pnpm/element-plus@2.13.1_vue@3.5.27_typescript@5.9.3_/node_modules/element-plus/es/components/icon/index.ts";
|
|
7
|
-
const Ae = { class: "digital-human-assistant" }, Ge = { class: "placeholder left-placeholder" }, Je = { class: "placeholder right-placeholder" }, qe = { class: "window-header-left" }, Ke = { class: "window-title-text" }, Qe = { class: "window-header-btns" }, Ze = { class: "disconnect-btn" }, et = {
|
|
1
|
+
import { defineComponent as xe, ref as d, reactive as Ve, computed as _e, watch as te, nextTick as m, onMounted as Xe, onUnmounted as Ye, resolveDirective as Ie, openBlock as D, createElementBlock as F, normalizeStyle as Te, withDirectives as f, createElementVNode as n, vShow as g, normalizeClass as ke, toDisplayString as ne, withModifiers as oe, renderSlot as ae, createCommentVNode as A, createBlock as Be, Teleport as Oe } from "vue";
|
|
2
|
+
import ie from "../../utils/api.ts";
|
|
3
|
+
import Ce from "../../utils/utils.ts";
|
|
4
|
+
import je from "../../utils/videoBackgroundRemoval.ts";
|
|
5
|
+
const Ue = { class: "digital-human-assistant" }, ze = { class: "placeholder left-placeholder" }, Fe = { class: "placeholder right-placeholder" }, Ae = { class: "window-header-left" }, Ne = { class: "window-title-text" }, Ge = { class: "window-header-btns" }, Je = { class: "disconnect-btn" }, qe = {
|
|
8
6
|
class: "connect-btn",
|
|
9
7
|
disabled: ""
|
|
10
|
-
},
|
|
8
|
+
}, Ke = { class: "connect-btn" }, Qe = { class: "window-content" }, Ze = { class: "main-content-inner" }, et = { class: "window-header-left" }, tt = { class: "window-title-text" }, nt = { class: "window-header-btns" }, ot = { class: "disconnect-btn" }, at = {
|
|
11
9
|
class: "connect-btn",
|
|
12
10
|
disabled: ""
|
|
13
|
-
},
|
|
11
|
+
}, it = { class: "connect-btn" }, lt = { class: "window-content" }, st = { class: "window-header-left" }, ct = { class: "window-title-text" }, dt = { class: "window-header-btns" }, ut = { class: "disconnect-btn" }, rt = {
|
|
14
12
|
class: "connect-btn",
|
|
15
13
|
disabled: ""
|
|
16
|
-
},
|
|
14
|
+
}, vt = { class: "connect-btn" }, ht = { class: "window-content" }, ft = xe({
|
|
17
15
|
name: "SjDigitalHumanAssistant"
|
|
18
|
-
}),
|
|
19
|
-
...
|
|
16
|
+
}), bt = /* @__PURE__ */ xe({
|
|
17
|
+
...ft,
|
|
20
18
|
props: {
|
|
21
19
|
windowWidth: { default: 320 },
|
|
22
20
|
windowHeight: { default: 467 },
|
|
@@ -32,134 +30,134 @@ const Ae = { class: "digital-human-assistant" }, Ge = { class: "placeholder left
|
|
|
32
30
|
maxReconnectTimes: { default: 10 },
|
|
33
31
|
baseUrl: { default: "" }
|
|
34
32
|
},
|
|
35
|
-
setup(
|
|
36
|
-
const o =
|
|
33
|
+
setup($, { expose: Se }) {
|
|
34
|
+
const o = $, le = d(null), se = d(null), u = d(null), a = d(null), p = je(), ce = d(null), de = d(null), ue = d(null), P = d(null), S = d(!1), c = d(!1), h = d(!1), re = d(!0), V = d(!1), r = Ve({
|
|
37
35
|
x: 0,
|
|
38
36
|
y: 0,
|
|
39
37
|
offsetX: 0,
|
|
40
38
|
offsetY: 0
|
|
41
|
-
}), v = d(o.defaultStickSide),
|
|
42
|
-
let
|
|
43
|
-
const
|
|
39
|
+
}), v = d(o.defaultStickSide), X = d(!1), R = d(!1), E = d(!1), N = d(!1), G = d(!1);
|
|
40
|
+
let s = null, b = "";
|
|
41
|
+
const Y = d(null), y = d(0), I = d(!1), L = d(!1), Ee = _e(() => ({
|
|
44
42
|
"--sidebar-width": o.sidebarWidth,
|
|
45
43
|
"--window-width": `${o.windowWidth}px`,
|
|
46
44
|
"--window-height": `${o.windowHeight}px`
|
|
47
|
-
})),
|
|
45
|
+
})), Le = _e(() => ({
|
|
48
46
|
left: `${r.x}px`,
|
|
49
47
|
top: `${r.y}px`,
|
|
50
48
|
width: `${o.windowWidth}px`,
|
|
51
49
|
height: `${o.windowHeight}px`,
|
|
52
|
-
zIndex:
|
|
53
|
-
})),
|
|
54
|
-
!t && u.value ? (
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
},
|
|
50
|
+
zIndex: X.value || E.value ? 9999 : 1e3
|
|
51
|
+
})), He = (t) => {
|
|
52
|
+
!t && u.value ? (I.value = !1, y.value = 0, pe()) : t ? (I.value = !0, $e()) : console.warn("自动连接超时:video元素未挂载"), re.value = t;
|
|
53
|
+
}, B = (t) => {
|
|
54
|
+
He(!t), V.value = t, t && c.value && m(() => w());
|
|
55
|
+
}, Me = () => {
|
|
56
|
+
B(!0);
|
|
57
|
+
}, ve = () => {
|
|
60
58
|
switch (v.value) {
|
|
61
59
|
case "left":
|
|
62
|
-
return
|
|
60
|
+
return de.value ?? P.value;
|
|
63
61
|
case "right":
|
|
64
|
-
return
|
|
62
|
+
return ue.value ?? P.value;
|
|
65
63
|
default:
|
|
66
|
-
return
|
|
64
|
+
return ce.value ?? P.value;
|
|
67
65
|
}
|
|
68
|
-
},
|
|
66
|
+
}, C = () => se.value?.getBoundingClientRect() || {
|
|
69
67
|
width: 0,
|
|
70
68
|
height: 0,
|
|
71
69
|
left: 0,
|
|
72
70
|
right: 0,
|
|
73
71
|
top: 0,
|
|
74
72
|
bottom: 0
|
|
75
|
-
},
|
|
73
|
+
}, he = () => le.value?.getBoundingClientRect() || {
|
|
76
74
|
width: 0,
|
|
77
75
|
height: 0,
|
|
78
76
|
left: 0,
|
|
79
77
|
right: 0,
|
|
80
78
|
top: 0,
|
|
81
79
|
bottom: 0
|
|
82
|
-
},
|
|
83
|
-
const i =
|
|
80
|
+
}, J = (t, e) => {
|
|
81
|
+
const i = C();
|
|
84
82
|
return {
|
|
85
83
|
x: Math.max(0, Math.min(t, i.width - o.windowWidth)),
|
|
86
84
|
y: Math.max(0, Math.min(e, i.height - o.windowHeight))
|
|
87
85
|
};
|
|
88
|
-
},
|
|
89
|
-
const t =
|
|
90
|
-
return
|
|
91
|
-
},
|
|
92
|
-
const t =
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
const t =
|
|
96
|
-
i !== v.value && (v.value = i, u.value && (u.value.volume = i ? 0.5 : 1),
|
|
97
|
-
},
|
|
98
|
-
|
|
86
|
+
}, fe = () => {
|
|
87
|
+
const t = C(), e = t.width - o.windowWidth - 10, i = t.height - o.windowHeight - 10;
|
|
88
|
+
return J(e, i);
|
|
89
|
+
}, ge = () => {
|
|
90
|
+
const t = C(), e = he();
|
|
91
|
+
N.value = e.left <= t.left + o.edgeThreshold, G.value = e.right >= t.right - o.edgeThreshold;
|
|
92
|
+
}, we = () => {
|
|
93
|
+
const t = C(), e = he(), i = e.left <= t.left + o.edgeThreshold ? "left" : e.right >= t.right - o.edgeThreshold ? "right" : "";
|
|
94
|
+
i !== v.value && (v.value = i, u.value && (u.value.volume = i ? 0.5 : 1), M(), w()), N.value = G.value = !1;
|
|
95
|
+
}, We = (t) => {
|
|
96
|
+
X.value = !0, r.offsetX = t.clientX - r.x, r.offsetY = t.clientY - r.y, document.addEventListener("mousemove", q), document.addEventListener("mouseup", K);
|
|
97
|
+
}, q = (t) => {
|
|
98
|
+
if (!X.value) return;
|
|
99
|
+
const e = C(), { x: i, y: l } = J(t.clientX - e.left - r.offsetX, t.clientY - e.top - r.offsetY);
|
|
100
|
+
r.x = i, r.y = l, ge();
|
|
101
|
+
}, K = () => {
|
|
102
|
+
we(), X.value = !1, document.removeEventListener("mousemove", q), document.removeEventListener("mouseup", K);
|
|
103
|
+
}, me = (t, e) => {
|
|
104
|
+
R.value = !0, r.offsetX = e.clientX - (e.clientX - o.windowWidth / 2), r.offsetY = e.clientY - (e.clientY - 20), document.addEventListener("mousemove", O);
|
|
105
|
+
}, O = (t) => {
|
|
106
|
+
if (!R.value) return;
|
|
107
|
+
const e = Math.abs(t.movementX), i = Math.abs(t.movementY);
|
|
108
|
+
(e > o.dragThreshold || i > o.dragThreshold) && (E.value = !0, v.value = "", document.removeEventListener("mousemove", O), document.addEventListener("mousemove", Q), document.addEventListener("mouseup", Z));
|
|
99
109
|
}, Q = (t) => {
|
|
100
|
-
if (!
|
|
101
|
-
const e =
|
|
102
|
-
r.x = i, r.y =
|
|
110
|
+
if (!E.value) return;
|
|
111
|
+
const e = C(), { x: i, y: l } = J(t.clientX - e.left - r.offsetX, t.clientY - e.top - r.offsetY);
|
|
112
|
+
r.x = i, r.y = l, ge();
|
|
103
113
|
}, Z = () => {
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
if (!
|
|
109
|
-
const e = Math.abs(t.movementX), i = Math.abs(t.movementY);
|
|
110
|
-
(e > o.dragThreshold || i > o.dragThreshold) && (M.value = !0, v.value = "", document.removeEventListener("mousemove", U), document.addEventListener("mousemove", ee), document.addEventListener("mouseup", te));
|
|
111
|
-
}, ee = (t) => {
|
|
112
|
-
if (!M.value) return;
|
|
113
|
-
const e = x(), { x: i, y: c } = K(t.clientX - e.left - r.offsetX, t.clientY - e.top - r.offsetY);
|
|
114
|
-
r.x = i, r.y = c, pe();
|
|
115
|
-
}, te = () => {
|
|
116
|
-
be(), C.value = M.value = !1, document.removeEventListener("mousemove", ee), document.removeEventListener("mouseup", te);
|
|
117
|
-
}, z = () => {
|
|
118
|
-
C.value && !M.value && (C.value = !1, document.removeEventListener("mousemove", U));
|
|
119
|
-
}, ne = async (t) => {
|
|
120
|
-
if (!s.value || !b)
|
|
114
|
+
we(), R.value = E.value = !1, document.removeEventListener("mousemove", Q), document.removeEventListener("mouseup", Z);
|
|
115
|
+
}, j = () => {
|
|
116
|
+
R.value && !E.value && (R.value = !1, document.removeEventListener("mousemove", O));
|
|
117
|
+
}, ee = async (t) => {
|
|
118
|
+
if (!c.value || !b)
|
|
121
119
|
return;
|
|
122
|
-
|
|
120
|
+
console.log("已打断当前对话,准备播放新文本:", t);
|
|
123
121
|
const e = {
|
|
124
122
|
text: t,
|
|
125
123
|
type: "echo",
|
|
126
124
|
interrupt: !0,
|
|
127
125
|
sessionid: parseInt(b)
|
|
128
126
|
};
|
|
129
|
-
|
|
127
|
+
ie.digitalHumanChat(o.baseUrl, e).then((i) => {
|
|
130
128
|
i && Number(i.code);
|
|
131
129
|
}).catch((i) => {
|
|
132
130
|
console.log("api.digitalHumanChat:", i);
|
|
133
131
|
});
|
|
134
|
-
},
|
|
135
|
-
if (!
|
|
132
|
+
}, H = async () => {
|
|
133
|
+
if (!c.value || !b) return;
|
|
136
134
|
const t = {
|
|
137
135
|
sessionid: parseInt(b)
|
|
138
136
|
};
|
|
139
|
-
|
|
137
|
+
ie.digitalHumanInterruptTalk(o.baseUrl, t).then((e) => {
|
|
140
138
|
e && Number(e.code) === 0 && console.log("数字人对话已成功打断");
|
|
141
139
|
}).catch((e) => {
|
|
142
140
|
console.log("api.digitalHumanInterruptTalk:", e);
|
|
143
141
|
});
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
},
|
|
142
|
+
}, x = () => {
|
|
143
|
+
Y.value && (clearTimeout(Y.value), Y.value = null, console.log("重连定时器已清除")), L.value = !1;
|
|
144
|
+
}, M = (t = !1) => {
|
|
147
145
|
if (!a.value) return;
|
|
148
146
|
t || p.stopProcessing();
|
|
149
147
|
const e = a.value.getContext("2d");
|
|
150
148
|
if (e && (e.clearRect(0, 0, a.value.width, a.value.height), !t)) {
|
|
151
|
-
const i = a.value.width,
|
|
152
|
-
a.value.width = i, a.value.height =
|
|
149
|
+
const i = a.value.width, l = a.value.height;
|
|
150
|
+
a.value.width = i, a.value.height = l;
|
|
153
151
|
}
|
|
154
152
|
a.value && !t && (a.value.style.width = "", a.value.style.height = "", v.value === "" && (a.value.style.marginLeft = "", a.value.style.marginTop = ""));
|
|
155
|
-
},
|
|
156
|
-
if (!u.value || !a.value || !
|
|
153
|
+
}, w = async (t = !1) => {
|
|
154
|
+
if (!u.value || !a.value || !S.value || !c.value) return;
|
|
157
155
|
await m();
|
|
158
|
-
const e = u.value.videoWidth || o.windowWidth, i = u.value.videoHeight || o.windowHeight,
|
|
159
|
-
console.log("视频原始宽高比:",
|
|
156
|
+
const e = u.value.videoWidth || o.windowWidth, i = u.value.videoHeight || o.windowHeight, l = e / i;
|
|
157
|
+
console.log("视频原始宽高比:", l, "尺寸:", e, i);
|
|
160
158
|
let _;
|
|
161
|
-
const
|
|
162
|
-
|
|
159
|
+
const ye = ve();
|
|
160
|
+
ye ? _ = ye.getBoundingClientRect() : _ = {
|
|
163
161
|
width: v.value ? 0 : o.windowWidth,
|
|
164
162
|
height: v.value ? 0 : o.windowHeight,
|
|
165
163
|
left: 0,
|
|
@@ -167,62 +165,62 @@ const Ae = { class: "digital-human-assistant" }, Ge = { class: "placeholder left
|
|
|
167
165
|
right: 0,
|
|
168
166
|
bottom: 0
|
|
169
167
|
};
|
|
170
|
-
const
|
|
168
|
+
const U = _.width || (v.value ? 300 : o.windowWidth), z = _.height || (v.value ? window.innerHeight - 40 : o.windowHeight), Pe = U / z;
|
|
171
169
|
let T, k;
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
a.value.width = Math.floor(T *
|
|
170
|
+
Pe > l ? (k = z, T = k * l) : (T = U, k = T / l);
|
|
171
|
+
const Re = window.devicePixelRatio || 1;
|
|
172
|
+
a.value.width = Math.floor(T * Re), a.value.height = Math.floor(k * Re), a.value.style.display = "block", a.value.style.objectFit = "contain", v.value === "" ? (a.value.style.width = `${T}px`, a.value.style.height = `${k}px`, a.value.style.marginLeft = `${(U - T) / 2}px`, a.value.style.marginTop = `${(z - k) / 2}px`) : (a.value.style.width = "100%", a.value.style.height = "100%", a.value.style.marginLeft = "0", a.value.style.marginTop = "0"), console.log("Canvas适配完成:", {
|
|
175
173
|
mode: v.value || "浮动",
|
|
176
|
-
container: { width:
|
|
174
|
+
container: { width: U, height: z },
|
|
177
175
|
canvas: { drawWidth: T, drawHeight: k, physicalWidth: a.value.width, physicalHeight: a.value.height }
|
|
178
176
|
}), t || (p.videoRef.value = u.value, p.canvasRef.value = a.value, await p.processVideo());
|
|
179
|
-
},
|
|
180
|
-
if (
|
|
177
|
+
}, W = () => {
|
|
178
|
+
if (I.value || c.value || h.value || L.value) {
|
|
181
179
|
console.log("重连条件不满足:手动断开/已连接/正在连接/正在冷却");
|
|
182
180
|
return;
|
|
183
181
|
}
|
|
184
|
-
if (
|
|
182
|
+
if (H().then(() => {
|
|
185
183
|
console.log("重连前已打断当前对话");
|
|
186
184
|
}), o.maxReconnectTimes !== -1 && y.value >= o.maxReconnectTimes) {
|
|
187
|
-
console.warn(`数字人重连已达最大次数(${o.maxReconnectTimes}),停止重连`),
|
|
185
|
+
console.warn(`数字人重连已达最大次数(${o.maxReconnectTimes}),停止重连`), x(), Ce.funcElMessageShowCtrl(`数字人连接失败,已尝试${o.maxReconnectTimes}次重连,请重试!`), y.value = 0;
|
|
188
186
|
return;
|
|
189
187
|
}
|
|
190
|
-
|
|
188
|
+
L.value = !0, Y.value = setTimeout(() => {
|
|
191
189
|
try {
|
|
192
|
-
y.value++, console.log(`数字人第${y.value}次重连... (最大次数:${o.maxReconnectTimes})`),
|
|
190
|
+
y.value++, console.log(`数字人第${y.value}次重连... (最大次数:${o.maxReconnectTimes})`), pe();
|
|
193
191
|
} finally {
|
|
194
|
-
|
|
192
|
+
L.value = !1;
|
|
195
193
|
}
|
|
196
194
|
}, o.reconnectInterval * 1e3);
|
|
197
|
-
},
|
|
198
|
-
if (
|
|
195
|
+
}, De = async () => {
|
|
196
|
+
if (s)
|
|
199
197
|
try {
|
|
200
|
-
|
|
201
|
-
const t = await
|
|
202
|
-
await
|
|
203
|
-
if (
|
|
204
|
-
|
|
198
|
+
s.addTransceiver("video", { direction: "recvonly" }), s.addTransceiver("audio", { direction: "recvonly" });
|
|
199
|
+
const t = await s.createOffer();
|
|
200
|
+
await s.setLocalDescription(t), await new Promise((l) => {
|
|
201
|
+
if (s?.iceGatheringState === "complete")
|
|
202
|
+
l();
|
|
205
203
|
else {
|
|
206
204
|
const _ = () => {
|
|
207
|
-
|
|
205
|
+
s?.iceGatheringState === "complete" && (s?.removeEventListener("icegatheringstatechange", _), l());
|
|
208
206
|
};
|
|
209
|
-
|
|
207
|
+
s?.addEventListener("icegatheringstatechange", _);
|
|
210
208
|
}
|
|
211
209
|
});
|
|
212
|
-
const e =
|
|
210
|
+
const e = s.localDescription, i = {
|
|
213
211
|
sdp: e.sdp,
|
|
214
212
|
type: e.type
|
|
215
213
|
};
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}).catch((
|
|
219
|
-
console.error("api.digitalHumanOffer 失败:",
|
|
214
|
+
ie.digitalHumanOffer(o.baseUrl, i).then((l) => {
|
|
215
|
+
l ? (b = l.sessionid, s.setRemoteDescription(new RTCSessionDescription(l)), c.value = !0, y.value = 0, x(), console.log("数字人连接成功,重置重连状态"), m(() => w())) : (c.value = !1, console.log("数字人连接失败:接口返回空"), W()), h.value = !1;
|
|
216
|
+
}).catch((l) => {
|
|
217
|
+
console.error("api.digitalHumanOffer 失败:", l), c.value = !1, h.value = !1, W();
|
|
220
218
|
});
|
|
221
219
|
} catch (t) {
|
|
222
|
-
console.error("negotiate 失败:", t),
|
|
220
|
+
console.error("negotiate 失败:", t), c.value = !1, h.value = !1, W();
|
|
223
221
|
}
|
|
224
|
-
},
|
|
225
|
-
if (
|
|
222
|
+
}, pe = () => {
|
|
223
|
+
if (c.value || h.value) {
|
|
226
224
|
console.log("当前已连接/正在连接,无需重复触发");
|
|
227
225
|
return;
|
|
228
226
|
}
|
|
@@ -230,253 +228,238 @@ const Ae = { class: "digital-human-assistant" }, Ge = { class: "placeholder left
|
|
|
230
228
|
const t = {
|
|
231
229
|
sdpSemantics: "unified-plan"
|
|
232
230
|
};
|
|
233
|
-
|
|
231
|
+
s && (s.close(), s = null), s = new RTCPeerConnection(t), s.addEventListener("track", (e) => {
|
|
234
232
|
e.track.kind === "video" && u.value && (u.value.srcObject = e.streams[0], u.value.onloadedmetadata = async () => {
|
|
235
|
-
u.value && a.value && (p.videoRef.value = u.value, p.canvasRef.value = a.value, await
|
|
233
|
+
u.value && a.value && (p.videoRef.value = u.value, p.canvasRef.value = a.value, await w(), await p.processVideo());
|
|
236
234
|
}, u.value.onresize = () => {
|
|
237
|
-
|
|
235
|
+
w();
|
|
238
236
|
});
|
|
239
|
-
}),
|
|
240
|
-
switch (console.log("ICE连接状态变化:",
|
|
237
|
+
}), s.addEventListener("iceconnectionstatechange", () => {
|
|
238
|
+
switch (console.log("ICE连接状态变化:", s.iceConnectionState), s.iceConnectionState) {
|
|
241
239
|
case "disconnected":
|
|
242
240
|
case "failed":
|
|
243
241
|
case "closed":
|
|
244
|
-
console.log("WebRTC连接断开/失败,触发重连"),
|
|
242
|
+
console.log("WebRTC连接断开/失败,触发重连"), c.value = !1, h.value = !1, s = null, b = "", u.value && (u.value.srcObject = null), M(), H().then(() => {
|
|
245
243
|
console.log("ICE连接断开,已打断对话");
|
|
246
|
-
}),
|
|
244
|
+
}), W();
|
|
247
245
|
break;
|
|
248
246
|
case "connected":
|
|
249
|
-
y.value = 0,
|
|
247
|
+
y.value = 0, x(), console.log("ICE连接成功,重置重连状态"), m(() => w());
|
|
250
248
|
break;
|
|
251
249
|
}
|
|
252
|
-
}),
|
|
253
|
-
},
|
|
254
|
-
|
|
250
|
+
}), De();
|
|
251
|
+
}, $e = () => {
|
|
252
|
+
I.value = !0, x(), h.value = !1, p.stopProcessing(), M(), H().then(() => {
|
|
255
253
|
console.log("手动断开连接,已打断当前对话");
|
|
256
254
|
}), setTimeout(() => {
|
|
257
|
-
|
|
255
|
+
s && (s.close(), s = null), b = "", u.value && (u.value.srcObject = null), c.value = !1, y.value = 0, console.log("手动断开连接,重置所有状态");
|
|
258
256
|
}, 500);
|
|
259
257
|
};
|
|
260
|
-
|
|
261
|
-
digitalHumanChat:
|
|
258
|
+
Se({
|
|
259
|
+
digitalHumanChat: ee,
|
|
262
260
|
// 播放文本的核心方法
|
|
263
|
-
digitalHumanInterruptTalk:
|
|
261
|
+
digitalHumanInterruptTalk: H,
|
|
264
262
|
// 打断方法
|
|
265
|
-
isConnected:
|
|
263
|
+
isConnected: c,
|
|
266
264
|
// 连接状态
|
|
267
265
|
isConnecting: h,
|
|
268
266
|
// 连接中状态
|
|
269
|
-
reconnect:
|
|
267
|
+
reconnect: W,
|
|
270
268
|
// 手动触发重连
|
|
271
|
-
clearReconnectTimer:
|
|
269
|
+
clearReconnectTimer: x,
|
|
272
270
|
// 手动停止重连
|
|
273
271
|
currentReconnectTimes: y,
|
|
274
272
|
// 暴露当前重连次数,方便调试
|
|
275
|
-
isWaitingReconnect:
|
|
276
|
-
adaptCanvasToContainer:
|
|
273
|
+
isWaitingReconnect: L,
|
|
274
|
+
adaptCanvasToContainer: w
|
|
277
275
|
// 暴露适配方法,方便父组件调用
|
|
278
|
-
}),
|
|
276
|
+
}), te(
|
|
279
277
|
v,
|
|
280
278
|
async (t, e) => {
|
|
281
|
-
!
|
|
279
|
+
!S.value || !u.value || (await m(), u.value.volume = t ? 0.5 : 1, c.value && (M(), await w()));
|
|
282
280
|
},
|
|
283
281
|
{ immediate: !0, deep: !0 }
|
|
284
|
-
),
|
|
285
|
-
[() =>
|
|
282
|
+
), te(
|
|
283
|
+
[() => c.value, () => o.defaultPlayText],
|
|
286
284
|
async ([t, e], [i]) => {
|
|
287
|
-
t && !i && e && b && (console.log("连接成功,自动播放默认文本:", e), await
|
|
285
|
+
t && !i && e && b && (console.log("连接成功,自动播放默认文本:", e), await ee(e), m(() => w()));
|
|
288
286
|
},
|
|
289
287
|
{ immediate: !1 }
|
|
290
|
-
),
|
|
288
|
+
), te(
|
|
291
289
|
() => o.defaultPlayText,
|
|
292
290
|
async (t) => {
|
|
293
|
-
|
|
291
|
+
c.value && t && b && (console.log("默认文本加载完成,自动播放:", t), await ee(t), m(() => w()));
|
|
294
292
|
},
|
|
295
293
|
{ immediate: !0 }
|
|
296
|
-
),
|
|
297
|
-
await m(), await m(),
|
|
298
|
-
const { x: t, y: e } =
|
|
299
|
-
r.x = t, r.y = e, window.addEventListener("resize",
|
|
294
|
+
), Xe(async () => {
|
|
295
|
+
await m(), await m(), S.value = !0;
|
|
296
|
+
const { x: t, y: e } = fe();
|
|
297
|
+
r.x = t, r.y = e, window.addEventListener("resize", be);
|
|
300
298
|
});
|
|
301
|
-
const
|
|
299
|
+
const be = Ce.debounce(() => {
|
|
302
300
|
if (v.value === "") {
|
|
303
|
-
const { x: t, y: e } =
|
|
301
|
+
const { x: t, y: e } = fe();
|
|
304
302
|
r.x = t, r.y = e;
|
|
305
303
|
}
|
|
306
|
-
|
|
304
|
+
c.value && S.value && (M(!0), m(() => w(!0)));
|
|
307
305
|
}, 50);
|
|
308
|
-
return
|
|
309
|
-
|
|
306
|
+
return Ye(() => {
|
|
307
|
+
H().then(() => {
|
|
310
308
|
console.log("组件卸载,已打断当前对话");
|
|
311
|
-
}), document.removeEventListener("mousemove",
|
|
309
|
+
}), document.removeEventListener("mousemove", O), document.removeEventListener("mousemove", Q), document.removeEventListener("mouseup", Z), document.removeEventListener("mousemove", q), document.removeEventListener("mouseup", K), window.removeEventListener("resize", be), x(), p.stopProcessing(), u.value && (u.value.srcObject = null), s && s.close();
|
|
312
310
|
}), (t, e) => {
|
|
313
|
-
const i =
|
|
314
|
-
return
|
|
311
|
+
const i = Ie("drag");
|
|
312
|
+
return D(), F("div", {
|
|
315
313
|
class: "draggable-window-container",
|
|
316
|
-
style:
|
|
314
|
+
style: Te(Ee.value)
|
|
317
315
|
}, [
|
|
318
|
-
f(n("div",
|
|
319
|
-
[
|
|
320
|
-
[
|
|
316
|
+
f(n("div", Ue, null, 512), [
|
|
317
|
+
[g, re.value],
|
|
318
|
+
[i, ["digital-human-assistant", Me, !0]]
|
|
321
319
|
]),
|
|
322
320
|
n("div", {
|
|
323
321
|
ref_key: "teleportFallbackRef",
|
|
324
|
-
ref:
|
|
322
|
+
ref: P,
|
|
325
323
|
class: "teleport-fallback"
|
|
326
324
|
}, null, 512),
|
|
327
|
-
f(n("div",
|
|
328
|
-
[
|
|
325
|
+
f(n("div", ze, null, 512), [
|
|
326
|
+
[g, N.value]
|
|
329
327
|
]),
|
|
330
|
-
f(n("div",
|
|
331
|
-
[
|
|
328
|
+
f(n("div", Fe, null, 512), [
|
|
329
|
+
[g, G.value]
|
|
332
330
|
]),
|
|
333
|
-
|
|
331
|
+
V.value && v.value === "left" ? (D(), F("div", {
|
|
334
332
|
key: 0,
|
|
335
|
-
class:
|
|
333
|
+
class: ke(["sidebar left-sidebar", { pressing: R.value }])
|
|
336
334
|
}, [
|
|
337
335
|
n("div", {
|
|
338
336
|
class: "window-header",
|
|
339
|
-
onMousedown: e[2] || (e[2] = (
|
|
340
|
-
onMouseup:
|
|
341
|
-
onMouseleave:
|
|
337
|
+
onMousedown: e[2] || (e[2] = (l) => me("left", l)),
|
|
338
|
+
onMouseup: j,
|
|
339
|
+
onMouseleave: j
|
|
342
340
|
}, [
|
|
343
|
-
n("div",
|
|
344
|
-
n("span",
|
|
345
|
-
n("div",
|
|
346
|
-
f(n("button",
|
|
347
|
-
[
|
|
341
|
+
n("div", Ae, [
|
|
342
|
+
n("span", Ne, ne($.windowTitle), 1),
|
|
343
|
+
n("div", Ge, [
|
|
344
|
+
f(n("button", Je, "未连接", 512), [
|
|
345
|
+
[g, !c.value && !h.value]
|
|
348
346
|
]),
|
|
349
|
-
f(n("button",
|
|
350
|
-
[
|
|
347
|
+
f(n("button", qe, "连接中...", 512), [
|
|
348
|
+
[g, h.value]
|
|
351
349
|
]),
|
|
352
|
-
f(n("button",
|
|
353
|
-
[
|
|
350
|
+
f(n("button", Ke, "已连接", 512), [
|
|
351
|
+
[g, c.value]
|
|
354
352
|
])
|
|
355
353
|
])
|
|
356
354
|
]),
|
|
357
|
-
|
|
355
|
+
n("div", {
|
|
358
356
|
class: "drag-window-hide",
|
|
359
|
-
onClick: e[0] || (e[0] = (
|
|
360
|
-
onMousedown: e[1] || (e[1] =
|
|
357
|
+
onClick: e[0] || (e[0] = (l) => B(!1)),
|
|
358
|
+
onMousedown: e[1] || (e[1] = oe(() => {
|
|
361
359
|
}, ["stop"]))
|
|
362
|
-
},
|
|
363
|
-
default: le(() => [
|
|
364
|
-
L(i)
|
|
365
|
-
]),
|
|
366
|
-
_: 1
|
|
367
|
-
})
|
|
360
|
+
}, null, 32)
|
|
368
361
|
], 32),
|
|
369
|
-
n("div",
|
|
370
|
-
|
|
362
|
+
n("div", Qe, [
|
|
363
|
+
ae(t.$slots, "sidebar-left", {}, void 0, !0),
|
|
371
364
|
n("div", {
|
|
372
365
|
ref_key: "sidebarLeftVideoRef",
|
|
373
|
-
ref:
|
|
366
|
+
ref: de,
|
|
374
367
|
class: "sidebar-video-container"
|
|
375
368
|
}, null, 512)
|
|
376
369
|
])
|
|
377
|
-
], 2)) :
|
|
370
|
+
], 2)) : A("", !0),
|
|
378
371
|
n("div", {
|
|
379
372
|
class: "main-content-outer",
|
|
380
373
|
ref_key: "containerRef",
|
|
381
|
-
ref:
|
|
374
|
+
ref: se
|
|
382
375
|
}, [
|
|
383
|
-
n("div",
|
|
384
|
-
|
|
376
|
+
n("div", Ze, [
|
|
377
|
+
ae(t.$slots, "main", {}, void 0, !0)
|
|
385
378
|
]),
|
|
386
|
-
|
|
379
|
+
V.value && v.value === "" ? (D(), F("div", {
|
|
387
380
|
key: 0,
|
|
388
381
|
ref_key: "dragWindowRef",
|
|
389
|
-
ref:
|
|
382
|
+
ref: le,
|
|
390
383
|
class: "draggable-window",
|
|
391
|
-
style:
|
|
384
|
+
style: Te(Le.value)
|
|
392
385
|
}, [
|
|
393
386
|
n("div", {
|
|
394
387
|
class: "window-header",
|
|
395
|
-
onMousedown:
|
|
388
|
+
onMousedown: We
|
|
396
389
|
}, [
|
|
397
|
-
n("div",
|
|
398
|
-
n("span",
|
|
399
|
-
n("div",
|
|
400
|
-
f(n("button",
|
|
401
|
-
[
|
|
390
|
+
n("div", et, [
|
|
391
|
+
n("span", tt, ne($.windowTitle), 1),
|
|
392
|
+
n("div", nt, [
|
|
393
|
+
f(n("button", ot, "未连接", 512), [
|
|
394
|
+
[g, !c.value && !h.value]
|
|
402
395
|
]),
|
|
403
|
-
f(n("button",
|
|
404
|
-
[
|
|
396
|
+
f(n("button", at, "连接中...", 512), [
|
|
397
|
+
[g, h.value]
|
|
405
398
|
]),
|
|
406
|
-
f(n("button",
|
|
407
|
-
[
|
|
399
|
+
f(n("button", it, "已连接", 512), [
|
|
400
|
+
[g, c.value]
|
|
408
401
|
])
|
|
409
402
|
])
|
|
410
403
|
]),
|
|
411
|
-
|
|
404
|
+
n("div", {
|
|
412
405
|
class: "drag-window-hide",
|
|
413
|
-
onClick: e[3] || (e[3] = (
|
|
414
|
-
onMousedown: e[4] || (e[4] =
|
|
406
|
+
onClick: e[3] || (e[3] = (l) => B(!1)),
|
|
407
|
+
onMousedown: e[4] || (e[4] = oe(() => {
|
|
415
408
|
}, ["stop"]))
|
|
416
|
-
},
|
|
417
|
-
default: le(() => [
|
|
418
|
-
L(i)
|
|
419
|
-
]),
|
|
420
|
-
_: 1
|
|
421
|
-
})
|
|
409
|
+
}, null, 32)
|
|
422
410
|
], 32),
|
|
423
|
-
n("div",
|
|
411
|
+
n("div", lt, [
|
|
424
412
|
n("div", {
|
|
425
413
|
class: "video-container",
|
|
426
414
|
ref_key: "windowVideoRef",
|
|
427
|
-
ref:
|
|
415
|
+
ref: ce
|
|
428
416
|
}, null, 512)
|
|
429
417
|
])
|
|
430
|
-
], 4)) :
|
|
418
|
+
], 4)) : A("", !0)
|
|
431
419
|
], 512),
|
|
432
|
-
|
|
420
|
+
V.value && v.value === "right" ? (D(), F("div", {
|
|
433
421
|
key: 1,
|
|
434
|
-
class:
|
|
422
|
+
class: ke(["sidebar right-sidebar", { pressing: R.value }])
|
|
435
423
|
}, [
|
|
436
424
|
n("div", {
|
|
437
425
|
class: "window-header",
|
|
438
|
-
onMousedown: e[7] || (e[7] = (
|
|
439
|
-
onMouseup:
|
|
440
|
-
onMouseleave:
|
|
426
|
+
onMousedown: e[7] || (e[7] = (l) => me("right", l)),
|
|
427
|
+
onMouseup: j,
|
|
428
|
+
onMouseleave: j
|
|
441
429
|
}, [
|
|
442
|
-
n("div",
|
|
443
|
-
n("span",
|
|
444
|
-
n("div",
|
|
445
|
-
f(n("button",
|
|
446
|
-
[
|
|
430
|
+
n("div", st, [
|
|
431
|
+
n("span", ct, ne($.windowTitle), 1),
|
|
432
|
+
n("div", dt, [
|
|
433
|
+
f(n("button", ut, "未连接", 512), [
|
|
434
|
+
[g, !c.value && !h.value]
|
|
447
435
|
]),
|
|
448
|
-
f(n("button",
|
|
449
|
-
[
|
|
436
|
+
f(n("button", rt, "连接中...", 512), [
|
|
437
|
+
[g, h.value]
|
|
450
438
|
]),
|
|
451
|
-
f(n("button",
|
|
452
|
-
[
|
|
439
|
+
f(n("button", vt, "已连接", 512), [
|
|
440
|
+
[g, c.value]
|
|
453
441
|
])
|
|
454
442
|
])
|
|
455
443
|
]),
|
|
456
|
-
|
|
444
|
+
n("div", {
|
|
457
445
|
class: "drag-window-hide",
|
|
458
|
-
onClick: e[5] || (e[5] = (
|
|
459
|
-
onMousedown: e[6] || (e[6] =
|
|
446
|
+
onClick: e[5] || (e[5] = (l) => B(!1)),
|
|
447
|
+
onMousedown: e[6] || (e[6] = oe(() => {
|
|
460
448
|
}, ["stop"]))
|
|
461
|
-
},
|
|
462
|
-
default: le(() => [
|
|
463
|
-
L(i)
|
|
464
|
-
]),
|
|
465
|
-
_: 1
|
|
466
|
-
})
|
|
449
|
+
}, null, 32)
|
|
467
450
|
], 32),
|
|
468
|
-
n("div",
|
|
469
|
-
|
|
451
|
+
n("div", ht, [
|
|
452
|
+
ae(t.$slots, "sidebar-right", {}, void 0, !0),
|
|
470
453
|
n("div", {
|
|
471
454
|
ref_key: "sidebarRightVideoRef",
|
|
472
|
-
ref:
|
|
455
|
+
ref: ue,
|
|
473
456
|
class: "sidebar-video-container"
|
|
474
457
|
}, null, 512)
|
|
475
458
|
])
|
|
476
|
-
], 2)) :
|
|
477
|
-
|
|
459
|
+
], 2)) : A("", !0),
|
|
460
|
+
S.value ? (D(), Be(Oe, {
|
|
478
461
|
key: 2,
|
|
479
|
-
to:
|
|
462
|
+
to: ve()
|
|
480
463
|
}, [
|
|
481
464
|
n("video", {
|
|
482
465
|
ref_key: "digitalHumanVideo",
|
|
@@ -491,11 +474,11 @@ const Ae = { class: "digital-human-assistant" }, Ge = { class: "placeholder left
|
|
|
491
474
|
ref: a,
|
|
492
475
|
class: "digital-video processed-canvas"
|
|
493
476
|
}, null, 512)
|
|
494
|
-
], 8, ["to"])) :
|
|
477
|
+
], 8, ["to"])) : A("", !0)
|
|
495
478
|
], 4);
|
|
496
479
|
};
|
|
497
480
|
}
|
|
498
481
|
});
|
|
499
482
|
export {
|
|
500
|
-
|
|
483
|
+
bt as default
|
|
501
484
|
};
|