UNPKG

zego-express-engine-webrtc

Version:

zego webrtc express sdk

1 lines 71.7 kB
!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("protobufjs/minimal"),require("long"));else if("function"==typeof define&&define.amd)define(["protobufjs/minimal","long"],n);else{var e="object"==typeof exports?n(require("protobufjs/minimal"),require("long")):n(t["protobufjs/minimal"],t.long);for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(Object("undefined"!=typeof self?self:this),function(t,n){return function(){var e={477:function(){},754:function(t,n,e){var i;t.exports=(i=e(9021),function(){var t=i.lib.WordArray;function n(n,e,i){for(var r=[],o=0,u=0;u<e;u++)if(u%4){var s=i[n.charCodeAt(u-1)]<<u%4*2,a=i[n.charCodeAt(u)]>>>6-u%4*2;r[o>>>2]|=(s|a)<<24-o%4*8,o++}return t.create(r,o)}i.enc.Base64={stringify:function(t){var n=t.words,e=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<e;o+=3)for(var u=(n[o>>>2]>>>24-o%4*8&255)<<16|(n[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|n[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<e;s++)r.push(i.charAt(u>>>6*(3-s)&63));var a=i.charAt(64);if(a)for(;r.length%4;)r.push(a);return r.join("")},parse:function(t){var e=t.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<i.length;o++)r[i.charCodeAt(o)]=o}var u=i.charAt(64);if(u){var s=t.indexOf(u);-1!==s&&(e=s)}return n(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)},921:function(t,n,e){"use strict";e.d(n,{Eg:function(){return o},Nl:function(){return i},_V:function(){return r}});e(2638),e(8866),e(3052),e(955),e(5178);function i(t,n){return void 0===n&&(n=""),{errorCode:t.errorCode||t.code||0,extendedData:(t.extendedData||t.message||t.msg)+n}}function r(t,n){return{code:t,msg:n||"liveroom error"}}function o(t){for(var n,e=0,i=t.length,r="";e<i;)n=t.subarray(e,Math.min(e+32768,i)),r+=String.fromCharCode.apply(null,Array.from(n)),e+=32768;return btoa(r)}},955:function(t,n,e){var i;t.exports=(i=e(9021),e(754),e(4636),e(9506),e(7165),function(){var t=i,n=t.lib.BlockCipher,e=t.algo,r=[],o=[],u=[],s=[],a=[],c=[],f=[],l=[],m=[],d=[];!function(){for(var t=[],n=0;n<256;n++)t[n]=n<128?n<<1:n<<1^283;var e=0,i=0;for(n=0;n<256;n++){var v=i^i<<1^i<<2^i<<3^i<<4;r[e]=v=v>>>8^255&v^99,o[v]=e;var h,_=t[e],p=t[_],g=t[p];u[e]=(h=257*t[v]^16843008*v)<<24|h>>>8,s[e]=h<<16|h>>>16,a[e]=h<<8|h>>>24,c[e]=h,f[v]=(h=16843009*g^65537*p^257*_^16843008*e)<<24|h>>>8,l[v]=h<<16|h>>>16,m[v]=h<<8|h>>>24,d[v]=h,e?(e=_^t[t[t[g^_]]],i^=t[t[i]]):e=i=1}}();var v=[0,1,2,4,8,16,32,64,128,27,54],h=e.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,n=t.words,e=t.sigBytes/4,i=4*((this._nRounds=e+6)+1),o=this._keySchedule=[],u=0;u<i;u++)u<e?o[u]=n[u]:(c=o[u-1],u%e?e>6&&u%e==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=v[u/e|0]<<24),o[u]=o[u-e]^c);for(var s=this._invKeySchedule=[],a=0;a<i;a++){if(u=i-a,a%4)var c=o[u];else c=o[u-4];s[a]=a<4||u<=4?c:f[r[c>>>24]]^l[r[c>>>16&255]]^m[r[c>>>8&255]]^d[r[255&c]]}}},encryptBlock:function(t,n){this._doCryptBlock(t,n,this._keySchedule,u,s,a,c,r)},decryptBlock:function(t,n){var e=t[n+1];t[n+1]=t[n+3],t[n+3]=e,this._doCryptBlock(t,n,this._invKeySchedule,f,l,m,d,o),e=t[n+1],t[n+1]=t[n+3],t[n+3]=e},_doCryptBlock:function(t,n,e,i,r,o,u,s){for(var a=this._nRounds,c=t[n]^e[0],f=t[n+1]^e[1],l=t[n+2]^e[2],m=t[n+3]^e[3],d=4,v=1;v<a;v++){var h=i[c>>>24]^r[f>>>16&255]^o[l>>>8&255]^u[255&m]^e[d++],_=i[f>>>24]^r[l>>>16&255]^o[m>>>8&255]^u[255&c]^e[d++],p=i[l>>>24]^r[m>>>16&255]^o[c>>>8&255]^u[255&f]^e[d++],g=i[m>>>24]^r[c>>>16&255]^o[f>>>8&255]^u[255&l]^e[d++];c=h,f=_,l=p,m=g}h=(s[c>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&m])^e[d++],_=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[m>>>8&255]<<8|s[255&c])^e[d++],p=(s[l>>>24]<<24|s[m>>>16&255]<<16|s[c>>>8&255]<<8|s[255&f])^e[d++],g=(s[m>>>24]<<24|s[c>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^e[d++],t[n]=h,t[n+1]=_,t[n+2]=p,t[n+3]=g},keySize:8});t.AES=n._createHelper(h)}(),i.AES)},1025:function(t,n,e){var i,r;t.exports=(i=e(9021),r=i.enc.Utf8,void(i.algo.HMAC=i.lib.Base.extend({init:function(t,n){t=this._hasher=new t.init,"string"==typeof n&&(n=r.parse(n));var e=t.blockSize,i=4*e;n.sigBytes>i&&(n=t.finalize(n)),n.clamp();for(var o=this._oKey=n.clone(),u=this._iKey=n.clone(),s=o.words,a=u.words,c=0;c<e;c++)s[c]^=1549556828,a[c]^=909522486;o.sigBytes=u.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var n=this._hasher,e=n.finalize(t);return n.reset(),n.finalize(this._oKey.clone().concat(e))}})))},2638:function(t,n,e){"use strict";e.d(n,{Mo:function(){return c}});var i;e(3052);!function(t){t[t.debug=0]="debug",t[t.info=1]="info",t[t.warn=2]="warn",t[t.error=3]="error",t[t.report=99]="report",t[t.disable=100]="disable"}(i||(i={}));var r,o,u;!function(t){t[t.disable=0]="disable",t[t.websocket=1]="websocket",t[t.https=2]="https"}(r||(r={})),function(t){t[t.SDKProject_ZegoWebRTC=6]="SDKProject_ZegoWebRTC",t[t.SDKProject_ZegoMiniProgram=7]="SDKProject_ZegoMiniProgram"}(o||(o={})),function(t){t[t.UDP=0]="UDP",t[t.RTMP=1]="RTMP",t[t.FLV=2]="FLV",t[t.HLS=3]="HLS",t[t.WEBRTC=4]="WEBRTC"}(u||(u={}));var s,a,c=(s=1,function(){return s++});!function(){var t=1}();!function(t){t[t.ClientType_None=0]="ClientType_None",t[t.ClientType_H5=1]="ClientType_H5",t[t.ClientType_SmallPragram=2]="ClientType_SmallPragram",t[t.ClientType_Webrtc=3]="ClientType_Webrtc"}(a||(a={}));var f,l,m,d,v,h,_,p,g,x,b,y,S,M;!function(t){t[t.start=0]="start",t[t.error=1]="error",t[t.retry=2]="retry",t[t.stop=3]="stop"}(f||(f={})),function(t){t[t.disconnected=0]="disconnected",t[t.connecting=1]="connecting",t[t.connected=2]="connected"}(l||(l={})),function(t){t[t.Default=0]="Default",t[t.Extranet=1]="Extranet",t[t.Intranet=2]="Intranet"}(m||(m={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(d||(d={})),function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login",t[t.reconnect=3]="reconnect"}(v||(v={})),function(t){t[t.stop=0]="stop",t[t.start=1]="start"}(h||(h={})),function(t){t[t.CDN=0]="CDN",t[t.RTC=1]="RTC",t[t.L3=2]="L3",t[t.DG=3]="DG"}(_||(_={})),function(t){t[t.useAnalyzer=0]="useAnalyzer",t[t.useWorklet=1]="useWorklet"}(p||(p={})),function(t){t[t.Default=3]="Default",t[t.StandardVideoCall=4]="StandardVideoCall",t[t.HighVideoCall=5]="HighVideoCall",t[t.StandardChatroom=6]="StandardChatroom",t[t.HighQualityChatroom=7]="HighQualityChatroom",t[t.Broadcast=8]="Broadcast",t[t.Karaoke=9]="Karaoke",t[t.UNKNOWN=100]="UNKNOWN"}(g||(g={})),function(t){t.WIN32="WIN32",t.MAC="Mac",t.ANDROID="Android",t.LINUX="Linux",t.IOS="iOS",t.Harmony="Harmony",t.UNKNOWN="WTF"}(x||(x={})),function(t){t.CDN="cdn",t.L3="l3",t.RTC="rtc"}(b||(b={})),function(t){t[t.RTC=0]="RTC",t[t.CDN=1]="CDN",t[t.L3=2]="L3",t[t.DG=3]="DG",t[t.CUSTOM=5]="CUSTOM"}(y||(y={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(S||(S={})),function(t){t[t.MinQuality=0]="MinQuality",t[t.DieQuality=0]="DieQuality",t[t.PoorMinQuality=1]="PoorMinQuality",t[t.MiddleMinQuality=30]="MiddleMinQuality",t[t.GoodMinQuality=60]="GoodMinQuality",t[t.ExcellentMinQuality=85]="ExcellentMinQuality",t[t.MaxQuality=100]="MaxQuality"}(M||(M={}));var k,w,T=function(){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.next=null,this.prev=null,this._id=t,this._data=n}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id?this._id:null},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),t.prototype.hasNext=function(){return this.next&&this.next.id},t.prototype.hasPrev=function(){return this.prev&&this.prev.id},t}();!function(){function t(){this.start=new T,this.end=new T,this._idCounter=0,this._numNodes=0,this.start.next=this.end,this.start.prev=null,this.end.prev=this.start,this.end.next=null}t.prototype.insertBefore=function(t,n){var e=new T(this._idCounter,n);return e.next=t,e.prev=t.prev,t.prev&&(t.prev.next=e),t.prev=e,++this._idCounter,++this._numNodes,e},t.prototype.addLast=function(t){return this.insertBefore(this.end,t)},t.prototype.add=function(t){return this.addLast(t)},t.prototype.getFirst=function(){return 0===this._numNodes?null:this.start.next},t.prototype.getLast=function(){return 0===this._numNodes?null:this.end.prev},t.prototype.size=function(){return this._numNodes},t.prototype.getFromFirst=function(t){var n=0,e=this.start.next;if(t>=0)for(;n<t&&null!==e;)e=e.next,++n;else e=null;if(null===e)throw"Index out of bounds.";return e},t.prototype.get=function(t){return 0===t?this.getFirst():t===this._numNodes-1?this.getLast():this.getFromFirst(t)},t.prototype.remove=function(t){return t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),--this._numNodes,t},t.prototype.removeFirst=function(){var t=null;return this._numNodes>0&&this.start.next&&(t=this.remove(this.start.next)),t},t.prototype.removeLast=function(){var t=null;return this._numNodes>0&&this.end.prev&&(t=this.remove(this.end.prev)),t},t.prototype.removeAll=function(){this.start.next=this.end,this.end.prev=this.start,this._numNodes=0,this._idCounter=0},t.prototype.each=function(t){for(var n=this.start;n.hasNext();)t(n=n.next)},t.prototype.find=function(t){for(var n=this.start,e=!1,i=null;n.hasNext()&&!e;)t(n=n.next)&&(i=n,e=!0);return i},t.prototype.map=function(t){for(var n=this.start,e=[];n.hasNext();)t(n=n.next)&&e.push(n);return e},t.prototype.push=function(t){return this.addLast(t)},t.prototype.unshift=function(t){this.insertBefore(this._numNodes>0?this.start.next:this.end,t)},t.prototype.pop=function(){return this.removeLast()},t.prototype.shift=function(){return this.removeFirst()}}();!function(t){t.ONLY_BASELINE="only_baseline",t.HARD_SOFT_ENCODEC_FIRST="hard_or_soft_encodec_first",t.HIGH_PROFILE_FIRST="high_profile_first"}(k||(k={})),function(t){t[t.None=0]="None",t[t.Vocalist=1]="Vocalist",t[t.BackingSinging=2]="BackingSinging"}(w||(w={}));var R,I;new Error("This method requires subclasses to implement");!function(t){t[t.IPv4Only=0]="IPv4Only",t[t.IPv4Prefer=1]="IPv4Prefer",t[t.IPv6Prefer=2]="IPv6Prefer"}(R||(R={})),function(t){t[t.IPv4=0]="IPv4",t[t.IPv6=1]="IPv6"}(I||(I={}));var E;!function(t){t[t.unreachable=0]="unreachable",t[t.unknown=1]="unknown",t[t.reachable=2]="reachable"}(E||(E={}))},3052:function(t,n,e){"use strict";var i,r;!function(t){t[t.SWITCH_ONE=1]="SWITCH_ONE",t[t.SWITCH_TWO=2]="SWITCH_TWO"}(i||(i={})),function(t){t[t.ZegoGeoFenceTypeNone=0]="ZegoGeoFenceTypeNone",t[t.ZegoGeoFenceTypeInclude=1]="ZegoGeoFenceTypeInclude",t[t.ZegoGeoFenceTypeExclude=2]="ZegoGeoFenceTypeExclude"}(r||(r={}));var o,u;!function(t){t[t.TT_NONE=0]="TT_NONE",t[t.TT_PC=1]="TT_PC",t[t.TT_IOS=2]="TT_IOS",t[t.TT_ANDROID=3]="TT_ANDROID",t[t.TT_MAC=4]="TT_MAC",t[t.TT_LINUX=5]="TT_LINUX",t[t.TT_WEB=6]="TT_WEB",t[t.TT_MINIPROGRAM=7]="TT_MINIPROGRAM",t[t.TT_UNKNOWN=32]="TT_UNKNOWN"}(o||(o={})),function(t){t[t.disconnected=0]="disconnected",t[t.connecting=1]="connecting",t[t.connected=2]="connected"}(u||(u={}));var s,a,c,f;!function(t){t[t.logout=0]="logout",t[t.trylogin=1]="trylogin",t[t.login=2]="login"}(s||(s={})),function(t){t[t.I=0]="I",t[t.H=10]="H",t[t.M=100]="M",t[t.L=1e3]="L"}(a||(a={})),function(t){t[t.offline=0]="offline",t[t.online=1]="online"}(c||(c={})),function(t){t[t.NT_NONE=0]="NT_NONE",t[t.NT_LINE=1]="NT_LINE",t[t.NT_WIFI=2]="NT_WIFI",t[t.NT_2G=3]="NT_2G",t[t.NT_3G=4]="NT_3G",t[t.NT_4G=5]="NT_4G",t[t.NT_UNKNOWN=32]="NT_UNKNOWN"}(f||(f={}))},3788:function(n){"use strict";n.exports=t},4636:function(t,n,e){var i;t.exports=(i=e(9021),function(t){var n=i,e=n.lib,r=e.WordArray,o=e.Hasher,u=n.algo,s=[];!function(){for(var n=0;n<64;n++)s[n]=4294967296*t.abs(t.sin(n+1))|0}();var a=u.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,n){for(var e=0;e<16;e++){var i=n+e,r=t[i];t[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,u=t[n+0],a=t[n+1],d=t[n+2],v=t[n+3],h=t[n+4],_=t[n+5],p=t[n+6],g=t[n+7],x=t[n+8],b=t[n+9],y=t[n+10],S=t[n+11],M=t[n+12],k=t[n+13],w=t[n+14],T=t[n+15],R=o[0],I=o[1],E=o[2],C=o[3];R=c(R,I,E,C,u,7,s[0]),C=c(C,R,I,E,a,12,s[1]),E=c(E,C,R,I,d,17,s[2]),I=c(I,E,C,R,v,22,s[3]),R=c(R,I,E,C,h,7,s[4]),C=c(C,R,I,E,_,12,s[5]),E=c(E,C,R,I,p,17,s[6]),I=c(I,E,C,R,g,22,s[7]),R=c(R,I,E,C,x,7,s[8]),C=c(C,R,I,E,b,12,s[9]),E=c(E,C,R,I,y,17,s[10]),I=c(I,E,C,R,S,22,s[11]),R=c(R,I,E,C,M,7,s[12]),C=c(C,R,I,E,k,12,s[13]),E=c(E,C,R,I,w,17,s[14]),R=f(R,I=c(I,E,C,R,T,22,s[15]),E,C,a,5,s[16]),C=f(C,R,I,E,p,9,s[17]),E=f(E,C,R,I,S,14,s[18]),I=f(I,E,C,R,u,20,s[19]),R=f(R,I,E,C,_,5,s[20]),C=f(C,R,I,E,y,9,s[21]),E=f(E,C,R,I,T,14,s[22]),I=f(I,E,C,R,h,20,s[23]),R=f(R,I,E,C,b,5,s[24]),C=f(C,R,I,E,w,9,s[25]),E=f(E,C,R,I,v,14,s[26]),I=f(I,E,C,R,x,20,s[27]),R=f(R,I,E,C,k,5,s[28]),C=f(C,R,I,E,d,9,s[29]),E=f(E,C,R,I,g,14,s[30]),R=l(R,I=f(I,E,C,R,M,20,s[31]),E,C,_,4,s[32]),C=l(C,R,I,E,x,11,s[33]),E=l(E,C,R,I,S,16,s[34]),I=l(I,E,C,R,w,23,s[35]),R=l(R,I,E,C,a,4,s[36]),C=l(C,R,I,E,h,11,s[37]),E=l(E,C,R,I,g,16,s[38]),I=l(I,E,C,R,y,23,s[39]),R=l(R,I,E,C,k,4,s[40]),C=l(C,R,I,E,u,11,s[41]),E=l(E,C,R,I,v,16,s[42]),I=l(I,E,C,R,p,23,s[43]),R=l(R,I,E,C,b,4,s[44]),C=l(C,R,I,E,M,11,s[45]),E=l(E,C,R,I,T,16,s[46]),R=m(R,I=l(I,E,C,R,d,23,s[47]),E,C,u,6,s[48]),C=m(C,R,I,E,g,10,s[49]),E=m(E,C,R,I,w,15,s[50]),I=m(I,E,C,R,_,21,s[51]),R=m(R,I,E,C,M,6,s[52]),C=m(C,R,I,E,v,10,s[53]),E=m(E,C,R,I,y,15,s[54]),I=m(I,E,C,R,a,21,s[55]),R=m(R,I,E,C,x,6,s[56]),C=m(C,R,I,E,T,10,s[57]),E=m(E,C,R,I,p,15,s[58]),I=m(I,E,C,R,k,21,s[59]),R=m(R,I,E,C,h,6,s[60]),C=m(C,R,I,E,S,10,s[61]),E=m(E,C,R,I,d,15,s[62]),I=m(I,E,C,R,b,21,s[63]),o[0]=o[0]+R|0,o[1]=o[1]+I|0,o[2]=o[2]+E|0,o[3]=o[3]+C|0},_doFinalize:function(){var n=this._data,e=n.words,i=8*this._nDataBytes,r=8*n.sigBytes;e[r>>>5]|=128<<24-r%32;var o=t.floor(i/4294967296),u=i;e[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[14+(r+64>>>9<<4)]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),n.sigBytes=4*(e.length+1),this._process();for(var s=this._hash,a=s.words,c=0;c<4;c++){var f=a[c];a[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,n,e,i,r,o,u){var s=t+(n&e|~n&i)+r+u;return(s<<o|s>>>32-o)+n}function f(t,n,e,i,r,o,u){var s=t+(n&i|e&~i)+r+u;return(s<<o|s>>>32-o)+n}function l(t,n,e,i,r,o,u){var s=t+(n^e^i)+r+u;return(s<<o|s>>>32-o)+n}function m(t,n,e,i,r,o,u){var s=t+(e^(n|~i))+r+u;return(s<<o|s>>>32-o)+n}n.MD5=o._createHelper(a),n.HmacMD5=o._createHmacHelper(a)}(Math),i.MD5)},4871:function(t,n,e){"use strict";e.d(n,{Pn:function(){return u},v:function(){return s}});var i,r=e(8866),o=e(4872);!function(t){t.NOT_EMPTY="NOT_EMPTY",t.ILLEGAL_CHARACTERS="ILLEGAL_CHARACTERS",t.TYPE_STRING="TYPE_STRING",t.TYPE_INTEGER="TYPE_INTEGER",t.TYPE_OBJECT="TYPE_OBJECT",t.MAX_LENGTH_10="MAX_LENGTH_10",t.MAX_LENGTH_64="MAX_LENGTH_64",t.MAX_LENGTH_100="MAX_LENGTH_100",t.MAX_LENGTH_128="MAX_LENGTH_128",t.MAX_LENGTH_256="MAX_LENGTH_256",t.MAX_LENGTH_1024="MAX_LENGTH_1024"}(i||(i={}));function u(t,n){return!(0,o.TE)(t)&&!(0,r.zQ)(t,n)}function s(t){return!(0,o.TE)(t)&&!(0,o.dd)(t)}},4872:function(t,n,e){"use strict";function i(t){return"number"==typeof t}function r(t){return"string"==typeof t}function o(t){return"boolean"==typeof t}function u(t){return void 0===t}function s(t){return null!==t&&t instanceof Object}function a(t){return"function"==typeof t}function c(t){return t instanceof Uint8Array}function f(t){return(t.startsWith("preset-id://")||t.startsWith("http")||t.startsWith("https"))&&(t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".png"))}e.d(n,{$C:function(){return f},Cs:function(){return i},G0:function(){return c},JO:function(){return a},QP:function(){return r},TE:function(){return u},dd:function(){return o},w:function(){return s}})},4908:function(t,n,e){"use strict";e.d(n,{oq:function(){return r}});e(8627),e(5095);var i="/sdk/init",r={event:i}},5095:function(t,n,e){"use strict";e.d(n,{Gq:function(){return i},Tr:function(){return u},tK:function(){return r},yS:function(){return s},yp:function(){return o}});var i=function(t){return t},r=function(t){return t},o=function(t){return t},u=function(t){return t},s=function(t){return t}},5178:function(t,n,e){var i;t.exports=(i=e(9021),i.enc.Utf8)},5471:function(t,n,e){var i,r,o,u,s,a,c;t.exports=(c=e(9021),o=(r=(i=c).lib).WordArray,s=[],a=i.algo.SHA1=(u=r.Hasher).extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,n){for(var e=this._hash.words,i=e[0],r=e[1],o=e[2],u=e[3],a=e[4],c=0;c<80;c++){if(c<16)s[c]=0|t[n+c];else{var f=s[c-3]^s[c-8]^s[c-14]^s[c-16];s[c]=f<<1|f>>>31}var l=(i<<5|i>>>27)+a+s[c];l+=c<20?1518500249+(r&o|~r&u):c<40?1859775393+(r^o^u):c<60?(r&o|r&u|o&u)-1894007588:(r^o^u)-899497514,a=u,u=o,o=r<<30|r>>>2,r=i,i=l}e[0]=e[0]+i|0,e[1]=e[1]+r|0,e[2]=e[2]+o|0,e[3]=e[3]+u|0,e[4]=e[4]+a|0},_doFinalize:function(){var t=this._data,n=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=Math.floor(e/4294967296),n[15+(i+64>>>9<<4)]=e,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}}),i.SHA1=u._createHelper(a),i.HmacSHA1=u._createHmacHelper(a),c.SHA1)},6272:function(t,n,e){"use strict";e.d(n,{Rl:function(){return f},Wk:function(){return c},aw:function(){return o},dO:function(){return u},fT:function(){return i},h2:function(){return a},pt:function(){return r},qC:function(){return s}});var i="room not exist",r="device is not found",o="stream is not from zego",u="input param error",s="local stream wrong",a="no preview",c="publish stream no found",f="network is broken"},6994:function(t){"use strict";t.exports=n},7165:function(t,n,e){var i;t.exports=(i=e(9021),e(9506),void(i.lib.Cipher||function(t){var n=i,e=n.lib,r=e.Base,o=e.WordArray,u=e.BufferedBlockAlgorithm,s=n.enc,a=s.Base64,c=n.algo.EvpKDF,f=e.Cipher=u.extend({cfg:r.extend(),createEncryptor:function(t,n){return this.create(this._ENC_XFORM_MODE,t,n)},createDecryptor:function(t,n){return this.create(this._DEC_XFORM_MODE,t,n)},init:function(t,n,e){this.cfg=this.cfg.extend(e),this._xformMode=t,this._key=n,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?x:p}return function(n){return{encrypt:function(e,i,r){return t(i).encrypt(n,e,i,r)},decrypt:function(e,i,r){return t(i).decrypt(n,e,i,r)}}}}()}),l=(e.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),n.mode={}),m=e.BlockCipherMode=r.extend({createEncryptor:function(t,n){return this.Encryptor.create(t,n)},createDecryptor:function(t,n){return this.Decryptor.create(t,n)},init:function(t,n){this._cipher=t,this._iv=n}}),d=l.CBC=function(){var n=m.extend();function e(n,e,i){var r,o=this._iv;o?(r=o,this._iv=t):r=this._prevBlock;for(var u=0;u<i;u++)n[e+u]^=r[u]}return n.Encryptor=n.extend({processBlock:function(t,n){var i=this._cipher,r=i.blockSize;e.call(this,t,n,r),i.encryptBlock(t,n),this._prevBlock=t.slice(n,n+r)}}),n.Decryptor=n.extend({processBlock:function(t,n){var i=this._cipher,r=i.blockSize,o=t.slice(n,n+r);i.decryptBlock(t,n),e.call(this,t,n,r),this._prevBlock=o}}),n}(),v=(n.pad={}).Pkcs7={pad:function(t,n){for(var e=4*n,i=e-t.sigBytes%e,r=i<<24|i<<16|i<<8|i,u=[],s=0;s<i;s+=4)u.push(r);var a=o.create(u,i);t.concat(a)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},h=(e.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:v}),reset:function(){var t;f.reset.call(this);var n=this.cfg,e=n.iv,i=n.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,e&&e.words):(this._mode=t.call(i,this,e&&e.words),this._mode.__creator=t)},_doProcessBlock:function(t,n){this._mode.processBlock(t,n)},_doFinalize:function(){var t,n=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(n.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),n.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),_=(n.format={}).OpenSSL={stringify:function(t){var n=t.ciphertext,e=t.salt;return(e?o.create([1398893684,1701076831]).concat(e).concat(n):n).toString(a)},parse:function(t){var n,e=a.parse(t),i=e.words;return 1398893684==i[0]&&1701076831==i[1]&&(n=o.create(i.slice(2,4)),i.splice(0,4),e.sigBytes-=16),h.create({ciphertext:e,salt:n})}},p=e.SerializableCipher=r.extend({cfg:r.extend({format:_}),encrypt:function(t,n,e,i){i=this.cfg.extend(i);var r=t.createEncryptor(e,i),o=r.finalize(n),u=r.cfg;return h.create({ciphertext:o,key:e,iv:u.iv,algorithm:t,mode:u.mode,padding:u.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,n,e,i){return i=this.cfg.extend(i),n=this._parse(n,i.format),t.createDecryptor(e,i).finalize(n.ciphertext)},_parse:function(t,n){return"string"==typeof t?n.parse(t,this):t}}),g=(n.kdf={}).OpenSSL={execute:function(t,n,e,i,r){if(i||(i=o.random(8)),r)u=c.create({keySize:n+e,hasher:r}).compute(t,i);else var u=c.create({keySize:n+e}).compute(t,i);var s=o.create(u.words.slice(n),4*e);return u.sigBytes=4*n,h.create({key:u,iv:s,salt:i})}},x=e.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:g}),encrypt:function(t,n,e,i){var r=(i=this.cfg.extend(i)).kdf.execute(e,t.keySize,t.ivSize,i.salt,i.hasher);i.iv=r.iv;var o=p.encrypt.call(this,t,n,r.key,i);return o.mixIn(r),o},decrypt:function(t,n,e,i){i=this.cfg.extend(i),n=this._parse(n,i.format);var r=i.kdf.execute(e,t.keySize,t.ivSize,n.salt,i.hasher);return i.iv=r.iv,p.decrypt.call(this,t,n,r.key,i)}})}()))},7202:function(t,n,e){"use strict";var i=e(6994);n.A=i.default||i},8627:function(t,n,e){"use strict";e.d(n,{Be2:function(){return O},FB3:function(){return w},HO9:function(){return d},I7C:function(){return E},JSm:function(){return D},L8E:function(){return k},LLz:function(){return g},OrZ:function(){return x},Oy0:function(){return a},PTE:function(){return _},Q9p:function(){return s},Qo5:function(){return f},S4u:function(){return r},S5f:function(){return o},Srw:function(){return m},V2t:function(){return p},ZEp:function(){return u},_HD:function(){return c},aUw:function(){return v},ckg:function(){return z},jut:function(){return S},m6U:function(){return I},mrK:function(){return R},sVF:function(){return h},s_m:function(){return y},t85:function(){return M},ulL:function(){return l},xU2:function(){return T},yK:function(){return b},zs3:function(){return C}});var i=e(6272),r={code:1000002,message:"not login room"},o={code:1000018,message:i.qC},u={code:1100001,message:i.dO},s={code:1100002,message:"network timeout."},a={code:1100999,message:"unknown server error"},c={code:1101005,message:"signal hb fail"},f={code:1002011,message:"room ID is empty"},l={code:1002012,message:"room ID contains illegal characters"},m={code:1002013,message:"room ID is too long"},d={code:1102021,message:"biz channel error."},v={code:1102024,message:"invalid channel"},h={code:1102026,msg:i.fT},_={code:1003050,message:"the extra info of the stream is null"},p={code:1003051,message:"the extra info of the stream is too long"},g={code:1103001,message:i.dO},x={code:1103002,message:"browser do not support"},b={code:1103010,message:"screen fail"},y={code:1103011,message:"enumerate devices fail"},S={code:1103012,message:"use camera device fail"},M={code:1103042,message:"screen canceled"},k={code:1103043,message:"screen not support"},w={code:1103053,message:"https is required"},T={code:1103055,message:i.Wk},R={code:1103061,message:"get media fail"},I={code:1103062,message:"update stream info fail"},E={code:1103063,message:"publish target no response"},C={code:1103064,message:"get device not allowed"},O={code:1103065,message:"device is not readable"},D={code:1103066,message:"device does not meet constraints"},z={code:1103048,message:i.pt}},8866:function(t,n,e){"use strict";e.d(n,{KQ:function(){return l},M$:function(){return u},QS:function(){return f},iq:function(){return c},jy:function(){return s},l3:function(){return o},zQ:function(){return a}});var i=e(7202),r=(e(8627),e(4872)),o=(e(4908),Promise);function u(t,n){for(var e in void 0===n&&(n=""),t){if(i.A.isLong(t[e])||(0,r.JO)(t[e]||(0,r.G0)(t[e])))return;Array.isArray(t[e])?t[e].forEach(function(t,n){u(t,n+"")}):(0,r.w)(t[e])?u(t[e],e):t.hasOwnProperty(e)||((0,r.Cs)(t[e])&&(t[e]=0),(0,r.QP)(t[e])&&(t[e]=""))}}function s(t){return/^([0-9a-zA-Z#!$%&()`'+-;<=.>@^_~,\\*])+$/.test(t)&&/^[^:/]*$/g.test(t)}function a(t,n){return 0==n?(0,r.Cs)(t)&&t%1==0&&t>=0:(0,r.Cs)(t)&&t%1==0&&t>0}function c(t){return JSON.stringify(t)}function f(t){return JSON.parse(t)}function l(){return(new Date).getTime()}},9021:function(t,n,e){var i;t.exports=(i=i||function(t,n){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e.g&&e.g.crypto&&(i=e.g.crypto),!i)try{i=e(477)}catch(t){}var r=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),u={},s=u.lib={},a=s.Base={extend:function(t){var n=o(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=a.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var n=this.words,e=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++)n[i+o>>>2]|=(e[o>>>2]>>>24-o%4*8&255)<<24-(i+o)%4*8;else for(var u=0;u<r;u+=4)n[i+u>>>2]=e[u>>>2];return this.sigBytes+=r,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=a.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(r());return new c.init(n,t)}}),f=u.enc={},l=f.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++){var o=n[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i+=2)e[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new c.init(e,n/2)}},m=f.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++)i.push(String.fromCharCode(n[r>>>2]>>>24-r%4*8&255));return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i++)e[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new c.init(e,n)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(m.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return m.parse(unescape(encodeURIComponent(t)))}},v=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,i=this._data,r=i.words,o=i.sigBytes,u=this.blockSize,s=o/(4*u),a=(s=n?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*u,f=t.min(4*a,o);if(a){for(var l=0;l<a;l+=u)this._doProcessBlock(r,l);e=r.splice(0,a),i.sigBytes-=f}return new c.init(e,f)},clone:function(){var t=a.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(s.Hasher=v.extend({cfg:a.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new h.HMAC.init(t,e).finalize(n)}}}),u.algo={});return u}(Math),i)},9506:function(t,n,e){var i,r,o,u,s,a,c;t.exports=(c=e(9021),e(5471),e(1025),u=(r=(i=c).lib).WordArray,a=(s=i.algo).EvpKDF=(o=r.Base).extend({cfg:o.extend({keySize:4,hasher:s.MD5,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,n){for(var e,i=this.cfg,r=i.hasher.create(),o=u.create(),s=o.words,a=i.keySize,c=i.iterations;s.length<a;){e&&r.update(e),e=r.update(t).finalize(n),r.reset();for(var f=1;f<c;f++)e=r.finalize(e),r.reset();o.concat(e)}return o.sigBytes=4*a,o}}),i.EvpKDF=function(t,n,e){return a.create(e).compute(t,n)},c.EvpKDF)},9728:function(t,n,e){"use strict";var i,r,o,u,s;e.d(n,{Xk:function(){return u},zN:function(){return s}}),function(t){t[t.AspectFill=0]="AspectFill",t[t.AspectFit=1]="AspectFit"}(i||(i={})),function(t){t[t.ZegoFontTypeSourceHanSans=0]="ZegoFontTypeSourceHanSans",t[t.ZegoFontTypeAlibabaSans=1]="ZegoFontTypeAlibabaSans",t[t.ZegoFontTypePangMenZhengDaoTitle=2]="ZegoFontTypePangMenZhengDaoTitle",t[t.ZegoFontTypeHappyZcool=3]="ZegoFontTypeHappyZcool"}(r||(r={})),function(t){t[t.ZegoAudioMixModeRaw=0]="ZegoAudioMixModeRaw",t[t.ZegoAudioMixModeFocused=1]="ZegoAudioMixModeFocused"}(o||(o={})),function(t){t[t.ZegoAudioCodecIDNormal=1]="ZegoAudioCodecIDNormal",t[t.ZegoAudioCodecIDNormal2=2]="ZegoAudioCodecIDNormal2",t[t.ZegoAudioCodecIDLow3=6]="ZegoAudioCodecIDLow3"}(u||(u={})),function(t){t[t.ZegoEncodeProfileDefault=0]="ZegoEncodeProfileDefault",t[t.ZegoEncodeProfileBaseline=1]="ZegoEncodeProfileBaseline",t[t.ZegoEncodeProfileMain=2]="ZegoEncodeProfileMain",t[t.ZegoEncodeProfileHigh=3]="ZegoEncodeProfileHigh"}(s||(s={}))}},i={};function r(t){var n=i[t];if(void 0!==n)return n.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,{a:n}),n},r.d=function(t,n){for(var e in n)r.o(n,e)&&!r.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){"use strict";r.r(o),r.d(o,{MixStream:function(){return Et}});var t=r(9728),n=r(3788);const e=r(6994);(n=n.default||n).util.Long=e.default||e,n.util.Long.fromBits=n.util.Long.fromBits||function(){return 0};for(var i=n.roots,u=n.types?n.types.basic:{double:1,float:5,int32:0,uint32:0,sint32:0,fixed32:5,sfixed32:5,int64:0,uint64:0,sint64:0,fixed64:1,sfixed64:1,bool:0,string:2,bytes:2},s=n.types?n.types.packed:{double:1,float:5,int32:0,uint32:0,sint32:0,fixed32:5,sfixed32:5,int64:0,uint64:0,sint64:0,fixed64:1,sfixed64:1,bool:0},a=Object.keys(u),c={$:function(t){return c[t]?c[t].call(this):i[t].decode?i[t].decode(this,this.uint32()):c.$.call(this,"int32")}},f={$:function(t,n,e){var r=u[t];return void 0===r?i[t].encode?(this.uint32(e<<3|2).fork(),i[t].encode(n,this).ldelim()):f.$.call(this,"int32",n,e):f[t].call(this.uint32(e<<3|r),n)}},l=0;l<a.length;l++)c[a[l]]=n.Reader.prototype[a[l]],f[a[l]]=n.Writer.prototype[a[l]];!function t(e,r,o,a){for(var l=0,m=Object.keys(e);l<m.length;l++){var d=m[l];if(e[d].$m&&Object.keys(e[d].$m).every(function(t){return Number(t)})){if(o[d])throw Error(`nested type ${o}.${d} has already exist`);o[d]=function(e,o){function a(t){for(var n in e){var i=e[n];"{"===i[1].charAt(0)?this[i[0]]={}:"["!==i[1].charAt(0)&&"<"!==i[1].charAt(0)||(this[i[0]]=[])}if(t)for(var r=Object.keys(t),o=0;o<r.length;++o)null!=t[r[o]]&&(this[r[o]]=t[r[o]])}var l={};for(var m in e){var d=e[m],v=d[1];"{"===v.charAt(0)?(a.prototype[d[0]]=n.util.emptyObject,l[v]={$m:v.substring(1).split(",").map(function(t,n){return[`$${n+1}`,t,null]}).reduce(function(t,n,e){return t[e+1]=n,t},{})}):a.prototype[d[0]]="["===v.charAt(0)||"<"===v.charAt(0)?n.util.emptyArray:"bytes"===v?n.util.newBuffer([]):d[2]&&d[2].hasOwnProperty("low")&&d[2].hasOwnProperty("high")?n.util.Long.fromBits(d[2].low,d[2].high,d[2].unsigned):d[2]}return a.create=function(t){return new a(t)},a.decode=function(t,r){t instanceof n.Reader||(t=n.Reader.create(t));for(var o=void 0===r?t.len:t.pos+r,u=new a;t.pos<o;){var f=t.uint32(),l=f>>>3;if(l>0&&e[l]){var m=e[l][0],d=e[l][1];if("{"===d.charAt(0)){u[m]===n.util.emptyObject&&(u[m]={});var v=a.$namespace[d].decode(t,t.uint32());u[m][v.$1]=v.$2}else if("["===d.charAt(0)||"<"===d.charAt(0)){d=d.substring(1),u[m]&&u[m].length||(u[m]=[]);if(void 0!==s[d=!c[d]&&!i[d].decode?"int32":d]&&2==(7&f))for(var h=t.uint32()+t.pos;t.pos<h;)u[m].push(c.$.call(t,d));else u[m].push(c.$.call(t,d))}else u[m]=c.$.call(t,d)}else t.skipType(7&f)}return u},a.encode=function(t,r){for(var o in r||(r=n.Writer.create()),e){var c=e[o][0],l=e[o][1];if("{"===l.charAt(0)){if(null!=t[c]&&t.hasOwnProperty(c))for(var m=0,d=Object.keys(t[c]);m<d.length;++m)r.uint32(o<<3|2).fork(),a.$namespace[l].encode({$1:d[m],$2:t[c][d[m]]},r).ldelim()}else if("["===l.charAt(0)||"<"===l.charAt(0)){var v="<"===l.charAt(0);l=l.substring(1);var h=t[c];if(null!=h&&h.length){if(l=void 0===u[l]&&!i[l].encode?"int32":l,v&&void 0!==s[l]){r.uint32(o<<3|2).fork();for(m=0;m<h.length;m++)f[l].call(r,h[m]);r.ldelim()}else for(m=0;m<h.length;m++)f.$.call(r,l,h[m],o)}}else null!=t[c]&&t.hasOwnProperty(c)&&f.$.call(r,l,t[c],o)}return r},Object.keys(l).length&&(a.$namespace=t(l,r+"."+o,a.$namespace||{},!0)),a}(e[d].$m,d)}else e[d].$s?o[d]=function(t,e){function o(t,e,i){n.rpc.Service.call(this,t,e,i)}return(o.prototype=Object.create(n.rpc.Service.prototype)).constructor=o,o.create=function(t,n,e){return new o(t,n,e)},Object.keys(t).forEach(function(n){var u=t[n];function s(t,n){return this.rpcCall(s,i[u[0]],i[u[1]],t,n)}Object.defineProperty(s,"name",{value:n}),Object.defineProperty(s,"path",{value:`${r}.${e}`}),o.prototype[n]=s}),o}(e[d].$s,d):e[d].$e&&Object.values(e[d].$e).every(function(t){return Number(t)===t})&&(o[d]=function(t){for(var n=Object.keys(t),e={},i=0;i<n.length;i++)e[e[n[i]]=t[n[i]]]=n[i];return e}(e[d].$e));o[d]&&!a&&(i[`${r}.${d}`]=o[d]),delete e[d].$m,delete e[d].$s,delete e[d].$e,o[d]=t(e[d],Boolean(r)?`${r}.${d}`:d,o[d]||{})}return o}({mixstream:{proto_mixstream:{AutoRoomMixOutputStream:{$m:{1:["stream_out_common","mixstream.proto_mixstream.MixOutputStreamCommon",null],2:["audio_channel_cnt","int32",0]}},AutoRoomMixStreamStartRequest:{$m:{1:["request_seq","uint32",0],2:["mix_stream_common","mixstream.proto_mixstream.MixStreamCommon",null],3:["mix_source","string",""],4:["room_id","string",""],5:["task_id","string",""],6:["water_mark","mixstream.proto_mixstream.MixWaterMark",null],7:["output_stream","<mixstream.proto_mixstream.AutoRoomMixOutputStream",null],8:["extra_params","<mixstream.proto_mixstream.MixAdvanceConfig",null],9:["has_recv_buffer_level","bool",!1],10:["recv_buffer_level","sint32",0]}},AutoRoomMixStreamStartResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null]}},AutoRoomMixStreamStopRequest:{$m:{1:["request_seq","uint32",0],2:["task_id","string",""],3:["room_id","string",""]}},AutoRoomMixStreamStopResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null]}},GetMixStreamStatusRequest:{$m:{1:["request_seq","uint32",0],2:["task_id","string",""]}},GetMixStreamStatusResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null],3:["push_url","<mixstream.proto_mixstream.PushUrl",null],4:["version","int32",0],5:["task_id","string",""]}},MixAdvanceConfig:{$m:{1:["key","string",""],2:["value","string",""]}},MixImage:{$m:{1:["url","string",""],2:["display_mode","int32",0]}},MixInputStream:{$m:{1:["stream_input_common","mixstream.proto_mixstream.MixInputStreamCommon",null],2:["volume","int32",0],3:["audio_focus","int32",0],4:["audio_h_angle","int32",0],5:["render_mode","int32",0],6:["corner_radius","uint32",0],7:["label","mixstream.proto_mixstream.MixLabel",null],8:["image","mixstream.proto_mixstream.MixImage",null]}},MixInputStreamCommon:{$m:{1:["stream_id","string",""],2:["sound_level_id","uint32",0],3:["content_control","int32",0],4:["layer_rect","mixstream.proto_mixstream.MixRect",null],5:["stream_url","string",""]}},MixLabel:{$m:{1:["text","string",""],2:["text_left","int32",0],3:["text_top","int32",0],4:["font","mixstream.proto_mixstream.MixLableFont",null]}},MixLableFont:{$m:{1:["font_type","int32",0],2:["font_size","int32",0],3:["font_color","int32",0],4:["font_transparency","int32",0],5:["font_border_color","sint32",0]}},MixOutputStream:{$m:{1:["output_stream_common","mixstream.proto_mixstream.MixOutputStreamCommon",null],2:["video_enc_id","int32",0],3:["video_encode_latency","int32",0],4:["video_encode_profile","int32",0],5:["low_bitrate_hd","int32",0]}},MixOutputStreamCommon:{$m:{1:["is_url","int32",0],2:["target","string",""],3:["video_fps","int32",0],4:["rate_control_mode","int32",0],5:["video_bitrate","int32",0],6:["video_width","int32",0],7:["video_height","int32",0],8:["output_quality","int32",0],9:["audio_bitrate","int32",0],10:["audio_enc_id","int32",0]}},MixRect:{$m:{1:["top","int32",0],2:["left","int32",0],3:["bottom","int32",0],4:["right","int32",0],5:["layer","int32",0]}},MixStartReplyData:{$m:{1:["request_id","string",""],2:["play_infos","<mixstream.proto_mixstream.PlayInfo",null]}},MixStreamCommon:{$m:{1:["user_data","string",""],2:["output_bg_color","int32",0],3:["output_bg_image","string",""],4:["with_sound_level","int32",0],5:["single_stream_pass_through","int32",0],6:["alignment_type","int32",0]}},MixstreamServerCommonResponse:{$m:{1:["code","uint32",0],2:["message","string",""]}},MixStreamStartRequest:{$m:{1:["request_seq","uint32",0],2:["mix_protocol_version","int32",0],3:["task_id","string",""],4:["room_id","string",""],5:["mix_stream_common","mixstream.proto_mixstream.MixStreamCommon",null],6:["audio_channel_cnt","int32",0],7:["audio_mix_mode","int32",0],8:["recv_buffer_level","sint32",0],9:["input_stream","<mixstream.proto_mixstream.MixInputStream",null],10:["water_mark","mixstream.proto_mixstream.MixWaterMark",null],11:["advance_config","<mixstream.proto_mixstream.MixAdvanceConfig",null],12:["output_stream","<mixstream.proto_mixstream.MixOutputStream",null],13:["white_board","mixstream.proto_mixstream.MixWhiteBoard",null],14:["timestamp","int64",{low:0,high:0,unsigned:!1}],15:["check_image_mode","int32",0]}},MixStreamStartResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null],3:["data","mixstream.proto_mixstream.MixStartReplyData",null],4:["error_streamid_list","<string",null]}},MixStreamStopRequest:{$m:{1:["request_seq","uint32",0],2:["task_id","string",""],3:["room_id","string",""],4:["is_url","int32",0],5:["target","string",""],6:["timestamp","int64",{low:0,high:0,unsigned:!1}]}},MixStreamStopResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null]}},MixStreamTaskHbRequest:{$m:{1:["request_seq","uint32",0],2:["task_id","string",""]}},MixStreamTaskHbResponse:{$m:{1:["request_seq","uint32",0],2:["common_response","mixstream.proto_mixstream.MixstreamServerCommonResponse",null],3:["status","uint32",0],4:["hb_interval","uint32",0]}},MixWaterMark:{$m:{1:["image","string",""],2:["layout_rect","mixstream.proto_mixstream.MixRect",null]}},MixWhiteBoard:{$m:{1:["whiteboard_id","uint64",{low:0,high:0,unsigned:!0}],2:["horizontal_ratio","int32",0],3:["vertical_ratio","int32",0],4:["is_ppt_animation","int32",0],5:["layout_rect","mixstream.proto_mixstream.MixRect",null],6:["background_color","int32",0]}},PlayInfo:{$m:{1:["stream_alias","string",""],2:["rtmp_url","string",""],3:["hls_url","string",""],4:["hdl_url","string",""]}},PushUrl:{$m:{1:["status","int32",0],2:["url","string",""],3:["mod_time","int64",{low:0,high:0,unsigned:!1}],4:["reason","int32",0]}}}}},"",i,!1);var m,d,v=i.mixstream,h=r(7202);m=v.proto_mixstream,(d=(d=r(3788)).default||d).util.Long=h.A,d.configure();var _,p=function(){function t(){}return t.prototype.encodeMixStreamStartReq=function(t){var n=m.MixStreamStartRequest.create(t);return m.MixStreamStartRequest.encode(n).finish()},t.prototype.decodeMixStreamStartRsp=function(t){return m.MixStreamStartResponse.decode(t)},t.prototype.encodeMixStreamStopReq=function(t){var n=m.MixStreamStopRequest.create(t);return m.MixStreamStopRequest.encode(n).finish()},t.prototype.decodeMixStreamStopRsp=function(t){return m.MixStreamStopResponse.decode(t)},t.prototype.encodeGetMixStreamStatusReq=function(t){var n=m.GetMixStreamStatusRequest.create(t);return m.GetMixStreamStatusRequest.encode(n).finish()},t.prototype.decodeGetMixStreamStatusRsp=function(t){return m.GetMixStreamStatusResponse.decode(t)},t.prototype.encodeAutoRoomMixStreamStartReq=function(t){var n=m.AutoRoomMixStreamStartRequest.create(t);return m.AutoRoomMixStreamStartRequest.encode(n).finish()},t.prototype.decodeAutoRoomMixStreamStartRsp=function(t){return m.AutoRoomMixStreamStartResponse.decode(t)},t.prototype.encodeAutoRoomMixStreamStopReq=function(t){var n=m.AutoRoomMixStreamStopRequest.create(t);return m.AutoRoomMixStreamStopRequest.encode(n).finish()},t.prototype.decodeAutoRoomMixStreamStopRsp=function(t){return m.AutoRoomMixStreamStopResponse.decode(t)},t.prototype.encodeMixStreamTaskHbReq=function(t){var n=m.MixStreamTaskHbRequest.create(t);return m.MixStreamTaskHbRequest.encode(n).finish()},t.prototype.decodeMixStreamTaskHbRsp=function(t){return m.MixStreamTaskHbResponse.decode(t)},t}(),g=r(5095),x={event:"/mix/start_mix",mix_stream_conf:g.Gq,stop_reason:g.tK},b="/mix/stop_mix",y={event:"/mix/config_mix",mix_params:g.Gq},S="/automix/start",M="/automix/stop",k=r(4872),w=r(8866),T=r(4908),R=r(8627),I=r(4871),E={code:1005e3,message:"no mix stream service"},C={code:1005001,message:"mixer task is null"},O={code:1005002,message:"task ID is too long"},D={code:1005003,message:"task ID contains illegal characters"},z={code:1005005,message:"task configuration does not specify output"},q={code:1005006,message:"stream output target is incorrect"},N={code:1005010,message:"start mixer task fail, possibly due to network reasons"},A={code:1005011,message:"stop mixer task fail, possibly due to network reasons"},L={code:1005020,message:"Mixed stream task input list is null"},$={code:1005021,message:"Mixed stream task output list is null"},P={code:1005023,message:"invalid mixed stream task video configuration"},j={code:1005025,message:"more than the maximum number of input streams"},H={code:1005026,message:"Input stream does not exist"},F={code:1005027,message:"mix stream input parameters are wrong"},U={code:1005028,message:"Input stream label text is too long"},B={code:1005029,message:"Output stream target is too long"},G={code:1005030,message:"more than the maximum number of output streams"},Z={code:1005034,message:"Input stream image url too long"},W={code:1005035,message:"Input stream image format wrong"},Q={code:1005036,message:"Input stream image get fail"},V={code:1005050,message:"mixed stream authentication failed"},K={code:1005061,message:"undefined"},X={code:1005062,message:"input watermark parameter is wrong"},Y={code:1005063,message:"illegal input watermark URL"},J={code:1005067,message:"illegal input background image URL"},tt={code:1005099,message:"mix stream input repeat"},nt={code:1005099,message:"mixer internal error"},et=r(2638),it=r(921),rt=function(){return rt=Object.assign||function(t){for(var n,e=1,i=arguments.length;e<i;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},rt.apply(this,arguments)},ot=1024,ut=1e4;_=h.A;var st,at=["NO_RELAY","RELAYING","RELAY_REQUESTING","NO_RELAY"],ct={0:"NONE",8:"SERVER_ERROR",9:"HANDSHAKE_FAILED",10:"ACCESS_POINT_ERROR",11:"CREATE_STREAM_FAILED",12:"BAD_NAME",13:"CDN_SERVER_DISCONNECTED",14:"DISCONNECTED",1214:"ALL_INPUT_STREAM_CLOSED",1215:"ALL_INPUT_STREAM_NO_DATA",1230:"SERVER_INTERNAL_ERROR"};!function(t){t[t.I=0]="I",t[t.H=10]="H",t[t.M=100]="M",t[t.L=1e3]="L"}(st||(st={}));var ft=" param is required and must be integer number",lt=" must be integer number",mt="enableSoundLevel is not bool",dt="stream output target is ",vt=" param taskID error",ht=" taskID must be string less 256";function _t(t){var n,e,i,r=nt,o=t.errorCode;return o<2e9&&o>1e9&&(e={1:N,2:N,3:V,141:W,142:Q,150:H,151:N,152:A,153:F,154:G,155:F,156:P,157:E,158:j,159:N,170:X,171:K,175:tt,179:U,190:N},i=nt,(n=o-ut)>1e9&&e[n-1e9]&&(i=e[n-1e9]),r=i),r.code===nt.code&&(r.message=t.extendedData),{reportErr:void 0,actualError:r}}function pt(t,n){return t.code==R.Q9p.code&&(t=n||nt),t.code&&20010===t.code&&(t=(0,w.QS)((0,w.iq)(E))),t}var gt={VIDEO:0,AUDIO:1,VIDEO_ONLY:2},xt={"H.264":0,"H.265":3};function bt(n){var e=0;switch(n){case t.Xk.ZegoAudioCodecIDNormal2:e=1;break;case t.Xk.ZegoAudioCodecIDLow3:e=3;break;default:e=0}return e}function yt(t,n){var e=!0;return t||(n(C,"no taskId found"),e=!1),(0,k.QP)(t)||(n(R.ZEp,"taskId must be string"),e=!1),t.length>256&&(n(O,"taskId is too long"),e=!1),(0,w.jy)(t)||(n(D,"task ID contains illegal characters"),e=!1),e}function St(t){return!t||!(0,k.QP)(t)||t.length>256||!(0,w.jy)(t)}function Mt(t,n,e,i){var r=!0;(0,k.w)(t)||(n(i||R.ZEp,e+" layout must be object"),r=!1);var o=t.bottom,u=t.left,s=t.right;return(0,w.zQ)(t.top,!1)&&(0,w.zQ)(o,!1)&&(0,w.zQ)(u,!1)&&(0,w.zQ)(s,!1)||(n(i||R.ZEp,e+" top、left、bottom、right must be integer number"),r=!1),r}function kt(t,n){return!t||!(0,w.zQ)(t,n)}function wt(t){return t.startsWith("rtmp://")||t.startsWith("avertp://")||t.startsWith("https://")&&t.endsWith(".flv")||t.startsWith("https://")&&t.endsWith(".m3u8")}var Tt={},Rt={startMixerTask:function(t){var n=this;return new w.l3(function(e,i){var r,o,u,s,a,c,f,l,m,d,v,h,_,p,g,b,y=n.reporter.createSpan(st.H,{key:T.oq.event},{key:x.event,par:t.taskID},x.event,!0),S={errorCode:F.code,extendedData:F.message};if(!!(null==t?void 0:t.inputList.find(function(t){return null==t.streamID&&(S.extendedData=S.extendedData+". streamID should be of string type",!0)})))return n.reporter.setError(y,F),void i(S);var M=t.outputConfig,E=t.inputList,C=t.outputList;M&&M.outputFps&&(M.outputFPS=M.outputFps);var O=function(e,r,o){void 0===r&&(r=""),void 0===o&&(o=!0),r&&n.logger.error("zb.sh.ums "+r);var u,s,a=(0,it.Nl)(e);if(o)u=s=a;else{var c=_t(a);u=c.reportErr,(s=c.actualError)&&(a.errorCode=null==s?void 0:s.code,a.extendedData=(null==s?void 0:s.message)||"")}n.reporter.setError(y,u||a),n.reporter.spanEnd({key:x.event,par:t.taskID}),i(a)},D=n.stateCenter.roomList[0];if(D){var N=[],A=R.ZEp;if(!t.noTaskID&&!yt(t.taskID,O))return;if(E&&0!=E.length)if(E.some(function(t){return(0,k.w)(t)&&!t.streamID}))O(L,"input stream is null");else{for(var P=0;P<E.length;P++){var j=E[P];if(!Mt(j.layout,O,"input"))return;if(!(0,k.TE)(j.renderMode)&&![0,1].includes(j.renderMode))return void O(A,"render_mode is wrong");if((0,k.w)(j.imageInfo)){if(!(0,k.QP)(j.imageInfo.url))return void O(A,"image url is require string");if(j.imageInfo.url.length>1024)return void O(Z,"input image url length too long")}if((0,k.w)(j.label)){if(!(0,k.QP)(null===(r=j.label)||void 0===r?void 0:r.text))return void O(A,"input label text is not string");if((null===(u=null===(o=j.label)||void 0===o?void 0:o.text)||void 0===u?void 0:u.length)>=300)return void O(U,"input label text is too long");var H=j.label,G=H.left,W=H.top;if(void 0!==G&&!(0,w.zQ)(G,!1)||void 0!==W&&!(0,w.zQ)(W,!1))return void O(A,"input label left and top should be integer")}if(void 0!==j.cornerRadius&&!(0,k.Cs)(j.cornerRadius))return void O(A,"cornerRadius is wrong");if((0,I.Pn)(j.soundLevelID,!1))return void O(A,"soundLevelID is wrong");if((0,I.Pn)(j.volume,!1))return void O(A,"volume is wrong")}if(C&&0!=C.length)if(C.some(function(t){return""===t||(0,k.w)(t)&&!(0,k.QP)(t.target)}))O($,dt+"null");else if(C.some(function(t){return(0,k.QP)(t)&&!wt(t)&&t.length>ot||(0,k.w)(t)&&(0,k.QP)(t.target)&&t.target.length>ot}))O(B,dt+"too long");else if(C.some(function(t){return(0,k.QP)(t)&&!wt(t)&&!(0,w.jy)(t)||(0,k.w)(t)&&(0,k.QP)(t.target)&&!wt(t.target)&&!(0,w.jy)(t.target)}))O(q,dt+"incorrect");else if(M&&(0,k.w)(M))if(kt(M.outputBitrate))O(A,"bitrate"+ft);else if(kt(M.outputFPS))O(A,"fps"+ft);else if(kt(M.outputWidth))O(A,"width"+ft);else if(kt(M.outputHeight))O(A,"height"+ft);else if((0,I.Pn)(M.outputAudioCodecID,!1))O(A,"AudioCodecID"+lt);else if((0,I.Pn)(M.outputAudioBitrate))O(A,"AudioBitrate"+lt);else if((0,I.Pn)(M.outputAudioChannels,!1))O(A,"AudioChannels"+lt);else{if((0,k.w)(t.watermark)){if(!(0,k.QP)(null===(s=t.watermark)||void 0===s?void 0:s.imageURL))return void O(A,"watermark image type err