trtc-cloud-js-sdk 2.10.10 → 2.10.11-beta.1

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")):"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,E,B,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,(E=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[E.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",E[E.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(B=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[B.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",B[B.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",B[B.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(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},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,(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 M,b=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,(M=e.TRTCQuality||(e.TRTCQuality={}))[M.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",M[M.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",M[M.TRTCQuality_Good=2]="TRTCQuality_Good",M[M.TRTCQuality_Poor=3]="TRTCQuality_Poor",M[M.TRTCQuality_Bad=4]="TRTCQuality_Bad",M[M.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",M[M.TRTCQuality_Down=6]="TRTCQuality_Down";var _,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},G=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},F=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 K,j=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,(K=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[K.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",K[K.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",K[K.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",K[K.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",K[K.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",K[K.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",K[K.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",K[K.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",K[K.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",K[K.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 Ee(){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]=Ee(e[A],t[A]):e[A]=t[A]})),e}),{})}function Be(e){var t=null;return e instanceof MediaStream||e instanceof MediaStreamTrack||e instanceof HTMLElement?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]=Be(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(A){Object.hasOwnProperty.call(e,A)&&(t[A]=Be(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,De=Object.getOwnPropertyDescriptor,Me={f:De&&!Se.call({1:2},1)?function(e){var t=De(this,e);return!!t&&t.enumerable}:Se},be=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),Ge=Ne("".slice),Fe=function(e){return Ge(Pe(e),8,-1)},Ve=Object,xe=Ne("".split),Ye=ye((function(){return!Ve("z").propertyIsEnumerable(0)}))?function(e){return"String"===Fe(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},Ke=function(e){return Ye(Oe(e))},je="object"==typeof document&&document.all,Je={all:je,IS_HTMLDDA:void 0===je&&void 0!==je},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,Et=function(e,t){try{It(ve,e,{value:t,configurable:!0,writable:!0})}catch(A){ve[e]=t}return t},Bt="__core-js_shared__",pt=ve[Bt]||Et(Bt,{}),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)},Dt=ve.Symbol,Mt=Qt("wks"),bt=at?Dt.for||Dt:Dt&&Dt.withoutSetter||St,_t=function(e){return Tt(Mt,e)||(Mt[e]=st&&Tt(Dt,e)?Dt[e]:bt("Symbol."+e)),Mt[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+""},Gt=ve.document,Ft=qe(Gt)&&qe(Gt.createElement),Vt=function(e){return Ft?Gt.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=Ke(e),t=Pt(t),xt)try{return Yt(e,t)}catch(A){}if(Tt(e,t))return be(!we(Me.f,e,t),e[t])}},Ut=Te&&ye((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ot=String,Kt=TypeError,jt=function(e){if(qe(e))return e;throw Kt(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(jt(e),t=Pt(t),jt(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(jt(e),t=Pt(t),jt(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,be(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,EA=ve.WeakMap;if(uA||pt.state){var BA=pt.state||(pt.state=new EA);BA.get=BA.get,BA.has=BA.has,BA.set=BA.set,nA=function(e,t){if(BA.has(e))throw IA(CA);return t.facade=e,BA.set(e,t),t},sA=function(e){return BA.get(e)||{}},aA=function(e){return BA.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:Et(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,DA=Math.min,MA=function(e){return e>0?DA(RA(e),9007199254740991):0},bA=function(e){return MA(e.length)},_A=function(e){return function(t,A,i){var o,r=Ke(t),n=bA(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=Ke(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"],GA=PA.concat("length","prototype"),FA={f:Object.getOwnPropertyNames||function(e){return NA(e,GA)}},VA={f:Object.getOwnPropertySymbols},xA=Ne([].concat),YA=Xe("Reflect","ownKeys")||function(e){var t=FA.f(jt(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=jA[KA(e)];return A===WA||A!==JA&&(ze(t)?ye(t):!!t)},KA=OA.normalize=function(e){return String(e).replace(UA,".").toLowerCase()},jA=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]||Et(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"===Fe(function(){return arguments}()),oi=ei?Fe: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?Fe(t):"Object"===(i=Fe(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=jt(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){jt(e);for(var A,i=Ke(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",Ei="script",Bi=dA("IE_PROTO"),pi=function(){},Qi=function(e){return"<"+Ei+">"+e+"</"+Ei+">"},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"+Ei+":",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[Bi]=!0;var yi,Ti,mi=Object.create||function(e,t){var A;return null!==e?(pi[Ii]=jt(e),A=new pi,pi[Ii]=null,A[Bi]=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,Di=ye((function(){var e=Si("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Mi=QA.get,bi=Qt("native-string-replace",String.prototype.replace),_i=RegExp.prototype.exec,Li=_i,ki=Ne("".charAt),Ni=Ne("".indexOf),Pi=Ne("".replace),Gi=Ne("".slice),Fi=(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];(Fi||xi||Vi||wi||Di)&&(Li=function(e){var t,A,i,o,r,n,s,a=this,c=Mi(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,E=g;if(d&&(h=Pi(h,"y",""),-1===Ni(h,"g")&&(h+="g"),E=Gi(g,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==ki(g,a.lastIndex-1))&&(C="(?: "+C+")",E=" "+E,I++),A=new RegExp("^(?:"+C+")",h)),xi&&(A=new RegExp("^"+C+"$(?!\\s)",h)),Fi&&(i=a.lastIndex),o=we(_i,d?A:a,E),d?o?(o.input=Gi(o.input,I),o[0]=Gi(o[0],I),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Fi&&o&&(a.lastIndex=a.global?o.index+o[0].length:i),xi&&o&&o.length>1&&we(bi,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+"]+"),Ki=RegExp("(^|[^"+Hi+"])["+Hi+"]+$"),ji=function(e){return function(t){var A=ni(Oe(t));return 1&e&&(A=Ui(A,Oi,"")),2&e&&(A=Ui(A,Ki,"$1")),A}},Ji={start:ji(1),end:ji(2),trim:ji(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"===Fe(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&&jt(i),i}if("RegExp"===Fe(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=jt(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,MA(i.lastIndex),n)),c++}return 0===c?null:a}]}));var go=Array.isArray||function(e){return"Array"===Fe(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,be(0,A)):e[i]=A},Co=function(){},Io=[],Eo=Xe("Reflect","construct"),Bo=/^\s*(?:class|function)\b/,po=Ne(Bo.exec),Qo=!Bo.exec(Co),fo=function(e){if(!ze(e))return!1;try{return Eo(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(Bo,cA(e))}catch(t){return!0}};vo.sham=!0;var yo,To=!Eo||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"),Do=_t("isConcatSpreadable"),Mo=rt>=51||!ye((function(){var e=[];return e[Do]=!1,e.concat()[0]!==e})),bo=function(e){if(!qe(e))return!1;var t=e[Do];return void 0!==t?!!t:go(e)};qA({target:"Array",proto:!0,arity:1,forced:!(Mo&&(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(bo(r=-1===t?n:arguments[t]))for(o=bA(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),Go=No||ko||Po,Fo=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(_o);Go&&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 Ko=/XWEB\/\d+/i.test(_o);Ko&&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 jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&/COVC\/\d+/i.test(_o),Jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&!/COVC\/\d+/i.test(_o);(Jo||jo)&&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),!Go&&/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&&!Ko&&!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&&!jo&&!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,Er=-1319,Br=-70252,pr={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},Qr={code:-1005,message:"not supported"},fr="2.10.10",vr=Object.create,yr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,wr=Object.getPrototypeOf,Sr=Object.prototype.hasOwnProperty,Dr=Object.prototype.propertyIsEnumerable,Mr=(e,t,A)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,br=(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)=>Mr(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},Gr=e=>"function"==typeof e;var Fr=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<(Gr(a)?a():a)?(g++,l=1,Gr(i)&&i.call(this,g,n),u=window.setTimeout((()=>{u=-1,d(t,h)}),Gr(c)?c(g):c)):(n(),Gr(o)&&o.call(this,e))};Gr(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 Kr=new Map;function jr(e,t,A={}){return(i,o,r)=>{const n=A.action||o;if(!A.context){const A=Kr.get(i)||[];Kr.has(i)||Kr.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=Kr.get(e)||[];let A=new Set,i=[],o=[];const r=new Set,n=Object.getPrototypeOf(e);Kr.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,"avPlayerStateSyncManager"),_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(e.PlayerEvent.LOAD_START,(()=>this.handleLoadStart("video"))),this.audioPlayer.on(e.PlayerEvent.LOAD_START,(()=>this.handleLoadStart("audio"))),this.videoPlayer.on(e.PlayerEvent.PLAYER_STATE_CHANGED,this.handlePlayerStateChanged,this),this.audioPlayer.on(e.PlayerEvent.PLAYER_STATE_CHANGED,this.handlePlayerStateChanged,this),this.videoPlayer.on(e.PlayerEvent.ENTER_PICTURE_IN_PICTURE,this.handleEnterPictureInPicture,this),this.videoPlayer.on(e.PlayerEvent.LEAVE_PICTURE_IN_PICTURE,this.handleLeavePictureInPicture,this),this.videoPlayer.on(e.PlayerEvent.ENTER_FULL_SCREEN,this.handleEnterFullScreen,this),this.videoPlayer.on(e.PlayerEvent.LEAVE_FULL_SCREEN,this.handleLeaveFullScreen,this),this.avPlayerStateSyncManager=new e.AVPlayerStateSyncManager({log:this._log,audioPlayer:this.audioPlayer,videoPlayer:this.videoPlayer})}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()}async handleEnterPictureInPicture(){var e,t;await this.videoPlayer.enterPIPPromise,null==(t=null==(e=this.callback)?void 0:e.onPictureInPictureStateChanged)||t.call(e,{isPictureInPicture:!0,pictureInPictureWindow:this.videoPlayer.pipWindow})}handleLeavePictureInPicture(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPictureInPictureStateChanged)||t.call(e,{isPictureInPicture:!1})}handleEnterFullScreen(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onFullScreenStateChanged)||t.call(e,{isFullScreen:!0})}handleLeaveFullScreen(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onFullScreenStateChanged)||t.call(e,{isFullScreen:!1})}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(),this.audioPlayer.setMuted(!1))}};br([jr([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),br([jr(["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),br([jr("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),br([jr([],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,"_sdkAppId"),_r(this,"_userId"),_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._sdkAppId=s.sdkAppId,this._userId=s.userId,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.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)}));const h=this.player.play();this.player.setVolume(o),await h,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{view:t,volume:A,muted:i,fillMode:o,action:r,fullScreen:n,pictureInPicture:s}=e;this.player.setMuted(i),this.player.setVolume(A),this.player.setFillMode(o),t&&this.player.videoPlayer.setContainer(this.core.utils.isString(t)?document.getElementById(t):t),"pause"===r?this.player.pause():"resume"===r&&this.player.resume(),this.core.utils.isBoolean(n)&&(n?await this.player.enterFullscreen():await this.player.exitFullscreen()),this.core.utils.isBoolean(s)&&(s?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),this.core.room.keyPointManager.uploadKVStat(this.core.kvStatManager,this._sdkAppId)}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"),br([function({settings:e={retries:5,timeout:2e3},onError:t,onRetrying:A,onRetryFailed:i}){return function(o,r,n){const s=Fr({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;Gr(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),br([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)&&Mr(e,A,t[A]);if(Rr)for(var A of Rr(t))Dr.call(t,A)&&Mr(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&&m("no native wasm support detected");var c,g,u,l,d,h,C,I,E=!1,B=[],p=[],Q=[];function f(e){B.unshift(e)}function v(e){Q.unshift(e)}var y=0,T=null;function m(e){i.onAbort&&i.onAbort(e),a(e="Aborted("+e+")"),E=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw A(t),t}var R,w,S="data:application/octet-stream;base64,",D=e=>e.startsWith(S);function M(e){return Promise.resolve().then((()=>function(e){if(e==R&&n)return new Uint8Array(n);var t=function(e){if(D(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(S.length))}(e);if(t)return t;throw"both async and sync fetching of the wasm failed"}(e)))}D(R="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/f38BfwKXARkBYQFhAAQBYQFiAAMBYQFjAAMBYQFkAAMBYQFlAA8BYQFmAAIBYQFnAAgBYQFoAAUBYQFpABABYQFqABEBYQFrABIBYQFsAAQBYQFtAAcBYQFuAAoBYQFvAAABYQFwAAQBYQFxAAsBYQFyAAEBYQFzAAQBYQF0AAABYQF1AAYBYQF2AAABYQF3AAQBYQF4AAkBYQF5ABMDZmUDBQIBBAIIBRQCBAUFAgcBFQEAAwEWAAQABAUFBRcHBwMBBgUEBQMAAwIECwQCAQUYBgEZChoBAwcDBhsHAQEBCQ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AgAkEAIAAgAU0bDQAgAD8AQRB0SwRAIAAQEUUNAQtB2NQAIAA2AgAgAQ8LQejeAEEwNgIAQX8LgwECBX8BfgJAIABCgICAgBBUBEAgACEHDAELA0AgAUEBayIBIAAgAEIKgCIHQgp+fadBMHI6AAAgAEL/////nwFWIQUgByEAIAUNAAsLIAenIgIEQANAIAFBAWsiASACIAJBCm4iA0EKbGtBMHI6AAAgAkEJSyEGIAMhAiAGDQALCyABC3oBA38CQAJAIAAiAUEDcUUNACABLQAARQRAQQAPCwNAIAFBAWoiAUEDcUUNASABLQAADQALDAELA0AgASICQQRqIQEgAigCACIDQX9zIANBgYKECGtxQYCBgoR4cUUNAAsDQCACIgFBAWohAiABLQAADQALCyABIABrC78EAQl/AkACfyAALQALQQd2BEAgACgCBAwBCyAALQALQf8AcQsiAiABSQRAIwBBEGsiBiQAIAEgAmsiBQRAIAUgAC0AC0EHdgR/IAAoAghB/////wdxQQFrBUEKCyICAn8gAC0AC0EHdgRAIAAoAgQMAQsgAC0AC0H/AHELIgFrSwRAIwBBEGsiBCQAAkAgBSACayABaiIDQe////8HIAJrTQRAAn8gAC0AC0EHdgRAIAAoAgAMAQsgAAshByAEQQRqIgggACACQef///8DSQR/IAQgAkEBdDYCDCAEIAIgA2o2AgQjAEEQayIDJAAgCCgCACAEQQxqIgkoAgBJIQogA0EQaiQAIAkgCCAKGygCACIDQQtPBH8gA0EQakFwcSIDIANBAWsiAyADQQtGGwVBCgtBAWoFQe////8HCxAwIAQoAgQhAyAEKAIIGiABBEAgAyAHIAEQIwsgAkEKRwRAIAcQGQsgACADNgIAIAAgACgCCEGAgICAeHEgBCgCCEH/////B3FyNgIIIAAgACgCCEGAgICAeHI2AgggBEEQaiQADAELECcACyAAIAE2AgQLIAECfyAALQALQQd2BEAgACgCAAwBCyAACyICaiAFEEAgACABIAVqIgAQMSAGQQA6AA8gACACaiAGLQAPOgAACyAGQRBqJAAMAQsCfyAALQALQQd2BEAgACgCAAwBCyAACyEEIwBBEG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AMoAhg2AgALIABBAUYLIQQgA0FAayQAIAQLCgAgACABQQAQHgtOAgF/AXwjAEEQayICJAAgAkEANgIMIAEoAgRB1M8AIAJBDGoQCSEDIAIoAgwiAQRAIAEQAQsgACADRAAAAAAAAAAAYjoAOCACQRBqJAALNwEBfyMAQRBrIgIkACACIAEtADg2AgggAEHUzwAgAkEIahAHNgIEIABB1NUANgIAIAJBEGokAAuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECIaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECIaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACC5wBAQJ/IwBBEGsiAiQAQcgAEBwhASAAKAIEIgAQAiACIAA2AgggAUHMLSACQQhqEAc2AgQgAUHU1QA2AgAgAUEBNgIcIAFB1NUANgIYIAFBATYCFCABQdTVADYCECABQQE2AgwgAUHU1QA2AgggAUEAOgAgIAFBADYCRCABQoCAgIAwNwI8IAFBADsANyABQQA7ACsgAkEQaiQAIAELigUCBn4CfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIQkgASkDACEDIAEpAwghBSMAQSBrIgAkAAJAIAVC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBUIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAhSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBUIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIBQZH3AEkNACADIQIgBUL///////8/g0KAgICAgIDAAIQiBCEGAkAgAUGB9wBrIghB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cACwsgA0EoaiABQbCWAiADEFMgAygCLCECIANBADYCLCADKAIoIQUCQCABKAIMIgRFBEAgASACNgIMIAEgBTYCCAwBCyAEEAMgAygCLCEEIAEgAjYCDCABIAU2AgggBEUNACAEEAMgA0EANgIsCyADLAALQQBIBEAgAygCABAZCyADQQA2AihBhNUALQAAQQFxRQRAQQFBqC9BABAFIQJBhNUAQQE6AABBgNUAIAI2AgALAn9BgNUAKAIAIAEoAgRB6QkgA0EoakEAEAQiEEQAAAAAAADwQWMgEEQAAAAAAAAAAGZxBEAgEKsMAQtBAAshAiADKAIoIgUEQCAFEAELIAEoAhwiBQRAIAUQAwsgASACNgIcIAFB1NUANgIYIAIQAiADIAI2AiggASgCFCICEAIgAyACNgIwIANBADYCPEGM1QAtAABBAXFFBEBBA0GsL0EAEAUhAkGM1QBBAToAAEGI1QAgAjYCAAtBiNUAKAIAIAEoAgRB8AggA0E8aiADQShqEAQaIAMoAjwiAgRAIAIQAQsgASgCHCICEAIgAyACNgIoIAEoAgwiAhACIAMgAjYCMCADQQA2AjxBjNUALQAAQQFxRQRAQQNBrC9BABAFIQJBjNUAQQE6AABBiNUAIAI2AgALQYjVACgCACABKAIEQfAIIANBPGogA0EoahAEGiADKAI8IgIEQCACEAELIAEoAhwiAhACIAMgAjYCKCADQQA2AjxB7NQALQAAQQFxRQRAQQJBvC5BABAFIQJB7NQAQQE6AABB6NQAIAI2AgALQejUACgCACABKAIEQc8JIANBPGogA0EoahAEGiADKAI8IgIEQCACEAELIAAgASgCHCIBNgIEIABB1NUANgIAIAEQAiADLAAnQQBIBEAgAygCHBAZCyADQUBrJAAPCxA3AAsQNwALEDcAC9gCAQJ/IwBBEGsiASQAIAAoAhQiAhACIAEgAjYCCCABQQA2AgRB7NQALQAAQQFxRQRAQQJBvC5BABAFIQJB7NQAQQE6AABB6NQAIAI2AgALQejUACgCACAAKAIEQf0IIAFBBGogAUEIahAEGiABKAIEIgIEQCACEAELIAAoAgwiAhACIAEgAjYCCCABQQA2A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nAADcJwAAaAAAAHAnAADoJwAAYQAAAHAnAAD0JwAAcwAAAHAnAAAAKAAAdAAAAHAnAAAMKAAAaQAAAHAnAAAYKAAAagAAAHAnAAAkKAAAbAAAAHAnAAAwKAAAbQAAAHAnAAA8KAAAeAAAAHAnAABIKAAAeQAAAHAnAABUKAAAZgAAAHAnAABgKAAAZAAAAHAnAABsKAAAAAAAAIwmAAAhAAAAJgAAACMAAAAkAAAAJwAAACgAAAApAAAAKgAAAAAAAADwKAAAIQAAACsAAAAjAAAAJAAAACcAAAAsAAAALQAAAC4AAABOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UAAAAAqCgAAMgoAACMJgAAAAAAAOwmAAAhAAAALwAAACMAAAAkAAAAMAAAAAAAAAA8KQAAMQAAADIAAAAzAAAAU3Q5ZXhjZXB0aW9uAAAAAIAoAAAsKQAAAAAAAGgpAAAYAAAANAAAADUAAABTdDExbG9naWNfZXJyb3IAqCgAAFgpAAA8KQAAAAAAAJwpAAAYAAAANgAAADUAAABTdDEybGVuZ3RoX2Vycm9yAAAAAKgoAACIKQAAaCkAAFN0OXR5cGVfaW5mbwAAAACAKAAAqCkAQcDTAAsJCxUAAAAAAAAFAEHU0wALARsAQezTAAsOHAAAAB0AAABoKwAAAAQAQYTUAAsBAQBBlNQACwX/////CgBB2NQACwNgMQE=")||(w=R,R=i.locateFile?i.locateFile(w,r):r+w);var b=e=>{for(;e.length>0;)e.shift()(i)};function _(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(it(this.get_type()))return h[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var L,k,N,P=e=>{for(var t="",A=e;g[A];)t+=L[g[A++]];return t},G={},F={},V={},x=e=>{throw new k(e)},Y=e=>{throw new N(e)},H=(e,t,A)=>{function i(t){var i=A(t);i.length!==e.length&&Y("Mismatched type converter count");for(var o=0;o<e.length;++o)U(e[o],i[o])}e.forEach((function(e){V[e]=t}));var o=new Array(t.length),r=[],n=0;t.forEach(((e,t)=>{F.hasOwnProperty(e)?o[t]=F[e]:(r.push(e),G.hasOwnProperty(e)||(G[e]=[]),G[e].push((()=>{o[t]=F[e],++n===r.length&&i(o)})))})),0===r.length&&i(o)};function U(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||x(`type "${i}" must have a positive integer typeid pointer`),F.hasOwnProperty(e)){if(A.ignoreDuplicateRegistrations)return;x(`Cannot register type '${i}' twice`)}if(F[e]=t,delete V[e],G.hasOwnProperty(e)){var o=G[e];delete G[e],o.forEach((e=>e()))}}(e,t,A)}var O,K=e=>{x(e.$$.ptrType.registeredClass.name+" instance already deleted")},j=!1,J=e=>{},W=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},z=(e,t,A)=>{if(t===A)return e;if(void 0===A.baseClass)return null;var i=z(e,t,A.baseClass);return null===i?null:A.downcast(i)},Z={},q=[],X=()=>{for(;q.length;){var e=q.pop();e.$$.deleteScheduled=!1,e.delete()}},$={},ee=(e,t)=>(t.ptrType&&t.ptr||Y("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Y("Both smartPtrType and smartPtr must be specified"),t.count={value:1},te(Object.create(e,{$$:{value:t}}))),te=e=>"undefined"==typeof FinalizationRegistry?(te=e=>e,e):(j=new FinalizationRegistry((e=>{W(e.$$)})),J=e=>j.unregister(e),(te=e=>{var t=e.$$;if(t.smartPtr){var A={$$:t};j.register(e,A,e)}return e})(e));function Ae(){}var ie=(e,t)=>Object.defineProperty(t,"name",{value:e}),oe=(e,t,A)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||x(`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 re(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 ne=(e,t,A)=>{for(;t!==A;)t.upcast||x(`Expected null or instance of ${A.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function se(e,t){if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),0;t.$$||x(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`);var A=t.$$.ptrType.registeredClass;return ne(t.$$.ptr,A,this.registeredClass)}function ae(e,t){var A;if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),this.isSmartPointer?(A=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,A),A):0;t.$$||x(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&x(`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=ne(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&x("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?A=t.$$.smartPtr:x(`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,we.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,A)}break;default:x("Unsupporting sharing policy")}return A}function ce(e,t){if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),0;t.$$||x(`Cannot pass "${be(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&x(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var A=t.$$.ptrType.registeredClass;return ne(t.$$.ptr,A,this.registeredClass)}function ge(e){return this.fromWireType(h[e>>2])}function ue(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=ae:i?(this.toWireType=se,this.destructorFunction=null):(this.toWireType=ce,this.destructorFunction=null)}var le,de,he=[],Ce=e=>{var t=he[e];return t||(e>=he.length&&(he.length=e+1),he[e]=t=le.get(e)),t},Ie=(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):Ce(t).apply(null,A),Ee=(e,t)=>{var A,i,o,r=(e=P(e)).includes("j")?(A=e,i=t,o=[],function(){return o.length=0,Object.assign(o,arguments),Ie(A,i,o)}):Ce(t);return"function"!=typeof r&&x(`unknown function pointer with signature ${e}: ${t}`),r},Be=e=>{var t=tt(e),A=P(t);return At(t),A},pe=(e,t)=>{var A=[],i={};throw t.forEach((function e(t){i[t]||F[t]||(V[t]?V[t].forEach(e):(A.push(t),i[t]=!0))})),new de(`${e}: `+A.map(Be).join([", "]))},Qe=(e,t)=>{for(var A=[],i=0;i<e;i++)A.push(h[t+4*i>>2]);return A},fe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function ve(e,t,A,i,o,r){var n=t.length;n<2&&x("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 ie(e,(function(){var A;arguments.length!==u&&x(`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)fe(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 ye=(e,t,A)=>(e instanceof Object||x(`${A} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||x(`${A} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||x(`cannot call emscripten binding method ${A} on deleted object`),ne(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass));function Te(){this.allocated=[void 0],this.freelist=[]}var me=new Te,Re=e=>{e>=me.reserved&&0==--me.get(e).refcount&&me.free(e)},we={toValue:e=>(e||x("Cannot use deleted val. handle = "+e),me.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 me.allocate({refcount:1,value:e})}}};function Se(e){return this.fromWireType(d[e>>2])}var De,Me,be=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},_e=(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}`)}},Le=(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}`)}},ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ne=(e,t,A)=>{for(var i=t+A,o=t;e[o]&&!(o>=i);)++o;if(o-t>16&&e.buffer&&ke)return ke.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},Pe=(e,t)=>e?Ne(g,e,t):"",Ge="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Fe=(e,t)=>{for(var A=e,i=A>>1,o=i+t/2;!(i>=o)&&l[i];)++i;if((A=i<<1)-e>32&&Ge)return Ge.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},Ve=(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},xe=e=>2*e.length,Ye=(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},He=(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},Ue=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},Oe=(e,t)=>{var A=F[e];return void 0===A&&x(t+" has unknown type "+Be(e)),A},Ke=(e,t,A)=>{var i=[],o=e.toWireType(i,A);return i.length&&(h[t>>2]=we.toHandle(i)),o},je={},Je=[],We=Reflect.construct,ze=[null,[],[]],Ze=(e,t)=>{var A=ze[e];0===t||10===t?((1===e?s:a)(Ne(A,0)),A.length=0):A.push(t)};(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);L=e})(),k=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},N=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(Ae.prototype,{isAliasOf(e){if(!(this instanceof Ae))return!1;if(!(e instanceof Ae))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||K(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=te(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||K(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),J(this),W(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||K(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),q.push(this),1===q.length&&O&&O(X),this.$$.deleteScheduled=!0,this}}),i.getInheritedInstanceCount=()=>Object.keys($).length,i.getLiveInheritedInstances=()=>{var e=[];for(var t in $)$.hasOwnProperty(t)&&e.push($[t]);return e},i.flushPendingDeletes=X,i.setDelayFunction=e=>{O=e,q.length&&O&&O(X)},Object.assign(ue.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:8,readValueFromPointer:ge,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&&x("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),$[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?ee(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ee(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var r,n=this.registeredClass.getActualType(t),s=Z[n];if(!s)return o.call(this);r=this.isConst?s.constPointerType:s.pointerType;var a=z(t,this.registeredClass,r.registeredClass);return null===a?o.call(this):this.isSmartPointer?ee(r.registeredClass.instancePrototype,{ptrType:r,ptr:a,smartPtrType:this,smartPtr:e}):ee(r.registeredClass.instancePrototype,{ptrType:r,ptr:a})}}),de=i.UnboundTypeError=(De=Error,(Me=ie("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(De.prototype),Me.prototype.constructor=Me,Me.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},Me),Object.assign(Te.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)}}),me.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),me.reserved=me.allocated.length,i.count_emval_handles=()=>{for(var e=0,t=me.reserved;t<me.allocated.length;++t)void 0!==me.allocated[t]&&++e;return e};var qe,Xe={w:(e,t,A)=>{throw new _(e).init(t,A),e},q:(e,t,A,i,o)=>{},u:(e,t,A,i)=>{U(e,{name:t=P(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=P(u),n=Ee(r,n),a&&(a=Ee(s,a)),g&&(g=Ee(c,g)),d=Ee(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)?(x(`Cannot register public name '${e}' twice`),oe(i,e,e),i.hasOwnProperty(A)&&x(`Cannot register multiple overloads of a function with the same number of arguments (${A})!`),i[e].overloadTable[A]=t):i[e]=t})(h,(function(){pe(`Cannot construct ${u} due to unbound types`,[o])})),H([e,t,A],o?[o]:[],(function(t){var A,r;t=t[0],r=o?(A=t.registeredClass).instancePrototype:Ae.prototype;var s=ie(u,(function(){if(Object.getPrototypeOf(this)!==c)throw new k("Use 'new' to construct "+u);if(void 0===l.constructor_body)throw new k(u+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new k(`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 re(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 ue(u,l,!0,!1,!1),I=new ue(u+"*",l,!1,!1,!1),E=new ue(u+" const*",l,!1,!0,!1);return Z[e]={pointerType:I,constPointerType:E},((e,t,A)=>{i.hasOwnProperty(e)||Y("Replacing nonexistant public symbol"),i[e].overloadTable,i[e]=t,i[e].argCount=A})(h,s),[C,I,E]}))},x:(e,t,A,i,o,r)=>{var n=Qe(t,A);o=Ee(i,o),H([],[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 k(`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]=()=>{pe(`Cannot construct ${e.name} due to unbound types`,n)},H([],n,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=ve(A,i,null,o,r),[]))),[]}))},i:(e,t,A,i,o,r,n,s,a)=>{var c=Qe(A,i);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e})(t=P(t)),r=Ee(o,r),H([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function o(){pe(`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):(oe(a,t,i),a[t].overloadTable[A-2]=o),H([],c,(function(o){var s=ve(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=P(t),o=Ee(i,o),H([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,g={get(){pe(`Cannot access ${i} due to unbound types`,[A,n])},enumerable:!0,configurable:!0};return g.set=a?()=>pe(`Cannot access ${i} due to unbound types`,[A,n]):e=>x(i+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,g),H([],a?[A,n]:[A],(function(A){var n=A[0],g={get(){var t=ye(this,e,i+" getter");return n.fromWireType(o(r,t))},enumerable:!0};if(a){a=Ee(s,a);var u=A[1];g.set=function(t){var A=ye(this,e,i+" setter"),o=[];a(c,A,u.toWireType(o,t)),fe(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,g),[]})),[]}))},t:(e,t)=>{U(e,{name:t=P(t),fromWireType:e=>{var t=we.toValue(e);return Re(e),t},toWireType:(e,t)=>we.toHandle(t),argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},p:(e,t,A)=>{U(e,{name:t=P(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:_e(t,A),destructorFunction:null})},g:(e,t,A,i,o)=>{t=P(t);var r=e=>e;if(0===i){var n=32-8*A;r=e=>e<<n>>>n}var s=t.includes("unsigned");U(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:Le(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)}U(e,{name:A=P(A),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},o:(e,t)=>{var A="std::string"===(t=P(t));U(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=Pe(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 At(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||x("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=et(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&&(At(n),x("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(At,r),r},argPackAdvance:8,readValueFromPointer:ge,destructorFunction(e){At(e)}})},l:(e,t,A)=>{var i,o,r,n,s;A=P(A),2===t?(i=Fe,o=Ve,n=xe,r=()=>l,s=1):4===t&&(i=Ye,o=He,n=Ue,r=()=>h,s=2),U(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 At(e),A},toWireType:(e,i)=>{"string"!=typeof i&&x(`Cannot pass non-string to C++ string type ${A}`);var r=n(i),a=et(4+r+t);return h[a>>2]=r>>s,o(i,a+4,r+t),null!==e&&e.push(At,a),a},argPackAdvance:8,readValueFromPointer:Se,destructorFunction(e){At(e)}})},v:(e,t)=>{U(e,{isVoid:!0,name:t=P(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},j:(e,t,A)=>(e=we.toValue(e),t=Oe(t,"emval::as"),Ke(t,A,e)),e:(e,t,A,i,o)=>{var r,n;return(e=Je[e])(t=we.toValue(t),t[A=void 0===(n=je[r=A])?P(r):n],i,o)},d:Re,f:(e,t,A)=>{var i=((e,t)=>{for(var A=new Array(e),i=0;i<e;++i)A[i]=Oe(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=ie(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?We(r,s):r.apply(t,s);for(g=0;g<e;++g)i[g].deleteObject&&i[g].deleteObject(s[g]);return Ke(o,n,u)})),n=Je.length,Je.push(r),n},c:e=>{e>4&&(me.get(e).refcount+=1)},b:e=>{var t=we.toValue(e);fe(t),Re(e)},h:(e,t)=>{var A=(e=Oe(e,"_emval_take_value")).readValueFromPointer(t);return we.toHandle(A)},m:()=>{m("")},s:(e,t,A)=>g.copyWithin(e,t,t+A),r:e=>{g.length,m("OOM")},n:(e,t,A,i)=>{for(var o=0,r=0;r<A;r++){var n=h[t>>2],s=h[t+4>>2];t+=8;for(var a=0;a<s;a++)Ze(e,g[n+a]);o+=s}return h[i>>2]=o,0}},$e=function(){var e={a:Xe};function t(e,t){var A,o;return $e=e.exports,A=$e.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),le=$e.C,o=$e.A,p.unshift(o),function(){if(y--,i.monitorRunDependencies&&i.monitorRunDependencies(y),0==y&&T){var e=T;T=null,e()}}(),$e}if(y++,i.monitorRunDependencies&&i.monitorRunDependencies(y),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 M(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(A,(e=>{a(`failed to asynchronously prepare wasm: ${e}`),m(e)}))}(t,A,i)}(0,R,e,(function(e){t(e.instance)})).catch(A),{}}(),et=e=>(et=$e.B)(e),tt=e=>(tt=$e.D)(e),At=e=>(At=$e.E)(e),it=e=>(it=$e.F)(e);function ot(){function e(){qe||(qe=!0,i.calledRun=!0,E||(b(p),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)v(i.postRun.shift());b(Q)}()))}y>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)f(i.preRun.shift());b(B)}(),y>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=$e.G)(e,t,A,o,r),i._vertexShaderSource=10688,T=function e(){qe||ot(),qe||(T=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ot(),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 En,Bn=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 Bn(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"}(En||(En={}));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",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 Mn(e,t){for(var A in t)e.style[A]=t[A]}var bn=function(){function e(e,t,A){void 0===A&&(A={keepRatio:!1,stopPropagation:!1,anchorMode:En.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:En.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||En.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),Mn(a,Object.assign({},Dn.resizeAnchor,Dn.topLeftAnchor)),this.topLeftAnchor=a;var c=document.createElement("div");c.className="trtc-resizable-resize-anchor ".concat(vn),Mn(c,Object.assign({},Dn.resizeAnchor,Dn.topAnchor)),this.topAnchor=c;var g=document.createElement("div");g.className="trtc-resizable-resize-anchor ".concat(yn),Mn(g,Object.assign({},Dn.resizeAnchor,Dn.topRightAnchor)),this.topRightAnchor=g;var u=document.createElement("div");u.className="trtc-resizable-resize-anchor ".concat(Tn),Mn(u,Object.assign({},Dn.resizeAnchor,Dn.leftAnchor)),this.leftAnchor=u;var l=document.createElement("div");l.className="trtc-resizable-resize-anchor ".concat(mn),Mn(l,Object.assign({},Dn.resizeAnchor,Dn.rightAnchor)),this.rightAnchor=l;var d=document.createElement("div");d.className="trtc-resizable-resize-anchor ".concat(Rn),Mn(d,Object.assign({},Dn.resizeAnchor,Dn.bottomLeftAnchor)),this.bottomLeftAnchor=d;var h=document.createElement("div");h.className="trtc-resizable-resize-anchor ".concat(wn),Mn(h,Object.assign({},Dn.resizeAnchor,Dn.bottomAnchor)),this.bottomAnchor=h;var C=document.createElement("div");C.className="trtc-resizable-resize-anchor ".concat(Sn),Mn(C,Object.assign({},Dn.resizeAnchor,Dn.bottomRightAnchor)),this.bottomRightAnchor=C,this.options.anchorMode!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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 bn(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,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,i,o,r;return c(this,(function(n){switch(n.label){case 0:this.view=null,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.trtc.stopPlugin("VideoMixer")];case 2:return n.sent(),[3,4];case 3:return e=n.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin error:"),e),[3,4];case 4:if(!(this.screensWithSystemAudio.size>0))return[3,12];n.label=5;case 5:n.trys.push([5,10,,11]),A=0,i=Array.from(this.screensWithSystemAudio),n.label=6;case 6:return A<i.length?(o=i[A],[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack_".concat(o)})]):[3,9];case 7:n.sent(),n.label=8;case 8:return A++,[3,6];case 9:return[3,11];case 10:return r=n.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin AudioMixer error:"),r),[3,11];case 11:this.screensWithSystemAudio.clear(),n.label=12;case 12: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,E,B={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)||(B.x=null===(n=t.layout)||void 0===n?void 0:n.rect.left,B.y=null===(s=t.layout)||void 0===s?void 0:s.rect.top,B.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),B.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)||(B.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);B.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);B.rotation=Q[null===(E=t.layout)||void 0===E?void 0:E.rotation]}return B},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=Be(t),o=this._getTRTCSourceKey(i),!(r=this._getTRTCSourceItem(i))||!o)throw new Error("Invalid media source");return(n=Be(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=null==g?void 0:g[t.id],this.logger.log("".concat(this.logPrefix," startPlugin AudioMixer, track ID:"),u.id),[4,this.trtc.startPlugin("AudioMixer",{id:"systemAudioTrack_".concat(t.id),track:u})]):[3,3];case 2:c.sent(),c.label=3;case 3: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;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=Be(this.trtcSourceMap.get(n))||[],a=s.findIndex((function(e){return e.id===t.id})),s.splice(a,1),[4,this.trtc.updatePlugin("VideoMixer",(u={},u[n]=s,u))];case 1:return g=c.sent().result,t.type===e.TRTCMediaSourceType.kScreen&&this.screensWithSystemAudio.has(t.id)?(this.screensWithSystemAudio.delete(t.id),[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack_".concat(t.id)})]):[3,3];case 2:c.sent(),c.label=3;case 3: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:Be(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]),Be(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=Be(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:Be(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,E,B,p,Q,f,v,y,T,m,R,w,S,D,M,b,_;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?(E=I.layout.rect||{left:0,top:0,right:0,bottom:0},B=E.left,p=E.top,Q=E.right,f=E.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=B*R/y,D=p*w/T,M=Q*R/y,b=f*w/T,I.layout.rect={left:S,top:D,right:M,bottom:b},[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(Ee(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(Ee(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:Be(e)}),[2]):[2]}))}))},t.mediaMixingManager=null,t}(),Nn=Object.defineProperty,Pn=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Fn=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={}))Gn.call(t,A)&&Vn(e,A,t[A]);if(Pn)for(var A of Pn(t))Fn.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}})}}),Kn=(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})}}}),jn=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({},Kn(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({},Kn(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({},Kn(e))}}}),zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Kn(e))}}}),Zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Kn(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"),Yn(this,"eventListeners",new Map),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({},jn(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({},jn(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}}stop(){var e;this.eventListeners.forEach(((e,t)=>{this.removeEventListeners(t)})),this.eventListeners.clear(),null==(e=this.localMixVideoTrack)||e.close(),this.localMixVideoTrack=null,Object.values(this.systemAudioTrackList).forEach((e=>e.stop())),this.systemAudioTrackList={},delete this.onScreenShareStop,delete this._mixVideoConfig}async parseMixOptions(e){const{RtcError:t,ErrorCode:A}=this.core.errorModule;if(!this.localMixVideoTrack||!this._mixVideoConfig)return{successOptions:{},failedDetails:[]};const i=[],o=xn({},e),{canvasInfo:r,camera:n,screen:s,text:a,image:c,video:g}=e;r&&this.parseCanvasOptions(r);let u=0,l=0;const d=[{key:"camera",options:n,parser:this.parseCameraOptions.bind(this)},{key:"screen",options:s,parser:this.parseScreenOptions.bind(this)},{key:"text",options:a,parser:this.parseTextOptions.bind(this)},{key:"image",options:c,parser:this.parseImageOptions.bind(this)},{key:"video",options:g,parser:this.parseVideoOptions.bind(this)}];for(const{key:h,options:C,parser:I}of d)if(C){u++;const e=await I(this.localMixVideoTrack,C,this._mixVideoConfig[h]||[]);this._mixVideoConfig[h]=e.finalOptions,o[h]=e.finalOptions,e.errors.length>0&&(i.push(...e.errors),e.errors.length===C.length&&l++)}if(l>0&&l===u)throw new t({code:A.INVALID_PARAMETER,message:"all sources mix failed",data:{failedDetails:i}});return{successOptions:o,failedDetails:i}}parseCanvasOptions(e){if(!this.localMixVideoTrack||!this._mixVideoConfig)return;const{canvasColor:t,width:A,height:i,frameRate:o}=e;t&&this.localMixVideoTrack.setMixBackground(t),o&&this.localMixVideoTrack.setFps(o),this.localMixVideoTrack.resizeMixCanvas(A,i),this._mixVideoConfig.canvasInfo=e}prepareSourceOptions(e,t){const A=new Set(e.map((e=>e.id)));return{removeIdList:t.filter((e=>!A.has(e.id))).map((e=>e.id)),preOptionsMap:new Map(t.map((e=>[e.id,e])))}}recordSourceError(e,t,A,i,o){o.push({id:e,error:t}),A.has(e)&&i.push(A.get(e))}async parseCameraOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeCameraSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleCameraSource(e,s),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleCameraSource(e,t){var A;const{id:i,layout:o,profile:r,useInternalTrack:n}=t;n&&((null==(A=this.core.trtc.localVideoTrack)?void 0:A.sourceTrack)?t.videoTrack=this.core.trtc.localVideoTrack.sourceTrack:t.videoTrack=this.createPlaceholderVideoTrack()),this.log.info(`videomixer camera option ${JSON.stringify(t)}`),e.inputLocalVideoTracks.has(i)?await this.updateExistingCameraSource(e,t):await this.addNewCameraSource(e,t)}async updateExistingCameraSource(e,t){var A,i;const{id:o,layout:r,profile:n}=t,s=null==(A=e.inputLocalVideoTracks.get(o))?void 0:A.mediaTrack;await this.updateCameraProfile(t);const a=null==(i=e.inputLocalVideoTracks.get(o))?void 0:i.mediaTrack,c=this.resolveVideoProfile(n);a!==s?e.updateCameraSource(o,r,a,c):e.updateCameraSource(o,r,null,c)}async addNewCameraSource(e,t){const{id:A,layout:i,useInternalTrack:o}=t,r=await this.captureCamera(t);if(this.removeEventListeners(A),o){const t=t=>{var i,o;if(null==(i=t.track)?void 0:i.isScreen)return;this.log.info("videomixer camera LOCAL_TRACK_CAPTURE_SUCCESS");const r=e.inputLocalVideoTracks.get(A);r&&(null==(o=t.track)?void 0:o.sourceTrack)&&r.setInputMediaStreamTrack(t.track.sourceTrack)};this.core.innerEmitter.on("102",t),this.eventListeners.has(A)||this.eventListeners.set(A,{}),this.eventListeners.get(A).captureSuccess=()=>{this.core.innerEmitter.off("102",t)}}try{e.addCameraSource(A,r,i)}catch(e){throw r.close(),e}}resolveVideoProfile(e){if(!this.core.utils.isUndefined(e))return this.core.utils.isString(e)?this.core.constants.videoProfileMap[e]:e}async parseScreenOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeScreenSource(s),this.removeSystemAudioTrack(s);const r=[],n=[];for(const s of t)try{await this.processSingleScreenSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleScreenSource(e,t,A){var i,o;const{id:r,layout:n,useInternalTrack:s}=t;s&&((null==(i=this.core.trtc.localScreenTrack)?void 0:i.mediaTrack)?(t.videoTrack=this.core.trtc.localScreenTrack.mediaTrack,(null==(o=this.core.trtc.localScreenAudioTrack)?void 0:o.mediaTrack)&&(t.audioTrack=this.core.trtc.localScreenAudioTrack.mediaTrack),delete t.captureElement,delete t.preferDisplaySurface,delete t.systemAudio):t.videoTrack=this.createPlaceholderVideoTrack()),this.log.info(`videomixer screen option ${JSON.stringify(t)}`);const a=A.get(r),c=e.inputLocalScreenTracks.has(r),g=!(null==a?void 0:a.systemAudio)&&t.systemAudio;c&&!g?this.updateExistingScreenSource(e,r,n,a,t):await this.addNewScreenSource(e,t,a)}updateExistingScreenSource(e,t,A,i,o){e.updateScreenSource(t,A),(null==i?void 0:i.systemAudio)&&!o.systemAudio&&this.removeSystemAudioTrack(t)}async addNewScreenSource(e,t,A){const{id:i,useInternalTrack:o}=t,r=await this.captureScreen(t);if(this.removeEventListeners(i),o){const t=t=>{var A,o,r;if(!(null==(A=t.track)?void 0:A.isScreen))return;this.log.info("videomixer screen LOCAL_TRACK_CAPTURE_SUCCESS");const n=e.inputLocalScreenTracks.get(i);n&&(null==(o=t.track)?void 0:o.mediaTrack)&&n.setInputMediaStreamTrack(t.track.mediaTrack),this.systemAudioTrackList[i]&&(null==(r=t.track)?void 0:r.mediaTrack)&&(this.systemAudioTrackList[i]=t.track.mediaTrack)};this.core.innerEmitter.on("102",t),this.eventListeners.has(i)||this.eventListeners.set(i,{}),this.eventListeners.get(i).captureSuccess=()=>{this.core.innerEmitter.off("102",t)}}!(null==A?void 0:A.systemAudio)&&t.systemAudio&&e.inputLocalScreenTracks.has(t.id)&&e.removeScreenSource(t.id);try{e.addScreenSource(t.id,r,t.layout)}catch(e){throw r.close(),e}}async parseTextOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeTextSource(s);const r=[],n=[];for(const s of t)try{o.has(s.id)?e.updateTextSource(s):e.addTextSource(s),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async parseImageOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeImageSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleImageSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleImageSource(e,t,A){const{id:i,url:o,layout:r}=t,n=A.get(i);if(n){let t;n.url!==o&&(t=await this.core.utils.loadImage(o)),e.updateImageSource(i,r,t)}else{const t=await this.core.utils.loadImage(o);e.addImageSource(i,t,r)}}async parseVideoOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeVideoSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleVideoSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleVideoSource(e,t,A){const{id:i,url:o,layout:r}=t,n=A.get(i);if(n){let t;n.url!==o&&(t=await this.core.utils.loadVideo(o)),e.updateVideoSource(i,r,t)}else{const t=await this.core.utils.loadVideo(o);e.addVideoSource(i,t,r)}}createPlaceholderVideoTrack(){const e=document.createElement("canvas");e.width=640,e.height=480;const t=e.getContext("2d");return t&&(t.fillStyle="black",t.fillRect(0,0,e.width,e.height)),e.captureStream(1).getVideoTracks()[0]}removeEventListeners(e){const t=this.eventListeners.get(e);t&&(t.inputMediaTrackChanged&&t.inputMediaTrackChanged(),t.captureSuccess&&t.captureSuccess(),this.eventListeners.delete(e))}async captureCamera(e){const{id:t,cameraId:A,videoTrack:i,profile:o}=e,r=new this.core.LocalVideoTrack;r.log.id+=`-${t}`;const n={};if(A?n.deviceId=A:this.core.utils.isUndefined(i)||(n.customSource=i),!this.core.utils.isUndefined(o)){const e=this.resolveVideoProfile(o);e&&r.setProfile(e)}return 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);if(n&&(i?await n.switchDevice(i):this.core.utils.isUndefined(o)||await n.setInputMediaStreamTrack(o),!this.core.utils.isUndefined(r))){const e=this.resolveVideoProfile(r);e&&n.setProfile(e),i&&n.isNeedToSwitchDevice(i)||await n.applyProfile()}}async captureScreen(e){const{id:t,profile:A,captureElement:i,preferDisplaySurface:o,systemAudio:r,videoTrack:n,audioTrack:s}=e,a=new this.core.LocalScreenTrack;a.log.id+=`-${t}`;const c={captureElement:i,preferDisplaySurface:o,systemAudio:r,videoTrack:n,audioTrack:s};if(!this.core.utils.isUndefined(A))if(this.core.utils.isString(A)){const e=this.core.constants.screenProfileMap[A];e&&a.setProfile(e)}else a.setProfile(A);const g=await a.capture(c);return r&&g.getAudioTracks().length>0?(this.systemAudioTrackList[t]=g.getAudioTracks()[0],this.log.info(`${t} system audio track captured`)):this.removeSystemAudioTrack(t),a.mediaTrack.addEventListener(this.core.constants.NAME.ENDED,(()=>{this.handleScreenShareEnded(t)})),a}handleScreenShareEnded(e){var t,A,i;null==(t=this.localMixVideoTrack)||t.removeScreenSource(e),(null==(A=this._mixVideoConfig)?void 0:A.screen)&&(this._mixVideoConfig.screen=this._mixVideoConfig.screen.filter((t=>t.id!==e))),null==(i=this.onScreenShareStop)||i.call(this,e)}async _updatePreview({view:e,track:t,prevConfig:A}){if(this.core.utils.isUndefined(e)&&(null==A?void 0:A.view)){const e=this.core.utils.getViewListFromView(A.view);e.length>0&&await t.play(e)}else if(!this.core.utils.isUndefined(e)){const A=this.core.utils.getViewListFromView(e);A.length>0?await t.play(A):t.stop()}}removeSystemAudioTrack(e){const t=this.systemAudioTrackList[e];t&&(t.stop(),this.log.info(`${e} system audio track stop`),delete this.systemAudioTrackList[e])}};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 E=s?i:void 0;return h.push({fn:r,args:t,context:this},!1,s,E)},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._audioMuteType=!1,r._audioProfile=o.default.TYPE.AUDIO_PROFILE_STANDARD,r._captureVolume=100,r._playoutVolume=100,r._isSharingScreen=!1,r._remoteStreamConfig=new Map,r._remoteStreamMap=new Map,r._cameraList=[],r._microphoneList=[],r._speakerList=[],r._currentCamera={},r._currentMicrophone={},r._currentSpeaker={},r._currentCameraId="",r._currentMicrophoneId="",r._currentSpeakerId="",r._screenShareParams={option:{}},r._isMobile=Fo,r._isFrontCamera=!0,r._cameraVideoTrack=null,r._smallStreamVideoProfile=void 0,r._qosPreference=void 0,r._defaultVideoProfile={width:640,height:480,frameRate:15,bitrate:900},r._defaultScreenProfile={width:1920,height:1080,frameRate:15,bitrate:1500},r._defaultSmallVideoProfile={width:160,height:120,frameRate:15,bitrate:200},r._isVirtualBackground=!1,r._isTestVirtualBackground=!1,r._isBeautyEnabled=!1,r._isTestBeautyEnabled=!1,r._remoteStatisticsUserIdList=[],r._hasJoinedRoom=!1,r._isExitingRoom=!1,r._version=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 Bn(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,E,B,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,E=l||this._enableAutoPlayDialog,I=he(E)?n(n({},I),{enableAutoPlayDialog:E}):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,B=ue(),[4,this._trtc.enterRoom(I)];case 2:return c.sent(),this._hasJoinedRoom=!0,p=ue()-B,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._setAudioMuteType(!1),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._setAudioMuteType(!!e&&"microphone"),[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(),[4,this._updateLocalTestVideo()];case 2: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,25,,26]),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];case"requestPictureInPicture":return[3,19];case"exitPictureInPicture":return[3,21]}return[3,23];case 2:return this._handleSetFrameWork(i),[3,24];case 3:return this._echoCancellation=Boolean(i.enable),[3,24];case 4:return this._noiseSuppression=Boolean(i.enable),[3,24];case 5:return this._autoGainControl=Boolean(i.enable),[3,24];case 6:return this._handleKeyMetricsStats(i),[3,24];case 7:return this._networkProxy=i,[3,24];case 8:return[4,this.setVirtualBackground(i)];case 9:return o.sent(),[3,24];case 10:return[4,this.setTestVirtualBackground(i)];case 11:return o.sent(),[3,24];case 12:return[4,this.setTestBeautyStyle(i.style,i.beautyLevel,i.whitenessLevel,i.ruddinessLevel)];case 13:return o.sent(),[3,24];case 14:return this._setVideoEncodeParamEx(i),[3,24];case 15:return this._enableAutoPlayDialog=Boolean(i.enable),[3,24];case 16:return this._latencyLevel=i.latencyLevel,[3,24];case 17:return[4,this._switchPlaybackQuality(i)];case 18:return o.sent(),[3,24];case 19:return[4,this._requestPictureInPicture()];case 20:return o.sent(),[3,24];case 21:return[4,this._exitPictureInPicture()];case 22:return o.sent(),[3,24];case 23:return[3,24];case 24:return[3,26];case 25:throw o.sent();case 26: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(e){return a(this,void 0,void 0,(function(){var t,A,i,o,r,n,s,a;return c(this,(function(c){switch(c.label){case 0:if(A=(t=e||{}).quality,i=t.stream_list,o=void 0===i?[]:i,!A||0===o.length)return[2];for(r=null,n=0,s=o;n<s.length;n++)(a=s[n]).name===A&&(r=a),a.userId=a.user_id;return r&&r.user_id?[4,this._trtc.callExperimentalAPI("switchPlaybackQuality",{streamList:o,quality:r.name})]:[2];case 1:return c.sent(),[2]}}))}))},i.prototype._requestPictureInPicture=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,"._requestPictureInPicture")),[4,this._trtc.callExperimentalAPI("requestPictureInPicture",{enable:!0})];case 1:return e.sent(),[2]}}))}))},i.prototype._exitPictureInPicture=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,"._exitPictureInPicture")),[4,this._trtc.callExperimentalAPI("requestPictureInPicture",{enable:!1})];case 1:return e.sent(),[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?Br: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 Er;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(){var e={view:this._getLocalTestView(),publish:!1,option:{profile:this._getVideoProfile(),mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}};return this._getIsMobile()?e&&Object.assign(e.option,{useFrontCamera:this._getIsFrontCamera()}):e&&Object.assign(e.option,{cameraId:this._getCurrentCameraId()}),e},i.prototype._generateLocalAudioData=function(){var e={publish:this._getIsAudioPublish(),mute:this._getAudioMuteType(),muteKeepVolumeDetection:!0,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 Be(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 F;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 F;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"))})),this._trtc.on(o.default.EVENT.PICTURE_IN_PICTURE_STATE_CHANGED,(function(e){t.emit("onPictureInPictureStateChanged",e)}))},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._setAudioMuteType=function(e){this._audioMuteType=e},i.prototype._getAudioMuteType=function(){return this._audioMuteType},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)})),e._trtc.on(o.default.EVENT.PICTURE_IN_PICTURE_STATE_CHANGED,(function(e){t.emit("onPictureInPictureStateChanged",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=F,e.TRTCMixUser=q,e.TRTCNetworkQosParam=U,e.TRTCParams=S,e.TRTCPublishCDNParam=G,e.TRTCQualityInfo=N,e.TRTCRemoteStatistics=V,e.TRTCRenderParams=b,e.TRTCScreenCaptureProperty=$,e.TRTCScreenCaptureSourceInfo=j,e.TRTCStatistics=x,e.TRTCTranscodingConfig=W,e.TRTCVideoEncParam=D,e.TRTCVolumeInfo=P,e.default=ls,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,E,B,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,(E=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[E.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",E[E.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(B=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[B.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",B[B.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",B[B.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(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},G=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},F=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 K,j=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,(K=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[K.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",K[K.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",K[K.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",K[K.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",K[K.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",K[K.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",K[K.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",K[K.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",K[K.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",K[K.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 Ee(){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]=Ee(e[A],t[A]):e[A]=t[A]})),e}),{})}function Be(e){var t=null;return e instanceof MediaStream||e instanceof MediaStreamTrack||e instanceof HTMLElement?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]=Be(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(A){Object.hasOwnProperty.call(e,A)&&(t[A]=Be(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),Ge=Ne("".slice),Fe=function(e){return Ge(Pe(e),8,-1)},Ve=Object,xe=Ne("".split),Ye=ye((function(){return!Ve("z").propertyIsEnumerable(0)}))?function(e){return"String"===Fe(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},Ke=function(e){return Ye(Oe(e))},je="object"==typeof document&&document.all,Je={all:je,IS_HTMLDDA:void 0===je&&void 0!==je},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,Et=function(e,t){try{It(ve,e,{value:t,configurable:!0,writable:!0})}catch(A){ve[e]=t}return t},Bt="__core-js_shared__",pt=ve[Bt]||Et(Bt,{}),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+""},Gt=ve.document,Ft=qe(Gt)&&qe(Gt.createElement),Vt=function(e){return Ft?Gt.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=Ke(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,Kt=TypeError,jt=function(e){if(qe(e))return e;throw Kt(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(jt(e),t=Pt(t),jt(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(jt(e),t=Pt(t),jt(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,EA=ve.WeakMap;if(uA||pt.state){var BA=pt.state||(pt.state=new EA);BA.get=BA.get,BA.has=BA.has,BA.set=BA.set,nA=function(e,t){if(BA.has(e))throw IA(CA);return t.facade=e,BA.set(e,t),t},sA=function(e){return BA.get(e)||{}},aA=function(e){return BA.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:Et(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=Ke(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=Ke(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"],GA=PA.concat("length","prototype"),FA={f:Object.getOwnPropertyNames||function(e){return NA(e,GA)}},VA={f:Object.getOwnPropertySymbols},xA=Ne([].concat),YA=Xe("Reflect","ownKeys")||function(e){var t=FA.f(jt(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=jA[KA(e)];return A===WA||A!==JA&&(ze(t)?ye(t):!!t)},KA=OA.normalize=function(e){return String(e).replace(UA,".").toLowerCase()},jA=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]||Et(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"===Fe(function(){return arguments}()),oi=ei?Fe: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?Fe(t):"Object"===(i=Fe(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=jt(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){jt(e);for(var A,i=Ke(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",Ei="script",Bi=dA("IE_PROTO"),pi=function(){},Qi=function(e){return"<"+Ei+">"+e+"</"+Ei+">"},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"+Ei+":",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[Bi]=!0;var yi,Ti,mi=Object.create||function(e,t){var A;return null!==e?(pi[Ii]=jt(e),A=new pi,pi[Ii]=null,A[Bi]=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),Gi=Ne("".slice),Fi=(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];(Fi||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,E=g;if(d&&(h=Pi(h,"y",""),-1===Ni(h,"g")&&(h+="g"),E=Gi(g,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==ki(g,a.lastIndex-1))&&(C="(?: "+C+")",E=" "+E,I++),A=new RegExp("^(?:"+C+")",h)),xi&&(A=new RegExp("^"+C+"$(?!\\s)",h)),Fi&&(i=a.lastIndex),o=we(_i,d?A:a,E),d?o?(o.input=Gi(o.input,I),o[0]=Gi(o[0],I),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Fi&&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+"]+"),Ki=RegExp("(^|[^"+Hi+"])["+Hi+"]+$"),ji=function(e){return function(t){var A=ni(Oe(t));return 1&e&&(A=Ui(A,Oi,"")),2&e&&(A=Ui(A,Ki,"$1")),A}},Ji={start:ji(1),end:ji(2),trim:ji(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"===Fe(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&&jt(i),i}if("RegExp"===Fe(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=jt(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"===Fe(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=[],Eo=Xe("Reflect","construct"),Bo=/^\s*(?:class|function)\b/,po=Ne(Bo.exec),Qo=!Bo.exec(Co),fo=function(e){if(!ze(e))return!1;try{return Eo(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(Bo,cA(e))}catch(t){return!0}};vo.sham=!0;var yo,To=!Eo||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),Go=No||ko||Po,Fo=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(_o);Go&&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 Ko=/XWEB\/\d+/i.test(_o);Ko&&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 jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&/COVC\/\d+/i.test(_o),Jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&!/COVC\/\d+/i.test(_o);(Jo||jo)&&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),!Go&&/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&&!Ko&&!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&&!jo&&!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,Er=-1319,Br=-70252,pr={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},Qr={code:-1005,message:"not supported"},fr="2.10.11-beta.1",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},Gr=e=>"function"==typeof e;var Fr=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<(Gr(a)?a():a)?(g++,l=1,Gr(i)&&i.call(this,g,n),u=window.setTimeout((()=>{u=-1,d(t,h)}),Gr(c)?c(g):c)):(n(),Gr(o)&&o.call(this,e))};Gr(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 Kr=new Map;function jr(e,t,A={}){return(i,o,r)=>{const n=A.action||o;if(!A.context){const A=Kr.get(i)||[];Kr.has(i)||Kr.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=Kr.get(e)||[];let A=new Set,i=[],o=[];const r=new Set,n=Object.getPrototypeOf(e);Kr.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,"avPlayerStateSyncManager"),_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(e.PlayerEvent.LOAD_START,(()=>this.handleLoadStart("video"))),this.audioPlayer.on(e.PlayerEvent.LOAD_START,(()=>this.handleLoadStart("audio"))),this.videoPlayer.on(e.PlayerEvent.PLAYER_STATE_CHANGED,this.handlePlayerStateChanged,this),this.audioPlayer.on(e.PlayerEvent.PLAYER_STATE_CHANGED,this.handlePlayerStateChanged,this),this.videoPlayer.on(e.PlayerEvent.ENTER_PICTURE_IN_PICTURE,this.handleEnterPictureInPicture,this),this.videoPlayer.on(e.PlayerEvent.LEAVE_PICTURE_IN_PICTURE,this.handleLeavePictureInPicture,this),this.videoPlayer.on(e.PlayerEvent.ENTER_FULL_SCREEN,this.handleEnterFullScreen,this),this.videoPlayer.on(e.PlayerEvent.LEAVE_FULL_SCREEN,this.handleLeaveFullScreen,this),this.avPlayerStateSyncManager=new e.AVPlayerStateSyncManager({log:this._log,audioPlayer:this.audioPlayer,videoPlayer:this.videoPlayer})}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()}async handleEnterPictureInPicture(){var e,t;await this.videoPlayer.enterPIPPromise,null==(t=null==(e=this.callback)?void 0:e.onPictureInPictureStateChanged)||t.call(e,{isPictureInPicture:!0,pictureInPictureWindow:this.videoPlayer.pipWindow})}handleLeavePictureInPicture(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onPictureInPictureStateChanged)||t.call(e,{isPictureInPicture:!1})}handleEnterFullScreen(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onFullScreenStateChanged)||t.call(e,{isFullScreen:!0})}handleLeaveFullScreen(){var e,t;null==(t=null==(e=this.callback)?void 0:e.onFullScreenStateChanged)||t.call(e,{isFullScreen:!1})}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(),this.audioPlayer.setMuted(!1))}};Mr([jr([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([jr(["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([jr("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([jr([],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,"_sdkAppId"),_r(this,"_userId"),_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._sdkAppId=s.sdkAppId,this._userId=s.userId,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.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)}));const h=this.player.play();this.player.setVolume(o),await h,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{view:t,volume:A,muted:i,fillMode:o,action:r,fullScreen:n,pictureInPicture:s}=e;this.player.setMuted(i),this.player.setVolume(A),this.player.setFillMode(o),t&&this.player.videoPlayer.setContainer(this.core.utils.isString(t)?document.getElementById(t):t),"pause"===r?this.player.pause():"resume"===r&&this.player.resume(),this.core.utils.isBoolean(n)&&(n?await this.player.enterFullscreen():await this.player.exitFullscreen()),this.core.utils.isBoolean(s)&&(s?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),this.core.room.keyPointManager.uploadKVStat(this.core.kvStatManager,this._sdkAppId)}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=Fr({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;Gr(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&&m("no native wasm support detected");var c,g,u,l,d,h,C,I,E=!1,B=[],p=[],Q=[];function f(e){B.unshift(e)}function v(e){Q.unshift(e)}var y=0,T=null;function m(e){i.onAbort&&i.onAbort(e),a(e="Aborted("+e+")"),E=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw A(t),t}var R,w,S="data:application/octet-stream;base64,",b=e=>e.startsWith(S);function D(e){return Promise.resolve().then((()=>function(e){if(e==R&&n)return new Uint8Array(n);var t=function(e){if(b(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(S.length))}(e);if(t)return t;throw"both async and sync fetching of the wasm failed"}(e)))}b(R="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/f3x8fH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AIARQ0AIAIgBCgCGDYCAAsgAEEBRiEFDAELQQAhBQsgBEFAayQAIAULMQAgACABKAIIQQAQHgRAIAEgAiADED0PCyAAKAIIIgAgASACIAMgACgCACgCHBEGAAsYACAAIAEoAghBABAeBEAgASACIAMQPQsLnQEBAn8jAEFAaiIDJAACf0EBIAAgAUEAEB4NABpBACABRQ0AGkEAIAFBjM0AECAiAUUNABogA0EMakEAQTQQJhogA0EBNgI4IANBfzYCFCADIAA2AhAgAyABNgIIIAEgA0EIaiACKAIAQQEgASgCACgCHBEGACADKAIgIgBBAUYEQCACIAMoAhg2AgALIABBAUYLIQQgA0FAayQAIAQLCgAgACABQQAQHgtOAgF/AXwjAEEQayICJAAgAkEANgIMIAEoAgRB1M8AIAJBDGoQCSEDIAIoAgwiAQRAIAEQAQsgACADRAAAAAAAAAAAYjoAOCACQRBqJAALNwEBfyMAQRBrIgIkACACIAEtADg2AgggAEHUzwAgAkEIahAHNgIEIABB1NUANgIAIAJBEGokAAuoAQEFfyAAKAJUIgMoAgAhBSADKAIEIgQgACgCFCAAKAIcIgdrIgYgBCAGSRsiBgRAIAUgByAGECIaIAMgAygCACAGaiIFNgIAIAMgAygCBCAGayIENgIECyAEIAIgAiAESxsiBARAIAUgASAEECIaIAMgAygCACAEaiIFNgIAIAMgAygCBCAEazYCBAsgBUEAOgAAIAAgACgCLCIBNgIcIAAgATYCFCACC5wBAQJ/IwBBEGsiAiQAQcgAEBwhASAAKAIEIgAQAiACIAA2AgggAUHMLSACQQhqEAc2AgQgAUHU1QA2AgAgAUEBNgIcIAFB1NUANgIYIAFBATYCFCABQdTVADYCECABQQE2AgwgAUHU1QA2AgggAUEAOgAgIAFBADYCRCABQoCAgIAwNwI8IAFBADsANyABQQA7ACsgAkEQaiQAIAELigUCBn4CfyABIAEoAgBBB2pBeHEiAUEQajYCACAAIQkgASkDACEDIAEpAwghBSMAQSBrIgAkAAJAIAVC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBUIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAhSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBUIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0KAgICAgICA+P8AIQIgBEL///////+//8MAVg0AQgAhAiAEQjCIpyIBQZH3AEkNACADIQIgBUL///////8/g0KAgICAgIDAAIQiBCEGAkAgAUGB9wBrIghBwABxBEAgAyAIQUBqrYYhBkIAIQIMAQsgCEUNACAGIAitIgeGIAJBwAAgCGutiIQhBiACIAeGIQILIAAgAjcDECAAIAY3AxgCQEGB+AAgAWsiAUHAAHEEQCAEIAFBQGqtiCEDQgAhBAwBCyABRQ0AIARBwAAgAWuthiADIAGtIgKIhCEDIAQgAoghBAsgACADNwMAIAAgBDcDCCAAKQMIQgSGIAApAwAiA0I8iIQhAiAAKQMQIAApAxiEQgBSrSADQv//////////D4OEIgNCgYCAgICAgIAIWgRAIAJCAXwhAgwBCyADQoCAgICAgICACFINACACQgGDIAJ8IQILIABBIGokACAJIAIgBUKAgICAgICAgIB/g4S/OQMAC0ABAn8jAEEQayICJAAgAiABNgIMIAJB1NUANgIIIAJBCGogABEBACEDIAIoAgwiAQRAIAEQAwsgAkEQaiQAIAMLBABCAAsEAEEAC/YCAQh/IwBBIGsiAyQAIAMgACgCHCIENgIQIAAoAhQhBSADIAI2AhwgAyABNgIYIAMgBSAEayIBNgIUIAEgAmohBUECIQcCfwJAAkACQCAAKAI8IANBEGoiAUECIANBDGoQDSIEBH9B6N4AIAQ2AgBBfwVBAAsEQCABIQQMAQsDQCAFIAMoAgwiBkYNAiAGQQBIBEAgASEEDAQLIAEgBiABKAIEIghLIglBA3RqIgQgBiAIQQAgCRtrIgggBCgCAGo2AgAgAUEMQQQgCRtqIgEgASgCACAIazYCACAFIAZrIQUgACgCPC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,r):r+w);var M=e=>{for(;e.length>0;)e.shift()(i)};function _(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(it(this.get_type()))return h[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var L,k,N,P=e=>{for(var t="",A=e;g[A];)t+=L[g[A++]];return t},G={},F={},V={},x=e=>{throw new k(e)},Y=e=>{throw new N(e)},H=(e,t,A)=>{function i(t){var i=A(t);i.length!==e.length&&Y("Mismatched type converter count");for(var o=0;o<e.length;++o)U(e[o],i[o])}e.forEach((function(e){V[e]=t}));var o=new Array(t.length),r=[],n=0;t.forEach(((e,t)=>{F.hasOwnProperty(e)?o[t]=F[e]:(r.push(e),G.hasOwnProperty(e)||(G[e]=[]),G[e].push((()=>{o[t]=F[e],++n===r.length&&i(o)})))})),0===r.length&&i(o)};function U(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||x(`type "${i}" must have a positive integer typeid pointer`),F.hasOwnProperty(e)){if(A.ignoreDuplicateRegistrations)return;x(`Cannot register type '${i}' twice`)}if(F[e]=t,delete V[e],G.hasOwnProperty(e)){var o=G[e];delete G[e],o.forEach((e=>e()))}}(e,t,A)}var O,K=e=>{x(e.$$.ptrType.registeredClass.name+" instance already deleted")},j=!1,J=e=>{},W=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},z=(e,t,A)=>{if(t===A)return e;if(void 0===A.baseClass)return null;var i=z(e,t,A.baseClass);return null===i?null:A.downcast(i)},Z={},q=[],X=()=>{for(;q.length;){var e=q.pop();e.$$.deleteScheduled=!1,e.delete()}},$={},ee=(e,t)=>(t.ptrType&&t.ptr||Y("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Y("Both smartPtrType and smartPtr must be specified"),t.count={value:1},te(Object.create(e,{$$:{value:t}}))),te=e=>"undefined"==typeof FinalizationRegistry?(te=e=>e,e):(j=new FinalizationRegistry((e=>{W(e.$$)})),J=e=>j.unregister(e),(te=e=>{var t=e.$$;if(t.smartPtr){var A={$$:t};j.register(e,A,e)}return e})(e));function Ae(){}var ie=(e,t)=>Object.defineProperty(t,"name",{value:e}),oe=(e,t,A)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||x(`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 re(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 ne=(e,t,A)=>{for(;t!==A;)t.upcast||x(`Expected null or instance of ${A.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function se(e,t){if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),0;t.$$||x(`Cannot pass "${Me(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`);var A=t.$$.ptrType.registeredClass;return ne(t.$$.ptr,A,this.registeredClass)}function ae(e,t){var A;if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),this.isSmartPointer?(A=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,A),A):0;t.$$||x(`Cannot pass "${Me(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&x(`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=ne(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&x("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?A=t.$$.smartPtr:x(`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,we.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,A)}break;default:x("Unsupporting sharing policy")}return A}function ce(e,t){if(null===t)return this.isReference&&x(`null is not a valid ${this.name}`),0;t.$$||x(`Cannot pass "${Me(t)}" as a ${this.name}`),t.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&x(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var A=t.$$.ptrType.registeredClass;return ne(t.$$.ptr,A,this.registeredClass)}function ge(e){return this.fromWireType(h[e>>2])}function ue(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=ae:i?(this.toWireType=se,this.destructorFunction=null):(this.toWireType=ce,this.destructorFunction=null)}var le,de,he=[],Ce=e=>{var t=he[e];return t||(e>=he.length&&(he.length=e+1),he[e]=t=le.get(e)),t},Ie=(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):Ce(t).apply(null,A),Ee=(e,t)=>{var A,i,o,r=(e=P(e)).includes("j")?(A=e,i=t,o=[],function(){return o.length=0,Object.assign(o,arguments),Ie(A,i,o)}):Ce(t);return"function"!=typeof r&&x(`unknown function pointer with signature ${e}: ${t}`),r},Be=e=>{var t=tt(e),A=P(t);return At(t),A},pe=(e,t)=>{var A=[],i={};throw t.forEach((function e(t){i[t]||F[t]||(V[t]?V[t].forEach(e):(A.push(t),i[t]=!0))})),new de(`${e}: `+A.map(Be).join([", "]))},Qe=(e,t)=>{for(var A=[],i=0;i<e;i++)A.push(h[t+4*i>>2]);return A},fe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function ve(e,t,A,i,o,r){var n=t.length;n<2&&x("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 ie(e,(function(){var A;arguments.length!==u&&x(`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)fe(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 ye=(e,t,A)=>(e instanceof Object||x(`${A} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||x(`${A} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||x(`cannot call emscripten binding method ${A} on deleted object`),ne(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass));function Te(){this.allocated=[void 0],this.freelist=[]}var me=new Te,Re=e=>{e>=me.reserved&&0==--me.get(e).refcount&&me.free(e)},we={toValue:e=>(e||x("Cannot use deleted val. handle = "+e),me.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 me.allocate({refcount:1,value:e})}}};function Se(e){return this.fromWireType(d[e>>2])}var be,De,Me=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},_e=(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}`)}},Le=(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}`)}},ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ne=(e,t,A)=>{for(var i=t+A,o=t;e[o]&&!(o>=i);)++o;if(o-t>16&&e.buffer&&ke)return ke.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},Pe=(e,t)=>e?Ne(g,e,t):"",Ge="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Fe=(e,t)=>{for(var A=e,i=A>>1,o=i+t/2;!(i>=o)&&l[i];)++i;if((A=i<<1)-e>32&&Ge)return Ge.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},Ve=(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},xe=e=>2*e.length,Ye=(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},He=(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},Ue=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},Oe=(e,t)=>{var A=F[e];return void 0===A&&x(t+" has unknown type "+Be(e)),A},Ke=(e,t,A)=>{var i=[],o=e.toWireType(i,A);return i.length&&(h[t>>2]=we.toHandle(i)),o},je={},Je=[],We=Reflect.construct,ze=[null,[],[]],Ze=(e,t)=>{var A=ze[e];0===t||10===t?((1===e?s:a)(Ne(A,0)),A.length=0):A.push(t)};(()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);L=e})(),k=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},N=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(Ae.prototype,{isAliasOf(e){if(!(this instanceof Ae))return!1;if(!(e instanceof Ae))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||K(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=te(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||K(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),J(this),W(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||K(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),q.push(this),1===q.length&&O&&O(X),this.$$.deleteScheduled=!0,this}}),i.getInheritedInstanceCount=()=>Object.keys($).length,i.getLiveInheritedInstances=()=>{var e=[];for(var t in $)$.hasOwnProperty(t)&&e.push($[t]);return e},i.flushPendingDeletes=X,i.setDelayFunction=e=>{O=e,q.length&&O&&O(X)},Object.assign(ue.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:8,readValueFromPointer:ge,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&&x("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t})(e,t),$[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?ee(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ee(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var r,n=this.registeredClass.getActualType(t),s=Z[n];if(!s)return o.call(this);r=this.isConst?s.constPointerType:s.pointerType;var a=z(t,this.registeredClass,r.registeredClass);return null===a?o.call(this):this.isSmartPointer?ee(r.registeredClass.instancePrototype,{ptrType:r,ptr:a,smartPtrType:this,smartPtr:e}):ee(r.registeredClass.instancePrototype,{ptrType:r,ptr:a})}}),de=i.UnboundTypeError=(be=Error,(De=ie("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(be.prototype),De.prototype.constructor=De,De.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},De),Object.assign(Te.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)}}),me.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),me.reserved=me.allocated.length,i.count_emval_handles=()=>{for(var e=0,t=me.reserved;t<me.allocated.length;++t)void 0!==me.allocated[t]&&++e;return e};var qe,Xe={w:(e,t,A)=>{throw new _(e).init(t,A),e},q:(e,t,A,i,o)=>{},u:(e,t,A,i)=>{U(e,{name:t=P(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=P(u),n=Ee(r,n),a&&(a=Ee(s,a)),g&&(g=Ee(c,g)),d=Ee(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)?(x(`Cannot register public name '${e}' twice`),oe(i,e,e),i.hasOwnProperty(A)&&x(`Cannot register multiple overloads of a function with the same number of arguments (${A})!`),i[e].overloadTable[A]=t):i[e]=t})(h,(function(){pe(`Cannot construct ${u} due to unbound types`,[o])})),H([e,t,A],o?[o]:[],(function(t){var A,r;t=t[0],r=o?(A=t.registeredClass).instancePrototype:Ae.prototype;var s=ie(u,(function(){if(Object.getPrototypeOf(this)!==c)throw new k("Use 'new' to construct "+u);if(void 0===l.constructor_body)throw new k(u+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new k(`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 re(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 ue(u,l,!0,!1,!1),I=new ue(u+"*",l,!1,!1,!1),E=new ue(u+" const*",l,!1,!0,!1);return Z[e]={pointerType:I,constPointerType:E},((e,t,A)=>{i.hasOwnProperty(e)||Y("Replacing nonexistant public symbol"),i[e].overloadTable,i[e]=t,i[e].argCount=A})(h,s),[C,I,E]}))},x:(e,t,A,i,o,r)=>{var n=Qe(t,A);o=Ee(i,o),H([],[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 k(`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]=()=>{pe(`Cannot construct ${e.name} due to unbound types`,n)},H([],n,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=ve(A,i,null,o,r),[]))),[]}))},i:(e,t,A,i,o,r,n,s,a)=>{var c=Qe(A,i);t=(e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e})(t=P(t)),r=Ee(o,r),H([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function o(){pe(`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):(oe(a,t,i),a[t].overloadTable[A-2]=o),H([],c,(function(o){var s=ve(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=P(t),o=Ee(i,o),H([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,g={get(){pe(`Cannot access ${i} due to unbound types`,[A,n])},enumerable:!0,configurable:!0};return g.set=a?()=>pe(`Cannot access ${i} due to unbound types`,[A,n]):e=>x(i+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,t,g),H([],a?[A,n]:[A],(function(A){var n=A[0],g={get(){var t=ye(this,e,i+" getter");return n.fromWireType(o(r,t))},enumerable:!0};if(a){a=Ee(s,a);var u=A[1];g.set=function(t){var A=ye(this,e,i+" setter"),o=[];a(c,A,u.toWireType(o,t)),fe(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,g),[]})),[]}))},t:(e,t)=>{U(e,{name:t=P(t),fromWireType:e=>{var t=we.toValue(e);return Re(e),t},toWireType:(e,t)=>we.toHandle(t),argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},p:(e,t,A)=>{U(e,{name:t=P(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:_e(t,A),destructorFunction:null})},g:(e,t,A,i,o)=>{t=P(t);var r=e=>e;if(0===i){var n=32-8*A;r=e=>e<<n>>>n}var s=t.includes("unsigned");U(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:Le(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)}U(e,{name:A=P(A),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},o:(e,t)=>{var A="std::string"===(t=P(t));U(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=Pe(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 At(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||x("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=et(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&&(At(n),x("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(At,r),r},argPackAdvance:8,readValueFromPointer:ge,destructorFunction(e){At(e)}})},l:(e,t,A)=>{var i,o,r,n,s;A=P(A),2===t?(i=Fe,o=Ve,n=xe,r=()=>l,s=1):4===t&&(i=Ye,o=He,n=Ue,r=()=>h,s=2),U(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 At(e),A},toWireType:(e,i)=>{"string"!=typeof i&&x(`Cannot pass non-string to C++ string type ${A}`);var r=n(i),a=et(4+r+t);return h[a>>2]=r>>s,o(i,a+4,r+t),null!==e&&e.push(At,a),a},argPackAdvance:8,readValueFromPointer:Se,destructorFunction(e){At(e)}})},v:(e,t)=>{U(e,{isVoid:!0,name:t=P(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},j:(e,t,A)=>(e=we.toValue(e),t=Oe(t,"emval::as"),Ke(t,A,e)),e:(e,t,A,i,o)=>{var r,n;return(e=Je[e])(t=we.toValue(t),t[A=void 0===(n=je[r=A])?P(r):n],i,o)},d:Re,f:(e,t,A)=>{var i=((e,t)=>{for(var A=new Array(e),i=0;i<e;++i)A[i]=Oe(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=ie(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?We(r,s):r.apply(t,s);for(g=0;g<e;++g)i[g].deleteObject&&i[g].deleteObject(s[g]);return Ke(o,n,u)})),n=Je.length,Je.push(r),n},c:e=>{e>4&&(me.get(e).refcount+=1)},b:e=>{var t=we.toValue(e);fe(t),Re(e)},h:(e,t)=>{var A=(e=Oe(e,"_emval_take_value")).readValueFromPointer(t);return we.toHandle(A)},m:()=>{m("")},s:(e,t,A)=>g.copyWithin(e,t,t+A),r:e=>{g.length,m("OOM")},n:(e,t,A,i)=>{for(var o=0,r=0;r<A;r++){var n=h[t>>2],s=h[t+4>>2];t+=8;for(var a=0;a<s;a++)Ze(e,g[n+a]);o+=s}return h[i>>2]=o,0}},$e=function(){var e={a:Xe};function t(e,t){var A,o;return $e=e.exports,A=$e.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),le=$e.C,o=$e.A,p.unshift(o),function(){if(y--,i.monitorRunDependencies&&i.monitorRunDependencies(y),0==y&&T){var e=T;T=null,e()}}(),$e}if(y++,i.monitorRunDependencies&&i.monitorRunDependencies(y),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 D(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(A,(e=>{a(`failed to asynchronously prepare wasm: ${e}`),m(e)}))}(t,A,i)}(0,R,e,(function(e){t(e.instance)})).catch(A),{}}(),et=e=>(et=$e.B)(e),tt=e=>(tt=$e.D)(e),At=e=>(At=$e.E)(e),it=e=>(it=$e.F)(e);function ot(){function e(){qe||(qe=!0,i.calledRun=!0,E||(M(p),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)v(i.postRun.shift());M(Q)}()))}y>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)f(i.preRun.shift());M(B)}(),y>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=$e.G)(e,t,A,o,r),i._vertexShaderSource=10688,T=function e(){qe||ot(),qe||(T=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ot(),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 En,Bn=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 Bn(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.enabled=!0,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(this.enabled&&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.prototype.setEnabled=function(e){pn.debug("".concat(this.logPrefix,"setEnabled: ").concat(this.enabled," -> ").concat(e)),this.enabled=e,this.movable&&(this.movable.style.cursor=e?"move":"default",pn.debug("".concat(this.logPrefix,"setEnabled: cursor updated to '").concat(e?"move":"default","'")))},e.prototype.isEnabled=function(){return this.enabled},e}();!function(e){e[e.Both=0]="Both",e[e.Corner=1]="Corner",e[e.Edge=2]="Edge"}(En||(En={}));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:En.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:En.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||En.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!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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!==En.Both&&this.options.anchorMode!==En.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.prototype.setVisible=function(e){var t=e?"block":"none";this.topLeftAnchor&&(this.topLeftAnchor.style.display=t),this.topAnchor&&(this.topAnchor.style.display=t),this.topRightAnchor&&(this.topRightAnchor.style.display=t),this.leftAnchor&&(this.leftAnchor.style.display=t),this.rightAnchor&&(this.rightAnchor.style.display=t),this.bottomLeftAnchor&&(this.bottomLeftAnchor.style.display=t),this.bottomAnchor&&(this.bottomAnchor.style.display=t),this.bottomRightAnchor&&(this.bottomRightAnchor.style.display=t)},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.updateCanExceedContainer=function(e){this.movableHandler&&(this.movableHandler.options.canExceedContainer=e),this.resizableHandler&&(this.resizableHandler.options.canExceedContainer=e)},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=this.mediaList[this.selectedMediaIndex],r={left:o.rect.left*this.previewScale,top:o.rect.top*this.previewScale,right:o.rect.right*this.previewScale,bottom:o.rect.bottom*this.previewScale};e="".concat(r.left+this.previewLeft,"px"),t="".concat(r.top+this.previewTop,"px"),A="".concat(r.right-r.left,"px"),i="".concat(r.bottom-r.top,"px");var n=o.interaction||{},s=!1!==n.showBorder,a=!1!==n.showResizeAnchors,c=!1!==n.draggable,g=!1!==n.canExceedCanvas;this.logger.debug("".concat(this.logPrefix,"updateOverlay: interaction config -"),{showBorder:s,showResizeAnchors:a,draggable:c,canExceedCanvas:g}),this.updateCanExceedContainer(g),this.moveAndResizeOverlay.style.display="block",this.moveAndResizeOverlay.style.border=s?"1px solid #3D7EFD":"none",this.resizableHandler&&this.resizableHandler.setVisible(a),this.movableHandler&&(this.logger.debug("".concat(this.logPrefix,"updateOverlay: setting movableHandler.setEnabled(").concat(c,")")),this.movableHandler.setEnabled(c))}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=r.interaction||{};if(!le(s.showResizeAnchors)&&!s.showResizeAnchors)return;var a={left:e-this.previewLeft,top:t-this.previewTop,right:e-this.previewLeft+A,bottom:t-this.previewTop+i},c={left:Math.round(a.left/this.previewScale),top:Math.round(a.top/this.previewScale),right:Math.round(a.right/this.previewScale),bottom:Math.round(a.bottom/this.previewScale)};null===(o=this.eventEmitter)||void 0===o||o.emit("onSourceResized",n({},r),c)}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,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,i,o,r;return c(this,(function(n){switch(n.label){case 0:this.view=null,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.trtc.stopPlugin("VideoMixer")];case 2:return n.sent(),[3,4];case 3:return e=n.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin error:"),e),[3,4];case 4:if(!(this.screensWithSystemAudio.size>0))return[3,12];n.label=5;case 5:n.trys.push([5,10,,11]),A=0,i=Array.from(this.screensWithSystemAudio),n.label=6;case 6:return A<i.length?(o=i[A],[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack_".concat(o)})]):[3,9];case 7:n.sent(),n.label=8;case 8:return A++,[3,6];case 9:return[3,11];case 10:return r=n.sent(),this.logger.error("".concat(this.logPrefix," destroy and stopPlugin AudioMixer error:"),r),[3,11];case 11:this.screensWithSystemAudio.clear(),n.label=12;case 12: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,E,B={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)||(B.x=null===(n=t.layout)||void 0===n?void 0:n.rect.left,B.y=null===(s=t.layout)||void 0===s?void 0:s.rect.top,B.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),B.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)||(B.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);B.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);B.rotation=Q[null===(E=t.layout)||void 0===E?void 0:E.rotation]}return B},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,(null==t?void 0:t.useInternalTrack)?{id:t.id,layout:this._getTRTCLayout(t),useInternalTrack:!0}:{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,(null==t?void 0:t.useInternalTrack)?{id:t.id,layout:this._getTRTCLayout(t),useInternalTrack:!0}:{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(-1!==this.findMediaSourceIndex(t))throw new Error("Media source already existed");if(i=Be(t),o=this._getTRTCSourceKey(i),!(r=this._getTRTCSourceItem(i))||!o)throw new Error("Invalid media source");return(n=Be(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=null==g?void 0:g[t.id],this.logger.log("".concat(this.logPrefix," startPlugin AudioMixer, track ID:"),u.id),[4,this.trtc.startPlugin("AudioMixer",{id:"systemAudioTrack_".concat(t.id),track:u})]):[3,3];case 2:c.sent(),c.label=3;case 3: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:!!le(i.isSelected)||i.isSelected,origin:i,interaction:i.interaction}),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;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=Be(this.trtcSourceMap.get(n))||[],a=s.findIndex((function(e){return e.id===t.id})),s.splice(a,1),[4,this.trtc.updatePlugin("VideoMixer",(u={},u[n]=s,u))];case 1:return g=c.sent().result,t.type===e.TRTCMediaSourceType.kScreen&&this.screensWithSystemAudio.has(t.id)?(this.screensWithSystemAudio.delete(t.id),[4,this.trtc.stopPlugin("AudioMixer",{id:"systemAudioTrack_".concat(t.id)})]):[3,3];case 2:c.sent(),c.label=3;case 3: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:Be(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]),Be(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=Be(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:Be(e),interaction:o.interaction},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,E,B,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?(E=I.layout.rect||{left:0,top:0,right:0,bottom:0},B=E.left,p=E.top,Q=E.right,f=E.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=B*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(Ee(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(Ee(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:Be(e)}),[2]):[2]}))}))},t.mediaMixingManager=null,t}(),Nn=Object.defineProperty,Pn=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Fn=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={}))Gn.call(t,A)&&Vn(e,A,t[A]);if(Pn)for(var A of Pn(t))Fn.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}})}}),Kn=(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})}}}),jn=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({},Kn(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({},Kn(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({},Kn(e))}}}),zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Kn(e))}}}),Zn=e=>({type:"array",required:!1,arrayItem:{type:"object",properties:{id:{required:!0,type:"string"},url:{required:!0,type:"string"},layout:xn({},Kn(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"),Yn(this,"eventListeners",new Map),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({},jn(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({},jn(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}}stop(){var e;this.eventListeners.forEach(((e,t)=>{this.removeEventListeners(t)})),this.eventListeners.clear(),null==(e=this.localMixVideoTrack)||e.close(),this.localMixVideoTrack=null,Object.values(this.systemAudioTrackList).forEach((e=>e.stop())),this.systemAudioTrackList={},delete this.onScreenShareStop,delete this._mixVideoConfig}async parseMixOptions(e){const{RtcError:t,ErrorCode:A}=this.core.errorModule;if(!this.localMixVideoTrack||!this._mixVideoConfig)return{successOptions:{},failedDetails:[]};const i=[],o=xn({},e),{canvasInfo:r,camera:n,screen:s,text:a,image:c,video:g}=e;r&&this.parseCanvasOptions(r);let u=0,l=0;const d=[{key:"camera",options:n,parser:this.parseCameraOptions.bind(this)},{key:"screen",options:s,parser:this.parseScreenOptions.bind(this)},{key:"text",options:a,parser:this.parseTextOptions.bind(this)},{key:"image",options:c,parser:this.parseImageOptions.bind(this)},{key:"video",options:g,parser:this.parseVideoOptions.bind(this)}];for(const{key:h,options:C,parser:I}of d)if(C){u++;const e=await I(this.localMixVideoTrack,C,this._mixVideoConfig[h]||[]);this._mixVideoConfig[h]=e.finalOptions,o[h]=e.finalOptions,e.errors.length>0&&(i.push(...e.errors),e.errors.length===C.length&&l++)}if(l>0&&l===u)throw new t({code:A.INVALID_PARAMETER,message:"all sources mix failed",data:{failedDetails:i}});return{successOptions:o,failedDetails:i}}parseCanvasOptions(e){if(!this.localMixVideoTrack||!this._mixVideoConfig)return;const{canvasColor:t,width:A,height:i,frameRate:o}=e;t&&this.localMixVideoTrack.setMixBackground(t),o&&this.localMixVideoTrack.setFps(o),this.localMixVideoTrack.resizeMixCanvas(A,i),this._mixVideoConfig.canvasInfo=e}prepareSourceOptions(e,t){const A=new Set(e.map((e=>e.id)));return{removeIdList:t.filter((e=>!A.has(e.id))).map((e=>e.id)),preOptionsMap:new Map(t.map((e=>[e.id,e])))}}recordSourceError(e,t,A,i,o){o.push({id:e,error:t}),A.has(e)&&i.push(A.get(e))}async parseCameraOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeCameraSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleCameraSource(e,s),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleCameraSource(e,t){var A;const{id:i,layout:o,profile:r,useInternalTrack:n}=t;n&&((null==(A=this.core.trtc.localVideoTrack)?void 0:A.sourceTrack)?t.videoTrack=this.core.trtc.localVideoTrack.sourceTrack:t.videoTrack=this.createPlaceholderVideoTrack()),this.log.info(`videomixer camera option ${JSON.stringify(t)}`),e.inputLocalVideoTracks.has(i)?await this.updateExistingCameraSource(e,t):await this.addNewCameraSource(e,t)}async updateExistingCameraSource(e,t){var A,i;const{id:o,layout:r,profile:n}=t,s=null==(A=e.inputLocalVideoTracks.get(o))?void 0:A.mediaTrack;await this.updateCameraProfile(t);const a=null==(i=e.inputLocalVideoTracks.get(o))?void 0:i.mediaTrack,c=this.resolveVideoProfile(n);a!==s?e.updateCameraSource(o,r,a,c):e.updateCameraSource(o,r,null,c)}async addNewCameraSource(e,t){const{id:A,layout:i,useInternalTrack:o}=t,r=await this.captureCamera(t);if(this.removeEventListeners(A),o){const t=t=>{var i,o;if(null==(i=t.track)?void 0:i.isScreen)return;this.log.info("videomixer camera LOCAL_TRACK_CAPTURE_SUCCESS");const r=e.inputLocalVideoTracks.get(A);r&&(null==(o=t.track)?void 0:o.sourceTrack)&&r.setInputMediaStreamTrack(t.track.sourceTrack)};this.core.innerEmitter.on("102",t),this.eventListeners.has(A)||this.eventListeners.set(A,{}),this.eventListeners.get(A).captureSuccess=()=>{this.core.innerEmitter.off("102",t)}}try{e.addCameraSource(A,r,i)}catch(e){throw r.close(),e}}resolveVideoProfile(e){if(!this.core.utils.isUndefined(e))return this.core.utils.isString(e)?this.core.constants.videoProfileMap[e]:e}async parseScreenOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeScreenSource(s),this.removeSystemAudioTrack(s);const r=[],n=[];for(const s of t)try{await this.processSingleScreenSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleScreenSource(e,t,A){var i,o;const{id:r,layout:n,useInternalTrack:s}=t;s&&((null==(i=this.core.trtc.localScreenTrack)?void 0:i.mediaTrack)?(t.videoTrack=this.core.trtc.localScreenTrack.mediaTrack,(null==(o=this.core.trtc.localScreenAudioTrack)?void 0:o.mediaTrack)&&(t.audioTrack=this.core.trtc.localScreenAudioTrack.mediaTrack),delete t.captureElement,delete t.preferDisplaySurface,delete t.systemAudio):t.videoTrack=this.createPlaceholderVideoTrack()),this.log.info(`videomixer screen option ${JSON.stringify(t)}`);const a=A.get(r),c=e.inputLocalScreenTracks.has(r),g=!(null==a?void 0:a.systemAudio)&&t.systemAudio;c&&!g?this.updateExistingScreenSource(e,r,n,a,t):await this.addNewScreenSource(e,t,a)}updateExistingScreenSource(e,t,A,i,o){e.updateScreenSource(t,A),(null==i?void 0:i.systemAudio)&&!o.systemAudio&&this.removeSystemAudioTrack(t)}async addNewScreenSource(e,t,A){const{id:i,useInternalTrack:o}=t,r=await this.captureScreen(t);if(this.removeEventListeners(i),o){const t=t=>{var A,o,r;if(!(null==(A=t.track)?void 0:A.isScreen))return;this.log.info("videomixer screen LOCAL_TRACK_CAPTURE_SUCCESS");const n=e.inputLocalScreenTracks.get(i);n&&(null==(o=t.track)?void 0:o.mediaTrack)&&n.setInputMediaStreamTrack(t.track.mediaTrack),this.systemAudioTrackList[i]&&(null==(r=t.track)?void 0:r.mediaTrack)&&(this.systemAudioTrackList[i]=t.track.mediaTrack)};this.core.innerEmitter.on("102",t),this.eventListeners.has(i)||this.eventListeners.set(i,{}),this.eventListeners.get(i).captureSuccess=()=>{this.core.innerEmitter.off("102",t)}}!(null==A?void 0:A.systemAudio)&&t.systemAudio&&e.inputLocalScreenTracks.has(t.id)&&e.removeScreenSource(t.id);try{e.addScreenSource(t.id,r,t.layout)}catch(e){throw r.close(),e}}async parseTextOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeTextSource(s);const r=[],n=[];for(const s of t)try{o.has(s.id)?e.updateTextSource(s):e.addTextSource(s),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async parseImageOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeImageSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleImageSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleImageSource(e,t,A){const{id:i,url:o,layout:r}=t,n=A.get(i);if(n){let t;n.url!==o&&(t=await this.core.utils.loadImage(o)),e.updateImageSource(i,r,t)}else{const t=await this.core.utils.loadImage(o);e.addImageSource(i,t,r)}}async parseVideoOptions(e,t,A=[]){const{removeIdList:i,preOptionsMap:o}=this.prepareSourceOptions(t,A);for(const s of i)e.removeVideoSource(s);const r=[],n=[];for(const s of t)try{await this.processSingleVideoSource(e,s,o),r.push(s)}catch(e){this.recordSourceError(s.id,e,o,r,n)}return{finalOptions:r,errors:n}}async processSingleVideoSource(e,t,A){const{id:i,url:o,layout:r}=t,n=A.get(i);if(n){let t;n.url!==o&&(t=await this.core.utils.loadVideo(o)),e.updateVideoSource(i,r,t)}else{const t=await this.core.utils.loadVideo(o);e.addVideoSource(i,t,r)}}createPlaceholderVideoTrack(){const e=document.createElement("canvas");e.width=640,e.height=480;const t=e.getContext("2d");return t&&(t.fillStyle="black",t.fillRect(0,0,e.width,e.height)),e.captureStream(1).getVideoTracks()[0]}removeEventListeners(e){const t=this.eventListeners.get(e);t&&(t.inputMediaTrackChanged&&t.inputMediaTrackChanged(),t.captureSuccess&&t.captureSuccess(),this.eventListeners.delete(e))}async captureCamera(e){const{id:t,cameraId:A,videoTrack:i,profile:o}=e,r=new this.core.LocalVideoTrack;r.log.id+=`-${t}`;const n={};if(A?n.deviceId=A:this.core.utils.isUndefined(i)||(n.customSource=i),!this.core.utils.isUndefined(o)){const e=this.resolveVideoProfile(o);e&&r.setProfile(e)}return 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);if(n&&(i?await n.switchDevice(i):this.core.utils.isUndefined(o)||await n.setInputMediaStreamTrack(o),!this.core.utils.isUndefined(r))){const e=this.resolveVideoProfile(r);e&&n.setProfile(e),i&&n.isNeedToSwitchDevice(i)||await n.applyProfile()}}async captureScreen(e){const{id:t,profile:A,captureElement:i,preferDisplaySurface:o,systemAudio:r,videoTrack:n,audioTrack:s}=e,a=new this.core.LocalScreenTrack;a.log.id+=`-${t}`;const c={captureElement:i,preferDisplaySurface:o,systemAudio:r,videoTrack:n,audioTrack:s};if(!this.core.utils.isUndefined(A))if(this.core.utils.isString(A)){const e=this.core.constants.screenProfileMap[A];e&&a.setProfile(e)}else a.setProfile(A);const g=await a.capture(c);return r&&g.getAudioTracks().length>0?(this.systemAudioTrackList[t]=g.getAudioTracks()[0],this.log.info(`${t} system audio track captured`)):this.removeSystemAudioTrack(t),a.mediaTrack.addEventListener(this.core.constants.NAME.ENDED,(()=>{this.handleScreenShareEnded(t)})),a}handleScreenShareEnded(e){var t,A,i;null==(t=this.localMixVideoTrack)||t.removeScreenSource(e),(null==(A=this._mixVideoConfig)?void 0:A.screen)&&(this._mixVideoConfig.screen=this._mixVideoConfig.screen.filter((t=>t.id!==e))),null==(i=this.onScreenShareStop)||i.call(this,e)}async _updatePreview({view:e,track:t,prevConfig:A}){if(this.core.utils.isUndefined(e)&&(null==A?void 0:A.view)){const e=this.core.utils.getViewListFromView(A.view);e.length>0&&await t.play(e)}else if(!this.core.utils.isUndefined(e)){const A=this.core.utils.getViewListFromView(e);A.length>0?await t.play(A):t.stop()}}removeSystemAudioTrack(e){const t=this.systemAudioTrackList[e];t&&(t.stop(),this.log.info(`${e} system audio track stop`),delete this.systemAudioTrackList[e])}};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 E=s?i:void 0;return h.push({fn:r,args:t,context:this},!1,s,E)},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._audioMuteType=!1,r._audioProfile=o.default.TYPE.AUDIO_PROFILE_STANDARD,r._captureVolume=100,r._playoutVolume=100,r._isSharingScreen=!1,r._remoteStreamConfig=new Map,r._remoteStreamMap=new Map,r._cameraList=[],r._microphoneList=[],r._speakerList=[],r._currentCamera={},r._currentMicrophone={},r._currentSpeaker={},r._currentCameraId="",r._currentMicrophoneId="",r._currentSpeakerId="",r._screenShareParams={option:{}},r._isMobile=Fo,r._isFrontCamera=!0,r._cameraVideoTrack=null,r._smallStreamVideoProfile=void 0,r._qosPreference=void 0,r._defaultVideoProfile={width:640,height:480,frameRate:15,bitrate:900},r._defaultScreenProfile={width:1920,height:1080,frameRate:15,bitrate:1500},r._defaultSmallVideoProfile={width:160,height:120,frameRate:15,bitrate:200},r._isVirtualBackground=!1,r._isTestVirtualBackground=!1,r._isBeautyEnabled=!1,r._isTestBeautyEnabled=!1,r._remoteStatisticsUserIdList=[],r._hasJoinedRoom=!1,r._isExitingRoom=!1,r._version=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 Bn(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,E,B,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,E=l||this._enableAutoPlayDialog,I=he(E)?n(n({},I),{enableAutoPlayDialog:E}):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,B=ue(),[4,this._trtc.enterRoom(I)];case 2:return c.sent(),this._hasJoinedRoom=!0,p=ue()-B,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._setAudioMuteType(!1),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._setAudioMuteType(!!e&&"microphone"),[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,streamType: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,A;return c(this,(function(i){switch(i.label){case 0:i.trys.push([0,7,,8]),i.label=1;case 1:return i.trys.push([1,3,,6]),[4,this._trtc.startLocalVideo({option:{videoTrack:t}})];case 2:return i.sent(),[3,6];case 3:return(e=i.sent()).code!==o.default.ERROR_CODE.OPERATION_ABORT?[3,5]:[4,this._trtc.updateLocalVideo({option:{videoTrack:t},forcePublish:!0})];case 4:i.sent(),i.label=5;case 5:throw e;case 6:return[3,8];case 7:return A=i.sent(),this._callFunctionErrorManage(A,"startPublishVideoTrack"),[3,8];case 8: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(),[4,this._updateLocalTestVideo()];case 2: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,25,,26]),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];case"requestPictureInPicture":return[3,19];case"exitPictureInPicture":return[3,21]}return[3,23];case 2:return this._handleSetFrameWork(i),[3,24];case 3:return this._echoCancellation=Boolean(i.enable),[3,24];case 4:return this._noiseSuppression=Boolean(i.enable),[3,24];case 5:return this._autoGainControl=Boolean(i.enable),[3,24];case 6:return this._handleKeyMetricsStats(i),[3,24];case 7:return this._networkProxy=i,[3,24];case 8:return[4,this.setVirtualBackground(i)];case 9:return o.sent(),[3,24];case 10:return[4,this.setTestVirtualBackground(i)];case 11:return o.sent(),[3,24];case 12:return[4,this.setTestBeautyStyle(i.style,i.beautyLevel,i.whitenessLevel,i.ruddinessLevel)];case 13:return o.sent(),[3,24];case 14:return this._setVideoEncodeParamEx(i),[3,24];case 15:return this._enableAutoPlayDialog=Boolean(i.enable),[3,24];case 16:return this._latencyLevel=i.latencyLevel,[3,24];case 17:return[4,this._switchPlaybackQuality(i)];case 18:return o.sent(),[3,24];case 19:return[4,this._requestPictureInPicture()];case 20:return o.sent(),[3,24];case 21:return[4,this._exitPictureInPicture()];case 22:return o.sent(),[3,24];case 23:return[3,24];case 24:return[3,26];case 25:throw o.sent();case 26: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(e){return a(this,void 0,void 0,(function(){var t,A,i,o,r,n,s,a;return c(this,(function(c){switch(c.label){case 0:if(A=(t=e||{}).quality,i=t.stream_list,o=void 0===i?[]:i,!A||0===o.length)return[2];for(r=null,n=0,s=o;n<s.length;n++)(a=s[n]).name===A&&(r=a),a.userId=a.user_id;return r&&r.user_id?[4,this._trtc.callExperimentalAPI("switchPlaybackQuality",{streamList:o,quality:r.name})]:[2];case 1:return c.sent(),[2]}}))}))},i.prototype._requestPictureInPicture=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,"._requestPictureInPicture")),[4,this._trtc.callExperimentalAPI("requestPictureInPicture",{enable:!0})];case 1:return e.sent(),[2]}}))}))},i.prototype._exitPictureInPicture=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,"._exitPictureInPicture")),[4,this._trtc.callExperimentalAPI("requestPictureInPicture",{enable:!1})];case 1:return e.sent(),[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?Br: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 Er;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(){var e={view:this._getLocalTestView(),publish:!1,option:{profile:this._getVideoProfile(),mirror:this._getTRTCLocalMirror(this._localRenderParams.mirrorType,this._encoderMirror),fillMode:this._getTRTCFillMode(this._localRenderParams.fillMode)}};return this._getIsMobile()?e&&Object.assign(e.option,{useFrontCamera:this._getIsFrontCamera()}):e&&Object.assign(e.option,{cameraId:this._getCurrentCameraId()}),e},i.prototype._generateLocalAudioData=function(){var e={publish:this._getIsAudioPublish(),mute:this._getAudioMuteType(),muteKeepVolumeDetection:!0,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 Be(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 F;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 F;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"))})),this._trtc.on(o.default.EVENT.PICTURE_IN_PICTURE_STATE_CHANGED,(function(e){t.emit("onPictureInPictureStateChanged",e)}))},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),le(e.streamType)||(this._screenShareParams.streamType=this._getTRTCStreamType(e.streamType))},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._setAudioMuteType=function(e){this._audioMuteType=e},i.prototype._getAudioMuteType=function(){return this._audioMuteType},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)})),e._trtc.on(o.default.EVENT.PICTURE_IN_PICTURE_STATE_CHANGED,(function(e){t.emit("onPictureInPictureStateChanged",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=F,e.TRTCMixUser=q,e.TRTCNetworkQosParam=U,e.TRTCParams=S,e.TRTCPublishCDNParam=G,e.TRTCQualityInfo=N,e.TRTCRemoteStatistics=V,e.TRTCRenderParams=M,e.TRTCScreenCaptureProperty=$,e.TRTCScreenCaptureSourceInfo=j,e.TRTCStatistics=x,e.TRTCTranscodingConfig=W,e.TRTCVideoEncParam=b,e.TRTCVolumeInfo=P,e.default=ls,Object.defineProperty(e,"__esModule",{value:!0})}));