trtc-cloud-js-sdk
Version:
Tencent Cloud RTC SDK for Web And Electron
1 lines β’ 294 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("trtc-sdk-v5"),require("trtc-sdk-v5/plugins/video-effect/virtual-background")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/video-effect/virtual-background"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.virtualBackground)}(this,(function(e,t,A){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])},r(e,t)};var n=function(){return n=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++)for(var o in t=arguments[A])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function s(e,t,A,i){var o,r=arguments.length,n=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,A):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,A,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(n=(r<3?o(n):r>3?o(t,A,n):o(t,A))||n);return r>3&&n&&Object.defineProperty(t,A,n),n}function a(e,t,A,i){return new(A||(A=Promise))((function(o,r){function n(e){try{a(i.next(e))}catch(sr){r(sr)}}function s(e){try{a(i.throw(e))}catch(sr){r(sr)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof A?t:new A((function(e){e(t)}))).then(n,s)}a((i=i.apply(e,t||[])).next())}))}function c(e,t){var A,i,o,r,n={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(a){return function(s){if(A)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(n=0)),n;)try{if(A=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(!(o=n.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){n=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(6===s[0]&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(sr){s=[6,sr],i=0}finally{A=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,A=t&&e[t],i=0;if(A)return A.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t,A){if(A||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,A=e[Symbol.asyncIterator];return A?A.call(e):(e=g(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(A){t[A]=e[A]&&function(t){return new Promise((function(i,o){(function(e,t,A,i){Promise.resolve(i).then((function(t){e({value:t,done:A})}),t)})(i,o,(t=e[A](t)).done,t.value)}))}}}var d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e,t){return e(t={exports:{}},t.exports),t.exports}var C,I,B,E,p,Q,f,v,y=h((function(e){var t=Object.prototype.hasOwnProperty,A="~";function i(){}function o(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function r(e,t,i,r,n){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new o(i,r||e,n),a=A?A+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],s]:e._events[a].push(s):(e._events[a]=s,e._eventsCount++),e}function n(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(A=!1)),s.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)t.call(e,i)&&o.push(A?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=A?A+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,r=i.length,n=new Array(r);o<r;o++)n[o]=i[o].fn;return n},s.prototype.listenerCount=function(e){var t=A?A+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,o,r,n){var s=A?A+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,i),!0;case 4:return g.fn.call(g.context,t,i,o),!0;case 5:return g.fn.call(g.context,t,i,o,r),!0;case 6:return g.fn.call(g.context,t,i,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,i);break;case 4:g[c].fn.call(g[c].context,t,i,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},s.prototype.on=function(e,t,A){return r(this,e,t,A,!1)},s.prototype.once=function(e,t,A){return r(this,e,t,A,!0)},s.prototype.removeListener=function(e,t,i,o){var r=A?A+e:e;if(!this._events[r])return this;if(!t)return n(this,r),this;var s=this._events[r];if(s.fn)s.fn!==t||o&&!s.once||i&&s.context!==i||n(this,r);else{for(var a=0,c=[],g=s.length;a<g;a++)(s[a].fn!==t||o&&!s[a].once||i&&s[a].context!==i)&&c.push(s[a]);c.length?this._events[r]=1===c.length?c[0]:c:n(this,r)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=A?A+e:e,this._events[t]&&n(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=A,s.EventEmitter=s,e.exports=s}));e.TRTCVideoResolution=void 0,(C=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[C.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",C[C.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",C[C.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",C[C.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",C[C.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",C[C.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",C[C.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",C[C.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",C[C.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",C[C.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",C[C.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",C[C.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",C[C.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",C[C.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",C[C.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",C[C.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",C[C.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",C[C.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",C[C.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",C[C.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(I=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[I.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",I[I.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",I[I.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(B=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[B.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",B[B.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(E=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[E.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",E[E.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",E[E.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(p=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[p.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",p[p.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(Q=e.TRTCAppScene||(e.TRTCAppScene={}))[Q.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",Q[Q.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",Q[Q.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",Q[Q.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(f=e.TRTCRoleType||(e.TRTCRoleType={}))[f.TRTCRoleAnchor=20]="TRTCRoleAnchor",f[f.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(v=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[v.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",v[v.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",v[v.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var T,m,R=function(e,t,A,i,o){void 0===e&&(e=""),void 0===t&&(t=""),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=""),this.deviceId=e,this.deviceName=t,this.kind=A,this.label=i,this.groupId=o};e.TRTCDeviceState=void 0,(T=e.TRTCDeviceState||(e.TRTCDeviceState={}))[T.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",T[T.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",T[T.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(m=e.TRTCDeviceType||(e.TRTCDeviceType={}))[m.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",m[m.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",m[m.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",m[m.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var w,S=function(t,A,i,o,r,n,s,a,c,g,u){void 0===t&&(t=0),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=0),void 0===r&&(r=""),void 0===n&&(n=e.TRTCRoleType.TRTCRoleAnchor),void 0===s&&(s=null),void 0===c&&(c=null),void 0===g&&(g=null),void 0===u&&(u=30),this.sdkAppId=t,this.userId=A,this.userSig=i,this.roomId=o,this.strRoomId=r,this.role=n,this.privateMapKey=s,this.streamId=c,this.userDefineRecordId=g,this.frameWorkType=u},b=function(t,A,i,o){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===A&&(A=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===i&&(i=15),void 0===o&&(o=550),this.videoResolution=t,this.resMode=A,this.videoFps=i,this.videoBitrate=o};e.TRTCVideoRotation=void 0,(w=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[w.TRTCVideoRotation0=0]="TRTCVideoRotation0",w[w.TRTCVideoRotation90=1]="TRTCVideoRotation90",w[w.TRTCVideoRotation180=2]="TRTCVideoRotation180",w[w.TRTCVideoRotation270=3]="TRTCVideoRotation270";var D,M=function(t,A,i){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===A&&(A=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===i&&(i=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=A,this.mirrorType=i};e.TRTCQuality=void 0,(D=e.TRTCQuality||(e.TRTCQuality={}))[D.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",D[D.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",D[D.TRTCQuality_Good=2]="TRTCQuality_Good",D[D.TRTCQuality_Poor=3]="TRTCQuality_Poor",D[D.TRTCQuality_Bad=4]="TRTCQuality_Bad",D[D.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",D[D.TRTCQuality_Down=6]="TRTCQuality_Down";var _,L,k,N=function(t,A){void 0===t&&(t=""),void 0===A&&(A=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=A},P=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},F=function(e,t,A){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=null),this.appId=e,this.bizId=t,this.url=A},G=function(t,A,i,o,r,n,s){void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===n&&(n=0),void 0===s&&(s=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.width=t,this.height=A,this.frameRate=i,this.videoBitrate=o,this.audioBitrate=n,this.streamType=s},V=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h){void 0===t&&(t=""),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===a&&(a=0),void 0===h&&(h=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=i,this.height=o,this.frameRate=r,this.videoBitrate=n,this.audioBitrate=a,this.streamType=h},x=function(e,t,A,i,o,r,n,s,a,c,g){void 0===e&&(e=0),void 0===t&&(t=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=[]),void 0===a&&(a=0),void 0===c&&(c=[]),void 0===g&&(g=0),this.upLoss=e,this.downLoss=t,this.rtt=o,this.receivedBytes=r,this.sentBytes=n,this.localStatisticsArray=s,this.localStatisticsArraySize=a,this.remoteStatisticsArray=c,this.remoteStatisticsArraySize=g};e.TRTCVideoResolutionMode=void 0,(_=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[_.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",_[_.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(L=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[L.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",L[L.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(k=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[k.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",k[k.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var Y,H,U=function(t,A){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===A&&(A=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=A},O=function(e,t,A,i){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.buffer=e,this.length=t,this.width=A,this.height=i};e.TRTCLogLevel=void 0,(Y=e.TRTCLogLevel||(e.TRTCLogLevel={}))[Y.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",Y[Y.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",Y[Y.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",Y[Y.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",Y[Y.TRTCLogLevelError=4]="TRTCLogLevelError",Y[Y.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",Y[Y.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(H=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[H.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",H[H.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",H[H.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",H[H.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var J,K=function(t,A,i,o,r,n){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===A&&(A=""),void 0===i&&(i=""),void 0===o&&(o=new O),void 0===r&&(r=new O),void 0===n&&(n=!1),this.type=t,this.sourceId=A,this.sourceName=i,this.thumbBGRA=o,this.iconBGRA=r,this.isMinimizeWindow=n},j=function(e,t,A,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===A&&(A=0),void 0===i&&(i=0),this.left=e,this.top=t,this.right=A,this.bottom=i},W=function(t,A,i,o,r,n,s,a,c,g,u,l,d,h,C){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===A&&(A=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=15),void 0===a&&(a=2),void 0===c&&(c=0),void 0===g&&(g=""),void 0===u&&(u=64),void 0===l&&(l=48e3),void 0===d&&(d=1),void 0===h&&(h=[]),void 0===C&&(C=""),this.mode=t,this.appId=A,this.bizId=i,this.videoWidth=o,this.videoHeight=r,this.videoBitrate=n,this.videoFramerate=s,this.videoGOP=a,this.backgroundColor=c,this.backgroundImage=g,this.audioSampleRate=u,this.audioBitrate=l,this.audioChannels=d,this.mixUsersArray=h,this.mixUsersArraySize=h.length,this.streamId=C};e.TRTCTranscodingConfigMode=void 0,(J=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[J.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",J[J.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",J[J.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",J[J.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",J[J.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",J[J.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",J[J.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",J[J.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",J[J.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",J[J.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var z,Z,q=function(t,A,i,o,r,n,s,a){void 0===t&&(t=""),void 0===A&&(A=""),void 0===i&&(i=null),void 0===o&&(o=0),void 0===r&&(r=!1),void 0===n&&(n=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),void 0===s&&(s=e.TRTCMixInputType.TRTCMixInputTypeUndefined),void 0===a&&(a=0),this.userId=t,this.roomId=A,this.rect=i,this.zOrder=o,this.pureAudio=r,this.streamType=n,this.inputType=s,this.renderMode=a};e.TRTCMixInputType=void 0,(z=e.TRTCMixInputType||(e.TRTCMixInputType={}))[z.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",z[z.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",z[z.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",z[z.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(Z=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[Z.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",Z[Z.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",Z[Z.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",Z[Z.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var X,$=function(e,t,A,i,o,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===A&&(A=!0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=A,this.highLightColor=i,this.highLightWidth=o,this.enableCaptureChildWindow=r},ee="onError",te="onWarning",Ae="rtc",ie="live",oe="VirtualBackground",re="BasicBeauty",ne="blur",se="image",ae={20:"anchor",21:"audience"},ce={0:Ae,1:ie,2:Ae,3:ie};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(X||(X={}));var ge="enum";function ue(){return Math.floor(performance.now())}var le=function(e){return void 0===e},de=function(e){return"number"==typeof e},he=function(e){return"boolean"==typeof e};function Ce(e){if("string"!=typeof e)return e;var t;try{var A=JSON.parse(e);t="object"==typeof A&&A?A:e}catch(i){t=e}return t}function Ie(e){return null==e}function Be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Object.keys(t).forEach((function(A){e[A]&&"object"==typeof e[A]?e[A]=Be(e[A],t[A]):e[A]=t[A]})),e}),{})}function Ee(e){var t=null;return e instanceof MediaStream||e instanceof MediaStreamTrack||e 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]=Ee(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(A){Object.hasOwnProperty.call(e,A)&&(t[A]=Ee(e[A]))}))):t=e,t)}var pe,Qe,fe=function(e){return e&&e.Math===Math&&e},ve=fe("object"==typeof globalThis&&globalThis)||fe("object"==typeof window&&window)||fe("object"==typeof self&&self)||fe("object"==typeof d&&d)||function(){return this}()||d||Function("return this")(),ye=function(e){try{return!!e()}catch(t){return!0}},Te=!ye((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),me=!ye((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Re=Function.prototype.call,we=me?Re.bind(Re):function(){return Re.apply(Re,arguments)},Se={}.propertyIsEnumerable,be=Object.getOwnPropertyDescriptor,De={f:be&&!Se.call({1:2},1)?function(e){var t=be(this,e);return!!t&&t.enumerable}:Se},Me=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_e=Function.prototype,Le=_e.call,ke=me&&_e.bind.bind(Le,Le),Ne=me?ke:function(e){return function(){return Le.apply(e,arguments)}},Pe=Ne({}.toString),Fe=Ne("".slice),Ge=function(e){return Fe(Pe(e),8,-1)},Ve=Object,xe=Ne("".split),Ye=ye((function(){return!Ve("z").propertyIsEnumerable(0)}))?function(e){return"String"===Ge(e)?xe(e,""):Ve(e)}:Ve,He=function(e){return null==e},Ue=TypeError,Oe=function(e){if(He(e))throw Ue("Can't call method on "+e);return e},Je=function(e){return Ye(Oe(e))},Ke="object"==typeof document&&document.all,je={all:Ke,IS_HTMLDDA:void 0===Ke&&void 0!==Ke},We=je.all,ze=je.IS_HTMLDDA?function(e){return"function"==typeof e||e===We}:function(e){return"function"==typeof e},Ze=je.all,qe=je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ze(e)||e===Ze}:function(e){return"object"==typeof e?null!==e:ze(e)},Xe=function(e,t){return arguments.length<2?(A=ve[e],ze(A)?A:void 0):ve[e]&&ve[e][t];var A},$e=Ne({}.isPrototypeOf),et="undefined"!=typeof navigator&&String(navigator.userAgent)||"",tt=ve.process,At=ve.Deno,it=tt&&tt.versions||At&&At.version,ot=it&&it.v8;ot&&(Qe=(pe=ot.split("."))[0]>0&&pe[0]<4?1:+(pe[0]+pe[1])),!Qe&&et&&(!(pe=et.match(/Edge\/(\d+)/))||pe[1]>=74)&&(pe=et.match(/Chrome\/(\d+)/))&&(Qe=+pe[1]);var rt=Qe,nt=ve.String,st=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol("symbol detection");return!nt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),at=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ct=Object,gt=at?function(e){return"symbol"==typeof e}:function(e){var t=Xe("Symbol");return ze(t)&&$e(t.prototype,ct(e))},ut=String,lt=TypeError,dt=function(e){if(ze(e))return e;throw lt(function(e){try{return ut(e)}catch(t){return"Object"}}(e)+" is not a function")},ht=function(e,t){var A=e[t];return He(A)?void 0:dt(A)},Ct=TypeError,It=Object.defineProperty,Bt=function(e,t){try{It(ve,e,{value:t,configurable:!0,writable:!0})}catch(A){ve[e]=t}return t},Et="__core-js_shared__",pt=ve[Et]||Bt(Et,{}),Qt=h((function(e){(e.exports=function(e,t){return pt[e]||(pt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"Β© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ft=Object,vt=function(e){return ft(Oe(e))},yt=Ne({}.hasOwnProperty),Tt=Object.hasOwn||function(e,t){return yt(vt(e),t)},mt=0,Rt=Math.random(),wt=Ne(1..toString),St=function(e){return"Symbol("+(void 0===e?"":e)+")_"+wt(++mt+Rt,36)},bt=ve.Symbol,Dt=Qt("wks"),Mt=at?bt.for||bt:bt&&bt.withoutSetter||St,_t=function(e){return Tt(Dt,e)||(Dt[e]=st&&Tt(bt,e)?bt[e]:Mt("Symbol."+e)),Dt[e]},Lt=TypeError,kt=_t("toPrimitive"),Nt=function(e,t){if(!qe(e)||gt(e))return e;var A,i=ht(e,kt);if(i){if(void 0===t&&(t="default"),A=we(i,e,t),!qe(A)||gt(A))return A;throw Lt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var A,i;if("string"===t&&ze(A=e.toString)&&!qe(i=we(A,e)))return i;if(ze(A=e.valueOf)&&!qe(i=we(A,e)))return i;if("string"!==t&&ze(A=e.toString)&&!qe(i=we(A,e)))return i;throw Ct("Can't convert object to primitive value")}(e,t)},Pt=function(e){var t=Nt(e,"string");return gt(t)?t:t+""},Ft=ve.document,Gt=qe(Ft)&&qe(Ft.createElement),Vt=function(e){return Gt?Ft.createElement(e):{}},xt=!Te&&!ye((function(){return 7!==Object.defineProperty(Vt("div"),"a",{get:function(){return 7}}).a})),Yt=Object.getOwnPropertyDescriptor,Ht={f:Te?Yt:function(e,t){if(e=Je(e),t=Pt(t),xt)try{return Yt(e,t)}catch(A){}if(Tt(e,t))return Me(!we(De.f,e,t),e[t])}},Ut=Te&&ye((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ot=String,Jt=TypeError,Kt=function(e){if(qe(e))return e;throw Jt(Ot(e)+" is not an object")},jt=TypeError,Wt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Zt="enumerable",qt="configurable",Xt="writable",$t={f:Te?Ut?function(e,t,A){if(Kt(e),t=Pt(t),Kt(A),"function"==typeof e&&"prototype"===t&&"value"in A&&Xt in A&&!A[Xt]){var i=zt(e,t);i&&i[Xt]&&(e[t]=A.value,A={configurable:qt in A?A[qt]:i[qt],enumerable:Zt in A?A[Zt]:i[Zt],writable:!1})}return Wt(e,t,A)}:Wt:function(e,t,A){if(Kt(e),t=Pt(t),Kt(A),xt)try{return Wt(e,t,A)}catch(i){}if("get"in A||"set"in A)throw jt("Accessors not supported");return"value"in A&&(e[t]=A.value),e}},eA=Te?function(e,t,A){return $t.f(e,t,Me(1,A))}:function(e,t,A){return e[t]=A,e},tA=Function.prototype,AA=Te&&Object.getOwnPropertyDescriptor,iA=Tt(tA,"name"),oA={EXISTS:iA,PROPER:iA&&"something"===function(){}.name,CONFIGURABLE:iA&&(!Te||Te&&AA(tA,"name").configurable)},rA=Ne(Function.toString);ze(pt.inspectSource)||(pt.inspectSource=function(e){return rA(e)});var nA,sA,aA,cA=pt.inspectSource,gA=ve.WeakMap,uA=ze(gA)&&/native code/.test(String(gA)),lA=Qt("keys"),dA=function(e){return lA[e]||(lA[e]=St(e))},hA={},CA="Object already initialized",IA=ve.TypeError,BA=ve.WeakMap;if(uA||pt.state){var EA=pt.state||(pt.state=new BA);EA.get=EA.get,EA.has=EA.has,EA.set=EA.set,nA=function(e,t){if(EA.has(e))throw IA(CA);return t.facade=e,EA.set(e,t),t},sA=function(e){return EA.get(e)||{}},aA=function(e){return EA.has(e)}}else{var pA=dA("state");hA[pA]=!0,nA=function(e,t){if(Tt(e,pA))throw IA(CA);return t.facade=e,eA(e,pA,t),t},sA=function(e){return Tt(e,pA)?e[pA]:{}},aA=function(e){return Tt(e,pA)}}var QA={set:nA,get:sA,has:aA,enforce:function(e){return aA(e)?sA(e):nA(e,{})},getterFor:function(e){return function(t){var A;if(!qe(t)||(A=sA(t)).type!==e)throw IA("Incompatible receiver, "+e+" required");return A}}},fA=h((function(e){var t=oA.CONFIGURABLE,A=QA.enforce,i=QA.get,o=String,r=Object.defineProperty,n=Ne("".slice),s=Ne("".replace),a=Ne([].join),c=Te&&!ye((function(){return 8!==r((function(){}),"length",{value:8}).length})),g=String(String).split("String"),u=e.exports=function(e,i,u){"Symbol("===n(o(i),0,7)&&(i="["+s(o(i),/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(i="get "+i),u&&u.setter&&(i="set "+i),(!Tt(e,"name")||t&&e.name!==i)&&(Te?r(e,"name",{value:i,configurable:!0}):e.name=i),c&&u&&Tt(u,"arity")&&e.length!==u.arity&&r(e,"length",{value:u.arity});try{u&&Tt(u,"constructor")&&u.constructor?Te&&r(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(d){}var l=A(e);return Tt(l,"source")||(l.source=a(g,"string"==typeof i?i:"")),e};Function.prototype.toString=u((function(){return ze(this)&&i(this).source||cA(this)}),"toString")})),vA=function(e,t,A,i){i||(i={});var o=i.enumerable,r=void 0!==i.name?i.name:t;if(ze(A)&&fA(A,r,i),i.global)o?e[t]=A:Bt(t,A);else{try{i.unsafe?e[t]&&(o=!0):delete e[t]}catch(n){}o?e[t]=A:$t.f(e,t,{value:A,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},yA=Math.ceil,TA=Math.floor,mA=Math.trunc||function(e){var t=+e;return(t>0?TA:yA)(t)},RA=function(e){var t=+e;return t!=t||0===t?0:mA(t)},wA=Math.max,SA=Math.min,bA=Math.min,DA=function(e){return e>0?bA(RA(e),9007199254740991):0},MA=function(e){return DA(e.length)},_A=function(e){return function(t,A,i){var o,r=Je(t),n=MA(r),s=function(e,t){var A=RA(e);return A<0?wA(A+t,0):SA(A,t)}(i,n);if(e&&A!=A){for(;n>s;)if((o=r[s++])!=o)return!0}else for(;n>s;s++)if((e||s in r)&&r[s]===A)return e||s||0;return!e&&-1}},LA={includes:_A(!0),indexOf:_A(!1)}.indexOf,kA=Ne([].push),NA=function(e,t){var A,i=Je(e),o=0,r=[];for(A in i)!Tt(hA,A)&&Tt(i,A)&&kA(r,A);for(;t.length>o;)Tt(i,A=t[o++])&&(~LA(r,A)||kA(r,A));return r},PA=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],FA=PA.concat("length","prototype"),GA={f:Object.getOwnPropertyNames||function(e){return NA(e,FA)}},VA={f:Object.getOwnPropertySymbols},xA=Ne([].concat),YA=Xe("Reflect","ownKeys")||function(e){var t=GA.f(Kt(e)),A=VA.f;return A?xA(t,A(e)):t},HA=function(e,t,A){for(var i=YA(t),o=$t.f,r=Ht.f,n=0;n<i.length;n++){var s=i[n];Tt(e,s)||A&&Tt(A,s)||o(e,s,r(t,s))}},UA=/#|\.prototype\./,OA=function(e,t){var A=KA[JA(e)];return A===WA||A!==jA&&(ze(t)?ye(t):!!t)},JA=OA.normalize=function(e){return String(e).replace(UA,".").toLowerCase()},KA=OA.data={},jA=OA.NATIVE="N",WA=OA.POLYFILL="P",zA=OA,ZA=Ht.f,qA=function(e,t){var A,i,o,r,n,s=e.target,a=e.global,c=e.stat;if(A=a?ve:c?ve[s]||Bt(s,{}):(ve[s]||{}).prototype)for(i in t){if(r=t[i],o=e.dontCallGetSet?(n=ZA(A,i))&&n.value:A[i],!zA(a?i:s+(c?".":"#")+i,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;HA(r,o)}(e.sham||o&&o.sham)&&eA(r,"sham",!0),vA(A,i,r,e)}},XA={};XA[_t("toStringTag")]="z";var $A,ei="[object z]"===String(XA),ti=_t("toStringTag"),Ai=Object,ii="Arguments"===Ge(function(){return arguments}()),oi=ei?Ge:function(e){var t,A,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(A=function(e,t){try{return e[t]}catch(A){}}(t=Ai(e),ti))?A:ii?Ge(t):"Object"===(i=Ge(t))&&ze(t.callee)?"Arguments":i},ri=String,ni=function(e){if("Symbol"===oi(e))throw TypeError("Cannot convert a Symbol value to a string");return ri(e)},si=function(){var e=Kt(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ai=ve.RegExp,ci=ye((function(){var e=ai("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),gi=ci||ye((function(){return!ai("a","y").sticky})),ui={BROKEN_CARET:ci||ye((function(){var e=ai("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:gi,UNSUPPORTED_Y:ci},li=Object.keys||function(e){return NA(e,PA)},di=Te&&!Ut?Object.defineProperties:function(e,t){Kt(e);for(var A,i=Je(t),o=li(t),r=o.length,n=0;r>n;)$t.f(e,A=o[n++],i[A]);return e},hi={f:di},Ci=Xe("document","documentElement"),Ii="prototype",Bi="script",Ei=dA("IE_PROTO"),pi=function(){},Qi=function(e){return"<"+Bi+">"+e+"</"+Bi+">"},fi=function(e){e.write(Qi("")),e.close();var t=e.parentWindow.Object;return e=null,t},vi=function(){try{$A=new ActiveXObject("htmlfile")}catch(o){}var e,t,A;vi="undefined"!=typeof document?document.domain&&$A?fi($A):(t=Vt("iframe"),A="java"+Bi+":",t.style.display="none",Ci.appendChild(t),t.src=String(A),(e=t.contentWindow.document).open(),e.write(Qi("document.F=Object")),e.close(),e.F):fi($A);for(var i=PA.length;i--;)delete vi[Ii][PA[i]];return vi()};hA[Ei]=!0;var yi,Ti,mi=Object.create||function(e,t){var A;return null!==e?(pi[Ii]=Kt(e),A=new pi,pi[Ii]=null,A[Ei]=e):A=vi(),void 0===t?A:hi.f(A,t)},Ri=ve.RegExp,wi=ye((function(){var e=Ri(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Si=ve.RegExp,bi=ye((function(){var e=Si("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Di=QA.get,Mi=Qt("native-string-replace",String.prototype.replace),_i=RegExp.prototype.exec,Li=_i,ki=Ne("".charAt),Ni=Ne("".indexOf),Pi=Ne("".replace),Fi=Ne("".slice),Gi=(Ti=/b*/g,we(_i,yi=/a/,"a"),we(_i,Ti,"a"),0!==yi.lastIndex||0!==Ti.lastIndex),Vi=ui.BROKEN_CARET,xi=void 0!==/()??/.exec("")[1];(Gi||xi||Vi||wi||bi)&&(Li=function(e){var t,A,i,o,r,n,s,a=this,c=Di(a),g=ni(e),u=c.raw;if(u)return u.lastIndex=a.lastIndex,t=we(Li,u,g),a.lastIndex=u.lastIndex,t;var l=c.groups,d=Vi&&a.sticky,h=we(si,a),C=a.source,I=0,B=g;if(d&&(h=Pi(h,"y",""),-1===Ni(h,"g")&&(h+="g"),B=Fi(g,a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==ki(g,a.lastIndex-1))&&(C="(?: "+C+")",B=" "+B,I++),A=new RegExp("^(?:"+C+")",h)),xi&&(A=new RegExp("^"+C+"$(?!\\s)",h)),Gi&&(i=a.lastIndex),o=we(_i,d?A:a,B),d?o?(o.input=Fi(o.input,I),o[0]=Fi(o[0],I),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:Gi&&o&&(a.lastIndex=a.global?o.index+o[0].length:i),xi&&o&&o.length>1&&we(Mi,o[0],A,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(o[r]=void 0)})),o&&l)for(o.groups=n=mi(null),r=0;r<l.length;r++)n[(s=l[r])[0]]=o[s[1]];return o});var Yi=Li;qA({target:"RegExp",proto:!0,forced:/./.exec!==Yi},{exec:Yi});var Hi="\t\n\v\f\r Β αββββββ
ββββββ―βγ\u2028\u2029\ufeff",Ui=Ne("".replace),Oi=RegExp("^["+Hi+"]+"),Ji=RegExp("(^|[^"+Hi+"])["+Hi+"]+$"),Ki=function(e){return function(t){var A=ni(Oe(t));return 1&e&&(A=Ui(A,Oi,"")),2&e&&(A=Ui(A,Ji,"$1")),A}},ji={start:Ki(1),end:Ki(2),trim:Ki(3)}.trim,Wi=Ne("".charAt),zi=ve.parseFloat,Zi=ve.Symbol,qi=Zi&&Zi.iterator,Xi=1/zi(Hi+"-0")!=-Infinity||qi&&!ye((function(){zi(Object(qi))}))?function(e){var t=ji(ni(e)),A=zi(t);return 0===A&&"-"===Wi(t,0)?-0:A}:zi;qA({global:!0,forced:parseFloat!==Xi},{parseFloat:Xi});var $i=function(e){if("Function"===Ge(e))return Ne(e)},eo=_t("species"),to=RegExp.prototype,Ao=Ne("".charAt),io=Ne("".charCodeAt),oo=Ne("".slice),ro=function(e){return function(t,A){var i,o,r=ni(Oe(t)),n=RA(A),s=r.length;return n<0||n>=s?e?"":void 0:(i=io(r,n))<55296||i>56319||n+1===s||(o=io(r,n+1))<56320||o>57343?e?Ao(r,n):i:e?oo(r,n,n+2):o-56320+(i-55296<<10)+65536}},no={codeAt:ro(!1),charAt:ro(!0)}.charAt,so=function(e,t,A){return t+(A?no(e,t).length:1)},ao=TypeError,co=function(e,t){var A=e.exec;if(ze(A)){var i=we(A,e,t);return null!==i&&Kt(i),i}if("RegExp"===Ge(e))return we(Yi,e,t);throw ao("RegExp#exec called on incompatible receiver")};!function(e,t,A,i){var o=_t(e),r=!ye((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),n=r&&!ye((function(){var t=!1,A=/a/;return"split"===e&&((A={}).constructor={},A.constructor[eo]=function(){return A},A.flags="",A[o]=/./[o]),A.exec=function(){return t=!0,null},A[o](""),!t}));if(!r||!n||A){var s=$i(/./[o]),a=t(o,""[e],(function(e,t,A,i,o){var n=$i(e),a=t.exec;return a===Yi||a===to.exec?r&&!o?{done:!0,value:s(t,A,i)}:{done:!0,value:n(A,t,i)}:{done:!1}}));vA(String.prototype,e,a[0]),vA(to,o,a[1])}i&&eA(to[o],"sham",!0)}("match",(function(e,t,A){return[function(t){var A=Oe(this),i=He(t)?void 0:ht(t,e);return i?we(i,t,A):new RegExp(t)[e](ni(A))},function(e){var i=Kt(this),o=ni(e),r=A(t,i,o);if(r.done)return r.value;if(!i.global)return co(i,o);var n=i.unicode;i.lastIndex=0;for(var s,a=[],c=0;null!==(s=co(i,o));){var g=ni(s[0]);a[c]=g,""===g&&(i.lastIndex=so(o,DA(i.lastIndex),n)),c++}return 0===c?null:a}]}));var go=Array.isArray||function(e){return"Array"===Ge(e)},uo=TypeError,lo=function(e){if(e>9007199254740991)throw uo("Maximum allowed index exceeded");return e},ho=function(e,t,A){var i=Pt(t);i in e?$t.f(e,i,Me(0,A)):e[i]=A},Co=function(){},Io=[],Bo=Xe("Reflect","construct"),Eo=/^\s*(?:class|function)\b/,po=Ne(Eo.exec),Qo=!Eo.exec(Co),fo=function(e){if(!ze(e))return!1;try{return Bo(Co,Io,e),!0}catch(t){return!1}},vo=function(e){if(!ze(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qo||!!po(Eo,cA(e))}catch(t){return!0}};vo.sham=!0;var yo,To=!Bo||ye((function(){var e;return fo(fo.call)||!fo(Object)||!fo((function(){e=!0}))||e}))?vo:fo,mo=_t("species"),Ro=Array,wo=function(e,t){return new(function(e){var t;return go(e)&&(t=e.constructor,(To(t)&&(t===Ro||go(t.prototype))||qe(t)&&null===(t=t[mo]))&&(t=void 0)),void 0===t?Ro:t}(e))(0===t?0:t)},So=_t("species"),bo=_t("isConcatSpreadable"),Do=rt>=51||!ye((function(){var e=[];return e[bo]=!1,e.concat()[0]!==e})),Mo=function(e){if(!qe(e))return!1;var t=e[bo];return void 0!==t?!!t:go(e)};qA({target:"Array",proto:!0,arity:1,forced:!(Do&&(yo="concat",rt>=51||!ye((function(){var e=[];return(e.constructor={})[So]=function(){return{foo:1}},1!==e[yo](Boolean).foo}))))},{concat:function(e){var t,A,i,o,r,n=vt(this),s=wo(n,0),a=0;for(t=-1,i=arguments.length;t<i;t++)if(Mo(r=-1===t?n:arguments[t]))for(o=MA(r),lo(a+o),A=0;A<o;A++,a++)A in r&&ho(s,a,r[A]);else lo(a+1),ho(s,a++,r);return s.length=a,s}});var _o=window.navigator&&window.navigator.userAgent||"",Lo=/AppleWebKit\/([\d.]+)/i.exec(_o);Lo&&parseFloat(Lo.pop());var ko=/iPad/i.test(_o),No=/iPhone/i.test(_o)&&!ko,Po=/iPod/i.test(_o),Fo=No||ko||Po,Go=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(_o);Fo&&function(){var e=_o.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Vo=/Android/i.test(_o);Vo&&function(){var e=_o.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),A=e[2]&&parseFloat(e[2]);t&&A&&parseFloat("".concat(e[1],".").concat(e[2]))}();Vo&&/webkit/i.test(_o),/Firefox/i.test(_o)&&function(){var e=_o.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var xo=/Edge\//i.test(_o);xo&&function(){var e=_o.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var Yo=/Edg\//i.test(_o);Yo&&function(){var e=_o.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Ho=/SogouMobileBrowser\//i.test(_o);Ho&&function(){var e=_o.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Uo=/MetaSr\s/i.test(_o);Uo&&function(){var e=_o.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Oo=/TBS\/\d+/i.test(_o);Oo&&function(){var e=_o.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var Jo=/XWEB\/\d+/i.test(_o);Jo&&function(){var e=_o.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(_o),/MSIE\/\d+/i.test(_o)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(_o),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(_o)&&/rv:11.0/.test(_o)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(_o)&&function(){var e=_o.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Ko=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&/COVC\/\d+/i.test(_o),jo=!Oo&&/MQQBrowser\/\d+/i.test(_o)&&!/COVC\/\d+/i.test(_o);(jo||Ko)&&function(){var e=_o.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Wo=!Oo&&/ QQBrowser\/\d+/i.test(_o);Wo&&function(){var e=_o.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var zo=!Oo&&/QQBrowserLite\/\d+/i.test(_o);zo&&function(){var e=_o.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var Zo=!Oo&&/MQBHD\/\d+/i.test(_o);Zo&&function(){var e=_o.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(_o),!Fo&&/MAC OS X/i.test(_o),!Vo&&/Linux/i.test(_o),/MicroMessenger/i.test(_o),/UCBrowser/i.test(_o),/Electron/i.test(_o);var qo=/MiuiBrowser/i.test(_o);qo&&function(){var e=_o.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Xo=/HuaweiBrowser/i.test(_o);/Huawei/i.test(_o),Xo&&function(){var e=_o.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var $o=/SamsungBrowser/i.test(_o);$o&&function(){var e=_o.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var er=/HeyTapBrowser/i.test(_o);er&&function(){var e=_o.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var tr=/VivoBrowser/i.test(_o);tr&&function(){var e=_o.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Ar,ir,or,rr=/Chrome/i.test(_o),nr=!xo&&!Uo&&!Ho&&!Oo&&!Jo&&!Yo&&!Wo&&!qo&&!Xo&&!$o&&!er&&!tr&&/Chrome/i.test(_o);nr&&function(){var e=_o.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),nr&&function(){var e=_o.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!rr&&!jo&&!Ko&&!zo&&!Zo&&/Safari/i.test(_o)&&function(){var e=_o.match(/Version\/([\d.]+)/);e&&e[1]&&e[1]}(),"file:"===location.protocol||"localhost"===location.hostname||/^\d+\.\d+\.\d+\.\d+$/.test(location.hostname),function(e){e.LIVE="live",e.RTC="rtc"}(Ar||(Ar={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(ir||(ir={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(or||(or={}));var sr,ar,cr=-3340,gr=-1301,ur=-1314,lr=-1315,dr=-1316,hr=-1302,Cr=-1317,Ir=-1318,Br=-1319,Er=-70252,pr={code:-1001,message:"εζ°ιθ――, θ―·ζ£ζ₯εζ°ζ ΌεΌγζ―ε¦ιη©Ίη"},Qr={code:-1005,message:"not supported"},fr="2.10.9",vr=Object.create,yr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,wr=Object.getPrototypeOf,Sr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,Dr=(e,t,A)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:A}):e[t]=A,Mr=(e,t,A,i)=>{for(var o,r=i>1?void 0:i?Tr(t,A):t,n=e.length-1;n>=0;n--)(o=e[n])&&(r=(i?o(t,A,r):o(r))||r);return i&&r&&yr(t,A,r),r},_r=(e,t,A)=>Dr(e,"symbol"!=typeof t?t+"":t,A),Lr=(sr={"../node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js"(e,t){var A=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,A){this.fn=e,this.context=t,this.once=A||!1}function n(e,t,A,o,n){if("function"!=typeof A)throw new TypeError("The listener must be a function");var s=new r(A,o||e,n),a=i?i+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],s]:e._events[a].push(s):(e._events[a]=s,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,t,o=[];if(0===this._eventsCount)return o;for(t in e=this._events)A.call(e,t)&&o.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=i?i+e:e,A=this._events[t];if(!A)return[];if(A.fn)return[A.fn];for(var o=0,r=A.length,n=new Array(r);o<r;o++)n[o]=A[o].fn;return n},a.prototype.listenerCount=function(e){var t=i?i+e:e,A=this._events[t];return A?A.fn?1:A.length:0},a.prototype.emit=function(e,t,A,o,r,n){var s=i?i+e:e;if(!this._events[s])return!1;var a,c,g=this._events[s],u=arguments.length;if(g.fn){switch(g.once&&this.removeListener(e,g.fn,void 0,!0),u){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,t),!0;case 3:return g.fn.call(g.context,t,A),!0;case 4:return g.fn.call(g.context,t,A,o),!0;case 5:return g.fn.call(g.context,t,A,o,r),!0;case 6:return g.fn.call(g.context,t,A,o,r,n),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];g.fn.apply(g.context,a)}else{var l,d=g.length;for(c=0;c<d;c++)switch(g[c].once&&this.removeListener(e,g[c].fn,void 0,!0),u){case 1:g[c].fn.call(g[c].context);break;case 2:g[c].fn.call(g[c].context,t);break;case 3:g[c].fn.call(g[c].context,t,A);break;case 4:g[c].fn.call(g[c].context,t,A,o);break;default:if(!a)for(l=1,a=new Array(u-1);l<u;l++)a[l-1]=arguments[l];g[c].fn.apply(g[c].context,a)}}return!0},a.prototype.on=function(e,t,A){return n(this,e,t,A,!1)},a.prototype.once=function(e,t,A){return n(this,e,t,A,!0)},a.prototype.removeListener=function(e,t,A,o){var r=i?i+e:e;if(!this._events[r])return this;if(!t)return s(this,r),this;var n=this._events[r];if(n.fn)n.fn!==t||o&&!n.once||A&&n.context!==A||s(this,r);else{for(var a=0,c=[],g=n.length;a<g;a++)(n[a].fn!==t||o&&!n[a].once||A&&n[a].context!==A)&&c.push(n[a]);c.length?this._events[r]=1===c.length?c[0]:c:s(this,r)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,void 0!==t&&(t.exports=a)}},function(){return ar||(0,sr[mr(sr)[0]])((ar={exports:{}}).exports,ar),ar.exports}),kr={name:"option",required:!0,properties:{view:{type:["string",HTMLElement],required:!0},url:{type:"string",required:!0},muted:{type:"boolean",required:!1},volume:{type:"number",required:!1},fillMode:{type:"string",required:!1,values:["contain","cover","fill"]},loggerConfig:{type:"object",required:!0,properties:{sdkAppId:{type:"number",required:!0},userId:{type:"string",required:!0}}}}},Nr=e=>{const t=e.split("\r\n"),A=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)}));const i=A.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),o=[];t.forEach((e=>{let t=e;if(e.includes("a=fmtp:111")&&(t=`${e};stereo=1`),e.includes("a=fmtp")){const A=/a=fmtp:(\d+)\s/.exec(e);A&&A.length>1&&i.includes(A[1])&&(t=`${e};sps-pps-idr-in-keyframe=1`)}o.push(t)}));return(e=>{if(!navigator.userAgent.includes("Firefox"))return e;const t=e.split("\r\n"),A=[],i=[];t.forEach((e=>{const t=e.toLowerCase();t.includes("a=rtpmap")&&t.includes("h264")&&A.push(e)})),A.length>1&&i.push(...A.slice(1));const o=i.map((e=>{const t=/a=rtpmap:(\d+)\s/.exec(e);return t&&t.length>1?t[1]:null})).filter((e=>null!==e)),r=[];return t.forEach((e=>{let t=e;if(e.includes("a=setup")&&(t="a=setup:passive"),(e.includes("m=audio")||e.includes("m=video"))&&(t=e.split(" ").filter(((e,t)=>t<3||!o.includes(e))).join(" ")),e.includes("a=fmtp")||e.includes("a=rtcp-fb")||e.includes("a=rtpmap")){const t=/a=(?:fmtp|rtcp-fb|rtpmap):(\d+)\s/.exec(e);if(t&&t.length>1&&o.includes(t[1]))return}r.push(t)})),r.join("\r\n")})(o.join("\r\n"))},Pr=(e=21)=>{let t="",A=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&A[e]];return t},Fr=e=>"function"==typeof e;var Gr=function({retryFunction:e,settings:t,onError:A,onRetrying:i,onRetryFailed:o,onRetrySuccess:r,context:n}){return function(...s){const{retries:a=5,timeout:c=1e3}=t;let g=0,u=-1,l=0;const d=async(t,h)=>{const C=n||this;try{const A=await e.apply(C,s);g>0&&r&&r.call(this,g),g=0,t(A)}catch(e){const n=()=>{clearTimeout(u),g=0,l=2,h(e)},C=()=>{2!==l&&g<(Fr(a)?a():a)?(g++,l=1,Fr(i)&&i.call(this,g,n),u=window.setTimeout((()=>{u=-1,d(t,h)}),Fr(c)?c(g):c)):(n(),Fr(o)&&o.call(this,e))};Fr(A)?A.call(this,{error:e,retry:C,reject:h,retryFuncArgs:s,retriedCount:g}):C()}};return new Promise(d)}},Vr=new WeakMap;var xr=((e,t,A)=>(A=null!=e?vr(wr(e)):{},((e,t,A,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of mr(t))Sr.call(e,o)||o===A||yr(e,o,{get:()=>t[o],enumerable:!(i=Tr(t,o))||i.enumerable});return e})(!t&&e&&e.__esModule?A:yr(A,"default",{value:e,enumerable:!0}),e)))(Lr(),1),Yr=Symbol("instance"),Hr=Symbol("cacheResult"),Ur=class{constructor(e,t,A){this.oldState=e,this.newState=t,this.action=A,this.aborted=!1}abort(e){this.aborted=!0,Wr.call(e,this.oldState,new Error(`action '${this.action}' aborted`))}toString(){return`${this.action}ing`}},Or=class extends Error{constructor(e,t,A){super(t),this.state=e,this.message=t,this.cause=A}};var Jr=new Map;function Kr(e,t,A={}){return(i,o,r)=>{const n=A.action||o;if(!A.context){const A=Jr.get(i)||[];Jr.has(i)||Jr.set(i,A),A.push({from:e,to:t,action:n})}const s=r.value;r.value=function(...i){let o=this;if(A.context&&(o=zr.get("function"==typeof A.context?A.context.call(this,...i):A.context)),o.state===t)return A.sync?o[Hr]:Promise.resolve(o[Hr]);o.state instanceof Ur&&o.state.action==A.abortAction&&o.state.abort(o);let r=null;Array.isArray(e)?0==e.length?o.state instanceof Ur&&o.state.abort(o):"string"==typeof o.state&&e.includes(o.state)||(r=new Or(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e.join("|")}`)):e!==o.state&&(r=new Or(o._state,`${o.name} ${n} to ${t} failed: current state ${o._state} not from ${e}`));const a=e=>{if(A.fail&&A.fail.call(this,e),A.sync){if(A.ignoreError)return e;throw e}return A.ignoreError?Promise.resolve(e):Promise.reject(e)};if(r)return a(r);const c=o.state,g=new Ur(c,t,n);Wr.call(o,g);const u=e=>{var i;return o[Hr]=e,g.aborted||(Wr.call(o,t),null===(i=A.success)||void 0===i||i.call(this,o[Hr])),e},l=e=>(Wr.call(o,c,e),a(e));try{const e=s.apply(this,i);return function(e){return"object"==typeof e&&e&&"then"in e}(e)?e.then(u).catch(l):A.sync?u(e):Promise.resolve(u(e))}catch(A){return l(new Or(o._state,`${o.name} ${n} from ${e} to ${t} failed: ${A}`,A instanceof Error?A:new Error(String(A))))}}}}var jr=(()=>{const e="undefined"!=typeof window&&window.__AFSM__,t="undefined"!=typeof importScripts;return e?(e,t)=>{window.dispatchEvent(new CustomEvent(e,{detail:t}))}:t?(e,t)=>{postMessage({type:e,payload:t})}:()=>{}})();function Wr(e,t){const A=this._state;this._state=e;const i=e.toString();e&&this.emit(i,A),this.emit(zr.STATECHANGED,e,A,t),this.updateDevTools({value:e,old:A,err:t instanceof Error?t.message:String(t)})}var zr=class e extends xr.default{constructor(t,A,i){super(),this.name=t,this.groupName=A,this._state=e.INIT,t||(t=Date.now().toString(36)),i?Object.setPrototypeOf(this,i):i=Object.getPrototypeOf(this),A||(this.groupName=this.constructor.name);const o=i[Yr];o?this.name=o.name+"-"+o.count++:i[Yr]={name:this.name,count:0},this.updateDevTools({diagram:this.stateDiagram})}get stateDiagram(){const e=Object.getPrototypeOf(this),t=Jr.get(e)||[];let A=new Set,i=[],o=[];const r=new Set,n=Object.getPrototypeOf(e);Jr.has(n)&&(n.stateDiagram.forEach((e=>A.add(e))),n.allStates.forEach((e=>r.add(e)))),t.forEach((({from:e,to:t,action:A})=>{"string"==typeof e?i.push({from:e,to:t,action:A}):e.length?e.forEach((e=>{i.push({from:e,to:t,action:A})})):o.push({to:t,action:A})})),i.forEach((({from:e,to:t,action:i})=>{r.add(e),r.add(t),r.add(i+"ing"),A.add(`${e} --\x3e ${i}ing : ${i}`),A.add(`${i}ing --\x3e ${t} : ${i} π’`),A.add(`${i}ing --\x3e ${e} : ${i} π΄`)})),o.forEach((({to:e,action:t})=>{A.add(`${t}ing --\x3e ${e} : ${t} π’`),r.forEach((i=>{i!==e&&A.add(`${i} --\x3e ${t}ing : ${t}`)}))}));const s=[...A];return Object.defineProperties(e,{stateDiagram:{value:s},allStates:{value:r}}),s}static get(t){let A;return"string"==typeof t?(A=e.instances.get(t),A||e.instances.set(t,A=new e(t,void 0,Object.create(e.prototype)))):(A=e.instances2.get(t),A||e.instances2.set(t,A=new e(t.constructor.name,void 0,Object.create(e.prototype)))),A}static getState(t){var A;return null===(A=e.get(t))||void 0===A?void 0:A.state}updateDevTools(t={}){jr(e.UPDATEAFSM,Object.assign({name:this.name,group:this.groupName},t))}get state(){return this._state}set state(e){Wr.call(this,e)}};zr.STATECHANGED="stateChanged",zr.UPDATEAFSM="updateAFSM",zr.INIT="[*]",zr.ON="on",zr.OFF="off",zr.instances=new Map,zr.instances2=new WeakMap;var Zr=class extends zr{constructor(e,t){super(),this.core=e,_r(this,"audioPlayer"),_r(this,"videoPlayer"),_r(this,"callback")