trtc-cloud-js-sdk
Version:
Tencent Cloud RTC SDK for Web And Electron
1 lines • 180 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("trtc-sdk-v5"),require("trtc-sdk-v5/plugins/lebplayer"),require("trtc-sdk-v5/plugins/video-effect/virtual-background"),require("trtc-sdk-v5/plugins/video-effect/basic-beauty"),require("trtc-sdk-v5/plugins/realtime-transcriber"),require("trtc-sdk-v5/plugins/video-effect/video-mixer"),require("trtc-sdk-v5/plugins/whiteboard")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/lebplayer","trtc-sdk-v5/plugins/video-effect/virtual-background","trtc-sdk-v5/plugins/video-effect/basic-beauty","trtc-sdk-v5/plugins/realtime-transcriber","trtc-sdk-v5/plugins/video-effect/video-mixer","trtc-sdk-v5/plugins/whiteboard"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.LEBPlayer,e.VirtualBackground,e.BasicBeauty,e.realtimeTranscriber,e.VideoMixer,e.Whiteboard)}(this,(function(e,t,i,o,r,n,s,a){function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(t),l=c(s),d=c(a),h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},h(e,t)};var p=function(){return p=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)};function T(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s}function f(e,t,i,o){return new(i||(i=Promise))((function(r,n){function s(e){try{c(o.next(e))}catch(t){n(t)}}function a(e){try{c(o.throw(e))}catch(t){n(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))}function v(e,t){var i,o,r,n,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(a){return function(c){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,a[0]&&(s=0)),s;)try{if(i=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(c){a=[6,c],o=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t,i){if(i||2===arguments.length)for(var o,r=0,n=t.length;r<n;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function R(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=g(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(i){t[i]=e[i]&&function(t){return new Promise((function(o,r){(function(e,t,i,o){Promise.resolve(o).then((function(t){e({value:t,done:i})}),t)})(o,r,(t=e[i](t)).done,t.value)}))}}}var y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e,t){return e(t={exports:{}},t.exports),t.exports}var _,b,S,M,E,w,A,V,P,L=C((function(e){var t=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function n(e,t,o,n,s){if("function"!=typeof o)throw new TypeError("The listener must be a function");var a=new r(o,n||e,s),c=i?i+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,o,r=[];if(0===this._eventsCount)return r;for(o in e=this._events)t.call(e,o)&&r.push(i?o.slice(1):o);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=i?i+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,n=o.length,s=new Array(n);r<n;r++)s[r]=o[r].fn;return s},a.prototype.listenerCount=function(e){var t=i?i+e:e,o=this._events[t];return o?o.fn?1:o.length:0},a.prototype.emit=function(e,t,o,r,n,s){var a=i?i+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,o),!0;case 4:return l.fn.call(l.context,t,o,r),!0;case 5:return l.fn.call(l.context,t,o,r,n),!0;case 6:return l.fn.call(l.context,t,o,r,n,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,o);break;case 4:l[u].fn.call(l[u].context,t,o,r);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,i){return n(this,e,t,i,!1)},a.prototype.once=function(e,t,i){return n(this,e,t,i,!0)},a.prototype.removeListener=function(e,t,o,r){var n=i?i+e:e;if(!this._events[n])return this;if(!t)return s(this,n),this;var a=this._events[n];if(a.fn)a.fn!==t||r&&!a.once||o&&a.context!==o||s(this,n);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||r&&!a[c].once||o&&a[c].context!==o)&&u.push(a[c]);u.length?this._events[n]=1===u.length?u[0]:u:s(this,n)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a}));e.TRTCVideoResolution=void 0,(_=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[_.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",_[_.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",_[_.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",_[_.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",_[_.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",_[_.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",_[_.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",_[_.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",_[_.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",_[_.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",_[_.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",_[_.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",_[_.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",_[_.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",_[_.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",_[_.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",_[_.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",_[_.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",_[_.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",_[_.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(b=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[b.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",b[b.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",b[b.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(S=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[S.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",S[S.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(M=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[M.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",M[M.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",M[M.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(E=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[E.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",E[E.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(w=e.TRTCAppScene||(e.TRTCAppScene={}))[w.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",w[w.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",w[w.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",w[w.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(A=e.TRTCRoleType||(e.TRTCRoleType={}))[A.TRTCRoleAnchor=20]="TRTCRoleAnchor",A[A.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",e.TRTCAudioSceneEx=void 0,(P=e.TRTCAudioSceneEx||(e.TRTCAudioSceneEx={}))[P.default=0]="default",P[P.silent=8]="silent",P[P.hifi2=18]="hifi2";var I,x,O=function(e,t,i,o,r){void 0===e&&(e=""),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=""),this.deviceId=e,this.deviceName=t,this.kind=i,this.label=o,this.groupId=r};e.TRTCDeviceState=void 0,(I=e.TRTCDeviceState||(e.TRTCDeviceState={}))[I.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",I[I.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",I[I.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(x=e.TRTCDeviceType||(e.TRTCDeviceType={}))[x.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",x[x.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",x[x.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",x[x.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var D,k=function(t,i,o,r,n,s,a,c,u,l,d){void 0===t&&(t=0),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=0),void 0===n&&(n=""),void 0===s&&(s=e.TRTCRoleType.TRTCRoleAnchor),void 0===a&&(a=null),void 0===u&&(u=null),void 0===l&&(l=null),void 0===d&&(d=30),this.sdkAppId=t,this.userId=i,this.userSig=o,this.roomId=r,this.strRoomId=n,this.role=s,this.privateMapKey=a,this.streamId=u,this.userDefineRecordId=l,this.frameWorkType=d},B=function(t,i,o,r){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===i&&(i=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===o&&(o=15),void 0===r&&(r=550),this.videoResolution=t,this.resMode=i,this.videoFps=o,this.videoBitrate=r};e.TRTCVideoRotation=void 0,(D=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[D.TRTCVideoRotation0=0]="TRTCVideoRotation0",D[D.TRTCVideoRotation90=1]="TRTCVideoRotation90",D[D.TRTCVideoRotation180=2]="TRTCVideoRotation180",D[D.TRTCVideoRotation270=3]="TRTCVideoRotation270";var z,N=function(t,i,o){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===i&&(i=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===o&&(o=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=i,this.mirrorType=o};e.TRTCQuality=void 0,(z=e.TRTCQuality||(e.TRTCQuality={}))[z.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",z[z.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",z[z.TRTCQuality_Good=2]="TRTCQuality_Good",z[z.TRTCQuality_Poor=3]="TRTCQuality_Poor",z[z.TRTCQuality_Bad=4]="TRTCQuality_Bad",z[z.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",z[z.TRTCQuality_Down=6]="TRTCQuality_Down";var F,Q,W,H=function(t,i){void 0===t&&(t=""),void 0===i&&(i=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=i},j=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},U=function(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),this.appId=e,this.bizId=t,this.url=i},q=function(t,i,o,r,n,s,a){void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.width=t,this.height=i,this.frameRate=o,this.videoBitrate=r,this.audioBitrate=s,this.streamType=a},G=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T){void 0===t&&(t=""),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===c&&(c=0),void 0===T&&(T=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=o,this.height=r,this.frameRate=n,this.videoBitrate=s,this.audioBitrate=c,this.streamType=T},Y=function(e,t,i,o,r,n,s,a,c,u,l){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=[]),void 0===c&&(c=0),void 0===u&&(u=[]),void 0===l&&(l=0),this.upLoss=e,this.downLoss=t,this.rtt=r,this.receivedBytes=n,this.sentBytes=s,this.localStatisticsArray=a,this.localStatisticsArraySize=c,this.remoteStatisticsArray=u,this.remoteStatisticsArraySize=l};e.TRTCVideoResolutionMode=void 0,(F=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[F.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",F[F.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(Q=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[Q.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",Q[Q.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(W=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[W.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",W[W.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var K,J,X=function(t,i){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===i&&(i=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=i},$=function(e,t,i,o){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.buffer=e,this.length=t,this.width=i,this.height=o};e.TRTCLogLevel=void 0,(K=e.TRTCLogLevel||(e.TRTCLogLevel={}))[K.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",K[K.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",K[K.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",K[K.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",K[K.TRTCLogLevelError=4]="TRTCLogLevelError",K[K.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",K[K.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(J=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[J.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",J[J.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",J[J.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",J[J.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var Z,ee=function(t,i,o,r,n,s){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=new $),void 0===n&&(n=new $),void 0===s&&(s=!1),this.type=t,this.sourceId=i,this.sourceName=o,this.thumbBGRA=r,this.iconBGRA=n,this.isMinimizeWindow=s},te=function(e,t,i,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.left=e,this.top=t,this.right=i,this.bottom=o},ie=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T,f){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=15),void 0===c&&(c=2),void 0===u&&(u=0),void 0===l&&(l=""),void 0===d&&(d=64),void 0===h&&(h=48e3),void 0===p&&(p=1),void 0===T&&(T=[]),void 0===f&&(f=""),this.mode=t,this.appId=i,this.bizId=o,this.videoWidth=r,this.videoHeight=n,this.videoBitrate=s,this.videoFramerate=a,this.videoGOP=c,this.backgroundColor=u,this.backgroundImage=l,this.audioSampleRate=d,this.audioBitrate=h,this.audioChannels=p,this.mixUsersArray=T,this.mixUsersArraySize=T.length,this.streamId=f};e.TRTCTranscodingConfigMode=void 0,(Z=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[Z.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",Z[Z.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",Z[Z.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",Z[Z.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",Z[Z.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",Z[Z.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",Z[Z.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",Z[Z.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",Z[Z.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",Z[Z.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var oe,re,ne=function(t,i,o,r,n,s,a,c){void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=null),void 0===r&&(r=0),void 0===n&&(n=!1),void 0===s&&(s=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),void 0===a&&(a=e.TRTCMixInputType.TRTCMixInputTypeUndefined),void 0===c&&(c=0),this.userId=t,this.roomId=i,this.rect=o,this.zOrder=r,this.pureAudio=n,this.streamType=s,this.inputType=a,this.renderMode=c};e.TRTCMixInputType=void 0,(oe=e.TRTCMixInputType||(e.TRTCMixInputType={}))[oe.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",oe[oe.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",oe[oe.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",oe[oe.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(re=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[re.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",re[re.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",re[re.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",re[re.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var se,ae=function(e,t,i,o,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=i,this.highLightColor=o,this.highLightWidth=r,this.enableCaptureChildWindow=n},ce="onError",ue="onWarning",le="rtc",de="live",he="VirtualBackground",pe="BasicBeauty",Te="AIDenoiser",fe="blur",ve="image",ge={20:"anchor",21:"audience"},me={0:le,1:de,2:le,3:de};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(se||(se={}));var Re="enum";function ye(){return Math.floor(performance.now())}var Ce=function(e){return void 0===e},_e=function(e){return"number"==typeof e},be=function(e){return"boolean"==typeof e};function Se(e){if("string"!=typeof e)return e;var t;try{var i=JSON.parse(e);t="object"==typeof i&&i?i:e}catch(o){t=e}return t}function Me(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(i){e[i]&&"object"==typeof e[i]?e[i]=Ee(e[i],t[i]):e[i]=t[i]})),e}),{})}function we(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,i){t[i]=we(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(i){Object.hasOwnProperty.call(e,i)&&(t[i]=we(e[i]))}))):t=e,t)}var Ae,Ve,Pe=function(e){return e&&e.Math===Math&&e},Le=Pe("object"==typeof globalThis&&globalThis)||Pe("object"==typeof window&&window)||Pe("object"==typeof self&&self)||Pe("object"==typeof y&&y)||function(){return this}()||y||Function("return this")(),Ie=function(e){try{return!!e()}catch(t){return!0}},xe=!Ie((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Oe=!Ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),De=Function.prototype.call,ke=Oe?De.bind(De):function(){return De.apply(De,arguments)},Be={}.propertyIsEnumerable,ze=Object.getOwnPropertyDescriptor,Ne={f:ze&&!Be.call({1:2},1)?function(e){var t=ze(this,e);return!!t&&t.enumerable}:Be},Fe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Qe=Function.prototype,We=Qe.call,He=Oe&&Qe.bind.bind(We,We),je=Oe?He:function(e){return function(){return We.apply(e,arguments)}},Ue=je({}.toString),qe=je("".slice),Ge=function(e){return qe(Ue(e),8,-1)},Ye=Object,Ke=je("".split),Je=Ie((function(){return!Ye("z").propertyIsEnumerable(0)}))?function(e){return"String"===Ge(e)?Ke(e,""):Ye(e)}:Ye,Xe=function(e){return null==e},$e=TypeError,Ze=function(e){if(Xe(e))throw $e("Can't call method on "+e);return e},et=function(e){return Je(Ze(e))},tt="object"==typeof document&&document.all,it={all:tt,IS_HTMLDDA:void 0===tt&&void 0!==tt},ot=it.all,rt=it.IS_HTMLDDA?function(e){return"function"==typeof e||e===ot}:function(e){return"function"==typeof e},nt=it.all,st=it.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===nt}:function(e){return"object"==typeof e?null!==e:rt(e)},at=function(e,t){return arguments.length<2?(i=Le[e],rt(i)?i:void 0):Le[e]&&Le[e][t];var i},ct=je({}.isPrototypeOf),ut="undefined"!=typeof navigator&&String(navigator.userAgent)||"",lt=Le.process,dt=Le.Deno,ht=lt&<.versions||dt&&dt.version,pt=ht&&ht.v8;pt&&(Ve=(Ae=pt.split("."))[0]>0&&Ae[0]<4?1:+(Ae[0]+Ae[1])),!Ve&&ut&&(!(Ae=ut.match(/Edge\/(\d+)/))||Ae[1]>=74)&&(Ae=ut.match(/Chrome\/(\d+)/))&&(Ve=+Ae[1]);var Tt=Ve,ft=Le.String,vt=!!Object.getOwnPropertySymbols&&!Ie((function(){var e=Symbol("symbol detection");return!ft(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Tt&&Tt<41})),gt=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=Object,Rt=gt?function(e){return"symbol"==typeof e}:function(e){var t=at("Symbol");return rt(t)&&ct(t.prototype,mt(e))},yt=String,Ct=TypeError,_t=function(e){if(rt(e))return e;throw Ct(function(e){try{return yt(e)}catch(t){return"Object"}}(e)+" is not a function")},bt=function(e,t){var i=e[t];return Xe(i)?void 0:_t(i)},St=TypeError,Mt=Object.defineProperty,Et=function(e,t){try{Mt(Le,e,{value:t,configurable:!0,writable:!0})}catch(i){Le[e]=t}return t},wt="__core-js_shared__",At=Le[wt]||Et(wt,{}),Vt=C((function(e){(e.exports=function(e,t){return At[e]||(At[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"})})),Pt=Object,Lt=function(e){return Pt(Ze(e))},It=je({}.hasOwnProperty),xt=Object.hasOwn||function(e,t){return It(Lt(e),t)},Ot=0,Dt=Math.random(),kt=je(1..toString),Bt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+kt(++Ot+Dt,36)},zt=Le.Symbol,Nt=Vt("wks"),Ft=gt?zt.for||zt:zt&&zt.withoutSetter||Bt,Qt=function(e){return xt(Nt,e)||(Nt[e]=vt&&xt(zt,e)?zt[e]:Ft("Symbol."+e)),Nt[e]},Wt=TypeError,Ht=Qt("toPrimitive"),jt=function(e,t){if(!st(e)||Rt(e))return e;var i,o=bt(e,Ht);if(o){if(void 0===t&&(t="default"),i=ke(o,e,t),!st(i)||Rt(i))return i;throw Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var i,o;if("string"===t&&rt(i=e.toString)&&!st(o=ke(i,e)))return o;if(rt(i=e.valueOf)&&!st(o=ke(i,e)))return o;if("string"!==t&&rt(i=e.toString)&&!st(o=ke(i,e)))return o;throw St("Can't convert object to primitive value")}(e,t)},Ut=function(e){var t=jt(e,"string");return Rt(t)?t:t+""},qt=Le.document,Gt=st(qt)&&st(qt.createElement),Yt=function(e){return Gt?qt.createElement(e):{}},Kt=!xe&&!Ie((function(){return 7!==Object.defineProperty(Yt("div"),"a",{get:function(){return 7}}).a})),Jt=Object.getOwnPropertyDescriptor,Xt={f:xe?Jt:function(e,t){if(e=et(e),t=Ut(t),Kt)try{return Jt(e,t)}catch(i){}if(xt(e,t))return Fe(!ke(Ne.f,e,t),e[t])}},$t=xe&&Ie((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Zt=String,ei=TypeError,ti=function(e){if(st(e))return e;throw ei(Zt(e)+" is not an object")},ii=TypeError,oi=Object.defineProperty,ri=Object.getOwnPropertyDescriptor,ni="enumerable",si="configurable",ai="writable",ci={f:xe?$t?function(e,t,i){if(ti(e),t=Ut(t),ti(i),"function"==typeof e&&"prototype"===t&&"value"in i&&ai in i&&!i[ai]){var o=ri(e,t);o&&o[ai]&&(e[t]=i.value,i={configurable:si in i?i[si]:o[si],enumerable:ni in i?i[ni]:o[ni],writable:!1})}return oi(e,t,i)}:oi:function(e,t,i){if(ti(e),t=Ut(t),ti(i),Kt)try{return oi(e,t,i)}catch(o){}if("get"in i||"set"in i)throw ii("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},ui=xe?function(e,t,i){return ci.f(e,t,Fe(1,i))}:function(e,t,i){return e[t]=i,e},li=Function.prototype,di=xe&&Object.getOwnPropertyDescriptor,hi=xt(li,"name"),pi={EXISTS:hi,PROPER:hi&&"something"===function(){}.name,CONFIGURABLE:hi&&(!xe||xe&&di(li,"name").configurable)},Ti=je(Function.toString);rt(At.inspectSource)||(At.inspectSource=function(e){return Ti(e)});var fi,vi,gi,mi=At.inspectSource,Ri=Le.WeakMap,yi=rt(Ri)&&/native code/.test(String(Ri)),Ci=Vt("keys"),_i=function(e){return Ci[e]||(Ci[e]=Bt(e))},bi={},Si="Object already initialized",Mi=Le.TypeError,Ei=Le.WeakMap;if(yi||At.state){var wi=At.state||(At.state=new Ei);wi.get=wi.get,wi.has=wi.has,wi.set=wi.set,fi=function(e,t){if(wi.has(e))throw Mi(Si);return t.facade=e,wi.set(e,t),t},vi=function(e){return wi.get(e)||{}},gi=function(e){return wi.has(e)}}else{var Ai=_i("state");bi[Ai]=!0,fi=function(e,t){if(xt(e,Ai))throw Mi(Si);return t.facade=e,ui(e,Ai,t),t},vi=function(e){return xt(e,Ai)?e[Ai]:{}},gi=function(e){return xt(e,Ai)}}var Vi={set:fi,get:vi,has:gi,enforce:function(e){return gi(e)?vi(e):fi(e,{})},getterFor:function(e){return function(t){var i;if(!st(t)||(i=vi(t)).type!==e)throw Mi("Incompatible receiver, "+e+" required");return i}}},Pi=C((function(e){var t=pi.CONFIGURABLE,i=Vi.enforce,o=Vi.get,r=String,n=Object.defineProperty,s=je("".slice),a=je("".replace),c=je([].join),u=xe&&!Ie((function(){return 8!==n((function(){}),"length",{value:8}).length})),l=String(String).split("String"),d=e.exports=function(e,o,d){"Symbol("===s(r(o),0,7)&&(o="["+a(r(o),/^Symbol\(([^)]*)\)/,"$1")+"]"),d&&d.getter&&(o="get "+o),d&&d.setter&&(o="set "+o),(!xt(e,"name")||t&&e.name!==o)&&(xe?n(e,"name",{value:o,configurable:!0}):e.name=o),u&&d&&xt(d,"arity")&&e.length!==d.arity&&n(e,"length",{value:d.arity});try{d&&xt(d,"constructor")&&d.constructor?xe&&n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(p){}var h=i(e);return xt(h,"source")||(h.source=c(l,"string"==typeof o?o:"")),e};Function.prototype.toString=d((function(){return rt(this)&&o(this).source||mi(this)}),"toString")})),Li=function(e,t,i,o){o||(o={});var r=o.enumerable,n=void 0!==o.name?o.name:t;if(rt(i)&&Pi(i,n,o),o.global)r?e[t]=i:Et(t,i);else{try{o.unsafe?e[t]&&(r=!0):delete e[t]}catch(s){}r?e[t]=i:ci.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},Ii=Math.ceil,xi=Math.floor,Oi=Math.trunc||function(e){var t=+e;return(t>0?xi:Ii)(t)},Di=function(e){var t=+e;return t!=t||0===t?0:Oi(t)},ki=Math.max,Bi=Math.min,zi=Math.min,Ni=function(e){return e>0?zi(Di(e),9007199254740991):0},Fi=function(e){return Ni(e.length)},Qi=function(e){return function(t,i,o){var r,n=et(t),s=Fi(n),a=function(e,t){var i=Di(e);return i<0?ki(i+t,0):Bi(i,t)}(o,s);if(e&&i!=i){for(;s>a;)if((r=n[a++])!=r)return!0}else for(;s>a;a++)if((e||a in n)&&n[a]===i)return e||a||0;return!e&&-1}},Wi={includes:Qi(!0),indexOf:Qi(!1)}.indexOf,Hi=je([].push),ji=function(e,t){var i,o=et(e),r=0,n=[];for(i in o)!xt(bi,i)&&xt(o,i)&&Hi(n,i);for(;t.length>r;)xt(o,i=t[r++])&&(~Wi(n,i)||Hi(n,i));return n},Ui=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qi=Ui.concat("length","prototype"),Gi={f:Object.getOwnPropertyNames||function(e){return ji(e,qi)}},Yi={f:Object.getOwnPropertySymbols},Ki=je([].concat),Ji=at("Reflect","ownKeys")||function(e){var t=Gi.f(ti(e)),i=Yi.f;return i?Ki(t,i(e)):t},Xi=function(e,t,i){for(var o=Ji(t),r=ci.f,n=Xt.f,s=0;s<o.length;s++){var a=o[s];xt(e,a)||i&&xt(i,a)||r(e,a,n(t,a))}},$i=/#|\.prototype\./,Zi=function(e,t){var i=to[eo(e)];return i===oo||i!==io&&(rt(t)?Ie(t):!!t)},eo=Zi.normalize=function(e){return String(e).replace($i,".").toLowerCase()},to=Zi.data={},io=Zi.NATIVE="N",oo=Zi.POLYFILL="P",ro=Zi,no=Xt.f,so=function(e,t){var i,o,r,n,s,a=e.target,c=e.global,u=e.stat;if(i=c?Le:u?Le[a]||Et(a,{}):(Le[a]||{}).prototype)for(o in t){if(n=t[o],r=e.dontCallGetSet?(s=no(i,o))&&s.value:i[o],!ro(c?o:a+(u?".":"#")+o,e.forced)&&void 0!==r){if(typeof n==typeof r)continue;Xi(n,r)}(e.sham||r&&r.sham)&&ui(n,"sham",!0),Li(i,o,n,e)}},ao={};ao[Qt("toStringTag")]="z";var co,uo="[object z]"===String(ao),lo=Qt("toStringTag"),ho=Object,po="Arguments"===Ge(function(){return arguments}()),To=uo?Ge:function(e){var t,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=ho(e),lo))?i:po?Ge(t):"Object"===(o=Ge(t))&&rt(t.callee)?"Arguments":o},fo=String,vo=function(e){if("Symbol"===To(e))throw TypeError("Cannot convert a Symbol value to a string");return fo(e)},go=function(){var e=ti(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},mo=Le.RegExp,Ro=Ie((function(){var e=mo("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),yo=Ro||Ie((function(){return!mo("a","y").sticky})),Co={BROKEN_CARET:Ro||Ie((function(){var e=mo("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:yo,UNSUPPORTED_Y:Ro},_o=Object.keys||function(e){return ji(e,Ui)},bo=xe&&!$t?Object.defineProperties:function(e,t){ti(e);for(var i,o=et(t),r=_o(t),n=r.length,s=0;n>s;)ci.f(e,i=r[s++],o[i]);return e},So={f:bo},Mo=at("document","documentElement"),Eo="prototype",wo="script",Ao=_i("IE_PROTO"),Vo=function(){},Po=function(e){return"<"+wo+">"+e+"</"+wo+">"},Lo=function(e){e.write(Po("")),e.close();var t=e.parentWindow.Object;return e=null,t},Io=function(){try{co=new ActiveXObject("htmlfile")}catch(r){}var e,t,i;Io="undefined"!=typeof document?document.domain&&co?Lo(co):(t=Yt("iframe"),i="java"+wo+":",t.style.display="none",Mo.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(Po("document.F=Object")),e.close(),e.F):Lo(co);for(var o=Ui.length;o--;)delete Io[Eo][Ui[o]];return Io()};bi[Ao]=!0;var xo,Oo,Do=Object.create||function(e,t){var i;return null!==e?(Vo[Eo]=ti(e),i=new Vo,Vo[Eo]=null,i[Ao]=e):i=Io(),void 0===t?i:So.f(i,t)},ko=Le.RegExp,Bo=Ie((function(){var e=ko(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),zo=Le.RegExp,No=Ie((function(){var e=zo("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Fo=Vi.get,Qo=Vt("native-string-replace",String.prototype.replace),Wo=RegExp.prototype.exec,Ho=Wo,jo=je("".charAt),Uo=je("".indexOf),qo=je("".replace),Go=je("".slice),Yo=(Oo=/b*/g,ke(Wo,xo=/a/,"a"),ke(Wo,Oo,"a"),0!==xo.lastIndex||0!==Oo.lastIndex),Ko=Co.BROKEN_CARET,Jo=void 0!==/()??/.exec("")[1];(Yo||Jo||Ko||Bo||No)&&(Ho=function(e){var t,i,o,r,n,s,a,c=this,u=Fo(c),l=vo(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=ke(Ho,d,l),c.lastIndex=d.lastIndex,t;var h=u.groups,p=Ko&&c.sticky,T=ke(go,c),f=c.source,v=0,g=l;if(p&&(T=qo(T,"y",""),-1===Uo(T,"g")&&(T+="g"),g=Go(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==jo(l,c.lastIndex-1))&&(f="(?: "+f+")",g=" "+g,v++),i=new RegExp("^(?:"+f+")",T)),Jo&&(i=new RegExp("^"+f+"$(?!\\s)",T)),Yo&&(o=c.lastIndex),r=ke(Wo,p?i:c,g),p?r?(r.input=Go(r.input,v),r[0]=Go(r[0],v),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:Yo&&r&&(c.lastIndex=c.global?r.index+r[0].length:o),Jo&&r&&r.length>1&&ke(Qo,r[0],i,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)})),r&&h)for(r.groups=s=Do(null),n=0;n<h.length;n++)s[(a=h[n])[0]]=r[a[1]];return r});var Xo=Ho;so({target:"RegExp",proto:!0,forced:/./.exec!==Xo},{exec:Xo});var $o="\t\n\v\f\r \u2028\u2029\ufeff",Zo=je("".replace),er=RegExp("^["+$o+"]+"),tr=RegExp("(^|[^"+$o+"])["+$o+"]+$"),ir=function(e){return function(t){var i=vo(Ze(t));return 1&e&&(i=Zo(i,er,"")),2&e&&(i=Zo(i,tr,"$1")),i}},or={start:ir(1),end:ir(2),trim:ir(3)}.trim,rr=je("".charAt),nr=Le.parseFloat,sr=Le.Symbol,ar=sr&&sr.iterator,cr=1/nr($o+"-0")!=-Infinity||ar&&!Ie((function(){nr(Object(ar))}))?function(e){var t=or(vo(e)),i=nr(t);return 0===i&&"-"===rr(t,0)?-0:i}:nr;so({global:!0,forced:parseFloat!==cr},{parseFloat:cr});var ur=function(e){if("Function"===Ge(e))return je(e)},lr=Qt("species"),dr=RegExp.prototype,hr=je("".charAt),pr=je("".charCodeAt),Tr=je("".slice),fr=function(e){return function(t,i){var o,r,n=vo(Ze(t)),s=Di(i),a=n.length;return s<0||s>=a?e?"":void 0:(o=pr(n,s))<55296||o>56319||s+1===a||(r=pr(n,s+1))<56320||r>57343?e?hr(n,s):o:e?Tr(n,s,s+2):r-56320+(o-55296<<10)+65536}},vr={codeAt:fr(!1),charAt:fr(!0)}.charAt,gr=function(e,t,i){return t+(i?vr(e,t).length:1)},mr=TypeError,Rr=function(e,t){var i=e.exec;if(rt(i)){var o=ke(i,e,t);return null!==o&&ti(o),o}if("RegExp"===Ge(e))return ke(Xo,e,t);throw mr("RegExp#exec called on incompatible receiver")};!function(e,t,i,o){var r=Qt(e),n=!Ie((function(){var t={};return t[r]=function(){return 7},7!==""[e](t)})),s=n&&!Ie((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[lr]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t}));if(!n||!s||i){var a=ur(/./[r]),c=t(r,""[e],(function(e,t,i,o,r){var s=ur(e),c=t.exec;return c===Xo||c===dr.exec?n&&!r?{done:!0,value:a(t,i,o)}:{done:!0,value:s(i,t,o)}:{done:!1}}));Li(String.prototype,e,c[0]),Li(dr,r,c[1])}o&&ui(dr[r],"sham",!0)}("match",(function(e,t,i){return[function(t){var i=Ze(this),o=Xe(t)?void 0:bt(t,e);return o?ke(o,t,i):new RegExp(t)[e](vo(i))},function(e){var o=ti(this),r=vo(e),n=i(t,o,r);if(n.done)return n.value;if(!o.global)return Rr(o,r);var s=o.unicode;o.lastIndex=0;for(var a,c=[],u=0;null!==(a=Rr(o,r));){var l=vo(a[0]);c[u]=l,""===l&&(o.lastIndex=gr(r,Ni(o.lastIndex),s)),u++}return 0===u?null:c}]}));var yr=Array.isArray||function(e){return"Array"===Ge(e)},Cr=TypeError,_r=function(e){if(e>9007199254740991)throw Cr("Maximum allowed index exceeded");return e},br=function(e,t,i){var o=Ut(t);o in e?ci.f(e,o,Fe(0,i)):e[o]=i},Sr=function(){},Mr=[],Er=at("Reflect","construct"),wr=/^\s*(?:class|function)\b/,Ar=je(wr.exec),Vr=!wr.exec(Sr),Pr=function(e){if(!rt(e))return!1;try{return Er(Sr,Mr,e),!0}catch(t){return!1}},Lr=function(e){if(!rt(e))return!1;switch(To(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vr||!!Ar(wr,mi(e))}catch(t){return!0}};Lr.sham=!0;var Ir,xr=!Er||Ie((function(){var e;return Pr(Pr.call)||!Pr(Object)||!Pr((function(){e=!0}))||e}))?Lr:Pr,Or=Qt("species"),Dr=Array,kr=function(e,t){return new(function(e){var t;return yr(e)&&(t=e.constructor,(xr(t)&&(t===Dr||yr(t.prototype))||st(t)&&null===(t=t[Or]))&&(t=void 0)),void 0===t?Dr:t}(e))(0===t?0:t)},Br=Qt("species"),zr=Qt("isConcatSpreadable"),Nr=Tt>=51||!Ie((function(){var e=[];return e[zr]=!1,e.concat()[0]!==e})),Fr=function(e){if(!st(e))return!1;var t=e[zr];return void 0!==t?!!t:yr(e)};so({target:"Array",proto:!0,arity:1,forced:!(Nr&&(Ir="concat",Tt>=51||!Ie((function(){var e=[];return(e.constructor={})[Br]=function(){return{foo:1}},1!==e[Ir](Boolean).foo}))))},{concat:function(e){var t,i,o,r,n,s=Lt(this),a=kr(s,0),c=0;for(t=-1,o=arguments.length;t<o;t++)if(Fr(n=-1===t?s:arguments[t]))for(r=Fi(n),_r(c+r),i=0;i<r;i++,c++)i in n&&br(a,c,n[i]);else _r(c+1),br(a,c++,n);return a.length=c,a}});var Qr=window.navigator&&window.navigator.userAgent||"",Wr=/AppleWebKit\/([\d.]+)/i.exec(Qr);Wr&&parseFloat(Wr.pop());var Hr=/iPad/i.test(Qr),jr=/iPhone/i.test(Qr)&&!Hr,Ur=/iPod/i.test(Qr),qr=jr||Hr||Ur,Gr=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(Qr);qr&&function(){var e=Qr.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var Yr=/Android/i.test(Qr);Yr&&function(){var e=Qr.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);t&&i&&parseFloat("".concat(e[1],".").concat(e[2]))}();Yr&&/webkit/i.test(Qr),/Firefox/i.test(Qr)&&function(){var e=Qr.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Kr=/Edge\//i.test(Qr);Kr&&function(){var e=Qr.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var Jr=/Edg\//i.test(Qr);Jr&&function(){var e=Qr.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Xr=/SogouMobileBrowser\//i.test(Qr);Xr&&function(){var e=Qr.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var $r=/MetaSr\s/i.test(Qr);$r&&function(){var e=Qr.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Zr=/TBS\/\d+/i.test(Qr);Zr&&function(){var e=Qr.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var en=/XWEB\/\d+/i.test(Qr);en&&function(){var e=Qr.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(Qr),/MSIE\/\d+/i.test(Qr)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(Qr),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(Qr)&&/rv:11.0/.test(Qr)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(Qr)&&function(){var e=Qr.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var tn=!Zr&&/MQQBrowser\/\d+/i.test(Qr)&&/COVC\/\d+/i.test(Qr),on=!Zr&&/MQQBrowser\/\d+/i.test(Qr)&&!/COVC\/\d+/i.test(Qr);(on||tn)&&function(){var e=Qr.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var rn=!Zr&&/ QQBrowser\/\d+/i.test(Qr);rn&&function(){var e=Qr.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var nn=!Zr&&/QQBrowserLite\/\d+/i.test(Qr);nn&&function(){var e=Qr.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var sn=!Zr&&/MQBHD\/\d+/i.test(Qr);sn&&function(){var e=Qr.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(Qr),!qr&&/MAC OS X/i.test(Qr),!Yr&&/Linux/i.test(Qr),/MicroMessenger/i.test(Qr),/UCBrowser/i.test(Qr),/Electron/i.test(Qr);var an=/MiuiBrowser/i.test(Qr);an&&function(){var e=Qr.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var cn=/HuaweiBrowser/i.test(Qr);/Huawei/i.test(Qr),cn&&function(){var e=Qr.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var un=/SamsungBrowser/i.test(Qr);un&&function(){var e=Qr.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var ln=/HeyTapBrowser/i.test(Qr);ln&&function(){var e=Qr.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var dn=/VivoBrowser/i.test(Qr);dn&&function(){var e=Qr.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var hn,pn,Tn,fn=/Chrome/i.test(Qr),vn=!Kr&&!$r&&!Xr&&!Zr&&!en&&!Jr&&!rn&&!an&&!cn&&!un&&!ln&&!dn&&/Chrome/i.test(Qr);vn&&function(){var e=Qr.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),vn&&function(){var e=Qr.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!fn&&!on&&!tn&&!nn&&!sn&&/Safari/i.test(Qr)&&function(){var e=Qr.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"}(hn||(hn={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(pn||(pn={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(Tn||(Tn={}));var gn,mn,Rn,yn=-3340,Cn=-1301,_n=-1314,bn=-1315,Sn=-1316,Mn=-1302,En=-1317,wn=-1318,An=-1319,Vn=-1308,Pn=-102015,Ln=-70252,In={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},xn={code:-1005,message:"not supported"},On="2.14.0";e.TRTCMediaMixingErrorCode=void 0,(gn=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[gn.Success=0]="Success",gn[gn.Error=-1]="Error",gn[gn.InvalidParams=-2]="InvalidParams",gn[gn.NotFoundSource=-3]="NotFoundSource",gn[gn.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",gn[gn.CameraNotAuthorized=-5]="CameraNotAuthorized",gn[gn.CameraIsOccupied=-6]="CameraIsOccupied",gn[gn.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(mn=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[mn.kCamera=0]="kCamera",mn[mn.kScreen=1]="kScreen",mn[mn.kImage=2]="kImage",mn[mn.kPhoneMirror=4]="kPhoneMirror",mn[mn.kText=5]="kText",mn[mn.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(Rn=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",Rn.onSourceMoved="onSourceMoved",Rn.onSourceResized="onSourceResized",Rn.onRightButtonClicked="onRightButtonClicked",Rn.onError="onError",Rn.onSourcePlugged="onSourcePlugged",Rn.onSourceConnected="onSourceConnected",Rn.onSourceDisconnected="onSourceDisconnected",Rn.onSourceUnplugged="onSourceUnplugged",Rn.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var Dn,kn=function(){function e(e,t){if(this.logRegion="tc",this.loggerManager=e,t){var i=t.sdkAppId,o=t.userId,r=t.seq;this.seq=r,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(r),userId:o,sdkAppId:i}))}else this.logger=e;this.logger||(this.logger={debug:function(e){console.debug(e)},info:function(e){console.info(e)},warn:function(e){console.warn(e)},error:function(e){console.error(e)}})}return e.prototype.getLogMessage=function(e){var t=this;return e.map((function(e){return t.getStringifyMessage(e)})).join(" ")},e.prototype.getStringifyMessage=function(e){var t=this;if("object"!=typeof e)return e;if(e instanceof HTMLElement)return"".concat(e.tagName.toLocaleLowerCase(),"#").concat(e.id);if(e instanceof Array){var i=[];return Object.keys(e).forEach((function(o){return i[o]=t.getStringifyMessage(e[o])})),JSON.stringify(i)}if(e instanceof Object){var o={};return Object.keys(e).forEach((function(i){return o[i]=t.getStringifyMessage(e[i])})),JSON.stringify(o)}return e},e.prototype.update=function(e){var t=e.userId,i=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:t,sdkAppId:i}))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger.debug(i)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(i)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(i)},e}(),Bn=new kn(null),zn=function(){function e(e,t,i){void 0===i&&(i={calcPositionOnly:!1,canExceedContainer:!1}),this.logPrefix="[Movable]",this.movable=null,this.container=null,this.options={calcPositionOnly:!1,canExceedContainer:!1},this.callbacksMap=new Map,this.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:!!i.calcPositionOnly||!1,canExceedContainer:!!i.canExceedContainer||!1},this.setStyle(),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove5px=this.onMouseMove5px.bind(this),this.onMouseUp5px=this.onMouseUp5px.bind(this),this.movable.addEventListener("mousedown",this.onMouseDown,!1)}return e.prototype.setStyle=function(){this.movable?(this.movable.style.position="absolute",this.movable.style.cursor="move"):Bn.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 Bn.debug("".concat(this.logPrefix,"onMouseDown 'movable' is null"));this.moveStartOfLeft=e.screenX,this.moveStartOfTop=e.screenY,document.addEventListener("mousemove",this.onMouseMove5px,!1),document.addEventListener("mouseup",this.onMouseUp5px,!1)}},e.prototype.onMouseMove5px=function(e){var t=e.screenX-(this.moveStartOfLeft||0),i=e.screenY-(this.moveStartOfTop||0);Math.abs(t)>=5||Math.abs(i)>=5?(document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1),document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1)):Bn.debug("".concat(this.logPrefix,"on Movable mouse move less than 5px"))},e.prototype.onMouseUp5px=function(){document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1)},e.prototype.onMouseMove=function(e){if(this.movable&&this.container){var t=e.screenX-this.moveStartOfLeft,i=e.screenY-this.moveStartOfTop,o=this.originLeft+t,r=this.originTop+i,n=this.movable.offsetWidth,s=this.movable.offsetHeight,a=this.container.offsetWidth,c=this.container.offsetHeight;this.options.canExceedContainer||(o<0?o=0:o>a-n&&(o=a-n),r<0?r=0:r>c-s&&(r=c-s)),!this.options.calcPositionOnly&&this.movable&&(this.movable.style.left="".concat(o,"px"),this.movable.style.top="".concat(r,"px")),this.emit("move",o,r)}else Bn.debug("".concat(this.logPrefix,"onMouseMove error:No 'movable' and 'container'."))},e.prototype.onMouseUp=function(){document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0},e.prototype.on=function(e,t){var i=this.callbacksMap.get(e);i?i.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var i=this.callbacksMap.get(e);i&&(i=i.filter((function(e){return e!=t})),this.callbacksMap.set(e,i))},e.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=this.callbacksMap.get(e);o&&o.forEach((function(e){try{e.apply(null,t)}catch(i){console.error("[Movable]emit error:",e,i)}}))},e.prototype.destroy=function(){var e;null===(e=this.movable)||void 0===e||e.removeEventListener("mousedown",this.onMouseDown,!1),this.callbacksMap.clear(),this.movable=null,this.container=null},e.prototype.setEnabled=function(e){Bn.debug("".concat(this.logPrefix,"setEnabled: ").concat(this.enabled," -> ").concat(e)),this.enabled=e,this.movable&&(this.movable.style.cursor=e?"move":"default",Bn.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"}(Dn||(Dn={}));var Nn="trtc-resizable-top-left-anchor",Fn="trtc-resizable-top-anchor",Qn="trtc-resizable-top-right-anchor",Wn="trtc-resizable-left-anchor",Hn="trtc-resizable-right-anchor",jn="trtc-resizable-bottom-left-anchor",Un="trtc-resizable-bottom-anchor",qn="trtc-resizable-bottom-right-anchor",Gn={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 Yn(e,t){for(var i in t)e.style[i]=t[i]}var Kn,Jn=function(){function e(e,t,i){void 0===i&&(i={keepRatio:!1,stopPropagation:!1,anchorMode:Dn.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:Dn.Both,canExceedContainer:!1},this.callbacksMap=new Map,this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0,this.resizeTarget=e,this.container=t||document.body,this.options={keepRatio:!!i.keepRatio||!1,stopPropagation:!!i.stopPropagation||!1,anchorMode:i.anchorMode||Dn.Both,canExceedContainer:!!i.canExceedContainer||!1},this.mousedown=this.mousedown.bind(this),this.mousemove=this.mousemove.bind(this),this.mouseup=this.mouseup.bind(this),this.currentAnchor=null,this.c