trtc-sdk-v5 5.8.5-beta.7 → 5.8.5-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/cross-room/package.json +1 -1
- package/plugins/device-detector/device-detector.esm.js +21 -21
- package/plugins/device-detector/device-detector.iife.js +20 -20
- package/plugins/device-detector/package.json +1 -1
- package/plugins/video-effect/basic-beauty/package.json +1 -1
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/trtc.esm.js +23 -23
- package/trtc.js +1 -1
- package/plugins/debug/debug-dialog.esm.js +0 -126
- package/plugins/debug/debug-dialog.js +0 -1
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
var ne=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var ve=(d,t,e)=>t in d?ne(d,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[t]=e;var Q=(d,t,e,i)=>{for(var s=i>1?void 0:i?fe(t,e):t,o=d.length-1,n;o>=0;o--)(n=d[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&ne(t,e,s),s};var g=(d,t,e)=>(ve(d,typeof t!="symbol"?t+"":t,e),e);function re(d){return function(t,e,i){return i.value=d(i.value,e),i}}var z=new WeakMap;function Z(d,t){return re((e,i)=>function(...s){var u,p;let o=(u=z.get(this))==null?void 0:u.get(t(...s));o&&o>0&&clearTimeout(o);let n=window.setTimeout(()=>{e.apply(this,s)},d);z.has(this)?(p=z.get(this))==null||p.set(t(...s),n):z.set(this,new Map([[t(...s),n]]))})}var ke=typeof location=="undefined"?!1:location.protocol==="file:"||location.hostname==="localhost"||location.hostname==="127.0.0.1",ee=()=>{let d=window.navigator&&window.navigator.userAgent||"",t=/iPad/i.test(d)||/iPhone/i.test(d),e=/Android/i.test(d);return t||e},ye=()=>{let d=navigator.language;return d=d.substring(0,2),d==="zh"},_=ye(),l={LOG_BUTTON:_?"\u65E5\u5FD7":"Log",NETWORK_BUTTON:_?"\u7F51\u7EDC":"Network",DUMP_BUTTON:_?"\u8F6C\u50A8":"Dump",DUMPING_BUTTON:_?"\u8F6C\u50A8\u4E2D":"Dumping",END_BUTTON:_?"\u7ED3\u675F":"End",UPLOAD_BUTTON:_?"\u4E0A\u4F20":"Upload",EXPORT_BUTTON:_?"\u5BFC\u51FA":"Export",HIDE_BUTTON:_?"\u9690\u85CF":"Hide",GO_BOTTOM:_?"\u5E95\u90E8":"goBottom",BACK_TOP:_?"\u9876\u90E8":"backTop",UPLINK:_?"\u4E0A\u884C":"Uplink",DOWNLINK:_?"\u4E0B\u884C":"Downlink",NO_DATA:_?"\u6682\u65E0\u6570\u636E":"No Data",BASIC:_?"\u57FA\u7840":"Basic",DURATION:_?"\u65F6\u957F":"Duration",VIDEO:_?"\u89C6\u9891":"Video",AUDIO:_?"\u97F3\u9891":"Audio",SCREEN:_?"\u5C4F\u5E55":"Screen"},le=d=>d.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(">",">").replace(">","<"),S={"play() error: NotAllowedError:":{tips_zh:d=>d.includes("main <video>")||d.includes("main <audio>")?"\u8FDC\u7AEF\u6D41\u81EA\u52A8\u64AD\u653E\u53D7\u9650\u5BFC\u81F4\u64AD\u653E\u5931\u8D25":"\u672C\u5730\u6D41\u51FA\u73B0\u81EA\u52A8\u64AD\u653E\u5931\u8D25\u62A5\u9519\uFF0C\u4E00\u822C\u53EA\u51FA\u73B0\u5728 Android \u5FAE\u4FE1\u8BBE\u5907\uFF0C\u65E0\u9700\u5904\u7406",tips_en:d=>d.includes("main <video>")||d.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:"\u8BBE\u5907\u91C7\u96C6\u5F02\u5E38\uFF0C\u6B63\u5728\u5C1D\u8BD5\u81EA\u52A8\u6062\u590D\u91C7\u96C6",tips_en:"Device acquisition exception, automatic recovery is in progress"},"updateStream() recover local stream successfully":{tips_zh:"\u8BBE\u5907\u91C7\u96C6\u5F02\u5E38\uFF0C\u81EA\u52A8\u6062\u590D\u91C7\u96C6\u6210\u529F",tips_en:"Device acquisition exception, automatic recovery is successful"},"updateStream() failed to recover local stream":{tips_zh:"\u8BBE\u5907\u91C7\u96C6\u5F02\u5E38\uFF0C\u81EA\u52A8\u6062\u590D\u91C7\u96C6\u5931\u8D25",tips_en:"Device acquisition exception, automatic recovery failed"},"main stream - video track is muted":{tips_zh:"\u8868\u793A\u6536\u5230\u7684\u89C6\u9891\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u8868\u793A\u6536\u5230\u7684\u97F3\u9891\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u8868\u793A\u6536\u5230\u7684\u5C4F\u5E55\u5206\u4EAB\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u8868\u793A\u6536\u5230\u7684\u89C6\u9891\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u8868\u793A\u6536\u5230\u7684\u97F3\u9891\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u8868\u793A\u6536\u5230\u7684\u5C4F\u5E55\u5206\u4EAB\u6570\u636E\u6682\u4E0D\u8DB3\u4EE5\u64AD\u653E\uFF0C\u4E00\u822C\u662F\u7F51\u7EDC\u539F\u56E0\u5F15\u8D77\uFF0C\u5F53\u6536\u5230\u8DB3\u591F\u64AD\u653E\u7684\u6570\u636E\u4F1A\u53D8\u6210 unmuted \u72B6\u6001\u3002",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:"\u6536\u5230\u4E86\u8DB3\u591F\u64AD\u653E\u7684\u89C6\u9891\u6570\u636E",tips_en:"Received enough playback video data"},"main stream - audio track is unmuted":{tips_zh:"\u6536\u5230\u4E86\u8DB3\u591F\u64AD\u653E\u7684\u97F3\u9891\u6570\u636E",tips_en:"Received enough playback audio data"},"auxiliary stream - video track is unmuted":{tips_zh:"\u6536\u5230\u4E86\u8DB3\u591F\u64AD\u653E\u7684\u5C4F\u5E55\u5206\u4EAB\u6570\u636E",tips_en:"Received enough playback screen sharing data"},"main stream - audio player track is ended":{tips_zh:"\u8FDC\u7AEF\u97F3\u9891\u8F68\u9053\u505C\u6B62",tips_en:"Remote audio track stopped"},"main stream - video player track is ended":{tips_zh:"\u8FDC\u7AEF\u89C6\u9891\u8F68\u9053\u505C\u6B62",tips_en:"Remote video track stopped"},"auxiliary stream - video player track is ended":{tips_zh:"\u8FDC\u7AEF\u5C4F\u5E55\u5206\u4EAB\u8F68\u9053\u505C\u6B62",tips_en:"Received enough playback screen sharing data"},"stream - video track is muted":{tips_zh:"\u6444\u50CF\u5934\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u9700\u8981\u5BA2\u6237\u91CD\u65B0\u91C7\u96C6\u3002",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:"\u6444\u50CF\u5934\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u9700\u8981\u5BA2\u6237\u91CD\u65B0\u91C7\u96C6\u3002v4.11.4+ \u7248\u672C SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u65E0\u9700\u5BA2\u6237\u5904\u7406",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:d=>d.includes("\u2193")?"\u8FDC\u7AEF track \u6682\u65F6\u65E0\u6CD5\u89E3\u7801\u6570\u636E\uFF0C\u53EF\u80FD\u662F\u7F51\u7EDC\u6CE2\u52A8\u5BFC\u81F4":"\u6444\u50CF\u5934\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\u3002SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\u3002",tips_en:d=>d.includes("\u2193")?"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:"\u6444\u50CF\u5934\u91C7\u96C6\u505C\u6B62\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u62D4\u51FA\u5BFC\u81F4\uFF0C\u8FD9\u79CD\u60C5\u51B5 SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u63A5\u5165\u4FA7\u65E0\u9700\u5904\u7406\u3002\u4E5F\u6709\u53EF\u80FD\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0Cv4.11.4+ \u7248\u672C SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u65E0\u9700\u5BA2\u6237\u5904\u7406",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:"\u6444\u50CF\u5934\u91C7\u96C6\u505C\u6B62\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u62D4\u51FA\u5BFC\u81F4\uFF0C\u8FD9\u79CD\u60C5\u51B5 SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u63A5\u5165\u4FA7\u65E0\u9700\u5904\u7406\u3002\u4E5F\u6709\u53EF\u80FD\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0Cv4.11.4+ \u7248\u672C SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u65E0\u9700\u5BA2\u6237\u5904\u7406",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:"\u9EA6\u514B\u98CE\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u9700\u8981\u5BA2\u6237\u91CD\u65B0\u91C7\u96C6\u3002",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:d=>d.includes("\u2193")?"\u8FDC\u7AEF track \u6682\u65F6\u65E0\u6CD5\u89E3\u7801\u6570\u636E\uFF0C\u53EF\u80FD\u662F\u7F51\u7EDC\u6CE2\u52A8\u5BFC\u81F4":"\u9EA6\u514B\u98CE\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\u3002SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\u3002",tips_en:d=>d.includes("\u2193")?"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:"\u9EA6\u514B\u98CE\u91C7\u96C6\u6682\u505C\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u9700\u8981\u5BA2\u6237\u91CD\u65B0\u91C7\u96C6\u3002v4.11.4+ \u7248\u672C SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u65E0\u9700\u5BA2\u6237\u5904\u7406",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:"\u9EA6\u514B\u98CE\u91C7\u96C6\u505C\u6B62\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u62D4\u51FA\u5BFC\u81F4\uFF0C\u8FD9\u79CD\u60C5\u51B5 SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u63A5\u5165\u4FA7\u65E0\u9700\u5904\u7406\u3002\u4E5F\u6709\u53EF\u80FD\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u5EFA\u8BAE\u6B64\u65F6\u5728\u9875\u9762\u63D0\u9192\u7528\u6237\u91CD\u65B0\u91C7\u96C6\u3002",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:"\u9EA6\u514B\u98CE\u91C7\u96C6\u505C\u6B62\uFF0C\u901A\u5E38\u662F\u8BBE\u5907\u88AB\u62D4\u51FA\u5BFC\u81F4\uFF0C\u8FD9\u79CD\u60C5\u51B5 SDK \u4F1A\u81EA\u52A8\u6062\u590D\u91C7\u96C6\uFF0C\u63A5\u5165\u4FA7\u65E0\u9700\u5904\u7406\u3002\u4E5F\u6709\u53EF\u80FD\u662F\u8BBE\u5907\u88AB\u5176\u4ED6\u5E94\u7528\u5360\u7528\u3001\u6D4F\u89C8\u5668\u5A92\u4F53\u6743\u9650\u88AB\u56DE\u6536\u5BFC\u81F4\uFF0C\u5EFA\u8BAE\u6B64\u65F6\u5728\u9875\u9762\u63D0\u9192\u7528\u6237\u91CD\u65B0\u91C7\u96C6\u3002",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:"\u6DFB\u52A0\u97F3\u9891\u8F68",tips_en:"add audio track",color:"orange"},"is removing audio track from current published local stream":{tips_zh:"\u79FB\u9664\u97F3\u9891\u8F68",tips_en:"remove audio track",color:"orange"},"is removing video track from current published local stream":{tips_zh:"\u79FB\u9664\u89C6\u9891\u8F68",tips_en:"remove video track",color:"orange"},"is adding video track to current published local stream":{tips_zh:"\u6DFB\u52A0\u89C6\u9891\u8F68",tips_en:"add video track",color:"orange"},"is replacing audio track to current published local main stream":{tips_zh:"\u66FF\u6362\u97F3\u9891\u8F68",tips_en:"replace audio track",color:"orange"},"is replacing video track to current published local main stream":{tips_zh:"\u66FF\u6362\u89C6\u9891\u8F68",tips_en:"replace video track",color:"orange"},"downlink network quality change":{tips_zh:"\u4E0B\u884C\u7F51\u7EDC\u53D8\u66F4\uFF0C1: \u6781\u4F73\uFF0C2\uFF1A\u8F83\u597D\uFF0C3\uFF1A\u4E00\u822C\uFF0C4\uFF1A\u8F83\u5DEE\uFF0C5\uFF1A\u6781\u5DEE",tips_en:"Downstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"uplink network quality change":{tips_zh:"\u4E0A\u884C\u7F51\u7EDC\u53D8\u66F4\uFF0C1: \u6781\u4F73\uFF0C2\uFF1A\u8F83\u597D\uFF0C3\uFF1A\u4E00\u822C\uFF0C4\uFF1A\u8F83\u5DEE\uFF0C5\uFF1A\u6781\u5DEE",tips_en:"Upstream network quality change: 1: excellent, 2: good, 3: average, 4: poor, 5: extremely poor"},"localStream mute video":{tips_zh:"mute \u4E0A\u884C\u89C6\u9891\u6D41",tips_en:"mute upstream video stream",color:"orange"},"localStream unmute video":{tips_zh:"unmute \u4E0A\u884C\u89C6\u9891\u6D41",tips_en:"unmute upstream video stream",color:"orange"},"localStream mute audio":{tips_zh:"mute \u4E0A\u884C\u97F3\u9891\u6D41",tips_en:"mute upstream audio stream",color:"orange"},"localStream unmute audio":{tips_zh:"unmute \u4E0A\u884C\u97F3\u9891\u6D41",tips_en:"unmute upstream audio stream",color:"orange"},"black detected":{tips_zh:"\u68C0\u6D4B\u5230\u9ED1\u5C4F\uFF0C\u8868\u793A\u5F53\u524D fps = 0\u3002\u901A\u5E38\u662F\u7F51\u7EDC\u5F15\u8D77\uFF0C\u7F51\u7EDC\u6062\u590D\u540E\u4F1A\u6062\u590D\u6B63\u5E38\u3002\u82E5\u7F51\u7EDC\u6B63\u5E38\u65F6\uFF0C\u4E00\u76F4\u672A\u6062\u590D\uFF0C\u5219\u4E3A\u5F02\u5E38\u60C5\u51B5\u3002",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:"\u5DF2\u9759\u97F3\u7684\u65B9\u5F0F\u64AD\u653E\u8FDC\u7AEF\u6D41\uFF0C\u4E00\u822C\u8FDC\u7AEF\u6D41\u4E0D\u9700\u8981\u9759\u97F3\u64AD\u653E\uFF0C\u9700\u786E\u8BA4\u5BA2\u6237 stream.play \u63A5\u53E3\u8C03\u7528\u7684\u4F20\u53C2\u662F\u5426\u6B63\u786E\u3002",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:"\u8FDC\u7AEF\u6D41\u97F3\u9891\u64AD\u653E\u6210\u529F",tips_en:"Remote stream audio playback success",color:"#0dd90d",class:"success"},"main stream - video player is starting playing":{tips_zh:"\u8FDC\u7AEF\u6D41\u89C6\u9891\u64AD\u653E\u6210\u529F",tips_en:"Remote stream video playback success",color:"#0dd90d",class:"success"},"video player is playing":{tips_zh:"\u672C\u5730\u89C6\u9891\u64AD\u653E\u6210\u529F",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"audio player is playing":{tips_zh:"\u672C\u5730\u97F3\u9891\u64AD\u653E\u6210\u529F",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"stream - video player is starting playing":{tips_zh:"\u672C\u5730\u89C6\u9891\u64AD\u653E\u6210\u529F",tips_en:"Local video playback success",color:"#0dd90d",class:"success"},"stream - audio player is starting playing":{tips_zh:"\u672C\u5730\u97F3\u9891\u64AD\u653E\u6210\u529F",tips_en:"Local audio playback success",color:"#0dd90d",class:"success"},"switch camera success":{tips_zh:"\u5207\u6362\u6444\u50CF\u5934\u6210\u529F",tips_en:"Switch camera success",color:"#0dd90d",class:"success"},"switch microphone success":{tips_zh:"\u5207\u6362\u9EA6\u514B\u98CE\u6210\u529F",tips_en:"Switch microphone success",color:"#0dd90d",class:"success"},gotStream:{tips_zh:"\u672C\u5730\u6D41\u91C7\u96C6\u6210\u529F",tips_en:"Local stream capture success"},"local stream is published successfully":{tips_zh:"\u63A8\u6D41\u6210\u529F",tips_en:"Publish success",color:"#0dd90d",class:"success"},"encoderImplementation change to OpenH264":{tips_zh:"\u4F7F\u7528\u8F6F\u7F16",tips_en:"Use software encoding"},"encoderImplementation change to ExternalEncoder":{tips_zh:"\u4F7F\u7528\u786C\u7F16",tips_en:"Use hardware encoding"},"getUserMedia with constraints":{tips_zh:"\u5F00\u59CB\u5A92\u4F53\uFF08\u6444\u50CF\u5934/\u9EA6\u514B\u98CE\uFF09\u91C7\u96C6",tips_en:"Start media (camera/microphone) capture"},"getDisplayMedia with constraints":{tips_zh:"\u5F00\u59CB\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6",tips_en:"Start screen sharing capture"},"client-banned":{tips_zh:"\u88AB\u8E22\u51FA\u623F\u95F4",tips_en:"Kicked out of the room",color:"red",class:"red",textColor:"#fff"},user_timeout:{tips_zh:"\u540E\u53F0\u957F\u65F6\u95F4\u6CA1\u6536\u5230 sdk \u5FC3\u8DF3\u5BFC\u81F4\u88AB\u8E22\uFF0C\u901A\u5E38\u662F\u7528\u6237 JS \u7EBF\u7A0B\u957F\u65F6\u95F4\u963B\u585E\u5BFC\u81F4\uFF0C\u82E5\u590D\u73B0\u6982\u7387\u8F83\u9AD8\uFF0C\u5E94\u7528\u6D4F\u89C8\u5668 Performance \u5DE5\u5177\u5206\u6790\u662F\u54EA\u91CC\u5BFC\u81F4 JS \u7EBF\u7A0B\u963B\u585E\u3002",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:"\u4FE1\u4EE4\u8C03\u5EA6\u8BF7\u6C42\u5931\u8D25\uFF0C\u4E0D\u5F71\u54CD\u6B63\u5E38\u8FDB\u623F\u6D41\u7A0B\uFF0CSDK \u4F1A\u8FDE\u63A5\u9ED8\u8BA4\u7684\u4FE1\u4EE4\u57DF\u540D\u3002",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:"\u5C1D\u8BD5\u6062\u590D\u6444\u50CF\u5934\u91C7\u96C6\u65F6\uFF0C\u7531\u4E8E\u68C0\u6D4B\u5230\u6CA1\u6709\u6444\u50CF\u5934\uFF0C\u4E0D\u6062\u590D\u6444\u50CF\u5934\u91C7\u96C6",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:"\u5E26\u5BBD\u9884\u4F30\u4E0D\u591F\u5BFC\u81F4\u7F16\u7801\u8D28\u91CF\u53D7\u9650\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u7F16\u7801\u7801\u7387\u3001\u5E27\u7387\u3001\u5206\u8FA8\u7387\u964D\u4F4E\u95EE\u9898\u3002\u901A\u5E38\u662F\u7F51\u7EDC\u5BFC\u81F4\u3002",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 \u8D1F\u8377\u592A\u9AD8\u5BFC\u81F4\u7F16\u7801\u8D28\u91CF\u53D7\u9650\uFF0C\u53EF\u80FD\u4F1A\u51FA\u73B0\u7F16\u7801\u7801\u7387\u3001\u5E27\u7387\u3001\u5206\u8FA8\u7387\u964D\u4F4E\u95EE\u9898\u3002",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:"\u7528\u6237\u9875\u9762\u5207\u540E\u53F0\uFF0C\u5728\u79FB\u52A8\u7AEF\u8FD9\u4F1A\u5BFC\u81F4\u8BBE\u5907\u91C7\u96C6\u6682\u505C\uFF0C\u5207\u56DE\u524D\u53F0\u65F6\u4F1A\u6062\u590D\u91C7\u96C6",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:"\u7528\u6237\u9875\u9762\u5207\u56DE\u524D\u53F0",tips_en:"User page switched to frontend",color:"orange",class:"orange",textColor:"#fff"},"main stream - audio player is paused":{tips_zh:`\u8FDC\u7AEF\u6D41\u97F3\u9891\u64AD\u653E\u6682\u505C\uFF0C\u4E00\u822C\u6709\u4E24\u79CD\u53EF\u80FD\uFF1A
|
|
2
|
-
1. \u4E1A\u52A1\u4FA7\u4F20\u5165\u7528\u4E8E\u64AD\u653E\u97F3\u89C6\u9891\u7684 div \u6807\u7B7E\u5BB9\u5668\u88AB\u4E1A\u52A1\u4FA7\u4ECE DOM \u79FB\u9664\u3002
|
|
3
|
-
2. \u7528\u6237\u5728 Chrome 70 \u53CA\u4EE5\u4E0B\u7248\u672C\uFF0C\u5F53\u79FB\u52A8 div \u5BB9\u5668\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u6682\u505C\u3002`,tips_en:`The remote stream audio playback is paused, which usually has two possibilities:
|
|
4
|
-
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.
|
|
5
|
-
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:`\u8FDC\u7AEF\u6D41\u89C6\u9891\u64AD\u653E\u6682\u505C\uFF0C\u4E00\u822C\u6709\u4E24\u79CD\u53EF\u80FD\uFF1A
|
|
6
|
-
1. \u4E1A\u52A1\u4FA7\u4F20\u5165\u7528\u4E8E\u64AD\u653E\u97F3\u89C6\u9891\u7684 div \u6807\u7B7E\u5BB9\u5668\u88AB\u4E1A\u52A1\u4FA7\u4ECE DOM \u79FB\u9664\u3002
|
|
7
|
-
2. \u7528\u6237\u5728 Chrome 70 \u53CA\u4EE5\u4E0B\u7248\u672C\uFF0C\u5F53\u79FB\u52A8 div \u5BB9\u5668\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u6682\u505C\u3002`,tips_en:`The remote stream video playback is paused, which usually has two possibilities:
|
|
8
|
-
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.
|
|
9
|
-
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:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u5E94\u7528\u7A97\u53E3",tips_en:"Screen sharing captures the application window",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"monitor"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u6574\u4E2A\u5C4F\u5E55",tips_en:"Screen sharing captures the entire screen",color:"blue",class:"blue",textColor:"#fff"},'"displaySurface":"browser"':{tips_zh:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u4E86\u67D0\u4E2A\u6807\u7B7E\u9875",tips_en:"Screen sharing captures a certain tab page",color:"blue",class:"blue",textColor:"#fff"},updateMediaSettings:{tips_zh:"\u8BE5\u65E5\u5FD7\u4E0B\u7684\u5206\u8FA8\u7387\u3001\u5E27\u7387\u4E3A\u5B9E\u9645\u91C7\u96C6\u51FA\u7684\u5206\u8FA8\u7387\u53CA\u5E27\u7387",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:"\u8C03\u7528 remoteStream.play \u63A5\u53E3",tips_en:"Call remoteStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"stream start to play with":{tips_zh:"\u8C03\u7528 localStream.play \u63A5\u53E3",tips_en:"Call localStream.play interface",color:"blue",class:"blue",textColor:"#fff"},"main setAudioVolume to 0":{tips_zh:"\u4E1A\u52A1\u4FA7\u8C03\u7528 remoteStream.setAudioVolume(0) \u63A5\u53E3\uFF0C\u5C06\u64AD\u653E\u97F3\u91CF\u8BBE\u7F6E\u4E3A 0\uFF0C\u4F1A\u5BFC\u81F4\u64AD\u653E\u65E0\u58F0",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:"\u5C4F\u5E55\u5206\u4EAB\u91C7\u96C6\u505C\u6B62\uFF0C\u53EF\u80FD\u539F\u56E0\uFF1A\u7528\u6237\u70B9\u51FB\u505C\u6B62\u91C7\u96C6\u6309\u94AE\u3001\u5206\u4EAB\u7684\u7A97\u53E3/\u9875\u9762\u88AB\u5173\u95ED\u7B49\u3002",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:"\u8C03\u7528 client.join \u63A5\u53E3",tips_en:"Call client.join interface",color:"blue",class:"blue",textColor:"#fff"},"publish() => publishing local stream":{tips_zh:"\u8C03\u7528 client.publish \u63A5\u53E3",tips_en:"Call client.publish interface",color:"blue",class:"blue",textColor:"#fff"},"subscribe() => subscribe to":{tips_zh:"\u8C03\u7528 client.subscribe \u63A5\u53E3",tips_en:"Call client.subscribe interface",color:"blue",class:"blue",textColor:"#fff"},"switchRole() => switch role":{tips_zh:"\u8C03\u7528 client.switchRole \u63A5\u53E3",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(d=>{S[`${d}()`]={tips_zh:`\u8C03\u7528 trtc.${d}`,tips_en:`Call trtc.${d}`,color:"blue",class:"blue",textColor:"#fff"}});var ce=Object.keys(S);var y="trtc_debug_dialog",A=`${y}_activated`,q=`${y}_switch`,te=`${y}_mask`,K=`${y}_pannel`,oe=`${y}_tabber`,O=`${y}_tab`,ie=`${y}_topbar`,C=`${y}_toptab`,$=`${y}_content`,G=`${y}_has_topbar`,de=`${$}_log`,M=`${$}_network`,D=`${y}_dump`,x=`${M}_title`,W=`${M}_basic`,F=`${M}_local`,X=`${M}_remote`,se=`${D}_title`,B=`${D}_local`,k=`${D}_remote`,J=`${y}_banner`,ue=`${J}_item`,pe=`${y}_toolbar`,U=`${y}_tool`,L=`${y}_item`,he=`${L}_debug`,me=`${L}_info`,_e=`${L}_warn`,be=`${L}_error`,R=`${y}_back_top`,I=`${y}_go_bottom`,Y=`${D}_local_audio`,j=`${D}_local_video_main`,V=`${D}_local_video_aux`,N=`${y}_tooltip`,ae="success",w="failed",Te=0,ge=!1,H=class{constructor(t,e,i,s){g(this,"_dialogNode",null);g(this,"_switchNode",null);g(this,"_maskNode",null);g(this,"_pannelNode",null);g(this,"_logContentNode",null);g(this,"_networkContentNode",null);g(this,"_dumpContentNode",null);g(this,"_tabNodes",[]);g(this,"_toptabNodes",[]);g(this,"_backTopButton",null);g(this,"_goBottomButton",null);g(this,"_hasMove",!1);g(this,"_showDialog",!1);g(this,"_isMobile",!1);g(this,"_showLogType","all");g(this,"prevBytesSent",0);g(this,"prevBytesReceived",0);g(this,"_core");g(this,"_log");g(this,"_logList",[]);g(this,"isUploading",!1);g(this,"publishMap",new Map);g(this,"dumpLocalVideoMap");g(this,"dumpRemoteVideoMap");g(this,"handleLeaveSuccess",()=>{var e;let t=(e=this._dialogNode)==null?void 0:e.querySelector(`.${k}`);for(let i of this.publishMap.values())t==null||t.removeChild(i);this.publishMap.clear()});g(this,"handleRemoteVideoAvailable",t=>{let e=t.streamType==="sub"?"auxiliary":"main";this.renderDumpTab(t.userId,"remote",e,"publish")});g(this,"handleRemoteVideoUnavailable",t=>{let e=t.streamType==="sub"?"auxiliary":"main";this.renderDumpTab(t.userId,"remote",e,"unpublish")});g(this,"handleRemoteAudioAvailable",t=>{this.renderDumpTab(t.userId,"remote","audio","publish")});g(this,"handleRemoteAudioUnavailable",t=>{this.renderDumpTab(t.userId,"remote","audio","unpublish")});g(this,"renderDumpTab",(t,e,i,s)=>{var u,p;let o={main:_?"\u89C6\u9891":"video",auxiliary:_?"\u5C4F\u5E55":"screen",audio:_?"\u97F3\u9891":"audio"},n=(h,f)=>{var m,b;let v=document.createElement("div");v.innerText=`${h} - ${o[f]} - ${l.DURATION}(s):`;let r=document.createElement("input");r.type="number",r.min="0",r.value="0",r.id=`dump_remote_${f}_${h}`;let a=document.createElement("button");a.innerText=l.END_BUTTON,a.style.cssText="border-radius: 5px;",a.disabled=!0;let c=document.createElement("button");return c.innerText=l.DUMP_BUTTON,c.style.cssText="border-radius: 5px;",c.onclick=()=>{let T,E,P=Number(r.value);if(f==="audio"?{download:T,onDumpEnd:E}=this.dumpAudio("remote",P,h):{download:T,onDumpEnd:E}=this.dumpVideo(f,"remote",P,h),!T){this.addInfoToBanner(w,_?`\u8F6C\u50A8\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8FDC\u7AEF\u7528\u6237${h}\u662F\u5426\u53D1\u5E03\u6D41`:`Failed to dump, please check if the remote user ${h} has published the stream`);return}this.disactiveButton(c,l.DUMPING_BUTTON),P>0?setTimeout(()=>{T==null||T(),this.activeButton(c,l.DUMP_BUTTON)},P*1e3):(this.activeButton(a),a.onclick=()=>{a.onclick=null,T==null||T(),E==null||E(),this.activeButton(c,l.DUMP_BUTTON),this.disactiveButton(a)})},v.appendChild(r),v.appendChild(c),v.appendChild(a),v.style.cssText="padding:10px;border-bottom:1px solid var(--DD-BORDER)",(b=(m=this._dialogNode)==null?void 0:m.querySelector(`.${k}`))==null||b.appendChild(v),v};if(e==="remote")if(s==="publish"){let h=n(t,i);this.publishMap.set(`${t}-${e}-${i}`,h)}else{let h=this.publishMap.get(`${t}-${e}-${i}`);if(!h)return;(p=(u=this._dialogNode)==null?void 0:u.querySelector(`.${k}`))==null||p.removeChild(h),this.publishMap.delete(`${t}-${e}-${i}`)}});g(this,"handleStatistics",t=>{var f,v,r;let e=(t.bytesSent-this.prevBytesSent)/2,i=(t.bytesReceived-this.prevBytesReceived)/2;this.prevBytesSent=t.bytesSent,this.prevBytesReceived=t.bytesReceived;let s=(f=this._dialogNode)==null?void 0:f.querySelector(`.${W}`),o=`rtt: ${t.rtt} ms upLoss: ${t.upLoss} downLoss: ${t.downLoss} <br>
|
|
10
|
-
\u2191 ${e/1e3} KB/s (${8*e/1e3} Kb/s) <br>
|
|
11
|
-
\u2193 ${i/1e3} KB/s (${8*i/1e3} Kb/s) <br>
|
|
12
|
-
`;s.innerHTML=o;let n=(v=this._dialogNode)==null?void 0:v.querySelector(`.${F}`),u="";t.localStatistics.audio.bitrate&&(u=`<li>local audio: ${t.localStatistics.audio.bitrate} Kb/s audioLevel: ${t.localStatistics.audio.audioLevel.toFixed(5)}</li>`),t.localStatistics.video.length>0&&(u+=`${t.localStatistics.video.map(a=>`<li>local ${a.videoType} video: ${a.bitrate} Kb/s ${a.width}*${a.height} ${a.frameRate}fps</li>`).join("")}`),n.innerHTML=u===""?`${l.NO_DATA}`:u;let p=(r=this._dialogNode)==null?void 0:r.querySelector(`.${X}`),h="";t.remoteStatistics.length>0&&t.remoteStatistics.forEach(a=>{let c=`remote ${a.userId}:`;a.audio.bitrate>0&&(c+=`<li>audio: ${a.audio.bitrate} Kb/s audioLevel: ${a.audio.audioLevel.toFixed(5)}</li>`),a.video.length>0&&a.video.forEach(m=>{c+=`<li>${m.videoType} video: ${m.bitrate} Kb/s ${m.width}*${m.height} ${m.frameRate}fps</li>`}),h+=c}),p.innerHTML=h===""?`${l.NO_DATA}`:h});this._core=t,this._log=e,this.dumpLocalVideoMap=i,this.dumpRemoteVideoMap=s,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}synchronizeLog(){this._core.loggerManager.getQueue().forEach(e=>{this.updateLog(e)})}addStyle(){if(ge)return;ge=!0;let t=document.createElement("style");t.innerHTML=`
|
|
13
|
-
#${y}
|
|
14
|
-
{--DD-BG-0:#ededed;--DD-BG-1:#f7f7f7;--DD-BG-2:#fff;--DD-BORDER: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;}
|
|
15
|
-
#${y} a,.${q}{cursor:pointer;}
|
|
16
|
-
.${y}{color:black;}
|
|
17
|
-
.${q}{display:block;position:fixed;right:50px;bottom:150px;border-radius:5px;background-color:#07c160;color:#fff;padding:5px 10px;z-index:10000;}
|
|
18
|
-
.${te}{display:none;position:fixed;left:0;top:0;right:0;bottom:0;z-index:10001;background-color:rgb(0,0,0,0.6);}
|
|
19
|
-
.${K}{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);}
|
|
20
|
-
@media (max-width:768px) {.${K}{left:0;}}
|
|
21
|
-
.${oe}{display:flex;height:2rem;border-bottom:1px solid var(--DD-BORDER);}
|
|
22
|
-
.${O}{padding:0 20px;border-right:1px solid rgba(0, 0, 0, 0.1);line-height:2rem;color: black;}
|
|
23
|
-
.${O}.${A}{background-color:var(--DD-BG-2);}
|
|
24
|
-
.${O}.disabled{cursor: not-allowed;background-color: #ededed;color: #999;}
|
|
25
|
-
.${ie}{height:2rem;display:flex;flex-direction:row;}
|
|
26
|
-
.${C}{width:20%;text-align:center;line-height:2rem;border-right:1px solid var(--DD-BORDER);border-bottom:1px solid var(--DD-BORDER);color:black;}
|
|
27
|
-
.${C}.${A}{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}
|
|
28
|
-
.${$}{background-color:#fff;position:absolute;left:0;right:0;top:2rem;bottom:8rem;overflow-y:scroll;overflow-x:hidden;}
|
|
29
|
-
.${$}.${G}{top:4rem;}
|
|
30
|
-
.${M}{display:none;}
|
|
31
|
-
.${D}{display:none;}
|
|
32
|
-
.${x},.${se}{line-height:2rem;text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BORDER);}
|
|
33
|
-
.${W},.${F},.${X}{text-align:center;border-bottom:1px solid var(--DD-BORDER);}
|
|
34
|
-
.${B},.${k}{display:flex;flex-direction:column;padding:0.5rem 0;justify-content:center;align-items:center;}
|
|
35
|
-
.${B} div input{margin:0 10px;height:1.8rem;width:4rem;}
|
|
36
|
-
.${B} div {padding:10px 0;border-radius:5px;}
|
|
37
|
-
.${B} div button {border-radius:5px;}
|
|
38
|
-
.${k} div input{margin:0 10px;height:1.8rem;width:4rem;}
|
|
39
|
-
.${k} div select{margin:0 10px;height:1.8rem;width:6rem;appearance:auto;}
|
|
40
|
-
.${x}{text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BORDER);}
|
|
41
|
-
.${W},.${F},.${X}{text-align:center;border-bottom:1px solid var(--DD-BORDER);}
|
|
42
|
-
.${L}{border-bottom:1px solid var(--DD-BG-0);padding:5px 10px;overflow-wrap: break-word;}
|
|
43
|
-
.${be}{color:var(--DD-ERROR);background-color:var(--DD-ERROR-BG);}
|
|
44
|
-
.${_e}{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}
|
|
45
|
-
.${me}{color:var(--DD-INFO);}
|
|
46
|
-
.${he}{color:var(--DD-DEBUG);}
|
|
47
|
-
.${J}{position:absolute;left:0;right:0;bottom:2rem;height:6rem;border-bottom:1px solid var(--DD-BORDER);display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--DD-BG-1);}
|
|
48
|
-
.${ue}{border-bottom:1px solid var(--DD-BORDER);padding:5px 10px;overflow-wrap: break-word;}
|
|
49
|
-
.${pe}{position:absolute;line-height:2rem;display:flex;flex-direction:row;left:0;right:0;bottom:0;}
|
|
50
|
-
.${U}{flex:1;color:black;text-align:center;background-color:#ededed;border-right:1px solid var(--DD-BORDER);}
|
|
51
|
-
#${y} .${R},#${y} .${I}{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;}
|
|
52
|
-
.${I}{bottom:9rem;}
|
|
53
|
-
.${R}{bottom:11.5rem;}
|
|
54
|
-
#${y} .${U}.disable {cursor: not-allowed;background-color: #ededed;color: #999;}
|
|
55
|
-
.${N} {position: relative;display: inline-block;}
|
|
56
|
-
.${N} .tooltiptext {visibility: hidden;width: 180px;background-color: black;color: #fff;text-align: center;padding: 5px 0;border-radius: 6px;position: absolute;}
|
|
57
|
-
.${N} .tooltip-top {bottom: 125%;left: 50%;margin-left: -90px;}
|
|
58
|
-
.${N}:hover .tooltiptext { visibility: visible;}
|
|
59
|
-
`,document.body.appendChild(t)}addDialog(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}createDiaLog(){var n,u,p,h;this._isMobile=ee();let t=document.createElement("template");t.innerHTML=`<div id="${y}" class="${y}">
|
|
60
|
-
<div class="${q}">Debug#${++Te}</div>
|
|
61
|
-
<div class="${te}"></div>
|
|
62
|
-
<div class="${K}">
|
|
63
|
-
<a class="${R}">${l.BACK_TOP}</a>
|
|
64
|
-
<a class="${I}">${l.GO_BOTTOM}</a>
|
|
65
|
-
<div class="${oe}">
|
|
66
|
-
<a class="${O} ${A}" data-tab="log">${l.LOG_BUTTON}</a>
|
|
67
|
-
<a class="${O}" data-tab="network">${l.NETWORK_BUTTON}</a>
|
|
68
|
-
<a class="${O}" data-tab="dump">${l.DUMP_BUTTON}</a>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="${ie}">
|
|
71
|
-
<a class="${C} ${A}" data-type="all">All</a>
|
|
72
|
-
<a class="${C}" data-type="debug">Debug</a>
|
|
73
|
-
<a class="${C}" data-type="info">Info</a>
|
|
74
|
-
<a class="${C}" data-type="warn">Warn</a>
|
|
75
|
-
<a class="${C}" data-type="error">Error</a>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="${$} ${G}">
|
|
78
|
-
<div class="${de}"></div>
|
|
79
|
-
<div class="${M}">
|
|
80
|
-
<div class="${x}">${l.BASIC}</div>
|
|
81
|
-
<div class="${W}">${l.NO_DATA}</div>
|
|
82
|
-
<div class="${x}">${l.UPLINK}</div>
|
|
83
|
-
<div class="${F}">${l.NO_DATA}</div>
|
|
84
|
-
<div class="${x}">${l.DOWNLINK}</div>
|
|
85
|
-
<div class="${X}">${l.NO_DATA}</div>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="${D}">
|
|
88
|
-
<div class="${se}">${l.UPLINK}</div>
|
|
89
|
-
<div class="${B}">
|
|
90
|
-
<div id="${Y}">
|
|
91
|
-
<span>${l.AUDIO} - ${l.DURATION}(s):</span>
|
|
92
|
-
<input type="number" min=0 value=0></input>
|
|
93
|
-
<button class="dump">${l.DUMP_BUTTON}</button>
|
|
94
|
-
<button class="end-dump" disabled>${l.END_BUTTON}</button>
|
|
95
|
-
</div>
|
|
96
|
-
<div id="${j}">
|
|
97
|
-
<span>${l.VIDEO} - ${l.DURATION}(s):</span>
|
|
98
|
-
<input type="number" min=0 value=0></input>
|
|
99
|
-
<button class="dump">${l.DUMP_BUTTON}</button>
|
|
100
|
-
<button class="end-dump" disabled>${l.END_BUTTON}</button>
|
|
101
|
-
</div>
|
|
102
|
-
<div id="${V}">
|
|
103
|
-
<span>${l.SCREEN} - ${l.DURATION}(s):</span>
|
|
104
|
-
<input type="number" min=0 value=0></input>
|
|
105
|
-
<button class="dump">${l.DUMP_BUTTON}</button>
|
|
106
|
-
<button class="end-dump" disabled>${l.END_BUTTON}</button>
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
<div class="${se}">${l.DOWNLINK}</div>
|
|
110
|
-
<div class="${k}"></div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="${J}"></div>
|
|
114
|
-
<div class="${pe}">
|
|
115
|
-
<a id="trtc_upload" class="${U}">${l.UPLOAD_BUTTON}</a>
|
|
116
|
-
<a id="trtc_export" class="${U}">${l.EXPORT_BUTTON}</a>
|
|
117
|
-
<a id="trtc_hide" class="${U}">${l.HIDE_BUTTON}</a>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>`;let e=t.content.firstChild;this._switchNode=e.querySelector(`.${q}`),(n=this._switchNode)==null||n.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=e.querySelector(`.${te}`),(u=this._maskNode)==null||u.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=e.querySelector(`.${K}`),(p=e.querySelector(`.${R}`))==null||p.addEventListener("click",this.onBackTopClick.bind(this)),(h=e.querySelector(`.${I}`))==null||h.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=e.querySelector(`.${de}`),this._networkContentNode=e.querySelector(`.${M}`),this._dumpContentNode=e.querySelector(`.${D}`),this._tabNodes=Array.from(e.querySelector(`.${oe}`).children),this._tabNodes.forEach(f=>{f.dataset.tab==="dump"&&!this._core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED?(f.classList.add("disabled"),this._log.error("insertable-stream is supported, cannot use dump in debug plugin"),f.addEventListener("click",()=>{this.addInfoToBanner(w,_?"\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301insertable-stream API\uFF0C\u65E0\u6CD5\u4F7F\u7528\u8F6C\u50A8\u529F\u80FD":"insertable-stream is supported, cannot use dump in debug plugin")})):f.addEventListener("click",this.onTabClick.bind(this))}),this._toptabNodes=Array.from(e.querySelector(`.${ie}`).children),this._toptabNodes.forEach(f=>{f.addEventListener("click",this.onToptabClick.bind(this))}),this._backTopButton=e.querySelector(`.${R}`),this._goBottomButton=e.querySelector(`.${I}`);let i=e.querySelector("#trtc_upload");i==null||i.addEventListener("click",this.onUploadClick.bind(this));let s=e.querySelector("#trtc_export");s==null||s.addEventListener("click",this.onExportClick.bind(this));let o=e.querySelector("#trtc_hide");if(o==null||o.addEventListener("click",this.onHideClick.bind(this)),this._core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED){let f=e.querySelector(`#${j} .dump`);f==null||f.addEventListener("click",()=>{let a=Number(e.querySelector(`#${j} input`).value),{download:c,onDumpEnd:m}=this.dumpVideo("main","local",a);if(!c){this.addInfoToBanner(w,_?"\u8F6C\u50A8\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u7528\u6237\u662F\u5426\u8FDB\u623F\u6216\u53D1\u5E03\u89C6\u9891\u6D41":"Failed to dump, please check if the current user has entered the room or published the video stream");return}if(this.disactiveButton(f,l.DUMPING_BUTTON),a>0)setTimeout(()=>{c(),this.activeButton(f,l.DUMP_BUTTON)},a*1e3);else{let b=e.querySelector(`#${j} .end-dump`);this.activeButton(b),b.onclick=()=>{b.onclick=null,m==null||m(),c(),this.activeButton(f,l.DUMP_BUTTON),this.disactiveButton(b)}}});let v=e.querySelector(`#${V} .dump`);v==null||v.addEventListener("click",()=>{let a=Number(e.querySelector(`#${V} input`).value),{download:c,onDumpEnd:m}=this.dumpVideo("auxiliary","local",a);if(!c){this.addInfoToBanner(w,_?"\u8F6C\u50A8\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u7528\u6237\u662F\u5426\u8FDB\u623F\u6216\u53D1\u5E03\u5C4F\u5E55\u5206\u4EAB\u6D41":"Failed to dump, please check if the current user has entered the room or published the screen share stream");return}if(this.disactiveButton(v,l.DUMPING_BUTTON),a>0)setTimeout(()=>{c(),this.activeButton(v,l.DUMP_BUTTON)},a*1e3);else{let b=e.querySelector(`#${V} .end-dump`);this.activeButton(b),b.onclick=()=>{b.onclick=null,c(),m==null||m(),this.activeButton(v,l.DUMP_BUTTON),this.disactiveButton(b)}}});let r=e.querySelector(`#${Y} button`);r==null||r.addEventListener("click",()=>{let a=Number(e.querySelector(`#${Y} input`).value),{download:c,onDumpEnd:m}=this.dumpAudio("local",a);if(!c){this.addInfoToBanner(w,_?"\u8F6C\u50A8\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u7528\u6237\u662F\u5426\u8FDB\u623F\u6216\u53D1\u5E03\u97F3\u9891\u6D41":"Failed to dump, please check if the current user has entered the room or published the audio stream");return}if(this.disactiveButton(r,l.DUMPING_BUTTON),a>0)setTimeout(()=>{c(),this.activeButton(r,l.DUMP_BUTTON)},a*1e3);else{let b=e.querySelector(`#${Y} .end-dump`);this.activeButton(b),b.onclick=()=>{b.onclick=null,c(),m==null||m(),this.activeButton(r,l.DUMP_BUTTON),this.disactiveButton(b)}}})}return e}closeDialog(){this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._core=null,this._log=null,this.dumpLocalVideoMap=null,this.dumpRemoteVideoMap=null,this._logList=null}updateLog(t){var i;this._logList.push(t);let e=document.createElement("div");switch(e.classList.add(L),t.level){case 4:e.classList.add(be);break;case 2:e.classList.add(me);break;case 3:e.classList.add(_e);break;case 1:e.classList.add(he);break;default:break}e.textContent=t.log,this._showLogType!=="all"&&!e.classList.contains(`${L}_${this._showLogType}`)&&(e.style.display="none"),(i=this._logContentNode)==null||i.appendChild(e),this.addHelper(e)}onSwitchClick(){if(this._hasMove){this._hasMove=!1;return}this._showDialog?this.hideDialog():(this._isMobile&&(this._maskNode.style.display="block"),this._pannelNode.style.display="block",this._switchNode.style.display="none",this._showDialog=!0,this.logContentGoBottom())}onTabClick(t){var s,o,n,u,p;let e=t.target;(s=this._tabNodes)==null||s.forEach(h=>{h.classList.remove(A)}),e.classList.add(A);let i=e.getAttribute("data-tab");i==="log"?((n=(o=this._dialogNode)==null?void 0:o.querySelector(`.${$}`))==null||n.classList.add(G),this._logContentNode.style.display="block",this._goBottomButton.style.display="block",this._backTopButton.style.display="block",this._networkContentNode.style.display="none",this._dumpContentNode.style.display="none",this.logContentGoBottom()):(this._backTopButton.style.display="none",this._goBottomButton.style.display="none",(p=(u=this._dialogNode)==null?void 0:u.querySelector(`.${$}`))==null||p.classList.remove(G),i==="network"?(this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._dumpContentNode.style.display="none"):i==="dump"&&(this._dumpContentNode.style.display="block",this._networkContentNode.style.display="none",this._logContentNode.style.display="none"))}onToptabClick(t){var o,n;let e=t.target;(o=this._toptabNodes)==null||o.forEach(u=>{u.classList.remove(A)}),e.classList.add(A),this._showLogType=e.getAttribute("data-type");let i=(n=this._logContentNode)==null?void 0:n.querySelectorAll(`.${L}`),s=`${L}_${this._showLogType}`;i.forEach(u=>{u.classList.contains(s)||this._showLogType==="all"?u.style.display="block":u.style.display="none"}),this.logContentGoBottom()}onExportClick(){let t=this._logList.reduce((n,u)=>`${n+u.log}
|
|
121
|
-
`,""),e=new Blob([t],{type:"text/plain"}),i=document.createElement("a"),s=URL.createObjectURL(e);i.href=s;let o=`trtc_${this._core.room.sdkAppId===void 0?"EmptySdkAppId":this._core.room.sdkAppId}_${this._core.room.userId===void 0?"EmptyUserId":this._core.room.userId}_${new Date().getTime()}.log`;i.download=o,i.style.display="none",document.body.appendChild(i),i.click(),URL.revokeObjectURL(s),document.body.removeChild(i),this.addInfoToBanner(ae,_?`\u5BFC\u51FA\u6210\u529F\uFF1A\u65E5\u5FD7\u6587\u4EF6\u540D\u4E3A${o}`:`Export success: The log file name is ${o}`),this._core.kvStatManager.addSuccessEvent({key:592703}),this._log.info("Export success: The log file name is ${fileName}")}addInfoToBanner(t,e){var o;let i=(o=this._dialogNode)==null?void 0:o.querySelector(`.${J}`),s=document.createElement("div");s.classList.add(ue),s.innerText=`${t===ae?"\u{1F7E9}":"\u{1F7E5} "} [${this.getCurrentTime()}] ${e}`,i.appendChild(s),i.scrollTop=i.scrollHeight}async onUploadClick(){var u;if(this.isUploading)return;this.isUploading=!0;let t=(u=this._dialogNode)==null?void 0:u.querySelector("#trtc_upload");t.innerText=_?"\u4E0A\u4F20\u4E2D...":"Uploading...",t==null||t.classList.add(".disable");let e=this._logList.reduce((p,h)=>`${p+h.log}
|
|
122
|
-
`,""),i=new Blob([e],{type:"text/plain"}),s=new FormData,o="trtc.log";s.append("file",i,o),s.append("sdkAppId",`${this._core.room.sdkAppId||"EmptySdkAppId"}`),s.append("userId",`${this._core.room.userId||"EmptyUserId"}`),fetch("https://service.trtc.qcloud.com/api/uploadLogFile",{method:"POST",body:s}).then(p=>p.json()).then(p=>{this.addInfoToBanner(p.type,_?p.message_zh:p.message_en),this.isUploading=!1,this._log.info(p.message_en),this._core.kvStatManager.addSuccessEvent({key:592704})}).catch(()=>{this.addInfoToBanner(w,_?"\u4E0A\u4F20\u5931\u8D25\uFF1A\u8BF7\u4F7F\u7528\u672C\u5730\u5BFC\u51FA":"Upload Failed: Please use local export"),this._log.info("Upload Failed: Please use local export"),this._core.kvStatManager.addFailedEvent({key:592704})}).finally(()=>{t.innerText=_?"\u4E0A\u4F20":"Upload",t==null||t.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 t,e;(e=(t=this._dialogNode)==null?void 0:t.querySelector(`.${$}`))==null||e.scrollTo(0,0)}onGoBottomClick(){this.logContentGoBottom()}logContentGoBottom(){var e;let t=(e=this._dialogNode)==null?void 0:e.querySelector(`.${$}`);t==null||t.scrollTo(0,t==null?void 0:t.scrollHeight)}dragable(t){var f,v;let e={x:0,y:0,startX:0,startY:0,endX:0,endY:0,isTouchEnd:!1};e.x=((f=this._switchNode)==null?void 0:f.offsetLeft)||50,e.y=((v=this._switchNode)==null?void 0:v.offsetTop)||150;let i=r=>{r.preventDefault(),e.startX=r.pageX,e.startY=r.pageY,document.addEventListener("mousemove",s),document.addEventListener("mouseup",o)},s=r=>{r.cancelable&&r.preventDefault(),this._hasMove=!0;let a=e.x-(r.pageX-e.startX),c=e.y-(r.pageY-e.startY);[a,c]=h(a,c),this._switchNode.style.right=`${a}px`,this._switchNode.style.bottom=`${c}px`,e.endX=a,e.endY=c},o=()=>{e.startX=0,e.startY=0,e.x=e.endX,e.y=e.endY,document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",o)},n=r=>{e.startX=r.touches[0].pageX,e.startY=r.touches[0].pageY,e.isTouchEnd=!1},u=()=>{!e.isTouchEnd||(e.startX=0,e.startY=0,e.isTouchEnd=!1,e.x=e.endX,e.y=e.endY)},p=r=>{if(r.touches.length<=0)return;let a=r.touches[0].pageX-e.startX,c=r.touches[0].pageY-e.startY,m=Math.floor(e.x-a),b=Math.floor(e.y-c);[m,b]=h(m,b),this._switchNode.style.right=`${m}px`,this._switchNode.style.bottom=`${b}px`,e.endX=m,e.endY=b,e.isTouchEnd=!0,r.cancelable&&r.preventDefault()},h=(r,a)=>{let c=Math.max(document.documentElement.offsetWidth,window.innerWidth),m=Math.max(document.documentElement.offsetHeight,window.innerHeight);return r+this._switchNode.offsetWidth>c&&(r=c-this._switchNode.offsetWidth),a+this._switchNode.offsetHeight>m&&(a=m-this._switchNode.offsetHeight),r<0&&(r=0),a<20&&(a=20),[r,a]};ee()?(t.addEventListener("touchstart",n,{passive:!1}),t.addEventListener("touchend",u,{passive:!1}),t.addEventListener("touchmove",p,{passive:!1})):t.addEventListener("mousedown",i)}installEvents(){this._core.innerEmitter.on("264",this.handleLog,this),this._core.innerEmitter.on("53",this.handleLeaveSuccess,this),this._core.trtc.on(this._core.TRTC.EVENT.STATISTICS,this.handleStatistics,this),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,this.handleRemoteAudioAvailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,this.handleRemoteAudioUnavailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,this.handleRemoteVideoAvailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,this.handleRemoteVideoUnavailable)}uninstallEvents(){this._core.innerEmitter.off("264",this.handleLog,this),this._core.innerEmitter.off("53",this.handleLeaveSuccess,this),this._core.trtc.off(this._core.TRTC.EVENT.STATISTICS,this.handleStatistics,this),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,this.handleRemoteAudioAvailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,this.handleRemoteAudioUnavailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,this.handleRemoteVideoAvailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,this.handleRemoteVideoUnavailable)}disactiveButton(t,e){t.disabled=!0,e&&(t.innerText=e),t.style.cssText="cursor: not-allowed;background-color: #ededed;color: #999;border-radius: 5px;"}activeButton(t,e){t.disabled=!1,e&&(t.innerText=e),t.style.cssText="border-radius: 5px;margin-right: 5px;"}handleLog(t){this.updateLog(t.log)}addHelper(t){let e=/((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=ce,s=t.innerText;s=s.split(`
|
|
123
|
-
`).map(o=>{if(o=o.replace(/</g,"<").replace(/>/g,">"),o.includes("failed"))return o.includes("on autoplay-failed")?o:`<span class='red' style="background:red; color:#fff;">${o}</span>`;if(o.includes("clientIp:")){let n=o.match(e);return n==null||n.forEach(u=>{o=o.replace(u,`<a href="javascript:void(0);" target=""><span class='ip' style="background:#e1dfdf">${u}</span></a>`)}),o}return o.includes("URL of current page")&&(o=o.replace(/URL of current page: (.+)/,'URL of current page: <a href="$1">$1</a>')),o}).join(`
|
|
124
|
-
`),i.forEach(o=>{if(t.innerText.includes(o)){let n="";_?n=typeof S[o].tips_zh=="function"?S[o].tips_zh(t.innerText):S[o].tips_zh:n=typeof S[o].tips_en=="function"?S[o].tips_en(t.innerText):S[o].tips_en,s=s.replace(new RegExp(`${le(o)}`,"gi"),`<span class="${N}" style="background:${S[o].color||"#e1dfdf"}; color: ${S[o].textColor||"#000"}">${o}
|
|
125
|
-
<span class="tooltiptext tooltip-top">${n}</span>
|
|
126
|
-
</span>`)}}),t.innerHTML=s}getCurrentTime(){let t=n=>n<10?`0${n}`:`${n}`,e=new Date,i=t(e.getHours()),s=t(e.getMinutes()),o=t(e.getSeconds());return`${i}:${s}:${o}`}dumpVideo(t,e,i,s){let o=Date.now(),n=[],u=()=>{if(n.length===0){this.addInfoToBanner(w,_?"\u8F6C\u50A8\u5931\u8D25":"Dump failed");return}let h;t==="main"?h="video":t==="auxiliary"&&(h="screen");let f=URL.createObjectURL(new Blob(n)),v=document.createElement("a"),r=e==="local"?`local-${h}-${o}.h264`:`remote-${s}-${h}-${o}.h264`;v.href=f,v.download=r,v.style.display="none",document.body.appendChild(v),v.click(),URL.revokeObjectURL(f),v.remove(),this.addInfoToBanner(ae,_?`\u8F6C\u50A8\u6210\u529F\uFF0C\u6587\u4EF6\u540D\u4E3A\uFF1A${r}`:`Dump success, file name is: ${r}`)},p;if(e==="local"){if(!this.hasLocalTrack(t,"video"))return{};p=()=>{delete this.dumpLocalVideoMap[t==="auxiliary"?"sub":"main"]},this.dumpLocalVideoMap[t==="auxiliary"?"sub":"main"]={startTimestamp:o,data:n,duration:i,onDumpEnd:p}}return e==="remote"&&s&&(p=()=>{delete this.dumpRemoteVideoMap[`${s}-${t}`]},this.dumpRemoteVideoMap[`${s}-${t}`]={startTimestamp:o,data:n,duration:i,onDumpEnd:p}),{download:u,onDumpEnd:p}}hasLocalTrack(t,e){for(let i of this._core.room.localTracks)if(i.streamType===t&&i.kind===e)return!0;return!1}dumpAudio(t,e,i){var v,r,a;let s=null,o=[],n=[],u=[],p=new AbortController,h=Date.now();if(t==="local"){if(!this.hasLocalTrack("main","audio"))return{};(v=this._core.room.audioManager._localAudioPipline)!=null&&v.source.node&&(o.push(this._core.room.audioManager._localAudioPipline.source.node),n.push(`local-mic-${h}`)),(r=this._core.room.audioManager._localAudioPipline)!=null&&r.denoiser.node&&(o.push(this._core.room.audioManager._localAudioPipline.denoiser.node),n.push(`local-mic-processed-${h}`)),this._core.room.audioManager.mixWeight>1&&(o.push(this._core.room.audioManager.audioContext.createMediaStreamSource(this._core.room.audioManager._localAudioPipline.stream)),n.push(`local-mix-${h}`))}else if(t==="remote"&&i!==void 0){let c=(a=this._core.room.remotePublishedUserMap.get(i))==null?void 0:a.remoteAudioTrack,m=this._core.createAudioNode(c==null?void 0:c.mediaTrack);o.push(m),n.push(`remote-${i}-${h}`)}let f=()=>{for(let c=0;c<n.length;c++){let m=URL.createObjectURL(new Blob(u[c])),b=document.createElement("a");b.href=m,b.download=`${n[c]}.pcm`,b.style.display="none",document.body.appendChild(b),b.click(),URL.revokeObjectURL(m),b.remove()}s&&clearTimeout(s),p.abort("download")};return e>0&&(s=Number(setTimeout(()=>{p.abort("timeout")},e*1e3))),this._core.startGetPCM(o).then(c=>c.pipeTo(new WritableStream({write(m){m.forEach((b,T)=>u[T]=u[T]?u[T].concat(b[0]):[b[0]])}}),p).catch(()=>f)),{download:f,onDumpEnd:()=>{p.abort("timeout")}}}};Q([Z(300,()=>"export")],H.prototype,"onExportClick",1),Q([Z(300,()=>"upload")],H.prototype,"onUploadClick",1);var He=H;export{He as default};
|
|
@@ -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).TRTCDebugDialog=t()}(this,(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){try{return!!e()}catch(t){return!0}},n=!t((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),o=n,r=Function.prototype,i=r.call,a=o&&r.bind.bind(i,i),c=o?a:function(e){return function(){return i.apply(e,arguments)}},s=c,l=s({}.toString),u=s("".slice),d=function(e){return u(l(e),8,-1)},h=t,p=d,f=Object,m=c("".split),v=h((function(){return!f("z").propertyIsEnumerable(0)}))?function(e){return"String"==p(e)?m(e,""):f(e)}:f,g=function(e){return null==e},b=g,y=TypeError,_=function(e){if(b(e))throw y("Can't call method on "+e);return e},w=v,T=_,k=function(e){return w(T(e))},S=function(e){return e&&e.Math==Math&&e},E=S("object"==typeof globalThis&&globalThis)||S("object"==typeof window&&window)||S("object"==typeof self&&self)||S("object"==typeof e&&e)||function(){return this}()||Function("return this")(),x={},R={get exports(){return x},set exports(e){x=e}},D=E,O=Object.defineProperty,L=function(e,t){try{O(D,e,{value:t,configurable:!0,writable:!0})}catch(n){D[e]=t}return t},N=L,A="__core-js_shared__",U=E[A]||N(A,{}),I=U;(R.exports=function(e,t){return I[e]||(I[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.0/LICENSE",source:"https://github.com/zloirock/core-js"});var B,C,P=_,M=Object,j=function(e){return M(P(e))},z=j,q=c({}.hasOwnProperty),V=Object.hasOwn||function(e,t){return q(z(e),t)},H=c,G=0,F=Math.random(),K=H(1..toString),W=function(e){return"Symbol("+(void 0===e?"":e)+")_"+K(++G+F,36)},$="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Y=E,X=$,J=Y.process,Q=Y.Deno,Z=J&&J.versions||Q&&Q.version,ee=Z&&Z.v8;ee&&(C=(B=ee.split("."))[0]>0&&B[0]<4?1:+(B[0]+B[1])),!C&&X&&(!(B=X.match(/Edge\/(\d+)/))||B[1]>=74)&&(B=X.match(/Chrome\/(\d+)/))&&(C=+B[1]);var te=C,ne=te,oe=t,re=!!Object.getOwnPropertySymbols&&!oe((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ne&&ne<41})),ie=re&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=x,ce=V,se=W,le=re,ue=ie,de=E.Symbol,he=ae("wks"),pe=ue?de.for||de:de&&de.withoutSetter||se,fe=function(e){return ce(he,e)||(he[e]=le&&ce(de,e)?de[e]:pe("Symbol."+e)),he[e]},me="object"==typeof document&&document.all,ve={all:me,IS_HTMLDDA:void 0===me&&void 0!==me},ge=ve.all,be=ve.IS_HTMLDDA?function(e){return"function"==typeof e||e===ge}:function(e){return"function"==typeof e},ye=be,_e=ve.all,we=ve.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ye(e)||e===_e}:function(e){return"object"==typeof e?null!==e:ye(e)},Te=we,ke=String,Se=TypeError,Ee=function(e){if(Te(e))return e;throw Se(ke(e)+" is not an object")},xe={},Re=!t((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),De=Re&&t((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe={},Le=we,Ne=E.document,Ae=Le(Ne)&&Le(Ne.createElement),Ue=function(e){return Ae?Ne.createElement(e):{}},Ie=Ue,Be=!Re&&!t((function(){return 7!=Object.defineProperty(Ie("div"),"a",{get:function(){return 7}}).a})),Ce=n,Pe=Function.prototype.call,Me=Ce?Pe.bind(Pe):function(){return Pe.apply(Pe,arguments)},je=E,ze=be,qe=function(e,t){return arguments.length<2?(n=je[e],ze(n)?n:void 0):je[e]&&je[e][t];var n},Ve=c({}.isPrototypeOf),He=qe,Ge=be,Fe=Ve,Ke=Object,We=ie?function(e){return"symbol"==typeof e}:function(e){var t=He("Symbol");return Ge(t)&&Fe(t.prototype,Ke(e))},$e=String,Ye=function(e){try{return $e(e)}catch(t){return"Object"}},Xe=be,Je=Ye,Qe=TypeError,Ze=function(e){if(Xe(e))return e;throw Qe(Je(e)+" is not a function")},et=Ze,tt=g,nt=function(e,t){var n=e[t];return tt(n)?void 0:et(n)},ot=Me,rt=be,it=we,at=TypeError,ct=Me,st=we,lt=We,ut=nt,dt=function(e,t){var n,o;if("string"===t&&rt(n=e.toString)&&!it(o=ot(n,e)))return o;if(rt(n=e.valueOf)&&!it(o=ot(n,e)))return o;if("string"!==t&&rt(n=e.toString)&&!it(o=ot(n,e)))return o;throw at("Can't convert object to primitive value")},ht=TypeError,pt=fe("toPrimitive"),ft=function(e,t){if(!st(e)||lt(e))return e;var n,o=ut(e,pt);if(o){if(void 0===t&&(t="default"),n=ct(o,e,t),!st(n)||lt(n))return n;throw ht("Can't convert object to primitive value")}return void 0===t&&(t="number"),dt(e,t)},mt=We,vt=function(e){var t=ft(e,"string");return mt(t)?t:t+""},gt=Re,bt=Be,yt=De,_t=Ee,wt=vt,Tt=TypeError,kt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Et="enumerable",xt="configurable",Rt="writable";Oe.f=gt?yt?function(e,t,n){if(_t(e),t=wt(t),_t(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Rt in n&&!n[Rt]){var o=St(e,t);o&&o[Rt]&&(e[t]=n.value,n={configurable:xt in n?n[xt]:o[xt],enumerable:Et in n?n[Et]:o[Et],writable:!1})}return kt(e,t,n)}:kt:function(e,t,n){if(_t(e),t=wt(t),_t(n),bt)try{return kt(e,t,n)}catch(o){}if("get"in n||"set"in n)throw Tt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Dt=Math.ceil,Ot=Math.floor,Lt=Math.trunc||function(e){var t=+e;return(t>0?Ot:Dt)(t)},Nt=Lt,At=function(e){var t=+e;return t!=t||0===t?0:Nt(t)},Ut=At,It=Math.max,Bt=Math.min,Ct=function(e,t){var n=Ut(e);return n<0?It(n+t,0):Bt(n,t)},Pt=At,Mt=Math.min,jt=function(e){return e>0?Mt(Pt(e),9007199254740991):0},zt=jt,qt=function(e){return zt(e.length)},Vt=k,Ht=Ct,Gt=qt,Ft=function(e){return function(t,n,o){var r,i=Vt(t),a=Gt(i),c=Ht(o,a);if(e&&n!=n){for(;a>c;)if((r=i[c++])!=r)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},Kt={includes:Ft(!0),indexOf:Ft(!1)},Wt={},$t=V,Yt=k,Xt=Kt.indexOf,Jt=Wt,Qt=c([].push),Zt=function(e,t){var n,o=Yt(e),r=0,i=[];for(n in o)!$t(Jt,n)&&$t(o,n)&&Qt(i,n);for(;t.length>r;)$t(o,n=t[r++])&&(~Xt(i,n)||Qt(i,n));return i},en=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tn=Zt,nn=en,on=Object.keys||function(e){return tn(e,nn)},rn=Re,an=De,cn=Oe,sn=Ee,ln=k,un=on;xe.f=rn&&!an?Object.defineProperties:function(e,t){sn(e);for(var n,o=ln(t),r=un(t),i=r.length,a=0;i>a;)cn.f(e,n=r[a++],o[n]);return e};var dn,hn=qe("document","documentElement"),pn=W,fn=x("keys"),mn=function(e){return fn[e]||(fn[e]=pn(e))},vn=Ee,gn=xe,bn=en,yn=Wt,_n=hn,wn=Ue,Tn="prototype",kn="script",Sn=mn("IE_PROTO"),En=function(){},xn=function(e){return"<"+kn+">"+e+"</"+kn+">"},Rn=function(e){e.write(xn("")),e.close();var t=e.parentWindow.Object;return e=null,t},Dn=function(){try{dn=new ActiveXObject("htmlfile")}catch(r){}var e,t,n;Dn="undefined"!=typeof document?document.domain&&dn?Rn(dn):(t=wn("iframe"),n="java"+kn+":",t.style.display="none",_n.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(xn("document.F=Object")),e.close(),e.F):Rn(dn);for(var o=bn.length;o--;)delete Dn[Tn][bn[o]];return Dn()};yn[Sn]=!0;var On=Object.create||function(e,t){var n;return null!==e?(En[Tn]=vn(e),n=new En,En[Tn]=null,n[Sn]=e):n=Dn(),void 0===t?n:gn.f(n,t)},Ln=fe,Nn=On,An=Oe.f,Un=Ln("unscopables"),In=Array.prototype;null==In[Un]&&An(In,Un,{configurable:!0,value:Nn(null)});var Bn,Cn,Pn,Mn=function(e){In[Un][e]=!0},jn={},zn=be,qn=E.WeakMap,Vn=zn(qn)&&/native code/.test(String(qn)),Hn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Gn=Oe,Fn=Hn,Kn=Re?function(e,t,n){return Gn.f(e,t,Fn(1,n))}:function(e,t,n){return e[t]=n,e},Wn=Vn,$n=E,Yn=we,Xn=Kn,Jn=V,Qn=U,Zn=mn,eo=Wt,to="Object already initialized",no=$n.TypeError,oo=$n.WeakMap;if(Wn||Qn.state){var ro=Qn.state||(Qn.state=new oo);ro.get=ro.get,ro.has=ro.has,ro.set=ro.set,Bn=function(e,t){if(ro.has(e))throw no(to);return t.facade=e,ro.set(e,t),t},Cn=function(e){return ro.get(e)||{}},Pn=function(e){return ro.has(e)}}else{var io=Zn("state");eo[io]=!0,Bn=function(e,t){if(Jn(e,io))throw no(to);return t.facade=e,Xn(e,io,t),t},Cn=function(e){return Jn(e,io)?e[io]:{}},Pn=function(e){return Jn(e,io)}}var ao={set:Bn,get:Cn,has:Pn,enforce:function(e){return Pn(e)?Cn(e):Bn(e,{})},getterFor:function(e){return function(t){var n;if(!Yn(t)||(n=Cn(t)).type!==e)throw no("Incompatible receiver, "+e+" required");return n}}},co={},so={},lo={}.propertyIsEnumerable,uo=Object.getOwnPropertyDescriptor,ho=uo&&!lo.call({1:2},1);so.f=ho?function(e){var t=uo(this,e);return!!t&&t.enumerable}:lo;var po=Re,fo=Me,mo=so,vo=Hn,go=k,bo=vt,yo=V,_o=Be,wo=Object.getOwnPropertyDescriptor;co.f=po?wo:function(e,t){if(e=go(e),t=bo(t),_o)try{return wo(e,t)}catch(n){}if(yo(e,t))return vo(!fo(mo.f,e,t),e[t])};var To={},ko={get exports(){return To},set exports(e){To=e}},So=Re,Eo=V,xo=Function.prototype,Ro=So&&Object.getOwnPropertyDescriptor,Do=Eo(xo,"name"),Oo={EXISTS:Do,PROPER:Do&&"something"===function(){}.name,CONFIGURABLE:Do&&(!So||So&&Ro(xo,"name").configurable)},Lo=be,No=U,Ao=c(Function.toString);Lo(No.inspectSource)||(No.inspectSource=function(e){return Ao(e)});var Uo=No.inspectSource,Io=c,Bo=t,Co=be,Po=V,Mo=Re,jo=Oo.CONFIGURABLE,zo=Uo,qo=ao.enforce,Vo=ao.get,Ho=String,Go=Object.defineProperty,Fo=Io("".slice),Ko=Io("".replace),Wo=Io([].join),$o=Mo&&!Bo((function(){return 8!==Go((function(){}),"length",{value:8}).length})),Yo=String(String).split("String"),Xo=ko.exports=function(e,t,n){"Symbol("===Fo(Ho(t),0,7)&&(t="["+Ko(Ho(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Po(e,"name")||jo&&e.name!==t)&&(Mo?Go(e,"name",{value:t,configurable:!0}):e.name=t),$o&&n&&Po(n,"arity")&&e.length!==n.arity&&Go(e,"length",{value:n.arity});try{n&&Po(n,"constructor")&&n.constructor?Mo&&Go(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(r){}var o=qo(e);return Po(o,"source")||(o.source=Wo(Yo,"string"==typeof t?t:"")),e};Function.prototype.toString=Xo((function(){return Co(this)&&Vo(this).source||zo(this)}),"toString");var Jo=be,Qo=Oe,Zo=To,er=L,tr=function(e,t,n,o){o||(o={});var r=o.enumerable,i=void 0!==o.name?o.name:t;if(Jo(n)&&Zo(n,i,o),o.global)r?e[t]=n:er(t,n);else{try{o.unsafe?e[t]&&(r=!0):delete e[t]}catch(a){}r?e[t]=n:Qo.f(e,t,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},nr={},or=Zt,rr=en.concat("length","prototype");nr.f=Object.getOwnPropertyNames||function(e){return or(e,rr)};var ir={};ir.f=Object.getOwnPropertySymbols;var ar,cr,sr,lr=qe,ur=nr,dr=ir,hr=Ee,pr=c([].concat),fr=lr("Reflect","ownKeys")||function(e){var t=ur.f(hr(e)),n=dr.f;return n?pr(t,n(e)):t},mr=V,vr=fr,gr=co,br=Oe,yr=t,_r=be,wr=/#|\.prototype\./,Tr=function(e,t){var n=Sr[kr(e)];return n==xr||n!=Er&&(_r(t)?yr(t):!!t)},kr=Tr.normalize=function(e){return String(e).replace(wr,".").toLowerCase()},Sr=Tr.data={},Er=Tr.NATIVE="N",xr=Tr.POLYFILL="P",Rr=Tr,Dr=E,Or=co.f,Lr=Kn,Nr=tr,Ar=L,Ur=function(e,t,n){for(var o=vr(t),r=br.f,i=gr.f,a=0;a<o.length;a++){var c=o[a];mr(e,c)||n&&mr(n,c)||r(e,c,i(t,c))}},Ir=Rr,Br=function(e,t){var n,o,r,i,a,c=e.target,s=e.global,l=e.stat;if(n=s?Dr:l?Dr[c]||Ar(c,{}):(Dr[c]||{}).prototype)for(o in t){if(i=t[o],r=e.dontCallGetSet?(a=Or(n,o))&&a.value:n[o],!Ir(s?o:c+(l?".":"#")+o,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;Ur(i,r)}(e.sham||r&&r.sham)&&Lr(i,"sham",!0),Nr(n,o,i,e)}},Cr=!t((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Pr=V,Mr=be,jr=j,zr=Cr,qr=mn("IE_PROTO"),Vr=Object,Hr=Vr.prototype,Gr=zr?Vr.getPrototypeOf:function(e){var t=jr(e);if(Pr(t,qr))return t[qr];var n=t.constructor;return Mr(n)&&t instanceof n?n.prototype:t instanceof Vr?Hr:null},Fr=t,Kr=be,Wr=we,$r=Gr,Yr=tr,Xr=fe("iterator"),Jr=!1;[].keys&&("next"in(sr=[].keys())?(cr=$r($r(sr)))!==Object.prototype&&(ar=cr):Jr=!0);var Qr=!Wr(ar)||Fr((function(){var e={};return ar[Xr].call(e)!==e}));Qr&&(ar={}),Kr(ar[Xr])||Yr(ar,Xr,(function(){return this}));var Zr={IteratorPrototype:ar,BUGGY_SAFARI_ITERATORS:Jr},ei=Oe.f,ti=V,ni=fe("toStringTag"),oi=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ti(e,ni)&&ei(e,ni,{configurable:!0,value:t})},ri=Zr.IteratorPrototype,ii=On,ai=Hn,ci=oi,si=jn,li=function(){return this},ui=function(e,t,n,o){var r=t+" Iterator";return e.prototype=ii(ri,{next:ai(+!o,n)}),ci(e,r,!1),si[r]=li,e},di=c,hi=Ze,pi=be,fi=String,mi=TypeError,vi=function(e,t,n){try{return di(hi(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(o){}},gi=Ee,bi=function(e){if("object"==typeof e||pi(e))return e;throw mi("Can't set "+fi(e)+" as a prototype")},yi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=vi(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(o){}return function(n,o){return gi(n),bi(o),t?e(n,o):n.__proto__=o,n}}():void 0),_i=Br,wi=Me,Ti=be,ki=ui,Si=Gr,Ei=yi,xi=oi,Ri=Kn,Di=tr,Oi=jn,Li=Oo.PROPER,Ni=Oo.CONFIGURABLE,Ai=Zr.IteratorPrototype,Ui=Zr.BUGGY_SAFARI_ITERATORS,Ii=fe("iterator"),Bi="keys",Ci="values",Pi="entries",Mi=function(){return this},ji=function(e,t,n,o,r,i,a){ki(n,t,o);var c,s,l,u=function(e){if(e===r&&m)return m;if(!Ui&&e in p)return p[e];switch(e){case Bi:case Ci:case Pi:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",h=!1,p=e.prototype,f=p[Ii]||p["@@iterator"]||r&&p[r],m=!Ui&&f||u(r),v="Array"==t&&p.entries||f;if(v&&(c=Si(v.call(new e)))!==Object.prototype&&c.next&&(Si(c)!==Ai&&(Ei?Ei(c,Ai):Ti(c[Ii])||Di(c,Ii,Mi)),xi(c,d,!0)),Li&&r==Ci&&f&&f.name!==Ci&&(Ni?Ri(p,"name",Ci):(h=!0,m=function(){return wi(f,this)})),r)if(s={values:u(Ci),keys:i?m:u(Bi),entries:u(Pi)},a)for(l in s)(Ui||h||!(l in p))&&Di(p,l,s[l]);else _i({target:t,proto:!0,forced:Ui||h},s);return p[Ii]!==m&&Di(p,Ii,m,{name:r}),Oi[t]=m,s},zi=function(e,t){return{value:e,done:t}},qi=k,Vi=Mn,Hi=jn,Gi=ao,Fi=Oe.f,Ki=ji,Wi=zi,$i=Re,Yi="Array Iterator",Xi=Gi.set,Ji=Gi.getterFor(Yi),Qi=Ki(Array,"Array",(function(e,t){Xi(this,{type:Yi,target:qi(e),index:0,kind:t})}),(function(){var e=Ji(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,Wi(void 0,!0)):Wi("keys"==n?o:"values"==n?t[o]:[o,t[o]],!1)}),"values"),Zi=Hi.Arguments=Hi.Array;if(Vi("keys"),Vi("values"),Vi("entries"),$i&&"values"!==Zi.name)try{Fi(Zi,"name",{value:"values"})}catch(Xy){}var ea={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ta=Ue("span").classList,na=ta&&ta.constructor&&ta.constructor.prototype,oa=na===Object.prototype?void 0:na,ra=E,ia=ea,aa=oa,ca=Qi,sa=Kn,la=fe,ua=la("iterator"),da=la("toStringTag"),ha=ca.values,pa=function(e,t){if(e){if(e[ua]!==ha)try{sa(e,ua,ha)}catch(Xy){e[ua]=ha}if(e[da]||sa(e,da,t),ia[t])for(var n in ca)if(e[n]!==ca[n])try{sa(e,n,ca[n])}catch(Xy){e[n]=ca[n]}}};for(var fa in ia)pa(ra[fa]&&ra[fa].prototype,fa);pa(aa,"DOMTokenList");var ma={};ma[fe("toStringTag")]="z";var va="[object z]"===String(ma),ga=be,ba=d,ya=fe("toStringTag"),_a=Object,wa="Arguments"==ba(function(){return arguments}()),Ta=va?ba:function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(Xy){}}(t=_a(e),ya))?n:wa?ba(t):"Object"==(o=ba(t))&&ga(t.callee)?"Arguments":o},ka=Ta,Sa=String,Ea=function(e){if("Symbol"===ka(e))throw TypeError("Cannot convert a Symbol value to a string");return Sa(e)},xa=Ee,Ra=function(){var e=xa(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Da=t,Oa=E.RegExp,La=Da((function(){var e=Oa("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Na=La||Da((function(){return!Oa("a","y").sticky})),Aa=La||Da((function(){var e=Oa("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),Ua={BROKEN_CARET:Aa,MISSED_STICKY:Na,UNSUPPORTED_Y:La},Ia=t,Ba=E.RegExp,Ca=Ia((function(){var e=Ba(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Pa=t,Ma=E.RegExp,ja=Pa((function(){var e=Ma("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),za=Me,qa=c,Va=Ea,Ha=Ra,Ga=Ua,Fa=On,Ka=ao.get,Wa=Ca,$a=ja,Ya=x("native-string-replace",String.prototype.replace),Xa=RegExp.prototype.exec,Ja=Xa,Qa=qa("".charAt),Za=qa("".indexOf),ec=qa("".replace),tc=qa("".slice),nc=function(){var e=/a/,t=/b*/g;return za(Xa,e,"a"),za(Xa,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),oc=Ga.BROKEN_CARET,rc=void 0!==/()??/.exec("")[1];(nc||rc||oc||Wa||$a)&&(Ja=function(e){var t,n,o,r,i,a,c,s=this,l=Ka(s),u=Va(e),d=l.raw;if(d)return d.lastIndex=s.lastIndex,t=za(Ja,d,u),s.lastIndex=d.lastIndex,t;var h=l.groups,p=oc&&s.sticky,f=za(Ha,s),m=s.source,v=0,g=u;if(p&&(f=ec(f,"y",""),-1===Za(f,"g")&&(f+="g"),g=tc(u,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==Qa(u,s.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),rc&&(n=new RegExp("^"+m+"$(?!\\s)",f)),nc&&(o=s.lastIndex),r=za(Xa,p?n:s,g),p?r?(r.input=tc(r.input,v),r[0]=tc(r[0],v),r.index=s.lastIndex,s.lastIndex+=r[0].length):s.lastIndex=0:nc&&r&&(s.lastIndex=s.global?r.index+r[0].length:o),rc&&r&&r.length>1&&za(Ya,r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r&&h)for(r.groups=a=Fa(null),i=0;i<h.length;i++)a[(c=h[i])[0]]=r[c[1]];return r});var ic=Ja;Br({target:"RegExp",proto:!0,forced:/./.exec!==ic},{exec:ic});var ac=n,cc=Function.prototype,sc=cc.apply,lc=cc.call,uc="object"==typeof Reflect&&Reflect.apply||(ac?lc.bind(sc):function(){return lc.apply(sc,arguments)}),dc=d,hc=c,pc=function(e){if("Function"===dc(e))return hc(e)},fc=pc,mc=tr,vc=ic,gc=t,bc=fe,yc=Kn,_c=bc("species"),wc=RegExp.prototype,Tc=c,kc=At,Sc=Ea,Ec=_,xc=Tc("".charAt),Rc=Tc("".charCodeAt),Dc=Tc("".slice),Oc=function(e){return function(t,n){var o,r,i=Sc(Ec(t)),a=kc(n),c=i.length;return a<0||a>=c?e?"":void 0:(o=Rc(i,a))<55296||o>56319||a+1===c||(r=Rc(i,a+1))<56320||r>57343?e?xc(i,a):o:e?Dc(i,a,a+2):r-56320+(o-55296<<10)+65536}},Lc={codeAt:Oc(!1),charAt:Oc(!0)},Nc=Lc.charAt,Ac=c,Uc=j,Ic=Math.floor,Bc=Ac("".charAt),Cc=Ac("".replace),Pc=Ac("".slice),Mc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,jc=/\$([$&'`]|\d{1,2})/g,zc=Me,qc=Ee,Vc=be,Hc=d,Gc=ic,Fc=TypeError,Kc=uc,Wc=Me,$c=c,Yc=function(e,t,n,o){var r=bc(e),i=!gc((function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})),a=i&&!gc((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[_c]=function(){return n},n.flags="",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](""),!t}));if(!i||!a||n){var c=fc(/./[r]),s=t(r,""[e],(function(e,t,n,o,r){var a=fc(e),s=t.exec;return s===vc||s===wc.exec?i&&!r?{done:!0,value:c(t,n,o)}:{done:!0,value:a(n,t,o)}:{done:!1}}));mc(String.prototype,e,s[0]),mc(wc,r,s[1])}o&&yc(wc[r],"sham",!0)},Xc=t,Jc=Ee,Qc=be,Zc=g,es=At,ts=jt,ns=Ea,os=_,rs=function(e,t,n){return t+(n?Nc(e,t).length:1)},is=nt,as=function(e,t,n,o,r,i){var a=n+e.length,c=o.length,s=jc;return void 0!==r&&(r=Uc(r),s=Mc),Cc(i,s,(function(i,s){var l;switch(Bc(s,0)){case"$":return"$";case"&":return e;case"`":return Pc(t,0,n);case"'":return Pc(t,a);case"<":l=r[Pc(s,1,-1)];break;default:var u=+s;if(0===u)return i;if(u>c){var d=Ic(u/10);return 0===d?i:d<=c?void 0===o[d-1]?Bc(s,1):o[d-1]+Bc(s,1):i}l=o[u-1]}return void 0===l?"":l}))},cs=function(e,t){var n=e.exec;if(Vc(n)){var o=zc(n,e,t);return null!==o&&qc(o),o}if("RegExp"===Hc(e))return zc(Gc,e,t);throw Fc("RegExp#exec called on incompatible receiver")},ss=fe("replace"),ls=Math.max,us=Math.min,ds=$c([].concat),hs=$c([].push),ps=$c("".indexOf),fs=$c("".slice),ms="$0"==="a".replace(/./,"$0"),vs=!!/./[ss]&&""===/./[ss]("a","$0"),gs=!Xc((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));Yc("replace",(function(e,t,n){var o=vs?"$":"$0";return[function(e,n){var o=os(this),r=Zc(e)?void 0:is(e,ss);return r?Wc(r,e,o,n):Wc(t,ns(o),e,n)},function(e,r){var i=Jc(this),a=ns(e);if("string"==typeof r&&-1===ps(r,o)&&-1===ps(r,"$<")){var c=n(t,i,a,r);if(c.done)return c.value}var s=Qc(r);s||(r=ns(r));var l=i.global;if(l){var u=i.unicode;i.lastIndex=0}for(var d=[];;){var h=cs(i,a);if(null===h)break;if(hs(d,h),!l)break;""===ns(h[0])&&(i.lastIndex=rs(a,ts(i.lastIndex),u))}for(var p,f="",m=0,v=0;v<d.length;v++){for(var g=ns((h=d[v])[0]),b=ls(us(es(h.index),a.length),0),y=[],_=1;_<h.length;_++)hs(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(s){var T=ds([g],y,b,a);void 0!==w&&hs(T,w);var k=ns(Kc(r,void 0,T))}else k=as(g,a,b,y,w,r);b>=m&&(f+=fs(a,m,b)+k,m=b+g.length)}return f+fs(a,m)}]}),!gs||!ms||vs);var bs=Kt.includes,ys=Mn;Br({target:"Array",proto:!0,forced:t((function(){return!Array(1).includes()}))},{includes:function(e){return bs(this,e,arguments.length>1?arguments[1]:void 0)}}),ys("includes");var _s=Ze,ws=n,Ts=pc(pc.bind),ks=function(e,t){return _s(e),void 0===t?e:ws?Ts(e,t):function(){return e.apply(t,arguments)}},Ss=d,Es=Array.isArray||function(e){return"Array"==Ss(e)},xs=c,Rs=t,Ds=be,Os=Ta,Ls=Uo,Ns=function(){},As=[],Us=qe("Reflect","construct"),Is=/^\s*(?:class|function)\b/,Bs=xs(Is.exec),Cs=!Is.exec(Ns),Ps=function(e){if(!Ds(e))return!1;try{return Us(Ns,As,e),!0}catch(Xy){return!1}},Ms=function(e){if(!Ds(e))return!1;switch(Os(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cs||!!Bs(Is,Ls(e))}catch(Xy){return!0}};Ms.sham=!0;var js=!Us||Rs((function(){var e;return Ps(Ps.call)||!Ps(Object)||!Ps((function(){e=!0}))||e}))?Ms:Ps,zs=Es,qs=js,Vs=we,Hs=fe("species"),Gs=Array,Fs=function(e){var t;return zs(e)&&(t=e.constructor,(qs(t)&&(t===Gs||zs(t.prototype))||Vs(t)&&null===(t=t[Hs]))&&(t=void 0)),void 0===t?Gs:t},Ks=ks,Ws=v,$s=j,Ys=qt,Xs=function(e,t){return new(Fs(e))(0===t?0:t)},Js=c([].push),Qs=function(e){var t=1==e,n=2==e,o=3==e,r=4==e,i=6==e,a=7==e,c=5==e||i;return function(s,l,u,d){for(var h,p,f=$s(s),m=Ws(f),v=Ks(l,u),g=Ys(m),b=0,y=d||Xs,_=t?y(s,g):n||a?y(s,0):void 0;g>b;b++)if((c||b in m)&&(p=v(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Js(_,h)}else switch(e){case 4:return!1;case 7:Js(_,h)}return i?-1:o||r?r:_}},Zs={forEach:Qs(0),map:Qs(1),filter:Qs(2),some:Qs(3),every:Qs(4),find:Qs(5),findIndex:Qs(6),filterReject:Qs(7)},el=t,tl=function(e,t){var n=[][e];return!!n&&el((function(){n.call(null,t||function(){return 1},1)}))},nl=Zs.forEach,ol=tl("forEach")?[].forEach:function(e){return nl(this,e,arguments.length>1?arguments[1]:void 0)},rl=E,il=ea,al=oa,cl=ol,sl=Kn,ll=function(e){if(e&&e.forEach!==cl)try{sl(e,"forEach",cl)}catch(Xy){e.forEach=cl}};for(var ul in il)il[ul]&&ll(rl[ul]&&rl[ul].prototype);ll(al);var dl=Ze,hl=j,pl=v,fl=qt,ml=TypeError,vl=function(e){return function(t,n,o,r){dl(n);var i=hl(t),a=pl(i),c=fl(i),s=e?c-1:0,l=e?-1:1;if(o<2)for(;;){if(s in a){r=a[s],s+=l;break}if(s+=l,e?s<0:c<=s)throw ml("Reduce of empty array with no initial value")}for(;e?s>=0:c>s;s+=l)s in a&&(r=n(r,a[s],s,i));return r}},gl={left:vl(!1),right:vl(!0)},bl="undefined"!=typeof process&&"process"==d(process),yl=gl.left;Br({target:"Array",proto:!0,forced:!bl&&te>79&&te<83||!tl("reduce")},{reduce:function(e){var t=arguments.length;return yl(this,e,t,t>1?arguments[1]:void 0)}});var _l=Lc.charAt,wl=Ea,Tl=ao,kl=ji,Sl=zi,El="String Iterator",xl=Tl.set,Rl=Tl.getterFor(El);kl(String,"String",(function(e){xl(this,{type:El,string:wl(e),index:0})}),(function(){var e,t=Rl(this),n=t.string,o=t.index;return o>=n.length?Sl(void 0,!0):(e=_l(n,o),t.index+=e.length,Sl(e,!1))}));var Dl=t,Ol=Re,Ll=fe("iterator"),Nl=!Dl((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,o){t.delete("b"),n+=o+e})),!t.size&&!Ol||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ll]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),Al=To,Ul=Oe,Il=function(e,t,n){return n.get&&Al(n.get,t,{getter:!0}),n.set&&Al(n.set,t,{setter:!0}),Ul.f(e,t,n)},Bl=Ve,Cl=TypeError,Pl=function(e,t){if(Bl(t,e))return e;throw Cl("Incorrect invocation")},Ml=Re,jl=c,zl=Me,ql=t,Vl=on,Hl=ir,Gl=so,Fl=j,Kl=v,Wl=Object.assign,$l=Object.defineProperty,Yl=jl([].concat),Xl=!Wl||ql((function(){if(Ml&&1!==Wl({b:1},Wl($l({},"a",{enumerable:!0,get:function(){$l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=Wl({},e)[n]||Vl(Wl({},t)).join("")!=o}))?function(e,t){for(var n=Fl(e),o=arguments.length,r=1,i=Hl.f,a=Gl.f;o>r;)for(var c,s=Kl(arguments[r++]),l=i?Yl(Vl(s),i(s)):Vl(s),u=l.length,d=0;u>d;)c=l[d++],Ml&&!zl(a,s,c)||(n[c]=s[c]);return n}:Wl,Jl=Me,Ql=Ee,Zl=nt,eu=function(e,t,n){var o,r;Ql(e);try{if(!(o=Zl(e,"return"))){if("throw"===t)throw n;return n}o=Jl(o,e)}catch(Xy){r=!0,o=Xy}if("throw"===t)throw n;if(r)throw o;return Ql(o),n},tu=Ee,nu=eu,ou=jn,ru=fe("iterator"),iu=Array.prototype,au=function(e){return void 0!==e&&(ou.Array===e||iu[ru]===e)},cu=vt,su=Oe,lu=Hn,uu=function(e,t,n){var o=cu(t);o in e?su.f(e,o,lu(0,n)):e[o]=n},du=Ta,hu=nt,pu=g,fu=jn,mu=fe("iterator"),vu=function(e){if(!pu(e))return hu(e,mu)||hu(e,"@@iterator")||fu[du(e)]},gu=Me,bu=Ze,yu=Ee,_u=Ye,wu=vu,Tu=TypeError,ku=function(e,t){var n=arguments.length<2?wu(e):t;if(bu(n))return yu(gu(n,e));throw Tu(_u(e)+" is not iterable")},Su=ks,Eu=Me,xu=j,Ru=function(e,t,n,o){try{return o?t(tu(n)[0],n[1]):t(n)}catch(Xy){nu(e,"throw",Xy)}},Du=au,Ou=js,Lu=qt,Nu=uu,Au=ku,Uu=vu,Iu=Array,Bu=Ct,Cu=qt,Pu=uu,Mu=Array,ju=Math.max,zu=function(e,t,n){for(var o=Cu(e),r=Bu(t,o),i=Bu(void 0===n?o:n,o),a=Mu(ju(i-r,0)),c=0;r<i;r++,c++)Pu(a,c,e[r]);return a.length=c,a},qu=c,Vu=2147483647,Hu=/[^\0-\u007E]/,Gu=/[.\u3002\uFF0E\uFF61]/g,Fu="Overflow: input needs wider integers to process",Ku=RangeError,Wu=qu(Gu.exec),$u=Math.floor,Yu=String.fromCharCode,Xu=qu("".charCodeAt),Ju=qu([].join),Qu=qu([].push),Zu=qu("".replace),ed=qu("".split),td=qu("".toLowerCase),nd=function(e){return e+22+75*(e<26)},od=function(e,t,n){var o=0;for(e=n?$u(e/700):e>>1,e+=$u(e/t);e>455;)e=$u(e/35),o+=36;return $u(o+36*e/(e+38))},rd=function(e){var t=[];e=function(e){for(var t=[],n=0,o=e.length;n<o;){var r=Xu(e,n++);if(r>=55296&&r<=56319&&n<o){var i=Xu(e,n++);56320==(64512&i)?Qu(t,((1023&r)<<10)+(1023&i)+65536):(Qu(t,r),n--)}else Qu(t,r)}return t}(e);var n,o,r=e.length,i=128,a=0,c=72;for(n=0;n<e.length;n++)(o=e[n])<128&&Qu(t,Yu(o));var s=t.length,l=s;for(s&&Qu(t,"-");l<r;){var u=Vu;for(n=0;n<e.length;n++)(o=e[n])>=i&&o<u&&(u=o);var d=l+1;if(u-i>$u((Vu-a)/d))throw Ku(Fu);for(a+=(u-i)*d,i=u,n=0;n<e.length;n++){if((o=e[n])<i&&++a>Vu)throw Ku(Fu);if(o==i){for(var h=a,p=36;;){var f=p<=c?1:p>=c+26?26:p-c;if(h<f)break;var m=h-f,v=36-f;Qu(t,Yu(nd(f+m%v))),h=$u(m/v),p+=36}Qu(t,Yu(nd(h))),c=od(a,d,l==s),a=0,l++}}a++,i++}return Ju(t,"")},id=TypeError,ad=function(e,t){if(e<t)throw id("Not enough arguments");return e},cd=tr,sd=zu,ld=Math.floor,ud=function(e,t){var n=e.length,o=ld(n/2);return n<8?dd(e,t):hd(e,ud(sd(e,0,o),t),ud(sd(e,o),t),t)},dd=function(e,t){for(var n,o,r=e.length,i=1;i<r;){for(o=i,n=e[i];o&&t(e[o-1],n)>0;)e[o]=e[--o];o!==i++&&(e[o]=n)}return e},hd=function(e,t,n,o){for(var r=t.length,i=n.length,a=0,c=0;a<r||c<i;)e[a+c]=a<r&&c<i?o(t[a],n[c])<=0?t[a++]:n[c++]:a<r?t[a++]:n[c++];return e},pd=Br,fd=E,md=Me,vd=c,gd=Re,bd=Nl,yd=tr,_d=Il,wd=function(e,t,n){for(var o in t)cd(e,o,t[o],n);return e},Td=oi,kd=ui,Sd=ao,Ed=Pl,xd=be,Rd=V,Dd=ks,Od=Ta,Ld=Ee,Nd=we,Ad=Ea,Ud=On,Id=Hn,Bd=ku,Cd=vu,Pd=ad,Md=ud,jd=fe("iterator"),zd="URLSearchParams",qd=zd+"Iterator",Vd=Sd.set,Hd=Sd.getterFor(zd),Gd=Sd.getterFor(qd),Fd=Object.getOwnPropertyDescriptor,Kd=function(e){if(!gd)return fd[e];var t=Fd(fd,e);return t&&t.value},Wd=Kd("fetch"),$d=Kd("Request"),Yd=Kd("Headers"),Xd=$d&&$d.prototype,Jd=Yd&&Yd.prototype,Qd=fd.RegExp,Zd=fd.TypeError,eh=fd.decodeURIComponent,th=fd.encodeURIComponent,nh=vd("".charAt),oh=vd([].join),rh=vd([].push),ih=vd("".replace),ah=vd([].shift),ch=vd([].splice),sh=vd("".split),lh=vd("".slice),uh=/\+/g,dh=Array(4),hh=function(e){return dh[e-1]||(dh[e-1]=Qd("((?:%[\\da-f]{2}){"+e+"})","gi"))},ph=function(e){try{return eh(e)}catch(Xy){return e}},fh=function(e){var t=ih(e,uh," "),n=4;try{return eh(t)}catch(Xy){for(;n;)t=ih(t,hh(n--),ph);return t}},mh=/[!'()~]|%20/g,vh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},gh=function(e){return vh[e]},bh=function(e){return ih(th(e),mh,gh)},yh=kd((function(e,t){Vd(this,{type:qd,iterator:Bd(Hd(e).entries),kind:t})}),"Iterator",(function(){var e=Gd(this),t=e.kind,n=e.iterator.next(),o=n.value;return n.done||(n.value="keys"===t?o.key:"values"===t?o.value:[o.key,o.value]),n}),!0),_h=function(e){this.entries=[],this.url=null,void 0!==e&&(Nd(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===nh(e,0)?lh(e,1):e:Ad(e)))};_h.prototype={type:zd,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,o,r,i,a,c,s=Cd(e);if(s)for(n=(t=Bd(e,s)).next;!(o=md(n,t)).done;){if(i=(r=Bd(Ld(o.value))).next,(a=md(i,r)).done||(c=md(i,r)).done||!md(i,r).done)throw Zd("Expected sequence with length 2");rh(this.entries,{key:Ad(a.value),value:Ad(c.value)})}else for(var l in e)Rd(e,l)&&rh(this.entries,{key:l,value:Ad(e[l])})},parseQuery:function(e){if(e)for(var t,n,o=sh(e,"&"),r=0;r<o.length;)(t=o[r++]).length&&(n=sh(t,"="),rh(this.entries,{key:fh(ah(n)),value:fh(oh(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],o=0;o<t.length;)e=t[o++],rh(n,bh(e.key)+"="+bh(e.value));return oh(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var wh=function(){Ed(this,Th);var e=Vd(this,new _h(arguments.length>0?arguments[0]:void 0));gd||(this.length=e.entries.length)},Th=wh.prototype;if(wd(Th,{append:function(e,t){Pd(arguments.length,2);var n=Hd(this);rh(n.entries,{key:Ad(e),value:Ad(t)}),gd||this.length++,n.updateURL()},delete:function(e){Pd(arguments.length,1);for(var t=Hd(this),n=t.entries,o=Ad(e),r=0;r<n.length;)n[r].key===o?ch(n,r,1):r++;gd||(this.length=n.length),t.updateURL()},get:function(e){Pd(arguments.length,1);for(var t=Hd(this).entries,n=Ad(e),o=0;o<t.length;o++)if(t[o].key===n)return t[o].value;return null},getAll:function(e){Pd(arguments.length,1);for(var t=Hd(this).entries,n=Ad(e),o=[],r=0;r<t.length;r++)t[r].key===n&&rh(o,t[r].value);return o},has:function(e){Pd(arguments.length,1);for(var t=Hd(this).entries,n=Ad(e),o=0;o<t.length;)if(t[o++].key===n)return!0;return!1},set:function(e,t){Pd(arguments.length,1);for(var n,o=Hd(this),r=o.entries,i=!1,a=Ad(e),c=Ad(t),s=0;s<r.length;s++)(n=r[s]).key===a&&(i?ch(r,s--,1):(i=!0,n.value=c));i||rh(r,{key:a,value:c}),gd||(this.length=r.length),o.updateURL()},sort:function(){var e=Hd(this);Md(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Hd(this).entries,o=Dd(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)o((t=n[r++]).value,t.key,this)},keys:function(){return new yh(this,"keys")},values:function(){return new yh(this,"values")},entries:function(){return new yh(this,"entries")}},{enumerable:!0}),yd(Th,jd,Th.entries,{name:"entries"}),yd(Th,"toString",(function(){return Hd(this).serialize()}),{enumerable:!0}),gd&&_d(Th,"size",{get:function(){return Hd(this).entries.length},configurable:!0,enumerable:!0}),Td(wh,zd),pd({global:!0,constructor:!0,forced:!bd},{URLSearchParams:wh}),!bd&&xd(Yd)){var kh=vd(Jd.has),Sh=vd(Jd.set),Eh=function(e){if(Nd(e)){var t,n=e.body;if(Od(n)===zd)return t=e.headers?new Yd(e.headers):new Yd,kh(t,"content-type")||Sh(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ud(e,{body:Id(0,Ad(n)),headers:Id(0,t)})}return e};if(xd(Wd)&&pd({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Wd(e,arguments.length>1?Eh(arguments[1]):{})}}),xd($d)){var xh=function(e){return Ed(this,Xd),new $d(e,arguments.length>1?Eh(arguments[1]):{})};Xd.constructor=xh,xh.prototype=Xd,pd({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:xh})}}var Rh,Dh=Br,Oh=Re,Lh=Nl,Nh=E,Ah=ks,Uh=c,Ih=tr,Bh=Il,Ch=Pl,Ph=V,Mh=Xl,jh=function(e){var t=xu(e),n=Ou(this),o=arguments.length,r=o>1?arguments[1]:void 0,i=void 0!==r;i&&(r=Su(r,o>2?arguments[2]:void 0));var a,c,s,l,u,d,h=Uu(t),p=0;if(!h||this===Iu&&Du(h))for(a=Lu(t),c=n?new this(a):Iu(a);a>p;p++)d=i?r(t[p],p):t[p],Nu(c,p,d);else for(u=(l=Au(t,h)).next,c=n?new this:[];!(s=Eu(u,l)).done;p++)d=i?Ru(l,r,[s.value,p],!0):s.value,Nu(c,p,d);return c.length=p,c},zh=zu,qh=Lc.codeAt,Vh=function(e){var t,n,o=[],r=ed(Zu(td(e),Gu,"."),".");for(t=0;t<r.length;t++)n=r[t],Qu(o,Wu(Hu,n)?"xn--"+rd(n):n);return Ju(o,".")},Hh=Ea,Gh=oi,Fh=ad,Kh={URLSearchParams:wh,getState:Hd},Wh=ao,$h=Wh.set,Yh=Wh.getterFor("URL"),Xh=Kh.URLSearchParams,Jh=Kh.getState,Qh=Nh.URL,Zh=Nh.TypeError,ep=Nh.parseInt,tp=Math.floor,np=Math.pow,op=Uh("".charAt),rp=Uh(/./.exec),ip=Uh([].join),ap=Uh(1..toString),cp=Uh([].pop),sp=Uh([].push),lp=Uh("".replace),up=Uh([].shift),dp=Uh("".split),hp=Uh("".slice),pp=Uh("".toLowerCase),fp=Uh([].unshift),mp="Invalid scheme",vp="Invalid host",gp="Invalid port",bp=/[a-z]/i,yp=/[\d+-.a-z]/i,_p=/\d/,wp=/^0x/i,Tp=/^[0-7]+$/,kp=/^\d+$/,Sp=/^[\da-f]+$/i,Ep=/[\0\t\n\r #%/:<>?@[\\\]^|]/,xp=/[\0\t\n\r #/:<>?@[\\\]^|]/,Rp=/^[\u0000-\u0020]+/,Dp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Op=/[\t\n\r]/g,Lp=function(e){var t,n,o,r;if("number"==typeof e){for(t=[],n=0;n<4;n++)fp(t,e%256),e=tp(e/256);return ip(t,".")}if("object"==typeof e){for(t="",o=function(e){for(var t=null,n=1,o=null,r=0,i=0;i<8;i++)0!==e[i]?(r>n&&(t=o,n=r),o=null,r=0):(null===o&&(o=i),++r);return r>n&&(t=o,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),o===n?(t+=n?":":"::",r=!0):(t+=ap(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Np={},Ap=Mh({},Np,{" ":1,'"':1,"<":1,">":1,"`":1}),Up=Mh({},Ap,{"#":1,"?":1,"{":1,"}":1}),Ip=Mh({},Up,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Bp=function(e,t){var n=qh(e,0);return n>32&&n<127&&!Ph(t,e)?e:encodeURIComponent(e)},Cp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Pp=function(e,t){var n;return 2==e.length&&rp(bp,op(e,0))&&(":"==(n=op(e,1))||!t&&"|"==n)},Mp=function(e){var t;return e.length>1&&Pp(hp(e,0,2))&&(2==e.length||"/"===(t=op(e,2))||"\\"===t||"?"===t||"#"===t)},jp=function(e){return"."===e||"%2e"===pp(e)},zp={},qp={},Vp={},Hp={},Gp={},Fp={},Kp={},Wp={},$p={},Yp={},Xp={},Jp={},Qp={},Zp={},ef={},tf={},nf={},of={},rf={},af={},cf={},sf=function(e,t,n){var o,r,i,a=Hh(e);if(t){if(r=this.parse(a))throw Zh(r);this.searchParams=null}else{if(void 0!==n&&(o=new sf(n,!0)),r=this.parse(a,null,o))throw Zh(r);(i=Jh(new Xh)).bindURL(this),this.searchParams=i}};sf.prototype={type:"URL",parse:function(e,t,n){var o,r,i,a,c,s=this,l=t||zp,u=0,d="",h=!1,p=!1,f=!1;for(e=Hh(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=lp(e,Rp,""),e=lp(e,Dp,"$1")),e=lp(e,Op,""),o=jh(e);u<=o.length;){switch(r=o[u],l){case zp:if(!r||!rp(bp,r)){if(t)return mp;l=Vp;continue}d+=pp(r),l=qp;break;case qp:if(r&&(rp(yp,r)||"+"==r||"-"==r||"."==r))d+=pp(r);else{if(":"!=r){if(t)return mp;d="",l=Vp,u=0;continue}if(t&&(s.isSpecial()!=Ph(Cp,d)||"file"==d&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=d,t)return void(s.isSpecial()&&Cp[s.scheme]==s.port&&(s.port=null));d="","file"==s.scheme?l=Zp:s.isSpecial()&&n&&n.scheme==s.scheme?l=Hp:s.isSpecial()?l=Wp:"/"==o[u+1]?(l=Gp,u++):(s.cannotBeABaseURL=!0,sp(s.path,""),l=rf)}break;case Vp:if(!n||n.cannotBeABaseURL&&"#"!=r)return mp;if(n.cannotBeABaseURL&&"#"==r){s.scheme=n.scheme,s.path=zh(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,l=cf;break}l="file"==n.scheme?Zp:Fp;continue;case Hp:if("/"!=r||"/"!=o[u+1]){l=Fp;continue}l=$p,u++;break;case Gp:if("/"==r){l=Yp;break}l=of;continue;case Fp:if(s.scheme=n.scheme,r==Rh)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=zh(n.path),s.query=n.query;else if("/"==r||"\\"==r&&s.isSpecial())l=Kp;else if("?"==r)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=zh(n.path),s.query="",l=af;else{if("#"!=r){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=zh(n.path),s.path.length--,l=of;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=zh(n.path),s.query=n.query,s.fragment="",l=cf}break;case Kp:if(!s.isSpecial()||"/"!=r&&"\\"!=r){if("/"!=r){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,l=of;continue}l=Yp}else l=$p;break;case Wp:if(l=$p,"/"!=r||"/"!=op(d,u+1))continue;u++;break;case $p:if("/"!=r&&"\\"!=r){l=Yp;continue}break;case Yp:if("@"==r){h&&(d="%40"+d),h=!0,i=jh(d);for(var m=0;m<i.length;m++){var v=i[m];if(":"!=v||f){var g=Bp(v,Ip);f?s.password+=g:s.username+=g}else f=!0}d=""}else if(r==Rh||"/"==r||"?"==r||"#"==r||"\\"==r&&s.isSpecial()){if(h&&""==d)return"Invalid authority";u-=jh(d).length+1,d="",l=Xp}else d+=r;break;case Xp:case Jp:if(t&&"file"==s.scheme){l=tf;continue}if(":"!=r||p){if(r==Rh||"/"==r||"?"==r||"#"==r||"\\"==r&&s.isSpecial()){if(s.isSpecial()&&""==d)return vp;if(t&&""==d&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(d))return a;if(d="",l=nf,t)return;continue}"["==r?p=!0:"]"==r&&(p=!1),d+=r}else{if(""==d)return vp;if(a=s.parseHost(d))return a;if(d="",l=Qp,t==Jp)return}break;case Qp:if(!rp(_p,r)){if(r==Rh||"/"==r||"?"==r||"#"==r||"\\"==r&&s.isSpecial()||t){if(""!=d){var b=ep(d,10);if(b>65535)return gp;s.port=s.isSpecial()&&b===Cp[s.scheme]?null:b,d=""}if(t)return;l=nf;continue}return gp}d+=r;break;case Zp:if(s.scheme="file","/"==r||"\\"==r)l=ef;else{if(!n||"file"!=n.scheme){l=of;continue}if(r==Rh)s.host=n.host,s.path=zh(n.path),s.query=n.query;else if("?"==r)s.host=n.host,s.path=zh(n.path),s.query="",l=af;else{if("#"!=r){Mp(ip(zh(o,u),""))||(s.host=n.host,s.path=zh(n.path),s.shortenPath()),l=of;continue}s.host=n.host,s.path=zh(n.path),s.query=n.query,s.fragment="",l=cf}}break;case ef:if("/"==r||"\\"==r){l=tf;break}n&&"file"==n.scheme&&!Mp(ip(zh(o,u),""))&&(Pp(n.path[0],!0)?sp(s.path,n.path[0]):s.host=n.host),l=of;continue;case tf:if(r==Rh||"/"==r||"\\"==r||"?"==r||"#"==r){if(!t&&Pp(d))l=of;else if(""==d){if(s.host="",t)return;l=nf}else{if(a=s.parseHost(d))return a;if("localhost"==s.host&&(s.host=""),t)return;d="",l=nf}continue}d+=r;break;case nf:if(s.isSpecial()){if(l=of,"/"!=r&&"\\"!=r)continue}else if(t||"?"!=r)if(t||"#"!=r){if(r!=Rh&&(l=of,"/"!=r))continue}else s.fragment="",l=cf;else s.query="",l=af;break;case of:if(r==Rh||"/"==r||"\\"==r&&s.isSpecial()||!t&&("?"==r||"#"==r)){if(".."===(c=pp(c=d))||"%2e."===c||".%2e"===c||"%2e%2e"===c?(s.shortenPath(),"/"==r||"\\"==r&&s.isSpecial()||sp(s.path,"")):jp(d)?"/"==r||"\\"==r&&s.isSpecial()||sp(s.path,""):("file"==s.scheme&&!s.path.length&&Pp(d)&&(s.host&&(s.host=""),d=op(d,0)+":"),sp(s.path,d)),d="","file"==s.scheme&&(r==Rh||"?"==r||"#"==r))for(;s.path.length>1&&""===s.path[0];)up(s.path);"?"==r?(s.query="",l=af):"#"==r&&(s.fragment="",l=cf)}else d+=Bp(r,Up);break;case rf:"?"==r?(s.query="",l=af):"#"==r?(s.fragment="",l=cf):r!=Rh&&(s.path[0]+=Bp(r,Np));break;case af:t||"#"!=r?r!=Rh&&("'"==r&&s.isSpecial()?s.query+="%27":s.query+="#"==r?"%23":Bp(r,Np)):(s.fragment="",l=cf);break;case cf:r!=Rh&&(s.fragment+=Bp(r,Ap))}u++}},parseHost:function(e){var t,n,o;if("["==op(e,0)){if("]"!=op(e,e.length-1))return vp;if(t=function(e){var t,n,o,r,i,a,c,s=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,h=function(){return op(e,d)};if(":"==h()){if(":"!=op(e,1))return;d+=2,u=++l}for(;h();){if(8==l)return;if(":"!=h()){for(t=n=0;n<4&&rp(Sp,h());)t=16*t+ep(h(),16),d++,n++;if("."==h()){if(0==n)return;if(d-=n,l>6)return;for(o=0;h();){if(r=null,o>0){if(!("."==h()&&o<4))return;d++}if(!rp(_p,h()))return;for(;rp(_p,h());){if(i=ep(h(),10),null===r)r=i;else{if(0==r)return;r=10*r+i}if(r>255)return;d++}s[l]=256*s[l]+r,2!=++o&&4!=o||l++}if(4!=o)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;s[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(a=l-u,l=7;0!=l&&a>0;)c=s[l],s[l--]=s[u+a-1],s[u+--a]=c;else if(8!=l)return;return s}(hp(e,1,-1)),!t)return vp;this.host=t}else if(this.isSpecial()){if(e=Vh(e),rp(Ep,e))return vp;if(t=function(e){var t,n,o,r,i,a,c,s=dp(e,".");if(s.length&&""==s[s.length-1]&&s.length--,(t=s.length)>4)return e;for(n=[],o=0;o<t;o++){if(""==(r=s[o]))return e;if(i=10,r.length>1&&"0"==op(r,0)&&(i=rp(wp,r)?16:8,r=hp(r,8==i?1:2)),""===r)a=0;else{if(!rp(10==i?kp:8==i?Tp:Sp,r))return e;a=ep(r,i)}sp(n,a)}for(o=0;o<t;o++)if(a=n[o],o==t-1){if(a>=np(256,5-t))return null}else if(a>255)return null;for(c=cp(n),o=0;o<n.length;o++)c+=n[o]*np(256,3-o);return c}(e),null===t)return vp;this.host=t}else{if(rp(xp,e))return vp;for(t="",n=jh(e),o=0;o<n.length;o++)t+=Bp(n[o],Np);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Ph(Cp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Pp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,o=e.password,r=e.host,i=e.port,a=e.path,c=e.query,s=e.fragment,l=t+":";return null!==r?(l+="//",e.includesCredentials()&&(l+=n+(o?":"+o:"")+"@"),l+=Lp(r),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+ip(a,"/"):"",null!==c&&(l+="?"+c),null!==s&&(l+="#"+s),l},setHref:function(e){var t=this.parse(e);if(t)throw Zh(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new lf(e.path[0]).origin}catch(Xy){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Lp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Hh(e)+":",zp)},getUsername:function(){return this.username},setUsername:function(e){var t=jh(Hh(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Bp(t[n],Ip)}},getPassword:function(){return this.password},setPassword:function(e){var t=jh(Hh(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Bp(t[n],Ip)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Lp(e):Lp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Xp)},getHostname:function(){var e=this.host;return null===e?"":Lp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Jp)},getPort:function(){var e=this.port;return null===e?"":Hh(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Hh(e))?this.port=null:this.parse(e,Qp))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ip(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,nf))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Hh(e))?this.query=null:("?"==op(e,0)&&(e=hp(e,1)),this.query="",this.parse(e,af)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Hh(e))?("#"==op(e,0)&&(e=hp(e,1)),this.fragment="",this.parse(e,cf)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var lf=function(e){var t=Ch(this,uf),n=Fh(arguments.length,1)>1?arguments[1]:void 0,o=$h(t,new sf(e,!1,n));Oh||(t.href=o.serialize(),t.origin=o.getOrigin(),t.protocol=o.getProtocol(),t.username=o.getUsername(),t.password=o.getPassword(),t.host=o.getHost(),t.hostname=o.getHostname(),t.port=o.getPort(),t.pathname=o.getPathname(),t.search=o.getSearch(),t.searchParams=o.getSearchParams(),t.hash=o.getHash())},uf=lf.prototype,df=function(e,t){return{get:function(){return Yh(this)[e]()},set:t&&function(e){return Yh(this)[t](e)},configurable:!0,enumerable:!0}};if(Oh&&(Bh(uf,"href",df("serialize","setHref")),Bh(uf,"origin",df("getOrigin")),Bh(uf,"protocol",df("getProtocol","setProtocol")),Bh(uf,"username",df("getUsername","setUsername")),Bh(uf,"password",df("getPassword","setPassword")),Bh(uf,"host",df("getHost","setHost")),Bh(uf,"hostname",df("getHostname","setHostname")),Bh(uf,"port",df("getPort","setPort")),Bh(uf,"pathname",df("getPathname","setPathname")),Bh(uf,"search",df("getSearch","setSearch")),Bh(uf,"searchParams",df("getSearchParams")),Bh(uf,"hash",df("getHash","setHash"))),Ih(uf,"toJSON",(function(){return Yh(this).serialize()}),{enumerable:!0}),Ih(uf,"toString",(function(){return Yh(this).serialize()}),{enumerable:!0}),Qh){var hf=Qh.createObjectURL,pf=Qh.revokeObjectURL;hf&&Ih(lf,"createObjectURL",Ah(hf,Qh)),pf&&Ih(lf,"revokeObjectURL",Ah(pf,Qh))}Gh(lf,"URL"),Dh({global:!0,constructor:!0,forced:!Lh,sham:!Oh},{URL:lf});var ff,mf,vf,gf,bf=qe,yf=Il,_f=Re,wf=fe("species"),Tf=function(e){var t=bf(e);_f&&t&&!t[wf]&&yf(t,wf,{configurable:!0,get:function(){return this}})},kf=js,Sf=Ye,Ef=TypeError,xf=Ee,Rf=function(e){if(kf(e))return e;throw Ef(Sf(e)+" is not a constructor")},Df=g,Of=fe("species"),Lf=function(e,t){var n,o=xf(e).constructor;return void 0===o||Df(n=xf(o)[Of])?t:Rf(n)},Nf=c([].slice),Af=/(?:ipad|iphone|ipod).*applewebkit/i.test($),Uf=E,If=uc,Bf=ks,Cf=be,Pf=V,Mf=t,jf=hn,zf=Nf,qf=Ue,Vf=ad,Hf=Af,Gf=bl,Ff=Uf.setImmediate,Kf=Uf.clearImmediate,Wf=Uf.process,$f=Uf.Dispatch,Yf=Uf.Function,Xf=Uf.MessageChannel,Jf=Uf.String,Qf=0,Zf={},em="onreadystatechange";Mf((function(){ff=Uf.location}));var tm=function(e){if(Pf(Zf,e)){var t=Zf[e];delete Zf[e],t()}},nm=function(e){return function(){tm(e)}},om=function(e){tm(e.data)},rm=function(e){Uf.postMessage(Jf(e),ff.protocol+"//"+ff.host)};Ff&&Kf||(Ff=function(e){Vf(arguments.length,1);var t=Cf(e)?e:Yf(e),n=zf(arguments,1);return Zf[++Qf]=function(){If(t,void 0,n)},mf(Qf),Qf},Kf=function(e){delete Zf[e]},Gf?mf=function(e){Wf.nextTick(nm(e))}:$f&&$f.now?mf=function(e){$f.now(nm(e))}:Xf&&!Hf?(gf=(vf=new Xf).port2,vf.port1.onmessage=om,mf=Bf(gf.postMessage,gf)):Uf.addEventListener&&Cf(Uf.postMessage)&&!Uf.importScripts&&ff&&"file:"!==ff.protocol&&!Mf(rm)?(mf=rm,Uf.addEventListener("message",om,!1)):mf=em in qf("script")?function(e){jf.appendChild(qf("script"))[em]=function(){jf.removeChild(this),tm(e)}}:function(e){setTimeout(nm(e),0)});var im={set:Ff,clear:Kf},am=function(){this.head=null,this.tail=null};am.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var cm,sm,lm,um,dm,hm=am,pm=/ipad|iphone|ipod/i.test($)&&"undefined"!=typeof Pebble,fm=/web0s(?!.*chrome)/i.test($),mm=E,vm=ks,gm=co.f,bm=im.set,ym=hm,_m=Af,wm=pm,Tm=fm,km=bl,Sm=mm.MutationObserver||mm.WebKitMutationObserver,Em=mm.document,xm=mm.process,Rm=mm.Promise,Dm=gm(mm,"queueMicrotask"),Om=Dm&&Dm.value;if(!Om){var Lm=new ym,Nm=function(){var e,t;for(km&&(e=xm.domain)&&e.exit();t=Lm.get();)try{t()}catch(Xy){throw Lm.head&&cm(),Xy}e&&e.enter()};_m||km||Tm||!Sm||!Em?!wm&&Rm&&Rm.resolve?((um=Rm.resolve(void 0)).constructor=Rm,dm=vm(um.then,um),cm=function(){dm(Nm)}):km?cm=function(){xm.nextTick(Nm)}:(bm=vm(bm,mm),cm=function(){bm(Nm)}):(sm=!0,lm=Em.createTextNode(""),new Sm(Nm).observe(lm,{characterData:!0}),cm=function(){lm.data=sm=!sm}),Om=function(e){Lm.head||cm(),Lm.add(e)}}var Am=Om,Um=function(e){try{return{error:!1,value:e()}}catch(Xy){return{error:!0,value:Xy}}},Im=E.Promise,Bm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Cm=!Bm&&!bl&&"object"==typeof window&&"object"==typeof document,Pm=E,Mm=Im,jm=be,zm=Rr,qm=Uo,Vm=fe,Hm=Cm,Gm=Bm,Fm=te;Mm&&Mm.prototype;var Km=Vm("species"),Wm=!1,$m=jm(Pm.PromiseRejectionEvent),Ym=zm("Promise",(function(){var e=qm(Mm),t=e!==String(Mm);if(!t&&66===Fm)return!0;if(!Fm||Fm<51||!/native code/.test(e)){var n=new Mm((function(e){e(1)})),o=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Km]=o,!(Wm=n.then((function(){}))instanceof o))return!0}return!t&&(Hm||Gm)&&!$m})),Xm={CONSTRUCTOR:Ym,REJECTION_EVENT:$m,SUBCLASSING:Wm},Jm={},Qm=Ze,Zm=TypeError,ev=function(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw Zm("Bad Promise constructor");t=e,n=o})),this.resolve=Qm(t),this.reject=Qm(n)};Jm.f=function(e){return new ev(e)};var tv,nv,ov,rv=Br,iv=bl,av=E,cv=Me,sv=tr,lv=yi,uv=oi,dv=Tf,hv=Ze,pv=be,fv=we,mv=Pl,vv=Lf,gv=im.set,bv=Am,yv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(Xy){}},_v=Um,wv=hm,Tv=ao,kv=Im,Sv=Jm,Ev="Promise",xv=Xm.CONSTRUCTOR,Rv=Xm.REJECTION_EVENT,Dv=Xm.SUBCLASSING,Ov=Tv.getterFor(Ev),Lv=Tv.set,Nv=kv&&kv.prototype,Av=kv,Uv=Nv,Iv=av.TypeError,Bv=av.document,Cv=av.process,Pv=Sv.f,Mv=Pv,jv=!!(Bv&&Bv.createEvent&&av.dispatchEvent),zv="unhandledrejection",qv=function(e){var t;return!(!fv(e)||!pv(t=e.then))&&t},Vv=function(e,t){var n,o,r,i=t.value,a=1==t.state,c=a?e.ok:e.fail,s=e.resolve,l=e.reject,u=e.domain;try{c?(a||(2===t.rejection&&Wv(t),t.rejection=1),!0===c?n=i:(u&&u.enter(),n=c(i),u&&(u.exit(),r=!0)),n===e.promise?l(Iv("Promise-chain cycle")):(o=qv(n))?cv(o,n,s,l):s(n)):l(i)}catch(Xy){u&&!r&&u.exit(),l(Xy)}},Hv=function(e,t){e.notified||(e.notified=!0,bv((function(){for(var n,o=e.reactions;n=o.get();)Vv(n,e);e.notified=!1,t&&!e.rejection&&Fv(e)})))},Gv=function(e,t,n){var o,r;jv?((o=Bv.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),av.dispatchEvent(o)):o={promise:t,reason:n},!Rv&&(r=av["on"+e])?r(o):e===zv&&yv("Unhandled promise rejection",n)},Fv=function(e){cv(gv,av,(function(){var t,n=e.facade,o=e.value;if(Kv(e)&&(t=_v((function(){iv?Cv.emit("unhandledRejection",o,n):Gv(zv,n,o)})),e.rejection=iv||Kv(e)?2:1,t.error))throw t.value}))},Kv=function(e){return 1!==e.rejection&&!e.parent},Wv=function(e){cv(gv,av,(function(){var t=e.facade;iv?Cv.emit("rejectionHandled",t):Gv("rejectionhandled",t,e.value)}))},$v=function(e,t,n){return function(o){e(t,o,n)}},Yv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Hv(e,!0))},Xv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Iv("Promise can't be resolved itself");var o=qv(t);o?bv((function(){var n={done:!1};try{cv(o,t,$v(Xv,n,e),$v(Yv,n,e))}catch(Xy){Yv(n,Xy,e)}})):(e.value=t,e.state=1,Hv(e,!1))}catch(Xy){Yv({done:!1},Xy,e)}}};if(xv&&(Uv=(Av=function(e){mv(this,Uv),hv(e),cv(tv,this);var t=Ov(this);try{e($v(Xv,t),$v(Yv,t))}catch(Xy){Yv(t,Xy)}}).prototype,(tv=function(e){Lv(this,{type:Ev,done:!1,notified:!1,parent:!1,reactions:new wv,rejection:!1,state:0,value:void 0})}).prototype=sv(Uv,"then",(function(e,t){var n=Ov(this),o=Pv(vv(this,Av));return n.parent=!0,o.ok=!pv(e)||e,o.fail=pv(t)&&t,o.domain=iv?Cv.domain:void 0,0==n.state?n.reactions.add(o):bv((function(){Vv(o,n)})),o.promise})),nv=function(){var e=new tv,t=Ov(e);this.promise=e,this.resolve=$v(Xv,t),this.reject=$v(Yv,t)},Sv.f=Pv=function(e){return e===Av||undefined===e?new nv(e):Mv(e)},pv(kv)&&Nv!==Object.prototype)){ov=Nv.then,Dv||sv(Nv,"then",(function(e,t){var n=this;return new Av((function(e,t){cv(ov,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Nv.constructor}catch(Xy){}lv&&lv(Nv,Uv)}rv({global:!0,constructor:!0,wrap:!0,forced:xv},{Promise:Av}),uv(Av,Ev,!1),dv(Ev);var Jv=ks,Qv=Me,Zv=Ee,eg=Ye,tg=au,ng=qt,og=Ve,rg=ku,ig=vu,ag=eu,cg=TypeError,sg=function(e,t){this.stopped=e,this.result=t},lg=sg.prototype,ug=function(e,t,n){var o,r,i,a,c,s,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Jv(t,u),v=function(e){return o&&ag(o,"normal",e),new sg(!0,e)},g=function(e){return d?(Zv(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)o=e.iterator;else if(p)o=e;else{if(!(r=ig(e)))throw cg(eg(e)+" is not iterable");if(tg(r)){for(i=0,a=ng(e);a>i;i++)if((c=g(e[i]))&&og(lg,c))return c;return new sg(!1)}o=rg(e,r)}for(s=h?e.next:o.next;!(l=Qv(s,o)).done;){try{c=g(l.value)}catch(Xy){ag(o,"throw",Xy)}if("object"==typeof c&&c&&og(lg,c))return c}return new sg(!1)},dg=fe("iterator"),hg=!1;try{var pg=0,fg={next:function(){return{done:!!pg++}},return:function(){hg=!0}};fg[dg]=function(){return this},Array.from(fg,(function(){throw 2}))}catch(Xy){}var mg=Im,vg=function(e,t){if(!t&&!hg)return!1;var n=!1;try{var o={};o[dg]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(Xy){}return n},gg=Xm.CONSTRUCTOR||!vg((function(e){mg.all(e).then(void 0,(function(){}))})),bg=Me,yg=Ze,_g=Jm,wg=Um,Tg=ug;Br({target:"Promise",stat:!0,forced:gg},{all:function(e){var t=this,n=_g.f(t),o=n.resolve,r=n.reject,i=wg((function(){var n=yg(t.resolve),i=[],a=0,c=1;Tg(e,(function(e){var s=a++,l=!1;c++,bg(n,t,e).then((function(e){l||(l=!0,i[s]=e,--c||o(i))}),r)})),--c||o(i)}));return i.error&&r(i.value),n.promise}});var kg=Br,Sg=Xm.CONSTRUCTOR,Eg=Im,xg=qe,Rg=be,Dg=tr,Og=Eg&&Eg.prototype;if(kg({target:"Promise",proto:!0,forced:Sg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Rg(Eg)){var Lg=xg("Promise").prototype.catch;Og.catch!==Lg&&Dg(Og,"catch",Lg,{unsafe:!0})}var Ng=Me,Ag=Ze,Ug=Jm,Ig=Um,Bg=ug;Br({target:"Promise",stat:!0,forced:gg},{race:function(e){var t=this,n=Ug.f(t),o=n.reject,r=Ig((function(){var r=Ag(t.resolve);Bg(e,(function(e){Ng(r,t,e).then(n.resolve,o)}))}));return r.error&&o(r.value),n.promise}});var Cg=Me,Pg=Jm;Br({target:"Promise",stat:!0,forced:Xm.CONSTRUCTOR},{reject:function(e){var t=Pg.f(this);return Cg(t.reject,void 0,e),t.promise}});var Mg=Ee,jg=we,zg=Jm,qg=function(e,t){if(Mg(e),jg(t)&&t.constructor===e)return t;var n=zg.f(e);return(0,n.resolve)(t),n.promise},Vg=Br,Hg=Xm.CONSTRUCTOR,Gg=qg;qe("Promise"),Vg({target:"Promise",stat:!0,forced:Hg},{resolve:function(e){return Gg(this,e)}});var Fg=Br,Kg=Im,Wg=t,$g=qe,Yg=be,Xg=Lf,Jg=qg,Qg=tr,Zg=Kg&&Kg.prototype;if(Fg({target:"Promise",proto:!0,real:!0,forced:!!Kg&&Wg((function(){Zg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Xg(this,$g("Promise")),n=Yg(e);return this.then(n?function(n){return Jg(t,e()).then((function(){return n}))}:e,n?function(n){return Jg(t,e()).then((function(){throw n}))}:e)}}),Yg(Kg)){var eb=$g("Promise").prototype.finally;Zg.finally!==eb&&Qg(Zg,"finally",eb,{unsafe:!0})}var tb=be,nb=we,ob=yi,rb=we,ib=d,ab=fe("match"),cb=Me,sb=V,lb=Ve,ub=Ra,db=RegExp.prototype,hb=Oe.f,pb=Re,fb=E,mb=c,vb=Rr,gb=function(e,t,n){var o,r;return ob&&tb(o=t.constructor)&&o!==n&&nb(r=o.prototype)&&r!==n.prototype&&ob(e,r),e},bb=Kn,yb=nr.f,_b=Ve,wb=function(e){var t;return rb(e)&&(void 0!==(t=e[ab])?!!t:"RegExp"==ib(e))},Tb=Ea,kb=function(e){var t=e.flags;return void 0!==t||"flags"in db||sb(e,"flags")||!lb(db,e)?t:cb(ub,e)},Sb=Ua,Eb=function(e,t,n){n in e||hb(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},xb=tr,Rb=t,Db=V,Ob=ao.enforce,Lb=Tf,Nb=Ca,Ab=ja,Ub=fe("match"),Ib=fb.RegExp,Bb=Ib.prototype,Cb=fb.SyntaxError,Pb=mb(Bb.exec),Mb=mb("".charAt),jb=mb("".replace),zb=mb("".indexOf),qb=mb("".slice),Vb=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Hb=/a/g,Gb=/a/g,Fb=new Ib(Hb)!==Hb,Kb=Sb.MISSED_STICKY,Wb=Sb.UNSUPPORTED_Y,$b=pb&&(!Fb||Kb||Nb||Ab||Rb((function(){return Gb[Ub]=!1,Ib(Hb)!=Hb||Ib(Gb)==Gb||"/a/i"!=Ib(Hb,"i")})));if(vb("RegExp",$b)){for(var Yb=function(e,t){var n,o,r,i,a,c,s=_b(Bb,this),l=wb(e),u=void 0===t,d=[],h=e;if(!s&&l&&u&&e.constructor===Yb)return e;if((l||_b(Bb,e))&&(e=e.source,u&&(t=kb(h))),e=void 0===e?"":Tb(e),t=void 0===t?"":Tb(t),h=e,Nb&&"dotAll"in Hb&&(o=!!t&&zb(t,"s")>-1)&&(t=jb(t,/s/g,"")),n=t,Kb&&"sticky"in Hb&&(r=!!t&&zb(t,"y")>-1)&&Wb&&(t=jb(t,/y/g,"")),Ab&&(i=function(e){for(var t,n=e.length,o=0,r="",i=[],a={},c=!1,s=!1,l=0,u="";o<=n;o++){if("\\"===(t=Mb(e,o)))t+=Mb(e,++o);else if("]"===t)c=!1;else if(!c)switch(!0){case"["===t:c=!0;break;case"("===t:Pb(Vb,qb(e,o+1))&&(o+=2,s=!0),r+=t,l++;continue;case">"===t&&s:if(""===u||Db(a,u))throw new Cb("Invalid capture group name");a[u]=!0,i[i.length]=[u,l],s=!1,u="";continue}s?u+=t:r+=t}return[r,i]}(e),e=i[0],d=i[1]),a=gb(Ib(e,t),s?this:Bb,Yb),(o||r||d.length)&&(c=Ob(a),o&&(c.dotAll=!0,c.raw=Yb(function(e){for(var t,n=e.length,o=0,r="",i=!1;o<=n;o++)"\\"!==(t=Mb(e,o))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),r+=t):r+="[\\s\\S]":r+=t+Mb(e,++o);return r}(e),n)),r&&(c.sticky=!0),d.length&&(c.groups=d)),e!==h)try{bb(a,"source",""===h?"(?:)":h)}catch(Xy){}return a},Xb=yb(Ib),Jb=0;Xb.length>Jb;)Eb(Yb,Ib,Xb[Jb++]);Bb.constructor=Yb,Yb.prototype=Bb,xb(fb,"RegExp",Yb,{constructor:!0})}Lb("RegExp");var Qb=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,ey=(e,t,n,o)=>{for(var r,i=o>1?void 0:o?Zb(t,n):t,a=e.length-1;a>=0;a--)(r=e[a])&&(i=(o?r(t,n,i):r(i))||i);return o&&i&&Qb(t,n,i),i},ty=(e,t,n)=>(((e,t,n)=>{t in e?Qb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);var ny=new WeakMap;function oy(e,t){return function(e){return function(t,n,o){return o.value=e(o.value,n),o}}(((n,o)=>function(){for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];var a,c;let s=null==(a=ny.get(this))?void 0:a.get(t(...r));s&&s>0&&clearTimeout(s);let l=window.setTimeout((()=>{n.apply(this,r)}),e);ny.has(this)?null==(c=ny.get(this))||c.set(t(...r),l):ny.set(this,new Map([[t(...r),l]]))}))}var ry=()=>{let e=window.navigator&&window.navigator.userAgent||"",t=/iPad/i.test(e)||/iPhone/i.test(e),n=/Android/i.test(e);return t||n},iy=(()=>{let e=navigator.language;return e=e.substring(0,2),"zh"===e})(),ay={LOG_BUTTON:iy?"日志":"Log",NETWORK_BUTTON:iy?"网络":"Network",DUMP_BUTTON:iy?"转储":"Dump",DUMPING_BUTTON:iy?"转储中":"Dumping",END_BUTTON:iy?"结束":"End",UPLOAD_BUTTON:iy?"上传":"Upload",EXPORT_BUTTON:iy?"导出":"Export",HIDE_BUTTON:iy?"隐藏":"Hide",GO_BOTTOM:iy?"底部":"goBottom",BACK_TOP:iy?"顶部":"backTop",UPLINK:iy?"上行":"Uplink",DOWNLINK:iy?"下行":"Downlink",NO_DATA:iy?"暂无数据":"No Data",BASIC:iy?"基础":"Basic",DURATION:iy?"时长":"Duration",VIDEO:iy?"视频":"Video",AUDIO:iy?"音频":"Audio",SCREEN:iy?"屏幕":"Screen"},cy={"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=>{cy["".concat(e,"()")]={tips_zh:"调用 trtc.".concat(e),tips_en:"Call trtc.".concat(e),color:"blue",class:"blue",textColor:"#fff"}}));var sy=Object.keys(cy),ly="trtc_debug_dialog",uy="".concat(ly,"_activated"),dy="".concat(ly,"_switch"),hy="".concat(ly,"_mask"),py="".concat(ly,"_pannel"),fy="".concat(ly,"_tabber"),my="".concat(ly,"_tab"),vy="".concat(ly,"_topbar"),gy="".concat(ly,"_toptab"),by="".concat(ly,"_content"),yy="".concat(ly,"_has_topbar"),_y="".concat(by,"_log"),wy="".concat(by,"_network"),Ty="".concat(ly,"_dump"),ky="".concat(wy,"_title"),Sy="".concat(wy,"_basic"),Ey="".concat(wy,"_local"),xy="".concat(wy,"_remote"),Ry="".concat(Ty,"_title"),Dy="".concat(Ty,"_local"),Oy="".concat(Ty,"_remote"),Ly="".concat(ly,"_banner"),Ny="".concat(Ly,"_item"),Ay="".concat(ly,"_toolbar"),Uy="".concat(ly,"_tool"),Iy="".concat(ly,"_item"),By="".concat(Iy,"_debug"),Cy="".concat(Iy,"_info"),Py="".concat(Iy,"_warn"),My="".concat(Iy,"_error"),jy="".concat(ly,"_back_top"),zy="".concat(ly,"_go_bottom"),qy="".concat(Ty,"_local_audio"),Vy="".concat(Ty,"_local_video_main"),Hy="".concat(Ty,"_local_video_aux"),Gy="".concat(ly,"_tooltip"),Fy="success",Ky="failed",Wy=0,$y=!1,Yy=class{constructor(e,t,n,o){ty(this,"_dialogNode",null),ty(this,"_switchNode",null),ty(this,"_maskNode",null),ty(this,"_pannelNode",null),ty(this,"_logContentNode",null),ty(this,"_networkContentNode",null),ty(this,"_dumpContentNode",null),ty(this,"_tabNodes",[]),ty(this,"_toptabNodes",[]),ty(this,"_backTopButton",null),ty(this,"_goBottomButton",null),ty(this,"_hasMove",!1),ty(this,"_showDialog",!1),ty(this,"_isMobile",!1),ty(this,"_showLogType","all"),ty(this,"prevBytesSent",0),ty(this,"prevBytesReceived",0),ty(this,"_core"),ty(this,"_log"),ty(this,"_logList",[]),ty(this,"isUploading",!1),ty(this,"publishMap",new Map),ty(this,"dumpLocalVideoMap"),ty(this,"dumpRemoteVideoMap"),ty(this,"handleLeaveSuccess",(()=>{var e;let t=null==(e=this._dialogNode)?void 0:e.querySelector(".".concat(Oy));for(let n of this.publishMap.values())null==t||t.removeChild(n);this.publishMap.clear()})),ty(this,"handleRemoteVideoAvailable",(e=>{let t="sub"===e.streamType?"auxiliary":"main";this.renderDumpTab(e.userId,"remote",t,"publish")})),ty(this,"handleRemoteVideoUnavailable",(e=>{let t="sub"===e.streamType?"auxiliary":"main";this.renderDumpTab(e.userId,"remote",t,"unpublish")})),ty(this,"handleRemoteAudioAvailable",(e=>{this.renderDumpTab(e.userId,"remote","audio","publish")})),ty(this,"handleRemoteAudioUnavailable",(e=>{this.renderDumpTab(e.userId,"remote","audio","unpublish")})),ty(this,"renderDumpTab",((e,t,n,o)=>{var r,i;let a={main:iy?"视频":"video",auxiliary:iy?"屏幕":"screen",audio:iy?"音频":"audio"},c=(e,t)=>{var n,o;let r=document.createElement("div");r.innerText="".concat(e," - ").concat(a[t]," - ").concat(ay.DURATION,"(s):");let i=document.createElement("input");i.type="number",i.min="0",i.value="0",i.id="dump_remote_".concat(t,"_").concat(e);let c=document.createElement("button");c.innerText=ay.END_BUTTON,c.style.cssText="border-radius: 5px;",c.disabled=!0;let s=document.createElement("button");return s.innerText=ay.DUMP_BUTTON,s.style.cssText="border-radius: 5px;",s.onclick=()=>{let n,o,r=Number(i.value);({download:n,onDumpEnd:o}="audio"===t?this.dumpAudio("remote",r,e):this.dumpVideo(t,"remote",r,e)),n?(this.disactiveButton(s,ay.DUMPING_BUTTON),r>0?setTimeout((()=>{null==n||n(),this.activeButton(s,ay.DUMP_BUTTON)}),1e3*r):(this.activeButton(c),c.onclick=()=>{c.onclick=null,null==n||n(),null==o||o(),this.activeButton(s,ay.DUMP_BUTTON),this.disactiveButton(c)})):this.addInfoToBanner(Ky,iy?"转储失败,请检查远端用户".concat(e,"是否发布流"):"Failed to dump, please check if the remote user ".concat(e," has published the stream"))},r.appendChild(i),r.appendChild(s),r.appendChild(c),r.style.cssText="padding:10px;border-bottom:1px solid var(--DD-BORDER)",null==(o=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(Oy)))||o.appendChild(r),r};if("remote"===t)if("publish"===o){let o=c(e,n);this.publishMap.set("".concat(e,"-").concat(t,"-").concat(n),o)}else{let o=this.publishMap.get("".concat(e,"-").concat(t,"-").concat(n));if(!o)return;null==(i=null==(r=this._dialogNode)?void 0:r.querySelector(".".concat(Oy)))||i.removeChild(o),this.publishMap.delete("".concat(e,"-").concat(t,"-").concat(n))}})),ty(this,"handleStatistics",(e=>{var t,n,o;let r=(e.bytesSent-this.prevBytesSent)/2,i=(e.bytesReceived-this.prevBytesReceived)/2;this.prevBytesSent=e.bytesSent,this.prevBytesReceived=e.bytesReceived;let a=null==(t=this._dialogNode)?void 0:t.querySelector(".".concat(Sy)),c="rtt: ".concat(e.rtt," ms upLoss: ").concat(e.upLoss," downLoss: ").concat(e.downLoss," <br>\n ↑ ").concat(r/1e3," KB/s (").concat(8*r/1e3," Kb/s) <br>\n ↓ ").concat(i/1e3," KB/s (").concat(8*i/1e3," Kb/s) <br>\n ");a.innerHTML=c;let s=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(Ey)),l="";e.localStatistics.audio.bitrate&&(l="<li>local audio: ".concat(e.localStatistics.audio.bitrate," Kb/s audioLevel: ").concat(e.localStatistics.audio.audioLevel.toFixed(5),"</li>")),e.localStatistics.video.length>0&&(l+="".concat(e.localStatistics.video.map((e=>"<li>local ".concat(e.videoType," video: ").concat(e.bitrate," Kb/s ").concat(e.width,"*").concat(e.height," ").concat(e.frameRate,"fps</li>"))).join(""))),s.innerHTML=""===l?"".concat(ay.NO_DATA):l;let u=null==(o=this._dialogNode)?void 0:o.querySelector(".".concat(xy)),d="";e.remoteStatistics.length>0&&e.remoteStatistics.forEach((e=>{let 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((e=>{t+="<li>".concat(e.videoType," video: ").concat(e.bitrate," Kb/s ").concat(e.width,"*").concat(e.height," ").concat(e.frameRate,"fps</li>")})),d+=t})),u.innerHTML=""===d?"".concat(ay.NO_DATA):d})),this._core=e,this._log=t,this.dumpLocalVideoMap=n,this.dumpRemoteVideoMap=o,this.addStyle(),this.addDialog(),this.synchronizeLog(),this.installEvents()}synchronizeLog(){this._core.loggerManager.getQueue().forEach((e=>{this.updateLog(e)}))}addStyle(){if($y)return;$y=!0;let e=document.createElement("style");e.innerHTML="\n #".concat(ly,"\n {--DD-BG-0:#ededed;--DD-BG-1:#f7f7f7;--DD-BG-2:#fff;--DD-BORDER: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(ly," a,.").concat(dy,"{cursor:pointer;}\n .").concat(ly,"{color:black;}\n .").concat(dy,"{display:block;position:fixed;right:50px;bottom:150px;border-radius:5px;background-color:#07c160;color:#fff;padding:5px 10px;z-index:10000;}\n .").concat(hy,"{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(py,"{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(py,"{left:0;}} \n .").concat(fy,"{display:flex;height:2rem;border-bottom:1px solid var(--DD-BORDER);}\n .").concat(my,"{padding:0 20px;border-right:1px solid rgba(0, 0, 0, 0.1);line-height:2rem;color: black;}\n .").concat(my,".").concat(uy,"{background-color:var(--DD-BG-2);}\n .").concat(my,".disabled{cursor: not-allowed;background-color: #ededed;color: #999;}\n .").concat(vy,"{height:2rem;display:flex;flex-direction:row;}\n .").concat(gy,"{width:20%;text-align:center;line-height:2rem;border-right:1px solid var(--DD-BORDER);border-bottom:1px solid var(--DD-BORDER);color:black;}\n .").concat(gy,".").concat(uy,"{border-bottom:1px solid #1485ee;background-color:var(--DD-BG-2);}\n .").concat(by,"{background-color:#fff;position:absolute;left:0;right:0;top:2rem;bottom:8rem;overflow-y:scroll;overflow-x:hidden;}\n .").concat(by,".").concat(yy,"{top:4rem;}\n .").concat(wy,"{display:none;}\n .").concat(Ty,"{display:none;}\n .").concat(ky,",.").concat(Ry,"{line-height:2rem;text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BORDER);}\n .").concat(Sy,",.").concat(Ey,",.").concat(xy,"{text-align:center;border-bottom:1px solid var(--DD-BORDER);}\n .").concat(Dy,",.").concat(Oy,"{display:flex;flex-direction:column;padding:0.5rem 0;justify-content:center;align-items:center;}\n .").concat(Dy," div input{margin:0 10px;height:1.8rem;width:4rem;}\n .").concat(Dy," div {padding:10px 0;border-radius:5px;}\n .").concat(Dy," div button {border-radius:5px;}\n .").concat(Oy," div input{margin:0 10px;height:1.8rem;width:4rem;}\n .").concat(Oy," div select{margin:0 10px;height:1.8rem;width:6rem;appearance:auto;}\n .").concat(ky,"{text-align:center;background-color:var(--DD-BG-0);border-bottom:1px solid var(--DD-BORDER);}\n .").concat(Sy,",.").concat(Ey,",.").concat(xy,"{text-align:center;border-bottom:1px solid var(--DD-BORDER);}\n .").concat(Iy,"{border-bottom:1px solid var(--DD-BG-0);padding:5px 10px;overflow-wrap: break-word;}\n .").concat(My,"{color:var(--DD-ERROR);background-color:var(--DD-ERROR-BG);}\n .").concat(Py,"{color:var(--DD-WARN);background-color:var(--DD-WARN-BG);}\n .").concat(Cy,"{color:var(--DD-INFO);}\n .").concat(By,"{color:var(--DD-DEBUG);}\n .").concat(Ly,"{position:absolute;left:0;right:0;bottom:2rem;height:6rem;border-bottom:1px solid var(--DD-BORDER);display:flex;flex-direction:column;overflow-y:scroll;background-color:var(--DD-BG-1);}\n .").concat(Ny,"{border-bottom:1px solid var(--DD-BORDER);padding:5px 10px;overflow-wrap: break-word;}\n .").concat(Ay,"{position:absolute;line-height:2rem;display:flex;flex-direction:row;left:0;right:0;bottom:0;}\n .").concat(Uy,"{flex:1;color:black;text-align:center;background-color:#ededed;border-right:1px solid var(--DD-BORDER);}\n #").concat(ly," .").concat(jy,",#").concat(ly," .").concat(zy,"{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(zy,"{bottom:9rem;}\n .").concat(jy,"{bottom:11.5rem;}\n #").concat(ly," .").concat(Uy,".disable {cursor: not-allowed;background-color: #ededed;color: #999;}\n .").concat(Gy," {position: relative;display: inline-block;}\n .").concat(Gy," .tooltiptext {visibility: hidden;width: 180px;background-color: black;color: #fff;text-align: center;padding: 5px 0;border-radius: 6px;position: absolute;}\n .").concat(Gy," .tooltip-top {bottom: 125%;left: 50%;margin-left: -90px;}\n .").concat(Gy,":hover .tooltiptext { visibility: visible;}\n "),document.body.appendChild(e)}addDialog(){this._dialogNode=this.createDiaLog(),document.body.appendChild(this._dialogNode)}createDiaLog(){var e,t,n,o;this._isMobile=ry();let r=document.createElement("template");r.innerHTML='<div id="'.concat(ly,'" class="').concat(ly,'">\n <div class="').concat(dy,'">Debug#').concat(++Wy,'</div>\n <div class="').concat(hy,'"></div>\n <div class="').concat(py,'">\n <a class="').concat(jy,'">').concat(ay.BACK_TOP,'</a>\n <a class="').concat(zy,'">').concat(ay.GO_BOTTOM,'</a>\n <div class="').concat(fy,'">\n <a class="').concat(my," ").concat(uy,'" data-tab="log">').concat(ay.LOG_BUTTON,'</a>\n <a class="').concat(my,'" data-tab="network">').concat(ay.NETWORK_BUTTON,'</a>\n <a class="').concat(my,'" data-tab="dump">').concat(ay.DUMP_BUTTON,'</a>\n </div>\n <div class="').concat(vy,'">\n <a class="').concat(gy," ").concat(uy,'" data-type="all">All</a>\n <a class="').concat(gy,'" data-type="debug">Debug</a>\n <a class="').concat(gy,'" data-type="info">Info</a>\n <a class="').concat(gy,'" data-type="warn">Warn</a>\n <a class="').concat(gy,'" data-type="error">Error</a>\n </div>\n <div class="').concat(by," ").concat(yy,'">\n <div class="').concat(_y,'"></div>\n <div class="').concat(wy,'">\n <div class="').concat(ky,'">').concat(ay.BASIC,'</div>\n <div class="').concat(Sy,'">').concat(ay.NO_DATA,'</div>\n <div class="').concat(ky,'">').concat(ay.UPLINK,'</div>\n <div class="').concat(Ey,'">').concat(ay.NO_DATA,'</div>\n <div class="').concat(ky,'">').concat(ay.DOWNLINK,'</div>\n <div class="').concat(xy,'">').concat(ay.NO_DATA,'</div>\n </div>\n <div class="').concat(Ty,'">\n <div class="').concat(Ry,'">').concat(ay.UPLINK,'</div>\n <div class="').concat(Dy,'">\n <div id="').concat(qy,'">\n <span>').concat(ay.AUDIO," - ").concat(ay.DURATION,'(s):</span>\n <input type="number" min=0 value=0></input>\n <button class="dump">').concat(ay.DUMP_BUTTON,'</button>\n <button class="end-dump" disabled>').concat(ay.END_BUTTON,'</button>\n </div>\n <div id="').concat(Vy,'">\n <span>').concat(ay.VIDEO," - ").concat(ay.DURATION,'(s):</span>\n <input type="number" min=0 value=0></input>\n <button class="dump">').concat(ay.DUMP_BUTTON,'</button>\n <button class="end-dump" disabled>').concat(ay.END_BUTTON,'</button>\n </div>\n <div id="').concat(Hy,'">\n <span>').concat(ay.SCREEN," - ").concat(ay.DURATION,'(s):</span>\n <input type="number" min=0 value=0></input>\n <button class="dump">').concat(ay.DUMP_BUTTON,'</button>\n <button class="end-dump" disabled>').concat(ay.END_BUTTON,'</button>\n </div>\n </div>\n <div class="').concat(Ry,'">').concat(ay.DOWNLINK,'</div>\n <div class="').concat(Oy,'"></div>\n </div>\n </div>\n <div class="').concat(Ly,'"></div>\n <div class="').concat(Ay,'">\n <a id="trtc_upload" class="').concat(Uy,'">').concat(ay.UPLOAD_BUTTON,'</a>\n <a id="trtc_export" class="').concat(Uy,'">').concat(ay.EXPORT_BUTTON,'</a>\n <a id="trtc_hide" class="').concat(Uy,'">').concat(ay.HIDE_BUTTON,"</a>\n </div>\n </div>\n </div>");let i=r.content.firstChild;this._switchNode=i.querySelector(".".concat(dy)),null==(e=this._switchNode)||e.addEventListener("click",this.onSwitchClick.bind(this)),this.dragable(this._switchNode),this._maskNode=i.querySelector(".".concat(hy)),null==(t=this._maskNode)||t.addEventListener("click",this.onMaskClick.bind(this)),this._pannelNode=i.querySelector(".".concat(py)),null==(n=i.querySelector(".".concat(jy)))||n.addEventListener("click",this.onBackTopClick.bind(this)),null==(o=i.querySelector(".".concat(zy)))||o.addEventListener("click",this.onGoBottomClick.bind(this)),this._logContentNode=i.querySelector(".".concat(_y)),this._networkContentNode=i.querySelector(".".concat(wy)),this._dumpContentNode=i.querySelector(".".concat(Ty)),this._tabNodes=Array.from(i.querySelector(".".concat(fy)).children),this._tabNodes.forEach((e=>{"dump"!==e.dataset.tab||this._core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED?e.addEventListener("click",this.onTabClick.bind(this)):(e.classList.add("disabled"),this._log.error("insertable-stream is supported, cannot use dump in debug plugin"),e.addEventListener("click",(()=>{this.addInfoToBanner(Ky,iy?"当前浏览器不支持insertable-stream API,无法使用转储功能":"insertable-stream is supported, cannot use dump in debug plugin")})))})),this._toptabNodes=Array.from(i.querySelector(".".concat(vy)).children),this._toptabNodes.forEach((e=>{e.addEventListener("click",this.onToptabClick.bind(this))})),this._backTopButton=i.querySelector(".".concat(jy)),this._goBottomButton=i.querySelector(".".concat(zy));let a=i.querySelector("#trtc_upload");null==a||a.addEventListener("click",this.onUploadClick.bind(this));let c=i.querySelector("#trtc_export");null==c||c.addEventListener("click",this.onExportClick.bind(this));let s=i.querySelector("#trtc_hide");if(null==s||s.addEventListener("click",this.onHideClick.bind(this)),this._core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED){let e=i.querySelector("#".concat(Vy," .dump"));null==e||e.addEventListener("click",(()=>{let t=Number(i.querySelector("#".concat(Vy," input")).value),{download:n,onDumpEnd:o}=this.dumpVideo("main","local",t);if(n)if(this.disactiveButton(e,ay.DUMPING_BUTTON),t>0)setTimeout((()=>{n(),this.activeButton(e,ay.DUMP_BUTTON)}),1e3*t);else{let t=i.querySelector("#".concat(Vy," .end-dump"));this.activeButton(t),t.onclick=()=>{t.onclick=null,null==o||o(),n(),this.activeButton(e,ay.DUMP_BUTTON),this.disactiveButton(t)}}else this.addInfoToBanner(Ky,iy?"转储失败,请检查当前用户是否进房或发布视频流":"Failed to dump, please check if the current user has entered the room or published the video stream")}));let t=i.querySelector("#".concat(Hy," .dump"));null==t||t.addEventListener("click",(()=>{let e=Number(i.querySelector("#".concat(Hy," input")).value),{download:n,onDumpEnd:o}=this.dumpVideo("auxiliary","local",e);if(n)if(this.disactiveButton(t,ay.DUMPING_BUTTON),e>0)setTimeout((()=>{n(),this.activeButton(t,ay.DUMP_BUTTON)}),1e3*e);else{let e=i.querySelector("#".concat(Hy," .end-dump"));this.activeButton(e),e.onclick=()=>{e.onclick=null,n(),null==o||o(),this.activeButton(t,ay.DUMP_BUTTON),this.disactiveButton(e)}}else this.addInfoToBanner(Ky,iy?"转储失败,请检查当前用户是否进房或发布屏幕分享流":"Failed to dump, please check if the current user has entered the room or published the screen share stream")}));let n=i.querySelector("#".concat(qy," button"));null==n||n.addEventListener("click",(()=>{let e=Number(i.querySelector("#".concat(qy," input")).value),{download:t,onDumpEnd:o}=this.dumpAudio("local",e);if(t)if(this.disactiveButton(n,ay.DUMPING_BUTTON),e>0)setTimeout((()=>{t(),this.activeButton(n,ay.DUMP_BUTTON)}),1e3*e);else{let e=i.querySelector("#".concat(qy," .end-dump"));this.activeButton(e),e.onclick=()=>{e.onclick=null,t(),null==o||o(),this.activeButton(n,ay.DUMP_BUTTON),this.disactiveButton(e)}}else this.addInfoToBanner(Ky,iy?"转储失败,请检查当前用户是否进房或发布音频流":"Failed to dump, please check if the current user has entered the room or published the audio stream")}))}return i}closeDialog(){this.uninstallEvents(),this._dialogNode&&(document.body.removeChild(this._dialogNode),this._dialogNode=null),this._core=null,this._log=null,this.dumpLocalVideoMap=null,this.dumpRemoteVideoMap=null,this._logList=null}updateLog(e){var t;this._logList.push(e);let n=document.createElement("div");switch(n.classList.add(Iy),e.level){case 4:n.classList.add(My);break;case 2:n.classList.add(Cy);break;case 3:n.classList.add(Py);break;case 1:n.classList.add(By)}n.textContent=e.log,"all"!==this._showLogType&&!n.classList.contains("".concat(Iy,"_").concat(this._showLogType))&&(n.style.display="none"),null==(t=this._logContentNode)||t.appendChild(n),this.addHelper(n)}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,this.logContentGoBottom())}onTabClick(e){var t,n,o,r,i;let a=e.target;null==(t=this._tabNodes)||t.forEach((e=>{e.classList.remove(uy)})),a.classList.add(uy);let c=a.getAttribute("data-tab");"log"===c?(null==(o=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(by)))||o.classList.add(yy),this._logContentNode.style.display="block",this._goBottomButton.style.display="block",this._backTopButton.style.display="block",this._networkContentNode.style.display="none",this._dumpContentNode.style.display="none",this.logContentGoBottom()):(this._backTopButton.style.display="none",this._goBottomButton.style.display="none",null==(i=null==(r=this._dialogNode)?void 0:r.querySelector(".".concat(by)))||i.classList.remove(yy),"network"===c?(this._networkContentNode.style.display="block",this._logContentNode.style.display="none",this._dumpContentNode.style.display="none"):"dump"===c&&(this._dumpContentNode.style.display="block",this._networkContentNode.style.display="none",this._logContentNode.style.display="none"))}onToptabClick(e){var t,n;let o=e.target;null==(t=this._toptabNodes)||t.forEach((e=>{e.classList.remove(uy)})),o.classList.add(uy),this._showLogType=o.getAttribute("data-type");let r=null==(n=this._logContentNode)?void 0:n.querySelectorAll(".".concat(Iy)),i="".concat(Iy,"_").concat(this._showLogType);r.forEach((e=>{e.classList.contains(i)||"all"===this._showLogType?e.style.display="block":e.style.display="none"})),this.logContentGoBottom()}onExportClick(){let e=this._logList.reduce(((e,t)=>"".concat(e+t.log,"\n")),""),t=new Blob([e],{type:"text/plain"}),n=document.createElement("a"),o=URL.createObjectURL(t);n.href=o;let r="trtc_".concat(void 0===this._core.room.sdkAppId?"EmptySdkAppId":this._core.room.sdkAppId,"_").concat(void 0===this._core.room.userId?"EmptyUserId":this._core.room.userId,"_").concat((new Date).getTime(),".log");n.download=r,n.style.display="none",document.body.appendChild(n),n.click(),URL.revokeObjectURL(o),document.body.removeChild(n),this.addInfoToBanner(Fy,iy?"导出成功:日志文件名为".concat(r):"Export success: The log file name is ".concat(r)),this._core.kvStatManager.addSuccessEvent({key:592703}),this._log.info("Export success: The log file name is ${fileName}")}addInfoToBanner(e,t){var n;let o=null==(n=this._dialogNode)?void 0:n.querySelector(".".concat(Ly)),r=document.createElement("div");r.classList.add(Ny),r.innerText="".concat(e===Fy?"🟩":"🟥 "," [").concat(this.getCurrentTime(),"] ").concat(t),o.appendChild(r),o.scrollTop=o.scrollHeight}async onUploadClick(){var e;if(this.isUploading)return;this.isUploading=!0;let t=null==(e=this._dialogNode)?void 0:e.querySelector("#trtc_upload");t.innerText=iy?"上传中...":"Uploading...",null==t||t.classList.add(".disable");let n=this._logList.reduce(((e,t)=>"".concat(e+t.log,"\n")),""),o=new Blob([n],{type:"text/plain"}),r=new FormData;r.append("file",o,"trtc.log"),r.append("sdkAppId","".concat(this._core.room.sdkAppId||"EmptySdkAppId")),r.append("userId","".concat(this._core.room.userId||"EmptyUserId")),fetch("https://service.trtc.qcloud.com/api/uploadLogFile",{method:"POST",body:r}).then((e=>e.json())).then((e=>{this.addInfoToBanner(e.type,iy?e.message_zh:e.message_en),this.isUploading=!1,this._log.info(e.message_en),this._core.kvStatManager.addSuccessEvent({key:592704})})).catch((()=>{this.addInfoToBanner(Ky,iy?"上传失败:请使用本地导出":"Upload Failed: Please use local export"),this._log.info("Upload Failed: Please use local export"),this._core.kvStatManager.addFailedEvent({key:592704})})).finally((()=>{t.innerText=iy?"上传":"Upload",null==t||t.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(".".concat(by)))||t.scrollTo(0,0)}onGoBottomClick(){this.logContentGoBottom()}logContentGoBottom(){var e;let t=null==(e=this._dialogNode)?void 0:e.querySelector(".".concat(by));null==t||t.scrollTo(0,null==t?void 0:t.scrollHeight)}dragable(e){var t,n;let 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==(n=this._switchNode)?void 0:n.offsetTop)||150;let r=e=>{e.cancelable&&e.preventDefault(),this._hasMove=!0;let t=o.x-(e.pageX-o.startX),n=o.y-(e.pageY-o.startY);[t,n]=a(t,n),this._switchNode.style.right="".concat(t,"px"),this._switchNode.style.bottom="".concat(n,"px"),o.endX=t,o.endY=n},i=()=>{o.startX=0,o.startY=0,o.x=o.endX,o.y=o.endY,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)},a=(e,t)=>{let n=Math.max(document.documentElement.offsetWidth,window.innerWidth),o=Math.max(document.documentElement.offsetHeight,window.innerHeight);return e+this._switchNode.offsetWidth>n&&(e=n-this._switchNode.offsetWidth),t+this._switchNode.offsetHeight>o&&(t=o-this._switchNode.offsetHeight),e<0&&(e=0),t<20&&(t=20),[e,t]};ry()?(e.addEventListener("touchstart",(e=>{o.startX=e.touches[0].pageX,o.startY=e.touches[0].pageY,o.isTouchEnd=!1}),{passive:!1}),e.addEventListener("touchend",(()=>{!o.isTouchEnd||(o.startX=0,o.startY=0,o.isTouchEnd=!1,o.x=o.endX,o.y=o.endY)}),{passive:!1}),e.addEventListener("touchmove",(e=>{if(e.touches.length<=0)return;let t=e.touches[0].pageX-o.startX,n=e.touches[0].pageY-o.startY,r=Math.floor(o.x-t),i=Math.floor(o.y-n);[r,i]=a(r,i),this._switchNode.style.right="".concat(r,"px"),this._switchNode.style.bottom="".concat(i,"px"),o.endX=r,o.endY=i,o.isTouchEnd=!0,e.cancelable&&e.preventDefault()}),{passive:!1})):e.addEventListener("mousedown",(e=>{e.preventDefault(),o.startX=e.pageX,o.startY=e.pageY,document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)}))}installEvents(){this._core.innerEmitter.on("264",this.handleLog,this),this._core.innerEmitter.on("53",this.handleLeaveSuccess,this),this._core.trtc.on(this._core.TRTC.EVENT.STATISTICS,this.handleStatistics,this),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,this.handleRemoteAudioAvailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,this.handleRemoteAudioUnavailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,this.handleRemoteVideoAvailable),this._core.trtc.on(this._core.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,this.handleRemoteVideoUnavailable)}uninstallEvents(){this._core.innerEmitter.off("264",this.handleLog,this),this._core.innerEmitter.off("53",this.handleLeaveSuccess,this),this._core.trtc.off(this._core.TRTC.EVENT.STATISTICS,this.handleStatistics,this),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_AUDIO_AVAILABLE,this.handleRemoteAudioAvailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE,this.handleRemoteAudioUnavailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_VIDEO_AVAILABLE,this.handleRemoteVideoAvailable),this._core.trtc.off(this._core.TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE,this.handleRemoteVideoUnavailable)}disactiveButton(e,t){e.disabled=!0,t&&(e.innerText=t),e.style.cssText="cursor: not-allowed;background-color: #ededed;color: #999;border-radius: 5px;"}activeButton(e,t){e.disabled=!1,t&&(e.innerText=t),e.style.cssText="border-radius: 5px;margin-right: 5px;"}handleLog(e){this.updateLog(e.log)}addHelper(e){let 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,n=sy,o=e.innerText;o=o.split("\n").map((e=>{if((e=e.replace(/</g,"<").replace(/>/g,">")).includes("failed"))return e.includes("on autoplay-failed")?e:"<span class='red' style=\"background:red; color:#fff;\">".concat(e,"</span>");if(e.includes("clientIp:")){let n=e.match(t);return null==n||n.forEach((t=>{e=e.replace(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"),n.forEach((t=>{if(e.innerText.includes(t)){let n="";n=iy?"function"==typeof cy[t].tips_zh?cy[t].tips_zh(e.innerText):cy[t].tips_zh:"function"==typeof cy[t].tips_en?cy[t].tips_en(e.innerText):cy[t].tips_en,o=o.replace(new RegExp("".concat(t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(">",">").replace(">","<")),"gi"),'<span class="'.concat(Gy,'" style="background:').concat(cy[t].color||"#e1dfdf","; color: ").concat(cy[t].textColor||"#000",'">').concat(t,'\n <span class="tooltiptext tooltip-top">').concat(n,"</span>\n </span>"))}})),e.innerHTML=o}getCurrentTime(){let e=e=>e<10?"0".concat(e):"".concat(e),t=new Date,n=e(t.getHours()),o=e(t.getMinutes()),r=e(t.getSeconds());return"".concat(n,":").concat(o,":").concat(r)}dumpVideo(e,t,n,o){let r,i=Date.now(),a=[];if("local"===t){if(!this.hasLocalTrack(e,"video"))return{};r=()=>{delete this.dumpLocalVideoMap["auxiliary"===e?"sub":"main"]},this.dumpLocalVideoMap["auxiliary"===e?"sub":"main"]={startTimestamp:i,data:a,duration:n,onDumpEnd:r}}return"remote"===t&&o&&(r=()=>{delete this.dumpRemoteVideoMap["".concat(o,"-").concat(e)]},this.dumpRemoteVideoMap["".concat(o,"-").concat(e)]={startTimestamp:i,data:a,duration:n,onDumpEnd:r}),{download:()=>{if(0===a.length)return void this.addInfoToBanner(Ky,iy?"转储失败":"Dump failed");let n;"main"===e?n="video":"auxiliary"===e&&(n="screen");let r=URL.createObjectURL(new Blob(a)),c=document.createElement("a"),s="local"===t?"local-".concat(n,"-").concat(i,".h264"):"remote-".concat(o,"-").concat(n,"-").concat(i,".h264");c.href=r,c.download=s,c.style.display="none",document.body.appendChild(c),c.click(),URL.revokeObjectURL(r),c.remove(),this.addInfoToBanner(Fy,iy?"转储成功,文件名为:".concat(s):"Dump success, file name is: ".concat(s))},onDumpEnd:r}}hasLocalTrack(e,t){for(let n of this._core.room.localTracks)if(n.streamType===e&&n.kind===t)return!0;return!1}dumpAudio(e,t,n){var o,r,i;let a=null,c=[],s=[],l=[],u=new AbortController,d=Date.now();if("local"===e){if(!this.hasLocalTrack("main","audio"))return{};null!=(o=this._core.room.audioManager._localAudioPipline)&&o.source.node&&(c.push(this._core.room.audioManager._localAudioPipline.source.node),s.push("local-mic-".concat(d))),null!=(r=this._core.room.audioManager._localAudioPipline)&&r.denoiser.node&&(c.push(this._core.room.audioManager._localAudioPipline.denoiser.node),s.push("local-mic-processed-".concat(d))),this._core.room.audioManager.mixWeight>1&&(c.push(this._core.room.audioManager.audioContext.createMediaStreamSource(this._core.room.audioManager._localAudioPipline.stream)),s.push("local-mix-".concat(d)))}else if("remote"===e&&void 0!==n){let e=null==(i=this._core.room.remotePublishedUserMap.get(n))?void 0:i.remoteAudioTrack,t=this._core.createAudioNode(null==e?void 0:e.mediaTrack);c.push(t),s.push("remote-".concat(n,"-").concat(d))}let h=()=>{for(let e=0;e<s.length;e++){let t=URL.createObjectURL(new Blob(l[e])),n=document.createElement("a");n.href=t,n.download="".concat(s[e],".pcm"),n.style.display="none",document.body.appendChild(n),n.click(),URL.revokeObjectURL(t),n.remove()}a&&clearTimeout(a),u.abort("download")};return t>0&&(a=Number(setTimeout((()=>{u.abort("timeout")}),1e3*t))),this._core.startGetPCM(c).then((e=>e.pipeTo(new WritableStream({write(e){e.forEach(((e,t)=>l[t]=l[t]?l[t].concat(e[0]):[e[0]]))}}),u).catch((()=>h)))),{download:h,onDumpEnd:()=>{u.abort("timeout")}}}};return ey([oy(300,(()=>"export"))],Yy.prototype,"onExportClick",1),ey([oy(300,(()=>"upload"))],Yy.prototype,"onUploadClick",1),Yy}));
|