trtc-cloud-js-sdk 2.10.4-beta.2 → 2.10.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/trtc-cloud-js-sdk.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trtc-cloud-js-sdk",
|
|
3
|
-
"version": "2.10.4-beta.
|
|
3
|
+
"version": "2.10.4-beta.3",
|
|
4
4
|
"description": "Tencent Cloud RTC SDK for Web And Electron",
|
|
5
5
|
"main": "trtc-cloud-js-sdk.js",
|
|
6
6
|
"keywords": [
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"author": "Tencent Cloud Client R&D Center",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"trtc-sdk-v5": "5.13.
|
|
20
|
+
"trtc-sdk-v5": "5.13.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/trtc-cloud-js-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,A){"object"==typeof exports&&"undefined"!=typeof module?A(exports,require("trtc-sdk-v5"),require("trtc-sdk-v5/plugins/video-effect/virtual-background")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/video-effect/virtual-background"],A):A((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.virtualBackground)}(this,(function(e,A,t){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(A),r=function(e,A){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,A){e.__proto__=A}||function(e,A){for(var t in A)Object.prototype.hasOwnProperty.call(A,t)&&(e[t]=A[t])},r(e,A)};var n=function(){return n=Object.assign||function(e){for(var A,t=1,i=arguments.length;t<i;t++)for(var o in A=arguments[t])Object.prototype.hasOwnProperty.call(A,o)&&(e[o]=A[o]);return e},n.apply(this,arguments)};function s(e,A,t,i){return new(t||(t=Promise))((function(o,r){function n(e){try{a(i.next(e))}catch(A){r(A)}}function s(e){try{a(i.throw(e))}catch(A){r(A)}}function a(e){var A;e.done?o(e.value):(A=e.value,A instanceof t?A:new t((function(e){e(A)}))).then(n,s)}a((i=i.apply(e,A||[])).next())}))}function a(e,A){var t,i,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(a){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(n=0)),n;)try{if(t=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(!(o=n.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){n=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(6===s[0]&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=A.call(e,n)}catch(a){s=[6,a],i=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function g(e){var A="function"==typeof Symbol&&Symbol.iterator,t=A&&e[A],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,A,t){if(t||2===arguments.length)for(var i,o=0,r=A.length;o<r;o++)!i&&o in A||(i||(i=Array.prototype.slice.call(A,0,o)),i[o]=A[o]);return e.concat(i||Array.prototype.slice.call(A))}function u(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A,t=e[Symbol.asyncIterator];return t?t.call(e):(e=g(e),A={},i("next"),i("throw"),i("return"),A[Symbol.asyncIterator]=function(){return this},A);function i(t){A[t]=e[t]&&function(A){return new Promise((function(i,o){(function(e,A,t,i){Promise.resolve(i).then((function(A){e({value:A,done:t})}),A)})(i,o,(A=e[t](A)).done,A.value)}))}}}var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(e,A){return e(A={exports:{}},A.exports),A.exports}var l,d,h,B,E,Q,p,f,T=I((function(e){var A=Object.prototype.hasOwnProperty,t="~";function i(){}function o(e,A,t){this.fn=e,this.context=A,this.once=t||!1}function r(e,A,i,r,n){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new o(i,r||e,n),a=t?t+A:A;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],s]:e._events[a].push(s):(e._events[a]=s,e._eventsCount++),e}function n(e,A){0==--e._eventsCount?e._events=new i:delete e._events[A]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(t=!1)),s.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)A.call(e,i)&&o.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var A=t?t+e:e,i=this._events[A];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,r=i.length,n=new Array(r);o<r;o++)n[o]=i[o].fn;return n},s.prototype.listenerCount=function(e){var A=t?t+e:e,i=this._events[A];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,A,i,o,r,n){var s=t?t+e:e;if(!this._events[s])return!1;var a,g,c=this._events[s],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,A),!0;case 3:return c.fn.call(c.context,A,i),!0;case 4:return c.fn.call(c.context,A,i,o),!0;case 5:return c.fn.call(c.context,A,i,o,r),!0;case 6:return c.fn.call(c.context,A,i,o,r,n),!0}for(g=1,a=new Array(u-1);g<u;g++)a[g-1]=arguments[g];c.fn.apply(c.context,a)}else{var C,I=c.length;for(g=0;g<I;g++)switch(c[g].once&&this.removeListener(e,c[g].fn,void 0,!0),u){case 1:c[g].fn.call(c[g].context);break;case 2:c[g].fn.call(c[g].context,A);break;case 3:c[g].fn.call(c[g].context,A,i);break;case 4:c[g].fn.call(c[g].context,A,i,o);break;default:if(!a)for(C=1,a=new Array(u-1);C<u;C++)a[C-1]=arguments[C];c[g].fn.apply(c[g].context,a)}}return!0},s.prototype.on=function(e,A,t){return r(this,e,A,t,!1)},s.prototype.once=function(e,A,t){return r(this,e,A,t,!0)},s.prototype.removeListener=function(e,A,i,o){var r=t?t+e:e;if(!this._events[r])return this;if(!A)return n(this,r),this;var s=this._events[r];if(s.fn)s.fn!==A||o&&!s.once||i&&s.context!==i||n(this,r);else{for(var a=0,g=[],c=s.length;a<c;a++)(s[a].fn!==A||o&&!s[a].once||i&&s[a].context!==i)&&g.push(s[a]);g.length?this._events[r]=1===g.length?g[0]:g:n(this,r)}return this},s.prototype.removeAllListeners=function(e){var A;return e?(A=t?t+e:e,this._events[A]&&n(this,A)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=t,s.EventEmitter=s,e.exports=s}));e.TRTCVideoResolution=void 0,(l=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[l.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",l[l.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",l[l.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",l[l.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",l[l.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",l[l.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",l[l.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",l[l.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",l[l.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",l[l.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",l[l.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",l[l.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",l[l.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",l[l.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",l[l.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",l[l.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",l[l.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",l[l.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",l[l.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",l[l.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(d=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[d.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",d[d.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",d[d.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(h=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[h.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",h[h.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(B=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[B.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",B[B.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",B[B.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(E=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[E.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",E[E.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(Q=e.TRTCAppScene||(e.TRTCAppScene={}))[Q.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",Q[Q.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",Q[Q.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",Q[Q.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(p=e.TRTCRoleType||(e.TRTCRoleType={}))[p.TRTCRoleAnchor=20]="TRTCRoleAnchor",p[p.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(f=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[f.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",f[f.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",f[f.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var y,v,m=function(e,A,t,i,o){void 0===e&&(e=""),void 0===A&&(A=""),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=""),this.deviceId=e,this.deviceName=A,this.kind=t,this.label=i,this.groupId=o};e.TRTCDeviceState=void 0,(y=e.TRTCDeviceState||(e.TRTCDeviceState={}))[y.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",y[y.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",y[y.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(v=e.TRTCDeviceType||(e.TRTCDeviceType={}))[v.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",v[v.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",v[v.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",v[v.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var R,w=function(A,t,i,o,r,n,s,a,g,c,u){void 0===A&&(A=0),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=0),void 0===r&&(r=""),void 0===n&&(n=e.TRTCRoleType.TRTCRoleAnchor),void 0===s&&(s=null),void 0===g&&(g=null),void 0===c&&(c=null),void 0===u&&(u=30),this.sdkAppId=A,this.userId=t,this.userSig=i,this.roomId=o,this.strRoomId=r,this.role=n,this.privateMapKey=s,this.streamId=g,this.userDefineRecordId=c,this.frameWorkType=u},S=function(A,t,i,o){void 0===A&&(A=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===t&&(t=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===i&&(i=15),void 0===o&&(o=550),this.videoResolution=A,this.resMode=t,this.videoFps=i,this.videoBitrate=o};e.TRTCVideoRotation=void 0,(R=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[R.TRTCVideoRotation0=0]="TRTCVideoRotation0",R[R.TRTCVideoRotation90=1]="TRTCVideoRotation90",R[R.TRTCVideoRotation180=2]="TRTCVideoRotation180",R[R.TRTCVideoRotation270=3]="TRTCVideoRotation270";var M,D=function(A,t,i){void 0===A&&(A=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===t&&(t=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===i&&(i=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=A,this.fillMode=t,this.mirrorType=i};e.TRTCQuality=void 0,(M=e.TRTCQuality||(e.TRTCQuality={}))[M.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",M[M.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",M[M.TRTCQuality_Good=2]="TRTCQuality_Good",M[M.TRTCQuality_Poor=3]="TRTCQuality_Poor",M[M.TRTCQuality_Bad=4]="TRTCQuality_Bad",M[M.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",M[M.TRTCQuality_Down=6]="TRTCQuality_Down";var b,L,_,N=function(A,t){void 0===A&&(A=""),void 0===t&&(t=e.TRTCQuality.TRTCQuality_Unknown),this.userId=A,this.quality=t},G=function(e,A){void 0===e&&(e=""),void 0===A&&(A=0),this.userId=e,this.volume=A},k=function(e,A,t){void 0===e&&(e=0),void 0===A&&(A=0),void 0===t&&(t=null),this.appId=e,this.bizId=A,this.url=t},F=function(A,t,i,o,r,n,s){void 0===A&&(A=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===n&&(n=0),void 0===s&&(s=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.width=A,this.height=t,this.frameRate=i,this.videoBitrate=o,this.audioBitrate=n,this.streamType=s},V=function(A,t,i,o,r,n,s,a,g,c,u,C,I,l){void 0===A&&(A=""),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===l&&(l=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=A,this.width=i,this.height=o,this.frameRate=r,this.videoBitrate=n,this.audioBitrate=a,this.streamType=l},P=function(e,A,t,i,o,r,n,s,a,g,c){void 0===e&&(e=0),void 0===A&&(A=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=[]),void 0===a&&(a=0),void 0===g&&(g=[]),void 0===c&&(c=0),this.upLoss=e,this.downLoss=A,this.rtt=o,this.receivedBytes=r,this.sentBytes=n,this.localStatisticsArray=s,this.localStatisticsArraySize=a,this.remoteStatisticsArray=g,this.remoteStatisticsArraySize=c};e.TRTCVideoResolutionMode=void 0,(b=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[b.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",b[b.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(L=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[L.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",L[L.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(_=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[_.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",_[_.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var x,Y,H=function(A,t){void 0===A&&(A=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===t&&(t=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=A,this.controlMode=t},U=function(e,A,t,i){void 0===e&&(e=new ArrayBuffer(0)),void 0===A&&(A=0),void 0===t&&(t=0),void 0===i&&(i=0),this.buffer=e,this.length=A,this.width=t,this.height=i};e.TRTCLogLevel=void 0,(x=e.TRTCLogLevel||(e.TRTCLogLevel={}))[x.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",x[x.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",x[x.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",x[x.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",x[x.TRTCLogLevelError=4]="TRTCLogLevelError",x[x.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",x[x.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(Y=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[Y.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",Y[Y.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",Y[Y.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",Y[Y.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var O,K=function(A,t,i,o,r,n){void 0===A&&(A=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=new U),void 0===r&&(r=new U),void 0===n&&(n=!1),this.type=A,this.sourceId=t,this.sourceName=i,this.thumbBGRA=o,this.iconBGRA=r,this.isMinimizeWindow=n},J=function(e,A,t,i){void 0===e&&(e=0),void 0===A&&(A=0),void 0===t&&(t=0),void 0===i&&(i=0),this.left=e,this.top=A,this.right=t,this.bottom=i},j=function(A,t,i,o,r,n,s,a,g,c,u,C,I,l,d){void 0===A&&(A=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=15),void 0===a&&(a=2),void 0===g&&(g=0),void 0===c&&(c=""),void 0===u&&(u=64),void 0===C&&(C=48e3),void 0===I&&(I=1),void 0===l&&(l=[]),void 0===d&&(d=""),this.mode=A,this.appId=t,this.bizId=i,this.videoWidth=o,this.videoHeight=r,this.videoBitrate=n,this.videoFramerate=s,this.videoGOP=a,this.backgroundColor=g,this.backgroundImage=c,this.audioSampleRate=u,this.audioBitrate=C,this.audioChannels=I,this.mixUsersArray=l,this.mixUsersArraySize=l.length,this.streamId=d};e.TRTCTranscodingConfigMode=void 0,(O=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[O.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",O[O.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",O[O.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",O[O.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",O[O.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",O[O.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",O[O.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",O[O.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",O[O.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",O[O.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var z,W,Z=function(A,t,i,o,r,n,s,a){void 0===A&&(A=""),void 0===t&&(t=""),void 0===i&&(i=null),void 0===o&&(o=0),void 0===r&&(r=!1),void 0===n&&(n=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),void 0===s&&(s=e.TRTCMixInputType.TRTCMixInputTypeUndefined),void 0===a&&(a=0),this.userId=A,this.roomId=t,this.rect=i,this.zOrder=o,this.pureAudio=r,this.streamType=n,this.inputType=s,this.renderMode=a};e.TRTCMixInputType=void 0,(z=e.TRTCMixInputType||(e.TRTCMixInputType={}))[z.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",z[z.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",z[z.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",z[z.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(W=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[W.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",W[W.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",W[W.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",W[W.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var X,q=function(e,A,t,i,o,r){void 0===e&&(e=!0),void 0===A&&(A=!0),void 0===t&&(t=!0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=!1),this.enableCaptureMouse=e,this.enableHighLight=A,this.enableHighPerformance=t,this.highLightColor=i,this.highLightWidth=o,this.enableCaptureChildWindow=r},$="onError",ee="onWarning",Ae="rtc",te="live",ie="VirtualBackground",oe="BasicBeauty",re="blur",ne="image",se={20:"anchor",21:"audience"},ae={0:Ae,1:te,2:Ae,3:te};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(X||(X={}));var ge="enum";function ce(){return Math.floor(performance.now())}var ue=function(e){return void 0===e},Ce=function(e){return"number"==typeof e},Ie=function(e){return"boolean"==typeof e};function le(e){if("string"!=typeof e)return e;var A;try{var t=JSON.parse(e);A="object"==typeof t&&t?t:e}catch(i){A=e}return A}function de(e){return null==e}function he(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];return e.reduce((function(e,A){return Object.keys(A).forEach((function(t){e[t]&&"object"==typeof e[t]?e[t]=he(e[t],A[t]):e[t]=A[t]})),e}),{})}function Be(e){var A=null;return e instanceof MediaStream||e instanceof MediaStreamTrack?e:([Date,RegExp,Set,WeakSet,Map,WeakMap,Error].includes(null==e?void 0:e.constructor)?A=new e.constructor(e):Array.isArray(e)?(A=[],e.forEach((function(e,t){A[t]=Be(e)}))):"object"==typeof e&&null!==e?(A={},Object.keys(e).forEach((function(t){Object.hasOwnProperty.call(e,t)&&(A[t]=Be(e[t]))}))):A=e,A)}var Ee,Qe,pe=function(e){return e&&e.Math===Math&&e},fe=pe("object"==typeof globalThis&&globalThis)||pe("object"==typeof window&&window)||pe("object"==typeof self&&self)||pe("object"==typeof C&&C)||function(){return this}()||C||Function("return this")(),Te=function(e){try{return!!e()}catch(A){return!0}},ye=!Te((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ve=!Te((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),me=Function.prototype.call,Re=ve?me.bind(me):function(){return me.apply(me,arguments)},we={}.propertyIsEnumerable,Se=Object.getOwnPropertyDescriptor,Me={f:Se&&!we.call({1:2},1)?function(e){var A=Se(this,e);return!!A&&A.enumerable}:we},De=function(e,A){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:A}},be=Function.prototype,Le=be.call,_e=ve&&be.bind.bind(Le,Le),Ne=ve?_e:function(e){return function(){return Le.apply(e,arguments)}},Ge=Ne({}.toString),ke=Ne("".slice),Fe=function(e){return ke(Ge(e),8,-1)},Ve=Object,Pe=Ne("".split),xe=Te((function(){return!Ve("z").propertyIsEnumerable(0)}))?function(e){return"String"===Fe(e)?Pe(e,""):Ve(e)}:Ve,Ye=function(e){return null==e},He=TypeError,Ue=function(e){if(Ye(e))throw He("Can't call method on "+e);return e},Oe=function(e){return xe(Ue(e))},Ke="object"==typeof document&&document.all,Je={all:Ke,IS_HTMLDDA:void 0===Ke&&void 0!==Ke},je=Je.all,ze=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===je}:function(e){return"function"==typeof e},We=Je.all,Ze=Je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ze(e)||e===We}:function(e){return"object"==typeof e?null!==e:ze(e)},Xe=function(e,A){return arguments.length<2?(t=fe[e],ze(t)?t:void 0):fe[e]&&fe[e][A];var t},qe=Ne({}.isPrototypeOf),$e="undefined"!=typeof navigator&&String(navigator.userAgent)||"",eA=fe.process,AA=fe.Deno,tA=eA&&eA.versions||AA&&AA.version,iA=tA&&tA.v8;iA&&(Qe=(Ee=iA.split("."))[0]>0&&Ee[0]<4?1:+(Ee[0]+Ee[1])),!Qe&&$e&&(!(Ee=$e.match(/Edge\/(\d+)/))||Ee[1]>=74)&&(Ee=$e.match(/Chrome\/(\d+)/))&&(Qe=+Ee[1]);var oA=Qe,rA=fe.String,nA=!!Object.getOwnPropertySymbols&&!Te((function(){var e=Symbol("symbol detection");return!rA(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&oA&&oA<41})),sA=nA&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,aA=Object,gA=sA?function(e){return"symbol"==typeof e}:function(e){var A=Xe("Symbol");return ze(A)&&qe(A.prototype,aA(e))},cA=String,uA=TypeError,CA=function(e){if(ze(e))return e;throw uA(function(e){try{return cA(e)}catch(A){return"Object"}}(e)+" is not a function")},IA=function(e,A){var t=e[A];return Ye(t)?void 0:CA(t)},lA=TypeError,dA=Object.defineProperty,hA=function(e,A){try{dA(fe,e,{value:A,configurable:!0,writable:!0})}catch(t){fe[e]=A}return A},BA="__core-js_shared__",EA=fe[BA]||hA(BA,{}),QA=I((function(e){(e.exports=function(e,A){return EA[e]||(EA[e]=void 0!==A?A:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),pA=Object,fA=function(e){return pA(Ue(e))},TA=Ne({}.hasOwnProperty),yA=Object.hasOwn||function(e,A){return TA(fA(e),A)},vA=0,mA=Math.random(),RA=Ne(1..toString),wA=function(e){return"Symbol("+(void 0===e?"":e)+")_"+RA(++vA+mA,36)},SA=fe.Symbol,MA=QA("wks"),DA=sA?SA.for||SA:SA&&SA.withoutSetter||wA,bA=function(e){return yA(MA,e)||(MA[e]=nA&&yA(SA,e)?SA[e]:DA("Symbol."+e)),MA[e]},LA=TypeError,_A=bA("toPrimitive"),NA=function(e,A){if(!Ze(e)||gA(e))return e;var t,i=IA(e,_A);if(i){if(void 0===A&&(A="default"),t=Re(i,e,A),!Ze(t)||gA(t))return t;throw LA("Can't convert object to primitive value")}return void 0===A&&(A="number"),function(e,A){var t,i;if("string"===A&&ze(t=e.toString)&&!Ze(i=Re(t,e)))return i;if(ze(t=e.valueOf)&&!Ze(i=Re(t,e)))return i;if("string"!==A&&ze(t=e.toString)&&!Ze(i=Re(t,e)))return i;throw lA("Can't convert object to primitive value")}(e,A)},GA=function(e){var A=NA(e,"string");return gA(A)?A:A+""},kA=fe.document,FA=Ze(kA)&&Ze(kA.createElement),VA=function(e){return FA?kA.createElement(e):{}},PA=!ye&&!Te((function(){return 7!==Object.defineProperty(VA("div"),"a",{get:function(){return 7}}).a})),xA=Object.getOwnPropertyDescriptor,YA={f:ye?xA:function(e,A){if(e=Oe(e),A=GA(A),PA)try{return xA(e,A)}catch(t){}if(yA(e,A))return De(!Re(Me.f,e,A),e[A])}},HA=ye&&Te((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),UA=String,OA=TypeError,KA=function(e){if(Ze(e))return e;throw OA(UA(e)+" is not an object")},JA=TypeError,jA=Object.defineProperty,zA=Object.getOwnPropertyDescriptor,WA="enumerable",ZA="configurable",XA="writable",qA={f:ye?HA?function(e,A,t){if(KA(e),A=GA(A),KA(t),"function"==typeof e&&"prototype"===A&&"value"in t&&XA in t&&!t[XA]){var i=zA(e,A);i&&i[XA]&&(e[A]=t.value,t={configurable:ZA in t?t[ZA]:i[ZA],enumerable:WA in t?t[WA]:i[WA],writable:!1})}return jA(e,A,t)}:jA:function(e,A,t){if(KA(e),A=GA(A),KA(t),PA)try{return jA(e,A,t)}catch(i){}if("get"in t||"set"in t)throw JA("Accessors not supported");return"value"in t&&(e[A]=t.value),e}},$A=ye?function(e,A,t){return qA.f(e,A,De(1,t))}:function(e,A,t){return e[A]=t,e},et=Function.prototype,At=ye&&Object.getOwnPropertyDescriptor,tt=yA(et,"name"),it={EXISTS:tt,PROPER:tt&&"something"===function(){}.name,CONFIGURABLE:tt&&(!ye||ye&&At(et,"name").configurable)},ot=Ne(Function.toString);ze(EA.inspectSource)||(EA.inspectSource=function(e){return ot(e)});var rt,nt,st,at=EA.inspectSource,gt=fe.WeakMap,ct=ze(gt)&&/native code/.test(String(gt)),ut=QA("keys"),Ct=function(e){return ut[e]||(ut[e]=wA(e))},It={},lt="Object already initialized",dt=fe.TypeError,ht=fe.WeakMap;if(ct||EA.state){var Bt=EA.state||(EA.state=new ht);Bt.get=Bt.get,Bt.has=Bt.has,Bt.set=Bt.set,rt=function(e,A){if(Bt.has(e))throw dt(lt);return A.facade=e,Bt.set(e,A),A},nt=function(e){return Bt.get(e)||{}},st=function(e){return Bt.has(e)}}else{var Et=Ct("state");It[Et]=!0,rt=function(e,A){if(yA(e,Et))throw dt(lt);return A.facade=e,$A(e,Et,A),A},nt=function(e){return yA(e,Et)?e[Et]:{}},st=function(e){return yA(e,Et)}}var Qt={set:rt,get:nt,has:st,enforce:function(e){return st(e)?nt(e):rt(e,{})},getterFor:function(e){return function(A){var t;if(!Ze(A)||(t=nt(A)).type!==e)throw dt("Incompatible receiver, "+e+" required");return t}}},pt=I((function(e){var A=it.CONFIGURABLE,t=Qt.enforce,i=Qt.get,o=String,r=Object.defineProperty,n=Ne("".slice),s=Ne("".replace),a=Ne([].join),g=ye&&!Te((function(){return 8!==r((function(){}),"length",{value:8}).length})),c=String(String).split("String"),u=e.exports=function(e,i,u){"Symbol("===n(o(i),0,7)&&(i="["+s(o(i),/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(i="get "+i),u&&u.setter&&(i="set "+i),(!yA(e,"name")||A&&e.name!==i)&&(ye?r(e,"name",{value:i,configurable:!0}):e.name=i),g&&u&&yA(u,"arity")&&e.length!==u.arity&&r(e,"length",{value:u.arity});try{u&&yA(u,"constructor")&&u.constructor?ye&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(I){}var C=t(e);return yA(C,"source")||(C.source=a(c,"string"==typeof i?i:"")),e};Function.prototype.toString=u((function(){return ze(this)&&i(this).source||at(this)}),"toString")})),ft=function(e,A,t,i){i||(i={});var o=i.enumerable,r=void 0!==i.name?i.name:A;if(ze(t)&&pt(t,r,i),i.global)o?e[A]=t:hA(A,t);else{try{i.unsafe?e[A]&&(o=!0):delete e[A]}catch(n){}o?e[A]=t:qA.f(e,A,{value:t,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},Tt=Math.ceil,yt=Math.floor,vt=Math.trunc||function(e){var A=+e;return(A>0?yt:Tt)(A)},mt=function(e){var A=+e;return A!=A||0===A?0:vt(A)},Rt=Math.max,wt=Math.min,St=Math.min,Mt=function(e){return e>0?St(mt(e),9007199254740991):0},Dt=function(e){return Mt(e.length)},bt=function(e){return function(A,t,i){var o,r=Oe(A),n=Dt(r),s=function(e,A){var t=mt(e);return t<0?Rt(t+A,0):wt(t,A)}(i,n);if(e&&t!=t){for(;n>s;)if((o=r[s++])!=o)return!0}else for(;n>s;s++)if((e||s in r)&&r[s]===t)return e||s||0;return!e&&-1}},Lt={includes:bt(!0),indexOf:bt(!1)}.indexOf,_t=Ne([].push),Nt=function(e,A){var t,i=Oe(e),o=0,r=[];for(t in i)!yA(It,t)&&yA(i,t)&&_t(r,t);for(;A.length>o;)yA(i,t=A[o++])&&(~Lt(r,t)||_t(r,t));return r},Gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=Gt.concat("length","prototype"),Ft={f:Object.getOwnPropertyNames||function(e){return Nt(e,kt)}},Vt={f:Object.getOwnPropertySymbols},Pt=Ne([].concat),xt=Xe("Reflect","ownKeys")||function(e){var A=Ft.f(KA(e)),t=Vt.f;return t?Pt(A,t(e)):A},Yt=function(e,A,t){for(var i=xt(A),o=qA.f,r=YA.f,n=0;n<i.length;n++){var s=i[n];yA(e,s)||t&&yA(t,s)||o(e,s,r(A,s))}},Ht=/#|\.prototype\./,Ut=function(e,A){var t=Kt[Ot(e)];return t===jt||t!==Jt&&(ze(A)?Te(A):!!A)},Ot=Ut.normalize=function(e){return String(e).replace(Ht,".").toLowerCase()},Kt=Ut.data={},Jt=Ut.NATIVE="N",jt=Ut.POLYFILL="P",zt=Ut,Wt=YA.f,Zt=function(e,A){var t,i,o,r,n,s=e.target,a=e.global,g=e.stat;if(t=a?fe:g?fe[s]||hA(s,{}):(fe[s]||{}).prototype)for(i in A){if(r=A[i],o=e.dontCallGetSet?(n=Wt(t,i))&&n.value:t[i],!zt(a?i:s+(g?".":"#")+i,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;Yt(r,o)}(e.sham||o&&o.sham)&&$A(r,"sham",!0),ft(t,i,r,e)}},Xt={};Xt[bA("toStringTag")]="z";var qt,$t="[object z]"===String(Xt),ei=bA("toStringTag"),Ai=Object,ti="Arguments"===Fe(function(){return arguments}()),ii=$t?Fe:function(e){var A,t,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,A){try{return e[A]}catch(t){}}(A=Ai(e),ei))?t:ti?Fe(A):"Object"===(i=Fe(A))&&ze(A.callee)?"Arguments":i},oi=String,ri=function(e){if("Symbol"===ii(e))throw TypeError("Cannot convert a Symbol value to a string");return oi(e)},ni=function(){var e=KA(this),A="";return e.hasIndices&&(A+="d"),e.global&&(A+="g"),e.ignoreCase&&(A+="i"),e.multiline&&(A+="m"),e.dotAll&&(A+="s"),e.unicode&&(A+="u"),e.unicodeSets&&(A+="v"),e.sticky&&(A+="y"),A},si=fe.RegExp,ai=Te((function(){var e=si("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),gi=ai||Te((function(){return!si("a","y").sticky})),ci={BROKEN_CARET:ai||Te((function(){var e=si("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:gi,UNSUPPORTED_Y:ai},ui=Object.keys||function(e){return Nt(e,Gt)},Ci=ye&&!HA?Object.defineProperties:function(e,A){KA(e);for(var t,i=Oe(A),o=ui(A),r=o.length,n=0;r>n;)qA.f(e,t=o[n++],i[t]);return e},Ii={f:Ci},li=Xe("document","documentElement"),di="prototype",hi="script",Bi=Ct("IE_PROTO"),Ei=function(){},Qi=function(e){return"<"+hi+">"+e+"</"+hi+">"},pi=function(e){e.write(Qi("")),e.close();var A=e.parentWindow.Object;return e=null,A},fi=function(){try{qt=new ActiveXObject("htmlfile")}catch(o){}var e,A,t;fi="undefined"!=typeof document?document.domain&&qt?pi(qt):(A=VA("iframe"),t="java"+hi+":",A.style.display="none",li.appendChild(A),A.src=String(t),(e=A.contentWindow.document).open(),e.write(Qi("document.F=Object")),e.close(),e.F):pi(qt);for(var i=Gt.length;i--;)delete fi[di][Gt[i]];return fi()};It[Bi]=!0;var Ti,yi,vi=Object.create||function(e,A){var t;return null!==e?(Ei[di]=KA(e),t=new Ei,Ei[di]=null,t[Bi]=e):t=fi(),void 0===A?t:Ii.f(t,A)},mi=fe.RegExp,Ri=Te((function(){var e=mi(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),wi=fe.RegExp,Si=Te((function(){var e=wi("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Mi=Qt.get,Di=QA("native-string-replace",String.prototype.replace),bi=RegExp.prototype.exec,Li=bi,_i=Ne("".charAt),Ni=Ne("".indexOf),Gi=Ne("".replace),ki=Ne("".slice),Fi=(yi=/b*/g,Re(bi,Ti=/a/,"a"),Re(bi,yi,"a"),0!==Ti.lastIndex||0!==yi.lastIndex),Vi=ci.BROKEN_CARET,Pi=void 0!==/()??/.exec("")[1];(Fi||Pi||Vi||Ri||Si)&&(Li=function(e){var A,t,i,o,r,n,s,a=this,g=Mi(a),c=ri(e),u=g.raw;if(u)return u.lastIndex=a.lastIndex,A=Re(Li,u,c),a.lastIndex=u.lastIndex,A;var C=g.groups,I=Vi&&a.sticky,l=Re(ni,a),d=a.source,h=0,B=c;if(I&&(l=Gi(l,"y",""),-1===Ni(l,"g")&&(l+="g"),B=ki(c,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==_i(c,a.lastIndex-1))&&(d="(?: "+d+")",B=" "+B,h++),t=new RegExp("^(?:"+d+")",l)),Pi&&(t=new RegExp("^"+d+"$(?!\\s)",l)),Fi&&(i=a.lastIndex),o=Re(bi,I?t:a,B),I?o?(o.input=ki(o.input,h),o[0]=ki(o[0],h),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Fi&&o&&(a.lastIndex=a.global?o.index+o[0].length:i),Pi&&o&&o.length>1&&Re(Di,o[0],t,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(o[r]=void 0)})),o&&C)for(o.groups=n=vi(null),r=0;r<C.length;r++)n[(s=C[r])[0]]=o[s[1]];return o});var xi=Li;Zt({target:"RegExp",proto:!0,forced:/./.exec!==xi},{exec:xi});var Yi="\t\n\v\f\r \u2028\u2029\ufeff",Hi=Ne("".replace),Ui=RegExp("^["+Yi+"]+"),Oi=RegExp("(^|[^"+Yi+"])["+Yi+"]+$"),Ki=function(e){return function(A){var t=ri(Ue(A));return 1&e&&(t=Hi(t,Ui,"")),2&e&&(t=Hi(t,Oi,"$1")),t}},Ji={start:Ki(1),end:Ki(2),trim:Ki(3)}.trim,ji=Ne("".charAt),zi=fe.parseFloat,Wi=fe.Symbol,Zi=Wi&&Wi.iterator,Xi=1/zi(Yi+"-0")!=-Infinity||Zi&&!Te((function(){zi(Object(Zi))}))?function(e){var A=Ji(ri(e)),t=zi(A);return 0===t&&"-"===ji(A,0)?-0:t}:zi;Zt({global:!0,forced:parseFloat!==Xi},{parseFloat:Xi});var qi=function(e){if("Function"===Fe(e))return Ne(e)},$i=bA("species"),eo=RegExp.prototype,Ao=Ne("".charAt),to=Ne("".charCodeAt),io=Ne("".slice),oo=function(e){return function(A,t){var i,o,r=ri(Ue(A)),n=mt(t),s=r.length;return n<0||n>=s?e?"":void 0:(i=to(r,n))<55296||i>56319||n+1===s||(o=to(r,n+1))<56320||o>57343?e?Ao(r,n):i:e?io(r,n,n+2):o-56320+(i-55296<<10)+65536}},ro={codeAt:oo(!1),charAt:oo(!0)}.charAt,no=function(e,A,t){return A+(t?ro(e,A).length:1)},so=TypeError,ao=function(e,A){var t=e.exec;if(ze(t)){var i=Re(t,e,A);return null!==i&&KA(i),i}if("RegExp"===Fe(e))return Re(xi,e,A);throw so("RegExp#exec called on incompatible receiver")};!function(e,A,t,i){var o=bA(e),r=!Te((function(){var A={};return A[o]=function(){return 7},7!==""[e](A)})),n=r&&!Te((function(){var A=!1,t=/a/;return"split"===e&&((t={}).constructor={},t.constructor[$i]=function(){return t},t.flags="",t[o]=/./[o]),t.exec=function(){return A=!0,null},t[o](""),!A}));if(!r||!n||t){var s=qi(/./[o]),a=A(o,""[e],(function(e,A,t,i,o){var n=qi(e),a=A.exec;return a===xi||a===eo.exec?r&&!o?{done:!0,value:s(A,t,i)}:{done:!0,value:n(t,A,i)}:{done:!1}}));ft(String.prototype,e,a[0]),ft(eo,o,a[1])}i&&$A(eo[o],"sham",!0)}("match",(function(e,A,t){return[function(A){var t=Ue(this),i=Ye(A)?void 0:IA(A,e);return i?Re(i,A,t):new RegExp(A)[e](ri(t))},function(e){var i=KA(this),o=ri(e),r=t(A,i,o);if(r.done)return r.value;if(!i.global)return ao(i,o);var n=i.unicode;i.lastIndex=0;for(var s,a=[],g=0;null!==(s=ao(i,o));){var c=ri(s[0]);a[g]=c,""===c&&(i.lastIndex=no(o,Mt(i.lastIndex),n)),g++}return 0===g?null:a}]}));var go=Array.isArray||function(e){return"Array"===Fe(e)},co=TypeError,uo=function(e){if(e>9007199254740991)throw co("Maximum allowed index exceeded");return e},Co=function(e,A,t){var i=GA(A);i in e?qA.f(e,i,De(0,t)):e[i]=t},Io=function(){},lo=[],ho=Xe("Reflect","construct"),Bo=/^\s*(?:class|function)\b/,Eo=Ne(Bo.exec),Qo=!Bo.exec(Io),po=function(e){if(!ze(e))return!1;try{return ho(Io,lo,e),!0}catch(A){return!1}},fo=function(e){if(!ze(e))return!1;switch(ii(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qo||!!Eo(Bo,at(e))}catch(A){return!0}};fo.sham=!0;var To,yo=!ho||Te((function(){var e;return po(po.call)||!po(Object)||!po((function(){e=!0}))||e}))?fo:po,vo=bA("species"),mo=Array,Ro=function(e,A){return new(function(e){var A;return go(e)&&(A=e.constructor,(yo(A)&&(A===mo||go(A.prototype))||Ze(A)&&null===(A=A[vo]))&&(A=void 0)),void 0===A?mo:A}(e))(0===A?0:A)},wo=bA("species"),So=bA("isConcatSpreadable"),Mo=oA>=51||!Te((function(){var e=[];return e[So]=!1,e.concat()[0]!==e})),Do=function(e){if(!Ze(e))return!1;var A=e[So];return void 0!==A?!!A:go(e)};Zt({target:"Array",proto:!0,arity:1,forced:!(Mo&&(To="concat",oA>=51||!Te((function(){var e=[];return(e.constructor={})[wo]=function(){return{foo:1}},1!==e[To](Boolean).foo}))))},{concat:function(e){var A,t,i,o,r,n=fA(this),s=Ro(n,0),a=0;for(A=-1,i=arguments.length;A<i;A++)if(Do(r=-1===A?n:arguments[A]))for(o=Dt(r),uo(a+o),t=0;t<o;t++,a++)t in r&&Co(s,a,r[t]);else uo(a+1),Co(s,a++,r);return s.length=a,s}});var bo=window.navigator&&window.navigator.userAgent||"",Lo=/AppleWebKit\/([\d.]+)/i.exec(bo);Lo&&parseFloat(Lo.pop());var _o=/iPad/i.test(bo),No=/iPhone/i.test(bo)&&!_o,Go=/iPod/i.test(bo),ko=No||_o||Go,Fo=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(bo);ko&&function(){var e=bo.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Vo=/Android/i.test(bo);Vo&&function(){var e=bo.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var A=e[1]&&parseFloat(e[1]),t=e[2]&&parseFloat(e[2]);A&&t&&parseFloat("".concat(e[1],".").concat(e[2]))}();Vo&&/webkit/i.test(bo),/Firefox/i.test(bo)&&function(){var e=bo.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Po=/Edge\//i.test(bo);Po&&function(){var e=bo.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var xo=/Edg\//i.test(bo);xo&&function(){var e=bo.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Yo=/SogouMobileBrowser\//i.test(bo);Yo&&function(){var e=bo.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Ho=/MetaSr\s/i.test(bo);Ho&&function(){var e=bo.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Uo=/TBS\/\d+/i.test(bo);Uo&&function(){var e=bo.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var Oo=/XWEB\/\d+/i.test(bo);Oo&&function(){var e=bo.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(bo),/MSIE\/\d+/i.test(bo)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(bo),A=e&&parseFloat(e[1]);!A&&/Trident\/7.0/i.test(bo)&&/rv:11.0/.test(bo)&&(A=11)}(),/(micromessenger|webbrowser)/i.test(bo)&&function(){var e=bo.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Ko=!Uo&&/MQQBrowser\/\d+/i.test(bo)&&/COVC\/\d+/i.test(bo),Jo=!Uo&&/MQQBrowser\/\d+/i.test(bo)&&!/COVC\/\d+/i.test(bo);(Jo||Ko)&&function(){var e=bo.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var jo=!Uo&&/ QQBrowser\/\d+/i.test(bo);jo&&function(){var e=bo.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var zo=!Uo&&/QQBrowserLite\/\d+/i.test(bo);zo&&function(){var e=bo.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var Wo=!Uo&&/MQBHD\/\d+/i.test(bo);Wo&&function(){var e=bo.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(bo),!ko&&/MAC OS X/i.test(bo),!Vo&&/Linux/i.test(bo),/MicroMessenger/i.test(bo),/UCBrowser/i.test(bo),/Electron/i.test(bo);var Zo=/MiuiBrowser/i.test(bo);Zo&&function(){var e=bo.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Xo=/HuaweiBrowser/i.test(bo);/Huawei/i.test(bo),Xo&&function(){var e=bo.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var qo=/SamsungBrowser/i.test(bo);qo&&function(){var e=bo.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var $o=/HeyTapBrowser/i.test(bo);$o&&function(){var e=bo.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var er=/VivoBrowser/i.test(bo);er&&function(){var e=bo.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Ar,tr,ir,or=/Chrome/i.test(bo),rr=!Po&&!Ho&&!Yo&&!Uo&&!Oo&&!xo&&!jo&&!Zo&&!Xo&&!qo&&!$o&&!er&&/Chrome/i.test(bo);rr&&function(){var e=bo.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),rr&&function(){var e=bo.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!or&&!Jo&&!Ko&&!zo&&!Wo&&/Safari/i.test(bo)&&function(){var e=bo.match(/Version\/([\d.]+)/);e&&e[1]&&e[1]}(),"file:"===location.protocol||"localhost"===location.hostname||/^\d+\.\d+\.\d+\.\d+$/.test(location.hostname),function(e){e.LIVE="live",e.RTC="rtc"}(Ar||(Ar={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(tr||(tr={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(ir||(ir={}));var nr=-3340,sr=-1301,ar=-1314,gr=-1315,cr=-1316,ur=-1302,Cr=-1317,Ir=-1318,lr=-1319,dr=-70252,hr={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},Br={code:-1005,message:"not supported"},Er="2.10.4-beta.2",Qr=Object.defineProperty,pr=(e,A,t)=>((e,A,t)=>A in e?Qr(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t)(e,"symbol"!=typeof A?A+"":A,t);var fr,Tr=(fr="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var A,t,i=e;i.ready=new Promise(((e,i)=>{A=e,t=i}));var o=Object.assign({},i),r="";"undefined"!=typeof document&&document.currentScript&&(r=document.currentScript.src),fr&&(r=fr),r=0!==r.indexOf("blob:")?r.substr(0,r.replace(/[?#].*/,"").lastIndexOf("/")+1):"";var n,s=i.print||console.log.bind(console),a=i.printErr||console.error.bind(console);Object.assign(i,o),o=null,i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(n=i.wasmBinary),"object"!=typeof WebAssembly&&y("no native wasm support detected");var g,c,u,C,I,l,d,h,B=!1,E=[],Q=[],p=[],f=0,T=null;function y(e){i.onAbort&&i.onAbort(e),a(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var A=new WebAssembly.RuntimeError(e);throw t(A),A}var v,m,R="data:application/octet-stream;base64,",w=e=>e.startsWith(R);function S(e){return Promise.resolve().then((()=>function(e){if(e==v&&n)return new Uint8Array(n);var A=function(e){if(w(e))return function(e){for(var A=atob(e),t=new Uint8Array(A.length),i=0;i<A.length;++i)t[i]=A.charCodeAt(i);return t}(e.slice(R.length))}(e);if(A)return A;throw"both async and sync fetching of the wasm failed"}(e)))}w(v="data:application/octet-stream;base64,AGFzbQEAAAAB8gEfYAJ/fwBgAX8Bf2ADf39/AX9gAX8AYAN/f38AYAJ/fwF/YAR/f39/AGAAAGAFf39/f38AYAZ/f39/f38AYAR/f39/AX9gB39/f39/f38AYAN/fn8BfmAFf3x8fHwAYAZ/fHx8fHwAYAV/f39/fwF8YAl/f39/f39/f38AYAN/f38BfGAKf39/f39/f39/fwBgDX9/f39/f39/f39/f38AYAJ/fABgAn5/AX9gAn99AGABfAF8YAZ/fH9/f38Bf2AGf39/f39/AX9gAnx/AXxgBH9/fn4AYAZ/f3x8fHwAYAd/f3x8fHx8AGAFf39/f38BfwKXAR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IgBCgCGDYCAAsgAEEBRiEFDAELQQAhBQsgBEFAayQAIAULMQAgACABKAIIQQAQHgRAIAEgAiADED0PCyAAKAIIIgAgASACIAMgACgCACgCHBEGAAsYACAAIAEoAghBABAeBEAgASACIAMQPQsLnQEBAn8jAEFAaiIDJAACf0EBIAAgAUEAEB4NABpBACABRQ0AGkEAIAFBzMwAECAiAUUNABogA0EMakEAQTQQJhogA0EBNgI4IANBfzYCFCADIAA2AhAgAyABNgIIIAEgA0EIaiACKAIAQQEgASgCACgCHBEGACADKAIgIgBBAUYEQCACIAMoAhg2AgALIABBAUYLIQQgA0FAayQAIAQLCgAgACABQQAQHgtOAgF/AXwjAEEQayICJAAgAkEANgIMIAEoAgRBlM8AIAJBDGoQCSEDIAIoAgwiAQRAIAEQAQsgACADRAAAAAAAAAAAYjoAOCACQRBqJAALNwEBfyMAQRBrIgIkACACIAEtADg2AgggAEGUzwAgAkEIahAHNgIEIABBlNUANgIAIAJBEGokAAuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECIaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECIaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACC5wBAQJ/IwBBEGsiAiQAQcgAEBwhASAAKAIEIgAQAiACIAA2AgggAUGELSACQQhqEAc2AgQgAUGU1QA2AgAgAUEBNgIcIAFBlNUANgIYIAFBATYCFCABQZTVADYCECABQQE2AgwgAUGU1QA2AgggAUEAOgAgIAFBADYCRCABQoCAgIAwNwI8IAFBADsANyABQQA7ACsgAkEQaiQAIAELigUCBn4CfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIQkgASkDACEDIAEpAwghBSMAQSBrIgAkAAJAIAVC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBUIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAhSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBUIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIBQZH3AEkNACADIQIgBUL///////8/g0KAgICAgIDAAIQiBCEGAkAgAUGB9wBrIghBwABxBEAgAyAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgeGIAJBwAAgCGutiIQhBiACIAeGIQILIAAgAjcDECAAIAY3AxgCQEGB+AAgAWsiAUHAAHEEQCAEIAFBQGqtiCEDQgAhBAwBCyABRQ0AIARBwAAgAWuthiADIAGtIgKIhCEDIAQgAoghBAsgACADNwMAIAAgBDcDCCAAKQMIQgSGIAApAwAiA0I8iIQhAiAAKQMQIAApAxiEQgBSrSADQv//////////D4OEIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILIABBIGokACAJIAIgBUKAgICAgICAgIB/g4S/OQMAC0ABAn8jAEEQayICJAAgAiABNgIMIAJBlNUANgIIIAJBCGogABEBACEDIAIoAgwiAQRAIAEQAwsgAkEQaiQAIAMLBABCAAsEAEEAC/YCAQh/IwBBIGsiAyQAIAMgACgCHCIENgIQIAAoAhQhBSADIAI2AhwgAyABNgIYIAMgBSAEayIBNgIUIAEgAmohBUECIQcCfwJAAkACQCAAKAI8IANBEGoiAUECIANBDGoQDSIEBH9BqN4AIAQ2AgBBfwVBAAsEQCABIQQMAQsDQCAFIAMoAgwiBkYNAiAGQQBIBEAgASEEDAQLIAEgBiABKAIEIghLIglBA3RqIgQgBiAIQQAgCRtrIgggBCgCAGo2AgAgAUEMQQQgCRtqIgEgASgCACAIazYCACAFIAZrIQUgACgCPCAEIgEgByAJay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W5mb0UAAAAAaCgAALgmAAAcJgAATjEwX19jeHhhYml2MTI5X19wb2ludGVyX3RvX21lbWJlcl90eXBlX2luZm9FAAAAaCgAAOwmAAB8JgAAAAAAAGwnAAAhAAAAIgAAACMAAAAkAAAAJQAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQBoKAAARCcAABwmAAB2AAAAMCcAAHgnAABEbgAAMCcAAIQnAABiAAAAMCcAAJAnAABjAAAAMCcAAJwnAABoAAAAMCcAAKgnAABhAAAAMCcAALQnAABzAAAAMCcAAMAnAAB0AAAAMCcAAMwnAABpAAAAMCcAANgnAABqAAAAMCcAAOQnAABsAAAAMCcAAPAnAABtAAAAMCcAAPwnAAB4AAAAMCcAAAgoAAB5AAAAMCcAABQoAABmAAAAMCcAACAoAABkAAAAMCcAACwoAAAAAAAATCYAACEAAAAmAAAAIwAAACQAAAAnAAAAKAAAACkAAAAqAAAAAAAAALAoAAAhAAAAKwAAACMAAAAkAAAAJwAAACwAAAAtAAAALgAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAABoKAAAiCgAAEwmAAAAAAAArCYAACEAAAAvAAAAIwAAACQAAAAwAAAAAAAAAPwoAAAxAAAAMgAAADMAAABTdDlleGNlcHRpb24AAAAAQCgAAOwoAAAAAAAAKCkAABgAAAA0AAAANQAAAFN0MTFsb2dpY19lcnJvcgBoKAAAGCkAAPwoAAAAAAAAXCkAABgAAAA2AAAANQAAAFN0MTJsZW5ndGhfZXJyb3IAAAAAaCgAAEgpAAAoKQAAU3Q5dHlwZV9pbmZvAAAAAEAoAABoKQBBgNMACwnAFAAAAAAAAAUAQZTTAAsBGwBBrNMACw4cAAAAHQAAACgrAAAABABBxNMACwEBAEHU0wALBf////8KAEGY1AALAyAxAQ==")||(m=v,v=i.locateFile?i.locateFile(m,r):r+m);var M=e=>{for(;e.length>0;)e.shift()(i)};function D(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){l[this.ptr+4>>2]=e},this.get_type=function(){return l[this.ptr+4>>2]},this.set_destructor=function(e){l[this.ptr+8>>2]=e},this.get_destructor=function(){return l[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,g[this.ptr+12|0]=e},this.get_caught=function(){return 0!=g[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,g[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=g[this.ptr+13|0]},this.init=function(e,A){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(A)},this.set_adjusted_ptr=function(e){l[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return l[this.ptr+16>>2]},this.get_exception_ptr=function(){if(eA(this.get_type()))return l[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var b,L,_,N=e=>{for(var A="",t=e;c[t];)A+=b[c[t++]];return A},G={},k={},F={},V=e=>{throw new L(e)},P=e=>{throw new _(e)},x=(e,A,t)=>{function i(A){var i=t(A);i.length!==e.length&&P("Mismatched type converter count");for(var o=0;o<e.length;++o)Y(e[o],i[o])}e.forEach((function(e){F[e]=A}));var o=new Array(A.length),r=[],n=0;A.forEach(((e,A)=>{k.hasOwnProperty(e)?o[A]=k[e]:(r.push(e),G.hasOwnProperty(e)||(G[e]=[]),G[e].push((()=>{o[A]=k[e],++n===r.length&&i(o)})))})),0===r.length&&i(o)};function Y(e,A,t={}){if(!("argPackAdvance"in A))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,A,t={}){var i=A.name;if(e||V(`type "${i}" must have a positive integer typeid pointer`),k.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;V(`Cannot register type '${i}' twice`)}if(k[e]=A,delete F[e],G.hasOwnProperty(e)){var o=G[e];delete G[e],o.forEach((e=>e()))}}(e,A,t)}var H,U=e=>{V(e.$$.ptrType.registeredClass.name+" instance already deleted")},O=!1,K=e=>{},J=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},j=(e,A,t)=>{if(A===t)return e;if(void 0===t.baseClass)return null;var i=j(e,A,t.baseClass);return null===i?null:t.downcast(i)},z={},W=[],Z=()=>{for(;W.length;){var e=W.pop();e.$$.deleteScheduled=!1,e.delete()}},X={},q=(e,A)=>(A.ptrType&&A.ptr||P("makeClassHandle requires ptr and ptrType"),!!A.smartPtrType!=!!A.smartPtr&&P("Both smartPtrType and smartPtr must be specified"),A.count={value:1},$(Object.create(e,{$$:{value:A}}))),$=e=>"undefined"==typeof FinalizationRegistry?($=e=>e,e):(O=new FinalizationRegistry((e=>{J(e.$$)})),K=e=>O.unregister(e),($=e=>{var A=e.$$;if(A.smartPtr){var t={$$:A};O.register(e,t,e)}return e})(e));function ee(){}var Ae=(e,A)=>Object.defineProperty(A,"name",{value:e}),te=(e,A,t)=>{if(void 0===e[A].overloadTable){var i=e[A];e[A]=function(){return e[A].overloadTable.hasOwnProperty(arguments.length)||V(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[A].overloadTable})!`),e[A].overloadTable[arguments.length].apply(this,arguments)},e[A].overloadTable=[],e[A].overloadTable[i.argCount]=i}};function ie(e,A,t,i,o,r,n,s){this.name=e,this.constructor=A,this.instancePrototype=t,this.rawDestructor=i,this.baseClass=o,this.getActualType=r,this.upcast=n,this.downcast=s,this.pureVirtualFunctions=[]}var oe=(e,A,t)=>{for(;A!==t;)A.upcast||V(`Expected null or instance of ${t.name}, got an instance of ${A.name}`),e=A.upcast(e),A=A.baseClass;return e};function re(e,A){if(null===A)return this.isReference&&V(`null is not a valid ${this.name}`),0;A.$$||V(`Cannot pass "${Me(A)}" as a ${this.name}`),A.$$.ptr||V(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=A.$$.ptrType.registeredClass;return oe(A.$$.ptr,t,this.registeredClass)}function ne(e,A){var t;if(null===A)return this.isReference&&V(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;A.$$||V(`Cannot pass "${Me(A)}" as a ${this.name}`),A.$$.ptr||V(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&A.$$.ptrType.isConst&&V(`Cannot convert argument of type ${A.$$.smartPtrType?A.$$.smartPtrType.name:A.$$.ptrType.name} to parameter type ${this.name}`);var i=A.$$.ptrType.registeredClass;if(t=oe(A.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===A.$$.smartPtr&&V("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:A.$$.smartPtrType===this?t=A.$$.smartPtr:V(`Cannot convert argument of type ${A.$$.smartPtrType?A.$$.smartPtrType.name:A.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=A.$$.smartPtr;break;case 2:if(A.$$.smartPtrType===this)t=A.$$.smartPtr;else{var o=A.clone();t=this.rawShare(t,me.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:V("Unsupporting sharing policy")}return t}function se(e,A){if(null===A)return this.isReference&&V(`null is not a valid ${this.name}`),0;A.$$||V(`Cannot pass "${Me(A)}" as a ${this.name}`),A.$$.ptr||V(`Cannot pass deleted object as a pointer of type ${this.name}`),A.$$.ptrType.isConst&&V(`Cannot convert argument of type ${A.$$.ptrType.name} to parameter type ${this.name}`);var t=A.$$.ptrType.registeredClass;return oe(A.$$.ptr,t,this.registeredClass)}function ae(e){return this.fromWireType(l[e>>2])}function ge(e,A,t,i,o,r,n,s,a,g,c){this.name=e,this.registeredClass=A,this.isReference=t,this.isConst=i,this.isSmartPointer=o,this.pointeeType=r,this.sharingPolicy=n,this.rawGetPointee=s,this.rawConstructor=a,this.rawShare=g,this.rawDestructor=c,o||void 0!==A.baseClass?this.toWireType=ne:i?(this.toWireType=re,this.destructorFunction=null):(this.toWireType=se,this.destructorFunction=null)}var ce,ue,Ce=[],Ie=e=>{var A=Ce[e];return A||(e>=Ce.length&&(Ce.length=e+1),Ce[e]=A=ce.get(e)),A},le=(e,A,t)=>e.includes("j")?((e,A,t)=>{var o=i["dynCall_"+e];return t&&t.length?o.apply(null,[A].concat(t)):o.call(null,A)})(e,A,t):Ie(A).apply(null,t),de=(e,A)=>{var t,i,o,r=(e=N(e)).includes("j")?(t=e,i=A,o=[],function(){return o.length=0,Object.assign(o,arguments),le(t,i,o)}):Ie(A);return"function"!=typeof r&&V(`unknown function pointer with signature ${e}: ${A}`),r},he=e=>{var A=qe(e),t=N(A);return $e(A),t},Be=(e,A)=>{var t=[],i={};throw A.forEach((function e(A){i[A]||k[A]||(F[A]?F[A].forEach(e):(t.push(A),i[A]=!0))})),new ue(`${e}: `+t.map(he).join([", "]))},Ee=(e,A)=>{for(var t=[],i=0;i<e;i++)t.push(l[A+4*i>>2]);return t},Qe=e=>{for(;e.length;){var A=e.pop();e.pop()(A)}};function pe(e,A,t,i,o,r){var n=A.length;n<2&&V("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==A[1]&&null!==t,a=!1,g=1;g<A.length;++g)if(null!==A[g]&&void 0===A[g].destructorFunction){a=!0;break}var c="void"!==A[0].name,u=n-2,C=new Array(u),I=[],l=[];return Ae(e,(function(){var t;arguments.length!==u&&V(`function ${e} called with ${arguments.length} arguments, expected ${u}`),l.length=0,I.length=s?2:1,I[0]=o,s&&(t=A[1].toWireType(l,this),I[1]=t);for(var r=0;r<u;++r)C[r]=A[r+2].toWireType(l,arguments[r]),I.push(C[r]);return function(e){if(a)Qe(l);else for(var i=s?1:2;i<A.length;i++){var o=1===i?t:C[i-2];null!==A[i].destructorFunction&&A[i].destructorFunction(o)}if(c)return A[0].fromWireType(e)}(i.apply(null,I))}))}var fe=(e,A,t)=>(e instanceof Object||V(`${t} with invalid "this": ${e}`),e instanceof A.registeredClass.constructor||V(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||V(`cannot call emscripten binding method ${t} on deleted object`),oe(e.$$.ptr,e.$$.ptrType.registeredClass,A.registeredClass));function Te(){this.allocated=[void 0],this.freelist=[]}var ye=new Te,ve=e=>{e>=ye.reserved&&0==--ye.get(e).refcount&&ye.free(e)},me={toValue:e=>(e||V("Cannot use deleted val. handle = "+e),ye.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ye.allocate({refcount:1,value:e})}}};function Re(e){return this.fromWireType(I[e>>2])}var we,Se,Me=e=>{if(null===e)return"null";var A=typeof e;return"object"===A||"array"===A||"function"===A?e.toString():""+e},De=(e,A)=>{switch(A){case 4:return function(e){return this.fromWireType(d[e>>2])};case 8:return function(e){return this.fromWireType(h[e>>3])};default:throw new TypeError(`invalid float width (${A}): ${e}`)}},be=(e,A,t)=>{switch(A){case 1:return t?e=>g[0|e]:e=>c[0|e];case 2:return t?e=>u[e>>1]:e=>C[e>>1];case 4:return t?e=>I[e>>2]:e=>l[e>>2];default:throw new TypeError(`invalid integer width (${A}): ${e}`)}},Le="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,_e=(e,A,t)=>{for(var i=A+t,o=A;e[o]&&!(o>=i);)++o;if(o-A>16&&e.buffer&&Le)return Le.decode(e.subarray(A,o));for(var r="";A<o;){var n=e[A++];if(128&n){var s=63&e[A++];if(192!=(224&n)){var a=63&e[A++];if((n=224==(240&n)?(15&n)<<12|s<<6|a:(7&n)<<18|s<<12|a<<6|63&e[A++])<65536)r+=String.fromCharCode(n);else{var g=n-65536;r+=String.fromCharCode(55296|g>>10,56320|1023&g)}}else r+=String.fromCharCode((31&n)<<6|s)}else r+=String.fromCharCode(n)}return r},Ne=(e,A)=>e?_e(c,e,A):"",Ge="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,ke=(e,A)=>{for(var t=e,i=t>>1,o=i+A/2;!(i>=o)&&C[i];)++i;if((t=i<<1)-e>32&&Ge)return Ge.decode(c.subarray(e,t));for(var r="",n=0;!(n>=A/2);++n){var s=u[e+2*n>>1];if(0==s)break;r+=String.fromCharCode(s)}return r},Fe=(e,A,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var i=A,o=(t-=2)<2*e.length?t/2:e.length,r=0;r<o;++r){var n=e.charCodeAt(r);u[A>>1]=n,A+=2}return u[A>>1]=0,A-i},Ve=e=>2*e.length,Pe=(e,A)=>{for(var t=0,i="";!(t>=A/4);){var o=I[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var r=o-65536;i+=String.fromCharCode(55296|r>>10,56320|1023&r)}else i+=String.fromCharCode(o)}return i},xe=(e,A,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var i=A,o=i+t-4,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),I[A>>2]=n,(A+=4)+4>o)break}return I[A>>2]=0,A-i},Ye=e=>{for(var A=0,t=0;t<e.length;++t){var i=e.charCodeAt(t);i>=55296&&i<=57343&&++t,A+=4}return A},He=(e,A)=>{var t=k[e];return void 0===t&&V(A+" has unknown type "+he(e)),t},Ue=(e,A,t)=>{var i=[],o=e.toWireType(i,t);return i.length&&(l[A>>2]=me.toHandle(i)),o},Oe={},Ke=[],Je=Reflect.construct,je=[null,[],[]];(()=>{for(var e=new Array(256),A=0;A<256;++A)e[A]=String.fromCharCode(A);b=e})(),L=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},_=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(ee.prototype,{isAliasOf(e){if(!(this instanceof ee))return!1;if(!(e instanceof ee))return!1;var A=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,o=e.$$.ptr;A.baseClass;)t=A.upcast(t),A=A.baseClass;for(;i.baseClass;)o=i.upcast(o),i=i.baseClass;return A===i&&t===o},clone(){if(this.$$.ptr||U(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,A=$(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return A.$$.count.value+=1,A.$$.deleteScheduled=!1,A},delete(){this.$$.ptr||U(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&V("Object already scheduled for deletion"),K(this),J(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||U(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&V("Object already scheduled for deletion"),W.push(this),1===W.length&&H&&H(Z),this.$$.deleteScheduled=!0,this}}),i.getInheritedInstanceCount=()=>Object.keys(X).length,i.getLiveInheritedInstances=()=>{var e=[];for(var A in X)X.hasOwnProperty(A)&&e.push(X[A]);return e},i.flushPendingDeletes=Z,i.setDelayFunction=e=>{H=e,W.length&&H&&H(Z)},Object.assign(ge.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:8,readValueFromPointer:ae,deleteObject(e){null!==e&&e.delete()},fromWireType:function(e){var A=this.getPointee(e);if(!A)return this.destructor(e),null;var t=((e,A)=>(A=((e,A)=>{for(void 0===A&&V("ptr should not be undefined");e.baseClass;)A=e.upcast(A),e=e.baseClass;return A})(e,A),X[A]))(this.registeredClass,A);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=A,t.$$.smartPtr=e,t.clone();var i=t.clone();return this.destructor(e),i}function o(){return this.isSmartPointer?q(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:A,smartPtrType:this,smartPtr:e}):q(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var r,n=this.registeredClass.getActualType(A),s=z[n];if(!s)return o.call(this);r=this.isConst?s.constPointerType:s.pointerType;var a=j(A,this.registeredClass,r.registeredClass);return null===a?o.call(this):this.isSmartPointer?q(r.registeredClass.instancePrototype,{ptrType:r,ptr:a,smartPtrType:this,smartPtr:e}):q(r.registeredClass.instancePrototype,{ptrType:r,ptr:a})}}),ue=i.UnboundTypeError=(we=Error,(Se=Ae("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var A=new Error(e).stack;void 0!==A&&(this.stack=this.toString()+"\n"+A.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(we.prototype),Se.prototype.constructor=Se,Se.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Se),Object.assign(Te.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var A=this.freelist.pop()||this.allocated.length;return this.allocated[A]=e,A},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),ye.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ye.reserved=ye.allocated.length,i.count_emval_handles=()=>{for(var e=0,A=ye.reserved;A<ye.allocated.length;++A)void 0!==ye.allocated[A]&&++e;return e};var ze,We={w:(e,A,t)=>{throw new D(e).init(A,t),e},q:(e,A,t,i,o)=>{},u:(e,A,t,i)=>{Y(e,{name:A=N(A),fromWireType:function(e){return!!e},toWireType:function(e,A){return A?t:i},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(c[e])},destructorFunction:null})},y:(e,A,t,o,r,n,s,a,g,c,u,C,I)=>{u=N(u),n=de(r,n),a&&(a=de(s,a)),c&&(c=de(g,c)),I=de(C,I);var l=(e=>{if(void 0===e)return"_unknown";var A=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return A>=48&&A<=57?`_${e}`:e})(u);((e,A,t)=>{i.hasOwnProperty(e)?(V(`Cannot register public name '${e}' twice`),te(i,e,e),i.hasOwnProperty(t)&&V(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),i[e].overloadTable[t]=A):i[e]=A})(l,(function(){Be(`Cannot construct ${u} due to unbound types`,[o])})),x([e,A,t],o?[o]:[],(function(A){var t,r;A=A[0],r=o?(t=A.registeredClass).instancePrototype:ee.prototype;var s=Ae(u,(function(){if(Object.getPrototypeOf(this)!==g)throw new L("Use 'new' to construct "+u);if(void 0===C.constructor_body)throw new L(u+" has no accessible constructor");var e=C.constructor_body[arguments.length];if(void 0===e)throw new L(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(C.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),g=Object.create(r,{constructor:{value:s}});s.prototype=g;var C=new ie(u,s,g,I,t,n,a,c);C.baseClass&&(void 0===C.baseClass.__derivedClasses&&(C.baseClass.__derivedClasses=[]),C.baseClass.__derivedClasses.push(C));var d=new ge(u,C,!0,!1,!1),h=new ge(u+"*",C,!1,!1,!1),B=new ge(u+" const*",C,!1,!0,!1);return z[e]={pointerType:h,constPointerType:B},((e,A,t)=>{i.hasOwnProperty(e)||P("Replacing nonexistant public symbol"),i[e].overloadTable,i[e]=A,i[e].argCount=t})(l,s),[d,h,B]}))},x:(e,A,t,i,o,r)=>{var n=Ee(A,t);o=de(i,o),x([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[A-1])throw new L(`Cannot register multiple constructors with identical number of parameters (${A-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[A-1]=()=>{Be(`Cannot construct ${e.name} due to unbound types`,n)},x([],n,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[A-1]=pe(t,i,null,o,r),[]))),[]}))},i:(e,A,t,i,o,r,n,s,a)=>{var g=Ee(t,i);A=(e=>{const A=(e=e.trim()).indexOf("(");return-1!==A?e.substr(0,A):e})(A=N(A)),r=de(o,r),x([],[e],(function(e){var i=`${(e=e[0]).name}.${A}`;function o(){Be(`Cannot call ${i} due to unbound types`,g)}A.startsWith("@@")&&(A=Symbol[A.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(A);var a=e.registeredClass.instancePrototype,c=a[A];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,a[A]=o):(te(a,A,i),a[A].overloadTable[t-2]=o),x([],g,(function(o){var s=pe(i,o,e,r,n);return void 0===a[A].overloadTable?(s.argCount=t-2,a[A]=s):a[A].overloadTable[t-2]=s,[]})),[]}))},k:(e,A,t,i,o,r,n,s,a,g)=>{A=N(A),o=de(i,o),x([],[e],(function(e){var i=`${(e=e[0]).name}.${A}`,c={get(){Be(`Cannot access ${i} due to unbound types`,[t,n])},enumerable:!0,configurable:!0};return c.set=a?()=>Be(`Cannot access ${i} due to unbound types`,[t,n]):e=>V(i+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,A,c),x([],a?[t,n]:[t],(function(t){var n=t[0],c={get(){var A=fe(this,e,i+" getter");return n.fromWireType(o(r,A))},enumerable:!0};if(a){a=de(s,a);var u=t[1];c.set=function(A){var t=fe(this,e,i+" setter"),o=[];a(g,t,u.toWireType(o,A)),Qe(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,A,c),[]})),[]}))},t:(e,A)=>{Y(e,{name:A=N(A),fromWireType:e=>{var A=me.toValue(e);return ve(e),A},toWireType:(e,A)=>me.toHandle(A),argPackAdvance:8,readValueFromPointer:Re,destructorFunction:null})},p:(e,A,t)=>{Y(e,{name:A=N(A),fromWireType:e=>e,toWireType:(e,A)=>A,argPackAdvance:8,readValueFromPointer:De(A,t),destructorFunction:null})},g:(e,A,t,i,o)=>{A=N(A);var r=e=>e;if(0===i){var n=32-8*t;r=e=>e<<n>>>n}var s=A.includes("unsigned");Y(e,{name:A,fromWireType:r,toWireType:s?function(e,A){return this.name,A>>>0}:function(e,A){return this.name,A},argPackAdvance:8,readValueFromPointer:be(A,t,0!==i),destructorFunction:null})},a:(e,A,t)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][A];function o(e){var A=l[e>>2],t=l[e+4>>2];return new i(g.buffer,t,A)}Y(e,{name:t=N(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},o:(e,A)=>{var t="std::string"===(A=N(A));Y(e,{name:A,fromWireType(e){var A,i=l[e>>2],o=e+4;if(t)for(var r=o,n=0;n<=i;++n){var s=o+n;if(n==i||0==c[s]){var a=Ne(r,s-r);void 0===A?A=a:(A+=String.fromCharCode(0),A+=a),r=s+1}}else{var g=new Array(i);for(n=0;n<i;++n)g[n]=String.fromCharCode(c[o+n]);A=g.join("")}return $e(e),A},toWireType(e,A){var i;A instanceof ArrayBuffer&&(A=new Uint8Array(A));var o="string"==typeof A;o||A instanceof Uint8Array||A instanceof Uint8ClampedArray||A instanceof Int8Array||V("Cannot pass non-string to std::string"),i=t&&o?(e=>{for(var A=0,t=0;t<e.length;++t){var i=e.charCodeAt(t);i<=127?A++:i<=2047?A+=2:i>=55296&&i<=57343?(A+=4,++t):A+=3}return A})(A):A.length;var r=Xe(4+i+1),n=r+4;if(l[r>>2]=i,t&&o)((e,A,t,i)=>{if(!(i>0))return 0;for(var o=t+i-1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127){if(t>=o)break;A[t++]=n}else if(n<=2047){if(t+1>=o)break;A[t++]=192|n>>6,A[t++]=128|63&n}else if(n<=65535){if(t+2>=o)break;A[t++]=224|n>>12,A[t++]=128|n>>6&63,A[t++]=128|63&n}else{if(t+3>=o)break;A[t++]=240|n>>18,A[t++]=128|n>>12&63,A[t++]=128|n>>6&63,A[t++]=128|63&n}}A[t]=0})(A,c,n,i+1);else if(o)for(var s=0;s<i;++s){var a=A.charCodeAt(s);a>255&&($e(n),V("String has UTF-16 code units that do not fit in 8 bits")),c[n+s]=a}else for(s=0;s<i;++s)c[n+s]=A[s];return null!==e&&e.push($e,r),r},argPackAdvance:8,readValueFromPointer:ae,destructorFunction(e){$e(e)}})},l:(e,A,t)=>{var i,o,r,n,s;t=N(t),2===A?(i=ke,o=Fe,n=Ve,r=()=>C,s=1):4===A&&(i=Pe,o=xe,n=Ye,r=()=>l,s=2),Y(e,{name:t,fromWireType:e=>{for(var t,o=l[e>>2],n=r(),a=e+4,g=0;g<=o;++g){var c=e+4+g*A;if(g==o||0==n[c>>s]){var u=i(a,c-a);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),a=c+A}}return $e(e),t},toWireType:(e,i)=>{"string"!=typeof i&&V(`Cannot pass non-string to C++ string type ${t}`);var r=n(i),a=Xe(4+r+A);return l[a>>2]=r>>s,o(i,a+4,r+A),null!==e&&e.push($e,a),a},argPackAdvance:8,readValueFromPointer:Re,destructorFunction(e){$e(e)}})},v:(e,A)=>{Y(e,{isVoid:!0,name:A=N(A),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,A)=>{}})},j:(e,A,t)=>(e=me.toValue(e),A=He(A,"emval::as"),Ue(A,t,e)),e:(e,A,t,i,o)=>{var r,n;return(e=Ke[e])(A=me.toValue(A),A[t=void 0===(n=Oe[r=t])?N(r):n],i,o)},d:ve,f:(e,A,t)=>{var i=((e,A)=>{for(var t=new Array(e),i=0;i<e;++i)t[i]=He(l[A+4*i>>2],"parameter "+i);return t})(e,A),o=i.shift();e--;var r,n,s=new Array(e),a=`methodCaller<(${i.map((e=>e.name)).join(", ")}) => ${o.name}>`;return r=Ae(a,((A,r,n,a)=>{for(var g=0,c=0;c<e;++c)s[c]=i[c].readValueFromPointer(a+g),g+=i[c].argPackAdvance;var u=1===t?Je(r,s):r.apply(A,s);for(c=0;c<e;++c)i[c].deleteObject&&i[c].deleteObject(s[c]);return Ue(o,n,u)})),n=Ke.length,Ke.push(r),n},c:e=>{e>4&&(ye.get(e).refcount+=1)},b:e=>{var A=me.toValue(e);Qe(A),ve(e)},h:(e,A)=>{var t=(e=He(e,"_emval_take_value")).readValueFromPointer(A);return me.toHandle(t)},m:()=>{y("")},s:(e,A,t)=>c.copyWithin(e,A,A+t),r:e=>{c.length,y("OOM")},n:(e,A,t,i)=>{for(var o,r,n,g=0,u=0;u<t;u++){var C=l[A>>2],I=l[A+4>>2];A+=8;for(var d=0;d<I;d++)o=e,r=c[C+d],n=void 0,n=je[o],0===r||10===r?((1===o?s:a)(_e(n,0)),n.length=0):n.push(r);g+=I}return l[i>>2]=g,0}},Ze=function(){var e={a:We};function A(e,A){var t,o;return Ze=e.exports,t=Ze.z.buffer,i.HEAP8=g=new Int8Array(t),i.HEAP16=u=new Int16Array(t),i.HEAPU8=c=new Uint8Array(t),i.HEAPU16=C=new Uint16Array(t),i.HEAP32=I=new Int32Array(t),i.HEAPU32=l=new Uint32Array(t),i.HEAPF32=d=new Float32Array(t),i.HEAPF64=h=new Float64Array(t),ce=Ze.C,o=Ze.A,Q.unshift(o),function(){if(f--,i.monitorRunDependencies&&i.monitorRunDependencies(f),0==f&&T){var e=T;T=null,e()}}(),Ze}if(f++,i.monitorRunDependencies&&i.monitorRunDependencies(f),i.instantiateWasm)try{return i.instantiateWasm(e,A)}catch(e){a(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,A,t,i){return function(e,A,t){return S(e).then((e=>WebAssembly.instantiate(e,A))).then((e=>e)).then(t,(e=>{a(`failed to asynchronously prepare wasm: ${e}`),y(e)}))}(A,t,i)}(0,v,e,(function(e){A(e.instance)})).catch(t),{}}(),Xe=e=>(Xe=Ze.B)(e),qe=e=>(qe=Ze.D)(e),$e=e=>($e=Ze.E)(e),eA=e=>(eA=Ze.F)(e);function AA(){function e(){ze||(ze=!0,i.calledRun=!0,B||(M(Q),A(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),p.unshift(e);var e;M(p)}()))}f>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),E.unshift(e);var e;M(E)}(),f>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,A,t,o,r)=>(i.dynCall_jiji=Ze.G)(e,A,t,o,r),i._vertexShaderSource=10624,T=function e(){ze||AA(),ze||(T=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return AA(),e.ready}),yr=Tr,vr=0,mr=class e{constructor(e){this.core=e,pr(this,"seq"),pr(this,"_core"),pr(this,"log"),pr(this,"beautyParams"),vr+=1,this.seq=vr,this._core=e,this.log=e.log.createChild({id:`${this.getAlias()}${vr}`}),this.log.info("created")}getName(){return e.Name}getAlias(){return"bb"}getValidateRule(e){switch(e){case"start":case"update":return function(e){return{name:"BasicBeautyOptions",type:"object",required:!0,allowEmpty:!1,properties:{beauty:{required:!1,type:"number"},brightness:{required:!1,type:"number"},ruddy:{required:!1,type:"number"}},validate(A,t,i,o){const{RtcError:r,ErrorCode:n,ErrorCodeDictionary:s}=e.errorModule;if(e.utils.isOverseaSdkAppId(A.sdkAppId))throw new r({code:n.INVALID_OPERATION,extraCode:s.INVALID_OPERATION,message:"This feature is not yet available in your country or region. If you have any questions, you can go to the community for consultation: https://zhiliao.qq.com/s/cWSPGIIM62CC/c3TPGIIM62CQ"})}}}(this._core);case"stop":return this._core,{name:"StopBasicBeautyOptions",required:!1}}}getGroup(){return"bb"}async start(e){this._core.room.videoManager.Wasm||(this._core.room.videoManager.Wasm=await yr()),this._core.room.videoManager.renderMode="webgl";const A=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,t=this._core.utils.isUndefined(e.brightness)?.5:e.brightness,i=this._core.utils.isUndefined(e.ruddy)?.5:e.ruddy;return this._core.room.videoManager.setBeautyParams({beauty:A,brightness:t,ruddy:i})}async update(e){const A=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,t=this._core.utils.isUndefined(e.brightness)?.5:e.brightness,i=this._core.utils.isUndefined(e.ruddy)?.5:e.ruddy;return this._core.room.videoManager.setBeautyParams({beauty:A,brightness:t,ruddy:i})}async stop(){return this._core.room.videoManager.renderMode="auto",this._core.room.videoManager.stopBeauty()}destroy(){this._core.room.videoManager.renderMode="auto"}};pr(mr,"Name","BasicBeauty");var Rr,wr,Sr,Mr=mr;e.TRTCMediaMixingErrorCode=void 0,(Rr=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[Rr.Success=0]="Success",Rr[Rr.Error=-1]="Error",Rr[Rr.InvalidParams=-2]="InvalidParams",Rr[Rr.NotFoundSource=-3]="NotFoundSource",Rr[Rr.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",Rr[Rr.CameraNotAuthorized=-5]="CameraNotAuthorized",Rr[Rr.CameraIsOccupied=-6]="CameraIsOccupied",Rr[Rr.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(wr=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[wr.kCamera=0]="kCamera",wr[wr.kScreen=1]="kScreen",wr[wr.kImage=2]="kImage",wr[wr.kPhoneMirror=4]="kPhoneMirror",wr[wr.kText=5]="kText",wr[wr.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(Sr=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",Sr.onSourceMoved="onSourceMoved",Sr.onSourceResized="onSourceResized",Sr.onRightButtonClicked="onRightButtonClicked",Sr.onError="onError",Sr.onSourcePlugged="onSourcePlugged",Sr.onSourceConnected="onSourceConnected",Sr.onSourceDisconnected="onSourceDisconnected",Sr.onSourceUnplugged="onSourceUnplugged",Sr.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var Dr,br=function(){function e(e,A){if(this.logRegion="tc",this.loggerManager=e,A){var t=A.sdkAppId,i=A.userId,o=A.seq;this.seq=o,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(o),userId:i,sdkAppId:t}))}else this.logger=e;this.logger||(this.logger={debug:function(e){console.debug(e)},info:function(e){console.info(e)},warn:function(e){console.warn(e)},error:function(e){console.error(e)}})}return e.prototype.getLogMessage=function(e){var A=this;return e.map((function(e){return A.getStringifyMessage(e)})).join(" ")},e.prototype.getStringifyMessage=function(e){var A=this;if("object"!=typeof e)return e;if(e instanceof HTMLElement)return"".concat(e.tagName.toLocaleLowerCase(),"#").concat(e.id);if(e instanceof Array){var t=[];return Object.keys(e).forEach((function(i){return t[i]=A.getStringifyMessage(e[i])})),JSON.stringify(t)}if(e instanceof Object){var i={};return Object.keys(e).forEach((function(t){return i[t]=A.getStringifyMessage(e[t])})),JSON.stringify(i)}return e},e.prototype.update=function(e){var A=e.userId,t=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:A,sdkAppId:t}))},e.prototype.log=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];var t=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(t)},e.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];var t=this.getLogMessage(e);this.logger.debug(t)},e.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];var t=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(t)},e.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];var t=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(t)},e.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];var t=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(t)},e}(),Lr=new br(null),_r=function(){function e(e,A,t){void 0===t&&(t={calcPositionOnly:!1,canExceedContainer:!1}),this.logPrefix="[Movable]",this.movable=null,this.container=null,this.options={calcPositionOnly:!1,canExceedContainer:!1},this.callbacksMap=new Map,this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0,this.movable=e,this.container=A||document.body,this.options={calcPositionOnly:!!t.calcPositionOnly||!1,canExceedContainer:!!t.canExceedContainer||!1},this.setStyle(),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove5px=this.onMouseMove5px.bind(this),this.onMouseUp5px=this.onMouseUp5px.bind(this),this.movable.addEventListener("mousedown",this.onMouseDown,!1)}return e.prototype.setStyle=function(){this.movable?(this.movable.style.position="absolute",this.movable.style.cursor="move"):Lr.debug("".concat(this.logPrefix,"setStyle 'movable' is null"))},e.prototype.onMouseDown=function(e){if(0===e.button){if(e.preventDefault(),document.defaultView&&this.movable){var A=document.defaultView.getComputedStyle(this.movable);this.originLeft=window.parseInt(A.left),this.originTop=window.parseInt(A.top)}else Lr.debug("".concat(this.logPrefix,"onMouseDown 'movable' is null"));this.moveStartOfLeft=e.screenX,this.moveStartOfTop=e.screenY,document.addEventListener("mousemove",this.onMouseMove5px,!1),document.addEventListener("mouseup",this.onMouseUp5px,!1)}},e.prototype.onMouseMove5px=function(e){var A=e.screenX-(this.moveStartOfLeft||0),t=e.screenY-(this.moveStartOfTop||0);Math.abs(A)>=5||Math.abs(t)>=5?(document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1),document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1)):Lr.debug("".concat(this.logPrefix,"on Movable mouse move less than 5px"))},e.prototype.onMouseUp5px=function(){document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1)},e.prototype.onMouseMove=function(e){if(this.movable&&this.container){var A=e.screenX-this.moveStartOfLeft,t=e.screenY-this.moveStartOfTop,i=this.originLeft+A,o=this.originTop+t,r=this.movable.offsetWidth,n=this.movable.offsetHeight,s=this.container.offsetWidth,a=this.container.offsetHeight;this.options.canExceedContainer||(i<0?i=0:i>s-r&&(i=s-r),o<0?o=0:o>a-n&&(o=a-n)),!this.options.calcPositionOnly&&this.movable&&(this.movable.style.left="".concat(i,"px"),this.movable.style.top="".concat(o,"px")),this.emit("move",i,o)}else Lr.debug("".concat(this.logPrefix,"onMouseMove error:No 'movable' and 'container'."))},e.prototype.onMouseUp=function(){document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0},e.prototype.on=function(e,A){var t=this.callbacksMap.get(e);t?t.push(A):this.callbacksMap.set(e,[A])},e.prototype.off=function(e,A){var t=this.callbacksMap.get(e);t&&(t=t.filter((function(e){return e!=A})),this.callbacksMap.set(e,t))},e.prototype.emit=function(e){for(var A=[],t=1;t<arguments.length;t++)A[t-1]=arguments[t];var i=this.callbacksMap.get(e);i&&i.forEach((function(e){try{e.apply(null,A)}catch(t){console.error("[Movable]emit error:",e,t)}}))},e.prototype.destroy=function(){var e;null===(e=this.movable)||void 0===e||e.removeEventListener("mousedown",this.onMouseDown,!1),this.callbacksMap.clear(),this.movable=null,this.container=null},e}();!function(e){e[e.Both=0]="Both",e[e.Corner=1]="Corner",e[e.Edge=2]="Edge"}(Dr||(Dr={}));var Nr="trtc-resizable-top-left-anchor",Gr="trtc-resizable-top-anchor",kr="trtc-resizable-top-right-anchor",Fr="trtc-resizable-left-anchor",Vr="trtc-resizable-right-anchor",Pr="trtc-resizable-bottom-left-anchor",xr="trtc-resizable-bottom-anchor",Yr="trtc-resizable-bottom-right-anchor",Hr={resizeAnchor:{position:"absolute",width:"".concat(8,"px"),height:"".concat(8,"px"),border:"1px solid #3D7EFD",backgroundColor:"#FFFFFF"},topLeftAnchor:{top:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"nw-resize"},topAnchor:{top:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"n-resize"},topRightAnchor:{top:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"ne-resize"},leftAnchor:{top:"calc(50% - ".concat(4,"px)"),left:"-".concat(4,"px"),cursor:"w-resize"},rightAnchor:{top:"calc(50% - ".concat(4,"px)"),right:"-".concat(4,"px"),cursor:"e-resize"},bottomLeftAnchor:{bottom:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"sw-resize"},bottomAnchor:{bottom:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"s-resize"},bottomRightAnchor:{bottom:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"se-resize"}};function Ur(e,A){for(var t in A)e.style[t]=A[t]}var Or=function(){function e(e,A,t){void 0===t&&(t={keepRatio:!1,stopPropagation:!1,anchorMode:Dr.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:Dr.Both,canExceedContainer:!1},this.callbacksMap=new Map,this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0,this.resizeTarget=e,this.container=A||document.body,this.options={keepRatio:!!t.keepRatio||!1,stopPropagation:!!t.stopPropagation||!1,anchorMode:t.anchorMode||Dr.Both,canExceedContainer:!!t.canExceedContainer||!1},this.mousedown=this.mousedown.bind(this),this.mousemove=this.mousemove.bind(this),this.mouseup=this.mouseup.bind(this),this.currentAnchor=null,this.createResizeAnchor(),this.resizeTarget.classList.add("trtc-resizable"),this.resizeTarget.style.position="absolute",this.resizeTarget.style.border="1px solid #3D7EFD",this.resizeTarget.style.boxSizing="border-box",this.initResizeEvent()}return e.prototype.createResizeAnchor=function(){var e,A,t,i,o,r,n,s,a=document.createElement("div");a.className="trtc-resizable-resize-anchor ".concat(Nr),Ur(a,Object.assign({},Hr.resizeAnchor,Hr.topLeftAnchor)),this.topLeftAnchor=a;var g=document.createElement("div");g.className="trtc-resizable-resize-anchor ".concat(Gr),Ur(g,Object.assign({},Hr.resizeAnchor,Hr.topAnchor)),this.topAnchor=g;var c=document.createElement("div");c.className="trtc-resizable-resize-anchor ".concat(kr),Ur(c,Object.assign({},Hr.resizeAnchor,Hr.topRightAnchor)),this.topRightAnchor=c;var u=document.createElement("div");u.className="trtc-resizable-resize-anchor ".concat(Fr),Ur(u,Object.assign({},Hr.resizeAnchor,Hr.leftAnchor)),this.leftAnchor=u;var C=document.createElement("div");C.className="trtc-resizable-resize-anchor ".concat(Vr),Ur(C,Object.assign({},Hr.resizeAnchor,Hr.rightAnchor)),this.rightAnchor=C;var I=document.createElement("div");I.className="trtc-resizable-resize-anchor ".concat(Pr),Ur(I,Object.assign({},Hr.resizeAnchor,Hr.bottomLeftAnchor)),this.bottomLeftAnchor=I;var l=document.createElement("div");l.className="trtc-resizable-resize-anchor ".concat(xr),Ur(l,Object.assign({},Hr.resizeAnchor,Hr.bottomAnchor)),this.bottomAnchor=l;var d=document.createElement("div");d.className="trtc-resizable-resize-anchor ".concat(Yr),Ur(d,Object.assign({},Hr.resizeAnchor,Hr.bottomRightAnchor)),this.bottomRightAnchor=d,this.options.anchorMode!==Dr.Both&&this.options.anchorMode!==Dr.Edge||(null===(e=this.resizeTarget)||void 0===e||e.appendChild(g),null===(A=this.resizeTarget)||void 0===A||A.appendChild(u),null===(t=this.resizeTarget)||void 0===t||t.appendChild(C),null===(i=this.resizeTarget)||void 0===i||i.appendChild(l)),this.options.anchorMode!==Dr.Both&&this.options.anchorMode!==Dr.Corner||(null===(o=this.resizeTarget)||void 0===o||o.appendChild(a),null===(r=this.resizeTarget)||void 0===r||r.appendChild(c),null===(n=this.resizeTarget)||void 0===n||n.appendChild(I),null===(s=this.resizeTarget)||void 0===s||s.appendChild(d))},e.prototype.initResizeEvent=function(){var e,A,t,i,o,r,n,s;null===(e=this.topLeftAnchor)||void 0===e||e.addEventListener("mousedown",this.mousedown,!1),null===(A=this.topAnchor)||void 0===A||A.addEventListener("mousedown",this.mousedown,!1),null===(t=this.topRightAnchor)||void 0===t||t.addEventListener("mousedown",this.mousedown,!1),null===(i=this.leftAnchor)||void 0===i||i.addEventListener("mousedown",this.mousedown,!1),null===(o=this.rightAnchor)||void 0===o||o.addEventListener("mousedown",this.mousedown,!1),null===(r=this.bottomLeftAnchor)||void 0===r||r.addEventListener("mousedown",this.mousedown,!1),null===(n=this.bottomAnchor)||void 0===n||n.addEventListener("mousedown",this.mousedown,!1),null===(s=this.bottomRightAnchor)||void 0===s||s.addEventListener("mousedown",this.mousedown,!1)},e.prototype.mousedown=function(e){if(0===e.button){if(e.preventDefault(),this.options.stopPropagation&&e.stopPropagation(),this.currentAnchor=e.target,this.resizeStartLeft=e.screenX,this.resizeStartTop=e.screenY,document.defaultView&&this.resizeTarget){var A=document.defaultView.getComputedStyle(this.resizeTarget);this.originTop=window.parseInt(A.top),this.originLeft=window.parseInt(A.left),this.originWidth=this.resizeTarget.offsetWidth,this.originHeight=this.resizeTarget.offsetHeight,Lr.debug("resize origin:",this.originTop,this.originLeft,this.originWidth,this.originHeight)}else Lr.debug("".concat(this.logPrefix,"mouseDown 'resizeTarget' is null"));document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1)}},e.prototype.mousemove=function(e){if(this.container&&this.resizeTarget&&this.currentAnchor){var A,t=this.currentAnchor.classList[1],i=this.originLeft,o=this.originTop,r=this.originWidth,n=this.originHeight;switch(t){case Nr:o=(A=this._resizeTop(e)).top,n=A.height,i=(A=this._resizeLeft(e)).left,r=A.width,this.options.keepRatio&&(r/this.originWidth<n/this.originHeight?(n=r*this.originHeight/this.originWidth,o=this.originTop+this.originHeight-n):(r=n*this.originWidth/this.originHeight,i=this.originLeft+this.originWidth-r));break;case Gr:o=(A=this._resizeTop(e)).top,n=A.height,this.options.keepRatio&&((r=this.originWidth*n/this.originHeight)<20?(r=20,n=this.originHeight*r/this.originWidth,o=this.originTop+this.originHeight-n):!this.options.canExceedContainer&&r>this.container.offsetWidth-this.originLeft&&(r=this.container.offsetWidth-this.originLeft,n=this.originHeight*r/this.originWidth,o=this.originTop+this.originHeight-n));break;case kr:o=(A=this._resizeTop(e)).top,n=A.height,r=this._resizeRight(e),this.options.keepRatio&&(r/this.originWidth<n/this.originHeight?(n=r*this.originHeight/this.originWidth,o=this.originTop+this.originHeight-n):r=n*this.originWidth/this.originHeight);break;case Fr:i=(A=this._resizeLeft(e)).left,r=A.width,this.options.keepRatio&&((n=this.originHeight*r/this.originWidth)<20?(n=20,r=this.originWidth*n/this.originHeight,i=this.originLeft+this.originWidth-r):!this.options.canExceedContainer&&n>this.container.offsetHeight-this.originTop&&(n=this.container.offsetHeight-this.originTop,r=this.originWidth*n/this.originHeight,i=this.originLeft+this.originWidth-r));break;case Vr:r=this._resizeRight(e),this.options.keepRatio&&((n=r*this.originHeight/this.originWidth)<20?r=(n=20)*this.originWidth/this.originHeight:!this.options.canExceedContainer&&n>this.container.offsetHeight-this.originTop&&(r=(n=this.container.offsetHeight-this.originTop)*this.originWidth/this.originHeight));break;case Pr:n=this._resizeBottom(e),i=(A=this._resizeLeft(e)).left,r=A.width,this.options.keepRatio&&(r/this.originWidth<n/this.originHeight?n=r*this.originHeight/this.originWidth:(r=n*this.originWidth/this.originHeight,i=this.originLeft+this.originWidth-r));break;case xr:n=this._resizeBottom(e),this.options.keepRatio&&((r=n*this.originWidth/this.originHeight)<20?n=(r=20)*this.originHeight/this.originWidth:!this.options.canExceedContainer&&r>this.container.offsetWidth-this.originLeft&&(n=(r=this.container.offsetWidth-this.originLeft)*this.originHeight/this.originWidth));break;case Yr:n=this._resizeBottom(e),r=this._resizeRight(e),this.options.keepRatio&&(r/this.originWidth<n/this.originHeight?n=r*this.originHeight/this.originWidth:r=n*this.originWidth/this.originHeight)}this.resizeTarget.style.left="".concat(i,"px"),this.resizeTarget.style.top="".concat(o,"px"),this.resizeTarget.style.height="".concat(n,"px"),this.resizeTarget.style.width="".concat(r,"px"),this.emit("resize",i,o,r,n)}else Lr.debug("".concat(this.logPrefix,"mouseMove error. No valid inner info:"),this.container,this.resizeTarget,this.currentAnchor)},e.prototype._resizeLeft=function(e){var A=e.screenX-this.resizeStartLeft,t=this.originLeft+A,i=this.originWidth-A;return!this.options.canExceedContainer&&t<0?(t=0,i=this.originWidth+this.originLeft):t>this.originLeft+this.originWidth-20&&(t=this.originLeft+this.originWidth-20,i=20),{left:t,width:i}},e.prototype._resizeTop=function(e){var A=e.screenY-this.resizeStartTop,t=this.originTop+A,i=this.originHeight-A;return!this.options.canExceedContainer&&t<0?(t=0,i=this.originHeight+this.originTop):t>this.originTop+this.originHeight-20&&(t=this.originTop+this.originHeight-20,i=20),{top:t,height:i}},e.prototype._resizeRight=function(e){if(!this.container)return Lr.debug("".concat(this.logPrefix,"_resizeRight error. No container:"),this.container),0;var A=e.screenX-this.resizeStartLeft,t=this.originWidth+A;return t<20?t=20:!this.options.canExceedContainer&&t>this.container.offsetWidth-this.originLeft&&(t=this.container.offsetWidth-this.originLeft),t},e.prototype._resizeBottom=function(e){if(!this.container)return Lr.debug("".concat(this.logPrefix,"_resizeBottom error. No container:"),this.container),0;var A=e.screenY-this.resizeStartTop,t=this.originHeight+A;return t<20?t=20:!this.options.canExceedContainer&&t>this.container.offsetHeight-this.originTop&&(t=this.container.offsetHeight-this.originTop),t},e.prototype.mouseup=function(){document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0},e.prototype.on=function(e,A){var t=this.callbacksMap.get(e);t?t.push(A):this.callbacksMap.set(e,[A])},e.prototype.off=function(e,A){var t=this.callbacksMap.get(e);t&&(t=t.filter((function(e){return e!=A})),this.callbacksMap.set(e,t))},e.prototype.emit=function(e){for(var A=[],t=1;t<arguments.length;t++)A[t-1]=arguments[t];var i=this.callbacksMap.get(e);i&&i.slice().forEach((function(e){try{e.apply(null,A)}catch(t){console.error("[Resizable]emit error:",e,t)}}))},e.prototype.destroy=function(){var e,A,t,i,o,r,n,s,a,g,c,u,C,I,l,d;null===(e=this.topLeftAnchor)||void 0===e||e.removeEventListener("mousedown",this.mousedown,!1),null===(A=this.topAnchor)||void 0===A||A.removeEventListener("mousedown",this.mousedown,!1),null===(t=this.topRightAnchor)||void 0===t||t.removeEventListener("mousedown",this.mousedown,!1),null===(i=this.leftAnchor)||void 0===i||i.removeEventListener("mousedown",this.mousedown,!1),null===(o=this.rightAnchor)||void 0===o||o.removeEventListener("mousedown",this.mousedown,!1),null===(r=this.bottomLeftAnchor)||void 0===r||r.removeEventListener("mousedown",this.mousedown,!1),null===(n=this.bottomAnchor)||void 0===n||n.removeEventListener("mousedown",this.mousedown,!1),null===(s=this.bottomRightAnchor)||void 0===s||s.removeEventListener("mousedown",this.mousedown,!1),this.callbacksMap.clear(),this.options.anchorMode!==Dr.Both&&this.options.anchorMode!==Dr.Edge||(this.topAnchor&&(null===(a=this.resizeTarget)||void 0===a||a.removeChild(this.topAnchor)),this.leftAnchor&&(null===(g=this.resizeTarget)||void 0===g||g.removeChild(this.leftAnchor)),this.rightAnchor&&(null===(c=this.resizeTarget)||void 0===c||c.removeChild(this.rightAnchor)),this.bottomAnchor&&(null===(u=this.resizeTarget)||void 0===u||u.removeChild(this.bottomAnchor))),this.options.anchorMode!==Dr.Both&&this.options.anchorMode!==Dr.Corner||(this.topLeftAnchor&&(null===(C=this.resizeTarget)||void 0===C||C.removeChild(this.topLeftAnchor)),this.topRightAnchor&&(null===(I=this.resizeTarget)||void 0===I||I.removeChild(this.topRightAnchor)),this.bottomLeftAnchor&&(null===(l=this.resizeTarget)||void 0===l||l.removeChild(this.bottomLeftAnchor)),this.bottomRightAnchor&&(null===(d=this.resizeTarget)||void 0===d||d.removeChild(this.bottomRightAnchor))),this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.resizeTarget=null,this.container=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0},e}(),Kr=function(){var A=new Map;for(var t in e.TRTCVideoResolution)if(isNaN(Number(t))){var i=e.TRTCVideoResolution[t],o=t.split("_");A.set(i,{width:parseInt(o[1]),height:parseInt(o[2])})}return A}(),Jr=function(){function A(A){if(this.logPrefix="[TRTCMediaMixingDesigner]",this.mixingVideoWidth=640,this.mixingVideoHeight=360,this.canExceedContainer=!1,this.movableHandler=null,this.resizableHandler=null,this.previewScale=1,this.previewWidth=0,this.previewHeight=0,this.previewLeft=0,this.previewTop=0,this.BOUNDARY_ADSORPTION_THRESHOLD=10,this.newSelected=null,this.clickedMediaSources=[],this.oldSelectedIndex=-1,this.mousedownLeft=null,this.mousedownTop=null,this.eventButton=null,this.resizeObserver=null,this.logger=A.logger,this.container=A.view,this.container.style.position="relative",this.videoResolution=A.videoResolution,this.resMode=A.resMode,Kr.has(A.videoResolution)){var t=Kr.get(A.videoResolution),i=t.width,o=t.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}this.updatePreviewProperty(),this.canExceedContainer=A.canExceedContainer||!1,this.eventEmitter=new T,this.mediaList=[],this.selectedMediaIndex=-1,this.moveAndResizeOverlay=document.createElement("div"),this.moveAndResizeOverlay.style.position="relative",this.container.appendChild(this.moveAndResizeOverlay),this.initMediaMovable(),this.initMediaResizable(),this.initContainerMouseEventHander(),this.initContainerResizeObserver()}return A.prototype.updateOptions=function(A){if(!de(A.videoResolution)||!de(A.resMode)){if(this.resMode=de(A.resMode)?this.resMode:A.resMode,A.videoResolution&&Kr.has(A.videoResolution)){var t=Kr.get(A.videoResolution),i=t.width,o=t.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}this.updatePreviewProperty(),this.updateOverlay()}},A.prototype.addMedia=function(e){this.mediaList.unshift(e),e.isSelected&&(this.selectedMediaIndex=0,this.updateOverlay())},A.prototype.removeMedia=function(e){var A=this.mediaList.findIndex((function(A){return A.id===e.id}));-1!==A&&(this.mediaList.splice(A,1),(this.selectedMediaIndex===A||e.isSelected)&&(this.selectedMediaIndex=-1,this.updateOverlay()))},A.prototype.updateMedia=function(e){var A=this.mediaList.findIndex((function(A){return A.id===e.id}));-1!==A&&(this.mediaList[A]=Object.assign({},this.mediaList[A],e),e.isSelected&&(this.selectedMediaIndex=A,this.updateOverlay()))},A.prototype.on=function(e,A){var t;null===(t=this.eventEmitter)||void 0===t||t.on(e,A)},A.prototype.off=function(e,A){var t;null===(t=this.eventEmitter)||void 0===t||t.off(e,A)},A.prototype.destroy=function(){var e,A,t,i;this.resizeObserver&&(this.container&&this.resizeObserver.unobserve(this.container),this.resizeObserver.disconnect(),this.resizeObserver=null),null===(e=this.movableHandler)||void 0===e||e.destroy(),null===(A=this.resizableHandler)||void 0===A||A.destroy(),this.movableHandler=null,this.resizableHandler=null,null===(t=this.container)||void 0===t||t.removeEventListener("contextmenu",this.onRightButtonClicked,!1),document.removeEventListener("mousedown",this.onContainerMousedown,!1),this.moveAndResizeOverlay&&(null===(i=this.container)||void 0===i||i.removeChild(this.moveAndResizeOverlay),this.moveAndResizeOverlay=null),this.container=null,this.eventEmitter=null,this.mediaList=[]},A.prototype.initMediaMovable=function(){this.onMove=this.onMove.bind(this),this.movableHandler=new _r(this.moveAndResizeOverlay,this.container,{canExceedContainer:this.canExceedContainer,calcPositionOnly:!1}),this.movableHandler.on("move",this.onMove)},A.prototype.initMediaResizable=function(){this.onResize=this.onResize.bind(this),this.resizableHandler=new Or(this.moveAndResizeOverlay,this.container,{keepRatio:!0,stopPropagation:!0,canExceedContainer:this.canExceedContainer,anchorMode:0}),this.resizableHandler.on("resize",this.onResize)},A.prototype.initContainerMouseEventHander=function(){this.container?(this.onContainerMousedown=this.onContainerMousedown.bind(this),this.onContainerMousemove=this.onContainerMousemove.bind(this),this.onContainerMouseup=this.onContainerMouseup.bind(this),document.addEventListener("mousedown",this.onContainerMousedown,!1),this.onRightButtonClicked=this.onRightButtonClicked.bind(this),this.container.addEventListener("contextmenu",this.onRightButtonClicked,!1)):this.logger.error("".concat(this.logPrefix,"initContainerMouseEventHander failed, no container view"))},A.prototype.initContainerResizeObserver=function(){this.container&&(this.onPreviewAreaResize=this.onPreviewAreaResize.bind(this),this.resizeObserver=new ResizeObserver(this.onPreviewAreaResize),this.resizeObserver.observe(this.container))},A.prototype.onPreviewAreaResize=function(e){for(var A=0,t=e;A<t.length;A++){if(t[A].target===this.container){this.updatePreviewProperty(),this.updateOverlay();break}}},A.prototype.updatePreviewProperty=function(){if(this.container){var e=this.container.offsetWidth,A=this.container.offsetHeight,t=e/this.mixingVideoWidth,i=A/this.mixingVideoHeight;this.previewScale=t>i?t:i,this.previewWidth=this.mixingVideoWidth*this.previewScale,this.previewHeight=this.mixingVideoHeight*this.previewScale,this.previewLeft=(e-this.previewWidth)/2,this.previewTop=(A-this.previewHeight)/2}else console.debug("".concat(this.logPrefix,"calcPreviewScale failed, no HTML element to display"))},A.prototype.updateOverlay=function(){if(this.moveAndResizeOverlay){var e=void 0,A=void 0,t=void 0,i=void 0;if(this.selectedMediaIndex>=0){var o={left:this.mediaList[this.selectedMediaIndex].rect.left*this.previewScale,top:this.mediaList[this.selectedMediaIndex].rect.top*this.previewScale,right:this.mediaList[this.selectedMediaIndex].rect.right*this.previewScale,bottom:this.mediaList[this.selectedMediaIndex].rect.bottom*this.previewScale};e="".concat(o.left+this.previewLeft,"px"),A="".concat(o.top+this.previewTop,"px"),t="".concat(o.right-o.left,"px"),i="".concat(o.bottom-o.top,"px"),this.moveAndResizeOverlay.style.display="block"}else e="".concat(this.previewLeft,"px"),A="".concat(this.previewTop,"px"),t="0px",i="0px",this.moveAndResizeOverlay.style.display="none";this.moveAndResizeOverlay.style.left=e,this.moveAndResizeOverlay.style.top=A,this.moveAndResizeOverlay.style.width=t,this.moveAndResizeOverlay.style.height=i}},A.prototype.onMove=function(e,A){var t;console.debug("".concat(this.logPrefix,"onMove: ").concat(e," ").concat(A));var i=this.mediaList[this.selectedMediaIndex];if(i&&this.moveAndResizeOverlay){var o={left:e-this.previewLeft,top:A-this.previewTop,right:e-this.previewLeft+this.moveAndResizeOverlay.offsetWidth,bottom:A-this.previewTop+this.moveAndResizeOverlay.offsetHeight};this.doAdsorption(o);var r={left:Math.round(o.left/this.previewScale),top:Math.round(o.top/this.previewScale),right:Math.round(o.right/this.previewScale),bottom:Math.round(o.bottom/this.previewScale)};null===(t=this.eventEmitter)||void 0===t||t.emit("onSourceMoved",n({},i),r)}else console.debug("".concat(this.logPrefix,"onMove no selected media"))},A.prototype.doAdsorption=function(e){var A=this.BOUNDARY_ADSORPTION_THRESHOLD;Math.abs(e.left)<A&&(e.right=e.right-e.left,e.left=0),Math.abs(e.top)<A&&(e.bottom=e.bottom-e.top,e.top=0),Math.abs(e.right-this.previewWidth)<A&&(e.left=e.left+this.previewWidth-e.right,e.right=this.previewWidth),Math.abs(e.bottom-this.previewHeight)<A&&(e.top=e.top+this.previewHeight-e.bottom,e.bottom=this.previewHeight)},A.prototype.onResize=function(e,A,t,i){var o;console.debug("".concat(this.logPrefix,"onResize: ").concat(e," ").concat(A," ").concat(t," ").concat(i));var r=this.mediaList[this.selectedMediaIndex];if(r){var s={left:e-this.previewLeft,top:A-this.previewTop,right:e-this.previewLeft+t,bottom:A-this.previewTop+i},a={left:Math.round(s.left/this.previewScale),top:Math.round(s.top/this.previewScale),right:Math.round(s.right/this.previewScale),bottom:Math.round(s.bottom/this.previewScale)};null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceResized",n({},r),a)}else console.debug("".concat(this.logPrefix,"onResize no selected media"))},A.prototype.emitOnSelect=function(e){var A;if(e){for(var t=this.mediaList.length,i=0;i<t;i++)if(e.id===this.mediaList[i].id){this.selectedMediaIndex=i;break}}else this.selectedMediaIndex=-1;this.updateOverlay(),null===(A=this.eventEmitter)||void 0===A||A.emit("onSourceSelected",e?n({},e):null)},A.prototype.onContainerMousedown=function(e){console.debug("".concat(this.logPrefix,"onContainerMousedown event:"),e,e.target,e.currentTarget);var A=e.target;if(this.eventButton=e.button,A&&this.container){if(this.container.contains(A)){console.debug("".concat(this.logPrefix,"onContainerMousedown mix video image clicked"));var t=this.container.getBoundingClientRect(),i=e.clientX-t.x-this.previewLeft,o=e.clientY-t.y-this.previewTop,r=i/this.previewScale,n=o/this.previewScale;console.debug("".concat(this.logPrefix,"onContainerMousedown click point coordinates in mix video:"),i,o,r,n);for(var s=0;s<this.mediaList.length;s++){var a=this.mediaList[s];a.rect&&r>=a.rect.left&&r<=a.rect.right&&n>=a.rect.top&&n<=a.rect.bottom&&(this.clickedMediaSources.push(a),this.mediaList[this.selectedMediaIndex]&&a.id===this.mediaList[this.selectedMediaIndex].id&&(this.oldSelectedIndex=this.clickedMediaSources.length-1))}this.mousedownLeft=e.screenX,this.mousedownTop=e.screenY}this.clickedMediaSources.length>0?2===this.eventButton&&-1===this.oldSelectedIndex?(this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMousedown find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected),this.clickedMediaSources.splice(0,this.clickedMediaSources.length)):(document.addEventListener("mousemove",this.onContainerMousemove,!1),document.addEventListener("mouseup",this.onContainerMouseup,!1)):(this.newSelected=null,console.debug("".concat(this.logPrefix,"onContainerMousedown find clicked media source:"),this.newSelected),this.emitOnSelect(null),this.mousedownLeft=null,this.mousedownTop=null,this.eventButton=null)}},A.prototype.onContainerMousemove=function(e){var A;if(e.target&&this.container&&null!==this.mousedownLeft&&null!==this.mousedownTop){var t=e.screenX-this.mousedownLeft,i=e.screenY-this.mousedownTop;(Math.abs(t)>=5||Math.abs(i)>=5)&&(this.oldSelectedIndex>=0?(console.debug("".concat(this.logPrefix,"onContainerMousemove move or resize old selected media source, clear data:"),this.clickedMediaSources,this.oldSelectedIndex),this.clickedMediaSources.splice(0,this.clickedMediaSources.length),this.oldSelectedIndex=-1):this.clickedMediaSources.length>0&&(this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMousemove find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected),this.clickedMediaSources.splice(0,this.clickedMediaSources.length),null===(A=this.moveAndResizeOverlay)||void 0===A||A.dispatchEvent(new MouseEvent("mousedown",{screenX:this.mousedownLeft,screenY:this.mousedownTop,button:this.eventButton}))))}},A.prototype.onContainerMouseup=function(e){if(document.removeEventListener("mousemove",this.onContainerMousemove,!1),document.removeEventListener("mouseup",this.onContainerMouseup,!1),console.debug("".concat(this.logPrefix,"onContainerMouseup data:"),this.clickedMediaSources,this.oldSelectedIndex),e.target&&this.container){if(this.clickedMediaSources.length>0)if(this.oldSelectedIndex>=0){if(0===this.eventButton){var A=(this.oldSelectedIndex+1)%this.clickedMediaSources.length;this.newSelected=this.clickedMediaSources[A],console.debug("".concat(this.logPrefix,"onContainerMouseup find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected)}}else this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMouseup find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected)}else console.debug("".concat(this.logPrefix,"onContainerMouseup click outside of mixing video image")),this.emitOnSelect(null);this.mousedownLeft=null,this.mousedownTop=null,this.clickedMediaSources.splice(0,this.clickedMediaSources.length),this.oldSelectedIndex=-1,this.newSelected=null,this.eventButton=null},A.prototype.onRightButtonClicked=function(e){var A;console.debug("".concat(this.logPrefix,"onRightButtonClicked:"),e.target,e.currentTarget,e.buttons),e.preventDefault(),null===(A=this.eventEmitter)||void 0===A||A.emit("onRightButtonClicked",n({},this.mediaList[this.selectedMediaIndex]))},A}(),jr=function(){function A(t){if(this.logPrefix="[TRTCMediaMixingManager]",this.eventEmitter=new T,this.publishParams={videoEncoderParams:{videoResolution:e.TRTCVideoResolution.TRTCVideoResolution_1280_720,resMode:e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape,videoFps:15,videoBitrate:1800},canvasColor:0},this.mediaMixingDesigner=null,this.sourceList=[],this.trtcSourceMap=new Map,this.mixVideoTrack=null,this.selectedSource=null,this.view=null,A.mediaMixingManager)return A.mediaMixingManager;A.mediaMixingManager=this,this.logger=t.logger,this.trtc=t.trtc,this.trtcCloud=t.trtcCloud,this.onSourceSelected=this.onSourceSelected.bind(this),this.onSourceMoved=this.onSourceMoved.bind(this),this.onSourceResized=this.onSourceResized.bind(this),this.onRightButtonClicked=this.onRightButtonClicked.bind(this)}return A.prototype.destroy=function(){return s(this,void 0,Promise,(function(){var e;return a(this,(function(t){switch(t.label){case 0:this.view=null,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.trtc.stopPlugin("VideoMixer")];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin error:"),e),[3,4];case 4:return this.destroyDesigner(),this.eventEmitter=null,A.mediaMixingManager=null,[2]}}))}))},A.prototype.bindPreviewArea=function(e){return s(this,void 0,Promise,(function(){var A,t,i,o,r=this;return a(this,(function(n){switch(n.label){case 0:return this.logger.log("".concat(this.logPrefix," bindPreviewArea:"),e),this.view=e,A=this._getCanvasSize(this.publishParams.videoEncoderParams.videoResolution,this.publishParams.videoEncoderParams.resMode),t=A.width,i=A.height,[4,this.trtc.startPlugin("VideoMixer",{view:e,canvasInfo:{width:t,height:i,canvasColor:String(this.publishParams.canvasColor)},onScreenShareStop:function(e){var A,t=r.sourceList.find((function(A){return A.id===e}));r.removeMediaSource(t),null===(A=r.eventEmitter)||void 0===A||A.emit("onSourceDisconnected",t||null)}})];case 1:return o=n.sent(),console.log("startPlugin result",o,o.track),this.mixVideoTrack=o.track,this.createDesigner(),[2]}}))}))},A.prototype._getTRTCSourceKey=function(A){var t;return((t={})[e.TRTCMediaSourceType.kCamera]="camera",t[e.TRTCMediaSourceType.kScreen]="screen",t[e.TRTCMediaSourceType.kText]="text",t[e.TRTCMediaSourceType.kVideo]="video",t[e.TRTCMediaSourceType.kImage]="image",t)[A.type]},A.prototype._getTRTCFillMode=function(A){var t;return((t={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]="cover",t[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]="contain",t)[A]},A.prototype._getTRTCVideoProfile=function(A,t){var i,o=((i={})[e.TRTCVideoResolution.TRTCVideoResolution_480_270]={width:480,height:270},i[e.TRTCVideoResolution.TRTCVideoResolution_640_360]={width:640,height:360},i[e.TRTCVideoResolution.TRTCVideoResolution_960_540]={width:960,height:540},i[e.TRTCVideoResolution.TRTCVideoResolution_1280_720]={width:1280,height:720},i[e.TRTCVideoResolution.TRTCVideoResolution_1920_1080]={width:1920,height:1080},i);return{width:o[A].width,height:o[A].height,frameRate:t,bitrate:1e3}},A.prototype._getTRTCLayout=function(A){var t,i,o,r,n,s,a,g,c,u,C,I,l,d,h,B,E={zIndex:(null===(o=A.layout)||void 0===o?void 0:o.zOrder)||0};if(ue(null===(r=A.layout)||void 0===r?void 0:r.rect)||(E.x=null===(n=A.layout)||void 0===n?void 0:n.rect.left,E.y=null===(s=A.layout)||void 0===s?void 0:s.rect.top,E.width=(null===(a=A.layout)||void 0===a?void 0:a.rect.right)-(null===(g=A.layout)||void 0===g?void 0:g.rect.left),E.height=(null===(c=A.layout)||void 0===c?void 0:c.rect.bottom)-(null===(u=A.layout)||void 0===u?void 0:u.rect.top)),ue(null===(C=A.layout)||void 0===C?void 0:C.fillMode)||(E.fillMode=this._getTRTCFillMode(null===(I=A.layout)||void 0===I?void 0:I.fillMode)),!ue(null===(l=A.layout)||void 0===l?void 0:l.mirror)){var Q=((t={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!0,t[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,t[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,t);E.mirror=Q[null===(d=A.layout)||void 0===d?void 0:d.mirror]}if(!ue(null===(h=A.layout)||void 0===h?void 0:h.rotation)){var p=((i={})[e.TRTCVideoRotation.TRTCVideoRotation0]=0,i[e.TRTCVideoRotation.TRTCVideoRotation90]=90,i[e.TRTCVideoRotation.TRTCVideoRotation180]=180,i[e.TRTCVideoRotation.TRTCVideoRotation270]=270,i);E.rotation=p[null===(B=A.layout)||void 0===B?void 0:B.rotation]}return E},A.prototype._getTRTCSourceItem=function(A){var t,i,o,r,s,a,g,c,u;switch(A.type){case e.TRTCMediaSourceType.kScreen:return u=e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,{id:A.id,profile:this._getTRTCVideoProfile((null===(t=A.screen)||void 0===t?void 0:t.resolution)||u,(null===(i=A.screen)||void 0===i?void 0:i.fps)||15),layout:this._getTRTCLayout(A)};case e.TRTCMediaSourceType.kCamera:return u=e.TRTCVideoResolution.TRTCVideoResolution_1280_720,{id:A.id,cameraId:null===(o=A.camera)||void 0===o?void 0:o.cameraId,profile:this._getTRTCVideoProfile((null===(r=A.camera)||void 0===r?void 0:r.resolution)||u,(null===(s=A.camera)||void 0===s?void 0:s.fps)||15),videoTrack:null===(a=A.camera)||void 0===a?void 0:a.videoTrack,layout:this._getTRTCLayout(A)};case e.TRTCMediaSourceType.kText:return n(n({id:A.id},A.text||{}),{layout:this._getTRTCLayout(A)});case e.TRTCMediaSourceType.kImage:return{id:A.id,url:null===(g=A.image)||void 0===g?void 0:g.url,layout:this._getTRTCLayout(A)};case e.TRTCMediaSourceType.kVideo:return{id:A.id,url:null===(c=A.video)||void 0===c?void 0:c.url,layout:this._getTRTCLayout(A)};default:return null}},A.prototype._getCanvasSize=function(A,t){var i,o,r=((i={})[e.TRTCVideoResolution.TRTCVideoResolution_480_270]={width:480,height:270},i[e.TRTCVideoResolution.TRTCVideoResolution_640_360]={width:640,height:360},i[e.TRTCVideoResolution.TRTCVideoResolution_960_540]={width:960,height:540},i[e.TRTCVideoResolution.TRTCVideoResolution_1280_720]={width:1280,height:720},i[e.TRTCVideoResolution.TRTCVideoResolution_1920_1080]={width:1920,height:1080},i)[A],n=r.width,s=r.height;return t===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait&&(n=(o=[s,n])[0],s=o[1]),{width:n,height:s}},A.prototype.addMediaSource=function(e){var A;return s(this,void 0,Promise,(function(){var t,i,o,r,n;return a(this,(function(s){switch(s.label){case 0:if(this.logger.log("".concat(this.logPrefix,"addMediaSource:"),e),-1!==this.findMediaSourceIndex(e))throw new Error("Media source already existed");if(t=Be(e),i=this._getTRTCSourceKey(t),!(o=this._getTRTCSourceItem(t))||!i)throw new Error("Invalid media source");return(r=Be(this.trtcSourceMap.get(i))||[]).push(o),[4,this.trtc.updatePlugin("VideoMixer",(n={},n[i]=r,n))];case 1:if(s.sent().result.failedDetails.find((function(A){return A.id===e.id})))throw new Error("Failed to add media source");return t.isSelected&&(this.unselectMediaSource(this.selectedSource),this.selectedSource=e),this.trtcSourceMap.set(i,r),null===(A=this.mediaMixingDesigner)||void 0===A||A.addMedia({id:t.id,rect:this._getDesignerMediaRect(e),isSelected:t.isSelected||!0,origin:t}),t.isSelected&&(this.selectedSource=t),this.sourceList.push(t),[2]}}))}))},A.prototype.removeMediaSource=function(e){var A,t,i;return s(this,void 0,Promise,(function(){var o,r,n,s,g;return a(this,(function(a){switch(a.label){case 0:if(this.logger.log("".concat(this.logPrefix,"removeMediaSource:"),e),-1===(o=this.findMediaSourceIndex(e)))throw new Error("Not existing media source to remove");return r=this._getTRTCSourceKey(e),n=Be(this.trtcSourceMap.get(r))||[],s=n.findIndex((function(A){return A.id===e.id})),n.splice(s,1),[4,this.trtc.updatePlugin("VideoMixer",(g={},g[r]=n,g))];case 1:if(a.sent().result.failedDetails.find((function(A){return A.id===e.id})))throw new Error("Failed to remove media source");return null===(A=this.mediaMixingDesigner)||void 0===A||A.removeMedia({id:e.id,rect:null===(t=e.layout)||void 0===t?void 0:t.rect,isSelected:e.isSelected||!1,origin:Be(e)}),(null===(i=this.selectedSource)||void 0===i?void 0:i.id)===e.id&&(this.selectedSource=null),this.trtcSourceMap.set(r,n),this.sourceList.splice(o,1),[2]}}))}))},A.prototype._getDesignerMediaRect=function(A){var t,i,o=(null===(t=A.layout)||void 0===t?void 0:t.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom,g=s-r,c=a-n;switch(null===(i=A.layout)||void 0===i?void 0:i.rotation){case e.TRTCVideoRotation.TRTCVideoRotation0:case e.TRTCVideoRotation.TRTCVideoRotation180:return{left:r,top:n,right:s,bottom:a};case e.TRTCVideoRotation.TRTCVideoRotation90:case e.TRTCVideoRotation.TRTCVideoRotation270:return{left:r,top:n,right:r+c,bottom:n+g};default:return{left:r,top:n,right:s,bottom:a}}},A.prototype._getPluginMediaRect=function(A){var t,i,o=(null===(t=A.layout)||void 0===t?void 0:t.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom;switch(null===(i=A.layout)||void 0===i?void 0:i.rotation){case e.TRTCVideoRotation.TRTCVideoRotation0:case e.TRTCVideoRotation.TRTCVideoRotation180:return{left:r,top:n,right:s,bottom:a};case e.TRTCVideoRotation.TRTCVideoRotation90:case e.TRTCVideoRotation.TRTCVideoRotation270:return{left:r,top:n,right:r+(a-n),bottom:n+(s-r)};default:return{left:r,top:n,right:s,bottom:a}}},A.prototype.updateMediaSource=function(e){var A,t;return s(this,void 0,Promise,(function(){var i,o,r,s,g,c,u,C;return a(this,(function(a){switch(a.label){case 0:if(this.logger.log("".concat(this.logPrefix,"updateMediaSource:"),e),-1===(i=this.findMediaSourceIndex(e)))throw new Error("Not existing media source to update");return o=n(n({},this.sourceList[i]),Be(e)),e.isSelected?(this.unselectMediaSource(this.selectedSource),this.selectedSource=e):(null===(A=this.selectedSource)||void 0===A?void 0:A.id)===e.id&&(this.selectedSource=null),r=this._getTRTCSourceKey(o),s=this._getTRTCSourceItem(o),g=Be(this.trtcSourceMap.get(r))||[],c=g.findIndex((function(A){return A.id===e.id})),g[c]=s,[4,this.trtc.updatePlugin("VideoMixer",(C={},C[r]=g,C))];case 1:if(a.sent().result.failedDetails.find((function(A){return A.id===e.id})))throw new Error("Failed to update media source");return u={id:e.id,rect:this._getDesignerMediaRect(e),isSelected:e.isSelected||!1,origin:Be(e)},this.logger.log("".concat(this.logPrefix,"updateParams:"),JSON.stringify(u)),null===(t=this.mediaMixingDesigner)||void 0===t||t.updateMedia(u),this.trtcSourceMap.set(r,g),this.sourceList[i]=o,[2]}}))}))},A.prototype.startPublish=function(){return s(this,void 0,Promise,(function(){return a(this,(function(A){switch(A.label){case 0:return this.logger.log("".concat(this.logPrefix," startPublish")),[4,this.trtcCloud.setLocalRenderParams({rotation:e.TRTCVideoRotation.TRTCVideoRotation0,fillMode:e.TRTCVideoFillMode.TRTCVideoFillMode_Fit,mirrorType:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable})];case 1:return A.sent(),[4,this.trtcCloud._startPublishVideoTrack({videoTrack:this.mixVideoTrack})];case 2:return A.sent(),[2]}}))}))},A.prototype.stopPublish=function(){return s(this,void 0,Promise,(function(){return a(this,(function(e){switch(e.label){case 0:return this.logger.log("".concat(this.logPrefix," stopPublish")),[4,this.trtcCloud._stopPublishVideoTrack()];case 1:return e.sent(),[2]}}))}))},A.prototype.updatePublishParams=function(e){var A,t,i,r,n;return s(this,void 0,Promise,(function(){var s,g,c,C,I,l,d,h,B,E,Q,p,f,T,y,v,m,R,w,S,M,D,b,L;return a(this,(function(a){switch(a.label){case 0:this.logger.log("".concat(this.logPrefix,"updatePublishParams:"),e),s=this.publishParams,this.publishParams=e,g=this._getCanvasSize(e.videoEncoderParams.videoResolution,e.videoEncoderParams.resMode),c=g.width,C=g.height,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.trtc.updatePlugin("VideoMixer",{canvasInfo:{width:c,height:C,canvasColor:String(e.canvasColor)}})];case 2:return a.sent(),[3,4];case 3:if((I=a.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw I;return[3,4];case 4:null===(i=this.mediaMixingDesigner)||void 0===i||i.updateOptions({videoResolution:this.publishParams.videoEncoderParams.videoResolution,resMode:this.publishParams.videoEncoderParams.resMode}),a.label=5;case 5:a.trys.push([5,11,12,17]),l=u(this.sourceList),a.label=6;case 6:return[4,l.next()];case 7:return(d=a.sent()).done?[3,10]:(h=d.value).layout?(B=h.layout.rect||{left:0,top:0,right:0,bottom:0},E=B.left,Q=B.top,p=B.right,f=B.bottom,T=this._getCanvasSize(s.videoEncoderParams.videoResolution),y=T.width,v=T.height,m=this._getCanvasSize(e.videoEncoderParams.videoResolution),R=m.width,w=m.height,S=E*R/y,M=Q*w/v,D=p*R/y,b=f*w/v,h.layout.rect={left:S,top:M,right:D,bottom:b},[4,this.updateMediaSource(h)]):[3,9];case 8:a.sent(),null===(r=this.eventEmitter)||void 0===r||r.emit("onSourceResized",h,null===(n=h.layout)||void 0===n?void 0:n.rect),a.label=9;case 9:return[3,6];case 10:return[3,17];case 11:return L=a.sent(),A={error:L},[3,17];case 12:return a.trys.push([12,,15,16]),d&&!d.done&&(t=l.return)?[4,t.call(l)]:[3,14];case 13:a.sent(),a.label=14;case 14:return[3,16];case 15:if(A)throw A.error;return[7];case 16:return[7];case 17:return[4,this.trtcCloud.setVideoEncoderParam(e.videoEncoderParams)];case 18:return a.sent(),[2]}}))}))},A.prototype.on=function(e,A){var t;null===(t=this.eventEmitter)||void 0===t||t.on(e,A)},A.prototype.off=function(e,A){var t;null===(t=this.eventEmitter)||void 0===t||t.off(e,A)},A.prototype.onVisibilityChange=function(){this.logger.log("".concat(this.logPrefix,"onVisibilityChange document.hidden:").concat(document.hidden)),document.hidden?this.bindPreviewArea(null):this.bindPreviewArea(this.view)},A.prototype.createDesigner=function(){var A,t;this.view&&(this.mediaMixingDesigner=new Jr({view:this.view,videoResolution:(null===(A=this.publishParams)||void 0===A?void 0:A.videoEncoderParams.videoResolution)||e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,resMode:(null===(t=this.publishParams)||void 0===t?void 0:t.videoEncoderParams.resMode)||e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape,canExceedContainer:!0,logger:this.logger}),this.listenDesignerEvent())},A.prototype.destroyDesigner=function(){var e;this.mediaMixingDesigner&&(this.unlistenDesignerEvent(),null===(e=this.mediaMixingDesigner)||void 0===e||e.destroy(),this.mediaMixingDesigner=null)},A.prototype.listenDesignerEvent=function(){var e,A,t,i,o;null===(e=this.mediaMixingDesigner)||void 0===e||e.on("onError",this.onError),null===(A=this.mediaMixingDesigner)||void 0===A||A.on("onSourceSelected",this.onSourceSelected),null===(t=this.mediaMixingDesigner)||void 0===t||t.on("onSourceMoved",this.onSourceMoved),null===(i=this.mediaMixingDesigner)||void 0===i||i.on("onSourceResized",this.onSourceResized),null===(o=this.mediaMixingDesigner)||void 0===o||o.on("onRightButtonClicked",this.onRightButtonClicked)},A.prototype.unlistenDesignerEvent=function(){var e,A,t,i,o;null===(e=this.mediaMixingDesigner)||void 0===e||e.off("onError",this.onError),null===(A=this.mediaMixingDesigner)||void 0===A||A.off("onSourceSelected",this.onSourceSelected),null===(t=this.mediaMixingDesigner)||void 0===t||t.off("onSourceMoved",this.onSourceMoved),null===(i=this.mediaMixingDesigner)||void 0===i||i.off("onSourceResized",this.onSourceResized),null===(o=this.mediaMixingDesigner)||void 0===o||o.off("onRightButtonClicked",this.onRightButtonClicked)},A.prototype.onError=function(e,A){this.logger.log("".concat(this.logPrefix,"onError:"),e,A)},A.prototype.onSourceSelected=function(e){var A;return s(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return this.logger.debug("".concat(this.logPrefix,"onSourceSelected: "),e,this.selectedSource),e&&this.selectedSource&&e.origin.id===this.selectedSource.id?[2]:(null==e?void 0:e.origin)?(this.updateMediaSource(n(n({},e.origin),{isSelected:!0})),[3,3]):[3,1];case 1:return this.selectedSource?[4,this.updateMediaSource(n(n({},this.selectedSource),{isSelected:!1}))]:[3,3];case 2:t.sent(),this.selectedSource=null,t.label=3;case 3:return null===(A=this.eventEmitter)||void 0===A||A.emit("onSourceSelected",e?e.origin:null),[2]}}))}))},A.prototype.onSourceMoved=function(e,A){var t,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceMoved:"),e,A),null==e?void 0:e.origin){var o=n(n({},e.origin),{layout:n(n({},e.origin.layout),{rect:A})});this.updateMediaSource(he(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(t=this.selectedSource)||void 0===t?void 0:t.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(A){return A.id===e.origin.id}))),null===(i=this.eventEmitter)||void 0===i||i.emit("onSourceMoved",e.origin,this._getPluginMediaRect(o))}},A.prototype.onSourceResized=function(e,A){var t,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceResized:"),e,A),null==e?void 0:e.origin){var o=n(n({},e.origin),{layout:n(n({},e.origin.layout),{rect:A})});this.updateMediaSource(he(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(t=this.selectedSource)||void 0===t?void 0:t.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(A){return A.id===e.origin.id})))}null===(i=this.eventEmitter)||void 0===i||i.emit("onSourceResized",e.origin,A)},A.prototype.onRightButtonClicked=function(e){var A;this.logger.debug("".concat(this.logPrefix,"onRightButtonClicked:"),e),null===(A=this.eventEmitter)||void 0===A||A.emit("onRightButtonClicked",e.origin)},A.prototype.isSameMediaSource=function(e,A){return e.id===A.id},A.prototype.isMediaSourceExisted=function(e){var A=this;return this.sourceList.some((function(t){return A.isSameMediaSource(t,e)}))},A.prototype.findMediaSourceIndex=function(e){return this.sourceList.findIndex((function(A){return A.id===e.id}))},A.prototype.unselectMediaSource=function(e){var A,t;return s(this,void 0,Promise,(function(){var i;return a(this,(function(o){return e?(-1!==(i=this.findMediaSourceIndex(e))&&(this.sourceList[i].isSelected=!1),null===(A=this.mediaMixingDesigner)||void 0===A||A.updateMedia({id:e.id,rect:null===(t=e.layout)||void 0===t?void 0:t.rect,isSelected:!1,origin:Be(e)}),[2]):[2]}))}))},A.mediaMixingManager=null,A}(),zr=Object.defineProperty,Wr=Object.getOwnPropertySymbols,Zr=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,qr=(e,A,t)=>A in e?zr(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,$r=(e,A)=>{for(var t in A||(A={}))Zr.call(A,t)&&qr(e,t,A[t]);if(Wr)for(var t of Wr(A))Xr.call(A,t)&&qr(e,t,A[t]);return e},en=(e,A,t)=>qr(e,"symbol"!=typeof A?A+"":A,t),An={x:{required:!0,type:"number"},y:{required:!0,type:"number"},width:{required:!0,type:"number",notLessThanZero:!0,min:1,max:3840},height:{required:!0,type:"number",notLessThanZero:!0,min:1,max:3840},zIndex:{required:!0,type:"number"},fillMode:{required:!1,type:"string"},mirror:{required:!1,type:"boolean"},rotation:{required:!1,type:"number"},hidden:{required:!1,type:"boolean"}},tn=(e,A=!1)=>({type:"object",required:A,properties:{canvasColor:{required:!1,type:["string",CanvasGradient,CanvasPattern]},width:{required:!0,type:"number",notLessThanZero:!0,min:1,max:3840},height:{required:!0,type:"number",notLessThanZero:!0,min:1,max:3840},frameRate:{required:!1,type:"number",notLessThanZero:!0,min:1,max:60}},validate(A,t,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(!A)return;const{width:s,height:a}=A;if(s&&a&&s*a>8294400)throw new o({code:r.INVALID_PARAMETER,message:"The mix resolution cannot be set higher than 3840 * 2160."})}}),on=e=>({required:!1,type:["string",HTMLElement,null],validate(A,t,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(e.utils.isString(A)&&!document.getElementById(A))throw new o({code:r.INVALID_PARAMETER,extraCode:n.INVALID_ELEMENT_ID,fnName:i,messageParams:{key:t}})}}),rn=(e,A=!0)=>({type:"object",required:A,properties:$r({},An),validate(A,t,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(A){if(A.fillMode&&!["contain","cover","fill"].includes(A.fillMode))throw new o({code:r.INVALID_PARAMETER,extraCode:n.INVALID_PARAMETER_TYPE,message:"The fillMode parameter must be 'contain', 'cover' or 'fill'",fnName:i});if(A.rotation&&![0,90,180,270].includes(A.rotation))throw new o({code:r.INVALID_PARAMETER,extraCode:n.INVALID_PARAMETER_TYPE,message:"The rotation parameter must be 0, 90, 180 or 270",fnName:i})}}}),nn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},cameraId:{required:!1,type:"string"},videoTrack:{required:!1,instanceof:MediaStreamTrack},profile:{required:!1,type:["string","object"],properties:{width:{type:"number"},height:{type:"number"},frameRate:{type:"number"},bitrate:{type:"number"}}},layout:$r({},rn(e))}}}),sn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},profile:{required:!1,type:["string","object"],properties:{width:{type:"number"},height:{type:"number"},frameRate:{type:"number"},bitrate:{type:"number"}}},captureElement:{required:!1,type:HTMLElement},preferDisplaySurface:{required:!1,type:"string"},layout:$r({},rn(e))},validate(A,t,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(!e.rtcDectection.isScreenCaptureApiAvailable())throw new o({code:r.ENV_NOT_SUPPORTED,fnName:i,extraCode:n.NOT_SUPPORTED_SCREEN_SHARE})}}}),an=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},content:{required:!0,type:"string"},font:{required:!1,type:"string"},color:{required:!1,type:["string",CanvasGradient,CanvasPattern]},layout:$r({},rn(e))}}}),gn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:$r({},rn(e))}}}),cn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:$r({},rn(e))}}});var un=0,Cn=class e{constructor(e){this.core=e,en(this,"seq"),en(this,"log"),en(this,"localMixVideoTrack",null),en(this,"_mixVideoConfig"),en(this,"onScreenShareStop"),un+=1,this.seq=un,this.log=e.log.createChild({id:`${this.getAlias()}${un}`}),this.log.info("created")}getName(){return e.Name}getAlias(){return"vmix"}getValidateRule(e){switch(e){case"start":return function(e){return{name:"VideoMixerOptions",type:"object",required:!0,allowEmpty:!1,properties:{view:$r({},on(e)),canvasInfo:$r({},tn(e,!0)),camera:$r({},nn(e)),screen:$r({},sn(e)),text:$r({},an(e)),image:$r({},gn(e)),video:$r({},cn(e))},validate(A,t,i,o){const{RtcError:r,ErrorCode:n,ErrorCodeDictionary:s}=e.errorModule;if(e.environment.isMobile())throw new r({code:n.ENV_NOT_SUPPORTED,message:"VideoMixer is not supported on mobile devices currently"});const{onScreenShareStop:a}=A;if(a&&!e.utils.isFunction(a))throw new r({code:n.INVALID_PARAMETER,extraCode:s.INVALID_PARAMETER_TYPE,fnName:i,messageParams:{key:"onScreenShareStop",value:typeof a,rule:{type:"Function"}}})}}}(this.core);case"update":return function(e){return{name:"VideoMixerOptions",type:"object",required:!1,allowEmpty:!1,properties:{view:$r({},on(e)),canvasInfo:$r({},tn(e)),camera:$r({},nn(e)),screen:$r({},sn(e)),text:$r({},an(e)),image:$r({},gn(e)),video:$r({},cn(e))}}}(this.core);case"stop":return this.core,{name:"StopVideoMixerOptions",required:!1}}}getGroup(){return"vmix"}async start(e){this.localMixVideoTrack||(this.localMixVideoTrack=new this.core.LocalMixVideoTrack(this.core.room.videoManager)),this._mixVideoConfig={canvasInfo:{width:1920,height:1080}},e=this.core.utils.deepCloneBasic(e);const{view:A,onScreenShareStop:t}=e,i=await this.parseMixOptions(e);return t&&(this.onScreenShareStop=t,this._mixVideoConfig.onScreenShareStop=t),this._updatePreview({view:A,track:this.localMixVideoTrack}),this.core.utils.isUndefined(A)||(this._mixVideoConfig.view=A),await this.localMixVideoTrack.startMix(),{track:this.localMixVideoTrack._outputTrack,result:i}}async update(e){const{RtcError:A,ErrorCode:t}=this.core.errorModule;if(!this.localMixVideoTrack)throw new A({code:t.INVALID_OPERATION,message:"mixTrack doesn't initialize!"});e=this.core.utils.deepCloneBasic(e);const{view:i}=e,o=await this.parseMixOptions(e);return await this._updatePreview({view:i,track:this.localMixVideoTrack,prevConfig:this._mixVideoConfig}),this.core.utils.isUndefined(i)||(this._mixVideoConfig.view=i),{track:this.localMixVideoTrack._outputTrack,result:o}}async parseMixOptions(e){let A={successOptions:{},failedDetails:[]};const{RtcError:t,ErrorCode:i,ErrorCodeDictionary:o}=this.core.errorModule;if(!this.localMixVideoTrack||!this._mixVideoConfig)return A;const r=[],n=$r({},e),{canvasInfo:s,camera:a,screen:g,text:c,image:u,video:C}=e;let I=0,l=0;if(s){const{canvasColor:e,width:A,height:t,frameRate:i}=s;e&&this.localMixVideoTrack.setMixBackground(e),i&&this.localMixVideoTrack.setFps(i),this.localMixVideoTrack.resizeMixCanvas(A,t),this._mixVideoConfig.canvasInfo=s}if(a){I++;const{finalOptions:e,errors:A}=await this.parseCameraOptions(this.localMixVideoTrack,a,this._mixVideoConfig.camera);this._mixVideoConfig.camera=e,n.camera=e,A.length>0&&(r.push(...A),A.length===a.length&&l++)}if(g){I++;const{finalOptions:e,errors:A}=await this.parseScreenOptions(this.localMixVideoTrack,g,this._mixVideoConfig.screen);this._mixVideoConfig.screen=e,n.screen=e,A.length>0&&(r.push(...A),A.length===g.length&&l++)}if(c){I++;const{finalOptions:e,errors:A}=await this.parseTextOptions(this.localMixVideoTrack,c,this._mixVideoConfig.text);this._mixVideoConfig.text=e,n.text=e,A.length>0&&(r.push(...A),A.length===c.length&&l++)}if(u){I++;const{finalOptions:e,errors:A}=await this.parseImageOptions(this.localMixVideoTrack,u,this._mixVideoConfig.image);this._mixVideoConfig.image=e,n.image=e,A.length>0&&(r.push(...A),A.length===u.length&&l++)}if(C){I++;const{finalOptions:e,errors:A}=await this.parseVideoOptions(this.localMixVideoTrack,C,this._mixVideoConfig.video);this._mixVideoConfig.video=e,n.video=e,A.length>0&&(r.push(...A),A.length===C.length&&l++)}if(l>0&&l===I)throw new t({code:i.INVALID_PARAMETER,message:"all sources mix failed",data:{failedDetails:r}});return A={successOptions:n,failedDetails:r},A}async parseCameraOptions(e,A,t=[]){var i,o;const r=new Set(A.map((e=>e.id))),n=t.filter((e=>!r.has(e.id))).map((e=>e.id));for(const c of n)e.removeCameraSource(c);const s=new Map(t.map((e=>[e.id,e]))),a=[],g=[];for(const c of A){const{id:A,layout:t,profile:r}=c;try{if(e.inputLocalVideoTracks.has(A)){const n=null==(i=e.inputLocalVideoTracks.get(A))?void 0:i.mediaTrack;await this.updateCameraProfile(c);const s=null==(o=e.inputLocalVideoTracks.get(A))?void 0:o.mediaTrack;let a;r&&(a=this.core.utils.isString(r)?this.core.constants.videoProfileMap[r]:r),s!==n?e.updateCameraSource(A,t,s,a):e.updateCameraSource(A,t,null,a)}else{const i=await this.captureCamera(c);try{e.addCameraSource(A,i,t)}catch(e){throw i.close(),e}}a.push(c)}catch(e){g.push({id:A,error:e}),s.has(A)&&a.push(s.get(A))}}return{finalOptions:a,errors:g}}async parseScreenOptions(e,A,t=[]){const i=new Set(A.map((e=>e.id))),o=t.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeScreenSource(a);const r=new Map(t.map((e=>[e.id,e]))),n=[],s=[];for(const a of A){const{id:A,layout:t}=a;try{if(e.inputLocalScreenTracks.has(A))e.updateScreenSource(A,t);else{const i=await this.captureScreen(a);try{e.addScreenSource(A,i,t)}catch(e){throw i.close(),e}}n.push(a)}catch(e){s.push({id:A,error:e}),r.has(A)&&n.push(r.get(A))}}return{finalOptions:n,errors:s}}async parseTextOptions(e,A,t=[]){const i=new Set(A.map((e=>e.id))),o=t.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeTextSource(a);const r=new Map(t.map((e=>[e.id,e]))),n=[],s=[];for(const a of A){const{id:A}=a;try{t.some((e=>e.id===A))?e.updateTextSource(a):e.addTextSource(a),n.push(a)}catch(e){s.push({id:A,error:e}),r.has(A)&&n.push(r.get(A))}}return{finalOptions:n,errors:s}}async parseImageOptions(e,A,t=[]){const i=new Set(A.map((e=>e.id))),o=t.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeImageSource(a);const r=new Map(t.map((e=>[e.id,e]))),n=[],s=[];for(const a of A){const{id:A,url:i,layout:o}=a;try{const r=t.find((e=>e.id===A));if(r){let t;r.url!==i&&(t=await this.core.utils.loadImage(i)),e.updateImageSource(A,o,t)}else{const t=await this.core.utils.loadImage(i);e.addImageSource(A,t,o)}n.push(a)}catch(e){s.push({id:A,error:e}),r.has(A)&&n.push(r.get(A))}}return{finalOptions:n,errors:s}}async parseVideoOptions(e,A,t=[]){const i=new Set(A.map((e=>e.id))),o=t.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeVideoSource(a);const r=new Map(t.map((e=>[e.id,e]))),n=[],s=[];for(const a of A){const{id:A,url:i,layout:o}=a;try{const r=t.find((e=>e.id===A));let s;if(r)r.url!==i&&(s=await this.core.utils.loadVideo(i)),e.updateVideoSource(A,o,s);else{const t=await this.core.utils.loadVideo(i);e.addVideoSource(A,t,o)}n.push(a)}catch(e){s.push({id:A,error:e}),r.has(A)&&n.push(r.get(A))}}return{finalOptions:n,errors:s}}async captureCamera(e){const{id:A,cameraId:t,videoTrack:i,profile:o}=e,r=new this.core.LocalVideoTrack;r.log.id+=`-${A}`;const n={};return t?n.deviceId=t:this.core.utils.isUndefined(i)||(n.customSource=i),this.core.utils.isUndefined(o)||(this.core.utils.isString(o)?this.core.constants.videoProfileMap[o]&&r.setProfile(this.core.constants.videoProfileMap[o]):r.setProfile(o)),await r.capture(n),r}async updateCameraProfile(e){var A;const{id:t,cameraId:i,videoTrack:o,profile:r}=e,n=null==(A=this.localMixVideoTrack)?void 0:A.inputLocalVideoTracks.get(t);n&&(i?await n.switchDevice(i):this.core.utils.isUndefined(o)||await n.setInputMediaStreamTrack(o),this.core.utils.isUndefined(r)||(this.core.utils.isString(r)?this.core.constants.videoProfileMap[r]&&n.setProfile(this.core.constants.videoProfileMap[r]):n.setProfile(r),i&&n.isNeedToSwitchDevice(i)||await n.applyProfile()))}async captureScreen(e){const{id:A,profile:t,captureElement:i,preferDisplaySurface:o}=e,r=new this.core.LocalScreenTrack;r.log.id+=`-${A}`;const n={};return this.core.utils.isUndefined(t)||(this.core.utils.isString(t)?this.core.constants.screenProfileMap[t]&&r.setProfile(this.core.constants.screenProfileMap[t]):r.setProfile(t)),i&&(n.captureElement=i),o&&(n.preferDisplaySurface=o),await r.capture(n),r.mediaTrack.addEventListener(this.core.constants.NAME.ENDED,(()=>{var e,t,i;null==(e=this.localMixVideoTrack)||e.removeScreenSource(A),(null==(t=this._mixVideoConfig)?void 0:t.screen)&&(this._mixVideoConfig.screen=this._mixVideoConfig.screen.filter((e=>e.id!==A))),null==(i=this.onScreenShareStop)||i.call(this,A)})),r}async _updatePreview({view:e,track:A,prevConfig:t}){if(this.core.utils.isUndefined(e)&&t&&t.view){const e=this.core.utils.getViewListFromView(t.view);e.length>0&&await A.play(e)}if(!this.core.utils.isUndefined(e)){const t=this.core.utils.getViewListFromView(e);t.length>0?await A.play(t):A.stop()}}stop(){var e;null==(e=this.localMixVideoTrack)||e.close(),this.localMixVideoTrack=null,delete this.onScreenShareStop,delete this._mixVideoConfig}};en(Cn,"Name","VideoMixer");var In=Cn,ln=o.default._loggerManager;ln.info("TRTCCloud Version: ".concat(Er));var dn,hn,Bn,En="trtcCloud",Qn=1;navigator&&navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",(dn=function(){0!==pn.size&&Array.from(pn.values()).forEach((function(e){e.fn()}))},hn=30,function(){for(var e=this,A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];Bn>0&&clearTimeout(Bn),Bn=window.setTimeout((function(){dn.apply(e,A),Bn=-1}),hn)}));var pn=new Map,fn=function(A){function i(t){void 0===t&&(t={});var r=A.call(this)||this;r._version="",r._frameWorkType=30,r._component=0,r._language=0,r._networkProxy={},r._localView=null,r._autoRecvAudio=!0,r._autoRecvVideo=!1,r._localTestView=null,r._isVideoPublish=!0,r._localRenderParams={rotation:e.TRTCVideoRotation.TRTCVideoRotation0,fillMode:e.TRTCVideoFillMode.TRTCVideoFillMode_Fill,mirrorType:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto},r._encoderMirror=void 0,r._videoProfile={},r._isAudioPublish=!0,r._audioProfile=o.default.TYPE.AUDIO_PROFILE_STANDARD,r._captureVolume=100,r._playoutVolume=100,r._isSharingScreen=!1,r._remoteStreamConfig=new Map,r._remoteStreamMap=new Map,r._cameraList=[],r._microphoneList=[],r._speakerList=[],r._currentCamera={},r._currentMicrophone={},r._currentSpeaker={},r._currentCameraId="",r._currentMicrophoneId="",r._currentSpeakerId="",r._screenShareParams={option:{}},r._isMobile=Fo,r._isFrontCamera=!0,r._cameraVideoTrack=null,r._smallStreamVideoProfile=void 0,r._qosPreference=void 0,r._defaultVideoProfile={width:640,height:480,frameRate:15,bitrate:900},r._defaultScreenProfile={width:1920,height:1080,frameRate:15,bitrate:1500},r._defaultSmallVideoProfile={width:160,height:120,frameRate:15,bitrate:200},r._isVirtualBackground=!1,r._isTestVirtualBackground=!1,r._isBeautyEnabled=!1,r._isTestBeautyEnabled=!1,r._remoteStatisticsUserIdList=[],r._hasJoinedRoom=!1,r._isExitingRoom=!1,r._version=Er;var n=t.frameWorkType,s=void 0===n?30:n,a=t.component,g=void 0===a?0:a,c=t.language,u=void 0===c?0:c;return r._frameWorkType=s,r._component=g,r._language=u,r._trtc=o.default.create({enableSEI:i.enableSEI,assetsPath:i.assetsPath,plugins:[In]}),r._testTrtc=o.default.create(),r._log=o.default._loggerManager,r.logger=new br(ln,{seq:Qn++}),r._echoCancellation=void 0,r._noiseSuppression=void 0,r._autoGainControl=void 0,r._addTRTCEvents(),r.handleDeviceChange=r.handleDeviceChange.bind(r),pn.set(r,{fn:r.handleDeviceChange,self:r}),r}return function(e,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function t(){this.constructor=e}r(e,A),e.prototype=null===A?Object.create(A):(t.prototype=A.prototype,new t)}(i,A),i.getTRTCShareInstance=function(e){return i.shareInstance||(i.shareInstance=new i(e)),i.shareInstance},i.setLogLevel=function(A,t){var i,r=((i={})[e.TRTCLogLevel.TRTCLogLevelVerbose]=0,i[e.TRTCLogLevel.TRTCLogLevelDebug]=1,i[e.TRTCLogLevel.TRTCLogLevelInfo]=2,i[e.TRTCLogLevel.TRTCLogLevelWarn]=3,i[e.TRTCLogLevel.TRTCLogLevelError]=4,i[e.TRTCLogLevel.TRTCLogLevelFatal]=4,i[e.TRTCLogLevel.TRTCLogLevelNone]=5,i),n=r[A];ue(n)&&(n=r[e.TRTCLogLevel.TRTCLogLevelInfo]);var s=!Ie(t)||t;o.default.setLogLevel(n,s)},i.destroyTRTCShareInstance=function(){i.shareInstance&&(i.shareInstance._destroy(),i.shareInstance=null),Array.from(i.subCloudMap.keys()).forEach((function(e){return e._destroy()}))},i.callExperimentalAPI=function(e){console.log("static ".concat(En,".callExperimentalAPI"),e);var A=le(e);if(A!==e){var t=A.api,o=A.params;if(t&&o)try{switch(t){case"enableSEI":i.enableSEI=o.enable;break;case"setAssetsPath":i.assetsPath=o.assetsPath}}catch(r){throw r}}},i.prototype.createSubCloud=function(){if(this!==i.shareInstance)return null;var e=new i;return this._inheritPropertiesToSubCloud(e),this._inheritEventsToSubCloud(e),i.subCloudMap.set(e,e),e},i.prototype.destroy=function(){this!==i.shareInstance?(i.subCloudMap.get(this)&&i.subCloudMap.delete(this),this._destroy()):i.destroyTRTCShareInstance()},i.prototype._destroy=function(){pn.delete(this),this.removeAllListeners(),this._trtc.off("*"),this._trtc.destroy(),this._trtc=null,this._testTrtc.off("*"),this._testTrtc.destroy(),this._testTrtc=null},i.prototype.getSDKVersion=function(){return this._version||""},i.prototype.enterRoom=function(e,A){return s(this,void 0,Promise,(function(){var t,i,o,r,s,g,c,u,C,I,l,d,h,B,E,Q,p,f;return a(this,(function(a){switch(a.label){case 0:if(t=e.sdkAppId,i=e.userId,o=e.userSig,r=e.roomId,s=e.strRoomId,g=e.role,c=e.privateMapKey,u=e.businessInfo,C=e.enableAutoPlayDialog,I=e.proxy,l=e.streamId,d=e.userDefineRecordId,this.logger.update({sdkAppId:t,userId:i}),this.logger.info("".concat(En,".enterRoom with params: "),e,A),I&&(this._networkProxy=I),!(t&&i&&o))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),h={sdkAppId:t,userId:i,userSig:o,roomId:r,strRoomId:s,role:se[g],scene:ae[A],autoReceiveAudio:this._autoRecvAudio,autoReceiveVideo:this._autoRecvVideo,frameWorkType:this._frameWorkType,component:this._component,language:this._language},h=c?n(n({},h),{privateMapKey:c}):h,h=u?n(n({},h),{businessInfo:u}):h,B=C||this._enableAutoPlayDialog,h=Ie(B)?n(n({},h),{enableAutoPlayDialog:B}):h,h=this._networkProxy?n(n({},h),{proxy:this._networkProxy}):h,h=l?n(n({},h),{streamId:l}):h,h=d?n(n({},h),{userDefineRecordId:d}):h,h=void 0!==this._latencyLevel?n(n({},h),{latencyLevel:this._latencyLevel}):h,E=ce(),[4,this._trtc.enterRoom(h)];case 2:return a.sent(),this._hasJoinedRoom=!0,Q=ce()-E,this.emit("onEnterRoom",Q),[3,4];case 3:return p=a.sent(),f=(f=this._transformTRTCErrorCode(p,"enterRoom"))<0?f:-1,this.emit("onEnterRoom",f),this._callFunctionErrorManage(p,"enterRoom"),[3,4];case 4:return[3,6];case 5:this._emitError(hr),a.label=6;case 6:return[2]}}))}))},i.prototype.exitRoom=function(){return s(this,void 0,Promise,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),this.logger.info("".concat(En,".exitRoom")),this._isExitingRoom=!0,this._isSharingScreen&&this.stopScreenShare(),this.resetTRTCCloud(),this.stopLocalPreview(),this.stopLocalAudio(),[4,this._trtc.exitRoom()];case 1:return A.sent(),this._hasJoinedRoom=!1,this._isExitingRoom=!1,this.emit("onExitRoom",ir.exitRoom),[3,3];case 2:return e=A.sent(),this._callFunctionErrorManage(e,"exitRoom"),[3,3];case 3:return[2]}}))}))},i.prototype.switchRole=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".switchRole with param: "),e),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._trtc.switchRole(se[e])];case 2:return t.sent(),this.emit("onSwitchRole",0,"switch role success, role = ".concat(e,", ").concat(se[e])),[3,4];case 3:return A=t.sent(),this.emit("onSwitchRole",null==A?void 0:A.getCode(),A.message),[3,4];case 4:return[2]}}))}))},i.prototype.setDefaultStreamRecvMode=function(e,A){return s(this,void 0,void 0,(function(){return a(this,(function(t){return this.logger.info("".concat(En,".setDefaultStreamRecvMode with param: "),{autoRecvAudio:e,autoRecvVideo:A}),Ie(e)&&(this._autoRecvAudio=e),Ie(A)&&(this._autoRecvVideo=A),[2]}))}))},i.prototype.resetTRTCCloud=function(){this._setIsAudioPublish(!0),this._echoCancellation=void 0,this._noiseSuppression=void 0,this._autoGainControl=void 0,this._isVirtualBackground=!1,this._isTestVirtualBackground=!1,this._remoteStatisticsUserIdList=[],this._resetBeautyStyle()},i.prototype._updateLocalVideo=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._trtc.updateLocalVideo(this._generateLocalVideoData())];case 1:return A.sent(),[3,3];case 2:if((e=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestVideo=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._testTrtc.updateLocalVideo(this._generateLocalTestVideoData())];case 1:return A.sent(),[3,3];case 2:if((e=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalScreen=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._trtc.updateScreenShare(this._getScreenShareParams())];case 1:return A.sent(),[3,3];case 2:if((e=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateRemoteVideo=function(e,A){return s(this,void 0,void 0,(function(){var t;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this._trtc.updateRemoteVideo(this._generateRemoteVideoData(e,A))];case 1:return i.sent(),[3,3];case 2:if((t=i.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw t;return[3,3];case 3:return[2]}}))}))},i.prototype.startLocalPreview=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];return s(this,void 0,Promise,(function(){var A,t,i,r,n;return a(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(En,".startLocalPreview with params: "),e),1===c([],e,!0).length?t=c([],e,!0)[0]:2===c([],e,!0).length&&(n=c([],e,!0),A=n[0],t=n[1]),ue(A)||(this._setIsMobile(!0),this._setIsFrontCamera(A)),this._setLocalView(t),s.label=1;case 1:s.trys.push([1,9,,10]),s.label=2;case 2:return s.trys.push([2,4,,8]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return s.sent(),[3,8];case 4:return(i=s.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateLocalVideo()];case 5:return s.sent(),[3,7];case 6:throw i;case 7:return[3,8];case 8:return this.emit("onCameraDidReady"),[3,10];case 9:return r=s.sent(),this._callFunctionErrorManage(r,"startLocalPreview"),[3,10];case 10:return[2]}}))}))},i.prototype.updateLocalView=function(e){return s(this,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return this.logger.info("".concat(En,".updateLocalView with param: "),e),this._setLocalView(e),[4,this._updateLocalVideo()];case 1:return A.sent(),[2]}}))}))},i.prototype.stopLocalPreview=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(En,".stopLocalPreview")),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setLocalView(null),[4,this._trtc.stopLocalVideo()];case 2:return A.sent(),[3,4];case 3:return e=A.sent(),console.warn("".concat(En," stopLocalPreview error: ").concat(e)),this._callFunctionErrorManage(e,"stopLocalPreview"),[3,4];case 4:return[2]}}))}))},i.prototype.muteLocalVideo=function(e){return void 0===e&&(e=!1),s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".muteLocalVideo with params: "),e),t.label=1;case 1:return t.trys.push([1,3,,4]),this._setIsVideoPublish(!e),[4,this._updateLocalVideo()];case 2:return t.sent(),[3,4];case 3:return A=t.sent(),this._callFunctionErrorManage(A,"muteLocalVideo"),[3,4];case 4:return[2]}}))}))},i.prototype.startRemoteView=function(A,t,i){return s(this,void 0,void 0,(function(){var r,n;return a(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(En,".startRemoteView with params: "),A,t,i),s.label=1;case 1:if(s.trys.push([1,9,,10]),this._setRemoteStreamConfig(A,i,{view:t,small:i===e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall}),!this._remoteStreamMap.get("".concat(A,"_").concat(this._getTRTCStreamType(i))))return[2];s.label=2;case 2:return s.trys.push([2,4,,8]),[4,this._trtc.startRemoteVideo(this._generateRemoteVideoData(A,i))];case 3:return s.sent(),[3,8];case 4:return(r=s.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateRemoteVideo(A,i)];case 5:return s.sent(),[3,7];case 6:throw r;case 7:return[3,8];case 8:return[3,10];case 9:return n=s.sent(),this._callFunctionErrorManage(n,"startRemoteView"),[3,10];case 10:return[2]}}))}))},i.prototype.updateRemoteView=function(e,A,t){return s(this,void 0,void 0,(function(){return a(this,(function(i){switch(i.label){case 0:return this.logger.info("".concat(En,".updateRemoteView with params: "),e,A,t),this._setRemoteStreamConfig(e,t,{view:A}),this._remoteStreamMap.get("".concat(e,"_").concat(this._getTRTCStreamType(t)))?[4,this._updateRemoteVideo(e,t)]:[2];case 1:return i.sent(),[2]}}))}))},i.prototype.stopRemoteView=function(e,A){return s(this,void 0,void 0,(function(){var t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".stopRemoteView with params: "),e,A),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:e,streamType:this._getTRTCStreamType(A)})];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"stopRemoteView"),[3,4];case 4:return[2]}}))}))},i.prototype.stopAllRemoteView=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(En,".stopAllRemoteView")),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:"*"})];case 2:return A.sent(),[3,4];case 3:return e=A.sent(),this._callFunctionErrorManage(e,"stopAllRemoteView"),[3,4];case 4:return[2]}}))}))},i.prototype.setVideoEncoderParam=function(A){return s(this,void 0,void 0,(function(){var t,i;return a(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(En,".setVideoEncoderParam with params: "),A),o.label=1;case 1:return o.trys.push([1,4,,5]),t=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,A),this._setVideoProfile(t),[4,this._updateLocalVideo()];case 2:return o.sent(),[4,this._updateLocalTestVideo()];case 3:return o.sent(),[3,5];case 4:return i=o.sent(),this._callFunctionErrorManage(i,"setVideoEncoderParam"),[3,5];case 5:return[2]}}))}))},i.prototype.setNetworkQosParam=function(e){return s(this,void 0,void 0,(function(){var A,t,i=this;return a(this,(function(o){return this.logger.info("".concat(En,".setNetworkQosParam with params: "),e),A=e.preference,t=this._getTRTCQosPreference(A),this._setQosPreference(t),this._setScreenShareParams({qosPreference:t}),[2,new Promise((function(e,A){Promise.all([i._updateLocalVideo(),i._updateLocalScreen()]).then((function(){e(!0)})).catch((function(e){i._callFunctionErrorManage(e,"setNetworkQosParam"),A(e)}))}))]}))}))},i.prototype.setLocalRenderParams=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".setLocalRenderParams with params: "),e),Object.assign(this._localRenderParams,e),t.label=1;case 1:return t.trys.push([1,4,,5]),[4,this._updateLocalVideo()];case 2:return t.sent(),[4,this._updateLocalTestVideo()];case 3:return t.sent(),[3,5];case 4:return A=t.sent(),this._callFunctionErrorManage(A,"setLocalRenderParams"),[3,5];case 5:return[2]}}))}))},i.prototype.setVideoEncoderMirror=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".setVideoEncoderMirror with params: "),e),this._encoderMirror=e,t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._updateLocalVideo()];case 2:return t.sent(),[3,4];case 3:return A=t.sent(),this._callFunctionErrorManage(A,"setVideoEncoderMirror"),[3,4];case 4:return[2]}}))}))},i.prototype.setRemoteRenderParams=function(e,A,t){return s(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(En,".setRemoteRenderParams with params: "),e,A,t),o.label=1;case 1:return o.trys.push([1,3,,4]),this._setRemoteStreamConfig(e,A,t),[4,this._updateRemoteVideo(e,A)];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"setRemoteRenderParams"),[3,4];case 4:return[2]}}))}))},i.prototype._updateLocalAudio=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._trtc.updateLocalAudio(this._generateLocalAudioData())];case 1:return A.sent(),[3,3];case 2:if((e=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestAudio=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:return A.trys.push([0,2,,3]),[4,this._testTrtc.updateLocalAudio(this._generateLocalTestAudioData())];case 1:return A.sent(),[3,3];case 2:if((e=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype.startLocalAudio=function(A){return void 0===A&&(A=e.TRTCAudioQuality.TRTCAudioQualityDefault),s(this,void 0,void 0,(function(){var t,i,r;return a(this,(function(n){switch(n.label){case 0:A===e.TRTCAudioQuality.TRTCAudioQualitySpeech?this.logger.warn("Web trtcCloud not support audioQuality of TRTCAudioQualitySpeech, and will use TRTCAudioQualityDefault"):this.logger.info("".concat(En,".startLocalAudio with params: "),A),t=this._getTRTCAudioQuality(A),n.label=1;case 1:n.trys.push([1,9,,10]),this._setAudioProfile(t),n.label=2;case 2:return n.trys.push([2,4,,8]),[4,this._trtc.startLocalAudio(this._generateLocalAudioData())];case 3:return n.sent(),[3,8];case 4:return(i=n.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateLocalAudio()];case 5:return n.sent(),[3,7];case 6:throw i;case 7:return[3,8];case 8:return this.emit("onMicDidReady"),[3,10];case 9:return r=n.sent(),console.warn("".concat(En," startLocalAudio error: ").concat(r)),this._callFunctionErrorManage(r,"startLocalAudio"),[3,10];case 10:return[2]}}))}))},i.prototype.stopLocalAudio=function(){return s(this,void 0,void 0,(function(){var e;return a(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(En,".stopLocalAudio")),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._trtc.stopLocalAudio()];case 2:return A.sent(),[3,4];case 3:return e=A.sent(),this._callFunctionErrorManage(e,"stopLocalAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.muteLocalAudio=function(e){return void 0===e&&(e=!1),s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".muteLocalAudio with params: "),e),t.label=1;case 1:return t.trys.push([1,3,,4]),this._setIsAudioPublish(!e),[4,this._updateLocalAudio()];case 2:return t.sent(),[3,4];case 3:return A=t.sent(),this._callFunctionErrorManage(A,"muteLocalAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.setAudioCaptureVolume=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".setAudioCaptureVolume with params: "),e),t.label=1;case 1:return t.trys.push([1,3,,4]),this._setCaptureVolume(e),[4,this._updateLocalAudio()];case 2:return t.sent(),[3,4];case 3:return A=t.sent(),this._callFunctionErrorManage(A,"setAudioCaptureVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioCaptureVolume=function(){return this.logger.info("".concat(En,".getAudioCaptureVolume")),this._getCaptureVolume()},i.prototype.setAudioPlayoutVolume=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".setAudioPlayoutVolume with params: "),e),t.label=1;case 1:return t.trys.push([1,3,,4]),this._playoutVolume=e,[4,this._trtc.setRemoteAudioVolume("*",e)];case 2:return t.sent(),[3,4];case 3:return A=t.sent(),this._callFunctionErrorManage(A,"setAudioPlayoutVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioPlayoutVolume=function(){return this.logger.info("".concat(En,".getAudioPlayoutVolume")),this._playoutVolume},i.prototype.muteRemoteAudio=function(e,A){return void 0===A&&(A=!1),s(this,void 0,void 0,(function(){var t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".muteRemoteAudio with params: "),e,A),i.label=1;case 1:return i.trys.push([1,3,,4]),e?[4,this._trtc.muteRemoteAudio(e,A)]:(this._emitError(hr),[2]);case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"muteRemoteAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.muteAllRemoteAudio=function(e){this.logger.info("".concat(En,".muteAllRemoteAudio with params: "),e);try{this._trtc.muteRemoteAudio("*",e)}catch(A){this._callFunctionErrorManage(A,"muteAllRemoteAudio")}},i.prototype.muteAllRemoteVideoStreams=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".muteAllRemoteVideoStreams with params: "),e),t.label=1;case 1:return t.trys.push([1,6,,7]),e?[4,this._trtc.callExperimentalAPI("pauseRemotePlayer",{userId:"*"})]:[3,3];case 2:return t.sent(),[3,5];case 3:return[4,this._trtc.callExperimentalAPI("resumeRemotePlayer",{userId:"*"})];case 4:t.sent(),t.label=5;case 5:return[3,7];case 6:return A=t.sent(),this._callFunctionErrorManage(A,"muteAllRemoteVideoStreams"),[3,7];case 7:return[2]}}))}))},i.prototype.setRemoteAudioVolume=function(e,A){this.logger.info("".concat(En,".setRemoteAudioVolume with params: "),e,A);try{this._trtc.setRemoteAudioVolume(e,A)}catch(t){this._callFunctionErrorManage(t,"setRemoteAudioVolume")}},i.prototype.enableAudioVolumeEvaluation=function(e){this.logger.info("".concat(En,".enableAudioVolumeEvaluation with params: "),e);try{this._trtc.enableAudioVolumeEvaluation(e)}catch(A){this._callFunctionErrorManage(A,"enableAudioVolumeEvaluation")}},i.prototype.enableSmallVideoStream=function(A,t){return s(this,void 0,Promise,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return this.logger.info("".concat(En,".enableSmallVideoStream with params: "),A,t),A?(i=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,t),this._setSmallStreamVideoProfile(i)):this._setSmallStreamVideoProfile(void 0),[4,this._updateLocalVideo()];case 1:return o.sent(),[2]}}))}))},i.prototype.snapshotVideo=function(A,t){var i="";return i=""===A&&t===e.TRTCVideoStreamType.TRTCVideoStreamTypeBig?this._trtc.getVideoSnapshot():""===A&&t===e.TRTCVideoStreamType.TRTCVideoStreamTypeSub?this._trtc.getVideoSnapshot({streamType:this._getTRTCStreamType(t)}):this._trtc.getVideoSnapshot({userId:A,streamType:this._getTRTCStreamType(t)}),this.emit("onSnapshotComplete",A,t,i),i},i.prototype.startScreenShare=function(A,t,i){return s(this,void 0,void 0,(function(){var r,n,s,g,c,u;return a(this,(function(a){switch(a.label){case 0:this.logger.info("".concat(En,".startScreenShare with params: "),A,t,i),a.label=1;case 1:return a.trys.push([1,3,,4]),n=(r=i||{}).screenAudio,s=void 0!==n&&n,g=r.videoTrack,c=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,i),this._setScreenShareParams({view:A,profile:c,systemAudio:s,videoTrack:g}),[4,this._trtc.startScreenShare(this._getScreenShareParams())];case 2:return a.sent(),this._isSharingScreen=!0,[3,4];case 3:if((u=a.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw console.error("Start share screen error:",u,u.code,u.name,u.message),u;return[3,4];case 4:return[2]}}))}))},i.prototype.setSubStreamEncoderParam=function(A){return s(this,void 0,void 0,(function(){var t,i;return a(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(En,".setSubStreamEncoderParam with params: "),A),t=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,A),this._setScreenShareParams({profile:t}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._updateLocalScreen()];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"setSubStreamEncoderParam"),[3,4];case 4:return[2]}}))}))},i.prototype.stopScreenShare=function(){return s(this,void 0,Promise,(function(){var e;return a(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(En,".stopScreenShare")),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._trtc.stopScreenShare()];case 2:return A.sent(),this._clearScreenShareParams(),this._isSharingScreen=!1,this.emit("onScreenCaptureStopped",0),[3,4];case 3:return e=A.sent(),this._callFunctionErrorManage(e,"stopScreenShare"),[3,4];case 4:return[2]}}))}))},i.prototype._startPublishVideoTrack=function(e){var A=e.videoTrack;return s(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:this._cameraVideoTrack=A,t.label=1;case 1:t.trys.push([1,6,,7]),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return t.sent(),[3,5];case 4:throw t.sent();case 5:return[3,7];case 6:return e=t.sent(),this._callFunctionErrorManage(e,"startPublishVideoTrack"),[3,7];case 7:return[2]}}))}))},i.prototype._stopPublishVideoTrack=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this._cameraVideoTrack=null,[4,this._trtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},i.prototype.startScreenCapture=function(){this._emitError(Br)},i.prototype.pauseScreenCapture=function(){this._emitError(Br)},i.prototype.resumeScreenCapture=function(){this._emitError(Br)},i.prototype.getScreenCaptureSources=function(){this._emitError(Br)},i.prototype.selectScreenCaptureTarget=function(){this._emitError(Br)},i.prototype.getCameraDevicesList=function(){return s(this,void 0,Promise,(function(){var e,A,t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".getCameraDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getCameraList()];case 2:return e=i.sent(),A=e.map((function(e){return n(n({},e),{deviceName:e.label})})),this._cameraList=e,"{}"!==JSON.stringify(this._currentCamera)?[3,4]:(this._currentCamera=this.getDefaultDeviceInfo(e),this._currentCameraId=this._currentCamera.deviceId,[4,this.setCurrentCameraDevice(this._currentCameraId)]);case 3:i.sent(),i.label=4;case 4:return[2,Promise.resolve(A)];case 5:return t=i.sent(),this._callFunctionErrorManage(t,"getCameraDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentCameraDevice=function(e){var A;return s(this,void 0,Promise,(function(){var t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".setCurrentCameraDevice with params: "),{cameraId:e}),i.label=1;case 1:return i.trys.push([1,4,,5]),e?(this._currentCameraId=e,[4,this._updateLocalVideo()]):[2,!1];case 2:return i.sent(),[4,this._updateLocalTestVideo()];case 3:return i.sent(),this._currentCamera=this._cameraList.find((function(A){return A.deviceId===e}))||{},[3,5];case 4:throw t=i.sent(),this._currentCameraId=null===(A=this._currentCamera)||void 0===A?void 0:A.cameraId,this._callFunctionErrorManage(t,"setCurrentCameraDevice"),t;case 5:return[2]}}))}))},i.prototype.getCurrentCameraDevice=function(){this.logger.info("".concat(En,".getCurrentCameraDevice"));var e=this._currentCamera,A=e.deviceId,t=e.label,i=e.kind,o=e.groupId;return new m(A,t,i,t,o)},i.prototype.isFrontCamera=function(){return this._getIsFrontCamera()},i.prototype.switchCamera=function(e){return s(this,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return this.logger.info("".concat(En,".switchCamera with params: "),e),this._setIsFrontCamera(e),[4,this._updateLocalVideo()];case 1:return A.sent(),[2]}}))}))},i.prototype._onVirtualBackgroundError=function(e){this._emitError({code:-1006,message:e.message?e.message:"virtual background error"})},i.prototype.setVirtualBackground=function(e){return s(this,void 0,void 0,(function(){var A,t,i,o,r;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),A=e.enable,t=e.type,i=e.blurLevel,o=e.imagePath,A?this._isVirtualBackground?t!==re?[3,2]:[4,this._trtc.updatePlugin(ie,{type:t,blurLevel:i})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return t!==ne?[3,4]:[4,this._trtc.updatePlugin(ie,{type:t,src:o})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._trtc.startPlugin(ie,n(n({},e),{src:o,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:s.sent(),this._isVirtualBackground=!0,s.label=7;case 7:return[3,9];case 8:this._trtc.stopPlugin(ie),this._isVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw r=s.sent(),this.logger.error("".concat(En,".setVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.setTestVirtualBackground=function(e){return s(this,void 0,void 0,(function(){var A,t,i,o,r;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),A=e.enable,t=e.type,i=e.blurLevel,o=e.imagePath,A?this._isTestVirtualBackground?t!==re?[3,2]:[4,this._testTrtc.updatePlugin(ie,{type:t,blurLevel:i})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return t!==ne?[3,4]:[4,this._testTrtc.updatePlugin(ie,{type:t,src:o})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._testTrtc.startPlugin(ie,n(n({},e),{src:o,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:s.sent(),this._isTestVirtualBackground=!0,s.label=7;case 7:return[3,9];case 8:this._testTrtc.stopPlugin(ie),this._isTestVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw r=s.sent(),this.logger.error("".concat(En,".setTestVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.useVirtualBackground=function(e){return s(this,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return this._trtc?[4,this._trtc.use({plugin:t.VirtualBackground,assetsPath:e})]:[3,2];case 1:A.sent(),A.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:t.VirtualBackground,assetsPath:e})]:[3,4];case 3:A.sent(),A.label=4;case 4:return[2]}}))}))},i.prototype.setBeautyStyle=function(e,A,t,i){return s(this,void 0,void 0,(function(){return a(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._trtc,this._isBeautyEnabled,e,A,t,i,!1)];case 1:return o.sent(),[2]}}))}))},i.prototype.setTestBeautyStyle=function(e,A,t,i){return s(this,void 0,void 0,(function(){return a(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._testTrtc,this._isTestBeautyEnabled,e,A,t,i,!0)];case 1:return o.sent(),[2]}}))}))},i.prototype.useBeautyStyle=function(e){return s(this,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return this._trtc?[4,this._trtc.use({plugin:Mr,assetsPath:e})]:[3,2];case 1:A.sent(),A.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:Mr,assetsPath:e})]:[3,4];case 3:A.sent(),A.label=4;case 4:return[2]}}))}))},i.prototype._handleBeautyStyleParam=function(e,A,t,i,o,r,n){return s(this,void 0,void 0,(function(){var t,s,g,c,u;return a(this,(function(a){switch(a.label){case 0:if(i<0||i>9)throw new Error("beautyLevel must be between 0 and 9");if(o<0||o>9)throw new Error("whitenessLevel must be between 0 and 9");if(r<0||r>9)throw new Error("ruddinessLevel must be between 0 and 9");a.label=1;case 1:return a.trys.push([1,8,,9]),s=o/9,g=r/9,0===(t=i/9)&&0===s&&0===g?[4,e.stopPlugin(oe)]:[3,3];case 2:return a.sent(),n?this._isTestBeautyEnabled=!1:this._isBeautyEnabled=!1,[3,7];case 3:return c={beauty:t,brightness:s,ruddy:g},A?[3,5]:[4,e.startPlugin(oe,c)];case 4:return a.sent(),n?this._isTestBeautyEnabled=!0:this._isBeautyEnabled=!0,[3,7];case 5:return[4,e.updatePlugin(oe,c)];case 6:a.sent(),a.label=7;case 7:return[3,9];case 8:throw u=a.sent(),n?this.logger.error("".concat(En,".").concat("setTestBeautyStyle"," fail: "),u):this.logger.error("".concat(En,".").concat("setBeautyStyle"," fail: "),u),u;case 9:return[2]}}))}))},i.prototype._resetBeautyStyle=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this._isBeautyEnabled?[4,this._trtc.stopPlugin(oe)]:[3,2];case 1:e.sent(),this._isBeautyEnabled=!1,e.label=2;case 2:return this._isTestBeautyEnabled?[4,this._testTrtc.stopPlugin(oe)]:[3,4];case 3:e.sent(),this._isTestBeautyEnabled=!1,e.label=4;case 4:return[2]}}))}))},i.prototype.getMicDevicesList=function(){return s(this,void 0,Promise,(function(){var e,A,t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".getMicDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getMicrophoneList()];case 2:return e=i.sent(),A=e.map((function(e){return n(n({},e),{deviceName:e.label})})),this._microphoneList=e,"{}"!==JSON.stringify(this._currentMicrophone)?[3,4]:(this._currentMicrophone=this.getDefaultDeviceInfo(e),this._currentMicrophoneId=this._currentMicrophone.deviceId,[4,this.setCurrentMicDevice(this._currentMicrophoneId)]);case 3:i.sent(),i.label=4;case 4:return[2,Promise.resolve(A)];case 5:return t=i.sent(),this._callFunctionErrorManage(t,"getMicDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentMicDevice=function(e){var A;return s(this,void 0,Promise,(function(){var t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".setCurrentMicDevice with params: "),{micId:e}),i.label=1;case 1:return i.trys.push([1,4,,5]),e?(this._setCurrentMicrophoneId(e),[4,this._updateLocalAudio()]):[2,!1];case 2:return i.sent(),[4,this._updateLocalTestAudio()];case 3:return i.sent(),this._currentMicrophone=this._microphoneList.find((function(A){return A.deviceId===e}))||{},[3,5];case 4:throw t=i.sent(),this._setCurrentMicrophoneId(null===(A=this._currentMicrophone)||void 0===A?void 0:A.deviceId),this._callFunctionErrorManage(t,"setCurrentMicDevice"),t;case 5:return[2]}}))}))},i.prototype.getCurrentMicDevice=function(){this.logger.info("".concat(En,".getCurrentMicDevice"));var e=this._currentMicrophone,A=e.deviceId,t=e.label,i=e.kind,o=e.groupId;return new m(A,t,i,t,o)},i.prototype.getSpeakerDevicesList=function(){return s(this,void 0,Promise,(function(){var e,A,t;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".getSpeakerDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getSpeakerList()];case 2:return e=i.sent(),A=e.map((function(e){return n(n({},e),{deviceName:e.label})})),this._speakerList=e,"{}"!==JSON.stringify(this._currentSpeaker)?[3,4]:(this._currentSpeaker=this.getDefaultDeviceInfo(e),this._currentSpeakerId=this._currentSpeaker.deviceId,[4,this.setCurrentSpeakerDevice(this._currentSpeakerId)]);case 3:i.sent(),i.label=4;case 4:return[2,Promise.resolve(A)];case 5:return t=i.sent(),this._callFunctionErrorManage(t,"getSpeakerDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentSpeakerDevice=function(e){return s(this,void 0,Promise,(function(){var A;return a(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(En,".setCurrentSpeakerDevice with params: "),{speakerId:e}),t.label=1;case 1:return t.trys.push([1,3,,4]),e?[4,o.default.setCurrentSpeaker(e)]:[2,!1];case 2:return t.sent(),this._setCurrentSpeakerId(e),this._currentSpeaker=this._speakerList.find((function(A){return A.deviceId===e}))||{},[3,4];case 3:throw A=t.sent(),this._callFunctionErrorManage(A,"setCurrentSpeakerDevice"),A;case 4:return[2]}}))}))},i.prototype.getCurrentSpeakerDevice=function(){this.logger.info("".concat(En,".getCurrentSpeakerDevice"));var e=this._currentSpeaker,A=e.deviceId,t=e.label,i=e.kind,o=e.groupId;return new m(A,t,i,t,o)},i.prototype.startCameraDeviceTest=function(e){return s(this,void 0,void 0,(function(){var A;return a(this,(function(t){switch(t.label){case 0:if(this.logger.info("".concat(En,".startCameraDeviceTest with params: "),e),!e)return[2];this._setLocalTestView(e),t.label=1;case 1:return t.trys.push([1,3,,7]),[4,this._testTrtc.startLocalVideo(this._generateLocalTestVideoData())];case 2:return t.sent(),[3,7];case 3:return(A=t.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestVideo()];case 4:return t.sent(),[3,6];case 5:throw this._callFunctionErrorManage(A,"startCameraDeviceTest"),A;case 6:return[3,7];case 7:return[2]}}))}))},i.prototype.stopCameraDeviceTest=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(En,".stopCameraDeviceTest")),this._setLocalTestView(null),[4,this._testTrtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},i.prototype.startMicDeviceTest=function(e){return s(this,void 0,void 0,(function(){var A,t=this;return a(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(En,".startMicDeviceTest with params: "),e),i.label=1;case 1:return i.trys.push([1,3,,7]),[4,this._testTrtc.startLocalAudio(this._generateLocalTestAudioData())];case 2:return i.sent(),[3,7];case 3:return(A=i.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestAudio()];case 4:return i.sent(),[3,6];case 5:throw this._callFunctionErrorManage(A,"startMicDeviceTest"),A;case 6:return[3,7];case 7:return this._testTrtc.on(o.default.EVENT.AUDIO_VOLUME,(function(e){null==e||e.result.forEach((function(e){var A=e.userId,i=e.volume;""===A&&t.emit("onTestMicVolume",i)}))})),[4,this._testTrtc.enableAudioVolumeEvaluation(e)];case 8:return i.sent(),[2]}}))}))},i.prototype.stopMicDeviceTest=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(En,".stopMicDeviceTest")),[4,this._testTrtc.stopLocalAudio()];case 1:return e.sent(),[2]}}))}))},i.prototype.callExperimentalAPI=function(e){return s(this,void 0,void 0,(function(){var A,t,i;return a(this,(function(o){switch(o.label){case 0:if(this.logger.info("".concat(En,".callExperimentalAPI"),e),(A=le(e))===e)return[2];if(t=A.api,i=A.params,!t||!i)return[2];o.label=1;case 1:switch(o.trys.push([1,20,,21]),t){case"setFramework":return[3,2];case"enableAudioAEC":return[3,3];case"enableAudioANS":return[3,4];case"enableAudioAGC":return[3,5];case"KeyMetricsStats":return[3,6];case"setNetworkProxy":return[3,7];case"enableVirtualBackground":return[3,8];case"enableTestVirtualBackground":return[3,10];case"enableTestBeautyStyle":return[3,12];case"setVideoEncodeParamEx":return[3,14];case"enableAutoPlayDialog":return[3,15];case"setAudienceLatencyLevel":return[3,16];case"switchPlaybackQuality":return[3,17]}return[3,18];case 2:return this._handleSetFrameWork(i),[3,19];case 3:return this._echoCancellation=Boolean(i.enable),[3,19];case 4:return this._noiseSuppression=Boolean(i.enable),[3,19];case 5:return this._autoGainControl=Boolean(i.enable),[3,19];case 6:return this._handleKeyMetricsStats(i),[3,19];case 7:return this._networkProxy=i,[3,19];case 8:return[4,this.setVirtualBackground(i)];case 9:return o.sent(),[3,19];case 10:return[4,this.setTestVirtualBackground(i)];case 11:return o.sent(),[3,19];case 12:return[4,this.setTestBeautyStyle(i.style,i.beautyLevel,i.whitenessLevel,i.ruddinessLevel)];case 13:return o.sent(),[3,19];case 14:return this._setVideoEncodeParamEx(i),[3,19];case 15:return this._enableAutoPlayDialog=Boolean(i.enable),[3,19];case 16:return this._latencyLevel=i.latencyLevel,[3,19];case 17:return this._switchPlaybackQuality(i),[3,19];case 18:return[3,19];case 19:return[3,21];case 20:throw o.sent();case 21:return[2]}}))}))},i.prototype._handleSetFrameWork=function(e){var A=e.frameWork,t=e.component,i=e.language;Ce(A)&&(this._frameWorkType=A),Ce(t)&&(this._component=t),Ce(i)&&(this._language=i)},i.prototype._handleKeyMetricsStats=function(e){var A=e.key,t=e.opt,i=e.value,r=e.version,n=t===ge;o.default._addKVStat({type:t,key:A,value:i,version:r,useUV:n,base:100})},i.prototype._setVideoEncodeParamEx=function(A){return s(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:switch(A.streamType){case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:return[3,1];case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:return[3,3]}return[3,5];case 1:return[4,this.setVideoEncoderParam(A)];case 2:case 4:return t.sent(),[3,6];case 3:return[4,this.setSubStreamEncoderParam(A)];case 5:return[3,6];case 6:return[2]}}))}))},i.prototype._switchPlaybackQuality=function(A){return s(this,void 0,void 0,(function(){var t,i,o,r,n,s,g,c=this;return a(this,(function(a){switch(a.label){case 0:return i=(t=A||{}).quality,o=t.stream_list,r=void 0===o?[]:o,i&&0!==r.length?(n=r.reduce((function(A,t){var o=c._remoteStreamConfig.get("".concat(t.user_id,"_").concat(c._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)));return o&&(A.originConfig=o),t.name===i&&(A.targetStream=t),A}),{targetStream:null,originConfig:null}),s=n.targetStream,(g=n.originConfig)&&(null==g?void 0:g.view)&&s.user_id?[4,this.setRemoteRenderParams(s.user_id,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,g.options)]:[2]):[2];case 1:return a.sent(),[4,this.startRemoteView(s.user_id,g.view,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 2:return a.sent(),[4,this.stopRemoteView(g.userId,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 3:return a.sent(),[4,this.muteRemoteAudio(g.userId,!0)];case 4:return a.sent(),[4,this.muteRemoteAudio(s.user_id,!1)];case 5:return a.sent(),this._remoteStreamConfig.delete("".concat(g.userId,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig))),[2]}}))}))},i.prototype._emitError=function(e){e&&this.emit&&this.emit($,e.code,e.message)},i.prototype._emitWarning=function(e){this.emit&&this.emit(ee,e)},i.prototype._transformTRTCServerError=function(e){return-8===e.extraCode?dr:0===String(e.extraCode).indexOf("70")?0-e.extraCode:void 0},i.prototype._transformTRTCInvalidOperationError=function(e,A){return"enterRoom"!==A||5104!==e.extraCode&&5998!==e.code?e.code:nr},i.prototype._isCameraError=function(e){return["startLocalPreview","updateLocalView","muteLocalVideo","setVideoEncoderParam","setCurrentCameraDevice","switchCamera","setLocalRenderParams","enableSmallVideoStream","startCameraDeviceTest"].includes(e)},i.prototype._isMicError=function(e){return["startLocalAudio","muteLocalAudio","setAudioCaptureVolume","setCurrentMicDevice","startMicDeviceTest"].includes(e)},i.prototype._transformTRTCDeviceError=function(e,A){var t=this._isCameraError(A),i=this._isMicError(A);switch(e.extraCode){case 5301:case 5305:case 5306:case 5307:case 5308:case 5309:if(t)return sr;if(i)return ur;break;case 5302:if(t)return ar;if(i)return Cr;break;case 5303:if(t)return cr;if(i)return lr;break;case 5304:if(t)return gr;if(i)return Ir}},i.prototype._transformTRTCUnKnowError=function(e,A){var t=this._isCameraError(A),i=this._isMicError(A);return t?sr:i?ur:e.code},i.prototype._transformTRTCErrorCode=function(e,A){var t=null==e?void 0:e.code;if(e&&e.code)switch(e.code){case o.default.ERROR_CODE.DEVICE_ERROR:t=this._transformTRTCDeviceError(e,A);break;case o.default.ERROR_CODE.SERVER_ERROR:t=this._transformTRTCServerError(e);break;case o.default.ERROR_CODE.INVALID_OPERATION:case o.default.ERROR_CODE.OPERATION_ABORT:t=this._transformTRTCInvalidOperationError(e,A);break;case o.default.ERROR_CODE.UNKNOWN_ERROR:t=this._transformTRTCUnKnowError(e,A)}return t},i.prototype._callFunctionErrorManage=function(e,A){if(!e||e.code!==o.default.ERROR_CODE.OPERATION_ABORT){this.logger.warn("(".concat(A,") failed - ").concat(e.code," - ").concat(e.message));var t=this._transformTRTCErrorCode(e,A);this.emit($,t,e.message)}},i.prototype._getTRTCResolution=function(A){var t=(e.TRTCVideoResolution[A]||"").split("_");return{width:+(t.length>1&&t[1]),height:+(t.length>2&&t[2])}},i.prototype._getTRTCVideoProfile=function(A,t){void 0===t&&(t={});var i=t.videoWidth,o=t.videoHeight,r=t.videoResolution,n=t.videoFps,s=t.videoBitrate,a=t.resMode,g=t.resolutionMode,c={};switch(A){case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:c=this._defaultScreenProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall:c=this._defaultSmallVideoProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:default:c=this._defaultVideoProfile}if(ue(r))ue(i)||(c.width=i),ue(o)||(c.height=o);else{var u=this._getTRTCResolution(r);c.width=u.width,c.height=u.height}if(!ue(a)&&a===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait||!ue(g)&&g===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait){var C=c.height,I=c.width;c.width=C,c.height=I}return n&&(c.frameRate=n),s&&(c.bitrate=s),c},i.prototype._getTRTCStreamType=function(A){var t;return((t={})[e.TRTCVideoStreamType.TRTCVideoStreamTypeBig]=o.default.TYPE.STREAM_TYPE_MAIN,t[e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall]=o.default.TYPE.STREAM_TYPE_MAIN,t[e.TRTCVideoStreamType.TRTCVideoStreamTypeSub]=o.default.TYPE.STREAM_TYPE_SUB,t)[A]},i.prototype._getTRTCFillMode=function(A){var t;return((t={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]=tr.COVER,t[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]=tr.CONTAIN,t)[A]},i.prototype._getLocalRenderMirror=function(A){var t;return A===e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto?!this._getIsMobile()||this._getIsFrontCamera():((t={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,t[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,t)[A]},i.prototype._getTRTCLocalMirror=function(e,A){var t=this._getLocalRenderMirror(e);return ue(A)?!!t&&"both":t&&A?"both":t&&!A?"view":!t&&A?"publish":!(!t&&!A)&&"view"},i.prototype._getTRTCRemoteMirror=function(A){var t;return((t={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!1,t[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,t[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,t)[A]},i.prototype._getTRTCQosPreference=function(A){var t;return((t={})[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceSmooth]=o.default.TYPE.QOS_PREFERENCE_SMOOTH,t[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear]=o.default.TYPE.QOS_PREFERENCE_CLEAR,t)[A]},i.prototype._getTRTCAudioQuality=function(A){var t;return((t={})[e.TRTCAudioQuality.TRTCAudioQualitySpeech]=o.default.TYPE.AUDIO_PROFILE_STANDARD,t[e.TRTCAudioQuality.TRTCAudioQualityDefault]=o.default.TYPE.AUDIO_PROFILE_STANDARD,t[e.TRTCAudioQuality.TRTCAudioQualityMusic]=o.default.TYPE.AUDIO_PROFILE_HIGH_STEREO,t)[A]},i.prototype._getTRTCCloudDeviceType=function(A){return{camera:e.TRTCDeviceType.TRTCDeviceTypeCamera,microphone:e.TRTCDeviceType.TRTCDeviceTypeMic,speaker:e.TRTCDeviceType.TRTCDeviceTypeSpeaker}[A]},i.prototype._getTRTCCloudDeviceState=function(A){return{add:e.TRTCDeviceState.TRTCDeviceStateAdd,remove:e.TRTCDeviceState.TRTCDeviceStateRemove,active:e.TRTCDeviceState.TRTCDeviceStateActive}[A]},i.prototype._getTRTCCloudQuality=function(A){return[e.TRTCQuality.TRTCQuality_Unknown,e.TRTCQuality.TRTCQuality_Excellent,e.TRTCQuality.TRTCQuality_Good,e.TRTCQuality.TRTCQuality_Poor,e.TRTCQuality.TRTCQuality_Bad,e.TRTCQuality.TRTCQuality_Vbad,e.TRTCQuality.TRTCQuality_Down][A]},i.prototype._generateLocalVideoData=function(){var e={view:this._getLocalView(),publish:this._getIsVideoPublish(),option:{profile:this._getVideoProfile(),small:this._getSmallStreamVideoProfile()||!1,mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}};return this._cameraVideoTrack?e&&Object.assign(e.option,{videoTrack:this._cameraVideoTrack}):this._getIsMobile()?e&&Object.assign(e.option,{useFrontCamera:this._getIsFrontCamera()}):e&&Object.assign(e.option,{cameraId:this._getCurrentCameraId()}),this._getQosPreference()&&e&&Object.assign(e.option,{qosPreference:this._getQosPreference()}),e},i.prototype._generateLocalTestVideoData=function(){return{view:this._getLocalTestView(),publish:!1,option:{cameraId:this._getCurrentCameraId(),profile:this._getVideoProfile(),mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}}},i.prototype._generateLocalAudioData=function(){var e={publish:this._getIsAudioPublish(),option:{microphoneId:this._getCurrentMicrophoneId(),profile:this._getAudioProfile(),captureVolume:this._getCaptureVolume()}};return Ie(this._echoCancellation)&&(e.option.echoCancellation=this._echoCancellation),Ie(this._autoGainControl)&&(e.option.autoGainControl=this._autoGainControl),Ie(this._noiseSuppression)&&(e.option.noiseSuppression=this._noiseSuppression),e},i.prototype._generateLocalTestAudioData=function(){return{publish:!1,option:{microphoneId:this._getCurrentMicrophoneId(),profile:this._getAudioProfile()}}},i.prototype._generateRemoteVideoData=function(e,A){return this._remoteStreamConfig.get("".concat(e,"_").concat(this._getTRTCStreamType(A)))},i.prototype._addTRTCEvents=function(){var A=this;this._trtc.on(o.default.EVENT.ERROR,(function(e){e&&A.emit("onError",e.code,e.message)})),this._trtc.on(o.default.EVENT.REMOTE_USER_ENTER,(function(e){(null==e?void 0:e.userId)&&A.emit("onRemoteUserEnterRoom",e.userId)})),this._trtc.on(o.default.EVENT.REMOTE_USER_EXIT,(function(e){(null==e?void 0:e.userId)&&A.emit("onRemoteUserLeaveRoom",e.userId)})),this._trtc.on(o.default.EVENT.REMOTE_AUDIO_AVAILABLE,(function(e){(null==e?void 0:e.userId)&&A.emit("onUserAudioAvailable",e.userId,!0)})),this._trtc.on(o.default.EVENT.REMOTE_AUDIO_UNAVAILABLE,(function(e){(null==e?void 0:e.userId)&&A.emit("onUserAudioAvailable",e.userId,!1)})),this._trtc.on(o.default.EVENT.REMOTE_VIDEO_AVAILABLE,(function(e){A._emitVideoAvailable(e,!0)})),this._trtc.on(o.default.EVENT.REMOTE_VIDEO_UNAVAILABLE,(function(e){A._emitVideoAvailable(e,!1)})),this._trtc.on(o.default.EVENT.AUDIO_VOLUME,(function(e){(null==e?void 0:e.result)&&A.emit("onUserVoiceVolume",null==e?void 0:e.result,((null==e?void 0:e.result)||[]).length)})),this._trtc.on(o.default.EVENT.KICKED_OUT,(function(e){var t={banned:ir.banned,room_disband:ir.roomDisband};Ce(t[e.reason])&&A.emit("onExitRoom",t[e.reason])})),this._trtc.on(o.default.EVENT.NETWORK_QUALITY,(function(e){var t=e.uplinkNetworkQuality,i=e.downlinkNetworkQuality,o=new N("",A._getTRTCCloudQuality(t)),r=[];A._remoteStatisticsUserIdList.length>0&&(r=A._remoteStatisticsUserIdList.map((function(e){return new N(e,A._getTRTCCloudQuality(i))}))),A.emit("onNetworkQuality",o,r)})),this._trtc.on(o.default.EVENT.AUTOPLAY_FAILED,(function(e){A.emit("onAutoPlayFailed",e)})),this._trtc.on(o.default.EVENT.SEI_MESSAGE,(function(e){if(e.data&&"object"==typeof e.data&&e.data instanceof ArrayBuffer){for(var t=new Uint8Array(e.data),i="",o=0;o<t.length;o++)i+=String.fromCharCode(t[o]);e.stringData=i}A.emit("onRecvSEIMsg",e.userId,JSON.stringify(e))})),this._trtc.on(o.default.EVENT.STATISTICS,(function(t){var i,o=t.rtt,r=t.upLoss,n=t.downLoss,s=t.bytesSent,a=t.bytesReceived,g=t.localStatistics,c=t.remoteStatistics;A._remoteStatisticsUserIdList=c.map((function(e){return e.userId}));var u={big:e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,small:e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,sub:e.TRTCVideoStreamType.TRTCVideoStreamTypeSub},C=(null===(i=g.video)||void 0===i?void 0:i.length)>0?g.video.map((function(e){var A=new F;return A.width=e.width,A.height=e.height,A.frameRate=e.frameRate,A.videoBitrate=e.bitrate,A.audioBitrate=g.audio.bitrate||0,A.streamType=u[e.videoType],A})):[];if(0===C.length&&g.audio.bitrate>0){var I=new F;I.audioBitrate=g.audio.bitrate||0,C.push(I)}var l=[];c.forEach((function(e){var A=[],t=e.userId,i=e.audio.bitrate;if(e.video&&e.video.forEach((function(e){var o=new V;o.userId=t,o.width=e.width,o.height=e.height,o.frameRate=e.frameRate,o.videoBitrate=e.bitrate,o.audioBitrate=i||0,o.streamType=u[e.videoType],A.push(o)})),0===A.length){var o=new V;o.userId=t,o.audioBitrate=i||0,A.push(o)}l.push.apply(l,A)}));var d=new P;d.upLoss=r,d.downLoss=n,d.rtt=o,d.sentBytes=s,d.receivedBytes=a,d.localStatisticsArray=C,d.localStatisticsArraySize=C.length,d.remoteStatisticsArray=l,d.remoteStatisticsArraySize=l.length,A.emit("onStatistics",d)})),this._trtc.on(o.default.EVENT.SCREEN_SHARE_STOPPED,(function(){A.emit("onScreenCaptureStopped",0),A._clearScreenShareParams(),A._isSharingScreen=!1})),this._trtc.on(o.default.EVENT.PUBLISH_STATE_CHANGED,(function(t){var i=t.mediaType;"started"===t.state&&("audio"===i?A.emit("onSendFirstLocalAudioFrame"):"video"===i?A.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeBig):"screen"===i&&A.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeSub))})),this._trtc.on(o.default.EVENT.FIRST_VIDEO_FRAME,(function(e){var t=e.userId,i=e.streamType,o=e.width,r=e.height;A.emit("onFirstVideoFrame",t,i,o,r)})),this._trtc.on(o.default.EVENT.AUDIO_PLAY_STATE_CHANGED,(function(e){var t=e.userId;"PLAYING"===e.state&&A.emit("onFirstAudioFrame",t)})),this._trtc.on(o.default.EVENT.DEVICE_CHANGED,(function(e){var t=e.type,i=e.device,o=e.action,r=i.deviceId;if("active"===o){switch(t){case"camera":A._currentCameraId=r,A._currentCamera=i;break;case"microphone":A._currentMicrophoneId=r,A._currentMicrophone=i;break;case"speaker":A._currentSpeakerId=r,A._currentSpeaker=i}A.emitOnDeviceChange(r,A._getTRTCCloudDeviceType(t),A._getTRTCCloudDeviceState(o))}})),this._trtc.on(o.default.EVENT.CUSTOM_MESSAGE,(function(e){e&&A.emit("onRecvCustomCmdMsg",e.userId,e.cmdId,e.seq,null==e?void 0:e.data)})),this._trtc.on(o.default.EVENT.CONNECTION_STATE_CHANGED,(function(e){A._hasJoinedRoom&&!A._isExitingRoom&&("CONNECTED"===e.prevState&&"DISCONNECTED"===e.state?A.emit("onConnectionLost"):"DISCONNECTED"===e.prevState&&"CONNECTING"===e.state?A.emit("onTryToReconnect"):"CONNECTING"===e.prevState&&"CONNECTED"===e.state&&A.emit("onConnectionRecovery"))}))},i.prototype._removeTRTCEvents=function(){this._trtc.off("*")},i.prototype._emitVideoAvailable=function(e,A){var t=e.userId,i=e.streamType;A?this._remoteStreamMap.set("".concat(t,"_").concat(i),!0):this._remoteStreamMap.delete("".concat(t,"_").concat(i)),i===o.default.TYPE.STREAM_TYPE_SUB?t&&this.emit("onUserSubStreamAvailable",t,A):t&&this.emit("onUserVideoAvailable",t,A)},i.prototype._setLocalView=function(e){this._localView=e},i.prototype._getLocalView=function(){return this._localView},i.prototype._setIsMobile=function(e){this._isMobile=e},i.prototype._getIsMobile=function(){return this._isMobile},i.prototype._setIsFrontCamera=function(e){this._isFrontCamera=e},i.prototype._getIsFrontCamera=function(){return this._isFrontCamera},i.prototype._getSmallStreamVideoProfile=function(){return this._smallStreamVideoProfile},i.prototype._setSmallStreamVideoProfile=function(e){this._smallStreamVideoProfile=e},i.prototype._setIsVideoPublish=function(e){this._isVideoPublish=e},i.prototype._getIsVideoPublish=function(){return this._isVideoPublish},i.prototype._setVideoProfile=function(e){this._videoProfile=e},i.prototype._getVideoProfile=function(){return this._videoProfile},i.prototype._setQosPreference=function(e){this._qosPreference=e},i.prototype._getQosPreference=function(){return this._qosPreference},i.prototype._setLocalTestView=function(e){this._localTestView=e},i.prototype._getLocalTestView=function(){return this._localTestView},i.prototype._setScreenShareParams=function(e){var A=e.view,t=e.systemAudio,i=e.fillMode,o=e.profile,r=e.videoTrack,n=e.qosPreference;ue(A)||(this._screenShareParams.view=A),ue(t)||(this._screenShareParams.option.systemAudio=t),ue(i)||(this._screenShareParams.option.fillMode=i),ue(o)||(this._screenShareParams.option.profile=o),ue(r)||(this._screenShareParams.option.videoTrack=r),ue(n)||(this._screenShareParams.option.qosPreference=n)},i.prototype._clearScreenShareParams=function(){var e,A,t,i,o;(null===(e=this._screenShareParams)||void 0===e?void 0:e.view)&&delete this._screenShareParams.view,(null===(t=null===(A=this._screenShareParams)||void 0===A?void 0:A.option)||void 0===t?void 0:t.systemAudio)&&delete this._screenShareParams.option.systemAudio,(null===(o=null===(i=this._screenShareParams)||void 0===i?void 0:i.option)||void 0===o?void 0:o.videoTrack)&&delete this._screenShareParams.option.videoTrack},i.prototype._getScreenShareParams=function(){return this._screenShareParams},i.prototype._setIsAudioPublish=function(e){this._isAudioPublish=e},i.prototype._getIsAudioPublish=function(){return this._isAudioPublish},i.prototype._setAudioProfile=function(e){this._audioProfile=e},i.prototype._getAudioProfile=function(){return this._audioProfile},i.prototype._getCaptureVolume=function(){return this._captureVolume},i.prototype._setCaptureVolume=function(e){this._captureVolume=e},i.prototype._setCurrentCameraId=function(e){this._currentCameraId=e},i.prototype._getCurrentCameraId=function(){return this._currentCameraId},i.prototype._setCurrentMicrophoneId=function(e){this._currentMicrophoneId=e},i.prototype._getCurrentMicrophoneId=function(){return this._currentMicrophoneId},i.prototype._setCurrentSpeakerId=function(e){this._currentSpeakerId=e},i.prototype._getCurrentSpeakerId=function(){return this._currentSpeakerId},i.prototype._setRemoteStreamConfig=function(A,t,i){var o=this._remoteStreamConfig.get("".concat(A,"_").concat(this._getTRTCStreamType(t)));o||(o={userId:A,streamType:this._getTRTCStreamType(t),option:{mirror:this._getTRTCRemoteMirror(e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),fillMode:this._getTRTCFillMode(e.TRTCVideoFillMode.TRTCVideoFillMode_Fit)}});var r=i.view,n=i.mirrorType,s=i.fillMode,a=i.small;ue(r)||(o.view=r),ue(n)||(o.option.mirror=this._getTRTCRemoteMirror(n)),ue(s)||(o.option.fillMode=this._getTRTCFillMode(s)),ue(a)||(o.option.small=a),this._remoteStreamConfig.set("".concat(A,"_").concat(this._getTRTCStreamType(t)),o)},i.prototype._inheritPropertiesToSubCloud=function(e){e._frameWorkType=this._frameWorkType,e._component=this._component,e._language=this._language,e._networkProxy=n({},this._networkProxy),e._latencyLevel=this._latencyLevel,e._enableAutoPlayDialog=this._enableAutoPlayDialog},i.prototype._inheritEventsToSubCloud=function(e){var A=this;e._trtc.on(o.default.EVENT.AUTOPLAY_FAILED,(function(e){A.emit("onAutoPlayFailed",e)}))},i.prototype.handleDeviceChange=function(){return s(this,void 0,void 0,(function(){var A=this;return a(this,(function(t){return o.default.getCameraList().then((function(t){return s(A,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return this._cameraList.length===t.length?[2]:[4,this.deviceChangeManage(this._cameraList,t,e.TRTCDeviceType.TRTCDeviceTypeCamera)];case 1:return A.sent(),this._cameraList=t,[2]}}))}))})),o.default.getMicrophoneList().then((function(t){return s(A,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return[4,this.deviceChangeManage(this._microphoneList,t,e.TRTCDeviceType.TRTCDeviceTypeMic)];case 1:return A.sent(),this._microphoneList=t,[2]}}))}))})),o.default.getSpeakerList().then((function(t){return s(A,void 0,void 0,(function(){return a(this,(function(A){switch(A.label){case 0:return[4,this.deviceChangeManage(this._speakerList,t,e.TRTCDeviceType.TRTCDeviceTypeSpeaker)];case 1:return A.sent(),this._speakerList=t,[2]}}))}))})),[2]}))}))},i.prototype.isSameDevice=function(e,A){var t=e&&e.deviceId&&e.groupId&&e.label,i=A&&A.deviceId&&A.groupId&&A.label;return!(!t||!i)&&(e.deviceId===A.deviceId&&e.groupId===A.groupId&&e.label===A.label)},i.prototype.deviceChangeManage=function(A,t,i){return s(this,void 0,void 0,(function(){var o,r,n,s,g;return a(this,(function(a){switch(a.label){case 0:return o=void 0,A.length!==t.length&&(r=(t||[]).map((function(e){return e.deviceId})),n=new m,A.length>t.length?(n=A.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateRemove):(r=(A||[]).map((function(e){return e.deviceId})),n=t.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateAdd),s=n.deviceId,this.emitOnDeviceChange(s,i,o)),g=this.getDefaultDeviceInfo(t),i!==e.TRTCDeviceType.TRTCDeviceTypeCamera||o!==e.TRTCDeviceState.TRTCDeviceStateRemove?[3,3]:this.isSameDevice(this._currentCamera,g)?[2]:g.deviceId?[4,this.autoChangeDevice(i,g)]:[3,2];case 1:a.sent(),a.label=2;case 2:a.label=3;case 3:return i!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,6]:this.isSameDevice(this._currentMicrophone,g)?[2]:g.deviceId?[4,this.autoChangeDevice(i,g)]:[3,5];case 4:a.sent(),a.label=5;case 5:a.label=6;case 6:return i!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,9]:this.isSameDevice(this._currentSpeaker,g)?[2]:g.deviceId?[4,this.autoChangeDevice(i,g)]:[3,8];case 7:a.sent(),a.label=8;case 8:a.label=9;case 9:return[2]}}))}))},i.prototype.getDefaultDeviceInfo=function(e){var A=new m;if(0===e.length)return A;var t=e.filter((function(e){return"default"===e.deviceId}));return A=t.length>0?t[0]:e[0]},i.prototype.autoChangeDevice=function(A,t){return s(this,void 0,void 0,(function(){var i,r,n;return a(this,(function(s){switch(s.label){case 0:return i=t.deviceId,A!==e.TRTCDeviceType.TRTCDeviceTypeCamera?[3,6]:(this._setCurrentCameraId(i),[4,this._updateLocalVideo()]);case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this._testTrtc.updateLocalVideo({option:{cameraId:i}})];case 3:return s.sent(),[3,5];case 4:return r=s.sent(),console.log("testTRTC error",JSON.stringify(r)),r.code,o.default.ERROR_CODE.OPERATION_ABORT,[3,5];case 5:this._currentCameraId=i,this._currentCamera=t,this.emitOnDeviceChange(i,A,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=6;case 6:return A!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,12]:(this._setCurrentMicrophoneId(i),[4,this._updateLocalAudio()]);case 7:s.sent(),s.label=8;case 8:return s.trys.push([8,10,,11]),[4,this._testTrtc.updateLocalAudio({option:{microphoneId:i}})];case 9:return s.sent(),[3,11];case 10:return n=s.sent(),console.log("testTRTC error",JSON.stringify(n)),n.code,o.default.ERROR_CODE.OPERATION_ABORT,[3,11];case 11:this._currentMicrophoneId=i,this._currentMicrophone=t,this.emitOnDeviceChange(i,A,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=12;case 12:return A!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,14]:[4,o.default.setCurrentSpeaker(i)];case 13:s.sent(),this._currentSpeakerId=i,this._currentSpeaker=t,this.emitOnDeviceChange(i,A,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=14;case 14:return[2]}}))}))},i.prototype.emitOnDeviceChange=function(e,A,t){this.emit("onDeviceChange",e,A,t)},i.prototype.getMediaMixingManager=function(){return new jr({logger:this.logger,trtc:this._trtc,trtcCloud:this})},i.shareInstance=null,i.subCloudMap=new Map,i.enableSEI=!1,i.assetsPath="",i}(T);e.Rect=J,e.TRTCDeviceInfo=m,e.TRTCImageBuffer=U,e.TRTCLocalStatistics=F,e.TRTCMixUser=Z,e.TRTCNetworkQosParam=H,e.TRTCParams=w,e.TRTCPublishCDNParam=k,e.TRTCQualityInfo=N,e.TRTCRemoteStatistics=V,e.TRTCRenderParams=D,e.TRTCScreenCaptureProperty=q,e.TRTCScreenCaptureSourceInfo=K,e.TRTCStatistics=P,e.TRTCTranscodingConfig=j,e.TRTCVideoEncParam=S,e.TRTCVolumeInfo=G,e.default=fn,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("trtc-sdk-v5"),require("trtc-sdk-v5/plugins/video-effect/virtual-background"),require("trtc-sdk-v5/plugins/video-effect/basic-beauty"),require("trtc-sdk-v5/plugins/video-effect/video-mixer")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/video-effect/virtual-background","trtc-sdk-v5/plugins/video-effect/basic-beauty","trtc-sdk-v5/plugins/video-effect/video-mixer"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.virtualBackground,e.basicBeauty,e.videoMixer)}(this,(function(e,t,i,o,r){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(t),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},a(e,t)};var c=function(){return c=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)};function u(e,t,i,o){return new(i||(i=Promise))((function(r,n){function s(e){try{c(o.next(e))}catch(t){n(t)}}function a(e){try{c(o.throw(e))}catch(t){n(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))}function l(e,t){var i,o,r,n,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(a){return function(c){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,a[0]&&(s=0)),s;)try{if(i=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(c){a=[6,c],o=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t,i){if(i||2===arguments.length)for(var o,r=0,n=t.length;r<n;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=d(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(i){t[i]=e[i]&&function(t){return new Promise((function(o,r){(function(e,t,i,o){Promise.resolve(o).then((function(t){e({value:t,done:i})}),t)})(o,r,(t=e[i](t)).done,t.value)}))}}}var T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e,t){return e(t={exports:{}},t.exports),t.exports}var v,g,m,R,C,y,_,S,b=f((function(e){var t=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function n(e,t,o,n,s){if("function"!=typeof o)throw new TypeError("The listener must be a function");var a=new r(o,n||e,s),c=i?i+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,o,r=[];if(0===this._eventsCount)return r;for(o in e=this._events)t.call(e,o)&&r.push(i?o.slice(1):o);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=i?i+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,n=o.length,s=new Array(n);r<n;r++)s[r]=o[r].fn;return s},a.prototype.listenerCount=function(e){var t=i?i+e:e,o=this._events[t];return o?o.fn?1:o.length:0},a.prototype.emit=function(e,t,o,r,n,s){var a=i?i+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,o),!0;case 4:return l.fn.call(l.context,t,o,r),!0;case 5:return l.fn.call(l.context,t,o,r,n),!0;case 6:return l.fn.call(l.context,t,o,r,n,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,o);break;case 4:l[u].fn.call(l[u].context,t,o,r);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,i){return n(this,e,t,i,!1)},a.prototype.once=function(e,t,i){return n(this,e,t,i,!0)},a.prototype.removeListener=function(e,t,o,r){var n=i?i+e:e;if(!this._events[n])return this;if(!t)return s(this,n),this;var a=this._events[n];if(a.fn)a.fn!==t||r&&!a.once||o&&a.context!==o||s(this,n);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||r&&!a[c].once||o&&a[c].context!==o)&&u.push(a[c]);u.length?this._events[n]=1===u.length?u[0]:u:s(this,n)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a}));e.TRTCVideoResolution=void 0,(v=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[v.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",v[v.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",v[v.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",v[v.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",v[v.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",v[v.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",v[v.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",v[v.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",v[v.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",v[v.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",v[v.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",v[v.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",v[v.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",v[v.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",v[v.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",v[v.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",v[v.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",v[v.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",v[v.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",v[v.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(g=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[g.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",g[g.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",g[g.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(m=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[m.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",m[m.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(R=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[R.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",R[R.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",R[R.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(C=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[C.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",C[C.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(y=e.TRTCAppScene||(e.TRTCAppScene={}))[y.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",y[y.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",y[y.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",y[y.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(_=e.TRTCRoleType||(e.TRTCRoleType={}))[_.TRTCRoleAnchor=20]="TRTCRoleAnchor",_[_.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(S=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[S.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",S[S.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",S[S.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var M,w,V=function(e,t,i,o,r){void 0===e&&(e=""),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=""),this.deviceId=e,this.deviceName=t,this.kind=i,this.label=o,this.groupId=r};e.TRTCDeviceState=void 0,(M=e.TRTCDeviceState||(e.TRTCDeviceState={}))[M.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",M[M.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",M[M.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(w=e.TRTCDeviceType||(e.TRTCDeviceType={}))[w.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",w[w.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",w[w.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",w[w.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var E,A=function(t,i,o,r,n,s,a,c,u,l,d){void 0===t&&(t=0),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=0),void 0===n&&(n=""),void 0===s&&(s=e.TRTCRoleType.TRTCRoleAnchor),void 0===a&&(a=null),void 0===u&&(u=null),void 0===l&&(l=null),void 0===d&&(d=30),this.sdkAppId=t,this.userId=i,this.userSig=o,this.roomId=r,this.strRoomId=n,this.role=s,this.privateMapKey=a,this.streamId=u,this.userDefineRecordId=l,this.frameWorkType=d},P=function(t,i,o,r){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===i&&(i=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===o&&(o=15),void 0===r&&(r=550),this.videoResolution=t,this.resMode=i,this.videoFps=o,this.videoBitrate=r};e.TRTCVideoRotation=void 0,(E=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[E.TRTCVideoRotation0=0]="TRTCVideoRotation0",E[E.TRTCVideoRotation90=1]="TRTCVideoRotation90",E[E.TRTCVideoRotation180=2]="TRTCVideoRotation180",E[E.TRTCVideoRotation270=3]="TRTCVideoRotation270";var L,I=function(t,i,o){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===i&&(i=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===o&&(o=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=i,this.mirrorType=o};e.TRTCQuality=void 0,(L=e.TRTCQuality||(e.TRTCQuality={}))[L.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",L[L.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",L[L.TRTCQuality_Good=2]="TRTCQuality_Good",L[L.TRTCQuality_Poor=3]="TRTCQuality_Poor",L[L.TRTCQuality_Bad=4]="TRTCQuality_Bad",L[L.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",L[L.TRTCQuality_Down=6]="TRTCQuality_Down";var x,O,D,k=function(t,i){void 0===t&&(t=""),void 0===i&&(i=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=i},B=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},z=function(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),this.appId=e,this.bizId=t,this.url=i},F=function(t,i,o,r,n,s,a){void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.width=t,this.height=i,this.frameRate=o,this.videoBitrate=r,this.audioBitrate=s,this.streamType=a},N=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T){void 0===t&&(t=""),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===c&&(c=0),void 0===T&&(T=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=o,this.height=r,this.frameRate=n,this.videoBitrate=s,this.audioBitrate=c,this.streamType=T},Q=function(e,t,i,o,r,n,s,a,c,u,l){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=[]),void 0===c&&(c=0),void 0===u&&(u=[]),void 0===l&&(l=0),this.upLoss=e,this.downLoss=t,this.rtt=r,this.receivedBytes=n,this.sentBytes=s,this.localStatisticsArray=a,this.localStatisticsArraySize=c,this.remoteStatisticsArray=u,this.remoteStatisticsArraySize=l};e.TRTCVideoResolutionMode=void 0,(x=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[x.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",x[x.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(O=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[O.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",O[O.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(D=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[D.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",D[D.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var H,W,j=function(t,i){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===i&&(i=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=i},U=function(e,t,i,o){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.buffer=e,this.length=t,this.width=i,this.height=o};e.TRTCLogLevel=void 0,(H=e.TRTCLogLevel||(e.TRTCLogLevel={}))[H.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",H[H.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",H[H.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",H[H.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",H[H.TRTCLogLevelError=4]="TRTCLogLevelError",H[H.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",H[H.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(W=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[W.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",W[W.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",W[W.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",W[W.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var Y,G=function(t,i,o,r,n,s){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=new U),void 0===n&&(n=new U),void 0===s&&(s=!1),this.type=t,this.sourceId=i,this.sourceName=o,this.thumbBGRA=r,this.iconBGRA=n,this.isMinimizeWindow=s},K=function(e,t,i,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.left=e,this.top=t,this.right=i,this.bottom=o},q=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T,f){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=15),void 0===c&&(c=2),void 0===u&&(u=0),void 0===l&&(l=""),void 0===d&&(d=64),void 0===h&&(h=48e3),void 0===p&&(p=1),void 0===T&&(T=[]),void 0===f&&(f=""),this.mode=t,this.appId=i,this.bizId=o,this.videoWidth=r,this.videoHeight=n,this.videoBitrate=s,this.videoFramerate=a,this.videoGOP=c,this.backgroundColor=u,this.backgroundImage=l,this.audioSampleRate=d,this.audioBitrate=h,this.audioChannels=p,this.mixUsersArray=T,this.mixUsersArraySize=T.length,this.streamId=f};e.TRTCTranscodingConfigMode=void 0,(Y=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[Y.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",Y[Y.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",Y[Y.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",Y[Y.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",Y[Y.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",Y[Y.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",Y[Y.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",Y[Y.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",Y[Y.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",Y[Y.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var X,J,$=function(t,i,o,r,n,s,a,c){void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=null),void 0===r&&(r=0),void 0===n&&(n=!1),void 0===s&&(s=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),void 0===a&&(a=e.TRTCMixInputType.TRTCMixInputTypeUndefined),void 0===c&&(c=0),this.userId=t,this.roomId=i,this.rect=o,this.zOrder=r,this.pureAudio=n,this.streamType=s,this.inputType=a,this.renderMode=c};e.TRTCMixInputType=void 0,(X=e.TRTCMixInputType||(e.TRTCMixInputType={}))[X.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",X[X.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",X[X.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",X[X.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(J=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[J.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",J[J.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",J[J.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",J[J.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var Z,ee=function(e,t,i,o,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=i,this.highLightColor=o,this.highLightWidth=r,this.enableCaptureChildWindow=n},te="onError",ie="onWarning",oe="rtc",re="live",ne="VirtualBackground",se="BasicBeauty",ae="blur",ce="image",ue={20:"anchor",21:"audience"},le={0:oe,1:re,2:oe,3:re};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(Z||(Z={}));var de="enum";function he(){return Math.floor(performance.now())}var pe=function(e){return void 0===e},Te=function(e){return"number"==typeof e},fe=function(e){return"boolean"==typeof e};function ve(e){if("string"!=typeof e)return e;var t;try{var i=JSON.parse(e);t="object"==typeof i&&i?i:e}catch(o){t=e}return t}function ge(e){return null==e}function me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Object.keys(t).forEach((function(i){e[i]&&"object"==typeof e[i]?e[i]=me(e[i],t[i]):e[i]=t[i]})),e}),{})}function Re(e){var t=null;return e instanceof MediaStream||e instanceof MediaStreamTrack?e:([Date,RegExp,Set,WeakSet,Map,WeakMap,Error].includes(null==e?void 0:e.constructor)?t=new e.constructor(e):Array.isArray(e)?(t=[],e.forEach((function(e,i){t[i]=Re(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(i){Object.hasOwnProperty.call(e,i)&&(t[i]=Re(e[i]))}))):t=e,t)}var Ce,ye,_e=function(e){return e&&e.Math===Math&&e},Se=_e("object"==typeof globalThis&&globalThis)||_e("object"==typeof window&&window)||_e("object"==typeof self&&self)||_e("object"==typeof T&&T)||function(){return this}()||T||Function("return this")(),be=function(e){try{return!!e()}catch(t){return!0}},Me=!be((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),we=!be((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Ve=Function.prototype.call,Ee=we?Ve.bind(Ve):function(){return Ve.apply(Ve,arguments)},Ae={}.propertyIsEnumerable,Pe=Object.getOwnPropertyDescriptor,Le={f:Pe&&!Ae.call({1:2},1)?function(e){var t=Pe(this,e);return!!t&&t.enumerable}:Ae},Ie=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},xe=Function.prototype,Oe=xe.call,De=we&&xe.bind.bind(Oe,Oe),ke=we?De:function(e){return function(){return Oe.apply(e,arguments)}},Be=ke({}.toString),ze=ke("".slice),Fe=function(e){return ze(Be(e),8,-1)},Ne=Object,Qe=ke("".split),He=be((function(){return!Ne("z").propertyIsEnumerable(0)}))?function(e){return"String"===Fe(e)?Qe(e,""):Ne(e)}:Ne,We=function(e){return null==e},je=TypeError,Ue=function(e){if(We(e))throw je("Can't call method on "+e);return e},Ye=function(e){return He(Ue(e))},Ge="object"==typeof document&&document.all,Ke={all:Ge,IS_HTMLDDA:void 0===Ge&&void 0!==Ge},qe=Ke.all,Xe=Ke.IS_HTMLDDA?function(e){return"function"==typeof e||e===qe}:function(e){return"function"==typeof e},Je=Ke.all,$e=Ke.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:Xe(e)||e===Je}:function(e){return"object"==typeof e?null!==e:Xe(e)},Ze=function(e,t){return arguments.length<2?(i=Se[e],Xe(i)?i:void 0):Se[e]&&Se[e][t];var i},et=ke({}.isPrototypeOf),tt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",it=Se.process,ot=Se.Deno,rt=it&&it.versions||ot&&ot.version,nt=rt&&rt.v8;nt&&(ye=(Ce=nt.split("."))[0]>0&&Ce[0]<4?1:+(Ce[0]+Ce[1])),!ye&&tt&&(!(Ce=tt.match(/Edge\/(\d+)/))||Ce[1]>=74)&&(Ce=tt.match(/Chrome\/(\d+)/))&&(ye=+Ce[1]);var st=ye,at=Se.String,ct=!!Object.getOwnPropertySymbols&&!be((function(){var e=Symbol("symbol detection");return!at(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&st&&st<41})),ut=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=Object,dt=ut?function(e){return"symbol"==typeof e}:function(e){var t=Ze("Symbol");return Xe(t)&&et(t.prototype,lt(e))},ht=String,pt=TypeError,Tt=function(e){if(Xe(e))return e;throw pt(function(e){try{return ht(e)}catch(t){return"Object"}}(e)+" is not a function")},ft=function(e,t){var i=e[t];return We(i)?void 0:Tt(i)},vt=TypeError,gt=Object.defineProperty,mt=function(e,t){try{gt(Se,e,{value:t,configurable:!0,writable:!0})}catch(i){Se[e]=t}return t},Rt="__core-js_shared__",Ct=Se[Rt]||mt(Rt,{}),yt=f((function(e){(e.exports=function(e,t){return Ct[e]||(Ct[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),_t=Object,St=function(e){return _t(Ue(e))},bt=ke({}.hasOwnProperty),Mt=Object.hasOwn||function(e,t){return bt(St(e),t)},wt=0,Vt=Math.random(),Et=ke(1..toString),At=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Et(++wt+Vt,36)},Pt=Se.Symbol,Lt=yt("wks"),It=ut?Pt.for||Pt:Pt&&Pt.withoutSetter||At,xt=function(e){return Mt(Lt,e)||(Lt[e]=ct&&Mt(Pt,e)?Pt[e]:It("Symbol."+e)),Lt[e]},Ot=TypeError,Dt=xt("toPrimitive"),kt=function(e,t){if(!$e(e)||dt(e))return e;var i,o=ft(e,Dt);if(o){if(void 0===t&&(t="default"),i=Ee(o,e,t),!$e(i)||dt(i))return i;throw Ot("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var i,o;if("string"===t&&Xe(i=e.toString)&&!$e(o=Ee(i,e)))return o;if(Xe(i=e.valueOf)&&!$e(o=Ee(i,e)))return o;if("string"!==t&&Xe(i=e.toString)&&!$e(o=Ee(i,e)))return o;throw vt("Can't convert object to primitive value")}(e,t)},Bt=function(e){var t=kt(e,"string");return dt(t)?t:t+""},zt=Se.document,Ft=$e(zt)&&$e(zt.createElement),Nt=function(e){return Ft?zt.createElement(e):{}},Qt=!Me&&!be((function(){return 7!==Object.defineProperty(Nt("div"),"a",{get:function(){return 7}}).a})),Ht=Object.getOwnPropertyDescriptor,Wt={f:Me?Ht:function(e,t){if(e=Ye(e),t=Bt(t),Qt)try{return Ht(e,t)}catch(i){}if(Mt(e,t))return Ie(!Ee(Le.f,e,t),e[t])}},jt=Me&&be((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ut=String,Yt=TypeError,Gt=function(e){if($e(e))return e;throw Yt(Ut(e)+" is not an object")},Kt=TypeError,qt=Object.defineProperty,Xt=Object.getOwnPropertyDescriptor,Jt="enumerable",$t="configurable",Zt="writable",ei={f:Me?jt?function(e,t,i){if(Gt(e),t=Bt(t),Gt(i),"function"==typeof e&&"prototype"===t&&"value"in i&&Zt in i&&!i[Zt]){var o=Xt(e,t);o&&o[Zt]&&(e[t]=i.value,i={configurable:$t in i?i[$t]:o[$t],enumerable:Jt in i?i[Jt]:o[Jt],writable:!1})}return qt(e,t,i)}:qt:function(e,t,i){if(Gt(e),t=Bt(t),Gt(i),Qt)try{return qt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw Kt("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},ti=Me?function(e,t,i){return ei.f(e,t,Ie(1,i))}:function(e,t,i){return e[t]=i,e},ii=Function.prototype,oi=Me&&Object.getOwnPropertyDescriptor,ri=Mt(ii,"name"),ni={EXISTS:ri,PROPER:ri&&"something"===function(){}.name,CONFIGURABLE:ri&&(!Me||Me&&oi(ii,"name").configurable)},si=ke(Function.toString);Xe(Ct.inspectSource)||(Ct.inspectSource=function(e){return si(e)});var ai,ci,ui,li=Ct.inspectSource,di=Se.WeakMap,hi=Xe(di)&&/native code/.test(String(di)),pi=yt("keys"),Ti=function(e){return pi[e]||(pi[e]=At(e))},fi={},vi="Object already initialized",gi=Se.TypeError,mi=Se.WeakMap;if(hi||Ct.state){var Ri=Ct.state||(Ct.state=new mi);Ri.get=Ri.get,Ri.has=Ri.has,Ri.set=Ri.set,ai=function(e,t){if(Ri.has(e))throw gi(vi);return t.facade=e,Ri.set(e,t),t},ci=function(e){return Ri.get(e)||{}},ui=function(e){return Ri.has(e)}}else{var Ci=Ti("state");fi[Ci]=!0,ai=function(e,t){if(Mt(e,Ci))throw gi(vi);return t.facade=e,ti(e,Ci,t),t},ci=function(e){return Mt(e,Ci)?e[Ci]:{}},ui=function(e){return Mt(e,Ci)}}var yi={set:ai,get:ci,has:ui,enforce:function(e){return ui(e)?ci(e):ai(e,{})},getterFor:function(e){return function(t){var i;if(!$e(t)||(i=ci(t)).type!==e)throw gi("Incompatible receiver, "+e+" required");return i}}},_i=f((function(e){var t=ni.CONFIGURABLE,i=yi.enforce,o=yi.get,r=String,n=Object.defineProperty,s=ke("".slice),a=ke("".replace),c=ke([].join),u=Me&&!be((function(){return 8!==n((function(){}),"length",{value:8}).length})),l=String(String).split("String"),d=e.exports=function(e,o,d){"Symbol("===s(r(o),0,7)&&(o="["+a(r(o),/^Symbol\(([^)]*)\)/,"$1")+"]"),d&&d.getter&&(o="get "+o),d&&d.setter&&(o="set "+o),(!Mt(e,"name")||t&&e.name!==o)&&(Me?n(e,"name",{value:o,configurable:!0}):e.name=o),u&&d&&Mt(d,"arity")&&e.length!==d.arity&&n(e,"length",{value:d.arity});try{d&&Mt(d,"constructor")&&d.constructor?Me&&n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(p){}var h=i(e);return Mt(h,"source")||(h.source=c(l,"string"==typeof o?o:"")),e};Function.prototype.toString=d((function(){return Xe(this)&&o(this).source||li(this)}),"toString")})),Si=function(e,t,i,o){o||(o={});var r=o.enumerable,n=void 0!==o.name?o.name:t;if(Xe(i)&&_i(i,n,o),o.global)r?e[t]=i:mt(t,i);else{try{o.unsafe?e[t]&&(r=!0):delete e[t]}catch(s){}r?e[t]=i:ei.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},bi=Math.ceil,Mi=Math.floor,wi=Math.trunc||function(e){var t=+e;return(t>0?Mi:bi)(t)},Vi=function(e){var t=+e;return t!=t||0===t?0:wi(t)},Ei=Math.max,Ai=Math.min,Pi=Math.min,Li=function(e){return e>0?Pi(Vi(e),9007199254740991):0},Ii=function(e){return Li(e.length)},xi=function(e){return function(t,i,o){var r,n=Ye(t),s=Ii(n),a=function(e,t){var i=Vi(e);return i<0?Ei(i+t,0):Ai(i,t)}(o,s);if(e&&i!=i){for(;s>a;)if((r=n[a++])!=r)return!0}else for(;s>a;a++)if((e||a in n)&&n[a]===i)return e||a||0;return!e&&-1}},Oi={includes:xi(!0),indexOf:xi(!1)}.indexOf,Di=ke([].push),ki=function(e,t){var i,o=Ye(e),r=0,n=[];for(i in o)!Mt(fi,i)&&Mt(o,i)&&Di(n,i);for(;t.length>r;)Mt(o,i=t[r++])&&(~Oi(n,i)||Di(n,i));return n},Bi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],zi=Bi.concat("length","prototype"),Fi={f:Object.getOwnPropertyNames||function(e){return ki(e,zi)}},Ni={f:Object.getOwnPropertySymbols},Qi=ke([].concat),Hi=Ze("Reflect","ownKeys")||function(e){var t=Fi.f(Gt(e)),i=Ni.f;return i?Qi(t,i(e)):t},Wi=function(e,t,i){for(var o=Hi(t),r=ei.f,n=Wt.f,s=0;s<o.length;s++){var a=o[s];Mt(e,a)||i&&Mt(i,a)||r(e,a,n(t,a))}},ji=/#|\.prototype\./,Ui=function(e,t){var i=Gi[Yi(e)];return i===qi||i!==Ki&&(Xe(t)?be(t):!!t)},Yi=Ui.normalize=function(e){return String(e).replace(ji,".").toLowerCase()},Gi=Ui.data={},Ki=Ui.NATIVE="N",qi=Ui.POLYFILL="P",Xi=Ui,Ji=Wt.f,$i=function(e,t){var i,o,r,n,s,a=e.target,c=e.global,u=e.stat;if(i=c?Se:u?Se[a]||mt(a,{}):(Se[a]||{}).prototype)for(o in t){if(n=t[o],r=e.dontCallGetSet?(s=Ji(i,o))&&s.value:i[o],!Xi(c?o:a+(u?".":"#")+o,e.forced)&&void 0!==r){if(typeof n==typeof r)continue;Wi(n,r)}(e.sham||r&&r.sham)&&ti(n,"sham",!0),Si(i,o,n,e)}},Zi={};Zi[xt("toStringTag")]="z";var eo,to="[object z]"===String(Zi),io=xt("toStringTag"),oo=Object,ro="Arguments"===Fe(function(){return arguments}()),no=to?Fe:function(e){var t,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=oo(e),io))?i:ro?Fe(t):"Object"===(o=Fe(t))&&Xe(t.callee)?"Arguments":o},so=String,ao=function(e){if("Symbol"===no(e))throw TypeError("Cannot convert a Symbol value to a string");return so(e)},co=function(){var e=Gt(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},uo=Se.RegExp,lo=be((function(){var e=uo("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),ho=lo||be((function(){return!uo("a","y").sticky})),po={BROKEN_CARET:lo||be((function(){var e=uo("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:ho,UNSUPPORTED_Y:lo},To=Object.keys||function(e){return ki(e,Bi)},fo=Me&&!jt?Object.defineProperties:function(e,t){Gt(e);for(var i,o=Ye(t),r=To(t),n=r.length,s=0;n>s;)ei.f(e,i=r[s++],o[i]);return e},vo={f:fo},go=Ze("document","documentElement"),mo="prototype",Ro="script",Co=Ti("IE_PROTO"),yo=function(){},_o=function(e){return"<"+Ro+">"+e+"</"+Ro+">"},So=function(e){e.write(_o("")),e.close();var t=e.parentWindow.Object;return e=null,t},bo=function(){try{eo=new ActiveXObject("htmlfile")}catch(r){}var e,t,i;bo="undefined"!=typeof document?document.domain&&eo?So(eo):(t=Nt("iframe"),i="java"+Ro+":",t.style.display="none",go.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(_o("document.F=Object")),e.close(),e.F):So(eo);for(var o=Bi.length;o--;)delete bo[mo][Bi[o]];return bo()};fi[Co]=!0;var Mo,wo,Vo=Object.create||function(e,t){var i;return null!==e?(yo[mo]=Gt(e),i=new yo,yo[mo]=null,i[Co]=e):i=bo(),void 0===t?i:vo.f(i,t)},Eo=Se.RegExp,Ao=be((function(){var e=Eo(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Po=Se.RegExp,Lo=be((function(){var e=Po("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Io=yi.get,xo=yt("native-string-replace",String.prototype.replace),Oo=RegExp.prototype.exec,Do=Oo,ko=ke("".charAt),Bo=ke("".indexOf),zo=ke("".replace),Fo=ke("".slice),No=(wo=/b*/g,Ee(Oo,Mo=/a/,"a"),Ee(Oo,wo,"a"),0!==Mo.lastIndex||0!==wo.lastIndex),Qo=po.BROKEN_CARET,Ho=void 0!==/()??/.exec("")[1];(No||Ho||Qo||Ao||Lo)&&(Do=function(e){var t,i,o,r,n,s,a,c=this,u=Io(c),l=ao(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=Ee(Do,d,l),c.lastIndex=d.lastIndex,t;var h=u.groups,p=Qo&&c.sticky,T=Ee(co,c),f=c.source,v=0,g=l;if(p&&(T=zo(T,"y",""),-1===Bo(T,"g")&&(T+="g"),g=Fo(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ko(l,c.lastIndex-1))&&(f="(?: "+f+")",g=" "+g,v++),i=new RegExp("^(?:"+f+")",T)),Ho&&(i=new RegExp("^"+f+"$(?!\\s)",T)),No&&(o=c.lastIndex),r=Ee(Oo,p?i:c,g),p?r?(r.input=Fo(r.input,v),r[0]=Fo(r[0],v),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:No&&r&&(c.lastIndex=c.global?r.index+r[0].length:o),Ho&&r&&r.length>1&&Ee(xo,r[0],i,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)})),r&&h)for(r.groups=s=Vo(null),n=0;n<h.length;n++)s[(a=h[n])[0]]=r[a[1]];return r});var Wo=Do;$i({target:"RegExp",proto:!0,forced:/./.exec!==Wo},{exec:Wo});var jo="\t\n\v\f\r \u2028\u2029\ufeff",Uo=ke("".replace),Yo=RegExp("^["+jo+"]+"),Go=RegExp("(^|[^"+jo+"])["+jo+"]+$"),Ko=function(e){return function(t){var i=ao(Ue(t));return 1&e&&(i=Uo(i,Yo,"")),2&e&&(i=Uo(i,Go,"$1")),i}},qo={start:Ko(1),end:Ko(2),trim:Ko(3)}.trim,Xo=ke("".charAt),Jo=Se.parseFloat,$o=Se.Symbol,Zo=$o&&$o.iterator,er=1/Jo(jo+"-0")!=-Infinity||Zo&&!be((function(){Jo(Object(Zo))}))?function(e){var t=qo(ao(e)),i=Jo(t);return 0===i&&"-"===Xo(t,0)?-0:i}:Jo;$i({global:!0,forced:parseFloat!==er},{parseFloat:er});var tr=function(e){if("Function"===Fe(e))return ke(e)},ir=xt("species"),or=RegExp.prototype,rr=ke("".charAt),nr=ke("".charCodeAt),sr=ke("".slice),ar=function(e){return function(t,i){var o,r,n=ao(Ue(t)),s=Vi(i),a=n.length;return s<0||s>=a?e?"":void 0:(o=nr(n,s))<55296||o>56319||s+1===a||(r=nr(n,s+1))<56320||r>57343?e?rr(n,s):o:e?sr(n,s,s+2):r-56320+(o-55296<<10)+65536}},cr={codeAt:ar(!1),charAt:ar(!0)}.charAt,ur=function(e,t,i){return t+(i?cr(e,t).length:1)},lr=TypeError,dr=function(e,t){var i=e.exec;if(Xe(i)){var o=Ee(i,e,t);return null!==o&&Gt(o),o}if("RegExp"===Fe(e))return Ee(Wo,e,t);throw lr("RegExp#exec called on incompatible receiver")};!function(e,t,i,o){var r=xt(e),n=!be((function(){var t={};return t[r]=function(){return 7},7!==""[e](t)})),s=n&&!be((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[ir]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t}));if(!n||!s||i){var a=tr(/./[r]),c=t(r,""[e],(function(e,t,i,o,r){var s=tr(e),c=t.exec;return c===Wo||c===or.exec?n&&!r?{done:!0,value:a(t,i,o)}:{done:!0,value:s(i,t,o)}:{done:!1}}));Si(String.prototype,e,c[0]),Si(or,r,c[1])}o&&ti(or[r],"sham",!0)}("match",(function(e,t,i){return[function(t){var i=Ue(this),o=We(t)?void 0:ft(t,e);return o?Ee(o,t,i):new RegExp(t)[e](ao(i))},function(e){var o=Gt(this),r=ao(e),n=i(t,o,r);if(n.done)return n.value;if(!o.global)return dr(o,r);var s=o.unicode;o.lastIndex=0;for(var a,c=[],u=0;null!==(a=dr(o,r));){var l=ao(a[0]);c[u]=l,""===l&&(o.lastIndex=ur(r,Li(o.lastIndex),s)),u++}return 0===u?null:c}]}));var hr=Array.isArray||function(e){return"Array"===Fe(e)},pr=TypeError,Tr=function(e){if(e>9007199254740991)throw pr("Maximum allowed index exceeded");return e},fr=function(e,t,i){var o=Bt(t);o in e?ei.f(e,o,Ie(0,i)):e[o]=i},vr=function(){},gr=[],mr=Ze("Reflect","construct"),Rr=/^\s*(?:class|function)\b/,Cr=ke(Rr.exec),yr=!Rr.exec(vr),_r=function(e){if(!Xe(e))return!1;try{return mr(vr,gr,e),!0}catch(t){return!1}},Sr=function(e){if(!Xe(e))return!1;switch(no(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yr||!!Cr(Rr,li(e))}catch(t){return!0}};Sr.sham=!0;var br,Mr=!mr||be((function(){var e;return _r(_r.call)||!_r(Object)||!_r((function(){e=!0}))||e}))?Sr:_r,wr=xt("species"),Vr=Array,Er=function(e,t){return new(function(e){var t;return hr(e)&&(t=e.constructor,(Mr(t)&&(t===Vr||hr(t.prototype))||$e(t)&&null===(t=t[wr]))&&(t=void 0)),void 0===t?Vr:t}(e))(0===t?0:t)},Ar=xt("species"),Pr=xt("isConcatSpreadable"),Lr=st>=51||!be((function(){var e=[];return e[Pr]=!1,e.concat()[0]!==e})),Ir=function(e){if(!$e(e))return!1;var t=e[Pr];return void 0!==t?!!t:hr(e)};$i({target:"Array",proto:!0,arity:1,forced:!(Lr&&(br="concat",st>=51||!be((function(){var e=[];return(e.constructor={})[Ar]=function(){return{foo:1}},1!==e[br](Boolean).foo}))))},{concat:function(e){var t,i,o,r,n,s=St(this),a=Er(s,0),c=0;for(t=-1,o=arguments.length;t<o;t++)if(Ir(n=-1===t?s:arguments[t]))for(r=Ii(n),Tr(c+r),i=0;i<r;i++,c++)i in n&&fr(a,c,n[i]);else Tr(c+1),fr(a,c++,n);return a.length=c,a}});var xr=window.navigator&&window.navigator.userAgent||"",Or=/AppleWebKit\/([\d.]+)/i.exec(xr);Or&&parseFloat(Or.pop());var Dr=/iPad/i.test(xr),kr=/iPhone/i.test(xr)&&!Dr,Br=/iPod/i.test(xr),zr=kr||Dr||Br,Fr=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(xr);zr&&function(){var e=xr.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Nr=/Android/i.test(xr);Nr&&function(){var e=xr.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);t&&i&&parseFloat("".concat(e[1],".").concat(e[2]))}();Nr&&/webkit/i.test(xr),/Firefox/i.test(xr)&&function(){var e=xr.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Qr=/Edge\//i.test(xr);Qr&&function(){var e=xr.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var Hr=/Edg\//i.test(xr);Hr&&function(){var e=xr.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Wr=/SogouMobileBrowser\//i.test(xr);Wr&&function(){var e=xr.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var jr=/MetaSr\s/i.test(xr);jr&&function(){var e=xr.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Ur=/TBS\/\d+/i.test(xr);Ur&&function(){var e=xr.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var Yr=/XWEB\/\d+/i.test(xr);Yr&&function(){var e=xr.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(xr),/MSIE\/\d+/i.test(xr)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(xr),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(xr)&&/rv:11.0/.test(xr)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(xr)&&function(){var e=xr.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Gr=!Ur&&/MQQBrowser\/\d+/i.test(xr)&&/COVC\/\d+/i.test(xr),Kr=!Ur&&/MQQBrowser\/\d+/i.test(xr)&&!/COVC\/\d+/i.test(xr);(Kr||Gr)&&function(){var e=xr.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var qr=!Ur&&/ QQBrowser\/\d+/i.test(xr);qr&&function(){var e=xr.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Xr=!Ur&&/QQBrowserLite\/\d+/i.test(xr);Xr&&function(){var e=xr.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var Jr=!Ur&&/MQBHD\/\d+/i.test(xr);Jr&&function(){var e=xr.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(xr),!zr&&/MAC OS X/i.test(xr),!Nr&&/Linux/i.test(xr),/MicroMessenger/i.test(xr),/UCBrowser/i.test(xr),/Electron/i.test(xr);var $r=/MiuiBrowser/i.test(xr);$r&&function(){var e=xr.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Zr=/HuaweiBrowser/i.test(xr);/Huawei/i.test(xr),Zr&&function(){var e=xr.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var en=/SamsungBrowser/i.test(xr);en&&function(){var e=xr.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var tn=/HeyTapBrowser/i.test(xr);tn&&function(){var e=xr.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var on=/VivoBrowser/i.test(xr);on&&function(){var e=xr.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var rn,nn,sn,an=/Chrome/i.test(xr),cn=!Qr&&!jr&&!Wr&&!Ur&&!Yr&&!Hr&&!qr&&!$r&&!Zr&&!en&&!tn&&!on&&/Chrome/i.test(xr);cn&&function(){var e=xr.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),cn&&function(){var e=xr.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!an&&!Kr&&!Gr&&!Xr&&!Jr&&/Safari/i.test(xr)&&function(){var e=xr.match(/Version\/([\d.]+)/);e&&e[1]&&e[1]}(),"file:"===location.protocol||"localhost"===location.hostname||/^\d+\.\d+\.\d+\.\d+$/.test(location.hostname),function(e){e.LIVE="live",e.RTC="rtc"}(rn||(rn={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(nn||(nn={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(sn||(sn={}));var un,ln,dn,hn=-3340,pn=-1301,Tn=-1314,fn=-1315,vn=-1316,gn=-1302,mn=-1317,Rn=-1318,Cn=-1319,yn=-70252,_n={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},Sn={code:-1005,message:"not supported"},bn="2.10.4-beta.3";e.TRTCMediaMixingErrorCode=void 0,(un=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[un.Success=0]="Success",un[un.Error=-1]="Error",un[un.InvalidParams=-2]="InvalidParams",un[un.NotFoundSource=-3]="NotFoundSource",un[un.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",un[un.CameraNotAuthorized=-5]="CameraNotAuthorized",un[un.CameraIsOccupied=-6]="CameraIsOccupied",un[un.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(ln=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[ln.kCamera=0]="kCamera",ln[ln.kScreen=1]="kScreen",ln[ln.kImage=2]="kImage",ln[ln.kPhoneMirror=4]="kPhoneMirror",ln[ln.kText=5]="kText",ln[ln.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(dn=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",dn.onSourceMoved="onSourceMoved",dn.onSourceResized="onSourceResized",dn.onRightButtonClicked="onRightButtonClicked",dn.onError="onError",dn.onSourcePlugged="onSourcePlugged",dn.onSourceConnected="onSourceConnected",dn.onSourceDisconnected="onSourceDisconnected",dn.onSourceUnplugged="onSourceUnplugged",dn.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var Mn,wn=function(){function e(e,t){if(this.logRegion="tc",this.loggerManager=e,t){var i=t.sdkAppId,o=t.userId,r=t.seq;this.seq=r,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(r),userId:o,sdkAppId:i}))}else this.logger=e;this.logger||(this.logger={debug:function(e){console.debug(e)},info:function(e){console.info(e)},warn:function(e){console.warn(e)},error:function(e){console.error(e)}})}return e.prototype.getLogMessage=function(e){var t=this;return e.map((function(e){return t.getStringifyMessage(e)})).join(" ")},e.prototype.getStringifyMessage=function(e){var t=this;if("object"!=typeof e)return e;if(e instanceof HTMLElement)return"".concat(e.tagName.toLocaleLowerCase(),"#").concat(e.id);if(e instanceof Array){var i=[];return Object.keys(e).forEach((function(o){return i[o]=t.getStringifyMessage(e[o])})),JSON.stringify(i)}if(e instanceof Object){var o={};return Object.keys(e).forEach((function(i){return o[i]=t.getStringifyMessage(e[i])})),JSON.stringify(o)}return e},e.prototype.update=function(e){var t=e.userId,i=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:t,sdkAppId:i}))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger.debug(i)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(i)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(i)},e}(),Vn=new wn(null),En=function(){function e(e,t,i){void 0===i&&(i={calcPositionOnly:!1,canExceedContainer:!1}),this.logPrefix="[Movable]",this.movable=null,this.container=null,this.options={calcPositionOnly:!1,canExceedContainer:!1},this.callbacksMap=new Map,this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0,this.movable=e,this.container=t||document.body,this.options={calcPositionOnly:!!i.calcPositionOnly||!1,canExceedContainer:!!i.canExceedContainer||!1},this.setStyle(),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove5px=this.onMouseMove5px.bind(this),this.onMouseUp5px=this.onMouseUp5px.bind(this),this.movable.addEventListener("mousedown",this.onMouseDown,!1)}return e.prototype.setStyle=function(){this.movable?(this.movable.style.position="absolute",this.movable.style.cursor="move"):Vn.debug("".concat(this.logPrefix,"setStyle 'movable' is null"))},e.prototype.onMouseDown=function(e){if(0===e.button){if(e.preventDefault(),document.defaultView&&this.movable){var t=document.defaultView.getComputedStyle(this.movable);this.originLeft=window.parseInt(t.left),this.originTop=window.parseInt(t.top)}else Vn.debug("".concat(this.logPrefix,"onMouseDown 'movable' is null"));this.moveStartOfLeft=e.screenX,this.moveStartOfTop=e.screenY,document.addEventListener("mousemove",this.onMouseMove5px,!1),document.addEventListener("mouseup",this.onMouseUp5px,!1)}},e.prototype.onMouseMove5px=function(e){var t=e.screenX-(this.moveStartOfLeft||0),i=e.screenY-(this.moveStartOfTop||0);Math.abs(t)>=5||Math.abs(i)>=5?(document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1),document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1)):Vn.debug("".concat(this.logPrefix,"on Movable mouse move less than 5px"))},e.prototype.onMouseUp5px=function(){document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1)},e.prototype.onMouseMove=function(e){if(this.movable&&this.container){var t=e.screenX-this.moveStartOfLeft,i=e.screenY-this.moveStartOfTop,o=this.originLeft+t,r=this.originTop+i,n=this.movable.offsetWidth,s=this.movable.offsetHeight,a=this.container.offsetWidth,c=this.container.offsetHeight;this.options.canExceedContainer||(o<0?o=0:o>a-n&&(o=a-n),r<0?r=0:r>c-s&&(r=c-s)),!this.options.calcPositionOnly&&this.movable&&(this.movable.style.left="".concat(o,"px"),this.movable.style.top="".concat(r,"px")),this.emit("move",o,r)}else Vn.debug("".concat(this.logPrefix,"onMouseMove error:No 'movable' and 'container'."))},e.prototype.onMouseUp=function(){document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0},e.prototype.on=function(e,t){var i=this.callbacksMap.get(e);i?i.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var i=this.callbacksMap.get(e);i&&(i=i.filter((function(e){return e!=t})),this.callbacksMap.set(e,i))},e.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=this.callbacksMap.get(e);o&&o.forEach((function(e){try{e.apply(null,t)}catch(i){console.error("[Movable]emit error:",e,i)}}))},e.prototype.destroy=function(){var e;null===(e=this.movable)||void 0===e||e.removeEventListener("mousedown",this.onMouseDown,!1),this.callbacksMap.clear(),this.movable=null,this.container=null},e}();!function(e){e[e.Both=0]="Both",e[e.Corner=1]="Corner",e[e.Edge=2]="Edge"}(Mn||(Mn={}));var An="trtc-resizable-top-left-anchor",Pn="trtc-resizable-top-anchor",Ln="trtc-resizable-top-right-anchor",In="trtc-resizable-left-anchor",xn="trtc-resizable-right-anchor",On="trtc-resizable-bottom-left-anchor",Dn="trtc-resizable-bottom-anchor",kn="trtc-resizable-bottom-right-anchor",Bn={resizeAnchor:{position:"absolute",width:"".concat(8,"px"),height:"".concat(8,"px"),border:"1px solid #3D7EFD",backgroundColor:"#FFFFFF"},topLeftAnchor:{top:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"nw-resize"},topAnchor:{top:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"n-resize"},topRightAnchor:{top:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"ne-resize"},leftAnchor:{top:"calc(50% - ".concat(4,"px)"),left:"-".concat(4,"px"),cursor:"w-resize"},rightAnchor:{top:"calc(50% - ".concat(4,"px)"),right:"-".concat(4,"px"),cursor:"e-resize"},bottomLeftAnchor:{bottom:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"sw-resize"},bottomAnchor:{bottom:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"s-resize"},bottomRightAnchor:{bottom:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"se-resize"}};function zn(e,t){for(var i in t)e.style[i]=t[i]}var Fn=function(){function e(e,t,i){void 0===i&&(i={keepRatio:!1,stopPropagation:!1,anchorMode:Mn.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:Mn.Both,canExceedContainer:!1},this.callbacksMap=new Map,this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0,this.resizeTarget=e,this.container=t||document.body,this.options={keepRatio:!!i.keepRatio||!1,stopPropagation:!!i.stopPropagation||!1,anchorMode:i.anchorMode||Mn.Both,canExceedContainer:!!i.canExceedContainer||!1},this.mousedown=this.mousedown.bind(this),this.mousemove=this.mousemove.bind(this),this.mouseup=this.mouseup.bind(this),this.currentAnchor=null,this.createResizeAnchor(),this.resizeTarget.classList.add("trtc-resizable"),this.resizeTarget.style.position="absolute",this.resizeTarget.style.border="1px solid #3D7EFD",this.resizeTarget.style.boxSizing="border-box",this.initResizeEvent()}return e.prototype.createResizeAnchor=function(){var e,t,i,o,r,n,s,a,c=document.createElement("div");c.className="trtc-resizable-resize-anchor ".concat(An),zn(c,Object.assign({},Bn.resizeAnchor,Bn.topLeftAnchor)),this.topLeftAnchor=c;var u=document.createElement("div");u.className="trtc-resizable-resize-anchor ".concat(Pn),zn(u,Object.assign({},Bn.resizeAnchor,Bn.topAnchor)),this.topAnchor=u;var l=document.createElement("div");l.className="trtc-resizable-resize-anchor ".concat(Ln),zn(l,Object.assign({},Bn.resizeAnchor,Bn.topRightAnchor)),this.topRightAnchor=l;var d=document.createElement("div");d.className="trtc-resizable-resize-anchor ".concat(In),zn(d,Object.assign({},Bn.resizeAnchor,Bn.leftAnchor)),this.leftAnchor=d;var h=document.createElement("div");h.className="trtc-resizable-resize-anchor ".concat(xn),zn(h,Object.assign({},Bn.resizeAnchor,Bn.rightAnchor)),this.rightAnchor=h;var p=document.createElement("div");p.className="trtc-resizable-resize-anchor ".concat(On),zn(p,Object.assign({},Bn.resizeAnchor,Bn.bottomLeftAnchor)),this.bottomLeftAnchor=p;var T=document.createElement("div");T.className="trtc-resizable-resize-anchor ".concat(Dn),zn(T,Object.assign({},Bn.resizeAnchor,Bn.bottomAnchor)),this.bottomAnchor=T;var f=document.createElement("div");f.className="trtc-resizable-resize-anchor ".concat(kn),zn(f,Object.assign({},Bn.resizeAnchor,Bn.bottomRightAnchor)),this.bottomRightAnchor=f,this.options.anchorMode!==Mn.Both&&this.options.anchorMode!==Mn.Edge||(null===(e=this.resizeTarget)||void 0===e||e.appendChild(u),null===(t=this.resizeTarget)||void 0===t||t.appendChild(d),null===(i=this.resizeTarget)||void 0===i||i.appendChild(h),null===(o=this.resizeTarget)||void 0===o||o.appendChild(T)),this.options.anchorMode!==Mn.Both&&this.options.anchorMode!==Mn.Corner||(null===(r=this.resizeTarget)||void 0===r||r.appendChild(c),null===(n=this.resizeTarget)||void 0===n||n.appendChild(l),null===(s=this.resizeTarget)||void 0===s||s.appendChild(p),null===(a=this.resizeTarget)||void 0===a||a.appendChild(f))},e.prototype.initResizeEvent=function(){var e,t,i,o,r,n,s,a;null===(e=this.topLeftAnchor)||void 0===e||e.addEventListener("mousedown",this.mousedown,!1),null===(t=this.topAnchor)||void 0===t||t.addEventListener("mousedown",this.mousedown,!1),null===(i=this.topRightAnchor)||void 0===i||i.addEventListener("mousedown",this.mousedown,!1),null===(o=this.leftAnchor)||void 0===o||o.addEventListener("mousedown",this.mousedown,!1),null===(r=this.rightAnchor)||void 0===r||r.addEventListener("mousedown",this.mousedown,!1),null===(n=this.bottomLeftAnchor)||void 0===n||n.addEventListener("mousedown",this.mousedown,!1),null===(s=this.bottomAnchor)||void 0===s||s.addEventListener("mousedown",this.mousedown,!1),null===(a=this.bottomRightAnchor)||void 0===a||a.addEventListener("mousedown",this.mousedown,!1)},e.prototype.mousedown=function(e){if(0===e.button){if(e.preventDefault(),this.options.stopPropagation&&e.stopPropagation(),this.currentAnchor=e.target,this.resizeStartLeft=e.screenX,this.resizeStartTop=e.screenY,document.defaultView&&this.resizeTarget){var t=document.defaultView.getComputedStyle(this.resizeTarget);this.originTop=window.parseInt(t.top),this.originLeft=window.parseInt(t.left),this.originWidth=this.resizeTarget.offsetWidth,this.originHeight=this.resizeTarget.offsetHeight,Vn.debug("resize origin:",this.originTop,this.originLeft,this.originWidth,this.originHeight)}else Vn.debug("".concat(this.logPrefix,"mouseDown 'resizeTarget' is null"));document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1)}},e.prototype.mousemove=function(e){if(this.container&&this.resizeTarget&&this.currentAnchor){var t,i=this.currentAnchor.classList[1],o=this.originLeft,r=this.originTop,n=this.originWidth,s=this.originHeight;switch(i){case An:r=(t=this._resizeTop(e)).top,s=t.height,o=(t=this._resizeLeft(e)).left,n=t.width,this.options.keepRatio&&(n/this.originWidth<s/this.originHeight?(s=n*this.originHeight/this.originWidth,r=this.originTop+this.originHeight-s):(n=s*this.originWidth/this.originHeight,o=this.originLeft+this.originWidth-n));break;case Pn:r=(t=this._resizeTop(e)).top,s=t.height,this.options.keepRatio&&((n=this.originWidth*s/this.originHeight)<20?(n=20,s=this.originHeight*n/this.originWidth,r=this.originTop+this.originHeight-s):!this.options.canExceedContainer&&n>this.container.offsetWidth-this.originLeft&&(n=this.container.offsetWidth-this.originLeft,s=this.originHeight*n/this.originWidth,r=this.originTop+this.originHeight-s));break;case Ln:r=(t=this._resizeTop(e)).top,s=t.height,n=this._resizeRight(e),this.options.keepRatio&&(n/this.originWidth<s/this.originHeight?(s=n*this.originHeight/this.originWidth,r=this.originTop+this.originHeight-s):n=s*this.originWidth/this.originHeight);break;case In:o=(t=this._resizeLeft(e)).left,n=t.width,this.options.keepRatio&&((s=this.originHeight*n/this.originWidth)<20?(s=20,n=this.originWidth*s/this.originHeight,o=this.originLeft+this.originWidth-n):!this.options.canExceedContainer&&s>this.container.offsetHeight-this.originTop&&(s=this.container.offsetHeight-this.originTop,n=this.originWidth*s/this.originHeight,o=this.originLeft+this.originWidth-n));break;case xn:n=this._resizeRight(e),this.options.keepRatio&&((s=n*this.originHeight/this.originWidth)<20?n=(s=20)*this.originWidth/this.originHeight:!this.options.canExceedContainer&&s>this.container.offsetHeight-this.originTop&&(n=(s=this.container.offsetHeight-this.originTop)*this.originWidth/this.originHeight));break;case On:s=this._resizeBottom(e),o=(t=this._resizeLeft(e)).left,n=t.width,this.options.keepRatio&&(n/this.originWidth<s/this.originHeight?s=n*this.originHeight/this.originWidth:(n=s*this.originWidth/this.originHeight,o=this.originLeft+this.originWidth-n));break;case Dn:s=this._resizeBottom(e),this.options.keepRatio&&((n=s*this.originWidth/this.originHeight)<20?s=(n=20)*this.originHeight/this.originWidth:!this.options.canExceedContainer&&n>this.container.offsetWidth-this.originLeft&&(s=(n=this.container.offsetWidth-this.originLeft)*this.originHeight/this.originWidth));break;case kn:s=this._resizeBottom(e),n=this._resizeRight(e),this.options.keepRatio&&(n/this.originWidth<s/this.originHeight?s=n*this.originHeight/this.originWidth:n=s*this.originWidth/this.originHeight)}this.resizeTarget.style.left="".concat(o,"px"),this.resizeTarget.style.top="".concat(r,"px"),this.resizeTarget.style.height="".concat(s,"px"),this.resizeTarget.style.width="".concat(n,"px"),this.emit("resize",o,r,n,s)}else Vn.debug("".concat(this.logPrefix,"mouseMove error. No valid inner info:"),this.container,this.resizeTarget,this.currentAnchor)},e.prototype._resizeLeft=function(e){var t=e.screenX-this.resizeStartLeft,i=this.originLeft+t,o=this.originWidth-t;return!this.options.canExceedContainer&&i<0?(i=0,o=this.originWidth+this.originLeft):i>this.originLeft+this.originWidth-20&&(i=this.originLeft+this.originWidth-20,o=20),{left:i,width:o}},e.prototype._resizeTop=function(e){var t=e.screenY-this.resizeStartTop,i=this.originTop+t,o=this.originHeight-t;return!this.options.canExceedContainer&&i<0?(i=0,o=this.originHeight+this.originTop):i>this.originTop+this.originHeight-20&&(i=this.originTop+this.originHeight-20,o=20),{top:i,height:o}},e.prototype._resizeRight=function(e){if(!this.container)return Vn.debug("".concat(this.logPrefix,"_resizeRight error. No container:"),this.container),0;var t=e.screenX-this.resizeStartLeft,i=this.originWidth+t;return i<20?i=20:!this.options.canExceedContainer&&i>this.container.offsetWidth-this.originLeft&&(i=this.container.offsetWidth-this.originLeft),i},e.prototype._resizeBottom=function(e){if(!this.container)return Vn.debug("".concat(this.logPrefix,"_resizeBottom error. No container:"),this.container),0;var t=e.screenY-this.resizeStartTop,i=this.originHeight+t;return i<20?i=20:!this.options.canExceedContainer&&i>this.container.offsetHeight-this.originTop&&(i=this.container.offsetHeight-this.originTop),i},e.prototype.mouseup=function(){document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0},e.prototype.on=function(e,t){var i=this.callbacksMap.get(e);i?i.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var i=this.callbacksMap.get(e);i&&(i=i.filter((function(e){return e!=t})),this.callbacksMap.set(e,i))},e.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=this.callbacksMap.get(e);o&&o.slice().forEach((function(e){try{e.apply(null,t)}catch(i){console.error("[Resizable]emit error:",e,i)}}))},e.prototype.destroy=function(){var e,t,i,o,r,n,s,a,c,u,l,d,h,p,T,f;null===(e=this.topLeftAnchor)||void 0===e||e.removeEventListener("mousedown",this.mousedown,!1),null===(t=this.topAnchor)||void 0===t||t.removeEventListener("mousedown",this.mousedown,!1),null===(i=this.topRightAnchor)||void 0===i||i.removeEventListener("mousedown",this.mousedown,!1),null===(o=this.leftAnchor)||void 0===o||o.removeEventListener("mousedown",this.mousedown,!1),null===(r=this.rightAnchor)||void 0===r||r.removeEventListener("mousedown",this.mousedown,!1),null===(n=this.bottomLeftAnchor)||void 0===n||n.removeEventListener("mousedown",this.mousedown,!1),null===(s=this.bottomAnchor)||void 0===s||s.removeEventListener("mousedown",this.mousedown,!1),null===(a=this.bottomRightAnchor)||void 0===a||a.removeEventListener("mousedown",this.mousedown,!1),this.callbacksMap.clear(),this.options.anchorMode!==Mn.Both&&this.options.anchorMode!==Mn.Edge||(this.topAnchor&&(null===(c=this.resizeTarget)||void 0===c||c.removeChild(this.topAnchor)),this.leftAnchor&&(null===(u=this.resizeTarget)||void 0===u||u.removeChild(this.leftAnchor)),this.rightAnchor&&(null===(l=this.resizeTarget)||void 0===l||l.removeChild(this.rightAnchor)),this.bottomAnchor&&(null===(d=this.resizeTarget)||void 0===d||d.removeChild(this.bottomAnchor))),this.options.anchorMode!==Mn.Both&&this.options.anchorMode!==Mn.Corner||(this.topLeftAnchor&&(null===(h=this.resizeTarget)||void 0===h||h.removeChild(this.topLeftAnchor)),this.topRightAnchor&&(null===(p=this.resizeTarget)||void 0===p||p.removeChild(this.topRightAnchor)),this.bottomLeftAnchor&&(null===(T=this.resizeTarget)||void 0===T||T.removeChild(this.bottomLeftAnchor)),this.bottomRightAnchor&&(null===(f=this.resizeTarget)||void 0===f||f.removeChild(this.bottomRightAnchor))),this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.resizeTarget=null,this.container=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0},e}(),Nn=function(){var t=new Map;for(var i in e.TRTCVideoResolution)if(isNaN(Number(i))){var o=e.TRTCVideoResolution[i],r=i.split("_");t.set(o,{width:parseInt(r[1]),height:parseInt(r[2])})}return t}(),Qn=function(){function t(t){if(this.logPrefix="[TRTCMediaMixingDesigner]",this.mixingVideoWidth=640,this.mixingVideoHeight=360,this.canExceedContainer=!1,this.movableHandler=null,this.resizableHandler=null,this.previewScale=1,this.previewWidth=0,this.previewHeight=0,this.previewLeft=0,this.previewTop=0,this.BOUNDARY_ADSORPTION_THRESHOLD=10,this.newSelected=null,this.clickedMediaSources=[],this.oldSelectedIndex=-1,this.mousedownLeft=null,this.mousedownTop=null,this.eventButton=null,this.resizeObserver=null,this.logger=t.logger,this.container=t.view,this.container.style.position="relative",this.videoResolution=t.videoResolution,this.resMode=t.resMode,Nn.has(t.videoResolution)){var i=Nn.get(t.videoResolution),o=i.width,r=i.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=o,this.mixingVideoHeight=r):(this.mixingVideoWidth=r,this.mixingVideoHeight=o)}this.updatePreviewProperty(),this.canExceedContainer=t.canExceedContainer||!1,this.eventEmitter=new b,this.mediaList=[],this.selectedMediaIndex=-1,this.moveAndResizeOverlay=document.createElement("div"),this.moveAndResizeOverlay.style.position="relative",this.container.appendChild(this.moveAndResizeOverlay),this.initMediaMovable(),this.initMediaResizable(),this.initContainerMouseEventHander(),this.initContainerResizeObserver()}return t.prototype.updateOptions=function(t){if(!ge(t.videoResolution)||!ge(t.resMode)){if(this.resMode=ge(t.resMode)?this.resMode:t.resMode,t.videoResolution&&Nn.has(t.videoResolution)){var i=Nn.get(t.videoResolution),o=i.width,r=i.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=o,this.mixingVideoHeight=r):(this.mixingVideoWidth=r,this.mixingVideoHeight=o)}this.updatePreviewProperty(),this.updateOverlay()}},t.prototype.addMedia=function(e){this.mediaList.unshift(e),e.isSelected&&(this.selectedMediaIndex=0,this.updateOverlay())},t.prototype.removeMedia=function(e){var t=this.mediaList.findIndex((function(t){return t.id===e.id}));-1!==t&&(this.mediaList.splice(t,1),(this.selectedMediaIndex===t||e.isSelected)&&(this.selectedMediaIndex=-1,this.updateOverlay()))},t.prototype.updateMedia=function(e){var t=this.mediaList.findIndex((function(t){return t.id===e.id}));-1!==t&&(this.mediaList[t]=Object.assign({},this.mediaList[t],e),e.isSelected&&(this.selectedMediaIndex=t,this.updateOverlay()))},t.prototype.on=function(e,t){var i;null===(i=this.eventEmitter)||void 0===i||i.on(e,t)},t.prototype.off=function(e,t){var i;null===(i=this.eventEmitter)||void 0===i||i.off(e,t)},t.prototype.destroy=function(){var e,t,i,o;this.resizeObserver&&(this.container&&this.resizeObserver.unobserve(this.container),this.resizeObserver.disconnect(),this.resizeObserver=null),null===(e=this.movableHandler)||void 0===e||e.destroy(),null===(t=this.resizableHandler)||void 0===t||t.destroy(),this.movableHandler=null,this.resizableHandler=null,null===(i=this.container)||void 0===i||i.removeEventListener("contextmenu",this.onRightButtonClicked,!1),document.removeEventListener("mousedown",this.onContainerMousedown,!1),this.moveAndResizeOverlay&&(null===(o=this.container)||void 0===o||o.removeChild(this.moveAndResizeOverlay),this.moveAndResizeOverlay=null),this.container=null,this.eventEmitter=null,this.mediaList=[]},t.prototype.initMediaMovable=function(){this.onMove=this.onMove.bind(this),this.movableHandler=new En(this.moveAndResizeOverlay,this.container,{canExceedContainer:this.canExceedContainer,calcPositionOnly:!1}),this.movableHandler.on("move",this.onMove)},t.prototype.initMediaResizable=function(){this.onResize=this.onResize.bind(this),this.resizableHandler=new Fn(this.moveAndResizeOverlay,this.container,{keepRatio:!0,stopPropagation:!0,canExceedContainer:this.canExceedContainer,anchorMode:0}),this.resizableHandler.on("resize",this.onResize)},t.prototype.initContainerMouseEventHander=function(){this.container?(this.onContainerMousedown=this.onContainerMousedown.bind(this),this.onContainerMousemove=this.onContainerMousemove.bind(this),this.onContainerMouseup=this.onContainerMouseup.bind(this),document.addEventListener("mousedown",this.onContainerMousedown,!1),this.onRightButtonClicked=this.onRightButtonClicked.bind(this),this.container.addEventListener("contextmenu",this.onRightButtonClicked,!1)):this.logger.error("".concat(this.logPrefix,"initContainerMouseEventHander failed, no container view"))},t.prototype.initContainerResizeObserver=function(){this.container&&(this.onPreviewAreaResize=this.onPreviewAreaResize.bind(this),this.resizeObserver=new ResizeObserver(this.onPreviewAreaResize),this.resizeObserver.observe(this.container))},t.prototype.onPreviewAreaResize=function(e){for(var t=0,i=e;t<i.length;t++){if(i[t].target===this.container){this.updatePreviewProperty(),this.updateOverlay();break}}},t.prototype.updatePreviewProperty=function(){if(this.container){var e=this.container.offsetWidth,t=this.container.offsetHeight,i=e/this.mixingVideoWidth,o=t/this.mixingVideoHeight;this.previewScale=i>o?i:o,this.previewWidth=this.mixingVideoWidth*this.previewScale,this.previewHeight=this.mixingVideoHeight*this.previewScale,this.previewLeft=(e-this.previewWidth)/2,this.previewTop=(t-this.previewHeight)/2}else console.debug("".concat(this.logPrefix,"calcPreviewScale failed, no HTML element to display"))},t.prototype.updateOverlay=function(){if(this.moveAndResizeOverlay){var e=void 0,t=void 0,i=void 0,o=void 0;if(this.selectedMediaIndex>=0){var r={left:this.mediaList[this.selectedMediaIndex].rect.left*this.previewScale,top:this.mediaList[this.selectedMediaIndex].rect.top*this.previewScale,right:this.mediaList[this.selectedMediaIndex].rect.right*this.previewScale,bottom:this.mediaList[this.selectedMediaIndex].rect.bottom*this.previewScale};e="".concat(r.left+this.previewLeft,"px"),t="".concat(r.top+this.previewTop,"px"),i="".concat(r.right-r.left,"px"),o="".concat(r.bottom-r.top,"px"),this.moveAndResizeOverlay.style.display="block"}else e="".concat(this.previewLeft,"px"),t="".concat(this.previewTop,"px"),i="0px",o="0px",this.moveAndResizeOverlay.style.display="none";this.moveAndResizeOverlay.style.left=e,this.moveAndResizeOverlay.style.top=t,this.moveAndResizeOverlay.style.width=i,this.moveAndResizeOverlay.style.height=o}},t.prototype.onMove=function(e,t){var i;console.debug("".concat(this.logPrefix,"onMove: ").concat(e," ").concat(t));var o=this.mediaList[this.selectedMediaIndex];if(o&&this.moveAndResizeOverlay){var r={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+this.moveAndResizeOverlay.offsetWidth,bottom:t-this.previewTop+this.moveAndResizeOverlay.offsetHeight};this.doAdsorption(r);var n={left:Math.round(r.left/this.previewScale),top:Math.round(r.top/this.previewScale),right:Math.round(r.right/this.previewScale),bottom:Math.round(r.bottom/this.previewScale)};null===(i=this.eventEmitter)||void 0===i||i.emit("onSourceMoved",c({},o),n)}else console.debug("".concat(this.logPrefix,"onMove no selected media"))},t.prototype.doAdsorption=function(e){var t=this.BOUNDARY_ADSORPTION_THRESHOLD;Math.abs(e.left)<t&&(e.right=e.right-e.left,e.left=0),Math.abs(e.top)<t&&(e.bottom=e.bottom-e.top,e.top=0),Math.abs(e.right-this.previewWidth)<t&&(e.left=e.left+this.previewWidth-e.right,e.right=this.previewWidth),Math.abs(e.bottom-this.previewHeight)<t&&(e.top=e.top+this.previewHeight-e.bottom,e.bottom=this.previewHeight)},t.prototype.onResize=function(e,t,i,o){var r;console.debug("".concat(this.logPrefix,"onResize: ").concat(e," ").concat(t," ").concat(i," ").concat(o));var n=this.mediaList[this.selectedMediaIndex];if(n){var s={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+i,bottom:t-this.previewTop+o},a={left:Math.round(s.left/this.previewScale),top:Math.round(s.top/this.previewScale),right:Math.round(s.right/this.previewScale),bottom:Math.round(s.bottom/this.previewScale)};null===(r=this.eventEmitter)||void 0===r||r.emit("onSourceResized",c({},n),a)}else console.debug("".concat(this.logPrefix,"onResize no selected media"))},t.prototype.emitOnSelect=function(e){var t;if(e){for(var i=this.mediaList.length,o=0;o<i;o++)if(e.id===this.mediaList[o].id){this.selectedMediaIndex=o;break}}else this.selectedMediaIndex=-1;this.updateOverlay(),null===(t=this.eventEmitter)||void 0===t||t.emit("onSourceSelected",e?c({},e):null)},t.prototype.onContainerMousedown=function(e){console.debug("".concat(this.logPrefix,"onContainerMousedown event:"),e,e.target,e.currentTarget);var t=e.target;if(this.eventButton=e.button,t&&this.container){if(this.container.contains(t)){console.debug("".concat(this.logPrefix,"onContainerMousedown mix video image clicked"));var i=this.container.getBoundingClientRect(),o=e.clientX-i.x-this.previewLeft,r=e.clientY-i.y-this.previewTop,n=o/this.previewScale,s=r/this.previewScale;console.debug("".concat(this.logPrefix,"onContainerMousedown click point coordinates in mix video:"),o,r,n,s);for(var a=0;a<this.mediaList.length;a++){var c=this.mediaList[a];c.rect&&n>=c.rect.left&&n<=c.rect.right&&s>=c.rect.top&&s<=c.rect.bottom&&(this.clickedMediaSources.push(c),this.mediaList[this.selectedMediaIndex]&&c.id===this.mediaList[this.selectedMediaIndex].id&&(this.oldSelectedIndex=this.clickedMediaSources.length-1))}this.mousedownLeft=e.screenX,this.mousedownTop=e.screenY}this.clickedMediaSources.length>0?2===this.eventButton&&-1===this.oldSelectedIndex?(this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMousedown find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected),this.clickedMediaSources.splice(0,this.clickedMediaSources.length)):(document.addEventListener("mousemove",this.onContainerMousemove,!1),document.addEventListener("mouseup",this.onContainerMouseup,!1)):(this.newSelected=null,console.debug("".concat(this.logPrefix,"onContainerMousedown find clicked media source:"),this.newSelected),this.emitOnSelect(null),this.mousedownLeft=null,this.mousedownTop=null,this.eventButton=null)}},t.prototype.onContainerMousemove=function(e){var t;if(e.target&&this.container&&null!==this.mousedownLeft&&null!==this.mousedownTop){var i=e.screenX-this.mousedownLeft,o=e.screenY-this.mousedownTop;(Math.abs(i)>=5||Math.abs(o)>=5)&&(this.oldSelectedIndex>=0?(console.debug("".concat(this.logPrefix,"onContainerMousemove move or resize old selected media source, clear data:"),this.clickedMediaSources,this.oldSelectedIndex),this.clickedMediaSources.splice(0,this.clickedMediaSources.length),this.oldSelectedIndex=-1):this.clickedMediaSources.length>0&&(this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMousemove find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected),this.clickedMediaSources.splice(0,this.clickedMediaSources.length),null===(t=this.moveAndResizeOverlay)||void 0===t||t.dispatchEvent(new MouseEvent("mousedown",{screenX:this.mousedownLeft,screenY:this.mousedownTop,button:this.eventButton}))))}},t.prototype.onContainerMouseup=function(e){if(document.removeEventListener("mousemove",this.onContainerMousemove,!1),document.removeEventListener("mouseup",this.onContainerMouseup,!1),console.debug("".concat(this.logPrefix,"onContainerMouseup data:"),this.clickedMediaSources,this.oldSelectedIndex),e.target&&this.container){if(this.clickedMediaSources.length>0)if(this.oldSelectedIndex>=0){if(0===this.eventButton){var t=(this.oldSelectedIndex+1)%this.clickedMediaSources.length;this.newSelected=this.clickedMediaSources[t],console.debug("".concat(this.logPrefix,"onContainerMouseup find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected)}}else this.newSelected=this.clickedMediaSources[0],console.debug("".concat(this.logPrefix,"onContainerMouseup find clicked media source:"),this.newSelected),this.emitOnSelect(this.newSelected)}else console.debug("".concat(this.logPrefix,"onContainerMouseup click outside of mixing video image")),this.emitOnSelect(null);this.mousedownLeft=null,this.mousedownTop=null,this.clickedMediaSources.splice(0,this.clickedMediaSources.length),this.oldSelectedIndex=-1,this.newSelected=null,this.eventButton=null},t.prototype.onRightButtonClicked=function(e){var t;console.debug("".concat(this.logPrefix,"onRightButtonClicked:"),e.target,e.currentTarget,e.buttons),e.preventDefault(),null===(t=this.eventEmitter)||void 0===t||t.emit("onRightButtonClicked",c({},this.mediaList[this.selectedMediaIndex]))},t}(),Hn=function(){function t(i){if(this.logPrefix="[TRTCMediaMixingManager]",this.eventEmitter=new b,this.publishParams={videoEncoderParams:{videoResolution:e.TRTCVideoResolution.TRTCVideoResolution_1280_720,resMode:e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape,videoFps:15,videoBitrate:1800},canvasColor:0},this.mediaMixingDesigner=null,this.sourceList=[],this.trtcSourceMap=new Map,this.mixVideoTrack=null,this.selectedSource=null,this.view=null,t.mediaMixingManager)return t.mediaMixingManager;t.mediaMixingManager=this,this.logger=i.logger,this.trtc=i.trtc,this.trtcCloud=i.trtcCloud,this.onSourceSelected=this.onSourceSelected.bind(this),this.onSourceMoved=this.onSourceMoved.bind(this),this.onSourceResized=this.onSourceResized.bind(this),this.onRightButtonClicked=this.onRightButtonClicked.bind(this)}return t.prototype.destroy=function(){return u(this,void 0,Promise,(function(){var e;return l(this,(function(i){switch(i.label){case 0:this.view=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.trtc.stopPlugin("VideoMixer")];case 2:return i.sent(),[3,4];case 3:return e=i.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin error:"),e),[3,4];case 4:return this.destroyDesigner(),this.eventEmitter=null,t.mediaMixingManager=null,[2]}}))}))},t.prototype.bindPreviewArea=function(e){return u(this,void 0,Promise,(function(){var t,i,o,r,n=this;return l(this,(function(s){switch(s.label){case 0:return this.logger.log("".concat(this.logPrefix," bindPreviewArea:"),e),this.view=e,t=this._getCanvasSize(this.publishParams.videoEncoderParams.videoResolution,this.publishParams.videoEncoderParams.resMode),i=t.width,o=t.height,[4,this.trtc.startPlugin("VideoMixer",{view:e,canvasInfo:{width:i,height:o,canvasColor:String(this.publishParams.canvasColor)},onScreenShareStop:function(e){var t,i=n.sourceList.find((function(t){return t.id===e}));n.removeMediaSource(i),null===(t=n.eventEmitter)||void 0===t||t.emit("onSourceDisconnected",i||null)}})];case 1:return r=s.sent(),console.log("startPlugin result",r,r.track),this.mixVideoTrack=r.track,this.createDesigner(),[2]}}))}))},t.prototype._getTRTCSourceKey=function(t){var i;return((i={})[e.TRTCMediaSourceType.kCamera]="camera",i[e.TRTCMediaSourceType.kScreen]="screen",i[e.TRTCMediaSourceType.kText]="text",i[e.TRTCMediaSourceType.kVideo]="video",i[e.TRTCMediaSourceType.kImage]="image",i)[t.type]},t.prototype._getTRTCFillMode=function(t){var i;return((i={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]="cover",i[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]="contain",i)[t]},t.prototype._getTRTCVideoProfile=function(t,i){var o,r=((o={})[e.TRTCVideoResolution.TRTCVideoResolution_480_270]={width:480,height:270},o[e.TRTCVideoResolution.TRTCVideoResolution_640_360]={width:640,height:360},o[e.TRTCVideoResolution.TRTCVideoResolution_960_540]={width:960,height:540},o[e.TRTCVideoResolution.TRTCVideoResolution_1280_720]={width:1280,height:720},o[e.TRTCVideoResolution.TRTCVideoResolution_1920_1080]={width:1920,height:1080},o);return{width:r[t].width,height:r[t].height,frameRate:i,bitrate:1e3}},t.prototype._getTRTCLayout=function(t){var i,o,r,n,s,a,c,u,l,d,h,p,T,f,v,g,m={zIndex:(null===(r=t.layout)||void 0===r?void 0:r.zOrder)||0};if(pe(null===(n=t.layout)||void 0===n?void 0:n.rect)||(m.x=null===(s=t.layout)||void 0===s?void 0:s.rect.left,m.y=null===(a=t.layout)||void 0===a?void 0:a.rect.top,m.width=(null===(c=t.layout)||void 0===c?void 0:c.rect.right)-(null===(u=t.layout)||void 0===u?void 0:u.rect.left),m.height=(null===(l=t.layout)||void 0===l?void 0:l.rect.bottom)-(null===(d=t.layout)||void 0===d?void 0:d.rect.top)),pe(null===(h=t.layout)||void 0===h?void 0:h.fillMode)||(m.fillMode=this._getTRTCFillMode(null===(p=t.layout)||void 0===p?void 0:p.fillMode)),!pe(null===(T=t.layout)||void 0===T?void 0:T.mirror)){var R=((i={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!0,i[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,i[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,i);m.mirror=R[null===(f=t.layout)||void 0===f?void 0:f.mirror]}if(!pe(null===(v=t.layout)||void 0===v?void 0:v.rotation)){var C=((o={})[e.TRTCVideoRotation.TRTCVideoRotation0]=0,o[e.TRTCVideoRotation.TRTCVideoRotation90]=90,o[e.TRTCVideoRotation.TRTCVideoRotation180]=180,o[e.TRTCVideoRotation.TRTCVideoRotation270]=270,o);m.rotation=C[null===(g=t.layout)||void 0===g?void 0:g.rotation]}return m},t.prototype._getTRTCSourceItem=function(t){var i,o,r,n,s,a,u,l,d;switch(t.type){case e.TRTCMediaSourceType.kScreen:return d=e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,{id:t.id,profile:this._getTRTCVideoProfile((null===(i=t.screen)||void 0===i?void 0:i.resolution)||d,(null===(o=t.screen)||void 0===o?void 0:o.fps)||15),layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kCamera:return d=e.TRTCVideoResolution.TRTCVideoResolution_1280_720,{id:t.id,cameraId:null===(r=t.camera)||void 0===r?void 0:r.cameraId,profile:this._getTRTCVideoProfile((null===(n=t.camera)||void 0===n?void 0:n.resolution)||d,(null===(s=t.camera)||void 0===s?void 0:s.fps)||15),videoTrack:null===(a=t.camera)||void 0===a?void 0:a.videoTrack,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kText:return c(c({id:t.id},t.text||{}),{layout:this._getTRTCLayout(t)});case e.TRTCMediaSourceType.kImage:return{id:t.id,url:null===(u=t.image)||void 0===u?void 0:u.url,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kVideo:return{id:t.id,url:null===(l=t.video)||void 0===l?void 0:l.url,layout:this._getTRTCLayout(t)};default:return null}},t.prototype._getCanvasSize=function(t,i){var o,r,n=((o={})[e.TRTCVideoResolution.TRTCVideoResolution_480_270]={width:480,height:270},o[e.TRTCVideoResolution.TRTCVideoResolution_640_360]={width:640,height:360},o[e.TRTCVideoResolution.TRTCVideoResolution_960_540]={width:960,height:540},o[e.TRTCVideoResolution.TRTCVideoResolution_1280_720]={width:1280,height:720},o[e.TRTCVideoResolution.TRTCVideoResolution_1920_1080]={width:1920,height:1080},o)[t],s=n.width,a=n.height;return i===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait&&(s=(r=[a,s])[0],a=r[1]),{width:s,height:a}},t.prototype.addMediaSource=function(e){var t;return u(this,void 0,Promise,(function(){var i,o,r,n,s;return l(this,(function(a){switch(a.label){case 0:if(this.logger.log("".concat(this.logPrefix,"addMediaSource:"),e),-1!==this.findMediaSourceIndex(e))throw new Error("Media source already existed");if(i=Re(e),o=this._getTRTCSourceKey(i),!(r=this._getTRTCSourceItem(i))||!o)throw new Error("Invalid media source");return(n=Re(this.trtcSourceMap.get(o))||[]).push(r),[4,this.trtc.updatePlugin("VideoMixer",(s={},s[o]=n,s))];case 1:if(a.sent().result.failedDetails.find((function(t){return t.id===e.id})))throw new Error("Failed to add media source");return i.isSelected&&(this.unselectMediaSource(this.selectedSource),this.selectedSource=e),this.trtcSourceMap.set(o,n),null===(t=this.mediaMixingDesigner)||void 0===t||t.addMedia({id:i.id,rect:this._getDesignerMediaRect(e),isSelected:i.isSelected||!0,origin:i}),i.isSelected&&(this.selectedSource=i),this.sourceList.push(i),[2]}}))}))},t.prototype.removeMediaSource=function(e){var t,i,o;return u(this,void 0,Promise,(function(){var r,n,s,a,c;return l(this,(function(u){switch(u.label){case 0:if(this.logger.log("".concat(this.logPrefix,"removeMediaSource:"),e),-1===(r=this.findMediaSourceIndex(e)))throw new Error("Not existing media source to remove");return n=this._getTRTCSourceKey(e),s=Re(this.trtcSourceMap.get(n))||[],a=s.findIndex((function(t){return t.id===e.id})),s.splice(a,1),[4,this.trtc.updatePlugin("VideoMixer",(c={},c[n]=s,c))];case 1:if(u.sent().result.failedDetails.find((function(t){return t.id===e.id})))throw new Error("Failed to remove media source");return null===(t=this.mediaMixingDesigner)||void 0===t||t.removeMedia({id:e.id,rect:null===(i=e.layout)||void 0===i?void 0:i.rect,isSelected:e.isSelected||!1,origin:Re(e)}),(null===(o=this.selectedSource)||void 0===o?void 0:o.id)===e.id&&(this.selectedSource=null),this.trtcSourceMap.set(n,s),this.sourceList.splice(r,1),[2]}}))}))},t.prototype._getDesignerMediaRect=function(t){var i,o,r=(null===(i=t.layout)||void 0===i?void 0:i.rect)||{left:0,top:0,right:0,bottom:0},n=r.left,s=r.top,a=r.right,c=r.bottom,u=a-n,l=c-s;switch(null===(o=t.layout)||void 0===o?void 0:o.rotation){case e.TRTCVideoRotation.TRTCVideoRotation0:case e.TRTCVideoRotation.TRTCVideoRotation180:return{left:n,top:s,right:a,bottom:c};case e.TRTCVideoRotation.TRTCVideoRotation90:case e.TRTCVideoRotation.TRTCVideoRotation270:return{left:n,top:s,right:n+l,bottom:s+u};default:return{left:n,top:s,right:a,bottom:c}}},t.prototype._getPluginMediaRect=function(t){var i,o,r=(null===(i=t.layout)||void 0===i?void 0:i.rect)||{left:0,top:0,right:0,bottom:0},n=r.left,s=r.top,a=r.right,c=r.bottom;switch(null===(o=t.layout)||void 0===o?void 0:o.rotation){case e.TRTCVideoRotation.TRTCVideoRotation0:case e.TRTCVideoRotation.TRTCVideoRotation180:return{left:n,top:s,right:a,bottom:c};case e.TRTCVideoRotation.TRTCVideoRotation90:case e.TRTCVideoRotation.TRTCVideoRotation270:return{left:n,top:s,right:n+(c-s),bottom:s+(a-n)};default:return{left:n,top:s,right:a,bottom:c}}},t.prototype.updateMediaSource=function(e){var t,i;return u(this,void 0,Promise,(function(){var o,r,n,s,a,u,d,h;return l(this,(function(l){switch(l.label){case 0:if(this.logger.log("".concat(this.logPrefix,"updateMediaSource:"),e),-1===(o=this.findMediaSourceIndex(e)))throw new Error("Not existing media source to update");return r=c(c({},this.sourceList[o]),Re(e)),e.isSelected?(this.unselectMediaSource(this.selectedSource),this.selectedSource=e):(null===(t=this.selectedSource)||void 0===t?void 0:t.id)===e.id&&(this.selectedSource=null),n=this._getTRTCSourceKey(r),s=this._getTRTCSourceItem(r),a=Re(this.trtcSourceMap.get(n))||[],u=a.findIndex((function(t){return t.id===e.id})),a[u]=s,[4,this.trtc.updatePlugin("VideoMixer",(h={},h[n]=a,h))];case 1:if(l.sent().result.failedDetails.find((function(t){return t.id===e.id})))throw new Error("Failed to update media source");return d={id:e.id,rect:this._getDesignerMediaRect(e),isSelected:e.isSelected||!1,origin:Re(e)},this.logger.log("".concat(this.logPrefix,"updateParams:"),JSON.stringify(d)),null===(i=this.mediaMixingDesigner)||void 0===i||i.updateMedia(d),this.trtcSourceMap.set(n,a),this.sourceList[o]=r,[2]}}))}))},t.prototype.startPublish=function(){return u(this,void 0,Promise,(function(){return l(this,(function(t){switch(t.label){case 0:return this.logger.log("".concat(this.logPrefix," startPublish")),[4,this.trtcCloud.setLocalRenderParams({rotation:e.TRTCVideoRotation.TRTCVideoRotation0,fillMode:e.TRTCVideoFillMode.TRTCVideoFillMode_Fit,mirrorType:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable})];case 1:return t.sent(),[4,this.trtcCloud._startPublishVideoTrack({videoTrack:this.mixVideoTrack})];case 2:return t.sent(),[2]}}))}))},t.prototype.stopPublish=function(){return u(this,void 0,Promise,(function(){return l(this,(function(e){switch(e.label){case 0:return this.logger.log("".concat(this.logPrefix," stopPublish")),[4,this.trtcCloud._stopPublishVideoTrack()];case 1:return e.sent(),[2]}}))}))},t.prototype.updatePublishParams=function(e){var t,i,o,r,n;return u(this,void 0,Promise,(function(){var a,c,u,d,h,T,f,v,g,m,R,C,y,_,S,b,M,w,V,E,A,P,L,I;return l(this,(function(l){switch(l.label){case 0:this.logger.log("".concat(this.logPrefix,"updatePublishParams:"),e),a=this.publishParams,this.publishParams=e,c=this._getCanvasSize(e.videoEncoderParams.videoResolution,e.videoEncoderParams.resMode),u=c.width,d=c.height,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.trtc.updatePlugin("VideoMixer",{canvasInfo:{width:u,height:d,canvasColor:String(e.canvasColor)}})];case 2:return l.sent(),[3,4];case 3:if((h=l.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw h;return[3,4];case 4:null===(o=this.mediaMixingDesigner)||void 0===o||o.updateOptions({videoResolution:this.publishParams.videoEncoderParams.videoResolution,resMode:this.publishParams.videoEncoderParams.resMode}),l.label=5;case 5:l.trys.push([5,11,12,17]),T=p(this.sourceList),l.label=6;case 6:return[4,T.next()];case 7:return(f=l.sent()).done?[3,10]:(v=f.value).layout?(g=v.layout.rect||{left:0,top:0,right:0,bottom:0},m=g.left,R=g.top,C=g.right,y=g.bottom,_=this._getCanvasSize(a.videoEncoderParams.videoResolution),S=_.width,b=_.height,M=this._getCanvasSize(e.videoEncoderParams.videoResolution),w=M.width,V=M.height,E=m*w/S,A=R*V/b,P=C*w/S,L=y*V/b,v.layout.rect={left:E,top:A,right:P,bottom:L},[4,this.updateMediaSource(v)]):[3,9];case 8:l.sent(),null===(r=this.eventEmitter)||void 0===r||r.emit("onSourceResized",v,null===(n=v.layout)||void 0===n?void 0:n.rect),l.label=9;case 9:return[3,6];case 10:return[3,17];case 11:return I=l.sent(),t={error:I},[3,17];case 12:return l.trys.push([12,,15,16]),f&&!f.done&&(i=T.return)?[4,i.call(T)]:[3,14];case 13:l.sent(),l.label=14;case 14:return[3,16];case 15:if(t)throw t.error;return[7];case 16:return[7];case 17:return[4,this.trtcCloud.setVideoEncoderParam(e.videoEncoderParams)];case 18:return l.sent(),[2]}}))}))},t.prototype.on=function(e,t){var i;null===(i=this.eventEmitter)||void 0===i||i.on(e,t)},t.prototype.off=function(e,t){var i;null===(i=this.eventEmitter)||void 0===i||i.off(e,t)},t.prototype.onVisibilityChange=function(){this.logger.log("".concat(this.logPrefix,"onVisibilityChange document.hidden:").concat(document.hidden)),document.hidden?this.bindPreviewArea(null):this.bindPreviewArea(this.view)},t.prototype.createDesigner=function(){var t,i;this.view&&(this.mediaMixingDesigner=new Qn({view:this.view,videoResolution:(null===(t=this.publishParams)||void 0===t?void 0:t.videoEncoderParams.videoResolution)||e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,resMode:(null===(i=this.publishParams)||void 0===i?void 0:i.videoEncoderParams.resMode)||e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape,canExceedContainer:!0,logger:this.logger}),this.listenDesignerEvent())},t.prototype.destroyDesigner=function(){var e;this.mediaMixingDesigner&&(this.unlistenDesignerEvent(),null===(e=this.mediaMixingDesigner)||void 0===e||e.destroy(),this.mediaMixingDesigner=null)},t.prototype.listenDesignerEvent=function(){var e,t,i,o,r;null===(e=this.mediaMixingDesigner)||void 0===e||e.on("onError",this.onError),null===(t=this.mediaMixingDesigner)||void 0===t||t.on("onSourceSelected",this.onSourceSelected),null===(i=this.mediaMixingDesigner)||void 0===i||i.on("onSourceMoved",this.onSourceMoved),null===(o=this.mediaMixingDesigner)||void 0===o||o.on("onSourceResized",this.onSourceResized),null===(r=this.mediaMixingDesigner)||void 0===r||r.on("onRightButtonClicked",this.onRightButtonClicked)},t.prototype.unlistenDesignerEvent=function(){var e,t,i,o,r;null===(e=this.mediaMixingDesigner)||void 0===e||e.off("onError",this.onError),null===(t=this.mediaMixingDesigner)||void 0===t||t.off("onSourceSelected",this.onSourceSelected),null===(i=this.mediaMixingDesigner)||void 0===i||i.off("onSourceMoved",this.onSourceMoved),null===(o=this.mediaMixingDesigner)||void 0===o||o.off("onSourceResized",this.onSourceResized),null===(r=this.mediaMixingDesigner)||void 0===r||r.off("onRightButtonClicked",this.onRightButtonClicked)},t.prototype.onError=function(e,t){this.logger.log("".concat(this.logPrefix,"onError:"),e,t)},t.prototype.onSourceSelected=function(e){var t;return u(this,void 0,void 0,(function(){return l(this,(function(i){switch(i.label){case 0:return this.logger.debug("".concat(this.logPrefix,"onSourceSelected: "),e,this.selectedSource),e&&this.selectedSource&&e.origin.id===this.selectedSource.id?[2]:(null==e?void 0:e.origin)?(this.updateMediaSource(c(c({},e.origin),{isSelected:!0})),[3,3]):[3,1];case 1:return this.selectedSource?[4,this.updateMediaSource(c(c({},this.selectedSource),{isSelected:!1}))]:[3,3];case 2:i.sent(),this.selectedSource=null,i.label=3;case 3:return null===(t=this.eventEmitter)||void 0===t||t.emit("onSourceSelected",e?e.origin:null),[2]}}))}))},t.prototype.onSourceMoved=function(e,t){var i,o;if(this.logger.debug("".concat(this.logPrefix,"onSourceMoved:"),e,t),null==e?void 0:e.origin){var r=c(c({},e.origin),{layout:c(c({},e.origin.layout),{rect:t})});this.updateMediaSource(me(r,{layout:{rect:this._getPluginMediaRect(r)}})),(null===(i=this.selectedSource)||void 0===i?void 0:i.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id}))),null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceMoved",e.origin,this._getPluginMediaRect(r))}},t.prototype.onSourceResized=function(e,t){var i,o;if(this.logger.debug("".concat(this.logPrefix,"onSourceResized:"),e,t),null==e?void 0:e.origin){var r=c(c({},e.origin),{layout:c(c({},e.origin.layout),{rect:t})});this.updateMediaSource(me(r,{layout:{rect:this._getPluginMediaRect(r)}})),(null===(i=this.selectedSource)||void 0===i?void 0:i.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id})))}null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceResized",e.origin,t)},t.prototype.onRightButtonClicked=function(e){var t;this.logger.debug("".concat(this.logPrefix,"onRightButtonClicked:"),e),null===(t=this.eventEmitter)||void 0===t||t.emit("onRightButtonClicked",e.origin)},t.prototype.isSameMediaSource=function(e,t){return e.id===t.id},t.prototype.isMediaSourceExisted=function(e){var t=this;return this.sourceList.some((function(i){return t.isSameMediaSource(i,e)}))},t.prototype.findMediaSourceIndex=function(e){return this.sourceList.findIndex((function(t){return t.id===e.id}))},t.prototype.unselectMediaSource=function(e){var t,i;return u(this,void 0,Promise,(function(){var o;return l(this,(function(r){return e?(-1!==(o=this.findMediaSourceIndex(e))&&(this.sourceList[o].isSelected=!1),null===(t=this.mediaMixingDesigner)||void 0===t||t.updateMedia({id:e.id,rect:null===(i=e.layout)||void 0===i?void 0:i.rect,isSelected:!1,origin:Re(e)}),[2]):[2]}))}))},t.mediaMixingManager=null,t}(),Wn=s.default._loggerManager;Wn.info("TRTCCloud Version: ".concat(bn));var jn,Un,Yn,Gn="trtcCloud",Kn=1;navigator&&navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",(jn=function(){0!==qn.size&&Array.from(qn.values()).forEach((function(e){e.fn()}))},Un=30,function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];Yn>0&&clearTimeout(Yn),Yn=window.setTimeout((function(){jn.apply(e,t),Yn=-1}),Un)}));var qn=new Map,Xn=function(t){function n(i){void 0===i&&(i={});var o=t.call(this)||this;o._version="",o._frameWorkType=30,o._component=0,o._language=0,o._networkProxy={},o._localView=null,o._autoRecvAudio=!0,o._autoRecvVideo=!1,o._localTestView=null,o._isVideoPublish=!0,o._localRenderParams={rotation:e.TRTCVideoRotation.TRTCVideoRotation0,fillMode:e.TRTCVideoFillMode.TRTCVideoFillMode_Fill,mirrorType:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto},o._encoderMirror=void 0,o._videoProfile={},o._isAudioPublish=!0,o._audioProfile=s.default.TYPE.AUDIO_PROFILE_STANDARD,o._captureVolume=100,o._playoutVolume=100,o._isSharingScreen=!1,o._remoteStreamConfig=new Map,o._remoteStreamMap=new Map,o._cameraList=[],o._microphoneList=[],o._speakerList=[],o._currentCamera={},o._currentMicrophone={},o._currentSpeaker={},o._currentCameraId="",o._currentMicrophoneId="",o._currentSpeakerId="",o._screenShareParams={option:{}},o._isMobile=Fr,o._isFrontCamera=!0,o._cameraVideoTrack=null,o._smallStreamVideoProfile=void 0,o._qosPreference=void 0,o._defaultVideoProfile={width:640,height:480,frameRate:15,bitrate:900},o._defaultScreenProfile={width:1920,height:1080,frameRate:15,bitrate:1500},o._defaultSmallVideoProfile={width:160,height:120,frameRate:15,bitrate:200},o._isVirtualBackground=!1,o._isTestVirtualBackground=!1,o._isBeautyEnabled=!1,o._isTestBeautyEnabled=!1,o._remoteStatisticsUserIdList=[],o._hasJoinedRoom=!1,o._isExitingRoom=!1,o._version=bn;var a=i.frameWorkType,c=void 0===a?30:a,u=i.component,l=void 0===u?0:u,d=i.language,h=void 0===d?0:d;return o._frameWorkType=c,o._component=l,o._language=h,o._trtc=s.default.create({enableSEI:n.enableSEI,assetsPath:n.assetsPath,plugins:[r.VideoMixer]}),o._testTrtc=s.default.create(),o._log=s.default._loggerManager,o.logger=new wn(Wn,{seq:Kn++}),o._echoCancellation=void 0,o._noiseSuppression=void 0,o._autoGainControl=void 0,o._addTRTCEvents(),o.handleDeviceChange=o.handleDeviceChange.bind(o),qn.set(o,{fn:o.handleDeviceChange,self:o}),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(n,t),n.getTRTCShareInstance=function(e){return n.shareInstance||(n.shareInstance=new n(e)),n.shareInstance},n.setLogLevel=function(t,i){var o,r=((o={})[e.TRTCLogLevel.TRTCLogLevelVerbose]=0,o[e.TRTCLogLevel.TRTCLogLevelDebug]=1,o[e.TRTCLogLevel.TRTCLogLevelInfo]=2,o[e.TRTCLogLevel.TRTCLogLevelWarn]=3,o[e.TRTCLogLevel.TRTCLogLevelError]=4,o[e.TRTCLogLevel.TRTCLogLevelFatal]=4,o[e.TRTCLogLevel.TRTCLogLevelNone]=5,o),n=r[t];pe(n)&&(n=r[e.TRTCLogLevel.TRTCLogLevelInfo]);var a=!fe(i)||i;s.default.setLogLevel(n,a)},n.destroyTRTCShareInstance=function(){n.shareInstance&&(n.shareInstance._destroy(),n.shareInstance=null),Array.from(n.subCloudMap.keys()).forEach((function(e){return e._destroy()}))},n.callExperimentalAPI=function(e){console.log("static ".concat(Gn,".callExperimentalAPI"),e);var t=ve(e);if(t!==e){var i=t.api,o=t.params;if(i&&o)try{switch(i){case"enableSEI":n.enableSEI=o.enable;break;case"setAssetsPath":n.assetsPath=o.assetsPath}}catch(r){throw r}}},n.prototype.createSubCloud=function(){if(this!==n.shareInstance)return null;var e=new n;return this._inheritPropertiesToSubCloud(e),this._inheritEventsToSubCloud(e),n.subCloudMap.set(e,e),e},n.prototype.destroy=function(){this!==n.shareInstance?(n.subCloudMap.get(this)&&n.subCloudMap.delete(this),this._destroy()):n.destroyTRTCShareInstance()},n.prototype._destroy=function(){qn.delete(this),this.removeAllListeners(),this._trtc.off("*"),this._trtc.destroy(),this._trtc=null,this._testTrtc.off("*"),this._testTrtc.destroy(),this._testTrtc=null},n.prototype.getSDKVersion=function(){return this._version||""},n.prototype.enterRoom=function(e,t){return u(this,void 0,Promise,(function(){var i,o,r,n,s,a,u,d,h,p,T,f,v,g,m,R,C,y;return l(this,(function(l){switch(l.label){case 0:if(i=e.sdkAppId,o=e.userId,r=e.userSig,n=e.roomId,s=e.strRoomId,a=e.role,u=e.privateMapKey,d=e.businessInfo,h=e.enableAutoPlayDialog,p=e.proxy,T=e.streamId,f=e.userDefineRecordId,this.logger.update({sdkAppId:i,userId:o}),this.logger.info("".concat(Gn,".enterRoom with params: "),e,t),p&&(this._networkProxy=p),!(i&&o&&r))return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),v={sdkAppId:i,userId:o,userSig:r,roomId:n,strRoomId:s,role:ue[a],scene:le[t],autoReceiveAudio:this._autoRecvAudio,autoReceiveVideo:this._autoRecvVideo,frameWorkType:this._frameWorkType,component:this._component,language:this._language},v=u?c(c({},v),{privateMapKey:u}):v,v=d?c(c({},v),{businessInfo:d}):v,g=h||this._enableAutoPlayDialog,v=fe(g)?c(c({},v),{enableAutoPlayDialog:g}):v,v=this._networkProxy?c(c({},v),{proxy:this._networkProxy}):v,v=T?c(c({},v),{streamId:T}):v,v=f?c(c({},v),{userDefineRecordId:f}):v,v=void 0!==this._latencyLevel?c(c({},v),{latencyLevel:this._latencyLevel}):v,m=he(),[4,this._trtc.enterRoom(v)];case 2:return l.sent(),this._hasJoinedRoom=!0,R=he()-m,this.emit("onEnterRoom",R),[3,4];case 3:return C=l.sent(),y=(y=this._transformTRTCErrorCode(C,"enterRoom"))<0?y:-1,this.emit("onEnterRoom",y),this._callFunctionErrorManage(C,"enterRoom"),[3,4];case 4:return[3,6];case 5:this._emitError(_n),l.label=6;case 6:return[2]}}))}))},n.prototype.exitRoom=function(){return u(this,void 0,Promise,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.logger.info("".concat(Gn,".exitRoom")),this._isExitingRoom=!0,this._isSharingScreen&&this.stopScreenShare(),this.resetTRTCCloud(),this.stopLocalPreview(),this.stopLocalAudio(),[4,this._trtc.exitRoom()];case 1:return t.sent(),this._hasJoinedRoom=!1,this._isExitingRoom=!1,this.emit("onExitRoom",sn.exitRoom),[3,3];case 2:return e=t.sent(),this._callFunctionErrorManage(e,"exitRoom"),[3,3];case 3:return[2]}}))}))},n.prototype.switchRole=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".switchRole with param: "),e),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.switchRole(ue[e])];case 2:return i.sent(),this.emit("onSwitchRole",0,"switch role success, role = ".concat(e,", ").concat(ue[e])),[3,4];case 3:return t=i.sent(),this.emit("onSwitchRole",null==t?void 0:t.getCode(),t.message),[3,4];case 4:return[2]}}))}))},n.prototype.setDefaultStreamRecvMode=function(e,t){return u(this,void 0,void 0,(function(){return l(this,(function(i){return this.logger.info("".concat(Gn,".setDefaultStreamRecvMode with param: "),{autoRecvAudio:e,autoRecvVideo:t}),fe(e)&&(this._autoRecvAudio=e),fe(t)&&(this._autoRecvVideo=t),[2]}))}))},n.prototype.resetTRTCCloud=function(){this._setIsAudioPublish(!0),this._echoCancellation=void 0,this._noiseSuppression=void 0,this._autoGainControl=void 0,this._isVirtualBackground=!1,this._isTestVirtualBackground=!1,this._remoteStatisticsUserIdList=[],this._resetBeautyStyle()},n.prototype._updateLocalVideo=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._trtc.updateLocalVideo(this._generateLocalVideoData())];case 1:return t.sent(),[3,3];case 2:if((e=t.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},n.prototype._updateLocalTestVideo=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._testTrtc.updateLocalVideo(this._generateLocalTestVideoData())];case 1:return t.sent(),[3,3];case 2:if((e=t.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},n.prototype._updateLocalScreen=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._trtc.updateScreenShare(this._getScreenShareParams())];case 1:return t.sent(),[3,3];case 2:if((e=t.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},n.prototype._updateRemoteVideo=function(e,t){return u(this,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._trtc.updateRemoteVideo(this._generateRemoteVideoData(e,t))];case 1:return o.sent(),[3,3];case 2:if((i=o.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw i;return[3,3];case 3:return[2]}}))}))},n.prototype.startLocalPreview=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(this,void 0,Promise,(function(){var t,i,o,r,n;return l(this,(function(a){switch(a.label){case 0:this.logger.info("".concat(Gn,".startLocalPreview with params: "),e),1===h([],e,!0).length?i=h([],e,!0)[0]:2===h([],e,!0).length&&(n=h([],e,!0),t=n[0],i=n[1]),pe(t)||(this._setIsMobile(!0),this._setIsFrontCamera(t)),this._setLocalView(i),a.label=1;case 1:a.trys.push([1,9,,10]),a.label=2;case 2:return a.trys.push([2,4,,8]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return a.sent(),[3,8];case 4:return(o=a.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateLocalVideo()];case 5:return a.sent(),[3,7];case 6:throw o;case 7:return[3,8];case 8:return this.emit("onCameraDidReady"),[3,10];case 9:return r=a.sent(),this._callFunctionErrorManage(r,"startLocalPreview"),[3,10];case 10:return[2]}}))}))},n.prototype.updateLocalView=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(Gn,".updateLocalView with param: "),e),this._setLocalView(e),[4,this._updateLocalVideo()];case 1:return t.sent(),[2]}}))}))},n.prototype.stopLocalPreview=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(Gn,".stopLocalPreview")),t.label=1;case 1:return t.trys.push([1,3,,4]),this._setLocalView(null),[4,this._trtc.stopLocalVideo()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),console.warn("".concat(Gn," stopLocalPreview error: ").concat(e)),this._callFunctionErrorManage(e,"stopLocalPreview"),[3,4];case 4:return[2]}}))}))},n.prototype.muteLocalVideo=function(e){return void 0===e&&(e=!1),u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".muteLocalVideo with params: "),e),i.label=1;case 1:return i.trys.push([1,3,,4]),this._setIsVideoPublish(!e),[4,this._updateLocalVideo()];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"muteLocalVideo"),[3,4];case 4:return[2]}}))}))},n.prototype.startRemoteView=function(t,i,o){return u(this,void 0,void 0,(function(){var r,n;return l(this,(function(a){switch(a.label){case 0:this.logger.info("".concat(Gn,".startRemoteView with params: "),t,i,o),a.label=1;case 1:if(a.trys.push([1,9,,10]),this._setRemoteStreamConfig(t,o,{view:i,small:o===e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall}),!this._remoteStreamMap.get("".concat(t,"_").concat(this._getTRTCStreamType(o))))return[2];a.label=2;case 2:return a.trys.push([2,4,,8]),[4,this._trtc.startRemoteVideo(this._generateRemoteVideoData(t,o))];case 3:return a.sent(),[3,8];case 4:return(r=a.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateRemoteVideo(t,o)];case 5:return a.sent(),[3,7];case 6:throw r;case 7:return[3,8];case 8:return[3,10];case 9:return n=a.sent(),this._callFunctionErrorManage(n,"startRemoteView"),[3,10];case 10:return[2]}}))}))},n.prototype.updateRemoteView=function(e,t,i){return u(this,void 0,void 0,(function(){return l(this,(function(o){switch(o.label){case 0:return this.logger.info("".concat(Gn,".updateRemoteView with params: "),e,t,i),this._setRemoteStreamConfig(e,i,{view:t}),this._remoteStreamMap.get("".concat(e,"_").concat(this._getTRTCStreamType(i)))?[4,this._updateRemoteVideo(e,i)]:[2];case 1:return o.sent(),[2]}}))}))},n.prototype.stopRemoteView=function(e,t){return u(this,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".stopRemoteView with params: "),e,t),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:e,streamType:this._getTRTCStreamType(t)})];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"stopRemoteView"),[3,4];case 4:return[2]}}))}))},n.prototype.stopAllRemoteView=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(Gn,".stopAllRemoteView")),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:"*"})];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this._callFunctionErrorManage(e,"stopAllRemoteView"),[3,4];case 4:return[2]}}))}))},n.prototype.setVideoEncoderParam=function(t){return u(this,void 0,void 0,(function(){var i,o;return l(this,(function(r){switch(r.label){case 0:this.logger.info("".concat(Gn,".setVideoEncoderParam with params: "),t),r.label=1;case 1:return r.trys.push([1,4,,5]),i=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,t),this._setVideoProfile(i),[4,this._updateLocalVideo()];case 2:return r.sent(),[4,this._updateLocalTestVideo()];case 3:return r.sent(),[3,5];case 4:return o=r.sent(),this._callFunctionErrorManage(o,"setVideoEncoderParam"),[3,5];case 5:return[2]}}))}))},n.prototype.setNetworkQosParam=function(e){return u(this,void 0,void 0,(function(){var t,i,o=this;return l(this,(function(r){return this.logger.info("".concat(Gn,".setNetworkQosParam with params: "),e),t=e.preference,i=this._getTRTCQosPreference(t),this._setQosPreference(i),this._setScreenShareParams({qosPreference:i}),[2,new Promise((function(e,t){Promise.all([o._updateLocalVideo(),o._updateLocalScreen()]).then((function(){e(!0)})).catch((function(e){o._callFunctionErrorManage(e,"setNetworkQosParam"),t(e)}))}))]}))}))},n.prototype.setLocalRenderParams=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".setLocalRenderParams with params: "),e),Object.assign(this._localRenderParams,e),i.label=1;case 1:return i.trys.push([1,4,,5]),[4,this._updateLocalVideo()];case 2:return i.sent(),[4,this._updateLocalTestVideo()];case 3:return i.sent(),[3,5];case 4:return t=i.sent(),this._callFunctionErrorManage(t,"setLocalRenderParams"),[3,5];case 5:return[2]}}))}))},n.prototype.setVideoEncoderMirror=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".setVideoEncoderMirror with params: "),e),this._encoderMirror=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._updateLocalVideo()];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"setVideoEncoderMirror"),[3,4];case 4:return[2]}}))}))},n.prototype.setRemoteRenderParams=function(e,t,i){return u(this,void 0,void 0,(function(){var o;return l(this,(function(r){switch(r.label){case 0:this.logger.info("".concat(Gn,".setRemoteRenderParams with params: "),e,t,i),r.label=1;case 1:return r.trys.push([1,3,,4]),this._setRemoteStreamConfig(e,t,i),[4,this._updateRemoteVideo(e,t)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this._callFunctionErrorManage(o,"setRemoteRenderParams"),[3,4];case 4:return[2]}}))}))},n.prototype._updateLocalAudio=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._trtc.updateLocalAudio(this._generateLocalAudioData())];case 1:return t.sent(),[3,3];case 2:if((e=t.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},n.prototype._updateLocalTestAudio=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this._testTrtc.updateLocalAudio(this._generateLocalTestAudioData())];case 1:return t.sent(),[3,3];case 2:if((e=t.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},n.prototype.startLocalAudio=function(t){return void 0===t&&(t=e.TRTCAudioQuality.TRTCAudioQualityDefault),u(this,void 0,void 0,(function(){var i,o,r;return l(this,(function(n){switch(n.label){case 0:t===e.TRTCAudioQuality.TRTCAudioQualitySpeech?this.logger.warn("Web trtcCloud not support audioQuality of TRTCAudioQualitySpeech, and will use TRTCAudioQualityDefault"):this.logger.info("".concat(Gn,".startLocalAudio with params: "),t),i=this._getTRTCAudioQuality(t),n.label=1;case 1:n.trys.push([1,9,,10]),this._setAudioProfile(i),n.label=2;case 2:return n.trys.push([2,4,,8]),[4,this._trtc.startLocalAudio(this._generateLocalAudioData())];case 3:return n.sent(),[3,8];case 4:return(o=n.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateLocalAudio()];case 5:return n.sent(),[3,7];case 6:throw o;case 7:return[3,8];case 8:return this.emit("onMicDidReady"),[3,10];case 9:return r=n.sent(),console.warn("".concat(Gn," startLocalAudio error: ").concat(r)),this._callFunctionErrorManage(r,"startLocalAudio"),[3,10];case 10:return[2]}}))}))},n.prototype.stopLocalAudio=function(){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(Gn,".stopLocalAudio")),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._trtc.stopLocalAudio()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),this._callFunctionErrorManage(e,"stopLocalAudio"),[3,4];case 4:return[2]}}))}))},n.prototype.muteLocalAudio=function(e){return void 0===e&&(e=!1),u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".muteLocalAudio with params: "),e),i.label=1;case 1:return i.trys.push([1,3,,4]),this._setIsAudioPublish(!e),[4,this._updateLocalAudio()];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"muteLocalAudio"),[3,4];case 4:return[2]}}))}))},n.prototype.setAudioCaptureVolume=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".setAudioCaptureVolume with params: "),e),i.label=1;case 1:return i.trys.push([1,3,,4]),this._setCaptureVolume(e),[4,this._updateLocalAudio()];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"setAudioCaptureVolume"),[3,4];case 4:return[2]}}))}))},n.prototype.getAudioCaptureVolume=function(){return this.logger.info("".concat(Gn,".getAudioCaptureVolume")),this._getCaptureVolume()},n.prototype.setAudioPlayoutVolume=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".setAudioPlayoutVolume with params: "),e),i.label=1;case 1:return i.trys.push([1,3,,4]),this._playoutVolume=e,[4,this._trtc.setRemoteAudioVolume("*",e)];case 2:return i.sent(),[3,4];case 3:return t=i.sent(),this._callFunctionErrorManage(t,"setAudioPlayoutVolume"),[3,4];case 4:return[2]}}))}))},n.prototype.getAudioPlayoutVolume=function(){return this.logger.info("".concat(Gn,".getAudioPlayoutVolume")),this._playoutVolume},n.prototype.muteRemoteAudio=function(e,t){return void 0===t&&(t=!1),u(this,void 0,void 0,(function(){var i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".muteRemoteAudio with params: "),e,t),o.label=1;case 1:return o.trys.push([1,3,,4]),e?[4,this._trtc.muteRemoteAudio(e,t)]:(this._emitError(_n),[2]);case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"muteRemoteAudio"),[3,4];case 4:return[2]}}))}))},n.prototype.muteAllRemoteAudio=function(e){this.logger.info("".concat(Gn,".muteAllRemoteAudio with params: "),e);try{this._trtc.muteRemoteAudio("*",e)}catch(t){this._callFunctionErrorManage(t,"muteAllRemoteAudio")}},n.prototype.muteAllRemoteVideoStreams=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".muteAllRemoteVideoStreams with params: "),e),i.label=1;case 1:return i.trys.push([1,6,,7]),e?[4,this._trtc.callExperimentalAPI("pauseRemotePlayer",{userId:"*"})]:[3,3];case 2:return i.sent(),[3,5];case 3:return[4,this._trtc.callExperimentalAPI("resumeRemotePlayer",{userId:"*"})];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:return t=i.sent(),this._callFunctionErrorManage(t,"muteAllRemoteVideoStreams"),[3,7];case 7:return[2]}}))}))},n.prototype.setRemoteAudioVolume=function(e,t){this.logger.info("".concat(Gn,".setRemoteAudioVolume with params: "),e,t);try{this._trtc.setRemoteAudioVolume(e,t)}catch(i){this._callFunctionErrorManage(i,"setRemoteAudioVolume")}},n.prototype.enableAudioVolumeEvaluation=function(e){this.logger.info("".concat(Gn,".enableAudioVolumeEvaluation with params: "),e);try{this._trtc.enableAudioVolumeEvaluation(e)}catch(t){this._callFunctionErrorManage(t,"enableAudioVolumeEvaluation")}},n.prototype.enableSmallVideoStream=function(t,i){return u(this,void 0,Promise,(function(){var o;return l(this,(function(r){switch(r.label){case 0:return this.logger.info("".concat(Gn,".enableSmallVideoStream with params: "),t,i),t?(o=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,i),this._setSmallStreamVideoProfile(o)):this._setSmallStreamVideoProfile(void 0),[4,this._updateLocalVideo()];case 1:return r.sent(),[2]}}))}))},n.prototype.snapshotVideo=function(t,i){var o="";return o=""===t&&i===e.TRTCVideoStreamType.TRTCVideoStreamTypeBig?this._trtc.getVideoSnapshot():""===t&&i===e.TRTCVideoStreamType.TRTCVideoStreamTypeSub?this._trtc.getVideoSnapshot({streamType:this._getTRTCStreamType(i)}):this._trtc.getVideoSnapshot({userId:t,streamType:this._getTRTCStreamType(i)}),this.emit("onSnapshotComplete",t,i,o),o},n.prototype.startScreenShare=function(t,i,o){return u(this,void 0,void 0,(function(){var r,n,a,c,u,d;return l(this,(function(l){switch(l.label){case 0:this.logger.info("".concat(Gn,".startScreenShare with params: "),t,i,o),l.label=1;case 1:return l.trys.push([1,3,,4]),n=(r=o||{}).screenAudio,a=void 0!==n&&n,c=r.videoTrack,u=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,o),this._setScreenShareParams({view:t,profile:u,systemAudio:a,videoTrack:c}),[4,this._trtc.startScreenShare(this._getScreenShareParams())];case 2:return l.sent(),this._isSharingScreen=!0,[3,4];case 3:if((d=l.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT)throw console.error("Start share screen error:",d,d.code,d.name,d.message),d;return[3,4];case 4:return[2]}}))}))},n.prototype.setSubStreamEncoderParam=function(t){return u(this,void 0,void 0,(function(){var i,o;return l(this,(function(r){switch(r.label){case 0:this.logger.info("".concat(Gn,".setSubStreamEncoderParam with params: "),t),i=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,t),this._setScreenShareParams({profile:i}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._updateLocalScreen()];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),this._callFunctionErrorManage(o,"setSubStreamEncoderParam"),[3,4];case 4:return[2]}}))}))},n.prototype.stopScreenShare=function(){return u(this,void 0,Promise,(function(){var e;return l(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(Gn,".stopScreenShare")),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this._trtc.stopScreenShare()];case 2:return t.sent(),this._clearScreenShareParams(),this._isSharingScreen=!1,this.emit("onScreenCaptureStopped",0),[3,4];case 3:return e=t.sent(),this._callFunctionErrorManage(e,"stopScreenShare"),[3,4];case 4:return[2]}}))}))},n.prototype._startPublishVideoTrack=function(e){var t=e.videoTrack;return u(this,void 0,void 0,(function(){var e;return l(this,(function(i){switch(i.label){case 0:this._cameraVideoTrack=t,i.label=1;case 1:i.trys.push([1,6,,7]),i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return i.sent(),[3,5];case 4:throw i.sent();case 5:return[3,7];case 6:return e=i.sent(),this._callFunctionErrorManage(e,"startPublishVideoTrack"),[3,7];case 7:return[2]}}))}))},n.prototype._stopPublishVideoTrack=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return this._cameraVideoTrack=null,[4,this._trtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},n.prototype.startScreenCapture=function(){this._emitError(Sn)},n.prototype.pauseScreenCapture=function(){this._emitError(Sn)},n.prototype.resumeScreenCapture=function(){this._emitError(Sn)},n.prototype.getScreenCaptureSources=function(){this._emitError(Sn)},n.prototype.selectScreenCaptureTarget=function(){this._emitError(Sn)},n.prototype.getCameraDevicesList=function(){return u(this,void 0,Promise,(function(){var e,t,i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".getCameraDevicesList")),o.label=1;case 1:return o.trys.push([1,5,,6]),[4,s.default.getCameraList()];case 2:return e=o.sent(),t=e.map((function(e){return c(c({},e),{deviceName:e.label})})),this._cameraList=e,"{}"!==JSON.stringify(this._currentCamera)?[3,4]:(this._currentCamera=this.getDefaultDeviceInfo(e),this._currentCameraId=this._currentCamera.deviceId,[4,this.setCurrentCameraDevice(this._currentCameraId)]);case 3:o.sent(),o.label=4;case 4:return[2,Promise.resolve(t)];case 5:return i=o.sent(),this._callFunctionErrorManage(i,"getCameraDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},n.prototype.setCurrentCameraDevice=function(e){var t;return u(this,void 0,Promise,(function(){var i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".setCurrentCameraDevice with params: "),{cameraId:e}),o.label=1;case 1:return o.trys.push([1,4,,5]),e?(this._currentCameraId=e,[4,this._updateLocalVideo()]):[2,!1];case 2:return o.sent(),[4,this._updateLocalTestVideo()];case 3:return o.sent(),this._currentCamera=this._cameraList.find((function(t){return t.deviceId===e}))||{},[3,5];case 4:throw i=o.sent(),this._currentCameraId=null===(t=this._currentCamera)||void 0===t?void 0:t.cameraId,this._callFunctionErrorManage(i,"setCurrentCameraDevice"),i;case 5:return[2]}}))}))},n.prototype.getCurrentCameraDevice=function(){this.logger.info("".concat(Gn,".getCurrentCameraDevice"));var e=this._currentCamera,t=e.deviceId,i=e.label,o=e.kind,r=e.groupId;return new V(t,i,o,i,r)},n.prototype.isFrontCamera=function(){return this._getIsFrontCamera()},n.prototype.switchCamera=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(Gn,".switchCamera with params: "),e),this._setIsFrontCamera(e),[4,this._updateLocalVideo()];case 1:return t.sent(),[2]}}))}))},n.prototype._onVirtualBackgroundError=function(e){this._emitError({code:-1006,message:e.message?e.message:"virtual background error"})},n.prototype.setVirtualBackground=function(e){return u(this,void 0,void 0,(function(){var t,i,o,r,n;return l(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),t=e.enable,i=e.type,o=e.blurLevel,r=e.imagePath,t?this._isVirtualBackground?i!==ae?[3,2]:[4,this._trtc.updatePlugin(ne,{type:i,blurLevel:o})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return i!==ce?[3,4]:[4,this._trtc.updatePlugin(ne,{type:i,src:r})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._trtc.startPlugin(ne,c(c({},e),{src:r,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:s.sent(),this._isVirtualBackground=!0,s.label=7;case 7:return[3,9];case 8:this._trtc.stopPlugin(ne),this._isVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw n=s.sent(),this.logger.error("".concat(Gn,".setVirtualBackground fail: "),n),n;case 11:return[2]}}))}))},n.prototype.setTestVirtualBackground=function(e){return u(this,void 0,void 0,(function(){var t,i,o,r,n;return l(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),t=e.enable,i=e.type,o=e.blurLevel,r=e.imagePath,t?this._isTestVirtualBackground?i!==ae?[3,2]:[4,this._testTrtc.updatePlugin(ne,{type:i,blurLevel:o})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return i!==ce?[3,4]:[4,this._testTrtc.updatePlugin(ne,{type:i,src:r})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._testTrtc.startPlugin(ne,c(c({},e),{src:r,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:s.sent(),this._isTestVirtualBackground=!0,s.label=7;case 7:return[3,9];case 8:this._testTrtc.stopPlugin(ne),this._isTestVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw n=s.sent(),this.logger.error("".concat(Gn,".setTestVirtualBackground fail: "),n),n;case 11:return[2]}}))}))},n.prototype.useVirtualBackground=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:i.VirtualBackground,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:i.VirtualBackground,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},n.prototype.setBeautyStyle=function(e,t,i,o){return u(this,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:return[4,this._handleBeautyStyleParam(this._trtc,this._isBeautyEnabled,e,t,i,o,!1)];case 1:return r.sent(),[2]}}))}))},n.prototype.setTestBeautyStyle=function(e,t,i,o){return u(this,void 0,void 0,(function(){return l(this,(function(r){switch(r.label){case 0:return[4,this._handleBeautyStyleParam(this._testTrtc,this._isTestBeautyEnabled,e,t,i,o,!0)];case 1:return r.sent(),[2]}}))}))},n.prototype.useBeautyStyle=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:o.BasicBeauty,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:o.BasicBeauty,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},n.prototype._handleBeautyStyleParam=function(e,t,i,o,r,n,s){return u(this,void 0,void 0,(function(){var i,a,c,u,d;return l(this,(function(l){switch(l.label){case 0:if(o<0||o>9)throw new Error("beautyLevel must be between 0 and 9");if(r<0||r>9)throw new Error("whitenessLevel must be between 0 and 9");if(n<0||n>9)throw new Error("ruddinessLevel must be between 0 and 9");l.label=1;case 1:return l.trys.push([1,8,,9]),a=r/9,c=n/9,0===(i=o/9)&&0===a&&0===c?[4,e.stopPlugin(se)]:[3,3];case 2:return l.sent(),s?this._isTestBeautyEnabled=!1:this._isBeautyEnabled=!1,[3,7];case 3:return u={beauty:i,brightness:a,ruddy:c},t?[3,5]:[4,e.startPlugin(se,u)];case 4:return l.sent(),s?this._isTestBeautyEnabled=!0:this._isBeautyEnabled=!0,[3,7];case 5:return[4,e.updatePlugin(se,u)];case 6:l.sent(),l.label=7;case 7:return[3,9];case 8:throw d=l.sent(),s?this.logger.error("".concat(Gn,".").concat("setTestBeautyStyle"," fail: "),d):this.logger.error("".concat(Gn,".").concat("setBeautyStyle"," fail: "),d),d;case 9:return[2]}}))}))},n.prototype._resetBeautyStyle=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return this._isBeautyEnabled?[4,this._trtc.stopPlugin(se)]:[3,2];case 1:e.sent(),this._isBeautyEnabled=!1,e.label=2;case 2:return this._isTestBeautyEnabled?[4,this._testTrtc.stopPlugin(se)]:[3,4];case 3:e.sent(),this._isTestBeautyEnabled=!1,e.label=4;case 4:return[2]}}))}))},n.prototype.getMicDevicesList=function(){return u(this,void 0,Promise,(function(){var e,t,i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".getMicDevicesList")),o.label=1;case 1:return o.trys.push([1,5,,6]),[4,s.default.getMicrophoneList()];case 2:return e=o.sent(),t=e.map((function(e){return c(c({},e),{deviceName:e.label})})),this._microphoneList=e,"{}"!==JSON.stringify(this._currentMicrophone)?[3,4]:(this._currentMicrophone=this.getDefaultDeviceInfo(e),this._currentMicrophoneId=this._currentMicrophone.deviceId,[4,this.setCurrentMicDevice(this._currentMicrophoneId)]);case 3:o.sent(),o.label=4;case 4:return[2,Promise.resolve(t)];case 5:return i=o.sent(),this._callFunctionErrorManage(i,"getMicDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},n.prototype.setCurrentMicDevice=function(e){var t;return u(this,void 0,Promise,(function(){var i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".setCurrentMicDevice with params: "),{micId:e}),o.label=1;case 1:return o.trys.push([1,4,,5]),e?(this._setCurrentMicrophoneId(e),[4,this._updateLocalAudio()]):[2,!1];case 2:return o.sent(),[4,this._updateLocalTestAudio()];case 3:return o.sent(),this._currentMicrophone=this._microphoneList.find((function(t){return t.deviceId===e}))||{},[3,5];case 4:throw i=o.sent(),this._setCurrentMicrophoneId(null===(t=this._currentMicrophone)||void 0===t?void 0:t.deviceId),this._callFunctionErrorManage(i,"setCurrentMicDevice"),i;case 5:return[2]}}))}))},n.prototype.getCurrentMicDevice=function(){this.logger.info("".concat(Gn,".getCurrentMicDevice"));var e=this._currentMicrophone,t=e.deviceId,i=e.label,o=e.kind,r=e.groupId;return new V(t,i,o,i,r)},n.prototype.getSpeakerDevicesList=function(){return u(this,void 0,Promise,(function(){var e,t,i;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".getSpeakerDevicesList")),o.label=1;case 1:return o.trys.push([1,5,,6]),[4,s.default.getSpeakerList()];case 2:return e=o.sent(),t=e.map((function(e){return c(c({},e),{deviceName:e.label})})),this._speakerList=e,"{}"!==JSON.stringify(this._currentSpeaker)?[3,4]:(this._currentSpeaker=this.getDefaultDeviceInfo(e),this._currentSpeakerId=this._currentSpeaker.deviceId,[4,this.setCurrentSpeakerDevice(this._currentSpeakerId)]);case 3:o.sent(),o.label=4;case 4:return[2,Promise.resolve(t)];case 5:return i=o.sent(),this._callFunctionErrorManage(i,"getSpeakerDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},n.prototype.setCurrentSpeakerDevice=function(e){return u(this,void 0,Promise,(function(){var t;return l(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(Gn,".setCurrentSpeakerDevice with params: "),{speakerId:e}),i.label=1;case 1:return i.trys.push([1,3,,4]),e?[4,s.default.setCurrentSpeaker(e)]:[2,!1];case 2:return i.sent(),this._setCurrentSpeakerId(e),this._currentSpeaker=this._speakerList.find((function(t){return t.deviceId===e}))||{},[3,4];case 3:throw t=i.sent(),this._callFunctionErrorManage(t,"setCurrentSpeakerDevice"),t;case 4:return[2]}}))}))},n.prototype.getCurrentSpeakerDevice=function(){this.logger.info("".concat(Gn,".getCurrentSpeakerDevice"));var e=this._currentSpeaker,t=e.deviceId,i=e.label,o=e.kind,r=e.groupId;return new V(t,i,o,i,r)},n.prototype.startCameraDeviceTest=function(e){return u(this,void 0,void 0,(function(){var t;return l(this,(function(i){switch(i.label){case 0:if(this.logger.info("".concat(Gn,".startCameraDeviceTest with params: "),e),!e)return[2];this._setLocalTestView(e),i.label=1;case 1:return i.trys.push([1,3,,7]),[4,this._testTrtc.startLocalVideo(this._generateLocalTestVideoData())];case 2:return i.sent(),[3,7];case 3:return(t=i.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestVideo()];case 4:return i.sent(),[3,6];case 5:throw this._callFunctionErrorManage(t,"startCameraDeviceTest"),t;case 6:return[3,7];case 7:return[2]}}))}))},n.prototype.stopCameraDeviceTest=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(Gn,".stopCameraDeviceTest")),this._setLocalTestView(null),[4,this._testTrtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},n.prototype.startMicDeviceTest=function(e){return u(this,void 0,void 0,(function(){var t,i=this;return l(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(Gn,".startMicDeviceTest with params: "),e),o.label=1;case 1:return o.trys.push([1,3,,7]),[4,this._testTrtc.startLocalAudio(this._generateLocalTestAudioData())];case 2:return o.sent(),[3,7];case 3:return(t=o.sent()).code!==s.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestAudio()];case 4:return o.sent(),[3,6];case 5:throw this._callFunctionErrorManage(t,"startMicDeviceTest"),t;case 6:return[3,7];case 7:return this._testTrtc.on(s.default.EVENT.AUDIO_VOLUME,(function(e){null==e||e.result.forEach((function(e){var t=e.userId,o=e.volume;""===t&&i.emit("onTestMicVolume",o)}))})),[4,this._testTrtc.enableAudioVolumeEvaluation(e)];case 8:return o.sent(),[2]}}))}))},n.prototype.stopMicDeviceTest=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(Gn,".stopMicDeviceTest")),[4,this._testTrtc.stopLocalAudio()];case 1:return e.sent(),[2]}}))}))},n.prototype.callExperimentalAPI=function(e){return u(this,void 0,void 0,(function(){var t,i,o;return l(this,(function(r){switch(r.label){case 0:if(this.logger.info("".concat(Gn,".callExperimentalAPI"),e),(t=ve(e))===e)return[2];if(i=t.api,o=t.params,!i||!o)return[2];r.label=1;case 1:switch(r.trys.push([1,20,,21]),i){case"setFramework":return[3,2];case"enableAudioAEC":return[3,3];case"enableAudioANS":return[3,4];case"enableAudioAGC":return[3,5];case"KeyMetricsStats":return[3,6];case"setNetworkProxy":return[3,7];case"enableVirtualBackground":return[3,8];case"enableTestVirtualBackground":return[3,10];case"enableTestBeautyStyle":return[3,12];case"setVideoEncodeParamEx":return[3,14];case"enableAutoPlayDialog":return[3,15];case"setAudienceLatencyLevel":return[3,16];case"switchPlaybackQuality":return[3,17]}return[3,18];case 2:return this._handleSetFrameWork(o),[3,19];case 3:return this._echoCancellation=Boolean(o.enable),[3,19];case 4:return this._noiseSuppression=Boolean(o.enable),[3,19];case 5:return this._autoGainControl=Boolean(o.enable),[3,19];case 6:return this._handleKeyMetricsStats(o),[3,19];case 7:return this._networkProxy=o,[3,19];case 8:return[4,this.setVirtualBackground(o)];case 9:return r.sent(),[3,19];case 10:return[4,this.setTestVirtualBackground(o)];case 11:return r.sent(),[3,19];case 12:return[4,this.setTestBeautyStyle(o.style,o.beautyLevel,o.whitenessLevel,o.ruddinessLevel)];case 13:return r.sent(),[3,19];case 14:return this._setVideoEncodeParamEx(o),[3,19];case 15:return this._enableAutoPlayDialog=Boolean(o.enable),[3,19];case 16:return this._latencyLevel=o.latencyLevel,[3,19];case 17:return this._switchPlaybackQuality(o),[3,19];case 18:return[3,19];case 19:return[3,21];case 20:throw r.sent();case 21:return[2]}}))}))},n.prototype._handleSetFrameWork=function(e){var t=e.frameWork,i=e.component,o=e.language;Te(t)&&(this._frameWorkType=t),Te(i)&&(this._component=i),Te(o)&&(this._language=o)},n.prototype._handleKeyMetricsStats=function(e){var t=e.key,i=e.opt,o=e.value,r=e.version,n=i===de;s.default._addKVStat({type:i,key:t,value:o,version:r,useUV:n,base:100})},n.prototype._setVideoEncodeParamEx=function(t){return u(this,void 0,void 0,(function(){return l(this,(function(i){switch(i.label){case 0:switch(t.streamType){case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:return[3,1];case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:return[3,3]}return[3,5];case 1:return[4,this.setVideoEncoderParam(t)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,this.setSubStreamEncoderParam(t)];case 5:return[3,6];case 6:return[2]}}))}))},n.prototype._switchPlaybackQuality=function(t){return u(this,void 0,void 0,(function(){var i,o,r,n,s,a,c,u=this;return l(this,(function(l){switch(l.label){case 0:return o=(i=t||{}).quality,r=i.stream_list,n=void 0===r?[]:r,o&&0!==n.length?(s=n.reduce((function(t,i){var r=u._remoteStreamConfig.get("".concat(i.user_id,"_").concat(u._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)));return r&&(t.originConfig=r),i.name===o&&(t.targetStream=i),t}),{targetStream:null,originConfig:null}),a=s.targetStream,(c=s.originConfig)&&(null==c?void 0:c.view)&&a.user_id?[4,this.setRemoteRenderParams(a.user_id,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,c.options)]:[2]):[2];case 1:return l.sent(),[4,this.startRemoteView(a.user_id,c.view,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 2:return l.sent(),[4,this.stopRemoteView(c.userId,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 3:return l.sent(),[4,this.muteRemoteAudio(c.userId,!0)];case 4:return l.sent(),[4,this.muteRemoteAudio(a.user_id,!1)];case 5:return l.sent(),this._remoteStreamConfig.delete("".concat(c.userId,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig))),[2]}}))}))},n.prototype._emitError=function(e){e&&this.emit&&this.emit(te,e.code,e.message)},n.prototype._emitWarning=function(e){this.emit&&this.emit(ie,e)},n.prototype._transformTRTCServerError=function(e){return-8===e.extraCode?yn:0===String(e.extraCode).indexOf("70")?0-e.extraCode:void 0},n.prototype._transformTRTCInvalidOperationError=function(e,t){return"enterRoom"!==t||5104!==e.extraCode&&5998!==e.code?e.code:hn},n.prototype._isCameraError=function(e){return["startLocalPreview","updateLocalView","muteLocalVideo","setVideoEncoderParam","setCurrentCameraDevice","switchCamera","setLocalRenderParams","enableSmallVideoStream","startCameraDeviceTest"].includes(e)},n.prototype._isMicError=function(e){return["startLocalAudio","muteLocalAudio","setAudioCaptureVolume","setCurrentMicDevice","startMicDeviceTest"].includes(e)},n.prototype._transformTRTCDeviceError=function(e,t){var i=this._isCameraError(t),o=this._isMicError(t);switch(e.extraCode){case 5301:case 5305:case 5306:case 5307:case 5308:case 5309:if(i)return pn;if(o)return gn;break;case 5302:if(i)return Tn;if(o)return mn;break;case 5303:if(i)return vn;if(o)return Cn;break;case 5304:if(i)return fn;if(o)return Rn}},n.prototype._transformTRTCUnKnowError=function(e,t){var i=this._isCameraError(t),o=this._isMicError(t);return i?pn:o?gn:e.code},n.prototype._transformTRTCErrorCode=function(e,t){var i=null==e?void 0:e.code;if(e&&e.code)switch(e.code){case s.default.ERROR_CODE.DEVICE_ERROR:i=this._transformTRTCDeviceError(e,t);break;case s.default.ERROR_CODE.SERVER_ERROR:i=this._transformTRTCServerError(e);break;case s.default.ERROR_CODE.INVALID_OPERATION:case s.default.ERROR_CODE.OPERATION_ABORT:i=this._transformTRTCInvalidOperationError(e,t);break;case s.default.ERROR_CODE.UNKNOWN_ERROR:i=this._transformTRTCUnKnowError(e,t)}return i},n.prototype._callFunctionErrorManage=function(e,t){if(!e||e.code!==s.default.ERROR_CODE.OPERATION_ABORT){this.logger.warn("(".concat(t,") failed - ").concat(e.code," - ").concat(e.message));var i=this._transformTRTCErrorCode(e,t);this.emit(te,i,e.message)}},n.prototype._getTRTCResolution=function(t){var i=(e.TRTCVideoResolution[t]||"").split("_");return{width:+(i.length>1&&i[1]),height:+(i.length>2&&i[2])}},n.prototype._getTRTCVideoProfile=function(t,i){void 0===i&&(i={});var o=i.videoWidth,r=i.videoHeight,n=i.videoResolution,s=i.videoFps,a=i.videoBitrate,c=i.resMode,u=i.resolutionMode,l={};switch(t){case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:l=this._defaultScreenProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall:l=this._defaultSmallVideoProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:default:l=this._defaultVideoProfile}if(pe(n))pe(o)||(l.width=o),pe(r)||(l.height=r);else{var d=this._getTRTCResolution(n);l.width=d.width,l.height=d.height}if(!pe(c)&&c===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait||!pe(u)&&u===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait){var h=l.height,p=l.width;l.width=h,l.height=p}return s&&(l.frameRate=s),a&&(l.bitrate=a),l},n.prototype._getTRTCStreamType=function(t){var i;return((i={})[e.TRTCVideoStreamType.TRTCVideoStreamTypeBig]=s.default.TYPE.STREAM_TYPE_MAIN,i[e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall]=s.default.TYPE.STREAM_TYPE_MAIN,i[e.TRTCVideoStreamType.TRTCVideoStreamTypeSub]=s.default.TYPE.STREAM_TYPE_SUB,i)[t]},n.prototype._getTRTCFillMode=function(t){var i;return((i={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]=nn.COVER,i[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]=nn.CONTAIN,i)[t]},n.prototype._getLocalRenderMirror=function(t){var i;return t===e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto?!this._getIsMobile()||this._getIsFrontCamera():((i={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,i[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,i)[t]},n.prototype._getTRTCLocalMirror=function(e,t){var i=this._getLocalRenderMirror(e);return pe(t)?!!i&&"both":i&&t?"both":i&&!t?"view":!i&&t?"publish":!(!i&&!t)&&"view"},n.prototype._getTRTCRemoteMirror=function(t){var i;return((i={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!1,i[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,i[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,i)[t]},n.prototype._getTRTCQosPreference=function(t){var i;return((i={})[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceSmooth]=s.default.TYPE.QOS_PREFERENCE_SMOOTH,i[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear]=s.default.TYPE.QOS_PREFERENCE_CLEAR,i)[t]},n.prototype._getTRTCAudioQuality=function(t){var i;return((i={})[e.TRTCAudioQuality.TRTCAudioQualitySpeech]=s.default.TYPE.AUDIO_PROFILE_STANDARD,i[e.TRTCAudioQuality.TRTCAudioQualityDefault]=s.default.TYPE.AUDIO_PROFILE_STANDARD,i[e.TRTCAudioQuality.TRTCAudioQualityMusic]=s.default.TYPE.AUDIO_PROFILE_HIGH_STEREO,i)[t]},n.prototype._getTRTCCloudDeviceType=function(t){return{camera:e.TRTCDeviceType.TRTCDeviceTypeCamera,microphone:e.TRTCDeviceType.TRTCDeviceTypeMic,speaker:e.TRTCDeviceType.TRTCDeviceTypeSpeaker}[t]},n.prototype._getTRTCCloudDeviceState=function(t){return{add:e.TRTCDeviceState.TRTCDeviceStateAdd,remove:e.TRTCDeviceState.TRTCDeviceStateRemove,active:e.TRTCDeviceState.TRTCDeviceStateActive}[t]},n.prototype._getTRTCCloudQuality=function(t){return[e.TRTCQuality.TRTCQuality_Unknown,e.TRTCQuality.TRTCQuality_Excellent,e.TRTCQuality.TRTCQuality_Good,e.TRTCQuality.TRTCQuality_Poor,e.TRTCQuality.TRTCQuality_Bad,e.TRTCQuality.TRTCQuality_Vbad,e.TRTCQuality.TRTCQuality_Down][t]},n.prototype._generateLocalVideoData=function(){var e={view:this._getLocalView(),publish:this._getIsVideoPublish(),option:{profile:this._getVideoProfile(),small:this._getSmallStreamVideoProfile()||!1,mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}};return this._cameraVideoTrack?e&&Object.assign(e.option,{videoTrack:this._cameraVideoTrack}):this._getIsMobile()?e&&Object.assign(e.option,{useFrontCamera:this._getIsFrontCamera()}):e&&Object.assign(e.option,{cameraId:this._getCurrentCameraId()}),this._getQosPreference()&&e&&Object.assign(e.option,{qosPreference:this._getQosPreference()}),e},n.prototype._generateLocalTestVideoData=function(){return{view:this._getLocalTestView(),publish:!1,option:{cameraId:this._getCurrentCameraId(),profile:this._getVideoProfile(),mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}}},n.prototype._generateLocalAudioData=function(){var e={publish:this._getIsAudioPublish(),option:{microphoneId:this._getCurrentMicrophoneId(),profile:this._getAudioProfile(),captureVolume:this._getCaptureVolume()}};return fe(this._echoCancellation)&&(e.option.echoCancellation=this._echoCancellation),fe(this._autoGainControl)&&(e.option.autoGainControl=this._autoGainControl),fe(this._noiseSuppression)&&(e.option.noiseSuppression=this._noiseSuppression),e},n.prototype._generateLocalTestAudioData=function(){return{publish:!1,option:{microphoneId:this._getCurrentMicrophoneId(),profile:this._getAudioProfile()}}},n.prototype._generateRemoteVideoData=function(e,t){return this._remoteStreamConfig.get("".concat(e,"_").concat(this._getTRTCStreamType(t)))},n.prototype._addTRTCEvents=function(){var t=this;this._trtc.on(s.default.EVENT.ERROR,(function(e){e&&t.emit("onError",e.code,e.message)})),this._trtc.on(s.default.EVENT.REMOTE_USER_ENTER,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserEnterRoom",e.userId)})),this._trtc.on(s.default.EVENT.REMOTE_USER_EXIT,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserLeaveRoom",e.userId)})),this._trtc.on(s.default.EVENT.REMOTE_AUDIO_AVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!0)})),this._trtc.on(s.default.EVENT.REMOTE_AUDIO_UNAVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!1)})),this._trtc.on(s.default.EVENT.REMOTE_VIDEO_AVAILABLE,(function(e){t._emitVideoAvailable(e,!0)})),this._trtc.on(s.default.EVENT.REMOTE_VIDEO_UNAVAILABLE,(function(e){t._emitVideoAvailable(e,!1)})),this._trtc.on(s.default.EVENT.AUDIO_VOLUME,(function(e){(null==e?void 0:e.result)&&t.emit("onUserVoiceVolume",null==e?void 0:e.result,((null==e?void 0:e.result)||[]).length)})),this._trtc.on(s.default.EVENT.KICKED_OUT,(function(e){var i={banned:sn.banned,room_disband:sn.roomDisband};Te(i[e.reason])&&t.emit("onExitRoom",i[e.reason])})),this._trtc.on(s.default.EVENT.NETWORK_QUALITY,(function(e){var i=e.uplinkNetworkQuality,o=e.downlinkNetworkQuality,r=new k("",t._getTRTCCloudQuality(i)),n=[];t._remoteStatisticsUserIdList.length>0&&(n=t._remoteStatisticsUserIdList.map((function(e){return new k(e,t._getTRTCCloudQuality(o))}))),t.emit("onNetworkQuality",r,n)})),this._trtc.on(s.default.EVENT.AUTOPLAY_FAILED,(function(e){t.emit("onAutoPlayFailed",e)})),this._trtc.on(s.default.EVENT.SEI_MESSAGE,(function(e){if(e.data&&"object"==typeof e.data&&e.data instanceof ArrayBuffer){for(var i=new Uint8Array(e.data),o="",r=0;r<i.length;r++)o+=String.fromCharCode(i[r]);e.stringData=o}t.emit("onRecvSEIMsg",e.userId,JSON.stringify(e))})),this._trtc.on(s.default.EVENT.STATISTICS,(function(i){var o,r=i.rtt,n=i.upLoss,s=i.downLoss,a=i.bytesSent,c=i.bytesReceived,u=i.localStatistics,l=i.remoteStatistics;t._remoteStatisticsUserIdList=l.map((function(e){return e.userId}));var d={big:e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,small:e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,sub:e.TRTCVideoStreamType.TRTCVideoStreamTypeSub},h=(null===(o=u.video)||void 0===o?void 0:o.length)>0?u.video.map((function(e){var t=new F;return t.width=e.width,t.height=e.height,t.frameRate=e.frameRate,t.videoBitrate=e.bitrate,t.audioBitrate=u.audio.bitrate||0,t.streamType=d[e.videoType],t})):[];if(0===h.length&&u.audio.bitrate>0){var p=new F;p.audioBitrate=u.audio.bitrate||0,h.push(p)}var T=[];l.forEach((function(e){var t=[],i=e.userId,o=e.audio.bitrate;if(e.video&&e.video.forEach((function(e){var r=new N;r.userId=i,r.width=e.width,r.height=e.height,r.frameRate=e.frameRate,r.videoBitrate=e.bitrate,r.audioBitrate=o||0,r.streamType=d[e.videoType],t.push(r)})),0===t.length){var r=new N;r.userId=i,r.audioBitrate=o||0,t.push(r)}T.push.apply(T,t)}));var f=new Q;f.upLoss=n,f.downLoss=s,f.rtt=r,f.sentBytes=a,f.receivedBytes=c,f.localStatisticsArray=h,f.localStatisticsArraySize=h.length,f.remoteStatisticsArray=T,f.remoteStatisticsArraySize=T.length,t.emit("onStatistics",f)})),this._trtc.on(s.default.EVENT.SCREEN_SHARE_STOPPED,(function(){t.emit("onScreenCaptureStopped",0),t._clearScreenShareParams(),t._isSharingScreen=!1})),this._trtc.on(s.default.EVENT.PUBLISH_STATE_CHANGED,(function(i){var o=i.mediaType;"started"===i.state&&("audio"===o?t.emit("onSendFirstLocalAudioFrame"):"video"===o?t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeBig):"screen"===o&&t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeSub))})),this._trtc.on(s.default.EVENT.FIRST_VIDEO_FRAME,(function(e){var i=e.userId,o=e.streamType,r=e.width,n=e.height;t.emit("onFirstVideoFrame",i,o,r,n)})),this._trtc.on(s.default.EVENT.AUDIO_PLAY_STATE_CHANGED,(function(e){var i=e.userId;"PLAYING"===e.state&&t.emit("onFirstAudioFrame",i)})),this._trtc.on(s.default.EVENT.DEVICE_CHANGED,(function(e){var i=e.type,o=e.device,r=e.action,n=o.deviceId;if("active"===r){switch(i){case"camera":t._currentCameraId=n,t._currentCamera=o;break;case"microphone":t._currentMicrophoneId=n,t._currentMicrophone=o;break;case"speaker":t._currentSpeakerId=n,t._currentSpeaker=o}t.emitOnDeviceChange(n,t._getTRTCCloudDeviceType(i),t._getTRTCCloudDeviceState(r))}})),this._trtc.on(s.default.EVENT.CUSTOM_MESSAGE,(function(e){e&&t.emit("onRecvCustomCmdMsg",e.userId,e.cmdId,e.seq,null==e?void 0:e.data)})),this._trtc.on(s.default.EVENT.CONNECTION_STATE_CHANGED,(function(e){t._hasJoinedRoom&&!t._isExitingRoom&&("CONNECTED"===e.prevState&&"DISCONNECTED"===e.state?t.emit("onConnectionLost"):"DISCONNECTED"===e.prevState&&"CONNECTING"===e.state?t.emit("onTryToReconnect"):"CONNECTING"===e.prevState&&"CONNECTED"===e.state&&t.emit("onConnectionRecovery"))}))},n.prototype._removeTRTCEvents=function(){this._trtc.off("*")},n.prototype._emitVideoAvailable=function(e,t){var i=e.userId,o=e.streamType;t?this._remoteStreamMap.set("".concat(i,"_").concat(o),!0):this._remoteStreamMap.delete("".concat(i,"_").concat(o)),o===s.default.TYPE.STREAM_TYPE_SUB?i&&this.emit("onUserSubStreamAvailable",i,t):i&&this.emit("onUserVideoAvailable",i,t)},n.prototype._setLocalView=function(e){this._localView=e},n.prototype._getLocalView=function(){return this._localView},n.prototype._setIsMobile=function(e){this._isMobile=e},n.prototype._getIsMobile=function(){return this._isMobile},n.prototype._setIsFrontCamera=function(e){this._isFrontCamera=e},n.prototype._getIsFrontCamera=function(){return this._isFrontCamera},n.prototype._getSmallStreamVideoProfile=function(){return this._smallStreamVideoProfile},n.prototype._setSmallStreamVideoProfile=function(e){this._smallStreamVideoProfile=e},n.prototype._setIsVideoPublish=function(e){this._isVideoPublish=e},n.prototype._getIsVideoPublish=function(){return this._isVideoPublish},n.prototype._setVideoProfile=function(e){this._videoProfile=e},n.prototype._getVideoProfile=function(){return this._videoProfile},n.prototype._setQosPreference=function(e){this._qosPreference=e},n.prototype._getQosPreference=function(){return this._qosPreference},n.prototype._setLocalTestView=function(e){this._localTestView=e},n.prototype._getLocalTestView=function(){return this._localTestView},n.prototype._setScreenShareParams=function(e){var t=e.view,i=e.systemAudio,o=e.fillMode,r=e.profile,n=e.videoTrack,s=e.qosPreference;pe(t)||(this._screenShareParams.view=t),pe(i)||(this._screenShareParams.option.systemAudio=i),pe(o)||(this._screenShareParams.option.fillMode=o),pe(r)||(this._screenShareParams.option.profile=r),pe(n)||(this._screenShareParams.option.videoTrack=n),pe(s)||(this._screenShareParams.option.qosPreference=s)},n.prototype._clearScreenShareParams=function(){var e,t,i,o,r;(null===(e=this._screenShareParams)||void 0===e?void 0:e.view)&&delete this._screenShareParams.view,(null===(i=null===(t=this._screenShareParams)||void 0===t?void 0:t.option)||void 0===i?void 0:i.systemAudio)&&delete this._screenShareParams.option.systemAudio,(null===(r=null===(o=this._screenShareParams)||void 0===o?void 0:o.option)||void 0===r?void 0:r.videoTrack)&&delete this._screenShareParams.option.videoTrack},n.prototype._getScreenShareParams=function(){return this._screenShareParams},n.prototype._setIsAudioPublish=function(e){this._isAudioPublish=e},n.prototype._getIsAudioPublish=function(){return this._isAudioPublish},n.prototype._setAudioProfile=function(e){this._audioProfile=e},n.prototype._getAudioProfile=function(){return this._audioProfile},n.prototype._getCaptureVolume=function(){return this._captureVolume},n.prototype._setCaptureVolume=function(e){this._captureVolume=e},n.prototype._setCurrentCameraId=function(e){this._currentCameraId=e},n.prototype._getCurrentCameraId=function(){return this._currentCameraId},n.prototype._setCurrentMicrophoneId=function(e){this._currentMicrophoneId=e},n.prototype._getCurrentMicrophoneId=function(){return this._currentMicrophoneId},n.prototype._setCurrentSpeakerId=function(e){this._currentSpeakerId=e},n.prototype._getCurrentSpeakerId=function(){return this._currentSpeakerId},n.prototype._setRemoteStreamConfig=function(t,i,o){var r=this._remoteStreamConfig.get("".concat(t,"_").concat(this._getTRTCStreamType(i)));r||(r={userId:t,streamType:this._getTRTCStreamType(i),option:{mirror:this._getTRTCRemoteMirror(e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),fillMode:this._getTRTCFillMode(e.TRTCVideoFillMode.TRTCVideoFillMode_Fit)}});var n=o.view,s=o.mirrorType,a=o.fillMode,c=o.small;pe(n)||(r.view=n),pe(s)||(r.option.mirror=this._getTRTCRemoteMirror(s)),pe(a)||(r.option.fillMode=this._getTRTCFillMode(a)),pe(c)||(r.option.small=c),this._remoteStreamConfig.set("".concat(t,"_").concat(this._getTRTCStreamType(i)),r)},n.prototype._inheritPropertiesToSubCloud=function(e){e._frameWorkType=this._frameWorkType,e._component=this._component,e._language=this._language,e._networkProxy=c({},this._networkProxy),e._latencyLevel=this._latencyLevel,e._enableAutoPlayDialog=this._enableAutoPlayDialog},n.prototype._inheritEventsToSubCloud=function(e){var t=this;e._trtc.on(s.default.EVENT.AUTOPLAY_FAILED,(function(e){t.emit("onAutoPlayFailed",e)}))},n.prototype.handleDeviceChange=function(){return u(this,void 0,void 0,(function(){var t=this;return l(this,(function(i){return s.default.getCameraList().then((function(i){return u(t,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return this._cameraList.length===i.length?[2]:[4,this.deviceChangeManage(this._cameraList,i,e.TRTCDeviceType.TRTCDeviceTypeCamera)];case 1:return t.sent(),this._cameraList=i,[2]}}))}))})),s.default.getMicrophoneList().then((function(i){return u(t,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._microphoneList,i,e.TRTCDeviceType.TRTCDeviceTypeMic)];case 1:return t.sent(),this._microphoneList=i,[2]}}))}))})),s.default.getSpeakerList().then((function(i){return u(t,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._speakerList,i,e.TRTCDeviceType.TRTCDeviceTypeSpeaker)];case 1:return t.sent(),this._speakerList=i,[2]}}))}))})),[2]}))}))},n.prototype.isSameDevice=function(e,t){var i=e&&e.deviceId&&e.groupId&&e.label,o=t&&t.deviceId&&t.groupId&&t.label;return!(!i||!o)&&(e.deviceId===t.deviceId&&e.groupId===t.groupId&&e.label===t.label)},n.prototype.deviceChangeManage=function(t,i,o){return u(this,void 0,void 0,(function(){var r,n,s,a,c;return l(this,(function(u){switch(u.label){case 0:return r=void 0,t.length!==i.length&&(n=(i||[]).map((function(e){return e.deviceId})),s=new V,t.length>i.length?(s=t.filter((function(e){return!n.includes(e.deviceId)}))[0]||{},r=e.TRTCDeviceState.TRTCDeviceStateRemove):(n=(t||[]).map((function(e){return e.deviceId})),s=i.filter((function(e){return!n.includes(e.deviceId)}))[0]||{},r=e.TRTCDeviceState.TRTCDeviceStateAdd),a=s.deviceId,this.emitOnDeviceChange(a,o,r)),c=this.getDefaultDeviceInfo(i),o!==e.TRTCDeviceType.TRTCDeviceTypeCamera||r!==e.TRTCDeviceState.TRTCDeviceStateRemove?[3,3]:this.isSameDevice(this._currentCamera,c)?[2]:c.deviceId?[4,this.autoChangeDevice(o,c)]:[3,2];case 1:u.sent(),u.label=2;case 2:u.label=3;case 3:return o!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,6]:this.isSameDevice(this._currentMicrophone,c)?[2]:c.deviceId?[4,this.autoChangeDevice(o,c)]:[3,5];case 4:u.sent(),u.label=5;case 5:u.label=6;case 6:return o!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,9]:this.isSameDevice(this._currentSpeaker,c)?[2]:c.deviceId?[4,this.autoChangeDevice(o,c)]:[3,8];case 7:u.sent(),u.label=8;case 8:u.label=9;case 9:return[2]}}))}))},n.prototype.getDefaultDeviceInfo=function(e){var t=new V;if(0===e.length)return t;var i=e.filter((function(e){return"default"===e.deviceId}));return t=i.length>0?i[0]:e[0]},n.prototype.autoChangeDevice=function(t,i){return u(this,void 0,void 0,(function(){var o,r,n;return l(this,(function(a){switch(a.label){case 0:return o=i.deviceId,t!==e.TRTCDeviceType.TRTCDeviceTypeCamera?[3,6]:(this._setCurrentCameraId(o),[4,this._updateLocalVideo()]);case 1:a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this._testTrtc.updateLocalVideo({option:{cameraId:o}})];case 3:return a.sent(),[3,5];case 4:return r=a.sent(),console.log("testTRTC error",JSON.stringify(r)),r.code,s.default.ERROR_CODE.OPERATION_ABORT,[3,5];case 5:this._currentCameraId=o,this._currentCamera=i,this.emitOnDeviceChange(o,t,e.TRTCDeviceState.TRTCDeviceStateActive),a.label=6;case 6:return t!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,12]:(this._setCurrentMicrophoneId(o),[4,this._updateLocalAudio()]);case 7:a.sent(),a.label=8;case 8:return a.trys.push([8,10,,11]),[4,this._testTrtc.updateLocalAudio({option:{microphoneId:o}})];case 9:return a.sent(),[3,11];case 10:return n=a.sent(),console.log("testTRTC error",JSON.stringify(n)),n.code,s.default.ERROR_CODE.OPERATION_ABORT,[3,11];case 11:this._currentMicrophoneId=o,this._currentMicrophone=i,this.emitOnDeviceChange(o,t,e.TRTCDeviceState.TRTCDeviceStateActive),a.label=12;case 12:return t!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,14]:[4,s.default.setCurrentSpeaker(o)];case 13:a.sent(),this._currentSpeakerId=o,this._currentSpeaker=i,this.emitOnDeviceChange(o,t,e.TRTCDeviceState.TRTCDeviceStateActive),a.label=14;case 14:return[2]}}))}))},n.prototype.emitOnDeviceChange=function(e,t,i){this.emit("onDeviceChange",e,t,i)},n.prototype.getMediaMixingManager=function(){return new Hn({logger:this.logger,trtc:this._trtc,trtcCloud:this})},n.shareInstance=null,n.subCloudMap=new Map,n.enableSEI=!1,n.assetsPath="",n}(b);e.Rect=K,e.TRTCDeviceInfo=V,e.TRTCImageBuffer=U,e.TRTCLocalStatistics=F,e.TRTCMixUser=$,e.TRTCNetworkQosParam=j,e.TRTCParams=A,e.TRTCPublishCDNParam=z,e.TRTCQualityInfo=k,e.TRTCRemoteStatistics=N,e.TRTCRenderParams=I,e.TRTCScreenCaptureProperty=ee,e.TRTCScreenCaptureSourceInfo=G,e.TRTCStatistics=Q,e.TRTCTranscodingConfig=q,e.TRTCVideoEncParam=P,e.TRTCVolumeInfo=B,e.default=Xn,Object.defineProperty(e,"__esModule",{value:!0})}));
|