trtc-sdk-v5 5.9.2-beta.1 → 5.9.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1791 -1794
- package/package.json +1 -1
- package/plugins/cdn-streaming/cdn-streaming.esm.js +1 -1
- package/plugins/cdn-streaming/cdn-streaming.iife.js +1 -0
- package/plugins/cdn-streaming/package.json +2 -1
- package/plugins/cross-room/cross-room.esm.js +1 -1
- package/plugins/cross-room/cross-room.iife.js +1 -0
- package/plugins/cross-room/package.json +2 -1
- package/plugins/device-detector/device-detector.esm.js +1234 -93
- package/plugins/device-detector/device-detector.iife.js +1472 -0
- package/plugins/device-detector/package.json +2 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-decoder/video-decoder.esm.js +43 -1
- package/plugins/video-decoder/video-decoder.iife.js +43 -0
- package/plugins/video-effect/basic-beauty/basic-beauty.esm.js +2 -1
- package/plugins/video-effect/basic-beauty/basic-beauty.iife.js +2 -0
- package/plugins/video-effect/basic-beauty/package.json +2 -1
- package/plugins/video-effect/beauty/beauty.esm.js +2954 -1
- package/plugins/video-effect/beauty/beauty.iife.js +2954 -0
- package/plugins/video-effect/beauty/package.json +2 -1
- package/plugins/video-effect/virtual-background/package.json +2 -1
- package/plugins/video-effect/virtual-background/virtual-background.esm.js +60 -1
- package/plugins/video-effect/virtual-background/virtual-background.iife.js +60 -0
- package/plugins/video-effect/watermark/package.json +2 -1
- package/plugins/video-effect/watermark/watermark.esm.d.ts +2 -10
- package/plugins/video-effect/watermark/watermark.esm.js +1 -1
- package/plugins/video-effect/watermark/watermark.iife.js +1 -0
- package/trtc.esm.js +26 -26
- package/trtc.js +1 -1
- package/plugins/cdn-streaming/cdn-streaming.umd.js +0 -1
- package/plugins/cross-room/cross-room.umd.js +0 -1
- package/plugins/custom-encryption/custom-encryption.esm.d.ts +0 -31
- package/plugins/custom-encryption/custom-encryption.esm.js +0 -1
- package/plugins/custom-encryption/custom-encryption.umd.js +0 -1
- package/plugins/custom-encryption/package.json +0 -7
- package/plugins/debug/debug.esm.js +0 -1
- package/plugins/debug/debug.umd.js +0 -1
- package/plugins/device-detector/device-detector.umd.js +0 -39
- package/plugins/video-decoder/video-decoder.umd.js +0 -1
- package/plugins/video-decoder/videodec.wasm +0 -0
- package/plugins/video-decoder/videodec_simd.wasm +0 -0
- package/plugins/video-effect/basic-beauty/basic-beauty.umd.js +0 -1
- package/plugins/video-effect/beauty/beauty.umd.js +0 -1
- package/plugins/video-effect/virtual-background/virtual-background.umd.js +0 -1
- package/plugins/video-effect/watermark/watermark.umd.js +0 -1
- package/plugins/voice-changer/package.json +0 -9
- package/plugins/voice-changer/voice-changer.esm.d.ts +0 -20
- package/plugins/voice-changer/voice-changer.esm.js +0 -1
- package/plugins/voice-changer/voice-changer.umd.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__defNormalProp=(e,t,i)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,__decorateClass=(e,t,i,o)=>{for(var n,r=o>1?void 0:o?__getOwnPropDesc(t,i):t,a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&__defProp(t,i,r),r},__publicField=(e,t,i)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,i),i);function startValidateRule(){return{name:"StartDebugOptions",required:!1}}function updateValidateRule(){return{name:"UpdateDebugOptions",required:!1}}function stopValidateRule(){return{name:"StopDebugOptions",required:!1}}var IS_LOCAL="undefined"!=typeof location&&("file:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname),isMobile=()=>{const e=window.navigator&&window.navigator.userAgent||"",t=/iPad/i.test(e)||/iPhone/i.test(e),i=/Android/i.test(e);return t||i},isLangChinese=()=>{let e=navigator.language;return e=e.substring(0,2),"zh"===e},_isLangChinese=isLangChinese(),NAME={LOG_BUTTON:_isLangChinese?"日志":"Log",NETWORK_BUTTON:_isLangChinese?"网络":"Network",UPLOAD_BUTTON:_isLangChinese?"上传":"Upload",EXPORT_BUTTON:_isLangChinese?"导出":"Export",HIDE_BUTTON:_isLangChinese?"隐藏":"Hide",GO_BOTTOM:_isLangChinese?"底部":"goBottom",BACK_TOP:_isLangChinese?"顶部":"backTop",UPLINK:_isLangChinese?"上行":"Uplink",Downlink:_isLangChinese?"下行":"Downlink",NO_DATA:_isLangChinese?"暂无数据":"No Data",BASIC:_isLangChinese?"基础":"Basic"},escapedStringToReg=e=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(">",">").replace(">","<"),infoMap={"play() error: NotAllowedError:":{tips_zh:e=>e.includes("main <video>")||e.includes("main <audio>")?"远端流自动播放受限导致播放失败":"本地流出现自动播放失败报错,一般只出现在 Android 微信设备,无需处理",tips_en:e=>e.includes("main <video>")||e.includes("main <audio>")?"Remote stream auto play is restricted and playback fails":"Local stream playback failure, generally only occurs in Android WeChat devices, no need to handle",color:"red",class:"red"},"updateStream() try to recover local stream":{tips_zh:"设备采集异常,正在尝试自动恢复采集",tips_en:"Device acquisition exception, automatic recovery is in progress"},"updateStream() recover local stream successfully":{tips_zh:"设备采集异常,自动恢复采集成功",tips_en:"Device acquisition exception, automatic recovery is successful"},"updateStream() failed to recover local stream":{tips_zh:"设备采集异常,自动恢复采集失败",tips_en:"Device acquisition exception, automatic recovery failed"},"main stream - video track is muted":{tips_zh:"表示收到的视频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received video data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - audio track is muted":{tips_zh:"表示收到的音频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received audio data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"auxiliary stream - video track is muted":{tips_zh:"表示收到的屏幕分享数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received screen sharing data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - video track is unable to provide media output":{tips_zh:"表示收到的视频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received video data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - audio track is unable to provide media output":{tips_zh:"表示收到的音频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received audio data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"auxiliary stream - video track is unable to provide media output":{tips_zh:"表示收到的屏幕分享数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received screen sharing data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - video track is unmuted":{tips_zh:"收到了足够播放的视频数据",tips_en:"Received enough playback video data"},"main stream - audio track is unmuted":{tips_zh:"收到了足够播放的音频数据",tips_en:"Received enough playback audio data"},"auxiliary stream - video track is unmuted":{tips_zh:"收到了足够播放的屏幕分享数据",tips_en:"Received enough playback screen sharing data"},"main stream - audio player track is ended":{tips_zh:"远端音频轨道停止",tips_en:"Remote audio track stopped"},"main stream - video player track is ended":{tips_zh:"远端视频轨道停止",tips_en:"Remote video track stopped"},"auxiliary stream - video player track is ended":{tips_zh:"远端屏幕分享轨道停止",tips_en:"Received enough playback screen sharing data"},"stream - video track is muted":{tips_zh:"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。",tips_en:"Camera capture is paused, usually due to the device being occupied by other applications or the browser media permission being revoked. The client needs to re-capture.",color:"orange"},"stream - video track is unable to provide media output":{tips_zh:"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked, and the customer needs to re-acquire. SDK v4.11.4+ will automatically resume acquisition without customer intervention",color:"orange"},"video track is unable to provide media output":{tips_zh:e=>e.includes("↓")?"远端 track 暂时无法解码数据,可能是网络波动导致":"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致。SDK 会自动恢复采集。",tips_en:e=>e.includes("↓")?"The remote track is temporarily unable to decode data, which may be caused by network fluctuations":"The camera acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition.",color:"orange"},"stream - video player track is ended":{tips_zh:"摄像头采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"video player track is ended":{tips_zh:"摄像头采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"stream - audio track is muted":{tips_zh:"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。",tips_en:"Microphone capture is paused, usually due to the device being occupied by other applications or the browser media permission being revoked. The client needs to re-capture.",color:"orange"},"audio track is unable to provide media output":{tips_zh:e=>e.includes("↓")?"远端 track 暂时无法解码数据,可能是网络波动导致":"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致。SDK 会自动恢复采集。",tips_en:e=>e.includes("↓")?"The remote track is temporarily unable to decode data, which may be caused by network fluctuations":"Microphone acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition.",color:"orange"},"stream - audio track is unable to provide media output":{tips_zh:"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The microphone acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition.",color:"orange"},"stream - audio player track is ended":{tips_zh:"麦克风采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,建议此时在页面提醒用户重新采集。",tips_en:"The microphone acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"audio player track is ended":{tips_zh:"麦克风采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,建议此时在页面提醒用户重新采集。",tips_en:"The microphone acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"is adding audio track to current published local stream":{tips_zh:"添加音频轨",tips_en:"add audio track",color:"orange"},"is removing audio track from current published local stream":{tips_zh:"移除音频轨",tips_en:"remove audio track",color:"orange"},"is removing video track from current published local stream":{tips_zh:"移除视频轨",tips_en:"remove video track",color:"orange"},"is adding video track to current published local stream":{tips_zh:"添加视频轨",tips_en:"add video track",color:"orange"},"is replacing audio track to current published local main stream":{tips_zh:"替换音频轨",tips_en:"replace audio track",color:"orange"},"is replacing video track to current published local main stream":{tips_zh:"替换视频轨",tips_en:"replace video track",color:"orange"},"downlink network quality change":{tips_zh:"下行网络变更,1: 极佳,2:较好,3:一般,4:较差,5:极差",tips_en:"Downstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"uplink network quality change":{tips_zh:"上行网络变更,1: 极佳,2:较好,3:一般,4:较差,5:极差",tips_en:"Upstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"localStream mute video":{tips_zh:"mute 上行视频流",tips_en:"mute upstream video stream",color:"orange"},"localStream unmute video":{tips_zh:"unmute 上行视频流",tips_en:"unmute upstream video stream",color:"orange"},"localStream mute audio":{tips_zh:"mute 上行音频流",tips_en:"mute upstream audio stream",color:"orange"},"localStream unmute audio":{tips_zh:"unmute 上行音频流",tips_en:"unmute upstream audio stream",color:"orange"},"black detected":{tips_zh:"检测到黑屏,表示当前 fps = 0。通常是网络引起,网络恢复后会恢复正常。若网络正常时,一直未恢复,则为异常情况。",tips_en:"Detect black screen, which means fps = 0. It is usually caused by network, and the network will be recovered after a while. If the network is normal but has not been restored, it is an abnormal situation."},'main stream start to play with options: {"muted":true}':{tips_zh:"已静音的方式播放远端流,一般远端流不需要静音播放,需确认客户 stream.play 接口调用的传参是否正确。",tips_en:"Play the remote stream in silent mode. Generally, the remote stream does not need to be played in silent mode. You need to confirm whether the parameters passed in the client stream.play API call are correct.",color:"orange"},"main stream - audio player is starting playing":{tips_zh:"远端流音频播放成功",tips_en:"Remote stream audio playback success",color:"#0dd90d",class:"success"},"main stream - video player is starting playing":{tips_zh:"远端流视频播放成功",tips_en:"Remote stream video playback success",color:"#0dd90d",class:"success"},"video player is playing":{tips_zh:"本地视频播放成功",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"audio player is playing":{tips_zh:"本地音频播放成功",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"stream - video player is starting playing":{tips_zh:"本地视频播放成功",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"stream - audio player is starting playing":{tips_zh:"本地音频播放成功",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"switch camera success":{tips_zh:"切换摄像头成功",tips_en:"Switch camera success",color:"#0dd90d",class:"success"},"switch microphone success":{tips_zh:"切换麦克风成功",tips_en:"Switch microphone success",color:"#0dd90d",class:"success"},gotStream:{tips_zh:"本地流采集成功",tips_en:"Local stream capture success"},"local stream is published successfully":{tips_zh:"推流成功",tips_en:"Publish success",color:"#0dd90d",class:"success"},"encoderImplementation change to OpenH264":{tips_zh:"使用软编",tips_en:"Use software encoding"},"encoderImplementation change to ExternalEncoder":{tips_zh:"使用硬编",tips_en:"Use hardware encoding"},"getUserMedia with constraints":{tips_zh:"开始媒体(摄像头/麦克风)采集",tips_en:"Start media (camera/microphone) capture"},"getDisplayMedia with constraints":{tips_zh:"开始屏幕分享采集",tips_en:"Start screen sharing capture"},"client-banned":{tips_zh:"被踢出房间",tips_en:"Kicked out of the room",color:"red",class:"red",textColor:"#fff"},user_timeout:{tips_zh:"后台长时间没收到 sdk 心跳导致被踢,通常是用户 JS 线程长时间阻塞导致,若复现概率较高,应用浏览器 Performance 工具分析是哪里导致 JS 线程阻塞。",tips_en:"The backend is too long without receiving SDK heartbeat, which is usually caused by the JS thread being blocked for a long time. If the reproduction probability is high, the application browser Performance tool analyzes where the JS thread is blocked.",color:"red",class:"red",textColor:"#fff"},"schedule failed":{tips_zh:"信令调度请求失败,不影响正常进房流程,SDK 会连接默认的信令域名。",tips_en:"Signaling request failed, does not affect the normal room entry process, SDK will connect to the default signaling domain."},"updateStream() video flag is true, but no camera detected, set video to false":{tips_zh:"尝试恢复摄像头采集时,由于检测到没有摄像头,不恢复摄像头采集",tips_en:"When trying to resume camera acquisition, the camera acquisition is not resumed because it is detected that there is no camera.",color:"orange",class:"orange",textColor:"#fff"},"qualityLimitationReason change to bandwidth":{tips_zh:"带宽预估不够导致编码质量受限,可能会出现编码码率、帧率、分辨率降低问题。通常是网络导致。",tips_en:"bandwidth estimation is not enough to limit the quality of the encoding, which may cause the code rate, frame rate, and resolution to be lowered.",color:"orange",class:"orange",textColor:"#fff"},"qualityLimitationReason change to cpu":{tips_zh:"cpu 负荷太高导致编码质量受限,可能会出现编码码率、帧率、分辨率降低问题。",tips_en:"cpu load is too high to limit the quality of the encoding, which may cause the code rate, frame rate, and resolution to be lowered.",color:"orange",class:"orange",textColor:"#fff"},"visibility change: hidden":{tips_zh:"用户页面切后台,在移动端这会导致设备采集暂停,切回前台时会恢复采集",tips_en:"User page switched to backend, in mobile devices, this will cause the device to pause the capture, and it will be restored when the user switches backend to the frontend.",color:"orange",class:"orange",textColor:"#fff"},"visibility change: visible":{tips_zh:"用户页面切回前台",tips_en:"User page switched to frontend",color:"orange",class:"orange",textColor:"#fff"},"main stream - audio player is paused":{tips_zh:"远端流音频播放暂停,一般有两种可能:\n 1. 业务侧传入用于播放音视频的 div 标签容器被业务侧从 DOM 移除。\n 2. 用户在 Chrome 70 及以下版本,当移动 div 容器时,会导致播放暂停。",tips_en:"The remote stream audio playback is paused, which usually has two possibilities:\n 1. The business side passes in the div tag container for playing audio and video to be removed by the business side from the DOM.\n 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.",color:"orange",class:"orange",textColor:"#fff"},"main stream - video player is paused":{tips_zh:"远端流视频播放暂停,一般有两种可能:\n 1. 业务侧传入用于播放音视频的 div 标签容器被业务侧从 DOM 移除。\n 2. 用户在 Chrome 70 及以下版本,当移动 div 容器时,会导致播放暂停。",tips_en:"The remote stream video playback is paused, which usually has two possibilities:\n 1. The business side passes in the div tag container for playing audio and video to be removed by the business side from the DOM.\n 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.",color:"orange",class:"orange",textColor:"#fff"},'"displaySurface":"window"':{tips_zh:"屏幕分享采集了应用窗口",tips_en:"Screen sharing captures the application window",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"monitor"':{tips_zh:"屏幕分享采集了整个屏幕",tips_en:"Screen sharing captures the entire screen",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"browser"':{tips_zh:"屏幕分享采集了某个标签页",tips_en:"Screen sharing captures a certain tab page",color:"blue",class:"blue",textColor:"#fff"},updateMediaSettings:{tips_zh:"该日志下的分辨率、帧率为实际采集出的分辨率及帧率",tips_en:"The resolution and frame rate below are the actual resolution and frame rate captured",color:"blue",class:"blue",textColor:"#fff"},"main stream start to play with":{tips_zh:"调用 remoteStream.play 接口",tips_en:"Call remoteStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"stream start to play with":{tips_zh:"调用 localStream.play 接口",tips_en:"Call localStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"main setAudioVolume to 0":{tips_zh:"业务侧调用 remoteStream.setAudioVolume(0) 接口,将播放音量设置为 0,会导致播放无声",tips_en:"Business side calls remoteStream.setAudioVolume(0) interface to set the playback volume to 0, which will cause the playback to be silent",color:"orange",class:"orange",textColor:"#fff"},"screen sharing was stopped because the video track is ended":{tips_zh:"屏幕分享采集停止,可能原因:用户点击停止采集按钮、分享的窗口/页面被关闭等。",tips_en:"Screen sharing capture stopped, possible reasons: user clicks the stop button, the window/page shared by the user is closed, etc.",color:"orange",class:"orange",textColor:"#fff"},"Join() => joining room":{tips_zh:"调用 client.join 接口",tips_en:"Call client.join interface",color:"blue",class:"blue",textColor:"#fff"},"publish() => publishing local stream":{tips_zh:"调用 client.publish 接口",tips_en:"Call client.publish interface",color:"blue",class:"blue",textColor:"#fff"},"subscribe() => subscribe to":{tips_zh:"调用 client.subscribe 接口",tips_en:"Call client.subscribe interface",color:"blue",class:"blue",textColor:"#fff"},"switchRole() => switch role":{tips_zh:"调用 client.switchRole 接口",tips_en:"Call client.switchRole interface",color:"blue",class:"blue",textColor:"#fff"}};["enterRoom","exitRoom","switchRole","destroy","startLocalAudio","updateLocalAudio","stopLocalAudio","startLocalVideo","updateLocalVideo","stopLocalVideo","startScreenShare","updateScreenShare","stopScreenShare","startRemoteVideo","updateRemoteVideo","stopRemoteVideo","muteRemoteAudio","setRemoteAudioVolume"].forEach((e=>{infoMap[`${e}()`]={tips_zh:`调用 trtc.${e}`,tips_en:`Call trtc.${e}`,color:"blue",class:"blue",textColor:"#fff"}}));var infoMapKey=Object.keys(infoMap);function createDecorator(e){return function(t,i,o){return o.value=e(o.value,i),o}}var timeoutMap=new WeakMap;function debounce(e,t){return createDecorator(((i,o)=>function(...o){var n,r;const a=null==(n=timeoutMap.get(this))?void 0:n.get(t(...o));a&&a>0&&clearTimeout(a);const s=window.setTimeout((()=>{i.apply(this,o)}),e);timeoutMap.has(this)?null==(r=timeoutMap.get(this))||r.set(t(...o),s):timeoutMap.set(this,new Map([[t(...o),s]]))}))}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},o=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,i),Object.keys(o).forEach((function(e){var t=o[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(o)&&getNodeName(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){o.removeAttribute(e)})))}))}}var applyStyles_default={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1);var o=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round(o.height)/e.offsetHeight||1);var a=(isElement(e)?getWindow(e):window).visualViewport,s=!isLayoutViewport()&&i,l=(o.left+(s&&a?a.offsetLeft:0))/n,c=(o.top+(s&&a?a.offsetTop:0))/r,d=o.width/n,u=o.height/r;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function getLayoutRect(e){var t=getBoundingClientRect(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function contains(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&isShadowRoot(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle(e).position)return null;var i=getParentNode(e);for(isShadowRoot(i)&&(i=i.host);isHTMLElement(i)&&["html","body"].indexOf(getNodeName(i))<0;){var o=getComputedStyle(i);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return i;i=i.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),i=getTrueOffsetParent(e);i&&isTableElement(i)&&"static"===getComputedStyle(i).position;)i=getTrueOffsetParent(i);return i&&("html"===getNodeName(i)||"body"===getNodeName(i)&&"static"===getComputedStyle(i).position)?t:i||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,i){return max(e,min(t,i))}function withinMaxClamp(e,t,i){var o=within(e,t,i);return o>i?i:o}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,i=e.state,o=e.name,n=e.options,r=i.elements.arrow,a=i.modifiersData.popperOffsets,s=getBasePlacement(i.placement),l=getMainAxisFromPlacement(s),c=[left,right].indexOf(s)>=0?"height":"width";if(r&&a){var d=toPaddingObject(n.padding,i),u=getLayoutRect(r),p="y"===l?top:left,f="y"===l?bottom:right,h=i.rects.reference[c]+i.rects.reference[l]-a[l]-i.rects.popper[c],m=a[l]-i.rects.reference[l],g=getOffsetParent(r),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,v=h/2-m/2,b=d[p],y=_-u[c]-d[f],S=_/2-u[c]/2+v,w=within(b,S,y),A=l;i.modifiersData[o]=((t={})[A]=w,t.centerOffset=w-S,t)}}function effect2(e){var t=e.state,i=e.options.element,o=void 0===i?"[data-popper-arrow]":i;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&contains(t.elements.popper,o)&&(t.elements.arrow=o)}var arrow_default={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var i=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:round(i*n)/n||0,y:round(o*n)/n||0}}function mapToStyles(e){var t,i=e.popper,o=e.popperRect,n=e.placement,r=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,g="function"==typeof d?d({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),b=left,y=top,S=window;if(c){var w=getOffsetParent(i),A="clientHeight",T="clientWidth";if(w===getWindow(i)&&"static"!==getComputedStyle(w=getDocumentElement(i)).position&&"absolute"===s&&(A="scrollHeight",T="scrollWidth"),n===top||(n===left||n===right)&&r===end)y=bottom,m-=(u&&w===S&&S.visualViewport?S.visualViewport.height:w[A])-o.height,m*=l?1:-1;if(n===left||(n===top||n===bottom)&&r===end)b=right,f-=(u&&w===S&&S.visualViewport?S.visualViewport.width:w[T])-o.width,f*=l?1:-1}var L,C=Object.assign({position:s},c&&unsetSides),O=!0===d?roundOffsetsByDPR({x:f,y:m},getWindow(i)):{x:f,y:m};return f=O.x,m=O.y,l?Object.assign({},C,((L={})[y]=v?"0":"",L[b]=_?"0":"",L.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",L)):Object.assign({},C,((t={})[y]=v?m+"px":"",t[b]=_?f+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,i=e.options,o=i.gpuAcceleration,n=void 0===o||o,r=i.adaptive,a=void 0===r||r,s=i.roundOffsets,l=void 0===s||s,c={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles_default={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect3(e){var t=e.state,i=e.instance,o=e.options,n=o.scroll,r=void 0===n||n,a=o.resize,s=void 0===a||a,l=getWindow(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&c.forEach((function(e){e.addEventListener("scroll",i.update,passive)})),s&&l.addEventListener("resize",i.update,passive),function(){r&&c.forEach((function(e){e.removeEventListener("scroll",i.update,passive)})),s&&l.removeEventListener("resize",i.update,passive)}}var eventListeners_default={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect3,data:{}},hash={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash[e]}))}var hash2={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash2[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var i=getWindow(e),o=getDocumentElement(e),n=i.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(n){r=n.width,a=n.height;var c=isLayoutViewport();(c||!c&&"fixed"===t)&&(s=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:s+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,i=getDocumentElement(e),o=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=max(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+getWindowScrollBarX(e),l=-o.scrollTop;return"rtl"===getComputedStyle(n||i).direction&&(s+=max(i.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:s,y:l}}function isScrollParent(e){var t=getComputedStyle(e),i=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+o)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var i;void 0===t&&(t=[]);var o=getScrollParent(e),n=o===(null==(i=e.ownerDocument)?void 0:i.body),r=getWindow(o),a=n?[r].concat(r.visualViewport||[],isScrollParent(o)?o:[]):o,s=t.concat(a);return n?s:s.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var i=getBoundingClientRect(e,!1,"fixed"===t);return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function getClientRectFromMixedType(e,t,i){return t===viewport?rectToClientRect(getViewportRect(e,i)):isElement(t)?getInnerBoundingClientRect(t,i):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),i=["absolute","fixed"].indexOf(getComputedStyle(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement(i)?t.filter((function(e){return isElement(e)&&contains(e,i)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,i,o){var n="clippingParents"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[i]),a=r[0],s=r.reduce((function(t,i){var n=getClientRectFromMixedType(e,i,o);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(e){var t,i=e.reference,o=e.element,n=e.placement,r=n?getBasePlacement(n):null,a=n?getVariation(n):null,s=i.x+i.width/2-o.width/2,l=i.y+i.height/2-o.height/2;switch(r){case top:t={x:s,y:i.y-o.height};break;case bottom:t={x:s,y:i.y+i.height};break;case right:t={x:i.x+i.width,y:l};break;case left:t={x:i.x-o.width,y:l};break;default:t={x:i.x,y:i.y}}var c=r?getMainAxisFromPlacement(r):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case start:t[c]=t[c]-(i[d]/2-o[d]/2);break;case end:t[c]=t[c]+(i[d]/2-o[d]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var i=t,o=i.placement,n=void 0===o?e.placement:o,r=i.strategy,a=void 0===r?e.strategy:r,s=i.boundary,l=void 0===s?clippingParents:s,c=i.rootBoundary,d=void 0===c?viewport:c,u=i.elementContext,p=void 0===u?popper:u,f=i.altBoundary,h=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=mergePaddingObject("number"!=typeof g?g:expandToHashMap(g,basePlacements)),v=p===popper?reference:popper,b=e.rects.popper,y=e.elements[h?v:p],S=getClippingRect(isElement(y)?y:y.contextElement||getDocumentElement(e.elements.popper),l,d,a),w=getBoundingClientRect(e.elements.reference),A=computeOffsets({reference:w,element:b,strategy:"absolute",placement:n}),T=rectToClientRect(Object.assign({},b,A)),L=p===popper?T:w,C={top:S.top-L.top+_.top,bottom:L.bottom-S.bottom+_.bottom,left:S.left-L.left+_.left,right:L.right-S.right+_.right},O=e.modifiersData.offset;if(p===popper&&O){var E=O[n];Object.keys(C).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,i=[top,bottom].indexOf(e)>=0?"y":"x";C[e]+=E[i]*t}))}return C}function computeAutoPlacement(e,t){void 0===t&&(t={});var i=t,o=i.placement,n=i.boundary,r=i.rootBoundary,a=i.padding,s=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?placements:l,d=getVariation(o),u=d?s?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===d})):basePlacements,p=u.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=u);var f=p.reduce((function(t,i){return t[i]=detectOverflow(e,{placement:i,boundary:n,rootBoundary:r,padding:a})[getBasePlacement(i)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=i.mainAxis,r=void 0===n||n,a=i.altAxis,s=void 0===a||a,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,p=i.altBoundary,f=i.flipVariations,h=void 0===f||f,m=i.allowedAutoPlacements,g=t.options.placement,_=getBasePlacement(g),v=l||(_===g||!h?[getOppositePlacement(g)]:getExpandedFallbackPlacements(g)),b=[g].concat(v).reduce((function(e,i){return e.concat(getBasePlacement(i)===auto?computeAutoPlacement(t,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):i)}),[]),y=t.rects.reference,S=t.rects.popper,w=new Map,A=!0,T=b[0],L=0;L<b.length;L++){var C=b[L],O=getBasePlacement(C),E=getVariation(C)===start,x=[top,bottom].indexOf(O)>=0,D=x?"width":"height",k=detectOverflow(t,{placement:C,boundary:d,rootBoundary:u,altBoundary:p,padding:c}),N=x?E?right:left:E?bottom:top;y[D]>S[D]&&(N=getOppositePlacement(N));var R=getOppositePlacement(N),P=[];if(r&&P.push(k[O]<=0),s&&P.push(k[N]<=0,k[R]<=0),P.every((function(e){return e}))){T=C,A=!1;break}w.set(C,P)}if(A)for(var M=function(e){var t=b.find((function(t){var i=w.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},I=h?3:1;I>0;I--){if("break"===M(I))break}t.placement!==T&&(t.modifiersData[o]._skip=!0,t.placement=T,t.reset=!0)}}var flip_default={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,i=e.name,o=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),s=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,o),c=getSideOffsets(s,n,r),d=isAnySideFullyClipped(l),u=isAnySideFullyClipped(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}var hide_default={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,i){var o=getBasePlacement(e),n=[left,top].indexOf(o)>=0?-1:1,r="function"==typeof i?i(Object.assign({},t,{placement:e})):i,a=r[0],s=r[1];return a=a||0,s=(s||0)*n,[left,right].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}function offset(e){var t=e.state,i=e.options,o=e.name,n=i.offset,r=void 0===n?[0,0]:n,a=placements.reduce((function(e,i){return e[i]=distanceAndSkiddingToXY(i,t.rects,r),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=a}var offset_default={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,i=e.name;t.modifiersData[i]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets_default={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,i=e.options,o=e.name,n=i.mainAxis,r=void 0===n||n,a=i.altAxis,s=void 0!==a&&a,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,p=i.tether,f=void 0===p||p,h=i.tetherOffset,m=void 0===h?0:h,g=detectOverflow(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),_=getBasePlacement(t.placement),v=getVariation(t.placement),b=!v,y=getMainAxisFromPlacement(_),S=getAltAxis(y),w=t.modifiersData.popperOffsets,A=t.rects.reference,T=t.rects.popper,L="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(w){if(r){var x,D="y"===y?top:left,k="y"===y?bottom:right,N="y"===y?"height":"width",R=w[y],P=R+g[D],M=R-g[k],I=f?-T[N]/2:0,B=v===start?A[N]:T[N],$=v===start?-T[N]:-A[N],W=t.elements.arrow,F=f&&W?getLayoutRect(W):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),V=z[D],H=z[k],U=within(0,A[N],F[N]),j=b?A[N]/2-I-U-V-C.mainAxis:B-U-V-C.mainAxis,q=b?-A[N]/2+I+U+H+C.mainAxis:$+U+H+C.mainAxis,K=t.elements.arrow&&getOffsetParent(t.elements.arrow),X=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,G=null!=(x=null==O?void 0:O[y])?x:0,Y=R+q-G,Q=within(f?min(P,R+j-G-X):P,R,f?max(M,Y):M);w[y]=Q,E[y]=Q-R}if(s){var J,Z="x"===y?top:left,ee="x"===y?bottom:right,te=w[S],ie="y"===S?"height":"width",oe=te+g[Z],ne=te-g[ee],re=-1!==[top,left].indexOf(_),ae=null!=(J=null==O?void 0:O[S])?J:0,se=re?oe:te-A[ie]-T[ie]-ae+C.altAxis,le=re?te+A[ie]+T[ie]-ae-C.altAxis:ne,ce=f&&re?withinMaxClamp(se,te,le):within(f?se:oe,te,f?le:ne);w[S]=ce,E[S]=ce-te}t.modifiersData[o]=E}}var preventOverflow_default={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),i=round(t.width)/e.offsetWidth||1,o=round(t.height)/e.offsetHeight||1;return 1!==i||1!==o}function getCompositeRect(e,t,i){void 0===i&&(i=!1);var o=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),r=getDocumentElement(t),a=getBoundingClientRect(e,n,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!i)&&(("body"!==getNodeName(t)||isScrollParent(r))&&(s=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,i=new Set,o=[];function n(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var o=t.get(e);o&&n(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||n(e)})),o}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}function debounce2(e){var t;return function(){return t||(t=new Promise((function(i){Promise.resolve().then((function(){t=void 0,i(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,o=void 0===i?[]:i,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,i){void 0===i&&(i=r);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:n,setOptions:function(i){var s="function"==typeof i?i(n.options):i;c(),n.options=Object.assign({},r,n.options,s),n.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var d=orderModifiers(mergeByName([].concat(o,n.options.modifiers)));return n.orderedModifiers=d.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,o=void 0===i?{}:i,r=e.effect;if("function"==typeof r){var s=r({state:n,name:t,instance:l,options:o}),c=function(){};a.push(s||c)}})),l.update()},forceUpdate:function(){if(!s){var e=n.elements,t=e.reference,i=e.popper;if(areValidElements(t,i)){n.rects={reference:getCompositeRect(t,getOffsetParent(i),"fixed"===n.options.strategy),popper:getLayoutRect(i)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<n.orderedModifiers.length;o++)if(!0!==n.reset){var r=n.orderedModifiers[o],a=r.fn,c=r.options,d=void 0===c?{}:c,u=r.name;"function"==typeof a&&(n=a({state:n,options:d,name:u,instance:l})||n)}else n.reset=!1,o=-1}}},update:debounce2((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){c(),s=!0}};if(!areValidElements(e,t))return l;function c(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(i).then((function(e){!s&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l}}var defaultModifiers=[eventListeners_default,popperOffsets_default,computeStyles_default,applyStyles_default,offset_default,flip_default,preventOverflow_default,arrow_default,hide_default],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),BOX_CLASS="tippy-box",CONTENT_CLASS="tippy-content",BACKDROP_CLASS="tippy-backdrop",ARROW_CLASS="tippy-arrow",SVG_ARROW_CLASS="tippy-svg-arrow",TOUCH_OPTIONS={passive:!0,capture:!0},TIPPY_DEFAULT_APPEND_TO=function(){return document.body};function hasOwnProperty(e,t){return{}.hasOwnProperty.call(e,t)}function getValueAtIndexOrReturn(e,t,i){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(i)?i[t]:i:o}return e}function isType(e,t){var i={}.toString.call(e);return 0===i.indexOf("[object")&&i.indexOf(t+"]")>-1}function invokeWithArgsOrReturn(e,t){return"function"==typeof e?e.apply(void 0,t):e}function debounce3(e,t){return 0===t?e:function(o){clearTimeout(i),i=setTimeout((function(){e(o)}),t)};var i}function removeProperties(e,t){var i=Object.assign({},e);return t.forEach((function(e){delete i[e]})),i}function splitBySpaces(e){return e.split(/\s+/).filter(Boolean)}function normalizeToArray(e){return[].concat(e)}function pushIfUnique(e,t){-1===e.indexOf(t)&&e.push(t)}function unique(e){return e.filter((function(t,i){return e.indexOf(t)===i}))}function getBasePlacement2(e){return e.split("-")[0]}function arrayFrom(e){return[].slice.call(e)}function removeUndefinedProps(e){return Object.keys(e).reduce((function(t,i){return void 0!==e[i]&&(t[i]=e[i]),t}),{})}function div(){return document.createElement("div")}function isElement2(e){return["Element","Fragment"].some((function(t){return isType(e,t)}))}function isNodeList(e){return isType(e,"NodeList")}function isMouseEvent(e){return isType(e,"MouseEvent")}function isReferenceElement(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function getArrayOfElements(e){return isElement2(e)?[e]:isNodeList(e)?arrayFrom(e):Array.isArray(e)?e:arrayFrom(document.querySelectorAll(e))}function setTransitionDuration(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function setVisibilityState(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function getOwnerDocument(e){var t,i=normalizeToArray(e)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}function isCursorOutsideInteractiveBorder(e,t){var i=t.clientX,o=t.clientY;return e.every((function(e){var t=e.popperRect,n=e.popperState,r=e.props.interactiveBorder,a=getBasePlacement2(n.placement),s=n.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,d="right"===a?s.left.x:0,u="left"===a?s.right.x:0,p=t.top-o+l>r,f=o-t.bottom-c>r,h=t.left-i+d>r,m=i-t.right-u>r;return p||f||h||m}))}function updateTransitionEndListener(e,t,i){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[o](t,i)}))}function actualContains(e,t){for(var i=t;i;){var o;if(e.contains(i))return!0;i=null==i.getRootNode||null==(o=i.getRootNode())?void 0:o.host}return!1}var currentInput={isTouch:!1},lastMouseMoveTime=0;function onDocumentTouchStart(){currentInput.isTouch||(currentInput.isTouch=!0,window.performance&&document.addEventListener("mousemove",onDocumentMouseMove))}function onDocumentMouseMove(){var e=performance.now();e-lastMouseMoveTime<20&&(currentInput.isTouch=!1,document.removeEventListener("mousemove",onDocumentMouseMove)),lastMouseMoveTime=e}function onWindowBlur(){var e=document.activeElement;if(isReferenceElement(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function bindGlobalEventListeners(){document.addEventListener("touchstart",onDocumentTouchStart,TOUCH_OPTIONS),window.addEventListener("blur",onWindowBlur)}var visitedMessages,isBrowser="undefined"!=typeof window&&"undefined"!=typeof document,isIE11=!!isBrowser&&!!window.msCrypto;function createMemoryLeakWarning(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function clean(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function getDevMessage(e){return clean("\n %ctippy.js\n\n %c"+clean(e)+"\n\n %c👷 This is a development-only message. It will be removed in production.\n ")}function getFormattedMessage(e){return[getDevMessage(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function resetVisitedMessages(){visitedMessages=new Set}function warnWhen(e,t){var i;e&&!visitedMessages.has(t)&&(visitedMessages.add(t),(i=console).warn.apply(i,getFormattedMessage(t)))}function errorWhen(e,t){var i;e&&!visitedMessages.has(t)&&(visitedMessages.add(t),(i=console).error.apply(i,getFormattedMessage(t)))}function validateTargets(e){var t=!e,i="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;errorWhen(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),errorWhen(i,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}resetVisitedMessages();var pluginProps={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},renderProps={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},defaultProps=Object.assign({appendTo:TIPPY_DEFAULT_APPEND_TO,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pluginProps,renderProps),defaultKeys=Object.keys(defaultProps),setDefaultProps=function(e){validateProps(e,[]),Object.keys(e).forEach((function(t){defaultProps[t]=e[t]}))};function getExtendedPassedProps(e){var t=(e.plugins||[]).reduce((function(t,i){var o,n=i.name,r=i.defaultValue;n&&(t[n]=void 0!==e[n]?e[n]:null!=(o=defaultProps[n])?o:r);return t}),{});return Object.assign({},e,t)}function getDataAttributeProps(e,t){return(t?Object.keys(getExtendedPassedProps(Object.assign({},defaultProps,{plugins:t}))):defaultKeys).reduce((function(t,i){var o=(e.getAttribute("data-tippy-"+i)||"").trim();if(!o)return t;if("content"===i)t[i]=o;else try{t[i]=JSON.parse(o)}catch(e){t[i]=o}return t}),{})}function evaluateProps(e,t){var i=Object.assign({},t,{content:invokeWithArgsOrReturn(t.content,[e])},t.ignoreAttributes?{}:getDataAttributeProps(e,t.plugins));return i.aria=Object.assign({},defaultProps.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?t.interactive:i.aria.expanded,content:"auto"===i.aria.content?t.interactive?null:"describedby":i.aria.content},i}function validateProps(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var i=!hasOwnProperty(removeProperties(defaultProps,Object.keys(pluginProps)),e);i&&(i=0===t.filter((function(t){return t.name===e})).length),warnWhen(i,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}var innerHTML=function(){return"innerHTML"};function dangerouslySetInnerHTML(e,t){e[innerHTML()]=t}function createArrowElement(e){var t=div();return!0===e?t.className=ARROW_CLASS:(t.className=SVG_ARROW_CLASS,isElement2(e)?t.appendChild(e):dangerouslySetInnerHTML(t,e)),t}function setContent(e,t){isElement2(t.content)?(dangerouslySetInnerHTML(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?dangerouslySetInnerHTML(e,t.content):e.textContent=t.content)}function getChildren(e){var t=e.firstElementChild,i=arrayFrom(t.children);return{box:t,content:i.find((function(e){return e.classList.contains(CONTENT_CLASS)})),arrow:i.find((function(e){return e.classList.contains(ARROW_CLASS)||e.classList.contains(SVG_ARROW_CLASS)})),backdrop:i.find((function(e){return e.classList.contains(BACKDROP_CLASS)}))}}function render(e){var t=div(),i=div();i.className=BOX_CLASS,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var o=div();function n(i,o){var n=getChildren(t),r=n.box,a=n.content,s=n.arrow;o.theme?r.setAttribute("data-theme",o.theme):r.removeAttribute("data-theme"),"string"==typeof o.animation?r.setAttribute("data-animation",o.animation):r.removeAttribute("data-animation"),o.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?r.setAttribute("role",o.role):r.removeAttribute("role"),i.content===o.content&&i.allowHTML===o.allowHTML||setContent(a,e.props),o.arrow?s?i.arrow!==o.arrow&&(r.removeChild(s),r.appendChild(createArrowElement(o.arrow))):r.appendChild(createArrowElement(o.arrow)):s&&r.removeChild(s)}return o.className=CONTENT_CLASS,o.setAttribute("data-state","hidden"),setContent(o,e.props),t.appendChild(i),i.appendChild(o),n(e.props,e.props),{popper:t,onUpdate:n}}render.$$tippy=!0;var idCounter=1,mouseMoveListeners=[],mountedInstances=[];function createTippy(e,t){var i,o,n,r,a,s,l,c=evaluateProps(e,Object.assign({},defaultProps,getExtendedPassedProps(removeUndefinedProps(t)))),d=!1,u=!1,p=!1,f=!1,h=[],m=debounce3(q,c.interactiveDebounce),g=idCounter++,_=unique(c.plugins),v={id:g,reference:e,popper:div(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:_,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(o),cancelAnimationFrame(n)},setProps:function(t){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("setProps"));if(v.state.isDestroyed)return;N("onBeforeUpdate",[v,t]),U();var i=v.props,o=evaluateProps(e,Object.assign({},i,removeUndefinedProps(t),{ignoreAttributes:!0}));v.props=o,H(),i.interactiveDebounce!==o.interactiveDebounce&&(M(),m=debounce3(q,o.interactiveDebounce));i.triggerTarget&&!o.triggerTarget?normalizeToArray(i.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):o.triggerTarget&&e.removeAttribute("aria-expanded");P(),k(),S&&S(i,o);v.popperInstance&&(Y(),J().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));N("onAfterUpdate",[v,t])},setContent:function(e){v.setProps({content:e})},show:function(){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("show"));var e=v.state.isVisible,t=v.state.isDestroyed,i=!v.state.isEnabled,o=currentInput.isTouch&&!v.props.touch,n=getValueAtIndexOrReturn(v.props.duration,0,defaultProps.duration);if(e||t||i||o)return;if(O().hasAttribute("disabled"))return;if(N("onShow",[v],!1),!1===v.props.onShow(v))return;v.state.isVisible=!0,C()&&(y.style.visibility="visible");k(),W(),v.state.isMounted||(y.style.transition="none");if(C()){var r=x();setTransitionDuration([r.box,r.content],0)}s=function(){var e;if(v.state.isVisible&&!f){if(f=!0,y.offsetHeight,y.style.transition=v.props.moveTransition,C()&&v.props.animation){var t=x(),i=t.box,o=t.content;setTransitionDuration([i,o],n),setVisibilityState([i,o],"visible")}R(),P(),pushIfUnique(mountedInstances,v),null==(e=v.popperInstance)||e.forceUpdate(),N("onMount",[v]),v.props.animation&&C()&&function(e,t){z(e,t)}(n,(function(){v.state.isShown=!0,N("onShown",[v])}))}},function(){var e,t=v.props.appendTo,i=O();e=v.props.interactive&&t===TIPPY_DEFAULT_APPEND_TO||"parent"===t?i.parentNode:invokeWithArgsOrReturn(t,[i]);e.contains(y)||e.appendChild(y);v.state.isMounted=!0,Y(),warnWhen(v.props.interactive&&t===defaultProps.appendTo&&i.nextElementSibling!==y,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("hide"));var e=!v.state.isVisible,t=v.state.isDestroyed,i=!v.state.isEnabled,o=getValueAtIndexOrReturn(v.props.duration,1,defaultProps.duration);if(e||t||i)return;if(N("onHide",[v],!1),!1===v.props.onHide(v))return;v.state.isVisible=!1,v.state.isShown=!1,f=!1,d=!1,C()&&(y.style.visibility="hidden");if(M(),F(),k(!0),C()){var n=x(),r=n.box,a=n.content;v.props.animation&&(setTransitionDuration([r,a],o),setVisibilityState([r,a],"hidden"))}R(),P(),v.props.animation?C()&&function(e,t){z(e,(function(){!v.state.isVisible&&y.parentNode&&y.parentNode.contains(y)&&t()}))}(o,v.unmount):v.unmount()},hideWithInteractivity:function(e){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("hideWithInteractivity"));E().addEventListener("mousemove",m),pushIfUnique(mouseMoveListeners,m),m(e)},enable:function(){v.state.isEnabled=!0},disable:function(){v.hide(),v.state.isEnabled=!1},unmount:function(){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("unmount"));v.state.isVisible&&v.hide();if(!v.state.isMounted)return;Q(),J().forEach((function(e){e._tippy.unmount()})),y.parentNode&&y.parentNode.removeChild(y);mountedInstances=mountedInstances.filter((function(e){return e!==v})),v.state.isMounted=!1,N("onHidden",[v])},destroy:function(){warnWhen(v.state.isDestroyed,createMemoryLeakWarning("destroy"));if(v.state.isDestroyed)return;v.clearDelayTimeouts(),v.unmount(),U(),delete e._tippy,v.state.isDestroyed=!0,N("onDestroy",[v])}};if(!c.render)return errorWhen(!0,"render() function has not been supplied."),v;var b=c.render(v),y=b.popper,S=b.onUpdate;y.setAttribute("data-tippy-root",""),y.id="tippy-"+v.id,v.popper=y,e._tippy=v,y._tippy=v;var w=_.map((function(e){return e.fn(v)})),A=e.hasAttribute("aria-expanded");return H(),P(),k(),N("onCreate",[v]),c.showOnCreate&&Z(),y.addEventListener("mouseenter",(function(){v.props.interactive&&v.state.isVisible&&v.clearDelayTimeouts()})),y.addEventListener("mouseleave",(function(){v.props.interactive&&v.props.trigger.indexOf("mouseenter")>=0&&E().addEventListener("mousemove",m)})),v;function T(){var e=v.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===T()[0]}function C(){var e;return!(null==(e=v.props.render)||!e.$$tippy)}function O(){return l||e}function E(){var e=O().parentNode;return e?getOwnerDocument(e):document}function x(){return getChildren(y)}function D(e){return v.state.isMounted&&!v.state.isVisible||currentInput.isTouch||r&&"focus"===r.type?0:getValueAtIndexOrReturn(v.props.delay,e?0:1,defaultProps.delay)}function k(e){void 0===e&&(e=!1),y.style.pointerEvents=v.props.interactive&&!e?"":"none",y.style.zIndex=""+v.props.zIndex}function N(e,t,i){var o;(void 0===i&&(i=!0),w.forEach((function(i){i[e]&&i[e].apply(i,t)})),i)&&(o=v.props)[e].apply(o,t)}function R(){var t=v.props.aria;if(t.content){var i="aria-"+t.content,o=y.id;normalizeToArray(v.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(i);if(v.state.isVisible)e.setAttribute(i,t?t+" "+o:o);else{var n=t&&t.replace(o,"").trim();n?e.setAttribute(i,n):e.removeAttribute(i)}}))}}function P(){!A&&v.props.aria.expanded&&normalizeToArray(v.props.triggerTarget||e).forEach((function(e){v.props.interactive?e.setAttribute("aria-expanded",v.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")}))}function M(){E().removeEventListener("mousemove",m),mouseMoveListeners=mouseMoveListeners.filter((function(e){return e!==m}))}function I(t){if(!currentInput.isTouch||!p&&"mousedown"!==t.type){var i=t.composedPath&&t.composedPath()[0]||t.target;if(!v.props.interactive||!actualContains(y,i)){if(normalizeToArray(v.props.triggerTarget||e).some((function(e){return actualContains(e,i)}))){if(currentInput.isTouch)return;if(v.state.isVisible&&v.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[v,t]);!0===v.props.hideOnClick&&(v.clearDelayTimeouts(),v.hide(),u=!0,setTimeout((function(){u=!1})),v.state.isMounted||F())}}}function B(){p=!0}function $(){p=!1}function W(){var e=E();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,TOUCH_OPTIONS),e.addEventListener("touchstart",$,TOUCH_OPTIONS),e.addEventListener("touchmove",B,TOUCH_OPTIONS)}function F(){var e=E();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,TOUCH_OPTIONS),e.removeEventListener("touchstart",$,TOUCH_OPTIONS),e.removeEventListener("touchmove",B,TOUCH_OPTIONS)}function z(e,t){var i=x().box;function o(e){e.target===i&&(updateTransitionEndListener(i,"remove",o),t())}if(0===e)return t();updateTransitionEndListener(i,"remove",a),updateTransitionEndListener(i,"add",o),a=o}function V(t,i,o){void 0===o&&(o=!1),normalizeToArray(v.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,i,o),h.push({node:e,eventType:t,handler:i,options:o})}))}function H(){L()&&(V("touchstart",j,{passive:!0}),V("touchend",K,{passive:!0})),splitBySpaces(v.props.trigger).forEach((function(e){if("manual"!==e)switch(V(e,j),e){case"mouseenter":V("mouseleave",K);break;case"focus":V(isIE11?"focusout":"blur",X);break;case"focusin":V("focusout",X)}}))}function U(){h.forEach((function(e){var t=e.node,i=e.eventType,o=e.handler,n=e.options;t.removeEventListener(i,o,n)})),h=[]}function j(e){var t,i=!1;if(v.state.isEnabled&&!G(e)&&!u){var o="focus"===(null==(t=r)?void 0:t.type);r=e,l=e.currentTarget,P(),!v.state.isVisible&&isMouseEvent(e)&&mouseMoveListeners.forEach((function(t){return t(e)})),"click"===e.type&&(v.props.trigger.indexOf("mouseenter")<0||d)&&!1!==v.props.hideOnClick&&v.state.isVisible?i=!0:Z(e),"click"===e.type&&(d=!i),i&&!o&&ee(e)}}function q(e){var t=e.target,i=O().contains(t)||y.contains(t);"mousemove"===e.type&&i||isCursorOutsideInteractiveBorder(J().concat(y).map((function(e){var t,i=null==(t=e._tippy.popperInstance)?void 0:t.state;return i?{popperRect:e.getBoundingClientRect(),popperState:i,props:c}:null})).filter(Boolean),e)&&(M(),ee(e))}function K(e){G(e)||v.props.trigger.indexOf("click")>=0&&d||(v.props.interactive?v.hideWithInteractivity(e):ee(e))}function X(e){v.props.trigger.indexOf("focusin")<0&&e.target!==O()||v.props.interactive&&e.relatedTarget&&y.contains(e.relatedTarget)||ee(e)}function G(e){return!!currentInput.isTouch&&L()!==e.type.indexOf("touch")>=0}function Y(){Q();var t=v.props,i=t.popperOptions,o=t.placement,n=t.offset,r=t.getReferenceClientRect,a=t.moveTransition,l=C()?getChildren(y).arrow:null,c=r?{getBoundingClientRect:r,contextElement:r.contextElement||O()}:e,d=[{name:"offset",options:{offset:n}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var i=x().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?i.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?i.setAttribute("data-"+e,""):i.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];C()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==i?void 0:i.modifiers)||[]),v.popperInstance=createPopper(c,y,Object.assign({},i,{placement:o,onFirstUpdate:s,modifiers:d}))}function Q(){v.popperInstance&&(v.popperInstance.destroy(),v.popperInstance=null)}function J(){return arrayFrom(y.querySelectorAll("[data-tippy-root]"))}function Z(e){v.clearDelayTimeouts(),e&&N("onTrigger",[v,e]),W();var t=D(!0),o=T(),n=o[0],r=o[1];currentInput.isTouch&&"hold"===n&&r&&(t=r),t?i=setTimeout((function(){v.show()}),t):v.show()}function ee(e){if(v.clearDelayTimeouts(),N("onUntrigger",[v,e]),v.state.isVisible){if(!(v.props.trigger.indexOf("mouseenter")>=0&&v.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=D(!1);t?o=setTimeout((function(){v.state.isVisible&&v.hide()}),t):n=requestAnimationFrame((function(){v.hide()}))}}else F()}}function tippy(e,t){void 0===t&&(t={});var i=defaultProps.plugins.concat(t.plugins||[]);validateTargets(e),validateProps(t,i),bindGlobalEventListeners();var o=Object.assign({},t,{plugins:i}),n=getArrayOfElements(e),r=isElement2(o.content),a=n.length>1;warnWhen(r&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var s=n.reduce((function(e,t){var i=t&&createTippy(t,o);return i&&e.push(i),e}),[]);return isElement2(e)?s[0]:s}tippy.defaultProps=defaultProps,tippy.setDefaultProps=setDefaultProps,tippy.currentInput=currentInput;var applyStylesModifier=Object.assign({},applyStyles_default,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});tippy.setDefaultProps({render:render});var tippy_esm_default=tippy,CLASS_PREFIX="trtc_debug_dialog",CLASS_AVTIVED=`${CLASS_PREFIX}_activated`,CLASS_SWITCH=`${CLASS_PREFIX}_switch`,CLASS_MASK=`${CLASS_PREFIX}_mask`,CLASS_PANNEL=`${CLASS_PREFIX}_pannel`,CLASS_TABBER=`${CLASS_PREFIX}_tabber`,CLASS_TAB=`${CLASS_PREFIX}_tab`,CLASS_TOPBAR=`${CLASS_PREFIX}_topbar`,CLASS_TOPTAB=`${CLASS_PREFIX}_toptab`,CLASS_CONTENT=`${CLASS_PREFIX}_content`,CLASS_HAS_TOPBAR=`${CLASS_PREFIX}_has_topbar`,CLASS_LOG=`${CLASS_CONTENT}_log`,CLASS_NETWORK=`${CLASS_CONTENT}_network`,CLASS_NETWORK_TITLE=`${CLASS_NETWORK}_title`,CLASS_NETWORK_BASIC=`${CLASS_NETWORK}_basic`,CLASS_NETWORK_LOCAL=`${CLASS_NETWORK}_local`,CLASS_NETWORK_REMOTE=`${CLASS_NETWORK}_remote`,CLASS_BANNER=`${CLASS_PREFIX}_banner`,CLASS_BANNER_ITEM=`${CLASS_BANNER}_item`,CLASS_TOOLBAR=`${CLASS_PREFIX}_toolbar`,CLASS_TOOL=`${CLASS_PREFIX}_tool`,CLASS_ITEM=`${CLASS_PREFIX}_item`,CLASS_ITEM_DEBUG=`${CLASS_ITEM}_debug`,CLASS_ITEM_INFO=`${CLASS_ITEM}_info`,CLASS_ITEM_WARN=`${CLASS_ITEM}_warn`,CLASS_ITEM_ERROR=`${CLASS_ITEM}_error`,CLASS_BACK_TOP=`${CLASS_PREFIX}_back_top`,CLASS_GO_BOTTOM=`${CLASS_PREFIX}_go_bottom`,SUCCESS="success",FAILED="failed",isDialogAdded=!1,DebugDialog=class{constructor(e,t){__publicField(this,"_dialogStyle",null),__publicField(this,"_dialogNode",null),__publicField(this,"_switchNode",null),__publicField(this,"_maskNode",null),__publicField(this,"_pannelNode",null),__publicField(this,"_logContentNode",null),__publicField(this,"_networkContentNode",null),__publicField(this,"_tabNodes",[]),__publicField(this,"_toptabNodes",[]),__publicField(this,"_backTopButton",null),__publicField(this,"_goBottomButton",null),__publicField(this,"_hasMove",!1),__publicField(this,"_showDialog",!1),__publicField(this,"_isMobile",!1),__publicField(this,"_showLogType","all"),__publicField(this,"prevBytesSent",0),__publicField(this,"prevBytesReceived",0),__publicField(this,"_core"),__publicField(this,"_log"),__publicField(this,"_logList",[]),__publicField(this,"_networkQuality"),__publicField(this,"tippyCount",0),__publicField(this,"isUploading",!1),__publicField(this,"handleNetworkQuality",(e=>{this._networkQuality=e})),__publicField(this,"handleHeartbeatReport",(e=>{var t,i,o,n,r,a,s,l,c,d;const u=1e8,p={2:"big",3:"small",7:"sub"},f={rtt:e.msg_up_stream_info.msg_network_status.uint32_rtt||(null==(t=e.msg_down_stream_info[0])?void 0:t.msg_network_status.uint32_rtt)||(null==(i=this._networkQuality)?void 0:i.uplinkRTT)||(null==(o=this._networkQuality)?void 0:o.downlinkRTT)||0,upLoss:(null==(n=this._networkQuality)?void 0:n.uplinkLoss)||0,downLoss:(null==(r=this._networkQuality)?void 0:r.downlinkLoss)||0,bytesSent:e.bytes_sent||0,bytesReceived:e.bytes_received||0,localStatistics:{audio:{bitrate:((null==(a=e.msg_up_stream_info.msg_audio_status)?void 0:a.uint32_audio_codec_bitrate)||0)/1e3,audioLevel:((null==(s=e.msg_up_stream_info.msg_audio_status)?void 0:s.uint32_audio_level)||0)/u},video:e.msg_up_stream_info.msg_video_status.filter((e=>p[e.uint32_video_stream_type])).map((e=>({bitrate:(e.uint32_video_codec_bitrate||0)/1e3,width:e.uint32_video_width,height:e.uint32_video_height,frameRate:e.uint32_video_enc_fps,videoType:p[e.uint32_video_stream_type]})))},remoteStatistics:e.msg_down_stream_info.map((e=>({userId:e.msg_user_info.str_identifier,audio:{bitrate:(e.msg_audio_status.uint32_audio_codec_bitrate||0)/1e3,audioLevel:(e.msg_audio_status.uint32_audio_level||0)/u},video:e.msg_video_status.map((e=>({bitrate:(e.uint32_video_codec_bitrate||0)/1e3,width:e.uint32_video_width,height:e.uint32_video_height,frameRate:e.uint32_video_dec_fps,videoType:p[e.uint32_video_stream_type]})))})))},h=(f.bytesSent-this.prevBytesSent)/2,m=(f.bytesReceived-this.prevBytesReceived)/2;this.prevBytesSent=f.bytesSent,this.prevBytesReceived=f.bytesReceived;const g=null==(l=this._dialogNode)?void 0:l.querySelector(`.${CLASS_NETWORK_BASIC}`),_=`rtt: ${f.rtt} ms upLoss: ${f.upLoss} downLoss: ${f.downLoss} <br>\n ↑ ${h/1e3} KB/s (${8*h/1e3} Kb/s) <br>\n ↓ ${m/1e3} KB/s (${8*m/1e3} Kb/s) <br>\n `;g.innerHTML=_;const v=null==(c=this._dialogNode)?void 0:c.querySelector(`.${CLASS_NETWORK_LOCAL}`);let b="";f.localStatistics.audio.bitrate&&(b=`<li>local audio: ${f.localStatistics.audio.bitrate} Kb/s audioLevel: ${f.localStatistics.audio.audioLevel.toFixed(5)}</li>`),f.localStatistics.video.length>0&&(b+=`${f.localStatistics.video.map((e=>`<li>local ${e.videoType} video: ${e.bitrate} Kb/s ${e.width}*${e.height} ${e.frameRate}fps</li>`)).join("")}`),v.innerHTML=""===b?`${NAME.NO_DATA}`:b;const y=null==(d=this._dialogNode)?void 0:d.querySelector(`.${CLASS_NETWORK_REMOTE}`);let S="";f.remoteStatistics.length>0&&f.remoteStatistics.forEach((e=>{let t=`remote ${e.userId}:`;e.audio.bitrate>0&&(t+=`<li>audio: ${e.audio.bitrate} Kb/s audioLevel: ${e.audio.audioLevel.toFixed(5)}</li>`),e.video.length>0&&e.video.forEach((e=>{t+=`<li>${e.videoType} video: ${e.bitrate} Kb/s ${e.width}*${e.height} ${e.frameRate}fps</li>`})),S+=t})),y.innerHTML=""===S?`${NAME.NO_DATA}`:S})),isDialogAdded=!0,this._core=e,this._log=t,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}synchronizeLog(){this._core.loggerManager.getQueue().forEach((e=>{this.updateLog(e)}))}addStyle(){this._dialogStyle=document.createElement("style"),this._dialogStyle.innerHTML=`\n #${CLASS_PREFIX}\n {--DD-BG-0:#ededed;--DD-BG-1:#f7f7f7;--DD-BG-2:#fff;--DD-BODER:rgba(0,0,0,0.1);--DD-ERROR:red;--DD-WARN:#fa9d3b;--DD-INFO:#000;--DD-DEBUG:#10aeff;--DD-WARN-BG:#fff3cc;--DD-ERROR-BG:#ffe6e6;}\n #${CLASS_PREFIX} a,.${CLASS_SWITCH}{cursor:pointer;}\n .${CLASS_PREFIX}{color:black;}\n .${CLASS_SWITCH}{display:block;position:fixed;right:50px;bottom:150px;border-radius:5px;background-color:#07c160;color:#fff;padding:5px 10px;z-index:10000;}\n .${CLASS_MASK}{display:none;position:fixed;left:0;top:0;right:0;bottom:0;z-index:10001;background-color:rgb(0,0,0,0.6);}\n .${CLASS_PANNEL}{background-color:#ededed;display:none;position:fixed;min-height:85%;left:60%;right:0;bottom:0;z-index:10002;border:1px solid var(--DD-BG-0);}\n @media (max-width:768px) {.${CLASS_PANNEL}{left:0;}} \n .${CLASS_TABBER}{display:flex;height:2rem;border-bottom:1px solid var(--DD-BODER);}\n .${CLASS_TAB}{padding:0 20px;border-right:1px solid rgba(0, 0, 0, 0.1);line-height:2rem;color: black;}\n .${CLASS_TAB}.${CLASS_AVTIVED}{background-color:var(--DD-BG-2);}\n .${CLASS_TOPBAR}{height:2rem;display:flex;flex-direction:row;}\n .${CLASS_TOPTAB}{width:20%;text-align:center;line-height:2rem;border-right:1px solid var(--DD-BODER);border-bottom:1px solid var(--DD-BODER);color:black;}\n .${CLASS_TOPTAB}.${CLASS_AVTIVED}{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}\n .${CLASS_CONTENT}{background-color:#fff;position:absolute;left:0;right:0;top:2rem;bottom:6rem;overflow-y:scroll;overflow-x:hidden;}\n .${CLASS_CONTENT}.${CLASS_HAS_TOPBAR}{top:4rem;}\n .${CLASS_NETWORK}{display:flex;display:none;}\n .${CLASS_NETWORK_TITLE}{text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BODER);}\n .${CLASS_NETWORK_BASIC},.${CLASS_NETWORK_LOCAL},.${CLASS_NETWORK_REMOTE}{text-align:center;border-bottom:1px solid var(--DD-BODER);}\n .${CLASS_ITEM}{border-bottom:1px solid var(--DD-BG-0);padding:5px 10px;overflow-wrap: break-word;}\n .${CLASS_ITEM_ERROR}{color:var(--DD-ERROR);background-color:var(--DD-ERROR-BG);}\n .${CLASS_ITEM_WARN}{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}\n .${CLASS_ITEM_INFO}{color:var(--DD-INFO);}\n .${CLASS_ITEM_DEBUG}{color:var(--DD-DEBUG);}\n .${CLASS_BANNER}{position:absolute;left:0;right:0;bottom:2rem;height:4rem;border-bottom:1px solid var(--DD-BODER);display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--DD-BG-1);}\n .${CLASS_BANNER_ITEM}{border-bottom:1px solid var(--DD-BODER);padding:5px 10px;overflow-wrap: break-word;}\n .${CLASS_TOOLBAR}{position:absolute;line-height:2rem;display:flex;flex-direction:row;left:0;right:0;bottom:0;}\n .${CLASS_TOOL}{flex:1;color:black;text-align:center;background-color:#ededed;border-right:1px solid var(--DD-BODER);}\n #${CLASS_PREFIX} .${CLASS_BACK_TOP},#${CLASS_PREFIX} .${CLASS_GO_BOTTOM}{position:absolute;height:2rem;width:6rem;right:2rem;border-radius:5px;background-color:rgba(30, 136, 229, 0.8);z-index:10003;cursor:pointer;padding:0 5px;line-height:2rem;color:white;text-align:center;}\n .${CLASS_GO_BOTTOM}{bottom:7rem;}\n .${CLASS_BACK_TOP}{bottom:9.5rem;}\n #${CLASS_PREFIX} .${CLASS_TOOL}.disable {cursor: not-allowed;background-color: #ededed;color: #999;}\n .tippy-box {position: relative;background-color: #333;color: #fff;border-radius: 4px;font-size: 14px;line-height: 1.4; white-space: normal;outline: 0;transition-property: transform, visibility, opacity;}\n .tippy-content {position: relative;padding: 5px 9px;}\n .tippy-arrow {width: 16px;height: 16px;color: #333;}\n .tippy-arrow:before {content: "";position: absolute;border-color: transparent;border-style: solid;}.tippy-box[data-placement^=top]>.tippy-arrow:before {bottom: -7px;left: 0;border-width: 8px 8px 0; border-top-color: initial;transform-origin: center top;}\n .tippy-box[data-placement^=top]>.tippy-arrow {bottom: 0;}\n `,document.body.appendChild(this._dialogStyle)}addDialog(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}createDiaLog(){var e,t,i,o;this._isMobile=isMobile();const n=document.createElement("template");n.innerHTML=`<div id="${CLASS_PREFIX}" class="${CLASS_PREFIX}"><div class="${CLASS_SWITCH}">Debug</div><div class="${CLASS_MASK}"></div><div class="${CLASS_PANNEL}"><a class="${CLASS_BACK_TOP}">${NAME.BACK_TOP}</a><a class="${CLASS_GO_BOTTOM}">${NAME.GO_BOTTOM}</a><div class="${CLASS_TABBER}"><a class="${CLASS_TAB} ${CLASS_AVTIVED}" data-tab="log">${NAME.LOG_BUTTON}</a><a class="${CLASS_TAB}" data-tab="network">${NAME.NETWORK_BUTTON}</a></div><div class="${CLASS_TOPBAR}"><a class="${CLASS_TOPTAB} ${CLASS_AVTIVED}" data-type="all">All</a><a class="${CLASS_TOPTAB}" data-type="debug">Debug</a><a class="${CLASS_TOPTAB}" data-type="info">Info</a><a class="${CLASS_TOPTAB}" data-type="warn">Warn</a><a class="${CLASS_TOPTAB}" data-type="error">Error</a></div><div class="${CLASS_CONTENT} ${CLASS_HAS_TOPBAR}"><div class="${CLASS_LOG}"></div><div class="${CLASS_NETWORK}"><div class="${CLASS_NETWORK_TITLE}">${NAME.BASIC}</div><div class="${CLASS_NETWORK_BASIC}">${NAME.NO_DATA}</div><div class="${CLASS_NETWORK_TITLE}">${NAME.UPLINK}</div><div class="${CLASS_NETWORK_LOCAL}">${NAME.NO_DATA}</div><div class="${CLASS_NETWORK_TITLE}">${NAME.Downlink}</div><div class="${CLASS_NETWORK_REMOTE}">${NAME.NO_DATA}</div></div></div><div class="${CLASS_BANNER}"></div><div class="${CLASS_TOOLBAR}"><a id="trtc_upload" class="${CLASS_TOOL}">${NAME.UPLOAD_BUTTON}</a><a id="trtc_export" class="${CLASS_TOOL}">${NAME.EXPORT_BUTTON}</a><a id="trtc_hide" class="${CLASS_TOOL}">${NAME.HIDE_BUTTON}</a></div></div></div>`;const r=n.content.firstChild;this._switchNode=r.querySelector(`.${CLASS_SWITCH}`),null==(e=this._switchNode)||e.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=r.querySelector(`.${CLASS_MASK}`),null==(t=this._maskNode)||t.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=r.querySelector(`.${CLASS_PANNEL}`),null==(i=r.querySelector(`.${CLASS_BACK_TOP}`))||i.addEventListener("click",this.onBackTopClick.bind(this)),null==(o=r.querySelector(`.${CLASS_GO_BOTTOM}`))||o.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=r.querySelector(`.${CLASS_LOG}`),this._networkContentNode=r.querySelector(`.${CLASS_NETWORK}`),this._tabNodes=Array.from(r.querySelector(`.${CLASS_TABBER}`).children),this._tabNodes.forEach((e=>{e.addEventListener("click",this.onTabClick.bind(this))})),this._toptabNodes=Array.from(r.querySelector(`.${CLASS_TOPBAR}`).children),this._toptabNodes.forEach((e=>{e.addEventListener("click",this.onToptabClick.bind(this))})),this._backTopButton=r.querySelector(`.${CLASS_BACK_TOP}`),this._goBottomButton=r.querySelector(`.${CLASS_GO_BOTTOM}`);const a=r.querySelector("#trtc_upload");null==a||a.addEventListener("click",this.onUploadClick.bind(this));const s=r.querySelector("#trtc_export");null==s||s.addEventListener("click",this.onExportClick.bind(this));const l=r.querySelector("#trtc_hide");return null==l||l.addEventListener("click",this.onHideClick.bind(this)),r}deleteDialog(){isDialogAdded&&(isDialogAdded=!1,this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._dialogStyle&&(document.body.removeChild(this._dialogStyle),this._dialogStyle=null))}updateLog(e){var t;this._logList.push(e);const i=document.createElement("div");switch(i.classList.add(CLASS_ITEM),e.level){case 4:i.classList.add(CLASS_ITEM_ERROR);break;case 2:i.classList.add(CLASS_ITEM_INFO);break;case 3:i.classList.add(CLASS_ITEM_WARN);break;case 1:i.classList.add(CLASS_ITEM_DEBUG)}i.textContent=e.log,"all"===this._showLogType||i.classList.contains(`${CLASS_ITEM}_${this._showLogType}`)||(i.style.display="none"),null==(t=this._logContentNode)||t.appendChild(i),this.addHelper(i)}onSwitchClick(){this._hasMove?this._hasMove=!1:this._showDialog?this.hideDialog():(this._isMobile&&(this._maskNode.style.display="block"),this._pannelNode.style.display="block",this._switchNode.style.display="none",this._showDialog=!0)}onTabClick(e){var t,i,o,n,r;const a=e.target;null==(t=this._tabNodes)||t.forEach((e=>{e.classList.remove(CLASS_AVTIVED)})),a.classList.add(CLASS_AVTIVED);const s=a.getAttribute("data-tab");"log"===s?(null==(o=null==(i=this._dialogNode)?void 0:i.querySelector(`.${CLASS_CONTENT}`))||o.classList.add(CLASS_HAS_TOPBAR),this._logContentNode.style.display="block",this._networkContentNode.style.display="none",this._goBottomButton.style.display="block",this._backTopButton.style.display="block"):"network"===s&&(null==(r=null==(n=this._dialogNode)?void 0:n.querySelector(`.${CLASS_CONTENT}`))||r.classList.remove(CLASS_HAS_TOPBAR),this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._backTopButton.style.display="none",this._goBottomButton.style.display="none")}onToptabClick(e){var t,i;const o=e.target;null==(t=this._toptabNodes)||t.forEach((e=>{e.classList.remove(CLASS_AVTIVED)})),o.classList.add(CLASS_AVTIVED),this._showLogType=o.getAttribute("data-type");const n=null==(i=this._logContentNode)?void 0:i.querySelectorAll(`.${CLASS_ITEM}`),r=`${CLASS_ITEM}_${this._showLogType}`;n.forEach((e=>{e.classList.contains(r)||"all"===this._showLogType?e.style.display="block":e.style.display="none"}))}onExportClick(){var e,t,i,o,n,r;const a=this._logList.reduce(((e,t)=>`${e+t.log}\n`),""),s=new Blob([a],{type:"text/plain"}),l=document.createElement("a"),c=URL.createObjectURL(s);l.href=c;const d=`trtc_${void 0===(null==(e=this._core)?void 0:e.room.sdkAppId)?"EmptySdkAppId":null==(i=null==(t=this._core)?void 0:t.room)?void 0:i.sdkAppId}_${void 0===(null==(o=this._core)?void 0:o.room.userId)?"EmptyUserId":null==(n=this._core)?void 0:n.room.userId}_${(new Date).getTime()}.log`;l.download=d,l.style.display="none",document.body.appendChild(l),l.click(),URL.revokeObjectURL(c),document.body.removeChild(l),this.addInfoToBanner(SUCCESS,_isLangChinese?`导出成功:日志文件名为${d}`:`Export success: The log file name is ${d}`),null==(r=this._log)||r.info("Export success: The log file name is ${fileName}")}addInfoToBanner(e,t){var i;const o=null==(i=this._dialogNode)?void 0:i.querySelector(`.${CLASS_BANNER}`),n=document.createElement("div");n.classList.add(CLASS_BANNER_ITEM),n.innerText=`${e===SUCCESS?"🟩":"🟥 "} ${t}`,o.appendChild(n),o.scrollTop=o.scrollHeight}async onUploadClick(){var e,t,i;if(this.isUploading)return;this.isUploading=!0;const o=null==(e=this._dialogNode)?void 0:e.querySelector("#trtc_upload");o.innerText=_isLangChinese?"上传中...":"Uploading...",null==o||o.classList.add(".disable");const n=this._logList.reduce(((e,t)=>`${e+t.log}\n`),""),r=new Blob([n],{type:"text/plain"}),a=new FormData;a.append("file",r,"trtc.log"),a.append("sdkAppId",`${(null==(t=this._core)?void 0:t.room.sdkAppId)||"EmptySdkAppId"}`),a.append("userId",`${(null==(i=this._core)?void 0:i.room.userId)||"EmptyUserId"}`);fetch("https://service.trtc.qcloud.com/api/uploadLogFile",{method:"POST",body:a}).then((e=>e.json())).then((e=>{var t;this.addInfoToBanner(null==e?void 0:e.type,_isLangChinese?null==e?void 0:e.message_zh:null==e?void 0:e.message_en),this.isUploading=!1,null==(t=this._log)||t.info(null==e?void 0:e.message_en)})).catch((()=>{var e;this.addInfoToBanner(FAILED,_isLangChinese?"上传失败:请使用本地导出":"Upload Failed: Please use local export"),null==(e=this._log)||e.info("Upload Failed: Please use local export")})).finally((()=>{o.innerText=_isLangChinese?"上传":"Upload",null==o||o.classList.remove(".disable"),this.isUploading=!1}))}onHideClick(){this.hideDialog()}onMaskClick(){this.hideDialog()}hideDialog(){this._isMobile&&(this._maskNode.style.display="none"),this._pannelNode.style.display="none",this._switchNode.style.display="block",this._showDialog=!1}onBackTopClick(){var e,t;null==(t=null==(e=this._dialogNode)?void 0:e.querySelector(`.${CLASS_CONTENT}`))||t.scrollTo(0,0)}onGoBottomClick(){var e;const t=null==(e=this._dialogNode)?void 0:e.querySelector(`.${CLASS_CONTENT}`);null==t||t.scrollTo(0,null==t?void 0:t.scrollHeight)}dragable(e){var t,i;const o={x:0,y:0,startX:0,startY:0,endX:0,endY:0,isTouchEnd:!1};o.x=(null==(t=this._switchNode)?void 0:t.offsetLeft)||50,o.y=(null==(i=this._switchNode)?void 0:i.offsetTop)||150;const n=e=>{e.preventDefault(),o.startX=e.pageX,o.startY=e.pageY,document.addEventListener("mousemove",r),document.addEventListener("mouseup",a)},r=e=>{e.cancelable&&e.preventDefault(),this._hasMove=!0;let t=o.x-(e.pageX-o.startX),i=o.y-(e.pageY-o.startY);[t,i]=d(t,i),this._switchNode.style.right=`${t}px`,this._switchNode.style.bottom=`${i}px`,o.endX=t,o.endY=i},a=()=>{o.startX=0,o.startY=0,o.x=o.endX,o.y=o.endY,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",a)},s=e=>{o.startX=e.touches[0].pageX,o.startY=e.touches[0].pageY,o.isTouchEnd=!1},l=()=>{o.isTouchEnd&&(o.startX=0,o.startY=0,o.isTouchEnd=!1,o.x=o.endX,o.y=o.endY)},c=e=>{if(e.touches.length<=0)return;const t=e.touches[0].pageX-o.startX,i=e.touches[0].pageY-o.startY;let n=Math.floor(o.x-t),r=Math.floor(o.y-i);[n,r]=d(n,r),this._switchNode.style.right=`${n}px`,this._switchNode.style.bottom=`${r}px`,o.endX=n,o.endY=r,o.isTouchEnd=!0,e.cancelable&&e.preventDefault()},d=(e,t)=>{const i=Math.max(document.documentElement.offsetWidth,window.innerWidth),o=Math.max(document.documentElement.offsetHeight,window.innerHeight);return e+this._switchNode.offsetWidth>i&&(e=i-this._switchNode.offsetWidth),t+this._switchNode.offsetHeight>o&&(t=o-this._switchNode.offsetHeight),e<0&&(e=0),t<20&&(t=20),[e,t]};isMobile()?(e.addEventListener("touchstart",s,{passive:!1}),e.addEventListener("touchend",l,{passive:!1}),e.addEventListener("touchmove",c,{passive:!1})):e.addEventListener("mousedown",n)}installEvents(){this._core.innerEmitter.on("264",this.handleLog,this),this._core.room.on("network-quality",this.handleNetworkQuality,this),this._core.room.on("heartbeat-report",this.handleHeartbeatReport,this)}uninstallEvents(){this._core.innerEmitter.off("264",this.handleLog,this),this._core.room.off("network-quality",this.handleNetworkQuality,this),this._core.room.off("heartbeat-report",this.handleHeartbeatReport,this)}handleLog(e){this.updateLog(e.log)}addHelper(e){const t=/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g,i=infoMapKey;let o=e.innerText;o=o.split("\n").map((e=>{if((e=e.replaceAll("<","<").replaceAll(">",">")).includes("failed"))return e.includes("on autoplay-failed")?e:`<span class='red' style="background:red; color:#fff;">${e}</span>`;if(e.includes("clientIp:")){const i=e.match(t);return null==i||i.forEach((t=>{e=e.replaceAll(t,`<a href="javascript:void(0);" target=""><span class='ip' style="background:#e1dfdf">${t}</span></a>`)})),e}return e.includes("URL of current page")?e=e.replace(/URL of current page: (.+)/,'URL of current page: <a href="$1">$1</a>'):e})).join("\n"),i.forEach((t=>{if(e.innerText.includes(t)){const i=`tooltip-${this.tippyCount}`;o=o.replace(new RegExp(`${escapedStringToReg(t)}`,"gi"),`<span id="${i}" class='${infoMap[t].class||infoMap[t].color||"gray"}' style="background:${infoMap[t].color||"#e1dfdf"}; color: ${infoMap[t].textColor||"#000"}">${t}</span>`),setTimeout((()=>{let o="";o=_isLangChinese?"function"==typeof infoMap[t].tips_zh?infoMap[t].tips_zh(e.innerText):infoMap[t].tips_zh:"function"==typeof infoMap[t].tips_en?infoMap[t].tips_en(e.innerText):infoMap[t].tips_en;const n=document.getElementById(`${i}`);n&&tippy_esm_default(n,{content:o,zIndex:10004,placement:"top"})}),500),this.tippyCount+=1}})),e.innerHTML=o}};__decorateClass([debounce(300,(()=>"export"))],DebugDialog.prototype,"onExportClick",1),__decorateClass([debounce(300,(()=>"upload"))],DebugDialog.prototype,"onUploadClick",1);var debug_dialog_default=DebugDialog,_debugDialog=null,instance=null,_Debug=class e{constructor(e){return this.core=e,__publicField(this,"seq"),__publicField(this,"_core"),__publicField(this,"log"),instance||(this._core=e,this.log=e.log.createChild({id:this.getAlias()}),this.log.info("created"),instance=this)}getName(){return e.Name}getAlias(){return"dm"}getGroup(){return"dm"}getValidateRule(e){switch(e){case"start":return startValidateRule();case"update":return updateValidateRule();case"stop":return stopValidateRule()}}start(){IS_LOCAL&&(this._openDebugDiaLog(),this.log.warn("if you are in production environment, please use URL param `trtcDebug=ture` to open debug dialog"));new URLSearchParams(location.search).get("trtcDebug")&&this._openDebugDiaLog()}update(){}stop(){this._closeDebugDiaLog()}destroy(){this.log.info("destroyed")}_openDebugDiaLog(){_debugDialog||(_debugDialog=new debug_dialog_default(this._core,this.log))}_closeDebugDiaLog(){null==_debugDialog||_debugDialog.deleteDialog(),_debugDialog=null}};__publicField(_Debug,"Name","Debug");var Debug=_Debug,src_default=Debug;export{src_default as default};export{Debug};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Debug=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function t(e,t,n,o,i,r,a){try{var s=e[r](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(o,i)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function d(e,t,n,o){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new C(o||[]);return r(a,"_invoke",{value:E(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var f="suspendedStart",h="suspendedYield",m="executing",v="completed",y={};function g(){}function b(){}function _(){}var w={};u(w,s,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(N([])));x&&x!==n&&o.call(x,s)&&(w=x);var D=_.prototype=g.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,r,a,s){var c=p(e[i],e,r);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,i){n(e,o,t,i)}))}return i=i?i.then(r,r):r()}})}function E(t,n,o){var i=f;return function(r,a){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===r)throw a;return{value:e,done:!0}}for(o.method=r,o.arg=a;;){var s=o.delegate;if(s){var c=L(s,o);if(c){if(c===y)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(i===f)throw i=v,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);i=m;var l=p(t,n,o);if("normal"===l.type){if(i=o.done?v:h,l.arg===y)continue;return{value:l.arg,done:o.done}}"throw"===l.type&&(i=v,o.method="throw",o.arg=l.arg)}}}function L(t,n){var o=n.method,i=t.iterator[o];if(i===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),y;var r=p(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var a=r.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=_,r(D,"constructor",{value:_,configurable:!0}),r(_,"constructor",{value:b,configurable:!0}),b.displayName=u(_,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,u(e,l,"GeneratorFunction")),e.prototype=Object.create(D),e},t.awrap=function(e){return{__await:e}},O(T.prototype),u(T.prototype,c,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,o,i,r){void 0===r&&(r=Promise);var a=new T(d(e,n,o,i),r);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(D),u(D,l,"Generator"),u(D,s,(function(){return this})),u(D,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=N,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(o,i){return s.type="throw",s.arg=t,n.next=o,i&&(n.method="next",n.arg=e),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var i=o.arg;A(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:N(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),y}},t}function r(t,n){return function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,s=[],c=!0,l=!1;try{if(r=(n=n.call(e)).next,0===t);else for(;!(c=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,n)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(e,t,n,o){for(var i,r=l(t,n),a=e.length-1;a>=0;a--)(i=e[a])&&(r=i(t,n,r)||r);return r&&c(t,n,r),r},d=function(e,t,n){return function(e,t,n){t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==s(t)?t+"":t,n),n};var p="undefined"!=typeof location&&("file:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname),f=function(){var e=window.navigator&&window.navigator.userAgent||"",t=/iPad/i.test(e)||/iPhone/i.test(e),n=/Android/i.test(e);return t||n},h="zh"===navigator.language.substring(0,2),m={LOG_BUTTON:h?"日志":"Log",NETWORK_BUTTON:h?"网络":"Network",UPLOAD_BUTTON:h?"上传":"Upload",EXPORT_BUTTON:h?"导出":"Export",HIDE_BUTTON:h?"隐藏":"Hide",GO_BOTTOM:h?"底部":"goBottom",BACK_TOP:h?"顶部":"backTop",UPLINK:h?"上行":"Uplink",Downlink:h?"下行":"Downlink",NO_DATA:h?"暂无数据":"No Data",BASIC:h?"基础":"Basic"},v={"play() error: NotAllowedError:":{tips_zh:function(e){return e.includes("main <video>")||e.includes("main <audio>")?"远端流自动播放受限导致播放失败":"本地流出现自动播放失败报错,一般只出现在 Android 微信设备,无需处理"},tips_en:function(e){return e.includes("main <video>")||e.includes("main <audio>")?"Remote stream auto play is restricted and playback fails":"Local stream playback failure, generally only occurs in Android WeChat devices, no need to handle"},color:"red",class:"red"},"updateStream() try to recover local stream":{tips_zh:"设备采集异常,正在尝试自动恢复采集",tips_en:"Device acquisition exception, automatic recovery is in progress"},"updateStream() recover local stream successfully":{tips_zh:"设备采集异常,自动恢复采集成功",tips_en:"Device acquisition exception, automatic recovery is successful"},"updateStream() failed to recover local stream":{tips_zh:"设备采集异常,自动恢复采集失败",tips_en:"Device acquisition exception, automatic recovery failed"},"main stream - video track is muted":{tips_zh:"表示收到的视频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received video data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - audio track is muted":{tips_zh:"表示收到的音频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received audio data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"auxiliary stream - video track is muted":{tips_zh:"表示收到的屏幕分享数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received screen sharing data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - video track is unable to provide media output":{tips_zh:"表示收到的视频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received video data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - audio track is unable to provide media output":{tips_zh:"表示收到的音频数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received audio data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"auxiliary stream - video track is unable to provide media output":{tips_zh:"表示收到的屏幕分享数据暂不足以播放,一般是网络原因引起,当收到足够播放的数据会变成 unmuted 状态。",tips_en:"Indicates that the received screen sharing data is not enough for playback. This is usually caused by network reasons. When enough data is received for playback, the state will change to unmuted."},"main stream - video track is unmuted":{tips_zh:"收到了足够播放的视频数据",tips_en:"Received enough playback video data"},"main stream - audio track is unmuted":{tips_zh:"收到了足够播放的音频数据",tips_en:"Received enough playback audio data"},"auxiliary stream - video track is unmuted":{tips_zh:"收到了足够播放的屏幕分享数据",tips_en:"Received enough playback screen sharing data"},"main stream - audio player track is ended":{tips_zh:"远端音频轨道停止",tips_en:"Remote audio track stopped"},"main stream - video player track is ended":{tips_zh:"远端视频轨道停止",tips_en:"Remote video track stopped"},"auxiliary stream - video player track is ended":{tips_zh:"远端屏幕分享轨道停止",tips_en:"Received enough playback screen sharing data"},"stream - video track is muted":{tips_zh:"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。",tips_en:"Camera capture is paused, usually due to the device being occupied by other applications or the browser media permission being revoked. The client needs to re-capture.",color:"orange"},"stream - video track is unable to provide media output":{tips_zh:"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked, and the customer needs to re-acquire. SDK v4.11.4+ will automatically resume acquisition without customer intervention",color:"orange"},"video track is unable to provide media output":{tips_zh:function(e){return e.includes("↓")?"远端 track 暂时无法解码数据,可能是网络波动导致":"摄像头采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致。SDK 会自动恢复采集。"},tips_en:function(e){return e.includes("↓")?"The remote track is temporarily unable to decode data, which may be caused by network fluctuations":"The camera acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition."},color:"orange"},"stream - video player track is ended":{tips_zh:"摄像头采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"video player track is ended":{tips_zh:"摄像头采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The camera acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"stream - audio track is muted":{tips_zh:"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。",tips_en:"Microphone capture is paused, usually due to the device being occupied by other applications or the browser media permission being revoked. The client needs to re-capture.",color:"orange"},"audio track is unable to provide media output":{tips_zh:function(e){return e.includes("↓")?"远端 track 暂时无法解码数据,可能是网络波动导致":"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致。SDK 会自动恢复采集。"},tips_en:function(e){return e.includes("↓")?"The remote track is temporarily unable to decode data, which may be caused by network fluctuations":"Microphone acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition."},color:"orange"},"stream - audio track is unable to provide media output":{tips_zh:"麦克风采集暂停,通常是设备被其他应用占用、浏览器媒体权限被回收导致,需要客户重新采集。v4.11.4+ 版本 SDK 会自动恢复采集,无需客户处理",tips_en:"The microphone acquisition is paused, usually because the device is occupied by other applications or the browser media permissions are revoked. The SDK will automatically resume the acquisition.",color:"orange"},"stream - audio player track is ended":{tips_zh:"麦克风采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,建议此时在页面提醒用户重新采集。",tips_en:"The microphone acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"audio player track is ended":{tips_zh:"麦克风采集停止,通常是设备被拔出导致,这种情况 SDK 会自动恢复采集,接入侧无需处理。也有可能是设备被其他应用占用、浏览器媒体权限被回收导致,建议此时在页面提醒用户重新采集。",tips_en:"The microphone acquisition stops, usually because the device is unplugged. In this case, the SDK will automatically resume acquisition, and the access side does not need to handle it. It may also be caused by the device being occupied by other applications or the browser media permissions being reclaimed. It is recommended to remind the user to re-acquire on the page."},"is adding audio track to current published local stream":{tips_zh:"添加音频轨",tips_en:"add audio track",color:"orange"},"is removing audio track from current published local stream":{tips_zh:"移除音频轨",tips_en:"remove audio track",color:"orange"},"is removing video track from current published local stream":{tips_zh:"移除视频轨",tips_en:"remove video track",color:"orange"},"is adding video track to current published local stream":{tips_zh:"添加视频轨",tips_en:"add video track",color:"orange"},"is replacing audio track to current published local main stream":{tips_zh:"替换音频轨",tips_en:"replace audio track",color:"orange"},"is replacing video track to current published local main stream":{tips_zh:"替换视频轨",tips_en:"replace video track",color:"orange"},"downlink network quality change":{tips_zh:"下行网络变更,1: 极佳,2:较好,3:一般,4:较差,5:极差",tips_en:"Downstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"uplink network quality change":{tips_zh:"上行网络变更,1: 极佳,2:较好,3:一般,4:较差,5:极差",tips_en:"Upstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"localStream mute video":{tips_zh:"mute 上行视频流",tips_en:"mute upstream video stream",color:"orange"},"localStream unmute video":{tips_zh:"unmute 上行视频流",tips_en:"unmute upstream video stream",color:"orange"},"localStream mute audio":{tips_zh:"mute 上行音频流",tips_en:"mute upstream audio stream",color:"orange"},"localStream unmute audio":{tips_zh:"unmute 上行音频流",tips_en:"unmute upstream audio stream",color:"orange"},"black detected":{tips_zh:"检测到黑屏,表示当前 fps = 0。通常是网络引起,网络恢复后会恢复正常。若网络正常时,一直未恢复,则为异常情况。",tips_en:"Detect black screen, which means fps = 0. It is usually caused by network, and the network will be recovered after a while. If the network is normal but has not been restored, it is an abnormal situation."},'main stream start to play with options: {"muted":true}':{tips_zh:"已静音的方式播放远端流,一般远端流不需要静音播放,需确认客户 stream.play 接口调用的传参是否正确。",tips_en:"Play the remote stream in silent mode. Generally, the remote stream does not need to be played in silent mode. You need to confirm whether the parameters passed in the client stream.play API call are correct.",color:"orange"},"main stream - audio player is starting playing":{tips_zh:"远端流音频播放成功",tips_en:"Remote stream audio playback success",color:"#0dd90d",class:"success"},"main stream - video player is starting playing":{tips_zh:"远端流视频播放成功",tips_en:"Remote stream video playback success",color:"#0dd90d",class:"success"},"video player is playing":{tips_zh:"本地视频播放成功",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"audio player is playing":{tips_zh:"本地音频播放成功",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"stream - video player is starting playing":{tips_zh:"本地视频播放成功",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"stream - audio player is starting playing":{tips_zh:"本地音频播放成功",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"switch camera success":{tips_zh:"切换摄像头成功",tips_en:"Switch camera success",color:"#0dd90d",class:"success"},"switch microphone success":{tips_zh:"切换麦克风成功",tips_en:"Switch microphone success",color:"#0dd90d",class:"success"},gotStream:{tips_zh:"本地流采集成功",tips_en:"Local stream capture success"},"local stream is published successfully":{tips_zh:"推流成功",tips_en:"Publish success",color:"#0dd90d",class:"success"},"encoderImplementation change to OpenH264":{tips_zh:"使用软编",tips_en:"Use software encoding"},"encoderImplementation change to ExternalEncoder":{tips_zh:"使用硬编",tips_en:"Use hardware encoding"},"getUserMedia with constraints":{tips_zh:"开始媒体(摄像头/麦克风)采集",tips_en:"Start media (camera/microphone) capture"},"getDisplayMedia with constraints":{tips_zh:"开始屏幕分享采集",tips_en:"Start screen sharing capture"},"client-banned":{tips_zh:"被踢出房间",tips_en:"Kicked out of the room",color:"red",class:"red",textColor:"#fff"},user_timeout:{tips_zh:"后台长时间没收到 sdk 心跳导致被踢,通常是用户 JS 线程长时间阻塞导致,若复现概率较高,应用浏览器 Performance 工具分析是哪里导致 JS 线程阻塞。",tips_en:"The backend is too long without receiving SDK heartbeat, which is usually caused by the JS thread being blocked for a long time. If the reproduction probability is high, the application browser Performance tool analyzes where the JS thread is blocked.",color:"red",class:"red",textColor:"#fff"},"schedule failed":{tips_zh:"信令调度请求失败,不影响正常进房流程,SDK 会连接默认的信令域名。",tips_en:"Signaling request failed, does not affect the normal room entry process, SDK will connect to the default signaling domain."},"updateStream() video flag is true, but no camera detected, set video to false":{tips_zh:"尝试恢复摄像头采集时,由于检测到没有摄像头,不恢复摄像头采集",tips_en:"When trying to resume camera acquisition, the camera acquisition is not resumed because it is detected that there is no camera.",color:"orange",class:"orange",textColor:"#fff"},"qualityLimitationReason change to bandwidth":{tips_zh:"带宽预估不够导致编码质量受限,可能会出现编码码率、帧率、分辨率降低问题。通常是网络导致。",tips_en:"bandwidth estimation is not enough to limit the quality of the encoding, which may cause the code rate, frame rate, and resolution to be lowered.",color:"orange",class:"orange",textColor:"#fff"},"qualityLimitationReason change to cpu":{tips_zh:"cpu 负荷太高导致编码质量受限,可能会出现编码码率、帧率、分辨率降低问题。",tips_en:"cpu load is too high to limit the quality of the encoding, which may cause the code rate, frame rate, and resolution to be lowered.",color:"orange",class:"orange",textColor:"#fff"},"visibility change: hidden":{tips_zh:"用户页面切后台,在移动端这会导致设备采集暂停,切回前台时会恢复采集",tips_en:"User page switched to backend, in mobile devices, this will cause the device to pause the capture, and it will be restored when the user switches backend to the frontend.",color:"orange",class:"orange",textColor:"#fff"},"visibility change: visible":{tips_zh:"用户页面切回前台",tips_en:"User page switched to frontend",color:"orange",class:"orange",textColor:"#fff"},"main stream - audio player is paused":{tips_zh:"远端流音频播放暂停,一般有两种可能:\n 1. 业务侧传入用于播放音视频的 div 标签容器被业务侧从 DOM 移除。\n 2. 用户在 Chrome 70 及以下版本,当移动 div 容器时,会导致播放暂停。",tips_en:"The remote stream audio playback is paused, which usually has two possibilities:\n 1. The business side passes in the div tag container for playing audio and video to be removed by the business side from the DOM.\n 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.",color:"orange",class:"orange",textColor:"#fff"},"main stream - video player is paused":{tips_zh:"远端流视频播放暂停,一般有两种可能:\n 1. 业务侧传入用于播放音视频的 div 标签容器被业务侧从 DOM 移除。\n 2. 用户在 Chrome 70 及以下版本,当移动 div 容器时,会导致播放暂停。",tips_en:"The remote stream video playback is paused, which usually has two possibilities:\n 1. The business side passes in the div tag container for playing audio and video to be removed by the business side from the DOM.\n 2. If the user is in Chrome 70 and below, when the div container is moved, the playback will be paused.",color:"orange",class:"orange",textColor:"#fff"},'"displaySurface":"window"':{tips_zh:"屏幕分享采集了应用窗口",tips_en:"Screen sharing captures the application window",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"monitor"':{tips_zh:"屏幕分享采集了整个屏幕",tips_en:"Screen sharing captures the entire screen",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"browser"':{tips_zh:"屏幕分享采集了某个标签页",tips_en:"Screen sharing captures a certain tab page",color:"blue",class:"blue",textColor:"#fff"},updateMediaSettings:{tips_zh:"该日志下的分辨率、帧率为实际采集出的分辨率及帧率",tips_en:"The resolution and frame rate below are the actual resolution and frame rate captured",color:"blue",class:"blue",textColor:"#fff"},"main stream start to play with":{tips_zh:"调用 remoteStream.play 接口",tips_en:"Call remoteStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"stream start to play with":{tips_zh:"调用 localStream.play 接口",tips_en:"Call localStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"main setAudioVolume to 0":{tips_zh:"业务侧调用 remoteStream.setAudioVolume(0) 接口,将播放音量设置为 0,会导致播放无声",tips_en:"Business side calls remoteStream.setAudioVolume(0) interface to set the playback volume to 0, which will cause the playback to be silent",color:"orange",class:"orange",textColor:"#fff"},"screen sharing was stopped because the video track is ended":{tips_zh:"屏幕分享采集停止,可能原因:用户点击停止采集按钮、分享的窗口/页面被关闭等。",tips_en:"Screen sharing capture stopped, possible reasons: user clicks the stop button, the window/page shared by the user is closed, etc.",color:"orange",class:"orange",textColor:"#fff"},"Join() => joining room":{tips_zh:"调用 client.join 接口",tips_en:"Call client.join interface",color:"blue",class:"blue",textColor:"#fff"},"publish() => publishing local stream":{tips_zh:"调用 client.publish 接口",tips_en:"Call client.publish interface",color:"blue",class:"blue",textColor:"#fff"},"subscribe() => subscribe to":{tips_zh:"调用 client.subscribe 接口",tips_en:"Call client.subscribe interface",color:"blue",class:"blue",textColor:"#fff"},"switchRole() => switch role":{tips_zh:"调用 client.switchRole 接口",tips_en:"Call client.switchRole interface",color:"blue",class:"blue",textColor:"#fff"}};["enterRoom","exitRoom","switchRole","destroy","startLocalAudio","updateLocalAudio","stopLocalAudio","startLocalVideo","updateLocalVideo","stopLocalVideo","startScreenShare","updateScreenShare","stopScreenShare","startRemoteVideo","updateRemoteVideo","stopRemoteVideo","muteRemoteAudio","setRemoteAudioVolume"].forEach((function(e){v["".concat(e,"()")]={tips_zh:"调用 trtc.".concat(e),tips_en:"Call trtc.".concat(e),color:"blue",class:"blue",textColor:"#fff"}}));var y=Object.keys(v);var g=new WeakMap;function b(e,t){return n=function(n,o){return function(){for(var o,i,r=this,a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];var l=null==(o=g.get(this))?void 0:o.get(t.apply(void 0,s));l&&l>0&&clearTimeout(l);var u=window.setTimeout((function(){n.apply(r,s)}),e);g.has(this)?null==(i=g.get(this))||i.set(t.apply(void 0,s),u):g.set(this,new Map([[t.apply(void 0,s),u]]))}},function(e,t,o){return o.value=n(o.value,t),o};var n}var _="top",w="bottom",k="right",x="left",D="auto",O=[_,w,k,x],T="start",E="end",L="clippingParents",S="viewport",A="popper",C="reference",N=O.reduce((function(e,t){return e.concat([t+"-"+T,t+"-"+E])}),[]),R=[].concat(O,[D]).reduce((function(e,t){return e.concat([t,t+"-"+T,t+"-"+E])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(e){return e?(e.nodeName||"").toLowerCase():null}function z(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function I(e){return e instanceof z(e).Element||e instanceof Element}function q(e){return e instanceof z(e).HTMLElement||e instanceof HTMLElement}function M(e){return"undefined"!=typeof ShadowRoot&&(e instanceof z(e).ShadowRoot||e instanceof ShadowRoot)}var U={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];q(i)&&B(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});q(o)&&B(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};function P(e){return e.split("-")[0]}var H=Math.max,W=Math.min,V=Math.round;function K(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function G(){return!/^((?!chrome|android).)*safari/i.test(K())}function F(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),i=1,r=1;t&&q(e)&&(i=e.offsetWidth>0&&V(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&V(o.height)/e.offsetHeight||1);var a=(I(e)?z(e):window).visualViewport,s=!G()&&n,c=(o.left+(s&&a?a.offsetLeft:0))/i,l=(o.top+(s&&a?a.offsetTop:0))/r,u=o.width/i,d=o.height/r;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function Y(e){var t=F(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function X(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&M(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function $(e){return z(e).getComputedStyle(e)}function Q(e){return["table","td","th"].indexOf(B(e))>=0}function J(e){return((I(e)?e.ownerDocument:e.document)||window.document).documentElement}function Z(e){return"html"===B(e)?e:e.assignedSlot||e.parentNode||(M(e)?e.host:null)||J(e)}function ee(e){return q(e)&&"fixed"!==$(e).position?e.offsetParent:null}function te(e){for(var t=z(e),n=ee(e);n&&Q(n)&&"static"===$(n).position;)n=ee(n);return n&&("html"===B(n)||"body"===B(n)&&"static"===$(n).position)?t:n||function(e){var t=/firefox/i.test(K());if(/Trident/i.test(K())&&q(e)&&"fixed"===$(e).position)return null;var n=Z(e);for(M(n)&&(n=n.host);q(n)&&["html","body"].indexOf(B(n))<0;){var o=$(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function ne(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function oe(e,t,n){return H(e,W(t,n))}function ie(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function re(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ae(e){return e.split("-")[1]}var se={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ce(e){var t,n=e.popper,o=e.popperRect,i=e.placement,r=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=x,D=_,O=window;if(l){var T=te(n),L="clientHeight",S="clientWidth";if(T===z(n)&&"static"!==$(T=J(n)).position&&"absolute"===s&&(L="scrollHeight",S="scrollWidth"),i===_||(i===x||i===k)&&r===E)D=w,m-=(d&&T===O&&O.visualViewport?O.visualViewport.height:T[L])-o.height,m*=c?1:-1;if(i===x||(i===_||i===w)&&r===E)b=k,f-=(d&&T===O&&O.visualViewport?O.visualViewport.width:T[S])-o.width,f*=c?1:-1}var A,C=Object.assign({position:s},l&&se),N=!0===u?function(e,t){var n=e.x,o=e.y,i=t.devicePixelRatio||1;return{x:V(n*i)/i||0,y:V(o*i)/i||0}}({x:f,y:m},z(n)):{x:f,y:m};return f=N.x,m=N.y,c?Object.assign({},C,((A={})[D]=g?"0":"",A[b]=y?"0":"",A.transform=(O.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",A)):Object.assign({},C,((t={})[D]=g?m+"px":"",t[b]=y?f+"px":"",t.transform="",t))}var le={passive:!0};var ue={left:"right",right:"left",bottom:"top",top:"bottom"};function de(e){return e.replace(/left|right|bottom|top/g,(function(e){return ue[e]}))}var pe={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return pe[e]}))}function he(e){var t=z(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function me(e){return F(J(e)).left+he(e).scrollLeft}function ve(e){var t=$(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}function ye(e){return["html","body","#document"].indexOf(B(e))>=0?e.ownerDocument.body:q(e)&&ve(e)?e:ye(Z(e))}function ge(e,t){var n;void 0===t&&(t=[]);var o=ye(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),r=z(o),a=i?[r].concat(r.visualViewport||[],ve(o)?o:[]):o,s=t.concat(a);return i?s:s.concat(ge(Z(a)))}function be(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _e(e,t,n){return t===S?be(function(e,t){var n=z(e),o=J(e),i=n.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,c=0;if(i){r=i.width,a=i.height;var l=G();(l||!l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:r,height:a,x:s+me(e),y:c}}(e,n)):I(t)?function(e,t){var n=F(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):be(function(e){var t,n=J(e),o=he(e),i=null==(t=e.ownerDocument)?void 0:t.body,r=H(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=H(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-o.scrollLeft+me(e),c=-o.scrollTop;return"rtl"===$(i||n).direction&&(s+=H(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:s,y:c}}(J(e)))}function we(e,t,n,o){var i="clippingParents"===t?function(e){var t=ge(Z(e)),n=["absolute","fixed"].indexOf($(e).position)>=0&&q(e)?te(e):e;return I(n)?t.filter((function(e){return I(e)&&X(e,n)&&"body"!==B(e)})):[]}(e):[].concat(t),r=[].concat(i,[n]),a=r[0],s=r.reduce((function(t,n){var i=_e(e,n,o);return t.top=H(i.top,t.top),t.right=W(i.right,t.right),t.bottom=W(i.bottom,t.bottom),t.left=H(i.left,t.left),t}),_e(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ke(e){var t,n=e.reference,o=e.element,i=e.placement,r=i?P(i):null,a=i?ae(i):null,s=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(r){case _:t={x:s,y:n.y-o.height};break;case w:t={x:s,y:n.y+n.height};break;case k:t={x:n.x+n.width,y:c};break;case x:t={x:n.x-o.width,y:c};break;default:t={x:n.x,y:n.y}}var l=r?ne(r):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case T:t[l]=t[l]-(n[u]/2-o[u]/2);break;case E:t[l]=t[l]+(n[u]/2-o[u]/2)}}return t}function xe(e,t){void 0===t&&(t={});var n=t,o=n.placement,i=void 0===o?e.placement:o,r=n.strategy,a=void 0===r?e.strategy:r,s=n.boundary,c=void 0===s?L:s,l=n.rootBoundary,u=void 0===l?S:l,d=n.elementContext,p=void 0===d?A:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,y=ie("number"!=typeof v?v:re(v,O)),g=p===A?C:A,b=e.rects.popper,x=e.elements[h?g:p],D=we(I(x)?x:x.contextElement||J(e.elements.popper),c,u,a),T=F(e.elements.reference),E=ke({reference:T,element:b,strategy:"absolute",placement:i}),N=be(Object.assign({},b,E)),R=p===A?N:T,j={top:D.top-R.top+y.top,bottom:R.bottom-D.bottom+y.bottom,left:D.left-R.left+y.left,right:R.right-D.right+y.right},B=e.modifiersData.offset;if(p===A&&B){var z=B[i];Object.keys(j).forEach((function(e){var t=[k,w].indexOf(e)>=0?1:-1,n=[_,w].indexOf(e)>=0?"y":"x";j[e]+=z[n]*t}))}return j}function De(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Oe(e){return[_,k,w,x].some((function(t){return e[t]>=0}))}function Te(e,t,n){void 0===n&&(n=!1);var o,i,r=q(t),a=q(t)&&function(e){var t=e.getBoundingClientRect(),n=V(t.width)/e.offsetWidth||1,o=V(t.height)/e.offsetHeight||1;return 1!==n||1!==o}(t),s=J(t),c=F(e,a,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==B(t)||ve(s))&&(l=(o=t)!==z(o)&&q(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:he(o)),q(t)?((u=F(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=me(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Ee(e){var t=new Map,n=new Set,o=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var o=t.get(e);o&&i(o)}})),o.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),o}var Le={placement:"bottom",modifiers:[],strategy:"absolute"};function Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Ae(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,o=void 0===n?[]:n,i=t.defaultOptions,r=void 0===i?Le:i;return function(e,t,n){void 0===n&&(n=r);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Le,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},r,s.options,i),s.scrollParents={reference:I(e)?ge(e):e.contextElement?ge(e.contextElement):[],popper:ge(t)};var a,l,p=function(e){var t=Ee(e);return j.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((a=[].concat(o,s.options.modifiers),l=a.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(l).map((function(e){return l[e]}))));return s.orderedModifiers=p.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,o=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var r=i({state:s,name:t,instance:u,options:o}),a=function(){};c.push(r||a)}})),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Se(t,n)){s.rects={reference:Te(t,te(n),"fixed"===s.options.strategy),popper:Y(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var i=s.orderedModifiers[o],r=i.fn,a=i.options,c=void 0===a?{}:a,d=i.name;"function"==typeof r&&(s=r({state:s,options:c,name:d,instance:u})||s)}else s.reset=!1,o=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(i())}))}))),a}),destroy:function(){d(),l=!0}};if(!Se(e,t))return u;function d(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Ce=Ae({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,r=void 0===i||i,a=o.resize,s=void 0===a||a,c=z(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&l.forEach((function(e){e.addEventListener("scroll",n.update,le)})),s&&c.addEventListener("resize",n.update,le),function(){r&&l.forEach((function(e){e.removeEventListener("scroll",n.update,le)})),s&&c.removeEventListener("resize",n.update,le)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ke({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,a=void 0===r||r,s=n.roundOffsets,c=void 0===s||s,l={placement:P(t.placement),variation:ae(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ce(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ce(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},U,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.offset,r=void 0===i?[0,0]:i,a=R.reduce((function(e,n){return e[n]=function(e,t,n){var o=P(e),i=[x,_].indexOf(o)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=r[0],s=r[1];return a=a||0,s=(s||0)*i,[x,k].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,r),e}),{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[o]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=n.mainAxis,r=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,y=P(v),g=c||(y===v||!h?[de(v)]:function(e){if(P(e)===D)return[];var t=de(e);return[fe(e),t,fe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(P(n)===D?function(e,t){void 0===t&&(t={});var n=t,o=n.placement,i=n.boundary,r=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?R:c,u=ae(o),d=u?s?N:N.filter((function(e){return ae(e)===u})):O,p=d.filter((function(e){return l.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=xe(e,{placement:n,boundary:i,rootBoundary:r,padding:a})[P(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),E=t.rects.reference,L=t.rects.popper,S=new Map,A=!0,C=b[0],j=0;j<b.length;j++){var B=b[j],z=P(B),I=ae(B)===T,q=[_,w].indexOf(z)>=0,M=q?"width":"height",U=xe(t,{placement:B,boundary:u,rootBoundary:d,altBoundary:p,padding:l}),H=q?I?k:x:I?w:_;E[M]>L[M]&&(H=de(H));var W=de(H),V=[];if(r&&V.push(U[z]<=0),s&&V.push(U[H]<=0,U[W]<=0),V.every((function(e){return e}))){C=B,A=!1;break}S.set(B,V)}if(A)for(var K=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},G=h?3:1;G>0;G--){if("break"===K(G))break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.mainAxis,r=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,v=xe(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),y=P(t.placement),g=ae(t.placement),b=!g,D=ne(y),O="x"===D?"y":"x",E=t.modifiersData.popperOffsets,L=t.rects.reference,S=t.rects.popper,A="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(E){if(r){var j,B="y"===D?_:x,z="y"===D?w:k,I="y"===D?"height":"width",q=E[D],M=q+v[B],U=q-v[z],V=f?-S[I]/2:0,K=g===T?L[I]:S[I],G=g===T?-S[I]:-L[I],F=t.elements.arrow,X=f&&F?Y(F):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=$[B],J=$[z],Z=oe(0,L[I],X[I]),ee=b?L[I]/2-V-Z-Q-C.mainAxis:K-Z-Q-C.mainAxis,ie=b?-L[I]/2+V+Z+J+C.mainAxis:G+Z+J+C.mainAxis,re=t.elements.arrow&&te(t.elements.arrow),se=re?"y"===D?re.clientTop||0:re.clientLeft||0:0,ce=null!=(j=null==N?void 0:N[D])?j:0,le=q+ie-ce,ue=oe(f?W(M,q+ee-ce-se):M,q,f?H(U,le):U);E[D]=ue,R[D]=ue-q}if(s){var de,pe="x"===D?_:x,fe="x"===D?w:k,he=E[O],me="y"===O?"height":"width",ve=he+v[pe],ye=he-v[fe],ge=-1!==[_,x].indexOf(y),be=null!=(de=null==N?void 0:N[O])?de:0,_e=ge?ve:he-L[me]-S[me]-be+C.altAxis,we=ge?he+L[me]+S[me]-be-C.altAxis:ye,ke=f&&ge?function(e,t,n){var o=oe(e,t,n);return o>n?n:o}(_e,he,we):oe(f?_e:ve,he,f?we:ye);E[O]=ke,R[O]=ke-he}t.modifiersData[o]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,i=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,s=P(n.placement),c=ne(s),l=[x,k].indexOf(s)>=0?"height":"width";if(r&&a){var u=function(e,t){return ie("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:re(e,O))}(i.padding,n),d=Y(r),p="y"===c?_:x,f="y"===c?w:k,h=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],m=a[c]-n.rects.reference[c],v=te(r),y=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,g=h/2-m/2,b=u[p],D=y-d[l]-u[f],T=y/2-d[l]/2+g,E=oe(b,T,D),L=c;n.modifiersData[o]=((t={})[L]=E,t.centerOffset=E-T,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&X(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,a=xe(t,{elementContext:"reference"}),s=xe(t,{altBoundary:!0}),c=De(a,o),l=De(s,i,r),u=Oe(c),d=Oe(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Ne="tippy-content",Re="tippy-backdrop",je="tippy-arrow",Be="tippy-svg-arrow",ze={passive:!0,capture:!0},Ie=function(){return document.body};function qe(e,t,n){if(Array.isArray(e)){var o=e[t];return null==o?Array.isArray(n)?n[t]:n:o}return e}function Me(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ue(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Pe(e,t){return 0===t?e:function(o){clearTimeout(n),n=setTimeout((function(){e(o)}),t)};var n}function He(e){return[].concat(e)}function We(e,t){-1===e.indexOf(t)&&e.push(t)}function Ve(e){return[].slice.call(e)}function Ke(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Ge(){return document.createElement("div")}function Fe(e){return["Element","Fragment"].some((function(t){return Me(e,t)}))}function Ye(e){return Fe(e)?[e]:function(e){return Me(e,"NodeList")}(e)?Ve(e):Array.isArray(e)?e:Ve(document.querySelectorAll(e))}function Xe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function $e(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Qe(e,t,n){var o=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[o](t,n)}))}function Je(e,t){for(var n=t;n;){var o;if(e.contains(n))return!0;n=null==n.getRootNode||null==(o=n.getRootNode())?void 0:o.host}return!1}var Ze={isTouch:!1},et=0;function tt(){Ze.isTouch||(Ze.isTouch=!0,window.performance&&document.addEventListener("mousemove",nt))}function nt(){var e=performance.now();e-et<20&&(Ze.isTouch=!1,document.removeEventListener("mousemove",nt)),et=e}function ot(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var it,rt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function at(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function st(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function ct(e){return st("\n %ctippy.js\n\n %c"+st(e)+"\n\n %c👷 This is a development-only message. It will be removed in production.\n ")}function lt(e){return[ct(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function ut(e,t){var n;e&&!it.has(t)&&(it.add(t),(n=console).warn.apply(n,lt(t)))}function dt(e,t){var n;e&&!it.has(t)&&(it.add(t),(n=console).error.apply(n,lt(t)))}it=new Set;var pt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ft=Object.assign({appendTo:Ie,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},pt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ht=Object.keys(ft);function mt(e){var t=(e.plugins||[]).reduce((function(t,n){var o,i=n.name,r=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(o=ft[i])?o:r);return t}),{});return Object.assign({},e,t)}function vt(e,t){var n=Object.assign({},t,{content:Ue(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(mt(Object.assign({},ft,{plugins:t}))):ht).reduce((function(t,n){var o=(e.getAttribute("data-tippy-"+n)||"").trim();if(!o)return t;if("content"===n)t[n]=o;else try{t[n]=JSON.parse(o)}catch(e){t[n]=o}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},ft.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function yt(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var n,o,i=function(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}(ft,Object.keys(pt)),r=(n=i,o=e,!{}.hasOwnProperty.call(n,o));r&&(r=0===t.filter((function(t){return t.name===e})).length),ut(r,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}var gt=function(){return"innerHTML"};function bt(e,t){e[gt()]=t}function _t(e){var t=Ge();return!0===e?t.className=je:(t.className=Be,Fe(e)?t.appendChild(e):bt(t,e)),t}function wt(e,t){Fe(t.content)?(bt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?bt(e,t.content):e.textContent=t.content)}function kt(e){var t=e.firstElementChild,n=Ve(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Ne)})),arrow:n.find((function(e){return e.classList.contains(je)||e.classList.contains(Be)})),backdrop:n.find((function(e){return e.classList.contains(Re)}))}}function xt(e){var t=Ge(),n=Ge();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var o=Ge();function i(n,o){var i=kt(t),r=i.box,a=i.content,s=i.arrow;o.theme?r.setAttribute("data-theme",o.theme):r.removeAttribute("data-theme"),"string"==typeof o.animation?r.setAttribute("data-animation",o.animation):r.removeAttribute("data-animation"),o.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?r.setAttribute("role",o.role):r.removeAttribute("role"),n.content===o.content&&n.allowHTML===o.allowHTML||wt(a,e.props),o.arrow?s?n.arrow!==o.arrow&&(r.removeChild(s),r.appendChild(_t(o.arrow))):r.appendChild(_t(o.arrow)):s&&r.removeChild(s)}return o.className=Ne,o.setAttribute("data-state","hidden"),wt(o,e.props),t.appendChild(n),n.appendChild(o),i(e.props,e.props),{popper:t,onUpdate:i}}xt.$$tippy=!0;var Dt=1,Ot=[],Tt=[];function Et(e,t){var n,o,i,r,a,s,c,l,u=vt(e,Object.assign({},ft,mt(Ke(t)))),d=!1,p=!1,f=!1,h=!1,m=[],v=Pe(F,u.interactiveDebounce),y=Dt++,g=(l=u.plugins).filter((function(e,t){return l.indexOf(e)===t})),b={id:y,reference:e,popper:Ge(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){if(ut(b.state.isDestroyed,at("setProps")),b.state.isDestroyed)return;R("onBeforeUpdate",[b,t]),K();var n=b.props,o=vt(e,Object.assign({},n,Ke(t),{ignoreAttributes:!0}));b.props=o,V(),n.interactiveDebounce!==o.interactiveDebounce&&(z(),v=Pe(F,o.interactiveDebounce));n.triggerTarget&&!o.triggerTarget?He(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):o.triggerTarget&&e.removeAttribute("aria-expanded");B(),N(),k&&k(n,o);b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));R("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){ut(b.state.isDestroyed,at("show"));var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,o=Ze.isTouch&&!b.props.touch,i=qe(b.props.duration,0,ft.duration);if(e||t||n||o)return;if(L().hasAttribute("disabled"))return;if(R("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,E()&&(w.style.visibility="visible");N(),U(),b.state.isMounted||(w.style.transition="none");if(E()){var r=A();Xe([r.box,r.content],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,E()&&b.props.animation){var t=A(),n=t.box,o=t.content;Xe([n,o],i),$e([n,o],"visible")}j(),B(),We(Tt,b),null==(e=b.popperInstance)||e.forceUpdate(),R("onMount",[b]),b.props.animation&&E()&&function(e,t){H(e,t)}(i,(function(){b.state.isShown=!0,R("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=L();e=b.props.interactive&&t===Ie||"parent"===t?n.parentNode:Ue(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,Q(),ut(b.props.interactive&&t===ft.appendTo&&n.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){ut(b.state.isDestroyed,at("hide"));var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,o=qe(b.props.duration,1,ft.duration);if(e||t||n)return;if(R("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,d=!1,E()&&(w.style.visibility="hidden");if(z(),P(),N(!0),E()){var i=A(),r=i.box,a=i.content;b.props.animation&&(Xe([r,a],o),$e([r,a],"hidden"))}j(),B(),b.props.animation?E()&&function(e,t){H(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(o,b.unmount):b.unmount()},hideWithInteractivity:function(e){ut(b.state.isDestroyed,at("hideWithInteractivity")),S().addEventListener("mousemove",v),We(Ot,v),v(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){ut(b.state.isDestroyed,at("unmount")),b.state.isVisible&&b.hide();if(!b.state.isMounted)return;J(),Z().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Tt=Tt.filter((function(e){return e!==b})),b.state.isMounted=!1,R("onHidden",[b])},destroy:function(){if(ut(b.state.isDestroyed,at("destroy")),b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),K(),delete e._tippy,b.state.isDestroyed=!0,R("onDestroy",[b])}};if(!u.render)return dt(!0,"render() function has not been supplied."),b;var _=u.render(b),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var x=g.map((function(e){return e.fn(b)})),D=e.hasAttribute("aria-expanded");return V(),B(),N(),R("onCreate",[b]),u.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",v)})),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function T(){return"hold"===O()[0]}function E(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function L(){return c||e}function S(){var e,t,n=L().parentNode;return n?null!=(t=He(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function A(){return kt(w)}function C(e){return b.state.isMounted&&!b.state.isVisible||Ze.isTouch||r&&"focus"===r.type?0:qe(b.props.delay,e?0:1,ft.delay)}function N(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function R(e,t,n){var o;(void 0===n&&(n=!0),x.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(o=b.props)[e].apply(o,t)}function j(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,o=w.id;He(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+o:o);else{var i=t&&t.replace(o,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function B(){!D&&b.props.aria.expanded&&He(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===L()?"true":"false"):e.removeAttribute("aria-expanded")}))}function z(){S().removeEventListener("mousemove",v),Ot=Ot.filter((function(e){return e!==v}))}function I(t){if(!Ze.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Je(w,n)){if(He(b.props.triggerTarget||e).some((function(e){return Je(e,n)}))){if(Ze.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),p=!0,setTimeout((function(){p=!1})),b.state.isMounted||P())}}}function q(){f=!0}function M(){f=!1}function U(){var e=S();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,ze),e.addEventListener("touchstart",M,ze),e.addEventListener("touchmove",q,ze)}function P(){var e=S();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,ze),e.removeEventListener("touchstart",M,ze),e.removeEventListener("touchmove",q,ze)}function H(e,t){var n=A().box;function o(e){e.target===n&&(Qe(n,"remove",o),t())}if(0===e)return t();Qe(n,"remove",a),Qe(n,"add",o),a=o}function W(t,n,o){void 0===o&&(o=!1),He(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,o),m.push({node:e,eventType:t,handler:n,options:o})}))}function V(){var e;T()&&(W("touchstart",G,{passive:!0}),W("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(W(e,G),e){case"mouseenter":W("mouseleave",Y);break;case"focus":W(rt?"focusout":"blur",X);break;case"focusin":W("focusout",X)}}))}function K(){m.forEach((function(e){var t=e.node,n=e.eventType,o=e.handler,i=e.options;t.removeEventListener(n,o,i)})),m=[]}function G(e){var t,n=!1;if(b.state.isEnabled&&!$(e)&&!p){var o="focus"===(null==(t=r)?void 0:t.type);r=e,c=e.currentTarget,B(),!b.state.isVisible&&Me(e,"MouseEvent")&&Ot.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!o&&te(e)}}function F(e){var t=e.target,n=L().contains(t)||w.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,o=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,r=e.props.interactiveBorder,a=i.placement.split("-")[0],s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,d="left"===a?s.right.x:0,p=t.top-o+c>r,f=o-t.bottom-l>r,h=t.left-n+u>r,m=n-t.right-d>r;return p||f||h||m}))}(Z().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean),e)&&(z(),te(e))}function Y(e){$(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==L()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function $(e){return!!Ze.isTouch&&T()!==e.type.indexOf("touch")>=0}function Q(){J();var t=b.props,n=t.popperOptions,o=t.placement,i=t.offset,r=t.getReferenceClientRect,a=t.moveTransition,c=E()?kt(w).arrow:null,l=r?{getBoundingClientRect:r,contextElement:r.contextElement||L()}:e,u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(E()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];E()&&c&&u.push({name:"arrow",options:{element:c,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),b.popperInstance=Ce(l,w,Object.assign({},n,{placement:o,onFirstUpdate:s,modifiers:u}))}function J(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return Ve(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&R("onTrigger",[b,e]),U();var t=C(!0),o=O(),i=o[0],r=o[1];Ze.isTouch&&"hold"===i&&r&&(t=r),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),R("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=C(!1);t?o=setTimeout((function(){b.state.isVisible&&b.hide()}),t):i=requestAnimationFrame((function(){b.hide()}))}}else P()}}function Lt(e,t){void 0===t&&(t={});var n=ft.plugins.concat(t.plugins||[]);!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;dt(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),dt(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),yt(t,n),document.addEventListener("touchstart",tt,ze),window.addEventListener("blur",ot);var o=Object.assign({},t,{plugins:n}),i=Ye(e),r=Fe(o.content),a=i.length>1;ut(r&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "));var s=i.reduce((function(e,t){var n=t&&Et(t,o);return n&&e.push(n),e}),[]);return Fe(e)?s[0]:s}Lt.defaultProps=ft,Lt.setDefaultProps=function(e){yt(e,[]),Object.keys(e).forEach((function(t){ft[t]=e[t]}))},Lt.currentInput=Ze,Object.assign({},U,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Lt.setDefaultProps({render:xt});var St=Lt,At="trtc_debug_dialog",Ct="".concat(At,"_activated"),Nt="".concat(At,"_switch"),Rt="".concat(At,"_mask"),jt="".concat(At,"_pannel"),Bt="".concat(At,"_tabber"),zt="".concat(At,"_tab"),It="".concat(At,"_topbar"),qt="".concat(At,"_toptab"),Mt="".concat(At,"_content"),Ut="".concat(At,"_has_topbar"),Pt="".concat(Mt,"_log"),Ht="".concat(Mt,"_network"),Wt="".concat(Ht,"_title"),Vt="".concat(Ht,"_basic"),Kt="".concat(Ht,"_local"),Gt="".concat(Ht,"_remote"),Ft="".concat(At,"_banner"),Yt="".concat(Ft,"_item"),Xt="".concat(At,"_toolbar"),$t="".concat(At,"_tool"),Qt="".concat(At,"_item"),Jt="".concat(Qt,"_debug"),Zt="".concat(Qt,"_info"),en="".concat(Qt,"_warn"),tn="".concat(Qt,"_error"),nn="".concat(At,"_back_top"),on="".concat(At,"_go_bottom"),rn="success",an=!1,sn=function(){return o((function e(t,o){var i=this;n(this,e),d(this,"_dialogStyle",null),d(this,"_dialogNode",null),d(this,"_switchNode",null),d(this,"_maskNode",null),d(this,"_pannelNode",null),d(this,"_logContentNode",null),d(this,"_networkContentNode",null),d(this,"_tabNodes",[]),d(this,"_toptabNodes",[]),d(this,"_backTopButton",null),d(this,"_goBottomButton",null),d(this,"_hasMove",!1),d(this,"_showDialog",!1),d(this,"_isMobile",!1),d(this,"_showLogType","all"),d(this,"prevBytesSent",0),d(this,"prevBytesReceived",0),d(this,"_core"),d(this,"_log"),d(this,"_logList",[]),d(this,"_networkQuality"),d(this,"tippyCount",0),d(this,"isUploading",!1),d(this,"handleNetworkQuality",(function(e){i._networkQuality=e})),d(this,"handleHeartbeatReport",(function(e){var t,n,o,r,a,s,c,l,u,d,p=1e8,f={2:"big",3:"small",7:"sub"},h={rtt:e.msg_up_stream_info.msg_network_status.uint32_rtt||(null==(t=e.msg_down_stream_info[0])?void 0:t.msg_network_status.uint32_rtt)||(null==(n=i._networkQuality)?void 0:n.uplinkRTT)||(null==(o=i._networkQuality)?void 0:o.downlinkRTT)||0,upLoss:(null==(r=i._networkQuality)?void 0:r.uplinkLoss)||0,downLoss:(null==(a=i._networkQuality)?void 0:a.downlinkLoss)||0,bytesSent:e.bytes_sent||0,bytesReceived:e.bytes_received||0,localStatistics:{audio:{bitrate:((null==(s=e.msg_up_stream_info.msg_audio_status)?void 0:s.uint32_audio_codec_bitrate)||0)/1e3,audioLevel:((null==(c=e.msg_up_stream_info.msg_audio_status)?void 0:c.uint32_audio_level)||0)/p},video:e.msg_up_stream_info.msg_video_status.filter((function(e){return f[e.uint32_video_stream_type]})).map((function(e){return{bitrate:(e.uint32_video_codec_bitrate||0)/1e3,width:e.uint32_video_width,height:e.uint32_video_height,frameRate:e.uint32_video_enc_fps,videoType:f[e.uint32_video_stream_type]}}))},remoteStatistics:e.msg_down_stream_info.map((function(e){return{userId:e.msg_user_info.str_identifier,audio:{bitrate:(e.msg_audio_status.uint32_audio_codec_bitrate||0)/1e3,audioLevel:(e.msg_audio_status.uint32_audio_level||0)/p},video:e.msg_video_status.map((function(e){return{bitrate:(e.uint32_video_codec_bitrate||0)/1e3,width:e.uint32_video_width,height:e.uint32_video_height,frameRate:e.uint32_video_dec_fps,videoType:f[e.uint32_video_stream_type]}}))}}))},v=(h.bytesSent-i.prevBytesSent)/2,y=(h.bytesReceived-i.prevBytesReceived)/2;i.prevBytesSent=h.bytesSent,i.prevBytesReceived=h.bytesReceived;var g=null==(l=i._dialogNode)?void 0:l.querySelector(".".concat(Vt)),b="rtt: ".concat(h.rtt," ms upLoss: ").concat(h.upLoss," downLoss: ").concat(h.downLoss," <br>\n ↑ ").concat(v/1e3," KB/s (").concat(8*v/1e3," Kb/s) <br>\n ↓ ").concat(y/1e3," KB/s (").concat(8*y/1e3," Kb/s) <br>\n ");g.innerHTML=b;var _=null==(u=i._dialogNode)?void 0:u.querySelector(".".concat(Kt)),w="";h.localStatistics.audio.bitrate&&(w="<li>local audio: ".concat(h.localStatistics.audio.bitrate," Kb/s audioLevel: ").concat(h.localStatistics.audio.audioLevel.toFixed(5),"</li>")),h.localStatistics.video.length>0&&(w+="".concat(h.localStatistics.video.map((function(e){return"<li>local ".concat(e.videoType," video: ").concat(e.bitrate," Kb/s ").concat(e.width,"*").concat(e.height," ").concat(e.frameRate,"fps</li>")})).join(""))),_.innerHTML=""===w?"".concat(m.NO_DATA):w;var k=null==(d=i._dialogNode)?void 0:d.querySelector(".".concat(Gt)),x="";h.remoteStatistics.length>0&&h.remoteStatistics.forEach((function(e){var t="remote ".concat(e.userId,":");e.audio.bitrate>0&&(t+="<li>audio: ".concat(e.audio.bitrate," Kb/s audioLevel: ").concat(e.audio.audioLevel.toFixed(5),"</li>")),e.video.length>0&&e.video.forEach((function(e){t+="<li>".concat(e.videoType," video: ").concat(e.bitrate," Kb/s ").concat(e.width,"*").concat(e.height," ").concat(e.frameRate,"fps</li>")})),x+=t})),k.innerHTML=""===x?"".concat(m.NO_DATA):x})),an=!0,this._core=t,this._log=o,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}),[{key:"synchronizeLog",value:function(){var e=this;this._core.loggerManager.getQueue().forEach((function(t){e.updateLog(t)}))}},{key:"addStyle",value:function(){this._dialogStyle=document.createElement("style"),this._dialogStyle.innerHTML="\n #".concat(At,"\n {--DD-BG-0:#ededed;--DD-BG-1:#f7f7f7;--DD-BG-2:#fff;--DD-BODER:rgba(0,0,0,0.1);--DD-ERROR:red;--DD-WARN:#fa9d3b;--DD-INFO:#000;--DD-DEBUG:#10aeff;--DD-WARN-BG:#fff3cc;--DD-ERROR-BG:#ffe6e6;}\n #").concat(At," a,.").concat(Nt,"{cursor:pointer;}\n .").concat(At,"{color:black;}\n .").concat(Nt,"{display:block;position:fixed;right:50px;bottom:150px;border-radius:5px;background-color:#07c160;color:#fff;padding:5px 10px;z-index:10000;}\n .").concat(Rt,"{display:none;position:fixed;left:0;top:0;right:0;bottom:0;z-index:10001;background-color:rgb(0,0,0,0.6);}\n .").concat(jt,"{background-color:#ededed;display:none;position:fixed;min-height:85%;left:60%;right:0;bottom:0;z-index:10002;border:1px solid var(--DD-BG-0);}\n @media (max-width:768px) {.").concat(jt,"{left:0;}} \n .").concat(Bt,"{display:flex;height:2rem;border-bottom:1px solid var(--DD-BODER);}\n .").concat(zt,"{padding:0 20px;border-right:1px solid rgba(0, 0, 0, 0.1);line-height:2rem;color: black;}\n .").concat(zt,".").concat(Ct,"{background-color:var(--DD-BG-2);}\n .").concat(It,"{height:2rem;display:flex;flex-direction:row;}\n .").concat(qt,"{width:20%;text-align:center;line-height:2rem;border-right:1px solid var(--DD-BODER);border-bottom:1px solid var(--DD-BODER);color:black;}\n .").concat(qt,".").concat(Ct,"{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}\n .").concat(Mt,"{background-color:#fff;position:absolute;left:0;right:0;top:2rem;bottom:6rem;overflow-y:scroll;overflow-x:hidden;}\n .").concat(Mt,".").concat(Ut,"{top:4rem;}\n .").concat(Ht,"{display:flex;display:none;}\n .").concat(Wt,"{text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BODER);}\n .").concat(Vt,",.").concat(Kt,",.").concat(Gt,"{text-align:center;border-bottom:1px solid var(--DD-BODER);}\n .").concat(Qt,"{border-bottom:1px solid var(--DD-BG-0);padding:5px 10px;overflow-wrap: break-word;}\n .").concat(tn,"{color:var(--DD-ERROR);background-color:var(--DD-ERROR-BG);}\n .").concat(en,"{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}\n .").concat(Zt,"{color:var(--DD-INFO);}\n .").concat(Jt,"{color:var(--DD-DEBUG);}\n .").concat(Ft,"{position:absolute;left:0;right:0;bottom:2rem;height:4rem;border-bottom:1px solid var(--DD-BODER);display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--DD-BG-1);}\n .").concat(Yt,"{border-bottom:1px solid var(--DD-BODER);padding:5px 10px;overflow-wrap: break-word;}\n .").concat(Xt,"{position:absolute;line-height:2rem;display:flex;flex-direction:row;left:0;right:0;bottom:0;}\n .").concat($t,"{flex:1;color:black;text-align:center;background-color:#ededed;border-right:1px solid var(--DD-BODER);}\n #").concat(At," .").concat(nn,",#").concat(At," .").concat(on,"{position:absolute;height:2rem;width:6rem;right:2rem;border-radius:5px;background-color:rgba(30, 136, 229, 0.8);z-index:10003;cursor:pointer;padding:0 5px;line-height:2rem;color:white;text-align:center;}\n .").concat(on,"{bottom:7rem;}\n .").concat(nn,"{bottom:9.5rem;}\n #").concat(At," .").concat($t,'.disable {cursor: not-allowed;background-color: #ededed;color: #999;}\n .tippy-box {position: relative;background-color: #333;color: #fff;border-radius: 4px;font-size: 14px;line-height: 1.4; white-space: normal;outline: 0;transition-property: transform, visibility, opacity;}\n .tippy-content {position: relative;padding: 5px 9px;}\n .tippy-arrow {width: 16px;height: 16px;color: #333;}\n .tippy-arrow:before {content: "";position: absolute;border-color: transparent;border-style: solid;}.tippy-box[data-placement^=top]>.tippy-arrow:before {bottom: -7px;left: 0;border-width: 8px 8px 0; border-top-color: initial;transform-origin: center top;}\n .tippy-box[data-placement^=top]>.tippy-arrow {bottom: 0;}\n '),document.body.appendChild(this._dialogStyle)}},{key:"addDialog",value:function(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}},{key:"createDiaLog",value:function(){var e,t,n,o,i=this;this._isMobile=f();var r=document.createElement("template");r.innerHTML='<div id="'.concat(At,'" class="').concat(At,'"><div class="').concat(Nt,'">Debug</div><div class="').concat(Rt,'"></div><div class="').concat(jt,'"><a class="').concat(nn,'">').concat(m.BACK_TOP,'</a><a class="').concat(on,'">').concat(m.GO_BOTTOM,'</a><div class="').concat(Bt,'"><a class="').concat(zt," ").concat(Ct,'" data-tab="log">').concat(m.LOG_BUTTON,'</a><a class="').concat(zt,'" data-tab="network">').concat(m.NETWORK_BUTTON,'</a></div><div class="').concat(It,'"><a class="').concat(qt," ").concat(Ct,'" data-type="all">All</a><a class="').concat(qt,'" data-type="debug">Debug</a><a class="').concat(qt,'" data-type="info">Info</a><a class="').concat(qt,'" data-type="warn">Warn</a><a class="').concat(qt,'" data-type="error">Error</a></div><div class="').concat(Mt," ").concat(Ut,'"><div class="').concat(Pt,'"></div><div class="').concat(Ht,'"><div class="').concat(Wt,'">').concat(m.BASIC,'</div><div class="').concat(Vt,'">').concat(m.NO_DATA,'</div><div class="').concat(Wt,'">').concat(m.UPLINK,'</div><div class="').concat(Kt,'">').concat(m.NO_DATA,'</div><div class="').concat(Wt,'">').concat(m.Downlink,'</div><div class="').concat(Gt,'">').concat(m.NO_DATA,'</div></div></div><div class="').concat(Ft,'"></div><div class="').concat(Xt,'"><a id="trtc_upload" class="').concat($t,'">').concat(m.UPLOAD_BUTTON,'</a><a id="trtc_export" class="').concat($t,'">').concat(m.EXPORT_BUTTON,'</a><a id="trtc_hide" class="').concat($t,'">').concat(m.HIDE_BUTTON,"</a></div></div></div>");var a=r.content.firstChild;this._switchNode=a.querySelector(".".concat(Nt)),null==(e=this._switchNode)||e.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=a.querySelector(".".concat(Rt)),null==(t=this._maskNode)||t.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=a.querySelector(".".concat(jt)),null==(n=a.querySelector(".".concat(nn)))||n.addEventListener("click",this.onBackTopClick.bind(this)),null==(o=a.querySelector(".".concat(on)))||o.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=a.querySelector(".".concat(Pt)),this._networkContentNode=a.querySelector(".".concat(Ht)),this._tabNodes=Array.from(a.querySelector(".".concat(Bt)).children),this._tabNodes.forEach((function(e){e.addEventListener("click",i.onTabClick.bind(i))})),this._toptabNodes=Array.from(a.querySelector(".".concat(It)).children),this._toptabNodes.forEach((function(e){e.addEventListener("click",i.onToptabClick.bind(i))})),this._backTopButton=a.querySelector(".".concat(nn)),this._goBottomButton=a.querySelector(".".concat(on));var s=a.querySelector("#trtc_upload");null==s||s.addEventListener("click",this.onUploadClick.bind(this));var c=a.querySelector("#trtc_export");null==c||c.addEventListener("click",this.onExportClick.bind(this));var l=a.querySelector("#trtc_hide");return null==l||l.addEventListener("click",this.onHideClick.bind(this)),a}},{key:"deleteDialog",value:function(){an&&(an=!1,this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._dialogStyle&&(document.body.removeChild(this._dialogStyle),this._dialogStyle=null))}},{key:"updateLog",value:function(e){var t;this._logList.push(e);var n=document.createElement("div");switch(n.classList.add(Qt),e.level){case 4:n.classList.add(tn);break;case 2:n.classList.add(Zt);break;case 3:n.classList.add(en);break;case 1:n.classList.add(Jt)}n.textContent=e.log,"all"===this._showLogType||n.classList.contains("".concat(Qt,"_").concat(this._showLogType))||(n.style.display="none"),null==(t=this._logContentNode)||t.appendChild(n),this.addHelper(n)}},{key:"onSwitchClick",value:function(){this._hasMove?this._hasMove=!1:this._showDialog?this.hideDialog():(this._isMobile&&(this._maskNode.style.display="block"),this._pannelNode.style.display="block",this._switchNode.style.display="none",this._showDialog=!0)}},{key:"onTabClick",value:function(e){var t,n,o,i,r,a=e.target;null==(t=this._tabNodes)||t.forEach((function(e){e.classList.remove(Ct)})),a.classList.add(Ct);var s=a.getAttribute("data-tab");"log"===s?(null==(o=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(Mt)))||o.classList.add(Ut),this._logContentNode.style.display="block",this._networkContentNode.style.display="none",this._goBottomButton.style.display="block",this._backTopButton.style.display="block"):"network"===s&&(null==(r=null==(i=this._dialogNode)?void 0:i.querySelector(".".concat(Mt)))||r.classList.remove(Ut),this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._backTopButton.style.display="none",this._goBottomButton.style.display="none")}},{key:"onToptabClick",value:function(e){var t,n,o=this,i=e.target;null==(t=this._toptabNodes)||t.forEach((function(e){e.classList.remove(Ct)})),i.classList.add(Ct),this._showLogType=i.getAttribute("data-type");var r=null==(n=this._logContentNode)?void 0:n.querySelectorAll(".".concat(Qt)),a="".concat(Qt,"_").concat(this._showLogType);r.forEach((function(e){e.classList.contains(a)||"all"===o._showLogType?e.style.display="block":e.style.display="none"}))}},{key:"onExportClick",value:function(){var e,t,n,o,i,r,a=this._logList.reduce((function(e,t){return"".concat(e+t.log,"\n")}),""),s=new Blob([a],{type:"text/plain"}),c=document.createElement("a"),l=URL.createObjectURL(s);c.href=l;var u="trtc_".concat(void 0===(null==(e=this._core)?void 0:e.room.sdkAppId)?"EmptySdkAppId":null==(n=null==(t=this._core)?void 0:t.room)?void 0:n.sdkAppId,"_").concat(void 0===(null==(o=this._core)?void 0:o.room.userId)?"EmptyUserId":null==(i=this._core)?void 0:i.room.userId,"_").concat((new Date).getTime(),".log");c.download=u,c.style.display="none",document.body.appendChild(c),c.click(),URL.revokeObjectURL(l),document.body.removeChild(c),this.addInfoToBanner(rn,h?"导出成功:日志文件名为".concat(u):"Export success: The log file name is ".concat(u)),null==(r=this._log)||r.info("Export success: The log file name is ${fileName}")}},{key:"addInfoToBanner",value:function(e,t){var n,o=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(Ft)),i=document.createElement("div");i.classList.add(Yt),i.innerText="".concat(e===rn?"🟩":"🟥 "," ").concat(t),o.appendChild(i),o.scrollTop=o.scrollHeight}},{key:"onUploadClick",value:(e=i().mark((function e(){var t,n,o,r,a,s,c,l=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isUploading){e.next=2;break}return e.abrupt("return");case 2:this.isUploading=!0,(r=null==(t=this._dialogNode)?void 0:t.querySelector("#trtc_upload")).innerText=h?"上传中...":"Uploading...",null==r||r.classList.add(".disable"),a=this._logList.reduce((function(e,t){return"".concat(e+t.log,"\n")}),""),s=new Blob([a],{type:"text/plain"}),(c=new FormData).append("file",s,"trtc.log"),c.append("sdkAppId","".concat((null==(n=this._core)?void 0:n.room.sdkAppId)||"EmptySdkAppId")),c.append("userId","".concat((null==(o=this._core)?void 0:o.room.userId)||"EmptyUserId")),fetch("https://service.trtc.qcloud.com/api/uploadLogFile",{method:"POST",body:c}).then((function(e){return e.json()})).then((function(e){var t;l.addInfoToBanner(null==e?void 0:e.type,h?null==e?void 0:e.message_zh:null==e?void 0:e.message_en),l.isUploading=!1,null==(t=l._log)||t.info(null==e?void 0:e.message_en)})).catch((function(){var e;l.addInfoToBanner("failed",h?"上传失败:请使用本地导出":"Upload Failed: Please use local export"),null==(e=l._log)||e.info("Upload Failed: Please use local export")})).finally((function(){r.innerText=h?"上传":"Upload",null==r||r.classList.remove(".disable"),l.isUploading=!1}));case 15:case"end":return e.stop()}}),e,this)})),a=function(){var n=this,o=arguments;return new Promise((function(i,r){var a=e.apply(n,o);function s(e){t(a,i,r,s,c,"next",e)}function c(e){t(a,i,r,s,c,"throw",e)}s(void 0)}))},function(){return a.apply(this,arguments)})},{key:"onHideClick",value:function(){this.hideDialog()}},{key:"onMaskClick",value:function(){this.hideDialog()}},{key:"hideDialog",value:function(){this._isMobile&&(this._maskNode.style.display="none"),this._pannelNode.style.display="none",this._switchNode.style.display="block",this._showDialog=!1}},{key:"onBackTopClick",value:function(){var e,t;null==(t=null==(e=this._dialogNode)?void 0:e.querySelector(".".concat(Mt)))||t.scrollTo(0,0)}},{key:"onGoBottomClick",value:function(){var e,t=null==(e=this._dialogNode)?void 0:e.querySelector(".".concat(Mt));null==t||t.scrollTo(0,null==t?void 0:t.scrollHeight)}},{key:"dragable",value:function(e){var t,n,o=this,i={x:0,y:0,startX:0,startY:0,endX:0,endY:0,isTouchEnd:!1};i.x=(null==(t=this._switchNode)?void 0:t.offsetLeft)||50,i.y=(null==(n=this._switchNode)?void 0:n.offsetTop)||150;var a=function(e){e.cancelable&&e.preventDefault(),o._hasMove=!0;var t=i.x-(e.pageX-i.startX),n=i.y-(e.pageY-i.startY),a=r(c(t,n),2);t=a[0],n=a[1],o._switchNode.style.right="".concat(t,"px"),o._switchNode.style.bottom="".concat(n,"px"),i.endX=t,i.endY=n},s=function(){i.startX=0,i.startY=0,i.x=i.endX,i.y=i.endY,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s)},c=function(e,t){var n=Math.max(document.documentElement.offsetWidth,window.innerWidth),i=Math.max(document.documentElement.offsetHeight,window.innerHeight);return e+o._switchNode.offsetWidth>n&&(e=n-o._switchNode.offsetWidth),t+o._switchNode.offsetHeight>i&&(t=i-o._switchNode.offsetHeight),e<0&&(e=0),t<20&&(t=20),[e,t]};f()?(e.addEventListener("touchstart",(function(e){i.startX=e.touches[0].pageX,i.startY=e.touches[0].pageY,i.isTouchEnd=!1}),{passive:!1}),e.addEventListener("touchend",(function(){i.isTouchEnd&&(i.startX=0,i.startY=0,i.isTouchEnd=!1,i.x=i.endX,i.y=i.endY)}),{passive:!1}),e.addEventListener("touchmove",(function(e){if(!(e.touches.length<=0)){var t=e.touches[0].pageX-i.startX,n=e.touches[0].pageY-i.startY,a=Math.floor(i.x-t),s=Math.floor(i.y-n),l=r(c(a,s),2);a=l[0],s=l[1],o._switchNode.style.right="".concat(a,"px"),o._switchNode.style.bottom="".concat(s,"px"),i.endX=a,i.endY=s,i.isTouchEnd=!0,e.cancelable&&e.preventDefault()}}),{passive:!1})):e.addEventListener("mousedown",(function(e){e.preventDefault(),i.startX=e.pageX,i.startY=e.pageY,document.addEventListener("mousemove",a),document.addEventListener("mouseup",s)}))}},{key:"installEvents",value:function(){this._core.innerEmitter.on("264",this.handleLog,this),this._core.room.on("network-quality",this.handleNetworkQuality,this),this._core.room.on("heartbeat-report",this.handleHeartbeatReport,this)}},{key:"uninstallEvents",value:function(){this._core.innerEmitter.off("264",this.handleLog,this),this._core.room.off("network-quality",this.handleNetworkQuality,this),this._core.room.off("heartbeat-report",this.handleHeartbeatReport,this)}},{key:"handleLog",value:function(e){this.updateLog(e.log)}},{key:"addHelper",value:function(e){var t=this,n=/((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}/g,o=y,i=e.innerText;i=i.split("\n").map((function(e){if((e=e.replaceAll("<","<").replaceAll(">",">")).includes("failed"))return e.includes("on autoplay-failed")?e:"<span class='red' style=\"background:red; color:#fff;\">".concat(e,"</span>");if(e.includes("clientIp:")){var t=e.match(n);return null==t||t.forEach((function(t){e=e.replaceAll(t,'<a href="javascript:void(0);" target=""><span class=\'ip\' style="background:#e1dfdf">'.concat(t,"</span></a>"))})),e}return e.includes("URL of current page")?e=e.replace(/URL of current page: (.+)/,'URL of current page: <a href="$1">$1</a>'):e})).join("\n"),o.forEach((function(n){if(e.innerText.includes(n)){var o="tooltip-".concat(t.tippyCount);i=i.replace(new RegExp("".concat(n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(">",">").replace(">","<")),"gi"),'<span id="'.concat(o,"\" class='").concat(v[n].class||v[n].color||"gray","' style=\"background:").concat(v[n].color||"#e1dfdf","; color: ").concat(v[n].textColor||"#000",'">').concat(n,"</span>")),setTimeout((function(){var t="";t=h?"function"==typeof v[n].tips_zh?v[n].tips_zh(e.innerText):v[n].tips_zh:"function"==typeof v[n].tips_en?v[n].tips_en(e.innerText):v[n].tips_en;var i=document.getElementById("".concat(o));i&&St(i,{content:t,zIndex:10004,placement:"top"})}),500),t.tippyCount+=1}})),e.innerHTML=i}}]);var e,a}();u([b(300,(function(){return"export"}))],sn.prototype,"onExportClick"),u([b(300,(function(){return"upload"}))],sn.prototype,"onUploadClick");var cn=sn,ln=null,un=null,dn=function(){function e(t){return n(this,e),this.core=t,d(this,"seq"),d(this,"_core"),d(this,"log"),un||(this._core=t,this.log=t.log.createChild({id:this.getAlias()}),this.log.info("created"),un=this)}return o(e,[{key:"getName",value:function(){return e.Name}},{key:"getAlias",value:function(){return"dm"}},{key:"getGroup",value:function(){return"dm"}},{key:"getValidateRule",value:function(e){switch(e){case"start":return{name:"StartDebugOptions",required:!1};case"update":return{name:"UpdateDebugOptions",required:!1};case"stop":return{name:"StopDebugOptions",required:!1}}}},{key:"start",value:function(){p&&(this._openDebugDiaLog(),this.log.warn("if you are in production environment, please use URL param `trtcDebug=ture` to open debug dialog")),new URLSearchParams(location.search).get("trtcDebug")&&this._openDebugDiaLog()}},{key:"update",value:function(){}},{key:"stop",value:function(){this._closeDebugDiaLog()}},{key:"destroy",value:function(){this.log.info("destroyed")}},{key:"_openDebugDiaLog",value:function(){ln||(ln=new cn(this._core,this.log))}},{key:"_closeDebugDiaLog",value:function(){null==ln||ln.deleteDialog(),ln=null}}])}();return d(dn,"Name","Debug"),dn}));
|