trtc-cloud-js-sdk 2.10.7 → 2.10.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
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/realtime-transcriber")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/video-effect/virtual-background","trtc-sdk-v5/plugins/realtime-transcriber"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.virtualBackground,e.RealtimeTranscriber)}(this,(function(e,t,A,i){function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(t),n=o(i),s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])},s(e,t)};var a=function(){return a=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++)for(var o in t=arguments[A])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t,A,i){var o,r=arguments.length,n=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,A):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,A,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(n=(r<3?o(n):r>3?o(t,A,n):o(t,A))||n);return r>3&&n&&Object.defineProperty(t,A,n),n}function g(e,t,A,i){return new(A||(A=Promise))((function(o,r){function n(e){try{a(i.next(e))}catch(cr){r(cr)}}function s(e){try{a(i.throw(e))}catch(cr){r(cr)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof A?t:new A((function(e){e(t)}))).then(n,s)}a((i=i.apply(e,t||[])).next())}))}function u(e,t){var A,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(A)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(n=0)),n;)try{if(A=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=t.call(e,n)}catch(cr){s=[6,cr],i=0}finally{A=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,A=t&&e[t],i=0;if(A)return A.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(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t,A){if(A||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,A=e[Symbol.asyncIterator];return A?A.call(e):(e=l(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(A){t[A]=e[A]&&function(t){return new Promise((function(i,o){(function(e,t,A,i){Promise.resolve(i).then((function(t){e({value:t,done:A})}),t)})(i,o,(t=e[A](t)).done,t.value)}))}}}var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function I(e,t){return e(t={exports:{}},t.exports),t.exports}var B,E,p,Q,f,v,y,T,m=I((function(e){var t=Object.prototype.hasOwnProperty,A="~";function i(){}function o(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function r(e,t,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=A?A+t:t;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,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(A=!1)),s.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)t.call(e,i)&&o.push(A?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=A?A+e:e,i=this._events[t];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 t=A?A+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,o,r,n){var s=A?A+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,i),!0;case 4:return g.fn.call(g.context,t,i,o),!0;case 5:return g.fn.call(g.context,t,i,o,r),!0;case 6:return g.fn.call(g.context,t,i,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,i);break;case 4:g[c].fn.call(g[c].context,t,i,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},s.prototype.on=function(e,t,A){return r(this,e,t,A,!1)},s.prototype.once=function(e,t,A){return r(this,e,t,A,!0)},s.prototype.removeListener=function(e,t,i,o){var r=A?A+e:e;if(!this._events[r])return this;if(!t)return n(this,r),this;var s=this._events[r];if(s.fn)s.fn!==t||o&&!s.once||i&&s.context!==i||n(this,r);else{for(var a=0,c=[],g=s.length;a<g;a++)(s[a].fn!==t||o&&!s[a].once||i&&s[a].context!==i)&&c.push(s[a]);c.length?this._events[r]=1===c.length?c[0]:c:n(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=A?A+e:e,this._events[t]&&n(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=A,s.EventEmitter=s,e.exports=s}));e.TRTCVideoResolution=void 0,(B=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[B.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",B[B.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",B[B.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",B[B.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",B[B.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",B[B.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",B[B.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",B[B.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",B[B.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",B[B.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",B[B.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",B[B.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",B[B.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",B[B.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",B[B.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",B[B.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",B[B.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",B[B.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",B[B.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",B[B.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(E=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[E.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",E[E.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",E[E.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(p=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[p.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",p[p.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(Q=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[Q.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",Q[Q.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",Q[Q.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(f=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[f.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",f[f.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(v=e.TRTCAppScene||(e.TRTCAppScene={}))[v.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",v[v.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",v[v.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",v[v.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(y=e.TRTCRoleType||(e.TRTCRoleType={}))[y.TRTCRoleAnchor=20]="TRTCRoleAnchor",y[y.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(T=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[T.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",T[T.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",T[T.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var R,w,S=function(e,t,A,i,o){void 0===e&&(e=""),void 0===t&&(t=""),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=""),this.deviceId=e,this.deviceName=t,this.kind=A,this.label=i,this.groupId=o};e.TRTCDeviceState=void 0,(R=e.TRTCDeviceState||(e.TRTCDeviceState={}))[R.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",R[R.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",R[R.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 b,M=function(t,A,i,o,r,n,s,a,c,g,u){void 0===t&&(t=0),void 0===A&&(A=""),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===c&&(c=null),void 0===g&&(g=null),void 0===u&&(u=30),this.sdkAppId=t,this.userId=A,this.userSig=i,this.roomId=o,this.strRoomId=r,this.role=n,this.privateMapKey=s,this.streamId=c,this.userDefineRecordId=g,this.frameWorkType=u},D=function(t,A,i,o){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===A&&(A=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===i&&(i=15),void 0===o&&(o=550),this.videoResolution=t,this.resMode=A,this.videoFps=i,this.videoBitrate=o};e.TRTCVideoRotation=void 0,(b=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[b.TRTCVideoRotation0=0]="TRTCVideoRotation0",b[b.TRTCVideoRotation90=1]="TRTCVideoRotation90",b[b.TRTCVideoRotation180=2]="TRTCVideoRotation180",b[b.TRTCVideoRotation270=3]="TRTCVideoRotation270";var _,L=function(t,A,i){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===A&&(A=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===i&&(i=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=A,this.mirrorType=i};e.TRTCQuality=void 0,(_=e.TRTCQuality||(e.TRTCQuality={}))[_.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",_[_.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",_[_.TRTCQuality_Good=2]="TRTCQuality_Good",_[_.TRTCQuality_Poor=3]="TRTCQuality_Poor",_[_.TRTCQuality_Bad=4]="TRTCQuality_Bad",_[_.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",_[_.TRTCQuality_Down=6]="TRTCQuality_Down";var k,N,P,F=function(t,A){void 0===t&&(t=""),void 0===A&&(A=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=A},G=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},V=function(e,t,A){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=null),this.appId=e,this.bizId=t,this.url=A},x=function(t,A,i,o,r,n,s){void 0===t&&(t=0),void 0===A&&(A=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=t,this.height=A,this.frameRate=i,this.videoBitrate=o,this.audioBitrate=n,this.streamType=s},Y=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h){void 0===t&&(t=""),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===h&&(h=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=i,this.height=o,this.frameRate=r,this.videoBitrate=n,this.audioBitrate=a,this.streamType=h},H=function(e,t,A,i,o,r,n,s,a,c,g){void 0===e&&(e=0),void 0===t&&(t=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===c&&(c=[]),void 0===g&&(g=0),this.upLoss=e,this.downLoss=t,this.rtt=o,this.receivedBytes=r,this.sentBytes=n,this.localStatisticsArray=s,this.localStatisticsArraySize=a,this.remoteStatisticsArray=c,this.remoteStatisticsArraySize=g};e.TRTCVideoResolutionMode=void 0,(k=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[k.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",k[k.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(N=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[N.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",N[N.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(P=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[P.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",P[P.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var U,O,J=function(t,A){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===A&&(A=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=A},K=function(e,t,A,i){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.buffer=e,this.length=t,this.width=A,this.height=i};e.TRTCLogLevel=void 0,(U=e.TRTCLogLevel||(e.TRTCLogLevel={}))[U.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",U[U.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",U[U.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",U[U.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",U[U.TRTCLogLevelError=4]="TRTCLogLevelError",U[U.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",U[U.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(O=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[O.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",O[O.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",O[O.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",O[O.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var j,W=function(t,A,i,o,r,n){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=new K),void 0===r&&(r=new K),void 0===n&&(n=!1),this.type=t,this.sourceId=A,this.sourceName=i,this.thumbBGRA=o,this.iconBGRA=r,this.isMinimizeWindow=n},z=function(e,t,A,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.left=e,this.top=t,this.right=A,this.bottom=i},Z=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h,C){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===A&&(A=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===c&&(c=0),void 0===g&&(g=""),void 0===u&&(u=64),void 0===l&&(l=48e3),void 0===d&&(d=1),void 0===h&&(h=[]),void 0===C&&(C=""),this.mode=t,this.appId=A,this.bizId=i,this.videoWidth=o,this.videoHeight=r,this.videoBitrate=n,this.videoFramerate=s,this.videoGOP=a,this.backgroundColor=c,this.backgroundImage=g,this.audioSampleRate=u,this.audioBitrate=l,this.audioChannels=d,this.mixUsersArray=h,this.mixUsersArraySize=h.length,this.streamId=C};e.TRTCTranscodingConfigMode=void 0,(j=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[j.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",j[j.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",j[j.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",j[j.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",j[j.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",j[j.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",j[j.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",j[j.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",j[j.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",j[j.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var q,X,$=function(t,A,i,o,r,n,s,a){void 0===t&&(t=""),void 0===A&&(A=""),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=t,this.roomId=A,this.rect=i,this.zOrder=o,this.pureAudio=r,this.streamType=n,this.inputType=s,this.renderMode=a};e.TRTCMixInputType=void 0,(q=e.TRTCMixInputType||(e.TRTCMixInputType={}))[q.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",q[q.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",q[q.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",q[q.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(X=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[X.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",X[X.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",X[X.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",X[X.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var ee,te=function(e,t,A,i,o,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===A&&(A=!0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=A,this.highLightColor=i,this.highLightWidth=o,this.enableCaptureChildWindow=r},Ae="onError",ie="onWarning",oe="rtc",re="live",ne="VirtualBackground",se="BasicBeauty",ae="blur",ce="image",ge={20:"anchor",21:"audience"},ue={0:oe,1:re,2:oe,3:re};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(ee||(ee={}));var le="enum";function de(){return Math.floor(performance.now())}var he=function(e){return void 0===e},Ce=function(e){return"number"==typeof e},Ie=function(e){return"boolean"==typeof e};function Be(e){if("string"!=typeof e)return e;var t;try{var A=JSON.parse(e);t="object"==typeof A&&A?A:e}catch(i){t=e}return t}function Ee(e){return null==e}function pe(){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(A){e[A]&&"object"==typeof e[A]?e[A]=pe(e[A],t[A]):e[A]=t[A]})),e}),{})}function Qe(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,A){t[A]=Qe(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(A){Object.hasOwnProperty.call(e,A)&&(t[A]=Qe(e[A]))}))):t=e,t)}var fe,ve,ye=function(e){return e&&e.Math===Math&&e},Te=ye("object"==typeof globalThis&&globalThis)||ye("object"==typeof window&&window)||ye("object"==typeof self&&self)||ye("object"==typeof C&&C)||function(){return this}()||C||Function("return this")(),me=function(e){try{return!!e()}catch(t){return!0}},Re=!me((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),we=!me((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Se=Function.prototype.call,be=we?Se.bind(Se):function(){return Se.apply(Se,arguments)},Me={}.propertyIsEnumerable,De=Object.getOwnPropertyDescriptor,_e={f:De&&!Me.call({1:2},1)?function(e){var t=De(this,e);return!!t&&t.enumerable}:Me},Le=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ke=Function.prototype,Ne=ke.call,Pe=we&&ke.bind.bind(Ne,Ne),Fe=we?Pe:function(e){return function(){return Ne.apply(e,arguments)}},Ge=Fe({}.toString),Ve=Fe("".slice),xe=function(e){return Ve(Ge(e),8,-1)},Ye=Object,He=Fe("".split),Ue=me((function(){return!Ye("z").propertyIsEnumerable(0)}))?function(e){return"String"===xe(e)?He(e,""):Ye(e)}:Ye,Oe=function(e){return null==e},Je=TypeError,Ke=function(e){if(Oe(e))throw Je("Can't call method on "+e);return e},je=function(e){return Ue(Ke(e))},We="object"==typeof document&&document.all,ze={all:We,IS_HTMLDDA:void 0===We&&void 0!==We},Ze=ze.all,qe=ze.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ze}:function(e){return"function"==typeof e},Xe=ze.all,$e=ze.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:qe(e)||e===Xe}:function(e){return"object"==typeof e?null!==e:qe(e)},et=function(e,t){return arguments.length<2?(A=Te[e],qe(A)?A:void 0):Te[e]&&Te[e][t];var A},tt=Fe({}.isPrototypeOf),At="undefined"!=typeof navigator&&String(navigator.userAgent)||"",it=Te.process,ot=Te.Deno,rt=it&&it.versions||ot&&ot.version,nt=rt&&rt.v8;nt&&(ve=(fe=nt.split("."))[0]>0&&fe[0]<4?1:+(fe[0]+fe[1])),!ve&&At&&(!(fe=At.match(/Edge\/(\d+)/))||fe[1]>=74)&&(fe=At.match(/Chrome\/(\d+)/))&&(ve=+fe[1]);var st=ve,at=Te.String,ct=!!Object.getOwnPropertySymbols&&!me((function(){var e=Symbol("symbol detection");return!at(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&st&&st<41})),gt=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=Object,lt=gt?function(e){return"symbol"==typeof e}:function(e){var t=et("Symbol");return qe(t)&&tt(t.prototype,ut(e))},dt=String,ht=TypeError,Ct=function(e){if(qe(e))return e;throw ht(function(e){try{return dt(e)}catch(t){return"Object"}}(e)+" is not a function")},It=function(e,t){var A=e[t];return Oe(A)?void 0:Ct(A)},Bt=TypeError,Et=Object.defineProperty,pt=function(e,t){try{Et(Te,e,{value:t,configurable:!0,writable:!0})}catch(A){Te[e]=t}return t},Qt="__core-js_shared__",ft=Te[Qt]||pt(Qt,{}),vt=I((function(e){(e.exports=function(e,t){return ft[e]||(ft[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"})})),yt=Object,Tt=function(e){return yt(Ke(e))},mt=Fe({}.hasOwnProperty),Rt=Object.hasOwn||function(e,t){return mt(Tt(e),t)},wt=0,St=Math.random(),bt=Fe(1..toString),Mt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+bt(++wt+St,36)},Dt=Te.Symbol,_t=vt("wks"),Lt=gt?Dt.for||Dt:Dt&&Dt.withoutSetter||Mt,kt=function(e){return Rt(_t,e)||(_t[e]=ct&&Rt(Dt,e)?Dt[e]:Lt("Symbol."+e)),_t[e]},Nt=TypeError,Pt=kt("toPrimitive"),Ft=function(e,t){if(!$e(e)||lt(e))return e;var A,i=It(e,Pt);if(i){if(void 0===t&&(t="default"),A=be(i,e,t),!$e(A)||lt(A))return A;throw Nt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var A,i;if("string"===t&&qe(A=e.toString)&&!$e(i=be(A,e)))return i;if(qe(A=e.valueOf)&&!$e(i=be(A,e)))return i;if("string"!==t&&qe(A=e.toString)&&!$e(i=be(A,e)))return i;throw Bt("Can't convert object to primitive value")}(e,t)},Gt=function(e){var t=Ft(e,"string");return lt(t)?t:t+""},Vt=Te.document,xt=$e(Vt)&&$e(Vt.createElement),Yt=function(e){return xt?Vt.createElement(e):{}},Ht=!Re&&!me((function(){return 7!==Object.defineProperty(Yt("div"),"a",{get:function(){return 7}}).a})),Ut=Object.getOwnPropertyDescriptor,Ot={f:Re?Ut:function(e,t){if(e=je(e),t=Gt(t),Ht)try{return Ut(e,t)}catch(A){}if(Rt(e,t))return Le(!be(_e.f,e,t),e[t])}},Jt=Re&&me((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Kt=String,jt=TypeError,Wt=function(e){if($e(e))return e;throw jt(Kt(e)+" is not an object")},zt=TypeError,Zt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,Xt="enumerable",$t="configurable",eA="writable",tA={f:Re?Jt?function(e,t,A){if(Wt(e),t=Gt(t),Wt(A),"function"==typeof e&&"prototype"===t&&"value"in A&&eA in A&&!A[eA]){var i=qt(e,t);i&&i[eA]&&(e[t]=A.value,A={configurable:$t in A?A[$t]:i[$t],enumerable:Xt in A?A[Xt]:i[Xt],writable:!1})}return Zt(e,t,A)}:Zt:function(e,t,A){if(Wt(e),t=Gt(t),Wt(A),Ht)try{return Zt(e,t,A)}catch(i){}if("get"in A||"set"in A)throw zt("Accessors not supported");return"value"in A&&(e[t]=A.value),e}},AA=Re?function(e,t,A){return tA.f(e,t,Le(1,A))}:function(e,t,A){return e[t]=A,e},iA=Function.prototype,oA=Re&&Object.getOwnPropertyDescriptor,rA=Rt(iA,"name"),nA={EXISTS:rA,PROPER:rA&&"something"===function(){}.name,CONFIGURABLE:rA&&(!Re||Re&&oA(iA,"name").configurable)},sA=Fe(Function.toString);qe(ft.inspectSource)||(ft.inspectSource=function(e){return sA(e)});var aA,cA,gA,uA=ft.inspectSource,lA=Te.WeakMap,dA=qe(lA)&&/native code/.test(String(lA)),hA=vt("keys"),CA=function(e){return hA[e]||(hA[e]=Mt(e))},IA={},BA="Object already initialized",EA=Te.TypeError,pA=Te.WeakMap;if(dA||ft.state){var QA=ft.state||(ft.state=new pA);QA.get=QA.get,QA.has=QA.has,QA.set=QA.set,aA=function(e,t){if(QA.has(e))throw EA(BA);return t.facade=e,QA.set(e,t),t},cA=function(e){return QA.get(e)||{}},gA=function(e){return QA.has(e)}}else{var fA=CA("state");IA[fA]=!0,aA=function(e,t){if(Rt(e,fA))throw EA(BA);return t.facade=e,AA(e,fA,t),t},cA=function(e){return Rt(e,fA)?e[fA]:{}},gA=function(e){return Rt(e,fA)}}var vA={set:aA,get:cA,has:gA,enforce:function(e){return gA(e)?cA(e):aA(e,{})},getterFor:function(e){return function(t){var A;if(!$e(t)||(A=cA(t)).type!==e)throw EA("Incompatible receiver, "+e+" required");return A}}},yA=I((function(e){var t=nA.CONFIGURABLE,A=vA.enforce,i=vA.get,o=String,r=Object.defineProperty,n=Fe("".slice),s=Fe("".replace),a=Fe([].join),c=Re&&!me((function(){return 8!==r((function(){}),"length",{value:8}).length})),g=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),(!Rt(e,"name")||t&&e.name!==i)&&(Re?r(e,"name",{value:i,configurable:!0}):e.name=i),c&&u&&Rt(u,"arity")&&e.length!==u.arity&&r(e,"length",{value:u.arity});try{u&&Rt(u,"constructor")&&u.constructor?Re&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(d){}var l=A(e);return Rt(l,"source")||(l.source=a(g,"string"==typeof i?i:"")),e};Function.prototype.toString=u((function(){return qe(this)&&i(this).source||uA(this)}),"toString")})),TA=function(e,t,A,i){i||(i={});var o=i.enumerable,r=void 0!==i.name?i.name:t;if(qe(A)&&yA(A,r,i),i.global)o?e[t]=A:pt(t,A);else{try{i.unsafe?e[t]&&(o=!0):delete e[t]}catch(n){}o?e[t]=A:tA.f(e,t,{value:A,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},mA=Math.ceil,RA=Math.floor,wA=Math.trunc||function(e){var t=+e;return(t>0?RA:mA)(t)},SA=function(e){var t=+e;return t!=t||0===t?0:wA(t)},bA=Math.max,MA=Math.min,DA=Math.min,_A=function(e){return e>0?DA(SA(e),9007199254740991):0},LA=function(e){return _A(e.length)},kA=function(e){return function(t,A,i){var o,r=je(t),n=LA(r),s=function(e,t){var A=SA(e);return A<0?bA(A+t,0):MA(A,t)}(i,n);if(e&&A!=A){for(;n>s;)if((o=r[s++])!=o)return!0}else for(;n>s;s++)if((e||s in r)&&r[s]===A)return e||s||0;return!e&&-1}},NA={includes:kA(!0),indexOf:kA(!1)}.indexOf,PA=Fe([].push),FA=function(e,t){var A,i=je(e),o=0,r=[];for(A in i)!Rt(IA,A)&&Rt(i,A)&&PA(r,A);for(;t.length>o;)Rt(i,A=t[o++])&&(~NA(r,A)||PA(r,A));return r},GA=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],VA=GA.concat("length","prototype"),xA={f:Object.getOwnPropertyNames||function(e){return FA(e,VA)}},YA={f:Object.getOwnPropertySymbols},HA=Fe([].concat),UA=et("Reflect","ownKeys")||function(e){var t=xA.f(Wt(e)),A=YA.f;return A?HA(t,A(e)):t},OA=function(e,t,A){for(var i=UA(t),o=tA.f,r=Ot.f,n=0;n<i.length;n++){var s=i[n];Rt(e,s)||A&&Rt(A,s)||o(e,s,r(t,s))}},JA=/#|\.prototype\./,KA=function(e,t){var A=WA[jA(e)];return A===ZA||A!==zA&&(qe(t)?me(t):!!t)},jA=KA.normalize=function(e){return String(e).replace(JA,".").toLowerCase()},WA=KA.data={},zA=KA.NATIVE="N",ZA=KA.POLYFILL="P",qA=KA,XA=Ot.f,$A=function(e,t){var A,i,o,r,n,s=e.target,a=e.global,c=e.stat;if(A=a?Te:c?Te[s]||pt(s,{}):(Te[s]||{}).prototype)for(i in t){if(r=t[i],o=e.dontCallGetSet?(n=XA(A,i))&&n.value:A[i],!qA(a?i:s+(c?".":"#")+i,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;OA(r,o)}(e.sham||o&&o.sham)&&AA(r,"sham",!0),TA(A,i,r,e)}},ei={};ei[kt("toStringTag")]="z";var ti,Ai="[object z]"===String(ei),ii=kt("toStringTag"),oi=Object,ri="Arguments"===xe(function(){return arguments}()),ni=Ai?xe:function(e){var t,A,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(A=function(e,t){try{return e[t]}catch(A){}}(t=oi(e),ii))?A:ri?xe(t):"Object"===(i=xe(t))&&qe(t.callee)?"Arguments":i},si=String,ai=function(e){if("Symbol"===ni(e))throw TypeError("Cannot convert a Symbol value to a string");return si(e)},ci=function(){var e=Wt(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},gi=Te.RegExp,ui=me((function(){var e=gi("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),li=ui||me((function(){return!gi("a","y").sticky})),di={BROKEN_CARET:ui||me((function(){var e=gi("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:li,UNSUPPORTED_Y:ui},hi=Object.keys||function(e){return FA(e,GA)},Ci=Re&&!Jt?Object.defineProperties:function(e,t){Wt(e);for(var A,i=je(t),o=hi(t),r=o.length,n=0;r>n;)tA.f(e,A=o[n++],i[A]);return e},Ii={f:Ci},Bi=et("document","documentElement"),Ei="prototype",pi="script",Qi=CA("IE_PROTO"),fi=function(){},vi=function(e){return"<"+pi+">"+e+"</"+pi+">"},yi=function(e){e.write(vi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ti=function(){try{ti=new ActiveXObject("htmlfile")}catch(o){}var e,t,A;Ti="undefined"!=typeof document?document.domain&&ti?yi(ti):(t=Yt("iframe"),A="java"+pi+":",t.style.display="none",Bi.appendChild(t),t.src=String(A),(e=t.contentWindow.document).open(),e.write(vi("document.F=Object")),e.close(),e.F):yi(ti);for(var i=GA.length;i--;)delete Ti[Ei][GA[i]];return Ti()};IA[Qi]=!0;var mi,Ri,wi=Object.create||function(e,t){var A;return null!==e?(fi[Ei]=Wt(e),A=new fi,fi[Ei]=null,A[Qi]=e):A=Ti(),void 0===t?A:Ii.f(A,t)},Si=Te.RegExp,bi=me((function(){var e=Si(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Mi=Te.RegExp,Di=me((function(){var e=Mi("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),_i=vA.get,Li=vt("native-string-replace",String.prototype.replace),ki=RegExp.prototype.exec,Ni=ki,Pi=Fe("".charAt),Fi=Fe("".indexOf),Gi=Fe("".replace),Vi=Fe("".slice),xi=(Ri=/b*/g,be(ki,mi=/a/,"a"),be(ki,Ri,"a"),0!==mi.lastIndex||0!==Ri.lastIndex),Yi=di.BROKEN_CARET,Hi=void 0!==/()??/.exec("")[1];(xi||Hi||Yi||bi||Di)&&(Ni=function(e){var t,A,i,o,r,n,s,a=this,c=_i(a),g=ai(e),u=c.raw;if(u)return u.lastIndex=a.lastIndex,t=be(Ni,u,g),a.lastIndex=u.lastIndex,t;var l=c.groups,d=Yi&&a.sticky,h=be(ci,a),C=a.source,I=0,B=g;if(d&&(h=Gi(h,"y",""),-1===Fi(h,"g")&&(h+="g"),B=Vi(g,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==Pi(g,a.lastIndex-1))&&(C="(?: "+C+")",B=" "+B,I++),A=new RegExp("^(?:"+C+")",h)),Hi&&(A=new RegExp("^"+C+"$(?!\\s)",h)),xi&&(i=a.lastIndex),o=be(ki,d?A:a,B),d?o?(o.input=Vi(o.input,I),o[0]=Vi(o[0],I),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:xi&&o&&(a.lastIndex=a.global?o.index+o[0].length:i),Hi&&o&&o.length>1&&be(Li,o[0],A,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(o[r]=void 0)})),o&&l)for(o.groups=n=wi(null),r=0;r<l.length;r++)n[(s=l[r])[0]]=o[s[1]];return o});var Ui=Ni;$A({target:"RegExp",proto:!0,forced:/./.exec!==Ui},{exec:Ui});var Oi="\t\n\v\f\r                 \u2028\u2029\ufeff",Ji=Fe("".replace),Ki=RegExp("^["+Oi+"]+"),ji=RegExp("(^|[^"+Oi+"])["+Oi+"]+$"),Wi=function(e){return function(t){var A=ai(Ke(t));return 1&e&&(A=Ji(A,Ki,"")),2&e&&(A=Ji(A,ji,"$1")),A}},zi={start:Wi(1),end:Wi(2),trim:Wi(3)}.trim,Zi=Fe("".charAt),qi=Te.parseFloat,Xi=Te.Symbol,$i=Xi&&Xi.iterator,eo=1/qi(Oi+"-0")!=-Infinity||$i&&!me((function(){qi(Object($i))}))?function(e){var t=zi(ai(e)),A=qi(t);return 0===A&&"-"===Zi(t,0)?-0:A}:qi;$A({global:!0,forced:parseFloat!==eo},{parseFloat:eo});var to=function(e){if("Function"===xe(e))return Fe(e)},Ao=kt("species"),io=RegExp.prototype,oo=Fe("".charAt),ro=Fe("".charCodeAt),no=Fe("".slice),so=function(e){return function(t,A){var i,o,r=ai(Ke(t)),n=SA(A),s=r.length;return n<0||n>=s?e?"":void 0:(i=ro(r,n))<55296||i>56319||n+1===s||(o=ro(r,n+1))<56320||o>57343?e?oo(r,n):i:e?no(r,n,n+2):o-56320+(i-55296<<10)+65536}},ao={codeAt:so(!1),charAt:so(!0)}.charAt,co=function(e,t,A){return t+(A?ao(e,t).length:1)},go=TypeError,uo=function(e,t){var A=e.exec;if(qe(A)){var i=be(A,e,t);return null!==i&&Wt(i),i}if("RegExp"===xe(e))return be(Ui,e,t);throw go("RegExp#exec called on incompatible receiver")};!function(e,t,A,i){var o=kt(e),r=!me((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),n=r&&!me((function(){var t=!1,A=/a/;return"split"===e&&((A={}).constructor={},A.constructor[Ao]=function(){return A},A.flags="",A[o]=/./[o]),A.exec=function(){return t=!0,null},A[o](""),!t}));if(!r||!n||A){var s=to(/./[o]),a=t(o,""[e],(function(e,t,A,i,o){var n=to(e),a=t.exec;return a===Ui||a===io.exec?r&&!o?{done:!0,value:s(t,A,i)}:{done:!0,value:n(A,t,i)}:{done:!1}}));TA(String.prototype,e,a[0]),TA(io,o,a[1])}i&&AA(io[o],"sham",!0)}("match",(function(e,t,A){return[function(t){var A=Ke(this),i=Oe(t)?void 0:It(t,e);return i?be(i,t,A):new RegExp(t)[e](ai(A))},function(e){var i=Wt(this),o=ai(e),r=A(t,i,o);if(r.done)return r.value;if(!i.global)return uo(i,o);var n=i.unicode;i.lastIndex=0;for(var s,a=[],c=0;null!==(s=uo(i,o));){var g=ai(s[0]);a[c]=g,""===g&&(i.lastIndex=co(o,_A(i.lastIndex),n)),c++}return 0===c?null:a}]}));var lo=Array.isArray||function(e){return"Array"===xe(e)},ho=TypeError,Co=function(e){if(e>9007199254740991)throw ho("Maximum allowed index exceeded");return e},Io=function(e,t,A){var i=Gt(t);i in e?tA.f(e,i,Le(0,A)):e[i]=A},Bo=function(){},Eo=[],po=et("Reflect","construct"),Qo=/^\s*(?:class|function)\b/,fo=Fe(Qo.exec),vo=!Qo.exec(Bo),yo=function(e){if(!qe(e))return!1;try{return po(Bo,Eo,e),!0}catch(t){return!1}},To=function(e){if(!qe(e))return!1;switch(ni(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return vo||!!fo(Qo,uA(e))}catch(t){return!0}};To.sham=!0;var mo,Ro=!po||me((function(){var e;return yo(yo.call)||!yo(Object)||!yo((function(){e=!0}))||e}))?To:yo,wo=kt("species"),So=Array,bo=function(e,t){return new(function(e){var t;return lo(e)&&(t=e.constructor,(Ro(t)&&(t===So||lo(t.prototype))||$e(t)&&null===(t=t[wo]))&&(t=void 0)),void 0===t?So:t}(e))(0===t?0:t)},Mo=kt("species"),Do=kt("isConcatSpreadable"),_o=st>=51||!me((function(){var e=[];return e[Do]=!1,e.concat()[0]!==e})),Lo=function(e){if(!$e(e))return!1;var t=e[Do];return void 0!==t?!!t:lo(e)};$A({target:"Array",proto:!0,arity:1,forced:!(_o&&(mo="concat",st>=51||!me((function(){var e=[];return(e.constructor={})[Mo]=function(){return{foo:1}},1!==e[mo](Boolean).foo}))))},{concat:function(e){var t,A,i,o,r,n=Tt(this),s=bo(n,0),a=0;for(t=-1,i=arguments.length;t<i;t++)if(Lo(r=-1===t?n:arguments[t]))for(o=LA(r),Co(a+o),A=0;A<o;A++,a++)A in r&&Io(s,a,r[A]);else Co(a+1),Io(s,a++,r);return s.length=a,s}});var ko=window.navigator&&window.navigator.userAgent||"",No=/AppleWebKit\/([\d.]+)/i.exec(ko);No&&parseFloat(No.pop());var Po=/iPad/i.test(ko),Fo=/iPhone/i.test(ko)&&!Po,Go=/iPod/i.test(ko),Vo=Fo||Po||Go,xo=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(ko);Vo&&function(){var e=ko.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Yo=/Android/i.test(ko);Yo&&function(){var e=ko.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),A=e[2]&&parseFloat(e[2]);t&&A&&parseFloat("".concat(e[1],".").concat(e[2]))}();Yo&&/webkit/i.test(ko),/Firefox/i.test(ko)&&function(){var e=ko.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Ho=/Edge\//i.test(ko);Ho&&function(){var e=ko.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var Uo=/Edg\//i.test(ko);Uo&&function(){var e=ko.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Oo=/SogouMobileBrowser\//i.test(ko);Oo&&function(){var e=ko.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Jo=/MetaSr\s/i.test(ko);Jo&&function(){var e=ko.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Ko=/TBS\/\d+/i.test(ko);Ko&&function(){var e=ko.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var jo=/XWEB\/\d+/i.test(ko);jo&&function(){var e=ko.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(ko),/MSIE\/\d+/i.test(ko)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(ko),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(ko)&&/rv:11.0/.test(ko)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(ko)&&function(){var e=ko.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Wo=!Ko&&/MQQBrowser\/\d+/i.test(ko)&&/COVC\/\d+/i.test(ko),zo=!Ko&&/MQQBrowser\/\d+/i.test(ko)&&!/COVC\/\d+/i.test(ko);(zo||Wo)&&function(){var e=ko.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Zo=!Ko&&/ QQBrowser\/\d+/i.test(ko);Zo&&function(){var e=ko.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var qo=!Ko&&/QQBrowserLite\/\d+/i.test(ko);qo&&function(){var e=ko.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var Xo=!Ko&&/MQBHD\/\d+/i.test(ko);Xo&&function(){var e=ko.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(ko),!Vo&&/MAC OS X/i.test(ko),!Yo&&/Linux/i.test(ko),/MicroMessenger/i.test(ko),/UCBrowser/i.test(ko),/Electron/i.test(ko);var $o=/MiuiBrowser/i.test(ko);$o&&function(){var e=ko.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var er=/HuaweiBrowser/i.test(ko);/Huawei/i.test(ko),er&&function(){var e=ko.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var tr=/SamsungBrowser/i.test(ko);tr&&function(){var e=ko.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Ar=/HeyTapBrowser/i.test(ko);Ar&&function(){var e=ko.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var ir=/VivoBrowser/i.test(ko);ir&&function(){var e=ko.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var or,rr,nr,sr=/Chrome/i.test(ko),ar=!Ho&&!Jo&&!Oo&&!Ko&&!jo&&!Uo&&!Zo&&!$o&&!er&&!tr&&!Ar&&!ir&&/Chrome/i.test(ko);ar&&function(){var e=ko.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),ar&&function(){var e=ko.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!sr&&!zo&&!Wo&&!qo&&!Xo&&/Safari/i.test(ko)&&function(){var e=ko.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"}(or||(or={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(rr||(rr={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(nr||(nr={}));var cr,gr,ur=-3340,lr=-1301,dr=-1314,hr=-1315,Cr=-1316,Ir=-1302,Br=-1317,Er=-1318,pr=-1319,Qr=-70252,fr={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},vr={code:-1005,message:"not supported"},yr="2.10.7",Tr=Object.create,mr=Object.defineProperty,Rr=Object.getOwnPropertyDescriptor,wr=Object.getOwnPropertyNames,Sr=Object.getOwnPropertySymbols,br=Object.getPrototypeOf,Mr=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,_r=(e,t,A)=>t in e?mr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,Lr=(e,t,A,i)=>{for(var o,r=i>1?void 0:i?Rr(t,A):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(i?o(t,A,r):o(r))||r);return i&&r&&mr(t,A,r),r},kr=(e,t,A)=>_r(e,"symbol"!=typeof t?t+"":t,A),Nr=(cr={"../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"(e,t){var A=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function n(e,t,A,o,n){if("function"!=typeof A)throw new TypeError("The listener must be a function");var s=new r(A,o||e,n),a=i?i+t:t;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 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,t,o=[];if(0===this._eventsCount)return o;for(t in e=this._events)A.call(e,t)&&o.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=i?i+e:e,A=this._events[t];if(!A)return[];if(A.fn)return[A.fn];for(var o=0,r=A.length,n=new Array(r);o<r;o++)n[o]=A[o].fn;return n},a.prototype.listenerCount=function(e){var t=i?i+e:e,A=this._events[t];return A?A.fn?1:A.length:0},a.prototype.emit=function(e,t,A,o,r,n){var s=i?i+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,A),!0;case 4:return g.fn.call(g.context,t,A,o),!0;case 5:return g.fn.call(g.context,t,A,o,r),!0;case 6:return g.fn.call(g.context,t,A,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,A);break;case 4:g[c].fn.call(g[c].context,t,A,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},a.prototype.on=function(e,t,A){return n(this,e,t,A,!1)},a.prototype.once=function(e,t,A){return n(this,e,t,A,!0)},a.prototype.removeListener=function(e,t,A,o){var r=i?i+e:e;if(!this._events[r])return this;if(!t)return s(this,r),this;var n=this._events[r];if(n.fn)n.fn!==t||o&&!n.once||A&&n.context!==A||s(this,r);else{for(var a=0,c=[],g=n.length;a<g;a++)(n[a].fn!==t||o&&!n[a].once||A&&n[a].context!==A)&&c.push(n[a]);c.length?this._events[r]=1===c.length?c[0]:c:s(this,r)}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,void 0!==t&&(t.exports=a)}},function(){return gr||(0,cr[wr(cr)[0]])((gr={exports:{}}).exports,gr),gr.exports}),Pr={name:"option",required:!0,properties:{view:{type:["string",HTMLElement],required:!0},url:{type:"string",required:!0},muted:{type:"boolean",required:!1},volume:{type:"number",required:!1},fillMode:{type:"string",required:!1,values:["contain","cover","fill"]},loggerConfig:{type:"object",required:!0,properties:{sdkAppId:{type:"number",required:!0},userId:{type:"string",required:!0}}}}},Fr=e=>{const t=e.split("\r\n"),A=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)}));const i=A.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),o=[];t.forEach((e=>{let t=e;if(e.includes("a=fmtp:111")&&(t=`${e};stereo=1`),e.includes("a=fmtp")){const A=/a=fmtp:(\d+)\s/.exec(e);A&&A.length>1&&i.includes(A[1])&&(t=`${e};sps-pps-idr-in-keyframe=1`)}o.push(t)}));return(e=>{if(!navigator.userAgent.includes("Firefox"))return e;const t=e.split("\r\n"),A=[],i=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)})),A.length>1&&i.push(...A.slice(1));const o=i.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),r=[];return t.forEach((e=>{let t=e;if(e.includes("a=setup")&&(t="a=setup:passive"),(e.includes("m=audio")||e.includes("m=video"))&&(t=e.split(" ").filter(((e,t)=>t<3||!o.includes(e))).join(" ")),e.includes("a=fmtp")||e.includes("a=rtcp-fb")||e.includes("a=rtpmap")){const t=/a=(?:fmtp|rtcp-fb|rtpmap):(\d+)\s/.exec(e);if(t&&t.length>1&&o.includes(t[1]))return}r.push(t)})),r.join("\r\n")})(o.join("\r\n"))},Gr=(e=21)=>{let t="",A=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&A[e]];return t},Vr=e=>"function"==typeof e;var xr=function({retryFunction:e,settings:t,onError:A,onRetrying:i,onRetryFailed:o,onRetrySuccess:r,context:n}){return function(...s){const{retries:a=5,timeout:c=1e3}=t;let g=0,u=-1,l=0;const d=async(t,h)=>{const C=n||this;try{const A=await e.apply(C,s);g>0&&r&&r.call(this,g),g=0,t(A)}catch(e){const n=()=>{clearTimeout(u),g=0,l=2,h(e)},C=()=>{2!==l&&g<(Vr(a)?a():a)?(g++,l=1,Vr(i)&&i.call(this,g,n),u=window.setTimeout((()=>{u=-1,d(t,h)}),Vr(c)?c(g):c)):(n(),Vr(o)&&o.call(this,e))};Vr(A)?A.call(this,{error:e,retry:C,reject:h,retryFuncArgs:s,retriedCount:g}):C()}};return new Promise(d)}},Yr=new WeakMap;var Hr=((e,t,A)=>(A=null!=e?Tr(br(e)):{},((e,t,A,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of wr(t))Mr.call(e,o)||o===A||mr(e,o,{get:()=>t[o],enumerable:!(i=Rr(t,o))||i.enumerable});return e})(!t&&e&&e.__esModule?A:mr(A,"default",{value:e,enumerable:!0}),e)))(Nr(),1),Ur=Symbol("instance"),Or=Symbol("cacheResult"),Jr=class{constructor(e,t,A){this.oldState=e,this.newState=t,this.action=A,this.aborted=!1}abort(e){this.aborted=!0,Zr.call(e,this.oldState,new Error(`action '${this.action}' aborted`))}toString(){return`${this.action}ing`}},Kr=class extends Error{constructor(e,t,A){super(t),this.state=e,this.message=t,this.cause=A}};var jr=new Map;function Wr(e,t,A={}){return(i,o,r)=>{const n=A.action||o;if(!A.context){const A=jr.get(i)||[];jr.has(i)||jr.set(i,A),A.push({from:e,to:t,action:n})}const s=r.value;r.value=function(...i){let o=this;if(A.context&&(o=qr.get("function"==typeof A.context?A.context.call(this,...i):A.context)),o.state===t)return A.sync?o[Or]:Promise.resolve(o[Or]);o.state instanceof Jr&&o.state.action==A.abortAction&&o.state.abort(o);let r=null;Array.isArray(e)?0==e.length?o.state instanceof Jr&&o.state.abort(o):"string"==typeof o.state&&e.includes(o.state)||(r=new Kr(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e.join("|")}`)):e!==o.state&&(r=new Kr(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e}`));const a=e=>{if(A.fail&&A.fail.call(this,e),A.sync){if(A.ignoreError)return e;throw e}return A.ignoreError?Promise.resolve(e):Promise.reject(e)};if(r)return a(r);const c=o.state,g=new Jr(c,t,n);Zr.call(o,g);const u=e=>{var i;return o[Or]=e,g.aborted||(Zr.call(o,t),null===(i=A.success)||void 0===i||i.call(this,o[Or])),e},l=e=>(Zr.call(o,c,e),a(e));try{const e=s.apply(this,i);return function(e){return"object"==typeof e&&e&&"then"in e}(e)?e.then(u).catch(l):A.sync?u(e):Promise.resolve(u(e))}catch(A){return l(new Kr(o._state,`${o.name} ${n} from ${e} to ${t} failed: ${A}`,A instanceof Error?A:new Error(String(A))))}}}}var zr=(()=>{const e="undefined"!=typeof window&&window.__AFSM__,t="undefined"!=typeof importScripts;return e?(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))}:t?(e,t)=>{postMessage({type:e,payload:t})}:()=>{}})();function Zr(e,t){const A=this._state;this._state=e;const i=e.toString();e&&this.emit(i,A),this.emit(qr.STATECHANGED,e,A,t),this.updateDevTools({value:e,old:A,err:t instanceof Error?t.message:String(t)})}var qr=class e extends Hr.default{constructor(t,A,i){super(),this.name=t,this.groupName=A,this._state=e.INIT,t||(t=Date.now().toString(36)),i?Object.setPrototypeOf(this,i):i=Object.getPrototypeOf(this),A||(this.groupName=this.constructor.name);const o=i[Ur];o?this.name=o.name+"-"+o.count++:i[Ur]={name:this.name,count:0},this.updateDevTools({diagram:this.stateDiagram})}get stateDiagram(){const e=Object.getPrototypeOf(this),t=jr.get(e)||[];let A=new Set,i=[],o=[];const r=new Set,n=Object.getPrototypeOf(e);jr.has(n)&&(n.stateDiagram.forEach((e=>A.add(e))),n.allStates.forEach((e=>r.add(e)))),t.forEach((({from:e,to:t,action:A})=>{"string"==typeof e?i.push({from:e,to:t,action:A}):e.length?e.forEach((e=>{i.push({from:e,to:t,action:A})})):o.push({to:t,action:A})})),i.forEach((({from:e,to:t,action:i})=>{r.add(e),r.add(t),r.add(i+"ing"),A.add(`${e} --\x3e ${i}ing : ${i}`),A.add(`${i}ing --\x3e ${t} : ${i} 🟢`),A.add(`${i}ing --\x3e ${e} : ${i} 🔴`)})),o.forEach((({to:e,action:t})=>{A.add(`${t}ing --\x3e ${e} : ${t} 🟢`),r.forEach((i=>{i!==e&&A.add(`${i} --\x3e ${t}ing : ${t}`)}))}));const s=[...A];return Object.defineProperties(e,{stateDiagram:{value:s},allStates:{value:r}}),s}static get(t){let A;return"string"==typeof t?(A=e.instances.get(t),A||e.instances.set(t,A=new e(t,void 0,Object.create(e.prototype)))):(A=e.instances2.get(t),A||e.instances2.set(t,A=new e(t.constructor.name,void 0,Object.create(e.prototype)))),A}static getState(t){var A;return null===(A=e.get(t))||void 0===A?void 0:A.state}updateDevTools(t={}){zr(e.UPDATEAFSM,Object.assign({name:this.name,group:this.groupName},t))}get state(){return this._state}set state(e){Zr.call(this,e)}};qr.STATECHANGED="stateChanged",qr.UPDATEAFSM="updateAFSM",qr.INIT="[*]",qr.ON="on",qr.OFF="off",qr.instances=new Map,qr.instances2=new WeakMap;var Xr=class extends qr{constructor(e,t){super(),this.core=e,kr(this,"audioPlayer"),kr(this,"videoPlayer"),kr(this,"callback"),kr(this,"_log"),kr(this,"lastPausedReason"),kr(this,"muted",!1),this._log=t,this.videoPlayer=new e.VideoPlayer({id:"vp",log:this._log.createChild({id:"vp"}),track:null,muted:!1,container:null,enableLogTrackState:!0}),this.audioPlayer=new e.RemoteAudioPlayer({id:"ap",log:this._log.createChild({id:"ap"}),track:null,muted:!1,container:null,enableVolumeControlInIOS:!0,enableLogTrackState:!0}),this.videoPlayer.on("loadstart",(()=>this.handleLoadStart("video"))),this.audioPlayer.on("loadstart",(()=>this.handleLoadStart("audio"))),this.videoPlayer.on("player-state-changed",this.handlePlayerStateChanged,this),this.audioPlayer.on("player-state-changed",this.handlePlayerStateChanged,this)}get isPlaying(){return this.videoPlayer.isPlaying&&this.audioPlayer.isPlaying}get isPaused(){return this.videoPlayer.isPaused&&this.audioPlayer.isPaused}get isStopped(){return this.videoPlayer.isStopped&&this.audioPlayer.isStopped}setCallback(e){this.callback=e}handleLoadStart(e){this.onLoadStart()}handlePlayerStateChanged(e){"PLAYING"===e.state&&this.isPlaying&&this.onPlaying(),"PAUSED"===e.state&&this.isPaused&&this.onPaused(e.reason),"STOPPED"===e.state&&this.isStopped&&this.onStopped()}onLoadStart(){}onPlaying(){}onPaused(e){this.lastPausedReason=e}onStopped(){}setVideoContainer(e){if(this.core.utils.isString(e)){const t=document.getElementById(e);t&&this.videoPlayer.setContainer(t)}else this.videoPlayer.setContainer(e)}setVolume(e){this.core.utils.isUndefined(e)||this.audioPlayer.setVolume(e/100)}setMuted(e){this.core.utils.isUndefined(e)||(this.muted=e,this.audioPlayer.setMuted(e))}setFillMode(e){e&&this.videoPlayer.setObjectFit(e)}setAudioTrack(e){this.audioPlayer.setTrack(e)}setVideoTrack(e){this.videoPlayer.setTrack(e)}async play(){const e=this.videoPlayer.play().catch((e=>{var t,A;this.handleAutoPlayFailed(this.videoPlayer,e),null==(A=null==(t=this.callback)?void 0:t.onAutoPlayFailed)||A.call(t,{type:"video",resume:()=>this.videoPlayer.resume()})})),t=this.audioPlayer.play().catch((e=>{var t,A;this.handleAutoPlayFailed(this.audioPlayer,e),null==(A=null==(t=this.callback)?void 0:t.onAutoPlayFailed)||A.call(t,{type:"audio",resume:()=>this.audioPlayer.resume()})}));await Promise.all([e,t])}handleAutoPlayFailed(e,t){this._log.warn("handleAutoPlayFailed",t);const A=()=>{this.audioPlayer.resume().then((()=>{document.removeEventListener("click",A,!0)}))};document.addEventListener("click",A,!0)}pause(){this.videoPlayer.pause(!1),this.audioPlayer.setMuted(!0),this.audioPlayer.pause()}resume(){this.videoPlayer.resume(!0),this.audioPlayer.setMuted(this.muted),this.audioPlayer.resume()}async enterFullscreen(){await this.videoPlayer.enterFullscreen()}async exitFullscreen(){await this.videoPlayer.exitFullscreen()}async enterPictureInPicture(){await this.videoPlayer.enterPictureInPicture()}async exitPictureInPicture(){await this.videoPlayer.exitPictureInPicture()}stop(){this.videoPlayer&&this.videoPlayer.stop(),this.audioPlayer&&this.audioPlayer.stop()}};Lr([Wr([qr.INIT,"PAUSED"],"LOADSTART",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onLoadStart)||t.call(e)},fail(e){this._log.warn("onLoadStart",e)}})],Xr.prototype,"onLoadStart",1),Lr([Wr(["LOADSTART","PAUSED"],"PLAYING",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPlaying)||t.call(e)},fail(e){this._log.warn("onPlaying",e)}})],Xr.prototype,"onPlaying",1),Lr([Wr("PLAYING","PAUSED",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPaused)||t.call(e,{reason:this.lastPausedReason})},fail(e){this._log.warn("onPaused",e)}})],Xr.prototype,"onPaused",1),Lr([Wr([],qr.INIT,{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onStopped)||t.call(e)},fail(e){this._log.warn("onStopped",e)}})],Xr.prototype,"onStopped",1);var $r=Xr,en=["overseas-webrtc.tlivewebrtc.com","oswebrtc-lint.tliveplay.com"],tn=class e{constructor(e){this.core=e,kr(this,"connectedRoomIdSet",new Set),kr(this,"updateSeq",0),kr(this,"_log"),kr(this,"player"),kr(this,"peerConnection"),kr(this,"svrSig"),kr(this,"streamURL"),kr(this,"signalURL"),kr(this,"insertableStreamsAbortMap",new Map),kr(this,"scriptTransformWorker"),kr(this,"connectionState","disconnected"),kr(this,"isStarted",!1),kr(this,"isStopped",!0),kr(this,"isReconnecting",!1),kr(this,"callback"),kr(this,"isFireWallErrorEmitted",!1),kr(this,"stat"),kr(this,"isH264DecodeSupported"),kr(this,"connectionTimeoutId"),e.loggerManager.startUpload(),this._log=this.core.log.createChild({id:`${this.getAlias()}`}),this.player=new $r(e,this._log),e.innerEmitter.on(e.INNER_EVENT.SEI_MESSAGE,this.onSEIMessage,this)}getName(){return e.Name}getAlias(){return"LEB"}getGroup(){return""}getValidateRule(e){switch(e){case"start":return Pr;case"update":case"stop":return{}}}get enableSEI(){return this.core.room.enableSEI&&(this.core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED||this.core.rtcDectection.IS_SCRIPT_TRANSFORM_SUPPORTED)}async start(e){var t;this.isStopped=!1;const{view:A,url:i,volume:o,muted:r,fillMode:n,loggerConfig:s,callback:a}=e;this.callback=a,this.player.setCallback(a);const{errorModule:{RtcError:c,ErrorCode:g,ErrorCodeDictionary:u},loggerManager:l,rtcDectection:d}=this.core;if(this._log.setSdkAppId(s.sdkAppId),this._log.setUserId(s.userId),l.addJoinedUser(s),!d.isWebRTCSupported()||!d.isAddTransceiverSupported())throw new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_WEBRTC,message:"webrtc not supported"});if(!(await d.decodeSupportStatus()).isH264DecodeSupported||!1===this.isH264DecodeSupported)throw this.isH264DecodeSupported=!1,new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_H264_DECODE,message:"h264 not supported"});!d.IS_SEI_SUPPORTED&&(null==a?void 0:a.onSEIMessage)&&(null==(t=a.onError)||t.call(a,new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_SEI,message:"sei not supported"}))),this.player.setVideoContainer(A),this.player.setMuted(r),this.player.setVolume(o),this.player.setFillMode(n),await this.connect(i),this.stat=new class{constructor(e,t){this.core=t,kr(this,"peerConnection"),kr(this,"audioTransceiver",null),kr(this,"videoTransceiver",null),kr(this,"timerId",null),kr(this,"callback",null),kr(this,"previousRawStats",null),kr(this,"_prevReportTime",0),kr(this,"_prevDecoderImplementation",""),kr(this,"_decodeMap",new Map),this.peerConnection=e,this.findTransceivers()}get statInterval(){return 0===this._prevReportTime?2:(Date.now()-this._prevReportTime)/1e3}findTransceivers(){const e=this.peerConnection.getTransceivers();for(const t of e)if(t.receiver&&t.receiver.track){const{track:e}=t.receiver;"audio"===e.kind?this.audioTransceiver=t:"video"===e.kind&&(this.videoTransceiver=t)}}start(e,t=2e3){this.stop(),this.callback=e,this.collectStats(),this.timerId=window.setInterval((()=>{this.collectStats()}),t)}stop(){null!==this.timerId&&(clearInterval(this.timerId),this.timerId=null),this.callback=null,this.previousRawStats=null,this._prevReportTime=0}async collectStats(){if(this.callback)try{const e=await this.peerConnection.getStats(),t=new Set(["inbound-rtp","track","candidate-pair","media-source","codec"]),A=[];e.forEach((e=>t.has(e.type)&&A.push(e)));const i=Date.now(),o=this.parseAudioStats(A),r=this.parseVideoStats(A),n=this.parseNetworkStats(A);this._prevReportTime=i,this.callback({audio:o,video:r,network:n})}catch(e){this.core.log.error("Failed to collect WebRTC stats:",e)}}getDifferenceValue(e,t){if(this.core.utils.isUndefined(e))return t;const A=(t||0)-e;return A<0?0:A}parseAudioStats(e){var t,A,i,o;const r={bitrate:0,volume:0,packetLossRate:0,jitterBufferDelay:0,bytesReceived:0,packetsReceived:0,packetsLost:0};for(const n of e){if("inbound-rtp"===n.type&&("audio"===n.mediaType||"audio"===n.kind)){if(r.bytesReceived=n.bytesReceived||0,r.packetsReceived=n.packetsReceived||0,r.packetsLost=n.packetsLost||0,this.previousRawStats&&this.previousRawStats.audio){const e=this.getDifferenceValue(this.previousRawStats.audio.bytesReceived,r.bytesReceived);r.bitrate=Math.round(8*e/this.statInterval/1e3)}const e=this.getDifferenceValue(null==(t=this.previousRawStats)?void 0:t.audio.packetsLost,r.packetsLost),o=this.getDifferenceValue(null==(A=this.previousRawStats)?void 0:A.audio.packetsReceived,r.packetsReceived)+e;if(o>0&&(r.packetLossRate=Math.round(e/o*100)),this.core.utils.isUndefined(n.audioLevel)||(r.volume=n.audioLevel||0),n.jitterBufferDelay&&n.jitterBufferEmittedCount){let{jitterBufferEmittedCount:e}=n,{jitterBufferDelay:t}=n;(null==(i=this.previousRawStats)?void 0:i.audio)&&(e=this.getDifferenceValue(this.previousRawStats.audio.jitterBufferEmittedCount,n.jitterBufferEmittedCount),t=this.getDifferenceValue(this.previousRawStats.audio.jitterBufferDelay,n.jitterBufferDelay)),e>0&&(r.jitterBufferDelay=Math.floor(t/e*1e3)),this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.audio.jitterBufferDelay=n.jitterBufferDelay,this.previousRawStats.audio.jitterBufferEmittedCount=n.jitterBufferEmittedCount}this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.audio.bytesReceived=r.bytesReceived,this.previousRawStats.audio.packetsReceived=r.packetsReceived,this.previousRawStats.audio.packetsLost=r.packetsLost}!this.core.utils.isUndefined(n.audioLevel)&&(null==(o=this.audioTransceiver)?void 0:o.receiver.track)&&n.trackIdentifier===this.audioTransceiver.receiver.track.id&&(r.volume=n.audioLevel||0)}return r}parseVideoStats(e){var t,A,i,o,r;const n={bitrate:0,frameRate:0,width:0,height:0,packetLossRate:0,jitterBufferDelay:0,bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0};for(const s of e){if("codec"===s.type&&this._decodeMap.set(s.id,s),"inbound-rtp"===s.type&&("video"===s.mediaType||"video"===s.kind)){if(n.bytesReceived=s.bytesReceived||0,n.packetsReceived=s.packetsReceived||0,n.packetsLost=s.packetsLost||0,n.framesDecoded=s.framesDecoded||0,this.core.utils.isUndefined(s.framesPerSecond)||(n.frameRate=Math.round(s.framesPerSecond)),s.decoderImplementation&&this._prevDecoderImplementation!==s.decoderImplementation){const e=this._decodeMap.get(s.codecId),A=(null==(t=null==e?void 0:e.mimeType)?void 0:t.split("/")[1])||"unknown",i=s.powerEfficientDecoder;this.core.log.info(`decoderImplementation change to ${s.decoderImplementation}(${A}) HWDecoder: ${i}`),this._prevDecoderImplementation=s.decoderImplementation}if(this.previousRawStats&&this.previousRawStats.video){const e=this.getDifferenceValue(this.previousRawStats.video.bytesReceived,n.bytesReceived);n.bitrate=Math.round(8*e/this.statInterval/1e3)}const e=this.getDifferenceValue(null==(A=this.previousRawStats)?void 0:A.video.packetsLost,n.packetsLost),r=this.getDifferenceValue(null==(i=this.previousRawStats)?void 0:i.video.packetsReceived,n.packetsReceived)+e;if(r>0&&(n.packetLossRate=Math.round(e/r*100)),s.jitterBufferDelay&&s.jitterBufferEmittedCount){let{jitterBufferEmittedCount:e}=s,{jitterBufferDelay:t}=s;(null==(o=this.previousRawStats)?void 0:o.video)&&(e=this.getDifferenceValue(this.previousRawStats.video.jitterBufferEmittedCount,s.jitterBufferEmittedCount),t=this.getDifferenceValue(this.previousRawStats.video.jitterBufferDelay,s.jitterBufferDelay)),e>0&&(n.jitterBufferDelay=Math.floor(t/e*1e3)),this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.video.jitterBufferDelay=s.jitterBufferDelay,this.previousRawStats.video.jitterBufferEmittedCount=s.jitterBufferEmittedCount}this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.video.bytesReceived=n.bytesReceived,this.previousRawStats.video.packetsReceived=n.packetsReceived,this.previousRawStats.video.packetsLost=n.packetsLost}!this.core.utils.isUndefined(s.frameWidth)&&(null==(r=this.videoTransceiver)?void 0:r.receiver.track)&&s.trackIdentifier===this.videoTransceiver.receiver.track.id&&(n.width=s.frameWidth,n.height=s.frameHeight)}return n}parseNetworkStats(e){const t={rtt:0};for(const A of e)if("candidate-pair"===A.type&&(A.selected||"succeeded"===A.state)&&this.core.utils.isNumber(A.currentRoundTripTime)){t.rtt=Math.floor(1e3*A.currentRoundTripTime);break}return t}initPreviousRawStats(){this.previousRawStats={timestamp:Date.now(),audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0}}}}(this.peerConnection,this.core),this.stat.start((e=>{var t,A;return null==(A=null==(t=this.callback)?void 0:t.onStats)?void 0:A.call(t,e)})),await this.player.play(),this.isStarted=!0}connect(e){return new Promise(((t,A)=>{try{this.initScriptTransformWorker();const i={encodedInsertableStreams:this.enableSEI,iceServers:[],sdpSemantics:"unified-plan",bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",tcpCandidatePolicy:"disable",IceTransportsType:"nohost"},o=new RTCPeerConnection(i);this.peerConnection=o,o.onconnectionstatechange=()=>{this.connectionState=o.connectionState,this._log.info("connectionState",o.connectionState),"failed"!==o.connectionState&&"closed"!==o.connectionState||(this.isStarted?this.reconnect(e):A(new Error(`connection is ${o.connectionState}`))),"connected"===o.connectionState&&(this.logSelectedCandidate(),t())},o.ontrack=e=>this.onTrack(e),o.addTransceiver("audio",{direction:"recvonly"}),o.addTransceiver("video",{direction:"recvonly"}),this._log.info("createOffer"),o.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0,voiceActivityDetection:!1}).then((e=>(e.sdp=Fr(e.sdp),this._log.info("setOffer"),o.setLocalDescription(e)))).then((()=>{const t={sessionId:Gr(),streamurl:e,clientinfo:this.core.environment.getOSString(),localsdp:o.localDescription};return this.exchangeSDP(e,t)})).then((e=>(this._log.info("setAnswer"),o.setRemoteDescription(e)))).catch(A)}catch(e){A(e)}this.connectionTimeoutId=setTimeout((()=>A(new Error("connection timeout"))),1e4)}))}async exchangeSDP(e,t){let A,i,o;try{this._log.info("exchangeSDP");const r=sn(e);if(!r)throw new Error("streamDomain is empty");const{signalDomain:n,cached:s}=await this.fetchSignalDomain(r);if(!n)throw new Error("signalDomain is empty");{this._log.info("try exchangeSDP signalDomain:",n,s);const e=await this.doExchangeSDP(`https://${n}`,t,3);A=e.url,i=e.remoteSdp,o=e.svrSig}}catch(e){this._log.warn("exchangeSDP failed, fallback",e);const r=await this.core.utils.promiseAny(en.map((e=>this.doExchangeSDP(`https://${e}`,t,3))));A=r.url,i=r.remoteSdp,o=r.svrSig}return this.streamURL=e,this.signalURL=A,this.svrSig=o,i}async reconnect(e){if(!this.isReconnecting){this.isReconnecting=!0;try{this._log.warn("start reconnect"),await this.connect(e),this._log.warn("reconnect success")}catch(e){this._log.error("reconnect error",e)}finally{this.isReconnecting=!1}}}async logSelectedCandidate(){if(!this.peerConnection)return;const e=await this.peerConnection.getStats();for(const[t,A]of e)if(this.core.rtcDectection.isSelectedCandidatePair(A)){const t=e.get(A.localCandidateId),i=e.get(A.remoteCandidateId);t&&this._log.info(`local candidate: ${t.candidateType} ${t.protocol}:${t.ip||t.address}:${t.port} ${t.networkType||""} ${t.relayProtocol?`relayProtocol:${t.relayProtocol} url: ${t.url}`:""}`),i&&this._log.info(`remote candidate: ${i.candidateType} ${i.protocol}:${i.ip||i.address}:${i.port}`);break}}async doExchangeSDP(e,t,A){const i=`${e}/webrtc/v1/pullstream`,o=await on(i,t,{timeout:A}),{errcode:r,errmsg:n,remotesdp:s,svrsig:a}=o;if(0!==r){const e=new Error(`errCode:${r}, errMsg:${n}`);throw e.name="RequestSignalError",e}return{url:e,remoteSdp:s,svrSig:a}}createEncodedStreams(e){var t;if(this.enableSEI&&this.core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED)try{if(this._log.warn("enableSEI",this.enableSEI),!this.insertableStreamsAbortMap.has(e)){const A=e.createEncodedStreams(),i=new AbortController,o={abortController:i,enqueue:t=>"audio"===e.track.kind?t:this.decodeVideoFrame(t)};A.readable.pipeThrough(new TransformStream({transform:(e,t)=>{const A=o.enqueue(e);A&&t.enqueue(A)}})).pipeTo(A.writable,i).catch((e=>{"destroy"!==e&&this._log.warn(e)})),null==(t=this.insertableStreamsAbortMap.get(e))||t.abort("destroy"),this.insertableStreamsAbortMap.set(e,i)}}catch(t){this._log.warn(`createEncodedStreams ${e.track.kind} failed`,t)}}initReceiverTransform(e,t){this.peerConnection&&this.enableSEI&&this.scriptTransformWorker&&!e.transform&&(e.transform=new RTCRtpScriptTransform(this.scriptTransformWorker,{isReceiver:!0,isAudio:t,userId:"",streamType:this.core.enums.RemoteStreamType.Main}))}initScriptTransformWorker(){const{room:e,rtcDectection:t,createScriptTransformWorker:A,trtc:i,TRTC:o}=this.core;!this.enableSEI||t.IS_INSERTABLE_STREAM_SUPPORTED||this.scriptTransformWorker||t.IS_SCRIPT_TRANSFORM_SUPPORTED&&(this._log.info("initScriptTransformWorker"),this.scriptTransformWorker=A({videoEncodePipeline:e.videoManager.encodePipeline,videoDecodePipeline:e.videoManager.decodePipeline,audioEncodePipeline:e.audioManager.encodePipeline,audioDecodePipeline:e.audioManager.decodePipeline}),this.scriptTransformWorker.onmessage=e=>{var t,A;"sei"===e.data.type&&(null==(A=null==(t=this.callback)?void 0:t.onSEIMessage)||A.call(t,{data:e.data.data,seiPayloadType:e.data.seiPayloadType}))},this.scriptTransformWorker.onerror=e=>{this._log.error("scriptTransformWorker error: ",e.message)})}decodeVideoFrame(e){if(!this.core.room.videoManager)return e;for(const t of this.core.room.videoManager.decodePipeline)if(t&&!(e=t({frame:e})))return;return e}async fetchStopStream(){if(this.streamURL&&this.svrSig&&this.signalURL)try{const e=`${this.signalURL}/webrtc/v1/stopstream`,t=await on(e,{streamurl:this.streamURL,svrsig:this.svrSig},{timeout:3}),{errcode:A,errmsg:i}=t;if(0!==A)throw new Error(`errCode:${A}, errmsg:${i}`);return t}catch(e){this._log.error("fetchStopStream error",e)}}onTrack(e){const{track:t}=e;this.createEncodedStreams(e.receiver),this.initReceiverTransform(e.receiver,"audio"===t.kind),"audio"===t.kind?this.player.setAudioTrack(t):this.player.setVideoTrack(t)}async update(e){const{volume:t,muted:A,fillMode:i,action:o,fullScreen:r,pictureInPicture:n}=e;this.player.setMuted(A),this.player.setVolume(t),this.player.setFillMode(i),"pause"===o?this.player.pause():"resume"===o&&this.player.resume(),this.core.utils.isBoolean(r)&&(r?await this.player.enterFullscreen():await this.player.exitFullscreen()),this.core.utils.isBoolean(n)&&(n?await this.player.enterPictureInPicture():await this.player.exitPictureInPicture())}async stop(){this.isStopped=!0,this.player.stop(),this.peerConnection&&(clearTimeout(this.connectionTimeoutId),this.peerConnection.close(),this.peerConnection.getReceivers().forEach((e=>this.insertableStreamsAbortMap.delete(e))),delete this.peerConnection,await this.fetchStopStream(),delete this.streamURL,delete this.signalURL,delete this.svrSig),this.stat&&(this.stat.stop(),delete this.stat)}destroy(){this.stop(),this.core.innerEmitter.off(this.core.INNER_EVENT.SEI_MESSAGE,this.onSEIMessage,this)}onSEIMessage({room:e,nalu:t}){var A,i;e===this.core.room&&(null==(i=null==(A=this.callback)?void 0:A.onSEIMessage)||i.call(A,{data:t.seiPayload.buffer,seiPayloadType:t.seiPayloadType}))}async fetchSignalDomain(e,t=rn[0]){const A=`https://${t}/signal_query`;try{const t=window.localStorage.getItem(nn);if(t){const A=JSON.parse(t);if(A[e].expire-(new Date).getTime()>0)return{signalDomain:A[e].signal,cached:!0}}const i=await on(A,{domain:e,requestid:Gr(16),client_type:"Web",client_info:window.navigator.userAgent}),{errcode:o,data:r}=i;if(0===o){const{signal_domain:t,cache_time:A}=r;let i={};const o=window.localStorage.getItem(nn);o&&(i=JSON.parse(o)),i[e]={signal:t,expire:(new Date).getTime()+1e3*A};try{window.localStorage.setItem(nn,JSON.stringify(i))}catch(e){}return{signalDomain:t,cached:!1}}throw new Error(`errCode:${o}`)}catch(A){return this._log.error("fetchSignalDomain error",A),rn[1]&&t!==rn[1]?this.fetchSignalDomain(e,rn[1]):{signalDomain:"",cached:!1}}}};kr(tn,"Name","LEBPlayer"),Lr([function({settings:e={retries:5,timeout:2e3},onError:t,onRetrying:A,onRetryFailed:i}){return function(o,r,n){const s=xr({retryFunction:n.value,settings:e,onError({error:e,retry:A,reject:i,retryFuncArgs:n}){var s;t?t.call(this,e,(()=>{var t;(null==(t=Yr.get(o))?void 0:t.has(r))?A():i(e)}),i,n):(null==(s=Yr.get(o))?void 0:s.has(r))?A():i(e)},onRetrying(e,t){var i;Vr(A)&&A.call(this,e,t),(null==(i=Yr.get(o))?void 0:i.has(r))&&(Yr.get(o).get(r).stopRetry=t)},onRetryFailed:i});return n.value=function(...e){const t=Yr.get(o);return t?t.set(r,{args:e}):Yr.set(o,new Map([[r,{args:e}]])),s.apply(this,e).finally((()=>{var e;return null==(e=Yr.get(o))?void 0:e.delete(r)}))},n}}({settings:{retries:1/0,timeout:2e3},onRetrying(e){var t;if(this._log.warn(`retry connect ${e}`),e>=3&&(null==(t=this.callback)?void 0:t.onError)&&!this.isFireWallErrorEmitted){const{RtcError:e,ErrorCode:t,ErrorCodeDictionary:A}=this.core.errorModule;this.isFireWallErrorEmitted=!0,this.callback.onError(new e({code:t.OPERATION_FAILED,extraCode:A.FIREWALL_RESTRICTION,message:"firewall restriction"}))}},onError(e,t,A,i){var o;if(this._log.warn("connect failed",e),this.peerConnection&&(this.peerConnection.close(),delete this.peerConnection),!this.isStopped&&(null==(o=e.message||e)?void 0:o.includes("connection")))t();else{const{RtcError:t,ErrorCode:i}=this.core.errorModule;A(new t({code:i.UNKNOWN_ERROR,message:e.message}))}}})],tn.prototype,"connect",1),Lr([function({fnName:e,callback:t,validateArgs:A=!0}){return function(i,o,r){const n=r.value;return r.value=function(...o){var r,s;if(null==(r=Yr.get(i))?void 0:r.has(e)){const{stopRetry:r,args:n}=Yr.get(i).get(e);let a=!0;if(A)for(const e of n)if(!o.find((t=>t===e))){a=!1;break}a&&(t&&t.apply(this,o),r&&r(),null==(s=Yr.get(i))||s.delete(e))}return n.apply(this,o)},r}}({fnName:"connect"})],tn.prototype,"stop",1);var An=tn,on=async(e,t,A={})=>{const{timeout:i=10}=A;let o,r=0,n={};window.AbortController&&(o=new window.AbortController,n={signal:o.signal},r=window.setTimeout((()=>o.abort()),1e3*i));const s=await fetch(e,((e,t)=>{for(var A in t||(t={}))Mr.call(t,A)&&_r(e,A,t[A]);if(Sr)for(var A of Sr(t))Dr.call(t,A)&&_r(e,A,t[A]);return e})({body:JSON.stringify(t),cache:"no-cache",credentials:"same-origin",headers:{"content-type":"text/plain;charset=utf-8"},method:"POST",mode:"cors"},n));if(r&&window.clearTimeout(r),200!==s.status)throw new Error(`Network Error, status code:${s.status}`);return s.json()},rn=["webrtc-signal-scheduler.tlivesource.com","bak-webrtc-signal-scheduler.tlivesource.com"],nn="LEB_PLAYER_STORAGE_KEY",sn=e=>{const t=/^(?:webrtc:\/\/)([0-9.\-A-Za-z_]+)(?:\/)(?:[0-9.\-A-Za-z_=]+)(?:\/)(?:[^?#]*)(?:\?*)(?:[^?#]*)/.exec(e);return t?t[1]:""},an=Object.defineProperty,cn=(e,t,A)=>((e,t,A)=>t in e?an(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A)(e,"symbol"!=typeof t?t+"":t,A);var gn,un=(gn="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,A,i=e;i.ready=new Promise(((e,i)=>{t=e,A=i}));var o=Object.assign({},i),r="";"undefined"!=typeof document&&document.currentScript&&(r=document.currentScript.src),gn&&(r=gn),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 c,g,u,l,d,h,C,I,B=!1,E=[],p=[],Q=[],f=0,v=null;function y(e){i.onAbort&&i.onAbort(e),a(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw A(t),t}var T,m,R="data:application/octet-stream;base64,",w=e=>e.startsWith(R);function S(e){return Promise.resolve().then((()=>function(e){if(e==T&&n)return new Uint8Array(n);var t=function(e){if(w(e))return function(e){for(var t=atob(e),A=new Uint8Array(t.length),i=0;i<t.length;++i)A[i]=t.charCodeAt(i);return A}(e.slice(R.length))}(e);if(t)return t;throw"both async and sync fetching of the wasm failed"}(e)))}w(T="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/f38BfwKXARkBYQFhAAQBYQFiAAMBYQFjAAMBYQFkAAMBYQFlAA8BYQFmAAIBYQFnAAgBYQFoAAUBYQFpABABYQFqABEBYQFrABIBYQFsAAQBYQFtAAcBYQFuAAoBYQFvAAABYQFwAAQBYQFxAAsBYQFyAAEBYQFzAAQB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AiABKAIoNgIoIAIgASgCLDYCLCACIAEoAjA2AjAgAiABKAI0NgI0IAIgASgCODYCOCACIAEoAjw2AjwgAUFAayEBIAJBQGsiAiAFTQ0ACwsgAiAETw0BA0AgAiABKAIANgIAIAFBBGohASACQQRqIgIgBEkNAAsMAQsgA0EESQRAIAAhAgwBCyAAIANBBGsiBEsEQCAAIQIMAQsgACECA0AgAiABLQAAOgAAIAIgAS0AAToAASACIAEtAAI6AAIgAiABLQADOgADIAFBBGohASACQQRqIgIgBE0NAAsLIAIgA0kEQANAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANHDQALCyAACwsAIAEgAiAAEEIaCxIAIAFBAXRBwMoAakECIAAQQgv5AQEEfwJ/IAEQKiECIwBBEGsiBSQAAn8gAC0AC0EHdgRAIAAoAgQMAQsgAC0AC0H/AHELIgRBAE8EQAJAIAIgAC0AC0EHdgR/IAAoAghB/////wdxQQFrBUEKCyIDIARrTQRAIAJFDQECfyAALQALQQd2BEAgACgCAAwBCyAACyIDIAQEfyACIANqIAMgBBBFIAEgAkEAIAMgBGogAUsbQQAgASADTxtqBSABCyACEEUgACACIARqIgEQMSAFQQA6AA8gASADaiAFLQAPOgAADAELIAAgAyACIARqIANrIARBACACIAEQRAsgBUEQaiQAIAAMAQsQJwALC/ICAgJ/AX4CQCACRQ0AIAAgAToAACAAIAJqIgNBAWsgAToAACACQQNJDQAgACABOgACIAAgAToAASADQQNrIAE6AAAgA0ECayABOgAAIAJBB0kNACAAIAE6AAMgA0EEayABOgAAIAJBCUkNACAAQQAgAGtBA3EiBGoiAyABQf8BcUGBgoQIbCIBNgIAIAMgAiAEa0F8cSIEaiICQQRrIAE2AgAgBEEJSQ0AIAMgATYCCCADIAE2AgQgAkEIayABNgIAIAJBDGsgATYCACAEQRlJDQAgAyABNgIYIAMgATYCFCADIAE2AhAgAyABNgIMIAJBEGsgATYCACACQRRrIAE2AgAgAkEYayABNgIAIAJBHGsgATYCACAEIANBBHFBGHIiBGsiAkEgSQ0AIAGtQoGAgIAQfiEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkEgayICQR9LDQALCyAACwUAEAwAC1IBAn9BqNQAKAIAIgEgAEEHakF4cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQEUUNAQtBqNQAIAA2AgAgAQ8LQbjeAEEwNgIAQX8LgwECBX8BfgJAIABCgICAgBBUBEAgACEHDAELA0AgAUEBayIBIAAgAEIKgCIHQgp+fadBMHI6AAAgAEL/////nwFWIQUgByEAIAUNAAsLIAenIgIEQANAIAFBAWsiASACIAJBCm4iA0EKbGtBMHI6AAAgAkEJSyEGIAMhAiAGDQALCyABC3oBA38CQAJAIAAiAUEDcUUNACABLQAARQRAQQAPCwNAIAFBAWoiAUEDcUUNASABLQAADQALDAELA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsDQCACIgFBAWohAiABLQAADQALCyABIABrC78EAQl/AkACfyAALQALQQd2BEAgACgCBAwBCyAALQALQf8AcQsiAiABSQRAIwBBEGsiBiQAIAEgAmsiBQRAIAUgAC0AC0EHdgR/IAAoAghB/////wdxQQFrBUEKCyICAn8gAC0AC0EHdgRAIAAoAgQMAQsgAC0AC0H/AHELIgFrSwRAIwBBEGsiBCQAAkAgBSACayABaiIDQe////8HIAJrTQRAAn8gAC0AC0EHdgRAIAAoAgAMAQsgAAshByAEQQRqIgggACACQef///8DSQR/IAQgAkEBdDYCDCAEIAIgA2o2AgQjAEEQayIDJAAgCCgCACAEQQxqIgkoAgBJIQogA0EQaiQAIAkgCCAKGygCACIDQQtPBH8gA0EQakFwcSIDIANBAWsiAyADQQtGGwVBCgtBAWoFQe////8HCxAwIAQoAgQhAyAEKAIIGiABBEAgAyAHIAEQIwsgAkEKRwRAIAcQGQsgACADNgIAIAAgACgCCEGAgICAeHEgBCgCCEH/////B3FyNgIIIAAgACgCCEGAgICAeHI2AgggBEEQaiQADAELECcACy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GIARrIgQQQyABIAIgBGo2AgggAyABKAIMNgIQIAMgASgCCDYCFCABQRBqJAAgAyAAIAMoAhAgAGtqNgIMIAMgAiADKAIUIAJrajYCCCAFIAMoAgw2AgggBSADKAIINgIMIANBIGokACAFKAIMIQcgBUEQaiQAIAcLDwAgAgRAIAAgASACEDILC/UCAQV/IwBBEGsiByQAIAIgAUF/c0Hv////B2pNBEACfyAALQALQQd2BEAgACgCAAwBCyAACyEIIAdBBGoiCSAAIAFB5////wNJBH8gByABQQF0NgIMIAcgASACajYCBCMAQRBrIgIkACAJKAIAIAdBDGoiCigCAEkhCyACQRBqJAAgCiAJIAsbKAIAIgJBC08EfyACQRBqQXBxIgIgAkEBayICIAJBC0YbBUEKC0EBagVB7////wcLEDAgBygCBCECIAcoAggaIAQEQCACIAggBBAjCyAFBEAgAiAEaiAGIAUQIwsgAyAEayEGIAMgBEcEQCACIARqIAVqIAQgCGogBhAjCyABQQpHBEAgCBAZCyAAIAI2AgAgACAAKAIIQYCAgIB4cSAHKAIIQf////8HcXI2AgggACAAKAIIQYCAgIB4cjYCCCAAIAQgBWogBmoiADYCBCAHQQA6AAwgACACaiAHLQAMOgAAIAdBEGokAA8LECcACwoAIAAgASACEEMLuQEBBH8jAEEQayIEJAAgBCACNgIMIwBBoAFrIgMkACADIAAgA0GeAWogARsiBjYClAFBfyEFIAMgAUEBayIAQQAgACABTRs2ApgBIANBAEGQARAmIgBBfzYCTCAAQSA2AiQgAEF/NgJQIAAgAEGfAWo2AiwgACAAQZQBajYCVAJAIAFBAEgEQEG43gBBPTYCAAwBCyAGQQA6AAAgAEH9CiACQR8QTSEFCyAAQaABaiQAIARBEGokACAFCwQAIAALmQIAIABFBEBBAA8LAn8CQCAABH8gAUH/AE0NAQJAQYTWACgCACgCAEUEQCABQYB/cUGAvwNGDQMMAQsgAUH/D00EQCAAIAFBP3FBgAFyOgABIAAgAUEGdkHAAXI6AABBAgwECyABQYBAcUGAwANHIAFBgLADT3FFBEAgACABQT9xQYAB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AUEAEB4NABpBACABRQ0AGkEAIAFB3MwAECAiAUUNABogA0EMakEAQTQQJhogA0EBNgI4IANBfzYCFCADIAA2AhAgAyABNgIIIAEgA0EIaiACKAIAQQEgASgCACgCHBEGACADKAIgIgBBAUYEQCACIAMoAhg2AgALIABBAUYLIQQgA0FAayQAIAQLCgAgACABQQAQHgtOAgF/AXwjAEEQayICJAAgAkEANgIMIAEoAgRBpM8AIAJBDGoQCSEDIAIoAgwiAQRAIAEQAQsgACADRAAAAAAAAAAAYjoAOCACQRBqJAALNwEBfyMAQRBrIgIkACACIAEtADg2AgggAEGkzwAgAkEIahAHNgIEIABBpNUANgIAIAJBEGokAAuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECIaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECIaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACC5wBAQJ/IwBBEGsiAiQAQcgAEBwhASAAKAIEIgAQAiACIAA2AgggAUGcLSACQQhqEAc2AgQgAUGk1QA2AgAgAUEBNgIcIAFBpNUANgIYIAFBATYCFCABQaTVADYCECABQQE2AgwgAUGk1QA2AgggAUEAOgAgIAFBADYCRCABQoCAgIAwNwI8IAFBADsANyABQQA7ACsgAkEQaiQAIAELigUCBn4CfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIQkgASkDACEDIAEpAwghBSMAQSBrIgAkAAJAIAVC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBUIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAhSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBUIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIBQZH3AEkNACADIQIgBUL///////8/g0KAgICAgIDAAIQiBCEGAkAgAUGB9wBrIghBwABxBEAgAyAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgeGIAJBwAAgCGutiIQhBiACIAeGIQILIAAgAjcDECAAIAY3AxgCQEGB+AAgAWsiAUHAAHEEQCAEIAFBQGqtiCEDQgAhBAwBCyABRQ0AIARBwAAgAWuthiADIAGtIgKIhCEDIAQgAoghBAsgACADNwMAIAAgBDcDCCAAKQMIQgSGIAApAwAiA0I8iIQhAiAAKQMQIAApAxiEQgBSrSADQv//////////D4OEIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILIABBIGokACAJIAIgBUKAgICAgICAgIB/g4S/OQMAC0ABAn8jAEEQayICJAAgAiABNgIMIAJBpNUANgIIIAJBCGogABEBACEDIAIoAgwiAQRAIAEQAwsgAkEQaiQAIAMLBABCAAsEAEEAC/YCAQh/IwBBIGsiAyQAIAMgACgCHCIENgIQIAAoAhQhBSADIAI2AhwgAyABNgIYIAMgBSAEayIBNgIUIAEgAmohBUECIQcCfwJAAkACQCAAKAI8IANBEGoiAUECIANBDGoQDSIEBH9BuN4AIAQ2AgBBfwVBAAsEQCABIQQMAQsDQCAFIAMoAgwiBkYNAiAGQQBIBEAgASEEDAQLIAEgBiABKAIEIghLIglBA3RqIgQgBiAIQQAgCRtrIgggBCgCAGo2AgAgAUEMQQQgCRtqIgEgASgCACAIazYCACAFIAZrIQUgACgCPCAEIgEgByAJayIHIANBDGoQDSIGBH9BuN4AIAY2AgBBfwVBAAtFDQALCyAFQX9HDQELIAAgACgCLCIBNgIcIAAgATYCFCAAIAEgACgCMGo2AhAgAgwBCyAAQQA2AhwgAEIANwMQIAAgACgCAEEgcjYCAEEAIAdBAkYNABogAiAEKAIEawshCi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X2Z1bmRhbWVudGFsX3R5cGVfaW5mb0UAeCgAAFQnAAAsJgAAdgAAAEAnAACIJwAARG4AAEAnAACUJwAAYgAAAEAnAACgJwAAYwAAAEAnAACsJwAAaAAAAEAnAAC4JwAAYQAAAEAnAADEJwAAcwAAAEAnAADQJwAAdAAAAEAnAADcJwAAaQAAAEAnAADoJwAAagAAAEAnAAD0JwAAbAAAAEAnAAAAKAAAbQAAAEAnAAAMKAAAeAAAAEAnAAAYKAAAeQAAAEAnAAAkKAAAZgAAAEAnAAAwKAAAZAAAAEAnAAA8KAAAAAAAAFwmAAAhAAAAJgAAACMAAAAkAAAAJwAAACgAAAApAAAAKgAAAAAAAADAKAAAIQAAACsAAAAjAAAAJAAAACcAAAAsAAAALQAAAC4AAABOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UAAAAAeCgAAJgoAABcJgAAAAAAALwmAAAhAAAALwAAACMAAAAkAAAAMAAAAAAAAAAMKQAAMQAAADIAAAAzAAAAU3Q5ZXhjZXB0aW9uAAAAAFAoAAD8KAAAAAAAADgpAAAYAAAANAAAADUAAABTdDExbG9naWNfZXJyb3IAeCgAACgpAAAMKQAAAAAAAGwpAAAYAAAANgAAADUAAABTdDEybGVuZ3RoX2Vycm9yAAAAAHgoAABYKQAAOCkAAFN0OXR5cGVfaW5mbwAAAABQKAAAeCkAQZDTAAsJ2hQAAAAAAAAFAEGk0wALARsAQbzTAAsOHAAAAB0AAAA4KwAAAAQAQdTTAAsBAQBB5NMACwX/////CgBBqNQACwMwMQE=")||(m=T,T=i.locateFile?i.locateFile(m,r):r+m);var b=e=>{for(;e.length>0;)e.shift()(i)};function M(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){h[this.ptr+4>>2]=e},this.get_type=function(){return h[this.ptr+4>>2]},this.set_destructor=function(e){h[this.ptr+8>>2]=e},this.get_destructor=function(){return h[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,c[this.ptr+12|0]=e},this.get_caught=function(){return 0!=c[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,c[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=c[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){h[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return h[this.ptr+16>>2]},this.get_exception_ptr=function(){if(et(this.get_type()))return h[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var D,_,L,k=e=>{for(var t="",A=e;g[A];)t+=D[g[A++]];return t},N={},P={},F={},G=e=>{throw new _(e)},V=e=>{throw new L(e)},x=(e,t,A)=>{function i(t){var i=A(t);i.length!==e.length&&V("Mismatched type converter count");for(var o=0;o<e.length;++o)Y(e[o],i[o])}e.forEach((function(e){F[e]=t}));var o=new Array(t.length),r=[],n=0;t.forEach(((e,t)=>{P.hasOwnProperty(e)?o[t]=P[e]:(r.push(e),N.hasOwnProperty(e)||(N[e]=[]),N[e].push((()=>{o[t]=P[e],++n===r.length&&i(o)})))})),0===r.length&&i(o)};function Y(e,t,A={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,A={}){var i=t.name;if(e||G(`type "${i}" must have a positive integer typeid pointer`),P.hasOwnProperty(e)){if(A.ignoreDuplicateRegistrations)return;G(`Cannot register type '${i}' twice`)}if(P[e]=t,delete F[e],N.hasOwnProperty(e)){var o=N[e];delete N[e],o.forEach((e=>e()))}}(e,t,A)}var H,U=e=>{G(e.$$.ptrType.registeredClass.name+" instance already deleted")},O=!1,J=e=>{},K=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,t,A)=>{if(t===A)return e;if(void 0===A.baseClass)return null;var i=j(e,t,A.baseClass);return null===i?null:A.downcast(i)},W={},z=[],Z=()=>{for(;z.length;){var e=z.pop();e.$$.deleteScheduled=!1,e.delete()}},q={},X=(e,t)=>(t.ptrType&&t.ptr||V("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&V("Both smartPtrType and smartPtr must be specified"),t.count={value:1},$(Object.create(e,{$$:{value:t}}))),$=e=>"undefined"==typeof FinalizationRegistry?($=e=>e,e):(O=new FinalizationRegistry((e=>{K(e.$$)})),J=e=>O.unregister(e),($=e=>{var t=e.$$;if(t.smartPtr){var A={$$:t};O.register(e,A,e)}return e})(e));function ee(){}var te=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ae=(e,t,A)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||G(`Function '${A}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}};function ie(e,t,A,i,o,r,n,s){this.name=e,this.constructor=t,this.instancePrototype=A,this.rawDestructor=i,this.baseClass=o,this.getActualType=r,this.upcast=n,this.downcast=s,this.pureVirtualFunctions=[]}var oe=(e,t,A)=>{for(;t!==A;)t.upcast||G(`Expected null or instance of ${A.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function re(e,t){if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`);var A=t.$$.ptrType.registeredClass;return oe(t.$$.ptr,A,this.registeredClass)}function ne(e,t){var A;if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),this.isSmartPointer?(A=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,A),A):0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(A=oe(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&G("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?A=t.$$.smartPtr:G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:A=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)A=t.$$.smartPtr;else{var o=t.clone();A=this.rawShare(A,me.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,A)}break;default:G("Unsupporting sharing policy")}return A}function se(e,t){if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var A=t.$$.ptrType.registeredClass;return oe(t.$$.ptr,A,this.registeredClass)}function ae(e){return this.fromWireType(h[e>>2])}function ce(e,t,A,i,o,r,n,s,a,c,g){this.name=e,this.registeredClass=t,this.isReference=A,this.isConst=i,this.isSmartPointer=o,this.pointeeType=r,this.sharingPolicy=n,this.rawGetPointee=s,this.rawConstructor=a,this.rawShare=c,this.rawDestructor=g,o||void 0!==t.baseClass?this.toWireType=ne:i?(this.toWireType=re,this.destructorFunction=null):(this.toWireType=se,this.destructorFunction=null)}var ge,ue,le=[],de=e=>{var t=le[e];return t||(e>=le.length&&(le.length=e+1),le[e]=t=ge.get(e)),t},he=(e,t,A)=>e.includes("j")?((e,t,A)=>{var o=i["dynCall_"+e];return A&&A.length?o.apply(null,[t].concat(A)):o.call(null,t)})(e,t,A):de(t).apply(null,A),Ce=(e,t)=>{var A,i,o,r=(e=k(e)).includes("j")?(A=e,i=t,o=[],function(){return o.length=0,Object.assign(o,arguments),he(A,i,o)}):de(t);return"function"!=typeof r&&G(`unknown function pointer with signature ${e}: ${t}`),r},Ie=e=>{var t=Xe(e),A=k(t);return $e(t),A},Be=(e,t)=>{var A=[],i={};throw t.forEach((function e(t){i[t]||P[t]||(F[t]?F[t].forEach(e):(A.push(t),i[t]=!0))})),new ue(`${e}: `+A.map(Ie).join([", "]))},Ee=(e,t)=>{for(var A=[],i=0;i<e;i++)A.push(h[t+4*i>>2]);return A},pe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Qe(e,t,A,i,o,r){var n=t.length;n<2&&G("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==A,a=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){a=!0;break}var g="void"!==t[0].name,u=n-2,l=new Array(u),d=[],h=[];return te(e,(function(){var A;arguments.length!==u&&G(`function ${e} called with ${arguments.length} arguments, expected ${u}`),h.length=0,d.length=s?2:1,d[0]=o,s&&(A=t[1].toWireType(h,this),d[1]=A);for(var r=0;r<u;++r)l[r]=t[r+2].toWireType(h,arguments[r]),d.push(l[r]);return function(e){if(a)pe(h);else for(var i=s?1:2;i<t.length;i++){var o=1===i?A:l[i-2];null!==t[i].destructorFunction&&t[i].destructorFunction(o)}if(g)return t[0].fromWireType(e)}(i.apply(null,d))}))}var fe=(e,t,A)=>(e instanceof Object||G(`${A} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||G(`${A} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||G(`cannot call emscripten binding method ${A} on deleted object`),oe(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass));function ve(){this.allocated=[void 0],this.freelist=[]}var ye=new ve,Te=e=>{e>=ye.reserved&&0==--ye.get(e).refcount&&ye.free(e)},me={toValue:e=>(e||G("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(d[e>>2])}var we,Se,be=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Me=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(I[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},De=(e,t,A)=>{switch(t){case 1:return A?e=>c[0|e]:e=>g[0|e];case 2:return A?e=>u[e>>1]:e=>l[e>>1];case 4:return A?e=>d[e>>2]:e=>h[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},_e="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Le=(e,t,A)=>{for(var i=t+A,o=t;e[o]&&!(o>=i);)++o;if(o-t>16&&e.buffer&&_e)return _e.decode(e.subarray(t,o));for(var r="";t<o;){var n=e[t++];if(128&n){var s=63&e[t++];if(192!=(224&n)){var a=63&e[t++];if((n=224==(240&n)?(15&n)<<12|s<<6|a:(7&n)<<18|s<<12|a<<6|63&e[t++])<65536)r+=String.fromCharCode(n);else{var c=n-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&n)<<6|s)}else r+=String.fromCharCode(n)}return r},ke=(e,t)=>e?Le(g,e,t):"",Ne="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Pe=(e,t)=>{for(var A=e,i=A>>1,o=i+t/2;!(i>=o)&&l[i];)++i;if((A=i<<1)-e>32&&Ne)return Ne.decode(g.subarray(e,A));for(var r="",n=0;!(n>=t/2);++n){var s=u[e+2*n>>1];if(0==s)break;r+=String.fromCharCode(s)}return r},Fe=(e,t,A)=>{if(void 0===A&&(A=2147483647),A<2)return 0;for(var i=t,o=(A-=2)<2*e.length?A/2:e.length,r=0;r<o;++r){var n=e.charCodeAt(r);u[t>>1]=n,t+=2}return u[t>>1]=0,t-i},Ge=e=>2*e.length,Ve=(e,t)=>{for(var A=0,i="";!(A>=t/4);){var o=d[e+4*A>>2];if(0==o)break;if(++A,o>=65536){var r=o-65536;i+=String.fromCharCode(55296|r>>10,56320|1023&r)}else i+=String.fromCharCode(o)}return i},xe=(e,t,A)=>{if(void 0===A&&(A=2147483647),A<4)return 0;for(var i=t,o=i+A-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)),d[t>>2]=n,(t+=4)+4>o)break}return d[t>>2]=0,t-i},Ye=e=>{for(var t=0,A=0;A<e.length;++A){var i=e.charCodeAt(A);i>=55296&&i<=57343&&++A,t+=4}return t},He=(e,t)=>{var A=P[e];return void 0===A&&G(t+" has unknown type "+Ie(e)),A},Ue=(e,t,A)=>{var i=[],o=e.toWireType(i,A);return i.length&&(h[t>>2]=me.toHandle(i)),o},Oe={},Je=[],Ke=Reflect.construct,je=[null,[],[]];(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);D=e})(),_=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},L=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 t=this.$$.ptrType.registeredClass,A=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)A=t.upcast(A),t=t.baseClass;for(;i.baseClass;)o=i.upcast(o),i=i.baseClass;return t===i&&A===o},clone(){if(this.$$.ptr||U(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=$(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 t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||U(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&G("Object already scheduled for deletion"),J(this),K(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&&G("Object already scheduled for deletion"),z.push(this),1===z.length&&H&&H(Z),this.$$.deleteScheduled=!0,this}}),i.getInheritedInstanceCount=()=>Object.keys(q).length,i.getLiveInheritedInstances=()=>{var e=[];for(var t in q)q.hasOwnProperty(t)&&e.push(q[t]);return e},i.flushPendingDeletes=Z,i.setDelayFunction=e=>{H=e,z.length&&H&&H(Z)},Object.assign(ce.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 t=this.getPointee(e);if(!t)return this.destructor(e),null;var A=((e,t)=>(t=((e,t)=>{for(void 0===t&&G("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),q[t]))(this.registeredClass,t);if(void 0!==A){if(0===A.$$.count.value)return A.$$.ptr=t,A.$$.smartPtr=e,A.clone();var i=A.clone();return this.destructor(e),i}function o(){return this.isSmartPointer?X(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):X(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var r,n=this.registeredClass.getActualType(t),s=W[n];if(!s)return o.call(this);r=this.isConst?s.constPointerType:s.pointerType;var a=j(t,this.registeredClass,r.registeredClass);return null===a?o.call(this):this.isSmartPointer?X(r.registeredClass.instancePrototype,{ptrType:r,ptr:a,smartPtrType:this,smartPtr:e}):X(r.registeredClass.instancePrototype,{ptrType:r,ptr:a})}}),ue=i.UnboundTypeError=(we=Error,(Se=te("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.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(ve.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},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,t=ye.reserved;t<ye.allocated.length;++t)void 0!==ye.allocated[t]&&++e;return e};var We,ze={w:(e,t,A)=>{throw new M(e).init(t,A),e},q:(e,t,A,i,o)=>{},u:(e,t,A,i)=>{Y(e,{name:t=k(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?A:i},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},y:(e,t,A,o,r,n,s,a,c,g,u,l,d)=>{u=k(u),n=Ce(r,n),a&&(a=Ce(s,a)),g&&(g=Ce(c,g)),d=Ce(l,d);var h=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);((e,t,A)=>{i.hasOwnProperty(e)?(G(`Cannot register public name '${e}' twice`),Ae(i,e,e),i.hasOwnProperty(A)&&G(`Cannot register multiple overloads of a function with the same number of arguments (${A})!`),i[e].overloadTable[A]=t):i[e]=t})(h,(function(){Be(`Cannot construct ${u} due to unbound types`,[o])})),x([e,t,A],o?[o]:[],(function(t){var A,r;t=t[0],r=o?(A=t.registeredClass).instancePrototype:ee.prototype;var s=te(u,(function(){if(Object.getPrototypeOf(this)!==c)throw new _("Use 'new' to construct "+u);if(void 0===l.constructor_body)throw new _(u+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new _(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(l.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(r,{constructor:{value:s}});s.prototype=c;var l=new ie(u,s,c,d,A,n,a,g);l.baseClass&&(void 0===l.baseClass.__derivedClasses&&(l.baseClass.__derivedClasses=[]),l.baseClass.__derivedClasses.push(l));var C=new ce(u,l,!0,!1,!1),I=new ce(u+"*",l,!1,!1,!1),B=new ce(u+" const*",l,!1,!0,!1);return W[e]={pointerType:I,constPointerType:B},((e,t,A)=>{i.hasOwnProperty(e)||V("Replacing nonexistant public symbol"),i[e].overloadTable,i[e]=t,i[e].argCount=A})(h,s),[C,I,B]}))},x:(e,t,A,i,o,r)=>{var n=Ee(t,A);o=Ce(i,o),x([],[e],(function(e){var A=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new _(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Be(`Cannot construct ${e.name} due to unbound types`,n)},x([],n,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Qe(A,i,null,o,r),[]))),[]}))},i:(e,t,A,i,o,r,n,s,a)=>{var c=Ee(A,i);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e})(t=k(t)),r=Ce(o,r),x([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function o(){Be(`Cannot call ${i} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var a=e.registeredClass.instancePrototype,g=a[t];return void 0===g||void 0===g.overloadTable&&g.className!==e.name&&g.argCount===A-2?(o.argCount=A-2,o.className=e.name,a[t]=o):(Ae(a,t,i),a[t].overloadTable[A-2]=o),x([],c,(function(o){var s=Qe(i,o,e,r,n);return void 0===a[t].overloadTable?(s.argCount=A-2,a[t]=s):a[t].overloadTable[A-2]=s,[]})),[]}))},k:(e,t,A,i,o,r,n,s,a,c)=>{t=k(t),o=Ce(i,o),x([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,g={get(){Be(`Cannot access ${i} due to unbound types`,[A,n])},enumerable:!0,configurable:!0};return g.set=a?()=>Be(`Cannot access ${i} due to unbound types`,[A,n]):e=>G(i+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,g),x([],a?[A,n]:[A],(function(A){var n=A[0],g={get(){var t=fe(this,e,i+" getter");return n.fromWireType(o(r,t))},enumerable:!0};if(a){a=Ce(s,a);var u=A[1];g.set=function(t){var A=fe(this,e,i+" setter"),o=[];a(c,A,u.toWireType(o,t)),pe(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,g),[]})),[]}))},t:(e,t)=>{Y(e,{name:t=k(t),fromWireType:e=>{var t=me.toValue(e);return Te(e),t},toWireType:(e,t)=>me.toHandle(t),argPackAdvance:8,readValueFromPointer:Re,destructorFunction:null})},p:(e,t,A)=>{Y(e,{name:t=k(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:Me(t,A),destructorFunction:null})},g:(e,t,A,i,o)=>{t=k(t);var r=e=>e;if(0===i){var n=32-8*A;r=e=>e<<n>>>n}var s=t.includes("unsigned");Y(e,{name:t,fromWireType:r,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:De(t,A,0!==i),destructorFunction:null})},a:(e,t,A)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=h[e>>2],A=h[e+4>>2];return new i(c.buffer,A,t)}Y(e,{name:A=k(A),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},o:(e,t)=>{var A="std::string"===(t=k(t));Y(e,{name:t,fromWireType(e){var t,i=h[e>>2],o=e+4;if(A)for(var r=o,n=0;n<=i;++n){var s=o+n;if(n==i||0==g[s]){var a=ke(r,s-r);void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),r=s+1}}else{var c=new Array(i);for(n=0;n<i;++n)c[n]=String.fromCharCode(g[o+n]);t=c.join("")}return $e(e),t},toWireType(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||G("Cannot pass non-string to std::string"),i=A&&o?(e=>{for(var t=0,A=0;A<e.length;++A){var i=e.charCodeAt(A);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++A):t+=3}return t})(t):t.length;var r=qe(4+i+1),n=r+4;if(h[r>>2]=i,A&&o)((e,t,A,i)=>{if(!(i>0))return 0;for(var o=A+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(A>=o)break;t[A++]=n}else if(n<=2047){if(A+1>=o)break;t[A++]=192|n>>6,t[A++]=128|63&n}else if(n<=65535){if(A+2>=o)break;t[A++]=224|n>>12,t[A++]=128|n>>6&63,t[A++]=128|63&n}else{if(A+3>=o)break;t[A++]=240|n>>18,t[A++]=128|n>>12&63,t[A++]=128|n>>6&63,t[A++]=128|63&n}}t[A]=0})(t,g,n,i+1);else if(o)for(var s=0;s<i;++s){var a=t.charCodeAt(s);a>255&&($e(n),G("String has UTF-16 code units that do not fit in 8 bits")),g[n+s]=a}else for(s=0;s<i;++s)g[n+s]=t[s];return null!==e&&e.push($e,r),r},argPackAdvance:8,readValueFromPointer:ae,destructorFunction(e){$e(e)}})},l:(e,t,A)=>{var i,o,r,n,s;A=k(A),2===t?(i=Pe,o=Fe,n=Ge,r=()=>l,s=1):4===t&&(i=Ve,o=xe,n=Ye,r=()=>h,s=2),Y(e,{name:A,fromWireType:e=>{for(var A,o=h[e>>2],n=r(),a=e+4,c=0;c<=o;++c){var g=e+4+c*t;if(c==o||0==n[g>>s]){var u=i(a,g-a);void 0===A?A=u:(A+=String.fromCharCode(0),A+=u),a=g+t}}return $e(e),A},toWireType:(e,i)=>{"string"!=typeof i&&G(`Cannot pass non-string to C++ string type ${A}`);var r=n(i),a=qe(4+r+t);return h[a>>2]=r>>s,o(i,a+4,r+t),null!==e&&e.push($e,a),a},argPackAdvance:8,readValueFromPointer:Re,destructorFunction(e){$e(e)}})},v:(e,t)=>{Y(e,{isVoid:!0,name:t=k(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},j:(e,t,A)=>(e=me.toValue(e),t=He(t,"emval::as"),Ue(t,A,e)),e:(e,t,A,i,o)=>{var r,n;return(e=Je[e])(t=me.toValue(t),t[A=void 0===(n=Oe[r=A])?k(r):n],i,o)},d:Te,f:(e,t,A)=>{var i=((e,t)=>{for(var A=new Array(e),i=0;i<e;++i)A[i]=He(h[t+4*i>>2],"parameter "+i);return A})(e,t),o=i.shift();e--;var r,n,s=new Array(e),a=`methodCaller<(${i.map((e=>e.name)).join(", ")}) => ${o.name}>`;return r=te(a,((t,r,n,a)=>{for(var c=0,g=0;g<e;++g)s[g]=i[g].readValueFromPointer(a+c),c+=i[g].argPackAdvance;var u=1===A?Ke(r,s):r.apply(t,s);for(g=0;g<e;++g)i[g].deleteObject&&i[g].deleteObject(s[g]);return Ue(o,n,u)})),n=Je.length,Je.push(r),n},c:e=>{e>4&&(ye.get(e).refcount+=1)},b:e=>{var t=me.toValue(e);pe(t),Te(e)},h:(e,t)=>{var A=(e=He(e,"_emval_take_value")).readValueFromPointer(t);return me.toHandle(A)},m:()=>{y("")},s:(e,t,A)=>g.copyWithin(e,t,t+A),r:e=>{g.length,y("OOM")},n:(e,t,A,i)=>{for(var o,r,n,c=0,u=0;u<A;u++){var l=h[t>>2],d=h[t+4>>2];t+=8;for(var C=0;C<d;C++)o=e,r=g[l+C],n=void 0,n=je[o],0===r||10===r?((1===o?s:a)(Le(n,0)),n.length=0):n.push(r);c+=d}return h[i>>2]=c,0}},Ze=function(){var e={a:ze};function t(e,t){var A,o;return Ze=e.exports,A=Ze.z.buffer,i.HEAP8=c=new Int8Array(A),i.HEAP16=u=new Int16Array(A),i.HEAPU8=g=new Uint8Array(A),i.HEAPU16=l=new Uint16Array(A),i.HEAP32=d=new Int32Array(A),i.HEAPU32=h=new Uint32Array(A),i.HEAPF32=C=new Float32Array(A),i.HEAPF64=I=new Float64Array(A),ge=Ze.C,o=Ze.A,p.unshift(o),function(){if(f--,i.monitorRunDependencies&&i.monitorRunDependencies(f),0==f&&v){var e=v;v=null,e()}}(),Ze}if(f++,i.monitorRunDependencies&&i.monitorRunDependencies(f),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){a(`Module.instantiateWasm callback failed with error: ${e}`),A(e)}return function(e,t,A,i){return function(e,t,A){return S(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(A,(e=>{a(`failed to asynchronously prepare wasm: ${e}`),y(e)}))}(t,A,i)}(0,T,e,(function(e){t(e.instance)})).catch(A),{}}(),qe=e=>(qe=Ze.B)(e),Xe=e=>(Xe=Ze.D)(e),$e=e=>($e=Ze.E)(e),et=e=>(et=Ze.F)(e);function tt(){function e(){We||(We=!0,i.calledRun=!0,B||(b(p),t(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(),Q.unshift(e);var e;b(Q)}()))}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;b(E)}(),f>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,t,A,o,r)=>(i.dynCall_jiji=Ze.G)(e,t,A,o,r),i._vertexShaderSource=10640,v=function e(){We||tt(),We||(v=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return tt(),e.ready}),ln=un,dn=0,hn=class e{constructor(e){this.core=e,cn(this,"seq"),cn(this,"_core"),cn(this,"log"),cn(this,"beautyParams"),dn+=1,this.seq=dn,this._core=e,this.log=e.log.createChild({id:`${this.getAlias()}${dn}`}),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(t,A,i,o){const{RtcError:r,ErrorCode:n,ErrorCodeDictionary:s}=e.errorModule;if(e.utils.isOverseaSdkAppId(t.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 ln()),this._core.room.videoManager.renderMode="webgl";const t=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,A=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:t,brightness:A,ruddy:i})}async update(e){const t=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,A=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:t,brightness:A,ruddy:i})}async stop(){return this._core.room.videoManager.renderMode="auto",this._core.room.videoManager.stopBeauty()}destroy(){this._core.room.videoManager.renderMode="auto"}};cn(hn,"Name","BasicBeauty");var Cn,In,Bn,En=hn;e.TRTCMediaMixingErrorCode=void 0,(Cn=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[Cn.Success=0]="Success",Cn[Cn.Error=-1]="Error",Cn[Cn.InvalidParams=-2]="InvalidParams",Cn[Cn.NotFoundSource=-3]="NotFoundSource",Cn[Cn.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",Cn[Cn.CameraNotAuthorized=-5]="CameraNotAuthorized",Cn[Cn.CameraIsOccupied=-6]="CameraIsOccupied",Cn[Cn.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(In=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[In.kCamera=0]="kCamera",In[In.kScreen=1]="kScreen",In[In.kImage=2]="kImage",In[In.kPhoneMirror=4]="kPhoneMirror",In[In.kText=5]="kText",In[In.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(Bn=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",Bn.onSourceMoved="onSourceMoved",Bn.onSourceResized="onSourceResized",Bn.onRightButtonClicked="onRightButtonClicked",Bn.onError="onError",Bn.onSourcePlugged="onSourcePlugged",Bn.onSourceConnected="onSourceConnected",Bn.onSourceDisconnected="onSourceDisconnected",Bn.onSourceUnplugged="onSourceUnplugged",Bn.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var pn,Qn=function(){function e(e,t){if(this.logRegion="tc",this.loggerManager=e,t){var A=t.sdkAppId,i=t.userId,o=t.seq;this.seq=o,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(o),userId:i,sdkAppId:A}))}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 A=[];return Object.keys(e).forEach((function(i){return A[i]=t.getStringifyMessage(e[i])})),JSON.stringify(A)}if(e instanceof Object){var i={};return Object.keys(e).forEach((function(A){return i[A]=t.getStringifyMessage(e[A])})),JSON.stringify(i)}return e},e.prototype.update=function(e){var t=e.userId,A=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:t,sdkAppId:A}))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(A)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger.debug(A)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(A)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(A)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(A)},e}(),fn=new Qn(null),vn=function(){function e(e,t,A){void 0===A&&(A={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:!!A.calcPositionOnly||!1,canExceedContainer:!!A.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"):fn.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 fn.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),A=e.screenY-(this.moveStartOfTop||0);Math.abs(t)>=5||Math.abs(A)>=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)):fn.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,A=e.screenY-this.moveStartOfTop,i=this.originLeft+t,o=this.originTop+A,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 fn.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 A=this.callbacksMap.get(e);A?A.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var A=this.callbacksMap.get(e);A&&(A=A.filter((function(e){return e!=t})),this.callbacksMap.set(e,A))},e.prototype.emit=function(e){for(var t=[],A=1;A<arguments.length;A++)t[A-1]=arguments[A];var i=this.callbacksMap.get(e);i&&i.forEach((function(e){try{e.apply(null,t)}catch(A){console.error("[Movable]emit error:",e,A)}}))},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"}(pn||(pn={}));var yn="trtc-resizable-top-left-anchor",Tn="trtc-resizable-top-anchor",mn="trtc-resizable-top-right-anchor",Rn="trtc-resizable-left-anchor",wn="trtc-resizable-right-anchor",Sn="trtc-resizable-bottom-left-anchor",bn="trtc-resizable-bottom-anchor",Mn="trtc-resizable-bottom-right-anchor",Dn={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 _n(e,t){for(var A in t)e.style[A]=t[A]}var Ln=function(){function e(e,t,A){void 0===A&&(A={keepRatio:!1,stopPropagation:!1,anchorMode:pn.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:pn.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:!!A.keepRatio||!1,stopPropagation:!!A.stopPropagation||!1,anchorMode:A.anchorMode||pn.Both,canExceedContainer:!!A.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,A,i,o,r,n,s,a=document.createElement("div");a.className="trtc-resizable-resize-anchor ".concat(yn),_n(a,Object.assign({},Dn.resizeAnchor,Dn.topLeftAnchor)),this.topLeftAnchor=a;var c=document.createElement("div");c.className="trtc-resizable-resize-anchor ".concat(Tn),_n(c,Object.assign({},Dn.resizeAnchor,Dn.topAnchor)),this.topAnchor=c;var g=document.createElement("div");g.className="trtc-resizable-resize-anchor ".concat(mn),_n(g,Object.assign({},Dn.resizeAnchor,Dn.topRightAnchor)),this.topRightAnchor=g;var u=document.createElement("div");u.className="trtc-resizable-resize-anchor ".concat(Rn),_n(u,Object.assign({},Dn.resizeAnchor,Dn.leftAnchor)),this.leftAnchor=u;var l=document.createElement("div");l.className="trtc-resizable-resize-anchor ".concat(wn),_n(l,Object.assign({},Dn.resizeAnchor,Dn.rightAnchor)),this.rightAnchor=l;var d=document.createElement("div");d.className="trtc-resizable-resize-anchor ".concat(Sn),_n(d,Object.assign({},Dn.resizeAnchor,Dn.bottomLeftAnchor)),this.bottomLeftAnchor=d;var h=document.createElement("div");h.className="trtc-resizable-resize-anchor ".concat(bn),_n(h,Object.assign({},Dn.resizeAnchor,Dn.bottomAnchor)),this.bottomAnchor=h;var C=document.createElement("div");C.className="trtc-resizable-resize-anchor ".concat(Mn),_n(C,Object.assign({},Dn.resizeAnchor,Dn.bottomRightAnchor)),this.bottomRightAnchor=C,this.options.anchorMode!==pn.Both&&this.options.anchorMode!==pn.Edge||(null===(e=this.resizeTarget)||void 0===e||e.appendChild(c),null===(t=this.resizeTarget)||void 0===t||t.appendChild(u),null===(A=this.resizeTarget)||void 0===A||A.appendChild(l),null===(i=this.resizeTarget)||void 0===i||i.appendChild(h)),this.options.anchorMode!==pn.Both&&this.options.anchorMode!==pn.Corner||(null===(o=this.resizeTarget)||void 0===o||o.appendChild(a),null===(r=this.resizeTarget)||void 0===r||r.appendChild(g),null===(n=this.resizeTarget)||void 0===n||n.appendChild(d),null===(s=this.resizeTarget)||void 0===s||s.appendChild(C))},e.prototype.initResizeEvent=function(){var e,t,A,i,o,r,n,s;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===(A=this.topRightAnchor)||void 0===A||A.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 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,fn.debug("resize origin:",this.originTop,this.originLeft,this.originWidth,this.originHeight)}else fn.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,A=this.currentAnchor.classList[1],i=this.originLeft,o=this.originTop,r=this.originWidth,n=this.originHeight;switch(A){case yn:o=(t=this._resizeTop(e)).top,n=t.height,i=(t=this._resizeLeft(e)).left,r=t.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 Tn:o=(t=this._resizeTop(e)).top,n=t.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 mn:o=(t=this._resizeTop(e)).top,n=t.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 Rn:i=(t=this._resizeLeft(e)).left,r=t.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 wn: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 Sn:n=this._resizeBottom(e),i=(t=this._resizeLeft(e)).left,r=t.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 bn: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 Mn: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 fn.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,A=this.originLeft+t,i=this.originWidth-t;return!this.options.canExceedContainer&&A<0?(A=0,i=this.originWidth+this.originLeft):A>this.originLeft+this.originWidth-20&&(A=this.originLeft+this.originWidth-20,i=20),{left:A,width:i}},e.prototype._resizeTop=function(e){var t=e.screenY-this.resizeStartTop,A=this.originTop+t,i=this.originHeight-t;return!this.options.canExceedContainer&&A<0?(A=0,i=this.originHeight+this.originTop):A>this.originTop+this.originHeight-20&&(A=this.originTop+this.originHeight-20,i=20),{top:A,height:i}},e.prototype._resizeRight=function(e){if(!this.container)return fn.debug("".concat(this.logPrefix,"_resizeRight error. No container:"),this.container),0;var t=e.screenX-this.resizeStartLeft,A=this.originWidth+t;return A<20?A=20:!this.options.canExceedContainer&&A>this.container.offsetWidth-this.originLeft&&(A=this.container.offsetWidth-this.originLeft),A},e.prototype._resizeBottom=function(e){if(!this.container)return fn.debug("".concat(this.logPrefix,"_resizeBottom error. No container:"),this.container),0;var t=e.screenY-this.resizeStartTop,A=this.originHeight+t;return A<20?A=20:!this.options.canExceedContainer&&A>this.container.offsetHeight-this.originTop&&(A=this.container.offsetHeight-this.originTop),A},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 A=this.callbacksMap.get(e);A?A.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var A=this.callbacksMap.get(e);A&&(A=A.filter((function(e){return e!=t})),this.callbacksMap.set(e,A))},e.prototype.emit=function(e){for(var t=[],A=1;A<arguments.length;A++)t[A-1]=arguments[A];var i=this.callbacksMap.get(e);i&&i.slice().forEach((function(e){try{e.apply(null,t)}catch(A){console.error("[Resizable]emit error:",e,A)}}))},e.prototype.destroy=function(){var e,t,A,i,o,r,n,s,a,c,g,u,l,d,h,C;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===(A=this.topRightAnchor)||void 0===A||A.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!==pn.Both&&this.options.anchorMode!==pn.Edge||(this.topAnchor&&(null===(a=this.resizeTarget)||void 0===a||a.removeChild(this.topAnchor)),this.leftAnchor&&(null===(c=this.resizeTarget)||void 0===c||c.removeChild(this.leftAnchor)),this.rightAnchor&&(null===(g=this.resizeTarget)||void 0===g||g.removeChild(this.rightAnchor)),this.bottomAnchor&&(null===(u=this.resizeTarget)||void 0===u||u.removeChild(this.bottomAnchor))),this.options.anchorMode!==pn.Both&&this.options.anchorMode!==pn.Corner||(this.topLeftAnchor&&(null===(l=this.resizeTarget)||void 0===l||l.removeChild(this.topLeftAnchor)),this.topRightAnchor&&(null===(d=this.resizeTarget)||void 0===d||d.removeChild(this.topRightAnchor)),this.bottomLeftAnchor&&(null===(h=this.resizeTarget)||void 0===h||h.removeChild(this.bottomLeftAnchor)),this.bottomRightAnchor&&(null===(C=this.resizeTarget)||void 0===C||C.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}(),kn=function(){var t=new Map;for(var A in e.TRTCVideoResolution)if(isNaN(Number(A))){var i=e.TRTCVideoResolution[A],o=A.split("_");t.set(i,{width:parseInt(o[1]),height:parseInt(o[2])})}return t}(),Nn=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,kn.has(t.videoResolution)){var A=kn.get(t.videoResolution),i=A.width,o=A.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}this.updatePreviewProperty(),this.canExceedContainer=t.canExceedContainer||!1,this.eventEmitter=new m,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(!Ee(t.videoResolution)||!Ee(t.resMode)){if(this.resMode=Ee(t.resMode)?this.resMode:t.resMode,t.videoResolution&&kn.has(t.videoResolution)){var A=kn.get(t.videoResolution),i=A.width,o=A.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}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 A;null===(A=this.eventEmitter)||void 0===A||A.on(e,t)},t.prototype.off=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.off(e,t)},t.prototype.destroy=function(){var e,t,A,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===(t=this.resizableHandler)||void 0===t||t.destroy(),this.movableHandler=null,this.resizableHandler=null,null===(A=this.container)||void 0===A||A.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=[]},t.prototype.initMediaMovable=function(){this.onMove=this.onMove.bind(this),this.movableHandler=new vn(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 Ln(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,A=e;t<A.length;t++){if(A[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,A=e/this.mixingVideoWidth,i=t/this.mixingVideoHeight;this.previewScale=A>i?A:i,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,A=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"),t="".concat(o.top+this.previewTop,"px"),A="".concat(o.right-o.left,"px"),i="".concat(o.bottom-o.top,"px"),this.moveAndResizeOverlay.style.display="block"}else e="".concat(this.previewLeft,"px"),t="".concat(this.previewTop,"px"),A="0px",i="0px",this.moveAndResizeOverlay.style.display="none";this.moveAndResizeOverlay.style.left=e,this.moveAndResizeOverlay.style.top=t,this.moveAndResizeOverlay.style.width=A,this.moveAndResizeOverlay.style.height=i}},t.prototype.onMove=function(e,t){var A;console.debug("".concat(this.logPrefix,"onMove: ").concat(e," ").concat(t));var i=this.mediaList[this.selectedMediaIndex];if(i&&this.moveAndResizeOverlay){var o={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+this.moveAndResizeOverlay.offsetWidth,bottom:t-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===(A=this.eventEmitter)||void 0===A||A.emit("onSourceMoved",a({},i),r)}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,A,i){var o;console.debug("".concat(this.logPrefix,"onResize: ").concat(e," ").concat(t," ").concat(A," ").concat(i));var r=this.mediaList[this.selectedMediaIndex];if(r){var n={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+A,bottom:t-this.previewTop+i},s={left:Math.round(n.left/this.previewScale),top:Math.round(n.top/this.previewScale),right:Math.round(n.right/this.previewScale),bottom:Math.round(n.bottom/this.previewScale)};null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceResized",a({},r),s)}else console.debug("".concat(this.logPrefix,"onResize no selected media"))},t.prototype.emitOnSelect=function(e){var t;if(e){for(var A=this.mediaList.length,i=0;i<A;i++)if(e.id===this.mediaList[i].id){this.selectedMediaIndex=i;break}}else this.selectedMediaIndex=-1;this.updateOverlay(),null===(t=this.eventEmitter)||void 0===t||t.emit("onSourceSelected",e?a({},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 A=this.container.getBoundingClientRect(),i=e.clientX-A.x-this.previewLeft,o=e.clientY-A.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)}},t.prototype.onContainerMousemove=function(e){var t;if(e.target&&this.container&&null!==this.mousedownLeft&&null!==this.mousedownTop){var A=e.screenX-this.mousedownLeft,i=e.screenY-this.mousedownTop;(Math.abs(A)>=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===(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",a({},this.mediaList[this.selectedMediaIndex]))},t}(),Pn=function(){function t(A){if(this.logPrefix="[TRTCMediaMixingManager]",this.eventEmitter=new m,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,this.screensWithSystemAudio=new Set,this.activeSystemAudioTrackId=null,t.mediaMixingManager)return t.mediaMixingManager;t.mediaMixingManager=this,this.logger=A.logger,this.trtc=A.trtc,this.trtcCloud=A.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 g(this,void 0,Promise,(function(){var e,A;return u(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:if(!(this.screensWithSystemAudio.size>0))return[3,9];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack"})];case 6:return i.sent(),[3,8];case 7:return A=i.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin AudioMixer error:"),A),[3,8];case 8:this.screensWithSystemAudio.clear(),this.activeSystemAudioTrackId=null,i.label=9;case 9:return this.destroyDesigner(),this.eventEmitter=null,t.mediaMixingManager=null,[2]}}))}))},t.prototype.bindPreviewArea=function(e){return g(this,void 0,Promise,(function(){var t,A,i,o,r=this;return u(this,(function(n){switch(n.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),A=t.width,i=t.height,[4,this.trtc.startPlugin("VideoMixer",{view:e,canvasInfo:{width:A,height:i,canvasColor:String(this.publishParams.canvasColor)},onScreenShareStop:function(e){var t,A=r.sourceList.find((function(t){return t.id===e}));r.removeMediaSource(A),null===(t=r.eventEmitter)||void 0===t||t.emit("onSourceDisconnected",A||null)}})];case 1:return o=n.sent(),console.log("startPlugin result",o,o.track),this.mixVideoTrack=o.track,this.createDesigner(),[2]}}))}))},t.prototype._getTRTCSourceKey=function(t){var A;return((A={})[e.TRTCMediaSourceType.kCamera]="camera",A[e.TRTCMediaSourceType.kScreen]="screen",A[e.TRTCMediaSourceType.kText]="text",A[e.TRTCMediaSourceType.kVideo]="video",A[e.TRTCMediaSourceType.kImage]="image",A)[t.type]},t.prototype._getTRTCFillMode=function(t){var A;return((A={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]="cover",A[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]="contain",A)[t]},t.prototype._getTRTCVideoProfile=function(t,A){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[t].width,height:o[t].height,frameRate:A,bitrate:1e3}},t.prototype._getTRTCLayout=function(t){var A,i,o,r,n,s,a,c,g,u,l,d,h,C,I,B,E={zIndex:(null===(o=t.layout)||void 0===o?void 0:o.zOrder)||0};if(he(null===(r=t.layout)||void 0===r?void 0:r.rect)||(E.x=null===(n=t.layout)||void 0===n?void 0:n.rect.left,E.y=null===(s=t.layout)||void 0===s?void 0:s.rect.top,E.width=(null===(a=t.layout)||void 0===a?void 0:a.rect.right)-(null===(c=t.layout)||void 0===c?void 0:c.rect.left),E.height=(null===(g=t.layout)||void 0===g?void 0:g.rect.bottom)-(null===(u=t.layout)||void 0===u?void 0:u.rect.top)),he(null===(l=t.layout)||void 0===l?void 0:l.fillMode)||(E.fillMode=this._getTRTCFillMode(null===(d=t.layout)||void 0===d?void 0:d.fillMode)),!he(null===(h=t.layout)||void 0===h?void 0:h.mirror)){var p=((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A);E.mirror=p[null===(C=t.layout)||void 0===C?void 0:C.mirror]}if(!he(null===(I=t.layout)||void 0===I?void 0:I.rotation)){var Q=((i={})[e.TRTCVideoRotation.TRTCVideoRotation0]=0,i[e.TRTCVideoRotation.TRTCVideoRotation90]=90,i[e.TRTCVideoRotation.TRTCVideoRotation180]=180,i[e.TRTCVideoRotation.TRTCVideoRotation270]=270,i);E.rotation=Q[null===(B=t.layout)||void 0===B?void 0:B.rotation]}return E},t.prototype._getTRTCSourceItem=function(t){var A,i,o,r,n,s,c,g,u,l;switch(t.type){case e.TRTCMediaSourceType.kScreen:return l=e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,{id:t.id,profile:this._getTRTCVideoProfile((null===(A=t.screen)||void 0===A?void 0:A.resolution)||l,(null===(i=t.screen)||void 0===i?void 0:i.fps)||15),layout:this._getTRTCLayout(t),systemAudio:null===(o=t.screen)||void 0===o?void 0:o.systemAudio};case e.TRTCMediaSourceType.kCamera:return l=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)||l,(null===(s=t.camera)||void 0===s?void 0:s.fps)||15),videoTrack:null===(c=t.camera)||void 0===c?void 0:c.videoTrack,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kText:return a(a({id:t.id},t.text||{}),{layout:this._getTRTCLayout(t)});case e.TRTCMediaSourceType.kImage:return{id:t.id,url:null===(g=t.image)||void 0===g?void 0:g.url,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kVideo:return{id:t.id,url:null===(u=t.video)||void 0===u?void 0:u.url,layout:this._getTRTCLayout(t)};default:return null}},t.prototype._getCanvasSize=function(t,A){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)[t],n=r.width,s=r.height;return A===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait&&(n=(o=[s,n])[0],s=o[1]),{width:n,height:s}},t.prototype.addMediaSource=function(t){var A;return g(this,void 0,Promise,(function(){var i,o,r,n,s,a,c,g,l;return u(this,(function(u){switch(u.label){case 0:if(this.logger.log("".concat(this.logPrefix,"addMediaSource:"),t),-1!==this.findMediaSourceIndex(t))throw new Error("Media source already existed");if(i=Qe(t),o=this._getTRTCSourceKey(i),!(r=this._getTRTCSourceItem(i))||!o)throw new Error("Invalid media source");return(n=Qe(this.trtcSourceMap.get(o))||[]).push(r),[4,this.trtc.updatePlugin("VideoMixer",(l={},l[o]=n,l))];case 1:return s=u.sent(),a=s.result,c=s.systemAudioTrackList,t.type===e.TRTCMediaSourceType.kScreen&&(null==c?void 0:c[t.id])?(this.screensWithSystemAudio.add(t.id),g=Object.values(c)[0],1!==this.screensWithSystemAudio.size?[3,3]:(this.logger.log("".concat(this.logPrefix," startPlugin AudioMixer, track ID:"),g.id),this.activeSystemAudioTrackId=g.id,[4,this.trtc.startPlugin("AudioMixer",{id:"systemAudioTrack",track:g})])):[3,5];case 2:return u.sent(),[3,5];case 3:return this.logger.log("".concat(this.logPrefix," updatePlugin AudioMixer, old track ID:"),this.activeSystemAudioTrackId,"new track ID:",g.id),this.activeSystemAudioTrackId=g.id,[4,this.trtc.updatePlugin("AudioMixer",{id:"systemAudioTrack",track:g})];case 4:u.sent(),u.label=5;case 5:if(a.failedDetails.find((function(e){return e.id===t.id})))throw new Error("Failed to add media source");return i.isSelected&&(this.unselectMediaSource(this.selectedSource),this.selectedSource=t),this.trtcSourceMap.set(o,n),null===(A=this.mediaMixingDesigner)||void 0===A||A.addMedia({id:i.id,rect:this._getDesignerMediaRect(t),isSelected:i.isSelected||!0,origin:i}),i.isSelected&&(this.selectedSource=i),this.sourceList.push(i),[2]}}))}))},t.prototype.removeMediaSource=function(t){var A,i,o;return g(this,void 0,Promise,(function(){var r,n,s,a,c,g,l,d,h;return u(this,(function(u){switch(u.label){case 0:if(this.logger.log("".concat(this.logPrefix,"removeMediaSource:"),t),-1===(r=this.findMediaSourceIndex(t)))throw new Error("Not existing media source to remove");return n=this._getTRTCSourceKey(t),s=Qe(this.trtcSourceMap.get(n))||[],a=s.findIndex((function(e){return e.id===t.id})),s.splice(a,1),[4,this.trtc.updatePlugin("VideoMixer",(h={},h[n]=s,h))];case 1:return c=u.sent(),g=c.result,l=c.systemAudioTrackList,t.type===e.TRTCMediaSourceType.kScreen&&this.screensWithSystemAudio.has(t.id)?(this.screensWithSystemAudio.delete(t.id),this.screensWithSystemAudio.size>0?(this.logger.log("".concat(this.logPrefix," keep AudioMixer running, remaining screens:"),this.screensWithSystemAudio.size),(d=l?Object.values(l)[0]:null)&&d.id!==this.activeSystemAudioTrackId?(this.logger.log("".concat(this.logPrefix," updatePlugin AudioMixer, switch track from ").concat(this.activeSystemAudioTrackId," to ").concat(d.id)),this.activeSystemAudioTrackId=d.id,[4,this.trtc.updatePlugin("AudioMixer",{id:"systemAudioTrack",track:d})]):[3,3]):[3,5]):[3,7];case 2:return u.sent(),[3,4];case 3:this.logger.log("".concat(this.logPrefix," AudioMixer track not changed, no need to update")),u.label=4;case 4:return[3,7];case 5:return this.logger.log("".concat(this.logPrefix," stopPlugin AudioMixer, no more screens with system audio")),this.activeSystemAudioTrackId=null,[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack"})];case 6:u.sent(),u.label=7;case 7:if(g.failedDetails.find((function(e){return e.id===t.id})))throw new Error("Failed to remove media source");return null===(A=this.mediaMixingDesigner)||void 0===A||A.removeMedia({id:t.id,rect:null===(i=t.layout)||void 0===i?void 0:i.rect,isSelected:t.isSelected||!1,origin:Qe(t)}),(null===(o=this.selectedSource)||void 0===o?void 0:o.id)===t.id&&(this.selectedSource=null),this.trtcSourceMap.set(n,s),this.sourceList.splice(r,1),[2]}}))}))},t.prototype._getDesignerMediaRect=function(t){var A,i,o=(null===(A=t.layout)||void 0===A?void 0:A.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom,c=s-r,g=a-n;switch(null===(i=t.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+g,bottom:n+c};default:return{left:r,top:n,right:s,bottom:a}}},t.prototype._getPluginMediaRect=function(t){var A,i,o=(null===(A=t.layout)||void 0===A?void 0:A.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom;switch(null===(i=t.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}}},t.prototype.updateMediaSource=function(e){var t,A;return g(this,void 0,Promise,(function(){var i,o,r,n,s,c,g,l;return u(this,(function(u){switch(u.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=a(a({},this.sourceList[i]),Qe(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),r=this._getTRTCSourceKey(o),n=this._getTRTCSourceItem(o),s=Qe(this.trtcSourceMap.get(r))||[],c=s.findIndex((function(t){return t.id===e.id})),s[c]=n,[4,this.trtc.updatePlugin("VideoMixer",(l={},l[r]=s,l))];case 1:if(u.sent().result.failedDetails.find((function(t){return t.id===e.id})))throw new Error("Failed to update media source");return g={id:e.id,rect:this._getDesignerMediaRect(e),isSelected:e.isSelected||!1,origin:Qe(e)},this.logger.log("".concat(this.logPrefix,"updateParams:"),JSON.stringify(g)),null===(A=this.mediaMixingDesigner)||void 0===A||A.updateMedia(g),this.trtcSourceMap.set(r,s),this.sourceList[i]=o,[2]}}))}))},t.prototype.startPublish=function(){return g(this,void 0,Promise,(function(){return u(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 g(this,void 0,Promise,(function(){return u(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,A,i,o,n;return g(this,void 0,Promise,(function(){var s,a,c,g,l,d,C,I,B,E,p,Q,f,v,y,T,m,R,w,S,b,M,D,_;return u(this,(function(u){switch(u.label){case 0:this.logger.log("".concat(this.logPrefix,"updatePublishParams:"),e),s=this.publishParams,this.publishParams=e,a=this._getCanvasSize(e.videoEncoderParams.videoResolution,e.videoEncoderParams.resMode),c=a.width,g=a.height,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.trtc.updatePlugin("VideoMixer",{canvasInfo:{width:c,height:g,canvasColor:String(e.canvasColor)}})];case 2:return u.sent(),[3,4];case 3:if((l=u.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT)throw l;return[3,4];case 4:null===(i=this.mediaMixingDesigner)||void 0===i||i.updateOptions({videoResolution:this.publishParams.videoEncoderParams.videoResolution,resMode:this.publishParams.videoEncoderParams.resMode}),u.label=5;case 5:u.trys.push([5,11,12,17]),d=h(this.sourceList),u.label=6;case 6:return[4,d.next()];case 7:return(C=u.sent()).done?[3,10]:(I=C.value).layout?(B=I.layout.rect||{left:0,top:0,right:0,bottom:0},E=B.left,p=B.top,Q=B.right,f=B.bottom,v=this._getCanvasSize(s.videoEncoderParams.videoResolution),y=v.width,T=v.height,m=this._getCanvasSize(e.videoEncoderParams.videoResolution),R=m.width,w=m.height,S=E*R/y,b=p*w/T,M=Q*R/y,D=f*w/T,I.layout.rect={left:S,top:b,right:M,bottom:D},[4,this.updateMediaSource(I)]):[3,9];case 8:u.sent(),null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceResized",I,null===(n=I.layout)||void 0===n?void 0:n.rect),u.label=9;case 9:return[3,6];case 10:return[3,17];case 11:return _=u.sent(),t={error:_},[3,17];case 12:return u.trys.push([12,,15,16]),C&&!C.done&&(A=d.return)?[4,A.call(d)]:[3,14];case 13:u.sent(),u.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 u.sent(),[2]}}))}))},t.prototype.on=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.on(e,t)},t.prototype.off=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.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,A;this.view&&(this.mediaMixingDesigner=new Nn({view:this.view,videoResolution:(null===(t=this.publishParams)||void 0===t?void 0:t.videoEncoderParams.videoResolution)||e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,resMode:(null===(A=this.publishParams)||void 0===A?void 0:A.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,A,i,o;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===(A=this.mediaMixingDesigner)||void 0===A||A.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)},t.prototype.unlistenDesignerEvent=function(){var e,t,A,i,o;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===(A=this.mediaMixingDesigner)||void 0===A||A.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)},t.prototype.onError=function(e,t){this.logger.log("".concat(this.logPrefix,"onError:"),e,t)},t.prototype.onSourceSelected=function(e){var t;return g(this,void 0,void 0,(function(){return u(this,(function(A){switch(A.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(a(a({},e.origin),{isSelected:!0})),[3,3]):[3,1];case 1:return this.selectedSource?[4,this.updateMediaSource(a(a({},this.selectedSource),{isSelected:!1}))]:[3,3];case 2:A.sent(),this.selectedSource=null,A.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 A,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceMoved:"),e,t),null==e?void 0:e.origin){var o=a(a({},e.origin),{layout:a(a({},e.origin.layout),{rect:t})});this.updateMediaSource(pe(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(A=this.selectedSource)||void 0===A?void 0:A.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id}))),null===(i=this.eventEmitter)||void 0===i||i.emit("onSourceMoved",e.origin,this._getPluginMediaRect(o))}},t.prototype.onSourceResized=function(e,t){var A,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceResized:"),e,t),null==e?void 0:e.origin){var o=a(a({},e.origin),{layout:a(a({},e.origin.layout),{rect:t})});this.updateMediaSource(pe(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(A=this.selectedSource)||void 0===A?void 0:A.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id})))}null===(i=this.eventEmitter)||void 0===i||i.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(A){return t.isSameMediaSource(A,e)}))},t.prototype.findMediaSourceIndex=function(e){return this.sourceList.findIndex((function(t){return t.id===e.id}))},t.prototype.unselectMediaSource=function(e){var t,A;return g(this,void 0,Promise,(function(){var i;return u(this,(function(o){return e?(-1!==(i=this.findMediaSourceIndex(e))&&(this.sourceList[i].isSelected=!1),null===(t=this.mediaMixingDesigner)||void 0===t||t.updateMedia({id:e.id,rect:null===(A=e.layout)||void 0===A?void 0:A.rect,isSelected:!1,origin:Qe(e)}),[2]):[2]}))}))},t.mediaMixingManager=null,t}(),Fn=Object.defineProperty,Gn=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Yn=(e,t,A)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,Hn=(e,t)=>{for(var A in t||(t={}))Vn.call(t,A)&&Yn(e,A,t[A]);if(Gn)for(var A of Gn(t))xn.call(t,A)&&Yn(e,A,t[A]);return e},Un=(e,t,A)=>Yn(e,"symbol"!=typeof t?t+"":t,A),On={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"}},Jn=(e,t=!1)=>({type:"object",required:t,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(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(!t)return;const{width:s,height:a}=t;if(s&&a&&s*a>8294400)throw new o({code:r.INVALID_PARAMETER,message:"The mix resolution cannot be set higher than 3840 * 2160."})}}),Kn=e=>({required:!1,type:["string",HTMLElement,null],validate(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(e.utils.isString(t)&&!document.getElementById(t))throw new o({code:r.INVALID_PARAMETER,extraCode:n.INVALID_ELEMENT_ID,fnName:i,messageParams:{key:A}})}}),jn=(e,t=!0)=>({type:"object",required:t,properties:Hn({},On),validate(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(t){if(t.fillMode&&!["contain","cover","fill"].includes(t.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(t.rotation&&![0,90,180,270].includes(t.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})}}}),Wn=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:Hn({},jn(e))}}}),zn=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:Hn({},jn(e))},validate(t,A,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})}}}),Zn=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:Hn({},jn(e))}}}),qn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:Hn({},jn(e))}}}),Xn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:Hn({},jn(e))}}});var $n=0,es=class e{constructor(e){this.core=e,Un(this,"seq"),Un(this,"log"),Un(this,"localMixVideoTrack",null),Un(this,"systemAudioTrackList",{}),Un(this,"_mixVideoConfig"),Un(this,"onScreenShareStop"),$n+=1,this.seq=$n,this.log=e.log.createChild({id:`${this.getAlias()}${$n}`}),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:Hn({},Kn(e)),canvasInfo:Hn({},Jn(e,!0)),camera:Hn({},Wn(e)),screen:Hn({},zn(e)),text:Hn({},Zn(e)),image:Hn({},qn(e)),video:Hn({},Xn(e))},validate(t,A,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}=t;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:Hn({},Kn(e)),canvasInfo:Hn({},Jn(e)),camera:Hn({},Wn(e)),screen:Hn({},zn(e)),text:Hn({},Zn(e)),image:Hn({},qn(e)),video:Hn({},Xn(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:t,onScreenShareStop:A}=e,i=await this.parseMixOptions(e);return A&&(this.onScreenShareStop=A,this._mixVideoConfig.onScreenShareStop=A),this._updatePreview({view:t,track:this.localMixVideoTrack}),this.core.utils.isUndefined(t)||(this._mixVideoConfig.view=t),await this.localMixVideoTrack.startMix(),{track:this.localMixVideoTrack._outputTrack,systemAudioTrackList:this.systemAudioTrackList,result:i}}async update(e){const{RtcError:t,ErrorCode:A}=this.core.errorModule;if(!this.localMixVideoTrack)throw new t({code:A.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,systemAudioTrackList:this.systemAudioTrackList,result:o}}async parseMixOptions(e){let t={successOptions:{},failedDetails:[]};const{RtcError:A,ErrorCode:i,ErrorCodeDictionary:o}=this.core.errorModule;if(!this.localMixVideoTrack||!this._mixVideoConfig)return t;const r=[],n=Hn({},e),{canvasInfo:s,camera:a,screen:c,text:g,image:u,video:l}=e;let d=0,h=0;if(s){const{canvasColor:e,width:t,height:A,frameRate:i}=s;e&&this.localMixVideoTrack.setMixBackground(e),i&&this.localMixVideoTrack.setFps(i),this.localMixVideoTrack.resizeMixCanvas(t,A),this._mixVideoConfig.canvasInfo=s}if(a){d++;const{finalOptions:e,errors:t}=await this.parseCameraOptions(this.localMixVideoTrack,a,this._mixVideoConfig.camera);this._mixVideoConfig.camera=e,n.camera=e,t.length>0&&(r.push(...t),t.length===a.length&&h++)}if(c){d++;const{finalOptions:e,errors:t}=await this.parseScreenOptions(this.localMixVideoTrack,c,this._mixVideoConfig.screen);this._mixVideoConfig.screen=e,n.screen=e,t.length>0&&(r.push(...t),t.length===c.length&&h++)}if(g){d++;const{finalOptions:e,errors:t}=await this.parseTextOptions(this.localMixVideoTrack,g,this._mixVideoConfig.text);this._mixVideoConfig.text=e,n.text=e,t.length>0&&(r.push(...t),t.length===g.length&&h++)}if(u){d++;const{finalOptions:e,errors:t}=await this.parseImageOptions(this.localMixVideoTrack,u,this._mixVideoConfig.image);this._mixVideoConfig.image=e,n.image=e,t.length>0&&(r.push(...t),t.length===u.length&&h++)}if(l){d++;const{finalOptions:e,errors:t}=await this.parseVideoOptions(this.localMixVideoTrack,l,this._mixVideoConfig.video);this._mixVideoConfig.video=e,n.video=e,t.length>0&&(r.push(...t),t.length===l.length&&h++)}if(h>0&&h===d)throw new A({code:i.INVALID_PARAMETER,message:"all sources mix failed",data:{failedDetails:r}});return t={successOptions:n,failedDetails:r},t}async parseCameraOptions(e,t,A=[]){var i,o;const r=new Set(t.map((e=>e.id))),n=A.filter((e=>!r.has(e.id))).map((e=>e.id));for(const g of n)e.removeCameraSource(g);const s=new Map(A.map((e=>[e.id,e]))),a=[],c=[];for(const g of t){const{id:t,layout:A,profile:r}=g;try{if(e.inputLocalVideoTracks.has(t)){const n=null==(i=e.inputLocalVideoTracks.get(t))?void 0:i.mediaTrack;await this.updateCameraProfile(g);const s=null==(o=e.inputLocalVideoTracks.get(t))?void 0:o.mediaTrack;let a;r&&(a=this.core.utils.isString(r)?this.core.constants.videoProfileMap[r]:r),s!==n?e.updateCameraSource(t,A,s,a):e.updateCameraSource(t,A,null,a)}else{const i=await this.captureCamera(g);try{e.addCameraSource(t,i,A)}catch(e){throw i.close(),e}}a.push(g)}catch(e){c.push({id:t,error:e}),s.has(t)&&a.push(s.get(t))}}return{finalOptions:a,errors:c}}async parseScreenOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeScreenSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,layout:A}=a;try{if(e.inputLocalScreenTracks.has(t))e.updateScreenSource(t,A);else{const i=await this.captureScreen(a);try{e.addScreenSource(t,i,A)}catch(e){throw i.close(),e}}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseTextOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeTextSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t}=a;try{A.some((e=>e.id===t))?e.updateTextSource(a):e.addTextSource(a),n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseImageOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeImageSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,url:i,layout:o}=a;try{const r=A.find((e=>e.id===t));if(r){let A;r.url!==i&&(A=await this.core.utils.loadImage(i)),e.updateImageSource(t,o,A)}else{const A=await this.core.utils.loadImage(i);e.addImageSource(t,A,o)}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseVideoOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeVideoSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,url:i,layout:o}=a;try{const r=A.find((e=>e.id===t));let s;if(r)r.url!==i&&(s=await this.core.utils.loadVideo(i)),e.updateVideoSource(t,o,s);else{const A=await this.core.utils.loadVideo(i);e.addVideoSource(t,A,o)}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async captureCamera(e){const{id:t,cameraId:A,videoTrack:i,profile:o}=e,r=new this.core.LocalVideoTrack;r.log.id+=`-${t}`;const n={};return A?n.deviceId=A: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 t;const{id:A,cameraId:i,videoTrack:o,profile:r}=e,n=null==(t=this.localMixVideoTrack)?void 0:t.inputLocalVideoTracks.get(A);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:t,profile:A,captureElement:i,preferDisplaySurface:o}=e,r=new this.core.LocalScreenTrack;r.log.id+=`-${t}`;const n={};this.core.utils.isUndefined(A)||(this.core.utils.isString(A)?this.core.constants.screenProfileMap[A]&&r.setProfile(this.core.constants.screenProfileMap[A]):r.setProfile(A)),i&&(n.captureElement=i),o&&(n.preferDisplaySurface=o),n.systemAudio=e.systemAudio;const s=await r.capture(n);return n.systemAudio&&s.getAudioTracks().length>0&&(this.systemAudioTrackList[t]=s.getAudioTracks()[0]),r.mediaTrack.addEventListener(this.core.constants.NAME.ENDED,(()=>{var e,A,i;null==(e=this.localMixVideoTrack)||e.removeScreenSource(t),(null==(A=this._mixVideoConfig)?void 0:A.screen)&&(this._mixVideoConfig.screen=this._mixVideoConfig.screen.filter((e=>e.id!==t))),null==(i=this.onScreenShareStop)||i.call(this,t)})),r}async _updatePreview({view:e,track:t,prevConfig:A}){if(this.core.utils.isUndefined(e)&&A&&A.view){const e=this.core.utils.getViewListFromView(A.view);e.length>0&&await t.play(e)}if(!this.core.utils.isUndefined(e)){const A=this.core.utils.getViewListFromView(e);A.length>0?await t.play(A):t.stop()}}stop(){var e;null==(e=this.localMixVideoTrack)||e.close(),this.localMixVideoTrack=null,delete this.onScreenShareStop,delete this._mixVideoConfig}};Un(es,"Name","VideoMixer");var ts=es,As=function(){function e(){this.isRunning=!1,this.queue=[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastQueueItem",{get:function(){return 0===this.length?null:this.queue[this.length-1]},enumerable:!1,configurable:!0}),e.prototype.push=function(e,t,A,i){var o,r;void 0===t&&(t=!1),void 0===A&&(A=!1);var n=a(a({},e),{functionName:i}),s=new Promise((function(e,t){n.resolve=e,n.reject=t}));if(n.promise=s,t)this.length<=1?this.queue.push(n):null===(r=null===(o=this.lastQueueItem)||void 0===o?void 0:o.promise)||void 0===r||r.then(n.resolve,n.reject);else{if(A&&i&&this.queue.length>1){var c=[];this.queue=this.queue.filter((function(e,t){return 0===t||(e.functionName!==i||(c.push(e),!1))})),c.forEach((function(e){e.reject(new Error("aborted by newer task"))}))}this.queue.push(n)}return this.isRunning||this.callNext(),s},e.prototype.shift=function(){return this.queue.shift()},e.prototype.callNext=function(){var e=this;if(!this.isRunning&&0!==this.length){var t=this.queue[0],A=t.fn,i=t.args,o=t.context,r=t.resolve,n=t.reject;this.isRunning=!0,A.apply(o,i).then(r,n).finally((function(){e.isRunning=!1,e.shift(),e.callNext()}))}},e}(),is=new WeakMap,os=new WeakMap,rs=new WeakMap;function ns(e,t){return void 0===t&&(t={}),function(A,i,o){var r=o.value,n=t.deduplicate,s=void 0!==n&&n;return o.value=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];var o=e.apply(void 0,t),n=Array.isArray(o)?o:[o],a=rs.get(this)||new Map;rs.set(this,a);for(var c=null,g=0,u=n;g<u.length;g++){var l=u[g],d=a.get(l);if(d){c=d;break}}for(var h=c||new As,C=0,I=n;C<I.length;C++){l=I[C];a.set(l,h)}var B=s?i:void 0;return h.push({fn:r,args:t,context:this},!1,s,B)},o}}var ss=function(){function e(e){var t=this;this.logPrefix="[AITranscriberManager]",this.listeners=new Set,this.isPaused=!1,this.isMessageListenerRegistered=!1,this.handleMessageEvent=function(e){var A=t.createMessageFromEvent(e);t._notifyListeners("onReceiveTranscriberMessage",e.roomId,A)},this.handleStateEvent=function(e){var A=e.transcriberRobotId,i=e.state,o=e.roomId,r=e.sourceLanguage,n=void 0===r?"":r,s=e.error,a=e.errorMessage,c=void 0===a?"":a;if(o&&A){if("started"===i)t._notifyListeners("onRealtimeTranscriberStarted",o,A,n);else if("stopped"===i){t._notifyListeners("onRealtimeTranscriberStopped",o,A,0)}null!=s&&t._notifyListeners("onRealtimeTranscriberError",o,A,s,c)}},this.logger=e.logger,this.trtc=e.trtc,this.registerStateListener()}return e.prototype.registerStateListener=function(){this.trtc.on(r.default.EVENT.REALTIME_TRANSCRIBER_STATE_CHANGED,this.handleStateEvent)},e.prototype.createMessageFromEvent=function(e){var t,A,i,o;return{segmentId:null!==(t=null==e?void 0:e.segmentId)&&void 0!==t?t:"",speakerUserId:null!==(A=null==e?void 0:e.speakerUserId)&&void 0!==A?A:"",sourceText:null!==(i=null==e?void 0:e.sourceText)&&void 0!==i?i:"",translationTexts:(null==e?void 0:e.translationTexts)?new Map(Object.entries(e.translationTexts)):void 0,timestamp:null!==(o=null==e?void 0:e.timestamp)&&void 0!==o?o:Date.now(),isCompleted:Boolean(null==e?void 0:e.isCompleted)}},e.prototype.updateMessageSubscription=function(){var e=!this.isPaused&&this.listeners.size>0;if(e&&!this.isMessageListenerRegistered)return this.trtc.on(r.default.EVENT.REALTIME_TRANSCRIBER_MESSAGE,this.handleMessageEvent),void(this.isMessageListenerRegistered=!0);!e&&this.isMessageListenerRegistered&&(this.trtc.off(r.default.EVENT.REALTIME_TRANSCRIBER_MESSAGE,this.handleMessageEvent),this.isMessageListenerRegistered=!1)},e.prototype.log=function(){for(var e,t,A=[],i=0;i<arguments.length;i++)A[i]=arguments[i];null===(t=null===(e=this.logger)||void 0===e?void 0:e.log)||void 0===t||t.call.apply(t,d([e,this.logPrefix],A,!1))},e.prototype.logError=function(){for(var e,t,A=[],i=0;i<arguments.length;i++)A[i]=arguments[i];null===(t=null===(e=this.logger)||void 0===e?void 0:e.error)||void 0===t||t.call.apply(t,d([e,this.logPrefix],A,!1))},e.prototype._notifyListeners=function(e){for(var t=this,A=[],i=1;i<arguments.length;i++)A[i-1]=arguments[i];this.listeners.forEach((function(i){var o=i[e];if("function"==typeof o)try{o.apply(i,A)}catch(r){t.logError("Error notifying listener:",r)}}))},e.prototype.startRealtimeTranscriber=function(e){return g(this,void 0,Promise,(function(){var t,A,i;return u(this,(function(o){switch(o.label){case 0:if(this.log("startRealtimeTranscriber:",e),!(null==e?void 0:e.sourceLanguage))throw new Error("sourceLanguage is required");t={sourceLanguage:e.sourceLanguage},e.transcriberRobotId&&(t.transcriberRobotId=e.transcriberRobotId),void 0!==e.userIdsToTranscribe&&(t.userIdsToTranscribe=e.userIdsToTranscribe),void 0!==e.translationLanguages&&(t.translationLanguages=e.translationLanguages),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.trtc.startPlugin("RealtimeTranscriber",t)];case 2:return A=o.sent(),this.log("startRealtimeTranscriber success, robotId:",A),[2,A];case 3:throw i=o.sent(),this.logError("startRealtimeTranscriber error:",i),i;case 4:return[2]}}))}))},e.prototype.stopRealtimeTranscriber=function(e){return g(this,void 0,Promise,(function(){var t;return u(this,(function(A){switch(A.label){case 0:if(this.log("stopRealtimeTranscriber:",e),!e)throw new Error("transcriberRobotId is required");A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this.trtc.stopPlugin("RealtimeTranscriber",{transcriberRobotId:e})];case 2:return A.sent(),this.log("stopRealtimeTranscriber success"),[3,4];case 3:throw t=A.sent(),this.logError("stopRealtimeTranscriber error:",t),t;case 4:return[2]}}))}))},e.prototype.pauseReceivingMessage=function(){this.isPaused||(this.log("pauseReceivingMessage"),this.isPaused=!0,this.updateMessageSubscription())},e.prototype.resumeReceivingMessage=function(){this.isPaused&&(this.log("resumeReceivingMessage"),this.isPaused=!1,this.updateMessageSubscription())},e.prototype.addListener=function(e){this.listeners.add(e),this.updateMessageSubscription()},e.prototype.removeListener=function(e){this.log("removeListener"),this.listeners.delete(e),this.updateMessageSubscription()},e.prototype.destroy=function(){this.log("destroy"),this.listeners.clear(),this.isPaused=!0,this.updateMessageSubscription(),this.trtc.off(r.default.EVENT.REALTIME_TRANSCRIBER_STATE_CHANGED,this.handleStateEvent)},e}(),as=r.default._loggerManager;as.info("TRTCCloud Version: ".concat(yr));var cs,gs,us,ls="trtcCloud",ds=1;navigator&&navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",(cs=function(){0!==hs.size&&Array.from(hs.values()).forEach((function(e){e.fn()}))},gs=30,function(){for(var e=this,t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];us>0&&clearTimeout(us),us=window.setTimeout((function(){cs.apply(e,t),us=-1}),gs)}));var hs=new Map,Cs=function(t){function i(A){void 0===A&&(A={});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=r.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=xo,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=yr;var s=A.frameWorkType,a=void 0===s?30:s,c=A.component,g=void 0===c?0:c,u=A.language,l=void 0===u?0:u;return o._frameWorkType=a,o._component=g,o._language=l,o._trtc=r.default.create({enableSEI:i.enableSEI,assetsPath:i.assetsPath,enableVolumeControlInIOS:!0,plugins:[ts,An,n.default]}),o._testTrtc=r.default.create(),o._log=r.default._loggerManager,o.logger=new Qn(as,{seq:ds++}),o._echoCancellation=void 0,o._noiseSuppression=void 0,o._autoGainControl=void 0,o._addTRTCEvents(),o.handleDeviceChange=o.handleDeviceChange.bind(o),hs.set(o,{fn:o.handleDeviceChange,self:o}),o}var 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 A(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(A.prototype=t.prototype,new A)}(i,t),i.getPlugin=function(e){return"VirtualBackground"===e?A.VirtualBackground:"BasicBeauty"===e?En:"VideoMixer"===e?ts:null},i.getTRTCShareInstance=function(e){return i.shareInstance||(i.shareInstance=new i(e)),i.shareInstance},i.setLogLevel=function(t,A){var i,o=((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=o[t];he(n)&&(n=o[e.TRTCLogLevel.TRTCLogLevelInfo]);var s=!Ie(A)||A;r.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(ls,".callExperimentalAPI"),e);var t=Be(e);if(t!==e){var A=t.api,o=t.params;if(A&&o)try{switch(A){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(){hs.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,t){return g(this,void 0,Promise,(function(){var A,i,o,r,n,s,c,g,l,d,h,C,I,B,E,p,Q,f;return u(this,(function(u){switch(u.label){case 0:if(A=e.sdkAppId,i=e.userId,o=e.userSig,r=e.roomId,n=e.strRoomId,s=e.role,c=e.privateMapKey,g=e.businessInfo,l=e.enableAutoPlayDialog,d=e.proxy,h=e.streamId,C=e.userDefineRecordId,this.logger.update({sdkAppId:A,userId:i}),this.logger.info("".concat(ls,".enterRoom with params: "),e,t),d&&(this._networkProxy=d),!(A&&i&&o))return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),I={sdkAppId:A,userId:i,userSig:o,roomId:r,strRoomId:n,role:ge[s],scene:ue[t],autoReceiveAudio:this._autoRecvAudio,autoReceiveVideo:this._autoRecvVideo,frameWorkType:this._frameWorkType,component:this._component,language:this._language},I=c?a(a({},I),{privateMapKey:c}):I,I=g?a(a({},I),{businessInfo:g}):I,B=l||this._enableAutoPlayDialog,I=Ie(B)?a(a({},I),{enableAutoPlayDialog:B}):I,I=this._networkProxy?a(a({},I),{proxy:this._networkProxy}):I,I=h?a(a({},I),{streamId:h}):I,I=C?a(a({},I),{userDefineRecordId:C}):I,I=void 0!==this._latencyLevel?a(a({},I),{latencyLevel:this._latencyLevel}):I,E=de(),[4,this._trtc.enterRoom(I)];case 2:return u.sent(),this._hasJoinedRoom=!0,p=de()-E,this.emit("onEnterRoom",p),[3,4];case 3:return Q=u.sent(),f=(f=this._transformTRTCErrorCode(Q,"enterRoom"))<0?f:-1,this.emit("onEnterRoom",f),this._callFunctionErrorManage(Q,"enterRoom"),[3,4];case 4:return[3,6];case 5:this._emitError(fr),u.label=6;case 6:return[2]}}))}))},i.prototype.exitRoom=function(){return g(this,void 0,Promise,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.logger.info("".concat(ls,".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._isVideoPublish=!0,this._isAudioPublish=!0,this.emit("onExitRoom",nr.exitRoom),[3,3];case 2:return e=t.sent(),this._callFunctionErrorManage(e,"exitRoom"),[3,3];case 3:return[2]}}))}))},i.prototype.switchRole=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".switchRole with param: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._trtc.switchRole(ge[e])];case 2:return A.sent(),this.emit("onSwitchRole",0,"switch role success, role = ".concat(e,", ").concat(ge[e])),[3,4];case 3:return t=A.sent(),this.emit("onSwitchRole",null==t?void 0:t.getCode(),t.message),[3,4];case 4:return[2]}}))}))},i.prototype.setDefaultStreamRecvMode=function(e,t){return g(this,void 0,void 0,(function(){return u(this,(function(A){return this.logger.info("".concat(ls,".setDefaultStreamRecvMode with param: "),{autoRecvAudio:e,autoRecvVideo:t}),Ie(e)&&(this._autoRecvAudio=e),Ie(t)&&(this._autoRecvVideo=t),[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 g(this,void 0,void 0,(function(){var e;return u(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!==r.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestVideo=function(){return g(this,void 0,void 0,(function(){var e;return u(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!==r.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalScreen=function(){return g(this,void 0,void 0,(function(){var e;return u(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!==r.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateRemoteVideo=function(e,t){return g(this,void 0,void 0,(function(){var A;return u(this,(function(i){switch(i.label){case 0:if(!this._hasJoinedRoom||this._isExitingRoom)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.updateRemoteVideo(this._generateRemoteVideoData(e,t))];case 2:return i.sent(),[3,4];case 3:if((A=i.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT)throw A;return[3,4];case 4:return[2]}}))}))},i.prototype.startLocalPreview=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return g(this,void 0,Promise,(function(){var t,A,i,o,n;return u(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(ls,".startLocalPreview with params: "),e),1===d([],e,!0).length?A=d([],e,!0)[0]:2===d([],e,!0).length&&(n=d([],e,!0),t=n[0],A=n[1]),he(t)||(this._setIsMobile(!0),this._setIsFrontCamera(t)),this._setLocalView(A),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!==r.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 o=s.sent(),this._callFunctionErrorManage(o,"startLocalPreview"),[3,10];case 10:return[2]}}))}))},i.prototype.updateLocalView=function(e){return g(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(ls,".updateLocalView with param: "),e),this._setLocalView(e),[4,this._updateLocalVideo()];case 1:return t.sent(),[2]}}))}))},i.prototype.stopLocalPreview=function(){return g(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(ls,".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(ls," 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),g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".muteLocalVideo with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setIsVideoPublish(!e),[4,this._updateLocalVideo()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"muteLocalVideo"),[3,4];case 4:return[2]}}))}))},i.prototype.startRemoteView=function(t,A,i){return g(this,void 0,void 0,(function(){var o,n;return u(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(ls,".startRemoteView with params: "),t,A,i),s.label=1;case 1:if(s.trys.push([1,9,,10]),this._setRemoteStreamConfig(t,i,{view:A,small:i===e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall}),!this._remoteStreamMap.get("".concat(t,"_").concat(this._getTRTCStreamType(i))))return[2];s.label=2;case 2:return s.trys.push([2,4,,8]),[4,this._trtc.startRemoteVideo(this._generateRemoteVideoData(t,i))];case 3:return s.sent(),[3,8];case 4:return(o=s.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT?[3,6]:[4,this._updateRemoteVideo(t,i)];case 5:return s.sent(),[3,7];case 6:throw o;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,t,A){return g(this,void 0,void 0,(function(){return u(this,(function(i){switch(i.label){case 0:return this.logger.info("".concat(ls,".updateRemoteView with params: "),e,t,A),this._setRemoteStreamConfig(e,A,{view:t}),this._remoteStreamMap.get("".concat(e,"_").concat(this._getTRTCStreamType(A)))?[4,this._updateRemoteVideo(e,A)]:[2];case 1:return i.sent(),[2]}}))}))},i.prototype.stopRemoteView=function(e,t){return g(this,void 0,void 0,(function(){var A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".stopRemoteView with params: "),e,t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:e,streamType:this._getTRTCStreamType(t)})];case 2:return i.sent(),[3,4];case 3:return A=i.sent(),this._callFunctionErrorManage(A,"stopRemoteView"),[3,4];case 4:return[2]}}))}))},i.prototype.stopAllRemoteView=function(){return g(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(ls,".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]}}))}))},i.prototype.setVideoEncoderParam=function(t){return g(this,void 0,void 0,(function(){var A,i;return u(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(ls,".setVideoEncoderParam with params: "),t),o.label=1;case 1:return o.trys.push([1,4,,5]),A=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,t),this._setVideoProfile(A),[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 g(this,void 0,void 0,(function(){var t,A,i=this;return u(this,(function(o){return this.logger.info("".concat(ls,".setNetworkQosParam with params: "),e),t=e.preference,A=this._getTRTCQosPreference(t),this._setQosPreference(A),this._setScreenShareParams({qosPreference:A}),[2,new Promise((function(e,t){Promise.all([i._updateLocalVideo(),i._updateLocalScreen()]).then((function(){e(!0)})).catch((function(e){i._callFunctionErrorManage(e,"setNetworkQosParam"),t(e)}))}))]}))}))},i.prototype.setLocalRenderParams=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".setLocalRenderParams with params: "),e),Object.assign(this._localRenderParams,e),A.label=1;case 1:return A.trys.push([1,4,,5]),[4,this._updateLocalVideo()];case 2:return A.sent(),[4,this._updateLocalTestVideo()];case 3:return A.sent(),[3,5];case 4:return t=A.sent(),this._callFunctionErrorManage(t,"setLocalRenderParams"),[3,5];case 5:return[2]}}))}))},i.prototype.setVideoEncoderMirror=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".setVideoEncoderMirror with params: "),e),this._encoderMirror=e,A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._updateLocalVideo()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setVideoEncoderMirror"),[3,4];case 4:return[2]}}))}))},i.prototype.setRemoteRenderParams=function(e,t,A){return g(this,void 0,void 0,(function(){var i;return u(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(ls,".setRemoteRenderParams with params: "),e,t,A),o.label=1;case 1:return o.trys.push([1,3,,4]),this._setRemoteStreamConfig(e,t,A),[4,this._updateRemoteVideo(e,t)];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 g(this,void 0,void 0,(function(){var e;return u(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!==r.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestAudio=function(){return g(this,void 0,void 0,(function(){var e;return u(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!==r.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype.startLocalAudio=function(t){return void 0===t&&(t=e.TRTCAudioQuality.TRTCAudioQualityDefault),g(this,void 0,void 0,(function(){var A,i,o;return u(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(ls,".startLocalAudio with params: "),t),A=this._getTRTCAudioQuality(t),n.label=1;case 1:n.trys.push([1,9,,10]),this._setAudioProfile(A),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!==r.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 o=n.sent(),console.warn("".concat(ls," startLocalAudio error: ").concat(o)),this._callFunctionErrorManage(o,"startLocalAudio"),[3,10];case 10:return[2]}}))}))},i.prototype.stopLocalAudio=function(){return g(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(ls,".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]}}))}))},i.prototype.muteLocalAudio=function(e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".muteLocalAudio with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setIsAudioPublish(!e),[4,this._updateLocalAudio()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"muteLocalAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.setAudioCaptureVolume=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".setAudioCaptureVolume with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setCaptureVolume(e),[4,this._updateLocalAudio()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setAudioCaptureVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioCaptureVolume=function(){return this.logger.info("".concat(ls,".getAudioCaptureVolume")),this._getCaptureVolume()},i.prototype.setAudioPlayoutVolume=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".setAudioPlayoutVolume with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._playoutVolume=e,[4,this._trtc.setRemoteAudioVolume("*",e)];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setAudioPlayoutVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioPlayoutVolume=function(){return this.logger.info("".concat(ls,".getAudioPlayoutVolume")),this._playoutVolume},i.prototype.muteRemoteAudio=function(e,t){return void 0===t&&(t=!1),g(this,void 0,void 0,(function(){var A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".muteRemoteAudio with params: "),e,t),i.label=1;case 1:return i.trys.push([1,3,,4]),e?[4,this._trtc.muteRemoteAudio(e,t)]:(this._emitError(fr),[2]);case 2:return i.sent(),[3,4];case 3:return A=i.sent(),this._callFunctionErrorManage(A,"muteRemoteAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.muteAllRemoteAudio=function(e){this.logger.info("".concat(ls,".muteAllRemoteAudio with params: "),e);try{this._trtc.muteRemoteAudio("*",e)}catch(t){this._callFunctionErrorManage(t,"muteAllRemoteAudio")}},i.prototype.muteRemoteVideoStream=function(e,t,A){return g(this,void 0,void 0,(function(){var i;return u(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(ls,".muteRemoteVideoStream with params: "),e,t,A),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._trtc.updateRemoteVideo({userId:e,mute:t,streamType:this._getTRTCStreamType(A)})];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"muteRemoteVideoStream"),[3,4];case 4:return[2]}}))}))},i.prototype.muteAllRemoteVideoStreams=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".muteAllRemoteVideoStreams with params: "),e),A.label=1;case 1:return A.trys.push([1,6,,7]),e?[4,this._trtc.callExperimentalAPI("pauseRemotePlayer",{userId:"*"})]:[3,3];case 2:return A.sent(),[3,5];case 3:return[4,this._trtc.callExperimentalAPI("resumeRemotePlayer",{userId:"*"})];case 4:A.sent(),A.label=5;case 5:return[3,7];case 6:return t=A.sent(),this._callFunctionErrorManage(t,"muteAllRemoteVideoStreams"),[3,7];case 7:return[2]}}))}))},i.prototype.setRemoteAudioVolume=function(e,t){this.logger.info("".concat(ls,".setRemoteAudioVolume with params: "),e,t);try{this._trtc.setRemoteAudioVolume(e,t)}catch(A){this._callFunctionErrorManage(A,"setRemoteAudioVolume")}},i.prototype.enableAudioVolumeEvaluation=function(e){this.logger.info("".concat(ls,".enableAudioVolumeEvaluation with params: "),e);try{this._trtc.enableAudioVolumeEvaluation(e)}catch(t){this._callFunctionErrorManage(t,"enableAudioVolumeEvaluation")}},i.prototype.enableSmallVideoStream=function(t,A){return g(this,void 0,Promise,(function(){var i;return u(this,(function(o){switch(o.label){case 0:return this.logger.info("".concat(ls,".enableSmallVideoStream with params: "),t,A),t?(i=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,A),this._setSmallStreamVideoProfile(i)):this._setSmallStreamVideoProfile(void 0),[4,this._updateLocalVideo()];case 1:return o.sent(),[2]}}))}))},i.prototype.snapshotVideo=function(t,A){var i="";return i=""===t&&A===e.TRTCVideoStreamType.TRTCVideoStreamTypeBig?this._trtc.getVideoSnapshot():""===t&&A===e.TRTCVideoStreamType.TRTCVideoStreamTypeSub?this._trtc.getVideoSnapshot({streamType:this._getTRTCStreamType(A)}):this._trtc.getVideoSnapshot({userId:t,streamType:this._getTRTCStreamType(A)}),this.emit("onSnapshotComplete",t,A,i),i},i.prototype.startScreenShare=function(t,A,i){return g(this,void 0,void 0,(function(){var o,n,s,a,c,g;return u(this,(function(u){switch(u.label){case 0:this.logger.info("".concat(ls,".startScreenShare with params: "),t,A,i),u.label=1;case 1:return u.trys.push([1,3,,4]),n=(o=i||{}).screenAudio,s=void 0!==n&&n,a=o.videoTrack,c=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,i),this._setScreenShareParams({view:t,profile:c,systemAudio:s,videoTrack:a}),[4,this._trtc.startScreenShare(this._getScreenShareParams())];case 2:return u.sent(),this._isSharingScreen=!0,[3,4];case 3:if((g=u.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT)throw console.error("Start share screen error:",g,g.code,g.name,g.message),g;return[3,4];case 4:return[2]}}))}))},i.prototype.setSubStreamEncoderParam=function(t){return g(this,void 0,void 0,(function(){var A,i;return u(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(ls,".setSubStreamEncoderParam with params: "),t),A=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,t),this._setScreenShareParams({profile:A}),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 g(this,void 0,Promise,(function(){var e;return u(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(ls,".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]}}))}))},i.prototype._startPublishVideoTrack=function(e){var t=e.videoTrack;return g(this,void 0,void 0,(function(){var e;return u(this,(function(A){switch(A.label){case 0:this._cameraVideoTrack=t,A.label=1;case 1:A.trys.push([1,6,,7]),A.label=2;case 2:return A.trys.push([2,4,,5]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return A.sent(),[3,5];case 4:throw A.sent();case 5:return[3,7];case 6:return e=A.sent(),this._callFunctionErrorManage(e,"startPublishVideoTrack"),[3,7];case 7:return[2]}}))}))},i.prototype._stopPublishVideoTrack=function(){return g(this,void 0,void 0,(function(){return u(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(vr)},i.prototype.pauseScreenCapture=function(){this._emitError(vr)},i.prototype.resumeScreenCapture=function(){this._emitError(vr)},i.prototype.getScreenCaptureSources=function(){this._emitError(vr)},i.prototype.selectScreenCaptureTarget=function(){this._emitError(vr)},i.prototype.getCameraDevicesList=function(){return g(this,void 0,Promise,(function(){var e,t,A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".getCameraDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,r.default.getCameraList()];case 2:return e=i.sent(),t=e.map((function(e){return a(a({},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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getCameraDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentCameraDevice=function(e){var t;return g(this,void 0,Promise,(function(){var A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".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(t){return t.deviceId===e}))||{},[3,5];case 4:throw A=i.sent(),this._currentCameraId=null===(t=this._currentCamera)||void 0===t?void 0:t.cameraId,this._callFunctionErrorManage(A,"setCurrentCameraDevice"),A;case 5:return[2]}}))}))},i.prototype.getCurrentCameraDevice=function(){this.logger.info("".concat(ls,".getCurrentCameraDevice"));var e=this._currentCamera,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new S(t,A,i,A,o)},i.prototype.isFrontCamera=function(){return this._getIsFrontCamera()},i.prototype.switchCamera=function(e){return g(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(ls,".switchCamera with params: "),e),this._setIsFrontCamera(e),[4,this._updateLocalVideo()];case 1:return t.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 g(this,void 0,void 0,(function(){var t,A,i,o,r;return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,10,,11]),t=e.enable,A=e.type,i=e.blurLevel,o=e.imagePath,t?this._isVirtualBackground?A!==ae?[3,2]:[4,this._trtc.updatePlugin(ne,{type:A,blurLevel:i})]:[3,5]:[3,8];case 1:n.sent(),n.label=2;case 2:return A!==ce?[3,4]:[4,this._trtc.updatePlugin(ne,{type:A,src:o})];case 3:n.sent(),n.label=4;case 4:return[3,7];case 5:return[4,this._trtc.startPlugin(ne,a(a({},e),{src:o,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:n.sent(),this._isVirtualBackground=!0,n.label=7;case 7:return[3,9];case 8:this._trtc.stopPlugin(ne),this._isVirtualBackground=!1,n.label=9;case 9:return[3,11];case 10:throw r=n.sent(),this.logger.error("".concat(ls,".setVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.setTestVirtualBackground=function(e){return g(this,void 0,void 0,(function(){var t,A,i,o,r;return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,10,,11]),t=e.enable,A=e.type,i=e.blurLevel,o=e.imagePath,t?this._isTestVirtualBackground?A!==ae?[3,2]:[4,this._testTrtc.updatePlugin(ne,{type:A,blurLevel:i})]:[3,5]:[3,8];case 1:n.sent(),n.label=2;case 2:return A!==ce?[3,4]:[4,this._testTrtc.updatePlugin(ne,{type:A,src:o})];case 3:n.sent(),n.label=4;case 4:return[3,7];case 5:return[4,this._testTrtc.startPlugin(ne,a(a({},e),{src:o,onAbort:this._onVirtualBackgroundError.bind(this)}))];case 6:n.sent(),this._isTestVirtualBackground=!0,n.label=7;case 7:return[3,9];case 8:this._testTrtc.stopPlugin(ne),this._isTestVirtualBackground=!1,n.label=9;case 9:return[3,11];case 10:throw r=n.sent(),this.logger.error("".concat(ls,".setTestVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.useVirtualBackground=function(e){return g(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:A.VirtualBackground,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:A.VirtualBackground,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},i.prototype.setBeautyStyle=function(e,t,A,i){return g(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._trtc,this._isBeautyEnabled,e,t,A,i,!1)];case 1:return o.sent(),[2]}}))}))},i.prototype.setTestBeautyStyle=function(e,t,A,i){return g(this,void 0,void 0,(function(){return u(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._testTrtc,this._isTestBeautyEnabled,e,t,A,i,!0)];case 1:return o.sent(),[2]}}))}))},i.prototype.useBeautyStyle=function(e){return g(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:En,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:En,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},i.prototype._handleBeautyStyleParam=function(e,t,A,i,o,r,n){return g(this,void 0,void 0,(function(){var A,s,a,c,g;return u(this,(function(u){switch(u.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");u.label=1;case 1:return u.trys.push([1,8,,9]),s=o/9,a=r/9,0===(A=i/9)&&0===s&&0===a?[4,e.stopPlugin(se)]:[3,3];case 2:return u.sent(),n?this._isTestBeautyEnabled=!1:this._isBeautyEnabled=!1,[3,7];case 3:return c={beauty:A,brightness:s,ruddy:a},t?[3,5]:[4,e.startPlugin(se,c)];case 4:return u.sent(),n?this._isTestBeautyEnabled=!0:this._isBeautyEnabled=!0,[3,7];case 5:return[4,e.updatePlugin(se,c)];case 6:u.sent(),u.label=7;case 7:return[3,9];case 8:throw g=u.sent(),n?this.logger.error("".concat(ls,".").concat("setTestBeautyStyle"," fail: "),g):this.logger.error("".concat(ls,".").concat("setBeautyStyle"," fail: "),g),g;case 9:return[2]}}))}))},i.prototype._resetBeautyStyle=function(){return g(this,void 0,void 0,(function(){return u(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]}}))}))},i.prototype.getMicDevicesList=function(){return g(this,void 0,Promise,(function(){var e,t,A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".getMicDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,r.default.getMicrophoneList()];case 2:return e=i.sent(),t=e.map((function(e){return a(a({},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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getMicDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentMicDevice=function(e){var t;return g(this,void 0,Promise,(function(){var A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".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(t){return t.deviceId===e}))||{},[3,5];case 4:throw A=i.sent(),this._setCurrentMicrophoneId(null===(t=this._currentMicrophone)||void 0===t?void 0:t.deviceId),this._callFunctionErrorManage(A,"setCurrentMicDevice"),A;case 5:return[2]}}))}))},i.prototype.getCurrentMicDevice=function(){this.logger.info("".concat(ls,".getCurrentMicDevice"));var e=this._currentMicrophone,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new S(t,A,i,A,o)},i.prototype.getSpeakerDevicesList=function(){return g(this,void 0,Promise,(function(){var e,t,A;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".getSpeakerDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,r.default.getSpeakerList()];case 2:return e=i.sent(),t=e.map((function(e){return a(a({},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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getSpeakerDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentSpeakerDevice=function(e){return g(this,void 0,Promise,(function(){var t;return u(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(ls,".setCurrentSpeakerDevice with params: "),{speakerId:e}),A.label=1;case 1:return A.trys.push([1,3,,4]),e?[4,r.default.setCurrentSpeaker(e)]:[2,!1];case 2:return A.sent(),this._setCurrentSpeakerId(e),this._currentSpeaker=this._speakerList.find((function(t){return t.deviceId===e}))||{},[3,4];case 3:throw t=A.sent(),this._callFunctionErrorManage(t,"setCurrentSpeakerDevice"),t;case 4:return[2]}}))}))},i.prototype.getCurrentSpeakerDevice=function(){this.logger.info("".concat(ls,".getCurrentSpeakerDevice"));var e=this._currentSpeaker,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new S(t,A,i,A,o)},i.prototype.startCameraDeviceTest=function(e){return g(this,void 0,void 0,(function(){var t;return u(this,(function(A){switch(A.label){case 0:if(this.logger.info("".concat(ls,".startCameraDeviceTest with params: "),e),!e)return[2];this._setLocalTestView(e),A.label=1;case 1:return A.trys.push([1,3,,7]),[4,this._testTrtc.startLocalVideo(this._generateLocalTestVideoData())];case 2:return A.sent(),[3,7];case 3:return(t=A.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestVideo()];case 4:return A.sent(),[3,6];case 5:throw this._callFunctionErrorManage(t,"startCameraDeviceTest"),t;case 6:return[3,7];case 7:return[2]}}))}))},i.prototype.stopCameraDeviceTest=function(){return g(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(ls,".stopCameraDeviceTest")),this._setLocalTestView(null),[4,this._testTrtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},i.prototype.startMicDeviceTest=function(e){return g(this,void 0,void 0,(function(){var t,A=this;return u(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(ls,".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(t=i.sent()).code!==r.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestAudio()];case 4:return i.sent(),[3,6];case 5:throw this._callFunctionErrorManage(t,"startMicDeviceTest"),t;case 6:return[3,7];case 7:return this._testTrtc.on(r.default.EVENT.AUDIO_VOLUME,(function(e){null==e||e.result.forEach((function(e){var t=e.userId,i=e.volume;""===t&&A.emit("onTestMicVolume",i)}))})),[4,this._testTrtc.enableAudioVolumeEvaluation(e)];case 8:return i.sent(),[2]}}))}))},i.prototype.stopMicDeviceTest=function(){return g(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(ls,".stopMicDeviceTest")),[4,this._testTrtc.stopLocalAudio()];case 1:return e.sent(),[2]}}))}))},i.prototype.callExperimentalAPI=function(e){return g(this,void 0,void 0,(function(){var t,A,i;return u(this,(function(o){switch(o.label){case 0:if(this.logger.info("".concat(ls,".callExperimentalAPI"),e),(t=Be(e))===e)return[2];if(A=t.api,i=t.params,!A||!i)return[2];o.label=1;case 1:switch(o.trys.push([1,21,,22]),A){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,19];case 2:return this._handleSetFrameWork(i),[3,20];case 3:return this._echoCancellation=Boolean(i.enable),[3,20];case 4:return this._noiseSuppression=Boolean(i.enable),[3,20];case 5:return this._autoGainControl=Boolean(i.enable),[3,20];case 6:return this._handleKeyMetricsStats(i),[3,20];case 7:return this._networkProxy=i,[3,20];case 8:return[4,this.setVirtualBackground(i)];case 9:return o.sent(),[3,20];case 10:return[4,this.setTestVirtualBackground(i)];case 11:return o.sent(),[3,20];case 12:return[4,this.setTestBeautyStyle(i.style,i.beautyLevel,i.whitenessLevel,i.ruddinessLevel)];case 13:return o.sent(),[3,20];case 14:return this._setVideoEncodeParamEx(i),[3,20];case 15:return this._enableAutoPlayDialog=Boolean(i.enable),[3,20];case 16:return this._latencyLevel=i.latencyLevel,[3,20];case 17:return[4,this._switchPlaybackQuality(i)];case 18:return o.sent(),[3,20];case 19:return[3,20];case 20:return[3,22];case 21:throw o.sent();case 22:return[2]}}))}))},i.prototype._handleSetFrameWork=function(e){var t=e.frameWork,A=e.component,i=e.language;Ce(t)&&(this._frameWorkType=t),Ce(A)&&(this._component=A),Ce(i)&&(this._language=i)},i.prototype._handleKeyMetricsStats=function(e){var t=e.key,A=e.opt,i=e.value,o=e.version,n=A===le;r.default._addKVStat({type:A,key:t,value:i,version:o,useUV:n,base:100})},i.prototype._setVideoEncodeParamEx=function(t){return g(this,void 0,void 0,(function(){return u(this,(function(A){switch(A.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 A.sent(),[3,6];case 3:return[4,this.setSubStreamEncoderParam(t)];case 5:return[3,6];case 6:return[2]}}))}))},i.prototype._switchPlaybackQuality=function(t){return g(this,void 0,void 0,(function(){var A,i,o,r,n,s,c,g,l;return u(this,(function(u){switch(u.label){case 0:if(i=(A=t||{}).quality,o=A.stream_list,r=void 0===o?[]:o,!i||0===r.length)return[2];for(n=null,s=null,c=0,g=r;c<g.length;c++)(l=g[c]).name===i?n=l:s=this._remoteStreamConfig.get("".concat(l.user_id,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)));return s&&n&&s.view&&n.user_id?[4,this.setRemoteRenderParams(n.user_id,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,a(a({},s.option),{fillMode:this._getTRTCCloudVideoFillMode(s.option.fillMode),mirrorType:this._getTRTCCloudMirrorType(s.option.mirrorType),view:s.view}))]:[2];case 1:return u.sent(),[4,this.startRemoteView(n.user_id,s.view,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 2:return u.sent(),[4,this.stopRemoteView(s.userId,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 3:return u.sent(),[4,this._trtc.muteRemoteAudio(s.userId,!0)];case 4:return u.sent(),[4,this._trtc.muteRemoteAudio(n.user_id,!1)];case 5:return u.sent(),this._remoteStreamConfig.delete("".concat(s.userId,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig))),[2]}}))}))},i.prototype._emitError=function(e){e&&this.emit&&this.emit(Ae,e.code,e.message)},i.prototype._emitWarning=function(e){this.emit&&this.emit(ie,e)},i.prototype._transformTRTCServerError=function(e){return-8===e.extraCode?Qr:0===String(e.extraCode).indexOf("70")?0-e.extraCode:void 0},i.prototype._transformTRTCInvalidOperationError=function(e,t){return"enterRoom"!==t||5104!==e.extraCode&&5998!==e.code?e.code:ur},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,t){var A=this._isCameraError(t),i=this._isMicError(t);switch(e.extraCode){case 5301:case 5305:case 5306:case 5307:case 5308:case 5309:if(A)return lr;if(i)return Ir;break;case 5302:if(A)return dr;if(i)return Br;break;case 5303:if(A)return Cr;if(i)return pr;break;case 5304:if(A)return hr;if(i)return Er}},i.prototype._transformTRTCUnKnowError=function(e,t){var A=this._isCameraError(t),i=this._isMicError(t);return A?lr:i?Ir:e.code},i.prototype._transformTRTCErrorCode=function(e,t){var A=null==e?void 0:e.code;if(e&&e.code)switch(e.code){case r.default.ERROR_CODE.DEVICE_ERROR:A=this._transformTRTCDeviceError(e,t);break;case r.default.ERROR_CODE.SERVER_ERROR:A=this._transformTRTCServerError(e);break;case r.default.ERROR_CODE.INVALID_OPERATION:case r.default.ERROR_CODE.OPERATION_ABORT:A=this._transformTRTCInvalidOperationError(e,t);break;case r.default.ERROR_CODE.UNKNOWN_ERROR:A=this._transformTRTCUnKnowError(e,t)}return A},i.prototype._callFunctionErrorManage=function(e,t){if(!e||e.code!==r.default.ERROR_CODE.OPERATION_ABORT){this.logger.warn("(".concat(t,") failed - ").concat(e.code," - ").concat(e.message));var A=this._transformTRTCErrorCode(e,t);this.emit(Ae,A,e.message)}},i.prototype._getTRTCResolution=function(t){var A=(e.TRTCVideoResolution[t]||"").split("_");return{width:+(A.length>1&&A[1]),height:+(A.length>2&&A[2])}},i.prototype._getTRTCVideoProfile=function(t,A){void 0===A&&(A={});var i=A.videoWidth,o=A.videoHeight,r=A.videoResolution,n=A.videoFps,s=A.videoBitrate,a=A.resMode,c=A.resolutionMode,g={};switch(t){case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:g=this._defaultScreenProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall:g=this._defaultSmallVideoProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:default:g=this._defaultVideoProfile}if(he(r))he(i)||(g.width=i),he(o)||(g.height=o);else{var u=this._getTRTCResolution(r);g.width=u.width,g.height=u.height}if(!he(a)&&a===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait||!he(c)&&c===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait){var l=g.height,d=g.width;g.width=l,g.height=d}return n&&(g.frameRate=n),s&&(g.bitrate=s),g},i.prototype._getTRTCStreamType=function(t){var A;return((A={})[e.TRTCVideoStreamType.TRTCVideoStreamTypeBig]=r.default.TYPE.STREAM_TYPE_MAIN,A[e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall]=r.default.TYPE.STREAM_TYPE_MAIN,A[e.TRTCVideoStreamType.TRTCVideoStreamTypeSub]=r.default.TYPE.STREAM_TYPE_SUB,A)[t]},i.prototype._getTRTCFillMode=function(t){var A;return((A={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]=rr.COVER,A[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]=rr.CONTAIN,A)[t]},i.prototype._getTRTCCloudVideoFillMode=function(t){var A;return((A={})[rr.COVER]=e.TRTCVideoFillMode.TRTCVideoFillMode_Fill,A[rr.CONTAIN]=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit,A)[t]},i.prototype._getTRTCCloudMirrorType=function(t){return!0===t?e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable},i.prototype._getLocalRenderMirror=function(t){var A;return t===e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto?!this._getIsMobile()||this._getIsFrontCamera():((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A)[t]},i.prototype._getTRTCLocalMirror=function(e,t){var A=this._getLocalRenderMirror(e);return he(t)?!!A&&"both":A&&t?"both":A&&!t?"view":!A&&t?"publish":!(!A&&!t)&&"view"},i.prototype._getTRTCRemoteMirror=function(t){var A;return((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!1,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A)[t]},i.prototype._getTRTCQosPreference=function(t){var A;return((A={})[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceSmooth]=r.default.TYPE.QOS_PREFERENCE_SMOOTH,A[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear]=r.default.TYPE.QOS_PREFERENCE_CLEAR,A)[t]},i.prototype._getTRTCAudioQuality=function(t){var A;return((A={})[e.TRTCAudioQuality.TRTCAudioQualitySpeech]=r.default.TYPE.AUDIO_PROFILE_STANDARD,A[e.TRTCAudioQuality.TRTCAudioQualityDefault]=r.default.TYPE.AUDIO_PROFILE_STANDARD,A[e.TRTCAudioQuality.TRTCAudioQualityMusic]=r.default.TYPE.AUDIO_PROFILE_HIGH_STEREO,A)[t]},i.prototype._getTRTCCloudDeviceType=function(t){return{camera:e.TRTCDeviceType.TRTCDeviceTypeCamera,microphone:e.TRTCDeviceType.TRTCDeviceTypeMic,speaker:e.TRTCDeviceType.TRTCDeviceTypeSpeaker}[t]},i.prototype._getTRTCCloudDeviceState=function(t){return{add:e.TRTCDeviceState.TRTCDeviceStateAdd,remove:e.TRTCDeviceState.TRTCDeviceStateRemove,active:e.TRTCDeviceState.TRTCDeviceStateActive}[t]},i.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]},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,t){return Qe(this._remoteStreamConfig.get("".concat(e,"_").concat(this._getTRTCStreamType(t))))},i.prototype._addTRTCEvents=function(){var t=this;this._trtc.on(r.default.EVENT.ERROR,(function(e){e&&t.emit("onError",e.code,e.message)})),this._trtc.on(r.default.EVENT.REMOTE_USER_ENTER,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserEnterRoom",e.userId)})),this._trtc.on(r.default.EVENT.REMOTE_USER_EXIT,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserLeaveRoom",e.userId)})),this._trtc.on(r.default.EVENT.REMOTE_AUDIO_AVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!0)})),this._trtc.on(r.default.EVENT.REMOTE_AUDIO_UNAVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!1)})),this._trtc.on(r.default.EVENT.REMOTE_VIDEO_AVAILABLE,(function(e){t._emitVideoAvailable(e,!0)})),this._trtc.on(r.default.EVENT.REMOTE_VIDEO_UNAVAILABLE,(function(e){t._emitVideoAvailable(e,!1)})),this._trtc.on(r.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(r.default.EVENT.KICKED_OUT,(function(e){var A={banned:nr.banned,room_disband:nr.roomDisband};Ce(A[e.reason])&&t.emit("onExitRoom",A[e.reason])})),this._trtc.on(r.default.EVENT.NETWORK_QUALITY,(function(e){var A=e.uplinkNetworkQuality,i=e.downlinkNetworkQuality,o=new F("",t._getTRTCCloudQuality(A)),r=[];t._remoteStatisticsUserIdList.length>0&&(r=t._remoteStatisticsUserIdList.map((function(e){return new F(e,t._getTRTCCloudQuality(i))}))),t.emit("onNetworkQuality",o,r)})),this._trtc.on(r.default.EVENT.AUTOPLAY_FAILED,(function(e){t.emit("onAutoPlayFailed",e)})),this._trtc.on(r.default.EVENT.SEI_MESSAGE,(function(e){if(e.data&&"object"==typeof e.data&&e.data instanceof ArrayBuffer){for(var A=new Uint8Array(e.data),i="",o=0;o<A.length;o++)i+=String.fromCharCode(A[o]);e.stringData=i}t.emit("onRecvSEIMsg",e.userId,JSON.stringify(e))})),this._trtc.on(r.default.EVENT.STATISTICS,(function(A){var i,o=A.rtt,r=A.upLoss,n=A.downLoss,s=A.bytesSent,a=A.bytesReceived,c=A.localStatistics,g=A.remoteStatistics;t._remoteStatisticsUserIdList=g.map((function(e){return e.userId}));var u={big:e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,small:e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,sub:e.TRTCVideoStreamType.TRTCVideoStreamTypeSub},l=(null===(i=c.video)||void 0===i?void 0:i.length)>0?c.video.map((function(e){var t=new x;return t.width=e.width,t.height=e.height,t.frameRate=e.frameRate,t.videoBitrate=e.bitrate,t.audioBitrate=c.audio.bitrate||0,t.streamType=u[e.videoType],t})):[];if(0===l.length&&c.audio.bitrate>0){var d=new x;d.audioBitrate=c.audio.bitrate||0,l.push(d)}var h=[];g.forEach((function(e){var t=[],A=e.userId,i=e.audio.bitrate;if(e.video&&e.video.forEach((function(e){var o=new Y;o.userId=A,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],t.push(o)})),0===t.length){var o=new Y;o.userId=A,o.audioBitrate=i||0,t.push(o)}h.push.apply(h,t)}));var C=new H;C.upLoss=r,C.downLoss=n,C.rtt=o,C.sentBytes=s,C.receivedBytes=a,C.localStatisticsArray=l,C.localStatisticsArraySize=l.length,C.remoteStatisticsArray=h,C.remoteStatisticsArraySize=h.length,t.emit("onStatistics",C)})),this._trtc.on(r.default.EVENT.SCREEN_SHARE_STOPPED,(function(){t.emit("onScreenCaptureStopped",0),t._clearScreenShareParams(),t._isSharingScreen=!1})),this._trtc.on(r.default.EVENT.PUBLISH_STATE_CHANGED,(function(A){var i=A.mediaType;"started"===A.state&&("audio"===i?t.emit("onSendFirstLocalAudioFrame"):"video"===i?t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeBig):"screen"===i&&t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeSub))})),this._trtc.on(r.default.EVENT.FIRST_VIDEO_FRAME,(function(e){var A=e.userId,i=e.streamType,o=e.width,r=e.height;t.emit("onFirstVideoFrame",A,i,o,r)})),this._trtc.on(r.default.EVENT.AUDIO_PLAY_STATE_CHANGED,(function(e){var A=e.userId;"PLAYING"===e.state&&t.emit("onFirstAudioFrame",A)})),this._trtc.on(r.default.EVENT.DEVICE_CHANGED,(function(e){var A=e.type,i=e.device,o=e.action,r=i.deviceId;if("active"===o){switch(A){case"camera":t._currentCameraId=r,t._currentCamera=i;break;case"microphone":t._currentMicrophoneId=r,t._currentMicrophone=i;break;case"speaker":t._currentSpeakerId=r,t._currentSpeaker=i}t.emitOnDeviceChange(r,t._getTRTCCloudDeviceType(A),t._getTRTCCloudDeviceState(o))}})),this._trtc.on(r.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(r.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"))}))},i.prototype._removeTRTCEvents=function(){this._trtc.off("*")},i.prototype._emitVideoAvailable=function(e,t){var A=e.userId,i=e.streamType;t?this._remoteStreamMap.set("".concat(A,"_").concat(i),!0):this._remoteStreamMap.delete("".concat(A,"_").concat(i)),i===r.default.TYPE.STREAM_TYPE_SUB?A&&this.emit("onUserSubStreamAvailable",A,t):A&&this.emit("onUserVideoAvailable",A,t)},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 t=e.view,A=e.systemAudio,i=e.fillMode,o=e.profile,r=e.videoTrack,n=e.qosPreference;he(t)||(this._screenShareParams.view=t),he(A)||(this._screenShareParams.option.systemAudio=A),he(i)||(this._screenShareParams.option.fillMode=i),he(o)||(this._screenShareParams.option.profile=o),he(r)||(this._screenShareParams.option.videoTrack=r),he(n)||(this._screenShareParams.option.qosPreference=n)},i.prototype._clearScreenShareParams=function(){var e,t,A,i,o;(null===(e=this._screenShareParams)||void 0===e?void 0:e.view)&&delete this._screenShareParams.view,(null===(A=null===(t=this._screenShareParams)||void 0===t?void 0:t.option)||void 0===A?void 0:A.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(t,A,i){var o=this._remoteStreamConfig.get("".concat(t,"_").concat(this._getTRTCStreamType(A)));o||(o={userId:t,streamType:this._getTRTCStreamType(A),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;he(r)||(o.view=r),he(n)||(o.option.mirror=this._getTRTCRemoteMirror(n)),he(s)||(o.option.fillMode=this._getTRTCFillMode(s)),he(a)||(o.option.small=a),this._remoteStreamConfig.set("".concat(t,"_").concat(this._getTRTCStreamType(A)),o)},i.prototype._inheritPropertiesToSubCloud=function(e){e._frameWorkType=this._frameWorkType,e._component=this._component,e._language=this._language,e._networkProxy=a({},this._networkProxy),e._latencyLevel=this._latencyLevel,e._enableAutoPlayDialog=this._enableAutoPlayDialog},i.prototype._inheritEventsToSubCloud=function(e){var t=this;e._trtc.on(r.default.EVENT.AUTOPLAY_FAILED,(function(e){t.emit("onAutoPlayFailed",e)}))},i.prototype.handleDeviceChange=function(){return g(this,void 0,void 0,(function(){var t=this;return u(this,(function(A){return r.default.getCameraList().then((function(A){return g(t,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this._cameraList.length===A.length?[2]:[4,this.deviceChangeManage(this._cameraList,A,e.TRTCDeviceType.TRTCDeviceTypeCamera)];case 1:return t.sent(),this._cameraList=A,[2]}}))}))})),r.default.getMicrophoneList().then((function(A){return g(t,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._microphoneList,A,e.TRTCDeviceType.TRTCDeviceTypeMic)];case 1:return t.sent(),this._microphoneList=A,[2]}}))}))})),r.default.getSpeakerList().then((function(A){return g(t,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._speakerList,A,e.TRTCDeviceType.TRTCDeviceTypeSpeaker)];case 1:return t.sent(),this._speakerList=A,[2]}}))}))})),[2]}))}))},i.prototype.isSameDevice=function(e,t){var A=e&&e.deviceId&&e.groupId&&e.label,i=t&&t.deviceId&&t.groupId&&t.label;return!(!A||!i)&&(e.deviceId===t.deviceId&&e.groupId===t.groupId&&e.label===t.label)},i.prototype.deviceChangeManage=function(t,A,i){return g(this,void 0,void 0,(function(){var o,r,n,s,a;return u(this,(function(c){switch(c.label){case 0:return o=void 0,t.length!==A.length&&(r=(A||[]).map((function(e){return e.deviceId})),n=new S,t.length>A.length?(n=t.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateRemove):(r=(t||[]).map((function(e){return e.deviceId})),n=A.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateAdd),s=n.deviceId,this.emitOnDeviceChange(s,i,o)),a=this.getDefaultDeviceInfo(A),i!==e.TRTCDeviceType.TRTCDeviceTypeCamera||o!==e.TRTCDeviceState.TRTCDeviceStateRemove?[3,3]:this.isSameDevice(this._currentCamera,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,2];case 1:c.sent(),c.label=2;case 2:c.label=3;case 3:return i!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,6]:this.isSameDevice(this._currentMicrophone,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,5];case 4:c.sent(),c.label=5;case 5:c.label=6;case 6:return i!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,9]:this.isSameDevice(this._currentSpeaker,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,8];case 7:c.sent(),c.label=8;case 8:c.label=9;case 9:return[2]}}))}))},i.prototype.getDefaultDeviceInfo=function(e){var t=new S;if(0===e.length)return t;var A=e.filter((function(e){return"default"===e.deviceId}));return t=A.length>0?A[0]:e[0]},i.prototype.autoChangeDevice=function(t,A){return g(this,void 0,void 0,(function(){var i,o,n;return u(this,(function(s){switch(s.label){case 0:return i=A.deviceId,t!==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 o=s.sent(),console.log("testTRTC error",JSON.stringify(o)),o.code,r.default.ERROR_CODE.OPERATION_ABORT,[3,5];case 5:this._currentCameraId=i,this._currentCamera=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=6;case 6:return t!==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,r.default.ERROR_CODE.OPERATION_ABORT,[3,11];case 11:this._currentMicrophoneId=i,this._currentMicrophone=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=12;case 12:return t!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,14]:[4,r.default.setCurrentSpeaker(i)];case 13:s.sent(),this._currentSpeakerId=i,this._currentSpeaker=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=14;case 14:return[2]}}))}))},i.prototype.emitOnDeviceChange=function(e,t,A){this.emit("onDeviceChange",e,t,A)},i.prototype.getMediaMixingManager=function(){return new Pn({logger:this.logger,trtc:this._trtc,trtcCloud:this})},i.prototype.getAITranscriberManager=function(){return new ss({logger:this.logger,trtc:this._trtc})},i.shareInstance=null,i.subCloudMap=new Map,i.enableSEI=!1,i.assetsPath="",c([(o="exitRoom",function(e,t,A){var i=A.value;return A.value=function(){for(var e,t,A,r,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];var a=[];return null===(t=null===(e=is.get(this))||void 0===e?void 0:e.queue)||void 0===t||t.forEach((function(e){return a.push(e)})),null===(A=os.get(this))||void 0===A||A.forEach((function(e){return null==e?void 0:e.queue.forEach((function(e){return a.push(e)}))})),null===(r=rs.get(this))||void 0===r||r.forEach((function(e){return null==e?void 0:e.queue.forEach((function(e){return a.push(e)}))})),a.forEach((function(e){e.reject(new Error("aborted ".concat(o)))})),is.delete(this),os.delete(this),rs.delete(this),i.apply(this,n)},A})],i.prototype,"exitRoom",null),c([ns((function(e){return e}))],i.prototype,"muteRemoteAudio",null),c([ns((function(e){return e}))],i.prototype,"muteRemoteVideoStream",null),c([ns((function(e){var t=e||{},A=t.quality,i=t.stream_list,o=void 0===i?[]:i,r=o.some((function(e){return e.name===A}));return A&&r?o.map((function(e){return e.user_id})):(console.warn("[QualitySwitch] Invalid params: target ".concat(A," not found in list")),[])}),{deduplicate:!0})],i.prototype,"_switchPlaybackQuality",null),i}(m);e.Rect=z,e.TRTCDeviceInfo=S,e.TRTCImageBuffer=K,e.TRTCLocalStatistics=x,e.TRTCMixUser=$,e.TRTCNetworkQosParam=J,e.TRTCParams=M,e.TRTCPublishCDNParam=V,e.TRTCQualityInfo=F,e.TRTCRemoteStatistics=Y,e.TRTCRenderParams=L,e.TRTCScreenCaptureProperty=te,e.TRTCScreenCaptureSourceInfo=W,e.TRTCStatistics=H,e.TRTCTranscodingConfig=Z,e.TRTCVideoEncParam=D,e.TRTCVolumeInfo=G,e.default=Cs,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")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/video-effect/virtual-background"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.virtualBackground)}(this,(function(e,t,A){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])},r(e,t)};var n=function(){return n=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++)for(var o in t=arguments[A])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function s(e,t,A,i){var o,r=arguments.length,n=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,A):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,A,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(n=(r<3?o(n):r>3?o(t,A,n):o(t,A))||n);return r>3&&n&&Object.defineProperty(t,A,n),n}function a(e,t,A,i){return new(A||(A=Promise))((function(o,r){function n(e){try{a(i.next(e))}catch(sr){r(sr)}}function s(e){try{a(i.throw(e))}catch(sr){r(sr)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof A?t:new A((function(e){e(t)}))).then(n,s)}a((i=i.apply(e,t||[])).next())}))}function c(e,t){var A,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(A)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(n=0)),n;)try{if(A=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=t.call(e,n)}catch(sr){s=[6,sr],i=0}finally{A=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 t="function"==typeof Symbol&&Symbol.iterator,A=t&&e[t],i=0;if(A)return A.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(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t,A){if(A||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,A=e[Symbol.asyncIterator];return A?A.call(e):(e=g(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(A){t[A]=e[A]&&function(t){return new Promise((function(i,o){(function(e,t,A,i){Promise.resolve(i).then((function(t){e({value:t,done:A})}),t)})(i,o,(t=e[A](t)).done,t.value)}))}}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var C,I,B,E,p,Q,f,v,y=h((function(e){var t=Object.prototype.hasOwnProperty,A="~";function i(){}function o(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function r(e,t,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=A?A+t:t;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,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(A=!1)),s.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)t.call(e,i)&&o.push(A?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=A?A+e:e,i=this._events[t];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 t=A?A+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,o,r,n){var s=A?A+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,i),!0;case 4:return g.fn.call(g.context,t,i,o),!0;case 5:return g.fn.call(g.context,t,i,o,r),!0;case 6:return g.fn.call(g.context,t,i,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,i);break;case 4:g[c].fn.call(g[c].context,t,i,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},s.prototype.on=function(e,t,A){return r(this,e,t,A,!1)},s.prototype.once=function(e,t,A){return r(this,e,t,A,!0)},s.prototype.removeListener=function(e,t,i,o){var r=A?A+e:e;if(!this._events[r])return this;if(!t)return n(this,r),this;var s=this._events[r];if(s.fn)s.fn!==t||o&&!s.once||i&&s.context!==i||n(this,r);else{for(var a=0,c=[],g=s.length;a<g;a++)(s[a].fn!==t||o&&!s[a].once||i&&s[a].context!==i)&&c.push(s[a]);c.length?this._events[r]=1===c.length?c[0]:c:n(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=A?A+e:e,this._events[t]&&n(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=A,s.EventEmitter=s,e.exports=s}));e.TRTCVideoResolution=void 0,(C=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[C.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",C[C.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",C[C.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",C[C.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",C[C.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",C[C.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",C[C.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",C[C.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",C[C.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",C[C.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",C[C.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",C[C.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",C[C.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",C[C.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",C[C.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",C[C.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",C[C.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",C[C.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",C[C.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",C[C.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(I=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[I.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",I[I.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",I[I.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(B=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[B.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",B[B.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(E=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[E.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",E[E.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",E[E.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(p=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[p.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",p[p.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,(f=e.TRTCRoleType||(e.TRTCRoleType={}))[f.TRTCRoleAnchor=20]="TRTCRoleAnchor",f[f.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(v=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[v.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",v[v.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",v[v.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var T,m,R=function(e,t,A,i,o){void 0===e&&(e=""),void 0===t&&(t=""),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=""),this.deviceId=e,this.deviceName=t,this.kind=A,this.label=i,this.groupId=o};e.TRTCDeviceState=void 0,(T=e.TRTCDeviceState||(e.TRTCDeviceState={}))[T.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",T[T.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",T[T.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(m=e.TRTCDeviceType||(e.TRTCDeviceType={}))[m.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",m[m.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",m[m.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",m[m.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var w,S=function(t,A,i,o,r,n,s,a,c,g,u){void 0===t&&(t=0),void 0===A&&(A=""),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===c&&(c=null),void 0===g&&(g=null),void 0===u&&(u=30),this.sdkAppId=t,this.userId=A,this.userSig=i,this.roomId=o,this.strRoomId=r,this.role=n,this.privateMapKey=s,this.streamId=c,this.userDefineRecordId=g,this.frameWorkType=u},b=function(t,A,i,o){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===A&&(A=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===i&&(i=15),void 0===o&&(o=550),this.videoResolution=t,this.resMode=A,this.videoFps=i,this.videoBitrate=o};e.TRTCVideoRotation=void 0,(w=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[w.TRTCVideoRotation0=0]="TRTCVideoRotation0",w[w.TRTCVideoRotation90=1]="TRTCVideoRotation90",w[w.TRTCVideoRotation180=2]="TRTCVideoRotation180",w[w.TRTCVideoRotation270=3]="TRTCVideoRotation270";var D,M=function(t,A,i){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===A&&(A=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===i&&(i=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=A,this.mirrorType=i};e.TRTCQuality=void 0,(D=e.TRTCQuality||(e.TRTCQuality={}))[D.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",D[D.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",D[D.TRTCQuality_Good=2]="TRTCQuality_Good",D[D.TRTCQuality_Poor=3]="TRTCQuality_Poor",D[D.TRTCQuality_Bad=4]="TRTCQuality_Bad",D[D.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",D[D.TRTCQuality_Down=6]="TRTCQuality_Down";var _,L,k,N=function(t,A){void 0===t&&(t=""),void 0===A&&(A=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=A},P=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},F=function(e,t,A){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=null),this.appId=e,this.bizId=t,this.url=A},G=function(t,A,i,o,r,n,s){void 0===t&&(t=0),void 0===A&&(A=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=t,this.height=A,this.frameRate=i,this.videoBitrate=o,this.audioBitrate=n,this.streamType=s},V=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h){void 0===t&&(t=""),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===h&&(h=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=i,this.height=o,this.frameRate=r,this.videoBitrate=n,this.audioBitrate=a,this.streamType=h},x=function(e,t,A,i,o,r,n,s,a,c,g){void 0===e&&(e=0),void 0===t&&(t=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===c&&(c=[]),void 0===g&&(g=0),this.upLoss=e,this.downLoss=t,this.rtt=o,this.receivedBytes=r,this.sentBytes=n,this.localStatisticsArray=s,this.localStatisticsArraySize=a,this.remoteStatisticsArray=c,this.remoteStatisticsArraySize=g};e.TRTCVideoResolutionMode=void 0,(_=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[_.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",_[_.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,(k=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[k.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",k[k.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var Y,H,U=function(t,A){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===A&&(A=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=A},O=function(e,t,A,i){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.buffer=e,this.length=t,this.width=A,this.height=i};e.TRTCLogLevel=void 0,(Y=e.TRTCLogLevel||(e.TRTCLogLevel={}))[Y.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",Y[Y.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",Y[Y.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",Y[Y.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",Y[Y.TRTCLogLevelError=4]="TRTCLogLevelError",Y[Y.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",Y[Y.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(H=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[H.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",H[H.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",H[H.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",H[H.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var J,K=function(t,A,i,o,r,n){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=new O),void 0===r&&(r=new O),void 0===n&&(n=!1),this.type=t,this.sourceId=A,this.sourceName=i,this.thumbBGRA=o,this.iconBGRA=r,this.isMinimizeWindow=n},j=function(e,t,A,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.left=e,this.top=t,this.right=A,this.bottom=i},W=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h,C){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===A&&(A=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===c&&(c=0),void 0===g&&(g=""),void 0===u&&(u=64),void 0===l&&(l=48e3),void 0===d&&(d=1),void 0===h&&(h=[]),void 0===C&&(C=""),this.mode=t,this.appId=A,this.bizId=i,this.videoWidth=o,this.videoHeight=r,this.videoBitrate=n,this.videoFramerate=s,this.videoGOP=a,this.backgroundColor=c,this.backgroundImage=g,this.audioSampleRate=u,this.audioBitrate=l,this.audioChannels=d,this.mixUsersArray=h,this.mixUsersArraySize=h.length,this.streamId=C};e.TRTCTranscodingConfigMode=void 0,(J=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[J.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",J[J.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",J[J.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",J[J.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",J[J.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",J[J.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",J[J.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",J[J.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",J[J.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",J[J.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var z,Z,q=function(t,A,i,o,r,n,s,a){void 0===t&&(t=""),void 0===A&&(A=""),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=t,this.roomId=A,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,(Z=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[Z.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",Z[Z.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",Z[Z.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",Z[Z.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var X,$=function(e,t,A,i,o,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===A&&(A=!0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=A,this.highLightColor=i,this.highLightWidth=o,this.enableCaptureChildWindow=r},ee="onError",te="onWarning",Ae="rtc",ie="live",oe="VirtualBackground",re="BasicBeauty",ne="blur",se="image",ae={20:"anchor",21:"audience"},ce={0:Ae,1:ie,2:Ae,3:ie};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(X||(X={}));var ge="enum";function ue(){return Math.floor(performance.now())}var le=function(e){return void 0===e},de=function(e){return"number"==typeof e},he=function(e){return"boolean"==typeof e};function Ce(e){if("string"!=typeof e)return e;var t;try{var A=JSON.parse(e);t="object"==typeof A&&A?A:e}catch(i){t=e}return t}function Ie(e){return null==e}function Be(){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(A){e[A]&&"object"==typeof e[A]?e[A]=Be(e[A],t[A]):e[A]=t[A]})),e}),{})}function Ee(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,A){t[A]=Ee(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(A){Object.hasOwnProperty.call(e,A)&&(t[A]=Ee(e[A]))}))):t=e,t)}var pe,Qe,fe=function(e){return e&&e.Math===Math&&e},ve=fe("object"==typeof globalThis&&globalThis)||fe("object"==typeof window&&window)||fe("object"==typeof self&&self)||fe("object"==typeof d&&d)||function(){return this}()||d||Function("return this")(),ye=function(e){try{return!!e()}catch(t){return!0}},Te=!ye((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),me=!ye((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Re=Function.prototype.call,we=me?Re.bind(Re):function(){return Re.apply(Re,arguments)},Se={}.propertyIsEnumerable,be=Object.getOwnPropertyDescriptor,De={f:be&&!Se.call({1:2},1)?function(e){var t=be(this,e);return!!t&&t.enumerable}:Se},Me=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_e=Function.prototype,Le=_e.call,ke=me&&_e.bind.bind(Le,Le),Ne=me?ke:function(e){return function(){return Le.apply(e,arguments)}},Pe=Ne({}.toString),Fe=Ne("".slice),Ge=function(e){return Fe(Pe(e),8,-1)},Ve=Object,xe=Ne("".split),Ye=ye((function(){return!Ve("z").propertyIsEnumerable(0)}))?function(e){return"String"===Ge(e)?xe(e,""):Ve(e)}:Ve,He=function(e){return null==e},Ue=TypeError,Oe=function(e){if(He(e))throw Ue("Can't call method on "+e);return e},Je=function(e){return Ye(Oe(e))},Ke="object"==typeof document&&document.all,je={all:Ke,IS_HTMLDDA:void 0===Ke&&void 0!==Ke},We=je.all,ze=je.IS_HTMLDDA?function(e){return"function"==typeof e||e===We}:function(e){return"function"==typeof e},Ze=je.all,qe=je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ze(e)||e===Ze}:function(e){return"object"==typeof e?null!==e:ze(e)},Xe=function(e,t){return arguments.length<2?(A=ve[e],ze(A)?A:void 0):ve[e]&&ve[e][t];var A},$e=Ne({}.isPrototypeOf),et="undefined"!=typeof navigator&&String(navigator.userAgent)||"",tt=ve.process,At=ve.Deno,it=tt&&tt.versions||At&&At.version,ot=it&&it.v8;ot&&(Qe=(pe=ot.split("."))[0]>0&&pe[0]<4?1:+(pe[0]+pe[1])),!Qe&&et&&(!(pe=et.match(/Edge\/(\d+)/))||pe[1]>=74)&&(pe=et.match(/Chrome\/(\d+)/))&&(Qe=+pe[1]);var rt=Qe,nt=ve.String,st=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol("symbol detection");return!nt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),at=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ct=Object,gt=at?function(e){return"symbol"==typeof e}:function(e){var t=Xe("Symbol");return ze(t)&&$e(t.prototype,ct(e))},ut=String,lt=TypeError,dt=function(e){if(ze(e))return e;throw lt(function(e){try{return ut(e)}catch(t){return"Object"}}(e)+" is not a function")},ht=function(e,t){var A=e[t];return He(A)?void 0:dt(A)},Ct=TypeError,It=Object.defineProperty,Bt=function(e,t){try{It(ve,e,{value:t,configurable:!0,writable:!0})}catch(A){ve[e]=t}return t},Et="__core-js_shared__",pt=ve[Et]||Bt(Et,{}),Qt=h((function(e){(e.exports=function(e,t){return pt[e]||(pt[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"})})),ft=Object,vt=function(e){return ft(Oe(e))},yt=Ne({}.hasOwnProperty),Tt=Object.hasOwn||function(e,t){return yt(vt(e),t)},mt=0,Rt=Math.random(),wt=Ne(1..toString),St=function(e){return"Symbol("+(void 0===e?"":e)+")_"+wt(++mt+Rt,36)},bt=ve.Symbol,Dt=Qt("wks"),Mt=at?bt.for||bt:bt&&bt.withoutSetter||St,_t=function(e){return Tt(Dt,e)||(Dt[e]=st&&Tt(bt,e)?bt[e]:Mt("Symbol."+e)),Dt[e]},Lt=TypeError,kt=_t("toPrimitive"),Nt=function(e,t){if(!qe(e)||gt(e))return e;var A,i=ht(e,kt);if(i){if(void 0===t&&(t="default"),A=we(i,e,t),!qe(A)||gt(A))return A;throw Lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var A,i;if("string"===t&&ze(A=e.toString)&&!qe(i=we(A,e)))return i;if(ze(A=e.valueOf)&&!qe(i=we(A,e)))return i;if("string"!==t&&ze(A=e.toString)&&!qe(i=we(A,e)))return i;throw Ct("Can't convert object to primitive value")}(e,t)},Pt=function(e){var t=Nt(e,"string");return gt(t)?t:t+""},Ft=ve.document,Gt=qe(Ft)&&qe(Ft.createElement),Vt=function(e){return Gt?Ft.createElement(e):{}},xt=!Te&&!ye((function(){return 7!==Object.defineProperty(Vt("div"),"a",{get:function(){return 7}}).a})),Yt=Object.getOwnPropertyDescriptor,Ht={f:Te?Yt:function(e,t){if(e=Je(e),t=Pt(t),xt)try{return Yt(e,t)}catch(A){}if(Tt(e,t))return Me(!we(De.f,e,t),e[t])}},Ut=Te&&ye((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ot=String,Jt=TypeError,Kt=function(e){if(qe(e))return e;throw Jt(Ot(e)+" is not an object")},jt=TypeError,Wt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Zt="enumerable",qt="configurable",Xt="writable",$t={f:Te?Ut?function(e,t,A){if(Kt(e),t=Pt(t),Kt(A),"function"==typeof e&&"prototype"===t&&"value"in A&&Xt in A&&!A[Xt]){var i=zt(e,t);i&&i[Xt]&&(e[t]=A.value,A={configurable:qt in A?A[qt]:i[qt],enumerable:Zt in A?A[Zt]:i[Zt],writable:!1})}return Wt(e,t,A)}:Wt:function(e,t,A){if(Kt(e),t=Pt(t),Kt(A),xt)try{return Wt(e,t,A)}catch(i){}if("get"in A||"set"in A)throw jt("Accessors not supported");return"value"in A&&(e[t]=A.value),e}},eA=Te?function(e,t,A){return $t.f(e,t,Me(1,A))}:function(e,t,A){return e[t]=A,e},tA=Function.prototype,AA=Te&&Object.getOwnPropertyDescriptor,iA=Tt(tA,"name"),oA={EXISTS:iA,PROPER:iA&&"something"===function(){}.name,CONFIGURABLE:iA&&(!Te||Te&&AA(tA,"name").configurable)},rA=Ne(Function.toString);ze(pt.inspectSource)||(pt.inspectSource=function(e){return rA(e)});var nA,sA,aA,cA=pt.inspectSource,gA=ve.WeakMap,uA=ze(gA)&&/native code/.test(String(gA)),lA=Qt("keys"),dA=function(e){return lA[e]||(lA[e]=St(e))},hA={},CA="Object already initialized",IA=ve.TypeError,BA=ve.WeakMap;if(uA||pt.state){var EA=pt.state||(pt.state=new BA);EA.get=EA.get,EA.has=EA.has,EA.set=EA.set,nA=function(e,t){if(EA.has(e))throw IA(CA);return t.facade=e,EA.set(e,t),t},sA=function(e){return EA.get(e)||{}},aA=function(e){return EA.has(e)}}else{var pA=dA("state");hA[pA]=!0,nA=function(e,t){if(Tt(e,pA))throw IA(CA);return t.facade=e,eA(e,pA,t),t},sA=function(e){return Tt(e,pA)?e[pA]:{}},aA=function(e){return Tt(e,pA)}}var QA={set:nA,get:sA,has:aA,enforce:function(e){return aA(e)?sA(e):nA(e,{})},getterFor:function(e){return function(t){var A;if(!qe(t)||(A=sA(t)).type!==e)throw IA("Incompatible receiver, "+e+" required");return A}}},fA=h((function(e){var t=oA.CONFIGURABLE,A=QA.enforce,i=QA.get,o=String,r=Object.defineProperty,n=Ne("".slice),s=Ne("".replace),a=Ne([].join),c=Te&&!ye((function(){return 8!==r((function(){}),"length",{value:8}).length})),g=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),(!Tt(e,"name")||t&&e.name!==i)&&(Te?r(e,"name",{value:i,configurable:!0}):e.name=i),c&&u&&Tt(u,"arity")&&e.length!==u.arity&&r(e,"length",{value:u.arity});try{u&&Tt(u,"constructor")&&u.constructor?Te&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(d){}var l=A(e);return Tt(l,"source")||(l.source=a(g,"string"==typeof i?i:"")),e};Function.prototype.toString=u((function(){return ze(this)&&i(this).source||cA(this)}),"toString")})),vA=function(e,t,A,i){i||(i={});var o=i.enumerable,r=void 0!==i.name?i.name:t;if(ze(A)&&fA(A,r,i),i.global)o?e[t]=A:Bt(t,A);else{try{i.unsafe?e[t]&&(o=!0):delete e[t]}catch(n){}o?e[t]=A:$t.f(e,t,{value:A,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},yA=Math.ceil,TA=Math.floor,mA=Math.trunc||function(e){var t=+e;return(t>0?TA:yA)(t)},RA=function(e){var t=+e;return t!=t||0===t?0:mA(t)},wA=Math.max,SA=Math.min,bA=Math.min,DA=function(e){return e>0?bA(RA(e),9007199254740991):0},MA=function(e){return DA(e.length)},_A=function(e){return function(t,A,i){var o,r=Je(t),n=MA(r),s=function(e,t){var A=RA(e);return A<0?wA(A+t,0):SA(A,t)}(i,n);if(e&&A!=A){for(;n>s;)if((o=r[s++])!=o)return!0}else for(;n>s;s++)if((e||s in r)&&r[s]===A)return e||s||0;return!e&&-1}},LA={includes:_A(!0),indexOf:_A(!1)}.indexOf,kA=Ne([].push),NA=function(e,t){var A,i=Je(e),o=0,r=[];for(A in i)!Tt(hA,A)&&Tt(i,A)&&kA(r,A);for(;t.length>o;)Tt(i,A=t[o++])&&(~LA(r,A)||kA(r,A));return r},PA=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FA=PA.concat("length","prototype"),GA={f:Object.getOwnPropertyNames||function(e){return NA(e,FA)}},VA={f:Object.getOwnPropertySymbols},xA=Ne([].concat),YA=Xe("Reflect","ownKeys")||function(e){var t=GA.f(Kt(e)),A=VA.f;return A?xA(t,A(e)):t},HA=function(e,t,A){for(var i=YA(t),o=$t.f,r=Ht.f,n=0;n<i.length;n++){var s=i[n];Tt(e,s)||A&&Tt(A,s)||o(e,s,r(t,s))}},UA=/#|\.prototype\./,OA=function(e,t){var A=KA[JA(e)];return A===WA||A!==jA&&(ze(t)?ye(t):!!t)},JA=OA.normalize=function(e){return String(e).replace(UA,".").toLowerCase()},KA=OA.data={},jA=OA.NATIVE="N",WA=OA.POLYFILL="P",zA=OA,ZA=Ht.f,qA=function(e,t){var A,i,o,r,n,s=e.target,a=e.global,c=e.stat;if(A=a?ve:c?ve[s]||Bt(s,{}):(ve[s]||{}).prototype)for(i in t){if(r=t[i],o=e.dontCallGetSet?(n=ZA(A,i))&&n.value:A[i],!zA(a?i:s+(c?".":"#")+i,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;HA(r,o)}(e.sham||o&&o.sham)&&eA(r,"sham",!0),vA(A,i,r,e)}},XA={};XA[_t("toStringTag")]="z";var $A,ei="[object z]"===String(XA),ti=_t("toStringTag"),Ai=Object,ii="Arguments"===Ge(function(){return arguments}()),oi=ei?Ge:function(e){var t,A,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(A=function(e,t){try{return e[t]}catch(A){}}(t=Ai(e),ti))?A:ii?Ge(t):"Object"===(i=Ge(t))&&ze(t.callee)?"Arguments":i},ri=String,ni=function(e){if("Symbol"===oi(e))throw TypeError("Cannot convert a Symbol value to a string");return ri(e)},si=function(){var e=Kt(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},ai=ve.RegExp,ci=ye((function(){var e=ai("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),gi=ci||ye((function(){return!ai("a","y").sticky})),ui={BROKEN_CARET:ci||ye((function(){var e=ai("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:gi,UNSUPPORTED_Y:ci},li=Object.keys||function(e){return NA(e,PA)},di=Te&&!Ut?Object.defineProperties:function(e,t){Kt(e);for(var A,i=Je(t),o=li(t),r=o.length,n=0;r>n;)$t.f(e,A=o[n++],i[A]);return e},hi={f:di},Ci=Xe("document","documentElement"),Ii="prototype",Bi="script",Ei=dA("IE_PROTO"),pi=function(){},Qi=function(e){return"<"+Bi+">"+e+"</"+Bi+">"},fi=function(e){e.write(Qi("")),e.close();var t=e.parentWindow.Object;return e=null,t},vi=function(){try{$A=new ActiveXObject("htmlfile")}catch(o){}var e,t,A;vi="undefined"!=typeof document?document.domain&&$A?fi($A):(t=Vt("iframe"),A="java"+Bi+":",t.style.display="none",Ci.appendChild(t),t.src=String(A),(e=t.contentWindow.document).open(),e.write(Qi("document.F=Object")),e.close(),e.F):fi($A);for(var i=PA.length;i--;)delete vi[Ii][PA[i]];return vi()};hA[Ei]=!0;var yi,Ti,mi=Object.create||function(e,t){var A;return null!==e?(pi[Ii]=Kt(e),A=new pi,pi[Ii]=null,A[Ei]=e):A=vi(),void 0===t?A:hi.f(A,t)},Ri=ve.RegExp,wi=ye((function(){var e=Ri(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Si=ve.RegExp,bi=ye((function(){var e=Si("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Di=QA.get,Mi=Qt("native-string-replace",String.prototype.replace),_i=RegExp.prototype.exec,Li=_i,ki=Ne("".charAt),Ni=Ne("".indexOf),Pi=Ne("".replace),Fi=Ne("".slice),Gi=(Ti=/b*/g,we(_i,yi=/a/,"a"),we(_i,Ti,"a"),0!==yi.lastIndex||0!==Ti.lastIndex),Vi=ui.BROKEN_CARET,xi=void 0!==/()??/.exec("")[1];(Gi||xi||Vi||wi||bi)&&(Li=function(e){var t,A,i,o,r,n,s,a=this,c=Di(a),g=ni(e),u=c.raw;if(u)return u.lastIndex=a.lastIndex,t=we(Li,u,g),a.lastIndex=u.lastIndex,t;var l=c.groups,d=Vi&&a.sticky,h=we(si,a),C=a.source,I=0,B=g;if(d&&(h=Pi(h,"y",""),-1===Ni(h,"g")&&(h+="g"),B=Fi(g,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==ki(g,a.lastIndex-1))&&(C="(?: "+C+")",B=" "+B,I++),A=new RegExp("^(?:"+C+")",h)),xi&&(A=new RegExp("^"+C+"$(?!\\s)",h)),Gi&&(i=a.lastIndex),o=we(_i,d?A:a,B),d?o?(o.input=Fi(o.input,I),o[0]=Fi(o[0],I),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Gi&&o&&(a.lastIndex=a.global?o.index+o[0].length:i),xi&&o&&o.length>1&&we(Mi,o[0],A,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(o[r]=void 0)})),o&&l)for(o.groups=n=mi(null),r=0;r<l.length;r++)n[(s=l[r])[0]]=o[s[1]];return o});var Yi=Li;qA({target:"RegExp",proto:!0,forced:/./.exec!==Yi},{exec:Yi});var Hi="\t\n\v\f\r                 \u2028\u2029\ufeff",Ui=Ne("".replace),Oi=RegExp("^["+Hi+"]+"),Ji=RegExp("(^|[^"+Hi+"])["+Hi+"]+$"),Ki=function(e){return function(t){var A=ni(Oe(t));return 1&e&&(A=Ui(A,Oi,"")),2&e&&(A=Ui(A,Ji,"$1")),A}},ji={start:Ki(1),end:Ki(2),trim:Ki(3)}.trim,Wi=Ne("".charAt),zi=ve.parseFloat,Zi=ve.Symbol,qi=Zi&&Zi.iterator,Xi=1/zi(Hi+"-0")!=-Infinity||qi&&!ye((function(){zi(Object(qi))}))?function(e){var t=ji(ni(e)),A=zi(t);return 0===A&&"-"===Wi(t,0)?-0:A}:zi;qA({global:!0,forced:parseFloat!==Xi},{parseFloat:Xi});var $i=function(e){if("Function"===Ge(e))return Ne(e)},eo=_t("species"),to=RegExp.prototype,Ao=Ne("".charAt),io=Ne("".charCodeAt),oo=Ne("".slice),ro=function(e){return function(t,A){var i,o,r=ni(Oe(t)),n=RA(A),s=r.length;return n<0||n>=s?e?"":void 0:(i=io(r,n))<55296||i>56319||n+1===s||(o=io(r,n+1))<56320||o>57343?e?Ao(r,n):i:e?oo(r,n,n+2):o-56320+(i-55296<<10)+65536}},no={codeAt:ro(!1),charAt:ro(!0)}.charAt,so=function(e,t,A){return t+(A?no(e,t).length:1)},ao=TypeError,co=function(e,t){var A=e.exec;if(ze(A)){var i=we(A,e,t);return null!==i&&Kt(i),i}if("RegExp"===Ge(e))return we(Yi,e,t);throw ao("RegExp#exec called on incompatible receiver")};!function(e,t,A,i){var o=_t(e),r=!ye((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),n=r&&!ye((function(){var t=!1,A=/a/;return"split"===e&&((A={}).constructor={},A.constructor[eo]=function(){return A},A.flags="",A[o]=/./[o]),A.exec=function(){return t=!0,null},A[o](""),!t}));if(!r||!n||A){var s=$i(/./[o]),a=t(o,""[e],(function(e,t,A,i,o){var n=$i(e),a=t.exec;return a===Yi||a===to.exec?r&&!o?{done:!0,value:s(t,A,i)}:{done:!0,value:n(A,t,i)}:{done:!1}}));vA(String.prototype,e,a[0]),vA(to,o,a[1])}i&&eA(to[o],"sham",!0)}("match",(function(e,t,A){return[function(t){var A=Oe(this),i=He(t)?void 0:ht(t,e);return i?we(i,t,A):new RegExp(t)[e](ni(A))},function(e){var i=Kt(this),o=ni(e),r=A(t,i,o);if(r.done)return r.value;if(!i.global)return co(i,o);var n=i.unicode;i.lastIndex=0;for(var s,a=[],c=0;null!==(s=co(i,o));){var g=ni(s[0]);a[c]=g,""===g&&(i.lastIndex=so(o,DA(i.lastIndex),n)),c++}return 0===c?null:a}]}));var go=Array.isArray||function(e){return"Array"===Ge(e)},uo=TypeError,lo=function(e){if(e>9007199254740991)throw uo("Maximum allowed index exceeded");return e},ho=function(e,t,A){var i=Pt(t);i in e?$t.f(e,i,Me(0,A)):e[i]=A},Co=function(){},Io=[],Bo=Xe("Reflect","construct"),Eo=/^\s*(?:class|function)\b/,po=Ne(Eo.exec),Qo=!Eo.exec(Co),fo=function(e){if(!ze(e))return!1;try{return Bo(Co,Io,e),!0}catch(t){return!1}},vo=function(e){if(!ze(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qo||!!po(Eo,cA(e))}catch(t){return!0}};vo.sham=!0;var yo,To=!Bo||ye((function(){var e;return fo(fo.call)||!fo(Object)||!fo((function(){e=!0}))||e}))?vo:fo,mo=_t("species"),Ro=Array,wo=function(e,t){return new(function(e){var t;return go(e)&&(t=e.constructor,(To(t)&&(t===Ro||go(t.prototype))||qe(t)&&null===(t=t[mo]))&&(t=void 0)),void 0===t?Ro:t}(e))(0===t?0:t)},So=_t("species"),bo=_t("isConcatSpreadable"),Do=rt>=51||!ye((function(){var e=[];return e[bo]=!1,e.concat()[0]!==e})),Mo=function(e){if(!qe(e))return!1;var t=e[bo];return void 0!==t?!!t:go(e)};qA({target:"Array",proto:!0,arity:1,forced:!(Do&&(yo="concat",rt>=51||!ye((function(){var e=[];return(e.constructor={})[So]=function(){return{foo:1}},1!==e[yo](Boolean).foo}))))},{concat:function(e){var t,A,i,o,r,n=vt(this),s=wo(n,0),a=0;for(t=-1,i=arguments.length;t<i;t++)if(Mo(r=-1===t?n:arguments[t]))for(o=MA(r),lo(a+o),A=0;A<o;A++,a++)A in r&&ho(s,a,r[A]);else lo(a+1),ho(s,a++,r);return s.length=a,s}});var _o=window.navigator&&window.navigator.userAgent||"",Lo=/AppleWebKit\/([\d.]+)/i.exec(_o);Lo&&parseFloat(Lo.pop());var ko=/iPad/i.test(_o),No=/iPhone/i.test(_o)&&!ko,Po=/iPod/i.test(_o),Fo=No||ko||Po,Go=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(_o);Fo&&function(){var e=_o.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Vo=/Android/i.test(_o);Vo&&function(){var e=_o.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),A=e[2]&&parseFloat(e[2]);t&&A&&parseFloat("".concat(e[1],".").concat(e[2]))}();Vo&&/webkit/i.test(_o),/Firefox/i.test(_o)&&function(){var e=_o.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var xo=/Edge\//i.test(_o);xo&&function(){var e=_o.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var Yo=/Edg\//i.test(_o);Yo&&function(){var e=_o.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Ho=/SogouMobileBrowser\//i.test(_o);Ho&&function(){var e=_o.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Uo=/MetaSr\s/i.test(_o);Uo&&function(){var e=_o.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Oo=/TBS\/\d+/i.test(_o);Oo&&function(){var e=_o.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var Jo=/XWEB\/\d+/i.test(_o);Jo&&function(){var e=_o.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(_o),/MSIE\/\d+/i.test(_o)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(_o),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(_o)&&/rv:11.0/.test(_o)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(_o)&&function(){var e=_o.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Ko=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&/COVC\/\d+/i.test(_o),jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&!/COVC\/\d+/i.test(_o);(jo||Ko)&&function(){var e=_o.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Wo=!Oo&&/ QQBrowser\/\d+/i.test(_o);Wo&&function(){var e=_o.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var zo=!Oo&&/QQBrowserLite\/\d+/i.test(_o);zo&&function(){var e=_o.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var Zo=!Oo&&/MQBHD\/\d+/i.test(_o);Zo&&function(){var e=_o.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(_o),!Fo&&/MAC OS X/i.test(_o),!Vo&&/Linux/i.test(_o),/MicroMessenger/i.test(_o),/UCBrowser/i.test(_o),/Electron/i.test(_o);var qo=/MiuiBrowser/i.test(_o);qo&&function(){var e=_o.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Xo=/HuaweiBrowser/i.test(_o);/Huawei/i.test(_o),Xo&&function(){var e=_o.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var $o=/SamsungBrowser/i.test(_o);$o&&function(){var e=_o.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var er=/HeyTapBrowser/i.test(_o);er&&function(){var e=_o.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var tr=/VivoBrowser/i.test(_o);tr&&function(){var e=_o.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Ar,ir,or,rr=/Chrome/i.test(_o),nr=!xo&&!Uo&&!Ho&&!Oo&&!Jo&&!Yo&&!Wo&&!qo&&!Xo&&!$o&&!er&&!tr&&/Chrome/i.test(_o);nr&&function(){var e=_o.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),nr&&function(){var e=_o.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!rr&&!jo&&!Ko&&!zo&&!Zo&&/Safari/i.test(_o)&&function(){var e=_o.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"}(ir||(ir={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(or||(or={}));var sr,ar,cr=-3340,gr=-1301,ur=-1314,lr=-1315,dr=-1316,hr=-1302,Cr=-1317,Ir=-1318,Br=-1319,Er=-70252,pr={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},Qr={code:-1005,message:"not supported"},fr="2.10.8",vr=Object.create,yr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,wr=Object.getPrototypeOf,Sr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,Dr=(e,t,A)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,Mr=(e,t,A,i)=>{for(var o,r=i>1?void 0:i?Tr(t,A):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(i?o(t,A,r):o(r))||r);return i&&r&&yr(t,A,r),r},_r=(e,t,A)=>Dr(e,"symbol"!=typeof t?t+"":t,A),Lr=(sr={"../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"(e,t){var A=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function n(e,t,A,o,n){if("function"!=typeof A)throw new TypeError("The listener must be a function");var s=new r(A,o||e,n),a=i?i+t:t;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 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,t,o=[];if(0===this._eventsCount)return o;for(t in e=this._events)A.call(e,t)&&o.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=i?i+e:e,A=this._events[t];if(!A)return[];if(A.fn)return[A.fn];for(var o=0,r=A.length,n=new Array(r);o<r;o++)n[o]=A[o].fn;return n},a.prototype.listenerCount=function(e){var t=i?i+e:e,A=this._events[t];return A?A.fn?1:A.length:0},a.prototype.emit=function(e,t,A,o,r,n){var s=i?i+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,A),!0;case 4:return g.fn.call(g.context,t,A,o),!0;case 5:return g.fn.call(g.context,t,A,o,r),!0;case 6:return g.fn.call(g.context,t,A,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,A);break;case 4:g[c].fn.call(g[c].context,t,A,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},a.prototype.on=function(e,t,A){return n(this,e,t,A,!1)},a.prototype.once=function(e,t,A){return n(this,e,t,A,!0)},a.prototype.removeListener=function(e,t,A,o){var r=i?i+e:e;if(!this._events[r])return this;if(!t)return s(this,r),this;var n=this._events[r];if(n.fn)n.fn!==t||o&&!n.once||A&&n.context!==A||s(this,r);else{for(var a=0,c=[],g=n.length;a<g;a++)(n[a].fn!==t||o&&!n[a].once||A&&n[a].context!==A)&&c.push(n[a]);c.length?this._events[r]=1===c.length?c[0]:c:s(this,r)}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,void 0!==t&&(t.exports=a)}},function(){return ar||(0,sr[mr(sr)[0]])((ar={exports:{}}).exports,ar),ar.exports}),kr={name:"option",required:!0,properties:{view:{type:["string",HTMLElement],required:!0},url:{type:"string",required:!0},muted:{type:"boolean",required:!1},volume:{type:"number",required:!1},fillMode:{type:"string",required:!1,values:["contain","cover","fill"]},loggerConfig:{type:"object",required:!0,properties:{sdkAppId:{type:"number",required:!0},userId:{type:"string",required:!0}}}}},Nr=e=>{const t=e.split("\r\n"),A=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)}));const i=A.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),o=[];t.forEach((e=>{let t=e;if(e.includes("a=fmtp:111")&&(t=`${e};stereo=1`),e.includes("a=fmtp")){const A=/a=fmtp:(\d+)\s/.exec(e);A&&A.length>1&&i.includes(A[1])&&(t=`${e};sps-pps-idr-in-keyframe=1`)}o.push(t)}));return(e=>{if(!navigator.userAgent.includes("Firefox"))return e;const t=e.split("\r\n"),A=[],i=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)})),A.length>1&&i.push(...A.slice(1));const o=i.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),r=[];return t.forEach((e=>{let t=e;if(e.includes("a=setup")&&(t="a=setup:passive"),(e.includes("m=audio")||e.includes("m=video"))&&(t=e.split(" ").filter(((e,t)=>t<3||!o.includes(e))).join(" ")),e.includes("a=fmtp")||e.includes("a=rtcp-fb")||e.includes("a=rtpmap")){const t=/a=(?:fmtp|rtcp-fb|rtpmap):(\d+)\s/.exec(e);if(t&&t.length>1&&o.includes(t[1]))return}r.push(t)})),r.join("\r\n")})(o.join("\r\n"))},Pr=(e=21)=>{let t="",A=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&A[e]];return t},Fr=e=>"function"==typeof e;var Gr=function({retryFunction:e,settings:t,onError:A,onRetrying:i,onRetryFailed:o,onRetrySuccess:r,context:n}){return function(...s){const{retries:a=5,timeout:c=1e3}=t;let g=0,u=-1,l=0;const d=async(t,h)=>{const C=n||this;try{const A=await e.apply(C,s);g>0&&r&&r.call(this,g),g=0,t(A)}catch(e){const n=()=>{clearTimeout(u),g=0,l=2,h(e)},C=()=>{2!==l&&g<(Fr(a)?a():a)?(g++,l=1,Fr(i)&&i.call(this,g,n),u=window.setTimeout((()=>{u=-1,d(t,h)}),Fr(c)?c(g):c)):(n(),Fr(o)&&o.call(this,e))};Fr(A)?A.call(this,{error:e,retry:C,reject:h,retryFuncArgs:s,retriedCount:g}):C()}};return new Promise(d)}},Vr=new WeakMap;var xr=((e,t,A)=>(A=null!=e?vr(wr(e)):{},((e,t,A,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of mr(t))Sr.call(e,o)||o===A||yr(e,o,{get:()=>t[o],enumerable:!(i=Tr(t,o))||i.enumerable});return e})(!t&&e&&e.__esModule?A:yr(A,"default",{value:e,enumerable:!0}),e)))(Lr(),1),Yr=Symbol("instance"),Hr=Symbol("cacheResult"),Ur=class{constructor(e,t,A){this.oldState=e,this.newState=t,this.action=A,this.aborted=!1}abort(e){this.aborted=!0,Wr.call(e,this.oldState,new Error(`action '${this.action}' aborted`))}toString(){return`${this.action}ing`}},Or=class extends Error{constructor(e,t,A){super(t),this.state=e,this.message=t,this.cause=A}};var Jr=new Map;function Kr(e,t,A={}){return(i,o,r)=>{const n=A.action||o;if(!A.context){const A=Jr.get(i)||[];Jr.has(i)||Jr.set(i,A),A.push({from:e,to:t,action:n})}const s=r.value;r.value=function(...i){let o=this;if(A.context&&(o=zr.get("function"==typeof A.context?A.context.call(this,...i):A.context)),o.state===t)return A.sync?o[Hr]:Promise.resolve(o[Hr]);o.state instanceof Ur&&o.state.action==A.abortAction&&o.state.abort(o);let r=null;Array.isArray(e)?0==e.length?o.state instanceof Ur&&o.state.abort(o):"string"==typeof o.state&&e.includes(o.state)||(r=new Or(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e.join("|")}`)):e!==o.state&&(r=new Or(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e}`));const a=e=>{if(A.fail&&A.fail.call(this,e),A.sync){if(A.ignoreError)return e;throw e}return A.ignoreError?Promise.resolve(e):Promise.reject(e)};if(r)return a(r);const c=o.state,g=new Ur(c,t,n);Wr.call(o,g);const u=e=>{var i;return o[Hr]=e,g.aborted||(Wr.call(o,t),null===(i=A.success)||void 0===i||i.call(this,o[Hr])),e},l=e=>(Wr.call(o,c,e),a(e));try{const e=s.apply(this,i);return function(e){return"object"==typeof e&&e&&"then"in e}(e)?e.then(u).catch(l):A.sync?u(e):Promise.resolve(u(e))}catch(A){return l(new Or(o._state,`${o.name} ${n} from ${e} to ${t} failed: ${A}`,A instanceof Error?A:new Error(String(A))))}}}}var jr=(()=>{const e="undefined"!=typeof window&&window.__AFSM__,t="undefined"!=typeof importScripts;return e?(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))}:t?(e,t)=>{postMessage({type:e,payload:t})}:()=>{}})();function Wr(e,t){const A=this._state;this._state=e;const i=e.toString();e&&this.emit(i,A),this.emit(zr.STATECHANGED,e,A,t),this.updateDevTools({value:e,old:A,err:t instanceof Error?t.message:String(t)})}var zr=class e extends xr.default{constructor(t,A,i){super(),this.name=t,this.groupName=A,this._state=e.INIT,t||(t=Date.now().toString(36)),i?Object.setPrototypeOf(this,i):i=Object.getPrototypeOf(this),A||(this.groupName=this.constructor.name);const o=i[Yr];o?this.name=o.name+"-"+o.count++:i[Yr]={name:this.name,count:0},this.updateDevTools({diagram:this.stateDiagram})}get stateDiagram(){const e=Object.getPrototypeOf(this),t=Jr.get(e)||[];let A=new Set,i=[],o=[];const r=new Set,n=Object.getPrototypeOf(e);Jr.has(n)&&(n.stateDiagram.forEach((e=>A.add(e))),n.allStates.forEach((e=>r.add(e)))),t.forEach((({from:e,to:t,action:A})=>{"string"==typeof e?i.push({from:e,to:t,action:A}):e.length?e.forEach((e=>{i.push({from:e,to:t,action:A})})):o.push({to:t,action:A})})),i.forEach((({from:e,to:t,action:i})=>{r.add(e),r.add(t),r.add(i+"ing"),A.add(`${e} --\x3e ${i}ing : ${i}`),A.add(`${i}ing --\x3e ${t} : ${i} 🟢`),A.add(`${i}ing --\x3e ${e} : ${i} 🔴`)})),o.forEach((({to:e,action:t})=>{A.add(`${t}ing --\x3e ${e} : ${t} 🟢`),r.forEach((i=>{i!==e&&A.add(`${i} --\x3e ${t}ing : ${t}`)}))}));const s=[...A];return Object.defineProperties(e,{stateDiagram:{value:s},allStates:{value:r}}),s}static get(t){let A;return"string"==typeof t?(A=e.instances.get(t),A||e.instances.set(t,A=new e(t,void 0,Object.create(e.prototype)))):(A=e.instances2.get(t),A||e.instances2.set(t,A=new e(t.constructor.name,void 0,Object.create(e.prototype)))),A}static getState(t){var A;return null===(A=e.get(t))||void 0===A?void 0:A.state}updateDevTools(t={}){jr(e.UPDATEAFSM,Object.assign({name:this.name,group:this.groupName},t))}get state(){return this._state}set state(e){Wr.call(this,e)}};zr.STATECHANGED="stateChanged",zr.UPDATEAFSM="updateAFSM",zr.INIT="[*]",zr.ON="on",zr.OFF="off",zr.instances=new Map,zr.instances2=new WeakMap;var Zr=class extends zr{constructor(e,t){super(),this.core=e,_r(this,"audioPlayer"),_r(this,"videoPlayer"),_r(this,"callback"),_r(this,"_log"),_r(this,"lastPausedReason"),_r(this,"muted",!1),this._log=t,this.videoPlayer=new e.VideoPlayer({id:"vp",log:this._log.createChild({id:"vp"}),track:null,muted:!1,container:null,enableLogTrackState:!0}),this.audioPlayer=new e.RemoteAudioPlayer({id:"ap",log:this._log.createChild({id:"ap"}),track:null,muted:!1,container:null,enableVolumeControlInIOS:!0,enableLogTrackState:!0}),this.videoPlayer.on("loadstart",(()=>this.handleLoadStart("video"))),this.audioPlayer.on("loadstart",(()=>this.handleLoadStart("audio"))),this.videoPlayer.on("player-state-changed",this.handlePlayerStateChanged,this),this.audioPlayer.on("player-state-changed",this.handlePlayerStateChanged,this)}get isPlaying(){return this.videoPlayer.isPlaying&&this.audioPlayer.isPlaying}get isPaused(){return this.videoPlayer.isPaused&&this.audioPlayer.isPaused}get isStopped(){return this.videoPlayer.isStopped&&this.audioPlayer.isStopped}setCallback(e){this.callback=e}handleLoadStart(e){this.onLoadStart()}handlePlayerStateChanged(e){"PLAYING"===e.state&&this.isPlaying&&this.onPlaying(),"PAUSED"===e.state&&this.isPaused&&this.onPaused(e.reason),"STOPPED"===e.state&&this.isStopped&&this.onStopped()}onLoadStart(){}onPlaying(){}onPaused(e){this.lastPausedReason=e}onStopped(){}setVideoContainer(e){if(this.core.utils.isString(e)){const t=document.getElementById(e);t&&this.videoPlayer.setContainer(t)}else this.videoPlayer.setContainer(e)}setVolume(e){this.core.utils.isUndefined(e)||this.audioPlayer.setVolume(e/100)}setMuted(e){this.core.utils.isUndefined(e)||(this.muted=e,this.audioPlayer.setMuted(e))}setFillMode(e){e&&this.videoPlayer.setObjectFit(e)}setAudioTrack(e){this.audioPlayer.setTrack(e)}setVideoTrack(e){this.videoPlayer.setTrack(e)}async play(){const e=this.videoPlayer.play().catch((e=>{var t,A;this.handleAutoPlayFailed(this.videoPlayer,e),null==(A=null==(t=this.callback)?void 0:t.onAutoPlayFailed)||A.call(t,{type:"video",resume:()=>this.videoPlayer.resume()})})),t=this.audioPlayer.play().catch((e=>{var t,A;this.handleAutoPlayFailed(this.audioPlayer,e),null==(A=null==(t=this.callback)?void 0:t.onAutoPlayFailed)||A.call(t,{type:"audio",resume:()=>this.audioPlayer.resume()})}));await Promise.all([e,t])}handleAutoPlayFailed(e,t){this._log.warn("handleAutoPlayFailed",t);const A=()=>{this.audioPlayer.resume().then((()=>{document.removeEventListener("click",A,!0)}))};document.addEventListener("click",A,!0)}pause(){this.videoPlayer.pause(!1),this.audioPlayer.setMuted(!0),this.audioPlayer.pause()}resume(){this.videoPlayer.resume(!0),this.audioPlayer.setMuted(this.muted),this.audioPlayer.resume()}async enterFullscreen(){await this.videoPlayer.enterFullscreen()}async exitFullscreen(){await this.videoPlayer.exitFullscreen()}async enterPictureInPicture(){await this.videoPlayer.enterPictureInPicture()}async exitPictureInPicture(){await this.videoPlayer.exitPictureInPicture()}stop(){this.videoPlayer&&this.videoPlayer.stop(),this.audioPlayer&&this.audioPlayer.stop()}};Mr([Kr([zr.INIT,"PAUSED"],"LOADSTART",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onLoadStart)||t.call(e)},fail(e){this._log.warn("onLoadStart",e)}})],Zr.prototype,"onLoadStart",1),Mr([Kr(["LOADSTART","PAUSED"],"PLAYING",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPlaying)||t.call(e)},fail(e){this._log.warn("onPlaying",e)}})],Zr.prototype,"onPlaying",1),Mr([Kr("PLAYING","PAUSED",{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPaused)||t.call(e,{reason:this.lastPausedReason})},fail(e){this._log.warn("onPaused",e)}})],Zr.prototype,"onPaused",1),Mr([Kr([],zr.INIT,{ignoreError:!0,sync:!0,success(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onStopped)||t.call(e)},fail(e){this._log.warn("onStopped",e)}})],Zr.prototype,"onStopped",1);var qr=Zr,Xr=["overseas-webrtc.tlivewebrtc.com","oswebrtc-lint.tliveplay.com"],$r=class e{constructor(e){this.core=e,_r(this,"connectedRoomIdSet",new Set),_r(this,"updateSeq",0),_r(this,"_log"),_r(this,"player"),_r(this,"peerConnection"),_r(this,"svrSig"),_r(this,"streamURL"),_r(this,"signalURL"),_r(this,"insertableStreamsAbortMap",new Map),_r(this,"scriptTransformWorker"),_r(this,"connectionState","disconnected"),_r(this,"isStarted",!1),_r(this,"isStopped",!0),_r(this,"isReconnecting",!1),_r(this,"callback"),_r(this,"isFireWallErrorEmitted",!1),_r(this,"stat"),_r(this,"isH264DecodeSupported"),_r(this,"connectionTimeoutId"),e.loggerManager.startUpload(),this._log=this.core.log.createChild({id:`${this.getAlias()}`}),this.player=new qr(e,this._log),e.innerEmitter.on(e.INNER_EVENT.SEI_MESSAGE,this.onSEIMessage,this)}getName(){return e.Name}getAlias(){return"LEB"}getGroup(){return""}getValidateRule(e){switch(e){case"start":return kr;case"update":case"stop":return{}}}get enableSEI(){return this.core.room.enableSEI&&(this.core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED||this.core.rtcDectection.IS_SCRIPT_TRANSFORM_SUPPORTED)}async start(e){var t;this.isStopped=!1;const{view:A,url:i,volume:o,muted:r,fillMode:n,loggerConfig:s,callback:a}=e;this.callback=a,this.player.setCallback(a);const{errorModule:{RtcError:c,ErrorCode:g,ErrorCodeDictionary:u},loggerManager:l,rtcDectection:d}=this.core;if(this._log.setSdkAppId(s.sdkAppId),this._log.setUserId(s.userId),l.addJoinedUser(s),!d.isWebRTCSupported()||!d.isAddTransceiverSupported())throw new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_WEBRTC,message:"webrtc not supported"});if(!(await d.decodeSupportStatus()).isH264DecodeSupported||!1===this.isH264DecodeSupported)throw this.isH264DecodeSupported=!1,new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_H264_DECODE,message:"h264 not supported"});!d.IS_SEI_SUPPORTED&&(null==a?void 0:a.onSEIMessage)&&(null==(t=a.onError)||t.call(a,new c({code:g.ENV_NOT_SUPPORTED,extraCode:u.NOT_SUPPORTED_SEI,message:"sei not supported"}))),this.player.setVideoContainer(A),this.player.setMuted(r),this.player.setVolume(o),this.player.setFillMode(n),await this.connect(i),this.stat=new class{constructor(e,t){this.core=t,_r(this,"peerConnection"),_r(this,"audioTransceiver",null),_r(this,"videoTransceiver",null),_r(this,"timerId",null),_r(this,"callback",null),_r(this,"previousRawStats",null),_r(this,"_prevReportTime",0),_r(this,"_prevDecoderImplementation",""),_r(this,"_decodeMap",new Map),this.peerConnection=e,this.findTransceivers()}get statInterval(){return 0===this._prevReportTime?2:(Date.now()-this._prevReportTime)/1e3}findTransceivers(){const e=this.peerConnection.getTransceivers();for(const t of e)if(t.receiver&&t.receiver.track){const{track:e}=t.receiver;"audio"===e.kind?this.audioTransceiver=t:"video"===e.kind&&(this.videoTransceiver=t)}}start(e,t=2e3){this.stop(),this.callback=e,this.collectStats(),this.timerId=window.setInterval((()=>{this.collectStats()}),t)}stop(){null!==this.timerId&&(clearInterval(this.timerId),this.timerId=null),this.callback=null,this.previousRawStats=null,this._prevReportTime=0}async collectStats(){if(this.callback)try{const e=await this.peerConnection.getStats(),t=new Set(["inbound-rtp","track","candidate-pair","media-source","codec"]),A=[];e.forEach((e=>t.has(e.type)&&A.push(e)));const i=Date.now(),o=this.parseAudioStats(A),r=this.parseVideoStats(A),n=this.parseNetworkStats(A);this._prevReportTime=i,this.callback({audio:o,video:r,network:n})}catch(e){this.core.log.error("Failed to collect WebRTC stats:",e)}}getDifferenceValue(e,t){if(this.core.utils.isUndefined(e))return t;const A=(t||0)-e;return A<0?0:A}parseAudioStats(e){var t,A,i,o;const r={bitrate:0,volume:0,packetLossRate:0,jitterBufferDelay:0,bytesReceived:0,packetsReceived:0,packetsLost:0};for(const n of e){if("inbound-rtp"===n.type&&("audio"===n.mediaType||"audio"===n.kind)){if(r.bytesReceived=n.bytesReceived||0,r.packetsReceived=n.packetsReceived||0,r.packetsLost=n.packetsLost||0,this.previousRawStats&&this.previousRawStats.audio){const e=this.getDifferenceValue(this.previousRawStats.audio.bytesReceived,r.bytesReceived);r.bitrate=Math.round(8*e/this.statInterval/1e3)}const e=this.getDifferenceValue(null==(t=this.previousRawStats)?void 0:t.audio.packetsLost,r.packetsLost),o=this.getDifferenceValue(null==(A=this.previousRawStats)?void 0:A.audio.packetsReceived,r.packetsReceived)+e;if(o>0&&(r.packetLossRate=Math.round(e/o*100)),this.core.utils.isUndefined(n.audioLevel)||(r.volume=n.audioLevel||0),n.jitterBufferDelay&&n.jitterBufferEmittedCount){let{jitterBufferEmittedCount:e}=n,{jitterBufferDelay:t}=n;(null==(i=this.previousRawStats)?void 0:i.audio)&&(e=this.getDifferenceValue(this.previousRawStats.audio.jitterBufferEmittedCount,n.jitterBufferEmittedCount),t=this.getDifferenceValue(this.previousRawStats.audio.jitterBufferDelay,n.jitterBufferDelay)),e>0&&(r.jitterBufferDelay=Math.floor(t/e*1e3)),this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.audio.jitterBufferDelay=n.jitterBufferDelay,this.previousRawStats.audio.jitterBufferEmittedCount=n.jitterBufferEmittedCount}this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.audio.bytesReceived=r.bytesReceived,this.previousRawStats.audio.packetsReceived=r.packetsReceived,this.previousRawStats.audio.packetsLost=r.packetsLost}!this.core.utils.isUndefined(n.audioLevel)&&(null==(o=this.audioTransceiver)?void 0:o.receiver.track)&&n.trackIdentifier===this.audioTransceiver.receiver.track.id&&(r.volume=n.audioLevel||0)}return r}parseVideoStats(e){var t,A,i,o,r;const n={bitrate:0,frameRate:0,width:0,height:0,packetLossRate:0,jitterBufferDelay:0,bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0};for(const s of e){if("codec"===s.type&&this._decodeMap.set(s.id,s),"inbound-rtp"===s.type&&("video"===s.mediaType||"video"===s.kind)){if(n.bytesReceived=s.bytesReceived||0,n.packetsReceived=s.packetsReceived||0,n.packetsLost=s.packetsLost||0,n.framesDecoded=s.framesDecoded||0,this.core.utils.isUndefined(s.framesPerSecond)||(n.frameRate=Math.round(s.framesPerSecond)),s.decoderImplementation&&this._prevDecoderImplementation!==s.decoderImplementation){const e=this._decodeMap.get(s.codecId),A=(null==(t=null==e?void 0:e.mimeType)?void 0:t.split("/")[1])||"unknown",i=s.powerEfficientDecoder;this.core.log.info(`decoderImplementation change to ${s.decoderImplementation}(${A}) HWDecoder: ${i}`),this._prevDecoderImplementation=s.decoderImplementation}if(this.previousRawStats&&this.previousRawStats.video){const e=this.getDifferenceValue(this.previousRawStats.video.bytesReceived,n.bytesReceived);n.bitrate=Math.round(8*e/this.statInterval/1e3)}const e=this.getDifferenceValue(null==(A=this.previousRawStats)?void 0:A.video.packetsLost,n.packetsLost),r=this.getDifferenceValue(null==(i=this.previousRawStats)?void 0:i.video.packetsReceived,n.packetsReceived)+e;if(r>0&&(n.packetLossRate=Math.round(e/r*100)),s.jitterBufferDelay&&s.jitterBufferEmittedCount){let{jitterBufferEmittedCount:e}=s,{jitterBufferDelay:t}=s;(null==(o=this.previousRawStats)?void 0:o.video)&&(e=this.getDifferenceValue(this.previousRawStats.video.jitterBufferEmittedCount,s.jitterBufferEmittedCount),t=this.getDifferenceValue(this.previousRawStats.video.jitterBufferDelay,s.jitterBufferDelay)),e>0&&(n.jitterBufferDelay=Math.floor(t/e*1e3)),this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.video.jitterBufferDelay=s.jitterBufferDelay,this.previousRawStats.video.jitterBufferEmittedCount=s.jitterBufferEmittedCount}this.previousRawStats||this.initPreviousRawStats(),this.previousRawStats.video.bytesReceived=n.bytesReceived,this.previousRawStats.video.packetsReceived=n.packetsReceived,this.previousRawStats.video.packetsLost=n.packetsLost}!this.core.utils.isUndefined(s.frameWidth)&&(null==(r=this.videoTransceiver)?void 0:r.receiver.track)&&s.trackIdentifier===this.videoTransceiver.receiver.track.id&&(n.width=s.frameWidth,n.height=s.frameHeight)}return n}parseNetworkStats(e){const t={rtt:0};for(const A of e)if("candidate-pair"===A.type&&(A.selected||"succeeded"===A.state)&&this.core.utils.isNumber(A.currentRoundTripTime)){t.rtt=Math.floor(1e3*A.currentRoundTripTime);break}return t}initPreviousRawStats(){this.previousRawStats={timestamp:Date.now(),audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0}}}}(this.peerConnection,this.core),this.stat.start((e=>{var t,A;return null==(A=null==(t=this.callback)?void 0:t.onStats)?void 0:A.call(t,e)})),await this.player.play(),this.isStarted=!0}connect(e){return new Promise(((t,A)=>{try{this.initScriptTransformWorker();const i={encodedInsertableStreams:this.enableSEI,iceServers:[],sdpSemantics:"unified-plan",bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",tcpCandidatePolicy:"disable",IceTransportsType:"nohost"},o=new RTCPeerConnection(i);this.peerConnection=o,o.onconnectionstatechange=()=>{this.connectionState=o.connectionState,this._log.info("connectionState",o.connectionState),"failed"!==o.connectionState&&"closed"!==o.connectionState||(this.isStarted?this.reconnect(e):A(new Error(`connection is ${o.connectionState}`))),"connected"===o.connectionState&&(this.logSelectedCandidate(),t())},o.ontrack=e=>this.onTrack(e),o.addTransceiver("audio",{direction:"recvonly"}),o.addTransceiver("video",{direction:"recvonly"}),this._log.info("createOffer"),o.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0,voiceActivityDetection:!1}).then((e=>(e.sdp=Nr(e.sdp),this._log.info("setOffer"),o.setLocalDescription(e)))).then((()=>{const t={sessionId:Pr(),streamurl:e,clientinfo:this.core.environment.getOSString(),localsdp:o.localDescription};return this.exchangeSDP(e,t)})).then((e=>(this._log.info("setAnswer"),o.setRemoteDescription(e)))).catch(A)}catch(e){A(e)}this.connectionTimeoutId=setTimeout((()=>A(new Error("connection timeout"))),1e4)}))}async exchangeSDP(e,t){let A,i,o;try{this._log.info("exchangeSDP");const r=rn(e);if(!r)throw new Error("streamDomain is empty");const{signalDomain:n,cached:s}=await this.fetchSignalDomain(r);if(!n)throw new Error("signalDomain is empty");{this._log.info("try exchangeSDP signalDomain:",n,s);const e=await this.doExchangeSDP(`https://${n}`,t,3);A=e.url,i=e.remoteSdp,o=e.svrSig}}catch(e){this._log.warn("exchangeSDP failed, fallback",e);const r=await this.core.utils.promiseAny(Xr.map((e=>this.doExchangeSDP(`https://${e}`,t,3))));A=r.url,i=r.remoteSdp,o=r.svrSig}return this.streamURL=e,this.signalURL=A,this.svrSig=o,i}async reconnect(e){if(!this.isReconnecting){this.isReconnecting=!0;try{this._log.warn("start reconnect"),await this.connect(e),this._log.warn("reconnect success")}catch(e){this._log.error("reconnect error",e)}finally{this.isReconnecting=!1}}}async logSelectedCandidate(){if(!this.peerConnection)return;const e=await this.peerConnection.getStats();for(const[t,A]of e)if(this.core.rtcDectection.isSelectedCandidatePair(A)){const t=e.get(A.localCandidateId),i=e.get(A.remoteCandidateId);t&&this._log.info(`local candidate: ${t.candidateType} ${t.protocol}:${t.ip||t.address}:${t.port} ${t.networkType||""} ${t.relayProtocol?`relayProtocol:${t.relayProtocol} url: ${t.url}`:""}`),i&&this._log.info(`remote candidate: ${i.candidateType} ${i.protocol}:${i.ip||i.address}:${i.port}`);break}}async doExchangeSDP(e,t,A){const i=`${e}/webrtc/v1/pullstream`,o=await tn(i,t,{timeout:A}),{errcode:r,errmsg:n,remotesdp:s,svrsig:a}=o;if(0!==r){const e=new Error(`errCode:${r}, errMsg:${n}`);throw e.name="RequestSignalError",e}return{url:e,remoteSdp:s,svrSig:a}}createEncodedStreams(e){var t;if(this.enableSEI&&this.core.rtcDectection.IS_INSERTABLE_STREAM_SUPPORTED)try{if(this._log.warn("enableSEI",this.enableSEI),!this.insertableStreamsAbortMap.has(e)){const A=e.createEncodedStreams(),i=new AbortController,o={abortController:i,enqueue:t=>"audio"===e.track.kind?t:this.decodeVideoFrame(t)};A.readable.pipeThrough(new TransformStream({transform:(e,t)=>{const A=o.enqueue(e);A&&t.enqueue(A)}})).pipeTo(A.writable,i).catch((e=>{"destroy"!==e&&this._log.warn(e)})),null==(t=this.insertableStreamsAbortMap.get(e))||t.abort("destroy"),this.insertableStreamsAbortMap.set(e,i)}}catch(t){this._log.warn(`createEncodedStreams ${e.track.kind} failed`,t)}}initReceiverTransform(e,t){this.peerConnection&&this.enableSEI&&this.scriptTransformWorker&&!e.transform&&(e.transform=new RTCRtpScriptTransform(this.scriptTransformWorker,{isReceiver:!0,isAudio:t,userId:"",streamType:this.core.enums.RemoteStreamType.Main}))}initScriptTransformWorker(){const{room:e,rtcDectection:t,createScriptTransformWorker:A,trtc:i,TRTC:o}=this.core;!this.enableSEI||t.IS_INSERTABLE_STREAM_SUPPORTED||this.scriptTransformWorker||t.IS_SCRIPT_TRANSFORM_SUPPORTED&&(this._log.info("initScriptTransformWorker"),this.scriptTransformWorker=A({videoEncodePipeline:e.videoManager.encodePipeline,videoDecodePipeline:e.videoManager.decodePipeline,audioEncodePipeline:e.audioManager.encodePipeline,audioDecodePipeline:e.audioManager.decodePipeline}),this.scriptTransformWorker.onmessage=e=>{var t,A;"sei"===e.data.type&&(null==(A=null==(t=this.callback)?void 0:t.onSEIMessage)||A.call(t,{data:e.data.data,seiPayloadType:e.data.seiPayloadType}))},this.scriptTransformWorker.onerror=e=>{this._log.error("scriptTransformWorker error: ",e.message)})}decodeVideoFrame(e){if(!this.core.room.videoManager)return e;for(const t of this.core.room.videoManager.decodePipeline)if(t&&!(e=t({frame:e})))return;return e}async fetchStopStream(){if(this.streamURL&&this.svrSig&&this.signalURL)try{const e=`${this.signalURL}/webrtc/v1/stopstream`,t=await tn(e,{streamurl:this.streamURL,svrsig:this.svrSig},{timeout:3}),{errcode:A,errmsg:i}=t;if(0!==A)throw new Error(`errCode:${A}, errmsg:${i}`);return t}catch(e){this._log.error("fetchStopStream error",e)}}onTrack(e){const{track:t}=e;this.createEncodedStreams(e.receiver),this.initReceiverTransform(e.receiver,"audio"===t.kind),"audio"===t.kind?this.player.setAudioTrack(t):this.player.setVideoTrack(t)}async update(e){const{volume:t,muted:A,fillMode:i,action:o,fullScreen:r,pictureInPicture:n}=e;this.player.setMuted(A),this.player.setVolume(t),this.player.setFillMode(i),"pause"===o?this.player.pause():"resume"===o&&this.player.resume(),this.core.utils.isBoolean(r)&&(r?await this.player.enterFullscreen():await this.player.exitFullscreen()),this.core.utils.isBoolean(n)&&(n?await this.player.enterPictureInPicture():await this.player.exitPictureInPicture())}async stop(){this.isStopped=!0,this.player.stop(),this.peerConnection&&(clearTimeout(this.connectionTimeoutId),this.peerConnection.close(),this.peerConnection.getReceivers().forEach((e=>this.insertableStreamsAbortMap.delete(e))),delete this.peerConnection,await this.fetchStopStream(),delete this.streamURL,delete this.signalURL,delete this.svrSig),this.stat&&(this.stat.stop(),delete this.stat)}destroy(){this.stop(),this.core.innerEmitter.off(this.core.INNER_EVENT.SEI_MESSAGE,this.onSEIMessage,this)}onSEIMessage({room:e,nalu:t}){var A,i;e===this.core.room&&(null==(i=null==(A=this.callback)?void 0:A.onSEIMessage)||i.call(A,{data:t.seiPayload.buffer,seiPayloadType:t.seiPayloadType}))}async fetchSignalDomain(e,t=An[0]){const A=`https://${t}/signal_query`;try{const t=window.localStorage.getItem(on);if(t){const A=JSON.parse(t);if(A[e].expire-(new Date).getTime()>0)return{signalDomain:A[e].signal,cached:!0}}const i=await tn(A,{domain:e,requestid:Pr(16),client_type:"Web",client_info:window.navigator.userAgent}),{errcode:o,data:r}=i;if(0===o){const{signal_domain:t,cache_time:A}=r;let i={};const o=window.localStorage.getItem(on);o&&(i=JSON.parse(o)),i[e]={signal:t,expire:(new Date).getTime()+1e3*A};try{window.localStorage.setItem(on,JSON.stringify(i))}catch(e){}return{signalDomain:t,cached:!1}}throw new Error(`errCode:${o}`)}catch(A){return this._log.error("fetchSignalDomain error",A),An[1]&&t!==An[1]?this.fetchSignalDomain(e,An[1]):{signalDomain:"",cached:!1}}}};_r($r,"Name","LEBPlayer"),Mr([function({settings:e={retries:5,timeout:2e3},onError:t,onRetrying:A,onRetryFailed:i}){return function(o,r,n){const s=Gr({retryFunction:n.value,settings:e,onError({error:e,retry:A,reject:i,retryFuncArgs:n}){var s;t?t.call(this,e,(()=>{var t;(null==(t=Vr.get(o))?void 0:t.has(r))?A():i(e)}),i,n):(null==(s=Vr.get(o))?void 0:s.has(r))?A():i(e)},onRetrying(e,t){var i;Fr(A)&&A.call(this,e,t),(null==(i=Vr.get(o))?void 0:i.has(r))&&(Vr.get(o).get(r).stopRetry=t)},onRetryFailed:i});return n.value=function(...e){const t=Vr.get(o);return t?t.set(r,{args:e}):Vr.set(o,new Map([[r,{args:e}]])),s.apply(this,e).finally((()=>{var e;return null==(e=Vr.get(o))?void 0:e.delete(r)}))},n}}({settings:{retries:1/0,timeout:2e3},onRetrying(e){var t;if(this._log.warn(`retry connect ${e}`),e>=3&&(null==(t=this.callback)?void 0:t.onError)&&!this.isFireWallErrorEmitted){const{RtcError:e,ErrorCode:t,ErrorCodeDictionary:A}=this.core.errorModule;this.isFireWallErrorEmitted=!0,this.callback.onError(new e({code:t.OPERATION_FAILED,extraCode:A.FIREWALL_RESTRICTION,message:"firewall restriction"}))}},onError(e,t,A,i){var o;if(this._log.warn("connect failed",e),this.peerConnection&&(this.peerConnection.close(),delete this.peerConnection),!this.isStopped&&(null==(o=e.message||e)?void 0:o.includes("connection")))t();else{const{RtcError:t,ErrorCode:i}=this.core.errorModule;A(new t({code:i.UNKNOWN_ERROR,message:e.message}))}}})],$r.prototype,"connect",1),Mr([function({fnName:e,callback:t,validateArgs:A=!0}){return function(i,o,r){const n=r.value;return r.value=function(...o){var r,s;if(null==(r=Vr.get(i))?void 0:r.has(e)){const{stopRetry:r,args:n}=Vr.get(i).get(e);let a=!0;if(A)for(const e of n)if(!o.find((t=>t===e))){a=!1;break}a&&(t&&t.apply(this,o),r&&r(),null==(s=Vr.get(i))||s.delete(e))}return n.apply(this,o)},r}}({fnName:"connect"})],$r.prototype,"stop",1);var en=$r,tn=async(e,t,A={})=>{const{timeout:i=10}=A;let o,r=0,n={};window.AbortController&&(o=new window.AbortController,n={signal:o.signal},r=window.setTimeout((()=>o.abort()),1e3*i));const s=await fetch(e,((e,t)=>{for(var A in t||(t={}))Sr.call(t,A)&&Dr(e,A,t[A]);if(Rr)for(var A of Rr(t))br.call(t,A)&&Dr(e,A,t[A]);return e})({body:JSON.stringify(t),cache:"no-cache",credentials:"same-origin",headers:{"content-type":"text/plain;charset=utf-8"},method:"POST",mode:"cors"},n));if(r&&window.clearTimeout(r),200!==s.status)throw new Error(`Network Error, status code:${s.status}`);return s.json()},An=["webrtc-signal-scheduler.tlivesource.com","bak-webrtc-signal-scheduler.tlivesource.com"],on="LEB_PLAYER_STORAGE_KEY",rn=e=>{const t=/^(?:webrtc:\/\/)([0-9.\-A-Za-z_]+)(?:\/)(?:[0-9.\-A-Za-z_=]+)(?:\/)(?:[^?#]*)(?:\?*)(?:[^?#]*)/.exec(e);return t?t[1]:""},nn=Object.defineProperty,sn=(e,t,A)=>((e,t,A)=>t in e?nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A)(e,"symbol"!=typeof t?t+"":t,A);var an,cn=(an="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,A,i=e;i.ready=new Promise(((e,i)=>{t=e,A=i}));var o=Object.assign({},i),r="";"undefined"!=typeof document&&document.currentScript&&(r=document.currentScript.src),an&&(r=an),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 c,g,u,l,d,h,C,I,B=!1,E=[],p=[],Q=[],f=0,v=null;function y(e){i.onAbort&&i.onAbort(e),a(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw A(t),t}var T,m,R="data:application/octet-stream;base64,",w=e=>e.startsWith(R);function S(e){return Promise.resolve().then((()=>function(e){if(e==T&&n)return new Uint8Array(n);var t=function(e){if(w(e))return function(e){for(var t=atob(e),A=new Uint8Array(t.length),i=0;i<t.length;++i)A[i]=t.charCodeAt(i);return A}(e.slice(R.length))}(e);if(t)return t;throw"both async and sync fetching of the wasm failed"}(e)))}w(T="data:application/octet-stream;base64,AGFzbQEAAAAB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gRrSwRAIAAgASACIAAoAiQRAgAaDAELAkACQCAAKAJQQQBIDQAgAkUNACACIQMDQCABIANqIgVBAWstAABBCkcEQCADQQFrIgMNAQwCCwsgACABIAMgACgCJBECACADSQ0CIAIgA2shAiAAKAIUIQQMAQsgASEFCyAEIAUgAhAiGiAAIAAoAhQgAmo2AhQLCwt0AQF/IAJFBEAgACgCBCABKAIERg8LIAAgAUYEQEEBDwsgASgCBCICLQAAIQECQCAAKAIEIgMtAAAiAEUNACAAIAFHDQADQCACLQABIQEgAy0AASIARQ0BIAJBAWohAiADQQFqIQMgACABRg0ACwsgACABRgtvAQF/IwBBgAJrIgUkAAJAIAIgA0wNACAEQYDABHENACAFIAFB/wFxIAIgA2siA0GAAiADQYACSSIBGxAmGiABRQRAA0AgACAFQYACEB0gA0GAAmsiA0H/AUsNAAsLIAAgBSADEB0LIAVBgAJqJAALgQMBBH8jAEHwAGsiAiQAIAAoAgAiA0EEaygCACEEIANBCGsoAgAhBSACQgA3AlAgAkIANwJYIAJCADcCYCACQgA3AGcgAkIANwJIIAJBADYCRCACQazMADYCQCACIAA2AjwgAiABNgI4IAAgBWohAwJAIAQgAUEAEB4EQEEAIAMgBRshAAwBCyAAIANOBEAgAkIANwAvIAJCADcCGCACQgA3AiAgAkIANwIoIAJCADcCECACQQA2AgwgAiABNgIIIAIgADYCBCACIAQ2AgAgAkEBNgIwIAQgAiADIANBAUEAIAQoAgAoAhQRCQAgAigCGA0BC0EAIQAgBCACQThqIANBAUEAIAQoAgAoAhgRCAACQAJAIAIoAlwOAgABAgsgAigCTEEAIAIoAlhBAUYbQQAgAigCVEEBRhtBACACKAJgQQFGGyEADAELIAIoAlBBAUcEQCACKAJgDQEgAigCVEEBRw0BIAIoAlhBAUcNAQsgAigCSCEACyACQfAAaiQAIAAL0AEBBX8jAEEQayIGJAAgBkEEaiICED8jAEEQayIFJAACfyACLQALQQd2BEAgAigCBAwBCyACLQALQf8AcQshBANAAkACfyACLQALQQd2BEAgAigCAAwBC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SABCyACEEUgACACIARqIgEQMSAFQQA6AA8gASADaiAFLQAPOgAADAELIAAgAyACIARqIANrIARBACACIAEQRAsgBUEQaiQAIAAMAQsQJwALC/ICAgJ/AX4CQCACRQ0AIAAgAToAACAAIAJqIgNBAWsgAToAACACQQNJDQAgACABOgACIAAgAToAASADQQNrIAE6AAAgA0ECayABOgAAIAJBB0kNACAAIAE6AAMgA0EEayABOgAAIAJBCUkNACAAQQAgAGtBA3EiBGoiAyABQf8BcUGBgoQIbCIBNgIAIAMgAiAEa0F8cSIEaiICQQRrIAE2AgAgBEEJSQ0AIAMgATYCCCADIAE2AgQgAkEIayABNgIAIAJBDGsgATYCACAEQRlJDQAgAyABNgIYIAMgATYCFCADIAE2AhAgAyABNgIMIAJBEGsgATYCACACQRRrIAE2AgAgAkEYayABNgIAIAJBHGsgATYCACAEIANBBHFBGHIiBGsiAkEgSQ0AIAGtQoGAgIAQfiEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkEgayICQR9LDQALCyAACwUAEAwAC1IBAn9BqNQAKAIAIgEgAEEHakF4cSICaiEAAkAgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQEUUNAQtBqNQAIAA2AgAgAQ8LQbjeAEEwNgIAQX8LgwECBX8BfgJAIABCgICAgBBUBEAgACEHDAELA0AgAUEBayIBIAAgAEIKgCIHQgp+fadBMHI6AAAgAEL/////nwFWIQUgByEAIAUNAAsLIAenIgIEQANAIAFBAWsiASACIAJBCm4iA0EKbGtBMHI6AAAgAkEJSyEGIAMhAiAGDQALCyABC3oBA38CQAJAIAAiAUEDcUUNACABLQAARQRAQQAPCwNAIAFBAWoiAUEDcUUNASABLQAADQALDAELA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsDQCACIgFBAWohAiABLQAADQALCyABIABrC78EAQl/AkACfyAALQALQQd2BEAgACgCBAwBCyAALQALQf8AcQsiAiABSQRAIwBBEGsiBiQAIAEgAmsiBQRAIAUgAC0AC0EHdgR/IAAoAghB/////wdxQQFrBUEKCyICAn8gAC0AC0EHdgRAIAAoAgQMAQsgAC0AC0H/AHELIgFrSwRAIwBBEGsiBCQAAkAgBSACayABaiIDQe////8HIAJrTQRAAn8gAC0AC0EHdgRAIAAoAgAMAQsgAAshByAEQQRqIgggACACQef///8DSQR/IAQgAkEBdDYCDCAEIAIgA2o2AgQjAEEQayIDJAAgCCgCACAEQQxqIgkoAgBJIQogA0EQaiQAIAkgCCAKGygCACIDQQtPBH8gA0EQakFwcSIDIANBAWsiAyADQQtGGwVBCgtBAWoFQe////8HCxAwIAQoAgQhAyAEKAIIGiABBEAgAyAHIAEQIwsgAkEKRwRAIAcQGQsgACADNgIAIAAgACgCCEGAgICAeHEgBCgCCEH/////B3FyNgIIIAAgACgCCEGAgICAeHI2AgggBEEQaiQADAELECcACyAAIAE2AgQLIAECfyAALQALQQd2BEAgACgCAAwBCyAACyICaiAFEEAgACABIAVqIgAQMSAGQQA6AA8gACACaiAGLQAPOgAACyAGQRBqJAAMAQsCfyAALQALQQd2BEAgACgCAAwBCyAACyEEIwBBEGsiAiQAIAAgARAxIAJBADoADyABIARqIAItAA86AAAgAkEQaiQACwsGACAAEBkL0igBDH8jAEEQayIKJAACQAJAAkACQAJAAkACQAJAAkAgAEH0AU0EQEG83gAoAgAiBkEQIABBC2pBeHEgAEELSRsiBUEDdiIAdiIBQQNxBEACQCABQX9zQQFxIABqIgJBA3QiAUHk3gBqIgAgAUHs3gBqKAIAIgEoAggiA0YEQEG83gAgBkF+IAJ3cTYCAAwBCyADIAA2AgwgACADNgIICyABQQhqIQAgASACQQN0IgJBA3I2AgQgASACaiIBIAEoAgRBAXI2AgQMCgsgBUHE3gAoAgAiB00NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgFBA3QiAEHk3gBqIgIgAEHs3gBqKAIAIgAoAggiA0YEQEG83gAgBkF+IAF3cSIGNgIADAELIAMgAjYCDCACIAM2AggLI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IAAgACgCJEEBajYCJAsLYwECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAkEIaiABIANBAXEEfyABKAIAIABqKAIABSAACxEAACACKAIMIgAQAiACKAIMIgEEQCABEAMLIAJBEGokACAAC0MBAX8jAEEQayIBJAAgAEIANwIAIABBADYCCCABQRBqJAAgACAALQALQQd2BH8gACgCCEH/////B3FBAWsFQQoLECsLPQEBfyMAQRBrIgIkACACQQA6AA8DQCABBEAgACACLQAPOgAAIAFBAWshASAAQQFqIQAMAQsLIAJBEGokAAsaACAALQALQQd2BEAgACgCCBogACgCABAZCwvmAQEFfyMAQRBrIgUkACMAQSBrIgMkACMAQRBrIgQkACAEIAA2AgwgBCAAIAFqNgIIIAMgBCgCDDYCGCADIAQoAgg2AhwgBEEQaiQAIAMoAhghBCADKAIcIQYjAEEQayIBJAAgASAGNgIMIAIgBCAGIARrIgQQQyABIAIgBGo2AgggAyABKAIMNgIQIAMgASgCCDYCFCABQRBqJAAgAyAAIAMoAhAgAGtqNgIMIAMgAiADKAIUIAJrajYCCCAFIAMoAgw2AgggBSADKAIINgIMIANBIGokACAFKAIMIQcgBUEQaiQAIAcLDwAgAgRAIAAgASACEDILC/UCAQV/IwBBEGsiByQAIAIgAUF/c0Hv////B2pNBEACfyAALQALQQd2BEAgACgCAAwBCyAACyEIIAdBBGoiCSAAIAFB5////wNJBH8gByABQQF0NgIMIAcgASACajYCBCMAQRBrIgIkACAJKAIAIAdBDGoiCigCAEkhCyACQRBqJAAgCiAJIAsbKAIAIgJBC08EfyACQRBqQXBxIgIgAkEBayICIAJBC0YbBUEKC0EBagVB7////wcLEDAgBygCBCECIAcoAggaIAQEQCACIAggBBAjCyAFBEAgAiAEaiAGIAUQIwsgAyAEayEGIAMgBEcEQCACIARqIAVqIAQgCGogBhAjCyABQQpHBEAgCBAZCyAAIAI2AgAgACAAKAIIQYCAgIB4cSAHKAIIQf////8HcXI2AgggACAAKAIIQYCAgIB4cjYCCCAAIAQgBWog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gxBABAeDQIaIAEtAAhBAXFFDQEgASgCDCIARQ0BIABBvM0AECAiAQRAIAMoAgwhAAwBCwsgAEGszgAQICIARQ0AIAAgAygCDBA8IQILIAILIQUMAgsgA0GszgAQICIBBEAgAC0ACEEBcUUNAiABIAYoAgwQPCEFDAILIANB3MwAECAiAUUNASAGKAIMIgBFDQEgAEHczAAQICIARQ0BIARBDGpBAEE0ECYaIARBATYCOCAEQX82AhQgBCABNgIQIAQgADYCCCAAIARBCGogAigCAEEBIAAoAgAoAhwRBgACQCAEKAIgIgBBAUcNACACKAIARQ0AIAIgBCgCGDYCAAsgAEEBRiEFDAELQQAhBQsgBEFAayQAIAULMQAgACABKAIIQQAQHgRAIAEgAiADED0PCyAAKAIIIgAgASACIAMgACgCACgCHBEGAAsYACAAIAEoAghBABAeBEAgASACIAMQPQsLnQEBAn8jAEFAaiIDJAACf0EBIAAgAUEAEB4NABpBACABRQ0AGkEAIAFB3MwAECAiAUUNABogA0EMakEAQTQQJhogA0EBNgI4IANBfzYCFCADIAA2AhAgAyABNgIIIAEgA0EIaiACKAIAQQEgASgCACgCHBEGACADKAIgIgBBAUYEQCACIAMoAhg2AgALIABBAUYLIQQgA0FAayQAIAQLCgAgACABQQAQHgtOAgF/AXwjAEEQayICJAAgAkEANgIMIAEoAgRBpM8AIAJBDGoQCSEDIAIoAgwiAQRAIAEQAQsgACADRAAAAAAAAAAAYjoAOCACQRBqJAALNwEBfyMAQRBrIgIkACACIAEtADg2AgggAEGkzwAgAkEIahAHNgIEIABBpNUANgIAIAJBEGokAAuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECIaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECIaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACC5wBAQJ/IwBBEGsiAiQAQcgAEBwhASAAKAIEIgAQAiACIAA2AgggAUGcLSACQQhqEAc2AgQgAUGk1QA2AgAgAUEBNgIcIAFBpNUANgIYIAFBATYCFCABQaTVADYCECABQQE2AgwgAUGk1QA2AgggAUEAOgAgIAFBADYCRCABQoCAgIAwNwI8IAFBADsANyABQQA7ACsgAkEQaiQAIAELigUCBn4CfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIQkgASkDACEDIAEpAwghBSMAQSBrIgAkAAJAIAVC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBUIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAhSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBUIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIBQZH3AEkNACADIQIgBUL///////8/g0KAgICAgIDAAIQiBCEGAkAgAUGB9wBrIghBwABxBEAgAyAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgeGIAJBwAAgCGutiIQhBiACIAeGIQILIAAgAjcDECAAIAY3AxgCQEGB+AAgAWsiAUHAAHEEQCAEIAFBQGqtiCEDQgAhBAwBCyABRQ0AIARBwAAgAWuthiADIAGtIgKIhCEDIAQgAoghBAsgACADNwMAIAAgBDcDCCAAKQMIQgSGIAApAwAiA0I8iIQhAiAAKQMQIAApAxiEQgBSrSADQv//////////D4OEIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILIABBIGokACAJIAIgBUKAgICAgICAgIB/g4S/OQMAC0ABAn8jAEEQayICJAAgAiABNgIMIAJBpNUANgIIIAJBCGogABEBACEDIAIoAgwiAQRAIAEQAwsgAkEQaiQAIAMLBABCAAsEAEE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AANAAAADUAAABTdDExbG9naWNfZXJyb3IAeCgAACgpAAAMKQAAAAAAAGwpAAAYAAAANgAAADUAAABTdDEybGVuZ3RoX2Vycm9yAAAAAHgoAABYKQAAOCkAAFN0OXR5cGVfaW5mbwAAAABQKAAAeCkAQZDTAAsJ2hQAAAAAAAAFAEGk0wALARsAQbzTAAsOHAAAAB0AAAA4KwAAAAQAQdTTAAsBAQBB5NMACwX/////CgBBqNQACwMwMQE=")||(m=T,T=i.locateFile?i.locateFile(m,r):r+m);var b=e=>{for(;e.length>0;)e.shift()(i)};function D(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){h[this.ptr+4>>2]=e},this.get_type=function(){return h[this.ptr+4>>2]},this.set_destructor=function(e){h[this.ptr+8>>2]=e},this.get_destructor=function(){return h[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,c[this.ptr+12|0]=e},this.get_caught=function(){return 0!=c[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,c[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=c[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){h[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return h[this.ptr+16>>2]},this.get_exception_ptr=function(){if(et(this.get_type()))return h[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var M,_,L,k=e=>{for(var t="",A=e;g[A];)t+=M[g[A++]];return t},N={},P={},F={},G=e=>{throw new _(e)},V=e=>{throw new L(e)},x=(e,t,A)=>{function i(t){var i=A(t);i.length!==e.length&&V("Mismatched type converter count");for(var o=0;o<e.length;++o)Y(e[o],i[o])}e.forEach((function(e){F[e]=t}));var o=new Array(t.length),r=[],n=0;t.forEach(((e,t)=>{P.hasOwnProperty(e)?o[t]=P[e]:(r.push(e),N.hasOwnProperty(e)||(N[e]=[]),N[e].push((()=>{o[t]=P[e],++n===r.length&&i(o)})))})),0===r.length&&i(o)};function Y(e,t,A={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,A={}){var i=t.name;if(e||G(`type "${i}" must have a positive integer typeid pointer`),P.hasOwnProperty(e)){if(A.ignoreDuplicateRegistrations)return;G(`Cannot register type '${i}' twice`)}if(P[e]=t,delete F[e],N.hasOwnProperty(e)){var o=N[e];delete N[e],o.forEach((e=>e()))}}(e,t,A)}var H,U=e=>{G(e.$$.ptrType.registeredClass.name+" instance already deleted")},O=!1,J=e=>{},K=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,t,A)=>{if(t===A)return e;if(void 0===A.baseClass)return null;var i=j(e,t,A.baseClass);return null===i?null:A.downcast(i)},W={},z=[],Z=()=>{for(;z.length;){var e=z.pop();e.$$.deleteScheduled=!1,e.delete()}},q={},X=(e,t)=>(t.ptrType&&t.ptr||V("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&V("Both smartPtrType and smartPtr must be specified"),t.count={value:1},$(Object.create(e,{$$:{value:t}}))),$=e=>"undefined"==typeof FinalizationRegistry?($=e=>e,e):(O=new FinalizationRegistry((e=>{K(e.$$)})),J=e=>O.unregister(e),($=e=>{var t=e.$$;if(t.smartPtr){var A={$$:t};O.register(e,A,e)}return e})(e));function ee(){}var te=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ae=(e,t,A)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||G(`Function '${A}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}};function ie(e,t,A,i,o,r,n,s){this.name=e,this.constructor=t,this.instancePrototype=A,this.rawDestructor=i,this.baseClass=o,this.getActualType=r,this.upcast=n,this.downcast=s,this.pureVirtualFunctions=[]}var oe=(e,t,A)=>{for(;t!==A;)t.upcast||G(`Expected null or instance of ${A.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function re(e,t){if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`);var A=t.$$.ptrType.registeredClass;return oe(t.$$.ptr,A,this.registeredClass)}function ne(e,t){var A;if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),this.isSmartPointer?(A=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,A),A):0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(A=oe(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&G("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?A=t.$$.smartPtr:G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:A=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)A=t.$$.smartPtr;else{var o=t.clone();A=this.rawShare(A,me.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,A)}break;default:G("Unsupporting sharing policy")}return A}function se(e,t){if(null===t)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var A=t.$$.ptrType.registeredClass;return oe(t.$$.ptr,A,this.registeredClass)}function ae(e){return this.fromWireType(h[e>>2])}function ce(e,t,A,i,o,r,n,s,a,c,g){this.name=e,this.registeredClass=t,this.isReference=A,this.isConst=i,this.isSmartPointer=o,this.pointeeType=r,this.sharingPolicy=n,this.rawGetPointee=s,this.rawConstructor=a,this.rawShare=c,this.rawDestructor=g,o||void 0!==t.baseClass?this.toWireType=ne:i?(this.toWireType=re,this.destructorFunction=null):(this.toWireType=se,this.destructorFunction=null)}var ge,ue,le=[],de=e=>{var t=le[e];return t||(e>=le.length&&(le.length=e+1),le[e]=t=ge.get(e)),t},he=(e,t,A)=>e.includes("j")?((e,t,A)=>{var o=i["dynCall_"+e];return A&&A.length?o.apply(null,[t].concat(A)):o.call(null,t)})(e,t,A):de(t).apply(null,A),Ce=(e,t)=>{var A,i,o,r=(e=k(e)).includes("j")?(A=e,i=t,o=[],function(){return o.length=0,Object.assign(o,arguments),he(A,i,o)}):de(t);return"function"!=typeof r&&G(`unknown function pointer with signature ${e}: ${t}`),r},Ie=e=>{var t=Xe(e),A=k(t);return $e(t),A},Be=(e,t)=>{var A=[],i={};throw t.forEach((function e(t){i[t]||P[t]||(F[t]?F[t].forEach(e):(A.push(t),i[t]=!0))})),new ue(`${e}: `+A.map(Ie).join([", "]))},Ee=(e,t)=>{for(var A=[],i=0;i<e;i++)A.push(h[t+4*i>>2]);return A},pe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Qe(e,t,A,i,o,r){var n=t.length;n<2&&G("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==A,a=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){a=!0;break}var g="void"!==t[0].name,u=n-2,l=new Array(u),d=[],h=[];return te(e,(function(){var A;arguments.length!==u&&G(`function ${e} called with ${arguments.length} arguments, expected ${u}`),h.length=0,d.length=s?2:1,d[0]=o,s&&(A=t[1].toWireType(h,this),d[1]=A);for(var r=0;r<u;++r)l[r]=t[r+2].toWireType(h,arguments[r]),d.push(l[r]);return function(e){if(a)pe(h);else for(var i=s?1:2;i<t.length;i++){var o=1===i?A:l[i-2];null!==t[i].destructorFunction&&t[i].destructorFunction(o)}if(g)return t[0].fromWireType(e)}(i.apply(null,d))}))}var fe=(e,t,A)=>(e instanceof Object||G(`${A} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||G(`${A} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||G(`cannot call emscripten binding method ${A} on deleted object`),oe(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass));function ve(){this.allocated=[void 0],this.freelist=[]}var ye=new ve,Te=e=>{e>=ye.reserved&&0==--ye.get(e).refcount&&ye.free(e)},me={toValue:e=>(e||G("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(d[e>>2])}var we,Se,be=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},De=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(I[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Me=(e,t,A)=>{switch(t){case 1:return A?e=>c[0|e]:e=>g[0|e];case 2:return A?e=>u[e>>1]:e=>l[e>>1];case 4:return A?e=>d[e>>2]:e=>h[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},_e="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Le=(e,t,A)=>{for(var i=t+A,o=t;e[o]&&!(o>=i);)++o;if(o-t>16&&e.buffer&&_e)return _e.decode(e.subarray(t,o));for(var r="";t<o;){var n=e[t++];if(128&n){var s=63&e[t++];if(192!=(224&n)){var a=63&e[t++];if((n=224==(240&n)?(15&n)<<12|s<<6|a:(7&n)<<18|s<<12|a<<6|63&e[t++])<65536)r+=String.fromCharCode(n);else{var c=n-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&n)<<6|s)}else r+=String.fromCharCode(n)}return r},ke=(e,t)=>e?Le(g,e,t):"",Ne="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Pe=(e,t)=>{for(var A=e,i=A>>1,o=i+t/2;!(i>=o)&&l[i];)++i;if((A=i<<1)-e>32&&Ne)return Ne.decode(g.subarray(e,A));for(var r="",n=0;!(n>=t/2);++n){var s=u[e+2*n>>1];if(0==s)break;r+=String.fromCharCode(s)}return r},Fe=(e,t,A)=>{if(void 0===A&&(A=2147483647),A<2)return 0;for(var i=t,o=(A-=2)<2*e.length?A/2:e.length,r=0;r<o;++r){var n=e.charCodeAt(r);u[t>>1]=n,t+=2}return u[t>>1]=0,t-i},Ge=e=>2*e.length,Ve=(e,t)=>{for(var A=0,i="";!(A>=t/4);){var o=d[e+4*A>>2];if(0==o)break;if(++A,o>=65536){var r=o-65536;i+=String.fromCharCode(55296|r>>10,56320|1023&r)}else i+=String.fromCharCode(o)}return i},xe=(e,t,A)=>{if(void 0===A&&(A=2147483647),A<4)return 0;for(var i=t,o=i+A-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)),d[t>>2]=n,(t+=4)+4>o)break}return d[t>>2]=0,t-i},Ye=e=>{for(var t=0,A=0;A<e.length;++A){var i=e.charCodeAt(A);i>=55296&&i<=57343&&++A,t+=4}return t},He=(e,t)=>{var A=P[e];return void 0===A&&G(t+" has unknown type "+Ie(e)),A},Ue=(e,t,A)=>{var i=[],o=e.toWireType(i,A);return i.length&&(h[t>>2]=me.toHandle(i)),o},Oe={},Je=[],Ke=Reflect.construct,je=[null,[],[]];(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);M=e})(),_=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},L=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 t=this.$$.ptrType.registeredClass,A=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)A=t.upcast(A),t=t.baseClass;for(;i.baseClass;)o=i.upcast(o),i=i.baseClass;return t===i&&A===o},clone(){if(this.$$.ptr||U(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=$(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 t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||U(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&G("Object already scheduled for deletion"),J(this),K(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&&G("Object already scheduled for deletion"),z.push(this),1===z.length&&H&&H(Z),this.$$.deleteScheduled=!0,this}}),i.getInheritedInstanceCount=()=>Object.keys(q).length,i.getLiveInheritedInstances=()=>{var e=[];for(var t in q)q.hasOwnProperty(t)&&e.push(q[t]);return e},i.flushPendingDeletes=Z,i.setDelayFunction=e=>{H=e,z.length&&H&&H(Z)},Object.assign(ce.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 t=this.getPointee(e);if(!t)return this.destructor(e),null;var A=((e,t)=>(t=((e,t)=>{for(void 0===t&&G("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),q[t]))(this.registeredClass,t);if(void 0!==A){if(0===A.$$.count.value)return A.$$.ptr=t,A.$$.smartPtr=e,A.clone();var i=A.clone();return this.destructor(e),i}function o(){return this.isSmartPointer?X(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):X(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var r,n=this.registeredClass.getActualType(t),s=W[n];if(!s)return o.call(this);r=this.isConst?s.constPointerType:s.pointerType;var a=j(t,this.registeredClass,r.registeredClass);return null===a?o.call(this):this.isSmartPointer?X(r.registeredClass.instancePrototype,{ptrType:r,ptr:a,smartPtrType:this,smartPtr:e}):X(r.registeredClass.instancePrototype,{ptrType:r,ptr:a})}}),ue=i.UnboundTypeError=(we=Error,(Se=te("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.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(ve.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},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,t=ye.reserved;t<ye.allocated.length;++t)void 0!==ye.allocated[t]&&++e;return e};var We,ze={w:(e,t,A)=>{throw new D(e).init(t,A),e},q:(e,t,A,i,o)=>{},u:(e,t,A,i)=>{Y(e,{name:t=k(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?A:i},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})},y:(e,t,A,o,r,n,s,a,c,g,u,l,d)=>{u=k(u),n=Ce(r,n),a&&(a=Ce(s,a)),g&&(g=Ce(c,g)),d=Ce(l,d);var h=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${e}`:e})(u);((e,t,A)=>{i.hasOwnProperty(e)?(G(`Cannot register public name '${e}' twice`),Ae(i,e,e),i.hasOwnProperty(A)&&G(`Cannot register multiple overloads of a function with the same number of arguments (${A})!`),i[e].overloadTable[A]=t):i[e]=t})(h,(function(){Be(`Cannot construct ${u} due to unbound types`,[o])})),x([e,t,A],o?[o]:[],(function(t){var A,r;t=t[0],r=o?(A=t.registeredClass).instancePrototype:ee.prototype;var s=te(u,(function(){if(Object.getPrototypeOf(this)!==c)throw new _("Use 'new' to construct "+u);if(void 0===l.constructor_body)throw new _(u+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new _(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(l.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(r,{constructor:{value:s}});s.prototype=c;var l=new ie(u,s,c,d,A,n,a,g);l.baseClass&&(void 0===l.baseClass.__derivedClasses&&(l.baseClass.__derivedClasses=[]),l.baseClass.__derivedClasses.push(l));var C=new ce(u,l,!0,!1,!1),I=new ce(u+"*",l,!1,!1,!1),B=new ce(u+" const*",l,!1,!0,!1);return W[e]={pointerType:I,constPointerType:B},((e,t,A)=>{i.hasOwnProperty(e)||V("Replacing nonexistant public symbol"),i[e].overloadTable,i[e]=t,i[e].argCount=A})(h,s),[C,I,B]}))},x:(e,t,A,i,o,r)=>{var n=Ee(t,A);o=Ce(i,o),x([],[e],(function(e){var A=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new _(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Be(`Cannot construct ${e.name} due to unbound types`,n)},x([],n,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Qe(A,i,null,o,r),[]))),[]}))},i:(e,t,A,i,o,r,n,s,a)=>{var c=Ee(A,i);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e})(t=k(t)),r=Ce(o,r),x([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function o(){Be(`Cannot call ${i} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var a=e.registeredClass.instancePrototype,g=a[t];return void 0===g||void 0===g.overloadTable&&g.className!==e.name&&g.argCount===A-2?(o.argCount=A-2,o.className=e.name,a[t]=o):(Ae(a,t,i),a[t].overloadTable[A-2]=o),x([],c,(function(o){var s=Qe(i,o,e,r,n);return void 0===a[t].overloadTable?(s.argCount=A-2,a[t]=s):a[t].overloadTable[A-2]=s,[]})),[]}))},k:(e,t,A,i,o,r,n,s,a,c)=>{t=k(t),o=Ce(i,o),x([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,g={get(){Be(`Cannot access ${i} due to unbound types`,[A,n])},enumerable:!0,configurable:!0};return g.set=a?()=>Be(`Cannot access ${i} due to unbound types`,[A,n]):e=>G(i+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,g),x([],a?[A,n]:[A],(function(A){var n=A[0],g={get(){var t=fe(this,e,i+" getter");return n.fromWireType(o(r,t))},enumerable:!0};if(a){a=Ce(s,a);var u=A[1];g.set=function(t){var A=fe(this,e,i+" setter"),o=[];a(c,A,u.toWireType(o,t)),pe(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,g),[]})),[]}))},t:(e,t)=>{Y(e,{name:t=k(t),fromWireType:e=>{var t=me.toValue(e);return Te(e),t},toWireType:(e,t)=>me.toHandle(t),argPackAdvance:8,readValueFromPointer:Re,destructorFunction:null})},p:(e,t,A)=>{Y(e,{name:t=k(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:De(t,A),destructorFunction:null})},g:(e,t,A,i,o)=>{t=k(t);var r=e=>e;if(0===i){var n=32-8*A;r=e=>e<<n>>>n}var s=t.includes("unsigned");Y(e,{name:t,fromWireType:r,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Me(t,A,0!==i),destructorFunction:null})},a:(e,t,A)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=h[e>>2],A=h[e+4>>2];return new i(c.buffer,A,t)}Y(e,{name:A=k(A),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},o:(e,t)=>{var A="std::string"===(t=k(t));Y(e,{name:t,fromWireType(e){var t,i=h[e>>2],o=e+4;if(A)for(var r=o,n=0;n<=i;++n){var s=o+n;if(n==i||0==g[s]){var a=ke(r,s-r);void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),r=s+1}}else{var c=new Array(i);for(n=0;n<i;++n)c[n]=String.fromCharCode(g[o+n]);t=c.join("")}return $e(e),t},toWireType(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||G("Cannot pass non-string to std::string"),i=A&&o?(e=>{for(var t=0,A=0;A<e.length;++A){var i=e.charCodeAt(A);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++A):t+=3}return t})(t):t.length;var r=qe(4+i+1),n=r+4;if(h[r>>2]=i,A&&o)((e,t,A,i)=>{if(!(i>0))return 0;for(var o=A+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(A>=o)break;t[A++]=n}else if(n<=2047){if(A+1>=o)break;t[A++]=192|n>>6,t[A++]=128|63&n}else if(n<=65535){if(A+2>=o)break;t[A++]=224|n>>12,t[A++]=128|n>>6&63,t[A++]=128|63&n}else{if(A+3>=o)break;t[A++]=240|n>>18,t[A++]=128|n>>12&63,t[A++]=128|n>>6&63,t[A++]=128|63&n}}t[A]=0})(t,g,n,i+1);else if(o)for(var s=0;s<i;++s){var a=t.charCodeAt(s);a>255&&($e(n),G("String has UTF-16 code units that do not fit in 8 bits")),g[n+s]=a}else for(s=0;s<i;++s)g[n+s]=t[s];return null!==e&&e.push($e,r),r},argPackAdvance:8,readValueFromPointer:ae,destructorFunction(e){$e(e)}})},l:(e,t,A)=>{var i,o,r,n,s;A=k(A),2===t?(i=Pe,o=Fe,n=Ge,r=()=>l,s=1):4===t&&(i=Ve,o=xe,n=Ye,r=()=>h,s=2),Y(e,{name:A,fromWireType:e=>{for(var A,o=h[e>>2],n=r(),a=e+4,c=0;c<=o;++c){var g=e+4+c*t;if(c==o||0==n[g>>s]){var u=i(a,g-a);void 0===A?A=u:(A+=String.fromCharCode(0),A+=u),a=g+t}}return $e(e),A},toWireType:(e,i)=>{"string"!=typeof i&&G(`Cannot pass non-string to C++ string type ${A}`);var r=n(i),a=qe(4+r+t);return h[a>>2]=r>>s,o(i,a+4,r+t),null!==e&&e.push($e,a),a},argPackAdvance:8,readValueFromPointer:Re,destructorFunction(e){$e(e)}})},v:(e,t)=>{Y(e,{isVoid:!0,name:t=k(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},j:(e,t,A)=>(e=me.toValue(e),t=He(t,"emval::as"),Ue(t,A,e)),e:(e,t,A,i,o)=>{var r,n;return(e=Je[e])(t=me.toValue(t),t[A=void 0===(n=Oe[r=A])?k(r):n],i,o)},d:Te,f:(e,t,A)=>{var i=((e,t)=>{for(var A=new Array(e),i=0;i<e;++i)A[i]=He(h[t+4*i>>2],"parameter "+i);return A})(e,t),o=i.shift();e--;var r,n,s=new Array(e),a=`methodCaller<(${i.map((e=>e.name)).join(", ")}) => ${o.name}>`;return r=te(a,((t,r,n,a)=>{for(var c=0,g=0;g<e;++g)s[g]=i[g].readValueFromPointer(a+c),c+=i[g].argPackAdvance;var u=1===A?Ke(r,s):r.apply(t,s);for(g=0;g<e;++g)i[g].deleteObject&&i[g].deleteObject(s[g]);return Ue(o,n,u)})),n=Je.length,Je.push(r),n},c:e=>{e>4&&(ye.get(e).refcount+=1)},b:e=>{var t=me.toValue(e);pe(t),Te(e)},h:(e,t)=>{var A=(e=He(e,"_emval_take_value")).readValueFromPointer(t);return me.toHandle(A)},m:()=>{y("")},s:(e,t,A)=>g.copyWithin(e,t,t+A),r:e=>{g.length,y("OOM")},n:(e,t,A,i)=>{for(var o,r,n,c=0,u=0;u<A;u++){var l=h[t>>2],d=h[t+4>>2];t+=8;for(var C=0;C<d;C++)o=e,r=g[l+C],n=void 0,n=je[o],0===r||10===r?((1===o?s:a)(Le(n,0)),n.length=0):n.push(r);c+=d}return h[i>>2]=c,0}},Ze=function(){var e={a:ze};function t(e,t){var A,o;return Ze=e.exports,A=Ze.z.buffer,i.HEAP8=c=new Int8Array(A),i.HEAP16=u=new Int16Array(A),i.HEAPU8=g=new Uint8Array(A),i.HEAPU16=l=new Uint16Array(A),i.HEAP32=d=new Int32Array(A),i.HEAPU32=h=new Uint32Array(A),i.HEAPF32=C=new Float32Array(A),i.HEAPF64=I=new Float64Array(A),ge=Ze.C,o=Ze.A,p.unshift(o),function(){if(f--,i.monitorRunDependencies&&i.monitorRunDependencies(f),0==f&&v){var e=v;v=null,e()}}(),Ze}if(f++,i.monitorRunDependencies&&i.monitorRunDependencies(f),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){a(`Module.instantiateWasm callback failed with error: ${e}`),A(e)}return function(e,t,A,i){return function(e,t,A){return S(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(A,(e=>{a(`failed to asynchronously prepare wasm: ${e}`),y(e)}))}(t,A,i)}(0,T,e,(function(e){t(e.instance)})).catch(A),{}}(),qe=e=>(qe=Ze.B)(e),Xe=e=>(Xe=Ze.D)(e),$e=e=>($e=Ze.E)(e),et=e=>(et=Ze.F)(e);function tt(){function e(){We||(We=!0,i.calledRun=!0,B||(b(p),t(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(),Q.unshift(e);var e;b(Q)}()))}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;b(E)}(),f>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,t,A,o,r)=>(i.dynCall_jiji=Ze.G)(e,t,A,o,r),i._vertexShaderSource=10640,v=function e(){We||tt(),We||(v=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return tt(),e.ready}),gn=cn,un=0,ln=class e{constructor(e){this.core=e,sn(this,"seq"),sn(this,"_core"),sn(this,"log"),sn(this,"beautyParams"),un+=1,this.seq=un,this._core=e,this.log=e.log.createChild({id:`${this.getAlias()}${un}`}),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(t,A,i,o){const{RtcError:r,ErrorCode:n,ErrorCodeDictionary:s}=e.errorModule;if(e.utils.isOverseaSdkAppId(t.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 gn()),this._core.room.videoManager.renderMode="webgl";const t=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,A=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:t,brightness:A,ruddy:i})}async update(e){const t=this._core.utils.isUndefined(e.beauty)?.5:e.beauty,A=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:t,brightness:A,ruddy:i})}async stop(){return this._core.room.videoManager.renderMode="auto",this._core.room.videoManager.stopBeauty()}destroy(){this._core.room.videoManager.renderMode="auto"}};sn(ln,"Name","BasicBeauty");var dn,hn,Cn,In=ln;e.TRTCMediaMixingErrorCode=void 0,(dn=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[dn.Success=0]="Success",dn[dn.Error=-1]="Error",dn[dn.InvalidParams=-2]="InvalidParams",dn[dn.NotFoundSource=-3]="NotFoundSource",dn[dn.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",dn[dn.CameraNotAuthorized=-5]="CameraNotAuthorized",dn[dn.CameraIsOccupied=-6]="CameraIsOccupied",dn[dn.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(hn=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[hn.kCamera=0]="kCamera",hn[hn.kScreen=1]="kScreen",hn[hn.kImage=2]="kImage",hn[hn.kPhoneMirror=4]="kPhoneMirror",hn[hn.kText=5]="kText",hn[hn.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(Cn=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",Cn.onSourceMoved="onSourceMoved",Cn.onSourceResized="onSourceResized",Cn.onRightButtonClicked="onRightButtonClicked",Cn.onError="onError",Cn.onSourcePlugged="onSourcePlugged",Cn.onSourceConnected="onSourceConnected",Cn.onSourceDisconnected="onSourceDisconnected",Cn.onSourceUnplugged="onSourceUnplugged",Cn.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var Bn,En=function(){function e(e,t){if(this.logRegion="tc",this.loggerManager=e,t){var A=t.sdkAppId,i=t.userId,o=t.seq;this.seq=o,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(o),userId:i,sdkAppId:A}))}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 A=[];return Object.keys(e).forEach((function(i){return A[i]=t.getStringifyMessage(e[i])})),JSON.stringify(A)}if(e instanceof Object){var i={};return Object.keys(e).forEach((function(A){return i[A]=t.getStringifyMessage(e[A])})),JSON.stringify(i)}return e},e.prototype.update=function(e){var t=e.userId,A=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:t,sdkAppId:A}))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(A)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger.debug(A)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(A)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(A)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var A=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(A)},e}(),pn=new En(null),Qn=function(){function e(e,t,A){void 0===A&&(A={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:!!A.calcPositionOnly||!1,canExceedContainer:!!A.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"):pn.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 pn.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),A=e.screenY-(this.moveStartOfTop||0);Math.abs(t)>=5||Math.abs(A)>=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)):pn.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,A=e.screenY-this.moveStartOfTop,i=this.originLeft+t,o=this.originTop+A,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 pn.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 A=this.callbacksMap.get(e);A?A.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var A=this.callbacksMap.get(e);A&&(A=A.filter((function(e){return e!=t})),this.callbacksMap.set(e,A))},e.prototype.emit=function(e){for(var t=[],A=1;A<arguments.length;A++)t[A-1]=arguments[A];var i=this.callbacksMap.get(e);i&&i.forEach((function(e){try{e.apply(null,t)}catch(A){console.error("[Movable]emit error:",e,A)}}))},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"}(Bn||(Bn={}));var fn="trtc-resizable-top-left-anchor",vn="trtc-resizable-top-anchor",yn="trtc-resizable-top-right-anchor",Tn="trtc-resizable-left-anchor",mn="trtc-resizable-right-anchor",Rn="trtc-resizable-bottom-left-anchor",wn="trtc-resizable-bottom-anchor",Sn="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 Dn(e,t){for(var A in t)e.style[A]=t[A]}var Mn=function(){function e(e,t,A){void 0===A&&(A={keepRatio:!1,stopPropagation:!1,anchorMode:Bn.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:Bn.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:!!A.keepRatio||!1,stopPropagation:!!A.stopPropagation||!1,anchorMode:A.anchorMode||Bn.Both,canExceedContainer:!!A.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,A,i,o,r,n,s,a=document.createElement("div");a.className="trtc-resizable-resize-anchor ".concat(fn),Dn(a,Object.assign({},bn.resizeAnchor,bn.topLeftAnchor)),this.topLeftAnchor=a;var c=document.createElement("div");c.className="trtc-resizable-resize-anchor ".concat(vn),Dn(c,Object.assign({},bn.resizeAnchor,bn.topAnchor)),this.topAnchor=c;var g=document.createElement("div");g.className="trtc-resizable-resize-anchor ".concat(yn),Dn(g,Object.assign({},bn.resizeAnchor,bn.topRightAnchor)),this.topRightAnchor=g;var u=document.createElement("div");u.className="trtc-resizable-resize-anchor ".concat(Tn),Dn(u,Object.assign({},bn.resizeAnchor,bn.leftAnchor)),this.leftAnchor=u;var l=document.createElement("div");l.className="trtc-resizable-resize-anchor ".concat(mn),Dn(l,Object.assign({},bn.resizeAnchor,bn.rightAnchor)),this.rightAnchor=l;var d=document.createElement("div");d.className="trtc-resizable-resize-anchor ".concat(Rn),Dn(d,Object.assign({},bn.resizeAnchor,bn.bottomLeftAnchor)),this.bottomLeftAnchor=d;var h=document.createElement("div");h.className="trtc-resizable-resize-anchor ".concat(wn),Dn(h,Object.assign({},bn.resizeAnchor,bn.bottomAnchor)),this.bottomAnchor=h;var C=document.createElement("div");C.className="trtc-resizable-resize-anchor ".concat(Sn),Dn(C,Object.assign({},bn.resizeAnchor,bn.bottomRightAnchor)),this.bottomRightAnchor=C,this.options.anchorMode!==Bn.Both&&this.options.anchorMode!==Bn.Edge||(null===(e=this.resizeTarget)||void 0===e||e.appendChild(c),null===(t=this.resizeTarget)||void 0===t||t.appendChild(u),null===(A=this.resizeTarget)||void 0===A||A.appendChild(l),null===(i=this.resizeTarget)||void 0===i||i.appendChild(h)),this.options.anchorMode!==Bn.Both&&this.options.anchorMode!==Bn.Corner||(null===(o=this.resizeTarget)||void 0===o||o.appendChild(a),null===(r=this.resizeTarget)||void 0===r||r.appendChild(g),null===(n=this.resizeTarget)||void 0===n||n.appendChild(d),null===(s=this.resizeTarget)||void 0===s||s.appendChild(C))},e.prototype.initResizeEvent=function(){var e,t,A,i,o,r,n,s;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===(A=this.topRightAnchor)||void 0===A||A.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 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,pn.debug("resize origin:",this.originTop,this.originLeft,this.originWidth,this.originHeight)}else pn.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,A=this.currentAnchor.classList[1],i=this.originLeft,o=this.originTop,r=this.originWidth,n=this.originHeight;switch(A){case fn:o=(t=this._resizeTop(e)).top,n=t.height,i=(t=this._resizeLeft(e)).left,r=t.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 vn:o=(t=this._resizeTop(e)).top,n=t.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 yn:o=(t=this._resizeTop(e)).top,n=t.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 Tn:i=(t=this._resizeLeft(e)).left,r=t.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 mn: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 Rn:n=this._resizeBottom(e),i=(t=this._resizeLeft(e)).left,r=t.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 wn: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 Sn: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 pn.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,A=this.originLeft+t,i=this.originWidth-t;return!this.options.canExceedContainer&&A<0?(A=0,i=this.originWidth+this.originLeft):A>this.originLeft+this.originWidth-20&&(A=this.originLeft+this.originWidth-20,i=20),{left:A,width:i}},e.prototype._resizeTop=function(e){var t=e.screenY-this.resizeStartTop,A=this.originTop+t,i=this.originHeight-t;return!this.options.canExceedContainer&&A<0?(A=0,i=this.originHeight+this.originTop):A>this.originTop+this.originHeight-20&&(A=this.originTop+this.originHeight-20,i=20),{top:A,height:i}},e.prototype._resizeRight=function(e){if(!this.container)return pn.debug("".concat(this.logPrefix,"_resizeRight error. No container:"),this.container),0;var t=e.screenX-this.resizeStartLeft,A=this.originWidth+t;return A<20?A=20:!this.options.canExceedContainer&&A>this.container.offsetWidth-this.originLeft&&(A=this.container.offsetWidth-this.originLeft),A},e.prototype._resizeBottom=function(e){if(!this.container)return pn.debug("".concat(this.logPrefix,"_resizeBottom error. No container:"),this.container),0;var t=e.screenY-this.resizeStartTop,A=this.originHeight+t;return A<20?A=20:!this.options.canExceedContainer&&A>this.container.offsetHeight-this.originTop&&(A=this.container.offsetHeight-this.originTop),A},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 A=this.callbacksMap.get(e);A?A.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var A=this.callbacksMap.get(e);A&&(A=A.filter((function(e){return e!=t})),this.callbacksMap.set(e,A))},e.prototype.emit=function(e){for(var t=[],A=1;A<arguments.length;A++)t[A-1]=arguments[A];var i=this.callbacksMap.get(e);i&&i.slice().forEach((function(e){try{e.apply(null,t)}catch(A){console.error("[Resizable]emit error:",e,A)}}))},e.prototype.destroy=function(){var e,t,A,i,o,r,n,s,a,c,g,u,l,d,h,C;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===(A=this.topRightAnchor)||void 0===A||A.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!==Bn.Both&&this.options.anchorMode!==Bn.Edge||(this.topAnchor&&(null===(a=this.resizeTarget)||void 0===a||a.removeChild(this.topAnchor)),this.leftAnchor&&(null===(c=this.resizeTarget)||void 0===c||c.removeChild(this.leftAnchor)),this.rightAnchor&&(null===(g=this.resizeTarget)||void 0===g||g.removeChild(this.rightAnchor)),this.bottomAnchor&&(null===(u=this.resizeTarget)||void 0===u||u.removeChild(this.bottomAnchor))),this.options.anchorMode!==Bn.Both&&this.options.anchorMode!==Bn.Corner||(this.topLeftAnchor&&(null===(l=this.resizeTarget)||void 0===l||l.removeChild(this.topLeftAnchor)),this.topRightAnchor&&(null===(d=this.resizeTarget)||void 0===d||d.removeChild(this.topRightAnchor)),this.bottomLeftAnchor&&(null===(h=this.resizeTarget)||void 0===h||h.removeChild(this.bottomLeftAnchor)),this.bottomRightAnchor&&(null===(C=this.resizeTarget)||void 0===C||C.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}(),_n=function(){var t=new Map;for(var A in e.TRTCVideoResolution)if(isNaN(Number(A))){var i=e.TRTCVideoResolution[A],o=A.split("_");t.set(i,{width:parseInt(o[1]),height:parseInt(o[2])})}return t}(),Ln=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,_n.has(t.videoResolution)){var A=_n.get(t.videoResolution),i=A.width,o=A.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}this.updatePreviewProperty(),this.canExceedContainer=t.canExceedContainer||!1,this.eventEmitter=new y,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(!Ie(t.videoResolution)||!Ie(t.resMode)){if(this.resMode=Ie(t.resMode)?this.resMode:t.resMode,t.videoResolution&&_n.has(t.videoResolution)){var A=_n.get(t.videoResolution),i=A.width,o=A.height;this.resMode===e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape?(this.mixingVideoWidth=i,this.mixingVideoHeight=o):(this.mixingVideoWidth=o,this.mixingVideoHeight=i)}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 A;null===(A=this.eventEmitter)||void 0===A||A.on(e,t)},t.prototype.off=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.off(e,t)},t.prototype.destroy=function(){var e,t,A,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===(t=this.resizableHandler)||void 0===t||t.destroy(),this.movableHandler=null,this.resizableHandler=null,null===(A=this.container)||void 0===A||A.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=[]},t.prototype.initMediaMovable=function(){this.onMove=this.onMove.bind(this),this.movableHandler=new Qn(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 Mn(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,A=e;t<A.length;t++){if(A[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,A=e/this.mixingVideoWidth,i=t/this.mixingVideoHeight;this.previewScale=A>i?A:i,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,A=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"),t="".concat(o.top+this.previewTop,"px"),A="".concat(o.right-o.left,"px"),i="".concat(o.bottom-o.top,"px"),this.moveAndResizeOverlay.style.display="block"}else e="".concat(this.previewLeft,"px"),t="".concat(this.previewTop,"px"),A="0px",i="0px",this.moveAndResizeOverlay.style.display="none";this.moveAndResizeOverlay.style.left=e,this.moveAndResizeOverlay.style.top=t,this.moveAndResizeOverlay.style.width=A,this.moveAndResizeOverlay.style.height=i}},t.prototype.onMove=function(e,t){var A;console.debug("".concat(this.logPrefix,"onMove: ").concat(e," ").concat(t));var i=this.mediaList[this.selectedMediaIndex];if(i&&this.moveAndResizeOverlay){var o={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+this.moveAndResizeOverlay.offsetWidth,bottom:t-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===(A=this.eventEmitter)||void 0===A||A.emit("onSourceMoved",n({},i),r)}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,A,i){var o;console.debug("".concat(this.logPrefix,"onResize: ").concat(e," ").concat(t," ").concat(A," ").concat(i));var r=this.mediaList[this.selectedMediaIndex];if(r){var s={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+A,bottom:t-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"))},t.prototype.emitOnSelect=function(e){var t;if(e){for(var A=this.mediaList.length,i=0;i<A;i++)if(e.id===this.mediaList[i].id){this.selectedMediaIndex=i;break}}else this.selectedMediaIndex=-1;this.updateOverlay(),null===(t=this.eventEmitter)||void 0===t||t.emit("onSourceSelected",e?n({},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 A=this.container.getBoundingClientRect(),i=e.clientX-A.x-this.previewLeft,o=e.clientY-A.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)}},t.prototype.onContainerMousemove=function(e){var t;if(e.target&&this.container&&null!==this.mousedownLeft&&null!==this.mousedownTop){var A=e.screenX-this.mousedownLeft,i=e.screenY-this.mousedownTop;(Math.abs(A)>=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===(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",n({},this.mediaList[this.selectedMediaIndex]))},t}(),kn=function(){function t(A){if(this.logPrefix="[TRTCMediaMixingManager]",this.eventEmitter=new y,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,this.screensWithSystemAudio=new Set,this.activeSystemAudioTrackId=null,t.mediaMixingManager)return t.mediaMixingManager;t.mediaMixingManager=this,this.logger=A.logger,this.trtc=A.trtc,this.trtcCloud=A.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 a(this,void 0,Promise,(function(){var e,A;return c(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:if(!(this.screensWithSystemAudio.size>0))return[3,9];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack"})];case 6:return i.sent(),[3,8];case 7:return A=i.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin AudioMixer error:"),A),[3,8];case 8:this.screensWithSystemAudio.clear(),this.activeSystemAudioTrackId=null,i.label=9;case 9:return this.destroyDesigner(),this.eventEmitter=null,t.mediaMixingManager=null,[2]}}))}))},t.prototype.bindPreviewArea=function(e){return a(this,void 0,Promise,(function(){var t,A,i,o,r=this;return c(this,(function(n){switch(n.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),A=t.width,i=t.height,[4,this.trtc.startPlugin("VideoMixer",{view:e,canvasInfo:{width:A,height:i,canvasColor:String(this.publishParams.canvasColor)},onScreenShareStop:function(e){var t,A=r.sourceList.find((function(t){return t.id===e}));r.removeMediaSource(A),null===(t=r.eventEmitter)||void 0===t||t.emit("onSourceDisconnected",A||null)}})];case 1:return o=n.sent(),console.log("startPlugin result",o,o.track),this.mixVideoTrack=o.track,this.createDesigner(),[2]}}))}))},t.prototype._getTRTCSourceKey=function(t){var A;return((A={})[e.TRTCMediaSourceType.kCamera]="camera",A[e.TRTCMediaSourceType.kScreen]="screen",A[e.TRTCMediaSourceType.kText]="text",A[e.TRTCMediaSourceType.kVideo]="video",A[e.TRTCMediaSourceType.kImage]="image",A)[t.type]},t.prototype._getTRTCFillMode=function(t){var A;return((A={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]="cover",A[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]="contain",A)[t]},t.prototype._getTRTCVideoProfile=function(t,A){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[t].width,height:o[t].height,frameRate:A,bitrate:1e3}},t.prototype._getTRTCLayout=function(t){var A,i,o,r,n,s,a,c,g,u,l,d,h,C,I,B,E={zIndex:(null===(o=t.layout)||void 0===o?void 0:o.zOrder)||0};if(le(null===(r=t.layout)||void 0===r?void 0:r.rect)||(E.x=null===(n=t.layout)||void 0===n?void 0:n.rect.left,E.y=null===(s=t.layout)||void 0===s?void 0:s.rect.top,E.width=(null===(a=t.layout)||void 0===a?void 0:a.rect.right)-(null===(c=t.layout)||void 0===c?void 0:c.rect.left),E.height=(null===(g=t.layout)||void 0===g?void 0:g.rect.bottom)-(null===(u=t.layout)||void 0===u?void 0:u.rect.top)),le(null===(l=t.layout)||void 0===l?void 0:l.fillMode)||(E.fillMode=this._getTRTCFillMode(null===(d=t.layout)||void 0===d?void 0:d.fillMode)),!le(null===(h=t.layout)||void 0===h?void 0:h.mirror)){var p=((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A);E.mirror=p[null===(C=t.layout)||void 0===C?void 0:C.mirror]}if(!le(null===(I=t.layout)||void 0===I?void 0:I.rotation)){var Q=((i={})[e.TRTCVideoRotation.TRTCVideoRotation0]=0,i[e.TRTCVideoRotation.TRTCVideoRotation90]=90,i[e.TRTCVideoRotation.TRTCVideoRotation180]=180,i[e.TRTCVideoRotation.TRTCVideoRotation270]=270,i);E.rotation=Q[null===(B=t.layout)||void 0===B?void 0:B.rotation]}return E},t.prototype._getTRTCSourceItem=function(t){var A,i,o,r,s,a,c,g,u,l;switch(t.type){case e.TRTCMediaSourceType.kScreen:return l=e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,{id:t.id,profile:this._getTRTCVideoProfile((null===(A=t.screen)||void 0===A?void 0:A.resolution)||l,(null===(i=t.screen)||void 0===i?void 0:i.fps)||15),layout:this._getTRTCLayout(t),systemAudio:null===(o=t.screen)||void 0===o?void 0:o.systemAudio};case e.TRTCMediaSourceType.kCamera:return l=e.TRTCVideoResolution.TRTCVideoResolution_1280_720,{id:t.id,cameraId:null===(r=t.camera)||void 0===r?void 0:r.cameraId,profile:this._getTRTCVideoProfile((null===(s=t.camera)||void 0===s?void 0:s.resolution)||l,(null===(a=t.camera)||void 0===a?void 0:a.fps)||15),videoTrack:null===(c=t.camera)||void 0===c?void 0:c.videoTrack,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kText:return n(n({id:t.id},t.text||{}),{layout:this._getTRTCLayout(t)});case e.TRTCMediaSourceType.kImage:return{id:t.id,url:null===(g=t.image)||void 0===g?void 0:g.url,layout:this._getTRTCLayout(t)};case e.TRTCMediaSourceType.kVideo:return{id:t.id,url:null===(u=t.video)||void 0===u?void 0:u.url,layout:this._getTRTCLayout(t)};default:return null}},t.prototype._getCanvasSize=function(t,A){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)[t],n=r.width,s=r.height;return A===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait&&(n=(o=[s,n])[0],s=o[1]),{width:n,height:s}},t.prototype.addMediaSource=function(t){var A;return a(this,void 0,Promise,(function(){var i,o,r,n,s,a,g,u,l;return c(this,(function(c){switch(c.label){case 0:if(this.logger.log("".concat(this.logPrefix,"addMediaSource:"),t),-1!==this.findMediaSourceIndex(t))throw new Error("Media source already existed");if(i=Ee(t),o=this._getTRTCSourceKey(i),!(r=this._getTRTCSourceItem(i))||!o)throw new Error("Invalid media source");return(n=Ee(this.trtcSourceMap.get(o))||[]).push(r),[4,this.trtc.updatePlugin("VideoMixer",(l={},l[o]=n,l))];case 1:return s=c.sent(),a=s.result,g=s.systemAudioTrackList,t.type===e.TRTCMediaSourceType.kScreen&&(null==g?void 0:g[t.id])?(this.screensWithSystemAudio.add(t.id),u=Object.values(g)[0],1!==this.screensWithSystemAudio.size?[3,3]:(this.logger.log("".concat(this.logPrefix," startPlugin AudioMixer, track ID:"),u.id),this.activeSystemAudioTrackId=u.id,[4,this.trtc.startPlugin("AudioMixer",{id:"systemAudioTrack",track:u})])):[3,5];case 2:return c.sent(),[3,5];case 3:return this.logger.log("".concat(this.logPrefix," updatePlugin AudioMixer, old track ID:"),this.activeSystemAudioTrackId,"new track ID:",u.id),this.activeSystemAudioTrackId=u.id,[4,this.trtc.updatePlugin("AudioMixer",{id:"systemAudioTrack",track:u})];case 4:c.sent(),c.label=5;case 5:if(a.failedDetails.find((function(e){return e.id===t.id})))throw new Error("Failed to add media source");return i.isSelected&&(this.unselectMediaSource(this.selectedSource),this.selectedSource=t),this.trtcSourceMap.set(o,n),null===(A=this.mediaMixingDesigner)||void 0===A||A.addMedia({id:i.id,rect:this._getDesignerMediaRect(t),isSelected:i.isSelected||!0,origin:i}),i.isSelected&&(this.selectedSource=i),this.sourceList.push(i),[2]}}))}))},t.prototype.removeMediaSource=function(t){var A,i,o;return a(this,void 0,Promise,(function(){var r,n,s,a,g,u,l,d,h;return c(this,(function(c){switch(c.label){case 0:if(this.logger.log("".concat(this.logPrefix,"removeMediaSource:"),t),-1===(r=this.findMediaSourceIndex(t)))throw new Error("Not existing media source to remove");return n=this._getTRTCSourceKey(t),s=Ee(this.trtcSourceMap.get(n))||[],a=s.findIndex((function(e){return e.id===t.id})),s.splice(a,1),[4,this.trtc.updatePlugin("VideoMixer",(h={},h[n]=s,h))];case 1:return g=c.sent(),u=g.result,l=g.systemAudioTrackList,t.type===e.TRTCMediaSourceType.kScreen&&this.screensWithSystemAudio.has(t.id)?(this.screensWithSystemAudio.delete(t.id),this.screensWithSystemAudio.size>0?(this.logger.log("".concat(this.logPrefix," keep AudioMixer running, remaining screens:"),this.screensWithSystemAudio.size),(d=l?Object.values(l)[0]:null)&&d.id!==this.activeSystemAudioTrackId?(this.logger.log("".concat(this.logPrefix," updatePlugin AudioMixer, switch track from ").concat(this.activeSystemAudioTrackId," to ").concat(d.id)),this.activeSystemAudioTrackId=d.id,[4,this.trtc.updatePlugin("AudioMixer",{id:"systemAudioTrack",track:d})]):[3,3]):[3,5]):[3,7];case 2:return c.sent(),[3,4];case 3:this.logger.log("".concat(this.logPrefix," AudioMixer track not changed, no need to update")),c.label=4;case 4:return[3,7];case 5:return this.logger.log("".concat(this.logPrefix," stopPlugin AudioMixer, no more screens with system audio")),this.activeSystemAudioTrackId=null,[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack"})];case 6:c.sent(),c.label=7;case 7:if(u.failedDetails.find((function(e){return e.id===t.id})))throw new Error("Failed to remove media source");return null===(A=this.mediaMixingDesigner)||void 0===A||A.removeMedia({id:t.id,rect:null===(i=t.layout)||void 0===i?void 0:i.rect,isSelected:t.isSelected||!1,origin:Ee(t)}),(null===(o=this.selectedSource)||void 0===o?void 0:o.id)===t.id&&(this.selectedSource=null),this.trtcSourceMap.set(n,s),this.sourceList.splice(r,1),[2]}}))}))},t.prototype._getDesignerMediaRect=function(t){var A,i,o=(null===(A=t.layout)||void 0===A?void 0:A.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom,c=s-r,g=a-n;switch(null===(i=t.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+g,bottom:n+c};default:return{left:r,top:n,right:s,bottom:a}}},t.prototype._getPluginMediaRect=function(t){var A,i,o=(null===(A=t.layout)||void 0===A?void 0:A.rect)||{left:0,top:0,right:0,bottom:0},r=o.left,n=o.top,s=o.right,a=o.bottom;switch(null===(i=t.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}}},t.prototype.updateMediaSource=function(e){var t,A;return a(this,void 0,Promise,(function(){var i,o,r,s,a,g,u,l;return c(this,(function(c){switch(c.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]),Ee(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),r=this._getTRTCSourceKey(o),s=this._getTRTCSourceItem(o),a=Ee(this.trtcSourceMap.get(r))||[],g=a.findIndex((function(t){return t.id===e.id})),a[g]=s,[4,this.trtc.updatePlugin("VideoMixer",(l={},l[r]=a,l))];case 1:if(c.sent().result.failedDetails.find((function(t){return t.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:Ee(e)},this.logger.log("".concat(this.logPrefix,"updateParams:"),JSON.stringify(u)),null===(A=this.mediaMixingDesigner)||void 0===A||A.updateMedia(u),this.trtcSourceMap.set(r,a),this.sourceList[i]=o,[2]}}))}))},t.prototype.startPublish=function(){return a(this,void 0,Promise,(function(){return c(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 a(this,void 0,Promise,(function(){return c(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,A,i,r,n;return a(this,void 0,Promise,(function(){var s,a,g,u,d,h,C,I,B,E,p,Q,f,v,y,T,m,R,w,S,b,D,M,_;return c(this,(function(c){switch(c.label){case 0:this.logger.log("".concat(this.logPrefix,"updatePublishParams:"),e),s=this.publishParams,this.publishParams=e,a=this._getCanvasSize(e.videoEncoderParams.videoResolution,e.videoEncoderParams.resMode),g=a.width,u=a.height,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.trtc.updatePlugin("VideoMixer",{canvasInfo:{width:g,height:u,canvasColor:String(e.canvasColor)}})];case 2:return c.sent(),[3,4];case 3:if((d=c.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw d;return[3,4];case 4:null===(i=this.mediaMixingDesigner)||void 0===i||i.updateOptions({videoResolution:this.publishParams.videoEncoderParams.videoResolution,resMode:this.publishParams.videoEncoderParams.resMode}),c.label=5;case 5:c.trys.push([5,11,12,17]),h=l(this.sourceList),c.label=6;case 6:return[4,h.next()];case 7:return(C=c.sent()).done?[3,10]:(I=C.value).layout?(B=I.layout.rect||{left:0,top:0,right:0,bottom:0},E=B.left,p=B.top,Q=B.right,f=B.bottom,v=this._getCanvasSize(s.videoEncoderParams.videoResolution),y=v.width,T=v.height,m=this._getCanvasSize(e.videoEncoderParams.videoResolution),R=m.width,w=m.height,S=E*R/y,b=p*w/T,D=Q*R/y,M=f*w/T,I.layout.rect={left:S,top:b,right:D,bottom:M},[4,this.updateMediaSource(I)]):[3,9];case 8:c.sent(),null===(r=this.eventEmitter)||void 0===r||r.emit("onSourceResized",I,null===(n=I.layout)||void 0===n?void 0:n.rect),c.label=9;case 9:return[3,6];case 10:return[3,17];case 11:return _=c.sent(),t={error:_},[3,17];case 12:return c.trys.push([12,,15,16]),C&&!C.done&&(A=h.return)?[4,A.call(h)]:[3,14];case 13:c.sent(),c.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 c.sent(),[2]}}))}))},t.prototype.on=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.on(e,t)},t.prototype.off=function(e,t){var A;null===(A=this.eventEmitter)||void 0===A||A.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,A;this.view&&(this.mediaMixingDesigner=new Ln({view:this.view,videoResolution:(null===(t=this.publishParams)||void 0===t?void 0:t.videoEncoderParams.videoResolution)||e.TRTCVideoResolution.TRTCVideoResolution_1920_1080,resMode:(null===(A=this.publishParams)||void 0===A?void 0:A.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,A,i,o;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===(A=this.mediaMixingDesigner)||void 0===A||A.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)},t.prototype.unlistenDesignerEvent=function(){var e,t,A,i,o;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===(A=this.mediaMixingDesigner)||void 0===A||A.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)},t.prototype.onError=function(e,t){this.logger.log("".concat(this.logPrefix,"onError:"),e,t)},t.prototype.onSourceSelected=function(e){var t;return a(this,void 0,void 0,(function(){return c(this,(function(A){switch(A.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:A.sent(),this.selectedSource=null,A.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 A,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceMoved:"),e,t),null==e?void 0:e.origin){var o=n(n({},e.origin),{layout:n(n({},e.origin.layout),{rect:t})});this.updateMediaSource(Be(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(A=this.selectedSource)||void 0===A?void 0:A.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id}))),null===(i=this.eventEmitter)||void 0===i||i.emit("onSourceMoved",e.origin,this._getPluginMediaRect(o))}},t.prototype.onSourceResized=function(e,t){var A,i;if(this.logger.debug("".concat(this.logPrefix,"onSourceResized:"),e,t),null==e?void 0:e.origin){var o=n(n({},e.origin),{layout:n(n({},e.origin.layout),{rect:t})});this.updateMediaSource(Be(o,{layout:{rect:this._getPluginMediaRect(o)}})),(null===(A=this.selectedSource)||void 0===A?void 0:A.id)===e.origin.id&&(this.selectedSource=this.sourceList.find((function(t){return t.id===e.origin.id})))}null===(i=this.eventEmitter)||void 0===i||i.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(A){return t.isSameMediaSource(A,e)}))},t.prototype.findMediaSourceIndex=function(e){return this.sourceList.findIndex((function(t){return t.id===e.id}))},t.prototype.unselectMediaSource=function(e){var t,A;return a(this,void 0,Promise,(function(){var i;return c(this,(function(o){return e?(-1!==(i=this.findMediaSourceIndex(e))&&(this.sourceList[i].isSelected=!1),null===(t=this.mediaMixingDesigner)||void 0===t||t.updateMedia({id:e.id,rect:null===(A=e.layout)||void 0===A?void 0:A.rect,isSelected:!1,origin:Ee(e)}),[2]):[2]}))}))},t.mediaMixingManager=null,t}(),Nn=Object.defineProperty,Pn=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,Vn=(e,t,A)=>t in e?Nn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,xn=(e,t)=>{for(var A in t||(t={}))Fn.call(t,A)&&Vn(e,A,t[A]);if(Pn)for(var A of Pn(t))Gn.call(t,A)&&Vn(e,A,t[A]);return e},Yn=(e,t,A)=>Vn(e,"symbol"!=typeof t?t+"":t,A),Hn={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"}},Un=(e,t=!1)=>({type:"object",required:t,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(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(!t)return;const{width:s,height:a}=t;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(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(e.utils.isString(t)&&!document.getElementById(t))throw new o({code:r.INVALID_PARAMETER,extraCode:n.INVALID_ELEMENT_ID,fnName:i,messageParams:{key:A}})}}),Jn=(e,t=!0)=>({type:"object",required:t,properties:xn({},Hn),validate(t,A,i){const{RtcError:o,ErrorCode:r,ErrorCodeDictionary:n}=e.errorModule;if(t){if(t.fillMode&&!["contain","cover","fill"].includes(t.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(t.rotation&&![0,90,180,270].includes(t.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})}}}),Kn=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:xn({},Jn(e))}}}),jn=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:xn({},Jn(e))},validate(t,A,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})}}}),Wn=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:xn({},Jn(e))}}}),zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Jn(e))}}}),Zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Jn(e))}}});var qn=0,Xn=class e{constructor(e){this.core=e,Yn(this,"seq"),Yn(this,"log"),Yn(this,"localMixVideoTrack",null),Yn(this,"systemAudioTrackList",{}),Yn(this,"_mixVideoConfig"),Yn(this,"onScreenShareStop"),qn+=1,this.seq=qn,this.log=e.log.createChild({id:`${this.getAlias()}${qn}`}),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:xn({},On(e)),canvasInfo:xn({},Un(e,!0)),camera:xn({},Kn(e)),screen:xn({},jn(e)),text:xn({},Wn(e)),image:xn({},zn(e)),video:xn({},Zn(e))},validate(t,A,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}=t;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:xn({},On(e)),canvasInfo:xn({},Un(e)),camera:xn({},Kn(e)),screen:xn({},jn(e)),text:xn({},Wn(e)),image:xn({},zn(e)),video:xn({},Zn(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:t,onScreenShareStop:A}=e,i=await this.parseMixOptions(e);return A&&(this.onScreenShareStop=A,this._mixVideoConfig.onScreenShareStop=A),this._updatePreview({view:t,track:this.localMixVideoTrack}),this.core.utils.isUndefined(t)||(this._mixVideoConfig.view=t),await this.localMixVideoTrack.startMix(),{track:this.localMixVideoTrack._outputTrack,systemAudioTrackList:this.systemAudioTrackList,result:i}}async update(e){const{RtcError:t,ErrorCode:A}=this.core.errorModule;if(!this.localMixVideoTrack)throw new t({code:A.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,systemAudioTrackList:this.systemAudioTrackList,result:o}}async parseMixOptions(e){let t={successOptions:{},failedDetails:[]};const{RtcError:A,ErrorCode:i,ErrorCodeDictionary:o}=this.core.errorModule;if(!this.localMixVideoTrack||!this._mixVideoConfig)return t;const r=[],n=xn({},e),{canvasInfo:s,camera:a,screen:c,text:g,image:u,video:l}=e;let d=0,h=0;if(s){const{canvasColor:e,width:t,height:A,frameRate:i}=s;e&&this.localMixVideoTrack.setMixBackground(e),i&&this.localMixVideoTrack.setFps(i),this.localMixVideoTrack.resizeMixCanvas(t,A),this._mixVideoConfig.canvasInfo=s}if(a){d++;const{finalOptions:e,errors:t}=await this.parseCameraOptions(this.localMixVideoTrack,a,this._mixVideoConfig.camera);this._mixVideoConfig.camera=e,n.camera=e,t.length>0&&(r.push(...t),t.length===a.length&&h++)}if(c){d++;const{finalOptions:e,errors:t}=await this.parseScreenOptions(this.localMixVideoTrack,c,this._mixVideoConfig.screen);this._mixVideoConfig.screen=e,n.screen=e,t.length>0&&(r.push(...t),t.length===c.length&&h++)}if(g){d++;const{finalOptions:e,errors:t}=await this.parseTextOptions(this.localMixVideoTrack,g,this._mixVideoConfig.text);this._mixVideoConfig.text=e,n.text=e,t.length>0&&(r.push(...t),t.length===g.length&&h++)}if(u){d++;const{finalOptions:e,errors:t}=await this.parseImageOptions(this.localMixVideoTrack,u,this._mixVideoConfig.image);this._mixVideoConfig.image=e,n.image=e,t.length>0&&(r.push(...t),t.length===u.length&&h++)}if(l){d++;const{finalOptions:e,errors:t}=await this.parseVideoOptions(this.localMixVideoTrack,l,this._mixVideoConfig.video);this._mixVideoConfig.video=e,n.video=e,t.length>0&&(r.push(...t),t.length===l.length&&h++)}if(h>0&&h===d)throw new A({code:i.INVALID_PARAMETER,message:"all sources mix failed",data:{failedDetails:r}});return t={successOptions:n,failedDetails:r},t}async parseCameraOptions(e,t,A=[]){var i,o;const r=new Set(t.map((e=>e.id))),n=A.filter((e=>!r.has(e.id))).map((e=>e.id));for(const g of n)e.removeCameraSource(g);const s=new Map(A.map((e=>[e.id,e]))),a=[],c=[];for(const g of t){const{id:t,layout:A,profile:r}=g;try{if(e.inputLocalVideoTracks.has(t)){const n=null==(i=e.inputLocalVideoTracks.get(t))?void 0:i.mediaTrack;await this.updateCameraProfile(g);const s=null==(o=e.inputLocalVideoTracks.get(t))?void 0:o.mediaTrack;let a;r&&(a=this.core.utils.isString(r)?this.core.constants.videoProfileMap[r]:r),s!==n?e.updateCameraSource(t,A,s,a):e.updateCameraSource(t,A,null,a)}else{const i=await this.captureCamera(g);try{e.addCameraSource(t,i,A)}catch(e){throw i.close(),e}}a.push(g)}catch(e){c.push({id:t,error:e}),s.has(t)&&a.push(s.get(t))}}return{finalOptions:a,errors:c}}async parseScreenOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeScreenSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,layout:A}=a;try{if(e.inputLocalScreenTracks.has(t))e.updateScreenSource(t,A);else{const i=await this.captureScreen(a);try{e.addScreenSource(t,i,A)}catch(e){throw i.close(),e}}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseTextOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeTextSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t}=a;try{A.some((e=>e.id===t))?e.updateTextSource(a):e.addTextSource(a),n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseImageOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeImageSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,url:i,layout:o}=a;try{const r=A.find((e=>e.id===t));if(r){let A;r.url!==i&&(A=await this.core.utils.loadImage(i)),e.updateImageSource(t,o,A)}else{const A=await this.core.utils.loadImage(i);e.addImageSource(t,A,o)}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async parseVideoOptions(e,t,A=[]){const i=new Set(t.map((e=>e.id))),o=A.filter((e=>!i.has(e.id))).map((e=>e.id));for(const a of o)e.removeVideoSource(a);const r=new Map(A.map((e=>[e.id,e]))),n=[],s=[];for(const a of t){const{id:t,url:i,layout:o}=a;try{const r=A.find((e=>e.id===t));let s;if(r)r.url!==i&&(s=await this.core.utils.loadVideo(i)),e.updateVideoSource(t,o,s);else{const A=await this.core.utils.loadVideo(i);e.addVideoSource(t,A,o)}n.push(a)}catch(e){s.push({id:t,error:e}),r.has(t)&&n.push(r.get(t))}}return{finalOptions:n,errors:s}}async captureCamera(e){const{id:t,cameraId:A,videoTrack:i,profile:o}=e,r=new this.core.LocalVideoTrack;r.log.id+=`-${t}`;const n={};return A?n.deviceId=A: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 t;const{id:A,cameraId:i,videoTrack:o,profile:r}=e,n=null==(t=this.localMixVideoTrack)?void 0:t.inputLocalVideoTracks.get(A);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:t,profile:A,captureElement:i,preferDisplaySurface:o}=e,r=new this.core.LocalScreenTrack;r.log.id+=`-${t}`;const n={};this.core.utils.isUndefined(A)||(this.core.utils.isString(A)?this.core.constants.screenProfileMap[A]&&r.setProfile(this.core.constants.screenProfileMap[A]):r.setProfile(A)),i&&(n.captureElement=i),o&&(n.preferDisplaySurface=o),n.systemAudio=e.systemAudio;const s=await r.capture(n);return n.systemAudio&&s.getAudioTracks().length>0&&(this.systemAudioTrackList[t]=s.getAudioTracks()[0]),r.mediaTrack.addEventListener(this.core.constants.NAME.ENDED,(()=>{var e,A,i;null==(e=this.localMixVideoTrack)||e.removeScreenSource(t),(null==(A=this._mixVideoConfig)?void 0:A.screen)&&(this._mixVideoConfig.screen=this._mixVideoConfig.screen.filter((e=>e.id!==t))),null==(i=this.onScreenShareStop)||i.call(this,t)})),r}async _updatePreview({view:e,track:t,prevConfig:A}){if(this.core.utils.isUndefined(e)&&A&&A.view){const e=this.core.utils.getViewListFromView(A.view);e.length>0&&await t.play(e)}if(!this.core.utils.isUndefined(e)){const A=this.core.utils.getViewListFromView(e);A.length>0?await t.play(A):t.stop()}}stop(){var e;null==(e=this.localMixVideoTrack)||e.close(),this.localMixVideoTrack=null,delete this.onScreenShareStop,delete this._mixVideoConfig}};Yn(Xn,"Name","VideoMixer");var $n=Xn,es=function(){function e(){this.isRunning=!1,this.queue=[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastQueueItem",{get:function(){return 0===this.length?null:this.queue[this.length-1]},enumerable:!1,configurable:!0}),e.prototype.push=function(e,t,A,i){var o,r;void 0===t&&(t=!1),void 0===A&&(A=!1);var s=n(n({},e),{functionName:i}),a=new Promise((function(e,t){s.resolve=e,s.reject=t}));if(s.promise=a,t)this.length<=1?this.queue.push(s):null===(r=null===(o=this.lastQueueItem)||void 0===o?void 0:o.promise)||void 0===r||r.then(s.resolve,s.reject);else{if(A&&i&&this.queue.length>1){var c=[];this.queue=this.queue.filter((function(e,t){return 0===t||(e.functionName!==i||(c.push(e),!1))})),c.forEach((function(e){e.reject(new Error("aborted by newer task"))}))}this.queue.push(s)}return this.isRunning||this.callNext(),a},e.prototype.shift=function(){return this.queue.shift()},e.prototype.callNext=function(){var e=this;if(!this.isRunning&&0!==this.length){var t=this.queue[0],A=t.fn,i=t.args,o=t.context,r=t.resolve,n=t.reject;this.isRunning=!0,A.apply(o,i).then(r,n).finally((function(){e.isRunning=!1,e.shift(),e.callNext()}))}},e}(),ts=new WeakMap,As=new WeakMap,is=new WeakMap;function os(e,t){return void 0===t&&(t={}),function(A,i,o){var r=o.value,n=t.deduplicate,s=void 0!==n&&n;return o.value=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];var o=e.apply(void 0,t),n=Array.isArray(o)?o:[o],a=is.get(this)||new Map;is.set(this,a);for(var c=null,g=0,u=n;g<u.length;g++){var l=u[g],d=a.get(l);if(d){c=d;break}}for(var h=c||new es,C=0,I=n;C<I.length;C++){l=I[C];a.set(l,h)}var B=s?i:void 0;return h.push({fn:r,args:t,context:this},!1,s,B)},o}}var rs=o.default._loggerManager;rs.info("TRTCCloud Version: ".concat(fr));var ns,ss,as,cs="trtcCloud",gs=1;navigator&&navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",(ns=function(){0!==us.size&&Array.from(us.values()).forEach((function(e){e.fn()}))},ss=30,function(){for(var e=this,t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];as>0&&clearTimeout(as),as=window.setTimeout((function(){ns.apply(e,t),as=-1}),ss)}));var us=new Map,ls=function(t){function i(A){void 0===A&&(A={});var r=t.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=Go,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=fr;var n=A.frameWorkType,s=void 0===n?30:n,a=A.component,c=void 0===a?0:a,g=A.language,u=void 0===g?0:g;return r._frameWorkType=s,r._component=c,r._language=u,r._trtc=o.default.create({enableSEI:i.enableSEI,assetsPath:i.assetsPath,enableVolumeControlInIOS:!0,plugins:[$n,en]}),r._testTrtc=o.default.create(),r._log=o.default._loggerManager,r.logger=new En(rs,{seq:gs++}),r._echoCancellation=void 0,r._noiseSuppression=void 0,r._autoGainControl=void 0,r._addTRTCEvents(),r.handleDeviceChange=r.handleDeviceChange.bind(r),us.set(r,{fn:r.handleDeviceChange,self:r}),r}var g;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 A(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(A.prototype=t.prototype,new A)}(i,t),i.getPlugin=function(e){return"VirtualBackground"===e?A.VirtualBackground:"BasicBeauty"===e?In:"VideoMixer"===e?$n:null},i.getTRTCShareInstance=function(e){return i.shareInstance||(i.shareInstance=new i(e)),i.shareInstance},i.setLogLevel=function(t,A){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[t];le(n)&&(n=r[e.TRTCLogLevel.TRTCLogLevelInfo]);var s=!he(A)||A;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(cs,".callExperimentalAPI"),e);var t=Ce(e);if(t!==e){var A=t.api,o=t.params;if(A&&o)try{switch(A){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(){us.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,t){return a(this,void 0,Promise,(function(){var A,i,o,r,s,a,g,u,l,d,h,C,I,B,E,p,Q,f;return c(this,(function(c){switch(c.label){case 0:if(A=e.sdkAppId,i=e.userId,o=e.userSig,r=e.roomId,s=e.strRoomId,a=e.role,g=e.privateMapKey,u=e.businessInfo,l=e.enableAutoPlayDialog,d=e.proxy,h=e.streamId,C=e.userDefineRecordId,this.logger.update({sdkAppId:A,userId:i}),this.logger.info("".concat(cs,".enterRoom with params: "),e,t),d&&(this._networkProxy=d),!(A&&i&&o))return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),I={sdkAppId:A,userId:i,userSig:o,roomId:r,strRoomId:s,role:ae[a],scene:ce[t],autoReceiveAudio:this._autoRecvAudio,autoReceiveVideo:this._autoRecvVideo,frameWorkType:this._frameWorkType,component:this._component,language:this._language},I=g?n(n({},I),{privateMapKey:g}):I,I=u?n(n({},I),{businessInfo:u}):I,B=l||this._enableAutoPlayDialog,I=he(B)?n(n({},I),{enableAutoPlayDialog:B}):I,I=this._networkProxy?n(n({},I),{proxy:this._networkProxy}):I,I=h?n(n({},I),{streamId:h}):I,I=C?n(n({},I),{userDefineRecordId:C}):I,I=void 0!==this._latencyLevel?n(n({},I),{latencyLevel:this._latencyLevel}):I,E=ue(),[4,this._trtc.enterRoom(I)];case 2:return c.sent(),this._hasJoinedRoom=!0,p=ue()-E,this.emit("onEnterRoom",p),[3,4];case 3:return Q=c.sent(),f=(f=this._transformTRTCErrorCode(Q,"enterRoom"))<0?f:-1,this.emit("onEnterRoom",f),this._callFunctionErrorManage(Q,"enterRoom"),[3,4];case 4:return[3,6];case 5:this._emitError(pr),c.label=6;case 6:return[2]}}))}))},i.prototype.exitRoom=function(){return a(this,void 0,Promise,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this.logger.info("".concat(cs,".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._isVideoPublish=!0,this._isAudioPublish=!0,this.emit("onExitRoom",or.exitRoom),[3,3];case 2:return e=t.sent(),this._callFunctionErrorManage(e,"exitRoom"),[3,3];case 3:return[2]}}))}))},i.prototype.switchRole=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".switchRole with param: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._trtc.switchRole(ae[e])];case 2:return A.sent(),this.emit("onSwitchRole",0,"switch role success, role = ".concat(e,", ").concat(ae[e])),[3,4];case 3:return t=A.sent(),this.emit("onSwitchRole",null==t?void 0:t.getCode(),t.message),[3,4];case 4:return[2]}}))}))},i.prototype.setDefaultStreamRecvMode=function(e,t){return a(this,void 0,void 0,(function(){return c(this,(function(A){return this.logger.info("".concat(cs,".setDefaultStreamRecvMode with param: "),{autoRecvAudio:e,autoRecvVideo:t}),he(e)&&(this._autoRecvAudio=e),he(t)&&(this._autoRecvVideo=t),[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 a(this,void 0,void 0,(function(){var e;return c(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!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestVideo=function(){return a(this,void 0,void 0,(function(){var e;return c(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!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalScreen=function(){return a(this,void 0,void 0,(function(){var e;return c(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!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateRemoteVideo=function(e,t){return a(this,void 0,void 0,(function(){var A;return c(this,(function(i){switch(i.label){case 0:if(!this._hasJoinedRoom||this._isExitingRoom)return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.updateRemoteVideo(this._generateRemoteVideoData(e,t))];case 2:return i.sent(),[3,4];case 3:if((A=i.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT)throw A;return[3,4];case 4:return[2]}}))}))},i.prototype.startLocalPreview=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(this,void 0,Promise,(function(){var t,A,i,r,n;return c(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(cs,".startLocalPreview with params: "),e),1===u([],e,!0).length?A=u([],e,!0)[0]:2===u([],e,!0).length&&(n=u([],e,!0),t=n[0],A=n[1]),le(t)||(this._setIsMobile(!0),this._setIsFrontCamera(t)),this._setLocalView(A),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 a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(cs,".updateLocalView with param: "),e),this._setLocalView(e),[4,this._updateLocalVideo()];case 1:return t.sent(),[2]}}))}))},i.prototype.stopLocalPreview=function(){return a(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(cs,".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(cs," 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),a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".muteLocalVideo with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setIsVideoPublish(!e),[4,this._updateLocalVideo()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"muteLocalVideo"),[3,4];case 4:return[2]}}))}))},i.prototype.startRemoteView=function(t,A,i){return a(this,void 0,void 0,(function(){var r,n;return c(this,(function(s){switch(s.label){case 0:this.logger.info("".concat(cs,".startRemoteView with params: "),t,A,i),s.label=1;case 1:if(s.trys.push([1,9,,10]),this._setRemoteStreamConfig(t,i,{view:A,small:i===e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall}),!this._remoteStreamMap.get("".concat(t,"_").concat(this._getTRTCStreamType(i))))return[2];s.label=2;case 2:return s.trys.push([2,4,,8]),[4,this._trtc.startRemoteVideo(this._generateRemoteVideoData(t,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(t,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,t,A){return a(this,void 0,void 0,(function(){return c(this,(function(i){switch(i.label){case 0:return this.logger.info("".concat(cs,".updateRemoteView with params: "),e,t,A),this._setRemoteStreamConfig(e,A,{view:t}),this._remoteStreamMap.get("".concat(e,"_").concat(this._getTRTCStreamType(A)))?[4,this._updateRemoteVideo(e,A)]:[2];case 1:return i.sent(),[2]}}))}))},i.prototype.stopRemoteView=function(e,t){return a(this,void 0,void 0,(function(){var A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".stopRemoteView with params: "),e,t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._trtc.stopRemoteVideo({userId:e,streamType:this._getTRTCStreamType(t)})];case 2:return i.sent(),[3,4];case 3:return A=i.sent(),this._callFunctionErrorManage(A,"stopRemoteView"),[3,4];case 4:return[2]}}))}))},i.prototype.stopAllRemoteView=function(){return a(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(cs,".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]}}))}))},i.prototype.setVideoEncoderParam=function(t){return a(this,void 0,void 0,(function(){var A,i;return c(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(cs,".setVideoEncoderParam with params: "),t),o.label=1;case 1:return o.trys.push([1,4,,5]),A=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,t),this._setVideoProfile(A),[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 a(this,void 0,void 0,(function(){var t,A,i=this;return c(this,(function(o){return this.logger.info("".concat(cs,".setNetworkQosParam with params: "),e),t=e.preference,A=this._getTRTCQosPreference(t),this._setQosPreference(A),this._setScreenShareParams({qosPreference:A}),[2,new Promise((function(e,t){Promise.all([i._updateLocalVideo(),i._updateLocalScreen()]).then((function(){e(!0)})).catch((function(e){i._callFunctionErrorManage(e,"setNetworkQosParam"),t(e)}))}))]}))}))},i.prototype.setLocalRenderParams=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".setLocalRenderParams with params: "),e),Object.assign(this._localRenderParams,e),A.label=1;case 1:return A.trys.push([1,4,,5]),[4,this._updateLocalVideo()];case 2:return A.sent(),[4,this._updateLocalTestVideo()];case 3:return A.sent(),[3,5];case 4:return t=A.sent(),this._callFunctionErrorManage(t,"setLocalRenderParams"),[3,5];case 5:return[2]}}))}))},i.prototype.setVideoEncoderMirror=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".setVideoEncoderMirror with params: "),e),this._encoderMirror=e,A.label=1;case 1:return A.trys.push([1,3,,4]),[4,this._updateLocalVideo()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setVideoEncoderMirror"),[3,4];case 4:return[2]}}))}))},i.prototype.setRemoteRenderParams=function(e,t,A){return a(this,void 0,void 0,(function(){var i;return c(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(cs,".setRemoteRenderParams with params: "),e,t,A),o.label=1;case 1:return o.trys.push([1,3,,4]),this._setRemoteStreamConfig(e,t,A),[4,this._updateRemoteVideo(e,t)];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 a(this,void 0,void 0,(function(){var e;return c(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!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype._updateLocalTestAudio=function(){return a(this,void 0,void 0,(function(){var e;return c(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!==o.default.ERROR_CODE.OPERATION_ABORT)throw e;return[3,3];case 3:return[2]}}))}))},i.prototype.startLocalAudio=function(t){return void 0===t&&(t=e.TRTCAudioQuality.TRTCAudioQualityDefault),a(this,void 0,void 0,(function(){var A,i,r;return c(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(cs,".startLocalAudio with params: "),t),A=this._getTRTCAudioQuality(t),n.label=1;case 1:n.trys.push([1,9,,10]),this._setAudioProfile(A),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(cs," startLocalAudio error: ").concat(r)),this._callFunctionErrorManage(r,"startLocalAudio"),[3,10];case 10:return[2]}}))}))},i.prototype.stopLocalAudio=function(){return a(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(cs,".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]}}))}))},i.prototype.muteLocalAudio=function(e){return void 0===e&&(e=!1),a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".muteLocalAudio with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setIsAudioPublish(!e),[4,this._updateLocalAudio()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"muteLocalAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.setAudioCaptureVolume=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".setAudioCaptureVolume with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._setCaptureVolume(e),[4,this._updateLocalAudio()];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setAudioCaptureVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioCaptureVolume=function(){return this.logger.info("".concat(cs,".getAudioCaptureVolume")),this._getCaptureVolume()},i.prototype.setAudioPlayoutVolume=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".setAudioPlayoutVolume with params: "),e),A.label=1;case 1:return A.trys.push([1,3,,4]),this._playoutVolume=e,[4,this._trtc.setRemoteAudioVolume("*",e)];case 2:return A.sent(),[3,4];case 3:return t=A.sent(),this._callFunctionErrorManage(t,"setAudioPlayoutVolume"),[3,4];case 4:return[2]}}))}))},i.prototype.getAudioPlayoutVolume=function(){return this.logger.info("".concat(cs,".getAudioPlayoutVolume")),this._playoutVolume},i.prototype.muteRemoteAudio=function(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".muteRemoteAudio with params: "),e,t),i.label=1;case 1:return i.trys.push([1,3,,4]),e?[4,this._trtc.muteRemoteAudio(e,t)]:(this._emitError(pr),[2]);case 2:return i.sent(),[3,4];case 3:return A=i.sent(),this._callFunctionErrorManage(A,"muteRemoteAudio"),[3,4];case 4:return[2]}}))}))},i.prototype.muteAllRemoteAudio=function(e){this.logger.info("".concat(cs,".muteAllRemoteAudio with params: "),e);try{this._trtc.muteRemoteAudio("*",e)}catch(t){this._callFunctionErrorManage(t,"muteAllRemoteAudio")}},i.prototype.muteRemoteVideoStream=function(e,t,A){return a(this,void 0,void 0,(function(){var i;return c(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(cs,".muteRemoteVideoStream with params: "),e,t,A),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._trtc.updateRemoteVideo({userId:e,mute:t,streamType:this._getTRTCStreamType(A)})];case 2:return o.sent(),[3,4];case 3:return i=o.sent(),this._callFunctionErrorManage(i,"muteRemoteVideoStream"),[3,4];case 4:return[2]}}))}))},i.prototype.muteAllRemoteVideoStreams=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".muteAllRemoteVideoStreams with params: "),e),A.label=1;case 1:return A.trys.push([1,6,,7]),e?[4,this._trtc.callExperimentalAPI("pauseRemotePlayer",{userId:"*"})]:[3,3];case 2:return A.sent(),[3,5];case 3:return[4,this._trtc.callExperimentalAPI("resumeRemotePlayer",{userId:"*"})];case 4:A.sent(),A.label=5;case 5:return[3,7];case 6:return t=A.sent(),this._callFunctionErrorManage(t,"muteAllRemoteVideoStreams"),[3,7];case 7:return[2]}}))}))},i.prototype.setRemoteAudioVolume=function(e,t){this.logger.info("".concat(cs,".setRemoteAudioVolume with params: "),e,t);try{this._trtc.setRemoteAudioVolume(e,t)}catch(A){this._callFunctionErrorManage(A,"setRemoteAudioVolume")}},i.prototype.enableAudioVolumeEvaluation=function(e){this.logger.info("".concat(cs,".enableAudioVolumeEvaluation with params: "),e);try{this._trtc.enableAudioVolumeEvaluation(e)}catch(t){this._callFunctionErrorManage(t,"enableAudioVolumeEvaluation")}},i.prototype.enableSmallVideoStream=function(t,A){return a(this,void 0,Promise,(function(){var i;return c(this,(function(o){switch(o.label){case 0:return this.logger.info("".concat(cs,".enableSmallVideoStream with params: "),t,A),t?(i=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,A),this._setSmallStreamVideoProfile(i)):this._setSmallStreamVideoProfile(void 0),[4,this._updateLocalVideo()];case 1:return o.sent(),[2]}}))}))},i.prototype.snapshotVideo=function(t,A){var i="";return i=""===t&&A===e.TRTCVideoStreamType.TRTCVideoStreamTypeBig?this._trtc.getVideoSnapshot():""===t&&A===e.TRTCVideoStreamType.TRTCVideoStreamTypeSub?this._trtc.getVideoSnapshot({streamType:this._getTRTCStreamType(A)}):this._trtc.getVideoSnapshot({userId:t,streamType:this._getTRTCStreamType(A)}),this.emit("onSnapshotComplete",t,A,i),i},i.prototype.startScreenShare=function(t,A,i){return a(this,void 0,void 0,(function(){var r,n,s,a,g,u;return c(this,(function(c){switch(c.label){case 0:this.logger.info("".concat(cs,".startScreenShare with params: "),t,A,i),c.label=1;case 1:return c.trys.push([1,3,,4]),n=(r=i||{}).screenAudio,s=void 0!==n&&n,a=r.videoTrack,g=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,i),this._setScreenShareParams({view:t,profile:g,systemAudio:s,videoTrack:a}),[4,this._trtc.startScreenShare(this._getScreenShareParams())];case 2:return c.sent(),this._isSharingScreen=!0,[3,4];case 3:if((u=c.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(t){return a(this,void 0,void 0,(function(){var A,i;return c(this,(function(o){switch(o.label){case 0:this.logger.info("".concat(cs,".setSubStreamEncoderParam with params: "),t),A=this._getTRTCVideoProfile(e.TRTCVideoStreamType.TRTCVideoStreamTypeSub,t),this._setScreenShareParams({profile:A}),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 a(this,void 0,Promise,(function(){var e;return c(this,(function(t){switch(t.label){case 0:this.logger.info("".concat(cs,".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]}}))}))},i.prototype._startPublishVideoTrack=function(e){var t=e.videoTrack;return a(this,void 0,void 0,(function(){var e;return c(this,(function(A){switch(A.label){case 0:this._cameraVideoTrack=t,A.label=1;case 1:A.trys.push([1,6,,7]),A.label=2;case 2:return A.trys.push([2,4,,5]),[4,this._trtc.startLocalVideo(this._generateLocalVideoData())];case 3:return A.sent(),[3,5];case 4:throw A.sent();case 5:return[3,7];case 6:return e=A.sent(),this._callFunctionErrorManage(e,"startPublishVideoTrack"),[3,7];case 7:return[2]}}))}))},i.prototype._stopPublishVideoTrack=function(){return a(this,void 0,void 0,(function(){return c(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(Qr)},i.prototype.pauseScreenCapture=function(){this._emitError(Qr)},i.prototype.resumeScreenCapture=function(){this._emitError(Qr)},i.prototype.getScreenCaptureSources=function(){this._emitError(Qr)},i.prototype.selectScreenCaptureTarget=function(){this._emitError(Qr)},i.prototype.getCameraDevicesList=function(){return a(this,void 0,Promise,(function(){var e,t,A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".getCameraDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getCameraList()];case 2:return e=i.sent(),t=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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getCameraDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentCameraDevice=function(e){var t;return a(this,void 0,Promise,(function(){var A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".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(t){return t.deviceId===e}))||{},[3,5];case 4:throw A=i.sent(),this._currentCameraId=null===(t=this._currentCamera)||void 0===t?void 0:t.cameraId,this._callFunctionErrorManage(A,"setCurrentCameraDevice"),A;case 5:return[2]}}))}))},i.prototype.getCurrentCameraDevice=function(){this.logger.info("".concat(cs,".getCurrentCameraDevice"));var e=this._currentCamera,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new R(t,A,i,A,o)},i.prototype.isFrontCamera=function(){return this._getIsFrontCamera()},i.prototype.switchCamera=function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return this.logger.info("".concat(cs,".switchCamera with params: "),e),this._setIsFrontCamera(e),[4,this._updateLocalVideo()];case 1:return t.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 a(this,void 0,void 0,(function(){var t,A,i,o,r;return c(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),t=e.enable,A=e.type,i=e.blurLevel,o=e.imagePath,t?this._isVirtualBackground?A!==ne?[3,2]:[4,this._trtc.updatePlugin(oe,{type:A,blurLevel:i})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return A!==se?[3,4]:[4,this._trtc.updatePlugin(oe,{type:A,src:o})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._trtc.startPlugin(oe,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(oe),this._isVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw r=s.sent(),this.logger.error("".concat(cs,".setVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.setTestVirtualBackground=function(e){return a(this,void 0,void 0,(function(){var t,A,i,o,r;return c(this,(function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),t=e.enable,A=e.type,i=e.blurLevel,o=e.imagePath,t?this._isTestVirtualBackground?A!==ne?[3,2]:[4,this._testTrtc.updatePlugin(oe,{type:A,blurLevel:i})]:[3,5]:[3,8];case 1:s.sent(),s.label=2;case 2:return A!==se?[3,4]:[4,this._testTrtc.updatePlugin(oe,{type:A,src:o})];case 3:s.sent(),s.label=4;case 4:return[3,7];case 5:return[4,this._testTrtc.startPlugin(oe,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(oe),this._isTestVirtualBackground=!1,s.label=9;case 9:return[3,11];case 10:throw r=s.sent(),this.logger.error("".concat(cs,".setTestVirtualBackground fail: "),r),r;case 11:return[2]}}))}))},i.prototype.useVirtualBackground=function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:A.VirtualBackground,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:A.VirtualBackground,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},i.prototype.setBeautyStyle=function(e,t,A,i){return a(this,void 0,void 0,(function(){return c(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._trtc,this._isBeautyEnabled,e,t,A,i,!1)];case 1:return o.sent(),[2]}}))}))},i.prototype.setTestBeautyStyle=function(e,t,A,i){return a(this,void 0,void 0,(function(){return c(this,(function(o){switch(o.label){case 0:return[4,this._handleBeautyStyleParam(this._testTrtc,this._isTestBeautyEnabled,e,t,A,i,!0)];case 1:return o.sent(),[2]}}))}))},i.prototype.useBeautyStyle=function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return this._trtc?[4,this._trtc.use({plugin:In,assetsPath:e})]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._testTrtc?[4,this._testTrtc.use({plugin:In,assetsPath:e})]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},i.prototype._handleBeautyStyleParam=function(e,t,A,i,o,r,n){return a(this,void 0,void 0,(function(){var A,s,a,g,u;return c(this,(function(c){switch(c.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");c.label=1;case 1:return c.trys.push([1,8,,9]),s=o/9,a=r/9,0===(A=i/9)&&0===s&&0===a?[4,e.stopPlugin(re)]:[3,3];case 2:return c.sent(),n?this._isTestBeautyEnabled=!1:this._isBeautyEnabled=!1,[3,7];case 3:return g={beauty:A,brightness:s,ruddy:a},t?[3,5]:[4,e.startPlugin(re,g)];case 4:return c.sent(),n?this._isTestBeautyEnabled=!0:this._isBeautyEnabled=!0,[3,7];case 5:return[4,e.updatePlugin(re,g)];case 6:c.sent(),c.label=7;case 7:return[3,9];case 8:throw u=c.sent(),n?this.logger.error("".concat(cs,".").concat("setTestBeautyStyle"," fail: "),u):this.logger.error("".concat(cs,".").concat("setBeautyStyle"," fail: "),u),u;case 9:return[2]}}))}))},i.prototype._resetBeautyStyle=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return this._isBeautyEnabled?[4,this._trtc.stopPlugin(re)]:[3,2];case 1:e.sent(),this._isBeautyEnabled=!1,e.label=2;case 2:return this._isTestBeautyEnabled?[4,this._testTrtc.stopPlugin(re)]:[3,4];case 3:e.sent(),this._isTestBeautyEnabled=!1,e.label=4;case 4:return[2]}}))}))},i.prototype.getMicDevicesList=function(){return a(this,void 0,Promise,(function(){var e,t,A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".getMicDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getMicrophoneList()];case 2:return e=i.sent(),t=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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getMicDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentMicDevice=function(e){var t;return a(this,void 0,Promise,(function(){var A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".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(t){return t.deviceId===e}))||{},[3,5];case 4:throw A=i.sent(),this._setCurrentMicrophoneId(null===(t=this._currentMicrophone)||void 0===t?void 0:t.deviceId),this._callFunctionErrorManage(A,"setCurrentMicDevice"),A;case 5:return[2]}}))}))},i.prototype.getCurrentMicDevice=function(){this.logger.info("".concat(cs,".getCurrentMicDevice"));var e=this._currentMicrophone,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new R(t,A,i,A,o)},i.prototype.getSpeakerDevicesList=function(){return a(this,void 0,Promise,(function(){var e,t,A;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".getSpeakerDevicesList")),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.default.getSpeakerList()];case 2:return e=i.sent(),t=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(t)];case 5:return A=i.sent(),this._callFunctionErrorManage(A,"getSpeakerDevicesList"),[2,Promise.resolve([])];case 6:return[2]}}))}))},i.prototype.setCurrentSpeakerDevice=function(e){return a(this,void 0,Promise,(function(){var t;return c(this,(function(A){switch(A.label){case 0:this.logger.info("".concat(cs,".setCurrentSpeakerDevice with params: "),{speakerId:e}),A.label=1;case 1:return A.trys.push([1,3,,4]),e?[4,o.default.setCurrentSpeaker(e)]:[2,!1];case 2:return A.sent(),this._setCurrentSpeakerId(e),this._currentSpeaker=this._speakerList.find((function(t){return t.deviceId===e}))||{},[3,4];case 3:throw t=A.sent(),this._callFunctionErrorManage(t,"setCurrentSpeakerDevice"),t;case 4:return[2]}}))}))},i.prototype.getCurrentSpeakerDevice=function(){this.logger.info("".concat(cs,".getCurrentSpeakerDevice"));var e=this._currentSpeaker,t=e.deviceId,A=e.label,i=e.kind,o=e.groupId;return new R(t,A,i,A,o)},i.prototype.startCameraDeviceTest=function(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(A){switch(A.label){case 0:if(this.logger.info("".concat(cs,".startCameraDeviceTest with params: "),e),!e)return[2];this._setLocalTestView(e),A.label=1;case 1:return A.trys.push([1,3,,7]),[4,this._testTrtc.startLocalVideo(this._generateLocalTestVideoData())];case 2:return A.sent(),[3,7];case 3:return(t=A.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._updateLocalTestVideo()];case 4:return A.sent(),[3,6];case 5:throw this._callFunctionErrorManage(t,"startCameraDeviceTest"),t;case 6:return[3,7];case 7:return[2]}}))}))},i.prototype.stopCameraDeviceTest=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(cs,".stopCameraDeviceTest")),this._setLocalTestView(null),[4,this._testTrtc.stopLocalVideo()];case 1:return e.sent(),[2]}}))}))},i.prototype.startMicDeviceTest=function(e){return a(this,void 0,void 0,(function(){var t,A=this;return c(this,(function(i){switch(i.label){case 0:this.logger.info("".concat(cs,".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(t=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(t,"startMicDeviceTest"),t;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 t=e.userId,i=e.volume;""===t&&A.emit("onTestMicVolume",i)}))})),[4,this._testTrtc.enableAudioVolumeEvaluation(e)];case 8:return i.sent(),[2]}}))}))},i.prototype.stopMicDeviceTest=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return this.logger.info("".concat(cs,".stopMicDeviceTest")),[4,this._testTrtc.stopLocalAudio()];case 1:return e.sent(),[2]}}))}))},i.prototype.callExperimentalAPI=function(e){return a(this,void 0,void 0,(function(){var t,A,i;return c(this,(function(o){switch(o.label){case 0:if(this.logger.info("".concat(cs,".callExperimentalAPI"),e),(t=Ce(e))===e)return[2];if(A=t.api,i=t.params,!A||!i)return[2];o.label=1;case 1:switch(o.trys.push([1,21,,22]),A){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,19];case 2:return this._handleSetFrameWork(i),[3,20];case 3:return this._echoCancellation=Boolean(i.enable),[3,20];case 4:return this._noiseSuppression=Boolean(i.enable),[3,20];case 5:return this._autoGainControl=Boolean(i.enable),[3,20];case 6:return this._handleKeyMetricsStats(i),[3,20];case 7:return this._networkProxy=i,[3,20];case 8:return[4,this.setVirtualBackground(i)];case 9:return o.sent(),[3,20];case 10:return[4,this.setTestVirtualBackground(i)];case 11:return o.sent(),[3,20];case 12:return[4,this.setTestBeautyStyle(i.style,i.beautyLevel,i.whitenessLevel,i.ruddinessLevel)];case 13:return o.sent(),[3,20];case 14:return this._setVideoEncodeParamEx(i),[3,20];case 15:return this._enableAutoPlayDialog=Boolean(i.enable),[3,20];case 16:return this._latencyLevel=i.latencyLevel,[3,20];case 17:return[4,this._switchPlaybackQuality(i)];case 18:return o.sent(),[3,20];case 19:return[3,20];case 20:return[3,22];case 21:throw o.sent();case 22:return[2]}}))}))},i.prototype._handleSetFrameWork=function(e){var t=e.frameWork,A=e.component,i=e.language;de(t)&&(this._frameWorkType=t),de(A)&&(this._component=A),de(i)&&(this._language=i)},i.prototype._handleKeyMetricsStats=function(e){var t=e.key,A=e.opt,i=e.value,r=e.version,n=A===ge;o.default._addKVStat({type:A,key:t,value:i,version:r,useUV:n,base:100})},i.prototype._setVideoEncodeParamEx=function(t){return a(this,void 0,void 0,(function(){return c(this,(function(A){switch(A.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 A.sent(),[3,6];case 3:return[4,this.setSubStreamEncoderParam(t)];case 5:return[3,6];case 6:return[2]}}))}))},i.prototype._switchPlaybackQuality=function(t){return a(this,void 0,void 0,(function(){var A,i,o,r,s,a,g,u,l;return c(this,(function(c){switch(c.label){case 0:if(i=(A=t||{}).quality,o=A.stream_list,r=void 0===o?[]:o,!i||0===r.length)return[2];for(s=null,a=null,g=0,u=r;g<u.length;g++)(l=u[g]).name===i?s=l:a=this._remoteStreamConfig.get("".concat(l.user_id,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)));return a&&s&&a.view&&s.user_id?[4,this.setRemoteRenderParams(s.user_id,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,n(n({},a.option),{fillMode:this._getTRTCCloudVideoFillMode(a.option.fillMode),mirrorType:this._getTRTCCloudMirrorType(a.option.mirrorType),view:a.view}))]:[2];case 1:return c.sent(),[4,this.startRemoteView(s.user_id,a.view,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 2:return c.sent(),[4,this.stopRemoteView(a.userId,e.TRTCVideoStreamType.TRTCVideoStreamTypeBig)];case 3:return c.sent(),[4,this._trtc.muteRemoteAudio(a.userId,!0)];case 4:return c.sent(),[4,this._trtc.muteRemoteAudio(s.user_id,!1)];case 5:return c.sent(),this._remoteStreamConfig.delete("".concat(a.userId,"_").concat(this._getTRTCStreamType(e.TRTCVideoStreamType.TRTCVideoStreamTypeBig))),[2]}}))}))},i.prototype._emitError=function(e){e&&this.emit&&this.emit(ee,e.code,e.message)},i.prototype._emitWarning=function(e){this.emit&&this.emit(te,e)},i.prototype._transformTRTCServerError=function(e){return-8===e.extraCode?Er:0===String(e.extraCode).indexOf("70")?0-e.extraCode:void 0},i.prototype._transformTRTCInvalidOperationError=function(e,t){return"enterRoom"!==t||5104!==e.extraCode&&5998!==e.code?e.code:cr},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,t){var A=this._isCameraError(t),i=this._isMicError(t);switch(e.extraCode){case 5301:case 5305:case 5306:case 5307:case 5308:case 5309:if(A)return gr;if(i)return hr;break;case 5302:if(A)return ur;if(i)return Cr;break;case 5303:if(A)return dr;if(i)return Br;break;case 5304:if(A)return lr;if(i)return Ir}},i.prototype._transformTRTCUnKnowError=function(e,t){var A=this._isCameraError(t),i=this._isMicError(t);return A?gr:i?hr:e.code},i.prototype._transformTRTCErrorCode=function(e,t){var A=null==e?void 0:e.code;if(e&&e.code)switch(e.code){case o.default.ERROR_CODE.DEVICE_ERROR:A=this._transformTRTCDeviceError(e,t);break;case o.default.ERROR_CODE.SERVER_ERROR:A=this._transformTRTCServerError(e);break;case o.default.ERROR_CODE.INVALID_OPERATION:case o.default.ERROR_CODE.OPERATION_ABORT:A=this._transformTRTCInvalidOperationError(e,t);break;case o.default.ERROR_CODE.UNKNOWN_ERROR:A=this._transformTRTCUnKnowError(e,t)}return A},i.prototype._callFunctionErrorManage=function(e,t){if(!e||e.code!==o.default.ERROR_CODE.OPERATION_ABORT){this.logger.warn("(".concat(t,") failed - ").concat(e.code," - ").concat(e.message));var A=this._transformTRTCErrorCode(e,t);this.emit(ee,A,e.message)}},i.prototype._getTRTCResolution=function(t){var A=(e.TRTCVideoResolution[t]||"").split("_");return{width:+(A.length>1&&A[1]),height:+(A.length>2&&A[2])}},i.prototype._getTRTCVideoProfile=function(t,A){void 0===A&&(A={});var i=A.videoWidth,o=A.videoHeight,r=A.videoResolution,n=A.videoFps,s=A.videoBitrate,a=A.resMode,c=A.resolutionMode,g={};switch(t){case e.TRTCVideoStreamType.TRTCVideoStreamTypeSub:g=this._defaultScreenProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall:g=this._defaultSmallVideoProfile;break;case e.TRTCVideoStreamType.TRTCVideoStreamTypeBig:default:g=this._defaultVideoProfile}if(le(r))le(i)||(g.width=i),le(o)||(g.height=o);else{var u=this._getTRTCResolution(r);g.width=u.width,g.height=u.height}if(!le(a)&&a===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait||!le(c)&&c===e.TRTCVideoResolutionMode.TRTCVideoResolutionModePortrait){var l=g.height,d=g.width;g.width=l,g.height=d}return n&&(g.frameRate=n),s&&(g.bitrate=s),g},i.prototype._getTRTCStreamType=function(t){var A;return((A={})[e.TRTCVideoStreamType.TRTCVideoStreamTypeBig]=o.default.TYPE.STREAM_TYPE_MAIN,A[e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall]=o.default.TYPE.STREAM_TYPE_MAIN,A[e.TRTCVideoStreamType.TRTCVideoStreamTypeSub]=o.default.TYPE.STREAM_TYPE_SUB,A)[t]},i.prototype._getTRTCFillMode=function(t){var A;return((A={})[e.TRTCVideoFillMode.TRTCVideoFillMode_Fill]=ir.COVER,A[e.TRTCVideoFillMode.TRTCVideoFillMode_Fit]=ir.CONTAIN,A)[t]},i.prototype._getTRTCCloudVideoFillMode=function(t){var A;return((A={})[ir.COVER]=e.TRTCVideoFillMode.TRTCVideoFillMode_Fill,A[ir.CONTAIN]=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit,A)[t]},i.prototype._getTRTCCloudMirrorType=function(t){return!0===t?e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable:e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable},i.prototype._getLocalRenderMirror=function(t){var A;return t===e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto?!this._getIsMobile()||this._getIsFrontCamera():((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A)[t]},i.prototype._getTRTCLocalMirror=function(e,t){var A=this._getLocalRenderMirror(e);return le(t)?!!A&&"both":A&&t?"both":A&&!t?"view":!A&&t?"publish":!(!A&&!t)&&"view"},i.prototype._getTRTCRemoteMirror=function(t){var A;return((A={})[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Auto]=!1,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Enable]=!0,A[e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable]=!1,A)[t]},i.prototype._getTRTCQosPreference=function(t){var A;return((A={})[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceSmooth]=o.default.TYPE.QOS_PREFERENCE_SMOOTH,A[e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear]=o.default.TYPE.QOS_PREFERENCE_CLEAR,A)[t]},i.prototype._getTRTCAudioQuality=function(t){var A;return((A={})[e.TRTCAudioQuality.TRTCAudioQualitySpeech]=o.default.TYPE.AUDIO_PROFILE_STANDARD,A[e.TRTCAudioQuality.TRTCAudioQualityDefault]=o.default.TYPE.AUDIO_PROFILE_STANDARD,A[e.TRTCAudioQuality.TRTCAudioQualityMusic]=o.default.TYPE.AUDIO_PROFILE_HIGH_STEREO,A)[t]},i.prototype._getTRTCCloudDeviceType=function(t){return{camera:e.TRTCDeviceType.TRTCDeviceTypeCamera,microphone:e.TRTCDeviceType.TRTCDeviceTypeMic,speaker:e.TRTCDeviceType.TRTCDeviceTypeSpeaker}[t]},i.prototype._getTRTCCloudDeviceState=function(t){return{add:e.TRTCDeviceState.TRTCDeviceStateAdd,remove:e.TRTCDeviceState.TRTCDeviceStateRemove,active:e.TRTCDeviceState.TRTCDeviceStateActive}[t]},i.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]},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 he(this._echoCancellation)&&(e.option.echoCancellation=this._echoCancellation),he(this._autoGainControl)&&(e.option.autoGainControl=this._autoGainControl),he(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,t){return Ee(this._remoteStreamConfig.get("".concat(e,"_").concat(this._getTRTCStreamType(t))))},i.prototype._addTRTCEvents=function(){var t=this;this._trtc.on(o.default.EVENT.ERROR,(function(e){e&&t.emit("onError",e.code,e.message)})),this._trtc.on(o.default.EVENT.REMOTE_USER_ENTER,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserEnterRoom",e.userId)})),this._trtc.on(o.default.EVENT.REMOTE_USER_EXIT,(function(e){(null==e?void 0:e.userId)&&t.emit("onRemoteUserLeaveRoom",e.userId)})),this._trtc.on(o.default.EVENT.REMOTE_AUDIO_AVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!0)})),this._trtc.on(o.default.EVENT.REMOTE_AUDIO_UNAVAILABLE,(function(e){(null==e?void 0:e.userId)&&t.emit("onUserAudioAvailable",e.userId,!1)})),this._trtc.on(o.default.EVENT.REMOTE_VIDEO_AVAILABLE,(function(e){t._emitVideoAvailable(e,!0)})),this._trtc.on(o.default.EVENT.REMOTE_VIDEO_UNAVAILABLE,(function(e){t._emitVideoAvailable(e,!1)})),this._trtc.on(o.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(o.default.EVENT.KICKED_OUT,(function(e){var A={banned:or.banned,room_disband:or.roomDisband};de(A[e.reason])&&t.emit("onExitRoom",A[e.reason])})),this._trtc.on(o.default.EVENT.NETWORK_QUALITY,(function(e){var A=e.uplinkNetworkQuality,i=e.downlinkNetworkQuality,o=new N("",t._getTRTCCloudQuality(A)),r=[];t._remoteStatisticsUserIdList.length>0&&(r=t._remoteStatisticsUserIdList.map((function(e){return new N(e,t._getTRTCCloudQuality(i))}))),t.emit("onNetworkQuality",o,r)})),this._trtc.on(o.default.EVENT.AUTOPLAY_FAILED,(function(e){t.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 A=new Uint8Array(e.data),i="",o=0;o<A.length;o++)i+=String.fromCharCode(A[o]);e.stringData=i}t.emit("onRecvSEIMsg",e.userId,JSON.stringify(e))})),this._trtc.on(o.default.EVENT.STATISTICS,(function(A){var i,o=A.rtt,r=A.upLoss,n=A.downLoss,s=A.bytesSent,a=A.bytesReceived,c=A.localStatistics,g=A.remoteStatistics;t._remoteStatisticsUserIdList=g.map((function(e){return e.userId}));var u={big:e.TRTCVideoStreamType.TRTCVideoStreamTypeBig,small:e.TRTCVideoStreamType.TRTCVideoStreamTypeSmall,sub:e.TRTCVideoStreamType.TRTCVideoStreamTypeSub},l=(null===(i=c.video)||void 0===i?void 0:i.length)>0?c.video.map((function(e){var t=new G;return t.width=e.width,t.height=e.height,t.frameRate=e.frameRate,t.videoBitrate=e.bitrate,t.audioBitrate=c.audio.bitrate||0,t.streamType=u[e.videoType],t})):[];if(0===l.length&&c.audio.bitrate>0){var d=new G;d.audioBitrate=c.audio.bitrate||0,l.push(d)}var h=[];g.forEach((function(e){var t=[],A=e.userId,i=e.audio.bitrate;if(e.video&&e.video.forEach((function(e){var o=new V;o.userId=A,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],t.push(o)})),0===t.length){var o=new V;o.userId=A,o.audioBitrate=i||0,t.push(o)}h.push.apply(h,t)}));var C=new x;C.upLoss=r,C.downLoss=n,C.rtt=o,C.sentBytes=s,C.receivedBytes=a,C.localStatisticsArray=l,C.localStatisticsArraySize=l.length,C.remoteStatisticsArray=h,C.remoteStatisticsArraySize=h.length,t.emit("onStatistics",C)})),this._trtc.on(o.default.EVENT.SCREEN_SHARE_STOPPED,(function(){t.emit("onScreenCaptureStopped",0),t._clearScreenShareParams(),t._isSharingScreen=!1})),this._trtc.on(o.default.EVENT.PUBLISH_STATE_CHANGED,(function(A){var i=A.mediaType;"started"===A.state&&("audio"===i?t.emit("onSendFirstLocalAudioFrame"):"video"===i?t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeBig):"screen"===i&&t.emit("onSendFirstLocalVideoFrame",e.TRTCVideoStreamType.TRTCVideoStreamTypeSub))})),this._trtc.on(o.default.EVENT.FIRST_VIDEO_FRAME,(function(e){var A=e.userId,i=e.streamType,o=e.width,r=e.height;t.emit("onFirstVideoFrame",A,i,o,r)})),this._trtc.on(o.default.EVENT.AUDIO_PLAY_STATE_CHANGED,(function(e){var A=e.userId;"PLAYING"===e.state&&t.emit("onFirstAudioFrame",A)})),this._trtc.on(o.default.EVENT.DEVICE_CHANGED,(function(e){var A=e.type,i=e.device,o=e.action,r=i.deviceId;if("active"===o){switch(A){case"camera":t._currentCameraId=r,t._currentCamera=i;break;case"microphone":t._currentMicrophoneId=r,t._currentMicrophone=i;break;case"speaker":t._currentSpeakerId=r,t._currentSpeaker=i}t.emitOnDeviceChange(r,t._getTRTCCloudDeviceType(A),t._getTRTCCloudDeviceState(o))}})),this._trtc.on(o.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(o.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"))}))},i.prototype._removeTRTCEvents=function(){this._trtc.off("*")},i.prototype._emitVideoAvailable=function(e,t){var A=e.userId,i=e.streamType;t?this._remoteStreamMap.set("".concat(A,"_").concat(i),!0):this._remoteStreamMap.delete("".concat(A,"_").concat(i)),i===o.default.TYPE.STREAM_TYPE_SUB?A&&this.emit("onUserSubStreamAvailable",A,t):A&&this.emit("onUserVideoAvailable",A,t)},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 t=e.view,A=e.systemAudio,i=e.fillMode,o=e.profile,r=e.videoTrack,n=e.qosPreference;le(t)||(this._screenShareParams.view=t),le(A)||(this._screenShareParams.option.systemAudio=A),le(i)||(this._screenShareParams.option.fillMode=i),le(o)||(this._screenShareParams.option.profile=o),le(r)||(this._screenShareParams.option.videoTrack=r),le(n)||(this._screenShareParams.option.qosPreference=n)},i.prototype._clearScreenShareParams=function(){var e,t,A,i,o;(null===(e=this._screenShareParams)||void 0===e?void 0:e.view)&&delete this._screenShareParams.view,(null===(A=null===(t=this._screenShareParams)||void 0===t?void 0:t.option)||void 0===A?void 0:A.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(t,A,i){var o=this._remoteStreamConfig.get("".concat(t,"_").concat(this._getTRTCStreamType(A)));o||(o={userId:t,streamType:this._getTRTCStreamType(A),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;le(r)||(o.view=r),le(n)||(o.option.mirror=this._getTRTCRemoteMirror(n)),le(s)||(o.option.fillMode=this._getTRTCFillMode(s)),le(a)||(o.option.small=a),this._remoteStreamConfig.set("".concat(t,"_").concat(this._getTRTCStreamType(A)),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 t=this;e._trtc.on(o.default.EVENT.AUTOPLAY_FAILED,(function(e){t.emit("onAutoPlayFailed",e)}))},i.prototype.handleDeviceChange=function(){return a(this,void 0,void 0,(function(){var t=this;return c(this,(function(A){return o.default.getCameraList().then((function(A){return a(t,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return this._cameraList.length===A.length?[2]:[4,this.deviceChangeManage(this._cameraList,A,e.TRTCDeviceType.TRTCDeviceTypeCamera)];case 1:return t.sent(),this._cameraList=A,[2]}}))}))})),o.default.getMicrophoneList().then((function(A){return a(t,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._microphoneList,A,e.TRTCDeviceType.TRTCDeviceTypeMic)];case 1:return t.sent(),this._microphoneList=A,[2]}}))}))})),o.default.getSpeakerList().then((function(A){return a(t,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,this.deviceChangeManage(this._speakerList,A,e.TRTCDeviceType.TRTCDeviceTypeSpeaker)];case 1:return t.sent(),this._speakerList=A,[2]}}))}))})),[2]}))}))},i.prototype.isSameDevice=function(e,t){var A=e&&e.deviceId&&e.groupId&&e.label,i=t&&t.deviceId&&t.groupId&&t.label;return!(!A||!i)&&(e.deviceId===t.deviceId&&e.groupId===t.groupId&&e.label===t.label)},i.prototype.deviceChangeManage=function(t,A,i){return a(this,void 0,void 0,(function(){var o,r,n,s,a;return c(this,(function(c){switch(c.label){case 0:return o=void 0,t.length!==A.length&&(r=(A||[]).map((function(e){return e.deviceId})),n=new R,t.length>A.length?(n=t.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateRemove):(r=(t||[]).map((function(e){return e.deviceId})),n=A.filter((function(e){return!r.includes(e.deviceId)}))[0]||{},o=e.TRTCDeviceState.TRTCDeviceStateAdd),s=n.deviceId,this.emitOnDeviceChange(s,i,o)),a=this.getDefaultDeviceInfo(A),i!==e.TRTCDeviceType.TRTCDeviceTypeCamera||o!==e.TRTCDeviceState.TRTCDeviceStateRemove?[3,3]:this.isSameDevice(this._currentCamera,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,2];case 1:c.sent(),c.label=2;case 2:c.label=3;case 3:return i!==e.TRTCDeviceType.TRTCDeviceTypeMic?[3,6]:this.isSameDevice(this._currentMicrophone,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,5];case 4:c.sent(),c.label=5;case 5:c.label=6;case 6:return i!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,9]:this.isSameDevice(this._currentSpeaker,a)?[2]:a.deviceId?[4,this.autoChangeDevice(i,a)]:[3,8];case 7:c.sent(),c.label=8;case 8:c.label=9;case 9:return[2]}}))}))},i.prototype.getDefaultDeviceInfo=function(e){var t=new R;if(0===e.length)return t;var A=e.filter((function(e){return"default"===e.deviceId}));return t=A.length>0?A[0]:e[0]},i.prototype.autoChangeDevice=function(t,A){return a(this,void 0,void 0,(function(){var i,r,n;return c(this,(function(s){switch(s.label){case 0:return i=A.deviceId,t!==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=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=6;case 6:return t!==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=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=12;case 12:return t!==e.TRTCDeviceType.TRTCDeviceTypeSpeaker?[3,14]:[4,o.default.setCurrentSpeaker(i)];case 13:s.sent(),this._currentSpeakerId=i,this._currentSpeaker=A,this.emitOnDeviceChange(i,t,e.TRTCDeviceState.TRTCDeviceStateActive),s.label=14;case 14:return[2]}}))}))},i.prototype.emitOnDeviceChange=function(e,t,A){this.emit("onDeviceChange",e,t,A)},i.prototype.getMediaMixingManager=function(){return new kn({logger:this.logger,trtc:this._trtc,trtcCloud:this})},i.shareInstance=null,i.subCloudMap=new Map,i.enableSEI=!1,i.assetsPath="",s([(g="exitRoom",function(e,t,A){var i=A.value;return A.value=function(){for(var e,t,A,o,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var s=[];return null===(t=null===(e=ts.get(this))||void 0===e?void 0:e.queue)||void 0===t||t.forEach((function(e){return s.push(e)})),null===(A=As.get(this))||void 0===A||A.forEach((function(e){return null==e?void 0:e.queue.forEach((function(e){return s.push(e)}))})),null===(o=is.get(this))||void 0===o||o.forEach((function(e){return null==e?void 0:e.queue.forEach((function(e){return s.push(e)}))})),s.forEach((function(e){e.reject(new Error("aborted ".concat(g)))})),ts.delete(this),As.delete(this),is.delete(this),i.apply(this,r)},A})],i.prototype,"exitRoom",null),s([os((function(e){return e}))],i.prototype,"muteRemoteAudio",null),s([os((function(e){return e}))],i.prototype,"muteRemoteVideoStream",null),s([os((function(e){var t=e||{},A=t.quality,i=t.stream_list,o=void 0===i?[]:i,r=o.some((function(e){return e.name===A}));return A&&r?o.map((function(e){return e.user_id})):(console.warn("[QualitySwitch] Invalid params: target ".concat(A," not found in list")),[])}),{deduplicate:!0})],i.prototype,"_switchPlaybackQuality",null),i}(y);e.Rect=j,e.TRTCDeviceInfo=R,e.TRTCImageBuffer=O,e.TRTCLocalStatistics=G,e.TRTCMixUser=q,e.TRTCNetworkQosParam=U,e.TRTCParams=S,e.TRTCPublishCDNParam=F,e.TRTCQualityInfo=N,e.TRTCRemoteStatistics=V,e.TRTCRenderParams=M,e.TRTCScreenCaptureProperty=$,e.TRTCScreenCaptureSourceInfo=K,e.TRTCStatistics=x,e.TRTCTranscodingConfig=W,e.TRTCVideoEncParam=b,e.TRTCVolumeInfo=P,e.default=ls,Object.defineProperty(e,"__esModule",{value:!0})}));