jiuyiUniapp/jiuyi/node_modules/@tencentcloud/call-uikit-vue/tuicall-uikit-vue.es.js

8895 lines
564 KiB
JavaScript
Raw Normal View History

2024-12-18 15:46:27 +08:00
(function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".tk-row{display:flex;flex-wrap:wrap;position:relative;box-sizing:border-box;width:100%}.tk-col{display:flex;flex-wrap:wrap;position:relative;box-sizing:border-box}.tk-loading_dot-container{display:flex;justify-content:space-between;align-items:center;height:100%}.tk-loading_dot-container .tk-loading_dot:nth-child(1){opacity:0;animation-duration:.8s;animation-delay:0s;animation-play-state:running}.tk-loading_dot-container .tk-loading_dot:nth-child(2){opacity:.083;animation-duration:.8s;animation-delay:.2666666667s;animation-play-state:running}.tk-loading_dot-container .tk-loading_dot:nth-child(3){opacity:.1667;animation-duration:.8s;animation-delay:.5333333333s;animation-play-state:running}.tk-loading_dot-container .tk-loading_dot{width:20%;height:20%;border-radius:50%;background-color:#fff;animation-duration:1.8s;animation-name:dotting;animation-timing-function:linear;animation-iteration-count:infinite;animation-fill-mode:both}@keyframes dotting{0%{opacity:.15}1%{opacity:.8}33%{opacity:.8}34%{opacity:.15}to{opacity:.15}}.tk-loading_circle-container{height:100%;border:2px solid;border-radius:50%;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#fff;border-left-color:#fff;background:0 0;vertical-align:middle;box-sizing:border-box;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.tk-loading{display:flex;align-items:center;flex-direction:column}.tk-loading .tk-loading_text{margin:10px}.tk-image{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;vertical-align:middle;width:300px;height:225px}.tk-image .tk-image_inner{width:100%;height:100%}.tk-button{display:inline-flex;align-items:center;justify-content:center}.tk-button.tk-button--small{height:24px}.tk-button.tk-button--middle{height:32px}.tk-button.tk-button--large{height:40px}.tk-button .tk-button--content{color:#606266;font-size:14px;font-weight:500}.tk-button.tk-circle.tk-button--small{width:24px}.tk-button.tk-circle.tk-button--default{width:32px}.tk-button.tk-circle.tk-button--large{width:40px}.btn-content[data-v-135d060f],.btn-content[data-v-f92abf93]{display:flex;flex-direction:column;align-items:center}.tk-text{display:inline-block;overflow:hidden;text-align:center;line-height:normal;white-space:nowrap;font-weight:400;font-size:14px;color:#303133}.tk-text.tk-text--line-clamp{display:-webkit-inline-box;-webkit-box-orient:vertical;white-space:normal}.btn-content[data-v-4c3a35f0]{display:flex;flex-direction:column;align-items:center}.top-bar-container[data-v-b040a138]{position:absolute;z-index:2;width:100%;height:5.8%;display:flex;align-items:center}.tk-overlay{position:fixed;left:0;top:0;bottom:0;width:100%}.tk-overlay .tk-overlay_mask-container{width:100%;height:100%;z-index:0;position:absolute}.tk-overlay .tk-overlay_mask{position:absolute;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:1}.tk-overlay .tk-overlay_slot{position:absolute;left:0;right:0;top:0;bottom:0;z-index:1;display:flex;justify-content:center}.tk-avatar{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-align:center;overflow:hidden;color:#fff;background:#c0c4cc;width:40px;height:40px;font-size:14px}.tk-avatar.tk-avatar--square{border-radius:4px}.tk-avatar.tk-avatar--circle{border-radius:100%}.tk-avatar .tk-avatar_img,.tk-avatar .tk-avatar_image{width:100%;height:100%}.mic-container[data-v-ea062939]{position:relative;width:24px;height:24px}.mic-container .mic-level-container[data-v-ea062939]{position:absolute;left:6px;width:8px;height:14px;display:flex;flex-wrap:wrap;border-radius:4px;overflow:hidden;flex-direction:column-reverse;justify-content:space-between}.mic-container .mic-level-container .mic-level[data-v-ea062939]{width:100%;background-color:#27c39f;transition:height .2s}.overlay-stream-container.mobile .overlay-stream-content-container[data-v-34807212]{width:100%;top:26%;position:
import { TUICallEvent as R, TUICallEngine as ho } from "tuicall-engine-webrtc";
import { TUICore as ye, TUIConstants as dA, TUILogin as Lo } from "@tencentcloud/tui-core";
import Vt from "@tencentcloud/chat";
import { inject as VA, ref as p, onMounted as CA, onUnmounted as DA, toRefs as G, watch as uA, computed as S, version as st, defineComponent as f, provide as OA, openBlock as d, createElementBlock as y, normalizeClass as k, unref as l, normalizeStyle as eA, renderSlot as q, createElementVNode as L, createBlock as U, toDisplayString as W, createCommentVNode as z, Fragment as RA, createVNode as C, withCtx as E, createTextVNode as NA, watchEffect as ue, renderList as ce, toRef as ct, resolveComponent as ea, Teleport as Eo, withDirectives as sA, vShow as cA, withModifiers as pe, nextTick as mo, mergeProps as bt, normalizeProps as zo, withKeys as Uo, render as Ue, Transition as fo, reactive as Be } from "vue";
var u = /* @__PURE__ */ ((a) => (a.CALL = "call", a.CUSTOM = "custom", a))(u || {}), _ = /* @__PURE__ */ ((a) => (a[a.UNKNOWN = 0] = "UNKNOWN", a[a.AUDIO = 1] = "AUDIO", a[a.VIDEO = 2] = "VIDEO", a))(_ || {}), IA = /* @__PURE__ */ ((a) => (a.UNKNOWN = "unknown", a.CALLEE = "callee", a.CALLER = "caller", a))(IA || {}), P = /* @__PURE__ */ ((a) => (a.IDLE = "idle", a.CALLING = "calling", a.CONNECTED = "connected", a))(P || {}), fe = /* @__PURE__ */ ((a) => (a.CONTAIN = "contain", a.COVER = "cover", a.FILL = "fill", a))(fe || {}), ve = /* @__PURE__ */ ((a) => (a.RESOLUTION_480P = "480p", a.RESOLUTION_720P = "720p", a.RESOLUTION_1080P = "1080p", a))(ve || {}), ta = /* @__PURE__ */ ((a) => (a.EN = "en", a["ZH-CN"] = "zh-cn", a.JA_JP = "ja_JP", a))(ta || {});
const jA = {
IDLE: "idle",
BE_INVITED: "be-invited",
DIALING_C2C: "dialing-c2c",
DIALING_GROUP: "dialing-group",
CALLING_C2C_AUDIO: "calling-c2c-audio",
CALLING_C2C_VIDEO: "calling-c2c-video",
CALLING_GROUP_AUDIO: "calling-group-audio",
CALLING_GROUP_VIDEO: "calling-group-video"
}, vo = {
unknown: 0,
audio: 1,
video: 2
/* VIDEO */
};
var je = /* @__PURE__ */ ((a) => (a.EAR = "ear", a.SPEAKER = "speaker", a))(je || {}), hA = /* @__PURE__ */ ((a) => (a.MICROPHONE = "microphone", a.CAMERA = "camera", a.SPEAKER = "speaker", a))(hA || {}), we = /* @__PURE__ */ ((a) => (a[a.FRONT = 0] = "FRONT", a[a.BACK = 1] = "BACK", a))(we || {}), _A = /* @__PURE__ */ ((a) => (a.Camera = "camera", a.Microphone = "microphone", a.SwitchCamera = "switchCamera", a.InviteUser = "inviteUser", a))(_A || {}), Te = /* @__PURE__ */ ((a) => (a.Open = "open", a.Close = "close", a))(Te || {}), GA = /* @__PURE__ */ ((a) => (a.LOCAL = "local", a.REMOTE = "remote", a))(GA || {}), Xe = /* @__PURE__ */ ((a) => (a.LocalInLargeView = "local", a.RemoteInLargeView = "remote", a))(Xe || {}), Ie = /* @__PURE__ */ ((a) => (a[a.INVITE = 1] = "INVITE", a[a.CANCEL_INVITE = 2] = "CANCEL_INVITE", a[a.ACCEPT_INVITE = 3] = "ACCEPT_INVITE", a[a.REJECT_INVITE = 4] = "REJECT_INVITE", a[a.INVITE_TIMEOUT = 5] = "INVITE_TIMEOUT", a))(Ie || {});
const xt = {
SWITCH_TO_AUDIO_CALL_FAILED: 60001,
SWITCH_TO_VIDEO_CALL_FAILED: 60002,
MICROPHONE_UNAVAILABLE: 60003,
CAMERA_UNAVAILABLE: 60004,
BAN_DEVICE: 60005,
NOT_SUPPORTED_WEBRTC: 60006,
ERROR_BLACKLIST: 20007
}, wo = {
SWITCH_TO_AUDIO_CALL_FAILED: "switchToAudioCall-call-failed",
SWITCH_TO_VIDEO_CALL_FAILED: "switchToVideoCall-call-failed",
MICROPHONE_UNAVAILABLE: "microphone-unavailable",
CAMERA_UNAVAILABLE: "camera-unavailable",
BAN_DEVICE: "ban-device",
NOT_SUPPORTED_WEBRTC: "not-supported-webrtc",
ERROR_BLACKLIST: "blacklist-user-tips"
};
var aa = /* @__PURE__ */ ((a) => (a[a.NORMAL = 0] = "NORMAL", a[a.RELEASE = 1] = "RELEASE", a[a.WARNING = 2] = "WARNING", a[a.ERROR = 3] = "ERROR", a[a.NONE = 4] = "NONE", a))(aa || {});
const Fe = {
CALL_STATUS: "callStatus",
CALL_ROLE: "callRole",
CALL_MEDIA_TYPE: "callMediaType",
LOCAL_USER_INFO: "localUserInfo",
LOCAL_USER_INFO_EXCLUDE_VOLUMN: "localUserInfoExcludeVolume",
REMOTE_USER_INFO_LIST: "remoteUserInfoList",
REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST: "remoteUserInfoExcludeVolumeList",
CALLER_USER_INFO: "callerUserInfo",
IS_GROUP: "isGroup",
CALL_DURATION: "callDuration",
CALL_TIPS: "callTips",
TOAST_INFO: "toastInfo",
IS_MINIMIZED: "isMinimized",
ENABLE_FLOAT_WINDOW: "enableFloatWindow",
BIG_SCREEN_USER_ID: "bigScreenUserId",
LANGUAGE: "language",
IS_CLICKABLE: "isClickable",
DISPLAY_MODE: "displayMode",
VIDEO_RESOLUTION: "videoResolution",
PUSHER: "pusher",
PLAYER: "player",
IS_EAR_PHONE: "isEarPhone",
IS_MUTE_SPEAKER: "isMuteSpeaker",
SHOW_PERMISSION_TIP: "SHOW_PERMISSION_TIP",
NETWORK_STATUS: "NetWorkStatus",
GROUP_ID: "groupID",
ROOM_ID: "roomID",
ROOM_ID_TYPE: "roomIdType",
SHOW_SELECT_USER: "showSelectUser",
IS_SHOW_ENABLE_VIRTUAL_BACKGROUND: "isShowEnableVirtualBackground",
ENABLE_VIRTUAL_BACKGROUND: "enableVirtualBackground",
GROUP_CALL_MEMBERS: "groupCallMembers",
PUSHER_ID: "pusherId"
}, Oo = {
INNER_ATTR_KIT_INFO: "inner_attr_kit_info"
}, Vo = {
INITIAL_PUSHER: "initialPusher",
NEW_PUSHER: "newPusher"
}, i = {
PREFIX: "【CallService】",
AUDIO: "audio",
VIDEO: "video",
LOCAL_VIDEO: "localVideo",
ERROR: "error",
TIMEOUT: "timeout",
RAF: "raf",
INTERVAL: "interval",
DEFAULT: "default",
BOOLEAN: "boolean",
STRING: "string",
NUMBER: "number",
OBJECT: "object",
ARRAY: "array",
FUNCTION: "function",
UNDEFINED: "undefined",
UNKNOWN: "unknown",
ALL: "all",
MYSELF: "myself",
DEVICE_LIST: "deviceList",
CAMERA_POSITION: "cameraPosition",
CUSTOM_UI_CONFIG: "customUIConfig",
...Vo,
...Fe,
...Oo
}, bo = "https://web.sdk.qcloud.com/component/TUIKit/assets/call.png", xo = "https://web.sdk.qcloud.com/component/TUIKit/assets/call-video-reverse.svg", kt = 2147483647, ko = 3, Ro = 4;
var gt = /* @__PURE__ */ ((a) => (a.MAC = "mac", a.WIN = "win", a))(gt || {}), ht = /* @__PURE__ */ ((a) => (a[a.TUI_CALL_KIT = 14] = "TUI_CALL_KIT", a[a.TIM_CALL_KIT = 15] = "TIM_CALL_KIT", a))(ht || {}), Tt = /* @__PURE__ */ ((a) => (a[a.NUMBER_ROOM_ID = 1] = "NUMBER_ROOM_ID", a[a.STRING_ROOM_ID = 2] = "STRING_ROOM_ID", a))(Tt || {});
async function Bo(a) {
if (!a)
return !1;
try {
const A = await new Promise((e, t) => {
const o = new XMLHttpRequest();
o.open("HEAD", a, !0), o.onload = () => e(o), o.onerror = () => t(o), o.send();
});
return A.status === 200 && A.getResponseHeader("Content-Type") === "audio/mpeg";
} catch (A) {
return console.warn(A), !1;
}
}
function qe(a) {
if (typeof a != "object" || a === null)
return a;
let A = Array.isArray(a) ? [] : {};
for (let e in a)
a.hasOwnProperty(e) && (A[e] = qe(a[e]));
return A;
}
const Po = {
// 按钮文案
hangup: "Hang up",
reject: "Decline",
accept: "Accept",
camera: "Camera",
microphone: "Microphone",
speaker: "speaker",
"open camera": "Open Camera",
"close camera": "Close Camera",
"open microphone": "Open Microphone",
"close microphone": "Close Microphone",
"video-to-audio": "Switch to audio",
"virtual-background": "Blur Background",
// 通话结果
"other side reject call": "other side reject call",
"reject call": "Reject Call",
cancel: "Cancel Call",
"other side line busy": "other side line busy",
"in busy": "in busy",
"call timeout": "call timeout",
"no response from the other side": "no response from the other side",
"end call": "end call",
// 通话提示语
"caller calling message": "Awaiting response",
"callee calling video message": "invites you to a video call",
"callee calling audio message": "invites you to a voice call",
"no microphone access": "no microphone access",
"no camera access": "no camera access",
"invite member": "Invite Member",
"Invited group call": "invites you to a group call",
waiting: "Calling...",
me: "(me)",
// 弹出层文案
"browser-authorization": "Browser authorization",
"mac-privacy": "System Preferences -> Security and Privacy -> Privacy",
"win-privacy": "Setting -> Privacy and Security -> App permissions",
"mac-preferences": "Open System Preferences",
"win-preferences": "Open Setting",
"Please enter userID": "Please enter userID",
"View more": "View more",
"people selected": "people selected",
"Select all": "Select all",
Cancel: "Cancel",
Done: "Done",
"exist group call": "A group call already exists in the current group",
// UI3.0 新增
"camera enabled": "Camera On",
"camera disabled": "Camera Off",
"microphone enabled": "Unmuted",
"microphone disabled": "Muted",
"speaker enabled": "Speaker On",
"speaker disabled": "Speaker Off",
"open speaker": "Turn on speaker",
"close speaker": "Turn off speaker",
"wait to be called": "Waiting",
answered: "Connected",
"people in the call": " other(s) in the call",
"failed to obtain speakers": "failed to obtain speakers",
"you have a new call": "You have a new call",
"switch camera": "Switch",
join: "Join",
"people on the call": "people on the call",
"Supports a maximum of 9 people for simultaneous calls": "Supports a maximum of 9 people for simultaneous calls",
you: "(you)",
"The network is poor during your current call": "The network is poor during your current call",
"The other user network is poor during the current call": "The other party's network is poor during the current call",
"TUICallKit init is not complete": "TUICallKit init is not complete. You need to use this API after the init API is finished.",
// combine chat
"Video call": "Video call",
"Voice call": "Voice call",
"Call End": "Call End",
"Switch voice call": "Switch voice call",
"Switch video call": "Switch video call",
"Call duration": "Duration",
"Call Cancel": "Canceled",
"Other Side Cancel": "Call canceled by caller",
Decline: "Declined",
"Other Side Decline": "Call declined by user",
"No answer": "Call not answered",
"Other Side No Answer": "Call wasn't answered",
Answered: "Answered",
"Other Side Line Busy": "Line busy",
"Line Busy": "Line busy. Call not received.",
// 待废弃文案
"Those involved": "Those involved in the call are",
call: "call",
"video-call": "video call",
"audio-call": "audio call",
search: "search",
"search-result": "search result",
"no-user": "user not found",
"member-not-added": "member not added",
"input-phone-userID": "phone number or userID",
"not-login": "not logged in",
"login-status-expire": "login status is invalid, please refresh the page and try again",
"experience-multi-call": "experience multi-person calls, please download the full-featured demo: ",
"not-support-multi-call": "multi-person call interface is not open",
userID: "userID",
"already-enter": "entered the call",
"camera-opened": "Camera on",
"camera-closed": "Camera off",
"microphone-opened": "Mic on",
"microphone-closed": "Mic off",
timeout: "timeout",
"kick out": "kick out",
"image-resolution": "Resolution",
"default-image-resolution": "Default",
"invited-person": "Invite",
"be-rejected": "Call declined, ",
"be-no-response": "No response, ",
"be-line-busy": "Line busy, ",
"be-canceled": "The call is canceled, ",
"voice-call-end": "Voice call ended",
"video-call-end": "Video call ended",
"method-call-failed": "Failed to sync the operation",
"failed-to-obtain-permission": "Failed to obtain permissions",
"environment-detection-failed": "Failed to check the environment",
"switchToAudioCall-call-failed": "switch to audio call method failed",
"switchToVideoCall-call-failed": "switch to video call method failed",
"microphone-unavailable": "No mic found",
"camera-unavailable": "No camera found",
"ban-device": "Device access denied",
"not-supported-webrtc": "Your current environment does not support WebRTC",
"blacklist-user-tips": "The identifier is in blacklist. Failed to send this message!",
"is-already-calling": "TUICallKit is already on a call",
"need-init": "Before initiating a call with TUICallKit, ensure that the TUICallKitServer.init() method has executed successfully. ",
"can't call yourself": "Can't call yourself",
// eslint-disable-line
"Use-phone-and-computer": "Use your mobile phone and computer to experience video calls",
"Wechat scan right QR code": "Wechat scan right QR code",
"Scan the QR code above": "Scan the QR code above",
"accept-error": "Accept failed",
"accept-device-error": "Accept failed, unable to auth calling device",
"call-error": "Start call failed"
}, Wo = {
// 按钮文案
hangup: "挂断",
reject: "拒绝",
accept: "接受",
camera: "摄像头",
microphone: "麦克风",
speaker: "扬声器",
"open camera": "打开摄像头",
"close camera": "关闭摄像头",
"open microphone": "打开麦克风",
"close microphone": "关闭麦克风",
"video-to-audio": "转语音通话",
"virtual-background": "模糊背景",
// 通话结果
"other side reject call": "对方已拒绝",
"reject call": "拒绝通话",
cancel: "取消通话",
"other side line busy": "对方忙线",
"in busy": "正在忙",
"call timeout": "呼叫超时",
"end call": "结束通话",
// 通话提示语
"caller calling message": "等待对方接受邀请",
"callee calling video message": "邀请你视频通话",
"callee calling audio message": "邀请你语音通话",
"no microphone access": "没有麦克风权限",
"no camera access": "没有摄像头权限",
"invite member": "邀请成员",
"Invited group call": "邀请你加入多人通话",
"Those involved": "参与通话的有:",
waiting: "等待接听...",
me: "(我)",
// 弹出层文案
"browser-authorization": "浏览器授权",
"mac-privacy": "系统偏好设置 -> 安全与隐私 -> 隐私",
"win-privacy": "设置 -> 隐私和安全性 -> 应用权限",
"mac-preferences": "打开系统偏好设置",
"win-preferences": "打开系统设置",
"Please enter userID": "请输入 userID",
"View more": "查看更多",
"people selected": "人已选中",
"Select all": "全选",
Cancel: "取消",
Done: "完成",
"exist group call": "当前群组中已经存在群组通话",
// UI3.0 新增
"camera enabled": "摄像头已开",
"camera disabled": "摄像头已关",
"microphone enabled": "麦克风已开",
"microphone disabled": "麦克风已关",
"speaker enabled": "扬声器已开",
"speaker disabled": "扬声器已关",
"open speaker": "开启扬声器",
"close speaker": "关闭扬声器",
"wait to be called": "等待接听",
answered: "已接通",
"people in the call": "人参与通话",
"failed to obtain speakers": "无法获取扬声器",
"you have a new call": "您有一个新的通话",
"switch camera": "翻转",
join: "加入",
"people on the call": "人正在通话",
"Supports a maximum of 9 people for simultaneous calls": "最多支持9人同时通话",
you: "(你)",
"The network is poor during your current call": "当前通话你的网络不佳",
"The other user network is poor during the current call": "当前通话对方网络不佳",
"TUICallKit init is not complete": "TUICallKit 初始化登录未完成,需要在 init 完成后使用此 API",
// combine chat
"Video call": "发起视频通话",
"Voice call": "发起语音通话",
"Call End": "通话结束",
"Switch voice call": "切换语音通话",
"Switch video call": "切换视频通话",
"Call duration": "通话时长",
"Call Cancel": "已取消",
"Other Side Cancel": "对方已取消",
Decline: "已拒绝",
"Other Side Decline": "对方已拒绝",
"No answer": "超时无应答",
"Other Side No Answer": "对方无应答",
Answered: "已接听",
"Other Side Line Busy": "对方忙线中",
"Line Busy": "忙线无应答",
// 待废弃文案
timeout: "超时",
"kick out": "被踢",
call: "通话",
"video-call": "视频通话",
"audio-call": "音频通话",
search: "搜索",
"search-result": "搜索结果",
"Wechat scan right QR code": "微信扫右二维码",
"Use-phone-and-computer": "用手机与电脑互打体验视频通话",
"Scan the QR code above": "扫描上方二维码",
"no-user": "未搜索到用户",
"member-not-added": "未添加成员",
"not-login": "未登录",
"login-status-expire": "登录状态已失效,请刷新网页重试",
"experience-multi-call": "体验多人通话请下载全功能demo:",
"not-support-multi-call": "多人通话接口未开放",
"input-phone-userID": "请输入手机号/用户ID",
userID: "用户ID",
"already-enter": "已经进入当前通话",
"image-resolution": "分辨率",
"default-image-resolution": "默认分辨率",
"invited-person": "添加成员",
"be-rejected": "对方已拒绝,",
"be-no-response": "对方无应答,",
"be-line-busy": "对方忙线中,",
"be-canceled": "对方已取消",
"voice-call-end": "语音通话结束",
"video-call-end": "视频通话结束",
"method-call-failed": "同步操作失败",
"failed-to-obtain-permission": "权限获取失败",
"environment-detection-failed": "环境检测失败",
"switchToAudioCall-call-failed": "切语音调用失败",
"switchToVideoCall-call-failed": "切视频调用失败",
"microphone-unavailable": "没有可用的麦克风设备",
"camera-unavailable": "没有可用的摄像头设备",
"ban-device": "用户禁止使用设备",
"not-supported-webrtc": "当前环境不支持 WebRTC",
"blacklist-user-tips": "发起通话失败,被对方拉入黑名单,禁止发起!",
"is-already-calling": "TUICallKit 已在通话状态",
"need-init": "TUICallKit 发起通话前需保证 TUICallKitServer.init() 方法执行成功",
"can't call yourself": "不能呼叫自己",
// eslint-disable-line
"accept-error": "接通失败",
"accept-device-error": "接通失败,通话设备获取失败",
"call-error": "发起通话失败"
}, Go = {
// 按钮文案
hangup: "通話終了",
reject: "拒否",
accept: "応答",
camera: "カメラ",
microphone: "マイク",
speaker: "スピーカー",
"virtual-background": "ボケ背景",
// 通话结果
"other side reject call": "通話が拒否されました",
"reject call": "通話拒否",
cancel: "通話をキャンセル",
"other side line busy": "相手が通話中です",
"in busy": "通話中",
"call timeout": "呼び出しタイムアウト",
"end call": "通話終了",
// 通话提示语
"caller calling message": "応答を待っています",
"callee calling video message": "ビデオ通話に招待されました",
"callee calling audio message": "音声通話に招待されました",
"no microphone access": "マイクにアクセスできません",
"no camera access": "カメラにアクセスできません",
"invite member": "メンバーを招待する",
// 弹出层文案
"browser-authorization": "ブラウザ認証",
"mac-privacy": "システム環境設定 -> セキュリティとプライバシー ->プライバシー",
"win-privacy": "設定 -> セキュリティとプライバシー ->アプリのアクセス許可",
"mac-preferences": "システム環境設定を開く",
"win-preferences": "システム設定を開く",
"Please enter userID": "ユーザーIDを入力してください",
"View more": "もっと見る",
"people selected": "人が選択されました",
"Select all": "すべて選択",
Cancel: "キャンセル",
Done: "完了",
"exist group call": "現在のグループには既にグループ通話が存在しています",
// combine chat
"Video call": "ビデオ通話を開始",
"Voice call": "音声通話を開始",
"Call End": "通話終了",
"Switch audio call": "音声通話に切り替える",
"Switch video call": "ビデオ通話に切り替える",
"Call duration": "通話時間",
"Call Cancel": "通話をキャンセルする",
"Other Side Cancel": "相手がキャンセルしました",
Decline: "通話を拒否する",
"Other Side Decline": "相手が拒否しました",
"No answer": "無応答",
"Other Side No Answer": "相手からの返答はありません",
Answered: "応答しました",
"Other Side Line Busy": "相手は現在忙しくて対応できません",
"Line Busy": "忙しいので応答できません",
// UI3.0文案
"open camera": "オープンカメラ",
"close camera": "カメラを閉じる",
"open microphone": "オープンマイク",
"close microphone": "マイクを閉じる",
"camera enabled": "カメラオン",
"camera disabled": "カメラオフ",
"microphone enabled": "マイクオン",
"microphone disabled": "マイクオフ",
"speaker enabled": "スピーカーオン",
"speaker disabled": "スピーカーオフ",
"open speaker": "スピーカーをオンにする",
"close speaker": "スピーカーの電源を切ります",
"wait to be called": "待機中",
answered: "接続済み",
"people in the call": "通話に参加している人たち",
"failed to obtain speakers": "スピーカーが見つかりません",
"you have a new call": "新しい通話があります",
"switch camera": "切り替え",
join: "参加する",
"people on the call": "人が通話中です",
"Supports a maximum of 9 people for simultaneous calls": "最大で9人まで同時通話が可能です",
you: "(あなた)",
"The network is poor during your current call": "現在の通話で、あなたのネットワークは不良です",
"The other user network is poor during the current call": "現在の通話で、相手側のネットワークが不良です",
"TUICallKit init is not complete": "TUICallKitの初期化ログインが完了していません。init が完了した後にこのAPIを使用する必要があります。",
// 待废弃文案
timeout: "タイムアウト",
"kick out": "キックアウトされました",
"Invited group call": "グループ通話に招待されました。",
"Those involved": "参加者:",
call: "通話",
"video-call": "ビデオ通話",
"audio-call": "音声通話",
search: "検索",
"search-result": "検索結果",
"Wechat scan right QR code": "WeChatで右側にあるQRコードを読み取ります。",
"Use-phone-and-computer": "携帯電話とコンピュータを使用してビデオ通話を体験してください",
"Scan the QR code above": "上のQRコードを読み取ります。",
"no-user": "ユーザーが見つかりませんでした",
"member-not-added": "メンバーが追加されていません",
"not-login": "ログインしていません",
"login-status-expire": "ログインの有効期限が過ぎています。ページを更新してもう一度お試しください",
"experience-multi-call": "複数人で同時に音声通話できるグループ通話機能を体験するには、全機能のデモをダウンロードしてください",
"not-support-multi-call": "グループ通話インターフェイスが開いていません",
"input-phone-userID": "携帯電話番号/ユーザーIDを入力してください",
userID: "ユーザーID",
"already-enter": "すでに通話に参加しています",
waiting: "応答を待っています...",
"camera-opened": "カメラがオンになっています",
"camera-closed": "カメラがオフになっています",
"microphone-opened": "マイクがオンになっています",
"microphone-closed": "マイクがオフになっています",
"image-resolution": "解像度",
"default-image-resolution": "デフォルト解像度",
"invited-person": "メンバーを招待",
"video-to-audio": "音声通話に切り替えます",
me: "(自分)",
"be-rejected": "通話が拒否されました, ",
"be-no-response": "応答なし, ",
"be-line-busy": "相手が通話中です, ",
"be-canceled": "相手が通話をキャンセルしました",
"voice-call-end": "音声通話が終了しました",
"video-call-end": "ビデオ通話が終了しました",
"method-call-failed": "操作の同期に失敗しました",
"failed-to-obtain-permission": "権限の取得に失敗しました",
"environment-detection-failed": "環境の検出に失敗しました",
"switchToAudioCall-call-failed": "音声通話に切り替えることはできません",
"switchToVideoCall-call-failed": "ビデオ通話に切り替えることはできません",
"microphone-unavailable": "使用できるマイクがありません",
"camera-unavailable": "使用できるカメラがありません",
"ban-device": "デバイスへのアクセスが拒否されました",
"not-supported-webrtc": "現在の環境はWebRTCをサポートしていません",
"blacklist-user-tips": "ユーザーはブラックリストに登録され、通話が開始できませんでした",
"is-already-calling": "TUICallKit はすでに通話中です",
"need-init": "TUICallKitで通話を開始する前に、TUICallKitServer.init() メソッドが正常に実行されたことを確認してください。",
"can't call yourself": "自分に電話をかけることができません",
"accept-error": "接続できませんでした",
"accept-device-error": "接続できませんでした。発信側デバイスを認証できません",
"call-error": "通話が開始できませんでした"
}, EA = {
OTHER_SIDE: "other side",
CANCEL: "cancel",
OTHER_SIDE_REJECT_CALL: "other side reject call",
REJECT_CALL: "reject call",
OTHER_SIDE_LINE_BUSY: "other side line busy",
IN_BUSY: "in busy",
CALL_TIMEOUT: "call timeout",
END_CALL: "end call",
TIMEOUT: "timeout",
KICK_OUT: "kick out",
CALLER_CALLING_MSG: "caller calling message",
CALLER_GROUP_CALLING_MSG: "wait to be called",
CALLEE_CALLING_VIDEO_MSG: "callee calling video message",
CALLEE_CALLING_AUDIO_MSG: "callee calling audio message",
NO_MICROPHONE_DEVICE_PERMISSION: "no microphone access",
NO_CAMERA_DEVICE_PERMISSION: "no camera access",
EXIST_GROUP_CALL: "exist group call",
LOCAL_NETWORK_IS_POOR: "The network is poor during your current call",
REMOTE_NETWORK_IS_POOR: "The other user network is poor during the current call"
}, Rt = {
en: Po,
"zh-cn": Wo,
ja_JP: Go
};
function v(a) {
var t;
const A = g.getData(u.CALL, i.LANGUAGE);
for (const o in Rt)
if (o === A) {
const n = Rt[o];
for (const s in n)
if (s === a)
return n[s];
}
const e = (t = a.en) == null ? void 0 : t.key;
return console.error(`${i.PREFIX}translation is not found: ${a}.`), e;
}
const Je = typeof wx < "u" && typeof wx.getSystemInfoSync == "function" && !!wx.getSystemInfoSync().fontSizeSetting, oa = typeof uni < "u" && typeof uni > "u", Bt = Je || oa, la = typeof uni < "u", na = function() {
return (typeof uni < "u" || typeof window < "u") && !Bt;
}(), Qo = function() {
return Je ? wx : la ? uni : window;
}(), $A = na && window && window.navigator && window.navigator.userAgent || "", Zo = /Android/i.test($A), Fo = /(?:Windows Phone)/.test($A), Yo = /(?:SymbianOS)/.test($A), Xo = /iPad/i.test($A) || /iPhone/i.test($A) || /iPod/i.test($A), ia = Zo || Fo || Yo || Xo, Lt = na && !ia, qo = Lt && $A.includes("Windows NT"), Jo = Lt && $A.includes("Mac");
let sa = class he {
constructor() {
this.global = Qo, this.isPC = !1, this.isH5 = !1, this.isWeChat = !1, this.isApp = !1, this.isUniPlatform = !1, this.isOfficial = !1, this.isWIN = !1, this.isMAC = !1, this.initEnv();
}
/**
* 获取 TUIGlobal 实例
* @returns {TUIGlobal}
*/
static getInstance() {
return he.instance || (he.instance = new he()), he.instance;
}
initEnv() {
this.isPC = Lt, this.isH5 = ia, this.isWeChat = Je, this.isApp = oa && !Je, this.isUniPlatform = la, this.isWIN = qo, this.isMAC = Jo;
}
initOfficial(A) {
this.isOfficial = A === 1400187352 || A === 1400188366;
}
};
const et = function(a) {
return typeof a === i.UNDEFINED;
}, ca = function(a) {
if (typeof a !== i.OBJECT || a === null)
return !1;
const A = Object.getPrototypeOf(a);
if (A === null)
return !0;
let e = A;
for (; Object.getPrototypeOf(e) !== null; )
e = Object.getPrototypeOf(e);
return A === e;
}, ra = function(a) {
return typeof Array.isArray === i.FUNCTION ? Array.isArray(a) : Object.prototype.toString.call(a).match(/^\[object (.*)\]$/)[1].toLowerCase() === i.ARRAY;
}, pt = function(a) {
return typeof a === i.STRING;
}, Ho = function(a) {
return typeof a === i.BOOLEAN;
}, ua = function(a) {
return (
// eslint-disable-next-line
a !== null && (typeof a === i.NUMBER && !isNaN(a - 0) || typeof a === i.OBJECT && a.constructor === Number)
);
};
function Ma(a) {
const A = Math.floor(a / 3600), e = Math.floor(a % 3600 / 60), t = Math.floor(a % 60);
let o = A > 9 ? `${A}` : `0${A}`;
return o += e > 9 ? `:${e}` : `:0${e}`, o += t > 9 ? `:${t}` : `:0${t}`, o;
}
function Ko(a) {
if (typeof a === i.STRING)
try {
return !!JSON.parse(a);
} catch (A) {
return console.debug(A), !1;
}
return !1;
}
const Pe = function(a) {
return !a || !Ko(a) ? a : JSON.parse(a);
};
function Pt(a) {
return (a == null ? void 0 : a.message.indexOf("is ongoing, please avoid repeated calls")) !== -1;
}
function _o(a) {
const { message: A } = a;
return A.indexOf("NotAllowedError: Permission denied") !== -1;
}
function rt() {
return Date.now();
}
const Ye = function(a) {
return typeof a === i.FUNCTION;
}, $o = () => {
if (sa.getInstance().isWeChat)
return "zh-cn";
const a = ((navigator == null ? void 0 : navigator.language) || (navigator == null ? void 0 : navigator.userLanguage) || "").substr(0, 2);
let A = "en";
switch (a) {
case "zh":
A = "zh-cn";
break;
case "ja":
A = "ja_JP";
break;
default:
A = "en";
}
return A;
}, Al = function(a) {
return Object.prototype.toString.call(a).match(/^\[object (.*)\]$/)[1].toLowerCase();
};
function el(a, A, e) {
if (!a.hasOwnProperty(A))
return a;
const t = {};
return Object.keys(a).forEach((o) => {
o === A ? t[e] = a[o] : t[o] = a[o];
}), t;
}
const tl = "data:audio/mpeg;base64,SUQzAwAAAAAAGFRYWFgAAAAOAAAAVFhYWABpc29taXNvMv/zNGQAAqwAvnihCAADQAF4CUAQAFYAg3Lh8u+XUD5///wx//wQOAhKAgb/////xOoH4g8Hz4Pq8RoAbdTgMsMt9hcb990EP//zNGQQBPDjEgDItAAFWcIoAYoQAN9P/03QQ//umn//91SXL5uXP+pf8WYTvzgJPAQ+p/7f///1//6f///WH///F4BtJhNFkP/zNGQGA/jjNADHiAAEQDJcAYkQAGWrn6vw6ljfPtj/////////9Pv9sL/mL/QezSepgwrimv07//////y3u602OiyhOYb+LP/zNGQIBKTBKADoCACDoCZMAckAAKHKCUIAFsqGZXtSZ/////////Sn/Vy3nVUOJBqSX2UAkQxBddzv//////yq3lcgaTmTQ//zNGQHA9SrJgA8AliD4C5IAApYAKh3FKlMunKHm8H/2//77vkdqB2xfsXaHiDKBGtFKqONF3/////Z9VXClT5ND+syHkjBq//zNGQLBITJIAA8AmQEiDI4AAjSAGa1Vffm3ff/1/0//11tvZpAaIw3dBiIrjJgHQrGVWmdBU1f/////oDqEKrV1OpBUTjQtv/zNGQHAsjDKAAwAl4D0Co8AAmCBHIQNtld6fm0+/VigZzuMnGZlkAMLMJFv/////33UIWeFQkKsaceBsangecHzYXKI//////zNGQUA4QjKAA3CAID8CpEABMCBPfuStx4FQVHYMgKcO6jIJh//////9uIlspQkGQ2YyZscAV83Bv/////ncL6BEiWHyA2K//zNEQbAogfJgAx5hAEwDJcCAsEBtICgF3/////WJaIuuqMCCVGucgkrtwiwBO//////pW4YFRWQhaRRhZZnVwGhf////+ocv/zNEQmApgVJAANjwAFkC5YCApeAolD4kQb+EQJYNKwLWGmc6sqMBwJvf////6tDEOWDgFJk1VywKMGoM2f////+N1JmgJuPv/zNGQuA4AbJAAl5hIDwC48AAIGBEho7wTL5b6kSO7IUAA5uDABYNNjGDBSJEN//////xtQsszVy27IcWBbQkLgzv7YmZYW///zNGQ2AqzFNAgcA1+D8CZIAAhMAP/3/rozCAsBjIqCY/DBWMfQZp1f/////0F6phXSNisgAJjo6icT2vpvM/Vf9v///97eu//zNGRDA4gdJgBhghIDwCZAABGMAFVWERbCdaMYNCKs///2f//QMOBhFBEL+ykPDBIJgp1sjvOMAd/////1OEsNl3MST2Q0Yf/zNGRKA2DJKAAsBWYD8Co8AAmEBLDHj+M/IhcksnAgg6G+qLIYz5etEeeW8HZsorBzgkAa1AWMPfu/////LaYPuAABp7iKXP/zNGRSA3glKgQJ6QACOCZMAAmGAYUAPF9exl35wz/9DIK2KUmQ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LjXNAUUAfACgdZy78phH///11f/zNGQ3BOQxfywBJgcDwALuWAAEAmgxd7v9LaPcBg1L81hTvD0CHIluDY0XFot+LevrYw7WIAQBcKdMOj136pAOA48FlaCiKP/zNGQzA/wdi3wgJhED2DKmQABUAFsyYl7gxBmYOtXykChn+aEhu72l/8Ysza/SIQAB6KABLXByn9drV1/Q3Z+v+1to0Exr8//zNGQ2A5wvYMQLAiADwDKyWABOAOAYUtUAgZPn19TSzma6m/p90nQUCACboP6YFq/o98Z4CSkYi23WySBvXAHAVZ1SRY5U1//zNGQ9A8AbiywIJhEDgIq9wBAGacvvqgOV6a1LfZXW/iMWDACgS2qwzv9VuB2ttwgg0C3bhahyHlma
class al {
constructor() {
this._bellContext = null, this._isMuteBell = !1, this._calleeBellFilePath = Wt, this._callRole = IA.UNKNOWN, this._callStatus = P.IDLE, this._bellContext = new Audio(), this._bellContext.loop = !0;
}
setBellSrc() {
try {
let A = tl;
this._callRole === IA.CALLEE && (A = this._calleeBellFilePath || Wt), this._bellContext.src = A;
} catch (A) {
console.warn(`${i.PREFIX}Failed to setBellSrc, ${A}`);
}
}
setBellProperties(A) {
this._callRole = A.callRole || this._callRole, this._callStatus = A.callStatus || this._callStatus, this._calleeBellFilePath = A.calleeBellFilePath || this._calleeBellFilePath, this._isMuteBell = et(A.isMuteBell) ? this._isMuteBell : A.isMuteBell;
}
async play() {
try {
if (this._callStatus !== P.CALLING)
return;
this.setBellSrc(), this._callRole === IA.CALLEE && !this._isMuteBell && await this._bellContext.play(), this._callRole === IA.CALLER && await this._bellContext.play();
} catch (A) {
console.warn(`${i.PREFIX}Failed to play audio file, ${A}`);
}
}
async stop() {
try {
await this._bellContext.pause();
} catch (A) {
console.warn(`${i.PREFIX}Failed to stop audio file, ${A}`);
}
}
async setBellMute(A) {
this._callStatus !== P.CALLING && this._callRole !== IA.CALLEE || (A ? await this.stop() : await this.play());
}
destroy() {
try {
this._isMuteBell = !1, this._calleeBellFilePath = "", this._callRole = IA.UNKNOWN, this._callStatus = P.IDLE, this._bellContext.pause(), this._bellContext = null;
} catch (A) {
console.warn(`${i.PREFIX}Failed to destroy, ${A}`);
}
}
}
function TA() {
return function(a, A, e) {
const t = e.value, o = /* @__PURE__ */ new Set();
return e.value = async function(...n) {
var s, r;
if (o.has(this)) {
console.warn(`${i.PREFIX}previous ${A}() is ongoing, please avoid repeated calls`), (r = (s = this == null ? void 0 : this.getTUICallEngineInstance()) == null ? void 0 : s.reportLog) == null || r.call(s, {
name: "TUICallKit.avoidRepeatedCall.fail",
data: { name: A },
error: `previous ${A}() is ongoing`
});
return;
}
try {
o.add(this);
const c = await t.apply(this, n);
return o.delete(this), c;
} catch (c) {
throw o.delete(this), c;
}
}, e;
};
}
const Ce = i.PREFIX + "API";
function UA(a) {
return function(A, e, t) {
let o = t.value;
return t.value = function(...n) {
return ol.call(this, a, n, e), o.apply(this, n);
}, t;
};
}
function ol(a, A, e) {
try {
if (A[0].SDKAppID || (a = el(a, "SDKAppID", "sdkAppID")), ra(a))
for (let t = 0; t < a.length; t++)
Gt.call(this, {
...a[t],
value: A[t],
name: e
});
else
for (const t in a)
a.hasOwnProperty(t) && Gt.call(this, {
...a[t],
value: A[0][t],
name: e,
key: t
});
} catch (t) {
throw console.error(t), t;
}
}
function Gt({ required: a, rules: A, range: e, value: t, allowEmpty: o, name: n, key: s }) {
if (et(t)) {
if (a)
throw new Error(`${Ce}<${n}>: ${s} is required.`);
return;
}
const r = A.some((M) => M === Al(t));
let c = "";
if (!r) {
for (let M = 0; M < A.length; M++) {
let N = A[M];
N = N.replace(N[0], N[0].toUpperCase()), c += `${N}/`;
}
throw c = c.substring(0, c.length - 1), new Error(`${Ce}<${n}>: ${s} must be ${c}, current ${s} is ${typeof t}.`);
}
if (o === !1 && pt(t) && t.trim() === "")
throw new Error(`${Ce}<${n}>: ${s} is blank.`);
if (ra(e) && e && e.indexOf(t) === -1)
throw new Error(`${Ce}<${n}>: ${s} error, only be ${e}, current ${s} is ${t}.`);
if (pt(e) && e.indexOf("~") !== -1) {
const M = e.split("~");
if (t < +M[0] || t > +M[1] || ua(t) && Number.isNaN(t))
throw new Error(`${Ce}<${n}>: ${s} error, only be ${e}, current ${s} is ${t}.`);
}
}
const fA = {
init: {
SDKAppID: {
required: !0,
rules: [i.NUMBER],
allowEmpty: !1
},
userID: {
required: !0,
rules: [i.STRING],
allowEmpty: !1
},
userSig: {
required: !0,
rules: [i.STRING],
allowEmpty: !1
},
tim: {
required: !1,
rules: [i.OBJECT]
}
},
call: {
userID: {
required: !0,
rules: [i.STRING],
allowEmpty: !1
},
type: {
required: !0,
rules: [i.NUMBER],
range: [1, 2],
allowEmpty: !1
},
roomID: {
required: !1,
rules: [i.NUMBER],
// 仅支持数字房间号, 后续会支持字符串房间号
range: `0~${kt}`,
allowEmpty: !1
},
strRoomID: {
required: !1,
rules: [i.STRING],
allowEmpty: !0
},
userData: {
required: !1,
rules: [i.STRING],
allowEmpty: !1
},
timeout: {
required: !1,
rules: [i.NUMBER],
allowEmpty: !1
}
},
groupCall: {
userIDList: {
required: !0,
rules: [i.ARRAY],
allowEmpty: !1
},
type: {
required: !0,
rules: [i.NUMBER],
range: [1, 2],
allowEmpty: !1
},
groupID: {
required: !0,
rules: [i.STRING],
allowEmpty: !1
},
roomID: {
required: !1,
rules: [i.NUMBER],
// 仅支持数字房间号, 后续会支持字符串房间号
range: `0~${kt}`,
allowEmpty: !1
},
strRoomID: {
required: !1,
rules: [i.STRING],
allowEmpty: !0
},
timeout: {
required: !1,
rules: [i.NUMBER],
allowEmpty: !1
},
userData: {
required: !1,
rules: [i.STRING],
allowEmpty: !1
},
offlinePushInfo: {
required: !1,
rules: [i.OBJECT],
allowEmpty: !1
}
},
joinInGroupCall: {
type: {
required: !0,
rules: [i.NUMBER],
range: [1, 2],
allowEmpty: !1
},
groupID: {
required: !0,
rules: [i.STRING],
allowEmpty: !1
},
roomID: {
required: !0,
rules: [i.NUMBER],
allowEmpty: !1
},
strRoomID: {
required: !1,
rules: [i.STRING],
allowEmpty: !0
}
},
inviteUser: {
userIDList: {
required: !0,
rules: [i.ARRAY],
allowEmpty: !1
}
},
setSelfInfo: {
nickName: {
required: !1,
rules: [i.STRING],
allowEmpty: !1
},
avatar: {
required: !1,
rules: [i.STRING],
allowEmpty: !1
}
},
enableFloatWindow: [
{
key: "enable",
required: !1,
rules: [i.BOOLEAN],
allowEmpty: !1
}
],
enableAIVoice: [
{
key: "enable",
required: !0,
rules: [i.BOOLEAN],
allowEmpty: !1
}
],
enableMuteMode: [
{
key: "enable",
required: !0,
rules: [i.BOOLEAN],
allowEmpty: !1
}
],
setCallingBell: [
{
key: "filePath",
required: !1,
rules: [i.STRING],
allowEmpty: !0
}
],
setLanguage: [
{
key: "language",
required: !0,
rules: [i.STRING],
allowEmpty: !1
}
],
setVideoDisplayMode: [
{
key: "displayMode",
required: !0,
rules: [i.STRING],
range: [fe.CONTAIN, fe.COVER, fe.FILL],
allowEmpty: !1
}
],
setVideoResolution: [
{
key: "resolution",
required: !0,
rules: [i.STRING],
range: [ve.RESOLUTION_1080P, ve.RESOLUTION_480P, ve.RESOLUTION_720P],
allowEmpty: !1
}
]
};
function tt(a) {
return function(A, e, t) {
let o = t.value;
return t.value = function(...n) {
return ll.call(this, a, n, e), o.apply(this, n);
}, t;
};
}
function ll(a) {
if (a != null && a.engineInstance && !this._tuiCallEngine) {
const A = `${i.PREFIX} ${v("TUICallKit init is not complete")}`;
throw console.error(A), A;
}
}
class nl {
constructor() {
this.defaultStore = {
callStatus: P.IDLE,
callRole: IA.UNKNOWN,
callMediaType: _.UNKNOWN,
localUserInfo: { userId: "" },
localUserInfoExcludeVolume: { userId: "" },
remoteUserInfoList: [],
remoteUserInfoExcludeVolumeList: [],
callerUserInfo: { userId: "" },
isGroup: !1,
callDuration: "00:00:00",
// 通话时长
callTips: "",
// 通话提示的信息. 例如: '等待谁接听', 'xxx 拒绝通话', 'xxx 挂断通话'
toastInfo: { text: "" },
// 远端用户挂断、拒绝、超时、忙线等的 toast 提示信息
isMinimized: !1,
// 用来记录当前是否悬浮窗模式
enableFloatWindow: !1,
// 开启/关闭悬浮窗功能设置为false通话界面左上角的悬浮窗按钮会隐藏
bigScreenUserId: "",
// 当前大屏幕显示的 userID 用户
language: $o(),
// en, zh-cn
isClickable: !1,
// 是否可点击, 用于按钮增加 loading 效果,不可点击
deviceList: { cameraList: [], microphoneList: [], currentCamera: {}, currentMicrophone: {} },
showPermissionTip: !1,
netWorkQualityList: [],
// 显示网络状态差的提示
isMuteSpeaker: !1,
groupID: "",
roomID: 0,
roomIdType: 0,
cameraPosition: we.FRONT,
// 前置或后置值为front, back
groupCallMembers: [],
// chat 群会话在的通话中的成员
// TUICallKit 组件上的属性
displayMode: fe.COVER,
// 设置预览远端的画面显示模式
videoResolution: ve.RESOLUTION_480P,
showSelectUser: !1,
// 小程序相关属性
pusher: {},
player: [],
isEarPhone: !1,
// 是否是听筒, 默认: false
pusherId: i.INITIAL_PUSHER,
// 重新渲染 live-Pusher 的标识位
// 是否开启虚拟背景, 目前仅 web 支持
isShowEnableVirtualBackground: !1,
// 是否显示虚拟背景图标, 默认: false
enableVirtualBackground: !1,
// 是否开启虚拟背景, 默认: false
// customUIConfig
customUIConfig: {
button: {},
viewBackground: {},
layoutMode: Xe.RemoteInLargeView
}
}, this.store = qe(this.defaultStore), this.prevStore = qe(this.defaultStore);
}
update(A, e) {
switch (A) {
case i.CALL_TIPS:
const t = this.getData(A);
this.prevStore[A] = t;
default:
this.store[A] = e;
}
}
getPrevData(A) {
return A ? this.prevStore[A] : this.prevStore;
}
getData(A) {
return A ? this.store[A] : this.store;
}
// reset call store
reset(A = []) {
A.length === 0 && (A = Object.keys(this.store));
const e = A.reduce((t, o) => ({ ...t, [o]: this.defaultStore[o] }), {});
this.store = {
...this.defaultStore,
...this.store,
...e
};
}
}
let at = class Le {
constructor() {
this.timerId = -1, this.storeMap = {
[u.CALL]: new nl()
}, this.task = {};
}
/**
* 获取 TUIStore 实例
* @returns {TUIStore}
*/
static getInstance() {
return Le.instance || (Le.instance = new Le()), Le.instance;
}
/**
* UI 组件注册监听回调
* @param {StoreName} storeName store 名称
* @param {IOptions} options 监听信息
* @param {Object} params 扩展参数
* @param {String} params.notifyRangeWhenWatch 注册时监听时的通知范围, 'all' - 通知所有注册该 key 的监听; 'myself' - 通知本次注册该 key 的监听; 默认不通知
*/
watch(A, e, t) {
this.task[A] || (this.task[A] = {});
const o = this.task[A];
Object.keys(e).forEach((n) => {
const s = e[n];
o[n] || (o[n] = /* @__PURE__ */ new Map()), o[n].set(s, 1);
const { notifyRangeWhenWatch: r } = t || {};
if (r === i.ALL && this.notify(A, n), r === i.MYSELF) {
const c = this.getData(A, n);
s.call(this, c);
}
});
}
/**
* UI 取消组件监听回调
* @param {StoreName} storeName store 名称
* @param {IOptions} options 监听信息,包含需要取消的回掉等
*/
unwatch(A, e) {
if (!this.task[A])
return;
const t = this.task[A];
Object.keys(e).forEach((o) => {
t[o].delete(e[o]);
});
}
/**
* 通用 store 数据更新messageList 的变更需要单独处理
* @param {StoreName} storeName store 名称
* @param {string} key 变更的 key
* @param {unknown} data 变更的数据
*/
update(A, e, t) {
var o;
(pt(t) || ua(t) || Ho(t)) && this.storeMap[A].store[e] === t || ((o = this.storeMap[A]) == null || o.update(e, t), this.notify(A, e));
}
/**
* 获取 Store 的上一个状态值
* @param {StoreName} storeName store 名称
* @param {string} key 待获取的 key
* @returns {Any}
*/
getPrevData(A, e) {
var t;
return (t = this.storeMap[A]) == null ? void 0 : t.getPrevData(e);
}
/**
* 获取 Store 数据
* @param {StoreName} storeName store 名称
* @param {string} key 待获取的 key
* @returns {Any}
*/
getData(A, e) {
var t;
return (t = this.storeMap[A]) == null ? void 0 : t.getData(e);
}
/**
* UI 组件注册监听回调
* @param {StoreName} storeName store 名称
* @param {string} key 变更的 key
*/
notify(A, e) {
if (!this.task[A])
return;
const t = this.task[A];
if (t[e]) {
const o = t[e], n = this.getData(A, e);
for (const [s] of o.entries())
s.call(this, n);
}
}
reset(A, e = [], t = !1) {
if (A in this.storeMap) {
const o = this.storeMap[A];
e.length === 0 && (e = Object.keys(o == null ? void 0 : o.store)), o.reset(e), t && e.forEach((n) => {
this.notify(A, n);
});
}
}
// 批量修改多个 key-value
updateStore(A, e) {
const t = e || u.CALL;
Object.keys(A).forEach((o) => {
this.update(t, o, A[o]);
});
}
};
const AA = at.getInstance();
function Dt(a, A) {
const e = {
userId: a,
nick: "",
avatar: "",
remark: "",
displayUserInfo: "",
isAudioAvailable: !1,
isVideoAvailable: !1,
isEnter: !1,
domId: A || a
};
return A ? e : { ...e, isEnter: !1 };
}
async function il(a, A) {
var t, o, n, s, r;
let e = Dt(a, i.LOCAL_VIDEO);
try {
if (!A)
return e;
const c = await A.getMyProfile(), M = AA == null ? void 0 : AA.getData(u.CALL, i.LOCAL_USER_INFO);
return (c == null ? void 0 : c.code) === 0 && (e = {
...e,
...M,
userId: (t = c == null ? void 0 : c.data) == null ? void 0 : t.userID,
nick: (o = c == null ? void 0 : c.data) == null ? void 0 : o.nick,
avatar: (n = c == null ? void 0 : c.data) == null ? void 0 : n.avatar,
displayUserInfo: ((s = c == null ? void 0 : c.data) == null ? void 0 : s.nick) || ((r = c == null ? void 0 : c.data) == null ? void 0 : r.userID)
}), e;
} catch (c) {
return console.error(`${i.PREFIX}getMyProfile failed, error: ${c}.`), e;
}
}
async function Oe(a, A) {
let e = a.map((t) => Dt(t));
try {
if (!A)
return e;
const t = await A.getFriendProfile({ userIDList: a });
if (t.code === 0) {
const { friendList: o = [], failureUserIDList: n = [] } = t.data;
let s = n.map((N) => N.userID);
if (n.length > 0) {
const N = await A.getUserProfile({ userIDList: n.map((T) => T.userID) });
(N == null ? void 0 : N.code) === 0 && (s = (N == null ? void 0 : N.data) || []);
}
const r = AA == null ? void 0 : AA.getData(u.CALL, i.REMOTE_USER_INFO_LIST), c = o.map((N) => N.userID), M = s.map((N) => N.userID);
e = a.map((N) => {
var b, x, B, F, tA, J, MA;
const T = Dt(N), I = c.indexOf(N), D = M.indexOf(N);
let h = "", j = "", m = "", w = "";
I !== -1 && (h = ((b = o[I]) == null ? void 0 : b.remark) || "", j = ((B = (x = o[I]) == null ? void 0 : x.profile) == null ? void 0 : B.nick) || "", m = h || j || T.userId || "", w = ((tA = (F = o[I]) == null ? void 0 : F.profile) == null ? void 0 : tA.avatar) || ""), D !== -1 && (j = ((J = s[D]) == null ? void 0 : J.nick) || "", m = j || T.userId || "", w = ((MA = s[D]) == null ? void 0 : MA.avatar) || "");
const H = r.find((WA) => WA.userId === N) || {};
return { ...T, ...H, remark: h, nick: j, displayUserInfo: m, avatar: w };
});
}
return e;
} catch (t) {
return console.error(`${i.PREFIX}getRemoteUserProfile failed, error: ${t}.`), e;
}
}
function qA(a, A, e) {
const t = AA.getData(u.CALL, i.IS_GROUP);
let o = `${v(a)}`;
return t && (o = A ? `${A} ${o}` : o, o = e ? `${o} ${e}` : o), o;
}
function We() {
const a = AA.getData(u.CALL, i.CALL_STATUS);
if (a === P.IDLE)
return jA.IDLE;
const A = AA.getData(u.CALL, i.IS_GROUP);
if (a === P.CALLING)
return A ? jA.DIALING_GROUP : jA.DIALING_C2C;
const e = AA.getData(u.CALL, i.CALL_MEDIA_TYPE);
return A ? e === _.AUDIO ? jA.CALLING_GROUP_AUDIO : jA.CALLING_GROUP_VIDEO : e === _.AUDIO ? jA.CALLING_C2C_AUDIO : jA.CALLING_C2C_VIDEO;
}
async function sl(a, A, e, t) {
let o = [];
try {
const n = await A.getGroupMemberList({ groupID: a, count: e, offset: t });
if (n.code === 0)
return n.data.memberList || o;
} catch (n) {
return console.error(`${i.PREFIX}getGroupMember failed, error: ${n}.`), o;
}
}
async function cl(a, A) {
let e = {};
try {
return (await A.getGroupProfile({ groupID: a })).data.group || e;
} catch (t) {
return console.warn(`${i.PREFIX}getGroupProfile failed, error: ${t}.`), e;
}
}
function da(a, A) {
a === 0 && A ? (AA.update(u.CALL, i.ROOM_ID, A), AA.update(u.CALL, i.ROOM_ID_TYPE, Tt.STRING_ROOM_ID)) : (AA.update(u.CALL, i.ROOM_ID, a), AA.update(u.CALL, i.ROOM_ID_TYPE, Tt.NUMBER_ROOM_ID));
}
function bA(a) {
return a || {};
}
function ut(a) {
if (a.length === 0)
return;
let A = AA.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
a.forEach((e) => {
A = A.filter((t) => t.userId !== e);
}), AA.update(u.CALL, i.REMOTE_USER_INFO_LIST, A), AA.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, A);
}
function Mt(a) {
a == null || a.getDeviceList("speaker").then((e) => {
const t = AA.getData(u.CALL, i.DEVICE_LIST), o = (e == null ? void 0 : e[0]) || {};
AA.update(
u.CALL,
i.DEVICE_LIST,
{ ...t, speakerList: e, currentSpeaker: o }
);
}).catch((e) => {
console.error(`${i.PREFIX}updateSpeakerList failed, error: ${JSON.stringify(e)}.`);
}), AA.getData(u.CALL, i.CALL_MEDIA_TYPE) === _.VIDEO && (a == null || a.getDeviceList("camera").then((e) => {
const t = AA.getData(u.CALL, i.DEVICE_LIST), o = (e == null ? void 0 : e[0]) || {};
AA.update(
u.CALL,
i.DEVICE_LIST,
{ ...t, cameraList: e, currentCamera: o }
);
}).catch((e) => {
console.error(`${i.PREFIX}updateCameraList failed, error: ${e}.`);
})), a == null || a.getDeviceList("microphones").then((e) => {
const t = AA.getData(u.CALL, i.DEVICE_LIST), o = (e == null ? void 0 : e[0]) || {};
AA.update(
u.CALL,
i.DEVICE_LIST,
{ ...t, microphoneList: e, currentMicrophone: o }
);
}).catch((e) => {
console.error(`${i.PREFIX}updateMicrophoneList failed, error: ${e}.`);
});
}
function dt(a, A, e) {
if (_o(a)) {
let t = "";
A === _.AUDIO && (t = qA(EA.NO_MICROPHONE_DEVICE_PERMISSION)), A === _.VIDEO && (t = qA(EA.NO_CAMERA_DEVICE_PERMISSION));
const o = e == null ? void 0 : e.getDevicePermission();
o != null && o.audio || AA.update(u.CALL, i.SHOW_PERMISSION_TIP, !0), t && AA.update(u.CALL, i.TOAST_INFO, { text: t, type: i.ERROR }), console.error(`${i.PREFIX}call failed, error: ${a.message}.`);
}
}
function oe(a, A) {
let e = AA.getData(u.CALL, i.LOCAL_USER_INFO);
A === i.AUDIO && (e = { ...e, isAudioAvailable: a }), A === i.VIDEO && (e = { ...e, isVideoAvailable: a }), AA.update(u.CALL, i.LOCAL_USER_INFO, e), AA.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, e);
}
class He {
static generateTaskID() {
return this.currentTaskID++;
}
/**
*
* @param {string} taskName 'interval' 'timeout'
* @param {function} callback
* @param {object} options include:
* @param {number} options.delay millisecond
* @param {number} options.count 定时器回调执行次数0 无限次 or n次
* @param {boolean} options.backgroundTask 在页面静默后是否继续执行定时器
*/
static run(A = i.TIMEOUT, e, t) {
A === i.INTERVAL ? t = { delay: 2e3, count: 0, backgroundTask: !0, ...t } : t = { delay: 2e3, count: 0, backgroundTask: !0, ...t }, ca(e) && (t = { ...t, ...e }), Ye(A) && (e = A, A = i.TIMEOUT);
const o = {
taskID: this.generateTaskID(),
loopCount: 0,
intervalID: null,
timeoutID: null,
taskName: A,
callback: e,
...t
};
return this.taskMap.set(o.taskID, o), A === i.INTERNAL ? this.interval(o) : this.timeout(o), o.taskID;
}
/**
* 定时循环执行回调函数
* 可以指定循环的时间间隔
* 可以指定循环次数
* @param {object} taskItem
* @param {function} callback
* @param {*} delay
* @param {*} count
* @returns ID
*/
static interval(A) {
const e = () => {
A.callback(), A.loopCount += 1, this.isBreakLoop(A);
};
return A.intervalID = setInterval(e, A.delay);
}
/**
* 延迟执行回调
* count = 0,循环
* count = n, 执行n次
* @param {object} taskItem
*
*/
static timeout(A) {
const e = () => {
if (A.callback(), A.loopCount += 1, !this.isBreakLoop(A))
return A.timeoutID = setTimeout(e, A.delay);
};
return A.timeoutID = setTimeout(e, A.delay);
}
static hasTask(A) {
return this.taskMap.has(A);
}
static clearTask(A) {
if (!this.taskMap.has(A))
return !0;
const { intervalID: e, timeoutID: t, onVisibilitychange: o } = this.taskMap.get(A);
return e && clearInterval(e), t && clearTimeout(t), o && document.removeEventListener("visibilitychange", o), this.taskMap.delete(A), !0;
}
/**
* 1. 如果已移除出定时队列退出当前任务
* 2. 如果当前任务已满足次数限制则退出当前任务
* @param {object} taskItem
* @returns
*/
static isBreakLoop(A) {
return this.taskMap.has(A.taskID) ? A.count !== 0 && A.loopCount >= A.count ? (this.clearTask(A.taskID), !0) : !1 : !0;
}
}
He.taskMap = /* @__PURE__ */ new Map();
He.currentTaskID = 1;
const rl = function(a) {
if (a === null || typeof a > "u")
return !0;
if (typeof a == "boolean")
return !1;
if (typeof a == "number")
return a === 0;
if (typeof a == "string" || typeof a == "function" || Array.isArray(a))
return a.length === 0;
if (a instanceof Error)
return a.message === "";
if (ca(a)) {
for (const A in a)
if (Object.prototype.hasOwnProperty.call(a, A))
return !1;
return !0;
}
return !1;
}, It = "_local_user_id";
class ie {
constructor() {
this._viewConfig = {
viewBackground: {
local: {},
remote: {}
}
}, this._isSetViewBackgroundConfig = { remote: !1, local: !1 }, this._tuiCallEngine = null, this._tuiStore = null;
}
static getInstance() {
return ie.instance || (ie.instance = new ie()), ie.instance;
}
_updateViewBackground() {
var t, o, n;
const A = (t = this._tuiStore) == null ? void 0 : t.getData(u.CALL, i.CUSTOM_UI_CONFIG), { userId: e } = (o = this._tuiStore) == null ? void 0 : o.getData(u.CALL, i.LOCAL_USER_INFO);
Object.keys(this._viewConfig.viewBackground.remote).includes(e) && delete this._viewConfig.viewBackground.remote[e], (n = this._tuiStore) == null || n.update(
u.CALL,
i.CUSTOM_UI_CONFIG,
{
...A,
viewBackground: {
...this._viewConfig.viewBackground.remote,
...this._viewConfig.viewBackground.local
}
}
);
}
setEngineInstance(A) {
this._tuiCallEngine = A;
}
setTUIStore(A) {
this._tuiStore = A;
}
updateViewBackgroundUserId(A) {
var e, t;
if (A === "local") {
const { userId: o } = (e = this._tuiStore) == null ? void 0 : e.getData(u.CALL, i.LOCAL_USER_INFO);
if (Object.keys(this._viewConfig.viewBackground.remote).includes(o) && (delete this._viewConfig.viewBackground.remote[o], this._updateViewBackground()), !this._isSetViewBackgroundConfig.local)
return;
const n = this._viewConfig.viewBackground.local, s = n[o] || n[It];
n[o] = n[It], this._viewConfig.viewBackground.local = { [o]: s }, this._updateViewBackground();
} else {
let o = this._viewConfig.viewBackground.remote;
this._isSetViewBackgroundConfig.remote && Object.keys(o).includes("*") && (((t = this._tuiStore) == null ? void 0 : t.getData(u.CALL, i.REMOTE_USER_INFO_LIST)).map((r) => r.userId).forEach((r) => {
Object.keys(o).includes(r) || (o[r] = o["*"]);
}), this._viewConfig.viewBackground.remote = o, this._updateViewBackground());
}
}
hideFeatureButton(A) {
var t, o, n, s, r;
(o = (t = this._tuiCallEngine) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.hideFeatureButton.start",
data: { buttonName: A }
});
const e = (n = this._tuiStore) == null ? void 0 : n.getData(u.CALL, i.CUSTOM_UI_CONFIG);
(r = this._tuiStore) == null || r.update(
u.CALL,
i.CUSTOM_UI_CONFIG,
{
...e,
button: {
...e.button,
[A]: { ...((s = e.button) == null ? void 0 : s[A]) || {}, show: !1 }
}
}
);
}
setLocalViewBackgroundImage(A) {
var t, o, n;
(o = (t = this._tuiCallEngine) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.setLocalViewBackgroundImage.start",
data: { url: A }
}), this._isSetViewBackgroundConfig.local = !0;
let { userId: e } = (n = this._tuiStore) == null ? void 0 : n.getData(u.CALL, i.LOCAL_USER_INFO);
rl(e) && (e = It), this._viewConfig.viewBackground.local = { [e]: A }, this._updateViewBackground();
}
setRemoteViewBackgroundImage(A, e) {
var t, o;
(o = (t = this._tuiCallEngine) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.setRemoteViewBackgroundImage.start",
data: { userId: A, url: e }
}), this._isSetViewBackgroundConfig.remote = !0, A === "*" && (this._viewConfig.viewBackground.remote = {}), this._viewConfig.viewBackground.remote[A] = e, this._updateViewBackground();
}
setLayoutMode(A) {
var t, o;
(o = (t = this._tuiCallEngine) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.setLayoutMode.start",
data: { layoutMode: A }
});
const e = this._tuiStore.getData(u.CALL, i.CUSTOM_UI_CONFIG);
this._tuiStore.update(
u.CALL,
i.CUSTOM_UI_CONFIG,
{
...e,
layoutMode: A
}
);
}
setCameraDefaultState(A) {
var t, o;
(o = (t = this._tuiCallEngine) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.setCameraDefaultState.start",
data: { isOpen: A }
});
const e = qe(this._tuiStore.getData(u.CALL, i.CUSTOM_UI_CONFIG));
Object.keys(e.button).includes(_A.Camera) || (e.button[_A.Camera] = {}), e.button[_A.Camera].state = A ? Te.Open : Te.Close, this._tuiStore.update(u.CALL, i.CUSTOM_UI_CONFIG, e);
}
}
const Ge = at.getInstance(), xA = {
audioCall: () => v("Voice call"),
videoCall: () => v("Video call"),
switchToAudio: () => v("Switch audio call"),
switchToVideo: () => v("Switch video call"),
hangup: ({ callDuration: a }) => `${v("Call duration")}${a}`
};
class ge {
constructor(A) {
var e, t, o;
this._callService = A.callService, ye.registerEvent(dA.TUILogin.EVENT.LOGIN_STATE_CHANGED, dA.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS, this), (e = dA.TUIChat) != null && e.EVENT && ye.registerEvent((t = dA.TUIChat.EVENT) == null ? void 0 : t.CHAT_STATE_CHANGED, (o = dA.TUIChat.EVENT_SUB_KEY) == null ? void 0 : o.CHAT_OPENED, this), ye.registerService(dA.TUICalling.SERVICE.NAME, this), ye.registerExtension(dA.TUIChat.EXTENSION.INPUT_MORE.EXT_ID, this);
}
static getInstance(A) {
return ge.instance || (ge.instance = new ge(A)), ge.instance;
}
// ================ 【】 ================
/**
* message on screen
* @param {Any} params Parameters for message up-screening
*/
callTUIService(A) {
const { message: e } = A || {};
ye.callService({
serviceName: dA.TUIChat.SERVICE.NAME,
method: dA.TUIChat.SERVICE.METHOD.UPDATE_MESSAGE_LIST,
params: { message: e }
});
}
/**
* tuicore getExtension
* @param {String} extensionID extension id
* @param {Any} params tuicore pass parameters
* @returns {Any[]} return extension
*/
onGetExtension(A, e) {
var t, o;
if (A === dA.TUIChat.EXTENSION.INPUT_MORE.EXT_ID) {
if ((o = (t = this._callService.getTUICallEngineInstance()) == null ? void 0 : t.reportLog) == null || o.call(t, { name: "TUICallKit.onGetExtension", data: { extensionID: A, params: e } }), et(e))
return [];
if ([dA.TUIChat.TYPE.ROOM, dA.TUIChat.TYPE.CUSTOMER_SERVICE].includes(e.chatType))
return [];
let n = [];
const s = {
weight: 1e3,
text: "语音通话",
icon: bo,
data: {
name: "voiceCall"
},
listener: {
onClicked: async (c) => await this._handleTUICoreOnClick(c, c.type || _.AUDIO)
}
}, r = {
weight: 900,
text: "视频通话",
icon: xo,
data: {
name: "videoCall"
},
listener: {
onClicked: async (c) => await this._handleTUICoreOnClick(c, c.type || _.VIDEO)
}
};
return e != null && e.chatType ? n = [s, r] : (!(e != null && e.filterVoice) && n.push(s), !(e != null && e.filterVideo) && n.push(r)), n;
}
}
async onCall(A, e) {
A === dA.TUICalling.SERVICE.METHOD.START_CALL && await this._handleTUICoreOnClick(e, e.type);
}
/**
* tuicore notify event manager
* @param {String} eventName event name
* @param {String} subKey sub key
* @param {Any} options tuicore event parameters
*/
async onNotifyEvent(A, e, t) {
var o, n, s, r, c, M, N, T;
try {
if (A === dA.TUILogin.EVENT.LOGIN_STATE_CHANGED)
if (e === dA.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS) {
const { chat: I, userID: D, userSig: h, SDKAppID: j } = Lo.getContext();
await ((o = this._callService) == null ? void 0 : o.init({ tim: I, userID: D, userSig: h, sdkAppID: j, isFromChat: !0, component: ht.TIM_CALL_KIT })), (n = this._callService) == null || n.setIsFromChat(!0), (s = this._callService) == null || s.setLogLevel(aa.NORMAL), this._addListenChatEvent();
} else
e === dA.TUILogin.EVENT_SUB_KEY.USER_LOGOUT_SUCCESS && (this._removeListenChatEvent(), await ((r = this._callService) == null ? void 0 : r.destroyed()));
if ((c = dA.TUIChat) != null && c.EVENT && A === dA.TUIChat.EVENT.CHAT_STATE_CHANGED && e === dA.TUIChat.EVENT_SUB_KEY.CHAT_OPENED) {
if ((M = this._callService) == null || M.setCurrentGroupId((t == null ? void 0 : t.groupID) || ""), Ge.getData(u.CALL, i.CALL_STATUS) !== P.IDLE)
return;
const I = (N = this._callService) == null ? void 0 : N.getCurrentGroupId(), D = I ? await this.getGroupAttributes((T = this._callService) == null ? void 0 : T.getTim(), I) : {};
await this.updateStoreBasedOnGroupAttributes(D);
}
} catch (I) {
console.error(`${i.PREFIX}TUICore onNotifyEvent failed, error: ${I}.`);
}
}
// Handling the chat+call scenario, data required for the joinInGroupCall API: update store / clear relevant store data
async updateStoreBasedOnGroupAttributes(A) {
var e, t, o, n;
(o = (t = (e = this._callService) == null ? void 0 : e.getTUICallEngineInstance()) == null ? void 0 : t.reportLog) == null || o.call(t, {
name: "TUICallKit.getJoinGroupCallInfo.success",
data: { groupAttributes: A }
});
try {
const {
group_id: s = "",
room_id: r = 0,
room_id_type: c = 0,
call_media_type: M = i.UNKNOWN,
// @ts-ignore
user_list: N
// The default value of the user list returned by the background is null
} = A[i.INNER_ATTR_KIT_INFO] ? JSON.parse(A[i.INNER_ATTR_KIT_INFO]) : {};
let T = (N || []).map((D) => D.userid);
T = T.length && await Oe(T, (n = this._callService) == null ? void 0 : n.getTim());
const I = {
[i.GROUP_ID]: s,
[i.GROUP_CALL_MEMBERS]: T,
[i.ROOM_ID]: r,
[i.CALL_MEDIA_TYPE]: vo[M],
[i.ROOM_ID_TYPE]: c
};
Ge.updateStore(I, u.CALL);
} catch (s) {
console.warn(`${i.PREFIX}updateStoreBasedOnGroupAttributes fail, error: ${s}`);
}
}
// Get group attribute
async getGroupAttributes(A, e) {
if (!e)
return {};
try {
const { data: t } = await A.getGroupAttributes({
groupID: e,
keyList: []
});
return (t == null ? void 0 : t.groupAttributes) || {};
} catch (t) {
return console.warn(`${i.PREFIX}getGroupAttributes fail: ${t}`), {};
}
}
isLineBusy(A) {
var o;
const e = Pe(A.payload.data), t = Pe(e == null ? void 0 : e.data);
return (t == null ? void 0 : t.line_busy) === "line_busy" || (t == null ? void 0 : t.line_busy) === "" || ((o = t == null ? void 0 : t.data) == null ? void 0 : o.message) === "lineBusy";
}
async getCallKitMessage(A, e) {
var I, D, h, j;
const t = Pe(A.payload.data);
if ((t == null ? void 0 : t.businessID) !== 1)
return {};
let o = "";
const n = Pe(t == null ? void 0 : t.data), s = n.call_type, r = t.inviteeList, c = (I = n == null ? void 0 : n.data) == null ? void 0 : I.inviter, M = Ge.getData(u.CALL, i.LOCAL_USER_INFO).userId, N = c === M, T = (D = n == null ? void 0 : n.data) == null ? void 0 : D.cmd;
switch (t == null ? void 0 : t.actionType) {
case Ie.INVITE: {
o = xA[T]({ callDuration: Ma(n == null ? void 0 : n.call_end) });
break;
}
case Ie.CANCEL_INVITE:
o = v(N ? "Call Cancel" : "Other Side Cancel");
break;
case Ie.ACCEPT_INVITE:
["switchToAudio", "switchToVideo"].includes(T) ? o = (h = xA == null ? void 0 : xA[T]) == null ? void 0 : h.call(xA) : o = v("Answered");
break;
case Ie.REJECT_INVITE:
this.isLineBusy(A) ? o = v(N ? "Line Busy" : "Other Side Line Busy") : o = v(N ? "Other Side Decline" : "Decline");
break;
case Ie.INVITE_TIMEOUT:
["switchToAudio", "switchToVideo"].includes(T) ? o = (j = xA == null ? void 0 : xA[T]) == null ? void 0 : j.call(xA) : o = v(N ? "Other Side No Answer" : "No answer");
break;
}
return { messageCardContent: o, callMediaType: s, inviteeList: r };
}
// =========================【chat: event listening】=========================
_addListenChatEvent() {
var A, e;
if (!((A = this._callService) != null && A.getTim())) {
console.warn(`${i.PREFIX}add tim event listener failed, tim is empty.`);
return;
}
(e = this._callService) == null || e.getTim().on(Vt.EVENT.GROUP_ATTRIBUTES_UPDATED, this._handleGroupAttributesUpdated, this);
}
_removeListenChatEvent() {
var A, e;
if (!((A = this._callService) != null && A.getTim())) {
console.warn(`${i.PREFIX}remove tim event listener failed, tim is empty.`);
return;
}
(e = this._callService) == null || e.getTim().off(Vt.EVENT.GROUP_ATTRIBUTES_UPDATED, this._handleGroupAttributesUpdated, this);
}
/**
* chat start audio/video call via click
* @param {Any} options Parameters passed in when clicking on an audio/video call from chat
* @param {CallMediaType} type call media type. 0 - audio; 1 - video.
*/
async _handleTUICoreOnClick(A, e) {
var t, o;
try {
const { groupID: n, userIDList: s = [], ...r } = A;
n ? await ((t = this._callService) == null ? void 0 : t.groupCall({ groupID: n, userIDList: s, type: e, ...r })) : s.length === 1 && await ((o = this._callService) == null ? void 0 : o.call({ userID: s[0], type: e, ...r }));
} catch (n) {
console.debug(n);
}
}
async _handleGroupAttributesUpdated(A) {
var n;
if (Ge.getData(u.CALL, i.CALL_STATUS) !== P.IDLE)
return;
const e = (A == null ? void 0 : A.data) || {}, { groupID: t = "", groupAttributes: o = {} } = e;
t === ((n = this._callService) == null ? void 0 : n.getCurrentGroupId()) && await this.updateStoreBasedOnGroupAttributes(o);
}
}
const ul = 0, Ml = 1, Qt = 2;
function dl({ retryFunction: a, settings: A, onError: e, onRetrying: t, onRetryFailed: o, context: n }) {
return function(...s) {
const r = A.retries || 5;
let c = 0, M = -1, N = ul;
const T = async (I, D) => {
const h = n || this;
try {
const j = await a.apply(h, s);
c = 0, I(j);
} catch (j) {
const m = () => {
clearTimeout(M), c = 0, N = Qt, D(j);
}, w = () => {
N !== Qt && c < r ? (c++, N = Ml, Ye(t) && t.call(h, c, m), M = setTimeout(
() => {
M = -1, T(I, D);
},
et(A.timeout) ? 1e3 : A.timeout
)) : (m(), Ye(o) && o.call(h, j));
};
Ye(e) ? e.call(h, j, w, D, s) : w();
}
};
return new Promise(T);
};
}
function Il(a) {
return function(A, e, t) {
const { retries: o = 5, timeout: n = 2e3, onError: s, onRetrying: r, onRetryFailed: c } = a, M = dl({
retryFunction: t.value,
settings: { retries: o, timeout: n },
onError: s,
onRetrying: r,
onRetryFailed: c,
context: null
});
return t.value = function(...N) {
return M.apply(this, N);
}, t;
};
}
var Nl = Object.defineProperty, gl = Object.getOwnPropertyDescriptor, Tl = (a, A, e, t) => {
for (var o = t > 1 ? void 0 : t ? gl(A, e) : A, n = a.length - 1, s; n >= 0; n--)
(s = a[n]) && (o = (t ? s(A, e, o) : s(o)) || o);
return t && o && Nl(A, e, o), o;
};
const X = at.getInstance(), pl = ie.getInstance(), Ia = class Ee {
constructor(A) {
this._callService = A.callService;
}
static getInstance(A) {
return Ee.instance || (Ee.instance = new Ee(A)), Ee.instance;
}
addListenTuiCallEngineEvent() {
var e;
const A = (e = this._callService) == null ? void 0 : e.getTUICallEngineInstance();
if (!A) {
console.warn(`${i.PREFIX}add engine event listener failed, engine is empty.`);
return;
}
A.on(R.ERROR, this._handleError, this), A.on(R.INVITED, this._handleNewInvitationReceived, this), A.on(R.USER_ACCEPT, this._handleUserAccept, this), A.on(R.USER_ENTER, this._handleUserEnter, this), A.on(R.USER_LEAVE, this._handleUserLeave, this), A.on(R.REJECT, this._handleInviteeReject, this), A.on(R.NO_RESP, this._handleNoResponse, this), A.on(R.LINE_BUSY, this._handleLineBusy, this), A.on(R.CALLING_CANCEL, this._handleCallingCancel, this), A.on(R.SDK_READY, this._handleSDKReady, this), A.on(R.KICKED_OUT, this._handleKickedOut, this), A.on(R.MESSAGE_SENT_BY_ME, this._messageSentByMe, this), R.CALL_MESSAGE && A.on(R.CALL_MESSAGE, this._handleCallMessage, this), R.ON_USER_NETWORK_QUALITY_CHANGED && A.on(R.ON_USER_NETWORK_QUALITY_CHANGED, this._handleNetworkQuality, this), A.on(R.CALLING_END, this._handleCallingEnd, this), A.on(R.CALL_TYPE_CHANGED, this._handleCallTypeChange, this), A.on(R.USER_VIDEO_AVAILABLE, this._handleUserVideoAvailable, this), A.on(R.USER_AUDIO_AVAILABLE, this._handleUserAudioAvailable, this), A.on(R.USER_VOICE_VOLUME, this._handleUserVoiceVolume, this), A.on(R.DEVICED_UPDATED, this._handleDeviceUpdate, this);
}
removeListenTuiCallEngineEvent() {
var e;
const A = (e = this._callService) == null ? void 0 : e.getTUICallEngineInstance();
A.off(R.ERROR, this._handleError, this), A.off(R.INVITED, this._handleNewInvitationReceived, this), A.off(R.USER_ACCEPT, this._handleUserAccept, this), A.off(R.USER_ENTER, this._handleUserEnter, this), A.off(R.USER_LEAVE, this._handleUserLeave, this), A.off(R.REJECT, this._handleInviteeReject, this), A.off(R.NO_RESP, this._handleNoResponse, this), A.off(R.LINE_BUSY, this._handleLineBusy, this), A.off(R.CALLING_CANCEL, this._handleCallingCancel, this), A.off(R.SDK_READY, this._handleSDKReady, this), A.off(R.KICKED_OUT, this._handleKickedOut, this), A.off(R.MESSAGE_SENT_BY_ME, this._messageSentByMe, this), R.ON_USER_NETWORK_QUALITY_CHANGED && A.off(R.ON_USER_NETWORK_QUALITY_CHANGED, this._handleNetworkQuality, this), A.off(R.CALLING_END, this._handleCallingEnd, this), A.off(R.CALL_TYPE_CHANGED, this._handleCallTypeChange, this), A.off(R.USER_VIDEO_AVAILABLE, this._handleUserVideoAvailable, this), A.off(R.USER_AUDIO_AVAILABLE, this._handleUserAudioAvailable, this), A.off(R.USER_VOICE_VOLUME, this._handleUserVoiceVolume, this), A.off(R.DEVICED_UPDATED, this._handleDeviceUpdate, this);
}
_callerChangeToConnected() {
var t;
const A = X.getData(u.CALL, i.CALL_ROLE);
X.getData(u.CALL, i.CALL_STATUS) === P.CALLING && A === IA.CALLER && (X.update(u.CALL, i.CALL_STATUS, P.CONNECTED), (t = this._callService) == null || t.startTimer());
}
_unNormalEventsManager(A, e) {
var n;
console.log(`${i.PREFIX}${e} event data: ${JSON.stringify(A)}.`);
const t = X.getData(u.CALL, i.IS_GROUP), o = X.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
switch (e) {
case R.REJECT:
case R.LINE_BUSY: {
const { userID: s } = bA(A);
let r = e === R.REJECT ? EA.OTHER_SIDE_REJECT_CALL : EA.OTHER_SIDE_LINE_BUSY, c = qA(r);
if (t) {
const M = (o.find((N) => N.userId === s) || {}).displayUserInfo || s;
r = e === R.REJECT ? EA.REJECT_CALL : EA.IN_BUSY, c = qA(r, M);
}
X.update(u.CALL, i.TOAST_INFO, { text: c }), s && ut([s]);
break;
}
case R.NO_RESP: {
const { userIDList: s = [] } = bA(A), r = t ? EA.TIMEOUT : EA.CALL_TIMEOUT, c = s.map((N) => (o.find((I) => I.userId === N) || {}).displayUserInfo || N), M = t ? qA(r, c.join()) : qA(r);
X.update(u.CALL, i.TOAST_INFO, { text: M }), s.length > 0 && ut(s);
break;
}
case R.CALLING_CANCEL: {
(n = this._callService) == null || n._resetCallStore();
break;
}
}
}
_handleError(A) {
var s;
const { code: e, message: t } = A || {}, o = Object.values(xt).indexOf(e);
let n = "";
if (o !== -1) {
const r = Object.keys(xt)[o];
n = v(wo[r]), n && X.update(u.CALL, i.TOAST_INFO, { text: n, type: i.ERROR });
}
(s = this._callService) == null || s.executeExternalAfterCalling(), console.error(`${i.PREFIX}_handleError, errorCode: ${e}; errorMessage: ${n || t}.`);
}
async _handleNewInvitationReceived(A) {
var w, H, b, x;
console.log(`${i.PREFIX}onCallReceived event data: ${JSON.stringify(A)}.`);
const { sponsor: e = "", isFromGroup: t, callMediaType: o, inviteData: n = {}, calleeIdList: s = [], groupID: r = "", roomID: c, strRoomID: M } = bA(A), N = X.getData(u.CALL, i.LOCAL_USER_INFO), T = [e, ...s.filter((B) => B !== N.userId)], I = o || n.callType, D = I === _.AUDIO ? EA.CALLEE_CALLING_AUDIO_MSG : EA.CALLEE_CALLING_VIDEO_MSG;
let h = {
[i.CALL_ROLE]: IA.CALLEE,
[i.IS_GROUP]: t,
[i.CALL_STATUS]: P.CALLING,
[i.CALL_MEDIA_TYPE]: I,
[i.CALL_TIPS]: v(D),
[i.CALLER_USER_INFO]: { userId: e },
[i.GROUP_ID]: r
};
da(c, M), X.updateStore(h, u.CALL), (w = this._callService) == null || w.executeExternalBeforeCalling(), (H = this._callService) != null && H.statusChanged && ((b = this._callService) == null || b.statusChanged({ oldStatus: jA.IDLE, newStatus: jA.BE_INVITED }));
const j = await Oe(T, (x = this._callService) == null ? void 0 : x.getTim()), [m] = j.filter((B) => B.userId === e);
j.length > 0 && X.updateStore({
[i.REMOTE_USER_INFO_LIST]: j,
[i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST]: j,
[i.CALLER_USER_INFO]: {
userId: e,
nick: (m == null ? void 0 : m.nick) || "",
avatar: (m == null ? void 0 : m.avatar) || "",
displayUserInfo: (m == null ? void 0 : m.remark) || (m == null ? void 0 : m.nick) || e
}
}, u.CALL);
}
_handleUserAccept(A) {
this._callerChangeToConnected(), X.update(u.CALL, i.TOAST_INFO, v("answered")), console.log(`${i.PREFIX}accept event data: ${JSON.stringify(A)}.`);
}
async _handleUserEnter(A) {
var s;
this._callerChangeToConnected();
const { userID: e, data: t } = bA(A);
let o = X.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
if (!o.find((r) => (r == null ? void 0 : r.userId) === e)) {
o.push({ userId: e }), o.length > 0 && (X.update(u.CALL, i.REMOTE_USER_INFO_LIST, o), X.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, o));
const [r] = await Oe([e], (s = this._callService) == null ? void 0 : s.getTim());
o = X.getData(u.CALL, i.REMOTE_USER_INFO_LIST), o.forEach((c) => {
(c == null ? void 0 : c.userId) === e && (c = Object.assign(c, r));
});
}
o = o.map((r) => (r.userId === e && (r.isEnter = !0), r)), o.length > 0 && (X.update(u.CALL, i.REMOTE_USER_INFO_LIST, o), X.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, o), pl.updateViewBackgroundUserId("remote")), console.log(`${i.PREFIX}userEnter event data: ${JSON.stringify(A)}.`);
}
_handleUserLeave(A) {
console.log(`${i.PREFIX}userLeave event data: ${JSON.stringify(A)}.`);
const { data: e, userID: t } = bA(A);
if (X.getData(u.CALL, i.IS_GROUP)) {
const n = (X.getData(u.CALL, i.REMOTE_USER_INFO_LIST).find((r) => r.userId === t) || {}).displayUserInfo || t, s = qA(EA.END_CALL, n);
X.update(u.CALL, i.TOAST_INFO, { text: s });
}
t && ut([t]);
}
_handleInviteeReject(A) {
this._unNormalEventsManager(A, R.REJECT);
}
_handleNoResponse(A) {
this._unNormalEventsManager(A, R.NO_RESP);
}
_handleLineBusy(A) {
this._unNormalEventsManager(A, R.LINE_BUSY);
}
_handleCallingCancel(A) {
var e;
(e = this._callService) == null || e.executeExternalAfterCalling(), this._unNormalEventsManager(A, R.CALLING_CANCEL);
}
_handleCallingEnd(A) {
var e, t;
console.log(`${i.PREFIX}callEnd event data: ${JSON.stringify(A)}.`), (e = this._callService) == null || e.executeExternalAfterCalling(), (t = this._callService) == null || t._resetCallStore();
}
// SDK_READY 后才能调用 tim 接口, 否则登录后立刻获取导致调用接口失败. v2.27.4+、v3 接口 login 后会抛出 SDK_READY
async _handleSDKReady(A) {
var t, o, n;
let e = X.getData(u.CALL, i.LOCAL_USER_INFO);
e = await il(e.userId, (t = this._callService) == null ? void 0 : t.getTim()), (n = this._callService) == null || n.setDefaultOfflinePushInfo({ ...(o = this._callService) == null ? void 0 : o.getDefaultOfflinePushInfo(), title: e == null ? void 0 : e.displayUserInfo }), X.update(u.CALL, i.LOCAL_USER_INFO, e), X.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, e);
}
_handleKickedOut(A) {
var e, t, o;
console.log(`${i.PREFIX}kickOut event data: ${JSON.stringify(A)}.`), (e = this._callService) != null && e.kickedOut && ((t = this._callService) == null || t.kickedOut(A)), X.update(u.CALL, i.CALL_TIPS, qA(EA.KICK_OUT)), (o = this._callService) == null || o._resetCallStore();
}
_messageSentByMe(A) {
var t, o;
const e = A == null ? void 0 : A.data;
(t = this._callService) != null && t.onMessageSentByMe && ((o = this._callService) == null || o.onMessageSentByMe(e));
}
_handleCallMessage(A) {
const e = bA(A);
this._callService._chatCombine.callTUIService({ message: e });
}
_handleCallTypeChange(A) {
const { newCallType: e, type: t } = bA(A);
X.update(u.CALL, i.CALL_MEDIA_TYPE, e || t);
}
_handleNetworkQuality(A) {
const { networkQualityList: e = [] } = bA(A);
X.update(u.CALL, i.NETWORK_STATUS, e);
const t = X.getData(u.CALL, i.IS_GROUP), o = X.getData(u.CALL, i.LOCAL_USER_INFO);
if (X.getData(u.CALL, i.REMOTE_USER_INFO_LIST), !t && e.find((s) => (o == null ? void 0 : o.userId) === (s == null ? void 0 : s.userId) && (s == null ? void 0 : s.quality) >= Ro)) {
X.update(u.CALL, i.CALL_TIPS, v(EA.LOCAL_NETWORK_IS_POOR));
return;
}
}
async _startRemoteView(A) {
var e;
if (!A) {
console.warn(`${i.PREFIX}_startRemoteView userID is empty`);
return;
}
if (!document.getElementById(A))
return console.warn(`${i.PREFIX}_startRemoteView can't find HTMLElement sid: ${A}`), Promise.reject();
try {
const t = X.getData(u.CALL, i.DISPLAY_MODE);
await ((e = this._callService) == null ? void 0 : e.getTUICallEngineInstance().startRemoteView({ userID: A, videoViewDomID: A, options: { objectFit: t } }));
} catch (t) {
return console.error(`${i.PREFIX}_startRemoteView error: ${t}.`), Promise.reject(t);
}
}
_setRemoteUserInfoAudioVideoAvailable(A, e, t) {
let o = X.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
o = o.map((n) => {
if (n.userId === t) {
if (e === i.AUDIO)
return { ...n, isAudioAvailable: A };
if (e === i.VIDEO)
return { ...n, isVideoAvailable: A };
}
return n;
}), o.length > 0 && (X.update(u.CALL, i.REMOTE_USER_INFO_LIST, o), X.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, o));
}
async _handleUserVideoAvailable(A) {
const { userID: e, isVideoAvailable: t } = bA(A);
console.log(`${i.PREFIX}_handleUserVideoAvailable event data: ${JSON.stringify(A)}.`);
try {
t && await this._startRemoteView(e);
} catch (o) {
console.error(`${i.PREFIX}_startRemoteView failed, error: ${o}.`);
}
this._setRemoteUserInfoAudioVideoAvailable(t, i.VIDEO, e);
}
_handleUserAudioAvailable(A) {
const { userID: e, isAudioAvailable: t } = bA(A);
console.log(`${i.PREFIX}_handleUserAudioAvailable event data: ${JSON.stringify(A)}.`), this._setRemoteUserInfoAudioVideoAvailable(t, i.AUDIO, e);
}
_handleUserVoiceVolume(A) {
try {
const { volumeMap: e } = bA(A);
if ((e || []).length === 0)
return;
const t = X.getData(u.CALL, i.LOCAL_USER_INFO);
let o = X.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
const [n] = e.filter((c) => c.userId === t.userId), s = e.reduce((c, M) => M.userId !== t.userId ? { ...c, [M.userId]: M.audioVolume } : c, {});
t.volume = n.audioVolume, o = o.map((c) => ({ ...c, volume: s[c.userId] }));
const r = {
[i.LOCAL_USER_INFO]: t,
[i.REMOTE_USER_INFO_LIST]: o
};
X.updateStore(r, u.CALL);
} catch (e) {
console.debug(e);
}
}
_handleDeviceUpdate(A) {
const { cameraList: e, microphoneList: t, speakerList: o, currentCamera: n, currentMicrophone: s, currentSpeaker: r } = A;
X.update(u.CALL, i.DEVICE_LIST, { cameraList: e, microphoneList: t, speakerList: o, currentCamera: n, currentMicrophone: s, currentSpeaker: r });
}
};
Tl([
Il({
retries: 5,
timeout: 200,
onRetrying(a) {
console.warn(`${i.PREFIX}_startRemoteView, retrying [${a}]`);
}
})
], Ia.prototype, "_startRemoteView", 1);
let Dl = Ia;
var yl = Object.defineProperty, Cl = Object.getOwnPropertyDescriptor, oA = (a, A, e, t) => {
for (var o = t > 1 ? void 0 : t ? Cl(A, e) : A, n = a.length - 1, s; n >= 0; n--)
(s = a[n]) && (o = (t ? s(A, e, o) : s(o)) || o);
return t && o && yl(A, e, o), o;
};
const V = sa.getInstance(), g = at.getInstance(), YA = ie.getInstance();
YA.setTUIStore(g);
const Zt = "3.3.7", Sl = "vue3", aA = class me {
constructor() {
this._tim = null, this._TUICore = null, this._timerId = -1, this._startTimeStamp = rt(), this._bellContext = null, this._isFromChat = !1, this._currentGroupId = "", this._defaultOfflinePushInfo = {
title: "",
description: v("you have a new call")
}, this._permissionCheckTimer = null, this._chatCombine = null, this._engineEventHandler = null, this._handleCallStatusChange = async (A) => {
var e, t, o, n;
try {
const s = {
callRole: g.getData(u.CALL, i.CALL_ROLE),
callStatus: g.getData(u.CALL, i.CALL_STATUS)
};
if (this._bellContext.setBellProperties(s), A === P.CALLING)
await ((e = this == null ? void 0 : this._bellContext) == null ? void 0 : e.play());
else {
if (A === P.CONNECTED) {
const r = g.getData(u.CALL, i.IS_GROUP), c = g.getData(u.CALL, i.CALL_MEDIA_TYPE), M = g.getData(u.CALL, i.REMOTE_USER_INFO_LIST), N = r ? jA.DIALING_GROUP : jA.DIALING_C2C;
g.update(u.CALL, i.CALL_TIPS, ""), this.statusChanged && this.statusChanged({ oldStatus: N, newStatus: We() }), !r && c === _.VIDEO && this.switchScreen(M[0].domId);
}
if (A === P.IDLE && this._isFromChat) {
const r = this._currentGroupId ? await ((t = this._chatCombine) == null ? void 0 : t.getGroupAttributes(this._tim, this._currentGroupId)) : {};
await ((o = this._chatCombine) == null ? void 0 : o.updateStoreBasedOnGroupAttributes(r, g, this));
}
await ((n = this == null ? void 0 : this._bellContext) == null ? void 0 : n.stop());
}
} catch (s) {
console.warn(`${i.PREFIX}handleCallStatusChange, ${s}.`);
}
}, console.log(`${i.PREFIX}version: ${Zt}`), this._watchTUIStore(), this._engineEventHandler = Dl.getInstance({ callService: this }), this._chatCombine = ge.getInstance({ callService: this });
}
static getInstance() {
return me.instance || (me.instance = new me()), me.instance;
}
async init(A) {
var e, t;
try {
if (this._tuiCallEngine)
return;
let { userID: o, tim: n, userSig: s, sdkAppID: r, SDKAppID: c, isFromChat: M, component: N = ht.TUI_CALL_KIT } = A;
this._TUICore && (r = this._TUICore.SDKAppID, n = this._TUICore.tim), this._tim = n, console.log(`${i.PREFIX}init sdkAppId: ${r || c}, userId: ${o}`), this._tuiCallEngine = ho.createInstance({
tim: n,
SDKAppID: r || c,
// 兼容传入 SDKAppID 的问题
// @ts-ignore
frameWork: Sl,
language: 6,
callkitVersion: Zt,
chat: M || !1,
component: N
}), YA.setEngineInstance(this._tuiCallEngine), this._addListenTuiCallEngineEvent(), this._bellContext = new al(), g.update(u.CALL, i.LOCAL_USER_INFO, { userId: o }), g.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, { userId: o }), YA.updateViewBackgroundUserId("local"), await this._tuiCallEngine.login({ userID: o, userSig: s, assetsPath: "" });
const T = g.getData(u.CALL, i.CUSTOM_UI_CONFIG);
(t = (e = this._tuiCallEngine) == null ? void 0 : e.reportLog) == null || t.call(e, {
name: "TUICallkit.init",
data: {
uiConfig: T
}
});
} catch (o) {
throw console.error(`${i.PREFIX}init failed, error: ${o}.`), o;
}
}
// component destroy
async destroyed() {
var A;
try {
const e = g.getData(u.CALL, i.CALL_STATUS);
if (e !== P.IDLE)
throw new Error(`please destroyed when status is idle, current status: ${e}`);
this._tuiCallEngine && (this._removeListenTuiCallEngineEvent(), await this._tuiCallEngine.destroyInstance(), this._tuiCallEngine = null), (A = this._bellContext) == null || A.destroy(), this._bellContext = null;
} catch (e) {
throw console.error(`${i.PREFIX}destroyed failed, error: ${e}.`), e;
}
}
async call(A) {
if (g.getData(u.CALL, i.CALL_STATUS) === P.IDLE)
try {
const { type: e, userID: t, offlinePushInfo: o } = A;
if (g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE)
return;
await this._updateCallStoreBeforeCall(e, [{ userId: t }]), this.executeExternalBeforeCalling(), A.offlinePushInfo = { ...this._defaultOfflinePushInfo, ...o };
const n = await this._tuiCallEngine.call(A);
await this._updateCallStoreAfterCall([t], n);
} catch (e) {
this._handleCallError(e, "call");
}
}
async groupCall(A) {
if (g.getData(u.CALL, i.CALL_STATUS) === P.IDLE)
try {
const { userIDList: e, type: t, groupID: o, offlinePushInfo: n } = A;
if (g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE)
return;
const s = e.map((c) => ({ userId: c }));
await this._updateCallStoreBeforeCall(t, s, o), this.executeExternalBeforeCalling(), A.offlinePushInfo = { ...this._defaultOfflinePushInfo, ...n };
const r = await this._tuiCallEngine.groupCall(A);
await this._updateCallStoreAfterCall(e, r);
} catch (e) {
this._handleCallError(e, "groupCall");
}
}
async inviteUser(A) {
if (g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE)
try {
const { userIDList: e } = A;
let t = await Oe(e, this.getTim());
const o = g.getData(u.CALL, i.REMOTE_USER_INFO_LIST);
g.update(u.CALL, i.REMOTE_USER_INFO_LIST, [...o, ...t]), g.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, [...o, ...t]), this._tuiCallEngine && await this._tuiCallEngine.inviteUser(A);
} catch (e) {
throw console.error(`${i.PREFIX}inviteUser failed, error: ${e}.`), this._resetCallStore(), e;
}
}
async joinInGroupCall(A) {
if (g.getData(u.CALL, i.CALL_STATUS) !== P.CONNECTED)
try {
const e = {
[i.CALL_ROLE]: IA.CALLEE,
[i.IS_GROUP]: !0,
[i.CALL_STATUS]: P.CONNECTED,
[i.CALL_MEDIA_TYPE]: A.type,
[i.GROUP_ID]: A.groupID,
[i.ROOM_ID]: A.roomID
};
g.updateStore(e, u.CALL);
const t = await this._tuiCallEngine.joinInGroupCall(A), o = this._getFeatureButtonDefaultState(_A.Camera) === Te.Close;
A.type === _.VIDEO && !o && await this.openCamera(i.LOCAL_VIDEO), g.update(u.CALL, i.IS_CLICKABLE, !0), this.startTimer(), Mt(this._tuiCallEngine), await this._tuiCallEngine.setVideoQuality(g.getData(u.CALL, i.VIDEO_RESOLUTION));
const n = g.getData(u.CALL, i.LOCAL_USER_INFO);
g.update(u.CALL, i.LOCAL_USER_INFO, { ...n, isEnter: !0 }), g.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, { ...n, isEnter: !0 }), oe(!0, i.AUDIO);
} catch (e) {
this._handleCallError(e, "joinInGroupCall");
}
}
// ===============================【其它对外接口】===============================
getTUICallEngineInstance() {
return (this == null ? void 0 : this._tuiCallEngine) || null;
}
setLogLevel(A) {
var e;
(e = this == null ? void 0 : this._tuiCallEngine) == null || e.setLogLevel(A);
}
setLanguage(A) {
A && Object.values(ta).includes(A) && g.update(u.CALL, i.LANGUAGE, A);
}
enableFloatWindow(A) {
g.update(u.CALL, i.ENABLE_FLOAT_WINDOW, A);
}
async setSelfInfo(A) {
const { nickName: e, avatar: t } = A;
try {
await this._tuiCallEngine.setSelfInfo({ nickName: e, avatar: t });
} catch (o) {
console.error(`${i.PREFIX}setSelfInfo failed, error: ${o}.`);
}
}
async enableVirtualBackground(A) {
g.update(u.CALL, i.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND, A);
}
async enableAIVoice(A) {
try {
await this._tuiCallEngine.enableAIVoice(A), console.log(`${i.PREFIX}enableAIVoice: ${A}.`);
} catch (e) {
throw console.error(`${i.PREFIX}enableAIVoice failed, error: ${e}.`), e;
}
}
async setCallingBell(A) {
let e = !0;
if (e = await Bo(A), !e) {
console.warn(`${i.PREFIX}setCallingBell failed, filePath: ${A}.`);
return;
}
const t = { calleeBellFilePath: A };
this._bellContext.setBellProperties(t);
}
async enableMuteMode(A) {
try {
const e = { isMuteBell: A };
this._bellContext.setBellProperties(e), await this._bellContext.setBellMute(A);
} catch (e) {
console.warn(`${i.PREFIX}enableMuteMode failed, error: ${e}.`);
}
}
hideFeatureButton(A) {
YA.hideFeatureButton(A);
}
setLocalViewBackgroundImage(A) {
YA.setLocalViewBackgroundImage(A);
}
setRemoteViewBackgroundImage(A, e) {
YA.setRemoteViewBackgroundImage(A, e);
}
setLayoutMode(A) {
YA.setLayoutMode(A);
}
setCameraDefaultState(A) {
YA.setCameraDefaultState(A);
}
async accept() {
var e, t, o, n, s, r;
const A = g.getData(u.CALL, i.CALL_STATUS);
if ((t = (e = this._tuiCallEngine) == null ? void 0 : e.reportLog) == null || t.call(e, {
name: "TUICallKit.accept.start",
data: { callStatus: A }
}), A !== P.CONNECTED)
try {
g.update(u.CALL, i.CALL_STATUS, P.CONNECTED), Mt(this._tuiCallEngine);
const c = await this._tuiCallEngine.accept();
if (c) {
(n = this._chatCombine) == null || n.callTUIService({ message: (o = c == null ? void 0 : c.data) == null ? void 0 : o.message }), g.update(u.CALL, i.IS_CLICKABLE, !0), this.startTimer();
const M = g.getData(u.CALL, i.CALL_MEDIA_TYPE), N = this._getFeatureButtonDefaultState(_A.Camera) === Te.Close;
M === _.VIDEO && !N && await this.openCamera(i.LOCAL_VIDEO), await this._tuiCallEngine.setVideoQuality(g.getData(u.CALL, i.VIDEO_RESOLUTION));
const T = g.getData(u.CALL, i.LOCAL_USER_INFO);
g.update(u.CALL, i.LOCAL_USER_INFO, { ...T, isEnter: !0 }), g.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, { ...T, isEnter: !0 }), oe(!0, i.AUDIO);
}
} catch (c) {
if ((r = (s = this._tuiCallEngine) == null ? void 0 : s.reportLog) == null || r.call(s, {
name: "TUICallKit.accept.fail",
level: "error",
error: c
}), Pt(c))
return;
dt(c, _.AUDIO, this._tuiCallEngine), this._resetCallStore();
}
}
async hangup() {
if (g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE) {
try {
const A = await this._tuiCallEngine.hangup();
A == null || A.forEach((e) => {
var t, o;
(e == null ? void 0 : e.code) === 0 && ((o = this._chatCombine) == null || o.callTUIService({ message: (t = e == null ? void 0 : e.data) == null ? void 0 : t.message }));
});
} catch (A) {
console.debug(A);
}
this._resetCallStore();
}
}
async reject() {
var A, e;
if (g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE) {
try {
const t = await this._tuiCallEngine.reject();
(t == null ? void 0 : t.code) === 0 && ((e = this._chatCombine) == null || e.callTUIService({ message: (A = t == null ? void 0 : t.data) == null ? void 0 : A.message }));
} catch (t) {
console.debug(t);
}
this._resetCallStore();
}
}
async openCamera(A) {
try {
await this._tuiCallEngine.openCamera(A), oe(!0, i.VIDEO);
} catch (e) {
dt(e, _.VIDEO, this._tuiCallEngine), console.error(`${i.PREFIX}openCamera error: ${e}.`);
}
}
async closeCamera() {
try {
await this._tuiCallEngine.closeCamera(), oe(!1, i.VIDEO);
} catch (A) {
console.error(`${i.PREFIX}closeCamera error: ${A}.`);
}
}
async openMicrophone() {
try {
await this._tuiCallEngine.openMicrophone(), oe(!0, i.AUDIO);
} catch (A) {
console.error(`${i.PREFIX}openMicrophone failed, error: ${A}.`);
}
}
async closeMicrophone() {
try {
await this._tuiCallEngine.closeMicrophone(), oe(!1, i.AUDIO);
} catch (A) {
console.error(`${i.PREFIX}closeMicrophone failed, error: ${A}.`);
}
}
unMuteSpeaker() {
var A, e;
try {
const t = (e = (A = this._tuiCallEngine) == null ? void 0 : A.getTRTCCloudInstance) == null ? void 0 : e.call(A);
t && (t.muteAllRemoteAudio(!1), g.update(u.CALL, i.IS_MUTE_SPEAKER, !1));
} catch (t) {
console.error(`${i.PREFIX}unMuteSpeaker failed, error: ${t}.`);
}
}
muteSpeaker() {
var A, e;
try {
const t = (e = (A = this._tuiCallEngine) == null ? void 0 : A.getTRTCCloudInstance) == null ? void 0 : e.call(A);
t && (t.muteAllRemoteAudio(!0), g.update(u.CALL, i.IS_MUTE_SPEAKER, !0));
} catch (t) {
console.error(`${i.PREFIX}muteSpeaker failed, error: ${t}.`);
}
}
switchScreen(A) {
A && g.update(u.CALL, i.BIG_SCREEN_USER_ID, A);
}
async switchCallMediaType() {
var A, e;
try {
const t = g.getData(u.CALL, i.CALL_MEDIA_TYPE);
if (t === _.AUDIO) {
console.warn(`${i.PREFIX}switchCallMediaType failed, ${t} not support.`);
return;
}
const o = await this._tuiCallEngine.switchCallMediaType(_.AUDIO);
(o == null ? void 0 : o.code) === 0 && ((e = this._chatCombine) == null || e.callTUIService({ message: (A = o == null ? void 0 : o.data) == null ? void 0 : A.message })), g.update(u.CALL, i.CALL_MEDIA_TYPE, _.AUDIO);
const s = g.getData(u.CALL, i.IS_GROUP) ? jA.CALLING_GROUP_VIDEO : jA.CALLING_C2C_VIDEO, r = We();
this.statusChanged && this.statusChanged({ oldStatus: s, newStatus: r });
} catch (t) {
console.error(`${i.PREFIX}switchCallMediaType failed, error: ${t}.`);
}
}
async switchCamera() {
const e = g.getData(u.CALL, i.CAMERA_POSITION) === we.BACK ? we.FRONT : we.BACK;
try {
await this._tuiCallEngine.switchCamera(e), g.update(u.CALL, i.CAMERA_POSITION, e);
} catch (t) {
console.error(`${i.PREFIX}_switchCamera failed, error: ${t}.`);
}
}
async setBlurBackground(A) {
try {
await this._tuiCallEngine.setBlurBackground(A ? ko : 0), g.update(u.CALL, i.ENABLE_VIRTUAL_BACKGROUND, A);
} catch (e) {
console.error(`${i.PREFIX}_setBlurBackground failed, error: ${e}.`);
}
}
async switchDevice(A) {
try {
await this._tuiCallEngine.switchDevice(A);
} catch (e) {
console.error(`${i.PREFIX}_switchDevice failed, error: ${e}.`);
}
}
async getDeviceList(A) {
try {
return await this._tuiCallEngine.getDeviceList(A);
} catch (e) {
this._handleCallError(e, "call");
}
}
// ==========================【TUICallEngine 事件处理】==========================
_addListenTuiCallEngineEvent() {
this._engineEventHandler.addListenTuiCallEngineEvent();
}
_removeListenTuiCallEngineEvent() {
this._engineEventHandler.removeListenTuiCallEngineEvent();
}
setCallback(A) {
const { beforeCalling: e, afterCalling: t, onMinimized: o, onMessageSentByMe: n, kickedOut: s, statusChanged: r } = A;
e && (this.beforeCalling = e), t && (this.afterCalling = t), o && (this.onMinimized = o), n && (this.onMessageSentByMe = n), s && (this.kickedOut = s), r && (this.statusChanged = r);
}
toggleMinimize() {
const A = g.getData(u.CALL, i.IS_MINIMIZED);
g.update(u.CALL, i.IS_MINIMIZED, !A), console.log(`${i.PREFIX}toggleMinimize: ${A} -> ${!A}.`), this.onMinimized && this.onMinimized(A, !A);
}
executeExternalBeforeCalling() {
this.beforeCalling && this.beforeCalling();
}
executeExternalAfterCalling() {
this.afterCalling && this.afterCalling();
}
setVideoDisplayMode(A) {
g.update(u.CALL, i.DISPLAY_MODE, A);
}
async setVideoResolution(A) {
var e;
try {
if (!A)
return;
g.update(u.CALL, i.VIDEO_RESOLUTION, A), await ((e = this._tuiCallEngine) == null ? void 0 : e.setVideoQuality(A));
} catch (t) {
console.warn(`${i.PREFIX}setVideoResolution failed, error: ${t}.`);
}
}
// 通话时长更新
startTimer() {
this._timerId === -1 && (this._startTimeStamp = rt(), this._timerId = He.run(i.TIMEOUT, this._updateCallDuration.bind(this), { delay: 1e3 }));
}
// =========================【private methods for service use】=========================
// 处理 “呼叫” 抛出的异常
_handleCallError(A, e) {
if (this._permissionCheckTimer && clearInterval(this._permissionCheckTimer), !Pt(A))
throw dt(A, _.AUDIO, this._tuiCallEngine), console.error(`${i.PREFIX}${e} failed, error: ${A}.`), this._resetCallStore(), A;
}
async _updateCallStoreBeforeCall(A, e, t) {
const o = t || g.getData(u.CALL, i.IS_MINIMIZED) ? EA.CALLER_GROUP_CALLING_MSG : EA.CALLER_CALLING_MSG;
let n = {
[i.CALL_MEDIA_TYPE]: A,
[i.CALL_ROLE]: IA.CALLER,
[i.REMOTE_USER_INFO_LIST]: e,
[i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST]: e,
[i.IS_GROUP]: !!t,
[i.CALL_TIPS]: v(o),
[i.GROUP_ID]: t
};
g.updateStore({ ...n, [i.CALL_STATUS]: P.CALLING }, u.CALL), this.statusChanged && this.statusChanged({
oldStatus: jA.IDLE,
newStatus: t ? jA.DIALING_GROUP : jA.DIALING_C2C
}), Mt(this._tuiCallEngine);
const s = await Oe(e.map((r) => r.userId), this.getTim());
s.length > 0 && (g.update(u.CALL, i.REMOTE_USER_INFO_LIST, s), g.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, s));
}
async _updateCallStoreAfterCall(A, e) {
var t, o;
if (e) {
g.update(u.CALL, i.IS_CLICKABLE, !0), da(e == null ? void 0 : e.roomID, e == null ? void 0 : e.strRoomID);
const n = g.getData(u.CALL, i.CALL_MEDIA_TYPE);
if (e.code === 0) {
(o = this._chatCombine) == null || o.callTUIService({ message: (t = e == null ? void 0 : e.data) == null ? void 0 : t.message });
try {
await this._tuiCallEngine.setVideoQuality(g.getData(u.CALL, i.VIDEO_RESOLUTION));
} catch (c) {
console.warn(`${i.PREFIX}setVideoQuality failed, error: ${c}.`);
}
} else {
this._resetCallStore();
return;
}
const s = this._getFeatureButtonDefaultState(_A.Camera) === Te.Close;
n === _.VIDEO && !s && await this.openCamera(i.LOCAL_VIDEO);
const r = g.getData(u.CALL, i.LOCAL_USER_INFO);
g.update(u.CALL, i.LOCAL_USER_INFO, { ...r, isEnter: !0 }), g.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, { ...r, isEnter: !0 }), oe(!0, i.AUDIO);
} else
this._permissionCheckTimer && clearInterval(this._permissionCheckTimer), this._permissionCheckTimer = null, this._resetCallStore();
}
_getFeatureButtonDefaultState(A) {
var t;
const { button: e } = g.getData(u.CALL, i.CUSTOM_UI_CONFIG);
return (t = e == null ? void 0 : e[A]) == null ? void 0 : t.state;
}
_updateCallDuration() {
const A = Math.round((rt() - this._startTimeStamp) / 1e3), e = Ma(A);
g.update(u.CALL, i.CALL_DURATION, e);
}
_stopTimer() {
this._timerId !== -1 && (He.clearTask(this._timerId), this._timerId = -1);
}
_resetCallStore() {
const A = We();
this._stopTimer();
let e = Object.keys(Fe).filter((n) => {
switch (Fe[n]) {
case i.CALL_STATUS:
case i.LANGUAGE:
case i.IS_GROUP:
case i.DISPLAY_MODE:
case i.VIDEO_RESOLUTION:
case i.ENABLE_FLOAT_WINDOW:
case i.LOCAL_USER_INFO:
case i.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND:
case i.LOCAL_USER_INFO_EXCLUDE_VOLUMN:
return !1;
default:
return !0;
}
});
e = e.map((n) => Fe[n]), g.reset(u.CALL, e), g.getData(u.CALL, i.CALL_STATUS) !== P.IDLE && g.reset(u.CALL, [i.CALL_STATUS], !0), g.reset(u.CALL, [i.IS_MINIMIZED], !0), g.reset(u.CALL, [i.IS_EAR_PHONE], !0), g.reset(u.CALL, [i.ENABLE_VIRTUAL_BACKGROUND], !0), g.reset(u.CALL, [i.IS_MUTE_SPEAKER], !0), g.update(u.CALL, i.LOCAL_USER_INFO, {
...g.getData(u.CALL, i.LOCAL_USER_INFO),
isVideoAvailable: !1,
isAudioAvailable: !1
}), g.update(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN, {
...g.getData(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN),
isVideoAvailable: !1,
isAudioAvailable: !1
}), g.update(u.CALL, i.REMOTE_USER_INFO_LIST, []), g.update(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST, []);
const o = We();
A !== o && this.statusChanged && this.statusChanged({ oldStatus: A, newStatus: o });
}
// =========================【Calling the Chat SDK APi】=========================
// 获取群成员
async getGroupMemberList(A, e) {
const t = g.getData(u.CALL, i.GROUP_ID);
return await sl(t, this.getTim(), A, e);
}
// 获取群信息
async getGroupProfile() {
const A = g.getData(u.CALL, i.GROUP_ID);
return await cl(A, this.getTim());
}
_watchTUIStore() {
g == null || g.watch(u.CALL, {
[i.CALL_STATUS]: this._handleCallStatusChange
});
}
_unwatchTUIStore() {
g == null || g.unwatch(u.CALL, {
[i.CALL_STATUS]: this._handleCallStatusChange
});
}
// =========================【融合 chat 】=========================
bindTUICore(A) {
this._TUICore = A;
}
// =========================【set、get methods】=========================
getTim() {
var A, e;
return this._tim ? this._tim : this._tuiCallEngine ? ((A = this._tuiCallEngine) == null ? void 0 : A.tim) || ((e = this._tuiCallEngine) == null ? void 0 : e.getTim()) : (console.warn(`${i.PREFIX}getTim warning: _tuiCallEngine Instance is not available.`), null);
}
setIsFromChat(A) {
this._isFromChat = A;
}
setCurrentGroupId(A) {
this._currentGroupId = A;
}
getCurrentGroupId() {
return this._currentGroupId;
}
setDefaultOfflinePushInfo(A) {
this._defaultOfflinePushInfo = A;
}
getDefaultOfflinePushInfo() {
return this._defaultOfflinePushInfo;
}
async getCallMessage(A) {
return await this._chatCombine.getCallKitMessage(A, this.getTim());
}
};
oA([
TA(),
UA(fA.init)
], aA.prototype, "init", 1);
oA([
TA(),
UA(fA.call),
tt({ engineInstance: !0 })
], aA.prototype, "call", 1);
oA([
TA(),
UA(fA.groupCall),
tt({ engineInstance: !0 })
], aA.prototype, "groupCall", 1);
oA([
TA(),
UA(fA.inviteUser),
tt({ engineInstance: !0 })
], aA.prototype, "inviteUser", 1);
oA([
TA(),
UA(fA.joinInGroupCall),
tt({ engineInstance: !0 })
], aA.prototype, "joinInGroupCall", 1);
oA([
UA(fA.setLanguage)
], aA.prototype, "setLanguage", 1);
oA([
UA(fA.enableFloatWindow)
], aA.prototype, "enableFloatWindow", 1);
oA([
UA(fA.setSelfInfo)
], aA.prototype, "setSelfInfo", 1);
oA([
UA(fA.enableAIVoice)
], aA.prototype, "enableAIVoice", 1);
oA([
UA(fA.setCallingBell)
], aA.prototype, "setCallingBell", 1);
oA([
UA(fA.enableMuteMode)
], aA.prototype, "enableMuteMode", 1);
oA([
TA()
], aA.prototype, "accept", 1);
oA([
TA()
], aA.prototype, "hangup", 1);
oA([
TA()
], aA.prototype, "reject", 1);
oA([
TA()
], aA.prototype, "openCamera", 1);
oA([
TA()
], aA.prototype, "closeCamera", 1);
oA([
TA()
], aA.prototype, "openMicrophone", 1);
oA([
TA()
], aA.prototype, "closeMicrophone", 1);
oA([
TA()
], aA.prototype, "unMuteSpeaker", 1);
oA([
TA()
], aA.prototype, "muteSpeaker", 1);
oA([
TA()
], aA.prototype, "switchScreen", 1);
oA([
TA()
], aA.prototype, "switchCallMediaType", 1);
oA([
TA()
], aA.prototype, "switchCamera", 1);
oA([
TA()
], aA.prototype, "setBlurBackground", 1);
oA([
TA()
], aA.prototype, "switchDevice", 1);
oA([
UA(fA.setVideoDisplayMode)
], aA.prototype, "setVideoDisplayMode", 1);
oA([
UA(fA.setVideoResolution)
], aA.prototype, "setVideoResolution", 1);
let jl = aA;
const Q = jl.getInstance(), Na = "CallInfoContextKey", ga = "CallerUserInfoContextKey", Ta = "UserInfoExcludeVolumeContextKey", pa = "FocusContextKey", Da = "ButtonPanelContextKey", ya = "FloatWindowContextKey", Ca = "IsClickableContextKey", Sa = "PopoverContextKey", ja = "CustomUIConfigContextKey";
function hl() {
return VA(ga);
}
function rA() {
return VA(Na);
}
function ot(a) {
const A = p([]), e = p(""), t = (n) => {
var s, r, c;
switch (a) {
case hA.CAMERA:
A.value = (n == null ? void 0 : n.cameraList) || [], e.value = ((s = n == null ? void 0 : n.currentCamera) == null ? void 0 : s.deviceId) || "";
break;
case hA.MICROPHONE:
A.value = (n == null ? void 0 : n.microphoneList) || [], e.value = ((r = n == null ? void 0 : n.currentMicrophone) == null ? void 0 : r.deviceId) || "";
break;
case hA.SPEAKER:
A.value = (n == null ? void 0 : n.speakerList) || [], e.value = ((c = n == null ? void 0 : n.currentSpeaker) == null ? void 0 : c.deviceId) || "";
break;
}
}, o = (n) => {
e.value = n;
};
return CA(() => {
g.watch(
u.CALL,
{
[i.DEVICE_LIST]: t
},
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, {
[i.DEVICE_LIST]: t
});
}), [{ deviceList: A, currentDeviceId: e }, { updateCurrentDeviceId: o }];
}
const Ft = (a) => typeof a == "object" && a !== null, ha = (a, A) => {
if (!Ft(a) || !Ft(A))
return a === A;
if (a === A)
return !0;
const e = Object.keys(a), t = Object.keys(A);
if (e.length !== t.length)
return !1;
for (let o in a)
if (!ha(a[o], A[o]))
return !1;
return !0;
};
function Ll(a) {
const A = document.getElementById(a);
!document.fullscreenElement && A ? A.requestFullscreen().catch((e) => {
console.error(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`);
}) : document.exitFullscreen();
}
function lt(a) {
if (typeof a != "object" || a === null)
return a;
let A = Array.isArray(a) ? [] : {};
for (let e in a)
a.hasOwnProperty(e) && (A[e] = lt(a[e]));
return A;
}
const El = 500;
function Et(a, A) {
if (typeof a != "function" || A != null && typeof A != "function")
throw new TypeError("Expected a function");
const e = function(...t) {
const o = A ? A.apply(this, t) : t[0], n = e.cache;
if (n.has(o))
return n.get(o);
const s = a.apply(this, t);
return e.cache = n.set(o, s) || n, s;
};
return e.cache = new (Et.Cache || Map)(), e;
}
Et.Cache = Map;
function ml(a) {
const A = Et(a, (e) => {
const { cache: t } = A;
return t.size === El && t.clear(), e;
});
return A;
}
const zl = ".".charCodeAt(0), Ul = /\\(\\)?/g, fl = RegExp(
// Match anything that isn't a dot or bracket.
`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,
"g"
), La = ml((a) => {
const A = [];
return a.charCodeAt(0) === zl && A.push(""), a.replace(fl, (e, t, o, n) => {
let s = e;
o ? s = n.replace(Ul, "$1") : t && (s = t.trim()), A.push(s);
}), A;
});
function le(a, A, e) {
if (typeof a != "object" || !A)
return;
const t = La(A);
let o = a;
for (let n = 0; n < t.length; n++) {
if (o == null)
return;
const s = t[n];
n !== t.length - 1 ? o = o == null ? void 0 : o[s] : Object.assign(o, { [s]: e });
}
}
function Se(a, A, e) {
if (typeof a != "object")
return;
const t = La(A);
let o = a;
for (let n = 0; n < t.length; n++) {
if (o == null)
return;
const s = t[n];
n !== t.length - 1 ? o = o == null ? void 0 : o[s] : Array.isArray(o) && o.splice(s, 0, e);
}
}
function vl(a) {
return a == null || typeof a == "string" && a.trim().length === 0 ? !0 : Array.isArray(a) || typeof a == "object" ? Object.keys(a).length === 0 : !1;
}
function yt(a, A, e, t, o) {
Object.keys(a).forEach((n) => {
const s = a[n], r = vl(e) ? n : `${e}.${n}`;
if (typeof s == "object")
if (Array.isArray(s))
for (let c = 0; c < s.length; c++) {
const M = `${r}.${c}`;
yt(s[c], A, M, t, o);
}
else
yt(s, A, r, t, o);
else if (A(s)) {
const c = typeof o == "function" ? o({ key: s, value: r }) : r;
t.push(c);
}
});
}
function Ea() {
const a = p(), A = p(g.getData(u.CALL, i.REMOTE_USER_INFO_LIST)), e = (n) => {
(V.isWeChat ? n.enableMic : n.isAudioAvailable) && (a.value = { ...a.value, localVideo: n.volume });
}, t = (n) => {
const s = {};
(n.length !== A.value.length || !ha(n, A.value)) && (A.value = n, A.value.forEach((r) => {
if (V.isWeChat ? r.hasAudio : r.isAudioAvailable) {
const M = V.isWeChat ? r.userID : r.domId;
s[M] = r.volume;
}
}), a.value = { ...a.value, ...s });
};
let o = {
[i.LOCAL_USER_INFO]: e,
[i.REMOTE_USER_INFO_LIST]: t
};
return V.isUniPlatform && (o = {
[i.PUSHER]: e,
[i.PLAYER]: t
}), CA(() => {
g.watch(
u.CALL,
o,
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, o);
}), a;
}
function wl() {
const a = p(""), A = p(!0), e = p(0), t = (n) => {
e.value = 0, a.value = n;
}, o = (n) => {
let s = n;
typeof s == "object" && (s = n == null ? void 0 : n.text), s && (e.value = 2e3, a.value = s);
};
return CA(() => {
g.watch(
u.CALL,
{
[i.CALL_TIPS]: t
},
{
notifyRangeWhenWatch: i.MYSELF
}
), g.watch(
u.CALL,
{
[i.TOAST_INFO]: o
}
);
}), DA(() => {
g.unwatch(
u.CALL,
{
[i.CALL_TIPS]: t,
[i.TOAST_INFO]: o
}
);
}), { tip: a, show: A, duration: e };
}
function Ol() {
const a = p(g.getData(u.CALL, i.NETWORK_STATUS)), A = (e) => {
a.value = e;
};
return CA(() => {
g.watch(
u.CALL,
{
[i.NETWORK_STATUS]: A
},
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, {
[i.NETWORK_STATUS]: A
});
}), { netWorkQualityList: a };
}
function ma() {
const a = p(g.getData(u.CALL, i.PLAYER)), A = (t) => {
a.value = t == null ? void 0 : t.map((o) => {
const { userID: n, hasVideo: s, hasAudio: r } = o;
return { userID: n, hasVideo: s, hasAudio: r };
});
}, e = {
[i.PLAYER]: A
};
return CA(() => {
g.watch(
u.CALL,
e,
{ notifyRangeWhenWatch: i.MYSELF }
);
}), DA(() => {
g.unwatch(u.CALL, e);
}), a;
}
function vA() {
return VA(Ta);
}
function mt() {
const a = p(g.getData(u.CALL, i.CALL_DURATION)), A = (e) => {
a.value = e;
};
return CA(() => {
g.watch(
u.CALL,
{
[i.CALL_DURATION]: A
},
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(
u.CALL,
{
[i.CALL_DURATION]: A
}
);
}), { callDuration: a };
}
function Ve() {
return VA(Da, { status: p("open") });
}
function za() {
return VA(pa, p("open"));
}
function BA() {
return VA(ya);
}
function Vl() {
return VA(Ca);
}
function nt() {
return VA(Sa);
}
const bl = (a, A) => {
const e = [{
i: 0,
x: 0,
y: 0,
w: A,
h: A
}];
for (let t = 1; t < a; t++) {
const o = e[t - 1].x + A === 12;
e[t] = {
i: t,
x: e[t - 1].x + A === 12 ? 0 : e[t - 1].x + A,
y: e[t - 1].y + (o ? A : 0),
w: A,
h: A
};
}
return a === 3 && (e[a - 1].x += 3), a > 3 && V.isPC && a % 3 === 2 && (e[a - 1].x += 2, e[a - 2].x += 2), e;
};
function xl(a, A) {
const { isFloatWindow: e } = G(BA()), t = p();
return uA([a, A, e], () => {
if (e.value) {
const M = [];
for (let N = 0; N < A.value; N++)
M[N] = {
i: N,
x: 0,
y: 0,
w: 12,
h: 12
};
t.value = M;
return;
}
const o = Object.keys(Array.from({ length: A.value })), n = A.value <= 4 ? 6 : 4, s = bl(A.value, n);
t.value = s;
let r, c;
if (a.value !== null) {
if (o.length < 5) {
const M = o.concat();
M.splice(a.value, 1), M.unshift(a.value);
} else
c = a.value % 3, r = Math.floor(a.value / 3);
if (o.length < 5) {
const M = s.findIndex((N) => N.i === a.value);
if (M !== -1) {
const N = s[0];
s[0] = s[M], s[M] = N;
for (let T = 0; T < s.length; T++) {
const I = s[T];
T === 0 ? (I.w += 6, I.h += 6, I.x = 0, I.y = 0) : (I.x = (T - 1) * 4, I.y = 12, I.w = 4, I.h = 4);
}
}
} else {
let M;
c === 0 ? (s[a.value + 1] && (s[a.value + 1].x += 4), s[a.value + 2] && (s[a.value + 2].y += 4), M = {
i: a.value,
x: 0,
y: r * 4,
w: 8,
h: 8
}) : c === 2 ? (M = {
i: a.value,
x: 4,
y: r * 4,
w: 8,
h: 8
}, s[a.value - 1].x = 0, s[a.value - 1].y += 4) : c === 1 && (M = {
i: a.value,
x: 4,
y: r * 4,
w: 8,
h: 8
}, s[a.value + 1] && (s[a.value + 1].x = 0, s[a.value + 1].y += 4));
const N = 3 - c;
for (let T = a.value + N; T < s.length; T++) {
const I = s[T];
I.y += 4;
}
s[a.value] = M;
}
t.value = s;
}
}, {
immediate: !0
}), t;
}
function be() {
return VA(ja);
}
const kl = {
calling: [[
{ name: "switchCamera", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "virtualBackground" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
], [
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{}
]],
accept: [[
{ name: "switchCamera", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "virtualBackground" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
], [
{ name: "reject", customStyle: { paddingTop: "6vh", justifyContent: "center" } },
{},
{ name: "accept", customStyle: { paddingTop: "6vh", justifyContent: "center" } }
]],
connected: [[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
], [
{ name: "virtualBackground", customStyle: { justifyContent: "center", paddingTop: "6vh" }, props: {} },
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{ name: "switchCamera", customStyle: { justifyContent: "center", paddingTop: "6vh" }, props: {} }
]]
}, Rl = {
singleCall: {
video: {
calling: [
[],
[
{},
{ name: "hangup" },
{}
]
],
accept: [
[],
[
{ name: "reject", customStyle: { justifyContent: "flex-end" } },
{},
{ name: "accept", customStyle: { justifyContent: "flex-start" } }
]
],
connected: [
[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
],
[
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{ name: "switchCamera", customStyle: { justifyContent: "center", paddingTop: "6vh" }, props: {} }
]
]
},
audio: {
calling: [
[],
[
{},
{ name: "hangup" },
{}
]
],
accept: [
[],
[
{ name: "reject", customStyle: { justifyContent: "flex-end" } },
{},
{ name: "accept", customStyle: { justifyContent: "flex-start" } }
]
],
connected: [
[],
[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "hangup" },
{ name: "speaker", customStyle: { justifyContent: "flex-end" } }
]
]
}
},
groupCall: {
video: {
calling: [[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
], [
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{}
]],
accept: [
[],
[
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
],
[
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{}
]
],
close_calling: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "camera", props: {} },
{ name: "hangup" }
]
],
close_connected: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "camera", props: {} },
{ name: "hangup" }
]
]
},
audio: {
calling: [[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
], [
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{}
]],
accept: [
[],
[
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "microphone", customStyle: { justifyContent: "flex-start" }, props: {} },
{ name: "speaker" },
{ name: "camera", customStyle: { justifyContent: "flex-end" }, props: {} }
],
[
{},
{ name: "hangup", customStyle: { paddingTop: "6vh" } },
{}
]
],
close_calling: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "camera", props: {} },
{ name: "hangup" }
]
],
close_connected: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "camera", props: {} },
{ name: "hangup" }
]
]
}
}
}, Bl = {
singleCall: {
video: {
calling: [
[
{ name: "camera", props: {} },
{ name: "microphone", props: {} },
{ name: "hangup" }
]
],
accept: [
[
{ name: "camera", props: {} },
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "camera", props: {} },
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "hangup" }
]
]
},
audio: {
calling: [
[
{ name: "microphone", props: {} },
{ name: "hangup" }
]
],
accept: [
[
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "hangup" }
]
]
}
},
groupCall: {
video: {
calling: [[
{ name: "camera", props: {} },
{ name: "microphone", props: {} },
{ name: "inviteUser", props: {} },
{ name: "hangup" }
]],
accept: [
[
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "camera", props: {} },
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "inviteUser", props: {} },
{ name: "hangup" }
]
]
},
audio: {
calling: [
[
{ name: "microphone", props: {} },
{ name: "hangup" }
]
],
accept: [
[
{ name: "reject" },
{ name: "accept" }
]
],
connected: [
[
{ name: "microphone", props: {} },
{ name: "speaker" },
{ name: "inviteUser", props: {} },
{ name: "hangup" }
]
]
}
}
}, Yt = {
pc: Bl,
mobile: Rl
};
function Ua(a) {
const A = lt(a);
return le(A, "mobile.singleCall.video", kl), Se(A, "pc.singleCall.video.calling[0][2]", { name: "virtualBackground", props: {} }), Se(A, "pc.singleCall.video.accept[0][1]", { name: "virtualBackground", props: {} }), Se(A, "pc.singleCall.video.connected[0][3]", { name: "virtualBackground", props: {} }), Se(A, "pc.groupCall.video.calling[0][3]", { name: "virtualBackground", props: {} }), Se(A, "pc.groupCall.video.connected[0][4]", { name: "virtualBackground", props: {} }), A;
}
function Pl(a, A, e) {
let t = lt(a);
return A ? (le(t, "mobile.singleCall.video.connected[1][2].props.show", !0), e && Ua(t)) : (le(t, "mobile.singleCall.video.connected[1][2].props.show", !1), e && (le(t, "mobile.singleCall.video.connected[1][0].props.show", !1), le(t, "pc.singleCall.video.connected[0][3].props.show", !1), le(t, "pc.groupCall.video.connected[0][4].props.show", !1))), t;
}
function Wl() {
const { isShowEnableVirtualBackground: a, callStatus: A } = G(rA()), e = be(), { localUserInfoExcludeVolume: t } = G(vA()), o = S(() => (t == null ? void 0 : t.value.isVideoAvailable) || !1), n = S(() => a.value && !V.isH5), s = p([]);
return uA([e, a, o], () => {
let r = lt(Yt);
n.value && (r = Ua(Yt)), A.value === P.CONNECTED && (r = Pl(r, o.value, n.value));
const { button: c } = e.value, M = [];
function N(I) {
return Object.keys(c).includes(I);
}
function T({ key: I, value: D }) {
var H;
const h = D.split(".");
let j = h.slice(0, h.length - 1);
const m = h.slice(0, h.length - 2);
if (m[m.length - 1] === "0")
for (let b = 0; b < 3; b++) {
let x = m.slice();
x.push(b), x.push("customStyle"), x.push("justifyContent"), x = x.join("."), M.push({ path: x, value: "center" });
}
return j.push("props"), j.push("show"), j = j.join("."), {
path: j,
value: (H = c == null ? void 0 : c[I]) == null ? void 0 : H.show
};
}
yt(r, N, "", M, T), M == null || M.forEach((I) => {
le(r, I.path, I.value);
}), s.value = r;
}, {
immediate: !0
}), s;
}
function fa() {
const a = be(), A = p(a.value.viewBackground);
return uA(a, () => {
A.value = a.value.viewBackground;
}), A;
}
function Gl() {
const a = p(g.getData(u.CALL, i.ROOM_ID)), A = p(g.getData(u.CALL, i.ROOM_ID_TYPE)), e = p(g.getData(u.CALL, i.GROUP_ID)), t = p(g.getData(u.CALL, i.CALL_MEDIA_TYPE)), o = p(g.getData(u.CALL, i.GROUP_CALL_MEMBERS)), n = p(g.getData(u.CALL, i.CALL_STATUS)), s = (D) => {
a.value = D;
}, r = (D) => {
e.value = D;
}, c = (D) => {
t.value = D;
}, M = (D) => {
o.value = D;
}, N = (D) => {
n.value = D;
}, T = (D) => {
A.value = D;
}, I = {
[i.ROOM_ID]: s,
[i.GROUP_ID]: r,
[i.CALL_MEDIA_TYPE]: c,
[i.GROUP_CALL_MEMBERS]: M,
[i.CALL_STATUS]: N,
[i.ROOM_ID_TYPE]: T
};
return CA(() => {
g.watch(
u.CALL,
I,
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, I);
}), {
roomId: a,
roomIdType: A,
groupId: e,
callMediaType: t,
groupCallMembers: o,
callStatus: n
};
}
const Ql = {
customStyle: {
type: Object
},
customClass: {
type: String
}
}, Zl = ["start", "center", "end", "space-around", "space-between", "space-evenly"], Fl = ["top", "middle", "bottom"], Yl = {
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: Zl,
default: "start"
},
align: {
type: String,
values: Fl,
default: "top"
},
customStyle: {
type: Object,
default: () => {
}
}
};
function iA(...a) {
const A = [], e = {}.hasOwnProperty;
for (let t = 0; t < a.length; t++) {
const o = a[t];
if (!o)
continue;
const n = typeof o;
if (n === "string" || n === "number")
A.push(o);
else if (Array.isArray(o)) {
if (o.length) {
const s = iA.apply(null, o);
s && A.push(s);
}
} else if (n === "object") {
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]")) {
A.push(o.toString());
continue;
}
for (const s in o)
e.call(o, s) && o[s] && A.push(s);
}
}
return A.join(" ");
}
const se = typeof wx < "u" && typeof wx.getSystemInfoSync == "function" && !!wx.getSystemInfoSync().fontSizeSetting, Xl = typeof uni < "u" && typeof uni > "u", Ct = se || Xl, ql = typeof uni < "u", va = function() {
return (typeof uni < "u" || typeof window < "u") && !Ct;
}();
(function() {
return se ? wx : ql ? uni : window;
})();
const Ae = va && window && window.navigator && window.navigator.userAgent || "", Jl = /Android/i.test(Ae), Hl = /(?:Windows Phone)/.test(Ae), Kl = /(?:SymbianOS)/.test(Ae), _l = /iPad/i.test(Ae) || /iPhone/i.test(Ae) || /iPod/i.test(Ae), wa = Jl || Hl || Kl || _l, re = va && !wa;
re && Ae.includes("Windows NT");
re && Ae.includes("Mac");
function Ke(a) {
const A = {};
for (const e in a)
Object.prototype.hasOwnProperty.call(a, e) && a[e] !== void 0 && (A[e] = a[e]);
return A;
}
function $l() {
let a = "unknow";
return typeof st == "string" && (a = st.split(".")[0]), { version: st, majorVersion: a };
}
function Xt(a, A) {
const { key: e, value: t } = A;
return a.find((o) => o[e] === t);
}
const Oa = "RowContextKey", Y = "tk", ze = {
SUCCESS: "success",
INFO: "info",
WARNING: "warning",
ERROR: "error"
}, An = {
options: {
virtualHost: !0
}
}, ne = /* @__PURE__ */ f({
...An,
__name: "Row",
props: Yl,
setup(a) {
const A = a, e = S(() => A.gutter);
OA(Oa, {
gutter: e
});
const t = iA([
`${Y}-row`,
`${Y}-justify-${A.justify}`,
`${Y}-align-${A.align}`
]);
return (o, n) => (d(), y("div", {
class: k(l(t)),
style: eA([o.customStyle])
}, [
q(o.$slots, "default")
], 6));
}
});
const en = ["start", "center", "end", "space-around", "space-between", "space-evenly"], tn = ["top", "middle", "bottom"], an = {
span: {
type: Number,
default: 24
},
justify: {
type: String,
values: en,
default: "start"
},
align: {
type: String,
values: tn,
default: "middle"
},
offset: {
type: Number,
default: 0
}
}, on = {
options: {
virtualHost: !0
}
}, yA = /* @__PURE__ */ f({
...on,
__name: "Col",
props: an,
setup(a) {
const A = a, { gutter: e } = VA(Oa, { gutter: S(() => 0) }), t = iA([
`${Y}-col`,
`${Y}-justify-${A.justify}`,
`${Y}-align-${A.align}`
]), o = S(() => `${A.span / 24 * 100}%`), n = S(() => `${A.offset / 24 * 100}%`), s = S(() => `${e.value / 2}px`), r = s;
return (c, M) => (d(), y("div", {
class: k(l(t)),
style: eA({
width: l(o),
marginLeft: l(n),
paddingLeft: l(s),
paddingRight: l(r)
})
}, [
q(c.$slots, "default")
], 6));
}
});
const ln = {
width: {
type: String,
default: "40px"
},
height: {
type: String,
default: "40px"
},
color: {
type: String
}
}, nn = {
options: {
virtualHost: !0
}
}, sn = /* @__PURE__ */ f({
...nn,
__name: "Dot",
props: ln,
setup(a) {
const A = a, e = `${Y}-loading_dot-container`, t = `${Y}-loading_dot`, o = S(() => ({
width: A.width,
height: A.height
})), n = S(() => {
const s = {};
return A.color && (s.backgroundColor = A.color), s;
});
return (s, r) => (d(), y("div", {
class: k(e),
style: eA([l(o)])
}, [
L("div", {
class: k(t),
style: eA([l(n)])
}, null, 4),
L("div", {
class: k(t),
style: eA([l(n)])
}, null, 4),
L("div", {
class: k(t),
style: eA([l(n)])
}, null, 4)
], 4));
}
});
const cn = {
width: {
type: String,
default: "40px"
},
height: {
type: String,
default: "40px"
},
color: {
type: String
}
}, rn = {
options: {
virtualHost: !0
}
}, un = /* @__PURE__ */ f({
...rn,
__name: "Circle",
props: cn,
setup(a) {
const A = a, e = S(() => {
const o = {
width: A.width,
height: A.height
};
return A.color && (o["--tk-loading-primary-color"] = A.color), o;
}), t = `${Y}-loading_circle-container`;
return (o, n) => (d(), y("div", {
class: k(t),
style: eA([l(e)])
}, null, 4));
}
});
const Mn = ["circle", "dot"], dn = ["row", "column"], In = {
mode: {
type: String,
values: Mn,
default: "circle"
},
loadingWidth: {
type: String,
default: "40px"
},
loadingHeight: {
type: String,
default: "40px"
},
color: {
type: String
},
text: {
type: String
},
layout: {
type: String,
values: dn,
default: "column"
}
}, Nn = {
options: {
virtualHost: !0
}
}, zt = /* @__PURE__ */ f({
...Nn,
__name: "Loading",
props: In,
setup(a) {
const A = a, e = `${Y}-loading ${Y}-loading--${A.mode}`, t = `${Y}-loading_text`, o = S(() => ({
flexDirection: A.layout
}));
return (n, s) => (d(), y("div", {
class: k(e),
style: eA([l(o)])
}, [
n.mode === "dot" ? (d(), U(sn, {
key: 0,
width: n.loadingWidth,
height: n.loadingHeight,
color: n.color
}, null, 8, ["width", "height", "color"])) : (d(), U(un, {
key: 1,
width: n.loadingWidth,
height: n.loadingHeight,
color: n.color
}, null, 8, ["width", "height", "color"])),
n.text ? (d(), y("div", {
key: 2,
class: k(t)
}, W(n.text), 1)) : z("", !0)
], 4));
}
});
const gn = {
src: {
type: String
},
size: {
type: Number,
default: 20
}
}, Tn = ["fill", "contain", "cover"], qt = {
fill: "scaleToFill",
contain: "aspectFit",
cover: "aspectFill"
}, pn = {
width: {
type: String,
default: "320px"
},
height: {
type: String,
default: "240px"
},
src: {
type: String
},
fit: {
type: String,
values: Tn,
default: "fill"
},
customStyle: {
type: Object
},
defaultSrc: {
type: String
}
}, Dn = {
error: (a) => a
}, yn = ["src"], Cn = ["src", "mode"], Sn = {
options: {
virtualHost: !0
}
}, LA = /* @__PURE__ */ f({
...Sn,
__name: "TKImage",
props: pn,
emits: Dn,
setup(a, { emit: A }) {
const e = a, t = A, o = p(!1), n = p(e.src);
uA(() => e.src, () => {
o.value = !1, n.value = e.src;
});
const s = S(() => iA([`${Y}-image`])), r = S(() => ({
width: e.width,
height: e.height,
...e.customStyle
})), c = S(() => iA([
`${Y}-image_inner`
])), M = S(() => se ? qt[e.fit] || qt.cover : e.fit);
function N(T) {
o.value = !0, n.value = e.defaultSrc, t("error", T);
}
return (T, I) => (d(), y("div", {
class: k(l(s)),
style: eA([l(r)])
}, [
l(o) && !T.defaultSrc ? q(T.$slots, "error", { key: 0 }) : (d(), y(RA, { key: 1 }, [
l(se) ? z("", !0) : (d(), y("img", {
key: 0,
class: k(l(c)),
src: l(n),
style: eA({ objectFit: l(M) }),
onError: N
}, null, 46, yn)),
l(se) ? (d(), y("image", {
key: 1,
class: k(l(c)),
src: l(n),
mode: l(M),
onError: N
}, null, 42, Cn)) : z("", !0)
], 64))
], 6));
}
});
const jn = {
options: {
virtualHost: !0
}
}, De = /* @__PURE__ */ f({
...jn,
__name: "Icon",
props: gn,
setup(a) {
const A = a, e = S(() => `${A.size}px`), t = S(() => `${A.size}px`);
return (o, n) => (d(), U(LA, {
src: o.src,
width: l(e),
height: l(t)
}, null, 8, ["src", "width", "height"]));
}
}), hn = ["small", "middle", "large"], Ln = ["row", "column"], En = ["circle", "round"], mn = {
iconSrc: {
type: String
},
iconSize: {
type: Number
},
text: {
type: String
},
loading: {
type: Boolean,
default: !1
},
loadingColor: {
type: String,
default: "#fff"
},
loadingWidth: {
type: String,
default: "40px"
},
loadingHeight: {
type: String,
default: "40px"
},
size: {
type: String,
values: hn,
default: "middle"
},
width: {
type: String
},
height: {
type: String
},
color: {
type: String
},
direction: {
type: String,
values: Ln,
default: "row"
},
shape: {
type: String,
values: En
},
buttonStyle: {
type: Object
},
buttonTextStyle: {
type: Object
}
}, zn = {
options: {
virtualHost: !0
}
}, mA = /* @__PURE__ */ f({
...zn,
__name: "Button",
props: mn,
emits: ["click"],
setup(a, { emit: A }) {
const e = a, t = `${Y}-button--content`, o = S(() => ({
width: e.width,
height: e.height,
backgroundColor: e.color,
flexDirection: e.direction,
cursor: re ? "pointer" : "auto",
...e.buttonStyle
})), n = iA([
`${Y}-button`,
{ [`${Y}-${e.shape}`]: e.shape },
`${Y}-button--${e.size}`
]), s = A, r = (c) => {
!e.loading && s("click", c);
};
return (c, M) => (d(), y("div", {
style: eA([l(o)]),
class: k(l(n)),
onClick: r
}, [
c.loading ? (d(), U(zt, {
key: 0,
loadingWidth: c.loadingWidth,
loadingHeight: c.loadingHeight,
color: c.loadingColor
}, null, 8, ["loadingWidth", "loadingHeight", "color"])) : z("", !0),
c.iconSrc && !c.loading ? (d(), U(De, {
key: 1,
size: c.iconSize,
src: c.iconSrc
}, null, 8, ["size", "src"])) : z("", !0),
c.text ? (d(), y("div", {
key: 2,
style: eA([c.buttonTextStyle]),
class: k(t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"#D5E0F2",
textSize: "12px",
textStyle: {
marginTop: "5px"
}
}, O = {
accept: {
basicConfig: {
...$,
color: "#51C271",
iconSrc: fn
},
loadingConfig: {
...$,
color: "#51C271",
loadingWidth: pA ? "30px" : "20px",
loadingHeight: pA ? "30px" : "20px"
}
},
hangup: {
basicConfig: {
...$,
color: "#ED4651",
iconSrc: St
},
loadingConfig: {
...$,
color: "#ED4651",
loadingWidth: pA ? "30px" : "20px",
loadingHeight: pA ? "30px" : "20px"
}
},
reject: {
basicConfig: {
...$,
color: "#ED4651",
iconSrc: St
}
},
camera: {
basicConfig: {
...$,
color: "#FFFFFF",
iconSrc: Va,
shape: "circle"
},
closedConfig: {
...$,
color: "#6b758a4d",
iconSrc: ba
},
loadingConfig: {
...$,
color: "#6b758a4d",
loadingWidth: pA ? "30px" : "20px",
loadingHeight: pA ? "30px" : "20px"
}
},
microphone: {
basicConfig: {
...$,
color: "#FFFFFF",
iconSrc: xa
},
closedConfig: {
...$,
color: "#6b758a4d",
iconSrc: ka
}
},
speaker: {
basicConfig: {
...$,
color: "#FFFFFF",
iconSrc: Ra
},
closedConfig: {
...$,
color: "#6b758a4d",
iconSrc: Ba
}
},
fullScreen: {
basicConfig: {
iconSize: 20,
iconSrc: vn
}
},
minimize: {
basicConfig: {
iconSize: pA ? 24 : 20,
iconSrc: Pa
}
},
switchCamera: {
basicConfig: {
...$,
color: "transparent",
iconSrc: JA,
shape: "circle"
}
},
inviteUser: {
basicConfig: {
...$,
color: pA ? "" : "#6b758a4d",
width: pA ? "24px" : "40px",
height: pA ? "24px" : "40px",
shape: pA ? "" : "circle",
iconSize: pA ? 24 : 20,
iconSrc: Wa
}
},
toggleButtonPanel: {
basicConfig: {
color: "transparent",
width: "40px",
height: "40px",
shape: "circle",
iconSize: 40,
iconSrc: xn
}
},
virtualBackground: {
basicConfig: {
...$,
color: "#6b758a4d",
iconSrc: KA,
shape: "circle"
},
closedConfig: {
...$,
color: "#FFFFFF",
iconSrc: jt
},
loadingConfig: {
...$,
color: "#6b758a4d",
loadingWidth: pA ? "30px" : "20px",
loadingHeight: pA ? "30px" : "20px"
},
disableConfig: {
...$,
color: "#6b758a4d",
iconSrc: KA,
buttonStyle: {
opacity: 0.6
}
}
}
}, XA = {
singleCall: {
video: {
calling: {
...O,
switchCamera: {
basicConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle",
showText: !0
},
disableConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle",
showText: !0,
buttonStyle: {
opacity: 0.6
}
}
},
hangup: {
basicConfig: {
...O.hangup.basicConfig
},
loadingConfig: {
...O.hangup.loadingConfig
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
accept: {
...O,
switchCamera: {
basicConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle"
},
disableConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle",
showText: !0,
buttonStyle: {
opacity: 0.6
}
}
},
accept: {
basicConfig: {
...O.accept.basicConfig,
showText: !1
},
loadingConfig: {
...O.accept.loadingConfig,
showText: !1
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
connected: {
...O,
virtualBackground: {
basicConfig: {
...$,
color: "transparent",
iconSrc: KA,
shape: "circle",
showText: !1
},
closedConfig: {
...$,
color: "transparent",
iconSrc: KA,
showText: !1
},
disableConfig: {
...$,
color: "transparent",
iconSrc: KA,
showText: !1,
buttonStyle: {
opacity: 0.6
}
}
},
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
switchCamera: {
basicConfig: {
...O.switchCamera.basicConfig,
showText: !1
},
disableConfig: {
...O.switchCamera.basicConfig,
showText: !1,
buttonStyle: {
opacity: 0.6
}
}
}
}
},
audio: {
calling: O,
accept: O,
connected: O
}
},
groupCall: {
video: {
calling: {
...O,
switchCamera: {
basicConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle"
}
},
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
accept: {
basicConfig: {
...O.accept.basicConfig,
showText: !1
},
loadingConfig: {
...O.accept.loadingConfig,
showText: !1
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
accept: {
...O,
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
accept: {
basicConfig: {
...O.accept.basicConfig,
showText: !1
},
loadingConfig: {
...O.accept.loadingConfig,
showText: !1
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
connected: {
...O,
virtualBackground: {
basicConfig: {
...$,
color: "transparent",
iconSrc: KA,
shape: "circle",
showText: !1
},
closedConfig: {
...$,
color: "transparent",
iconSrc: jt,
showText: !1
}
},
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
}
}
},
audio: {
calling: {
...O,
switchCamera: {
basicConfig: {
...$,
color: "#6b758a4d",
iconSrc: JA,
shape: "circle"
}
},
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
accept: {
basicConfig: {
...O.accept.basicConfig,
showText: !1
},
loadingConfig: {
...O.accept.loadingConfig,
showText: !1
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
accept: {
...O,
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
accept: {
basicConfig: {
...O.accept.basicConfig,
showText: !1
},
loadingConfig: {
...O.accept.loadingConfig,
showText: !1
}
},
reject: {
basicConfig: {
...O.reject.basicConfig,
showText: !1
}
}
},
connected: {
...O,
hangup: {
basicConfig: {
...O.hangup.basicConfig,
showText: !1
},
loadingConfig: {
...O.hangup.loadingConfig,
showText: !1
}
},
virtualBackground: {
basicConfig: {
...$,
color: "transparent",
iconSrc: KA,
shape: "circle"
},
closedConfig: {
...$,
color: "transparent",
iconSrc: jt
}
}
}
}
}
}, kn = {
singleCall: {
video: {
calling: O,
accept: O,
connected: O
},
audio: {
calling: O,
accept: O,
connected: O
}
},
groupCall: {
video: {
calling: O,
accept: O,
connected: O
},
audio: {
calling: O,
accept: O,
connected: O
}
}
}, Rn = {
pc: kn,
mobile: XA
}, FA = {
width: "40px",
height: "40px",
shape: "circle",
iconSize: 20,
textColor: "#D5E0F2"
}, Qe = {
microphone: {
basicConfig: {
...FA,
color: "#FFFFFF",
iconSrc: xa
},
closedConfig: {
...FA,
color: "#6b758a4d",
iconSrc: ka
}
},
speaker: {
basicConfig: {
...FA,
color: "#FFFFFF",
iconSrc: Ra
},
closedConfig: {
...FA,
color: "#6b758a4d",
iconSrc: Ba
}
},
camera: {
basicConfig: {
...FA,
color: "#FFFFFF",
iconSrc: Va
},
closedConfig: {
...FA,
color: "#6b758a4d",
iconSrc: ba
}
},
hangup: {
basicConfig: {
...FA,
color: "#ED4651",
iconSrc: St
},
loadingConfig: {
...FA,
color: "#ED4651",
loadingWidth: "20px",
loadingHeight: "20px"
}
},
toggleButtonPanel: {
basicConfig: {
color: "transparent",
width: "40px",
height: "40px",
shape: "circle",
iconSize: 40,
iconSrc: Un
}
}
}, Bn = {
mobile: {
...XA,
groupCall: {
video: {
...XA.groupCall.video,
calling: {
...XA.groupCall.video.calling,
...Qe
},
connected: {
...XA.groupCall.video.connected,
...Qe
}
},
audio: {
...XA.groupCall.audio,
calling: {
...XA.groupCall.audio.calling,
...Qe
},
connected: {
...XA.groupCall.audio.connected,
...Qe
}
}
}
}
}, zA = (a, A) => {
var M;
const e = V.isPC ? "pc" : "mobile", { status: t } = Ve(), { callStatus: o, callRole: n, isGroupCall: s, callType: r } = G(rA()), c = p((M = O == null ? void 0 : O[a]) == null ? void 0 : M[A.value]);
return uA(
[A, t, o, s, r],
() => {
var h, j, m, w, H;
const N = s.value ? "groupCall" : "singleCall", T = r.value === _.AUDIO ? "audio" : "video";
let I = "";
o.value === P.CALLING ? I = n.value === IA.CALLER ? "calling" : "accept" : o.value === P.CONNECTED && (I = "connected");
let D = Rn;
t.value === "close" && (D = Bn), c.value = ((H = (w = (m = (j = (h = D == null ? void 0 : D[e]) == null ? void 0 : h[N]) == null ? void 0 : j[T]) == null ? void 0 : m[I]) == null ? void 0 : w[a]) == null ? void 0 : H[A.value]) || {};
},
{ immediate: !0 }
), c;
}, Pn = {
options: {
virtualHost: !0
}
}, Wn = /* @__PURE__ */ f({
...Pn,
__name: "Minimize",
setup(a) {
const A = zA("minimize", p("basicConfig")), e = async () => {
if (document != null && document.fullscreenElement)
try {
document == null || document.exitFullscreen();
} catch (t) {
console.debug(t);
}
await Q.toggleMinimize();
};
return (t, o) => (d(), U(mA, {
iconSrc: l(A).iconSrc,
iconSize: l(A).iconSize,
onClick: e
}, null, 8, ["iconSrc", "iconSize"]));
}
});
const Z = (a, A) => {
const e = a.__vccOpts || a;
for (const [t, o] of A)
e[t] = o;
return e;
}, Jt = /* @__PURE__ */ Z(Wn, [["__scopeId", "data-v-135d060f"]]), Gn = {
options: {
virtualHost: !0
}
}, Qn = /* @__PURE__ */ f({
...Gn,
__name: "FullScreen",
setup(a) {
const A = zA("fullScreen", p("basicConfig")), e = async () => {
await Ll("tuicallkit-id");
};
return (t, o) => (d(), U(mA, {
iconSrc: l(A).iconSrc,
iconSize: l(A).iconSize,
onClick: e
}, null, 8, ["iconSrc", "iconSize"]));
}
});
const Zn = /* @__PURE__ */ Z(Qn, [["__scopeId", "data-v-f92abf93"]]), Fn = {
width: {
type: String
},
color: {
type: String
},
size: {
type: String
},
weight: {
type: Number
},
truncated: {
type: Boolean,
default: !1
},
lineClamp: {
type: Number
},
textStyle: {
type: Object
}
}, Yn = {
options: {
virtualHost: !0
}
}, gA = /* @__PURE__ */ f({
...Yn,
__name: "TKText",
props: Fn,
emits: ["click"],
setup(a, { emit: A }) {
const e = a, t = A, o = iA([
`${Y}-text`,
{ [`${Y}-text--line-clamp`]: e.lineClamp }
]), n = S(() => Ke({
maxWidth: e.width,
fontSize: e.size,
fontWeight: e.weight,
color: e.color,
textOverflow: e.truncated ? "ellipsis" : "auto",
"-webkit-line-clamp": e.lineClamp,
...e.textStyle
})), s = () => {
t("click");
};
return (r, c) => (d(), y("span", {
class: k(l(o)),
style: eA([l(n)]),
onClick: s
}, [
q(r.$slots, "default")
], 6));
}
});
const ZA = {
width: {
type: String
},
height: {
type: String
},
showText: {
type: Boolean,
default: !0
},
iconSize: {
type: String
}
}, Xn = { class: "btn-content" }, qn = {
options: {
virtualHost: !0
}
}, Jn = /* @__PURE__ */ f({
...qn,
__name: "InviteUser",
props: ZA,
setup(a) {
const A = a, e = zA("inviteUser", p("basicConfig")), t = async () => {
g.update(u.CALL, i.SHOW_SELECT_USER, !0);
};
return (o, n) => (d(), y("div", Xn, [
C(mA, {
iconSrc: l(e).iconSrc,
color: l(e).color,
iconSize: l(e).iconSize,
width: A.width || l(e).width,
height: A.height || l(e).height,
shape: l(e).shape,
onClick: t
}, null, 8, ["iconSrc", "color", "iconSize", "width", "height", "shape"]),
o.showText ? (d(), U(gA, {
key: 0,
textStyle: l(e).textStyle,
color: l(e).textColor,
size: l(e).textSize
}, {
default: E(() => [
NA(W(l(v)("invite member")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Ga = /* @__PURE__ */ Z(Jn, [["__scopeId", "data-v-4c3a35f0"]]), Hn = {
color: {
type: String,
default: "#FFF"
},
callDuration: {
type: String,
default: ""
},
fontSize: {
type: String,
default: "16px"
}
}, Kn = {
options: {
virtualHost: !0
}
}, _e = /* @__PURE__ */ f({
...Kn,
__name: "Timer",
props: Hn,
setup(a) {
const A = a, e = S(() => ({
color: A.color,
fontSize: A.fontSize
}));
return (t, o) => (d(), y("span", {
style: eA([l(e)])
}, W(t.callDuration), 5));
}
}), _n = {
options: {
virtualHost: !0
}
}, $n = /* @__PURE__ */ f({
..._n,
__name: "TopBar",
props: Ql,
setup(a) {
const A = V.isPC, { callStatus: e, isGroupCall: t, callRole: o, allowedFullScreen: n } = G(rA()), { callDuration: s } = mt(), r = be(), c = S(() => e.value === P.CONNECTED), M = p(g.getData(u.CALL, i.ENABLE_FLOAT_WINDOW)), N = S(() => {
var D, h;
return !t.value || ((h = (D = r.value.button) == null ? void 0 : D[_A.InviteUser]) == null ? void 0 : h.show) === !1 ? !1 : e.value === P.CALLING ? o.value === IA.CALLER : !0;
});
function T(D) {
M.value = D;
}
const I = {
[i.ENABLE_FLOAT_WINDOW]: T
};
return CA(() => {
g.watch(
u.CALL,
I,
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, {
...I
});
}), (D, h) => (d(), y("div", {
style: eA(D.customStyle),
class: "top-bar-container"
}, [
l(A) ? (d(), U(ne, { key: 0 }, {
default: E(() => [
C(yA, { span: 8 }),
C(yA, {
span: 8,
justify: "center",
align: "center"
}, {
default: E(() => [
l(c) ? (d(), U(_e, {
key: 0,
"call-duration": l(s)
}, null, 8, ["call-duration"])) : z("", !0)
]),
_: 1
}),
C(yA, {
span: 8,
justify: "end",
align: "center"
}, {
default: E(() => [
C(ne, null, {
default: E(() => [
C(yA, { span: 18 }),
C(yA, {
span: 3,
justify: "center"
}, {
default: E(() => [
l(M) ? (d(), U(Jt, { key: 0 })) : z("", !0)
]),
_: 1
}),
C(yA, {
span: 3,
justify: "center"
}, {
default: E(() => [
l(n) ? (d(), U(Zn, { key: 0 })) : z("", !0)
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})) : z("", !0),
l(A) ? z("", !0) : (d(), U(ne, { key: 1 }, {
default: E(() => [
C(yA, {
span: 8,
align: "center"
}, {
default: E(() => [
C(ne, null, {
default: E(() => [
C(yA, {
span: 8,
justify: "center"
}, {
default: E(() => [
!l(A) && l(M) ? (d(), U(Jt, { key: 0 })) : z("", !0)
]),
_: 1
}),
C(yA, { span: 16 })
]),
_: 1
})
]),
_: 1
}),
C(yA, {
span: 8,
justify: "center",
align: "center"
}, {
default: E(() => [
l(c) ? (d(), U(_e, {
key: 0,
"call-duration": l(s)
}, null, 8, ["call-duration"])) : z("", !0)
]),
_: 1
}),
C(yA, {
span: 8,
justify: "end",
align: "center"
}, {
default: E(() => [
C(ne, null, {
default: E(() => [
C(yA, { span: 16 }),
C(yA, {
span: 8,
justify: "center"
}, {
default: E(() => [
l(N) ? (d(), U(Ga, {
key: 0,
"show-text": l(A)
}, null, 8, ["show-text"])) : z("", !0)
]),
_: 1
})
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}))
], 4));
}
});
const Qa = /* @__PURE__ */ Z($n, [["__scopeId", "data-v-b040a138"]]), Ai = {
show: {
type: Boolean,
default: !0
},
showMask: {
type: Boolean,
default: !0
},
showBackgroundImage: {
type: Boolean,
default: !0
},
blur: {
type: Boolean,
default: !0
},
bgColor: {
type: String
},
bgImage: {
type: String
},
zIndex: {
type: Number,
default: 11e3
},
customClass: {
type: String
},
customStyle: {
type: Object
},
customMaskStyle: {
type: Object
},
fit: {
type: String,
default: "cover"
},
defaultSrc: {
type: String
}
}, ei = ["click", "error"], ti = {
options: {
virtualHost: !0
}
}, Za = /* @__PURE__ */ f({
...ti,
__name: "Overlay",
props: Ai,
emits: ei,
setup(a, { emit: A }) {
const e = a, t = A, o = iA([
`${Y}-overlay`,
e.customClass
]), n = `${Y}-overlay_mask-container`, s = S(() => iA([
`${Y}-overlay_mask`,
{ [`${Y}-blur`]: e.blur }
])), r = `${Y}-overlay_slot`, c = S(() => ({ zIndex: e.zIndex, ...e.customStyle })), M = S(() => ({
backgroundColor: e.bgColor,
...e.customMaskStyle
}));
function N() {
t("click");
}
const T = (I) => {
t("error", I);
};
return (I, D) => I.show ? (d(), y("div", {
key: 0,
class: k(l(o)),
style: eA([l(c)]),
onClick: N
}, [
L("div", {
class: k(n)
}, [
I.showMask ? (d(), y("div", {
key: 0,
class: k(l(s)),
style: eA([l(M)])
}, null, 6)) : z("", !0),
I.showBackgroundImage ? (d(), U(LA, {
key: 1,
fit: I.fit,
src: I.bgImage,
width: "100%",
height: "100%",
defaultSrc: I.defaultSrc,
onError: T
}, null, 8, ["fit", "src", "defaultSrc"])) : z("", !0)
]),
L("div", {
class: k(r)
}, [
q(I.$slots, "default")
])
], 6)) : z("", !0);
}
});
const ai = ["fill", "contain", "cover"], oi = ["circle", "square"], li = {
icon: {
type: String
},
size: {
type: [Number, String],
default: 100
},
shape: {
type: String,
values: oi,
default: "square"
},
src: {
type: String
},
defaultSrc: {
type: String
},
text: {
type: String
},
fit: {
type: String,
values: ai,
default: "cover"
},
customClass: {
type: String
}
}, ni = {
options: {
virtualHost: !0
}
}, Fa = /* @__PURE__ */ f({
...ni,
__name: "Avatar",
props: li,
setup(a) {
const A = a, e = p("");
uA(() => A.src, () => {
e.value = A.src;
}, {
immediate: !0
});
const t = S(() => iA([
`${Y}-avatar`,
`${Y}-avatar--${A.shape}`,
`${Y}-avatar--${A.size}`,
A.customClass
])), o = S(() => typeof A.size == "number" ? `${A.size}px` : A.size), n = S(() => typeof A.size == "number" ? `${A.size}px` : A.size), s = S(() => ({ width: o.value, height: n.value }));
function r(c) {
console.error(c), A.defaultSrc && (e.value = A.defaultSrc);
}
return (c, M) => (d(), y("div", {
class: k(l(t)),
style: eA([l(s)])
}, [
l(e) ? (d(), U(LA, {
key: 0,
fit: c.fit,
width: l(o),
height: l(n),
src: l(e),
onError: r
}, null, 8, ["fit", "width", "height", "src"])) : q(c.$slots, "default", { key: 1 })
], 6));
}
});
const ii = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIj4KICA8cmVjdCB4PSIxMSIg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gMC4zMDA0KTtzdHJva2Utb3BhY2l0eToxOyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4KCg==", ci = {
isMuted: {
type: Boolean,
default: !1
},
volume: {
type: Number,
default: 0
}
}, ri = { class: "mic-container" }, ui = { class: "mic-level-container" }, Mi = {
options: {
virtualHost: !0
}
}, di = /* @__PURE__ */ f({
...Mi,
__name: "MicrophoneVolume",
props: ci,
setup(a) {
const A = a, e = S(() => A.isMuted ? si : ii), t = S(() => A.isMuted || !A.volume ? "" : `height: ${A.volume * 4}%`);
return (o, n) => (d(), y("div", ri, [
L("div", ui, [
L("div", {
class: "mic-level",
style: eA(l(t))
}, null, 4)
]),
C(De, { src: l(e) }, null, 8, ["src"])
]));
}
});
const Ya = /* @__PURE__ */ Z(di, [["__scopeId", "data-v-ea062939"]]), QA = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHg9Ii01IiB5PSItNSIgd2lkdGg9IjExMCIgaGVpZ2h0PSIxMTAiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8yOTY0XzE3NTgpIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjQuOTk5OSA3MS41QzI0Ljk5OTkgNjEuMjM1NyAzMi45MzA0IDUyLjgyMzcgNDIuOTk4MyA1Mi4wNTdDNDMuNDkzOSA1Mi4wMTkzIDQzLjk5NDcgNTIgNDQuNDk5OSA1Mkg1Ny40OTk5QzU4LjAwNTEgNTIgNTguNTA1OSA1Mi4wMTkzIDU5LjAwMTQgNTIuMDU3QzY5LjA2OTQ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件 =================
showOverlayStream: {
type: Boolean,
default: !0
},
customClass: {
type: String
},
customStyle: {
type: Object
},
isSmallWindow: {
type: Boolean,
default: !1
},
tip: {
type: String,
default: null
},
// ============== Overlay 基础组件 =================
showOverlay: {
type: Boolean,
default: !0
},
showMask: {
type: Boolean,
default: !0
},
showBackgroundImage: {
type: Boolean,
default: !0
},
blur: {
type: Boolean,
default: !0
},
bgColor: {
type: String
},
bgImage: {
type: String,
default: QA
},
overlayZIndex: {
type: Number
},
customOverlayClass: {
type: String
},
fit: {
type: String
},
// ============== Loading 基础组件 =================
showLoading: {
type: Boolean,
default: !1
},
// ============== Avatar 基础组件 =================
showAvatar: {
type: Boolean,
default: !0
},
avatar: {
type: String,
default: QA
},
// ============== Text(username) 基础组件 =================
showUserName: {
type: Boolean,
default: !0
},
username: {
type: String
},
color: {
type: String,
default: "#FFF"
},
// ============== MicrophoneVolume 业务组件 =================
showMicVolume: {
type: Boolean,
default: !1
},
isMuted: {
type: Boolean,
default: !1
},
volume: {
type: Number,
default: 0
},
// ============== Tip 业务组件 =================
showTip: {
type: Boolean,
default: !0
}
}, Ni = ["error"], gi = { class: "overlay-stream-content-container" }, Ti = { class: "overlay-stream-content" }, pi = { class: "overlay-stream-avatar" }, Di = { class: "overlay-stream-info" }, yi = { class: "overlay-stream-tip" }, Ci = { key: 0 }, Si = {
options: {
virtualHost: !0
}
}, ji = /* @__PURE__ */ f({
...Si,
__name: "OverlayStream",
props: Ii,
emits: Ni,
setup(a, { emit: A }) {
const e = A, t = a, o = p(100), { isFloatWindow: n } = G(BA()), s = V.isPC ? "40px" : "20px";
uA([() => t.isSmallWindow, n], () => {
n.value ? o.value = t.isSmallWindow ? 20 : 40 : o.value = t.isSmallWindow ? 40 : 100;
}, {
immediate: !0
});
const r = S(() => iA([
"overlay-stream-container",
{
pc: V.isPC,
mobile: !V.isPC,
float: n.value
}
])), c = (M) => {
e("error", M);
};
return (M, N) => M.showOverlayStream ? (d(), y("div", {
key: 0,
class: k(l(r)),
style: eA([M.customStyle])
}, [
C(Za, {
show: M.showOverlay,
"show-background-image": M.showBackgroundImage,
"show-mask": M.showMask,
blur: M.blur,
zIndex: M.overlayZIndex,
bgColor: M.bgColor,
bgImage: M.bgImage || l(QA),
fit: M.fit,
defaultSrc: l(QA),
customStyle: { position: "absolute", width: "100%", height: "100%" },
"custom-mask-style": { "backdrop-filter": "blur(12px)", "-webkit-backdrop-filter": "blur(12px)" },
customClass: M.customOverlayClass,
onError: c
}, {
default: E(() => [
L("div", gi, [
L("div", Ti, [
M.showLoading ? (d(), U(zt, {
key: 0,
mode: "dot"
})) : z("", !0),
L("div", pi, [
M.showAvatar ? (d(), U(Fa, {
key: 0,
src: M.avatar || l(QA),
size: l(o)
}, null, 8, ["src", "size"])) : z("", !0)
]),
L("div", Di, [
M.showUserName ? (d(), U(gA, {
key: 0,
truncated: !0,
size: l(s),
color: M.color,
width: "200px",
weight: 500
}, {
default: E(() => [
NA(W(M.username), 1)
]),
_: 1
}, 8, ["size", "color"])) : z("", !0),
M.showMicVolume ? (d(), U(Ya, {
key: 1,
isMuted: M.isMuted,
volume: M.volume
}, null, 8, ["isMuted", "volume"])) : z("", !0)
]),
L("div", yi, [
M.showTip && M.tip ? (d(), y("div", Ci, W(M.tip), 1)) : z("", !0)
])
]),
q(M.$slots, "default", {}, void 0, !0)
])
]),
_: 3
}, 8, ["show", "show-background-image", "show-mask", "blur", "zIndex", "bgColor", "bgImage", "fit", "defaultSrc", "customClass"])
], 6)) : z("", !0);
}
});
const Xa = /* @__PURE__ */ Z(ji, [["__scopeId", "data-v-34807212"]]), hi = { class: "waiting-container" }, Li = {
key: 0,
class: "groupcall-info"
}, Ei = { class: "tip" }, mi = { class: "avatar-group" }, zi = { class: "avatar-item" }, Ui = /* @__PURE__ */ f({
__name: "Waiting",
setup(a) {
const { localUserInfoExcludeVolume: A, remoteUserListExcludeVolume: e } = G(vA()), { callerUserInfo: t } = G(hl()), { isGroupCall: o } = G(rA()), n = fa(), s = S(() => {
var j, m;
return o.value ? t.value.displayUserInfo : (m = (j = e.value) == null ? void 0 : j[0]) == null ? void 0 : m.displayUserInfo;
}), r = S(() => {
var j, m;
return o.value ? t.value.avatar : (m = (j = e.value) == null ? void 0 : j[0]) == null ? void 0 : m.avatar;
}), c = S(() => o.value ? !0 : !A.value.isVideoAvailable), M = S(() => o.value ? v("Invited group call") : null), N = S(() => {
var j, m;
return o.value ? n.value[t.value.userId] || r.value : n.value[(m = (j = e.value) == null ? void 0 : j[0]) == null ? void 0 : m.userId] || r.value;
}), T = p(!1), I = p("fill");
let D = p(!1);
ue(() => {
var j, m, w, H;
if (D.value) {
T.value = o.value ? !0 : !A.value.isVideoAvailable, I.value = "cover";
return;
}
o.value ? (T.value = !n.value[t.value.userId], I.value = n.value[t.value.userId] ? "fill" : "cover") : (T.value = !A.value.isVideoAvailable && !n.value[(m = (j = e.value) == null ? void 0 : j[0]) == null ? void 0 : m.userId], I.value = n.value[(H = (w = e.value) == null ? void 0 : w[0]) == null ? void 0 : H.userId] ? "fill" : "cover");
});
const h = () => {
D.value = !0;
};
return (j, m) => (d(), y("div", hi, [
C(Xa, {
username: l(s),
avatar: l(r),
"bg-image": l(N),
"show-avatar": !l(V).isPC,
"show-loading": !1,
"bg-color": "#22262ed9",
"show-mask": l(T),
"show-background-image": l(c),
tip: l(M),
fit: l(I),
onError: h
}, {
default: E(() => [
!l(V).isPC && l(o) ? (d(), y("div", Li, [
L("div", Ei, [
C(gA, { color: "#FFF" }, {
default: E(() => [
NA(W(l(e).length) + W(l(v)("people in the call")), 1)
]),
_: 1
})
]),
L("div", mi, [
(d(!0), y(RA, null, ce(l(e), (w) => (d(), y("div", zi, [
C(Fa, {
size: "100%",
src: w.avatar || l(QA)
}, null, 8, ["src"])
]))), 256))
])
])) : z("", !0)
]),
_: 1
}, 8, ["username", "avatar", "bg-image", "show-avatar", "show-mask", "show-background-image", "tip", "fit"])
]));
}
});
const qa = /* @__PURE__ */ Z(Ui, [["__scopeId", "data-v-b3565c48"]]), fi = {
bigWindow: {
type: String
},
showSmallWindow: {
type: Boolean,
default: !0
},
smallWindowWidth: {
type: String,
default: "30%"
},
smallWindowHeight: {
type: String,
default: "30%"
}
}, vi = ["toggle"], Ja = "ToggleWindowContextKey", wi = {
options: {
virtualHost: !0
}
}, Oi = /* @__PURE__ */ f({
...wi,
__name: "ToggleWindow",
props: fi,
emits: vi,
setup(a, { emit: A }) {
const e = a, t = A, o = p(e.bigWindow), n = `${Y}-toggle-window`, s = (r) => {
o.value = r, t("toggle", r);
};
return uA(() => e.bigWindow, () => {
o.value = e.bigWindow;
}), OA(Ja, {
bigWindow: o,
toggleWindow: s,
smallWindowWidth: ct(e, "smallWindowWidth"),
smallWindowHeight: ct(e, "smallWindowHeight"),
showSmallWindow: ct(e, "showSmallWindow")
}), (r, c) => (d(), y("div", {
class: k(n)
}, [
q(r.$slots, "default")
]));
}
});
const Vi = {
options: {
virtualHost: !0
}
}, bi = /* @__PURE__ */ f({
...Vi,
__name: "Portal",
props: ["disabled"],
setup(a) {
return (A, e) => {
const t = ea("root-portal");
return d(), U(t, {
enable: !a.disabled
}, {
default: E(() => [
q(A.$slots, "default")
]),
_: 3
}, 8, ["enable"]);
};
}
}), xi = {
name: "teleport",
props: {
to: {
type: String,
required: !0
},
source: {
type: String,
required: !0
},
disabled: {
type: Boolean,
required: !0
}
},
mounted() {
if (this.disabled)
return;
const a = document.querySelector(this.to);
a && a.appendChild(this.$el);
},
watch: {
disabled: {
immediate: !0,
handler() {
var a, A;
this.disabled ? (A = document.querySelector(this.source)) == null || A.appendChild(this.$el) : (a = document.querySelector(this.to)) == null || a.appendChild(this.$el);
}
}
},
destroyed() {
const a = document.querySelector(this.to);
if (a)
try {
a.removeChild(this.$el);
} catch (A) {
console.debug(A);
}
}
};
function ki(a, A, e, t, o, n) {
return d(), y("div", null, [
q(a.$slots, "default")
]);
}
const Ri = /* @__PURE__ */ Z(xi, [["render", ki]]), Bi = {
options: {
virtualHost: !0
}
}, Pi = /* @__PURE__ */ f({
...Bi,
__name: "Portal",
props: ["disabled", "to"],
setup(a) {
return (A, e) => (d(), U(Eo, {
disabled: a.disabled,
to: a.to
}, [
q(A.$slots, "default")
], 8, ["disabled", "to"]));
}
}), Wi = {
disabled: {
type: Boolean,
default: !1
},
to: {
type: String,
default: "body"
},
source: {
type: String,
default: "body"
}
}, Ha = /* @__PURE__ */ f({
__name: "Portal",
props: Wi,
setup(a) {
const { majorVersion: A } = $l();
S(() => A === "3");
const e = S(() => A === "2");
return (t, o) => (d(), y("div", null, [
l(Ct) ? (d(), U(bi, {
key: 0,
disabled: t.disabled
}, {
default: E(() => [
q(t.$slots, "default")
]),
_: 3
}, 8, ["disabled"])) : l(e) ? (d(), U(Ri, {
key: 1,
disabled: t.disabled,
to: t.to,
source: t.source
}, {
default: E(() => [
q(t.$slots, "default")
]),
_: 3
}, 8, ["disabled", "to", "source"])) : (d(), U(Pi, {
key: 2,
disabled: t.disabled,
to: t.to
}, {
default: E(() => [
q(t.$slots, "default")
]),
_: 3
}, 8, ["disabled", "to"]))
]));
}
}), Gi = {
value: {
type: String
}
}, Qi = {
options: {
virtualHost: !0
}
}, Ht = /* @__PURE__ */ f({
...Qi,
__name: "ToggleWindowItem",
props: Gi,
setup(a) {
const A = a, {
bigWindow: e,
toggleWindow: t,
smallWindowWidth: o,
smallWindowHeight: n,
showSmallWindow: s
} = VA(Ja), r = S(() => iA([
`${Y}-toggle-window-item`,
`${Y}-toggle-window-item--${e.value === A.value ? "big" : "small"}`,
{
pc: re,
mobile: !re
}
])), c = S(() => {
let M = {};
return e.value !== A.value && (M = { width: o.value, height: n.value }, s.value ? M.visibility = "" : M.visibility = "hidden"), M;
});
return (M, N) => (d(), y("div", {
class: k(l(r)),
style: eA([l(c)]),
onClick: N[0] || (N[0] = () => l(t)(M.value))
}, [
q(M.$slots, "default")
], 6));
}
});
const Ut = {
nickName: {
type: String,
default: ""
},
isSelf: {
type: Boolean,
default: !1
},
isMuted: {
type: Boolean,
default: !1
},
volume: {
type: Number,
default: 0
},
showNickName: {
type: Boolean,
default: !1
},
showSwitchCameraButton: {
type: Boolean,
default: !1
},
showVirtualBackgroundButton: {
type: Boolean,
default: !1
},
showNetWorkStatus: {
type: Boolean,
default: !1
}
}, Ka = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMV8xOSkiPgo8ZWxsaXBzZSBjeD0iMjEuNjE2IiBjeT0iMjEuNTE3IiByeD0iMTkuNjE2IiByeT0iMTkuNTE3IiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxyZWN0IHg9IjciIHk9IjgiIHdpZHRoPSIyOSIgaGVpZ2h0PSIyOSIgZmlsbD0idXJsKCNwYXR0ZXJuMF8xXzE5KSIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzFfMTkiIHg9IjAiIHk9IjAiIHdpZHRoPSI0My4yMzIiIGhlaWdodD0iNDMuMDM0IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVPZmZzZXQvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2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tbWtuOXZlcE9sZUZBcG1uS3pxVlM0Q3NhMFRF
options: {
virtualHost: !0
}
}, qi = /* @__PURE__ */ f({
...Xi,
__name: "StreamInfoPC",
props: Ut,
setup(a) {
return (A, e) => (d(), U(ne, null, {
default: E(() => [
C(yA, {
span: 12,
justify: "start",
align: "center"
}, {
default: E(() => [
L("div", Zi, [
C(Ya, {
class: "mic-volume",
"is-muted": A.isMuted,
volume: A.volume
}, null, 8, ["is-muted", "volume"]),
L("div", Fi, [
C(gA, {
color: "#fff",
truncated: !0,
width: "80px",
size: "14px"
}, {
default: E(() => [
NA(W(A.nickName), 1)
]),
_: 1
}),
sA(C(gA, {
color: "#fff",
size: "14px"
}, {
default: E(() => [
NA(W(l(v)("me")), 1)
]),
_: 1
}, 512), [
[cA, A.isSelf]
])
])
])
]),
_: 1
}),
C(yA, {
span: 12,
justify: "center"
}, {
default: E(() => [
A.showNetWorkStatus ? (d(), y("div", Yi, [
C(LA, {
width: "24px",
height: "24px",
src: l(Ka)
}, null, 8, ["src"])
])) : z("", !0)
]),
_: 1
})
]),
_: 1
}));
}
});
const Ji = /* @__PURE__ */ Z(qi, [["__scopeId", "data-v-4a815645"]]), Hi = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xMjRfNjQ3KSI+CjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQiIHI9IjEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTUuODEyMiAyMi41MzgyQzE1LjgxMjIgMjIuNTM4MiAxNS44MTIzIDIyLjUzODEgMTUuODEyMyAyMi41MzgxQzIwLjU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wxNy4zMzMzIDExLjU4ODZWMTQuMzMzNEMxNy4zMzMzIDE2LjE3NDQgMTUuODQwOSAxNy42NjY3IDE0IDE3LjY2NjdDMTMuNDgzOSAxNy42NjY3IDEyLjk5NTIgMTcuNTQ5NSAxMi41NTkxIDE3LjM0MDFaIiBmaWxsPSIjRTYzOTVDIi8+CjxwYXRoIGQ9Ik05LjQyMzQgMTguODQ0N0wxNy43ODM0IDguNzc4MjciIHN0cm9rZT0iI0U2Mzk1QyIgc3Ryb2tlLXdpZHRoPSIxLjA2NjY3IiBzdHJva2UtbGluZWNhcD0ic3F1YXJlIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMTc0MV8xMDY3OCIgeD0iMCIgeT0iMCIgd2lkdGg9IjI4IiBoZWlnaHQ9IjI4IiBmaW
options: {
virtualHost: !0
}
}, As = /* @__PURE__ */ f({
...$i,
__name: "StreamInfoMobile",
props: Ut,
setup(a) {
const { enableVirtualBackground: A } = G(rA()), e = async () => {
await Q.switchCamera();
}, t = async () => {
await Q.setBlurBackground(!A.value);
};
return (o, n) => (d(), U(ne, { "custom-style": { padding: "2px 5px" } }, {
default: E(() => [
C(yA, {
span: 12,
justify: "start",
align: "center"
}, {
default: E(() => [
o.showNickName ? (d(), U(gA, {
key: 0,
width: "100px",
truncated: !0,
color: "#FFF"
}, {
default: E(() => [
NA(W(o.nickName), 1)
]),
_: 1
})) : z("", !0),
sA(L("div", null, [
C(De, {
size: 24,
src: l(Hi)
}, null, 8, ["src"])
], 512), [
[cA, !o.isMuted && o.volume]
]),
sA(L("div", null, [
C(De, {
size: 24,
src: l(Ki)
}, null, 8, ["src"])
], 512), [
[cA, o.isMuted]
])
]),
_: 1
}),
C(yA, {
span: 12,
justify: "end",
align: "center"
}, {
default: E(() => [
o.showNetWorkStatus ? (d(), y("div", _i, [
C(LA, {
width: "24px",
height: "24px",
src: l(Ka)
}, null, 8, ["src"])
])) : z("", !0),
o.showSwitchCameraButton ? (d(), y("div", {
key: 1,
class: "switch-camera stream-icon",
onClick: pe(e, ["stop"])
}, [
C(LA, {
width: "15px",
height: "15px",
src: l(JA)
}, null, 8, ["src"])
])) : z("", !0),
o.showVirtualBackgroundButton ? (d(), y("div", {
key: 2,
class: "stream-icon",
onClick: pe(t, ["stop"])
}, [
C(LA, {
width: "15px",
height: "15px",
src: l(KA)
}, null, 8, ["src"])
])) : z("", !0)
]),
_: 1
})
]),
_: 1
}));
}
});
const es = /* @__PURE__ */ Z(As, [["__scopeId", "data-v-04a5fe7d"]]), ts = {
options: {
virtualHost: !0
}
}, $e = /* @__PURE__ */ f({
...ts,
__name: "TKStreamInfo",
props: Ut,
setup(a) {
const { isGroupCall: A } = rA(), e = V.isPC;
return (t, o) => (d(), y("div", null, [
l(e) ? (d(), U(Ji, {
key: 0,
nickName: t.nickName,
isSelf: t.isSelf,
isMuted: t.isMuted,
volume: t.volume,
showNetWorkStatus: t.showNetWorkStatus
}, null, 8, ["nickName", "isSelf", "isMuted", "volume", "showNetWorkStatus"])) : z("", !0),
l(A) && !l(e) ? (d(), U(es, {
key: 1,
showSwitchCameraButton: t.showSwitchCameraButton,
showVirtualBackgroundButton: t.showVirtualBackgroundButton,
showNetWorkStatus: t.showNetWorkStatus,
nickName: t.nickName,
showNickName: t.showNickName,
isSelf: t.isSelf,
isMuted: t.isMuted,
volume: t.volume
}, null, 8, ["showSwitchCameraButton", "showVirtualBackgroundButton", "showNetWorkStatus", "nickName", "showNickName", "isSelf", "isMuted", "volume"])) : z("", !0)
]));
}
}), as = {
show: {
type: Boolean,
default: !0
},
domId: {
type: String
},
loading: {
type: Boolean
},
showStreamInfo: {
type: Boolean
},
showAudioStream: {
type: Boolean
}
}, os = ["id"], ls = { class: "audio-stream-container" }, ns = {
options: {
virtualHost: !0
}
}, is = /* @__PURE__ */ f({
...ns,
__name: "Pusher",
props: as,
setup(a) {
const A = p(g.getData(u.CALL, i.PUSHER_ID)), e = iA([
"stream-info-container",
{ mobile: !V.isPC }
]), t = (n) => {
A.value = n;
}, o = {
[i.PUSHER_ID]: t
};
return CA(() => {
g.watch(u.CALL, o, { notifyRangeWhenWatch: i.MYSELF });
}), DA(() => {
g.unwatch(u.CALL, o);
}), (n, s) => sA((d(), y("div", {
id: n.domId,
class: "pusher-container"
}, [
sA(L("div", ls, [
q(n.$slots, "audio-stream", {}, void 0, !0)
], 512), [
[cA, n.showAudioStream]
]),
q(n.$slots, "loading", {}, void 0, !0),
L("div", {
class: k(l(e))
}, [
q(n.$slots, "stream-info", {}, void 0, !0)
], 2)
], 8, os)), [
[cA, n.show]
]);
}
});
const _a = /* @__PURE__ */ Z(is, [["__scopeId", "data-v-8cf5d7b3"]]), ss = {
options: {
virtualHost: !0
}
}, cs = /* @__PURE__ */ f({
...ss,
__name: "weChatPlayer",
props: {
remoteClass: {
type: String,
required: !0
},
domId: {
type: String
}
},
setup(a) {
const A = p(g.getData(u.CALL, i.PLAYER)), e = p(g.getData(u.CALL, i.CALL_STATUS)), t = p(g.getData(u.CALL, i.IS_EAR_PHONE) ? je.EAR : je.SPEAKER), o = a, n = (h) => {
A.value = JSON.parse(JSON.stringify(h));
}, s = S(() => {
var h;
return (h = A.value) == null ? void 0 : h.find((j) => (j == null ? void 0 : j.userID) === o.domId);
}), r = (h) => {
e.value = h;
}, c = (h) => {
t.value = h ? je.EAR : je.SPEAKER;
}, M = {
[i.PLAYER]: n,
[i.CALL_STATUS]: r,
[i.IS_EAR_PHONE]: c
};
CA(() => {
g.watch(u.CALL, M, { notifyRangeWhenWatch: i.MYSELF });
}), DA(() => {
g.unwatch(u.CALL, M);
});
function N(h) {
Q._tuiCallEngine._playerStateChange(h);
}
function T(h) {
}
function I(h) {
Q._tuiCallEngine._playNetStatus(h);
}
function D(h) {
Q._tuiCallEngine._playerAudioVolumeNotify(h);
}
return (h, j) => {
const m = ea("live-player");
return d(), y("div", {
class: k(a.remoteClass)
}, [
l(s) && (l(s).hasAudio || l(s).hasVideo) ? (d(), U(m, {
key: 0,
class: "stream",
id: l(s).id,
"data-userid": l(s).userID,
"data-streamid": l(s).streamID,
"data-streamtype": l(s).streamType,
src: l(s).src,
mode: "RTC",
autoplay: l(s).autoplay,
"mute-audio": l(s).muteAudio,
"mute-video": l(s).muteVideo,
orientation: l(s).orientation,
"object-fit": l(s).objectFit,
"background-mute": l(s).enableBackgroundMute,
"min-cache": l(s).minCache,
"max-cache": l(s).maxCache,
"sound-mode": l(t),
"enable-recv-message": l(s).enableRecvMessage,
"auto-pause-if-navigate": l(s).autoPauseIfNavigate,
"auto-pause-if-open-native": l(s).autoPauseIfOpenNative,
onStatechange: N,
onFullscreenchange: T,
onNetstatus: I,
onAudiovolumenotify: D
}, null, 8, ["id", "data-userid", "data-streamid", "data-streamtype", "src", "autoplay", "mute-audio", "mute-video", "orientation", "object-fit", "background-mute", "min-cache", "max-cache", "sound-mode", "enable-recv-message", "auto-pause-if-navigate", "auto-pause-if-open-native"])) : z("", !0)
], 2);
};
}
});
const rs = /* @__PURE__ */ Z(cs, [["__scopeId", "data-v-b0aae39e"]]), us = {
show: {
type: Boolean,
default: !0
},
domId: {
type: String
},
loading: {
type: Boolean
},
showStreamInfo: {
type: Boolean
},
showAudioStream: {
type: Boolean
}
}, Ms = ["id"], ds = { class: "audio-stream-container" }, Is = {
options: {
virtualHost: !0
}
}, Ns = /* @__PURE__ */ f({
...Is,
__name: "Player",
props: us,
setup(a) {
const A = iA([
"stream-info-container",
{ mobile: !V.isPC }
]);
return (e, t) => sA((d(), y("div", {
id: e.domId,
class: "player-container"
}, [
sA(L("div", ds, [
q(e.$slots, "audio-stream", {}, void 0, !0)
], 512), [
[cA, e.showAudioStream]
]),
q(e.$slots, "loading", {}, void 0, !0),
L("div", {
class: k(l(A))
}, [
q(e.$slots, "stream-info", {}, void 0, !0)
], 2),
l(V).isWeChat ? (d(), U(rs, {
key: 0,
"dom-id": e.domId,
remoteClass: "small-view"
}, null, 8, ["dom-id"])) : z("", !0)
], 8, Ms)), [
[cA, e.show]
]);
}
});
const $a = /* @__PURE__ */ Z(Ns, [["__scopeId", "data-v-8e509e0d"]]), gs = {
avatar: {
type: String
},
username: {
type: String
},
isVideoAvailable: {
type: Boolean
},
showStreamInfo: {
type: Boolean
},
isSmallWindow: {
type: Boolean,
default: !1
},
isMuted: {
type: Boolean,
default: !0
},
volume: {
type: Number,
default: 0
},
userId: {
type: String
}
}, Ts = {
options: {
virtualHost: !0
}
}, At = /* @__PURE__ */ f({
...Ts,
__name: "AudioStream",
props: gs,
setup(a) {
const A = a, e = fa(), { callType: t, isGroupCall: o } = G(rA()), { isFloatWindow: n } = G(BA()), s = S(() => !o.value && !V.isPC), r = S(() => o.value ? V.isPC : t.value === _.AUDIO), c = S(() => !o.value && V.isPC && t.value === _.AUDIO), M = S(() => ({ zIndex: 1 })), N = S(() => e.value[A.userId] || A.avatar), T = p(!e.value[A.userId]), I = p(e.value[A.userId] ? "fill" : "cover");
uA([() => A.userId, e], () => {
e.value[A.userId] ? (I.value = "fill", T.value = !1) : (I.value = "cover", T.value = !0);
}, {
immediate: !0
});
const D = () => {
T.value = !0, I.value = "cover";
};
return (h, j) => (d(), U(Xa, {
avatar: h.avatar,
"bg-image": l(N),
"show-avatar": l(s),
username: h.username,
"show-user-name": l(r),
"show-mask": !l(o) && l(T),
fit: l(I),
blur: !l(o),
"show-mic-volume": l(c),
"show-tip": !l(o) && !l(n),
"custom-style": l(M),
"is-small-window": h.isSmallWindow,
"is-muted": h.isMuted,
volume: h.volume,
"bg-color": "rgba(0, 0, 0, 0.5)",
onError: D
}, null, 8, ["avatar", "bg-image", "show-avatar", "username", "show-user-name", "show-mask", "fit", "blur", "show-mic-volume", "show-tip", "custom-style", "is-small-window", "is-muted", "volume"]));
}
}), ps = "data:image/svg+xml;base64,IDxzdmcgd2lkdGg9IjI2IiBoZWlnaHQ9IjI2IiB2aWV3Qm94PSIwIDAgMjYgMjYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi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1M0w1LjUwNzk4IDE2LjcxNTlDNi4yOTIyNSAxNy4wMTM2IDcuMTM1MzIgMTcuMTgxOCA4LjAwMDAxIDE3LjE4MThDMTEuNjk3NiAxNy4xODE4IDE1IDE0LjEwNjQgMTUgMTAuOTcxN1Y5LjgzNTcyTDE0Ljk5MzIgOS43MzMwOUMxNC45MzkyIDkuMzI5NjYgMTQuNTcxMSA5LjAxNzU0IDE0LjEyNSA5LjAxNzU0QzEzLjY0MTggOS4wMTc1NCAxMy4yNSA5LjM4Mzg1IDEzLjI1IDkuODM1NzJWMTAuOTcxN0wxMy4yNDQ1IDExLjE1MjdDMTMuMTEzOCAxMy4zMjYyIDEwLjY1ODkgMTUuNTQ1NSA4LjAwMDAxIDE1LjU0NTVDNy41MjQyNCAxNS41NDU1IDcuMDU1MDEgMTUuNDc0NCA2LjYwNDQ1IDE1LjM0NTNaTTUuMzc1MDEgMTguODYzN0M0Ljg5MjAxIDE4Ljg2MzcgNC41MDAwMSAxOS4yMjk0IDQuNTAwMDEgMTkuNjgxOUM0LjUwMDAxIDIwLjEzNDMgNC44OTIwMSAyMC41IDUuMzc1MDEgMjAuNUgxMC42MjVDMTEuMTA4OSAyMC41IDExLjUgMjAuMTM0MyAxMS41IDE5LjY4MTlDMTEuNSAxOS4yMjk0IDExLjEwODkgMTguODYzNyAxMC42MjUgMTguODYzN0g1LjM3NTAxWiIgZmlsbD0iIzEwMTQxOSIvPgo8L3N2Zz4=", Cs = "data:ima
options: {
virtualHost: !0
}
}, ws = /* @__PURE__ */ f({
...vs,
__name: "FloatWindow",
setup(a) {
const { localUserInfoExcludeVolume: A } = G(vA()), { callRole: e, callStatus: t } = G(rA()), { isFloatWindow: o } = G(BA());
function n() {
Q.toggleMinimize();
}
async function s() {
e.value === IA.CALLEE && t.value === P.CALLING ? await Q.reject() : await Q.hangup();
}
async function r() {
A.value.isAudioAvailable ? await Q.closeMicrophone() : await Q.openMicrophone();
}
return (c, M) => (d(), y("div", Ss, [
sA(L("div", js, [
L("div", hs, [
L("div", {
class: "float-control-item-icon-container",
onClick: s
}, [
L("img", { src: l(ps) }, null, 8, Ls)
])
]),
sA(L("div", Es, [
L("div", {
class: "float-control-item-icon-container",
onClick: r
}, [
l(A).isAudioAvailable ? (d(), y("img", {
key: 0,
src: l(Ds)
}, null, 8, ms)) : (d(), y("img", {
key: 1,
src: l(ys)
}, null, 8, zs))
])
], 512), [
[cA, l(o)]
]),
sA(L("div", Us, [
L("div", {
class: "float-control-item-icon-container",
onClick: n
}, [
L("img", { src: l(Cs) }, null, 8, fs)
])
], 512), [
[cA, l(o)]
])
], 512), [
[cA, l(o)]
]),
sA(L("div", null, [
q(c.$slots, "default", {}, void 0, !0)
], 512), [
[cA, !l(o)]
])
]));
}
});
const Os = /* @__PURE__ */ Z(ws, [["__scopeId", "data-v-63373c5d"]]), Ao = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNzYwOTYxIDkuMzMxNTRDMC4wMDEyMzUwNyA3LjEzMzcxIDAuOTYyOTY4IDQuNzczMjMgMi44MzM0NSAzLjM5MDk3QzQuMjUxNTIgMi4zNDMwNCA1LjY3NjAzIDEuMjg0NyA2LjQ4ODg5IDAuNjgwMTI0QzYuODc1MTUgMC4zOTI4MzcgNy40MTY2MSAwLjQ1NTY4IDcuNzI4NDEgMC44MjIzOTdMMTIuMTU4IDYuMDMyMTRDMTIuNDQ3NiA2LjM3Mjc1IDEyLjQ0NzcgNi44NzI5NSAxMi4xNTgzIDcuMjEzNzNMOS40NDIyIDEwLjQxMTlDOS4xOTQ5NiAxMC43MDMxIDkuMTUzNzggMTEuMTE4MyA5LjM0OTI1IDExLjQ0NjVDMTAuMjI5MyAxMi45MjM4IDExLjE5NSAxNC4xODkxIDEyLjUgMTUuNDkzOEMxMy44MTI3IDE2LjgwNiAxNS4wNzc4IDE3Ljc1MjkgMTYuNTYzNSAxOC42MzA4QzE2Ljg5MTkgMTguODI0OCAxNy4zMDY1IDE4Ljc4MzYgMTcuNTk3NCAxOC41MzY4TDIwLjc4MjYgMTUuODM1MUMyMS4xMjM0IDE1LjU0NTkgMjEuNjIzNyAxNS41NDYxIDIxLjk2NDMgMTUuODM1NkwyNy4xNzgzIDIwLjI2NjJDMjcuNTQ0MSAyMC41NzcgMjcuNjA2NiAyMS4xMTc5IDI3LjMyMTMgMjEuNTAzOEwyNC41OTM3IDI1LjE5MzZDMjMuMjIyNSAyNy4wNDg2IDIwLjg4MDQgMjcuOTkxOSAxOC42OTg3IDI3LjI0MTNDMTQuNjY1OCAyNS44NTM4IDEwLjg3ODEgMjMuNTUxMSA3LjY1OTIyIDIwLjMzMzFDNC40NDk1NyAxNy4xMjQ0IDIuMTUwMTUgMTMuMzUwMyAwLjc2MDk2MSA5LjMzMTU0WiIgZmlsbD0iIzEyQjk2OSIvPgo8L3N2Zz4K", Vs = { class: "float-window-tip-container" }, bs = {
options: {
virtualHost: !0
}
}, xs = /* @__PURE__ */ f({
...bs,
__name: "FloatWindowSingleCall",
setup(a) {
const { callType: A, callStatus: e } = G(rA()), { isFloatWindow: t } = G(BA()), { callDuration: o } = mt(), n = S(() => iA([
"float-window-container",
{
"singlecall-video-float": A.value === _.VIDEO && t.value,
"singlecall-audio-float": A.value === _.AUDIO && t.value
}
]));
function s() {
t.value && Q.toggleMinimize();
}
return (r, c) => (d(), y("div", {
class: k(l(n))
}, [
sA(L("div", {
class: "singlecall-video-float-content",
onClick: s
}, [
q(r.$slots, "default", {}, void 0, !0),
L("div", Vs, [
l(e) === l(P).CALLING && l(t) ? (d(), U(gA, {
key: 0,
color: "#FFF",
size: "12px"
}, {
default: E(() => [
NA(W(l(v)("wait to be called")), 1)
]),
_: 1
})) : z("", !0)
])
], 512), [
[cA, !(l(t) && l(A) === l(_).AUDIO)]
]),
sA(L("div", {
class: "singlecall-audio-float-content",
onClick: s
}, [
C(LA, {
width: "36px",
height: "36px",
src: l(Ao)
}, null, 8, ["src"]),
l(e) === l(P).CONNECTED ? (d(), U(_e, {
key: 0,
fontSize: "12px",
callDuration: l(o),
color: "#12b969"
}, null, 8, ["callDuration"])) : z("", !0),
l(e) === l(P).CALLING && l(t) ? (d(), U(gA, {
key: 1,
color: "#12b969",
size: "12px"
}, {
default: E(() => [
NA(W(l(v)("wait to be called")), 1)
]),
_: 1
})) : z("", !0)
], 512), [
[cA, l(t) && l(A) === l(_).AUDIO]
])
], 2));
}
});
const ks = /* @__PURE__ */ Z(xs, [["__scopeId", "data-v-381004f2"]]), Rs = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xLjkxNjUgNy41NjkzN1Y2LjgzODg3SDMuNDE2NVY3LjU2OTM3QzMuNDE2NSAxMC4xMDA3IDUuNDY4NTMgMTIuMTUyNyA3Ljk5OTg0IDEyLjE1MjdDMTAuNTMxMSAxMi4xNTI3IDEyLjU4MzIgMTAuMTAwNyAxMi41ODMyIDcuNTY5MzZWNi44Mzg4N0gxNC4wODMyVjcuNTY5MzZDMTQuMDgzMiAxMC42NzUxIDExLjc1NTcgMTMuMjM3MyA4Ljc0OTg4IDEzLjYwNjlWMTQuOTA4OUg3LjI0OTg4VjEzLjYwNjlDNC4yNDM5OCAxMy4yMzc0IDEuOTE2NSAxMC42NzUyIDEuOTE2NSA3LjU2OTM3WiIgZmlsbD0iIzEyQjk2OSIvPgo8cmVjdCB4PSI0LjY2Njc1IiB5PSIxLjA5MDgyIiB3aWR0aD0iNi42NjY2NyIgaGVpZ2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jciIGhlaWdodD0iMjYuMjEyNiIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVH
options: {
virtualHost: !0
}
}, Xs = /* @__PURE__ */ f({
...Ys,
__name: "FloatWindowGroupCall",
setup(a) {
const { isFloatWindow: A } = G(BA()), { callDuration: e } = mt(), { localUserInfoExcludeVolume: t } = G(vA()), { callStatus: o } = G(rA()), n = S(() => t.value.isAudioAvailable ? Rs : Ps), s = S(() => t.value.isVideoAvailable ? Bs : Ws), r = S(() => iA([
"groupcall-video-float",
{
"not-float": !A.value,
float: A.value
}
]));
function c() {
A.value && Q.toggleMinimize();
}
return (M, N) => (d(), y("div", {
class: k(l(r))
}, [
l(A) ? (d(), y("div", {
key: 0,
class: "click-container",
onClickCapture: pe(c, ["stop"])
}, null, 32)) : z("", !0),
L("div", Gs, [
L("div", Qs, [
q(M.$slots, "default", {}, void 0, !0)
]),
sA(L("div", Zs, [
C(LA, {
width: "36px",
height: "36px",
src: l(Ao)
}, null, 8, ["src"]),
l(o) === l(P).CONNECTED ? (d(), U(_e, {
key: 0,
fontSize: "12px",
callDuration: l(e),
color: "#12b969"
}, null, 8, ["callDuration"])) : z("", !0),
l(o) === l(P).CALLING ? (d(), U(gA, {
key: 1,
size: "12px",
color: "#12b969"
}, {
default: E(() => [
NA(W(l(v)("wait to be called")), 1)
]),
_: 1
})) : z("", !0)
], 512), [
[cA, l(A)]
])
]),
sA(L("div", Fs, [
C(LA, {
width: "16px",
height: "16px",
src: l(n)
}, null, 8, ["src"]),
C(LA, {
width: "16px",
height: "16px",
src: l(s)
}, null, 8, ["src"])
], 512), [
[cA, l(A)]
])
], 2));
}
});
const qs = /* @__PURE__ */ Z(Xs, [["__scopeId", "data-v-00e5113e"]]), Js = { id: "float-window-id" }, Hs = {
options: {
virtualHost: !0
}
}, Ks = /* @__PURE__ */ f({
...Hs,
__name: "FloatWindow",
setup(a) {
const { isGroupCall: A } = G(rA());
return (e, t) => (d(), y("div", Js, [
l(A) ? (d(), U(qs, { key: 1 }, {
default: E(() => [
q(e.$slots, "default")
]),
_: 3
})) : (d(), U(ks, { key: 0 }, {
default: E(() => [
q(e.$slots, "default")
]),
_: 3
}))
]));
}
}), _s = {
options: {
virtualHost: !0
}
}, $s = /* @__PURE__ */ f({
..._s,
__name: "FloatWindow",
setup(a) {
const { isFloatWindow: A } = G(BA()), e = S(() => iA([
"float-window-container",
{
float: A.value,
"not-float": !A.value,
pc: V.isPC,
mobile: !V.isPC
}
]));
return (t, o) => (d(), y("div", {
class: k(l(e))
}, [
l(V).isPC ? (d(), U(Os, { key: 0 }, {
default: E(() => [
q(t.$slots, "default", {}, void 0, !0)
]),
_: 3
})) : z("", !0),
l(V).isPC ? z("", !0) : (d(), U(Ks, { key: 1 }, {
default: E(() => [
q(t.$slots, "default", {}, void 0, !0)
]),
_: 3
}))
], 2));
}
});
const eo = /* @__PURE__ */ Z($s, [["__scopeId", "data-v-794f0a9b"]]);
function Ac() {
const a = be(), { callStatus: A } = G(rA()), e = p(GA.LOCAL), { remoteUserListExcludeVolume: t } = G(vA());
return uA([t, a, A], () => {
var s, r, c, M;
if (A.value === P.CALLING)
return;
const o = [Xe.RemoteInLargeView, Xe.LocalInLargeView], n = (s = a.value) == null ? void 0 : s.layoutMode;
if (o.includes(n)) {
e.value = (r = a.value) == null ? void 0 : r.layoutMode;
return;
}
(M = (c = t.value) == null ? void 0 : c[0]) != null && M.isEnter && (e.value = GA.REMOTE);
}, {
immediate: !0
}), e;
}
const ec = {
options: {
virtualHost: !0
}
}, tc = /* @__PURE__ */ f({
...ec,
__name: "MediaContainer",
setup(a) {
const A = Ac(), e = p(!0), { isFloatWindow: t } = G(BA()), { localUserInfoExcludeVolume: o, remoteUserListExcludeVolume: n } = G(vA()), s = Ea(), { callType: r, callStatus: c } = G(rA()), M = ma(), N = S(
() => {
var j, m, w, H;
return V.isWeChat ? (m = (j = M.value) == null ? void 0 : j.find((b) => {
var x, B;
return (b == null ? void 0 : b.userID) === ((B = (x = n.value) == null ? void 0 : x[0]) == null ? void 0 : B.userId);
})) == null ? void 0 : m.hasVideo : (H = (w = n.value) == null ? void 0 : w[0]) == null ? void 0 : H.isVideoAvailable;
}
), T = S(() => {
var j, m;
return (m = (j = n.value) == null ? void 0 : j[0]) == null ? void 0 : m.domId;
}), I = S(() => {
var j, m, w;
return (w = s.value) == null ? void 0 : w[(m = (j = n.value) == null ? void 0 : j[0]) == null ? void 0 : m.domId];
});
uA([r, c], () => {
r.value === _.AUDIO || c.value === P.CALLING ? e.value = !1 : e.value = !0;
}, {
immediate: !0
});
const D = S(() => iA([
"singlecall-media-container",
{
mobile: !V.isPC,
pc: V.isPC,
float: t.value
}
]));
function h(j) {
A.value = j;
}
return (j, m) => (d(), U(Ha, {
id: "source",
disabled: !l(t),
source: "#source",
to: "body"
}, {
default: E(() => [
C(eo, null, {
default: E(() => [
L("div", {
class: k(l(D))
}, [
C(Oi, {
"big-window": l(A),
"show-small-window": l(e),
onToggle: h
}, {
default: E(() => [
(d(), U(Ht, {
value: l(GA).LOCAL,
key: l(GA).LOCAL
}, {
default: E(() => [
C(_a, {
domId: l(o).domId,
"show-audio-stream": !l(o).isVideoAvailable
}, {
"audio-stream": E(() => [
C(At, {
userId: l(o).userId,
username: l(o).displayUserInfo,
avatar: l(o).avatar,
"is-video-available": l(o).isVideoAvailable,
"is-small-window": l(A) !== l(GA).LOCAL,
"is-muted": !l(o).isAudioAvailable,
volume: l(s) && l(s)[l(o).domId]
}, null, 8, ["userId", "username", "avatar", "is-video-available", "is-small-window", "is-muted", "volume"])
]),
"stream-info": E(() => [
l(r) === l(_).VIDEO ? (d(), U($e, {
key: 0,
"nick-name": l(o).displayUserInfo,
"is-self": !0,
"is-muted": !l(o).isAudioAvailable,
volume: l(s) && l(s)[l(o).domId]
}, null, 8, ["nick-name", "is-muted", "volume"])) : z("", !0)
]),
_: 1
}, 8, ["domId", "show-audio-stream"])
]),
_: 1
}, 8, ["value"])),
(d(), U(Ht, {
value: l(GA).REMOTE,
key: l(GA).REMOTE
}, {
default: E(() => [
C($a, {
"dom-id": l(T),
"show-audio-stream": !l(N)
}, {
"audio-stream": E(() => [
C(At, {
userId: l(n)[0] && l(n)[0].userId,
username: l(n)[0] && l(n)[0].displayUserInfo,
avatar: l(n)[0] && l(n)[0].avatar,
"is-video-available": l(N),
"is-small-window": l(A) !== l(GA).REMOTE,
"is-muted": l(n)[0] && !l(n)[0].isAudioAvailable,
volume: l(I)
}, null, 8, ["userId", "username", "avatar", "is-video-available", "is-small-window", "is-muted", "volume"])
]),
"stream-info": E(() => [
l(r) === l(_).VIDEO ? (d(), U($e, {
key: 0,
"nick-name": l(n)[0] && l(n)[0].displayUserInfo,
"is-muted": l(n)[0] && !l(n)[0].isAudioAvailable,
volume: l(I)
}, null, 8, ["nick-name", "is-muted", "volume"])) : z("", !0)
]),
_: 1
}, 8, ["dom-id", "show-audio-stream"])
]),
_: 1
}, 8, ["value"]))
]),
_: 1
}, 8, ["big-window", "show-small-window"])
], 2)
]),
_: 1
})
]),
_: 1
}, 8, ["disabled"]));
}
});
const ac = /* @__PURE__ */ Z(tc, [["__scopeId", "data-v-670a78d8"]]), oc = [ze.SUCCESS, ze.INFO, ze.WARNING, ze.ERROR], Ne = {
isShow: {
type: Boolean,
default: !1
},
message: {
type: String,
default: ""
},
type: {
type: String,
values: oc,
default: ze.INFO
},
duration: {
type: Number,
default: 3e3
},
offset: {
type: Number,
default: 16
},
showClose: {
type: Boolean,
default: !1
},
showIcon: {
type: Boolean,
default: !0
},
customClass: {
type: String
},
customStyle: {
type: Object
}
}, lc = {
onClose: null
};
function nc(a, A) {
const e = p((a == null ? void 0 : a.message) || Ne.message.default), t = p((a == null ? void 0 : a.duration) || Ne.duration.default), o = p((a == null ? void 0 : a.type) || Ne.type.default), n = p((a == null ? void 0 : a.offset) || Ne.offset.default), s = p((a == null ? void 0 : a.showClose) || Ne.showClose.default), r = p(!1);
let c = -1;
const M = (I) => {
c > -1 && (clearTimeout(c), c = -1), r.value = !0, T(I || {}), t.value && (c = setTimeout(() => {
N();
}, t.value));
}, N = () => {
r.value = !1, c > -1 && (clearTimeout(c), c = -1);
}, T = (I) => {
const {
message: D = e.value,
type: h = o.value,
offset: j = n.value,
duration: m = t.value,
showClose: w = s.value
} = I;
t.value = (a == null ? void 0 : a.duration) === 0 ? a == null ? void 0 : a.duration : m, e.value = D, o.value = h, n.value = j, s.value = w;
};
return uA(
() => a == null ? void 0 : a.isShow,
(I) => {
I && M();
},
{ immediate: !0 }
), uA(r, (I) => {
I || A("onClose");
}), {
messageContent: e,
messageDuration: t,
messageType: o,
messageOffset: n,
isShowCloseIcon: s,
visible: r,
show: M,
close: N
};
}
const ic = "data:image/svg+xml;base64,PHN2ZyB0PSIxNzAwMTIzMzQ5NzM4IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjYzMDAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTUxMiA5Ny41MjM4MWMyMjguOTEyNzYyIDAgNDE0LjQ3NjE5IDE4NS41NjM0MjkgNDE0LjQ3NjE5IDQxNC40NzYxOXMtMTg1LjU2MzQyOSA0MTQuNDc2MTktNDE0LjQ3NjE5IDQxNC40NzYxOVM5Ny41MjM4MSA3NDAuOTEyNzYyIDk3LjUyMzgxIDUxMiAyODMuMDg3MjM4IDk3LjUyMzgxIDUxMiA5Ny41MjM4MXogbTEyOS4yOTIxOSAyMzMuNDQ3NjE5bC0xMjkuMjY3ODA5IDEyOS4yOTIxOS0xMjkuMzE2NTcxLTEyOS4yOTIxOS01MS43MzYzODEgNTEuN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to = /* @__PURE__ */ f({
...Mc,
__name: "Message",
props: Ne,
emits: lc,
setup(a, { expose: A, emit: e }) {
const t = a, o = e, { messageContent: n, messageType: s, messageOffset: r, isShowCloseIcon: c, visible: M, show: N, close: T } = nc(t, o), I = S(() => iA([
`${Y}-message`,
`${Y}-message--${s.value}`,
t.customClass
])), D = S(() => iA([`${Y}-message_icon`])), h = S(() => iA([`${Y}-message_close`])), j = S(() => `${r.value}px`), m = S(() => ({ top: j.value, ...t.customStyle })), w = {
info: rc,
waring: cc,
success: sc,
error: ic
};
return A({
show: N,
close: T
}), (H, b) => l(M) ? (d(), y("div", {
key: 0,
class: k(l(I)),
style: eA([l(m)])
}, [
sA(L("div", {
class: k(l(D))
}, [
C(De, {
src: w[l(s)]
}, null, 8, ["src"])
], 2), [
[cA, H.showIcon]
]),
L("span", null, W(l(n)), 1),
sA(L("div", {
class: k(l(h)),
onClick: b[0] || (b[0] = //@ts-ignore
(...x) => l(T) && l(T)(...x))
}, [
C(De, { src: l(uc) }, null, 8, ["src"])
], 2), [
[cA, l(c)]
])
], 6)) : z("", !0);
}
});
const dc = {
customClass: {
type: String
}
}, Ic = {
options: {
virtualHost: !0,
styleIsolation: "shared"
}
}, ao = /* @__PURE__ */ f({
...Ic,
__name: "Tip",
props: dc,
setup(a) {
const { isFloatWindow: A } = G(BA()), { tip: e, duration: t } = wl(), { isGroupCall: o } = G(rA()), n = p(null), s = a, r = V.isPC, c = S(() => [s.customClass]), M = S(
() => Ke({
color: "white",
background: "none",
position: "absolute",
"z-index": 4,
"align-items": "center",
left: "50%",
top: `${r ? "60%" : "70%"}`,
transform: "translate(-50%, -50%)",
"font-size": A.value ? "12px" : void 0
})
), N = S(
() => Ke({
color: "white",
background: "none",
position: "static",
transform: "none",
"font-size": A.value ? "12px" : void 0
})
), T = S(() => o.value ? N.value : M.value);
return uA(e, () => {
var I;
(I = n.value) == null || I.show({
message: e.value,
duration: t.value,
offset: 0
});
}), (I, D) => (d(), y("div", null, [
C(to, {
showIcon: !1,
class: k(l(c)),
ref_key: "message",
ref: n,
customStyle: l(T)
}, null, 8, ["class", "customStyle"])
]));
}
}), Nc = ["%", "vw"], gc = {
length: {
type: Number,
default: 0
},
unit: {
type: String,
values: Nc,
default: "%"
},
enableFocus: {
type: Boolean,
default: !1
},
layout: {
type: Array
},
focus: {
type: [String, Number]
}
}, Tc = ["change", "toggle"], oo = "GridContextKey", pc = { style: { height: "100%" } }, Dc = {
options: {
virtualHost: !0
}
}, lo = /* @__PURE__ */ f({
...Dc,
__name: "Grid",
props: gc,
emits: Tc,
setup(a, { emit: A }) {
const e = a, t = p(e.focus), o = p(e.layout), n = p(e.unit), s = A;
function r(c) {
s("toggle", c);
}
return uA(() => e.focus, () => t.value = e.focus), uA(() => e.layout, () => o.value = e.layout), uA(() => e.unit, () => n.value = e.unit), OA(oo, {
layout: o,
enableFocus: e.enableFocus,
handleFocusChange: r,
focus: t,
unit: n
}), (c, M) => (d(), y("div", pc, [
q(c.$slots, "default")
]));
}
}), yc = {
options: {
virtualHost: !0
}
}, kA = /* @__PURE__ */ f({
...yc,
__name: "GridItem",
props: ["index", "height", "customStyle"],
setup(a) {
const A = a, {
layout: e,
enableFocus: t,
handleFocusChange: o,
focus: n,
unit: s
} = VA(oo), r = 100 / 12, c = r, M = p({}), N = iA([
`${Y}-grid-item`,
{
pc: re,
mobile: !re,
h5: wa
}
]), T = () => {
const D = String(A.index) === String(n.value) ? null : A.index;
t && o(D);
}, I = S(() => !!Xt(e.value, { key: "i", value: A.index }));
return ue(() => {
const D = Xt(e.value, { key: "i", value: A.index });
if (!D)
return;
const { x: h, y: j, w: m, h: w, customStyle: H, customProps: b } = D;
M.value = {
width: m * r + s.value,
height: A.height || w * c + s.value,
left: h * r + s.value,
top: j * c + s.value,
position: "absolute",
visibility: (b == null ? void 0 : b.show) === !1 ? "hidden" : "",
...A.customStyle,
...H
};
}), DA(() => {
String(A.index) === String(n.value) && t && o(null);
}), (D, h) => l(I) ? (d(), y("div", {
key: 0,
class: k(l(N)),
style: eA([l(M)]),
onClick: T
}, [
q(D.$slots, "default")
], 6)) : z("", !0);
}
});
function Cc() {
const a = p([]), A = p([]), { callStatus: e, isGroupCall: t, callType: o, callRole: n } = G(rA()), { status: s } = Ve() || {}, r = Wl();
return uA(
[e, t, o, n, s, r],
() => {
var w, H, b;
let c = r.value;
const M = V.isPC ? "pc" : "mobile", N = t.value ? "groupCall" : "singleCall", T = o.value === _.AUDIO ? "audio" : "video";
let I = e.value === P.CALLING ? n.value === IA.CALLER ? "calling" : "accept" : e.value;
t && (s == null ? void 0 : s.value) === "close" && (I = "close_" + I);
const D = ((b = (H = (w = c == null ? void 0 : c[M]) == null ? void 0 : w[N]) == null ? void 0 : H[T]) == null ? void 0 : b[I]) || [];
A.value = D;
const h = [];
let j = 0;
for (let x = 0; x < D.length; x++) {
const B = x === 0 ? D[x].filter((J) => {
var MA;
return ((MA = J == null ? void 0 : J.props) == null ? void 0 : MA.show) !== !1;
}) : D[x];
D[x] = B;
const F = 12 / B.length, tA = 3;
for (let J = 0; J < B.length; J++)
h[j++] = {
i: B[J].name,
x: J * F,
y: x * F,
w: F,
h: tA,
// @ts-ignore
customStyle: B[J].customStyle,
customProps: B[J].props
};
}
j = 0;
let m = [];
for (let x = 0; x < D.flat().length; x++)
m[x] = h[j++];
m = m.filter((x) => x.i), a.value = m;
},
{
immediate: !0
}
), { layout: a, config: A };
}
function Sc(...a) {
let A = window == null ? void 0 : window.document, e = "", t = () => {
}, o = {};
if (typeof a[0] == "string" ? [e, t, o] = a : [A, e, t, o] = a, !!A)
return A == null || A.addEventListener(e, t, o), () => {
A == null || A.removeEventListener(e, t, o);
};
}
function jc(a, A) {
let e = () => {
};
CA(() => {
e = Sc("click", (o) => {
const n = a.map((c) => l(c)), s = o.composedPath(), r = [];
for (let c = 0; c < n.length; c++)
r[c] = s.includes(n[c]);
r.every((c) => !c) && A();
}, { passive: !0 });
}), DA(() => {
e == null || e();
});
}
const hc = (a, A, e, t, o) => {
const n = e.isShowArrow ? e.arrowSize : 0, s = `${a.width / 2 - A.width / 2}px`, r = `${a.height / 2 - A.height / 2}px`, c = `${n}px solid ${e.color}`, M = { ...t }, N = { ...o };
switch (e.placement) {
case "top":
M.left = s, M.top = `-${A.height + n + e.arrowDistance}px`, N.borderTop = c, N.left = `${a.width / 2 - n / 2}px`, N.top = `-${n + e.arrowDistance}px`;
break;
case "bottom":
M.left = s, M.top = `${a.height + n + e.arrowDistance}px`, N.borderBottom = c, N.left = `${a.width / 2 - n / 2}px`, N.top = `${a.height + e.arrowDistance - n}px`;
break;
case "left":
M.left = `-${A.width + n + e.arrowDistance}px`, M.top = r, N.borderLeft = c, N.left = `-${n * 2 - e.arrowDistance}px`, N.top = `${a.height / 2 - n / 2}px`;
break;
case "right":
M.left = `${a.width + n + e.arrowDistance}px`, M.top = r, N.borderRight = c, N.left = `${a.width + n * 2 - e.arrowDistance}px`, N.top = `${a.height / 2 - n / 2}px`;
break;
}
return {
finalContentStyle: M,
finalArrowStyle: N
};
}, Lc = ["click", "hover"], Ec = ["top", "bottom", "left", "right"], no = {
trigger: {
type: String,
values: Lc,
default: "click"
},
placement: {
type: String,
values: Ec,
default: "top"
},
color: {
type: String
},
isShowArrow: {
type: Boolean,
default: !0
},
arrowSize: {
type: Number,
default: 5
},
arrowDistance: {
type: Number,
default: 5
},
show: {
type: Boolean
},
autoClose: {
type: Number,
default: 300
}
}, mc = {
options: {
virtualHost: !0
}
}, zc = /* @__PURE__ */ f({
...mc,
__name: "PopoverWeb",
props: no,
emits: ["hover"],
setup(a, { emit: A }) {
const e = a, t = `${Y}-popover`, o = `${Y}-popover_content`, n = `${Y}-popover_arrow`, s = `${Y}-popover_trigger`, r = p(), c = p(), M = p(), N = p(!1), T = p(null), I = S(() => N.value && e.isShowArrow && e.show), D = Ke({ left: "0px", top: "0px", backgroundColor: e.color }), h = p(D), j = `${e.arrowSize}px solid transparent`, m = {
borderLeft: j,
borderRight: j,
borderTop: j,
borderBottom: j,
top: "0px",
left: "0px"
}, w = p(m), H = A, b = () => {
mo(() => {
var ee, te, de, ae;
if (!N.value || !e.show)
return;
const J = (te = (ee = c.value).getBoundingClientRect) == null ? void 0 : te.call(ee), MA = (ae = (de = M.value).getBoundingClientRect) == null ? void 0 : ae.call(de), { finalContentStyle: WA, finalArrowStyle: Me } = hc(J, MA, e, D, m);
h.value = { ...D, ...WA }, w.value = { ...m, ...Me };
});
}, x = () => {
clearTimeout(T.value);
}, B = () => {
e.trigger === "click" && (N.value = !N.value, b());
}, F = () => {
e.trigger === "hover" && (H("hover"), x(), N.value = !0, b());
}, tA = () => {
e.trigger === "hover" && (T.value = setTimeout(() => {
N.value = !1, b();
}, 1e3));
};
return jc([r], () => {
N.value = !1;
}), (J, MA) => (d(), y("div", {
class: k(t),
ref_key: "popoverRef",
ref: r
}, [
l(N) && J.show ? (d(), y("div", {
key: 0,
ref_key: "contentRef",
ref: M,
onMouseenter: x,
onMouseleave: tA,
class: k(o),
style: eA([l(h)])
}, [
q(J.$slots, "content")
], 36)) : z("", !0),
l(I) ? (d(), y("div", {
key: 1,
style: eA([l(w)]),
class: k(n)
}, null, 4)) : z("", !0),
L("div", {
ref_key: "triggerRef",
ref: c,
class: k(s),
onClick: B,
onMouseenter: F,
onMouseleave: tA
}, [
q(J.$slots, "trigger")
], 544)
], 512));
}
});
const Uc = {
options: {
virtualHost: !0
}
};
function fc(a, A, e, t, o, n) {
return null;
}
const vc = /* @__PURE__ */ Z(Uc, [["render", fc]]), wc = {
options: {
virtualHost: !0
}
}, ft = /* @__PURE__ */ f({
...wc,
__name: "Popover",
props: no,
emits: ["hover"],
setup(a, { emit: A }) {
const e = A, t = () => {
e("hover");
};
return (o, n) => (d(), y(RA, null, [
l(se) ? z("", !0) : (d(), U(zc, bt({
key: 0,
onHover: t
}, o.$props), {
trigger: E(() => [
q(o.$slots, "trigger")
]),
content: E(() => [
q(o.$slots, "content")
]),
_: 3
}, 16)),
l(se) ? (d(), U(vc, zo(bt({ key: 1 }, o.$props)), {
trigger: E(() => [
q(o.$slots, "trigger")
]),
content: E(() => [
q(o.$slots, "content")
]),
_: 3
}, 16)) : z("", !0)
], 64));
}
}), Oc = {
deviceType: {
type: String
},
isShowControlBtn: {
type: Boolean,
default: !1
}
}, Vc = { class: "device-selector-container" }, bc = { class: "scroll-container" }, xc = { class: "scroll-content" }, kc = {
options: {
virtualHost: !0
}
}, Rc = /* @__PURE__ */ f({
...kc,
__name: "DeviceSelect",
props: Oc,
setup(a) {
const A = a, [{ deviceList: e, currentDeviceId: t }, { updateCurrentDeviceId: o }] = ot(A.deviceType), { localUserInfoExcludeVolume: n } = G(vA()), { isMuteSpeaker: s } = G(rA()), r = nt(), c = async (I) => {
try {
T(), await Q.switchDevice({
deviceType: A.deviceType,
deviceId: I
}), o(I);
} catch (D) {
console.debug(D);
}
}, M = async () => {
var I, D;
T(), A.deviceType === hA.CAMERA && ((I = n.value) != null && I.isVideoAvailable ? await Q.closeCamera() : await Q.openCamera("localVideo")), A.deviceType === hA.MICROPHONE && ((D = n.value) != null && D.isAudioAvailable ? await Q.closeMicrophone() : await Q.openMicrophone()), A.deviceType === hA.SPEAKER && (s.value ? await Q.unMuteSpeaker() : await Q.muteSpeaker());
}, N = S(() => {
var I;
if (A.deviceType === hA.CAMERA)
return n != null && n.value.isVideoAvailable ? v("close camera") : v("open camera");
if (A.deviceType === hA.MICROPHONE)
return (I = n == null ? void 0 : n.value) != null && I.isAudioAvailable ? v("close microphone") : v("open microphone");
if (A.deviceType === hA.SPEAKER)
return s.value ? v("open speaker") : v("close speaker");
}), T = () => {
r.value = "close";
};
return (I, D) => (d(), y("div", Vc, [
L("div", bc, [
L("div", xc, [
(d(!0), y(RA, null, ce(l(e), (h) => (d(), y("div", {
key: h.deviceId
}, [
C(gA, {
width: "100%",
color: "#ffff",
truncated: !0,
size: "14px",
class: k(["device-item", { select: l(t) === h.deviceId }]),
onClick: () => c(h.deviceId)
}, {
default: E(() => [
NA(W(h.label), 1)
]),
_: 2
}, 1032, ["class", "onClick"])
]))), 128))
])
]),
D[0] || (D[0] = L("div", { class: "control-item" }, null, -1)),
I.isShowControlBtn ? (d(), U(gA, {
key: 0,
width: "100%",
color: "#ffff",
truncated: !0,
size: "14px",
class: "device-item",
onClick: M
}, {
default: E(() => [
NA(W(l(N)), 1)
]),
_: 1
})) : z("", !0)
]));
}
});
const vt = /* @__PURE__ */ Z(Rc, [["__scopeId", "data-v-d176bcfa"]]), Bc = { class: "btn-content" }, Pc = {
options: {
virtualHost: !0
}
}, Wc = /* @__PURE__ */ f({
...Pc,
__name: "Camera",
props: ZA,
setup(a) {
const A = a, e = p(!0), t = V.isPC, { localUserInfoExcludeVolume: o } = G(vA()), n = p(o == null ? void 0 : o.value.isVideoAvailable), s = S(() => o == null ? void 0 : o.value.isVideoAvailable), r = nt(), [{ deviceList: c }] = ot(hA.CAMERA), M = S(() => {
var j;
return ((j = c.value) == null ? void 0 : j.length) > 0 && r.value === "camera";
}), N = S(() => e.value ? s.value ? "basicConfig" : "closedConfig" : "loadingConfig"), T = S(() => o != null && o.value.isVideoAvailable ? v("camera enabled") : v("camera disabled")), I = zA("camera", N), D = async () => {
e.value = !1, n.value = !s.value, s.value ? await Q.closeCamera() : await Q.openCamera("localVideo"), e.value = !0;
}, h = () => {
r.value = "camera";
};
return (j, m) => (d(), y("div", Bc, [
l(t) ? (d(), U(ft, {
key: 0,
color: "rgba(107, 117, 138, 0.5)",
show: l(M),
onHover: h,
trigger: "hover"
}, {
content: E(() => [
C(vt, {
isShowControlBtn: !0,
deviceType: l(hA).CAMERA
}, null, 8, ["deviceType"])
]),
trigger: E(() => [
C(mA, {
loading: !l(e),
iconSrc: l(I).iconSrc,
color: l(I).color,
iconSize: l(I).iconSize,
width: A.width || l(I).width,
height: A.height || l(I).height,
loadingWidth: l(I).loadingWidth,
loadingHeight: l(I).loadingHeight,
shape: l(I).shape,
onClick: D
}, null, 8, ["loading", "iconSrc", "color", "iconSize", "width", "height", "loadingWidth", "loadingHeight", "shape"])
]),
_: 1
}, 8, ["show"])) : z("", !0),
l(t) ? z("", !0) : (d(), U(mA, {
key: 1,
loading: !l(e),
iconSrc: l(I).iconSrc,
color: l(I).color,
iconSize: A.iconSize || l(I).iconSize,
width: A.width || l(I).width,
height: A.height || l(I).height,
loadingWidth: l(I).loadingWidth,
loadingHeight: l(I).loadingHeight,
shape: "circle",
onClick: D
}, null, 8, ["loading", "iconSrc", "color", "iconSize", "width", "height", "loadingWidth", "loadingHeight"])),
l(I).showText ? (d(), U(gA, {
key: 2,
textStyle: l(I).textStyle,
color: l(I).textColor,
size: l(I).textSize
}, {
default: E(() => [
NA(W(l(T)), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Gc = /* @__PURE__ */ Z(Wc, [["__scopeId", "data-v-01140bf2"]]), Qc = { class: "btn-content" }, Zc = {
options: {
virtualHost: !0
}
}, Fc = /* @__PURE__ */ f({
...Zc,
__name: "Hangup",
props: ZA,
setup(a) {
const A = a, e = Vl(), t = S(() => e.value ? "basicConfig" : "loadingConfig"), o = zA("hangup", t), n = async () => {
await Q.hangup();
};
return (s, r) => (d(), y("div", Qc, [
C(mA, {
loading: !l(e),
loadingWidth: l(o).loadingWidth,
loadingHeight: l(o).loadingHeight,
iconSrc: l(o).iconSrc,
color: l(o).color,
iconSize: A.iconSize || l(o).iconSize,
width: A.width || l(o).width,
height: A.height || l(o).height,
shape: l(o).shape,
onClick: n
}, null, 8, ["loading", "loadingWidth", "loadingHeight", "iconSrc", "color", "iconSize", "width", "height", "shape"]),
l(o).showText ? (d(), U(gA, {
key: 0,
textStyle: l(o).textStyle,
color: l(o).textColor,
size: l(o).textSize
}, {
default: E(() => [
NA(W(l(v)("hangup")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Yc = /* @__PURE__ */ Z(Fc, [["__scopeId", "data-v-3585d156"]]), Xc = { class: "btn-content" }, qc = {
options: {
virtualHost: !0
}
}, Jc = /* @__PURE__ */ f({
...qc,
__name: "Accept",
props: ZA,
setup(a) {
const A = p(!0), e = a, t = S(() => A.value ? "basicConfig" : "loadingConfig"), o = zA("accept", t), n = async () => {
A.value = !1, await Q.accept(), A.value = !0;
};
return (s, r) => (d(), y("div", Xc, [
C(mA, {
iconSrc: l(o).iconSrc,
color: l(o).color,
iconSize: e.iconSize || l(o).iconSize,
width: e.width || l(o).width,
height: e.height || l(o).height,
shape: l(o).shape,
loading: !l(A),
loadingWidth: l(o).loadingWidth,
loadingHeight: l(o).loadingHeight,
onClick: n
}, null, 8, ["iconSrc", "color", "iconSize", "width", "height", "shape", "loading", "loadingWidth", "loadingHeight"]),
l(o).showText ? (d(), U(gA, {
key: 0,
textStyle: l(o).textStyle,
color: l(o).textColor,
size: l(o).textSize
}, {
default: E(() => [
NA(W(l(v)("accept")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Hc = /* @__PURE__ */ Z(Jc, [["__scopeId", "data-v-c3da87f5"]]), Kc = { class: "btn-content" }, _c = {
options: {
virtualHost: !0
}
}, $c = /* @__PURE__ */ f({
..._c,
__name: "Microphone",
props: ZA,
setup(a) {
const A = V.isPC, e = p(!0), { localUserInfoExcludeVolume: t } = G(vA()), o = nt(), [{ deviceList: n }] = ot(hA.MICROPHONE), s = S(() => {
var I;
return ((I = n.value) == null ? void 0 : I.length) > 0 && o.value === "microphone";
}), r = S(() => e.value ? t != null && t.value.isAudioAvailable ? "basicConfig" : "closedConfig" : "loadingConfig"), c = zA("microphone", r), M = S(() => t != null && t.value.isAudioAvailable ? v("microphone enabled") : v("microphone disabled")), N = async () => {
t != null && t.value.isAudioAvailable ? await Q.closeMicrophone() : await Q.openMicrophone();
}, T = () => {
o.value = "microphone";
};
return (I, D) => (d(), y("div", Kc, [
l(A) ? (d(), U(ft, {
key: 0,
color: "rgba(107, 117, 138, 0.5)",
show: l(s),
onHover: T,
trigger: "hover"
}, {
content: E(() => [
C(vt, {
isShowControlBtn: !0,
deviceType: l(hA).MICROPHONE
}, null, 8, ["deviceType"])
]),
trigger: E(() => [
C(mA, {
loading: !l(e),
iconSrc: l(c).iconSrc,
color: l(c).color,
iconSize: l(c).iconSize,
width: l(c).width,
height: l(c).height,
loadingWidth: l(c).loadingWidth,
loadingHeight: l(c).loadingHeight,
shape: l(c).shape,
onClick: N
}, null, 8, ["loading", "iconSrc", "color", "iconSize", "width", "height", "loadingWidth", "loadingHeight", "shape"])
]),
_: 1
}, 8, ["show"])) : z("", !0),
l(A) ? z("", !0) : (d(), U(mA, {
key: 1,
loading: !l(e),
iconSrc: l(c).iconSrc,
color: l(c).color,
iconSize: l(c).iconSize,
width: l(c).width,
height: l(c).height,
loadingWidth: l(c).loadingWidth,
loadingHeight: l(c).loadingHeight,
shape: l(c).shape,
onClick: N
}, null, 8, ["loading", "iconSrc", "color", "iconSize", "width", "height", "loadingWidth", "loadingHeight", "shape"])),
l(c).showText ? (d(), U(gA, {
key: 2,
textStyle: l(c).textStyle,
color: l(c).textColor,
size: l(c).textSize
}, {
default: E(() => [
NA(W(l(M)), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Ar = /* @__PURE__ */ Z($c, [["__scopeId", "data-v-7902763b"]]), er = { class: "btn-content" }, tr = {
options: {
virtualHost: !0
}
}, ar = /* @__PURE__ */ f({
...tr,
__name: "Reject",
props: ZA,
setup(a) {
const A = a, e = zA("reject", p("basicConfig")), t = async () => {
await Q.reject();
};
return (o, n) => (d(), y("div", er, [
C(mA, {
iconSrc: l(e).iconSrc,
color: l(e).color,
iconSize: l(e).iconSize,
width: A.width || l(e).width,
height: A.height || l(e).height,
shape: l(e).shape,
onClick: t
}, null, 8, ["iconSrc", "color", "iconSize", "width", "height", "shape"]),
l(e).showText ? (d(), U(gA, {
key: 0,
textStyle: l(e).textStyle,
color: l(e).textColor,
size: l(e).textSize
}, {
default: E(() => [
NA(W(l(v)("reject")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const or = /* @__PURE__ */ Z(ar, [["__scopeId", "data-v-10a39409"]]), lr = { class: "btn-content" }, nr = {
options: {
virtualHost: !0
}
}, ir = /* @__PURE__ */ f({
...nr,
__name: "Speaker",
props: ZA,
setup(a) {
const A = V.isWeChat, e = V.isPC, t = a, { isEarPhone: o, isMuteSpeaker: n } = G(rA()), s = nt(), r = S(() => o.value ? "closedConfig" : "basicConfig"), c = S(() => n.value ? "closedConfig" : "basicConfig"), [{ deviceList: M, currentDeviceId: N }] = ot(hA.SPEAKER), T = S(() => {
var m;
return ((m = M.value) == null ? void 0 : m.length) > 0 && s.value === "speaker" && e;
}), I = A ? zA("speaker", r) : zA("speaker", c);
S(() => o.value ? v("speaker disabled") : v("speaker enabled"));
const D = async () => {
n.value ? await Q.unMuteSpeaker() : await Q.muteSpeaker();
}, h = () => {
if (e) {
const m = M.value.find((w) => w.deviceId === N.value);
return m ? m.label : v("speaker enabled");
} else
return n.value ? v("speaker disabled") : v("speaker enabled");
}, j = () => {
s.value = "speaker";
};
return (m, w) => (d(), y("div", lr, [
C(ft, {
color: "rgba(107, 117, 138, 0.5)",
show: l(T),
onHover: j,
trigger: "hover"
}, {
content: E(() => [
C(vt, {
isShowControlBtn: !0,
deviceType: l(hA).SPEAKER
}, null, 8, ["deviceType"])
]),
trigger: E(() => [
C(mA, {
iconSrc: l(I).iconSrc,
color: l(I).color,
iconSize: t.iconSize || l(I).iconSize,
width: t.width || l(I).width,
height: t.height || l(I).height,
shape: l(I).shape,
onClick: D
}, null, 8, ["iconSrc", "color", "iconSize", "width", "height", "shape"])
]),
_: 1
}, 8, ["show"]),
l(I).showText ? (d(), U(gA, {
key: 0,
width: "60px",
truncated: !0,
textStyle: l(I).textStyle,
color: l(I).textColor,
size: l(I).textSize,
lineClamp: 2
}, {
default: E(() => [
NA(W(h()), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const sr = /* @__PURE__ */ Z(ir, [["__scopeId", "data-v-c825445a"]]), cr = { class: "btn-content" }, rr = {
options: {
virtualHost: !0
}
}, ur = /* @__PURE__ */ f({
...rr,
__name: "SwitchCamera",
setup(a) {
const { localUserInfoExcludeVolume: A } = G(vA()), e = S(() => A == null ? void 0 : A.value.isVideoAvailable), t = S(() => e.value ? "basicConfig" : "disableConfig"), o = zA("switchCamera", t), n = async () => {
e.value && await Q.switchCamera();
};
return (s, r) => (d(), y("div", cr, [
C(mA, {
iconSrc: l(o).iconSrc,
iconSize: l(o).iconSize,
color: l(o).color,
width: l(o).width,
height: l(o).height,
buttonStyle: l(o).buttonStyle,
shape: "circle",
onClick: n
}, null, 8, ["iconSrc", "iconSize", "color", "width", "height", "buttonStyle"]),
l(o).showText ? (d(), U(gA, {
key: 0,
textStyle: l(o).textStyle,
color: l(o).textColor,
size: l(o).textSize
}, {
default: E(() => [
NA(W(l(v)("switch camera")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const Mr = /* @__PURE__ */ Z(ur, [["__scopeId", "data-v-6eb55b3d"]]), dr = { class: "btn-content" }, Ir = {
options: {
virtualHost: !0
}
}, Nr = /* @__PURE__ */ f({
...Ir,
__name: "VirtualBackground",
props: ZA,
setup(a) {
const A = a, e = p(!0), { localUserInfoExcludeVolume: t } = G(vA()), o = S(() => t == null ? void 0 : t.value.isVideoAvailable), { enableVirtualBackground: n } = G(rA()), s = S(() => e.value ? n.value ? "closedConfig" : o.value ? "basicConfig" : "disableConfig" : "loadingConfig"), r = zA("virtualBackground", s), c = async () => {
o.value && (e.value = !1, await Q.setBlurBackground(!n.value), e.value = !0);
};
return (M, N) => (d(), y("div", dr, [
C(mA, {
loading: !l(e),
iconSrc: l(r).iconSrc,
color: l(r).color,
iconSize: A.iconSize || l(r).iconSize,
width: A.width || l(r).width,
height: A.height || l(r).height,
shape: l(r).shape,
loadingWidth: l(r).loadingWidth,
loadingHeight: l(r).loadingHeight,
buttonStyle: l(r).buttonStyle,
onClick: c
}, null, 8, ["loading", "iconSrc", "color", "iconSize", "width", "height", "shape", "loadingWidth", "loadingHeight", "buttonStyle"]),
l(r).showText ? (d(), U(gA, {
key: 0,
width: "70px",
lineClamp: 2,
textStyle: l(r).textStyle,
color: l(r).textColor,
size: l(r).textSize
}, {
default: E(() => [
NA(W(l(v)("virtual-background")), 1)
]),
_: 1
}, 8, ["textStyle", "color", "size"])) : z("", !0)
]));
}
});
const gr = /* @__PURE__ */ Z(Nr, [["__scopeId", "data-v-57c7f51f"]]), Tr = { class: "btn-content" }, pr = {
options: {
virtualHost: !0
}
}, Dr = /* @__PURE__ */ f({
...pr,
__name: "ToggleButtonPanel",
props: ZA,
setup(a) {
const { status: A } = Ve(), e = a, t = zA("toggleButtonPanel", p("basicConfig")), o = async () => {
A.value = A.value === "close" ? "open" : "close";
};
return (n, s) => (d(), y("div", Tr, [
C(mA, {
iconSrc: l(t).iconSrc,
color: l(t).color,
iconSize: e.iconSize || l(t).iconSize,
width: e.width || l(t).width,
height: e.height || l(t).height,
shape: l(t).shape,
onClick: o
}, null, 8, ["iconSrc", "color", "iconSize", "width", "height", "shape"])
]));
}
});
const yr = /* @__PURE__ */ Z(Dr, [["__scopeId", "data-v-f7839a20"]]), Cr = { class: "button-group" }, Sr = {
options: {
virtualHost: !0
}
}, jr = /* @__PURE__ */ f({
...Sr,
__name: "ButtonPanel",
setup(a) {
const A = p(null), e = p({}), { isGroupCall: t } = G(rA()), { status: o } = Ve() || {}, n = p(!1), s = p(!1), r = p(""), c = za();
ue(() => {
n.value || (t.value && !V.isPC && c.value !== null ? n.value = !0 : n.value = !1);
});
const M = S(() => iA([
"button-panel-container",
{
pc: V.isPC,
mobile: !V.isPC,
h5: V.isH5,
groupCall: t.value,
singleCall: !t.value,
close: (o == null ? void 0 : o.value) === "close",
open: (o == null ? void 0 : o.value) === "open",
showBackGround: n.value
}
])), N = iA([
"toggle-button-container",
{ h5: V.isH5 }
]), T = V.isH5 ? {
transitionProperty: "width,height,left,top",
transitionDuration: "0.3s",
transitionTimingFunction: "ease-in"
} : {};
function I(w) {
A.value = w;
}
const { layout: D, config: h } = Cc();
uA(h, () => {
const w = {}, H = h.value.flat();
for (let b of H) {
const { name: x, props: B = {} } = b;
B.showText !== !1 && (B.showText = !0), w[x] = B;
}
e.value = w;
}, { immediate: !0 });
function j(w) {
s.value = w;
}
const m = {
[i.IS_CLICKABLE]: j
};
return CA(() => {
g.watch(
u.CALL,
m,
{
notifyRangeWhenWatch: i.MYSELF
}
);
}), DA(() => {
g.unwatch(u.CALL, m);
}), OA(Ca, s), OA(Sa, r), (w, H) => (d(), y("div", {
class: k(l(M))
}, [
L("div", Cr, [
C(lo, {
unit: "%",
onToggle: I,
layout: l(D),
focus: l(A)
}, {
default: E(() => [
C(kA, {
index: "accept",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Hc)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "reject",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(or)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "microphone",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Ar)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "hangup",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Yc)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "speaker",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(sr)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "camera",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Gc)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "virtualBackground",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(gr)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "switchCamera",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Mr)
]),
_: 1
}, 8, ["customStyle"]),
C(kA, {
index: "inviteUser",
height: "auto",
customStyle: l(T)
}, {
default: E(() => [
C(Ga)
]),
_: 1
}, 8, ["customStyle"])
]),
_: 1
}, 8, ["layout", "focus"])
]),
l(n) ? (d(), y("div", {
key: 0,
class: k(l(N))
}, [
C(yr)
], 2)) : z("", !0)
], 2));
}
});
const io = /* @__PURE__ */ Z(jr, [["__scopeId", "data-v-6582c17d"]]), hr = { class: "singlecall-container" }, Lr = /* @__PURE__ */ f({
__name: "SingleCall",
setup(a) {
const { callStatus: A } = G(rA());
return (e, t) => (d(), y("div", hr, [
C(Qa),
l(A) === l(P).CALLING ? (d(), U(qa, { key: 0 })) : z("", !0),
C(ac),
C(ao),
C(io)
]));
}
});
const Er = /* @__PURE__ */ Z(Lr, [["__scopeId", "data-v-317c1d41"]]), mr = { class: "stream-loading-container" }, zr = /* @__PURE__ */ f({
__name: "StreamLoading",
setup(a) {
return (A, e) => (d(), y("div", mr, [
C(zt, {
mode: "dot",
color: "#FFF",
loadingWidth: "50px",
loadingHeight: "50px"
})
]));
}
});
const Kt = /* @__PURE__ */ Z(zr, [["__scopeId", "data-v-56b8bc56"]]), Ur = {
options: {
virtualHost: !0
}
}, fr = /* @__PURE__ */ f({
...Ur,
__name: "MediaContainer",
setup(a) {
const A = p("local"), e = p(null), t = p(!1);
be();
const { localUserInfoExcludeVolume: o, remoteUserListExcludeVolume: n } = G(vA()), { callStatus: s, callType: r, isShowEnableVirtualBackground: c, callRole: M } = G(rA()), { netWorkQualityList: N } = Ol(), T = S(() => n.value.length + 1), I = ma(), D = xl(e, T), h = Ea(), { isFloatWindow: j } = G(BA()), m = za(), { status: w } = Ve() || {}, H = !V.isPC, b = S(() => String(e.value) === "0"), x = S(() => !V.isPC && b.value && o.value.isVideoAvailable), B = S(() => x.value), F = S(() => x.value && c.value && V.isWeChat), tA = S(() => V.isPC || b.value), J = S(() => V.isPC || j.value ? "%" : "vw"), MA = S(() => [o.value, ...n.value].map((lA) => {
var SA;
if (j.value) {
if (((SA = h.value) == null ? void 0 : SA[lA.domId]) >= 10)
return lA.domId;
} else
return lA.domId;
})), WA = S(() => !(M.value === IA.CALLEE && s.value === P.CALLING && !j.value)), Me = S(() => {
let lA = "";
return M.value === IA.CALLEE && s.value === P.CALLING && !j.value && (lA = "hidden"), {
visibility: lA
};
});
function ee(lA) {
e.value = lA, m.value = lA, w.value = lA !== null ? "close" : "open";
}
function te(lA) {
var SA, nA;
return V.isWeChat ? !((nA = (SA = I.value) == null ? void 0 : SA.find((PA) => PA.userID === lA.userId)) != null && nA.hasVideo) : !lA.isVideoAvailable;
}
function de(lA) {
var SA, nA;
return V.isWeChat ? !((nA = (SA = I.value) == null ? void 0 : SA.find((PA) => PA.userID === lA.userId)) != null && nA.hasAudio) : !lA.isAudioAvailable;
}
function ae(lA) {
if (!N.value)
return;
const SA = lA !== o.value.userId;
if (!V.isWeChat && SA)
return;
const nA = N.value.find((PA) => PA.userId === lA);
return nA && (nA == null ? void 0 : nA.quality) >= 4;
}
uA([n, r], () => {
var lA, SA;
(SA = (lA = n.value) == null ? void 0 : lA[0]) != null && SA.isEnter && (A.value = "remote"), r.value === _.AUDIO ? t.value = !1 : t.value = !0;
});
const xe = S(() => iA([
"groupcall-media-container",
{
mobile: !V.isPC,
pc: V.isPC,
"two-layout": T.value === 2 && e.value === null,
float: j.value
}
])), ke = S(() => s.value === P.CALLING && (r.value === _.AUDIO && !o.value.isAudioAvailable || r.value === _.VIDEO && !o.value.isVideoAvailable));
return (lA, SA) => (d(), U(Ha, {
id: "source",
disabled: !l(j),
source: "#source",
to: "body"
}, {
default: E(() => [
C(eo, null, {
default: E(() => [
L("div", {
class: k(l(xe)),
style: eA([l(Me)])
}, [
C(lo, {
unit: l(J),
"enable-focus": H,
focus: l(e),
length: l(T),
layout: l(D),
onToggle: ee
}, {
default: E(() => [
(d(), U(kA, {
index: 0,
key: l(o).userId
}, {
default: E(() => [
C(_a, {
domId: l(o).domId,
"show-audio-stream": !l(o).isVideoAvailable,
show: l(MA).includes(l(o).domId) && l(WA)
}, {
"audio-stream": E(() => [
C(At, {
"user-id": l(o).userId,
username: l(o).displayUserInfo,
avatar: l(o).avatar,
"is-video-available": l(o).isVideoAvailable
}, null, 8, ["user-id", "username", "avatar", "is-video-available"])
]),
loading: E(() => [
l(ke) ? (d(), U(Kt, { key: 0 })) : z("", !0)
]),
"stream-info": E(() => [
l(j) ? z("", !0) : (d(), U($e, {
key: 0,
"is-self": !0,
"show-nick-name": l(tA),
showSwitchCameraButton: l(B),
showVirtualBackgroundButton: l(F),
showNetWorkStatus: ae(l(o).userId),
nickName: l(o).displayUserInfo,
isMuted: !l(o).isAudioAvailable,
volume: l(h) && l(h)[l(o).domId]
}, null, 8, ["show-nick-name", "showSwitchCameraButton", "showVirtualBackgroundButton", "showNetWorkStatus", "nickName", "isMuted", "volume"]))
]),
_: 1
}, 8, ["domId", "show-audio-stream", "show"])
]),
_: 1
})),
(d(!0), y(RA, null, ce(l(n), (nA, PA) => (d(), U(kA, {
key: nA.userId,
index: PA + 1
}, {
default: E(() => [
C($a, {
domId: nA.domId,
"show-audio-stream": te(nA),
show: l(MA).includes(nA.domId) && l(WA)
}, {
"audio-stream": E(() => [
C(At, {
"user-id": nA.userId,
username: nA.displayUserInfo,
avatar: nA.avatar
}, null, 8, ["user-id", "username", "avatar"])
]),
loading: E(() => [
nA.isEnter ? z("", !0) : (d(), U(Kt, { key: 0 }))
]),
"stream-info": E(() => [
l(j) ? z("", !0) : (d(), U($e, {
key: 0,
"show-nick-name": l(V).isPC || String(l(e)) === String(PA + 1),
"show-control-button": !1,
showNetWorkStatus: ae(nA.userId),
nickName: nA.displayUserInfo,
"is-muted": de(nA),
volume: l(h) && l(h)[nA.domId]
}, null, 8, ["show-nick-name", "showNetWorkStatus", "nickName", "is-muted", "volume"]))
]),
_: 2
}, 1032, ["domId", "show-audio-stream", "show"])
]),
_: 2
}, 1032, ["index"]))), 128))
]),
_: 1
}, 8, ["unit", "focus", "length", "layout"])
], 6)
]),
_: 1
})
]),
_: 1
}, 8, ["disabled"]));
}
});
const vr = /* @__PURE__ */ Z(fr, [["__scopeId", "data-v-0629f0d8"]]), wr = {
key: 0,
class: "dialog-main-header"
}, Or = { class: "dialog-main-title" }, Vr = {
key: 1,
class: "dialog-main-footer"
}, br = /* @__PURE__ */ f({
__name: "TDialog",
props: {
moduleValue: {
type: Boolean,
default: !1
},
isHeaderShow: {
type: Boolean,
default: !0
},
isFooterShow: {
type: Boolean,
default: !0
},
background: {
type: Boolean,
default: !0
},
title: {
type: String,
default: ""
},
center: {
type: Boolean,
default: !1
},
isH5: {
type: Boolean,
default: !1
}
},
emits: ["update:moduleValue", "submit"],
setup(a, { emit: A }) {
const e = {
OUTSIDE: "outside",
INSIDE: "inside"
}, t = a, o = p(!0), n = p(!0), s = p(!0), r = p("");
ue(() => {
r.value = t.title, o.value = t.isHeaderShow, n.value = t.isFooterShow, s.value = t.background;
});
const c = A, M = (I) => {
I === e.OUTSIDE && N();
}, N = () => {
c("update:moduleValue", !1);
}, T = () => {
c("submit"), N();
};
return (I, D) => a.moduleValue ? (d(), y("div", {
key: 0,
class: k(["dialog", [t.isH5 ? "dialog-h5" : "", a.center ? "center" : ""]]),
onClick: D[1] || (D[1] = pe((h) => M(e.OUTSIDE), ["stop", "prevent"]))
}, [
L("main", {
class: k(["dialog-main", [l(s) ? "" : "dialog-main-back"]]),
onClick: D[0] || (D[0] = pe((h) => M(e.INSIDE), ["stop", "prevent"]))
}, [
l(o) ? (d(), y("header", wr, [
L("h1", Or, W(l(r)), 1),
L("i", {
class: "icon icon-close",
onClick: N
})
])) : z("", !0),
L("div", {
class: k(["dialog-main-content", [t.isH5 ? "dialog-main-content-uniapp" : ""]])
}, [
q(I.$slots, "default", {}, void 0, !0)
], 2),
l(n) ? (d(), y("footer", Vr, [
L("button", {
class: "btn btn-cancel",
onClick: N
}, W(l(v)("Cancel")), 1),
L("button", {
class: "btn btn-default",
onClick: T
}, W(l(v)("Done")), 1)
])) : z("", !0)
], 2)
], 2)) : z("", !0);
}
});
const xr = /* @__PURE__ */ Z(br, [["__scopeId", "data-v-7a89cdf3"]]), kr = ["src"], Rr = ["src"], Br = /* @__PURE__ */ f({
__name: "TIcon",
props: {
file: {
type: String,
default: ""
},
width: {
type: String,
default: "20px"
},
height: {
type: String,
default: "20px"
},
isApp: {
type: Boolean,
default: !1
}
},
emits: ["click"],
setup(a, { emit: A }) {
const e = A, t = a, o = () => {
e("click");
};
return (n, s) => (d(), y("div", {
class: "icon",
onClick: o
}, [
t.isApp ? (d(), y("image", {
key: 0,
class: "icon",
src: t.file,
style: eA({ width: t.width, height: t.height })
}, null, 12, kr)) : (d(), y("img", {
key: 1,
class: "icon",
src: t.file,
style: eA({ width: t.width, height: t.height })
}, null, 12, Rr))
]));
}
});
const Ze = /* @__PURE__ */ Z(Br, [["__scopeId", "data-v-b989a330"]]), _t = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSI+CiAgPHRpdGxlPue8lue7hCAxNDwvdGl0bGU+CiAgPGRlZnM+CiAgICA8ZmlsdGVyIHg9Ii0xMC42JSIgeT0iLTUuNCUiIHdpZHRoPSIxMjEuMiUiIGhlaWdodD0iMTEwLjklIiBmaWx0ZXJVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIGlkPSJmaWx0ZXItMSI+CiAgICAgIDxmZU9mZnNldCBkeD0iMCIgZHk9IjciIGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJzaGFkb3dPZmZzZXRPdXRlcjEiPjwvZmVPZmZzZXQ+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEwIiBpbj0ic2h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wMzkxNzUgMjMuNzg1Mzc4LDguOTkxNzMxMTQgMjMuNTE5ODI4Niw5LjI3MDk1ODkzIEw5LjUxMjMxMDcxLDI0IEw5LjUxMjMxMDcxLDI0IFoiIGlkPSJQYXRoLTIiPjwvcGF0aD4KICAgICAgICAgIDwvZz4KICAgICAgICAgIDxyZWN0IGlkPSLnn6
key: 1,
class: "icon-unselected"
}, Kr = { class: "select-all" }, _r = ["onClick"], $r = ["src"], Au = { class: "name" }, eu = { key: 0 }, tu = { class: "right" }, au = {
key: 0,
class: "transfer-header"
}, ou = {
key: 1,
class: "transfer-list"
}, lu = {
key: 0,
class: "transfer-text"
}, nu = { class: "transfer-list-item-content" }, iu = ["src"], su = {
key: 0,
class: "name"
}, cu = ["onClick"], ru = { class: "transfer-right-footer" }, uu = /* @__PURE__ */ f({
__name: "TTransfer",
props: {
list: {
type: Array,
default: () => []
},
selectedList: {
type: Array,
default: () => []
},
isSearch: {
type: Boolean,
default: !0
},
isRadio: {
type: Boolean,
default: !1
},
isCustomItem: {
type: Boolean,
default: !1
},
title: {
type: String,
default: ""
},
type: {
type: String,
default: ""
},
resultShow: {
type: Boolean,
default: !0
},
total: {
type: Number,
default: 0
},
isH5: {
type: Boolean,
default: !1
}
},
emits: ["search", "submit", "cancel", "getMore"],
setup(a, { emit: A }) {
const e = a, t = A, o = p(""), n = p([]), s = p(0), r = p([]), c = p(!0), M = p(!1), N = p(""), T = p("");
ue(() => {
const { list: b, isCustomItem: x, isSearch: B, title: F, total: tA, selectedList: J } = e;
if (x)
for (let MA = 0; MA < b.length; MA++)
b[MA].conversationID.indexOf("@TIM#SYSTEM") > -1 && b.splice(MA, 1), n.value = b;
else
n.value = b;
s.value = tA || b.length, r.value = J && J.length > 0 ? J : r.value, c.value = B, M.value = x, N.value = F, o.value = e.type;
});
const I = S(
() => n.value.filter((b) => !b.isDisabled)
), D = (b) => {
T.value = b.target.value, t("search", b.target.value);
}, h = (b) => {
if (b.isDisabled)
return;
let x = r.value;
const B = x.indexOf(b);
if (B > -1)
return r.value.splice(B, 1);
e.isRadio && (x = []), x.push(b), r.value = x;
}, j = () => {
r.value.length === I.value.length ? r.value = [] : r.value = [...I.value];
}, m = () => {
t("submit", r.value), T.value = "";
}, w = () => {
t("cancel"), T.value = "";
}, H = () => {
t("getMore");
};
return (b, x) => (d(), y("div", {
class: k(["transfer", [e.isH5 ? "transfer-h5" : ""]])
}, [
e.isH5 ? (d(), y("header", {
key: 0,
class: "transfer-header transfer-h5-header",
onClick: w
}, [
C(Ze, {
class: "icon",
file: l(Pr),
width: "18px",
height: "18px"
}, null, 8, ["file"]),
L("span", Gr, W(l(N)), 1),
x[0] || (x[0] = L("span", { class: "space" }, null, -1))
])) : z("", !0),
L("main", Qr, [
L("div", Zr, [
L("header", Fr, [
!e.isH5 && l(c) ? (d(), y("input", {
key: 0,
type: "text",
value: l(T),
onKeyup: Uo(D, ["enter"]),
placeholder: l(v)("Please enter userID"),
enterkeyhint: "search",
class: k([e.isH5 ? "left-uniapp-input" : ""])
}, null, 42, Yr)) : z("", !0),
e.isH5 && l(c) ? (d(), y("input", {
key: 1,
type: "text",
onBlur: D,
onConfirm: D,
placeholder: l(v)("Please enter userID"),
enterkeyhint: "search",
value: l(T),
class: k([e.isH5 ? "left-uniapp-input" : ""])
}, null, 42, Xr)) : z("", !0)
]),
L("main", qr, [
L("ul", Jr, [
l(I).length > 1 && !a.isRadio ? (d(), y("li", {
key: 0,
class: "transfer-list-item",
onClick: j
}, [
l(r).length === l(I).length ? (d(), U(Ze, {
key: 0,
file: l(_t),
width: "18px",
height: "18px"
}, null, 8, ["file"])) : (d(), y("i", Hr)),
L("span", Kr, W(l(v)("Select all")), 1)
])) : z("", !0),
(d(!0), y(RA, null, ce(l(n), (B) => (d(), y("li", {
class: "transfer-list-item",
key: B.userID,
onClick: (F) => h(B)
}, [
l(r).indexOf(B) > -1 ? (d(), U(Ze, {
key: 0,
file: l(_t),
class: k([B.isDisabled && "disabled"]),
width: "18px",
height: "18px"
}, null, 8, ["file", "class"])) : (d(), y("i", {
key: 1,
class: k([B.isDisabled && "disabled", "icon-unselected"])
}, null, 2)),
l(M) ? q(b.$slots, "left", {
key: 3,
data: B
}, void 0, !0) : (d(), y(RA, { key: 2 }, [
L("img", {
class: "avatar",
src: B.avatar || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",
onerror: "this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
}, null, 8, $r),
L("span", Au, W(B.nick || B.userID), 1),
B.isDisabled ? (d(), y("span", eu)) : z("", !0)
], 64))
], 8, _r))), 128)),
l(s) > l(n).length ? (d(), y("li", {
key: 1,
class: "transfer-list-item more",
onClick: H
}, W(l(v)("View more")), 1)) : z("", !0)
])
])
]),
L("div", tu, [
e.isH5 ? z("", !0) : (d(), y("header", au, W(l(N)), 1)),
a.resultShow ? (d(), y("ul", ou, [
l(r).length > 0 && !e.isH5 ? (d(), y("p", lu, W(l(r).length) + " " + W(l(v)("people selected")), 1)) : z("", !0),
(d(!0), y(RA, null, ce(l(r), (B, F) => (d(), y("li", {
class: "transfer-list-item space-between",
key: F
}, [
L("aside", nu, [
l(M) ? q(b.$slots, "right", {
key: 1,
data: B
}, void 0, !0) : (d(), y(RA, { key: 0 }, [
L("img", {
class: "avatar",
src: B.avatar || "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",
onerror: "this.src='https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png'"
}, null, 8, iu),
e.isH5 ? z("", !0) : (d(), y("span", su, W(B.nick || B.userID), 1))
], 64))
]),
e.isH5 ? z("", !0) : (d(), y("span", {
key: 0,
onClick: (tA) => h(B)
}, [
C(Ze, {
file: l(Wr),
width: "18px",
height: "18px"
}, null, 8, ["file"])
], 8, cu))
]))), 128))
])) : z("", !0),
L("footer", ru, [
L("button", {
class: "btn btn-cancel",
onClick: w
}, W(l(v)("Cancel")), 1),
l(r).length > 0 ? (d(), y("button", {
key: 0,
class: "btn",
onClick: m
}, W(l(v)("Done")), 1)) : (d(), y("button", {
key: 1,
class: "btn btn-no",
onClick: m
}, W(l(v)("Done")), 1))
])
])
])
], 2));
}
});
const Mu = /* @__PURE__ */ Z(uu, [["__scopeId", "data-v-cd3a18ba"]]), du = /* @__PURE__ */ f({
__name: "SelectUser",
props: {
isRadio: {
type: Boolean,
default: !1
},
isNeedSearch: {
type: Boolean,
default: !1
},
title: {
type: String,
default: ""
},
userList: {
type: Array,
default: () => []
},
total: {
type: Number,
default: 0
},
isShow: {
type: Boolean,
default: !1
},
isPC: {
type: Boolean,
default: !0
}
},
emits: ["complete", "search", "getMore", "update:isShow"],
setup(a, { emit: A }) {
const e = A, t = a, o = p(!1);
ue(() => {
o.value = t.isShow;
});
const n = () => {
o.value = !o.value, e("complete", []), e("update:isShow", o.value);
}, s = (M) => {
e("complete", M);
}, r = (M) => {
e("search", M);
}, c = () => {
e("getMore");
};
return (M, N) => (d(), U(xr, {
moduleValue: l(o),
isH5: !a.isPC,
isHeaderShow: !1,
isFooterShow: !1,
background: !1,
"onUpdate:moduleValue": n
}, {
default: E(() => [
C(Mu, {
isSearch: t.isNeedSearch,
title: t.title,
list: t.userList,
isH5: !a.isPC,
isRadio: t.isRadio,
total: t.total,
onGetMore: c,
onSearch: r,
onSubmit: s,
onCancel: n
}, null, 8, ["isSearch", "title", "list", "isH5", "isRadio", "total"])
]),
_: 1
}, 8, ["moduleValue", "isH5"]));
}
}), Iu = {
options: {
virtualHost: !0
}
}, Nu = /* @__PURE__ */ f({
...Iu,
__name: "BackGround",
setup(a) {
return (A, e) => (d(), U(Za, {
bgColor: "#22262ed9",
bgImage: l(QA),
customStyle: { position: "absolute", zIndex: 0 }
}, null, 8, ["bgImage"]));
}
}), gu = { class: "groupcall-container" }, $t = 30, Tu = /* @__PURE__ */ f({
__name: "GroupCall",
setup(a) {
const A = p(null), e = p("open"), t = p(!1), o = p(0), n = p([]), s = p([]), r = p(0), c = A, M = { status: e }, { callRole: N, callStatus: T } = G(rA()), { isFloatWindow: I } = G(BA()), { localUserInfoExcludeVolume: D, remoteUserListExcludeVolume: h } = G(vA()), j = async (F) => {
if (t.value = F, t.value) {
await H();
const tA = await Q.getGroupProfile();
o.value = tA.memberCount;
}
}, m = () => {
t.value = !1, g.update(u.CALL, i.SHOW_SELECT_USER, !1), r.value = 0, n.value = [];
}, w = async () => {
r.value += $t, await H();
}, H = async () => {
const F = await Q.getGroupMemberList($t, r.value), tA = [...h.value, D.value].map((J) => J.userId);
n.value.push(...F), n.value = n.value.map((J) => (tA.includes(J.userID) && (J = { ...J, isDisabled: !0 }), J)), s.value = n.value;
}, b = async (F) => {
try {
if (F.length <= 0)
return;
t.value = !1, g.update(u.CALL, i.SHOW_SELECT_USER, !1), r.value = 0;
const tA = F.map((J) => J.userID);
await Q.inviteUser({ userIDList: tA }), n.value = [];
} catch (tA) {
console.debug(tA);
}
}, x = (F) => {
F ? n.value = n.value.filter((tA) => tA.userID.includes(F) || tA.nick.includes(F)) : n.value = s.value;
}, B = {
[i.SHOW_SELECT_USER]: j
};
return CA(() => {
g.watch(u.CALL, B, { notifyRangeWhenWatch: i.MYSELF });
}), DA(() => {
g.unwatch(u.CALL, B);
}), M.status = p("open"), c.value = null, OA(Da, M), OA(pa, c), (F, tA) => (d(), y("div", gu, [
C(Qa),
l(T) === l(P).CALLING && l(N) === l(IA).CALLEE && !l(I) ? (d(), U(qa, { key: 0 })) : z("", !0),
C(vr),
C(ao),
C(io),
C(Nu),
C(du, {
isShow: l(t),
isNeedSearch: !0,
userList: l(n),
isPC: l(V).isPC,
total: l(o),
onGetMore: w,
onComplete: b,
onSearch: x,
"onUpdate:isShow": m
}, null, 8, ["isShow", "userList", "isPC", "total"])
]));
}
});
const pu = /* @__PURE__ */ Z(Tu, [["__scopeId", "data-v-8604f3c1"]]), Du = {}, yu = {
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg",
"data-v-ea893728": ""
};
function Cu(a, A) {
return d(), y("svg", yu, A[0] || (A[0] = [
L("path", {
fill: "currentColor",
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
}, null, -1)
]));
}
const Su = /* @__PURE__ */ Z(Du, [["render", Cu]]), Aa = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAMAAYAAD/2wBDABYPEBMQDhYTEhMYFxYaIDYjIB4eIEIvMic2TkVSUU1FTEpWYXxpVlx1XUpMbJNtdYCEi4yLVGiZo5eHonyIi4b/2wBDARcYGCAcID8jIz+GWUxZhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhob/wAARCAOABTgDASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAECAwQFBgf/xABOEAABAwICBQcIBwYFAwQCAwEAAQIDBBEFEhMhMVFSFBUyQZGS0RYiU1RhcaLhNDVkcoGxwQYjM0JzoSSCg8LwQ2KTJWN0siY2RFXxlP/EABkBAQADAQEAAAAAAAAAAAAAAAABAwQCBf/EACsRAQABAwQBAwQDAQEBAQAAAAABAgNRERMUUhIEMUEhMlNxM0JhIjSBof/aAAwDAQACEQMRAD8A4OHYfPiVSkMKe1zl2NTeexoP2eoKNqZoknk63ypf+2xCf2coko8Ljdb95Mmkevv2f2OodTLqZVaxjOgxrfc2xe67yAcoTdd4uu8gATdd4uu8gATdd4uu8gATdd4uu8gATdRdSABN13i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kACbqLqQAJuoupAAm6i6kAC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C7UJIXpIBIAAA06qSWWoSkgdkXLmkfwp7COaqe1/3mfjz6wN0GlTSSwVPJZ36RFbeN67V9im6AAMVRJo41sqI7qAygwumVXo1issqXupRZpEjV3mrZV27QNkFXuVrbtTMu69jDJNIjegjde3MigbAMKSyeiTvoZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDthJDuioEgAAAAAAAAAAecS9vO29fvPRnJrqJ7ZHSRNzMdrVE2opxcjWGr01cUzMT8tILe3m7er3i+vL17us3aGie6RJJW5WN1oi7VUqppmZbK66aadZdYAGh5LnJ0Uvt6yTNNCrXK5qXautUTqMF0va+vceVXRVTU2U1RMC9Fbbeo6JqwQq5yOclmprRF6zaNnpqJpiZn5UXZiZ+gajeghtmCRitVVRLtXXq6jSqVKu6CjM3ehkjYrlRVSzU16+sDOAAAAAAAAVkRXRuRrsqqlkXcWAHDw9zaCsfFVstI/oyqdwwVlJHWRZHprTou60NCjqpaOdKKruqLqjeB1gAAAAAAAADDUT6OzWpd7tgFat7MmjtmeuxNxemY+OJEeuvduK08GTz365F/sZwAAAAAAAAOPXUtbJiCviR+jullR9rGbGIKqbRcmRyol81nW3GGuxGpgxBYY8uS7bJbaZsYrJqTRaFUTNe6ql9wFpYalcISJubT2S/na9u8YXDUxU0rZ7o9V827r9Qlq5m4QlQltIqJ1e0YXVzVNNK+Wyuavm2T2AYMKpqyGqc6oR6Myqmt99Z1zkYViFRVVTo5VarcqrqS1jrgAABr11I2tp1he5zUVUW6Hmayjghr20sU3WiPe9Us1T1NRPHTQullVUY3aqJc4eIYlh1S1ctKssi7HWy/32hCmIYVSUdJpkne5ztTE1ecXocBZPSslmkexz0vZN3UakOD1ssOlSNG2W7WPXWv4eJ0qXG3MkSCtgcyTZdqfoB1Vjijia57UdoW6lVLqmo4stZg0ivesLle663yrtOriFb
key: 0,
class: "card"
}, mu = { class: "card-body" }, zu = { class: "card-wrapper" }, Uu = { class: "title" }, fu = { class: "button" }, vu = { class: "allow" }, wu = { class: "image-wrapper" }, Ou = ["src"], Vu = /* @__PURE__ */ f({
__name: "SystemPermitTip",
props: {
platform: {},
language: {}
},
setup(a) {
const A = {
mac: {
"zh-cn": Aa,
en: ju
},
win: {
"zh-cn": hu,
en: Lu
}
}, e = a, t = S(() => e.platform === "mac" ? "mac-privacy" : "win-privacy"), o = S(() => e.platform === "mac" ? "mac-preferences" : "win-preferences"), n = p(Aa), s = p(!0), r = (M) => {
M && V.isPC && (s.value = !0);
}, c = () => {
s.value = !1;
};
return uA(() => e.language, () => {
n.value = A[e.platform][e.language];
}, {
immediate: !0
}), CA(() => {
g.watch(u.CALL, {
[i.SHOW_PERMISSION_TIP]: r
}, {
notifyRangeWhenWatch: i.MYSELF
});
}), DA(() => {
g.unwatch(u.CALL, {
[i.SHOW_PERMISSION_TIP]: r
});
}), (M, N) => l(s) ? (d(), y("div", Eu, [
L("div", mu, [
L("div", {
class: "close",
onClick: c
}, [
C(Su)
]),
L("div", zu, [
L("div", Uu, W(l(v)("browser-authorization")), 1),
L("div", fu, W(l(v)(l(o))), 1),
L("div", vu, W(l(v)(l(t))), 1),
L("div", wu, [
L("img", {
src: l(n),
class: "image",
alt: "system permit"
}, null, 8, Ou)
])
])
])
])) : z("", !0);
}
});
const bu = /* @__PURE__ */ Z(Vu, [["__scopeId", "data-v-2ea845a3"]]), xu = { class: "tip" }, ku = { class: "card" }, Ru = /* @__PURE__ */ f({
__name: "PermitTip",
setup(a) {
const A = S(() => V.isMAC ? gt.MAC : gt.WIN), e = p(g.getData(u.CALL, i.LANGUAGE)), t = (o) => e.value = o;
return CA(() => {
g.watch(u.CALL, {
[i.LANGUAGE]: t
}, {
notifyRangeWhenWatch: i.MYSELF
});
}), DA(() => {
g.unwatch(u.CALL, {
[i.LANGUAGE]: t
});
}), (o, n) => (d(), y("div", xu, [
L("div", ku, [
C(bu, {
platform: l(A),
language: l(e)
}, null, 8, ["platform", "language"])
])
]));
}
});
const Bu = /* @__PURE__ */ Z(Ru, [["__scopeId", "data-v-cd63c32e"]]), so = {};
let Nt = null, Pu = 1;
const Wu = () => {
const a = document.body, A = document.createElement("div");
Nt && (a.removeChild(Nt.el), Ue(null, A));
const e = C(Bu, {
index: `permit-item-${Pu++}`,
// eslint-disable-line
destroy() {
Ue(null, A);
}
});
Ue(e, A), a.appendChild(A.firstElementChild), Nt = e;
};
so.show = () => Wu();
const Gu = { class: "toast-content" }, Qu = /* @__PURE__ */ f({
__name: "Toast",
props: {
type: {},
duration: {},
message: {},
index: {},
showClose: { type: Boolean },
destroy: { type: Function },
close: { type: Function }
},
setup(a) {
const A = a, e = p(!1), t = p(null), o = S(() => `toast-container ${A.type}`), n = () => {
A.destroy();
}, s = () => {
A.close(), e.value = !1;
}, r = () => {
t.value && clearTimeout(t.value), A.duration && (t.value = setTimeout(() => {
s();
}, A.duration));
};
return CA(() => {
e.value = !0, r();
}), DA(() => {
t.value && clearTimeout(t.value);
}), (c, M) => (d(), U(fo, {
name: "slide-up",
onAfterLeave: n
}, {
default: E(() => [
sA((d(), y("div", {
key: c.index,
class: k(l(o))
}, [
L("div", Gu, W(c.message), 1),
sA(L("i", {
onClick: s,
class: "toast-close-icon"
}, null, 512), [
[cA, c.showClose]
])
], 2)), [
[cA, l(e)]
])
]),
_: 1
}));
}
});
const Zu = /* @__PURE__ */ Z(Qu, [["__scopeId", "data-v-27fc22c5"]]), HA = {}, wA = [];
let Fu = 1;
function Yu() {
var A, e, t;
const a = wA.length;
return a > 0 ? (t = (e = (A = wA[a - 1]) == null ? void 0 : A.el) == null ? void 0 : e.style) == null ? void 0 : t.top : "30px";
}
function Xu() {
var A, e;
const a = wA.length;
return a > 0 ? (e = (A = wA[a - 1]) == null ? void 0 : A.el) == null ? void 0 : e.offsetHeight : 0;
}
const co = (a) => {
const { type: A, duration: e = 3e3, message: t, showClose: o = !1, onClose: n } = a, s = document.body, r = document.createElement("div"), c = C(Zu, {
type: A,
duration: e,
message: t,
showClose: o,
index: `toast-item-${Fu++}`,
// eslint-disable-line
close() {
var D, h, j, m;
const T = wA.findIndex((w) => w === c);
console.log((h = (D = wA[T]) == null ? void 0 : D.el) == null ? void 0 : h.offsetHeight);
const I = parseInt((m = (j = wA[T]) == null ? void 0 : j.el) == null ? void 0 : m.offsetHeight) + 20;
for (let w = 0; w < wA.length; w++)
w < T || (wA[w].el.style.top = parseInt(wA[w].el.style.top) - I + "px");
wA.splice(T, 1);
},
destroy() {
Ue(null, r);
}
});
Ue(c, r), s.appendChild(r.firstElementChild);
const M = Yu(), N = Xu();
c.el.style.top = parseInt(M) + parseInt(N) + 20 + "px", wA.push(c);
};
["info", "waring", "error", "success"].forEach((a) => {
let A = {};
HA[a] = (e) => {
typeof e == "string" ? A.message = e : A = e, co({ type: a, ...A });
};
});
HA.show = (a) => {
let A = {};
return typeof a == "string" ? (A.message = a, A.type = "info") : A = a, co({ type: "info", ...A });
};
const it = /* @__PURE__ */ f({
__name: "TUICallKit",
props: {
beforeCalling: {},
afterCalling: {},
onMinimized: {},
onMessageSentByMe: {},
kickedOut: {},
statusChanged: {},
allowedMinimized: { type: Boolean, default: !1 },
allowedFullScreen: { type: Boolean, default: !0 },
videoDisplayMode: { default: "cover" },
videoResolution: { default: "480p" }
},
setup(a) {
const A = !V.isPC, e = A ? "TUICallKit-mobile transition-animation" : "TUICallKit-desktop", t = p(""), o = p(""), n = p(""), s = p(!1), r = a, c = p(g.getData(u.CALL, i.CALL_STATUS)), M = p(g.getData(u.CALL, i.CALL_ROLE)), N = p(g.getData(u.CALL, i.CALL_MEDIA_TYPE)), T = p(g.getData(u.CALL, i.IS_GROUP)), I = p(g.getData(u.CALL, i.IS_EAR_PHONE)), D = p(null), h = p(g.getData(u.CALL, i.LOCAL_USER_INFO_EXCLUDE_VOLUMN)), j = p(g.getData(u.CALL, i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST)), m = p(g.getData(u.CALL, i.CALLER_USER_INFO)), w = p(g.getData(u.CALL, i.IS_MINIMIZED)), H = p(g.getData(u.CALL, i.ENABLE_VIRTUAL_BACKGROUND)), b = p(g.getData(u.CALL, i.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND)), x = p(g.getData(u.CALL, i.CUSTOM_UI_CONFIG)), B = p(g.getData(u.CALL, i.IS_MUTE_SPEAKER)), F = Be({
callStatus: c,
callRole: M,
callType: N,
isGroupCall: T,
isEarPhone: I,
focusElement: D,
allowedFullScreen: r.allowedFullScreen,
enableVirtualBackground: H,
isShowEnableVirtualBackground: b,
isMuteSpeaker: B
}), tA = Be({ callerUserInfo: m }), J = Be({
localUserInfoExcludeVolume: h,
remoteUserListExcludeVolume: j
}), MA = Be({ isFloatWindow: w }), {
beforeCalling: WA,
afterCalling: Me,
onMinimized: ee,
onMessageSentByMe: te,
videoDisplayMode: de,
videoResolution: ae,
kickedOut: xe,
statusChanged: ke,
allowedMinimized: lA
} = G(r), SA = (K) => {
F.callStatus = K;
}, nA = (K) => {
F.isGroupCall = K;
}, PA = (K) => {
K.text && jo(K.text, K.type || "info");
}, uo = (K) => {
F.callType = K, A && s.value && (n.value = "miniMized-mobile-audio", o.value = ""), A && !s.value && (o.value = "mobile-audio");
}, wt = (K) => {
MA.isFloatWindow = K, K ? A ? F.callType === _.AUDIO ? o.value = "miniMized-mobile-audio" : n.value = "miniMized-mobile-video" : t.value = "miniMized" : (o.value = "mobile-audio", t.value = "", n.value = "");
}, Mo = (K) => {
if (K && V.isPC)
try {
so.show();
} catch (Re) {
console.debug(Re);
}
}, Io = (K) => {
F.callRole = K;
}, No = (K) => {
J.localUserInfoExcludeVolume = K;
}, go = (K) => {
J.remoteUserListExcludeVolume = K;
}, To = (K) => {
tA.callerUserInfo = K;
}, po = (K) => {
F.isEarPhone = K;
}, Do = (K) => {
F.enableVirtualBackground = K;
}, yo = (K) => {
F.isShowEnableVirtualBackground = K;
}, Co = (K) => {
x.value = K;
}, So = (K) => {
F.isMuteSpeaker = K;
};
ue(() => {
Q.setCallback({
beforeCalling: WA && WA.value,
afterCalling: Me && Me.value,
onMinimized: ee && ee.value,
onMessageSentByMe: te && te.value,
kickedOut: xe && xe.value,
statusChanged: ke && ke.value
});
});
const Ot = {
[i.CALL_STATUS]: SA,
[i.IS_GROUP]: nA,
[i.TOAST_INFO]: PA,
[i.CALL_MEDIA_TYPE]: uo,
[i.SHOW_PERMISSION_TIP]: Mo,
[i.CALL_ROLE]: Io,
[i.LOCAL_USER_INFO_EXCLUDE_VOLUMN]: No,
[i.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST]: go,
[i.CALLER_USER_INFO]: To,
[i.IS_EAR_PHONE]: po,
[i.ENABLE_VIRTUAL_BACKGROUND]: Do,
[i.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND]: yo,
[i.CUSTOM_UI_CONFIG]: Co,
[i.IS_MUTE_SPEAKER]: So
};
CA(() => {
lA.value && Q.enableFloatWindow(lA.value), Q.setVideoDisplayMode(de.value), Q.setVideoResolution(ae.value), g.watch(
u.CALL,
Ot,
{
notifyRangeWhenWatch: i.MYSELF
}
), g.watch(u.CALL, {
[i.IS_MINIMIZED]: wt
});
});
function jo(K, Re) {
switch (Re) {
case "info":
HA == null || HA.info(K);
break;
case "error":
HA == null || HA.error(K);
break;
}
}
return DA(async () => {
g.unwatch(u.CALL, {
...Ot,
[i.IS_MINIMIZED]: wt
});
}), OA(Na, F), OA(ga, tA), OA(Ta, J), OA(ya, MA), OA(ja, x), (K, Re) => l(F).callStatus !== l(P).IDLE ? (d(), y("div", {
key: 0,
style: eA([{ visibility: l(MA).isFloatWindow ? "hidden" : "" }]),
id: "tuicallkit-id",
class: k([l(e), l(t), l(n), l(o)])
}, [
l(F).isGroupCall ? (d(), U(pu, {
key: 1,
class: "singCall"
})) : (d(), U(Er, {
key: 0,
class: "singCall"
}))
], 6)) : z("", !0);
}
});
const ro = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3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U9ImV2ZW5vZGQiIGQ9Ik04Ljg4ODc2IDIuMTMzM0M4LjY5MjM5IDIuMTMzMyA4LjUzMzIgMi4yOTI0OSA4LjUzMzIgMi40ODg4NlY2LjE3MzdDOC41MzMyIDYuMzcwMDYgOC42OTIzOSA2LjUyOTI1IDguODg4NzYgNi41MjkyNUgxMi41NzM2QzEyLjc3IDYuNTI5MjUgMTIuOTI5MiA2LjM3MDA2IDEyLjkyOTIgNi4xNzM3VjUuOTg3ODJDMTIuOTI5MiA1Ljc1MzcgMTMuMTcyMyA1LjU5ODgzIDEzLjM4NDUgNS42OTc4NEwxNC4wNzE0IDYuMDE4NDFDMTQuMzA3MSA2LjEyODQxIDE0LjU3NzMgNS45NTYzNCAxNC41NzczIDUuNjk2MjFWMi45NjYzM0MxNC41NzczIDIuNzA2MiAxNC4zMDcxIDIuNTM0MTMgMTQuMDcxNCAyLjY0NDE0TDEzLjM4NDUgMi45NjQ3QzEzLjE3MjMgMy4wNjM3MSAxMi45MjkyIDIuOTA4ODQgMTIuOTI5MiAyLjY3NDcyVjIuNDg4ODZDMTIuOTI5MiAyLjI5MjQ5IDEyLjc3IDIuMTMzMyAxMi41NzM2IDIuMTMzM0g4Ljg4ODc2WiIgZmlsbD0iIzFDNjZFNSIvPgo8L3N2Zz4K", qu = { class: "banner-pc" }, Ju = { class: "text" }, Hu = { class: "content" }, Ku = { class: "avatar-box" }, _u = /* @__PURE__ */ f({
__name: "JoinGroupCard",
props: {
userListInfo: {
type: Array,
default: []
}
},
emits: ["joinGroupCall"],
setup(a, { emit: A }) {
const e = A, t = p(!1), o = () => {
e("joinGroupCall"), t.value = !1;
}, n = () => {
t.value = !t.value;
};
return (s, r) => (d(), y("div", qu, [
L("div", {
class: "top",
onClick: n
}, [
C(LA, {
class: "call-icon",
src: l(ro),
width: "16px",
height: "16px"
}, null, 8, ["src"]),
L("span", Ju, W(a.userListInfo.length) + " " + W(l(v)("people on the call")), 1)
]),
sA(L("div", Hu, [
r[0] || (r[0] = L("div", { class: "content-arrows" }, null, -1)),
L("div", Ku, [
(d(!0), y(RA, null, ce(a.userListInfo, (c) => (d(), U(LA, {
class: "avatar",
src: c == null ? void 0 : c.avatar,
defaultSrc: l(QA),
fit: "cover",
width: "32px",
height: "32px"
}, null, 8, ["src", "defaultSrc"]))), 256))
]),
L("div", {
class: "btn",
onClick: o
}, W(l(v)("join")), 1)
], 512), [
[cA, l(t)]
])
]));
}
});
const $u = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNiIgdmlld0JveD0iMCAwIDEwIDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOS41IDMuOTM0MDNlLTA3TDUgMy43NUwwLjUgMS41OTIwNGUtMDdMMC41IDEuNTYyMDVMNC42MTU4OSA0Ljk5MTk2TDUgNS4zMTIwNUw1LjM4NDExIDQuOTkxOTZMOS41IDEuNTYyMDVMOS41IDMuOTM0MDNlLTA3WiIgZmlsbD0iIzY2NjY2NiIvPgo8L3N2Zz4K", AM = { class: "banner-h5" }, eM = { class: "left" }, tM = { class: "text" }, aM = { class: "content-box" }, oM = { class: "content" }, lM = { class: "avatar-box" }, nM = /* @__PURE__ */ f({
__name: "JoinGroupCard",
props: {
userListInfo: {
type: Array,
default: []
}
},
emits: ["joinGroupCall"],
setup(a, { emit: A }) {
const e = p({ margin: "8px 10px 8px 0px" }), t = p({
margin: "6px",
borderRadius: "4px"
}), o = p(!1), n = A, s = () => {
n("joinGroupCall"), o.value = !1;
}, r = () => {
o.value = !o.value;
};
return (c, M) => (d(), y("div", AM, [
L("div", {
class: "top",
onClick: r
}, [
L("div", eM, [
C(LA, {
class: "call-icon",
src: l(ro),
width: "16px",
height: "16px",
customStyle: l(e)
}, null, 8, ["src", "customStyle"]),
L("span", tM, W(a.userListInfo.length) + " " + W(l(v)("people on the call")), 1)
]),
C(LA, {
src: l($u),
width: "9px",
height: "9px"
}, null, 8, ["src"])
]),
sA(L("div", aM, [
L("div", oM, [
L("div", lM, [
(d(!0), y(RA, null, ce(a.userListInfo, (N) => (d(), U(LA, {
src: N == null ? void 0 : N.avatar,
customStyle: l(t),
defaultSrc: l(QA),
fit: "cover",
width: "50px",
height: "50px"
}, null, 8, ["src", "customStyle", "defaultSrc"]))), 256))
]),
L("div", {
class: "btn",
onClick: pe(s, ["stop"])
}, W(l(v)("join")), 1)
])
], 512), [
[cA, l(o)]
])
]));
}
});
const iM = /* @__PURE__ */ f({
__name: "JoinGroupCard",
setup(a) {
const A = p(V.isPC), e = p(null), { groupId: t, roomId: o, roomIdType: n, callMediaType: s, groupCallMembers: r, callStatus: c } = G(Gl()), M = S(() => t && (c == null ? void 0 : c.value) === P.IDLE && r.value.length), N = async () => {
if (r.value.length > 9) {
e.value.show({
message: "Supports a maximum of 9 people for simultaneous calls",
type: "success"
});
return;
}
const T = {
type: s.value,
groupID: t.value,
roomID: n.value === 1 ? Number(o.value) : 0,
strRoomID: String(o.value)
};
try {
await Q.joinInGroupCall(T);
} catch (I) {
console.error(`${i.PREFIX}joinInGroupCall fail: ${I}`);
}
};
return (T, I) => sA((d(), y("div", null, [
l(A) ? (d(), U(_u, {
key: 0,
userListInfo: l(r),
onJoinGroupCall: N
}, null, 8, ["userListInfo"])) : (d(), U(nM, {
key: 1,
userListInfo: l(r),
onJoinGroupCall: N
}, null, 8, ["userListInfo"])),
C(to, {
ref_key: "message",
ref: e
}, null, 512)
], 512)), [
[cA, l(M)]
]);
}
}), sM = (a) => (a.component("TUICallKit", { server: Q }), Q.bindTUICore(a), it), cM = (a) => {
a.component("TUICallKit", it).component("JoinGroupCard", iM), console.log("TUICallKit&mini installed", a);
};
it.plugin = sM;
it.install = cM;
const IM = {
AUDIO_CALL: 1,
VIDEO_CALL: 2
}, NM = "3.3.7";
export {
_ as CallMediaType,
IA as CallRole,
_A as FeatureButton,
iM as JoinGroupCard,
Xe as LayoutMode,
i as NAME,
jA as STATUS,
u as StoreName,
it as TUICallKit,
Q as TUICallKitServer,
IM as TUICallType,
V as TUIGlobal,
g as TUIStore,
NM as Version,
fe as VideoDisplayMode,
ve as VideoResolution,
cM as install,
sM as plugin,
v as t,
YA as uiDesign
};